Advertisement
Guest User

spindler

a guest
Sep 7th, 2011
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.55 KB | None | 0 0
  1. _Rus = [
  2. "NovySobor",
  3. "Elektrozavodsk",
  4. "Pusta",
  5. "Kamyshovo",
  6. "Staroye",
  7. "Tulga",
  8. "Solnichniy",
  9. "Orlovets",
  10. "Guglovo",
  11. "Dolina",
  12. "Shakhovka",
  13. "Nizhnoye",
  14. "Polana",
  15. "Gorka",
  16. "Dubrovka",
  17. "Berezino",
  18. "Petrovka",
  19. "Gvozdno",
  20. "Khelm",
  21. "Olsha",
  22. "Grishino",
  23. "Skalka",
  24. // extra cities
  25. "Krasnostav",
  26. "KrasnostavAirfield",
  27. "Lumber"
  28. ];
  29.  
  30. _Usa = [
  31. "Kabanino",
  32. "Kamenka",
  33. "Komarovo",
  34. "Pavlovo",
  35. "Prigorodki",
  36. "Bor",
  37. "Chernogorsk",
  38. "Drozhino",
  39. "Kozlovka",
  40. "Nadezhdino",
  41. "Mogilevka",
  42. "Zelenogorsk",
  43. "Pulkowo",
  44. "Vyshnoye",
  45. "Sosnovka",
  46. "Pogorevka",
  47. "Rogovo",
  48. "Myshkino",
  49. "Pustoschka",
  50. "Vybor",
  51. "StarySobor",
  52. "Lopatino",
  53. // extra cities
  54. "BalotaAirfield"
  55. ];
  56.  
  57.  
  58.  
  59. _location = _this Select 0;
  60. if (isNil "towns") then {towns = []};
  61. towns = towns + [_location];
  62. _locationName = _this Select 1;
  63. _resistanceTeamTypes = ["DefaultTeam","DefaultTeam"];
  64. _probability = 70;
  65. _startingSupplyValue = 10;
  66. _maxSupplyValue = 50;
  67. _range = 400;
  68.  
  69. _name = Str _location;
  70.  
  71. if (Count _this > 3) then {_startingSupplyValue = _this Select 2};
  72. if (Count _this > 4) then {_maxSupplyValue = _this Select 3};
  73. if (Count _this > 5) then {_range = _this Select 4};
  74. if (Count _this > 6) then {_resistanceTeamTypes = _this Select 5};
  75. if (Count _this > 7) then {_probability = _this Select 6};
  76.  
  77. waitUntil {commonInitComplete};
  78.  
  79. diag_log format["[TeTeT] LOG: Location init %1", _name];
  80.  
  81. Call Compile Format["%1Name = _locationName",_name];
  82. Call Compile Format["%1Range = _range",_name];
  83. Call Compile Format["%1SideID = RESISTANCEID",_name];
  84. {
  85. diag_log format["[TeTeT] LOG: Checking for %1", _x];
  86. if (_x == _name) then {
  87. diag_log "[TeTeT] LOG: Setting side to east";
  88. Call Compile Format["%1SideID = EASTID",_name];
  89. };
  90. } foreach _Rus;
  91. {
  92. diag_log format["[TeTeT] LOG: Checking for %1", _x];
  93. if (_x == _name) then {
  94. diag_log "[TeTeT] LOG: Setting side to west";
  95. Call Compile Format["%1SideID = WESTID",_name];
  96. };
  97. } foreach _Usa;
  98. // if (_name == "KrasnostavAirfield") then {
  99. // Call Compile Format["%1SideID = EASTID",_name];
  100. // } else {
  101. // Call Compile Format["%1SideID = WESTID",_name];
  102. // };
  103. Call Compile Format["%1SupplyValue = _startingSupplyValue",_name];
  104. Call Compile Format["%1StartingSupplyValue = _startingSupplyValue",_name];
  105. Call Compile Format["%1MaxSupplyValue = _maxSupplyValue",_name];
  106.  
  107. if (IsServer) then {
  108. Sleep (Random 1);
  109. [_location,_resistanceTeamTypes,_range,_probability] ExecVM "Server\Server_UpdateTown.sqf";
  110. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement