Extra caution is recommended when installing recently uploaded/updated scripts (read more)
Be sure you trust any scripts you install

Travian MarketPlace helper

This is a travian Market place helper. It will generate a drop down control in the market of travian and let user choose from the cities to whom he frequently sends resources... for example among his own cities. Please note that the user need to edit the code to add the list of cities in question.






May 29, 2007
Guy Fraser Scriptwright

Ok, I got carried away and made a completely new script which automatically populates the list of villages:

http://userscripts.org/scripts/show/9544

 
May 29, 2007
Guy Fraser Scriptwright

Hopefully this won't get mangled, but here is a new version of the function which just seems cleaner:

(function() {

// define cities (make sure there is no comma after the last "}" otherwise it will chimp)
var cities = [
{name:'village name',x:150,y:-150},
{name:'village name',x:149,y:-150},
{name:'village name',x:150,y:-153}
];

// get node to attach the select list to
var node = document.getElementsByName('y')[0];

// build the select list
var sel = "<select>";
var i = cities.length;
while (-1<--i>
//alert(cities[i].name);
sel += "<option>"+cities[i].name+" ";
}
sel += "</select>";

// add the select box to the node
node.parentNode.parentNode.innerHTML += sel;
})();

You could comment on this script if you were logged in.