Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mining = 10
- local minefuel = mining*2+2
- function fuelcheck()
- print("NowFuel")
- print(turtle.getFuelLevel())
- print("mining")
- print(mining)
- print("requiredFuel")
- print(minefuel)
- end
- fuelcheck()
- print("Refuel")
- for refuel=1,16 do
- turtle.select(refuel)
- turtle.refuel()
- end
- fuelcheck()
- if minefuel > turtle.getFuelLevel() then
- error('Not enough Fuel',turtle.getFuelLevel(),'/',minefuel)
- else
- print('currnet/required = ',turtle.getFuelLevel(),'/',minefuel)
- end
- fuelcheck()
- print("start")
- turtle.select(1)
- for totalmine=1,mining do
- turtle.dig()
- turtle.forward()
- turtle.placeDown()
- turtle.turnRight()
- turtle.place()
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.place()
- turtle.turnRight()
- turtle.digUp()
- end
- turtle.place()
- turtle.up()
- turtle.place()
- turtle.placeUp()
- turtle.turnLeft()
- turtle.place()
- turtle.turnRight()
- turtle.turnRight()
- turtle.place()
- turtle.turnRight()
- for mineback=2,mining do
- turtle.forward()
- turtle.turnLeft()
- turtle.place()
- turtle.turnRight()
- turtle.turnRight()
- turtle.place()
- turtle.turnLeft()
- turtle.placeUp()
- end
- turtle.down()
- turtle.turnRight()
- turtle.turnRight()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement