Advertisement
UtkaRobert303

proekt (FinalDemo)

Apr 6th, 2024 (edited)
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.73 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,0,0,0,0,0,0},
  22.      {0,1,0,0,0,0,0,1,0},
  23.      {0,0,2,2,0,2,2,0,0},
  24.      {0,0,2,0,0,0,2,0,0},
  25.      {0,0,2,0,0,0,2,0,0},
  26.      {0,0,2,0,0,0,2,0,0},
  27.      {0,0,2,2,2,2,2,0,0},
  28.      {0,1,0,0,0,0,0,1,0},
  29.      {0,0,0,0,0,0,0,0,0}
  30.    },
  31.    {
  32.      {0,0,0,0,0,0,0,0,0},
  33.      {0,1,0,0,0,0,0,1,0},
  34.      {0,0,2,2,0,2,2,0,0},
  35.      {0,0,3,0,0,0,3,0,0},
  36.      {0,0,3,0,0,0,3,0,0},
  37.      {0,0,3,0,0,0,3,0,0},
  38.      {0,0,2,2,2,2,2,0,0},
  39.      {0,1,0,0,0,0,0,1,0},
  40.      {0,0,0,0,0,0,0,0,0}
  41.    },
  42.    {
  43.      {0,0,0,0,0,0,0,0,0},
  44.      {0,1,0,0,0,0,0,1,0},
  45.      {0,0,2,2,2,2,2,0,0},
  46.      {0,0,2,0,0,0,2,0,0},
  47.      {0,0,2,0,0,0,2,0,0},
  48.      {0,0,2,0,0,0,2,0,0},
  49.      {0,0,2,2,2,2,2,0,0},
  50.      {0,1,0,0,0,0,0,1,0},
  51.      {0,0,0,0,0,0,0,0,0}
  52.    },
  53.    {
  54.      {0,0,0,0,0,0,0,0,0},
  55.      {0,1,1,1,1,1,1,1,0},
  56.      {0,1,0,0,0,0,0,1,0},
  57.      {0,1,0,0,0,0,0,1,0},
  58.      {0,1,0,0,0,0,0,1,0},
  59.      {0,1,0,0,0,0,0,1,0},
  60.      {0,1,0,0,0,0,0,1,0},
  61.      {0,1,1,1,1,1,1,1,0},
  62.      {0,0,0,0,0,0,0,0,0}
  63.    },
  64.    {
  65.      {4,0,0,0,0,0,0,0,4},
  66.      {4,0,0,0,0,0,0,0,4},
  67.      {4,0,0,0,0,0,0,0,4},
  68.      {4,0,0,0,0,0,0,0,4},
  69.      {4,0,0,0,0,0,0,0,4},
  70.      {4,0,0,0,0,0,0,0,4},
  71.      {4,0,0,0,0,0,0,0,4},
  72.      {4,0,0,0,0,0,0,0,4},
  73.      {4,0,0,0,0,0,0,0,4}
  74.    },
  75.    {
  76.      {0,4,0,0,0,0,0,4,0},
  77.      {0,4,0,0,0,0,0,4,0},
  78.      {0,4,0,0,0,0,0,4,0},
  79.      {0,4,0,0,0,0,0,4,0},
  80.      {0,4,0,0,0,0,0,4,0},
  81.      {0,4,0,0,0,0,0,4,0},
  82.      {0,4,0,0,0,0,0,4,0},
  83.      {0,4,0,0,0,0,0,4,0},
  84.      {0,4,0,0,0,0,0,4,0}
  85.    },
  86.    {
  87.      {0,0,4,0,0,0,4,0,0},
  88.      {0,0,4,0,0,0,4,0,0},
  89.      {0,0,4,0,0,0,4,0,0},
  90.      {0,0,4,0,0,0,4,0,0},
  91.      {0,0,4,0,0,0,4,0,0},
  92.      {0,0,4,0,0,0,4,0,0},
  93.      {0,0,4,0,0,0,4,0,0},
  94.      {0,0,4,0,0,0,4,0,0},
  95.      {0,0,4,0,0,0,4,0,0}
  96.    },
  97.    {
  98.      {0,0,0,5,2,5,0,0,0},
  99.      {0,0,0,5,2,5,0,0,0},
  100.      {0,0,0,5,2,5,0,0,0},
  101.      {0,0,0,5,2,5,0,0,0},
  102.      {0,0,0,5,2,5,0,0,0},
  103.      {0,0,0,5,2,5,0,0,0},
  104.      {0,0,0,5,2,5,0,0,0},
  105.      {0,0,0,5,2,5,0,0,0},
  106.      {0,0,0,5,2,5,0,0,0}
  107.     }
  108. }
  109.  
  110.  
  111. turtle.up()
  112. for x=1,#a do
  113. for y = 1, #a[x] do
  114. for z = 1, #a[x][y] do
  115. iff(x,y,z)
  116. turtle.placeDown()
  117. turtle.forward()
  118. end
  119.  
  120. turtle.turnRight()
  121. turtle.forward()
  122. turtle.turnRight()
  123.  
  124. for y = 1,#a[x][y] do
  125. turtle.forward()
  126. end
  127. turtle.turnRight()
  128. turtle.turnRight()
  129. end
  130.  
  131. turtle.turnLeft()
  132. for y = 1,#a[x] do
  133. turtle.forward()
  134.  
  135. end
  136. turtle.turnRight()
  137. turtle.up()
  138. end
Tags: RTS
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement