Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---Strip Mine---
- --fuel in 1, Chests in 2
- -- Create the function for refueling
- function checkFuel()
- if turtle.getFuelLevel() <= 10 then
- turtle.select(1)
- turtle.refuel(1)
- turtle.select(1)
- end --if
- end --checkFuel()
- -- Create the function for unloading
- function unload()
- for slot = 3, 16 do
- turtle.select(slot)
- turtle.dropDown()
- end --for
- end --unload()
- -- Create the function for checkingInventory
- function checkInv(steps)
- goBack = false
- turtle.select(3)
- if turtle.getItemCount() > 0 then
- goBack = true
- end --if
- if goBack == true then
- turtle.turnLeft()
- turtle.turnLeft()
- for i = 1, steps do
- checkFuel()
- turtle.forward()
- end --for
- end --if
- unload()
- end --checkInv()
- -- Create the function for mining one
- function digOne(steps)
- checkInv(steps)
- turtle.dig()
- checkFuel()
- turtle.forward()
- turtle.digUp()
- end --digOne()
- function run(number_tunnel, length_tunnel)
- for tunnel = 1,number_tunnel do
- turtle.digDown()
- turtle.select(2)
- turtle.placeDown()
- vorwaerts = 0
- for steps = 1, length_tunnel do
- digOne(vorwaerts)
- vorwaerts = vorwaerts + 1
- end --for
- turtle.turnLeft()
- turtle.turnLeft()
- for k = 1, vorwaerts do
- checkFuel()
- turtle.forward()
- end --for
- unload()
- turtle.turnRight()
- digOne(vorwaerts)
- digOne(vorwaerts)
- digOne(vorwaerts)
- turtle.turnRight()
- end --for
- end --function
- -- Main script
- print("Input tunnel length:")
- local length = read()
- print("Tunnel quantity")
- local quantity = read()
- print("starting excavation...")
- run(quantity, length)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement