TFS 1.3
Hello, guys.
Well, I'm trying to make a simple script when a monster dies, I do something with a item from loot.
For example, rat drops gold coins, right?
If I check if he (rat) has gold coin by the function corpse:getItemCountById(2148), it returns 0 (even he dropped). I tried other things like corpse:addItem(2160, 1) and it works.
Oh, I'm using function onDeath(creature, corpse, killer, mostDamage, unjustified, mostDamage_unjustified)
Someone can help me?
Hello, guys.
Well, I'm trying to make a simple script when a monster dies, I do something with a item from loot.
For example, rat drops gold coins, right?
If I check if he (rat) has gold coin by the function corpse:getItemCountById(2148), it returns 0 (even he dropped). I tried other things like corpse:addItem(2160, 1) and it works.
Oh, I'm using function onDeath(creature, corpse, killer, mostDamage, unjustified, mostDamage_unjustified)
Someone can help me?