Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Stripmine
- --This sends a turtle down to bedrock mineing below and infront as it goes down.
- --It then moves forward 2
- --and mines back up to the same level
- --This will create a 1X4 hole to bedrock
- function fuel()
- while turtle.getFuelLevel() < 500 do
- print("Looking for Fuel")
- for slot = 1,16 do
- if turtle.getFuelLevel() < 500 then
- turtle.select(slot)
- repeat
- until turtle.refuel(1) == false or turtle.getFuelLevel() > 500
- end
- end
- end
- end
- function digdown()
- local distance = 0
- repeat
- distance = distance + 1
- turtle.suck()
- turtle.dig()
- turtle.suckDown()
- turtle.digDown()
- until turtle.down() == false
- return distance
- end
- function moveforward(distance)
- repeat
- turtle.dig()
- if turtle.forward() then
- distance= distance - 1
- else
- turtle.digUp()
- turtle.up()
- end
- until distance== 0
- end
- function digup(distance)
- repeat
- distance= distance - 1
- turtle.suck()
- turtle.dig()
- turtle.digUp()
- turtle.up()
- until distance <= 1
- end
- function freeslots()
- local free = 0
- for slot = 1,16 do
- turtle.select(slot)
- if turtle.getItemCount == 0 then
- free = free + 1
- end
- end
- return free
- end
- local depth
- repeat
- fuel()
- depth = digdown()
- moveforward(2)
- digup(depth)
- moveforward(2)
- until freeslots() < 5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement