Skip to content

Commit

Permalink
2.0 Beta Rummagings
Browse files Browse the repository at this point in the history
I'm still fixing up a storm of stuff!
Storyteller system is almost finished.
  • Loading branch information
volundmush committed Sep 11, 2015
1 parent 385873c commit 8c37abc
Show file tree
Hide file tree
Showing 50 changed files with 1,482 additions and 1,542 deletions.
25 changes: 0 additions & 25 deletions Account Management System - AMS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -249,31 +249,6 @@ th u(newconf,config,STAFF,WIZLIST_FOOTER,,Displayed at the bottom of +admin.,WOR

&PLAYER`CONNECT`STAFFDUTY [u(cobj,ams)]=@check cand(get(%0/D`STAFF),u(player_config,%0,LOGIN,STATUS));@wait 3={@attach %!/INC`MSG=You are [if(hasflag(%0,DARK),DARK,not Dark)], [if(hidden(%0),Hidden,not Hidden)] and [if(get(%0/D`STAFF`VACATION),on Vacation,if(default(%0/D`STAFF`DUTY,0),On Duty,Off Duty))].}

@@ ********* BUILDER SECTION ********
@select/inline isdbref(u(build))=0,{@tel pcreate(Buildstaff,digest(md5,secs()))=u(cao)}
&build u(coi)=locate(u(cao),Buildstaff,PXxi)
@lock/zone u(build)=POWER^BUILDER
@set u(build)=!UNREGISTERED SHARED
@power u(build)=builder no_pay no_quota
@lset u(build)/zone=v


&OBJECT`CREATE`BUILDER [u(cobj,ams)]=@check hastype(%0,ROOM EXIT);@check haspower(owner(%0),BUILDER);@chown/preserve %0=u(build)

&CMD`+BUILDER [u(cobj,ams)]=$^(?\:\+)?(builder)(?\:/(\S+)?)?(?\: +(.+?))?(?\:=(.*))?$:@attach %!/INC`PARTIAL=%2,setunion(get(u(cao)/VAR`BUILDER`PLAYFLAGS),if(isadmin(%#),get(u(cao)/VAR`BUILDER`ADMINFLAGS)),|,|),|,BUILDER,switch,switch;@attach %!/INC`BUILDER`[strfirstof(%q<switch>,MAIN)]=%3,%4
@set u(cao)/CMD`+BUILDER=regexp

&INC`BUILDER`MAIN [u(cobj,ams)]=@select/inline isadmin(%#)=1,{@select/inline strlen(%0)=0,{@check words(u(setr,build,lsearch(all,eplayer,\[haspower(##,BUILDER)\])))=@pemit %#=msghead(BUILDER) There are no Builder Characters.;@pemit %#=header(mudname() Builder Characters);@pemit %#=iter(%q<build>,ansi(h,%i0 - [name(%i0)]) - [powers(%i0)],%b,%R);@pemit %#=header()},{@attach %!/INC`CHECKPC=%0,1,BUILDER;@pemit %#=header(%q<t1name>'s Belongings);@dolist/inline THING ROOM EXIT=@select/inline gt(words(u(setr,search,lsearch(%q<t1>,type,%i0))),0)=1,{@pemit %#=subheader(Type: %i0);@dolist/inline %q<search>=@pemit %#=[rjust(pueblize(%i0,brief %i0),7)] - [name(%i0)]};@pemit %#=header()}},0,{@pemit %#=msghead(BUILDER) You [if(haspower(%#,BUILDER),ansi(hg,are),ansi(hr,are not))] A Builder!}

&INC`BUILDER`ADD [u(cobj,ams)]=@attach %!/INC`CHECKPC=%0,1,BUILDER;@stop haspower(%q<t1>,BUILDER)=@pemit %#=msghead(BUILDER) ERROR: They are already a Builder.;@set %q<t1>=!UNREGISTERED;@power %q<t1>=builder no_quota tel_anywhere open_anywhere link_anywhere;give %q<t1>=100000;@pemit %#=msghead(BUILDER) You have made %q<t1name> a Builder.;@pemit %q<t1>=msghead(BUILDER) %n has granted you Builder powers.;@select/inline gt(v(VAR`BUILDER`ALERTMODE),0)={@nscemit/noisy u(VAR`BUILDER`ALERTSCHANNEL)=%n has made %q<t1name> a Builder.}

&INC`BUILDER`REM [u(cobj,ams)]=@attach %!/INC`CHECKPC=%0,1,BUILDER;@check haspower(%q<t1>,BUILDER)=@pemit %#=msghead(BUILDER) ERROR: They are not a Builder.;@set %q<t1>=!UNREGISTERED;@power %q<t1>=!builder !no_quota !tel_anywhere !open_anywhere !link_anywhere;@select/inline lt(money(%q<t1>),100000)=1,{give %q<t1>=100000};give %q<t1>=-99000;@pemit %#=msghead(BUILDER) You have revoked %q<t1name>'s Builder powers.;@pemit %q<t1>=msghead(BUILDER) %n has revoked your Builder powers.;@select/inline gt(v(VAR`BUILDER`ALERTMODE),0)={@nscemit/noisy u(VAR`BUILDER`ALERTSCHANNEL)=%n has revoked %q<t1name>'s Builder powers.}

&VAR`BUILDER`ADMINFLAGS [u(cobj,ams)]=ADD|REM

&VAR`BUILDER`ALERTMODE [u(cobj,ams)]=1
&VAR`BUILDER`ALERTSCHANNEL [u(cobj,ams)]=u(CMO`STAFFREP)

@@ ******** IDLERS SECTION ******
&CMD`+IDLERS [u(cobj,ams)]=$^(?\:\+)?(idlers)(?\:/(\S+)?)?(?\: +(.+?))?(?\:=(.*))?$:@attach %!/INC`PARTIAL=%2,setunion(get(u(cao)/VAR`%1`PLAYFLAGS),if(isadmin(%#),get(u(cao)/VAR`%1`ADMINFLAGS)),|,|),|,%1,switch,switch;@attach %!/INC`%1`[strfirstof(%q<switch>,MAIN)]=%3,%4
@set u(cao)/CMD`+IDLERS=regexp
Expand Down
20 changes: 17 additions & 3 deletions CORE 01 - Master Code Object - MCO.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ th if(isdbref(u(cobj,mco)),,setq(0,create(Master Code Object <MCO>))[tel(%q0,swi
&FIL`ALIASMATCH [u(cobj,mco)]=strmatch(alias(%0),%1*)
&FIL`NOTGUEST [u(cobj,mco)]=not(u(isguest,%0))
&FIL`FINDACCOUNT [u(cobj,mco)]=match(get(%0/CHARACTERS),%q<finddb>)
&FIL`STRLEN [u(cobj,mco)]=t(strlen(%0))
&FIL`ISINT [u(Cobj,mco)]=isint(%0)

@@ U-FUNCTION SECTION

Expand Down Expand Up @@ -158,6 +160,10 @@ th if(isdbref(u(cobj,mco)),,setq(0,create(Master Code Object <MCO>))[tel(%q0,swi
&LMAX`PENNMUSH [u(cobj,mco)]=lmath(max,%0,%1)
&LMAX`RHOSTMUSH [u(cobj,mco)]=lmax(%0,%1)

&LMIN [u(cobj,mco)]=u(LMIN`[v(game)],%0,%1)
&LMIN`PENNMUSH [u(cobj,mco)]=lmath(min,%0,%1)
&LMIN`RHOSTMUSH [u(cobj,mco)]=lmin(%0,%1)

&LADD [u(cobj,mco)]=u(LADD`[v(game)],%0,%1)
&LADD`PENNMUSH [u(cobj,mco)]=lmath(add,%0,%1)
&LADD`RHOSTMUSH [u(cobj,mco)]=ladd(%0,%1)
Expand All @@ -177,6 +183,10 @@ th if(isdbref(u(cobj,mco)),,setq(0,create(Master Code Object <MCO>))[tel(%q0,swi

&CAPNAMES [u(cobj,mco)]=regeditalli(lcstr(%0),v(REG`CAPNAMES),capstr($1),v(REG`CAPNAMES3),lcstr($0),v(REG`CAPNAMES2),$1[capstr($2)])

&REG`CAPNAMES [u(cobj,mco)]=(?:^|(?<=[_\/\-\|\s()\+]))([a-z]+)
&REG`CAPNAMES2 [u(cobj,mco)]=(^|(?<=[(\|\/]))(of|the|a|and|in)
&REG`CAPNAMES3 [u(cobj,mco)]=\b(of|the|a|and|in)\b

&COMMAFY [u(cobj,mco)]=u(COMMAFY`[v(game)],%0)
&COMMAFY`PENNMUSH [u(cobj,mco)]=squish(flip(foreach(#lambda/if(mod(\%1,3),\%0,\\,\%0),flip(%0))),\,)
&COMMAFY`RHOSTMUSH [u(cobj,mco)]=squish(flip(foreach(#lambda/if(mod([lit(%1)],3),[lit(%0)],\\,[lit(%0)]),flip(%0))),\,)
Expand Down Expand Up @@ -279,7 +289,11 @@ th if(isdbref(u(cobj,mco)),,setq(0,create(Master Code Object <MCO>))[tel(%q0,swi

&HASATTRVAL [u(cobj,mco)]=u(HASATTRVAL`[v(game)],%0)
&HASATTRVAL`PENNMUSH [u(cobj,mco)]=hasattrval(%0)
&HASATTRVAL`RHOSTMUSH [u(cobj,mco)]=!!$get(%0,%1)
&HASATTRVAL`RHOSTMUSH [u(cobj,mco)]=!!$get(%0)

&NAMELIST [u(cobj,mco)]=u(NAMELIST`[v(game)],%0,%1)
&NAMELIST`PENNMUSH [u(cobj,mco)]=namelist(%0,%1)
&NAMELIST`RHOSTMUSH [u(cobj,mco)]=iter(%0,ifelse(!match(setr(0,pmatch(##)),#-1*),%q0,#-1[objeval(%#,u(%1,##,#-1))]))

&LWHOID [u(cobj,mco)]=u(LWHOID`[v(game)],%0)
&LWHOID`PENNMUSH [u(cobj,mco)]=lwhoid(%0)
Expand Down Expand Up @@ -426,7 +440,7 @@ th if(isdbref(u(cobj,mco)),,setq(0,create(Master Code Object <MCO>))[tel(%q0,swi
&GETPROPERTY`ALLRANKLISTLINE [u(cobj,mco)]=u(GETPROPERTY`ALLRANKLIST,%0,1)

&SORTGROUPS [u(cobj,mco)]=u(SORTGROUPS`[v(game)],%0,if(strlen(%1),%1,%B),if(strlen(%2),%2,%B))
&SORTGROUPS`PENNMUSH [u(cobj,mco)]=sort(%0,attr:SET`SORT,%1,%2)
&SORTGROUPS`PENNMUSH [u(cobj,mco)]=sortkey(#lambda/default(\%0/SET`SORT,99),%0,n,%1,%2)
&SORTGROUPS`RHOSTMUSH [u(cobj,mco)]=sortby(#lambda/[lit([ncomp(default(%0/SET`SORT,99),default(%1/SET`SORT,99))])],%0,%1,%2)

&FIL`MAJOR [u(cobj,mco)]=t(u(u(cobj,gms)/FUN`GETSET,%0,MAJOR))
Expand Down Expand Up @@ -527,7 +541,7 @@ th if(isdbref(u(cobj,mco)),,setq(0,create(Master Code Object <MCO>))[tel(%q0,swi

&SYSTEM`SWITCHES [u(cobj,mco)]=setunion(u(SWITCHES`PLAYER),if(u(isadmin,%#),u(SWITCHES`ADMIN)),|,|)

&INC`PARTIAL [u(cobj,mco)]=@select/inline or(not(strlen(%0)),u(setr,matched,match(%1,u(setr,u(strfirstof,%3,choice),%0),u(strfirstof,%2,%b))))=0,{@check words(u(setr,u(strfirstof,%3,choice),graball(%1,%0*,u(strfirstof,%2,%b),u(strfirstof,%2,%b))))=@attach %!/INC`MSG={ERROR: Invalid %4! Valid choices are: [u(itemize,%1,u(strfirstof,%2,%b))]};@stop gt(words(r(u(strfirstof,%3,choice)),u(strfirstof,%2,%b)),1)=@attach %!/INC`MSG={ERROR: %0 matched [u(itemize,r(u(strfirstof,%3,choice)),u(strfirstof,%2,%b),and,\,)]. Please be more specific.}},1,{@select/inline cand(t(strlen(%0)),t(%q<matched>))=1,{th u(setq,u(strfirstof,%3,choice),elements(%1,%q<matched>,u(strfirstof,%2,%b)))}}
&INC`PARTIAL [u(cobj,mco)]=@select/inline or(not(strlen(%0)),u(setr,matched,match(%1,u(setr,u(strfirstof,%3,choice),%0),u(strfirstof,%2,%b))))=0,{@check words(u(setr,u(strfirstof,%3,choice),graball(%1,%0*,u(strfirstof,%2,%b),u(strfirstof,%2,%b))))=@attach %!/INC`MSG={ERROR: Invalid %4! Valid choices are: [u(itemize,%1,u(strfirstof,%2,%b),and,\,)]};@stop gt(words(r(u(strfirstof,%3,choice)),u(strfirstof,%2,%b)),1)=@attach %!/INC`MSG={ERROR: %0 matched [u(itemize,r(u(strfirstof,%3,choice)),u(strfirstof,%2,%b),and,\,)]. Please be more specific.}},1,{@select/inline cand(t(strlen(%0)),t(%q<matched>))=1,{th u(setq,u(strfirstof,%3,choice),elements(%1,%q<matched>,u(strfirstof,%2,%b)))}}
@@ PARTIAL %0 = entry, %1 = choices, %2 = delimiter, %3 = register name, %4 = topic name

&WIPE [u(cobj,mco)]=@select/inline v(game)=PennMUSH,{@select/inline hasflag(%0,SAFE)=1,{@set %0=!SAFE;@wipe %0/%1;@set %0=SAFE},0,{@wipe %0/%1}},RhostMUSH,{@select/inline hasflag(%0,SAFE)=1,{@set %0=!SAFE;@wipe/regexp %0/^%1(`.+)?$;@set %0=SAFE},0,{@wipe/regexp %0/^%1(`.+)?$}}
Expand Down
17 changes: 15 additions & 2 deletions Grid and Navigation System - GRID.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,34 @@ th u(NEWCOBJ,District Parent <DISTRICT>,district,u(cobj,grid),u(cobj,ancestor_ro
&FUN`ENTER [u(cobj,district)]=cand(approved(%#),not(hasflag(%#,JAILED)))
&FUN`TELEPORT [u(cobj,district)]=cand(approved(%#),not(hasflag(%#,JAILED)))

&CMD`+GRID`PENNMUSH [u(cobj,grid)]=$^(?s)(?\:\+)?(district|dig|open|convert)(?\:/(\S+)?)?(?\: +(.+?))?(?\:=(.*))?$:@attach %!/CMD`+GRID`MAIN
@select/inline isdbref(u(setr,builder,pmatch(Buildstaff)))=1,{&COBJ`BUILDSTAFF [u(cobj,mco)]=u(objid,%q<builder>)},0,{@pcreate Buildstaff=[digest(md5,secs())];&COBJ`BUILDSTAFF [u(cobj,mco)]=u(objid,pmatch(Builderstaff))}
@select/inline v(game)=PennMUSH,{@lock/zone u(cobj,buildstaff)=POWER^BUILDER;@set u(cobj,buildstaff)=!UNREGISTERED SHARED;@power u(cobj,buildstaff)=no_pay no_quota;@lset u(cobj,buildstaff)/zone=visual},RhostMUSH,{}

&CMD`+GRID`PENNMUSH [u(cobj,grid)]=$^(?s)(?\:\+)?(district|dig|open|convert|builder)(?\:/(\S+)?)?(?\: +(.+?))?(?\:=(.*))?$:@attach %!/CMD`+GRID`MAIN
@set [u(cobj,grid)]/CMD`+GRID`PENNMUSH=regexp
&CMD`+GRID`RHOSTMUSH [u(cobj,grid)]=$^(?s)(?\:\+)?(district|dig|open|convert)(?\:/(\\S+)?)?(?\: +(.+?))?(?\:=(.*))?$:@attach %!/CMD`+GRID`MAIN
&CMD`+GRID`RHOSTMUSH [u(cobj,grid)]=$^(?s)(?\:\+)?(district|dig|open|convert|builder)(?\:/(\\S+)?)?(?\: +(.+?))?(?\:=(.*))?$:@attach %!/CMD`+GRID`MAIN
@set [u(cobj,grid)]/CMD`+GRID`RHOSTMUSH=regexp
&CMD`+GRID`MAIN [u(cobj,grid)]=th u(setq,systype,%1);@attach %!/INC`GETSWITCH=%2;@attach %!/INC`%q<systype>`[u(strfirstof,%q<switch>,MAIN)]=%3,%4
@set [u(cobj,grid)]/CMD`+GRID`[switch(v(game),PennMUSH,RHOSTMUSH,RhostMUSH,PENNMUSH)]=no_command

&SWITCHES`DISTRICT`PLAYER [u(cobj,grid)]=LOCK|UNLOCK|DESCRIBE|IC
&SWITCHES`DISTRICT`ADMIN [u(cobj,grid)]=CREATE|RENAME|ORDER
&SWITCHES`DIG`PLAYER [u(cobj,grid)]=TELEPORT
&SWITCHES`BUILDER`ADMIN [u(cobj,grid)]=ADD|REMOVE


&SYSTEM`SWITCHES [u(cobj,grid)]=setunion(v(SWITCHES`%q<systype>`PLAYER),if(u(isadmin,%#),v(SWITCHES`%q<systype>`ADMIN)),|,|)

&SYSTEM`NAME [u(cobj,grid)]=GRID

&INC`BUILDER`MAIN [u(cobj,ams)]=@select/inline u(isadmin,%#)=1,{@select/inline strlen(%0)=0,{@check words(u(setr,build,u(choosegame,lsearch(all,player,elock,POWER^BUILDER),))=@attach %!/INC`MSG=There are no Builder Characters.;@pemit %#=u(header,mudname() Builder Characters);@pemit %#=iter(%q<build>,ansi(h,%i0 - [name(%i0)]) - [powers(%i0)],%b,%R);@pemit %#=u(header)},{@attach %!/INC`CHECKPC=%0,1;@pemit %#=u(header,%q<t1name>'s Belongings);@dolist/inline THING ROOM EXIT=@select/inline gt(words(u(setr,search,lsearch(%q<t1>,type,##))),0)=1,{@pemit %#=u(subheader,Type: ##);@dolist/inline %q<search>={th u(setq,item,u(choosegame,%i0,%d0));@pemit %#=[rjust(pueblize(%q<item>,brief %q<item>),7)] - [name(%q<item>)]}};@pemit %#=u(subheader)}},0,{@attach %!/INC`MSG=You [if(haspower(%#,BUILDER),ansi(hg,are),ansi(hr,are not))] A Builder!}

&INC`BUILDER`ADD [u(cobj,ams)]=@attach %!/INC`CHECKPC=%0,1;@stop haspower(%q<t1>,BUILDER)=@attach %!/INC`MSG=ERROR: They are already a Builder.;@set %q<t1>=!UNREGISTERED;@power %q<t1>=builder;give %q<t1>=100000;@attach %!/INC`MSG=You have made %q<t1name> a Builder.;@pemit %q<t1>=msghead(BUILDER) %n has granted you Builder powers.;@select/inline gt(v(VAR`BUILDER`ALERTMODE),0)={@nscemit/noisy u(VAR`BUILDER`ALERTSCHANNEL)=%n has made %q<t1name> a Builder.}

&INC`BUILDER`REMOVE [u(cobj,ams)]=@attach %!/INC`CHECKPC=%0,1;@check haspower(%q<t1>,BUILDER)=@attach %!/INC`MSG=ERROR: They are not a Builder.;@set %q<t1>=!UNREGISTERED;@power %q<t1>=!builder;@select/inline lt(money(%q<t1>),100000)=1,{give %q<t1>=100000};give %q<t1>=-99000;@attach %!/INC`MSG=You have revoked %q<t1name>'s Builder powers.;@pemit %q<t1>=msghead(BUILDER) %n has revoked your Builder powers.;@select/inline gt(v(VAR`BUILDER`ALERTMODE),0)={@nscemit/noisy u(VAR`BUILDER`ALERTSCHANNEL)=%n



&FUN`LISTDISTRICTS [u(cobj,grid)]=u(sortorder,u(sortname,children(u(cobj,district))))

&INC`DISTRICT`MAIN [u(cobj,grid)]=@select/inline strlen(%0)=>0,{@attach %!/INC`DISTRICT`CHOOSE},{@attach %!/INC`DISTRICT`LIST}
Expand Down
3 changes: 3 additions & 0 deletions Player Globals - PG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ th u(NEWCOBJ,Player Globals <PG>,player_globals,,,,WIZARD SAFE !NO_COMMAND,INHER

&CMD`+FLIP [u(cobj,player_globals)]=$+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,player_globals)]=$+dice *d*:think [u(setq,0,0)][if(strmatch(%1,*+*),[u(setq,a,[before(%1,+)])][u(setq,b,[after(%1,+)])],[u(setq,a,%1)][u(setq,b,0)])] [switch([and([gt(%0,0)],[lt(%0,50)],[gt(%qa,0)],[lt(%qa,250)],[gte(%qb,-10)],[lt(%0,250)],[isint(%0)],[isint(%qa)],[isint(%qb)])],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%qa [map(me/full_die,[lnum(%0)], ,[space(1)])] + %qb = [if(%qb,[u(setq,0,[add(%q0,%qb)])])]%q0)])]
&FULL_DIE [u(cobj,player_globals)]=[u(setq,1,add(rand(%qa),1))][u(setq,0,add(%q0,%q1))]<%q1>

&CMD`+OOC [u(cobj,player_globals)]=$^(?s)(\+ooc|osay|\+osay)(?\: +(.*))?$:@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));@select/inline v(game)=PennMUSH,{@message lcon(%l)=%2,%!/FUN`MSGOOC,%#,##,%2,%q<players>},RhostMUSH,{@pemit/list lcon(%l)=udefault(FUN`MSGOOC,%2,%#,##,%2,%q<players>)}
@set [u(cobj,player_globals)]/CMD`+OOC=regexp

Expand Down
2 changes: 1 addition & 1 deletion Version1/scenesys/Scene System - SCENE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@
&INC`SCENES`RESCHEDULE u(scene)=@include u(scene)/INC`USERCHECK=%:;@include u(scene)/INC`VALSCHED=%0;@include u(scene)/INC`OWNSCHED=%q<schedule>,%q<pid>;@include u(scene)/INC`CHECKTIME=%1;@include u(scene)/INC`DOSQL=SET`SCHEDULEDATE,%q<time>,%q<schedule>;&%q<post> %q<bb>=u(FUN`FORMATPOST,u(sql,get`scheduletitle,%q<schedule>),%n,fancytime(u(sql,get`scheduletime,%q<schedule>),u(scene)),u(sql,get`scheduledesc,%q<schedule>));@nspemit %#=u(RFN`MSGHEAD) The schedule date was modified!
&SQL`SET`SCHEDULEDATE u(scene)=UPDATE $DATABASE$.$SCHEDULE$ SET schedule_date=FROM_UNIXTIME(?) WHERE schedule_id=?

&INC`SCENES`MAIL u(scene)=@include u(scene)/INC`USERCHECK=%:;@include u(scene)/INC`VALSCHED=%0;@include u(scene)/INC`OWNSCHED=%q<schedule>,%q<pid>;@assert words(setr(mailto,filterbool(#lambda/isobjid(\%0),setunion(u(sql,get`taggedobj,%q<schedule>),setunion(u(sql,get`schedownerobj,%q<schedule>),%:)))))=@nspemit %#=u(RFN`MSGHEAD) No valid recipients to mail to.;@assert strlen(%1)=@nspemit %#=u(RFN`MSGHEAD) ERROR: No message text.;@force/inplace %#={@mail %q<mailto>=%1}
&INC`SCENES`MAIL u(scene)=@include u(scene)/INC`USERCHECK=%:;@include u(scene)/INC`VALSCHED=%0;@include u(scene)/INC`OWNSCHED=%q<schedule>,%q<pid>;@assert words(setr(mailto,filterbool(#lambda/isobjid(\%0),setunion(u(sql,get`taggedobj,%q<schedule>),setunion(u(sql,get`schedownerobj,%q<schedule>),%:)))))=@nspemit %#=u(RFN`MSGHEAD) No valid recipients to mail to.;@assert strlen(%1)=@nspemit %#=u(RFN`MSGHEAD) ERROR: No message text.;@force/inplace %#={@mail %q<mailto>=SCHEDULE: %q<schedule>/%1}
&SQL`GET`TAGGEDOBJ u(scene)=SELECT DISTINCT players.objid FROM $DATABASE$.$TAGS$ AS tags LEFT JOIN $DATABASE$.$PLAYERS$ as players ON tags.player_id=players.player_id WHERE schedule_id=?
&SQL`GET`SCHEDOWNEROBJ u(scene)=SELECT objid from $DATABASE$.$SCHEDULE$ NATURAL LEFT JOIN $DATABASE$.$PLAYERS$ WHERE schedule_id=?

Expand Down
Loading

0 comments on commit 8c37abc

Please sign in to comment.