• 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

    The script commands in this section pertain to your city.

    Abandon

    Abandon Goal

    Usage:

    config abandon:[switch]

    Example:

    config abandon:1

    Default:

    config abandon:0

    Switch:

    0 = off
    1 = on

    This goal tells the bot that you are planning to abandon this city. The bot will destroy all troops, wall defenses, and queues in the city and will lower loyalty by levying and adjusting the tax rate upwards. The bot will not perform comforting actions on the city with this goal set. This is useful when you plan to give a city away or abandon it. The bot will not automatically abandon the city once it reaches 0 loyalty.

    WARNING

    You should run EvacuateTown in the scripts window before you set this goal!

    Be sure to move out All heroes as well

    Abandon Script

    Usage:

    abandon XXX,YYY

    Example:

    abandon 111,222

    This script tells the bot to abandon the valley at 111,222.

    AbandonTown

    Usage:

    abandontown city-coords-or-name

    Example:

    abandontown 111,222
    abandontown OtherCity

    • The city being abandoned can be referred to by name or coordinates.
    • The bot does not check for troops or heroes. Any heroes or troops in the town or traveling from the town will be irreplaceably deleted.

    • Be sure your escaping troops have arrived at their destination before abandoning any city.

    Abandontown should be used with care. It is best to allow the bot to build npcs on its own rather than trying to do them manually with this command, but for whatever purpose you must use this command DOUBLE CHECK that you have entered the correct coordinates or city name to be abandoned. Be sure to run EvacuateTown script command previous to using this command if you have troops or resources in the city to be moved. Be sure to allow all evacuations to complete before running this script command.

    WARNING

    There are NO 2nd chances using this command! There is no "Are you sure?" popup if you run this command. If you accidentally delete your level 1200 training hero, we'll feel really bad for you, but you're still screwed.

    BuildCity

    Usage:

    buildcity xxx,yyy

    Example:

    buildcity 111,222

    This script is used to build a city at the given coordinates. It will capture the flat for you using your specified ValleyTroops in goals, or the defaults. Once the city is built, the bot will build a cottage in it to prevent the bot's npc building functions from abandoning it as a npc.

    To cancel a city build already scheduled, use CancelBuildcity.

    BuildingGoals

    Usage:

    buildinggoals [build.goal.string]

    Example:

    buildinggoals st:0:0,b:9:12

    This command will allow you to add a new build goal directive from the script interface. For more information see the Build page.

    CancelBuildcity

    Usage:

    cancelbuildcity
    cancelbuildcity xxx,yyy

    Example:

    cancelbuildcity
    cancelbuildcity 123,456

    Used to cancel a previously scheduled city building command created by the BuildCity script. If optional coordinates are given, that particular buildcity queue will be cancelled. If none are given, all cities to be built are cleared from the queue.

    CancelBuilding

    Usage:

    cancelbuilding

    Example:

    cancelbuilding

    Used to cancel the building in progress in the city.

    CancelFortifications

    Usage:

    cancelfortifications [remain count]

    Example:

    cancelfortifications
    cancelfortifications 2

    Used to cancel fortification queues, leaving remain_count batches. If no remain_count is provided, all batches are removed.

    CancelResearch

    Usage:

    cancelresearch

    Example:

    cancelresearch

    Used to cancel the research in progress in the city.

    CheckResearch

    Usage:

    checkresearch

    Example:

    checkresearch

    Prints out a list of research techs that can be researched in the city. This list is relative to the city where the command is run, meaning Checkresearch will validate all of the tech and their requirements then make sure that the city meets those requirements. Only the techs that have all of their requirements met will be listed.

    Comfort

    Comfort Goal

    Usage:

    config comfort:[switch]

    Example:

    config comfort:1

    Default:

    config comfort:1

    Switch:

    0 = off
    1 = on

    Enable the comfort goal and the bot will automagically perform comforting on your city as required. This goal along with config gate:[time], config hiding:[time], config npc:[level] all working together can make your cities virtually impossible to capture. With comforting activated the bot will raise loyalty, reduce grievance, adjust tax rates to prevent riots, and perform miscellaneous comforting actions as specified in comfortpolicy. Comfort can be used by itself or along with comfortpolicy. If you want to use comfortpolicy, this goal is required.

    Comfort Script

    Usage:

    comfort comforttype

    Example:

    comfort pray
    comfort 1
    comfort bless
    comfort 4

    Comfort Types:

    1 - relief
    2 - pray
    3 - bless
    4 - popraise

    Performs one of the comfort commands in the city that it is run from.

    Config

    Usage:

    config [directive]:[value]

    Example:

    config wartown:0

    In order to allow control of all the bot functions through the scripting interface, all config switches that can be set in the goals page are accessible in your script. The new settings will be retained until:

    • they are changed again through a script command
    • the Set Goals button in the Goals page is selected, or
    • the bot is restarted.

    The changes made to settings through the script interface will only change the values currently in memory. No actual changes are made to the Goals page and all values can be restored to settings on the goals page by selecting Set Goals with the goals window displayed.

    Create

    Usage:

    create buildingtype [position id]

    Example:

    create cottage
    create fo
    create barrack
    create a 0
    create embassy 2

    Building Types:

    academy - a
    barrack - b
    beacon tower - be
    cottage - c
    embassy - e
    feasting hall - fh
    forge - fo
    farm - f
    sawmill - s
    quarry - q
    iron mine - i
    inn - inn
    market - m
    rally spot - r
    relief station - rs
    stable - st
    town hall - t
    wall - w
    warehouse - wh
    workshop - ws

    Create is used to build a building on an empty space, if there are no spaces to build, the create command will attempt to create a building until there is one and eventually time out. The Create command will automatically speed up the construction process for those buildings that are less than 5 minutes build time. In other words, for those buildings, like a cottage, that can be instantly built, Create will do this. The create command will perform several checks before it creates a building, it will first check to see if another construction is underway and automatically sleep until that construction is done, it also checks for resources, and if none are present, will sleep until they are.

    A specific position ID can be given with create for building, as shown in the 4th and 5th examples above. Use the following numbers for each tile:

    http://i47.tinypic.com/21c5gro.jpg http://i.imgur.com/r1Voz7t.png

    Demo

    Usage:

    demo buildingtype [policy] [@positionId]

    Example:

    demo cottage
    demo forge level10
    demo s highestlevel
    demo /dynamite ws
    demo any @15

    Building Types:

    academy - a
    barrack - b
    beacon tower - be
    cottage - c
    embassy - e
    feasting hall - fh
    forge - fo
    farm - f
    sawmill - s
    quarry - q
    iron mine - i
    inn - inn
    market - m
    rally spot - r
    relief station - rs
    stable - st
    town hall - t
    wall - w
    warehouse - wh
    workshop - ws

    The demo command will demolish a building by one level at a time. It is important to note that you must specifically order the demolition of a level 10 building, either by using the level10 argument or highestlevel 10. As with the Upgrade command, Demo will not do anything to a level 10 building otherwise.

    You may specify the location of a building to demo with @. For example demo b @20 would demolish one level of the barrack at position 20 in the city, while demo any @20 would demolish one level of any building at position 20. See below for position ids.

    You may also use dynamite with the Demo command. Just add the /dynamite flag to your demo command. For example demo /dynamite fo would use dynamite to completely demolish the forge, while demo /dynamite any @13 would use dynamite to completely demolish any building at position 13. See below for position ids.

    • demo c level10
      repeat 5
      demo c
      repeat 45

    The above example will demo 5 cottages to level 9, then proceed by demo'ing these cottages completely to 0. Another way of doing this is using the highest/lowestlevel building arguments, and making sure that your repeat command only repeats enough times to accommodate 5 level 10 cottages.

    Building Policies

    Building Policies are for defining arguments of level, in such, these are the building policies that can be used for the label levelX listed in the syntax usage of each construction command. (Currently, there are no options for the create command, it defaults to the first available “lot” to create a building): levelX whereas you input a desired level between 1 and 10 (IE level1; level5) with no space Used with upgrade command Used with demo command

    lowestlevel whereas you input the desired “up to that” level in place of X (optional). This policy selects buildings that are the lowest levels to perform the argued command (IE upgrade cottage !lowestlevel) (must have space) Used with upgrade command Used with demo command

    highestlevel whereas you input the desired “up to that” level in place of X (optional). This policy selects buildings that are the highest levels to perform the argued command (IE demo cottage !highestlevel) (must have space)

    Used with upgrade command Used with demo command

    X Optional augment for policy arguments, it allows to specify a level to be equal to or greater than/less than the desired level to be upgraded or demolished. level level10 will demo to level 9, it will upgrade to level 10 using a mich script

    Level specification now has abbreviations, you can now use hi for highestlevel, lo for lowest level and le for level.

    Using highestlevel or level10 arguments will utilize a mich script when used with the upgrade command. The only way to demolish a level 10 building is to use highestlevel or level10

    Position IDs are as follows:

    http://i47.tinypic.com/21c5gro.jpg http://i.imgur.com/r1Voz7t.png

    DemoSite

    Usage:

    demosite [position ID]

    Example:

    demosite 36
    demosite /dynamite 36

    The demosite command allows you to demolish/downgrade 1 level of the building located at a specific position in your city. The level or type of building doesn't matter with demosite, so be careful you don't put in the site id# for a level 10 building you wanted to keep. You may use the /dynamite switch to have the bot use dynamite to completely demolish the building at a specific position rather than just one level of it, as shown in the example above.

    Position IDs are as follows:

    http://i47.tinypic.com/21c5gro.jpg http://i.imgur.com/r1Voz7t.png

    For renovating a newly capped npc, the position IDs are as follows:

    Position:

    Building

    0

    Academy

    1

    Forge

    2

    Embassy

    3

    Feasting Hall

    4

    Market Place

    5

    Beacon Tower

    6

    Stable

    7

    Inn

    8

    Rally Spot

    9

    Relief Station

    10

    Workshop

    11

    Barracks

    12-31

    Cottage

    1001-1037

    Farm

    1038

    Sawmill

    1039

    Quarry

    1040

    Iron Mine

    EvacuateTown

    Usage:

    evacuatetown coords

    Example:

    evacuatetown 111,222

    This script command will tell the bot to send all troops and resources that it can carry to the specified coordinates from this city, in order for the town to be abandoned later. The bot will leave all of the heroes in the city. You must move them manually. This script should be run before config abandon:1 is used in goals.

    To cancel the evacuation use EndEvacuate.

    Goal

    Usage:

    goal [desired goal [parameters]]

    Example:

    goal config npc:5
    goal research ar:4,ms:5

    This command will allow you to execute the script line as a goal. It is optional, in the above example just "config npc:5" as a script line would work to adjust the goal config npc to '5'. Any goal can be executed via a script line without this optional command, but this may be useful when a goal and a script have the same name, and you want it to modify the goal explicitly.

    Levy

    Usage:

    levy levytype

    Example:

    levy 1
    levy food

    Levy Types:

    1 - gold
    2 - food
    3 - wood
    4 - stone
    5 - iron

    Performs one of the levy actions in the city.

    LoadGoals

    Usage:

    loadgoals [goal set number]

    Example:

    loadgoals
    loadgoals 3

    This script command will allow you to load a set of goals to be ran by the bot.

    An example of a use for this would be in a city used for trebbing. You could tell the bot to load goal set 1, where you have your npc farming and hero movement and such disabled, perform all the treb hits via scripts, and then reload your regular goal set 0 where you have npc farming and such enabled when the treb hits are done. A script doing this could be like so:

    • //Trebbing Session
      gosub TrebSession
      
      label BeginHere
      ifgoto ( m_city.cityManager.resource.stone.amount < 5b ) OuttaStone
      ifgoto ( m_city.cityManager.fortification.rockfall < 10500 ) Rebuildwall
      goto BeginHere
      
      label Rebuildwall
      setmayorbyname Queen
      walldefense tre 11k build
      sleep 15
      goto BeginHere
      
      label OuttaStone
      echo "Getting Low On Stone!"
      loadgoals 0
      stop
      
      label TrebSession
      loadgoals 1
      walldefense tra 50000 demo
      walldefense ab 50000 demo
      walldefense at 50000 demo
      walldefense r 50000 demo
      walldefense tre 50000 demo
      gosub BeginHere

    Production

    Usage:

    production food% wood% stone% iron%

    Example:

    production 100 100 100 100

    Production functions as both a goal and script of the same name. It sets the desired city production of resources.

    You must use a number between 0 and 100. Troop production may adjust production rates down temporarily if permitted to via the goal config TroopsUsePopMax.

    If used as a script, it will also set the corresponding goal to the same values, until the next bot restart.

    RenameCity

    Usage:

    renamecity newname [picture ID 1-4]

    Example:

    renamecity BottingRulz
    renamecity BottingRulz 3

    Change a city's name and (optionally) picture. The picture IDs are as follows:

    • 1 - http://imageshack.us/a/img411/2904/citylogo01.png

    • 2 - http://imageshack.us/a/img802/2310/citylogo02.png

    • 3 - http://imageshack.us/a/img209/3374/citylogo03.png

    • 4 - http://imageshack.us/a/img16/9365/citylogo04.png

    ResetGoals

    Usage:

    resetgoals

    Example:

    resetgoals

    This command will temporarily reset/disable your goals until the next bot restart. It will: remove all building, tech, & fortification directives; cancel all troop requirements, erase all config statements, erase all variables; set ReportsToKeep & DistancePolicy to default values; delete NpcBounds, NpcHeroes, NoLevelHeroes, SpamHeroes; remove all SendResources, KeepResources, SendTroops, KeepTroops directives, set HomeHeroes to 1, TrainingHero "" 300 -1 -1, GatePolicy 0 0 0 0 0; and reset: DefensePolicy, WarehousePolicy, FarmingPolicy, RallyPolicy, TradePolicy, ProcessingPolicy, and Hunting.

    SetFocus

    Usage:

    setfocus

    Example:

    setfocus
    setfocus 5

    The bot functions in a linear manner, moving from one city to the next after a given amount of time. This command will cause the bot to immediately focus on the city from which the command is issued for one task cycle.

    Enabling the Task Flow debug option will allow you to see what one task cycle is, and how long it lasts.

    You can optionally give it a number of task cycles to focus on the city for. Be careful running this too much or for too long, as the bot's normal flow of tasks is already designed to be optimal.

    SetTaxRate

    Usage:

    settaxrate %

    Example:

    settaxrate 20

    Sets the city's tax rate to the number specified.

    Note - this will not change the taxpolicy for the city. If you want the tax rate to be set and stay there, make sure the taxpolicy does not conflict, or just use TaxPolicy as a script command instead, i.e. - taxpolicy 20 100 to change it immediately to 20 and stay there.

    StartResearch

    Usage:

    startresearch techname or research speed/cost [/nowait]

    Example:

    startresearch compass
    startresearch quickest
    startresearch construction
    startresearch dearest

    Arguments:

    quickest
    cheapest
    dearest
    ag - agriculture
    lu - lumbering
    mas - masonry
    mi - mining
    met - metal
    in - info
    ms - militaryscience
    mt - militarytradition
    ir - ironwork
    lo - logistics
    com - compass
    ho - horseback
    ar - archery
    st - stockpile
    med - medicine
    con - construct
    en - engineer
    mac - machinery
    pr - privateer

    This command will perform a research of the valid tech argument in the city that it is run from. As an option, you can run a CheckResearch command first to see what is available to you, allowing you to tailor the script to techs you are currently not researching.

    an optional "/nowait" arugment can be supplied that prevents the script waiting until the research is finalized.

    TechGoals

    Usage:

    techgoals [research.goal.string]

    Example:

    techgoals ar:10,ho:10,mt:9

    This command will allow you to add a new research goal directive from the script interface. For more information see the Research page.

    This command is deprecated, you can now just use research in scripts to modify the research goals.

    Teleport

    Usage:

    teleport [state name or random]
    teleport [coords] (uses Advanced City Teleport to move to specified coords)
    warteleport [coords] (uses War Teleporter to move to specific barbarian city coords)

    Example:

    teleport saxony
    teleport 111,222
    warteleport 123,45

    States:

    friesland, saxony, north march, bohemia,
    lower lorraine, franconia, thuringia, moravia,
    upper lorraine, swabia, bavaria, carinthia,
    burgundy, lombardy, tuscany, romagna
    or
    random

    Randomly teleports your city to the state specified, or a random state if using teleport random.

    If instead you use coordinates, the bot will advance teleport your city to the coordinates specified. When trying to advance teleport, the bot will first use the Pioneer teleports available after server merge if you have them.

    Upgrade

    Usage:

    upgrade buildingtype levelX

    Example:

    upgrade cottage
    upgrade barrack level8
    upgrade farm lowestlevel

    Upgrades an existing building.

    In order to create a level 10 building, which requires the use of a Michaelangelo Script, you must first have a building currently at level 9, a Script in your items, and you must specify level9 in the upgrade command.

    The script:

    • upgrade iron
      repeat

    Would only build all your iron mines to level 9 and stop. To create a level 10 building, you must specify:

    • upgrade iron level9

    Building Policies

    Building Policies are for defining arguments of level, in such, these are the building policies that can be used for the label levelX listed in the syntax usage of each construction command. (Currently, there are no options for the create command, it defaults to the first available “lot” to create a building): levelX whereas you input a desired level between 1 and 10 (IE level1; level5) with no space Used with upgrade command Used with demo command

    lowestlevel whereas you input the desired “up to that” level in place of X (optional). This policy selects buildings that are the lowest levels to perform the argued command (IE upgrade cottage !lowestlevel) (must have space) Used with upgrade command Used with demo command

    highestlevel whereas you input the desired “up to that” level in place of X (optional). This policy selects buildings that are the highest levels to perform the argued command (IE demo cottage !highestlevel) (must have space)

    Used with upgrade command Used with demo command

    X Optional augment for policy arguments, it allows to specify a level to be equal to or greater than/less than the desired level to be upgraded or demolished. level level10 will demo to level 9, it will upgrade to level 10 using a mich script

    Level specification now has abbreviations, you can now use hi for highestlevel, lo for lowest level and le for level.

    Using highestlevel or level10 arguments will utilize a mich script when used with the upgrade command. The only way to demolish a level 10 building is to use highestlevel or level9

    WallDefense

    Usage:

    walldefense DefType Qty [BuildType]

    Example:

    walldefense at 1000
    walldefense ab 1000 demo

    Used to build or demolish wall defenses.

    Starting in NeatBot version 3378 you can use multiple wall fortifications on a single line for demolish commands. You can also put the 'demo' action before or after the fortification types. These 4 different scripts will all demolish 5000 archer towers, 1000 abatis, and 1000 traps:

     walldefense at:5k,ab:1k,tra:1k demo

     walldefense demo at:5k,ab:1k,tra:1k

     walldefense /demo at:5k,ab:1k,tra:1k

     walldefense at 5k demo
     walldefense ab 1k demo
     walldefense tra 1k demo

    You can also use the /keep action to force the bot to demolish all but the kept amount. Only specifically listed fortification types will be affected. For example, this will demolish all but 15,000 archer towers, 1000 abatis, and 1000 traps. Any rolling logs and trebs will not be effected:

     walldefense /keep at:15k,ab:1k,tra:1k

    Here are several examples of ways to use the walldefense command in NeatBot versions 3378 and later:

     walldefense                 // build 1 trap (compatibility with older versions)
    
     walldefense at 100
     walldefense at:100          //same as above
     walldefense build at:100    //same as above
     walldefense /build at:100   //same as above
     walldefense at 100 produce  //same as above (compatibility)
    
     walldefense demo            // demolish 1 trap
     walldefense destruct tra 10 // demolish 10 traps (compatibility)
    
     walldefense at demo        // demolish 1 archer tower
     walldefense at             // build 1 archer tower (compatibility)
     walldefense at keep        // keep 1 archer tower (demolish all archer towers except one)
    
     // demolish 100 traps and 10,000 archers towers
     walldefense demo tra:100,at:10k
     walldefense /demo tra:100,at:10k // same as above
    
     // demolish all but 100 traps and 1,000 archers towers (other fortifications are unaffected)
     walldefense keep tra:100,at:1k
     walldefense /keep tra:100,at:1k // same as above
    
     // demolish all trebuchets (other fortifications are unaffected)
     walldefense /keep tre:0

    WarTeleport

    Usage:

    warteleport [coords]

    Example:

    warteleport 123,456

    Teleports your city to the coordinates specified using a war teleporter. You can only use the coordinates of an existing npc.


    CategoryCommands

    ScriptCity (last edited 2014-02-10 18:05:00 by Inanna)