• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

os.time WARZONE Teleport

  • Thread starter Thread starter Deleted member 141899
  • Start date Start date
D

Deleted member 141899

Guest
I'm breaking my head here already have much time and I can not identify where can I change the time to re-enter the warzone after killing the boss, help me please!
Im Looking at this script: Warzonetimeteleport.lua at movements

I do not know what time is it in storage

Code:
local destination = {
    [3140] = {newPos = {x = 32996, y = 31922, z = 10}, storageTime = 524627},
    [3141] = {newPos = {x = 33011, y = 31943, z = 11}, storageTime = 524628},
    [3142] = {newPos = {x = 32989, y = 31909, z = 12}, storageTime = 524629},
}

function onStepIn(cid, item, position, lastPosition)
    local v = destination[item.uid]
    if(v) then
        local p = Player(cid)
        if getPlayerStorageValue(cid, destination[item.uid].storageTime) <= os.time() then
            p:teleportTo(v.newPos)
            p:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
        else
            p:teleportTo(lastPosition)
        end
    end
return true
end

HELP!
 
what tfs are u using?

Code:
local destination = {
    [3140] = {newPos = Position(32996, 31922, 10), storageTime = 124627, time = 1},
    [3141] = {newPos = Position(33011, 31943, 11), storageTime = 524628, time = (1 * 60)},
    [3142] = {newPos = Position(32989, 31909, 12), storageTime = 924629, time = 1}
}

function onStepIn(creature item, position, fromPosition)
    local player = creature:getPlayer()
    if not player then return true end

    local v = destination[item.uid]

    if player:getStorageValue(v.storageTime) < os.time() then
        player:teleportTo(v.newPos)
        player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
        player:setStorageValue(v.storageTime, os.time + (v.time ~= nil and v.time or 1) * 60)
    else
        player:teleportTo(fromPosition)
    end
    return true
end
test and post errors pls
_recently edited_
 
Last edited:
what tfs are u using?

Code:
local destination = {
    [3140] = {newPos = Position(32996, 31922, 10), storageTime = 124627, time = 1},
    [3141] = {newPos = Position(33011, 31943, 11), storageTime = 524628, time = (1 * 60)},
    [3142] = {newPos = Position(32989, 31909, 12), storageTime = 924629, time = 1}
}

function onStepIn(creature item, position, fromPosition)
    local player = creature:getPlayer()
    if not player then return true end

    local v = destination[item.uid]

    if player:getStorageValue(v.storageTime) < os.time() then
        player:teleportTo(v.newPos)
        player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
        player:setStorageValue(v.storageTime, os.time + (v.time ~= nil and v.time or 1) * 60)
    else
        player:teleportTo(fromPosition)
    end
    return true
end
test and post errors pls
_recently edited_

Works good, only change 1 line since it's missing
Code:
,

Code:
function onStepIn(creature, item, position, fromPosition)
 
Back
Top