( BamStaff v2.1.3 by Mbamh - written 11/18/97 Copyright 1997 Andy Hector [Mbamh] Description: A really neat staff-listing program which is fairly customizable. Great for keeping track of wizards or help staffers. Supports two changeable fields per list member. Setup: link an action [ex: 'wizzes'] to this program type ' #add ' to add players type ' #prefs' to customize your list see '" .tell "< type '.r' to redo the previous line >" .tell "< type '.end' when you're done >" .tell 1 begin dup intostr "< Insert at line " swap strcat " >" strcat .tell read dup not if pop continue then dup ".h*" smatch if pop "< Welcome to Mbamh's dinky lseditor >" .tell "< type '.r' to redo the previous line >" .tell "< type '.end' when you're done >" .tell continue then dup ".r*" smatch if pop dup 1 = not if 1 - then continue then dup ".e*" smatch if pop pop break then dup ".*" smatch if pop "< ** Invalid command. Type '.h' for help. ** >" .tell continue then swap dup intostr swap rot rot "_footer/" swap strcat swap trig rot rot -1 addprop 1 + repeat " " .tell "Footer list has been saved." .tell ; : help "BamStaff v2.1.3 by Mbamh - written 11/18/97" .tell "------------------------------------------------------------" .tell command @ " - display this list" strcat .tell command @ " #help - this help screen" strcat .tell trig "_prefs/zzzshow" getpropstr dup not if pop " " then "nope" smatch if command @ " #all - list ALL members" strcat .tell then me @ "WIZARD" flag? if command @ " #prefs - set prefs for this list (W only)" strcat .tell command @ " #add - add a player (W only)" strcat .tell command @ " #delete - delete a player (W only)" strcat .tell then me @ intostr dup "_members/" swap strcat trig swap getpropstr dup not if pop " " then smatch if command @ " #field1 - edit your '" strcat trig "_prefs/field1" getpropstr dup not if pop "Jurisdiction" then strcat "' field (members only)" strcat .tell trig "_prefs/fields" getpropstr dup not if pop " " then "2" smatch if command @ " #field2 - edit your '" strcat trig "_prefs/field2" getpropstr dup not if pop "Email" then strcat "' field (members only)" strcat .tell then command @ " #duty on/off - go on/off duty (members only)" strcat .tell then "------------------------------------------------------------" .tell ; : go-duty me @ intostr "_members/" swap strcat trig swap getpropstr dup not if pop " " then me @ intostr smatch not if "You're not a member of this list." .tell exit then 5 strcut strip "on*" smatch if trig "_duty/" me @ intostr strcat remove_prop "You go on duty." .tell else trig "_duty/" me @ intostr strcat "off" -1 addprop "You go off duty." .tell then ; : name-status-etc "Name Status " trig "_prefs/fields" getpropstr dup not if pop " " then "2" smatch if trig "_prefs/field2" getpropstr dup not if pop "Email" then 23 .strfmt strcat then trig "_prefs/field1" getpropstr dup not if pop "Jurisdiction" then 31 .strfmt strcat .tell trig "_prefs/style" getpropstr dup not if pop " " then "2" smatch if "------------------------------------------------------------------------------" .tell else "---- ------ " trig "_prefs/fields" getpropstr dup not if pop " " then "2" smatch if trig "_prefs/field2" getpropstr dup not if pop "-----" strcat else strlen dup 0 = if pop " " else begin dup 0 = if pop break then 1 - "-" rot swap strcat swap repeat then then 46 .strfmt then trig "_prefs/field1" getpropstr dup not if pop "------------" strcat else strlen dup 0 = if pop " " else begin dup 0 = if pop break then 1 - "-" rot swap strcat swap repeat then then .tell then ; : dibber trig "_footer/" nextprop dup not if pop "If someone is off duty, please do not bother him or her" .tell "Idle players are on duty, but may be slow to respond" .tell " " .tell exit else trig "_footer/" nextprop trig swap getpropstr dup not if pop " " .tell exit else .tell 1 begin dup intostr "_footer/" swap strcat trig swap nextprop dup not if pop "mbamh" then trig swap getpropstr dup not if pop break then .tell 1 + repeat " " .tell then then ; : prefs me @ "WIZARD" flag? not if "Permission Denied." .tell exit then begin " " .tell "Prefs for list: " command @ strcat .tell "--------------------------------" .tell "please choose an option:" .tell " " .tell "1 - set the list header" .tell "2 - configure list fields" .tell "3 - lsedit the footer" .tell "4 - set list style and function" .tell "Q - leave preferences" .tell "--------------------------------" .tell " " .tell read dup "1*" smatch if pop "Please enter a new list header or a period '.' for the default." .tell read dup ".*" smatch if trig "_prefs/header" remove_prop "Default selected." .tell else trig swap "_prefs/header" swap -1 addprop "Header changed." .tell then continue then dup "2*" smatch if pop "How many fields would you like in your list? [1 or 2]" .tell read dup "1*" smatch if trig "_prefs/fields" remove_prop "1 field selected." .tell else trig "_prefs/fields" "2" -1 addprop "2 fields selected." .tell then " " .tell "Please enter a name for field 1, or a period '.' for the" .tell "default, 'Jurisdiction'." .tell read dup ".*" smatch if trig "_prefs/field1" remove_prop "Default selected." .tell else trig swap "_prefs/field1" swap -1 addprop "Field 1 changed." .tell then " " .tell trig "_prefs/fields" getpropstr if "Please enter a name for field 2, or a period '.' for the" .tell "default, 'Email'." .tell read dup ".*" smatch if trig "_prefs/field2" remove_prop "Default selected." .tell else trig swap "_prefs/field2" swap -1 addprop "Field 1 changed." .tell then continue then " " .tell "Field configuration finished!" .tell continue then dup "3*" smatch if pop "Type a period '.' to use the default footer, or type" .tell "anything else to lsedit a new one." .tell read trig "_footer" remove_prop dup ".*" smatch if "Default selected." .tell else dinky-lseditor then continue then dup "4*" smatch if pop "What list style would you like? There are 2 styles: 1 and 2." .tell read "2*" smatch if trig "_prefs/style" "2" -1 addprop "Style 2 selected." .tell else trig "_prefs/style" remove_prop "Style 1 selected." .tell then " " .tell "Would you like your list to display sleeping players? [Y/N]" .tell read "n*" smatch if trig "_prefs/zzzshow" "nope" -1 addprop else trig "_prefs/zzzshow" remove_prop then " " .tell "Style and function config finished!" .tell continue then dup "q*" smatch if pop break then repeat " " .tell "Preferences exited." .tell "Done." .tell ; : field-1 me @ intostr "_members/" swap strcat trig swap getpropstr dup not if "You are not a member of this list." .tell exit else pop then 7 strcut swap pop dup not if me @ intostr "_field1/" swap strcat trig swap remove_prop "Field 1 removed." .tell exit then strip field1 ! trig "_members/" me @ intostr strcat getpropstr me @ intostr smatch if trig "_field1/" me @ intostr strcat field1 @ -1 addprop "Field 1 Updated." .tell else "You are not a member of this list." .tell then ; : field-2 me @ intostr "_members/" swap strcat trig swap getpropstr dup not if "You are not a member of this list." .tell exit else pop then 7 strcut swap pop dup not if me @ intostr "_field2/" swap strcat trig swap remove_prop "Field 2 removed." .tell exit then strip field1 ! trig "_members/" me @ intostr strcat getpropstr me @ intostr smatch if trig "_field2/" me @ intostr strcat field1 @ -1 addprop "Field 2 updated." .tell else "You are not a member of this list." .tell then ; : add 4 strcut swap pop strip .pmatch dup int -1 > if me @ "WIZARD" flag? not if "Permission Denied." .tell exit then intostr dup playername ! "_members/" swap strcat dup trig swap getpropstr dup not if pop " " then playername @ smatch if "That player is allready on this list." .tell exit then trig swap playername @ -1 addprop "Player added." .tell else "That player does not exist." .tell then ; : delete 7 strcut swap pop strip .pmatch dup int -1 > if me @ "WIZARD" flag? not if "Permission Denied." .tell exit then intostr dup playername ! "_members/" swap strcat dup trig swap getpropstr playername @ smatch not if "That player is not on this list." .tell exit then trig swap remove_prop "_duty/" playername @ strcat trig swap remove_prop "_field1/" playername @ strcat trig swap remove_prop "_field2/" playername @ strcat trig swap remove_prop "Player removed." .tell else "That player does not exist." .tell then ; : show-me-da-player-line playername @ 10 .strfmt duty @ 13 .strfmt strcat trig "_prefs/fields" getpropstr dup not if pop " " then "2" smatch if field2 @ 23 .strfmt strcat then field1 @ strcat 78 .strfmt trig "_prefs/zzzshow" getpropstr dup not if pop " " then "nope" smatch if swap dup rot swap dup awake? if "DARK" flag? if me @ "WIZARD" flag? if .tell else pop then else .tell then else pop pop then else .tell then ; : display pop " " .tell trig "_prefs/header" getpropstr dup not if pop "Displaying List: " command @ 1 strcut tolower swap toupper swap strcat strcat then .tell " " .tell trig "_prefs/fields" getpropstr dup not if pop " " then name-status-etc trig "_members/" nextprop dup not if "There aren't any registered now." .tell exit then begin dup not if break then dup trig swap getpropstr atoi dbref dup player? not if pop nextprop continue then dup name playername ! dup awake? not if "[Sleeping]" duty ! else dup "DARK" flag? if me @ "WIZARD" flag? if "[Dark]" duty ! else "[Sleeping]" duty ! then else dup intostr "_duty/" swap strcat trig swap getpropstr if "[Off Duty]" duty ! else dup descriptors begin dup 1 = if pop descrcon break else swap pop 1 - continue then repeat conidle dup 120 < if "[On Duty]" duty ! pop else 60 / intostr "[Idle " swap strcat "m]" strcat duty ! then then then then dup intostr "_field1/" swap strcat trig swap getpropstr dup not if pop " " field1 ! else field1 ! then dup intostr "_field2/" swap strcat trig swap getpropstr dup not if pop " " field2 ! else field2 ! then show-me-da-player-line pop trig swap nextprop repeat trig "_prefs/style" getpropstr dup not if pop " " then "2" smatch if "------------------------------------------------------------------------------" .tell else " " .tell then dibber ; : all-list trig "_prefs/zzzshow" getpropstr dup not if pop " " then "nope" smatch if trig "_prefs/zzzshow" remove_prop display trig "_prefs/zzzshow" "nope" -1 addprop else display then ; : bamstaff dup not if display exit then dup "#l*" smatch if all-list exit then dup "#al*" smatch if all-list exit then dup "#ad*" smatch if add exit then dup "#de*" smatch if delete exit then dup "#du*" smatch if go-duty exit then dup "#field1*" smatch if field-1 exit then dup "#field2*" smatch if field-2 exit then dup "#p*" smatch if prefs exit then dup "#h*" smatch if help exit then "Type " command @ strcat " #help for help" strcat .tell ;