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

[Tutorial] How to edit idle timeout on Tibia server 7.70

SilverFern

Well-Known Member
Joined
Feb 15, 2020
Messages
71
Reaction score
55
After configuring my own Tibia 7.70 server, I was wondering how to change the 15 minutes timer to kick idle players.

Short answer:

Open the "game" file in a hex editor (e.g.: HexEd.it - Browser-based Online and Offline Hex Editing (https://hexed.it/)) and edit the following values to change the idle timer from 15 min to 24 hours:
  • In address 0x00082D80, replace 84 03 00 00 with 80 51 01 00
  • In address 0x00082FC0, replace 0F 00 00 00 with A0 05 00 00
  • In address 0x00082DB0, replace BF 03 00 00 with AC 52 01 00
Stop the server, then replace the game file with the new one. The commands below can automate this:

Code:
sudo -i
rm /home/game/bin/game
cp /home/vmuser/Downloads/game-edited /home/game/bin
mv game-edited game
chmod 777 game


Long answer

Unlike modern OT servers, there's no way to define the idle kick time in a configuration file in this version, meaning the timer is hard coded somewhere.

I used a hex editor to search for the idle alert text ("You have been idle for"...) in some of the binary files, and found a match in the "game" file.

The hex editor itself isn't that useful for finding and editing variables, so I had to open the file in a disassembler program such as IDA, which can reverse engineer the binary into assembly code.

Searching for the idle text again gives me all the surrounding blocks of code, so all I had to do was to follow the function calls until I find the variables that control when to kick an idle player:
  • The idle check interval - a.k.a. how often the game server will check for the idle character. This is set to 900 seconds, or 15 minutes.
  • The alert text - a.k.a. the number of minutes that will be displayed on the alert. This is set to 15.
  • The kick interval - a.k.a. how long of idle time before the game server will kick the character. This is set to 959, or 15min59sec.
The disassembler also shows the memory addresses where these values can be edited, so I replaced the original hex value with the new hex values for the numbers I wanted, which were:
  • Idle check interval
    • Address: 0x00082D80
    • Original value (900 seconds, which is 15 min): 84 03 00 00
    • Value I used in my tests (120 seconds): 78 00 00 00
    • Suggested value (86400 seconds, or 24 hours): 80 51 01 00
  • Alert text
    • Address: 0x00082FC0
    • Original value (15): 0F 00 00 00
    • Value I used in my tests (2 minutes): 02 00 00 00
    • Suggested value (1440 minutes, which is 24 hours): A0 05 00 00
  • Idle kick
    • Address: 0x00082DB0
    • Original value (959 seconds, which is 15m59s): BF 03 00 00
    • Value I used for test (179 seconds): B3 00 00 00
    • Suggested value (86460 seconds, or 24 hours and 1 minute): AC 52 01 00
Finally, I stopped the game server, moved the file I just edited to the "/home/game/bin" folder (giving proper permissions), then tested the game. I left my character idle for over 2 hours now and still haven't been kicked.
 
Last edited:
I stayed idle for more than 15 minutes and haven't been kicked out, too.

Thank you for sharing this solution.
 
After configuring my own Tibia 7.70 server, I was wondering how to change the 15 minutes timer to kick idle players.

Short answer:

Open the "game" file in a hex editor (e.g.: HexEd.it - Browser-based Online and Offline Hex Editing (https://hexed.it/)) and edit the following values to change the idle timer from 15 min to 24 hours:
  • In address 0x00082D80, replace 84 03 00 00 with 80 51 01 00
  • In address 0x00082FC0, replace 0F 00 00 00 with A0 05 00 00
  • In address 0x00082DB0, replace BF 03 00 00 with AC 52 01 00
Stop the server, then replace the game file with the new one. The commands below can automate this:

Code:
sudo -i
rm /home/game/bin/game
cp /home/vmuser/Downloads/game-edited /home/game/bin
mv game-edited game
chmod 777 game


Long answer

Unlike modern OT servers, there's no way to define the idle kick time in a configuration file in this version, meaning the timer is hard coded somewhere.

I used a hex editor to search for the idle alert text ("You have been idle for"...) in some of the binary files, and found a match in the "game" file.

The hex editor itself isn't that useful for finding and editing variables, so I had to open the file in a disassembler program such as IDA, which can reverse engineer the binary into assembly code.

Searching for the idle text again gives me all the surrounding blocks of code, so all I had to do was to follow the function calls until I find the variables that control when to kick an idle player:
  • The idle check interval - a.k.a. how often the game server will check for the idle character. This is set to 900 seconds, or 15 minutes.
  • The alert text - a.k.a. the number of minutes that will be displayed on the alert. This is set to 15.
  • The kick interval - a.k.a. how long of idle time before the game server will kick the character. This is set to 959, or 15min59sec.
The disassembler also shows the memory addresses where these values can be edited, so I replaced the original hex value with the new hex values for the numbers I wanted, which were:
  • Idle check interval
    • Address: 0x00082D80
    • Original value (900 seconds, which is 15 min): 84 03 00 00
    • Value I used in my tests (120 seconds): 78 00 00 00
    • Suggested value (86400 seconds, or 24 hours): 80 51 01 00
  • Alert text
    • Address: 0x00082FC0
    • Original value (15): 0F 00 00 00
    • Value I used in my tests (2 minutes): 02 00 00 00
    • Suggested value (1440 minutes, which is 24 hours): A0 05 00 00
  • Idle kick
    • Address: 0x00082DB0
    • Original value (959 seconds, which is 15m59s): BF 03 00 00
    • Value I used for test (179 seconds): B3 00 00 00
    • Suggested value (86460 seconds, or 24 hours and 1 minute): AC 52 01 00
Finally, I stopped the game server, moved the file I just edited to the "/home/game/bin" folder (giving proper permissions), then tested the game. I left my character idle for over 2 hours now and still haven't been kicked.
Congratulations, excellent tutorial!
 
After configuring my own Tibia 7.70 server, I was wondering how to change the 15 minutes timer to kick idle players.

Short answer:

Open the "game" file in a hex editor (e.g.: HexEd.it - Browser-based Online and Offline Hex Editing (https://hexed.it/)) and edit the following values to change the idle timer from 15 min to 24 hours:
  • In address 0x00082D80, replace 84 03 00 00 with 80 51 01 00
  • In address 0x00082FC0, replace 0F 00 00 00 with A0 05 00 00
  • In address 0x00082DB0, replace BF 03 00 00 with AC 52 01 00
Stop the server, then replace the game file with the new one. The commands below can automate this:

Code:
sudo -i
rm /home/game/bin/game
cp /home/vmuser/Downloads/game-edited /home/game/bin
mv game-edited game
chmod 777 game


Long answer

Unlike modern OT servers, there's no way to define the idle kick time in a configuration file in this version, meaning the timer is hard coded somewhere.

I used a hex editor to search for the idle alert text ("You have been idle for"...) in some of the binary files, and found a match in the "game" file.

The hex editor itself isn't that useful for finding and editing variables, so I had to open the file in a disassembler program such as IDA, which can reverse engineer the binary into assembly code.

Searching for the idle text again gives me all the surrounding blocks of code, so all I had to do was to follow the function calls until I find the variables that control when to kick an idle player:
  • The idle check interval - a.k.a. how often the game server will check for the idle character. This is set to 900 seconds, or 15 minutes.
  • The alert text - a.k.a. the number of minutes that will be displayed on the alert. This is set to 15.
  • The kick interval - a.k.a. how long of idle time before the game server will kick the character. This is set to 959, or 15min59sec.
The disassembler also shows the memory addresses where these values can be edited, so I replaced the original hex value with the new hex values for the numbers I wanted, which were:
  • Idle check interval
    • Address: 0x00082D80
    • Original value (900 seconds, which is 15 min): 84 03 00 00
    • Value I used in my tests (120 seconds): 78 00 00 00
    • Suggested value (86400 seconds, or 24 hours): 80 51 01 00
  • Alert text
    • Address: 0x00082FC0
    • Original value (15): 0F 00 00 00
    • Value I used in my tests (2 minutes): 02 00 00 00
    • Suggested value (1440 minutes, which is 24 hours): A0 05 00 00
  • Idle kick
    • Address: 0x00082DB0
    • Original value (959 seconds, which is 15m59s): BF 03 00 00
    • Value I used for test (179 seconds): B3 00 00 00
    • Suggested value (86460 seconds, or 24 hours and 1 minute): AC 52 01 00
Finally, I stopped the game server, moved the file I just edited to the "/home/game/bin" folder (giving proper permissions), then tested the game. I left my character idle for over 2 hours now and still haven't been kicked.
How do you locate those addresses to change that kind of things?
 
How do you locate those addresses to change that kind of things?

Inside IDA, I searched for the string "You have been idle for", which took me to the function that shows that message to the player.

Then I analyzed the surrounding instructions until I found something that looked like the 15 minutes value. There were 3 lines with something similar to that value (the 3 places I mention in the original post)

Once I found the exact line, IDA gave me the address in memory where that value is stored, so I could edit it with a hex editor.


It was relatively easy to do that for the timeout because its value wasn't too far from the idle alert text. Changing other variables however, such as the skill rate, might be a bit more challenging without having a good reference. Is there anything particular you want to change?
 
Inside IDA, I searched for the string "You have been idle for", which took me to the function that shows that message to the player.

Then I analyzed the surrounding instructions until I found something that looked like the 15 minutes value. There were 3 lines with something similar to that value (the 3 places I mention in the original post)

Once I found the exact line, IDA gave me the address in memory where that value is stored, so I could edit it with a hex editor.


It was relatively easy to do that for the timeout because its value wasn't too far from the idle alert text. Changing other variables however, such as the skill rate, might be a bit more challenging without having a good reference. Is there anything particular you want to change?
I am working with the cipsoft files to make a lan server for the family and friends, looking for the old feeling of Tibia. I have it working as default, now I'm trying to make a "clean" edition of the server following your guidelines in another post (clean map, no old users, no owners on houses...). I'm looking to make houses available to rent in some way, I'm gonna try the gesior website but it hasn't that feature available.
In TFS you can add a talkaction to buy/rent the house but I don't know how to do that on cipsoft files without a website.
 
I am working with the cipsoft files to make a lan server for the family and friends, looking for the old feeling of Tibia. I have it working as default, now I'm trying to make a "clean" edition of the server following your guidelines in another post (clean map, no old users, no owners on houses...).
The folder includes clean map, and you can just delete the old characters and the owners file. That's all you have to do.

I'm looking to make houses available to rent in some way, I'm gonna try the gesior website but it hasn't that feature available. In TFS you can add a talkaction to buy/rent the house but I don't know how to do that on cipsoft files without a website.
Changes in house owners are managed upon server start based on what the query manager sends to the game server. Website is only an interface here. Since you're only hosting it for yourself, you don't need a website technically.

Introducing OTS-like buy/rent function via talk action is not possible.
 
Last edited:
Changes in house owners are managed upon server start based on what the query manager sends to the game server. Website is only an interface here. Since you're only hosting it for yourself, you don't need a website technically.
I'm hosting it for myself but I want to allow friends to connect and create chars on it. I'm exploring the script way but it will be useful for other people to have a website with house management. Maybe not an auction but a simple way to rent or buy them.

I'm posting a tuto on this research to share it with the community. I think the main.cpp file on querymanager is the key to find a solution.
 
do you know a way to change the xp rate or the exp from every monster?
That's not possible by editing the client executable. Exp rate is hard coded in the server (meaning there's no configuration for it), but you should be able to edit the creature files in "/home/game/mon" and change their Experience. Just don't forget to restart the server afterwards.
 
i just cant find these files ;/
Post automatically merged:

That's not possible by editing the client executable. Exp rate is hard coded in the server (meaning there's no configuration for it), but you should be able to edit the creature files in "/home/game/mon" and change their Experience. Just don't forget to restart the server afterwards.
i just cant find these files ;/
Post automatically merged:

i just cant find these files ;/
Post automatically merged:


i just cant find these files ;/
I found them, thank you
 
Last edited:
Back
Top