@program glow-rnd-msgs.muf 1 1000 d i ( Glow compatible random messager. Runs as a MUF daemon in the background, uses less cycles then MPI ambience. Props: /rndmsg#/ - list of messages to spit at random /rndmsg: - MPI prop saying when to spit messages, which it does when the MPI statement evaluates false. Usage: lsedit here=rndmsg .end Messages come once a minute unless you throttle them by: @set here=rndmsg:{mod:{&how},5} Makes the message display once every 5 minutes, {&how} increments once a minute @set here=rndmsg:{ge:{dice:100},25} Makes a 25% chance that a message will pop up Any MPI statement that evaluates to false will trigger a message. ) $include $lib/alynna $include $lib/lmgr lvar param lvar target lvar tmp lvar cnt lvar cmp : main param ! begin " " cnt ! #-4 online pop begin target ! target @ #-4 dbcmp if break then target @ location int intostr " " swap " " strcat strcat cmp ! cnt @ cmp @ instr not if cnt @ cmp @ strcat cnt ! then repeat "-4" cnt @ strip " " explode pop begin atoi target ! target @ -4 = if break then target @ dbref "rndmsg" #0 "minute" getprop intostr 1 parseprop atoi not if target @ dbref "rndmsg#" envprop swap pop if random "rndmsg" target @ dbref lmgr-getcount % 1 + "rndmsg" target @ dbref lmgr-getelem target @ dbref #-1 rot notify_except then then repeat #0 "minute" over over getprop 1 + setprop 60 sleep repeat ; . c q