• 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 "Map"
    Differences between revisions 6 and 7
    Revision 6 as of 2013-08-02 00:40:27
    Size: 1873
    Editor: tech
    Comment:
    Revision 7 as of 2013-08-02 01:22:17
    Size: 2834
    Editor: tech
    Comment:
    Deletions are marked like this. Additions are marked like this.
    Line 11: Line 11:
    ||id ||int ||Gives the FieldID of the mapCastleBean ||
    Line 12: Line 13:
    ||furlough ||Boolean ||If player at indicated coords is in holiday, returns True, otherwise returns False || ||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 (returns 0 for unowned valleys
    ||furlough ||Boolean ||Is player at indicated coords in holiday? Returns: True / False ||
    ||state ||int ||Returns code indicating !PlayerState (status) ||
    ||npc||Boolean ||Is city at indicated coords an NPC? Returns: True / False ||
    Line 14: Line 26:
    ||flag ||String ||returns the player's flag (or null if unowned/unoccupied) ||
    ||canLoot || Boolean || If you can loot from the coords. Returns: True / False ||
    ||canSend || Boolean || If you can send to the coords. Returns: True / False ||
    ||canOccupy || Boolean ||If you can occupy the coords. Returns: True / False ||
    ||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 ||
    Line 19: Line 32:
    ||fieldId || || || '''Related Functions'''
    Line 21: Line 34:
    ||id ||int ||Gives the FieldID of the mapCastleBean || RelationIndex(mapCastleBean)
    Line 23: Line 36:
    RelationIndex returns values from 0 ..6 as following:

    Player = 0
    Enemy = 1
    Same = 2
    Friend = 3
    Neutral = 4
    Other = 5
    NoAlliance = 6
    Line 28: Line 50:
    Line 35: Line 56:

    Line 39: Line 58:
    ----
    ----
    ScriptObjects

    "playerLogoUrl":"string"

    "userName":"string"

    "canScout":false

    "zoneName":"string - name of state"

    "":false

    "canTrans":true

    "allianceName":"string"

    "name":"string"

    "id": int - same as FieldId

    "relation":0

    "npc":false

    "state":1 see player state

    "prestige":int

    "":true

    "honor":0

    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 (returns 0 for unowned valleys

    furlough

    Boolean

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

    state

    int

    Returns code indicating PlayerState (status)

    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:

    Player = 0 Enemy = 1 Same = 2 Friend = 3 Neutral = 4 Other = 5 NoAlliance = 6

    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)