function onStepIn(cid, item, position, fromPosition)
local player=Player(cid)
player:setGhostMode(true)
end
end
The script interface has changed a lot, your script might work but its not correctly done, take a look at here: otland/forgottenserver (https://github.com/otland/forgottenserver/wiki/Script-Interface)Like this?Code:function onStepIn(cid, item, position, fromPosition) if isPlayer(cid) and getCreatureStorage(cid, 9999) == -1 then local player=Player(cid) player:setGhostMode(true) end end
/hide
you can use it like /hide itemID
then you'll look exactly the same as the item without name or hp or anything.<movevent event="StepOut" actionid="55557" script="test2.lua" />
<movevent event="StepIn" actionid="55557" script="test2.lua" />
function onStepIn(creature, item, position, fromPosition)
if item.actionid == 55557 then
creature:getPosition():sendMagicEffect(6)
creature:setGhostMode(true)
end
return true
end
function onStepOut(creature, item, position, fromPosition)
if item.actionid == 55557 then
creature:getPosition():sendMagicEffect(7)
creature:setGhostMode(false)
end
return true
end