DanielBoling

9x9 Builder (Not Tested)

Jan 25th, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.47 KB | None | 0 0
  1. -- Materials List
  2. -- Cobblestone - 272 (4x64+16)
  3. -- Glass - 16
  4.  
  5. -- Place 81 Cobblestone in slots 1 and 2 (64 in 1; 17 in 2)
  6. -- Place 56 Cobblestone in slot 5, and 58 Cobblestone in slot 6
  7. -- Place 16 Cobblestone in slot 9
  8. -- Place 65 Cobblestone in slots 1 and 2 (64in 1; 1 in 2)
  9. -- Place 16 Glass in slot 16
  10. -- Main Functions --
  11.  
  12. function main()
  13.     display()
  14.     floor()
  15.     turtle.turnRight()
  16.     turtle.turnRight()
  17.     wall1()
  18.     turtle.turnLeft()
  19.     turtle.turnLeft()
  20.     turtle.forward()
  21.     turtle.turnLeft()
  22.     turtle.forward()
  23.     for w = 1,5 do
  24.         turtle.down()
  25.     end
  26.     wall1()
  27.     turtle.turnRight()
  28.     turtle.turnRight()
  29.     for e = 1,9 do
  30.         turtle.forward()
  31.     end
  32.     for w = 1,5 do
  33.         turtle.down()
  34.     end
  35.     turtle.turnLeft()
  36.     wall2()
  37.     turtle.turnRight()
  38.     turtle.turnRight()
  39.     for e = 1,9 do
  40.         turtle.forward()
  41.     end
  42.     for w = 1,5 do
  43.         turtle.down()
  44.     end
  45.     turtle.turnLeft()
  46.     wall2()
  47.     turtle.turnRight()
  48.     turtle.turnRight()
  49.     for e = 1,9 do
  50.         turtle.forward()
  51.     end
  52.     for w = 1,5 do
  53.         turtle.down()
  54.     end
  55.     turtle.turnLeft()
  56.     wall()
  57.     pillars()
  58.     turtle.turnLeft()
  59.     turtle.back()
  60.     turtle.up()
  61.     ceiling()
  62.     while not turtle.detectDown() do
  63.         turtle.down()
  64.     end
  65.     display()
  66.     print("9x9 Complete...")
  67. end
  68.  
  69. -- Mini Functions --
  70.  
  71. function display()
  72.     term.clear()
  73.     term.setCursorPos(1,1)
  74.     print("9x9 Constructor 1.0")
  75. end
  76.  
  77. function ceiling()
  78.     for e = 1,9 do
  79.         for e = 1,9 do
  80.             turtle.forward()
  81.             turtle.placeDown()
  82.         end
  83.     end
  84. end
  85.  
  86. function pillars()
  87.     turtle.select(9)
  88.     turtle.forward()
  89.     for a = 1,4 do
  90.         for q = 1,4 do
  91.             turtle.down()
  92.         end
  93.         for q = 1,4 do
  94.             turtle.up()
  95.             turtle.placeDown()
  96.         end
  97.         turtle.turnLeft()
  98.         for e = 1,9 do
  99.             turtle.forward()
  100.         end
  101.     end
  102. end
  103.  
  104. function wall1()
  105.     turtle.select(5)
  106.     turtle.up()
  107.     for t = 1,4 do
  108.         for y = 1,7 do
  109.             turtle.dig()
  110.             turtle.forward()
  111.             turtle.placeDown()
  112.         end
  113.         turtle.turnRight()
  114.         turtle.turnRight()
  115.         turtle.up()
  116.     end
  117. end
  118.  
  119. function wall2()
  120.     turtle.select(6)
  121.     turtle.up()
  122.     for t = 1,4 do
  123.         for y = 1,7 do
  124.             turtle.dig()
  125.             turtle.forward()
  126.             turtle.placeDown()
  127.         end
  128.         turtle.turnRight()
  129.         turtle.turnRight()
  130.         turtle.up()
  131.     end
  132. end
  133.  
  134. function floor()
  135.     turtle.select(1)
  136.     for e = 1,9 do
  137.         turtle.select(1)
  138.         for e = 1,9 do
  139.             turtle.dig()
  140.             turtle.forward()
  141.             turtle.dig()
  142.             turtle.digDown()
  143.             turtle.placeDown()
  144.         end
  145.         turtle.turnRight()
  146.         turtle.forward()
  147.         turtle.turnRight()
  148.         turtle.select(2)
  149.         turtle.transferTo(1)
  150.     end
  151. end
  152.  
  153. -- Function List --
  154.  
  155. main()
Advertisement
Add Comment
Please, Sign In to add comment