Hey guys,
I'm using a Zenith Scape source and I'm trying to figure out how to minimize the amount of charms dropped at once. Currently, the amount ranges from like.. 11 charms to 30 charms. I want this to be just 1 single charm instead.
What I have in NPC.java :
Code:
int [] charms = {12159, 12160, 12158, 12163};
int li = Misc.random(3);
Drop dr = new Drop(charms[li],85,11,31,false);
sendDrop(killer,dr);
Drop[] possibleDrops = new Drop[drops.length];
int possibleDropsCount = 0;
for (Drop drop : drops) {
if (drop.getRate() == 10)
sendDrop(killer, drop);
else {
if ((Utils.getRandomDouble(99) + 1) <= drop.getRate() * 1)
possibleDrops[possibleDropsCount++] = drop;
}
}
if (possibleDropsCount > 0)
sendDrop(killer,
possibleDrops[Utils.getRandom(possibleDropsCount - 1)]);
Also, as you can see, I tried changing the rate the charms are dropped to 10%, but every NPC I kill, still drops charms, being a 100% drop rate.
Can anyone help?