*** ../../Merc21/src/merc.h	Sun Aug  1 19:11:48 1993
--- merc.h	Mon Sep 28 20:52:26 1998
*************** struct	kill_data
*** 368,373 ****
--- 368,374 ----
  #define ACT_PET			    256		/* Auto set for pets	*/
  #define ACT_TRAIN		    512		/* Can train PC's	*/
  #define ACT_PRACTICE		   1024		/* Can practice PC's	*/
+ #define ACT_TINY		   2048		/* Can be picked up	*/
  
  
  
*************** struct	kill_data
*** 461,466 ****
--- 462,470 ----
  #define ITEM_CORPSE_PC		     24
  #define ITEM_FOUNTAIN		     25
  #define ITEM_PILL		     26
+ #define ITEM_TOOL		     27
+ #define ITEM_RESOURCE		     28
+ #define ITEM_CREATURE		     29
  
  
  
*************** struct	mob_index_data
*** 770,775 ****
--- 774,781 ----
   */
  struct	char_data
  {
+     CHAR_DATA *		next_wilderness;
+     CHAR_DATA *		prev_wilderness;
      CHAR_DATA *		next;
      CHAR_DATA *		next_in_room;
      CHAR_DATA *		master;
*************** struct	char_data
*** 820,825 ****
--- 826,839 ----
      sh_int		armor;
      sh_int		wimpy;
      sh_int		deaf;
+     sh_int		x;
+     sh_int		y;
+     sh_int		home_x;
+     sh_int		home_y;
+     sh_int		room;
+     sh_int		state;
+     sh_int		action;
+     sh_int		quality;
  };
  
  
*************** struct	area_data
*** 982,987 ****
--- 996,1004 ----
      RESET_DATA *	reset_last;
      char *		name;
      sh_int		age;
+     sh_int		x;
+     sh_int		y;
+     sh_int		start;
      sh_int		nplayer;
  };
  
*************** struct	room_index_data
*** 1004,1013 ****
      sh_int		room_flags;
      sh_int		light;
      sh_int		sector_type;
  };
  
  
- 
  /*
   * Types of attacks.
   * Must be non-overlapping with spell/skill types,
--- 1021,1035 ----
      sh_int		room_flags;
      sh_int		light;
      sh_int		sector_type;
+     sh_int		wood;
+     sh_int		build;
+     sh_int		ground;
+     sh_int		x;
+     sh_int		y;
+     sh_int		room;
  };
  
  
  /*
   * Types of attacks.
   * Must be non-overlapping with spell/skill types,
*************** DECLARE_DO_FUN(	do_bamfout	);
*** 1236,1245 ****
--- 1258,1269 ----
  DECLARE_DO_FUN(	do_ban		);
  DECLARE_DO_FUN(	do_brandish	);
  DECLARE_DO_FUN(	do_bug		);
+ DECLARE_DO_FUN(	do_build	);
  DECLARE_DO_FUN(	do_buy		);
  DECLARE_DO_FUN(	do_cast		);
  DECLARE_DO_FUN(	do_channels	);
  DECLARE_DO_FUN(	do_chat		);
+ DECLARE_DO_FUN(	do_chop		);
  DECLARE_DO_FUN(	do_close	);
  DECLARE_DO_FUN(	do_commands	);
  DECLARE_DO_FUN(	do_compare	);
*************** DECLARE_DO_FUN(	do_consider	);
*** 1248,1253 ****
--- 1272,1278 ----
  DECLARE_DO_FUN(	do_credits	);
  DECLARE_DO_FUN(	do_deny		);
  DECLARE_DO_FUN(	do_description	);
+ DECLARE_DO_FUN(	do_dig		);
  DECLARE_DO_FUN(	do_disarm	);
  DECLARE_DO_FUN(	do_disconnect	);
  DECLARE_DO_FUN(	do_down		);
*************** DECLARE_DO_FUN(	do_eat		);
*** 1258,1266 ****
--- 1283,1293 ----
  DECLARE_DO_FUN(	do_echo		);
  DECLARE_DO_FUN(	do_emote	);
  DECLARE_DO_FUN(	do_equipment	);
+ DECLARE_DO_FUN(	do_evolve	);
  DECLARE_DO_FUN(	do_examine	);
  DECLARE_DO_FUN(	do_exits	);
  DECLARE_DO_FUN(	do_fill		);
+ DECLARE_DO_FUN(	do_fish		);
  DECLARE_DO_FUN(	do_flee		);
  DECLARE_DO_FUN(	do_follow	);
  DECLARE_DO_FUN(	do_force	);
*************** DECLARE_DO_FUN(	do_group	);
*** 1272,1278 ****
--- 1299,1307 ----
  DECLARE_DO_FUN(	do_gtell	);
  DECLARE_DO_FUN(	do_help		);
  DECLARE_DO_FUN(	do_hide		);
+ DECLARE_DO_FUN(	do_hoe		);
  DECLARE_DO_FUN(	do_holylight	);
+ DECLARE_DO_FUN(	do_home		);
  DECLARE_DO_FUN(	do_idea		);
  DECLARE_DO_FUN(	do_immtalk	);
  DECLARE_DO_FUN(	do_inventory	);
*************** DECLARE_DO_FUN(	do_invis	);
*** 1280,1290 ****
--- 1309,1322 ----
  DECLARE_DO_FUN(	do_kick		);
  DECLARE_DO_FUN(	do_kill		);
  DECLARE_DO_FUN(	do_list		);
+ DECLARE_DO_FUN(	do_landscape	);
+ DECLARE_DO_FUN(	do_lay		);
  DECLARE_DO_FUN(	do_lock		);
  DECLARE_DO_FUN(	do_log		);
  DECLARE_DO_FUN(	do_look		);
  DECLARE_DO_FUN(	do_memory	);
  DECLARE_DO_FUN(	do_mfind	);
+ DECLARE_DO_FUN(	do_mine		);
  DECLARE_DO_FUN(	do_mload	);
  DECLARE_DO_FUN(	do_mset		);
  DECLARE_DO_FUN(	do_mstat	);
*************** DECLARE_DO_FUN(	do_peace	);
*** 1308,1313 ****
--- 1340,1346 ----
  DECLARE_DO_FUN(	do_pick		);
  DECLARE_DO_FUN(	do_pose		);
  DECLARE_DO_FUN(	do_practice	);
+ DECLARE_DO_FUN(	do_prospect	);
  DECLARE_DO_FUN(	do_purge	);
  DECLARE_DO_FUN(	do_put		);
  DECLARE_DO_FUN(	do_quaff	);
*************** DECLARE_DO_FUN(	do_rset		);
*** 1331,1338 ****
--- 1364,1374 ----
  DECLARE_DO_FUN(	do_rstat	);
  DECLARE_DO_FUN(	do_sacrifice	);
  DECLARE_DO_FUN(	do_save		);
+ DECLARE_DO_FUN(	do_saw		);
  DECLARE_DO_FUN(	do_say		);
  DECLARE_DO_FUN(	do_score	);
+ DECLARE_DO_FUN(	do_scythe	);
+ DECLARE_DO_FUN(	do_seed		);
  DECLARE_DO_FUN(	do_sell		);
  DECLARE_DO_FUN(	do_shout	);
  DECLARE_DO_FUN(	do_shutdow	);
*************** DECLARE_DO_FUN(	do_time		);
*** 1356,1361 ****
--- 1392,1398 ----
  DECLARE_DO_FUN(	do_title	);
  DECLARE_DO_FUN(	do_train	);
  DECLARE_DO_FUN(	do_transfer	);
+ DECLARE_DO_FUN(	do_trim		);
  DECLARE_DO_FUN(	do_trust	);
  DECLARE_DO_FUN(	do_typo		);
  DECLARE_DO_FUN(	do_unlock	);
*************** DECLARE_DO_FUN(	do_who		);
*** 1372,1377 ****
--- 1409,1415 ----
  DECLARE_DO_FUN(	do_wimpy	);
  DECLARE_DO_FUN(	do_wizhelp	);
  DECLARE_DO_FUN(	do_wizlock	);
+ DECLARE_DO_FUN(	do_wsave	);
  DECLARE_DO_FUN(	do_yell		);
  DECLARE_DO_FUN(	do_zap		);
  
*** ../../Merc21/src/act_info.c	Sun Aug  1 22:16:28 1993
--- act_info.c	Sat Sep 19 18:15:24 1998
***************
*** 26,31 ****
--- 26,32 ----
  #include <string.h>
  #include <time.h>
  #include "merc.h"
+ #include "wild.h"
  
  
  
*************** void do_look( CHAR_DATA *ch, char *argum
*** 397,402 ****
--- 398,404 ----
      EXIT_DATA *pexit;
      CHAR_DATA *victim;
      OBJ_DATA *obj;
+     ROOM_INDEX_DATA *pRoomIndex;
      char *pdesc;
      int door;
  
*************** void do_look( CHAR_DATA *ch, char *argum
*** 433,447 ****
      if ( arg1[0] == '\0' || !str_cmp( arg1, "auto" ) )
      {
  	/* 'look' or 'look auto' */
