You are on page 1of 1

-- Credit to Ryuxy Gamer & Michieee#6666

x = math.floor(GetLocal().posX//32)
y = math.floor(GetLocal().posY//32)

salt = 4566

AddHook(function(var)
if var.v1 == "OnDialogRequest" and var.v2:match("Item Finder") then
return true
end

if var.v1 == "OnTalkBubble" and var.v3:find("I don't have enough") then


return true
end

if var.v1 == "OnDialogRequest" then


if var.v2:find("Food Grinder") then
x = var.v2:match("|x|(%d+)")
y = var.v2:match("|y|(%d+)")
var = {}
var.v0 = "OnTextOverlay"
var.v1 = "`wFood Grinder `9Detected`w, Running the `4Script"
SendVariant(var)
return true
end
end

return false
end,"OnVariant")

function Grind()
SendPacket(2, "action|dialog_return\ndialog_name|item_search\n"..salt.."|1")
Sleep(1000)
SendPacket(2,"action|dialog_return\ndialog_name|grinder\nx|"..x.."|\ny|"..y.."|\
nitemID|"..salt.."|\namount|2")
Sleep(200)
for _, v in pairs(GetInventory()) do
if v.id == 4568 and v.amount > 200 then
SendPacket(2, "action|dialog_return\ndialog_name|drop\nitem_drop|4568|\
nitem_count|"..v.amount)
Sleep(200)
end
end
end

while true do
Grind()
end

You might also like