<?xml version="1.0" encoding="utf-8"?>
<s1 title="Market"><p>﻿<p>Contents</p>
<ol><li>
<link anchor="B">BuyPrice(X)</link></li>
<li>
<link anchor="S">SellPrice(X)</link></li>
<li>
<link anchor="t">tradesArray.length</link></li>
<li>
<link anchor="c">city.tradesArray[x]</link></li>
<li>
<link anchor="t-1">tradesArray[x].amount</link></li>
<li>
<link anchor="t-2">tradesArray[x].resType</link></li>
<li>
<link anchor="t-3">tradesArray[x].tradeType</link></li>
<li>
<link anchor="t-4">tradesArray[x].resourceName</link></li>
<li>
<link anchor="t-5">tradesArray[x].price</link></li>
<li>
<link anchor="t-6">tradesArray[x].id</link></li>
<li>
<link anchor="t-7">tradesArray[x].tradeTypeName</link></li>
<li>
<link anchor="t-8">tradesArray[x].dealedAmount</link></li>
<li>
<link anchor="t-9">tradesArray[x].dealedTotal</link></li>
<li>
<link anchor="t-10">transingTradesArray.length</link></li>
<li>
<link anchor="t-11">transingTradesArray[0].amount</link></li>
<li>
<link anchor="t-12">transingTradesArray[0].endTime</link></li>
<li>
<link anchor="t-13">transingTradesArray[0].resourceName</link></li>
<li>
<link anchor="t-14">transingTradesArray[0].price</link></li>
<li>
<link anchor="t-15">transingTradesArray[0].total</link></li>
<li>
<link anchor="t-16">transingTradesArray[0].id</link></li>
<li>
<link anchor="t-17">transingTradesArray[0].resType</link></li>
</ol>
</li>
</ol>
<p> </p>
<p></p>
<s2 id="BuyPrice(X)" title="BuyPrice(X)">
<table><strong class="highlight"><![CDATA[]]></strong><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Usage: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p><jump href="/wiki/BuyPrice">BuyPrice</jump>(X) </p>
</td></tr><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Example: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p><jump href="/wiki/BuyPrice">BuyPrice</jump>(X) </p>
</td></tr></table><p>Refers to the highest bid of a given resource. </p>
<p>0=food,1=wood,2=stone,3=iron </p>
<p>Script </p>
<p>echo &quot;food costs&quot;city.buyPrice(2) </p>
<p>Output </p>
<p>19:03:29 food costs 15.62 </p>
<p>Example of usage </p>
<p>label start </p>
<p>1: ifgoto <jump href="/wiki/BuyPrice">BuyPrice</jump>(2) &gt;= 1 sellfood </p>
<p>2: sleep 50 </p>
<p>3: loop start </p>
<p>label sellfood </p>
<p>4: sell food 1000 1 </p>
<p>5: goto start </p>
<p></p>
</s2>
<s2 id="SellPrice(X)" title="SellPrice(X)">
<table><strong class="highlight"><![CDATA[]]></strong><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Usage: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p><jump href="/wiki/SellPrice">SellPrice</jump>(X) </p>
</td></tr><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Example: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p><jump href="/wiki/SellPrice">SellPrice</jump>(X) </p>
</td></tr></table><p>Refers to the cheapest offer of a given resource. </p>
<p>0=food,1=wood,2=stone,3=iron </p>
<p>Script </p>
<p>echo &quot;iron is offered at&quot;city.sellPrice(2) </p>
<p>Output </p>
<p>19:03:29 iron is offered at 15.62 </p>
<p>Example of usage </p>
<p>label start </p>
<p>1: ifgoto <jump href="/wiki/SellPrice">SellPrice</jump>(2) &gt;= 1 buyiron </p>
<p>2: sleep 50 </p>
<p>3: loop start </p>
<p>label buyiron </p>
<p>4: buy iron 1000 1 </p>
<p>5: goto start </p>
<p></p>
</s2>
<s2 id="tradesArray.length" title="tradesArray.length">
<table><strong class="highlight"><![CDATA[]]></strong><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Usage: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>city.tradesArray.length </p>
</td></tr><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Example: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>city.tradesArray.length </p>
</td></tr></table><p>Returns the number of trades you have posted in the market which have not completed. </p>
<p></p>
</s2>
<s2 id="city.tradesArray[x]" title="city.tradesArray[x]">
<p>In the following examples, x is a number from 0 - 9 referring to the specific trade posted in the market (0 = 1st trade, 9 = last) the number of possible trades you can have posted in the market is limited by the level of the market. </p>
<p></p>
</s2>
<s2 id="tradesArray[x].amount" title="tradesArray[x].amount">
<table><strong class="highlight"><![CDATA[]]></strong><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Usage: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>city.tradesArray[x].amount </p>
</td></tr><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Example: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>city.tradesArray[0].amount </p>
</td></tr></table><p>returns a number indicating the quantity of resources being purchased or sold in city.tradesArray[x] </p>
<p></p>
</s2>
<s2 id="tradesArray[x].resType" title="tradesArray[x].resType">
<table><strong class="highlight"><![CDATA[]]></strong><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Usage: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>city.tradesArray[x].resType </p>
</td></tr><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Example: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>city.tradesArray[0].resType </p>
</td></tr></table><p>returns a number representing the resource type of the resources being purchased or sold in city.tradesArray[x] </p>
<p>0 = Food 1 = Lumber / Wood 2 = Stone 3 = Iron </p>
<p></p>
</s2>
<s2 id="tradesArray[x].tradeType" title="tradesArray[x].tradeType">
<table><strong class="highlight"><![CDATA[]]></strong><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Usage: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>city.tradesArray[x].tradeType </p>
</td></tr><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Example: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>city.tradesArray[0].tradeType </p>
</td></tr></table><p>returns a number indicating trade type of the trade in city.tradesArray[x] </p>
<p>0 = Buy 1 = Sell </p>
<p></p>
</s2>
<s2 id="tradesArray[x].resourceName" title="tradesArray[x].resourceName">
<table><strong class="highlight"><![CDATA[]]></strong><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Usage: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>city.tradesArray[x].resourceName </p>
</td></tr><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Example: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>city.tradesArray[0].resourceName </p>
</td></tr></table><p>returns a string containing the name of the resource type of the resources being purchased or sold in city.tradesArray[x] (&quot;Food&quot;,&quot;Lumber&quot;,&quot;Stone&quot;,&quot;Iron&quot;) </p>
<p></p>
</s2>
<s2 id="tradesArray[x].price" title="tradesArray[x].price">
<table><strong class="highlight"><![CDATA[]]></strong><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Usage: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>city.tradesArray[x].price </p>
</td></tr><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Example: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>city.tradesArray[0].price </p>
</td></tr></table><p>returns a number indicating price of the trade in city.tradesArray[x] </p>
<p></p>
</s2>
<s2 id="tradesArray[x].id" title="tradesArray[x].id">
<table><strong class="highlight"><![CDATA[]]></strong><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Usage: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>city.tradesArray[x].id </p>
</td></tr><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Example: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>city.tradesArray[0].id </p>
</td></tr></table><p>returns a number indicating returns the internal ID of the trade in city.tradesArray[x] </p>
<p></p>
</s2>
<s2 id="tradesArray[x].tradeTypeName" title="tradesArray[x].tradeTypeName">
<table><strong class="highlight"><![CDATA[]]></strong><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Usage: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>city.tradesArray[x].tradeTypeName </p>
</td></tr><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Example: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>city.tradesArray[0].tradeTypeName </p>
</td></tr></table><p>returns a string indicating the type of trade in city.tradesArray[x] (&quot;Bid&quot;,&quot;Offer&quot;) </p>
<p></p>
</s2>
<s2 id="tradesArray[x].dealedAmount" title="tradesArray[x].dealedAmount">
<table><strong class="highlight"><![CDATA[]]></strong><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Usage: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>city.tradesArray[x].dealedAmount </p>
</td></tr><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Example: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>city.tradesArray[0].dealedAmount </p>
</td></tr></table><p>Description goes here. </p>
<p></p>
</s2>
<s2 id="tradesArray[x].dealedTotal" title="tradesArray[x].dealedTotal">
<table><strong class="highlight"><![CDATA[]]></strong><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Usage: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>city.tradesArray[x].dealedTotal </p>
</td></tr><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Example: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>city.tradesArray[0].dealedTotal </p>
</td></tr></table><p>Description goes here. </p>
<p></p>
</s2>
<s2 id="transingTradesArray.length" title="transingTradesArray.length">
<table><strong class="highlight"><![CDATA[]]></strong><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Usage: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>city.transingTradesArray.length </p>
</td></tr><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Example: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>city.transingTradesArray.length </p>
</td></tr></table><p>Description goes here. </p>
<p>in the following examples, the value of x can be from 0 to ???, as you can have an infinite number of incoming purchases </p>
<p></p>
</s2>
<s2 id="transingTradesArray[0].amount" title="transingTradesArray[0].amount">
<table><strong class="highlight"><![CDATA[]]></strong><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Usage: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>city.transingTradesArray[0].amount </p>
</td></tr><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Example: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>city.transingTradesArray[0].amount </p>
</td></tr></table><p>Description goes here. </p>
<p></p>
</s2>
<s2 id="transingTradesArray[0].endTime" title="transingTradesArray[0].endTime">
<table><strong class="highlight"><![CDATA[]]></strong><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Usage: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>city.transingTradesArray[0].endTime </p>
</td></tr><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Example: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>city.transingTradesArray[0].endTime </p>
</td></tr></table><p>Description goes here. </p>
<p></p>
</s2>
<s2 id="transingTradesArray[0].resourceName" title="transingTradesArray[0].resourceName">
<table><strong class="highlight"><![CDATA[]]></strong><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Usage: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>city.transingTradesArray[0].resourceName </p>
</td></tr><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Example: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>city.transingTradesArray[0].resourceName </p>
</td></tr></table><p>Description goes here. </p>
<p></p>
</s2>
<s2 id="transingTradesArray[0].price" title="transingTradesArray[0].price">
<table><strong class="highlight"><![CDATA[]]></strong><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Usage: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>city.transingTradesArray[0].price </p>
</td></tr><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Example: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>city.transingTradesArray[0].price </p>
</td></tr></table><p>Description goes here. </p>
<p></p>
</s2>
<s2 id="transingTradesArray[0].total" title="transingTradesArray[0].total">
<table><strong class="highlight"><![CDATA[]]></strong><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Usage: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>city.transingTradesArray[0].total </p>
</td></tr><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Example: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>city.transingTradesArray[0].total </p>
</td></tr></table><p>Description goes here. </p>
<p></p>
</s2>
<s2 id="transingTradesArray[0].id" title="transingTradesArray[0].id">
<table><strong class="highlight"><![CDATA[]]></strong><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Usage: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>city.transingTradesArray[0].id </p>
</td></tr><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Example: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>city.transingTradesArray[0].id </p>
</td></tr></table><p>Description goes here. </p>
<p></p>
</s2>
<s2 id="transingTradesArray[0].resType" title="transingTradesArray[0].resType">
<table><strong class="highlight"><![CDATA[]]></strong><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Usage: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>city.transingTradesArray[0].resType </p>
</td></tr><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Example: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>city.transingTradesArray[0].resType </p>
</td></tr></table><p>Description goes here. </p>

<br/>------------------------------------------------------------------------------<br/>
<p> <jump href="/wiki/ScriptObjects">ScriptObjects</jump> </p>
</s2></s1>