Advertisement
Guest User

lol12

a guest
Apr 24th, 2014
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local mined = 0
  2.  
  3. function back()
  4.  turtle.turnRight()
  5.  turtle.turnRight()
  6.  turtle.up()
  7.  for i = 1,mined do
  8.   for i = 1,10 do
  9.    turtle.forward()
  10.   end
  11.  end
  12.  turtle.turnLeft()
  13.  turtle.turnLeft()
  14.  for i = 1,ypos do
  15.   turtle.up()
  16.  end
  17. end
  18.  
  19. function torch()
  20.  turtle.select(1)
  21.  turtle.turnRight()
  22.  turtle.turnRight()
  23.  turtle.place()
  24.  turtle.turnLeft()
  25.  turtle.turnLeft()
  26. end
  27.  
  28. function mine()
  29.  turtle.dig()
  30.  turtle.forward()
  31.  turtle.digUp()
  32.  mined = mined + 1
  33. end
  34.  
  35. function checkinv()
  36.  if turtle.getItemCount(16) > 1 then
  37.   back()
  38.  end
  39. end
  40.  
  41. print("Put some torches in my first slot, please.")
  42. sleep(3)
  43. --print("On which Y level are we?")
  44. --local input = read()
  45. --local ypos = input-12
  46. --write("OK, then I will go: ")
  47. --write(ypos)
  48. --write(" blocks down.")
  49. print("Starting...")
  50. --for i = 1,ypos do
  51. -- turtle.digDown()
  52. -- turtle.down()
  53. --end
  54. --turtle.up()
  55. while true do
  56.  for i = 1,10 do
  57.   mine()
  58.  end
  59.  torch()
  60.  if turtle.getItemCount(16) > 1 then
  61.   back()
  62.  end
  63. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement