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 action then wait till next action
Trigger action then wait till next action
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Boen310
(17 posts) Bio
|
Date
| Fri 24 Aug 2018 10:03 AM (UTC) |
Message
| I am not very good with triggers. I am looking to trigger an action of a output from the MUD
Your bones pop and creak ominously.
then after a certain time frame do another action.
This is what I have but not working.
Trigger- Your bones pop and creak ominously.
Send-
grav stop
med
wait.time 60, "grav endure" | Top |
|
Posted by
| Boen310
(17 posts) Bio
|
Date
| Reply #1 on Fri 24 Aug 2018 10:31 AM (UTC) Amended on Sat 25 Aug 2018 09:34 PM (UTC) by Nick Gammon
|
Message
| I figured it out digging through lots and lots and lots of posts
<triggers>
<trigger
enabled="y"
ignore_case="y"
match="Your bones pop and creak ominously."
regexp="y"
send_to="12"
sequence="100"
>
<send>
require "wait"
wait.make (function () --- coroutine below here
Send ("grav stop")
Send ("med")
wait.time (90) -- wait 90 seconds
Send ("grav endure")
end) -- end of coroutine
</send>
</trigger>
</triggers>
| Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #2 on Sat 25 Aug 2018 09:34 PM (UTC) |
Message
| You could also do:
Send ("grav stop")
Send ("med")
DoAfter (90, "grav endure") -- send after 90 seconds
Then you don't need the "wait" module, in this case. |
- 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.
10,396 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top