[idea]Floating Zone

From: Angus Mezick (angus@EDGIL.CCMAIL.COMPUSERVE.COM)
Date: 02/18/98


     DOH! i completely forgot the train snippet/patch that is out there. it
     makes a room look like a train by moving the exits of the train room
     around.... silly me.  Take a peek at that.
     as to your example, i would move the if(time_info==23) to the
     beginning of the function, or better yet, have weather.c call this in
     another_hour() at the case 23: statement.


     world[second_room].dir_option[SOUTH] : -1;
     is this : supposed to be an '=' sign?

     --Angus


______________________________ Forward Header __________________________________
Subject:  [idea]Floating Zone
Author:  INTERNET:abram@deltanet.com at CSERVE
Date:    2/17/98 4:25 PM

/* 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