What this does is it sends a charm drop to an npc, now I want to make it so certain npcs don't get that drop..
I tried it like this, I don't know how to make it check all instead of doing noCharm[1] && noCharm[2] etc.
int random = Utils.random(30);
int[] noCharms = {4278, 4279, 4280, 4282, 4283, 4284};
if (random >= 1 && random <= 5 && this.getId() != noCharms[]) {
sendDrop(killer, new Drop(12158, 60.0, 1, 1, false));
} else if (random >= 6 && random <= 11 && this.getId() != noCharms[]) {
sendDrop(killer, new Drop(12159, 60.0, 1, 1, false));
} else if (random >= 12 && random <= 15 && this.getId() != noCharms[]) {
sendDrop(killer, new Drop(12160, 60.0, 1, 1, false));
} else if (random == 15 && this.getId() != noCharms[]) {
sendDrop(killer, new Drop(12163, 60.0, 1, 1, false));
}
This obviously doesn't work yet, but I'd like to know how to make it check all the ints in the noCharm array..
Thank you.
This post has been edited by worldofwar: 10 August 2012 - 04:47 AM

New Topic/Question
Reply



MultiQuote








|