Advertisement
Maffin1231

Untitled

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