Difference between revisions of "Talk:Zmud Damage Counter"

From AvatarWiki
Jump to navigation Jump to search
m
m (no terminal bug fix)
Line 20: Line 20:
 
Version 2 is done, have a few people testing it before I put it here(1/15) - Everman
 
Version 2 is done, have a few people testing it before I put it here(1/15) - Everman
  
test version 2.04:
+
test version 2.05:
  
 
  #CLASS {dcounter}
 
  #CLASS {dcounter}
Line 27: Line 27:
 
  #ALIAS dcclear {#FO @DCtrack {#UNVAR %i};#VAR DCtrack "you";#VAR DCnames "";dcadd your;#ECHO Damagecounter reset. Please re-add groupies.}
 
  #ALIAS dcclear {#FO @DCtrack {#UNVAR %i};#VAR DCtrack "you";#VAR DCnames "";dcadd your;#ECHO Damagecounter reset. Please re-add groupies.}
 
  #ALIAS dcrep2 {#if (!@DCreport) {dcrepto};#YESNO "Who would you like to report for?" {Yourself:#VAR DC.reportfor "your"} {Everyone:#VAR DC.reportfor @DCnames} {Partial:#VAR DC.reportfor %pick( p:Who would you like to display reports for?:, @DCnames)};#LOOPDB @you {#var your.%key %eval( %db( @your, %key) + %val)};#var you "";#FO @DC.reportfor {#var %i.out "";#FO @dverbshort {#if (%db( @{%i}, %I)) {#var %i.out %concat( %db( @{%i}, out), " ", %I, ~(, ~|c~|, %db( @{%i}, %I), ~|n~|, ~))}};@DC.repto Breakdown for %if( %i="your", Myself, %upper( %left( %i, 1))%right( %i, 1)):%db( @{%i}, out)}}
 
  #ALIAS dcrep2 {#if (!@DCreport) {dcrepto};#YESNO "Who would you like to report for?" {Yourself:#VAR DC.reportfor "your"} {Everyone:#VAR DC.reportfor @DCnames} {Partial:#VAR DC.reportfor %pick( p:Who would you like to display reports for?:, @DCnames)};#LOOPDB @you {#var your.%key %eval( %db( @your, %key) + %val)};#var you "";#FO @DC.reportfor {#var %i.out "";#FO @dverbshort {#if (%db( @{%i}, %I)) {#var %i.out %concat( %db( @{%i}, out), " ", %I, ~(, ~|c~|, %db( @{%i}, %I), ~|n~|, ~))}};@DC.repto Breakdown for %if( %i="your", Myself, %upper( %left( %i, 1))%right( %i, 1)):%db( @{%i}, out)}}
  #ALIAS dcrep1 {#if (!@DC.repto) {dcrepto};#YESNO "Who would you like to report for?" {Yourself:#VAR DC.reportfor "your"} {Everyone:#VAR DC.reportfor @DCnames} {Partial:#VAR DC.reportfor %pick( p:Who would you like to display reports for?:, @DCnames)};#LOOPDB @you {#var your.%key %eval( %db( @your, %key) + %val)};#var you "";#var DC.total 0;#var DC.taken 0;#var DC.totalcount 0;#var DC.takencount 0;#FO @DCnames {#if ( %db( @{%i}, terminal)) {#var %i.total %eval( %db( @{%i}, dealt) + %db( @{%i}, dealt)/(%db( @{%i}, attacks) - %db( @{%i}, terminal))* %db( @{%i}, terminal))} {#var %i.total %db( @{%i}, dealt)};#if (@DC.total < %db( @{%i}, total)) {#var DC.total %db( @{%i}, total)};#if (@DC.taken < %db( @{%i}, taken)) {#var DC.taken %db( @{%i}, taken)};#var DC.totalcount %eval( @DC.totalcount + %db( @{%i}, total));#var DC.takencount %eval( @DC.takencount + %db( @{%i}, taken))};#FO @DC.reportfor {#var %i.verb %item( @dverbs, %eval( @verbBinary(1,139,%eval(%db(@{%i},dealt)/(%db(@{%i},attacks)- %db( @{%i}, terminal)))) -1));@DC.repto %if( %i="your", I, %upper( %left( %i, 1))%right( %i, 1)): Dealt->%if( %db( @{%i}, total) = @DC.total, ~|bc~|, ~|c~|)%db( @{%i}, total)|n|~(%eval( %db( @{%i}, total)*100/@DC.totalcount)%~) Averaged~[|bk|%replace( %db( @{%i}, verb), "=", "-")|n|~] Took->%if( %db( @{%i}, taken) = @DC.taken, ~|br~|, ~|r~|)%db( @{%i}, taken)|n|~(%eval( %db( @{%i}, taken)*100/@DC.takencount)%~)}}
+
  #ALIAS dcrep1 {#if (!@DC.repto) {dcrepto};#YESNO "Who would you like to report for?" {Yourself:#VAR DC.reportfor "your"} {Everyone:#VAR DC.reportfor @DCnames} {Partial:#VAR DC.reportfor %pick( p:Who would you like to display reports for?:, @DCnames)};#LOOPDB @you {#var your.%key %eval( %db( @your, %key) + %val)};#var you "";#var DC.total 0;#var DC.taken 0;#var DC.totalcount 0;#var DC.takencount 0;#FO @DCnames {#if ( %db( @{%i}, terminal)) {#var %i.total %eval( %db( @{%i}, dealt) + %db( @{%i}, dealt)/(%db( @{%i}, attacks) - %db( @{%i}, terminal))* %db( @{%i}, terminal))} {#var %i.total %db( @{%i}, dealt)};#if (@DC.total < %db( @{%i}, total)) {#var DC.total %db( @{%i}, total)};#if (@DC.taken < %db( @{%i}, taken)) {#var DC.taken %db( @{%i}, taken)};#var DC.totalcount %eval( @DC.totalcount + %db( @{%i}, total));#var DC.takencount %eval( @DC.takencount + %db( @{%i}, taken))};#FO @DC.reportfor {#if ( %db( @{%i}, terminal)) {#var %i.verb %item( @dverbs, %eval( @verbBinary(1,139,%eval(%db(@{%i},dealt)/(%db(@{%i},attacks)- %db( @{%i}, terminal)))) -1))} {#var %i.verb %item( @dverbs, %eval( @verbBinary(1,139,%eval(%db(@{%i},dealt)/%db(@{%i},attacks))) -1))};@DC.repto %if( %i="your", I, %upper( %left( %i, 1))%right( %i, 1)): Dealt->%if( %db( @{%i}, total) = @DC.total, ~|bc~|, ~|c~|)%db( @{%i}, total)|n|~(%eval( %db( @{%i}, total)*100/@DC.totalcount)%~) Averaged~[|bk|%replace( %db( @{%i}, verb), "=", "-")|n|~] Took->%if( %db( @{%i}, taken) = @DC.taken, ~|br~|, ~|r~|)%db( @{%i}, taken)|n|~(%eval( %db( @{%i}, taken)*100/@DC.takencount)%~)}}
 
  #ALIAS dcs {dcclear;#if (!@DCreport) {@DCreport = gt} {};#t+ "%w is leading (%d) player[ s]with";groupstat}
 
  #ALIAS dcs {dcclear;#if (!@DCreport) {@DCreport = gt} {};#t+ "%w is leading (%d) player[ s]with";groupstat}
 
  #ALIAS dcrepto {#prompt DC.repto "Enter the channel to output to, eg gt, say ect."}
 
  #ALIAS dcrepto {#prompt DC.repto "Enter the channel to output to, eg gt, say ect."}

Revision as of 17:02, 19 January 2008

Heh. Looks nice. With the help of Ttak, this has been upgraded! It now also counts spell damage (for significant spells). Changed code would be:

#TRIGGER {^(%w)[^>;]{strike|strikes|hits|blast|blasts|pierce|smash|backstab|bash|maelstrom|Meteor Swarm|acid rain|disintegrate|brimstone|cataclysm|ultrablast|field of death} (%w)[^>;]with([* ])(%w)[* ]%w[!.]} {#IF {%ismember( %lower( %1), @DClist)} {#VAR %lower( %1) %replaceitem( %eval( %item( @damagevalues, %ismember( %concat( %4, %3), @damageverbs))+%item( @{%lower( %1)}, 17)), 17, @{%lower( %1)});#VAR %lower( %1) %replaceitem( %eval( %item( @{%lower( %1)}, %eval( %ismember( %lower( %4), @damageverbshort)+1))+1) , %eval( %ismember( %lower( %4), @damageverbshort)+1) , @{%lower( %1)})};#IF {%ismember( %lower( %2), @DClist)} {#VAR %lower( %2) %replaceitem( %eval( %item( @damagevalues, %ismember( %concat( %4, %3), @damageverbs))+%item( @{%lower( %2)}, 18)), 18, @{%lower( %2)})};#IF {%lower( %2) = "you"} {#VAR %lower( your) %replaceitem( %eval( %item( @damagevalues, %ismember( %concat( %4, %3), @damageverbs))+%item( @{%lower( your)}, 18)), 18, @{%lower( your)})};#IF {%lower( %1) = "you"} {#VAR %lower( your) %replaceitem( %eval( %item( @damagevalues, %ismember( %concat( %4, %3), @damageverbs))+%item( @{%lower( your)}, 17)), 17, @{%lower( your)});#VAR %lower( your) %replaceitem( %eval( %item( @{%lower( your)}, %eval( %ismember( %lower( %4), @damageverbshort)+1))+1) , %eval( %ismember( %lower( %4), @damageverbshort)+1) , @{%lower( your)})}}

