edoreld

Untitled

Apr 2nd, 2013
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.25 KB | None | 0 0
  1. ----------------
  2. --DECLARATIONS--
  3. ----------------
  4.  
  5. --Declare circle building variables
  6. local maxCircleRow = 0
  7. local maxCircleColumn = 0
  8.  
  9. --Declare the empty main table to store the circle image data
  10. local ImageArray = {}
  11.  
  12. -------------
  13. --FUNCTIONS--
  14. -------------
  15.  
  16. ----------------------
  17. --COSMETIC FUNCTIONS--
  18. ----------------------
  19.  
  20. function Pause()
  21. print("Press any key to continue...")
  22. read()
  23. end
  24.  
  25. function Done()
  26. print("Construction complete!")
  27. end
  28.  
  29. function ClearScreen()
  30. term.clear()
  31. term.setCursorPos(1,1)
  32. errMsgPathShown = false
  33. errMsgBlocksShown = false
  34. errMsgFuelShown = false
  35. end
  36.  
  37. function Restart()
  38. me = shell.getRunningProgram()
  39. shell.run(me)
  40. end
  41.  
  42.  
  43. ------------------
  44. --MATH FUNCTIONS--
  45. ------------------
  46.  
  47. function Even(num)
  48. if ( num % 2 ) == 0 then
  49. return true
  50. else
  51. return false
  52. end
  53. end
  54.  
  55. function Round(num)
  56. return math.ceil(num)
  57. end
  58.  
  59. -------------------------
  60. --ERROR CHECK FUNCTIONS--
  61. -------------------------
  62.  
  63. --Make sure that the entered value is an integer
  64. function TypeCheck(number)
  65. number = tonumber(number)
  66. if type(number) ~= "number" then
  67. return false
  68. else
  69. return true
  70. end
  71. end
  72.  
  73. function ErrorMsgFuel()
  74. if errMsgFuelShown == true then
  75. --do nothing
  76. else
  77. print("Out of fuel. Please add some!")
  78. errMsgFuelShown = true
  79. end
  80. os.sleep(1)
  81. end
  82.  
  83. function ErrorMsgBlocks()
  84. if errMsgBlocksShown == true then
  85. --do nothing
  86. else
  87. print("Out of blocks. Please add more!")
  88. errMsgBlocksShown = true
  89. end
  90. os.sleep(1)
  91. end
  92.  
  93. function ErrorMsgPath()
  94. if errMsgPathShown == true then
  95. --do nothing
  96. else
  97. print("The path is blocked. Please move!")
  98. errMsgPathShown = true
  99. end
  100. os.sleep(1)
  101. end
  102.  
  103. -------------------------------
  104. --BUILDING/MOVEMENT FUNCTIONS--
  105. -------------------------------
  106.  
  107. --Automatic refueling
  108. function ReFuel()
  109. if turtle.getFuelLevel() < 1 then
  110. ErrorMsgFuel()
  111. fuelSlot = 16
  112. while turtle.refuel() == false do
  113. turtle.select(fuelSlot)
  114. if fuelSlot == 1 then
  115. fuelSlot = 16
  116. else
  117. fuelSlot = fuelSlot - 1
  118. end
  119. os.sleep(0.2)
  120. end
  121. end
  122. end
  123.  
  124. function PlaceBlock()
  125. --Check which slot has blocks in it and select it
  126. for i = 1, 16 do
  127. if turtle.getItemCount(i) > 0 then
  128. turtle.select(i)
  129. break
  130. end
  131. if i == 16 then
  132. ErrorMsgBlocks()
  133. end
  134. end
  135. --Check if there is a block below, if there is then ignore placing any
  136. if turtle.detectDown() == true then
  137. --Continue
  138. else
  139. --Try to place block until it succeeds
  140. while turtle.placeDown() == false do
  141. os.sleep(1)
  142. end
  143. end
  144. end
  145.  
  146. function DestroyBlock()
  147. turtle.digDown()
  148. end
  149.  
  150. function goForward()
  151. ReFuel()
  152. --Try to go forward until it succeeds
  153. while turtle.forward() == false do
  154. ErrorMsgPath()
  155. end
  156. PlaceBlock()
  157. end
  158.  
  159. function goForwardDestroy()
  160. while turtle.forward() == false do
  161. ErrorMsgPath()
  162. end
  163. DestroyBlock()
  164. end
  165.  
  166. function goForwardNoPlace()
  167. ReFuel()
  168. --Try to go forward until it succeeds
  169. while turtle.forward() == false do
  170. ErrorMsgPath()
  171. end
  172. end
  173.  
  174. function turnRight()
  175. ReFuel()
  176. turtle.turnRight()
  177. end
  178.  
  179. function turnLeft()
  180. ReFuel()
  181. turtle.turnLeft()
  182. end
  183.  
  184. function goUp()
  185. ReFuel()
  186. while turtle.up() == false do
  187. --Try to go up until it succeeds
  188. ErrorMsgPath()
  189. end
  190. PlaceBlock()
  191. end
  192.  
  193. function goUpNoPlace()
  194. ReFuel()
  195. while turtle.up() == false do
  196. --Try to go up until it succeeds
  197. ErrorMsgPath()
  198. end
  199. end
  200.  
  201. function goDownNoPlace()
  202. ReFuel()
  203. while turtle.down() == false do
  204. --Try to go down until it succeeds
  205. ErrorMsgPath()
  206. end
  207. end
  208.  
  209. function fillDownward()
  210. dZ = 0
  211. while turtle.detectDown() == false do
  212. goDownNoPlace()
  213. dZ = dZ + 1
  214. end
  215. for j = 1, dZ do
  216. goUp()
  217. end
  218. dZ = 0
  219. end
  220.  
  221.  
  222. ---------------------------------
  223. --HORISONTAL/MOVEMENT FUNCTIONS--
  224. ---------------------------------
  225.  
  226. function HzPlaceBlock()
  227. --Check which slot has blocks in it and select it
  228. for i = 1, 16 do
  229. if turtle.getItemCount(i) > 0 then
  230. turtle.select(i)
  231. break
  232. end
  233. if i == 16 then
  234. ErrorMsgBlocks()
  235. end
  236. end
  237. --Try to place block until it succeeds
  238. while turtle.place() == false do
  239. os.sleep(1)
  240. end
  241. end
  242.  
  243. function goBack()
  244. ReFuel()
  245. while turtle.back() == false do
  246. --Try to go back until it succeeds
  247. ErrorMsgPath()
  248. end
  249. HzPlaceBlock()
  250. end
  251.  
  252. --------------------
  253. --CIRCLE FUNCTIONS--
  254. --------------------
  255.  
  256. function DeclareCircle(diameter)
  257. --Declare the size of the table storing the circle, this is nessesary in lua
  258. for row = 0,diameter do
  259. ImageArray[row] = {}
  260. maxCircleRow = row - 1
  261. for column = 0,diameter do
  262. ImageArray[column] = {}
  263. maxCircleColumn = column - 1
  264. end
  265. end
  266. end
  267.  
  268. function DefineCircle(r)
  269.  
  270. --convert variable to integer
  271. r = tonumber(r)
  272.  
  273. --box dimensions
  274. local bx = 1
  275. local by = 1
  276.  
  277. --centered on block
  278. local cx = 1
  279. local cy = 1
  280.  
  281. if cx ~= 0 then
  282. maxblocks_x = math.ceil((r - bx / 2) / bx) * 2 + 1
  283. else
  284. maxblocks_x = math.ceil(r / bx) * 2
  285. end
  286.  
  287. if cy ~= 0 then
  288. maxblocks_y = math.ceil((r - by / 2) / by) * 2 + 1
  289. else
  290. maxblocks_y = math.ceil(r / by) * 2
  291. end
  292.  
  293. countRow = 0
  294. for y = -maxblocks_y / 2, maxblocks_y / 2 do
  295. countCol = 0
  296. for x = -maxblocks_x / 2, maxblocks_x / 2 do
  297. distance = math.sqrt(math.pow(y * by, 2) + math.pow(x * bx, 2))
  298. if distance > r then
  299. block = 0
  300. else
  301. block = 1
  302. end
  303.  
  304. --write(" r"..countRow.." c"..countCol.." b"..block.." ") --debug print rows and columns to check success
  305. ImageArray[countRow][countCol] = block
  306. countCol = countCol + 1
  307. end
  308. countRow = countRow + 1
  309. end
  310. end
  311.  
  312. function PrintCircle()
  313. --print(maxCircleRow.." "..maxCircleColumn) --debug print size of declared circle
  314. for i = 0, maxCircleRow do
  315. for j = 0, maxCircleColumn do
  316. write(ImageArray[i][j])
  317. end
  318. print("")
  319. end
  320. end
  321.  
  322. function PrintPartCircle()
  323. for i = 15, 30 do
  324. for j = 0, 38 do
  325. write(ImageArray[i][j])
  326. end
  327. print("")
  328. end
  329. end
  330.  
  331. function GetCircleCoord(loc_row,loc_col)
  332. return ImageArray[loc_row][loc_col]
  333. end
  334.  
  335. function HollowOutCircle()
  336.  
  337. --middle of the circle
  338. for i = Round(maxCircleRow/5), maxCircleRow-Round(maxCircleRow/5) do
  339. Count = 0
  340. for j = 0, maxCircleColumn-1, 1 do
  341.  
  342. --hollow out the circle
  343. if i == 1 or i == maxCircleRow-1 then
  344. --skip the first and last row
  345. else
  346. if ImageArray[i][j] == 1 then
  347. if Count == 1 then
  348. if ImageArray[i][j+1] == 0 then
  349. break
  350. else
  351. ImageArray[i][j] = 0
  352. end
  353. else
  354. Count = 1 + Count
  355. end
  356. end
  357. end
  358. end
  359. end
  360.  
  361. --bottom of the circle
  362. for i = maxCircleRow-Round(maxCircleRow/5), maxCircleRow, 1 do
  363. Count = 0
  364. for j = 0, maxCircleColumn-1, 1 do
  365.  
  366. --hollow out the circle
  367. if i == 1 or i == maxCircleRow-1 then
  368. --skip the first and last row
  369. else
  370. if ImageArray[i][j] == 1 and ImageArray[i+1][j] == 1 then
  371. --if Count == 1 then
  372. if ImageArray[i][j+1] == 0 then
  373. break
  374. else
  375. ImageArray[i][j] = 0
  376. end
  377. --else
  378. -- Count = 1 + Count
  379. --end
  380. end
  381. end
  382. end
  383. end
  384.  
  385. --top of the circle
  386. for i = maxCircleRow-Round(maxCircleRow/5), 0, -1 do
  387. Count = 0
  388. for j = 0, maxCircleColumn-1, 1 do
  389.  
  390. --hollow out the circle
  391. if i == 1 or i == maxCircleRow-1 then
  392. --skip the first and last row
  393. else
  394. if ImageArray[i][j] == 1 and ImageArray[i-1][j] == 1 then
  395. --if Count == 1 then
  396. if ImageArray[i][j+1] == 0 then
  397. break
  398. else
  399. ImageArray[i][j] = 0
  400. end
  401. --else
  402. Count = 1 + Count
  403. --end
  404. end
  405. end
  406. end
  407. end
  408.  
  409.  
  410. end
  411.  
  412.  
  413. function BuildCircle()
  414. for i = 0, maxCircleRow do
  415.  
  416. for j = 0, maxCircleColumn-1, 1 do
  417. --if Even(j) == true then j = j + 1 end
  418. --if Even(j) == false then j = j + 1 end
  419. if ImageArray[i][j] == 1 then
  420. --print("j="..j.." i="..i)
  421. --PlaceBlock()
  422. fillDownward()
  423. goForwardNoPlace()
  424. else
  425. goForwardNoPlace()
  426. end
  427. end
  428.  
  429. if Even(i) == false then
  430. --print("uneven row")
  431. turnLeft()
  432. goForwardNoPlace()
  433. turnLeft()
  434. else
  435. --print("even row")
  436. turnRight()
  437. goForwardNoPlace()
  438. turnRight()
  439. end
  440.  
  441. end
  442. end
  443.  
  444. function HzBuildCircle(Z)
  445. for i = 0, maxCircleRow do
  446.  
  447. for j = 0, maxCircleColumn-1, 1 do
  448. --if Even(j) == true then j = j + 1 end
  449. --if Even(j) == false then j = j + 1 end
  450. if ImageArray[i][j] == 1 then
  451. --print("j="..j.." i="..i)
  452. --PlaceBlock()
  453.  
  454. for i = 1, Z do
  455. goForwardNoPlace()
  456. end
  457.  
  458. for i = 1, Z do
  459. goBack()
  460. end
  461.  
  462. if Even(i) == false then
  463. --print("uneven row")
  464. goUpNoPlace()
  465. else
  466. --print("even row")
  467. goDownNoPlace()
  468. end
  469.  
  470. else
  471. if Even(i) == false then
  472. --print("uneven row")
  473. goUpNoPlace()
  474. else
  475. --print("even row")
  476. goDownNoPlace()
  477. end
  478. end
  479. end
  480.  
  481. --next row
  482. turnRight()
  483. goForwardNoPlace()
  484. turnLeft()
  485.  
  486. end
  487. end
  488.  
  489.  
  490. function CirclePreview()
  491. --Cosmetic preview
  492. ClearScreen()
  493. print("Circle preview...")
  494. print("")
  495. print("Please note that this will look ugly")
  496. print("if the circle is larger than 18x18!")
  497. print("")
  498. Pause()
  499. ClearScreen()
  500. PrintCircle()
  501. Pause()
  502. ClearScreen()
  503. end
  504.  
  505.  
  506. ---------------
  507. --DESCRIPTION--
  508. ---------------
  509.  
  510. while true do
  511. ClearScreen()
  512. print("Construction Turtle by Cragrim")
  513. print("==============================")
  514. print("Current fuel level is: "..turtle.getFuelLevel())
  515. print("What do you wish to build?")
  516. print("p: Plane/floor")
  517. print("f: Fence")
  518. print("w: Wall")
  519. print("s: Solid (fill a hole)")
  520. print("h: House (a hollow box)")
  521. print("c: Circle")
  522. print("a: antifloor")
  523. write("Command> ")
  524. local buildChoice = read()
  525.  
  526. if buildChoice == "a" then
  527. -----------------
  528. --ANTIFLOOR BUILDER--
  529. -----------------
  530. ClearScreen()
  531. print("CTC - Antifloor builder")
  532. print("==============================")
  533. print("Please enter how many blocks in a grid")
  534. print("forward and to the right you wish to destroy.")
  535. print("")
  536.  
  537. --START--
  538.  
  539. write("How many blocks forward?: ")
  540. local Y = read()
  541.  
  542. write("How many blocks to the right?: ")
  543. local X = read()
  544.  
  545. if (TypeCheck(Y) == false) or (TypeCheck(X) == false) then
  546. print("You have not entered a valid number!")
  547. else
  548. ClearScreen()
  549. print("Beginning to destroy a plane... ")
  550. print(Y.." blocks forward and ")
  551. print(X.." blocks to the right.")
  552.  
  553. DestroyBlock()
  554.  
  555. --Build floor
  556. while X ~= 0 do
  557. for i = 2, Y do
  558. goForwardDestroy()
  559. end
  560.  
  561. X = X - 1
  562. if X == 0 then break
  563. end
  564.  
  565. turnRight()
  566. goForwardDestroy()
  567. turnRight()
  568.  
  569. for i = 2, Y do
  570. goForwardDestroy()
  571. end
  572.  
  573. X = X - 1
  574. if X == 0 then break
  575. end
  576.  
  577. turnLeft()
  578. goForwardDestroy()
  579. turnLeft()
  580. end
  581. Done()
  582. end
  583.  
  584. Pause()
  585.  
  586. elseif buildChoice == "p" then
  587. -----------------
  588. --PLANE BUILDER--
  589. -----------------
  590. ClearScreen()
  591. print("CTC - Plane/floor builder")
  592. print("==============================")
  593. print("Please enter how many blocks in a grid")
  594. print("forward and to the right you wish to build.")
  595. print("")
  596.  
  597. --START--
  598.  
  599. write("How many blocks forward?: ")
  600. local Y = read()
  601.  
  602. write("How many blocks to the right?: ")
  603. local X = read()
  604.  
  605. if (TypeCheck(Y) == false) or (TypeCheck(X) == false) then
  606. print("You have not entered a valid number!")
  607. else
  608. ClearScreen()
  609. print("Beginning to build a plane... ")
  610. print(Y.." blocks forward and ")
  611. print(X.." blocks to the right.")
  612.  
  613. PlaceBlock()
  614.  
  615. --Build floor
  616. while X ~= 0 do
  617. for i = 2, Y do
  618. goForward()
  619. end
  620.  
  621. X = X - 1
  622. if X == 0 then break
  623. end
  624.  
  625. turnRight()
  626. goForward()
  627. turnRight()
  628.  
  629. for i = 2, Y do
  630. goForward()
  631. end
  632.  
  633. X = X - 1
  634. if X == 0 then break
  635. end
  636.  
  637. turnLeft()
  638. goForward()
  639. turnLeft()
  640. end
  641. Done()
  642. end
  643.  
  644. Pause()
  645.  
  646. elseif buildChoice == "f" then
  647. -----------------
  648. --FENCE BUILDER--
  649. -----------------
  650. ClearScreen()
  651. print("CTC - Fence builder")
  652. print("==============================")
  653. print("Please enter how many blocks in a grid")
  654. print("forward, to the right and which height")
  655. print("you wish to build.")
  656. print("")
  657.  
  658. write("How many blocks forward?: ")
  659. local Y = read()
  660.  
  661. write("How many blocks to the right?: ")
  662. local X = read()
  663.  
  664. write("How many blocks high?: ")
  665. local Z = read()
  666.  
  667. if (TypeCheck(Y) == false) or (TypeCheck(X) == false) or (TypeCheck(Z) == false) then
  668. print("You have not entered a valid number!")
  669. else
  670. print(Y.." blocks forward and ")
  671. print(X.." blocks to the right.")
  672. print(Z.." blocks high.")
  673.  
  674. PlaceBlock()
  675.  
  676. --Build fence
  677.  
  678. --First column, static Z
  679. for i = 1, Z do
  680. goUp()
  681. end
  682.  
  683. for i = 2, Y do
  684. goForwardNoPlace()
  685. fillDownward()
  686. end
  687.  
  688. turnRight()
  689.  
  690. for i = 2, X do
  691. goForwardNoPlace()
  692. fillDownward()
  693. end
  694.  
  695. turnRight()
  696.  
  697. for i = 2, Y do
  698. goForwardNoPlace()
  699. fillDownward()
  700. end
  701.  
  702. turnRight()
  703.  
  704. for i = 3, X do
  705. goForwardNoPlace()
  706. fillDownward()
  707. end
  708. Done()
  709. end
  710.  
  711. Pause()
  712.  
  713. elseif buildChoice == "c" then
  714. ------------------
  715. --CIRCLE BUILDER--
  716. ------------------
  717.  
  718. ClearScreen()
  719. print("CTC - Circle builder")
  720. print("==============================")
  721. print("Please enter which type of circle that")
  722. print("you wish to build.")
  723. print("f: filled")
  724. print("h: hollow")
  725. print("vf: vertical filled")
  726. print("vh: vertical hollow")
  727. print("")
  728.  
  729. write("Circle type?: ")
  730. local buildCChoice = read()
  731.  
  732. write("Radius in blocks?: ")
  733. local cmdRadius = read()
  734.  
  735. write("How many blocks high/deep?: ")
  736. local Z = read()
  737.  
  738. --Check that input is integers
  739. if (TypeCheck(cmdRadius) == false) or (TypeCheck(Z) == false) then
  740. print("You have not entered a valid number!")
  741. else
  742.  
  743. --Declare the circle table to twice the radius
  744. DeclareCircle(cmdRadius*2+2)
  745. --Define the circle inside the table
  746. DefineCircle(cmdRadius)
  747.  
  748. --Circle type
  749. if buildCChoice == "f" then
  750.  
  751. CirclePreview()
  752. print("Constructing filled circle...")
  753. print(cmdRadius.." blocks in radius and ")
  754. print(Z.." blocks high.")
  755.  
  756. --Go up to specified height
  757. for i = 1, Z do
  758. goUpNoPlace()
  759. end
  760.  
  761. BuildCircle()
  762.  
  763. --Return down specified height
  764. for i = 1, Z do
  765. goDownNoPlace()
  766. end
  767.  
  768. Done()
  769.  
  770. elseif buildCChoice == "h" then
  771.  
  772. HollowOutCircle()
  773. CirclePreview()
  774. print("Constructing hollow circle...")
  775. print(cmdRadius.." blocks in radius and ")
  776. print(Z.." blocks high.")
  777.  
  778. --Go up to specified height
  779. for i = 1, Z do
  780. goUpNoPlace()
  781. end
  782.  
  783. BuildCircle()
  784.  
  785. --Return down specified height
  786. for i = 1, Z do
  787. goDownNoPlace()
  788. end
  789.  
  790. Done()
  791.  
  792. elseif buildCChoice == "vh" then
  793.  
  794. write("How high up?: ")
  795. local Zh = read()
  796.  
  797. --Check that input is integers
  798. if (TypeCheck(Zh) == false) then
  799. print("You have not entered a valid number!")
  800. else
  801.  
  802. HollowOutCircle()
  803. CirclePreview()
  804. print("Constructing vertical hollow circle...")
  805. print(cmdRadius.." blocks in radius and ")
  806. print(Z.." blocks deep.")
  807. print(Zh.." blocks up.")
  808.  
  809. --Go up in the air
  810. for i = 1, Zh do
  811. goUpNoPlace()
  812. end
  813.  
  814. HzBuildCircle(Z)
  815.  
  816. --Return down
  817. for i = 1, Zh do
  818. goDownNoPlace()
  819. end
  820.  
  821. Done()
  822. end
  823.  
  824. elseif buildCChoice == "vf" then
  825.  
  826. write("How high up?: ")
  827. local Zh = read()
  828.  
  829. --Check that input is integers
  830. if (TypeCheck(Zh) == false) then
  831. print("You have not entered a valid number!")
  832. else
  833.  
  834. CirclePreview()
  835. print("Constructing vertical filled circle...")
  836. print(cmdRadius.." blocks in radius and ")
  837. print(Z.." blocks deep.")
  838. print(Zh.." blocks up.")
  839.  
  840. --Go up in the air
  841. for i = 1, Zh do
  842. goUpNoPlace()
  843. end
  844.  
  845. HzBuildCircle(Z)
  846.  
  847. --Return down
  848. for i = 1, Zh do
  849. goDownNoPlace()
  850. end
  851.  
  852. Done()
  853. end
  854.  
  855. else
  856. ClearScreen()
  857. print("Incorrect choice or not implemented.")
  858. print("Please try again!")
  859. os.sleep(1)
  860. end
  861.  
  862. end
  863.  
  864. Pause()
  865.  
  866. elseif buildChoice == "w" then
  867. print("Not implemented yet, sorry!")
  868. os.sleep(1)
  869.  
  870. elseif buildChoice == "s" then
  871. -----------------
  872. --SOLID BUILDER--
  873. -----------------
  874. ClearScreen()
  875. print("CTC - Solid (filler) builder")
  876. print("==============================")
  877. print("Please enter how many blocks in a grid")
  878. print("forward and to the right you wish to build.")
  879. print("")
  880.  
  881. --START--
  882.  
  883. write("How many blocks forward?: ")
  884. local Y = read()
  885.  
  886. write("How many blocks to the right?: ")
  887. local X = read()
  888.  
  889. write("How many blocks up?: ")
  890. local Z = read()
  891.  
  892. if (TypeCheck(Y) == false) or (TypeCheck(X) == false) or (TypeCheck(Z) == false) then
  893. print("You have not entered a valid number!")
  894. else
  895. ClearScreen()
  896. print("Beginning to build a plane... ")
  897. print(Y.." blocks forward and ")
  898. print(X.." blocks to the right.")
  899. print(Z.." blocks up in the air.")
  900.  
  901. for i = 1, Z do
  902. goUp()
  903. end
  904.  
  905. PlaceBlock()
  906.  
  907. --Build floor
  908. while X ~= 0 do
  909. for i = 2, Y do
  910. goForwardNoPlace()
  911. fillDownward()
  912. end
  913.  
  914. X = X - 1
  915. if X == 0 then break
  916. end
  917.  
  918. turnRight()
  919. goForwardNoPlace()
  920. fillDownward()
  921. turnRight()
  922.  
  923. for i = 2, Y do
  924. goForwardNoPlace()
  925. fillDownward()
  926. end
  927.  
  928. X = X - 1
  929. if X == 0 then break
  930. end
  931.  
  932. turnLeft()
  933. goForwardNoPlace()
  934. fillDownward()
  935. turnLeft()
  936. end
  937. Done()
  938. end
  939.  
  940. Pause()
  941.  
  942. elseif buildChoice == "h" then
  943. print("Not implemented yetm, sorry!")
  944. os.sleep(1)
  945.  
  946. elseif buildChoice == "exit" then
  947. ClearScreen()
  948. break
  949.  
  950. else
  951. ClearScreen()
  952. print("Incorrect choice, please try again!")
  953. os.sleep(1)
  954. end
  955. end
Advertisement
Add Comment
Please, Sign In to add comment