[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/room/stable.c</h2>
A stable in which to house your lucky transport.<p>Written by Pinkfish<p>Started Tue Nov 30 23:37:12 PST 1999
<h2>Inherits</h2>
This class inherits the following classes <a href="std.room.basic_room.c.shtml">/std/room/basic_room.c</a><h2>Includes</h2>
This class includes the following files <a href="include.playtesters.h.shtml">/include/playtesters.h</a>, <a href="include.player.h.shtml">/include/player.h</a>, /include/shops/bank.h and <a href="include.money.h.shtml">/include/money.h</a><h2>Class Index</h2>
<ul><li><a href="#class_stable">stable</a>
</ul><h2>Method index</h2>
<dl><ul>
<li><a href="#add_stable_type">add_stable_type</a>(string)<br/>
This method adds in a type of transport that can be stabled in this
stable.
<li><a href="#add_to_stable">add_to_stable</a>(string, object *)<br/>
This method adds the horses to the stable.
<li><a href="#adjust_balance">adjust_balance</a>(string, int)<br/>
This method adjusts the balance of the players stable account.
<li><a href="#can_stable_type">can_stable_type</a>(string)<br/>
This method checks to see if the specified type of transport can be
stabled here.
<li><a href="#check_stable">check_stable</a>(string, int, object *, string)<br/>
This method is used to confirm that they want to spend theirn
money stabling the horse.
<li><a href="#do_deposit">do_deposit</a>(string)<br/>
This method adds money to the players stable account.
<li><a href="#do_list">do_list</a>()<br/>
This method shows you a list of all the horse you have in the stables.
<li><a href="#do_return">do_return</a>(string)<br/>
This method removes an animal from the stables and runs off with it.
<li><a href="#do_stable">do_stable</a>(object *)<br/>
This method allows the person to stable their animal.
<li><a href="#load_me">load_me</a>()<br/>
This method loads the room.
<li><a href="#print_ok_message">print_ok_message</a>(object, object *)<br/>
This message prints out something happy when you actually do the
stabling.
<li><a href="#query_balance">query_balance</a>(string)<br/>
This method returns the players current balance in their stable
account.
<li><a href="#query_cost_per_week">query_cost_per_week</a>()<br/>
This method returns the cost per week in the stables.
<li><a href="#query_player_money">query_player_money</a>(object, string)<br/>
This method returns the amount of money on the player and in their
account.
<li><a href="#query_save_directory">query_save_directory</a>()<br/>
This method queries the directory we will use to save the players
transports in.
<li><a href="#query_stable">query_stable</a>(string)<br/>
This method will find the stable associated with the specified player.
<li><a href="#query_stable_types">query_stable_types</a>()<br/>
This method returns the types of transports that can be stabled here.
<li><a href="#query_stabling_cost">query_stabling_cost</a>(string, int)<br/>
This method returns the cost of stabling the horse up to the current
time.
<li><a href="#query_start_cost">query_start_cost</a>()<br/>
This method returns the basic cost of stabling the animal.
<li><a href="#remove_player_money">remove_player_money</a>(object, int, string)<br/>
This method removes money from the player, it will try and remove from
their stable balance before taking money off them.
<li><a href="#save_me">save_me</a>()<br/>
This method saves the room.
<li><a href="#set_balance">set_balance</a>(string, int)<br/>
This method sets the current balance of the player stable account.
<li><a href="#set_cost_per_week">set_cost_per_week</a>(int)<br/>
This method sets the cost per week in the stables.
<li><a href="#set_save_directory">set_save_directory</a>(string)<br/>
This method sets the directory we will use to save the players
transports in.
<li><a href="#set_stable">set_stable</a>(string, class stable *)<br/>
This method sets the stable to the new value.
<li><a href="#set_start_cost">set_start_cost</a>(int)<br/>
This method sets the basic cost of stabling the animal.
</ul><h2>Public Functions</h2>
These are functions that everyone can access.<p>
.<ul><a name="add_stable_type">
add_stable_type</a><pre>
void add_stable_type(string type)
</pre></br>
This method adds in a type of transport that can be stabled in this
stable.
<br/><ul>
<li><b>Parameters:</b>
<br/>type - the type of transport to add

</dl>

<ul><a name="add_to_stable">
add_to_stable</a><pre>
int add_to_stable(string name,
                  object * horses)
</pre></br>
This method adds the horses to the stable.
<br/><ul>
<li><b>Parameters:</b>
<br/>name - the player to whose stable we are adding the horse
<br/>horses - the horses to add
<li><b>Returns:</b>
<br/>1 if they are successfuly added

</dl>

<ul><a name="adjust_balance">
adjust_balance</a><pre>
void adjust_balance(string name,
                    int amt)
</pre></br>
This method adjusts the balance of the players stable account.
<br/><ul>
<li><b>Parameters:</b>
<br/>name - the name of the player
<br/>amt - the amount to adjust the account by

</dl>

<ul><a name="can_stable_type">
can_stable_type</a><pre>
int can_stable_type(string type)
</pre></br>
This method checks to see if the specified type of transport can be
stabled here.
<br/><ul>
<li><b>Parameters:</b>
<br/>type - the type to check
<li><b>Returns:</b>
<br/>1 if it can be stabled, 0 if not

</dl>

<ul><a name="do_deposit">
do_deposit</a><pre>
int do_deposit(string mon)
</pre></br>
This method adds money to the players stable account.
<br/><ul>
<li><b>Parameters:</b>
<br/>obs - the money to be deposited
<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 shows you a list of all the horse you have in the stables.
<br/><ul>
<li><b>Returns:</b>
<br/>1 on success, 0 on failure

</dl>

<ul><a name="do_return">
do_return</a><pre>
int do_return(string num)
</pre></br>
This method removes an animal from the stables and runs off with it.
<br/><ul>
<li><b>Returns:</b>
<br/>1 on success, 0 on failure

</dl>

<ul><a name="do_stable">
do_stable</a><pre>
int do_stable(object * obs)
</pre></br>
This method allows the person to stable their animal.  It will cost
them (of course).


<ul><a name="load_me">
load_me</a><pre>
void load_me()
</pre></br>
This method loads the room.


<ul><a name="print_ok_message">
print_ok_message</a><pre>
void print_ok_message(object me,
                      object * horses)
</pre></br>
This message prints out something happy when you actually do the
stabling.
<br/><ul>
<li><b>Parameters:</b>
<br/>me - the person doing the stabling
<br/>horses - the horses being stabled

</dl>

<ul><a name="query_balance">
query_balance</a><pre>
int query_balance(string name)
</pre></br>
This method returns the players current balance in their stable
account.
<br/><ul>
<li><b>Returns:</b>
<br/>the current stable balance

</dl>

<ul><a name="query_cost_per_week">
query_cost_per_week</a><pre>
int query_cost_per_week()
</pre></br>
This method returns the cost per week in the stables.
<br/><ul>
<li><b>Returns:</b>
<br/>the cost per week

</dl>

<ul><a name="query_player_money">
query_player_money</a><pre>
int query_player_money(object player,
                       string place)
</pre></br>
This method returns the amount of money on the player and in their
account.
<br/><ul>
<li><b>Parameters:</b>
<br/>player - the player to check the balance of
<br/>place - the place in which to check the money
<li><b>Returns:</b>
<br/>the total money on the player and in their account

</dl>

<ul><a name="query_save_directory">
query_save_directory</a><pre>
string query_save_directory()
</pre></br>
This method queries the directory we will use to save the players
transports in.
<br/><ul>
<li><b>Returns:</b>
<br/>the save directory

</dl>

<ul><a name="query_stable_types">
query_stable_types</a><pre>
string * query_stable_types()
</pre></br>
This method returns the types of transports that can be stabled here.
<br/><ul>
<li><b>Returns:</b>
<br/>the types of transport that can be stabled here

</dl>

<ul><a name="query_stabling_cost">
query_stabling_cost</a><pre>
int query_stabling_cost(string name,
                        int pos)
</pre></br>
This method returns the cost of stabling the horse up to the current
time.
<br/><ul>
<li><b>Parameters:</b>
<br/>name - the name of the owner of the stable
<li><b>Returns:</b>
<br/>the cost of stabling the horse

</dl>

<ul><a name="query_start_cost">
query_start_cost</a><pre>
int query_start_cost()
</pre></br>
This method returns the basic cost of stabling the animal.
<br/><ul>
<li><b>Returns:</b>
<br/>the basic cost

</dl>

<ul><a name="remove_player_money">
remove_player_money</a><pre>
void remove_player_money(object player,
                         int amt,
                         string place)
</pre></br>
This method removes money from the player, it will try and remove from
their stable balance before taking money off them.
<br/><ul>
<li><b>Parameters:</b>
<br/>player - the player to remove the money off
<br/>amt - the amount to remove
<br/>place - the place the money is from

</dl>

<ul><a name="save_me">
save_me</a><pre>
void save_me()
</pre></br>
This method saves the room.


<ul><a name="set_balance">
set_balance</a><pre>
void set_balance(string name,
                 int amt)
</pre></br>
This method sets the current balance of the player stable account.
<br/><ul>
<li><b>Parameters:</b>
<br/>name - the name of the player
<br/>amt - the amount to set the stable account as

</dl>

<ul><a name="set_cost_per_week">
set_cost_per_week</a><pre>
void set_cost_per_week(int cost_per_week)
</pre></br>
This method sets the cost per week in the stables.
<br/><ul>
<li><b>Parameters:</b>
<br/>cost_per_week - the cost per week

</dl>

<ul><a name="set_save_directory">
set_save_directory</a><pre>
void set_save_directory(string directory)
</pre></br>
This method sets the directory we will use to save the players
transports in.
<br/><ul>
<li><b>Parameters:</b>
<br/>save - the directory to save the transports in

</dl>

<ul><a name="set_start_cost">
set_start_cost</a><pre>
void set_start_cost(int start_cost)
</pre></br>
This method sets the basic cost of stabling the animal.
<br/><ul>
<li><b>Parameters:</b>
<br/>start_cost - the basic cost

</dl>


<h2>Protected Functions</h2>
These are functions that only objects inheriting the class can access.<p>
<ul><a name="check_stable">
check_stable</a><pre>
void check_stable(string mess,
                  int cost,
                  object * ok,
                  string place)
</pre></br>
This method is used to confirm that they want to spend theirn
money stabling the horse.
<br/><ul>
<li><b>Parameters:</b>
<br/>mess - what the player types
<br/>cost - the cost of the stabling
<br/>ok - the horses being stabled

</dl>

<ul><a name="query_stable">
query_stable</a><pre>
class stable * query_stable(string name)
</pre></br>
This method will find the stable associated with the specified player.
<br/><ul>
<li><b>Returns:</b>
<br/>the found stable, or 0 if not found

</dl>

<ul><a name="set_stable">
set_stable</a><pre>
void set_stable(string name,
                class stable * value)
</pre></br>
This method sets the stable to the new value.
<br/><ul>
<li><b>Parameters:</b>
<br/>name - the name of the stable
<br/>value - the new value of the stable

</dl>


<h2>Classes</h2>
These are nice data types for dealing with...  Data!<p>
<ul>
<li><a name="class_stable">
stable</a><pre>
class stable {
               int date_in;
               int last_paid;
               string name;
               mixed * save_info;
}

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

