This script is useful for when you want to have the player escape
in a set amount of time. It will keep running during battles...
# Run "startctr" first. Then, you can use the other scripts
# to find how much time has elapsed since startctr. It can't do
# seconds, though, so it's best to reserve this for long
# countdowns. It also can't do countdowns of more than 24
# hours -- if your game is more than 24 hours long, then let me
# know and I'll change the script to accomodate. ^_^
define script(autonumber,cmin,none) #returns minutes (from 0 to 59)
define script(autonumber,cmintotal,none) #returns minutes (total)
define script(autonumber,chr,none) #returns hours
# Note: Autonumbered scripts are used when a script need not be called from
# the game. These are meant to be called only from other scripts.
global variable (2,smin) #start minutes
global variable (3,shr) #start hours
# simple enough, just sets the starting variables to the current playtime.
variable(rvar) #"return variable"
if (rvar<<0) then (set variable(rvar,rvar+60))
if (minutesofplay<<smin) then (decrement(rvar))
if (rvar<<0) then (set variable(rvar,rvar+24))