local function OnEvent() for bag=0,4 do for slot=0,GetContainerNumSlots(bag) do local link = GetContainerItemLink(bag, slot) if link and select(3, GetItemInfo(link)) == 0 then ShowMerchantSellCursor(1) UseContainerItem(bag, slot) end end end end local f = CreateFrame("Frame") f:RegisterEvent("MERCHANT_SHOW") f:SetScript("OnEvent", OnEvent) if MerchantFrame:IsVisible() then OnEvent() end