On Thu, 6 Aug 1998, Mort wrote:
->To: CIRCLE@post.queensu.ca
->Subject: [Code] To Dark to see??
->
->
Try this one dude!
->void do_auto_exits(struct char_data * ch)
->{
-> int door;
-> char tmpBuf[10];
-> for (door = 0; door < NUM_OF_DIRS; door++) {
-> if (EXIT(ch, door) && EXIT(ch, door)->to_room != NOWHERE &&
-> !IS_SET(EXIT(ch, door)->exit_info, EX_CLOSED)) {
for (dark = 0; dark < NUM_OF_DIRS; dark++) {
if (IS_DARK( EXIT(ch, door)->to_room) )
strcpy(tmpBuf, "Too dark to tell.");
else {
-> switch(door) {
-> case 0: strcpy(tmpBuf, "north"); break;
-> case 1: strcpy(tmpBuf, "east"); break;
-> case 2: strcpy(tmpBuf, "south"); break;
-> case 3: strcpy(tmpBuf, "west"); break;
-> case 4: strcpy(tmpBuf, "up"); break;
-> case 5: strcpy(tmpBuf, "down"); break;
-> }
}
-> /* End added section, change line below as well though*/
-> sprintf(buf, "%10s: %s\r\n",
tmpBuf, world[EXIT(ch,door)->to_room].name);
-> send_to_char(buf, ch);
}
-> }
}
->}
->
->Note. The ^Y etc bits are for out colouring instead of using ANSI codes.
NOTE: I took out the ---^ because i did the code before i read that
line.
B I O - H A Z A R D I N D U S T R I E S (c) 1994 -DarkLord
+------------------------------------------------------------+
| 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