Trying to Update Clickable WA to use Fleeting before Regular Phial

I’m trying to adjust a WA that provides a button to click for missing buff. I want it to try to use the Fleeting Iced Phials of Corrupting Rage (from the cauldron) before it hits my personal stash. I have tried both with and without the “;”

if not aura_env.clickableFrame then
local r = aura_env.region
aura_env.clickableFrame = CreateFrame(“Button”, “ConsumeButton”, r, “SecureActionButtonTemplate”)
end

aura_env.clickableFrame:SetAllPoints()
aura_env.clickableFrame:RegisterForClicks(“LeftButtonDown”, “LeftButtonUp”)
aura_env.clickableFrame:SetAttribute(“type”, “macro”)
aura_env.clickableFrame:SetAttribute(“macrotext”, [[
/use item:204654;
/use item:191329;
/click StaticPopup1Button1
]])

They’re off the GCD and don’t incur a group cooldown so it’ll always use both in a macro like that.

You’ll need to check for the item and set the button to use one or the other. Alternatively, you could use something like Gello’s Select addon and manually switch your button between the two,
https://www.curseforge.com/wow/addons/select

You have to run code in the background that switches the button between the 2 phials, while out of combat. My own addon, while ooc, checks spots on my action bars, where I keep my pots, and updates clickable buttons in my UI.