View Single Post
04-14-14, 05:10 AM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Not tested at all, but:
/run local i,n,t,k,q,_=2835,5 for b=0,4 do for s=1,32 do k=GetContainerItemLink(b,s) if k and k:find(":"..i.."%D") then t=GetItemCount(i) _,q=GetContainerItemInfo(b,s) if (t-q)>=n then PickupContainerItem(b,s) DeleteCursorItem() end end end end
Change the green number to the itemID of the item you want to process, and the purple number to the number you want to keep.

Note that "keep 5 Rough Stone" will actually keep up to 20, since Rough Stone stacks up to 20 and there's just not enough room in the macro to deal with stack splitting.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote