daily pastebin goal
5%
SHARE
TWEET

Untitled

a guest Oct 20th, 2018 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.     File: fn_blastingChargeArmory.sqf
  3.     Author: Tonic, Izzi & Jokahghost
  4.  
  5.     Description:
  6.     Handles fed explosion and spawns loot when successful.
  7. */
  8. private ["_bomb","_time"];
  9. _marker = getMarkerPos "federal_armory"; //Creates a marker indicating that the robbery is still active
  10. createMarker ["Markerarm", _marker];
  11. "Markerarm" setMarkerColor "ColorRed";
  12. "Markerarm" setMarkerText "!! Active Robbery !!";
  13. "Markerarm" setMarkerType "Mil_dot";
  14. createMarker ["Markerarmc", _marker];
  15. "Markerarmc" setMarkerColor "ColorRed";
  16. "Markerarmc" setMarkerShape "Ellipse";
  17. "Markerarmc" setMarkerSize [600,600]; // the size of the KOS zone
  18. _time = time + (10); //Set this as the same time you set in demoChargeTimerArmory.sqf
  19. waitUntil{(round(_time - time) < 1)};
  20. sleep 0.9;
  21. if (!(fed_armory getVariable["chargeplaced",false])) exitWith {{deleteMarker "Markerarm";deleteMarker "Markerarmc";} forEach allPlayers;};
  22.  
  23. _bomb = "Bo_GBU12_LGB_MI10" createVehicle [getPosATL fed_armory select 0, getPosATL fed_armory select 1, (getPosATL fed_armory select 2)+0.5];
  24. fed_armory setVariable ["chargeplaced",false,true];
  25. fed_armory setVariable ["safe_open",true,true];
  26. fed_armory setVariable ["locked",false,true];
  27. fed_armory setVariable ["robbed",true,true];
  28.  
  29. clearWeaponCargoGlobal fed_armory;
  30. clearMagazineCargoGlobal fed_armory;
  31. clearItemCargoGlobal fed_armory;
  32. clearBackpackCargoGlobal fed_armory;
  33.  
  34. sleep 0.3;
  35.  
  36. _var=floor(random 6);
  37. if (_var==0) then {fed_armory addWeaponCargoGlobal ["arifle_AK12_F", 2]; fed_armory addWeaponCargoGlobal ["CUP_arifle_Mk16_CQC", 1]; fed_armory addWeaponCargoGlobal ["CUP_arifle_XM8_Carbine_FG", 1]; fed_armory addWeaponCargoGlobal ["CUP_arifle_FNFAL", 1]; fed_armory addMagazineCargoGlobal ["CUP_30Rnd_556x45_Stanag", 20]; fed_armory addMagazineCargoGlobal ["CUP_20Rnd_762x51_FNFAL_M", 20];};
  38. if (_var==1) then {fed_armory addWeaponCargoGlobal ["arifle_CTAR_ghex_F", 1]; fed_armory addMagazineCargoGlobal ["Titan_AA", 4]; fed_armory addWeaponCargoGlobal ["CUP_arifle_FNFAL_railed", 1]; fed_armory addWeaponCargoGlobal ["CUP_arifle_L85A2", 1]; fed_armory addMagazineCargoGlobal ["CUP_30Rnd_556x45_Stanag", 20]; fed_armory addMagazineCargoGlobal ["CUP_20Rnd_762x51_FNFAL_M", 20];};
  39. if (_var==2) then {fed_armory addWeaponCargoGlobal ["launch_B_Titan_F", 2]; fed_armory addWeaponCargoGlobal ["CUP_launch_M136", 2]; fed_armory addWeaponCargoGlobal ["CUP_arifle_CZ805_B", 2]; fed_armory addWeaponCargoGlobal ["CUP_srifle_L129A1_HG", 1]; fed_armory addMagazineCargoGlobal ["CUP_20Rnd_762x51_CZ805B", 20]; fed_armory addMagazineCargoGlobal ["CUP_M136_M", 6]; fed_armory addMagazineCargoGlobal ["CUP_20Rnd_762x51_L129_M", 20]; fed_armory addMagazineCargoGlobal ["CUP_100Rnd_TE4_LRT4_White_Tracer_762x51_Belt_M", 6]; fed_armory addMagazineCargoGlobal ["CUP_20Rnd_762x51_L129_M", 20];};
  40. if (_var==3) then {fed_armory addWeaponCargoGlobal ["launch_RPG32_F", 15]; fed_armory addWeaponCargoGlobal ["CUP_srifle_SVD_des_ghillie_pso", 2]; fed_armory addWeaponCargoGlobal ["CUP_srifle_AWM_des", 2]; fed_armory addWeaponCargoGlobal ["CUP_srifle_M107_Base", 1]; fed_armory addWeaponCargoGlobal ["srifle_DMR_02_F", 1]; fed_armory addMagazineCargoGlobal ["CUP_10Rnd_762x54_SVD_M", 15]; fed_armory addMagazineCargoGlobal ["10Rnd_338_Mag", 10]; fed_armory addMagazineCargoGlobal ["CUP_10Rnd_127x99_m107", 10]; fed_armory addMagazineCargoGlobal ["CUP_5Rnd_86x70_L115A1", 10];};
  41. if (_var==4) then {fed_armory addWeaponCargoGlobal ["LMG_Zafir_F", 2]; fed_armory addWeaponCargoGlobal ["optic_LRPS", 2]; fed_armory addMagazineCargoGlobal ["5Rnd_127x108_APDS_Mag", 10]; fed_armory addMagazineCargoGlobal ["5Rnd_127x108", 10];};
  42. if (_var==5) then {fed_armory addWeaponCargoGlobal ["MMG_02_black_F", 10]; fed_armory addWeaponCargoGlobal ["ClaymoreDirectionalMine_Remote_Mag", 5]; fed_armory addWeaponCargoGlobal ["muzzle_snds_H", 1]; fed_armory addWeaponCargoGlobal ["muzzle_snds_acp", 1];};
  43. sleep 300; //Waits 5 minutes after the bomb has exploded assuming the robbers have already gotten what they came for
  44.  
  45. {
  46.     deleteMarker "Markerarm";
  47.     deleteMarker "Markerarmc";
  48. } forEach allPlayers;
  49.  
  50. sleep 600; //waits another 10 minutes before everything in the vault gets cleared
  51. clearWeaponCargoGlobal fed_armory;
  52. clearMagazineCargoGlobal fed_armory;
  53. clearItemCargoGlobal fed_armory;
  54. clearBackpackCargoGlobal fed_armory;
  55.  
  56. fed_armory setVariable ["chargeplaced",false,true];
  57. fed_armory setVariable ["safe_open",false,true];
  58. fed_armory setVariable ["locked",true,true];
  59.  
  60. _marker = getMarkerPos "federal_armory"; //This is used to indicate that the armory has recently been robbed and can't be robbed again for some time
  61. createMarker ["Markerarms", _marker];
  62. "Markerarms" setMarkerColor "ColorOrange";
  63. "Markerarms" setMarkerText "Elevated Security";
  64. "Markerarms" setMarkerType "Mil_dot";
  65. createMarker ["Markerarmsc", _marker];
  66. "Markerarmsc" setMarkerColor "ColorOrange";
  67. "Markerarmsc" setMarkerShape "Ellipse";
  68. "Markerarmsc" setMarkerSize [600,600];
  69.  
  70. sleep 3600; //waits an hour before it can be robbed again
  71. {
  72.     deleteMarker "Markerarms";
  73.     deleteMarker "Markerarmsc";
  74. } forEach allPlayers;
  75. fed_armory setVariable ["robbed",false,true];
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top