Lets assume you wanted to make an 'out of character' channel
First:
in mud.h do a search for channel_ and add:
#define CHANNEL_OOC BV30 (or whatever BV is next in your channel defines)
At the end.
If you are using Extended Bitvectors for channels simply follow the next number. If you're
using the above method and you already are upto BV31 you're going to have to update before
you can go further, otherwise continue this:
Then in act_info.c
you would look for this line:
ch_printf_color( ch, "%s", !IS_SET( ch->deaf, CHANNEL_YELL ) ?
You would add a line similar to this to add your 'ooc' channel to the 'channels' display.
ch_printf_color( ch, "%s", !IS_SET( ch->deaf, CHANNEL_OOC ) ?
" &G+OOC" :
" &R-ooc" );
Then you would hunt out:
else if ( !str_cmp( arg+1, "yell" ) ) bit = CHANNEL_YELL;
(still in act_info.c)
and add
else if ( !str_cmp( arg+1, "ooc" ) ) bit = CHANNEL_OOC;
(This is where you determine 'channel -/+ whatever')
Then just below it you'll see the 'clear all' section with this line
REMOVE_BIT (ch->deaf, CHANNEL_YELL);
and you'll want to add
REMOVE_BIT (ch->deaf, CHANNEL_OOC);
to it so that 'channels +all' adds the new channel too.
Further down you can find the exact opposite
SET_BIT (ch->deaf, CHANNEL_YELL);
and you'll need to duplicate that one too.
SET_BIT (ch->deaf, CHANNEL_OOC);
so that channels -all takes it with too.
Onto the last file
act_comm.c
seek out
case CHANNEL_RACETALK:
ch_printf( ch, "&gYou %s '&W%s&g'\n\r", verb, argument );
sprintf( buf, "&g$n %ss '&W$t&g'", verb );
break;
This is the area that determines what your channel looks like.
dupe that
case CHANNEL_OOC:
ch_printf( ch, "You %s '%s'\n\r", verb, argument );
sprintf( buf, "$n %ss '$t'", verb );
break;
And add in any colors you would like to have.
Next hunt out:
void do_chat( CHAR_DATA *ch, char *argument )
{
if (NOT_AUTHED(ch))
{
send_to_char("Huh?\n\r", ch);
return;
}
talk_channel( ch, argument, CHANNEL_CHAT, "chat" );
return;
}
And copy it to:
void do_ooc( CHAR_DATA *ch, char *argument )
{
if (NOT_AUTHED(ch))
{
send_to_char("Huh?\n\r", ch);
return;
}
talk_channel( ch, argument, CHANNEL_OOC, "ooc" );
return;
}
The 'channel_ooc, "ooc"' part determines what shows when someone uses that channel: ie:
"You ooc 'blah blah" if you changed the "ooc" to "yodel" it would should "You yodel
'blah blah' (others would see 'someone yodels "blah blah"')
Once you've completed all this need to finish up by adding the 'do_ooc' to mud.h and
tables.c as per a normal new command, reboot, cedit it in, and you're done.
That should be everything, enjoy.