Advertisement
NiallDoherty

DoMagic

Oct 9th, 2017
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.55 KB | None | 0 0
  1. function collect()
  2.     turtle.select(2)
  3.     for i = 1, 4 do
  4.         for i = 1, 3 do
  5.             turtle.digDown()
  6.             if i < 3 then
  7.                 turtle.forward()
  8.             end
  9.         end
  10.         turtle.turnRight()
  11.     end
  12.     turtle.dropUp()
  13. end
  14.  
  15.     function replace()
  16.     turtle.select(1)
  17.     for i = 1, 4 do
  18.         for i = 1, 3 do
  19.             turtle.placeDown()
  20.             if i < 3 then
  21.                 turtle.forward()
  22.             end
  23.         end
  24.         turtle.turnRight()
  25.     end
  26. end
  27.  
  28. while true do
  29.     turtle.select(1)
  30.     if not turtle.compareDown() then
  31.         turtle.select(16)
  32.         if turtle.compareDown() then
  33.             collect()
  34.             replace()
  35.         end
  36.     end
  37. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement