Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function andar()
- if turtle.getItemCount(1) == 0 then
- refill()
- end
- if turtle.getFuelLevel() < 10 then
- refuel()
- end
- if turtle.detectDown() == false then
- turtle.placeDown()
- end
- if turtle.detectDown() == true then
- turtle.forward()
- end
- end
- function refill()
- turtle.select(2)
- turtle.turnLeft()
- turtle.place()
- turtle.select(1)
- turtle.suck()
- turtle.select(2)
- turtle.dig()
- turtle.turnRight()
- turtle.select(1)
- andar()
- end
- function refuel()
- turtle.select(3)
- turtle.turnLeft()
- turtle.place()
- turtle.select(4)
- turtle.suck()
- turtle.refuel()
- turtle.drop()
- turtle.select(3)
- turtle.dig()
- turtle.select(1)
- turtle.turnRight()
- andar()
- end
- while true do
- andar()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement