[Package Index | Mudlib Index | Effect Index]
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.
Future features may include: Facilities for metalwork, seamstressing and leatherworking. Advertising using the cryer and a commerce channel.
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.
See /d/guilds/merchants/stalls/Ankh/cockbill.c for an example.
At least half the credit for this file goes to Raffi for her ideas, descriptions and support. All I did was code it :)
Written by Terano
.
void add_cheater(string cheater)This function adds a player who has been cheating, so they can no longer use the stall.
int do_scrawl(int a, int b, int c, mixed * args)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.
int do_sign(int a, int b, int c, mixed * args)do_sign is called from the sign command given in init.
It does the following:
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.
Sign Out: Check if the player is actually signed into the stall and if so call the report writing function.
void lang_dependent_setup()
int make_report(string report)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() :) ).
int make_sign(string signtxt)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.
string * query_cheat_list()This function gives a list of the current people who cant use the stall
void remove_cheater(object redeemed)This function is for when they redeem themselves and can use the stall again.
void set_language(string l)
void do_sign_out(int flag)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.
void load_cheat_file()Reads *abusers from MASTER_SAVE_FILE.
void save_cheat_file()Writes the array *abusers to MASTER_SAVE_FILE so that it can be retrieved later.