MiStAWaFFlEZZ

digger v2

Sep 24th, 2012
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local function GetDistance()
  2.     print("Hello! How far should I dig?")
  3.     return read()
  4. end
  5.  
  6. local Dist = GetDistance()
  7.  
  8. print("Thanks! Digging"..Dist.." Blocks!")
  9. local i = 1
  10. repeat
  11.  write("level #")
  12.  write(i)
  13.  write(" of 64 \n")
  14.  --STAGE1
  15.  if turtle.detect()
  16.  then
  17.   turtle.dig()
  18.   turtle.down()
  19.   if turtle.detect()
  20.   then
  21.    turtle.dig()
  22.    turtle.forward()
  23.    turtle.up()
  24.    i = i + 1
  25.   else
  26.   end
  27.  else
  28.  print("Mining Run Complete!")
  29.  i = 64
  30.  end
  31. until i == Dist
Advertisement
Add Comment
Please, Sign In to add comment