Advertisement
M0n5t3r

Untitled

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