Jump to content




Fully automated 2x2 Tree Chopper

turtle utility

7 replies to this topic

#1 oWave

  • Members
  • 23 posts

Posted 28 June 2013 - 09:06 AM

-- Original Post:
Hello,
I just wrote my first program. It worked really well, so I thought, I should release it.

I know there are many tree choppers out there, but I only want some feedback.

This is currently unfinished. It'll be full-automatic later.

--

No Bonemeal-Version v2:
Spoiler


#2 unobtanium

  • Members
  • 505 posts

Posted 28 June 2013 - 05:09 PM

Hey there :D
it is allways nice to see a new tree chopper ;D There arent as many out there as you may think! :P

I looked quickly over the code and found some stuff:

Spoiler

Keep on it! Looks great for your first program :D

#3 oWave

  • Members
  • 23 posts

Posted 29 June 2013 - 05:56 AM

Thanks for that reply.
I used tonumber(turtle.getItemCount(16)) because without it, it was only a string.
I will use os.pullEvent. Thanks for that. Just didn't know it was there.
And prefueling is a little bit difficult, because the trees aren't at the same size every time. I don't want to create function for every movement I do. At least not in this program.

#4 unobtanium

  • Members
  • 505 posts

Posted 29 June 2013 - 06:45 AM

turtle.getItemCount() doesnt return a string for me...
If you know the max height of fir trees (around 50) you can go and say, that you need 200 fuel in the turtle before going to chop the next tree. In your case you are checking 79 times for nothing and once out of 80 its returns true and refuels.
Creating functions for movement is allways a good idea, because you can let the turtle handle stuff in its way:
function forward()
 while not turtle.forward() do sleep(0.5) end
 checkFuel()
end


#5 oWave

  • Members
  • 23 posts

Posted 29 June 2013 - 03:20 PM

I'll think about this. But I'm to lazy to rewrite nerly everything. Going to do that if I'm bored. Also I use checkFuel so often, because it takes the wood blocks to refuel. No addition fuel needed here. I'll post how to set this up when I'm done with it

#6 oWave

  • Members
  • 23 posts

Posted 30 June 2013 - 10:53 AM

Just added another version. This time it's nearly automated.
I'm still working on it

#7 oWave

  • Members
  • 23 posts

Posted 10 July 2013 - 02:28 PM

I updated the no-bonemeal version. The full one should be ready soon.
It's nearly fully rewritten and there's no complex stuff in it. I think this are good conditions if you're new and want to rewrite a program.

I also removed the other version, because it didn't work

#8 unobtanium

  • Members
  • 505 posts

Posted 10 July 2013 - 02:37 PM

Nice to see you still working on it :D





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users