Maffin1231

Untitled

Aug 22nd, 2025 (edited)
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.34 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]==0 then
  19. turtle.select(16)
  20. end
  21. end
  22.  
  23. a = {{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0},
  24.         {0,0,0,0,0,0,0,1,2,2,2,2,2,2,2,2,2,2,2,1,0,0,0,0,0,0,0},
  25.         {0,0,0,0,0,0,1,2,3,3,3,3,3,3,3,3,3,3,3,2,1,0,0,0,0,0,0},
  26.         {0,0,0,0,0,1,2,3,4,4,4,4,4,4,4,4,4,4,4,3,2,1,0,0,0,0,0},
  27.         {0,0,0,0,1,2,3,4,5,5,5,5,5,5,5,5,5,5,5,4,3,2,1,0,0,0,0},
  28.         {0,0,0,1,2,3,4,5,6,6,6,6,6,6,6,6,6,6,6,5,4,3,2,1,0,0,0},
  29.         {0,0,1,2,3,4,5,6,7,7,7,7,7,7,7,7,7,7,7,6,5,4,3,2,1,0,0},
  30.         {0,1,2,3,4,5,6,7,0,0,0,0,0,0,0,0,0,0,0,7,6,5,4,3,2,1,0},
  31.         {0,8,8,8,8,8,7,0,0,0,0,0,0,0,0,0,0,0,0,0,7,8,8,8,8,8,0},
  32.         {8,8,8,8,8,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8,8,8,8,8},
  33.         {0,8,8,8,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8,8,8,0}}
  34.  
  35.  
  36. turtle.up()
  37. for x=1,11 do
  38. for y = 1,27 do
  39. iff(x,y)
  40. turtle.placeDown()
  41. turtle.forward()
  42. end
  43. turtle.turnRight()
  44. turtle.forward()
  45. turtle.turnRight()
  46. for y = 1,27 do
  47. turtle.forward()
  48. end
  49. turtle.turnRight()
  50. turtle.turnRight()
  51. end
Tags: RTS
Advertisement
Add Comment
Please, Sign In to add comment