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

EnableTrigger

Script function

world.EnableTrigger

Read about scripting

Type

Method

Summary

Enables or disables a trigger

Prototype

long EnableTrigger(BSTR TriggerName, BOOL Enabled);

View list of data type meanings

Description

Enables or disables the named trigger. An enabled trigger is "active", otherwise it is ignored when processing incoming text from the MUD.


VBscript example

world.EnableTrigger "monster", TRUE  ' enable trigger
world.EnableTrigger "monster", FALSE  ' disable trigger


Jscript example

world.EnableTrigger("monster", true);  # enable trigger
world.EnableTrigger("monster", false);  # disable trigger


Python example

world.EnableTrigger("monster", True)  # enable trigger
world.EnableTrigger("monster", False)  # disable trigger


Lua example

EnableTrigger("monster", true)  -- enable trigger
EnableTrigger("monster", false)  -- disable trigger


Lua notes

The enabled flag is optional, and defaults to true.


Return value

eInvalidObjectLabel: The trigger name is not valid
eTriggerNotFound: The named trigger does not exist
eOK: completed OK

View list of return code meanings

See Also ...

Topics

Aliases
Default triggers/aliases/timers/macros/colours
Getting started
Groups
Plugins
Regular Expressions
Timers
Triggers

Functions

(AddTrigger) Adds a trigger
(AddTriggerEx) Adds a trigger - extended arguments
(DeleteTemporaryTriggers) Deletes all temporary triggers
(DeleteTrigger) Deletes a trigger
(DeleteTriggerGroup) Deletes a group of triggers
(EnableTriggerGroup) Enables/disables a group of triggers
(GetPluginTriggerInfo) Gets details about a named trigger for a specified plugin
(GetPluginTriggerList) Gets the list of triggers in a specified plugin
(GetTrigger) Gets details about a named trigger
(GetTriggerInfo) Gets details about a named trigger
(GetTriggerList) Gets the list of triggers
(GetTriggerOption) Gets the value of a named trigger option
(GetTriggerWildcard) Returns the contents of the specified wildcard for the named trigger
(IsTrigger) Tests to see if a trigger exists
(SetTriggerOption) Sets the value of a named trigger option
(StopEvaluatingTriggers) Stops trigger evaluation

(Help topic: function=EnableTrigger)

Documentation contents page


Search ...

Enter a search string to find matching documentation.

Search for:   

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]