View difference between Paste ID: uqX2Jyp3 and QHHncpqu
SHOW: | | - or go back to the newest paste.
1
local function ss(s) turtle.select(s)   end
2
3
local chestSpot 		= 16
4
local saplingSpot		= 1
5
local logSpot 			= 2
6
local enderchestSpot 	= 15
7
local diamondPickSpot 	= 14
8
9
term.clear() term.setCursorPos(1,1)
10
print("----------------------------------")
11
print("------ChromaLTS's treefarm--------")
12
print("-> Slot " .. 	saplingSpot	..	": Sapling(any)")
13
print("-> Slot " .. 	logSpot		..	": Log(1)")
14-
print("-> Slot"  .. 	enderchestSpot..": Enderchest(1)")
14+
print("-> Slot "  .. 	diamondPickSpot..": Diamond Pickaxe(1)")
15-
print("-> Slot"  .. 	diamondPickSpot..": Diamond Pickaxe(1)")
15+
print("-> Slot "  .. 	enderchestSpot..": Enderchest(1)")
16
print("-> Slot " .. 	chestSpot	..	": Chest(1)")
17
print("----------------------------------")
18
read()
19
20
--empty into chest
21
22-
local function Main()
22+
local function Main(Refuel, PickupEnderchest)
23
	--check fuel level else stuff dont work
24
25
	turtle.up()
26
	ss(chestSpot)
27
	turtle.placeUp()
28
29
	for i=3,13,1 do
30
    	ss(i)
31
    	turtle.dropUp()
32
	end
33
34
	ss(enderchestSpot)
35
	turtle.placeDown()
36
	turtle.suckDown()
37
38
	Refuel()
39
	PickupEnderchest()
40
41
	print("New fuel level -> " .. turtle.getFuelLevel())
42
end
43
44
local function PickupEnderchest()
45
	ss(diamondPickSpot)
46
	turtle.equipRight()
47
	turtle.digDown()
48
	turtle.equipRight()
49
end
50
51
52
local function Refuel()
53
	for i=1,16,1 do
54
    	 ss(i)
55
    	turtle.refuel()
56
	end
57
end
58
59
local function CheckFuel()
60
-- TODO 
61
-- Do this
62
end
63
64
65
66
--get stuff back
67
68
69
70-
Main()
70+
Main(Refuel, PickupEnderchest)