[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 /d/guilds/merchants/std/stall.c</h2>
The inheritable player stall object.
This is the object that gets inherited when a player run stall
is created. 
<p>Features provided include: 

A feedback system so that the player can give their 
opinions on the player-merchant concept.

An evauluation book, so that players can value items before
they sell them.

A showcase (stallbox.c) to put items in so they can show other
players them without risk of theft.

<p>Future features may include:

Facilities for metalwork, seamstressing and leatherworking.

Advertising using the cryer and a commerce channel.

<p>To use this stall, inherit "/std/stall", and include the 
line set_location( string ) ensuring that the string in 
question doesn't clash with any other stalls.

<p>See /d/guilds/merchants/stalls/Ankh/cockbill.c for an example.

<p>At least half the credit for this file goes to Raffi for 
her ideas, descriptions and support. All I did was code it :)
<p>Written by Terano
<h3>Change history</h3>
<ul><li>10 January 1998 -- Terano<br/>     Rewrote it so it looked a lot neater, removed a few unneeded
     function calls, and added a few new features.
</ul>
<h2>Inherits</h2>
This class inherits the following classes <a href="std.room.c.shtml">/std/room.c</a><h2>Includes</h2>
This class includes the following files <a href="include.merchant.h.shtml">/include/merchant.h</a><h2>Method index</h2>
<dl><ul>
<li><a href="#add_cheater">add_cheater</a>(string)<br/>
This function adds a player who has been cheating, so they can no 
longer use the stall.
<li><a href="#do_scrawl">do_scrawl</a>(int, int, int, mixed *)<br/>
do_scrawl handles the command 'scrawl', if the player scrawls on 
board, it lets them write a message on the board object cloned 
in create() using the language of their choice.
<li><a href="#do_sign">do_sign</a>(int, int, int, mixed *)<br/>
do_sign is called from the sign command given in init.
<li><a href="#do_sign_out">do_sign_out</a>(int)<br/>
Signs the player out.
<li><a href="#lang_dependent_setup">lang_dependent_setup</a>()<li><a href="#load_cheat_file">load_cheat_file</a>()<br/>
Reads *abusers from MASTER_SAVE_FILE.
<li><a href="#make_report">make_report</a>(string)<br/>
make_report() checks the length of the report submitted when 
they signed out, if its long enough it calls do_sign_out( 1 )
to sign out the player, otherwise it informs the player that
the report isnt long enough, and offers them the opportunity 
to do it again, or sign out anyway by calling do_sign_out( 0 ).
<li><a href="#make_sign">make_sign</a>(string)<br/>
make_sign uses query_current_language to get the players current
language, then uses set_read_mess( message, language ) to write
the message on the board.
<li><a href="#query_cheat_list">query_cheat_list</a>()<br/>
This function gives a list of the current people who
cant use the stall

<li><a href="#remove_cheater">remove_cheater</a>(object)<br/>
This function is for when they redeem themselves and can use 
the stall again.
<li><a href="#save_cheat_file">save_cheat_file</a>()<br/>
Writes the array *abusers to MASTER_SAVE_FILE so that it can be 
retrieved later.
<li><a href="#set_language">set_language</a>(string)</ul><h2>Public Functions</h2>
These are functions that everyone can access.<p>
.<ul><a name="add_cheater">
add_cheater</a><pre>
void add_cheater(string cheater)
</pre></br>
This function adds a player who has been cheating, so they can no 
longer use the stall.


<ul><a name="do_scrawl">
do_scrawl</a><pre>
int do_scrawl(int a,
              int b,
              int c,
              mixed * args)
</pre></br>
do_scrawl handles the command 'scrawl', if the player scrawls on 
board, it lets them write a message on the board object cloned 
in create() using the language of their choice. It does this
using the make_sign function.


<ul><a name="do_sign">
do_sign</a><pre>
int do_sign(int a,
            int b,
            int c,
            mixed * args)
</pre></br>
do_sign is called from the sign command given in init.
<p>It does the following:
<p>Sign In:
Checks that the player isnt a member of *abusers, if they are send 
them on their way.
Checks if they have used the stall in the last hour, if so it
stops them signing in.
Checks that they havent already signed in, if so it stops them.
Checks that no one else is signed in, if so it stops them.
Otherwise tell everyone in the room that they sign in, log it
and set occupied to the player.

<p>Sign Out:
Check if the player is actually signed into the stall and if so
call the report writing function.


<ul><a name="lang_dependent_setup">
lang_dependent_setup</a><pre>
void lang_dependent_setup()
</pre>
<ul><a name="make_report">
make_report</a><pre>
int make_report(string report)
</pre></br>
make_report() checks the length of the report submitted when 
they signed out, if its long enough it calls do_sign_out( 1 )
to sign out the player, otherwise it informs the player that
the report isnt long enough, and offers them the opportunity 
to do it again, or sign out anyway by calling do_sign_out( 0 ).
The report is written using unguarded( (: writefile() :) ).


<ul><a name="make_sign">
make_sign</a><pre>
int make_sign(string signtxt)
</pre></br>
make_sign uses query_current_language to get the players current
language, then uses set_read_mess( message, language ) to write
the message on the board.


<ul><a name="query_cheat_list">
query_cheat_list</a><pre>
string * query_cheat_list()
</pre></br>
This function gives a list of the current people who
cant use the stall


<ul><a name="remove_cheater">
remove_cheater</a><pre>
void remove_cheater(object redeemed)
</pre></br>
This function is for when they redeem themselves and can use 
the stall again.


<ul><a name="set_language">
set_language</a><pre>
void set_language(string l)
</pre>

<h2>Protected Functions</h2>
These are functions that only objects inheriting the class can access.<p>
<ul><a name="do_sign_out">
do_sign_out</a><pre>
void do_sign_out(int flag)
</pre></br>
Signs the player out. If the flag is set to 1, it means they
wrote a report and should get the xp reward, otherwise it notes
that they didnt write a report and signs them out anyway.


<ul><a name="load_cheat_file">
load_cheat_file</a><pre>
void load_cheat_file()
</pre></br>
Reads *abusers from MASTER_SAVE_FILE.


<ul><a name="save_cheat_file">
save_cheat_file</a><pre>
void save_cheat_file()
</pre></br>
Writes the array *abusers to MASTER_SAVE_FILE so that it can be 
retrieved later. 



[an error occurred while processing this directive]

