Advertisement
Burrito33

FarmBoi (New)

Dec 15th, 2022 (edited)
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.86 KB | None | 0 0
  1. local w = 28 --width
  2. local r = 30 --row
  3. local i = 1
  4. x = 0
  5. print(x)
  6. repeat
  7.      x = x + 1
  8.     repeat
  9.         local success, data = turtle.inspectDown()
  10.             if success then      
  11.                 if data.stage.age == 7 then --checking growth of crop (7 = max) use data.metadata if age doesnt work
  12.                     turtle.digDown()
  13.                 end
  14.             end
  15.                 turtle.forward()
  16.                 i = i + 1
  17.     until i == w
  18.         if (x % 2 == 0) then
  19.                 turtle.turnLeft()
  20.         if success then      
  21.                 if data.stage.age == 7 then
  22.                     turtle.digDown()
  23.                 end
  24.             end
  25.                 turtle.forward()
  26.             turtle.turnLeft()
  27.             i = 1
  28.         else
  29.             turtle.turnRight()
  30.             if success then      
  31.                 if data.stage.age == 7 then
  32.                     turtle.digDown()
  33.                 end
  34.             end
  35.                 turtle.forward()
  36.             turtle.turnRight()
  37.             i = 1
  38.         end
  39. print(x)
  40. until x == r
  41. turtle.dropDown()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement