Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.clear()
- term.setCursorPos(1,1)
- print("Turtle Miner v.1.3")
- print("")
- print("Die Turtle wird einen 3x3 Gang graben")
- print("Wie lange graben?")
- local length = read()
- local torch = 0
- local left = length
- function checkFuel()
- if turtle.getFuelLevel() < 15 then
- turtle.select(1)
- turtle.refuel()
- end
- end
- function digBlock()
- while turtle.detect() do
- turtle.dig()
- os.sleep(0.5)
- end
- end
- function digBlockUp()
- while turtle.detectUp() do
- turtle.digUp()
- os.sleep(0.5)
- end
- end
- function status()
- print("[Slot 1] Treibstoff [Slot 2] Fackeln")
- print("")
- print("Reihen uebrig : "..left)
- print("Treibstoff : "..turtle.getFuelLevel())
- end
- function digLayer()
- for i=1,2 do
- turtle.turnLeft()
- digBlock()
- turtle.turnRight()
- turtle.turnRight()
- digBlock()
- turtle.turnLeft()
- digBlockUp()
- turtle.up()
- end
- turtle.turnLeft()
- digBlock()
- turtle.turnRight()
- turtle.turnRight()
- digBlock()
- if torch == 8 then
- turtle.forward()
- turtle.turnRight()
- turtle.forward()
- turtle.select(2)
- turtle.placeDown()
- turtle.back()
- turtle.turnLeft()
- turtle.back()
- torch = 0
- end
- turtle.turnLeft()
- turtle.down()
- turtle.down()
- torch = torch + 1
- left = left - 1
- end
- for i=1,length do
- turtle.dig()
- turtle.forward()
- term.clear()
- term.setCursorPos(1,1)
- checkFuel()
- status()
- digLayer()
- end
- term.clear()
- term.setCursorPos(1,1)
- checkFuel()
- status()
- turtle.turnRight()
- turtle.turnRight()
- for i=0,length-3 do
- turtle.forward()
- end
- term.clear()
- term.setCursorPos(1,1)
- checkFuel()
- status()
- print("Fertig!")
Advertisement
Add Comment
Please, Sign In to add comment