Extra caution is recommended when installing recently uploaded/updated scripts (read more)
Be sure you trust any scripts you install

Travian: current/max Bounty ML v1

Sums up current (resources gained) and max (max resources with the respective units) and displays them on the attack report page to the right side of the bounty resources. Updated with recent label changes and added multilanguage.

- Version: 1.20080708.0
Updated to work with Battle Analyze. Untested. Feedback welcome.
Notes: I am no longer playing Travian, but if I get suggestions I will keep the code updated. E-mail: ghimus@gmail.com

- Version: 1.20070923.0
Full multilanguage
Works with the recent label changes.
Enjoy!

- Version: 0.20070608.1
Reports containing attacking heroes no longer show a retarded gray cell.

- Version: 0.20070608.0
Added prisoners support.

- Version: 0.20070608.2
For: Firefox 2.0.0.4 with Greasemonkey 0.6.9.20070507.0 (or later)

Notes:
- No homepage yet.
- Code is very dirty but it works. Optimizations are in order - I am by no means a coder.
- Only works for English servers. Will add other languages soon.

For bugs and/or enhancements please comment here.






Jul 14, 2008
Joca Scriptwright

Thanks but (http://userscripts.org/scripts/show/10835) resolved the problem.

 
Jul 12, 2008
Joca Scriptwright

It doesnt work with battle analyse :( (http://userscripts.org/scripts/show/10835)
When i install this script disappears

Lucro 100% -------------HERE------------------- Profit in %
Eficiência 100% -------------HERE------------------- Eficiency in %

 
Jul 11, 2008
blodyx User

Thank you! This is what i needed :) Now i can finally thrash Travian beyond!

 
Apr 11, 2008
kispaljr User

if you use some other scripts (like Battle Analyse) that put images int the row of units, then you should replace the getBags() function with this code:

function getBags() {
	ret = new Array(11);
	unitline_images = find("//table/tbody/tr[4]/td/table[1]/tbody/tr[2]/td/img/@src", XPOList);
	
	var len = unitline_images.snapshotLength-1;
	for (j=0, i=0; i<=len; i++){
		img_url = unitline_images.snapshotItem(i).nodeValue;
		if (img_url.substr(0, 9) == "img/un/u/") {
			ret[j++] =t[img_url.substring(img_url.lastIndexOf("/")+1, img_url.length-4)]; 
		}
	}
	return ret;
}

 
Oct 6, 2007
Risi Scriptwright

To make this work with the Battle Analyse script, please update line #56 to:
ret[i-1]=t[(current.nodeValue).substring((current.nodeValue).lastIndexOf("/")+1,(current.nodeValue).length-4)];

 
Jul 14, 2007
Meals Script's author

Whatever you decide I'll support you.
If you choose to increment, I'll upload your source and if you choose to post I'll add a link to your script, provided you let me know that you uploaded it.
Thank you for taking the time to do this.

 
Jul 7, 2007
Jelle Fresen User

Hi, nice script, but it's a pity that it only works in english. I editted the script so it's multilanguage, and I re-engineered most of the code so its far cleaner. Later I found out about ondy1985's attempt to make it multilanguage, which is basically the same as I did, but he forgot one thing: the code is still searching for the 'Prisoners' string, which still makes it english-only.

Meals, what do you think is the best way to distribute my version?
Add a new script to the bulk of userscripts, or add it as the next version of the userscript "Travian: current/max Bounty"?

 
Jun 17, 2007
ondy1985 Scriptwright

You're welcome. The script is really useful, thank you for that.

 
Jun 13, 2007
Meals Script's author

Wonderful. Thank you! I've been swamped lately and didn't have time to look into it :/

 
Jun 12, 2007
ondy1985 Scriptwright

I modified Meals' code to work with unit icons rather than unit names, which should make the script usable in all languages.

see: http://userscripts.org/scripts/show/9819

 
Jun 11, 2007
Joramb User

Dutch, I play on the Speed server from Holland.
http://speed.travian.nl

But I saw other battle reports witch a second number. But I don't understand what the second number means, (it is not the total bounty your army can hold, and it is not the total bounty you missed. ) can you explain me what the function of the second number is.

Greats,

Boal

 
Jun 11, 2007
Meals Script's author

What language is your Travian account ?

 
Jun 10, 2007
Joramb User

I See a Zero after the total sum. The zero needs to be the total amount you can hold with your army so something is wrong.

1500/0
I see this when I attack with 25 man (they can hold total 1500)

1086/0
and I see this when I attack a opponent that don't have enough resources.

//Boal

You could comment on this script if you were logged in.