View difference between Paste ID: dMrFHvFR and VMSBXREw
SHOW: | | - or go back to the newest paste.
1
--// turtle-slot [1] Item
2
--// turtle-slot [2] Coal
3-
--// turtle-slot [3] Wireless Modem
3+
4
--CODE-------------------------------------------------------------------------------------------------------------------
5
-------------------------------------------------------------------------------------------------------------------------
6
--Start height
7
	local args = {...}
8
 	a = 89-1           --Height
9-
 	a = args[1]-1           --Height
9+
	b = args[1]             --Mining Time
10-
	b = args[2]             --Mining Times
10+
11-
	c = a/2
11+
12-
	d = 0			--help
12+
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.place()
19+
20-
		turtle.suck()
20+
21
        end
22
end
23
24
--Items to Ender-Chest---------------------------------------------------------------------------------------------------
25-
        
25+
26
        turtle.select(1)
27-
        print(" ")
27+
        turtle.placeDown()
28-
        print("--------------------------------")
28+
        for i=3,16,1 do
29-
        print("Starting Quarry!")
29+
30-
	print("Height: ",a+1)
30+
                turtle.dropDown()
31-
	print("Times:  ",b)
31+
32-
        print("--------------------------------")
32+
33
        turtle.select(1)
34
        turtle.digDown()
35
end
36
37
--Mining actions---------------------------------------------------------------------------------------------------------
38
function forward()
39-
        turtle.dig()
39+
40
		sleep(0.5)
41-
        turtle.place()
41+
42-
        for i=4,16,1 do
42+
43
44-
                turtle.drop()
44+
45
	while turtle.up()==false do
46
		sleep(0.5)
47
	end
48-
        turtle.dig()
48+
49
50
--Mining Forms-----------------------------------------------------------------------------------------------------------
51
function Mine()
52
	Start()
53
	turtle.digDown()
54
	turtle.turnRight()
55
	turtle.dig()
56
	turtle.turnLeft()
57-
		attack()
57+
58
	turtle.turnLeft()
59
	turtle.dig()
60
	while turtle.down()==true do
61
		turtle.digDown()
62
	  	turtle.dig()
63
		turtle.turnRight()
64-
		attackUp()
64+
65
		turtle.turnRight()
66
		turtle.dig()
67
		turtle.down()
68-
function down()
68+
69-
	while turtle.down()==false do
69+
70
		turtle.turnLeft()
71
		turtle.dig()
72-
		attackDown()
72+
73
		turtle.dig()
74
	end
75
	turtle.turnRight()
76-
--Attack actions---------------------------------------------------------------------------------------------------------
76+
	for p=1,a,1 do
77-
function attack()
77+
78-
	turtle.select(3)
78+
79-
	turtle.equipLeft()
79+
80-
	turtle.attack()
80+
81-
	turtle.equipLeft()
81+
82
function Next()
83-
	
83+
84-
function attackUp()
84+
	for i=1,4,1 do
85-
	turtle.select(3)
85+
		forward()
86-
	turtle.equipLeft()
86+
87-
	turtle.attackUp()
87+
88-
	turtle.equipLeft()
88+
89
end
90
91-
function attackDown()
91+
92-
	turtle.select(3)
92+
93-
	turtle.equipLeft()
93+
94-
	turtle.attackDown()
94+
95-
	turtle.equipLeft()
95+
	for k=1,4,1 do
96
		Mine()
97
		Next()
98
	end
99
end