Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --http://pastebin.com/FYV6bmu3
- local howmany = {...}
- local function toBedrock(num)
- local howmany = tonumber(num)
- local startY = 0
- local completed = 0
- local notBedrock = true
- local function returnToSurface()
- while startY < 0 do
- if turtle.getFuelLevel() == 0 then
- turtle.refuel(1)
- end
- turtle.up()
- startY = startY + 1
- print(startY)
- end
- end
- local function digToBedrock()
- while notBedrock do
- if turtle.getFuelLevel() == 0 then
- turtle.refuel(1)
- end
- turtle.digDown()
- notBedrock = turtle.down()
- print(startY)
- if not notBedrock then
- returnToSurface()
- break
- else
- startY = startY - 1
- end
- end
- end
- while completed < howmany do
- digToBedrock()
- turtle.dig()
- turtle.forward()
- completed = completed + 1
- notBedrock = true
- end
- end
- toBedrock(howmany[1])
- -- local startY = 0
- -- local completed = 0
- -- local notBedrock = true
- -- local function returnToSurface()
- -- while startY < 0 do
- -- if turtle.getFuelLevel() == 0 then
- -- turtle.refuel(1)
- -- end
- -- turtle.up()
- -- startY = startY + 1
- -- print(startY)
- -- end
- -- end
- -- local function digToBedrock()
- -- while notBedrock do
- -- if turtle.getFuelLevel() == 0 then
- -- turtle.refuel(1)
- -- end
- -- turtle.digDown()
- -- notBedrock = turtle.down()
- -- print(startY)
- -- if not notBedrock then
- -- returnToSurface()
- -- break
- -- else
- -- startY = startY - 1
- -- end
- -- end
- -- end
- -- while completed < tonumber(howmany[1]) do
- -- digToBedrock()
- -- turtle.dig()
- -- turtle.forward()
- -- completed = completed + 1
- -- notBedrock = true
- -- end
- -- digToBedrock()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement