Nice, could be handy for a npc kill shop or something.
|
Okay first of i made this because i had nothing to doxD
i know its very basic, But i post it here for people Who want.
Lets start with Saving your npc kills.
Open Playersave.Java
Search for:
Right under it add:p.pcPoints = Integer.parseInt(token2);
Now search for:} else if (token.equals("npc-kills")) {
p.npcKills = Integer.parseInt(token2);
Under it add:characterfile.write("pc-points = ", 0, 12);
characterfile.write(Integer.toString(p.pcPoints), 0, Integer.toString(p.pcPoints).length());
characterfile.newLine();
Save & close Playersave.Javacharacterfile.write("npc-kills = ", 0, 12);
characterfile.write(Integer.toString(p.npcKills), 0, Integer.toString(p.npcKills).length());
characterfile.newLine();
Open Player.java & search for
Under it add:pcPoints,
Save & close Player.JavanpcKills,
Making That if you kill an npc you get + 1 kill
Open Npchandler.Java
Search for:
under "if(c != null) {" Add:void dropItems
Done!!c.npcKills += 1;
EXTRA:
Adding a command that says: you killed ### Npcs!.
Open Commands.Java
Above
AddplayerCommand.equalsIgnoreCase("players")
Or just add it anywhere else in commands.javaif (playerCommand.startsWith("npckills")) {
c.sendMessage("You killed " + c.npcKills + " Npcs");
}
Picture:
Nice, could be handy for a npc kill shop or something.
Thanks should i post a tutorial of making a npc kill shop?
why are you making it give points when it drops items?...
common sense but gj
edit
kk Thx,
I like that, does it save, and continue the counter when you relog?
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |