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

MUSHclient scripting

Description of MUSHclient world function: world.GetPluginTriggerOption


Name GetPluginTriggerOption
Type Method
Summary Gets the value of a named trigger option for a specified plugin
Prototype VARIANT GetPluginTriggerOption(BSTR PluginID, BSTR TriggerName, BSTR OptionName);

View list of data type meanings

Description

Gets the current value of a trigger option for the specified plugin.

You must specify a plugin ID, the name of an existing trigger, and a trigger option from the list given under the description for GetTriggerOption. These are the same names as used in the XML world files for trigger options.

If you want to find the value of an trigger option in the current plugin, use "GetTriggerOption".

If you are writing a plugin and want to find "global" MUSHclient trigger values, use an empty plugin ID, eg.

world.Note world.GetPluginTriggerOption ("", "my_trigger", "enabled")


If the option name is not known, or is not allowed to be retrieved, a NULL variant is returned.

If the named trigger does not exist, EMPTY is returned. If the name given is invalid, NULL is returned. If the option name is not known, EMPTY is returned. (Use "IsEmpty" and "IsNull" to test for these possibilities).


See GetTriggerOption for a list of option names and values.


Note: Available in version 4.21 onwards.


VBscript example
Note GetPluginTriggerOption ("c8efc9f9e1edd118c6f2dbf5", "my_trigger", "enabled")
Jscript example
Note (GetPluginTriggerOption ("c8efc9f9e1edd118c6f2dbf5", "my_trigger", "enabled"));
PerlScript example
/$world->Note ($world->GetPluginTriggerOption ("c8efc9f9e1edd118c6f2dbf5", "my_trigger", "enabled"));
Python example
world.Note(world.GetPluginTriggerOption ("c8efc9f9e1edd118c6f2dbf5", "my_trigger", "enabled"))
Lua example
Note (GetPluginTriggerOption ("c8efc9f9e1edd118c6f2dbf5", "my_trigger", "enabled"))
Lua notes
Lua returns nil where applicable instead of an "empty variant" or "null variant".
Returns As described above.
Introduced in version 4.21

See also ...

Function Description
AddTrigger Adds a trigger
DeleteTrigger Deletes a trigger
GetPluginTriggerList Gets the list of triggers in a specified plugin
GetTriggerInfo Gets details about a named trigger
GetTriggerList Gets the list of triggers
GetTriggerOption Gets the value of a named trigger option

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]