Mercurial > hg > batmud > ggrtf
changeset 1265:d1d7c9ecd971
Add functionality for disabling certain hardcoded lites.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 22 Dec 2010 19:41:47 +0000 |
parents | 83cfce9b902e |
children | 7910e501e680 |
files | ggrtf-pre.tf ggrtf.tf |
diffstat | 2 files changed, 88 insertions(+), 64 deletions(-) [+] |
line wrap: on
line diff
--- a/ggrtf-pre.tf Wed Dec 22 19:35:41 2010 +0000 +++ b/ggrtf-pre.tf Wed Dec 22 19:41:47 2010 +0000 @@ -15,4 +15,28 @@ /load -q %{_spreinit}%;\ /echo -p @{BCgreen}Done.@{n}%;\ + /gloadpreinit + +;; Filter out liting/attribute options +/def -i gfilterlites =\ + /let _new=%;\ + /while ({#})\ + /if (!regmatch("^(-aBC|-aC|-P|-ab)",{1}))\ + /let _new=%{_new} %{1}%;\ + /endif%;\ + /shift%;\ + /done%;\ + /result _new + +;; Magic happens here +/def -i gdef =\ + /if (opt_lites!~"on")\ + /split %{*}%;\ + /let _opts=%{P1}%;\ + /let _body=%{P2}%;\ + /let _nopts=$(/gfilterlites %{_opts})%;\ + /def %{_nopts} = %{_body}%;\ + /else \ + /def %{*}%;\ + /endif
--- a/ggrtf.tf Wed Dec 22 19:35:41 2010 +0000 +++ b/ggrtf.tf Wed Dec 22 19:41:47 2010 +0000 @@ -1122,12 +1122,12 @@ ;; Define a conjuprot trigger (function) /def -i prdefconju =\ - /def -i -p9999 -F -aCgreen -msimple -t"%{3}" rec_%{2}_on=\ + /def -i -F -p9999 -aCgreen -msimple -t"%{3}" rec_%{2}_on=\ /if (prot_%{1}_p==1) /gprot_on %{1}%{4}/endif%%;\ /set prot_%{1}_p=0 /def -i prdeffolk =\ - /def -i -p9999 -F -aCgreen -mregexp -t"%{3}" rec_%{2}_on=/gprot_on %{1}%{4} + /def -i -F -p9999 -aCgreen -mregexp -t"%{3}" rec_%{2}_on=/gprot_on %{1}%{4} ;; Clear/setup all variables related to prot @@ -1177,13 +1177,13 @@ /let qact1=%%;%;\ /let qact2= (sticky)%%;/set prot_%{opt_i}_st=1%%;%;\ /if (opt_P)\ - /def -i -p9999 -F -aCyellow -mregexp -t"^([A-Z][a-z]+) utters? the magic words '%{opt_A}'\$" rec_%{opt_i}_A=\ + /gdef -i -F -p9999 -aCyellow -mregexp -t"^([A-Z][a-z]+) utters? the magic words '%{opt_A}'\$" rec_%{opt_i}_A=\ /prclearpreqs %%{lst_cprots}%%;/set prot_%{opt_i}_p=1%;\ /test prdefconju(opt_i, opt_i, "You see a %{opt_d} shield fade into existance around you.", qact1)%;\ /test prdefconju(opt_i, "%{opt_i}_st", "You see an extra %{opt_d} shield fade into existance around you.", qact2)%;\ /let opt_d=Your %{opt_d} shield fades out.%;\ /elseif (opt_p)\ - /def -i -p9999 -F -aCyellow -mregexp -t"^([A-Z][a-z]+) utters? the magic words '%{opt_A}'\$" rec_%{opt_i}_A=\ + /gdef -i -F -p9999 -aCyellow -mregexp -t"^([A-Z][a-z]+) utters? the magic words '%{opt_A}'\$" rec_%{opt_i}_A=\ /prclearpreqs %%{lst_cprots}%%;/set prot_%{opt_i}_p=1%;\ /test prdefconju(opt_i, opt_i, "You sense a powerful protective aura around you.", qact1)%;\ /test prdefconju(opt_i, "%{opt_i}_st", "You sense an extra powerful protective aura around you.", qact2)%;\ @@ -1200,16 +1200,16 @@ /if (opt_u=~"" | opt_d=~"") /break%;/endif%;\ /if (opt_r) /let _qmatch=regexp%;/else /let _qmatch=simple%;/endif%;\ /let pstr=0%;\ - /if (opt_A!~"") /let pstr=1%;/def -i -p9999 -F -aCyellow -mregexp -t'%{opt_A}' rec_%{opt_i}_A=/prclearpreqs %%{lst_prots}%%;/set prot_%{opt_i}_p=1%;/endif%;\ - /if (opt_B!~"") /let pstr=2%;/def -i -p9999 -F -aCyellow -mregexp -t'%{opt_B}' rec_%{opt_i}_B=/if (prot_%{opt_i}_p == 1) /prclearpreqs %%{lst_prots}%%;/set prot_%{opt_i}_p=2%%;/endif%;/endif%;\ - /if (opt_C!~"") /let pstr=3%;/def -i -p9999 -F -aCyellow -mregexp -t'%{opt_C}' rec_%{opt_i}_C=/if (prot_%{opt_i}_p == 2) /prclearpreqs %%{lst_prots}%%;/set prot_%{opt_i}_p=3%%;/endif%;/endif%;\ + /if (opt_A!~"") /let pstr=1%;/gdef -i -F -p9999 -aCyellow -mregexp -t'%{opt_A}' rec_%{opt_i}_A=/prclearpreqs %%{lst_prots}%%;/set prot_%{opt_i}_p=1%;/endif%;\ + /if (opt_B!~"") /let pstr=2%;/gdef -i -F -p9999 -aCyellow -mregexp -t'%{opt_B}' rec_%{opt_i}_B=/if (prot_%{opt_i}_p == 1) /prclearpreqs %%{lst_prots}%%;/set prot_%{opt_i}_p=2%%;/endif%;/endif%;\ + /if (opt_C!~"") /let pstr=3%;/gdef -i -F -p9999 -aCyellow -mregexp -t'%{opt_C}' rec_%{opt_i}_C=/if (prot_%{opt_i}_p == 2) /prclearpreqs %%{lst_prots}%%;/set prot_%{opt_i}_p=3%%;/endif%;/endif%;\ /if (pstr > 0)\ - /def -i -p9999 -F -aCgreen -m%{_qmatch} -t'%{opt_u}' rec_%{opt_i}_on=/if (prot_%{opt_i}_p==%{pstr})/gprot_on %{opt_i}%%;/endif%%;/set prot_%{opt_i}_p=0%;\ + /gdef -i -F -p9999 -aCgreen -m%{_qmatch} -t'%{opt_u}' rec_%{opt_i}_on=/if (prot_%{opt_i}_p==%{pstr})/gprot_on %{opt_i}%%;/endif%%;/set prot_%{opt_i}_p=0%;\ /else \ - /def -i -p9999 -F -aCgreen -m%{_qmatch} -t'%{opt_u}' rec_%{opt_i}_on=/set prot_%{opt_i}_p=0%%;/gprot_on %{opt_i}%;\ + /gdef -i -F -p9999 -aCgreen -m%{_qmatch} -t'%{opt_u}' rec_%{opt_i}_on=/set prot_%{opt_i}_p=0%%;/gprot_on %{opt_i}%;\ /endif%;\ /endif%;\ - /def -i -p9999 -F -aCgreen -m%{_qmatch} -t'%{opt_d}' rec_%{opt_i}_off=/gprot_off %{opt_i} + /gdef -i -F -p9999 -aCgreen -m%{_qmatch} -t'%{opt_d}' rec_%{opt_i}_off=/gprot_off %{opt_i} ;; Turn prot ON @@ -1354,7 +1354,7 @@ /done%;\ /result _ripstr -/def -i -p9999 -F -aCgreen -msimple -t"You can see Death, clad in black, collect your corpse." gprots_rip =\ +/gdef -i -F -p9999 -aCgreen -msimple -t"You can see Death, clad in black, collect your corpse." gprots_rip =\ /msq @{BCyellow}Various prots expire as you die!@{n}%;\ /set spell_st=off%;\ /set skill_st=off%;\ @@ -1385,7 +1385,7 @@ /result _dmpstr -/def -i -p9999 -F -ag -mregexp -t"^You feel (unprotected|much more vulnerable)\.$" gprots_dmp =\ +/def -i -F -p9999 -ag -mregexp -t"^You feel (unprotected|much more vulnerable)\.$" gprots_dmp =\ /let _dmpstr=$(/gprots_clear_dmp %{lst_cprots} %{lst_dmpprots})%;\ /gprots_update%;/gstatus_update%;\ /if (_dmpstr!~"")\ @@ -1395,7 +1395,7 @@ ;; Login after reboot -/def -i -p9999 -F -aCgreen -msimple -t"Moving to starting location." gprots_reboot =\ +/gdef -i -F -p9999 -aCgreen -msimple -t"Moving to starting location." gprots_reboot =\ /cprots @@ -1549,22 +1549,22 @@ ;; Unstun (NS) /prdefprot -i"unstun" -n"Uns" -l"Unstun" -h -q -e -/def -i -F -aCgreen -mregexp -t"^[A-Z][A-Za-z]+\'s chanting appears to do absolutely nothing.$" rec_unstun_on =\ +/gdef -i -F -aCgreen -mregexp -t"^[A-Z][A-Za-z]+\'s chanting appears to do absolutely nothing.$" rec_unstun_on =\ /gprot_on unstun%;/set prot_unstun_w=0 -/def -i -F -aCgreen -msimple -t"You are STUNNED." rec_stun_start =\ +/gdef -i -F -aCgreen -msimple -t"You are STUNNED." rec_stun_start =\ /set stun_st=on%;/gprot_off unstun -/def -i -F -aCgreen -mregexp -t" paralyzes you with its mind\.$" rec_paralyzed_start =\ +/gdef -i -F -aCgreen -mregexp -t" paralyzes you with its mind\.$" rec_paralyzed_start =\ /gspell_interrupt%;/gskill_interrupt%;/set stun_st=on%;/gprot_off unstun -/def -i -F -aCgreen -msimple -t"You are no longer stunned." rec_stun_end =\ +/gdef -i -F -aCgreen -msimple -t"You are no longer stunned." rec_stun_end =\ /set stun_st=off%;/msr No longer stunned -/def -i -F -aCgreen -msimple -t"It doesn't hurt as much as it normally does!" rec_unstun_off =\ +/gdef -i -F -aCgreen -msimple -t"It doesn't hurt as much as it normally does!" rec_unstun_off =\ /gprot_off unstun -/def -i -F -aCgreen -msimple -t"It doesn't hurt at all!" rec_unstun_notall =\ +/gdef -i -F -aCgreen -msimple -t"It doesn't hurt at all!" rec_unstun_notall =\ /gspell_interrupt%;/gskill_interrupt%;\ /set prot_unstun_w=$[prot_unstun_w+1]%;\ /msr Unstun weakened [#%{prot_unstun_w}]%;\ @@ -1575,13 +1575,13 @@ ;; Mesmeric Threshold (NS) /prdefprot -i"mthresh" -n"MesmTh" -l"Mesmeric Threshold" -h -q -e -/def -i -F -aCgreen -msimple -t"You feel too mesmerized to know pain as a supernatural trance takes over you." rec_mthresh_on =\ +/gdef -i -F -aCgreen -msimple -t"You feel too mesmerized to know pain as a supernatural trance takes over you." rec_mthresh_on =\ /gprot_on mthresh%;/set prot_mthresh_w=0 -/def -i -F -aCgreen -msimple -t"The dreamlike feeling improving your concentration subsides." rec_mthresh_off =\ +/gdef -i -F -aCgreen -msimple -t"The dreamlike feeling improving your concentration subsides." rec_mthresh_off =\ /gprot_off mthresh -/def -i -F -aCgreen -msimple -t"You get hit HARD, but continue your actions under a supernatural trance." rec_mthresh_weak =\ +/gdef -i -F -aCgreen -msimple -t"You get hit HARD, but continue your actions under a supernatural trance." rec_mthresh_weak =\ /set prot_mthresh_w=$[prot_mthresh_w+1]%;\ /msr Mesmeric Threshold weakened [#%{prot_mthresh_w}]%;\ /gstatus_update @@ -1631,22 +1631,22 @@ /set curse_%{opt_i}_m=-1%;\ /endif%;\ /let _plevel=0%;\ - /if (opt_A!~"") /let _plevel=1%;/def -i -p9999 -F -mregexp -t'%{opt_A}' rec_%{opt_i}_A=/prclearcurses %%{lst_curses}%%;/set curse_%{opt_i}_p=1%;/endif%;\ - /if (opt_B!~"") /let _plevel=2%;/def -i -p9999 -F -mregexp -t'%{opt_B}' rec_%{opt_i}_B=/if (curse_%{opt_i}_p == 1) /prclearcurses %%{lst_curses}%%;/set curse_%{opt_i}_p=2%%;/endif%;/endif%;\ - /if (opt_C!~"") /let _plevel=3%;/def -i -p9999 -F -mregexp -t'%{opt_C}' rec_%{opt_i}_C=/if (curse_%{opt_i}_p == 2) /prclearcurses %%{lst_curses}%%;/set curse_%{opt_i}_p=3%%;/endif%;/endif%;\ + /if (opt_A!~"") /let _plevel=1%;/def -i -F -p9999 -mregexp -t'%{opt_A}' rec_%{opt_i}_A=/prclearcurses %%{lst_curses}%%;/set curse_%{opt_i}_p=1%;/endif%;\ + /if (opt_B!~"") /let _plevel=2%;/def -i -F -p9999 -mregexp -t'%{opt_B}' rec_%{opt_i}_B=/if (curse_%{opt_i}_p == 1) /prclearcurses %%{lst_curses}%%;/set curse_%{opt_i}_p=2%%;/endif%;/endif%;\ + /if (opt_C!~"") /let _plevel=3%;/def -i -F -p9999 -mregexp -t'%{opt_C}' rec_%{opt_i}_C=/if (curse_%{opt_i}_p == 2) /prclearcurses %%{lst_curses}%%;/set curse_%{opt_i}_p=3%%;/endif%;/endif%;\ /if (_plevel > 0)\ - /def -i -p9999 -F -mregexp -t'%{opt_u}' gcurse_%{opt_i}_on=\ + /def -i -F -p9999 -mregexp -t'%{opt_u}' gcurse_%{opt_i}_on=\ /if (curse_%{opt_i}_p==%{_plevel})\ /test gcurse_on("%{opt_i}",{P%{opt_U}})%%;\ /endif%%;\ /set curse_%{opt_i}_p=0%;\ /else \ - /def -i -p9999 -F -mregexp -t'%{opt_u}' gcurse_%{opt_i}_on=\ + /def -i -F -p9999 -mregexp -t'%{opt_u}' gcurse_%{opt_i}_on=\ /set curse_%{opt_i}_p=0%%;\ /test gcurse_on("%{opt_i}",{P%{opt_U}})%;\ /endif%;\ /if (opt_d!~"")\ - /def -i -p9999 -F -mregexp -t'%{opt_d}' gcurse_%{opt_i}_off=\ + /def -i -F -p9999 -mregexp -t'%{opt_d}' gcurse_%{opt_i}_off=\ /test gcurse_off("%{opt_i}",{P%{opt_D}})%;\ /endif @@ -1948,14 +1948,14 @@ ;; Monster RIP does not necessarily end battle, but let's reset ;; the target at least. -/def -i -p9999 -aCgreen -mregexp -t"^[A-Za-z ,.'-]+ is DEAD, R.I.P.$" gbattle_rip =\ +/gdef -i -p9999 -aCgreen -mregexp -t"^[A-Za-z ,.'-]+ is DEAD, R.I.P.$" gbattle_rip =\ /set battle_target=%;\ /prexecfuncs %{event_battle_rip} ;; End of battle, probably. We trust here that the last 'scan' (if any) ;; occurs after monster has died. If this is not the case, the heartbeat ;; function should take care of it eventually. -/def -i -p9999 -aCyellow -msimple -t"You are not in combat right now." gbattle_nocombat =\ +/gdef -i -p9999 -aCyellow -msimple -t"You are not in combat right now." gbattle_nocombat =\ /gbattle_end @@ -2157,11 +2157,11 @@ /def -i -mregexp -t"^You take a close look at (.*) in comparison to yourself\.$" gconsider_rep0 =\ /set cons_st=1%;/set cons_pr=%;/set cons_exp=%;/set cons_name=%{P1} -/def -i -Econs_st==1 -ag -mregexp -t"^You would get (.*) experience for " gconsider_rep1 =\ +/def -i -Econs_st -ag -mregexp -t"^You would get (.*) experience for " gconsider_rep1 =\ /set cons_exp=%{P1} /def -i gdefconspr =\ - /def -i -Econs_st==1 -ag -mregexp -t"^[A-Za-z<> ,.'-]+ %{2}$$" gconsider_pr%{1} =\ + /def -i -Econs_st -ag -mregexp -t"^[A-Za-z<> ,.'-]+ %{2}$$" gconsider_pr%{1} =\ /set cons_pr=%{3} /test gdefconspr(1, "has a soft skin.", "soft", 0) @@ -2229,10 +2229,10 @@ /def -i msm = /if (opt_rmisc=~"on") /msr %*%;/endif ;; Highlite open containers, doors etc. -/def -i -F -p9999 -P2BCred -mregexp -t" (safe|chest|crate|vault|box|closet|money-box).* (\(open\))" glite_open -/def -i -F -p9999 -P2BCgreen -mregexp -t" (safe|chest|crate|vault|box|closet|money-box).* (\(closed\))" glite_closed - -/def -i -F -p9999 -aBCred -mregexp -t"^This monster looks somehow familiar" glite_rapeprot =\ +/gdef -i -F -p9999 -P2BCred -mregexp -t" (safe|chest|crate|vault|box|closet|money-box).* (\(open\))" glite_open +/gdef -i -F -p9999 -P2BCgreen -mregexp -t" (safe|chest|crate|vault|box|closet|money-box).* (\(closed\))" glite_closed + +/gdef -i -F -p9999 -aBCred -mregexp -t"^This monster looks somehow familiar" glite_rapeprot =\ /msr I have a rapeprot! ;; Lite skills/spells you can train with current exp @@ -2251,50 +2251,50 @@ ;; Ambush /set ambush_t=0 -/def -i -F -p9999 -aCred -msimple -t"You cannot leave, you have been AMBUSHED." gmisc_ambush1 =\ +/gdef -i -F -p9999 -aCred -msimple -t"You cannot leave, you have been AMBUSHED." gmisc_ambush1 =\ /if (time()-ambush_t > 5)\ /set ambush_t=$[time()]%;\ /msm AMBUSHED!%;\ /endif ;; Gained percentage in skill -/def -i -p9999 -aCgreen -mregexp -t"^You feel like you just got slightly better in (.*)$" gmisc_improved =\ +/gdef -i -F -p9999 -aCgreen -mregexp -t"^You feel like you just got slightly better in (.*)$" gmisc_improved =\ /mse improved in %{P1} ;; Floating disc -/def -i -p9999 -msimple -t"Your disc wavers dangerously." gmisc_fdweak =\ +/gdef -i -F -p9999 -msimple -t"Your disc wavers dangerously." gmisc_fdweak =\ /msm Disc falling! -/def -i -p9999 -msimple -t"You reload magical energy to the disc that is floating in the air." gmisc_fdreload =\ +/gdef -i -F -p9999 -msimple -t"You reload magical energy to the disc that is floating in the air." gmisc_fdreload =\ /msm Disc reloaded. ;; Party leadership -/def -i -F -p9999 -aCred -msimple -t"You are the new leader of the party." gmisc_pleader =\ +/gdef -i -F -p9999 -aCred -msimple -t"You are the new leader of the party." gmisc_pleader =\ @@party forcefollow all%;/msm Leading! ;; Poison removed -/def -i -F -p9999 -aCred -msimple -t"You feel the poison leaving your veins!" gmisc_poisonrm =\ +/gdef -i -F -p9999 -aCred -msimple -t"You feel the poison leaving your veins!" gmisc_poisonrm =\ /msm Poison removed! ;; Uncon -/def -i -F -p9999 -ag -mregexp -t"^([A-Z][A-Za-z]+) lapses into unconsciousness from severe loss of blood.$" gmisc_uncon =\ +/gdef -i -F -p9999 -ag -mregexp -t"^([A-Z][A-Za-z]+) lapses into unconsciousness from severe loss of blood.$" gmisc_uncon =\ /msq @{BCred}!!!@{n} @{BCwhite}%{P1}@{n} is @{BCgreen}UNCON@{n} @{BCred}!!!@{n}%;\ /msm %{P1} is UNCON! ;; Warn about changes in party formation -/def -i -F -p9999 -ag -mregexp -t"^([A-Z][a-z]+) is now in the 1st row.$" gmisc_firstrow =\ +/gdef -i -F -p9999 -ag -mregexp -t"^([A-Z][a-z]+) is now in the 1st row.$" gmisc_firstrow =\ /msq @{BCred}!!!@{n} @{BCwhite}%{P1}@{n} @{BCyellow}is now in 1st row@{n} @{BCred}!!!@{n}%;\ /if ({P1}=~set_plrname) /msm %{P1} is now in 1st row!%;/endif ;; Multicolored Demons (event) -/def -i -F -p9999 -aCred -msimple -t"A Nasty Multicolored Demon arrives with puff of red smoke." gmisc_mcdemon =\ +/gdef -i -F -p9999 -aCred -msimple -t"A Nasty Multicolored Demon arrives with puff of red smoke." gmisc_mcdemon =\ /msq @{BCwhite}*@{n} @{BCgreen}---@{n} @{BCred}MC DEMONS EVENT!@{n} @{BCgreen}---@{n} @{BCwhite}*@{n} ;; Robin Hood ; Robin Hood took Ring of the Medusa labeled as (Ggr) <red glow> from Ggr. -/def -i -F -p9999 -aCred -mregexp -t"^Robin Hood arrives from " gmisc_robin1 =\ +/gdef -i -F -p9999 -aCred -mregexp -t"^Robin Hood arrives from " gmisc_robin1 =\ /msq @{BCwhite}*@{n} @{BCgreen}---@{n} @{BCred}ROBIN HOOD EVENT!@{n} @{BCgreen}---@{n} @{BCwhite}*@{n} @@ -2317,36 +2317,36 @@ /msm NOTICE! %{P1} got damaged! (%{P2}) ;; Resist curses and drains -/def -i -p1 -aCred -mregexp -t"^You (are not affected by|successfully resist a|successfully resist the) ([a-z ]+)\.$" gmisc_curseres =\ +/gdef -i -F -p1 -aCred -mregexp -t"^You (are not affected by|successfully resist a|successfully resist the) ([a-z ]+)\.$" gmisc_curseres =\ /msm Resisted %{P2}! -/def -i -p1 -aCred -msimple -t"You feel as if you caught something, but don't feel worse at all." gmisc_curseres_nr =\ +/gdef -i -F -p1 -aCred -msimple -t"You feel as if you caught something, but don't feel worse at all." gmisc_curseres_nr =\ /msm Resisted curse! (with NR) ;; Resist poison -/def -i -p1 -aCred -msimple -t"You SAVE against POISON." gmisc_poisonres =\ +/gdef -i -F -p1 -aCred -msimple -t"You SAVE against POISON." gmisc_poisonres =\ /msm Saved against poison! ;; Psi scanning warnings -/def -i -ag -msimple -t"You get the feeling that someone is looking over your shoulder." gmisc_mglance =\ +/gdef -i -F -ag -msimple -t"You get the feeling that someone is looking over your shoulder." gmisc_mglance =\ /gwarning @{BCwhite}Mental Glance@{n} detected! ;; All-seeing eye -/def -i -ag -msimple -t"You have a feeling that somebody is watching you." gmisc_alleye =\ +/gdef -i -F -ag -msimple -t"You have a feeling that somebody is watching you." gmisc_alleye =\ /gwarning @{BCwhite}All-seeing eye@{n} detected! ;; Breaking equipment -/def -i -ab -p1 -F -mregexp -t"^Your (.+) breaks into zillions of pieces\.$" gmisc_break_eq =\ +/gdef -i -F -ab -p1 -F -mregexp -t"^Your (.+) breaks into zillions of pieces\.$" gmisc_break_eq =\ /gwarning @{BCgreen}ALARM!@{n} @{BCred}HALB!@{n} @{BCyellow}ABUA!@{n} [ @{BCwhite}%{P1}@{n} ] @{BCred}broken!@{n}%;\ /msm ALARM! HALB! ABUA! My %{P1} broke into pieces! ;; Banishment -/def -i -aBCred -mregexp -t"^You feel that (.+) doesn\'t enjoy your presence\.$" gmisc_banish0 =\ +/gdef -i -F -aBCred -mregexp -t"^You feel that (.+) doesn\'t enjoy your presence\.$" gmisc_banish0 =\ /set mbanish_st=1 -/def -i -ag -msimple -E(mbanish_st==1) -t"Suddenly your eyes close and when you open them you see:" gmisc_banish1 =\ +/def -i -F -ag -msimple -Embanish_st -t"Suddenly your eyes close and when you open them you see:" gmisc_banish1 =\ /msr Got banished!%;/set mbanish_st=0 @@ -2385,7 +2385,7 @@ /def -i -ag -mregexp -t"^It contains ([a-z0-9 ,]+)$" gpurse_rep2 =\ /set gpursec_st=1%;/set gpursec_match=%{P1} -/def -i -ag -E(gpursec_st==1) -mregexp -t"^([a-z0-9 ,]*)coins\.$" gpurse_rep3 =\ +/def -i -ag -Egpursec_st -mregexp -t"^([a-z0-9 ,]*)coins\.$" gpurse_rep3 =\ /set gpursec_st=0%;/set gpursec_match=%{gpursec_match} %{P1}%;/gpurse_report @@ -2418,7 +2418,7 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Camping / lullaby / etc. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -/def -i -F -p9999 -aCgreen -mregexp -t"^You (stretch yourself and consider about camping|feel a bit tired|feel like camping a little)" gcamp_ready =\ +/gdef -i -F -p9999 -aCgreen -mregexp -t"^You (stretch yourself and consider about camping|feel a bit tired|feel like camping a little)" gcamp_ready =\ /set camp_st=1%;\ /gstatus_update%;\ /msr Can camp again @@ -2431,13 +2431,13 @@ /set camp_ep=%{status_ep}%;\ /set camp_time=$[time()] -/def -i -F -p9999 -aCgreen -msimple -t"You lie down and begin to rest for a while." gcamp_start1 =\ +/gdef -i -F -p9999 -aCgreen -msimple -t"You lie down and begin to rest for a while." gcamp_start1 =\ /gcamp_start -/def -i -F -p9999 -aCgreen -mregexp -t"^You lie down for a short rest, soothed by the lullaby sung by " gcamp_start2 =\ +/gdef -i -F -p9999 -aCgreen -mregexp -t"^You lie down for a short rest, soothed by the lullaby sung by " gcamp_start2 =\ /gcamp_start -/def -i -F -p9999 -aCgreen -msimple -t"You awaken from your short rest, and feel slightly better." gcamp_end =\ +/gdef -i -F -p9999 -aCgreen -msimple -t"You awaken from your short rest, and feel slightly better." gcamp_end =\ /if (camp_st == 2)\ /set camp_st=0%;\ /gstatus_update%;\ @@ -2447,7 +2447,7 @@ /gmsg_empty_que%;\ /endif -/def -i -F -p9999 -aCgreen -msimple -t"You wake up!" gcamp_interrupt =\ +/gdef -i -F -p9999 -aCgreen -msimple -t"You wake up!" gcamp_interrupt =\ /if (camp_st == 2)\ /set camp_st=0%;\ /gstatus_update%;\ @@ -2522,7 +2522,7 @@ ;; FIXME: What if torso is not the last slot listed? How to elegantly print ;; the bottom of the table? -/def -i -p9999 -msimple -t"Your current armour status is:" gslots_mangle1 =\ +/def -i -F -p9999 -msimple -t"Your current armour status is:" gslots_mangle1 =\ /substitute -ag%;\ /set slots_st=1%;\ /set slots_ftotal=0%;\ @@ -2559,13 +2559,13 @@ /endif%;\ /mss | @{%{_tcol}}$[pad(_tnum,5)]@{n} | $[pad(_tslot,-15)] | @{Cyellow}%{_titem}@{n} -/def -i -E(slots_st==1) -p9999 -mregexp -t"^ You have (.*) free ([a-z]*) slots?\.?$" gslots_mangle2 =\ +/def -i -F -Eslots_st -p9999 -mregexp -t"^ You have (.*) free ([a-z]*) slots?\.?$" gslots_mangle2 =\ /test gslots_output({P2},{P1},"") -/def -i -E(slots_st==1) -p9999 -mregexp -t"^ You have (.*) free ([a-z]*) slots? \[(.*)\]$" gslots_mangle3 =\ +/def -i -F -Eslots_st -p9999 -mregexp -t"^ You have (.*) free ([a-z]*) slots? \[(.*)\]$" gslots_mangle3 =\ /test gslots_output({P2},{P1},{P3}) -/def -i -E(slots_st==1) -p9999 -mregexp -t"^$" gslots_mangle4 =\ +/def -i -F -Eslots_st -p9999 -mregexp -t"^$" gslots_mangle4 =\ /set slots_st=0%;\ /msw +-------------------------+%;\ /msw | Total free: @{BCgreen}$[pad(slots_ftotal,-11)]@{n} |%;\