//Once the DB_NPCSet is turned on this process kicks off
IF
DB_SetNPCs(1)
AND
DB_Character(_NPC,_TeleportedtoRoom,_type,_chosen) //gets a list of characters
AND
DB_CharacterPosition(_NPC,_OldX,_OldY,_OldZ) //Gets each characters original position
AND
CharacterGetPosition(_NPC,_NewX,_NewY,_NewZ) //Gets each character's new location.
AND
_OldX == _NewX //Compares their old location to their new locaion
AND
_OldY == _NewY //If they all match,
AND
_OldZ == _NewZ // It's determined the player is a NPC
THEN
NOT DB_Character(_NPC,_TeleportedtoRoom,_type,_chosen);
DB_Character(_NPC,_TeleportedtoRoom,"NPC",_chosen);
NOT DB_SetNPCs(1);
IF
DB_Character(_Character,_TeleportedtoRoom,"unknown",_chosen) //looks to see if there are any characters in the DB which we don't have a type for
THEN
PROC_Record_Humans();
//************************PROC*****************************************
PROC // Records humans in the character DB.
PROC_Record_Humans()
AND
DB_Character(_character,_TeleportedtoRoom,"unknown",_chosen) //gets a list of characters who we don't have a type for yet.
THEN
NOT DB_Character(_character,_TeleportedtoRoom,"unknown",_chosen);
DB_Character(_character,_TeleportedtoRoom,"human",_chosen);