<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://wiki.herc.ws/w/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.herc.ws/w/index.php?action=history&amp;feed=atom&amp;title=Getcastledata</id>
		<title>Getcastledata - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.herc.ws/w/index.php?action=history&amp;feed=atom&amp;title=Getcastledata"/>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/w/index.php?title=Getcastledata&amp;action=history"/>
		<updated>2026-05-02T00:33:39Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.21.11</generator>

	<entry>
		<id>https://wiki.herc.ws/w/index.php?title=Getcastledata&amp;diff=532&amp;oldid=prev</id>
		<title>Neqste: Created page with &quot;==Syntax== *'''getcastledata'''(&quot;&lt;map name&gt;&quot;,&lt;type of data&gt;); *'''setcastledata''' &quot;&lt;map name&gt;&quot;,&lt;type of data&gt;,&lt;value&gt;;   ==Description== This function returns the castle owne...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/w/index.php?title=Getcastledata&amp;diff=532&amp;oldid=prev"/>
				<updated>2013-06-28T08:11:38Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Syntax== *&amp;#039;&amp;#039;&amp;#039;getcastledata&amp;#039;&amp;#039;&amp;#039;(&amp;quot;&amp;lt;map name&amp;gt;&amp;quot;,&amp;lt;type of data&amp;gt;); *&amp;#039;&amp;#039;&amp;#039;setcastledata&amp;#039;&amp;#039;&amp;#039; &amp;quot;&amp;lt;map name&amp;gt;&amp;quot;,&amp;lt;type of data&amp;gt;,&amp;lt;value&amp;gt;;   ==Description== This function returns the castle owne...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Syntax==&lt;br /&gt;
*'''getcastledata'''(&amp;quot;&amp;lt;map name&amp;gt;&amp;quot;,&amp;lt;type of data&amp;gt;);&lt;br /&gt;
*'''setcastledata''' &amp;quot;&amp;lt;map name&amp;gt;&amp;quot;,&amp;lt;type of data&amp;gt;,&amp;lt;value&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
This function returns the castle ownership information for the castle &lt;br /&gt;
referred to by its map name. Castle information is stored in &lt;br /&gt;
`guild_castle` SQL table.&lt;br /&gt;
&lt;br /&gt;
Types of data correspond to `guild_castle` table columns:&lt;br /&gt;
     1 - `guild_id`   - Guild ID.&lt;br /&gt;
     2 - `economy`    - Castle Economy score.&lt;br /&gt;
     3 - `defense`    - Castle Defense score.&lt;br /&gt;
     4 - `triggerE`   - Number of times the economy was invested in today.&lt;br /&gt;
     5 - `triggerD`   - Number of times the defense was invested in today.&lt;br /&gt;
     6 - `nextTime`   - unused&lt;br /&gt;
     7 - `payTime`    - unused&lt;br /&gt;
     8 - `createTime` - unused&lt;br /&gt;
     9 - `visibleC`   - Is 1 if a Kafra was hired for this castle, 0 otherwise.&lt;br /&gt;
    10 - `visibleG0`  - Is 1 if the 1st guardian is present (Soldier Guardian)&lt;br /&gt;
    11 - `visibleG1`  - Is 1 if the 2nd guardian is present (Soldier Guardian)&lt;br /&gt;
    12 - `visibleG2`  - Is 1 if the 3rd guardian is present (Soldier Guardian)&lt;br /&gt;
    13 - `visibleG3`  - Is 1 if the 4th guardian is present (Archer Guardian)&lt;br /&gt;
    14 - `visibleG4`  - Is 1 if the 5th guardian is present (Archer Guardian)&lt;br /&gt;
    15 - `visibleG5`  - Is 1 if the 6th guardian is present (Knight Guardian)&lt;br /&gt;
    16 - `visibleG6`  - Is 1 if the 7th guardian is present (Knight Guardian)&lt;br /&gt;
    17 - `visibleG7`  - Is 1 if the 8th guardian is present (Knight Guardian)&lt;br /&gt;
&lt;br /&gt;
All types of data have their meaning determined by War of Emperium &lt;br /&gt;
scripts, with exception of:&lt;br /&gt;
    - `guild_id` that is always the ID of the guild that owns the castle,&lt;br /&gt;
    - `defense` that is used in Guardians &amp;amp; Emperium HP calculations,&lt;br /&gt;
    - `visibleG` that is always considered to hold guardian presence bits.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''setcastledata''' command will behave identically, but instead of &lt;br /&gt;
returning values for the specified types of accessible data, it will alter &lt;br /&gt;
them and cause them to be sent to the char-server for storage.&lt;br /&gt;
&lt;br /&gt;
Changing Guild ID or Castle Defense will trigger additional actions, like &lt;br /&gt;
recalculating guardians' HP.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Script Command]]&lt;/div&gt;</summary>
		<author><name>Neqste</name></author>	</entry>

	</feed>