I've never made a turtle script (or used a turtle for anything except "craft") but I know they're a great resource/way to do things so I wanted to set one up to do a very simple tree farm.
Since I've never programmed I went on the tutorial site/wiki and read up a bit (nothing in depth, I'm at school so dont have the time) and from what I learned I went to the Turtle Lumberjack and Advanced Lumberjack script pages.
I took some code and pieced it together with others taht I wrote from viewing and absorbing information and came up with this and I was wondering if it would work
TL;DR: Will that code work for a very basic tree farm (place sapling, bonemeal it, break tree, repeat)?
Any help appreciated.
Since I've never programmed I went on the tutorial site/wiki and read up a bit (nothing in depth, I'm at school so dont have the time) and from what I learned I went to the Turtle Lumberjack and Advanced Lumberjack script pages.
I took some code and pieced it together with others taht I wrote from viewing and absorbing information and came up with this and I was wondering if it would work
Code:
print ("Saplings go into slot 1, Bonemeal into slot 2, and Logs into slot 3.")
print ("How many trees to create and harvest?")
local x = io.read()
local sapling, bonemeal, log = 1, 2, 3
for i = 0, x do
turtle.back()
turtle.select(sapling)
turtle.place
turtle.select(bonemeal)
turtle.place
turtle.select(log)
if turtle.compare() then
turtle.dig()
turtle.forward()
while turtle.detectUp do
turtle.digUp()
turtle.up()
end
while not turtle.detectDown() do
turtle.down()
end
end
end
Any help appreciated.