Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Quarry3x3 by Fatboychummy (Or Fatmanchummy; depends where you look).
- --Changelog and stuff can be found online on the computercraft forums. (No link yet) (Find it under the Turtle Programs subforum)
- term.clear()
- term.setCursorPos(1,1)
- print("Starting up.")
- turtle.select(16)
- if turtle.refuel(0) == true then
- turtle.refuel(3)
- end
- function Start()
- print("Detecting surroundings")
- local std = turtle.detectDown()
- local stf = turtle.detect()
- turtle.turnRight()
- local str = turtle.detect()
- turtle.turnRight()
- local stb = turtle.detect()
- turtle.turnRight()
- local stl = turtle.detect()
- turtle.turnRight()
- if std == true then
- print("First detected: beneath")
- Ground()
- elseif stf == true then
- print("First detected: Forwards")
- turtle.dig()
- turtle.forward()
- Ground()
- elseif str == true then
- print("First detected: Right")
- turtle.turnRight()
- turtle.dig()
- turtle.forward()
- Ground()
- elseif stb == true then
- print("First detected: Rear")
- turtle.turnRight()
- turtle.turnRight()
- turtle.dig()
- turtle.forward()
- Ground()
- elseif stl == true then
- print("First detected: Left")
- turtle.turnLeft()
- turtle.dig()
- turtle.forward()
- Ground()
- else
- print("Nothing detected. Moving downwards until something is detected.")
- findGround()
- end
- end
- function findGround()
- while turtle.detectDown() == false do
- turtle.down()
- end
- Ground()
- end
- function Ground()
- while true do
- local derp = turtle.getFuelLevel()
- print(derp)
- turtle.select(16)
- wat = turtle.getFuelLevel()
- if wat < 300 then
- if turtle.refuel(0) == true then
- while wat < 3000 do
- turtle.refuel(1)
- os.sleep(0.1)
- wat = turtle.getFuelLevel()
- print("current fuel: ", wat)
- end
- end
- end
- print("Moving down 3 blocks")
- for i = 1,3 do
- if turtle.detectDown() == true then
- turtle.digDown()
- turtle.down()
- else
- turtle.down()
- end
- end
- print("Beginning first section (1/5)")
- turtle.digDown()
- turtle.dig()
- turtle.forward()
- turtle.dig()
- turtle.digDown()
- turtle.digUp()
- turtle.turnRight()
- turtle.dig()
- turtle.turnLeft()
- turtle.forward()
- turtle.turnRight()
- print("Beginning second section (2/5)")
- for i = 1,2 do
- turtle.dig()
- turtle.digUp()
- turtle.digDown()
- turtle.forward()
- end
- print("Beginning third section (3/5)")
- turtle.turnRight()
- for i = 1,2 do
- turtle.dig()
- turtle.digUp()
- turtle.digDown()
- turtle.forward()
- end
- print("Beginning fourth section (4/5)")
- turtle.turnRight()
- for i = 1,2 do
- turtle.dig()
- turtle.digUp()
- turtle.digDown()
- turtle.forward()
- end
- print("Finished this section, removing center.")
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- turtle.up()
- turtle.dig()
- turtle.down()
- turtle.down()
- turtle.dig()
- turtle.up()
- turtle.back()
- turtle.turnLeft()
- turtle.back()
- end
- end
- Start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement