local tpplace = {x=92,y=114,z=7} -- place of tp
local itemplace = {x=92,y=117,z=7} --place of item
local itemid = 2446 -- the itemid
local tpto = {x=95,y=117,z=7} --place that tp teleport to
function onThink(interval)
if getTileItemById(itemplace,itemid).uid > 0 then
if getTileItemById(tpplace,1387).uid < 1 then
doCreateTeleport(1387,tpto,tpplace)
end
elseif getTileItemById(itemplace,itemid).uid < 1 then
if getTileItemById(tpplace,1387).uid > 0 then
doCleanTile(tpplace)
end
end
return true
end
onAddItem(moveItem, tileItem, position, cid)
onRemoveItem(moveItem, tileItem, position, cid)