• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

StressBot your server, tool written in c#

Sorky

Veteran OT User
Joined
Dec 17, 2024
Messages
368
Solutions
8
Reaction score
275
GitHub
Sorky96

I've created a tool that is true headless player simulator. It simulates sending real packets as well as parsing them as player would do.

Right now you can configure:
  • If player should move and how often
  • If player should talk and how often
  • If player should attack monster and how often he should scan for a monster
  • If player should cast spells (simple sending message)
  • How much players login in eatch batch and how long in between each of them
  • If player should chase monsters
  • If player should be reconnected during disconnect
Below i present you console output during running bots:
1774109697546.webp
Enjoy



PS.
If i posted in wrong forum, please move the thread :)
 
this is an amazing tool and will help me a hell of a lot to test :D thanks a lot buddy!!!
 

I've created a tool that is true headless player simulator. It simulates sending real packets as well as parsing them as player would do.

Right now you can configure:
  • If player should move and how often
  • If player should talk and how often
  • If player should attack monster and how often he should scan for a monster
  • If player should cast spells (simple sending message)
  • How much players login in eatch batch and how long in between each of them
  • If player should chase monsters
  • If player should be reconnected during disconnect
Below i present you console output during running bots:
View attachment 99113
Enjoy



PS.
If i posted in wrong forum, please move the thread :)

Great work!

I wonder if this would work on Tibia 7.7 Server Decompiled (https://otland.net/threads/tibia-7-7-server-decompiled.296811/), has anyone tried yet?
 
i havent test it but it should work

change these lines on the querymanager source files...
original query.cc
LUA:
    // IMPORTANT(fusion): Disallow blocked IP addresses and accounts before
    // checking credentials to prevent error messages from being used as an
    // oracle for brute force attacks.
    int FailedLoginAttempts;
    QUERY_STOP_IF(!GetIPAddressFailedLoginAttempts(Database, IPAddress, 30 * 60, &FailedLoginAttempts));
    QUERY_ERROR_IF(FailedLoginAttempts >= 20, E_IPADDRESS_BLOCKED);
    QUERY_STOP_IF(!GetAccountFailedLoginAttempts(Database, AccountID, 5 * 60, &FailedLoginAttempts));
    QUERY_ERROR_IF(FailedLoginAttempts >= 10, E_ACCOUNT_DISABLED);

new query.cc
Line around 538, Line Around 598, and Line 694
LUA:
    // IMPORTANT(fusion): Disallow blocked IP addresses and accounts before
    // checking credentials to prevent error messages from being used as an
    // oracle for brute force attacks.
    int FailedLoginAttempts;
    QUERY_STOP_IF(!GetIPAddressFailedLoginAttempts(Database, IPAddress, 30 * 60, &FailedLoginAttempts));
    QUERY_ERROR_IF(FailedLoginAttempts >= 999999, E_IPADDRESS_BLOCKED);
    QUERY_STOP_IF(!GetAccountFailedLoginAttempts(Database, AccountID, 5 * 60, &FailedLoginAttempts));
    QUERY_ERROR_IF(FailedLoginAttempts >= 999999, E_ACCOUNT_DISABLED);
recompile the querymanager and run the bot, if you dont do that your ip will be banned..
 

Attachments

Last edited:
For Blacktek (and most likely tfs too).


I forgot to add crucial part about stress testing those repos.
In ban.cpp you need to rewrite function AcceptConnection to always return true.
Otherwise engine might (and most propably will) kill your connection if it exceeds its threshold
 

I was able to update it and make it work for the Tibia 7.7 Server Decompiled (https://otland.net/threads/tibia-7-7-server-decompiled.296811/)

1774512007910.webp

I don't have enough ram on the VPS so I wont be able to test with many "Bots", but I will make a pull request or a new repo that I will publish for people to try :)

Thank you for creating this @Sorky
 
I was able to update it and make it work for the Tibia 7.7 Server Decompiled (https://otland.net/threads/tibia-7-7-server-decompiled.296811/)

View attachment 99172

I don't have enough ram on the VPS so I wont be able to test with many "Bots", but I will make a pull request or a new repo that I will publish for people to try :)

Thank you for creating this @Sorky
I would say create new branch for 7.7 so people can choose desired server. I've seen @Mateus Robeerto made changes for 8.6.
I might create multiple branches for each major repo out there
 
I would say create new branch for 7.7 so people can choose desired server. I've seen @Mateus Robeerto made changes for 8.6.
I might create multiple branches for each major repo out there
I think you don't need to create multiple branches. You can make your StressBot work with an optional menu — when you launch the bot, it shows questions like: which version do you want? 7.x or 8.x? Then it creates the bot accounts, saves them to the database, and lets you choose the behavior: attacking, defending, training, or just hunting, etc. Something like that as a menu system.

I made a source script to configure it the way I want, and I'm still going to improve it until it becomes a perfect AI bot that behaves like a real human player. Thank you for releasing the source open!
1774527814432.webp
 
I think you don't need to create multiple branches. You can make your StressBot work with an optional menu — when you launch the bot, it shows questions like: which version do you want? 7.x or 8.x? Then it creates the bot accounts, saves them to the database, and lets you choose the behavior: attacking, defending, training, or just hunting, etc. Something like that as a menu system.

I made a source script to configure it the way I want, and I'm still going to improve it until it becomes a perfect AI bot that behaves like a real human player. Thank you for releasing the source open!
View attachment 99176
Yea, but I'm worried that other repos might use different key, dexryprion etc. It obviously can be done like that. Maybe it's better way? I don't know. Won't have time flll weekend to code anyways.
 
I think you don't need to create multiple branches. You can make your StressBot work with an optional menu — when you launch the bot, it shows questions like: which version do you want? 7.x or 8.x? Then it creates the bot accounts, saves them to the database, and lets you choose the behavior: attacking, defending, training, or just hunting, etc. Something like that as a menu system.

I made a source script to configure it the way I want, and I'm still going to improve it until it becomes a perfect AI bot that behaves like a real human player. Thank you for releasing the source open!
View attachment 99176
1775009923188.webp
I had to rewrite most of it to use native login protocol + game protocol (7171 and 7172) for 772
But made it work quite well..

1775010056024.webp
 
Back
Top