Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function moveForward()
- while not turtle.forward() do
- turtle.dig()
- end
- end
- local function moveDown()
- while not turtle.down() do
- turtle. digDown()
- end
- end
- local function moveUp()
- while not turtle.up() do
- turtle.digUp()
- end
- end
- local function getLava()
- turtle.place()
- turtle.refuel()
- turtle.placeUp()
- turtle.refuel()
- turtle.placeDown()
- turtle.refuel()
- end
- term.clear()
- term.setCursorPos(1, 1)
- print("How far out?")
- local input = read()
- turtle.select(1)
- turtle.refuel()
- moveForward()
- moveDown()
- moveDown()
- for a=1,input do
- getLava()
- moveForward()
- end
- turtle.turnRight()
- moveForward()
- getLava()
- turtle.turnRight()
- for a=1,input do
- getLava()
- moveForward()
- end
- moveUp()
- moveUp()
- moveForward()
- moveForward()
- local fl = turtle.getFuelLevel()
- print("Fuel level: "..fl)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement