Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ General
➜ Trigger Question
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Rezinfrost
(1 post) Bio
|
| Date
| Sun 27 Sep 2020 10:08 PM (UTC) Amended on Sun 27 Sep 2020 10:09 PM (UTC) by Rezinfrost
|
| Message
| The MUD I am playing utilizes a bulletin board system for player suggestions, announcements from the IMMs, etc.
Currently I have a trigger set to to hide these lines from output if the number of new notes = 0.
It merely compares the string and if it matches hides it from output.
I'd like to have the trigger do a comparison and and if new notes = 0 hide from output, else show output and play a youvegotmail.wav.
My current trigger is:
<trigger
enabled="y"
group="Hide Lines"
match="^\( 2\) Ideas [ 0] Suggestion for improvement$"
omit_from_output="y"
regexp="y"
sequence="100"
>
It hides this line from output:
( 2) Ideas [ 0] Suggestion for improvement
Is it possible to do this as a single trigger?
Could someone point me in the right direction please?
Any help would be appreciated.
Thank you. | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Mon 28 Sep 2020 05:08 AM (UTC) |
| Message
| Make the number of new notes a wildcard. Make the trigger send to script. In the script test that wildcard to see if it is zero or not. Depending on that test you can do this, or that.
The problem part is conditionally omitting from output. You could still omit from output, but if there are more than zero new posts, just re-echo the output. |
- 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.
9,645 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top