PDA

View Full Version : Tanking Total avoidance macro



Voxel
09-21-2011, 03:03 AM
Hello,

I'm looking for a Cataclysm up-to-date version of the old avoidance calculation macro that included defense and probably more retro things/values.


/script DEFAULT_CHAT_FRAME:AddMessage("Need 102.4 combined avoidance. Currently at:",0.8,0.8,1)
/script DEFAULT_CHAT_FRAME:AddMessage(GetDodgeChance()+Get BlockChance() + GetParryChance() +5+(GetCombatRatingBonus(CR_DEFENSE_SKILL) + 20)*0.04,1,0.5,0)

Im not expert in writing scripts could someone correct this macro for Warrior class please?
Thanks for your time!

Quinafoi
09-21-2011, 08:39 AM
/run u,t=UnitLevel("player"),88 ld,d,p,b,m=0.2*(u-t),GetDodgeChance(),GetParryChance(),GetBlockChanc e(),5 DEFAULT_CHAT_FRAME:AddMessage(format("Lvl: "..t.." Unhit: %.2f%% Avoid: %.2f%%",d+p+b+m+ld*4,d+p+m+ld*3))

I assume by the fact that your macro is looking for the unhittable threshold that you are running it as a block tank (Paladin/Warrior).
This macro will automatically shift values to their correct actual number in practice (on a 100% scale rather than a 102.4% scale). Level of the target is hardcoded to 88 in this variation however you could alter it. If you are a Night Elf you would need to alter the value for miss from 5 to 7.

Quinafoi
09-21-2011, 09:47 AM
Found the post I was looking for in my old subscriptions... took a while.


Any macro you are using today if it was correct before for calculating avoidance will still be correct in 4.2.

Here is my automatic scaling version which translates down to a 100% scale. Target a raid boss target dummy and it will it will do the 2.4% reduction to unhittable and 1.8% reduction to avoidance. Target a level 85 and it will have no reduction. It automatically scales based on your level and your target's level.

If you want to hardcode the target level, you can replace the UnitLevel("target") with the desired level, i.e. 88 for a Cataclysm Raid Boss.

Shield Tank (Non-Night Elf)

/run u,t=UnitLevel("player"),UnitLevel("target") if t==-1 then t=u+3 end ld,d,p,b,m=0.2*(u-t),GetDodgeChance(),GetParryChance(),GetBlockChanc e(),5 DEFAULT_CHAT_FRAME:AddMessage(format("Lvl: "..t.." Unhit: %.2f%% Avoid: %.2f%%",d+p+b+m+ld*4,d+p+m+ld*3))

Shield Tank (Night Elf)

/run u,t=UnitLevel("player"),UnitLevel("target") if t==-1 then t=u+3 end ld,d,p,b,m=0.2*(u-t),GetDodgeChance(),GetParryChance(),GetBlockChanc e(),7 DEFAULT_CHAT_FRAME:AddMessage(format("Lvl: "..t.." Unhit: %.2f%% Avoid: %.2f%%",d+p+b+m+ld*4,d+p+m+ld*3))

Death Knight (Any Race)

/run x="player" u,t=UnitLevel(x),UnitLevel("target") if t==-1 then t=u+3 end ld,d,p,m=0.2*(u-t),GetDodgeChance(),GetParryChance(),5 if UnitRace(x)=="Night Elf" then m=m+2 end DEFAULT_CHAT_FRAME:AddMessage(format("Lvl: "..t.." Avoid: %.2f%%",d+p+m+ld*3))

Druid (Any Race)

/run x="player" u,t=UnitLevel(x),UnitLevel("target") if t==-1 then t=u+3 end ld,d,m=0.2*(u-t),GetDodgeChance(),5 if UnitRace(x)=="Night Elf" then m=m+2 end DEFAULT_CHAT_FRAME:AddMessage(format("Lvl: "..t.." Avoid: %.2f%%",d+m+ld*2))