Travian Task Queue

By Nevam Last update Jul 28, 2009 — Installed 417,793 times.

Fix for newest break

in
Subscribe to Fix for newest break 22 posts, 8 voices



Pimp Trizkit Scriptwright
FirefoxWindows

I probably bastardized the script. Seeing that I dont know how to do Regular Expressions and to fix this needs a new Regular Expression. I made do with just some good old splits and string concatenations.

But here is what you need to do:

1) in the function "createBuildLinks" goto line with:

var sBuildingName = xpathBuildingNames.snapshotItem(i).innerHTML;

Add this line AFTER the one above:

sBuildingName = sBuildingName.split("<")[0] + sBuildingName.split("<")[1].split(">")[1];

so the final code for that area should look like this:

var sBuildingName = xpathBuildingNames.snapshotItem(i).innerHTML;
sBuildingName = sBuildingName.split("<")[0] + sBuildingName.split("<")[1].split(">")[1];
var aMatches = sBuildingName.match(re);

This will rip out the span while leaving the level X after the building name. The comment says it CAN contain the level X string, actually it HAS TO HAVE the level X string.

2) in the function "createResearchLinks" goto line with:

var re = new RegExp("(.*)\\s" + aLangStrings[7] + "\\s[0-9]{1,3}$", "i");

Comment out (or delete) the next line :

buildingName = buildingName.snapshotItem(0).innerHTML.match(re);

and replace with:

buildingName = buildingName.snapshotItem(0).innerHTML.split(" ")[0];

so the final code for this area should look like this:

	if(buildingName.snapshotLength < 1) {
			_log(2, "Building name not found.")
		return;
	}
	var re = new RegExp("(.*)\\s" + aLangStrings[7] + "\\s[0-9]{1,3}$", "i");
	buildingName = buildingName.snapshotItem(0).innerHTML.split(" ")[0];
//	buildingName = buildingName.snapshotItem(0).innerHTML.match(re);
	switch(buildingName) {
		case aLangBuildings[22]: //academy
			var linkTxt = aLangStrings[3];
			break;
		case aLangBuildings[12]:  //smithy
		case aLangBuildings[13]:  //armory
			var linkTxt = aLangStrings[46];
			break;
		default:
			_log(2, "No research links needed.");
			return;			
	}
	

3) And finally, in the function "createTrainLinks" you are gonna do the same thing as step 2. The final code for this area should look like this:

	if(buildingName.snapshotLength < 1) {
			_log(2, "Building name not found.")
		return;
	}
	var re = new RegExp("(.*)\\s" + aLangStrings[7] + "\\s[0-9]{1,3}$", "i");
	buildingName = buildingName.snapshotItem(0).innerHTML.split(" ")[0];
//	buildingName = buildingName.snapshotItem(0).innerHTML.match(re);
	var bIsResidence = false;
	switch(buildingName) {

Pimp Trizkit

 
cecece User
FirefoxWindows

thanks

 
dangerousyaso Scriptwright
FirefoxWindows

thanks man :)

 
Ico666 User
FirefoxWindows

I can't thank you enought! I love you!!

 
Pimp Trizkit Scriptwright
FirefoxWindows

@cecece.. your welcome!

@dangerousyaso - Your also welcome!

@Ico666 - your welcome too .. and i love you all!

Pimp Trizkit

 
Monterey User
FirefoxWindows

Thanks a lot PT!
I just have to report that Your fix works on it. server 3 (classic -> 2.5), but it doesn't fix server 8 (always .it) which is running the updated version 3.5.
Any idea about a possible reason?

 
tremila User
FirefoxWindows

excellent !!!

 
Skilled User
FirefoxWindows

How can i change the source file?

 
Skilled User
FirefoxWindows

Ok, i change it.
But doesn't work witch T3.5 :(

 
Monterey User
FirefoxWindows

Actually I found out it works also on s8.it (ver. 3.5) if I switch Travian3 Beyond off.

 
Skilled User
FirefoxWindows

Wow... That's true...
But works only for the fields, right ?

 
Monterey User
FirefoxWindows

No, in my case - with T3B off - it works also for buildings.
By the way, have You seen the version 3.6 changes to the gameplay?

 
Skilled User
FirefoxWindows

Ok, works for fields and for buildings.
No, i don't seen changes, can i find it ?

 
Monterey User
FirefoxWindows

You can find the rough description here:
http://forum.travian.com/showpost.php?p=1479196...

 
Pimp Trizkit Scriptwright
FirefoxWindows

@ Everyone - you should have TTQ as the FIRST script in the list. Travian Beyond should be BELOW TTQ. I use Travian Beyond ML-CN, and doing TTQ first doesnt mess with beyond (but the opposite is not true)

There is a new bug now. They must have changed something AGAIN. Cause as of today the build later link for buildings that are not yet build is gone. (but it was working after my fix, just not now anymore)

Pimp Trizkit

 
Monterey User
FirefoxWindows

Thanks again Pimp Trizkit!
I confirm that with TTQ first on the list it is working for fields and building upgrades.

 
renaissanx User
ieWindows

Oh~ my gosh!!

You're a genius !!

Thank you!!! ^-^/

 
Pimp Trizkit Scriptwright
FirefoxWindows

Correction - my fix did break the ability to queue buildings that dont exist yet... looking into it.

Pimp Trizkit

 
Pimp Trizkit Scriptwright
FirefoxWindows

Also the research later and party later links are broken too. Looking into it.

I got a fix for the above issue tho.

Thinking about posting a new copy of the script with all these recent fixes and added translation.

Pimp Trizkit

 
Monterey User
FirefoxWindows

Great, looking forward to get Your fix! ;)
Thanks in advance!

 
Pimp Trizkit Scriptwright
FirefoxWindows

http://userscripts.org/scripts/show/61261

New version is available.

This version fixes all the Train Later links in Academy, Barracks, Stable, Armoury, Blacksmith and the party later in Town Hall. (I think)

This version also fixes the breaks of 10/29/09 as discussed above.

Pimp Trizkit

 
Monterey User
FirefoxWindows

You are ace! ;)
Thank You so much.

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