[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/state_peddler.c</h2>
It's a walking, talking, singing, dancing, state engine of selling +5!<p>Written by Terano<p>Started 12/07/2003<h2>Inherits</h2>
This class inherits the following classes <a href="obj.monster.c.shtml">/obj/monster.c</a><h2>Includes</h2>
This class includes the following files <a href="include.money.h.shtml">/include/money.h</a> and /include/shops/bank.h<h2>Class Index</h2>
<ul><li><a href="#class_option">option</a>
</ul><h2>Method index</h2>
<ul>
<li><a href="#add_buy_triggers">add_buy_triggers</a>(mixed)<li><a href="#add_collect_triggers">add_collect_triggers</a>(mixed)<li><a href="#add_list_triggers">add_list_triggers</a>(mixed)<li><a href="#add_option">add_option</a>(string, string, string *)<li><a href="#add_stop_triggers">add_stop_triggers</a>(mixed)<li><a href="#calculate_cost">calculate_cost</a>(mapping)<li><a href="#confirm_order">confirm_order</a>(object, string)<li><a href="#end_free_text_edit">end_free_text_edit</a>(string)<li><a href="#event_death">event_death</a>(object, object *, object, string, string)<li><a href="#event_exit">event_exit</a>(object, string, object)<li><a href="#flavour_abort_sale">flavour_abort_sale</a>(object)<li><a href="#flavour_bad_free_text">flavour_bad_free_text</a>(object)<li><a href="#flavour_buy_ordered">flavour_buy_ordered</a>(object)<li><a href="#flavour_collect_busy">flavour_collect_busy</a>(object)<li><a href="#flavour_could_not_give">flavour_could_not_give</a>(object)<li><a href="#flavour_end_collection">flavour_end_collection</a>(object)<li><a href="#flavour_end_sale">flavour_end_sale</a>(int)<li><a href="#flavour_fetch_item">flavour_fetch_item</a>(mapping)<li><a href="#flavour_finalize_sale">flavour_finalize_sale</a>(object)<li><a href="#flavour_list">flavour_list</a>()<li><a href="#flavour_next_stage">flavour_next_stage</a>(object)<li><a href="#flavour_no_money">flavour_no_money</a>(object, int)<li><a href="#flavour_no_order">flavour_no_order</a>(object)<li><a href="#flavour_not_ready">flavour_not_ready</a>(object, mapping)<li><a href="#flavour_offer_choices">flavour_offer_choices</a>(string, string *)<li><a href="#flavour_offer_free_text">flavour_offer_free_text</a>(string)<li><a href="#flavour_request_confirmation">flavour_request_confirmation</a>(object, mapping)<li><a href="#flavour_selection_made">flavour_selection_made</a>(string)<li><a href="#flavour_set_free_text">flavour_set_free_text</a>(object, string)<li><a href="#flavour_short_free_text">flavour_short_free_text</a>(object)<li><a href="#flavour_start_busy">flavour_start_busy</a>(object)<li><a href="#flavour_start_buy">flavour_start_buy</a>(object)<li><a href="#flavour_start_dead">flavour_start_dead</a>(object)<li><a href="#flavour_stop_not_buyer">flavour_stop_not_buyer</a>(object)<li><a href="#flavour_user_died">flavour_user_died</a>(object)<li><a href="#flavour_user_left">flavour_user_left</a>()<li><a href="#generate_object">generate_object</a>(mapping, object)<li><a href="#initialise_peddler">initialise_peddler</a>()<li><a href="#prepare_confirmation">prepare_confirmation</a>()<li><a href="#query_current_choices">query_current_choices</a>()<li><a href="#query_options">query_options</a>()<li><a href="#query_spiel_position">query_spiel_position</a>()<li><a href="#remove_buy_trigger">remove_buy_trigger</a>(mixed)<br/>
<p>
This function will remove a buy trigger from the peddler - the argument is 
the trigger to remove, either as an array or a string (which will be 
converted).
<li><a href="#remove_collect_trigger">remove_collect_trigger</a>(mixed)<br/>
<p>
This function will remove a collect trigger from the peddler - the argument is 
the trigger to remove, either as an array or a string (which will be 
converted).
<li><a href="#remove_list_trigger">remove_list_trigger</a>(mixed)<br/>
<p>
This function will remove a list trigger from the peddler - the argument is 
the trigger to remove, either as an array or a string (which will be 
converted).
<li><a href="#remove_stop_trigger">remove_stop_trigger</a>(mixed)<br/>
<p>
This function will remove a stop trigger from the peddler - the argument is 
the trigger to remove, either as an array or a string (which will be 
converted).
<li><a href="#response">response</a>(object, string)<li><a href="#set_for_option">set_for_option</a>(int)<li><a href="#set_location">set_location</a>(string)<li><a href="#set_peddler_time">set_peddler_time</a>(int)<li><a href="#sort_stuff">sort_stuff</a>(mixed, mixed)<li><a href="#start_buy">start_buy</a>(object)<li><a href="#start_collect">start_collect</a>(object, string)<li><a href="#start_list">start_list</a>(object, string)<li><a href="#stop">stop</a>(object)<li><a href="#test_serve_customer">test_serve_customer</a>(object)</ul>
<h2>Public Functions</h2>
These are functions that everyone can access.<p>
<dl>
<dt class="autodocfuncname"><a name="add_buy_triggers">
add_buy_triggers</a><pre class="autodocfuncdef">
void add_buy_triggers(mixed arg)
</pre>
<dt class="autodocfuncname"><a name="add_collect_triggers">
add_collect_triggers</a><pre class="autodocfuncdef">
void add_collect_triggers(mixed arg)
</pre>
<dt class="autodocfuncname"><a name="add_list_triggers">
add_list_triggers</a><pre class="autodocfuncdef">
void add_list_triggers(mixed arg)
</pre>
<dt class="autodocfuncname"><a name="add_option">
add_option</a><pre class="autodocfuncdef">
int add_option(string sales_name,
               string sales_text,
               string * responses)
</pre>
<dt class="autodocfuncname"><a name="add_stop_triggers">
add_stop_triggers</a><pre class="autodocfuncdef">
void add_stop_triggers(mixed arg)
</pre>
<dt class="autodocfuncname"><a name="calculate_cost">
calculate_cost</a><pre class="autodocfuncdef">
int calculate_cost(mapping _data)
</pre>
<dt class="autodocfuncname"><a name="confirm_order">
confirm_order</a><pre class="autodocfuncdef">
void confirm_order(object speaker,
                   string info)
</pre>
<dt class="autodocfuncname"><a name="end_free_text_edit">
end_free_text_edit</a><pre class="autodocfuncdef">
void end_free_text_edit(string mess)
</pre>
<dt class="autodocfuncname"><a name="event_death">
event_death</a><pre class="autodocfuncdef">
void event_death(object thing,
                 object * arr,
                 object killer,
                 string room_mess,
                 string killer_mess)
</pre>
<dt class="autodocfuncname"><a name="event_exit">
event_exit</a><pre class="autodocfuncdef">
void event_exit(object ob,
                string message,
                object to)
</pre>
<dt class="autodocfuncname"><a name="flavour_abort_sale">
flavour_abort_sale</a><pre class="autodocfuncdef">
void flavour_abort_sale(object speaker)
</pre>
<dt class="autodocfuncname"><a name="flavour_bad_free_text">
flavour_bad_free_text</a><pre class="autodocfuncdef">
void flavour_bad_free_text(object writer)
</pre>
<dt class="autodocfuncname"><a name="flavour_buy_ordered">
flavour_buy_ordered</a><pre class="autodocfuncdef">
void flavour_buy_ordered(object speaker)
</pre>
<dt class="autodocfuncname"><a name="flavour_collect_busy">
flavour_collect_busy</a><pre class="autodocfuncdef">
void flavour_collect_busy(object speaker)
</pre>
<dt class="autodocfuncname"><a name="flavour_could_not_give">
flavour_could_not_give</a><pre class="autodocfuncdef">
void flavour_could_not_give(object thing)
</pre>
<dt class="autodocfuncname"><a name="flavour_end_collection">
flavour_end_collection</a><pre class="autodocfuncdef">
void flavour_end_collection(object speaker)
</pre>
<dt class="autodocfuncname"><a name="flavour_end_sale">
flavour_end_sale</a><pre class="autodocfuncdef">
void flavour_end_sale(int cost)
</pre>
<dt class="autodocfuncname"><a name="flavour_fetch_item">
flavour_fetch_item</a><pre class="autodocfuncdef">
void flavour_fetch_item(mapping _data)
</pre>
<dt class="autodocfuncname"><a name="flavour_finalize_sale">
flavour_finalize_sale</a><pre class="autodocfuncdef">
void flavour_finalize_sale(object speaker)
</pre>
<dt class="autodocfuncname"><a name="flavour_list">
flavour_list</a><pre class="autodocfuncdef">
void flavour_list()
</pre>
<dt class="autodocfuncname"><a name="flavour_next_stage">
flavour_next_stage</a><pre class="autodocfuncdef">
void flavour_next_stage(object speaker)
</pre>
<dt class="autodocfuncname"><a name="flavour_no_money">
flavour_no_money</a><pre class="autodocfuncdef">
void flavour_no_money(object speaker,
                      int cost)
</pre>
<dt class="autodocfuncname"><a name="flavour_no_order">
flavour_no_order</a><pre class="autodocfuncdef">
void flavour_no_order(object speaker)
</pre>
<dt class="autodocfuncname"><a name="flavour_not_ready">
flavour_not_ready</a><pre class="autodocfuncdef">
void flavour_not_ready(object speaker,
                       mapping _data)
</pre>
<dt class="autodocfuncname"><a name="flavour_offer_choices">
flavour_offer_choices</a><pre class="autodocfuncdef">
void flavour_offer_choices(string choice_name,
                           string * all_choices)
</pre>
<dt class="autodocfuncname"><a name="flavour_offer_free_text">
flavour_offer_free_text</a><pre class="autodocfuncdef">
void flavour_offer_free_text(string choice_name)
</pre>
<dt class="autodocfuncname"><a name="flavour_request_confirmation">
flavour_request_confirmation</a><pre class="autodocfuncdef">
void flavour_request_confirmation(object speaker,
                                  mapping _data)
</pre>
<dt class="autodocfuncname"><a name="flavour_selection_made">
flavour_selection_made</a><pre class="autodocfuncdef">
void flavour_selection_made(string selection)
</pre>
<dt class="autodocfuncname"><a name="flavour_set_free_text">
flavour_set_free_text</a><pre class="autodocfuncdef">
void flavour_set_free_text(object writer,
                           string mess)
</pre>
<dt class="autodocfuncname"><a name="flavour_short_free_text">
flavour_short_free_text</a><pre class="autodocfuncdef">
void flavour_short_free_text(object writer)
</pre>
<dt class="autodocfuncname"><a name="flavour_start_busy">
flavour_start_busy</a><pre class="autodocfuncdef">
void flavour_start_busy(object speaker)
</pre>
<dt class="autodocfuncname"><a name="flavour_start_buy">
flavour_start_buy</a><pre class="autodocfuncdef">
void flavour_start_buy(object speaker)
</pre>
<dt class="autodocfuncname"><a name="flavour_start_dead">
flavour_start_dead</a><pre class="autodocfuncdef">
void flavour_start_dead(object speaker)
</pre>
<dt class="autodocfuncname"><a name="flavour_stop_not_buyer">
flavour_stop_not_buyer</a><pre class="autodocfuncdef">
void flavour_stop_not_buyer(object speaker)
</pre>
<dt class="autodocfuncname"><a name="flavour_user_died">
flavour_user_died</a><pre class="autodocfuncdef">
void flavour_user_died(object speaker)
</pre>
<dt class="autodocfuncname"><a name="flavour_user_left">
flavour_user_left</a><pre class="autodocfuncdef">
void flavour_user_left()
</pre>
<dt class="autodocfuncname"><a name="generate_object">
generate_object</a><pre class="autodocfuncdef">
object generate_object(mapping _data,
                       object speaker)
</pre>
<dt class="autodocfuncname"><a name="initialise_peddler">
initialise_peddler</a><pre class="autodocfuncdef">
void initialise_peddler()
</pre>
<dt class="autodocfuncname"><a name="prepare_confirmation">
prepare_confirmation</a><pre class="autodocfuncdef">
void prepare_confirmation()
</pre>
<dt class="autodocfuncname"><a name="query_current_choices">
query_current_choices</a><pre class="autodocfuncdef">
string * query_current_choices()
</pre>
<dt class="autodocfuncname"><a name="query_options">
query_options</a><pre class="autodocfuncdef">
class option * query_options()
</pre>
<dt class="autodocfuncname"><a name="query_spiel_position">
query_spiel_position</a><pre class="autodocfuncdef">
int query_spiel_position()
</pre>
<dt class="autodocfuncname"><a name="remove_buy_trigger">
remove_buy_trigger</a><pre class="autodocfuncdef">
void remove_buy_trigger(mixed trigger)
</pre><dd><br />
<p>
This function will remove a buy trigger from the peddler - the argument is 
the trigger to remove, either as an array or a string (which will be 
converted).
</p>
<p>
This is useful e.g. if you have two peddlers in the same room and don't want
them both to respond to someone saying 'buy'.  You'll have to specify more 
exactly what will trigger the start_buy() function, though, e.g. with 
add_buy_triggers( ".*buy.*vegetables.*" ); in one of the peddlers and 
add_buy_triggers( ".*buy.*fruit.*" ); in the other.
</p><br />
<br /><dl>
<dd><b>Parameters:</b><br />
trigger - This is the trigger, e.g. ".*buy.*".<br />
<br />
<dd><b>See also:</b>
<br />nothing
.c<br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="remove_collect_trigger">
remove_collect_trigger</a><pre class="autodocfuncdef">
void remove_collect_trigger(mixed trigger)
</pre><dd><br />
<p>
This function will remove a collect trigger from the peddler - the argument is 
the trigger to remove, either as an array or a string (which will be 
converted).
</p>
<p>
This is useful e.g. if you have two peddlers in the same room and don't want
them both to respond to someone saying 'collect'.  You'll have to specify more 
exactly what will trigger the start_collect() function, though, e.g. with 
add_collect_triggers( ".*collect.*vegetables.*" ); in one of the peddlers and 
add_collect_triggers( ".*collect.*fruit.*" ); in the other.
</p><br />
<br /><dl>
<dd><b>Parameters:</b><br />
trigger - This is the trigger, e.g. ".*collect.*".<br />
<br />
<dd><b>See also:</b>
<br />nothing
.c<br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="remove_list_trigger">
remove_list_trigger</a><pre class="autodocfuncdef">
void remove_list_trigger(mixed trigger)
</pre><dd><br />
<p>
This function will remove a list trigger from the peddler - the argument is 
the trigger to remove, either as an array or a string (which will be 
converted).
</p>
<p>
This is useful e.g. if you have two peddlers in the same room and don't want
them both to respond to someone saying 'list'.  You'll have to specify more 
exactly what will trigger the start_list() function, though, e.g. with 
add_list_triggers( ".*list.*vegetables.*" ); in one of the peddlers and 
add_list_triggers( ".*list.*fruit.*" ); in the other.
</p><br />
<br /><dl>
<dd><b>Parameters:</b><br />
trigger - This is the trigger, e.g. ".*list.*".<br />
<br />
<dd><b>See also:</b>
<br />nothing
.c<br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="remove_stop_trigger">
remove_stop_trigger</a><pre class="autodocfuncdef">
void remove_stop_trigger(mixed trigger)
</pre><dd><br />
<p>
This function will remove a stop trigger from the peddler - the argument is 
the trigger to remove, either as an array or a string (which will be 
converted).
</p>
<p>
This is useful e.g. if you have two peddlers in the same room and don't want
them both to respond to someone saying 'stop'.  You'll have to specify more 
exactly what will trigger the start_stop() function, though, e.g. with 
add_stop_triggers( ".*stop.*vegetables.*" ); in one of the peddlers and 
add_stop_triggers( ".*stop.*fruit.*" ); in the other.
</p><br />
<br /><dl>
<dd><b>Parameters:</b><br />
trigger - This is the trigger, e.g. ".*stop.*".<br />
<br />
<dd><b>See also:</b>
<br />nothing
.c<br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="response">
response</a><pre class="autodocfuncdef">
void response(object speaker,
              string info)
</pre>
<dt class="autodocfuncname"><a name="set_for_option">
set_for_option</a><pre class="autodocfuncdef">
void set_for_option(int pos)
</pre>
<dt class="autodocfuncname"><a name="set_location">
set_location</a><pre class="autodocfuncdef">
string set_location(string loc)
</pre>
<dt class="autodocfuncname"><a name="set_peddler_time">
set_peddler_time</a><pre class="autodocfuncdef">
void set_peddler_time(int number)
</pre>
<dt class="autodocfuncname"><a name="sort_stuff">
sort_stuff</a><pre class="autodocfuncdef">
int sort_stuff(mixed arg1,
               mixed arg2)
</pre>
<dt class="autodocfuncname"><a name="start_buy">
start_buy</a><pre class="autodocfuncdef">
void start_buy(object speaker)
</pre>
<dt class="autodocfuncname"><a name="start_collect">
start_collect</a><pre class="autodocfuncdef">
void start_collect(object speaker,
                   string info)
</pre>
<dt class="autodocfuncname"><a name="start_list">
start_list</a><pre class="autodocfuncdef">
void start_list(object speaker,
                string info)
</pre>
<dt class="autodocfuncname"><a name="stop">
stop</a><pre class="autodocfuncdef">
void stop(object speaker)
</pre>
<dt class="autodocfuncname"><a name="test_serve_customer">
test_serve_customer</a><pre class="autodocfuncdef">
int test_serve_customer(object customer)
</pre>
</dl>
<h2>Classes</h2>
These are nice data types for dealing with...  Data!<p>
<ul>
<li><a name="class_option">
option</a><pre>
class option {
               string sales_name;
               string sales_text;
               string * responses;
}

</pre>
</ul>
[an error occurred while processing this directive]

