[an error occurred while processing this directive]
[<a href="index.shtml">Package Index</a></code> | <a href="index_std.shtml">Mudlib Index</a></code> | <a href="index_eff.shtml">Effect Index</a></code>]<br><h2>File /obj/handlers/soul_categories.c</h2>
A handler to categorise souls (and some words) so NPCs can easily respond
to or use certain types.<p>Written by Kaylar
<p>Started June 2006<h2>Method index</h2>
<ul>
<li><a href="#get_souls">get_souls</a>(string, int)<br/>
This method gets an array of souls of the desired category.
<li><a href="#get_words">get_words</a>(string)<br/>
This method gets an array of words of the desired category.
<li><a href="#is_soul_in_category">is_soul_in_category</a>(string, string)<li><a href="#is_word_in_category">is_word_in_category</a>(string, string)<li><a href="#query_soul_categories">query_soul_categories</a>()<br/>
This method queries all the categories of souls.
<li><a href="#query_word_categories">query_word_categories</a>()<br/>
This method queries all the categories of words.
<li><a href="#set_souls">set_souls</a>()<li><a href="#set_words">set_words</a>()</ul>
<h2>Public Functions</h2>
These are functions that everyone can access.<p>
<dl>
<dt class="autodocfuncname"><a name="get_souls">
get_souls</a><pre class="autodocfuncdef">
string * get_souls(string category,
                   int a_r_t_w)
</pre><dd><br />
This method gets an array of souls of the desired category.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
category - The category of souls. You can choose either sub categories
 like "happiness_laugh" or full categories like "happiness". A list can be
 seen with query_soul_categories(). There are a few special categories not
 listed including "touch", "nice" and "nasty".<br />
a_r_t_w - Set this to 1 if you want the souls to have the "@" in
 front that they need for an add_respond_to_with, and 0 for just the
 souls.<br />
<br />
<dd><b>Returns:</b>
<br />An array of the souls matching the category.<br /><br />
<dd><b>See also:</b>
<br />query_soul_categories.c, get_words.c and query_word_categories
.c<br /><br /><dd><b>Example:</b>
<br/><pre> string *souls;

 souls = ("/obj/handlers/soul_categories")->get_souls( "laughter", 1 );

 if( sizeof( souls ) ) {
   add_respond_to_with( ({ souls }), "you" }), "'Stop laughing at me!" );
 }</pre><br /></dl>

<dt class="autodocfuncname"><a name="get_words">
get_words</a><pre class="autodocfuncdef">
string * get_words(string category)
</pre><dd><br />
This method gets an array of words of the desired category.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
category - The category of words. You can choose either sub categories
 like "greetings_weird" or full categories like "greetings". A list can be
 seen with query_word_categories()<br />
<br />
<dd><b>Returns:</b>
<br />An array of the words matching the category.<br /><br />
<dd><b>See also:</b>
<br />query_word_categories.c, get_souls.c and query_soul_categories
.c<br /><br /><dd><b>Example:</b>
<br/><pre> string *words;

 words = ("/obj/handlers/soul_categories")->get_words( "greetings", 1 );

 if( sizeof( words ) ) {
   add_respond_to_with( ({ "@say", words }), "greet $hname$" );
 }</pre><br /></dl>

<dt class="autodocfuncname"><a name="is_soul_in_category">
is_soul_in_category</a><pre class="autodocfuncdef">
int is_soul_in_category(string soul,
                        string category)
</pre>
<dt class="autodocfuncname"><a name="is_word_in_category">
is_word_in_category</a><pre class="autodocfuncdef">
int is_word_in_category(string word,
                        string category)
</pre>
<dt class="autodocfuncname"><a name="query_soul_categories">
query_soul_categories</a><pre class="autodocfuncdef">
string * query_soul_categories()
</pre><dd><br />
This method queries all the categories of souls.<br />
<br /><dl>
<dd><b>Returns:</b>
<br />An array of all soul categories.<br /><br />
<dd><b>See also:</b>
<br />get_souls
.c<br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="query_word_categories">
query_word_categories</a><pre class="autodocfuncdef">
string * query_word_categories()
</pre><dd><br />
This method queries all the categories of words.<br />
<br /><dl>
<dd><b>Returns:</b>
<br />An array of all word categories.<br /><br />
<dd><b>See also:</b>
<br />get_words
.c<br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="set_souls">
set_souls</a><pre class="autodocfuncdef">
void set_souls()
</pre>
<dt class="autodocfuncname"><a name="set_words">
set_words</a><pre class="autodocfuncdef">
void set_words()
</pre>
</dl>
[an error occurred while processing this directive]

