DeletedUser122570
Guest
- Author
- Lunacystudy
- Contributors
- N/A
- Quickbar Entry
-
https://pastebin.com/raw/ATBXWvxS
- Public?
- Public
This is a script that goes through each of your villages and generates a nicely-formatted message for the troop totals and currently available troops.
The code is available here: https://pastebin.com/ATBXWvxS - I've not minified it because I'm extremely lazy and don't care. You can copy-paste the whole code into your Link Target box in the Edit Quickbar Link page.
(Mods: the pastebin link above is different to the one I submitted, I just removed a couple of debug lines and closed a </label> tag)
Output:
[coord]459|629[/coord]
[coord]460|632[/coord]
[coord]459|632[/coord]
Caveats:
- It navigates to the Troops Overviews page to get the data
-- Doesn't work if you don't have a Premium Account
-- This means the next time you click the Overviews button, it takes you to the Troops Overviews, not the one you used last. It's annoying and should be fixable, I just have to get around to it. Fixed
-- That also means it narrows down the villages available to report on by your current group, which uh... was totally intended.
-- It only navigates to the first page because I'm scared of the Bot detection.
--- The message format isn't great for hundreds or thousands of villages anyway, so I'm not super interested in supporting the larger page sizes.
The code is available here: https://pastebin.com/ATBXWvxS - I've not minified it because I'm extremely lazy and don't care. You can copy-paste the whole code into your Link Target box in the Edit Quickbar Link page.
(Mods: the pastebin link above is different to the one I submitted, I just removed a couple of debug lines and closed a </label> tag)
Output:
[coord]459|629[/coord]
Code:
Spear fighter | Available: 11 | Total: 19
Swordsman | Available: 21 | Total: 29
Archer | Available: 15 | Total: 15
Scout | Available: 65 | Total: 15
Code:
Spear fighter | Available: 5 | Total: 66
Swordsman | Available: 9 | Total: 50
Axeman | Available: 2 | Total: 2
Archer | Available: 70 | Total: 70
Scout | Available: 47 | Total: 97
Light cavalry | Available: 3 | Total: 3
Heavy cavalry | Available: 3 | Total: 3
Ram | Available: 1 | Total: 1
Code:
Spear fighter | Available: 11 | Total: 11
Swordsman | Available: 11 | Total: 11
Axeman | Available: 7 | Total: 7
Archer | Available: 3 | Total: 3
Scout | Available: 4 | Total: 6
Light cavalry | Available: 5 | Total: 5
Mounted archer | Available: 6 | Total: 6
Heavy cavalry | Available: 5 | Total: 10
Ram | Available: 9 | Total: 19
Catapult | Available: 15 | Total: 15
Caveats:
- It navigates to the Troops Overviews page to get the data
-- Doesn't work if you don't have a Premium Account
-- This means the next time you click the Overviews button, it takes you to the Troops Overviews, not the one you used last. It's annoying and should be fixable, I just have to get around to it. Fixed
-- That also means it narrows down the villages available to report on by your current group, which uh... was totally intended.
-- It only navigates to the first page because I'm scared of the Bot detection.
--- The message format isn't great for hundreds or thousands of villages anyway, so I'm not super interested in supporting the larger page sizes.
Last edited by a moderator:
Upvote
0