Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function dig_forward()
- local success, data
- while turtle.detect() do
- success, data = turtle.inspect()
- if success then
- if (data.name ~= "computercraft:turtle_normal") and (data.name ~= "computercraft:turtle_advanced") then
- turtle.dig()
- else
- break
- end
- else
- turtle.dig()
- end
- sleep(0.5)
- end
- end
- function dig_up()
- local success, data
- while turtle.detectUp() do
- success, data = turtle.inspectUp()
- if success then
- if (data.name ~= "computercraft:turtle_normal") and (data.name ~= "computercraft:turtle_advanced") then
- turtle.digUp()
- else
- break
- end
- else
- turtle.digUp()
- end
- sleep(0.5)
- end
- end
- function dig_down()
- local success, data
- while turtle.detectDown() do
- success, data = turtle.inspectDown()
- if success then
- if (data.name ~= "computercraft:turtle_normal") and (data.name ~= "computercraft:turtle_advanced") then
- turtle.digDown()
- else
- break
- end
- else
- turtle.digDown()
- end
- sleep(0.5)
- end
- end
- while true do
- dig_forward()
- dig_down()
- dig_up()
- turtle.forward()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement