Register forum user name Search FAQ

Gammon Forum

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.
 Entire forum ➜ MUSHclient ➜ General ➜ Triggers+Timers

Triggers+Timers

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Zeno   USA  (2,871 posts)  Bio
Date Thu 23 Jan 2003 11:51 PM (UTC)
Message
Is there anyway when certain text is matched it starts a timer? Or vise versa? Like when "You have been killed" it starts a timer for 30min then when that 30min is up, it displays a comment?

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #1 on Fri 24 Jan 2003 06:44 AM (UTC)
Message
Have the trigger that matches the text "You have been killed" call a small script subroutine, like this:

sub OnKilled (name, output, wildcards)

world.DoAfter 30 * 60, "say blah blah"

end sub


The call "world.DoAfter" sends some text after x seconds, so saying 30 * 60 would be after 30 minutes (or you could just replace that with 1800 seconds).

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #2 on Fri 24 Jan 2003 11:42 PM (UTC)

Amended on Sat 25 Jan 2003 12:07 AM (UTC) by Zeno

Message
Instead of sending to world, how would I make it sends to output?

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #3 on Sat 25 Jan 2003 01:10 AM (UTC)
Message
See DoAfterNote

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #4 on Sat 25 Jan 2003 07:21 PM (UTC)
Message
ok, thanks. Errr, how would I see how much time is left in a timer?

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #5 on Sat 25 Jan 2003 10:46 PM (UTC)
Message
See GetTimerInfo, selector 13.

- 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.


12,147 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.