zbizu
Legendary OT User
TP wand for admins, useful when moving through hard to access with commands place.
Use it like fishing rod.
Works through walls and can teleport you between floors.
updated to newest TFS version (branch master commit 1af9c7dae4937f2c27c6117cc4a6e4e870a993d8 / 17th Nov 2019)
How it works:
actions.xml
admin_tp.lua
Use it like fishing rod.
Works through walls and can teleport you between floors.
updated to newest TFS version (branch master commit 1af9c7dae4937f2c27c6117cc4a6e4e870a993d8 / 17th Nov 2019)
How it works:
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)
Player(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)
if player: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 player:isInGhostMode() then
player:teleportTo(i)
return true
else
local f = player:getPosition()
Position(f):sendMagicEffect(CONST_ME_THUNDER)
Position(i):sendMagicEffect(CONST_ME_THUNDER)
addEvent(spellTP, 500, player:getId(), f, i)
return true
end
end
return false
end