diff --git a/README_Geojak.md b/README_Geojak.md index 7bf5d45..8448172 100644 --- a/README_Geojak.md +++ b/README_Geojak.md @@ -10,4 +10,7 @@ 10. disenchant values are calcualted from min(value,value_today), this protects users from low enchanting mat prices 11. advanced trade skill menu compabillity to display aux crafting cost 12. changed default post duration from 8 to 24, since turtle wow got no fees anyway -13. new filter "isgear" which can be used to generic filter out all white and green armor and weapons that have incosinstent market value \ No newline at end of file +13. new filter "isgear" which can be used to generic filter out all white and green armor and weapons that have incosinstent market value +14. made ah data crossfaction on the server "Turtle WoW" (all chars are considered horde) +15. fixed a bug with the auto bid, bidding yoursefl up +16. adjusted the auto pricing to not post items and instead pprint a warning if it things its not profitable \ No newline at end of file diff --git a/aux-addon.lua b/aux-addon.lua index 79341ba..ab1b0c0 100644 --- a/aux-addon.lua +++ b/aux-addon.lua @@ -93,6 +93,9 @@ end function handle.LOAD2() local key = format('%s|%s', GetCVar'realmName', UnitFactionGroup'player') + if GetCVar'realmName' == 'Turtle WoW' then + key = format('%s|%s', GetCVar'realmName', 'Horde') + end aux.faction[key] = aux.faction[key] or {} M.faction_data = assign(aux.faction[key], { history = {}, diff --git a/core/post.lua b/core/post.lua index 2fd8100..44d6681 100644 --- a/core/post.lua +++ b/core/post.lua @@ -53,6 +53,7 @@ function post_auction(slot, k) local kz_daily = 0 local kz_pricing = 0 local kz_warn = 0 + local vendor_price = 0 if buyout_price > 0 then kz_pricing=1 @@ -61,34 +62,34 @@ function post_auction(slot, k) if history.market_value(state.item_key) ~= nil then local tmp = tonumber(history.market_value(state.item_key)) - tmp = max(0.99*tmp,tmp-50) + --tmp = max(0.99*tmp,tmp-50) + --buyout_price = max(buyout_price,tmp) + tmp = max(1,tmp-1) buyout_price = max(buyout_price,tmp) kz_daily = 1 end if history.value(state.item_key) ~= nil then if kz_pricing == 1 and kz_daily == 1 then - buyout_price = max(buyout_price,1.0*tonumber(history.value(state.item_key))) + --buyout_price = max(buyout_price,0.99*tonumber(history.value(state.item_key))) + buyout_price = max(buyout_price,0.50*tonumber(history.value(state.item_key))) elseif kz_daily == 1 then - start_price = max(start_price,0.91*tonumber(history.value(state.item_key))) + --start_price = max(start_price,0.91*tonumber(history.value(state.item_key + start_price = max(start_price,0.80*tonumber(history.value(state.item_key))) else - buyout_price = max(buyout_price,0.99* tonumber(history.value(state.item_key))) + --buyout_price = max(buyout_price,0.99* tonumber(history.value(state.item_key))) + buyout_price = max(buyout_price,0.95* tonumber(history.value(state.item_key))) end else kz_warn = kz_warn + 1 end - if disenchant.value(item_info.slot, item_info.quality, item_info.level, item_info.item_id) ~= nil then - start_price = max(start_price,0.85* tonumber(disenchant.value(item_info.slot, item_info.quality, item_info.level, item_info.item_id))) - end - if aux.account_data.merchant_buy[item_info.item_id] ~= nil then local tmp = tostring(aux.account_data.merchant_buy[item_info.item_id]) tmp = strsub(tmp,1,-3) start_price = max(start_price,tonumber(tmp) * 1.1) buyout_price = max(buyout_price,tonumber(tmp) * 1.15) else - local vendor_price = 0 if aux.account_data.merchant_sell[item_info.item_id] ~= nil then vendor_price = tonumber(aux.account_data.merchant_sell[item_info.item_id]) elseif ShaguTweaks and ShaguTweaks.SellValueDB[item_info.item_id] ~= nil then @@ -100,7 +101,7 @@ function post_auction(slot, k) end if vendor_price > 0 then if kz_daily == 0 then - start_price = max(start_price, vendor_price * (1.35+3.65*math.exp(-(1/4000)* vendor_price))) + start_price = max(start_price, vendor_price * (1.35+3.65*math.exp(-(1/4000)* vendor_price))) else start_price = max(start_price, vendor_price * 1.35) end @@ -109,16 +110,33 @@ function post_auction(slot, k) end end + if disenchant.value(item_info.slot, item_info.quality, item_info.level, item_info.item_id) ~= nil then + start_price = max(start_price,0.85* tonumber(disenchant.value(item_info.slot, item_info.quality, item_info.level, item_info.item_id))) + end + start_price = max(start_price,0.91 * buyout_price) buyout_price = max(start_price, buyout_price) - if kz_warn == 2 and kz_pricing == 0 then - print("WARNING, insufficient data for autopricing!") - if start_price == 0 then + if disenchant.value(item_info.slot, item_info.quality, item_info.level, item_info.item_id) ~= nil then + if buyout_price < 0.95 * tonumber(disenchant.value(item_info.slot, item_info.quality, item_info.level, item_info.item_id)) -30 then + print("AUX: autopricing recommends disenchanting!") return stop() end end + if kz_daily == 1 and vendor_price > 0 then + if tonumber(history.value(state.item_key)) < 1.35 * vendor_price + or tonumber(history.market_value(state.item_key)) < 1.35 * vendor_price then + print("AUX: autopricing recommends vendoring!") + return stop() + end + end + + if start_price == 0 or (kz_warn == 2 and kz_pricing == 0) then + print("AUX: insufficient data for autopricing!") + return stop() + end + local gold = floor(start_price / COPPER_PER_GOLD) local silver = floor(mod(start_price, COPPER_PER_GOLD) / COPPER_PER_SILVER) local copper = aux.round(mod(start_price, COPPER_PER_SILVER)) diff --git a/core/scan.lua b/core/scan.lua index 7da6a61..23d37fd 100644 --- a/core/scan.lua +++ b/core/scan.lua @@ -146,8 +146,7 @@ function scan_page(i) auction_info.query_type = get_state().params.type history.process_auction(auction_info) - - if (get_state().params.auto_bid_validator or pass)(auction_info) and auction_info.owner ~= UnitName("player") then + if (get_state().params.auto_bid_validator or pass)(auction_info) and auction_info.owner ~= UnitName("player") and auction_info.high_bidder == nil then local send_signal, signal_received = aux.signal() aux.when(signal_received, scan_page, i) return aux.place_bid(auction_info.query_type, auction_info.index, auction_info.bid_price, send_signal)