Page 2 of 2

Re: Dear Guru's: Global drop with Params

Posted: Sun Jun 29, 2014 3:25 pm
by jurchiks
@mattjanes - you could optimise those IFs to this:

Code: Select all

if (di.dropChance > getRandom(1000000)){    if (di.isSpoil)    {        // ...    }    else    {        monster.dropItem(event.getAttacker().getActingPlayer(), new ItemHolder(di.itemId, getRandom(di.minCount, di.maxCount)));    }}
As far as I know, there is no way to set a monster's spoil drops in real time. Besides, there's a number of problems with doing that - what if the player does not have the ability to sweep the monster, or what if the player has spoiled the monster himself (you could fuck up the actual spoil data)?

Re: Dear Guru's: Global drop with Params

Posted: Mon Jun 30, 2014 3:15 am
by mattjanes
Thanks Jurchiks,

So I guess spoils will probably be a no-go then I'll have to try and think up another way of doing something similar for all the spoils for mobs 1-10,11-20 etc to be the same without manually adding to all mobs.