Go to the LuaNinja Macro Collection thread and post your request there. I'd be glad to help but I know little of Fury warriors so would need assistance about what spells in which order with which priorities dependent on which debuffs etc etc.
Go to the LuaNinja Macro Collection thread and post your request there. I'd be glad to help but I know little of Fury warriors so would need assistance about what spells in which order with which priorities dependent on which debuffs etc etc.
Awesome post, thanks
What you're looking for should be here. http://www.mmowned.com/forums/ui-mac...utton-dps.html
Also thank you Viral Fly-By for all the creativity in creating macros, however I'll find it a little hard explaining your debuff-checking macros with all the advanced functions. This is my best bet for everyone to understand it.
Last edited by Elitetech; 12-21-2009 at 05:03 PM.
Knowledge is often mistaken for intelligence. This is like mistaking a cup of milk for a cow.
Wow REALLY great guide, best one I've ever seen.
Now onto the questions
I never coded Lua, but have Java experience so it kinda helps me see through the "jungle" =P
My question is, is it possible to get the remaining duration of a debuff on a target? specifically for my deathknight macro I want it to cast Pestilence as soon as MY Frost Fever or MY Blood Plague have only 4 seconds left on them.
As far as I see someone already said in this thread how to check for my Disease:
am I right in modifying it like this to archieve my goal?/run i=1 while(i<=40) do a={UnitDebuff("target",i)} if a[1]=="Blood Plague" and a[8]=="player" then break else i=i+1 end end if i>40 then CastSpellByName("Plague Strike") end
now I just need a way to check the time :x/run i=1 while(i<=40) do a={UnitDebuff("target",i)} if a[1]=="Blood Plague" and a[8]=="player" then (check the remaining duration of disease and if its < 4 then cast pestilence) end
thanks in advance for helping.
Are there any bigger documentations on the commands that can be used via this LuaNinja Method so I don't have to spam this thread too much with my problems =P (I tend to post before searching and after raging :x)
EDIT:
Oh and while I am at it: how can I check specific rune cooldowns and available runes? Solved, it's in the Macro Collection Thread
I made the Affliction warlock macro 100% after Elitistjerks which says
I won't see why you'd want to clip your dots hm?I reach 100% uptime just by clipping my dots, right?
"Clipping" a dot means reapplying it before its last tick. Although this increases your uptime (no more dot gaps), this is VERY bad for your dps. Why? Imagine a dot ticking every 3s. If you reapply it in the moment of its last tick, it is like resetting its tick counter, meaning there will be a gap of ~6s between two ticks instead of 3s. That is as bad as not reapplying it for 3s. Actually, it's even worse: You shortened its duration by one tick, meaning you have to reapply it more often, losing even more dps. So don't clip dots.
There are exceptions: If you know your target will be unreachable within a few seconds (e.g. Noth in Naxxramas porting to the other group), reapplying all dots is actually a good idea. If you are running around unable to cast anything but instants, clipping dots will save you time when you stand still again, and so on.
Knowledge is often mistaken for intelligence. This is like mistaking a cup of milk for a cow.
I'm sure you can check for the expiration time on the debuff, so something like this should work
Also for documentation the best place is the wowwiki.Code:/run if not UnitDebuff("target", "Frost Fever",unitCaster~="player") then CastSpellByName("Icy Touch") end /run if UnitDebuff("target", "Frost Fever",unitCaster~="player",expirationTime<=4) then CastSpellByName("Pestilence") end
World of Warcraft API - WoWWiki - Your guide to the World of Warcraft has all the functions with examples.
Knowledge is often mistaken for intelligence. This is like mistaking a cup of milk for a cow.
Haunt, for example, should be cast again at the very least 2 seconds before it fades. Travel + casting time is like ~4 seconds, this issue alone nets a large dps loss. Unstable affliction should also be cast again around the 1.5 second mark. Those are really the only issues, but the impact they have is huge.
Edit: another thing, if CoA has .5 / .75 secs left you should fill the gap with a life tap and then reapply the dot, not cast another shadow bolt.
Last edited by Bossqwerty; 12-21-2009 at 06:06 PM.
The expiration time is in the array returned from UnitDebuff...but it's based on GetTime() so you have to subtract to get actual time remaining.
So if there a Frost Fever or a Blood Plague applied by you that has less than 4 seconds remaining on the target, it will cast pestilence....otherwise it does nothing (so nothing if both are missing or if any that are present have more than 4 seconds remaining).Code:/run i=1 while(i<=40) do a={UnitDebuff("target",i)} if (a[1]=="Blood Plague" or a[1]=="Frost Fever")and a[8]=="player" and a[7]-GetTime()<4 then CastSpellByName("Pestilence"); break end end
This is preferred way to do it...passing in a filter like "expirationTime<4" will do nothing and probably make it never return any debuffs. That filter syntax seems to be completely bogus despite some examples in these forums. If you add any of those unitCaster~="player" things as parameters to UnitDebuff or UnitBuff, you basically never get anything back. I tested it extensively with tons of permutations on live and it never worked.
Also on the other subtopic, Elitetech is correct...clipping dots is bad...The only argument I could see would be starting to cast UA or Haunt if the cast time is less than the remaining duration.
Better? (nom nom copysauce)Code:Gnu #showtooltip Haunt /run i=1 while(i<=40) do a={UnitDebuff("target",i)} if (a[1]=="Corruption" or a[1]=="Curse of Agony")and a[8]=="player" and a[7]-GetTime()<1 then CastSpellByName("Life Tap"); break end end /run i=1 while(i<=40) do a={UnitDebuff("target",i)} if (a[1]=="Unstable Affliction")and a[8]=="player" and a[7]-GetTime()<1.5 then CastSpellByName("Unstable Affliction"); break end end /run i=1 while(i<=40) do a={UnitDebuff("target",i)} if (a[1]=="Haunt")and a[8]=="player" and a[7]-GetTime()<2 then CastSpellByName("Haunt"); break end end /run if not UnitDebuff("target", "Haunt",unitCaster~="player") then (GetSpellCooldown("Haunt") == 0) (RunMacroText("/castsequence reset=2 Haunt, Corruption")) end /run if not UnitDebuff("target", "Corruption",unitCaster~="player") then RunMacroText("/castsequence reset=2 Corruption, Unstable Affliction") end /run if not UnitDebuff("target", "Unstable Affliction",unitCaster~="player") then RunMacroText("/castsequence reset=2 Unstable Affliction, Curse of Agony") end /run if not UnitDebuff("target", "Curse of Agony",unitCaster~="player") then RunMacroText("/castsequence reset=2 Curse of Agony, Shadow Bolt") end /run local s,_,_,_,_,_,_,_=UnitChannelInfo("player"); if( s~="Drain Soul" ) then RunMacro("Julegoder") end Julegoder #showtooltip Haunt /run if not UnitBuff("player", "Life Tap") then CastSpellByName("Life Tap") end /run if UnitPower("Player") < 3000 then CastSpellByName("Life Tap") end /run i=1 while(i<=40) do a={UnitDebuff("target",i)} if (a[1]=="Corruption" or a[1]=="Curse of Agony")and a[8]=="player" and a[7]-GetTime()<1 then CastSpellByName("Life Tap"); break end end /run i=1 while(i<=40) do a={UnitDebuff("target",i)} if (a[1]=="Unstable Affliction")and a[8]=="player" and a[7]-GetTime()<1.5 then CastSpellByName("Unstable Affliction"); break end end /run i=1 while(i<=40) do a={UnitDebuff("target",i)} if (a[1]=="Haunt")and a[8]=="player" and a[7]-GetTime()<2 then CastSpellByName("Haunt"); break end end /run if not UnitDebuff("target", "Haunt",unitCaster~="player") then (GetSpellCooldown("Haunt") == 0) (RunMacroText("/castsequence reset=2 Haunt, Corruption")) end /run if not UnitDebuff("target", "Corruption",unitCaster~="player") then RunMacroText("/castsequence reset=2 Corruption, Unstable Affliction") end /run if not UnitDebuff("target", "Unstable Affliction",unitCaster~="player") then RunMacroText("/castsequence reset=2 Unstable Affliction, Curse of Agony") end /run if not UnitDebuff("target", "Curse of Agony",unitCaster~="player") then RunMacroText("/castsequence reset=2 Curse of Agony, Shadow Bolt") end /run if (UnitHealth("target")/UnitHealthMax("target")<0.25) then CastSpellByName("Drain Soul") else CastSpellByName("Shadow Bolt") end
Knowledge is often mistaken for intelligence. This is like mistaking a cup of milk for a cow.
Might be the problem with huge macros I've experienced before. Try splitting it up like this
Code:Gnu #showtooltip Haunt /run i=1 while(i<=40) do a={UnitDebuff("target",i)} if (a[1]=="Corruption" or a[1]=="Curse of Agony")and a[8]=="player" and a[7]-GetTime()<1 then CastSpellByName("Life Tap"); break end end /run i=1 while(i<=40) do a={UnitDebuff("target",i)} if (a[1]=="Unstable Affliction")and a[8]=="player" and a[7]-GetTime()<1.5 then CastSpellByName("Unstable Affliction"); break end end /run i=1 while(i<=40) do a={UnitDebuff("target",i)} if (a[1]=="Haunt")and a[8]=="player" and a[7]-GetTime()<2 then CastSpellByName("Haunt"); break end end /run RunMacro("Gnu2") Gnu2 /run if not UnitDebuff("target", "Haunt",unitCaster~="player") then (GetSpellCooldown("Haunt") == 0) (RunMacroText("/castsequence reset=2 Haunt, Corruption")) end /run if not UnitDebuff("target", "Corruption",unitCaster~="player") then RunMacroText("/castsequence reset=2 Corruption, Unstable Affliction") end /run if not UnitDebuff("target", "Unstable Affliction",unitCaster~="player") then RunMacroText("/castsequence reset=2 Unstable Affliction, Curse of Agony") end /run if not UnitDebuff("target", "Curse of Agony",unitCaster~="player") then RunMacroText("/castsequence reset=2 Curse of Agony, Shadow Bolt") end /run local s,_,_,_,_,_,_,_=UnitChannelInfo("player"); if( s~="Drain Soul" ) then RunMacro("Julegoder") end Julegoder #showtooltip Haunt /run if not UnitBuff("player", "Life Tap") then CastSpellByName("Life Tap") end /run if UnitPower("Player") < 3000 then CastSpellByName("Life Tap") end /run i=1 while(i<=40) do a={UnitDebuff("target",i)} if (a[1]=="Corruption" or a[1]=="Curse of Agony")and a[8]=="player" and a[7]-GetTime()<1 then CastSpellByName("Life Tap"); break end end /run i=1 while(i<=40) do a={UnitDebuff("target",i)} if (a[1]=="Unstable Affliction")and a[8]=="player" and a[7]-GetTime()<1.5 then CastSpellByName("Unstable Affliction"); break end end /run i=1 while(i<=40) do a={UnitDebuff("target",i)} if (a[1]=="Haunt")and a[8]=="player" and a[7]-GetTime()<2 then CastSpellByName("Haunt"); break end end /run RunMacro("Julegoder2") Julegoder2 /run if not UnitDebuff("target", "Haunt",unitCaster~="player") then (GetSpellCooldown("Haunt") == 0) (RunMacroText("/castsequence reset=2 Haunt, Corruption")) end /run if not UnitDebuff("target", "Corruption",unitCaster~="player") then RunMacroText("/castsequence reset=2 Corruption, Unstable Affliction") end /run if not UnitDebuff("target", "Unstable Affliction",unitCaster~="player") then RunMacroText("/castsequence reset=2 Unstable Affliction, Curse of Agony") end /run if not UnitDebuff("target", "Curse of Agony",unitCaster~="player") then RunMacroText("/castsequence reset=2 Curse of Agony, Shadow Bolt") end /run if (UnitHealth("target")/UnitHealthMax("target")<0.25) then CastSpellByName("Drain Soul") else CastSpellByName("Shadow Bolt") end
Knowledge is often mistaken for intelligence. This is like mistaking a cup of milk for a cow.
Ahhh, now I see and understand. a is actually an array with informations from the UnitDebuff function...brilliant! And thanks to Elitetech's link to the API stuff I now know what is stored where *drool* this is exciting, I'm feeling like a little kid again, gotta whatch not to fall in love with this too much as I will miss it if it's taken away T_T
+Rep'ed Elitetech already and now +rep to you also!
Nice one :O
+rep'd