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


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Lua
. . -> [Subject]  Group timer in AddTimer

Group timer in AddTimer

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


Posted by Cyb Ercho Lin   Argentina  (10 posts)  [Biography] 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, "")
[Go to top] top

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

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


11,671 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]