GOD Esteve
New Member
- Joined
- May 18, 2011
- Messages
- 87
- Reaction score
- 1
Hello guys
Im trying to make a item that will add life when player attack about 30% of damage.
Work only with player
When hit a monster don`t heal
Please somebody help to fix
Im trying to make a item that will add life when player attack about 30% of damage.
<event type="statschange" name="ItemRegen" script="MEUS/itemregen.lua"/>
registerCreatureEvent(cid, "ItemRegen")
function onStatsChange(cid, attacker, type, combat, value)
if isCreature(attacker) == true then
if(getPlayerSlotItem(attacker, 3).itemid == 12685) then
dmg = math.ceil(value*(30/100))
doCreatureAddHealth(attacker, dmg)
end
end
return TRUE
end
Work only with player
When hit a monster don`t heal
Please somebody help to fix
Last edited: