Crafting Macro

Question

Is it possible to create a crafting macro in Classic, or is it disabled?

I found this post from 7th of Feb this year, but I can't get it to work. I just want it to simply craft all my Solid Stones to Solid Blasting Powder.

#showtooltip Solid Stone
/use Engineering
/run local n,c; for i=1,GetNumTradeSkills() do n,_,c = GetTradeSkillInfo(i); if (n==“Solid Blasting Powder”) then DoTradeSkill(i,c); end; end;

Update: I've been pulling my hair, I've built the macro from the ground up to understand it, and when I was done it worked. IT WORKED. It looked to be the same freaking code, but after a closer look, the qoutationmarks when copied from the wowforum is different

​

” vs "

This is the most stupid shit I've seen.

​

Posted May 2, 2020, 8:04 PM UTC · edited

217
gruntothesmitey•

I just want it to simply craft all my Solid Stones to Solid Blasting Powder

Why not just click the "Create All" button in the crafting window?

3
EyadishOP•

That is currently what I am doing, but I want a quick way to craft a few when I am waiting, and opening up the crafting window, scrolling down and find the correct recipie is in fact bothersome. I wouldn't mind a quicker way, but I am just not sure if it's been disabled in Classic.

2
gruntothesmitey•

Ah, I get you now. Yeah, it would be kinda cool, especially since the powder stacks in 20's and the stone in 10's.

1
EyadishOP•

Both stacks in 20 :) but there is a 2:1 ratio so it wastes less space in inventory

2
gruntothesmitey•

Oh right. What the hell eng/mining thing am I thinking of that stacks in 10? There's something I know and it always annoyed me.

At any rate, you are still doubling what you can carry since it takes two stones to make one powder! :)

1
FlackRacket•

That macro won't work, because wow classic uses the Legion macro api, not the vanilla wow api. It's much more restrictive.

AFAIK, there's no way to craft from a macro, but it can probably be done using an addon

1
EyadishOP•

I think that is from the modern macro API? I think the same type of macro is used in retail.

And why is there a post of people that, atleast have been using it?

1
FlackRacket•

If that macro is working in 2020, then it's on a private vanilla server

1
EyadishOP•

Well I got it working now :)

1
fakemessiah•

There's an add-on called skillet that will let you queue up different things to make and then process them all in a batch job. Maybe that will do what you want

1
EyadishOP•

Not really what I am looking for, I am looking for a way to fast craft a few while I am waiting for a pull or doing something, without going through the entire UI way.

Either way, while I would love to use Skillet, I am using TSM for the action data, and Skillet is not really friends with TSM.

1
justabottleofwater•

https://wow.gamepedia.com/API_C_TradeSkillUI.CraftRecipe

Not online to check if it works but the function was renamed in legion

1
EyadishOP•

I've tried both /run C_TradeSkillUI.CraftRecipe(12585,1) and /run DoTradeSkill(12585,1)

To my understanding the dotradeskill is the old API. And neither works for me.

​

When you have the chance to get online, would you mind to check both for any recipie that you have? I am thinking if my character/account have some problem with running these commands

1
justabottleofwater•

Opening engineering and calling

/Run DoTradeskill(2, 1) Works, where 2 is the index of Firework Cluster Launcher

https://i.imgur.com/cBluohv.png

Indices:

  1. Header (Consumable)
  2. Firework Cluster Launcher
  3. Red Firework

Your macro works, your quotation marks are wrong tho

/run local n,c; for i=1,GetNumTradeSkills() do n,_,c = GetTradeSkillInfo(i); if n == "Solid Blasting Powder" then DoTradeSkill(i,c); end; end;

1
EyadishOP•

Ye I added the quotation marks in the OP and said I solved it. Still funny as it was a copy paste from the wow forum (the post I linked to), so it wasn't really the first thing I looked at.

1