so i'm running into some trouble making a disc priest ezmode heal rotation with macros here is what i got so far:
Macro 1:
Code:
/dump loadstring(" ma=0; mn=0; t=\"raid\"; for n=\"1\",\"10\" do a=(UnitHealthMax(t..n)-UnitHealth(t..n)); if (a > ma) and (UnitInRange(t..n)==1) then ma=a mn=n end end TargetUnit(t..mn); if ma>=8000 then RunMacro(\"B\") else RunMacro(\"S\") end ") ()
this one targets the person with the lowest health and based on that healt cast a quick heal or long duration heal
Macro B:
Code:
/dump loadstring("if (not UnitDebuff(\"target\", \"Weakend Soul\")) then CastSpellByName(\"Power Word: Shield\") end")()
/dump RunMacro(C)
this one checks to see if they have weakend soul if not cast shield then moves to macro C
Macro C:
Code:
/dump loadstring("local _, 10, _ = GetSpellCooldown(\"Prayer of Mending\") if (d == 0) then CastSpellByName(\"Prayer of Mending\") else CastSpellByName(\"Renew\") end")()
This one checks to see if prayer of mending is on cool down if not uses it, and if it is on cooldown it cast renew
Macro S:
Code:
/dump loadstring("if (not UnitDebuff(\"target\", \"Weakend Soul\")) then CastSpellByName(\"Power Word: Shield\") end")()
/dump RunMacro(T)
this one is the same as Macro B but instead takes you to a different macro afterwards
Macro T:
Code:
/dump loadstring("local _, 8, _ = GetSpellCooldown(\"Penance\") if (d == 0) then CastSpellByName(\"Penance\") else CastSpellByName(\"Flash Heal\") end")()
this one checks to see if penance is on cd and if not will cast it, and if it is on cd uses flash heal instead
When i use Macro 1 it sais that it sais empty field, RunMacro(C), empty field, empty field it won't get past casting power weild: shield. any help on this would be nice!
I've also been messing around with it using percentages with the following macros the ones with * next to them work
Code:
Macro Heal:
/dump loadstring(" P=1; mn=0; t=\"party\"; for n=\"1\",\"2\" do p=(UnitHealth(t..n)/UnitHealthMax(t..n)); if (P > p) and (unitInRange(t..n)==1) then P=p mn=n end end Targetunit(t..mn); if P<60% then RunMacro(\"Quick heal\") else RunMacro(\"HOT\") end")()
/dump RunMacro(Shield)
Macro Shield:
/dump loadstring("if (not UnitDebuff(\"target\", \"Weakend Soul\")) then CastSpellByName(\"Power Word: Shield\") end")()
/dump RunMacro(Defecit)
Macro Defecit:
/dump loadstring("ma=0; mn=0; t=\"target\"; do a=(UnitHealthMax(t..n)-Unithealth(t..n)); if (a > ma) and (UnitInRange(t..n)==1) then ma=a mn=n; if ma>=8000 then RunMacro(\"Quick heal\") else RunMacro(\"HOT\") end")()
*Macro Quick heal:
/dump loadstring("local _, d, _ = GetSpellCooldown(\"Penance\") if (d == 0) then CastSpellByName(\"Penance\") else CastSpellByName(\"Flash Heal\") end")()
*Macro HOT:
/dump loadstring("local _, d, _ = GetSpellCooldown(\"Prayer of Mending\") if (d == 0) then CastSpellByName(\"Prayer of Mending\") else CastSpellByName(\"Renew\") end")()