-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathturtle.compresscraft.lua
More file actions
69 lines (61 loc) · 1.11 KB
/
turtle.compresscraft.lua
File metadata and controls
69 lines (61 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
ARGS = {...}
amount=ARGS[1]
size=ARGS[2]
amount=amount+1
if size-1~=1 and size-1~=2 then
print("Argument(2) has to be 2 or 3!")
os.queueEvent("terminate")
sleep(1)
end
----------------------------------
--Crafting
function three()
for i=1, amount-1 do
for j=1, 9 do
if j<4 then
slot=j
elseif j>3 and j<7 then
slot=j+1
else
slot=j+2
end
turtle.select(slot)
success=turtle.suckUp(1)
end
if success then
turtle.craft()
turtle.dropUp()
else
print("Nothing items!")
os.queueEvent("terminate")
sleep(1)
end
end
end
function two()
for i=1, amount-1 do
for j=1, 4 do
if j<3 then
slot=j
else
slot=j+2
end
turtle.select(slot)
success=turtle.suckUp(1)
end
if success then
turtle.craft()
turtle.dropUp()
else
print("Nothing items!")
os.queueEvent("terminate")
sleep(1)
end
end
end
if size-1==1 then
two()
else
three()
end
print("Crafting Completed!")