From the NannyMUD documentation

LAST CHANGE

2004-12-21

NAME

        shop - A shop system.

INHERITS

        /std/room
        /obj/support

FUNCTIONS

SETUP FUNCTIONS

        set_store

OTHER FUNCTIONS

        sell_filter
	value_filter

PROPERTIES

INTERNAL PROPERTIES


PROPERTY NAME

        shop_allows_sell - 

DESCRIPTION

	This property must be set in order to make the shop allow
	players to sell stuff in the shop. It is also the thing that
	makes the shop need approval.

DESCRIPTION

	This is a generic shop system, which will allow wizards to
	create shops just like the one provided in /room/shop. The
	system has three parts:

	1/ /std/special/shop.c
	2/ /std/special/store.c
	3/ /obj/daemon/shopd.c

	You need to be concerned with the two first only. The shop is
	the place which the players see, and provides the commands
	'buy', 'sell', 'value' and 'list'. The store is where all
	items are stored; it should not be generally available to the
	players.

NOTE

	+ Remeber to have ::reset(arg) in your reset!
	+ Shops buying items need approval.

EXAMPLE

	The following files can be looked at as an example:
	/examples/shop/shop.c
	/examples/shop/store.c
	/room/shop.c
	/room/store.c

FUNCTION


NAME

        set_store - Where is the store for this shop?

SYNTAX

        void set_store(string store_file_name)

DESCRIPTION

        This sets what store this shop will use. It is recommended
	that all shops have their own store. Having a common store
	could be used to 'teleport' items across the MUD, and needs
	approval.

FUNCTION


NAME

        query_store - Get the store.

SYNTAX

        mixed query_store(int load)

DESCRIPTION

        This function returns the store of the shop. With no argument,
	it returns the path to the store. With an argument, it tries
	to load the object and return it.

FUNCTION


NAME

        sell_filter - Filter the items to sell.

SYNTAX

        object *sell_filter(object *items)

DESCRIPTION

        If this function exists in the shop object, it will be called
	with a list of objects that the player is trying to sell. You
	can filter this list to determine what items in this list will
	actually be considered to sell.

	Return an array from here with the objects that are allowed to
	sell.

FUNCTION


NAME

        value_filter - Filter the items to sell.

SYNTAX

        object *value_filter(object *items)

DESCRIPTION

        If this function exists in the shop object, it will be called
	with a list of objects that the player is trying to value. You
	can filter this list to determine what items in this list will
	actually be valued.

	Return an array from here with the objects that are allowed to
	be valued.