Sayomie550

Untitled

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