Fast Buy Vend
Fast Buy Vend
function log(t)
LogToConsole("``[`6NOIR COMMUNITY MESSAGE``] `0"..t)
end
function inv()
for _, p in pairs(GetInventory()) do
if p.id == 7188 then return p.amount end
end
return 0
end
function main()
while true do
if selectedVend then
if inv() < 10 then
SendPacket(2, [[action|dialog_return
dialog_name|info_dialog
buttonClicked|convert_pl_to_bgl
]])
end
SendPacket(2, [[action|dialog_return
dialog_name|vending
tilex|]].. posX ..[[|
tiley|]].. posY ..[[|
verify|1|
buycount|]].. count ..[[|
expectprice|]].. price ..[[|
expectitem|]].. itemID ..[[|
]])
Sleep(50)
SendPacket(2, [[action|dialog_return
dialog_name|backpack_menu
itemid|]].. itemID)
Sleep(delay)
else
log("`2Done``/`4Stop")
return 0
end
end
end
AddHook(function(t,s)
if t == 2 and s:match("vending") and not s:match("verify") and selectedVend ==
false then
itemID = s:match("expectitem|(%d+)")
price = s:match("expectprice|(%d+)")
posX = s:match("tilex|(%d+)")
posY = s:match("tiley|(%d+)")
count = s:match("buycount|(%d+)")
log("`2Target Vend Details:\n``>> `0ItemID:`1 " .. itemID .. "\n``>> `0Pos X
Vend:`1 ".. posX .."\n``>> `0Pos Y Vend:`1 " .. posY .. "\n``>> `0Buy count:`1 " ..
count)
selectedVend = true
log("`2Starting main scrip in few sec...")
end
end,"OnSendPacket")
while true do
if selectedVend then
main()
else
sleep(10000)
end
end