<?xml version="1.0" encoding="utf-8"?>
<s1 title="ScriptHero"><p>The script commands in this section pertain to your heroes and managing them. </p>
<p>
</p>
<ol><li><jump href="/wiki/ChangeHeroName?highlight=%28%5CbScriptHero%5Cb%29">ChangeHeroName</jump></li>
<li><jump href="/wiki/FindHero?highlight=%28%5CbScriptHero%5Cb%29">FindHero</jump></li>
<li><jump href="/wiki/FireHero?highlight=%28%5CbScriptHero%5Cb%29">FireHero</jump></li>
<li><jump href="/wiki/GetSpamHero?highlight=%28%5CbScriptHero%5Cb%29">GetSpamHero</jump></li>
<li><jump href="/wiki/HeroRoute?highlight=%28%5CbScriptHero%5Cb%29">HeroRoute</jump></li>
<li><jump href="/wiki/ListAllHeroes?highlight=%28%5CbScriptHero%5Cb%29">ListAllHeroes</jump></li>
<li><jump href="/wiki/PersuadeHero?highlight=%28%5CbScriptHero%5Cb%29">PersuadeHero</jump></li>
<li><jump href="/wiki/ReleaseHero?highlight=%28%5CbScriptHero%5Cb%29">ReleaseHero</jump></li>
<li><jump href="/wiki/RenameHero?highlight=%28%5CbScriptHero%5Cb%29">RenameHero</jump></li>
<li><jump href="/wiki/RewardHeroes?highlight=%28%5CbScriptHero%5Cb%29">RewardHeroes</jump></li>
<li><jump href="/wiki/SetMayor?highlight=%28%5CbScriptHero%5Cb%29">SetMayor</jump></li>
<li><jump href="/wiki/SetMayorByName?highlight=%28%5CbScriptHero%5Cb%29">SetMayorByName</jump></li>
<li><jump href="/wiki/UpLevelHeroes?highlight=%28%5CbScriptHero%5Cb%29">UpLevelHeroes</jump></li>
<li><jump href="/wiki/UseHeroItem?highlight=%28%5CbScriptHero%5Cb%29">UseHeroItem</jump></li>
<li><jump href="/wiki/WaitHero?highlight=%28%5CbScriptHero%5Cb%29">WaitHero</jump></li>
<li><jump href="/wiki/WaitHeroLost?highlight=%28%5CbScriptHero%5Cb%29">WaitHeroLost</jump></li>
<li><jump href="/wiki/WaterHero?highlight=%28%5CbScriptHero%5Cb%29">WaterHero</jump></li>
</ol>

<p> </p>
<p><s2 title="ChangeHeroName">
<table><strong class="highlight"><![CDATA[]]></strong><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Usage: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>changeheroname oldName newName </p>
</td></tr><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Example: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>changeheroname ken henry </p>
</td></tr></table><p>Used to rename a hero. </p>
 </s2>
<s2 title="FindHero">
<table><strong class="highlight"><![CDATA[]]></strong><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Usage: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>findhero stat </p>
</td></tr><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Example: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>findhero atk </p>
</td></tr><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Arguments: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>power or atk<br/>
management or pol<br/>
stratagem or int </p>
</td></tr></table><p>This command will recruit the best hero of the type specified that is available in the inn at the time. </p>
 </s2>
<s2 title="FireHero">
<table><strong class="highlight"><![CDATA[]]></strong><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Usage: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>firehero hero_string </p>
</td></tr><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Example 1: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>firehero Ken </p>
</td></tr><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Example 2: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>firehero any:level&lt;50 </p>
</td></tr></table><p>Used to fire a hero specifically by name from the feasting hall. The hero&apos;s status must be either idle, mayor, or captured, i.e., is not on a mission away from town. </p>
<p>In Example 1 the hero &quot;Ken&quot; Will be fired if it is in the town. </p>
<p>In Example 2 all heroes under the level of 50 will be fired. </p>
 </s2>
<s2 title="GetSpamHero">
<table><strong class="highlight"><![CDATA[]]></strong><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Usage: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>getspamhero [optional type of hero] </p>
</td></tr><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Example: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>getspamhero </p>
</td></tr><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Options: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>power or atk<br/>
management or pol<br/>
stratagem or int </p>
</td></tr></table><p>Used to get the best hero currently available in the inn. Optionally you can provide the type of hero you want to get the best for either attack, politics, or intelligence, as specified. </p>
 </s2>
