Re: New Autoexits

From: Chris Jacobson (fear@ATHENET.NET)
Date: 04/27/98


On 4/27/98 2:51 PM, Quinn ShadowStalker (quinn@MUD.COMSYS.NET) stated:

>void do_auto_exits(struct char_data * ch)
>{
>  int door;
>
>  *buf = '\0';
>
>  for (door = 0; door < NUM_OF_DIRS; door++)
>    if (EXIT(ch, door) && EXIT(ch, door)->to_room != NOWHERE) {
>      if(IS_SET(EXIT(ch, door)->exit_info, EX_CLOSED))
>      sprintf(buf, "%s#%s ", buf, dirs[door]);
>      else
>      sprintf(buf, "%s%s ", buf, dirs[door]);
>    }
>  sprintf(buf2, "%s[ Exits: %s]%s\r\n", CCCYN(ch, C_NRM),
>          *buf ? buf : "None! ", CCNRM(ch, C_NRM));
>
>  send_to_char(buf2, ch);
>}

Another variation on this (one I found somewhat simpler to use as a
player), is to use Capital letters for open exits and closed letters for
closed exits:

      if(IS_SET(EXIT(ch, door)->exit_info, EX_CLOSED))
        sprintf(buf + strlen(buf), "%c", EXIT_FLAGGED(EXIT(ch, door),
            EX_CLOSED) ? LOWER(*dirs[door]) : UPPER(*dirs[door]));

Just a personal preference, and an option for implementation :-)

- Chris Jacobson


     +------------------------------------------------------------+
     | 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