@program #226 1 10000 d i ( set-status.muf version 1.1 by Raven@ChaosMUCK E-mail: raven3@vnet.net ) (-----------------------------Description------------------------------------) ( A simple program for status handling and checking. ) ( It will also check a player's status prop and reset it if it is not valid. ) ( This reset can be overridden via the @/overide~status?:yes propsetting ) (--------------------------------Setup---------------------------------------) ( Add the program to the _connect and _arrive queues on #0 ) ( @propset #0=dbref:_connect/validstatus: ) ( @propset #0=dbref:_arrive/validstatus: ) ( If you REALY dont want to enforce status settings just forgo the above ) ( propsetings. It really defeats the purpos of having status settings. IMHO ) ( Create an @action called: ) ( status;goic;goiic;goinv;goooc;gooc;goidl;gobzy;gowiz;qgoic;qgoiic;.... ) ( ... qgoinv;qgoooc;qgooc;qgoidl;qgobzy;qgowiz;goafk;qgoafk;godnd;.... ) ( qgodnd;gohs;qgohs WHEW! ) ( This program MUST be set WIZARD! ) (-----------------------------Permissions------------------------------------) ( Distribute to all MUCKs freely. Please NOTIFY the author as to where this ) ( program is ported to. The author reserves the right to upgrade and edit ) ( this program as he sees fit to do so. WIZARDS may edit this program to ) ( make NESSESARY changes for your individual MUCK's needs. PLEASE DOCUMENT ) ( ANY and ALL changes within the program and EMAIL the documented changes to ) ( raven3@vnet.net. The author takes no responcibility for abuse of this ) ( program. Please report all bugs or problems to the author. Thankyou! :> ) (*PROGRAM UPDATES can be found@: http://users.vnet.net/raven3/homepage.html ) (------------------------------History---------------------------------------) ( Version 1.0 - First Release. ) ( Version 1.1 - Added NPC, GST, DND, AFK, and HS modes; expanded help ) ( to include feeps. Added easteregg :> ) ( Bugfix 1.1 - Arrgh! One slipped by me. Guests were getting crashes ) ( due to a missing dup or me @ in a setprop for the ) ( enforcement routines. ) (---------------------------Custom Versions!---------------------------------) ( I am willing to write versions of this program to fit your individual ) ( MUCK's needs. ) (----------------------------------------------------------------------------) (Property used to identify who is helpstaff) $def helpstaff "@/helpstaff?" : helpstaff? ( d -- i ) helpstaff getpropstr .yes? ; $def rpstaff "~rp-staff" : rpstaff? ( d -- i ) rpstaff getpropstr .yes? ; (------------------------------------------) : showrps "RPS -- RP-staff. Players with the RPS flag are RP-staffers who\r" " are showing their badge. Players with this flag are usually\r" " OOC, but some rpstaff may be IC with this flag to show that\r" " they are willing to help. If you have a question of whether\r" " the person is IC or OOC just ask.\r" strcat strcat strcat strcat .tell ; : shownew "NEW -- A NEW player character has joined the MUCK. Everyone be friendly\r" " and welcome them. Often this status means that the player still\r" " has some setup to do before joining in on the IC fun. Players\r" " with the NEW status are to be treated as being OOC!" strcat strcat strcat .tell ; : showgst "GST -- Guest. A guest is a special character on most MUCKs that allows\r" " someone who does not have their own character to log in and take\r" " a look around. Be NICE to guests! They might be potential members\r" " of your MUCK. Players with GST are to be treated as being OOC!\r" " Wizards must manually set this status on a character. Why would\r" " someone other than a guest want to use this setting?\r" strcat strcat strcat strcat strcat .tell ; : shownpc "NPC -- Non-Player Character. Upon occation the administrators of a MUCK\r" " require special characters for technical reasons. Things like\r" " a character to own all the public rooms and programs. Or the\r" " character required for the NEONET program (If you dont know\r" " what that means dont worry bout it.) The reasons vary. If you\r" " see someone or something with this status setting. Dont try to\r" " get too personal, there might not be anyone on the other end.\r" " Or it is the administrator and they are likely very busy. Of\r" " course any character set NPC is to be treated as being OOC!\r" " Wizards must manually set this status on a character. Why would\r" " someone other than an NPC want to use this setting?\r" strcat strcat strcat strcat strcat strcat strcat strcat strcat strcat .tell ; : showooc "OOC -- Out Of Character. This means that you are you real life, not the\r" " character being portrayed on-line. This also means you are not\r" " 'there' to be involved in any IC activity. To those IC you are\r" " essentialy an invisible observer. Feel free to ingore anything\r" " that is ICly going on around you.... but don't join in unless\r" " you change your status to IC." strcat strcat strcat strcat strcat .tell ; : showidle "IDL -- Idle. Well we all know what the definition of idle means. This\r" " status means that we should expect that the player is distracted\r" " by real life and will suddenly go idle or is idling. Responces\r" " from IDL players may me slow or not at all. Players with the\r" " IDL status are to be treated as being OOC!" strcat strcat strcat strcat .tell ; : showafk "AFK -- Away From Keyboard. If you dont know what this means, you are\r" " not connected via a computer... hey! you there with the green\r" " shirt, how are you doing that? Um... well anyway, when you see\r" " someone with this setting, don't expect a responce. Usually when\r" " a player is set AFK they are nowhere near the computer and wont\r" " likely see anything that you send to them unless it is through\r" " page #mail. Dont be suprised if the player suddenly disconnects.\r" " Also in some cases a player will set themselves AFK if they are\r" " at work or very distracted by real life and not frequently at\r" " the keyboard. If you are talking with someone set AFK expect\r" " sudden unannounced bouts of idling. Players with the AFK\r" " status setting are to be treated as being OOC!" strcat strcat strcat strcat strcat strcat strcat strcat strcat strcat strcat .tell ; : showbusy "BZY -- Busy. Have you ever been on-line and just simply got too\r" " involved in that building project you been working on? Or were\r" " occupied writing that neat description? Well this one is for you\r" " folks and furs! It means that you are not idle but are simply\r" " too busy to be responsive to those nearby. IF you see someone\r" " else with this status, don't expect a timely responce... or\r" " a polite one for that matter. (Grrr... what do you want!?)\r" " Players with the BZY status are to be treated as being OOC!" strcat strcat strcat strcat strcat strcat strcat .tell ; : showdnd "DND -- Do Not Disturb. Just like it says a player who has this sign\r" " up does not wish to be disturbed. If you see someone with\r" " status setting, it would be a good idea to leave them alone\r" " unless you want a mean reply. In many cases a person set as\r" " DND will also be set HAVEN and cannot be paged. One could\r" " normaly just leave page #mail with them, but simply leaving\r" " them alone is realy the best policy. Players with the DND\r" " status setting are to be treated as being OOC!\r" strcat strcat strcat strcat strcat strcat strcat .tell ; : showhs " HS -- Helpstaff. Wizards have their own status flag, why not letting\r" " helpstaff have one also? Players with the HS flag are members\r" " of your MUCK's helpstaff or RP staff who would like to wear a\r" " badge showing their position and availability to give help or\r" " advice to those who need it. This flag generaly falls under the\r" " catagory, someone with this flag should be assumed to be OOC!\r" " Some helpstaff occationaly go IC while keeping this flag to\r" " let others they are still available for help. If you have a\r" " question of whether the person is IC or OOC just ask.\r" strcat strcat strcat strcat strcat strcat strcat strcat .tell ; : showwiz "WIZ -- Wizard. Uh oh! Someone better watch out. If a wizard steps in\r" " and sets that status they are announcing that they are there\r" " on some kind of official matter. Now this isn't allways a bad\r" " thing, they may be there just to help out, but the WIZ flag is\r" " a wizard's way of wearing his badge where everyone can see it.\r" " Anything they do is under the authority and responcibility of\r" " their post and is an official act as such. This flag does not\r" " nessesarily mean they are on-duty and open for questions.\r" " Wizards with the WIZ status flag on are allways concidered as \r" " being OOC!" strcat strcat strcat strcat strcat strcat strcat strcat strcat .tell ; : showic "IC -- In Character. This means that you are the character you are\r" " logged into and portraying. This is not you RL but a character,\r" " so expect to be treated accordingly. Characters that are IC will\r" " react and interact to and with you. Those that are OOC will tend\r" " to ignore you and you should pretend that OOC players are not\r" " even there." strcat strcat strcat strcat strcat .tell ; : showiic "IIC -- Invite IC. This is just like the \"In Character\" setting but it\r" " indicates that you are actively looking for something to do.\r" " It means you will join just about any TP activity that happens\r" " along. This was a concept barrowed from my idea on FurryFaire.\r" " You ICaddicts will love this one! Be warned! Being set IIC\r" " indicates that you are willing to be dragged into any TP that\r" " comes along whether it is to your taste or not." strcat strcat strcat strcat strcat strcat .tell ; : showinv "INV -- Invisible. This means that your character cannot be seen by fur\r" " nor contraption. Simple enough, you're either hidden or\r" " invisibly cloaked somehow. However, YOU ARE STILL IC! This means\r" " that you may still be effected by the odd stray lazer or thrown\r" " rock that comes your way. Just a hint... you better have a good\r" " and VALID reason for this setting ICly, or OOCly you'll be a bit\r" " put off when the other players start snubbing you." strcat strcat strcat strcat strcat strcat .tell ; : showall shownew " " .tell showgst " " .tell shownpc " " .tell showooc " " .tell showidle " " .tell showafk " " .tell showbusy " " .tell showdnd " " .tell showhs " " .tell showwiz " " .tell showic " " .tell showiic " " .tell showinv ; : showfeeps " Set-status.muf version 1.1 by Raven\r" "------------------------------[FEEPS]-------------------------------\r" "Here are some miscellaneous notes about some other features of\r" "set-status.muf:\r" " -When a player goes into INV mode a property _cloaked? is set to\r" " 'yes' In all other modes that property is removed.\r" " -The property '~/powergamer?:yes' set on a player will prevent\r" " then from going INV. These are usually only useful on RP MUCKS\r" " -There is atleast ONE easteregg in this program. Dont worry\r" " wizzies, its just a harmless one.\r" strcat strcat strcat strcat strcat strcat strcat strcat strcat .tell ; : tell ( s -- ) me @ location swap #-1 swap ansi_notify_except ; : do_help1 " Set-status.muf version 1.1 by Raven\r" "Status - IC/OOC - Description -- Commands\r" "--------------------------------------------------------------------\r" "NEW - OOC: NEW PLAYER! -- No command for this setting\r" "GST - OOC: Guest Player -- No command for this setting\r" "NPC - OOC: Non-Player Character -- No command for this setting\r" "OOC - OOC: Out Of Character -- GoOOC and QgoOOC\r" "IDL - OOC: Idle -- GoIDL and QgoIDL\r" "AFK - OOC: Away From Keyboard -- GoAFK and QgoAFK\r" "BZY - OOC: Busy! -- GoBZY and QgoBZY\r" "DND - OOC: Do Not Disturb! -- GoDND and QgoDND\r" "HS - OOC: Helpstaff On Duty -- GoHS and QgoHS\r" "RPS - OOC: RP-staff On Duty -- GoRPS and QgoRPS\r" "WIZ - OOC: Wizard Official Status -- GoWIZ and QgoWIZ\r" "IC - IC: In Character -- GoIC and QgoIC\r" "IIC - IC: Invite IC -- GoIIC and QgoIIC\r" "INV - IC: Cloaked or Invisible -- GoINV and QgoINV\r" "--------------------------------------------------------------------\r" "Descriptions can be found in the help menue via #help2" strcat strcat strcat strcat strcat strcat strcat strcat strcat strcat strcat strcat strcat strcat strcat strcat strcat strcat .tell ; : showmenu " Set-status.muf version 1.1 by Raven\r" "--------------------------------------------------------------------\r" " Status Definitions\r" " 1. NEW -- New Player or Undefined\r" " 2. GST -- Guest character login for the MUCK \r" " 3. NPC -- New Player or Undefined\r" " 4. OOC -- Out Of Character\r" " 5. IDL -- Gone Idle or Idlish, sometimes Away From Keyboard\r" " 6. AFK -- Not Present, Away From Keyboard.\r" " 7. BZY -- Player is Busy.\r" " 8. DND -- Do Not Disturb! Try not to bother a player set DND.\r" " 9. HS -- Helpstaff On Duty badge.\r" " 10. RPS -- RP-staff On Duty.\r" " 11. WIZ -- Wizard showing his\\her badge\r" " 12. IC -- In Character\r" " 13. IIC -- Invite In Character interactions\r" " 14. INV -- ICly invisible or cloaked from view.\r" " all -- Show ALL and quit\r" " commands -- Show available commands\r" " feeps -- For advanced users.\r" " quit -- Exits this Menue\r" "----------------------------------------" strcat strcat strcat strcat strcat strcat .tell ; : menuloop "\rSelect one, 'quit' OR or 'display' to redisplay the menu." .tell read tolower dup dup " " stringcmp not swap "display" stringcmp not or if showmenu else strip dup "1" stringcmp not if shownew else dup "2" stringcmp not if showgst else dup "3" stringcmp not if shownpc else dup "4" stringcmp not if showooc else dup "5" stringcmp not if showidle else dup "6" stringcmp not if showafk else dup "7" stringcmp not if showbusy else dup "8" stringcmp not if showdnd else dup "9" stringcmp not if showhs else dup "10" stringcmp not if showrps else dup "11" stringcmp not if showwiz else dup "12" stringcmp not if showic else dup "13" stringcmp not if showiic else dup "14" stringcmp not if showinv else dup "all" stringcmp not if showall else dup "commands" stringcmp not if do_help1 else dup "ooc" stringcmp not if showooc else dup "new" stringcmp not if shownew else dup "idl" stringcmp not if showidle else dup "afk" stringcmp not if showafk else dup "bzy" stringcmp not if showbusy else dup "dnd" stringcmp not if showdnd else dup "wiz" stringcmp not if showwiz else dup "ic" stringcmp not if showic else dup "iic" stringcmp not if showiic else dup "inv" stringcmp not if showinv else dup "npc" stringcmp not if shownpc else dup "gst" stringcmp not if showgst else dup "hs" stringcmp not if showhs else dup "rps" stringcmp not if showrps else dup "feeps" stringcmp not if showfeeps else dup "quit" stringcmp not if "Done." .tell exit then (WHEW! Dont you wish I knew about $lib/case? When I first wrote this?) then then then then then then then then then then then then then then then then then then then then then then then then then then then then then then then then (Yeesh! 30+ levels of nested if's! :) menuloop ; : do_help2 showmenu menuloop ; : easteregg (Shh, have a sence of fun. This little easteregg is for the players.) " You Found An EASTER EGG! Whee!\r" "-----------------------------------------------------------------------------\r" " ____ ____\r" " /' | | \\\r" " / / | | \\ \\\r" " / / | | | \\ \\\r" " ( / | \"\"\"\" |\\ \\ Ahhh HA!!!\r" " | / / /^\\ /^\\ \\ _| I love big bigcarrot!!!\r" " ~ | | | | | | ~\\\r" " | |__O|__|O__| |\r" " /~~ \\/ ~~\\\r" " / ( | ) \\\r" " _--_ /, \\____/^\\___/' \\ _--_\r" " /~ ~\\ / -____-|_|_|-____-\\ /~ ~\\\r" " /________|___/~~~~\\___/~~~~\\ __|________\\\r" "--~~~ ^ | | | | - : ~~~~~:~-_ ___-----~~~~|\r" " / `^-^-^' `^-^-^' : ~\\ /' ____/----|\r" " -- ; |/~~~------~~~~~|\r" " ; : : |------/--------|\r" ": , ; . |---\\\\----------|\r" " : - . : : |__________-__|\r" " : , , : /'~----_______|\r" "__ \\\\\\ ^ ,, ;; ;; ;._-~\r" " ~~~-----____________________________________----~~~ (art by 'unknown')\r" strcat strcat strcat strcat strcat strcat strcat strcat strcat strcat strcat strcat strcat strcat strcat strcat strcat strcat strcat strcat strcat strcat strcat .tell ; : matchallowed? ( s -- i ) dup "NEW" stringcmp not if pop 1 exit then dup "IC" stringcmp not if pop 1 exit then dup "IIC" stringcmp not if pop 1 exit then dup "INV" stringcmp not if pop 1 exit then dup "OOC" stringcmp not if pop 1 exit then dup "IDL" stringcmp not if pop 1 exit then dup "BZY" stringcmp not if pop 1 exit then dup "GST" stringcmp not if pop 1 exit then dup "NPC" stringcmp not if pop 1 exit then dup "AFK" stringcmp not if pop 1 exit then dup "DND" stringcmp not if pop 1 exit then me @ "truewizard" flag? if dup "WIZ" stringcmp not if pop 1 exit then then me @ helpstaff? if dup "HS" stringcmp not if pop 1 exit then then me @ rpstaff? if dup "RPS" stringcmp not if pop 1 exit then then pop 0 ; : do_valid me @ "@/guest?" getpropstr .yes? if me @ "~status" "GST" setprop then me @ "@/overide~status?" getpropstr .yes? not if me @ "~status" getpropstr strip strlen 1 < if me @ "~status" "NEW" setprop then me @ "~status" getpropstr strip matchallowed? not if me @ "~status" "OOC" setprop 2 sleep "##-## Invalid status! Your status has been reset to OOC! ##-##" .tell then then ; : goic me @ "_cloaked?" remove_prop me @ "~status" "IC" setprop "## " me @ name strcat " goes In Character. (^GREEN^IC^NORMAL^)" strcat tell ; : goiic me @ "_cloaked?" remove_prop me @ "~status" "IIC" setprop "## " me @ name strcat " goes Invite In Character. (^CYAN^IIC^NORMAL^)" strcat tell ; : goinv me @ "~/powergamer?" getpropstr .yes? if me @ "_cloaked?" remove_prop "## Sorry Powergamers are not allowed to do that! ##" .tell exit else me @ "_cloaked?" "yes" setprop me @ "~status" "INV" setprop "## " me @ name strcat " goes cloaked/invisible. (INV)" strcat tell then ; : goooc me @ "_cloaked?" remove_prop me @ "~status" "OOC" setprop "## " me @ name strcat " goes Out Of Character. (^RED^OOC^NORMAL^)" strcat tell ; : goidl me @ "_cloaked?" remove_prop me @ "~status" "IDL" setprop "## " me @ name strcat " goes Idle. (^BROWN^IDL^NORMAL^)" strcat tell ; : goafk me @ "_cloaked?" remove_prop me @ "~status" "AFK" setprop "## " me @ name strcat " goes away from keyboard. (^BROWN^AFK^NORMAL^)" strcat tell ; : gobzy me @ "_cloaked?" remove_prop me @ "~status" "BZY" setprop "## " me @ name strcat " is now Busy. (^BROWN^BZY^NORMAL^)" strcat tell ; : godnd me @ "_cloaked?" remove_prop me @ "~status" "DND" setprop "## " me @ name strcat " goes into DND mode. Please, Do Not Disturb! (^BROWN^DND^NORMAL^)" strcat tell ; : gowiz me @ "truewizard" flag? not if "## Sorry only WIZARDS can do that!" .tell exit then me @ "_cloaked?" remove_prop me @ "~status" "WIZ" setprop "## " me @ name strcat " goes WIZARD! (^PURPLE^WIZ^NORMAL^)" strcat tell ; : gohs me @ helpstaff? not if "## Sorry only HELPSTAFF can do that!" .tell exit then me @ "_cloaked?" remove_prop me @ "~status" "HS" setprop "## " me @ name strcat " sets themself Helpstaff On Duty! (^PURPLE^HS^NORMAL^)" strcat tell ; : gorps me @ rpstaff? not if "## Sorry only RPSTAFF can do that!" .tell exit then me @ "~status" "RPS" setprop "^## " me @ name strcat " sets themself RP-staff On Duty! (^PURPLE^RPS^NORMAL^)" strcat tell ; : qgoic me @ "_cloaked?" remove_prop me @ "~status" "IC" setprop "## You quietly go In Character. (IC)" .tell ; : qgoiic me @ "_cloaked?" remove_prop me @ "~status" "IIC" setprop "## You quietly go Invite In Character. (IIC)" .tell ; : qgoinv me @ "~/powergamer?" getpropstr .yes? if me @ "_cloaked?" remove_prop "## Sorry Powergamers are not allowed to do that! ##" .tell exit else me @ "_cloaked?" "yes" setprop me @ "~status" "INV" setprop "## You go cloaked/invisible. (INV)" .tell then ; : qgoooc me @ "_cloaked?" remove_prop me @ "~status" "OOC" setprop "## You quietly go Out Of Character. (OOC)" .tell ; : qgoidl me @ "_cloaked?" remove_prop me @ "~status" "IDL" setprop "## You quietly go Idle. (IDL)" .tell ; : qgoafk me @ "_cloaked?" remove_prop me @ "~status" "AFK" setprop "## You quietly go away from keyboard. (AFK)" .tell ; : qgobzy me @ "_cloaked?" remove_prop me @ "~status" "BZY" setprop "## You quietly set yourself as being Busy. (BZY)" .tell ; : qgodnd me @ "_cloaked?" remove_prop me @ "~status" "DND" setprop "## You quietly set yourself in Do Not Disturb mode. (DND)" .tell ; : qgowiz me @ "truewizard" flag? not if "## Sorry only WIZARDS can do that!" .tell exit then me @ "_cloaked?" remove_prop me @ "~status" "WIZ" setprop "## You quietly go WIZARD! (WIZ)" .tell ; : qgohs me @ helpstaff? not if "## Sorry only WIZARDS can do that!" .tell exit then me @ "_cloaked?" remove_prop me @ "~status" "HS" setprop "## You quietly set yourself as Helpstaff On Duty! (HS)" .tell ; : qgorps me @ rpstaff? not if "## Sorry only RP-staff can do that!" .tell exit then me @ "~status" "RPS" setprop "## You quietly set yourself as RP-staff On Duty! (RPS)" .tell ; : showstatus "## You are currently set " me @ "~status" getpropstr strcat .tell ; : main "me" match me ! tolower strip me @ player? if dup "connect" stringcmp not if pop do_valid exit then dup "arrive" stringcmp not if pop do_valid exit then then (Begin add) me @ thing? if me @ "Z" flag? not if exit then then (Added to keep puppets from being spammed.) dup "#help" stringcmp not if pop do_help1 exit then dup "#help1" stringcmp not if pop do_help1 exit then dup "#help2" stringcmp not if pop do_help2 exit then dup "#carrot" stringcmp not if pop easteregg exit then pop command @ strip tolower dup "gobunny" stringcmp not if pop easteregg exit then dup "gorabbit" stringcmp not if pop easteregg exit then dup "carrot" stringcmp not if pop easteregg exit then dup "goic" stringcmp not if pop goic exit then dup "goiic" stringcmp not if pop goiic exit then dup "goinv" stringcmp not if pop goinv exit then dup "goooc" stringcmp not if pop goooc exit then dup "gooc" stringcmp not if pop goooc exit then dup "gowiz" stringcmp not if pop gowiz exit then dup "gobzy" stringcmp not if pop gobzy exit then dup "goidl" stringcmp not if pop goidl exit then dup "qgoic" stringcmp not if pop qgoic exit then dup "qgoiic" stringcmp not if pop qgoiic exit then dup "qgoinv" stringcmp not if pop qgoinv exit then dup "qgoooc" stringcmp not if pop qgoooc exit then dup "qgooc" stringcmp not if pop qgoooc exit then dup "qgowiz" stringcmp not if pop qgowiz exit then dup "qgobzy" stringcmp not if pop qgobzy exit then dup "qgoidl" stringcmp not if pop qgoidl exit then dup "goafk" stringcmp not if pop goafk exit then dup "godnd" stringcmp not if pop godnd exit then dup "qgoafk" stringcmp not if pop qgoafk exit then dup "qgodnd" stringcmp not if pop qgodnd exit then dup "gohs" stringcmp not if pop gohs exit then dup "qgohs" stringcmp not if pop qgohs exit then dup "gorps" stringcmp not if pop gorps exit then dup "qgorps" stringcmp not if pop qgorps exit then dup "status" stringcmp not if pop showstatus exit then pop "Huh? I dont get it. Try 'status #help' for help." .tell ; . c q