SHOW:
|
|
- or go back to the newest paste.
1 | function GRAB() | |
2 | ||
3 | turtle.dig() | |
4 | ||
5 | ||
6 | ||
7 | os.sleep(0.5) | |
8 | ||
9 | ||
10 | ||
11 | while turtle.detect()==true do | |
12 | ||
13 | ||
14 | ||
15 | turtle.dig() | |
16 | ||
17 | ||
18 | ||
19 | os.sleep(0.5) | |
20 | ||
21 | ||
22 | ||
23 | end | |
24 | ||
25 | ||
26 | ||
27 | turtle.forward() | |
28 | ||
29 | ||
30 | ||
31 | turtle.digUp() | |
32 | ||
33 | ||
34 | ||
35 | ||
36 | os.sleep(0.5) | |
37 | ||
38 | ||
39 | ||
40 | while turtle.detectUp()==true do | |
41 | ||
42 | ||
43 | ||
44 | turtle.digUp() | |
45 | ||
46 | ||
47 | ||
48 | os.sleep(0.5) | |
49 | ||
50 | ||
51 | ||
52 | end | |
53 | ||
54 | end | |
55 | ||
56 | function CLEAN() | |
57 | turtle.turnLeft() | |
58 | turtle.turnLeft() | |
59 | turtle.select(15) | |
60 | turtle.place() | |
61 | for k=1,14 do | |
62 | turtle.select(k) | |
63 | turtle.drop() | |
64 | end | |
65 | turtle.select(15) | |
66 | turtle.dig() | |
67 | turtle.turnLeft() | |
68 | turtle.turnLeft() | |
69 | end | |
70 | ||
71 | w=turtle.getItemCount(16) | |
72 | ||
73 | for | |
74 | j=1,w do | |
75 | ||
76 | ||
77 | ||
78 | ||
79 | for i=1,3 do | |
80 | ||
81 | ||
82 | GRAB() | |
83 | end | |
84 | ||
85 | ||
86 | ||
87 | turtle.back() | |
88 | ||
89 | turtle.select(16) | |
90 | ||
91 | ||
92 | turtle.placeUp() | |
93 | ||
94 | ||
95 | turtle.forward() | |
96 | ||
97 | ||
98 | turtle.turnRight() | |
99 | ||
100 | ||
101 | ||
102 | for i=1,5 do | |
103 | ||
104 | ||
105 | ||
106 | GRAB() | |
107 | end | |
108 | ||
109 | ||
110 | ||
111 | ||
112 | turtle.turnLeft() | |
113 | ||
114 | ||
115 | ||
116 | turtle.turnLeft() | |
117 | ||
118 | ||
119 | ||
120 | for i=1,5 do | |
121 | ||
122 | ||
123 | ||
124 | turtle.forward() | |
125 | ||
126 | ||
127 | ||
128 | end | |
129 | ||
130 | ||
131 | ||
132 | ||
133 | for i=1,5 do | |
134 | ||
135 | ||
136 | ||
137 | GRAB() | |
138 | ||
139 | end | |
140 | ||
141 | ||
142 | ||
143 | ||
144 | turtle.turnLeft() | |
145 | ||
146 | ||
147 | ||
148 | turtle.turnLeft() | |
149 | ||
150 | ||
151 | ||
152 | for i=1,5 do | |
153 | ||
154 | ||
155 | ||
156 | turtle.forward() | |
157 | ||
158 | ||
159 | ||
160 | end | |
161 | ||
162 | ||
163 | ||
164 | turtle.turnLeft() | |
165 | CLEAN() | |
166 | ||
167 | ||
168 | ||
169 | end | |
170 | ||
171 | turtle.turnLeft() | |
172 | turtle.turnLeft() | |
173 | for i=1,w*3 do | |
174 | turtle.forward() | |
175 | end |