Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Wie weit bis zum Ziel?")
- x = read()
- shell.run("clear")
- print("Wie breit soll der gang werden?")
- a = read()
- shell.run("clear")
- print("Der Wert 1 beschreibt eine tiefe von 2 Block. Wie lang soll der Tunnel werden?")
- b = read()
- shell.run("clear")
- print("Der Wert sollte mindestens das doppelte von der Zielweite sein")
- c = read()
- shell.run("clear")
- print("Standart ist die Hoehe des Raumes/Tunnel 3 fuer die Hoehe muss die Differenz Raumhoehe -3 betragen")
- d = read()
- function start()
- turtle.dig()
- turtle.forward()
- turtle.turnRight()
- end
- function rechts()
- for i=1,a do
- turtle.dig()
- turtle.digUp()
- turtle.dig()
- turtle.digDown()
- turtle.dig()
- turtle.forward()
- end
- turtle.turnLeft()
- turtle.dig()
- turtle.digUp()
- turtle.dig()
- turtle.digDown()
- turtle.dig()
- turtle.forward()
- turtle.turnLeft()
- end
- function links()
- for i=1,a do
- turtle.dig()
- turtle.digUp()
- turtle.dig()
- turtle.digDown()
- turtle.dig()
- turtle.forward()
- end
- turtle.turnRight()
- turtle.digDown()
- turtle.digUp()
- end
- function ausgang()
- turtle.turnRight()
- turtle.turnRight()
- for i=1,c do
- if (turtle.detectDown() == false) then
- turtle.forward()
- end
- end
- end
- function gesammt()
- hoch()
- for i=1,b do
- start()
- rechts()
- links()
- end
- runter()
- ausgang()
- end
- function hoch()
- turtle.forward()
- for i=1,d do
- turtle.digDown()
- turtle.down()
- end
- end
- function runter()
- for i=1,d do
- turtle.digUp()
- turtle.up()
- end
- end
- function hin()
- shell.run("clear")
- print("Breite")
- print(a)
- print("\nTiefe")
- print(b)
- print("\nHoehe")
- print(d)
- print("\nZielweite")
- print(x)
- if (turtle.detect() == false) then
- for i=1,x do
- turtle.forward()
- end
- end
- gesammt()
- end
- hin()
- shell.run("test")
Advertisement
Add Comment
Please, Sign In to add comment