Advertisement
petepete1984

Plus-shaped tunnel

Feb 3rd, 2013
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.67 KB | None | 0 0
  1. --put torches in slot 16 and enjoy
  2. function df()
  3.     while turtle.detect() do
  4.         turtle.dig()
  5.         sleep(0.5)
  6.     end
  7. end
  8.  
  9. --mine the first block
  10. df()
  11. counter = 0
  12.  
  13. while (not turtle.detect()) and counter <= 66 do
  14.     if turtle.forward() then
  15.         df()
  16.         while turtle.detectUp() do
  17.             turtle.digUp()
  18.             sleep(0.5)
  19.         end
  20.        
  21.         if turtle.detectDown() then
  22.             turtle.digDown()
  23.         end
  24.        
  25.         if (turtle.getItemCount(16) > 1) then
  26.             if ((counter % 11) == 0) then
  27.                 turtle.select(16)
  28.                 turtle.placeDown()
  29.             end
  30.         end
  31.        
  32.         turtle.turnLeft()
  33.         df()
  34.        
  35.         turtle.turnLeft()
  36.         turtle.turnLeft()
  37.         df()
  38.  
  39.         turtle.turnLeft()
  40.         counter = counter + 1
  41.     else
  42.         sleep(1)
  43.     end
  44. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement