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

Mineng Stairs !Bata!

Started by protexxi, 08 October 2012 - 09:14 PM
protexxi #1
Posted 08 October 2012 - 11:14 PM
put Ender chest in slot one.
Refuel before use!!
If fuel runs out it messes up refuels 3 every layer.
but fuel in slot 2

use command mine

the code


function checkFuel()
   shell.run ("refuel", "3")
   end
function moveback()
turtle.digDown ()
turtle.down ()
turtle.turnLeft()
turtle.dig()
turtle.turnRight()
turtle.turnRight()
turtle.dig()
turtle.turnLeft()
turtle.dig()
turtle.forward ()
turtle.digDown ()
turtle.down ()
shell.run("tunnel" , "10")
shell.run("go" , "back" , "8")
end
function chest()
turtle.select(1) turtle.placeUp()
turtle.select(3) turtle.dropUp()
turtle.select(4) turtle.dropUp()
turtle.select(5) turtle.dropUp()
turtle.select(6) turtle.dropUp()
turtle.select(7) turtle.dropUp()
turtle.select(8) turtle.dropUp()
turtle.select(9) turtle.dropUp()
turtle.select(10) turtle.dropUp()
turtle.select(11) turtle.dropUp()
turtle.select(12) turtle.dropUp()
turtle.select(13) turtle.dropUp()
turtle.select(14) turtle.dropUp()
turtle.select(15) turtle.dropUp()
turtle.select(16) turtle.dropUp()
turtle.select(1)
turtle.digUp()
end
print("Run for How Long?")
cho = io.read()
if tonumber(cho) ~= nil then
   nCho = tonumber(cho)
else
   print("Not a number.")
   error()
   end
   for x =1, nCho do
checkFuel()
moveback()
chest()
end


Coming Soon

Ender chest refueling.
Strip mining mode
Gps support
and much more
slango20 #2
Posted 12 October 2012 - 05:02 PM
Just use

function refuel()
local fuel = turtle.getFuelLevel()
If fuel < 100 then
turtle.select(1)
turtle.placeUp()
turtle.select(16)
turtle.pullUp(3)
turtle.refuel()
turtle.select(1)
turtle.digUp()
end
else
end
this will make it check fuel level, if it is less than 100 it will refuel 3 from an ender chest, just stick it in slot 1, to use, just stick it in a while loop