⇤ ← Revision 1 as of 2013-11-21 02:30:04
Size: 952
Comment:
|
Size: 1018
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 5: | Line 5: |
// script by romulus | |
Line 24: | Line 25: |
// script by romulus | |
Line 37: | Line 39: |
---- ScriptExamples |
This script will echo your troop totals for each city and for your entire account.
// gets total troops in all cities // script by romulus mycities = cities.concat() echo "TOTAL TROOPS: Found " + mycities.length + " castle(s)" t = GetTroops("a:0") label mainLoop c = mycities.shift() if c c = c.cityManager if c tr = c.getAvailableTroop() if c echo c.name + " - " + TroopBeanToString(tr, ",") if c dummy = tr.addTo(t) if c goto mainLoop echo "TOTAL TROOPS:\n" + TroopBeanToString(t, "\n")
This is the same thing, only just the account totals and not individual cities included too.
// gets total troops in all cities // script by romulus mycities = cities.concat() echo "TOTAL TROOPS: Found " + mycities.length + " castle(s)" t = GetTroops("a:0") label mainLoop c = mycities.shift() if c c = c.cityManager if c tr = c.getAvailableTroop() if c dummy = tr.addTo(t) if c goto mainLoop echo "TOTAL TROOPS:\n" + TroopBeanToString(t, "\n")