This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Theray070696's profile picture

Simple turtle tree farm/noob tower remover

Started by Theray070696, 20 October 2012 - 12:35 PM
Theray070696 #1
Posted 20 October 2012 - 02:35 PM
This is just a simple tree farm program that I made. It also can remove noob towers (1x1 pilars).
Here is the code:

turtle.select(1)
while turtle.detectUp() do
   while not turtle.up() do
	  turtle.digUp()
   end
end
h = turtle.getItemCount(1)
for i = 0, h do
   turtle.down()
end
print("Blocks that were mined: ".. h)

here is the command for pastebin:
pastebin get YA77iB9n [insert name here]

How does it work?
Place your turtle below the tree or noob tower you want to cut down and run the program. Make sure it has enough fuel.

EDIT: Just changed it so it doesn't need any blocks to figure out what it's going to dig, and it mines any block above it. I can't test this atm, I'm currently on an iPod.
PixelToast #2
Posted 20 October 2012 - 02:47 PM
*friend makes a tower to look for his house*
*you place a turtle and destroy the tower*
xD lololo
ChunLing #3
Posted 20 October 2012 - 05:36 PM
Yeah, but he just gets a free ride down.

You'll encounter a problem removing older noob towers. They often have a grass block on top. Grass blocks are different from dirt blocks for compare.
Theray070696 #4
Posted 22 October 2012 - 01:26 PM
Yeah, but he just gets a free ride down.

You'll encounter a problem removing older noob towers. They often have a grass block on top. Grass blocks are different from dirt blocks for compare.
Just fixed that. Can't update pastebin though. I'll update it when I get back on my computer.