Check Buff Macro

I tried around with the UnitBuff macro to make a Macro that check if i have the buff and if i don’t use a “potion”, I want to bind a macro to my mount hotkey, to always use a “Pink Gumball” if i dont have it’s buff already, the problem is that, the food has no cooldown thats why i either need to time it to 5 mins, so i only consume 1 after the last one’s buff went off, or a macor that check if i have the buff and won’t eat an another piece. Any ideas?

You can’t combine buff checking with secure commands like /cast or /use

I used to use the Ifthen addon for it sadly its discontinued with it you could made macros with buff checking :C

You can check for buffs and if you are not in combat, you can rewrite other macros etc, but you can’t do this type of thing in combat, because you could basically automate your rotation using the same tools. Doing that sort of thing outside of combat is possible, but it’s acceptable before trying to implement it.

I use my own addon to rewrite my macros based on what food/drink I have in my bags, what talents I have selected and also what zone I’m in. Equipping certain trinkets will also edit some macros as longer cooldown trinkets are tied to longer cooldown abilities and short cooldowns are tied to others.

Since you can only mount out of combat, the thing you want to do is probably actually possible. So what you do is have two macros and the first one determines what you want to do and edits the second macro and then does a /click on the action button that the macro is tied to.

Here’s a simple example that doesn’t check for any buffs, but you can easily addd that in the Lua script. It just edits my “assist” macro to eat a mana bun and then clicks that button. I tested it and it works.

/stopmacro [combat]
/script local mi=GetMacroIndexByName("Assist");if mi then local nm,tx,bd,iL=GetMacroInfo(mi);EditMacro(mi,nm,nil,"/use Conjured Mana Bun",iL);end
/click MultiBarRightButton1

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.