Basically, another #IF is added that checks when %1 is "you" and adds the numbers to the right vars, so that it can handle the new types of damage. Not sure if it will get messed up with the spaces and the uppercase, but I don't have any of those spells to test it with... --Llanor 01:08, 21 September 2007 (CDT)

FYI, this line comes instead of the first #TRIGGER line that's in the article. --Llanor 05:47, 21 September 2007 (CDT)


Month late but I was under the impression that it would catch some (most?) spells already, don't have a mage though so if this works better alls good :)

Why it should catch some: the couple of spells I saw had name/you/your spellname stirkes/hits/blasts ect the mob. Atleast I'm pretty sure disintegrate would be tracked and smash and kick.

--Actually as I didn't test with a mage I think what was needed was a second trigger to catch the you cast the spell name? the extra verbs shouldnt be needed - Everman (10/27/07)

#TRIGGER {^(%w)[^>;]{strike|strikes|hits|blast|blasts} (%w)[^>;]with([* ])(%w)[* ]%w[!.]} {#IF {%ismember( %lower( %1), @DClist)} {#VAR %lower( %1) %replaceitem( %eval( %item( @damagevalues, %ismember( %concat( %4, %3), @damageverbs))+%item( @{%lower( %1)}, 17)), 17, @{%lower( %1)});#VAR %lower( %1) %replaceitem( %eval( %item( @{%lower( %1)}, %eval( %ismember( %lower( %4), @damageverbshort)+1))+1) , %eval( %ismember( %lower( %4), @damageverbshort)+1) , @{%lower( %1)})};#IF {%ismember( %lower( %2), @DClist)} {#VAR %lower( %2) %replaceitem( %eval( %item( @damagevalues, %ismember( %concat( %4, %3), @damageverbs))+%item( @{%lower( %2)}, 18)), 18, @{%lower( %2)})};#IF {%lower( %2) = "you"} {#VAR %lower( your) %replaceitem( %eval( %item( @damagevalues, %ismember( %concat( %4, %3), @damageverbs))+%item( @{%lower( your)}, 18)), 18, @{%lower( your)})};#IF {%lower( %1) = "you"} {#VAR %lower( your) %replaceitem( %eval( %item( @damagevalues, %ismember( %concat( %4, %3), @damageverbs))+%item( @{%lower( your)}, 17)), 17, @{%lower( your)});#VAR %lower( your) %replaceitem( %eval( %item( @{%lower( your)}, %eval( %ismember( %lower( %4), @damageverbshort)+1))+1) , %eval( %ismember( %lower( %4), @damageverbshort)+1) , @{%lower( your)})}} "Damagecounter"

Can try that perhaps, little ugly but might work. - Everman

The second option will not work if a caster is doing the damage counting. - Galadhaen

Version 2 is done, have a few people testing it before I put it here(1/15) - Everman

test version 2.05:

#CLASS {dcounter}
#ALIAS dcadd {#additem DCtrack %1;#additem DCnames %1;#echo %1 added to the damage counting list.}
#ALIAS dcrep {#YESNO "What report would you like to show?" {Short report (total damage done and taken) :dcrep1} {Breakdown of damage verbs:dcrep2}}
#ALIAS dcclear {#FO @DCtrack {#UNVAR %i};#VAR DCtrack "you";#VAR DCnames "";dcadd your;#ECHO Damagecounter reset. Please re-add groupies.}
#ALIAS dcrep2 {#if (!@DCreport) {dcrepto};#YESNO "Who would you like to report for?" {Yourself:#VAR DC.reportfor "your"} {Everyone:#VAR DC.reportfor @DCnames} {Partial:#VAR DC.reportfor %pick( p:Who would you like to display reports for?:, @DCnames)};#LOOPDB @you {#var your.%key %eval( %db( @your, %key) + %val)};#var you "";#FO @DC.reportfor {#var %i.out "";#FO @dverbshort {#if (%db( @{%i}, %I)) {#var %i.out %concat( %db( @{%i}, out), " ", %I, ~(, ~|c~|, %db( @{%i}, %I), ~|n~|, ~))}};@DC.repto Breakdown for %if( %i="your", Myself, %upper( %left( %i, 1))%right( %i, 1)):%db( @{%i}, out)}}
#ALIAS dcrep1 {#if (!@DC.repto) {dcrepto};#YESNO "Who would you like to report for?" {Yourself:#VAR DC.reportfor "your"} {Everyone:#VAR DC.reportfor @DCnames} {Partial:#VAR DC.reportfor %pick( p:Who would you like to display reports for?:, @DCnames)};#LOOPDB @you {#var your.%key %eval( %db( @your, %key) + %val)};#var you "";#var DC.total 0;#var DC.taken 0;#var DC.totalcount 0;#var DC.takencount 0;#FO @DCnames {#if ( %db( @{%i}, terminal)) {#var %i.total %eval( %db( @{%i}, dealt) + %db( @{%i}, dealt)/(%db( @{%i}, attacks) - %db( @{%i}, terminal))* %db( @{%i}, terminal))} {#var %i.total %db( @{%i}, dealt)};#if (@DC.total < %db( @{%i}, total)) {#var DC.total %db( @{%i}, total)};#if (@DC.taken < %db( @{%i}, taken)) {#var DC.taken %db( @{%i}, taken)};#var DC.totalcount %eval( @DC.totalcount + %db( @{%i}, total));#var DC.takencount %eval( @DC.takencount + %db( @{%i}, taken))};#FO @DC.reportfor {#if ( %db( @{%i}, terminal)) {#var %i.verb %item( @dverbs, %eval( @verbBinary(1,139,%eval(%db(@{%i},dealt)/(%db(@{%i},attacks)- %db( @{%i}, terminal)))) -1))} {#var %i.verb %item( @dverbs, %eval( @verbBinary(1,139,%eval(%db(@{%i},dealt)/%db(@{%i},attacks))) -1))};@DC.repto %if( %i="your", I, %upper( %left( %i, 1))%right( %i, 1)): Dealt->%if( %db( @{%i}, total) = @DC.total, ~|bc~|, ~|c~|)%db( @{%i}, total)|n|~(%eval( %db( @{%i}, total)*100/@DC.totalcount)%~) Averaged~[|bk|%replace( %db( @{%i}, verb), "=", "-")|n|~] Took->%if( %db( @{%i}, taken) = @DC.taken, ~|br~|, ~|r~|)%db( @{%i}, taken)|n|~(%eval( %db( @{%i}, taken)*100/@DC.takencount)%~)}}
#ALIAS dcs {dcclear;#if (!@DCreport) {@DCreport = gt} {};#t+ "%w is leading (%d) player[ s]with";groupstat}
#ALIAS dcrepto {#prompt DC.repto "Enter the channel to output to, eg gt, say ect."}
#VAR dverbshort {nil|pathetic|weak|punishing|surprising|amazing|astonishing|mauling|decimating|devastating|pulverizing|maiming|eviscerating|mutilating|disemboweling|dismembering|massacring|mangling|demolishing|obliterating|annihilating|eradicating|vaporizing|destructive|extreme|porcine|divine|daunting|terminal}
#VAR dvalues {0|2|4|8|10|14|18|22|26|30|34|38|42|46|49|55|60|65|70|75|80|85|90|95|100|110|120|130|140|150|160|170|180|190|200|225|250|275|300|325|350|375|400|425|450|475|500|540|574|606|675|730|769|810|884|915|1000|1100|1200|1300|1400|1500|1600|1700|1800|1900|2000|2200|2400|2600|2800|3000|3200|3400|3600|3800|4100|4500|5007|5901|5902|6200|6500|7000|7500|7800|8200|8500|9000|9500|10000|11000|12000|13000|14000|15000|16500|18000|19000|20000|21000|22000|23000|24000|25000|26000|27000|28000|29000|30000|31000|32000|33000|34000|35000|36000|37000|38000|39000|40000|41000|42000|43000|44500|47000|48000|50000|51000|53000|55000|57000|59000|61000|65000|70000|75000|80000|100000|0}
#VAR dverbs {nil|pathetic|weak|punishing|surprising|amazing|astonishing|mauling|MAULING|MAULING*|MAULING**|MAULING***|decimating|DECIMATING|DECIMATING*|DECIMATING**|DECIMATING***|devastating|DEVASTATING|DEVASTATING*|DEVASTATING**|DEVASTATING***|pulverizing|PULVERIZING|PULVERIZING*|PULVERIZING**|PULVERIZING***|maiming|MAIMING|MAIMING*|MAIMING**|MAIMING***|eviscerating|EVISCERATING|EVISCERATING*|EVISCERATING**|EVISCERATING***|mutilating|MUTILATING|MUTILATING*|MUTILATING**|MUTILATING***|disemboweling|DISEMBOWELING|DISEMBOWELING*|DISEMBOWELING**|DISEMBOWELING***|dismembering|DISMEMBERING|DISMEMBERING*|DISMEMBERING**|DISMEMBERING***|massacring|MASSACRING|MASSACRING*|MASSACRING**|MASSACRING***|mangling|MANGLING|MANGLING*|MANGLING**|MANGLING***|demolishing|DEMOLISHING|DEMOLISHING*|DEMOLISHING**|DEMOLISHING***|obliterating|OBLITERATING|OBLITERATING*|OBLITERATING**|OBLITERATING***|annihilating|ANNIHILATING|ANNIHILATING*|ANNIHILATING**|ANNIHILATING***|ANNIHILATING***<|ANNIHILATING***<<|ANNIHILATING***<<<|ANNIHILATING***<<<<|eradicating|ERADICATING|ERADICATING*|ERADICATING**|ERADICATING***|ERADICATING***<|ERADICATING***<<|ERADICATING***<<<|ERADICATING***<<<<|vaporizing|VAPORIZING|VAPORIZING*|VAPORIZING**|VAPORIZING***|VAPORIZING***<|VAPORIZING***<<|VAPORIZING***<<<|VAPORIZING***<<<<|destructive|DESTRUCTIVE|DESTRUCTIVE*|DESTRUCTIVE**|DESTRUCTIVE***|DESTRUCTIVE****|DESTRUCTIVE****<|DESTRUCTIVE****<<|DESTRUCTIVE****<<<|DESTRUCTIVE****<<<<|DESTRUCTIVE***<<<<=|DESTRUCTIVE**<<<<==|DESTRUCTIVE*<<<<===|DESTRUCTIVE<<<<====|extreme|EXTREME|EXTREME*|EXTREME**|EXTREME***|EXTREME****|EXTREME****<|EXTREME****<<|EXTREME****<<<|EXTREME****<<<<|EXTREME***<<<<=|EXTREME**<<<<==|EXTREME*<<<<===|EXTREME<<<<====|porcine|PORCINE|PORCINE*|PORCINE**|PORCINE***|PORCINE***<|PORCINE***<<|PORCINE***<<<|PORCINE***<<<<|divine|daunting|terminal}
#VAR verbBinary {%if( %1 = %2, %1, %if( %eval( %item( @dvalues, %eval( (%1+%2)/2.0)) > %3), @verbBinary(%1, %eval( (%1+%2)/2.0),%3), @verbBinary( %eval( (%1+%2)/2.0),%2,%3)))}
#TRIGGER {^Welcome back to the AVATAR System, {lord|lady|hero} (%w).} {#var dcCurChar %lower( %1)}
#TRIGGER {^Welcome back to the AVATAR System (%w),} {#var dcCurChar %lower( %1)}
#TRIGGER {^({@DCtrack})[^>;] %w[^>;]with[*>= ]({@dverbshort})([*<= ])%w[!.]} {#var %1.%2 %eval( @%1.%2 + 1);#var %1.dealt %eval( @%1.dealt + %item( @dvalues, %ismember( %concat( %2, %3), @dverbs)));#var %1.attacks %eval( @%1.attacks + 1)} "" {notrig}
#TRIGGER {^%w[^>;] ({@DCtrack})[^>;]with[*>= ]({@dverbshort})([*<= ])%w[!.]} {#var %1.taken %eval( @%1.taken + %item( @dvalues, %ismember( %concat( %2, %3), @dverbs)))}
#TRIGGER {%w is leading (%d) player[ s]with} {#if (%1 < 10) {#loop %1 {#temp {^ %i|??? ???? (&%wDCtemp1)} {#if (%lower( @DCtemp1) != @dcCurChar) {dcadd %lower( @DCtemp1)}}}} {#loop 1,9 {#temp {^ %i|??? ???? (&%wDCtemp1)} {#if (%lower( @DCtemp1) != @dcCurChar) {dcadd %lower( @DCtemp1)}}};#loop 10,%1 {#temp {^%i|??? ???? (&%wDCtemp1)} {#if (%lower( @DCtemp1) != @dcCurChar) {dcadd %lower( @DCtemp1)}}}};#t- "%w is leading (%d) player[ s]with";group} "" {disable}
#MENU {DC Add} {dcadd %lower( %selword)} ""
#MENU {DC Clear} {dcclear} ""
#MENU {DC List} {#ec -;#ec --- CHARACTERS ON THE DC LIST ---;#fo @DCnames {#ec %i}} ""
#CLASS 0