Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- shell.run("clear")
- print("Bitte in den letzten Slot Kohle, in den ersten Slot Baumaterial legen und hinter die Turtle eine Kiste stellen")
- print("\nWie weit? : ")
- local Eingabe = read()
- local Anzahl = Eingabe
- local Back = Eingabe
- shell.run("clear")
- if turtle.getFuelLevel()<1 then
- turtle.select(16)
- turtle.refuel(20)
- turtle.select(1)
- end
- if not tonumber(Anzahl) then
- print("Bitte eine Zahl eingeben")
- sleep(2)
- shell.run("clear")
- shell.run("mine")
- end
- while tonumber(Anzahl) > 0 do
- turtle.dig()
- turtle.forward()
- if not turtle.detectDown() then
- turtle.placeDown()
- end
- turtle.turnRight()
- if not turtle.detect() then
- turtle.place()
- end
- turtle.turnLeft()
- turtle.turnLeft()
- if not turtle.detect() then
- turtle.place()
- end
- turtle.digUp()
- turtle.up()
- if not turtle.detectUp() then
- turtle.placeUp()
- end
- if not turtle.detect() then
- turtle.place()
- end
- turtle.turnRight()
- turtle.turnRight()
- if not turtle.detect() then
- turtle.place()
- end
- turtle.down()
- turtle.turnLeft()
- Anzahl = Anzahl - 1
- Back = Back - 1
- if turtle.getItemCount(15) == 64 then
- Back = Back - 1
- while tonumber(Back) <= tonumber(Eingabe) do
- turtle.back()
- print("back"..Back)
- Back = Back + 1
- end
- turtle.turnRight()
- turtle.turnRight()
- turtle.select(2)
- turtle.drop()
- turtle.select(3)
- turtle.drop()
- turtle.select(4)
- turtle.drop()
- turtle.select(5)
- turtle.drop()
- turtle.select(6)
- turtle.drop()
- turtle.select(7)
- turtle.drop()
- turtle.select(8)
- turtle.drop()
- turtle.select(9)
- turtle.drop()
- turtle.select(10)
- turtle.drop()
- turtle.select(11)
- turtle.drop()
- turtle.select(12)
- turtle.drop()
- turtle.select(13)
- turtle.drop()
- turtle.select(14)
- turtle.drop()
- turtle.select(15)
- turtle.drop()
- turtle.turnRight()
- turtle.turnRight()
- while Back ~= Anzahl do
- turtle.forward()
- Back = Back - 1
- print("Back = "..Back)
- end
- end
- write(""..Anzahl)
- print(" more blocks "..Back)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement