void do_makerooms( CHAR_DATA *ch, char *argument )
{
    ROOM_INDEX_DATA	*location;
    AREA_DATA           *pArea;
    int			vnum, x;
    int                 room_count;
    int room_hold [MAX_RGRID_ROOMS];

    pArea = ch->pcdata->area;

    if (!pArea)
    {
	send_to_char( "You must have an area assigned to do this.\n\r", ch );
	return;
    }

    if ( !argument || argument[0] == '\0' )
      {
	send_to_char( "Create a block of rooms.\n\r", ch );
	send_to_char( "Usage: makerooms <# of rooms>\n\r", ch );
	return;
      }
    x = atoi(argument);


    ch_printf(ch, "Attempting to create a block of %d rooms.\r\n", x);

    if(x > 300) 
    {
      ch_printf(ch, "The maximum number of rooms this mud can create at once is 300.\r\n");
      return;
    }

    room_count = 0;

    if(pArea->low_r_vnum + x > pArea->hi_r_vnum) 
    {

      send_to_char( "You don't even have that many rooms assigned to you.\r\n", ch);
      return;
    }

    for(vnum = pArea->low_r_vnum; vnum <= pArea->hi_r_vnum; vnum++) 
    {

      if(get_room_index(vnum) == NULL)
	room_count++;

      if(room_count >= x)
	break;
    }

    if(room_count < x) 
    {
      send_to_char( "There aren't enough free rooms in your assigned range!\r\n", ch);
      return;
    }

    send_to_char( "Creating the rooms...\r\n", ch);

    room_count = 0;
    vnum = pArea->low_r_vnum;

    while(room_count < x) 
    {

      if(get_room_index(vnum) == NULL) 
      {

	room_hold[room_count++] = vnum;

	location = make_room( vnum );
	if ( !location ) 
        {
	  bug( "%s: make_room failed", __FUNCTION__ );
	  return;
	}
	location->area = ch->pcdata->area;
      }
      vnum++;
    }

    ch_printf( ch, "%d rooms created.\r\n", room_count);

    return;

}