• Sign Up
• Login
• API
• FAQ
• Tools
• Archive
SHARE
TWEET # stripmine a guest Jul 16th, 2019 89 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1. print("Please not that when all required fields are filled, I will begin mining straight ahead, then progress right")
2.
3. print("enter shaft length")
4. L = tonumber(read())
5. print("enter number of shafts")
6. N = tonumber(read())
7. print("enter shaft spacing, a shaft spacing of 2 will ensure 100% wall coverage")
8. S = tonumber(read())
9. turtle.refuel()
10. LL = 0
11. SS = 0
12. NN = 0
13. R = 0
14. while NN < N do
15. Q = 0
16. R = 0
17. while LL < L do
18. turtle.dig()
19. turtle.forward()
20. turtle.digUp()
21. LL = LL + 1
22. R = 1
23. print("moving forward")
24. end
25.
26. if LL == L then
27. if R == 1 then
28. turtle.turnLeft()
29. turtle.turnLeft()
30. print("Turning left at the end of run")
31.
32. R = 0
33. end
34. end
35.
36.
37. while LL > 0 do
38. turtle.forward()
39. print("moving forward after turning around")
40. LL = LL - 1
41. Q = 1
42. end
43.
44.
45. if LL == 0 then
46. if Q == 1 then
47. turtle.turnLeft()
48. Q = 0
49. print("turning left to start new shaft")
50. end
51. end
52.
53.
54. while SS < S do
55. turtle.dig()
56. turtle.forward()
57. turtle.digUp()
58. SS = SS + 1
59. print("setting spacing")
60. if SS == S then
61. turtle.turnLeft()
62. X = 1
63. end
64. end
65.
66.
67. if SS > 0 then
68. if X == 1 then
69. SS = 0
70. X = 0
71. end
72. print("reseting spacing counter")
73. end
74.
75.
76. NN = NN + 1
77. print("counting one shaft")
78. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.

Top