-- Original Code by Hmann53 -- Modifications by Gregulator -- Strip mines a 2x1 hole of a lenghth of your choice, then it comes back 3 blocks to the right and mines its way back. After depositing the inventory, the process is repeated 3 more times. -- Slot 1 : torches -- Slot 2 : fuel -- Slot 3 : Cobble -- Slot 4 : Chests -- Slots 5-16 : open --variables x = 0 z = 0 y = 0 --functions local function refuel() if turtle.getFuelLevel() < 40 then turtle.select(2) turtle.refuel(1) end end local function mining() refuel() if not turtle.detectDown() then turtle.select(3) turtle.placeDown() end turtle.dig() local f = turtle.forward() if f then x = x + 1 end turtle.digUp() sleep(0.2) end local function torch() z = z + 1 if z == 10 then turtle.turnRight() turtle.turnRight() turtle.select(1) turtle.place() turtle.turnLeft() turtle.turnLeft() z = 0 end end local function empty() write("Empty inventory") turtle.dig() turtle.select(4) turtle.place() turtle.select(5) turtle.drop() turtle.select(6) turtle.drop() turtle.select(7) turtle.drop() turtle.select(8) turtle.drop() turtle.select(9) turtle.drop() turtle.select(10) turtle.drop() turtle.select(11) turtle.drop() turtle.select(12) turtle.drop() turtle.select(13) turtle.drop() turtle.select(14) turtle.drop() turtle.select(15) turtle.drop() turtle.select(16) turtle.drop() end --code write("How far do you want to dig? ") distance = io.read() distance = tonumber(distance) write("Starting to mine...") while y < 4 do x = 0 while x < distance do mining() torch() end turtle.turnRight() mining() mining() mining() turtle.turnRight() x = 0 while x < distance do mining() torch() end empty() turtle.turnLeft() mining() mining() mining() turtle.turnLeft() y = y + 1 end write("Mission Complete!")