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

Compiling changes for 10.80

Scrappy Coco

Member
Joined
Dec 27, 2014
Messages
95
Reaction score
17
Is tedious wait update TFS servers for that reason I make this thread.
I would like to learn how to update my server by editing the source code .
NO LOOKING GIVE ME CODES .

Just I wanted to tell me where there need to modify the code and thank you.


MyHOkso.png
 
@Red my results:
when I try enter without account name or password
the message is "invalid account name"
but when I try enter using a account name and password the client try to connect, but later give the error 200002 of connection
 
Find in protocolgame.cpp:

void ProtocolGame::sendAddCreature

then above

writeToOutputBuffer(msg);

add:

Code:
msg.AddString("http://static.tibia.com/images/store");
msg.AddByte(0x19);
msg.AddByte(0x00);

and enjoy 10.80 :)

Tomorrow I will release hotkey equip
 
Find in protocolgame.cpp:

void ProtocolGame::sendAddCreature

then above

writeToOutputBuffer(msg);

add:

Code:
msg.AddString("http://static.tibia.com/images/store");
msg.AddByte(0x19);
msg.AddByte(0x00);

and enjoy 10.80 :)

Tomorrow I will release hotkey equip
not work
Code:
1>------ Build started: Project: theforgottenserver, Configuration: Release x64 ------
1>  protocolgame.cpp
1>..\src\protocolgame.cpp(2364): error C2039: 'AddString' : is not a member of 'NetworkMessage'
1>          c:\forgottenserver-master\src\networkmessage.h(32) : see declaration of 'NetworkMessage'
1>..\src\protocolgame.cpp(2365): error C2039: 'AddByte' : is not a member of 'NetworkMessage'
1>          c:\forgottenserver-master\src\networkmessage.h(32) : see declaration of 'NetworkMessage'
1>..\src\protocolgame.cpp(2366): error C2039: 'AddByte' : is not a member of 'NetworkMessage'
1>          c:\forgottenserver-master\src\networkmessage.h(32) : see declaration of 'NetworkMessage'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I find the error... you said
Code:
msg.AddString("http://static.tibia.com/images/store");
msg.AddByte(0x19);
msg.AddByte(0x00);
BUT ... case sensitive break your lines
so to fix, will be like this
Code:
msg.addString("http://static.tibia.com/images/store");
msg.addByte(0x19);
msg.addByte(0x00);
DEBUGS MORE DEBUGS
 
Last edited:
Find in protocolgame.cpp:

void ProtocolGame::sendAddCreature

then above

writeToOutputBuffer(msg);

add:

Code:
msg.AddString("http://static.tibia.com/images/store");
msg.AddByte(0x19);
msg.AddByte(0x00);

and enjoy 10.80 :)

Tomorrow I will release hotkey equip

It works well but the few seconds given debug, have any idea?
 
Last edited:
not work
Code:
1>------ Build started: Project: theforgottenserver, Configuration: Release x64 ------
1>  protocolgame.cpp
1>..\src\protocolgame.cpp(2364): error C2039: 'AddString' : is not a member of 'NetworkMessage'
1>          c:\forgottenserver-master\src\networkmessage.h(32) : see declaration of 'NetworkMessage'
1>..\src\protocolgame.cpp(2365): error C2039: 'AddByte' : is not a member of 'NetworkMessage'
1>          c:\forgottenserver-master\src\networkmessage.h(32) : see declaration of 'NetworkMessage'
1>..\src\protocolgame.cpp(2366): error C2039: 'AddByte' : is not a member of 'NetworkMessage'
1>          c:\forgottenserver-master\src\networkmessage.h(32) : see declaration of 'NetworkMessage'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I find the error... you said
Code:
msg.AddString("http://static.tibia.com/images/store");
msg.AddByte(0x19);
msg.AddByte(0x00);
BUT ... case sensitive break your lines
so to fix, will be like this
Code:
msg.addString("http://static.tibia.com/images/store");
msg.addByte(0x19);
msg.addByte(0x00);
DEBUGS MORE DEBUGS

Below:
Code:
    // can report bugs?
    msg.addByte(0x01);

    msg.addByte(0x00); // can change pvp framing option
    msg.addByte(0x00); // expert mode button enabled

Code:
msg.addString("http://static.tibia.com/images/store/");
msg.addByte(g_config.getNumber(ConfigManager::MAX_PACKETS_PER_SECOND));

Adding these things will make it posible login and use it.
Premium shop requires alot more changes.

// Edit:
Forgot but as Red has already written this has to be added aswell;
Reason is that tibia for some reason now uses a time stamp for the premium time insted of the days.
Maybe you lose your premium at a certain time insted of at server save now?

 
Last edited:
Premium time, in the character list packet, has been changed from an unsigned short (uint16_t) to a 1 byte (uint8_t) boolean indicating whether you have premium or not, followed by a 4 byte (uint32_t) timestamp (in seconds since epoch) of when your premium expires.

If you want the client to display free premium it's as easy as:
Code:
msg.addByte(0x01); // Has to be 1 (isPremium flag)
msg.add<uint32_t>(0); // Has to be less than the current time since epoch (in seconds), so it's just safe to use 0 here
 
Last edited:
Premium time, in the character list packet, has been changed from an unsigned short (uint16_t) to a 1 byte (uint8_t) boolean indicating whether you have premium or not, followed by a 4 byte (uint32_t) timestamp (in seconds since epoch) of when your premium expires.

If you want the client to display free premium it's as easy as:
Code:
msg.addByte(0x01); // Has to be 1 (isPremium flag)
msg.add<uint32_t>(0); // Has to be less than the current time since epoch (in seconds), so it's just safe to use 0 here

@Jo3Bingham, I'm a noob, here I can put this?
Thank you!
 
Back
Top