! 	send_to_char( ch->in_room->name, ch );
! 	send_to_char( "\n\r", ch );
  
! 	if ( !IS_NPC(ch) && IS_SET(ch->act, PLR_AUTOEXIT) )
! 	    do_exits( ch, "auto" );
  
! 	if ( arg1[0] == '\0'
! 	|| ( !IS_NPC(ch) && !IS_SET(ch->act, PLR_BRIEF) ) )
! 	    send_to_char( ch->in_room->description, ch );
  
  	show_list_to_char( ch->in_room->contents, ch, FALSE, FALSE );
  	show_char_to_char( ch->in_room->people,   ch );
--- 435,456 ----
      if ( arg1[0] == '\0' || !str_cmp( arg1, "auto" ) )
      {
  	/* 'look' or 'look auto' */
! 	if ( IN_WILDERNESS(ch->in_room->vnum) )
! 	{
! 	    draw_map( ch );
! 	}
! 	else
! 	{
! 	    send_to_char( ch->in_room->name, ch );
! 	    send_to_char( "\n\r", ch );
  
! 	    if ( !IS_NPC(ch) && IS_SET(ch->act, PLR_AUTOEXIT) )
! 		do_exits( ch, "auto" );
  
! 	    if ( arg1[0] == '\0'
! 	    || ( !IS_NPC(ch) && !IS_SET(ch->act, PLR_BRIEF) ) )
! 		send_to_char( ch->in_room->description, ch );
! 	}
  
  	show_list_to_char( ch->in_room->contents, ch, FALSE, FALSE );
  	show_char_to_char( ch->in_room->people,   ch );
*************** void do_look( CHAR_DATA *ch, char *argum
*** 587,593 ****
  	return;
      }
  
!     if ( pexit->description != NULL && pexit->description[0] != '\0' )
  	send_to_char( pexit->description, ch );
      else
  	send_to_char( "Nothing special there.\n\r", ch );
--- 596,608 ----
  	return;
      }
  
!     if ( ( pRoomIndex = pexit->to_room ) != NULL &&
! 	IN_WILDERNESS( pRoomIndex->vnum ) )
!     {
! 	send_to_char("You see the wilderness.\n\r",ch);
! 	return;
!     }
!     else if ( pexit->description != NULL && pexit->description[0] != '\0' )
  	send_to_char( pexit->description, ch );
      else
  	send_to_char( "Nothing special there.\n\r", ch );
*** ../../Merc21/src/act_move.c	Wed Jul 28 03:13:32 1993
--- act_move.c	Sat Sep 19 18:27:13 1998
***************
*** 24,29 ****
--- 24,30 ----
  #include <string.h>
  #include <time.h>
  #include "merc.h"
+ #include "wild.h"
  
  
  
