DoAfter in 4.37

Posted by Terry on Sun 26 Oct 2008 03:31 PM — 3 posts, 14,638 views.

USA #0
I wrote a trigger to send a command to the mud using DoAfter(), but it doesn't work in MUSHclient 4.37.
<triggers>
 <trigger
  enabled="n"
  group="hyper"
  match="You are too close to *"
  send_to="12"
  sequence="100"
 >
 <send>DoAfter(5, "hyper")</send>
 </trigger>
</triggers>
The trigger, along with others, is enabled in a previous alias:
<aliases>
 <alias
  match="^(y|n)hyper$"
  enabled="y"
  regexp="y"
  send_to="12"
  sequence="100"
 >
 <send>if "%1" == "y" then
 EnableTriggerGroup ("hyper", true)
 Note ("AUTOHYPER enabled.")
else
 EnableTriggerGroup ("hyper", false)
 Note ("AUTOHYPER disabled.")
end -- if
Note ("Ok.")</send>
 </alias>
</aliases>
The strange part is, it works perfectly on my other computer, which still has MUSHclient 4.34 on it. Has something happened to change DoAfter() between these two versions?


Edit:
I also tried
DoAfter(1, "look")
in the "Immediate" box, but that never fired either. So it wasn't that the thing didn't enable.
Amended on Sun 26 Oct 2008 04:32 PM by Terry
Australia Forum Administrator #1
DoAfter is working for me.

Two major things to check for are:

  • Are timers enabled? DoAfter actually generates a temporary timer - if timers are not enabled, it will not fire.
  • Are you connected to the MUD when testing? The temporary timers used by DoAfter do not fire if you are not connected. Check the Timers tab of the world configuration - you may find dozens of timers there waiting to fire when you connect.
Australia Forum Administrator #2
I also seem to remember that someone had problems with timers a while ago - rebooting his PC seemed to fix it - something to do with Windows not sending timer events to MUSHclient.