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

TFS 1.X+ depots bug

Lbtg

Intermediate OT User
Joined
Nov 22, 2008
Messages
2,298
Reaction score
127
Hello i use 8.60 based tfs 1.3 when i open any DEPOT, server gets KILLED(says on putty).

Any ideas why its crashing the server if i open depot ?
 
Solution
Add this instead of your tiles.lua
Lua:
local increasing = {[416] = 417, [426] = 425, [446] = 447, [3216] = 3217, [3202] = 3215, [11062] = 11063}
local decreasing = {[417] = 416, [425] = 426, [447] = 446, [3217] = 3216, [3215] = 3202, [11063] = 11062}

function onStepIn(creature, item, position, fromPosition)
    if not increasing[item.itemid] then
        return true
    end

    if not creature:isPlayer() or creature:isInGhostMode() then
        return true
    end

    item:transform(increasing[item.itemid])

    if item.actionid >= 1000 then
        if creature:getLevel() < item.actionid - 1000 then
            creature:teleportTo(fromPosition, false)
            position:sendMagicEffect(CONST_ME_MAGIC_BLUE)...
Have you set town to depot? I am using same TFS and I can open it normally.
Try fresh character and try default tfs data-pack so we know if its server-side or source-side
 
 
Have you set town to depot? I am using same TFS and I can open it normally.
Try fresh character and try default tfs data-pack so we know if its server-side or source-side
made totaly new char all seems fine, till i open yalahar depot and server gets killed.

DO yo set on depots ids or anything ? as i check on rme all depots on all citys are same(no id in them or uniqid)
Post automatically merged:

Very strange bug. i open depot and inside depot, nothing happends , closing the depot and opening again cause the kill ( atlist it seems so for now)
restarted the server 100x times
Post automatically merged:

AHAA, its not depot, if i step 2 times on orange floor server gets killed lol... wtf
 
Last edited:
Which floor? Which server are you using?
i use this project:


Okey so i edited tiles/floors in mapper to old ones, and anyway same thing happends.

If player steps near SAME depot twice server gets killed, if i step on different depots nothhing happends, but as soon i step twice on same place near depot server gets killed....WTF :D....
 
Its server side, I tried to do it with Nekiro's downgraded TFS 1.3 and it never happened.
Your tiles has any action/unique ID? Which tiles are you using?
testile.gif
 
Its server side, I tried to do it with Nekiro's downgraded TFS 1.3 and it never happened.
Your tiles has any action/unique ID? Which tiles are you using?
View attachment 49648
NO actionid or uniqid


was this orannge floor,later i change to id:446 or that grey switch floor, and server gets killed/crashed.

i changed now depots to simple floor as is in depot and all works good, no crash. very stange
 
Not enough memory? Looks like you are running huge server on a low system requirements pc/host? Not sure.
 
Lua:
local increasing = {[416] = 417, [426] = 425, [446] = 447, [3216] = 3217, [3202] = 3215, [11062] = 11063}
local decreasing = {[417] = 416, [425] = 426, [447] = 446, [3217] = 3216, [3215] = 3202, [11063] = 11062}

function onStepIn(creature, item, position, fromPosition)
    if not increasing[item.itemid] then
        return false
    end

    local player = creature:getPlayer()
    if not player or player:isInGhostMode() then
        return true
    end

    item:transform(increasing[item.itemid])

    if item.actionid >= 1000 then
        if player:getLevel() < item.actionid - 1000 then
            player:teleportTo(fromPosition, false)
            position:sendMagicEffect(CONST_ME_MAGIC_BLUE)
            player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The tile seems to be protected against unwanted intruders.")
        end

        return true
    end

    if position:getTile():hasFlag(TILESTATE_PROTECTIONZONE) then
        local lookPosition = player:getPosition()
        lookPosition:getNextPosition(player:getDirection())
        local depotItem = lookPosition:getTile():getItemByType(ITEM_TYPE_DEPOT)

        if depotItem ~= nil then
            --local depotItems = player:getDepotChest(getDepotId(depotItem.uid), true):getItemHoldingCount()
            local depotItems = 0
            for id = 1, configManager.getNumber("depotBoxes") do
                depotItems = depotItems + player:getDepotChest(id, true):getItemHoldingCount()
            end

            player:sendTextMessage(MESSAGE_STATUS_DEFAULT, "Your depot contains " .. depotItems .. " item" .. (depotItems > 1 and "s." or "."))
            return true
        end
    end

    if item.actionid ~= 0 and player:getStorageValue(item.actionid) <= 0 then
        player:teleportTo(fromPosition, false)
        position:sendMagicEffect(CONST_ME_MAGIC_BLUE)
        player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The tile seems to be protected against unwanted intruders.")
        return true
    end

    return true
