Maffin1231

Untitled

Oct 6th, 2025 (edited)
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.44 KB | Gaming | 0 0
  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={{{1,1,1,1,1},
  20.          {1,0,0,0,1},
  21.          {1,0,0,0,1},
  22.          {1,0,0,0,1},
  23.          {1,1,1,1,1},
  24.          {0,0,0,0,0}},
  25.  
  26.         {{1,2,2,2,1},
  27.          {2,0,0,0,2},
  28.          {2,0,0,0,2},
  29.          {2,0,0,0,2},
  30.          {1,2,2,2,1},
  31.          {0,0,0,0,0}},
  32.  
  33.         {{1,2,2,2,1},
  34.          {2,0,0,0,2},
  35.          {2,0,0,0,2},
  36.          {2,0,0,0,2},
  37.          {1,2,2,2,1},
  38.          {0,0,3,0,0}},
  39.  
  40.         {{1,2,2,2,1},
  41.          {2,0,0,0,2},
  42.          {2,0,0,0,2},
  43.          {2,0,0,0,2},
  44.          {1,2,2,2,1},
  45.          {0,0,3,0,0}},
  46.  
  47.         {{1,1,1,1,1},
  48.          {1,2,2,2,1},
  49.          {1,2,2,2,1},
  50.          {1,2,2,2,1},
  51.          {1,1,1,1,1},
  52.          {0,0,0,0,0}}}
  53.  
  54.  
  55. turtle.up()
  56.  
  57. for x=1, #a do
  58.   for y=1, #a[x] do
  59.     for z=1, #a[x][y] do
  60.       iff(x,y,z)
  61.       turtle.placeDown()
  62.       turtle.forward()
  63.     end
  64.  
  65. turtle.turnRight()
  66. turtle.forward()
  67. turtle.turnRight()
  68.  
  69. for y = 1,#a[x][y] do
  70. turtle.forward()
  71. end
  72.  
  73. turtle.turnRight()
  74. turtle.turnRight()
  75. end
  76.  
  77. turtle.turnLeft()
  78. for y = 1,#a[x] do
  79. turtle.forward()
  80.  
  81. end
  82. turtle.turnRight()
  83. turtle.up()
  84. end
  85.  
Tags: RTS
Advertisement
Add Comment
Please, Sign In to add comment