Advertisement
zetaCrafter

Turtle Choptree

Dec 12th, 2013
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.57 KB | None | 0 0
  1. --Script will chop a gree down from the base of tree up. Then will return to base.
  2. --Will only strip out 1 section of tree chunk at a time.
  3. --Excellent for chopping down those twilight oaks.
  4.  
  5. local count = 0
  6.  
  7. function checkfuel()
  8.   if turtle.getFuelLevel()<10 then
  9.     turtle.select(1)
  10.     turtle.refuel(10)
  11.   end
  12. end
  13.  
  14. if turtle.detect() then
  15.   turtle.dig()
  16. end
  17.  
  18. checkfuel() --check the fuel level. if needed refuel.
  19.  
  20. turtle.forward()
  21.  
  22. while turtle.detectUp() do
  23.   turtle.digUp()
  24.   checkfuel()
  25.   turtle.up()
  26.   count = count + 1
  27. end
  28.  
  29. for i = 1, count do
  30.   checkfuel()
  31.   turtle.down()
  32. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement