This document was uploaded by user and they confirmed that they have the permission to share
it. If you are author or own the copyright of this book, please report to us by using this DMCA
report form. Report DMCA
@@ SGP V1.0 - 1 August 2000 (updated 042501) @@ @@ ---- SGP - Main Object Installer ---@@ @@ NOTE 1: Due to the way that MUSH and MUX operate, you need to have @@ #1 @admin player_queue_limit=1000 and then @restart the MUSH after @@ so that the file quotes cleanly. It is recommended that if using @@ TinyFugue, that you /quote with a 1 second delay between commands, @@ so that the queue has time to catch up before it becomes overloaded. @@ @@ NOTE 2: Make sure that you either allow wizards to use @function or @@ be prepared to set up a long @startup on #1. @@ @@ NOTE 3: Either quote these objects in the master room or @tel them @@ to that location after they are quoted. @@ @@ NOTE 4: This code is compatible with PennMUSH, TinyMUSH 2.2.x, @@ MUX 2.0, and RhostMUSH. There are no known changes required @@ @@ @@ This file current as of 25 April 2001 and includes version @@ monitoring code, and replaces the previous +motd implementation with @@ new code provided by Ashen-Shugar. @@ @pemit me=Creating the SGP data and commands objects and setting up version history. Moment.... @@
Creating SGP objects.
@create @create @create @create @create @@
SGP SGP SGP SGP SGP
-
Global Parent Object Global Functions Main Globals Wizard Globals Staff Globals
Writing &DB to the command objects.
@wait 0=&DB SGP - Main Globals=num(SGP - Global Parent Object) @wait 0=&DB SGP - Wizard Globals=num(SGP - Global Parent Object) @wait 0=&DB SGP - Staff Globals=num(SGP - Global Parent Object) @@
Writing &SGP-OBJECTS to the SGP objects.
@wait 0=&SGP-OBJECTS SGP - Global Parent Object=[num(SGP @wait 0=&SGP-OBJECTS SGP - Global Parent Object=[get(SGP Object/SGP-OBJECTS)]|[num(SGP - Staff Globals)] @wait 0=&SGP-OBJECTS SGP - Global Parent Object=[get(SGP Object/SGP-OBJECTS)]|[num(SGP - Main Globals)] @wait 0=&SGP-OBJECTS SGP - Global Parent Object=[get(SGP Object/SGP-OBJECTS)]|[num(SGP - Wizard Globals)] @wait 0=&SGP-OBJECTS SGP - Global Parent Object=[get(SGP Object/SGP-OBJECTS)]|[num(SGP - Global Functions)] @@
- Global Parent Object)] - Global Parent - Global Parent - Global Parent - Global Parent
Writing &SGP-VERSION to the SGP objects.
@wait 0=&SGP-VERSION SGP - Global Parent Object=1.0|Base 042501|[elements(time(),2
SGP - Global Parent Object=Base Install 042501 [elements(time(),2
Global Parent Object. This is the home of all the non-command attributes. This object can collect the non-command attributes that will slow down the MUSH.
@pemit me=Writing to SGP - Global Parent Object.... Moment. @desc SGP - Global Parent Object=This is the global data object for SGP. All the main global objects read data and write from this object and their code will -notwork without it. Non-command attributes for globals that you add to any of the globals objects should be placed here.%R%R[iter(setdiff(lattr(me),Desc),ljust(##,18))] &BAR SGP - Global Parent Object=[repeat(^,78)] &CANSEE SGP - Global Parent Object=[switch(type(%0),P*,[sign(conn(%0))],[andflags(%0,!D)])] &CANFIND SGP - Global Parent Object=[and(not(hasflag(%0,unfindable)),not(hasflag(%0,dark)),not(hasflag(loc(%0), unfindable)))] &COLDISP_FN SGP - Global Parent Object=[fold(%!/COLDISP_FLD, %0, %r%b%b, %1)] &COLDISP_FLD SGP - Global Parent Object=%0[switch(1, gt(setq(1, sub(mul(setq(2, add(div(strlen(%1), 18), 1))%q2, 18), 1))%q1, sub(76, mul(%q0, 18))), %r%b%b%b[ljust(edit(%1, _, %b), %q1)][setq(0, %q2)], %b[ljust(edit(%1, _, %b), %q1)][setq(0, add(%q2, %q0))])] @@ @@ @@
Credits...veddy important
&CREDITS-CNOTES SGP - Global Parent [email protected] &CREDITS-LWHO SGP - Global Parent [email protected] &CREDITS-+where SGP - Global Parent Object=Audumla@Granite &CREDITS-+UPTIME SGP - Global Parent Object=Orion@Granite &CREDITS-+finger SGP - Global Parent Object=Miateila@Granite &CREDITS-REGISTER SGP - Global Parent Object=Cheetara@Granite &CREDITS-+timestamp SGP - Global Parent Object=BEM@Granite
&CREDITS-+3who SGP - Global Parent Object=Ian@BrazilMUX &CREDITS-+MOTD SGP - Global Parent Object=Created from scratch by Ashen-Shugar (c) 2001, All rights reserved. This code, with permission, belongs to the SGP code development. All issues with credibility, ownership, or code herein should be brought to the distributors of SGP. This code is original and is not based (other than syntax and attribute compatability) off any other code. &CREDITS-OOC SGP - Global Parent Object=Audumla@Granite &CREDITS-BACKGROUNDS SGP - Global Parent Object=BEM@Granite &CREDITS-+BEGINNER SGP - Global Parent Object=Audumla@Granite &DARKEX SGP - Global Parent Object=[orflags(%0,!D)] &FIL-LWHO SGP - Global Parent Object=[match(loc(%0),%l)] &FINGER_LIST_LONG SGP - Global Parent Object=Full Name|Age|Fame|Position|Apparent Age|Plan|RP-Prefs|Alts|Theme Song|Quote|Office-hours|Temperment|Vacation|Homepage &FINGER_LIST SGP - Global Parent Object=fullname|age|fame|position|app-age|plan| rp-prefs|alts|themesong|quote|off-hours|temperment|vacation|url @@ @@ @@
Sample footers to pick from for select for general globals.
&footer SGP - Global Parent Object=[repeat(==,39)] &footer-dash SGP - Global Parent Object=[repeat(--,39)] &footer-eq-o SGP - Global Parent Object=[repeat(=o,39)] &footer-dash-percent-1 SGP - Global Parent Object=[repeat(-%%-!,15)] &footer-dash-percent-2 SGP - Global Parent Object=[repeat(-%%,26)] &footer-dash-percent-3 SGP - Global Parent Object=[repeat(%%-!-,15)] &footer-o-eq SGP - Global Parent Object=[repeat(o-o=o ,15)-o] &footer-ozz SGP - Global Parent Object=[repeat(ozz,26)] &footer-oz SGP - Global Parent Object=[repeat(oz,39)] &footer-xcomplex SGP - Global Parent Object=x[repeat(x-==-,15)]xx &footer-ocomplex SGP - Global Parent Object=[repeat(o-==-o,15)] &footer-complex SGP - Global Parent Object=--oo[repeat(%B-==-%B,12)]oo-&FN_SCANOBJ SGP - Global Parent Object=[setq(6,%0)][iter(filter(FIL_IS$,lattr(%q6)),##)] &FN_SCAN SGP - Global Parent Object=%r[name(%0)]%(%0[flags(%0)]%)[iter(u(FN_SCANOBJ,%0),%r[space(4)][ljust(##,4 0)]%[[mid(get(%0/##),1,sub(pos(:,get(%0/##)),2))]%])] @@ @@ @@ @@
Headers section: This is where you need to makes some choices, my children!
&HEADER SGP - Global Parent Object=[center(>%B%B[mudname()]%B%B<,78,=)]%R &HEADER-STAFF SGP - Global Parent Object=[center(>%B%B[mudname()] Staff%B%B<,78,=)] &HEADER-STAFFCON SGP - Global Parent Object=[center(>%B%B[mudname()] Connected Staff%B%B<,78,=)] @@ @@ @@
Softcoded helpfiles for the U1/Old style TinyMUSH variants MUX has a textfile. Please check server documentation for how to
@@ @@
use it.
&IDLETIME SGP - Global Parent Object=switch(1,lt(%0,60),%0s,lt(%0,3600),div(%0,60)m,lt(%0,86400),div(%0,3600)h,d iv(%0,86400)d) &LASTCONN SGP - Global Parent Object=[setq(9,sub(convtime(%1),convtime(%0)))][ulocal(secs2hrs,%q9)] &LIST-SAMPLE SGP - Global Parent Object=Sample|Audumla|Done and Installed on Global &LOCSORT SGP - Global Parent Object=[comp(name(loc(%0)),name(loc(%1)))] &NAMESORT SGP - Global Parent Object=[comp(name(%0),name(%1))] &SORTLOC SGP - Global Parent Object=[comp(loc(%0),loc(%1))] &SECS2HRS SGP - Global Parent Object=[switch(1,lte(%0,60),%0s,lte(%0,3600),{[div(%0,60)]m},lte(%0,86400),{[div(% 0,3600)]h [rjust(div(mod(%0,3600),60),2)]m},{[div(%0,86400)]d [rjust(div(mod(%0,86400),3600),2)]h})] &STAFF-LIST SGP - Global Parent Object=#0 &STARTING_IC_LOC SGP - Global Parent Object=#0 &TWODIGCONN SGP - Global Parent Object=switch(1,lt(%0,60),rjust(%0s,7),lt(%0,3600),rjust(div(%0,60)m,3)[rjust(mod( %0,60)m,4)],lt(%0,86400),rjust(div(%0,3600)h,3)[rjust(div(mod(%0,3600),60)m,4)],rj ust(div(%0,86400)d,3)[rjust(div(mod(%0,3600),3600)h,4)]) @pemit me=Setting Flags on SGP - Global Parent Object.... Moment. @set SGP - Global Parent Object=SAFE @switch version()=RhostMUSH*,{@set SGP - Global Parent Object=INHERIT},{} @@ @@ @@
Global Functions Object.
Place this in a storage location.
@pemit me=Writing to SGP - Global Functions.... Moment. @desc SGP - Global Functions=This is the global function object for SGP. The startup on this object must be triggered at every startup of the server. As such, the #1 startup on #1 must include the appropriate trigger or the server must be configured so that wizards can use @function. This decision is a matter of preference.%R%R[iter(setdiff(lattr(me),Desc),ljust(##,18))] &FN_OSTAFF SGP - Global Functions=[gt(member(get(v(DB)/staff-list),%0),0)] @pemit me=Setting @startup on SGP - Global Functions.... Moment. @switch version()=PennMUSH*,{@Startup SGP - Global Functions=@dolist lattr(me/fn_*)=@function after(##,FN_)=me,##\;@dolist lattr(me/fnp_*)=@function after(##,FNP_)=me,##},{@Startup SGP - Global Functions=@dolist
lattr(me/fn_*)=@function after(##,FN_)=me/##\;@dolist lattr(me/fnp_*)=@function after(##,FNP_)=me/##} @switch version()=MUX*,{},{&COLUMNS2 SGP - Global Functions=%[setq(0,div(75,%%1))%]%[setq(1,switch(mod(words(%%0,%%2),%%q0),0,div(wo rds(%%0,%%2),%%q0),add(div(words(%%0,%%2),%%q0),1)))%]%[iter(lnum(%%q1),%%r%[u(COL UMNS3,extract(%%0,add(mul(##,%%q0),1),%%q0,%%2),%%1,%%2)%])%]} @switch version()=MUX*,{},{&COLUMNS3 SGP - Global Functions=%[iter(%%0,ljust(##,%%1),%%2)%]} &FIL_IS$ SGP - Global Functions=[not(comp(mid(get(%q6/%0),0,1),$))] &FN_ANDLIST SGP - Global Functions=iter(ldelete(%0,words(%0,%1),%1),##%,,%1) and [last(%0,%1)] @switch version()=MUX*,{},RhostMUSH,{},{&FN_COLUMNS SGP - Global Functions=%[ulocal(SGP - Global Functions/COLUMNS2,%%0,%%1,%%2)%]} &FN_DASH SGP - Global Functions=edit(%0,%B,-) &FN_DICE SGP - Global Functions=[switch(1,gt(%0,24),#-1,lt(%0,1),#1,iter(lnum(%0),add(1,rand(10))))] &FN_FINDPC SGP - Global Functions=[setq(6,locate(%0,%1,aimnpP))][switch(r(6),#*,locate(%0,*%1,p),r(6))] @switch version()=TinyMUSH version 2.2.*,{&FN_ISSTAFF SGP - Global Functions=orflags%(%%0,Wi%)},MUX*,{&FN_ISSTAFF SGP - Global Functions=orflags%(%%0,WZw%)},PennMUSH*,{&FN_ISSTAFF SGP - Global Functions=orflags%(%%0,Wr%)},{&FN_ISSTAFF SGP - Global Functions=orflags%(%%0,iWaBg%)} &FN_MMM-DD-YYYY SGP - Global Functions=[elements(time(),2 3 5)] &FN_ROLL SGP - Global Functions=[switch(1,gt(%0,24),#-1,lt(%0,1),#1,[setq(0,dice(%0))][setq(1,words(iter(%q0,switch(1,gte(##,%1),##))))][setq(2,word s(iter(%q0,switch(##,1,##))))][sub(%q1,%q2)])] &FN_SCANOBJ SGP - Global Functions=[setq(6,%0)][iter(filter(FIL_IS$,lattr(%q6)),##)] &FN_SCAN SGP - Global Functions=%r[name(%0)]%(%0[flags(%0)]%)[iter(u(FN_SCANOBJ,%0),%r[space(4)][ljust(# #,40)]%[[mid(get(%0/##),1,sub(pos(:,get(%0/##)),2))]%])] @pemit me=Setting flags on SGP - Global Functions.... Moment. @switch version()=TinyMUSH version 2.2.*,{@set SGP - Global Functions=INHERIT;@set SGP - Global Functions=SAFE},PennMUSH*,{@set SGP - Global Functions=WIZARD},MUX*,{@set SGP - Global Functions=INHERIT;@set SGP - Global Functions=SAFE},RhostMUSH*,{@set SGP - Global Functions=INHERIT;@set SGP - Global Functions=SAFE} @@ @@ @@
The Main Globals Command object.
Place this in the master room.
@pemit me=Writing to SGP - Main Globals.... Moment. @Desc SGP - Main Globals=This is the main globals object for SGP. These are global commands that every player will have access to and use.%R%R[iter(setdiff(lattr(me),Desc),ljust(##,18))] &CMD-ACCEPT SGP - Main Globals=$+accept:&accept-conditions %#=time(); @pemit %#=You have acknowledged the Acceptable Use Policy as of [get(%#/acceptconditions)]. &CMD-BEGINNER SGP - Main Globals=$+beginner:@pemit %#=[center(Commands for Beginning MUSHers,78, )]%R%RMUSH is new to some of you and probably a little daunting. To ease your feelings of panic, we offer a very basic list of commands that will get you looking around and using the various features of the game.%R%R"<message>[space(16)]You say <message>%RSay <message> [space(12)]See above.%Rooc <message>[space(13)]Makes an OOC statement or pose.%Rpage =<message>[space(3)]Pages with <message>%Rlook[space(22)]Shows you the room you are standing in.%Rlook