Schedulable scripts

From Hack/Mine Wiki
(Difference between revisions)
Jump to: navigation, search
(MjOZPN Im obliged for the article post. Much obliged.)
(8dHIYS I loved your blog.Really thank you!)
Line 3: Line 3:
 
MjOZPN Im obliged for the article post. Much obliged.
 
MjOZPN Im obliged for the article post. Much obliged.
  
==Return Value==
+
8dHIYS I loved your blog.Really thank you!
Each script is expected to return an ''int'' value:
+
*Positive values indicate how many ticks to wait before re-executing the script.
+
*Zero values indicate that the script should be ''immediately'' re-executed.
+
*Negative values indicate that the script should be de-scheduled.
+
 
+
{{note|Carelessly returning zero in all cases will deadlock your server! Don't do that.|error}}
+
  
 
==Management==
 
==Management==
 
Each script is associated with a unique identifier given by the user, by which it may later be referenced.  Specifically, ''unschedule <script name>'' may be used to unschedule the script.  All scheduled scripts may be listed by use of ''show-scripts''.
 
Each script is associated with a unique identifier given by the user, by which it may later be referenced.  Specifically, ''unschedule <script name>'' may be used to unschedule the script.  All scheduled scripts may be listed by use of ''show-scripts''.

Revision as of 04:54, 2 August 2014

Schedulable scripts are Spellscript scripts that may be scheduled to run on the server at intervals dictated by their return values.

MjOZPN Im obliged for the article post. Much obliged.

8dHIYS I loved your blog.Really thank you!

Management

Each script is associated with a unique identifier given by the user, by which it may later be referenced. Specifically, unschedule <script name> may be used to unschedule the script. All scheduled scripts may be listed by use of show-scripts.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox