Autoexit (New Exits Format) [by Nashak]
Snippet Posted Wednesday, August 12th @ 11:24:20 PM, by George Greer in the Commands dept.
Added Dec 3, 1996. Click the link below to read it or download it.

From: Brian Williams <bmw@efn.org>
Subject: New Exit Format

const char *capdirs[] = {
  "North",
  "East",
  "South",
  "West",
  "Up",
  "Down",
  "\n"
};

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&00-&06%s# ", buf, capdirs[door]);
        else
          sprintf(buf, "%s&00-&06%s ", buf, capdirs[door]);

  sprintf(buf2, "&12Obvious Exits: %s&00\r\n", ((*buf) ? buf : "&06None&00."));
  send_to_char(buf2, ch);
  }


<< Autoexit Code (Another) [by Eric Kilfoil] | Reply | View as text | Threaded | Autoloot and Autosplit Code [by Ron Hensley] >>

 


Related Links
  download
Related Articles
More by greerga
 
 

CircleMUD Snippets
 
Note: Not all of these snippets will work perfectly with your version of code, so be prepared to fix one or two bugs that may arise, and please let me know what you needed to do to fix it. Sending a corrected version is always welcome.
Finally, if you wish to use any of the snippets from this page, you are more than welcome, just mention the authors in your credits. If you wish to release any of these snippets to the public on another site, contact me FIRST.