Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tArgs={...}
- local count=0
- local Version="V1.1"
- local torch=5
- local t=turtle
- function fuelCheck()
- if t.getFuelLevel() ~= "unlimited" then
- t.select(16)
- while t.getFuelLevel() < 50 do
- t.refuel(1)
- end
- t.select(1)
- end
- end
- function Dig()
- while t.dig() do
- t.dig()
- sleep(0.6)
- end
- end
- function Up()
- while not t.up() do
- t.digUp()
- sleep(0.6)
- end
- end
- function Down()
- while not t.down() do
- t.digDown()
- sleep(0.6)
- end
- end
- function Forward()
- while not t.forward() do
- t.dig()
- sleep(0.6)
- end
- end
- function placeTorch()
- count = count + 1
- if count == torch then
- t.select(15)
- t.turnRight()
- t.place()
- t.turnLeft()
- t.select(1)
- count=0
- end
- end
- function checkInv()
- if t.getItemCount(13)~=0 then
- emptyInv()
- end
- end
- function emptyInv()
- t.select(14)
- t.turnLeft()
- t.place()
- t.attack()
- for i=1,13 do
- t.select(i)
- t.drop()
- end
- t.select(1)
- t.turnRight()
- end
- if #tArgs ~=1 then
- print("Useage MINE <dist>")
- return
- end
- print("Version: "..Version.."\nPlease make sure to have a Chest in slot 14 Torches in slot 15 and Fuel in slot 16")
- print("You have chosen to go "..tArgs[1].." blocks ahead. MADE BY DEMON_GOXA)")
- for i=1, tArgs[1] do
- fuelCheck()
- checkInv()
- Forward()
- t.turnLeft()
- Dig()
- t.digUp()
- Up()
- Dig()
- t.digUp()
- Up()
- Dig()
- t.turnRight()
- t.turnRight()
- Dig()
- Down()
- Dig()
- Down()
- Dig()
- t.turnLeft()
- placeTorch()
- end
- t.back()
- t.back()
- term.clear()
- term.setCursorPos(1,1)
Advertisement
Add Comment
Please, Sign In to add comment