r/ComputerCraft • u/Chutny • Jun 13 '21
Less Stupid: Turtle Programs
Hello Everyone,
After avoiding coding in minecraft for a long time, i got curious about the turtles, since i lacked another way to Quarry.
I have now created scripts:
pastebin get z9WbNS89 Miner
pastebin get ViyCvtJ1 Planer
pastebin get xn7XEVrU Refuel
pastebin get wKfL4vr1 Module
pastebin get PAR9xAc5 Chop
As you can probably tell, this led to an appreciation for this mod and all the possibilities.
Feel free to ask questions and modify the code.
i will update the Pastebin, whenever i have a new stable version for release.
Currently the code isn't exactly optimized, but it is definitely acceptable for my needs.
(and in my biased opinion, more practical than a lot of other turtle scripts)
Less Stupid: Mining Turtle
My take on a semi intelligent mining turtle.
This Miner will leave minimal change in landscape, as it attempts to only mine valuable resources.(There is a easy to edit "Blacklist" for unwanted materials)
I like to let 2 run at the same time, then when they mine away, i check tunnels previously made and get anything they missed. (The script isn't perfect but it takes out 90% of the work)
Less Stupid: Refueler
Uses all consumable fuel in it's inventory to refuel.
Less Stupid: Planer
Removes all blocks within and above coordinates.
If you place a stack of blocks in the inventory, it will use them to create a flat floor.
Less Stupid: Module Builder
Creates modules for the Chopper script to use. Uses items in Top row.
Less Stupid: Chopper
After trees has been planted and grown the Chopper can harvest all of the wood for you.
Use Diorite bricks instead of cobble.
NOTES:
Known issues:
Sand and gravel f*cks up the turtles pathing algorithm*(might fix it in a complete revisit of the miner script)*
The Fuel required is way off.(Just give it a lot of fuel, the turtle keeps its fuel when picked up)
Chopper script may or may not only accept Cobble and/or Diorite Bricks.
3
u/[deleted] Jun 14 '21
Hey I found an easy way to fix the sand and gravel problem.
Edit: I see someone else mentioned something similar, but this is my personal approach since it's more modular.
Add a custom dig function called dig() for example to replace the normal dig function.
In it, have a loop that constantly checks if there is a block in front of it, if there is, dig it, if not, end the loop. Simple.
With this you can also modify it to dig only certain blocks by getting the block's ID or something I haven't done this in a while. But I know its possible. I made it so it instantly throws away anything it that wasn't requested by the person starting the script.