changeset 377:97bae5a28498

v0.5.11.0: Removed bindings module, moved bindings to respective modules where they "mostly" belong to; Added new conjurer guild module, only bindings there for now; Cleanups; Fixed 'earth blood' prot support; Added new 'opt_bindings' pre-init variable, which controls whether the default bindings will be loaded or not.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 03 Apr 2006 00:05:53 +0000
parents ff002bd6ced6
children a8bd6e045cef
files ggrtf-barb.tf ggrtf-binds.tf ggrtf-conjurer.tf ggrtf-hc.tf ggrtf-magical.tf ggrtf-misc.tf ggrtf-rais.tf ggrtf-spellnames.tf ggrtf.tf
diffstat 9 files changed, 191 insertions(+), 144 deletions(-) [+]
line wrap: on
line diff
--- a/ggrtf-barb.tf	Tue Mar 28 15:50:59 2006 +0000
+++ b/ggrtf-barb.tf	Mon Apr 03 00:05:53 2006 +0000
@@ -1,6 +1,6 @@
 ;;
 ;; GgrTF::Barbarian - Barbarian guild support @ BatMUD
-;; (C) Copyright 2005 Jarkko Vääräniemi (Jeskko) & Matti Hämäläinen (Ggr)
+;; (C) Copyright 2005-2006 Jarkko Vääräniemi (Jeskko) & Matti Hämäläinen (Ggr)
 ;;
 ;; This file (triggerset) is Free Software distributed under
 ;; GNU General Public License version 2.
@@ -10,6 +10,25 @@
 /loaded GgrTF::Barbarian
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Bindings
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+/if (opt_bindings=~"on")\
+	/prdefgbind -s"repu"	-c"/showrep"		-n%;\
+	/prdefgbind -s"lb"	-c"/lootburn"		-n%;\
+	/prdefgbind -s"burn"	-c"/lootburn"		-n%;\
+	/prdefsbind -s"er"	-c"Enrage"		-n%;\
+	/prdefsbind -s"fa"	-c"First Aid"%;\
+	/prdefsbind -s"bcry" 	-c"Battlecry"%;\
+	/prdefsbind -s"lure"	-c"Lure"%;\
+	/prdefsbind -s"pain"	-c"Pain Threshold"	-n%;\
+	/prdefsbind -s"toxi"	-c"Toxic Immunity"	-n%;\
+	/prdefsbind -s"fwal"	-c"Fire Walking"	-n%;\
+	/prdefsbind -s"ctol"	-c"Cold Tolerance"	-n%;\
+	/prdefsbind -s"camp"	-c"Camping"	-n%;\
+/endif
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Fails and fumbles
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 /def -i -aCred -mregexp -t"^You jump up and begin dancing, but you" bskill_fail1 = /gskill_fail
@@ -18,29 +37,13 @@
 
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Command binds
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-/prdefgbind -s"lb"	-c"/lb"
-/prdefgbind -s"burn"	-c"/lb"
-/prdefsbind -s"er"	-c"Enrage"	-n
-/prdefsbind -s"fa"	-c"First Aid"
-/prdefsbind -s"bcry" 	-c"Battlecry"
-/prdefsbind -s"lure"	-c"Lure"
-/prdefsbind -s"fire"	-c"Fire Building"	-n
-/prdefsbind -s"pain"	-c"Pain Threshold"	-n
-/prdefsbind -s"toxi"	-c"Toxic Immunity"	-n
-/prdefsbind -s"fwal"	-c"Fire Walking"	-n
-/prdefsbind -s"ctol"	-c"Cold Tolerance"	-n
-/prdefsbind -s"camp"	-c"Camping"	-n
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Reputation bar translator
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 /set repu_cur=0
 
-/def -i -ag -msimple -t"Reputation bar:" barp_rep5
-/def -i -ag -mregexp -t"^\[(X*)(@*)(#*)(:*)(\.*)\]$" barb_rep6 =\
+/def -i -ag -msimple -t"Reputation bar:" grepu_get1
+
+/def -i -ag -mregexp -t"^\[(X*)(@*)(#*)(:*)(\.*)\]$" grepu_get2 =\
 	/let _repval=$[(strlen({P1})*10000) + (strlen({P2})*1000) + (strlen({P3})*100) + (strlen({P4})*10) + strlen({P5})]%;\
 	/if (repu_gag)\
 		/set repu_gag=0%;\
@@ -51,10 +54,11 @@
 		/msw Reputation: @{BCwhite}%{_repval}@{n} [@{BCred}%{P1}@{nBCgreen}$[replace("@","@@",{P2})]@{nCgreen}%{P3}@{nBCyellow}%{P4}@{nCyellow}%{P5}@{n}]%;\
 	/endif
 
-/def repu =\
+/def -i showrep =\
 	/set repu_gag=1%;\
 	@grep '[[]' barbarian binfo %{set_plrname}%;\
 
+
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Looting and burning
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -81,7 +85,7 @@
 		@drop all corpse%;\
 	/endif
 
-/def lb =\
+/def -i lootburn =\
 	/set burn_st=1%;\
 	@light torch%;\
 	@use looting and burning%;\
@@ -100,3 +104,4 @@
 
 /def -i -ag -E(glure_st==1) -mregexp -t"^(.+) gets knocked down to the ground\.$" glure_get2 =\
 	/set glure_st=0%;/set glure_match=%{glure_match} %{P1}%;/glure_report
