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

Add Outfit V7.72 OTHIRE

Kromys

New Member
Joined
Feb 25, 2013
Messages
18
Reaction score
1
Location
Brazil
Hello guys

I added four outfits in my sprits, if i set looktype id in database it's work, but i can´t see my outfits in game.

I searched in the forum and i understood that i must change protocolgame.cpp and something in otlcient (i use otclient).

In my protocolgame.cpp i did this change:

if ((player->getSex() == PLAYERSEX_FEMALE &&
lookType >= 238 && i change this number for the last female outfit
lookType <= lastFemaleOutfit) ||
(player->getSex() == PLAYERSEX_MALE &&
lookType >= 234 && i change this number for the last male outfit
lookType <= lastMaleOutfit))
{

but don´t work, somebody can help me?

Thanks!
 
you must make editions in here
Code:
void ProtocolGame::parseSetOutfit(NetworkMessage& msg)
{
    uint16_t lookType = msg.GetU16();

    Outfit_t newOutfit;

    // only first 4 outfits
    uint8_t lastFemaleOutfit = 0x8B;
    uint8_t lastMaleOutfit = 0x83;

    // if premium then all 7 outfits
    if (player->getSex() == PLAYERSEX_FEMALE && player->isPremium())
        lastFemaleOutfit = 0x8E;
    else if (player->getSex() == PLAYERSEX_MALE && player->isPremium())
        lastMaleOutfit = 0x86;

    if ((player->getSex() == PLAYERSEX_FEMALE &&
        lookType >= 136 &&
        lookType <= lastFemaleOutfit) ||
        (player->getSex() == PLAYERSEX_MALE &&
        lookType >= 128 &&
        lookType <= lastMaleOutfit))
    {
        newOutfit.lookType = lookType;
        newOutfit.lookHead = msg.GetByte();
        newOutfit.lookBody = msg.GetByte();
        newOutfit.lookLegs = msg.GetByte();
        newOutfit.lookFeet = msg.GetByte();
    }
remeber to edit the bytes values  too
gl mate
    addGameTask(&Game::playerChangeOutfit, player->getID(), newOutfit);
}

and in here

Code:
void ProtocolGame::sendOutfitWindow()
{
    NetworkMessage_ptr msg = getOutputBuffer();
    if (msg){
        msg->AddByte(0xC8);
        AddCreatureOutfit(msg, player, player->getDefaultOutfit());

        switch (player->getSex()) {
        case PLAYERSEX_FEMALE:
            msg->AddU16(136);
            if (player->isPremium())
                msg->AddU16(142);
            else
                msg->AddU16(139);

            break;
        case PLAYERSEX_MALE:
            msg->AddU16(128);
            if (player->isPremium())
                msg->AddU16(134);
            else
                msg->AddU16(131);

            break;
        case 2:
            msg->AddU16(160);
            msg->AddU16(160);

            break;
        default:
            msg->AddU16(128);
            msg->AddU16(134);
        }
    }
}
 
Hello Felipe93.

Thank you for your attention, i thing that i am in the right way, but i have an issue, i noted that the outfits have an sequence number, but my new outfit have another number, for exemple, normal outfits have a range between 1 and 10, but my new looktype is 80.. can i do something in this case?
 
Back
Top