Milling macros?

UI and Macro
So I'm lvling a scribe right now, and, well, I keep hearing people talking about milling macros, prospecting macros, etc.

Now, I've never had a use for those, but I'm ALL about macros.

Somebody care to explain and give me a jumpstart on settin some up? thanks :D
This is the most basic form of a milling/prospecting macro:#showtooltip
/use Milling
/stopmacro [mod]
/use Fool's Cap
/use Snow Lily
/use Silkweed
/use Green Tea Leaf
/use Rain Poppy


This simply casts Milling then immediately "uses" the first available herb, causing you to mill it.

The /stopmacro line prevents it from using a herb if you hold down any modifier, which is useful if you need to manually target an item for some reason.

You can use the same macro for Prospecting, just change "Milling" to "Prospecting" and replace the herbs with ores. You can even do the same for Disenchanting if you want to mass-DE lots of the same few items.

Some AddOns like Panda and TradeSkillMaster offer more advanced milling/prospecting macros, some of which can be slightly faster than the basic version.
A bit more advanced version: Run this before the start of a milling session:

/run function FnH() for i=0,4 do for j=1,GetContainerNumSlots(i) do local t={GetItemInfo(GetContainerItemLink(i,j) or 0)} if t[7]=="Herb" and select(2,GetContainerItemInfo(i,j))>=5 then return i.." "..j,t[1] end end end end

Then use this as your milling button:

/run local f,l,n=AuM or CreateFrame("Button","AuM",nil,"SecureActionButtonTemplate") f:SetAttribute("type","macro") l,n=FnH() if l then f:SetAttribute("macrotext","/cast Milling\n/use "..l) SetMacroItem("Macro Name",n) end
/click AuM

(change "Macro Name" to the name of the macro)

It will skip over stacks less than 5, it will also mill herbs from past expansions and it will change the macro's icon to the current herb you're milling and how many of that herb you have left.
When I use that, it only tries to mill the first macro line's herb- in this case, Fool's Cap :( So basically all the others are just wasted space. So basically I need to rewrite the macro for each individual herb type? Still better than doing it all manually I suppose
01/23/2013 10:08 PMPosted by Níghtkníght
When I use that, it only tries to mill the first macro line's herb- in this case, Fool's Cap :( So basically all the others are just wasted space. So basically I need to rewrite the macro for each individual herb type? Still better than doing it all manually I suppose

My basic macro will try to use the herbs in the order they're listed, using the first stack in your inventory. If you have less than 5 of the first herb in your backpack, it will use that instead of a complete stack of any other herb.

If you don't have any of the herb, it uses the next one.

Ro's macro is significantly more intelligent than my one.
A bit more advanced version: Run this before the start of a milling session:

/run function FnH() for i=0,4 do for j=1,GetContainerNumSlots(i) do local t={GetItemInfo(GetContainerItemLink(i,j) or 0)} if t[7]=="Herb" and select(2,GetContainerItemInfo(i,j))>=5 then return i.." "..j,t[1] end end end end

Then use this as your milling button:

/run local f,l,n=AuM or CreateFrame("Button","AuM",nil,"SecureActionButtonTemplate") f:SetAttribute("type","macro") l,n=FnH() if l then f:SetAttribute("macrotext","/cast Milling\n/use "..l) SetMacroItem("Macro Name",n) end
/click AuM

(change "Macro Name" to the name of the macro)

It will skip over stacks less than 5, it will also mill herbs from past expansions and it will change the macro's icon to the current herb you're milling and how many of that herb you have left.


Ro, how do you make it skip over stacks less than 5?
Ro, how do you make it skip over stacks less than 5?

Ro's macro should already do that.
Yeah I wanted to use your macro but it always breaks ):

Hence why I wanted to know how to skip partial stacks
There's no way to skip partial stacks without an AddOn or a complex script like Ro's. My macro just "uses" the first stack of the herb in your bags.
My milling macro is
#showtooltip
/cast milling
/use green tea leaf
/use fool's cap
etc etc

The problem is when I run out of Green Tea Leaves the macro stops. I have several stacks of Fool's Cap and several stacks of Silkweed etc, but the macro does not mill them.

The macro only mills the first item in the macro, then stops working when there are no more of that item to be milled.

Help?
The problem is when I run out of Green Tea Leaves the macro stops. I have several stacks of Fool's Cap and several stacks of Silkweed etc, but the macro does not mill them.

The macro only mills the first item in the macro, then stops working when there are no more of that item to be milled.

Help?

Are you sure you don't have a partial (< 5) stack of Green Tea Leaves left somewhere in your bags? That usually causes the basic form of macro like yours to stall.
The problem is when I run out of Green Tea Leaves the macro stops. I have several stacks of Fool's Cap and several stacks of Silkweed etc, but the macro does not mill them.

The macro only mills the first item in the macro, then stops working when there are no more of that item to be milled.

Help?

Are you sure you don't have a partial (< 5) stack of Green Tea Leaves left somewhere in your bags? That usually causes the basic form of macro like yours to stall.


That certainly is a possibility. I did not know the macro only worked with a minimum of 5 of any given herb. This does make sense, as the macro will be looking for a 5 stack to mill, but will only find >5 and then not work.

Thank you so much for the input. I hope this helps others as well.
Just use Ro's script as they have it, works fine. You cut-n-paste and make a simple modification. Don't know why you would use the basic one, it breaks when you have less than 5 and when you don't have one of the herbs in the sequence, which was annoying. Thanks, Ro for a real useful script and macro combo.
12/21/2013 10:49 PMPosted by Lindalcron
Don't know why you would use the basic one, it breaks when you have less than 5 and when you don't have one of the herbs in the sequence


The simple macro stops when you have a stack less than five, but it works fine if you don't have a given herb. Using the order of Choonster's macro for example, if you have zero Fool's Cap but a stack of 20 Snow Lily, it mills through without any problems at all.

Ro's complicated script (and I don't say it that way to disparage it) still has its flaws. If I have a stack of four Green Tea Leaf in one slot, and one Green Tea Leaf in another, the preliminary script won't pick up Green Tea Leaf for milling.

