Travian QP Targets 3.9.0

By QP Last update Sep 28, 2008 — Installed 314,362 times.

Archived Comments (locked)

in
Subscribe to Archived Comments 407 posts, 98 voices



Melhior User

@QP

hi man )
first of all, thank you for your work. this script is really great and very useful.

and I have a suggestion... I think, it's possible to make script differ my villages and all other villages, because it's realazed in travian3 beyond. actually I don't need to scout or attack my own villages... I need only send there resources or reinforcements - and travian3 beyond lets do it. attack and scout buttons in my villages list only make a mess and are totally useless.
can you make script add this buttons only for not your own villages? like in travian3 beyond - send troops and resources buttons for your villages in list, attack button for all other villages.
it would be very nice.
thank you again )

 
Melhior User

@ Vendettas
heve you read the to do list in a script description?

 
Vendettas User

QP:

As you've already got a 'delete all trade' function, is there anyway you could implement a 'delete all reinforcement' function? Especially with WWs out and roaring, reinforcement movements are annoying and plentiful.

 
syntax53 User

Marketplace fix works, thanks.

Some additional configuration options--

I prefer to remove the title prefix all together...

/** transformGenericPage_fixTitle */
function transformGenericPage_fixTitle() {
	if ((DEF_CONFIG_TITLEFIX != 1) && (DEF_CONFIG_TITLEFIX != 2) && (DEF_CONFIG_TITLEFIX != 3)) { return; }
	var titleInPage = xpathEvaluate('//h1');
	if (titleInPage.snapshotLength == 0) { return; }	// just in case a page has no title
	var titleInPageStr = titleInPage.snapshotItem(0).textContent;
	if (document.location.pathname.indexOf('/dorf2.php') == 0) {
		titleInPageStr = String.fromCharCode(164, 32) + titleInPageStr;
	}
	var dTitle = document.title;
	if (DEF_CONFIG_TITLEFIX == 2) {
		var spacePos = dTitle.indexOf(" ");
		dTitle = dTitle.substr(0, 1) + dTitle.substr(spacePos);
	}
	if (DEF_CONFIG_TITLEFIX == 3) {
		document.title = titleInPageStr;
	} else {
		document.title = dTitle + " - " + titleInPageStr;
	}
}

Alter comment at the end..

// ##########   Title Fix - 1 = appends title of current page; 2 = additionally shortens 1st word of real title to 1st letter (eg.: "Travian" -> "T"); 3 = remove "Travian Com" all together ##########

-----------

I was adding code for another configuration option and found a bug with the field color coding... it doesn't seem to be matching up the link map to the colored circles. the place you click ends up being a little left and up from where the field number is. on my 15 cropper some level 14 fields were red and some were still white as well. and then on the only village that i currently don't have maxed fields, it doesn't show any colors at all.

anyway, ultimately I think the feature looks much nicer when you don't show any number for buildings when it is maxed. I added the following:

// ##########   Color Coding :: 0=All Off, 1=All On, 2=On except for maxed buildings/fields
var CONFIG_COLOR_CODING = 2;

... and then in the transformPageDorf2_addBuildingLevels function add this at the beginning:

if (CONFIG_COLOR_CODING == 0) { return; }

and then around where "DIV.style.backgroundColor = DEF_COLOR_RESOURCE_MAXLEVEL;" is, change it to this:

if (CONFIG_COLOR_CODING == 2) { 				DIV.style.visibility = "hidden"; 
} else {							DIV.style.visibility = "visible";			DIV.style.backgroundColor = DEF_COLOR_RESOURCE_MAXLEVEL;
}

... once the issues are fixed with Dorf1, the same type of options should be added there.

-----------

lastly, option to disable delayed troop sending functions (i use attack builder grease monkey script which supports "village hopping")

// ##########   Disable delayed troop sending features
var CONFIG_DISABLE_TROOP_DELAY = true;

add to beginning of "transformPageSendTroopsConfirm_addTimeOffArrivalSync" function--

if (CONFIG_DISABLE_TROOP_DELAY == true) { return; }

I hope this all makes sense =P

-syn

 
QP Script's Author

@syntax53: I guess I didn't read your first explanation well :P
Short story, nice debugging of yours and here should already be fixed... please comment on this since I didn't test with plus.

@Mijo: Thanks :)
As for your question, I can't say really for sure cause I didn't try that hard to check for it, but I think I read in a couple of searches I did a few months ago that the "c" param was some kind of hash. If this is true, unless you known which one it is, you're out of luck (except for keeping it).
Suggestions:
If you really need it:
1 - google it;
2 - if you feel lucky, try some hashes algorithms to see if they match;
3 - store the value;
But also consider that for any given map position, you can use both these links:
http://s_.travian._/karte.php?d=<zcoord>&c=0e
http://s_.travian._/karte.php?z=<zcoord>
Of course the 1st one is inside the town and the second is still in the map view, but maybe it can be good enough.
For instance, I used this last link type for the message links feature.

Nice gaming to all.</zcoord></zcoord>

 
Mijo User

Ehh... :D
"< a >" without spaces generates a link tag... :D
So my mail: kkvd_freemail.hu change the "_" ;)
Thanks!
Bye: Mijo

 
Mijo User

Hi QP!

Your scripts are really good!
I have a question about the syntax of the karte.php links:

http://s_.travian._/karte.php?d=:nuber:&c=:hex:

I found that the "d" parameter is the koordinates packed together, I found the equations which convert (x|y) <=> z and vice versa. But that mysterious "c" parameter...
Do you know the meaning of it? It's a hexadecimal constant (00-FF), that required to make the link working. Is it posible to calculate it from somewhere or I have to save it somewhere for later use?
Here's my mail address: kkvdfreemail.hu ;)
Thank you for the answer!
Bye: Mijo

 
syntax53 User

i know i'm right because removing the direct link makes the hero's mansion start working. if you use the plus feature you can duplicate it yourself by creating a direct link with any any name "http://s5.travian.com/build.php?id=29&t=3" for the URL. then visit the hero's mansion page. i already have 2 sitters and i can't free up a slot.

 
QP Script's Author

@syntax53: Taking into account the way the scripts work, that doesn't make much sense. The reason is that the script starts again on each page that is loaded, so if the script "thinks" that it is now on a page of this kind, the next page has no relation to this one. Again, I registred the user _QP_ in that server if you want me to check that out just IGM me there (i'll check it a couple more times, then I'll drop it).

 
syntax53 User

RE: My Hero's Mansion not working.

I figured out what was causing the problem. I looked at the code for how you were detecting the marketplace and I saw this--

var linksMyProfilePage = xpathEvaluate('//a[contains(@href, "&t=")]');

... so i went looking at me hero's mansion page where it might be seeing that. then i realized why-- i place my marketplace in the same plot in all of my villages. that enabled me to make a "Direct Links" to the NPC trader using the plus feature. so one of my "Direct Links" is "http://s5.travian.com/build.php?id=29&t=3". Your script is seeing that and I assume thinking all of my pages are the marketplace then.

 
QP Script's Author

