|
HappyFunBal Newbie
Joined: 26 Jan 2003 Posts: 9
|
Posted: Sun Jan 26, 2003 6:01 pm
Capturing High Ansi |
Greetings!
I setup a simple trigger to capture my last inflicted hit and the last damage done to me and display it in the status window. There are different colors for different damages. I have the ANSI button checked in the trigger options.
The ones that use regular colors work fine; however the ones that use the high ansi colors show up in all plain color. I was thinking perhaps the color syntax might have something to do with it, but after about 5 hours of hair pulling I finally gave up.
Can anybody offer any assistance? Thanks!!! |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Sun Jan 26, 2003 6:03 pm |
Post the triggers that you have and some sample MUD output of the text that gives you problem. Try to include the ANSI codes in the sample MUD output too. To do this, open the Editor (Windows|Editor) and make sure that Options|Raw Mode is selected, then paste the text into the Editor and it will appear with the codes.
Kjata |
|
|
|
HappyFunBal Newbie
Joined: 26 Jan 2003 Posts: 9
|
Posted: Sun Jan 26, 2003 6:22 pm |
Ok... I'm using 6.16 btw.
Here's the trigger:
You &LastAttack1 @CurrentEnemy?&LastAttack2
Pretty straight forward... then in my status window I display the following:
Last attack: You @LastAttack1 %ansi( grey)@CurrentEnemy @LastAttack2%ansi( grey)
Here is a sample line of High Cyan that the trigger doesn't capture the colors for:
You [1;36mwreak havoc on [0m guard [1;36mwith many devastating blows. [0m
If you need anything else let me know :) |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Sun Jan 26, 2003 6:47 pm |
Change the pattern to:
You &%*{LastAttack1} @CurrentEnemy?&%*{LastAttack2}
Be careful not to use %1 or %2 in the trigger because it will make your trigger vulnerable to other people's exploits.
Kjata |
|
|
|
HappyFunBal Newbie
Joined: 26 Jan 2003 Posts: 9
|
Posted: Sun Jan 26, 2003 6:55 pm |
Thanks for your quick responses, Kjata!
However, the trigger won't fire at all now... :( even when I put it in all plain color. |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Sun Jan 26, 2003 8:49 pm |
What's the MUD address and port?
Also, try this pattern:
You &%*{LastAttack1} @CurrentEnemy &%*{LastAttack2}
Kjata |
|
|
|
HappyFunBal Newbie
Joined: 26 Jan 2003 Posts: 9
|
Posted: Mon Jan 27, 2003 8:04 pm |
I'll try that this evening!
The MUD is The Two Towers
host: towers.angband.com
port: 9999
Bal |
|
|
|
HappyFunBal Newbie
Joined: 26 Jan 2003 Posts: 9
|
Posted: Mon Jan 27, 2003 9:04 pm |
Oh ya, it's unlikely that you'll see those colors with a new character.
Here's a way to test on the MUD: first, "set color on". I think it's off by default. Then just use a "say You $HIC$hit somebody hard."
$HIC$ = high cyan
$0$ = default color
Thanks :) |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Tue Jan 28, 2003 3:24 am |
Can't get it to fail for me. It captures the ansi codes fine with the last pattern I posted.
Kjata |
|
|
|
HappyFunBal Newbie
Joined: 26 Jan 2003 Posts: 9
|
Posted: Tue Jan 28, 2003 4:59 am |
Ok, something really wierd is going on... when I apply &%*{VAR} to the trigger that captures the damage done to ME, it works great, however not the damage I inflict to somebody else.
Anyway, I'm on the right track and I'm sure there's something really simple stopping this from working and I'll figure it out. Thanks for all your help! |
|
|
|
HappyFunBal Newbie
Joined: 26 Jan 2003 Posts: 9
|
Posted: Tue Jan 28, 2003 6:02 am |
After much hair pulling, I finally figured it out... I needed to add a %* in front of the @CurrentEnemy statement, as there is an ANSI control code to return to the default color!!!
|
|
|
|
|
|