TravianFarBeyond

By Freeky Last update Oct 14, 2010 — Installed 43,883 times.

Troop exploration times

in
Subscribe to Troop exploration times 5 posts, 2 voices



DualD User

Hi Freeky,

I've added an extension to the tiempoExplorar function. This extension calculates the exploration times for troops if there are not enough resource a.t.m. This extension also works in the residence :).

change the end of the tiempoExplorar function where it looks like:


        for (var i = 1; i < a.length; i++){
            var b = a[i];
            var c = b.getElementsByTagName("DIV");
            if (c.length == 2 && c[1].className == 'c'){
                var d = b.getElementsByTagName("TD")[3].textContent.split("|").splice(0,4);
                var e = calculateResourceTime(d);
                if (e) c[1].innerHTML = e;
            }          
        } 

into this:

        for (var i = 1; i < a.length; i++){
            var b = a[i];
            var c = b.getElementsByTagName("DIV");
            if (c.length == 2 && c[1].className == 'c'){
                var d = b.getElementsByTagName("TD")[3].textContent.split("|").splice(0,4);
                var e = calculateResourceTime(d);
                if (e) c[1].innerHTML = e;
            }
            
            // Calculate troop times
            var f = b.getElementsByTagName("TD");
            if (f.length == 7 && f[3].className == 's7' && f[6].textContent == '(0)'){
                var g = f[3].textContent.substring(1).split("|").splice(0,4);
                var h = calculateResourceTime(g);
                if (h) {
                		f[3].innerHTML += "<br />" + h;
                }
            } 
        }

Greets, DualD

 
Freeky Script's Author

Hi DualD, the tiempoExplorarUnidades() already do that... i think... or else I'm not understating your change :D
Can you specify better? :D

anyway thanks for caring :D

 
DualD User

The best way to explain this is by illustrating it i guess :D

As far as i've seen your script doesn't do this... but correct me if i'm wrong

Free Image Hosting at www.ImageShack.us
ow and btw, the language is dutch
 
Freeky Script's Author

DualD: Yes it does, or it should! :D

function tiempoExplorarUnidades

but you must put at least 1 trop on the text box!

 
DualD User

Lol, I've never seen that :|, could you please add functionality to show the exploration times when no troops are available also? Just like mine extension...?

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel