Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local asshat = require("libraries.asshat")
- local passos = 0
- function corta()
- turtle.digUp()
- turtle.up()
- passos = passos+1
- altura = altura+1
- end
- function detectaCima()
- if (turtle.inspectUp()) then
- corta()
- else
- desce()
- volta()
- end
- end
- function desce()
- for i=1, altura do
- turtle.down()
- passos = passos+1
- end
- end
- function volta()
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.forward()
- passos = passos+1
- end
- -- Main
- informacaoTitulo("T R E E C H O P P E R")
- print("Cutting tree...")
- altura = 0
- turtle.dig()
- turtle.forward()
- passos = passos+1
- while turtle.inspectUp() do
- corta()
- end
- desce()
- volta()
- agradece(passos)
Add Comment
Please, Sign In to add comment