Advertisement
Plazter

Minings

Oct 19th, 2013
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. rednet.open("right")
  2.  
  3.  
  4. local master = 8
  5.  
  6. local mining = 16
  7.  
  8. local conduit = 15
  9.  
  10. local dropoff = 14
  11.  
  12. local fuel = 13
  13.  
  14.  
  15. function Fuel()
  16.  
  17.  
  18. if turtle.getFuelLevel() < 50 then
  19.  
  20. turtle.select(13)
  21.  
  22. turtle.place()
  23.  
  24. turtle.suck()
  25.  
  26. turtle.refuel()
  27.  
  28. turtle.dig()
  29. end
  30.  
  31. end
  32.  
  33.  
  34. function assemble()
  35.  
  36. turtle.select(mining)
  37.  
  38. turtle.place()
  39.  
  40. turtle.select(conduit)
  41.  
  42. turtle.up()
  43.  
  44. turtle.place()
  45.  
  46. turtle.back()
  47.  
  48. turtle.down()
  49.  
  50. turtle.select(dropoff)
  51.  
  52. turtle.place()
  53.  
  54. end
  55.  
  56.  
  57. function disassemble()
  58.  
  59. turtle.select(dropoff)
  60.  
  61. turtle.dig()
  62.  
  63. turtle.forward()
  64.  
  65. turtle.select(mining)
  66.  
  67. turtle.dig()
  68.  
  69. turtle.select(conduit)
  70.  
  71. turtle.up()
  72.  
  73. turtle.dig()
  74.  
  75. turtle.down()
  76. end
  77.  
  78.  
  79.  
  80. while true do
  81.  
  82.  
  83. local id, msg = rednet.receive()
  84.  
  85.  
  86.  
  87. if msg == "run" then
  88.  
  89. Fuel()
  90.  
  91. assemble()
  92.  
  93. sleep(15)
  94.  
  95. disassemble()
  96. turtle.forward()
  97. end
  98.  
  99. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement