Advertisement
Andersfc

room

Nov 22nd, 2012
1,674
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 23.14 KB | None | 0 0
  1. --Pastebin: "JLr1NV4i"
  2. --A=Alpha, B=Beta, F=Finished
  3. --This version is: A1
  4. --This program goes 1 forward, then starts digging
  5. --IF you want chests to work with this program, put them in before
  6. --typing "room <x> <y> <z>" or it wont work!
  7.  
  8. shell.run("label set Tom-Cruise")
  9. shell.run("clear")
  10. print("_______________________________________")
  11. print("This program goes 1 forward, then starts digging IF you want chests to work with this program, put them in before typing <room> <x> <y> <z> or it wont work!")
  12. print("_______________________________________")
  13. sleep(5)
  14.  
  15. tArgs = {...}
  16.  
  17. if #tArgs < 3 then
  18. print("Write: room x y z, In numbers!")
  19. return
  20. end
  21.  
  22. if #tArgs > 3 then
  23. print("Write: room x y z, In numbers!")
  24. return
  25. end
  26.  
  27. local supermans = 0
  28. local andersfc1 = 0
  29. local loppy = 0
  30. local x = tArgs[1]
  31. local y = tArgs[2]
  32. local z = tArgs[3]
  33. local You = -1
  34. local B = 0
  35. local You1 = 0
  36. if turtle.getItemCount(16) == 1 then
  37. B = B+1
  38. end
  39. local A = 0
  40. if turtle.getItemCount(14) == 1 then
  41. A = A+1
  42. end
  43.  
  44. tArgs[3] = tArgs[3] - 1
  45. tArgs[2] = tArgs[2] - 2
  46. tArgs[1] = tArgs[1] - 1
  47.  
  48. function DigY1()
  49.  
  50. inv = -1
  51. ChestCheck11()
  52. CheckFuel()
  53. turtle.digDown()
  54. turtle.down()
  55.  
  56. end
  57.  
  58. function ChestCheck11()
  59.  
  60. turtle.select(1)
  61. if turtle.compareTo(13) == true then
  62. turtle.transferTo(13)
  63. end
  64. turtle.select(2)
  65. if turtle.compareTo(13) == true then
  66. turtle.transferTo(13)
  67. end
  68. turtle.select(3)
  69. if turtle.compareTo(13) == true then
  70. turtle.transferTo(13)
  71. end
  72. turtle.select(4)
  73. if turtle.compareTo(13) == true then
  74. turtle.transferTo(13)
  75. end
  76. turtle.select(5)
  77. if turtle.compareTo(13) == true then
  78. turtle.transferTo(13)
  79. end
  80. turtle.select(6)
  81. if turtle.compareTo(13) == true then
  82. turtle.transferTo(13)
  83. end
  84. turtle.select(7)
  85. if turtle.compareTo(13) == true then
  86. turtle.transferTo(13)
  87. end
  88. turtle.select(8)
  89. if turtle.compareTo(13) == true then
  90. turtle.transferTo(13)
  91. end
  92. turtle.select(9)
  93. if turtle.compareTo(13) == true then
  94. turtle.transferTo(13)
  95. end
  96. turtle.select(10)
  97. if turtle.compareTo(13) == true then
  98. turtle.transferTo(13)
  99. end
  100. turtle.select(11)
  101. if turtle.compareTo(13) == true then
  102. turtle.transferTo(13)
  103. end
  104. turtle.select(12)
  105. if turtle.compareTo(13) == true then
  106. turtle.transferTo(13)
  107. end
  108. turtle.select(1)
  109.  
  110. if B == 1 then
  111.  
  112. for i = 1, You1 do
  113. turtle.up()
  114. end
  115.  
  116. MoveBack()
  117. local o = 0
  118. turtle.select(16)
  119. turtle.turnRight()
  120. turtle.turnRight()
  121. turtle.attack()
  122. turtle.attack()
  123. if turtle.getItemCount(16) == 1 then
  124. o = o+1
  125. end
  126. if turtle.compare(16) == true then
  127. o = o+1
  128. end
  129. if o == 2 then
  130.  
  131. turtle.select(1)
  132. turtle.drop(64)
  133. turtle.select(2)
  134. turtle.drop(64)
  135. turtle.select(3)
  136. turtle.drop(64)
  137. turtle.select(4)
  138. turtle.drop(64)
  139. turtle.select(5)
  140. turtle.drop(64)
  141. turtle.select(6)
  142. turtle.drop(64)
  143. turtle.select(7)
  144. turtle.drop(64)
  145. turtle.select(8)
  146. turtle.drop(64)
  147. turtle.select(9)
  148. turtle.drop(64)
  149. turtle.select(10)
  150. turtle.drop(64)
  151. turtle.select(11)
  152. turtle.drop(64)
  153. turtle.select(12)
  154. turtle.drop(64)
  155. o = 0
  156. end
  157. o = 0
  158. turtle.select(1)
  159. turtle.turnRight()
  160. turtle.turnRight()
  161. AntiJam()
  162.  
  163. for i = 1, You1 do
  164.  
  165. turtle.down()
  166. end
  167. You1 = You1+1
  168. end
  169. end
  170.  
  171.  
  172. function EndFuel()
  173.  
  174. checkBlockUp()
  175. turtle.select(15)
  176. turtle.placeUp()
  177. turtle.select(13)
  178. turtle.suckUp()
  179. jog = turtle.getItemCount(13)
  180. jog = jog - 1
  181. turtle.dropUp(jog)
  182. turtle.select(15)
  183. turtle.digUp()
  184. turtle.select(1)
  185. end
  186.  
  187. function ChestCheck10()
  188.  
  189. turtle.select(1)
  190. if turtle.compareTo(13) == true then
  191. turtle.transferTo(13)
  192. end
  193. turtle.select(2)
  194. if turtle.compareTo(13) == true then
  195. turtle.transferTo(13)
  196. end
  197. turtle.select(3)
  198. if turtle.compareTo(13) == true then
  199. turtle.transferTo(13)
  200. end
  201. turtle.select(4)
  202. if turtle.compareTo(13) == true then
  203. turtle.transferTo(13)
  204. end
  205. turtle.select(5)
  206. if turtle.compareTo(13) == true then
  207. turtle.transferTo(13)
  208. end
  209. turtle.select(6)
  210. if turtle.compareTo(13) == true then
  211. turtle.transferTo(13)
  212. end
  213. turtle.select(7)
  214. if turtle.compareTo(13) == true then
  215. turtle.transferTo(13)
  216. end
  217. turtle.select(8)
  218. if turtle.compareTo(13) == true then
  219. turtle.transferTo(13)
  220. end
  221. turtle.select(9)
  222. if turtle.compareTo(13) == true then
  223. turtle.transferTo(13)
  224. end
  225. turtle.select(10)
  226. if turtle.compareTo(13) == true then
  227. turtle.transferTo(13)
  228. end
  229. turtle.select(11)
  230. if turtle.compareTo(13) == true then
  231. turtle.transferTo(13)
  232. end
  233. turtle.select(12)
  234. if turtle.compareTo(13) == true then
  235. turtle.transferTo(13)
  236. end
  237. turtle.select(1)
  238.  
  239. local o = 0
  240. turtle.select(16)
  241. turtle.turnRight()
  242. turtle.turnRight()
  243. turtle.attack()
  244. turtle.attack()
  245. if turtle.getItemCount(16) == 1 then
  246. o = o+1
  247. end
  248. if turtle.compare(16) == true then
  249. o = o+1
  250. end
  251. if o == 2 then
  252. turtle.select(1)
  253. turtle.drop(64)
  254. turtle.select(2)
  255. turtle.drop(64)
  256. turtle.select(3)
  257. turtle.drop(64)
  258. turtle.select(4)
  259. turtle.drop(64)
  260. turtle.select(5)
  261. turtle.drop(64)
  262. turtle.select(6)
  263. turtle.drop(64)
  264. turtle.select(7)
  265. turtle.drop(64)
  266. turtle.select(8)
  267. turtle.drop(64)
  268. turtle.select(9)
  269. turtle.drop(64)
  270. turtle.select(10)
  271. turtle.drop(64)
  272. turtle.select(11)
  273. turtle.drop(64)
  274. turtle.select(12)
  275. turtle.drop(64)
  276. o = 0
  277. end
  278. o = 0
  279. turtle.select(1)
  280. turtle.turnRight()
  281. turtle.turnRight()
  282.  
  283. end
  284.  
  285. function DigX4()
  286. for i = 1, tArgs[1] do
  287.  
  288. checkBlock()
  289. AntiJam()
  290.  
  291. end
  292. end
  293.  
  294. function DigX5()
  295.  
  296. for i = 1, tArgs[1] do
  297.  
  298.  
  299. CheckFuel()
  300. MoveBack()
  301.  
  302. end
  303. end
  304.  
  305. function DigZ2()
  306. for i = 1, tArgs[3] do
  307.  
  308. turtle.turnRight()
  309. checkBlock()
  310. AntiJam()
  311. turtle.turnLeft()
  312.  
  313. end
  314. end
  315.  
  316. function DigZ3()
  317.  
  318. turtle.turnRight()
  319. checkBlock()
  320. AntiJam()
  321. turtle.turnLeft()
  322. end
  323.  
  324. function CheckXYZ1()
  325. for i = 1, tArgs[3] do
  326.  
  327.  
  328. DigX4()
  329. DigX5()
  330. DigZ3()
  331.  
  332. end
  333. DigX4()
  334. DigX5()
  335. end
  336.  
  337. function CheckZ1()
  338.  
  339. inv = -1
  340. ChestCheck11()
  341. CheckFuel()
  342. turtle.digDown()
  343. turtle.down()
  344.  
  345. end
  346.  
  347. function Dig2()
  348. shell.run("clear")
  349. print("x: "..x.." y: "..y.." z: "..z.." ")
  350. print("_______________________________________")
  351. print("Clearing a: "..x.."x"..y.."x"..z.." Cube ")
  352. print("_______________________________________")
  353. f = turtle.getFuelLevel()
  354. print("My fuel level is : "..f.." ")
  355. print("_______________________________________")
  356. print("Optionally put an item/buffer in slot#16 and the same block down on the ground Behind the turtle!!!, and the turtle will drop its loot there")
  357. print("_______________________________________")
  358.  
  359. AntiJam()
  360.  
  361. for i = 1, tArgs[3] do
  362. DigX2()
  363. DigX3()
  364. DigZ1()
  365. end
  366.  
  367. DigX2()
  368. DigX3()
  369. CheckZ()
  370. for i = 1, tArgs[2] do
  371.  
  372.  
  373. DigY1()
  374. CheckXYZ()
  375. CheckZ()
  376. end
  377.  
  378. for i = 1, tArgs[2] do
  379.  
  380. turtle.digUp()
  381. CheckFuel()
  382. turtle.up()
  383.  
  384. end
  385. MoveBack()
  386. ChestCheck10()
  387. A = 0
  388. B = 0
  389. end
  390.  
  391. function ChestCheck1()
  392. turtle.select(1)
  393. if turtle.compareTo(13) == true then
  394. turtle.transferTo(13)
  395. end
  396. turtle.select(2)
  397. if turtle.compareTo(13) == true then
  398. turtle.transferTo(13)
  399. end
  400. turtle.select(3)
  401. if turtle.compareTo(13) == true then
  402. turtle.transferTo(13)
  403. end
  404. turtle.select(4)
  405. if turtle.compareTo(13) == true then
  406. turtle.transferTo(13)
  407. end
  408. turtle.select(5)
  409. if turtle.compareTo(13) == true then
  410. turtle.transferTo(13)
  411. end
  412. turtle.select(6)
  413. if turtle.compareTo(13) == true then
  414. turtle.transferTo(13)
  415. end
  416. turtle.select(7)
  417. if turtle.compareTo(13) == true then
  418. turtle.transferTo(13)
  419. end
  420. turtle.select(8)
  421. if turtle.compareTo(13) == true then
  422. turtle.transferTo(13)
  423. end
  424. turtle.select(9)
  425. if turtle.compareTo(13) == true then
  426. turtle.transferTo(13)
  427. end
  428. turtle.select(10)
  429. if turtle.compareTo(13) == true then
  430. turtle.transferTo(13)
  431. end
  432. turtle.select(11)
  433. if turtle.compareTo(13) == true then
  434. turtle.transferTo(13)
  435. end
  436. turtle.select(12)
  437. if turtle.compareTo(13) == true then
  438. turtle.transferTo(13)
  439. end
  440. turtle.select(1)
  441.  
  442. local o = 0
  443. turtle.select(16)
  444. turtle.turnRight()
  445. turtle.turnRight()
  446. turtle.attack()
  447. turtle.attack()
  448. if turtle.getItemCount(16) == 1 then
  449. o = o+1
  450. end
  451. if turtle.compare(16) == true then
  452. o = o+1
  453. end
  454. if o == 2 then
  455. turtle.select(1)
  456. turtle.drop(64)
  457. turtle.select(2)
  458. turtle.drop(64)
  459. turtle.select(3)
  460. turtle.drop(64)
  461. turtle.select(4)
  462. turtle.drop(64)
  463. turtle.select(5)
  464. turtle.drop(64)
  465. turtle.select(6)
  466. turtle.drop(64)
  467. turtle.select(7)
  468. turtle.drop(64)
  469. turtle.select(8)
  470. turtle.drop(64)
  471. turtle.select(9)
  472. turtle.drop(64)
  473. turtle.select(10)
  474. turtle.drop(64)
  475. turtle.select(11)
  476. turtle.drop(64)
  477. turtle.select(12)
  478. turtle.drop(64)
  479. o = 0
  480. end
  481. o = 0
  482. turtle.select(1)
  483. turtle.turnRight()
  484. turtle.turnRight()
  485.  
  486. end
  487.  
  488. function ChestCheck()
  489.  
  490. turtle.select(1)
  491. if turtle.compareTo(13) == true then
  492. turtle.transferTo(13)
  493. end
  494. turtle.select(2)
  495. if turtle.compareTo(13) == true then
  496. turtle.transferTo(13)
  497. end
  498. turtle.select(3)
  499. if turtle.compareTo(13) == true then
  500. turtle.transferTo(13)
  501. end
  502. turtle.select(4)
  503. if turtle.compareTo(13) == true then
  504. turtle.transferTo(13)
  505. end
  506. turtle.select(5)
  507. if turtle.compareTo(13) == true then
  508. turtle.transferTo(13)
  509. end
  510. turtle.select(6)
  511. if turtle.compareTo(13) == true then
  512. turtle.transferTo(13)
  513. end
  514. turtle.select(7)
  515. if turtle.compareTo(13) == true then
  516. turtle.transferTo(13)
  517. end
  518. turtle.select(8)
  519. if turtle.compareTo(13) == true then
  520. turtle.transferTo(13)
  521. end
  522. turtle.select(9)
  523. if turtle.compareTo(13) == true then
  524. turtle.transferTo(13)
  525. end
  526. turtle.select(10)
  527. if turtle.compareTo(13) == true then
  528. turtle.transferTo(13)
  529. end
  530. turtle.select(11)
  531. if turtle.compareTo(13) == true then
  532. turtle.transferTo(13)
  533. end
  534. turtle.select(12)
  535. if turtle.compareTo(13) == true then
  536. turtle.transferTo(13)
  537. end
  538. turtle.select(1)
  539.  
  540. if B == 1 then
  541.  
  542. for i = 1, You do
  543. turtle.down()
  544. end
  545.  
  546. MoveBack()
  547. local o = 0
  548. turtle.select(16)
  549. turtle.turnRight()
  550. turtle.turnRight()
  551. turtle.attack()
  552. turtle.attack()
  553. if turtle.getItemCount(16) == 1 then
  554. o = o+1
  555. end
  556. if turtle.compare(16) == true then
  557. o = o+1
  558. end
  559. if o == 2 then
  560. turtle.select(1)
  561. turtle.drop(64)
  562. turtle.select(2)
  563. turtle.drop(64)
  564. turtle.select(3)
  565. turtle.drop(64)
  566. turtle.select(4)
  567. turtle.drop(64)
  568. turtle.select(5)
  569. turtle.drop(64)
  570. turtle.select(6)
  571. turtle.drop(64)
  572. turtle.select(7)
  573. turtle.drop(64)
  574. turtle.select(8)
  575. turtle.drop(64)
  576. turtle.select(9)
  577. turtle.drop(64)
  578. turtle.select(10)
  579. turtle.drop(64)
  580. turtle.select(11)
  581. turtle.drop(64)
  582. turtle.select(12)
  583. turtle.drop(64)
  584. o = 0
  585. end
  586. o = 0
  587. turtle.select(1)
  588. turtle.turnRight()
  589. turtle.turnRight()
  590. AntiJam()
  591.  
  592. for i = 1, You do
  593.  
  594. turtle.up()
  595. end
  596. You = You+1
  597. end
  598. end
  599.  
  600. function EndFuel()
  601.  
  602. checkBlockUp()
  603. turtle.select(15)
  604. turtle.placeUp()
  605. turtle.select(13)
  606. turtle.suckUp()
  607. turtle.select(15)
  608. turtle.digUp()
  609. turtle.select(1)
  610. end
  611.  
  612. function MoveBack()
  613.  
  614. EnderChest1()
  615. if turtle.back() == false then
  616. turtle.turnRight()
  617. turtle.turnRight()
  618. checkBlock()
  619. AntiJam()
  620. turtle.turnLeft()
  621. turtle.turnLeft()
  622. sleep(0.4)
  623. end
  624. end
  625.  
  626. function EnderChest1()
  627. Andersfc123 = 0
  628. for i = 1, 64 do
  629. Andersfc123 = Andersfc123 + 1
  630. if turtle.getItemCount(12) == Andersfc123 then
  631. EnderChest()
  632. end
  633. end
  634. end
  635.  
  636. function EnderChest()
  637.  
  638. if A == 1 then
  639.  
  640. turtle.select(1)
  641. if turtle.compareTo(13) == true then
  642. turtle.transferTo(13)
  643. sleep(0.4)
  644. end
  645. turtle.select(2)
  646. if turtle.compareTo(13) == true then
  647. turtle.transferTo(13)
  648. sleep(0.4)
  649. end
  650. turtle.select(3)
  651. if turtle.compareTo(13) == true then
  652. turtle.transferTo(13)
  653. sleep(0.4)
  654. end
  655. turtle.select(4)
  656. if turtle.compareTo(13) == true then
  657. turtle.transferTo(13)
  658. sleep(0.4)
  659. end
  660. turtle.select(5)
  661. if turtle.compareTo(13) == true then
  662. turtle.transferTo(13)
  663. sleep(0.4)
  664. end
  665. turtle.select(6)
  666. if turtle.compareTo(13) == true then
  667. turtle.transferTo(13)
  668. sleep(0.4)
  669. end
  670. turtle.select(7)
  671. if turtle.compareTo(13) == true then
  672. turtle.transferTo(13)
  673. sleep(0.4)
  674. end
  675. turtle.select(8)
  676. if turtle.compareTo(13) == true then
  677. turtle.transferTo(13)
  678. sleep(0.4)
  679. end
  680. turtle.select(9)
  681. if turtle.compareTo(13) == true then
  682. turtle.transferTo(13)
  683. sleep(0.4)
  684. end
  685. turtle.select(10)
  686. if turtle.compareTo(13) == true then
  687. turtle.transferTo(13)
  688. sleep(0.4)
  689. end
  690. turtle.select(11)
  691. if turtle.compareTo(13) == true then
  692. turtle.transferTo(13)
  693. sleep(0.4)
  694. end
  695. turtle.select(12)
  696. if turtle.compareTo(13) == true then
  697. turtle.transferTo(13)
  698. sleep(0.4)
  699. end
  700. turtle.select(1)
  701. sleep(0.4)
  702. turtle.select(14)
  703. checkBlockUp()
  704. turtle.placeUp()
  705. if turtle.detectUp() == true then
  706. turtle.select(1)
  707. turtle.dropUp(64)
  708. turtle.select(2)
  709. turtle.dropUp(64)
  710. turtle.select(3)
  711. turtle.dropUp(64)
  712. turtle.select(4)
  713. turtle.dropUp(64)
  714. turtle.select(5)
  715. turtle.dropUp(64)
  716. turtle.select(6)
  717. turtle.dropUp(64)
  718. turtle.select(7)
  719. turtle.dropUp(64)
  720. turtle.select(8)
  721. turtle.dropUp(64)
  722. turtle.select(9)
  723. turtle.dropUp(64)
  724. turtle.select(10)
  725. turtle.dropUp(64)
  726. turtle.select(11)
  727. turtle.dropUp(64)
  728. turtle.select(12)
  729. turtle.dropUp(64)
  730. turtle.select(14)
  731. end
  732. end
  733. turtle.digUp()
  734. turtle.select(1)
  735. sleep(0.4)
  736. end
  737.  
  738. function AntiJam()
  739.  
  740. EnderChest1()
  741. CheckFuel()
  742. checkBlockUp()
  743. while turtle.forward() == false do
  744.  
  745. turtle.attack()
  746. turtle.dig()
  747.  
  748. if turtle.detect() == true then
  749. sleep(0.4)
  750.  
  751. end
  752. end
  753. checkBlockUp()
  754. end
  755.  
  756. function checkBlockUp()
  757. while turtle.detectUp() == true do
  758.  
  759.  
  760. turtle.digUp()
  761. sleep(0.4)
  762.  
  763. end
  764. end
  765.  
  766. function checkBlock()
  767. while turtle.detect() == true do
  768.  
  769. turtle.dig()
  770.  
  771. if turtle.detect() == true then
  772. sleep(0.4)
  773.  
  774. end
  775. end
  776. end
  777.  
  778. function CheckFuel()
  779.  
  780. if turtle.getFuelLevel() == 30 then
  781. turtle.select(1)
  782. if turtle.compareTo(13) == true then
  783. turtle.transferTo(13)
  784. end
  785. turtle.select(2)
  786. if turtle.compareTo(13) == true then
  787. turtle.transferTo(13)
  788. end
  789. turtle.select(3)
  790. if turtle.compareTo(13) == true then
  791. turtle.transferTo(13)
  792. end
  793. turtle.select(4)
  794. if turtle.compareTo(13) == true then
  795. turtle.transferTo(13)
  796. end
  797. turtle.select(5)
  798. if turtle.compareTo(13) == true then
  799. turtle.transferTo(13)
  800. end
  801. turtle.select(6)
  802. if turtle.compareTo(13) == true then
  803. turtle.transferTo(13)
  804. end
  805. turtle.select(7)
  806. if turtle.compareTo(13) == true then
  807. turtle.transferTo(13)
  808. end
  809. turtle.select(8)
  810. if turtle.compareTo(13) == true then
  811. turtle.transferTo(13)
  812. end
  813. turtle.select(9)
  814. if turtle.compareTo(13) == true then
  815. turtle.transferTo(13)
  816. end
  817. turtle.select(10)
  818. if turtle.compareTo(13) == true then
  819. turtle.transferTo(13)
  820. end
  821. turtle.select(11)
  822. if turtle.compareTo(13) == true then
  823. turtle.transferTo(13)
  824. end
  825. turtle.select(12)
  826. if turtle.compareTo(13) == true then
  827. turtle.transferTo(13)
  828. end
  829. turtle.select(1)
  830. turtle.select(1)
  831. turtle.refuel(1)
  832. turtle.select(2)
  833. turtle.refuel(1)
  834. turtle.select(3)
  835. turtle.refuel(1)
  836. turtle.select(4)
  837. turtle.refuel(1)
  838. turtle.select(5)
  839. turtle.refuel(1)
  840. turtle.select(6)
  841. turtle.refuel(1)
  842. turtle.select(7)
  843. turtle.refuel(1)
  844. turtle.select(8)
  845. turtle.refuel(1)
  846. turtle.select(9)
  847. turtle.refuel(1)
  848. turtle.select(10)
  849. turtle.refuel(1)
  850. turtle.select(11)
  851. turtle.refuel(1)
  852. turtle.select(12)
  853. turtle.refuel(1)
  854. turtle.select(13)
  855. turtle.refuel(1)
  856.  
  857. turtle.select(1)
  858. supermans = supermans + 1
  859. print("I tried to consume some coal to keep my fuel level up")
  860. print(supermans)
  861. end
  862.  
  863. if turtle.getFuelLevel() == 5 then
  864. turtle.select(1)
  865. if turtle.compareTo(13) == true then
  866. turtle.transferTo(13)
  867. end
  868. turtle.select(2)
  869. if turtle.compareTo(13) == true then
  870. turtle.transferTo(13)
  871. end
  872. turtle.select(3)
  873. if turtle.compareTo(13) == true then
  874. turtle.transferTo(13)
  875. end
  876. turtle.select(4)
  877. if turtle.compareTo(13) == true then
  878. turtle.transferTo(13)
  879. end
  880. turtle.select(5)
  881. if turtle.compareTo(13) == true then
  882. turtle.transferTo(13)
  883. end
  884. turtle.select(6)
  885. if turtle.compareTo(13) == true then
  886. turtle.transferTo(13)
  887. end
  888. turtle.select(7)
  889. if turtle.compareTo(13) == true then
  890. turtle.transferTo(13)
  891. end
  892. turtle.select(8)
  893. if turtle.compareTo(13) == true then
  894. turtle.transferTo(13)
  895. end
  896. turtle.select(9)
  897. if turtle.compareTo(13) == true then
  898. turtle.transferTo(13)
  899. end
  900. turtle.select(10)
  901. if turtle.compareTo(13) == true then
  902. turtle.transferTo(13)
  903. end
  904. turtle.select(11)
  905. if turtle.compareTo(13) == true then
  906. turtle.transferTo(13)
  907. end
  908. turtle.select(12)
  909. if turtle.compareTo(13) == true then
  910. turtle.transferTo(13)
  911. end
  912. turtle.select(1)
  913. turtle.select(1)
  914. turtle.refuel(1)
  915. turtle.select(2)
  916. turtle.refuel(1)
  917. turtle.select(3)
  918. turtle.refuel(1)
  919. turtle.select(4)
  920. turtle.refuel(1)
  921. turtle.select(5)
  922. turtle.refuel(1)
  923. turtle.select(6)
  924. turtle.refuel(1)
  925. turtle.select(7)
  926. turtle.refuel(1)
  927. turtle.select(8)
  928. turtle.refuel(1)
  929. turtle.select(9)
  930. turtle.refuel(1)
  931. turtle.select(10)
  932. turtle.refuel(1)
  933. turtle.select(11)
  934. turtle.refuel(1)
  935. turtle.select(12)
  936. turtle.refuel(1)
  937. turtle.select(13)
  938. turtle.refuel(1)
  939.  
  940. turtle.select(1)
  941. supermans = supermans + 1
  942. print("I tried to consume some coal to keep my fuel level up")
  943. print(supermans)
  944. end
  945.  
  946. if turtle.getFuelLevel() == 0 then
  947. turtle.select(1)
  948. if turtle.compareTo(13) == true then
  949. turtle.transferTo(13)
  950. end
  951. turtle.select(2)
  952. if turtle.compareTo(13) == true then
  953. turtle.transferTo(13)
  954. end
  955. turtle.select(3)
  956. if turtle.compareTo(13) == true then
  957. turtle.transferTo(13)
  958. end
  959. turtle.select(4)
  960. if turtle.compareTo(13) == true then
  961. turtle.transferTo(13)
  962. end
  963. turtle.select(5)
  964. if turtle.compareTo(13) == true then
  965. turtle.transferTo(13)
  966. end
  967. turtle.select(6)
  968. if turtle.compareTo(13) == true then
  969. turtle.transferTo(13)
  970. end
  971. turtle.select(7)
  972. if turtle.compareTo(13) == true then
  973. turtle.transferTo(13)
  974. end
  975. turtle.select(8)
  976. if turtle.compareTo(13) == true then
  977. turtle.transferTo(13)
  978. end
  979. turtle.select(9)
  980. if turtle.compareTo(13) == true then
  981. turtle.transferTo(13)
  982. end
  983. turtle.select(10)
  984. if turtle.compareTo(13) == true then
  985. turtle.transferTo(13)
  986. end
  987. turtle.select(11)
  988. if turtle.compareTo(13) == true then
  989. turtle.transferTo(13)
  990. end
  991. turtle.select(12)
  992. if turtle.compareTo(13) == true then
  993. turtle.transferTo(13)
  994. end
  995. turtle.select(1)
  996. EndFuel()
  997. turtle.select(1)
  998. turtle.refuel(1)
  999. turtle.select(2)
  1000. turtle.refuel(1)
  1001. turtle.select(3)
  1002. turtle.refuel(1)
  1003. turtle.select(4)
  1004. turtle.refuel(1)
  1005. turtle.select(5)
  1006. turtle.refuel(1)
  1007. turtle.select(6)
  1008. turtle.refuel(1)
  1009. turtle.select(7)
  1010. turtle.refuel(1)
  1011. turtle.select(8)
  1012. turtle.refuel(1)
  1013. turtle.select(9)
  1014. turtle.refuel(1)
  1015. turtle.select(10)
  1016. turtle.refuel(1)
  1017. turtle.select(11)
  1018. turtle.refuel(1)
  1019. turtle.select(12)
  1020. turtle.refuel(1)
  1021. turtle.select(13)
  1022. turtle.refuel(1)
  1023.  
  1024. turtle.select(1)
  1025. supermans = supermans + 1
  1026. print("I tried to consume some coal to keep my fuel level up")
  1027. print(supermans)
  1028. end
  1029.  
  1030. if turtle.getFuelLevel() == 0 then
  1031. print("I am gonna rest here, resupply me with fuel to reboot me!")
  1032. end
  1033. while turtle.getFuelLevel() == 0 do
  1034. rednet.open("right")
  1035. rednet.broadcast("I am out of fuel!!!")
  1036. EndFuel()
  1037. turtle.select(1)
  1038. turtle.refuel(1)
  1039. turtle.select(2)
  1040. turtle.refuel(1)
  1041. turtle.select(3)
  1042. turtle.refuel(1)
  1043. turtle.select(4)
  1044. turtle.refuel(1)
  1045. turtle.select(5)
  1046. turtle.refuel(1)
  1047. turtle.select(6)
  1048. turtle.refuel(1)
  1049. turtle.select(7)
  1050. turtle.refuel(1)
  1051. turtle.select(8)
  1052. turtle.refuel(1)
  1053. turtle.select(9)
  1054. turtle.refuel(1)
  1055. turtle.select(10)
  1056. turtle.refuel(1)
  1057. turtle.select(11)
  1058. turtle.refuel(1)
  1059. turtle.select(12)
  1060. turtle.refuel(1)
  1061. turtle.select(13)
  1062. turtle.refuel(1)
  1063.  
  1064. turtle.select(1)
  1065.  
  1066. end
  1067. end
  1068.  
  1069. function DigX()
  1070.  
  1071. checkBlock()
  1072. AntiJam()
  1073.  
  1074. end
  1075.  
  1076. function DigX2()
  1077. for i = 1, tArgs[1] do
  1078.  
  1079.  
  1080. checkBlock()
  1081. AntiJam()
  1082.  
  1083. end
  1084. end
  1085.  
  1086. function DigX3()
  1087. for i = 1, tArgs[1] do
  1088.  
  1089.  
  1090. CheckFuel()
  1091. MoveBack()
  1092.  
  1093. end
  1094. end
  1095.  
  1096. function CheckXYZ()
  1097. for i = 1, tArgs[3] do
  1098.  
  1099.  
  1100. DigX2()
  1101. DigX3()
  1102. DigZ1()
  1103.  
  1104. end
  1105. DigX2()
  1106. DigX3()
  1107. end
  1108.  
  1109. function CheckZ()
  1110.  
  1111. turtle.turnRight()
  1112.  
  1113. for i = 1, tArgs[3] do
  1114.  
  1115. CheckFuel()
  1116. MoveBack()
  1117.  
  1118. end
  1119.  
  1120. turtle.turnLeft()
  1121.  
  1122. end
  1123.  
  1124. function DigY()
  1125.  
  1126. inv = -1
  1127. ChestCheck()
  1128. CheckFuel()
  1129. checkBlockUp()
  1130. turtle.up()
  1131. checkBlockUp()
  1132.  
  1133. end
  1134.  
  1135. function DigZ()
  1136. for i = 1, tArgs[3] do
  1137.  
  1138. turtle.turnRight()
  1139. checkBlock()
  1140. AntiJam()
  1141. turtle.turnLeft()
  1142.  
  1143. end
  1144. end
  1145.  
  1146. function DigZ1()
  1147.  
  1148. turtle.turnRight()
  1149. checkBlock()
  1150. AntiJam()
  1151. turtle.turnLeft()
  1152.  
  1153. end
  1154.  
  1155. function Dig1()
  1156. AntiJam()
  1157. for i = 1, tArgs[3] do
  1158.  
  1159.  
  1160. DigX2()
  1161. DigX3()
  1162. DigZ1()
  1163.  
  1164. end
  1165.  
  1166. DigX2()
  1167. DigX3()
  1168. CheckZ()
  1169. for i = 1, tArgs[2] do
  1170.  
  1171.  
  1172. DigY()
  1173. CheckXYZ()
  1174. CheckZ()
  1175. end
  1176.  
  1177. for i = 1, tArgs[2] do
  1178.  
  1179. turtle.digDown()
  1180. CheckFuel()
  1181. turtle.down()
  1182.  
  1183. end
  1184. MoveBack()
  1185. end
  1186.  
  1187. stringA1 = "down"
  1188. stringB1 = "up"
  1189. shell.run("clear")
  1190. print("type <down> or <up>")
  1191. term.write("Which Room mode to use?>")
  1192. YO10 = read()
  1193.  
  1194. if YO10 == "down" then
  1195. loppy = loppy+2
  1196. Dig2()
  1197. print("I mined a: "..x.."x"..y.."x"..z.." Cube for you master! ")
  1198. print("I tried to consume fuel this many times:")
  1199. print(supermans)
  1200. end
  1201.  
  1202. stringA = "yes"
  1203. stringB = "no"
  1204.  
  1205. if YO10 == "up" then
  1206. loppy = loppy+1
  1207. shell.run("clear")
  1208. print("type <yes> or <no>")
  1209. print("Please note, if this is a new version or you havent used the program before, it is highly recommended that you check the info!")
  1210. term.write("Do you want to skip the info?>")
  1211. YO1 = read()
  1212. end
  1213.  
  1214. if YO1 == "yes" then
  1215. loppy = loppy+2
  1216. shell.run("clear")
  1217. print("x: "..x.." y: "..y.." z: "..z.." ")
  1218. print("_______________________________________")
  1219. print("Clearing a: "..x.."x"..y.."x"..z.." Cube ")
  1220. print("_______________________________________")
  1221. f = turtle.getFuelLevel()
  1222. print("My fuel level is : "..f.." ")
  1223. print("_______________________________________")
  1224. print("Optionally put an item/buffer in slot#16 and the same block down on the ground Behind the turtle!!!, and the turtle will drop its loot there")
  1225. print("_______________________________________")
  1226. AntiJam()
  1227. ChestCheck()
  1228. Dig1()
  1229. ChestCheck1()
  1230. A = 0
  1231. B = 0
  1232. print("I mined a: "..x.."x"..y.."x"..z.." Cube for you master! ")
  1233. print("I tried to consume fuel this many times:")
  1234. print(supermans)
  1235. end
  1236.  
  1237. if YO1 == "no" then
  1238.  
  1239. loppy = loppy+2
  1240. shell.run("clear")
  1241. print("x: "..x.." y: "..y.." z: "..z.." ")
  1242. print("_______________________________________")
  1243. print("Clearing a: "..x.."x"..y.."x"..z.." Cube ")
  1244. print("_______________________________________")
  1245. f = turtle.getFuelLevel()
  1246. print("My fuel level is : "..f.." ")
  1247. print("_______________________________________")
  1248. print("Please put an Ender chest in slot #14")
  1249. print("_______________________________________")
  1250. sleep(7.5)
  1251. shell.run("clear")
  1252. print("_______________________________________")
  1253. print("Put coal in slot #13")
  1254. print("_______________________________________")
  1255. print("Slot #13,14,15 and 16 wont get dropped out of the turtles inventory")
  1256. print("_______________________________________")
  1257. sleep(7.5)
  1258. shell.run("clear")
  1259. print("_______________________________________")
  1260. print("Optionally put a 2nd Ender chest in slot #15 to make the turtle take fuel out of it")
  1261. print("_______________________________________")
  1262. sleep(5)
  1263. shell.run("clear")
  1264. print("_______________________________________")
  1265. print("Optionally put an item/buffer in slot#16 and the same block down on the ground Behind the turtle!!!, and the turtle will drop its loot there or put an Ender-chest in slot #14")
  1266. print("_______________________________________")
  1267. print("WARNING: If you DONT do that, you will loose your stuff!")
  1268. print("_______________________________________")
  1269. sleep(20)
  1270.  
  1271. shell.run("clear")
  1272.  
  1273. print("_______________________________________")
  1274. print("You can have as many turtles with this program running at the same time, with the same Ender chest, without loosing your stuff, also it dosnt matter how fast your extraction system for your ender chest is (you could practically use redstone engines for even 10 turtles on the same ender-chest)")
  1275. print("_______________________________________")
  1276. sleep(7.5)
  1277. AntiJam()
  1278. ChestCheck()
  1279. Dig1()
  1280. ChestCheck1()
  1281. A = 0
  1282. B = 0
  1283. print("I mined a: "..x.."x"..y.."x"..z.." Cube for you master! ")
  1284. print("I tried to consume fuel this many times:")
  1285. print(supermans)
  1286. end
  1287. if loppy == 0 then
  1288. print("What you typed in, wasn't a command!")
  1289. end
  1290. if loppy == 1 then
  1291. print("What you typed in, wasn't a command!")
  1292. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement