ecco7777

CC quarry mover

May 26th, 2016
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.97 KB | None | 0 0
  1. term.clear()
  2. term.setCursorPos(1,1)
  3. print("Items in dieser reihenfolge in die Turtle:")
  4. print("1. solar panel,2. eu consumer,3. energy bridge,4. bc producer,5. quarry,6. enderchest,7. gate reader")
  5.  
  6. function placeSlot(slot)
  7. turtle.select(slot)
  8. turtle.place()
  9. end
  10.  
  11. function digSlot(slot)
  12. turtle.select(slot)
  13. turtle.dig()
  14. end
  15.  
  16. function placeQuarry()
  17. placeSlot(1)
  18. turtle.down()
  19. placeSlot(2)
  20. turtle.down()
  21. placeSlot(3)
  22. turtle.down()
  23. placeSlot(4)
  24. turtle.down()
  25. placeSlot(5)
  26. turtle.down()
  27. placeSlot(6)
  28. turtle.select(7)
  29. turtle.placeUp()
  30. end
  31.  
  32. function digQuarry()
  33. turtle.select(7)
  34. turtle.digUp()
  35. digSlot(6)
  36. turtle.up()
  37. digSlot(5)
  38. turtle.up()
  39. digSlot(4)
  40. turtle.up()
  41. digSlot(3)
  42. turtle.up()
  43. digSlot(2)
  44. turtle.up()
  45. digSlot(1)
  46. end
  47.  
  48. while true do
  49. if peripheral.getType("top")=="gateReader" then
  50. g=peripheral.wrap("top")
  51. while g.get()["Work Done"]==false do
  52. sleep(10)
  53. end
  54. digQuarry()
  55. for i=1, 9 do
  56. turtle.dig()
  57. turtle.forward()
  58. end
  59. end
  60. placeQuarry()
  61. end
Add Comment
Please, Sign In to add comment