Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- args = {args}
- print("Make sure you've got a chest in my 16th slot! VERY IMPORTANT!")
- dist = tonumber(args[1])
- function ask4Chest()
- write("Do you have a chest in the 16th slot? y/n")
- local i = read()
- if i == "y" then
- tunnel("go")
- else
- tunnel("no")
- end
- end
- function tunnel(action)
- local x = 0
- if action == "go" then
- print("I receive you loud and clear, I will tunnel "..tostring(dist).." blocks and then come back!")
- for i = tonumber(dist) do
- print "Mining."
- turtle.dig()
- turtle.forward()
- turtle.digUp()
- turtle.turnLeft()
- turtle.dig()
- turtle.up()
- turtle.dig()
- turtle.turnRight()
- turtle.dig()
- turtle.down()
- turtle.dig()
- turtle.turnLeft()
- x = x+1
- if x == 45 then
- turtle.select(16)
- turtle.turnRight()
- turtle.turnRight()
- turtle.place()
- for x = 15 do
- turtle.select(x)
- turtle.drop(turtle.getItemCount(x))
- end
- end
- end
- turtle.turnRight()
- turtle.turnRight()
- for i in dist do
- turtle.forward()
- end
- else
- print("I told you I needed a chest, damnit.")
- ask4Chest()
- end
- end
- ask4Chest()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement