Advertisement
M0n5t3r

Untitled

Jun 1st, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.88 KB | None | 0 0
  1. local torchSlot = 1
  2. local counter = 0
  3. local torchCounter = 0
  4. local secondCounter = 0
  5.  
  6. function torchesslotcheck()
  7. if turtle.getItemCount(torchslot) < 1 then
  8. turtle.select(torchslot)
  9. turtle.turnLeft()
  10. turtle.turnLeft()
  11. turtle.forward()
  12. print("put torches in the chest!")
  13. repeat
  14. turtle.suck()
  15. until turtle.getItemCount(torchslot) > 10
  16. turtle.turnLeft()
  17. turtle.turnLeft()
  18. turtle.forward()
  19. end
  20. end
  21.  
  22. function mineForward()
  23. turtle.select(1)
  24. print(counter)
  25. -- dig vooruit, dig boven, dig onder
  26. repeat
  27. turtle.dig()
  28. until not turtle.detect() == true
  29. repeat
  30. turtle.digUp()
  31. until turtle.up() == true
  32. turtle.down()
  33. turtle.digDown()
  34.  
  35. -- ga naar links, dig, naar voren, dig up
  36. turtle.turnLeft()
  37. repeat
  38. turtle.dig()
  39. until not turtle.detect() == true
  40. turtle.forward()
  41. repeat
  42. turtle.digUp()
  43. until turtle.up() == true
  44. turtle.down()
  45. turtle.digDown()
  46.  
  47. -- ga naar rechts, vooren, dig up dig down
  48. turtle.turnRight()
  49. turtle.turnRight()
  50. turtle.forward()
  51. repeat
  52. turtle.dig()
  53. until not turtle.detect() == true
  54. turtle.forward()
  55. repeat
  56. turtle.digUp()
  57. until turtle.up() == true
  58. turtle.down()
  59. turtle.digDown()
  60.  
  61. -- ga weer terug naar midden positie
  62. turtle.turnLeft()
  63. turtle.turnLeft()
  64. turtle.forward()
  65. turtle.turnRight()
  66. turtle.forward()
  67. print(counter)
  68. repeat
  69. turtle.dig()
  70. until not turtle.detect() == true
  71. counter = counter + 1
  72. secondCounter = secondCounter + 1
  73. if secondCounter == 8 then
  74. turtle.turnLeft()
  75. turtle.turnLeft()
  76. turtle.forward()
  77. turtle.select(1)
  78. turtle.placeDown()
  79. torchCounter = torchCounter + 1
  80. secondCounter = 0
  81. turtle.turnLeft()
  82. turtle.turnLeft()
  83. turtle.forward()
  84. end
  85. checkSlots()
  86. endCheck()
  87. end
  88.  
  89. function checkSlots()
  90. turtle.getItemCount(16)
  91. if turtle.getItemCount(16) > 0 then
  92. print("gotte go clean my inventory!")
  93. turtle.turnLeft()
  94. turtle.turnLeft()
  95. for i=1,counter do
  96. turtle.forward()
  97. end
  98. for q=3,16 do
  99. turtle.select(q)
  100. turtle.dropDown()
  101. end
  102. turtle.turnLeft()
  103. turtle.turnLeft()
  104. for i=1,counter do
  105. turtle.forward()
  106. end
  107. end
  108.  
  109. end
  110.  
  111. function endCheck()
  112. turtle.getItemCount(1)
  113. if turtle.getItemCount(1) == 1 then
  114. turtle.placeDown()
  115. turtle.turnLeft()
  116. turtle.turnLeft()
  117. for i=1,counter do
  118. turtle.forward()
  119. end
  120. end
  121. end
  122.  
  123. print("Lets GO!")
  124. torchesslotcheck()
  125. while true do
  126. mineForward()
  127. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement