Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Programm for stripmining --
- -- how many blocks should the main tunnel have --
- print("How far should I stripmine?")
- -- I fucked up the code on that so /2 lol --
- local Xlength = io.read()
- local length = Xlength/2
- -- variable digging sizes, why not --
- print("How deep should I dig in the sides?")
- local depth = io.read()
- -- digs a block and moves in that place --
- local function dig()
- turtle.dig()
- turtle.forward()
- end
- -- uses dig(), but breaks block above, so players can walk --
- local function digMain()
- -- max = 3, cause we want only every 3rd block to be stripmined --
- for i=1, 3 do
- turtle.digUp()
- dig()
- end
- end
- -- makes a hole to the left by turning and using dig() times the amount of depth --
- local function leftHole()
- turtle.digUp()
- turtle.up()
- turtle.turnLeft()
- for i=1, depth do
- dig()
- end
- end
- -- only uses dig() for depth times, since leftHole() positioned properly allready
- local function rightHole()
- for i=1, depth do
- dig()
- end
- end
- -- turns the turtle around and gets him back to the center --
- local function goBack()
- turtle.turnLeft()
- turtle.turnLeft()
- for i=1, depth do
- turtle.forward()
- end
- end
- -- repeated mining process times length --
- for i=1, length do
- digMain()
- leftHole()
- goBack()
- rightHole()
- goBack()
- turtle.turnRight()
- turtle.down()
- end
Add Comment
Please, Sign In to add comment