• 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+ TFS 1.3 Corpse causing freeze

SorketROrk

Well-Known Member
Joined
Oct 14, 2020
Messages
152
Solutions
1
Reaction score
69
Location
Sweden
Hey,

Is it just me or do you all get freeze/kick when trying to summon a corpse with GM?

Im trying with /i dead rotworm, and the id also /i 2824 and it causes a freeze that eventually kicks me, when logging back in the corpse is there.. but what caused this freeze?


Yours,
SRO
 
For starter put prints inside create_item talkaction and see where it exactly freezes.
How would I achieve this exactly?

Lua:
local invalidIds = {
    1, 2, 3, 4, 5, 6, 7, 10, 11, 13, 14, 15, 19, 21, 26, 27, 28, 35, 43
}

function onSay(player, words, param)
    if not player:getGroup():getAccess() then
        return true
    end

    if player:getAccountType() < ACCOUNT_TYPE_GOD then
        return false
    end

    local split = param:splitTrimmed(",")

    local itemType = ItemType(split[1])
    if itemType:getId() == 0 then
        itemType = ItemType(tonumber(split[1]))
        if not tonumber(split[1]) or itemType:getId() == 0 then
            player:sendCancelMessage("There is no item with that id or name.")
            return false
        end
    end

    if table.contains(invalidIds, itemType:getId()) then
        return false
    end

    local count = tonumber(split[2])
    if count then
        if itemType:isStackable() then
            count = math.min(10000, math.max(1, count))
        elseif not itemType:isFluidContainer() then
            count = math.min(100, math.max(1, count))
        else
            count = math.max(0, count)
        end
    else
        if not itemType:isFluidContainer() then
            count = 1
        else
            count = 0
        end
    end

    local result = player:addItem(itemType:getId(), count)
    if result then
        if not itemType:isStackable() then
            if type(result) == "table" then
                for _, item in ipairs(result) do
                    item:decay()
                end
            else
                result:decay()
            end
        end
        player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN)
    end
    return false
end
 
print('x') where x is next number starting from 1 in code every line. This way you will know which line freezes server.
 
print('x') where x is next number starting from 1 in code every line. This way you will know which line freezes server.
Not sure on how to implement that.. Also tried new compiled version of tfs 1.3 that only uses my old database, it still triggers the freeze.
Can anyone else using TFS 1.3 confirm if its an issue or if its something else maybe..

I find it strange that i can use /i 2160 for example, and summon all items like normal, but when it comes to SOME corpses it freezes me.

-- After doing some testing now it seems that there is an issue here, I can spawn these corpses ONLY if they are able to take place in my backpack, like a rat corpse for example.. But when trying to /i dead cyclops it freezes, then it kicks and it appears on the floor.. Tried with several corpses and its only the ones that you cannot put in your backpack that causes this.

EDIT:

I solved this issue, my fault probably because of mixed files SPR, DAT & OTB.. Fixed by throwing away my old BP with items of mixed sprites/wrong OTB, and got the correct files in place now everything is fine.
 
Last edited:
Back
Top