Advertisement
JMANN2400

Basic Bridge Builder

Jul 30th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.92 KB | None | 0 0
  1.  
  2.  
  3. s = 2
  4.  
  5. n = 0
  6.  
  7.  
  8.  
  9. print("+-------------------------------------+")
  10. print("| Bridge Maker                        |")
  11. print("+-------------------------------------+")
  12. print("| Slot 1: Fuel                        |")
  13. print("| Slot 2-16: Building Blocks          |")
  14. print("+-------------------------------------+")
  15. print("| Place turtle facing towards desired |")
  16. print("| direction. Insert fuel. Select      |")
  17. print("| length. Press enter to start.       |")
  18. print("+-------------------------------------+")
  19. print("| Bridge length = ?                   |")
  20. print("+-------------------------------------+")
  21. l = tonumber(read())
  22. turtle.refuel()
  23.  
  24. while n < l do
  25.     turtle.select(s)
  26.     if turtle.getItemCount() > 0 then
  27.        
  28.     else
  29.         if s == 16 then
  30.             l = n
  31.         else
  32.             s = s + 1
  33.             turtle.select(s)
  34.         end
  35.     end
  36.     turtle.forward()
  37.     turtle.placeDown()
  38.     n = n + 1
  39. end
  40.  
  41. while n > 0 do
  42.     turtle.back()
  43.     n = n - 1
  44. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement