$include $lib/rp $include $lib/alynna $def PARANOIA prog "?" flag? $def WAKERATE { "System" "Recovery" "Awake" }rpinfo atoi $def SLEEPRATE { "System" "Recovery" "Asleep" }rpinfo atoi $def RESRATE { "System" "Recovery" "Payday" }rpinfo atoi : recover[ d:target -- ] target @ { target @ physical target @ mphysical < if target @ "physical" over over getstat ++ setstat "^RED^Physical +1, " then target @ mental target @ mmental < if target @ "mental" over over getstat ++ setstat "^GREEN^Mental +1, " then target @ spiritual target @ mspiritual < if target @ "spiritual" over over getstat ++ setstat "^CYAN^Spiritual +1, " then target @ social target @ msocial < if target @ "social" over over getstat ++ setstat "^YELLOW^Social +1, " then target @ "p/Spirit" getstat not if target @ health target @ mhealth < if target @ "health" target @ health ++ 0 target @ mhealth limit setstat "^YELLOW^Health +1, " then target @ essence target @ messence < if target @ "essence" target @ essence ++ 0 target @ messence limit setstat "^PURPLE^Essence +1, " then else target @ mana target @ mmana < if target @ "mana" target @ mana ++ ++ 0 target @ mmana limit setstat "^WHITE^Mana +2, " then then "^WHITE^Refresh cycle complete." }cat "Refresh" pretty ansi_notify ; : unicron var clock ( peopleclocks ) #-1 "*" "P" find_array foreach swap pop var! target target @ "character_mode" getstat 256 = not if continue then target @ "clock/alive" over over getstat ++ dup clock ! setstat target @ awake? if ( Ops for awake people ) target @ "clock/awake" over over getstat dup clock ! ++ setstat ( Recover at WAKERATE ) clock @ WAKERATE % not if target @ recover then else ( Ops for sleeping people ) ( Recover at SLEEPRATE ) target @ "clock/asleep" over over getstat dup clock ! ++ setstat clock @ SLEEPRATE % not if target @ recover then then repeat ; : main background PARANOIA if "$avatar" match { "!wc #Aria begin: unicron.mod: tempo " #1 { "{stimestr:" "cron_interval" sysparm "}" }cat "@Mufcron" 0 parsempi ", beat @ " "%x %X" systime timefmt " (Internet beat time: " systime_precise 86400.0 fmod 86400.0 / 1000.0 * 3 fchop ")" }cat force then systime_precise var! x unicron systime_precise x @ - x ! PARANOIA if "$avatar" match { "!wc #Aria end: unicron.mod: tempo " #1 { "{stimestr:" "cron_interval" sysparm "}" }cat "@Mufcron" 0 parsempi ", finished processing tapestry beat in " x @ 4 fchop " seconds." }cat force then ;