Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Introduction to my mining program--------------------------------------------------------------------------------------
- --
- --Autor: Spatzenhirn123
- --
- --Welcome to my turtle-mining-program!
- --Feel free to use and share my program.
- --
- --REQUIREMENTS !!!
- --1xMining-Turtle
- --3xEnderchest (MOD: EnderStorage)
- -- -1 for all mined blocks // turtle-slot [1] -Needs to be emptied!
- -- -1 for refueling coal // turtle-slot [2] -Recommended to fill automatically
- -- -1 for Bricks to build the surface // turtle-slot [3] -Recommended to fill automatically
- --
- --Recommended:
- --1xSpotloader in turtle-slot [4] (MOD: ChickenChunks)
- --
- --Set-Up:
- --1. Place the turtle in the bottom-left corner of a chunk (press F9 to see borders).
- --2. Fill the turtle-slots.
- --3. Run: "#programname# startheight //like: "Mining 73"
- --4. Have Fun! :D
- --
- -------------------------------------------------------------------------------------------------------------------------
- --CODE-------------------------------------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------------------------------------
- --Start height
- local args = {...}
- a = args[1]-1
- --Startcheck: Fuel-------------------------------------------------------------------------------------------------------
- function Start()
- shell.run("label set Ender-Mine")
- while turtle.getFuelLevel()<(136*a+10000) do
- turtle.select(2)
- turtle.placeUp()
- turtle.suckUp()
- shell.run("refuel all")
- turtle.select(2)
- turtle.digUp()
- end
- turtle.select(4)
- turtle.up()
- turtle.placeUp()
- turtle.select(1)
- turtle.down()
- print(" ")
- print("--------------------------------")
- print("Starting Quarry!")
- print("--------------------------------")
- end
- --Items to Ender-Chest---------------------------------------------------------------------------------------------------
- function Item()
- turtle.dig()
- turtle.select(1)
- turtle.placeUp()
- for i=4,16,1 do
- turtle.select(i)
- turtle.dropUp()
- end
- turtle.select(1)
- turtle.digUp()
- end
- --End: Go back to the startposition--------------------------------------------------------------------------------------
- function E()
- turtle.turnLeft()
- for e=1,15,1 do
- turtle.forward()
- end
- turtle.turnLeft()
- for e=1,15,1 do
- turtle.forward()
- end
- turtle.turnLeft()
- turtle.turnLeft()
- end
- --Chunkbreak-------------------------------------------------------------------------------------------------------------
- function C()
- turtle.up()
- turtle.select(4)
- turtle.digUp()
- turtle.select(1)
- turtle.down()
- end
- --Build Flat-Ground------------------------------------------------------------------------------------------------------
- --Get Bricks
- function Bricks()
- while turtle.getItemSpace(4)>0 do
- turtle.select(3)
- turtle.placeUp()
- turtle.select(4)
- turtle.suckUp()
- turtle.select(3)
- turtle.digUp()
- turtle.select(4)
- end
- end
- --Building
- function D()
- for d=1,3,1 do
- Bricks()
- for c=1,2,1 do
- turtle.turnRight()
- turtle.placeDown()
- for r=1,15,1 do
- turtle.forward()
- turtle.placeDown()
- end
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- turtle.placeDown()
- for r=1,15,1 do
- turtle.forward()
- turtle.placeDown()
- end
- turtle.turnRight()
- turtle.forward()
- end
- end
- Bricks()
- turtle.turnRight()
- turtle.placeDown()
- for r=1,15,1 do
- turtle.forward()
- turtle.placeDown()
- end
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- turtle.placeDown()
- for r=1,15,1 do
- turtle.forward()
- turtle.placeDown()
- end
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- turtle.placeDown()
- for r=1,15,1 do
- turtle.forward()
- turtle.placeDown()
- end
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- turtle.placeDown()
- for r=1,15,1 do
- turtle.forward()
- turtle.placeDown()
- end
- turtle.turnLeft()
- for r=1,15,1 do
- turtle.forward()
- end
- turtle.turnLeft()
- turtle.turnLeft()
- Item()
- end
- --Mining forms-----------------------------------------------------------------------------------------------------------
- --Watercheck()
- function Mine()
- turtle.dig()
- -- if turtle.detect()==true then
- -- turtle.place()
- -- turtle.dig()
- -- end
- end
- function MineDown()
- turtle.digDown()
- -- if turtle.detectDown()==true then
- -- turtle.placeDown()
- -- turtle.digDown()
- -- end
- end
- function Next()
- Mine()
- turtle.forward()
- Mine()
- turtle.forward()
- Mine()
- end
- -------------------------------------------------------------------------------------------------------------------------
- --Next position
- function PR()
- Mine()
- turtle.forward()
- turtle.turnRight()
- Mine()
- turtle.forward()
- Mine()
- turtle.forward()
- Mine()
- turtle.turnRight()
- Mine()
- end
- function PL()
- Mine()
- turtle.forward()
- turtle.turnLeft()
- Mine()
- turtle.forward()
- Mine()
- turtle.forward()
- Mine()
- turtle.turnLeft()
- Mine()
- end
- -------------------------------------------------------------------------------------------------------------------------
- function L()
- for t=1,8,1 do
- MineDown()
- turtle.turnRight()
- Mine()
- turtle.turnLeft()
- Mine()
- while turtle.down()==true do
- MineDown()
- Mine()
- turtle.turnRight()
- Mine()
- turtle.down()
- MineDown()
- Mine()
- turtle.turnLeft()
- Mine()
- end
- for u=1,a,1 do
- turtle.digUp()
- turtle.up()
- end
- Item()
- if t<8 then
- Next()
- end
- end
- end
- -------------------------------------------------------------------------------------------------------------------------
- function T()
- for t=1,8,1 do
- MineDown()
- turtle.turnRight()
- Mine()
- turtle.turnLeft()
- Mine()
- turtle.turnLeft()
- Mine()
- while turtle.down()==true do
- MineDown()
- Mine()
- turtle.turnRight()
- Mine()
- turtle.turnRight()
- Mine()
- turtle.down()
- MineDown()
- Mine()
- turtle.turnLeft()
- Mine()
- turtle.turnLeft()
- Mine()
- end
- turtle.turnRight()
- for u=1,a,1 do
- turtle.digUp()
- turtle.up()
- end
- Item()
- if t<8 then
- Next()
- end
- end
- end
- -------------------------------------------------------------------------------------------------------------------------
- function I()
- Mine()
- turtle.forward()
- turtle.turnLeft()
- Mine()
- turtle.forward()
- turtle.turnLeft()
- turtle.forward()
- Mine()
- for t=1,4,1 do
- MineDown()
- Mine()
- turtle.turnRight()
- turtle.turnRight()
- Mine()
- turtle.turnLeft()
- turtle.turnLeft()
- while turtle.down()==true do
- MineDown()
- Mine()
- turtle.turnRight()
- turtle.turnRight()
- Mine()
- turtle.down()
- MineDown()
- Mine()
- turtle.turnRight()
- turtle.turnRight()
- Mine()
- end
- for u=1,a,1 do
- turtle.digUp()
- turtle.up()
- end
- Item()
- if t<4 then
- Next()
- Next()
- else
- Next()
- end
- end
- end
- -------------------------------------------------------------------------------------------------------------------------
- --Actions----------------------------------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------------------------------------
- Start()
- L()
- for w=1,3,1 do
- PR()
- T()
- PL()
- T()
- end
- PR()
- T()
- I()
- E()
- D()
- C()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement