I'm trying to write a macro that will try to use a healthstone, followed by a whipper root tuber, followed by a health potion, but once it successfully uses one of them I want it to stop (i.e. if the healthstone was used, don't use the tuber or health pot). Since none of these trigger the GCD nor share cooldowns, a simple fall-through macro doesn't work. I thought I had solved the problem with the following.
etc. (it's possible this code isn't factored correctly, I haven't done WoW API stuff in a long time)
The problem is that GetActionCount evaluates before the UI updates the fact that I used the healthstone, i.e. x and y are always the same even if I did in fact use a healthstone in between.
Does anyone know how to make a such a macro or generally how to make a macro that can register changes in item count (whether from the inventory or the action bar)?
Code:
/script x=GetActionCount(healthstoneSlot)
/script UseAction(healthstoneSlot)
/script y=GetActionCount(healthStoneSlot) if x-y==0 then x=GetActionCount(tuberSlot) UseAction(tuberSlot)...
etc. (it's possible this code isn't factored correctly, I haven't done WoW API stuff in a long time)
The problem is that GetActionCount evaluates before the UI updates the fact that I used the healthstone, i.e. x and y are always the same even if I did in fact use a healthstone in between.
Does anyone know how to make a such a macro or generally how to make a macro that can register changes in item count (whether from the inventory or the action bar)?