• 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 2 and 3
    Revision 2 as of 2015-02-08 15:58:56
    Size: 1638
    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 16: Line 16:
    == AnyIdleHero ==
    ||<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.

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

    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)