Advertisement
Aixler

Iron1

Feb 15th, 2013
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.28 KB | None | 0 0
  1. slot = 1
  2.  
  3. function floor1()
  4.     for x=1, 10, 1 do
  5.         placeFloor()
  6.         turnRight()
  7.         placeFloor()
  8.         turnLeft()
  9.     end
  10. end
  11.  
  12. function placeFloor()
  13.     placeDown()
  14.     for x=1, 19, 1 do
  15.         turtle.forward()
  16.         placeDown()
  17.     end
  18. end
  19.  
  20. function place()
  21.     inventory()
  22.     turtle.place()
  23. end
  24.  
  25. function placeUp()
  26.     inventory()
  27.     turtle.placeUp()
  28. end
  29.  
  30. function placeDown()
  31.     inventory()
  32.     turtle.placeDown()
  33. end
  34.  
  35. function turnRight()
  36.     turtle.turnRight()
  37.     turtle.forward()
  38.     turtle.turnRight()
  39. end
  40.  
  41. function turnLeft()
  42.     turtle.turnLeft()
  43.     turtle.forward()
  44.     turtle.turnLeft()
  45. end
  46.  
  47. function inventory()
  48.     if turtle.getItemCount(slot) == 0 then
  49.         slot = slot + 1
  50.     end
  51.     turtle.select(slot)
  52. end
  53.  
  54. function walls1()
  55.     turtle.up()
  56.     turtle.turnLeft()
  57.     turtle.forward()
  58.     turtle.turnLeft()
  59.     for x=1, 3, 1 do
  60.         placeWalls()
  61.         turtle.turnLeft()
  62.     end
  63.     placeWall4()
  64. end
  65.  
  66.  
  67.  
  68. function placeWalls()
  69.     for x=1, 19, 1 do
  70.         placeDown()
  71.         placeUp()
  72.         turtle.back()
  73.         place()
  74.     end
  75. end
  76.  
  77. function placeWall4()
  78.     for x=1, 18, 1 do
  79.         placeDown()
  80.         placeUp()
  81.         turtle.back()
  82.         place()
  83.     end
  84.     placeDown()
  85.     placeUp()
  86.     turtle.turnRight()
  87.     turtle.back()
  88.     place()
  89.     turtle.up()
  90.     turtle.up()
  91.     turtle.forward()
  92.     turtle.turnRight()
  93.     turtle.forward()
  94. end
  95.  
  96. function cage()
  97.     for x=1, 4, 1 do
  98.     placeCage()
  99.     end
  100. end
  101.  
  102. function placeCage()
  103.     placeUp()
  104.     turtle.back()
  105.     place()
  106.     for x=1, 6, 1 do
  107.         turtle.back()
  108.     end
  109.     turtle.turnRight()
  110.     turtle.forward()
  111.     placeCageFloor()
  112.     turtle.up()
  113.     placeCageWall()
  114.     for x=1, 6, 1 do
  115.         turtle.back()
  116.     end
  117.     turtle.turnRight()
  118.     turtle.down()
  119. end
  120.  
  121. function placeCageFloor()
  122.     cageFloor()
  123.     turnRight()
  124.     cageFloor()
  125.     turnLeft()
  126.     cageFloor()
  127.     turnRight()
  128.     cageFloor()
  129.     turnLeft()
  130.     cageFloor()
  131.     turnRight()
  132.     cageFloor()
  133. end
  134.        
  135. function cageFloor()
  136.     for x=1, 4, 1 do
  137.         placeDown()
  138.         turtle.forward()
  139.     end
  140.     placeDown()
  141. end
  142.  
  143. function placeCageWall()
  144.     for x=1, 4, 1 do
  145.         placeDown()
  146.         placeUp()
  147.         turtle.back()
  148.         place()
  149.     end
  150.     turtle.turnLeft()
  151.     for x=1, 5, 1 do
  152.         placeDown()
  153.         placeUp()
  154.         turtle.back()
  155.         place()
  156.     end
  157.     turtle.turnLeft()  
  158.     for x=1, 5, 1 do
  159.         placeDown()
  160.         placeUp()
  161.         turtle.back()
  162.         place()
  163.     end
  164.     turtle.turnLeft()
  165.     for x=1, 6, 1 do
  166.         placeDown()
  167.         turtle.back()
  168.         place()
  169.     end
  170. end
  171.  
  172. floor1()
  173. walls1()
  174. cage()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement