Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local mined = 0
- function back()
- turtle.turnRight()
- turtle.turnRight()
- turtle.up()
- for i = 1,mined do
- for i = 1,10 do
- turtle.forward()
- end
- end
- turtle.turnLeft()
- turtle.turnLeft()
- for i = 1,ypos do
- turtle.up()
- end
- end
- function torch()
- turtle.select(1)
- turtle.turnRight()
- turtle.turnRight()
- turtle.place()
- turtle.turnLeft()
- turtle.turnLeft()
- end
- function mine()
- turtle.dig()
- turtle.forward()
- turtle.digUp()
- mined = mined + 1
- end
- function checkinv()
- if turtle.getItemCount(16) > 1 then
- back()
- end
- end
- print("Put some torches in my first slot, please.")
- sleep(3)
- --print("On which Y level are we?")
- --local input = read()
- --local ypos = input-12
- --write("OK, then I will go: ")
- --write(ypos)
- --write(" blocks down.")
- print("Starting...")
- --for i = 1,ypos do
- -- turtle.digDown()
- -- turtle.down()
- --end
- --turtle.up()
- while true do
- for i = 1,10 do
- mine()
- end
- torch()
- if turtle.getItemCount(16) > 1 then
- back()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement