SHOW:
|
|
- or go back to the newest paste.
1 | function goHome() | |
2 | - | while true do |
2 | + | turtle.up() |
3 | while turtle.forward() do | |
4 | - | turtle.dig() |
4 | + | end |
5 | turtle.turnLeft() | |
6 | - | if turtle.forward() then |
6 | + | while turtle.forward() do |
7 | end | |
8 | --Krockar i kistan | |
9 | turtle.down() | |
10 | turtle.forward() | |
11 | - | turtle.dig() |
11 | + | |
12 | ||
13 | - | turtle.place() |
13 | + | slot = 0 |
14 | while slot < 16 do | |
15 | - | turtle.turnRight() |
15 | + | slot = slot + 1 |
16 | - | turtle.turnRight() |
16 | + | turtle.select(slot) |
17 | - | else |
17 | + | turtle.dropDown() |
18 | - | --V�A4nd |
18 | + | end |
19 | - | if turnLeft == true then |
19 | + | |
20 | if turtle.getFuelLevel() < 1000 then | |
21 | - | turtle.dig() |
21 | + | turtle.suckUp() |
22 | turtle.refuel() | |
23 | end | |
24 | ||
25 | - | turtle.dig() |
25 | + | |
26 | - | turtle.place() |
26 | + | |
27 | - | turtle.turnRight() |
27 | + | |
28 | - | turnLeft = false |
28 | + | |
29 | - | else |
29 | + | while true do |
30 | - | turtle.turnRight() |
30 | + | turtle.dig() |
31 | if turtle.forward() then | |
32 | - | turtle.turnRight() |
32 | + | turtle.turnLeft() |
33 | - | turnLeft = true |
33 | + | turtle.turnLeft() |
34 | turtle.dig() | |
35 | turtle.place() | |
36 | turtle.turnRight() | |
37 | turtle.turnRight() | |
38 | else | |
39 | --V�A4nd | |
40 | if turnLeft == true then | |
41 | turtle.turnLeft() | |
42 | turtle.dig() | |
43 | if turtle.forward() then | |
44 | turtle.turnLeft() | |
45 | turtle.turnLeft() | |
46 | turtle.dig() | |
47 | turtle.place() | |
48 | turtle.turnRight() | |
49 | turnLeft = false | |
50 | else | |
51 | goHome() | |
52 | end | |
53 | else | |
54 | turtle.turnRight() | |
55 | turtle.forward() | |
56 | turtle.turnRight() | |
57 | turnLeft = true | |
58 | end | |
59 | end | |
60 | end |