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

C++ [OTX 2] Use new outfits and addons

potinho

Advanced OT User
Joined
Oct 11, 2009
Messages
1,403
Solutions
17
Reaction score
151
Location
Brazil
Hey guys,

I've already managed to add some outfits on my server but in a very limited way, I can't put outfits as a quest reward and there's no way to use addons. I use OTX 2 and would like to know what I need to change in the sources to use a system of outfits/addons per sale and per quest. I already use UTCv8 so the client wouldn't be a problem.

The way I added new outfits was in the line below, in protocolgame.cpp. But the outfits need to be in sequence and I can't restrict their use by a storage, for example.

C++:
void ProtocolGame::sendOutfitWindow()
{
    NetworkMessage_ptr msg = getOutputBuffer();
    if(!msg)
        return;

    TRACK_MESSAGE(msg);
    msg->put<char>(0xC8);
    AddCreatureOutfit(msg, player, player->getDefaultOutfit(), true);

    #ifdef _MULTIPLATFORM77
    msg->put<uint16_t>(player->sex % 2 ? 291 : 306); //start male and female
    msg->put<uint16_t>(player->isPremium() ? (player->sex % 2 ? 305 : 320) : (player->sex % 2 ? 299 : 313)); //first, premium ends male and female, second no premium ends male and female
    #else
    msg->put<char>(player->sex % 2 ? 291 : 306);//start male and female
    msg->put<char>(player->isPremium() ? (player->sex % 2 ? 305 : 320) : (player->sex % 2 ? 299 : 313));//first, premium ends male and female, second no premium ends male and female
    #endif

    player->hasRequestedOutfit(true);
}
 
Back
Top