/def -F -t'You slash into*' t_critical_1 = /test ++v_critical_1x /def -F -t'You swing*' t_critical_2 = /test ++v_critical_1x /def -F -t'Lightning-quick, you jab*' t_critical_3 = /test ++v_critical_1x /def -F -t'You viciously jab*' t_critical_4 = /test ++v_critical_1x /if (!isvar('v_critical_1x')) /set v_critical_1x=0 %; /endif /if (!isvar('v_critical_2x')) /set v_critical_2x=0 %; /endif /if (!isvar('v_critical_4x')) /set v_critical_4x=0 %; /endif /if (!isvar('v_critical_8x')) /set v_critical_8x=0 %; /endif /if (!isvar('v_critical_16x')) /set v_critical_16x=0 %; /endif /if (!isvar('v_critical_32x')) /set v_critical_32x=0 %; /endif /def -F -mregexp -t'^You have scored an? (.*) (hit|HIT)(!|!!!)$' t_critical_get = \ /if (strstr({P1}, "CRUSHING") > -1) \ /test ++v_critical_4x %; \ /elseif (strstr({P1}, "OBLITERATING") > -1) \ /test ++v_critical_8x %; \ /elseif (strstr({P1}, "ANNIHILATINGLY") > -1) \ /test ++v_critical_16x %; \ /elseif (strstr({P1}, "WORLD") > -1) \ /test ++v_critical_32x %; \ /else \ /test ++v_critical_2x %; \ /endif %; \ /def crits_reset = \ /quote -S /set `"/listvar -s v_critical_*"=0 %; \ /def crits = \ /let total_criticals=$[v_critical_2x + v_critical_4x + v_critical_8x + v_critical_16x + v_critical_32x] %; \ /let non_criticals=$[v_critical_1x - total_criticals] %; \ /let total_damage=$[non_criticals + v_critical_2x*2 + v_critical_4x*4 + v_critical_8x*8 + v_critical_16x*16 + v_critical_32x*32] %; \ /eval /echo -p @{nCyellow}hits : @{nCwhite}%v_critical_1x %; \ /eval /echo -p @{nCyellow}criticals : @{nCwhite}%total_criticals %; \ /eval /echo -p @{nCyellow}critical % : @{nCwhite}$[substr(total_criticals * 100.0 / v_critical_1x, 0, 5)]%% %; \ /eval /echo -p @{nCyellow}damage / hit : @{nCwhite}$[substr(total_damage * 1.0 / v_critical_1x, 0, 4)] %; \ /echo %; \ /eval /echo -p @{nCyellow}critical : @{nCwhite}%v_critical_2x %; \ /eval /echo -p @{nCyellow}crushing : @{nCwhite}%v_critical_4x %; \ /eval /echo -p @{nCyellow}obliterating : @{nCwhite}%v_critical_8x %; \ /eval /echo -p @{nCyellow}annihilating : @{nCwhite}%v_critical_16x %; \ /eval /echo -p @{nCyellow}world : @{nCwhite}%v_critical_32x %; \ /def cr = \ /let normal=1000 %; \ /let crit1=$[normal*{1}] %; \ /let normal=$[normal-crit1] %; \ /let crit2=$[crit1*{1}] %; \ /let crit1=$[crit1-crit2] %; \ /let crit3=$[crit2*{1}] %; \ /let crit2=$[crit2-crit3] %; \ /let crit4=$[crit3*{1}] %; \ /let crit3=$[crit3-crit4] %; \ /let crit5=$[crit4*{1}] %; \ /let crit4=$[crit4-crit5] %; \ /eval /echo -p @{nCyellow}normal: @{nCwhite}$[normal*1.0] %; \ /eval /echo -p @{nCyellow}crit1 : @{nCwhite}$[crit1*1.0] %; \ /eval /echo -p @{nCyellow}crit2 : @{nCwhite}$[crit2*1.0] %; \ /eval /echo -p @{nCyellow}crit3 : @{nCwhite}$[crit3*1.0] %; \ /eval /echo -p @{nCyellow}crit4 : @{nCwhite}$[crit4*1.0] %; \ /eval /echo -p @{nCyellow}crit5 : @{nCwhite}$[crit5*1.0] %; \ /eval /echo -p @{nCyellow}dam : @{nCwhite}$[(normal + crit1*2 + crit2*4 + crit3*8 + crit4*16 + crit5*32) / 1000.0]