Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Users Online
CommonCrawl, Yahoo!, Google, DotBot, Bing

Members: 0
Guests: 11
Stats
Files
Topics
Posts
Members
Newest Member
477
3,706
19,240
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Bugfix Lists » SWFOTE FUSS Bugfix List » [Bug] Blinking color tags don...
Forum Rules | Mark all | Recent Posts

[Bug] Blinking color tags don't work properly
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 May 12, 2006, 10:35 am   Last edited May 12, 2006, 7:32 pm by Samson
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

Bug: Blinking color tags don't work properly
Danger: Trivial - Only affect will be a wrong color displayed
Found by: Halcyon
Fixed by: Remcon

---

color.h

Locate:
#define AT_BLACK    	0
#define AT_BLOOD    	1
#define AT_DGREEN       2
#define AT_ORANGE    	3
#define AT_DBLUE    	4
#define AT_PURPLE    	5
#define AT_CYAN	  	6
#define AT_GREY		7
#define AT_DGREY		8
#define AT_RED		9
#define AT_GREEN		10
#define AT_YELLOW   	11
#define AT_BLUE		12
#define AT_PINK		13
#define AT_LBLUE   	14
#define AT_WHITE   	15
#define AT_BLINK   	16

#define AT_WHITE_BLINK	   AT_WHITE + AT_BLINK
#define AT_RED_BLINK	   AT_RED + AT_BLINK

#define AT_PLAIN		17
#define AT_ACTION		18
#define AT_SAY		19
#define AT_GOSSIP		20
#define AT_YELL		21
#define AT_TELL		22
#define AT_HIT		23
#define AT_HITME		24
#define AT_IMMORT		25
#define AT_HURT		26
#define AT_FALLING	27
#define AT_DANGER		28
#define AT_MAGIC		29
#define AT_CONSIDER	30
#define AT_REPORT		31
#define AT_POISON		32
#define AT_SOCIAL		33
#define AT_DYING		34
#define AT_DEAD		35
#define AT_SKILL		36
#define AT_CARNAGE	37
#define AT_DAMAGE		38
#define AT_FLEE		39
#define AT_RMNAME		40
#define AT_RMDESC		41
#define AT_OBJECT		42
#define AT_PERSON		43
#define AT_LIST		44
#define AT_BYE		45
#define AT_GOLD		46
#define AT_GTELL		47
#define AT_NOTE		48
#define AT_HUNGRY		49
#define AT_THIRSTY	50
#define AT_FIRE		51
#define AT_SOBER		52
#define AT_WEAROFF	53
#define AT_EXITS		54
#define AT_SCORE		55
#define AT_RESET		56
#define AT_LOG		57
#define AT_DIEMSG		58
#define AT_WARTALK      59
#define AT_ARENA        60
#define AT_MUSE         61
#define AT_THINK        62
#define AT_AFLAGS      	63 /* Added by Samson 9-29-98 for area flag display line */
#define AT_WHO	    	64 /* Added by Samson 9-29-98 for wholist */
#define AT_RACETALK   	65 /* Added by Samson 9-29-98 for version 1.4 code */
#define AT_IGNORE     	66 /* Added by Samson 9-29-98 for version 1.4 code */
#define AT_WHISPER    	67 /* Added by Samson 9-29-98 for version 1.4 code */
#define AT_DIVIDER    	68 /* Added by Samson 9-29-98 for version 1.4 code */
#define AT_MORPH      	69 /* Added by Samson 9-29-98 for version 1.4 code */
#define AT_SHOUT		70 /* Added by Samson 9-29-98 for shout channel */
#define AT_RFLAGS		71 /* Added by Samson 12-20-98 for room flag display line */
#define AT_STYPE		72 /* Added by Samson 12-20-98 for sector display line */
#define AT_ANAME		73 /* Added by Samson 12-20-98 for filename display line */
#define AT_AUCTION      74 /* Added by Samson 12-25-98 for auction channel */
#define AT_SCORE2		75 /* Added by Samson 2-3-99 for DOTD code */
#define AT_SCORE3		76 /* Added by Samson 2-3-99 for DOTD code */
#define AT_SCORE4		77 /* Added by Samson 2-3-99 for DOTD code */
#define AT_WHO2		78 /* Added by Samson 2-3-99 for DOTD code */
#define AT_WHO3		79 /* Added by Samson 2-3-99 for DOTD code */
#define AT_WHO4		80 /* Added by Samson 2-3-99 for DOTD code */
#define AT_INTERMUD     81 /* Added by Samson 1-15-01 for Intermud3 Channels */
#define AT_HELP		82 /* Added by Samson 1-15-01 for helpfiles */
#define AT_WHO5		83 /* Added by Samson 2-7-01 for guild names on who */
#define AT_SCORE5       84 /* Added by Samson 1-14-02 */
#define AT_WHO6		85 /* Added by Samson 1-14-02 */
#define AT_WHO7		86 /* Added by Samson 1-14-02 */
#define AT_PRAC		87 /* Added by Samson 1-21-02 */
#define AT_PRAC2		88 /* Added by Samson 1-21-02 */
#define AT_PRAC3		89 /* Added by Samson 1-21-02 */
#define AT_PRAC4		90 /* Added by Samson 1-21-02 */
#define AT_MXPPROMPT    91 /* Added by Samson 2-27-02 */
#define AT_GUILDTALK    92 /* Added by Tarl 28 Nov 02 */
#define AT_BOARD        93 /* Samson 10-14-03 */
#define AT_BOARD2       94 /* Samson 10-14-03 */
#define AT_BOARD3       95 /* Samson 10-14-03 */

