Forum Tribalwars.co.uk
 

Go Back   Forum Tribalwars.co.uk > Community > Scripts & independent tools

Scripts & independent tools Only approved scripts are allowed. Please read the instructions for getting your script approved.

Reply
 
Thread Tools Search this Thread Display Modes
Tomcenc
 
Tomcenc's Avatar
 
Join Date: June 9, 2009
Tomcenc is an unknown quantity at this point
  Old #1   16.06.2009, 17:28   Top Reply With Quote

This script allows you to quickly calculate Travel Times. It'll automatically select the correct world, fill in your selected village's coordinates as start and if you are viewing a village fill in that village's coordinates as destination.


Spoiler Spoiler:
Code:
javascript: var url='http://www.tribalwarsmap.co.uk/traveltimes'; if (location.hostname.split('.')[1]=='tribalwars') {url+='?world=';var world = location.hostname.split('.')[0]; if (world=='classic') {url+='c1';} else {url+=world.substring(2);}; var query=''; if (window.main) {query = window.main.location.search.substring(1).split('&');} else {query = window.location.search.substring(1).split('&');}; var village=false; var dest=false; for(i=0;i<query.length;i++) {query[i]=query[i].split('='); if (query[i][0]=='village') {url+='&start='+query[i][1];} else if (query[i][0]=='screen'&&query[i][1]=='info_village') {village=true;} else if (query[i][0]=='id') {dest='&destination='+query[i][1];}}; if (village&&dest) {url+=dest;}}if (window.main) {window.main.location=url;} else {window.location=url;};
Use this code if you want it to open a new window:
Spoiler Spoiler:
Code:
javascript: var url='http://www.tribalwarsmap.co.uk/traveltimes'; if (location.hostname.split('.')[1]=='tribalwars') {url+='?world=';var world = location.hostname.split('.')[0]; if (world=='classic') {url+='c1';} else {url+=world.substring(2);}; var query=''; if (window.main) {query = window.main.location.search.substring(1).split('&');} else {query = window.location.search.substring(1).split('&');}; var village=false; var dest=false; for(i=0;i<query.length;i++) {query[i]=query[i].split('='); if (query[i][0]=='village') {url+='&start='+query[i][1];} else if (query[i][0]=='screen'&&query[i][1]=='info_village') {village=true;} else if (query[i][0]=='id') {dest='&destination='+query[i][1];}}; if (village&&dest) {url+=dest;}}void window.open(url);
If you prefer to use one "X|Y" box instead of separate "X" "Y" boxes you can use this code instead of the above:
Spoiler Spoiler:
Code:
javascript: var url='http://www.tribalwarsmap.co.uk/traveltimes2'; if (location.hostname.split('.')[1]=='tribalwars') {url+='?world=';var world = location.hostname.split('.')[0]; if (world=='classic') {url+='c1';} else {url+=world.substring(2);}; var query=''; if (window.main) {query = window.main.location.search.substring(1).split('&');} else {query = window.location.search.substring(1).split('&');}; var village=false; var dest=false; for(i=0;i<query.length;i++) {query[i]=query[i].split('='); if (query[i][0]=='village') {url+='&start='+query[i][1];} else if (query[i][0]=='screen'&&query[i][1]=='info_village') {village=true;} else if (query[i][0]=='id') {dest='&destination='+query[i][1];}}; if (village&&dest) {url+=dest;}}if (window.main) {window.main.location=url;} else {window.location=url;};
Use this code if you want it to open a new window:
Spoiler Spoiler:
Code:
javascript: var url='http://www.tribalwarsmap.co.uk/traveltimes2'; if (location.hostname.split('.')[1]=='tribalwars') {url+='?world=';var world = location.hostname.split('.')[0]; if (world=='classic') {url+='c1';} else {url+=world.substring(2);}; var query=''; if (window.main) {query = window.main.location.search.substring(1).split('&');} else {query = window.location.search.substring(1).split('&');}; var village=false; var dest=false; for(i=0;i<query.length;i++) {query[i]=query[i].split('='); if (query[i][0]=='village') {url+='&start='+query[i][1];} else if (query[i][0]=='screen'&&query[i][1]=='info_village') {village=true;} else if (query[i][0]=='id') {dest='&destination='+query[i][1];}}; if (village&&dest) {url+=dest;}}void window.open(url);
__________________
Tribal Wars Map - helps you greatly speed up your daily routine. Perfect for speeding up your farming, exploring your surrounding area and much more.

Last edited by Almost Easy; 14.04.2010 at 21:58.
Tomcenc is offline  
Einstein
 
Einstein's Avatar
 
Join Date: June 4, 2009
Location: Watching Jess's webcam
Einstein is an unknown quantity at this point
  Old #2   17.06.2009, 04:19   Top Reply With Quote
This is good if you are looking to farm within certain time limits, thanks Tom.
__________________
Opening PS for the first time since October.
Einstein is offline  
SlowTarget
 
Join Date: June 5, 2009
SlowTarget is an unknown quantity at this point
  Old #3   17.06.2009, 09:14   Top Reply With Quote
Isnt this superceded by the travel times popup on the map you get with premium?

If a non premium player were to use this, would they be using a script to replicate a premium feature?

Edit: OK - premium map popup only works for your current village - this useful tool will give you timings for any village pair.

Last edited by SlowTarget; 17.06.2009 at 11:34.
SlowTarget is offline  
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +1. The time now is 17:15.
Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.