adding color

Posted by Frobozz on Tue 16 Nov 2004 04:21 PM — 3 posts, 16,004 views.

#0
Version, stock SMAUG FUSS.

I've been trying to add color into the channels so that just the channel name is in a different color with the output text in another.

In other words Immtalk would come out as say.. Blue and the message text comes out as yellow.

Thoughts?

This is what my code looks like right now:

case CHANNEL_IMMTALK:
case CHANNEL_AVTALK:
sprintf( buf, "<Immortal: $n %c $t", channel == CHANNEL_IMMTALK ? '>' : ':' );
position = ch->position;
ch->position = POS_STANDING;
act( AT_IMMORT, buf, ch, argument, NULL, TO_CHAR );
ch->position = position;
break;
}
USA #1
Just use the stock prompt symbol colors. Such as &R is red. SmaugFUSS should have that enabled.
Australia #2
in color.c or color.h you can difine the color of many things, if you look in there, there are a couple of tables

char * const pc_displays[MAX_COLORS] = and
const sh_int default_set [MAX_COLORS] = both in color.c

You can change the values there to suit the color that you want, also you would have to reset the colors ingamne to apply the new values, cant remember the command off hand tho color reset all i think it is, if i make no sence im totaly sorry as im realy tired and should be in bed.