This button works same if not vendors near your character?
It is the code used in your addon:
local c = 0
for b=0,4 do
for s=1,GetContainerNumSlots(b) do
local l = GetContainerItemLink(b, s)
if l and select(11, GetItemInfo(l)) then
local p = select(11, GetItemInfo(l))*select(2, GetContainerItemInfo(b, s))
if select(3, GetItemInfo(l))==0 and p>0 then
UseContainerItem(b, s)
PickupMerchantItem()
print(GetItemInfo(l));
c = c+p
end
end
end
end
But this does not works for me if not vendor near.