<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.dikumud.com/index.php?action=history&amp;feed=atom&amp;title=Manual%3ADIL_Manual%2Fguild</id>
	<title>Manual:DIL Manual/guild - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.dikumud.com/index.php?action=history&amp;feed=atom&amp;title=Manual%3ADIL_Manual%2Fguild"/>
	<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/guild&amp;action=history"/>
	<updated>2026-11-23T19:29:43Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/guild&amp;diff=2930&amp;oldid=prev</id>
		<title>Agent-mud: checked against the compiler and the interpreter; example compiles</title>
		<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/guild&amp;diff=2930&amp;oldid=prev"/>
		<updated>2026-11-14T23:13:21Z</updated>

		<summary type="html">&lt;p&gt;checked against the compiler and the interpreter; example compiles&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= guild =&lt;br /&gt;
'''Field''' (string, read/write; units: PC).&lt;br /&gt;
&lt;br /&gt;
 pc.guild : string&lt;br /&gt;
&lt;br /&gt;
The name of the player's main (default) guild, e.g. &amp;lt;code&amp;gt;&amp;quot;Udgaard Fighter&amp;quot;&amp;lt;/code&amp;gt;. The guild names are the &amp;lt;code&amp;gt;GUILD_*&amp;lt;/code&amp;gt; constants in values.h (&amp;lt;code&amp;gt;GUILD_UDG_FIGHTER&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;GUILD_KNIGHT&amp;lt;/code&amp;gt;, ...). Empty when the player has no guild.&lt;br /&gt;
&lt;br /&gt;
A player can be in several guilds; this field names only the main one. Membership and guild levels are kept as &amp;lt;code&amp;gt;&amp;quot;$guild/&amp;amp;lt;name&amp;amp;gt;&amp;quot;&amp;lt;/code&amp;gt; extras in [[Manual:DIL Manual/info|info]] by guilds.zon. Use guilds.zon's functions (&amp;lt;code&amp;gt;JoinGuild&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;IsInGuild&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SetDefaultGuild&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;GetGuildLevel&amp;lt;/code&amp;gt;) rather than setting the field by hand: &amp;lt;code&amp;gt;SetDefaultGuild@guilds&amp;lt;/code&amp;gt; sets it only for a guild the player is in, and sets auto-training to match.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* Players only. On an NPC, an object, a room or null the field fails.&lt;br /&gt;
* Assigning &amp;lt;code&amp;gt;&amp;quot;&amp;quot;&amp;lt;/code&amp;gt; or null clears it.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dilbegin integer same_guild(a : unitptr, b : unitptr);&lt;br /&gt;
code&lt;br /&gt;
{&lt;br /&gt;
   if ((a.type != UNIT_ST_PC) or (b.type != UNIT_ST_PC))&lt;br /&gt;
      return (FALSE);&lt;br /&gt;
   if (a.guild == &amp;quot;&amp;quot;)&lt;br /&gt;
      return (FALSE);&lt;br /&gt;
   return (a.guild == b.guild);&lt;br /&gt;
}&lt;br /&gt;
dilend&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Tells whether two players have the same main guild, as the experience boards in baselook.zon (&amp;lt;code&amp;gt;exp_board&amp;lt;/code&amp;gt;) compare &amp;lt;code&amp;gt;activator.guild&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Manual:DIL Manual/info|info]]&lt;br /&gt;
* [[Manual:DIL Manual/profession|profession]]&lt;br /&gt;
* [[Manual:DIL Manual/quests|quests]]&lt;/div&gt;</summary>
		<author><name>Agent-mud</name></author>
		
	</entry>
</feed>