Posted 25 March 2014 - 09:04 AM
I'm working on a really awesome idea I had for a branch mine involving a few different mods including Railcraft, Buildcraft and obviously Computercraft. It'll be as visually realistic as I can make it, with wooden beams and a minecart train system running through the whole labyrinth of tunnels. I've got everything mostly figured out, except the tunneling program for the mining turtles.
What I need: A program that digs a 3x1 branch tunnel (3 tall, not wide) 100 blocks long and accounts for gravel. That's really all it needs to do, as the mine is organized in a way that torches need to be placed manually, and I'm going to have to run down the tunnels to pick up the exposed ores in the walls anyway. It'll be at level 11 right above lava, so I mostly don't have to worry about that (I plan on pumping it out for power anyway). The turtles will mainly just be the hard labor force of digging the tunnel itself, then I can follow behind lighting it up and grabbing anything they miss. Bonus points if they can detect diamond and stop/pause everything so I can come by later with a fortune pick, or refuel in the middle of a job.They don't even have to turn around and come back when they're done, although that would be a really cool feature to have (more bonus points!).
My problem: I have very little knowledge of coding, and the little I do know has been an extremely slow and painful process to learn. After watching some tutorials, I at least mostly know how to navigate through the various menus of Computercraft, but the coding itself has proven to be a major stumbling block for this project, which I really want to see completed.
Any help getting this program working would be greatly appreciated, as I also have many other cool ideas for the surface world, most of which depend on the completion of this branch mine project, which is currently under construction.
EDIT: That was kind of stupid of me for not posting the code I had come up with so far. I'll do that now.
What I need: A program that digs a 3x1 branch tunnel (3 tall, not wide) 100 blocks long and accounts for gravel. That's really all it needs to do, as the mine is organized in a way that torches need to be placed manually, and I'm going to have to run down the tunnels to pick up the exposed ores in the walls anyway. It'll be at level 11 right above lava, so I mostly don't have to worry about that (I plan on pumping it out for power anyway). The turtles will mainly just be the hard labor force of digging the tunnel itself, then I can follow behind lighting it up and grabbing anything they miss. Bonus points if they can detect diamond and stop/pause everything so I can come by later with a fortune pick, or refuel in the middle of a job.They don't even have to turn around and come back when they're done, although that would be a really cool feature to have (more bonus points!).
My problem: I have very little knowledge of coding, and the little I do know has been an extremely slow and painful process to learn. After watching some tutorials, I at least mostly know how to navigate through the various menus of Computercraft, but the coding itself has proven to be a major stumbling block for this project, which I really want to see completed.
Any help getting this program working would be greatly appreciated, as I also have many other cool ideas for the surface world, most of which depend on the completion of this branch mine project, which is currently under construction.
EDIT: That was kind of stupid of me for not posting the code I had come up with so far. I'll do that now.
for i=1,25 do
turtle.dig()
turtle.forward()
turtle.dig()
turtle.digUp()
turtle.up()
turtle.dig()
turtle.digUp()
turtle.up()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.digDown()
turtle.down()
turtle.dig()
turtle.digDown()
turtle.down()
turtle.dig()
turtle.forward()
end
This is the code I've come up with so far with my tinkering. It would work just fine, except gravel screws it up. That's really the only problem that really NEEDS to be fixed. If anyone can figure out how to make it do any of those extra little things I mentioned before, I'd be extremely appreciative.Edited on 27 March 2014 - 01:37 AM