ADRIAN333222

Untitled

Jul 6th, 2024 (edited)
363
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- 0 - air
  2. -- 1 - black
  3. -- 2 - red
  4.  
  5.  
  6. art1 = {
  7.      {1, 2, 2, 1},
  8.      {2, 0, 0, 2},
  9.      {2, 0, 0, 2},
  10.      {1, 2, 2, 1},
  11. }
  12.  
  13.  
  14. art2 = {
  15.        {2, 0, 0, 2},
  16.        {0, 0, 0, 0,},
  17.        {0, 0, 0, 0,},
  18.        {2, 0, 0, 2},
  19.  
  20. }
  21.  
  22.  
  23.  
  24.  
  25.  
  26. function buildline(line)
  27.       for element = 1,#line do
  28.        slot = line[element]
  29.        if slot  ~= 0 then
  30.          turtle.select(slot)
  31.          turtle.placeDown()
  32.        end
  33.        turtle.forward()
  34.     end
  35.      for w = 1,#line do
  36.        turtle.back()
  37.     end
  38.   end
  39.  
  40.  
  41.  
  42.  function buildImage(image)
  43.     for stroka = 1,#image do
  44.           buildline(image[stroka])
  45.           turtle.turnRight()
  46.           turtle.forward()
  47.           turtle.turnLeft()
  48.     end
  49.     turtle.turnLeft()
  50.     for stroka = 1,#image do
  51.         turtle.forward()
  52.     end
  53.     turtle.turnRight()
  54.     turtle.up()
  55.  
  56.   end
  57. buildImage(art1)
  58. buildImage(art2)
  59. buildImage(art2)
  60. buildImage(art1)
Advertisement
Add Comment
Please, Sign In to add comment