|
Loftaris Adept
Joined: 24 Aug 2004 Posts: 277
|
Posted: Sun Apr 27, 2014 4:12 pm
Ansi question |
I need help with making an ansi trigger. (Having a hard time putting this into words)
I play a card game on a mud called Euchre, but the dark blue color that is default is very difficult to see, and I've changed all my other colors away from this blue, but I can't change this color as it's set on the mud.
The output from the mud is different in several ways, and all I want to do is color 1 word.
Examples 1:
Card 1: King of Clubs
Card 2: 10 of Clubs
Card 3: Jack of Diamonds
Other examples 2:
<Eukr> T-Dan leads the 9 of Clubs.
and 3
<Eukr> T-Dan picks up the Jack of Clubs (right).
I wish I could display the random ansi codes for you all to see, but in the first example, if clubs are special, the "Card 1:" part is ansified, if Clubs are NOT special, it's just regular grey.
In the next example 2 it's just grey until the 9 of Clubs. which is dark blue, and example 3 the right is ansified.
I'm sorry if that's very confusing, but each time I try to make a trigger, either using #show, #psub, #sub, #cw, etc, I can't get it to color ONLY! the (%a) of Clubs. (The colored part being %a), while keeping the rest of the ansi in tact.
The closest I got would color just the card value, leave of clubs in tact, but would turn the Card 1: to plain grey, and I need that to remain the original ansi color because it changes to show if the clubs are special or not.
I hope someone can understand all that, please and thank you for your help. |
|
|
|
hadar Apprentice
Joined: 30 Aug 2009 Posts: 198 Location: my apt, in california
|
Posted: Sun Apr 27, 2014 10:54 pm |
just copy the pattern you want to match, make a trigger click ansi and paste
|
|
|
|
Loftaris Adept
Joined: 24 Aug 2004 Posts: 277
|
Posted: Sun Apr 27, 2014 11:00 pm |
The problem is the ansi is never the same, it changes often. Sometimes Card 1 will be backgrounded, sometimes it will be purple, or just plain gray. I'd have to make 30 triggers this way, unless I'm misunderstanding what you're saying.
Also, how do I color ONLY the card value and not the entire line? |
|
|
|
hadar Apprentice
Joined: 30 Aug 2009 Posts: 198 Location: my apt, in california
|
Posted: Sun Apr 27, 2014 11:46 pm |
thought you only wanted the blue to be changed??? as for only changing the value, you would need to do something like #if (%ismember(%1,value)) {#cw red}
|
|
|
|
Loftaris Adept
Joined: 24 Aug 2004 Posts: 277
|
Posted: Sun Apr 27, 2014 11:53 pm |
I do want the blue to be changed, but the preceeding Card 1/Card 2/etc, isnt' always the same color, it can be 3 different colors, or it may not even be Card 1, it might be Jack throws the Jack of Clubs ... or Jack throws trump, Jack of Clubs.
It's a very complicated bunch of patterns that I can't figure out how to substitute and ONLY sub the (%a) of Clubs while preserving the original ansi formatting.
Basically what I'm looking to do, is capture and preserve a random ansi/text string which contants (%a) of Clubs, and only change the color of (%a).
Hope that clears it up? |
|
|
|
Daern Sorcerer
Joined: 15 Apr 2011 Posts: 809
|
Posted: Mon Apr 28, 2014 1:39 am |
You can use the #pcol command to color just part of a line. If the problem is just that you can't read the dark blue though, why not remap it to a different color, or a brighter shade at least? Prefs -> ANSI Color -> Foreground Colors.
|
|
|
|
Loftaris Adept
Joined: 24 Aug 2004 Posts: 277
|
Posted: Mon Apr 28, 2014 1:57 am |
Awesome! Pcol worked perfectly, thank you so much.
The reason I didn't change the colors is because everything else I have using the other color blue, but this one, which is forced ansi from the mud can't be changed, else I'd have to change a few dozen other variables, and was just hoping this would be so much easier (and is)
Thank you a whole lot guys! Totally appreciate the help! |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|