|
aslanthekat Novice
Joined: 17 Sep 2007 Posts: 44 Location: Missouri
|
Posted: Thu Jul 12, 2012 8:04 pm
Coloring |
Lets say my mud prompt looks something like <2900hp
But the color of my hp doesn't always stay the same <1900hp
How do I store the value of my hp in a variable, including the color? Then I can use it with #sub and such.
Thanks |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Thu Jul 12, 2012 8:48 pm |
When you make your trigger, mark the checkbox for ANSI trigger. Then cut and paste the mud prompt from the mud into the pattern. Edit the pattern, replacing everything after "<" and before the escape code which precedes "hp" with "(*)". In your trigger script, set your variable to %1.
If there is no escape code before the "hp" in the green-number example, then it will be trickier. In that case you will have to have an optional escape code.
If you can't get it to work, cut and paste the actual text from the mud, including ansi codes, inside [code] ... [/code] tags here and we can write it for you. |
|
|
|
aslanthekat Novice
Joined: 17 Sep 2007 Posts: 44 Location: Missouri
|
Posted: Thu Jul 12, 2012 9:00 pm |
Thanks for the reply.
I can probably write up the more complicated script. I just wanted to make sure I wasn't missing a built in function or command that would make this simple(r). If I get stumped, you'll be hearing from me. |
|
|
|
|
|