Size: 1873
Comment:
|
Size: 2873
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 6 for unowned valleys) || ||furlough ||Boolean ||Is player at indicated coords in holiday? Returns: True / False || ||state ||int ||Returns code indicating [[Player State|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 || ||fieldId || || || ||id ||int ||Gives the FieldID of the mapCastleBean || |
||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 24: | Line 33: |
'''Related Functions''' RelationIndex(mapCastleBean) RelationIndex returns values from 0 ..6 as following: Player = 0 Enemy = 1 Same = 2 Friend = 3 Neutral = 4 Other = 5 No Alliance (or No Relation) = 6 |
|
Line 28: | Line 45: |
Line 35: | Line 51: |
Line 40: | Line 54: |
---- | |
Line 42: | Line 55: |
"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 ---- ScriptObjects |
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 6 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 No Alliance (or No Relation) = 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