<?xml version="1.0" encoding="utf-8"?><!DOCTYPE article  PUBLIC '-//OASIS//DTD DocBook XML V4.4//EN'  'http://www.docbook.org/xml/4.4/docbookx.dtd'><article><articleinfo><title>Map</title><revhistory><revision><revnumber>16</revnumber><date>2015-10-22 05:51:14</date><authorinitials>Inanna</authorinitials></revision><revision><revnumber>15</revnumber><date>2015-10-22 05:50:44</date><authorinitials>Inanna</authorinitials></revision><revision><revnumber>14</revnumber><date>2015-10-22 05:50:12</date><authorinitials>Inanna</authorinitials></revision><revision><revnumber>13</revnumber><date>2015-06-17 04:47:27</date><authorinitials>tech</authorinitials></revision><revision><revnumber>12</revnumber><date>2014-02-10 18:57:41</date><authorinitials>Inanna</authorinitials><revremark>Renamed from 'ObjectMapCastleBean'.</revremark></revision><revision><revnumber>11</revnumber><date>2013-08-02 01:34:50</date><authorinitials>tech</authorinitials></revision><revision><revnumber>10</revnumber><date>2013-08-02 01:32:27</date><authorinitials>tech</authorinitials></revision><revision><revnumber>9</revnumber><date>2013-08-02 01:30:19</date><authorinitials>tech</authorinitials></revision><revision><revnumber>8</revnumber><date>2013-08-02 01:23:25</date><authorinitials>tech</authorinitials></revision><revision><revnumber>7</revnumber><date>2013-08-02 01:22:17</date><authorinitials>tech</authorinitials></revision><revision><revnumber>6</revnumber><date>2013-08-02 00:40:27</date><authorinitials>tech</authorinitials></revision><revision><revnumber>5</revnumber><date>2013-08-02 00:31:35</date><authorinitials>tech</authorinitials></revision><revision><revnumber>4</revnumber><date>2013-08-02 00:30:07</date><authorinitials>tech</authorinitials></revision><revision><revnumber>3</revnumber><date>2013-08-01 23:35:26</date><authorinitials>tech</authorinitials></revision><revision><revnumber>2</revnumber><date>2013-07-31 08:05:08</date><authorinitials>tech</authorinitials><revremark>consistency</revremark></revision><revision><revnumber>1</revnumber><date>2013-07-31 07:33:07</date><authorinitials>tech</authorinitials></revision></revhistory></articleinfo><para>mapCastleBean objects reference details about a location on the map. </para><para><emphasis role="strong">mapCastleBean objects can be referenced as:</emphasis> </para><itemizedlist><listitem override="none"><para><emphasis>userDefinedObject.property</emphasis> </para></listitem></itemizedlist><para>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 c<emphasis>ity.name</emphasis>. </para><para><emphasis role="strong">Properties</emphasis> </para><informaltable><tgroup cols="3"><colspec colname="col_0"/><colspec colname="col_1"/><colspec colname="col_2"/><tbody><row rowsep="1"><entry colsep="1" rowsep="1"><para><emphasis role="strong">Property </emphasis> </para></entry><entry colsep="1" rowsep="1"><para><emphasis role="strong">Type</emphasis> </para></entry><entry colsep="1" rowsep="1"><para><emphasis role="strong">Description </emphasis> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>id </para></entry><entry colsep="1" rowsep="1"><para>int </para></entry><entry colsep="1" rowsep="1"><para>Gives the FieldID of the mapCastleBean </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>lastUpdated </para></entry><entry colsep="1" rowsep="1"><para>int </para></entry><entry colsep="1" rowsep="1"><para>time the information in the mapCastleBean was last updated </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>userName </para></entry><entry colsep="1" rowsep="1"><para>String </para></entry><entry colsep="1" rowsep="1"><para>returns the player's name that owns the castle or valley, or null if unowned </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>playerLogoUrl </para></entry><entry colsep="1" rowsep="1"><para>String </para></entry><entry colsep="1" rowsep="1"><para>returns path the the player's avatar icon, or null if unowned </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>name </para></entry><entry colsep="1" rowsep="1"><para>String </para></entry><entry colsep="1" rowsep="1"><para>returns name of city, or &quot;Barbarian's city&quot;, if coords are a valley it will return a string containing valley type: &quot;Forest&quot;,&quot;Hill&quot;,&quot;Swamp&quot;,&quot;Flat&quot;,etc. </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>allianceName </para></entry><entry colsep="1" rowsep="1"><para>String </para></entry><entry colsep="1" rowsep="1"><para>returns name of player's alliance or null if unallied or unowned. </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>zoneName </para></entry><entry colsep="1" rowsep="1"><para>String </para></entry><entry colsep="1" rowsep="1"><para>returns name of state: &quot;Franconia&quot;,&quot;Lombardy&quot;,&quot;Tuscany&quot;,etc. </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>prestige </para></entry><entry colsep="1" rowsep="1"><para>int </para></entry><entry colsep="1" rowsep="1"><para>returns prestige of owner of FieldId (or 0 if unowned) </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>honor </para></entry><entry colsep="1" rowsep="1"><para>int </para></entry><entry colsep="1" rowsep="1"><para>returns honor of owner of FieldId (or 0 if unowned) </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>flag </para></entry><entry colsep="1" rowsep="1"><para>String </para></entry><entry colsep="1" rowsep="1"><para>returns the player's flag (or null if unowned/unoccupied) </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>relation </para></entry><entry colsep="1" rowsep="1"><para>int </para></entry><entry colsep="1" rowsep="1"><para>returns number indicating color of flag:  0 = green flags, 1 = blue flags, 2 = grey flags, 3 = red flags, 6 = unowned valleys or unallied castles </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>furlough </para></entry><entry colsep="1" rowsep="1"><para>Boolean </para></entry><entry colsep="1" rowsep="1"><para>Is player at indicated coords in holiday? Returns: True / False </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>state </para></entry><entry colsep="1" rowsep="1"><para>int </para></entry><entry colsep="1" rowsep="1"><para>Returns code indicating player state or status: 1 = peace, 2 = truce, 3 = beginner, 5 = holiday, 6 = dream truce </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>npc </para></entry><entry colsep="1" rowsep="1"><para>Boolean </para></entry><entry colsep="1" rowsep="1"><para>Is city at indicated coords an NPC? Returns: True / False </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>changeface </para></entry><entry colsep="1" rowsep="1"><para>int </para></entry><entry colsep="1" rowsep="1"><para>not sure what this indicates. seems to always be 0. </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>canLoot </para></entry><entry colsep="1" rowsep="1"><para>Boolean </para></entry><entry colsep="1" rowsep="1"><para>If you can loot from the coords. Returns: True / False </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>canSend </para></entry><entry colsep="1" rowsep="1"><para>Boolean </para></entry><entry colsep="1" rowsep="1"><para>If you can send to the coords. Returns: True / False </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>canScout </para></entry><entry colsep="1" rowsep="1"><para>Boolean </para></entry><entry colsep="1" rowsep="1"><para>If you can scout the coords. Returns: True / False </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>canTrans </para></entry><entry colsep="1" rowsep="1"><para>Boolean </para></entry><entry colsep="1" rowsep="1"><para>If you can transport to the coords. Returns: True / False </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>canOccupy </para></entry><entry colsep="1" rowsep="1"><para>Boolean </para></entry><entry colsep="1" rowsep="1"><para>If you can occupy the coords. Returns: True / False </para></entry></row></tbody></tgroup></informaltable><para><emphasis role="strong">Related Functions</emphasis> </para><para>RelationIndex(mapCastleBean) </para><para>RelationIndex returns values from 0 ..6 as following: </para><para>0 = Player </para><para>1 = Enemy </para><para>2 = Same </para><para>3 = Friend </para><para>4 = Neutral </para><para>5 = Other </para><para>6 = No Alliance (or No Relation) </para><para><emphasis role="strong">Examples</emphasis> </para><itemizedlist><listitem override="none"><screen><![CDATA[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]]></screen></listitem></itemizedlist><!--rule (<hr>) is not applicable to DocBook--><para> <ulink url="http://guide.neatportal.com/wiki/Map/wiki/ScriptObjects#">ScriptObjects</ulink> </para></article>