Problem with health trigger

Posted by Dunley on Wed 28 Jul 2004 12:57 PM — 5 posts, 25,268 views.

#0
Hi,

I am playing Realms of Despair and trying to create some triggers. It appears to me that some text lines can't be triggered?

As an example: I continously receive a text line indicating my status from the mud. It looks like this: <77/77hp 126/126m 240/240mv 106/170wt Time: day>

However, even when I use the following trigger it doesn't react:

<triggers>
<trigger
enabled="y"
ignore_case="y"
match="&lt;77/77hp 126/126m 240/240mv 106/170wt Time: day&gt;"
sequence="100"
>
<send>smile</send>
</trigger>
</triggers>

(of course I made sure the status line was still the same)

Is MUSHClient ignoring parts of the text? I hope someone knows what the problem is.

Regards,
Dunley
USA #1
The problem isn't so muh that MC is ignoring the text as it is that triggers won't process on a partial line. Most prompts, no matter how complex, don't end with a newline so the parse engine won't do anything with them as a trigger - it is possible however to use a script for this via OnPartialLine (I think thats the right syntax) calls. You'll need the most recent version of MC to guarantee the function is available and I know there are examples of doing this available via the forum search function.
#2
Hi,

Thanks for your answer! I got the trigger to work by ticking the 'regular expression' box.

Edit: but indeed it does not activate on the last prompt. I think you meant the GetLineInfo command? I found this post concerning it: http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=1898. Should be enough to get me started :)

Dunley
Amended on Wed 28 Jul 2004 05:40 PM by Dunley
USA #3
That, but instead of a timer, you can use a plugin call back.

OnPluginPartialLine

Heres the example plugin.
http://www.mushclient.com/plugins/Status_Bar_Prompt.xml
Australia Forum Administrator #4
Some MUDs let you customise the prompt to add a newline to it, which works around the problem with no need for scripting.