Advertisement
Guest User

Untitled

a guest
Dec 10th, 2016
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1. function place()
  2.  
  3. turtle.select(1)
  4. x = 1
  5. if turtle.getItemCount(x) == 0 then
  6. repeat turtle.select(x+1)
  7. x = x + 1
  8. if x == 16 then
  9. x = 1
  10. y = 2
  11. end
  12. if y == 2 then
  13. os.reboot()
  14. end
  15. until turtle.getItemCount(x) > 0
  16. end
  17. turtle.placeUp()
  18. turtle.placeDown()
  19. end
  20.  
  21. function placeright()
  22.  
  23. turtle.select(1)
  24. x = 1
  25. if turtle.getItemCount(x) == 0 then
  26. repeat turtle.select(x+1)
  27. x = x + 1
  28. if x == 16 then
  29. x = 1
  30. y = 2
  31. end
  32. if y == 2 then
  33. os.reboot()
  34. end
  35. until turtle.getItemCount(x) > 0
  36. end
  37. turtle.placeRight()
  38.  
  39. function placeleft()
  40.  
  41. turtle.select(1)
  42. x = 1
  43. if turtle.getItemCount(x) == 0 then
  44. repeat turtle.select(x+1)
  45. x = x + 1
  46. if x == 16 then
  47. x = 1
  48. y = 2
  49. end
  50. if y == 2 then
  51. os.reboot()
  52. end
  53. until turtle.getItemCount(x) > 0
  54. end
  55. turtle.placeLeft()
  56.  
  57. end
  58.  
  59. for k = 1,4 do
  60.  
  61. for i = 1,40 do
  62. place()
  63. turtle.forward()
  64. end
  65. turtle.turnRight()
  66. end
  67.  
  68. for k = 1,1 do
  69.  
  70. turtle.back()
  71.  
  72. for i = 1, 42 do
  73. placeleft()
  74. turtle.forward()
  75. end
  76. turtle.back()
  77. turtle.turnRight()
  78. end
  79.  
  80. for k = 1,2 do
  81. for i = 1, 41 do
  82. placeleft()
  83. turtle.forward()
  84. end
  85. turtle.back()
  86. turtle.turnRight()
  87. end
  88. for k = 1,1 do
  89. for i = 1,40 do
  90. placeleft()
  91. turtle.forward()
  92. end
  93. turtle.turnRight()
  94. end
  95.  
  96. for k = 1,1 do
  97. for i = 1,38 do
  98. turtle.forward()
  99. placeright()
  100. end
  101. turtle.forward()
  102. turtle.turnRight()
  103. turtle.forward()
  104. end
  105.  
  106. for k = 1,2 do
  107. for i = 1, 37 do
  108. turtle.forward()
  109. placeright()
  110. end
  111. turtle.forward()
  112. turtle.turnRight()
  113. turtle.forward()
  114. end
  115.  
  116. for k = 1,1 do
  117. for i = 1,36 do
  118. turtle.forward()
  119. placeright()
  120. end
  121. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement