[Package Index | Mudlib Index | Effect Index]

File /d/cwc/Bes_Pelargic/inherit/bp_citizen.c

Bes Pelargic citizen NPCs inheriting this file will have AI to cope with things that might happen to them in Bes Pelargic

Written by Dasquian

Started on 14 February 2001

Inherits

This class inherits the following classes /obj/monster.c, /d/cwc/inherit/smart_armoury.c and /d/cwc/inherit/family_member.c

Includes

This class includes the following files /include/cwc.h, /include/magic.h and /include/move_failures.h

Method index

Public Functions

These are functions that everyone can access.

event_death
void event_death(object thing,
                 object * ob,
                 object killer,
                 string room_mess,
                 string killer_mess)
event_enter
void event_enter(object ob,
                 string mess,
                 object from)

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.
event_npc_cast_spell
void event_npc_cast_spell(object spell,
                          object caster,
                          object * things,
                          class spell_argument args,
                          int stage)
get_return_time
int get_return_time(object spell,
                    int stage)
identify_spell
void identify_spell(object caster,
                    int stage,
                    int time)
log_message
void log_message(string message)
nasty_spell_happening
void nasty_spell_happening(object spell,
                           object caster,
                           int stage,
                           int obvious)
notice_spell
void notice_spell(object caster,
                  int stage,
                  int time)
query_aggression
int query_aggression()
query_family
string query_family()
query_family_value
int query_family_value()
query_responsible
int query_responsible()
query_return_items
int query_return_items()
query_return_items_mess
string query_return_items_mess()
reset_stuff
void reset_stuff()
return_here
void return_here(object return_loc)
second_life
int second_life()
set_aggression
void set_aggression(int n)
set_family
void set_family(string ufid,
                int value)

This sets up the family the NPC belongs to, and how important they are considered to be.

Parameters:
ufid - the UFID of the family faction
value - the value the NPC is considered to hold


set_log_death
void set_log_death(string name)

This sets the NPC to log its death with the NPC killers handler, using the name argument as the symbolic name.

Parameters:
name - the name to use in the npc killers handler log

See also:
second_life()


set_responsible
void set_responsible(int n)

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.
set_return_items
void set_return_items(string mess)

Same as set_return_items_mess, this is a better name though but with the two query functions, there should be matching set functions.

Parameters:
mess - the message to say as it returns items


set_return_items_mess
void set_return_items_mess(string mess)

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.

Parameters:
mess - the message to say as it returns items


set_warned
void set_warned()
shout_warning
void shout_warning()