/script if (not string.find(UnitBuff("player", 1), "Shadowform")) then CastSpellByName("Shadowform"); else CastSpellByName("Power Word: Fortitude");end
|
The macro is the right idea but it will only work if Shadowform is in the first buff slot. The index (1 in that macro) is the buff slot.
To check if Shadowform is up you need to check all buff slots.
/script local i,found,buff for i=1,24 do buff=UnitBuff("player",i) if buff and string.find(UnitBuff("player",i),"Shadowform") then found=1 end end; if not found then CastSpellByName("Shadowform") else CastSpellByName("Power Word: Fortitude") end