in your browser.
Macro to clear junk from bags
Return to board index
I was wondering if it's possible to create a macro (if so, what would it be like) to throw away all junk in my bags. I was levelling in 1k needles and there are loads of quest items to pick up there, but the mobs also drop a lot of junk I need to pick up if I want to skin them as well...
Thanks in advance,
Im not sure if this can be done via a macro or not there are however mods that can do it for you.
I cant find the one i was looking for but
mod looks like it does what you want. I've not tried it personally though so im not sure how good it is.
Pshh who wants to take up addon space use this :P
/script for bag = 0, 4 do for slot = 1, GetContainerNumSlots(bag) do local name = GetContainerItemLink(bag,slot) if name and string.find(name,"ff9d9d9d") then DEFAULT_CHAT_FRAME:AddMessage("Selling "..name) UseContainerItem(bag,slot) end end end
take up addon space
Also your macro is not what he wanted, and isn't as well written as it could be. The OP was actually looking to throw away things:
/run ClearCursor()for b=0,4 do for s=1,GetContainerNumSlots(b)do local i,_,q=GetContainerItemLink(b,s)if i then _,_,q=GetItemInfo(i)if q==0 then PickupContainerItem(b,s)DeleteCursorItem()end end end end
Quality is returned from an API call. It's bad to rely on greys always showing up in a particular matter, and that may break in a future patch whereas mine won't. Also, spamming the chat frame is poor design at its worst. If it were up to me no addon would have access to
because it's so damned overused to the point of being annoying.
To be fair, the "look for the color grey" version has been floating around for quite a while...and I, for one, like to know what's been deleted, just because.
The "use" version is for selling at a merchant...if you're nowhere near a merchant, some variation of Neffy's is what you want.
Maybe we could put another boolean check in there, like "if merchant window open, then use else pickup/drop?"
EDIT: Got it working.
/run for b=0,4 do for s=1,GetContainerNumSlots(b)do local i,q=GetContainerItemLink(b,s) if i then _,_,q=GetItemInfo(i) if q==0 then if GetMerchantItemInfo(1) then UseContainerItem(b,s) else PickupContainerItem(b,s) DeleteCursorItem() end end end end end
This will trash the grey items if you're not in a merchant window, and sell them otherwise.
You are not logged in. Please
to post a reply or
if you don't already have an account.
© 2014 ZAM Network LLC