SHOW:
|
|
- or go back to the newest paste.
1 | --// turtle-slot [1] Item | |
2 | --// turtle-slot [2] Coal | |
3 | ------------------------------------------------------------------------------------------------------------------------- | |
4 | --CODE------------------------------------------------------------------------------------------------------------------- | |
5 | ------------------------------------------------------------------------------------------------------------------------- | |
6 | --Start height | |
7 | local args = {...} | |
8 | a = 89-1 --Height | |
9 | b = args[1] --Mining Time | |
10 | ||
11 | --Startcheck: Fuel------------------------------------------------------------------------------------------------------- | |
12 | function Start() | |
13 | while turtle.getFuelLevel()<(2*a+1000) do | |
14 | turtle.select(2) | |
15 | turtle.digDown() | |
16 | turtle.placeDown() | |
17 | turtle.suckDown() | |
18 | shell.run("refuel all") | |
19 | turtle.select(2) | |
20 | turtle.digDown() | |
21 | end | |
22 | end | |
23 | ||
24 | --Items to Ender-Chest--------------------------------------------------------------------------------------------------- | |
25 | function Item() | |
26 | turtle.select(1) | |
27 | turtle.placeDown() | |
28 | for i=3,16,1 do | |
29 | turtle.select(i) | |
30 | turtle.dropDown() | |
31 | sleep(0.5) | |
32 | end | |
33 | turtle.select(1) | |
34 | turtle.digDown() | |
35 | end | |
36 | ||
37 | --Mining actions--------------------------------------------------------------------------------------------------------- | |
38 | function forward() | |
39 | while turtle.forward()==false do | |
40 | sleep(0.5) | |
41 | end | |
42 | end | |
43 | ||
44 | function up() | |
45 | while turtle.up()==false do | |
46 | sleep(0.5) | |
47 | end | |
48 | end | |
49 | ||
50 | --Mining Forms----------------------------------------------------------------------------------------------------------- | |
51 | function Mine() | |
52 | - | Start() |
52 | + | Start() |
53 | turtle.digDown() | |
54 | - | turtle.turnRight() |
54 | + | turtle.dig() |
55 | - | turtle.dig() |
55 | + | turtle.turnRight() |
56 | turtle.dig() | |
57 | - | turtle.dig() |
57 | + | turtle.turnRight() |
58 | turtle.dig() | |
59 | - | turtle.dig() |
59 | + | |
60 | turtle.digDown() | |
61 | turtle.dig() | |
62 | - | turtle.dig() |
62 | + | turtle.turnLeft() |
63 | - | turtle.turnRight() |
63 | + | turtle.dig() |
64 | - | turtle.dig() |
64 | + | turtle.turnLeft() |
65 | - | turtle.turnRight() |
65 | + | turtle.dig() |
66 | - | turtle.dig() |
66 | + | turtle.down() |
67 | - | turtle.down() |
67 | + | |
68 | turtle.dig() | |
69 | - | turtle.dig() |
69 | + | turtle.turnRight() |
70 | - | turtle.turnLeft() |
70 | + | turtle.dig() |
71 | - | turtle.dig() |
71 | + | turtle.turnRight() |
72 | - | turtle.turnLeft() |
72 | + | turtle.dig() |
73 | - | turtle.dig() |
73 | + | |
74 | turtle.turnLeft() | |
75 | - | turtle.turnRight() |
75 | + | |
76 | - | for p=1,a,1 do |
76 | + | for p=1,a,1 do |
77 | - | up() |
77 | + | up() |
78 | end | |
79 | - | Item() |
79 | + | Item() |
80 | end | |
81 | ||
82 | function Next() | |
83 | up() | |
84 | for i=1,4,1 do | |
85 | forward() | |
86 | end | |
87 | turtle.digDown() | |
88 | turtle.down() | |
89 | end | |
90 | ||
91 | ------------------------------------------------------------------------------------------------------------------------- | |
92 | --Actions---------------------------------------------------------------------------------------------------------------- | |
93 | ------------------------------------------------------------------------------------------------------------------------- | |
94 | for t=1,b,1 do | |
95 | for k=1,4,1 do | |
96 | Mine() | |
97 | Next() | |
98 | end | |
99 | end |