• 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+ cipsoft client crash

Moody

Member
Joined
Feb 8, 2020
Messages
60
Reaction score
5
i use this script made by Xikini to add bag to monster corpse
work 100% good otclient but if i use cipsoft client i get crash when monster die.
any1 can help?
tfs 1.3 client 8.6
Post automatically merged:

@Xikini sry for mention
i know problem now. problem is not loot.
problem = big msg crash client when show. can you help make msg split if big?
Lua:
party:broadcastPartyLoot(text)
player:sendTextMessage(MESSAGE_LOOT, text)
this 2 make crash 1 if party and 1 if no party for big msg loot.
 
Last edited:
Solution
i use this script made by Xikini to add bag to monster corpse
work 100% good otclient but if i use cipsoft client i get crash when monster die.
any1 can help?
tfs 1.3 client 8.6
Post automatically merged:

@Xikini sry for mention
i know problem now. problem is not loot.
problem = big msg crash client when show. can you help make msg split if big?
Lua:
party:broadcastPartyLoot(text)
player:sendTextMessage(MESSAGE_LOOT, text)
this 2 make crash 1 if party and 1 if no party for big msg loot.
Adjust the '100' as high as you can without crashing.
Lua:
function Monster:onDropLoot(corpse)
    if configManager.getNumber(configKeys.RATE_LOOT) == 0 then
        return
    end...
i use this script made by Xikini to add bag to monster corpse
work 100% good otclient but if i use cipsoft client i get crash when monster die.
any1 can help?
tfs 1.3 client 8.6
Post automatically merged:

@Xikini sry for mention
i know problem now. problem is not loot.
problem = big msg crash client when show. can you help make msg split if big?
Lua:
party:broadcastPartyLoot(text)
player:sendTextMessage(MESSAGE_LOOT, text)
this 2 make crash 1 if party and 1 if no party for big msg loot.
Adjust the '100' as high as you can without crashing.
Lua:
function Monster:onDropLoot(corpse)
    if configManager.getNumber(configKeys.RATE_LOOT) == 0 then
        return
    end
    
    local player = Player(corpse:getCorpseOwner())
    local mType = self:getType()
    local loot_corpse = corpse
    if not player or player:getStamina() > 840 then
        local monsterLoot = mType:getLoot()
        for i = 1, #monsterLoot do
            if loot_corpse:getEmptySlots() == 1 then
                loot_corpse = loot_corpse:addItem(1987)
            end
            local item = loot_corpse:createLootItem(monsterLoot[i])
            if not item then
                print('[Warning] DropLoot:', 'Could not add loot item to corpse.')
            end
        end
        
        if player then
            local text = ("Loot of %s: %s"):format(mType:getNameDescription(), corpse:getContentDescription())
            local s, textSize = {}, 250 -- adjust this number as high as you can without crashing.
            for i = 1, #text, textSize do
                s[#s + 1] = text:sub(i, i + textSize - 1)
            end
            local party = player:getParty()
            for i = 1, #s do
                if party then
                    party:broadcastPartyLoot(s[i])
                else
                    player:sendTextMessage(MESSAGE_LOOT, s[i])
                end
            end
        end
    else
        local text = ("Loot of %s: nothing (due to low stamina)"):format(mType:getNameDescription())
        local party = player:getParty()
        if party then
            party:broadcastPartyLoot(text)
        else
            player:sendTextMessage(MESSAGE_LOOT, text)
        end
    end
end
 
Last edited:
Solution
Back
Top