Guest User

dig.lua

a guest
Aug 22nd, 2019
70
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function forward(stp)
  2.  for c=1,stp do
  3.   while turtle.detect() do
  4.   turtle.dig()
  5.   sleep(1)
  6.   end
  7.  turtle.forward()
  8.  turtle.digUp()
  9.  turtle.digDown()
  10.  end
  11. end
  12.  
  13. function tleft(stp)
  14.  for c=1,stp do
  15.  turtle.turnLeft()
  16.  end
  17. end
  18.  
  19. function tright(stp)
  20.  for c=1,stp do
  21.  turtle.turnRight()
  22.  end
  23. end
  24.  
  25.  
  26. forward(6)
  27. tleft(1)
  28. forward(2)
  29. tleft(1)
  30. forward(4)
  31. tleft(1)
  32. forward(4)
  33. tleft(1)
  34. forward(4)
  35. tleft(1)
  36. forward(3)
  37. tleft(1)
  38. forward(3)
  39. tleft(1)
  40. forward(2)
  41. tleft(1)
  42. forward(2)
  43. tleft(1)
  44. forward(1)
  45. tleft(1)
  46. forward(5)
  47.  
  48. turtle.up()
RAW Paste Data