Change Milling macro to Prospecting

UI and Macro
I found this universal milling macro by Goriki on Wowhead (http://www.wowhead.com/spell=51005/milling#comments) and was trying to change it into a prospecting macro. It is a three part macro that I only use the first two parts (works well still for milling).
For some reason, I can't seem to quite get it working for prospecting even if I change the first macro to p, replace the second macro macro accordingly with herb to ore, m to p, milling to prospecting. Is there something mixed within the second macro that I should change to suit prospecting too, or what am I doing wrong with the macro?

By Goriki (1,271 – 3·9) on 2011/09/27 (Patch 4.2.2)
Ok out of boredom i tried to make a uniform macro:

You will need 3 macros:

First (has to be named "m" (without quotation marks)):
The code will be overwritten by the second macro so you dont need to type in anything.

Second:

/script for b=0,4 do for s=1,GetContainerNumSlots(b) do i=GetContainerItemID(b,s) if i then a,c,d=GetContainerItemInfo(b,s) n,a,d,e,f,g,t,h=GetItemInfo(i) if t=="Herb" and c>4 then EditMacro("m",nil,nil,"/cast Milling\n/use "..n) end end end end

It iterates through your bags and tests if the items are Herbs, you have enough (5) to mill and edits the macro named "m"
You don't use english client? Then just change "/cast Milling" into your language :)

Third:
/console AutoLootDefault 1
/click ActionButton2
/click ActionButton3

This is the actual macro you spam, so it also includes turning on autoloot. As you can see it clicks two buttons on your Actionbars.
Place Macro #1 and #2 on your Bars and edit those lines as you need them according to your macro placement.
Hum. Why so complicated?
I mean

/use Prospecting
/use Copper Ore
/use Tin Ore

and listing every other ore in there that you want should give you the same result no? If it finds less than 5 of any ore, it will fail.

And there's this solution as well courtesy of Choonster:
http://us.battle.net/wow/en/forum/topic/3932984255#3
The advantage to the OP's macro is it won't fail on stacks less than 5. It will skip over them and mill larger stacks further in bags.

replace the second macro macro accordingly with herb to ore

It's not actually "Ore" but "Metal & Stone". Also beware that smelted bars are also "Metal & Stone". But that's probably not an issue.

Here's a two-macro alternative for milling:

Run once on login:
/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))>4 then return i.." "..j,t[1] end end end end

Use as your milling button, replacing "mill2" with the name of this macro:
/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("mill2",n) end
/click AuM

A nice feature of this is it will update the macros icon to whatever you're milling and how many of that herb you have left.

Converted to prospecting:

Run once on login:
/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))>4 then return i.." "..j,t[1] end end end end

Use as your prospecting button, replacing "prospect2" with the name of this macro:
/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("prospect2",n) end
/click AuP

Untested but should work.
The advantage to the OP's macro is it won't fail on stacks less than 5. It will skip over them and mill larger stacks further in bags.


It worked perfectly! Thanks!!

Join the Conversation

Return to Forum