Xagul
deathzot.net
- Joined
- Jun 30, 2008
- Messages
- 1,295
- Solutions
- 3
- Reaction score
- 1,043
Ok so I have ran into a small problem... When using an onEquip script (any script) the server will crash when a gm creates the item that uses that script if the item is placed in the slot it is intended to be equipped in. Here is a simplified example that will rule out any flawed code:
movements.xml
test.lua
ingame
although this error does not occur with a normal player since they cant use "/i" it is still very frustrating due to the fact that if an administrator makes that item by accident and it is placed in the slot by accident it will cause the server to crash (even if you relog) I was wondering if anyone has this same problem and if anyone has found a way to fix this, I am currently running TFS 0.4
movements.xml
Code:
<movevent type="Equip" itemid="10718" slot="necklace" event="script" value="test.lua"/>
test.lua
Code:
function onEquip(cid, item, slot)
return true
end
ingame
Code:
amulet slot = aol
/i 10718
amulet 10718 is placed in the arrow slot due to the amulet slot being used already.
no crash
amulet slot = empty
/i 10718
amulet 10718 is placed in the amulet slot
no crash
walk around
no crash
try to move the amulet/replace it with an aol (or try to relog)
server crash
although this error does not occur with a normal player since they cant use "/i" it is still very frustrating due to the fact that if an administrator makes that item by accident and it is placed in the slot by accident it will cause the server to crash (even if you relog) I was wondering if anyone has this same problem and if anyone has found a way to fix this, I am currently running TFS 0.4