Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private ["_spawnChance", "_spawnMarker", "_spawnRadius", "_markerRadius", "_item", "_debug", "_start_time", "_loot", "_loot_amount", "_loot_box", "_wait_time", "_spawnRoll", "_position", "_event_marker", "_loot_pos", "_debug_marker","_loot_box", "_hint", "_coords","_MainMarker_bandit_helicrash","_chopper","_wait"];
- _spawnChance = 1.000; // Percentage chance of event happening
- _markerRadius = 350; // Radius the loot can spawn and used for the marker
- _debug = false; // Puts a marker exactly were the loot spawns
- //_loot_amount = 75;
- _wait_time = 900;
- // Dont mess with theses unless u know what yours doing
- _start_time = time;
- _spawnRadius = 5000;
- _spawnMarker = 'center';
- if (isNil "EPOCH_EVENT_RUNNING") then {
- EPOCH_EVENT_RUNNING = false;
- };
- // Check for another event running
- if (EPOCH_EVENT_RUNNING) exitWith {
- diag_log("Event already running");
- };
- // Random chance of event happening
- _spawnRoll = random 1;
- if (_spawnRoll > _spawnChance and !_debug) exitWith {};
- // Random location
- _position = [getMarkerPos _spawnMarker,0,_spawnRadius,10,0,2000,0] call BIS_fnc_findSafePos;
- diag_log(format["Creating bandit helicrash at %1", _position]);
- diag_log(format["Bandit helicrash event setup, waiting for %1 seconds", _wait_time]);
- //private ["_coords","_MainMarker_bandit_helicrash","_chopper","_wait"];
- //Created by Falcyn [QF]
- /*
- _wait = [500,1000] call fnc_hTime;
- sleep _wait;
- */
- MissionGo = 1;
- _position = [getMarkerPos "center",0,5500,30,0,20,0] call BIS_fnc_findSafePos;
- diag_log "Bandit Helicrash Created";
- // Send message to users
- _hint = parseText format["<t align='center' color='#00FF11' shadow='2' size='1.75'>Bandit Supply Helicopter Crash</t><br/><t align='center' color='#ffffff'>A bandit supply helicopter has crashed and the bandits are off loading their supplies. Get there and finish them off!</t>"];
- customRemoteMessage = ['hint', _hint];
- publicVariable "customRemoteMessage";
- //Mission start
- //[nil,nil,rTitleText,"A bandit supply helicopter has crash landed! Check your map for the location!", "PLAIN",10] call RE;
- Ccoords = _position;
- publicVariable "Ccoords";
- //[] execVM "debug\addmarkers.sqf";
- while{MissionGo == 1} do { //refresh marker script by *hs-s.com | waTTe - www.banditparty.de
- _MainMarker_bandit_helicrash = createMarker ["_MainMarker_bandit_helicrash", Ccoords];
- _MainMarker_bandit_helicrash setMarkerColor "ColorBlue";
- _MainMarker_bandit_helicrash setMarkerType "mil_objective";
- _MainMarker_bandit_helicrash setMarkerText "Bandit supply helicopter crash";
- sleep 25;
- deleteMarker _MainMarker_bandit_helicrash;
- };
- // Cut the grass around the loot position
- _clutter = createVehicle ["ClutterCutter_small_2_EP1", _position, [], 0, "CAN_COLLIDE"];
- _clutter setPos _position;
- // cut the grass end
- _chopper = ["UH1H_DZE","Mi17_DZE"] call BIS_fnc_selectRandom;
- _hueychop = createVehicle [_chopper,_position,[], 0, "NONE"];
- _hueychop setVariable ["Bandit",1,true];
- _hueychop setFuel 0.50;
- _hueychop setVehicleAmmo 0.00;
- _crate1 = createVehicle ["USLaunchersBox",[(_position select 0) - 6, _position select 1,0],[], 0, "CAN_COLLIDE"];
- [_crate1] execVM "\z\addons\dayz_server\modules\fillboxes\fillBoxesS.sqf";
- _crate1 setVariable ["permaloot",true];
- _crate2 = createVehicle ["USVehicleBox",[(_position select 0) + 6, _position select 1,0],[], 90, "CAN_COLLIDE"];
- [_crate2] execVM "\z\addons\dayz_server\modules\fillboxes\fillBoxesS.sqf";
- _crate2 setVariable ["permaloot",true];
- _crate3 = createVehicle ["RULaunchersBox",[(_position select 0) - 14, (_position select 1) -10,0],[], 0, "CAN_COLLIDE"];
- [_crate3] execVM "\z\addons\dayz_server\modules\fillboxes\fillBoxesH.sqf";
- _crate3 setVariable ["permaLoot",true];
- _aispawn = [_position,80,6,6,1] execVM "\z\addons\dayz_server\modules\addunits\add_unit_server.sqf";//AI Guards
- sleep 5;
- _aispawn = [_position,80,6,4,1] execVM "\z\addons\dayz_server\modules\addunits\add_unit_server.sqf";//AI Guards
- sleep 5;
- _aispawn = [_position,40,4,4,1] execVM "\z\addons\dayz_server\modules\addunits\add_unit_server.sqf";//AI Guards
- waitUntil{{isPlayer _x && _x distance _hueychop < 30 } count playableunits > 0};
- //Mission accomplished
- [nil,nil,rTitleText,"The helicopter has been taken by survivors!", "PLAIN",6] call RE;
- // Wait
- sleep _wait_time;
- // Clean up
- EPOCH_EVENT_RUNNING = false;
- deleteVehicle _crate1;
- deleteVehicle _crate2;
- deleteVehicle _crate3;
- deleteVehicle _clutter;
- deleteMarker _event_marker_bandit_helicrash;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement