Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("kapi")
- -- Chest to pull from in front, chest to deposit in to the left, and redstone signal on from the back.
- while true do
- if rs.getAnalogInput(back) > 0 then
- print("Signal detected. Picking up materials for block")
- turtle.select(1)
- turtle.suck(64)
- turtle.select(2)
- turtle.suck(64)
- turtle.select(3)
- turtle.suck(64)
- turtle.select(5)
- turtle.suck(64)
- turtle.select(6)
- turtle.suck(64)
- turtle.select(7)
- turtle.suck(64)
- turtle.select(9)
- turtle.suck(64)
- turtle.select(10)
- turtle.suck(64)
- turtle.select(11)
- turtle.suck(64)
- if turtle.getItemCount(11) == 64 then
- print("Crafting")
- turtle.select(16)
- turtle.craft(64)
- print("Depositing")
- turtle.turnLeft()
- turtle.drop(64)
- turtle.turnRight()
- else
- print("We seem to be out of materials. \nPress enter to resume.\nEnsure the Turtle is clear of all materials.")
- x = kapi.keyread()
- if x == keys.enter then
- print("Resuming")
- else
- print("You didn't hit enter. I'm so disappointed in you. Still resuming though.")
- end
- end
- else
- print("Signal not detected. Powering down, rechecking in one minute.")
- sleep(60)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement