Again, this is done in macros. Actually, I suggest you make an addon. Here's some old addon code I used.
Put this in: Runes of Magic/Interface/Addons/myAddon/functions.lua
Code: Select all
-- Returns true if the unit has a buff with the given name, otherwise false
function UnitHasBuff(unit, buffname)
for i = 1,20 do
if( UnitBuff(unit, i) == buffname ) then
return true;
end
end
return false;
end
-- Returns true if the unit has a debuff with the given name, otherwise false
function UnitHasDebuff(unit, buffname)
for i = 1,20 do
if( UnitDebuff(unit, i) == buffname ) then
return true;
end
end
return false;
end
Put this in: Runes of Magic/Interface/Addons/myAddon/myAddon.toc
Now, you can make a macro (pseudo-code; The debuff and skill names probably don't make sense):
Code: Select all
/script if( UnitHasDebuff("target", "Weakness") ) then CastSpellByName("Thundering"); else CastSpellByName("Weak Shot"); end;