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

OTClient Set Outfit not working

Joined
Aug 15, 2014
Messages
143
Reaction score
24
Hello Guys. A lot of players like use otclientv8. But I have an important problem in my server.
The players can't change outfit with otclientv8 the function of set outfit not work. (with other client work normaly)
This otclientv8 work normaly in others clients. So I guess this is a source config to release.

Can someone help me this problem?
Thanks.
 

Attachments

ERROR: ProtocolGame parse message exception (1630 bytes, 1609 unread, last opcode is 0xc8 (200), prev opcode is 0xffffffff (-1)): InputMessage eof reached
Packet has been saved to packet.log, you can use it to find what was wrong. (Protocol: 860)
 
I just change 26 to 100 in (protocolOutfits.size() == 100)
Because my server has more outfits.
Someone know where is the problem?

C++:
void ProtocolGame::sendOutfitWindow()
{
    NetworkMessage msg;
    msg.addByte(0xC8);

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

    std::vector<ProtocolOutfit> protocolOutfits;
    if (player->isAccessPlayer()) {
        static const std::string gamemasterOutfitName = "Gamemaster";
        protocolOutfits.emplace_back(gamemasterOutfitName, 75, 0);

        static const std::string gmCustomerSupport = "CS";
        protocolOutfits.emplace_back(gmCustomerSupport, 266, 0);

        static const std::string communityManager = "CM";
        protocolOutfits.emplace_back(communityManager, 302, 0);
    }

    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() == 100) { // Game client doesn't allow more than 26 outfits
            break;
        }
    }

    //msg.addByte(protocolOutfits.size()); << antigo
    msg.add<uint16_t>(protocolOutfits.size());
    for (const ProtocolOutfit& outfit : protocolOutfits) {
        msg.add<uint16_t>(outfit.lookType);
        msg.addString(outfit.name);
        msg.addByte(outfit.addons);
    }

    writeToOutputBuffer(msg, false);
}

I will send my protocolgame.cpp completly
 

Attachments

msg.addByte(protocolOutfits.size());
With this work OTclient but I take debug in client normal.


With this work in client normal but not in otclient:
msg.add<uint16_t>(protocolOutfits.size());

Can someone help me solve?
Post automatically merged:

Solved this way:

config.lua
clientVersionMin = 860
clientVersionMax = 861

protocolgame.cpp

if (version >= 861) {
msg.addByte(protocolOutfits.size());
} else {
msg.add<uint16_t>(protocolOutfits.size());
}

So in Otclientv8 I use client version 8.61 to connect.

Thank fellow for the help.
 
Last edited:
Sorry guys for coming back to this topic again. But a new problem arose.

After making the above changes the otclient stopped working the look function.

Somehow my otclient look function dont work with client 8.61 8.62...

I am some days trying to solve that. Please help me
 
Last edited:
Back
Top