SetTriggerOption
Script function

world.SetTriggerOption

DOC_scripting Read about scripting

Type

Method

Summary

Sets the value of a named trigger option

Prototype

long SetTriggerOption(BSTR TriggerName, BSTR OptionName, BSTR Value);

DOC_data_types View list of data type meanings


Description

Sets the current value of a trigger option.

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

For a detailed description about the meanings of the fields, see AddTrigger.

If SetTriggerOption is called from within a plugin, the triggers for the current plugin are used, not the "global" MUSHclient triggers.

For numeric options (such as sequence) the supplied string will be converted to a number. It is an error if the string does not consist of digits (0 to 9).



VBscript example

world.SetTriggerOption "mytrigger", "match", "north"



Jscript example

world.SetTriggerOption ("mytrigger", "match", "north");



PerlScript example

$world->SetTriggerOption ("mytrigger", "match", "north");



Python example

world.SetTriggerOption ("mytrigger", "match", "north")



Lua example

SetTriggerOption ("mytrigger", "match", "north")



Return value

eInvalidObjectLabel: The trigger name is not valid
eTriggerCannotBeEmpty: The "match_text" cannot be empty
eScriptNameNotLocated: The script name cannot be located in the script file
eBadRegularExpression: The regular expression could not be evaluated
eOK: set OK


DOC_errors View list of return code meanings


See Also ...

Topics

DOC_aliases Aliases
DOC_defaults Default triggers/aliases/timers/macros/colours
DOC_starting Getting started
DOC_group Groups
DOC_plugins Plugins
DOC_regexp Regular Expressions
DOC_timers Timers
DOC_triggers Triggers

Functions

FNC_AddTrigger AddTrigger (Adds a trigger)
FNC_AddTriggerEx AddTriggerEx (Adds a trigger - extended arguments)
FNC_DeleteTemporaryTriggers DeleteTemporaryTriggers (Deletes all temporary triggers)
FNC_DeleteTrigger DeleteTrigger (Deletes a trigger)
FNC_DeleteTriggerGroup DeleteTriggerGroup (Deletes a group of triggers)
FNC_EnableTrigger EnableTrigger (Enables or disables a trigger)
FNC_EnableTriggerGroup EnableTriggerGroup (Enables/disables a group of triggers)
FNC_GetPluginTriggerInfo GetPluginTriggerInfo (Gets details about a named trigger for a specified plugin)
FNC_GetPluginTriggerList GetPluginTriggerList (Gets the list of triggers in a specified plugin)
FNC_GetTrigger GetTrigger (Gets details about a named trigger)
FNC_GetTriggerInfo GetTriggerInfo (Gets details about a named trigger)
FNC_GetTriggerList GetTriggerList (Gets the list of triggers)
FNC_GetTriggerOption GetTriggerOption (Gets the value of a named trigger option)
FNC_GetTriggerWildcard GetTriggerWildcard (Returns the contents of the specified wildcard for the named trigger)
FNC_IsTrigger IsTrigger (Tests to see if a trigger exists)

(Help topic: function=SetTriggerOption)

DOC_contents Documentation contents page