<s2 title="HeroRoute">
<table><strong class="highlight"><![CDATA[]]></strong><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Usage: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>heroroute </p>
</td></tr><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Example: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>heroroute </p>
</td></tr></table><p>This command is used to display the movement route for the <jump href="/wiki/TrainingHero">TrainingHero</jump>. The output will display each city you own, and the next destination from that city. </p>
 </s2>
<s2 title="ListAllHeroes">
<table><strong class="highlight"><![CDATA[]]></strong><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Usage:</p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>ListAllHeroes</p>
</td></tr><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Example:</p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>ListAllHeroes</p>
</td></tr></table><p>Displays a list of all heroes, their stats, and their experience totals for every city. </p>
<p><em>Example Output:</em> </p>
<ul><li><p>10:29:24 CityA Queen Lvl:193 [P:254 A:67 I:21] exp:4737560/3724900<br/>
 10:29:24 CityA Farmer1 Lvl:297 [P:27 A:363 I:21] exp:10180331/8820900<br/>
 10:29:24 CityA Farmer2 Lvl:272 [P:40 A:347 I:29] exp:6284228/7398400<br/>
 10:29:24 CityA Farmer3 Lvl:232 [P:25 A:301 I:32] exp:9425996/5382400<br/>
 10:29:24 CityB Queen Lvl:189 [P:246 A:6 I:41] exp:6928622/3572100<br/>
 10:29:24 CityB Farmer1 Lvl:321 [P:54 A:389 I:25] exp:7885243/10304100<br/>
 10:29:24 CityB Farmer2 Lvl:285 [P:47 A:354 I:18] exp:12535167/8122500<br/>
 10:29:24 CityB Farmer4 Lvl:254 [P:26 A:323 I:47] exp:8160739/6451600<br/>
 10:29:24 CityC Queen Lvl:210 [P:272 A:22 I:46] exp:8125870/4410000<br/>
 10:29:24 CityC BigGuy Lvl:346 [P:21 A:414 I:46] exp:8467980/11971600<br/>
 10:29:24 CityC Farmer1 Lvl:219 [P:14 A:288 I:25] exp:8049178/4796100<br/>
 10:29:24 CityC Farmer2 Lvl:213 [P:26 A:282 I:33] exp:9054832/4536900<br/>
  </p>
</li>
</ul>
 </s2>
<s2 title="PersuadeHero">
<table><strong class="highlight"><![CDATA[]]></strong><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Usage: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>persuadehero hero </p>
</td></tr><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Example: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>persuadehero Ken </p>
</td></tr></table><p>Persuade the captured hero named Ken. The medals required for the persuasion, if any, are shown in the hero tab. </p>
 </s2>
<s2 title="ReleaseHero">
<table><strong class="highlight"><![CDATA[]]></strong><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Usage: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>releasehero heroName or herostring </p>
</td></tr><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Example: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>releasehero Bob<br/>
releasehero any:level&lt;100 </p>
</td></tr></table><p>Used to dismiss a captive hero from the feasting hall. This script command is compatible with hero strings.  </p>
<p>For more information about what hero strings can be used with this command, check out <jump href="/wiki/HeroString">HeroString</jump>. </p>
 </s2>
<s2 title="RenameHero">
<table><strong class="highlight"><![CDATA[]]></strong><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Usage: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>renamehero oldName newName </p>
</td></tr><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Example: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>renamehero ken henry </p>
</td></tr></table><p>Used to rename a hero. This script is identical to <jump href="/wiki/ChangeHeroName">ChangeHeroName</jump>. </p>
 </s2>
<s2 title="RewardHeroes">
<table><strong class="highlight"><![CDATA[]]></strong><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Usage: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>rewardheroes </p>
</td></tr><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Example: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>rewardheroes </p>
</td></tr></table><p>Finds and rewards all heroes with loyalty below 100, using gold. </p>
 </s2>
