diff -ur rom24_colour_v1.2/src/act_comm.c rom24_colour_v2.0/src/act_comm.c --- rom24_colour_v1.2/src/act_comm.c Sun May 3 20:05:35 1998 +++ rom24_colour_v2.0/src/act_comm.c Sun May 3 20:23:52 1998 @@ -100,37 +100,37 @@ send_to_char(" channel status\n\r",ch); send_to_char("---------------------\n\r",ch); - send_to_char("gossip ",ch); + send_to_char("{dgossip{x ",ch); if (!IS_SET(ch->comm,COMM_NOGOSSIP)) send_to_char("ON\n\r",ch); else send_to_char("OFF\n\r",ch); - send_to_char("auction ",ch); + send_to_char("{aauction{x ",ch); if (!IS_SET(ch->comm,COMM_NOAUCTION)) send_to_char("ON\n\r",ch); else send_to_char("OFF\n\r",ch); - send_to_char("music ",ch); + send_to_char("{emusic{x ",ch); if (!IS_SET(ch->comm,COMM_NOMUSIC)) send_to_char("ON\n\r",ch); else send_to_char("OFF\n\r",ch); - send_to_char("Q/A ",ch); + send_to_char("{qQ{x/{fA{x ",ch); if (!IS_SET(ch->comm,COMM_NOQUESTION)) send_to_char("ON\n\r",ch); else send_to_char("OFF\n\r",ch); - send_to_char("Quote ",ch); + send_to_char("{hQuote{x ",ch); if (!IS_SET(ch->comm,COMM_NOQUOTE)) send_to_char("ON\n\r",ch); else send_to_char("OFF\n\r",ch); - send_to_char("grats ",ch); + send_to_char("{tgrats{x ",ch); if (!IS_SET(ch->comm,COMM_NOGRATS)) send_to_char("ON\n\r",ch); else @@ -138,26 +138,26 @@ if (IS_IMMORTAL(ch)) { - send_to_char("god channel ",ch); + send_to_char("{igod channel{x ",ch); if(!IS_SET(ch->comm,COMM_NOWIZ)) send_to_char("ON\n\r",ch); else send_to_char("OFF\n\r",ch); } - send_to_char("shouts ",ch); + send_to_char("{tshouts{x ",ch); if (!IS_SET(ch->comm,COMM_SHOUTSOFF)) send_to_char("ON\n\r",ch); else send_to_char("OFF\n\r",ch); - send_to_char("tells ",ch); + send_to_char("{ktells{x ",ch); if (!IS_SET(ch->comm,COMM_DEAF)) send_to_char("ON\n\r",ch); else send_to_char("OFF\n\r",ch); - send_to_char("quiet mode ",ch); + send_to_char("{tquiet mode{x ",ch); if (IS_SET(ch->comm,COMM_QUIET)) send_to_char("ON\n\r",ch); else @@ -277,12 +277,12 @@ { if (IS_SET(ch->comm,COMM_NOAUCTION)) { - send_to_char("Auction channel is now ON.\n\r",ch); + send_to_char("{aAuction channel is now ON.{x\n\r",ch); REMOVE_BIT(ch->comm,COMM_NOAUCTION); } else { - send_to_char("Auction channel is now OFF.\n\r",ch); + send_to_char("{aAuction channel is now OFF.{x\n\r",ch); SET_BIT(ch->comm,COMM_NOAUCTION); } } @@ -302,7 +302,7 @@ REMOVE_BIT(ch->comm,COMM_NOAUCTION); } - sprintf( buf, "{yYou auction '%s'{x\n\r", argument ); + sprintf( buf, "{aYou auction '{A%s{a'{x\n\r", argument ); send_to_char( buf, ch ); for ( d = descriptor_list; d != NULL; d = d->next ) { @@ -315,7 +315,7 @@ !IS_SET(victim->comm,COMM_NOAUCTION) && !IS_SET(victim->comm,COMM_QUIET) ) { - act_new("{y$n auctions '$t'{x", + act_new("{a$n auctions '{A$t{a'{x", ch,argument,d->character,TO_VICT,POS_DEAD); } } @@ -358,7 +358,7 @@ REMOVE_BIT(ch->comm,COMM_NOGOSSIP); - sprintf( buf, "{mYou gossip '%s'{x\n\r", argument ); + sprintf( buf, "{dYou gossip '{9%s{d'{x\n\r", argument ); send_to_char( buf, ch ); for ( d = descriptor_list; d != NULL; d = d->next ) { @@ -371,7 +371,7 @@ !IS_SET(victim->comm,COMM_NOGOSSIP) && !IS_SET(victim->comm,COMM_QUIET) ) { - act_new( "{m$n gossips '$t'{x", + act_new( "{d$n gossips '{9$t{d'{x", ch,argument, d->character, TO_VICT,POS_SLEEPING ); } } @@ -413,7 +413,7 @@ REMOVE_BIT(ch->comm,COMM_NOGRATS); - sprintf( buf, "You grats '%s'\n\r", argument ); + sprintf( buf, "{tYou grats '%s'{x\n\r", argument ); send_to_char( buf, ch ); for ( d = descriptor_list; d != NULL; d = d->next ) { @@ -426,7 +426,7 @@ !IS_SET(victim->comm,COMM_NOGRATS) && !IS_SET(victim->comm,COMM_QUIET) ) { - act_new( "$n grats '$t'", + act_new( "{t$n grats '$t'{x", ch,argument, d->character, TO_VICT,POS_SLEEPING ); } } @@ -442,12 +442,12 @@ { if (IS_SET(ch->comm,COMM_NOQUOTE)) { - send_to_char("Quote channel is now ON.\n\r",ch); + send_to_char("{hQuote channel is now ON.{x\n\r",ch); REMOVE_BIT(ch->comm,COMM_NOQUOTE); } else { - send_to_char("Quote channel is now OFF.\n\r",ch); + send_to_char("{hQuote channel is now OFF.{x\n\r",ch); SET_BIT(ch->comm,COMM_NOQUOTE); } } @@ -468,7 +468,7 @@ REMOVE_BIT(ch->comm,COMM_NOQUOTE); - sprintf( buf, "You quote '%s'\n\r", argument ); + sprintf( buf, "{hYou quote '{H%s{h'{x\n\r", argument ); send_to_char( buf, ch ); for ( d = descriptor_list; d != NULL; d = d->next ) { @@ -481,7 +481,7 @@ !IS_SET(victim->comm,COMM_NOQUOTE) && !IS_SET(victim->comm,COMM_QUIET) ) { - act_new( "$n quotes '$t'", + act_new( "{h$n quotes '{H$t{h'{x", ch,argument, d->character, TO_VICT,POS_SLEEPING ); } } @@ -523,7 +523,7 @@ REMOVE_BIT(ch->comm,COMM_NOQUESTION); - sprintf( buf, "{yYou question '%s'{x\n\r", argument ); + sprintf( buf, "{qYou question '{Q%s{q'{x\n\r", argument ); send_to_char( buf, ch ); for ( d = descriptor_list; d != NULL; d = d->next ) { @@ -536,7 +536,7 @@ !IS_SET(victim->comm,COMM_NOQUESTION) && !IS_SET(victim->comm,COMM_QUIET) ) { - act_new("{y$n questions '$t'{x", + act_new("{q$n questions '{Q$t{q'{x", ch,argument,d->character,TO_VICT,POS_SLEEPING); } } @@ -578,7 +578,7 @@ REMOVE_BIT(ch->comm,COMM_NOQUESTION); - sprintf( buf, "{yYou answer '%s'{x\n\r", argument ); + sprintf( buf, "{fYou answer '{F%s{f'{x\n\r", argument ); send_to_char( buf, ch ); for ( d = descriptor_list; d != NULL; d = d->next ) { @@ -591,7 +591,7 @@ !IS_SET(victim->comm,COMM_NOQUESTION) && !IS_SET(victim->comm,COMM_QUIET) ) { - act_new("{y$n answers '$t'{x", + act_new("{f$n answers '{F$t{f'{x", ch,argument,d->character,TO_VICT,POS_SLEEPING); } } @@ -633,9 +633,9 @@ REMOVE_BIT(ch->comm,COMM_NOMUSIC); - sprintf( buf, "{yYou MUSIC: '%s'{x\n\r", argument ); + sprintf( buf, "{eYou MUSIC: '{E%s{e'{x\n\r", argument ); send_to_char( buf, ch ); - sprintf( buf, "{y$n MUSIC: '%s'{x", argument ); + sprintf( buf, "$n MUSIC: '%s'", argument ); for ( d = descriptor_list; d != NULL; d = d->next ) { CHAR_DATA *victim; @@ -647,7 +647,7 @@ !IS_SET(victim->comm,COMM_NOMUSIC) && !IS_SET(victim->comm,COMM_QUIET) ) { - act_new("{y$n MUSIC: '$t'{x", + act_new("{e$n MUSIC: '{E$t{e'{x", ch,argument,d->character,TO_VICT,POS_SLEEPING); } } @@ -688,7 +688,7 @@ REMOVE_BIT(ch->comm,COMM_NOCLAN); - sprintf( buf, "You clan '%s'\n\r", argument ); + sprintf( buf, "You clan '%s'{x\n\r", argument ); send_to_char( buf, ch ); sprintf( buf, "$n clans '%s'", argument ); for ( d = descriptor_list; d != NULL; d = d->next ) @@ -699,7 +699,7 @@ !IS_SET(d->character->comm,COMM_NOCLAN) && !IS_SET(d->character->comm,COMM_QUIET) ) { - act_new("$n clans '$t'",ch,argument,d->character,TO_VICT,POS_DEAD); + act_new("$n clans '$t'{x",ch,argument,d->character,TO_VICT,POS_DEAD); } } @@ -708,7 +708,6 @@ void do_immtalk( CHAR_DATA *ch, char *argument ) { - char buf[MAX_STRING_LENGTH]; DESCRIPTOR_DATA *d; if ( argument[0] == '\0' ) @@ -728,15 +727,14 @@ REMOVE_BIT(ch->comm,COMM_NOWIZ); - sprintf( buf, "{c[{y$n{c]: %s{x", argument ); - act_new("{c[{y$n{c]: $t{x",ch,argument,NULL,TO_CHAR,POS_DEAD); + act_new("{i[{I$n{i]: $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("{c[{y$n{c]: $t{x",ch,argument,d->character,TO_VICT,POS_DEAD); + act_new("{i[{I$n{i]: $t{x",ch,argument,d->character,TO_VICT,POS_DEAD); } } @@ -753,8 +751,8 @@ return; } - act( "{g$n says '$T'{x", ch, NULL, argument, TO_ROOM ); - act( "{gYou say '$T'{x", ch, NULL, argument, TO_CHAR ); + act( "{6$n says '{7$T{6'{x", ch, NULL, argument, TO_ROOM ); + act( "{6You say '{7$T{6'{x", ch, NULL, argument, TO_CHAR ); return; } @@ -856,7 +854,7 @@ { act("$N seems to have misplaced $S link...try again later.", ch,NULL,victim,TO_CHAR); - sprintf(buf,"%s tells you '%s'\n\r",PERS(ch,victim),argument); + sprintf(buf,"{k%s tells you '{K%s{k'{x\n\r",PERS(ch,victim),argument); buf[0] = UPPER(buf[0]); add_buf(victim->pcdata->buffer,buf); return; @@ -885,14 +883,14 @@ act("$E is AFK, but your tell will go through when $E returns.", ch,NULL,victim,TO_CHAR); - sprintf(buf,"%s tells you '%s'\n\r",PERS(ch,victim),argument); + sprintf(buf,"{k%s tells you '{K%s{k'{x\n\r",PERS(ch,victim),argument); buf[0] = UPPER(buf[0]); add_buf(victim->pcdata->buffer,buf); return; } - act( "You tell $N '$t'", ch, argument, victim, TO_CHAR ); - act_new("$n tells you '$t'",ch,argument,victim,TO_VICT,POS_DEAD); + act( "{kYou tell $N '{K$t{k'{x", ch, argument, victim, TO_CHAR ); + act_new("{k$n tells you '{K$t{k'{x",ch,argument,victim,TO_VICT,POS_DEAD); victim->reply = ch; return; @@ -921,7 +919,7 @@ { act("$N seems to have misplaced $S link...try again later.", ch,NULL,victim,TO_CHAR); - sprintf(buf,"%s tells you '%s'\n\r",PERS(ch,victim),argument); + sprintf(buf,"{k%s tells you '{K%s{k'{x\n\r",PERS(ch,victim),argument); buf[0] = UPPER(buf[0]); add_buf(victim->pcdata->buffer,buf); return; @@ -957,14 +955,14 @@ act_new("$E is AFK, but your tell will go through when $E returns.", ch,NULL,victim,TO_CHAR,POS_DEAD); - sprintf(buf,"%s tells you '%s'\n\r",PERS(ch,victim),argument); + sprintf(buf,"{k%s tells you '{K%s{k'{x\n\r",PERS(ch,victim),argument); buf[0] = UPPER(buf[0]); add_buf(victim->pcdata->buffer,buf); return; } - act_new("You tell $N '$t'",ch,argument,victim,TO_CHAR,POS_DEAD); - act_new("$n tells you '$t'",ch,argument,victim,TO_VICT,POS_DEAD); + act_new("{kYou tell $N '{K$t{k'{x",ch,argument,victim,TO_CHAR,POS_DEAD); + act_new("{k$n tells you '{K$t{k'{x",ch,argument,victim,TO_VICT,POS_DEAD); victim->reply = ch; return; @@ -1951,12 +1949,19 @@ } /* - * Colour setting and unsetting, way cool, Lope Oct '94 + * ColoUr setting and unsetting, way cool, Ant Oct 94 + * revised to include config colour, Ant Feb 95 */ void do_colour( CHAR_DATA *ch, char *argument ) { char arg[ MAX_STRING_LENGTH ]; + if( IS_NPC( ch ) ) + { + send_to_char_bw( "ColoUr is not ON, Way Moron!\n\r", ch ); + return; + } + argument = one_argument( argument, arg ); if( !*arg ) @@ -1964,20 +1969,183 @@ 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 ); + send_to_char( "ColoUr is now ON, Way Cool!\n\r" + "Further syntax:\n\r colour {c<{xfield{c> <{xcolour{c>{x\n\r" + " colour {c<{xfield{c>{x {cbeep{x|{cnobeep{x\n\r" + "Type help {ccolour{x and {ccolour2{x for details.\n\r" + "ColoUr is brought to you by Lope, ant@solace.mh.se.\n\r", ch ); } else { - send_to_char_bw( "Colour is now OFF, <sigh>\n\r", ch ); + send_to_char_bw( "ColoUr is now OFF, <sigh>\n\r", ch ); REMOVE_BIT( ch->act, PLR_COLOUR ); } return; } + + if( !str_cmp( arg, "default" ) ) + { + default_colour( ch ); + send_to_char_bw( "ColoUr setting set to default values.\n\r", ch ); + return; + } + + if( !str_cmp( arg, "all" ) ) + { + all_colour( ch, argument ); + return; + } + + /* + * Yes, I know this is ugly and unnessessary repetition, but its old + * and I can't justify the time to make it pretty. -Lope + */ + if( !str_cmp( arg, "text" ) ) + { + ALTER_COLOUR( text ) + } + else if( !str_cmp( arg, "auction" ) ) + { + ALTER_COLOUR( auction ) + } + else if( !str_cmp( arg, "auction_text" ) ) + { + ALTER_COLOUR( auction_text ) + } + else if( !str_cmp( arg, "gossip" ) ) + { + ALTER_COLOUR( gossip ) + } + else if( !str_cmp( arg, "gossip_text" ) ) + { + ALTER_COLOUR( gossip_text ) + } + else if( !str_cmp( arg, "music" ) ) + { + ALTER_COLOUR( music ) + } + else if( !str_cmp( arg, "music_text" ) ) + { + ALTER_COLOUR( music_text ) + } + else if( !str_cmp( arg, "question" ) ) + { + ALTER_COLOUR( question ) + } + else if( !str_cmp( arg, "question_text" ) ) + { + ALTER_COLOUR( question_text ) + } + else if( !str_cmp( arg, "answer" ) ) + { + ALTER_COLOUR( answer ) + } + else if( !str_cmp( arg, "answer_text" ) ) + { + ALTER_COLOUR( answer_text ) + } + else if( !str_cmp( arg, "quote" ) ) + { + ALTER_COLOUR( quote ) + } + else if( !str_cmp( arg, "quote_text" ) ) + { + ALTER_COLOUR( quote_text ) + } + else if( !str_cmp( arg, "immtalk_text" ) ) + { + ALTER_COLOUR( immtalk_text ) + } + else if( !str_cmp( arg, "immtalk_type" ) ) + { + ALTER_COLOUR( immtalk_type ) + } + else if( !str_cmp( arg, "info" ) ) + { + ALTER_COLOUR( info ) + } + else if( !str_cmp( arg, "say" ) ) + { + ALTER_COLOUR( say ) + } + else if( !str_cmp( arg, "say_text" ) ) + { + ALTER_COLOUR( say_text ) + } + else if( !str_cmp( arg, "tell" ) ) + { + ALTER_COLOUR( tell ) + } + else if( !str_cmp( arg, "tell_text" ) ) + { + ALTER_COLOUR( tell_text ) + } + else if( !str_cmp( arg, "reply" ) ) + { + ALTER_COLOUR( reply ) + } + else if( !str_cmp( arg, "reply_text" ) ) + { + ALTER_COLOUR( reply_text ) + } + else if( !str_cmp( arg, "gtell_text" ) ) + { + ALTER_COLOUR( gtell_text ) + } + else if( !str_cmp( arg, "gtell_type" ) ) + { + ALTER_COLOUR( gtell_type ) + } + else if( !str_cmp( arg, "wiznet" ) ) + { + ALTER_COLOUR( wiznet ) + } + else if( !str_cmp( arg, "room_title" ) ) + { + ALTER_COLOUR( room_title ) + } + else if( !str_cmp( arg, "room_text" ) ) + { + ALTER_COLOUR( room_text ) + } + else if( !str_cmp( arg, "room_exits" ) ) + { + ALTER_COLOUR( room_exits ) + } + else if( !str_cmp( arg, "room_things" ) ) + { + ALTER_COLOUR( room_things ) + } + else if( !str_cmp( arg, "prompt" ) ) + { + ALTER_COLOUR( prompt ) + } + else if( !str_cmp( arg, "fight_death" ) ) + { + ALTER_COLOUR( fight_death ) + } + else if( !str_cmp( arg, "fight_yhit" ) ) + { + ALTER_COLOUR( fight_yhit ) + } + else if( !str_cmp( arg, "fight_ohit" ) ) + { + ALTER_COLOUR( fight_ohit ) + } + else if( !str_cmp( arg, "fight_thit" ) ) + { + ALTER_COLOUR( fight_thit ) + } + else if( !str_cmp( arg, "fight_skill" ) ) + { + ALTER_COLOUR( fight_skill ) + } 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 ); + send_to_char_bw( "Unrecognised Colour Parameter Not Set.\n\r", ch ); + return; } + send_to_char_bw( "New Colour Parameter Set.\n\r", ch ); return; } diff -ur rom24_colour_v1.2/src/act_info.c rom24_colour_v2.0/src/act_info.c --- rom24_colour_v1.2/src/act_info.c Sun May 3 20:05:35 1998 +++ rom24_colour_v2.0/src/act_info.c Sun May 3 18:23:44 1998 @@ -889,7 +889,7 @@ } if( !strcmp( argument, "all" ) ) - strcpy( buf, "{c<%hhp %mm %vmv>{x " ); + strcpy( buf, "<%hhp %mm %vmv> "); else { if ( strlen(argument) > 50 ) @@ -1035,21 +1035,22 @@ if ( arg1[0] == '\0' || !str_cmp( arg1, "auto" ) ) { /* 'look' or 'look auto' */ - send_to_char( ch->in_room->name, ch ); + sprintf( buf, "{s%s", ch->in_room->name ); + send_to_char( buf, ch ); if (IS_IMMORTAL(ch) && (IS_NPC(ch) || IS_SET(ch->act,PLR_HOLYLIGHT))) { - sprintf(buf," [Room %d]",ch->in_room->vnum); + sprintf(buf," {r[{RRoom %d{r]",ch->in_room->vnum); send_to_char(buf,ch); } - send_to_char( "\n\r", ch ); + send_to_char( "{x\n\r", ch ); if ( arg1[0] == '\0' || ( !IS_NPC(ch) && !IS_SET(ch->comm, COMM_BRIEF) ) ) { - send_to_char( " ",ch); - send_to_char( ch->in_room->description, ch ); + sprintf( buf, "{S %s{x", ch->in_room->description ); + send_to_char( buf, ch ); } if ( !IS_NPC(ch) && IS_SET(ch->act, PLR_AUTOEXIT) ) diff -ur rom24_colour_v1.2/src/act_wiz.c rom24_colour_v2.0/src/act_wiz.c --- rom24_colour_v1.2/src/act_wiz.c Sun May 3 20:04:43 1998 +++ rom24_colour_v2.0/src/act_wiz.c Sun May 3 20:30:02 1998 @@ -184,8 +184,11 @@ && d->character != ch) { if (IS_SET(d->character->wiznet,WIZ_PREFIX)) - send_to_char("--> ",d->character); + send_to_char("{Z--> ",d->character); + else + send_to_char( "{Z", d->character ); act_new(string,d->character,obj,ch,TO_CHAR,POS_DEAD); + send_to_char( "{x", d->character ); } } diff -ur rom24_colour_v1.2/src/comm.c rom24_colour_v2.0/src/comm.c --- rom24_colour_v1.2/src/comm.c Sun May 3 20:05:35 1998 +++ rom24_colour_v2.0/src/comm.c Sun May 3 20:25:06 1998 @@ -1235,9 +1235,7 @@ { int percent; char wound[100]; - 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; @@ -1263,10 +1261,8 @@ sprintf(buf,"%s %s \n\r", IS_NPC(victim) ? victim->short_descr : victim->name,wound); - buf[0] = UPPER( buf[0] ); - pbuff = buffer; - colourconv( pbuff, buf, d->character ); - write_to_buffer( d, buffer, 0); + buf[0] = UPPER(buf[0]); + write_to_buffer( d, buf, 0); } @@ -1335,17 +1331,17 @@ point = buf; str = ch->prompt; - if( !str || str[0] == '\0') + if (str == NULL || str[0] == '\0') { - sprintf( buf, "{c<%dhp %dm %dmv>{x %s", - ch->hit, ch->mana, ch->move, ch->prefix ); - send_to_char( buf, ch ); + sprintf( buf, "{p<%dhp %dm %dmv>{x %s", + ch->hit,ch->mana,ch->move,ch->prefix); + send_to_char(buf,ch); return; } if (IS_SET(ch->comm,COMM_AFK)) { - send_to_char("<AFK> ",ch); + send_to_char("{p<AFK>{x ",ch); return; } @@ -1454,7 +1450,9 @@ *point = '\0'; pbuff = buffer; colourconv( pbuff, buf, ch ); + send_to_char( "{p", ch ); write_to_buffer( ch->desc, buffer, 0 ); + send_to_char( "{x", ch ); if (ch->prefix[0] != '\0') write_to_buffer(ch->desc,ch->prefix,0); @@ -2383,12 +2381,12 @@ if (ch->lines == 0 ) { - send_to_char(txt,ch); + send_to_char_bw( txt, ch ); return; } #if defined(macintosh) - send_to_char(txt,ch); + send_to_char_bw(txt,ch); #else ch->desc->showstr_head = alloc_mem(strlen(txt) + 1); strcpy(ch->desc->showstr_head,txt); @@ -2407,6 +2405,9 @@ char buf[ MAX_STRING_LENGTH * 4 ]; int skip = 0; +#if defined(macintosh) + send_to_char( txt, ch ); +#else buf[0] = '\0'; point2 = buf; if( txt && ch->desc ) @@ -2451,10 +2452,10 @@ show_string( ch->desc, "" ); } } +#endif return; } - /* string pager */ void show_string(struct descriptor_data *d, char *input) { @@ -2524,11 +2525,8 @@ act_new(format,ch,arg1,arg2,type,POS_RESTING); } -/* - * 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 ) + const void *arg2, int type, int min_pos) { static char * const he_she [] = { "it", "he", "she" }; static char * const him_her [] = { "it", "him", "her" }; @@ -2665,8 +2663,6 @@ return; } - - /* * Macintosh support functions. */ @@ -2680,70 +2676,312 @@ int colour( char type, CHAR_DATA *ch, char *string ) { + PC_DATA *col; char code[ 20 ]; char *p = '\0'; if( IS_NPC( ch ) ) return( 0 ); + col = ch->pcdata; + switch( type ) { default: - sprintf( code, CLEAR ); + strcpy( code, CLEAR ); break; case 'x': - sprintf( code, CLEAR ); + strcpy( code, CLEAR ); + break; + case 'p': + if( col->prompt[2] ) + sprintf( code, "\e[%d;3%dm%c", col->prompt[0], col->prompt[1], '\a' ); + else + sprintf( code, "\e[%d;3%dm", col->prompt[0], col->prompt[1] ); + break; + case 's': + if( col->room_title[2] ) + sprintf( code, "\e[%d;3%dm%c", + col->room_title[0], col->room_title[1], '\a' ); + else + sprintf( code, "\e[%d;3%dm", col->room_title[0], col->room_title[1] ); + break; + case 'S': + if( col->room_text[2] ) + sprintf( code, "\e[%d;3%dm%c", + col->room_text[0], col->room_text[1], '\a' ); + else + sprintf( code, "\e[%d;3%dm", col->room_text[0], col->room_text[1] ); + break; + case 'd': + if( col->gossip[2] ) + sprintf( code, "\e[%d;3%dm%c", + col->gossip[0], col->gossip[1], '\a' ); + else + sprintf( code, "\e[%d;3%dm", col->gossip[0], col->gossip[1] ); + break; + case '9': + if( col->gossip_text[2] ) + sprintf( code, "\e[%d;3%dm%c", + col->gossip_text[0], col->gossip_text[1], '\a' ); + else + sprintf( code, "\e[%d;3%dm", col->gossip_text[0], col->gossip_text[1] ); + break; + case 'Z': + if( col->wiznet[2] ) + sprintf( code, "\e[%d;3%dm%c", + col->wiznet[0], col->wiznet[1], '\a' ); + else + sprintf( code, "\e[%d;3%dm", col->wiznet[0], col->wiznet[1] ); + break; + case 'o': + if( col->room_exits[2] ) + sprintf( code, "\e[%d;3%dm%c", + col->room_exits[0], col->room_exits[1], '\a' ); + else + sprintf( code, "\e[%d;3%dm", col->room_exits[0], col->room_exits[1] ); + break; + case 'O': + if( col->room_things[2] ) + sprintf( code, "\e[%d;3%dm%c", + col->room_things[0], col->room_things[1], '\a' ); + else + sprintf( code, "\e[%d;3%dm", col->room_things[0], col->room_things[1] ); + break; + case 'i': + if( col->immtalk_text[2] ) + sprintf( code, "\e[%d;3%dm%c", + col->immtalk_text[0], col->immtalk_text[1], '\a' ); + else + sprintf( code, "\e[%d;3%dm", + col->immtalk_text[0], col->immtalk_text[1] ); + break; + case 'I': + if( col->immtalk_type[2] ) + sprintf( code, "\e[%d;3%dm%c", + col->immtalk_type[0], col->immtalk_type[1], '\a' ); + else + sprintf( code, "\e[%d;3%dm", + col->immtalk_type[0], col->immtalk_type[1] ); + break; + case '2': + if( col->fight_yhit[2] ) + sprintf( code, "\e[%d;3%dm%c", + col->fight_yhit[0], col->fight_yhit[1], '\a' ); + else + sprintf( code, "\e[%d;3%dm", col->fight_yhit[0], col->fight_yhit[1] ); + break; + case '3': + if( col->fight_ohit[2] ) + sprintf( code, "\e[%d;3%dm%c", + col->fight_ohit[0], col->fight_ohit[1], '\a' ); + else + sprintf( code, "\e[%d;3%dm", col->fight_ohit[0], col->fight_ohit[1] ); + break; + case '4': + if( col->fight_thit[2] ) + sprintf( code, "\e[%d;3%dm%c", + col->fight_thit[0], col->fight_thit[1], '\a' ); + else + sprintf( code, "\e[%d;3%dm", col->fight_thit[0], col->fight_thit[1] ); + break; + case '5': + if( col->fight_skill[2] ) + sprintf( code, "\e[%d;3%dm%c", + col->fight_skill[0], col->fight_skill[1], '\a' ); + else + sprintf( code, "\e[%d;3%dm", col->fight_skill[0], col->fight_skill[1] ); + break; + case '1': + if( col->fight_death[2] ) + sprintf( code, "\e[%d;3%dm%c", + col->fight_death[0], col->fight_death[1], '\a' ); + else + sprintf( code, "\e[%d;3%dm", col->fight_death[0], col->fight_death[1] ); + break; + case '6': + if( col->say[2] ) + sprintf( code, "\e[%d;3%dm%c", col->say[0], col->say[1], '\a' ); + else + sprintf( code, "\e[%d;3%dm", col->say[0], col->say[1] ); + break; + case '7': + if( col->say_text[2] ) + sprintf( code, "\e[%d;3%dm%c", + col->say_text[0], col->say_text[1], '\a' ); + else + sprintf( code, "\e[%d;3%dm", col->say_text[0], col->say_text[1] ); + break; + case 'k': + if( col->tell[2] ) + sprintf( code, "\e[%d;3%dm%c", col->tell[0], col->tell[1], '\a' ); + else + sprintf( code, "\e[%d;3%dm", col->tell[0], col->tell[1] ); + break; + case 'K': + if( col->tell_text[2] ) + sprintf( code, "\e[%d;3%dm%c", + col->tell_text[0], col->tell_text[1], '\a' ); + else + sprintf( code, "\e[%d;3%dm", col->tell_text[0], col->tell_text[1] ); + break; + case 'l': + if( col->reply[2] ) + sprintf( code, "\e[%d;3%dm%c", col->reply[0], col->reply[1], '\a' ); + else + sprintf( code, "\e[%d;3%dm", col->reply[0], col->reply[1] ); + break; + case 'L': + if( col->reply_text[2] ) + sprintf( code, "\e[%d;3%dm%c", + col->reply_text[0], col->reply_text[1], '\a' ); + else + sprintf( code, "\e[%d;3%dm", col->reply_text[0], col->reply_text[1] ); + break; + case 'n': + if( col->gtell_text[2] ) + sprintf( code, "\e[%d;3%dm%c", + col->gtell_text[0], col->gtell_text[1], '\a' ); + else + sprintf( code, "\e[%d;3%dm", col->gtell_text[0], col->gtell_text[1] ); + break; + case 'N': + if( col->gtell_type[2] ) + sprintf( code, "\e[%d;3%dm%c", + col->gtell_type[0], col->gtell_type[1], '\a' ); + else + sprintf( code, "\e[%d;3%dm", col->gtell_type[0], col->gtell_type[1] ); + break; + case 'a': + if( col->auction[2] ) + sprintf( code, "\e[%d;3%dm%c", + col->auction[0], col->auction[1], '\a' ); + else + sprintf( code, "\e[%d;3%dm", col->auction[0], col->auction[1] ); + break; + case 'A': + if( col->auction_text[2] ) + sprintf( code, "\e[%d;3%dm%c", + col->auction_text[0], col->auction_text[1], '\a' ); + else + sprintf( code, "\e[%d;3%dm", col->auction_text[0], col->auction_text[1] ); + break; + case 'q': + if( col->question[2] ) + sprintf( code, "\e[%d;3%dm%c", + col->question[0], col->question[1], '\a' ); + else + sprintf( code, "\e[%d;3%dm", col->question[0], col->question[1] ); + break; + case 'Q': + if( col->question_text[2] ) + sprintf( code, "\e[%d;3%dm%c", + col->question_text[0], col->question_text[1], '\a' ); + else + sprintf( code, "\e[%d;3%dm", + col->question_text[0], col->question_text[1] ); + break; + case 'f': + if( col->answer[2] ) + sprintf( code, "\e[%d;3%dm%c", + col->answer[0], col->answer[1], '\a' ); + else + sprintf( code, "\e[%d;3%dm", col->answer[0], col->answer[1] ); + break; + case 'F': + if( col->answer_text[2] ) + sprintf( code, "\e[%d;3%dm%c", + col->answer_text[0], col->answer_text[1], '\a' ); + else + sprintf( code, "\e[%d;3%dm", col->answer_text[0], col->answer_text[1] ); + break; + case 'e': + if( col->music[2] ) + sprintf( code, "\e[%d;3%dm%c", + col->music[0], col->music[1], '\a' ); + else + sprintf( code, "\e[%d;3%dm", col->music[0], col->music[1] ); + break; + case 'E': + if( col->music_text[2] ) + sprintf( code, "\e[%d;3%dm%c", + col->music_text[0], col->music_text[1], '\a' ); + else + sprintf( code, "\e[%d;3%dm", col->music_text[0], col->music_text[1] ); + break; + case 'h': + if( col->quote[2] ) + sprintf( code, "\e[%d;3%dm%c", + col->quote[0], col->quote[1], '\a' ); + else + sprintf( code, "\e[%d;3%dm", col->quote[0], col->quote[1] ); + break; + case 'H': + if( col->quote_text[2] ) + sprintf( code, "\e[%d;3%dm%c", + col->quote_text[0], col->quote_text[1], '\a' ); + else + sprintf( code, "\e[%d;3%dm", col->quote_text[0], col->quote_text[1] ); + break; + case 'j': + if( col->info[2] ) + sprintf( code, "\e[%d;3%dm%c", col->info[0], col->info[1], '\a' ); + else + sprintf( code, "\e[%d;3%dm", col->info[0], col->info[1] ); break; case 'b': - sprintf( code, C_BLUE ); + strcpy( code, C_BLUE ); break; case 'c': - sprintf( code, C_CYAN ); + strcpy( code, C_CYAN ); break; case 'g': - sprintf( code, C_GREEN ); + strcpy( code, C_GREEN ); break; case 'm': - sprintf( code, C_MAGENTA ); + strcpy( code, C_MAGENTA ); break; case 'r': - sprintf( code, C_RED ); + strcpy( code, C_RED ); break; case 'w': - sprintf( code, C_WHITE ); + strcpy( code, C_WHITE ); break; case 'y': - sprintf( code, C_YELLOW ); + strcpy( code, C_YELLOW ); break; case 'B': - sprintf( code, C_B_BLUE ); + strcpy( code, C_B_BLUE ); break; case 'C': - sprintf( code, C_B_CYAN ); + strcpy( code, C_B_CYAN ); break; case 'G': - sprintf( code, C_B_GREEN ); + strcpy( code, C_B_GREEN ); break; case 'M': - sprintf( code, C_B_MAGENTA ); + strcpy( code, C_B_MAGENTA ); break; case 'R': - sprintf( code, C_B_RED ); + strcpy( code, C_B_RED ); break; case 'W': - sprintf( code, C_B_WHITE ); + strcpy( code, C_B_WHITE ); break; case 'Y': - sprintf( code, C_B_YELLOW ); + strcpy( code, C_B_YELLOW ); break; case 'D': - sprintf( code, C_D_GREY ); + strcpy( code, C_D_GREY ); break; case '*': - sprintf( code, "%c", 007 ); + sprintf( code, "%c", '\a' ); break; case '/': - sprintf( code, "%c", 012 ); + strcpy( code, "\n\r" ); + break; + case '-': + sprintf( code, "%c", '~' ); break; case '{': sprintf( code, "%c", '{' ); @@ -2801,3 +3039,4 @@ } return; } + diff -ur rom24_colour_v1.2/src/db.c rom24_colour_v2.0/src/db.c --- rom24_colour_v1.2/src/db.c Sun May 3 20:05:35 1998 +++ rom24_colour_v2.0/src/db.c Sun May 3 18:05:22 1998 @@ -2620,7 +2620,6 @@ { bug("Attempt to recyle invalid memory of size %d.",sMem); bug((char*) pMem + sizeof(*magic),0); - abort( ); return; } @@ -2733,7 +2732,7 @@ if (argument[0] != '\0') { - send_to_char_bw("No argument is used with this command.\n\r",ch); + send_to_char("No argument is used with this command.\n\r",ch); return; } @@ -2747,7 +2746,7 @@ { sprintf( buf, "%-39s%-39s\n\r", pArea1->credits, (pArea2 != NULL) ? pArea2->credits : "" ); - send_to_char_bw( buf, ch ); + send_to_char( buf, ch ); pArea1 = pArea1->next; if ( pArea2 != NULL ) pArea2 = pArea2->next; diff -ur rom24_colour_v1.2/src/fight.c rom24_colour_v2.0/src/fight.c --- rom24_colour_v1.2/src/fight.c Sun May 3 20:04:43 1998 +++ rom24_colour_v2.0/src/fight.c Sun May 3 18:05:22 1998 @@ -2342,14 +2342,14 @@ { if (ch == victim) { - sprintf( buf1, "$n %s $melf%c",vp,punct); - sprintf( buf2, "You %s yourself%c",vs,punct); + sprintf( buf1, "{3$n %s $melf%c{x",vp,punct); + sprintf( buf2, "{2You %s yourself%c{x",vs,punct); } else { - sprintf( buf1, "$n %s $N%c", vp, punct ); - sprintf( buf2, "You %s $N%c", vs, punct ); - sprintf( buf3, "$n %s you%c", vp, punct ); + sprintf( buf1, "{3$n %s $N%c{x", vp, punct ); + sprintf( buf2, "{2You %s $N%c{x", vs, punct ); + sprintf( buf3, "{4$n %s you%c{x", vp, punct ); } } else @@ -2370,28 +2370,28 @@ { if (ch == victim) { - sprintf(buf1,"$n is unaffected by $s own %s.",attack); - sprintf(buf2,"Luckily, you are immune to that."); + sprintf(buf1,"{3$n is unaffected by $s own %s.{x",attack); + sprintf(buf2,"{2Luckily, you are immune to that.{x"); } else { - sprintf(buf1,"$N is unaffected by $n's %s!",attack); - sprintf(buf2,"$N is unaffected by your %s!",attack); - sprintf(buf3,"$n's %s is powerless against you.",attack); + sprintf(buf1,"{3$N is unaffected by $n's %s!{x",attack); + sprintf(buf2,"{2$N is unaffected by your %s!{x",attack); + sprintf(buf3,"{4$n's %s is powerless against you.{x",attack); } } else { if (ch == victim) { - sprintf( buf1, "$n's %s %s $m%c",attack,vp,punct); - sprintf( buf2, "Your %s %s you%c",attack,vp,punct); + sprintf( buf1, "{3$n's %s %s $m%c{x",attack,vp,punct); + sprintf( buf2, "{2Your %s %s you%c{x",attack,vp,punct); } else { - sprintf( buf1, "$n's %s %s $N%c", attack, vp, punct ); - sprintf( buf2, "Your %s %s $N%c", attack, vp, punct ); - sprintf( buf3, "$n's %s %s you%c", attack, vp, punct ); + sprintf( buf1, "{3$n's %s %s $N%c{x", attack, vp, punct ); + sprintf( buf2, "{2Your %s %s $N%c{x", attack, vp, punct ); + sprintf( buf3, "{4$n's %s %s you%c{x", attack, vp, punct ); } } } @@ -2426,17 +2426,17 @@ if ( IS_OBJ_STAT(obj,ITEM_NOREMOVE)) { - act("$S weapon won't budge!",ch,NULL,victim,TO_CHAR); - act("$n tries to disarm you, but your weapon won't budge!", + act("{5$S weapon won't budge!{x",ch,NULL,victim,TO_CHAR); + act("{5$n tries to disarm you, but your weapon won't budge!{x", ch,NULL,victim,TO_VICT); - act("$n tries to disarm $N, but fails.",ch,NULL,victim,TO_NOTVICT); + act("{5$n tries to disarm $N, but fails.{x",ch,NULL,victim,TO_NOTVICT); return; } - act( "$n DISARMS you and sends your weapon flying!", + act( "{5$n DISARMS you and sends your weapon flying!{x", ch, NULL, victim, TO_VICT ); - act( "You disarm $N!", ch, NULL, victim, TO_CHAR ); - act( "$n disarms $N!", ch, NULL, victim, TO_NOTVICT ); + act( "{5You disarm $N!{x", ch, NULL, victim, TO_CHAR ); + act( "{5$n disarms $N!{x", ch, NULL, victim, TO_NOTVICT ); obj_from_char( obj ); if ( IS_OBJ_STAT(obj,ITEM_NODROP) || IS_OBJ_STAT(obj,ITEM_INVENTORY) ) @@ -2628,8 +2628,8 @@ if (!IS_NPC(victim) && chance < get_skill(victim,gsn_dodge) ) { /* - act("$n tries to bash you, but you dodge it.",ch,NULL,victim,TO_VICT); - act("$N dodges your bash, you fall flat on your face.",ch,NULL,victim,TO_CHAR); + act("{5$n tries to bash you, but you dodge it.{x",ch,NULL,victim,TO_VICT); + act("{5$N dodges your bash, you fall flat on your face.{x",ch,NULL,victim,TO_CHAR); WAIT_STATE(ch,skill_table[gsn_bash].beats); return;*/ chance -= 3 * (get_skill(victim,gsn_dodge) - chance); @@ -2639,10 +2639,10 @@ if (number_percent() < chance ) { - act("$n sends you sprawling with a powerful bash!", + act("{5$n sends you sprawling with a powerful bash!{x", ch,NULL,victim,TO_VICT); - act("You slam into $N, and send $M flying!",ch,NULL,victim,TO_CHAR); - act("$n sends $N sprawling with a powerful bash.", + act("{5You slam into $N, and send $M flying!{x",ch,NULL,victim,TO_CHAR); + act("{5$n sends $N sprawling with a powerful bash.{x", ch,NULL,victim,TO_NOTVICT); check_improve(ch,gsn_bash,TRUE,1); @@ -2656,11 +2656,11 @@ else { damage(ch,victim,0,gsn_bash,DAM_BASH,FALSE); - act("You fall flat on your face!", + act("{5You fall flat on your face!{x", ch,NULL,victim,TO_CHAR); - act("$n falls flat on $s face.", + act("{5$n falls flat on $s face.{x", ch,NULL,victim,TO_NOTVICT); - act("You evade $n's bash, causing $m to fall flat on $s face.", + act("{5You evade $n's bash, causing $m to fall flat on $s face.{x", ch,NULL,victim,TO_VICT); check_improve(ch,gsn_bash,FALSE,1); ch->position = POS_RESTING; @@ -2776,10 +2776,10 @@ if (number_percent() < chance) { AFFECT_DATA af; - act("$n is blinded by the dirt in $s eyes!",victim,NULL,NULL,TO_ROOM); - act("$n kicks dirt in your eyes!",ch,NULL,victim,TO_VICT); + act("{5$n is blinded by the dirt in $s eyes!{x",victim,NULL,NULL,TO_ROOM); + act("{5$n kicks dirt in your eyes!{x",ch,NULL,victim,TO_VICT); damage(ch,victim,number_range(2,5),gsn_dirt,DAM_NONE,FALSE); - send_to_char("You can't see a thing!\n\r",victim); + send_to_char("{5You can't see a thing!{x\n\r",victim); check_improve(ch,gsn_dirt,TRUE,2); WAIT_STATE(ch,skill_table[gsn_dirt].beats); @@ -2861,9 +2861,9 @@ if (victim == ch) { - send_to_char("You fall flat on your face!\n\r",ch); + send_to_char("{5You fall flat on your face!{x\n\r",ch); WAIT_STATE(ch,2 * skill_table[gsn_trip].beats); - act("$n trips over $s own feet!",ch,NULL,NULL,TO_ROOM); + act("{5$n trips over $s own feet!{x",ch,NULL,NULL,TO_ROOM); return; } @@ -2896,9 +2896,9 @@ /* now the attack */ if (number_percent() < chance) { - act("$n trips you and you go down!",ch,NULL,victim,TO_VICT); - act("You trip $N and $N goes down!",ch,NULL,victim,TO_CHAR); - act("$n trips $N, sending $M to the ground.",ch,NULL,victim,TO_NOTVICT); + act("{5$n trips you and you go down!{x",ch,NULL,victim,TO_VICT); + act("{5You trip $N and $N goes down!{x",ch,NULL,victim,TO_CHAR); + act("{5$n trips $N, sending $M to the ground.{x",ch,NULL,victim,TO_NOTVICT); check_improve(ch,gsn_trip,TRUE,1); DAZE_STATE(victim,2 * PULSE_VIOLENCE); @@ -3250,9 +3250,9 @@ return; } - act( "You rescue $N!", ch, NULL, victim, TO_CHAR ); - act( "$n rescues you!", ch, NULL, victim, TO_VICT ); - act( "$n rescues $N!", ch, NULL, victim, TO_NOTVICT ); + act( "{5You rescue $N!{x", ch, NULL, victim, TO_CHAR ); + act( "{5$n rescues you!{x", ch, NULL, victim, TO_VICT ); + act( "{5$n rescues $N!{x", ch, NULL, victim, TO_NOTVICT ); check_improve(ch,gsn_rescue,TRUE,1); stop_fighting( fch, FALSE ); @@ -3371,9 +3371,9 @@ else { WAIT_STATE(ch,skill_table[gsn_disarm].beats); - act("You fail to disarm $N.",ch,NULL,victim,TO_CHAR); - act("$n tries to disarm you, but fails.",ch,NULL,victim,TO_VICT); - act("$n tries to disarm $N, but fails.",ch,NULL,victim,TO_NOTVICT); + act("{5You fail to disarm $N.{x",ch,NULL,victim,TO_CHAR); + act("{5$n tries to disarm you, but fails.{x",ch,NULL,victim,TO_VICT); + act("{5$n tries to disarm $N, but fails.{x",ch,NULL,victim,TO_NOTVICT); check_improve(ch,gsn_disarm,FALSE,1); } check_killer(ch,victim); @@ -3420,9 +3420,9 @@ return; } - act( "You slay $M in cold blood!", ch, NULL, victim, TO_CHAR ); - act( "$n slays you in cold blood!", ch, NULL, victim, TO_VICT ); - act( "$n slays $N in cold blood!", ch, NULL, victim, TO_NOTVICT ); + act( "{1You slay $M in cold blood!{x", ch, NULL, victim, TO_CHAR ); + act( "{1$n slays you in cold blood!{x", ch, NULL, victim, TO_VICT ); + act( "{1$n slays $N in cold blood!{x", ch, NULL, victim, TO_NOTVICT ); raw_kill( victim ); return; } diff -ur rom24_colour_v1.2/src/handler.c rom24_colour_v2.0/src/handler.c --- rom24_colour_v1.2/src/handler.c Sun May 3 20:05:35 1998 +++ rom24_colour_v2.0/src/handler.c Sun May 3 20:26:30 1998 @@ -2691,7 +2691,6 @@ 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"); } @@ -2909,4 +2908,300 @@ if (off_flags & ASSIST_VNUM ) strcat(buf, " assist_vnum"); return ( buf[0] != '\0' ) ? buf+1 : "none"; +} + +/* + * Config Colour stuff + */ +void default_colour( CHAR_DATA *ch ) +{ + if( IS_NPC( ch ) ) + return; + + if( !ch->pcdata ) + return; + + ch->pcdata->text[1] = ( WHITE ); + ch->pcdata->auction[1] = ( YELLOW ); + ch->pcdata->auction_text[1] = ( WHITE ); + ch->pcdata->gossip[1] = ( MAGENTA ); + ch->pcdata->gossip_text[1] = ( MAGENTA ); + ch->pcdata->music[1] = ( RED ); + ch->pcdata->music_text[1] = ( RED ); + ch->pcdata->question[1] = ( YELLOW ); + ch->pcdata->question_text[1] = ( WHITE ); + ch->pcdata->answer[1] = ( YELLOW ); + ch->pcdata->answer_text[1] = ( WHITE ); + ch->pcdata->quote[1] = ( GREEN ); + ch->pcdata->quote_text[1] = ( GREEN ); + ch->pcdata->immtalk_text[1] = ( CYAN ); + ch->pcdata->immtalk_type[1] = ( YELLOW ); + ch->pcdata->info[1] = ( YELLOW ); + ch->pcdata->tell[1] = ( GREEN ); + ch->pcdata->tell_text[1] = ( GREEN ); + ch->pcdata->say[1] = ( GREEN ); + ch->pcdata->say_text[1] = ( GREEN ); + ch->pcdata->reply[1] = ( GREEN ); + ch->pcdata->reply_text[1] = ( GREEN ); + ch->pcdata->gtell_text[1] = ( GREEN ); + ch->pcdata->gtell_type[1] = ( RED ); + ch->pcdata->wiznet[1] = ( GREEN ); + ch->pcdata->room_title[1] = ( CYAN ); + ch->pcdata->room_text[1] = ( WHITE ); + ch->pcdata->room_exits[1] = ( GREEN ); + ch->pcdata->room_things[1] = ( CYAN ); + ch->pcdata->prompt[1] = ( CYAN ); + ch->pcdata->fight_death[1] = ( RED ); + ch->pcdata->fight_yhit[1] = ( GREEN ); + ch->pcdata->fight_ohit[1] = ( YELLOW ); + ch->pcdata->fight_thit[1] = ( RED ); + ch->pcdata->fight_skill[1] = ( WHITE ); + ch->pcdata->text[0] = ( NORMAL ); + ch->pcdata->auction[0] = ( BRIGHT ); + ch->pcdata->auction_text[0] = ( BRIGHT ); + ch->pcdata->gossip[0] = ( NORMAL ); + ch->pcdata->gossip_text[0] = ( BRIGHT ); + ch->pcdata->music[0] = ( NORMAL ); + ch->pcdata->music_text[0] = ( BRIGHT ); + ch->pcdata->question[0] = ( BRIGHT ); + ch->pcdata->question_text[0] = ( BRIGHT ); + ch->pcdata->answer[0] = ( BRIGHT ); + ch->pcdata->answer_text[0] = ( BRIGHT ); + ch->pcdata->quote[0] = ( NORMAL ); + ch->pcdata->quote_text[0] = ( BRIGHT ); + ch->pcdata->immtalk_text[0] = ( NORMAL ); + ch->pcdata->immtalk_type[0] = ( NORMAL ); + ch->pcdata->info[0] = ( NORMAL ); + ch->pcdata->say[0] = ( NORMAL ); + ch->pcdata->say_text[0] = ( BRIGHT ); + ch->pcdata->tell[0] = ( NORMAL ); + ch->pcdata->tell_text[0] = ( BRIGHT ); + ch->pcdata->reply[0] = ( NORMAL ); + ch->pcdata->reply_text[0] = ( BRIGHT ); + ch->pcdata->gtell_text[0] = ( NORMAL ); + ch->pcdata->gtell_type[0] = ( NORMAL ); + ch->pcdata->wiznet[0] = ( NORMAL ); + ch->pcdata->room_title[0] = ( NORMAL ); + ch->pcdata->room_text[0] = ( NORMAL ); + ch->pcdata->room_exits[0] = ( NORMAL ); + ch->pcdata->room_things[0] = ( NORMAL ); + ch->pcdata->prompt[0] = ( NORMAL ); + ch->pcdata->fight_death[0] = ( NORMAL ); + ch->pcdata->fight_yhit[0] = ( NORMAL ); + ch->pcdata->fight_ohit[0] = ( NORMAL ); + ch->pcdata->fight_thit[0] = ( NORMAL ); + ch->pcdata->fight_skill[0] = ( NORMAL ); + ch->pcdata->text[2] = 0; + ch->pcdata->auction[2] = 0; + ch->pcdata->auction_text[2] = 0; + ch->pcdata->gossip[2] = 0; + ch->pcdata->gossip_text[2] = 0; + ch->pcdata->music[2] = 0; + ch->pcdata->music_text[2] = 0; + ch->pcdata->question[2] = 0; + ch->pcdata->question_text[2] = 0; + ch->pcdata->answer[2] = 0; + ch->pcdata->answer_text[2] = 0; + ch->pcdata->quote[2] = 0; + ch->pcdata->quote_text[2] = 0; + ch->pcdata->immtalk_text[2] = 0; + ch->pcdata->immtalk_type[2] = 0; + ch->pcdata->info[2] = 1; + ch->pcdata->say[2] = 0; + ch->pcdata->say_text[2] = 0; + ch->pcdata->tell[2] = 0; + ch->pcdata->tell_text[2] = 0; + ch->pcdata->reply[2] = 0; + ch->pcdata->reply_text[2] = 0; + ch->pcdata->gtell_text[2] = 0; + ch->pcdata->gtell_type[2] = 0; + ch->pcdata->wiznet[2] = 0; + ch->pcdata->room_title[2] = 0; + ch->pcdata->room_text[2] = 0; + ch->pcdata->room_exits[2] = 0; + ch->pcdata->room_things[2] = 0; + ch->pcdata->prompt[2] = 0; + ch->pcdata->fight_death[2] = 0; + ch->pcdata->fight_yhit[2] = 0; + ch->pcdata->fight_ohit[2] = 0; + ch->pcdata->fight_thit[2] = 0; + ch->pcdata->fight_skill[2] = 0; + + return; +} + +void all_colour( CHAR_DATA *ch, char *argument ) +{ + char buf[ 100 ]; + char buf2[ 100 ]; + int colour; + int bright; + + if( IS_NPC( ch ) || !ch->pcdata ) + return; + + if( !*argument ) + return; + + if( !str_prefix( argument, "red" ) ) + { + colour = ( RED ); + bright = NORMAL; + sprintf( buf2, "Red" ); + } + if( !str_prefix( argument, "hi-red" ) ) + { + colour = ( RED ); + bright = BRIGHT; + sprintf( buf2, "Red" ); + } + else if( !str_prefix( argument, "green" ) ) + { + colour = ( GREEN ); + bright = NORMAL; + sprintf( buf2, "Green" ); + } + else if( !str_prefix( argument, "hi-green" ) ) + { + colour = ( GREEN ); + bright = BRIGHT; + sprintf( buf2, "Green" ); + } + else if( !str_prefix( argument, "yellow" ) ) + { + colour = ( YELLOW ); + bright = NORMAL; + sprintf( buf2, "Yellow" ); + } + else if( !str_prefix( argument, "hi-yellow" ) ) + { + colour = ( YELLOW ); + bright = BRIGHT; + sprintf( buf2, "Yellow" ); + } + else if( !str_prefix( argument, "blue" ) ) + { + colour = ( BLUE ); + bright = NORMAL; + sprintf( buf2, "Blue" ); + } + else if( !str_prefix( argument, "hi-blue" ) ) + { + colour = ( BLUE ); + bright = BRIGHT; + sprintf( buf2, "Blue" ); + } + else if( !str_prefix( argument, "magenta" ) ) + { + colour = ( MAGENTA ); + bright = NORMAL; + sprintf( buf2, "Magenta" ); + } + else if( !str_prefix( argument, "hi-magenta" ) ) + { + colour = ( MAGENTA ); + bright = BRIGHT; + sprintf( buf2, "Magenta" ); + } + else if( !str_prefix( argument, "cyan" ) ) + { + colour = ( CYAN ); + bright = NORMAL; + sprintf( buf2, "Cyan" ); + } + else if( !str_prefix( argument, "hi-cyan" ) ) + { + colour = ( CYAN ); + bright = BRIGHT; + sprintf( buf2, "Cyan" ); + } + else if( !str_prefix( argument, "white" ) ) + { + colour = ( WHITE ); + bright = NORMAL; + sprintf( buf2, "White" ); + } + else if( !str_prefix( argument, "hi-white" ) ) + { + colour = ( WHITE ); + bright = BRIGHT; + sprintf( buf2, "White" ); + } + else if( !str_prefix( argument, "grey" ) ) + { + colour = ( BLACK ); + bright = BRIGHT; + sprintf( buf2, "White" ); + } + else + { + send_to_char_bw( "Unrecognised colour, unchanged.\n\r", ch ); + return; + } + + ch->pcdata->text[1] = colour; + ch->pcdata->auction[1] = colour; + ch->pcdata->gossip[1] = colour; + ch->pcdata->music[1] = colour; + ch->pcdata->question[1] = colour; + ch->pcdata->answer[1] = colour; + ch->pcdata->quote[1] = colour; + ch->pcdata->quote_text[1] = colour; + ch->pcdata->immtalk_text[1] = colour; + ch->pcdata->immtalk_type[1] = colour; + ch->pcdata->info[1] = colour; + ch->pcdata->say[1] = colour; + ch->pcdata->say_text[1] = colour; + ch->pcdata->tell[1] = colour; + ch->pcdata->tell_text[1] = colour; + ch->pcdata->reply[1] = colour; + ch->pcdata->reply_text[1] = colour; + ch->pcdata->gtell_text[1] = colour; + ch->pcdata->gtell_type[1] = colour; + ch->pcdata->wiznet[1] = colour; + ch->pcdata->room_title[1] = colour; + ch->pcdata->room_text[1] = colour; + ch->pcdata->room_exits[1] = colour; + ch->pcdata->room_things[1] = colour; + ch->pcdata->prompt[1] = colour; + ch->pcdata->fight_death[1] = colour; + ch->pcdata->fight_yhit[1] = colour; + ch->pcdata->fight_ohit[1] = colour; + ch->pcdata->fight_thit[1] = colour; + ch->pcdata->fight_skill[1] = colour; + ch->pcdata->text[0] = bright; + ch->pcdata->auction[0] = bright; + ch->pcdata->gossip[0] = bright; + ch->pcdata->music[0] = bright; + ch->pcdata->question[0] = bright; + ch->pcdata->answer[0] = bright; + ch->pcdata->quote[0] = bright; + ch->pcdata->quote_text[0] = bright; + ch->pcdata->immtalk_text[0] = bright; + ch->pcdata->immtalk_type[0] = bright; + ch->pcdata->info[0] = bright; + ch->pcdata->say[0] = bright; + ch->pcdata->say_text[0] = bright; + ch->pcdata->tell[0] = bright; + ch->pcdata->tell_text[0] = bright; + ch->pcdata->reply[0] = bright; + ch->pcdata->reply_text[0] = bright; + ch->pcdata->gtell_text[0] = bright; + ch->pcdata->gtell_type[0] = bright; + ch->pcdata->wiznet[0] = bright; + ch->pcdata->room_title[0] = bright; + ch->pcdata->room_text[0] = bright; + ch->pcdata->room_exits[0] = bright; + ch->pcdata->room_things[0] = bright; + ch->pcdata->prompt[0] = bright; + ch->pcdata->fight_death[0] = bright; + ch->pcdata->fight_yhit[0] = bright; + ch->pcdata->fight_ohit[0] = bright; + ch->pcdata->fight_thit[0] = bright; + ch->pcdata->fight_skill[0] = bright; + + sprintf( buf, "All Colour settings set to %s.\n\r", buf2 ); + send_to_char_bw( buf, ch ); + + return; } diff -ur rom24_colour_v1.2/src/interp.c rom24_colour_v2.0/src/interp.c --- rom24_colour_v1.2/src/interp.c Sun May 3 20:05:35 1998 +++ rom24_colour_v2.0/src/interp.c Sun May 3 18:35:47 1998 @@ -158,6 +158,7 @@ { "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 }, + { "color", 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 -ur rom24_colour_v1.2/src/interp.h rom24_colour_v2.0/src/interp.h --- rom24_colour_v1.2/src/interp.h Sun May 3 20:05:35 1998 +++ rom24_colour_v2.0/src/interp.h Sun May 3 18:38:23 1998 @@ -95,7 +95,7 @@ DECLARE_DO_FUN( do_channels ); DECLARE_DO_FUN( do_clone ); DECLARE_DO_FUN( do_close ); -DECLARE_DO_FUN( do_colour ); /* Colour Command By Lope */ +DECLARE_DO_FUN( do_colour ); DECLARE_DO_FUN( do_commands ); DECLARE_DO_FUN( do_combine ); DECLARE_DO_FUN( do_compact ); diff -ur rom24_colour_v1.2/src/merc.h rom24_colour_v2.0/src/merc.h --- rom24_colour_v1.2/src/merc.h Sun May 3 20:05:35 1998 +++ rom24_colour_v2.0/src/merc.h Sun May 3 20:23:00 1998 @@ -99,6 +99,7 @@ typedef struct shop_data SHOP_DATA; typedef struct time_info_data TIME_INFO_DATA; typedef struct weather_data WEATHER_DATA; +typedef struct colour_data COLOUR_DATA; @@ -159,24 +160,146 @@ #define HERO LEVEL_HERO /* - * Colour stuff by Lope of Loping Through The MUD + * ColoUr stuff v2.0, by Lope. */ -#define CLEAR "[0m" /* Resets Colour */ -#define C_RED "[0;31m" /* Normal Colours */ -#define C_GREEN "[0;32m" -#define C_YELLOW "[0;33m" -#define C_BLUE "[0;34m" -#define C_MAGENTA "[0;35m" -#define C_CYAN "[0;36m" -#define C_WHITE "[0;37m" -#define C_D_GREY "[1;30m" /* Light Colors */ -#define C_B_RED "[1;31m" -#define C_B_GREEN "[1;32m" -#define C_B_YELLOW "[1;33m" -#define C_B_BLUE "[1;34m" -#define C_B_MAGENTA "[1;35m" -#define C_B_CYAN "[1;36m" -#define C_B_WHITE "[1;37m" +#define CLEAR "\e[0m" /* Resets Colour */ +#define C_RED "\e[0;31m" /* Normal Colours */ +#define C_GREEN "\e[0;32m" +#define C_YELLOW "\e[0;33m" +#define C_BLUE "\e[0;34m" +#define C_MAGENTA "\e[0;35m" +#define C_CYAN "\e[0;36m" +#define C_WHITE "\e[0;37m" +#define C_D_GREY "\e[1;30m" /* Light Colors */ +#define C_B_RED "\e[1;31m" +#define C_B_GREEN "\e[1;32m" +#define C_B_YELLOW "\e[1;33m" +#define C_B_BLUE "\e[1;34m" +#define C_B_MAGENTA "\e[1;35m" +#define C_B_CYAN "\e[1;36m" +#define C_B_WHITE "\e[1;37m" + +#define COLOUR_NONE 7 /* White, hmm... */ +#define RED 1 /* Normal Colours */ +#define GREEN 2 +#define YELLOW 3 +#define BLUE 4 +#define MAGENTA 5 +#define CYAN 6 +#define WHITE 7 +#define BLACK 0 + +#define NORMAL 0 /* Bright/Normal colours */ +#define BRIGHT 1 + +#define ALTER_COLOUR( type ) if( !str_prefix( argument, "red" ) ) \ + { \ + ch->pcdata->type[0] = NORMAL; \ + ch->pcdata->type[1] = RED; \ + } \ + else if( !str_prefix( argument, "hi-red" ) ) \ + { \ + ch->pcdata->type[0] = BRIGHT; \ + ch->pcdata->type[1] = RED; \ + } \ + else if( !str_prefix( argument, "green" ) ) \ + { \ + ch->pcdata->type[0] = NORMAL; \ + ch->pcdata->type[1] = GREEN; \ + } \ + else if( !str_prefix( argument, "hi-green" ) ) \ + { \ + ch->pcdata->type[0] = BRIGHT; \ + ch->pcdata->type[1] = GREEN; \ + } \ + else if( !str_prefix( argument, "yellow" ) ) \ + { \ + ch->pcdata->type[0] = NORMAL; \ + ch->pcdata->type[1] = YELLOW; \ + } \ + else if( !str_prefix( argument, "hi-yellow" ) ) \ + { \ + ch->pcdata->type[0] = BRIGHT; \ + ch->pcdata->type[1] = YELLOW; \ + } \ + else if( !str_prefix( argument, "blue" ) ) \ + { \ + ch->pcdata->type[0] = NORMAL; \ + ch->pcdata->type[1] = BLUE; \ + } \ + else if( !str_prefix( argument, "hi-blue" ) ) \ + { \ + ch->pcdata->type[0] = BRIGHT; \ + ch->pcdata->type[1] = BLUE; \ + } \ + else if( !str_prefix( argument, "magenta" ) ) \ + { \ + ch->pcdata->type[0] = NORMAL; \ + ch->pcdata->type[1] = MAGENTA; \ + } \ + else if( !str_prefix( argument, "hi-magenta" ) ) \ + { \ + ch->pcdata->type[0] = BRIGHT; \ + ch->pcdata->type[1] = MAGENTA; \ + } \ + else if( !str_prefix( argument, "cyan" ) ) \ + { \ + ch->pcdata->type[0] = NORMAL; \ + ch->pcdata->type[1] = CYAN; \ + } \ + else if( !str_prefix( argument, "hi-cyan" ) ) \ + { \ + ch->pcdata->type[0] = BRIGHT; \ + ch->pcdata->type[1] = CYAN; \ + } \ + else if( !str_prefix( argument, "white" ) ) \ + { \ + ch->pcdata->type[0] = NORMAL; \ + ch->pcdata->type[1] = WHITE; \ + } \ + else if( !str_prefix( argument, "hi-white" ) ) \ + { \ + ch->pcdata->type[0] = BRIGHT; \ + ch->pcdata->type[1] = WHITE; \ + } \ + else if( !str_prefix( argument, "grey" ) ) \ + { \ + ch->pcdata->type[0] = BRIGHT; \ + ch->pcdata->type[1] = BLACK; \ + } \ + else if( !str_prefix( argument, "beep" ) ) \ + { \ + ch->pcdata->type[2] = 1; \ + } \ + else if( !str_prefix( argument, "nobeep" ) ) \ + { \ + ch->pcdata->type[2] = 0; \ + } \ + else \ + { \ + send_to_char_bw( "Unrecognised colour, unchanged.\n\r", ch ); \ + return; \ + } + +#define LOAD_COLOUR( field ) ch->pcdata->field[1] = fread_number( fp ); \ + if( ch->pcdata->field[1] > 100 ) \ + { \ + ch->pcdata->field[1] -= 100; \ + ch->pcdata->field[2] = 1; \ + } \ + else \ + { \ + ch->pcdata->field[2] = 0; \ + } \ + if( ch->pcdata->field[1] > 10 ) \ + { \ + ch->pcdata->field[1] -= 10; \ + ch->pcdata->field[0] = 1; \ + } \ + else \ + { \ + ch->pcdata->field[0] = 0; \ + } /* @@ -1248,10 +1371,7 @@ #define PLR_CANLOOT (P) #define PLR_NOSUMMON (Q) #define PLR_NOFOLLOW (R) -/* - * Colour stuff by Lope of Loping Through The MUD - */ -#define PLR_COLOUR (T) /* Colour Flag By Lope */ +#define PLR_COLOUR (T) /* 1 bit reserved, S */ /* penalty flags */ @@ -1477,6 +1597,7 @@ { PC_DATA * next; BUFFER * buffer; + COLOUR_DATA * code; /* Data for coloUr configuration */ bool valid; char * pwd; char * bamfin; @@ -1499,6 +1620,45 @@ bool confirm_delete; char * alias[MAX_ALIAS]; char * alias_sub[MAX_ALIAS]; + + /* + * Colour data stuff for config. + */ + int text[3]; /* {t */ + int auction[3]; /* {a */ + int auction_text[3]; /* {A */ + int gossip[3]; /* {d */ + int gossip_text[3]; /* {9 */ + int music[3]; /* {e */ + int music_text[3]; /* {E */ + int question[3]; /* {q */ + int question_text[3]; /* {Q */ + int answer[3]; /* {f */ + int answer_text[3]; /* {F */ + int quote[3]; /* {h */ + int quote_text[3]; /* {H */ + int immtalk_text[3]; /* {i */ + int immtalk_type[3]; /* {I */ + int info[3]; /* {j */ + int say[3]; /* {6 */ + int say_text[3]; /* {7 */ + int tell[3]; /* {k */ + int tell_text[3]; /* {K */ + int reply[3]; /* {l */ + int reply_text[3]; /* {L */ + int gtell_text[3]; /* {n */ + int gtell_type[3]; /* {N */ + int wiznet[3]; /* {B */ + int room_title[3]; /* {s */ + int room_text[3]; /* {S */ + int room_exits[3]; /* {o */ + int room_things[3]; /* {O */ + int prompt[3]; /* {p */ + int fight_death[3]; /* {1 */ + int fight_yhit[3]; /* {2 */ + int fight_ohit[3]; /* {3 */ + int fight_thit[3]; /* {4 */ + int fight_skill[3]; /* {5 */ }; /* Data for generating characters -- only used during generation */ @@ -2139,7 +2299,7 @@ const void *arg1, const void *arg2, int type, int min_pos) ); /* - * Colour stuff by Lope of Loping Through The MUD + * Colour stuff by Lope */ int colour args( ( char type, CHAR_DATA *ch, char *string ) ); void colourconv args( ( char *buffer, const char *txt, CHAR_DATA *ch ) ); @@ -2300,6 +2460,11 @@ char * weapon_bit_name args( ( int weapon_flags ) ); char * comm_bit_name args( ( int comm_flags ) ); char * cont_bit_name args( ( int cont_flags) ); +/* + * Colour Config + */ +void default_colour args( ( CHAR_DATA *ch ) ); +void all_colour args( ( CHAR_DATA *ch, char *argument ) ); /* interp.c */ diff -ur rom24_colour_v1.2/src/recycle.c rom24_colour_v2.0/src/recycle.c --- rom24_colour_v1.2/src/recycle.c Sun May 3 20:04:43 1998 +++ rom24_colour_v2.0/src/recycle.c Sun May 3 18:05:22 1998 @@ -639,15 +639,3 @@ { return buffer->string; } - - - - - - - - - - - - diff -ur rom24_colour_v1.2/src/save.c rom24_colour_v2.0/src/save.c --- rom24_colour_v1.2/src/save.c Sun May 3 20:05:35 1998 +++ rom24_colour_v2.0/src/save.c Sun May 3 20:26:56 1998 @@ -178,7 +178,9 @@ fprintf( fp, "LnD %s~\n", ch->long_descr ); if (ch->description[0] != '\0') fprintf( fp, "Desc %s~\n", ch->description ); - if (ch->prompt != NULL || !str_cmp(ch->prompt,"<%hhp %mm %vmv> ")) + if( ch->prompt != NULL + || !str_cmp( ch->prompt,"<%hhp %mm %vmv> " ) + || !str_cmp( ch->prompt,"{c<%hhp %mm %vmv>{x " ) ) fprintf( fp, "Prom %s~\n", ch->prompt ); fprintf( fp, "Race %s~\n", pc_race_table[ch->race].name ); if (ch->clan) @@ -277,6 +279,122 @@ ch->pcdata->condition[2], ch->pcdata->condition[3] ); + /* + * Write Colour Config Information. + */ + fprintf( fp, "Coloura %d%d%d %d%d%d %d%d%d %d%d%d %d%d%d\n", + ch->pcdata->text[2], + ch->pcdata->text[0], + ch->pcdata->text[1], + ch->pcdata->auction[2], + ch->pcdata->auction[0], + ch->pcdata->auction[1], + ch->pcdata->gossip[2], + ch->pcdata->gossip[0], + ch->pcdata->gossip[1], + ch->pcdata->music[2], + ch->pcdata->music[0], + ch->pcdata->music[1], + ch->pcdata->question[2], + ch->pcdata->question[0], + ch->pcdata->question[1] ); + fprintf( fp, "Colourb %d%d%d %d%d%d %d%d%d %d%d%d %d%d%d\n", + ch->pcdata->answer[2], + ch->pcdata->answer[0], + ch->pcdata->answer[1], + ch->pcdata->quote[2], + ch->pcdata->quote[0], + ch->pcdata->quote[1], + ch->pcdata->quote_text[2], + ch->pcdata->quote_text[0], + ch->pcdata->quote_text[1], + ch->pcdata->immtalk_text[2], + ch->pcdata->immtalk_text[0], + ch->pcdata->immtalk_text[1], + ch->pcdata->immtalk_type[2], + ch->pcdata->immtalk_type[0], + ch->pcdata->immtalk_type[1] ); + fprintf( fp, "Colourc %d%d%d %d%d%d %d%d%d %d%d%d %d%d%d\n", + ch->pcdata->info[2], + ch->pcdata->info[0], + ch->pcdata->info[1], + ch->pcdata->tell[2], + ch->pcdata->tell[0], + ch->pcdata->tell[1], + ch->pcdata->reply[2], + ch->pcdata->reply[0], + ch->pcdata->reply[1], + ch->pcdata->gtell_text[2], + ch->pcdata->gtell_text[0], + ch->pcdata->gtell_text[1], + ch->pcdata->gtell_type[2], + ch->pcdata->gtell_type[0], + ch->pcdata->gtell_type[1] ); + fprintf( fp, "Colourd %d%d%d %d%d%d %d%d%d %d%d%d %d%d%d\n", + ch->pcdata->room_title[2], + ch->pcdata->room_title[0], + ch->pcdata->room_title[1], + ch->pcdata->room_text[2], + ch->pcdata->room_text[0], + ch->pcdata->room_text[1], + ch->pcdata->room_exits[2], + ch->pcdata->room_exits[0], + ch->pcdata->room_exits[1], + ch->pcdata->room_things[2], + ch->pcdata->room_things[0], + ch->pcdata->room_things[1], + ch->pcdata->prompt[2], + ch->pcdata->prompt[0], + ch->pcdata->prompt[1] ); + fprintf( fp, "Coloure %d%d%d %d%d%d %d%d%d %d%d%d %d%d%d\n", + ch->pcdata->fight_death[2], + ch->pcdata->fight_death[0], + ch->pcdata->fight_death[1], + ch->pcdata->fight_yhit[2], + ch->pcdata->fight_yhit[0], + ch->pcdata->fight_yhit[1], + ch->pcdata->fight_ohit[2], + ch->pcdata->fight_ohit[0], + ch->pcdata->fight_ohit[1], + ch->pcdata->fight_thit[2], + ch->pcdata->fight_thit[0], + ch->pcdata->fight_thit[1], + ch->pcdata->fight_skill[2], + ch->pcdata->fight_skill[0], + ch->pcdata->fight_skill[1] ); + fprintf( fp, "Colourf %d%d%d %d%d%d %d%d%d %d%d%d %d%d%d\n", + ch->pcdata->wiznet[2], + ch->pcdata->wiznet[0], + ch->pcdata->wiznet[1], + ch->pcdata->say[2], + ch->pcdata->say[0], + ch->pcdata->say[1], + ch->pcdata->say_text[2], + ch->pcdata->say_text[0], + ch->pcdata->say_text[1], + ch->pcdata->tell_text[2], + ch->pcdata->tell_text[0], + ch->pcdata->tell_text[1], + ch->pcdata->reply_text[2], + ch->pcdata->reply_text[0], + ch->pcdata->reply_text[1] ); + fprintf( fp, "Colourg %d%d%d %d%d%d %d%d%d %d%d%d %d%d%d\n", + ch->pcdata->auction_text[2], + ch->pcdata->auction_text[0], + ch->pcdata->auction_text[1], + ch->pcdata->gossip_text[2], + ch->pcdata->gossip_text[0], + ch->pcdata->gossip_text[1], + ch->pcdata->music_text[2], + ch->pcdata->music_text[0], + ch->pcdata->music_text[1], + ch->pcdata->question_text[2], + ch->pcdata->question_text[0], + ch->pcdata->question_text[1], + ch->pcdata->answer_text[2], + ch->pcdata->answer_text[0], + ch->pcdata->answer_text[1] ); + /* write alias */ for (pos = 0; pos < MAX_ALIAS; pos++) { @@ -556,7 +674,7 @@ ch->act = PLR_NOSUMMON; ch->comm = COMM_COMBINE | COMM_PROMPT; - ch->prompt = str_dup( "{c<%hhp %mm %vmv>{x " ); + ch->prompt = str_dup("<%hhp %mm %vmv> "); ch->pcdata->confirm_delete = FALSE; ch->pcdata->pwd = str_dup( "" ); ch->pcdata->bamfin = str_dup( "" ); @@ -568,6 +686,112 @@ ch->pcdata->condition[COND_FULL] = 48; ch->pcdata->condition[COND_HUNGER] = 48; + ch->pcdata->text[0] = ( NORMAL ); + ch->pcdata->text[1] = ( WHITE ); + ch->pcdata->text[2] = 0; + ch->pcdata->auction[0] = ( BRIGHT ); + ch->pcdata->auction[1] = ( YELLOW ); + ch->pcdata->auction[2] = 0; + ch->pcdata->auction_text[0] = ( BRIGHT ); + ch->pcdata->auction_text[1] = ( WHITE ); + ch->pcdata->auction_text[2] = 0; + ch->pcdata->gossip[0] = ( NORMAL ); + ch->pcdata->gossip[1] = ( MAGENTA ); + ch->pcdata->gossip[2] = 0; + ch->pcdata->gossip_text[0] = ( BRIGHT ); + ch->pcdata->gossip_text[1] = ( MAGENTA ); + ch->pcdata->gossip_text[2] = 0; + ch->pcdata->music[0] = ( NORMAL ); + ch->pcdata->music[1] = ( RED ); + ch->pcdata->music[2] = 0; + ch->pcdata->music_text[0] = ( BRIGHT ); + ch->pcdata->music_text[1] = ( RED ); + ch->pcdata->music_text[2] = 0; + ch->pcdata->question[0] = ( BRIGHT ); + ch->pcdata->question[1] = ( YELLOW ); + ch->pcdata->question[2] = 0; + ch->pcdata->question_text[0] = ( BRIGHT ); + ch->pcdata->question_text[1] = ( WHITE ); + ch->pcdata->question_text[2] = 0; + ch->pcdata->answer[0] = ( BRIGHT ); + ch->pcdata->answer[1] = ( YELLOW ); + ch->pcdata->answer[2] = 0; + ch->pcdata->answer_text[0] = ( BRIGHT ); + ch->pcdata->answer_text[1] = ( WHITE ); + ch->pcdata->answer_text[2] = 0; + ch->pcdata->quote[0] = ( NORMAL ); + ch->pcdata->quote[1] = ( YELLOW ); + ch->pcdata->quote[2] = 0; + ch->pcdata->quote_text[0] = ( NORMAL ); + ch->pcdata->quote_text[1] = ( GREEN ); + ch->pcdata->quote_text[2] = 0; + ch->pcdata->immtalk_text[0] = ( NORMAL ); + ch->pcdata->immtalk_text[1] = ( CYAN ); + ch->pcdata->immtalk_text[2] = 0; + ch->pcdata->immtalk_type[0] = ( NORMAL ); + ch->pcdata->immtalk_type[1] = ( YELLOW ); + ch->pcdata->immtalk_type[2] = 0; + ch->pcdata->info[0] = ( BRIGHT ); + ch->pcdata->info[1] = ( YELLOW ); + ch->pcdata->info[2] = 1; + ch->pcdata->say[0] = ( NORMAL ); + ch->pcdata->say[1] = ( GREEN ); + ch->pcdata->say[2] = 0; + ch->pcdata->say_text[0] = ( BRIGHT ); + ch->pcdata->say_text[1] = ( GREEN ); + ch->pcdata->say_text[2] = 0; + ch->pcdata->tell[0] = ( NORMAL ); + ch->pcdata->tell[1] = ( GREEN ); + ch->pcdata->tell[2] = 0; + ch->pcdata->tell_text[0] = ( BRIGHT ); + ch->pcdata->tell_text[1] = ( GREEN ); + ch->pcdata->tell_text[2] = 0; + ch->pcdata->reply[0] = ( NORMAL ); + ch->pcdata->reply[1] = ( GREEN ); + ch->pcdata->reply[2] = 0; + ch->pcdata->reply_text[0] = ( BRIGHT ); + ch->pcdata->reply_text[1] = ( GREEN ); + ch->pcdata->reply_text[2] = 0; + ch->pcdata->gtell_text[0] = ( NORMAL ); + ch->pcdata->gtell_text[1] = ( GREEN ); + ch->pcdata->gtell_text[2] = 0; + ch->pcdata->gtell_type[0] = ( NORMAL ); + ch->pcdata->gtell_type[1] = ( RED ); + ch->pcdata->gtell_type[2] = 0; + ch->pcdata->wiznet[0] = ( NORMAL ); + ch->pcdata->wiznet[1] = ( GREEN ); + ch->pcdata->wiznet[2] = 0; + ch->pcdata->room_title[0] = ( NORMAL ); + ch->pcdata->room_title[1] = ( CYAN ); + ch->pcdata->room_title[2] = 0; + ch->pcdata->room_text[0] = ( NORMAL ); + ch->pcdata->room_text[1] = ( WHITE ); + ch->pcdata->room_text[2] = 0; + ch->pcdata->room_exits[0] = ( NORMAL ); + ch->pcdata->room_exits[1] = ( GREEN ); + ch->pcdata->room_exits[2] = 0; + ch->pcdata->room_things[0] = ( NORMAL ); + ch->pcdata->room_things[1] = ( CYAN ); + ch->pcdata->room_things[2] = 0; + ch->pcdata->prompt[0] = ( NORMAL ); + ch->pcdata->prompt[1] = ( CYAN ); + ch->pcdata->prompt[2] = 0; + ch->pcdata->fight_death[0] = ( BRIGHT ); + ch->pcdata->fight_death[1] = ( RED ); + ch->pcdata->fight_death[2] = 0; + ch->pcdata->fight_yhit[0] = ( NORMAL ); + ch->pcdata->fight_yhit[1] = ( GREEN ); + ch->pcdata->fight_yhit[2] = 0; + ch->pcdata->fight_ohit[0] = ( NORMAL ); + ch->pcdata->fight_ohit[1] = ( YELLOW ); + ch->pcdata->fight_ohit[2] = 0; + ch->pcdata->fight_thit[0] = ( NORMAL ); + ch->pcdata->fight_thit[1] = ( RED ); + ch->pcdata->fight_thit[2] = 0; + ch->pcdata->fight_skill[0] = ( BRIGHT ); + ch->pcdata->fight_skill[1] = ( WHITE ); + ch->pcdata->fight_skill[2] = 0; + found = FALSE; fclose( fpReserve ); @@ -884,6 +1108,7 @@ KEY( "Class", ch->class, fread_number( fp ) ); KEY( "Cla", ch->class, fread_number( fp ) ); KEY( "Clan", ch->clan, clan_lookup(fread_string(fp))); + KEY( "Comm", ch->comm, fread_flag( fp ) ); if ( !str_cmp( word, "Condition" ) || !str_cmp(word,"Cond")) { @@ -902,7 +1127,77 @@ fMatch = TRUE; break; } - KEY("Comm", ch->comm, fread_flag( fp ) ); + + if( !str_cmp( word, "Coloura" ) ) + { + LOAD_COLOUR( text ) + LOAD_COLOUR( auction ) + LOAD_COLOUR( gossip ) + LOAD_COLOUR( music ) + LOAD_COLOUR( question ) + fMatch = TRUE; + break; + } + if( !str_cmp( word, "Colourb" ) ) + { + LOAD_COLOUR( answer ) + LOAD_COLOUR( quote ) + LOAD_COLOUR( quote_text ) + LOAD_COLOUR( immtalk_text ) + LOAD_COLOUR( immtalk_type ) + fMatch = TRUE; + break; + } + if( !str_cmp( word, "Colourc" ) ) + { + LOAD_COLOUR( info ) + LOAD_COLOUR( tell ) + LOAD_COLOUR( reply ) + LOAD_COLOUR( gtell_text ) + LOAD_COLOUR( gtell_type ) + fMatch = TRUE; + break; + } + if( !str_cmp( word, "Colourd" ) ) + { + LOAD_COLOUR( room_title ) + LOAD_COLOUR( room_text ) + LOAD_COLOUR( room_exits ) + LOAD_COLOUR( room_things ) + LOAD_COLOUR( prompt ) + fMatch = TRUE; + break; + } + if( !str_cmp( word, "Coloure" ) ) + { + LOAD_COLOUR( fight_death ) + LOAD_COLOUR( fight_yhit ) + LOAD_COLOUR( fight_ohit ) + LOAD_COLOUR( fight_thit ) + LOAD_COLOUR( fight_skill ) + fMatch = TRUE; + break; + } + if( !str_cmp( word, "Colourf" ) ) + { + LOAD_COLOUR( wiznet ) + LOAD_COLOUR( say ) + LOAD_COLOUR( say_text ) + LOAD_COLOUR( tell_text ) + LOAD_COLOUR( reply_text ) + fMatch = TRUE; + break; + } + if( !str_cmp( word, "Colourg" ) ) + { + LOAD_COLOUR( auction_text ) + LOAD_COLOUR( gossip_text ) + LOAD_COLOUR( music_text ) + LOAD_COLOUR( question_text ) + LOAD_COLOUR( answer_text ) + fMatch = TRUE; + break; + } break; @@ -1120,6 +1415,7 @@ if ( !fMatch ) { bug( "Fread_char: no match.", 0 ); + bug( word, 0 ); fread_to_eol( fp ); } }