+ Reply to Thread
Results 1 to 3 of 3

Thread: Total avoidance macro

  1. #1
    Join Date
    Sep 2011
    Posts
    1

    Total avoidance macro

    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.

    Code:
    /script DEFAULT_CHAT_FRAME:AddMessage("Need 102.4 combined avoidance. Currently at:",0.8,0.8,1)
    /script DEFAULT_CHAT_FRAME:AddMessage(GetDodgeChance()+GetBlockChance() + 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!

  2. #2
    Join Date
    Nov 2009
    Location
    WI, USA
    Posts
    2,614
    Code:
    /run u,t=UnitLevel("player"),88 ld,d,p,b,m=0.2*(u-t),GetDodgeChance(),GetParryChance(),GetBlockChance(),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.
    "In anything, if you want to go from just a beginner to a pro, you need a montage." /w TankSpot WTB Montage for Raiders.

  3. #3
    Join Date
    Nov 2009
    Location
    WI, USA
    Posts
    2,614
    Found the post I was looking for in my old subscriptions... took a while.

    Quote Originally Posted by Quinafoi View Post
    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)
    Code:
    /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(),GetBlockChance(),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)
    Code:
    /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(),GetBlockChance(),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)
    Code:
    /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)
    Code:
    /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))
    "In anything, if you want to go from just a beginner to a pro, you need a montage." /w TankSpot WTB Montage for Raiders.

+ Reply to Thread

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts