[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Problem with health trigger
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Problem with health trigger

It is now over 60 days since the last post. This thread is closed.   [New subject]  Start a new subject   [Refresh] Refresh page


Posted by Dunley   (2 posts)  [Biography] bio
Date Wed 28 Jul 2004 12:57 PM (UTC)  quote  ]
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="&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
[Go to top] top

Posted by Meerclar   USA  (603 posts)  [Biography] bio
Date Reply #1 on Wed 28 Jul 2004 03:16 PM (UTC)  quote  ]
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
[Go to top] top

Posted by Dunley   (2 posts)  [Biography] bio
Date Reply #2 on Wed 28 Jul 2004 04:42 PM (UTC)  quote  ]

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
[Go to top] top

Posted by Flannel   USA  (1,230 posts)  [Biography] bio
Date Reply #3 on Wed 28 Jul 2004 07:39 PM (UTC)  quote  ]
Message
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

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
[Go to top] top

Posted by Nick Gammon   Australia  (19,631 posts)  [Biography] bio   Forum Administrator
Date Reply #4 on Wed 28 Jul 2004 10:18 PM (UTC)  quote  ]
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
[Go to top] 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.


2,591 views.

It is now over 60 days since the last post. This thread is closed.   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Web site powered by FutureQuest.Net]