• My Pages
  • Comments
  • Add Link
  • Subscribe
  • Subscribe User
  • 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 "Castle"
    Differences between revisions 2 and 10 (spanning 8 versions)
    Revision 2 as of 2012-11-29 17:22:50
    Size: 1275
    Editor: Inanna
    Comment:
    Revision 10 as of 2015-02-17 23:01:17
    Size: 2185
    Editor: LKD70
    Comment:
    Deletions are marked like this. Additions are marked like this.
    Line 11: Line 11:
    ||herosArray ||array || ||
    ||tradesArray ||array || ||
    ||id ||int || ||
    ||buffsArray ||array || ||
    ||[[FortificationBean|fortification]] ||object || ||
    ||logUrl ||string || ||
    ||goOutForBattle ||boolean || ||
    ||[[TroopBean|troop]] ||object || ||
    ||status ||int || ||
    ||name ||string || ||
    ||buildingQueuesArray ||array || ||
    ||ResourceBean|resource]] ||object || ||
    ||allowAlliance ||boolean || ||
    ||usePACIFY_SUCCOUR_OR_PACIFY_PRAY ||int || ||
    ||fieldId ||int || ||
    ||buildingsArray ||array || ||
    ||fieldsArray ||array || ||
    ||hasEnemy ||boolean || ||
    ||transingTradesArray ||array || ||
    ||allowAlliance ||Boolean ||Returns true if the embassy is open. ||
    ||buffs ||Object ||Returns an object of the current castles buffs.||
    ||buildingQueuesArray ||Array ||Returns information on the current castles building queues.||
    ||buildingsArray ||Array of Objects ||Returns infromation on the current castles buildings.||
    ||fieldId ||Integer ||Returns the Field ID of the cuttent Castle.||
    ||fieldsArray ||Array ||Returns infromation on the castles fields.||
    ||fortification ||Object ||Returns infromation on the castles fortifications.||
    ||hasEnemy ||Boolean ||Returns true if the castle has incoming attacks.||
    ||herosArray ||Array of Objects ||Returns information on the heroes in the castle.||
    ||id ||Integer ||Returns the unique ID of the castle.||
    ||logUrl ||String ||Returns the path of the Castle image.||
    ||maxPopulation ||Integer ||Returns the max population of the castle.||
    ||name ||String ||Returns the name of the current castle.||
    ||oid ||Integer ||Returns the old Castle ID. ||
    ||resource ||Object ||Returns an object containing the current castles resource infromation.||
    ||support ||Boolean ||Returns true if supporting troops exist.||
    ||tradesArray ||Array Of Objects ||Returns information on current trades in the castle.||
    ||transingTradesArray ||Array ||Returns infromation on successful ongoing trades.||
    ||troop ||Object ||Returns infroamtion on the current castles troops.||
    ||usePACIFY_SUCCOUR_OR_PACIFY_PRAY ||boolean ||Returns true if conforting is in cooldown.||
    Line 31: Line 32:
    ObjectCity ScriptObjects

    The Castle objects can reference details about the city the script is run in.

    Castle objects can be referenced as:

    • m_city.cityManager.castle.property or city.castle.property

    The .property at the end is how you will specify which detail you are referencing. Using the table below, you can for example get the name of the city with city.castle.name. Some castle properties are aliased via the city object as well, for example city.castle.name and city.name are the same thing.

    Properties

    Property

    Type

    Description

    allowAlliance

    Boolean

    Returns true if the embassy is open.

    buffs

    Object

    Returns an object of the current castles buffs.

    buildingQueuesArray

    Array

    Returns information on the current castles building queues.

    buildingsArray

    Array of Objects

    Returns infromation on the current castles buildings.

    fieldId

    Integer

    Returns the Field ID of the cuttent Castle.

    fieldsArray

    Array

    Returns infromation on the castles fields.

    fortification

    Object

    Returns infromation on the castles fortifications.

    hasEnemy

    Boolean

    Returns true if the castle has incoming attacks.

    herosArray

    Array of Objects

    Returns information on the heroes in the castle.

    id

    Integer

    Returns the unique ID of the castle.

    logUrl

    String

    Returns the path of the Castle image.

    maxPopulation

    Integer

    Returns the max population of the castle.

    name

    String

    Returns the name of the current castle.

    oid

    Integer

    Returns the old Castle ID.

    resource

    Object

    Returns an object containing the current castles resource infromation.

    support

    Boolean

    Returns true if supporting troops exist.

    tradesArray

    Array Of Objects

    Returns information on current trades in the castle.

    transingTradesArray

    Array

    Returns infromation on successful ongoing trades.

    troop

    Object

    Returns infroamtion on the current castles troops.

    usePACIFY_SUCCOUR_OR_PACIFY_PRAY

    boolean

    Returns true if conforting is in cooldown.


    ScriptObjects

    Castle (last edited 2015-02-21 05:36:28 by tech)