Posted 01 January 2013 - 05:15 AM
I'm probably just being stupid, but i would like my (felling) turtle to move everything from slot 1 to slot 3( or any other), except for two, but i can't find anywhere how i can do that. What i figured is that i needed to do turtle.getItemCount(1) and then subtract 2 from that, but i can't find how I'm supposed to make it subtract…
(just for fun, ill post my code beneath - not that it matters for this question)
while true do
if turtle.compare() == true then
turtle.select(1)
turtle.refuel(1)
end
while turtle.compare() == true do
turtle.dig()
turtle.digUp()
turtle.up()
end
– print("The tree has been cut down")
while turtle.down() == true do
turtle.down()
end
– print("Back to ground level")
turtle.select(2)
turtle.place()
turtle.select(1)
end
(just for fun, ill post my code beneath - not that it matters for this question)
while true do
if turtle.compare() == true then
turtle.select(1)
turtle.refuel(1)
end
while turtle.compare() == true do
turtle.dig()
turtle.digUp()
turtle.up()
end
– print("The tree has been cut down")
while turtle.down() == true do
turtle.down()
end
– print("Back to ground level")
turtle.select(2)
turtle.place()
turtle.select(1)
end