Guest User

Untitled

a guest
Oct 7th, 2012
796
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. q = 1
  2.  
  3. if q == 1 then
  4.  
  5. local i = 1
  6. local slotNum = 1
  7.  
  8. --Function
  9.  
  10. function wall()
  11. turtle.forward()
  12. while turtle.getItemCount(slotNum) == 0 do
  13. slotNum = slotNum + 1
  14. turtle.select(slotNum)
  15. end
  16. turtle.placeDown()
  17. end
  18.  
  19. --
  20.  
  21. --------------------------
  22.  
  23.  
  24. write("How high should the walls be: ")
  25. x = tonumber(io.read())
  26. print()
  27.  
  28. write("How wide should the walls be: ")
  29. z = tonumber(io.read()) - 1
  30. print()
  31.  
  32. write("How long should the walls be: ")
  33. t = tonumber(io.read()) - 1
  34.  
  35.  
  36. turtle.up()
  37. turtle.select(1)
  38. turtle.forward()
  39. --walls
  40.  
  41. for f=1,x do -- Repeats everything "x" times (Height)
  42.  
  43. for a=1,t do
  44. wall()
  45. end
  46. turtle.turnRight()
  47.  
  48. for b=1,z do
  49. wall()
  50. end
  51. turtle.turnRight()
  52.  
  53. for c=1,t do
  54. wall()
  55. end
  56. turtle.turnRight()
  57.  
  58. for d=1,z do
  59. wall()
  60. end
  61. turtle.turnRight()
  62.  
  63. turtle.up()
  64.  
  65. end
  66.  
  67. --Turtle going down when finished
  68. turtle.back()
  69. while not turtle.detectDown() do
  70. turtle.down()
  71. end
  72. end
  73. term.clear()
  74. term.setCursorPos(1,1)
  75.  
  76. ------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment