WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General Authoring Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=20)
-   -   Vendor Cost of Item (https://www.wowinterface.com/forums/showthread.php?t=9598)

Jazradel 04-20-07 01:22 AM

Vendor Cost of Item
 
I can't figure out how to get the cost an item sells for at the vendor.

I've through the code of SellValue, Informant, etc and can not figure it out. I've got my mod to loop through my bags and sell every grey item, but I can't figure out how to get the price. Being able to check for certain grey quest items would be nice (e.g have no sell value).
Code:

function Minimalist:MinSellJunk()
  local bag, slot, sellprofit
  for bag = 0, 4 do
    if GetContainerNumSlots(bag) > 0 then
      for slot = 1, GetContainerNumSlots(bag) do
        local _, _, _, quality = GetContainerItemInfo(bag, slot)
        if (quality == 0 or quality == -1) then
          if (self:ProcessLink(GetContainerItemLink(bag, slot))) then
                        sellprofit = sellprofit + X
            PickupContainerItem(bag, slot)
            MerchantItemButton_OnClick("LeftButton")
                  end
        end
      end
    end
  end
  self:Print("Total Sold Item Value: "..abacus:FormatMoneyExtended(sellprofit))
end

Basically, I need something to replace X.

Seerah 04-20-07 09:35 AM

It may be something with GetPlayerMoney every time that event fires and you have a vendor window open... Take a look at the GarbageFu code to see how it does it.

Jazradel 04-20-07 08:25 PM

Thanks, I figured out how to hook into informant from GarbageFu.


All times are GMT -6. The time now is 04:31 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI