Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- r = 1
- dropAll = function()
- for i=2,16 do
- turtle.select(i)
- turtle.dropUp()
- end
- turtle.select(1)
- turtle.suckUp()
- turtle.refuel()
- end
- schachtGraben = function()
- hoehe= 0
- while true do
- if turtle.detectDown() then
- turtle.digDown()
- if turtle.detectDown() then
- break
- end
- end
- hoehe = hoehe+1
- turtle.down()
- end
- for ii=1,hoehe do
- turtle.digUp()
- turtle.up()
- end
- end
- kreis = function(r)
- tx = r
- ty = r
- s = 0
- while true do
- if tx > 0 then
- turtle.turnRight()
- for i=1,tx do
- turtle.dig()
- turtle.forward()
- end
- turtle.turnLeft()
- end
- if tx < 0 then
- turtle.turnLeft()
- for i=1, -tx do
- turtle.dig()
- turtle.forward()
- end
- turtle.turnRight()
- end
- if ty > 0 then
- for i=1,ty do
- turtle.dig()
- turtle.forward()
- end
- end
- if ty < 0 then
- turtle.turnLeft()
- turtle.turnLeft()
- for i=1, -ty do
- turtle.dig()
- turtle.forward()
- end
- turtle.turnRight()
- turtle.turnRight()
- end
- schachtGraben()
- if ty > 0 then
- for i=1, ty do turtle.back() end
- end
- if ty < 0 then
- for i=1, -ty do turtle.forward() end
- end
- if tx > 0 then
- turtle.turnLeft()
- for i=1, tx do turtle.forward() end
- turtle.turnRight()
- end
- if tx < 0 then
- turtle.turnRight()
- for i=1,-tx do turtle.forward() end
- turtle.turnLeft()
- end
- dropAll()
- if s == 0 then
- ty = ty-1
- if ty == -r then
- s= 1
- end
- elseif s ==1 then
- tx = tx-1
- if tx == -r then
- s= 2
- end
- elseif s== 2 then
- ty = ty+1
- if ty == r then
- s= 3
- end
- elseif s== 3 then
- tx = tx+1
- if tx == r then
- break
- end
- end
- end
- end
- for i=r,2 do
- kreis(i)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement