Maffin1231

Untitled

Mar 28th, 2026 (edited)
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.10 KB | Gaming | 0 0
  1. function iff (x,y)
  2. if a[x][y]==1 then
  3. turtle.select(1)
  4. elseif a[x][y]==2 then
  5. turtle.select(2)
  6. elseif a[x][y]==3 then
  7. turtle.select(3)
  8. elseif a[x][y]==4 then
  9. turtle.select(4)
  10. elseif a[x][y]==5 then
  11. turtle.select(5)
  12. elseif a[x][y]==6 then
  13. turtle.select(6)
  14. elseif a[x][y]==7 then
  15. turtle.select(7)
  16. elseif a[x][y]==8 then
  17. turtle.select(8)
  18. elseif a[x][y]==9 then
  19. turtle.select(9)
  20. elseif a[x][y]==10 then
  21. turtle.select(10)
  22. end
  23. end
  24.  
  25. a = {{{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
  26.       {1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1},
  27.       {1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1},
  28.       {1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1},
  29.       {1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,1},  
  30.       {1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1},
  31.       {1,3,3,3,3,3,3,3,3,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,1},
  32.       {1,3,3,3,3,3,3,3,3,1,3,3,3,3,3,1,3,3,3,3,3,3,4,4,1},
  33.       {1,4,4,4,4,4,4,4,4,1,4,4,4,4,4,1,4,4,4,4,4,4,4,4,1},
  34.       {1,4,4,4,4,4,4,4,4,1,4,4,4,4,4,1,4,4,4,4,4,4,4,4,1},
  35.       {1,4,4,4,4,4,4,4,4,1,1,1,1,1,1,4,4,4,4,4,4,4,4,5,1},
  36.       {6,5,5,5,5,5,5,5,5,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,6},  
  37.       {6,5,5,5,5,5,5,5,5,6,5,6,5,5,5,5,5,5,5,5,5,5,5,5,6},    
  38.       {6,5,5,5,5,5,5,5,5,6,5,5,6,5,5,5,5,5,5,5,5,5,5,5,6},  
  39.       {6,7,7,7,7,7,7,7,7,6,7,7,7,6,7,7,7,7,7,7,7,7,7,7,6},
  40.       {6,7,7,7,7,7,7,7,7,6,7,7,7,7,6,7,7,7,6,7,7,7,7,7,6},
  41.       {6,7,7,7,7,7,7,7,7,6,7,7,7,7,7,6,7,6,8,6,7,7,7,7,6},
  42.       {6,7,7,7,7,7,9,9,9,9,9,9,9,9,9,9,6,8,8,8,6,9,9,9,6},
  43.       {6,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,6,8,6,9,9,9,9,6},
  44.       {6,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,6,9,9,9,9,9,6},
  45.       {6,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,6},
  46.       {6,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,6},
  47.       {6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6}}}
  48.  
  49.  
  50. turtle.up()
  51. for x=1,23 do
  52. for y = 1,25 do
  53. iff(x,y)
  54. turtle.placeDown()
  55. turtle.forward()
  56. end
  57. turtle.turnRight()
  58. turtle.forward()
  59. turtle.turnRight()
  60. for y = 1,25 do
  61. turtle.forward()
  62. end
  63. turtle.turnRight()
  64. turtle.turnRight()
  65. end
Tags: RTS
Advertisement
Add Comment
Please, Sign In to add comment