; variable definitions ; SHOULD BE LOADED LAST!!!! /def onoffvar = \ /eval /set %%1 %%{%{1}-%{2}} %;\ /def get_%1 = /echo $$[%{1}?"on":"off"] %;\ /alias %1 /set %1 $$[%{1}?"0":"1"]%%;/blueecho Variable (%1) is $$(/get_%1)%%;\ /if (list("-s ^%1$$")) /%1 %%*%%;/endif%;/eval /if (list("-s ^%1$$")) /%1%%;/endif /def truefalsevar = \ /eval /set %%1 %%{%{1}-%{2}} %;\ /def get_%1 = /echo $$[%{1}?"true":"false"] %;\ /alias %1 /set %1 $$[%{1}?"0":"1"]%%;/blueecho Variable (%1) is $$(/get_%1)%%;\ /if (list("-s ^%1$$")) /%1 %%*%%;/endif%;/eval /if (list("-s ^%1$$")) /%1%%;/endif /def get_alias_body = /echo /def alight = \ /if (alight) \ /def -p1 -mregexp -F -t'^The torch goes dark' newlight_trig = /set dark2 1%;\ /def -p1 -mregexp -F -t'^There is darkness as a torch goes dark' newlight_trig2 = /set dark2 1%;\ /else \ /if /ISMACRO newlight_trig%; /then /undef newlight_trig%;/endif%;\ /if /ISMACRO newlight_trig2%; /then /undef newlight_trig2%;/endif%;\ /endif /def killblank = \ /if (killblank) \ /def -ag -t'^$$' blanklinegag %;\ /else \ /if /ISMACRO blanklinegag%; /then /undef blanklinegag%; /endif%;\ /endif ; Auto-vars /onoffvar abag 1 /onoffvar abagbag 0 /onoffvar abrief 0 /onoffvar acorpse 1 /onoffvar pcorpse 0 /onoffvar adivvy 1 /onoffvar aget 0 ;/onoffvar aheal 1 /onoffvar alight 1 /onoffvar await 1 /onoffvar killbeep 0 ; for parsing ;s into separate commands: /onoffvar parse 1 /onoffvar stepper 0