How to create a timer that sends to Script?

Posted by Eloni on Wed 22 Jan 2014 12:37 AM — 5 posts, 20,770 views.

#0
I can create a timer that sends to the mud rather easily using this:


AddTimer ("soulsteal", 0, 0, 1.5, "TryAgain = true", 
          timer_flag.Enabled + timer_flag.OneShot, "")


But I can't figure out how to make one that will process "TryAgain = true" as a script. This option is available in MUSHclient's GUI. I just can't figure out how to do it with the AddTimer function.
#1
After carefully rereading this a few times I see that it says the fifth argument is something you specifically send to the mud... Is there a way to have it send to script?

The last argument is "the name of a script subroutine" but I honestly don't know what that means :D
#2
I figured it out. I had to make a function that changed the variable "tryAgain = true" and put the name of the function as the last argument in AddTimer
Australia Forum Administrator #3
Template:function=ImportXML
ImportXML

The documentation for the ImportXML script function is available online. It is also in the MUSHclient help file.



You could use that to make (import) a timer that had the "send to" field set to "script" and thus the timer "send" would be any script command(s).

However in general in this case, you could make a timer in advance, and just enable or disable it, thus not needing to create it from scratch at all.
#4
Thanks! I didn't know understand import/export xml. I used them for the first time just now and I'm sure I will get a lot of usage out of it. I appreciate the tip!