@program xstat.muf 1 10000 d i $include $lib/alynna ( Xstat.muf ) var statuses : mkstatus ( Status : Label Full name IC? Mlevel Color ) { "IC" { "IC" "In character" 1 0 "GREEN" }array "OOC" { "OOC" "Out of character" 0 0 "RED" }array "AFK" { "AFK" "Away from keyboard" -1 0 "YELLOW" }array "IDL" { "IDL" "Idle" 0 0 "BLUE" }array "WIZ" { "WIZ" "Wizard on duty" 0 5 "PURPLE" }array "HS" { "HS" "Helpstaff on duty" 0 -1 "PURPLE" }array "IIC" { "IIC" "Invite-in-character" 1 0 "GREEN" }array "SLP" { "SLP" "Sleep" 0 0 "BLUE" }array }dict statuses ! ; : main ( Get supported statuses ) mkstatus var! param ( Basic sanity checks ) ( Strip 'go' from command ) command @ "go*" smatch if command @ 2 strcut swap pop command ! then ( And check if the status is valid ) statuses @ command @ [] array? if ( Read stuff we need out of array .. ) statuses @ command @ [] 0 [] var! stat statuses @ command @ [] 1 [] var! text statuses @ command @ [] 2 [] var! ic statuses @ command @ [] 3 [] var! level statuses @ command @ [] 4 [] var! color ( Permchecks ) me @ mlevel level @ < if { "^RED^Permission denied." }tell exit then ( print stat change ) { "^AQUA^" me @ " goes [^" color @ "^" stat @ "^AQUA^] ^" color @ "^" text @ "^AQUA^.^ ^" }atell else param @ toupper stat ! -1 ic ! { "^AQUA^" me @ " goes [^WHITE^" stat @ "^AQUA^].^ ^" }atell then ( Set lib-standard IC ) me @ "~status" stat @ setprop ic @ 0 >= if ic @ 1 >= if me @ "~ic?" "yes" setprop else me @ "~ic?" "no" setprop then then ; . c q