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")


ScriptExamples

TroopAndResourceTotals (last edited 2013-11-21 02:30:46 by Inanna)