[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 /cmds/guild_base.c</h2>
This is the base object for all the guild/race commands.  It handles
all the common bits of guild/race commands, including teachability
and help files.<p>Written by Pinkfish
<h2>Inherits</h2>
This class inherits the following classes <a href="cmds.base.c.shtml">/cmds/base.c</a><h2>Includes</h2>
This class includes the following files <a href="include.nroff.h.shtml">/include/nroff.h</a> and /include/cmds/guild_base.h<h2>Method index</h2>
<dl><ul>
<li><a href="#add_teach_skill">add_teach_skill</a>(string, int, int)<br/>
This method sets the teach level for the command.
<li><a href="#can_teach_command">can_teach_command</a>(object, object)<br/>
This method checks to see if the command can be taught or not.
<li><a href="#help">help</a>()<br/>
This method returns the help as a string.
<li><a href="#help_function">help_function</a>()<br/>
This method returns the help data as a function pointer.
<li><a href="#query_command_name">query_command_name</a>()<br/>
This method returns the current command name of the command.
<li><a href="#query_nroff_file">query_nroff_file</a>()<br/>
This method returns the name of the nroff help file associated with this
command.
<li><a href="#query_teach_guild">query_teach_guild</a>()<br/>
This method returns the currently set specific guild.
<li><a href="#query_teach_skills">query_teach_skills</a>()<br/>
This method returns the current teach skill level.
<li><a href="#query_www_help">query_www_help</a>()<br/>
This method returns the help in a html format for use with the
web.
<li><a href="#set_command_name">set_command_name</a>(string)<br/>
This method sets the name of the command.
<li><a href="#set_nroff_file">set_nroff_file</a>(string)<br/>
Set the name of the nroff help file.
<li><a href="#set_teach_guild">set_teach_guild</a>(string)<br/>
This method sets the command to be only able to be taught to a specific
guild.
<li><a href="#teach_command">teach_command</a>(object, object)<br/>
This method actually teaches the command to the student.
</ul><h2>Public Functions</h2>
These are functions that everyone can access.<p>
.<ul><a name="add_teach_skill">
add_teach_skill</a><pre>
void add_teach_skill(string skill,
                     int teach,
                     int learn)
</pre></br>
This method sets the teach level for the command.  The player must
be over this level in the teaching skill to be able to teach this
command to the player.  If this is set to 0, then teaching is inhibited.
<br/><ul>
<li><b>Parameters:</b>
<br/>level - the new teaching level

</dl>

<ul><a name="can_teach_command">
can_teach_command</a><pre>
int can_teach_command(object teacher,
                      object student)
</pre></br>
This method checks to see if the command can be taught or not.
<br/><ul>
<li><b>Parameters:</b>
<br/>teacher - the person doing the teaching
<br/>student - the person being taught
<li><b>Returns:</b>
<br/>0 on failure, 1 on success, -1 if teacher is too low level, -2
if student is too low level

</dl>

<ul><a name="help">
help</a><pre>
string help()
</pre></br>
This method returns the help as a string.
<br/><ul>
<li><b>Returns:</b>
<br/>the help as a string

</dl>

<ul><a name="help_function">
help_function</a><pre>
function help_function()
</pre></br>
This method returns the help data as a function pointer.
The function pointer needs to be evaluated to create the actual text.
<br/><ul>
<li><b>Returns:</b>
<br/>the function pointer for the help text

</dl>

<ul><a name="query_command_name">
query_command_name</a><pre>
string query_command_name()
</pre></br>
This method returns the current command name of the command.
<br/><ul>
<li><b>Returns:</b>
<br/>the current command name

</dl>

<ul><a name="query_nroff_file">
query_nroff_file</a><pre>
string query_nroff_file()
</pre></br>
This method returns the name of the nroff help file associated with this
command.
<br/><ul>
<li><b>Returns:</b>
<br/>the nroff help file name

</dl>

<ul><a name="query_teach_guild">
query_teach_guild</a><pre>
string query_teach_guild()
</pre></br>
This method returns the currently set specific guild.  If this is 0 then
the command can be taught to any guild.
<br/><ul>
<li><b>Returns:</b>
<br/>the current teach guild

</dl>

<ul><a name="query_teach_skills">
query_teach_skills</a><pre>
class teach_skill * query_teach_skills()
</pre></br>
This method returns the current teach skill level.
<br/><ul>
<li><b>Returns:</b>
<br/>the current teach skill level

</dl>

<ul><a name="query_www_help">
query_www_help</a><pre>
string query_www_help()
</pre></br>
This method returns the help in a html format for use with the
web.
<br/><ul>
<li><b>Returns:</b>
<br/>a html string

</dl>

<ul><a name="set_command_name">
set_command_name</a><pre>
void set_command_name(string name)
</pre></br>
This method sets the name of the command.  This is used in the teaching
to teach the command to the student.
<br/><ul>
<li><b>Parameters:</b>
<br/>name - the new command name

</dl>

<ul><a name="set_nroff_file">
set_nroff_file</a><pre>
void set_nroff_file(string str)
</pre></br>
Set the name of the nroff help file.
<br/><ul>
<li><b>Parameters:</b>
<br/>str - the nroff help file name

</dl>

<ul><a name="set_teach_guild">
set_teach_guild</a><pre>
void set_teach_guild(string guild)
</pre></br>
This method sets the command to be only able to be taught to a specific
guild.  If this is set to 0 then the command can be taught to
any guild, this is the default.
<br/><ul>
<li><b>Parameters:</b>
<br/>guild - the guild object it can be taught to

</dl>

<ul><a name="teach_command">
teach_command</a><pre>
int teach_command(object teacher,
                  object student)
</pre></br>
This method actually teaches the command to the student.
<br/><ul>
<li><b>Parameters:</b>
<br/>teacher - the teacher of the command
<br/>student - the student of the command
<li><b>Returns:</b>
<br/>0 on failure, 1 on success, -1 if teacher is too low level, -2
if student is too low level

</dl>


[an error occurred while processing this directive]

