Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Automatische Drachenfarm - Draconic Evolution --
- -- Turtleprogramm von Thor_s_Crafter --
- -- Version 1.1--
- t = turtle
- local fuel = 0
- local anzahl = 0
- -- å9CberåBCft, wieviel Fuel vorhanden ist
- function checkFuel()
- while t.getFuelLevel() < 100 do
- fuelInput()
- end
- end
- -- Fragt den Benutzer, Fuel nachzufuellen
- function fuelInput()
- term.clear()
- term.setCursorPos(1,1)
- t.select(16)
- print("Bitte Fuel nachfuellen!")
- print("Fuel bitte in Slot 16 legen")
- write("Enter druecken...")
- local leer = read()
- t.refuel()
- fuel = t.getFuelLevel()
- end
- -- Nimmt die Items aus den Kisten
- function takeItems()
- t.turnLeft()
- t.select(5)
- t.suck(1)
- t.turnLeft()
- t.select(6)
- t.suck(1)
- t.turnLeft()
- t.turnLeft()
- end
- function takeCobble()
- t.turnRight()
- t.select(7)
- t.suck()
- t.turnLeft()
- end
- -- Droppt alle Items in die Kiste
- function dropItems()
- for i=1,16,1 do
- t.select(i)
- t.dropUp()
- end
- t.select(1)
- end
- -- LåA4uft los
- function placeApiary()
- for i=0,7,1 do
- t.forward()
- end
- -- Ei mitnehmen
- t.select(1)
- t.dig()
- -- Apiary platzieren
- t.select(5)
- t.place()
- --Bienen rein tun
- t.select(6)
- t.drop()
- for i=0,7,1 do
- t.back()
- end
- end
- function placeCobble()
- for i=0,9,1 do
- t.forward()
- end
- t.select(9)
- t.dig()
- t.down()
- -- Fackel entfernen
- t.select(2)
- t.digDown()
- t.down()
- t.back()
- t.turnRight()
- -- Cobblestone setzen
- t.select(7)
- t.placeDown()
- t.forward()
- t.placeDown()
- t.forward()
- t.turnLeft()
- for i=0,2,1 do
- for i=0,3,1 do
- t.placeDown()
- t.forward()
- end
- t.placeDown()
- t.turnLeft()
- end
- t.forward()
- t.placeDown()
- t.turnLeft()
- t.forward()
- t.turnRight()
- for i=0,3,1 do
- for i=0,1,1 do
- t.placeDown()
- t.dig()
- t.forward()
- end
- t.turnLeft()
- end
- t.forward()
- t.turnLeft()
- t.up()
- t.up()
- for i=0,9,1 do
- t.back()
- end
- end
- --function ende()
- -- for i=0,7,1 do
- -- t.forward()
- -- end
- -- t.select(9)
- -- t.dig()
- -- for i=0,7,1 do
- -- t.back()
- -- end
- --end
- -- Benutzereingabe
- function userInput()
- --[[term.clear()
- term.setCursorPos(1,1)
- print("Dieses Programm laesst automatisch Enderdrachen spawnen und toeten.")
- print("Es muss sich um eine Mining Turtle oder Advanced Mining Turtle handeln.")
- print("Dazu ist folgendes Setup notwendig: ")
- print("Es muessen 4 Kisten vorhanden sein.")
- print("Links neben der Turtle muss eine Kiste mit Apiarys sein.")
- print("Hinter der Turtle muss eine Kiste mit Phantasmal-Bienen (Queens) sein.")
- print("Bitte Enter druecken...")
- local leer = read()
- term.clear()
- term.setCursorPos(1,1)
- print("Rechts muss eine Kiste mit einem beliebigen Baumaterial stehen.")
- print("Ueber der Turtle muss eine leere Kiste sein.")
- print("Dort droppt die Turtle alle Items nach einem Durchlauf rein.")
- print("Die Items sollten von dort aus automatisch sortiert werden lassen.")
- print("Enter druecken...")
- leer = read()
- ]]
- term.clear()
- term.setCursorPos(1,1)
- print("Wie viele Runden sollen durchlaufen werden?")
- write("Eingabe: ")
- local input = read()
- anzahl = tonumber(input)
- end
- -- Installiert ein Startup (ggf.)
- function install()
- print("-- Drachenfarm-Programm --")
- print("-- von Thor_s_Crafter --")
- print("-- Version 1.1 --")
- print()
- local input
- if not fs.exists("startup") then
- while not (input == "j" or input == "n") do
- term.clear()
- term.setCursorPos(1,1)
- print("Soll das Programm beim Starten automatisch aufgerufen werden (Startup hinzufuegen) (j/n) ?")
- write("Eingabe: ")
- input = read()
- if input == "j" then
- local file = fs.open("startup","w")
- file.writeLine("shell.run(\"rm dragon\")")
- file.writeLine("shell.run(\"pastebin get wvNt9RfD dragon\")")
- file.writeLine("shell.run(\"dragon\")")
- file.close()
- end
- end
- end
- end
- install()
- userInput()
- for i=1,anzahl,1 do
- checkFuel()
- --takeItems()
- --placeApiary()
- --dropItems()
- --rs.setOutput("bottom",true)
- sleep(40)
- --rs.setOutput("bottom",false)
- --while not rs.getInput("left") == true do
- --sleep(1)
- --end
- takeCobble()
- placeCobble()
- dropItems()
- end
- term.clear()
- term.setCursorPos(1,1)
- print("-- Fertig --")
- print("-- Programm beendet --")
Add Comment
Please, Sign In to add comment