@[TAJM]Kobra:
1 - read carefully: I said comment it out IN main(), this means INSIDE (comment out the line that makes the call to the function that does that);
2 and 3 - you are not providing any info, I am not able to guess;
4 - "resource conflict with my other script", again you provide no info: "what conflict?", "what page?", "what situation?", "doing what?", "are you using last version of both my scripts?", "are you using no other scripts?" (in other words are you sure my scripts have conflicts with each other because they don't have them on my computer)
5 - "good idea" - thanks
6 - I don't understand what you mean.

Come on, if you need help reading and writing please get help because until now most your comments either give me no real info or are confusing, so they are simply lost time to both of us. Use full sentences to explain what is happening in each case and be sure to also script problems chapter above.

Nice gaming to all.

 
[TAJM]Kobra User

coords to link very god idea!
some tips pop-up icon for send resource and troops

 
[TAJM]Kobra User

@QP
I need comment it out main() function? Funny boy!:D

well,
2, and 3, problem: only original function work it

And one more, send resource conflict your other script:(

 
QP Script's Author

@[TAJM]Kobra:
1 - inner city levels - just comment it out in "main()" function - no problem in preferring other scripts :)
2 - delayed troop send - are you sure? what is happening? what about any descriptions? I added a bug report section above... please follow indications
3 - hero status - I see no problem and you provide no description of what is happening, so I have no idea. Moreover nothing was changed regarding that in this release.

 
[TAJM]Kobra User

Hero status don't work at quick fix version

 
[TAJM]Kobra User

Hello again,
hu servers don't work troop send to time.
I'll like turn of "Dorf2 - Inner City Building Levels color code" function, sorry but Travian: Village Center Numbers 3 is better - over up function:D

 
QP Script's Author

@chunkyyluvr53: Are you sure about this? do you know what this feature is really supposed to do? because what you're saying makes no sense for several reasons... this table shows the total troops made in this town even if they are reinforcing / en route to some other place.

@[TAJM]Kobra:
1 - Title fix: sorry I had this commented out and the config var was in the middle of the script. It is per default activated and the configuration is near the others at the end of the script.
2 - this script does not fade other script features... I have no idea why you mention this...
3 - as Melhior mentioned configs are at the very end of the script

@Melhior: Thanks for helping :)

Just uploaded a quick fix so that the TitleFix feature works and added links in the "instructions for newbies" area.

Nice gaming to all.

 
Melhior User

@[TAJM]Kobra
all the configurable vars are in the end of script
disable/enable resources counter option also is there.

 
[TAJM]Kobra User

Title fix - put page header on title (on tab)
don't work:(
Current village resources overflow/deplete timers
don't fade the Beyond or Resource script's timers

where are need configurable the Quick Target Features?

 
chunkyyluvr53 User

i found a bug... i am a Teuton and my village is reinforced with some phalanxes in the rally point page where it shows my total troops at the top of the page it adds up the number of clubswingers and phalanxes and says they are all clubswingers.

 
QP Script's Author

Btw, just so that you find it easily - configurations are at the end of the script.

 
QP Script's Author

Ok, just posted a new version...

Adds enabling/disabling of some features and increases script interoperability.

Also added Treasury Village Coords so that you can easily see where you'd need to target.

Nice gaming to all.

 
QP Script's Author

@syntax53:
1 - HM - for some reason the error console says the script thinks you're in the MarketPlace Send Resources page... and then there is an error, so I have no clue other then to ask you to sit your account... I've created an account on that server with the name _QP_, contact me there (I may take a couple of days to answer since I'm not playing on that server and have little time lately).
2 - That is a known "problem/feature", when it starts you need to let it finish, otherwise it won't turn itself off. The easiest way to turn it off again is to:
- disable GM;
- go to the reports page;
- enable GM;
- click the trade reports link;
This will make the script finish its task of trade deletion.
I'll try to cook something up so that this is better in the future.

@Sam Angus: The resource timer is now configurable (variable at the end of the script). The village center numbers change is not (yet?) configurable just comment out the line that has this:
transformPageDorf2_addBuildingLevels();
It is around line 800.

@Diego21: Yeah, I moved that to the "possible" ones so it should/will take a while, but I think I saw a script around that was supposed to do only that - didn't try it though.

@Paitor: I bet you're using FireFox 3 beta 4 - this seems to be a problem with that browser. Most probably FF3 final version will fix that along with whatever else they messed up in the HTML of other pages (some tables show 2 lines without separation, ...).

 
syntax53 User

sorry for the multi-posting, but referring again to the auto-deleting of messages i figured out what is causing it because i did it again. it's if you click "delete trade" and then click out of the reports section before it has finished. when you return to the reports it starts deleting all of your reports.

 
Paitor User

Hi, the rings is all on wrong place like in this image. Why?

http://img522.imageshack.us/img522/6849/travian...