Thread Tools Display Modes
04-22-10, 11:00 AM   #1
nightcracker
A Molten Giant
 
nightcracker's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 716
Automatic water macro

Hi all!

I spent a few hours creating a macro that will try to use conjured food first, after that your own food, and if that is not usable arena food.

Code:
/stopmacro [combat]
/run local d,c,i,f=33445,43523,"item",f82Ht or CreateFrame("Button","f82Ht",nil,"SecureActionButtonTemplate")f.s=f.SetAttribute;f.s(f,"type",i)f.s(f,i,"item:"..(GetItemCount(c)>0 and c or IsUsableItem(d)and d or 43236))
/click f82Ht
I created a second macro, conjure refreshment if you have none, else eat it. Change the red number to 43518 for rank 1. I couldn't fit in a /stopmacro, so use with care(I don't think SetAttribute gives error messages, I think it fails silently).

Code:
/run local c,t,i,s,f=43523,"type","item","spell",G49jS or CreateFrame("Button","G49jS",nil,"SecureActionButtonTemplate")f.s=f.SetAttribute;if GetItemCount(c)>0 then f.s(f,t,i)f.s(f,i,"item:"..c)else f.s(f,t,s)f.s(f,s,GetSpellInfo(42955))end
/click G49jS
You can edit the macro to your needs. The red number is the ID of the normal food(in this case Honeymint Tea), the green number is the ID of the conjured food(in this case Conjured Mana Strudel) and finally the yellow number(all the way in the end of the macro) is the ID of the arena food(in this case Star's Sorrow).

The button names are randomized to reduce the stress on the global environment.
__________________
Three things are certain,
Death, taxes and site not found,
You, victim of one.

Last edited by nightcracker : 04-22-10 at 11:49 AM.
  Reply With Quote
04-22-10, 11:13 AM   #2
Petrah
A Pyroguard Emberseer
 
Petrah's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2008
Posts: 2,988
http://www.wowinterface.com/download...70-Buffet.html
  Reply With Quote
04-22-10, 11:48 AM   #3
nightcracker
A Molten Giant
 
nightcracker's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 716
I know, but I wanted it in a MACRO :P

I created a second macro, conjure refreshment if you have none, else eat it. Change the red number to 43518 for rank 1. I couldn't fit in a /stopmacro, so use with care(I don't think SetAttribute gives error messages, I think it fails silently). Buffet can't do this!

Code:
/run local c,t,i,s,f=43523,"type","item","spell",G49jS or CreateFrame("Button","G49jS",nil,"SecureActionButtonTemplate")f.s=f.SetAttribute;if GetItemCount(c)>0 then f.s(f,t,i)f.s(f,i,"item:"..c)else f.s(f,t,s)f.s(f,s,GetSpellInfo(42955))end
/click G49jS
o.0 I think I'm the first ever to create an autoconjure macro after the 2.0 patch.
__________________
Three things are certain,
Death, taxes and site not found,
You, victim of one.

Last edited by nightcracker : 04-22-10 at 11:51 AM.
  Reply With Quote
04-22-10, 02:36 PM   #4
krowbar71
A Defias Bandit
Join Date: Oct 2008
Posts: 2
Doesn't buffet work by creating and updating macro?
  Reply With Quote
04-22-10, 03:03 PM   #5
nightcracker
A Molten Giant
 
nightcracker's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 716
Originally Posted by krowbar71 View Post
Doesn't buffet work by creating and updating macro?
Yes it does.
__________________
Three things are certain,
Death, taxes and site not found,
You, victim of one.
  Reply With Quote
04-22-10, 04:31 PM   #6
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,323
If I remember right, food and drink items don't trigger the GCD, so it may be possible to just list them in the macro in order of what you want to fall back on if the first doesn't exist.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
04-22-10, 07:18 PM   #7
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Yes.

/use water1
/use water2
/use water3
/use water4


Or...

/cast [btn:2] Conjure Mana Strudel
/stopmacro [btn:2]
/use water1
/use water2
/use water3
/use water4
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » Released AddOns » Automatic water macro

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off