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

OTHIRE // New Outfits // (HexCode?)

DRUlD

New Member
Joined
Mar 4, 2018
Messages
16
Reaction score
0
Hello
I added 7 new male outfits and 7 female outfits and I have a problem with protocolgame.cpp

I have no idea how to check the (hex code?) of the last male/female outfit ( 0x?? )

C++:
// 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 >= 143 &&
        lookType <= lastFemaleOutfit) ||
        (player->getSex() == PLAYERSEX_MALE &&
        lookType >= 128 &&
        lookType <= lastMaleOutfit))
 
You can use some hex converter or convert it bu urself. X8b = 139. Etc
That 139 is the id of the outfit. When there are premiums last number changes cus premiums got more outfits so it will be x8e or 142.
Hope it works
 
client displays only 7 outfits

inGame
https://i.gyazo.com/c94ddcd731f996c5240a0a186622dcd6.mp4

ObjectBuilder
https://i.gyazo.com/b74b34f8c7e22f3ee5ddf98e5052255e.mp4

and current code

C++:
    // only first 14 outfits
    uint8_t lastFemaleOutfit = 0xa4;
    uint8_t lastMaleOutfit = 0x8d;

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

    if ((player->getSex() == PLAYERSEX_FEMALE &&
        lookType >= 151 &&
        lookType <= lastFemaleOutfit) ||
        (player->getSex() == PLAYERSEX_MALE &&
        lookType >= 128 &&
        lookType <= lastMaleOutfit))

I use Tibianic Client
 
client displays only 7 outfits

inGame
https://i.gyazo.com/c94ddcd731f996c5240a0a186622dcd6.mp4

ObjectBuilder
https://i.gyazo.com/b74b34f8c7e22f3ee5ddf98e5052255e.mp4

and current code

C++:
    // only first 14 outfits
    uint8_t lastFemaleOutfit = 0xa4;
    uint8_t lastMaleOutfit = 0x8d;

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

    if ((player->getSex() == PLAYERSEX_FEMALE &&
        lookType >= 151 &&
        lookType <= lastFemaleOutfit) ||
        (player->getSex() == PLAYERSEX_MALE &&
        lookType >= 128 &&
        lookType <= lastMaleOutfit))

I use Tibianic Client
client displays only 7 outfits

inGame
https://i.gyazo.com/c94ddcd731f996c5240a0a186622dcd6.mp4

ObjectBuilder
https://i.gyazo.com/b74b34f8c7e22f3ee5ddf98e5052255e.mp4

and current code

C++:
    // only first 14 outfits
    uint8_t lastFemaleOutfit = 0xa4;
    uint8_t lastMaleOutfit = 0x8d;

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

    if ((player->getSex() == PLAYERSEX_FEMALE &&
        lookType >= 151 &&
        lookType <= lastFemaleOutfit) ||
        (player->getSex() == PLAYERSEX_MALE &&
        lookType >= 128 &&
        lookType <= lastMaleOutfit))

I use Tibianic Client
at protocolgame.cpp
find these code lines and edit the codes displayed below
Code:
void ProtocolGame::parseSetOutfit(NetworkMessage& msg)
AND
Code:
void ProtocolGame::sendOutfitWindow()

c: hope it help you rep++ if it does, also mark this as best answer it would help others in a future
@DRUlD
 
at protocolgame.cpp
find these code lines and edit the codes displayed below
Code:
void ProtocolGame::parseSetOutfit(NetworkMessage& msg)
AND
Code:
void ProtocolGame::sendOutfitWindow()

c: hope it help you rep++ if it does, also mark this as best answer it would help others in a future
@DRUlD

During compilation

Code:
protocolgame.cpp: In member function ‘void ProtocolGame::sendOutfitWindow()’:
protocolgame.cpp:952:22: error: ‘msg’ was not declared in this scope
protocolgame.cpp: At global scope:
protocolgame.cpp:2090:6: error: redefinition of ‘void ProtocolGame::sendOutfitWindow()’
protocolgame.cpp:950:6: error: ‘void ProtocolGame::sendOutfitWindow()’ previously defined here
make[1]: *** [protocolgame.o] Error 1
make[1]: Leaving directory `/root/OTHire/source'
make: *** [all] Error 2
 
Back
Top