s3ptum

digMove 3x3 tunnel Turtle Power

Jul 11th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.71 KB | None | 0 0
  1. function Dig()
  2.   turtle.turnLeft()
  3.   turtle.dig()
  4.   turtle.turnRight()
  5.   turtle.dig()
  6.   turtle.turnRight()
  7.   turtle.dig()
  8.   turtle.turnLeft()
  9. end
  10.  
  11. function LayTorch()
  12.   turtle.select(1)
  13.   turtle.turnLeft()
  14.   turtle.turnLeft()
  15.   turtle.place()
  16.   turtle.turnRight()
  17.   turtle.turnRight()
  18. end
  19.  
  20. function Up()
  21.   turtle.digUp()
  22.   turtle.up()  
  23. end
  24.  
  25. function Down()
  26.   turtle.down()
  27.   turtle.down()
  28.   turtle.dig()
  29.   turtle.forward()
  30. end
  31.  
  32. function Move()
  33.     Dig()
  34.     Up()
  35.     Dig()
  36.     Up()
  37.     Dig()
  38.     Down()
  39.   end
  40.  
  41. function Refuel()
  42.     turtle.select(16)
  43.     turtle.refuel(1)
  44.     turtle.select(1)
  45.   end
  46.  
  47. while true do
  48. Move()
  49. Move()
  50. Move()
  51. Move()
  52. Move()
  53. Move()
  54. LayTorch()
  55. Refuel()
  56.  
  57. end
Add Comment
Please, Sign In to add comment