Hey, just got into this whole macro thing, and i've made up a dps macro for my spirest. This is only the 1st version i plan on expanding it to deal with lag much better as well as multi target dps and dealing with fights that need a dps burst on targets such as jaraxxus or saurfang. Please leave comments or suggestions if you have any.
Code:
/run if _G["VT"]==nil then _G["VT"]=GetTime() end;
/run local s,_,_,_,_,_,_,_=UnitChannelInfo("player"); if( s=="Mind Flay" ) then StopMacro(); end;
/run i=1 while(i<=40) do a={UnitDebuff("target",i)} if (a[1]=="Vampiric Touch")and a[8]=="player" and a[7]-GetTime()<1.2 and GetTime()-_G["VT"]>2 then _G["VT"]=GetTime(); CastSpellByName("Vampiric Touch"); StopMacro(); end i=i+1; end
/run local d=0; i=1 while(i<=40) do a={UnitDebuff("target",i)} if (a[1]=="Vampiric Touch")and a[8]=="player" then d=1; break end i=i+1; end if d==0 and GetTime()-_G["VT"]>2 then _G["VT"]=GetTime(); CastSpellByName("Vampiric Touch"); StopMacro(); end
/run local d=0; i=1 while(i<=40) do a={UnitDebuff("target",i)} if (a[1]=="Devouring Plague")and a[8]=="player" then d=1; break end i=i+1; end if (d==0) then CastSpellByName("Devouring Plague"); StopMacro(); end
/run if (GetSpellCooldown("Mind Blast") == 0) then CastSpellByName("Mind Blast"); StopMacro(); end
/run local _,_,_,n,_,_,_,_,_=UnitBuff("player","Shadow Weaving"); if( n>=5 and not UnitDebuff("target", "Shadow Word: Pain",unitCaster~="player") ) then RunMacroText("/use Nevermelting Ice Crystal"); CastSpellByName("Shadow Word: Pain"); StopMacro(); end
/run i=1 while(i<=40) do a={UnitDebuff("target",i)} if (a[1]=="Vampiric Touch")and a[8]=="player" and a[7]-GetTime()<2.4 then if (GetSpellCooldown("Shadow word: death") == 0) then CastSpellByName("Shadow Word: death"); StopMacro(); end end i=i+1; end
/run i=1 while(i<=40) do a={UnitDebuff("target",i)} if (a[1]=="Vampiric Touch")and a[8]=="player" and a[7]-GetTime()>2.4 then CastSpellByName("Mind Flay"); break end i=i+1; end