/* Should ALWAYS be one more than the last numerical value in the list */
#define MAX_COLORS    96


Replace all of that with:
#define AT_BLACK         0
#define AT_BLOOD         1
#define AT_DGREEN        2
#define AT_ORANGE        3
#define AT_DBLUE         4
#define AT_PURPLE        5
#define AT_CYAN          6
#define AT_GREY          7
#define AT_DGREY         8
#define AT_RED           9
#define AT_GREEN        10
#define AT_YELLOW       11
#define AT_BLUE         12
#define AT_PINK         13
#define AT_LBLUE        14
#define AT_WHITE        15
#define AT_BLINK        16

/* These should be 17 - 31 normally */
#define AT_BLACK_BLINK  AT_BLACK + AT_BLINK
#define AT_BLOOD_BLINK  AT_BLOOD + AT_BLINK
#define AT_DGREEN_BLINK AT_DGREEN + AT_BLINK
#define AT_ORANGE_BLINK AT_ORANGE + AT_BLINK
#define AT_DBLUE_BLINK  AT_DBLUE + AT_BLINK
#define AT_PURPLE_BLINK AT_PURPLE + AT_BLINK
#define AT_CYAN_BLINK   AT_CYAN + AT_BLINK
#define AT_GREY_BLINK   AT_GREY + AT_BLINK
#define AT_DGREY_BLINK  AT_DGREY + AT_BLINK
#define AT_RED_BLINK    AT_RED + AT_BLINK
#define AT_GREEN_BLINK  AT_GREEN + AT_BLINK
#define AT_YELLOW_BLINK AT_YELLOW + AT_BLINK
#define AT_BLUE_BLINK   AT_BLUE + AT_BLINK
#define AT_PINK_BLINK   AT_PINK + AT_BLINK
#define AT_LBLUE_BLINK  AT_LBLUE + AT_BLINK
#define AT_WHITE_BLINK  AT_WHITE + AT_BLINK

