$include $ansihack $def HEADER "status.muf -- Syvel@FurryFaire -- Wed May 29 18:57:04 PDT 1996" $def ansi_notify_except 3 parse_ansi notify_except ( Purpose: Works with 'NewWhoSpecies' to set a wiz-prop showing status of your character, IC for In-Character. IIC for Invite-In-Character. OOC for Out-Of-Character. IDL for Idling. NOC for No Status setting. HS for HelpStaff. WIZ for Wizards. Also tells others in the room when status is changed. **TODO** 1. Simply integrate this into NewWhoSpecies. ) $include $lib/reflist $define .tell me @ swap ansi_notify $enddef $def WIZFLAG "Mage" $def HS-LIST prog $ifdef __muckname=FurryFaire $def HS-LIST #225 $def WIZFLAG "Mage" $endif $ifdef __muckname=FoxMUCK $def HS-LIST #640 $def WIZFLAG "wizard" $endif $ifdef __muckname=YaftMUCK $def HS-LIST #296 $def WIZFLAG "mage" $endif $ifdef __muckname=ChaosMUCK $def HS-LIST #0 $def WIZFLAG "mage" $endif $ifdef __muckname=HerpHavenMUCK $def HS-LIST #168 $def WIZFLAG "wizard" $endif : issamestr? (s s -- i is same string?) stringcmp not ; : usenick? ( -- i ) me @ "_prefs/usenick?" getpropstr "yes" stringcmp if 0 else 1 then ; : ic me @ "~status" "IC" 0 addprop usenick? if me @ "%N" getprop else me @ name then dup not if pop me @ name then me @ "_OOC" getpropstr if me @ "_OOC" remove_prop then " goes [~&12-IC~&06-] In-Character." strcat "~&06-" swap strcat me @ location #-1 rot ansi_notify_except ; : iic me @ "~status" "IIC" 0 addprop usenick? if me @ "%N" getprop else me @ name then dup not if pop me @ name then me @ "_OOC" getpropstr if me @ "_OOC" remove_prop then " goes [~&12-IIC~&06-] Invite-In-Character." strcat "~&06-" swap strcat me @ location #-1 rot ansi_notify_except ; : ooc me @ "~status" "OOC" 0 addprop usenick? if me @ "%N" getprop else me @ name then dup not if pop me @ name then me @ "_OOC" "yes" 0 addprop " goes [~&17-OOC~&06-] Out-Of-Character." strcat "~&06-" swap strcat me @ location #-1 rot ansi_notify_except ; : idl me @ "~status" "IDL" 0 addprop usenick? if me @ "%N" getprop else me @ name then dup not if pop me @ name then " goes [~&03-IDL~&06-] Idling." strcat "~&06-" swap strcat me @ location #-1 rot ansi_notify_except ; : wiz me @ WIZFLAG flag? if me @ "~status" "WIZ" 0 addprop usenick? if me @ "%N" getprop else me @ name then dup not if pop me @ name then " goes [~&15-WIZ~&06-] Wizard OnDuty." strcat "~&06-" swap strcat me @ "_wizprefs/wizstat?" getprop dup if "no" issamestr? if " ~&03-[quiet]" strcat .tell else me @ location #-1 rot ansi_notify_except then else pop me @ location #-1 rot ansi_notify_except then else "~&15-Sorry, only a Wizard may change to WIZ status." .tell then ; : hs ( -- ; helpstaff setting ) HS-LIST "_Help-Staff" me @ REF-inlist? me @ WIZFLAG flag? or if me @ "~status" "HS" 0 addprop usenick? if me @ "%N" getprop else me @ name then dup not if pop me @ name then " goes [~&15-HS~&06-] HelpStaff OnDuty." strcat "~&06-" swap strcat me @ location #-1 rot ansi_notify_except else "~&15-Only a Helpstaff may change to HS status." .tell then ; : tp ( -- ) me @ "guest" flag? not me @ "@rp/notp" getprop not and if me @ "~status" "TP" 0 addprop usenick? if me @ "%N" getprop else me @ name then dup not if pop me @ name then " goes [~&15-TP~&06-] TP-Runner." strcat "~&06-" swap strcat me @ location #-1 rot ansi_notify_except else "~&15-You are not permitted to change to this status." .tell then ; : noc ( -- ; clear status column ) me @ "~status" remove_prop usenick? if me @ "%N" getprop else me @ name then dup not if pop me @ name then " clears %p status setting." strcat "~&06-" swap strcat me @ swap pronoun_sub me @ location #-1 rot ansi_notify_except ; : status ( main ) command @ dup "ic" issamestr? if pop ic exit then dup "goic" issamestr? if pop ic exit then dup "iic" issamestr? if pop iic exit then dup "goiic" issamestr? if pop iic exit then dup "ooc" issamestr? if pop ooc exit then dup "goooc" issamestr? if pop ooc exit then dup "idl" issamestr? if pop idl exit then dup "goidl" issamestr? if pop idl exit then dup "wiz" issamestr? if pop wiz exit then dup "gowiz" issamestr? if pop wiz exit then dup "hs" issamestr? if pop hs exit then dup "gohs" issamestr? if pop hs exit then dup "gotp" issamestr? if pop tp exit then dup "noc" issamestr? if pop noc exit then dup "gonoc" issamestr? if pop noc exit then "STATUS: Yikes! Something is wrong!" .tell ;