1289
Comment:
|
2185
|
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 || || ||[[TroopStrBean|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|City]] | 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. |