Advertisement
Guest User

test

a guest
Apr 9th, 2020
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.02 KB | None | 0 0
  1. fl = turtle.getFuelLevel()
  2.  
  3. print("Fule level: "..fl)
  4. if fl == 0 then
  5.     turtle.select(1)
  6.     turtle.refuel(1)
  7.     print("Refuling...")
  8. end
  9.  
  10. size = 9
  11. plat = 2 -- platform building block index
  12.  
  13. print("Starting")
  14.  
  15. print("moving to start")
  16.  
  17. turtle.turnLeft()
  18. turtle.forward()
  19. turtle.forward()
  20. turtle.forward()
  21. turtle.forward()
  22. turtle.forward()
  23. turtle.turnRight()
  24. turtle.back()
  25. turtle.back()
  26. turtle.back()
  27. turtle.back()
  28. turtle.back()
  29.  
  30. print("Starting Building")
  31.  
  32.  
  33. for i = 1, size do
  34.     print("X: "..i)
  35.  
  36.         for j = 1, size do            
  37.             print("Y: "..j)
  38.        
  39.             turtle.turnRight()
  40.        
  41.             for k = 0, j do
  42.                 turtle.forward()
  43.             end    
  44.        
  45.             turtle.digUp()
  46.             turtle.select(plat)
  47.             turtle.placeUp()
  48.        
  49.             for k = 0, j do
  50.                 turtle.back()
  51.             end
  52.        
  53.             turtle.turnLeft()
  54.        
  55.          end    
  56.      turtle.forward()  
  57. end    
  58.  
  59. print("Done")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement