Guest User

Untitled

a guest
Jan 15th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.95 KB | None | 0 0
  1. local function house()
  2. local function selectslot(num)
  3. if num then
  4. turtle.select(num)
  5. return true
  6. else
  7. for i=1,16 do
  8. if turtle.getItemCount(i)>0 then
  9. turtle.select(i)
  10. return true
  11. end
  12. end
  13. end
  14. end
  15.  
  16. local p=turtle.place
  17. local u=turtle.placeUp
  18. local d=turtle.placeDown
  19.  
  20. function turtle.place(...) selectslot(...) p(...) end
  21. function turtle.placeUp(...) selectslot(...) u(...) end
  22. function turtle.placeDown(...) selectslot(...) d(...) end
  23. print("Are wall and roof blocks in slots 1-6?")
  24. write("Yes|No ")
  25. local ans = read()
  26. print("Is glass in slot 16, torches in slot 15, floor blocks in slot 14, 2 chests in slot 13 and a crafting table in slot 12?")
  27. write("Yes|No ")
  28. local ans2 = read()
  29. if string.lower(ans) and string.lower(ans2) == "yes" then
  30. term.clear()
  31. term.setCursorPos(1,1)
  32. turtle.up()
  33. turtle.placeDown()
  34. turtle.placeUp()
  35. turtle.back()
  36. for i = 1,7 do
  37. turtle.place()
  38. turtle.placeDown()
  39. turtle.placeUp()
  40. turtle.back()
  41. end
  42. turtle.place()
  43. turtle.placeUp()
  44. turtle.placeDown()
  45. turtle.turnRight()
  46. turtle.back()
  47. turtle.place()
  48. for i = 1,7 do
  49. turtle.place()
  50. turtle.placeDown()
  51. turtle.placeUp()
  52. turtle.back()
  53. end
  54. turtle.place()
  55. turtle.placeDown()
  56. turtle.placeUp()
  57. turtle.turnRight()
  58. turtle.back()
  59. turtle.place()
  60. for i = 1,7 do
  61. turtle.place()
  62. turtle.placeDown()
  63. turtle.placeUp()
  64. turtle.back()
  65. end
  66. turtle.place()
  67. turtle.placeUp()
  68. turtle.placeDown()
  69. turtle.turnRight()
  70. turtle.back()
  71. for i = 1,6 do
  72. turtle.place()
  73. turtle.placeDown()
  74. turtle.placeUp()
  75. turtle.back()
  76. end
  77. turtle.place()
  78. turtle.turnLeft()
  79. turtle.placeDown()
  80. turtle.placeUp()
  81. turtle.back()
  82. turtle.place()
  83. turtle.up()
  84. turtle.up()
  85. turtle.forward()
  86. turtle.turnLeft()
  87. turtle.forward()
  88. turtle.placeUp()
  89. turtle.back()
  90. turtle.place()
  91. for i = 1, 7 do
  92. turtle.placeUp()
  93. turtle.back()
  94. turtle.place()
  95. end
  96. turtle.placeUp()
  97. turtle.turnLeft()
  98. turtle.back()
  99. turtle.place()
  100. for i = 1, 7 do
  101. turtle.placeUp()
  102. turtle.back()
  103. turtle.place()
  104. end
  105. turtle.placeUp()
  106. turtle.turnLeft()
  107. turtle.back()
  108. turtle.place()
  109. for i = 1, 7 do
  110. turtle.placeUp()
  111. turtle.back()
  112. turtle.place()
  113. end
  114. turtle.placeUp()
  115. turtle.turnLeft()
  116. turtle.back()
  117. turtle.place()
  118. for i = 1, 6 do
  119. turtle.placeUp()
  120. turtle.back()
  121. turtle.place()
  122. end
  123. turtle.placeUp()
  124. turtle.placeDown()
  125. turtle.turnLeft()
  126. turtle.back()
  127. turtle.place()
  128. for i = 1,7 do
  129. turtle.placeUp()
  130. turtle.back()
  131. end
  132. turtle.turnLeft()
  133. turtle.back()
  134. for i = 1,6 do
  135. turtle.placeUp()
  136. turtle.back()
  137. end
  138. turtle.turnLeft()
  139. turtle.back()
  140. for i = 1,6 do
  141. turtle.placeUp()
  142. turtle.back()
  143. end
  144. turtle.turnLeft()
  145. turtle.back()
  146. for i = 1,5 do
  147. turtle.placeUp()
  148. turtle.back()
  149. end
  150. for i = 1,3 do
  151. turtle.forward()
  152. end
  153. turtle.turnRight()
  154. turtle.forward()
  155. for i = 1,5 do
  156. turtle.placeUp()
  157. turtle.forward()
  158. end
  159. turtle.turnLeft()
  160. for i = 1,3 do
  161. turtle.forward()
  162. end
  163. turtle.turnLeft()
  164. for i = 1,3 do
  165. turtle.forward()
  166. end
  167. turtle.turnLeft()
  168. turtle.forward()
  169. for i = 1,2 do
  170. turtle.placeUp()
  171. turtle.forward()
  172. end
  173. turtle.forward()
  174. for i = 1,2 do
  175. turtle.placeUp()
  176. turtle.forward()
  177. end
  178. turtle.turnLeft()
  179. turtle.forward()
  180. turtle.turnLeft()
  181. turtle.forward()
  182. turtle.select(16)
  183. for i = 1,1 do
  184. turtle.placeUp(16)
  185. turtle.forward()
  186. end
  187. turtle.placeUp(16)
  188. turtle.turnRight()
  189. turtle.forward()
  190. turtle.placeUp(16)
  191. turtle.turnRight()
  192. turtle.forward()
  193. turtle.placeUp(16)
  194. for i = 1,4 do
  195. turtle.back()
  196. end
  197. turtle.placeUp(16)
  198. turtle.forward()
  199. turtle.placeUp(16)
  200. turtle.turnRight()
  201. turtle.forward()
  202. turtle.placeUp(16)
  203. turtle.turnRight()
  204. turtle.forward()
  205. turtle.placeUp(16)
  206. turtle.turnLeft()
  207. turtle.forward()
  208. turtle.forward()
  209. turtle.placeUp(16)
  210. turtle.forward()
  211. turtle.placeUp(16)
  212. turtle.turnLeft()
  213. turtle.forward()
  214. turtle.placeUp(16)
  215. turtle.turnLeft()
  216. turtle.forward()
  217. turtle.placeUp(16)
  218. turtle.turnRight()
  219. turtle.forward()
  220. turtle.forward()
  221. turtle.placeUp(16)
  222. turtle.forward()
  223. turtle.placeUp(16)
  224. turtle.turnRight()
  225. turtle.forward()
  226. turtle.placeUp(16)
  227. turtle.turnRight()
  228. turtle.forward()
  229. turtle.placeUp(16)
  230. turtle.forward()
  231. turtle.turnLeft()
  232. turtle.down()
  233. turtle.place(15)
  234. turtle.turnLeft()
  235. turtle.turnLeft()
  236. for i = 1,4 do
  237. turtle.forward()
  238. end
  239. turtle.place(15)
  240. turtle.back()
  241. turtle.back()
  242. turtle.turnLeft()
  243. turtle.forward()
  244. turtle.forward()
  245. turtle.place(15)
  246. for i = 1,4 do
  247. turtle.back()
  248. end
  249. turtle.turnLeft()
  250. turtle.turnLeft()
  251. turtle.place(15)
  252. for i = 1,2 do
  253. turtle.down()
  254. end
  255. turtle.forward()
  256. turtle.turnRight()
  257. for i = 1,3 do
  258. turtle.forward()
  259. end
  260. turtle.turnRight()
  261. for i = 1,6 do
  262. turtle.digDown()
  263. turtle.placeDown(14)
  264. turtle.forward()
  265. end
  266. turtle.digDown()
  267. turtle.placeDown(14)
  268. turtle.turnRight()
  269. turtle.forward()
  270. turtle.turnRight()
  271. for i = 1,6 do
  272. turtle.digDown()
  273. turtle.placeDown(14)
  274. turtle.forward()
  275. end
  276. turtle.digDown()
  277. turtle.placeDown(14)
  278. turtle.turnLeft()
  279. turtle.forward()
  280. turtle.turnLeft()
  281. for i = 1,6 do
  282. turtle.digDown()
  283. turtle.placeDown(14)
  284. turtle.forward()
  285. end
  286. turtle.digDown()
  287. turtle.placeDown(14)
  288. turtle.turnRight()
  289. turtle.forward()
  290. turtle.turnRight()
  291. for i = 1,6 do
  292. turtle.digDown()
  293. turtle.placeDown(14)
  294. turtle.forward()
  295. end
  296. turtle.digDown()
  297. turtle.placeDown(14)
  298. turtle.turnLeft()
  299. turtle.forward()
  300. turtle.turnLeft()
  301. for i = 1,6 do
  302. turtle.digDown()
  303. turtle.placeDown(14)
  304. turtle.forward()
  305. end
  306. turtle.digDown()
  307. turtle.placeDown(14)
  308. turtle.turnRight()
  309. turtle.forward()
  310. turtle.turnRight()
  311. for i = 1,6 do
  312. turtle.digDown()
  313. turtle.placeDown(14)
  314. turtle.forward()
  315. end
  316. turtle.digDown()
  317. turtle.placeDown(14)
  318. turtle.turnLeft()
  319. turtle.forward()
  320. turtle.turnLeft()
  321. for i = 1,6 do
  322. turtle.digDown()
  323. turtle.placeDown(14)
  324. turtle.forward()
  325. end
  326. turtle.digDown()
  327. turtle.placeDown(14)
  328. turtle.turnLeft()
  329. for i = 1,3 do
  330. turtle.forward()
  331. end
  332. turtle.turnRight()
  333. turtle.dig()
  334. turtle.forward()
  335. turtle.digUp()
  336. turtle.digDown()
  337. turtle.placeDown(14)
  338. turtle.turnRight()
  339. turtle.turnRight()
  340. for i = 1,6 do
  341. turtle.forward()
  342. end
  343. turtle.turnRight()
  344. turtle.forward()
  345. turtle.turnLeft()
  346. turtle.place(12)
  347. turtle.turnRight()
  348. turtle.forward()
  349. turtle.turnLeft()
  350. turtle.place(13)
  351. turtle.turnRight()
  352. turtle.forward()
  353. turtle.turnLeft()
  354. turtle.place(13)
  355. for i = 1,16 do
  356. turtle.select(i)
  357. turtle.drop()
  358. end
  359. else
  360. error()
  361. end
  362. end
  363. house()
Add Comment
Please, Sign In to add comment