Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Load Chest w/ 16+ Ingots
- -- Suck 11 Ingots > Place them in compressor (Down) Creates 11 Plates
- -- Suck 5 Ingots > Place in Cutter (Up) Creates 10 Rods
- --
- -- Suck All Plates > Put 2 Plates back into Compressor Creates 2 Curved Plates
- -- Suck All Rods > Put 6 back into cutter Creates 12 Bolts
- -- (Wait 10 Seconds) Suck Curved Plates
- -- Put 2 Rods into Compressor Creates 2 Rings
- --
- --
- local craftTime
- function ingotChecker()
- turtle.select(1)
- turtle.suck(16)
- ingotCount = turtle.getItemCount(1)
- if (ingotCount < 16) then
- print("Insufficient Ingots")
- turtle.turnLeft()
- turtle.drop()
- turtle.turnRight()
- sleep(10)
- else
- data = turtle.getItemDetail()
- if (data.name == "minecraft:iron_ingot") then --Iron Gears
- craftTime = 2
- partsMaker()
- gearMaker()
- turtle.turnRight()
- turtle.drop()
- turtle.turnRight()
- turtle.turnRight()
- elseif (data.name == "techreborn:bronze_ingot") then --Bronze Drill Head
- craftTime = 1
- partsMaker()
- gearMaker()
- drillHeadMaker()
- elseif (data.name == "techreborn:steel_ingot") then --Steel Gears
- craftTime = 2
- partsMaker()
- gearMaker()
- turtle.turnRight()
- turtle.drop()
- turtle.turnRight()
- turtle.turnRight()
- else
- print("Item does not match recognized ingots")
- turtle.turnLeft()
- turtle.drop()
- turtle.turnRight()
- end
- end
- end
- function partsMaker()
- turtle.dropDown(11)
- turtle.dropUp(5)
- sleep(30*craftTime) --Lets cutting machine crafts finish
- turtle.suckUp() --Suck 10 Rods
- turtle.dropUp(6) --6 Rods back in cutting machine for 12 Bolts
- turtle.transferTo(15,2) --Places 2 "final rods" in slot 15
- turtle.transferTo(10,2) --Places 2 "working rods" in slot 10 to be used later
- sleep(30*craftTime) --Lets both machines finish
- turtle.suckDown() --Suck 11 Plates
- if (data.name == "techreborn:bronze_ingot") then
- turtle.dropDown(2) --Places 2 plates back in compressor for curved plates
- end
- turtle.transferTo(16) --Places 9 (11-2) normal plates in slot 16
- turtle.suckUp() --Sucks 12 Bolts
- turtle.transferTo(14) --Moves bolts to slot 14
- if (data.name == "techreborn:bronze_ingot") then
- sleep(10*craftTime)
- turtle.suckDown() --Suck 2 Curved Plates
- turtle.transferTo(13) --Moved Curved Plates to Slot 12
- end
- turtle.select(10) --Select "working rods" in slot 10
- turtle.dropDown() --Places 2 rods in compressor for rings
- sleep(10*craftTime)
- turtle.select(12)
- turtle.suckDown() --Places 2 Rings in slot 13
- sleep(1)
- --All "Base parts" should be completed
- end --partsMaker
- function gearMaker() --Makes 2 Gears
- turtle.select(16) --Plates
- turtle.transferTo(1, 2)
- turtle.transferTo(3, 2)
- turtle.transferTo(9, 2)
- turtle.transferTo(11,2)
- turtle.select(14) --Bolts
- turtle.transferTo(2, 2)
- turtle.transferTo(5, 2)
- turtle.transferTo(7, 2)
- turtle.transferTo(10,2)
- turtle.select(12) --Rings
- turtle.transferTo(6, 2)
- --All Parts Should be in place for craft
- --Need to remove excess parts/parts used later
- turtle.select(14)
- turtle.drop(1) --Drops "extra" bolt
- turtle.select(15)
- turtle.drop(1) --Drops "extra" rod
- --Moves Parts used later into temporary storage unit
- turtle.turnRight()
- turtle.select(16)
- turtle.drop()
- turtle.select(15)
- turtle.drop()
- turtle.select(14)
- turtle.drop()
- turtle.select(13)
- turtle.drop()
- --Craft 2 Gears
- turtle.craft(2)
- sleep(1)
- end
- function drillHeadMaker()
- --Moves Gears to slots 15/10
- turtle.transferTo(15, 1)
- turtle.transferTo(10,1)
- turtle.select(1)
- turtle.suck() --Grabs plate
- turtle.transferTo(8, 1)
- turtle.suck() --Grabs Rod
- turtle.transferTo(11.1)
- turtle.suck() --Grabs Bolts
- turtle.transferTo(6, 1)
- turtle.transferTo(14, 1)
- turtle.transferTo(16, 1)
- turtle.suck() --Grabs Curved Plates
- turtle.transferTo(7, 1)
- turtle.transferTo(12,1)
- turtle.craft(1)
- turtle.turnRight()
- turtle.drop()
- turtle.turnRight()
- turtle.turnRight()
- end
- while true do
- ingotChecker()
- end
Add Comment
Please, Sign In to add comment