Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Variablen Vergeben
- Auswahl = 1 + 0
- Richtung = "Rechts"
- print("Wie weit soll ich vor?")
- Lang = io.read() - 1
- Lang2 = Lang + 1
- print("Gut, ich Baue "..Lang2.." Vor!")
- print("Wie oft soll ich nach Rechts?")
- Breit = io.read()
- print("Ai ai! "..Breit.." nach Rechts.")
- print(" ")
- print("Ich arbeite in 5 Sekunden!")
- sleep(5)
- -- Funktionen
- function Blockcheck()
- if turtle.getItemCount(Auswahl) == 0 then
- Auswahl = Auswahl + 1
- turtle.select(Auswahl)
- end
- end
- -- Programm
- for i = 1,Breit do
- for i = 1,Lang do
- Blockcheck()
- turtle.placeDown()
- turtle.forward()
- Blockcheck()
- turtle.placeDown()
- end
- --Abfrage wie Turtle abbiegen soll
- if Richtung == "Rechts" then
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- Richtung = "Links"
- elseif Richtung == "Links" then
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- Richtung = "Rechts"
- end
- end
Add Comment
Please, Sign In to add comment