Skip to content

Instantly share code, notes, and snippets.

@amatus
Created March 29, 2017 20:12
Show Gist options
  • Save amatus/3d34f81f5d617a2978ef910a4d6e2b1a to your computer and use it in GitHub Desktop.
Save amatus/3d34f81f5d617a2978ef910a4d6e2b1a to your computer and use it in GitHub Desktop.
Lope's color patch to ROM 2.4b6 (approximately)
diff --git a/src/act_comm.c b/src/act_comm.c
index 19eba7f..fb1f792 100644
--- a/src/act_comm.c
+++ b/src/act_comm.c
@@ -301,7 +301,7 @@ void do_auction( CHAR_DATA *ch, char *argument )
REMOVE_BIT(ch->comm,COMM_NOAUCTION);
}
- sprintf( buf, "You auction '%s'\n\r", argument );
+ sprintf( buf, "{yYou auction '%s'{x\n\r", argument );
send_to_char( buf, ch );
for ( d = descriptor_list; d != NULL; d = d->next )
{
@@ -314,7 +314,7 @@ void do_auction( CHAR_DATA *ch, char *argument )
!IS_SET(victim->comm,COMM_NOAUCTION) &&
!IS_SET(victim->comm,COMM_QUIET) )
{
- act_new("$n auctions '$t'",
+ act_new("{y$n auctions '$t'{x",
ch,argument,d->character,TO_VICT,POS_DEAD);
}
}
@@ -356,7 +356,7 @@ void do_gossip( CHAR_DATA *ch, char *argument )
REMOVE_BIT(ch->comm,COMM_NOGOSSIP);
- sprintf( buf, "You gossip '%s'\n\r", argument );
+ sprintf( buf, "{mYou gossip '%s'{x\n\r", argument );
send_to_char( buf, ch );
for ( d = descriptor_list; d != NULL; d = d->next )
{
@@ -369,8 +369,8 @@ void do_gossip( CHAR_DATA *ch, char *argument )
!IS_SET(victim->comm,COMM_NOGOSSIP) &&
!IS_SET(victim->comm,COMM_QUIET) )
{
- act_new( "$n gossips '$t'",
- ch,argument, d->character, TO_VICT,POS_SLEEPING );
+ act_new( "{m$n gossips '$t'{x",
+ ch,argument, d->character, TO_VICT,POS_SLEEPING );
}
}
}
@@ -521,7 +521,7 @@ void do_question( CHAR_DATA *ch, char *argument )
REMOVE_BIT(ch->comm,COMM_NOQUESTION);
- sprintf( buf, "You question '%s'\n\r", argument );
+ sprintf( buf, "{yYou question '%s'{x\n\r", argument );
send_to_char( buf, ch );
for ( d = descriptor_list; d != NULL; d = d->next )
{
@@ -534,7 +534,7 @@ void do_question( CHAR_DATA *ch, char *argument )
!IS_SET(victim->comm,COMM_NOQUESTION) &&
!IS_SET(victim->comm,COMM_QUIET) )
{
- act_new("$n questions '$t'",
+ act_new("{y$n questions '$t'{x",
ch,argument,d->character,TO_VICT,POS_SLEEPING);
}
}
@@ -576,7 +576,7 @@ void do_answer( CHAR_DATA *ch, char *argument )
REMOVE_BIT(ch->comm,COMM_NOQUESTION);
- sprintf( buf, "You answer '%s'\n\r", argument );
+ sprintf( buf, "{yYou answer '%s'{x\n\r", argument );
send_to_char( buf, ch );
for ( d = descriptor_list; d != NULL; d = d->next )
{
@@ -589,7 +589,7 @@ void do_answer( CHAR_DATA *ch, char *argument )
!IS_SET(victim->comm,COMM_NOQUESTION) &&
!IS_SET(victim->comm,COMM_QUIET) )
{
- act_new("$n answers '$t'",
+ act_new("{y$n answers '$t'{x",
ch,argument,d->character,TO_VICT,POS_SLEEPING);
}
}
@@ -631,9 +631,9 @@ void do_music( CHAR_DATA *ch, char *argument )
REMOVE_BIT(ch->comm,COMM_NOMUSIC);
- sprintf( buf, "You MUSIC: '%s'\n\r", argument );
+ sprintf( buf, "{yYou MUSIC: '%s'{x\n\r", argument );
send_to_char( buf, ch );
- sprintf( buf, "$n MUSIC: '%s'", argument );
+ sprintf( buf, "{y$n MUSIC: '%s'{x", argument );
for ( d = descriptor_list; d != NULL; d = d->next )
{
CHAR_DATA *victim;
@@ -645,7 +645,7 @@ void do_music( CHAR_DATA *ch, char *argument )
!IS_SET(victim->comm,COMM_NOMUSIC) &&
!IS_SET(victim->comm,COMM_QUIET) )
{
- act_new("$n MUSIC: '$t'",
+ act_new("{y$n MUSIC: '$t'{x",
ch,argument,d->character,TO_VICT,POS_SLEEPING);
}
}
@@ -726,15 +726,15 @@ void do_immtalk( CHAR_DATA *ch, char *argument )
REMOVE_BIT(ch->comm,COMM_NOWIZ);
- sprintf( buf, "$n: %s", argument );
- act_new("$n: $t",ch,argument,NULL,TO_CHAR,POS_DEAD);
+ sprintf( buf, "{c[{y$n{c]: %s{x", argument );
+ act_new("{c[{y$n{c]: $t{x",ch,argument,NULL,TO_CHAR,POS_DEAD);
for ( d = descriptor_list; d != NULL; d = d->next )
{
if ( d->connected == CON_PLAYING &&
IS_IMMORTAL(d->character) &&
!IS_SET(d->character->comm,COMM_NOWIZ) )
{
- act_new("$n: $t",ch,argument,d->character,TO_VICT,POS_DEAD);
+ act_new("{c[{y$n{c]: $t{x",ch,argument,d->character,TO_VICT,POS_DEAD);
}
}
@@ -751,8 +751,8 @@ void do_say( CHAR_DATA *ch, char *argument )
return;
}
- act( "$n says '$T'", ch, NULL, argument, TO_ROOM );
- act( "You say '$T'", ch, NULL, argument, TO_CHAR );
+ act( "{g$n says '$T'{x", ch, NULL, argument, TO_ROOM );
+ act( "{gYou say '$T'{x", ch, NULL, argument, TO_CHAR );
return;
}
@@ -1947,3 +1947,35 @@ bool is_same_group( CHAR_DATA *ach, CHAR_DATA *bch )
if ( bch->leader != NULL ) bch = bch->leader;
return ach == bch;
}
+
+/*
+ * Colour setting and unsetting, way cool, Lope Oct '94
+ */
+void do_colour( CHAR_DATA *ch, char *argument )
+{
+ char arg[ MAX_STRING_LENGTH ];
+
+ argument = one_argument( argument, arg );
+
+ if( !*arg )
+ {
+ if( !IS_SET( ch->act, PLR_COLOUR ) )
+ {
+ SET_BIT( ch->act, PLR_COLOUR );
+ send_to_char( "{bC{ro{yl{co{mu{gr{x is now {rON{x, Way Cool!\n\r", ch );
+ }
+ else
+ {
+ send_to_char_bw( "Colour is now OFF, <sigh>\n\r", ch );
+ REMOVE_BIT( ch->act, PLR_COLOUR );
+ }
+ return;
+ }
+ else
+ {
+ send_to_char_bw( "Colour Configuration is unavailable in this\n\r", ch );
+ send_to_char_bw( "version of colour, sorry\n\r", ch );
+ }
+
+ return;
+}
diff --git a/src/act_info.c b/src/act_info.c
index 0cd939b..9acb01f 100644
--- a/src/act_info.c
+++ b/src/act_info.c
@@ -879,7 +879,7 @@ void do_prompt(CHAR_DATA *ch, char *argument)
}
if( !strcmp( argument, "all" ) )
- strcpy( buf, "<%hhp %mm %vmv> ");
+ strcpy( buf, "{c<%hhp %mm %vmv>{x " );
else
{
if ( strlen(argument) > 50 )
diff --git a/src/comm.c b/src/comm.c
index 6856e93..b7a8bcf 100644
--- a/src/comm.c
+++ b/src/comm.c
@@ -1235,7 +1235,9 @@ bool process_output( DESCRIPTOR_DATA *d, bool fPrompt )
{
int percent;
char wound[100];
- char buf[MAX_STRING_LENGTH];
+ char *pbuff;
+ char buf[MAX_STRING_LENGTH];
+ char buffer[MAX_STRING_LENGTH*2];
if (victim->max_hit > 0)
percent = victim->hit * 100 / victim->max_hit;
@@ -1261,8 +1263,10 @@ bool process_output( DESCRIPTOR_DATA *d, bool fPrompt )
sprintf(buf,"%s %s \n\r",
IS_NPC(victim) ? victim->short_descr : victim->name,wound);
- buf[0] = UPPER(buf[0]);
- write_to_buffer( d, buf, 0);
+ buf[0] = UPPER( buf[0] );
+ pbuff = buffer;
+ colourconv( pbuff, buf, d->character );
+ write_to_buffer( d, buffer, 0);
}
@@ -1321,7 +1325,8 @@ void bust_a_prompt( CHAR_DATA *ch )
const char *str;
const char *i;
char *point;
- char doors[MAX_INPUT_LENGTH];
+ char *pbuff;
+ char buffer[ MAX_STRING_LENGTH*2 ]; char doors[MAX_INPUT_LENGTH];
EXIT_DATA *pexit;
bool found;
const char *dir_name[] = {"N","E","S","W","U","D"};
@@ -1329,11 +1334,11 @@ void bust_a_prompt( CHAR_DATA *ch )
point = buf;
str = ch->prompt;
- if (str == NULL || str[0] == '\0')
+ if( !str || str[0] == '\0')
{
- sprintf( buf, "<%dhp %dm %dmv> %s",
- ch->hit,ch->mana,ch->move,ch->prefix);
- send_to_char(buf,ch);
+ sprintf( buf, "{c<%dhp %dm %dmv>{x %s",
+ ch->hit, ch->mana, ch->move, ch->prefix );
+ send_to_char( buf, ch );
return;
}
@@ -1445,7 +1450,10 @@ void bust_a_prompt( CHAR_DATA *ch )
while( (*point = *i) != '\0' )
++point, ++i;
}
- write_to_buffer( ch->desc, buf, point - buf );
+ *point = '\0';
+ pbuff = buffer;
+ colourconv( pbuff, buf, ch );
+ write_to_buffer( ch->desc, buffer, 0 );
if (ch->prefix[0] != '\0')
write_to_buffer(ch->desc,ch->prefix,0);
@@ -2334,7 +2342,7 @@ void stop_idling( CHAR_DATA *ch )
/*
* Write to one char.
*/
-void send_to_char( const char *txt, CHAR_DATA *ch )
+void send_to_char_bw( const char *txt, CHAR_DATA *ch )
{
if ( txt != NULL && ch->desc != NULL )
write_to_buffer( ch->desc, txt, strlen(txt) );
@@ -2342,9 +2350,60 @@ void send_to_char( const char *txt, CHAR_DATA *ch )
}
/*
+ * Write to one char, new colour version, by Lope.
+ */
+void send_to_char( const char *txt, CHAR_DATA *ch )
+{
+ const char *point;
+ char *point2;
+ char buf[ MAX_STRING_LENGTH*4 ];
+ int skip = 0;
+
+ buf[0] = '\0';
+ point2 = buf;
+ if( txt && ch->desc )
+ {
+ if( IS_SET( ch->act, PLR_COLOUR ) )
+ {
+ for( point = txt ; *point ; point++ )
+ {
+ if( *point == '{' )
+ {
+ point++;
+ skip = colour( *point, ch, point2 );
+ while( skip-- > 0 )
+ ++point2;
+ continue;
+ }
+ *point2 = *point;
+ *++point2 = '\0';
+ }
+ *point2 = '\0';
+ write_to_buffer( ch->desc, buf, point2 - buf );
+ }
+ else
+ {
+ for( point = txt ; *point ; point++ )
+ {
+ if( *point == '{' )
+ {
+ point++;
+ continue;
+ }
+ *point2 = *point;
+ *++point2 = '\0';
+ }
+ *point2 = '\0';
+ write_to_buffer( ch->desc, buf, point2 - buf );
+ }
+ }
+ return;
+}
+
+/*
* Send a page to one char.
*/
-void page_to_char( const char *txt, CHAR_DATA *ch )
+void page_to_char_bw( const char *txt, CHAR_DATA *ch )
{
if ( txt == NULL || ch->desc == NULL)
return;
@@ -2365,6 +2424,62 @@ void page_to_char( const char *txt, CHAR_DATA *ch )
#endif
}
+/*
+ * Page to one char, new colour version, by Lope.
+ */
+void page_to_char( const char *txt, CHAR_DATA *ch )
+{
+ const char *point;
+ char *point2;
+ char buf[ MAX_STRING_LENGTH * 4 ];
+ int skip = 0;
+
+ buf[0] = '\0';
+ point2 = buf;
+ if( txt && ch->desc )
+ {
+ if( IS_SET( ch->act, PLR_COLOUR ) )
+ {
+ for( point = txt ; *point ; point++ )
+ {
+ if( *point == '{' )
+ {
+ point++;
+ skip = colour( *point, ch, point2 );
+ while( skip-- > 0 )
+ ++point2;
+ continue;
+ }
+ *point2 = *point;
+ *++point2 = '\0';
+ }
+ *point2 = '\0';
+ ch->desc->showstr_head = alloc_mem( strlen( buf ) + 1 );
+ strcpy( ch->desc->showstr_head, buf );
+ ch->desc->showstr_point = ch->desc->showstr_head;
+ show_string( ch->desc, "" );
+ }
+ else
+ {
+ for( point = txt ; *point ; point++ )
+ {
+ if( *point == '{' )
+ {
+ point++;
+ continue;
+ }
+ *point2 = *point;
+ *++point2 = '\0';
+ }
+ *point2 = '\0';
+ ch->desc->showstr_head = alloc_mem( strlen( buf ) + 1 );
+ strcpy( ch->desc->showstr_head, buf );
+ ch->desc->showstr_point = ch->desc->showstr_head;
+ show_string( ch->desc, "" );
+ }
+ }
+ return;
+}
/* string pager */
void show_string(struct descriptor_data *d, char *input)
@@ -2428,6 +2543,10 @@ void fix_sex(CHAR_DATA *ch)
ch->sex = IS_NPC(ch) ? 0 : ch->pcdata->true_sex;
}
+/*
+ * The colour version of the act_new( ) function, -Lope
+ */
+
void act_new( const char *format, CHAR_DATA *ch, const void *arg1,
const void *arg2, int type, int min_pos)
{
@@ -2435,44 +2554,47 @@ void act_new( const char *format, CHAR_DATA *ch, const void *arg1,
static char * const him_her [] = { "it", "him", "her" };
static char * const his_her [] = { "its", "his", "her" };
- char buf[MAX_STRING_LENGTH];
- char fname[MAX_INPUT_LENGTH];
- CHAR_DATA *to;
- CHAR_DATA *vch = (CHAR_DATA *) arg2;
- OBJ_DATA *obj1 = (OBJ_DATA *) arg1;
- OBJ_DATA *obj2 = (OBJ_DATA *) arg2;
- const char *str;
- const char *i;
- char *point;
+ CHAR_DATA *to;
+ CHAR_DATA *vch = ( CHAR_DATA * ) arg2;
+ OBJ_DATA *obj1 = ( OBJ_DATA * ) arg1;
+ OBJ_DATA *obj2 = ( OBJ_DATA * ) arg2;
+ const char *str;
+ char *i = NULL;
+ char *point;
+ char *pbuff;
+ char buffer[ MAX_STRING_LENGTH*2 ];
+ char buf[ MAX_STRING_LENGTH ];
+ char fname[ MAX_INPUT_LENGTH ];
+ bool fColour = FALSE;
/*
* Discard null and zero-length messages.
*/
- if ( format == NULL || format[0] == '\0' )
+ if( !format || !*format )
return;
/* discard null rooms and chars */
- if (ch == NULL || ch->in_room == NULL)
+ if( !ch || !ch->in_room )
return;
to = ch->in_room->people;
if ( type == TO_VICT )
{
- if ( vch == NULL )
+ if( !vch )
{
bug( "Act: null vch with TO_VICT.", 0 );
return;
}
- if (vch->in_room == NULL)
+ if( !vch->in_room )
return;
to = vch->in_room->people;
}
- for ( ; to != NULL; to = to->next_in_room )
+ for( ; to ; to = to->next_in_room )
{
- if ( to->desc == NULL || to->position < min_pos )
+ if( !to->desc || to->position < min_pos )
continue;
if ( (type == TO_CHAR) && to != ch )
@@ -2493,9 +2615,10 @@ void act_new( const char *format, CHAR_DATA *ch, const void *arg1,
*point++ = *str++;
continue;
}
- ++str;
-
- if ( arg2 == NULL && *str >= 'A' && *str <= 'Z' )
+ fColour = TRUE;
+ ++str;
+ i = " <@@@> ";
+ if( !arg2 && *str >= 'A' && *str <= 'Z' )
{
bug( "Act: missing arg2 for code %d.", *str );
i = " <@@@> ";
@@ -2551,8 +2674,11 @@ void act_new( const char *format, CHAR_DATA *ch, const void *arg1,
*point++ = '\n';
*point++ = '\r';
+ *point = '\0';
buf[0] = UPPER(buf[0]);
- write_to_buffer( to->desc, buf, point - buf );
+ pbuff = buffer;
+ colourconv( pbuff, buf, to );
+ write_to_buffer( to->desc, buffer, 0 );
}
return;
@@ -2570,3 +2696,127 @@ int gettimeofday( struct timeval *tp, void *tzp )
tp->tv_usec = 0;
}
#endif
+
+int colour( char type, CHAR_DATA *ch, char *string )
+{
+ char code[ 20 ];
+ char *p = '\0';
+
+ if( IS_NPC( ch ) )
+ return( 0 );
+
+ switch( type )
+ {
+ default:
+ sprintf( code, CLEAR );
+ break;
+ case 'x':
+ sprintf( code, CLEAR );
+ break;
+ case 'b':
+ sprintf( code, C_BLUE );
+ break;
+ case 'c':
+ sprintf( code, C_CYAN );
+ break;
+ case 'g':
+ sprintf( code, C_GREEN );
+ break;
+ case 'm':
+ sprintf( code, C_MAGENTA );
+ break;
+ case 'r':
+ sprintf( code, C_RED );
+ break;
+ case 'w':
+ sprintf( code, C_WHITE );
+ break;
+ case 'y':
+ sprintf( code, C_YELLOW );
+ break;
+ case 'B':
+ sprintf( code, C_B_BLUE );
+ break;
+ case 'C':
+ sprintf( code, C_B_CYAN );
+ break;
+ case 'G':
+ sprintf( code, C_B_GREEN );
+ break;
+ case 'M':
+ sprintf( code, C_B_MAGENTA );
+ break;
+ case 'R':
+ sprintf( code, C_B_RED );
+ break;
+ case 'W':
+ sprintf( code, C_B_WHITE );
+ break;
+ case 'Y':
+ sprintf( code, C_B_YELLOW );
+ break;
+ case 'D':
+ sprintf( code, C_D_GREY );
+ break;
+ case '*':
+ sprintf( code, "%c", 007 );
+ break;
+ case '/':
+ sprintf( code, "%c", 012 );
+ break;
+ case '{':
+ sprintf( code, "%c", '{' );
+ break;
+ }
+
+ p = code;
+ while( *p != '\0' )
+ {
+ *string = *p++;
+ *++string = '\0';
+ }
+
+ return( strlen( code ) );
+}
+
+void colourconv( char *buffer, const char *txt, CHAR_DATA *ch )
+{
+ const char *point;
+ int skip = 0;
+
+ if( ch->desc && txt )
+ {
+ if( IS_SET( ch->act, PLR_COLOUR ) )
+ {
+ for( point = txt ; *point ; point++ )
+ {
+ if( *point == '{' )
+ {
+ point++;
+ skip = colour( *point, ch, buffer );
+ while( skip-- > 0 )
+ ++buffer;
+ continue;
+ }
+ *buffer = *point;
+ *++buffer = '\0';
+ }
+ *buffer = '\0';
+ }
+ else
+ {
+ for( point = txt ; *point ; point++ )
+ {
+ if( *point == '{' )
+ {
+ point++;
+ continue;
+ }
+ *buffer = *point;
+ *++buffer = '\0';
+ }
+ *buffer = '\0';
+ }
+ }
+ return;
+}
diff --git a/src/db.c b/src/db.c
index e785750..8e3e038 100644
--- a/src/db.c
+++ b/src/db.c
@@ -2732,7 +2732,7 @@ void do_areas( CHAR_DATA *ch, char *argument )
if (argument[0] != '\0')
{
- send_to_char("No argument is used with this command.\n\r",ch);
+ send_to_char_bw("No argument is used with this command.\n\r",ch);
return;
}
@@ -2746,7 +2746,7 @@ void do_areas( CHAR_DATA *ch, char *argument )
{
sprintf( buf, "%-39s%-39s\n\r",
pArea1->credits, (pArea2 != NULL) ? pArea2->credits : "" );
- send_to_char( buf, ch );
+ send_to_char_bw( buf, ch );
pArea1 = pArea1->next;
if ( pArea2 != NULL )
pArea2 = pArea2->next;
diff --git a/src/handler.c b/src/handler.c
index 14989c0..118a176 100644
--- a/src/handler.c
+++ b/src/handler.c
@@ -2690,6 +2690,7 @@ char *act_bit_name( int act_flags )
if (act_flags & PLR_NOSUMMON ) strcat(buf, " no_summon");
if (act_flags & PLR_NOFOLLOW ) strcat(buf, " no_follow");
if (act_flags & PLR_FREEZE ) strcat(buf, " frozen");
+ if (act_flags & PLR_COLOUR ) strcat(buf, " colour");
if (act_flags & PLR_THIEF ) strcat(buf, " thief");
if (act_flags & PLR_KILLER ) strcat(buf, " killer");
}
diff --git a/src/interp.c b/src/interp.c
index 61b295c..e118c1b 100644
--- a/src/interp.c
+++ b/src/interp.c
@@ -155,6 +155,7 @@ const struct cmd_type cmd_table [] =
{ "autosplit", do_autosplit, POS_DEAD, 0, LOG_NORMAL, 1 },
{ "brief", do_brief, POS_DEAD, 0, LOG_NORMAL, 1 },
/* { "channels", do_channels, POS_DEAD, 0, LOG_NORMAL, 1 }, */
+ { "colour", do_colour, POS_DEAD, 0, LOG_NORMAL, 1 },
{ "combine", do_combine, POS_DEAD, 0, LOG_NORMAL, 1 },
{ "compact", do_compact, POS_DEAD, 0, LOG_NORMAL, 1 },
{ "description", do_description, POS_DEAD, 0, LOG_NORMAL, 1 },
diff --git a/src/interp.h b/src/interp.h
index f731669..8eef4f7 100644
--- a/src/interp.h
+++ b/src/interp.h
@@ -98,6 +98,7 @@ DECLARE_DO_FUN( do_changes );
DECLARE_DO_FUN( do_channels );
DECLARE_DO_FUN( do_clone );
DECLARE_DO_FUN( do_close );
+DECLARE_DO_FUN( do_colour );
DECLARE_DO_FUN( do_commands );
DECLARE_DO_FUN( do_combine );
DECLARE_DO_FUN( do_compact );
diff --git a/src/merc.h b/src/merc.h
index f2e1c40..6d04012 100644
--- a/src/merc.h
+++ b/src/merc.h
@@ -158,7 +158,25 @@ typedef void SPELL_FUN args( ( int sn, int level, CHAR_DATA *ch, void *vo,
#define AVATAR (MAX_LEVEL - 8)
#define HERO LEVEL_HERO
-
+ /*
+ * Colour stuff by Lope of Loping Through The MUD
+ */
+#define CLEAR "" /* Resets Colour */
+#define C_RED "" /* Normal Colours */
+#define C_GREEN ""
+#define C_YELLOW ""
+#define C_BLUE ""
+#define C_MAGENTA ""
+#define C_CYAN ""
+#define C_WHITE ""
+#define C_D_GREY "" /* Light Colors */
+#define C_B_RED ""
+#define C_B_GREEN ""
+#define C_B_YELLOW ""
+#define C_B_BLUE ""
+#define C_B_MAGENTA ""
+#define C_B_CYAN ""
+#define C_B_WHITE ""
/*
* Site ban structure.
@@ -1229,7 +1247,8 @@ struct kill_data
#define PLR_CANLOOT (P)
#define PLR_NOSUMMON (Q)
#define PLR_NOFOLLOW (R)
-/* 2 bits reserved, S-T */
+#define PLR_COLOUR (T)
+/* 1 bit reserved, S */
/* penalty flags */
#define PLR_PERMIT (U)
@@ -2116,6 +2135,13 @@ void act args( ( const char *format, CHAR_DATA *ch,
void act_new args( ( const char *format, CHAR_DATA *ch,
const void *arg1, const void *arg2, int type,
int min_pos) );
+/*
+ * Colour stuff by Lope of Loping Through The MUD
+ */
+int colour args( ( char type, CHAR_DATA *ch, char *string ) );
+void colourconv args( ( char *buffer, const char *txt, CHAR_DATA *ch ) );
+void send_to_char_bw args( ( const char *txt, CHAR_DATA *ch ) );
+void page_to_char_bw args( ( const char *txt, CHAR_DATA *ch ) );
/* db.c */
char * print_flags args( ( int flag ));
diff --git a/src/save.c b/src/save.c
index 3306e8f..84829fe 100644
--- a/src/save.c
+++ b/src/save.c
@@ -556,7 +556,7 @@ bool load_char_obj( DESCRIPTOR_DATA *d, char *name )
ch->act = PLR_NOSUMMON;
ch->comm = COMM_COMBINE
| COMM_PROMPT;
- ch->prompt = str_dup("<%hhp %mm %vmv> ");
+ ch->prompt = str_dup( "{c<%hhp %mm %vmv>{x " );
ch->pcdata->confirm_delete = FALSE;
ch->pcdata->pwd = str_dup( "" );
ch->pcdata->bamfin = str_dup( "" );
diff --git a/src/tables.c b/src/tables.c
index aa2f326..39398dd 100644
--- a/src/tables.c
+++ b/src/tables.c
@@ -123,6 +123,7 @@ const struct flag_type plr_flags[] =
{ "can_loot", P, FALSE },
{ "nosummon", Q, FALSE },
{ "nofollow", R, FALSE },
+ { "colour", T, FALSE },
{ "permit", U, TRUE },
{ "log", W, FALSE },
{ "deny", X, FALSE },
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment