Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Crafty turtle to grab raw materials, craft a 3x3 recipe and output the result
- -- Place a drawer above with raw materials
- -- Place craft turtle below that
- -- place a drawer below for output
- -- Can also use chests if that's the only thing in them
- term.clear()
- print("Starting...")
- function getMaterialsFromAbove()
- turtle.suckUp(9)
- turtle.transferTo(2,1)
- turtle.transferTo(3,1)
- turtle.transferTo(5,1)
- turtle.transferTo(6,1)
- turtle.transferTo(7,1)
- turtle.transferTo(9,1)
- turtle.transferTo(10,1)
- turtle.transferTo(11,1)
- end
- sourceDrawer = peripheral.wrap("top")
- while true do
- rawCount = 0
- if sourceDrawer.getItemDetail(1) then
- rawCount = sourceDrawer.getItemDetail(1).count
- end
- if rawCount > 8 then
- term.clear()
- getMaterialsFromAbove()
- turtle.craft()
- turtle.dropDown()
- else
- print("count: "..rawCount.." - sleeping for 10 seconds...")
- os.sleep(10)
- end -- if
- end -- End of while true loop.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement