Advertisement
Guest User

Untitled

a guest
Dec 11th, 2017
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.52 KB | None | 0 0
  1. /*
  2. "Underwater Stash" mission for Tanoa
  3. Created by eraser1
  4. */
  5.  
  6. // For logging purposes
  7. _num = DMS_MissionCount;
  8.  
  9.  
  10. // Set mission side (only "bandit" is supported for now)
  11. _side = "bandit";
  12.  
  13. _pos = [18761,14808.7,173.052];
  14.  
  15. // This mission should spawn on server start. Otherwise, if somebody is dumb enough to wait for it to spawn, then they're gonna get killed lol.
  16. //if ([_pos,DMS_StaticMinPlayerDistance] call DMS_fnc_IsPlayerNearby) exitWith {"delay"};
  17.  
  18.  
  19. DMS_CrateCase_DiverGear =
  20. [
  21. [
  22. "arifle_SDAR_F",
  23. "arifle_SDAR_F",
  24. "arifle_SDAR_F",
  25. "arifle_SDAR_F",
  26. "arifle_SDAR_F"
  27. ],
  28. [
  29. "20Rnd_556x45_UW_mag",
  30. "20Rnd_556x45_UW_mag",
  31. "20Rnd_556x45_UW_mag",
  32. "20Rnd_556x45_UW_mag",
  33. "20Rnd_556x45_UW_mag",
  34. "20Rnd_556x45_UW_mag",
  35. "20Rnd_556x45_UW_mag",
  36. "20Rnd_556x45_UW_mag",
  37. "20Rnd_556x45_UW_mag",
  38. "20Rnd_556x45_UW_mag",
  39. "U_O_Wetsuit",
  40. "U_O_Wetsuit",
  41. "U_O_Wetsuit",
  42. "U_O_Wetsuit",
  43. "U_O_Wetsuit",
  44. "V_RebreatherIA",
  45. "V_RebreatherIA",
  46. "V_RebreatherIA",
  47. "Exile_Headgear_GasMask",
  48. "Exile_Headgear_GasMask",
  49. "Exile_Headgear_GasMask",
  50. "Exile_Headgear_GasMask",
  51. "Exile_Headgear_GasMask",
  52. "Exile_Headgear_GasMask",
  53. "Exile_Headgear_GasMask",
  54. "Exile_Headgear_GasMask",
  55. "V_RebreatherIA"
  56. ],
  57. [
  58. "B_Carryall_oli",
  59. "B_Bergen_tna_F",
  60. "B_ViperHarness_oli_F"
  61. ]
  62. ];
  63.  
  64. // I only made some of the variables in this file "private" because I couldn't bother making all of them private :p
  65. private _crate = ["Box_IND_AmmoVeh_F",[18761,14808.7,173.052]] call DMS_fnc_SpawnCrate;
  66. _crate setVariable ["DMS_AllowSmoke", false];
  67.  
  68.  
  69. [_crate, "DiverGear"] call DMS_fnc_FillCrate;
  70.  
  71.  
  72.  
  73. private _sub1 = ["Exile_Boat_SDV_CSAT",[0,0,0]] call DMS_fnc_SpawnNonPersistentVehicle;
  74. _sub1 setPosASL [18747.7,14711.8,168.145];
  75. _sub1 setVariable ["DMS_AllowSmoke", false];
  76.  
  77. private _sub2 = ["Exile_Boat_SDV_CSAT",[0,0,0]] call DMS_fnc_SpawnNonPersistentVehicle;
  78. _sub2 setPosASL [18740.8,14713.7,166.459];
  79. _sub2 setVariable ["DMS_AllowSmoke", false];
  80.  
  81.  
  82.  
  83. private _diverGearSet =
  84. [
  85. "CUP_sgun_AA12",
  86. [],
  87. [["CUP_20Rnd_B_AA12_Pellets",6]],
  88. "",
  89. [],
  90. ["Rangefinder","ItemGPS","NVGoggles"],
  91. "",
  92. "",
  93. "U_C_Scientist",
  94. "CUP_V_PMC_CIRAS_Winter_Veh",
  95. "B_Messenger_IDAP_F"
  96. ];
  97.  
  98.  
  99. private _temp = DMS_ai_use_launchers;
  100. DMS_ai_use_launchers = false;
  101.  
  102. private _diverGroup =
  103. [
  104. [
  105. [18822.3,14803.7,203.461],
  106. [18792,14799.2,203.403],
  107. [18755.2,14829.7,181.272],
  108. [18760.6,14806.4,174.083],
  109. [18777.3,14779.7,199.123],
  110. [18718.1,14772.4,183.908],
  111. [18759.3,14847.7,201.132],
  112. [18759.9,14800.4,174.097],
  113. [18772.5,14742.3,186.772],
  114. [18810.5,14789.9,190.515],
  115. [18830,14761.9,206.789],
  116. [18711,14800.1,172.881],
  117. [18775.8,14818.6,187.436],
  118. [18723.7,14825.6,179.245],
  119. [18757.3,14806.7,173.193],
  120. [18808.7,14780.5,228.534],
  121. [18749,14803.2,170.107]
  122. ],
  123. 17,
  124. "hardcore",
  125. "custom",
  126. _side,
  127. _diverGearSet
  128. ] call DMS_fnc_SpawnAIGroup_MultiPos;
  129.  
  130. DMS_ai_use_launchers = _temp;
  131.  
  132.  
  133. {
  134. _x disableAI "PATH";
  135. } forEach (units _diverGroup);
  136.  
  137.  
  138.  
  139.  
  140.  
  141. private _landGroup =
  142. [
  143. [18761,14808.7,173.052],
  144. 5,
  145. "hardcore",
  146. "sniper",
  147. "bandit"
  148. ] call DMS_fnc_SpawnAIGroup;
  149.  
  150.  
  151.  
  152. // Define mission-spawned AI Units
  153. _missionAIUnits =
  154. [
  155. _diverGroup, // We only spawned the single group for this mission
  156. _landGroup
  157. ];
  158.  
  159. // Define the group reinforcements
  160. //_groupReinforcementsInfo =
  161. //[
  162. // // Removed reinforcements for this because while I was testing the mission the AI took too long to get back to the objective, and that's annoying
  163. // /*
  164. // [
  165. // _diverGroup, // pass the group
  166. // [
  167. // [
  168. // -1, // Let's limit number of units instead...
  169. // 0
  170. // ],
  171. // [
  172. // 10, // Maximum 10 units can be given as reinforcements.
  173. // 0
  174. // ]
  175. // ],
  176. // [
  177. // 180, // About a 3 minute delay between reinforcements.
  178. // diag_tickTime
  179. // ],
  180. // [
  181. // [5810,2874,1],
  182. // [5933,2912,2],
  183. // [5862,3132,0.5]
  184. // ],
  185. // "custom",
  186. // "hardcore",
  187. // _side,
  188. // "reinforce",
  189. // [
  190. // 5, // Reinforcements will only trigger if there's fewer than 5 members left in the group
  191. // 3 // 3 reinforcement units per wave.
  192. // ],
  193. // _diverGearSet
  194. // ]
  195. // */
  196. //];
  197.  
  198. // Define mission-spawned objects and loot values
  199. _missionObjs =
  200. [
  201. [],
  202. [_sub1, _sub2],
  203. [
  204. [
  205. _sub1,
  206. [
  207. 1,
  208. [2,DMS_Box_BaseParts_Concrete],
  209. 1
  210. ]
  211. ],
  212. [
  213. _sub2,
  214. [
  215. [2,DMS_sniper_weps], // Spawn a random 5 weapons that AI snipers can spawn with.
  216. [5,DMS_BoxSurvivalSupplies],
  217. 1
  218. ]
  219. ]
  220. ]
  221. ];
  222.  
  223. // Define Mission Start message
  224. _msgStart = ['#FFFF00', "We have found KillBill's Secret Stash! Lets kill the guards and take it!"];
  225.  
  226. // Define Mission Win message
  227. _msgWIN = ['#0080ff',"Convicts have successfully eliminated the CSAT and obtained the KillBill's Secret Stash!"];
  228.  
  229. // Define Mission Lose message
  230. _msgLOSE = ['#FF0000',"KillBill's Secret Stash has been lost..."];
  231.  
  232. // Define mission name (for map marker and logging)
  233. _missionName = "KillBill's Secret Stash";
  234.  
  235. // Create Markers
  236. _markers =
  237. [
  238. _pos,
  239. _missionName,
  240. "hardcore"
  241. ] call DMS_fnc_CreateMarker;
  242.  
  243. // Record time here (for logging purposes, otherwise you could just put "diag_tickTime" into the "DMS_AddMissionToMonitor" parameters directly)
  244. _time = diag_tickTime;
  245.  
  246. // Parse and add mission info to missions monitor
  247. _added =
  248. [
  249. _pos,
  250. [
  251. [
  252. "kill",
  253. _diverGroup // Only need to kill the diver group.
  254. ],
  255. [
  256. "playerNear",
  257. [_sub1,40]
  258. ]
  259. ],
  260. _groupReinforcementsInfo,
  261. [
  262. _time,
  263. DMS_StaticMissionTimeOut call DMS_fnc_SelectRandomVal
  264. ],
  265. _missionAIUnits,
  266. _missionObjs,
  267. [_missionName,_msgWIN,_msgLOSE],
  268. _markers,
  269. _side,
  270. "hardcore",
  271. [],
  272. [
  273. [
  274. [
  275. _sub1,
  276. {_this setVariable ["ExileMoney",25000,true]} // The submarine will have 25,000 poptabs after the mission completes. The capacity is actually 5000, but I just overload it.
  277. ]
  278. ],
  279. [],
  280. {},
  281. {}
  282. ]
  283. ] call DMS_fnc_AddMissionToMonitor_Static;
  284.  
  285. // Check to see if it was added correctly, otherwise delete the stuff
  286. if !(_added) exitWith
  287. {
  288. diag_log format ["DMS ERROR :: Attempt to set up mission %1 with invalid parameters for DMS_fnc_AddMissionToMonitor_Static! Deleting mission objects and resetting DMS_MissionCount.",_missionName];
  289.  
  290. _cleanup = [];
  291. {
  292. _cleanup pushBack _x;
  293. } forEach _missionAIUnits;
  294.  
  295. _cleanup pushBack ((_missionObjs select 0)+(_missionObjs select 1));
  296.  
  297. {
  298. _cleanup pushBack (_x select 0);
  299. } foreach (_missionObjs select 2);
  300.  
  301. _cleanup call DMS_fnc_CleanUp;
  302.  
  303.  
  304. // Delete the markers directly
  305. {deleteMarker _x;} forEach _markers;
  306.  
  307.  
  308. // Reset the mission count
  309. DMS_MissionCount = DMS_MissionCount - 1;
  310. };
  311.  
  312.  
  313. // Notify players
  314. [_missionName,_msgStart] call DMS_fnc_BroadcastMissionStatus;
  315.  
  316.  
  317.  
  318. if (DMS_DEBUG) then
  319. {
  320. (format ["MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,26,"hardcore",_time]) call DMS_fnc_DebugLog;
  321. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement