Re: Trying to access room connected to room

From: Ryan (ed209@maxwell.iia2.org)
Date: 04/04/95


On Tue, 4 Apr 1995, Scott Francis wrote:

> Hey I'm sure this is kinda trivial, but I have a question.  I'm trying to 
> make a multiroom scan command and am having trouble accessing rooms past 
> those that are immediately connecting to the character.  
>  
> I am trying to do something similar to
> EXIT(ch,(EXIT(ch,door))->to_room)->to_room) to get there..but it doesn't seem
> to work....any suggestions would be greatly appreciated.....
> 

Hmm.. I just woke up, ut lemme give this a shot :)

ok, well ch->in_room is the current room, now if I'm not mistaken you are 
trying to access the room 2 rooms east of this? ie o-o-o <- this room?

sh_int cur_room, count;

for (cur_room = ch->in_room, count = 0; cur_room && count < 2; 
     cur_room = EXIT(ch, door)->to_room, count++) {
  sprintf(buf, "%d", cur_room);  /* just for testing */
  log(buf);                      /* purposes :)      */
}

Not sure if this will work, like I said, I'm still wiping the crust out 
of my eyes (euk).

Ryan



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