Eternal Life
New Member
I am requesting a script that gives you ability to teleport a player to a specific position if u use a rune on that person like a teleport run or a jail rune
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getCreatureCondition(cid, CONDITION_INFIGHT) then
doPlayerSendCancel(cid, 'You can\'t teleport while in fight.')
else
doRemoveItem(item.uid)
local old, new = getThingPos(cid), getPlayerMasterPos(cid)
doTeleportThing(cid, new)
doSendMagicEffect(old, CONST_ME_TELEPORT)
doSendMagicEffect(new, CONST_ME_TELEPORT)
doCreatureSay(cid, 'You have teleported to your home temple.', TALKTYPE_ORANGE_1, false, cid)
end
return true
end
<action itemid="2500" event="script" value="tprune.lua"/>
doRemoveItem(item.uid)