Colorized Prompt Triggers

Posted by Desert_Wanderer on Wed 23 Jul 2003 08:55 PM — 5 posts, 20,204 views.

#0
Ok, think I'm missing something here. I'm trying to set my triggers so that as my prompt stats change, I can see where I'm at with a glance by color. Example:

163/163hp 177/177Sta 89/89stun>

These stats are min/max(type), I'll use the stun setting as an example. If my stun is from say 0-25 its colored purple, 26-60 is red, 61-80 yellow, and 81+ its normal green.

Here is the trigger I am using for 61-80 stun:
</trigger>
<trigger
custom_colour="17"
enabled="y"
ignore_case="y"
match="[6-8]./89stun"
regexp="y"
sequence="100"
other_text_colour="yellow"
other_back_colour="black"

The problem I am having is that portion of the prompt line does not change color until after I put in a command, or something happens in the game.

Am I missing some prompt or newline setting or something?

Thanks in advance.
-DW
USA #1
Mushclient had no idea what a prompt is or any way to tell when one actually arrives. No one thought it was important to bother with adding such a function to ANSI back when it came out, since it was originally used for static, non-moving text. As a result, Mushclient can only color a line after it is 100% certain that the line is complete. This means it needs a command to be entered or some mud side event to generate a new line before it will do anything. Some muds will allow you to change your prompt to add a newline character to it, but that is really the only solution to the problem until and unless some special method of defining such prompts and treating them different from normal lines is implimented.
Australia Forum Administrator #2
See match on prompt lines with no newline.
Australia Forum Administrator #3
Another approach, as Shadowfyr said, is to modify your prompt at the MUD side to include a newline.
#4
Thanks. That worked! Just added a newline at the end of my prompt.

-DW