From 747c32e03c305b791dbe8ed7b2b95322137ecb1b Mon Sep 17 00:00:00 2001 From: brazilofmux Date: Wed, 7 Feb 2007 13:24:38 +0000 Subject: [PATCH] Add SGP installer basis for building SGP minimal database distributed in TinyMUX. git-svn-id: https://tinymux.googlecode.com/svn/branches/dev_brazil@1134 d1b986fa-651c-0410-a323-35a8662cf44d --- sgp/HOWTO-CHAR-SHEETS.txt | 172 +++++++++++ sgp/HOWTO-LIST-OBJECT.txt | 98 +++++++ sgp/PLACES-SGP.txt | 242 +++++++++++++++ sgp/SGP-+help.txt | 197 +++++++++++++ sgp/SGP-@crontab.txt | 133 +++++++++ sgp/SGP-Installer.txt | 398 +++++++++++++++++++++++++ sgp/SGP-README.txt | 277 ++++++++++++++++++ sgp/SGP-RPpack.txt | 106 +++++++ sgp/SGP-plushelp.txt | 568 ++++++++++++++++++++++++++++++++++++ sgp/SGP-staffhelp.txt | 413 ++++++++++++++++++++++++++ sgp/SGPCgen-help.txt | 383 ++++++++++++++++++++++++ sgp/SGPVBCgenCode.txt | 310 ++++++++++++++++++++ sgp/Trinity-lib.txt | 247 ++++++++++++++++ sgp/WODTestMortalScript.txt | 69 +++++ sgp/WoD-lib.txt | 302 +++++++++++++++++++ sgp/crontab.txt | 35 +++ sgp/installer-blank.txt | 176 +++++++++++ 17 files changed, 4126 insertions(+) create mode 100644 sgp/HOWTO-CHAR-SHEETS.txt create mode 100644 sgp/HOWTO-LIST-OBJECT.txt create mode 100644 sgp/PLACES-SGP.txt create mode 100644 sgp/SGP-+help.txt create mode 100644 sgp/SGP-@crontab.txt create mode 100644 sgp/SGP-Installer.txt create mode 100644 sgp/SGP-README.txt create mode 100644 sgp/SGP-RPpack.txt create mode 100644 sgp/SGP-plushelp.txt create mode 100644 sgp/SGP-staffhelp.txt create mode 100644 sgp/SGPCgen-help.txt create mode 100644 sgp/SGPVBCgenCode.txt create mode 100644 sgp/Trinity-lib.txt create mode 100644 sgp/WODTestMortalScript.txt create mode 100644 sgp/WoD-lib.txt create mode 100644 sgp/crontab.txt create mode 100644 sgp/installer-blank.txt diff --git a/sgp/HOWTO-CHAR-SHEETS.txt b/sgp/HOWTO-CHAR-SHEETS.txt new file mode 100644 index 000000000..3728daf54 --- /dev/null +++ b/sgp/HOWTO-CHAR-SHEETS.txt @@ -0,0 +1,172 @@ +SGP Cgen +HOWTO-Character Sheets: 110901 +---------------------------------------------------------------------- + + +To begin making character sheets, you first have to define how many +different types of characters that you have and what kinds of data the +sheet needs to display for them. There are two schools of thought as +to how to approach this task. + +One is to create a large command that calls all the various strings, +stats, and list, using switches to determine what data is shown +according to some factor like race, character class, or some other +virtue. This is likely advantageous on systems where there are very +few different types of characters or there isn't much difference +between the types of sheets needed to display. ie, if your game has +fighters, magicians, and clerics, and there isn't a lot of other +stuff to consider about the races that might be playing those classes, +then certainly one big command makes sense. + +However, as the relationship between various factors involved in dis- +playing a character sheet become more numerous or complex, it is +often better to create different sheets for different things. A +fighter might be a dwarf or a human. A magic user might be a vampire +or an elf. Both situations can possibly require you to design dis- +plays that take those variations into account. + +((You will have to also account for these complexities and +restrictions in the way that you build the display conditions in the ++stats commands themselves. For instance, in some systems, a single +factor such as race determines the look and properties of character +sheet(WoD). Others look at something like race and then have a +character class or faction affiliation to consider(Triniy or D&D).)) + +For the purposes of discussion, this HOWTO covers the second method. + +The words of the day are 'simplicity' and 'readability'. + +In general, readable code is best. It is not always true, but in +most cases, it serves the coder and the user better at the end of the +day. Large, clumsy, complicated switches in code are hard to debug, +and can also hit invokation and recursion limits -very- quickly. +Modular design is also very good for systems with multiple sheet +display attributes. That said, you need to look at your system and +decide what is best. + +Now is the time that you look at the game system and play with a text +editor to design how your sheet will look overall. Decide where you +want the strings, stats, and lists to appear, put the in order and +then sit back with it. Sections of the sheet should be seperated by +headings that say what the section is. Each of the major sections of +the sheet should be made so they live inside an @pemit statement, +strung together into a cohesive whole with semicolons ';'. This way, +it is harder for the code to bottom out on one of the hard limits of +the server itself(4k/8k buffer limits, invokation, recursion, etc...). + +---------------------------------------------------------------------- + +&CMD-STATS SGP Cgen: WoD Support Code=$+stats:@trigger +#140/SHEET-[get(%#/string-race)]=%#,%# + +The above is an example of a player-level sheet command. The code +uses @trigger and the results of get(/string-race) to choose +appropriate &SHEET- to display. This code returns nothing if the race +attribute is unset(and note that it isn't a particulary great command +because it lacks adequate error checking). Joe is a mortal and the +code finds and emits the contents of &SHEET-MORTAL back to him. This +is but one way to deal with selecting which sheet to use and certainly +not the only one. The staff command takes an argument, and provides +more error checking. + +&SHEET-MORTAL SGP Cgen: WoD Support Code=@pemit %1=[center(<%b%b[name(%0)]%b%b>,78,=)]%R[u(fn-display-strings,%0,Race:STRING-RACE|Birthday:STRING-BIRTHDAY|Nature:STRING-NATURE|Demeanor:STRING-DEMEANOR|Concept:STRING-CONCEPT|XP:XP)]%r[u(#140/fn_attributes,*%0)]%r[u(#140/fn_abilities,*%0)]%r[center(%bMiscellaneous%b,78,~)]%r[u(#140/FN_3LISTSCOL,get(*%0/statlist-backgrounds),get(*%0/statlist-virtues),get(*%0/statlist-pools))]; @pemit %1=[u(#140/fn_common-lists,*%0)];@pemit %1=%r[u(#140/FN_HEALTH,%0)]%R[repeat(=,78)] + +The code @pemit to %1, not %0 or %# in this case. Through the magic +of MUSHCode, %1 becomes %# in the command itself. Isn't that nice and +confusing? Now, look at the section from the beginning of the first +@pemit to the first ';'. This part of the code displays the name of +the character, centered in the middle of a line 78 spaces long, padded +with '='. It is then followed by invokation of FN-DISPLAY-STRINGS to +call a list of &STRING attributes on the character object as specified. +FN-DISPLAY-STRINGS creates a two column display as seen below. It is +more than possible to create string manipulation functions that use as +few as 1 and 3 or more columns of display. + +Example: + +==================================< Joe >=================================== +Race: Mortal Birthday: Jan 1, 2000 +Nature: Loner Demeanor: Crabby +Concept: Computer Geek XP: + + +The rest of the first @pemit uses two special utility functions, +FN_ATTRIBUTES and FN_ABILITIES. FN_ATTRIBUTES creates the header line +and then uses the more general FN_3VCOL to produce the display from a +single list of stats. It doesn't actually pick the order of how things +are displayed, but lets the order of the stats on the attribute decide. +FN_ABILITIES uses FN_3LISTSCOL to produce an alphabetically sorted, 3 +column listing based on the contents of as many as 6 attributes on the +character object. + +Example: + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Attributes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Strength 2 Charisma 2 Perception 2 +Dexterity 2 Manipulation 2 Intelligence 2 +Stamina 2 Appearance 2 Wits 4 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Abilities ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Acting 2 Animal ken 2 Bureaucracy 2 +Alertness 2 Drive 2 Computer 8 +Athletics 2 Etiquette 2 Finance 4 +Brawl 2 Investigation 2 +Dodge 2 Science 3 + + +Finally, the first section is completed with the making of a new +header line and a listing of miscellaneous stats using FN_3LISTSCOL. + +Example: + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Miscellaneous ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Contacts 4 Conscience 4 Blood 10 +Fame 2 Courage 3 Willpower 7 +Resources 5 + + +The second @pemit calls the utility function, FN_COMMON-LISTS, and +checks the character object for specialties, merits, flaws, equip- +ment. Joe has Merits and Flaws, but no specialties or equipment that +needs to be listed on his sheet. FN_COMMON-LISTS can be customized by +changing the content and the order of the listtypes in the code. + +Example: + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Merits ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +stuff and stuff +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Flaws ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +stuffed + +The last @pemit calls another utility function called FN_HEALTH, that +lists out wounds, bloodpool and tracks if someone is blood bound to a +vampire or not. It ends with a line of '=' 78 characters long + +Example: + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Health ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Wounds / Agg Wounds : 0 / 0 Blood: 10 / 10 +============================================================================== + +The value of specialized utility functions can't be overstated. In +cases where you have multiple sheets that have sections that will be +identical, being able to display those sections in a less spammy way +is useful, probably vital to the maintenance of both the code and your +sanity. The other advantage of creating such specialized functions is +that if you want to do a mass change to the way a part of the display +looks, you can change it in one place and have it take effect for all +your different sheet types. + +The &SHEET is this case is very simple, and a mix of both explicit +function calls, and more specialitize utility functions. In truth, a +sheet the size of Joe's could be displayed in a single @pemit +statement. However, because other sheets are much more complex, and +have the potential to have a lot more information on them, we broke the +data into multiple statements to avoid hitting server limits. Other +races in this genre(WoD), have a lot more stuff on them, so they are +broken up even further. + +The best thing to do is to study the way the code in other libraries +works, as well as read the cgen helpfiles on various topics. + + + diff --git a/sgp/HOWTO-LIST-OBJECT.txt b/sgp/HOWTO-LIST-OBJECT.txt new file mode 100644 index 000000000..c6d667132 --- /dev/null +++ b/sgp/HOWTO-LIST-OBJECT.txt @@ -0,0 +1,98 @@ +SGP Cgen +HOWTO-List Objects: 110901 + + +Data organization for SGP Cgen: +------------------------------ + +This is a short primer on compiling lists for your game's List Object. + +SGP cgen is based on the assumption that a character sheet for an RPG is +grouped into 3 essential categories: strings, stats, and lists. + +String data, for our purposes is essentially the type of information found +at the top of a character sheet. Strings may represent both arbitrary and +specific types of imformation, such as name(arbitrary), race(arbitrary or +specific), gender(specific), or other information that is identifying. The +key is that any given bit of string data is generally going to be short, a +ew words at the most. Look at the top of the character sheet in the back +of the book you're using. Many of those character attributes are going to +be stored on the character object as &STRING- data. + +Stats, for our purposes, are any character attribute that carries a specific +numerical value, such as strength or willpower. Stats are special, because +they are compiled into a master database that is searched before a stat is +set on the character object. They are generally the most numerous type of +attribute on a character sheet and are stored on the character object as a +&STATLIST- data. + +List data is much like strings, except that lists on a character object are +generally arbitrary and can contain a little more information. Lists are +generally things like merits, flaws, specialties, spells, and things you +might find as details on the bottom of a character sheet or on supplemental +pages. They appear on a character object as &LIST- data. + + +Compiling listings for &STATLIST-, &STRING-, and &LIST-: +------------------------------------------------------- + +STRINGS: The first thing to do is to list out the types of data you want to +store on the character object using this cgen. Begin by compiling +&LIST-STRINGS and figuring out all the types of string data that you'll have +appearing at the top of the sheet display. These lists may be short or long, +but all items should be seperated by a '|'. + + Example: + &LIST-STRINGS List Object=name|race|class|sex + +This list of strings becomes the list that +setstring checks to see if it is +a valid type of string data. You can also define what may appear in something +like race by creating and attribute on the list object accordingly. + + Example: + &LIST-RACE List Object=elf|human|vampire|elephant + +STATS: Begin by using the book for your game system and define a list of +stattypes. Write those types to a '|' seperated list. The rule of thumb is +should be that if the book gives it a name, like a 'discipline' or 'skill' or +'attribute', then use those names in your stat list. +setstat and +settemp +check a master database of stats based on this listing of stats. + + Example: + &LIST-STATS List Object=abilities|skills|secondary-skills|pools|powers|lores + +You then take each of the listed stat types and compile a list of stats that +fit them. After you compile the lists, which may take a while, make an attribute +for them. BE SURE that you check for typos. + + Example: + &LIST-ABILITIES List Object=strength|dexterity|intelligence|charisma + &LIST-SKILLS List Object=driving|fighting|survival + &LIST-SECONDARY-SKILLS List Object=racing|performance|poetry|brawl|melee + &LIST-POOLS List Object=health|willpower|psi + &LIST-POWERS List Object=levitation|clairvoyance|telepathy + &LIST-LORES List Object=monsters|werewolves|history|mythology + +LISTS: As with string data, compile your list of list data on an attribute named +&LIST-LISTS. +setlist will check this list to see if the list is valid or not. +You can control what may or may not be set in a given list by creating a &LIST- +attribute for that list. + + Example: + &LIST-LISTS List Object=merits|flaws|gear|spells|scrolls|magick items + &LiST-SPELLS List Object=fireball|make water|call lightning|greet the sun + +In the latter example, you can check against the specific list of spells as a +means to prevent misspellings, or simply to prevent strange things from cropping +up on your character sheets. + +Once complete, you can load the object and begin the process of building the +character sheet itself. + + + + + + + + diff --git a/sgp/PLACES-SGP.txt b/sgp/PLACES-SGP.txt new file mode 100644 index 000000000..8d9c805e5 --- /dev/null +++ b/sgp/PLACES-SGP.txt @@ -0,0 +1,242 @@ +@@ GLOBAL PLACES AND MUTTER CODE - SGP VERSION +@@ +@@ This package includes code for 'places', and code for 'mutter'. +@@ +@@ 'Places' is a global system which allows for the creation of virtual +@@ places within rooms. This allows tables, chairs, rugs, alcoves, and +@@ similar areas to exist without the necessity of physical objects. +@@ +@@ 'mutter' is a set of globals which allow players to mutter messages +@@ to each other. Muttered messages are shown in part to other players +@@ in the room, with some of the text removed. +@@ +@@ ---- +@@ +@@ The 'places' code is based upon Gahron (Meg's) original TableCode. +@@ This rewrite was done by Osric, with bugfixes by Meg, and a lot of +@@ rewriting for speed by Deirdre. All three people are from AmberMUSH. +@@ +@@ The 'mutter' code provided here was written by Deirdre. The basic +@@ mutter code does not require that the 'places' system be globally +@@ installed. There are, however, two switches to mutter that are +@@ specifically for using mutter with places. +@@ +@@ Permission is granted to freely use and copy this code, as long as +@@ credit is given in the +help files or some similar place (if you use +@@ the +help files provided in this distribution, credit is already given). +@@ Bugs and suggestions should be given to Deirdre@AmberMUSH. +@@ +@@ ---- +@@ +@@ More rewriting by Angel@Heaven.gofast.net ... replacing @dolists with +@@ @pemit/list .... and adding the help attributes to the parent object +@@ instead of yet another separate help object. +@@ +@@ Additionally, I added +spy code, and a configure command to turn on +@@ spying on a room. +@@ +@@ The PLACES# attributes can also include a final field that is a description +@@ of the place in it. +@@ +@@ ---- +@@ +@@ This code is intended to be installed in the Master Room. The main global +@@ places object must be owned by a wizard, and set Inherit. Support for +@@ the auxiliary functions also requires setting a @startup on the God. +@@ +@@ This code was last tested under TinyMUSH 2.2.2 #1 (2/15/96) and is usable +@@ on both MUX and Penn platforms. +@@ +@@ Updated to install, assuming WIZARD can use @function. (28 Jun 00) +@@ Updated +spy commands to use either isstaff(), which sets the value to the +@@ defaults for how your game defines 'staff' or simply check for a WIZARD +@@ flag. This is likely -not- the final change to how +spy and CANSPY are done. +@@ Also mended a few typos in the installer.(3 July 00) +@@ Fixed a bug in PLACEFUNCTION with @verb that was causing problems with +@@ JOIN and OJOIN messages in Penn and removed a } that was causing problems +@@ with PLACENUMS.(11 July 00) +@@ Fixed a problem with escapes that was causing tt and ttooc commands to fail +@@ in Penn.(11 July 00) +@@ Added SGP +version information (16 December 00) +@@ Fixed a legacy bug in DO_SIT and DO_JOIN(13 February 01) +@@ +@@ --- PLACES CODE --- +@@ + +@pemit me=Creating Places Code Objects...Moment%R%R + +@create Places_global_object +@create Places_function_object +@parent Places_global_object=Places_function_object +@Desc Places_global_object=The Places Code. Tables, rugs, beds, ladders, etc. +@fo me=&EVAL_OBJ Places_global_object=[num(Places_function_object)] + +@wait 0=&SGP-OBJECTS SGP - Global Parent Object=[get(SGP - Global Parent Object/SGP-OBJECTS)]|[num(Places_global_object)] +@wait 0=&SGP-OBJECTS SGP - Global Parent Object=[get(SGP - Global Parent Object/SGP-OBJECTS)]|[num(Places_function_object)] + +@wait 0=&SGP-VERSION Places_global_object=SGP-Y2K|Base|[rest(ldelete(time(),4,))] +@wait 0=&SGP-VERSION Places_function_object=SGP-Y2K|Base|[rest(ldelete(time(),4,))] + +&UPDATE-HISTORY Places_global_object=Y2K +&UPDATE-HISTORY Places_function_object=Y2K + +@@ +@@ @@ Configuring Places +@@ + +@pemit me=Quoting Places Commands...Moment%R%R + +&DO_CONFIGURE Places_global_object=$configure * places: @switch/first [controls(%#,%l)]:[isnum(%0)]:%0=0:*:*, {@pemit %#=You do not control [name(%l)].},*:0:*, {@pemit %#=The number of places needs to be a number!},*:*:0, {@dolist rest(lnum(add(get(%l/PLACESMAX),1)))={@unlock %l/PLACE##;&PLACE## %l};@unlock %l/PLACESCLEANUP1;@unlock %l/PLACESCLEANUP2;@unlock %l/PLACESMAX;&PLACESCLEANUP1 %l;&PLACESCLEANUP2 %l;&PLACESMAX %l;@set %l=!MONITOR;@pemit %#=Places removed from [name(%l)].},{&PLACESMAX %l=%0;@dolist rest(lnum(add(%0,1)))={@unlock %l/PLACE##;&PLACE## %l=ulocal(SETUP_FN,##,add(rand(9),1))};@unlock %l/PLACESCLEANUP1;@unlock %l/PLACESCLEANUP2;@unlock %l/PLACESMAX;@set %l=MONITOR;&PLACESCLEANUP1 %l=v(PLACESCLEANUP1);&PLACESCLEANUP2 %l=v(PLACESCLEANUP2);&PLACENUMS %l=[repeat(|,%0)];@pemit %#=Configuration for %0 places complete.} + +&DO_CONFIGURE_SPYING Places_global_object=$configure spy* *: @switch/first [controls(%#,%l)]:[ucstr(%1)]=0:*, {@pemit %#=You do not control [name(%l)].},*:Yes, {@pemit %#=Setting this room to allow Spying. ;&SPYOK %L=Yes ;},*:No, {@pemit %#=Setting this room to disallow Spying. Please include a reason why it should not work in a note on the room. ;&SPYOK %L=No ;},{@pemit %#=The valid commands are:%r%tconfigure spying Yes%r%tconfigure spying No%rPlease use one of those.} + +&SETUP_FN Places_global_object=Table %0|%1|[add(rand(%1),1)]||I'm sorry, there's no room to add a place there.|I'm sorry, there's on place to move there.|You sit down at|sits down at|You stand and leave|stands and leaves|At your table|A table with 4 legs and some chairs around it. + +@@ +@@ @@ Update +@@ + +&DO_UPDATE Places_global_object=$update */*=*: @switch/first [controls(%#,%l)]:[and(isnum(%0),lte(%0,get(%l/PLACESMAX)))]:[member(NAME MAXPLACES CURPLACES FIXED FULL EMPTY JOIN OJOIN DEPART ODEPART PREFIX DESCRIBE,ucstr(%1))]=0:*:*, {@pemit %#=Permission denied.},*:0:*, {@pemit %#=I'm sorry, but '%0' isn't a valid place number.},*:*:0, {@pemit %#=I'm sorry, but '%1' isn't a valid configuration option.},{@unlock %l/PLACE%0;&PLACE%0 %l=ulocal(UPDATEINFO,%l,%0,%1,%2);@pemit %#=The %1 for [ulocal(GETINFO,%l,%0,NAME)] is now set to:%r[space(5)][ulocal(GETINFO,%l,%0,%1)]} + +@@ +@@ @@ Mv +@@ + +&DO_MV Places_global_object=$mv from * to *: @switch/first 0=and(gt(%0,0),lte(%0,get(%l/PLACESMAX))), {@pemit %#='%0' is not a valid place number.},and(gt(%1,0),lte(%1,get(%l/PLACESMAX))), {@pemit %#='%1' is not a vaild place number.},not(words(ulocal(GETINFO,%l,%0,FIXED))), {@pemit %#=ulocal(GETINFO,%l,%0,FIXED)},not(words(ulocal(GETINFO,%l,%1,FIXED))), {@pemit %#=ulocal(GETINFO,%l,%1,FIXED)},sub(ulocal(GETINFO,%l,%0,CURPLACES),words(extract(get(%l/PLACENUMS),%0,1,|))), {@pemit %#=ulocal(GETINFO,%l,%0,EMPTY)},neq(ulocal(GETINFO,%l,%1,CURPLACES),ulocal(GETINFO,%l,%1,MAXPLACES)), {@pemit %#=ulocal(GETINFO,%l,%1,FULL)},{@unlock %l/PLACE%0;@unlock %l/PLACE%1;&PLACE%0 %l=ulocal(UPDATEINFO,%l,%0,CURPLACES,sub(ulocal(GETINFO,%l,%0,CURPLACES),1));&PLACE%1 %l=ulocal(UPDATEINFO,%l,%1,CURPLACES,add(ulocal(GETINFO,%l,%1,CURPLACES),1));@pemit %#=You move a place from [ulocal(GETINFO,%l,%0,NAME)] to [ulocal(GETINFO,%l,%1,NAME)].} + +@@ +@@ @@ Places Cleanup +@@ + +&PLACESCLEANUP1 Places_global_object=^* has left.:placescleanup(%#) +&PLACESCLEANUP2 Places_global_object=^* has disconnected.:placescleanup(%#) +&PLACESCLEANUPCMD Places_global_object=$placescleanup(*):@switch [setq(0, U(WHICHPLACE, %#, %0))][r(0)]=>0, {&PLACENUMS %#=[replace(get(%#/PLACENUMS), r(0), remove(extract(get(%#/PLACENUMS), r(0), 1, |), %0), |)]} + +@@ +@@ @@ Join +@@ + +&DO_JOIN Places_global_object=$join *: @switch/first [not(ulocal(WHICHPLACE,%l,%#))] [lcstr(%0)]=0 *, {@pemit %#=Don't you think you should 'depart' first?},1 at #*, {@trig me/PLACEFUNCTION=%l,%#,[delete(rest(%0),0,1)]},1 at *, {@trig me/PLACEFUNCTION=%l,%#,[rest(%0)]},1 #*, {@trig me/PLACEFUNCTION=%l,%#,[delete(%0,0,1)]},1 with *, {@pemit[setq(1,locate(%#,rest(%0),niPT))][setq(0,ulocal(WHICHPLACE,%l,r(1)))]%#=switch(r(0),0,There isn't anyone named '[capstr(rest(%0))]' at a special place.,You go over to join [name(r(1))].);@trig me/[switch(r(0),0,-,PLACEFUNCTION)]=%l,%#,[r(0)]},{@switch [isnum(%0)][setq(1,locate(%#,%0,niPT))][setq(0,ulocal(WHICHPLACE,%l,r(1)))]=1,{@trig me/PLACEFUNCTION=%l,%#,%0 ;},{@pemit %#=switch(r(0),0,There isn't anyone named '[capstr(rest(%0))]' at a special place.,You go over to join [name(r(1))].);@trig me/[switch(r(0),0,-,PLACEFUNCTION)]=%l,%#,[r(0)]}} + +&DO_SIT Places_global_object=$sit *: @switch/first [not(ulocal(WHICHPLACE,%l,%#))] [lcstr(%0)]=0 *, {@pemit %#=Don't you think you should 'depart' first?},1 at #*, {@trig me/PLACEFUNCTION=%l,%#,[delete(rest(%0),0,1)]},1 at *, {@trig me/PLACEFUNCTION=%l,%#,[rest(%0)]},1 #*, {@trig me/PLACEFUNCTION=%l,%#,[delete(%0,0,1)]},1 with *, {@pemit[setq(1,locate(%#,rest(%0),niPT))][setq(0,ulocal(WHICHPLACE,%l,r(1)))]%#=switch(r(0),0,There isn't anyone named '[capstr(rest(%0))]' at a special place.,You go over to join [name(r(1))].);@trig me/[switch(r(0),0,-,PLACEFUNCTION)]=%l,%#,[r(0)]},{@switch [isnum(%0)][setq(1,locate(%#,%0,niPT))][setq(0,ulocal(WHICHPLACE,%l,r(1)))]=1,{@trig me/PLACEFUNCTION=%l,%#,%0},{@pemit %#=switch(r(0),0,There isn't anyone named '[capstr(rest(%0))]' at a special place.,You go over to join [name(r(1))].);@trig me/[switch(r(0),0,-,PLACEFUNCTION)]=%l,%#,[r(0)]}} + +&PLACEFUNCTION Places_global_object=@switch/first 0=[lte(%2, get(%0/PLACESMAX))], @pemit %1=Invalid Place Number '%2'.,[setq(1, extract(get(%0/PLACENUMS), %2, 1, |))][gt(ulocal(GETINFO, %0, %2, CURPLACES), words(r(1)))], {@pemit %1=There aren't any free spaces there.},{@verb %1=[setq(0,ulocal(getinfo,%0,%2,NAME))]%1,eval_msg,[edit([U(GETINFO, %0, %2, JOIN)] [r(0)].,%,,%%%,)],oeval_mesg,[edit([U(GETINFO, %0, %2, OJOIN)] [r(0)].,%,,%%%,)];@pemit/list [r(1)]= [name(%1)] joins you. ;&PLACENUMS %0=[replace(get(%0/PLACENUMS), %2, [r(1)]%1%b, |)]} + + +@@ +@@ @@ Depart +@@ + +&DO_DEPART Places_global_object=$depart:@switch [setq(1, U(WHICHPLACE, %l, %#))][setq(0,U(GETINFO,%l,r(1),NAME))][r(1)]=0, {@pemit %#=You aren't placed anywhere.},{&PLACENUMS %l=[replace(get(%l/PLACENUMS), r(1), [remove(extract(get(%l/PLACENUMS), r(1), 1, |), %#)], |)];@pemit/list [extract(get(%l/PLACENUMS), r(1), 1, |)]=%N has departed.;@pemit %#=[edit([U(GETINFO, %l, r(1), DEPART)] [r(0)].,%,,%%%,)];@pemit/list [ldelete(lcon(%L),match(lcon(%L),%#))]=%N [edit([U(GETINFO, %l, r(1), ODEPART)] [r(0)].,%,,%%%,)]} + +&DO_STAND Places_global_object=$stand:@switch [setq(1, U(WHICHPLACE, %l, %#))][setq(0,U(GETINFO,%l,r(1),NAME))][r(1)]=0, {@pemit %#=You aren't placed anywhere.},{&PLACENUMS %l=[replace(get(%l/PLACENUMS), r(1), [remove(extract(get(%l/PLACENUMS), r(1), 1, |), %#)], |)];@pemit/list [extract(get(%l/PLACENUMS), r(1), 1, |)]=%N has departed.;@pemit %#=[edit([U(GETINFO, %l, r(1), DEPART)] [r(0)].,%,,%%%,)];@pemit/list [ldelete(lcon(%L),match(lcon(%L),%#))]=%N [edit([U(GETINFO, %l, r(1), ODEPART)] [r(0)].,%,,%%%,)]} + +@@ +@@ @@ Places and Place +@@ + +&DO_PLACES Places_global_object=$places: @pemit %#=switch(get(%l/PLACESMAX),,There are no special places here.,0,There are no special places here.,map(PLACES_FN,rest(lnum(add(get(%l/PLACESMAX),1))))) + +&DO_PLACE Places_global_object=$place *: @pemit %#=switch(get(%l/PLACESMAX),,There are no special places here.,0,There are no special places here.,map(PLACES_FN,edit(%0,#,))) + +&PLACES_FN Places_global_object=%r[setq(0,ulocal(GETINFO,%l,%0,CURPLACES))][setq(1,extract(get(%l/PLACENUMS),%0,1,|))][capstr(ulocal(GETINFO,%l,%0,NAME))] (#%0) has [setq(2,sub(r(0),words(r(1))))][switch(r(2),0,no empty places,1,1 empty place,[r(2)] empty places)].[switch(words(r(1)),0,,1,%r%tPresent is: %b[name(edit(r(1),%b,))].,%r%tPresent are: %b[ulocal(PLACE_LOOK,r(1))])] + +&PLACE_LOOK Places_global_object=[setq(9,words(%0))][switch(r(9),0,,1,name(%0),2, [name(first(%0))] and [name(rest(%0))],[iter(extract(%0,1,sub(r(9),1)),{name(##),})] and [name(extract(%0,r(9),1))])] + +&DO_PLOOK Places_global_object=$plook: @pemit %#=[setq(0,edit(get(%l/PLACENUMS),|,))][fold(PLOOK_FOLD_FN,rest(lnum(add(get(%l/PLACESMAX),1))),-----)]%rNo place [space(3)] [setq(3,setdiff(setinter(lcon(%l),lwho()),r(0)))][rjust([words(r(3))] at no places,15)] [space(3)] [setq(4,sort(iter(r(3),name(##))))][ljust(mid(extract(r(4),1,1),0,14),14)] [ljust(mid(extract(r(4),2,1),0,14),14)] [ljust(mid(extract(r(4),3,1),0,14),14)][switch(gt(words(r(4)),3),1,ulocal(NAME_3COL_FN,extract(r(4),4,3999)))]%r----- + +&PLOOK_FOLD_FN Places_global_object=%0%r[setq(1,extract(get(%l/PLACENUMS),%1,1,|))]Place #[ljust(%1,5)] [rjust([sub(ulocal(GETINFO,%l,%1,CURPLACES),words(r(1)))] empty places,15)] [space(3)] [setq(2,sort(iter(r(1),name(##))))][ljust(mid(extract(r(2),1,1),0,14),14)] [ljust(mid(extract(r(2),2,1),0,14),14)] [ljust(mid(extract(r(2),3,1),0,14),14)][switch(gt(words(r(2)),3),1,ulocal(NAME_3COL_FN,extract(r(2),4,3999)))] + +&NAME_3COL_FN Places_global_object=[fold(NAME_3AUX_FN,rest(%0),%r[space(33)][ljust(mid(first(%0),0,14),15)])] + +&NAME_3AUX_FN Places_global_object=%0[switch(mod(words(%0),4),0,%r[space(33)][ljust(mid(%1,0,14),15)],[ljust(mid(%1,0,14),15)])] +&DO_PLOOK_NUMBER Places_global_object=$plook *:@pemit %#=switch(get(%l/PLACESMAX),,There are no special places here.,0,There are no special places here.,%r[capstr(ulocal(GETINFO,%l,%0,NAME))]:%r[ulocal(GETINFO,%l,edit(%0,#,),DESCRIPTION)]) + +&DO_TT Places_global_object=$tt *:@pemit/list [setq(0,ulocal(WHICHPLACE,%l,%#))][switch(r(0),0,%#[setq(1,You'll need to join a place first.)],[extract(get(%l/PLACENUMS),r(0),1,|)][setq(1,[ulocal(GETINFO,%l,r(0),PREFIX)]%, [switch(%0,:*,%N [delete(%0,0,1)],;*,%N[delete(%0,0,1)],"*,%N says "[delete(%0,0,1)]",|*,delete(%0,0,1),%N says "%0")])])]=[r(1)];@pemit/list [iter(lcon(%l),switch(strmatch([get(##/SPYING)],%l [r(0)]),1,##))]=(Overheard) [r(1)] + +&DO_TTOOC Places_global_object=$ttooc *:@pemit/list [setq(0,ulocal(WHICHPLACE,%l,%#))][switch(r(0),0,%#[setq(1,You'll need to join a place first.)],[extract(get(%l/PLACENUMS),r(0),1,|)][setq(1, [ulocal(GETINFO,%l,r(0),PREFIX)]%, [switch(%0,:*,%N [delete(%0,0,1)],;*,%N[delete(%0,0,1)],"*,%N says "[delete(%0,0,1)]",|*,delete(%0,0,1),%N says "%0")])])]=r(1);@pemit/list [iter(lcon(%l),switch(strmatch([get(##/SPYING)],%l [r(0)]),1,##))]=(Overheard) [r(1)] + +&WHICHPLACE Places_global_object=[match(get(%0/PLACENUMS), *%1%b*, |)] + +&GETINFO Places_global_object=[extract(get(%0/PLACE%1),match(NAME MAXPLACES CURPLACES FIXED FULL EMPTY JOIN OJOIN DEPART ODEPART PREFIX DESCRIPTION,%2),1,|)] + +&UPDATEINFO Places_global_object=[replace(get(%0/PLACE%1),match(NAME MAXPLACES CURPLACES FIXED FULL EMPTY JOIN OJOIN DEPART ODEPART PREFIX DESCRIBE,%2),%3,|)] + +&ATPLACE Places_global_object=[extract(get(%0/PLACENUMS), %1, 1, |)] + +@Desc Places_function_object=This evaluator can be used with @verb to send literal messages with correct substitutions. To use it, go @verb [num(me)]=,eval_msg,,oeval_msg,,%{,%}%rExtra arguments may be passed via setq(), and recovered in msg, omsg via %[r(X)%]. + +&EVAL_MSG Places_function_object=[s(%0)] + +&OEVAL_MSG Places_function_object=[s(%1)] + +&FUNC_ATPLACE Places_global_object=[switch(or(controls(%#,%0),match(rloc(%l,100),rloc(%0,100))),1,extract(get(%0/PLACENUMS), %1, 1, |),PERMISSION DENIED)] + +&FUNC_PLACEINFO Places_global_object=[switch(or(controls(%#,%0),match(rloc(%l,100),rloc(%0,100))),1,extract(get(%0/PLACE%1),match(NAME MAXPLACES CURPLACES FIXED FULL EMPTY JOIN OJOIN DEPART ODEPART PREFIX,%2),1,|),PERMISSION DENIED)] + +&FUNC_WHICHPLACE Places_global_object=[switch(or(controls(%#,%0),match(rloc(%l,100),rloc(%0,100))),1,match(get(%0/PLACENUMS), *%1%b*, |),PERMISSION DENIED)] +@pemit me=[center(*** QUOTE OF PLACES DONE ***,78)] + +@@ +@@ +@@ --- MUTTER CODE --- + +@@ +@@ @@ The Commands +@@ + +@pemit me=Adding Mutter Code...Moment%R%R + + +&DO_MUTTER Places_global_object=$mutter *=*: @remit [setq(0,locate(%#,%0,nimP))][switch(r(0),#-1,XX,#-2,XX,%l)]={[switch(%1,:* "*"*,{%N [first(delete(%1,0,1),")]%S mutters to [setq(1,ulocal(MUTTER_FN,extract(%1,2,1,")))][switch(r(0),%#,%oself,name(r(0)))][switch(r(1),...,.,{, "[r(1)]"})] [rest(rest(%1,"),")]},:*,{%N mutters to [switch(r(0),%#,%oself,name(r(0)))].},;* "*"*,{%N[first(delete(%1,0,1),")]%S mutters to [setq(1,ulocal(MUTTER_FN,extract(%1,2,1,")))][switch(r(0),%#,%oself,name(r(0)))][switch(r(1),...,.,{, "[r(1)]"})] [rest(rest(%1,"),")]},;*,{%N mutters to [switch(r(0),%#,%oself,name(r(0)))].},{[setq(1,ulocal(MUTTER_FN,%1))]%N mutters to [switch(r(0),%#,%oself,name(r(0)))][switch(r(1),...,.,{, "[r(1)]"})]})]};@pemit %#[setq(2,edit(edit(%1,<,),>,))]=switch(r(0),#-1,I don't see that here.,#-2,I'm not sure which %0 you mean.,ulocal(MUTTER_FROM_FN,%#,r(0),r(2)));@pemit [switch(r(0),%#,XX,r(0))]=ulocal(MUTTER_TO_FN,%#,r(0),r(2)) + +&DO_MUTTER_PLACE Places_global_object=$mutter/place *=*: @switch and(gte(%0,1),lte(%0,get(%l/PLACESMAX)))=0, {@pemit %#=There is no such place here.},{@remit %l={[switch(%1,:* "*"*,{%N [first(delete(%1,0,1),")]%S mutters to [PlaceInfo(%l,%0,NAME)][setq(1,ulocal(MUTTER_FN,extract(%1,2,1,")))][switch(r(1),...,.,{, "[r(1)]"})] [rest(rest(%1,"),")]},:*,{%N mutters to [PlaceInfo(%l,%0,NAME)],},;* "*"*,{%N[first(delete(%1,0,1),")]%S mutters to [PlaceInfo(%l,%0,NAME)][setq(1,ulocal(MUTTER_FN,extract(%1,2,1,")))][switch(r(1),...,.,{, "[r(1)]"})] [rest(rest(%1,"),")]},;*,{%N mutters to [PlaceInfo(%l,%0,NAME)]},{[setq(1,ulocal(MUTTER_FN,%1))]%N mutters to [PlaceInfo(%l,%0,NAME)][switch(r(1),....,.,{, "[r(1)]"})]})]};@pemit/list [setq(2,edit(edit(%1,<,),>,))][setq(3,{[PlaceInfo(%l,%0,PREFIX)], [switch(r(2),:*,%N [delete(r(2),0,1)],;*,%N[delete(r(2),0,1)],%N says "[r(2)]")]})][setunion(AtPlace(%l,%0),%#)]=r(3)} + +&DO_MUTTER_TT Places_global_object=$mutter/tt *=*: @switch/first [setq(0,locate(%#,%0,nimP))][r(0)] [setq(9,WhichPlace(%l,%#))][switch(r(9),0,setq(9,WhichPlace(%l,r(0))))][r(9)]=#-1 *, {@pemit %#=I don't see that here.},#-2 *, {@pemit %#=I'm not sure which %0 you mean.},* 0, {@pemit %#=Neither you nor [name(r(0))] is at a special place.},{@pemit/list [setq(8,{[PlaceInfo(%l,r(9),PREFIX)], [switch(%1,:* "*"*,{%N [first(delete(%1,0,1),")]%S mutters to [setq(1,ulocal(MUTTER_FN,extract(%1,2,1,")))][switch(r(0),%#,%oself,name(r(0)))][switch(r(1),...,.,{, "[r(1)]"})] [rest(rest(%1,"),")]},:*,{%N mutters to [switch(r(0),%#,%oself,name(r(0)))].},;* "*"*,{%N[first(delete(%1,0,1),")]%S mutters to [setq(1,ulocal(MUTTER_FN,extract(%1,2,1,")))][switch(r(0),%#,%oself,name(r(0)))][switch(r(1),...,.,{, "[r(1)]"})] [rest(rest(%1,"),")]},;*,{%N mutters to [switch(r(0),%#,%oself,name(r(0)))].},{[setq(1,ulocal(MUTTER_FN,%1))]%N mutters to [switch(r(0),%#,%oself,name(r(0)))][switch(r(1),...,.,{, "[r(1)]"})]})]})][setunion(AtPlace(%l,r(9)),%# [r(0)])]=r(8);@pemit/list [iter(lcon(%l),switch(strmatch([get(##/SPYING)],%l [r(0)]),1,##))]=(Overheard) [r(8)]@pemit %#=[setq(2,edit(edit(%1,<,),>,))][ulocal(MUTTER_FROM_FN,%#,r(0),r(2))];@pemit r(0)=ulocal(MUTTER_TO_FN,%#,r(0),r(2))} + +&DO_SPY Places_global_object=$+spy *:@switch/first [member(get([parent(me)]/CANSPY),%#)]:[words(get(%l/PLACESMAX))]:[and(gte(%0,0),lte(%0,get(%l/PLACESMAX)))]:[member(get(%L/SPYOK),Yes)]=0:*:*:*,{@pemit %#=You can't do that.},*:0:*:*,{@pemit %#=There aren't any special places here.},*:*:0:*,{@pemit %#=Invalid place number: '%0'.},*:*:*:0,{@pemit %#=Spying can not be used in this room.},{@switch %0=0,{@unlock %#/SPYING;&SPYING %#;@Pemit %#=You cease listening to that place.},{@unlock %#/SPYING;&SPYING %#=%L %0;@lock %#/SPYING=me;@Pemit %#=You listen in on a nearby conversation.}} + +&SPY_WHO Places_global_object=$+spy/who:@switch isstaff(%#)=0,{@pemit %#=You're not authorized to do that.},{@pemit %#=[repeat(*,78)]%RCharacters currently possessing +spy capability:%R%R[iter(get([parent(me)]/CANSPY),switch(mod(member(get([parent(me)]/CANSPY),##),4),0,%R[ljust(name(##),15)],[ljust(name(##),15)]))]%R%R[repeat(*,78)]} + +&SPY_ADD Places_global_object=$+spy/add *:@switch orflags(%#,W)=0,{@pemit %#=You're not authorized to do that.},{@switch member(get([parent(me)]/CANSPY),num(*%0))=0,{&CANSPY [parent(me)]=cat(get([parent(me)]/CANSPY),num(*%0));@pemit %#=[name(num(*%0))] has been cleared for spying.},{@pemit %#=That person is already cleared for spying.}} + +&SPY_REMOVE Places_global_object=$+spy/remove *:@switch orflags(%#,W)=0,{@pemit %#=You're not authorized to do that.},{@switch member(get([parent(me)]/CANSPY),num(*%0))=0,{@pemit %#=That person is not in the Master Spy List.},{&CANSPY [parent(me)]=remove(get([parent(me)]/CANSPY),num(*%0));@pemit %#=[name(num(*%0))] is removed from the Master Spy List.}} + +&DO_TT Places_global_object=$tt *:@pemit/list [setq(0,ulocal(WHICHPLACE,%l,%#))][switch(r(0),0,%#[setq(1,You'll need to join a place first.)],[extract(get(%l/PLACENUMS),r(0),1,|)][setq(1,\{[ulocal(GETINFO,%l,r(0),PREFIX)], [switch(%0,:*,%N [delete(%0,0,1)],;*,%N[delete(%0,0,1)],"*,%N says "[delete(%0,0,1)]",|*,delete(%0,0,1),%N says "%0")]\})])]=r(1);@pemit/list [iter(lcon(%l),switch(strmatch([get(##/SPYING)],%l [r(0)]),1,##))]=(Overheard) [r(1)] + +&MUTTER_FN Places_function_object=[edit(ulocal(DOTS_FN,ulocal(SELECT_WORDS_FN,%0)),%b...,...)] + +&MUTTER_TO_FN Places_function_object=[switch(%2,:*,{You sense [name(%0)] [delete(%2,0,1)]},;*,{You sense [name(%0)][delete(%2,0,1)]},{[name(%0)] whispers "%2"})] + +&MUTTER_FROM_FN Places_function_object=[switch(%0,%1,switch(%2,:*,{You sense "[name(%0)] [delete(%2,0,1)]"},;*,{You sense "[name(%0)][delete(%2,0,1)]"},{You mutter to yourself, "%2"}),switch(%2,:*,{[name(%1)] senses "[name(%0)] [delete(%2,0,1)]"},;*,{[name(%1)] senses "[name(%0)][delete(%2,0,1)]"},{You whisper "%2" to [name(%1)].}))] + +&DOTS_FN Places_function_object=[switch(%0,*... ...*,ulocal(DOTS_FN,edit(%0,... ...,...)),%0)] + +&SELECT_WORDS_FN Places_function_object=[switch(%0,*<*>*,[map(KILL_WORDS_FN,before(%0,<))] [before(after(%0,<),>)] [ulocal(SELECT_WORDS_FN,after(%0,>))],map(KILL_WORDS_FN,%0))] + +&KILL_WORDS_FN Places_function_object=[switch([rand(3)]%0,0,,1,,2,,0*,%0,...)] + +&CANSPY Places_function_object=#1 + +@pemit me=[center(*** QUOTE OF MUTTER DONE ***,78)] +@pemit me=[center(*** END OF QUOTE ***,78)] + +@pemit me=[center(*** Setting Flags ***,78)] + + +@set Places_global_object=SAFE +@set Places_function_object=SAFE + +@switch version()=PennMUSH*,{@Startup Places_global_object=@dolist lattr(me/FUNC_*)=@function after(##,FUNC_)=me,##},{@Startup Places_global_object=@dolist lattr(me/FUNC_*)=@function/privileged after(##,FUNC_)=me/##} + +@switch version()=TinyMUSH version 2.2.*,{@set Places_global_object=INHERIT;@set Places_global_object=COMMANDS;@set Places_global_object=STOP;@set Places_global_object=SAFE},PennMUSH*,{@set Places_global_object=!NO_COMMAND;@set Places_global_object=WIZARD},MUX*,{@set Places_global_object=INHERIT;@set Places_global_object=!NO_COMMAND;@set Places_global_object=SAFE},RhostMUSH*,{@set Places_global_object=INHERIT;@set Places_global_object=!NOCOMMAND;@set Places_global_object=SAFE;@set Places_global_object=STOP} + +@pemit me=[center(*** Triggering @startup ***,78)] + +@tr Places_global_object/startup + + +drop Places_global_object +drop Places_function_object + +@pemit me=Installation of PLACES complete. Make sure that you put these objects in the master room and that you install the correct version of +help for your server. diff --git a/sgp/SGP-+help.txt b/sgp/SGP-+help.txt new file mode 100644 index 000000000..b1bc2b4a6 --- /dev/null +++ b/sgp/SGP-+help.txt @@ -0,0 +1,197 @@ +@@ ############################################################################ +@@ +@@ SGP - Help Data and +help/+wizhelp commands for Penn and Tiny 2.2.x +@@ 1 August 00 +@@ This file creates one new SGP object for the purpose of helpfile storage. +@@ It adds +help and +wizhelp commands to existing SGP commands objects and +@@ sets reference attributes for use by this code. +@@ +@@ This +help system is very basic, but functional. Certainly, there are +@@ better systems around. Look for one, if this code doesn't suit your needs. +@@ +@@ Coded by BEM and Audumla@Sandbox +@@ +@@ Updated 4 Jan 01 to add +version and correct a problem with &LIST_COMMANDS +@@ on servers with native multipaging. +@@ +@@ Updated 28 Jun 00 to fix a bug in DO_COL that rendered +help and +wizhelp +@@ non-functional. Patch by Raevnos@M*U*S*H +@@ +@@ Updated 17 July 00 to add a file for the +motd code. +@@ +@@ Updated 25 April 01 to update a file for the +motd code. +@@ +@@ ############################################################################ + +@pemit me=Setting +help and +wizhelp commands in the main globals.... Moment. + +&CMD-PLUS-HELP SGP - Main Globals=$+help*:@pemit %#=setq(0,help_[edit(trim(%0),%b,_)])[switch(setq(1,match(lattr(v(help-db)),%q0))%q1,0,{Sorry, no +help available on that topic},u(v(help-db)/[index(lattr(v(help-db)),,%q1,1)]))] + +&CMD-PLUS-WIZHELP SGP - Staff Globals=$+wizhelp*:@pemit %#=setq(0,wizhelp_[edit(trim(%0),%b,_)])[switch(setq(1,match(lattr(v(help-db)),%q0))%q1,0,{Sorry, no +wizhelp available on that topic},u(v(help-db)/[index(lattr(v(help-db)),,%q1,1)]))] + +@pemit me=Creating SGP - Help Data.... Moment. + +@create SGP - Help Data + +@wait 0=&HELP-DB SGP - Main Globals=num(SGP - Help Data) +@wait 0=&HELP-DB SGP - Wizard Globals=num(SGP - Help Data) +@wait 0=&HELP-DB SGP - Staff Globals=num(SGP - Help Data) + +@pemit me=Now setting functional code for +help code.... Moment. + +&DO_COL SGP - Help Data=[setq(0,fold(max_length,%0,0,%1))][setq(1,div(76,add(%q0,1)))][setq(2,sub(div(76,%q1),1))][setq(3,add(1,div(sub(words(%0,%1),1),%q1)))][setq(4,0)][iter(lnum(%q3),%r%b%b[iter(lnum(%q1),ljust(index(%0,%1,setq(4,add(1,%q4))%q4,1),%q2))])] + +&DO_LIST SGP - Help Data=[u(do_col,edit(edit(sort(edit(%0,HELP_,)),%b,|),_,%b),|)] + +&DO_WIZLIST SGP - Help Data=[u(do_col,edit(edit(sort(edit(%0,WIZHELP_,)),%b,|),_,%b),|)] + +&HELP_ SGP - Help Data=[repeat(-,78)]%RHelp on the following topics is avaliable by typing: +help %R[u(do_col,sort(v(list_commands),a,|),|)]%R[repeat(-,78)] + +&HELP_ALL SGP - Help Data=[repeat(-,78)]%RThe following is a list of ALL the topics available using +help:%R[u(do_list,lattr(me/help_*))]%R[repeat(-,78)] + +@switch version()=TinyMUSH version 2.2.*,{&LIST_COMMANDS SGP - Help Data=ALL|BACKGROUNDS|+beginner|+cnotes|+finger|+finger-setup|+glance|+ic|+info|+info-setup|+knock|+3who*|+lwho|+shout|+staff|+staff-all|+timestamp|+timestop|+uptime|+view|+view-setup|+warn|+where|+who|@register|CREDITS|mutter|OOC|PLACES|places-config|places-options|plook|mp},{&LIST_COMMANDS SGP - Help Data=ALL|BACKGROUNDS|+beginner|+cnotes|+finger|+finger-setup|+glance|+ic|+info|+info-setup|+knock|+3who*|+lwho|+shout|+staff|+staff-all|+timestamp|+timestop|+uptime|+view|+view-setup|+warn|+where|+who|@register|CREDITS|mutter|OOC|PLACES|places-config|places-options|plook} + +&MAX_LENGTH SGP - Help Data=max(%0,strlen(%1)) + +&WIZHELP_ SGP - Help Data=[repeat(-,78)]%RHelp on the following topics is avaliable by typing: +wizhelp %R[u(do_col,sort(v(wizlist_commands),a,|),|)]%R[repeat(-,78)] + +&WIZHELP_ALL SGP - Help Data=The following is a list of ALL the topics available using +wizhelp:%R[u(do_wizlist,lattr(me/wizhelp_*))] + +&WIZLIST_COMMANDS SGP - Help Data=ALL|+accept|BACKGROUNDS|+cnotes|+commands|+contents|+duty|+join|+motd|+register|+rjoin|+rsummon|+stnotes|+summon|+timestamp|CONFIGURE|DEFAULTS|FUNCTIONS|PROJECT|+staff|+version + + +@pemit me=Now setting +HELP attributes.... Moment. + + +&HELP_BACKGROUNDS Help Data=[repeat(-,78)]%RCommands for Setting your Background:[space(21)]%R%R[space(2)]SYNTAX:[space(2)]+bg <#>[space(17)]- Read a background section.%R[space(11)]+bglist[space(17)]- List out sections that have been created%R[space(11)]+bgadd <#>=[space(7)]- Add to a background section.%R[space(11)]+bgrem <#>=[space(7)]- Removes text from a background section.%R[space(11)]+bgrep <#>=/[space(2)]- Replaces text in a background section.%R[space(11)]+bgclear <#>[space(12)]- Clears a background section.%R[space(11)]+bglock <#>[space(13)]- Locks a background section when finished.%R%R[space(2)]The '<#>' sign in the BG help stands for the number of the section you are%R[space(2)]working on. The BG commands allows for multiple sections so that your %R[space(2)]background can be broken up into reasonably sized pieces of text.%R[repeat(-,78)] + +&HELP_CREDITS SGP - Help Data=[repeat(-,78)]%RCredits%R%R[space(2)]SGP is a broad, cross platform coding effort with numerous contributors.[space(2)]%R[space(2)]Current contributors of code and assistance in testing, writing helpfiles, %R[space(2)]and pithy comments are as follows:%R%R[space(4)]Audumla@Everywhere[space(3)]--A little bit of everything, +staff and +staff/all, %R[space(27)]+beginner, +version, and installer files.%R[space(4)]BEM@Granite[space(10)]--Much of the base code including +who, joining %R[space(27)]and summon commands, debugging. %R[space(4)]Miateila@Granite[space(5)]--+finger and LOTS of pithy commentary%R[space(4)]Hilikiradi@Sandbox[space(3)]--Debugging, Penn platform tests, +cnotes, %R[space(27)]+lwho, PLACES upgrades, and installer files. %R[space(4)]Brazil@Everywhere[space(4)]--MUX 2.0 issues%R[space(4)]Talek, Javelin, Raevnos, David,%R[space(4)]Vexon@M*U*S*H[space(8)]--Penn Issues%R[space(4)]Ashen-Shugar[space(9)]--RhostMUSH Issues%R[space(4)]Lilith@Sandbox[space(7)]--Debugging, @register %R[space(4)]Hunger@Pacifica[space(6)]--Debugging, Aesthetics%R[space(4)]Jeff@TSC[space(13)]--+version %R[repeat(-,78)] + + +&HELP_+BEGINNER SGP - Help Data=[repeat(-,78)]%R+beginner%R%R[space(2)]MUSH is new to some of you and probably a little daunting. To ease your %R[space(2)]feelings of panic, we offer a very basic list of commands that will get you %R[space(2)]looking around and using the various features of the game.%R%R[space(4)]"[space(16)]You say .%R[space(4)]Say [space(13)]See above.%R[space(4)]ooc [space(13)]Makes an OOC statement or pose.%R[space(4)]page =[space(3)]Pages with .%R[space(4)]look[space(22)]Shows you the room you are standing in.%R[space(4)]look [space(3)]Shows the desc for that object or person.%R[space(4)]pose [space(12)]You pose EX: pose grins.->John Doe %R[space(30)]grins.%R[space(4)]:[space(16)]See 'pose" above%R[space(4)]WHO[space(23)]Shows a list of who is connected to the MUSH.%R[space(4)]+staff[space(20)]Shows connected Staff.%R[space(4)]+staff/all[space(16)]Shows the staff roster.%R%R[space(2)]NOTE: MUSH commands may be case sensitive. You can always page a staffer %R[space(2)]for help.%R%R[space(2)]'+beginner' also recalls this file%R[repeat(-,78)] + +&HELP_+CNOTES SGP - Help Data=[repeat(-,78)]%R+cnotes%R%R[space(2)]SYNTAX: +cnotelist[space(13)]- Gives you a list of all cnotes on your %R[space(35)]character object.%R[space(10)]+cnoteview [space(2)]- Shows you the contents of the named cnote.%R[space(10)]+cnote =text - Sets &cnote on the player to the %R[space(35)]value of the text with person and time %R[space(35)]added.%R[space(24)]%R[space(2)]To set notes on rooms, exits, and other objects that you own, set an %R[space(2)]attribute: &CNOTE_ =%R%R[space(2)]Please note that some cnotes require staff approval before they can go into %R[space(2)]effect ICly.[space(2)]Consult a member of staff for assistance.[space(2)]%R[repeat(-,78)] + +&HELP_+FINGER SGP - Help Data=[repeat(-,78)]%R+finger %R%R[space(2)]SYNTAX: +finger %R[space(11)]%R%R[space(2)]This command shows you various bits of information about and will also %R[space(2)]accept "me" as an argument.[space(2)]+finger is generally a command that notes OOC %R[space(2)]information and should not be considered IC unless game policy %R[space(2)]specifically says otherwise.%R%R[space(2)]See Also '+finger-setup' for configuration options.[space(2)]%R[repeat(-,78)] + +&HELP_+FINGER-SETUP SGP - Help Data=[repeat(-,78)]%RFinger Setup%R[space(2)]%R[space(2)]Attributes read by this command:%R[space(8)]%R[space(2)]E-MAIL:[space(14)]Your email address (optional)[space(3)]%R[space(2)]POSITION:[space(12)]Your Position%R[space(2)]SHORT-DESC:[space(10)]A short description of yourself[space(2)]%R[space(2)]FULLNAME:[space(12)]Your character's full name.%R[space(2)]AGE:[space(17)]Your real age%R[space(2)]FAME:[space(16)]What you are known for.%R[space(2)]APP_AGE:[space(13)]Your apparent age%R[space(2)]PLAN:[space(16)]Any plans your character may have%R[space(2)]RP-PREFS:[space(12)]Any RP Prefs that you may have as a person%R[space(2)]ALTS:[space(16)]Alternate characters you may be known as%R[space(2)]THEMESONG:[space(11)]Your Theme Song%R[space(2)]QUOTE:[space(15)]A typical quote from your character%R[space(2)]OFF-HOURS:[space(11)]When you are usually online.%R[space(2)]TEMPERMENT:[space(10)]Should explain itself, really.%R[space(2)]VACATION:[space(12)]The dates you expect to be gone.%R[space(2)]URL:[space(17)]Your homepage, if any.%R[space(2)]&FINGER-:[space(2)]Let's you add other fields.%R%R[space(2)]AFINGER:[space(5)]Similar to @adesc, gets triggered when someone +fingers %R[space(15)]you.%%%%0 is the name of the person who +fingered you, %R[space(15)]%%%%1 is their dbref.%R[repeat(-,78)] + +&HELP_+GLANCE SGP - Help Data=[repeat(-,78)]%R+glance%R%R[space(2)]SYNTAX: +glance %R%R[space(2)]Displays displays the &SHORT-DESC attributes of objects and connected %R[space(2)]players in your present location.[space(2)]Idle times of players are shown.[space(2)]%R[space(2)]&SHORT-DESC information is truncated to 50 characters. %R[repeat(-,78)] + +&HELP_+IC SGP - Help Data=[repeat(-,78)]%R+ic %R%R[space(2)]SYNTAX: +ic%R%R[space(2)]Lets a player go to a set beginning IC location.%R[repeat(-,78)] + +&HELP_+INFO SGP - Help Data=[repeat(-,78)]%R+info%R%R[space(2)]SYNTAX: +info[space(11)]Show you the info that you have set on yourself.%R[space(10)]+info [space(2)]Shows you info set on other characters.%R%R[space(2)]+info allows you to set information on yourself that would be useful to %R[space(2)]other players without them having them page you for it. This is an %R[space(2)]/excellent/ way to tell other players about pertinent merits, flaws, or %R[space(2)]other things that /would/ affect the way that they might interact with you, %R[space(2)]yet would not be appropriate to place in your @desc.%R%R[space(2)]Players should make a brief mention like "+info set" at the end of their %R[space(2)]@desc, so that others may know to look.%R%R[space(2)]See Also: +info-setup%R[repeat(-,78)]%R + +&HELP_+INFO-SETUP SGP - Help Data=[repeat(-,78)]%R+info setup%R%R[space(2)]To set info on yourself, set it as an attribute &INFO-.[space(2)]General %R[space(2)]info can be seen by anyone. More specific info is set in the same way, %R[space(2)]except you use who should be able to see it instead of 'general'. Possible %R[space(2)]things to use are: race, factions, clans, tribes, and traditions.:%R%R[space(2)]&info-general me=A wandering bum, usually seen in the dirtier parts of %Rthe streets.%R[space(2)]&info-camarilla me=This is the Gangrel Primogen, and as such, is a very %Rnoted member of the Camarilla...%R[space(2)]&info-garou me=This character has a Pure Breed 4.%R[repeat(-,78)] + +&HELP_+KNOCK SGP - Help Data=[repeat(-,78)]%R+knock%R%R[space(2)]SYNTAX: +knock %R%R[space(2)]This command will allow you to 'knock' on any door in the MUSH. The players %R[space(2)]on the other side of the door will get an emit telling them that someone is %R[space(2)]knocking on the door. %R%R[space(2)]NOTE: Using this command on the street grid on exits like South is very %R[space(2)]silly and people will think that you are dumb if you do.%R[repeat(-,78)] + +&HELP_MP Help Data=[repeat(-,78)]%Rmp - multipaging:%R%R[space(2)]SYNTAX:[space(2)]mp = - Allows multipaging to a list of players%R[space(11)]mp [space(9)]- Allows multipaging to the last group of %R[space(34)]players multipaged.%R[repeat(-,78)] + +@switch version()=TinyMUSH version 2.2.*,{},{&HELP_MP Help Data} + +&HELP_MUTTER SGP - Help Data=[repeat(-,78)]%Rmutter%R[space(2)]%R[space(2)]SYNTAX: mutter =%R[space(10)]mutter/tt =%R[space(10)]mutter/place =%R%R[space(2)]The first form of this command behaves identically to "whisper", except %R[space(2)]that the other players in the room will see that you have said something. %R[space(2)]A regular message, or part of a pose enclosed in "quotes", will have some %R[space(2)]of its words or groups of words replaced by "..." If you enclose a phrase %R[space(2)]with , it will not be replaced. Poses without "quotes" %R[space(2)]will simply show that you have muttered something. can be any %R[space(2)]player in the same room as you.%R%R[space(2)]The second form of this command behaves like the first, except that instead %R[space(2)]of the entire room hearing the mutter, only people at a place will do so. %R[space(2)]If you are at a place, those at your place will hear the mutter;if you are %R[space(2)]not, and the target is, those at that place will hear the mutter. If %R[space(2)]neither of you are at a place, an error message will be generated.%R%R[space(2)]The final version of this command allows everyone at a place to hear the %R[space(2)]message in full, while the rest of the room hears the mutter.%R%R[space(2)]This code was written by Deirdre@AmberMUSH.%R%R[space(2)]See Also: 'mutter2'%R[repeat(-,78)] + +&HELP_MUTTER2 SGP - Help Data=[repeat(-,78)]%Rmutter examples:%R%R[space(5)]mutter Finndo=Can you loan me thirty Pence? I'm broke!%R[space(5)]Meg mutters to Finndo, "Can... loan... thirty... broke!"%R%R[space(5)]mutter Bleys=:frowns. "What a he is!" She shrugs.%R[space(5)]Meg frowns. She mutters to Bleys, "What... cheapskate..." She shrugs.%R%R[space(5)]mutter/place 1=:chuckles. "Thank you very much."%R[space(5)]Meg chuckles. She mutters to the long, mahogany bar, "Thank you..."%R%R[space(5)]mutter/tt Deirdre=Where did you hide those Trumps?%R[space(5)]At the bar, Meg mutters to Deirdre, "Where... Trumps?"%R[repeat(-,78)] + +&HELP_OOC Help Data=[repeat(-,78)]%ROut of Character speech:%R%R[space(2)]SYNTAX:[space(2)]ooc %R[space(11)]' %R[space(2)]%R[space(2)]Allows a player to speak or pose OOCly or out of character.%R[space(9)]%R[repeat(-,78)] + +&HELP_PLACES SGP - Help Data=[repeat(-,78)]%RPLACES%R%R[space(2)]SYNTAX:[space(2)]Mv from <#> to <#>[space(10)]Moves a vacancy from one place to%R[space(39)]another.%R[space(11)]Join [space(11)]Puts you at %R[space(11)]Join at #[space(14)]Puts you at place #.%R[space(11)]Join with [space(12)]Puts you at the place with .%R[space(11)]sit * [space(23)]Alias for Join.%R[space(11)]Depart[space(22)]Removes you from your place.%R[space(11)]Stand[space(23)]Alias for Depart.%R[space(11)]Places[space(22)]Lists who's present at all places.%R[space(11)]Place [space(17)]Lists who's present at place .%R[space(11)]Plook[space(23)]Lists in column format everyone around%R[space(39)]the room.%R[space(11)]Plook [space(17)]Lists name of and virtual desc.%R[space(11)]tt [space(16)](Tete a tete) Relays a message to all%R[space(39)]those at your place. This command takes%R[space(39)]the usual say/pose tokens, and%R[space(39)]TT | will emit.%R[space(11)]ttooc [space(13)](Tete a tete) Relays an OOC message%R[space(11)]Update <#>/