Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- j=0
- function fforward()
- while(turtle.forward()==false) do
- turtle.dig()
- end
- end
- function fdigUp()
- while(turtle.detectUp()) do
- turtle.digUp()
- sleep(0.4)
- end
- end
- function placeTorch()
- turtle.turnRight()
- turtle.turnRight()
- turtle.select(2)
- turtle.place()
- turtle.turnRight()
- turtle.turnRight()
- j=0
- end
- function step()
- fforward()
- fdigUp()
- turtle.select(1)
- turtle.placeDown()
- if(j>12) then
- placeTorch()
- end
- j=j+1
- end
- write("Maximale Laenge eingeben:")
- max=tonumber(read())
- i=0
- while(i<max) do
- for k=1,i do
- step()
- end
- turtle.turnRight()
- i=i+2
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement