Travian Bot - User' Guide


Intalling

Travian Bot is a Firefox extension, so first of all you need a Firefox browser.

You can install the bot from its homepage by clicking on the "Install Travian Bot" menu item on the right. After clicking on this menu item you will need to allow the website to install extensions ("Allow" button in the upper right corner). After you clicked on the Allow button, a Software Installation window will be displayed. Click on the "Install now" button. You need to wait a few seconds before it gets enabled. Wait until the installation is completed, then restart your browser with the "Restart Firefox" button. The installation will take effect just after you restart your browser.


General settings

After installing the bot you need to specify the domains of the servers on which you want to use the bot. The settings can be accessed from Tools / Travian Bot / Preferences....

Domains

The bot is able to work on many servers at the same time, but in case of each server for just one user. The bot has a list of Travian servers and when you start the bot, it makes a tab for each server. This list is empty after the installation. You can add or remove servers from this list in Tools / Travian bot / Preferences.... To add a server copy its address (i.e. http://speed.travian.com/) into the Domain field, choose its version and click on the "Add" button. To remove a server, select it from the list and click on the "Remove" button.

Blocking JavaScript for the domains

The bot can disable JavaScript for the listed domains to prevent the server to get information about it. With blocked JavaScript some functionalities of the game will not work correctly or not as usual. With the "Allow JavaScript for previously blocked domains" button you can enable JavaScript again. It will enable JavaScript for all blocked domains, which were blocked by the bot, not just for the listed domains.

General delays

The purpose of delays is to simulate the reaction time of the user. The delays are in pairs: min and max. The bot randomly generates its waiting time between these values.The general delays are the default delays for all bots (different delays can be set for each server). The values are in milliseconds.

  • minimum short és maximum short delay - the time between two "clicks". Optimal values: 1000 and 3000 (1 and 3 seconds).
  • minimum long and maximum long delay - the bots acts similarly as a user - selects a village, builds, sends resources and troops (if needed), after completing the necessary tasks it leaves the village alone. Long delays specify the maximum time between two visits. The bot may select the village earlier if there are some tasks. Optimal values: 600000 and 1800000 (10 and 30 minutes).

Custom sound notification

The bot can notify you about incoming attacks by playing a sound. By default it will play only a beep. If you want the bot to play a custom sound you can specify the path of the *.wav file at the "Custom sound notification" field.

MSN Notifier

The bot is able to log in to MSN and use it as a comminication channel. MSN notifier can be used to start, stop and retrieve the status of the bot remotely and to get notifications about incoming attacks. The bot needs to be restarted before any changes in this group take effect.

  • Allow to automatically login to MSN - this option turns on or off the MSN notifier.
  • ID to login with - an MSN account (email address) for the bot to login with. After you entered the ID, you need to enter its password using the "Set password" button. The password is stored in the Password manager of the browser. You can see it in: Tools > Options... > Security > Saved Passwords
  • Contact to be notified - an MSN account identifier for yourself, if one of your villages is under attack the bot will try to inform this account

Important note: the above mentioned two MSN accounts need to be on the contact list of each other and at least once they need to be logged in at the same time (using standard MSN client for both accounts).

If everything is set up correctly, the bot will show that it is logged in to MSN and you will see its account among your MSN contacts with online status.

Commands, which can be sent through MSN:

  • [server id] start - starts the bot for the identified server, i.e. "speed.travian.org start"
  • [server id] stop - stops the bot for the identified server, i.e. "speed.travian.org stop"
  • [server id] login - logs in to the identified server, i.e. "speed.travian.org login"
  • [server id] logout - logs out from the identified server, i.e. "speed.travian.org logout"
  • [server id] status - sends information back about the bot of the identified server, this command can be combined with the other commands, i.e. "speed.travian.org status" or "speed.travian.org stop status"

User interface

After setting the General settings you can start the bot from Tools / Travian bot / Start. The bot consists of a menu, a header, a body (tabs and grids) and a footer.

Menu

  • File
    • Import settings - it loads the settings from the specified xml file. If the bot already contains settings for the same server(s) as the file does, then the collided settings can be skipped (not loaded from the file) or overwritten with the settings in the specified file.
    • Export settings - it saves the settings to the specified file in xml format, same as the Save settings button except that the user can choose the name and location of the file.
    • Delete saved settings - clears the content of the travianbotProperties.xml file. The settings remain in the bot until it is closed.
  • Import website-generated data
    • Inactive villages by http://ttool.info - the information about inactive players generated by ttool.info can be imported into the bot:
      • Go to http://ttool.info and choose your server from the list on the right
      • Click on the link: "Inactives"
      • Select a server and coordinates, click on the button below
      • Select the Village+ tab, then the XML link
      • Save the file
      • Go to the bot, click on the "Inactive villages by http://ttool.info" menu item and choose the file saved from the website
      • Select the troop sending tab and enter troop information for the new rows
  • DOM Inspector - The DOM Inspector is a data visualizer for debugging purposes. It can be used to see what is happening inside the bot.

Header

The upper part of the bot is the header.

  • Bots - This list contains all of the servers, which were added at domains. Each server has an own bot.
  • Nation - You can specify the nation of the account. It is recommended that you select the right nation, because the bot builds two buildings for romans and filters the list of troops on the troop sending and training tab.
  • Villages - This list contains the names of your villages by the selected server (bot).
  • Start/Stop button - The bot can be stopped and started again with this button.It can be useful, when you want to do something within the game and don't want the bot to do something else (i.e. select a different village). If you change some setting of a village, the new settings will be active only after the bot selects that village. You can force the bot to select the village with the changed settings by stopping and starting it again with this button.
  • Save settings - The bot saves your settings to a file, so if you close and open the bot you don't need to set it up again. Settings remain after update, too. The name of the file is travianbotProperties.xml and it can be found at the following locations:
    • Windows XP OS:"C:\Documents and Settings\[USERNAME]\Application Data\Mozilla\Firefox\Profiles\[RANDOM-NUMBER].default\travianbotProperties.xml"
    • Linux OS: "/home/[USERNAME]/.mozilla/Firefox/[RANDOM-NUMBER].default\travianbotProperties.xml"
  • Show log - The bot makes some logs during its work. The Show log button loads the log into the tex field on the Log tab.
  • Information label - Shows the actual state of the bot.
    • Active - the selected bot is working
    • Stopped - stopped with the Start / Stop button
    • Safety logout active - it's logged out and simulating sleeping, the actual time is inside the given interval (at delays)

Body - Usage of the grids

The body of the bot consists of the following tabs:

  • Building rules
  • Resource sending
  • Troop training
  • Troop sending
  • Auto troop config rules
  • Other
  • Delays
  • Reports
  • Log

Each tab except the Delays is village specific (different settings can be set up for different villages). The Delays tab is bot specific (different settings can be set up for different domains). In addition to the listed tabs, the bot creates a new tab with an embedded browser for each server (added at domains) and loads the game into it. Warning: Do not click on the embedded browsers, because it can distract the bot. Each tab except the tabs with the embedded browsers has a grid. These grids are used to specify the tasks for the bot.

  • Adding a new task (row) - You can add new rows to the grids with the [Insert] key of the keyboard or with the [Ctrl] + [M] key-combination (for Mac users) or with the "Add a new row" button.
  • Remove tasks (rows) - You can remove the selected rows with the [Delete] key or with the "Remove the selected rows" button.
  • Modifing tasks - You can modify the existing rows by double-clicking on them or by selecting them and pressing the [Enter] key. To edit multiple rows at the same time, select the rows you want to edit and press the [Enter] key or click on the "Mass edit selected rows" button. If you edit multiple rows at the same time, the bot will add a checkbox after (or above in case of lists) the entry fields. The caption of the checkboxes is "No change", which means that the bot will not change the value of an attribute if the attribute's checkbox is checked.
  • Coping and pasting rows - You can copy the selected rows with the [Ctrl] + [C] and paste them with the [Ctrl] + [V] key-combinations. The rows are copied to and pasted from the clipboard in XML format. Note: you can paste rows just to the grid with the same type.

Some of the values have to meet some requirements. The requirements can be found next to the entry fields (textboxes) on the Edit window when modifing a row. If one of the values doesn't meet its requirements, then the row will be red after the modification, indicating that it is not valid. Requirements can be the following:

  • * - required value, it cannot be blank
  • (#) - number
  • (+) - positive number
  • (hh:mm) - hours (between 0-23) : minutes (between 0-59)
Important note: Invalid (red) rows are ignored by the bot.

After starting the bot, it loads the login page of the game and just clicks on the Log in button of the game, so before you start the bot you need to log in from your browser normally. After it logs in, it parses the names of your villages and fills the village list with them in the upper left corner. Wait until your villages appear in the list and the bot goes through your villages and collects the necessary information. After this you can start to setup the bot for each village. Remember that any change you make (i.e. add rows to one of the grids) applies to the village which is selected in the upper left corner.

Footer - Sorting and filtering

Most of the tabs have sorting and filtering capabilities, typically just those where it can be useful.

  • Sorting - You can choose the column from the "Sort by" field by which you want to sort the rows.
  • Filtering - The filtering conditions can be specified in the entry fields of the Filtering section. Each entry field filters the grid by case sensitive word fragments, i.e. "ords" will match Swordsman, but "sword" will not, because its starts with lower-case letter. The rows of some grids may have child rows (they can be folded and unfolded), i.e. troop sending. The filtering takes the child rows into account too, so if one of the child rows match the filtering criteria, then the parent row will not be filtered out, i.e. "Swordsman" will only show those troop sending tasks that contain swordsman.
    In case of numeric columns the following logical operators can be used too:
    • "<" (less)
    • ">" (greater)
    • "<=" (less or equal)
    • ">=" (greater or equal)
    • "!=" (not equal)
    • "==" (equal).

    The number needs to be specified after the logical operator, i.e. "> 100″ or "<= 1000″.


Building rules

The bot automatically loads the buildings and their actual level into the grid on the Building rules tab.

Options:

  • Building active - the bot upgrades the buildings in the village only if this option is turned on (ticked) for the village.
  • Consider the level of the buildings - if this option is ticked for the village, the bot adds the current level of the buildings to their priority. The higher level a building has, the lower priority it gets. This option can be used to upgrade the buildings uniformly.

Grid columns:

  • Type of the rule - It specifies whether the building needs to be built (depending on resources or priority) or demolished. If the "Building depending on priority" option is selected, then the bot will build that building only if there is no building with higher priority (smaller number). If the "Building depending on resources" option is selected, then the bot will build that building only if there is no building with higher priority which can be built from the currently available resources. If there are more buildings with the same priority, then it depends on the order.
  • Building ID - The game identifies the building sites with numbers. You can see these numbers if you move your mouse over a building site (in the browser, not in the bot) and take a look at the statusbar of the browser. This field is: required, positive number
  • Building name - the type of the building
  • Actual level - The actual level of the building. This field is: required, positive number
  • Goal level - The goal level of the building. This field is: required, positive number
  • Priority - The priority field is used to specify the order of upgrading the buildings. The highest priority is 1. If a building has a value greater than 1 in this field, then its priority is lower. If it is not defined, then the building gets the default priority: 50. The value can be decimal number, too.

    It is possible to define an exact order of upgrading the buildings. The same building can be added to the list multiple times with multiple priorities and goal levels (the actual level is updated automatically for each row). To define an exact order the "Consider the level of buildings" option needs to be turned off and all buildings need to be set to "Building depending on priority". Example: with the following list the bot will upgrade Building 1 to level 3, then Building 2 to level 5 finally Building 1 to level 7

    • Building 1 - goal level 3 - priority 1.1
    • Building 2 - goal level 5 - priority 1.2
    • Building 1 - goal level 7 - priority 1.3

    This field is: not required, positive number


Resource sending

On the resource sending tab you can specify when, where and how much resources should the selected village send. Resources can be sent on a scheduled basis or on-demand (triggered - see below).

Options:

  • Resource sending active - The bot does not send resources from the selected village if this option is not ticked. Note: if the option is not turned on, it still calculates the Next date of the tasks and sends resources if enemies are incoming.
  • Round the sent amounts to style="text-align:justify;" - The bot rounds the resources to be sent based on the value in this entry field. If it is blank, then the amounts are rounded to 10. For example: if you enter the amount that a trader can carry, then only fully loaded traders will be sent.

    If 2000 is entered into this field, the bot will send amounts like: 2000, 4000, 6000, 8000, 10000, etc.
    If 100 is entered into this field, the bot will send amounts like: 100, ..., 800, 900, 1000, ..., 1500, 1600, 1700, etc.
    If the field is left blank, the bot will send amounts ending with zero: 2110, ..., 3560, ...4570, etc

Grid columns:

  • Target Village - Name of the target village, where the merchants will go. It does not need to match the name of the target village. This field is: not required.
  • X and Y coordinates - The X and Y coordinates of the target village. They are required fields if the target village is not an own village or if it's an own village but the Target Village field is blank or its value does not match the name of the target village. These fields are: in most cases required, number.
  • Start and End time - Multifunctional fields. They specify the "from" and "to" time of the resource sending. They are not required fields but they can change the behavior of the bot if they are blank. HH:MM format The table of delays shows all the different behaviors.
  • Minimum and Maximum interval - Multifunctional fields. They specify the time interval for repeating the task. They are not required fields but they can change the behavior of the bot if they are blank. The values are in minutes. The table of delays shows all the different behaviors.
  • Wood, Clay, Iron and Wheat style="text-align:justify;" - Multifunctional fields, they specify the amount of resources to send. They are multifunctional, because the amount can be specified in many different ways:
    • Blank - if the field is blank, then the bot will try to send all of that resource
    • Normal - positive number; the bot will try to send the given value, i.e. 10000
    • Percent - positive number between 0 and 100 followed by a '%' sign (without quotes); the bot will try to send the given percent of the available amount. i.e. if there is 10000 from wood in the storage and the value of this field for wood is "35%", then the bot will try to send 3500 from wood.
    • Keeping on level: positive number followed by a '+' sign, in this case the number meens that the amount of the specified resource should be always over the given amount in the target village. i.e. if the given value is "30000+" and in the target village is only 10000 of that resource, the bot will try to send 20000. If there is more than 30000, then the bot will send 0 from that resource. It can be used only if the target village is an own village.
    • Percent & Keeping on level: positive number between 0 and 100 followed by '%+' sign. This is the same as "Keeping on level", except the number specifies the percent of the storage, i.e. if the given value is '50%+' the bot will send resources to half-fill the storage of the target village. Let's assume that the storage of the target village is 40000 and the available amount is 5000. In this case the bot will send 15000 of that resource. It can used only if the target village is an own village.
    • Sending the surplus: positive number followed by a '-' sign, in this case the number meens that the amount of the specified resource should be always under the given amount in the selected village. i.e. if the given value is "40000-" and there is 50000 from that resource, then the bot will try to send 10000.
    • Percent & Sending the surplus: positive number between 0 and 100 followed by '%-' sign. This is the same as "Sending the surplus", except the number specifies the percent of the storage, i.e. if the given value is '70%-' the bot will try to keep the resource level under the 70% of the storage. Let's assume that the storage of the selected village is 10000 and the available amount is 9500. In this case the bot will send 2500 of that resource.

    Combining the above mentioned special cases

    From the above mentioned special cases the "Keeping on level" and "Sending the surplus" cases can be combined with each other. To combine them you only have to enter them one after the other, i.e. "80%- 60%+" or "7000+ 90%-" (their order does not matter). By combining them you can achieve the following behaviours (the 'A' and 'B' letters subtitutes numbers):

    • A%+ B%- - the bot will try to keep the resource level of the target village above A% of the storage or keep the resource level of the selected village below B% of the storage
    • A%+ B- - the bot will try to keep the resource level of the target village above A% of the storage or keep the resource level of the selected village below B.
    • A+ B%- - the bot will try to keep the resource level of the target village above A or keep the resource level of the selected village below B% of the storage.
    • A+ B- - the bot will try to keep the resource level of the target village above A or keep the resource level of the selected village below B.

    The highlighted "or" word changes to "and" in the above mentioned statements if you put an '&' character between the A and B numbers, i.e. A%+ & B%- (applies to all four cases).

Sending resources on-demand (Triggered resource sending)

Instead of setting up the Start and End times, Min and Max intervals for the resource sending task, it is possible to set up a trigger which fires when the resource level goes above or below a user-defined amount. Each time the trigger fires, the bot sends resources based on the specified amounts. The Start and End time, Min and Max interval entry fields can be left blank for triggered tasks.

Triggered tasks can be recognized by a '@' sign in any of the resource entry fields (Wood, Clay, Iron or Wheat). If at least one of these entry fields contains the '@' sign, then the bot considers it a triggered task.

Specifying a trigger based on the selected village:

  • Normal: "5000 @ 60%-" or "5000 @ 4000-" - if the resuorce level goes above the first number in the selected village, then the bot will send resources based on the second part of the expression (the part, which is after the '@' character). These expressions were already mentioned above: "Sending the surplus" and "Percent & Sending the surplus".
  • Percent: "80% @ 70%-" or "80% @ 5000-" - if the resource level goes above the specified percent of the storage (first part), then the bot will send resources based on the second part of the expression.

Specifying a trigger based on the target village:

  • Normal: "6000 @ 60%+" or "6000 @ 7000+" - if the resource level goes below the first number in the target village, then the bot will send resources based on the second part of the expression (the part, which is after the '@' character). These expression were already mentioned above: "Keeping on level" and "Percent & Keeping on level".
  • Percent: "40% @ 50%+" or "40% @ 5000+" - if the resource level goes below the specified percent of the storage (first part) in the target village, then the bot will send resources based on the second part of the expression.

Combining triggers for the selected and the target village

The above mentioned triggers can be combined with each other using the "&" (AND) or "|" (OR) logical operators. If they are connected with the "&" (AND) operator, then the bot will send resources only if both triggers become active (the amount of resources goes above/below the specified amount for both triggers). If the triggers are connected with the "|" (OR) operator, then it is sufficient if only one of the triggers goes active.

Example with & (AND): "70% @ 60%- & 40% @ 50%+"

Example with | (OR): "70% @ 60%- | 40% @ 50%+"

Warning: Do not use triggered resource sending if you are not sure about what you are doing!

If they are set up incorrectly, the bot may try to send resources in a infinite loop. Consider the following incorrect example:

"50% @ 20%+" - with this setting the bot will send resources if their level goes below 50% of the storage, however it will fill the storage up to 20%, wihch is still below 50%, so the trigger will remain active.


Troop training


Troop sending


Auto troop config rules


Other

Celebrations

Upgrading troops


Delays


Reports


Evading attacks


Log