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/Timer Assistance
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Narcs
United Kingdom (2 posts) Bio
|
| Date
| Tue 12 Mar 2019 05:02 PM (UTC) Amended on Wed 13 Mar 2019 02:52 AM (UTC) by Nick Gammon
|
| Message
| Hello! Returned to MUDs after a while and trying to set something up for one of my games.
I want to trigger a timer to run after a certain action, which will create a notification after so long:
_____________________
Trigger:
<trigger
custom_colour="9"
enabled="y"
make_italic="y"
make_underline="y"
match="*Thaum cast begun!*"
name="ThaumTick"
send_to="12"
sequence="100"
>
<send>EnableTimer("ThaumTimer", true)</send>
</trigger>
Timer:
<timer name="ThaumTimer" enabled="y" minute="7" second="0.00" offset_second="0.00" send_to="12"
>
<send>Sound ("250770__ninafoletti__river-waterfall-2.wav")
ColourNote ("#9932CC", "black", "GP is filled up and ready to go!")
FlashIcon ()
EnableTimer("ThaumTimer", false)</send>
</timer>
_____________________
If I run this, it will work fine and as expected, will trigger the timer to be enabled and then display/play the notifications and disabled the timer after 7 minutes. If I run again, the timer runs immediately. Run a third time, works as expected.
Anyone able to point out what I'm doing wrong? Probably something glaring..
Thanks in advance. | | Top |
|
| Posted by
| Fiendish
USA (2,555 posts) Bio
Global Moderator |
| Date
| Reply #1 on Tue 12 Mar 2019 10:17 PM (UTC) Amended on Tue 12 Mar 2019 10:22 PM (UTC) by Fiendish
|
| Message
| Reset the timer after you enable it in your trigger.
You should also set enabled="n" in the timer so that it doesn't run when you start up mushclient. |
https://github.com/fiendish/aardwolfclientpackage | | Top |
|
| Posted by
| Narcs
United Kingdom (2 posts) Bio
|
| Date
| Reply #2 on Wed 13 Mar 2019 01:31 AM (UTC) |
| Message
| | Nice one bud, added a reset to the trigger action, after it enables and that sorted the job! | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #3 on Wed 13 Mar 2019 02:54 AM (UTC) Amended on Wed 13 Mar 2019 02:55 AM (UTC) by Nick Gammon
|
| Message
| Also see this:
You have to enable it before resetting it.
I mention this because other people reading this thread may not have realized the significance of the order of doing things. |
- 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.
15,821 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top