Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --name shaft
- --version 1.1a
- local args = {...}
- local compare = 0
- torches = false
- if #args == 1 then
- compare = tonumber(args[1])
- end
- local function dig()
- if compare > 0 then
- for i=1,compare do
- turtle.select(i+1)
- if turtle.compare() then
- while turtle.detect() do
- os.sleep(0.1)
- end
- end
- end
- end
- turtle.dig()
- end
- local function digDown()
- if compare > 0 then
- for i=1,compare do
- turtle.select(i+1)
- if turtle.compareDown() then
- while turtle.detectDown() do
- os.sleep(0.1)
- end
- end
- end
- end
- turtle.digDown()
- end
- local function forward()
- while not turtle.forward() do
- dig()
- end
- end
- digDown()
- while true do
- for i=1,10 do
- forward()
- digDown()
- end
- if torches then
- turtle.turnLeft()
- dig()
- turtle.select(1)
- turtle.place()
- turtle.turnRight()
- end
- while not turtle.detectDown() do
- os.sleep(0.1)
- end
- turtle.digDown()
- end
Advertisement
Add Comment
Please, Sign In to add comment