;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Trigset for counting characters melee stats ;;; ;;; Info: ;;; - Trigset work only when 'Battle 2' is set. ;;; - Trigset works on TF 3.5 and later ;;; - All triggers are set to priority 99 and are usign falltrough, ;;; so if your triggers catch some of combat data, these triggers ;;; shouldn't affect to those (assuming those triggers run with ;;; low priority). ;;; - There is Organ knowledge counter installed ;;; - If you like battle 3, but want to use this trigset, you can ;;; add -ag to each triggerbody. That way output looks like battle 3 ;;; ;;; Created by Sepe 7.4.2004 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Variables /set hitcnt_vhitt=1 /set hitcnt_vhit1=0 /set hitcnt_vhit2=0 /set hitcnt_vhit3=0 /set hitcnt_vhit4=0 /set hitcnt_vhit5=0 /set hitcnt_vhit6=0 /set hitcnt_vhit7=0 /set hitcnt_vmdod=0 /set hitcnt_vpdod=0 /set hitcnt_vppar=0 /set hitcnt_vmpar=0 /set hitcnt_vcrit=0 /set hitcnt_vorga=0 /set hitcnt_vstun=0 /set hitcnt_vmhit=1 /set hitcnt_vnewr=1 /set hitcnt_vbattle=0 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Hitcounter ;;; Puts data to hitcnt_vhitN - where N is number of hits ;;; /undef hitcnt_hit /def -p99 -F -mglob -t'You hit * times.' hitcnt_hit = \ /if /test hitcnt_vbattle=2%;/then \ /set hitcnt_vhitt=$[%{hitcnt_vhitt}+%L2]%;\ /set tmpvar=hitcnt_vhit%L2%;\ /eval /set tmphit=\%%tmpvar%;\ /eval /set %tmpvar=$[%{tmphit}+1]%;/endif ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Monters dodge counter /undef hitcnt_mdod /def -p99 -F -mglob -t'* nimbly dodges your hit.' hitcnt_mdod = \ /if /test hitcnt_vbattle=2%;/then \ /set hitcnt_vmdod=$[%{hitcnt_vmdod}+1]%;/endif ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Monster parry counter /undef hitcnt_mpar /def -p99 -F -mglob -t'* skillfully parries your hit.' hitcnt_mpar = \ /if /test hitcnt_vbattle=2%;/then \ /set hitcnt_vmpar=$[%{hitcnt_vmpar}+1]%;/endif ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Your dodge counter /undef hitcnt_pdod /def -p99 -F -mglob -t'You nimbly dodge *\'s hit.' hitcnt_pdod = \ /if /test hitcnt_vbattle=2%;/then \ /set hitcnt_vpdod=$[%{hitcnt_vpdod}+1]%;/endif ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Your parry counter /undef hitcnt_ppar /def -p99 -F -mglob -t'You skillfully parry *\'s hit.' hitcnt_ppar = \ /if /test hitcnt_vbattle=2%;/then \ /set hitcnt_vppar=$[%{hitcnt_vppar}+1]%;/endif ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Critical counter /undef hitcnt_crit /def -p99 -F -mglob -t'You score a CRITICAL hit!' hitcnt_crit = \ /if /test hitcnt_vbattle=2%;/then \ /set hitcnt_vcrit=$[%{hitcnt_vcrit}+1]%;/endif ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Stun counter /undef hitcnt_stun /def -p99 -F -mglob -t'You STUN *.' hitcnt_stun = \ /if /test hitcnt_vbattle=2%;/then \ /set hitcnt_vstun=$[%{hitcnt_vstun}+1]%;/endif ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Monster hit counter /undef hitcnt_mhit /def -p99 -F -mglob -t'* hits you * times.' hitcnt_mhit = \ /if /test hitcnt_vbattle=2%;/then \ /set hitcnt_vmhit=$[%{hitcnt_vmhit}+%L2]%;/endif ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Monster hit counter /def -p99 -F -mglob -t'You score an extra critical hit due to your organ knowledge.' hitcnt_orga = \ /if /test hitcnt_vbattle=2%;/then \ /set hitcnt_vorga=$[%{hitcnt_vorga}+1]%;/endif ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Battle counter toggler ;;; - Catches info to turn counter on/off, depending on battle level ;;; /undef hitcnt_battleinfo1 /def -p99 -F -mregexp -t'^Your battle verbosity level is set to: ([1-9])\.$' hitcnt_battleinfo1 = \ /set hitcnt_vbattle=%P1 /undef hitcnt_battleinfo2 /def -p99 -F -mregexp -t'^Battle verbosity set to: ([1-9])\.$' hitcnt_battleinfo2 = \ /set hitcnt_vbattle=%P1 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; New round counter ;;; /undef hitcnt_newrnd /def -mglob -p99 -F -t'\*NEW ROUND\*' hitcnt_newrnd = \ /if /test hitcnt_vbattle=2%;/then \ /set hitcnt_vnewr=$[%{hitcnt_vnewr}+1]%;/endif ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Reporting data ;;; ;;; Usage: /hitcnt_repp - for your info only ;;; /hitcnt_repp mud - for pasting data to mud-channel ;;; /undef hitcnt_repp /def hitcnt_repp = \ /let hitcnt_reppvar=%*%;\ /if /test hitcnt_reppvar=~""%;/then \ /echo *----------------------------------------------%;\ /echo | Battle: %hitcnt_vbattle Rounds: %hitcnt_vnewr %;\ /echo | HitsIn: %hitcnt_vmhit \ MyParry: %hitcnt_vppar ($[100-((hitcnt_vmhit-hitcnt_vppar)*100/hitcnt_vmhit)]%%) \ MyDodge %hitcnt_vpdod ($[100-((hitcnt_vmhit-hitcnt_vpdod)*100/hitcnt_vmhit)]%%)%;\ /echo | Crits: %hitcnt_vcrit ($[100-((hitcnt_vhitt-hitcnt_vcrit)*100/hitcnt_vhitt)]%%) \ Organs: %hitcnt_vorga ($[100-((hitcnt_vhitt-hitcnt_vorga)*100/hitcnt_vhitt)]%%) \ Stun: %hitcnt_vstun ($[100-((hitcnt_vhitt-hitcnt_vstun)*100/hitcnt_vhitt)]%%)%;\ /echo | Dodged %hitcnt_vmdod ($[100-((hitcnt_vhitt-hitcnt_vmdod)*100/hitcnt_vhitt)]%%) \ Parried %hitcnt_vmpar ($[100-((hitcnt_vhitt-hitcnt_vmpar)*100/hitcnt_vhitt)]%%)%;\ /echo | 1: $[100-((hitcnt_vnewr-hitcnt_vhit1)*100/hitcnt_vnewr)]%% \ 2: $[100-((hitcnt_vnewr-hitcnt_vhit2)*100/hitcnt_vnewr)]%% \ 3: $[100-((hitcnt_vnewr-hitcnt_vhit3)*100/hitcnt_vnewr)]%% \ 4: $[100-((hitcnt_vnewr-hitcnt_vhit4)*100/hitcnt_vnewr)]%% \ 5: $[100-((hitcnt_vnewr-hitcnt_vhit5)*100/hitcnt_vnewr)]%% \ 6: $[100-((hitcnt_vnewr-hitcnt_vhit6)*100/hitcnt_vnewr)]%% \ 7: $[100-((hitcnt_vnewr-hitcnt_vhit7)*100/hitcnt_vnewr)]%% %;\ /echo *----------------------------------------------%;\ /else \ %hitcnt_reppvar *----------------------------------------------%;\ %hitcnt_reppvar | Battle: %hitcnt_vbattle Rounds: %hitcnt_vnewr %;\ %hitcnt_reppvar | HitsIn: %hitcnt_vmhit \ MyParry: %hitcnt_vppar ($[100-((hitcnt_vmhit-hitcnt_vppar)*100/hitcnt_vmhit)]%%) \ MyDodge %hitcnt_vpdod ($[100-((hitcnt_vmhit-hitcnt_vpdod)*100/hitcnt_vmhit)]%%)%;\ %hitcnt_reppvar | Crits: %hitcnt_vcrit ($[100-((hitcnt_vhitt-hitcnt_vcrit)*100/hitcnt_vhitt)]%%) \ Organs: %hitcnt_vorga ($[100-((hitcnt_vhitt-hitcnt_vorga)*100/hitcnt_vhitt)]%%) \ Stun: %hitcnt_vstun ($[100-((hitcnt_vhitt-hitcnt_vstun)*100/hitcnt_vhitt)]%%)%;\ %hitcnt_reppvar | Dodged %hitcnt_vmdod ($[100-((hitcnt_vhitt-hitcnt_vmdod)*100/hitcnt_vhitt)]%%) \ Parried %hitcnt_vmpar ($[100-((hitcnt_vhitt-hitcnt_vmpar)*100/hitcnt_vhitt)]%%)%;\ %hitcnt_reppvar | 1: $[100-((hitcnt_vnewr-hitcnt_vhit1)*100/hitcnt_vnewr)]%% \ 2: $[100-((hitcnt_vnewr-hitcnt_vhit2)*100/hitcnt_vnewr)]%% \ 3: $[100-((hitcnt_vnewr-hitcnt_vhit3)*100/hitcnt_vnewr)]%% \ 4: $[100-((hitcnt_vnewr-hitcnt_vhit4)*100/hitcnt_vnewr)]%% \ 5: $[100-((hitcnt_vnewr-hitcnt_vhit5)*100/hitcnt_vnewr)]%% \ 6: $[100-((hitcnt_vnewr-hitcnt_vhit6)*100/hitcnt_vnewr)]%% \ 7: $[100-((hitcnt_vnewr-hitcnt_vhit7)*100/hitcnt_vnewr)]%% %;\ %hitcnt_reppvar *----------------------------------------------%;\ /endif ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Setting battle level when this trigset is loaded /eval !battle