All pastes #30448 Raw Edit

Someone

public lua v1 · immutable
#30448 ·published 2005-11-23 01:28 UTC
rendered paste body
function Historian_save_shot()	snap = {}		--Extract the list of buyouts for every item	auct_key = Auctioneer_GetAuctionKey()	for cat in pairs(AuctionConfig.snap[auct_key]) do		for auction in pairs(AuctionConfig.snap[auct_key][cat]) do			id,rprop,enchant,name,count,min,buyout,uniq = Auctioneer_GetItemSignature(auction)						if (not snap[name]) then snap[name] = {} end						table.insert(snap[name], buyout/count)		end	end		--Get the median of each list and store it in the database	for item in pairs(snap) do		if (not HISTORIAN[item]) then HISTORIAN[item] = {} end		HISTORIAN[item][date("%m/%d/%y/%H/%M")] = Auctioneer_GetMedian(snap[item])	end		Historian_chat_print("Historian: Snapshot archived")end