I'm having trouble with the ret macro
# Version: 20100108
/startattack
/run vUseHolyWrath=false
/run local n=0; local sets={{48602,48631,1},{50324,50328,10},{51160,51164,10},{51275,51279,10}}; local slots={"HeadSlot","ShoulderSlot","ChestSlot","HandsSlot","LegsSlot"}; for i=1,#slots do local id=tonumber(({string.find(GetInventoryItemLink("player", ({GetInventorySlotInfo(slots[i])})[1]), "^\124c%x+\124Hitem

[^:]+):.*\124h%[.*%]")})[3]); for j=1,#sets do if id>=sets[j][1] and id<=sets[j][2] then n=n+sets[j][3] end end end; local a=n-math.floor(n/10)*10; local b=math.floor(n/10); vRet=0; if a>1 and b<2 then vRet=1 elseif a>1 and b>1 then vRet=2 elseif b>3 then vRet=3 end;
/run if type(vJoW)~="function" then vJoW=function() if GetSpellCooldown("Judgement of Wisdom")==0 and IsUsableSpell("Judgement of Wisdom") and IsSpellInRange("Judgement of Wisdom","target") then CastSpellByName("Judgement of Wisdom") end end end;
/run if type(vHoW)~="function" then vHoW=function() if GetSpellCooldown("Hammer of Wrath")==0 and IsUsableSpell("Hammer of Wrath") and IsSpellInRange("Hammer of Wrath","target") and UnitHealth("target")/UnitHealthMax("target")<0.2 then CastSpellByName("Hammer of Wrath") end end end;
/run if type(vCS)~="function" then vCS=function() if GetSpellCooldown("Crusader Strike")==0 and IsUsableSpell("Crusader Strike") and IsSpellInRange("Crusader Strike","target") then CastSpellByName("Crusader Strike") end end end;
/run if type(vDS)~="function" then vDS=function() if GetSpellCooldown("Divine Storm")==0 and IsUsableSpell("Divine Storm") and IsSpellInRange("Crusader Strike","target") then CastSpellByName("Divine Storm") end end end;
/run if type(vCons)~="function" then vCons=function() if UnitPower("player")/UnitPowerMax("player")>=0.25 and GetSpellCooldown("Consecration")==0 and IsUsableSpell("Consecration") and IsSpellInRange("Crusader Strike","target") then CastSpellByName("Consecration") end end end;
/run if type(vExo)~="function" then vExo=function() if UnitBuff("player", "The Art of War") and GetSpellCooldown("Exorcism")==0 and IsUsableSpell("Exorcism") and IsSpellInRange("Exorcism","target") then CastSpellByName("Exorcism") end end end;
/run if type(vHWrath)~="function" then vHWrath=function() if vUseHolyWrath and GetSpellCooldown("Holy Wrath")==0 and IsUsableSpell("Holy Wrath") and IsSpellInRange("Crusader Strike","target") then CastSpellByName("Holy Wrath") end end end;
/run if type(vPlea)~="function" then vPlea=function(m) if GetSpellCooldown("Divine Plea")==0 and UnitPower("player")/UnitPowerMax("player")<=m then CastSpellByName("Divine Plea") end end end;
/run if UnitHealth("player")/UnitHealthMax("player")<0.10 then if GetSpellCooldown("Divine Shield")==0 and IsUsableSpell("Divine Shield") then SpellStopCasting() CastSpellByName("Divine Shield") elseif GetSpellCooldown("Divine Protection")==0 and IsUsableSpell("Divine Protection") then SpellStopCasting() CastSpellByName("Divine Protection") end end
/run local t={UnitDetailedThreatSituation("player","target")}; if GetNumPartyMembers()>0 and (t[1]==1 or (t[5] ~=nil and t[5]>25000 and t[3]>90)) and GetSpellCooldown("Hand of Salvation")==0 then RunMacroText("/cast [@player] Hand of Salvation") end
/run if (vRetInt==nil or GetTime()-vRetInt>1) and (UnitCastingInfo("target") or UnitChannelInfo("target")) then if IsUsableSpell("Hammer of Justice") and GetSpellCooldown("Hammer of Justice")==0 and IsSpellInRange("Hammer of Justice", "target")==1 then SpellStopCasting() CastSpellByName("Hammer of Justice") vRetInt=GetTime() elseif IsUsableSpell("Arcane Torrent") and GetSpellCooldown("Arcane Torrent")==0 and IsSpellInRange("Crusader Strike", "target")==1 then SpellStopCasting() CastSpellByName("Arcane Torrent") vRetInt=GetTime() end end
/run local s=GetUnitSpeed("player"); if GetSpellCooldown("Hand of Freedom")==0 and s>0 and s<4.5 then RunMacroText("/cast [@player] Hand of Freedom") end;
/run vPlea(0.20)
/run if UnitAffectingCombat("player") and UnitHealth("target")>200000 and GetSpellCooldown("Avenging Wrath")==0 and IsUsableSpell("Avenging Wrath") and IsSpellInRange("Crusader Strike","target") then if UnitBuff("player","Seal of Corruption") or UnitBuff("player","Seal of Vengeance") then local i=1 while(i<=40)do local a={UnitDebuff("target",i)}; if (a[1]=="Holy Vengeance" or a[1]=="Blood Corruption") and a[8]=="player" and a[4]==5 then break else i=i+1 end end; if i<=40 then CastSpellByName("Avenging Wrath") end else CastSpellByName("Avenging Wrath") end end
/run if vRet==0 then vHoW() vCS() vJoW() vDS() vCons() vExo() vHWrath() vPlea(0.70) end
/run if vRet==1 then vJoW() vHoW() vCS() vDS() vCons() vExo() vHWrath() vPlea(0.70) end
/run if vRet==2 then vJoW() vDS() vHoW() vCS() vCons() vExo() vHWrath() vPlea(0.70) end
/run if vRet==3 then vDS() vCS() vJoW() vHoW() vCons() vExo() vHWrath() vPlea(0.70) end
/run if UnitPower("player")/UnitPowerMax("player")>=0.50 then local f=0; for i=1,40 do local d={UnitBuff("player",i)}; if d[1]=="Sacred Shield" and d[8]=="player" then f=1 break end end; if f==0 then RunMacroText("/cast [@player] Sacred Shield") end end;
/run StaticPopup_Hide("MACRO_ACTION_FORBIDDEN");
all it seems to do is melee and never actually start the rotation, maybe it's the way superdupermacro word wraps the text?