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

MUSHclient scripting

Description of MUSHclient world function: world.EnableTimerGroup


Name EnableTimerGroup
Type Method
Summary Enables/disables a group of timers
Prototype long EnableTimerGroup(BSTR GroupName, BOOL Enabled);

View list of data type meanings

Description

Triggers, aliases and timers can be placed in "groups" where a group is a bunch of related items. Groups have names, there is no restriction on the name of a group. Ungrouped items have blank (empty) names.

To enable an entire group of timers do this:

world.EnableTimerGroup "groupname", 1

To disable the entire group:

world.EnableTimerGroup "groupname", 0

For debugging purposes the function returns a count of the number of members in the group (not the number enabled, as some may already be enabled). eg.

dim mycount
mycount = world.EnableTimerGroup ("groupname", 1)

If you are using plugins only the members of the current plugin (if any) are affected. If the call is made outside a plugin only the members of the group that are not in a plugin are affected.


Note: Available in version 3.27 onwards.


VBscript example
world.EnableTimerGroup "groupname", 1  ' enable the group
world.EnableTimerGroup "groupname", 0  ' disable the group
Jscript example
world.EnableTimerGroup ("groupname", 1);  // enable the group
world.EnableTimerGroup ("groupname", 0);  // disable the group
PerlScript example
$world->EnableTimerGroup ("groupname", 1);  # enable the group
$world->EnableTimerGroup ("groupname", 0);  # disable the group
Python example
world.EnableTimerGroup ("groupname", 1)  # enable the group
world.EnableTimerGroup ("groupname", 0)  # disable the group
Lua example
EnableTimerGroup ("groupname", true)  -- enable the group
EnableTimerGroup ("groupname", false)  -- disable the group
Lua notes
The enabled flag is optional, and defaults to true.
Returns A count of the number of items in that group.
Introduced in version 3.27

See also ...

Function Description
DeleteGroup Deletes a group of triggers, aliases and timers
DeleteTimerGroup Deletes a group of timers
EnableAliasGroup Enables/disables a group of aliases
EnableGroup Enables/disables a group of triggers, aliases and timers
EnableTriggerGroup Enables/disables a group of triggers
GetTimerInfo Gets details about a timer

Search for script function

Enter a word or phrase in the box below to narrow the list down to those that match.

The function name, prototype, summary, and description are searched.

Search for:   

Leave blank to show all functions.


Return codes

Many functions return a "code" which indicates the success or otherwise of the function.

You can view a list of the return codes


Function prototypes

The "prototype" part of each function description lists exactly how the function is called (what arguments, if any, to pass to it).

You can view a list of the data types used in function prototypes


View all functions

[Back]

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 FutureQuest]