Advertisement
jBlume

Final buildMultiTank Program

May 6th, 2013
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.97 KB | None | 0 0
  1. turtle.up()
  2. turtle.placeDown()
  3.  for t=1,4 do
  4.   for w=1,11 do
  5.    turtle.forward()
  6.    turtle.placeDown()
  7.   end
  8.  turtle.turnRight()
  9.  end
  10. turtle.forward()
  11. turtle.turnRight()
  12. turtle.forward()
  13. turtle.down()
  14. turtle.turnLeft()
  15.  
  16. r=1
  17. while true do
  18. turtle.forward()
  19. turtle.turnRight()
  20. turtle.turnRight()
  21. turtle.place()
  22. turtle.turnLeft()
  23. turtle.turnLeft()
  24. if r<16 and turtle.getItemCount(r)<1 then
  25.          r=r+1
  26.         turtle.select(r)
  27. end
  28. if r==16 and turtle.getItemCount(r)<1 then
  29.         for p=1,100000 do
  30.                 print "I am out of Items."
  31.         end
  32. end
  33.         if turtle.detect() then
  34.                 turtle.turnRight()
  35.                 if turtle.detect() then
  36.                         turtle.turnRight()
  37.                         if turtle.detect() then
  38.                                 turtle.turnRight()
  39.                                 if turtle.detect() then
  40.                                         turtle.turnRight()
  41.                                         if turtle.detect() then
  42.                                                 turtle.turnRight()
  43.                                                 if turtle.detect() then
  44.                                                         turtle.up()
  45.                                                         turtle.placeDown()
  46.                                                         for p=1,100000 do
  47.                                                                 print "The floor has been made."
  48.                                                         end
  49.                                                 end
  50.                                         end
  51.                                 end
  52.                         end
  53.                 end
  54.         end
  55. end
  56.  
  57. for o=1,6 do
  58.     turtle.forward()
  59. end
  60. turtle.turnLeft()
  61. for y=1,5 do
  62.     turtle.forward()
  63. end
  64.     turtle.turnLeft()
  65.     turtle.turnLeft()
  66. r=3
  67. turtle.select(r)
  68. for u=1,11 do
  69.   turtle.up()
  70.   turtle.placeDown()
  71.   for t=1,4 do
  72.     for w=1,11 do
  73.       turtle.forward()
  74.       turtle.placeDown()
  75. if r<16 and turtle.getItemCount(r)<1 then
  76.      r=r+1
  77.     turtle.select(r)
  78.     end
  79. if r==16 and turtle.getItemCount(r)<1 then
  80.     for p=1,100000 do
  81.         print “I am out of Items.
  82.     end
  83. end
  84.     end
  85.    turtle.turnRight()
  86.   end
  87. end
  88. turtle.forward()
  89. turtle.turnRight()
  90. turtle.forward()
  91. turtle.down()
  92. turtle.turnLeft()
  93.  
  94. while true do
  95. turtle.forward()
  96. turtle.turnRight()
  97. turtle.turnRight()
  98. turtle.place()
  99. turtle.turnLeft()
  100. turtle.turnLeft()
  101. if r<16 and turtle.getItemCount(r)<1 then
  102.          r=r+1
  103.         turtle.select(r)
  104. end
  105. if r==16 and turtle.getItemCount(r)<1 then
  106.         for p=1,100000 do
  107.                 print "I am out of Items."
  108.         end
  109. end
  110.         if turtle.detect() then
  111.                 turtle.turnRight()
  112.                 if turtle.detect() then
  113.                         turtle.turnRight()
  114.                         if turtle.detect() then
  115.                                 turtle.turnRight()
  116.                                 if turtle.detect() then
  117.                                         turtle.turnRight()
  118.                                         if turtle.detect() then
  119.                                                 turtle.turnRight()
  120.                                                 if turtle.detect() then
  121.                                                         turtle.up()
  122.                                                         turtle.placeDown()
  123.                             for d=1,6 do
  124.                                 turtle.forward()
  125.                             end
  126.                             turtle.turnLeft()
  127.                             for f=1,6 do
  128.                                 turtle.forward()
  129.                             end
  130.                             for z=1,13 do
  131.                                 turtle.down()
  132.                                                         for p=1,100000 do
  133.                                                                 print "The Tank has been made."
  134.                                                         end
  135.                                                 end
  136.                                         end
  137.                                 end
  138.                         end
  139.                 end
  140.         end
  141. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement