Trying to set up druid heals, having a few issues.
trying to check stacks on buff for lifebloom and it doesnt seem to work, also trying not to recast Regrowth or Rejuve if buffs already exist and that isnt working. it is casting but it is also casting when buff is present
Code:LB=1500; WG=1000; RJ=5000; RG=8000; NO=10000; HT=18000; NS=0.20; t="raid"; nps=1; npe=GetNumRaidMembers(); if npe==0 then -- if it was not a raid t="party"; nps=0; npe=GetNumPartyMembers() end; s=nil; m=0; w=f; for i=nps,npe do if i==0 then tt="player" else tt=t..i end; if UnitExists(tt) and UnitInRange(tt)==1 and UnitIsDeadOrGhost(tt)~=1 then a=UnitHealthMax(tt)-UnitHealth(tt); if a>m then m=a w=tt end end end; if GetSpellCooldown("Wild Growth")==0 and m>=WG then s="Wild Growth" elseif m>=HT then if GetSpellCooldown("Nature's Swiftness")==0 and UnitHealth(w)/UnitHealthMax(w)<NS then s="NS" else s="Healing Touch" end elseif m>=NO then s="Nourish" elseif m>=RG then i=1 while(i<=40)do a={UnitBuff("tt",i)} if a[1]=="Regrowth" and a[8]=="player" then break else i=i+1 end end; if i>40 then s="Regrowth" else s="Nourish" end elseif m>=RJ then i=1 while(i<=40)do a={UnitBuff(tt,i)} if a[1]=="Rejuvenation" and a[8]=="player" then break else i=i+1 end end; if i>40 then s="Rejuvenation" else s="Nourish" end elseif m>=LB then i=1 while(i<=40)do a={UnitBuff("tt",i)} if a[1]=="Lifebloom" and a[8]=="player" then break else i=i+1 end end; if i>40 then s="Lifebloom" elseif GetSpellCooldown("Wild Growth")==0 then s="Wild Growth" else s="Lifebloom" end end; if s=="NS" then SpellStopCasting(); CastSpellByName("Nature's Swiftness"); SpellStopCasting(); s="Healing Touch" end; if s~=nil then RunMacroText("/cast [@"..w.."] "..s) end;
Last edited by garyrbaker; 12-26-2009 at 06:14 PM.
Should have posted this here immidiatly instead of the LuaNinja threat....
have a very advanced macro for DKs right now, there is just 1 part missing:
Scourge Strike/Blood Strike. I've been trying a lot of stuff, but i just can't get it to work how I want it.
Basically it has to be something like this:
If (at least) 1 unholy & 1 frost rune is up it does Scourge Strike, else it checks for a blood rune and if 1 of those is up it does Blood Strike. With that information I can easily finish it on my own (it's actually getting insanely long with all the buffs it has to check ).
Also, to make the macro loop itself just doesn't seem to work for me :S.
As shieno said, the rogue GCD is 1 second. Instead of 1.5 I'm thinking of calculating 3 / 7 or another recurring decimal so that it should never sync up with the GCD. But if I put it low enough, it shouldn't even be a problem as the next press would only be a couple of milliseconds away.
Instead of adding more checks to make it only use energy, I could just modify the current UnitPower checks to make them higher (say +20 energy for anything). This would save me adding in extra lines, and trying to understand the way kerberos has formatted everything (everytime I've tried to edit the SDM script I've just broken it :P).
To be fair what you're trying to achieve should be really easy. You don't have to actually modify anything in the script, just modify a little in the macro you're running.
Just use this as 002 instead
Code:#showinfo [stealth] Garrote; Mutilate /startattack [combat] /run if UnitPower("Player") > 30 then RunMacro(1) end /cast Cold Blood /run if UnitPower("Player") > 30 then RunMacroText("/run Mutilate.Init()") end
Knowledge is often mistaken for intelligence. This is like mistaking a cup of milk for a cow.
Hmm, that should be good, but it won't account for certain abilities. Though, it does stop the problem of running out of energy on abilites like SnD and HfB.
EDIT: Okay, somehow when making the script's energy check higher I screwed something up which I can't seem to find. Of course I happened to notice that it wasn't working in the middle of a raid. That was fun. Anyway, here's what I have at the moment.
SDM Script:
Macro 1Code:Mutilate = {} function Mutilate.Init() if UnitName("target") == nil or UnitIsFriend("player","target") ~= nil or UnitHealth("target") == 0 then return -- ignore the dead and friendly end local energy = UnitPower("player") local cp = GetComboPoints("player") local currentTime = GetTime() local ud = UnitDebuff local ub = UnitBuff local SuggestRupture = false --change this if you want to use a Rupture based rotation local SuggestVanish = true --change this if you don't want to automatically cast Vanish local snd = 0 local hfb = 0 local rupture = 0 local dp = 0 local vanish = 0 local overkill = 0 local bleeds = 0 -- -- Ensure that there is a bleed (ie. Rupture, Deep Wounds, Rend) on the target. -- if ( ud("target","Rupture") or ud("target","Garrote") or ud("target","Deep Wounds") or ud("target","Rend") or ud("target","Trauma") or ud("target","Mangle (Cat)") or ud("target","Mangle (Bear)") or ud("target","Pounce") or ud("target","Rake") or ud("target","Piercing Shots") ) then bleeds = 1 end -- -- Slice and Dice -- local name, _, _, _, _, _, expirationTime, _, _ = UnitBuff("player", "Slice and Dice") if name ~= nil then snd = expirationTime - currentTime end -- -- Hunger for Blood -- local name, _, _, _, _, _, expirationTime, _, _ = UnitBuff("player", "Hunger for Blood") if name ~= nil then hfb = expirationTime - currentTime end -- -- Ruture -- local name, _, _, _, _, _, expirationTime, isMine, _ = UnitDebuff("target", "Rupture") currentTime = GetTime() if name ~= nil and isMine == "player" then rupture = expirationTime - currentTime end -- -- Deadly Poison IX -- local name, _, _, count, _, _, expirationTime, isMine, _ = UnitDebuff("target", "Deadly Poison IX") if name ~= nil and count >= 4 and isMine == "player" then dp = 1 end -- -- Vanish -- local start, duration, _ = GetSpellCooldown("Vanish"); if duration ~= nil then vanish = duration + start - currentTime end if UnitAura("player", "Stealth") ~= nil then if (energy >= 50) then RunMacroText("/cast Garrote"); end elseif (hfb <= 5.0) then if (bleeds == 1) then if (energy >= 20) then RunMacroText("/cast Hunger for Blood"); end else if (cp == 0) then if (energy >= 60) then RunMacroText("/cast Mutilate"); end else if (energy >= 25) then RunMacroText("/cast Rupture"); end end end elseif (cp >= 1) and not ub("player","Slice and Dice") then if (energy >= 40) then RunMacroText("/cast Slice and Dice"); end elseif (cp >= 1) and (snd <= 5.0) then if (energy >= 40) then RunMacroText("/cast Envenom"); end elseif (vanish < 1) and not ub("player","Overkill") and SuggestVanish == true then RunMacroText("/cast Vanish"); elseif (cp < 4) then if (energy >= 65) then RunMacroText("/cast Mutilate"); end elseif (rupture <= 2.5) and (SuggestRupture == true) then if (rupture <= 0.5) then if (energy >= 25) then RunMacroText("/cast Rupture"); end end elseif (dp == 1) then if (energy >= 55) then RunMacroText("/cast Envenom"); end else if (energy >= 80) then RunMacroText("/cast Mutilate"); end end end
Macro 2Code:/run if (Mutilate == nil) then RunMacroText("/sdm run Mutilate") end
I got rid of the /cast Cold Blood since it liked to try and continually cast Cold Blood, making it not work full stop.Code:#showinfo [stealth] Garrote; Mutilate /startattack [combat] /run RunMacro(1) /run Mutilate.Init() /run [nocombat] StopMacro(2)end /in 0.33334 /run RunMacro(2)
Anyway, the problem is that after setting up Hunger for Blood and Slice and Dice, it seems to not mutilate up then envenom. If I have 1 combo point remaining it'll still try and keep SnD by using envenom and it'll refresh HfB, but it just won't mutilate up to 4+ combo points and then Envenom.
Last edited by asdjaa; 12-26-2009 at 09:28 PM.
Will take a look at it.
Anyways, to finish up the warrior macro, this is what I have.
I've run like 100 heroics with it and it works really well. I have the trinket Medallion of Heroism, which explains the last line lol. Just remove it or change to something elseCode:/startattack /run if IsUsableSpell("Charge")==1 and GetSpellCooldown("Charge")==0 and IsSpellInRange("Charge", "target")==1 then CastSpellByName("Charge") elseif IsUsableSpell("Intercept")==1 and GetSpellCooldown("Intercept")==0 and IsSpellInRange("Intercept", "target")==1 then CastSpellByName("Intercept") end /run if UnitCastingInfo("target") and GetSpellCooldown("Shield Bash")==0 then CastSpellByName("Shield Bash") end /run local _,a,_ = GetSpellCooldown("Shield Block") if (a == 0) then CastSpellByName("Shield Block") end /run if UnitHealth('player')<10000 and GetSpellCooldown("Enraged Regeneration")==0 and IsUsableSpell("Enraged Regeneration")==1 then CastSpellByName("Enraged Regeneration") end /run if UnitHealth('player')<11000 and GetSpellCooldown("Shield Wall")==0 then CastSpellByName("Shield Wall") end /run if UnitHealth('player')<10000 and GetSpellCooldown("Last Stand")==0 then CastSpellByName("Last Stand") end /run local _,d,_ = GetSpellCooldown("Bloodrage") if (d == 0) then CastSpellByName("Bloodrage") end /run if not UnitDebuff("target", "Demoralizing Shout") and not UnitDebuff("target", "Demoralizing Roar") and not UnitDebuff("target", "Vindication") and not UnitDebuff("target", "Curse of Weakness") and IsSpellInRange("Shield Slam", "target")==1 then CastSpellByName("Demoralizing Shout") end /run if UnitBuff("player", "Glyph of Revenge") then CastSpellByName("Heroic Strike") end /run local _,a,_ = GetSpellCooldown("Shield Slam") if (a == 0) and IsSpellInRange("Shield Slam", "target")==1 then CastSpellByName("Shield Slam") end /run i=1 d=120 while(i<=40)do a={UnitDebuff("target",i)} if a[1]=="Sunder Armor" and a[8]=="player" then d=a[7]-GetTime() if a[4]==5 then break end end i=i+1 end if i>40 or d<4 then CastSpellByName("Devastate") end /run if GetSpellCooldown("Revenge")==0 and IsUsableSpell("Revenge")==1 then CastSpellByName("Revenge") end /run local _,a,_ = GetSpellCooldown("Thunder Clap") if (a == 0) then CastSpellByName("Thunder Clap") end /run local _,a,_ = GetSpellCooldown("Shockwave") if (a == 0) and IsSpellInRange("Shockwave", "target")==1 then CastSpellByName("Shockwave") end /run local _,a,_ = GetSpellCooldown("Concussion blow") if (a == 0) and IsSpellInRange("Concussion blow", "target")==1 then CastSpellByName("Concussion blow") end /run local _,a,_ = GetSpellCooldown("Heroic Throw") if (a == 0) and IsSpellInRange("Heroic Throw", "target")==1 then CastSpellByName("Heroic Throw") end /run if UnitPower("Player") > 79 then CastSpellByName("Heroic Strike") end /run if UnitPower("Player") > 20 then CastSpellByName("Devastate") end /run if UnitHealth('player')<10000 then RunMacroText("/use Medallion of Heroism") end /run StaticPopup_Hide("MACRO_ACTION_FORBIDDEN");
Knowledge is often mistaken for intelligence. This is like mistaking a cup of milk for a cow.
Ok guys i was trying out the Death Knight Macro but i cant get it to work can you guy help me ? i paste it in the SDM under scipt but just cant get it to work.. pls help me
@asdjaa
Shouldn't that line be changed to elseif (cp == 4) if you want it to Envenom on 4 points?elseif (cp >= 1) and (snd <= 5.0) then
if (energy >= 40) then
RunMacroText("/cast Envenom");
end
Last edited by Gnobiwan; 12-27-2009 at 03:30 AM.
i opened SDM macro clicked on New to make a new macro then i choose the option "Script" then i copy and paste to in teh box but i dont know how to run it can some one help me ?? im using the DK macro
Wow Awesome job on the prot warrior script absolutely loving it, when you have a moment and i'm sure it'll take a while, could you add a little more functionailit to the arms warrior script.
I was wondring if the following features could be added:
Victory Rush
Change to Berserker Stance and pummel on target casting, then back to battle stance
Use of Enraged Regeneration, (perhaps use of health stone to).