KimJongJoe

cielingBuilder

Jul 28th, 2025
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.99 KB | None | 0 0
  1. int = 1
  2.  
  3. -- length
  4. l = 1000
  5.  
  6. -- checks for fuel
  7.         fuel = turtle.getFuelLevel()
  8.         print(fuel)
  9.         if fuel <= 50 then
  10.             turtle.select(16)
  11.             turtle.refuel(1000)
  12.             turtle.select(int)
  13.             end
  14.            
  15. for a = 1, l do
  16.  
  17. -- checks item count
  18.         turtle.select(int)
  19.         inv = turtle.getItemCount()
  20.         if inv == 0 then
  21.             int = int + 1
  22.             if int == 16 then
  23.                 int = 1
  24.                 end
  25.             turtle.select(int)
  26.             end
  27.  
  28. -- checks to see if space is empty
  29. -- moves if it is, fills it if not
  30.         hasBlock = turtle.detectUp()
  31.         if hasBlock == false then
  32.             turtle.placeUp()
  33.             end
  34.         if hasBlock == true then
  35.             turtle.turnLeft()
  36.             turtle.forward()
  37.             turtle.turnLeft()
  38.                 if hasBlock == true then
  39.                     turtle.turnLeft()
  40.                     turtle.forward()
  41.                     turtle.forward()
  42.                     turtle.turnRight()
  43.                     end
  44.             end
  45.         if
  46.         turtle.forward()
  47.  
  48. -- checks for fuel
  49.         fuel = turtle.getFuelLevel()
  50.         print(fuel)
  51.         if fuel <= 50 then
  52.             turtle.select(16)
  53.             turtle.refuel(1000)
  54.             turtle.select(int)
  55.             end
  56.         end
Advertisement
Add Comment
Please, Sign In to add comment