Application provide bots for game https://www.tribalwars.net/en-dk/
Done for a Polish language version: https://www.plemiona.pl/
So to use it in any other you will need to adjust some paths.
Application can work with 3 bots running at once.
When time passes each bot will run its iteration.
Modify application behavior setting variables in appsettings.json
Set flag seg__enabled to false if you are not planning to see detailed logs in installed local Seq.
ChromeTabStartOfUrl bot will run on a tab that url starts from what you provide.
FarmSwitchPages run but just on the first page or all of the farm assistant.
IntervalMin/IntervalMax next bot iteration will happen after random value in minutes between provided. Set both to the same if you want to run them in exact intervals.
Application have Time.Delay in many places to let's say imitate human behavior.
Created 'on a feet' so feel free to adjust and modify to your needs.
Bots work with Chrome browser to allow them to work you need to start Chrome in debug mode so:
- Close running Chrome instances.
- Run this from command line: start chrome --remote-debugging-port=9222
- If bots don't work, close all other tabs and try again; restore tabs after the first run.
Bot is simply clicking the script then starting gathering for each level. So adjust gathering_assistant.js to your needs.
After sending troops it gets the longest one time and runs bot again after it passes.
Two modes: Simple and Advanced.Simple is just sending farm attacks using template B with avoidance of non-green attacks and wall above '0'.
Advanced is demolishing walls and sending scouts after some conditions.