Advertisement
aeroson

Untitled

Aug 27th, 2015
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.93 KB | None | 0 0
  1.  
  2.  
  3. function DOIT()
  4. {
  5. var ent : CEntity;
  6. ent = theGame.CreateEntity(template, player, rot, true, false, false, 2, /* NOP */);
  7. FindAllEffects(ent);
  8. }
  9.  
  10.  
  11. function FoundEffName(effName : String)
  12. {
  13.  
  14.  
  15. }
  16.  
  17.  
  18.  
  19. function FindAllEffects(ent : CEntity)
  20. {
  21.  
  22. var numberOfCharactersInName : int;
  23. var allLetters : array<String>;
  24.  
  25. allLetters.PushBack('0');
  26. allLetters.PushBack('1');
  27. allLetters.PushBack('2');
  28. allLetters.PushBack('3');
  29. allLetters.PushBack('4');
  30. allLetters.PushBack('5');
  31. allLetters.PushBack('6');
  32. allLetters.PushBack('7');
  33. allLetters.PushBack('8');
  34. allLetters.PushBack('9');
  35. allLetters.PushBack('a');
  36. allLetters.PushBack('b');
  37. allLetters.PushBack('c');
  38. allLetters.PushBack('d');
  39. allLetters.PushBack('e');
  40. allLetters.PushBack('f');
  41. allLetters.PushBack('g');
  42. allLetters.PushBack('h');
  43. allLetters.PushBack('i');
  44. allLetters.PushBack('j');
  45. allLetters.PushBack('k');
  46. allLetters.PushBack('l');
  47. allLetters.PushBack('m');
  48. allLetters.PushBack('n');
  49. allLetters.PushBack('o');
  50. allLetters.PushBack('p');
  51. allLetters.PushBack('q');
  52. allLetters.PushBack('r');
  53. allLetters.PushBack('s');
  54. allLetters.PushBack('t');
  55. allLetters.PushBack('u');
  56. allLetters.PushBack('v');
  57. allLetters.PushBack('w');
  58. allLetters.PushBack('x');
  59. allLetters.PushBack('y');
  60. allLetters.PushBack('z');
  61.  
  62. for(numberOfCharactersInName=1; numberOfCharactersInName<100; numberOfCharactersInName+=1)
  63. {
  64. RecursiveCreateEffName("", allLetters, numberOfCharactersInName, ent);
  65. }
  66. }
  67.  
  68.  
  69.  
  70.  
  71. function RecursiveCreateEffName(effName : String, allLetters : array<String>, howMuchLettersMore : int, ent : CEntity;)
  72. {
  73. var effNameTemp : string;
  74. if(howMuchLettersMore==0)
  75. {
  76. if(ent.HasEffect(effName))
  77. {
  78. FoundEffName(effName);
  79. }
  80. } else
  81. {
  82. for(i=0; i<allLetters.Size(); i+=1)
  83. {
  84. effNameTemp = effName + allLetters[i];
  85. RecursiveCreateEffName(effNameTemp, allLetters, howMuchLettersMore-1, ent);
  86. }
  87. }
  88. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement