Schedulable scripts
From Hack/Mine Wiki
(Difference between revisions)
(Created page with "'''Schedulable scripts''' are Spellscript scripts that may be scheduled to run on the server at intervals dictated by their return values. ==Creation== They may be create...") |
(MjOZPN Im obliged for the article post. Much obliged.) |
||
Line 1: | Line 1: | ||
'''Schedulable scripts''' are [[Spellscript]] scripts that may be scheduled to run on the server at intervals dictated by their return values. | '''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. | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
==Return Value== | ==Return Value== |
Revision as of 22:49, 18 July 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.
Return Value
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.
Carelessly returning zero in all cases will deadlock your server! Don't do that.
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.