• 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+ Disable gamemaster outfit

ralke

(҂ ͠❛ ෴ ͡❛)ᕤ
Joined
Dec 17, 2011
Messages
1,470
Solutions
27
Reaction score
844
Location
Santiago - Chile
GitHub
ralke23
Twitch
ralke23
Hi! I'm using TFS 1.4 by Nekiro and I need help to remove the gamemaster outfit from outfit window, for all the players that have access (god, gamemaster, cm, etc.). Tried to found where in the sources I had to edit, the best approach I found was Groups with Forced Outift. (https://otland.net/threads/groups-with-forced-outift.248657/#post-2417790), but couldn't find the line. The reason to make this change is because I have 26 outfits running in a vainilla client, and works great, but it debugs when gamemaster outfit appears as the outfit #27.

Regards!
 
Solution
I need to make the client work with extended sprites aswell, tried to compile that here Compiling - Saiansking extended .dll (https://otland.net/threads/saiansking-extended-dll.277226/) but couldn't. I am currently using this client for now How to increase sprite limit (https://otland.net/threads/how-to-increase-sprite-limit.257335/page-2#post-2491655) I will try to compile saian's king again and see how it goes, thanks for responding!
Compiled executable isn't working for you? Release Release 1.0 · SaiyansKing/Tibia-Outfit-Limit-Changer (https://github.com/SaiyansKing/Tibia-Outfit-Limit-Changer/releases/tag/1.0)
Have you tried this to break the outfit limit? It should work for 8.60
I need to make the client work with extended sprites aswell, tried to compile that here Compiling - Saiansking extended .dll (https://otland.net/threads/saiansking-extended-dll.277226/) but couldn't. I am currently using this client for now How to increase sprite limit (https://otland.net/threads/how-to-increase-sprite-limit.257335/page-2#post-2491655) I will try to compile saian's king again and see how it goes, thanks for responding!
 
Change your
Code:
void ProtocolGame::sendOutfitWindow()
function to that:
C++:
void ProtocolGame::sendOutfitWindow()
{
    NetworkMessage msg;
    msg.addByte(0xC8);

    Outfit_t currentOutfit = player->getDefaultOutfit();
    AddOutfit(msg, currentOutfit);

    std::vector<ProtocolOutfit> protocolOutfits;

    const auto& outfits = Outfits::getInstance().getOutfits(player->getSex());
    protocolOutfits.reserve(outfits.size());
    for (const Outfit& outfit : outfits) {
        uint8_t addons;
        if (!player->getOutfitAddons(outfit, addons)) {
            continue;
        }

        protocolOutfits.emplace_back(outfit.name, outfit.lookType, addons);
        if (protocolOutfits.size() == 26) { // Game client doesn't allow more than 26 outfits
            break;
        }
    }
    
    msg.addByte(protocolOutfits.size());
    for (const ProtocolOutfit& outfit : protocolOutfits) {
        msg.add<uint16_t>(outfit.lookType);
        msg.addString(outfit.name);
        msg.addByte(outfit.addons);
    }

    writeToOutputBuffer(msg);
}
In protocolgame.cpp

What I did: removed the gamemaster outfit and made the limit to send 26 outfits instead of the normal 50
 
Change your
Code:
void ProtocolGame::sendOutfitWindow()
function to that:
C++:
void ProtocolGame::sendOutfitWindow()
{
    NetworkMessage msg;
    msg.addByte(0xC8);

    Outfit_t currentOutfit = player->getDefaultOutfit();
    AddOutfit(msg, currentOutfit);

    std::vector<ProtocolOutfit> protocolOutfits;

    const auto& outfits = Outfits::getInstance().getOutfits(player->getSex());
    protocolOutfits.reserve(outfits.size());
    for (const Outfit& outfit : outfits) {
        uint8_t addons;
        if (!player->getOutfitAddons(outfit, addons)) {
            continue;
        }

        protocolOutfits.emplace_back(outfit.name, outfit.lookType, addons);
        if (protocolOutfits.size() == 26) { // Game client doesn't allow more than 26 outfits
            break;
        }
    }
 
    msg.addByte(protocolOutfits.size());
    for (const ProtocolOutfit& outfit : protocolOutfits) {
        msg.add<uint16_t>(outfit.lookType);
        msg.addString(outfit.name);
        msg.addByte(outfit.addons);
    }

    writeToOutputBuffer(msg);
}
In protocolgame.cpp

What I did: removed the gamemaster outfit and made the limit to send 26 outfits instead of the normal 50

Thanks a lot @jacqen :) Tried with the change, and could'nt open Set Outfit with the game master.
gmoutfit.png

I'll try to provide more information. Some things I can add is that in MySQL the player group_id is set to 3 and this is my outfits.xml.

Code:
<?xml version="1.0" encoding="UTF-8"?>
<outfits>
    <!-- Female outfits -->
    <outfit type="0" looktype="136" name="Citizen" premium="no" unlocked="yes" enabled="yes" />
    <outfit type="0" looktype="137" name="Hunter" premium="no" unlocked="yes" enabled="yes" />
    <outfit type="0" looktype="138" name="Mage" premium="no" unlocked="yes" enabled="yes" />
    <outfit type="0" looktype="139" name="Knight" premium="no" unlocked="yes" enabled="yes" />
    <outfit type="0" looktype="140" name="Noblewoman" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="0" looktype="141" name="Summoner" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="0" looktype="142" name="Warrior" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="0" looktype="147" name="Barbarian" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="0" looktype="148" name="Druid" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="0" looktype="149" name="Wizard" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="0" looktype="150" name="Oriental" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="0" looktype="155" name="Pirate" premium="yes" unlocked="no" enabled="yes" />
    <outfit type="0" looktype="156" name="Assassin" premium="yes" unlocked="no" enabled="yes" />
    <outfit type="0" looktype="157" name="Beggar" premium="yes" unlocked="no" enabled="yes" />
    <outfit type="0" looktype="158" name="Shaman" premium="yes" unlocked="no" enabled="yes" />
    <outfit type="0" looktype="252" name="Norsewoman" premium="yes" unlocked="no" enabled="yes" />
    <outfit type="0" looktype="269" name="Nightmare" premium="yes" unlocked="no" enabled="yes" />
    <outfit type="0" looktype="279" name="Brotherhood" premium="yes" unlocked="no" enabled="yes" />
    <outfit type="0" looktype="288" name="Demon Hunter" premium="yes" unlocked="no" enabled="yes" />
    <outfit type="0" looktype="376" name="Old Citizen" premium="no" unlocked="yes" enabled="yes" />
    <outfit type="0" looktype="377" name="Old Hunter" premium="no" unlocked="yes" enabled="yes" />
    <outfit type="0" looktype="379" name="Old Mage" premium="no" unlocked="yes" enabled="yes" />
    <outfit type="0" looktype="378" name="Old Knight" premium="no" unlocked="yes" enabled="yes" />
    <outfit type="0" looktype="380" name="Old Noblewoman" premium="yes" unlocked="no" enabled="yes" />
    <outfit type="0" looktype="382" name="Old Summoner" premium="yes" unlocked="no" enabled="yes" />
    <outfit type="0" looktype="381" name="Old Warrior" premium="yes" unlocked="no" enabled="yes" />

    <!-- Male outfits -->
    <outfit type="1" looktype="128" name="Citizen" premium="no" unlocked="yes" enabled="yes" />
    <outfit type="1" looktype="129" name="Hunter" premium="no" unlocked="yes" enabled="yes" />
    <outfit type="1" looktype="130" name="Mage" premium="no" unlocked="yes" enabled="yes" />
    <outfit type="1" looktype="131" name="Knight" premium="no" unlocked="yes" enabled="yes" />
    <outfit type="1" looktype="132" name="Nobleman" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="1" looktype="133" name="Summoner" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="1" looktype="134" name="Warrior" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="1" looktype="143" name="Barbarian" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="1" looktype="144" name="Druid" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="1" looktype="145" name="Wizard" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="1" looktype="146" name="Oriental" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="1" looktype="151" name="Pirate" premium="yes" unlocked="no" enabled="yes" />
    <outfit type="1" looktype="152" name="Assassin" premium="yes" unlocked="no" enabled="yes" />
    <outfit type="1" looktype="153" name="Beggar" premium="yes" unlocked="no" enabled="yes" />
    <outfit type="1" looktype="154" name="Shaman" premium="yes" unlocked="no" enabled="yes" />
    <outfit type="1" looktype="251" name="Norseman" premium="yes" unlocked="no" enabled="yes" />
    <outfit type="1" looktype="268" name="Nightmare" premium="yes" unlocked="no" enabled="yes" />
    <outfit type="1" looktype="278" name="Brotherhood" premium="yes" unlocked="no" enabled="yes" />
    <outfit type="1" looktype="289" name="Demon Hunter" premium="yes" unlocked="no" enabled="yes" />
    <outfit type="1" looktype="375" name="Old Citizen" premium="no" unlocked="yes" enabled="yes" />
    <outfit type="1" looktype="374" name="Old Hunter" premium="no" unlocked="yes" enabled="yes" />
    <outfit type="1" looktype="372" name="Old Mage" premium="no" unlocked="yes" enabled="yes" />
    <outfit type="1" looktype="373" name="Old Knight" premium="no" unlocked="yes" enabled="yes" />
    <outfit type="1" looktype="371" name="Old Nobleman" premium="yes" unlocked="no" enabled="yes" />
    <outfit type="1" looktype="369" name="Old Summoner" premium="yes" unlocked="no" enabled="yes" />
    <outfit type="1" looktype="370" name="Old Warrior" premium="yes" unlocked="no" enabled="yes" />
</outfits>

I appreciate the help, hopefully there's more ideas to achieve this I'll be waiting for more answers
Regards!
 
Last edited:
I need to make the client work with extended sprites aswell, tried to compile that here Compiling - Saiansking extended .dll (https://otland.net/threads/saiansking-extended-dll.277226/) but couldn't. I am currently using this client for now How to increase sprite limit (https://otland.net/threads/how-to-increase-sprite-limit.257335/page-2#post-2491655) I will try to compile saian's king again and see how it goes, thanks for responding!
Compiled executable isn't working for you? Release Release 1.0 · SaiyansKing/Tibia-Outfit-Limit-Changer (https://github.com/SaiyansKing/Tibia-Outfit-Limit-Changer/releases/tag/1.0)
 
Solution
Worked perfectly! Thanks a lot @Loney

About the solutions provided before, @jacqen @Evil Puncker I don't not which one of thoose 2 but worked, now that I am able to edit to open the outfit window with gamemaster, the gamemaster outfit is no longer in the outfit window :). Thread solved.
 
Back
Top