Size: 1018
Comment:
|
Size: 1718
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
This script will echo your troop totals for each city and for your entire account. | ## page was renamed from TroopTotals This script will echo your troop & resource totals for each city and for your entire account. <<BR>> Troop upkeep per city and total for account added as well. Note it shows upkeep with vesta, etc. buffs factored in, not unbuffed. |
Line 4: | Line 6: |
// gets total troops in all cities // script by romulus |
// ======================================================= // Troop & Resource Totals For Each City & Entire Account // Originally by romulus // Inny bloated it with the resource stuff :P // ======================================================= // set this to 1 if you want individual city troopcounts displayed too, 0 if not showcities = 0 |
Line 7: | Line 16: |
echo "TOTAL TROOPS: Found " + mycities.length + " castle(s)" | echo "ACCOUNT TOTALS: Found " + mycities.length + " castle(s)" echo "Please wait. Calculating..." |
Line 9: | Line 19: |
pop = 0 popmax = 0 up = 0 g = 0 f = 0 w = 0 s = 0 i = 0 |
|
Line 12: | Line 30: |
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 |
if !c goto end c = c.cityManager tr = c.getAvailableTroop() popmax = popmax + c.resource.maxPopulation pop = pop + c.resource.curPopulation up = up + c.resource.troopCostFood g = g + c.resource.gold f = f + c.resource.food.amount w = w + c.resource.wood.amount s = s + c.resource.stone.amount i = i + c.resource.iron.amount if showcities echo c.name + " - " + TroopBeanToString(tr, ",") + " (Upkeep: " + floor(c.resource.troopCostFood) + ")" dummy = tr.addTo(t) goto mainLoop |
Line 18: | Line 45: |
label end | |
Line 19: | Line 47: |
echo "TOTAL RESOURCES:\nGold: " + floor(g) + "\nFood: " + floor(f) + "\nWood: " + floor(w) + "\nStone: " + floor(s) + "\nIron: " + floor(i) echo "TOTAL UPKEEP: " + floor(up) echo "TOTAL POPULATION: " + floor(pop) + " of " + floor(popmax) + "." |
|
Line 21: | Line 52: |
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") }}} |
This script will echo your troop & resource totals for each city and for your entire account.
Troop upkeep per city and total for account added as well. Note it shows upkeep with vesta, etc. buffs factored in, not unbuffed.
// ======================================================= // Troop & Resource Totals For Each City & Entire Account // Originally by romulus // Inny bloated it with the resource stuff :P // ======================================================= // 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") pop = 0 popmax = 0 up = 0 g = 0 f = 0 w = 0 s = 0 i = 0 label mainLoop c = mycities.shift() if !c goto end c = c.cityManager tr = c.getAvailableTroop() popmax = popmax + c.resource.maxPopulation pop = pop + c.resource.curPopulation up = up + c.resource.troopCostFood g = g + c.resource.gold f = f + c.resource.food.amount w = w + c.resource.wood.amount s = s + c.resource.stone.amount i = i + c.resource.iron.amount if showcities echo c.name + " - " + TroopBeanToString(tr, ",") + " (Upkeep: " + floor(c.resource.troopCostFood) + ")" dummy = tr.addTo(t) goto mainLoop label end echo "TOTAL TROOPS:\n" + TroopBeanToString(t, "\n") echo "TOTAL RESOURCES:\nGold: " + floor(g) + "\nFood: " + floor(f) + "\nWood: " + floor(w) + "\nStone: " + floor(s) + "\nIron: " + floor(i) echo "TOTAL UPKEEP: " + floor(up) echo "TOTAL POPULATION: " + floor(pop) + " of " + floor(popmax) + "."