<?xml version="1.0" encoding="utf-8"?><!DOCTYPE article  PUBLIC '-//OASIS//DTD DocBook XML V4.4//EN'  'http://www.docbook.org/xml/4.4/docbookx.dtd'><article><articleinfo><title>Speedups</title><revhistory><revision><revnumber>1</revnumber><date>2015-08-09 23:07:15</date><authorinitials>LKD70</authorinitials></revision></revhistory></articleinfo><section><title>Speed ups</title><section><title>Command based application</title><para>When using commands such as <emphasis><ulink url="http://guide.neatportal.com/wiki/Speedups/wiki/Create#">Create</ulink></emphasis>, <emphasis><ulink url="http://guide.neatportal.com/wiki/Speedups/wiki/Upgrade#">Upgrade</ulink></emphasis>, <emphasis><ulink url="http://guide.neatportal.com/wiki/Speedups/wiki/Demo#">Demo</ulink></emphasis>, <emphasis><ulink url="http://guide.neatportal.com/wiki/Speedups/wiki/DemoSite#">DemoSite</ulink></emphasis> and <emphasis><ulink url="http://guide.neatportal.com/wiki/Speedups/wiki/StartResearch#">StartResearch</ulink></emphasis> you can add an additional parameter <emphasis role="strong">&quot;/speedup&quot;</emphasis> to allow the bot to use a speedup for the task. The /speedup command requires a speedup be specified. The speed up types are listed below. </para><informaltable><tgroup cols="1"><colspec colname="col_0"/><tbody><row rowsep="1"><entry colsep="1" rowsep="1"><para><emphasis role="strong">Speedup Types</emphasis> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>consume.2.a </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>consume.2.b </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>consume.2.b.1 </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>consume.2.c </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>consume.2.c.1 </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>consume.2.d </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>&quot;Beginner Guidelines&quot; </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>&quot;Primary Guidelines&quot; </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>&quot;Intermediate Guidelines&quot; </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>&quot;Senior Guidelines&quot; </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>&quot;Master Guidelines&quot; </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>&quot;Ultimate Guidelines&quot; </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>coins </para></entry></row></tbody></tgroup></informaltable><para>In addition to this parameter you can also use <emphasis role="strong">/nowait</emphasis>. This parameter tells the bot not to wait on the line to finish the execution of the command before continuing to the next line. </para><section><title>Examples of using the /speedup and /nowait parameters.</title><itemizedlist><listitem override="none"><screen><![CDATA[upgrade /speedup=coins barrack  // Instantly upgrades a barrack using coins.
upgrade cottage /speedup="Beginner Guidelines"  // quotes are needed when using names with spaces.
upgrade cottage /speedup=consume.2.a    // same as above, but using the item ID instead of its name.
upgrade /speedup="Ultimate Guidelines,coins" barrack    // upgrade barrack by first applying Ultimate Guidelines and then finish using coins.
demo forge /nowait /speedup="Primary Guidelines,Beginner Guidelines" // nowait is added to this one so it will not wait on this line to complete the demo. ]]></screen></listitem></itemizedlist><!--rule (<hr>) is not applicable to DocBook--></section></section><section><title>Alternate application</title><informaltable><tgroup cols="4"><colspec colname="col_0"/><colspec colname="col_1"/><colspec colname="col_2"/><colspec colname="col_3"/><tbody><row rowsep="1"><entry colsep="1" rowsep="1"><para><emphasis role="strong">Name:</emphasis> </para></entry><entry colsep="1" rowsep="1"><para><emphasis role="strong">Usage:</emphasis> </para></entry><entry colsep="1" rowsep="1"><para><emphasis role="strong">Desctiption:</emphasis> </para></entry><entry colsep="1" rowsep="1"><para><emphasis role="strong">Example</emphasis> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>buildingspeedup </para></entry><entry colsep="1" rowsep="1"><para>buildingspeedup {Speed Up Name} </para></entry><entry colsep="1" rowsep="1"><para>Speed up the current building with the speed up input. </para></entry><entry colsep="1" rowsep="1"><para>buildingspeedup Senior Guidelines </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>researchspeedup </para></entry><entry colsep="1" rowsep="1"><para>researchspeedup {Speed Up Name} </para></entry><entry colsep="1" rowsep="1"><para>Speed up the current research with the speed up input. </para></entry><entry colsep="1" rowsep="1"><para>researchspeedup coins </para></entry></row></tbody></tgroup></informaltable><section><title>Examples of using the buildingspeedup and researchspeedup functions.</title><itemizedlist><listitem override="none"><screen><![CDATA[// use Senior Guidelines, if it is needed.
r = city.getActiveResearch()
if r && TimeDiff(r.endTime)/1000 >= 8*3600 researchspeedup Senior Guidelines
]]><![CDATA[
// use coins to speed up research.
r = city.getActiveResearch()
if r researchspeedup coins
]]><![CDATA[
// use Senior Guidelines, if it is needed.
active = city.getActiveBuilding()
if active && TimeDiff(active.endTime)/1000 >= 8*3600 buildingspeedup Senior Guidelines
]]><![CDATA[
// use coins to speed up construction.
active = city.getActiveBuilding()
if active buildingspeedup coins
]]><![CDATA[
// apply "Beginner Guidelines" speed up to the building at position 20, if it is under construction and has at least 10 minutes left until finish.
pos = 20
b = city.getBuildingByPosId(pos)
if b && b.status != 0 && TimeDiff(b.endTime)/1000 >= 10*60 execute "buildingspeedup @{pos} Beginner Guidelines"]]></screen></listitem></itemizedlist><!--rule (<hr>) is not applicable to DocBook--><para> <ulink url="http://guide.neatportal.com/wiki/Speedups/wiki/ScriptCity#">ScriptCity</ulink> </para></section></section></section></article>