SHOW:
|
|
- or go back to the newest paste.
1 | function refuel() | |
2 | turtle.select(3) | |
3 | turtle.refuel() | |
4 | turtle.select(1) | |
5 | end | |
6 | ||
7 | function chest() | |
8 | if turtle.getItemCount(16)>0 then | |
9 | turtle.turnRight() | |
10 | turtle.digDown() | |
11 | turtle.down() | |
12 | turtle.dig() | |
13 | turtle.select(2) | |
14 | turtle.place() | |
15 | for h=3,16 do | |
16 | turtle.select(h) | |
17 | turtle.drop() | |
18 | end | |
19 | turtle.select(1) | |
20 | turtle.turnLeft() | |
21 | turtle.up() | |
22 | end | |
23 | end | |
24 | ||
25 | function dig(count) | |
26 | - | for i = 1 to count do |
26 | + | for i = 1, count do |
27 | turtle.dig() | |
28 | turtle.forward() | |
29 | turtle.dig() | |
30 | turtle.digUp() | |
31 | turtle.digDown() | |
32 | turtle.turnRight() | |
33 | turtle.dig() | |
34 | turtle.forward() | |
35 | turtle.digUp() | |
36 | turtle.digDown() | |
37 | chest() | |
38 | turtle.turnRight() | |
39 | turtle.turnRight() | |
40 | turtle.forward() | |
41 | turtle.dig() | |
42 | turtle.forward() | |
43 | turtle.digUp() | |
44 | turtle.digDown() | |
45 | turtle.turnRight() | |
46 | turtle.turnRight() | |
47 | turtle.forward() | |
48 | turtle.turnLeft() | |
49 | end | |
50 | end | |
51 | ||
52 | function torch() | |
53 | turtle.select(1) | |
54 | turtle.placeDown() | |
55 | end | |
56 | ||
57 | ||
58 | refuel() | |
59 | while true do | |
60 | dig(7) | |
61 | torch() | |
62 | end |