Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Mining Turtle Tunneler 3000 Helper
- --> Used to reposition the Turtle for the next Tunnel
- Version: ComputerCraft 1.8 (Minecraft 1.12.2)
- Program Version: 1.0 (Updated: September 9th 2025)
- --> This script expects:
- --> The turtle to be docked on a tunneler 3000 docking station (Chest under and chest behind)
- ---> You will need to reposition the 2 Chests after running this Program
- --> Will move the turtle to the left or the Right of its current position into the next tunnel starting position.
- ]]
- ------------------ Config ------------------
- -- Tunneler 3000 Helper (fixed)
- write("Enter tunnel width (Ex 4): ")
- local TUNNEL_WIDTH = tonumber(read())
- write("Enter tunnel offset (Ex 2): ")
- local TUNNEL_OFFSET = tonumber(read())
- write("Move to the Left or Right? (L=Left, R=Right): ")
- local TUNNEL_DIRECTION = string.upper(read()) -- <- read as string, not number
- if not (TUNNEL_WIDTH and TUNNEL_WIDTH > 0) then error("Width must be > 0") end
- if not (TUNNEL_OFFSET and TUNNEL_OFFSET >= 0) then error("Offset must be >= 0") end
- if TUNNEL_DIRECTION ~= "L" and TUNNEL_DIRECTION ~= "R" then error("Direction must be L or R") end
- local function stepForward()
- while not turtle.forward() do
- if turtle.detect() then turtle.dig() else sleep(0.2) end
- end
- end
- local total_moves = TUNNEL_WIDTH + TUNNEL_OFFSET
- -- turn toward the side aisle
- if TUNNEL_DIRECTION == "L" then turtle.turnLeft() else turtle.turnRight() end
- -- move sideways into the next tunnel start
- for i = 1, total_moves do stepForward() end
- -- face original forward direction again
- if TUNNEL_DIRECTION == "L" then turtle.turnRight() else turtle.turnLeft() end
- print("Done!")
Advertisement