Derek1017

House Builder

Apr 12th, 2014
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.67 KB | None | 0 0
  1. print("Building house")
  2. print("Ingredients must be in slots 1-5")
  3.  
  4. local function wall()
  5. for i=1, 9 do
  6. if windows==1 and (i==5 or i==6) then
  7. turtle.select(5)
  8. turtle.placeDown()
  9. turtle.select(2)
  10. elseif windows==2 and (i==5 or i==6) then
  11. turtle.select(5)
  12. turtle.placeDown()
  13. turtle.select(3)
  14. else
  15. turtle.placeDown()
  16. end
  17. turtle.forward()
  18. end
  19. turtle.turnLeft()
  20. end
  21.  
  22. --Each layer is 4x10
  23. local function layer()
  24. for k=1, 4 do
  25. wall()
  26. end
  27. turtle.up()
  28. end
  29.  
  30. --INITIATION + BASE LAYERS
  31. turtle.up()
  32. turtle.turnRight()
  33. turtle.select(1)
  34. layer()
  35. wall()
  36. wall()
  37. turtle.select(2)
  38. wall()
  39. wall()
  40. windows=1
  41. turtle.up()
  42. layer()
  43. windows=2
  44.  
  45. --ROOF LAYERS
  46. turtle.select(3)
  47. layer()
  48. turtle.forward()
  49. turtle.turnLeft()
  50. turtle.forward()
  51. turtle.turnRight()
  52. for z=1, 4 do
  53. for i=1, 7 do
  54. if turtle.getItemCount(3) == 0 then
  55. turtle.select(4)
  56. end
  57. turtle.placeDown()
  58. turtle.forward()
  59. end
  60. turtle.turnLeft()
  61. end
  62. turtle.up()
  63. turtle.forward()
  64. turtle.turnLeft()
  65. turtle.forward()
  66. turtle.turnRight()
  67. for z=1, 4 do
  68. for i=1, 5 do
  69. turtle.placeDown()
  70. turtle.forward()
  71. end
  72. turtle.turnLeft()
  73. end
  74. turtle.up()
  75. turtle.forward()
  76. turtle.turnLeft()
  77. turtle.forward()
  78. turtle.turnRight()
  79. for z=1, 4 do
  80. for i=1, 3 do
  81. turtle.placeDown()
  82. turtle.forward()
  83. end
  84. turtle.turnLeft()
  85. end
  86. turtle.up()
  87. turtle.forward()
  88. turtle.turnLeft()
  89. turtle.forward()
  90. turtle.turnRight()
  91. for z=1, 4 do
  92. for i=1, 1 do
  93. turtle.placeDown()
  94. turtle.forward()
  95. end
  96. turtle.turnLeft()
  97. end
  98. turtle.forward()
  99. turtle.turnRight()
  100. for z=1, 5 do
  101. turtle.forward()
  102. turtle.down()
  103. end
  104. turtle.down()
  105. turtle.down()
  106. turtle.down()
  107. turtle.turnRight()
  108. for z=1, 4 do
  109. turtle.forward()
  110. end
  111. print("Mission copmleted.")
Add Comment
Please, Sign In to add comment