Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ General ➜ 256 Color Handling (Incoming and Triggers)

256 Color Handling (Incoming and Triggers)

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Sickent   USA  (12 posts)  Bio
Date Tue 18 Nov 2014 08:46 PM (UTC)
Message
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?
Top

Posted by Slick2175   USA  (27 posts)  Bio
Date Reply #1 on Tue 18 Nov 2014 10:13 PM (UTC)
Message
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
Top

Posted by Slick2175   USA  (27 posts)  Bio
Date Reply #2 on Tue 18 Nov 2014 10:25 PM (UTC)

Amended on Tue 18 Nov 2014 11:51 PM (UTC) by Slick2175

Message
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.
Top

Posted by Fiendish   USA  (2,541 posts)  Bio   Global Moderator
Date Reply #3 on Wed 19 Nov 2014 (UTC)

Amended on Wed 19 Nov 2014 12:16 AM (UTC) by Fiendish

Message
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?)

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Sickent   USA  (12 posts)  Bio
Date Reply #4 on Wed 19 Nov 2014 01:17 AM (UTC)
Message
Slick2175 said:


Thank you Slick, exactly what I needed.
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


18,481 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.