Welcome to the Builder Academy

Solved [Done] Snippet Request for TBA 3.64: Showing Room Names.

More
14 May 2014 16:48 - 15 May 2014 06:41 #4897 by Calipso
I have seen this in a few muds based on circle mud and I've always thought it was a nice little feature. Basically I would like to make it so that the room names and exits are shown and not just the exits.

For Example:
North - Tower of the Fallen Star
East - A long winding road
South - Muddy Pathway
West - Into the Wilderness

If anyone knows of such a snippet and like to point me in the direction that would be great. If not and you would like to make one that would be even better. Thanks.
Last edit: 15 May 2014 06:41 by Calipso. Reason: Request met.

Please Log in or Create an account to join the conversation.

More
15 May 2014 01:34 #4898 by Coffee
Open act.informative.c

change your do_auto_exits to
static void do_auto_exits(struct char_data *ch)
{
int door, len = 0;

if (AFF_FLAGGED(ch, AFF_BLIND) && GET_LEVEL(ch) < LVL_IMMORT) {
send_to_char(ch, "You can't see a damned thing, you're blind!\r\n");
return;
}

send_to_char(ch, "%sObvious exits:%s\r\n", KBLU, KNRM);

for (door = 0; door < NUM_OF_DIRS; door++) {
if (!EXIT(ch, door) || EXIT(ch, door)->to_room == NOWHERE)
continue;
if (EXIT_FLAGGED(EXIT(ch, door), EX_CLOSED) && !CONFIG_DISP_CLOSED_DOORS)
continue;
if (EXIT_FLAGGED(EXIT(ch, door), EX_HIDDEN) && !PRF_FLAGGED(ch, PRF_HOLYLIGHT))
continue;

len++;

if (!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_SHOWVNUMS) && !EXIT_FLAGGED(EXIT(ch, door), EX_CLOSED))
send_to_char(ch, "%s%-5s - %s %s %s[%s%5d%s]%s\r\n", KBLU, dirs[door],
EXIT_FLAGGED(EXIT(ch, door), EX_HIDDEN) ? " [HIDDEN]" : "", world[EXIT(ch, door)->to_room].name,
KBLU, BBLU, GET_ROOM_VNUM(EXIT(ch, door)->to_room), KBLU, KNRM);
else if (CONFIG_DISP_CLOSED_DOORS && EXIT_FLAGGED(EXIT(ch, door), EX_CLOSED)) {
/* But we tell them the door is closed */
send_to_char(ch, "%s%-5s - The %s is closed%s%s\r\n", KBLU, dirs[door],
(EXIT(ch, door)->keyword)? fname(EXIT(ch, door)->keyword) : "opening",
EXIT_FLAGGED(EXIT(ch, door), EX_HIDDEN) ? " and hidden." : ".", KNRM);
}
else
send_to_char(ch, "%s%-5s - %s%s\r\n", KBLU, dirs[door], IS_DARK(EXIT(ch, door)->to_room) &&
!CAN_SEE_IN_DARK(ch) ? "Too dark to tell." : world[EXIT(ch, door)->to_room].name, KNRM);
}

if (!len)
send_to_char(ch, " %sNone.%s\r\n", BRED, KNRM);
}

Then change ACMD(do_exit) to
ACMD(do_exits)
{
do_auto_exits(ch);
}
The following user(s) said Thank You: Calipso

Please Log in or Create an account to join the conversation.

More
15 May 2014 05:58 #4901 by Calipso
Wow, this will help me out alot! Thank you for your time and effort, I really appreciate it.

Please Log in or Create an account to join the conversation.

Time to create page: 0.196 seconds