Advertisement
maxtorcd55

tree

Mar 27th, 2015
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. local function fuelCheck()
  2. print(turtle.getFuelLevel())
  3. if turtle.getFuelLevel() < 50 then
  4. turtle.select(16)
  5. turtle.refuel()
  6. print(turtle.getFuelLevel())
  7. end
  8. end
  9.  
  10.  
  11. local function startpos()
  12.  
  13. while (not rs.getInput("bottom")) do
  14. while not turtle.down() do turtle.digDown() end
  15. end
  16. end
  17.  
  18. local function replant()
  19. turtle.select(1)
  20. turtle.dig()
  21. turtle.place()
  22. end
  23.  
  24. local function cut()
  25. while (not rs.getInput("top")) do
  26. turtle.dig()
  27. while not turtle.up() do turtle.digUp() end
  28. end
  29. end
  30.  
  31. local function checktree()
  32. while (turtle.up() and turtle.up()) do
  33. startpos()
  34. sleep(120)
  35. end
  36. end
  37.  
  38.  
  39. while true do
  40. fuelCheck()
  41. startpos()
  42. checktree()
  43. cut()
  44. startpos()
  45. replant()
  46. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement