Advertisement
RTS_Dmitriy

base

Oct 24th, 2024
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --0-do not replace
  2. --1-netherrack
  3.  
  4.  
  5. myArt = {
  6.     {0, 0, 0, 1, 0, 0, 0},
  7.     {0, 0, 1, 1, 1, 0, 0},
  8.     {0, 1, 1, 1, 1, 1 ,0},
  9.     {1, 1, 1, 1, 1, 1, 1},
  10.     {0, 1, 1, 1, 1, 1, 0},
  11.     {0, 1, 1, 1, 1, 1, 0},
  12.     {0, 0, 1, 1, 1, 0, 0},
  13.     {0, 0, 0, 1, 0, 0, 0}
  14.  }
  15.  
  16. function buildline(line)
  17.    for i = 1,#line do
  18.      slot=line[i] -- Взять каждый элемент из строки
  19.      -- == <- это равно
  20.      -- ~= <- это НЕ равно
  21.      if  slot ~= 0 then    
  22.         turtle.select(slot)
  23.         turtle.digDown()
  24.         turtle.placeDown()
  25.      end
  26.      turtle.forward()
  27.    end
  28.    for i=1,#line do
  29.      turtle.back()
  30.    end
  31.    turtle.turnRight()
  32.    turtle.forward()
  33.    turtle.turnLeft()
  34. end
  35.  
  36. for i = 1,10 do
  37.   line = myArt[i]
  38.   buildline(line)
  39. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement