Advertisement
Guest User

Untitled

a guest
Aug 28th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. function PlaceTorchRight()
  2. slot = turtle.getSelectedSlot()
  3. turtle.select(15)
  4. turtle.place()
  5. turtle.turnLeft()
  6. turtle.turnLeft()
  7. turtle.select(slot)
  8. end
  9.  
  10. function PlaceTorchLeft()
  11. slot = turtle.getSelectedSlot()
  12. turtle.select(15)
  13. turtle.place()
  14. turtle.turnRight()
  15. turtle.turnRight()
  16. turtle.select(slot)
  17. end
  18.  
  19. function Dig()
  20. for i = 1, 2 do
  21. turtle.digDown()
  22. turtle.digUp()
  23. turtle.dig()
  24. turtle.forward()
  25. end
  26. end
  27.  
  28. function GoInLeft()
  29. turtle.digDown()
  30. turtle.digUp()
  31. turtle.turnLeft()
  32. turtle.dig()
  33. turtle.forward()
  34. turtle.turnLeft()
  35. end
  36.  
  37. function GoInRight()
  38. turtle.digDown()
  39. turtle.digUp()
  40. turtle.turnRight()
  41. turtle.dig()
  42. turtle.forward()
  43. turtle.turnRight()
  44. end
  45.  
  46. function PlaceInChest()
  47. slot = turtle.getSelectedSlot()
  48. if turtle.getItemCount(13) == 64 then
  49. turtle.select(16)
  50. turtle.placeDown()
  51. for i = 2, 13 do
  52. turtle.select(i)
  53. turtle.dropDown()
  54. end
  55. end
  56. turtle.select(slot)
  57. end
  58.  
  59. function NeedsFuel()
  60. if turtle.getFuelLimit() == 0 then
  61. slot = turtle.getSelectedSlot()
  62. turtle.select(14)
  63. turtle.refuel()
  64. end
  65. end
  66.  
  67. function goInPos
  68. turtle.turnRight()
  69. turtle.forward()
  70. turtle.up()
  71. turtle.turnLeft()
  72. turtle.dig()
  73. turtle.forward()
  74. turtle.turnLeft()
  75. end
  76.  
  77. function TwoBlock()
  78. for i = 1, 5
  79. Dig()
  80. GoInRight()
  81. Dig()
  82. GoInLeft()
  83. NeedsFuel()
  84. end
  85. end
  86.  
  87. print("Auf Slot 14: Fuel")
  88. print("Auf Slot 15: Torch")
  89. print("Auf Slot 16: Chest")
  90. print("Wie weit soll die Turtle fahren? (Turtle macht das zehnfache)")
  91. local input = read()
  92.  
  93. for i = 1, input do
  94. TwoBlock()
  95. PlaceTorchRight()
  96. PlaceInChest()
  97. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement