Using Player event isn't slower than using movement??you may get some ideas with this commit:
https://github.com/PrinterLUA/FORGOTTENSERVER-ORTS/commit/4497966463bcbadb85e2d9dadbdedbaee13d6b3c
I don't know, but using movement crashed tfsUsing Player event isn't slower than using movement??
Code:function onStepIn(cid, item, pos, from) if isPlayer(cid) then return true end return false end
I'm not sure if they do either but I can't run my test server 24/7 either so I just write out a possible solution.I don't think that items trigger onstep events, only onmove xD
Code:function onStepIn(cid, item, pos, from) if isPlayer(cid) then return true end return false end
function Player:onMoveItem(item, count, fromPosition, toPosition)
Unfortunately I don't use TFS 1.0
Does anyone have any idea how it can be solved in TFS 0.3.7 [0.4]?
<movevent type="AddItem" tileitem="1" itemid="1387" event="script" value="no_add.lua"/>
function onAddItem(moveitem, tileitem, position, cid)
doRemoveItem(moveitem.uid) -- Removes the item
doPlayerAddItem(cid, moveitem.itemid, moveitem.type) -- Returns the item back to the sender
doPlayerSendCancel(cid, "You may not throw items here.") -- Sends cancel message
return true
end