Long Message follows

From: Jeffrey Daro (jdaro@netcom.com)
Date: 10/24/94


	Howdy, all!  I am working on a thin_ice special procedure, that 
will drop the players in a room to another room as if they have fallen 
through thin ice.  I used a case statement, so that the actions are not 
always the same, kind like a fido, saying different things in different 
order.  Anyway, I compiled the code, and it compiled fine, I ran the mud 
and it shows the room has a special proc (in room stat) but the code 
never activates.  I am sending along a copy of the code.  Could anyone 
help me out?  I know the declarations for the if loop and *victim are 
missing, i added them in after I sent this, sorta. That is not the 
problem anyway.


SPECIAL(thin_ice)
{
 
   if (cmd)
      return(0);

   switch (number(0, 60)) {
   case 0:
      send_to_room("A blistering wind blows from the north.\n\r", 
ch->in_room);      
      return(1);
   case 1:
      send_to_room("The ice crackles under your weight.\n\r", 
ch->in_room);      
      return(1);
   case 2:
      send_to_room("You shiver as you watch the ice crack just up 
ahead.\n\r", ch->in_room);      
      return(1);
   case 3:
      send_to_room("The ice below your feet breaks open, dropping you 
into 
                    the icy water.\n\r", ch->in_room); 
      for (i = descriptor_list; i; i = i->next)
	 if (!i->connected && i->character && i->character != ch) {
	    victim = i->character;
	    act("$n falls through the ice, to the water below.", FALSE, 
victim, 0, 0, TO_ROOM);
	    char_from_room(victim);
	    char_to_room(victim, 1204);
	    act("$n through the ice, from above.", FALSE, victim, 0, 0, TO_ROOM);
	    act("You plunge into the icy waters from above.", FALSE, ch, 
0, victim, TO_VICT);
	    do_look(victim, "", 0, 0);
	 }
     
      return(1);
   default:
      return(0);
   }
}

 
-------------------------------------------------------------------------------
|  Jeff - Daro@Saturn.Rowan.Edu    |                                          | 
|         JDaro@Netcom.Com         | If today is the first day of the rest of | 
|----------------------------------| my life, what was yesterday?             | 
|  T A Z M A N I A                 |                                          | 
|  Ukko.Rowan.Edu 5000             |                                          |
-------------------------------------------------------------------------------



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