Pr1smZ

Move alpha 121

Feb 12th, 2023 (edited)
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.55 KB | None | 0 0
  1. print("1=ja, 0=Nein")
  2. local p = tonumber(io.read())
  3. print("Gerade =0, Links =1, Rechts =2, Hinten =3")
  4. r = tonumber(io.read())
  5. print("Wie weit")
  6. m = tonumber(io.read())
  7. print("Wie hoch?")
  8. h34 = tonumber(io.read())
  9.  
  10. function hx()
  11.     for i = 1, math.abs(h34) do
  12.         if h34 > 0 then
  13.             turtle.up()
  14.         else
  15.             turtle.down()
  16.         end
  17.     end
  18. end
  19.  
  20. function t()
  21.      turtle.turnLeft()
  22. end
  23.  
  24. for i = 1,p do
  25.     for i = 1 , r do
  26.         t()
  27.     end
  28.     hx()
  29.     for i = 1 , m do
  30.         turtle.forward()
  31.     end
  32. end
Advertisement
Add Comment
Please, Sign In to add comment