Raid farming vendor macro

For anyone interested.
This macro will vendor anything with a vendor value that can be sold in your main bag and the first three going out from it.
I use it mainly when Ive cleared out my four bags other than the very first one that I use for most of that crap that gets carried around all the time.

/run for bag=0,3,1 do for slot=1,GetContainerNumSlots(bag),1 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

Use with caution. It sells it all that can be sold.

I tried to use your script but couldn’t get it to work. Got a few lua errors.
this script works for me and also prints to chat the items that are sold.

“/run for bag=0,4,1 do for slot=1,GetContainerNumSlots(bag),1 do local name=GetContainerItemLink(bag,slot) if name and string.find(name,”") then DEFAULT_CHAT_FRAME:AddMessage("- Selling “…name) UseContainerItem(bag,slot) end end end”