Maffin1231

Untitled

Oct 29th, 2025
322
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.80 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]==7 then
  15. turtle.select(7)
  16. elseif a[x][y][z]==8 then
  17. turtle.select(8)
  18. elseif a[x][y][z]==9 then
  19. turtle.select(9)
  20. elseif a[x][y][z]==10 then
  21. turtle.select(10)
  22. elseif a[x][y][z]==11 then
  23. turtle.select(11)
  24. elseif a[x][y][z]==12 then
  25. turtle.select(12)
  26. elseif a[x][y][z]==13 then
  27. turtle.select(13)
  28. elseif a[x][y][z]==14 then
  29. turtle.select(14)
  30. elseif a[x][y][z]==0 then
  31. turtle.select(16)
  32. end
  33. end
  34.  
  35. a = {{{0,0,0,0,0,0,0},
  36. {1,0,0,0,0,0,1},
  37. {1,0,0,0,0,0,1},
  38. {1,0,0,0,0,0,1},
  39.  {0,0,0,0,0,0,0},
  40.  {0,0,0,0,0,0,0},
  41.  {0,0,0,0,0,0,0},
  42.  {0,0,0,0,0,0,0},
  43.  {0,0,0,0,0,0,0},
  44.  {0,0,0,0,0,0,0},
  45.  {0,0,0,0,0,0,0},
  46.  {1,0,0,0,0,0,1},
  47.  {1,0,0,0,0,0,1},
  48.  {1,0,0,0,0,0,1},
  49.  {0,0,0,0,0,0,0}},
  50.  
  51. {{0,0,0,0,0,0,0},
  52.  {1,0,0,2,0,0,1},
  53.  {1,2,2,2,2,2,1},
  54.  {1,0,0,2,0,0,1},
  55.  {0,0,0,2,0,0,0},
  56.  {1,0,0,2,0,0,0},
  57.  {0,0,0,2,0,0,0},
  58.  {0,0,0,2,0,0,0},
  59.  {0,0,0,2,0,0,0},
  60.  {0,0,0,2,0,0,0},
  61.  {0,0,0,2,0,0,0},
  62.  {1,0,0,2,0,0,1},
  63.  {1,2,2,2,2,2,1},
  64.  {1,0,0,2,0,0,1},
  65.  {0,0,0,0,0,0,0}},
  66.  
  67. {{4,4,4,4,4,4,4},
  68.  {1,4,4,4,4,4,1},
  69.  {1,4,4,4,4,4,1},
  70.  {1,4,4,4,4,4,1},
  71.  {4,4,4,4,4,4,4},
  72.  {5,4,4,4,4,4,5},
  73.  {5,4,4,4,4,4,5},
  74.  {5,4,4,4,4,4,5},
  75.  {5,4,4,4,4,4,5},
  76.  {5,4,4,4,4,4,5},
  77.  {1,4,4,4,12,12,1},
  78.  {1,12,12,12,12,12,1},
  79.  {1,12,12,12,12,12,1},
  80.  {12,12,12,12,12,12,12}},
  81.  
  82. {{6,6,7,7,7,6,6},
  83.  {12,12,12,12,12,12,12},
  84.  {12,12,12,12,12,12,12},
  85.  {12,12,12,12,12,12,12},
  86.  {5,0,0,0,0,0,5},
  87.  {0,0,0,0,0,0,5},
  88.  {5,0,0,0,0,0,5},
  89.  {5,12,12,12,12,12,5},
  90.  {5,12,12,12,12,12,5},
  91.  {5,12,12,12,12,12,5},
  92.  {5,12,12,12,12,12,5},
  93.  {12,12,12,12,13,13,13},
  94.  {13,13,13,13,13,13,13},
  95.  {13,13,13,13,13,13,13},
  96.  {8,8,13,13,13,8,8}},
  97.  
  98. {{5,5,5,5,5,5,5},
  99.  {5,5,5,5,5,5,5},
  100.  {5,5,5,5,5,5,5},
  101.  {5,5,5,5,5,5,5},
  102.  {5,5,1,5,5,5,5},
  103.  {5,0,0,0,0,0,5},
  104.  {0,0,0,0,0,0,5},
  105.  {5,0,0,0,0,0,5},
  106.  {5,10,10,10,10,10,5},
  107.  {5,0,0,0,0,0,5},
  108.  {5,0,0,0,0,0,5},
  109.  {5,0,0,0,0,0,5},
  110.  {5,0,0,0,0,0,5},
  111.  {5,0,0,0,0,0,5},
  112.  {5,0,0,0,0,0,5},
  113.  {5,5,5,5,5,14,14}},
  114.  
  115. {{0,0,0,0,0,0,0},
  116.  {0,0,0,0,0,0,0},
  117.  {0,0,0,0,0,0,0},
  118.  {14,11,11,11,11,11,14},
  119.  {11,0,0,0,0,0,11},
  120.  {11,0,0,0,0,0,11},
  121.  {11,0,0,0,0,0,11},
  122.  {14,10,10,10,10,10,14},
  123.  {0,0,0,0,0,0,0},
  124.  {0,0,0,0,0,0,0},
  125.  {1,0,0,0,0,0,1},
  126.  {0,0,0,0,0,0,0},
  127.  {0,0,0,0,0,0,0},
  128.  {0,0,0,0,0,0,0},
  129.  {0,0,0,0,0,0,0}},
  130.  
  131. {{0,0,0,0,0,0,0},
  132.  {0,0,0,0,0,0,0},
  133.  {0,0,0,0,0,0,0},
  134.  {0,0,0,0,0,0,0},
  135.  {14,11,11,11,11,11,14},
  136.  {11,0,0,0,0,0,11},
  137.  {11,0,0,0,0,0,11},
  138.  {14,10,10,10,10,10,14},
  139.  {0,0,0,0,0,0,0},
  140.  {1,0,0,0,0,0,1},
  141.  {0,0,0,0,0,0,0},
  142.  {0,0,0,0,0,0,0},
  143.  {0,0,0,0,0,0,0},
  144.  {0,0,0,0,0,0,0},
  145.  {0,0,0,0,0,0,0}},
  146.  
  147. {{0,0,0,0,0,0,0},
  148.  {0,0,0,0,0,0,0},
  149.  {0,0,0,0,0,0,0},
  150.  {0,0,0,0,0,0,0},
  151.  {0,0,0,0,0,0,0},
  152.  {14,11,11,11,11,11,14},
  153.  {11,0,0,0,0,0,11},
  154.  {14,10,10,10,10,10,14},
  155.  {1,0,0,0,0,0,1},
  156.  {0,0,0,0,0,0,0},
  157.  {0,0,0,0,0,0,0},
  158.  {0,0,0,0,0,0,0},
  159.  {0,0,0,0,0,0,0},
  160.  {0,0,0,0,0,0,0},
  161.  {0,0,0,0,0,0,0}},
  162.  
  163. {{0,0,0,0,0,0,0},
  164.  {0,0,0,0,0,0,0},
  165.  {0,0,0,0,0,0,0},
  166.  {0,0,0,0,0,0,0},
  167.  {0,0,0,0,0,0,0},
  168.  {0,0,0,0,0,0,0},
  169.  {14,14,14,14,14,14,14},
  170.  {14,14,14,14,14,14,14},
  171.  {0,0,0,0,0,0,0},
  172.  {0,0,0,0,0,0,0},
  173.  {0,0,0,0,0,0,0},
  174.  {0,0,0,0,0,0,0},
  175.  {0,0,0,0,0,0,0},
  176.  {0,0,0,0,0,0,0},
  177.  {0,0,0,0,0,0,0}}}
  178.  
  179. turtle.up()
  180.  
  181. for x=1, #a do
  182.   for y=1, #a[x] do
  183.     for z=1, #a[x][y] do
  184.       iff(x,y,z)
  185.       turtle.placeDown()
  186.       turtle.forward()
  187.     end
  188.  
  189. turtle.turnRight()
  190. turtle.forward()
  191. turtle.turnRight()
  192.  
  193. for y = 1,#a[x][y] do
  194. turtle.forward()
  195. end
  196.  
  197. turtle.turnRight()
  198. turtle.turnRight()
  199. end
  200.  
  201. turtle.turnLeft()
  202. for y = 1,#a[x] do
  203. turtle.forward()
  204.  
  205. end
  206. turtle.turnRight()
  207. turtle.up()
  208. end
  209.  
Tags: RTS
Advertisement
Add Comment
Please, Sign In to add comment