Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local util=dofile("/turtle_utils.lua")
- local od=util.dig
- util.dig=function()
- local worked,block=turtle.inspect()
- if not worked then return end
- if string.find(block.name,"ore") then
- util.veinmine("ore",true)
- else
- od()
- end
- end
- local odu=util.digUp
- util.digUp=function()
- local worked,block=turtle.inspectUp()
- if not worked then return end
- if sting.find(block.name,"ore") then
- util.veinmine("ore",true)
- else
- odu()
- end
- end
- local args={...}
- if args==nil then
- print("you've gotta tell me how far to tunnel lol")
- return
- end
- local i=0
- for i=1,tonumber(args[1]) do
- if turtle.getFuelLevel()<20 then
- turtle.select(util.find(util.fuel))
- turtle.refuel(64)
- end
- util.dig()
- util.forward(1)
- if not turtle.inspectDown() then
- turtle.select(util.find(util.trash))
- turtle.placeDown()
- end
- turtle.turnLeft()
- for _=1,2 do
- util.dig()
- util.digup()
- turtle.up()
- end
- util.dig()
- util.left(2)
- for _=1,2 do
- util.dig()
- turtle.down()
- end
- util.dig()
- turtle.turnLeft()
- end
- util.left(2)
- util.forward(tonumber(args[1]))
- turtle.digDown()
- turtle.down()
- turtle.digDown()
- local slot=util.find(util.trash)
- while slot do
- turtle.select(slot)
- turtle.dropDown(64)
- slot=util.find(util.trash)
- end
- turtle.select(1)
- turtle.suckDown(16)
- turtle.up()
- turtle.placeDown()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement