Gammon Forum
Entire forum
MUSHclient
General
Problem with health trigger
Problem with health trigger
|
It is now over 60 days since the last post. This thread is closed.
  Refresh page
Posted by
| Dunley
(2 posts) bio
|
Date
| Wed 28 Jul 2004 12:57 PM (UTC) |
Message
| 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="<77/77hp 126/126m 240/240mv 106/170wt Time: day>"
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 | top |
|
Posted by
| Meerclar
USA (733 posts) bio
|
Date
| Reply #1 on Wed 28 Jul 2004 03:16 PM (UTC) |
Message
| 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. |
Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org | top |
|
Posted by
| Dunley
(2 posts) bio
|
Date
| Reply #2 on Wed 28 Jul 2004 04:42 PM (UTC) Amended on Wed 28 Jul 2004 05:40 PM (UTC) by Dunley
|
Message
| 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 | top |
|
Posted by
| Flannel
USA (1,230 posts) bio
|
Date
| Reply #3 on Wed 28 Jul 2004 07:39 PM (UTC) |
Message
| |
Posted by
| Nick Gammon
Australia (22,975 posts) bio
Forum Administrator |
Date
| Reply #4 on Wed 28 Jul 2004 10:18 PM (UTC) |
Message
| Some MUDs let you customise the prompt to add a newline to it, which works around the problem with no need for scripting. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
16,740 views.
It is now over 60 days since the last post. This thread is closed.
  Refresh page
top
Quick links:
MUSHclient.
MUSHclient help.
Forum shortcuts.
Posting templates.
Lua modules.
Lua documentation.
Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.