Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 3

-- find seed id below

removeHooks()
function dropItem(itemID, count)
hideDrop = true
sendPacket("action|drop\n|itemID|" .. itemID, 2)
sendPacket("action|dialog_return\ndialog_name|drop_item\nitemID|" .. itemID .. "|\
ncount|" .. count, 2)
sleep(175)
hideDrop = false
end

function wrenchTile(x, y)
pkt = {}
pkt.type = 3
pkt.int_data = 32
pkt.int_x = x
pkt.int_y = y
pkt.pos_x = getLocal().pos.x
pkt.pos_y = getLocal().pos.y
sendPacketRaw(pkt)
end

function getArgs(str)
local args = {}
for i in str:gmatch('[^%s]+') do
args[#args+1] = i
end
return args
end

function chat()

gaut = true

addHook('OnVarlist', 'command', function(vlist)


if vlist[0]=="OnConsoleMessage" then
pname__ = vlist[1]:match('<`.[^`]+'):sub(4)
pcmd__ = vlist[1]:match('`$[^`]+'):sub(3)

if pcmd__ and pcmd__:sub(1,1) == '!' then


pcmd__ = getArgs(pcmd__:sub(2))

if pcmd__[1] == 'stop' then


sendPacket('action|input\n|text|Auto Retrive GAUT `4OFF',2)
sleep(200)
sendPacket('action|input\n|text|`9Auto Retrive Gaut Will Stop, Please Wait...',2)
gaut = false
elseif pcmd__[1] == 'start' then
sendPacket('action|input\n|text|Auto Retrive GAUT `2ON',2)
gaut = true
end
end
end
end)
end

function rgaia(varlist)
if varlist[0]:find("OnDialogRequest") and varlist[1]:find("end_dialog|
itemsucker_seed|Close|Update|") then
kt = string.format([[action|dialog_return
dialog_name|itemsucker_seed
tilex|%d|
tiley|%d|
buttonClicked|retrieveitem

chk_enablesucking|1
]], varlist[1]:match("tilex|(%d+)"),varlist[1]:match("tiley|(%d+)"))
sendPacket(kt, 2)
return true
end
if varlist[0]:find("OnDialogRequest") and varlist[1]:find("end_dialog|
itemremovedfromsucker|Close|Retrieve|") then
pkt = string.format([[action|dialog_return
dialog_name|itemremovedfromsucker
tilex|%d|
tiley|%d|
itemtoremove|200
]], varlist[1]:match("tilex|(%d+)"),varlist[1]:match("tiley|(%d+)"),
varlist[1]:match("itemtoremove|(%d+)"))

sendPacket(pkt, 2)
return true
end
end
addHook("OnVarlist", "fastretrievegaia", rgaia)

function rut(varlist)
if varlist[0]:find("OnDialogRequest") and varlist[1]:find("end_dialog|
itemsucker_block|Close|Update|") then
kt = string.format([[action|dialog_return
dialog_name|itemsucker_block
tilex|%d|
tiley|%d|
buttonClicked|retrieveitem

chk_enablesucking|1
]], varlist[1]:match("tilex|(%d+)"),varlist[1]:match("tiley|(%d+)"))
sendPacket(kt, 2)
return true
end
if varlist[0]:find("OnDialogRequest") and varlist[1]:find("end_dialog|
itemremovedfromsucker|Close|Retrieve|") then
pkt = string.format([[action|dialog_return
dialog_name|itemremovedfromsucker
tilex|%d|
tiley|%d|
itemtoremove|200
]], varlist[1]:match("tilex|(%d+)"),varlist[1]:match("tiley|(%d+)"),
varlist[1]:match("itemtoremove|(%d+)"))

sendPacket(pkt, 2)
return true
end
end
addHook("OnVarlist", "fastretrieveut", rut)

Gx = 68
Gy = 18

Bx = 68
By = 18

chat()

-- ================================ GAIA ================================ --

while true do
if gaut then

findPath((Gx-1),(Gy-1))
sleep(1000)
wrenchTile((Gx-1),Gy)
sleep(800)
wrenchTile((Gx-1),Gy)

-- Dropping seed --
sleep(1000)
findPath((Gx+1),(Gy-3)) -- Drop position
dropItem(seedsID, 200) -- Drop seed
sleep(1150)
findPath((Gx+1),(Gy-4)) -- Drop position
dropItem(seedsID, 200) -- Drop seed
sleep(1150)
findPath((Gx+1),(Gy-5)) -- Drop position
dropItem(seedsID, 200) -- Drop seed
sleep(1150)
findPath((Gx+1),(Gy-6)) -- Drop position
dropItem(seedsID, 200) -- Drop seed
findPath((Gx-1),(Gy-1)) -- Back to GAIA
sleep(10000)

-- ================================ UT ================================ --

findPath(Gx,(Gy-1))
wrenchTile(Gx,Gy)
sleep(800)
wrenchTile(Gx,Gy)

-- Droping Block --
sleep(1000)
findPath((Bx-1),(By-1)) -- Drop bot position
dropItem(blocksID, 200) -- Drop block
findPath(Gx,(Gy-1)) -- Back to UT
sleep(5000)

end
end

You might also like