AutoDrink does indeed work with conditionals. (I tried this with [@Pet, exists] )
This is the makro I came up with:
#showtooltip
/AutoDrink [@arena1, exists] Conjured Manna Biscuit, Conjured Glacier Water, Star’s Tears; Conjured Manna Biscuit, Conjured Glacier Water, Purified Draenic Water
/click AutoDrink
However, it seems the [@arena1, exists] conditional does not work well for this purpose as most of the time it will be false eventhough I am in the arena.
Is there another conditional which can be applied to check whether I am in the arena?
EDIT:
I found the solution to it.
#showtooltip
/AutoDrink Conjured Manna Biscuit, Conjured Glacier Water, Purified Draenic Water
/click AutoDrink
/AutoDrink Conjured Manna Biscuit, Conjured Glacier Water, Star’s Tears
/click AutoDrink
/run UIErrorsFrame:Hide() C_Timer.After(0, function() UIErrorsFrame:Clear() UIErrorsFrame:Show() end)
(As the version above is too long, I replaced the items with their IDs but they are both the same.)
#showtooltip
/AutoDrink item:34062, item:22018, item:27860
/click AutoDrink
/AutoDrink item:34062, item:22018, item:32453
/click AutoDrink
/run UIErrorsFrame:Hide() C_Timer.After(0, function() UIErrorsFrame:Clear() UIErrorsFrame:Show() end)
If I have biscuits:
Both AutoDrink commands will select the biscuits. The first one will trigger the GCD of food and the second one will not be consumed due to the GCD. This happens inside and outside the arena.
If I do not have biscuits:
outside the arena: The first AutoDrink command will select the PDW and trigger the GCD of drinks. The second AutoDrink command will select the ST however it will not be consumed due to the GCD.
inside the arena: The first AutoDrink command will select the PDW however it cannot be consumed inside the arena. The second AutoDrink command will select the ST which will then be consumed.
The only shortcoming of this solution is that inside the arena when I do not have biscuits, the (greyed out) icon and tooltip of the GWD will be shown rather than the ones of he ST. This is acceptable though.
I hope this will help others who have the same question!