local a = 2481 -- actionid
local ip,p,pt = 1370,{x=1,y=1,z=7},{x=1,y=1,z=7} -- teleport itemid, teleport pos, position to teleport to.
local m = 'GanjaMon' -- monster name
function onKill(cid,target)
if getCreatureName(target):lower() == m:lower() then
if getTileItemById(p,ip).uid > 0 then -- change 1370 to your teleport's itemid.
doRemoveItem(getTileItemById(p,1370).uid)
doSetItemSpecialDescription(doCreateTeleport(ip,pt,p),'aid',a)
addEvent(doRemoveTp,30*1000)
end
end
return true
end
local ptt = {x=1,y=1,z=7} -- where to tp to with old teleport.
function doRemoveTp()
doRemoveItem(getTileItemById(p,1370).uid)
doCreateTeleport(doCreateTeleport(ip,ptt,p)
end