<?xml version="1.0" encoding="utf-8"?>
<s1 title="HeroString"><p>Many places in the bot will allow you to specify heroes. The selection or list of heroes to be used will be referred to as the hero-string in various other places in this wiki. </p>
<p></p>

<br/>------------------------------------------------------------------------------<br/>
<p> You may list hero names individually, and/or exclude heroes with &apos;!name&apos;, and/or include all heroes with &apos;any&apos; or even use no hero at all with &apos;none&apos;. For example, </p>
<ul><li><p><strong>valleyheroes Biggy</strong> <em>this would allow only hero Biggy to attack valleys &amp; flats</em> </p>
</li>
<li><p><strong>npcheroes !Smarty,!Biggy,any</strong> <em>this would allow any hero except Smarty and except Biggy to hit npcs</em> </p>
</li>
<li><p><strong>npcheroes 10 Biggy,Polly,Smarty</strong> <em>this would allow heroes Biggy, Polly, and Smarty to hit npc10s</em> </p>
</li>
<li><p><strong>reinforce 123,456 any c:100000</strong> <em>this would allow you to reinforce 123,456 with cav and any available hero</em> </p>
</li>
</ul>
<p></p>

<br/>------------------------------------------------------------------------------<br/>
<p> You may also use advanced filters in hero-strings in the format of hero:filter. The hero name list (or &apos;any&apos;) must be stated first, followed by the filter(s). Any filters listed will apply to the entire line. For example, </p>
<ul><li><p><strong>valleyheroes any:attack&gt;180</strong> <em>this would allow any hero with an attack over 180 to attack valleys &amp; flats</em> </p>
</li>
<li><p><strong>valleyheroes any:politics&lt;200</strong> <em>this would allow any hero with politics under 200 to attack valleys &amp; flats</em> </p>
</li>
<li><p><strong>npcheroes 8 any:politics=best</strong> <em>this would allow the best politics hero to hit npc8s</em> </p>
</li>
<li><p><strong>npcheroes 5 farmer:attack&lt;200</strong> <em>this would allow any hero named Farmer who&apos;s attack is under 200 to attack npc5s</em> </p>
</li>
<li><p><strong>npcheroes 10 any:attack&gt;300,base&gt;60</strong> <em>this would allow any attack hero with both an attack over 300 AND a base over 60 to hit npc10s</em> </p>
</li>
<li><p><strong>attack 111,222 !Biggy,any:attack&gt;180 c:99k,s:1k</strong> <em>this would attack coordinates 111,222 with any hero over 180 attack other than hero Biggy with 99k cavs, 1k scouts</em> </p>
</li>
<li><p><strong>attack 111,222 !Polly,any:attack&lt;100 w:5k</strong> <em>this would attack coordinates 111,222 with any hero under 100 attack other than hero Polly with 5k warriors</em> </p>
</li>
</ul>
<p></p>

<br/>------------------------------------------------------------------------------<br/>
<p> If you wish to apply separate filters to separate heroes, use multiple lines. For example, </p>
<ul><li><p><strong>npcheroes 5 any:base&gt;60</strong> </p>
</li>
<li><p><strong>npcheroes 5 any:attack&lt;300</strong> </p>
</li>
</ul>
<p>The above lines mean that npc5s can be farmed with any hero that has greater than 60 base OR any hero that has less than 300 attack. </p>
<p></p>

<br/>------------------------------------------------------------------------------<br/>
<p> If you wish to include heroes of specific names regardless of whether they meet the conditional filter for that line, put them on separate lines: </p>
<ul><li><p><strong>npcheroes 5 bob,fred,joe</strong> </p>
</li>
<li><p><strong>npcheroes 5 any:attack&gt;=60</strong> </p>
</li>
</ul>
<p>The above lines mean that npc5s can be farmed by any hero named &quot;bob&quot;, &quot;fred&quot;, or &quot;joe&quot;, OR any hero with 60+ base. </p>
<p></p>

<br/>------------------------------------------------------------------------------<br/>
<p> Multiple lines can be concatenated (combined) into a single line with the | symbol. For example, </p>
<ul><li><p><strong>npcheroes 5 bob,fred,joe|any:attack&gt;=60</strong> </p>
</li>
</ul>
<p>The above line means exactly the same thing as the 2 before it. </p>
<ul><li><p><strong>npcheroes 5 bob,any:attack&gt;=60</strong> </p>
</li>
</ul>
<p>If you were to instead use the line above, it would mean npc5s can be farmed with any hero that has both the name bob AND has an attack of 60+. </p>
<ul><li><p><strong>npcheroes 5 any:base&gt;60,attack&lt;300</strong> </p>
</li>
</ul>
<p>With those rules standing, the above line would mean you can farm npc5s with any hero that has both a base higher than 60 AND an attack under 300. </p>
<p></p>

<br/>------------------------------------------------------------------------------<br/>
<p> All possible filters for use in hero-strings are: </p>
<ul><li>attack or att </li>
<li>politics or pol </li>
<li>intel or int </li>
<li>loyalty or loy </li>
<li>level or lvl </li>
<li>experience or exp </li>
<li>points or pts </li>
<li>base or bse </li>
</ul>
<p>All possible comparisons to use in filters are: </p>
<ul><li><p>&lt; (less than) </p>
</li>
<li><p>&gt; (greater than) </p>
</li>
<li>= (equal to) </li>
<li>!= (not equal to) </li>
<li><p>&lt;&gt; (not equal to) </p>
</li>
<li><p>&lt;= (less than or equal to) </p>
</li>
<li><p>&gt;= (greater than or equal to) </p>
</li>
</ul>
<p>&quot;Best&quot; and &quot;Worst&quot; can be used in place of values for comparisons, for example: </p>
<ul><li><p><strong>npcheroes 10 any:attack=best</strong> <em>would allow npc10s to be farmed with the best attack hero.</em> </p>
</li>
<li><p><strong>npcheroes 5 any:attack&lt;best</strong> <em>would allow npc5s to be farmed with any hero lower than the best attack hero.</em> </p>
</li>
</ul>
<p>Stats can be compared to other stats in place of values, for example: </p>
<ul><li><p><strong>npcheroes 5 any:attack&gt;politics</strong> <em>would allow any hero with an attack score greater than its politics score.</em> </p>
</li>
<li><p><strong>npcheroes 5 any:politics&gt;level</strong> <em>would allow any hero with a politics score greater than its level.</em> </p>
</li>
</ul>
<p>Wildcards can be used for the hero list. * will represent 1 or more characters, ? will represent 1 character. For example, </p>
<ul><li><p><strong>npcheroes 5 att*:attack&gt;200</strong> <em>would allow npc5s to be farmed with any hero over 200 attack that has &quot;att&quot; in its name.</em> </p>
</li>
<li><p><strong>npcheroes 5 *:base&gt;60</strong> <em>would allow npc5s to be farmed with any hero that has a base over 60.</em> </p>
</li>
<li><p><strong>npcheroes 5 att??int:base&gt;=69</strong> <em>would allow npc5s to be farmed with any hero named &quot;att69int,&quot; &quot;att70int,&quot; etc. who&apos;s base is 69+.</em> </p>
</li>
</ul>
<p>Hero strings cannot consist of only a single number. This is a safety precaution for people blindly replacing older goals of &quot;herofirelimit 100&quot; with &quot;keepheroes 100&quot; and unexpectedly losing a valuable hero. If you use heroes with pure number names, for example &quot;100&quot; you can still <em>trick</em> the hero string into accepting it, by adding something more than just that single number. </p>
<ul><li><p><strong>npcheroes 8 100,100</strong> This would allow the hero named &quot;100&quot; (or the hero named &quot;100&quot; :P) to farm npc8s. </p>
</li>
</ul>
<p></p>

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