Saturday, April 21, 2012

Conditional Macros

Hi Folks, I'm trying to write a macro to conditionally run a mod command. I understand how to write conditional macros, and I know how to script mod commands, but I can't seem to figure out how to do both.

And example:

I want to equip my Outfitter DPS suit when I switch into shadowform

/cast [stance:0] Shadowform

/outfitter wear DPS

/cancelaura [stance:1] Shadowform

/outfitter wear Healing

Obviously lines 2 and 4 are not perfect. I only want to run line 2 if stance is 0 and run line 4 if stance is 1.

Any help would be appreciated.|||You can't use conditional logic in macros, apart from the simple conditions used in /cast and /castsequence. Anything else Blizzard considers botting and can permaban you.|||Not true at all. You can use condionals in macros but you have to do it through a lua script and it won't work combat.|||that's easy to do, but can only be done properly if you have Supermacro. Here's how:

Shadow Macro

/cast [stance:0] Shadowform

/equip "dps gear" /script SetActionMacro( lastActionUsed, Heal)

Heal Macro

/cancleaura [stance:1] Shadowform

/equip "healing gear" /script SetActionMacro( lastActionUsed, Shadow)

Set one macro on a hotkey. Now, everytime you run one, they'll switch.

This can also be done for driud using the same idea.

Let me know if it works for you.

Note: this is NOT conditional logic, as it does not check for a condition to make a decision.|||Why??

Outfitter already has special outfits for all stances. Simply use the facilities provided by the addon rather than trying to work around it with macros. ie: In outfitter scroll down to the bottom of the list and find Shadowform, then setup the kit you want there then Outfitter will do the job for you no macros required.

No comments:

Post a Comment