Professional Documents
Culture Documents
RetriveGaut Lua
RetriveGaut Lua
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
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()
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