Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Laenge?")
- l = tonumber(read())
- print("Breite?")
- b = tonumber(read())
- print("Tiefe?")
- t = tonumber(read())
- right = true
- turtle.select(1)
- function forward()
- while(not turtle.forward()) do
- turtle.dig()
- end
- if turtle.detectDown() then
- if turtle.compareDown(1) == true then
- else
- turtle.digDown()
- turtle.placeDown()
- if turtle.getItemCount(1) < 1 then
- turtle.select(16)
- turtle.place()
- turtle.select(1)
- turtle.drop()
- turtle.select(2)
- turtle.drop()
- turtle.select(3)
- turtle.drop()
- turtle.select(4)
- turtle.drop()
- turtle.select(5)
- turtle.drop()
- turtle.select(6)
- turtle.drop()
- turtle.select(7)
- turtle.drop()
- turtle.select(8)
- turtle.drop()
- turtle.dig()
- turtle.select(8)
- turtle.transferTo(16)
- turtle.select(15)
- turtle.place()
- turtle.select(1)
- turtle.suck()
- turtle.dig()
- turtle.select(2)
- turtle.transferTo(15)
- turtle.select(1)
- else
- print("Alles OK")
- end
- end
- else
- turtle.placeDown()
- end
- end
- function down()
- if turtle.detectDown() then
- turtle.digDown()
- end
- end
- function turn()
- if(right) then
- turtle.turnRight()
- else
- turtle.turnLeft()
- end
- end
- for y=1,t do
- for z=1,b do
- for x=1,l-1 do
- forward()
- end
- turn()
- if(z ~= b) then
- forward()
- end
- turn()
- right = not right
- end
- if(y ~= t) then
- down()
- end
- right = not right
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement