-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathPlayer Globals - PGLOB.txt
executable file
·54 lines (34 loc) · 5.3 KB
/
Player Globals - PGLOB.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
@@ DEPENDENCIES - CORE
th u(NEWCOBJ,Player Globals <PGLOB>,pglob,,,,WIZARD SAFE !NO_COMMAND,INHERIT SIDEFX SAFE)
&SYSTEM`NAME [u(cobj,pglob)]=u(strfirstof,%q<sysname>,SYSTEM)
&CMD`CHARSET [u(cobj,pglob)]=$+charset:@pemit %#=wrap(iter(lnum(32,256),if(comp(first(chr(%i0)),#-1),ljust([ljust(%i0:,4)] [ansi(hy,chr(%i0))],7)),%B,),78)
&CMD`+BEEP [u(cobj,pglob)]=$^(?\:\+)beep(?\: +(.*))?$:th u(setq,sysname,beep);@attach %!/INC`JAILCHECK;@attach %!/INC`CHECKPC=%1,1;@attach hasflag(%q<t1>,CONNECTED)=@attach %!/INC`MSG=ERROR: %q<t1name> is offline.;@attach %!/INC`MSG=[beep()][ansi(hr,%n wishes for your attention! BEEP!)],%q<t1>;@attach %!/INC`MSG=You have sent %q<t1name> a beep!
@set [u(cobj,pglob)]/CMD`+BEEP=regexp
&CMD`+FLIP [u(cobj,pglob)]=$+flip:th u(setq,sysname,FLIP);th u(setq,roll,rand(0,100));@switch/first/inline %q<roll>=50,{@attach %!/INC`MSG`ROOM={[ansi(h,%n)] flipped a coin: [switch(rand(1,6),1,it landed on its side!,2,a Demon grabbed it!,3,it never comes back down...,4,when it lands\, both sides are blank.,5,Reality Error 404: Coin not found!,6,it's drawn into a parallel universe!)]}},>50,{@attach %!/INC`MSG`ROOM={[ansi(h,%n)] flipped a coin: Heads!}},{@attach %!/INC`MSG`ROOM={[ansi(h,%n)] flipped a coin: Tails!}}
&CMD`DICE [u(cobj,pglob)]=$+dice *d*:think [u(setq,dice_0,0)][if(strmatch(%1,*+*),[u(setq,dice_a,before(%1,+))][u(setq,dice_b,after(%1,+))],u(setq,dice_a,%1)[u(setq,dice_b,0)])] [switch(and(gt(%0,0),lt(%0,50),gt(%q<dice_a>,0),lt(%q<dice_a>,250),gte(%q<dice_b>,-10),lt(%0,250),isint(%0),isint(%q<dice_a>),isint(%q<dice_b>)),0,pemit(%#,I'm sorry but you can only have positive integers when you roll dice. The addition at the end must be between -10 and 250.),remit(loc(%#),<[ansi(xterm130,DICE ROLLER)]> %N rolled %0d%q<dice_a> [map(me/full_die,[lnum(%0)], ,[space(1)])] + %q<dice_b> = [if(%q<dice_b>,u(setq,dice_0,add(%q<dice_0>,%q<dice_b>)))]%q<dice_0>))]
&FULL_DIE [u(cobj,pglob)]=[u(setq,dice_1,add(rand(%q<dice_a>),1))][u(setq,dice_0,add(%q<dice_0>,%q<dice_1>))]%q<dice_1>
&CMD`UNAFF [u(cobj,pglob)]=$+unaff:@check words(u(setr,unaff,u(sortname,u(filter,UNAFF,lsearch(all,type,player)))))=@attach %!/INC`MSG=ERROR: No unaffiliated players to display. Oops!;@pemit %#=u(header,Unaffiliated Characters);@pemit %#=u(table,iter(%q<unaff>,u(getmoniker,%i0),%b,|),36,u(width,%#),|);@pemit %#=u(footer)
&FIL`UNAFF [u(cobj,pglob)]=cand(nor(u(ISGUEST,%0),u(isadmin,%0),strmatch(name(%0),Guest *)),not(isdbref(u(getproperty,%0,majordb))),hasattrval(%0/D`FINGER`PROFILE),hasattrval(%0/D`FINGER`FUNCTION))
&CMD`+OOC [u(cobj,pglob)]=$^(?s)(\+ooc|osay|\+osay|ooc)(?\: +(.*))$:@check elock(%l/speech,%#)=@attach %!/INC`MSG=ERROR: Permission denied by local speech lock.;@check strlen(%2)=@attach %!/INC`MSG=What will you say?;@stop strmatch(left(%2,1),|)=@attach %!/INC`MSG=Emit feature is disabled.;th u(setq,players,u(lplayers,%l));th u(setq,markup,u(markup,%2,%q<players>));@select/inline %va=PennMUSH,{@message u(canhear,lcon(%l))=%2,%!/FUN`MSGOOC,%#,##,%q<markup>,%q<players>},RhostMUSH,{@pemit/list u(canhear,lcon(%l))=udefault(FUN`MSGOOC,%2,%#,##,%q<markup>,%q<players>)}
@set [u(cobj,pglob)]/CMD`+OOC=regexp
&CMD`+OOC-ALT [u(cobj,pglob)]=$'*:@attach %!/CMD`+OOC=,,%0
&FUN`MSGOOC [u(cobj,pglob)]=localize(ansi(u(setr,borcol,u(color,%1,OOCEDGE)),-<)[ansi(u(color,%1,OOC),OOC)][ansi(%q<borcol>,>-)]%B[if(u(isadmin,%0),ansi(h,lit([Staff])%B))][u(speech,%0,u(colormarkup,%1,%2,%0),%1,,OOC,%3)])
&CMD`QUIT [u(cobj,pglob)]=$^(quit|logoff|logout)$:@select/inline %va=PennMUSH,{@boot/silent %#},RhostMUSH,{@boot/quiet %#}
@set [u(cobj,pglob)]/CMD`QUIT=regexp
@@ COMMUNICATIONS - +ooc
&HLP`+OOC [u(cobj,pglob)]=[ansi(hc,OOC Commands)]%RThese are ALWAYS considered Out-of-character communications.%R[align(5 [sub(u(width,%#),6)],,[ansi(h,osay <speech>)] - Equivalent to say.%R[ansi(h,+ooc <speech>)] - alias of osay%R[ansi(h,+ooc <speech>)] - Alias of Osay.)]
+help/add Communications/+ooc=[u(cobj,pglob)]/HLP`+OOC
@@ ROLEPLAYING - +flip
&HLP`+FLIP [u(cobj,pglob)]=[ansi(hc,Commands)]%R[align(5 [sub(u(width,%#),6)],,[ansi(h,+flip)] - Flip a coin!)]
+help/add Roleplaying/+flip=[u(cobj,pglob)]/HLP`+FLIP
&HLP`+DICE [u(cobj,pglob)]=[ansi(hc,Commands)]%R[align(5 [sub(u(width,%#),6)],,[ansi(h,+dice <num>d<sides>)] - Roll some dice! Example: +dice 2d20)]
+help/add Roleplaying/+dice=[u(cobj,pglob)]/HLP`+DICE
@@ Technical - QUIT
&HLP`QUIT [u(cobj,pglob)]=[ansi(hc,Aliases:)] logoff, logout%R%R[ansi(hc,Commands)]%R[align(5 [sub(u(width,%#),6)],,[ansi(h,QUIT)] - Disconnect safely from the game.)]%R%RDon't worry, PennMUSH saves are independent of safe logoffs. This just doesn't leave a ghost connection hanging.
+help/add Technical/QUIT=[u(cobj,pglob)]/HLP`QUIT
@@ COMMUNICATIONS - +beep
&HLP`+BEEP [u(cobj,pglob)]=[ansi(hc,Commands)]%R[align(5 [sub(u(width,%#),6)],,[ansi(h,+beep <player>)] - \(Hopefully\) makes a noise the other player can hear to try and get their attention. Using this excessively could be considered harassment so be polite. You have been warned!%R%RNot every client will make the noise and it is often disabled.)]
+help/add Communications/+beep=[u(cobj,pglob)]/HLP`+BEEP
@@ TECHNICAL - +Charset
&HLP`+CHARSET [u(cobj,pglob)]=[ansi(hc,See Also:)] [u(pueblize,help chr\(\))]%R%R[ansi(hc,Commands)]%R[align(5 [sub(u(width,%#),6)],,[ansi(h,+charset)] - Display most special characters the game supports.)]
+help/add Technical/+charset=[u(cobj,pglob)]/HLP`+CHARSET