[idea]Floating Zone

From: Mike Carpenter (abram@DELTANET.COM)
Date: 02/17/98


/* Below I have pounded out a rough idea of what I am trying to accomplish.
*/
/* Im sure this is far from complete or necessarily even on the right */
/* track.  I am trying to create a zone that is floating around the world
*/
/* this zone will connect to a room and then based on the time of day */
/* will disconnect then connect to another room, will you please offer */
/* any suggestions to make this work, or set me on the right track */

void floating_zone(struct room_data *world, struct time_info_data
time_info)
{
 int num;
 int first_room = 3000; /* one of the random rooms */
 int second_room = 4000; /* another of the rooms */
 int third_room = 5000; /* another room */
 int entrance = 7000; /* Entrance room to floating zone */

 entrance = real_room(entrance);
 first_room = real_room(first_room);
 second_room = real_room(second_room);
 third_room = real_room(third_room);


 num = number(1,3);

 switch(num)
 {
   case 1:
  if(time_info.hours == 23){
  /* Close second and third room exits south */
  world[second_room].dir_option[SOUTH] : -1;
  world[third_room].dir_option[SOUTH] : -1;
  /* connect entrance and first room */
  world[entrance].dir_option[NORTH]: first_room;
  world[first_room].dir_option[SOUTH]: entrance;
  }
  break;
   case 2:
  if(time_info.hours == 23){
  /* Close first and third room exits south */
  world[first_room].dir_option[SOUTH] : -1;
  world[third_room].dir_option[SOUTH] : -1;
  /* connect entrance and first room */
  world[entrance].dir_option[NORTH]: second_room;
  world[second_room].dir_option[SOUTH]: entrance;
  }
  break;
   case 3:
  if(time_info.hours == 23){
  /* Close first and second room exits south */
  world[first_room].dir_option[SOUTH] : -1;
  world[second_room].dir_option[SOUTH] : -1;
  /* connect entrance and first room */
  world[entrance].dir_option[NORTH]: third_room;
  world[third_room].dir_option[SOUTH]: entrance;
  }
  break;
   default:
  send_to_char("You should not see this\r\n", ch);
  break;
 }
}

/* Thanks for any help */
/* Abram */


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST