Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function checkFuel()
- if turtle.getFuelLevel() < 1 then
- turtle.select(1)
- turtle.refuel(1)
- end
- end
- local function invCheck()
- if turtle.getItemCount(16) ~= 0 then
- turtle.select(2)
- while turtle.detectUp() do
- turtle.digUp()
- end
- turtle.placeUp()
- for i=3, 16 do
- turtle.select(i)
- turtle.dropUp()
- end
- turtle.select(3)
- end
- end
- local function moveForward()
- checkFuel()
- turtle.digUp()
- turtle.digDown()
- while turtle.forward() == false do
- turtle.dig()
- turtle.attack()
- invCheck()
- end
- end
- print("Welcome at the program for easy ores and minerals!")
- print("Go stand on y = 14 when F3 is pressed.")
- print("Jump up and place turtle under you.")
- print("Put a stack of fuel in the first slot, put the output enderchest in the second slot and put the fuel input chest in the third slot.")
- print(" ")
- print("The turtle will stop when you unload the chunks, when you logout and when the turtle is terminated.")
- print("After you put in all the slots that are described earlier, press ENTER to start.")
- while read()=="" do
- while true do
- for i=1, 4 do
- for j=1, 15 do
- moveForward()
- end
- if i~= 4 then
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.digUp()
- for k=1, 3 do
- checkFuel()
- while turtle.down() == false do
- turtle.digDown()
- turtle.attackDown()
- invCheck()
- end
- end
- end
- end
- turtle.turnLeft()
- moveForward()
- turtle.turnLeft()
- for l=1, 9 do
- checkFuel()
- while turtle.up() == false do
- turtle.digUp()
- turtle.attackUp()
- invCheck()
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement