Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local parou = false
- local passos = 0
- local asshat = require("libraries.asshat")
- function detectarChao()
- local isBlock, block = turtle.inspectDown()
- if (isBlock) then
- parou = true
- end
- end
- function detectarColisao()
- local isBlock, block = turtle.inspect()
- if (isBlock) then
- parou = true
- end
- end
- function andar()
- if not turtle.forward() then
- turtle.select(1)
- turtle.refuel(1)
- turtle.forward()
- end
- passos = passos+1
- end
- term.clear()
- term.setCursorPos(1,1)
- print("I'll make a bridge until I collide with something or find ground below me.\n")
- print("Since I don't know how long it's going to be, I don't know how much coal I'll need, so put lots in my 1st inventory slot.\n")
- print("Put lots of any block you want in my other slots and press anything to proceed.\n")
- write("> ")
- read()
- while not parou do
- detectarColisao()
- colocarBaixo()
- andar()
- detectarChao()
- end
- agradece(passos)
Add Comment
Please, Sign In to add comment