+
--- a/ggrtf-binds.tf	Tue Mar 28 15:50:59 2006 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +0,0 @@
-;;
-;; GgrTF::Binds - Module for hooks and bindings
-;; (C) Copyright 2006 Matti Hämäläinen (Ggr)
-;;
-;; This file (triggerset) is Free Software distributed under
-;; GNU General Public License version 2.
-;;
-;; NOTICE! This file requires GgrTF (version 0.5.0 or later) to be loaded.
-;;
-/loaded GgrTF::Binds
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; This file contains completely optional "bindings" for some GgrTF
-;; commands and BatMUD spells. They are actually TF hooks, which grab
-;; certain input to execute more complex commands instead. Example:
-;;
-;; "aoa ggr" would result following commands to be executed:
-;;
-;; party report Armour of Aether -> ggr
-;; cast 'armour of aether' ggr
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; General / miscellaneous
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-/prdefgbind -s"cere"		-c"/ceremony"
-
-/prdefcbind -s"seemagic"	-c"See Magic"
-/prdefcbind -s"seeinvis"	-c"See Invisible"
-/prdefcbind -s"ww"		-c"Water Walking"
-/prdefcbind -s"float"		-c"Floating"
-/prdefcbind -s"invis"		-c"Invisibility"
-/prdefcbind -s"ad"		-c"Aura Detection"
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Conjurer
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Misc
-/prdefcbind -s"rdisp"	-c"Resist Dispel"
-/prdefcbind -s"sop"	-c"Shield of Protection"
-/prdefcbind -s"bi"	-c"Blurred Image"
-/prdefcbind -s"disp"	-c"Displacement"
-/prdefcbind -s"shelter"	-c"Shelter"		-n	-d"Sheltering ..."
-/prdefcbind -s"dmp"	-c"Dispel Magical Protection"
-/prdefcbind -s"nf"	-c"Neutralize Field"	-n
-/prdefcbind -s"mi"	-c"Mirror Image"
-/prdefcbind -s"iw"	-c"Iron Will"
-/prdefcbind -s"rentr"	-c"Resist Entropy"
-
-;; Minor typeprots
-/prdefcbind -s"fabs"	-c"Force Absorption"
-/prdefcbind -s"cmana"	-c"Magic Dispersion"
-/prdefcbind -s"cpoison"	-c"Toxic Dilution"
-/prdefcbind -s"ccold"	-c"Frost Insulation"
-/prdefcbind -s"cfire"	-c"Heat Reduction"
-/prdefcbind -s"cacid"	-c"Corrosion Shield"
-/prdefcbind -s"celec"	-c"Energy Channeling"
-/prdefcbind -s"casphyx"	-c"Ether Boundary"
-/prdefcbind -s"cpsi"	-c"Psychic Sanctuary"
-
-;; Major typeprots
-/prdefcbind -s"aoa"	-c"Armour of Aether"
-/prdefcbind -s"mmana"	-c"Repulsor Aura"
-/prdefcbind -s"mpoison"	-c"Shield of Detoxification"
-/prdefcbind -s"mcold"	-c"Frost Shield"
-/prdefcbind -s"mfire"	-c"Flame Shield"
-/prdefcbind -s"macid"	-c"Acid Shield"
-/prdefcbind -s"melec"	-c"Lightning Shield"
-/prdefcbind -s"masphyx"	-c"Aura of Wind"
-/prdefcbind -s"mpsi"	-c"Psionic Phalanx"
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ggrtf-conjurer.tf	Mon Apr 03 00:05:53 2006 +0000
@@ -0,0 +1,49 @@
+;;
+;; GgrTF::Conjurer - Conjurer guild support @ BatMUD
+;; (C) Copyright 2006 Matti Hämäläinen (Ggr)
+;;
+;; This file (triggerset) is Free Software distributed under
+;; GNU General Public License version 2.
+;;
+;; NOTICE! This file requires GgrTF (version 0.5.10 or later) to be loaded.
+;;
+/loaded GgrTF::Conjurer
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Bindings
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+/if (opt_bindings=~"on")\
+	/prdefcbind -s"rdisp"	-c"Resist Dispel"%;\
+	/prdefcbind -s"sop"	-c"Shield of Protection"%;\
+	/prdefcbind -s"bi"	-c"Blurred Image"%;\
+	/prdefcbind -s"disp"	-c"Displacement"%;\
+	/prdefcbind -s"shelter"	-c"Shelter"		-n	-d"Sheltering ..."%;\
+	/prdefcbind -s"dmp"	-c"Dispel Magical Protection"%;\
+	/prdefcbind -s"nf"	-c"Neutralize Field"	-n%;\
+	/prdefcbind -s"mi"	-c"Mirror Image"%;\
+	/prdefcbind -s"iw"	-c"Iron Will"%;\
+	/prdefcbind -s"rentr"	-c"Resist Entropy"%;\
+	/prdefcbind -s"fabs"	-c"Force Absorption"%;\
+	/prdefcbind -s"cmana"	-c"Magic Dispersion"%;\
+	/prdefcbind -s"cpoison"	-c"Toxic Dilution"%;\
+	/prdefcbind -s"ccold"	-c"Frost Insulation"%;\
+	/prdefcbind -s"cfire"	-c"Heat Reduction"%;\
+	/prdefcbind -s"cacid"	-c"Corrosion Shield"%;\
+	/prdefcbind -s"celec"	-c"Energy Channeling"%;\
+	/prdefcbind -s"casphyx"	-c"Ether Boundary"%;\
+	/prdefcbind -s"cpsi"	-c"Psychic Sanctuary"%;\
+	/prdefcbind -s"aoa"	-c"Armour of Aether"%;\
+	/prdefcbind -s"mmana"	-c"Repulsor Aura"%;\
+	/prdefcbind -s"mpoison"	-c"Shield of Detoxification"%;\
+	/prdefcbind -s"mcold"	-c"Frost Shield"%;\
+	/prdefcbind -s"mfire"	-c"Flame Shield"%;\
+	/prdefcbind -s"macid"	-c"Acid Shield"%;\
+	/prdefcbind -s"melec"	-c"Lightning Shield"%;\
+	/prdefcbind -s"masphyx"	-c"Aura of Wind"%;\
+	/prdefcbind -s"mpsi"	-c"Psionic Phalanx"%;\
+/endif
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Initialization and options
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
--- a/ggrtf-hc.tf	Tue Mar 28 15:50:59 2006 +0000
+++ b/ggrtf-hc.tf	Mon Apr 03 00:05:53 2006 +0000
@@ -1,6 +1,6 @@
 ;;
 ;; GgrTF::HC - Hardcore BatMUD support module
-;; (C) Copyright 2005 Matti Hämäläinen (Ggr)
+;; (C) Copyright 2005-2006 Matti Hämäläinen (Ggr)
 ;;
 ;; This file (triggerset) is Free Software distributed under
 ;; GNU General Public License version 2.
--- a/ggrtf-magical.tf	Tue Mar 28 15:50:59 2006 +0000
+++ b/ggrtf-magical.tf	Mon Apr 03 00:05:53 2006 +0000
@@ -10,6 +10,19 @@
 /loaded GgrTF::Magical
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Bindings
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+/if (opt_bindings=~"on")\
+	/prdefcbind -s"seemagic"	-c"See Magic"%;\
+	/prdefcbind -s"seeinvis"	-c"See Invisible"%;\
+	/prdefcbind -s"ww"		-c"Water Walking"%;\
+	/prdefcbind -s"float"		-c"Floating"%;\
+	/prdefcbind -s"invis"		-c"Invisibility"%;\
+	/prdefcbind -s"ad"		-c"Aura Detection"%;\
+/endif
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Initialization and options
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 /prdeftoggle -n"rmagic" -d"General magic reporting spam"
@@ -22,7 +35,7 @@
 /eval /def -i mrmagic = /if (opt_rmagic=~"on") %{cmd_rmagic} %%*%%;/endif
 /eval /def -i mrresist = /if (opt_rresist=~"on") %{cmd_rresist} %%*%%;/endif
 /eval /def -i mrrounds =\
-	/if (opt_rrounds=~"on")\
+	/if (opt_rrounds=~"on" & spell_rleft <= set_roundmin)\
 		/if (cast_info_t!~"")\
 			%{cmd_rrounds} %%{cast_info_n} -> %%{cast_info_t} @ %%{spell_rleft}%%;\
 		/else \
@@ -183,7 +196,7 @@
 		/set spell_rcount=%{spell_rleft}%;\
 		/if (battle_st != 0) /mrrounds%;/endif%;\
 	/else \
-		/if (spell_rleft <= set_roundmin) /mrrounds%;/endif%;\
+		/mrrounds%;\
 	/endif
 
 
--- a/ggrtf-misc.tf	Tue Mar 28 15:50:59 2006 +0000
+++ b/ggrtf-misc.tf	Mon Apr 03 00:05:53 2006 +0000
@@ -10,11 +10,23 @@
 /loaded GgrTF:Misc
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Bindings
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+/if (opt_bindings=~"on")\
+	/prdefgbind -s"cere"	-c"/ceremony"		-n%;\
+	/prdefsbind -s"fire"	-c"Fire Building"	-n%;\
+/endif
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Initialization and options
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 /prdeftoggle -n"rmisc" -d"Miscellaneous reporting"
 /set opt_rmisc=on
 
+/prdeftoggle -n"rcda" -d"Combat Damage Analysis reporting"
+/set opt_rcda=on
+
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Consider reporting
@@ -34,12 +46,12 @@
 /def -i -ag -mregexp -t"^The final estimation is that (.*)" consider_final =\
 	/if (cons_st=~"on") \
 		/let cons_val=%{P1}%;\
