//---- Evony Hookups ----//
//---- Version 1 - Hero Finder Script for NEAT Bot - by Sericom ----//
//------------------------Hero Finder------------------------//
//This will find the number of heroes with base that you
//specify. Make sure any current heroes in the city are
//not marching or will be sent out while script is running,
//or there's a slim chance that they could be fired.
//You tell it how many of each type of hero you want it to
//find, not the total amount you want to end up with (It's
//currently set to get you 4 more attack heroes and 1 pol hero).
//Script will reset your goals when ran, and will load goals
//in position 0 when finished.
//Be careful if you plan to fill the feasting hall and you have
//a travelling training hero, the bot may fire one of your heroes.
//-----------------------------------------------------------//
MIN_BASE = 65
ATTACK_HEROES = 4
INTEL_HEROES = 0
POL_HEROES = 1
//---------------nothing to alter below here-----------------//
resetgoals
config nomayor:1
startHeroCount = city.heroes.length
currHeroCount = startHeroCount
if startHeroCount = 0 goto getNext
currentNames = []
tempNames = [ "aa", "bb", "cc", "dd", "ee", "ff", "gg", "hh", "ii" ]
i = 0
label renameNext
currentNames = currentNames.concat(city.heroes[i].name)
execute "renamehero " + currentNames[i] + " " + tempNames[i]
i = i + 1
if i < startHeroCount goto renameNext
label getNext
if city.innHeroes.length < 1 goto getNext
getspamhero
setfocus
label retry
if city.heroes.length = currHeroCount goto retry
if ((city.heroes[currHeroCount].base >= MIN_BASE ) * (ATTACK_HEROES > 0) * (city.heroes[currHeroCount].typeName="Att")) + ((city.heroes[currHeroCount].base >= MIN_BASE) * (POL_HEROES > 0) * (city.heroes[currHeroCount].typeName="Pol")) + ((city.heroes[currHeroCount].base >= MIN_BASE) * (INTEL_HEROES > 0) * (city.heroes[currHeroCount].typeName="Int")) goto gotOne
execute "firehero " + city.heroes[currHeroCount].name
label retry2
if city.heroes.length = currHeroCount goto getNext
goto retry2
label gotOne
if (city.heroes[currHeroCount].typeName="Att") ATTACK_HEROES = ATTACK_HEROES - 1
if (city.heroes[currHeroCount].typeName="Int") INTEL_HEROES = INTEL_HEROES - 1
if (city.heroes[currHeroCount].typeName="Pol") POL_HEROES = POL_HEROES - 1
currHeroCount = currHeroCount + 1
if (ATTACK_HEROES = 0) * (INTEL_HEROES = 0) * (POL_HEROES = 0) goto setOriginalHeroNames
goto getNext
label setOriginalHeroNames
if startHeroCount = 0 goto allDone
j = 0
label renameNext2
execute "renamehero " + tempNames[j] + " " + currentNames[j]
j = j + 1
if j < startHeroCount goto renameNext2
label allDone
echo "All Done"
config nomayor:0
loadgoals 0
//
//---- www.EvonyHookups.info ----//