• 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

    mapCastleBean objects reference details about a location on the map.

    mapCastleBean objects can be referenced as:

    • userDefinedObject.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.name.

    Properties

    Property

    Type

    Description

    id

    int

    Gives the FieldID of the mapCastleBean

    lastUpdated

    int

    time the information in the mapCastleBean was last updated

    userName

    String

    returns the player's name that owns the castle or valley, or null if unowned

    playerLogoUrl

    String

    returns path the the player's avatar icon, or null if unowned

    name

    String

    returns name of city, or "Barbarian's city", if coords are a valley it will return a string containing valley type: "Forest","Hill","Swamp","Flat",etc.

    allianceName

    String

    returns name of player's alliance or null if unallied or unowned.

    zoneName

    String

    returns name of state: "Franconia","Lombardy","Tuscany",etc.

    prestige

    int

    returns prestige of owner of FieldId (or 0 if unowned)

    honor

    int

    returns honor of owner of FieldId (or 0 if unowned)

    flag

    String

    returns the player's flag (or null if unowned/unoccupied)

    relation

    int

    returns number indicating color of flag: 0 = green flags, 1 = blue flags, 2 = grey flags, 3 = red flags, 6 = unowned valleys or unallied castles

    furlough

    Boolean

    Is player at indicated coords in holiday? Returns: True / False

    state

    int

    Returns code indicating player state or status: 1 = peace, 2 = truce, 3 = beginner, 5 = holiday, 6 = dream truce

    npc

    Boolean

    Is city at indicated coords an NPC? Returns: True / False

    changeface

    int

    not sure what this indicates. seems to always be 0.

    canLoot

    Boolean

    If you can loot from the coords. Returns: True / False

    canSend

    Boolean

    If you can send to the coords. Returns: True / False

    canScout

    Boolean

    If you can scout the coords. Returns: True / False

    canTrans

    Boolean

    If you can transport to the coords. Returns: True / False

    canOccupy

    Boolean

    If you can occupy the coords. Returns: True / False

    Related Functions

    RelationIndex(mapCastleBean)

    RelationIndex returns values from 0 ..6 as following:

    0 = Player

    1 = Enemy

    2 = Same

    3 = Friend

    4 = Neutral

    5 = Other

    6 = No Alliance (or No Relation)

    Examples

    • fid = GetFieldId(123,456) // convert coordinates into FieldId
      mcb = GetDetailInfo(fid) // retrieve mapCastleBean object containing details for specified FieldId
      if mcb == null repeat // if the server did not send updated info, repeat last step
      echo mcb.name
      echo mcb.allianceName
      echo mcb.prestige


    ScriptObjects

    Map (last edited 2015-10-22 05:51:14 by Inanna)