Advertisement
Guest User

harvest.lua

a guest
Jul 3rd, 2025
12
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.97 KB | None | 0 0
  1. cycledelay=5 -- cycle every x minutes
  2. while true do
  3. for y=1,2 do -- rows
  4.   print("starting row "..y)
  5.   for x=1,2 do -- columns
  6.     print("working column "..x)
  7.     for z=1,9 do
  8.       print("checking plot "..z)
  9.       turtle.digDown()
  10.       turtle.forward()
  11. --      turtle.digDown()
  12.     end
  13.     if x~=2 then
  14.       turtle.turnRight()
  15.       turtle.forward()
  16.       turtle.turnRight()
  17.     else
  18.       turtle.digDown()
  19.     end
  20.   end  -- end of column
  21.   if y~=2 then
  22.     turtle.turnLeft()
  23.     for z=1,4 do
  24.       turtle.forward()
  25.     end
  26.     turtle.turnLeft()
  27.   end  
  28. end -- repeat for row times
  29.   print("repositioning to unload and restart")
  30.   turtle.turnRight()
  31.   for z=1,6 do
  32.     turtle.forward()
  33.   end
  34.   print("Unloading cargo...hope the barrel isn't full.")
  35.   for d=16,1,-1 do
  36.     turtle.select(d)
  37.     turtle.drop()
  38.   end
  39.   turtle.drop()
  40.   turtle.turnRight()
  41.   for w=1,cycledelay,.5 do
  42.     print("Zzzz...."..w.." of "..cycledelay)
  43.     sleep(30)
  44.   end
  45. end
  46.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement