Maffin1231

Untitled

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