view ggrtf-barb.tf @ 801:c421eeea6794 rel-0_6_9_11

v0.6.9.11
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 13 Oct 2008 14:14:38 +0000
parents 8870fc4796ce
children 00b9b52a561a
line wrap: on
line source

;;
;; GgrTF::Barbarian - Barbarian guild support @ BatMUD
;; (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.
;;
;; NOTICE! This file requires GgrTF (version 0.6.0 or later) to be loaded.
;;
/loaded GgrTF::Barbarian
/set gmodule=Barbarian

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Bindings
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
/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


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Fails and fumbles
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
/prdeffail -k -f -r -t"^You jump up and begin dancing, but you"
/prdeffail -k -f -r -t"^You fail to start the fire."
/prdeffail -k -F -r -t"^You jump up and begin dancing, but after"


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Reputation bar translator
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
/set repu_cur=0

/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%;\
		/set repu_old=%{repu_cur}%;\
		/set repu_cur=%{_repval}%;\
		/msw Reputation: @{BCwhite}%{repu_cur}@{n} $[prgetdiff(repu_cur,repu_old)]%;\
	/else \
		/msw Reputation: @{BCwhite}%{_repval}@{n} [@{BCred}%{P1}@{nBCgreen}$[replace("@","@@",{P2})]@{nCgreen}%{P3}@{nBCyellow}%{P4}@{nCyellow}%{P5}@{n}]%;\
	/endif

/def showrep =\
	/set repu_gag=1%;\
	@grep '[[]' barbarian binfo %{set_plrname}%;\


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Looting and burning
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
/eval /set event_skill_intr=%{event_skill_intr} gburn_intr

/prdefsetting -n"burnaction" -d"What items are dropped after burn" -s"off cash noeq"
/burnaction off

/def -i -mregexp -t"^You (join [A-Z][a-z]+ in (his|her|its) looting and burning|run around the room, waving your torch about)" gburn_done =\
	/showrep%;\
	@@extinguish torch%;\
	/if (set_burnaction=~"cash") @@drop copper,tin,zinc,mowgles,bronze,silver%;/endif%;\
	/if (set_burnaction=~"noeq") @@drop noeq%;@@drop copper,tin,zinc,mowgles,bronze,silver%;/endif

/def -i gburn_intr =\
	/if (burn_st & skill_st2=~"on")\
		@@extinguish torch%;\
		/set burn_st=0%;\
	/endif

/def -i gburn_drop =\
	/if (burn_st)\
		/set burn_st=0%;\
		@@drop all corpse%;\
	/endif

/def lootburn =\
	/set burn_st=1%;\
	/msr Burning corpses!%;\
	@@light torch%;\
	/gburn_drop%;\
	@@barbburn


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Lure translator
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;/def -i glure_report =\
;	@@emote %{glure_match}

;/def -i -ag -mregexp -t"^You valiantly strike back at (.+)$" glure_get1 =\
;	/set glure_match=%{P1}%;/set glure_st=1

;/def -i -ag -Eglure_st==1 -mregexp -t"^(.+) gets knocked down to the ground\.$" glure_get2 =\
;	/set glure_st=0%;/set glure_match=%{glure_match} %{P1}%;/glure_report