Advertisement
Guest User

Untitled

a guest
Jul 29th, 2014
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. term.write("How long?")
  2. x = read()
  3. local function digtunnel()
  4. if (turtle.detect() == false) then
  5. turtle.select(1)
  6. turtle.place()
  7. end
  8. if (!turtle.detectUp() == false) then
  9. turtle.placeUp()
  10. end
  11. if (!turtle.detectDown() == false) then
  12. turtle.placeDown()
  13. end
  14. turtle.dig()
  15. turtle.digUp()
  16. turtle.digDown()
  17. turtle.forward()
  18. turtle.turnRight()
  19. turtle.dig()
  20. turtle.forward()
  21. turtle.dig()
  22. turtle.digDown()
  23. turtle.digUp()
  24. turtle.turnLeft()
  25. turtle.turnLeft()
  26. turtle.forward()
  27. turtle.forward()
  28. turtle.dig()
  29. turtle.forward()
  30. turtle.dig()
  31. turtle.digUp()
  32. turtle.digDown()
  33. turtle.turnRight()
  34. turtle.turnRight()
  35. turtle.forward()
  36. turtle.turnLeft()
  37. end
  38. for i = 1, x do
  39. digtunnel()
  40. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement