zbizu
Legendary OT User
supports multi-floor and going through walls
use it like a fishing rod
actions.xml
admin_tp.lua
use it like a fishing rod
actions.xml
Code:
<action itemid="12318" script="admin_tp.lua" allowfaruse="1" blockwalls="0" checkfloor="0"/>
admin_tp.lua
Code:
function spellTP(p, frompos, topos)
p:teleportTo(topos)
Position(topos):sendMagicEffect(CONST_ME_PURPLEENERGY)
Position(topos):sendMagicEffect(CONST_ME_ENERGYAREA)
Position(frompos):sendMagicEffect(CONST_ME_PURPLEENERGY)
Position(frompos):sendMagicEffect(CONST_ME_ENERGYAREA)
end
function onUse(player, item, frompos, item2, topos)
local p = player
if p:getAccountType() < ACCOUNT_TYPE_GOD then
return false
end
local i = Item(item2.uid):getPosition()
if i.x > 0 and i.x < 65536 and i.y > 0 and i.y < 65536 then
if p:isInGhostMode() then
p:teleportTo(i)
return true
else
local f = p:getPosition()
Position(f):sendMagicEffect(CONST_ME_THUNDER)
Position(i):sendMagicEffect(CONST_ME_THUNDER)
addEvent(spellTP, 500, p, f, i)
return true
end
end
return false
end
Last edited: