Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Variablen Vergeben
- Auswahl = 1 + 0
- Richtung = "Hoch"
- print("Wie Hoch ist die Wand?")
- Lang = io.read() - 1
- Lang2 = Lang + 1
- print("Gut sie wird "..Lang2.." Block hoch.")
- print("Wie weit nach Rechts baue ich?")
- Breit = io.read()
- print("Einverstanden! "..Breit.." nach rechts.")
- print(" ")
- print("Ich arbeite in 5 Sekunden!")
- sleep(5)
- -- Funktionen
- function Wechsel()
- if Richtung == "Hoch" then
- turtle.turnRight()
- turtle.forward()
- turtle.turnLeft()
- Richtung = "Runter"
- elseif Richtung == "Runter" then
- turtle.turnRight()
- turtle.forward()
- turtle.turnLeft()
- Richtung = "Hoch"
- end
- end
- function Blockcheck()
- if turtle.getItemCount(Auswahl) == 0 then
- Auswahl = Auswahl + 1
- turtle.select(Auswahl)
- end
- end
- -- Programm
- turtle.select(Auswahl)
- for i = 1,Breit do
- print(i)
- if Richtung == "Hoch" then
- Blockcheck()
- turtle.place()
- for i = 1,Lang do
- turtle.up()
- Blockcheck()
- turtle.place()
- end
- Wechsel()
- elseif Richtung == "Runter" then
- Blockcheck()
- turtle.place()
- for i = 1,Lang do
- turtle.down()
- Blockcheck()
- turtle.place()
- end
- Wechsel()
- end
- end
- if Richtung == "Runter" then
- for i = 1,Lang do
- turtle.down()
- end
- end
Add Comment
Please, Sign In to add comment