RTS_Dmitriy

Two layers

Oct 24th, 2025
1,107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- 1 - obsidian
  2. -- 2 - quartz
  3.  
  4. shrek1={
  5.            {},
  6.            {},
  7.            {1,1,1,1,1,1},
  8.            {2,0,0,0,0,1},
  9.            {2},
  10.            {2,0,0,0,0,1},
  11.            {1,1,1,1,1,1},
  12.        }
  13.  
  14. shrek2={
  15.            {},
  16.            {},
  17.            {2,3,3,3,3,1},
  18.            {1,0,0,0,0,3},
  19.            {1},
  20.            {1,0,0,0,0,3},
  21.            {2,3,3,3,3,1},
  22.        }
  23.  
  24. shrek3={
  25.            {1,0,0,0,0,1},
  26.            {4,0,0,0,0,1},
  27.            {1,3,3,3,3,1},
  28.            {5,0,0,0,0,3},
  29.            {1,0,0,0,0,3},
  30.            {5,0,0,0,0,3},
  31.            {1,3,3,3,3,1},
  32.            {4,0,0,0,0,1},
  33.            {1,0,0,0,0,1},
  34.        }
  35.  
  36. shrek4={
  37.            {},
  38.            {1,0,0,0,0,1},
  39.            {1,1,1,1,1,1},
  40.            {5,0,0,0,0,1},
  41.            {1,0,0,0,0,1},
  42.            {5,0,0,0,0,1},
  43.            {1,1,1,1,1,1},
  44.            {1,0,0,0,0,1},
  45.        }
  46.  
  47. shrek5={
  48.            {},
  49.            {},
  50.            {2,2,2,2,2,2},
  51.            {2,2,2,2,2,2},
  52.            {2,2,2,2,2,2},
  53.            {2,2,2,2,2,2},
  54.            {2,2,2,2,2,2},
  55.        }
  56.  
  57.  shrek6={
  58.             {},
  59.             {},
  60.             {},
  61.             {6,6,6,6,6,6},
  62.             {6,6,6,6,6,6},
  63.             {6,6,6,6,6,6},
  64.         }
  65.  
  66. shrek7={
  67.            {},
  68.            {},
  69.            {},
  70.            {},
  71.            {6,6,6,6,6,6}
  72.        }
  73.        
  74. function buildLine (colors)
  75.     for i = 1,#colors do
  76.         slot = colors[i]
  77.         if slot~=0 then
  78.           turtle.select(slot)
  79.           turtle.placeDown()
  80.         end
  81.         turtle.forward()
  82.     end
  83.     turtle.turnRight()
  84.     turtle.forward()
  85.     turtle.turnLeft()
  86.     for e = 1,#colors do
  87.         turtle.back()
  88.     end
  89. end
  90.  
  91. function buildLayer(image)
  92.     for i=1,#image do
  93.          line=image[i]
  94.          buildLine(line)
  95.     end
  96.   turtle.turnLeft()
  97.  for i=1,#image do
  98.     turtle.forward()
  99.   end
  100.   turtle.turnRight()
  101.   turtle.up()
  102. end
  103.  
  104.  
  105. buildLayer(shrek1)
  106. buildLayer(shrek2)
  107. buildLayer(shrek3)
  108. buildLayer(shrek4)
  109. buildLayer(shrek5)
  110. buildLayer(shrek6)
  111. buildLayer(shrek7)
Advertisement
Add Comment
Please, Sign In to add comment