Thanks, I'll test it once NoAddiction is updated for 4.0.3. It would appear that the extra argument for UnitDebuff will prove powerful as far as making my head hurt less and making some of my macros shorter. Can convert all those nasty while checks into something like..
Code:
..and not d(t,"Rend","",p) then c("Rend") elseif..
Implying that I'll store the commonly used terms like UnitDebuff, "target", "player", and CastSpellByName into variables like d, t, p, and c respectively.
Will rep you once I can test it. Just a question though. Do you have to set the 3rd argument even though spells don't have ranks now?
edit: I went about testing the extra arguments. Doing..
Code:
/run if UnitDebuff("target", "Rend", "", "PLAYER") then print("a") end
should print a in the main chat window, but nothing comes up. Makes me think the arguments are a bit different. Checking the debuff via index like this works, but then it doesn't check if it's rend :P
Code:
/run if UnitDebuff("target", 1, "PLAYER") then print("a") end
EDIT2: Did a little bit of poking around. UnitDebuff's second output is the "rank" of the spell, so I did a /dump on UnitDebuff("target","Rend"). There is still a "rank" but not like I thought. It outputs this string: "Battle, Defensive Stance". So I put that in as the third argument of the UnitDebuff and ran the following. It indeed printed "a" when I had Rend up on the target.
Code:
/run if UnitDebuff("target", "Rend", "Battle, Defensive Stance", "player") then print("a") end
Soooooo.. fixing the above macro for when NA gets updated, we get..
Code:
if UnitHealth"target"/UnitMaxHealth"target" < .2 then
if not GetShapeshiftForm()==3 then
CastSpellByName"Berserker Stance"
end
elseif GetShapeshiftForm()==3 and ((not UnitDebuff("target", "Rend", "Battle, Defensive Stance", "PLAYER") or (select(6, UnitDebuff("target", "Rend", "Battle, Defensive Stance", "PLAYER")) < 3) or IsUsableSpell"Overpower") then
CastSpellByName"Battle Stance"
elseif GetShapeshiftForm()==1 and UnitPower("player") > 50 and (UnitDebuff("target", "Rend", "Battle, Defensive Stance", "PLAYER") and select(6, UnitDebuff("target", "Rend", "Battle, Defensive Stance", "PLAYER")) > 3 and not IsUsableSpell"Overpower") then
CastSpellByName"Berserker Stance"
end