Sayomie550

Untitled

Jul 15th, 2012
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. local standby = 0
  2. local tree = 0
  3. local drop = 0
  4. local wait = 0
  5.  
  6. while turtle.detectDown() do
  7.  
  8. while redstone.getInput("back", true) do
  9. standby = 0
  10. tree = tree + 1
  11. drop = drop + 1
  12. wait = 0
  13.  
  14. if wait > 0 then
  15. print( ..wait" Seconds In Standby Mode" )
  16. print( "Starting Lumber Sequence" )
  17. end
  18.  
  19. print( "Chopping Tree Number "..tree )
  20.  
  21. while turtle.detect() do
  22. turtle.dig()
  23. turtle.forward()
  24. end
  25.  
  26. while turtle.detectUp() do
  27. turtle.digUp()
  28. turtle.up()
  29. end
  30.  
  31. while not turtle.detectUp() and not turtle.detectDown() do
  32. turtle.down()
  33. end
  34.  
  35. redstone.setOutput("left", false)
  36.  
  37. turtle.back()
  38. turtle.select(1)
  39. turtle.place(1)
  40.  
  41. redstone.setOutput("left", true)
  42.  
  43. if drop == 5 then
  44. print( "Depositing Lumber to Obby Pipe" )
  45.  
  46. turtle.turnRight()
  47.  
  48. turtle.select(2)
  49. turtle.drop()
  50.  
  51. turtle.turnLeft()
  52.  
  53. drop = 0
  54. end
  55.  
  56. end
  57.  
  58. while not redstone.getInput("back", true) do
  59.  
  60. if standby == 0 then
  61. print( "Standby Mode" )
  62. standby = standby + 1
  63. tree = 0
  64. else
  65. wait = wait + 1
  66. sleep(1)
  67. end
  68.  
  69. end
  70.  
  71. end
  72.  
  73. while not turtle.detectDown() do
  74. print( "Place a block under the turtle" )
  75. end
Advertisement
Add Comment
Please, Sign In to add comment