Advertisement
RTS_Dmitriy

pixelart2

Jul 4th, 2025 (edited)
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function iff (x,y,z)
  2.     if a[x][y][z]==1 then
  3.         turtle.select(1)
  4.     elseif a[x][y][z]==2 then
  5.         turtle.select(2)
  6.     elseif a[x][y][z]==3 then
  7.         turtle.select(3)
  8.     elseif a[x][y][z]==4 then
  9.         turtle.select(4)
  10.     elseif a[x][y][z]==5 then
  11.         turtle.select(5)
  12.     elseif a[x][y][z]==6 then
  13.         turtle.select(6)
  14.     elseif a[x][y][z]==0 then
  15.         turtle.select(16)
  16.     end
  17. end
  18.  
  19. a = {
  20.     {
  21.         {1, 2, 2, 1},
  22.         {2, 0, 0, 2},
  23.         {2, 0, 0, 2},
  24.         {1, 2, 2, 1}
  25.     },
  26.     {
  27.         {2, 0, 0, 2},
  28.         {0, 0, 0, 0},
  29.         {0, 0, 0, 0},
  30.         {2, 0, 0, 2}
  31.     },
  32.     {
  33.         {2, 0, 0, 2},
  34.         {0, 0, 0, 0},
  35.         {0, 0, 0, 0},
  36.         {2, 0, 0, 2}
  37.     },
  38.     {
  39.         {1, 2, 2, 1},
  40.         {2, 0, 0, 2},
  41.         {2, 0, 0, 2},
  42.         {1, 2, 2, 1}
  43.     },
  44. }
  45.  
  46.  
  47.  
  48.  
  49. for x=1,#a do
  50.     turtle.up()
  51.     for y=1,#a[x] do
  52.         for z = 1,#a[x][y] do
  53.             iff(x,y,z)
  54.             turtle.placeDown()
  55.             turtle.forward()
  56.         end
  57.         for z = 1,#a[x][y] do
  58.             turtle.back()
  59.         end
  60.         turtle.turnRight()
  61.         turtle.forward()
  62.         turtle.turnLeft()
  63.     end
  64.     turtle.turnLeft()
  65.     for y = 1,#a[x] do
  66.        turtle.forward()
  67.     end
  68.     turtle.turnRight()
  69. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement