[ Package Index | Mudlib Index | Effect Index ]

File /obj/service_provider.c

The service provider object. It is designed to be similar to the peddler object, only instead of selling objects, it sells services instead.

Written by Furcifer March 2000


Inherits

This class inherits the following classes /obj/monster.c

Includes

This class includes the following files /include/armoury.h, /include/shops/bank.h, /include/money.h and /include/move_failures.h

Method index

 o add_service(string, string, string, int, string *)
This method adds a service to the list of services on offer.
 o check_busy(object)
 o do_browse(mixed, string, string, string *)
The main entrance to the browse for things command.
 o do_list()
The main entrance to the list stuff command.
 o do_request(mixed, string, string, string *)
The main entrance to the buy things command.
 o remove_service(string)
This method removes a service.
 o reset_busy()
 o set_busy()

Public Functions

These are functions that everyone can access.

.
 * add_service
varargs int add_service(string service,
                        string browse_info,
                        string func,
                        int cost,
                        string * aliases)
This method adds a service to the list of services on offer.

Parameters:
service - the name of the service
cost - what it costs
the - function which controls
*aliases - an array of aliases for this service.
Returns:
1 on success, 0 on failure
 * check_busy
varargs int check_busy(object player)
 * do_browse
int do_browse(mixed indirect_obs,
              string dir_match,
              string indir_match,
              string * words)
The main entrance to the browse for things command.

Returns:
1 on success, 0 on failure
 * do_list
int do_list()
The main entrance to the list stuff command.

Returns:
1 on success, 0 on failure
 * do_request
int do_request(mixed indirect_obs,
               string dir_match,
               string indir_match,
               string * words)
The main entrance to the buy things command.

Returns:
1 on success, 0 on failure
 * remove_service
int remove_service(string service)
This method removes a service.

Parameters:
string - service to be removed
Returns:
1 on successful removal, 0 on failure
 * reset_busy
void reset_busy()
 * set_busy
void set_busy()

Discworld MUD's distribution world wide web pages.
brought to you by
Cut Me Own Throat Dibbler's Sensational Sausages; buy one while they are hot.
File last modified: Wed, 29 Oct 2003 14:37:49 GMT

Lost? Try Discworld's home page.