SilverFern
Well-Known Member
- Joined
- Feb 15, 2020
- Messages
- 72
- Reaction score
- 56
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:
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:
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
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.
- 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
Last edited: