Very simple bit of code. For 1x1 Trees you can use something like this:
Code:
turtle.dig()
turtle.forward()
while turtle.digUp() do
turtle.up()
end
while turtle.down() do
end
For redwoods (2x2, don't know of any 4x4 trees)
Code:
local height = 0
turtle.dig()
turtle.forward()
turtle.dig()
while turtle.digUp() do
turtle.up()
turtle.dig()
height = height + 1
end
turtle.turnRight()
turtle.dig()
turtle.forward()
turtle.turnLeft()
turtle.dig()
while height > 0 do
height = height - 1
turtle.digDown()
turtle.down()
turtle.dig()
end
Be aware that this code is untested, should work fine though. It's very crude and specific to the situation, but it will cot down trees for ya.
Make sure that your turtle has enough fuel and is capable of digging (Mining Turtle or similar). Place the turtle in front of the tree, for 2x2s on the left side. Then run the program.
EDIT: Forgot to decrease the height, fixed now. Don't want your turtle to dig to bedrock, right? =)