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

Set Outfit Problem - TFS 1.2 Nostalrius

dropz

Member
Joined
May 4, 2022
Messages
46
Reaction score
24
hello everyone!

i came here to try get some help in one problem that i facing.

im working in new outfits to Nostalrius TFS 1.2 and i get about looktypes, Objetc Builder, storage.. things that must be known to handle with it but now the problem is: i imported from Object Builder a new array of outfits to male and female just adding two more to each gender but for this i need change the start number of array also the end one (example: male outfits before was between 131~136) now this value has changed.

okay, for this i need made some changes on Object Builder(i used the tibia.dat and tibia.spr from 7.72 client):

1668870151987.png
i created this new array with all the outfits letting just one space between each gender as it was in the "original" config and adding dwarf and elf outfit.
well, after doing that, i compile the archive and as far as i know the client part was done.

so i went to the protocolgame.cpp at server side:

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

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

    if (player->getSex() == PLAYERSEX_MALE) {
        msg.add<uint16_t>(144);
        if (player->isPremium()) {
            msg.add<uint16_t>(152);
        } else {
            msg.add<uint16_t>(147);
        }
    } else {
        msg.add<uint16_t>(154);
        if (player->isPremium()) {
            msg.add<uint16_t>(162);
        } else {
            msg.add<uint16_t>(157);
    }
    }

    writeToOutputBuffer(msg);
}

inside it i just made the changes on the "msg.add<uint16_t>()" following the logic of the numbers and adding the new correct values to each condition (is male, is premium, etcs).

after that i compile the src code again and then i get the result on the game:

1668871220520.png
the new outfits appeared but when i choose anyone to change it doesn't happen.

its something at client side that i need to change? if changes in src code of the client is necessary im in trouble cuz im using the OTCV8 and as you guys know it didn't have the src codes.
do you guys know something that i can do to solve it and get the outfits back to work with the new ones? maybe more changes at the server side or something like this?

how the outfit limit works for the 7.72 TFS1.2? as i understand the older version has a limitation on the quantity or something like this of outfits, is it possible handle with that?
im asking this cuz in the future my idea was implement some addons or different outfits in this version and engine.

thanks in advance! you guys are rock!
 
Last edited:
well, answering my own question...

the only thing that was missing to get the change of the outfits is made some changes inside "player.cpp" in the function of "Player::canWear" adding the respective new one looktypes following the logic of the numbers inside the function.

if you are searching for something about it and get doubts, let me know.. i can help you :)
 
Back
Top