Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- c = peripheral.wrap("right")
- function fwd()
- while not turtle.forward() do
- turtle.dig()
- turtle.digDown()
- end
- end
- function goBack()
- while not turtle.forward() do
- turtle.attack()
- end
- end
- function Drop()
- turtle.down()
- turtle.select(1)
- turtle.drop()
- turtle.select(2)
- turtle.drop()
- turtle.select(3)
- turtle.drop()
- turtle.select(4)
- turtle.drop()
- turtle.select(5)
- turtle.drop()
- turtle.select(6)
- turtle.drop()
- turtle.select(7)
- turtle.drop()
- turtle.select(8)
- turtle.drop()
- turtle.select(9)
- turtle.drop()
- turtle.select(10)
- turtle.drop()
- turtle.select(11)
- turtle.drop()
- turtle.select(12)
- turtle.drop()
- turtle.select(13)
- turtle.drop()
- turtle.select(14)
- turtle.drop()
- turtle.select(15)
- turtle.drop()
- turtle.select(16)
- turtle.drop()
- turtle.select(1)
- turtle.up()
- end
- --MainProgram:
- term.write("How many blocks forward? :")
- blocks = read()
- term.write("How many times is it? : ")
- times = read()
- turtle.up()
- for i = 1, times do
- for i = 1, blocks do
- fwd()
- turtle.digDown()
- end
- turtle.turnRight()
- turtle.turnRight()
- for i = 1, blocks do
- goBack()
- end
- Drop()
- turtle.turnRight()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.turnRight()
- end
- term.clear()
- term.setCursorPos(14,7)
- textutils.slowPrint("Completed!")
- c.say("Program: Mining Done!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement