Advertisement
Guest User

SM7.sqf

a guest
Mar 1st, 2014
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.30 KB | None | 0 0
  1. /*
  2. (Full credit for code to TheSzerdi & TAW_Tonic)
  3. Updated to new format by Vampire
  4. Custom Mission by Inkko
  5. */
  6. private ["_missName","_coords","_pos","_base","_base1","_base2","_base3","_base4","_base5","_base6","_base7","_base8","_base9","_base10","_base11","_base12","_base13","_base14","_base15","_base16","_crate","_crate1","_crate2"];
  7.  
  8. //Name of the Mission
  9. _missName = "Bandits Resupplying";
  10.  
  11. //DZMSFindPos loops BIS_fnc_findSafePos until it gets a valid result
  12. //_coords = call DZMSFindPos; - commented out for missions closer to shore along southern edge only.
  13.  
  14. _pos = [[8626.8311, 2361.7764, 0],[8278.9824, 2783.2297, 0],[6493.5347, 2239.1804, 0],[5997.4668, 2085.5015, 0],[3985.1863, 2372.7046, 0],[3248.1956, 2063.8767, 0],[1629.5411, 2108.6868, 0],[961.48071, 1887.1649, 0],[11677.637, 3212.2078, 0]] call BIS_fnc_selectRandom;
  15. _coords = [_pos,0,1200,30,0,30,0] call BIS_fnc_findSafePos;
  16.  
  17. [nil,nil,rTitleText,"Bandits are Resupplying Near the Coast!", "PLAIN",10] call RE;
  18.  
  19. //DZMSAddMinMarker is a simple script that adds a marker to the location
  20. [_coords,_missName] ExecVM DZMSAddMinMarker;
  21.  
  22. //Add scenery
  23. _base = createVehicle ["Land_fort_bagfence_long", [(_coords select 0) - 8.1,(_coords select 1) - 0.7, 0], [], 0, "CAN_COLLIDE"];
  24. _base setDir 83.281631;
  25. [_base] call DZMSProtectObj;
  26. _base setVehicleLock "LOCKED";
  27. _base setPos [(_coords select 0) - 8.1,(_coords select 1) - 0.7, 0];
  28.  
  29. _base1 = createVehicle ["Land_fort_bagfence_long", [(_coords select 0) + 9.2,(_coords select 1) + 2.3, 0], [], 0, "CAN_COLLIDE"];
  30. _base1 setDir 83.281631;
  31. [_base1] call DZMSProtectObj;
  32. _base1 setVehicleLock "LOCKED";
  33. _base1 setPos [(_coords select 0) + 9.2,(_coords select 1) + 2.3, 0];
  34.  
  35. _base2 = createVehicle ["Land_fort_bagfence_long", [(_coords select 0) + 9.8,(_coords select 1) - 2.7, 0], [], 0, "CAN_COLLIDE"];
  36. _base2 setDir 83.281631;
  37. [_base2] call DZMSProtectObj;
  38. _base2 setVehicleLock "LOCKED";
  39. _base2 setPos [(_coords select 0) + 9.8,(_coords select 1) - 2.7, 0];
  40.  
  41. _base3 = createVehicle ["Land_fort_bagfence_long", [(_coords select 0) - 7.5,(_coords select 1) - 5.7, 0], [], 0, "CAN_COLLIDE"];
  42. _base3 setDir 83.281631;
  43. [_base3] call DZMSProtectObj;
  44. _base3 setVehicleLock "LOCKED";
  45. _base3 setPos [(_coords select 0) - 7.5,(_coords select 1) - 5.7, 0];
  46.  
  47. _base4 = createVehicle ["Land_fort_bagfence_long", [(_coords select 0) - 4.2,(_coords select 1) + 5.4, 0], [], 0, "CAN_COLLIDE"];
  48. _base4 setDir 172.0807;
  49. [_base4] call DZMSProtectObj;
  50. _base4 setVehicleLock "LOCKED";
  51. _base4 setPos [(_coords select 0) - 4.2,(_coords select 1) + 5.4, 0];
  52.  
  53. _base5 = createVehicle ["Land_fort_bagfence_long", [(_coords select 0) + 3.9,(_coords select 1) + 6.8, 0], [], 0, "CAN_COLLIDE"];
  54. _base5 setDir 172.0807;
  55. [_base5] call DZMSProtectObj;
  56. _base5 setVehicleLock "LOCKED";
  57. _base5 setPos [(_coords select 0) + 3.9,(_coords select 1) + 6.8, 0];
  58.  
  59. _base6 = createVehicle ["Land_CamoNet_NATO", [(_coords select 0) + 2.7,(_coords select 1) - 13.6, 0], [], 0, "CAN_COLLIDE"];
  60. _base6 setDir 173.2;
  61. [_base6] call DZMSProtectObj;
  62. _base6 setVehicleLock "LOCKED";
  63. _base6 setPos [(_coords select 0) + 2.7,(_coords select 1) - 13.6, 0];
  64.  
  65. _base7 = createVehicle ["Land_fort_bagfence_long", [(_coords select 0) + 10.3,(_coords select 1) - 9, 0], [], 0, "CAN_COLLIDE"];
  66. _base7 setDir 83.281631;
  67. [_base7] call DZMSProtectObj;
  68. _base7 setVehicleLock "LOCKED";
  69. _base7 setPos [(_coords select 0) + 10.3,(_coords select 1) - 9, 0];
  70.  
  71. _base8 = createVehicle ["Land_fort_bagfence_long", [(_coords select 0) - 6.6,(_coords select 1) - 11.4, 0], [], 0, "CAN_COLLIDE"];
  72. _base8 setDir 83.281631;
  73. [_base8] call DZMSProtectObj;
  74. _base8 setVehicleLock "LOCKED";
  75. _base8 setPos [(_coords select 0) - 6.6,(_coords select 1) - 11.4, 0];
  76.  
  77. _base9 = createVehicle ["Land_Fire_barrel", [(_coords select 0) + 8.4,(_coords select 1) - 8.3, 0], [], 0, "CAN_COLLIDE"];
  78. [_base9] call DZMSProtectObj;
  79. _base9 setVehicleLock "LOCKED";
  80. _base9 setPos [(_coords select 0) + 8.4,(_coords select 1) - 8.3, 0];
  81.  
  82. _base10 = createVehicle ["Land_Fire_barrel", [(_coords select 0) - 4.1,(_coords select 1) - 10.6, 0], [], 0, "CAN_COLLIDE"];
  83. [_base10] call DZMSProtectObj;
  84. _base10 setVehicleLock "LOCKED";
  85. _base10 setPos [(_coords select 0) - 4.1,(_coords select 1) - 10.6, 0];
  86.  
  87. _base11 = createVehicle ["Land_bags_stack_EP1", [(_coords select 0) - 4.2,(_coords select 1) + 2.6, 0], [], 0, "CAN_COLLIDE"];
  88. [_base11] call DZMSProtectObj;
  89. _base11 setVehicleLock "LOCKED";
  90. _base11 setPos [(_coords select 0) - 4.2,(_coords select 1) + 2.6, 0];
  91.  
  92. _base12 = createVehicle ["Land_Crates_stack_EP1", [(_coords select 0) + 9.5,(_coords select 1) - 9.7, 0], [], 0, "CAN_COLLIDE"];
  93. [_base12] call DZMSProtectObj;
  94. _base12 setVehicleLock "LOCKED";
  95. _base12 setPos [(_coords select 0) + 9.5,(_coords select 1) - 9.7, 0];
  96.  
  97. _base13 = createVehicle ["Misc_TyreHeapEP1", [(_coords select 0) - 4.4,(_coords select 1) - 6.5, 0], [], 0, "CAN_COLLIDE"];
  98. [_base13] call DZMSProtectObj;
  99. _base13 setVehicleLock "LOCKED";
  100. _base13 setPos [(_coords select 0) - 4.4,(_coords select 1) - 6.5, 0];
  101.  
  102. _base14 = createVehicle ["Misc_cargo_cont_small2", [(_coords select 0) + 11.2,(_coords select 1) - 15.7, 0], [], 0, "CAN_COLLIDE"];
  103. [_base14] call DZMSProtectObj;
  104. _base14 setVehicleLock "LOCKED";
  105. _base14 setPos [(_coords select 0) + 11.2,(_coords select 1) - 15.7, 0];
  106.  
  107. _base15 = createVehicle ["Misc_cargo_cont_net3", [(_coords select 0) - 3.4,(_coords select 1) + 11.9, 0], [], 0, "CAN_COLLIDE"];
  108. [_base15] call DZMSProtectObj;
  109. _base15 setVehicleLock "LOCKED";
  110. _base15 setDir -5.4406576;
  111. _base15 setPos [(_coords select 0) - 3.4,(_coords select 1) + 11.9, 0];
  112.  
  113. _base16 = createVehicle ["PowGen_Big_EP1", [(_coords select 0) + 2.4,(_coords select 1) + 3.9, 0], [], 0, "CAN_COLLIDE"];
  114. [_base16] call DZMSProtectObj;
  115. _base16 setVehicleLock "LOCKED";
  116. _base16 setDir 260.40918;
  117. _base16 setPos [(_coords select 0) + 2.4,(_coords select 1) + 3.9, 0];
  118.  
  119. _crate = createVehicle ["MedBox0", [(_coords select 0) + 3.3,(_coords select 1) - 12.5, 0], [], 0, "CAN_COLLIDE"];
  120. _crate setDir -49.684994;
  121. [_crate,"food"] ExecVM DZMSBoxSetup;
  122. _crate setPos [(_coords select 0) + 3.3,(_coords select 1) - 12.5, 0];
  123.  
  124. _crate1 = createVehicle ["USLaunchersBox", [(_coords select 0) - 0.4,(_coords select 1) - 13.1, 0], [], 0, "CAN_COLLIDE"];
  125. _crate1 setDir 18.932304;
  126. [_crate1,"weapons"] ExecVM DZMSBoxSetup;
  127. _crate1 setPos [(_coords select 0) - 0.4,(_coords select 1) - 13.1, 0];
  128.  
  129. _crate2 = createVehicle ["MedBox0", [(_coords select 0) + 6.2,(_coords select 1) - 12.4, 0], [], 0, "CAN_COLLIDE"];
  130. [_crate2,"medical"] ExecVM DZMSBoxSetup;
  131. _crate2 setPos [(_coords select 0) + 6.2,(_coords select 1) - 12.4, 0];
  132.  
  133. //DZMSAISpawn spawns AI to the mission.
  134. //Usage: [_coords, count, skillLevel]
  135. [_coords,3,0,"DZMSUnitsMinor"] call DZMSAISpawn;
  136. sleep 1;
  137. [_coords,3,0,"DZMSUnitsMinor"] call DZMSAISpawn;
  138. sleep 1;
  139. [_coords,3,0,"DZMSUnitsMinor"] call DZMSAISpawn;
  140. sleep 1;
  141. [_coords,3,0,"DZMSUnitsMinor"] call DZMSAISpawn;
  142. sleep 1;
  143.  
  144. //Wait until the player is within 30meters
  145. [_coords,"DZMSUnitsMinor"] call DZMSWaitMissionComp;
  146.  
  147. //Let everyone know the mission is over
  148. [nil,nil,rTitleText,"Survivors have taken control of the resupply point!", "PLAIN",6] call RE;
  149. diag_log format["[DZMS]: Minor SM7 Bandit Resupply has ended."];
  150. deleteMarker "DZMSMinMarker";
  151. deleteMarker "DZMSMinDot";
  152.  
  153. //Let the timer know the mission is over
  154. DZMSMinDone = true;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement