Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- lmax=50
- l=50
- w=30
- hmax=29
- h=29
- function Left(lt)
- while lt~=0 do
- turtle.turnLeft()
- lt=lt-1
- end
- end
- function Right(rt)
- while rt~=0 do
- turtle.turnRight()
- rt=rt-1
- end
- end
- function move(mo)
- while mo~=0 do
- turtle.dig()
- turtle.forward()
- w=w-1
- mo=mo-1
- end
- end
- function layer()
- turtle.dig()
- turtle.digUp()
- Right(1)
- turtle.dig()
- Left(2)
- turtle.dig()
- Right(1)
- end
- function down()
- while h~=0 do
- layer()
- turtle.digDown()
- turtle.down()
- h=h-1
- end
- end
- function up()
- while h~=hmax do
- layer()
- turtle.digUp()
- turtle.up()
- h=h+1
- end
- end
- function store()
- turtle.select(1)
- turtle.digUp()
- turtle.placeUp()
- for s=2,16 do
- turtle.select(s)
- turtle.dropUp()
- end
- turtle.select(1)
- turtle.digUp()
- end
- function length(v)
- if v==0 then
- while l~=0 do
- down()
- layer()
- store()
- turtle.dig()
- turtle.forward()
- up()
- layer()
- store()
- l=l-1
- if l>0 then
- turtle.dig()
- turtle.forward()
- l=l-1
- end
- end
- else
- while l~=lmax do
- down()
- layer()
- store()
- turtle.dig()
- turtle.forward()
- up()
- layer()
- store()
- l=l+1
- if l<lmax then
- turtle.dig()
- turtle.forward()
- l=l+1
- end
- end
- end
- end
- function widthLength()
- length(0)
- Right(1)
- move(3)
- Right(1)
- length(1)
- Left(1)
- move(3)
- Left(1)
- end
- function start()
- Right(1)
- turtle.dig()
- turtle.forward()
- w=w-1
- Left(1)
- end
- function worldHole()
- while w>0 do
- widthLength()
- end
- end
- start()
- worldHole()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement