• Sign up for TFS Icon Competition! The prize includes Otland Premium time and a medal, as well as obviously taking part in TFS history.
  • 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++ Adding new outfits in Outfitwindow from different ranges in 7.72 client

pasiak12

Well-Known Member
Joined
Jun 7, 2009
Messages
259
Solutions
13
Reaction score
69
Hi!

I am working on OTX based on 1.x version

I would like to add some outfits to the game.

The Outfit window, from protocolgame.cpp
C++:
void ProtocolGame::sendOutfitWindow()
{
    NetworkMessage msg;
    msg.addByte(0xC8);
    AddOutfit(msg, player->getCurrentOutfit());
#ifdef _MULTIPLATFORM77
    msg.add<uint16_t>(219); //first looktype = 219
    msg.add<uint16_t>(221); //all looktype from 219 to 221 avaiable
#else
    //its for another version, not using this
    //msg.addByte(player->getSex() % 2 ? 128 : 136); //from 128 or 136 to 134/131 or 142/139 depends on sex and prem
    //msg.addByte(player->isPremium() ? (player->getSex() % 2 ? 134 : 142) : (player->getSex() % 2 ? 131 : 139));
#endif
    player->hasRequestedOutfit(true);
    writeToOutputBuffer(msg);
}

It allows me to select an one outfit from range 219-221 looktype values.
So I can pick up looktypes:
219
220
221
(For all sexes, no matter if premmy or not)

But I would like to also add some premium outfits (It would be just greater range for premium accounts)
and some outfits obtainable from quests.

And theres the problem.
For example
219-221 are free outsfits

222 is from quest1
223 is from quest2

Let's say player has done only quest2.

Is it possible in 7.72 client to let him choose only:
219-221 and 223? (222 should be disabled since players hasnt done the quest1)
 
Last edited:

ayusutina

Member
Joined
May 10, 2013
Messages
27
Solutions
1
Reaction score
9
Easiest way for this would be installing the outfit.xml support from the newest versions if you're using otc, if not, you can use a lot of ranges based on the OP request
 

Acubens

Old Penguin
Joined
May 6, 2008
Messages
1,091
Solutions
5
Reaction score
104
Location
Venezuela
I use otclient one time to request players outfits using opcodes then send a table from server to client

{Id, OutfitName}

and then i use outfit module to recieve the outfits table and show them on outfit Windows, that one solution 😁

U must serialize and unserialize the table sent
 
Last edited:
Top