Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Blarg
- --change updig to wait and check for gravel same for ForwardDig
- --Turn turtle 180 Degrees
- function turnAround()
- turtle.turnRight()
- turtle.turnRight()
- end
- --Tunneler
- function tunnel()
- goForward()
- turtle.digUp()
- turtle.placeUp()
- turtle.digDown()
- end
- --Reset Position Right (Places Floor)
- function rpRight()
- turtle.turnRight()
- pFloor()
- turtle.turnRight()
- end
- --Reset Position Left (Places Floor)
- function rpLeft()
- turtle.turnLeft()
- pFloor()
- turtle.turnLeft()
- end
- -- Ensure turtle goes up
- function goUp()
- while not turtle.up() do
- upDig()
- end
- end
- --Ensure turtle goes down
- function goDown()
- while not turtle.down() do
- downDig()
- end
- end
- --place floor
- function pFloor()
- turtle.digDown()
- turtle.placeDown()
- checkInv()
- goForward()
- end
- end
- -- Ensure turtle moves forward
- function goForward()
- while not turtle.forward() do
- forwardDig()
- end
- end
- -- Dig forward
- function forwardDig()
- while turtle.detect() do
- turtle.dig()
- end
- end
- -- Dig up
- function upDig()
- while turtle.detectUp() do
- turtle.digUp()
- sleep(.5)
- end
- end
- -- Dig Down
- function downDig()
- while turtle.detectDown() do
- turtle.digDown()
- end
- end
- --Use Next Inventory Slot
- function useNinv()
- if turtle.getItemCount(p) == 0
- then turtle.select(p)
- p = p + 1
- end
- end
- --Make Wall 3 high, needs a space at end
- function Wall()
- turtle.placeDown()
- turtle.placeUp()
- turtle.back()
- turtle.place()
- end
- --Clearing Above,Below, and moving Forward
- function clearForward()
- upDig()
- downDig()
- goForward()
- end
- --Clearing; Reseting Right
- function clearResetR()
- upDig()
- downDig()
- turtle.turnRight()
- goForward()
- turtle.turtle.turnRight()
- end
- --Clearing; Reseting Left
- function clearResetL()
- upDig()
- downDig()
- turtle.turnLeft()
- goForward()
- turtle.turnLeft()
- end
- --Clearing a 1x6x9 Area
- function RoomClearSection()
- for o=1,8 do
- clearForward()
- end
- goUp()
- goUp()
- goUp()
- turnAround()
- for o=1,8 do
- clearForward()
- end
- goDown()
- goDown()
- goDown()
- end
- function startMiner()
- while not turtle.detect() do
- if turtle.place() then
- turtle.turnLeft()
- goForward()
- turtle.turnRight()
- shell.run("format disk/")
- fs.copy("routines/FillerUp","disk/FillerUp")
- fs.copy("paths/"..count, "disk/startup")
- fs.copy("returns/"..count,"disk/return")
- fs.copy("routines/NetOnWait", "disk/NetOnWait")
- fs.copy("routines/NetOnStart","disk/NetOnStart")
- turtle.turnRight()
- goForward()
- turtle.turnLeft()
- peripheral.call("front","turnOn")
- count = count + 1
- else
- sleep(.1)
- end
- end
- end
- function twobyfortyeightFloor()
- for o=1, 47 do
- pFloor()
- end
- rpRight()
- for o=1, 47 do
- pFloor()
- end
- rpLeft()
- end
- function checkInv()
- if turtle.getItemCount(c) == 0 then
- c = c + 1
- turtle.select(c)
- end
- end
- c = 1
- for o=1, 47 do
- pFloor()
- end
- turtle.turnRight()
- for o=1, 47 do
- pFloor()
- end
- turtle.turnRight()
- for o=1, 47 do
- pFloor()
- end
- turtle.turnRight()
- for o=1, 47 do
- pFloor()
- end
- turtle.turnRight()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement