Quantcast Vendor Cost of Item - WoWInterface
Thread Tools Display Modes
04-20-07, 01:22 AM   #1
Jazradel
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Dec 2006
Posts: 39
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.

Last edited by Jazradel : 04-20-07 at 05:51 AM.
  Reply With Quote
04-20-07, 09:35 AM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,720
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.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
04-20-07, 08:25 PM   #3
Jazradel
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Dec 2006
Posts: 39
Thanks, I figured out how to hook into informant from GarbageFu.

Last edited by Jazradel : 04-20-07 at 08:32 PM.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Vendor Cost of Item

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off