Advertisement
Guest User

Untitled

a guest
Feb 10th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.80 KB | None | 0 0
  1. local loop = true
  2. local mine = true
  3. local col = 0
  4. local colactive = true
  5. local i = 0
  6. local countdown
  7. local time
  8. write("Wartezeit: ")
  9. time = read()
  10. while loop == true do
  11. local right = false
  12. turtle.select(1)
  13. turtle.turnLeft()
  14. turtle.suck(3)
  15. turtle.refuel(3)
  16. turtle.turnRight()
  17.  
  18. col = 0
  19. colactive = true
  20. countdown = time
  21. while countdown ~= 0 do
  22. term.clear()
  23. term.setCursorPos(1,1)
  24. write("Minuten bis zum naechsten Abbau:")
  25. write(countdown)
  26. os.sleep(60)
  27. countdown = countdown - 1
  28. end
  29.  
  30. while mine == true do
  31.  
  32. turtle.forward()
  33.  
  34. if colactive == true then
  35. col = col + 1
  36. end
  37.  
  38. if turtle.detectDown() == true then
  39. turtle.digDown()
  40. i = 1
  41. repeat
  42. turtle.select(i)
  43. turtle.placeDown()
  44. if turtle.detectDown == true then
  45. return
  46. end
  47. i = i + 1
  48. until i == 17
  49. i = 1
  50. end
  51.  
  52. if turtle.detect() == true then
  53. colactive = false
  54. if right == false then
  55. right = true
  56. turtle.turnRight()
  57. if turtle.detect() == true then
  58. turtle.turnRight()
  59. turtle.turnRight()
  60. while turtle.detect() == false do
  61. turtle.forward()
  62. end
  63. turtle.turnLeft()
  64. while col ~= 0 do
  65. col = col - 1
  66. turtle.forward()
  67. end
  68. return
  69. else
  70. turtle.forward()
  71. turtle.turnRight()
  72. end
  73. else
  74. right = false
  75. turtle.turnLeft()
  76.  
  77. if turtle.detect() == true then
  78. turtle.turnLeft()
  79. turtle.turnLeft()
  80. while turtle.detect() == false do
  81. turtle.forward()
  82. end
  83. turtle.turnLeft()
  84. turtle.forward()
  85. return
  86. else
  87. turtle.forward()
  88. turtle.turnLeft()
  89. end
  90. end
  91. end
  92. end
  93. i = 1
  94. repeat
  95. turtle.select(i)
  96. turtle.drop()
  97. until i == 17
  98. turtle.turnLeft()
  99. turtle.turnLeft()
  100. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement