Posted 10 January 2013 - 05:38 AM
#UPDATED
Spoiler
local tArgs = {...}
local count = 0
function fuelCheck()
if turtle.getFuelLevel() < 50 then
-- print(tostring(turtle.getFuelLevel()))
turtle.select(16)
turtle.refuel(1)
turtle.select(1)
end
end
function placeTorch()
count = count + 1
-- print(tostring(count))
if count == 10 then
turtle.select(15)
turtle.turnRight()
turtle.place()
turtle.turnLeft()
turtle.select(1)
count = 0
end
end
for i = 1, tArgs[1] do
fuelCheck()
turtle.dig()
turtle.forward()
turtle.turnLeft()
turtle.dig()
turtle.digUp()
turtle.up()
turtle.dig()
turtle.digUp()
turtle.up()
turtle.dig()
turtle.turnRight()
turtle.turnRight()
turtle.dig()
turtle.down()
turtle.dig()
turtle.down()
turtle.dig()
turtle.turnLeft()
placeTorch()
end
turtle.select(14)
turtle.turnLeft()
turtle.place()
turtle.attack()
for i = 1,13 do
turtle.select(i)
turtle.drop()
end
turtle.select(14)
turtle.dig()
turtle.select(1)
turtle.turnRight()
turtle.back()
turtle.back()