-		/if (regmatch("doesn't look very dangerous", cons_val)) /set cons_opp=dlvd%;\
-		/elseif (regmatch("fair opponent.", cons_val)) /set cons_opp=fair%;\
-		/elseif (regmatch("nearly equal in power.", cons_val)) /set cons_opp=equal%;\
-		/elseif (regmatch("quite skilled, beware.", cons_val)) /set cons_opp=skilled%;\
-		/elseif (regmatch("much stronger than you, beware.", cons_val)) /set cons_opp=much stronger%;\
-		/elseif (regmatch("has such bulging muscles that your hands tremble.", cons_val)) /set cons_opp=DANGEROUS%;\
+		/if (regmatch("doesn't look", cons_val)) /set cons_opp=dlvd%;\
+		/elseif (regmatch("fair opponent", cons_val)) /set cons_opp=fair%;\
+		/elseif (regmatch("nearly equal", cons_val)) /set cons_opp=equal%;\
+		/elseif (regmatch("quite skilled", cons_val)) /set cons_opp=skilled%;\
+		/elseif (regmatch("much stronger", cons_val)) /set cons_opp=much stronger%;\
+		/elseif (regmatch("has such bulging", cons_val)) /set cons_opp=DANGEROUS%;\
 		/endif%;\
 		/if (cons_exp!~"") /let qtmps=%{cons_exp} exp%;/else /let qtmps=%;/endif%;\
 		/if (cons_opp!~"")\
@@ -54,21 +66,35 @@
 	/endif%;\
 	/set cons_st=off
 
+
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Combat damage analysis
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-/def -i -p9999 -ag -mregexp -t"^([A-Za-z ]+) is defenseless against ([a-zA-Z]+) damage." cda_0 =\
-	/msr %{P1}: 0%% resist against %{P2}
-/def -i -p9999 -ag -mregexp -t"^([A-Za-z ]+) seems to be almost defenseless against ([a-zA-Z]+) damage." cda_20 =\
-	/msr %{P1}: 20%% resist against %{P2}
-/def -i -p9999 -ag -mregexp -t"^([A-Za-z ]+) has some resistance against ([a-zA-Z]+) damage." cda_40 =\
-	/msr %{P1}: 40%% resist against %{P2}
-/def -i -p9999 -ag -mregexp -t"^([A-Za-z ]+) seems to be moderately resistant against ([a-zA-Z]+) damage." cda_60 =\
-	/msr %{P1}: 60%% resist against %{P2}
-/def -i -p9999 -ag -mregexp -t"^([A-Za-z ]+) has good resistance against ([a-zA-Z]+) damage." cda_80 =\
-	/msr %{P1}: 80%% resist against %{P2}
-/def -i -p9999 -ag -mregexp -t"^([A-Za-z ]+) seems almost immune against ([a-zA-Z]+) damage." cda_100 =\
-	/msr %{P1}: 100%% resist against %{P2}
+/def -i gcda_report =\
+	/if (opt_rcda=~"on")\
+		/msr [%{1}]: %{2} resist against %{3}%;\
+	/else \
+		/msq [@{Cgreen}%{1}@{n}]: @{BCcyan}%{2}@{n} resist against @{BCyellow}%{3}@{n}%;\
+	/endif
+
+/def -i -p9999 -ag -mregexp -t"^([A-Za-z ,.'-]+) is defenseless against ([a-zA-Z]+) damage\.$" cda_resist0 =\
+	/test gcda_report({P1},0,{P2})
+
+/def -i -p9999 -ag -mregexp -t"^([A-Za-z ,.'-]+) seems to be almost defenseless against ([a-zA-Z]+) damage\.$" cda_resist20 =\
+	/test gcda_report({P1},20,{P2})
+
+/def -i -p9999 -ag -mregexp -t"^([A-Za-z ,.'-]+) has some resistance against ([a-zA-Z]+) damage\.$" cda_resist40 =\
+	/test gcda_report({P1},40,{P2})
+
+/def -i -p9999 -ag -mregexp -t"^([A-Za-z ,.'-]+) seems to be moderately resistant against ([a-zA-Z]+) damage." cda_resist60 =\
+	/test gcda_report({P1},60,{P2})
+
+/def -i -p9999 -ag -mregexp -t"^([A-Za-z ,.'-]+) has good resistance against ([a-zA-Z]+) damage\.$" cda_resist80 =\
+	/test gcda_report({P1},80,{P2})
+
+/def -i -p9999 -ag -mregexp -t"^([A-Za-z ,.'-]+) seems almost immune against ([a-zA-Z]+) damage\.$" cda_resist100 =\
+	/test gcda_report({P1},100,{P2})
+
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Some special hilites and miscellaneous
@@ -148,6 +174,7 @@
 /def -i -ag -msimple -E(mbanish_st==1) -t"Suddenly your eyes close and when you open them you see:" misc_banish1 =\
 	/msr Got banished!%;/set mbanish_st=0
 
