Advertisement
Guest User

test

a guest
Apr 9th, 2020
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.13 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 = 0, size do
  34.     print("X: "..i)
  35.    
  36.     for s = 0, i do
  37.         turtle.forward()
  38.     end
  39.    
  40.    
  41.         for j = 0, size do            
  42.             print("Y: "..j)
  43.        
  44.             turtle.turnRight()
  45.        
  46.             for k = 0, j do
  47.                 turtle.forward()
  48.             end    
  49.        
  50.             turtle.digUp()
  51.             turtle.select(plat)
  52.             turtle.placeUp()
  53.        
  54.             for k = 0, j do
  55.                 turtle.back()
  56.             end
  57.        
  58.             turtle.turnLeft()
  59.             end
  60.              
  61.     for s = 0, i do
  62.         turtle.back()
  63.     end
  64.    
  65. end    
  66.  
  67. print("Done")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement