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

onEquip error

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
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
 
@TomCrusher
There is "onDeEquip" I just didn't post it because I didn't think it was relevant.

@Fare
I have not donated on this account since I have someone else hosting for me, instead we decided to donate on his account so its easier for him to access the updates via his own account.

p.s. does this mean everyone is having this problem?
 
Back
Top