Guest User

adv

a guest
May 8th, 2013
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.57 KB | None | 0 0
  1. local function dig1()
  2. if turtle.detect() then
  3. turtle.dig()
  4. dig1()
  5. else
  6. turtle.turnLeft()
  7. dig5()
  8. end
  9.  
  10. local function dig2()
  11. if turtle.detect() then
  12. turtle.dig()
  13. dig2()
  14. else
  15. turtle.turnLeft()
  16. turtle.turnLeft()
  17. dig1()
  18. end
  19. local function dig3()
  20. if turtle.detectUp() then
  21. turtle.digUp()
  22. dig3()
  23. else
  24. turtle.turnleft()
  25. dig2()
  26. end
  27. local function dig4()
  28. if turtle.detectDown() then
  29. turtle.digDown()
  30. dig4()
  31. else
  32. dig3()
  33. end
  34. local function dig5()
  35. if turtle.detect() then
  36. turtle.dig()
  37.  else
  38.  turtle.forward()
  39.  dig4()
  40. end
  41. end
  42. end
  43. end
  44. end
  45. end
  46. dig5()
Advertisement
Add Comment
Please, Sign In to add comment