[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 /d/cwc/Bes_Pelargic/inherit/bp_citizen.c</h2>
Bes Pelargic citizen
NPCs inheriting this file will have AI to cope with things that might
happen to them in Bes Pelargic
<p>Written by Dasquian<p>Started on 14 February 2001

<h2>Inherits</h2>
This class inherits the following classes <a href="obj.monster.c.shtml">/obj/monster.c</a>, /d/cwc/inherit/smart_armoury.c and /d/cwc/inherit/family_member.c<h2>Includes</h2>
This class includes the following files <a href="include.cwc.h.shtml">/include/cwc.h</a>, <a href="include.magic.h.shtml">/include/magic.h</a> and <a href="include.move_failures.h.shtml">/include/move_failures.h</a><h2>Method index</h2>
<ul>
<li><a href="#event_death">event_death</a>(object, object *, object, string, string)<li><a href="#event_enter">event_enter</a>(object, string, object)<br/>
This stops them getting mangled by Pragi's Lost Gaze, bloody wizards.
<li><a href="#event_npc_cast_spell">event_npc_cast_spell</a>(object, object, object *, class spell_argument, int)<li><a href="#get_return_time">get_return_time</a>(object, int)<li><a href="#identify_spell">identify_spell</a>(object, int, int)<li><a href="#log_message">log_message</a>(string)<li><a href="#nasty_spell_happening">nasty_spell_happening</a>(object, object, int, int)<li><a href="#notice_spell">notice_spell</a>(object, int, int)<li><a href="#query_aggression">query_aggression</a>()<li><a href="#query_family">query_family</a>()<li><a href="#query_family_value">query_family_value</a>()<li><a href="#query_responsible">query_responsible</a>()<li><a href="#query_return_items">query_return_items</a>()<li><a href="#query_return_items_mess">query_return_items_mess</a>()<li><a href="#reset_stuff">reset_stuff</a>()<li><a href="#return_here">return_here</a>(object)<li><a href="#second_life">second_life</a>()<li><a href="#set_aggression">set_aggression</a>(int)<li><a href="#set_family">set_family</a>(string, int)<br/>
This sets up the family the NPC belongs to, and how important they are
considered to be.
<li><a href="#set_log_death">set_log_death</a>(string)<br/>
This sets the NPC to log its death with the NPC killers handler, using the 
name argument as the symbolic name.
<li><a href="#set_responsible">set_responsible</a>(int)<br/>
This can be called to determine how responsible they are.
<li><a href="#set_return_items">set_return_items</a>(string)<br/>
Same as set_return_items_mess, this is a better name though but with the 
two query functions, there should be matching set functions.
<li><a href="#set_return_items_mess">set_return_items_mess</a>(string)<br/>
This sets the NPC to return items it is given, saying whatever the argument
is.
<li><a href="#set_warned">set_warned</a>()<li><a href="#shout_warning">shout_warning</a>()</ul>
<h2>Public Functions</h2>
These are functions that everyone can access.<p>
<dl>
<dt class="autodocfuncname"><a name="event_death">
event_death</a><pre class="autodocfuncdef">
void event_death(object thing,
                 object * ob,
                 object killer,
                 string room_mess,
                 string killer_mess)
</pre>
<dt class="autodocfuncname"><a name="event_enter">
event_enter</a><pre class="autodocfuncdef">
void event_enter(object ob,
                 string mess,
                 object from)
</pre><dd><br />
This stops them getting mangled by Pragi's Lost Gaze, bloody wizards.  Also
handles giving items back if we don't want the NPC to hold onto them.
<br />

<dt class="autodocfuncname"><a name="event_npc_cast_spell">
event_npc_cast_spell</a><pre class="autodocfuncdef">
void event_npc_cast_spell(object spell,
                          object caster,
                          object * things,
                          class spell_argument args,
                          int stage)
</pre>
<dt class="autodocfuncname"><a name="get_return_time">
get_return_time</a><pre class="autodocfuncdef">
int get_return_time(object spell,
                    int stage)
</pre>
<dt class="autodocfuncname"><a name="identify_spell">
identify_spell</a><pre class="autodocfuncdef">
void identify_spell(object caster,
                    int stage,
                    int time)
</pre>
<dt class="autodocfuncname"><a name="log_message">
log_message</a><pre class="autodocfuncdef">
void log_message(string message)
</pre>
<dt class="autodocfuncname"><a name="nasty_spell_happening">
nasty_spell_happening</a><pre class="autodocfuncdef">
void nasty_spell_happening(object spell,
                           object caster,
                           int stage,
                           int obvious)
</pre>
<dt class="autodocfuncname"><a name="notice_spell">
notice_spell</a><pre class="autodocfuncdef">
void notice_spell(object caster,
                  int stage,
                  int time)
</pre>
<dt class="autodocfuncname"><a name="query_aggression">
query_aggression</a><pre class="autodocfuncdef">
int query_aggression()
</pre>
<dt class="autodocfuncname"><a name="query_family">
query_family</a><pre class="autodocfuncdef">
string query_family()
</pre>
<dt class="autodocfuncname"><a name="query_family_value">
query_family_value</a><pre class="autodocfuncdef">
int query_family_value()
</pre>
<dt class="autodocfuncname"><a name="query_responsible">
query_responsible</a><pre class="autodocfuncdef">
int query_responsible()
</pre>
<dt class="autodocfuncname"><a name="query_return_items">
query_return_items</a><pre class="autodocfuncdef">
int query_return_items()
</pre>
<dt class="autodocfuncname"><a name="query_return_items_mess">
query_return_items_mess</a><pre class="autodocfuncdef">
string query_return_items_mess()
</pre>
<dt class="autodocfuncname"><a name="reset_stuff">
reset_stuff</a><pre class="autodocfuncdef">
void reset_stuff()
</pre>
<dt class="autodocfuncname"><a name="return_here">
return_here</a><pre class="autodocfuncdef">
void return_here(object return_loc)
</pre>
<dt class="autodocfuncname"><a name="second_life">
second_life</a><pre class="autodocfuncdef">
int second_life()
</pre>
<dt class="autodocfuncname"><a name="set_aggression">
set_aggression</a><pre class="autodocfuncdef">
void set_aggression(int n)
</pre>
<dt class="autodocfuncname"><a name="set_family">
set_family</a><pre class="autodocfuncdef">
void set_family(string ufid,
                int value)
</pre><dd><br />
This sets up the family the NPC belongs to, and how important they are
considered to be.
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
ufid - the UFID of the family faction<br />
value - the value the NPC is considered to hold
<br />
<br />
<br /></dl>

<dt class="autodocfuncname"><a name="set_log_death">
set_log_death</a><pre class="autodocfuncdef">
void set_log_death(string name)
</pre><dd><br />
This sets the NPC to log its death with the NPC killers handler, using the 
name argument as the symbolic name.
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
name - the name to use in the npc killers handler log<br />
<br />
<dd><b>See also:</b>
<br /><a href="#second_life">second_life()
</a><br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="set_responsible">
set_responsible</a><pre class="autodocfuncdef">
void set_responsible(int n)
</pre><dd><br />
This can be called to determine how responsible they are.
A key:

0: Don't care about other citizens.
1: Will look out for other citizens.
<br />

<dt class="autodocfuncname"><a name="set_return_items">
set_return_items</a><pre class="autodocfuncdef">
void set_return_items(string mess)
</pre><dd><br />
Same as set_return_items_mess, this is a better name though but with the 
two query functions, there should be matching set functions.
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
mess - the message to say as it returns items
<br />
<br />
<br /></dl>

<dt class="autodocfuncname"><a name="set_return_items_mess">
set_return_items_mess</a><pre class="autodocfuncdef">
void set_return_items_mess(string mess)
</pre><dd><br />
This sets the NPC to return items it is given, saying whatever the argument
is.  Setting 0 unsets this feature.  $item$ is replaced with the item's 
short name, and $the_item$ and $a_item$ are replaced with the the_short and 
a_short respectively.
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
mess - the message to say as it returns items
<br />
<br />
<br /></dl>

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

