TribalWars Forum
 
Go Back   TribalWars Forum > Community Section > Scripts & Independent Tools and Links
Scripts & Independent Tools and Links In this Section we offer forum space for a few external, independent websites. They are TW related and all players are allowed to use the tools offered. The forums are not moderated by game staff but by the owners of those pages. more.

Closed Thread
 
Thread Tools Search this Thread
servy
Administrator
 
servy's Avatar
 
Join Date: 2007,March 7th
Old #1   2008,September 29th, 23:57   Top
Before you do anything you should first check the approved script list to make sure the script you are interested in has not already been approved.

In order to get a script approved you need to send in a support ticket under the 'Miscellaneous' category.

The ticket must include the following information for it to be reviewed:
  • The actual code of the script.
  • A description of what the script actually does in plain English.
  • What browser(s) will the script work on or not work on. [You may skip this step if there are no restrictions.]
  • Which worlds, or which types of worlds, will the script work on (archer, non-archer, coin, packet, etc.). [You may skip this step if there are no restrictions.]
  • Any other important information or instructions that would need to be posted along with the script.

After you have submitted your ticket it will be reviewed by the TW team. Requests that do not include the required information will not be reviewed. If the script is deemed legal it will be added to the approved script list.

Last edited by servy : 2009,August 4th at 00:22.
servy is offline  
servy
Administrator
 
servy's Avatar
 
Join Date: 2007,March 7th
Old #2   2008,September 30th, 00:05   Top
Example ticket:

Code:
javascript:var%20doc=document;if(window.frames.len gth>0)doc=window.main.document;url=doc.URL;link='h ttp://twstats.com/'+getWorld(url)+'/index.php?page=map&centrex=500&centrey=500';link+= '&zoom=100&grid=1&nocache=1&fill=000000';function% 20getID(url){var%20start=url.indexOf("id=")+3;var% 20end=url.indexOf('%26',start);var%20id;if(end>0)i d=url.substring(start,end);else{id=url.substring(s tart);}return%20id;}function%20getWorld(url){start =url.indexOf("en");return%20url.substring(start,ur l.indexOf('.',start));}if(url.indexOf('screen=rank ing')==-1){alert('This%20script%20needs%20to%20be%20called %20from%20one%20of%20the%20rankings%20pages');}els e{table="";ths=doc.getElementsByTagName('th');for( i=0;i<ths.length&&table=="";i++){if(ths[i].innerHTML=='Rank'){table=ths[i].parentNode.parentNode;}}type='';if(url.indexOf('m ode=player')!=-1||url.indexOf('mode=con_player')!=-1||url.indexOf('mode=kill_player')!=-1||url.indexOf('mode=')==-1)type='player';else%20if(url.indexOf('mode=ally') !=-1||url.indexOf('mode=con_ally')!=-1||url.indexOf('mode=kill_ally')!=-1)type='tribe';rows=table.rows;for(i=1;i<11;i++){t Link=rows[i].cells[1].childNodes[0].href;link+='&'+type+'_'+(i-1)+'_id='+getID(tLink);}link+='&'+type+'_0_colour= 00FF00';link+='&'+type+'_1_colour=00FFFF';link+='& '+type+'_2_colour=FFFFFF';link+='&'+type+'_3_colou r=FFFF00';link+='&'+type+'_4_colour=FF8040';link+= '&'+type+'_5_colour=FF0080';link+='&'+type+'_6_col our=C0C0C0';link+='&'+type+'_7_colour=FF0000';link +='&'+type+'_8_colour=808080';link+='&'+type+'_9_c olour=FF00FF';window.open(link);}end();


Description:
This script, when called on any of the rankings, such as the player, tribe, or OD pages will open up a new window with a twstats map with the top 10 players/tribes on that page marked.

The script works in all browsers and on all worlds on the .net server.

Additional information:
The text link+='&zoom=100&grid=1&nocache=1&fill=000000'; can be edited to change the settings of the opened map.
servy is offline  
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 02:55.
Powered by vBulletin Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd. Copyright ©2003 - 2009, InnoGames GmbH