GetTimerOption
Script function

world.GetTimerOption

DOC_scripting Read about scripting

Type

Method

Summary

Gets the value of a named timer option

Prototype

VARIANT GetTimerOption(BSTR TimerName, BSTR OptionName);

DOC_data_types View list of data type meanings


Description

Gets the current value of a timer option.

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

The return type is Variant, so the returned value will be the appropriate type for the data (ie. string or number (long)).

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

If the named timer 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).

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

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

OPTION NAMES

"active_closed" - active if world closed flag
"at_time" - true if at a specific time, false if at an interval
"enabled" - enabled flag
"group" - group name
"hour" - which hour
"minute" - which minute
"note" - time does a world.note flag
"offset_hour" - offset hour
"offset_minute" - offset minute
"offset_second" - offset second
"one_shot" - oneshot flag
"script" - script routine to call
"second" - which second
"send" - what to send
"send_to" - where to send it (see GetTimerInfo for values)
"speed_walk" - speedwalk flag
"user" - user value (for scripting)
"variable" - variable to set



VBscript example

world.note world.GetTimerOption ("mytimer", "group")



Jscript example

world.note (world.GetTimerOption ("mytimer", "group"));



PerlScript example

$world->note ($world->GetTimerOption ("mytimer", "group"));



Python example

world.note (world.GetTimerOption ("mytimer", "group"))



Lua example

Note (GetTimerOption ("mytimer", "group"))



Lua notes

Lua returns nil where applicable instead of an "empty variant" or "null variant".



Return value

As described above.




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_IsTimer IsTimer (Tests to see if a timer exists)
FNC_ResetTimer ResetTimer (Resets a named timer)
FNC_ResetTimers ResetTimers (Resets all timers)
FNC_SetTimerOption SetTimerOption (Sets the value of a named timer option)

(Help topic: function=GetTimerOption)

DOC_contents Documentation contents page