• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

OUTFITS ERROR (NEKIRO DOWNGRADE 1.5)

lordposei

New Member
Joined
Jan 18, 2011
Messages
16
Reaction score
2
I need help, I can't find the solution, I hope you can help me !!

Characters cannot change outfit color only HEAD, Only ADM and GM who can make the switch !!

What is the solution for this? I am using 7.72 Downgrade Nekiro!

I added this code in my source protocolgame.cpp to enable outfits.xml

void ProtocolGame::sendOutfitWindow()
{
const auto& outfits = Outfits::getInstance().getOutfits(player->getSex());
if (outfits.size() == 0) {
return;
}

NetworkMessage msg;
msg.addByte(0xC8);

Outfit_t currentOutfit = player->getDefaultOutfit();
if (currentOutfit.lookType == 0) {
Outfit_t newOutfit;
newOutfit.lookType = outfits.front().lookType;
currentOutfit = newOutfit;
}

/Mount currentMount = g_game.mounts.getMountByID(player->getCurrentMount());
if (currentMount) {
currentOutfit.lookMount = currentMount->clientId;
}*/

AddOutfit(msg, currentOutfit);

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

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() == 50) { // Game client currently doesn't allow more than 50 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);
}

/*
std::vector<const Mount*> mounts;
for (const Mount& mount : g_game.mounts.getMounts()) {
if (player->hasMount(&mount)) {
mounts.push_back(&mount);
}
}

msg.addByte(mounts.size());
for (const Mount* mount : mounts) {
msg.add<uint16_t>(mount->clientId);
msg.addString(mount->name);
}*/
}

writeToOutputBuffer(msg);
}
outfit.png
 
I need help, I can't find the solution, I hope you can help me !!

Characters cannot change outfit color only HEAD, Only ADM and GM who can make the switch !!

What is the solution for this? I am using 7.72 Downgrade Nekiro!

I added this code in my source protocolgame.cpp to enable outfits.xml


View attachment 74131
 
possibly the error is in otc v8
Post automatically merged:

Actually the error was in otc v8, I already fixed it, in features I forgot to enable = g_game.enableFeature(GameLooktypeU16)
 
I totally followed this tutorial, until everything is working right, outfits, addons, just the head color that doesn't want to change in normal players

@Forkz
If you are using the official .spr, the problem must be with your otclient. For the reason that according to the code above, mine worked 100%.
 
this worked for me:
LUA:
void ProtocolGame::sendOutfitWindow()
{
    // Obter os outfits disponíveis para o sexo do jogador
    const auto& outfits = Outfits::getInstance().getOutfits(player->getSex());
    if (outfits.empty()) {
        return; // Retorna se não houver outfits
    }

    // Criar uma mensagem para enviar ao cliente
    NetworkMessage msg;
    msg.addByte(0xC8); // Código de identificação da mensagem

    // Definir o outfit atual do jogador
    Outfit_t currentOutfit = player->getDefaultOutfit();
    if (currentOutfit.lookType == 0) {
        // Se o lookType do outfit atual for 0, usar o lookType do primeiro outfit disponível
        Outfit_t newOutfit;
        newOutfit.lookType = outfits.front().lookType;
        currentOutfit = newOutfit;
    }

    // Adicionar o outfit atual à mensagem
    AddOutfit(msg, currentOutfit);

    // Criar uma lista de outfits para enviar ao cliente
    std::vector<ProtocolOutfit> protocolOutfits;
    if (player->isAccessPlayer()) {
        static const std::string gamemasterOutfitName = "Gamemaster";
        protocolOutfits.emplace_back(gamemasterOutfitName, 75, 0);
    }

    protocolOutfits.reserve(outfits.size());
    for (const Outfit& outfit : outfits) {
        uint8_t addons;
        if (!player->getOutfitAddons(outfit, addons)) {
            continue; // Pular outfits para os quais não se pode obter addons
        }

        protocolOutfits.emplace_back(outfit.name, outfit.lookType, addons);
        if (protocolOutfits.size() == 50) { // Limitar o número de outfits para 50
            break;
        }
    }

    // Adicionar a lista de outfits à mensagem
    msg.addByte(static_cast<uint8_t>(protocolOutfits.size()));
    for (const ProtocolOutfit& outfit : protocolOutfits) {
        msg.add<uint16_t>(outfit.lookType);
        msg.addString(outfit.name);
        msg.addByte(outfit.addons);
    }

    // Enviar a mensagem ao cliente
    writeToOutputBuffer(msg);
}

OBS: i've used GPT because i dnt know anything about
 
this worked for me:
LUA:
void ProtocolGame::sendOutfitWindow()
{
    // Obter os outfits disponíveis para o sexo do jogador
    const auto& outfits = Outfits::getInstance().getOutfits(player->getSex());
    if (outfits.empty()) {
        return; // Retorna se não houver outfits
    }

    // Criar uma mensagem para enviar ao cliente
    NetworkMessage msg;
    msg.addByte(0xC8); // Código de identificação da mensagem

    // Definir o outfit atual do jogador
    Outfit_t currentOutfit = player->getDefaultOutfit();
    if (currentOutfit.lookType == 0) {
        // Se o lookType do outfit atual for 0, usar o lookType do primeiro outfit disponível
        Outfit_t newOutfit;
        newOutfit.lookType = outfits.front().lookType;
        currentOutfit = newOutfit;
    }

    // Adicionar o outfit atual à mensagem
    AddOutfit(msg, currentOutfit);

    // Criar uma lista de outfits para enviar ao cliente
    std::vector<ProtocolOutfit> protocolOutfits;
    if (player->isAccessPlayer()) {
        static const std::string gamemasterOutfitName = "Gamemaster";
        protocolOutfits.emplace_back(gamemasterOutfitName, 75, 0);
    }

    protocolOutfits.reserve(outfits.size());
    for (const Outfit& outfit : outfits) {
        uint8_t addons;
        if (!player->getOutfitAddons(outfit, addons)) {
            continue; // Pular outfits para os quais não se pode obter addons
        }

        protocolOutfits.emplace_back(outfit.name, outfit.lookType, addons);
        if (protocolOutfits.size() == 50) { // Limitar o número de outfits para 50
            break;
        }
    }

    // Adicionar a lista de outfits à mensagem
    msg.addByte(static_cast<uint8_t>(protocolOutfits.size()));
    for (const ProtocolOutfit& outfit : protocolOutfits) {
        msg.add<uint16_t>(outfit.lookType);
        msg.addString(outfit.name);
        msg.addByte(outfit.addons);
    }

    // Enviar a mensagem ao cliente
    writeToOutputBuffer(msg);
}

OBS: i've used GPT because i dnt know anything about
if anybody want to add more outfits than limit just increase it here
C++:
if (protocolOutfits.size() == 50) { // Limitar o número de outfits para 50
 
Back
Top