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