There is still a bit of manual herb management to deal with as well, since it doesn't consolidate stacks -- which realistically is probably outside the realm of a simple macro and more into full-blown addon territory. But one stack of 13, say, and a stack of 18 will need to be manually merged.

If I need to consolidate stacks already, it's really not that much more difficult to just make sure the stacks are all multiples of five. I take up a few inventory slots in the bank to move the 4-or-less herbs out of my bags, and the simple macro works just fine.
Is there a way to edit Ro's macro to work for prospecting?
Run this once before a prospecting session:

/run function FnO() for i=0,4 do for j=1,GetContainerNumSlots(i) do local t={GetItemInfo(GetContainerItemLink(i,j) or 0)} if t[7]=="Metal & Stone" and select(2,GetContainerItemInfo(i,j))>=5 then return i.." "..j,t[1] end end end end

Use this as your prospecting button:

/run local f,l,n=AuP or CreateFrame("Button","AuP",nil,"SecureActionButtonTemplate") f:SetAttribute("type","macro") l,n=FnO() if l then f:SetAttribute("macrotext","/cast Prospecting\n/use "..l) SetMacroItem(GetRunningMacro(),n) end
/click AuP

But note that smelted bars, engineered stones (like dense stone), and possibly other metals/rocks are in the same item group as ore ("Metal & Stone"). It can potentially stop on those. The macro's icon will change to what it's trying to prospect so you should see the non-ore if it does stop.
06/13/2013 11:55 PMPosted by Choonster
The problem is when I run out of Green Tea Leaves the macro stops. I have several stacks of Fool's Cap and several stacks of Silkweed etc, but the macro does not mill them.

The macro only mills the first item in the macro, then stops working when there are no more of that item to be milled.

Help?

Are you sure you don't have a partial (< 5) stack of Green Tea Leaves left somewhere in your bags? That usually causes the basic form of macro like yours to stall.


Positioning of the herbs in the bags is also a factor. If the macro sees a partial stack first, it will attempt to mill, and you'll get an error. Make sure to place all stacks capable of milling in the top left bag slots.
01/23/2013 10:06 PMPosted by Ro
A bit more advanced version: Run this before the start of a milling session:

/run function FnH() for i=0,4 do for j=1,GetContainerNumSlots(i) do local t={GetItemInfo(GetContainerItemLink(i,j) or 0)} if t[7]=="Herb" and select(2,GetContainerItemInfo(i,j))>=5 then return i.." "..j,t[1] end end end end

Then use this as your milling button:

/run local f,l,n=AuM or CreateFrame("Button","AuM",nil,"SecureActionButtonTemplate") f:SetAttribute("type","macro") l,n=FnH() if l then f:SetAttribute("macrotext","/cast Milling\n/use "..l) SetMacroItem("Macro Name",n) end
/click AuM

(change "Macro Name" to the name of the macro)

It will skip over stacks less than 5, it will also mill herbs from past expansions and it will change the macro's icon to the current herb you're milling and how many of that herb you have left.


Works like a charm!

TY.
01/23/2013 10:06 PMPosted by Ro
A bit more advanced version: Run this before the start of a milling session:

/run function FnH() for i=0,4 do for j=1,GetContainerNumSlots(i) do local t={GetItemInfo(GetContainerItemLink(i,j) or 0)} if t[7]=="Herb" and select(2,GetContainerItemInfo(i,j))>=5 then return i.." "..j,t[1] end end end end

Then use this as your milling button:

/run local f,l,n=AuM or CreateFrame("Button","AuM",nil,"SecureActionButtonTemplate") f:SetAttribute("type","macro") l,n=FnH() if l then f:SetAttribute("macrotext","/cast Milling\n/use "..l) SetMacroItem("Macro Name",n) end
/click AuM

(change "Macro Name" to the name of the macro)

It will skip over stacks less than 5, it will also mill herbs from past expansions and it will change the macro's icon to the current herb you're milling and how many of that herb you have left.


Nice, Here is a FnH version that will ignore also Golden Lotus, if u have any on your bags, since they can't be milled

/run function FnH() for i=0,4 do for j=1,GetContainerNumSlots(i) do local t={GetItemInfo(GetContainerItemLink(i,j) or 0)} if t[7]=="Herb" and t[1]~="Golden Lotus"and select(2,GetContainerItemInfo(i,j))>=5 then return i.." "..j,t[1] end end end end
this list run mills once on 1st herb in the list then stops

Join the Conversation

Return to Forum