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

Help me write mining program of my dreams

Started by NuZz, 15 April 2013 - 06:11 AM
NuZz #1
Posted 15 April 2013 - 08:11 AM
Hello
I want to ask a help from programers to write a mining program of my dreams :D/>
I want restart my world and begin mining with turtle that can place torches refuel (taking coal and torches from ender chest ) and send back items with ender chest and can mining like this pattern


and I have started some programing (coping what I like from other programs :D/> )


function refuel()
local fuellevel = turtle.getFuelLevel()
   if fuellevel<500 then
	turtle.digUp()
	  turtle.select(2)
	 turtle.placeUp()
	  turtle.suck()
	  turtle.refuel()
	  turtle.dig()
	  turtle.select(1)
	  print(fuellevel)
   end
end
function chest()
local item = turtle.getItemCount(16)
   if item>0 then
turtle.digUp()
turtle.select(1)
turtle.placeUp()
for i = 4, 16 do
turtle.select(i)
if not turtle.drop() then
for i = 4, 16 do			  
turtle.select(i)
turtle.drop()
	  end
	end
  end
end
end
function torches()
local item = turtle.getItemCount(3)
   if item<5 then
turtle.digUp()
	  turtle.select(2)
	
	  turtle.placeUp()
	  turtle.select(3)
	  turtle.suck()
	  turtle.placeDown()
	  turtle.select(3)
	  turtle.drop()
	  turtle.digUp()
		   turtle.select(1)
   else
	  turtle.select(3)
	  turtle.placeDown()
	  turtle.select(1)
   end
end

function gravel()
  while not turtle.forward() do
  if turtle.detect() then
	turtle.dig()
  else
	turtle.attack()			  
	end
  end
end

Sorry for my bad English :)/>
Dlcruz129 #2
Posted 15 April 2013 - 02:54 PM
What's the problem?
Sammich Lord #3
Posted 15 April 2013 - 02:56 PM
What's the problem?
He is requesting people help him with the "Mining program of his dreams".
Most people would say "We are not your code monkies.". But since you have some code done somebody may help you.
The_Awe35 #4
Posted 15 April 2013 - 04:06 PM
That mining pattern is very inefficient. I would suggest strip mining in a branch formation.

——-|||————- ||| = main branch
——-|||————- - = sub branch
——-|||———– put 3 blocks in between each sub-branch for good efficiency
—— |||————
——-||| ———