Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function clear()
- term.clear()
- term.setCursorPos(1,1)
- end
- function dig()
- while(turtle.detectUp()) do
- turtle.digUp()
- sleep(.5)
- end
- while(turtle.detect()) do
- turtle.dig()
- sleep(.5)
- end
- end
- function moveForward()
- turtle.forward()
- dLeft = dLeft - 1
- torch = torch + 1
- clear()
- print("Strip Mining...")
- print("Distance Left: "..dLeft)
- fuel = turtle.getFuelLevel()
- print("Fuel Level: "..fuel)
- if not turtle.detectDown() then
- turtle.placeDown()
- end
- end
- function placeTorch()
- turtle.select(2)
- turtle.turnRight()
- turtle.dig()
- turtle.place()
- turtle.turnLeft()
- turtle.select(1)
- torch = 0
- end
- -- MAIN --
- dLeft = 64
- torch = 0
- clear()
- print("Starting Strip Mine...")
- sleep(3)
- turtle.select(16)
- turtle.refuel()
- turtle.select(1)
- term.clear()
- term.setCursorPos(1,1)
- clear()
- print("Strip Mining...")
- while(dLeft > 0) do
- dig()
- if (torch > 6) then
- placeTorch()
- end
- moveForward()
- if not turtle.detectDown() then
- turtle.placeDown()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement