A coding question...

in
Subscribe to A coding question... 3 posts, 2 voices



TheGrinch User
FirefoxWindows

To anyone in the know: is there any way to interogate the page to discover the currently equipped Troop Training Speed?

along the lines of....

tt_speed = foo.bar.blah.blah.blah; (whatever the code would be to read the currently equipped troop training speed)

Thanks if anyone can help.

Checked this using the hard-coded troop training speed to check troops/hr in TOOLS and the formula holds up:

var tr_tts = 332;
var trf = 1 + (tr_tts / 100);

var bm = city.numBarracks + 0.1 * (city.totLevelsBarracks - city.numBarracks);
var mf = city.marshallCombatScore / 200;
var gf = city.geometryLevel / 10;
var sf = city.stableLevel / 10;
var wf = city.workshopLevel / 10;
var isf = bm * ((1 + mf + gf) * trf);
var csf = bm * ((1 + mf + gf + sf) * trf);
var ssf = bm * ((1 + mf + gf + sf + wf) * trf);

 
jontey Scriptwright
ChromeX11

i think that formula should use kabam's function to calculate so we don't have to keep updating it.. But then again... another update lol

 
TheGrinch User
FirefoxWindows

Phil Cazz knocked up some code to extract the tr_tts from the throne room - works a treat :)