Getting an ItemLink
  • kfsonekfsone November 2009
    Donator
    I'm writing a tradeskill-oriented addon that scans your known designs in a given tradeskill, determines the saleable product name, queries BeanCounter to find the items you've had the best luck selling and made most profit from (with adjustable weightings). Finally (insert speed bump here) weights the list based on which of those items aren't currently going for less than your average past-sale price by querying Auctioneer.

    I don't want the user to have to currently be at the auction house. But up to this point, I only have item names (from the BeanCounter database).

    So, given productName is a name from the BeanCounter database, how do I query the current market value for it?


    -- given that 'productName' is a name from beanCounter such as 'Scroll of Enchant Chest - Super Stats'
    productName = "Scroll of Enchant Chest - Super Stats"
    img = AucAdvanced.API.QueryImage({name = productName})
    print(img)
    unpacked = AucAdvanced.API.UnpackImageItem(img)
    print(unpacked)
    print(AucAdvanced.API.GetAlgorithmValue("Simple", unpacked.link))


    I get "attempt to concatenate a nil value" from the last line (I've tried passing the index within GetAlgorithms() instead of the name to GAV... But that just returns nothing) even for an item I currently have up for auction with the auction window up.

    image

    So how do I get from the name to a value GetAlgorithmValue can use?
  • kfsonekfsone November 2009
    Donator
    Answered my own question...


    productName = "Scroll of Enchant Chest - Super Stats"
    img = AucAdvanced.API.QueryImage({name = productName})
    print("img = " .. tostring(img))

    unpacked = AucAdvanced.API.UnpackImageItem(img)

    print("unpacked = " .. tostring(unpacked))

    print("unpacked.link = " .. tostring(unpacked.link))
    print("link = " .. unpacked.link[1] .. "/" .. unpacked.link[3])

    print(AucAdvanced.API.GetAlgorithmValue("Simple", unpacked.link[1]))


    It's sort of counter-intuitive that you would have to use link[1] instead of "link" :)
  • ApaseallApaseall November 2009
    Silver sponsor
    I do like the concept of using BeanCounter to filter out items that you have had a proble selling in the past.
    I also like the idea of weighting as I assume that would in effect give you a list of your favourite items to craft by either order of list or filter out weights above/below a user configurable cut off.

    From your screenshot I see some form of in game lua editor. Can you tell us what that is called and if it is available for download say from curse etc?
    Thanks
  • MattBnrMattBnr November 2009
    it is from wowinterface its called wowlua i believe.
  • KandokoKandoko November 2009
    Core Developer
    its wowlua form wowinterface Apaseall
  • ApaseallApaseall November 2009
    Silver sponsor
    Lol already had it in my addons folder, just not used it.
    Too busy edting outside of wow to work on live code in it lol.
    Thanks folks.
  • kfsonekfsone November 2009
    Donator
    Make sure you take time to look thru the buttons, like I neglected to at first :) I have dozens of little scriptlets now -- e.g. I have one for talking to the Enchanting Shard Trader which goes through all her Formulas, replaces the name with "Scroll of " ... and tells me which ones I don't know yet that will give me the most saleable enchant. I'm sure there's a better way to do it, but I wanted the practice ya know? :)
Privacy · Advertising
Norganna's AddOns Network · World Of Minecraft · WoM Realms · Auctioneer Addon · Gatherer Addon · Addon Forums · RDRCT