I got this snippet for my mud and its the the altanos compass display thing and heres what it told me to do:
Installation Instructions
-------------------------
1. Open act_info.c and locate function do_look
Find the following near the beginning:
char arg [MAX_INPUT_LENGTH];
char arg1 [MAX_INPUT_LENGTH];
char arg2 [MAX_INPUT_LENGTH];
char arg3 [MAX_INPUT_LENGTH];
Add the following directly beneath that:
char dir_n[50];
char dir_e[50];
char dir_s[50];
char dir_w[50];
char dir_u[50];
char dir_d[50];
char dir_ne[50];
char dir_nw[50];
char dir_se[50];
char dir_sw[50];
char dir_sm[50];
char *exitcolor;
Then locate the following code:
if ( !ch->desc )
return;
Directly ABOVE that, add the following:
strcpy( dir_n, "&z-" );
strcpy( dir_e, "&z-" );
strcpy( dir_s, "&z-" );
strcpy( dir_w, "&z-" );
strcpy( dir_u, "&z-" );
strcpy( dir_d, "&z-" );
strcpy( dir_ne, "&z -" );
strcpy( dir_nw, "&z- " );
strcpy( dir_se, "&z -" );
strcpy( dir_sw, "&z- " );
strcpy( dir_sm, "&z-" );
Then locate the following code:
/* 'look' or 'look auto' */
set_char_color( AT_RMNAME, ch );
send_to_char( ch->in_room->name, ch );
send_to_char( "\n\r", ch );
Replace that block with the following:
/* 'look' or 'look auto' */
for( pexit = ch->in_room->first_exit; pexit; pexit = pexit->next )
{
if( ( pexit->to_room
&& !IS_SET (pexit->exit_info, EX_HIDDEN)
&& !IS_SET (pexit->exit_info, EX_SECRET))
|| (IS_SET (pexit->exit_info, EX_SECRET)
&& !IS_SET (pexit->exit_info, EX_CLOSED)))
{
exitcolor = "&Y";
if( IS_SET( pexit->exit_info, EX_WINDOW ) )
exitcolor = "&C";
if( IS_SET( pexit->exit_info, EX_SECRET ) )
exitcolor = "&b";
if( IS_SET( pexit->exit_info, EX_CLOSED ) )
exitcolor = "&z";
if( IS_SET( pexit->exit_info, EX_LOCKED ) )
exitcolor = "&R";
if( pexit->vdir == DIR_NORTH )
sprintf( dir_n, "%sN", exitcolor );
if( pexit->vdir == DIR_EAST )
sprintf( dir_e, "%sE", exitcolor );
if( pexit->vdir == DIR_SOUTH )
sprintf( dir_s, "%sS", exitcolor );
if( pexit->vdir == DIR_WEST )
sprintf( dir_w, "%sW", exitcolor );
if( pexit->vdir == DIR_UP )
sprintf( dir_u, "%sU", exitcolor );
if( pexit->vdir == DIR_DOWN )
sprintf( dir_d, "%sD", exitcolor );
if( pexit->vdir == DIR_NORTHEAST )
sprintf( dir_ne, "%sNE", exitcolor );
if( pexit->vdir == DIR_NORTHWEST )
sprintf( dir_nw, "%sNW", exitcolor );
if( pexit->vdir == DIR_SOUTHEAST )
sprintf( dir_se, "%sSE", exitcolor );
if( pexit->vdir == DIR_SOUTHWEST )
sprintf( dir_sw, "%sSW", exitcolor );
}
}
if( xIS_SET( ch->act, PLR_COMPASS ) )
{
send_to_char( "\n\r", ch );
set_char_color( AT_RMNAME, ch );
ch_printf( ch, "%-50s", ch->in_room->name );
strcat( dir_nw, " " );
ch_printf_color( ch, " %s", dir_nw );
strcat( dir_n, " " );
ch_printf_color( ch, " %s", dir_n );
ch_printf_color( ch, " %s\n\r", dir_ne );
send_to_char( "&z-<----------------------------------------------->- ", ch );
strcat( dir_w, "" );
ch_printf_color( ch, " %s", dir_w );
send_to_char( "&z<-", ch );
strcat( dir_u, "&z-(&Y&W*&z)" );
ch_printf_color( ch, "%s", dir_u );
strcat( dir_d, "&z-" );
send_to_char( "&z-", ch );
ch_printf_color( ch, "%s", dir_d );
send_to_char( "&z>", ch );
ch_printf_color( ch, "%s\n\r", dir_e );
send_to_char( " ", ch );
strcat( dir_sw, " " );
ch_printf_color( ch, " %s", dir_sw );
strcat( dir_s, " " );
ch_printf_color( ch, " %s", dir_s );
ch_printf_color( ch, " %s", dir_se );
send_to_char( "\n\r\n\r", ch );
}
else
{
set_char_color( AT_RMNAME, ch );
send_to_char( ch->in_room->name, ch );
send_to_char( "\n\r", ch );
}
Then locate function do_config and find the following:
ch_printf( ch, "%-12s %-12s %-12s %-12s\n\r %-12s %-12s %-12s %-12s",
IS_SET( ch->pcdata->flags, PCFLAG_PAGERON ) ? "[+] PAGER"
: "[-] pager",
IS_SET( ch->pcdata->flags, PCFLAG_GAG ) ? "[+] GAG"
: "[-] gag",
xIS_SET(ch->act, PLR_BRIEF ) ? "[+] BRIEF"
: "[-] brief",
xIS_SET(ch->act, PLR_COMBINE ) ? "[+] COMBINE"
: "[-] combine",
xIS_SET(ch->act, PLR_BLANK ) ? "[+] BLANK"
: "[-] blank",
xIS_SET(ch->act, PLR_PROMPT ) ? "[+] PROMPT"
: "[-] prompt",
xIS_SET(ch->act, PLR_ANSI ) ? "[+] ANSI"
: "[-] ansi",
xIS_SET(ch->act, PLR_RIP ) ? "[+] RIP"
: "[-] rip" ); |