• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Ring

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):
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!
 
Try adding this line to .xml file :p

LUA:
<movevent type="DeEquip" itemid="6300" slot="ring" event="script" value="ring.lua"/>
 
Overall, the ring works, but when we get it from sms shop, ring automatically is equip. After removing it, the server going to crash.
 

Similar threads

Replies
0
Views
199
Back
Top