SHOW:
|
|
- or go back to the newest paste.
1 | function dig() | |
2 | for i = 1,60 do | |
3 | turtle.dig() | |
4 | turtle.digUp() | |
5 | turtle.forward() | |
6 | end | |
7 | end | |
8 | print("Digging you a quarry!") | |
9 | write("Which way should I turn? ") | |
10 | direction = read() | |
11 | ||
12 | if direction == "right" then | |
13 | turtle.dig() | |
14 | turtle.forward() | |
15 | turtle.turnRight() | |
16 | - | for k = 1,4 |
16 | + | |
17 | turtle.place() | |
18 | turtle.turnRight() | |
19 | turtle.turnRight() | |
20 | ||
21 | for k = 1,4 do | |
22 | dig() | |
23 | turtle.turnRight() | |
24 | turtle.dig() | |
25 | turtle.digUp() | |
26 | turtle.forward() | |
27 | turtle.turnRight() | |
28 | turtle.turnRight() | |
29 | turtle.place() | |
30 | turtle.turnRight() | |
31 | turtle.turnRight() | |
32 | end | |
33 | end | |
34 | ||
35 | if direction == "left" then | |
36 | ||
37 | turtle.dig() | |
38 | turtle.forward() | |
39 | turtle.turnLeft() | |
40 | turtle.turnLeft() | |
41 | turtle.place() | |
42 | turtle.turnLeft() | |
43 | turtle.turnLeft() | |
44 | ||
45 | for k = 1,4 do | |
46 | dig() | |
47 | turtle.turnLeft() | |
48 | turtle.dig() | |
49 | turtle.digUp() | |
50 | turtle.forward() | |
51 | turtle.turnLeft() | |
52 | turtle.turnLeft() | |
53 | turtle.place() | |
54 | turtle.turnLeft() | |
55 | turtle.turnLeft() | |
56 | end |