Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Mining well program
- -- Should have 200 fuel at least...
- forward = 0
- startingfuel = turtle.getFuelLevel()
- numconduit = 30
- term.clear()
- print("Turtle fuel:")
- print(startingfuel)
- if (startingfuel<200) then
- print("Low on fuel! (should have at least 200)")
- return
- end
- -- rednet.open("right") --enable modem on the right side of the PC
- print("---------------------")
- print("Start to the right of a powered conduit, mining well slot 1, ender chest in slot 2, ".. numconduit .." energy conduit slot 3")
- print("---------------------")
- --rednet.broadcast("-----------------")
- --rednet.broadcast("Starting - fuel: ".. startingfuel)
- function digAndPlaceConduit()
- turtle.dig()
- turtle.forward()
- turtle.digUp()
- turtle.turnLeft()
- turtle.dig()
- -- place conduit
- turtle.place()
- turtle.up()
- turtle.dig()
- turtle.down()
- turtle.turnRight()
- end
- function emptyInventory()
- for n=0,15 do
- turtle.select(n+1)
- turtle.drop()
- end
- turtle.select(1)
- end
- function placeMiningWell()
- -- ender chest first
- turtle.up()
- turtle.select(2)
- turtle.place()
- turtle.down()
- turtle.select(1)
- turtle.place()
- sleep(6)
- turtle.up()
- -- Empty into the ender chest first
- emptyInventory()
- turtle.down()
- turtle.dig()
- turtle.up()
- turtle.dig()
- turtle.down()
- turtle.forward()
- forward = forward+1
- end
- function cleanUpConduit()
- turtle.turnLeft()
- turtle.dig()
- turtle.turnRight()
- turtle.back()
- end
- turtle.select(3)
- for n=0,numconduit-1 do
- digAndPlaceConduit()
- end
- for n=0,numconduit-1 do
- turtle.back()
- end
- for n=0,numconduit-1 do
- placeMiningWell()
- end
- for n=0,numconduit-1 do
- cleanUpConduit()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement