Travian: Antifarm\Troop saver v1.2.7

By deFox Last update Sep 15, 2009 — Installed 24,344 times.


Script Summary: Script for Travian game. Sends your and reinforce troops away on attack; refreshes and relogins automatically. Supports multiple villages.Works on all versions, including T3.5.

Version: 1.2.7

License: GNU General Public License

Script for Travian game. Works on various versions.

REQUIRES CODE PERSONIFICATION TO WORK!

No longer supported by deFox

From 01.10.2009, I no longer have time to play Travian; this means I also won't continue developing scripts. Maybe I'll get back to it one day - and maybe not.

If you wish to continue developing/supporting this script, feel free to do so.

What does it do

This script refreshes Travian automatically, and re-logins if necessary.
If an attack is detected, it refreshes more often and plays a warning sound, until a few seconds remain to attack. Then it sends your troops, and any reinforce from other villages, away. After a few seconds troops are automatically called back, so they should be in your village again ~4 second after the hit.

Note that this is a script for advanced users - it requires code modifications to work for specific user.

How to configure it

Set troopTarget[] to coordinates of the villages where you want to send the troops to. You may type in only one village, or more villages - in this case, specific coordinates will be selected randomly from the list. You may also change other parameters; but don't think that setting it to any value will work. Don't make drastic changes.

You should always see status message of the program in right panel. If it's not there, then the script isn't working. Note that it only works when you're in "Village and around" view (when address bar contains 'dorf1.php').

The script will not work on v3.5 without small modification - people who have any technical knowledge should fix this quite easily (hint: getEnemyAttackArrivalTime).
Additional hint: the modification should not involve changing any numbers or adding any code.
If you still can't find the place, try reading forum threads. If this won't help, then you shouldn't use this script.

YOU NEED TECHNICAL KNOWLEDGE TO USE THIS SCRIPT!

Details and restrictions

You can't be 100% sure that your troops are safe with this script. There are many cases which may lead to some or all of your troops not being sent or called back properly.

For example - when an attack is detected, the script stops sweeping villages and monitors only the attacked village. If, in the meantime, another village is attacked, this script may not notice this fact.
Another example - if you'll lose network connection for a few minutes, and the browser will show the error message instead of Travian page - then the script will not be executed and will not work until you refresh it manually.

So - if you see an attack, and want to be 100% sure, you should manually send your troops instead of waiting for the script.

The script only works if you're on a page named "dorf1.php" - the "village and around" view. When you're on different page, the script is inactive.
When the script have sent your troops, and is waiting to call them back, do not refresh the page - refreshing will re-start the callback timer from beginning.

Who made it

The original author of this script is m4rtini. His version is here.
Extensive modifications were made by deFox.
Some code was contributed by Arias.

Legal stuff

License agreement of this script allows other people to modify it and upload their own versions. Please don't send me questions about those versions - I do not support them.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.