• 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!

equipment script

DedicatedOT

New Member
Joined
Jun 13, 2009
Messages
977
Reaction score
4
Location
USA
Hi,

How come when I set
Lua:
	<movevent event="DeEquip" itemid="2121" slot="ring" function="onDeEquip" script="ringofhealing.lua"/>

Lua:
function onEquip(cid, item, var)
	doCreatureSay(cid,"Using " .. getItemName(item.itemid) , TALKTYPE_ORANGE_1)
	return TRUE
end

function onDeEquip(cid, item, var)
	doCreatureSay(cid,"Put your " .. getItemName(item.itemid) .. " back on!", TALKTYPE_ORANGE_1)
	return TRUE
end

It nullifies the attributes of the ring itself as defined in items.xml? That is the ring doesn't heal at all...
 
You forgot this in your movements.xml

Lua:
<movevent event="Equip" itemid="2121" slot="ring" function="onEquipItem" script="ringofhealing.lua"/>

just put it over the "DeEquip" part.


kind regards, Evil Hero
 
Actually, I do have
Code:
  <movevent event="Equip" itemid="2121" slot="ring" function="onEquipItem" script="ringofhealing.lua"/>  
  <movevent event="DeEquip" itemid="2121" slot="ring" function="onDeEquip" script="ringofhealing.lua"/>

Still doesn't heal.
 
Back
Top