Log in

View Full Version : macro to check for buff



MustacheFart
02-04-2009, 10:19 PM
Hello all,

This is my first actual post but I've been lurking the forums reading all your valuable info for a while.

I need a little help with macros. I looked and looked for an answer to my question but I couldn't find it. Anyway, I remember seeing somewhere, either in a post or in a guide on the wiki. how to make a macro check for a buff on the player first but I can't for the life of me find it now.

Basically, I'd like to be able to check for certain buffs first before the macro does anything else. One example would be to make a macro for my priest in my 3-box party to buff each member without having to click on them first. Basically, one macro that I can bind to a key and spam until the whole party is buffed up. Anything like that?

If someone could just tell me how to make a macro check for a buff on someone that would be awesome.


Thanks,

MustacheFart

Bettysue
02-04-2009, 11:28 PM
something like
/run for i=1,40 do local B=UnitBuff("target",i); if B then print(i.."="..B) end end
can be done to print out the name of all the buff on the target. The bad part is blizzard has pretty much removed all functionality, from the macro side of the house, to do anything useful with this information. In short you can not cast anything based on ingame logic controls, or tests. You can however write or use an existing addon that can modify a button on the fly that will provide this functionality. Check out something like SmartBuff on the addon site of your chosing.

MustacheFart
02-04-2009, 11:39 PM
Well another idea I had which is pretty stupid but basically, I wanted a macro that says one of two things depending on if I'm mounted before using mount. So basically: Unmounted - I hit key-bind for macro, character says one thing, and then calls out mount; and Mounted - I hit key-bind for same macro, character says different thing, and then puts away mount. Wait a minute, isn't the a conditional for checking if someone is mounted like [ismounted] or something? Would that work in a /say command?

olipcs
02-05-2009, 04:43 AM
...as for the hole 'buffing' thing, I would simply use the addon SmartBuff, which handels most of the buffing for you...