So, im making up a new minigame for my server and i wanted to make it so whenever you kill a monster you get points for it; just like Godwars ect..
So, i went in and copied the "appendKillCount"; code because it looked like it would work;
But it didn't ._.
Is this the right way to do it?, or is there another way?.
Code:
public void appendMonsterPoints(int i) {
Client c = (Client) PlayerHandler.players[npcs[i].killedBy];
if (c != null) {
int[] mpMonsters = { 73, 74 };
for (int j : mpMonsters) {
if (npcs[i].npcType == j) {
c.zombieCount++;
c.zombiePoints += Misc.random(25);
c.sendMessage("Zombie Killcount: " + c.zombieCount);
break;
}
}
}
}