Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function square(leng)
- local i,j
- for i = 1,4 do
- for j = 1,leng do
- turtle.digDown()
- if j == leng and i == 4 then break end
- turtle.forward()
- end
- turtle.turnLeft()
- end
- end
- function area()
- for l = 0,4 do
- square(2*(4-l)+1)
- turtle.forward()
- end
- for i = 1,5 do
- turtle.back()
- end
- turtle.turnRight()
- for i = 1,5 do
- turtle.forward()
- end
- turtle.turnLeft()
- end
- function stair()
- local turns = 0
- while not turtle.inspectUp() do
- turtle.forward()
- end
- while turtle.inspectUp() do
- if not turtle.forward() then
- turtle.turnLeft()
- turns = turns + 1
- end
- end
- turtle.down()
- turtle.placeUp()
- while turtle.back() do end
- if turns > 0 then
- for i = 1, turns do
- turtle.turnRight()
- while turtle.back() do end
- end
- end
- end
- for cir = 1,10 do
- area()
- turtle.down()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement