****************************** OBJECT INFO ********************************

General info:
	Objects are stored in one big linked list starting at obj_first and
ending at obj_last. The are no bucket lists for rooms since I feel this is too
complex and only gives a performance advantage on very big muds. There are
2 types of objects - ITEMS & NPCS. What type an object is affects what it can
do eg items can't move, npcs can't be picked up by a user. The rest you'll have
to work out for yourself.
     The object structure contains object data and crucially the object 
function. This allows object oriented programming in normal C whereby you call
the function in a structure passing the function the address of the structure
it is stored in. If you didn't understand that don't worry - unless you intend
to hack main.c you don't need to.
	The whole of the object structure does not have to be set by the object
functions. The function initialise_object() in main.c sets the elements to
default values befor the object functions set up code is called so the object
only has to set whats important to it.

NB: NPC stands for Non Player Character.


Switch() values for object functions:

  0 - Set up object structure eg name, strength etc. Called from construct().

  1 - Display examine text. Called from examine().

  2 - Intercept or execute command by user befor the  command function to be 
      called from exec_com() gets it. This gives the object a chance to do 
      various things eg prevent a user leaving a room or the object can have
      its own built in commands. Called from exec_com().

  3 - Do object events eg actions, speech etc. Called from object_events().

  4 - Print action descriptions for when user looks at an object as opposed
      to examining it. eg when "A scruffy dog who is sitting down" is shown on 
      looking in a room , the "who is sitting down" part is done here.
      Called from exits_contents(), inven(), examine() & user_examine().

  5 - Called when object (npc) dies. Called from zap(),purge(),
      user_hits_npc() & npc_hits_npc().


Structure elements in obj_data (structures defined in globals.h):

-- Items & Npcs --
func - objects function pointer
pre , name  - parts of objects name
type - ITEM or NPC
time_created - time object was created
room - room number its in
ws - for items is weapon skill user must have to wield it if item is weapon
		for npcs its their weapon skill. 0 - 100
arm - for items is ammount to add to users armour var. if worn
		for npcs is their armour status. Npcs don't have multiple armour types
		unlike users because they can be programmed to do anything. ie they
		can break the rules.
dam - for weapons is damage they can do , for npcs is total damage
		of their wielded weapon.
stam - obvious for npcs, for items - how long they last if hit. 0 - 100
money - amount of money object has
light - is object emitting light?
clone - can object be cloned by wizard clone command? - if object func 
		contains static vars we don't want to clone it and have the clone
		fuck up the values.
destroy - can object be destroyed by zap or purge commands?
start_room - where the object started & where to regenerate them 
will_regen - if 0 object won't be put on regenerate list when it is killed.
regen_delay - how long befor object is regenerated when on regen list. Default
		value is 10 seconds.
contents[] - list of objects inside items or carried by npcs. Size 
		determined by macro OBJ_MAX_CARRY.
gen[] - array for general use. Size determined by macro GEN_SIZE.

-- Items only --
arm_type - 0=head armour , 1=hand , 2=body , 3=legs , 4=shield
can_wear - whether item can be worn or not. Item is only armour if arm is set.
worn_wield - whether object is being worn/wielded
weight - objects weight
val - objects sale value
take - whether object can be picked up
contain - 1 if an item can contain something
closed - 1 if item is closed
size - size of item
weight - weight of item
size_limit - max size of object that can be put in item
weight_limit - max weight object can become when it contains other objects.
user_with - user item is in when WITH_USER
obj_with - object item is in when WITH_OBJ

-- Npc's only --
in_phrase/out - message produced when npc enters/leaves room
stam_gain - amount of stamina npc regains per heartbeat when stam < 100
stren - strength
dodge - speed npc can dodge a hit
eps - experience points user gains on killing npc
attack - if 0 the npc can't be attacked eg if its a ghost
accept_items - will npc accept items given to it by a user?
accept_money - will npc accept money given to it by a user?
user_who_gave - user who just gave it something. Reset each event cycle.
object_given - Object just given by user. Saves npc having to look through
	inventory.
user_oppnt - current user npc is attacking
npc_oppnt - current npc npc is attacking
evil - evil level (1-100). 1 is angelic, 100 is evil.
bar[] - rooms npc can't go into so can keep npc in a region.
		Size determined by macro MAX_BARRIER.
patrol_pos - current position in patrol array. Not a variable you need to touch
pat[] - stores list of rooms to patrol. Used by patrol() function. Size
		determined by MAX_PATROL.
******************************************************************************/