+
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Manglers/calculators for some generic containers
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -365,6 +392,7 @@
 /prdefhit cbbeat BRUTALLY BEAT
 /prdefhit ccdism CRUELLY DISMEMBER
 
+
 ;; Output
 /def -i hstats_print =\
 	/eval /set cnttmp=$$[hst_%{1}]%;\
--- a/ggrtf-rais.tf	Tue Mar 28 15:50:59 2006 +0000
+++ b/ggrtf-rais.tf	Mon Apr 03 00:05:53 2006 +0000
@@ -8,18 +8,30 @@
 ;; NOTICE! This file requires GgrTF (version 0.5.0 or later) to be loaded.
 ;;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Bindings
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+/if (opt_bindings=~"on")\
+	/prdefgbind -s"cclear"	-c"/acpt_clear"%;\
+	/prdefgbind -s"acc"	-c"/acpt_list"%;\
+	/prdefgbind -s"clast"	-c"/acpt_cast"%;\
+/endif
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Helper functions and initialization
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 /set lst_accepted=
 
 /def -i aconvto = /return tolower(replace(" ","_",{1}))
 /def -i aconvfrom = /return replace("_"," ",strcat(toupper(substr({1},0,1)),substr({1},1)))
 /def -i aconvpm = /return replace("_"," ",{1})
 
-/def -i acclist_ins =\
-	/acclist_del_do $[aconvto({1})] %{lst_accepted}%;\
+/def -i gacclist_ins =\
+	/gacclist_del_do $[aconvto({1})] %{lst_accepted}%;\
 	/msq @{BCyellow}%{1}@{n} accepted @{BCgreen}%{2}@{n}!%;\
 	/set lst_accepted=$[aconvto({1})] $[aconvto({2})] $[time()] %{lst_accepted}
 
-/def -i acclist_del_do =\
+/def -i gacclist_del_do =\
 	/let accdtmp=%{1}%;/shift%;\
 	/set lst_accepted=%;\
 	/while ({#})\
@@ -29,12 +41,12 @@
 		/shift%;/shift%;/shift%;\
 	/done
 
-/def -i acclist_del =\
+/def -i gacclist_del =\
 	/msq Removing @{BCyellow}%{1}@{n} from list ...%;\
-	/acclist_del_do $[aconvto({1})] %{lst_accepted}
+	/gacclist_del_do $[aconvto({1})] %{lst_accepted}
 
 
-/def -i acclist_get =\
+/def -i gacclist_get =\
 	/let accgtmp=$[tolower({1})]%;/shift%;\
 	/set acc_name=%;/set acc_method=%;/set acc_time=%;\
 	/while ({#})\
@@ -48,7 +60,7 @@
 	/done
 
 
-/def -i acclist_getfirst =\
+/def -i gacclist_getfirst =\
 	/if ({#})\
 		/set acc_name=$[aconvfrom({1})]%;\
 		/set acc_method=$[aconvpm({2})]%;\
@@ -63,33 +75,35 @@
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Implement actual commands
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-/def -i cclear =\
+/def -i acpt_clear =\
 	/msq Clearing accepted list ...%;\
 	/set lst_accepted=
 
-/def -i acclist_print =\
+
+/def -i gacclist_print =\
 	/while ({#})\
 		/msw | @{BCyellow}$[prsubipad(aconvfrom({1}),15)]@{n} | @{BCgreen}$[prsubpad(aconvpm({2}),20)]@{n} | $[prsubpad(prgetstime({3}),10)] |%;\
 		/shift%;/shift%;/shift%;\
 	/done
 
-/def -i acc =\
+/def -i acpt_list =\
 	/if (lst_accepted!~"")\
 		/msw ,-----------------.%;\
 		/msw | Latest accepted |%;\
 		/msw +-----------------+-----------------------------------.%;\
-		/acclist_print %{lst_accepted}%;\
+		/gacclist_print %{lst_accepted}%;\
 		/msw `-----------------------------------------------------'%;\
 	/else \
 		/msq Nobody has accepted from you!%;\
 	/endif
 
-/def -i clast =\
+
+/def -i acpt_cast =\
 	/if (lst_accepted!~"")\
 		/if ({#} > 0)\
-			/acclist_get %{1} %{lst_accepted}%;\
+			/gacclist_get %{1} %{lst_accepted}%;\
 		/else \
-			/acclist_getfirst %{lst_accepted}%;\
+			/gacclist_getfirst %{lst_accepted}%;\
 		/endif%;\
 		/if (acc_name!~"")\
 			/msq Casting @{BCgreen}%{acc_method}@{n} at @{BCyellow}%{acc_name}@{n}.%;\
@@ -102,18 +116,19 @@
 		/msq Nobody has accepted from you!%;\
 	/endif
 
-/def -i -p9999 -mregexp -t"^You resurrect ([A-Z][a-z]+)\.$" accepted_succ1 =\
-	/test acclist_del({P1})
 
-/def -i -p9999 -mregexp -t"^You raise ([A-Z][a-z]+) from the dead\.$" accepted_succ2 =\
-	/test acclist_del({P1})
+/def -i -p9999 -mregexp -t"^You resurrect ([A-Z][a-z]+)\.$" gacpt_succ1 =\
+	/test gacclist_del({P1})
+
+/def -i -p9999 -mregexp -t"^You raise ([A-Z][a-z]+) from the dead\.$" gacpt_succ2 =\
+	/test gacclist_del({P1})
 
-/def -i -p9999 -mregexp -t"^You create a new body for ([A-Z][a-z]+)\.$" accepted_succ3 =\
-	/test acclist_del({P1})
+/def -i -p9999 -mregexp -t"^You create a new body for ([A-Z][a-z]+)\.$" gacpt_succ3 =\
+	/test gacclist_del({P1})
 
-/def -i -p9999 -ag -mregexp -t"^([A-Z][a-z]+) accepts (raise dead|resurrect|new body|reincarnation|reanimation) from you\.$" accepted_you =\
-	/test acclist_ins({P1},{P2})
+/def -i -p9999 -ag -mregexp -t"^([A-Z][a-z]+) accepts (raise dead|resurrect|new body|reincarnation|reanimation) from you\.$" gacpt_you =\
+	/test gacclist_ins({P1},{P2})
 
-/def -i -p9999 -ag -mregexp -t"^([A-Z][a-z]+) accepted from someone else\.$" accepted_off =\
+/def -i -p9999 -ag -mregexp -t"^([A-Z][a-z]+) accepted from someone else\.$" gacpt_off =\
 	/msq @{BCgreen}%{P1}@{n} @{BCwhite}accepted from someone else!@{n}%;\
-	/test acclist_del({P1})
+	/test gacclist_del({P1})
--- a/ggrtf-spellnames.tf	Tue Mar 28 15:50:59 2006 +0000
+++ b/ggrtf-spellnames.tf	Mon Apr 03 00:05:53 2006 +0000
@@ -546,6 +546,9 @@
 
 
 ; TODO
+; ----
 ; Electric spider utters the magic words 'gimmez a boltz'
 ; - bolt of lightning?
 
+; Glaurung strokes a weapon and says 'The sharper, the sweeter'
+
--- a/ggrtf.tf	Tue Mar 28 15:50:59 2006 +0000
+++ b/ggrtf.tf	Mon Apr 03 00:05:53 2006 +0000
@@ -1,8 +1,8 @@
 ;;
-;; GgrTF v0.5.10.13-svn - TinyFugue script for BatMUD
+;; GgrTF v0.5.11.0-svn - TinyFugue script for BatMUD
 ;; (C) Copyright 2004-2006 Matti Hämäläinen (Ggr Pupunen)
 ;;
-/set ggrtf_ver=0.5.10.13-svn
+/set ggrtf_ver=0.5.11.0-svn
 ;;
 ;; This triggerset is Free Software distributed under
 ;; GNU General Public License version 2.
@@ -55,6 +55,7 @@
 
 /def -i prinitialize =\
 	/prdefvar -n"fmt_date" -v"%%%c" -c"ftime() formatting string used for dates"%;\
+	/prdefvar -n"opt_bindings" -v"off" -c"Whether command bindings are loaded/defined in startup (on/off)"%;\
 	/set battle_target=%;\
 	/set battle_st=0%;\
 	/set spell_st=off%;\
@@ -472,13 +473,17 @@
 ; -c"<command>"	Command/macro to be executed
 ; -m		Use regular expression matching
 /def -i prdefgbind =\
-	/if (!getopts("s:c:m", "")) /gerror Invalid bind creation command!%;/break%;/endif%;\
+	/if (!getopts("s:c:n", "")) /gerror Invalid bind creation command!%;/break%;/endif%;\
 	/if (!prlist_insert("lst_bindings", opt_s)) /gwarning Binding for '%{opt_s}' already defined!%;/endif%;\
 	/set bind_%{opt_s}_n=2%;\
 	/set bind_%{opt_s}_t=G%;\
 	/set bind_%{opt_s}_c=%{opt_c}%;\
-	/if (opt_m) /let _qmatch=-mregexp%;/else /let _qmatch=%;/endif%;\
-	/eval /def -i %{_qmatch} -h"SEND {%{bind_prefix}%{opt_s}}" bind_%{opt_s} = %{opt_c}
+	/if (opt_n)\
+		/let _qs=%;\
+	/else \
+		/let _qs= %%%{-1}%;\
+	/endif%;\
+	/eval /def -i %{_qmatch} -h"SEND {%{bind_prefix}%{opt_s}}*" bind_%{opt_s} = %{opt_c}%{_qs}
 
 
 ;; Define a skill bind with optional party reporting
@@ -1259,7 +1264,7 @@
 /prdefprot -i"flexsh"	-n"FlexSh"	-l"Flex Shield" -u"You sense a flex shield covering your body like a second skin." -d"Your flex shield wobbles, PINGs and vanishes."
 /prdefprot -i"epower"	-n"EPower"	-l"Earth Power" -u"You feel your strength changing. You flex you muscles experimentally." -d"The runic sigla \'% !^\' fade away.. leaving you feeling strange."
 /prdefprot -i"eskin"	-n"ESkin"	-l"Earth Skin" -s -u"You feel your skin harden." -d"Your skin feels softer."
-/prdefprot -i"eblood"	-n"EBlood"	-l"Earth Blood" -A" traces icy blue runes on the ground with his Staff of Druids" -B"druidstaff is surrounded by a sudden cloudburst" -u"An icy chill runs through your veins." -d"The runic sigla \'\!\( \*\)\' fade away.. leaving you feeling strange."
+/prdefprot -i"eblood"	-n"EBlood"	-l"Earth Blood" -A" traces? icy blue runes on the ground with" -B" is surrounded by a sudden cloudburst" -u"An icy chill runs through your veins." -d"The runic sigla \'!( *)\' fade away.. leaving you feeling strange."
 /prdefprot -i"vmant"	-n"Vmant"	-l"Vine Mantle" -s -u"Vines entangle your body." -d"The vines crumbles to dust."
 /prdefprot -i"regen"	-n"Rgn"		-l"Regeneration" -u"You feel your metabolism speed up." -d"You no longer have a active regeneration spell on you."