Advertisement
Guest User

Untitled

a guest
Aug 16th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. local tArgs = { ... }
  2. start = tArgs[1]
  3. size = 2
  4.  
  5. turtle.select(1)
  6.  
  7. for i=1,2 do
  8. turtle.digDown()
  9. turtle.down()
  10. end
  11.  
  12. for y=start/3,93/3 do
  13.  
  14. for i=1,size do
  15. for j=1,size do
  16. while j ~= size and turtle.detect() do
  17. turtle.dig()
  18. end
  19. turtle.digUp()
  20. turtle.digDown()
  21.  
  22. if turtle.getItemCount(16) > 0 then
  23. turtle.place()
  24. for slot=3,16 do
  25. turtle.select(slot)
  26. turtle.drop()
  27. end
  28. turtle.select(1)
  29. turtle.dig()
  30. end
  31.  
  32. if j ~= size then
  33. while not turtle.forward() do
  34. turtle.attack()
  35. end
  36. end
  37. end
  38.  
  39. turtle.select(2)
  40. fixWall()
  41.  
  42. if i ~= size then
  43. if (i % 2 == 1) then
  44. turtle.turnRight()
  45. else
  46. turtle.turnLeft()
  47. end
  48. while turtle.detect() do
  49. turtle.dig()
  50. end
  51. turtle.forward()
  52.  
  53.  
  54. if (i % 2 == 1) then
  55. turtle.turnLeft()
  56. fixWall()
  57. turtle.turnRight()
  58. turtle.turnRight()
  59. else
  60. turtle.turnRight()
  61. fixWall()
  62. turtle.turnLeft()
  63. turtle.turnLeft()
  64. end
  65. end
  66.  
  67. turtle.select(1)
  68. end
  69.  
  70. turtle.turnRight()
  71. for i=1,size-1 do
  72. while not turtle.forward() do
  73. turtle.attack()
  74. end
  75. end
  76.  
  77. turtle.turnLeft()
  78. fixWall()
  79. turtle.turnRight()
  80.  
  81. for i=1,3 do
  82. turtle.digDown()
  83. turtle.down()
  84. end
  85.  
  86. turtle.turnRight()
  87. end
  88.  
  89. for i=1,93 do
  90. turtle.up()
  91. end
  92.  
  93. function fixWall()
  94. turtle.dig()
  95. turtle.forward()
  96. turtle.placeUp()
  97. turtle.placeDown()
  98. turtle.back()
  99. turtle.place()
  100. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement