ChangeHeroName

Usage:

changeheroname OldName NewName

Example:

renamehero Gary LKD70

In the above example, the bot will attempt to rename the hero named "Gary" to "LKD70" when it is available.


WaitHero

Usage:

waithero HeroName

Example:

waithero LKD70

The above example will pause the bot until the hero with the name "LKD70" is made available.


SetMayorByName

Usage:

setMayorbyname HeroName

Example:

setMayorbyname Henry

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


SetMayor

Usage:

setMayor stat

Example:

setMayor pol

Arguments:

pol
atk
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.


GetSpamHero

Usage:

getspamhero [optional type of hero]

Example:

getspamhero

Options:

power or atk
management or pol
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.


UseHeroItem

Usage:

useheroitem HeroName ItemName

Example:

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.


WaterHero

Usage:

waterhero HeroName

Example:

waterhero LKD70

Used to apply holy water to a hero in the feasting hall.


FindHero

Usage:

findhero stat

Example:

findhero atk

Arguments:

power or atk
management or pol
stratagem or int

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


ListAllHeroes

Usage:

ListAllHeroes

Example:

ListAllHeroes

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

Example Output:


FireHero

Usage:

firehero hero_string

Example 1:

firehero Ken

Example 2:

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.


HeroRoute

Usage:

heroroute

Example:

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.


PersuadeHero

Usage:

persuadehero hero

Example:

persuadehero Ken

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


UpLevelHeroes

Usage:

uplevelheroes

Example:

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.


RewardHeroes

Usage:

rewardheroes

Example:

rewardheroes

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


ReleaseHero

Usage:

releasehero heroName or herostring

Example:

releasehero Bob
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.


AnyIdleHero

Usage:

m_city.AnyIdleHero(HeroString)

Example:

m_city.AnyIdleHero(any:level<100)

The above example will output true if there is a hero under level 100 idle.


WaitHeroLost

Usage:

waitherolost hero1,hero2,...

Example:

waitherolost ken,henry

Pause script until one of the heroes specified is captured.


== IsHeroInCastle ==0

Usage:

m_city.IsHeroInCastle("HeroName")

Example:

m_city.IsHeroInCastle("LKD70")

If the hero named "LKD70" is in the castle this will return true.


RecallHero

Usage:

recallhero hero-string

Example:

recallhero Fred
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.


SpamHeroes

Usage:

spamheroes hero-string

Default:

spamheroes any:base<=69,level<50

Example:

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.


CategoryFunctions

HeroFunctions (last edited 2015-02-08 07:34:41 by LKD70)