Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local args = {...}
- if args[1] == nil then
- print(args[0].." <radius>")
- exit()
- end
- function FellTree()
- while turtle.detect() do
- turtle.dig()
- if turtle.detectUp() then
- turtle.digUp()
- end
- turtle.up()
- end
- while not turtle.detect() do
- turtle.down()
- end
- end
- function DetectInSpiral(radius)
- for i = 1, radius do
- for j = 1, i do
- if turtle.detect() then
- FellTree()
- else
- turtle.forward()
- end
- end
- end
- turtle.turnRight()
- end
- DetectInSpiral(args[1])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement