Register forum user name Search FAQ

DoAfterSpeedWalk

Script function

world.DoAfterSpeedWalk

Read about scripting

Type

Method

Summary

Adds a one-shot, temporary speedwalk timer - simplified interface

Prototype

long DoAfterSpeedWalk(long Seconds, BSTR SendText)

View list of data type meanings

Description

This routine adds an unlabelled, temporary, one-shot speedwalk timer, set to go off after the designated number of seconds. The first argument (seconds) must evaluate to a time between 0.1 second, and 23 hours 59 minutes 59 seconds (that is, 0.1 to 86,399).

From version 3.61 onwards of MUSHclient the interval may include fractions (ie. it is a floating-point number). This lets you set up sub-second intervals (eg. 0.5 seconds, 1.2 seconds).

To enable this you need to go to Global Configuration -> Timers and set the 'Timer Interval' in seconds to zero.

The maximum granularity of the timers is currently 0.1 seconds. In other words, regardless of what you specify, the timers are only checked every 10th of a second.

You can also use DoAfter if you do not wish to speed walk, or DoAfterNote if you want to send a note to the output window.

The purpose of this is simplify the frequent case of simply wanting to do something in a few seconds, rather than using AddTimer.


WARNING - as DoAfterSpeedWalk is implemented by using temporary MUSHclient timers, it will not work if timers are disabled. If DoAfterSpeedWalk is not working for you (however the function call is returning zero) then ensure that timers are enabled in the Timers configuration dialog.


Available in MUSHclient version 3.18 onwards.



VBscript example

world.DoAfterSpeedWalk 10, "5e 4s w"


Jscript example

world.DoAfterSpeedWalk (10, "5e 4s w");


PerlScript example

$world->DoAfterSpeedWalk (10, "5e 4s w");


Python example

world.DoAfterSpeedWalk (10, "5e 4s w")


Lua example

DoAfterSpeedWalk (10, "5e 4s w")


Return value

eTimeInvalid: The time is invalid (seconds not in range 0.1 to 86,399).
eOK: added OK

View list of return code meanings

See Also ...

Topics

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

Functions

(AddTimer) Adds a timer
(DeleteTemporaryTimers) Deletes all temporary timers
(DeleteTimer) Deletes a timer
(DeleteTimerGroup) Deletes a group of timers
(DoAfter) Adds a one-shot, temporary timer - simplified interface
(DoAfterNote) Adds a one-shot, temporary note timer - simplified interface
(DoAfterSpecial) Adds a one-shot, temporary, timer to carry out some special action
(EnableTimer) Enables or disables an timer
(EnableTimerGroup) Enables/disables a group of timers
(GetPluginTimerOption) Gets the value of a named timer option for a specified plugin
(GetPluginTriggerOption) Gets the value of a named trigger option for a specified plugin
(GetTimer) Gets details about a timer
(GetTimerInfo) Gets details about a timer
(GetTimerList) Gets the list of timers
(GetTimerOption) Gets the value of a named timer option
(IsTimer) Tests to see if a timer exists
(ResetTimer) Resets a named timer
(ResetTimers) Resets all timers
(SetTimerOption) Sets the value of a named timer option

(Help topic: function=DoAfterSpeedWalk)

Documentation contents page


Search ...

Enter a search string to find matching documentation.

Search for:   

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.