Advertisement
dadragon84

2 Story House

Sep 12th, 2014
319
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 18.87 KB | None | 0 0
  1.  
  2. -- This builds a 2 storey house.
  3. -- Place the turtle on the ground at the right front corner
  4. -- of where you want the house to be.
  5. -- Place a single chest on the ground behind the turtle.
  6. -- Download the companion quarry script using this command:
  7. --
  8. -- Requires about 1300 fuel in the turtle.
  9. -- At first, it runs with nothing in the turtle's inventory
  10. -- while it digs the foundation.  After that, place
  11. -- the following blocks in the turtle's inventory:
  12. -- Slots 1,2 & 3 - foundation: 2 x 64 + 57
  13. -- Slot 4 - glass blocks: 4
  14. -- Slots 5, 6, 7 & 8 - floor planks: 3 x 64 + 25
  15. -- slots 9, 10 & 11 - interior walls: 2 x 64 + 30
  16. -- slot 12 - stairs: 4
  17. -- slots 13, 14, 15 & 16 - roof: 3 x 64 + 4
  18. --
  19. -- Place the following in the chest, in the following order:
  20. -- Outside wall blocks: 7 x 64
  21. -- Interior wall blocks: 2 x 64 (for ceiling too)
  22. -- Glass blocks: 24
  23. -- Roof peak blocks: 14 (these are blocks that match your roof, or not . . :))
  24. -- Doors: 16
  25. -- Stone blocks: 6 (for the front and back steps)
  26. -- Stone steps: 5 (for the same)
  27. -- Torches: 12
  28. --
  29. -- Run when ready :)
  30.  
  31. local placed = 0
  32. local used = 0
  33. local moved = 0
  34.  
  35. -- Build functions --------------------------------
  36.  
  37. local function pf() --  place block forward
  38.         turtle.place()
  39.         placed=placed+1
  40. end
  41.  
  42.  
  43. local function pu()
  44.         turtle.placeUp()
  45.         placed=placed+1
  46. end
  47.  
  48.  
  49. local function pd()
  50.         turtle.placeDown()
  51.         placed=placed+1
  52. end
  53.  
  54.  
  55. local function pbu(n) -- place block up
  56.         for i=1,n do
  57.                 turtle.forward()
  58.                 turtle.placeUp()
  59.         end
  60.         moved=moved+n
  61.         placed=placed+n
  62. end
  63.  
  64.  
  65. local function pbd(n) -- place block down
  66.         for i=1,n do
  67.                 turtle.forward()
  68.                 turtle.placeDown()
  69.         end
  70.         moved=moved+n
  71.         placed=placed+n
  72. end
  73.  
  74. local function pbb(n) -- place block forward, back up
  75.         for i=1,n do
  76.                 turtle.place()
  77.                 turtle.back()
  78.         end
  79.         moved=moved+n
  80.         placed=placed+n
  81. end
  82.  
  83. local function pt(n) -- place top & bottom block, back up, & place middle
  84.         for i=1,n do
  85.                 turtle.placeUp()
  86.                 turtle.placeDown()
  87.                 turtle.back()
  88.                 turtle.place()
  89.                 end
  90.         moved=moved+n
  91.         placed=placed+(3*n)
  92. end
  93.  
  94. local function ptf(n) -- place right & left block, back up, & place middle. F is for flat ;)
  95.         for i=1,n do
  96.                 turtle.turnRight()
  97.                 turtle.place()
  98.                 turtle.turnLeft()
  99.                 turtle.turnLeft()
  100.                 turtle.place()
  101.                 turtle.turnRight()
  102.                 turtle.back()
  103.                 turtle.place()
  104.                 end
  105.         moved=moved+n
  106.         placed=placed+(3*n)
  107. end
  108.  
  109. local function pBack(n) -- place block to the front, and then back up
  110.         for i=1,n do
  111.                 turtle.place()
  112.                 turtle.back()
  113.         end
  114.         moved=moved+n
  115.         placed=placed+n
  116. end
  117.  
  118.  
  119. local function roofL(n) -- builds the roof and moves to the left
  120.         for i=1,n do
  121.                 turtle.placeUp()
  122.                 turtle.turnLeft()
  123.                 turtle.forward()
  124.                 turtle.turnRight()
  125.         end
  126.         moved=moved+n
  127.         placed=placed+n
  128. end
  129.  
  130.  
  131. local function roofR(n) -- builds the roof and moves to the right
  132.         for i=1,n do
  133.                 turtle.placeUp()
  134.                 turtle.turnRight()
  135.                 turtle.forward()
  136.                 turtle.turnLeft()
  137.         end
  138.         moved=moved+n
  139.         placed=placed+n
  140. end
  141.  
  142. local function torch()
  143.         turtle.select(15)
  144.         turtle.up()
  145.         turtle.placeUp()
  146.         turtle.down()
  147.         moved=moved+2
  148.         placed=placed+1
  149. end
  150.  
  151. -- Simple Movement functions --------------------------------
  152.  
  153. local function t() -- turn around
  154.         turtle.turnRight()
  155.         turtle.turnRight()
  156. end
  157.  
  158.  
  159. local function l() -- turn left
  160.         turtle.turnLeft()
  161. end
  162.  
  163.  
  164. local function r() -- turn right()
  165.         turtle.turnRight()
  166. end
  167.  
  168.  
  169. local function u(n) -- turtle go up
  170.         for i=1,n do
  171.                 turtle.up()
  172.         end
  173.         moved=moved+n
  174. end
  175.  
  176.  
  177. local function d(n) -- turtle go down
  178.         for i=1,n do
  179.                 turtle.down()
  180.         end
  181.         moved=moved+n
  182. end
  183.  
  184.  
  185. local function f(n) -- turtle go forward
  186.         for i=1,n do
  187.                 turtle.forward()
  188.         end
  189.         moved=moved+n
  190. end
  191.  
  192.  
  193. local function b(n) -- turtle go back
  194.         for i=1,n do
  195.                 turtle.back()
  196.         end
  197.         moved=moved+n
  198. end
  199.  
  200.  
  201. -- Complex Movement functions ---------------
  202.  
  203. local function nextRowL() -- moves forward and up for next roof row to the left
  204.         turtle.turnLeft()
  205.         turtle.forward()
  206.         turtle.turnRight()
  207.         turtle.forward()
  208.         turtle.up()
  209.         moved=moved+3
  210. end
  211.  
  212.  
  213. local function nextRowR() -- moves forward and up for next roof row to the right
  214.         turtle.turnRight()
  215.         turtle.forward()
  216.         turtle.turnLeft()
  217.         turtle.forward()
  218.         turtle.up()
  219.         moved=moved+3
  220. end
  221.  
  222. local function nextRowDL() -- moves back and down for next roof row to the left
  223.         turtle.down()
  224.         turtle.turnLeft()
  225.         turtle.forward()
  226.         turtle.turnRight()
  227.         turtle.back()
  228.         moved=moved+3
  229. end
  230.  
  231. local function nextRowDR() -- moves back and down for next roof row to the right
  232.         turtle.down()
  233.         turtle.turnRight()
  234.         turtle.forward()
  235.         turtle.turnLeft()
  236.         turtle.back()
  237.         moved=moved+3
  238. end
  239.  
  240. local function hLTurn() -- flat left turn at the end of a horizontal row (ie floor)
  241.         turtle.forward()
  242.         turtle.left()
  243.         turtle.forward()
  244.         turtle.left()
  245.         moved=moved+2
  246. end
  247.  
  248.  
  249. local function hRTurn() -- flat right turn at the end of a horizontal row (ie floor)
  250.         turtle.forward()
  251.         turtle.right()
  252.         turtle.forward()
  253.         turtle.right()
  254.         moved=moved+2
  255. end
  256.  
  257.  
  258. local function nextCrse() -- moves turtle up to next row (ie a wall)
  259.         turtle.turnLeft()
  260.         turtle.turnLeft()
  261.         turtle.up()
  262. end
  263.  
  264.  
  265. ---------------------------------------------------------------
  266. --------------- Building code starts here ---------------------
  267. ---------------------------------------------------------------
  268.  
  269. -- Digs a foundation for the 2 Storey house ---------------
  270. print("")
  271. print("Going off to dig the foundation.")
  272. print("Be right back.")
  273. print("")
  274.  
  275. turtle.turnLeft()
  276. for i=1,11 do
  277.         turtle.forward()
  278.         moved=moved+1
  279. end
  280. turtle.turnRight()
  281. turtle.up()
  282. moved=moved+1
  283.  
  284. shell.run("quarry -dim 13 12 4 -invert false -startY 75")
  285.  
  286. local function drop()
  287.         for i=1,16 do
  288.                 turtle.select(i)
  289.                 turtle.drop(64)
  290.         end
  291. end
  292. drop()
  293. turtle.turnRight()
  294.  
  295. for i=1,11 do
  296.         turtle.forward()
  297.         moved=moved+1
  298. end
  299.  
  300. turtle.turnLeft()
  301. turtle.down()
  302. moved=moved+1
  303.  
  304. print("Whew!  Ok, load me up with blocks, so I can build the house")
  305.  
  306. -- Building the foundation ---------------
  307.  
  308. -- start on the edge of the foundation hole
  309. -- front right corner
  310.  
  311. print("Make sure the turtle has the following:")
  312.         print("(in this order)")
  313.         print("")
  314.         print("- Foundation wall blocks: 2 x 64 + 57")
  315.         print("- Glass: 4")
  316.         print("- Floor blocks: 3 x 64 + 25")
  317.         print("- Interior wall blocks: 2 x 64 + 30")
  318.         print("- Stairs: 4")
  319.         print("- Roof blocks: 3 x 64 + 4")
  320.         print("-----------------")
  321.         print("Type 'r' when ready to go")
  322.                 local m=io.read() -- prompts for user input
  323.                 if m=="r" then
  324.                 end
  325.         print("")
  326. print("Make sure the chest has the following:")
  327.         print("- Outside wall blocks: 7 x 64")
  328.         print("- Interior wall blocks: 2 x 64 (for ceiling)")
  329.         print("- Glass blocks: 23")
  330.         print("- Roof peak blocks: 14")
  331.         print("- Doors: 16")
  332.         print("- Stone blocks: 6 (steps)")
  333.         print("- Stone steps: 4")
  334.         print("- Torches: 12")
  335.         print("-----------------")
  336.         print("Type 'r' when ready to go")
  337.                 local m=io.read() -- prompts for user input
  338.                 if m=="r" then
  339.                 end
  340.  
  341. print("")
  342. print("----- Building the foundation -----")
  343. print("")
  344.  
  345. f(1)
  346. d(1)
  347. turtle.select(1)
  348. pd()
  349. -- building bottom row ---------------
  350. pbd(12)
  351. l()
  352. pbd(11)
  353. l()
  354. pbd(12)
  355. l()
  356. pbd(10)
  357. u(1)
  358.  
  359. pbd(1) -- start of 2nd row ------------------
  360. l()
  361. pbd(12)
  362. l()
  363. pbd(2)
  364. turtle.select(4)
  365. pbd(1) -- Placing window
  366. turtle.select(1)
  367. pbd(2)
  368. turtle.select(4)
  369. pbd(1) -- Placing 2nd window
  370. turtle.select(2) -- NEW STACK
  371. pbd(5)
  372. l()
  373. pbd(12)
  374. l()
  375. pbd(3)
  376. turtle.select(4)
  377. pbd(1) -- Placing window
  378. turtle.select(2)
  379. pbd(4)
  380. turtle.select(4)
  381. pbd(1) -- Placing 2nd window
  382. turtle.select(2)
  383. pbd(1)
  384. u(1)
  385.  
  386. pbd(1) -- start of 3rd row -----------------
  387. l()
  388. pbd(12)
  389. l()
  390. pbd(11)
  391. l()
  392. pbd(12)
  393. l()
  394. pbd(2)
  395. turtle.select(3) -- NEW STACK
  396. pbd(8)
  397. l()
  398. print("----- Foundation complete-----")
  399.  
  400.  
  401. -- start placing flooring ------------------------------
  402.  
  403. print("----- Laying ground floor -----")
  404. print("")
  405.  
  406. turtle.select(5)
  407. pbd(11) --1
  408. l()
  409. pbd(1)
  410. l()
  411. pbd(10)
  412. r()
  413. pbd(1)
  414. r()
  415.  
  416. pbd(10) --3
  417. l()
  418. pbd(1)
  419. l()
  420. pbd(10)
  421. r()
  422. pbd(1)
  423. r()
  424.  
  425. pbd(10) --5
  426. l()
  427. pbd(1)
  428. l()
  429. pbd(7)
  430. turtle.select(6)
  431. pbd(3)
  432. r()
  433. pbd(1)
  434. r()
  435.  
  436. pbd(5) --7
  437. f(1)
  438. pbd(4)
  439. l()
  440. pbd(1)
  441. l()
  442. pbd(10)
  443. r()
  444. pbd(1)
  445. r()
  446.  
  447. pbd(10) --9
  448. l()
  449. pbd(1)
  450. l()
  451. pbd(10)
  452. r()
  453. pbd(1)
  454. r()
  455.  
  456. print("----- Ground floor complete -----")
  457. print("")
  458.  
  459. -- Building the stairs ---------------------
  460.  
  461. print("----- Placing stairs -----")
  462. print("")
  463.  
  464. u(1)
  465. f(1)
  466. l()
  467. b(1)
  468. turtle.select(9) -- wall blocks
  469.  pt(2)
  470. l()
  471. f(1)
  472.  pu()
  473. b(1)
  474.  pt(1)
  475. d(1)
  476. r()
  477. f(1)
  478.  pf()
  479. turtle.select(12) -- stairs
  480. b(1)
  481.  pf() --1
  482. r()
  483. f(1)
  484. l()
  485. f(2)
  486. r()
  487.  pu() --2
  488. f(1)
  489. t()
  490. turtle.select(9) -- wall blocks (uses 12 total)
  491.  pf()
  492. t()
  493. u(1)
  494. turtle.select(12) -- stairs
  495.  pu() --3
  496. f(1)
  497. r()
  498. f(1)
  499. u(1)
  500.  pu() --4
  501. b(1)
  502. d(1)
  503. t()
  504.  
  505. print("----- Stairs complete ------")
  506. print("")
  507.  
  508. -- Laying first floor walls ---------------
  509.  
  510. print("Building first floor walls -----")
  511. print("")
  512.  
  513. turtle.select(6) -- flooring
  514. pu()
  515. turtle.select(9) -- wall blocks
  516.  pd()
  517. b(1)
  518.  pf()
  519.  pu() -- doorway
  520. b(1)
  521.  pt(4)
  522. b(1) -- doorway
  523.  pt(3)
  524. r()
  525. f(1)
  526. l()
  527. f(6)
  528. l()
  529.  pt(2)
  530.  pu() -- doorway
  531. b(1)
  532.  pt(2)
  533. r()
  534. f(1)
  535. l()
  536. f(4)
  537. l()
  538.  pt(1)
  539. l()
  540.  pt(1)
  541.  pu()  --  used 44 wall blocks
  542.  
  543. print("-----First floor walls complete -----")
  544. print("")
  545.  
  546. -- 2nd floor, floor ------------------
  547.  
  548. print("----- Laying 2nd floor -----")
  549. print("")
  550.  
  551. l()
  552. f(2)
  553. u(3)
  554. r()
  555.  
  556. turtle.select(6)
  557.  pd()
  558.  pbd(4)
  559. r()
  560.  pbd(1)
  561. r()
  562.  pbd(5)
  563. f(1)
  564.  pd()
  565.  pbd(3)
  566. r()
  567.  pbd(1)
  568. l()
  569.  pbd(1)
  570. l()
  571. turtle.select(7)
  572.  pbd(2)
  573. l()
  574.  
  575.  pbd(10) --1
  576. r()
  577.  pbd(1)
  578. r()
  579.  pbd(10)
  580. l()
  581.  pbd(1)
  582. l()
  583.  
  584.  pbd(10) --3
  585. r()
  586.  pbd(1)
  587. r()
  588.  pbd(10)
  589. l()
  590.  pbd(1)
  591. l()
  592.  
  593.  pbd(10) --5
  594. r()
  595.  pbd(1)
  596. r()
  597.  pbd(7)
  598. turtle.select(8)
  599.  pbd(3)
  600. l()
  601.  pbd(1)
  602. l()
  603.  
  604.  pbd(10) --7
  605. r()
  606.  pbd(1)
  607. r()
  608.  pbd(10)
  609. t()
  610.  
  611. print("----- 2nd floor complete -----")
  612. print("")
  613.  
  614. -- 2nd floor walls ---------------
  615.  
  616. print("----- Building 2nd floor walls -----")
  617. print("")
  618.  
  619. u(1)
  620. turtle.select(9)
  621. f(3)
  622. l()
  623. f(1)
  624.  pt(1)
  625.  pu() --closet
  626. l()
  627. b(1)
  628. l()
  629.  pt(1)
  630. turtle.select(10)
  631.  pt(2)
  632.  pu() --doorway
  633. b(1)
  634. l()
  635.  pt(5)
  636. r()
  637. b(1)
  638. l()
  639. f(5)
  640. r() -- doorway
  641.  pu()
  642. b(1)
  643.  pt(2)
  644. l()
  645.  pt(3)
  646. r()
  647. b(1)
  648. r()
  649. f(1)
  650.  pu() --closet
  651. b(1)
  652.  pt(1)
  653. b(4)
  654. r()
  655.  pt(2)
  656.  pu() --doorway
  657. b(1)
  658. l()
  659.  pt(4)
  660.  pu()
  661. turtle.select(11)
  662. r()
  663. b(1)
  664. r()
  665.  pt(1)
  666. b(3)
  667. l()
  668.  pt(1)
  669.  pu() --doorway
  670. b(1)
  671. l()
  672.  pt(5)
  673. l()
  674. f(1)
  675. l(1)
  676. b(3)
  677.  pt(1)
  678.  pu() --doorway
  679. b(1)
  680.  pt(1)
  681.  pu()
  682. r()
  683. f(4)
  684. l()
  685. f(7)
  686. t()
  687.  
  688. print("----- 2nd floor walls complete -----")
  689. print("")
  690.  
  691. -- build the back roof ---------------
  692. print("----- Building the back roof -----")
  693. print("")
  694. turtle.select(13)
  695. for i=1,2 do -- build roof in rows of 2
  696.         roofR(14)
  697.         nextRowL()
  698.         roofL(14)
  699.         nextRowR()
  700. end
  701. roofR(8) --5th row
  702. turtle.select(14)
  703. roofR(6)
  704. nextRowL()
  705. roofL(14)
  706. nextRowR()
  707. roofR(14)
  708.  
  709. print("----- Back roof completed -----")
  710. print("")
  711. f(2)
  712. l()
  713. f(1)
  714. l()
  715. -- build the front roof ---------------
  716. print("----- Building the front roof -----")
  717. print("")
  718.  
  719. roofR(14) -- 1st row
  720. nextRowDL()
  721. roofL(14)
  722. nextRowDR()
  723.  
  724. roofR(2) -- 3rd
  725. turtle.select(15)
  726. roofR(12)
  727. nextRowDL()
  728. roofL(14)
  729. nextRowDR()
  730.  
  731. roofR(14) -- 5th
  732. nextRowDL()
  733. roofL(14)
  734. nextRowDR()
  735.  
  736. roofR(10)
  737. turtle.select(16)
  738. roofR(4)
  739.  
  740. print("----- Front roof complete -----")
  741. print("")
  742.  
  743. l()
  744. f(2)
  745. r()
  746. d(6)
  747. t()
  748.  
  749. print("----- Reloading inventory. ------")
  750. print("")
  751.  
  752. -- reloads from chest ---------------
  753.  
  754. for i=1,16 do
  755.         turtle.select(i)
  756.         turtle.drop(64)
  757. end
  758. turtle.select(1)
  759.  
  760. for i=1,15 do
  761.         turtle.suck(i,64)
  762. end
  763.  
  764. turtle.select(6) -- This section selects an inventory slot to make sure it's loaded with blocks
  765. if turtle.getItemCount(6) < 64 then
  766.         print("Make sure the turtle has the following:")
  767.         print("(in this order)")
  768.         print("")
  769.         print("- Outside wall blocks: 7 x 64")
  770.         print("- Interior wall blocks: 2 x 64 (for ceiling)")
  771.         print("- Glass blocks: 64")
  772.         print("- Roof peak blocks: 14")
  773.         print("- Doors: 16")
  774.         print("- Stone blocks: 5")
  775.         print("- Stone steps: 5")
  776.         print("- Torches: 64")
  777.         print("-----------------")
  778.         print("Type 'r' when ready to go")
  779.                 local m=io.read() -- prompts for user input
  780.                 if m=="r" then
  781.                 end
  782.         else
  783. end
  784. turtle.select(1)
  785.  
  786.  
  787. -- placing doors ---------------
  788. print("----- Dealing with privacy concerns -----")
  789. print("")
  790.  
  791. u(1)
  792. r()
  793. f(4)
  794. r()
  795. f(10)
  796. l()
  797. f(3)
  798. t()
  799. turtle.select(12)
  800.  pf() -- kitchen door
  801.  torch()
  802. b(2)
  803. l()
  804. b(2)
  805. r()
  806. turtle.select(12)
  807.  pf() -- closet door
  808.  torch()
  809. l()
  810. b(2)
  811. turtle.select(12)
  812.  pf() -- utility room door
  813. l()
  814. turtle.select(12)
  815.  pf() -- stairs closet
  816.  torch()
  817. b(2)
  818. l()
  819. f(4)
  820. r()
  821. turtle.select(12)
  822.  pf() -- front entrance
  823.  torch()
  824. r()
  825. f(2)
  826. l()
  827. u(2)
  828. f(3) -- in stairwell
  829. u(2)
  830. r()
  831. f(3)
  832. r()
  833. f(2)
  834. l()
  835. f(2)
  836. t()
  837. turtle.select(12)
  838.  pf() -- bedroom door
  839.  torch()
  840. t()
  841. f(3)
  842. r()
  843. turtle.select(12)
  844.  pf() -- 1st closet
  845. l()
  846. f(1)
  847. r()
  848. f(6)
  849. r()
  850. f(4)
  851. r()
  852. turtle.select(12)
  853.  pf() -- bedroom closet
  854.  torch()
  855. l()
  856. f(2)
  857. r()
  858. b(2)
  859. l()
  860. f(3)
  861. r()
  862. f(1)
  863. r()
  864. turtle.select(12)
  865.  pf() -- closet door
  866.  torch()
  867. l()
  868. f(3)
  869. r()
  870. f(3)
  871. r()
  872. turtle.select(12)
  873.  pf() -- bedroom door
  874.  torch()
  875. r()
  876. turtle.select(12)
  877.  pf() -- bedroom door
  878. r()
  879. f(1)
  880. r()
  881. turtle.select(12)
  882.  pf() -- bathroom door
  883. l()
  884. f(1)
  885. l()
  886. f(2)
  887. t()
  888. turtle.select(12)
  889.  pf() -- bedroom door
  890.  torch()
  891. t()
  892. f(3)
  893. r()
  894. f(3)
  895. turtle.select(12)
  896.  pf() -- closet door
  897. u(3)
  898. print("----- Privacy restored -----")
  899. print("")
  900.  
  901. -- placing the ceiling blocks ---------------
  902.  
  903. print("----- Installing the ceiling -----")
  904. print("")
  905.  
  906. turtle.select(8)
  907. pf()
  908. t()
  909. pf()
  910. r()
  911. b(1)
  912. pf()
  913. ptf(9)
  914. r()
  915. pbb(3)
  916. r()
  917. ptf(10)
  918. l()
  919. turtle.select(9)
  920. pbb(3)
  921. l()
  922. ptf(10)
  923. r()
  924. pbb(2)
  925. pf()
  926. r()
  927. b(1)
  928. pBack(9)
  929. pf()
  930. l()
  931. b(1)
  932. pf()
  933.  
  934. print("----- Ceiling completed -----")
  935. print("")
  936.  
  937. print("----- Finishing roof -----")
  938. print("")
  939.  
  940. b(1)
  941. r()
  942. f(5)
  943. l()
  944. u(5)
  945. turtle.select(11)
  946. pu()
  947. pbu(13)
  948.  
  949. -- Starting left end wall  ---------------
  950.  
  951. turtle.select(1)
  952. b(1)
  953. d(1)
  954. pu()
  955. l()
  956. pf()
  957. t()
  958. pf()
  959. d(1)
  960. pu()
  961. d(2)
  962. f(3)
  963. pf()
  964. pu()
  965. b(1)
  966. pf()
  967. u(1)
  968. pt(5)
  969. d(1)
  970. pu()
  971. t()
  972. pf()
  973. d(1)
  974. pu()
  975. d(1)
  976. f(3)
  977. pd()
  978. b(1)
  979. pf()
  980. pt(5)
  981. turtle.select(10) -- window
  982. pd()
  983. turtle.select(1)
  984. pu()
  985. b(1)
  986. pf()
  987. pt(3)
  988. turtle.select(10) -- window
  989. pd()
  990. turtle.select(1)
  991. pu()
  992. b(1)
  993. pf()
  994. pt(1)
  995. d(3)
  996. f(1)
  997. t()
  998. pt(2)
  999. turtle.select(2)
  1000. pt(10)
  1001. d(3)
  1002. t()
  1003. b(1)
  1004. for i=1,11 do
  1005.         turtle.placeUp()
  1006.         turtle.back()
  1007.         turtle.place()
  1008. end
  1009. turtle.select(10) -- window
  1010. pu()
  1011. turtle.select(2)
  1012. b(1)
  1013. pf()
  1014. u(5)
  1015.  
  1016. --  Starting back wall ---------------
  1017.  
  1018. r()
  1019. pt(2)
  1020. pu()
  1021. pd()
  1022. b(1)
  1023. turtle.select(10) -- window
  1024. pf()
  1025. turtle.select(2)
  1026. pt(1)
  1027. turtle.select(3)
  1028. pt(2)
  1029. pu()
  1030. pd()
  1031. b(1)
  1032. turtle.select(10) -- window
  1033. pf()
  1034. turtle.select(3)
  1035. pt(2)
  1036. pu()
  1037. pd()
  1038. b(1)
  1039. turtle.select(10) -- window
  1040. pf()
  1041. turtle.select(3)
  1042. pt(2)
  1043. d(3)
  1044. f(1)
  1045. t()
  1046. pt(3)
  1047. pu()
  1048. turtle.select(10) -- window
  1049. pd()
  1050. b(1)
  1051. turtle.select(3)
  1052. pf()
  1053. pu()
  1054. turtle.select(10) -- window
  1055. pd()
  1056. b(1)
  1057. turtle.select(3)
  1058. pf()
  1059. pt(2)
  1060. pu()
  1061. b(1)
  1062. pf() -- door
  1063. pt(2)
  1064. pu()
  1065. turtle.select(10) -- window
  1066. pd()
  1067. b(1)
  1068. turtle.select(3)
  1069. pf()
  1070. pt(1)
  1071. d(2)
  1072. t()
  1073. b(2)
  1074. pbb(3)
  1075. pf()
  1076. l()
  1077. b(1)
  1078. turtle.select(12) -- back door
  1079. pf()
  1080. torch()
  1081. turtle.select(13) -- back steps
  1082. d(1)
  1083. r()
  1084. pf()
  1085. t()
  1086. pf()
  1087. r()
  1088. b(1)
  1089. pf()
  1090. b(1)
  1091. turtle.select(14)
  1092. pf()
  1093. turtle.select(3)
  1094. u(1)
  1095. f(2)
  1096. l()
  1097. f(2)
  1098. r()
  1099. f(1)
  1100. r()
  1101. pbb(6)
  1102. turtle.select(4)
  1103. pf()
  1104. l()
  1105. f(1)
  1106. r()
  1107. u(1)
  1108. f(1)
  1109. r()
  1110.  
  1111. -- Starting right end wall ---------------
  1112.  
  1113. pt(1)
  1114. pd()
  1115. pu()
  1116. turtle.select(10) -- window
  1117. b(1)
  1118. pf()
  1119. turtle.select(4)
  1120. pt(10)
  1121.   u(3) -- next row
  1122.  
  1123. t()
  1124. b(1)
  1125. pt(2)
  1126. pd()
  1127. turtle.select(10) -- window
  1128. pu()
  1129. turtle.select(4)
  1130. b(1)
  1131. pf()
  1132. pt(5)
  1133. pd()
  1134. turtle.select(10) -- window
  1135. pu()
  1136. turtle.select(4)
  1137. b(1)
  1138. pf()
  1139. pt(1)
  1140. turtle.select(5)
  1141. pu()
  1142. pd()
  1143. b(1)
  1144. pf()
  1145. r()
  1146. pt(1)
  1147.   u(3) -- next row
  1148.  
  1149. f(1)
  1150. r()
  1151. pd()
  1152. b(1)
  1153. pf()
  1154. pt(9)
  1155. d(1)
  1156. t()
  1157. pu()
  1158. pf()
  1159. r()
  1160. b(1)
  1161. pf()
  1162. r()
  1163. f(3)
  1164. l()
  1165.   u(3) -- next row
  1166.  
  1167. f(1)
  1168. l()
  1169. pf()
  1170. pu()
  1171. b(1)
  1172. pf()
  1173. u(1)
  1174. pt(3)
  1175. d(1)
  1176. t()
  1177. pf()
  1178. pu()
  1179. r()
  1180. b(1)
  1181. pf()
  1182. r()
  1183. f(2)
  1184. r()
  1185. u(3)
  1186. b(2)
  1187. pf()
  1188. l()
  1189. for i=1,7 do
  1190.         d(1)
  1191.         f(1)
  1192. end
  1193.  
  1194. -- Starting front wall ---------------
  1195.  
  1196. r()
  1197. f(2)
  1198. r()
  1199. f(1)
  1200. r()
  1201. pt(1)
  1202.  pu()
  1203.  pd()
  1204.  b(1)
  1205.  turtle.select(10) -- window
  1206.  pf()
  1207.  turtle.select(5)
  1208. pt(1)
  1209. pu()
  1210. pd()
  1211. turtle.select(6)
  1212. b(1)
  1213. pf()
  1214. pt(1)
  1215.  pu()
  1216.  pd()
  1217.  b(1)
  1218.  turtle.select(10) -- window
  1219.  pf()
  1220.  turtle.select(6)
  1221.  pu()
  1222.  pd()
  1223.  b(1)
  1224.  turtle.select(10) -- window
  1225.  pf()
  1226.  turtle.select(6)
  1227. pt(2)
  1228.  pu()
  1229.  d(1)
  1230.  l()
  1231.  pu()
  1232.  d(1)
  1233.  l()
  1234.  pu()
  1235. d(1) -- next row
  1236.  
  1237. pt(1)
  1238.  pu()
  1239.  b(1) -- doorway
  1240.  pf()
  1241. pt(3)
  1242.  pu()
  1243.  turtle.select(10) -- window
  1244.  pd()
  1245.  b(1)
  1246.  pf()
  1247.  pd()
  1248.  turtle.select(6)
  1249.  pu()
  1250.  b(1)
  1251.  turtle.select(10) -- window
  1252.  pf()
  1253.  turtle.select(6)
  1254. pt(1)
  1255.  pu()
  1256.  turtle.select(10) -- window
  1257.  pd()
  1258.  b(1)
  1259.  pf()
  1260.  pd()
  1261.  turtle.select(6)
  1262.  pu()
  1263. r()
  1264. b(1)
  1265. turtle.select(10) -- window
  1266. pf()
  1267. turtle.select(6)
  1268.   d(2) -- next row
  1269.  
  1270. f(1)
  1271. r()
  1272. b(1)
  1273. pbb(7)
  1274. pf()
  1275. t()
  1276. pf()
  1277. r()
  1278. b(1)
  1279.  turtle.select(12) -- front door
  1280.  pf()
  1281. torch()
  1282. d(1)
  1283.  r()
  1284.  turtle.select(13) -- front porch
  1285.  pf()
  1286.  t()
  1287.  pf()
  1288.  r()
  1289.  b(1)
  1290.  pf()
  1291. b(1)
  1292.  turtle.select(14) -- front stairs
  1293.  pf()
  1294.  l()
  1295.  f(1)
  1296.  r()
  1297.  pf()
  1298.  r()
  1299.  f(2)
  1300.  l()
  1301.  pf()
  1302.  
  1303. -- Back to chest ---------------
  1304.  
  1305. r()
  1306. f(8)
  1307.  
  1308. print("----- House complete -----")
  1309. print("")
  1310. print("Total blocks placed: "..placed)
  1311. print("Total fuel used was: "..moved)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement