Levitate Macro
Can someone write a macro that casts Levitate on a target/self but if it casts it on yourself it checks to whether or not you have it and if you do it debuffs it?
Sorry its kind of hard to explain. -_-. |
Not possible.
Macros work with very specific conditions, presence of a buff is not among them. |
You would need to use a modifier key to cancel the buff (and decide on your own when to use it), since macros cannot change which action they perform depending on whether or not you have a specific buff (or debuff).
Code:
/cancelaura [mod:shift] Levitate |
Quote:
|
I'm new with this forum, and with macros/addons but, what if you use UnitBuff to check if it has a buff active and do it?
Something like that: /run for i=1,40 do local name,_,_,_,_,_,_,_,_=UnitBuff("player",i);if name and name == "Levitate" then CancelUnitBuff("player", i) end end |
There's 2 problems with that, I think CancelUnitBuff() is a protected function, meaning not even a script can run it. Even if it wasn't, there wouldn't be a way to pass the condition through to affect the decision on whether or not to cast the spell since that's a protected function too (and so is StopMacro() that is called by the command /stopmacro).
|
Basically, Blizzard does not want addons/macros to be able to automatically check conditions and choose which ability to use. They want the player to have to make that decision.
They have given us a very limited number of conditions we can check for in macros, but if there is no macro conditional available for something you want to check, then there is no way for an addon or macro to be able to check it and choose which spell to cast on the fly. If you only want your button to work out of combat, you can get around the restrictions by writing an addon that responds to events, checks conditions, and edits a macro or sets attributes on a secure action button, but there is no way to make this work in combat. All of the functions for editing macros, changing button attributes, casting spells, running macros, targeting units, stopping macros, etc. are protected and cannot be called by addons. Even if you found a loophole, Blizzard would hotfix it immediately. |
All times are GMT -6. The time now is 07:20 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI