GarQet
Own3d!
- Joined
- Feb 10, 2009
- Messages
- 1,381
- Solutions
- 14
- Reaction score
- 81
Hello Otlanders!
I need fast help.
I have this script to my ring (ring.lua):
in .xml
When we equip this ring, he is working properly but when we deequip this ring, server going to crash.
Please help me!
I need fast help.
I have this script to my ring (ring.lua):
Code:
function onDeEquip(cid, item, slot)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-100)
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-100)
doTransformItem(item.uid, 6300)
return true
end
function onEquip(cid, item, slot)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)+100)
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+100)
doTransformItem(item.uid, 6301)
doDecayItem(item.uid)
return true
end
in .xml
Code:
<movevent type="Equip" itemid="6300" slot="ring" event="script" value="ring.lua"/>
<movevent type="Equip" itemid="6301" slot="ring" event="script" value="ring.lua"/>
<movevent type="DeEquip" itemid="6301" slot="ring" event="script" value="ring.lua"/>
When we equip this ring, he is working properly but when we deequip this ring, server going to crash.
Please help me!