Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Breite: ")
- breite = tonumber(read())
- print("Hoehe: ")
- hoehe = tonumber(read())
- print("Weite: ")
- weite = tonumber(read())
- function test(lel, lol)
- print(lel)
- print(lol)
- end --test()
- test("lel", "lol")
- function digLine(blocks)
- print("digLine" .. tostring(blocks))
- for i = 1, blocks do
- turtle.dig()
- turtle.forward()
- end --for
- end --digLine()
- function digLayer(height, width)
- print("digLayer" .. tostring(height) .. tostring(width))
- if height % 2 == 0 then
- digLayerEven(height, width)
- else
- digLayerOdd(height, width)
- end
- end --digLayer()
- function digLayerOdd(height, width)
- print("digLayerOdd" .. tostring(height) .. tostring(width))
- digLayerEven(height - 1, width)
- turtle.digUp()
- turtle.up()
- turtle.turnRight()
- digLine(width - 1)
- turnAround()
- digLine(width - 1)
- turtle.turnRight()
- end --digLayerOdd()
- function digLayerEven(height, width)
- print("digLayerEven" .. tostring(height) .. tostring(width))
- turtle.dig()
- turtle.forward()
- for i = 1, height / 2 do
- turtle.turnRight()
- digLine(width -1)
- turtle.digUp()
- turtle.up()
- turnAround()
- digLine(width -1)
- turtle.turnRight()
- if i == height/2 then
- goBackDown(height -1)
- else
- turtle.digUp()
- turtle.up()
- end --if
- end --for
- goBackDown(height-1)
- end --digLayerEven()
- function digTunnelEven(height, width, depth)
- print("digTunnelEven" .. tostring(height) .. tostring(width) .. tostring(depth))
- for i = 1, depth do
- digLayerEven(height, width)
- end --for
- end --digTunnel()
- function turnAround()
- print("turnAround")
- turtle.turnLeft()
- turtle.turnLeft()
- end --turnAround()
- function goBackDown(blocks)
- print("goBackDown" .. tostring(blocks))
- for i = 1, blocks do
- turtle.down()
- end --for
- end --goBackDown()
- print("starting")
- digTunnelEven(hoehe, breite, weite)
- print("done")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement