Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- run = true
- letzteEbene = false
- function checkForward()
- if turtle.detect() then
- turtle.dig()
- end
- turtle.forward()
- end
- function checkDown()
- if turtle.detect() then
- turtle.digDown()
- end
- turtle.down()
- end
- function checkUp()
- if turtle.detectUp() then
- turtle.digUp()
- end
- turtle.up()
- end
- function goHome()
- while turtle.detectDown() == false do
- checkDown()
- end
- end
- function ebene()
- turtle.dig()
- checkForward()
- turtle.dig()
- checkForward()
- turtle.turnRight()
- turtle.dig()
- checkForward()
- turtle.turnRight()
- turtle.dig()
- checkForward()
- turtle.dig()
- checkForward()
- turtle.turnLeft()
- turtle.dig()
- checkForward()
- turtle.turnLeft()
- turtle.dig()
- checkForward()
- turtle.dig()
- checkForward()
- turtle.turnLeft()
- checkForward()
- checkForward()
- turtle.turnLeft()
- checkForward()
- checkForward()
- turtle.turnLeft()
- turtle.turnLeft()
- end
- while run do
- if turtle.detectUp() == false then
- if letzteEbene then
- end
- letzteEbene = true
- print("ENDE")
- run = false
- end
- ebene()
- if run then
- checkUp()
- end
- end
- goHome()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement