Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function fuel(currentSlot)
- while turtle.getFuelLevel() <= 5 do
- turtle.select(16)
- turtle.refuel(1)
- print(turtle.getFuelLevel())
- end
- turtle.select(currentSlot)
- end
- local function mine(currentSlot)
- fuel(currentSlot)
- while turtle.forward() == false do
- print("dig")
- turtle.dig()
- end
- -- turtle.forward()
- checkDown(currentSlot)
- print("Made it")
- turtle.digUp()
- end
- local function checkDown(currentSlot)
- if turtle.detectDown() == false then
- turtle.select(1)
- turtle.placeDown()
- turtle.select(currentSlot)
- end
- end
- local function inventoryCheck()
- if turtle.getItemCount(14) > 0 then
- dropItems()
- end
- end
- local function dropItems(distance, currentSlot)
- local back = 0
- turtle.turnRight()
- turtle.turnRight()
- while back <= distance do
- fuel(currentSlot)
- turtle.forward()
- back = back - 1
- end
- end
- local function main()
- local fuelSlot = 16
- local currentSlot = 1
- local bridgeSlot = 1
- local torchSlot = 2
- local distance = 0
- fuel(currentSlot)
- turtle.select(fuelSlot)
- inventoryCheck(distance, currentSlot)
- mine(currentSlot)
- distance = distance + 1
- if distance % 8 == true then
- turtle.turnLeft()
- turtle.select(1)
- turtle.place()
- turtle.turnRight()
- turtle.select(currentSlot)
- end
- end
- main()
Advertisement
Add Comment
Please, Sign In to add comment