Advertisement
Guest User

Untitled

a guest
Sep 4th, 2015
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. -- GateReader Trutle for Chunk-eating Frame Quarry
  2. -- Slot 1: Mineing Well
  3. -- Slot 2: 2x place holder item (ie. sticks)
  4. -- All other slots: place holder items
  5. -- Activates upon redstone signal from the top.
  6. -- Sends "busy" redstone signal out the back while miner is busy
  7. redstone.setOutput("back", false)
  8. sleep(1)
  9.  
  10. function deploy()
  11. turtle.select(1)
  12. turtle.placeDown()
  13. redstone.setOutput("back", true)
  14. -- Turn on signal to tell master that miner is busy
  15. turtle.select(2)
  16. if turtle.getItemCount(1) == 0 then
  17. turtle.transferTo(1, 1)
  18. end
  19. print("Mining Well Deployed")
  20. end
  21.  
  22. function getMiner()
  23. turtle.select(1)
  24. turtle.transferTo(2)
  25. -- make sure slot 1 is empty no matter what
  26. turtle.drop()
  27. turtle.digDown()
  28. print("Mining Well Retrieved")
  29. redstone.setOutput("back", false)
  30. end
  31.  
  32. print("Quarry Turtle Ready")
  33. while true do
  34. event = os.pullEvent("redstone")
  35. sleep(0.2)
  36. if redstone.getInput("top") == true then
  37. deploy()
  38. while peripheral.call("right", "get")["Work Done"] == false do
  39. sleep(5)
  40. end
  41. print("Mining Well Done Digging")
  42. getMiner()
  43. end
  44. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement