Advertisement
Guest User

Untitled

a guest
Feb 1st, 2015
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.25 KB | None | 0 0
  1. aantal = 2
  2.  
  3.  
  4.  
  5. function placeBlock(n) -- Place block below, move forward
  6. for i = 1,n do
  7. turtle.placeDown()
  8. turtle.forward()
  9. end
  10. end
  11. function vloer(ab)
  12. a = ab*5
  13. for i = 1,2 do
  14. placeBlock(a) -- Plaats steen
  15.  
  16. for x = 1,2 do -- Moves to second row
  17. turtle.turnLeft()
  18. turtle.forward()
  19. end
  20. placeBlock(a) -- Plaats steen
  21. for x = 1,2 do -- Moves to second row
  22. turtle.turnRight()
  23. turtle.forward()
  24. end
  25. end
  26. placeBlock(a) -- Plaats steen
  27. end
  28.  
  29. function muur()
  30. turtle.select(3) -- Select Wood
  31. for i = 1,4 do
  32. turtle.up()
  33. turtle.placeDown()
  34. end
  35. turtle.forward()
  36. for i = 1,3 do
  37. turtle.down()
  38. end
  39. turtle.select(2) -- Select steen
  40. for i = 1,4 do
  41. placeBlock(3)
  42. turtle.placeDown()
  43. turtle.up()
  44. rotate()
  45. end
  46. end
  47.  
  48. function rotate()
  49. turtle.turnLeft()
  50. turtle.turnLeft()
  51. end
  52.  
  53. function pos2()
  54. rotate()
  55. turtle.forward()
  56. turtle.turnRight()
  57. for i = 1,4 do
  58. turtle.forward()
  59. end
  60. turtle.turnRight()
  61. for i = 1,5 do
  62. turtle.down()
  63. end
  64. end
  65.  
  66. function pos1()
  67. turtle.turnLeft()
  68. turtle.turnLeft()
  69. turtle.forward()
  70. end
  71. function pos3()
  72. for i = 1,4 do
  73. turtle.forward()
  74. end
  75. for i = 1,5 do
  76. turtle.down()
  77. end
  78. turtle.turnRight()
  79. for i = 1,4 do
  80. turtle.forward()
  81. end
  82. turtle.turnLeft()
  83. end
  84.  
  85. function basismuur(a)
  86. for i = 1,a do
  87. muur()
  88. pos2()
  89. muur()
  90. pos3()
  91. end
  92. end
  93.  
  94.  
  95. function pos4()
  96. rotate()
  97. for i = 1,4 do
  98. turtle.up()
  99. end
  100. turtle.turnLeft()
  101. turtle.forward()
  102. turtle.turnRight()
  103. turtle.forward()
  104. turtle.forward()
  105. rotate()
  106. end
  107. function balkback(a)
  108. turtle.select(3) -- Select Wood
  109. b=a*5
  110. for i = 1,b do
  111. turtle.place()
  112. turtle.back()
  113. end
  114. turtle.turnRight()
  115. turtle.back()
  116. for i = 1,6 do
  117. turtle.back()
  118. end
  119. turtle.turnRight()
  120. for i = 1,3 do
  121. turtle.back()
  122. end
  123. for i = 1,b do
  124. turtle.place()
  125. turtle.back()
  126. end
  127. end
  128. function pos5()
  129. turtle.up()
  130. turtle.forward()
  131. turtle.forward()
  132. turtle.turnLeft()
  133. turtle.forward()
  134. turtle.turnRight()
  135. end
  136.  
  137. turtle.select(1) -- Select steen
  138. vloer(aantal)
  139. pos1()
  140. basismuur(aantal)
  141. pos4()
  142. balkback(aantal)
  143. turtle.select(4) -- Select wood
  144. pos5()
  145. vloer(aantal)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement