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


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Triggers+Timers

Triggers+Timers

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


Posted by Zeno   USA  (2,871 posts)  [Biography] 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
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] 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
[Go to top] top

Posted by Zeno   USA  (2,871 posts)  [Biography] 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
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] 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
[Go to top] top

Posted by Zeno   USA  (2,871 posts)  [Biography] 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
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] 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
[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.


10,828 views.

It is now over 60 days since the last post. This thread is closed.     [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.

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

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

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

[Best viewed with any browser - 2K]    [Hosted at HostDash]