• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Action [TFS 1.3] TP Wand for admins (updated)

zbizu

Legendary OT User
Joined
Nov 22, 2010
Messages
3,323
Solutions
26
Reaction score
2,694
Location
Poland
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
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
 
Back
Top