MUDL:Timer

From SlothMUD Wiki
Revision as of 17:44, 11 March 2016 by Teker (Talk | contribs) (Created page with " __TOC__ = Overview = This MUDL function gets called each timer the mobile timer goes off. This is guaranteed to be at a regular interval - currently every 10 seconds. =...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Overview

This MUDL function gets called each timer the mobile timer goes off. This is guaranteed to be at a regular interval - currently every 10 seconds.


Command Syntax

addproc <room|mobile|object> mudl
setproc <room|mobile|object> ## timer_#

Note that the # sign after the timer indicates how frequently the function is called. A value of 1 indicates the function should be called every time the timer fires. A value of N indicates the function should be called every Nth time the timer fires.


Global Variables

The following global variables are available:

Name Type Description
 %c Character The mobile that the MUDL script is attached to.


Return Values

The return value from this function is ignored.


Triggered Scripts

Only mobile scripts are triggered by this event. They are triggered at a regular interval regardless if the mobile is idle, fighting, or otherwise engaged.


Example

addproc <mobile> mudl
setproc <mobile> 0 timer_1

cmd(%c, 'say The timer is firing now!'),
return(true)
@


setproc <mobile> 0 PROC_ENABLED 1
compile