[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 /std/shops/inherit/player_craft_shop.c</h2>
This is the file containing extra controls for the player run
craft shop.  We will assume that all player run craft shops will be
rooms and not npcs.<p>Written by Pinkfish<p>Started Fri Apr 21 13:37:44 PDT 2000
<h2>Inherits</h2>
This class inherits the following classes <a href="std.shops.inherit.craft_shop_category.c.shtml">/std/shops/inherit/craft_shop_category.c</a> and <a href="std.basic.expressions.c.shtml">/std/basic/expressions.c</a><h2>Includes</h2>
This class includes the following files <a href="include.expressions.h.shtml">/include/expressions.h</a>, <a href="include.am_time.h.shtml">/include/am_time.h</a>, /include/shops/bank.h, <a href="include.money.h.shtml">/include/money.h</a>, <a href="include.playtesters.h.shtml">/include/playtesters.h</a>, <a href="include.mail.h.shtml">/include/mail.h</a>, <a href="include.player.h.shtml">/include/player.h</a>, <a href="include.nroff.h.shtml">/include/nroff.h</a>, <a href="include.clubs.h.shtml">/include/clubs.h</a>, <a href="include.move_failures.h.shtml">/include/move_failures.h</a>, <a href="include.player_handler.h.shtml">/include/player_handler.h</a> and /include/shops/craft_shop.h<h2>Class Index</h2>
<ul><li><a href="#class_approval">approval</a>
<li><a href="#class_approval_item">approval_item</a>
<li><a href="#class_approval_obs">approval_obs</a>
<li><a href="#class_expression_type">expression_type</a>
<li><a href="#class_seller_information">seller_information</a>
<li><a href="#class_shop_stats">shop_stats</a>
<li><a href="#class_shop_transaction">shop_transaction</a>
</ul><h2>Method index</h2>
<dl><ul>
<li><a href="#add_to_approval_list">add_to_approval_list</a>(string, object *, int, string, string, int)<br/>
This method adds an item to the list of items that need to be approved.
<li><a href="#add_transaction">add_transaction</a>(string, object *, int, int, string, mixed)<br/>
This method adds in transaction into the transaction list.
<li><a href="#adjust_owners_money">adjust_owners_money</a>(int)<br/>
This method changes the current level of the owners money.
<li><a href="#adjust_royalty">adjust_royalty</a>(string, int)<br/>
This method adjusts the royalty.
<li><a href="#check_remove_category">check_remove_category</a>(string, string)<br/>
This method is called into to check to see if we can remove the category.
<li><a href="#confirm_approval">confirm_approval</a>(string, class approval_obs, int)<li><a href="#create_auto_load_file">create_auto_load_file</a>(mixed, int)<br/>
This method creates a save file for the specified objects autoloading
capability.
<li><a href="#create_checkout_object">create_checkout_object</a>(class approval_obs, int, object)<br/>
This method turns all the specified id into an item to be checked.
<li><a href="#create_real_auto_load_object">create_real_auto_load_object</a>(int, object)<br/>
This method creates a real object from the save file number.
<li><a href="#destroy_checkout_object">destroy_checkout_object</a>(object)<br/>
This method updates the checked out item and changes to to be what
we now have.
<li><a href="#do_add_new_category">do_add_new_category</a>(string)<br/>
This method allows the player to add a new category to the list.
<li><a href="#do_approve_auto_expression_add">do_approve_auto_expression_add</a>(string, string, int, string)<br/>
This method sets the automatic expressions to allow.
<li><a href="#do_approve_auto_expression_remove">do_approve_auto_expression_remove</a>(string)<br/>
This method removes an allowed expression
<li><a href="#do_approve_auto_high">do_approve_auto_high</a>(string)<br/>
This method sets the automatic high cut off level.
<li><a href="#do_approve_auto_high_deny">do_approve_auto_high_deny</a>(string)<br/>
This method sets the automatic high cut off level for denying sales.
<li><a href="#do_approve_auto_item_add">do_approve_auto_item_add</a>(string, string, string, int, string)<br/>
This method sets the automatic items to allow.
<li><a href="#do_approve_auto_item_add_expr">do_approve_auto_item_add_expr</a>(string, string, string, int, string)<br/>
This method sets the automatic items to allow.
<li><a href="#do_approve_auto_item_add_object">do_approve_auto_item_add_object</a>(object *, string, string, int, string)<br/>
This method sets the automatic items to allow.
<li><a href="#do_approve_auto_item_add_object_expr">do_approve_auto_item_add_object_expr</a>(object *, string, string, int, string)<br/>
This method sets the automatic items to allow.
<li><a href="#do_approve_auto_item_remove">do_approve_auto_item_remove</a>(string)<br/>
This method sets the automatic items to allow.
<li><a href="#do_approve_auto_item_remove_object">do_approve_auto_item_remove_object</a>(object *)<br/>
This method sets the automatic items to allow.
<li><a href="#do_approve_auto_item_test">do_approve_auto_item_test</a>(object *)<br/>
This method checks to see if the specified object can really be sold or
not automatically.
<li><a href="#do_approve_auto_low">do_approve_auto_low</a>(string)<br/>
This method sets the automatic low acception level.
<li><a href="#do_approve_black_list_add">do_approve_black_list_add</a>(string)<br/>
This method adds the person to the black list.
<li><a href="#do_approve_black_list_add_ignore">do_approve_black_list_add_ignore</a>()<br/>
This method adds their ignore list to the black list

<li><a href="#do_approve_black_list_remove">do_approve_black_list_remove</a>(string)<br/>
This method removes the person from the black list.
<li><a href="#do_approve_browse">do_approve_browse</a>(string)<br/>
This method browses the specified item.
<li><a href="#do_approve_buy_expression">do_approve_buy_expression</a>(string)<br/>
This method sets up the expression to use when calculating the
ability to buy from the shop.
<li><a href="#do_approve_category_change">do_approve_category_change</a>(string, string)<br/>
This method changes the category of the item waiting to be approved.
<li><a href="#do_approve_checkin">do_approve_checkin</a>(object *)<br/>
This method checks in a checked out object.
<li><a href="#do_approve_checkout">do_approve_checkout</a>(string)<br/>
This method checks out the specified item.
<li><a href="#do_approve_item">do_approve_item</a>(string, string)<br/>
This method approves the specified item.
<li><a href="#do_approve_limit">do_approve_limit</a>(string)<br/>
This method sets the limit on number of items sellable by all the players.
<li><a href="#do_approve_limit_person_items">do_approve_limit_person_items</a>(string, string)<br/>
This method sets the limit per person to be a specified value.
<li><a href="#do_approve_limit_person_remove">do_approve_limit_person_remove</a>(string)<br/>
This method removes any limits set on the player.
<li><a href="#do_approve_limit_person_value">do_approve_limit_person_value</a>(string, string)<br/>
This method sets the limit at which a person can automatically sell
to the shop.
<li><a href="#do_approve_limit_person_value_deny">do_approve_limit_person_value_deny</a>(string, string)<br/>
This method sets the limit at which a person can automatically sell
to the shop (deny limit).
<li><a href="#do_approve_name_change">do_approve_name_change</a>(string, string)<br/>
This method changes the name of the item to be approved.
<li><a href="#do_approve_pay_deficit">do_approve_pay_deficit</a>()<br/>
This method pays off the cash deficit (if one exists).
<li><a href="#do_approve_percentage">do_approve_percentage</a>(mixed)<br/>
This method sets the percentage to add to the sell price.
<li><a href="#do_approve_reject">do_approve_reject</a>(string, string, int)<br/>
This method rejects the specified item.
<li><a href="#do_approve_status">do_approve_status</a>(int)<br/>
This method shows the current status of the shop.
<li><a href="#do_approve_status_functions">do_approve_status_functions</a>(int)<br/>
This method shows the status of all the user defined functions.
<li><a href="#do_approve_status_internal_functions">do_approve_status_internal_functions</a>()<br/>
This method shows the status of all the user defined functions.
<li><a href="#do_approve_use_expression">do_approve_use_expression</a>(string)<br/>
This method sets up the expression to use when calculating the
ability to use the shop.
<li><a href="#do_check_sell">do_check_sell</a>(object *)<br/>
This method runs through the objects and checks to see what sort of levels
they are allowed to sell them for to this shop.
<li><a href="#do_collect_partial_royalties">do_collect_partial_royalties</a>(string)<br/>
This method collects royalities up to a certain amount.
<li><a href="#do_function_help">do_function_help</a>(string)<br/>
Get help on a specific function.
<li><a href="#do_function_help_list">do_function_help_list</a>()<br/>
Get help on a specific function.
<li><a href="#do_list_approval">do_list_approval</a>(int)<br/>
List the items for approval.
<li><a href="#do_list_categories">do_list_categories</a>()<br/>
This method lists the current categories and shows us which one is
currently the default.
<li><a href="#do_name_shop">do_name_shop</a>(string)<br/>
This method gives the shop a name.
<li><a href="#do_remove_category">do_remove_category</a>(string)<br/>
This method allows the player to remove a category from the list.
<li><a href="#do_remove_sign">do_remove_sign</a>()<br/>
This method removes the sign from the shop.
<li><a href="#do_rename_category">do_rename_category</a>(string, string)<br/>
This method allows the player to remove a category from the list.
<li><a href="#do_return">do_return</a>(string)<br/>
This method returns the item to the person that started to sell it.
<li><a href="#do_set_default_category">do_set_default_category</a>(string)<br/>
This method sets the default category for the place.
<li><a href="#do_set_sign">do_set_sign</a>(object *)<br/>
This method sets the sign you wish to use for your shop.
<li><a href="#do_stats_items">do_stats_items</a>(int)<br/>
This method shows the stats on all the sold items, the number and value
of each one sold.
<li><a href="#do_stats_money">do_stats_money</a>()<br/>
This method shows stats about money and stuff in the shop.
<li><a href="#do_stats_transactions">do_stats_transactions</a>()<br/>
This method shows a list of all the transactions that have occured in the
shop.
<li><a href="#do_user_function_add">do_user_function_add</a>(string, string)<br/>
This method allows a function to be added to the base set of user 
functions.
<li><a href="#do_user_function_remove">do_user_function_remove</a>(string)<br/>
This method allows a function to be added to the base set of user 
functions.
<li><a href="#inform_of_royalties">inform_of_royalties</a>(object)<br/>
Tells the playe they have some royalties to pick up.
<li><a href="#is_allowed_to_use_shop">is_allowed_to_use_shop</a>(string)<br/>
This method checks to see if the shop is a closed shop and then checks
to see if the person is allowed.
<li><a href="#is_checkout_object">is_checkout_object</a>(object)<br/>
This method checks to see if the specified item is a checked out
item.
<li><a href="#is_item_approved">is_item_approved</a>(string, int, string, object *, string, int ref)<br/>
This method checks to see if the specified item is approved.
<li><a href="#query_approval_class">query_approval_class</a>(string)<br/>
This method returns the approval class from the string name.
<li><a href="#query_approval_list">query_approval_list</a>(int)<br/>
This method returns the current approval list for the shop.
<li><a href="#query_letter_value">query_letter_value</a>(int)<br/>
This method returns the position as a two letter value.
<li><a href="#query_maximum_inventory_size">query_maximum_inventory_size</a>()<br/>
This method returns the maximum inventory size for the shop.
<li><a href="#query_maximum_sale_value">query_maximum_sale_value</a>(string, object *)<br/>
This method will return the maximum value at which the set of items
will be denied.
<li><a href="#query_maximum_sale_value_both">query_maximum_sale_value_both</a>(string, object)<br/>
This method finds out the maximum value that this item is allowed
to be sold for based on the current settings of the shop.
<li><a href="#query_maximum_waiting_queue_size">query_maximum_waiting_queue_size</a>()<br/>
This method returns the maximum inventory size for the shop.
<li><a href="#query_number_of_items_listed">query_number_of_items_listed</a>(string)<br/>
This method returns the number of items currently in the shop by
the specified person.
<li><a href="#query_number_value">query_number_value</a>(string)<br/>
This method goes from a letter value to a number.
<li><a href="#query_owners_money">query_owners_money</a>()<br/>
This method returns the current level of the owners money.
<li><a href="#query_parcel_post">query_parcel_post</a>()<br/>
This method tells us the current parcel post used for rejecting items.
<li><a href="#query_round_prices">query_round_prices</a>()<br/>
This method returns the amount to round all sell values for.
<li><a href="#query_royalty">query_royalty</a>(string)<br/>
This method returns the royalties for the specific person.
<li><a href="#query_shop_name">query_shop_name</a>()<br/>
This method returns the name of the shop.
<li><a href="#query_sign_object">query_sign_object</a>()<br/>
This method returns the current sign object for the shop.
<li><a href="#query_transaction_string">query_transaction_string</a>(class shop_transaction)<br/>
This method truns a transaction into a string.
<li><a href="#remove_from_approval_list">remove_from_approval_list</a>(class approval_obs)<br/>
This method removes the item from the approval list.
<li><a href="#return_all_checkedout_objects">return_all_checkedout_objects</a>()<br/>
This method returns all the checkedout objects to the shop.
<li><a href="#set_maximum_inventory_size">set_maximum_inventory_size</a>(int)<br/>
This method sets the maximum inventory size for the shop.
<li><a href="#set_maximum_waiting_queue_size">set_maximum_waiting_queue_size</a>(int)<br/>
This method sets the maximum inventory size for the shop.
<li><a href="#set_parcel_post">set_parcel_post</a>(string)<br/>
This method sets the parcel post to use for rejecting items.
<li><a href="#set_round_price">set_round_price</a>(int)<br/>
THis method sets the amount to round all the sell values for.
<li><a href="#set_shop_name">set_shop_name</a>(string)<br/>
This method sets the name of the shop.
<li><a href="#set_sign_object">set_sign_object</a>(object)<br/>
This method sets the current sign object.
</ul><h2>Public Functions</h2>
These are functions that everyone can access.<p>
.<ul><a name="add_to_approval_list">
add_to_approval_list</a><pre>
object * add_to_approval_list(string seller,
                              object * sellables,
                              int value,
                              string name,
                              string category,
                              int approved)
</pre></br>
This method adds an item to the list of items that need to be approved.
<br/><ul>
<li><b>Parameters:</b>
<br/>seller - name of the player
<br/>sellables - the list of items to sell
<br/>value - the cost of the item
<br/>name - the name of the items
<br/>category - the category of the item
<br/>approved - a flag to say if this was approved or not
<li><b>Returns:</b>
<br/>obs the objects we bought

</dl>

<ul><a name="add_transaction">
add_transaction</a><pre>
void add_transaction(string person,
                     object * objects,
                     int type,
                     int amount,
                     string name_cat,
                     mixed extra)
</pre></br>
This method adds in transaction into the transaction list.
<br/><ul>
<li><b>Parameters:</b>
<br/>person - the person doing the thing
<br/>objects - the string name of the objects
<br/>type - the type of the transaction
<br/>amount - the cost of the transaction
<br/>name_cat - the name/category of the item
<br/>extra - anything extra about the transaction

</dl>

<ul><a name="adjust_owners_money">
adjust_owners_money</a><pre>
void adjust_owners_money(int amt)
</pre></br>
This method changes the current level of the owners money.


<ul><a name="adjust_royalty">
adjust_royalty</a><pre>
void adjust_royalty(string name,
                    int amount)
</pre></br>
This method adjusts the royalty.
<br/><ul>
<li><b>Parameters:</b>
<br/>person - the person to adjust
<br/>amt - the amoutn to adjust by

</dl>

<ul><a name="create_checkout_object">
create_checkout_object</a><pre>
object create_checkout_object(class approval_obs approve,
                              int id,
                              object player)
</pre></br>
This method turns all the specified id into an item to be checked.
<br/><ul>
<li><b>Parameters:</b>
<br/>id - the id of the object to create
<br/>player - the player to use for autoloading

</dl>

<ul><a name="destroy_checkout_object">
destroy_checkout_object</a><pre>
int destroy_checkout_object(object ob)
</pre></br>
This method updates the checked out item and changes to to be what
we now have...
<br/><ul>
<li><b>Parameters:</b>
<br/>ob - the object to destroy

</dl>

<ul><a name="do_add_new_category">
do_add_new_category</a><pre>
int do_add_new_category(string category)
</pre></br>
This method allows the player to add a new category to the list.
<br/><ul>
<li><b>Parameters:</b>
<br/>category - the new category name

</dl>

<ul><a name="do_approve_auto_expression_add">
do_approve_auto_expression_add</a><pre>
int do_approve_auto_expression_add(string expression,
                                   string value_str,
                                   int type,
                                   string list_name)
</pre></br>
This method sets the automatic expressions to allow.
<br/><ul>
<li><b>Parameters:</b>
<br/>expression - the expressions short to allow

</dl>

<ul><a name="do_approve_auto_expression_remove">
do_approve_auto_expression_remove</a><pre>
int do_approve_auto_expression_remove(string idstr)
</pre></br>
This method removes an allowed expression
<br/><ul>
<li><b>Parameters:</b>
<br/>id - the expression id to remove

</dl>

<ul><a name="do_approve_auto_high">
do_approve_auto_high</a><pre>
int do_approve_auto_high(string cost)
</pre></br>
This method sets the automatic high cut off level.
<br/><ul>
<li><b>Parameters:</b>
<br/>cost - the cost to use a high cut off level

</dl>

<ul><a name="do_approve_auto_high_deny">
do_approve_auto_high_deny</a><pre>
int do_approve_auto_high_deny(string cost)
</pre></br>
This method sets the automatic high cut off level for denying sales.
<br/><ul>
<li><b>Parameters:</b>
<br/>cost - the cost to use a high cut off level

</dl>

<ul><a name="do_approve_auto_item_add">
do_approve_auto_item_add</a><pre>
int do_approve_auto_item_add(string item,
                             string money,
                             string list_name,
                             int markup,
                             string money_str)
</pre></br>
This method sets the automatic items to allow.
<br/><ul>
<li><b>Parameters:</b>
<br/>item - the items short to allow

</dl>

<ul><a name="do_approve_auto_item_add_expr">
do_approve_auto_item_add_expr</a><pre>
int do_approve_auto_item_add_expr(string item,
                                  string expr,
                                  string list_name,
                                  int markup,
                                  string money_str)
</pre></br>
This method sets the automatic items to allow.
<br/><ul>
<li><b>Parameters:</b>
<br/>item - the items short to allow

</dl>

<ul><a name="do_approve_auto_item_add_object">
do_approve_auto_item_add_object</a><pre>
int do_approve_auto_item_add_object(object * obs,
                                    string money,
                                    string list_name,
                                    int markup,
                                    string money_str)
</pre></br>
This method sets the automatic items to allow.
<br/><ul>
<li><b>Parameters:</b>
<br/>item - the items short to allow

</dl>

<ul><a name="do_approve_auto_item_add_object_expr">
do_approve_auto_item_add_object_expr</a><pre>
int do_approve_auto_item_add_object_expr(object * obs,
                                         string expr,
                                         string list_name,
                                         int markup,
                                         string money_str)
</pre></br>
This method sets the automatic items to allow.
<br/><ul>
<li><b>Parameters:</b>
<br/>item - the items short to allow

</dl>

<ul><a name="do_approve_auto_item_remove">
do_approve_auto_item_remove</a><pre>
int do_approve_auto_item_remove(string item)
</pre></br>
This method sets the automatic items to allow.
<br/><ul>
<li><b>Parameters:</b>
<br/>item - the item to accept

</dl>

<ul><a name="do_approve_auto_item_remove_object">
do_approve_auto_item_remove_object</a><pre>
int do_approve_auto_item_remove_object(object * obs)
</pre></br>
This method sets the automatic items to allow.
<br/><ul>
<li><b>Parameters:</b>
<br/>item - the item to accept

</dl>

<ul><a name="do_approve_auto_item_test">
do_approve_auto_item_test</a><pre>
int do_approve_auto_item_test(object * obs)
</pre></br>
This method checks to see if the specified object can really be sold or
not automatically.
<br/><ul>
<li><b>Parameters:</b>
<br/>obs - the objects to test

</dl>

<ul><a name="do_approve_auto_low">
do_approve_auto_low</a><pre>
int do_approve_auto_low(string cost)
</pre></br>
This method sets the automatic low acception level.
<br/><ul>
<li><b>Parameters:</b>
<br/>cost - the cost to use a low level

</dl>

<ul><a name="do_approve_black_list_add">
do_approve_black_list_add</a><pre>
int do_approve_black_list_add(string name)
</pre></br>
This method adds the person to the black list.
<br/><ul>
<li><b>Parameters:</b>
<br/>person - the person to add to the black list

</dl>

<ul><a name="do_approve_black_list_add_ignore">
do_approve_black_list_add_ignore</a><pre>
int do_approve_black_list_add_ignore()
</pre></br>
This method adds their ignore list to the black list


<ul><a name="do_approve_black_list_remove">
do_approve_black_list_remove</a><pre>
int do_approve_black_list_remove(string name)
</pre></br>
This method removes the person from the black list.
<br/><ul>
<li><b>Parameters:</b>
<br/>person - the person to remove from the black list

</dl>

<ul><a name="do_approve_browse">
do_approve_browse</a><pre>
int do_approve_browse(string name)
</pre></br>
This method browses the specified item.


<ul><a name="do_approve_buy_expression">
do_approve_buy_expression</a><pre>
int do_approve_buy_expression(string str)
</pre></br>
This method sets up the expression to use when calculating the
ability to buy from the shop.


<ul><a name="do_approve_category_change">
do_approve_category_change</a><pre>
int do_approve_category_change(string name,
                               string new_category)
</pre></br>
This method changes the category of the item waiting to be approved.
<br/><ul>
<li><b>Parameters:</b>
<br/>name - the reference
<br/>new_category - the new category for the item

</dl>

<ul><a name="do_approve_checkin">
do_approve_checkin</a><pre>
int do_approve_checkin(object * obs)
</pre></br>
This method checks in a checked out object.


<ul><a name="do_approve_checkout">
do_approve_checkout</a><pre>
int do_approve_checkout(string name)
</pre></br>
This method checks out the specified item.


<ul><a name="do_approve_item">
do_approve_item</a><pre>
int do_approve_item(string name,
                    string money_str)
</pre></br>
This method approves the specified item.


<ul><a name="do_approve_limit">
do_approve_limit</a><pre>
int do_approve_limit(string limit)
</pre></br>
This method sets the limit on number of items sellable by all the players.
<br/><ul>
<li><b>Parameters:</b>
<br/>limit - the default limit

</dl>

<ul><a name="do_approve_limit_person_items">
do_approve_limit_person_items</a><pre>
int do_approve_limit_person_items(string name,
                                  string value)
</pre></br>
This method sets the limit per person to be a specified value.
<br/><ul>
<li><b>Parameters:</b>
<br/>person - the person to set a limit on
<br/>value - the limit to set

</dl>

<ul><a name="do_approve_limit_person_remove">
do_approve_limit_person_remove</a><pre>
int do_approve_limit_person_remove(string name)
</pre></br>
This method removes any limits set on the player.
<br/><ul>
<li><b>Parameters:</b>
<br/>person - the person to remove the limit on

</dl>

<ul><a name="do_approve_limit_person_value">
do_approve_limit_person_value</a><pre>
int do_approve_limit_person_value(string name,
                                  string money)
</pre></br>
This method sets the limit at which a person can automatically sell
to the shop.
<br/><ul>
<li><b>Parameters:</b>
<br/>person - the person to set a limit on
<br/>money - the limit to set it to

</dl>

<ul><a name="do_approve_limit_person_value_deny">
do_approve_limit_person_value_deny</a><pre>
int do_approve_limit_person_value_deny(string name,
                                       string money)
</pre></br>
This method sets the limit at which a person can automatically sell
to the shop (deny limit).
<br/><ul>
<li><b>Parameters:</b>
<br/>person - the person to set a limit on
<br/>money - the limit to set it to

</dl>

<ul><a name="do_approve_name_change">
do_approve_name_change</a><pre>
int do_approve_name_change(string name,
                           string new_name)
</pre></br>
This method changes the name of the item to be approved.
<br/><ul>
<li><b>Parameters:</b>
<br/>name - the reference
<br/>new_name - the new name for the item

</dl>

<ul><a name="do_approve_pay_deficit">
do_approve_pay_deficit</a><pre>
int do_approve_pay_deficit()
</pre></br>
This method pays off the cash deficit (if one exists).


<ul><a name="do_approve_percentage">
do_approve_percentage</a><pre>
int do_approve_percentage(mixed num)
</pre></br>
This method sets the percentage to add to the sell price.
<br/><ul>
<li><b>Parameters:</b>
<br/>num - the number to set the percentage to

</dl>

<ul><a name="do_approve_reject">
do_approve_reject</a><pre>
int do_approve_reject(string name,
                      string mess,
                      int reject_pos)
</pre></br>
This method rejects the specified item.


<ul><a name="do_approve_status">
do_approve_status</a><pre>
int do_approve_status(int status)
</pre></br>
This method shows the current status of the shop.


<ul><a name="do_approve_status_functions">
do_approve_status_functions</a><pre>
int do_approve_status_functions(int hints)
</pre></br>
This method shows the status of all the user defined functions.
These can be used in other exciting functions.


<ul><a name="do_approve_status_internal_functions">
do_approve_status_internal_functions</a><pre>
int do_approve_status_internal_functions()
</pre></br>
This method shows the status of all the user defined functions.
These can be used in other exciting functions.


<ul><a name="do_approve_use_expression">
do_approve_use_expression</a><pre>
int do_approve_use_expression(string str)
</pre></br>
This method sets up the expression to use when calculating the
ability to use the shop.


<ul><a name="do_check_sell">
do_check_sell</a><pre>
int do_check_sell(object * obs)
</pre></br>
This method runs through the objects and checks to see what sort of levels
they are allowed to sell them for to this shop.
<br/><ul>
<li><b>Returns:</b>
<br/>1 on success, 0 on failure

</dl>

<ul><a name="do_collect_partial_royalties">
do_collect_partial_royalties</a><pre>
int do_collect_partial_royalties(string amount)
</pre></br>
This method collects royalities up to a certain amount.  This is
only usable by the owner of the shop.
<br/><ul>
<li><b>Parameters:</b>
<br/>amount - the amount to collect
<li><b>Returns:</b>
<br/>1 on success, 0 on failure

</dl>

<ul><a name="do_function_help">
do_function_help</a><pre>
int do_function_help(string name)
</pre></br>
Get help on a specific function.
<br/><ul>
<li><b>Parameters:</b>
<br/>name - the name of the function to get help on

</dl>

<ul><a name="do_function_help_list">
do_function_help_list</a><pre>
int do_function_help_list()
</pre></br>
Get help on a specific function.
<br/><ul>
<li><b>Parameters:</b>
<br/>name - the name of the function to get help on

</dl>

<ul><a name="do_list_approval">
do_list_approval</a><pre>
int do_list_approval(int approved)
</pre></br>
List the items for approval.


<ul><a name="do_list_categories">
do_list_categories</a><pre>
int do_list_categories()
</pre></br>
This method lists the current categories and shows us which one is
currently the default.


<ul><a name="do_name_shop">
do_name_shop</a><pre>
int do_name_shop(string name)
</pre></br>
This method gives the shop a name.


<ul><a name="do_remove_category">
do_remove_category</a><pre>
int do_remove_category(string category)
</pre></br>
This method allows the player to remove a category from the list.
<br/><ul>
<li><b>Parameters:</b>
<br/>category - the category to remove

</dl>

<ul><a name="do_remove_sign">
do_remove_sign</a><pre>
int do_remove_sign()
</pre></br>
This method removes the sign from the shop.


<ul><a name="do_rename_category">
do_rename_category</a><pre>
int do_rename_category(string category,
                       string new_category)
</pre></br>
This method allows the player to remove a category from the list.
<br/><ul>
<li><b>Parameters:</b>
<br/>category - the category to rename
<br/>new_category - the new name of a category

</dl>

<ul><a name="do_return">
do_return</a><pre>
int do_return(string name)
</pre></br>
This method returns the item to the person that started to sell it.
This only works before the item has been approved.
<br/><ul>
<li><b>Parameters:</b>
<br/>name - the name of the item to return

</dl>

<ul><a name="do_set_default_category">
do_set_default_category</a><pre>
int do_set_default_category(string default_cat)
</pre></br>
This method sets the default category for the place.
<br/><ul>
<li><b>Parameters:</b>
<br/>default_cat - the default category

</dl>

<ul><a name="do_set_sign">
do_set_sign</a><pre>
int do_set_sign(object * obs)
</pre></br>
This method sets the sign you wish to use for your shop.
The sign will be displayed outside the shop for passer bys.
<br/><ul>
<li><b>Parameters:</b>
<br/>obs - the sign

</dl>

<ul><a name="do_stats_items">
do_stats_items</a><pre>
int do_stats_items(int type)
</pre></br>
This method shows the stats on all the sold items, the number and value
of each one sold.
<br/><ul>
<li><b>Parameters:</b>
<br/>type - the type of sorting to do

</dl>

<ul><a name="do_stats_money">
do_stats_money</a><pre>
int do_stats_money()
</pre></br>
This method shows stats about money and stuff in the shop.


<ul><a name="do_stats_transactions">
do_stats_transactions</a><pre>
int do_stats_transactions()
</pre></br>
This method shows a list of all the transactions that have occured in the
shop.


<ul><a name="do_user_function_add">
do_user_function_add</a><pre>
int do_user_function_add(string def,
                         string expr)
</pre></br>
This method allows a function to be added to the base set of user 
functions.
<br/><ul>
<li><b>Parameters:</b>
<br/>def - the name and arguements
<br/>expr - the expression itself
<li><b>Returns:</b>
<br/>1 on success, 0  on failure

</dl>

<ul><a name="do_user_function_remove">
do_user_function_remove</a><pre>
int do_user_function_remove(string name)
</pre></br>
This method allows a function to be added to the base set of user 
functions.
<br/><ul>
<li><b>Parameters:</b>
<br/>def - the name and arguements
<br/>expr - the expression itself
<li><b>Returns:</b>
<br/>1 on success, 0  on failure

</dl>

<ul><a name="inform_of_royalties">
inform_of_royalties</a><pre>
void inform_of_royalties(object player)
</pre></br>
Tells the playe they have some royalties to pick up.
<br/><ul>
<li><b>Parameters:</b>
<br/>player - the player to tell about the royalties

</dl>

<ul><a name="is_allowed_to_use_shop">
is_allowed_to_use_shop</a><pre>
int is_allowed_to_use_shop(string person)
</pre></br>
This method checks to see if the shop is a closed shop and then checks
to see if the person is allowed.
<br/><ul>
<li><b>Parameters:</b>
<br/>person - the person to check to see if they are allowed
<li><b>Returns:</b>
<br/>1 if they are allowed, 0 if not

</dl>

<ul><a name="is_checkout_object">
is_checkout_object</a><pre>
int is_checkout_object(object ob)
</pre></br>
This method checks to see if the specified item is a checked out
item.
<br/><ul>
<li><b>Parameters:</b>
<br/>ob - the object to check
<li><b>Returns:</b>
<br/>1 if it is, 0 if not

</dl>

<ul><a name="is_item_approved">
is_item_approved</a><pre>
mixed is_item_approved(string seller,
                       int value,
                       string name,
                       object * sellables,
                       string category,
                       int ref final_cost)
</pre></br>
This method checks to see if the specified item is approved.
<br/><ul>
<li><b>Parameters:</b>
<br/>seller - the name of the seller
<br/>value - the amount it is sold for
<br/>name - the name of the item being solde
<br/>sellables - the sold items
<br/>category - the category of the sold item
<br/>final_cost - the final cost of the item
<li><b>Returns:</b>
<br/>1 if is approved, 0 if not, -1 if denied, string if it is approved
        with a list name

</dl>

<ul><a name="query_approval_class">
query_approval_class</a><pre>
class approval_obs query_approval_class(string name)
</pre></br>
This method returns the approval class from the string name.  THis is
assumed to be called from inside a command.
<br/><ul>
<li><b>Parameters:</b>
<br/>name - the string name
<br/>approved - from the approved or waiting list
<li><b>Returns:</b>
<br/>the approval object

</dl>

<ul><a name="query_approval_list">
query_approval_list</a><pre>
class approval_obs * query_approval_list(int approved)
</pre></br>
This method returns the current approval list for the shop.


<ul><a name="query_letter_value">
query_letter_value</a><pre>
string query_letter_value(int pos)
</pre></br>
This method returns the position as a two letter value.
<br/><ul>
<li><b>Parameters:</b>
<br/>pos - the position to mangle
<li><b>Returns:</b>
<br/>the letter value

</dl>

<ul><a name="query_maximum_inventory_size">
query_maximum_inventory_size</a><pre>
int query_maximum_inventory_size()
</pre></br>
This method returns the maximum inventory size for the shop.
<br/><ul>
<li><b>Returns:</b>
<br/>the maximum inventory size

</dl>

<ul><a name="query_maximum_sale_value">
query_maximum_sale_value</a><pre>
int query_maximum_sale_value(string person,
                             object * obs)
</pre></br>
This method will return the maximum value at which the set of items
will be denied.
<br/><ul>
<li><b>Parameters:</b>
<br/>person - the person selling the item
<br/>obs - the set of objects
<li><b>Returns:</b>
<br/>the deny value

</dl>

<ul><a name="query_maximum_sale_value_both">
query_maximum_sale_value_both</a><pre>
int * query_maximum_sale_value_both(string person,
                                    object item)
</pre></br>
This method finds out the maximum value that this item is allowed
to be sold for based on the current settings of the shop.
<br/><ul>
<li><b>Parameters:</b>
<br/>person - the person doing the selling
<br/>items - the item being sold
<li><b>Returns:</b>
<br/>({ queue limit, deny limit })

</dl>

<ul><a name="query_maximum_waiting_queue_size">
query_maximum_waiting_queue_size</a><pre>
int query_maximum_waiting_queue_size()
</pre></br>
This method returns the maximum inventory size for the shop.
<br/><ul>
<li><b>Returns:</b>
<br/>the maximum inventory size

</dl>

<ul><a name="query_number_of_items_listed">
query_number_of_items_listed</a><pre>
int query_number_of_items_listed(string name)
</pre></br>
This method returns the number of items currently in the shop by
the specified person.  This includes items waiting for approval.


<ul><a name="query_number_value">
query_number_value</a><pre>
int query_number_value(string letter)
</pre></br>
This method goes from a letter value to a number.
<br/><ul>
<li><b>Parameters:</b>
<br/>letter - the letters
<li><b>Returns:</b>
<br/>the number

</dl>

<ul><a name="query_owners_money">
query_owners_money</a><pre>
int query_owners_money()
</pre></br>
This method returns the current level of the owners money.


<ul><a name="query_parcel_post">
query_parcel_post</a><pre>
string query_parcel_post()
</pre></br>
This method tells us the current parcel post used for rejecting items.
<br/><ul>
<li><b>Returns:</b>
<br/>the current parcel post

</dl>

<ul><a name="query_round_prices">
query_round_prices</a><pre>
int query_round_prices()
</pre></br>
This method returns the amount to round all sell values for.
<br/><ul>
<li><b>Returns:</b>
<br/>the round price

</dl>

<ul><a name="query_royalty">
query_royalty</a><pre>
int query_royalty(string name)
</pre></br>
This method returns the royalties for the specific person.
<br/><ul>
<li><b>Parameters:</b>
<br/>person - the name of the person to get the royalties of
<li><b>Returns:</b>
<br/>the the royalties

</dl>

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

</dl>

<ul><a name="query_sign_object">
query_sign_object</a><pre>
object query_sign_object()
</pre></br>
This method returns the current sign object for the shop.
<br/><ul>
<li><b>Returns:</b>
<br/>the current sign object

</dl>

<ul><a name="query_transaction_string">
query_transaction_string</a><pre>
string query_transaction_string(class shop_transaction trans)
</pre></br>
This method truns a transaction into a string.
<br/><ul>
<li><b>Parameters:</b>
<br/>trans - the transaction
<li><b>Returns:</b>
<br/>the transaction as a string

</dl>

<ul><a name="remove_from_approval_list">
remove_from_approval_list</a><pre>
void remove_from_approval_list(class approval_obs approve)
</pre></br>
This method removes the item from the approval list.
<br/><ul>
<li><b>Parameters:</b>
<br/>approve - the item to remove

</dl>

<ul><a name="return_all_checkedout_objects">
return_all_checkedout_objects</a><pre>
void return_all_checkedout_objects()
</pre></br>
This method returns all the checkedout objects to the shop.


<ul><a name="set_maximum_inventory_size">
set_maximum_inventory_size</a><pre>
void set_maximum_inventory_size(int size)
</pre></br>
This method sets the maximum inventory size for the shop.
<br/><ul>
<li><b>Parameters:</b>
<br/>size - the maximum inventory size

</dl>

<ul><a name="set_maximum_waiting_queue_size">
set_maximum_waiting_queue_size</a><pre>
void set_maximum_waiting_queue_size(int size)
</pre></br>
This method sets the maximum inventory size for the shop.
<br/><ul>
<li><b>Parameters:</b>
<br/>size - the maximum inventory size

</dl>

<ul><a name="set_parcel_post">
set_parcel_post</a><pre>
void set_parcel_post(string parcel)
</pre></br>
This method sets the parcel post to use for rejecting items.
<br/><ul>
<li><b>Parameters:</b>
<br/>parcel - the parcel post office

</dl>

<ul><a name="set_round_price">
set_round_price</a><pre>
void set_round_price(int round)
</pre></br>
THis method sets the amount to round all the sell values for.  THis is
deal with annoying currencies like AM money which does not have a
'1' item.
<br/><ul>
<li><b>Parameters:</b>
<br/>round - the price to round at

</dl>

<ul><a name="set_shop_name">
set_shop_name</a><pre>
void set_shop_name(string name)
</pre></br>
This method sets the name of the shop.
<br/><ul>
<li><b>Parameters:</b>
<br/>name - the name of the shop

</dl>

<ul><a name="set_sign_object">
set_sign_object</a><pre>
void set_sign_object(object ob)
</pre></br>
This method sets the current sign object.
<br/><ul>
<li><b>Parameters:</b>
<br/>sign - the new sign object

</dl>


<h2>Protected Functions</h2>
These are functions that only objects inheriting the class can access.<p>
<ul><a name="check_remove_category">
check_remove_category</a><pre>
void check_remove_category(string answer,
                           string category)
</pre></br>
This method is called into to check to see if we can remove the category.
<br/><ul>
<li><b>Parameters:</b>
<br/>answer - their answer
<br/>category - the category to remove

</dl>

<ul><a name="confirm_approval">
confirm_approval</a><pre>
void confirm_approval(string answer,
                      class approval_obs approve,
                      int final_cost)
</pre>
<ul><a name="create_auto_load_file">
create_auto_load_file</a><pre>
int create_auto_load_file(mixed ob,
                          int fixed_num)
</pre></br>
This method creates a save file for the specified objects autoloading
capability.  If the number to write to is non-null then it will
write to that object.
<br/><ul>
<li><b>Parameters:</b>
<br/>ob - the object to get an autoload number for
<br/>fixed_num - the file number to write to
<li><b>Returns:</b>
<br/>the auto load number
<li><b>See also:</b>
<br/><a href="#save_it">save_it()
</a></dl>

<ul><a name="create_real_auto_load_object">
create_real_auto_load_object</a><pre>
object create_real_auto_load_object(int num,
                                    object player)
</pre></br>
This method creates a real object from the save file number.
<br/><ul>
<li><b>Parameters:</b>
<br/>num - the save file number
<li><b>Returns:</b>
<br/>the nice shiny new object
<li><b>See also:</b>
<br/><a href="#create_auto_load_file">create_auto_load_file()
</a></dl>


<h2>Classes</h2>
These are nice data types for dealing with...  Data!<p>
<ul>
<li><a name="class_approval">
approval</a><pre>
class approval {
                 mixed hairy;
                 class expression_type * expressions;
                 int low_cost;
                 int high_cost;
                 mapping items;
                 int num_allowed;
                 int high_cost_deny;
}

</pre>
<li><a name="class_approval_item">
approval_item</a><pre>
class approval_item {
                      mixed value;
                      string list_name;
                      int markup;
                      int final_cost;
}

</pre>
<li><a name="class_approval_obs">
approval_obs</a><pre>
class approval_obs {
                     string seller;
                     string category;
                     int value;
                     string name;
                     int * saved;
                     int enter_time;
                     int * checkout;
}

</pre>
<li><a name="class_expression_type">
expression_type</a><pre>
class expression_type {
                        int type;
                        class parse_node * condition;
                        class parse_node * value;
                        string list_name;
}

</pre>
<li><a name="class_seller_information">
seller_information</a><pre>
class seller_information {
                           int max_sellable;
                           int value_limit;
                           int deny_value_limit;
}

</pre>
<li><a name="class_shop_stats">
shop_stats</a><pre>
class shop_stats {
                   int num_sold;
                   int value_sold;
}

</pre>
<li><a name="class_shop_transaction">
shop_transaction</a><pre>
class shop_transaction {
                         int time;
                         string person;
                         string objects;
                         string name_cat;
                         int type;
                         int amount;
                         mixed extra;
}

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

