Advertisement
Guest User

Untitled

a guest
May 25th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. local length
  2. local size
  3.  
  4. print("What size would you like the tunnel?")
  5. print("1: 1x1")
  6. print("2: 3x3")
  7. print("3. 5x5")
  8. size = read()
  9. screen.clear()
  10. print ("How far do you want to tunnel?")
  11. length = read()
  12.  
  13. switch size
  14. case "5x5": 5x5()
  15. case "3x3": 3x3()
  16. end
  17.  
  18.  
  19. function 5x5(length)
  20. while x <= length do
  21. turtle.dig()
  22. turtle.forward()
  23. dig5()
  24. x = x + 1
  25. end
  26. end
  27.  
  28. function 3x3(length)
  29.  
  30. end
  31.  
  32. function dig5()
  33. turtle.turnRight()
  34. turtle.dig()
  35. turtle.forward()
  36. turtle.dig()
  37. turtle.forward()
  38. turtle.dig()
  39. turtle.forward()
  40. turtle.dig()
  41. turtle.back(4)
  42. end
  43.  
  44. function dig3()
  45. turtle.turnRight()
  46. turtle.dig()
  47. turtle.forward()
  48. turtle.dig()
  49. turtle.forward()
  50. turtle.dig()
  51. turtle.forward()
  52. turtle.dig()
  53. turtle.back(4)
  54. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement