View Single Post
01-09-21, 04:55 AM   #4
Rilgamon
Premium Member
 
Rilgamon's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 822
what sezz says is true. I dont have the trader so I cant test but I highly doubt it works.
The code to do it would look like this ...

Lua Code:
  1. function stock:BAG_UPDATE_DELAYED()
  2.     if(not MerchantFrame or not MerchantFrame:IsVisible()) then return end
  3.     local bag = 0
  4.     while(bag<=NUM_BAG_SLOTS) do
  5.         local slot = 1
  6.         while(slot<=GetContainerNumSlots(bag)) do
  7.             if(C_NewItems.IsNewItem(bag, slot)) then
  8.                 local item = ItemLocation:CreateFromBagAndSlot(bag, slot)
  9.                 local itemLink = C_Item.GetItemLink(item)
  10.                 local itemName, itemLink, itemRarity, itemLevel, itemMinLevel, itemType, itemSubType, itemStackCount, itemEquipLoc, itemTexture, itemSellPrice, itemClassID, itemSubClassID, bindType, expacID, itemSetID, isCraftingReagent = GetItemInfo(itemLink)
  11. --              print(itemName, itemType, itemSubType, itemClassID, itemSubClassID)
  12.                 if(itemClassID ~= 7) then -- dont sell crafting reagents
  13.                     UseContainerItem(bag, slot)
  14.                 end
  15.             end
  16.             slot = slot + 1
  17.         end
  18.         bag = bag + 1
  19.     end
  20. end
__________________
The cataclysm broke the world ... and the pandas could not fix it!
  Reply With Quote