Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("try")
- local done = false
- local tArgs = { ... }
- if #tArgs ~= 2 then
- print("Usage: miner <shaft depth> <quarry width>")
- return
- end
- count = tonumber(tArgs[1])
- width = tonumber(tArgs[2])
- term.clear()
- term.setCursorPos(1,1)
- print("Place chest in slot 1, bucket of water in slot 2. Press any key to continue.")
- os.pullEvent()
- for i = 1, count - 2 do
- if not try.down() then
- print("Cannot go down!")
- return
- end
- end
- if not try.dig() then
- print("Cannot mine block!")
- return
- end
- for i = 1,2 do
- if not try.down() then
- print("Cannot go down!")
- return
- end
- turtle.select(3 - i)
- if not try.place() then
- print("Cannot place block!")
- return
- end
- end
- turtle.select(2)
- turtle.drop()
- turtle.turnLeft()
- turtle.turnLeft()
- shell.run("excavate", width)
Advertisement
Add Comment
Please, Sign In to add comment