Difference between revisions of "MUDL:timer add event"

From SlothMUD Wiki
Jump to: navigation, search
(Created page with " __TOC__ = Summary = {|class="abilitiestable" border="0" cellspacing="0" cellpadding="0" ! Function Name | timer_add_event |- ! Settable | No |- ! Returns | Boolean |- | Pa...")
 
 
(One intermediate revision by the same user not shown)
Line 14: Line 14:
 
! Returns
 
! Returns
 
| Boolean
 
| Boolean
 +
|}
 +
 +
 +
{|class="abilitiestable" border="0" cellspacing="0" cellpadding="0"
 +
! Parameter Options
 +
|-
 +
| Queue Name (string), Time In Seconds (integer), Optional Data (string)
 +
|-
 +
| Queue Name (string), Time In Seconds (integer), Character, Optional Data (string)
 +
|-
 +
| Queue Name (string), Time In Seconds (integer), Item, Optional Data (string)
 +
|-
 +
| Queue Name (string), Time In Seconds (integer), Room, Optional Data (string)
 +
|-
 +
| Queue Name (string), Time In Seconds (integer), Area, Optional Data (string)
 +
|-
 +
| Config Parent (MUDL2 object), Proc Index (integer), Queue Name (string), Time In Seconds (integer), Optional Data (string)
 +
|-
 +
| Config Parent (MUDL2 object), Proc Index (integer), Queue Name (string), Time In Seconds (integer), Character, Optional Data (string)
 +
|-
 +
| Config Parent (MUDL2 object), Proc Index (integer), Queue Name (string), Time In Seconds (integer), Item, Optional Data (string)
 +
|-
 +
| Config Parent (MUDL2 object), Proc Index (integer), Queue Name (string), Time In Seconds (integer), Room, Optional Data (string)
 
|-
 
|-
| Parameter Options
+
| Config Parent (MUDL2 object), Proc Index (integer), Queue Name (string), Time In Seconds (integer), Area, Optional Data (string)
| Queue Name (string), Time In Seconds (integer), Optional Data (string)<br/>
+
Queue Name (string), Time In Seconds (integer), Character, Optional Data (string)<br/>
+
Queue Name (string), Time In Seconds (integer), Item, Optional Data (string)<br/>
+
Queue Name (string), Time In Seconds (integer), Room, Optional Data (string)<br/>
+
Queue Name (string), Time In Seconds (integer), Area, Optional Data (string)<br/>
+
 
|}
 
|}
  
Line 37: Line 55:
 
| <Queue Name>_ELEMENT_<Number>
 
| <Queue Name>_ELEMENT_<Number>
 
| A specially formatted value containing a single element in the queue.  Currently the value contains 5 entries separated by colons.
 
| A specially formatted value containing a single element in the queue.  Currently the value contains 5 entries separated by colons.
The text to be heard by the second actor.
 
 
|}
 
|}
  
Line 43: Line 60:
 
= Example =
 
= Example =
 
<pre>
 
<pre>
TBD
+
timer_add_event(%room, 0, 'MY_QUEUE', 300, %a, 'My Data')
 
</pre>
 
</pre>
  

Latest revision as of 00:13, 7 November 2018


Summary

Function Name timer_add_event
Settable No
Returns Boolean


Parameter Options
Queue Name (string), Time In Seconds (integer), Optional Data (string)
Queue Name (string), Time In Seconds (integer), Character, Optional Data (string)
Queue Name (string), Time In Seconds (integer), Item, Optional Data (string)
Queue Name (string), Time In Seconds (integer), Room, Optional Data (string)
Queue Name (string), Time In Seconds (integer), Area, Optional Data (string)
Config Parent (MUDL2 object), Proc Index (integer), Queue Name (string), Time In Seconds (integer), Optional Data (string)
Config Parent (MUDL2 object), Proc Index (integer), Queue Name (string), Time In Seconds (integer), Character, Optional Data (string)
Config Parent (MUDL2 object), Proc Index (integer), Queue Name (string), Time In Seconds (integer), Item, Optional Data (string)
Config Parent (MUDL2 object), Proc Index (integer), Queue Name (string), Time In Seconds (integer), Room, Optional Data (string)
Config Parent (MUDL2 object), Proc Index (integer), Queue Name (string), Time In Seconds (integer), Area, Optional Data (string)


This function manages a set of KVP keys and values to provide a method to queue events to occur in the future. If a form of the function is used that does not specify a Queue Parent or Procedure Index, the parent of the current MUDL script is used along with the current procedure index to store these values. Events that have been queued can be processed by the Queue Parent by periodically calling the timer_process_queue MUDL function.


Key Value Pairs

Arguments
<Queue Name>_INDEX An integer value that tracks the key name for the next queued element.
<Queue Name>_ELEMENT_<Number> A specially formatted value containing a single element in the queue. Currently the value contains 5 entries separated by colons.


Example

timer_add_event(%room, 0, 'MY_QUEUE', 300, %a, 'My Data')