Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local alto = 6
- local ancho = 8
- function recargar()
- turtle.select(1)
- if turtle.getItemCount() == 0 then
- print("sin combustible")
- turtle.down()
- exit()
- else
- turtle.refuel(1)
- turtle.select(2)
- end
- end
- function plantarAlto()
- local count = 0
- while count < alto do
- count = count + 1
- turtle.placeDown()
- if not count == alto
- turtle.forward()
- end
- end
- end
- print("empezamos")
- if turtle.getFuelLevel() < 50 then
- recargar()
- local ccount = 0
- while ccount < ancho do
- plantarAlto()
- if (ccount % 2 == 0) then
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- else
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- end
- ccount = ccount + 1
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement