Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function private.purchaseall()
- local enableres = lib.GetSetting("reserve.enable")
- local reserve = lib.GetSetting("reserve") or 1
- local money = GetMoney()
- for _, sortedRow in ipairs(gui.sheet.sort) do
- local bidqueue = gui.frame.cancel.value or 0
- local balance = money - bidqueue --account for money we've already "spent"
- local data = gui.sheet:GetRowData(sortedRow)
- local link = data[1]
- local seller = data[8]
- local stack = data[4]
- local bid = data[6]
- local minbid = data[12]
- local curbid = data[13]
- local buyout = data[5]
- local reason = data[7]
- local price = 0
- if strmatch(reason, ":buy") then
- price = buyout
- elseif strmatch(reason, ":bid") then
- price = 10000
- elseif buyout > 0 then
- price = buyout
- else
- price = 10000
- end
- if ((balance-price) > reserve or not enableres) then
- AucAdvanced.Buy.QueueBuy(link, seller, stack, minbid, buyout, price, private.cropreason(reason))
- else
- aucPrint("Purchase cancelled: Reserve reached")
- end
- end
- private.removeall()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement