Autoplant
Autoplant
--//Warp\\
function warp(world,id)
sendPacket(3, "|join_request\nname|" .. string.upper(world))
sleep(2000)
sendPacket(3, "action|join_request\nname|" .. string.upper(world) .. "|" ..
string.upper(id))
sleep(3000)
end
--//Take Seed\\
function takeseed(id)
for _,object in pairs(getObjects()) do
if object.id == id then
if findItem(id) > 0 then
break
end
findPath(math.floor(object.x/32),math.floor(object.y/32))
sleep(1000)
collect(2)
sleep(400)
end
end
end
--//Plant\\
function plant(id,world)
for _,tile in pairs(getTiles()) do
if tile.fg ~= 0 and tile.fg ~= id and getTile(tile.x,tile.y - 1).fg == 0 then
findPath(tile.x,tile.y - 1)
sleep(delay)
place(id,0,0)
sleep(delay)
if findItem(id) == 0 then
warp(worldsafe,doorId)
sleep(1700)
takeseed(itemId)
sleep(100)
warp(world,doorId)
sleep(1700)
end
end
end
end
--//Main\\
while true do
for _,list in pairs(worldList) do
warp(list,doorId)
sleep(1000)
plant(itemId,list)
sleep(1000)
end
end