WoWInterface (
-   Macro Help (
-   -   Macro for Gnomish Gearworks items (

bsmorgan 11-25-14 05:16 PM

Macro for Gnomish Gearworks items
The Gnomish Gearworks building in my WoD garrison has a daily "invention" that you can pickup and use.

I'd like a macro that contains all possible items and uses whichever one you have for today. Is this possible? gives a list of the items.

bsmorgan 05-06-15 03:03 PM

Here's a macro that works, but the tooltip is only shown when I have a "Sticky Grenade Launcher". If I only have a "Sentry Turret Dispenser", then the macro "uses" the item, but the tooltip is "?".

Since I normally have at most two items from the gearworks, this macro plus another in the opposite order can be put on two action buttons and cover whatever two I have, but it would sure be nice to have them display the correct icon.

Anyone have any ideas?


/use Sticky Grenade Launcher
/use Sentry Turret Dispenser
/use Pneumatic Power Gauntlet
/use XD-57 "Bullseye" Guided Rocket Kit
/use Prototype Mekgineer's Chopper
/use "Skyterror" Personal Delivery System

Petrah 05-06-15 05:06 PM

I think castsequence is what you're after. Read through this thread to see if it helps shed some light.

I use it for both Kill Command and Bestial Wrath and it works quite well to show the correct icons.

Seerah 05-06-15 06:03 PM

No, because he wants to use whatever's available, not go through each item one-by-one.

bsmorgan: what you want isn't possible within the restrictions of a macro. It will only look at the first line of what you have there for the icon. You'll need to pick an icon to use for the macro as a whole.

Petrah 05-06-15 09:23 PM


Originally Posted by Seerah (Post 308646)
No, because he wants to use whatever's available,

I misunderstood. I use both spells in one macro, and it shows both icons.

Banknorris 05-06-15 10:34 PM

semlar 05-07-15 06:38 AM


Originally Posted by Banknorris (Post 308651)

You won't be able to fit the required script into the character limit of a macro.

Banknorris 05-07-15 07:14 AM

Just a suggestion if any addon developer is looking for something to do. I would do it but I am working on another addon at the moment and it would require me a lot of time to test parsing (I will get good at it some day). But you pros could do it in 15 minutes I think.
First, an addon that suppress the need of using #showtooltip (only in the cases you don't use parameters after it) in macros with this simple code (not only in the item macros but no macro would need a #showtooltip anymore to display the tooltip)
Lua Code:
  1. hooksecurefunc(GameTooltip,"SetAction",function(self,action)
  2.     local action_type,macro_id = GetActionInfo(action)
  3.     if action_type=="macro" then
  4.         local _,_,spell_id = GetMacroSpell(macro_id)
  5.         if spell_id then
  6.             GameTooltip:SetSpellByID(spell_id)
  7.         else
  8.             local _,link = GetMacroItem(macro_id)
  9.             if link then
  10.                 GameTooltip:SetHyperlink(link)
  11.             end
  12.         end
  13.         GameTooltip:Show()
  14.     end
  15. end)
This will give you space to put a /click N_items and N_items would pick the current macro text (by using GetMacroInfo(GetRunningMacro())), parse the lines with /use on them, get all items in the order they were put in the macro and do a check like in the link I provided. In this way you would avoid hardcoding the macro items into the addon. Just using the macro would inform the addon all the items to check and update the icon accordingly. This might not be all but I think the idea is clear enough.

bsmorgan 05-07-15 08:03 AM

Thanks for all the responses. Rather than create my own addon, I've decided to use Select.

While I'd like the icons to change based on which items I currently have available, I can live with a manual selection process. Generic icons won't work very well because most of these engineering gadgets have charge counts and I usually have two random items and a N.U.K.U.L.A.R. Target Painter).

All times are GMT -6. The time now is 10:23 PM.

vBulletin © 2018, Jelsoft Enterprises Ltd
© 2004 - 2017 MMOUI