<s2 title="SetMayor">
<table><strong class="highlight"><![CDATA[]]></strong><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Usage: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>setmayor attribute </p>
</td></tr><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Example: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>setmayor pol </p>
</td></tr></table><p>Valid Arguments: </p>
<ul><li><source><![CDATA[att or atk or attack
pol or politics
int or intel or intelligence
none or remove]]></source></li>
</ul>
<p>This command will change your current mayor for one of the specified attributes or will demote the mayor completely. It automatically selects the highest level of the attribute that you specify. This is very useful when creating, upgrading and demolishing buildings via script, as you can specify the highest level politic hero you have to go into office. Capturing a npc10 and only have a level 9 Feasting hall in one city? You can remove the mayor with this command to make sure he marches with the rest of the troops. </p>
<p><strong>examples:</strong> </p>
<ul><li><source><![CDATA[// appoints highest politic hero to mayor
setmayor pol

// appoints highest attack hero to mayor
setmayor att

// appoints highest intel hero to mayor
setmayor int

// demotes current mayor
setmayor remove
setmayor none]]></source></li>
</ul>
 </s2>
<s2 title="SetMayorByName">
<table><strong class="highlight"><![CDATA[]]></strong><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Usage: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>setMayorbyname HeroName </p>
</td></tr><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Example: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>setMayorbyname Henry </p>
</td></tr></table><p>This command will allow you to specify the Mayor you wish to assign by hero name. </p>
 </s2>
<s2 title="UpLevelHeroes">
<table><strong class="highlight"><![CDATA[]]></strong><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Usage: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>uplevelheroes </p>
</td></tr><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Example: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>uplevelheroes </p>
</td></tr></table><p>Upgrades all heroes in current city (unless named in the <em><jump href="/wiki/NoLevelHeroes">NoLevelHeroes</jump></em> goal). Each hero is upgraded only one level and its best attribute is increased. Config hero must be set to 1 or higher for this script to function. </p>
 </s2>
<s2 title="UseHeroItem">
<table><strong class="highlight"><![CDATA[]]></strong><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Usage: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>useheroitem heroname itemname </p>
</td></tr><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Example: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>useheroitem BigGuy on war<br/>
useheroitem BigGuy anabasis<br/>
useheroitem BigGuy nation medal </p>
</td></tr></table><p>Used to apply hero buff items and medals to the specified hero. NOTE: Cannot be applied to a captured hero. </p>
 </s2>
<s2 title="WaitHero">
<table><strong class="highlight"><![CDATA[]]></strong><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Usage: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>waithero hero </p>
</td></tr><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Example: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>waithero ken<br/>
waithero any:attack&gt;=200 </p>
</td></tr></table><p>This command will have the script wait until a specific hero or match for a hero-string is in the city and available. In the 1st example above, the script would wait until a hero named ken was available. In the 2nd example above, the script would wait until any hero with 200 or higher attack is available. </p>
<p>For more information about what hero strings can be used with this command, check out <jump href="/wiki/HeroString">HeroString</jump>. </p>
 </s2>
<s2 title="WaitHeroLost">
<table><strong class="highlight"><![CDATA[]]></strong><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Usage: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>waitherolost hero1,hero2,... </p>
</td></tr><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Example: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>waitherolost ken,henry </p>
</td></tr></table><p>Pause script until one of the heroes specified is captured. </p>
 </s2>
<s2 title="WaterHero">
<table><strong class="highlight"><![CDATA[]]></strong><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Usage: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>waterhero heroName </p>
</td></tr><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Example: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>waterhero BigGuy<br/>
waterhero Smarty /heropoints=&quot;att&quot;</p>
</td></tr></table><p>Used to apply holy water to a hero in the feasting hall. After the hero is watered, points will be reassigned automatically to the highest stat. </p>
<p><strong>The following feature is available starting in NeatBot 3354T</strong> </p>
<p>You can also opt to water a hero into another type of hero, ie - take your politics hero to attack so that it can hit npc10s. The /heropoints switch will allow you to do this. The rules for the /heropoints switch are the same as for the <jump href="/wiki/HeroPoints">HeroPoints</jump> goal. In the above example, you could water your (for instance) intel hero named Smarty and assign all points into attack. Here are some more examples: </p>
<ul><li><source><![CDATA[// reassign all points to attack attribute
waterhero billybob /heropoints="att"

// increase both politics to 300 and intel to 100 (pro-rate if there is not enough points); then add the remaining points to attack attribute
waterhero Robert1 /heropoints="pol:300,int:100 att"

// increase politics to 300; increase intel to 100; add the remaining points to attack attribute
waterhero Robert2 /heropoints="pol:300 int:100 att"]]></source></li>
</ul>
 </p>
<p></p>

<br/>------------------------------------------------------------------------------<br/>
<p> <jump href="/wiki/CategoryCommands">CategoryCommands</jump> </p>
</s2></s1>