![]() My $eActiveWhenClosed = 32 # timer fires even when world is disconnected ![]() My $eTimerNote = 16 # timer does a world.note when it fires My $eTimerSpeedWalk = 8 # timer does a speed walk when it fires My $eOneShot = 4 # if set, timer only fires once My $eAtTime = 2 # if not set, time is "every" Var eTemporary = 16384 // temporary - do not save to world file Var eReplace = 1024 // replace existing timer of same name Var eActiveWhenClosed = 32 // timer fires even when world is disconnected Var eTimerNote = 16 // timer does a world.note when it fires Var eTimerSpeedWalk = 8 // timer does a speed walk when it fires Var eOneShot = 4 // if set, timer only fires once Var eAtTime = 2 // if not set, time is "every" Lua: timer_flag.Enabled + timer_flag.OneShotĬonst eAtTime = 2 ' if not set, time is "every"Ĭonst eOneShot = 4 ' if set, timer only fires onceĬonst eTimerSpeedWalk = 8 ' timer does a speed walk when it firesĬonst eTimerNote = 16 ' timer does a world.note when it firesĬonst eActiveWhenClosed = 32 ' timer fires even when world is disconnectedĬonst eReplace = 1024 ' replace existing timer of same nameĬonst eTemporary = 16384 ' temporary - do not save to world file Preferably use the constant declarations in your script file, and "OR" them together. For example, to enable the timer, and make it a one-shot, the flags would be 5. The flags can be one or more of the constants below. The maximum granularity of the timers is currently 0.1 seconds. To enable this you need to go to Global Configuration -> Timers and set the Timer Interval in seconds to zero. This lets you set up sub-second timers (eg. ScriptName: Which script subroutine to executeįrom version 3.61 onwards of MUSHclient the seconds part of the time may include fractions (ie. TimerName: name of this timer - may be empty (see rules for names below) ![]() You can use "DoAfter", "DoAfterNote", "DoAfterSpeedWalk" or "DoAfterSpecial" for a simplified way of adding timers. in 5 minutes) rather than happening every 5 minutes. This is useful for making a single thing happen in the future (eg. You can make a "one-shot" timer that does something once, and then deletes itself. Timers that fire at a certain time of day are intended to do things like start a new log file at midnight, warn you if when it is time to go to work, that sort of thing. save your world file every hour, drink a potion every minute, check your health every 10 seconds). Periodical timers (which fire after a certain time has elapsed) are intended for periodical events (eg. Timers can be used to cause something to happen periodically, either every x seconds, or at a certain time of day. Long AddTimer(BSTR TimerName, short Hour, short Minute, double Second, BSTR ResponseText, long Flags, BSTR ScriptName) View list of data type meanings ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |