The script commands in this section pertain to your troops.
CancelTroopQueues
Usage: |
canceltroopqueues [remain_count] |
Example: |
canceltroopqueues |
Used to cancel troop queues, leaving remain_count batches in each barrack. If no remain_count is provided, all batches in each barrack are removed.
Disband
Usage: |
disband troop |
Example: |
disband w:25k |
Used to disband troops from the city. In the first example above, 25k warriors would be dismissed.
Starting in version 2962T, you can also tell the bot how many troops of a type to keep rather than disband. In the second example above, the bot would disband all but 25k of its warriors. Troops out of the city at the time (returning, marching, whatever) are counted into the total for purposes of keeping. Troops not listed in the script will not be affected. For example, you will not have any archers disbanded because you told it to disband /keep w:25k.
DumpTroop
Usage: |
dumptroop xxx,yyy condition troops |
Example: |
dumptroop 111,222 a:99000,s:50000 a:20000,s:15000 |
This is used to reinforce an amount of troops over a specified threshold to another city. In the example above, the bot would dump 20,000 archers and 15,000 scouts to 111,222 when there are at least 99,000 archers and 50,000 scouts in the city.
HealTroops
Usage: |
healtroops |
Example: |
healtroops |
Heal any troops that are in the medic camp.
Train
Usage: |
train <type:quantity> <hero> <barracks_id|all|idle> <minquantity> |
Example: |
train a:5000 |
This command is used to queue troops in the barracks.
- Troop types cannot be combined.
- If the quantity is more than you can actually build based on res or pop, it will build as many as it can.
- The hero can be "any", "atk" (for the best available attack hero), or named.
- You can specify a barrack by specific id# (the #s can be found in the production tab), or use "all" or "idle" barracks only.
- The minquantity ensures that at least that amount is trained, or none at all will be.
Not all parameters are required. Setting production before and after is recommended, but there is no need to manually change the mayor. The bot will temporarily assign the hero indicated to train, then reassign the original mayor when done. Using all or idle will perform the same as the client, not distribute blocks of 500 warriors into 9 slots of 8 different barracks. In all instances training via script uses no more than 1 barracks slot per barrack per train command.
In the 1st example above, the bot will train 5k archers in all barracks.
In the 2nd example above, the bot will train train 25k warriors with the best attack hero in all barracks.
In the 3rd example above, the bot will train as many archers as possible, but not less than 20k, in all idle barracks with Ace as mayor.
In the 4th example above, the bot will train 25k warriors in barrack #18 with the best attack hero, and will not queue unless it can do all 25k at once.
The values for such goals as troopqueuetime, troopsusepopmax, troopsusereserved, and troopincrement will be ignored for the Train script command.
Typing train help in the script window will give further examples for usage of this command.