Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Program:
- -- clearDebris
- -- to be used on the miner created by DireWolf20 instead of using a force field
- -- Created by
- -- Liktorn
- -- total length of the miner
- minerLength = 16
- -- position of the turtle (from the left)
- turtlePos = 3
- -- turtle distance from possible debris
- distDebris = 2
- -- moves the turtle i steps, destroying blocks on the way
- function moveDig(i)
- while i > 0 do
- turtle.dig()
- turtle.forward()
- i = i - 1
- end
- end
- -- moves the turtle i steps
- function move(i)
- while i > 0 do
- turtle.forward()
- i = i - 1
- end
- end
- -- turn the turtlr around
- function turnAround()
- turtle.turnRight()
- turtle.turnRight()
- end
- -- move the turtle one block infront of miner and breaking the block in that space
- -- and dig and move down
- moveDig(distDebris)
- turtle.dig()
- turtle.forward()
- turtle.digDown()
- turtle.down()
- -- dig all the way to the right
- turtle.turnRight()
- moveDig(minerLength - turtlePos)
- -- dig, move down and turn
- turtle.digDown()
- turtle.down()
- turnAround()
- -- dig all the way to the left
- moveDig(minerLength - 1)
- -- dig, move up and turn
- turtle.digUp()
- turtle.up()
- turnAround()
- -- dig and move to turtle to the chest
- moveDig(turtlePos - 1)
- turtle.up()
- turtle.turnRight()
- turtle.forward()
- -- dump collected debris in chest below
- for i = 2, 16, 1 do
- turtle.select(i)
- turtle.dropDown()
- end
- -- move turtle to it's designated place
- move(3)
- turnAround()
- --place the chest in slot 1, then the platform is ready to be moved
- turtle.select(1)
- turtle.place()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement