Living Fiction's Globals

I get numerous requests from players to get copies of my +who, +finger, +where, +whois and other regular global commands. It's not that the globals we use on LF are any better than any other globals (in fact, they're worse in almost all cases), but people don't know where to go to get this kind of code when they're starting a new game.

Category: Globals

Instructions

Copy and paste the below code into a compatible MUSH or MUX.

MUSHCode for Living Fiction's Globals

@@ Living Fiction's Globals
@@
@@ The material listed here and in glob.txt is public domain. Feel free to use, alter and distribute freely.
@@
@@ I get numerous requests from players to get copies of my +who, +finger, +where, +whois and
@@ other regular global commands. It's not that the globals we use on LF are any better than any other
@@ globals (in fact, they're worse in almost all cases), but people don't know where to go to get this kind
@@ of code when they're starting a new game. There are globals available for download and use at
@@ ftp.tinymush.org in the public mushcode sections. I recommend trying there before you resort to using
@@ LF's globals, which I wrote by hand before I knew ftp.tinymush.org existed. They are probably easily
@@ hackable, but mine have the advantage of being straightforward, and all stored on the same object.
@@
@@ So, here are my globals for all to use, peruse and abuse. After a few months with these babies, I'm
@@ sure you'll want to write your own very soon.
@@
@@ Enjoy!
@@
@@ -Kirra (Dee Dreslough, Living FictionMUSH)
@@ Disclaimer:
@@
@@ I make no warantee as to the effectiveness, DB-uncorrupting-ness, unhackableness of these globals.
@@ You're on your own, kid.
@@
@@ What's Included in this Package:
@@
@@ +who, showing name, flags, location, flags, and title.
@@ +where, showing location if the player and the room they're in are not set Unfindable.
@@ +last, showing the last logon of a character, or Connected if they're online
@@ +title, showing the title of a player
@@ +finger, showing Email, Real_Life, From, Title, Alias, Sex, and a message
@@ +whois, showing Name, Desc, Numbers, Alias, Title.
@@ +gimme, to give players 1000 pennies at thier request
@@ +poll, to allow players to change the poll on the fly
@@ +suggest <message>, to let players anonymously communicate with you
@@ +check suggestions, to let players check the suggestions made.
@@
@@
@@ A rudimentary multipage, with no bells or whistles.
@@
@@ +Help for all these features.
@@ What's NOT included:
@@
@@ A mailer - I recommend the BrandyMailer, available from ftp.tinymush.org
@@ A +Com System - I'll cover that in a later download page. I'm still cleaning up mine.
@@ There are also probably coms available from ftp.tinymush.org
@@ A +Board bulletin board - I'm also still cleaning up mine for another download file.
@@ These are available at ftp.tinymush.org. That I know.
@@
@@ I've also cut out things like +mudlist, +cowz, +players, +tutors, +pledges, +sponsores
@@ and other LF specific commands that most folks don't have a use for.
@@ Directions:
@@
@@ These commands will create two objects - Globals for MUSH and Multipage. You recompile
@@ them and put them in your Master Room and start using them immediately.
@@ Notes on use:
@@
@@ It's a good idea to use your God char to make these attributes Visual and Public (or
@@ inform your players that they'll need to set these attributes on themselves Visual.):
@@ TITLE FROM EMAIL REAL_LIFE MESSAGE
@@
@@ You need to change the permissions on Doing to !need_player, so that +poll works.
@@
@@ You'll also need to replace #229 in +gimme with an object set Wizard. Uselock the thing,
@@ and lock the crap out of it, and then hide it so no one can get to it and mess with it.

@create Dee's Weird Ideas=10

@VB Dee's Weird Ideas=$+who:@pemit v(#)=There are [words(lwho())] people connected.%r[ljust(NAME,15)]%b[ljust(FLAGS,10)]%b[ljust(LOCATION,15)]%b[ljust(# and FLAGS,10)]%b[center(TITLE,15)]%r==============================================================================;@dolist lwho()=@pemit v(#)=[switch([gt([strlen(name(##))],15)],1,[delete(name(##),15,[sub([strlen(Name(##))],15)])],0,[ljust(Name(##),15)])]%b[switch([gt([strlen(flags(##))],10)],1,[delete(flags(##),10,[sub([strlen(flags(##))],10)])],0,[ljust(flags(##),10)])]%b[switch(flags(##),*U*,Unfindable%t%b%b%b---%b%b,[switch(flags(loc(##)),*#-1*,Unfindable%t%b%b%b---%b%b,[switch([gt([strlen(name(loc(##)))],15)],1,[delete(name(loc(##)),15,[sub([strlen(Name(loc(##)))],15)])],0,[ljust(Name(loc(##)),15)])]%b[loc(##)][switch(flags(loc(##)),*J*,RJ,R )])])]%b[switch([gt([strlen([get(##/title)])],25)],1,[delete([get(##/title)],25,[sub([strlen([get(##/title)])],25)])],0,[ljust([get(##/title)],25)])]

@VC Dee's Weird Ideas=$+finger *:@pemit v(#)=[switch(num(*[v(0)]),*#-1*,I'm sorry... [v(0)] doesn't seem to exist.,%r============================================================================%r[name(num(*[v(0)]))]-[num(*[v(0)])][flags(num(*[v(0)]))]%r============================================================================%rIn Real Life: [get_eval(*[v(0)]/real_life)]%rFrom: [get_eval(*[v(0)]/from)]%rEmail: [switch([gt([strlen([get(*[v(0)]/Email)])],70)],1,[delete([get(*[v(0)]/Email)],70,[sub([strlen([get(*[v(0)]/Email)])],70)])],0,[ljust([get(*[v(0)]/Email)],70)])]%rTitle: [switch([gt([strlen([get(*[v(0)]/title)])],70)],1,[delete([get(*[v(0)]/title)],70,[sub([strlen([get(*[v(0)]/title)])],70)])],0,[ljust([get(*[v(0)]/title)],70)])]%rSex: [switch([gt([strlen([get(*[v(0)]/sex)])],70)],1,[delete([get(*[v(0)]/sex)],70,[sub([strlen([get(*[v(0)]/sex)])],70)])],0,[ljust([get(*[v(0)]/sex)],70)])]%rAlias: [switch([gt([strlen([get(*[v(0)]/alias)])],70)],1,[delete([get(*[v(0)]/alias)],70,[sub([strlen([get(*[v(0)]/alias)])],70)])],0,[ljust([get(*[v(0)]/alias)],70)])]%rLast Connect: [get(*[v(0)]/last)]%t%tConnected? [switch(flags(*[v(0)]),*c*,Yes,No)]%rMessage: [get_eval(*[v(0)]/message)])]

&FINGY Dee's Weird Ideas=$+finger:@pemit v(#)=You need to specify a name to +finger.%rSyntax: +finger <player>%t Example: +finger Kirra

&BASEHELP Dee's Weird Ideas=$+help:@pemit v(#)==========================The Living Fiction +Commands========================%r%rThese +commands are available currently:%r%r+who%t%t%t+finger <player>%t+who <player>%r+whois <player>%t%t+NEW%t%t%t+Cross%r+where <player>%t%t+suggest <suggestion>%t+check suggestions%r+players%t%t+tutors %t%t+mudlist%r+cowz%t%t%t+gimme (FREE MONEY!)%t+poll <message>%r%r+com - The communications system%t+board - the bulletin board%r+mail (type +mailhelp mail for info.)%r%rTo get help on a +feature, type +help <+commandname>.%tExample: +help %t+finger%r=============================================================================

&HELPWHO Dee's Weird Ideas=$+help +who:@pemit v(#)=To get a list of players, their locations if available, flags, and their title, type +who.%r%rSyntax: +who%r%r+who also has an option to check the information on a single person. You'll get their name, flags, and location if available, title, and a notice about whether or not they're connected. %r%rExample: +who Kirra%r%rNAME%tFLAGS%t%tLOCATION%tFLAGS%t%tTITLE%t%tON?%r=============================================================================%rKirra%t#134-PcW%tKirra's Place%t#333-RLJ%tAdmin- Page_ok!%tY%r%rSyntax: +who <player>

&HELPFINGER Dee's Weird Ideas=$+help +finger:@pemit v(#)=+finger is a command used to get a specific list of information on players.%r%rTo use +finger, just type +finger <player>, Example: +finger Kirra.%r%r+finger displays these fields:%r%rName-Number and Flags, 'In Real Life', From, Email, Title, Sex, Alias and Mesage.%r%rPlayers can set these fields themselves, so they are viewable when any other player +fingers them.%r%tTo set 'In Real Life', type: &Real_life me=<message>%r%nd of the list. See +help +suggest for more information.

&SAFEWHERE Dee's Weird Ideas=$+where:@pemit %#=To use +where, you need to specify a player.%r%rExample: +where Kirra

&PENNIES Dee's Weird Ideas=$+gimme:@force #229=give %#=1000;@pemit %#=Thank you for using the Living Fiction ATM service.

(Author's note...#229 is a wizard object..Kinda unsafe to have hanging around a game, but Living Fiction was a very open place.)


&HELPGIMME Dee's Weird Ideas=$+help +gimme*:@pemit %#=The +Gimme Command%r%rPlayers have requested a way to get pennies when they need them. The +Gimme command will provide any player with 1000 pennies. Please do not abuse this feature -- our provider would not like it if our DB swelled and took over it's current machine. {Building will be unlimited (until we start crashing out the machine :) )%r%rSyntax: +gimme

&POLL Dee's Weird Ideas=$+poll *:@switch gt(sub([secs()],[get(#222/timer)]),900)=0,{@pemit %#=I'm sorry! The poll was recently changed. Try again in a few minutes.},{&timer #222=[secs()];@dolist lwho()=@switch [get(##/poll)]={YES},{@pemit ##=%N just changed the poll to: [secure(%0)]},{})];@force #229=@doing/header [secure(%0)]}

&HELPPOLL Dee's Weird Ideas=$+help +poll:@pemit %#=The +Poll Command%r%rThis command allows players to change the header in the WHO list from anywhere in the MUSH. The poll can only be changed with +poll once every 15 minutes or so, to avoid annoying people with the poll change announcement. To use the command, type:%r%R+poll <New Poll Message> %t%tExample: +poll Favorite Movie:%r%rEveryone on the MUSH with their Poll attribute set to 'yes' will receive a notice saying: %N just changed the poll to: Favorite Movie:%r%rYOU WILL ONLY get this message if you type this:%r&poll me=YES%r@set me/poll=visual%r%rThe poll command was bothering a number of players, so you need to set this special attribute on yourself to hear it now. A vote of 17 to 4 to remove the notifier is the reason for this change.

&TITLECHECK Dee's Weird Ideas=$+title *:@pemit %#=[name(num(*%0))]==> [get(*[v(0)]/title)]

&PEEK2 Dee's Weird Ideas=$+whois *:@pemit v(#)=[switch([num(*[v(0)])],*#-1*,I'm sorry... but [v(0)] doesn't exist. Check your spelling and try again.,[center([name(num(*[v(0)]))],75,=)]%r[get_eval(*%0/desc)]%rSex: %b%b[get_eval(*[v(0)]/sex)]%rAlias: [get_eval(*[v(0)]/alias)]%rTitle: [get_eval(*[v(0)]/title)])]

@VA Dee's Weird Ideas=$+who *:@pemit v(#)=[ljust(NAME,15)]%b[ljust(FLAGS,10)]%b[ljust(LOCATION,15)]%b[ljust(# and FLAGS,10)]%b[center(TITLE,15)]%b%b%b%bOn?%r==============================================================================;@pemit v(#)=[switch([gt([strlen(name(*%0))],15)],1,[delete(name(*%0),15,[sub([strlen(Name(*%0))],15)])],0,[ljust(Name(*%0),15)])]%b[switch([gt([strlen(flags(*%0))],10)],1,[delete(flags(*%0),10,[sub([strlen(flags(*%0))],10)])],0,[ljust(flags(*%0),10)])]%b[switch(flags(*%0),*U*,Unfindable%t%b%b%b---%b%b,[switch(flags(loc(*%0)),*#-1*,Unfindable%t%b%b%b---%b%b,[switch([gt([strlen(name(loc(*%0)))],15)],1,[delete(name(loc(*%0)),15,[sub([strlen(Name(loc(*%0)))],15)])],0,[ljust(Name(loc(*%0)),15)])]%b[loc(*%0)][switch(flags(loc(*%0)),*J*,RJ,R )])])]%b[switch([gt([strlen([get(*%0/title)])],25)],1,[delete([get(*%0/title)],25,[sub([strlen([get(*%0/title)])],25)])],0,[ljust([get(*%0/title)],25)])]

&HELPMAIL Dee's Weird Ideas=$+help +mail:@pemit %#=Due to the fact that we're using the Brandy Mailer as an interim mailer, the command to get help on the system is +mailhelp mail. Sorry about the lack of continuity. - Mngmt :)

&LASTLY Dee's Weird Ideas=$+last *:@switch [num(*%0)]=#-1,@pemit %#= I'm sorry... that player doesn't seem to exist.,@pemit %#=[name(num(*%0))] was last on on: [get([num(*%0)]/last)]

&ALTWHO Dee's Weird Ideas=$who:@pemit %#=Try WHO (all caps);@pemit %#=WHO

&ALTQUIT Dee's Weird Ideas=$quit:@pemit %#=Try QUIT (all caps);@pemit %#=QUIT

&HELPMULTIPAGE Dee's Weird Ideas=$+help mp:@pemit %#=The multipage command works like this:%r%rmp <names>=<message> to send a spoken message (like 'say') to a list.%r%rmp <names>=:<message> to send a pose to a list.%r%rExamples: %r%rmp Kirra Dragon=Hi!%r%rmp Kirra Dragon=:waves!%r%r+mail Kirra if you find bugs. This feature is Beta - not yet final. Pick up your own personal multipager in Kirra's Salvation Army in ARea 3 off Crossroads to see the code.

@set Dee's Weird Ideas=VISUAL

@set Dee's Weird Ideas=IMMORTAL

@set Dee's Weird Ideas=SAFE

@name Dee's Weird Ideas=Globals for MUSH


@create Multipage=10
&MP Multipage=$mp *=*:@switch [match(mid([v(1)],0,1),:)]={1},{@dolist [cat(%0,%#)]=@switch [flags(*##)]={*c*},{@pemit *##=%N [delete([v(1)],0,1)] (Multipage to: %0)},{}},{@dolist [cat(%0,%#)]=@switch [flags(*##)]={*c*},{@pemit *##=%N says "%1" (Multipage to: %0)},{}}
@set Multipage=VISUAL