storage

obj
OBJECT
	/obj/guild/storage.c

LAST UPDATE
	Thragor@Nightfall, March, 8th 1996

SYNOPSIS
	inherit "/obj/guild/storage";

	create()
	{
	   ...
	   SetGuild(<guildstr>);
	   SetLevel(<level>);
	   ...
	}

DESCRIPTION
	The meaning of storage rooms is, that players of a guild may
	drop their items there until they login next time. Others may
	use these items until the player who dropped those items
	returns.
	A list of what has been dropped or taken away from the storage
	room will be kept until next reboot. The list may be queried
	by any player who can enter the storage room with the command
	'list'.

	Functions to configure the storage room:

	  string SetGuild(string guild_id)
	    Only players where pl->QueryGuild() results in guild_id
	    will be allowed to enter the storage room.

	  string SetLevel(int lvl)
	    Only players from a certain level on might enter the
	    storage room. This way you can have a HLP and an LLP
	    storage room setting the value to 20 or 0.

	Functions used to handle the list of objects:

	  void AddObject(object ob,object pl)
	    Increase the amount of this object, which means that the
	    player dropped this item inside here.
	    The object has to be an armour or weapon and of a certain
	    value.

	  void RemoveObject(object ob,object pl)
	    Decrease the amount of this object, which means that the
	    player got this item inside here.
	    The object has to be an armour or weapon and of a certain
	    value.

	  string GetList()
	    Returns a table of items.

	  void notify_leave(mixed to, int method, mixed extra)
	    Calls RemoveObject() under certain circumstanzes.

	  void notify_enter(mixed from, int method, mixed extra)
	    Calls AddObject() under certain circumstanzes.

	  int cmd_list()
	    Smores the list of items to the player.

	Further functions:

	  int allow_enter(int method,mixed extra)
	    Checks if the player is of the right guild and if the
	    player is high enough in level.

	  void create()
	    Adds the command 'list' which calls cmd_list().

INHERITANCE TREE
	/obj/guild/storage
	  `- std/room

SEE ALSO