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

Tap - Turtle help! [Lua]

Started by Skampi, 07 April 2013 - 12:47 AM
Skampi #1
Posted 07 April 2013 - 02:47 AM
Hey, i made a code for a tap turtle to go around a perfect rubber tree ( using the gravity gun ) and gathering all the sticky resign.
It works fine but i want to know if there is a way to detect if there is sticky resign or not, because i heard that when you tap a
non grown - place too often, it breaks the tree.

Here's the code so far :


function rubber()
  for i = 1, 6 do
	turtle.dig()
	sleep(0.2)
	turtle.up()
  end

  for i = 6, 1, -1 do
	turtle.down()
  end
end

function around()
  turtle.turnRight()
  turtle.forward()
  turtle.turnLeft()
  turtle.forward()
  turtle.turnLeft()
end

while true do

rubber()
around()
rubber()
around()
rubber()
around()
rubber()
around()
turtle.turnRight()
turtle.turnRight()
turtle.select(1)
turtle.drop()
turtle.turnRight()
turtle.turnRight()
sleep(600)

end

So far i only came up by making the sleeping longer, but i hope, there's a more efficient way to do it.
I hope you can help me,
sincerely,
Skampi. :)/>
Left #2
Posted 07 April 2013 - 03:00 AM
Sorry, no their isn't I have tried this before. I do not quite know how you can get around this.
Skampi #3
Posted 07 April 2013 - 03:04 AM
Damn it. I guess i have to leave it like that to wait very long to make sure the sticky resign regrew. :/
Left #4
Posted 07 April 2013 - 03:06 AM
Umm.. hmm. I think you can use industrial craft or something for this.
Skampi #5
Posted 07 April 2013 - 03:21 AM
Yeah, i know, but i think it's a lot more fun way to do it. :D/>
Left #6
Posted 07 April 2013 - 03:35 AM
I know!
The_Awe35 #7
Posted 07 April 2013 - 04:24 AM
I don't think it will break the tree. If you use the tree tap on a resin spot after already collecting there (when it is not orange, but a black hole) you may break the resin hole, and possibly get more resin from it.
Skampi #8
Posted 07 April 2013 - 04:30 AM
Collecting more resin by breaking the hole? That doesn't really sound legit in my opinion.
The_Awe35 #9
Posted 07 April 2013 - 04:29 PM
I dunno, go talk to the creator of IC2. Thats all I know.