Fix for newest break
![]() ![]() |
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.
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 |
![]() ![]() |
thanks |
![]() ![]() |
thanks man :) |
![]() ![]() |
I can't thank you enought! I love you!! |
![]() ![]() |
@cecece.. your welcome! @dangerousyaso - Your also welcome! @Ico666 - your welcome too .. and i love you all! Pimp Trizkit |
![]() ![]() |
Thanks a lot PT!
|
![]() ![]() |
excellent !!! |
![]() ![]() |
How can i change the source file? |
![]() ![]() |
Ok, i change it.
|
![]() ![]() |
Actually I found out it works also on s8.it (ver. 3.5) if I switch Travian3 Beyond off. |
![]() ![]() |
Wow... That's true...
|
![]() ![]() |
No, in my case - with T3B off - it works also for buildings.
|
![]() ![]() |
Ok, works for fields and for buildings.
|
![]() ![]() |
You can find the rough description here:
|
![]() ![]() |
@ 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 |
![]() ![]() |
Thanks again Pimp Trizkit!
|
![]() ![]() |
Oh~ my gosh!! You're a genius !! Thank you!!! ^-^/ |
![]() ![]() |
Correction - my fix did break the ability to queue buildings that dont exist yet... looking into it. Pimp Trizkit |
![]() ![]() |
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 |
![]() ![]() |
Great, looking forward to get Your fix! ;)
|
![]() ![]() |
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 |
![]() ![]() |
You are ace! ;)
|


