Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tArgs = {...}
- local count = 0
- local Version = "V2"
- local torch = 10
- 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 == torch then
- turtle.select(15)
- turtle.turnRight()
- turtle.place()
- turtle.turnLeft()
- turtle.select(1)
- count = 0
- end
- end
- function checkInv()
- for i = 1, 13 do
- if turtle.getItemCount(i) ~= 64 then
- turtle.select(16)
- else
- emptyInv()
- end
- end
- end
- function emptyInv()
- 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()
- end
- if #tArgs ~= 1 then
- print("Useage advTunnel <dist>")
- return
- end
- print("Version: "..Version.." \nPlease make Sure to have a Enderchest in Slot 14 Torches in Slot 15 and Fuel in Slot 16")
- print("You have chosen to go "..tArgs[1].." blocks ahead")
- for i = 1, tArgs[1] do
- fuelCheck()
- checkInv()
- while not turtle.forward() do
- turtle.dig()
- sleep(0.6)
- end
- turtle.turnLeft()
- turtle.dig()
- turtle.digUp()
- if not turtle.up() then
- turtle.digUp()
- end
- 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
- emptyInv()
- turtle.back()
- turtle.back()
- term.clear()
- term.setCursorPos(1,1)
Advertisement
Add Comment
Please, Sign In to add comment