Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int = 1
- -- length
- l = 1000
- -- checks for fuel
- fuel = turtle.getFuelLevel()
- print(fuel)
- if fuel <= 50 then
- turtle.select(16)
- turtle.refuel(1000)
- turtle.select(int)
- end
- for a = 1, l do
- -- checks item count
- turtle.select(int)
- inv = turtle.getItemCount()
- if inv == 0 then
- int = int + 1
- if int == 16 then
- int = 1
- end
- turtle.select(int)
- end
- -- checks to see if space is empty
- -- moves if it is, fills it if not
- hasBlock = turtle.detectUp()
- if hasBlock == false then
- turtle.placeUp()
- end
- if hasBlock == true then
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- if hasBlock == true then
- turtle.turnLeft()
- turtle.forward()
- turtle.forward()
- turtle.turnRight()
- end
- end
- if
- turtle.forward()
- -- checks for fuel
- fuel = turtle.getFuelLevel()
- print(fuel)
- if fuel <= 50 then
- turtle.select(16)
- turtle.refuel(1000)
- turtle.select(int)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment