• 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 "Market"
    Differences between revisions 11 and 12
    Revision 11 as of 2012-12-04 18:36:01
    Size: 17297
    Editor: Inanna
    Comment:
    Revision 12 as of 2013-07-30 16:38:24
    Size: 16186
    Editor: tech
    Comment:
    Deletions are marked like this. Additions are marked like this.
    Line 4: Line 4:
    == buyPrice(X) ==
    ||<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;">city.buyPrice(X) ||
    ||<#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;">city.buyPrice(X) ||
    == BuyPrice(X) ==
    ||<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;">BuyPrice(X) ||
    ||<#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;">BuyPrice(X) ||
    Line 29: Line 29:
    1: ifgoto city.buyPrice(2) >= 1 sellfood 1: ifgoto BuyPrice(2) >= 1 sellfood
    Line 46: Line 46:
    == sellPrice(X) ==
    ||<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;">city.sellPrice(X) ||
    ||<#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;">city.sellPrice(X) ||
    == SellPrice(X) ==
    ||<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;">SellPrice(X) ||
    ||<#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;">SellPrice(X) ||
    Line 70: Line 70:
    1: ifgoto city.sellPrice(2) >= 1 buyiron 1: ifgoto SellPrice(2) >= 1 buyiron
    Line 89: Line 89:

    Description goes here
    .

    == tradesArray[0].amount ==
    ||<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;">city.tradesArray[0].amount ||
    Returns the number of trades you have posted in the market which have not completed.




    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.

    == tradesArray[x].amount ==
    ||<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;">city.tradesArray[x].amount ||
    Line 96: Line 100:

    Description goes here.

    == tradesArray[1].amount ==
    ||<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;">city.tradesArray[1].amount ||
    ||<#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;">city.tradesArray[1].amount ||


    Description goes here.

    == tradesArray[2].amount ==
    ||<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;">city.tradesArray[2].amount ||
    ||<#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;">city.tradesArray[2].amount ||


    Description goes here.

    == tradesArray[6].amount ==
    ||<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;">city.tradesArray[6].amount ||
    ||<#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;">city.tradesArray[6].amount ||


    Description goes here.

    == tradesArray[0].resType ==
    ||<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;">city.tradesArray[0].resType ||
    returns a number indicating the quantity of resources being purchased or sold in city.tradesArray[x]


    == tradesArray[x].resType ==
    ||<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;">city.tradesArray[x].resType ||
    Line 124: Line 107:

    Description goes
    here.

    ==
    tradesArray[0].tradeType ==
    ||<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;">city.tradesArray[0].tradeType ||
    returns a number representing the resource type of the resources being purchased or sold in city.tradesArray[x]

    0 = Food
    1 = Lumber / Wood
    2 = Stone
    3 = Iron


    == tradesArray[x
    ].tradeType ==
    ||<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;">city.tradesArray[x].tradeType ||
    Line 131: Line 119:

    Descri
    ption goes here.

    ==
    tradesArray[0].resourceName ==
    ||<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;">city.tradesArray[0].resourceName ||
    returns a number indicating trade type of the trade in city.tradesArray[x]

    0 = Buy
    1 = Sell


    == tradesArray[x
    ].resourceName ==
    ||<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;">city.tradesArray[x].resourceName ||
    Line 138: Line 129:

    Description goes here.

    == tradesArray[0].price ==
    returns a string containing the name of the resource type of the resources being purchased or sold in city.tradesArray[x] ("Food","Lumber","Stone","Iron")


    == tradesArray[x].price ==
    Line 145: Line 136:

    Description goes here.

    == tradesArray[0].id ==
    returns a number indicating price of the trade in city.tradesArray[x]


    == tradesArray[x].id ==
    Line 152: Line 143:

    Description goes here.

    == tradesArray[0].tradeTypeName ==
    returns a number indicating returns the internal ID of the trade in city.tradesArray[x]


    == tradesArray[x].tradeTypeName ==
    Line 159: Line 150:

    Descri
    ption goes here.

    == tradesArray[0].dealedAmount ==
    ||<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;">city.tradesArray[0].dealedAmount ||
    returns a string indicating the type of trade in city.tradesArray[x] ("Bid","Offer")


    == tradesArray[x].dealedAmount ==
    ||<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;">city.tradesArray[x].dealedAmount ||
    Line 183: Line 174:
    in the following examples, the value of x can be from 0 to ???, as you can have an infinite number of incoming purchases

    

    BuyPrice(X)

    Usage:

    BuyPrice(X)

    Example:

    BuyPrice(X)

    Refers to the highest bid of a given resource.

    0=food,1=wood,2=stone,3=iron

    Script

    echo "food costs"city.buyPrice(2)

    Output

    19:03:29 food costs 15.62

    Example of usage

    label start

    1: ifgoto BuyPrice(2) >= 1 sellfood

    2: sleep 50

    3: loop start

    label sellfood

    4: sell food 1000 1

    5: goto start

    SellPrice(X)

    Usage:

    SellPrice(X)

    Example:

    SellPrice(X)

    Refers to the cheapest offer of a given resource.

    0=food,1=wood,2=stone,3=iron

    Script

    echo "iron is offered at"city.sellPrice(2)

    Output

    19:03:29 iron is offered at 15.62

    Example of usage

    label start

    1: ifgoto SellPrice(2) >= 1 buyiron

    2: sleep 50

    3: loop start

    label buyiron

    4: buy iron 1000 1

    5: goto start

    tradesArray.length

    Usage:

    city.tradesArray.length

    Example:

    city.tradesArray.length

    Returns the number of trades you have posted in the market which have not completed.

    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.

    tradesArray[x].amount

    Usage:

    city.tradesArray[x].amount

    Example:

    city.tradesArray[0].amount

    returns a number indicating the quantity of resources being purchased or sold in city.tradesArray[x]

    tradesArray[x].resType

    Usage:

    city.tradesArray[x].resType

    Example:

    city.tradesArray[0].resType

    returns a number representing the resource type of the resources being purchased or sold in city.tradesArray[x]

    0 = Food 1 = Lumber / Wood 2 = Stone 3 = Iron

    tradesArray[x].tradeType

    Usage:

    city.tradesArray[x].tradeType

    Example:

    city.tradesArray[0].tradeType

    returns a number indicating trade type of the trade in city.tradesArray[x]

    0 = Buy 1 = Sell

    tradesArray[x].resourceName

    Usage:

    city.tradesArray[x].resourceName

    Example:

    city.tradesArray[0].resourceName

    returns a string containing the name of the resource type of the resources being purchased or sold in city.tradesArray[x] ("Food","Lumber","Stone","Iron")

    tradesArray[x].price

    Usage:

    city.tradesArray[0].price

    Example:

    city.tradesArray[0].price

    returns a number indicating price of the trade in city.tradesArray[x]

    tradesArray[x].id

    Usage:

    city.tradesArray[0].id

    Example:

    city.tradesArray[0].id

    returns a number indicating returns the internal ID of the trade in city.tradesArray[x]

    tradesArray[x].tradeTypeName

    Usage:

    city.tradesArray[0].tradeTypeName

    Example:

    city.tradesArray[0].tradeTypeName

    returns a string indicating the type of trade in city.tradesArray[x] ("Bid","Offer")

    tradesArray[x].dealedAmount

    Usage:

    city.tradesArray[x].dealedAmount

    Example:

    city.tradesArray[0].dealedAmount

    Description goes here.

    tradesArray[0].dealedTotal

    Usage:

    city.tradesArray[0].dealedTotal

    Example:

    city.tradesArray[0].dealedTotal

    Description goes here.

    transingTradesArray.length

    Usage:

    city.transingTradesArray.length

    Example:

    city.transingTradesArray.length

    Description goes here.

    in the following examples, the value of x can be from 0 to ???, as you can have an infinite number of incoming purchases

    transingTradesArray[0].amount

    Usage:

    city.transingTradesArray[0].amount

    Example:

    city.transingTradesArray[0].amount

    Description goes here.

    transingTradesArray[0].endTime

    Usage:

    city.transingTradesArray[0].endTime

    Example:

    city.transingTradesArray[0].endTime

    Description goes here.

    transingTradesArray[0].resourceName

    Usage:

    city.transingTradesArray[0].resourceName

    Example:

    city.transingTradesArray[0].resourceName

    Description goes here.

    transingTradesArray[0].price

    Usage:

    city.transingTradesArray[0].price

    Example:

    city.transingTradesArray[0].price

    Description goes here.

    transingTradesArray[0].total

    Usage:

    city.transingTradesArray[0].total

    Example:

    city.transingTradesArray[0].total

    Description goes here.

    transingTradesArray[0].id

    Usage:

    city.transingTradesArray[0].id

    Example:

    city.transingTradesArray[0].id

    Description goes here.

    transingTradesArray[0].resType

    Usage:

    city.transingTradesArray[0].resType

    Example:

    city.transingTradesArray[0].resType

    Description goes here.

    m_context.sellPrice(0)

    m_context.buyPrice(0)

    m_context.sellPrice(1)

    m_context.buyPrice(1)

    m_context.sellPrice(2)

    m_context.buyPrice(2)

    m_context.sellPrice(3)

    m_context.buyPrice(3)


    ObjectCity

    Market (last edited 2014-02-10 18:41:43 by Inanna)