Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- args = {...}
- deep = tonumber(args[1])
- wide = tonumber(args[2])
- sand = args[3]
- currSlot = 1
- rl = true
- o = 0
- dp = 0
- function wait()
- if sand ~= nil then
- sleep(.5)
- while turtle.detect() do
- turtle.dig()
- sleep(.5)
- end
- end
- end
- function slot()
- if turtle.getItemCount(currSlot) == 0 then
- currSlot = currSlot + 1
- turtle.select(currSlot)
- end
- end
- function fuel()
- slot()
- if turtle.getFuelLevel() <=2 then
- turtle.select(16)
- turtle.refuel(1)
- turtle.select(currSlot)
- slot()
- end
- end
- function check()
- turtle.select(currSlot)
- turtle.digDown()
- turtle.placeDown()
- while turtle.detectUp() do
- fuel()
- turtle.digUp()
- turtle.up()
- end
- while not turtle.detectDown() do
- oh = o + 2
- if oh < dp then
- turtle.dig()
- end
- fuel()
- turtle.down()
- end
- end
- function length()
- check()
- print("length")
- dp = deep
- for o = 0 ,dp do
- print("check")
- if o == dp then
- check()
- print("yes o")
- if rl == true then
- turtle.turnRight()
- turtle.dig()
- wait()
- turtle.forward()
- turtle.turnRight()
- rl = false
- elseif rl == false then
- turtle.turnLeft()
- turtle.dig()
- wait()
- turtle.forward()
- turtle.turnLeft()
- rl = true
- end
- else
- fuel()
- turtle.dig()
- turtle.forward()
- wait()
- check()
- print("not o")
- end
- end
- end
- function widen()
- for y = 1,wide do
- length()
- end
- end
- turtle.dig()
- wait()
- turtle.forward()
- widen()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement