Skip to main content

Tribal Wars Bot (TWB)

An open source bot for the Tribal Wars game

Update 1.8 notice

If you experience issues starting the bot you might have to update the dependencies by running the following command in the bot folder: python -m pip install --upgrade requirements.txt

We also created a Discord server so you can seek help from other users.

Features:

  • Cooperative mode (you can keep playing using the browser while the bot manages stuff in the background)
  • Building management
  • Defence management
  • Troop management
  • Flag management
  • Automatically adds conquered villages
  • Farm management
  • Market management
  • Premium market (free premium points :D)
  • Research management (including level systems)
  • Automatic snob creation
  • Report management
  • ReCaptcha "bypass" by using browser cookie string (bot works if browser session is valid)

How To:

  • Install Python 3.x

  • Install the requirements (pip install -r requirements.txt)

  • Either copy config.example.json to config.json and edit the following things:

    • add at least the endpoint and server
    • change the village_template configuration section to your needs
  • Or just run python twb.py and enter the requested information

  • Start the bot by running python twb.py and supply the cookie string from your browser

  • If login works you can adjust the config.json to your needs, it will automatically reload on change.

  • Your villages will be added to the config automatically, disable the "managed" parameter to make the bot skip the village

  • Additional properties can be tweaked by running the manager.py script

  • You might want to set the bot user-agent in core/request.py to your own user agent. They probably wont notice but just in case :)

You can find the cookie string in the following location (Chrome):

Screenshot

You need to use the cookie: header value

optional: If everything is set-up correctly and the bot is running you can cd into the webmanager directory and start the bot interface by running server.py. You can access this dashboard by visiting http://127.0.0.1:5000/ in your browser. A lot of new features will be added to the dashboard soon.

More information about configuring the bot can be found in the readme directory!

Release files for TWBot 2.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for TWBot 2.0.2
File Size Uploaded
twbot-2.0.2.tar.gz 143.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for TWBot 2.0.2
File Interpreter ABI Platform
twbot-2.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 316.7 kB

Release files / twbot-2.0.2.tar.gz

Download URL twbot-2.0.2.tar.gz
Size 143.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c78e64270afee162c5cc0a7cc0a70ff7b0ce62ff3b38d0c65b0f763a12519fec
BLAKE2b-256 checksum
How to use checksums
6c9004a9c3ecbdf349076131bc23476f52fa8598b481644bbf9aeb882608c149
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.4

Release files / twbot-2.0.2-py3-none-any.whl

Download URL twbot-2.0.2-py3-none-any.whl
Size 172.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
adaa7780b5c03b592e384692dc649a37012365ad2d9bac37cede61fdec545054
BLAKE2b-256 checksum
How to use checksums
60a3dec5861166f8b2e6159b39be3b0b63c88fef5e66e603a1ccf44e8729ca6b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.4

Release history Release notifications | RSS feed

This release

2.0.2 This release

2 release files

2.0.1

2 release files

2.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page