DeletedUser
Guest
This can be used at the Rally Point or the Village Info screen. It will select a Troop Template to use.
How to configure:
With a value of 2, the second Template listed will be chosen. With a value of 3, the third Template listed will be chosen. Etc.
Notes:
*You can name your templates whatever you'd like. This script selects a template based on its position in the list.
*Templates are listed alphabetically. If you create a new template you may need to adjust the script.
Code:
javascript:
var item=2;
if(game_data.screen == 'place')
{
var templates = document.forms[0].getElementsByTagName('option');
templates[item].selected = 'selected';
TroopTemplates.useTemplate($(".evt-select-template"));
}
else
{
var templates = document.forms[0].template.children;
document.forms[0].template.value = templates[item].value;
}
void 0;
How to configure:
Code:
var item = 2;

With a value of 2, the second Template listed will be chosen. With a value of 3, the third Template listed will be chosen. Etc.
Notes:
*You can name your templates whatever you'd like. This script selects a template based on its position in the list.
*Templates are listed alphabetically. If you create a new template you may need to adjust the script.
Last edited by a moderator: