Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function checkFuel()
- if turtle.getFuelLevel() < 5 then
- print("I need Fuel please")
- print("fuel slot 16")
- turtle.select(16)
- turtle.refuel(64)
- turtle.getFuelLevel()
- if turtle.getFuelLevel() >5 then
- print(turtle.getFuelLevel())
- print("thanks I was thirsty")
- elseif turtle.getFuelLevel() >5 then
- turtle.foward()
- end
- end
- end
- function turtleFoward()
- if turtle.forward() == true then
- turtle.placeDown()
- turtle.detect()
- elseif turtle.forward == false then
- turtle.dig()
- turtle.forward()
- turtle.place()
- end
- end
- function turtleLeft()
- if turtle.turnLeft() == true then
- turtle.turnLeft()
- turtle.forward()
- return
- end
- end
- term.write("how Long do you need: ")
- blocks = read()
- term.write("how many spaces wide: ")
- block = read()
- for i =1,blocks do
- turtleFoward()
- end
- for i =1,block do
- turtleLeft()
- end
- checkFuel()
- turtleForward()
- turtleLeft()
- turtleForward()
- turtleLeft()
- turtleForward()
- turtleLeft()
- turtleFoward()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement