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

Solved Tibia crash after using talkaction to change guild outfit colours

clouf

Member
Joined
Jul 5, 2012
Messages
158
Reaction score
23
Hello,
First of all i using TFS 1.2 downgraded by Ninja edited by @celohere ([8.0] - TFS 1.2 (https://otland.net/threads/8-0-tfs-1-2.263797/)) for Tibia 8.0 protocol.

I added simple talkaction
Lua:
local config = {
exhaustionInSeconds = 30,
storage = 34534
}

function onSay(cid, words, param)
    

    local playerGuild = getPlayerGuildId(cid)
    if(playerGuild == FALSE) then
        doPlayerSendCancel(cid, "Sorry, you're not in a guild.")
        return TRUE
    end



    local players = Game.getPlayers()
    local outfit = getCreatureOutfit(cid)
    local message = "*Guild* Your outfit has been changed by leader. (" .. getCreatureName(cid) .. ")"
    local members = 0
    for i, tid in ipairs(players) do
        local tmp = getCreatureOutfit(tid)
                tmp.lookHead = outfit.lookHead
                tmp.lookBody = outfit.lookBody
                tmp.lookLegs = outfit.lookLegs
                tmp.lookFeet = outfit.lookFeet
        doSendMagicEffect(getCreaturePosition(tid), 66)
        doCreatureChangeOutfit(tid, tmp)
        doPlayerSendTextMessage(tid, MESSAGE_INFO_DESCR, message)
        members = members + 1
    end

    doPlayerSendCancel(cid, "Guild members outfit has been changed. (Total: " .. members .. ")")
    return TRUE
end

I have 2 players in game (one is guild leader) and after typing talkaction !outfit both Tibia clients crash.
After i connect again to the game and second player outfit colours changed but unfortunately with client crash.
Post automatically merged:

Is only crashing Tibia client, OtClientv8 is fine
Post automatically merged:

Solution: -
Code:
Removed doSendMagicEffect(getCreaturePosition(tid), 66)
 

Attachments

Last edited:
Just so you know, this script will change everyones outfit, not only for your guild members, if you have 200 players online then 200 will have their outfits changed.

Additionally, the script allow any player in a guild to use this command.
 
Just so you know, this script will change everyones outfit, not only for your guild members, if you have 200 players online then 200 will have their outfits changed.

Additionally, the script allow any player in a guild to use this command.
Yes, i just fixed it. It was about client crash more 😅
 

Similar threads

Back
Top