Dungeons and Dragons Virtual TableTop aid
A virtual tabletop, complete with character sheet and a map, to assist players in playing Dungeons and Dragons.
Functions:
abs(),
add(),
after(),
ansi(),
before(),
cand(),
capstr(),
center(),
comp(),
dec(),
die(),
div(),
edit(),
elements(),
emit(),
eq(),
extract(),
fdiv(),
first(),
foreach(),
grab(),
graball(),
gt(),
gte(),
hasattr(),
hasattrp(),
hasattrval(),
hastype(),
idle(),
if(),
ifelse(),
inc(),
inum(),
isdbref(),
isint(),
isword(),
iter(),
itext(),
last(),
lattr(),
lcon(),
lcstr(),
left(),
ljust(),
lmath(),
lnum(),
loc(),
lparent(),
lt(),
lte(),
match(),
mid(),
min(),
mod(),
mul(),
munge(),
name(),
not(),
null(),
owner(),
pemit(),
pmatch(),
r(),
regrep(),
remove(),
repeat(),
replace(),
rest(),
revwords(),
rjust(),
room(),
secs(),
set(),
setdiff(),
setinter(),
setq(),
setr(),
setunion(),
sort(),
space(),
squish(),
strlen(),
strmatch(),
sub(),
switch(),
t(),
table(),
timestring(),
u(),
ucstr(),
v(),
wipe(),
words(),
wrap().
Features:
regexp commands.
Instructions
Copy and paste the below code into a compatible MUSH or MUX.
MUSHCode for Dungeons and Dragons Virtual TableTop aid
@create grid parent
@link grid parent = #0
@lset grid parent/Basic=no_inherit
@set grid parent = LINK_OK
@set grid parent = VISUAL
@set grid parent = SAFE
@set grid parent = !NO_COMMAND
&AUTHOR grid parent=Walker and Trispis@M*U*S*H with help of the D&D gang.
@set grid parent=BOARD.EXAMPLE:25:10| ` ` `|`~bh`~bh`~bh`~bh`~bh`~bh`~bh`|` ` ` `|`~bh`~bh`~bh`~bh`~bh`~bh`~bh`~bh`~bh` ` ` `|`~bh`~bh`~bh`~bh`~bh`~bh`~bh`|` ` ` `|`~bh`~bh`~bh`~bh`~bh`~bh`~bh`~bh`~bh` ` ` `|`~bh`~bh`~bh`~bh`~bh`~bh`~bh`|` ` ` `|`~bh`~bh`~bh`~bh`~bh`~bh`~bh`~bh`~bh` ` ` `|`~bh`~bh`~bh`~bh`~bh`~bh`~bh`|` ` ` `|`~bh`~bh`~bh`~bh`~bh`~bh`~bh`~bh`~bh` ` ` `|`-`-`-`-`-`-`-`|` ` ` `|`-`-`-`-`-`-`-`-`-` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` `-`-`-`-`-`-`-`-`-`-`-`-`-`-`-`-`-`-`-`-`-`-`-`-`-` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` `%b
&CMD.DDCOLOR grid parent=$^dd/color ([hHuUiInxXrRgGyYbBmMcCwW]+)$:@pemit %#=Color set to [set(me,color.%#:%1u)]'[ansi(v(color.%#),v(color.%#))]'
@set grid parent/CMD.DDCOLOR=regexp
&CMD.DDEMIT grid parent=$dd/emit *:@switch v(name.%#)=,@pemit %#={You're not playing.},@emit [u(h.s,%#)] %0
&CMD.DDGO grid parent=$^dd/go ([a-zA-Z][0-9]+)$:think u(fun.ddgo,lcstr(%1))
@set grid parent/CMD.DDGO=regexp
&CMD.DDHELP grid parent=$^dd/help(| (.)*)$:@pemit %#=[u(headfoot)]%r[switch(0,strlen(squish(%1)),u(help.dd),words(u(h.plattr,help.dd.[squish(%1)]*)),No such help command,u(first(u(h.plattr,help.dd.[squish(%1)]*))))]%r[u(headfoot)]
@set grid parent/CMD.DDHELP=regexp
&CMD.DDLEAVE grid parent=$dd/leave:think u(fun.ddleave)
&CMD.DM grid parent=$dm:@pemit %#=u(describe)
&CMD.DMAT grid parent=$^dm/at(|(( [a-zA-Z0-9]+)+))$:think u(fun.dmloc,squish(lcstr(%1)))
@set grid parent/CMD.DMAT=regexp
&CMD.DMBACK grid parent=$dm/back:think u(fun.dmback)
&CMD.DMCLEAR grid parent=$^dm/clear (([a-zA-Z0-9#]+)(| ([a-zA-Z0-9]+))+)$:think u(fun.dmclear,lcstr(%1))
@set grid parent/CMD.DMCLEAR=regexp
&CMD.DMCLEARINIT grid parent=$^dm/clearinit$:think u(fun.dmclearinit)
@set grid parent/CMD.DMCLEARINIT=regexp
&CMD.DMDEFINE grid parent=$^dm/(def|defi|defin|define) ([a-zA-Z0-9]+)=([a-zA-Z0-9 ]+),(.[hHuUiInxXrRgGyYbBmMcCwW]+):think u(fun.dmdefine,%2,%3,%4)
@set grid parent/CMD.DMDEFINE=regexp
&CMD.DMDELETE grid parent=$^dm/delete ([a-zA-Z0-9]+)$:think u(fun.dmdelete,%1)
@set grid parent/CMD.DMDELETE=regexp
&CMD.DMEMIT grid parent=$dm/emit *:@switch u(isdm)=0,think u(h.error),@emit [ansi(rh,DM)][ansi(wh,>)] %0
&CMD.DMFILL grid parent=$^dm/fill (.|.[hHuUiInxXrRgGyYbBmMcCwW]+)=([a-zA-z])([0-9]+)[- x*]([a-zA-Z])([0-9]+)$:think u(fun.fill,lcstr(%2),lcstr(%4),%3,%5,%1)
@set grid parent/CMD.DMFILL=regexp
&CMD.DMFILLONE grid parent=$^dm/fill (.|.[hHuUiInxXrRgGyYbBmMcCwW]+)=(([a-zA-z])([0-9]+))$:think u(fun.dmspot,%1,lcstr(%2))
@set grid parent/CMD.DMFILLONE=regexp
&CMD.DMHELP grid parent=$^dm/help(| (.)*)$:@pemit %#=[u(headfoot)]%r[switch(0,strlen(squish(%1)),u(help.dm),words(u(h.plattr,help.dm.[squish(%1)]*)),No such help command,u(first(u(h.plattr,help.dm.[squish(%1)]*))))]%r[u(headfoot)]
@set grid parent/CMD.DMHELP=regexp
&CMD.DMHP grid parent=$^dm/hp(( ([#a-zA-Z0-9]+[\+=-][0-9]+))+)$:think u(fun.dmhp,lcstr(%1))
@set grid parent/CMD.DMHP=regexp
&CMD.DMINIT grid parent=$^dm/init((| [a-zA-Z0-9]+=(-|)[0-9]+)+)$:think u(fun.dminit,squish(lcstr(%1)))
@set grid parent/CMD.DMINIT=regexp
&CMD.DMKILL grid parent=$^dm/kill (([a-zA-Z0-9#]+)(| ([a-zA-Z0-9]+))+)$:think u(fun.dmkill,lcstr(%1))
@set grid parent/CMD.DMKILL=regexp
&CMD.DMLISTDEFS grid parent=$^dm/(ldef|ldefs|listd|listde|listdef|listdefs)((| [a-zA-Z0-9*]+)+)$: think u(fun.dmlistdefs,squish(%2))
@set grid parent/CMD.DMLISTDEFS=regexp
&CMD.DMLISTMAPS grid parent=$^dm/listmaps(| [a-zA-Z0-9]+)$:think u(fun.dmlistmaps,squish(%1))
@set grid parent/CMD.DMLISTMAPS=regexp
&CMD.DMLISTSYMS grid parent=$^dm/listsyms(| [a-zA-Z0-9]+)$:think u(fun.dmlistsyms,squish(%1))
@set grid parent/CMD.DMLISTSYMS=regexp
&CMD.DMLOAD grid parent=$^dm/load ([a-zA-Z0-9]+)$:think u(fun.dmload,%1)
@set grid parent/CMD.DMLOAD=regexp
&CMD.DMLOC grid parent=$^dm/loc(|(( [a-zA-Z0-9]+)+))$:think u(fun.dmloc,squish(lcstr(%1)))
@set grid parent/CMD.DMLOC=regexp
&CMD.DMMOVE grid parent=$^dm/move((( )([a-zA-Z0-9#]+[=-][a-zA-Z][0-9]+))+)$:think u(fun.dmmove,edit(lcstr(%1),=,-))
@set grid parent/CMD.DMMOVE=regexp
&CMD.DMNEXT grid parent=$dm/next:@tr me/trig.next_0=[v(play.turn)];think [u(fun.dmnext)]
&CMD.DMPUT grid parent=$^dm/put ([a-zA-Z0-9]+)=(([a-zA-Z][0-9]+)(| ([a-zA-Z][0-9]+))+)$:think u(fun.dmput,lcstr(%1),lcstr(%2),sym)
@set grid parent/CMD.DMPUT=regexp
&CMD.DMREMOVE grid parent=$dm/remove *:think set(me,menu.contents:[setdiff(v(menu.contents),%0)])[pemit(%#,%0 removed)]
&CMD.DMRESIZE grid parent=$^dm/resize ([1-9]|1[0-9]|2[0-5])[- x]([1-9]|1[0-9]|2[0-5])$:think u(fun.resize,%2,%1)
@set grid parent/CMD.DMRESIZE=regexp
&CMD.DMSAVE grid parent=$^dm/save ([a-zA-Z0-9]+)$:think u(fun.dmsave,%1)
@set grid parent/CMD.DMSAVE=regexp
&CMD.DMSET grid parent=$^dm/set (d|de|dea|dead|a|al|ali|aliv|alive|o|ob|obj|obje|objec|object)=(([a-zA-Z0-9]+)(| [a-zA-Z0-9]+)+)$:think u(fun.dmset,%1,%2)
@set grid parent/CMD.DMSET=regexp
&CMD.DMSPOT grid parent=$^dm/spot (.|.[hHuUiInxXrRgGyYbBmMcCwW]+)=(((| )([a-zA-z][0-9]+))+)$:think u(fun.dmspot,%1,%2)
@set grid parent/CMD.DMSPOT=regexp
&CMD.DMUNDEFINE grid parent=$^dm/(undef|undefi|undefin|undefine)(( [a-zA-Z0-9]+)+)$:think u(fun.dmundefine,%2)
@set grid parent/CMD.DMUNDEFINE=regexp
&CMD.DMVIEWDEFS grid parent=$^dm/(view|vie|vi|v|vdef|vdefs|viewd|viewde|viewdef|viewdefs)((| [a-zA-Z0-9*]+)+)$: think u(fun.dmviewdefs,squish(%2))
@set grid parent/CMD.DMVIEWDEFS=regexp
&CMD.MV grid parent=$^mv ([a-zA-Z][0-9]+)$:think u(fun.ddgo,lcstr(%1))
@set grid parent/CMD.MV=regexp
&CMD.NOTE grid parent=$^d[dm]/note(s?) ([a-zA-Z0-9* ]+)(|=.*)$:think u(fun.note,%2,%3)
@set grid parent/CMD.NOTE=regexp
&CMND.DD grid parent=$dd:@pemit %#=[u(describe)]
&CMND.DDP_X grid parent=$ddp *:@pemit/list [setr(0,ifelse(t(v(name.%#)),setinter(lcon(room(me)),iter(lattr(me/name.#*),after(itext(0),.))),%#))]=[ifelse(t(v(name.%#)),[ansi(yh,\{)][ansi(h,DDP)]arty[ansi(yh,\})] \([ansi(v(color.%#),v(symbol.%#))]\) [v(name.%#)][switch(%0,:*,%b[after(%0,:)],;*,[after(%0,;)],%bsays\, "%0")],You're not playing.)]
&CMND.DD_COST_X grid parent=$dd/cost *=*:@pemit %#=[if(lmath(and,[isint(%1)] [lt(%1,100)] [t(setr(a,lattr(last(lparent(me))/data.cost.%0*)))]),%r[capstr(lcstr(last(%qa,.)))] costs%RCaster Level: %1%r%r[space(4)]| [center(Spell Level,mul(8,setr(s,min(9,div(inc(%1),2)))))]%rCost|[iter(lnum(0,%qs),[center(itext(0),7)],%b,|)]%r[repeat(-,4)]+[iter(lnum(0,%qs),repeat(-,7),%b,|)]%rBase|[iter(.5 [lnum(1,%qs)],[setq(dec(inum(0)),switch(lmath(mul,itext(0) %1 [v(%qa)]),*.*,inc(before(#$,.)),#$))][rjust(r(dec(inum(0))),7)],%b,|)]%rMatl|[iter(lnum(0,%qs),[rjust(switch(fdiv(r(itext(0)),2),*.*,inc(before(#$,.)),#$),7)],%b,|)]%r XP |[iter(lnum(0,%qs),[rjust(switch(fdiv(r(itext(0)),25),*.*,inc(before(#$,.)),#$),7)],%b,|)]%rDays|[iter(lnum(0,%qs),[rjust(ifelse(strmatch(%qa,*POTION*),1,switch(fdiv(r(itext(0)),1000),*.*,inc(before(#$,.)),#$)),7)],%b,|)]%r,Bad syntax: dd/cost <item>=<caster level>)]
&CMND.DD_CQ grid parent=$dd/cq:@pemit %#=[switch(v(name.%#),,You're not playing,[ansi(h,DD)]: Queue cleared.[set(me,queue.%#:)])]
&CMND.DD_DONE grid parent=$dd/done:@switch %#=[v(play.turn)],{@tr me/trig.next_0=%#;think [u(fun.dddone)]},{@pemit %#=DD[ansi(h,:)] It's not your turn.}
&CMND.DD_HP grid parent=$dd/hp:@pemit %#=[switch(v(name.%#),,You're not playing.,[ansi(h,DD)]: Your Hit Points: [v(hp.%#)]/[v(hpmax.%#)])]
&CMND.DD_HP_X grid parent=$dd/hp *:@switch/first [t(v(name.%#))]:[isint(%0)]=0:*,{@pemit %#=You're not playing.},1:0,{@pemit %#=[ansi(h,DD)]: HP value must be an integer.},1:1,{@emit [ansi(h,DD)]: [v(name.%#)]'s Hit Points [switch(%0,+*,increased by [ansi(gh,abs(%0))][set(me,hp.%#:[add(v(hp.%#),%0)])]: [ansi(n[u(h.getsymcolor,%#)],v(hp.%#))]/[v(hpmax.%#)],-*,decreased by [ansi(rh,abs(%0))][set(me,hp.%#:[add(v(hp.%#),%0)])]: [ansi(n[u(h.getsymcolor,%#)],v(hp.%#))]/[v(hpmax.%#)],set to[set(me,hpmax.%#:%0)][set(me,hp.%#:%0)]: [v(hp.%#)]/[v(hpmax.%#)])]}
&CMND.DD_IDLE grid parent=$dd/idle *:@pemit %#=[switch(v(name.%#),,You're not playing.,[ansi(h,DD)]: Idle message set to: %0.[set(me,idle.%#:%0)])]
&CMND.DD_INIT grid parent=$dd/init:@switch v(name.%#)=,{@pemit %#=You're not playing.},@emit [ansi(h,DD)]: INIT for \([ansi(v(color.%#),v(symbol.%#))]\) [v(name.%#)]: [setq(i,die(1,20))][set(me,init.%#:[add(%qi,v(initmod.%#))])][v(init.%#)] \(%qi[if(gte(v(initmod.%#),0),+)][v(initmod.%#)]\)
&CMND.DD_INIT_MOD grid parent=$dd/init *:@switch isint(%0)=0,{@pemit %#=INIT modifier must be an integer.},{@emit [ansi(h,DD)]: [v(name.%#)] INIT modifier set to: %0[set(me,initmod.%#:%0)]}
&CMND.DD_NAME grid parent=$dd/name *:@pemit %#=DD: Name set to '%0'[set(me,name.%#:%0)]
&CMND.DD_Q grid parent=$dd/q:@switch [t(v(name.%#))]:[v(play.turn)]=0:*,{@pemit %#=You're not playing.},1:%#,{@emit [ansi(h,DD)]: \([ansi(v(color.%#),v(symbol.%#))]\) [v(name.%#)]: Queued Action: [v(queue.%#)]},@pemit %#=[ansi(h,DD)]: Your queued action: [v(queue.%#)]
&CMND.DD_QUEUE grid parent=$dd/queue *:@pemit %#=[switch(v(name.%#),,You're not playing.,[ansi(h,DD)]: Queued message set to: %0.[set(me,queue.%#:%0)])]
&CMND.DD_Q_UEUE grid parent=$dd/q *:@pemit %#=[switch(v(name.%#),,You're not playing.,[ansi(h,DD)]: Queued message set to: %0.[set(me,queue.%#:%0)]
&CMND.DD_SYMBOL grid parent=$dd/symbol ?:@pemit %#=DD: Symbol set to '[set(me,symbol.%#:%0)][ansi(n[v(color.%#)],v(symbol.%#))]'
&CMND.DD_WHO grid parent=$dd/who:@pemit %#=%bSym [ljust(Character Name,20)] [ljust(Player Name,20)] [rjust(Idle,4)]%r [iter(3 20 20 4,repeat(=,itext(0)))]%r[null(u(h.calcinits))][setq(p,iter(lattr(me/name.#*),rest(itext(0),.)))][iter(%qg,if(isdbref(itext(0)),setq(l,%ql [itext(0)])[setq(p,remove(%qp,itext(0)))]),%b,)][iter(squish(%ql %qp [if(isdbref(v(play.turn)),,v(play.turn))]),[switch(itext(0),v(play.turn),>,%b)]\([ansi(n[v(color.[itext(0)])],ifelse(isdbref(itext(0)),v(symbol.[itext(0)]),*))]\) [ljust(v(name.[itext(0)]),20)] [ljust(name(itext(0)),20)] [rjust(switch(first(timestring(idle(ifelse(hastype(itext(0),player),itext(0),owner(itext(0)))))),#-1,--,#$),4)],%b,%r)]
&CMND.DD_X grid parent=$dd *:@break hasattrval(name.%#)=@pemit %#=You're not playing. ; @emit ([ansi(v(color.%#),v(symbol.%#))]) [v(name.%#)][switch(%0,:*,%b[after(%0,:)],;*,[after(%0,;)],%bsays\, "%0")]
&CMND.DD_X2 grid parent=$^dd/([\:'";].*)$:@switch v(name.%#)=,{@pemit %#=You're not playing.},@emit ([ansi(v(color.%#),v(symbol.%#))]) [v(name.%#)][switch(%1,:*,%b[after(%1,:)],;*,[after(%1,;)],%bsays\, "%1")]
@set grid parent/CMND.DD_X2=regexp
&CMND.DD_XP grid parent=$dd/xp *:@pemit %#=[ifelse(cand(isint(%0),gt(%0,0)),Begin Level %0: [lmath(add,iter(lnum(1,%0),mul(1000,dec(itext(0)))))] \[PHB p. 22\],Value must be a positive integer.)]
&CMND.DM_IDLE_X grid parent=$dm/idle *:@pemit %#=[ansi(h,DM)]: [switch(setr(p,pmatch(%0)),#-*,Use their M*U*S*H name or #dbref.,ifelse(t(setr(i,v(idle.%qp))),[v(name.%qp)]'s idle message: %qi,No idle message for [name(%qp)].))]
&CMND.DM_X grid parent=$dm *:@emit [ansi(h,ansi(r,DM)>)] [switch(%0,:*,The DM [after(%0,:)],;*,The DM[after(%0,;)],*=:*,[before(%0,=:)] [after(%0,=:)],*=;*,[before(%0,=;)][after(%0,=;)],*=*,[before(%0,=)] says\, "[after(%0,=)]",The DM says\, "%0")]
&DATA.COST.POTION grid parent=50
&DATA.COST.SCROLL grid parent=25
&DATA.COST.WAND grid parent=750
&DESC.OLD grid parent=%r%b%b%b[u(h.getcurboard)][iter(v(width),ucstr([itext(0)]),%b,%b)]%r[iter(v(height),rjust([itext(0)],2)%b[u(h.line,[itext(0)])],%b,%r)]%r
@set grid parent/DESC.OLD=no_command visual
&DESCRIBE grid parent=%b[rjust(ansi(h,dd/help) for help.,40)]%r[ljust(%bSym Name,18)]HP%b%b%b%b[u(h.getcurboard)][null(u(h.calcinits))][iter(v(width),ucstr([itext(0)]),%b,%b)]%r[iter(v(height),[u(h.menu,#@)]%b[rjust([itext(0)],2)]%b[u(h.liner,[itext(0)])]%b[ljust(itext(0),2)],%b,%r)]%r[space(24)][iter(v(width),ucstr(itext(0)))]%r[if(gt(words(%qg),words(v(height))),iter(lnum(add(words(v(height)),1),words(%qg)),u(h.menu,[itext(0)]),%b,%r)%r)]
@set grid parent/DESCRIBE=no_command visual public nearby
&DESCRIBE.OLD grid parent=%r%b[ljust(ansi(h,dd/help) for help.,20)]%b%b%b[u(h.getcurboard)][iter(v(width),ucstr([itext(0)]),%b,%b)]%r[iter(v(height),[u(h.menu,#@)]%b[rjust([itext(0)],2)]%b[u(h.line,[itext(0)])],%b,%r)]%r
&DMDESCRIBE grid parent=%b[rjust(ansi(h,dd/help) for help.,40)]%r[ljust(Loc Name,20)]%b%b%b%b[u(h.getcurboard)][iter(v(width),ucstr([itext(0)]),%b,%b)]%r[iter(v(height),[u(h.dmenu,#@)]%b[rjust([itext(0)],2)]%b[u(h.line,[itext(0)])],%b,%r)]%r[if(gt(words(%q5),words(v(height))),iter(lnum(add(words(v(height)),1),words(%q5)),u(h.dmenu,[itext(0)]),%b,%r)%r)]
&FUN.CLEAR grid parent=[wipe(me/loc.*)][wipe(me/count.*)][setq(1,edit(setdiff(lattr(me/hp.*),lattr(me/hp.#*)),HP.,,HPMAX.,))][iter(%q1,wipe(me/hp.##)[wipe(me/hpmax.##)])][wipe(me/init.*)][wipe(me/play.turn)][set(me,menu.contents:)][set(me,board:[iter(v(width),iter(v(height),%b,%b,`),%b,`)])]
&FUN.DDDONE grid parent=u(h.calcinits)[emit(DD: [v(name.[v(play.turn)])]'s turn took: [timestring(sub(secs(),%vt))])][set(me,vt:[secs()])][set(me,play.turn:[elements(%qe %qe,add(match(%qe,v(play.turn)),1))])][emit(DD: Turn goes to: [v(name.[v(play.turn)])])]
&FUN.DDGO grid parent=switch(0,u(h.inbounds,squish(%0)),pemit(%#,Out of bounds. Use dd/leave instead.),cand(hasattrval(me,name.%#),hasattrval(me,symbol.%#),hasattrval(me,color.%#)),pemit(%#,You need to set dd/name\, dd/symbol\, and dd/color first.),set(me,loc.pc.%#:[u(h.getnum,%0)]:[left(v(symbol.%#),1)][v(color.%#)])[emit([u(h.sn,%#)] moves to %0.)][u(h.add_menu,%#)][set(me,sym.%#:[v(symbol.%#)][v(color.%#)])])
&FUN.DDLEAVE grid parent=wipe(me/loc.pc.%#)[set(me,menu.contents:[setdiff(v(menu.contents) %#,%#)][pemit(%#,Thank you for playing.)]
&FUN.DMBACK grid parent=u(h.calcinits)[switch(0,u(isdm),u(h.error),set(me,play.turn:[elements(%qe %qe,sub(add(match(%qe,v(play.turn)),words(%qe)),1))])[emit(DD: Turn goes back to: [v(name.[v(play.turn)])])])]
&FUN.DMCLEAR grid parent=switch(0,u(isdm),u(h.error),iter(%0,u(h.clearone,u(h.getnames,itext(0)),itext(0)),%b,))
&FUN.DMCLEARINIT grid parent=switch(0,u(isdm),u(h.error),pemit(%#,Initiatives cleared.)[wipe(me/init.*)][wipe(me/play.turn)])
&FUN.DMDEFINE grid parent=switch(0,u(isdm),u(h.error),not(hasattrval(me,name.%0)),pemit(%#,Definition for %0 already exists.),[set(me,name.%0:%1)][set(me,sym.%0:%2)][pemit(%#,%0 defined as \([u(h.ansify,%2)]\) %1)])
&FUN.DMDELETE grid parent=switch(0,u(isdm),u(h.error),if(not(hasattr(me,board.%0)),pemit(%#,Board %0 does not exist.),[wipe(me/board*.%0)][pemit(%#,Board %0 deleted.)]))
&FUN.DMDESCRIBE grid parent=switch(0,u(isdm),u(h.error),u(h.setupdmenu)[pemit(%#,u(dmdescribe))]
&FUN.DMHP grid parent=switch(0,u(isdm),u(h.error),iter(%0,u(h.hpone,u(h.getnames,first(first(first(##,-),=),+)),first(first(first(##,-),=),+),after(##,+),after(##,-),after(##,=))
&FUN.DMINIT grid parent=switch(0,u(isdm),u(h.error),strlen(%0),iter(u(h.menued),if(hasattr(me,initmod.##),set(me,init.##:[add(v(initmod.##),die(1,20))])[emit([ansi(h,DD)]: INIT for \([u(h.ansify,v(sym.##))]\) [v(name.##)]: [v(init.##)] \([sub(v(init.##),v(initmod.##))][if(gte(v(initmod.##),0),+)][v(initmod.##)]\))])),iter(%0,u(h.dminitone,before(##,=),after(##,=))))
&FUN.DMKILL grid parent=switch(0,u(isdm),u(h.error),iter(%0,u(h.killone,u(h.getnames,itext(0)),itext(0)),%b,))
&FUN.DMLISTDEFS grid parent=switch(0,u(isdm),u(h.error),[setq(0,setunion(,switch(strlen(%0),0,u(h.plattr,sym.*),iter(%0,u(h.plattr,sym.[itext(0)])))))][switch(strlen(%q0),0,pemit(%#,No symbols found.),pemit(%#,table(iter(%q0,lcstr(last(itext(0),.))),17,68)))])
&FUN.DMLISTMAPS grid parent=switch(0,u(isdm),u(h.error),words(u(h.plattr,board.*)),pemit(%#,No boards are saved.),strlen(%0),pemit(%#,Available boards:%r[table(squish(iter(u(h.plattr,board.*),%b%b[capstr(lcstr(after([itext(0)],.)))],%b,%b)),15,75,%b,%b)]),words(u(h.plattr(board.%0*)),pemit(%#,No such board name.),pemit(%#,Boards matching %0:%r[table(squish(iter(u(h.plattr,board.%0*),%b%b[capstr(lcstr(after([itext(0)],.)))],%b,%b)),15,75,%b,%b)]))
&FUN.DMLISTSYMS grid parent=switch(0,u(isdm),u(h.error),words(lattr(me/sym.*)),pemit(%#,No symbols are stored.),strlen(%0),pemit(%#,Stored symbols:%r[table(squish(iter(lattr(me/sym.*),%b%b[capstr(lcstr(after([itext(0)],.)))],%b,%b)),15,75)]),words(lattr(me/sym.%0*)),pemit(%#,No such symbol name.),pemit(%#,Symbols matching %0:%r[table(squish(iter(lattr(me/sym.%0*),%b%b[capstr(lcstr(after([itext(0)],.)))],%b,%b)),15,75)]))
&FUN.DMLOAD grid parent=switch(0,u(isdm),u(h.error),if(not(hasattrp(me,board.%0)),pemit(%#,Board %0 does not exist.),[u(fun.clear)][u(h.resize,after(before(v(board.%0),|),:),before(v(board.%0),:))][set(me,board:[after(v(board.%0),|)])][if(hasattr(me,boardcounts.%0),iter(v(boardcounts.%0),set(me,[before(itext(0),:)]:[after(itext(0),:)])))][if(hasattr(me,boardlocs.%0),set(me,menu.contents:[before(v(boardlocs.%0),|)])[iter(after(v(boardlocs.%0),|),set(me,[before(##,:)]:[after(##,:)]),%b,)])][pemit(%#,Board %0 loaded.)]))
&FUN.DMLOC grid parent=switch(0,u(isdm),u(h.error),strlen(%0),[u(h.setupdmenu)][pemit(%#,u(dmdescribe))],[setq(5,u(h.getnames,%0))][pemit(%#,u(dmdescribe))]
&FUN.DMMOVE grid parent=switch(0,u(isdm),u(h.error),iter(%0,u(h.moveone,squish(u(h.getnames,before(itext(0),-))),after(itext(0),-),before(itext(0),-))))
&FUN.DMNEXT grid parent=u(h.calcinits)[emit(DD: [v(name.[v(play.turn)])]'s turn took: [timestring(sub(secs(),%vt))])][set(me,vt:[secs()])][switch(0,u(isdm),u(h.error),set(me,play.turn:[elements(%qe %qe,add(match(%qe,v(play.turn)),1))])[emit(DD: Turn goes to: [v(name.[v(play.turn)])])])]
&FUN.DMPUT grid parent=switch(0,u(isdm),u(h.error),hasattrval(me,%2.%0),pemit(%#,No such symbol.),u(h.add_menu,%0)[iter(%1,u(h.putone,%0,itext(0),%2),%b,)])
&FUN.DMSAVE grid parent=switch(0,u(isdm),u(h.error),if(hasattr(me,board.%0),pemit(%#,Board of that name already exists. use dm/delete %0),set(me,board.%0:[words(v(width))]:[words(v(height))]|[v(board)])[set(me,boardcounts.%0:[iter(lattr(me/count.*),##:[squish(v(##))])])][set(me,boardlocs.%0:[v(menu.contents)]|[iter(lattr(me/loc.*),[itext(0)]:[v(itext(0))],%b,%b)])][pemit(%#,Current Board saved as %0.)]))
&FUN.DMSET grid parent=switch(0,u(isdm),u(h.error),iter(%1,u(h.dmsetone,u(h.getnames,itext(0)),after(grab(dead:pdead alive:sym object:obj,%0*:*),:),itext(0))))
&FUN.DMSPOT grid parent=switch(0,u(isdm),u(h.error),iter(%1,u(h.dmspot,%0,[itext(0)]),%b,)[pemit(%#,Placed)])
&FUN.DMUNDEFINE grid parent=switch(0,u(isdm),u(h.error),iter(%0,u(h.dmundefineone,itext(0))))
&FUN.DMVIEWDEFS grid parent=switch(0,u(isdm),u(h.error),[setq(0,setunion(,switch(strlen(%0),0,u(h.plattr,sym.*),iter(%0,u(h.plattr,sym.[itext(0)])))))][switch(strlen(%q0),0,pemit(%#,No symbols found.),pemit(%#,iter(%q0,rjust(lcstr(last(itext(0),.)),15) \([u(h.ansify,v(itext(0)))]\) [v(edit(itext(0),SYM,NAME))],%b,%r)))])
&FUN.FILL grid parent=switch(0,u(isdm),u(h.error),cand(match(v(width),%0),match(v(width),%1)),pemit(%#,Width out of bounds.),cand(match(v(height),%2),match(v(height),%3)),pemit(%#,Height out of bounds.),iter(elements(v(width),lnum(match(v(width),%0),match(v(width),%1))),iter(elements(v(height),lnum(match(v(height),%2),match(v(height),%3))),u(h.set_spot,itext(0),itext(1),%4),%b,),%b,)[pemit(%#,Area Filled)]
&FUN.NOTE grid parent=switch(0,not(eq(strlen(%1),1)),if(hasattr(me,note.[edit(%0,%b,_,*,)]),wipe(me/note.[edit(%0,%b,_,*,)])[pemit(%#,cleared.)],pemit(%#,No such note)),eq(strlen(%1),0),set(me,note.[edit(%0,%b,_,*,)]:[after(%1,=)])[pemit(%#,Note set)],not(gte(words(setr(0,lattr(me/note.[edit(%0,%b,_)]))),2)),pemit(%#,Notes: [lcstr(edit(%q0,NOTE.,))]),words(setr(0,first(lattr(me/note.[edit(%0,%b,_)])))),pemit(%#,No such note.),u(h.onenote,%q0))
&FUN.RESIZE grid parent=switch(0,u(isdm),u(h.error),[u(h.resize,%0,%1)][pemit(%#,Board resized)])
&H.ADD_MENU grid parent=set(me,menu.contents:[setunion(v(menu.contents),%0)])
&H.ALPHA grid parent=if(isword(%0),%0)
&H.ANSIFY grid parent=ansi([mid(%0,1,8)],left(%0,1))
&H.ANSIFY2 grid parent=%1[u(h.getsymcolor,%0)]
&H.ANSIFY2.OLD grid parent=ansi(switch(strlen(u(h.getsymcolor,%0)),0,mid(%1,1,5),u(h.getsymcolor,%0)),left(%1,1))
&H.CALCINITS grid parent=iter(v(menu.contents),if(hasattr(me,init.##),setq(e,setunion(%qe,##)),setq(f,setunion(%qf,##))))[setq(g,squish([setr(e,munge(h.sortreverse,iter(%qe,[v(init.##)]),%qe))] [if(mul(strlen(%qe),strlen(%qf)),-)] %qf))]
&H.CLEARONE grid parent=switch(0,strlen(%0),pemit(%#,No such object: %1),pemit(%#,Removing [capstr(lcstr(last(%0,.)))] at [u(h.getloc,before(v(%0),:))].)[wipe(me/%0)]
&H.DMENU grid parent=ljust(if(lte(%0,words(%q5)),[setq(3,elements(%q5,%0))][ljust(u(h.getloc,before(v(%q3),:)),4)][u(h.menuhp,last(%q3,.))]),20)
&H.DMINITONE grid parent=switch(0,hasattr(me,sym.%0),pemit(%#,No such symbol),match(u(h.menued),%0),pemit(%#,%0 not on board),set(me,initmod.%0:%1)[pemit(%#,Modifier for %0 set to %1)])
&H.DMSETONE grid parent=switch(0,strlen(%0),pemit(%#,Unable to locate %2),[pemit(%#,[lcstr(last(%0,.))] is now [switch(%1,pdead,dead,sym,alive,obj,inanimate.)].)][setq(0,v(%0))][wipe(me/%0)][set(me,loc.%1.[last(%0,.)]:%q0)]
&H.DMSPOT grid parent=switch(0,u(h.inbounds,%1),pemit(%#,%1 out of bounds.),set(me,board:[replace(v(board),u(h.getnum,%1),%0,`)])
&H.DMUNDEFINEONE grid parent=switch(0,hasattrval(me,sym.%0),pemit(%#,No definition for %0.),[pemit(%#,Undefining: \([u(h.ansify,v(sym.%0))]\) [v(name.%0)].)][wipe(me/name.%0)][wipe(me/sym.%0)]
&H.ERROR grid parent=pemit(%#,Permission denied\, foolish mortal. Pelor is Angry!)
&H.GETBYLOC grid parent=regrep(me,loc.*,^[u(h.getnum,%0)]:)
&H.GETBYNAME grid parent=lattr(me/loc.*.%0)
&H.GETBYNUM grid parent=regrep(me,loc.*,^%0:)
&H.GETCHAR grid parent=u(h.ansify,elements(%q0,u(h.getnum,%0),`))
&H.GETCHAR.OLD grid parent=u(h.ansify,elements(%q0,u(h.getnum,%0),`))
&H.GETCURBOARD grid parent=[setq(0,v(board))][iter(u(plocs) [lattr(me/loc.pc.*)],setq(0,replace(%q0,before(v([itext(0)]),:),[u(h.ansify2,last(##,.),after(v([itext(0)]),:))],`)),%b,)]
&H.GETCURBOARD.OLD grid parent=[setq(0,v(board))][iter(u(plocs) [lattr(me/loc.pc.*)],setq(0,replace(%q0,before(v([itext(0)]),:),[u(h.ansify,after(v([itext(0)]),:))],`)),%b,)]
&H.GETLOC grid parent=setq(a,elements(v(width),mod(%0,words(v(width)))))[setq(b,elements(v(height),add(1,div(%0,words(v(width))))))]%qa%qb
&H.GETNAMES grid parent=setunion(iter(%0,switch(u(h.isloc,itext(0)),1,u(h.getonebyloc,itext(0)),u(h.getonebyname,itext(0)))),)
&H.GETNUM grid parent=add(mul(words(v(width)),sub(match(v(height),mid(%0,1,5)),1)),match(v(width),left(%0,1)))
&H.GETNUM2 grid parent=add(mul(words(v(width)),sub(match(v(height),%0),1)),match(v(width),%1))
&H.GETONEBYLOC grid parent=last(u(h.getbyloc,%0))
&H.GETONEBYNAME grid parent=first(u(h.getbyname,%0))
&H.GETONEBYNUM grid parent=last(u(h.getbynum,%0))
&H.GETSYMCOLOR grid parent=switch(0,hasattr(me,hpmax.%0),,switch(mul(100,fdiv(v(hp.%0),v(hpmax.%0))),<1,r,<26,rh,<51,yh))
&H.HPONE grid parent=switch(0,strlen(%0),pemit(%#,Unable to find a match: %1),eq(strlen(%4),0),set(me,hp.[last(%0,.)]:%4)[set(me,hpmax.[last(%0,.)]:%4)][pemit(%#,HP for [lcstr(last(%0,.))] at %4/%4)],hasattr(me,hp.[last(%0,.)]),pemit(%#,[lcstr(last(%0,.))] has no set HP to add/detract from.),gt(v(hp.[last(%0,.)]),0),pemit(%#,[lcstr(last(%0,.))] is already dead!)],eq(strlen(%3),0),set(me,hp.[last(%0,.)]:[sub(v(hp.[last(%0,.)]),%3)])[if(lte(0[v(hp.[last(%0,.)])],0),u(h.killone,%0),pemit(%#,HP for [lcstr(last(%0,.))] at [v(hp.[last(%0,.)])]/[v(hpmax.[last(%0,.)])]))],eq(strlen(%2),0),set(me,hp.[last(%0,.)]:[add(%2,[v(hp.[last(%0,.)])])])[pemit(%#,HP for [lcstr(last(%0,.))] at [v(hp.[last(%0,.)])]/[v(hpmax.[last(%0,.)])])]
&H.INBOUNDS grid parent=mul(match(v(width),left(%0,1)),match(v(height),mid(%0,1,5)))
&H.ISLOC grid parent=eq(strlen(foreach(h.alpha,%0)),1)
&H.KILLONE grid parent=switch(0,strlen(%0),pemit(%#,Can't find %1),emit([capstr(lcstr(last(%0,.)))] has died.)[setq(0,v(%0))][wipe(me/%0)][set(me,[edit(%0,SYM,PDEAD)]:[before(%q0,:)]:[left(after(%q0,:),1)]r)])
&H.LINE grid parent=iter(v(width),u(h.getchar,[itext(0)]%0),%b,%b)
&H.LINE.OLD grid parent=iter(v(width),u(h.getchar,[itext(0)]%0),%b,%b)
&H.LINER grid parent=iter(extract(%q0,u(h.getnum,[first(v(width))]%0),[words(v(width))],`),u(h.ansify,itext(0)),`,%b)
&H.MENU grid parent=ljust(if(lte(%0,words(%qg)),[setq(3,extract(%qg,%0,1))][switch(%q3,-,,[if(not(comp(%q3,v(play.turn))),>,%b)]\([u(h.ansify,v(sym.%q3))]\) [ifelse(isdbref(%q3),u(ufun.menu_player,%q3),v(name.%q3))])]),20)
&H.MENUED grid parent=setdiff(v(menu.contents),graball(v(menu.contents),#*))
&H.MENUHP grid parent=[setq(j,sub(15,add(2,strlen([v(hpmax.%0)][v(hp.%0)]))))][ljust(left(lcstr(%0),%qj),%qj)] [if(hasattr(me,hp.%0),[v(hp.%0)]/[v(hpmax.%0)])]
&H.MOVEONE grid parent=switch(0,strlen(%0),pemit(%#,Not found: %2),u(h.inbounds,%1),pemit(%#,%1 is out of bounds.),emit([capstr(lcstr(last(%0,.)))] moved to %1)[set(me,%0:[u(h.getnum,%1)]:[after(v(%0),:)])]
&H.ONEDDPAGE grid parent=if(not(hasattr(me,name.%0)),pemit(%#,name(%0) is not a player),switch(left(%1,1),;,pemit(%#,Long distance to \([ansi(v(color.%0),v(symbol.%0))]\) [v(name.%0)]: \([ansi(v(color.%#),v(symbol.%#))]\) [v(name.%#)][mid(%1,1,8000)])[pemit(%0,From afar\, \([ansi(v(color.%#),v(symbol.%#))]\)[mid(%1,1,8000)])],:,pemit(%#,Long distance to \([ansi(v(color.%0),v(symbol.%0))]\) [v(name.%0)]: \([ansi(v(color.%#),v(symbol.%#))]\) [v(name.%#)] [mid(%1,1,8000)])[pemit(%0,From afar\, \([ansi(v(color.%#),v(symbol.%#))]\) [mid(%1,1,8000)])],pemit(%#,You page \([ansi(v(color.%0),v(symbol.%0))]\) [v(name.%0)] with\, "%1")[pemit(%0,\([ansi(v(color.%#),v(symbol.%#))]\) [v(name.%0)] pages\, "%1")])
&H.ONENOTE grid parent=pemit(%#,[space(6)][ansi(bh,repeat(_,24))]%r[ansi(bh,repeat(_,5)/)]%b[ansi(ch,ljust(capstr(lcstr(left(edit(after(%0,.),_,%b),20))),23))][ansi(bh,\\[repeat(_,15)])]%r%r[wrap(edit(v(%0),<br>,%r,<BR>,%r,<P>,%r%t,<p>,%r%t,<T>,%t,<t>,%t,< >,%b,<b>,%b,<B>,%b),72)]%r%r[ansi(bh,repeat(_,46))]
&H.PLATTR grid parent=setunion(iter(lparent(me),lattr([itext(0)]/%0)),)
&H.PLOCS grid parent=lattr(me/loc.#*)[lattr(me/loc.obj.*)][lattr(me/loc.dead.*)][lattr(me/loc.sym.*)]
&H.PUTONE grid parent=switch(0,u(h.inbounds,%1),pemit(%#,%1 - out of bounds.),strlen(%2),pemit(%#,Error: no object type defined.),[set(me,count.%0:[add(1,0[v(count.%0)])])][set(me,loc.%2.%0[v(count.%0)]:[u(h.getnum,%1)]:[v(sym.%0)])][pemit(%#,\([u(h.ansify,v(sym.%0))]\) %0[v(count.%0)] placed at %1.)]
&H.RESIZE grid parent=[set(me,width:[edit(left(abcdefghijklmnopqrstuvwxyz,%1),,%b)])][set(me,height:[lnum(1,%0)])][u(fun.clear)]
&H.S grid parent=\([ansi(v(color.%0),v(symbol.%0))]\)
&H.SETUPDMENU grid parent=setq(5,setdiff(lattr(me/loc.*),lattr(me/loc.#*)))[setq(5,munge(h.sorter,iter(%q5,before(v([itext(0)]),:),%b,%b),%q5))]
&H.SET_SPOT grid parent=set(me,board:[replace(v(board),u(h.getnum2,%0,%1),%2,`)])
&H.SN grid parent=\([ansi(v(color.%0),v(symbol.%0))]\) [v(name.%0)]
&H.SORTER grid parent=sort(%0)
&H.SORTREVERSE grid parent=revwords(sort(%0))
&HEADFOOT grid parent=[ansi(h,repeat(~,75))]
&HELP.DD grid parent=This is a Dungeons & Dragons virtual TableTop aid.%r%rHelp is available on the following topics%r%rTOPIC - summary information%r%r[iter(PC - maintaining your PC \(name\, symbol\, color\, idle\, HP\)|PLAY - commands for play \(board\, movement\, initiative\)|COMM - communciation \(IC say/pose\, preplanned actions\),[ljust(before(itext(0),-),6)]-[rest(itext(0),-)],|,%r)]%r%rType: dd/help <topic>
&HELP.DD.COMM grid parent=Commands for IC communication and pre-planning actions.%r%rdd <message> %b(PUBLIC IC EMIT -- supports pose and semipose)%rddp <message> (PARTY ONLY EMIT -- supports pose and semipose)%r%rIn addition to your dd/idle message, you can store pre-planned actions on a per turn basis with...%r%rdd/q <free text message> -- actions to do when it's your turn.%r%r* If you have something queued when it becomes your turn, everyone will be notified that you have actions queued.%r* If you are idle at this time, and you remain idle for 1 minute thereafter, your queued message will automatically be shown to all (players and DM).%r* When the turn moves from your turn to the next player/monster, your queued message will be erased from memory.%r%rdd/q -- emit's your queued message immediately if it's your turn (otherwise pemits it to you only).%r%rdd/cq -- clears (erases) your queued message.
&HELP.DD.PC grid parent=Commands for setting up and maintaining your PC.%r%rdd/name <name> - give your PC a name.%r%rdd/symbol <symbol> - give your PC a one-character symbol%r%rdd/color <ansicodes> - give your PC's symbol some color%r%rdd/idle <message> - set a message for the DM in case you're idle%r%rdd/hp \[\[+|-\]<val>\] - view, set, increase, or decrease your HP%r%r%tdd/hp 10 (sets your PCs current/max HP to 10/10)%r%tdd/hp -2 (2 points damage)%r%tdd/hp +1 (1 point healing)%r%tdd/hp %b %b(view your current/max HP)%r
&HELP.DD.PLAY grid parent=Commands for board viewing, PC movement, and other 'play' commands.%r%rdd - same as 'look board'%r%rdd/go <x><y> - move your character to coordinates "<x>,<y>"%r%rdd/leave - leave the board%r%rThe menu on the left of the board sorts players and monsters according to current initiative order. When appropriate (i.e., when directed to do so by the DM), you can roll your initiative with...%r%rdd/init - rolls and stores your initiative
&HELP.DM grid parent=Dungeon Master help.%r%rHelp is available on the following topics%r%rTOPIC - summary information%r%rMAP%b%b%b%b%b- Creating and Saving maps%rSYMBOLS%b- Creating and placing symbols.%rCOMBAT%b%b- Additional commands for combat%rCOMM%b%b%b%b- communication (IC say/pose, DM information)%r%rExample1, Example2, Example3 show how to build and run an adventure.%r%rType: dm/help <topic>
&HELP.DM.COMBAT grid parent=Extra commands for combats.%r%r%tPlaced symbols (dm/help symbols) can be monsters or NPCs placed onto the grid for combat. Like PCs (dd/help), they have hit points and initiatives. An entire class of symbols are given the same initiative, and each placed symbol can have it's own hit points.%r%rdm/init <shortname>=<modifier> <sn2>=<-mod2> - Set the modifiers for a%r%tclass of symbols. They have to have a modifiers (can be 0) in%r%torder to be included in dm/init dicing.%rdm/init - without arguments, rolls initiatives for all symbols on the map%r%tthat have initiatives set.%rdm/clearinit - clear initiatives for all PCs and symbols, and all symbol%rmodifiers.%rdm/hp <loc1>=<hp> <name2>+<heal> <name3>-<damage> - Assign or modify hp%r%tfor individual symbols.%r%rTurn commands:%rdm/next - start the combat or give the turn to the next person, by order%r%t of initiative.%rdm/back - go back a person, in case of accidental dm/next.%r
&HELP.DM.COMMUNICATION grid parent=Commands for IC communciation and DM information.%r%rdm <message> - DM emit, supports pose and semipose%rdm <who>=<message> - NPC emit, supports pose and semipose.%r%r%tExamples:%r%rdm The Bartender=:asks Descartes, "How about a beer?"%rdm Descartes=I think not%rdm/clear descartes1%r
&HELP.DM.EXAMPLE grid parent=Dungeon Master Reference:%r%r%b%bThis example will make the "example" grid (a dock with two areas of water)%r%r%b%b[ansi(h,dm/resize 25x10)] - make a grid 25 long and 10 high.%r%b%b[ansi(h,dm/fill |=d1 d5)] - place an edge of | from d1 to d5.%r%b%b[ansi(h,dm/fill |=l1 l5)], [ansi(h,dm/fill |=p1 p5)] - do the same at l and p.%r%b%b[ansi(h,dm/fill -=e5 k5)] - same as above, but a line of - from e5 to k5.%r%b%b[ansi(h,dm/fill -=q5 y5)] [ansi(h,dm/fill -=a9 y9)] - same.%r%b%b[ansi(h,dm/fill ~bh=e1 k4)] - make a square of ~ (colored blue+hilite) from e1 to k4.%r%b%b[ansi(h,dm/fill ~bh=q1 y4)] - same as above for the 2nd spot of water.%r%b%b[ansi(h,dm/spot #=n3 m7 o7 c7 g7 t7)] - place boxes (#) at those locations.%r%rNow we have the map. [ansi(h,dm/save seas)] to save it as mapname 'seas' then [ansi(h,dm/load seas)] to bring it up in the future.
&HELP.DM.MAPS grid parent=Map "Background" commands:%r%r%tMaps supply a background and visual reference for players. The recommended unit, 5'/square, is not a word of law and the DM's judgement always prevails.%r%tLocations on the grid are accessed by <abc><123>.%r%tA symbol combination is 1 character followed by ansi codes. For example, to make a cyan hilite C \([ansi(ch,C)]\), you would use Cch (C, cyan hilite).%r%rdm/resize <width>x<height> - wipe the map grid clean and resize it.%rdm/fill <sym>=<corner> <corner> - fill a square of the grid with <sym>%rdm/spot <sym>=<loc> <loc> <loc> - place symbol at multiple <locations>%r%rdm/save <mapname> - save the map as <mapname> symbols (dm/help symbols)%r%t%tare saved too.%rdm/load <mapname> - load previously saved <mapname>%rdm/listmaps <mapname> - list maps beginning with <mapname>%rdm/delete <mapname> - delete a map.
&HELP.DM.SYMBOLS grid parent=Symbols on maps%r%r%tSymbols have several differences from maps. They are placed on top of the map and their symbols and names appear on the menu to the left of the map. They can be moved, removed, and have several attributes that may be changed on the fly, including color.%r%tThe shortname of a symbol is used to refer to it and to apply names (appended with numbers) to placed symbols.%r%tAs with maps, a symbols representation is defined with 1 character followed by it's ansi codes.%r%tA placed symbol can be referenced with either it's name (goblin1, goblin2, etc), or it's location (c4, e8, etc).%r%rdm/define <shortname>=<Full Name>,<symbol> - define <shortname> as a symbol.%rdm/listdefs <name> - list symbol definitions. the name is glob-matched.%rdm/undefine <shortname> - remove symbol definition.%rdm/loc <loc1> <name1> - Locate a symbol or get symbol at location.%r%r(Continued in dm/help symbols2)%r
&HELP.DM.SYMBOLS2 grid parent=Symbols (continued.)%r%rdm/put <shortname>=<loc1> <loc2> - place symbols of <shortname> at multiple%r%tlocations.%rdm/set <priority>=<loc1> <name2> - Change priorities (object, alive, dead)%rdm/kill <loc1> <name2> - Kill a symbol, turning it's color to red (Dead).%rdm/clear <loc1> <name2> - clear a symbol from the board.%rdm/move <loc1>-<newloc> <name2>-<newloc> - move symbols.%r
&ISDM grid parent=not(comp(%#,owner(me)))
&LOCK.ISDM grid parent=not(comp(%#,owner(me)))
&PLOCS grid parent=setq(z,switch(strlen(%0),0,*,%0))[squish([lattr(me/loc.obj.%qz)] [lattr(me/loc.pdead.%qz)] [lattr(me/loc.sym.%qz)])]
&TRIG.NEXT_0 grid parent=@drain me;@switch [if(isdbref(%0),set(me,queue.%0:))][isdbref(setr(p,v(play.turn)))]:[t(v(queue.%qp))]=0:*,,1:0,,@wait [pemit(%qp,ansi(h,DD): Your queued action will auto emit in 60 seconds if you remain idle.%r %b: To emit it immediately, do 'dd/q'.%r% %b: To override it, do 'dd/cq'. \(and do something else manually\))]me/60=@tr me/trig.next_1=%qp
&TRIG.NEXT_1 grid parent=@switch [idle(%0)]=>60,{@emit [ansi(h,DD)]: \([ansi(v(color.%0),v(symbol.%0))]\) [v(name.%0)]: Queued Action: [v(queue.%0)]},
&TYPE grid parent=parent game
&UFUN.ISCOLOR grid parent=[not(strmatch(hixrgybmcwXRGYBMCW,*%0*))]
&UFUN.MENU_PLAYER grid parent=[setq(j,sub(15,add(2,strlen([v(hpmax.%0)][v(hp.%0)]))))][ljust(left(v(name.%0),%qj),%qj)] [ansi(n[u(h.getsymcolor,%0)],v(hp.%0))]/[v(hpmax.%0)]
think See 'dd/help' and 'dm/help'.
@link grid parent = #0
@lset grid parent/Basic=no_inherit
@set grid parent = LINK_OK
@set grid parent = VISUAL
@set grid parent = SAFE
@set grid parent = !NO_COMMAND
&AUTHOR grid parent=Walker and Trispis@M*U*S*H with help of the D&D gang.
@set grid parent=BOARD.EXAMPLE:25:10| ` ` `|`~bh`~bh`~bh`~bh`~bh`~bh`~bh`|` ` ` `|`~bh`~bh`~bh`~bh`~bh`~bh`~bh`~bh`~bh` ` ` `|`~bh`~bh`~bh`~bh`~bh`~bh`~bh`|` ` ` `|`~bh`~bh`~bh`~bh`~bh`~bh`~bh`~bh`~bh` ` ` `|`~bh`~bh`~bh`~bh`~bh`~bh`~bh`|` ` ` `|`~bh`~bh`~bh`~bh`~bh`~bh`~bh`~bh`~bh` ` ` `|`~bh`~bh`~bh`~bh`~bh`~bh`~bh`|` ` ` `|`~bh`~bh`~bh`~bh`~bh`~bh`~bh`~bh`~bh` ` ` `|`-`-`-`-`-`-`-`|` ` ` `|`-`-`-`-`-`-`-`-`-` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` `-`-`-`-`-`-`-`-`-`-`-`-`-`-`-`-`-`-`-`-`-`-`-`-`-` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` `%b
&CMD.DDCOLOR grid parent=$^dd/color ([hHuUiInxXrRgGyYbBmMcCwW]+)$:@pemit %#=Color set to [set(me,color.%#:%1u)]'[ansi(v(color.%#),v(color.%#))]'
@set grid parent/CMD.DDCOLOR=regexp
&CMD.DDEMIT grid parent=$dd/emit *:@switch v(name.%#)=,@pemit %#={You're not playing.},@emit [u(h.s,%#)] %0
&CMD.DDGO grid parent=$^dd/go ([a-zA-Z][0-9]+)$:think u(fun.ddgo,lcstr(%1))
@set grid parent/CMD.DDGO=regexp
&CMD.DDHELP grid parent=$^dd/help(| (.)*)$:@pemit %#=[u(headfoot)]%r[switch(0,strlen(squish(%1)),u(help.dd),words(u(h.plattr,help.dd.[squish(%1)]*)),No such help command,u(first(u(h.plattr,help.dd.[squish(%1)]*))))]%r[u(headfoot)]
@set grid parent/CMD.DDHELP=regexp
&CMD.DDLEAVE grid parent=$dd/leave:think u(fun.ddleave)
&CMD.DM grid parent=$dm:@pemit %#=u(describe)
&CMD.DMAT grid parent=$^dm/at(|(( [a-zA-Z0-9]+)+))$:think u(fun.dmloc,squish(lcstr(%1)))
@set grid parent/CMD.DMAT=regexp
&CMD.DMBACK grid parent=$dm/back:think u(fun.dmback)
&CMD.DMCLEAR grid parent=$^dm/clear (([a-zA-Z0-9#]+)(| ([a-zA-Z0-9]+))+)$:think u(fun.dmclear,lcstr(%1))
@set grid parent/CMD.DMCLEAR=regexp
&CMD.DMCLEARINIT grid parent=$^dm/clearinit$:think u(fun.dmclearinit)
@set grid parent/CMD.DMCLEARINIT=regexp
&CMD.DMDEFINE grid parent=$^dm/(def|defi|defin|define) ([a-zA-Z0-9]+)=([a-zA-Z0-9 ]+),(.[hHuUiInxXrRgGyYbBmMcCwW]+):think u(fun.dmdefine,%2,%3,%4)
@set grid parent/CMD.DMDEFINE=regexp
&CMD.DMDELETE grid parent=$^dm/delete ([a-zA-Z0-9]+)$:think u(fun.dmdelete,%1)
@set grid parent/CMD.DMDELETE=regexp
&CMD.DMEMIT grid parent=$dm/emit *:@switch u(isdm)=0,think u(h.error),@emit [ansi(rh,DM)][ansi(wh,>)] %0
&CMD.DMFILL grid parent=$^dm/fill (.|.[hHuUiInxXrRgGyYbBmMcCwW]+)=([a-zA-z])([0-9]+)[- x*]([a-zA-Z])([0-9]+)$:think u(fun.fill,lcstr(%2),lcstr(%4),%3,%5,%1)
@set grid parent/CMD.DMFILL=regexp
&CMD.DMFILLONE grid parent=$^dm/fill (.|.[hHuUiInxXrRgGyYbBmMcCwW]+)=(([a-zA-z])([0-9]+))$:think u(fun.dmspot,%1,lcstr(%2))
@set grid parent/CMD.DMFILLONE=regexp
&CMD.DMHELP grid parent=$^dm/help(| (.)*)$:@pemit %#=[u(headfoot)]%r[switch(0,strlen(squish(%1)),u(help.dm),words(u(h.plattr,help.dm.[squish(%1)]*)),No such help command,u(first(u(h.plattr,help.dm.[squish(%1)]*))))]%r[u(headfoot)]
@set grid parent/CMD.DMHELP=regexp
&CMD.DMHP grid parent=$^dm/hp(( ([#a-zA-Z0-9]+[\+=-][0-9]+))+)$:think u(fun.dmhp,lcstr(%1))
@set grid parent/CMD.DMHP=regexp
&CMD.DMINIT grid parent=$^dm/init((| [a-zA-Z0-9]+=(-|)[0-9]+)+)$:think u(fun.dminit,squish(lcstr(%1)))
@set grid parent/CMD.DMINIT=regexp
&CMD.DMKILL grid parent=$^dm/kill (([a-zA-Z0-9#]+)(| ([a-zA-Z0-9]+))+)$:think u(fun.dmkill,lcstr(%1))
@set grid parent/CMD.DMKILL=regexp
&CMD.DMLISTDEFS grid parent=$^dm/(ldef|ldefs|listd|listde|listdef|listdefs)((| [a-zA-Z0-9*]+)+)$: think u(fun.dmlistdefs,squish(%2))
@set grid parent/CMD.DMLISTDEFS=regexp
&CMD.DMLISTMAPS grid parent=$^dm/listmaps(| [a-zA-Z0-9]+)$:think u(fun.dmlistmaps,squish(%1))
@set grid parent/CMD.DMLISTMAPS=regexp
&CMD.DMLISTSYMS grid parent=$^dm/listsyms(| [a-zA-Z0-9]+)$:think u(fun.dmlistsyms,squish(%1))
@set grid parent/CMD.DMLISTSYMS=regexp
&CMD.DMLOAD grid parent=$^dm/load ([a-zA-Z0-9]+)$:think u(fun.dmload,%1)
@set grid parent/CMD.DMLOAD=regexp
&CMD.DMLOC grid parent=$^dm/loc(|(( [a-zA-Z0-9]+)+))$:think u(fun.dmloc,squish(lcstr(%1)))
@set grid parent/CMD.DMLOC=regexp
&CMD.DMMOVE grid parent=$^dm/move((( )([a-zA-Z0-9#]+[=-][a-zA-Z][0-9]+))+)$:think u(fun.dmmove,edit(lcstr(%1),=,-))
@set grid parent/CMD.DMMOVE=regexp
&CMD.DMNEXT grid parent=$dm/next:@tr me/trig.next_0=[v(play.turn)];think [u(fun.dmnext)]
&CMD.DMPUT grid parent=$^dm/put ([a-zA-Z0-9]+)=(([a-zA-Z][0-9]+)(| ([a-zA-Z][0-9]+))+)$:think u(fun.dmput,lcstr(%1),lcstr(%2),sym)
@set grid parent/CMD.DMPUT=regexp
&CMD.DMREMOVE grid parent=$dm/remove *:think set(me,menu.contents:[setdiff(v(menu.contents),%0)])[pemit(%#,%0 removed)]
&CMD.DMRESIZE grid parent=$^dm/resize ([1-9]|1[0-9]|2[0-5])[- x]([1-9]|1[0-9]|2[0-5])$:think u(fun.resize,%2,%1)
@set grid parent/CMD.DMRESIZE=regexp
&CMD.DMSAVE grid parent=$^dm/save ([a-zA-Z0-9]+)$:think u(fun.dmsave,%1)
@set grid parent/CMD.DMSAVE=regexp
&CMD.DMSET grid parent=$^dm/set (d|de|dea|dead|a|al|ali|aliv|alive|o|ob|obj|obje|objec|object)=(([a-zA-Z0-9]+)(| [a-zA-Z0-9]+)+)$:think u(fun.dmset,%1,%2)
@set grid parent/CMD.DMSET=regexp
&CMD.DMSPOT grid parent=$^dm/spot (.|.[hHuUiInxXrRgGyYbBmMcCwW]+)=(((| )([a-zA-z][0-9]+))+)$:think u(fun.dmspot,%1,%2)
@set grid parent/CMD.DMSPOT=regexp
&CMD.DMUNDEFINE grid parent=$^dm/(undef|undefi|undefin|undefine)(( [a-zA-Z0-9]+)+)$:think u(fun.dmundefine,%2)
@set grid parent/CMD.DMUNDEFINE=regexp
&CMD.DMVIEWDEFS grid parent=$^dm/(view|vie|vi|v|vdef|vdefs|viewd|viewde|viewdef|viewdefs)((| [a-zA-Z0-9*]+)+)$: think u(fun.dmviewdefs,squish(%2))
@set grid parent/CMD.DMVIEWDEFS=regexp
&CMD.MV grid parent=$^mv ([a-zA-Z][0-9]+)$:think u(fun.ddgo,lcstr(%1))
@set grid parent/CMD.MV=regexp
&CMD.NOTE grid parent=$^d[dm]/note(s?) ([a-zA-Z0-9* ]+)(|=.*)$:think u(fun.note,%2,%3)
@set grid parent/CMD.NOTE=regexp
&CMND.DD grid parent=$dd:@pemit %#=[u(describe)]
&CMND.DDP_X grid parent=$ddp *:@pemit/list [setr(0,ifelse(t(v(name.%#)),setinter(lcon(room(me)),iter(lattr(me/name.#*),after(itext(0),.))),%#))]=[ifelse(t(v(name.%#)),[ansi(yh,\{)][ansi(h,DDP)]arty[ansi(yh,\})] \([ansi(v(color.%#),v(symbol.%#))]\) [v(name.%#)][switch(%0,:*,%b[after(%0,:)],;*,[after(%0,;)],%bsays\, "%0")],You're not playing.)]
&CMND.DD_COST_X grid parent=$dd/cost *=*:@pemit %#=[if(lmath(and,[isint(%1)] [lt(%1,100)] [t(setr(a,lattr(last(lparent(me))/data.cost.%0*)))]),%r[capstr(lcstr(last(%qa,.)))] costs%RCaster Level: %1%r%r[space(4)]| [center(Spell Level,mul(8,setr(s,min(9,div(inc(%1),2)))))]%rCost|[iter(lnum(0,%qs),[center(itext(0),7)],%b,|)]%r[repeat(-,4)]+[iter(lnum(0,%qs),repeat(-,7),%b,|)]%rBase|[iter(.5 [lnum(1,%qs)],[setq(dec(inum(0)),switch(lmath(mul,itext(0) %1 [v(%qa)]),*.*,inc(before(#$,.)),#$))][rjust(r(dec(inum(0))),7)],%b,|)]%rMatl|[iter(lnum(0,%qs),[rjust(switch(fdiv(r(itext(0)),2),*.*,inc(before(#$,.)),#$),7)],%b,|)]%r XP |[iter(lnum(0,%qs),[rjust(switch(fdiv(r(itext(0)),25),*.*,inc(before(#$,.)),#$),7)],%b,|)]%rDays|[iter(lnum(0,%qs),[rjust(ifelse(strmatch(%qa,*POTION*),1,switch(fdiv(r(itext(0)),1000),*.*,inc(before(#$,.)),#$)),7)],%b,|)]%r,Bad syntax: dd/cost <item>=<caster level>)]
&CMND.DD_CQ grid parent=$dd/cq:@pemit %#=[switch(v(name.%#),,You're not playing,[ansi(h,DD)]: Queue cleared.[set(me,queue.%#:)])]
&CMND.DD_DONE grid parent=$dd/done:@switch %#=[v(play.turn)],{@tr me/trig.next_0=%#;think [u(fun.dddone)]},{@pemit %#=DD[ansi(h,:)] It's not your turn.}
&CMND.DD_HP grid parent=$dd/hp:@pemit %#=[switch(v(name.%#),,You're not playing.,[ansi(h,DD)]: Your Hit Points: [v(hp.%#)]/[v(hpmax.%#)])]
&CMND.DD_HP_X grid parent=$dd/hp *:@switch/first [t(v(name.%#))]:[isint(%0)]=0:*,{@pemit %#=You're not playing.},1:0,{@pemit %#=[ansi(h,DD)]: HP value must be an integer.},1:1,{@emit [ansi(h,DD)]: [v(name.%#)]'s Hit Points [switch(%0,+*,increased by [ansi(gh,abs(%0))][set(me,hp.%#:[add(v(hp.%#),%0)])]: [ansi(n[u(h.getsymcolor,%#)],v(hp.%#))]/[v(hpmax.%#)],-*,decreased by [ansi(rh,abs(%0))][set(me,hp.%#:[add(v(hp.%#),%0)])]: [ansi(n[u(h.getsymcolor,%#)],v(hp.%#))]/[v(hpmax.%#)],set to[set(me,hpmax.%#:%0)][set(me,hp.%#:%0)]: [v(hp.%#)]/[v(hpmax.%#)])]}
&CMND.DD_IDLE grid parent=$dd/idle *:@pemit %#=[switch(v(name.%#),,You're not playing.,[ansi(h,DD)]: Idle message set to: %0.[set(me,idle.%#:%0)])]
&CMND.DD_INIT grid parent=$dd/init:@switch v(name.%#)=,{@pemit %#=You're not playing.},@emit [ansi(h,DD)]: INIT for \([ansi(v(color.%#),v(symbol.%#))]\) [v(name.%#)]: [setq(i,die(1,20))][set(me,init.%#:[add(%qi,v(initmod.%#))])][v(init.%#)] \(%qi[if(gte(v(initmod.%#),0),+)][v(initmod.%#)]\)
&CMND.DD_INIT_MOD grid parent=$dd/init *:@switch isint(%0)=0,{@pemit %#=INIT modifier must be an integer.},{@emit [ansi(h,DD)]: [v(name.%#)] INIT modifier set to: %0[set(me,initmod.%#:%0)]}
&CMND.DD_NAME grid parent=$dd/name *:@pemit %#=DD: Name set to '%0'[set(me,name.%#:%0)]
&CMND.DD_Q grid parent=$dd/q:@switch [t(v(name.%#))]:[v(play.turn)]=0:*,{@pemit %#=You're not playing.},1:%#,{@emit [ansi(h,DD)]: \([ansi(v(color.%#),v(symbol.%#))]\) [v(name.%#)]: Queued Action: [v(queue.%#)]},@pemit %#=[ansi(h,DD)]: Your queued action: [v(queue.%#)]
&CMND.DD_QUEUE grid parent=$dd/queue *:@pemit %#=[switch(v(name.%#),,You're not playing.,[ansi(h,DD)]: Queued message set to: %0.[set(me,queue.%#:%0)])]
&CMND.DD_Q_UEUE grid parent=$dd/q *:@pemit %#=[switch(v(name.%#),,You're not playing.,[ansi(h,DD)]: Queued message set to: %0.[set(me,queue.%#:%0)]
&CMND.DD_SYMBOL grid parent=$dd/symbol ?:@pemit %#=DD: Symbol set to '[set(me,symbol.%#:%0)][ansi(n[v(color.%#)],v(symbol.%#))]'
&CMND.DD_WHO grid parent=$dd/who:@pemit %#=%bSym [ljust(Character Name,20)] [ljust(Player Name,20)] [rjust(Idle,4)]%r [iter(3 20 20 4,repeat(=,itext(0)))]%r[null(u(h.calcinits))][setq(p,iter(lattr(me/name.#*),rest(itext(0),.)))][iter(%qg,if(isdbref(itext(0)),setq(l,%ql [itext(0)])[setq(p,remove(%qp,itext(0)))]),%b,)][iter(squish(%ql %qp [if(isdbref(v(play.turn)),,v(play.turn))]),[switch(itext(0),v(play.turn),>,%b)]\([ansi(n[v(color.[itext(0)])],ifelse(isdbref(itext(0)),v(symbol.[itext(0)]),*))]\) [ljust(v(name.[itext(0)]),20)] [ljust(name(itext(0)),20)] [rjust(switch(first(timestring(idle(ifelse(hastype(itext(0),player),itext(0),owner(itext(0)))))),#-1,--,#$),4)],%b,%r)]
&CMND.DD_X grid parent=$dd *:@break hasattrval(name.%#)=@pemit %#=You're not playing. ; @emit ([ansi(v(color.%#),v(symbol.%#))]) [v(name.%#)][switch(%0,:*,%b[after(%0,:)],;*,[after(%0,;)],%bsays\, "%0")]
&CMND.DD_X2 grid parent=$^dd/([\:'";].*)$:@switch v(name.%#)=,{@pemit %#=You're not playing.},@emit ([ansi(v(color.%#),v(symbol.%#))]) [v(name.%#)][switch(%1,:*,%b[after(%1,:)],;*,[after(%1,;)],%bsays\, "%1")]
@set grid parent/CMND.DD_X2=regexp
&CMND.DD_XP grid parent=$dd/xp *:@pemit %#=[ifelse(cand(isint(%0),gt(%0,0)),Begin Level %0: [lmath(add,iter(lnum(1,%0),mul(1000,dec(itext(0)))))] \[PHB p. 22\],Value must be a positive integer.)]
&CMND.DM_IDLE_X grid parent=$dm/idle *:@pemit %#=[ansi(h,DM)]: [switch(setr(p,pmatch(%0)),#-*,Use their M*U*S*H name or #dbref.,ifelse(t(setr(i,v(idle.%qp))),[v(name.%qp)]'s idle message: %qi,No idle message for [name(%qp)].))]
&CMND.DM_X grid parent=$dm *:@emit [ansi(h,ansi(r,DM)>)] [switch(%0,:*,The DM [after(%0,:)],;*,The DM[after(%0,;)],*=:*,[before(%0,=:)] [after(%0,=:)],*=;*,[before(%0,=;)][after(%0,=;)],*=*,[before(%0,=)] says\, "[after(%0,=)]",The DM says\, "%0")]
&DATA.COST.POTION grid parent=50
&DATA.COST.SCROLL grid parent=25
&DATA.COST.WAND grid parent=750
&DESC.OLD grid parent=%r%b%b%b[u(h.getcurboard)][iter(v(width),ucstr([itext(0)]),%b,%b)]%r[iter(v(height),rjust([itext(0)],2)%b[u(h.line,[itext(0)])],%b,%r)]%r
@set grid parent/DESC.OLD=no_command visual
&DESCRIBE grid parent=%b[rjust(ansi(h,dd/help) for help.,40)]%r[ljust(%bSym Name,18)]HP%b%b%b%b[u(h.getcurboard)][null(u(h.calcinits))][iter(v(width),ucstr([itext(0)]),%b,%b)]%r[iter(v(height),[u(h.menu,#@)]%b[rjust([itext(0)],2)]%b[u(h.liner,[itext(0)])]%b[ljust(itext(0),2)],%b,%r)]%r[space(24)][iter(v(width),ucstr(itext(0)))]%r[if(gt(words(%qg),words(v(height))),iter(lnum(add(words(v(height)),1),words(%qg)),u(h.menu,[itext(0)]),%b,%r)%r)]
@set grid parent/DESCRIBE=no_command visual public nearby
&DESCRIBE.OLD grid parent=%r%b[ljust(ansi(h,dd/help) for help.,20)]%b%b%b[u(h.getcurboard)][iter(v(width),ucstr([itext(0)]),%b,%b)]%r[iter(v(height),[u(h.menu,#@)]%b[rjust([itext(0)],2)]%b[u(h.line,[itext(0)])],%b,%r)]%r
&DMDESCRIBE grid parent=%b[rjust(ansi(h,dd/help) for help.,40)]%r[ljust(Loc Name,20)]%b%b%b%b[u(h.getcurboard)][iter(v(width),ucstr([itext(0)]),%b,%b)]%r[iter(v(height),[u(h.dmenu,#@)]%b[rjust([itext(0)],2)]%b[u(h.line,[itext(0)])],%b,%r)]%r[if(gt(words(%q5),words(v(height))),iter(lnum(add(words(v(height)),1),words(%q5)),u(h.dmenu,[itext(0)]),%b,%r)%r)]
&FUN.CLEAR grid parent=[wipe(me/loc.*)][wipe(me/count.*)][setq(1,edit(setdiff(lattr(me/hp.*),lattr(me/hp.#*)),HP.,,HPMAX.,))][iter(%q1,wipe(me/hp.##)[wipe(me/hpmax.##)])][wipe(me/init.*)][wipe(me/play.turn)][set(me,menu.contents:)][set(me,board:[iter(v(width),iter(v(height),%b,%b,`),%b,`)])]
&FUN.DDDONE grid parent=u(h.calcinits)[emit(DD: [v(name.[v(play.turn)])]'s turn took: [timestring(sub(secs(),%vt))])][set(me,vt:[secs()])][set(me,play.turn:[elements(%qe %qe,add(match(%qe,v(play.turn)),1))])][emit(DD: Turn goes to: [v(name.[v(play.turn)])])]
&FUN.DDGO grid parent=switch(0,u(h.inbounds,squish(%0)),pemit(%#,Out of bounds. Use dd/leave instead.),cand(hasattrval(me,name.%#),hasattrval(me,symbol.%#),hasattrval(me,color.%#)),pemit(%#,You need to set dd/name\, dd/symbol\, and dd/color first.),set(me,loc.pc.%#:[u(h.getnum,%0)]:[left(v(symbol.%#),1)][v(color.%#)])[emit([u(h.sn,%#)] moves to %0.)][u(h.add_menu,%#)][set(me,sym.%#:[v(symbol.%#)][v(color.%#)])])
&FUN.DDLEAVE grid parent=wipe(me/loc.pc.%#)[set(me,menu.contents:[setdiff(v(menu.contents) %#,%#)][pemit(%#,Thank you for playing.)]
&FUN.DMBACK grid parent=u(h.calcinits)[switch(0,u(isdm),u(h.error),set(me,play.turn:[elements(%qe %qe,sub(add(match(%qe,v(play.turn)),words(%qe)),1))])[emit(DD: Turn goes back to: [v(name.[v(play.turn)])])])]
&FUN.DMCLEAR grid parent=switch(0,u(isdm),u(h.error),iter(%0,u(h.clearone,u(h.getnames,itext(0)),itext(0)),%b,))
&FUN.DMCLEARINIT grid parent=switch(0,u(isdm),u(h.error),pemit(%#,Initiatives cleared.)[wipe(me/init.*)][wipe(me/play.turn)])
&FUN.DMDEFINE grid parent=switch(0,u(isdm),u(h.error),not(hasattrval(me,name.%0)),pemit(%#,Definition for %0 already exists.),[set(me,name.%0:%1)][set(me,sym.%0:%2)][pemit(%#,%0 defined as \([u(h.ansify,%2)]\) %1)])
&FUN.DMDELETE grid parent=switch(0,u(isdm),u(h.error),if(not(hasattr(me,board.%0)),pemit(%#,Board %0 does not exist.),[wipe(me/board*.%0)][pemit(%#,Board %0 deleted.)]))
&FUN.DMDESCRIBE grid parent=switch(0,u(isdm),u(h.error),u(h.setupdmenu)[pemit(%#,u(dmdescribe))]
&FUN.DMHP grid parent=switch(0,u(isdm),u(h.error),iter(%0,u(h.hpone,u(h.getnames,first(first(first(##,-),=),+)),first(first(first(##,-),=),+),after(##,+),after(##,-),after(##,=))
&FUN.DMINIT grid parent=switch(0,u(isdm),u(h.error),strlen(%0),iter(u(h.menued),if(hasattr(me,initmod.##),set(me,init.##:[add(v(initmod.##),die(1,20))])[emit([ansi(h,DD)]: INIT for \([u(h.ansify,v(sym.##))]\) [v(name.##)]: [v(init.##)] \([sub(v(init.##),v(initmod.##))][if(gte(v(initmod.##),0),+)][v(initmod.##)]\))])),iter(%0,u(h.dminitone,before(##,=),after(##,=))))
&FUN.DMKILL grid parent=switch(0,u(isdm),u(h.error),iter(%0,u(h.killone,u(h.getnames,itext(0)),itext(0)),%b,))
&FUN.DMLISTDEFS grid parent=switch(0,u(isdm),u(h.error),[setq(0,setunion(,switch(strlen(%0),0,u(h.plattr,sym.*),iter(%0,u(h.plattr,sym.[itext(0)])))))][switch(strlen(%q0),0,pemit(%#,No symbols found.),pemit(%#,table(iter(%q0,lcstr(last(itext(0),.))),17,68)))])
&FUN.DMLISTMAPS grid parent=switch(0,u(isdm),u(h.error),words(u(h.plattr,board.*)),pemit(%#,No boards are saved.),strlen(%0),pemit(%#,Available boards:%r[table(squish(iter(u(h.plattr,board.*),%b%b[capstr(lcstr(after([itext(0)],.)))],%b,%b)),15,75,%b,%b)]),words(u(h.plattr(board.%0*)),pemit(%#,No such board name.),pemit(%#,Boards matching %0:%r[table(squish(iter(u(h.plattr,board.%0*),%b%b[capstr(lcstr(after([itext(0)],.)))],%b,%b)),15,75,%b,%b)]))
&FUN.DMLISTSYMS grid parent=switch(0,u(isdm),u(h.error),words(lattr(me/sym.*)),pemit(%#,No symbols are stored.),strlen(%0),pemit(%#,Stored symbols:%r[table(squish(iter(lattr(me/sym.*),%b%b[capstr(lcstr(after([itext(0)],.)))],%b,%b)),15,75)]),words(lattr(me/sym.%0*)),pemit(%#,No such symbol name.),pemit(%#,Symbols matching %0:%r[table(squish(iter(lattr(me/sym.%0*),%b%b[capstr(lcstr(after([itext(0)],.)))],%b,%b)),15,75)]))
&FUN.DMLOAD grid parent=switch(0,u(isdm),u(h.error),if(not(hasattrp(me,board.%0)),pemit(%#,Board %0 does not exist.),[u(fun.clear)][u(h.resize,after(before(v(board.%0),|),:),before(v(board.%0),:))][set(me,board:[after(v(board.%0),|)])][if(hasattr(me,boardcounts.%0),iter(v(boardcounts.%0),set(me,[before(itext(0),:)]:[after(itext(0),:)])))][if(hasattr(me,boardlocs.%0),set(me,menu.contents:[before(v(boardlocs.%0),|)])[iter(after(v(boardlocs.%0),|),set(me,[before(##,:)]:[after(##,:)]),%b,)])][pemit(%#,Board %0 loaded.)]))
&FUN.DMLOC grid parent=switch(0,u(isdm),u(h.error),strlen(%0),[u(h.setupdmenu)][pemit(%#,u(dmdescribe))],[setq(5,u(h.getnames,%0))][pemit(%#,u(dmdescribe))]
&FUN.DMMOVE grid parent=switch(0,u(isdm),u(h.error),iter(%0,u(h.moveone,squish(u(h.getnames,before(itext(0),-))),after(itext(0),-),before(itext(0),-))))
&FUN.DMNEXT grid parent=u(h.calcinits)[emit(DD: [v(name.[v(play.turn)])]'s turn took: [timestring(sub(secs(),%vt))])][set(me,vt:[secs()])][switch(0,u(isdm),u(h.error),set(me,play.turn:[elements(%qe %qe,add(match(%qe,v(play.turn)),1))])[emit(DD: Turn goes to: [v(name.[v(play.turn)])])])]
&FUN.DMPUT grid parent=switch(0,u(isdm),u(h.error),hasattrval(me,%2.%0),pemit(%#,No such symbol.),u(h.add_menu,%0)[iter(%1,u(h.putone,%0,itext(0),%2),%b,)])
&FUN.DMSAVE grid parent=switch(0,u(isdm),u(h.error),if(hasattr(me,board.%0),pemit(%#,Board of that name already exists. use dm/delete %0),set(me,board.%0:[words(v(width))]:[words(v(height))]|[v(board)])[set(me,boardcounts.%0:[iter(lattr(me/count.*),##:[squish(v(##))])])][set(me,boardlocs.%0:[v(menu.contents)]|[iter(lattr(me/loc.*),[itext(0)]:[v(itext(0))],%b,%b)])][pemit(%#,Current Board saved as %0.)]))
&FUN.DMSET grid parent=switch(0,u(isdm),u(h.error),iter(%1,u(h.dmsetone,u(h.getnames,itext(0)),after(grab(dead:pdead alive:sym object:obj,%0*:*),:),itext(0))))
&FUN.DMSPOT grid parent=switch(0,u(isdm),u(h.error),iter(%1,u(h.dmspot,%0,[itext(0)]),%b,)[pemit(%#,Placed)])
&FUN.DMUNDEFINE grid parent=switch(0,u(isdm),u(h.error),iter(%0,u(h.dmundefineone,itext(0))))
&FUN.DMVIEWDEFS grid parent=switch(0,u(isdm),u(h.error),[setq(0,setunion(,switch(strlen(%0),0,u(h.plattr,sym.*),iter(%0,u(h.plattr,sym.[itext(0)])))))][switch(strlen(%q0),0,pemit(%#,No symbols found.),pemit(%#,iter(%q0,rjust(lcstr(last(itext(0),.)),15) \([u(h.ansify,v(itext(0)))]\) [v(edit(itext(0),SYM,NAME))],%b,%r)))])
&FUN.FILL grid parent=switch(0,u(isdm),u(h.error),cand(match(v(width),%0),match(v(width),%1)),pemit(%#,Width out of bounds.),cand(match(v(height),%2),match(v(height),%3)),pemit(%#,Height out of bounds.),iter(elements(v(width),lnum(match(v(width),%0),match(v(width),%1))),iter(elements(v(height),lnum(match(v(height),%2),match(v(height),%3))),u(h.set_spot,itext(0),itext(1),%4),%b,),%b,)[pemit(%#,Area Filled)]
&FUN.NOTE grid parent=switch(0,not(eq(strlen(%1),1)),if(hasattr(me,note.[edit(%0,%b,_,*,)]),wipe(me/note.[edit(%0,%b,_,*,)])[pemit(%#,cleared.)],pemit(%#,No such note)),eq(strlen(%1),0),set(me,note.[edit(%0,%b,_,*,)]:[after(%1,=)])[pemit(%#,Note set)],not(gte(words(setr(0,lattr(me/note.[edit(%0,%b,_)]))),2)),pemit(%#,Notes: [lcstr(edit(%q0,NOTE.,))]),words(setr(0,first(lattr(me/note.[edit(%0,%b,_)])))),pemit(%#,No such note.),u(h.onenote,%q0))
&FUN.RESIZE grid parent=switch(0,u(isdm),u(h.error),[u(h.resize,%0,%1)][pemit(%#,Board resized)])
&H.ADD_MENU grid parent=set(me,menu.contents:[setunion(v(menu.contents),%0)])
&H.ALPHA grid parent=if(isword(%0),%0)
&H.ANSIFY grid parent=ansi([mid(%0,1,8)],left(%0,1))
&H.ANSIFY2 grid parent=%1[u(h.getsymcolor,%0)]
&H.ANSIFY2.OLD grid parent=ansi(switch(strlen(u(h.getsymcolor,%0)),0,mid(%1,1,5),u(h.getsymcolor,%0)),left(%1,1))
&H.CALCINITS grid parent=iter(v(menu.contents),if(hasattr(me,init.##),setq(e,setunion(%qe,##)),setq(f,setunion(%qf,##))))[setq(g,squish([setr(e,munge(h.sortreverse,iter(%qe,[v(init.##)]),%qe))] [if(mul(strlen(%qe),strlen(%qf)),-)] %qf))]
&H.CLEARONE grid parent=switch(0,strlen(%0),pemit(%#,No such object: %1),pemit(%#,Removing [capstr(lcstr(last(%0,.)))] at [u(h.getloc,before(v(%0),:))].)[wipe(me/%0)]
&H.DMENU grid parent=ljust(if(lte(%0,words(%q5)),[setq(3,elements(%q5,%0))][ljust(u(h.getloc,before(v(%q3),:)),4)][u(h.menuhp,last(%q3,.))]),20)
&H.DMINITONE grid parent=switch(0,hasattr(me,sym.%0),pemit(%#,No such symbol),match(u(h.menued),%0),pemit(%#,%0 not on board),set(me,initmod.%0:%1)[pemit(%#,Modifier for %0 set to %1)])
&H.DMSETONE grid parent=switch(0,strlen(%0),pemit(%#,Unable to locate %2),[pemit(%#,[lcstr(last(%0,.))] is now [switch(%1,pdead,dead,sym,alive,obj,inanimate.)].)][setq(0,v(%0))][wipe(me/%0)][set(me,loc.%1.[last(%0,.)]:%q0)]
&H.DMSPOT grid parent=switch(0,u(h.inbounds,%1),pemit(%#,%1 out of bounds.),set(me,board:[replace(v(board),u(h.getnum,%1),%0,`)])
&H.DMUNDEFINEONE grid parent=switch(0,hasattrval(me,sym.%0),pemit(%#,No definition for %0.),[pemit(%#,Undefining: \([u(h.ansify,v(sym.%0))]\) [v(name.%0)].)][wipe(me/name.%0)][wipe(me/sym.%0)]
&H.ERROR grid parent=pemit(%#,Permission denied\, foolish mortal. Pelor is Angry!)
&H.GETBYLOC grid parent=regrep(me,loc.*,^[u(h.getnum,%0)]:)
&H.GETBYNAME grid parent=lattr(me/loc.*.%0)
&H.GETBYNUM grid parent=regrep(me,loc.*,^%0:)
&H.GETCHAR grid parent=u(h.ansify,elements(%q0,u(h.getnum,%0),`))
&H.GETCHAR.OLD grid parent=u(h.ansify,elements(%q0,u(h.getnum,%0),`))
&H.GETCURBOARD grid parent=[setq(0,v(board))][iter(u(plocs) [lattr(me/loc.pc.*)],setq(0,replace(%q0,before(v([itext(0)]),:),[u(h.ansify2,last(##,.),after(v([itext(0)]),:))],`)),%b,)]
&H.GETCURBOARD.OLD grid parent=[setq(0,v(board))][iter(u(plocs) [lattr(me/loc.pc.*)],setq(0,replace(%q0,before(v([itext(0)]),:),[u(h.ansify,after(v([itext(0)]),:))],`)),%b,)]
&H.GETLOC grid parent=setq(a,elements(v(width),mod(%0,words(v(width)))))[setq(b,elements(v(height),add(1,div(%0,words(v(width))))))]%qa%qb
&H.GETNAMES grid parent=setunion(iter(%0,switch(u(h.isloc,itext(0)),1,u(h.getonebyloc,itext(0)),u(h.getonebyname,itext(0)))),)
&H.GETNUM grid parent=add(mul(words(v(width)),sub(match(v(height),mid(%0,1,5)),1)),match(v(width),left(%0,1)))
&H.GETNUM2 grid parent=add(mul(words(v(width)),sub(match(v(height),%0),1)),match(v(width),%1))
&H.GETONEBYLOC grid parent=last(u(h.getbyloc,%0))
&H.GETONEBYNAME grid parent=first(u(h.getbyname,%0))
&H.GETONEBYNUM grid parent=last(u(h.getbynum,%0))
&H.GETSYMCOLOR grid parent=switch(0,hasattr(me,hpmax.%0),,switch(mul(100,fdiv(v(hp.%0),v(hpmax.%0))),<1,r,<26,rh,<51,yh))
&H.HPONE grid parent=switch(0,strlen(%0),pemit(%#,Unable to find a match: %1),eq(strlen(%4),0),set(me,hp.[last(%0,.)]:%4)[set(me,hpmax.[last(%0,.)]:%4)][pemit(%#,HP for [lcstr(last(%0,.))] at %4/%4)],hasattr(me,hp.[last(%0,.)]),pemit(%#,[lcstr(last(%0,.))] has no set HP to add/detract from.),gt(v(hp.[last(%0,.)]),0),pemit(%#,[lcstr(last(%0,.))] is already dead!)],eq(strlen(%3),0),set(me,hp.[last(%0,.)]:[sub(v(hp.[last(%0,.)]),%3)])[if(lte(0[v(hp.[last(%0,.)])],0),u(h.killone,%0),pemit(%#,HP for [lcstr(last(%0,.))] at [v(hp.[last(%0,.)])]/[v(hpmax.[last(%0,.)])]))],eq(strlen(%2),0),set(me,hp.[last(%0,.)]:[add(%2,[v(hp.[last(%0,.)])])])[pemit(%#,HP for [lcstr(last(%0,.))] at [v(hp.[last(%0,.)])]/[v(hpmax.[last(%0,.)])])]
&H.INBOUNDS grid parent=mul(match(v(width),left(%0,1)),match(v(height),mid(%0,1,5)))
&H.ISLOC grid parent=eq(strlen(foreach(h.alpha,%0)),1)
&H.KILLONE grid parent=switch(0,strlen(%0),pemit(%#,Can't find %1),emit([capstr(lcstr(last(%0,.)))] has died.)[setq(0,v(%0))][wipe(me/%0)][set(me,[edit(%0,SYM,PDEAD)]:[before(%q0,:)]:[left(after(%q0,:),1)]r)])
&H.LINE grid parent=iter(v(width),u(h.getchar,[itext(0)]%0),%b,%b)
&H.LINE.OLD grid parent=iter(v(width),u(h.getchar,[itext(0)]%0),%b,%b)
&H.LINER grid parent=iter(extract(%q0,u(h.getnum,[first(v(width))]%0),[words(v(width))],`),u(h.ansify,itext(0)),`,%b)
&H.MENU grid parent=ljust(if(lte(%0,words(%qg)),[setq(3,extract(%qg,%0,1))][switch(%q3,-,,[if(not(comp(%q3,v(play.turn))),>,%b)]\([u(h.ansify,v(sym.%q3))]\) [ifelse(isdbref(%q3),u(ufun.menu_player,%q3),v(name.%q3))])]),20)
&H.MENUED grid parent=setdiff(v(menu.contents),graball(v(menu.contents),#*))
&H.MENUHP grid parent=[setq(j,sub(15,add(2,strlen([v(hpmax.%0)][v(hp.%0)]))))][ljust(left(lcstr(%0),%qj),%qj)] [if(hasattr(me,hp.%0),[v(hp.%0)]/[v(hpmax.%0)])]
&H.MOVEONE grid parent=switch(0,strlen(%0),pemit(%#,Not found: %2),u(h.inbounds,%1),pemit(%#,%1 is out of bounds.),emit([capstr(lcstr(last(%0,.)))] moved to %1)[set(me,%0:[u(h.getnum,%1)]:[after(v(%0),:)])]
&H.ONEDDPAGE grid parent=if(not(hasattr(me,name.%0)),pemit(%#,name(%0) is not a player),switch(left(%1,1),;,pemit(%#,Long distance to \([ansi(v(color.%0),v(symbol.%0))]\) [v(name.%0)]: \([ansi(v(color.%#),v(symbol.%#))]\) [v(name.%#)][mid(%1,1,8000)])[pemit(%0,From afar\, \([ansi(v(color.%#),v(symbol.%#))]\)[mid(%1,1,8000)])],:,pemit(%#,Long distance to \([ansi(v(color.%0),v(symbol.%0))]\) [v(name.%0)]: \([ansi(v(color.%#),v(symbol.%#))]\) [v(name.%#)] [mid(%1,1,8000)])[pemit(%0,From afar\, \([ansi(v(color.%#),v(symbol.%#))]\) [mid(%1,1,8000)])],pemit(%#,You page \([ansi(v(color.%0),v(symbol.%0))]\) [v(name.%0)] with\, "%1")[pemit(%0,\([ansi(v(color.%#),v(symbol.%#))]\) [v(name.%0)] pages\, "%1")])
&H.ONENOTE grid parent=pemit(%#,[space(6)][ansi(bh,repeat(_,24))]%r[ansi(bh,repeat(_,5)/)]%b[ansi(ch,ljust(capstr(lcstr(left(edit(after(%0,.),_,%b),20))),23))][ansi(bh,\\[repeat(_,15)])]%r%r[wrap(edit(v(%0),<br>,%r,<BR>,%r,<P>,%r%t,<p>,%r%t,<T>,%t,<t>,%t,< >,%b,<b>,%b,<B>,%b),72)]%r%r[ansi(bh,repeat(_,46))]
&H.PLATTR grid parent=setunion(iter(lparent(me),lattr([itext(0)]/%0)),)
&H.PLOCS grid parent=lattr(me/loc.#*)[lattr(me/loc.obj.*)][lattr(me/loc.dead.*)][lattr(me/loc.sym.*)]
&H.PUTONE grid parent=switch(0,u(h.inbounds,%1),pemit(%#,%1 - out of bounds.),strlen(%2),pemit(%#,Error: no object type defined.),[set(me,count.%0:[add(1,0[v(count.%0)])])][set(me,loc.%2.%0[v(count.%0)]:[u(h.getnum,%1)]:[v(sym.%0)])][pemit(%#,\([u(h.ansify,v(sym.%0))]\) %0[v(count.%0)] placed at %1.)]
&H.RESIZE grid parent=[set(me,width:[edit(left(abcdefghijklmnopqrstuvwxyz,%1),,%b)])][set(me,height:[lnum(1,%0)])][u(fun.clear)]
&H.S grid parent=\([ansi(v(color.%0),v(symbol.%0))]\)
&H.SETUPDMENU grid parent=setq(5,setdiff(lattr(me/loc.*),lattr(me/loc.#*)))[setq(5,munge(h.sorter,iter(%q5,before(v([itext(0)]),:),%b,%b),%q5))]
&H.SET_SPOT grid parent=set(me,board:[replace(v(board),u(h.getnum2,%0,%1),%2,`)])
&H.SN grid parent=\([ansi(v(color.%0),v(symbol.%0))]\) [v(name.%0)]
&H.SORTER grid parent=sort(%0)
&H.SORTREVERSE grid parent=revwords(sort(%0))
&HEADFOOT grid parent=[ansi(h,repeat(~,75))]
&HELP.DD grid parent=This is a Dungeons & Dragons virtual TableTop aid.%r%rHelp is available on the following topics%r%rTOPIC - summary information%r%r[iter(PC - maintaining your PC \(name\, symbol\, color\, idle\, HP\)|PLAY - commands for play \(board\, movement\, initiative\)|COMM - communciation \(IC say/pose\, preplanned actions\),[ljust(before(itext(0),-),6)]-[rest(itext(0),-)],|,%r)]%r%rType: dd/help <topic>
&HELP.DD.COMM grid parent=Commands for IC communication and pre-planning actions.%r%rdd <message> %b(PUBLIC IC EMIT -- supports pose and semipose)%rddp <message> (PARTY ONLY EMIT -- supports pose and semipose)%r%rIn addition to your dd/idle message, you can store pre-planned actions on a per turn basis with...%r%rdd/q <free text message> -- actions to do when it's your turn.%r%r* If you have something queued when it becomes your turn, everyone will be notified that you have actions queued.%r* If you are idle at this time, and you remain idle for 1 minute thereafter, your queued message will automatically be shown to all (players and DM).%r* When the turn moves from your turn to the next player/monster, your queued message will be erased from memory.%r%rdd/q -- emit's your queued message immediately if it's your turn (otherwise pemits it to you only).%r%rdd/cq -- clears (erases) your queued message.
&HELP.DD.PC grid parent=Commands for setting up and maintaining your PC.%r%rdd/name <name> - give your PC a name.%r%rdd/symbol <symbol> - give your PC a one-character symbol%r%rdd/color <ansicodes> - give your PC's symbol some color%r%rdd/idle <message> - set a message for the DM in case you're idle%r%rdd/hp \[\[+|-\]<val>\] - view, set, increase, or decrease your HP%r%r%tdd/hp 10 (sets your PCs current/max HP to 10/10)%r%tdd/hp -2 (2 points damage)%r%tdd/hp +1 (1 point healing)%r%tdd/hp %b %b(view your current/max HP)%r
&HELP.DD.PLAY grid parent=Commands for board viewing, PC movement, and other 'play' commands.%r%rdd - same as 'look board'%r%rdd/go <x><y> - move your character to coordinates "<x>,<y>"%r%rdd/leave - leave the board%r%rThe menu on the left of the board sorts players and monsters according to current initiative order. When appropriate (i.e., when directed to do so by the DM), you can roll your initiative with...%r%rdd/init - rolls and stores your initiative
&HELP.DM grid parent=Dungeon Master help.%r%rHelp is available on the following topics%r%rTOPIC - summary information%r%rMAP%b%b%b%b%b- Creating and Saving maps%rSYMBOLS%b- Creating and placing symbols.%rCOMBAT%b%b- Additional commands for combat%rCOMM%b%b%b%b- communication (IC say/pose, DM information)%r%rExample1, Example2, Example3 show how to build and run an adventure.%r%rType: dm/help <topic>
&HELP.DM.COMBAT grid parent=Extra commands for combats.%r%r%tPlaced symbols (dm/help symbols) can be monsters or NPCs placed onto the grid for combat. Like PCs (dd/help), they have hit points and initiatives. An entire class of symbols are given the same initiative, and each placed symbol can have it's own hit points.%r%rdm/init <shortname>=<modifier> <sn2>=<-mod2> - Set the modifiers for a%r%tclass of symbols. They have to have a modifiers (can be 0) in%r%torder to be included in dm/init dicing.%rdm/init - without arguments, rolls initiatives for all symbols on the map%r%tthat have initiatives set.%rdm/clearinit - clear initiatives for all PCs and symbols, and all symbol%rmodifiers.%rdm/hp <loc1>=<hp> <name2>+<heal> <name3>-<damage> - Assign or modify hp%r%tfor individual symbols.%r%rTurn commands:%rdm/next - start the combat or give the turn to the next person, by order%r%t of initiative.%rdm/back - go back a person, in case of accidental dm/next.%r
&HELP.DM.COMMUNICATION grid parent=Commands for IC communciation and DM information.%r%rdm <message> - DM emit, supports pose and semipose%rdm <who>=<message> - NPC emit, supports pose and semipose.%r%r%tExamples:%r%rdm The Bartender=:asks Descartes, "How about a beer?"%rdm Descartes=I think not%rdm/clear descartes1%r
&HELP.DM.EXAMPLE grid parent=Dungeon Master Reference:%r%r%b%bThis example will make the "example" grid (a dock with two areas of water)%r%r%b%b[ansi(h,dm/resize 25x10)] - make a grid 25 long and 10 high.%r%b%b[ansi(h,dm/fill |=d1 d5)] - place an edge of | from d1 to d5.%r%b%b[ansi(h,dm/fill |=l1 l5)], [ansi(h,dm/fill |=p1 p5)] - do the same at l and p.%r%b%b[ansi(h,dm/fill -=e5 k5)] - same as above, but a line of - from e5 to k5.%r%b%b[ansi(h,dm/fill -=q5 y5)] [ansi(h,dm/fill -=a9 y9)] - same.%r%b%b[ansi(h,dm/fill ~bh=e1 k4)] - make a square of ~ (colored blue+hilite) from e1 to k4.%r%b%b[ansi(h,dm/fill ~bh=q1 y4)] - same as above for the 2nd spot of water.%r%b%b[ansi(h,dm/spot #=n3 m7 o7 c7 g7 t7)] - place boxes (#) at those locations.%r%rNow we have the map. [ansi(h,dm/save seas)] to save it as mapname 'seas' then [ansi(h,dm/load seas)] to bring it up in the future.
&HELP.DM.MAPS grid parent=Map "Background" commands:%r%r%tMaps supply a background and visual reference for players. The recommended unit, 5'/square, is not a word of law and the DM's judgement always prevails.%r%tLocations on the grid are accessed by <abc><123>.%r%tA symbol combination is 1 character followed by ansi codes. For example, to make a cyan hilite C \([ansi(ch,C)]\), you would use Cch (C, cyan hilite).%r%rdm/resize <width>x<height> - wipe the map grid clean and resize it.%rdm/fill <sym>=<corner> <corner> - fill a square of the grid with <sym>%rdm/spot <sym>=<loc> <loc> <loc> - place symbol at multiple <locations>%r%rdm/save <mapname> - save the map as <mapname> symbols (dm/help symbols)%r%t%tare saved too.%rdm/load <mapname> - load previously saved <mapname>%rdm/listmaps <mapname> - list maps beginning with <mapname>%rdm/delete <mapname> - delete a map.
&HELP.DM.SYMBOLS grid parent=Symbols on maps%r%r%tSymbols have several differences from maps. They are placed on top of the map and their symbols and names appear on the menu to the left of the map. They can be moved, removed, and have several attributes that may be changed on the fly, including color.%r%tThe shortname of a symbol is used to refer to it and to apply names (appended with numbers) to placed symbols.%r%tAs with maps, a symbols representation is defined with 1 character followed by it's ansi codes.%r%tA placed symbol can be referenced with either it's name (goblin1, goblin2, etc), or it's location (c4, e8, etc).%r%rdm/define <shortname>=<Full Name>,<symbol> - define <shortname> as a symbol.%rdm/listdefs <name> - list symbol definitions. the name is glob-matched.%rdm/undefine <shortname> - remove symbol definition.%rdm/loc <loc1> <name1> - Locate a symbol or get symbol at location.%r%r(Continued in dm/help symbols2)%r
&HELP.DM.SYMBOLS2 grid parent=Symbols (continued.)%r%rdm/put <shortname>=<loc1> <loc2> - place symbols of <shortname> at multiple%r%tlocations.%rdm/set <priority>=<loc1> <name2> - Change priorities (object, alive, dead)%rdm/kill <loc1> <name2> - Kill a symbol, turning it's color to red (Dead).%rdm/clear <loc1> <name2> - clear a symbol from the board.%rdm/move <loc1>-<newloc> <name2>-<newloc> - move symbols.%r
&ISDM grid parent=not(comp(%#,owner(me)))
&LOCK.ISDM grid parent=not(comp(%#,owner(me)))
&PLOCS grid parent=setq(z,switch(strlen(%0),0,*,%0))[squish([lattr(me/loc.obj.%qz)] [lattr(me/loc.pdead.%qz)] [lattr(me/loc.sym.%qz)])]
&TRIG.NEXT_0 grid parent=@drain me;@switch [if(isdbref(%0),set(me,queue.%0:))][isdbref(setr(p,v(play.turn)))]:[t(v(queue.%qp))]=0:*,,1:0,,@wait [pemit(%qp,ansi(h,DD): Your queued action will auto emit in 60 seconds if you remain idle.%r %b: To emit it immediately, do 'dd/q'.%r% %b: To override it, do 'dd/cq'. \(and do something else manually\))]me/60=@tr me/trig.next_1=%qp
&TRIG.NEXT_1 grid parent=@switch [idle(%0)]=>60,{@emit [ansi(h,DD)]: \([ansi(v(color.%0),v(symbol.%0))]\) [v(name.%0)]: Queued Action: [v(queue.%0)]},
&TYPE grid parent=parent game
&UFUN.ISCOLOR grid parent=[not(strmatch(hixrgybmcwXRGYBMCW,*%0*))]
&UFUN.MENU_PLAYER grid parent=[setq(j,sub(15,add(2,strlen([v(hpmax.%0)][v(hp.%0)]))))][ljust(left(v(name.%0),%qj),%qj)] [ansi(n[u(h.getsymcolor,%0)],v(hp.%0))]/[v(hpmax.%0)]
think See 'dd/help' and 'dm/help'.