#define AT_PLAIN        32
#define AT_ACTION       33
#define AT_SAY        34
#define AT_GOSSIP       35
#define AT_YELL        36
#define AT_TELL        37
#define AT_HIT        38
#define AT_HITME        39
#define AT_IMMORT       40
#define AT_HURT         41
#define AT_FALLING      42
#define AT_DANGER       43
#define AT_MAGIC        44
#define AT_CONSIDER     45
#define AT_REPORT       46
#define AT_POISON       47
#define AT_SOCIAL       48
#define AT_DYING        49
#define AT_DEAD         50
#define AT_SKILL        51
#define AT_CARNAGE      52
#define AT_DAMAGE       53
#define AT_FLEE         54
#define AT_RMNAME       55
#define AT_RMDESC       56
#define AT_OBJECT       57
#define AT_PERSON       58
#define AT_LIST         59
#define AT_BYE          60
#define AT_GOLD         61
#define AT_GTELL        62
#define AT_NOTE         63
#define AT_HUNGRY       64
#define AT_THIRSTY      65
#define AT_FIRE         66
#define AT_SOBER        67
#define AT_WEAROFF      68
#define AT_EXITS        69
#define AT_SCORE        70
#define AT_RESET        71
#define AT_LOG          72
#define AT_DIEMSG       73
#define AT_WARTALK      74
#define AT_ARENA        75
#define AT_MUSE         76
#define AT_THINK        77
#define AT_AFLAGS          78 /* Added by Samson 9-29-98 for area flag display line */
#define AT_WHO            79 /* Added by Samson 9-29-98 for wholist */
#define AT_RACETALK       80 /* Added by Samson 9-29-98 for version 1.4 code */
#define AT_IGNORE         81 /* Added by Samson 9-29-98 for version 1.4 code */
#define AT_WHISPER        82 /* Added by Samson 9-29-98 for version 1.4 code */
#define AT_DIVIDER        83 /* Added by Samson 9-29-98 for version 1.4 code */
#define AT_MORPH          84 /* Added by Samson 9-29-98 for version 1.4 code */
#define AT_SHOUT        85 /* Added by Samson 9-29-98 for shout channel */
#define AT_RFLAGS       86 /* Added by Samson 12-20-98 for room flag display line */
#define AT_STYPE        87 /* Added by Samson 12-20-98 for sector display line */
#define AT_ANAME        88 /* Added by Samson 12-20-98 for filename display line */
#define AT_AUCTION      89 /* Added by Samson 12-25-98 for auction channel */
#define AT_SCORE2       90 /* Added by Samson 2-3-99 for DOTD code */
#define AT_SCORE3       91 /* Added by Samson 2-3-99 for DOTD code */
#define AT_SCORE4       92 /* Added by Samson 2-3-99 for DOTD code */
#define AT_WHO2         93 /* Added by Samson 2-3-99 for DOTD code */
#define AT_WHO3         94 /* Added by Samson 2-3-99 for DOTD code */
#define AT_WHO4         95 /* Added by Samson 2-3-99 for DOTD code */
#define AT_INTERMUD     96 /* Added by Samson 1-15-01 for Intermud3 Channels */
#define AT_HELP         97 /* Added by Samson 1-15-01 for helpfiles */
#define AT_WHO5         98 /* Added by Samson 2-7-01 for guild names on who */
#define AT_SCORE5       99 /* Added by Samson 1-14-02 */
#define AT_WHO6        100 /* Added by Samson 1-14-02 */
#define AT_WHO7        101 /* Added by Samson 1-14-02 */
#define AT_PRAC        102 /* Added by Samson 1-21-02 */
#define AT_PRAC2       103 /* Added by Samson 1-21-02 */
#define AT_PRAC3       104 /* Added by Samson 1-21-02 */
#define AT_PRAC4       105 /* Added by Samson 1-21-02 */
#define AT_MXPPROMPT   106 /* Added by Samson 2-27-02 */
#define AT_GUILDTALK   107 /* Added by Tarl 28 Nov 02 */
#define AT_OOC         108
#define AT_AVATAR      109
#define AT_SHIP        110
#define AT_CLAN        111

/* Should ALWAYS be one more than the last numerical value in the list */
#define MAX_COLORS    112


color.c

Locate:
char *const pc_displays[MAX_COLORS] = {
   "black", "dred", "dgreen", "orange",
   "dblue", "purple", "cyan", "grey",
   "dgrey", "red", "green", "yellow",
   "blue", "pink", "lblue", "white",
   "blink", "plain", "action", "say",
   "chat", "yells", "tell", "hit",
   "hitme", "immortal", "hurt", "falling",
   "danger", "magic", "consider", "report",
   "poison", "social", "dying", "dead",
   "skill", "carnage", "damage", "fleeing",
   "rmname", "rmdesc", "objects", "people",
   "list", "bye", "gold", "gtells",
   "note", "hungry", "thirsty", "fire",
   "sober", "wearoff", "exits", "score",
   "reset", "log", "die_msg", "wartalk",
   "arena", "muse", "think", "aflags",
   "who", "racetalk", "ignore", "whisper",
   "divider", "morph", "shout", "rflags",
   "stype", "aname", "auction", "score2",
   "score3", "score4", "who2", "who3",
   "who4", "intermud", "helpfiles", "who5",
   "score5", "who6", "who7", "prac",
   "prac2", "prac3", "prac4", "mxpprompt",
   "guildtalk", "board", "board2", "board3"
};

/* All defaults are set to Alsherok default scheme, if you don't 
like it, change it around to suite your own needs - Samson */
const short default_set[MAX_COLORS] = {
   AT_BLACK, AT_BLOOD, AT_DGREEN, AT_ORANGE, /*  3 */
   AT_DBLUE, AT_PURPLE, AT_CYAN, AT_GREY, /*  7 */
   AT_DGREY, AT_RED, AT_GREEN, AT_YELLOW, /* 11 */
   AT_BLUE, AT_PINK, AT_LBLUE, AT_WHITE,  /* 15 */

   AT_RED + AT_BLINK, AT_GREY, AT_GREY, AT_BLUE,   /* 19 */
   AT_GREEN, AT_LBLUE, AT_WHITE, AT_GREY, /* 23 */
   AT_GREY, AT_YELLOW, AT_GREY, AT_GREY,  /* 27 */
   AT_GREY, AT_BLUE, AT_GREY, AT_GREY, /* 31 */
   AT_DGREEN, AT_CYAN, AT_GREY, AT_GREY,  /* 35 */
   AT_BLUE, AT_GREY, AT_GREY, AT_GREY, /* 39 */
   AT_RED, AT_GREY, AT_BLUE, AT_PINK,  /* 43 */
   AT_GREY, AT_GREY, AT_YELLOW, AT_GREY,  /* 47 */
   AT_GREY, AT_ORANGE, AT_BLUE, AT_RED,   /* 51 */
   AT_GREY, AT_GREY, AT_GREEN, AT_DGREEN, /* 55 */
   AT_DGREEN, AT_ORANGE, AT_GREY, AT_RED, /* 59 */
   AT_GREY, AT_DGREEN, AT_RED, AT_BLUE,   /* 63 */
   AT_RED, AT_CYAN, AT_YELLOW, AT_PINK,   /* 67 */
   AT_DGREEN, AT_PINK, AT_WHITE, AT_BLUE, /* 71 */
   AT_BLUE, AT_BLUE, AT_GREEN, AT_GREY,   /* 75 */
   AT_GREEN, AT_GREEN, AT_YELLOW, AT_DGREY,  /* 79 */
   AT_GREEN, AT_PINK, AT_DGREEN, AT_CYAN, /* 83 */
   AT_RED, AT_WHITE, AT_BLUE, AT_DGREEN,  /* 87 */
   AT_CYAN, AT_BLOOD, AT_RED, AT_DGREEN,  /* 91 */
   AT_GREEN, AT_GREY, AT_GREEN, AT_WHITE  /* 95 */
};


Replace it with:
char *const pc_displays[MAX_COLORS] =
{
   "black",    "dred",      "dgreen",    "orange",
   "dblue",    "purple",    "cyan",      "grey",
   "dgrey",    "red",       "green",     "yellow",
   "blue",     "pink",      "lblue",     "white",
   "blink",    "bdred",     "bdgreen",   "bdorange",
   "bdblue",   "bpurple",   "bcyan",     "bgrey",
   "bdgrey",   "bred",      "bgreen",    "byellow",
   "bblue",    "bpink",     "blblue",    "bwhite",
   "plain",    "action",    "say",       "chat",
   "yells",    "tell",      "hit",       "hitme",
   "immortal", "hurt",      "falling",   "danger",
   "magic",    "consider",  "report",    "poison",
   "social",   "dying",     "dead",      "skill",
   "carnage",  "damage",    "fleeing",   "rmname",
   "rmdesc",   "objects",   "people",    "list",
   "bye",      "gold",      "gtells",    "note",
   "hungry",   "thirsty",   "fire",      "sober",
   "wearoff",  "exits",     "score",     "reset",
   "log",      "die_msg",   "wartalk",   "arena",
   "muse",     "think",     "aflags",    "who",
   "racetalk", "ignore",    "whisper",   "divider",
   "morph",    "shout",     "rflags",    "stype",
   "aname",    "auction",   "score2",    "score3",
   "score4",   "who2",      "who3",      "who4",
   "intermud", "helpfiles", "who5",      "score5",
   "who6",     "who7",      "prac",      "prac2",
   "prac3",    "prac4",     "mxpprompt", "guildtalk",
   "board",    "board2",    "board3"
};

/* All defaults are set to Alsherok default scheme, if you don't 
like it, change it around to suite your own needs - Samson */
const short default_set[MAX_COLORS] =
{
   AT_BLACK, AT_BLOOD, AT_DGREEN, AT_ORANGE, /*  3 */
   AT_DBLUE, AT_PURPLE, AT_CYAN, AT_GREY, /*  7 */
   AT_DGREY, AT_RED, AT_GREEN, AT_YELLOW, /* 11 */
   AT_BLUE, AT_PINK, AT_LBLUE, AT_WHITE,  /* 15 */
   AT_BLACK_BLINK, AT_BLOOD_BLINK, AT_DGREEN_BLINK, AT_ORANGE_BLINK, /* 19 */
   AT_DBLUE_BLINK, AT_PURPLE_BLINK, AT_CYAN_BLINK, AT_GREY_BLINK, /* 23 */
   AT_DGREY_BLINK, AT_RED_BLINK, AT_GREEN_BLINK, AT_YELLOW_BLINK, /* 27 */
   AT_BLUE_BLINK, AT_PINK_BLINK, AT_LBLUE_BLINK, AT_WHITE_BLINK, /* 31 */
   AT_GREY, AT_GREY, AT_BLUE,   /* 34 */
   AT_GREEN, AT_LBLUE, AT_WHITE, AT_GREY, /* 38 */
   AT_GREY, AT_YELLOW, AT_GREY, AT_GREY,  /* 42 */
   AT_GREY, AT_BLUE, AT_GREY, AT_GREY, /* 46 */
   AT_DGREEN, AT_CYAN, AT_GREY, AT_GREY,  /* 50 */
   AT_BLUE, AT_GREY, AT_GREY, AT_GREY, /* 54 */
   AT_RED, AT_GREY, AT_BLUE, AT_PINK,  /* 58 */
   AT_GREY, AT_GREY, AT_YELLOW, AT_GREY,  /* 62 */
   AT_GREY, AT_ORANGE, AT_BLUE, AT_RED,   /* 66 */
   AT_GREY, AT_GREY, AT_GREEN, AT_DGREEN, /* 70 */
   AT_DGREEN, AT_ORANGE, AT_GREY, AT_RED, /* 74 */
   AT_GREY, AT_DGREEN, AT_RED, AT_BLUE,   /* 78 */
   AT_RED, AT_CYAN, AT_YELLOW, AT_PINK,   /* 82 */
   AT_DGREEN, AT_PINK, AT_WHITE, AT_BLUE, /* 86 */
   AT_BLUE, AT_BLUE, AT_GREEN, AT_GREY,   /* 90 */
   AT_GREEN, AT_GREEN, AT_YELLOW, AT_DGREY,  /* 94 */
   AT_GREEN, AT_PINK, AT_DGREEN, AT_CYAN, /* 98 */
   AT_RED, AT_WHITE, AT_BLUE, AT_DGREEN,  /* 102 */
   AT_CYAN, AT_BLOOD, AT_RED, AT_DGREEN,  /* 106 */
   AT_GREEN, AT_GREY, AT_GREEN, AT_WHITE  /* 110 */
};


color.c, show_colors

Locate:
   send_to_pager( "\r\n\r\n&W******************************[ COLOR TYPES ]******************************\r\n", ch );

   for( count = 16; count < MAX_COLORS; ++count )
   {
      if( ( count % 8 ) == 0 && count != 16 )
      {
         send_to_pager( "\r\n", ch );
      }
      pager_printf( ch, "%s%-10s%s", color_str( count, ch ), pc_displays[count], ANSI_RESET );
   }


Change to:
   send_to_pager( "\r\n\r\n&W******************************[ COLOR TYPES ]******************************\r\n", ch );

   for( count = 32; count < MAX_COLORS; ++count )
   {
      if( ( count % 8 ) == 0 && count != 32 )
      {
         send_to_pager( "\r\n", ch );
      }
      pager_printf( ch, "%s%-10s%s", color_str( count, ch ), pc_displays[count], ANSI_RESET );
   }


In the color directory, replace the color theme files with the following new ones:

Smaug theme:
#COLORTHEME
Name         smaug~
MaxColors    112
Colors       0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 7 7 14 14 14 15 15 11 11 9 46 40 12 7 7 10 6 11 9 10 1 15 11 15 11 10 13 12 10 11 12 10 3 12 9 15 11 15 14 2 5 15 9 7 2 9 12 10 2 10 15 7 7 15 12 12 12 10 14 14 14 10 10 10 13 2 10 14 10 10 2 6 1 9 2 10 10 10 10 10
End



AFK theme:
#COLORTHEME
Name         AFK~
MaxColors    112
Colors       0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 7 7 12 10 14 15 8 8 11 8 8 40 12 8 8 2 6 8 8 12 8 8 8 9 8 12 13 8 8 11 6 8 3 12 9 8 8 10 2 2 3 8 9 8 2 9 12 9 6 11 13 2 13 15 12 12 12 10 7 10 10 11 8 10 13 2 6 9 15 12 2 6 1 9 2 10 10 10 10 10
End



So it would seem nobody ever used the blink color codes in the form of AT_* uses. Stopping to consider how this color code was trying to use them though did make it pretty obvious that the method never worked. So the existing value table needed to be adjusted and have the new numbers squeezed in to the middle of it all. Should be noted that color information saved on pfiles will probably come out a bit screwed up once people start loading up after this fix, but the theme files should provide a decent starting point for recustomizing.
       
Pages:<< prev 1 next >>