• My Pages
  • Comments
  • Add Link
  • Subscribe
  • Subscribe User
  • Edit (GUI)
  • Edit (Text)
  • Rename Page
  • Copy Page
  • Load Page
  • Save Page
  • Delete Page
  • Attachments
  • Check Spelling
  • Diffs
  • Info
  • Revert to this revision
  • XML
  • Render as Docbook
  • Print View
  • Raw Text
  • Delete Cache
  • Like Pages
  • Local Site Map
  • Remove Spam
  • Package Pages
  • Sync Pages
    • Diff for "HeroFunctions"
    Differences between revisions 1 and 3 (spanning 2 versions)
    Revision 1 as of 2015-02-08 07:34:41
    Size: 18786
    Editor: LKD70
    Comment:
    Revision 3 as of 2015-02-24 10:17:58
    Size: 2875
    Editor: LKD70
    Comment:
    Deletions are marked like this. Additions are marked like this.
    Line 3: Line 3:
    == ChangeHeroName ==
    ||<tablebgcolor="#F9F9F9" tablestyle="margin:1em 1em 1em 0px;border-style:solid;border-color:rgb(170, 170, 170);color:rgb(0, 0, 0);font-family:sans-serif;font-size:13px;line-height:19.5px;text-align:start; " tableclass="wikitable"#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em; ">Usage: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">changeheroname !OldName !NewName ||
    ||<#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em; ">Example: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">renamehero Gary LKD70 ||
    In the above example, the bot will attempt to rename the hero named "Gary" to "LKD70" when it is available.
    See also: [[Heroes]]<<BR>>
    Line 8: Line 5:
    == IsHeroInCastle ==
    ||<tablebgcolor="#F9F9F9" tablestyle="margin:1em 1em 1em 0px;border-style:solid;border-color:rgb(170, 170, 170);color:rgb(0, 0, 0);font-family:sans-serif;font-size:13px;line-height:19.5px;text-align:start; " tableclass="wikitable"#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em; ">Usage: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">m_city.!IsHeroInCastle("!HeroName") ||
    ||<#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em; ">Example: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">m_city.!IsHeroInCastle("LKD70") ||
    If the hero named "LKD70" is in the castle this will return true. A HeroString can also be used instead of the hero name.
    Line 10: Line 11:
    == WaitHero ==
    ||<tablebgcolor="#F9F9F9" tablestyle="margin:1em 1em 1em 0px;border-style:solid;border-color:rgb(170, 170, 170);color:rgb(0, 0, 0);font-family:sans-serif;font-size:13px;line-height:19.5px;text-align:start; " tableclass="wikitable"#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em; ">Usage: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">waithero !HeroName ||
    ||<#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em; ">Example: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">waithero LKD70 ||
    The above example will pause the bot until the hero with the name "LKD70" is made available.

    <<BR>>

    == SetMayorByName ==
    ||<tablebgcolor="#F9F9F9" tablestyle="margin:1em 1em 1em 0px;border-style:solid;border-color:rgb(170, 170, 170);color:rgb(0, 0, 0);font-family:sans-serif;font-size:13px;line-height:19.5px;text-align:start;" tableclass="wikitable"#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">Usage: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">setMayorbyname !HeroName ||
    ||<#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">Example: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">setMayorbyname Henry ||

    This command will allow you to specify the Mayor you wish to assign by hero name.

    <<BR>>

    == SetMayor ==
    ||<tablebgcolor="#F9F9F9" tablestyle="margin:1em 1em 1em 0px;border-style:solid;border-color:rgb(170, 170, 170);color:rgb(0, 0, 0);font-family:sans-serif;font-size:13px;line-height:19.5px;text-align:start;" tableclass="wikitable"#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">Usage: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">setMayor stat ||
    ||<#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">Example: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">setMayor pol ||
    ||<#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">Arguments: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">pol<<BR>>atk<<BR>>int ||


    This command will change your current mayor for one of the specified attribute. It automatically selects the highest level of the attribute that you specify (stat is the label for the attribute argument). This is very useful when creating, upgrading and demolishing buildings, 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.

    <<BR>>

    == GetSpamHero ==
    ||<tablebgcolor="#F9F9F9" tablestyle="margin:1em 1em 1em 0px;border-style:solid;border-color:rgb(170, 170, 170);color:rgb(0, 0, 0);font-family:sans-serif;font-size:13px;line-height:19.5px;text-align:start;" tableclass="wikitable"#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">Usage: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">getspamhero [optional type of hero] ||
    ||<#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">Example: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">getspamhero ||
    ||<#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">Options: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">power or atk<<BR>>management or pol<<BR>>stratagem or int ||
    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.

    <<BR>>

    == UseHeroItem ==
    ||<tablebgcolor="#F9F9F9" tablestyle="margin:1em 1em 1em 0px;border-style:solid;border-color:rgb(170, 170, 170);color:rgb(0, 0, 0);font-family:sans-serif;font-size:13px;line-height:19.5px;text-align:start; " tableclass="wikitable"#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em; ">Usage: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">useheroitem !HeroName !ItemName ||
    ||<#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em; ">Example: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">useheroitem LKD70 on war ||
    The above example will assign an on war to the hero "LKD70" if the hero is idle and you've at least one on war.

    <<BR>>

    == WaterHero ==
    ||<tablebgcolor="#F9F9F9" tablestyle="margin:1em 1em 1em 0px;border-style:solid;border-color:rgb(170, 170, 170);color:rgb(0, 0, 0);font-family:sans-serif;font-size:13px;line-height:19.5px;text-align:start; " tableclass="wikitable"#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em; ">Usage: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">waterhero !HeroName ||
    ||<#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em; ">Example: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">waterhero LKD70 ||
    Used to apply holy water to a hero in the feasting hall.

    <<BR>>

    == FindHero ==
    ||<tablebgcolor="#F9F9F9" tablestyle="margin:1em 1em 1em 0px;border-style:solid;border-color:rgb(170, 170, 170);color:rgb(0, 0, 0);font-family:sans-serif;font-size:13px;line-height:19.5px;text-align:start;" tableclass="wikitable"#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">Usage: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">findhero stat ||
    ||<#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">Example: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">findhero atk ||
    ||<#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">Arguments: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">power or atk<<BR>>management or pol<<BR>>stratagem or int ||


    This command will recruit the best hero of the type specified that is available in the inn at the time.

    <<BR>>

    == ListAllHeroes ==
    ||<tablestyle="margin: 1em 1em 1em 0px; background-color: rgb(249, 249, 249); border-style: solid; border-color: rgb(170, 170, 170); color: rgb(0, 0, 0); font-family: sans-serif; font-size: 13px; line-height: 19.5px; text-align: start; " tableclass="wikitable"style="border-style: solid; border-color: rgb(170, 170, 170); padding: 0.2em; background-color: rgb(242, 242, 242); ">Usage:||<style="border-style: solid; border-color: rgb(170, 170, 170); padding: 0.2em; ">!ListAllHeroes||
    ||<style="border-style: solid; border-color: rgb(170, 170, 170); padding: 0.2em; background-color: rgb(242, 242, 242); ">Example:||<style="border-style: solid; border-color: rgb(170, 170, 170); padding: 0.2em; ">!ListAllHeroes||


    Displays a list of all heroes, their stats, and their experience totals for every city.

    ''Example Output:''

     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>>

    <<BR>>

    == FireHero ==
    ||<tablebgcolor="#F9F9F9" tablestyle="margin:1em 1em 1em 0px;border-style:solid;border-color:rgb(170, 170, 170);color:rgb(0, 0, 0);font-family:sans-serif;font-size:13px;line-height:19.5px;text-align:start;" tableclass="wikitable"#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">Usage: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">firehero hero_string ||
    ||<#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">Example 1: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">firehero Ken ||
    ||<#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">Example 2: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">firehero any:level<50 ||


    Used to fire a hero specifically by name from the feasting hall. The hero's status must be either idle, mayor, or captured, i.e., is not on a mission away from town.

    In Example 1 the hero "Ken" Will be fired if it is in the town.

    In Example 2 all heroes under the level of 50 will be fired.

    <<BR>>

    == HeroRoute ==
    ||<tablestyle="margin: 1em 1em 1em 0px; background-color: rgb(249, 249, 249); border-style: solid; border-color: rgb(170, 170, 170); border-left-width: 2px; color: rgb(0, 0, 0); text-align: start; font-family: sans-serif; font-size: 13px; line-height: 19.5px; " tableclass="wikitable"style="padding: 0.2em; border-left-width: 2px; border-style: solid; border-color: rgb(170, 170, 170); background-color: rgb(242, 242, 242); ">Usage: ||<style="padding: 0.2em; border-left-width: 2px; border-style: solid; border-color: rgb(170, 170, 170); ">heroroute ||
    ||<style="padding: 0.2em; border-left-width: 2px; border-style: solid; border-color: rgb(170, 170, 170); background-color: rgb(242, 242, 242); ">Example: ||<style="padding: 0.2em; border-left-width: 2px; border-style: solid; border-color: rgb(170, 170, 170); ">heroroute ||


    This command is used to display the movement route for the TrainingHero. The output will display each city you own, and the next destination from that city.

    <<BR>>

    == PersuadeHero ==
    ||<tablebgcolor="#F9F9F9" tablestyle="margin:1em 1em 1em 0px;border-style:solid;border-color:rgb(170, 170, 170);color:rgb(0, 0, 0);font-family:sans-serif;font-size:13px;line-height:19.5px;text-align:start;" tableclass="wikitable"#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">Usage: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">persuadehero hero ||
    ||<#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">Example: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">persuadehero Ken ||


    Persuade the captured hero named Ken. The medals required for the persuasion, if any, are shown in the hero tab.

    <<BR>>

    == UpLevelHeroes ==
    ||<tablebgcolor="#F9F9F9" tablestyle="margin:1em 1em 1em 0px;border-style:solid;border-color:rgb(170, 170, 170);color:rgb(0, 0, 0);font-family:sans-serif;font-size:13px;line-height:19.5px;text-align:start; " tableclass="wikitable"#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em; ">Usage: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">uplevelheroes ||
    ||<#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em; ">Example: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">uplevelheroes ||


    Upgrades all heroes in current city (unless named in the ''NoLevelHeroes'' 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.

    <<BR>>

    == RewardHeroes ==
    ||<tablebgcolor="#F9F9F9" tablestyle="margin:1em 1em 1em 0px;border-style:solid;border-color:rgb(170, 170, 170);color:rgb(0, 0, 0);font-family:sans-serif;font-size:13px;line-height:19.5px;text-align:start;" tableclass="wikitable"#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">Usage: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">rewardheroes ||
    ||<#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">Example: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">rewardheroes ||


    Finds and rewards all heroes with loyalty below 100, using gold.

    <<BR>>

    == ReleaseHero ==
    ||<tablebgcolor="#F9F9F9" tablestyle="margin:1em 1em 1em 0px;border-style:solid;border-color:rgb(170, 170, 170);color:rgb(0, 0, 0);font-family:sans-serif;font-size:13px;line-height:19.5px;text-align:start;" tableclass="wikitable"#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">Usage: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">releasehero heroName or herostring ||
    ||<#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">Example: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">releasehero Bob<<BR>>releasehero any:level<100 ||


    Used to dismiss a captive hero from the feasting hall. This script command is compatible with hero strings.

    For more information about what hero strings can be used with this command, check out HeroString.

    <<BR>>
    == TrainingHeroIsHere ==
    ||<tablebgcolor="#F9F9F9" tablestyle="margin:1em 1em 1em 0px;border-style:solid;border-color:rgb(170, 170, 170);color:rgb(0, 0, 0);font-family:sans-serif;font-size:13px;line-height:19.5px;text-align:start; " tableclass="wikitable"#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em; ">Usage: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">m_city.cityManager.!TrainingHeroIsHere ||
    ||<#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em; ">Example: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">echo m_city.cityManager.!TrainingHeroIsHere||
    If the specified !TrainingHero is in the castle this will return true.
    Line 153: Line 17:
    ||<tablebgcolor="#F9F9F9" tablestyle="margin:1em 1em 1em 0px;border-style:solid;border-color:rgb(170, 170, 170);color:rgb(0, 0, 0);font-family:sans-serif;font-size:13px;line-height:19.5px;text-align:start;" tableclass="wikitable"#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">Usage: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">m_city.!AnyIdleHero(HeroString) ||
    ||<#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">Example: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">m_city.!AnyIdleHero(any:level<100) ||
    The above example will output true if there is a hero under level 100 idle.
    ||<tablebgcolor="#F9F9F9" tablestyle="margin:1em 1em 1em 0px;border-style:solid;border-color:rgb(170, 170, 170);color:rgb(0, 0, 0);font-family:sans-serif;font-size:13px;line-height:19.5px;text-align:start; " tableclass="wikitable"#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em; ">Usage: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">m_city.!AnyIdleHero(HeroString) ||
    ||<#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em; ">Example: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">echo m_city.!AnyIdleHero("any:attack>1000")||
    returns true if specified hero string matches any idle hero in the castle.
    Line 157: Line 21:
    <<BR>>
    == WaitHeroLost ==
    ||<tablebgcolor="#F9F9F9" tablestyle="margin:1em 1em 1em 0px;border-style:solid;border-color:rgb(170, 170, 170);color:rgb(0, 0, 0);font-family:sans-serif;font-size:13px;line-height:19.5px;text-align:start; " tableclass="wikitable"#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em; ">Usage: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">waitherolost hero1,hero2,... ||
    ||<#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em; ">Example: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">waitherolost ken,henry ||
    {{{
    targetValley = ("123,456")
    Line 162: Line 24:
    if m_city.AnyIdleHero("any:att>100,att<300") if city.troops.archer>100k execute "attack "+targetValley+" any:att>100,att<300 a:25k,p:1,sw:1,c:1,cata:1,s:1"
    }}}
    if there is a hero matching the criteria available, and city has more than 100k arch, send it marching on the valley....
    Line 163: Line 28:
    Pause script until one of the heroes specified is captured.

    <<BR>>

    == IsHeroInCastle ==0
    ||<tablebgcolor="#F9F9F9" tablestyle="margin:1em 1em 1em 0px;border-style:solid;border-color:rgb(170, 170, 170);color:rgb(0, 0, 0);font-family:sans-serif;font-size:13px;line-height:19.5px;text-align:start; " tableclass="wikitable"#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em; ">Usage: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">m_city.!IsHeroInCastle("!HeroName") ||
    ||<#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em; ">Example: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">m_city.!IsHeroInCastle("LKD70") ||
    If the hero named "LKD70" is in the castle this will return true.

    <<BR>>

    == RecallHero ==
    ||<tablebgcolor="#F9F9F9" tablestyle="margin:1em 1em 1em 0px;border-style:solid;border-color:rgb(170, 170, 170);color:rgb(0, 0, 0);font-family:sans-serif;font-size:13px;line-height:19.5px;text-align:start;" tableclass="wikitable"#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">Usage: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">recallhero hero-string ||
    ||<#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">Example: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">recallhero Fred<<BR>>recallhero any:att=best ||


    Used to recall a hero by name or hero string that is out marching or camping.

    See HeroString for details on how to set up the herostring for this script.

    <<BR>>

    == SpamHeroes ==
    ||<tablebgcolor="#F9F9F9" tablestyle="margin:1em 1em 1em 0px;border-style:solid;border-color:rgb(170, 170, 170);color:rgb(0, 0, 0);font-family:sans-serif;font-size:13px;line-height:19.5px;text-align:start;" tableclass="wikitable"#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">Usage: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">spamheroes hero-string ||
    ||<#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">Default: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">spamheroes any:base<=69,level<50 ||
    ||<#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">Example: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">spamheroes hero-string ||


    This directive will tell the bot which heroes it may or may not use with LoyaltyAttack or SpamAttack.

    See HeroString for details on how to set up the hero-string for this goal.

    When running this command from the script window instead of as a goal, you can use the \reset switch to clear all spamheroes in memory, either from scripts or goals. For example: ''spamheroes /reset''. Note that clearing via script will only last until the bot is restarted, unless the script is ran each restart, or the goals are cleared as well.
    assumes you have the layers constantly being replaced, it could hang waiting for missing layer... so if you use scouts to transport res, leave them out of the march.

    See also: Heroes

    IsHeroInCastle

    Usage:

    m_city.IsHeroInCastle("HeroName")

    Example:

    m_city.IsHeroInCastle("LKD70")

    If the hero named "LKD70" is in the castle this will return true. A HeroString can also be used instead of the hero name.

    TrainingHeroIsHere

    Usage:

    m_city.cityManager.TrainingHeroIsHere

    Example:

    echo m_city.cityManager.TrainingHeroIsHere

    If the specified TrainingHero is in the castle this will return true.

    AnyIdleHero

    Usage:

    m_city.AnyIdleHero(HeroString)

    Example:

    echo m_city.AnyIdleHero("any:attack>1000")

    returns true if specified hero string matches any idle hero in the castle.

    targetValley = ("123,456")
    
    if m_city.AnyIdleHero("any:att>100,att<300") if city.troops.archer>100k execute "attack "+targetValley+" any:att>100,att<300 a:25k,p:1,sw:1,c:1,cata:1,s:1"

    if there is a hero matching the criteria available, and city has more than 100k arch, send it marching on the valley....

    assumes you have the layers constantly being replaced, it could hang waiting for missing layer... so if you use scouts to transport res, leave them out of the march.


    CategoryFunctions

    HeroFunctions (last edited 2015-02-24 10:17:58 by LKD70)