• 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++ [TFS 1.3] Open Market instead of InGame Store button

Morrison

Intermediate OT User
Joined
Mar 15, 2009
Messages
266
Solutions
3
Reaction score
119
Location
Exive me
GitHub
none
Hello! its possible to execute some function when player click in store button?
In this case... Open Market like the image above :)
1588749674037.png
 
Solution
well, that button just send a byte to the server so technically yes, you might need to parse the byte like
C++:
switch (recbyte) {
    case 0xFA: parseStoreButton(msg); break;
}

void ProtocolGame::parseStoreButton(NetworkMessage& msg)
{
    if (player->getLastDepotId() == -1) {
        return false;
    }

    player->sendMarketEnter(player->getLastDepotId());
    return;
}
Maybe If you find the function that is called when press the Button and change to the function that open the market should work, using a hex editor. I don't know how to do and If can be done, just a guess...
 
well, that button just send a byte to the server so technically yes, you might need to parse the byte like
C++:
switch (recbyte) {
    case 0xFA: parseStoreButton(msg); break;
}

void ProtocolGame::parseStoreButton(NetworkMessage& msg)
{
    if (player->getLastDepotId() == -1) {
        return false;
    }

    player->sendMarketEnter(player->getLastDepotId());
    return;
}
 
Solution
Back
Top