Skip to content

Instantly share code, notes, and snippets.

@Road-block
Last active September 24, 2017 03:44
Show Gist options
  • Save Road-block/8209518f3e7368b66bebb865821bb566 to your computer and use it in GitHub Desktop.
Save Road-block/8209518f3e7368b66bebb865821bb566 to your computer and use it in GitHub Desktop.
smart eat / drink macro (vanilla)
/run local e,d,s,u,a,p,x,z,f,b,_="INV_Misc_Fork&Knife","INV_Drink_07",strfind,UnitBuff,UseAction,"player",115,116;for i=1,32 do f=(s((u(p,i))or"",e))if(f)then x=nil end;b=(s((u(p,i))or"",d))if(b)then z=nil end;end;_=((x)and a(x))or((z)and a(z))
@Road-block
Copy link
Author

Road-block commented Sep 24, 2017

Use the following macro / command while hovering the action buttons you have your food and drink and use the food button number in place of 115 above and the drink button number in place of 116 above.
/run local a=GetMouseFocus()message(ActionButton_GetPagedID(a))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment