This file describes the variables defined in the main namespace. Some of them
are static, either hardcoded or just loaded from DB. Other are dynamic and are 
saved to DB in various moments. Some dynamic data structures also contain 
fields which are dynamic but not ever saved. All these data structures are 
accessible from item and NPC code.

For complex structures, part of the initialisation code are copied here, so 
you may see some temp variables used there. Please ignore them.

our %dirLtS = ( EAST		=>	'E',
		...
	);
	Static. A hash used to translate long directions to short.

our %dirStL = ( E	=>	'EAST',
		...
	);
	Static. A hash used to translate short directions to long.

@directions, @longdirections:
	Static. Arrays containing directions in short and long form.

our %userLevels = (
		1	=>	'Novice',
		...
		);
	Static. Hash containing level descriptions.

@roomsLongDescr, @roomsShortDescr: Arrays containing long and short texts of 
rooms. Index is room number, so these arrays may have gaps.

@roomsData: An array, indexed by room number, containing refs to hashes. Each 
hash is structured as following:

		%roomRec = (
			exE 		=>	$exE,
			exW 		=>	$exW,
			exN 		=>	$exN,
			exS 		=>	$exS,
			exU 		=>	$exU,
			exD 		=>	$exD,
			exNE 		=>	$exNE,
			exNW 		=>	$exNW,
			exSE 		=>	$exSE,
			exSW 		=>	$exSW,
			# All possible exits. Value is the room number of 
			# next room, 0 if there is no exit.
			roomNum		=>	$id,
			# The room number.
			presentUids	=>	@tmpPresentUids,
			# An array containing uids of users and npcs present in
			# that room. This is not saved, it is rebuilded from 
			# user and npc data.
			presentUsers	=>	@tmpPresentUsers,
			# As above, but with usernames instead of uids.
			presentItems	=>	$tmpPresentItems_ref,
			# A reference to hash of hashes containing item records present
			# in this room. Not saved, rebuilded from item data.
		);

@usersMainData: An array, indexed by uid, containing references to hashes. uid
is a unique identifier of users and NPCs (unique primary key in db). Each hash 
is a user or NPC record, structured as following (ommiting description of 
obvious fields):

		$usersMainData[$uid] = { 	username 	=> $username,
		# Usernames must be unique for users, but not unique for NPCs.
		# This is NOT enforced in the code or the DB, so must be
		# carefull.
						password 	=> $password,
						desc	 	=> $desc,
						level	 	=> $level,
						coins	 	=> $coins,
		# For NPCs, this is used to hold the amount that a dead NPC 
		# will drop.
						xp	 	=> $xp,
		# For NPCs, this is the XP points a user will gain by killing
		# this NPC.
						room	 	=> $room,
		# If room < 0, character is dead.
						pid	 	=> -1,
		# pid is -1 for not logged in users or -2 for NPCs. It holds
		# the process id of the client for connected users.
						qid	 	=> -1,	
		# qid is the IPC queue id for logged in users. Again, -1 for
		# not logged in, -2 for NPCs.
						timeout	 	=> 0,
		# Inactivity counter. Increased for each tick and decreased by
		# client pings. Will auto-logout the user is > $clientTimeout
						godMode	 	=> $godMode,
		# Some commands may require this to be set to 1.
						email	 	=> $email,
		# Informational, displayed only in STATUS cmd.
						gender	 	=> $gender,
		# Used for @lex_* variables (see Mudaserver.pl).
						paralyzed 	=> $paralyzed,
		# Not used so far.
						invisible 	=> $invisible,
		# Not used so far.
						invincible 	=> $invincible,
		# No fights possible at all when 1. Unable to attack, if 
		# attacked fight will not start. Used by NPCs and Gods.
						blind	 	=> $blind,
		# Not used so far.
						hitPoints 	=> $hitPoints,
						mana	 	=> $mana,
						maxHp 		=> $maxHp,
						maxMana	 	=> $maxMana,
		# Hit points and mana points with their respective limits.
						lastCon	 	=> $lastCon,
						lastDiscon	=> $lastDiscon,
						lastSave	=> $lastSave,
		# Last connection, disconnection and save timestamps.
						inventory	=> $tmpPresentItems_ref,
		# User's inventory. A reference to a hash of hashes. See item data structures.
						npc		=> $npc,		
		# If true, is NPC
						npc_code_ref	=> $npc_code_ref,	
		# NPC main subroutine name.
						npc_loop_ref	=> $npc_loop_ref,	
		# NPC loop subroutine name.
						npc_loop_secs	=> $npc_loop_secs,	
		# Period of NPC loop subroutine calls.
						npc_code	=> $npc_code,		
		# NPC code filename, under home directory.
						protoId		=> $protoId,		
		# NPC prototype ID. The id of the prototype used to create this NPC. 
						revivalTime	=> $revivalTime,	
		# NPC revival time in seconds. NPC will be resurrected after this time.
						quests		=> {},
		# A hash with solved quests ids as keys (values are irrelevant).
						revivalCounter	=> $revivalTime,
	

@deadNpcs: A list of uids of dead NPCs. Not saved.

$userPass_ref: A reference to a hash of hashes used for convenience. It is based on the assumption that 
usernames are unique, so it only works for real users, not NPCs:
		$userPass_ref->{ $username } = {password	=>	$password,
					  	uid		=>	$uid
						};

%itemData: a hash of item ids pointing to item records. These records are attached here, but also attached 
to either room or user data structures (depending on where they are). Records are structured as following:

		$rec = {
	 		id			=>	$id, 
			shortDesc		=>	$shortDesc, 
			longDesc		=>	$longDesc, 
			gen_item_type		=>	$gen_item_type,
		# Points to a record in itemTypes. Used mostly to limit worn and wielded items.
			wearable		=>	$wearable,
			wieldable		=>	$wieldable,
			movable			=>	$movable,
		# if 0, the item cannot be picked up.
			invisible		=>	$invisible,
		# Invisible items are mostly used to add code in a room. An invisible, immovable item is 
		# what can be used to code rooms.
			weight			=>	$weight,
			volume			=>	$volume,
			containVolume		=>	$containVolume,
		# Weight and volume management not yet implemented, but it will be sometime...
			dropable		=>	$dropable,
		# When 0, user cannot drop it.
			created_by		=>	$created_by,
		# Just for reference. Not fully used.
			edible			=>	$edible,
			drinkable		=>	$drinkable,
			key			=>	$key,
		# Will be used for food, drinks and keys.
			missile			=>	$missile,
			missile_type		=>	$missile_type,
			missile_launcher	=>	$missile_launcher,
			missile_type_needed	=>	$missile_type_needed,
		# Four fields used in bows and arrows.
			executable		=>	$executable,
		# Contains file name of item code. If empty, item is considered "dump".
			code_ref		=>	$code_ref,
		# Subroutine name of main object code.
			loop_ref		=>	$loop_ref,
		# Subroutine name of loop object code.
			loop_secs		=>	$loop_secs,
		# Call the above every loop_secs seconds.
			armourClass		=>	$armourClass, 
			weaponClass		=>	$weaponClass, 
			amount			=>	$amount, 
		# Amount is used for special items like coins and arrows.
			roomID			=>	$roomID, 
		# 0 if in a user's inventory.
			userID			=>	$userID, 
		# 0 if laying around.
			itemID			=>	$itemID, 
		# Unique ID.
			worn			=>	$worn, 
			wielded			=>	$wielded, 
			keepOnDeath		=>	$keepOnDeath, 
		# If 1, item will not be dropped in death.
			questCode		=>	$questCode, 
		# A field used to hold arbitrary data to identify quest items.
		};

%itemProto: A hash of hashes similar to itemData, holding prototypes for items. Used by CREATEITEM cmd, but
it also can be used by item and NPC code. Use intCreateItemFromProto and add it in itemData and/or room or
user inventory.

TO BE CONTINUED....
