-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathturtle.smelting.lua
More file actions
59 lines (51 loc) · 965 Bytes
/
turtle.smelting.lua
File metadata and controls
59 lines (51 loc) · 965 Bytes
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
-- Args
ARGS={...}
amount=ARGS[1]
fuel=ARGS[2]
item=0
amount=amount+1
if amount-1>64 then
os.queueEvent("terminate")
sleep(1)
end
if fuel~="true" and fuel~="false" then
os.queueEvent("terminate")
sleep(1)
end
------------------------
-- Smelting
turtle.up()
turtle.dig()
turtle.forward()
turtle.select(1)
turtle.dropDown(amount-1)
print("Items were set (Amount: ", amount-1, ")")
turtle.turnRight()
turtle.dig()
turtle.forward()
turtle.digDown()
turtle.down()
if fuel then
turtle.turnRight()
turtle.turnRight()
turtle.select(2)
turtle.drop()
print("Fuel were set")
turtle.turnRight()
turtle.turnRight()
end
turtle.digDown()
turtle.down()
turtle.turnRight()
turtle.turnRight()
turtle.dig()
turtle.forward()
while item~=(amount-1) do
success=turtle.suckUp()
if success then
item=item+1
print("Item Received: ", item)
end
sleep(0.1)
end
print("Smelting Completed")