ALARM

Syntax: #ALA timepattern command
Related: #TRIGGER

Allows you to set up a trigger based upon the time, rather than what is received from the MUD. The timepattern can contain a specific time, or can include wildcards as shown below. If preceded with a minus (-), the connection time is used rather than the current time.

Typically, the timepattern has the format hours:minutes:seconds, although the hours and minutes are optional. If missing, the hours or minute parameter is assumed to be an asterisk wildcard. In place of a specific numeric value, you can use an asterisk to match any value, or you can list several values separated by the OR operator (|). You can also use the special wildcard *value which will match when the time MOD the value is zero. E.g. *10 matches 10, 20, 30, etc. Finally, you can put parenthesis around the wildcards to save the values matched to the %1..%9 parameters.

You can also define a temporary, one-time alarm by specifying a plus (+) in front of the time. The command is executed when the alarm goes off and the alarm is then deleted.

ALARM examples

#ALARM -30:00 {save}
The hour isnít specified, so it defaults to *. Thus, this trigger saves your game every 30 minutes of connect time.
 
#ALARM 3:00:00 {gossip "Why arenít you sleeping?"}
This triggers at 3am local time.
 
#ALARM -59:(55|56|57|58|59) {#SHOW 60-%1}
Ok, hereís a complicated one. The pattern starts with a minus sign, so its going to look at the connection time. Then the hour parameter is missing, so any hour will match. The minutes is specified at 59. The seconds match 55 or 56 or 57 or 58 or 59, and the actual value matched is saved to %1 because of the parenthesis. The command then takes %1 (the matched seconds), subtracts it from 60 and says the result. The final result of this trigger is on the last 5 seconds of every hour, you say "5" "4" "3" "2" "1".
 
#ALARM +5 {save}
Executes the "save" command in 5 seconds. This is a one-time alarm that deletes itself once it has executed.


Contents ADDKEY ALIAS