end

function onStepOut(creature, item, position, fromPosition)
    if not decreasing[item.itemid] then
        return false
    end

    if creature:isPlayer() and creature:isInGhostMode() then
        return true
    end

    item:transform(decreasing[item.itemid])
    return true
end
Post automatically merged:

Post your tiles.lua
here
 
Do you have this in your config.lua or in your server? This is not a 8.6 thing, Remove it.
Lua:
depotBoxes
 
Add this instead of your tiles.lua
Lua:
local increasing = {[416] = 417, [426] = 425, [446] = 447, [3216] = 3217, [3202] = 3215, [11062] = 11063}
local decreasing = {[417] = 416, [425] = 426, [447] = 446, [3217] = 3216, [3215] = 3202, [11063] = 11062}

function onStepIn(creature, item, position, fromPosition)
    if not increasing[item.itemid] then
        return true
    end

    if not creature:isPlayer() or creature:isInGhostMode() then
        return true
    end

    item:transform(increasing[item.itemid])

    if item.actionid >= 1000 then
        if creature:getLevel() < item.actionid - 1000 then
            creature:teleportTo(fromPosition, false)
            position:sendMagicEffect(CONST_ME_MAGIC_BLUE)
            creature:sendTextMessage(MESSAGE_INFO_DESCR, "The tile seems to be protected against unwanted intruders.")
        end
        return true
    end

    if Tile(position):hasFlag(TILESTATE_PROTECTIONZONE) then
        local lookPosition = creature:getPosition()
        lookPosition:getNextPosition(creature:getDirection())
        local depotItem = Tile(lookPosition):getItemByType(ITEM_TYPE_DEPOT)
        if depotItem then
            local depotItems = creature:getDepotChest(getDepotId(depotItem:getUniqueId()), true):getItemHoldingCount()
            creature:sendTextMessage(MESSAGE_STATUS_DEFAULT, "Your depot contains " .. depotItems .. " item" .. (depotItems > 1 and "s." or "."))
            return true
        end
    end

    if item.actionid ~= 0 and creature:getStorageValue(item.actionid) <= 0 then
        creature:teleportTo(fromPosition, false)
        position:sendMagicEffect(CONST_ME_MAGIC_BLUE)
        creature:sendTextMessage(MESSAGE_INFO_DESCR, "The tile seems to be protected against unwanted intruders.")
        return true
    end
    return true
end

function onStepOut(creature, item, position, fromPosition)
    if not decreasing[item.itemid] then
        return true
    end

    if creature:isPlayer() and creature:isInGhostMode() then
        return true
    end

    item:transform(decreasing[item.itemid])
    return true
end
I only removed the depotBoxes because it doesn't exist on 8.6 and looks like you took it from higher client server 10.x or 12.x
 
Last edited:
Solution
Add this instead of your tiles.lua
Lua:
local increasing = {[416] = 417, [426] = 425, [446] = 447, [3216] = 3217, [3202] = 3215, [11062] = 11063}
local decreasing = {[417] = 416, [425] = 426, [447] = 446, [3217] = 3216, [3215] = 3202, [11063] = 11062}

function onStepIn(creature, item, position, fromPosition)
    if not increasing[item.itemid] then
        return false
    end

    local player = creature:getPlayer()
    if not player or player:isInGhostMode() then
        return true
    end

    item:transform(increasing[item.itemid])

    if item.actionid >= 1000 then
        if player:getLevel() < item.actionid - 1000 then
            player:teleportTo(fromPosition, false)
            position:sendMagicEffect(CONST_ME_MAGIC_BLUE)
            player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The tile seems to be protected against unwanted intruders.")
        end

        return true
    end

    if position:getTile():hasFlag(TILESTATE_PROTECTIONZONE) then
        local lookPosition = player:getPosition()
        lookPosition:getNextPosition(player:getDirection())
        local depotItem = lookPosition:getTile():getItemByType(ITEM_TYPE_DEPOT)

        if depotItem then
            local depotItems = creature:getDepotChest(getDepotId(depotItem:getUniqueId()), true):getItemHoldingCount()
            creature:sendTextMessage(MESSAGE_STATUS_DEFAULT, "Your depot contains " .. depotItems .. " item" .. (depotItems > 1 and "s." or "."))
            return true
    end

    if item.actionid ~= 0 and player:getStorageValue(item.actionid) <= 0 then
        player:teleportTo(fromPosition, false)
        position:sendMagicEffect(CONST_ME_MAGIC_BLUE)
        player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The tile seems to be protected against unwanted intruders.")
        return true
    end

    return true
end

function onStepOut(creature, item, position, fromPosition)
    if not decreasing[item.itemid] then
        return false
    end

    if creature:isPlayer() and creature:isInGhostMode() then
        return true
    end

    item:transform(decreasing[item.itemid])
    return true
end
end
I only removed the depotBoxes because it doesn't exist on 8.6 and looks like you took it from higher client server 10.x or 12.x
i took it from 8.60 1.3 tfs project :O oke i will replace it
Post automatically merged:

Add this instead of your tiles.lua
Lua:
local increasing = {[416] = 417, [426] = 425, [446] = 447, [3216] = 3217, [3202] = 3215, [11062] = 11063}
local decreasing = {[417] = 416, [425] = 426, [447] = 446, [3217] = 3216, [3215] = 3202, [11063] = 11062}

function onStepIn(creature, item, position, fromPosition)
    if not increasing[item.itemid] then
        return false
    end

    local player = creature:getPlayer()
    if not player or player:isInGhostMode() then
        return true
    end

    item:transform(increasing[item.itemid])

    if item.actionid >= 1000 then
        if player:getLevel() < item.actionid - 1000 then
            player:teleportTo(fromPosition, false)
            position:sendMagicEffect(CONST_ME_MAGIC_BLUE)
            player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The tile seems to be protected against unwanted intruders.")
        end

        return true
    end

    if position:getTile():hasFlag(TILESTATE_PROTECTIONZONE) then
        local lookPosition = player:getPosition()
        lookPosition:getNextPosition(player:getDirection())
        local depotItem = lookPosition:getTile():getItemByType(ITEM_TYPE_DEPOT)

        if depotItem then
            local depotItems = creature:getDepotChest(getDepotId(depotItem:getUniqueId()), true):getItemHoldingCount()
            creature:sendTextMessage(MESSAGE_STATUS_DEFAULT, "Your depot contains " .. depotItems .. " item" .. (depotItems > 1 and "s." or "."))
            return true
    end

    if item.actionid ~= 0 and player:getStorageValue(item.actionid) <= 0 then
        player:teleportTo(fromPosition, false)
        position:sendMagicEffect(CONST_ME_MAGIC_BLUE)
        player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The tile seems to be protected against unwanted intruders.")
        return true
    end

    return true
end

function onStepOut(creature, item, position, fromPosition)
    if not decreasing[item.itemid] then
        return false
    end

    if creature:isPlayer() and creature:isInGhostMode() then
        return true
    end

    item:transform(decreasing[item.itemid])
    return true
end
end
I only removed the depotBoxes because it doesn't exist on 8.6 and looks like you took it from higher client server 10.x or 12.x

error:

C++:
[Warning - Event::checkScript] Event onStepOut not found. scripts/others/tiles.lua
[Warning - Event::checkScript] Event onStepOut not found. scripts/others/tiles.lua
[Warning - Event::checkScript] Event onStepOut not found. scripts/others/tiles.lua
[Warning - Event::checkScript] Event onStepOut not found. scripts/others/tiles.lua
[Warning - Event::checkScript] Event onStepOut not found. scripts/others/tiles.lua
 
[Warning - Event::checkScript] Event onStepOut not found. scripts/others/tiles.lua
[Warning - Event::checkScript] Event onStepOut not found. scripts/others/tiles.lua
[Warning - Event::checkScript] Event onStepOut not found. scripts/others/tiles.lua
[Warning - Event::checkScript] Event onStepOut not found. scripts/others/tiles.lua
[Warning - Event::checkScript] Event onStepOut not found. scripts/others/tiles.lua

Those errors, why are they there or how to get rid of them? :)
 
Back
Top