Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function fuel()
- turtle.select(16)
- turtle.refuel(1)
- end
- local function dig()
- fuel()
- turtle.dig()
- end
- local function move()
- --Checking for fuel
- while turtle.getFuelLevel() <= 5 do
- fuel()
- end
- turtle.forward()
- end
- local function dropInv(depth)
- local i
- i = 0
- while i < depth do
- fuel()
- turtle.up()
- end
- end
- local function done(depth)
- local i
- i = 0
- while i < depth do
- fuel()
- turtle.up()
- i = i + 1
- end
- end
- local function Main()
- local depth = 0
- local i
- while true do
- fuel()
- dig()
- turtle.turnRight()
- dig()
- turtle.turnLeft()
- dig()
- turtle.forward()
- turtle.turnRight()
- dig()
- turtle.turnLeft()
- turtle.back()
- turtle.back()
- turtle.digDown()
- if turtle.getItemCount(4) >= 1 then
- rednet.broadcast("dropping inventory")
- dropInv(depth)
- end
- if turtle.down() == false then
- rednet.broadcast("Hit bottom!")
- done(depth)
- rednet.broadcast("e")
- break
- end
- depth = depth + 1
- end
- end
- local side = "right"
- rednet.open(side)
- rednet.broadcast("Connected")
- Main()
Advertisement
Add Comment
Please, Sign In to add comment