SetTimerOption
Script function

world.SetTimerOption

DOC_scripting Read about scripting

Type

Method

Summary

Sets the value of a named timer option

Prototype

long SetTimerOption(BSTR TimerName, BSTR OptionName, BSTR Value);

DOC_data_types View list of data type meanings


Description

Sets the current value of a timer option.

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

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

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

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.SetTimerOption "mytimer", "minute", "5"



Jscript example

world.SetTimerOption ("mytimer", "minute", "5");



PerlScript example

$world->SetTimerOption ("mytimer", "minute", "5");



Python example

world.SetTimerOption ("mytimer", "minute", "5")



Lua example

SetTimerOption ("mytimer", "minute", "5")



Return value

eInvalidObjectLabel: The timer name is not valid
eTimeInvalid: Time is out of range (hours not 0 to 23, minutes/seconds not 0-59)
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_timers Timers
DOC_triggers Triggers

Functions

FNC_AddTimer AddTimer (Adds a timer)
FNC_DeleteTemporaryTimers DeleteTemporaryTimers (Deletes all temporary timers)
FNC_DeleteTimer DeleteTimer (Deletes a timer)
FNC_DeleteTimerGroup DeleteTimerGroup (Deletes a group of timers)
FNC_DoAfter DoAfter (Adds a one-shot, temporary timer - simplified interface)
FNC_DoAfterSpecial DoAfterSpecial (Adds a one-shot, temporary, timer to carry out some special action)
FNC_DoAfterSpeedWalk DoAfterSpeedWalk (Adds a one-shot, temporary speedwalk timer - simplified interface)
FNC_EnableTimer EnableTimer (Enables or disables an timer)
FNC_EnableTimerGroup EnableTimerGroup (Enables/disables a group of timers)
FNC_GetTimer GetTimer (Gets details about a timer)
FNC_GetTimerInfo GetTimerInfo (Gets details about a timer)
FNC_GetTimerList GetTimerList (Gets the list of timers)
FNC_GetTimerOption GetTimerOption (Gets the value of a named timer option)
FNC_IsTimer IsTimer (Tests to see if a timer exists)
FNC_ResetTimer ResetTimer (Resets a named timer)
FNC_ResetTimers ResetTimers (Resets all timers)

(Help topic: function=SetTimerOption)

DOC_contents Documentation contents page