nomnuggetnom

Untitled

Jun 13th, 2013
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. while true do
  2.  
  3. -- Check for a block and make sure not a sapling
  4. turtle.select(1)
  5. if turtle.detect() and not turtle.compare() then
  6. turtle.select(2)
  7. turtle.dig()
  8. turtle.forward()
  9.  
  10. -- Chop the tree
  11. while turtle.digUp() do
  12. turtle.up()
  13. end
  14.  
  15. -- Done chopping, return to the bottom
  16. while not turtle.detectDown() do
  17. turtle.down()
  18. end
  19.  
  20. -- Move onto the first barrel, deposit wood
  21. turtle.back()
  22. for i = 2,16 do
  23. turtle.select(i)
  24. if (turtle.compare(1)) then
  25. turtle.drop()
  26. else
  27. turtle.dropDown()
  28. end
  29. end
  30.  
  31. -- Move onto the second barrel, deposit saplings
  32. turtle.back()
  33. for i = 2,16 do
  34. turtle.select(i)
  35. if (turtle.compare(1)) then
  36. turtle.dropDown()
  37. else
  38. turtle.forward()
  39. end
  40.  
  41. -- Place a sapling
  42. turtle.select(1)
  43. turtle.place()
  44. end
  45.  
  46. else
  47. sleep(1)
  48. end
  49. end
Advertisement
Add Comment
Please, Sign In to add comment