256 Color Handling (Incoming and Triggers)

Posted by Sickent on Tue 18 Nov 2014 08:46 PM — 5 posts, 22,180 views.

USA #0
So Aetolia just made 256 colors a thing. It broke my system, as triggers that want to accept the pre-defined black, red, green, yellow, blue, magenta cyan, and white don't seem to be recognizing that colored text. Setting the triggers back to matching any color made them work again.

How can you tell what color a line is when you receive it from the MU* you're playing?

How can you trigger off that color?
USA #1
This should be able to grab the style of the line that is being displayed

VARIANT GetStyleInfo(long LineNumber, long StyleNumber, short InfoType);

http://www.gammon.com.au/scripts/function.php?name=GetStyleInfo


Note (GetStyleInfo (100, 1, 14)) -- line 100 of output buffer, grabs first style, of foreground color(text)
//result 
16744448
USA #2
as far as getting it to trigger cause I just noticed its only set to the 8 standard colors you will more than likely have to it fire off any color, then run a script to check if the color matches, Could pro do it with use GetStyleInfo then compare it.

Btw if you still just need it to fire off the black, red, green, yellow etc. You can change the deffault 16 ansi colors with alt + enter and adjust the ansi colors there.


But if there is like multiple different green text you need to fire it off, you will have to get the style runs and compare it.
Amended on Tue 18 Nov 2014 11:51 PM by Slick2175
USA Global Moderator #3
Sickent said:

So Aetolia just made 256 colors a thing. It broke my system, as triggers that want to accept the pre-defined black, red, green, yellow, blue, magenta cyan, and white don't seem to be recognizing that colored text.

Yikes. That could easily be avoided if they'd convert the appropriate color points to the standard ANSI 16 color representation. There's no reason to not support both at the same time.

Is there a way for you to ask the game developers to not make changes that break the standard 16 colors? (what happens for people whose clients don't support 256 colors?)
Amended on Wed 19 Nov 2014 12:16 AM by Fiendish
USA #4
Slick2175 said:


Thank you Slick, exactly what I needed.