0% found this document useful (0 votes)
57 views1 page

Auto Harvest

This document contains Lua code for automating resource harvesting on islands or the main world map. It defines functions to check if a tile is ready to harvest, send a punch packet to harvest it, find a path to the tile, then loops through all tiles calling these functions with delays between actions to automate repeated harvesting.

Uploaded by

daniel dds
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views1 page

Auto Harvest

This document contains Lua code for automating resource harvesting on islands or the main world map. It defines functions to check if a tile is ready to harvest, send a punch packet to harvest it, find a path to the tile, then loops through all tiles calling these functions with delays between actions to automate repeated harvesting.

Uploaded by

daniel dds
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Delay_Ht = 1 --delay harvest

Island = true --world type

function IsReady(tile)
if tile and tile.extra and tile.extra.progress and tile.extra.progress == 1.0 then
return true
end
return false
end

function punch(x,y)
local pkt = {}
pkt.type = 3
pkt.value = 18
pkt.x = GetLocal().pos.x
pkt.y = GetLocal().pos.y
pkt.px = math.floor(GetLocal().pos.x / 32 + x)
pkt.py = math.floor(GetLocal().pos.y / 32 + y)
SendPacketRaw(false,pkt)
end

function HtIsland()
for y = 0, 193 do
for x = 0, 199 do
if IsReady(GetTile(x,y)) then
FindPath(x,y,100)
Sleep(Delay_Ht)
punch(0,0)
Sleep(Delay_Ht)
end
end
end
end

function HtWorld()
for y = 0, 53 do
for x = 0, 99 do
if IsReady(GetTile(x,y)) then
FindPath(x,y,100)
Sleep(Delay_Ht)
punch(0,0)
Sleep(Delay_Ht)
end
end
end
end

while true do
if Island == true then
HtIsland()
elseif Island == false then
HtWorld()
end
end

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy