Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.clear()
- term.setCursorPos(1,1)
- print("Conduit Placer v.1.0")
- print("")
- print("Die Turtle gräbt einen 1x3 Gang")
- print("Und plaziert oben Conduits")
- print("")
- print("Enter drücken...")
- local temp = read()
- term.clear()
- term.setCursorPos(1,1)
- print("[Slot 1] Treibstoff")
- print("[Slot 2] Conduit")
- print("[Slot 3] Fackeln")
- print("")
- print("Wie lange graben?")
- local length = tonumber(read())
- if (not length) then
- term.clear()
- term.setCursorPos(1,1)
- print("")
- print("gute arbeit jens")
- os.sleep(10)
- os.reboot()
- end
- if (length > 64) then
- term.clear()
- term.setCursorPos(1,1)
- print("Die Länge ist größer als ein Stack!")
- print("Nach 64 werden andere Blöcke platziert")
- print("")
- print("Wirklich fortfahren? (y/n)")
- local answer = read()
- if (answer == "y" or answer == "Y") then
- --nichts
- else
- term.clear()
- term.setCursorPos(1,1)
- print("Turtle wird sich neustarten...")
- os.sleep(3)
- os.reboot()
- end
- end
- 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 digBlockDown()
- while turtle.detectDown() do
- turtle.digDown()
- os.sleep(0.5)
- end
- end
- function status()
- term.clear()
- term.setCursorPos(1,1)
- print("[Slot 1] Treibstoff")
- print("[Slot 2] Conduit")
- print("[Slot 3] Fackeln")
- print("")
- print("Reihen uebrig : "..left)
- print("Treibstoff : "..turtle.getFuelLevel())
- end
- checkFuel()
- digBlockUp()
- turtle.up()
- for i=1,length do
- digBlock()
- turtle.forward()
- digBlockUp()
- digBlockDown()
- turtle.select(2)
- turtle.placeUp()
- if (torch == 8) then
- torch = 0
- turtle.select(3)
- turtle.placeDown()
- else
- torch = torch + 1
- end
- checkFuel()
- status()
- left = left - 1
- end
- turtle.turnRight()
- turtle.turnRight()
- for i=0,length-2 do
- turtle.forward()
- end
- turtle.down()
- term.clear()
- term.setCursorPos(1,1)
- print("Fertig!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement