Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- i=8
- j=21
- k=0
- a=0
- right=true
- function fforward()
- while(not turtle.forward()) do
- turtle.dig()
- end
- a=a+1
- while(turtle.detectUp()) do
- turtle.digUp()
- sleep(0.4)
- end
- if not turtle.detectDown() then
- turtle.select(1)
- turtle.placeDown()
- end
- if(a==12) then
- a=0
- placeTorch()
- end
- end
- function placeTorch()
- turtle.turnRight()
- turtle.turnRight()
- turtle.select(2)
- turtle.place()
- turtle.turnRight()
- turtle.turnRight()
- end
- function Up()
- for e=1,4 do
- while(not turtle.Up) do
- turtle.digUp()
- end
- end
- end
- write("cobblestone in slot 1\n")
- write("fakeln in slot 2\n")
- write("anzahl der stockwerke:")
- k=tonumber(read())
- while(true) do
- for h=1,k do
- for f=1,i do
- for g=1,j do
- fforward()
- end
- if(f<8) then
- if right then
- turtle.turnRight()
- else
- turtle.turnLeft()
- end
- fforward()
- fforward()
- fforward()
- if right then
- turtle.turnRight()
- right=false
- else
- turtle.turnLeft()
- right=true
- end
- else
- fforward()
- Up()
- turtle.turnRight()
- turtle.turnRight()
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement