MagmaLP

Wireless Turtle Steuerung

Nov 20th, 2020
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. rednet.open("right")
  2. shell.run("clear")
  3.  
  4. while true do
  5. print("Art der Bewegung")
  6. bewegung = io.read()
  7.  
  8. if bewegung == "f" then
  9.   print("Anzahl der Bewegungen")
  10.   anzahl = io.read()
  11.   shell.run("clear")
  12.       for i=-anzahl,-1 do
  13.       rednet.send(5221,"f")
  14.       sleep(0.5)
  15.       shell.run("clear")
  16.       end
  17.      
  18. end
  19.  
  20. if bewegung == "r" then
  21.   print("Anzahl der Bewegungen")
  22.   anzahl = io.read()
  23.   shell.run("clear")
  24.     for i=-anzahl,-1 do
  25.     rednet.send(5221,"r")
  26.     sleep(0.5)
  27.     shell.run("clear")
  28.     end
  29. end
  30.  
  31. if bewegung == "b" then
  32.   print("Anzahl der Bewergungen")
  33.   anzahl = io.read()
  34.   shell.run("clear")
  35.     for i=-anzahl,-1 do
  36.     rednet.send(5221,"b")
  37.     sleep(0.5)
  38.     shell.run("clear")
  39.     end
  40. end
  41.  
  42. if bewegung == "l" then
  43.   print("Anzahl der Bewegungen")
  44.   anzahl = io.read()
  45.   shell.run("clear")
  46.     for i=-anzahl,-1 do
  47.     rednet.send(5221,"l")
  48.     sleep(0.5)
  49.     shell.run("clear")
  50.     end
  51. end
  52.  
  53. if bewegung == "p" then
  54.   print("Anzahl der zu platzierenden BlåB6cke")
  55.   anzahl = io.read()
  56.   shell.run("clear")
  57.     for i=-anzahl,-1 do
  58.     rednet.send(5221,"p")
  59.     sleep(0.5)
  60.     shell.run("clear")
  61.     end
  62. end
  63.  
  64. if bewegung == "u" then
  65.   print("Anzahl der BlåB6cke")
  66.   anzahl = io.read()
  67.   shell.run("clear")
  68.     for i=-anzahl,-1 do
  69.     rednet.send(5221,"u")
  70.     sleep(0.5)
  71.     shell.run("clear")
  72.     end
  73. end
  74.      
  75. if bewegung == "d" then
  76.   print("Anzahl der BlåB6cke")
  77.   anzahl = io.read()
  78.   shell.run("clear")
  79.     for i=-anzahl,-1 do
  80.     rednet.send(5221,"d")
  81.     sleep(0.5)
  82.     shell.run("clear")
  83.     end
  84. end
  85.  
  86.  
  87. end
  88.  
Add Comment
Please, Sign In to add comment