Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- lvl = 0
- function chop()
- if turtle.detectUp() then
- turtle.digUp()
- while not turtle.up() do os.sleep(1) turtle.attackUp() end
- lvl = lvl+1
- chop()
- if not turtle.detectDown() then
- while not turtle.down() do os.sleep(1) turtle.attackDown() end
- else
- turtle.digDown()
- chop()
- end
- lvl = lvl-1
- end
- if turtle.detectDown() and lvl==0 then
- turtle.digDown()
- end
- for i=1,4 do
- if turtle.detect() then
- turtle.dig()
- while not turtle.forward() do os.sleep(1) end
- chop()
- while not turtle.back() do os.sleep(1) end --can be stoped
- end
- turtle.turnLeft()
- end
- end
- chop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement