|
Size: 1318
Comment:
|
Size: 1384
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 7: | Line 7: |
| // Originally by romulus // Inny bloated it with the resource stuff :P |
|
| Line 18: | Line 16: |
| up = 0 | |
| Line 28: | Line 27: |
| if c up = up + c.resource.troopCostFood | |
| Line 33: | Line 33: |
| if showcities if c echo c.name + " - " + TroopBeanToString(tr, ",") | if showcities if c echo c.name + " - " + TroopBeanToString(tr, ",") + " (Upkeep: " + floor(c.resource.troopCostFood) + ")" |
| Line 39: | Line 39: |
| echo "TOTAL UPKEEP: " + floor(up) |
This script will echo your troop & resource totals for each city and for your entire account.
// =======================================================
// Troop & Resource Totals For Each City & Entire Account
// =======================================================
// set this to 1 if you want individual city troopcounts displayed too, 0 if not
showcities = 0
mycities = cities.concat()
echo "ACCOUNT TOTALS: Found " + mycities.length + " castle(s)"
echo "Please wait. Calculating..."
t = GetTroops("a:0")
up = 0
g = 0
f = 0
w = 0
s = 0
i = 0
label mainLoop
c = mycities.shift()
if c c = c.cityManager
if c tr = c.getAvailableTroop()
if c up = up + c.resource.troopCostFood
if c g = g + c.resource.gold
if c f = f + c.resource.food.amount
if c w = w + c.resource.wood.amount
if c s = s + c.resource.stone.amount
if c i = i + c.resource.iron.amount
if showcities if c echo c.name + " - " + TroopBeanToString(tr, ",") + " (Upkeep: " + floor(c.resource.troopCostFood) + ")"
if c dummy = tr.addTo(t)
if c goto mainLoop
echo "TOTAL TROOPS:\n" + TroopBeanToString(t, "\n")
echo "TOTAL RESOURCES:\nGold: " + floor(g) + "\nTotal Food: " + floor(f) + "\nTotal Wood: " + floor(w) + "\nTotal Stone: " + floor(s) + "\nTotal Iron: " + floor(i)
echo "TOTAL UPKEEP: " + floor(up)
![[+]](/moin_static/explorer/img/toggle1.png)

![[-]](/moin_static/explorer/img/toggle0.png)
