• 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!

Storage Required for Tile

Autobus

New Member
Joined
May 29, 2018
Messages
32
Reaction score
1
Hello, I'm creating a whitelisted server and I want to put some tiles at the exit of the temple, this way random people can join but can't exit the temple without being registered by an admin (he would give the storage required to get out of the temple). I tried looking for some POI tiles scripts but no luck, I'm using TFS 1.2, I know it's something about movements stepIn and stuff but can't really get it together to work.
 
Solution
But how do I configure that?
movements.xml
XML:
 <movevent event="StepIn" uniqueid="9834" script="citizen.lua" />

yourpost.lua
Lua:
function onStepIn(player, item, position, fromPosition)
    if player:getStorageValue(45001) < 0 then
        player:teleportTo(fromPosition)
    end
    return true
end

Remere's, set uniqueid on tile
and that's it?
make it actionid.
and place it on all of the tiles just outside of the temple.
Make sure there isn't any missed squares / diagonals that people can get through. :)

Feel free to add me on discord if you're having trouble still.
Xikini#0001
Probably just something like this will work.
45001 is the storage.
Lua:
function onStepIn(player, item, position, fromPosition)
    if player:getStorageValue(45001) < 0 then
        player:teleportTo(fromPosition)
    end
    return true
end
 
But how do I configure that?
movements.xml
XML:
 <movevent event="StepIn" uniqueid="9834" script="citizen.lua" />

yourpost.lua
Lua:
function onStepIn(player, item, position, fromPosition)
    if player:getStorageValue(45001) < 0 then
        player:teleportTo(fromPosition)
    end
    return true
end

Remere's, set uniqueid on tile
and that's it?
 
But how do I configure that?
movements.xml
XML:
 <movevent event="StepIn" uniqueid="9834" script="citizen.lua" />

yourpost.lua
Lua:
function onStepIn(player, item, position, fromPosition)
    if player:getStorageValue(45001) < 0 then
        player:teleportTo(fromPosition)
    end
    return true
end

Remere's, set uniqueid on tile
and that's it?
make it actionid.
and place it on all of the tiles just outside of the temple.
Make sure there isn't any missed squares / diagonals that people can get through. :)

Feel free to add me on discord if you're having trouble still.
Xikini#0001
 
Solution
Back
Top