Advertisement
Guest User

asd

a guest
Jan 16th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.76 KB | None | 0 0
  1. function Break()
  2.  
  3. function dig()
  4. turtle.attack()
  5. turtle.dig()
  6. end
  7.  
  8. function liniel()
  9. turtle.forward()
  10. dig()
  11. turtle.forward()
  12. dig()
  13. turtle.forward()
  14. dig()
  15. turtle.forward()
  16. dig()
  17. turtle.forward()
  18. dig()
  19. turtle.forward()
  20. dig()
  21. turtle.forward()
  22. dig()
  23. turtle.forward()
  24. dig()
  25. turtle.forward()
  26. dig()
  27. turtle.forward()
  28. end
  29.  
  30. function TurnLeft()
  31.  
  32. turtle.turnLeft()
  33. dig()
  34. turtle.forward()
  35. turtle.turnLeft()
  36. dig()
  37.  
  38. end
  39.  
  40. function TurnRight()
  41.  
  42. turtle.turnRight()
  43. dig()
  44. turtle.forward()
  45. turtle.turnRight()
  46. dig()
  47.  
  48. end
  49. --ANIMATIE START
  50. turtle.up()
  51. turtle.turnLeft()
  52. turtle.turnLeft()
  53. turtle.turnLeft()
  54. turtle.turnLeft()
  55. turtle.down()
  56.  
  57. --SPARGEREA PRIMUL START
  58.  
  59. turtle.select(1)
  60.  
  61. turtle.turnLeft()
  62. dig()
  63. turtle.forward()
  64. turtle.turnRight()
  65. dig()
  66. liniel()
  67.  
  68. TurnRight()
  69. liniel()
  70.  
  71. TurnLeft()
  72. liniel()
  73.  
  74. --URCARE
  75.  
  76. turtle.digUp()
  77. turtle.up()
  78. turtle.turnLeft()
  79. turtle.turnLeft()
  80.  
  81. --SPARGEREA CELUI DE AL DOILEA STRAT
  82.  
  83. liniel()
  84. turtle.dig()
  85. turtle.forward()
  86.  
  87. TurnRight()
  88. liniel()
  89.  
  90. TurnLeft()
  91. liniel()
  92.  
  93. --URCARE
  94.  
  95. turtle.digUp()
  96. turtle.up()
  97. turtle.turnLeft()
  98. turtle.turnLeft()
  99.  
  100. --SPARGEREA CELUI DE AL TREILEA STRAT
  101.  
  102. liniel()
  103. turtle.dig()
  104. turtle.forward()
  105.  
  106. TurnRight()
  107. liniel()
  108.  
  109. TurnLeft()
  110. liniel()
  111.  
  112. --URCARE
  113.  
  114. turtle.digUp()
  115. turtle.up()
  116. turtle.turnLeft()
  117. turtle.turnLeft()
  118.  
  119. --SPARGEREA CELUI DE AL PATRULEA STRAT
  120.  
  121. liniel()
  122. turtle.dig()
  123. turtle.forward()
  124.  
  125. TurnRight()
  126. liniel()
  127.  
  128. TurnLeft()
  129. liniel()
  130.  
  131. --URCARE
  132.  
  133. turtle.digUp()
  134. turtle.up()
  135. turtle.turnLeft()
  136. turtle.turnLeft()
  137.  
  138. --SPARGEREA CELUI DE AL CINCELEA STRAT
  139.  
  140. liniel()
  141. turtle.dig()
  142. turtle.forward()
  143.  
  144. TurnRight()
  145. liniel()
  146.  
  147. TurnLeft()
  148. liniel()
  149.  
  150. --GO HOME
  151.  
  152. turtle.turnLeft()
  153. turtle.forward()
  154. turtle.down()
  155. turtle.down()
  156. turtle.down()
  157. turtle.down()
  158. turtle.turnLeft()
  159.  
  160. for i = 1, 10 do
  161. turtle.forward()
  162. end
  163.  
  164. for i = 1, 2 do
  165. turtle.turnLeft()
  166. end
  167.  
  168. end
  169.  
  170. function Build()
  171.  
  172. function part2()
  173. turtle.turnLeft()
  174. turtle.place()
  175. turtle.turnRight()
  176. turtle.turnRight()
  177. turtle.place()
  178. turtle.turnLeft()
  179. turtle.back()
  180. end
  181.  
  182. --CONSTRUIREA PRIMULUI STRAT
  183. turtle.turnLeft()
  184. turtle.turnLeft()
  185. turtle.back()
  186. turtle.back()
  187. turtle.select(1)
  188. turtle.place()
  189. turtle.back()
  190. turtle.place()
  191. turtle.back()
  192. turtle.place()
  193. turtle.back()
  194. turtle.place()
  195. turtle.back()
  196. turtle.place()
  197. turtle.back()
  198. turtle.place()
  199. turtle.back()
  200. turtle.place()
  201. turtle.back()
  202. turtle.place()
  203. turtle.back()
  204. turtle.place()
  205.  
  206. turtle.up()
  207. turtle.forward()
  208.  
  209. --CONSTRUIREA CELUI DE AL DOILEA STRAT
  210.  
  211. turtle.turnLeft()
  212. turtle.turnLeft()
  213. turtle.place()
  214.  
  215. part2()
  216. part2()
  217. part2()
  218. part2()
  219. part2()
  220. part2()
  221. part2()
  222. part2()
  223.  
  224. --CONSTRUIREA CELUI DE AL TREILEA STRAT
  225.  
  226. turtle.up()
  227. turtle.place()
  228. turtle.turnRight()
  229. turtle.place()
  230. turtle.turnRight()
  231. turtle.turnRight()
  232. turtle.place()
  233. turtle.turnRight()
  234. turtle.up()
  235. turtle.forward()
  236. turtle.forward()
  237. turtle.forward()
  238. turtle.down()
  239. turtle.turnLeft()
  240. turtle.turnLeft()
  241. turtle.place()
  242. turtle.back()
  243. turtle.place()
  244. turtle.up()
  245. turtle.turnLeft()
  246. turtle.turnLeft()
  247.  
  248. --CONSTRUIREA CELUI DE AL PATRULEA STRAT
  249.  
  250. turtle.back()
  251. turtle.place()
  252. part2()
  253. part2()
  254. part2()
  255. turtle.turnLeft()
  256. turtle.place()
  257. turtle.turnLeft()
  258. turtle.turnLeft()
  259. turtle.place()
  260. turtle.turnRight()
  261. turtle.place()
  262. turtle.up()
  263. turtle.forward()
  264. turtle.forward()
  265. turtle.turnLeft()
  266. turtle.turnLeft()
  267. turtle.down()
  268. turtle.down()
  269. turtle.forward()
  270.  
  271. --TERMINAREA MASINII
  272.  
  273. turtle.place()
  274. turtle.back()
  275. turtle.up()
  276. turtle.up()
  277. turtle.forward()
  278. turtle.forward()
  279. turtle.forward()
  280. turtle.forward()
  281. turtle.forward()
  282. turtle.select(2)
  283. turtle.placeDown()
  284. turtle.forward()
  285. turtle.forward()
  286. turtle.forward()
  287. turtle.forward()
  288. turtle.forward()
  289. turtle.down()
  290. turtle.down()
  291. turtle.select(3)
  292. turtle.placeDown()
  293. turtle.up()
  294. turtle.up()
  295. turtle.back()
  296. turtle.back()
  297. turtle.back()
  298. turtle.back()
  299. turtle.back()
  300. turtle.back()
  301. turtle.back()
  302. turtle.back()
  303. turtle.back()
  304. turtle.back()
  305. turtle.down()
  306. turtle.down()
  307. turtle.down()
  308. turtle.forward()
  309. end
  310.  
  311. function destroy()
  312. turtle.back()
  313. for i = 1, 3 do
  314. turtle.up()
  315. end
  316. for i = 1, 5 do
  317. turtle.forward()
  318. end
  319. turtle.select(2)
  320. turtle.placeDown()
  321. for i = 1, 5 do
  322. turtle.forward()
  323. end
  324. for i = 1, 2 do
  325. turtle.down()
  326. end
  327. turtle.select(3)
  328. turtle.placeDown()
  329. for i = 1, 2 do
  330. turtle.up()
  331. end
  332. for i = 1, 10 do
  333. turtle.back()
  334. end
  335. for i = 1, 3 do
  336. turtle.down()
  337. end
  338. turtle.forward()
  339. end
  340.  
  341. function producere(produs)
  342.  
  343. function breakobs()
  344.  
  345. turtle.up()
  346. turtle.select(1)
  347. turtle.place()
  348. turtle.down()
  349. sleep(2)
  350. turtle.select(4)
  351. turtle.place()
  352. turtle.up()
  353. turtle.select(1)
  354. turtle.dig()
  355. turtle.down()
  356. sleep(3)
  357. turtle.select(16)
  358. turtle.dig()
  359.  
  360. end
  361.  
  362. print("Cate bucati de obsidian vrei?")
  363. print("Pune " .. p .. " bucati de redstone in slotul numarul 4")
  364. print("Dupa ce ai pus redstoneul apasa pe ENTER")
  365.  
  366. ceva = os.pullEvent("key")
  367.  
  368. for i = 1, produs do
  369. breakobs()
  370. end
  371.  
  372. turtle.up()
  373. turtle.select(1)
  374. turtle.place()
  375. turtle.down()
  376.  
  377. end
  378.  
  379. function Mesaj1(mess)
  380.  
  381. function Check()
  382. while true do
  383. local event, key, isHeld = os.pullEvent("key")
  384. return keys.getName( key )
  385. end
  386. end
  387.  
  388. function first()
  389. for i = 1, 3 do
  390. print("| |")
  391. end
  392. print("| Breaking first layer |")
  393. for i = 1, 4 do
  394. print("| |")
  395. end
  396. print("+-------------------------------------+")
  397. end
  398.  
  399. term.clear()
  400. term.setCursorPos(1, 1)
  401.  
  402. print("+-------------------------------------+")
  403. print("| Clearing space |")
  404. print("+-------------------------------------+")
  405.  
  406. if (mess == "First") then
  407.  
  408. varchar = Check()
  409.  
  410.  
  411. if not (varchar == "pause") then
  412. print("ok")
  413. Check()
  414. else
  415. first()
  416. end
  417. end
  418. end
  419.  
  420. Mesaj1("First")
  421.  
  422. --print("Eliberarea locului!")
  423. --Break()
  424. --print("Locul a fost eliberat!")
  425. --print("Incepe construirea masinii!")
  426. --Build()
  427. --print("Masina a fost construita cu succes!")
  428. --producere(read())
  429. --print("Gata am terminat!")
  430. --destroy()
  431. --turtle.down()
  432. --Break()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement