View Full Version : Out of combat hunter mana script
Pocalypse
05-18-2009, 07:11 AM
I'm currently leveling a DK / MM hunter combo, and I've got a pretty high dps macro for my hunter, but it results in him going OOM after 3 mobs, and staying OOM from then on.
I'm looking for a macro I can run when out of combat that will do the following:
If (mana < 15%) and (aspect of the hawk is active) then (cast aspect of the viper)
If (mana > 90%) and (aspect of the viper is active) then (cast aspect of the hawk)
I think this should be possible using a /script command, and I know it will only work out of combat.
Unfortunately I don't know enough wow scripts to write this myself.
Can anyone help please?
ElectronDF
05-18-2009, 07:40 AM
No macro can EVER check for health or mana (mana <15%, health >50%, etc). They took that out like 2 years ago. When I am killing mobs on my mixed group, I just either----use autoshot on my hunter since it does really good damage anyway therefore no/little mana or just run in viper all the time and not having to watch his mana is kinda nice. No worrying about what he is doing, just blasting away on his own and mobs dying. In an instance, I pick one of my keys to be a recharge button. The hunters switch to viper, the casters switch to wand. I do that when the mob is about 30% since it is going to die anyway. Then right before the pull I push it again and the hunters go back to normal. My mixed group hunters usually get close to pulling aggro, since they do pretty good DPS, so the viper is a nice way to make sure they stay below my tank and never run out of mana.
Hope that helps and good luck.
Pocalypse
05-18-2009, 07:43 AM
Ok, I thought you could still do stuff like that, just not in combat.
Thanks for the help, I'll try your methods or try thinking of something else.
Khatovar
05-18-2009, 07:52 AM
You can also just drink out of combat. Water is cheap.
No macro can EVER check for health or mana (mana <15%, health >50%, etc)Not when in combat, but when out of combat you can use a script to write a casting macro based on such a condition.
At best, you could write an addon(or use an existing one, like Jamba) that warns you when you (or any other of your characters) are below a certain amount of mana.
Nolife
05-18-2009, 08:32 AM
I think you should be able to run something like:
/script if (UnitPower("player") / UnitPowerMax("player") < 0.5 ) then CastSpellByName("Aspect of the Viper"); else CastSpellByName("Aspect of the Hawk"); end
I'm at work so can't test any scripts. That's just something off the top of my head...
I think you should be able to run something like:
/script if (UnitPower("player") / UnitPowerMax("player") < 0.5 ) then CastSpellByName("Aspect of the Viper"); else CastSpellByName("Aspect of the Hawk"); end
I'm at work so can't test any scripts. That's just something off the top of my head...
That's never going to work.
CastSpellByName is a protected script call that can only be called from Blizzard code.
Pocalypse
05-18-2009, 09:10 AM
Ok, I found a way to make it work. This very much feels like it's leaning on the border of exploits and ToS breaking though.
See this thread ('http://forums.worldofwarcraft.com/thread.html?topicId=15973448224&sid=1') for an explanation of the method used (the original post is linked a few posts down).
I made one macro that does this and placed it in MacaroonButton101:
/run u=nil w=nil
/run a={"Aspect of the Viper","Aspect of the Hawk"} if UnitPower("player")/UnitPowerMax("player")*100<=15 then u=a[1] w=a[2] end
/run a={"Aspect of the Viper","Aspect of the Hawk"} if UnitPower("player")/UnitPowerMax("player")*100>=90 then u=a[2] w=a[1] end
/run if UnitAura("player",w) then EditMacro(GetMacroIndexByName("Manatest"),"Manatest",1,"/cast "..u,1,1) else EditMacro(GetMacroIndexByName("Manatest"),"Manatest",1,"",1,1)end
then dragged a macro called Manatest to MacaroonButton99 (using original macro interface),
then added the following two lines to the top of my dps macro
/click [nocombat] MacaroonButton101
/click [nocombat] MacaroonButton99
Testing on some target dummies, this seems to work (only out of combat, which is what I want).
Edit: Tested out in the real world, changed macro a tiny bit, works like a charm.
Tonyx
05-18-2009, 09:16 AM
Nice macro. Will probably come in handy for other multibox problems too.
Gaffy
05-18-2009, 11:34 PM
On my hunter I use 2 macros, one casts viper if out of combat
/cast [nocombat] !Aspect of the Viper
the "!" tells wow to turn on the aspect, but won't toggle it like it would if it wasn't there.
And then I have
/cast [combat] !Aspect of the Dragonhawkat the beginning of all of his attack macros.
Jafula
05-19-2009, 02:43 AM
Ok, I found a way to make it work. This very much feels like it's leaning on the border of exploits and ToS breaking though.IMHO it's fine. You are just doing what a lot of addons do. Smartbuff, Buffet, Jamba all edit macros out of combat to make playing WoW easier.
Nice script as well :)
Pocalypse
05-19-2009, 08:37 AM
Ok, I found a way to make it work. This very much feels like it's leaning on the border of exploits and ToS breaking though.IMHO it's fine. You are just doing what a lot of addons do. Smartbuff, Buffet, Jamba all edit macros out of combat to make playing WoW easier.
Nice script as well :)
Thanks for the input Jafula, makes me a lot more confident about using this.
vBulletin® v4.2.2, Copyright ©2000-2025, Jelsoft Enterprises Ltd.