When Ppls Relog, Then The TP Scroll Is Gone I Dont Know Why, Please Help!? :blink:
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local pos = getThingPos(cid)
if getTileInfo(pos).protection then
doPlayerSendCancel(cid, 'You cannot use this inside a protection zone.')
elseif getCreatureCondition(cid, CONDITION_INFIGHT) then
doPlayerSendCancel(cid, 'You can\'t teleport immediately after fight.')
else
doTeleportThing(cid, getPlayerMasterPos(cid))
doSendMagicEffect(pos, 66)
doSendAnimatedText(pos, 'Teleport!', 16)
return true
end
return doSendMagicEffect(pos, CONST_ME_POFF)
end