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.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ Lua
➜ Group timer in AddTimer
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Cyb Ercho Lin
Argentina (10 posts) Bio
|
Date
| Sat 20 Jan 2018 06:23 PM (UTC) Amended on Sat 20 Jan 2018 06:25 PM (UTC) by Cyb Ercho Lin
|
Message
| Hello
I tried to do the following code using the addtimer command, but I can not define the group name within the addtimer function.
In the help :
http://www.gammon.com.au/scripts/function.php?name=AddTimer
it does not come like defining the group of the timer.
<timers>
<timer name="label" enabled="y" minute="3" second="0.00" offset_second="0.00" temporary="y"
group="testgroup" one_shot="y" >
<send>look</send>
</timer>
</timers>
in which part was the group name defined?
AddTimer ("label", 0, 3, 0, "look", timer_flag.Enabled + timer_flag.OneShot, "")
| Top |
|
Posted by
| Fiendish
USA (2,534 posts) Bio
Global Moderator |
Date
| Reply #1 on Sat 20 Jan 2018 08:09 PM (UTC) Amended on Sat 20 Jan 2018 08:12 PM (UTC) by Fiendish
|
Message
| AddTimer doesn't directly support group names, but you can use SetTimerOption to set the group right after adding it. |
https://github.com/fiendish/aardwolfclientpackage | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #2 on Sat 20 Jan 2018 08:55 PM (UTC) |
Message
| You can also add timers in XML format which supports all of the possible options, as that is what is used by the client to load them from the world file. See:
http://www.gammon.com.au/forum/?id=7123
For example, in your case:
require "addxml"
addxml.timer {
name="label",
enabled="y",
minute="3",
temporary="y",
group="testgroup",
one_shot="y",
}
|
- 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.
13,205 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top