Date range of AH profit calculation
  • druorgandruorgan April 2010
    Currently there doesn't appear to be a way for the user to configure the date range on the AH profit calculations. I'm talking about the top left hand corner of the beancounter screen which tells you that you've "gained X gold from 1/14/07 to 1/14/10"

    In the user documentation for beancounter there appears to be an api or function (i dont really know what it is):

    BeanCounter.API.getAHProfit(player, item, lowDate, highDate)

    Which appears to contain arguments that would allow me to limit the profit calculation to say... todays data only.

    My question is, what would a person have to do to actually use this? I've made a few macros in my life, but i dont know anything about /scripts. I'm not even sure what direction i should be looking at.
  • KandokoKandoko April 2010
    Core Developer
    pk, use this macro and replace playername and itemname to see your last 24 hours of profit.

    local /run local P,L,H=BeanCounter.API.getAHProfit("PLAYERNAME OR server", "ITEMNAME", time()-86400, time()) print( P/10000, date("%x", L), date("%x", H) )

    so for to see a player named Foobar you would use

    local /run local P,L,H=BeanCounter.API.getAHProfit("Foobar", "infinite dust", time()-86400, time()) print( P/10000, date("%x", L), date("%x", H) )

    to see what you did on the server as a whole use

    local /run local P,L,H=BeanCounter.API.getAHProfit("server", "infinite dust", time()-86400, time()) print( P/10000, date("%x", L), date("%x", H) )

    You can also leav item name blank to see profit for all items

    local /run local P,L,H=BeanCounter.API.getAHProfit("server", "", time()-86400, time()) print( P/10000, date("%x", L), date("%x", H) )
  • aexibitaexibit January 2012
    I was having this problem as well, what I did was modify my BeanCounterSearch.lua file at line 153

    I changed it from

    --store profit for this item, need to do this before we reduce number of results for display
    local player = private.frame.SelectBoxSetting[2]
    profit, low, high = lib.API.getAHProfit(player, data)


    to

    --store profit for this item, need to do this before we reduce number of results for display
    local player = private.frame.SelectBoxSetting[2]
    if settings.dateFilterLow or settings.dateFilterHigh then
    profit, low, high = lib.API.getAHProfit(player, data, settings.dateFilterLow, settings.dateFilterHigh)
    else
    profit, low, high = lib.API.getAHProfit(player, data)
    end


    By making this change, the text box in the search ui properly displays the profit gained/lost based on the date settings in the bottom left if the check box is checked
Privacy · Advertising
Norganna's AddOns Network · World Of Minecraft · WoM Realms · Auctioneer Addon · Gatherer Addon · Addon Forums · RDRCT