Advertisement
Burrito33

Place seed

Dec 12th, 2022 (edited)
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.58 KB | None | 0 0
  1. local w = 28
  2. local r = 30
  3. local i = 1
  4. local s = 1
  5. x = 0
  6. print(x)
  7. repeat
  8.      x = x + 1
  9.         repeat
  10. if (turtle.getItemCount(s) == 0)
  11.         then
  12.     s = s + 1
  13.             turtle.select(s)
  14.     end
  15.             turtle.placeDown()
  16.             turtle.forward()
  17.             i = i + 1
  18.         until i == w
  19.         if (x % 2 == 0) then
  20.                 turtle.turnLeft()
  21.             turtle.placeDown()
  22.             turtle.forward()
  23.             turtle.turnLeft()
  24.             i = 1
  25.         else
  26.             turtle.turnRight()
  27.             turtle.placeDown()
  28.             turtle.forward()
  29.             turtle.turnRight()
  30.             i = 1
  31.         end
  32.    
  33. print(x)
  34. until x == r
  35. turtle.dropDown()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement