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

Red wood tree farmer program "help"

Started by chrisxxx, 31 December 2012 - 06:06 PM
chrisxxx #1
Posted 31 December 2012 - 07:06 PM
turtle.dig() turtle.forward()
turtle.dig()
turtle.select(1)

while turtle.detectUp() == true do
turtle.digUp() turtle.up()
turtle.dig()
end
turtle.turnRight() turtle.dig()
turtle.forward() turtle.turnLeft()
turtle.dig()
turtle.select(16)
while turtle.compareDown(16) == false do
turtle.digDown() turtle.down()
turtle.dig()
end
turtle.select(2) turtle.place()
turtle.turnLeft() turtle.forward()
turtle.turnRight() turtle.place()
turtle.turnRight() turtle.place()
turtle.turnLeft() turtle.back()
turtle.place() turtle.select(3)
sleep(420.00)
turtle.place()


so basically you see how basic my knowledge is. i place the turtle on the bottom left of the redwood tree so he digs the bottom left corner moves forward and digs the top left corner and goes up as high as there is a block. then goes down the other side gets the bottom and stop because he detects dirt then places the saplings and ends up back where i placed him and waits for leaves to decay before using the bonemeal to grow a new one. then im stuck. how would i make him redo the entire script? and just keep repeating until he runs out of saplings and or space?…help please



FYI- 1st slot is empty, 2nd slot is saplings 3rd is bonemeal and the 16th is a dirt block. then rest are empty
ChunLing #2
Posted 31 December 2012 - 11:13 PM
Put the whole thing inside of a while turtle.getItemCount(2) > 0 and turtle.getItemCount(15) < 64 do…end loop.
PixelToast #3
Posted 01 January 2013 - 04:25 AM
turtle.compareDown(16) == false
could just be
not turtle.compareDown(16)
and
turtle.detectUp() == true
could be
turtle.detectUp()

if it is not false or nil then its treated as true