*************** void move_char( CHAR_DATA *ch, int door 
*** 59,64 ****
--- 60,68 ----
      ROOM_INDEX_DATA *in_room;
      ROOM_INDEX_DATA *to_room;
      EXIT_DATA *pexit;
+     int xx = ch->x;
+     int yy = ch->y;
+     int getroom = ch->room;
  
      if ( door < 0 || door > 5 )
      {
*************** void move_char( CHAR_DATA *ch, int door 
*** 74,79 ****
--- 78,223 ----
  	return;
      }
  
+     if ( IN_WILDERNESS(in_room->vnum) )
+     {
+ 	bool move_ch = TRUE;
+ 	switch ( map_data(ch->x,ch->y) )
+ 	{
+ 	    default:
+ 		ch->room = 0;
+ 		getroom = 0;
+ 		break;
+ 	    case WILD_HUT:
+ 	    case WILD_HUT_OWNED:
+ 	    case WILD_HUT_LOCKED:
+ 	    case WILD_CABIN:
+ 	    case WILD_CABIN_OWNED:
+ 	    case WILD_CABIN_LOCKED:
+ 	    case WILD_COTTAGE:
+ 	    case WILD_COTTAGE_OWNED:
+ 	    case WILD_COTTAGE_LOCKED:
+ 	    case WILD_HOUSE:
+ 	    case WILD_HOUSE_OWNED:
+ 	    case WILD_HOUSE_LOCKED:
+ 	    case WILD_MINE_STRUCTURE_EMPTY:
+ 	    case WILD_MINE_STRUCTURE_STONE:
+ 	    case WILD_MINE_STRUCTURE_IRON:
+ 	    case WILD_MINE_STRUCTURE_GOLD:
+ 	    case WILD_MINE_STRUCTURE_OIL:
+ 	    case WILD_MINE_STONE_1:
+ 	    case WILD_MINE_STONE_2:
+ 	    case WILD_MINE_IRON_1:
+ 	    case WILD_MINE_IRON_2:
+ 	    case WILD_MINE_GOLD_1:
+ 	    case WILD_MINE_GOLD_2:
+ 	    case WILD_MINE_OIL_1:
+ 	    case WILD_MINE_OIL_2:
+ 	    case WILD_MINE_EMPTY:
+ 		if (ch->room != 0 || door == DIR_NORTH)
+ 		    move_ch = FALSE;
+ 		break;
+ 	}
+ 
+ 	if ( move_ch && (door == DIR_UP || door == DIR_DOWN) )
+ 	{
+ 	    send_to_char( "Alas, you cannot go that way.\n\r", ch );
+ 	    return;
+ 	}
+ 
+ 	if ( move_ch )
+ 	{
+ 	    switch ( door )
+ 	    {
+ 		default:
+ 		    /* Do nothing. */
+ 		    break;
+ 		case DIR_NORTH:
+ 		    if ( ++yy >= WILDERNESS_SIZE )
+ 		    {
+ 			yy = 0;
+ 		    }
+ 		    break;
+ 		case DIR_SOUTH:
+ 		    if ( --yy <  0 )
+ 		    {
+ 			yy = WILDERNESS_SIZE-1;
+ 		    }
+ 		    break;
+ 		case DIR_EAST:
+ 		    if ( ++xx >= WILDERNESS_SIZE )
+ 		    {
+ 			xx = 0;
+ 		    }
+ 		    break;
+ 		case DIR_WEST:
+ 		    if ( --xx < 0 )
+ 		    {
+ 			xx = WILDERNESS_SIZE-1;
+ 		    }
+ 		    break;
+ 	    }
+ 	}
+ 	else
+ 	{
+ 	    if ( ( getroom = next_home(ch, door) ) < 0 )
+ 	    {
+ 		send_to_char( "Alas, you cannot go that way.\n\r", ch );
+ 		return;
+ 	    }
+ 	}
+ 
+ 	if (move_ch)
+ 	{
+ 	    if (map_data(xx,yy) == WILD_HUT_LOCKED     ||
+ 		map_data(xx,yy) == WILD_CABIN_LOCKED   ||
+ 		map_data(xx,yy) == WILD_COTTAGE_LOCKED ||
+ 		map_data(xx,yy) == WILD_HOUSE_LOCKED   )
+ 	    {
+ 		if (ch->home_x != xx || ch->home_y != yy)
+ 		{
+ 		    send_to_char("You cannot enter that locked building.\n\r",
+ 			ch );
+ 		    return;
+ 		}
+ 	    }
+ 	}
+ 
+ 	if ( ( to_room = next_room( xx, yy, getroom ) ) == NULL )
+ 	{
+ 	    to_room = in_room;
+ 	}
+     }
+     else switch (door)
+     {
+ 	default:
+ 	    /* Do nothing. */
+ 	    break;
+ 	case DIR_NORTH:
+ 	    if ( ++yy >= WILDERNESS_SIZE )
+ 	    {
+ 		yy = 0;
+ 	    }
+ 	    break;
+ 	case DIR_SOUTH:
+ 	    if ( --yy < 0 )
+ 	    {
+ 		yy = WILDERNESS_SIZE-1;
+ 	    }
+ 	    break;
+ 	case DIR_EAST:
+ 	    if ( ++xx >= WILDERNESS_SIZE )
+ 	    {
+ 		xx = 0;
+ 	    }
+ 	    break;
+ 	case DIR_WEST:
+ 	    if ( --xx < 0 )
+ 	    {
+ 		xx = WILDERNESS_SIZE-1;
+ 	    }
+ 	    break;
+     }
+ 
      if ( IS_SET(pexit->exit_info, EX_CLOSED)
      &&   !IS_AFFECTED(ch, AFF_PASS_DOOR) )
      {
*************** void move_char( CHAR_DATA *ch, int door 
*** 162,167 ****
--- 306,315 ----
      if ( !IS_AFFECTED(ch, AFF_SNEAK)
      && ( IS_NPC(ch) || !IS_SET(ch->act, PLR_WIZINVIS) ) )
  	act( "$n leaves $T.", ch, NULL, dir_name[door], TO_ROOM );
+ 
+     ch->x = xx;
+     ch->y = yy;
+     ch->room = getroom;
  
      char_from_room( ch );
      char_to_room( ch, to_room );
*** ../../Merc21/src/act_obj.c	Sun Aug  1 00:16:24 1993
--- act_obj.c	Sun Oct 11 23:07:08 1998
*************** void do_get( CHAR_DATA *ch, char *argume
*** 120,127 ****
  	    obj = get_obj_list( ch, arg1, ch->in_room->contents );
  	    if ( obj == NULL )
  	    {
! 		act( "I see no $T here.", ch, NULL, arg1, TO_CHAR );
! 		return;
  	    }
  
  	    get_obj( ch, obj, NULL );
--- 120,150 ----
  	    obj = get_obj_list( ch, arg1, ch->in_room->contents );
  	    if ( obj == NULL )
  	    {
! 		OBJ_INDEX_DATA * obj_index;
! 		CHAR_DATA *      mob;
! 		int              mob_vnum;
! 		if ( ( mob = get_char_room(ch, arg1) ) != NULL )
! 		{
! 		    if (IS_NPC(mob) && IS_SET(mob->act, ACT_TINY))
! 		    {
! 			mob_vnum = mob->pIndexData->vnum;
! 			if ( get_obj_index(mob_vnum) != NULL &&
! 			    (obj_index = get_obj_index(mob_vnum)) != NULL &&
! 			    (obj = create_object(obj_index, 0)) != NULL )
! 			{
! 			    obj->item_type = ITEM_TRASH;
! 			    obj_to_room(obj, mob->in_room);
! 			    obj->item_type = ITEM_CREATURE;
! 			    extract_char(mob, TRUE);
! 			}
! 		    }
! 		}
! 
! 		if ( obj == NULL )
! 		{
! 		    act( "I see no $T here.", ch, NULL, arg1, TO_CHAR );
! 		    return;
! 		}
  	    }
  
  	    get_obj( ch, obj, NULL );
*** ../../Merc21/src/comm.c	Sun Aug  1 19:09:42 1993
--- comm.c	Mon Sep 28 20:13:33 1998
***************
*** 48,53 ****
--- 48,54 ----
  #include <time.h>
  
  #include "merc.h"
+ #include "wild.h"
  
  
  
*************** void nanny( DESCRIPTOR_DATA *d, char *ar
*** 1599,1604 ****
--- 1600,1609 ----
  	    equip_char( ch, obj, WEAR_WIELD );
  
  	    char_to_room( ch, get_room_index( ROOM_VNUM_SCHOOL ) );
+ 	}
+ 	else if ( ch->x >= 0 && ch->y >= 0 )
+ 	{
+ 	    char_to_room( ch, get_room_index( WILDERNESS_LOW_VNUM ) );
  	}
  	else if ( ch->in_room != NULL )
  	{
*** ../../Merc21/src/db.c	Wed Jul 28 03:12:36 1993
--- db.c	Sat Sep 19 19:30:46 1998
***************
*** 26,31 ****
--- 26,32 ----
  #include <string.h>
  #include <time.h>
  #include "merc.h"
+ #include "wild.h"
  
  #if !defined(macintosh)
  extern	int	_filbuf		args( (FILE *) );
*************** AREA_DATA *		area_last;
*** 99,105 ****
  
  char *			string_space;
  char *			top_string;
! char			str_empty	[1];
  
  int			top_affect;
  int			top_area;
--- 100,106 ----
  
  char *			string_space;
  char *			top_string;
! char			str_empty	[1] = {'\0'};
  
  int			top_affect;
  int			top_area;
*************** void boot_db( void )
*** 239,244 ****
--- 240,248 ----
  	}
      }
  
+     /* Read in all of the wilderness files. */
+     world_read();
+ 
      /*
       * Read in all the area files.
       */
*************** void load_area( FILE *fp )
*** 336,341 ****
--- 340,348 ----
      pArea->name		= fread_string( fp );
      pArea->age		= 15;
      pArea->nplayer	= 0;
+     pArea->x		= -1;
+     pArea->y		= -1;
+     pArea->start	= 0;
  
      if ( area_first == NULL )
  	area_first = pArea;
*************** void load_rooms( FILE *fp )
*** 737,742 ****
--- 744,750 ----
  	char letter;
  	int door;
  	int iHash;
+ 	static int prev_top_area = -1;
  
  	letter				= fread_letter( fp );
  	if ( letter != '#' )
*************** void load_rooms( FILE *fp )
*** 749,754 ****
--- 757,768 ----
  	if ( vnum == 0 )
  	    break;
  
+ 	if ( prev_top_area != top_area )
+ 	{
+ 	    prev_top_area = top_area;
+ 	    area_last->start = vnum;
+ 	}
+ 
  	fBootDb = FALSE;
  	if ( get_room_index( vnum ) != NULL )
  	{
*************** void load_rooms( FILE *fp )
*** 769,774 ****
--- 783,796 ----
  	pRoomIndex->room_flags		= fread_number( fp );
  	pRoomIndex->sector_type		= fread_number( fp );
  	pRoomIndex->light		= 0;
+ 
+ 	pRoomIndex->wood		= 0;
+ 	pRoomIndex->build		= 0;
+ 	pRoomIndex->ground		= 0;
+ 	pRoomIndex->x			= -1;
+ 	pRoomIndex->y			= -1;
+ 	pRoomIndex->room		= 0;
+ 
  	for ( door = 0; door <= 5; door++ )
  	    pRoomIndex->exit[door] = NULL;
  
*************** void load_rooms( FILE *fp )
*** 819,824 ****
--- 841,853 ----
  		pRoomIndex->extra_descr	= ed;
  		top_ed++;
  	    }
+ 	    else if ( letter == 'V' )
+ 	    {
+ 		pRoomIndex->x		= fread_number( fp );
+ 		pRoomIndex->y		= fread_number( fp );
+ 		area_last->x		= pRoomIndex->x;
+ 		area_last->y		= pRoomIndex->y;
+ 	    }
  	    else
  	    {
  		bug( "Load_rooms: vnum %d has flag not 'DES'.", vnum );
*************** void load_rooms( FILE *fp )
*** 829,834 ****
--- 858,864 ----
  	iHash			= vnum % MKH;
  	pRoomIndex->next	= room_index_hash[iHash];
  	room_index_hash[iHash]	= pRoomIndex;
+ 	put_area_vnum( vnum );
  	top_room++;
      }
  
*************** OBJ_DATA *create_object( OBJ_INDEX_DATA 
*** 1460,1465 ****
--- 1490,1498 ----
      case ITEM_CORPSE_NPC:
      case ITEM_CORPSE_PC:
      case ITEM_FOUNTAIN:
+     case ITEM_TOOL:
+     case ITEM_RESOURCE:
+     case ITEM_CREATURE:
  	break;
  
      case ITEM_SCROLL:
*************** void clear_char( CHAR_DATA *ch )
*** 1523,1528 ****
--- 1556,1563 ----
      ch->max_mana		= 100;
      ch->move			= 100;
      ch->max_move		= 100;
+     ch->next_wilderness		= NULL;
+     ch->prev_wilderness		= NULL;
      return;
  }
  
*** ../../Merc21/src/handler.c	Sun Jul 25 21:45:30 1993
--- handler.c	Sun Oct 11 22:50:19 1998
***************
*** 25,30 ****
--- 25,31 ----
  #include <string.h>
  #include <time.h>
  #include "merc.h"
+ #include "wild.h"
  
  
  
*************** void char_from_room( CHAR_DATA *ch )
*** 478,483 ****
--- 479,489 ----
  	    bug( "Char_from_room: ch not found.", 0 );
      }
  
+     if ( IN_WILDERNESS( ch->in_room->vnum ) )
+     {
+ 	char_from_wilderness( ch );
+     }
+ 
      ch->in_room      = NULL;
      ch->next_in_room = NULL;
      return;
*************** void char_to_room( CHAR_DATA *ch, ROOM_I
*** 498,503 ****
--- 504,518 ----
  	return;
      }
  
+     if ( IN_WILDERNESS( pRoomIndex->vnum ) )
+     {
+ 	if ( ( pRoomIndex = wilderness_room( ch, pRoomIndex ) ) == NULL )
+         {
+ 	    bug( "Char_to_room: Wilderness bug.", 0 );
+ 	    return;
+ 	}
+     }
+ 
      ch->in_room		= pRoomIndex;
      ch->next_in_room	= pRoomIndex->people;
      pRoomIndex->people	= ch;
*************** void obj_from_room( OBJ_DATA *obj )
*** 774,779 ****
--- 789,816 ----
   */
  void obj_to_room( OBJ_DATA *obj, ROOM_INDEX_DATA *pRoomIndex )
  {
+     if (obj->item_type == ITEM_CREATURE)
+     {
+ 	MOB_INDEX_DATA * mob_index;
+ 	if ( ( mob_index = get_mob_index( obj->pIndexData->vnum ) ) != NULL )
+ 	{
+ 	    CHAR_DATA *ch = create_mobile( mob_index);
+ 	    if ( IN_WILDERNESS( pRoomIndex->vnum ) )
+ 	    {
+ 		ch->x = pRoomIndex->x;
+ 		ch->y = pRoomIndex->y;
+ 		ch->room = pRoomIndex->room;
+ 	    }
+ 	    char_to_room( ch, pRoomIndex );
+ 
+ 	    /*
+ 	     * You can't just extract the object, as it might be used
+ 	     * after this call.
+ 	     */
+ 	    pRoomIndex = get_room_index( ROOM_VNUM_LIMBO );
+ 	    obj->timer = 1;
+ 	}
+     }
      obj->next_content		= pRoomIndex->contents;
      pRoomIndex->contents	= obj;
      obj->in_room		= pRoomIndex;
*************** char *item_type_name( OBJ_DATA *obj )
*** 1454,1459 ****
--- 1491,1499 ----
      case ITEM_CORPSE_PC:	return "pc corpse";
      case ITEM_FOUNTAIN:		return "fountain";
      case ITEM_PILL:		return "pill";
+     case ITEM_TOOL:		return "tool";
+     case ITEM_RESOURCE:		return "resource";
+     case ITEM_CREATURE:		return "creature";
      }
  
      bug( "Item_type_name: unknown type %d.", obj->item_type );
*** ../../Merc21/src/interp.c	Sun Aug  1 18:28:24 1993
--- interp.c	Sat Sep 19 18:33:53 1998
***************
*** 26,31 ****
--- 26,32 ----
  #include <string.h>
  #include <time.h>
  #include "merc.h"
+ #include "wild.h"
  
  
  
*************** const	struct	cmd_type	cmd_table	[] =
*** 179,184 ****
--- 180,186 ----
       */
      { "follow",		do_follow,	POS_RESTING,	 0,  LOG_NORMAL	},
      { "group",		do_group,	POS_SLEEPING,	 0,  LOG_NORMAL	},
+     { "home",		do_home,	POS_FIGHTING,	 5,  LOG_NORMAL },
      { "hide",		do_hide,	POS_RESTING,	 0,  LOG_NORMAL	},
      { "practice",	do_practice,	POS_SLEEPING,	 0,  LOG_NORMAL	},
      { "qui",		do_qui,		POS_DEAD,	 0,  LOG_NORMAL	},
*************** const	struct	cmd_type	cmd_table	[] =
*** 237,245 ****
--- 239,249 ----
      { "bamfin",		do_bamfin,	POS_DEAD,	37,  LOG_NORMAL	},
      { "bamfout",	do_bamfout,	POS_DEAD,	37,  LOG_NORMAL	},
      { "echo",		do_echo,	POS_DEAD,	37,  LOG_ALWAYS	},
+     { "evolve",		do_evolve,	POS_RESTING,	40,  LOG_NORMAL	},
      { "goto",		do_goto,	POS_DEAD,	37,  LOG_NORMAL	},
      { "holylight",	do_holylight,	POS_DEAD,	37,  LOG_NORMAL	},
      { "invis",		do_invis,	POS_DEAD,	37,  LOG_NORMAL	},
+     { "landscape",	do_landscape,	POS_RESTING,	37,  LOG_NORMAL	},
      { "log",		do_log,		POS_DEAD,	37,  LOG_ALWAYS	},
      { "memory",		do_memory,	POS_DEAD,	37,  LOG_NORMAL	},
      { "mfind",		do_mfind,	POS_DEAD,	37,  LOG_NORMAL },
*************** const	struct	cmd_type	cmd_table	[] =
*** 254,262 ****
--- 258,283 ----
      { "slookup",	do_slookup,	POS_DEAD,	37,  LOG_NORMAL },
      { "snoop",		do_snoop,	POS_DEAD,	37,  LOG_NORMAL	},
      { "switch",		do_switch,	POS_DEAD,	37,  LOG_ALWAYS	},
+     { "wsave",		do_wsave,	POS_RESTING,	37,  LOG_NORMAL	},
  
      { "immtalk",	do_immtalk,	POS_DEAD,	36,  LOG_NORMAL	},
      { ":",		do_immtalk,	POS_DEAD,	36,  LOG_NORMAL	},
+ 
+     /*
+      * Wilderness commands.
+      */
+     { "build",		do_build,	POS_STANDING,	 0,  LOG_NORMAL	},
+     { "chop",		do_chop,	POS_STANDING,	 0,  LOG_NORMAL	},
+     { "dig",		do_dig,		POS_STANDING,	 0,  LOG_NORMAL	},
+     { "fish",		do_fish,	POS_RESTING,	 0,  LOG_NORMAL	},
+     { "hoe",		do_hoe,		POS_STANDING,	 0,  LOG_NORMAL	},
+     { "lay",		do_lay,		POS_STANDING,	 0,  LOG_NORMAL	},
+     { "mine",		do_mine,	POS_STANDING,	 0,  LOG_NORMAL	},
+     { "prospect",	do_prospect,	POS_STANDING,	 0,  LOG_NORMAL	},
+     { "saw",		do_saw,		POS_STANDING,	 0,  LOG_NORMAL	},
+     { "scythe",		do_scythe,	POS_STANDING,	 0,  LOG_NORMAL	},
+     { "seed",		do_seed,	POS_STANDING,	 0,  LOG_NORMAL	},
+     { "trim",		do_trim,	POS_RESTING,	 0,  LOG_NORMAL	},
  
      /*
       * End of list.
*** ../../Merc21/src/save.c	Sun Aug  1 21:37:34 1993
--- save.c	Sat Sep 19 18:37:08 1998
*************** void fwrite_char( CHAR_DATA *ch, FILE *f
*** 134,139 ****
--- 134,141 ----
      fprintf( fp, "Armor        %d\n",	ch->armor		);
      fprintf( fp, "Wimpy        %d\n",	ch->wimpy		);
      fprintf( fp, "Deaf         %d\n",	ch->deaf		);
+     fprintf( fp, "LocationXY   %d %d %d\n",	ch->x, ch->y, ch->room );
+     fprintf( fp, "HomeXY       %d %d\n",	ch->home_x, ch->home_y );
  
      if ( IS_NPC(ch) )
      {
*************** void fread_char( CHAR_DATA *ch, FILE *fp
*** 538,543 ****
--- 540,553 ----
  	    break;
  
  	case 'H':
+ 	    if ( !str_cmp( word, "HomeXY" ) )
+ 	    {
+ 		ch->home_x = fread_number( fp );
+ 		ch->home_y = fread_number( fp );
+ 		fMatch = TRUE;
+ 		break;
+ 	    }
+ 
  	    KEY( "Hitroll",	ch->hitroll,		fread_number( fp ) );
  
  	    if ( !str_cmp( word, "HpManaMove" ) )
*************** void fread_char( CHAR_DATA *ch, FILE *fp
*** 555,560 ****
--- 565,580 ----
  
  	case 'L':
  	    KEY( "Level",	ch->level,		fread_number( fp ) );
+ 
+ 	    if ( !str_cmp( word, "LocationXY" ) )
+ 	    {
+ 		ch->x = fread_number( fp );
+ 		ch->y = fread_number( fp );
+ 		ch->room = fread_number( fp );
+ 		fMatch = TRUE;
+ 		break;
+ 	    }
+ 
  	    KEY( "LongDescr",	ch->long_descr,		fread_string( fp ) );
  	    break;
  
*** ../../Merc21/src/special.c	Sat Jul 31 17:40:28 1993
--- special.c	Sat Sep 19 18:37:38 1998
*************** DECLARE_SPEC_FUN(	spec_janitor		);
*** 49,54 ****
--- 49,56 ----
  DECLARE_SPEC_FUN(	spec_mayor		);
  DECLARE_SPEC_FUN(	spec_poison		);
  DECLARE_SPEC_FUN(	spec_thief		);
+ DECLARE_SPEC_FUN(	spec_wildmob		);
+ DECLARE_SPEC_FUN(	spec_lumberjack		);
  
  
  
*************** SPEC_FUN *spec_lookup( const char *name 
*** 76,81 ****
--- 78,85 ----
      if ( !str_cmp( name, "spec_mayor"		  ) ) return spec_mayor;
      if ( !str_cmp( name, "spec_poison"		  ) ) return spec_poison;
      if ( !str_cmp( name, "spec_thief"		  ) ) return spec_thief;
+     if ( !str_cmp( name, "spec_wildmob"	 	  ) ) return spec_wildmob;
+     if ( !str_cmp( name, "spec_lumberjack" 	  ) ) return spec_lumberjack;
      return 0;
  }
  
*** ../../Merc21/src/update.c	Wed Jul 28 06:25:32 1993
--- update.c	Sat Sep 19 19:54:57 1998
***************
*** 24,29 ****
--- 24,30 ----
  #include <string.h>
  #include <time.h>
  #include "merc.h"
+ #include "wild.h"
  
  
  
*************** void update_handler( void )
*** 789,794 ****
--- 790,796 ----
      static  int     pulse_mobile;
      static  int     pulse_violence;
      static  int     pulse_point;
+     static  int     pulse_wilderness;
  
      if ( --pulse_area     <= 0 )
      {
*************** void update_handler( void )
*** 814,819 ****
--- 816,827 ----
  	weather_update	( );
  	char_update	( );
  	obj_update	( );
+     }
+ 
+     if ( --pulse_wilderness     <= 0 )
+     {
+ 	pulse_wilderness = PULSE_WILDERNESS;
+ 	wilderness_update ( );
      }
  
      aggr_update( );
