Tribal Wars, Tribal Wars Guide, Tribal Wars Guides, Tribal Wars Strategy,TW, Guides, Troops
Tribal_Wars_Wikipedia

The Basics of Scripts

A script is a button you add to your quickbar.
Many scripts generally do not work in Internet Explorer (IE).
Either Opera, Firefox, or Google Chrome are the preferred browsers of choice for TW.

First things first, once you have premium, make sure your quickbar and dynamic menu are enabled. At the top of the screen on your menu, Settings --> Settings -->

Check both these items
Quick bar: []Show quick bar
Dynamic menu bar: []Show dynamic menu bar
There are two 'OK' buttons, make sure you click the top 'OK' button to apply these settings.

Now you have a quickbar, you need to be comfortable editing the quickbar.

To add a new item to the quickbar.
Top menu, hover over Settings, then click Edit Quick bar.
On the quickbar settings page, Click 'Add new Link'
This takes you to the page to create a new Link / Script.

Entry name: is what you want the item called.
Image-URL: is optional. Lets you add a picture.
Target-URL: This is where you paste the script, or url.

The code / script for the Target-URL field will often be presented like such.

javascript:coords='411|548 409|543 407|548 408|575 397|553 409|547 417|553 414|552 412|547 407|549 411|546 417|554 411|543';var%20doc=document;if(window.frames.length>0)doc=window.main.document;url=document.URL;if(url.indexOf('screen=place')==-1)alert('This%20script%20needs%20to%20be%20run%20from%20the%20rally%20point');coords=coords.split("%20");index=Math.round(Math.random()*(coords.length-1));coords=coords[index];coords=coords.split("|");doc.forms[0].x.value=coords[0];doc.forms[0].y.value=coords[1];insertUnit(doc.forms[0].ram,%201);insertUnit(doc.forms[0].spy,%201);end();

The above is a 'fake' script.
You copy then paste the above into the Target-URL field when creating a new quickbar item.

The use of each script is different, the above for example you click when you are at the rally point. It will put 1 scout, 1 ram and co-ordinates ready so all that is required is for you to hit attack.

This is the basics of scripts.