Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ////////////////////////////////////////////////////////////////////////////////////////
- // DayZ Air Raid written by //
- // mmmyum with work from //
- // sirens: http://www.armaholic.com/page.php?id=12598 by DarkXess //
- // bombs: http://www.armaholic.com/page.php?id=15612 by Maxjoiner //
- ////////////////////////////////////////////////////////////////////////////////////////
- /////////////////////////SETUP repeat and break
- private ["_espl","_sound","_pos2","_pos2cnt","_seconds","_rndLoc","_place","_position","_choice","_duration","_xpos","_ypos","_targetpos","_loc","_target","_pos","_siren","_pos1","_choise","_ray","_dblsecs","_repeat","_break"];
- sleep 120;
- _repeat = 30; //times to repeat
- _break = 600; //time to break between attacks
- _position = [13135.9, 10393.3, 1.5]; //leave this
- _xpos = 13135.9;
- _ypos = 10393.3;
- //repeat script
- diag_log format ["AIRRAID: Starting..."];
- sleep 2;
- While {_repeat > 1} do {
- /////////////////////////SETUP position
- // enter positions below. format x,y,z
- _rndLoc=floor(random 18);
- _place=
- switch (_rndLoc) do
- {
- case 0: {"Smugglers"};
- case 1: {"EastAirfield"};
- case 2: {"ArnoldAirfield"};
- case 3: {"NorthIslandFireStation"};
- case 4: {"NorthIslandBarracks"};
- case 5: {"WestAirfield"};
- case 6: {"ZapaBarracks"};
- case 7: {"FlatsNorthIsland"};
- case 8: {"Arnoldstein"};
- case 9: {"RadoTown"};
- case 10: {"Senzatoka"};
- case 11: {"Bovec"};
- case 12: {"BehindBase"};
- case 13: {"SmugglersCastle"};
- case 14: {"SouthWestIsland"};
- case 15: {"SmugglersSniper"};
- case 16: {"FOBSniper"};
- case 17: {"FOBSniper2"};
- };
- diag_log format ["AIRRAID: Random Location: %1 | %2",_rndLoc,_place];
- _position=
- switch (_rndLoc) do
- {
- case 0: {[8009.3, 1986.81, 1.5]};
- case 1: {[8564.84, 4876.08, 1.5]};
- case 2: {[4060.23, 7654.3, 1.5]};
- case 3: {[999.45, 9673.95, 1.5]};
- case 4: {[417.1, 9283.28, 1.5]};
- case 5: {[2572.31, 3465.82, 1.5]};
- case 6: {[5693.51, 871.863, 1.5]};
- case 7: {[2116.18, 9103.66, 1.5]};
- case 8: {[4507.55, 7970.83, 1.5]};
- case 9: {[8408.001, 4666.771, 1.5]};
- case 10: {[6165.05, 7406.31, 1.5]};
- case 11: {[3047.7, 4457.96, 1.5]};
- case 12: {[5697.861, 2073.785, 1.5]};
- case 13: {[7709.31, 2516.91, 1.5]};
- case 14: {[462.369, 291.375, 1.5]};
- case 15: {[8044.338, 2392.002, 1.5]};
- case 16: {[2319.309, 3762.056, 1.5]};
- case 17: {[1946.943, 3897.041, 1.5]};
- };
- //////////////////////////SETUP type of bombing and duration
- _choice = 2;
- _duration = 50;
- /////////////////////////
- _xpos = _position select 0;
- _ypos = _position select 1;
- _targetpos = [_xpos, _ypos, 1.5];
- _loc = createVehicle ["HeliHEmpty", _targetpos,[], 0, "NONE"];
- _target = createVehicle ["HeliHEmpty",position _loc,[], 0, "NONE"]; // target bombing
- AirraidPlayerMsg = _city; publicVariable "AirraidPlayerMsg";
- sleep 2;
- diag_log format ["AIRRAID: INCOMING ATTACK: Sounding Siren at: %1 %2 | Repeat: %3| Type: %4 | Duration: %5",_xpos,_ypos,_repeat,_choice,_duration];
- //sound siren
- _pos = position _target;
- diag_log format ["AIRRAID: POS: %1 | TARGET: %2 | SHOULD MATCH",_pos,_targetpos];
- _siren = createVehicle ["HeliHEmpty",position _target,[], 0, "NONE"];
- [nil,_siren,rSAY,['eve', 3500]] call RE;
- sleep 60;
- _pos1 = position _siren;
- diag_log format ["AIRRAID: SIREN: %1 | TARGET: %2 | SHOULD MATCH APPROX",_pos1,_targetpos];
- [nil,_siren,rSAY,['puk', 3500]] call RE;
- sleep 60;
- [nil,_siren,rSAY,['eve', 3500]] call RE;
- sleep 60;
- [nil,_siren,rSAY,['nam', 3500]] call RE;
- sleep 10;
- [nil,_siren,rSAY,['puk', 3500]] call RE;
- sleep 60;
- [nil,_siren,rSAY,['nam', 3500]] call RE;
- sleep 5;
- //start bombing init
- _choise = _choice; // choise bombing: 1 = light 2 = medium 3 = heavy
- _ray = 200; // ray of bombing
- _seconds = _duration; // time bombing
- _dblsecs = _seconds * 2;
- diag_log format ["AIRRAID: Bombing Area: %1 %2",_xpos,_ypos];
- //start bombing
- _pos2 = [getPosATL _siren];
- While {_seconds > 1} do {
- _sound = createVehicle ["HeliHEmpty",position _target,[], _ray, "NONE"];
- [nil,_sound,rSAY,['mortar1', 3500]] call RE;
- _pos2 set [_seconds, getPosATL _sound];
- sleep 2;
- If (_choise == 1) then {
- _espl = createVehicle ["SH_105_HE",position _sound,[], 0, "NONE"];
- };
- If (_choise == 2) then {
- _espl = createVehicle ["SH_125_HE",position _sound,[], 0, "NONE"];
- };
- If (_choise == 3) then {
- _espl = createVehicle ["BO_GBU12_LGB",position _sound,[], 0, "NONE"];
- };
- _pos2 = [_dblsecs,getPosATL _espl];
- _pos2cnt = count _pos2;
- diag_log format ["AIRRAID: BOMB: %1 | TARGET: %2 | SHOULD MATCH APPROX ||| debug arraycount %3 |",str(_pos2),_targetpos,_pos2cnt];
- _seconds = _seconds - 1;
- deletevehicle _sound;
- };
- //cleanup
- sleep 60;
- _repeat = _repeat - 1;
- deletevehicle _espl;
- deletevehicle _siren;
- deletevehicle _loc;
- deletevehicle _target;
- diag_log format ["AIRRAID: Going down for sleep: Repeat:%1 | Sleep:%2",_repeat,_break];
- sleep _break;
- };
- exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement