Timer Help

Posted by Agarwain on Sun 24 Feb 2019 07:09 PM — 2 posts, 11,658 views.

#0
Hello,

I'm trying to work with MUSHclient timers. What I'd like to do is create temporary one-shot timers that send to script but can also be named. DoAfterSpecial creates timers, but I cannot name them, e.g. mytimer = DoAfterSpecial(12, "myfunction()", sendto.script)

AddTimer seems to be able to name timers, but apparently cannot send them to script. AM I missing something?

If it helps, I'm trying to replicate Mudlet's tempTimer() function, which seems to be able to take variables as the timer name.

Thanks for your help!
Australia Forum Administrator #1
With a named timer you could, after creating it, change where it is sent. However ImportXML might be simper to use:

http://www.gammon.com.au/scripts/doc.php?function=ImportXML

Also the addXML function provides a useful interface:

http://www.gammon.com.au/forum/?id=7123

In particular addxml.timer (t) lets you add a timer, where all of the possible fields (including send to location, what the sent data is, and so on) can be provided.