[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/craft_shop.c</h2>
This room will handle craft shop like things, where you sell stuff to
the store and it will sell it onto other players after taking
a margin.  This can be used for potions, pottery, swords, anything!
This has a few small hooks in here to handle categories in the
sell process.  Most of the category handling code is dealt with in
the category based craft shop.<p>Written by Pinkfish<p>Started Thu Feb  5 15:39:57 CST 1998
<h2>Inherits</h2>
This class inherits the following classes <a href="std.shops.inherit.open_shop.c.shtml">/std/shops/inherit/open_shop.c</a><h2>Includes</h2>
This class includes the following files <a href="include.money.h.shtml">/include/money.h</a>, /include/shops/craft_shop.h and /include/shops/bank.h<h2>Method index</h2>
<dl><ul>
<li><a href="#check_open">check_open</a>(object, string)<br/>
This method checks to see if the shop is open or not.
<li><a href="#check_sell_name">check_sell_name</a>(string)<br/>
This method makes sure a name is not too long and contains
no colour codes.
<li><a href="#complete_sale">complete_sale</a>(int, string, object *, string)<br/>
This method is called to complete the sale completely.
<li><a href="#confirm_sale">confirm_sale</a>(string, int, string, object *, string)<br/>
This method confirms the sale after the cost and name have been
determined.
<li><a href="#confirm_sell_name_choice">confirm_sell_name_choice</a>(string, string, object *)<br/>
This method is used to confirm the choice of name to use when
selling the object.
<li><a href="#determine_cost">determine_cost</a>(string, string, object *)<br/>
This method figured out the cost of the item based on the value they
type in.
<li><a href="#do_browse">do_browse</a>(object *)<br/>
This function browses through the current selected list of items.
<li><a href="#do_buy">do_buy</a>(object *, int)<br/>
This method will attempt to buy an object from the shops inventory.
<li><a href="#do_change">do_change</a>(object *, string)<br/>
This function changes the list price of an object.
<li><a href="#do_change_name">do_change_name</a>(object *, string)<br/>
This function changes the list name of an object.
<li><a href="#do_collect">do_collect</a>()<br/>
This method collects any royalties the current player is owed.
<li><a href="#do_confirm_sale">do_confirm_sale</a>(int, string, object *)<br/>
This method will ask the person to confirm the sale.
<li><a href="#do_delete">do_delete</a>(string)<br/>
This method will delete a list entry without the owner getting paid.
<li><a href="#do_list">do_list</a>()<br/>
This method will list the current set of objects which are
available to buy.
<li><a href="#do_read_file">do_read_file</a>(int, string)<br/>
This method handles the reading of the file to the disk.
<li><a href="#do_royalties">do_royalties</a>()<br/>
This method shows any royalties that you might be able to collect.
<li><a href="#do_save_file">do_save_file</a>(int, mixed, string)<br/>
This method handles the saving of the file to the disk.
<li><a href="#do_sell">do_sell</a>(object *)<br/>
This method sells an object into the craft shop.
<li><a href="#do_sell_id">do_sell_id</a>(object *, string, int)<br/>
This method tries to sell an object as a name that already exists in
the shop.
<li><a href="#inform_of_buy">inform_of_buy</a>(int, object *, object, string *, string *, string *, int *)<br/>
This method is called when something is bought and tells us how much
has been spent.
<li><a href="#is_able_to_change">is_able_to_change</a>(object)<br/>
This allows the system to override this for player run shops so the
owner can discount peoples items.
<li><a href="#is_allowed_to_sell">is_allowed_to_sell</a>(object *, string, string *)<br/>
This method checks to see if this item is allowed to be sold in this shop.
<li><a href="#query_allowed_to_sell">query_allowed_to_sell</a>()<br/>
This method returns the function used to check to see if an object
is able to be sold here or not.
<li><a href="#query_always_ask_price">query_always_ask_price</a>()<br/>
This method returns the flag on this object that tells us if the shop
will always ask for a price
<li><a href="#query_controller">query_controller</a>()<br/>
This method returns the current value of the controller.
<li><a href="#query_craft_shop_save_dir">query_craft_shop_save_dir</a>()<br/>
This method returns the file name of the save file.
<li><a href="#query_cut">query_cut</a>()<br/>
This method queries the current cut defined for this shop.
<li><a href="#query_extra_price_information">query_extra_price_information</a>(string, object *)<br/>
This method returns any extra information about prices that the
shop wants to display before entering a cost.
<li><a href="#query_extra_sell_check">query_extra_sell_check</a>()<br/>
This method returns the extra sell check function.
<li><a href="#query_max_sell_per_person">query_max_sell_per_person</a>()<br/>
This methods returns the maximum number of allowed objects to be
sold by each person into the shop.
<li><a href="#query_maximum_sale_value">query_maximum_sale_value</a>(string, object *)<br/>
This method will return the maximum price this item is allowed to
be sold for.
<li><a href="#query_minimum_cost">query_minimum_cost</a>()<br/>
This method returns the minimum allowed cost for an item in the
shop inventory.
<li><a href="#query_no_royalty_commands">query_no_royalty_commands</a>()<br/>
This method returns the flagt the removes the royalty commands from the
shop.
<li><a href="#query_use_name">query_use_name</a>()<br/>
This method returns the flag for the use name of this shop.
<li><a href="#query_when_sold_function">query_when_sold_function</a>()<br/>
This method returns the when sold function.
<li><a href="#reload_shop">reload_shop</a>()<br/>
This method allows you to cause the shop to load itself up.
<li><a href="#sell_choice">sell_choice</a>(string, object *, string *)<br/>
This method is used when there is a list of object already listed.
<li><a href="#sell_name">sell_name</a>(string, object *)<br/>
This method determines the name to list the object under.
<li><a href="#set_allowed_to_sell">set_allowed_to_sell</a>(function)<br/>
This method sets the function to use to check to see if the object
is able to be sold here or not.
<li><a href="#set_always_ask_price">set_always_ask_price</a>(int)<br/>
This method sets the flag which makes the shop always ask for a price
when it attempts to save something.
<li><a href="#set_controller">set_controller</a>(string)<br/>
This method sets the controller object for this shop.
<li><a href="#set_cut">set_cut</a>(int)<br/>
This method sets the cut for the object.
<li><a href="#set_extra_sell_check">set_extra_sell_check</a>(function)<br/>
This method sets the extra sell function for the shop.
<li><a href="#set_max_sell_per_person">set_max_sell_per_person</a>(int)<br/>
This method sets the maxium allowed number of objects to be sold
by each person into the shop.
<li><a href="#set_minimum_cost">set_minimum_cost</a>(int)<br/>
This method sets the minimum allowed cost for the item in the
shop inventory.
<li><a href="#set_no_royalty_commands">set_no_royalty_commands</a>(int)<br/>
This method sets the flag that removes the royalty commands from the
shop, if the royalty stuff is be handled somewhere else.
<li><a href="#set_save_dir">set_save_dir</a>(string)<br/>
This method sets the save file associated with the controller.
<li><a href="#set_use_name">set_use_name</a>(int)<br/>
This method sets the flag which makes the shop use the name of the
item as the sell type always.
<li><a href="#set_when_sold_function">set_when_sold_function</a>(function)<br/>
This method sets the function to be called on all the objects when
they are sold.
<li><a href="#value_from_string">value_from_string</a>(string, string)<br/>
This attempts to figure out how much the person is telling us the
item costs.
</ul><h2>Public Functions</h2>
These are functions that everyone can access.<p>
.<ul><a name="check_open">
check_open</a><pre>
int check_open(object player,
               string type)
</pre></br>
This method checks to see if the shop is open or not.  It will setup the
default fail message if this is what is needed.
<br/><ul>
<li><b>Parameters:</b>
<br/>command - the command to check for
<li><b>See also:</b>
<br/><a href="#set_open_function">set_open_function()
</a></dl>

<ul><a name="do_browse">
do_browse</a><pre>
int do_browse(object * obs)
</pre></br>
This function browses through the current selected list of items.
<br/><ul>
<li><b>Parameters:</b>
<br/>obs - the items to browse through

</dl>

<ul><a name="do_buy">
do_buy</a><pre>
int do_buy(object * obs,
           int force)
</pre></br>
This method will attempt to buy an object from the shops inventory.
<br/><ul>
<li><b>Parameters:</b>
<br/>str - the string to match an object with
<li><b>Returns:</b>
<br/>1 on success, 0 on failure
<li><b>See also:</b>
<br/><a href="#do_sell">do_sell()</a> and <a href="#do_list">do_list()
</a></dl>

<ul><a name="do_change">
do_change</a><pre>
int do_change(object * obs,
              string change)
</pre></br>
This function changes the list price of an object.
<br/><ul>
<li><b>Parameters:</b>
<br/>obs - the object to change the list price of
<br/>change - the value to change the list price to

</dl>

<ul><a name="do_change_name">
do_change_name</a><pre>
int do_change_name(object * obs,
                   string new_name)
</pre></br>
This function changes the list name of an object.
<br/><ul>
<li><b>Parameters:</b>
<br/>obs - the object to change the list name of
<br/>new_name - the value to change the list name to

</dl>

<ul><a name="do_collect">
do_collect</a><pre>
int do_collect()
</pre></br>
This method collects any royalties the current player is owed.
<br/><ul>
<li><b>Returns:</b>
<br/>1 on succes, 0 on failure

</dl>

<ul><a name="do_delete">
do_delete</a><pre>
int do_delete(string id)
</pre></br>
This method will delete a list entry without the owner getting paid.
<br/><ul>
<li><b>Parameters:</b>
<br/>str - the string to match an object with
<li><b>Returns:</b>
<br/>1 on success, 0 on failure

</dl>

<ul><a name="do_list">
do_list</a><pre>
int do_list()
</pre></br>
This method will list the current set of objects which are
available to buy.
<br/><ul>
<li><b>Returns:</b>
<br/>1 on success, 0 on failure
<li><b>See also:</b>
<br/><a href="#do_sell">do_sell()</a> and <a href="#do_buy">do_buy()
</a></dl>

<ul><a name="do_royalties">
do_royalties</a><pre>
int do_royalties()
</pre></br>
This method shows any royalties that you might be able to collect.
<br/><ul>
<li><b>Returns:</b>
<br/>1 on succes, 0 on failure

</dl>

<ul><a name="do_sell">
do_sell</a><pre>
int do_sell(object * obs)
</pre></br>
This method sells an object into the craft shop.
<br/><ul>
<li><b>Parameters:</b>
<br/>obs - the objects to sell
<li><b>Returns:</b>
<br/>1 on success, 0 on failure
<li><b>See also:</b>
<br/><a href="#do_list">do_list()</a>, <a href="#do_buy">do_buy()</a> and <a href="#do_sell_id">do_sell_id()
</a></dl>

<ul><a name="do_sell_id">
do_sell_id</a><pre>
int do_sell_id(object * obs,
               string id,
               int force)
</pre></br>
This method tries to sell an object as a name that already exists in
the shop.
<br/><ul>
<li><b>Parameters:</b>
<br/>obs - the objects to sell
<br/>id - the id to sell them as
<li><b>See also:</b>
<br/><a href="#do_sell">do_sell()</a>, <a href="#do_list">do_list()</a> and <a href="#do_buy">do_buy()
</a></dl>

<ul><a name="inform_of_buy">
inform_of_buy</a><pre>
void inform_of_buy(int value,
                   object * obs,
                   object player,
                   string * sellers,
                   string * names,
                   string * cats,
                   int * values)
</pre></br>
This method is called when something is bought and tells us how much
has been spent.
<br/><ul>
<li><b>Parameters:</b>
<br/>value - of the the items sold
<br/>obs - the objects bought
<br/>player - who bought them
<br/>sellers - the people whose items were bought
<br/>names - the names of the items bought
<br/>cats - the categories of the items bought
<br/>values - the values of each item

</dl>

<ul><a name="is_able_to_change">
is_able_to_change</a><pre>
int is_able_to_change(object ob)
</pre></br>
This allows the system to override this for player run shops so the
owner can discount peoples items.
<br/><ul>
<li><b>Parameters:</b>
<br/>ob - the object to test
<li><b>Returns:</b>
<br/>1 if they can modify the item, 0 if not

</dl>

<ul><a name="is_allowed_to_sell">
is_allowed_to_sell</a><pre>
int is_allowed_to_sell(object * obs,
                       string name,
                       string * sellable_names)
</pre></br>
This method checks to see if this item is allowed to be sold in this shop.
It assumes it is called from a add_command() method and sets up fail
messages accordingly.
<br/><ul>
<li><b>Parameters:</b>
<br/>obs - the objects to check
<br/>name - the name of the person doing the selling
<br/>sellable_names - the names of the items to sell

</dl>

<ul><a name="query_allowed_to_sell">
query_allowed_to_sell</a><pre>
function query_allowed_to_sell()
</pre></br>
This method returns the function used to check to see if an object
is able to be sold here or not.
<br/><ul>
<li><b>Returns:</b>
<br/>func the function to use for checking
<li><b>See also:</b>
<br/><a href="#set_allowed_to_sell">set_allowed_to_sell()
</a></dl>

<ul><a name="query_always_ask_price">
query_always_ask_price</a><pre>
int query_always_ask_price()
</pre></br>
This method returns the flag on this object that tells us if the shop
will always ask for a price
<br/><ul>
<li><b>Returns:</b>
<br/>the flag

</dl>

<ul><a name="query_controller">
query_controller</a><pre>
object query_controller()
</pre></br>
This method returns the current value of the controller.
<br/><ul>
<li><b>Returns:</b>
<br/>the current controller
<li><b>See also:</b>
<br/><a href="#set_controller">set_controller()
</a></dl>

<ul><a name="query_craft_shop_save_dir">
query_craft_shop_save_dir</a><pre>
string query_craft_shop_save_dir()
</pre></br>
This method returns the file name of the save file.
<br/><ul>
<li><b>Returns:</b>
<br/>the file name of the save file
<li><b>See also:</b>
<br/><a href="#set_save_dir">set_save_dir()
</a></dl>

<ul><a name="query_cut">
query_cut</a><pre>
int query_cut()
</pre></br>
This method queries the current cut defined for this shop.
<br/><ul>
<li><b>Returns:</b>
<br/>the current cut for the shop
<li><b>See also:</b>
<br/><a href="#set_cut">set_cut()
</a></dl>

<ul><a name="query_extra_price_information">
query_extra_price_information</a><pre>
string query_extra_price_information(string person,
                                     object * obs)
</pre></br>
This method returns any extra information about prices that the
shop wants to display before entering a cost.  This can be
overridden in higher inherits to control this more effectively.
<br/><ul>
<li><b>Returns:</b>
<br/>an extra string to print

</dl>

<ul><a name="query_extra_sell_check">
query_extra_sell_check</a><pre>
function query_extra_sell_check()
</pre></br>
This method returns the extra sell check function.
<br/><ul>
<li><b>Returns:</b>
<br/>the extra sell check function
<li><b>See also:</b>
<br/><a href="#set_extra_sell_check">set_extra_sell_check()
</a></dl>

<ul><a name="query_max_sell_per_person">
query_max_sell_per_person</a><pre>
int query_max_sell_per_person()
</pre></br>
This methods returns the maximum number of allowed objects to be
sold by each person into the shop.
<br/><ul>
<li><b>Returns:</b>
<br/>the maximum number to be sold
<li><b>See also:</b>
<br/><a href="#set_max_sell_per_person">set_max_sell_per_person()
</a></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 price this item is allowed to
be sold for.  This will return 0 if there is no maximum price
<br/><ul>
<li><b>Returns:</b>
<br/>0 if there is no maximum price, or maximum price

</dl>

<ul><a name="query_minimum_cost">
query_minimum_cost</a><pre>
int query_minimum_cost()
</pre></br>
This method returns the minimum allowed cost for an item in the
shop inventory.
<br/><ul>
<li><b>See also:</b>
<br/><a href="#set_minimum_cost">set_minimum_cost()
</a></dl>

<ul><a name="query_no_royalty_commands">
query_no_royalty_commands</a><pre>
int query_no_royalty_commands()
</pre></br>
This method returns the flagt the removes the royalty commands from the
shop.
<br/><ul>
<li><b>Returns:</b>
<br/>the royalty command flag

</dl>

<ul><a name="query_use_name">
query_use_name</a><pre>
int query_use_name()
</pre></br>
This method returns the flag for the use name of this shop.
<br/><ul>
<li><b>Returns:</b>
<br/>1 if the name is used, 0 if not

</dl>

<ul><a name="query_when_sold_function">
query_when_sold_function</a><pre>
function query_when_sold_function()
</pre></br>
This method returns the when sold function.
<br/><ul>
<li><b>Returns:</b>
<br/>the when sold function
<li><b>See also:</b>
<br/><a href="#set_when_sold_function">set_when_sold_function()
</a></dl>

<ul><a name="reload_shop">
reload_shop</a><pre>
void reload_shop()
</pre></br>
This method allows you to cause the shop to load itself up.


<ul><a name="set_allowed_to_sell">
set_allowed_to_sell</a><pre>
void set_allowed_to_sell(function func)
</pre></br>
This method sets the function to use to check to see if the object
is able to be sold here or not.  The function will be called with
one parameter, that is the object being check for buyability.
<br/><ul>
<li><b>Parameters:</b>
<br/>func - the function to check objects with
<li><b>See also:</b>
<br/><a href="#query_allowed_to_sell">query_allowed_to_sell()
</a></dl>

<ul><a name="set_always_ask_price">
set_always_ask_price</a><pre>
void set_always_ask_price(int ask_price)
</pre></br>
This method sets the flag which makes the shop always ask for a price
when it attempts to save something.
<br/><ul>
<li><b>Parameters:</b>
<br/>ask_price - the flag

</dl>

<ul><a name="set_controller">
set_controller</a><pre>
void set_controller(string name)
</pre></br>
This method sets the controller object for this shop.
<br/><ul>
<li><b>Parameters:</b>
<br/>controller - the controller name as a string
<li><b>See also:</b>
<br/><a href="#query_controller">query_controller()
</a></dl>

<ul><a name="set_cut">
set_cut</a><pre>
void set_cut(int new_cut)
</pre></br>
This method sets the cut for the object.
<br/><ul>
<li><b>Parameters:</b>
<br/>new_cut - the new cut of the object
<li><b>See also:</b>
<br/><a href="#query_cut">query_cut()
</a></dl>

<ul><a name="set_extra_sell_check">
set_extra_sell_check</a><pre>
void set_extra_sell_check(function func)
</pre></br>
This method sets the extra sell function for the shop.  The extra sell
function is called after the sell process is almost finished.  It can
check for extra things needed in the sell process, like which page of
the book to browse.
<br/><ul>
<li><b>Parameters:</b>
<br/>func - the extra sell function
<li><b>See also:</b>
<br/><a href="#query_extra_sell_check">query_extra_sell_check()</a> and <a href="#complete_sell">complete_sell()
</a></dl>

<ul><a name="set_max_sell_per_person">
set_max_sell_per_person</a><pre>
void set_max_sell_per_person(int num)
</pre></br>
This method sets the maxium allowed number of objects to be sold
by each person into the shop.
<br/><ul>
<li><b>Parameters:</b>
<br/>num - the maximum number to be sold
<li><b>See also:</b>
<br/><a href="#query_max_sell_per_person">query_max_sell_per_person()
</a></dl>

<ul><a name="set_minimum_cost">
set_minimum_cost</a><pre>
void set_minimum_cost(int cost)
</pre></br>
This method sets the minimum allowed cost for the item in the
shop inventory.
<br/><ul>
<li><b>Parameters:</b>
<br/>cost - the minimum cost
<li><b>See also:</b>
<br/><a href="#query_minimum_cost">query_minimum_cost()
</a></dl>

<ul><a name="set_no_royalty_commands">
set_no_royalty_commands</a><pre>
void set_no_royalty_commands(int flag)
</pre></br>
This method sets the flag that removes the royalty commands from the
shop, if the royalty stuff is be handled somewhere else.
<br/><ul>
<li><b>Parameters:</b>
<br/>flag - the flag to set

</dl>

<ul><a name="set_save_dir">
set_save_dir</a><pre>
void set_save_dir(string fname)
</pre></br>
This method sets the save file associated with the controller.  The save
file should actually be a directory, the name of the directory plus a
.o will be used for the save files.  The directory must exist or weird
errors will occur.
This should always be set in the setup function of the room.
<br/><ul>
<li><b>Parameters:</b>
<br/>fname - the save file
<li><b>See also:</b>
<br/><a href="#set_controller">set_controller()</a> and <a href="#query_save_dir">query_save_dir()
</a></dl>

<ul><a name="set_use_name">
set_use_name</a><pre>
void set_use_name(int flag)
</pre></br>
This method sets the flag which makes the shop use the name of the
item as the sell type always.
<br/><ul>
<li><b>Parameters:</b>
<br/>flag - 1 to make it force the use name ability

</dl>

<ul><a name="set_when_sold_function">
set_when_sold_function</a><pre>
void set_when_sold_function(function func)
</pre></br>
This method sets the function to be called on all the objects when
they are sold.  For instance this can be used to close all books
etc.
<br/><ul>
<li><b>Parameters:</b>
<br/>func - the function to use
<li><b>Example:</b>
<br/><pre>// Close the book when it is sold.
set_when_sold_function( (: $1->set_open_page(0) :) );
</pre></dl>

<ul><a name="value_from_string">
value_from_string</a><pre>
int value_from_string(string str,
                      string place)
</pre></br>
This attempts to figure out how much the person is telling us the
item costs.
<br/><ul>
<li><b>Parameters:</b>
<br/>str - the string to get the value of

</dl>


<h2>Protected Functions</h2>
These are functions that only objects inheriting the class can access.<p>
<ul><a name="check_sell_name">
check_sell_name</a><pre>
int check_sell_name(string name)
</pre></br>
This method makes sure a name is not too long and contains
no colour codes.
<br/><ul>
<li><b>Parameters:</b>
<br/>name - the name to list the object as
<li><b>Returns:</b>
<br/>0 if name is unacceptable, 1 if it's OK

</dl>

<ul><a name="complete_sale">
complete_sale</a><pre>
void complete_sale(int value,
                   string name,
                   object * sellable,
                   string category)
</pre></br>
This method is called to complete the sale completely.  It is split
up into a second function to allow the extra sell stuff
to work neatly.
<br/><ul>
<li><b>Parameters:</b>
<br/>value - the value of the objects to sell
<br/>name - the list name
<br/>sellable - the list of objects to sell
<br/>category - the category of the object, 0 if none

</dl>

<ul><a name="confirm_sale">
confirm_sale</a><pre>
void confirm_sale(string answer,
                  int value,
                  string name,
                  object * sellable,
                  string category)
</pre></br>
This method confirms the sale after the cost and name have been
determined.
<br/><ul>
<li><b>Parameters:</b>
<br/>answer - the answer to confirm with
<br/>value - the value of the object
<br/>name - the name of the object
<br/>sellable - the list of sellable objects
<br/>category - the category of the object, 0 if none

</dl>

<ul><a name="confirm_sell_name_choice">
confirm_sell_name_choice</a><pre>
void confirm_sell_name_choice(string answer,
                              string name,
                              object * sellable)
</pre></br>
This method is used to confirm the choice of name to use when
selling the object.
<br/><ul>
<li><b>Parameters:</b>
<br/>answer - the confirmation choice
<br/>name - the name to sell it as
<br/>sellable - the list of objects to sell

</dl>

<ul><a name="determine_cost">
determine_cost</a><pre>
void determine_cost(string cost,
                    string name,
                    object * sellable)
</pre></br>
This method figured out the cost of the item based on the value they
type in.
<br/><ul>
<li><b>Parameters:</b>
<br/>cost - the cost of the item
<br/>name - the name of the item
<br/>sellable - the array of objects to sell

</dl>

<ul><a name="do_confirm_sale">
do_confirm_sale</a><pre>
void do_confirm_sale(int value,
                     string name,
                     object * sellables)
</pre></br>
This method will ask the person to confirm the sale.  It will check
the extra_sell_check function and then call the extra sale thing.
<br/><ul>
<li><b>Parameters:</b>
<br/>value - the value of the thing being sold
<br/>name - the name the thing is sold for
<br/>sellables - the things to sell

</dl>

<ul><a name="do_read_file">
do_read_file</a><pre>
string do_read_file(int type,
                    string fname)
</pre></br>
This method handles the reading of the file to the disk.
<br/><ul>
<li><b>Parameters:</b>
<br/>type - the type of file to read
<br/>fname - the file name is optional and only used for data files
<li><b>Returns:</b>
<br/>the value read

</dl>

<ul><a name="do_save_file">
do_save_file</a><pre>
void do_save_file(int type,
                  mixed value,
                  string fname)
</pre></br>
This method handles the saving of the file to the disk.
<br/><ul>
<li><b>Parameters:</b>
<br/>type - the type of file to save
<br/>value - the value to save to it
<br/>fname - the file name is optional and only used for data files

</dl>

<ul><a name="sell_choice">
sell_choice</a><pre>
void sell_choice(string answer,
                 object * sellables,
                 string * names)
</pre></br>
This method is used when there is a list of object already listed.  It
will check to see if the choice entered is valid and then use that
name when selling the object if it is.
<br/><ul>
<li><b>Parameters:</b>
<br/>choice - the selected choice
<br/>sellable - the array of sellable objects
<br/>names - the names of choices for name

</dl>

<ul><a name="sell_name">
sell_name</a><pre>
void sell_name(string name,
               object * sellable)
</pre></br>
This method determines the name to list the object under.  This is
called when a new name is used.
<br/><ul>
<li><b>Parameters:</b>
<br/>name - the name to list the object as
<br/>sellable - the list of sellable objects

</dl>


[an error occurred while processing this directive]

