Register forum user name Search FAQ

MUSHclient scripting

Description of MUSHclient world function: world.DeleteTriggerGroup


Name DeleteTriggerGroup
Type Method
Summary Deletes a group of triggers
Prototype long DeleteTriggerGroup(BSTR GroupName);
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 delete an entire group of triggers do this:

world.DeleteTriggerGroup "groupname"

For debugging purposes the function returns a count of the number of members deleted. eg.

dim mycount
mycount = world.DeleteTriggerGroup ("groupname")

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

WARNING - if the trigger is executing a script it cannot be deleted. For example, a trigger cannot delete itself.

If you need to delete a trigger from within itself use DoAfterSpecial to delete it after a short delay. You might also want to use EnableTriggerGroup to disable it first.

Since DeleteTriggerGroup deletes multiple triggers, any found to be "in use" (that is, executing a script) will not be deleted.


Note: Available in version 3.29 onwards.


VBscript example
world.DeleteTriggerGroup "groupname"
Jscript example
world.DeleteTriggerGroup ("groupname");
PerlScript example
$world->DeleteTriggerGroup ("groupname");
Python example
world.DeleteTriggerGroup ("groupname")
Lua example
DeleteTriggerGroup ("groupname")
Returns A count of the number of items deleted.
Introduced in version 3.29

See also ...

Function Description
DeleteAliasGroup Deletes a group of aliases
DeleteGroup Deletes a group of triggers, aliases and timers
DeleteTimerGroup Deletes a group of timers
DeleteTrigger Deletes a trigger
DoAfterSpecial Adds a one-shot, temporary, timer to carry out some special action
EnableAliasGroup Enables/disables a group of aliases
EnableGroup Enables/disables a group of triggers, aliases and timers
EnableTimerGroup Enables/disables a group of timers
EnableTriggerGroup Enables/disables a group of triggers
GetAliasInfo Gets details about an alias
GetTimerInfo Gets details about a timer
GetTriggerInfo Gets details about a named trigger

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]

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.