--[[
Simple traditional buyout bot that will buyout loop first item. User will
be prompt to set buyout if not already set. It will then adjust the buyout
each loop by a small random margin to avoid cached searches.
]]--
function SnipeBuyout()
-- get user buyout
local buyout = xGetBuyout(10000)
-- check input
if buyout <= then
xMessage('Set some filters and a low buyout')
else
while true do
-- update buyout with randomize
xSetBuyout(buyout, true)
-- search and select first item in list
if xSearch() then
-- get item object
local item = xGetSearchItem(1)
hafilterstat('dexterity')=150
hafilterstat('vitality')=100
hafilterstat('critical hit chance')=4.5
hafilterstat('critical hit damage')=45
-- prompt to confirm buyout. this is purely so noobs dont lose $$$. remove otherwise.
if xPrompt('buy "' .. item.name .. '" for ' .. item.buyout .. '?\n\n(CTRL-F12 to stop script)') then
xBuyout(1)
end
end
end
end
end