Auto Harvest
Auto Harvest
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