Thetos
27-11-2006, 03:31 PM
I have never created a macro more advanced than "/decursive". I have been browsing some of the Macros available on the site and am unable to figure out how to make the macro I am after.
What I want is a single button that does 3 things:
If my target is targetting me, cast Holy Shield
If my target is targetting a clothy, cast Blessing of Protection
If my target is targetting a non-clothy, cast Righteous Defense
This is what I have come up with so far, but I only get errors when I test it. Any help would be appreciated. Any ways to improve upon this idea would be appreciated as well.
/script c=CastSpellByName;if not UnitIsUnit("targettarget", "player") then if ((class=="Warlock") or (class=="Priest") or (class=="Mage")) c("Blessing of Protection (Rank 3)") else c("Righteous Defense"));end
/run if UnitMana("player")>135 then CastSpellByName("Holy Shield");end
What I want is a single button that does 3 things:
If my target is targetting me, cast Holy Shield
If my target is targetting a clothy, cast Blessing of Protection
If my target is targetting a non-clothy, cast Righteous Defense
This is what I have come up with so far, but I only get errors when I test it. Any help would be appreciated. Any ways to improve upon this idea would be appreciated as well.
/script c=CastSpellByName;if not UnitIsUnit("targettarget", "player") then if ((class=="Warlock") or (class=="Priest") or (class=="Mage")) c("Blessing of Protection (Rank 3)") else c("Righteous Defense"));end
/run if UnitMana("player")>135 then CastSpellByName("Holy Shield");end