Addon/Script to Dynamically Macro DPS Potions?

Does anyone know of an existing addon, or is it possible to script one, that would allow me to place something like DPS_POT into a macro as a “spell” and have it automatically substitute that with whatever DPS Potion I have in my bags based off a predefined list?

I want to be able to do something like…

#showtooltip
/cancelaura [mod:shift]Dispersion
/use [mod:shiftalt] DPS_POT; [mod:shift] Dispersion; [mod:alt,@mouseover,help,nodead] [mod:alt,@focus,help,nodead] [mod:alt] Power Infusion; !Shadowform
/cast [mod:alt,@player]Power Infusion

and have it function like this, assuming I have Elemental Potion of Power (191389) in my bags.

#showtooltip
/cancelaura [mod:shift]Dispersion
/use [mod:shiftalt] item:191389; [mod:shift] Dispersion; [mod:alt,@mouseover,help,nodead] [mod:alt,@focus,help,nodead] [mod:alt] Power Infusion; !Shadowform
/cast [mod:alt,@player]Power Infusion

Select was built for swapping out items/spells from a predefined list in a macro. It can handle [condition]s too.

For this particular macro, however, it needs a little more room to add a /click line. Dropping the cancelaura:

#showtooltip
/select [mod:shiftalt]i:potion;[mod:shift]Dispersion;[mod:alt,@mouseover,help,nodead][mod:alt,@focus,help,nodead][mod:alt]Power Infusion;!Shadowform
/cast [mod:alt,@player]Power Infusion

To do its thing it needs to add a /click line so the macro ends up looking like:

#showtooltip
/select [mod:shiftalt]i:potion;[mod:shift]Dispersion;[mod:alt,@mouseover,help,nodead][mod:alt,@focus,help,nodead][mod:alt]Power Infusion;!Shadowform
/click [btn:2]S025M;S025A X 1
/cast [mod:alt,@player]Power Infusion

With the cancelaura it exceeds 255 characters.

While shiftalt is down, right-click the above macro on your bar to show a flyout of all potions in your bags (i:potion is shortcut for item:potion). When you click a potion in the flyout it because the current action for shiftalt. You can change while in combat too.

edit: just tried and it works but the tooltip is wrong one one of them I can’t explain yet. Also item:potion picks up all items with “potion” in its name. type:potion may be a better choice for potions without the word “potion” in its name.

1 Like

You’re an absolute legend as always Gello :heart:

PS - Not seeing any tooltip issues with v3.4.12

Changed up my implementation to the following:

Made a dedicated potion macro:

#showtooltip
/select type:potion

Changed my original macro to a click the button for potions (oddly getting a tooltip for the button click which is cool).

#showtooltip
/cancelaura [mod:shift]Dispersion
/click [mod:shiftalt] BT4Button35
/stopmacro [mod:shiftalt]
/cast [mod:shift]Dispersion;[mod:alt,@mouseover,help][mod:alt,@focus,help][mod:alt]Power Infusion;!Shadowform
/cast [mod:alt,@player]Power Infusion
1 Like

With a dedicated macro you have a lot more characters, so you can do lots more. For instance if you only swapped between a handful of potions and don’t want others to show:

/select potion name, another potion, something else, etc

You can also mix and match

/select healthstone, grand expedition yak, toy:favorite, type:quest

(type:quest will pick up quest items in your bags so you can use them from a common hotkey without digging in your bags or clicking the objective tracker items.)

Alts can use the same macro and whatever was selected is remembered per character. There’s a bit more explanation in the options panel (interface options panels).

1 Like

And that’ll work for all ranks of a given potion name?

[added]
Just tested with Refreshing Healing Potion and it appears to only be displaying the lowest rank of the potion.

It just picks the first one it finds if you use the name. But if you use item:name it will pick up all ranks. The flyout buttons need to have rank icons added too it looks like.

1 Like

Weird, logged in this morning and this macro isn’t returning any results (or errors).

/select type;potion
/click [btn:2]S024M;S024A X 0

Deleting the click line individually, and deleting/remaking the whole macro didn’t fix the issue, neither did reloadui/relogging

If that’s a copy/paste, you want type:potion (colon) instead of type;potion (semicolon)

Yup… wonder how the hell I changed that.