Welcome to Epoch Mod Community

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more!

This message will be removed once you have signed in.

Sign in to follow this  
Followers 0
juandayz

[Bombcrate 1.6]

45 posts in this topic

UPDATED 1/10/17

choose one:

bombcrate.sqf     WITHOUT A.I                         ( place into \@DayZ_Epoch_Server\addons\dayz_server\modules)

Spoiler

 //bombcrate by juandayz with base on rubbletown and 4 sidemissions


private ["_markerRadius","_debug","_loot_box","_loot_lists","_loot","_loot2","_loot_amount","_wait_time","_start_time","_spawnRadius","_spawnMarker","_position",
"_event_marker","_loot_pos","_debug_marker","_box","_timer","_bomb","_dabomb","_this","_positionobj","_mark","_playernear","_spawnChance"];
 

_markerRadius = 250; // Radius the loot can spawn and used for the marker
_debug = true; // Puts a marker exactly were the loot spawns
 
_loot_box = "USVehicleBox";
_loot_lists = [
[
["M9SD","FN_FAL","M4A3_CCO_EP1","AKS_74_kobra","Sa58V_RCO_EP1","ItemEtool","ItemCrowbar","ItemKnife","ItemSledge","ItemCompass","Binocular","Binocular_Vector","NVGoggles","ItemGPS"],
["ItemBriefcase100oz","150Rnd_127x107_DSHKM","20Rnd_762x51_FNFAL","20Rnd_762x51_FNFAL","20Rnd_762x51_FNFAL","30Rnd_762x39_SA58","30Rnd_762x39_SA58","30Rnd_762x39_SA58","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_545x39_AK","30Rnd_545x39_AK","30Rnd_545x39_AK","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD"]
],
[
["M4A1_HWS_GL_SD_Camo","M16A2GL","M16A4","M16A4_GL","M16A4_ACG_GL","M16A4_ACG","M4A1","M4A1_HWS_GL","M4A1_HWS_GL_camo","M4A1_HWS_GL_SD_Camo","M4A1_RCO_GL","M4A1_Aim","M4A1_Aim_camo","M4A1_AIM_SD_camo"],
["ItemBriefcase100oz","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor"]
],
[
["ItemToolbox","M4A1_HWS_GL_SD_Camo","M16A2GL","M16A4","M16A4_GL","M16A4_ACG_GL","M16A4_ACG","M4A1","M4A1_HWS_GL","M4A1_HWS_GL_camo","M4A1_HWS_GL_SD_Camo","M4A1_RCO_GL","M4A1_Aim","M4A1_Aim_camo","M4A1_AIM_SD_camo"],
["15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor"]
],
[
["ChainSaw"],
["ItemBriefcase100oz","ItemBriefcase100oz","ItemCorrugated","ItemCorrugated","ItemCorrugated","ItemCorrugated","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemComboLock","ItemGenerator"]
],
[
["G36C_camo","M240_DZ","RPK_74"],
["ItemBriefcase100oz","100Rnd_762x51_M240","100Rnd_762x51_M240","200Rnd_556x45_M249","100Rnd_556x45_BetaCMag","100Rnd_762x51_M240","200Rnd_556x45_M249","100Rnd_556x45_BetaCMag","100Rnd_762x51_M240","200Rnd_556x45_M249","100Rnd_556x45_BetaCMag","100Rnd_762x51_M240","200Rnd_556x45_M249","100Rnd_556x45_BetaCMag","100Rnd_762x51_M240","200Rnd_556x45_M249","100Rnd_762x51_M240","100Rnd_762x51_M240","200Rnd_556x45_M249","2000Rnd_762x51_M134","2000Rnd_762x51_M134","ItemAVE","ItemLRK","ItemTNK","ItemARM","ItemORP","FishCookedSeaBass","FishCookedSeaBass","FishCookedSeaBass","FishCookedSeaBass","FishCookedSeaBass","FishCookedSeaBass","FishCookedSeaBass","FishCookedSeaBass","FishCookedSeaBass","FishCookedSeaBass"]
],
[
["M4A1_HWS_GL_SD_Camo","M16A2GL","M16A4","M16A4_GL","M16A4_ACG_GL","M16A4_ACG","M4A1","M4A1_HWS_GL","M4A1_HWS_GL_camo","M4A1_HWS_GL_SD_Camo","M4A1_RCO_GL","M4A1_Aim","M4A1_Aim_camo","M4A1_AIM_SD_camo"],
["ItemBriefcase100oz","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","FoodCanFrankBeans","FoodCanFrankBeans","FoodCanBakedBeans","FoodMRE","HandGrenade_east","2000Rnd_762x51_M134","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks"]
],
[
["VSS_vintorez","Saiga12K","M8_compact"],
["ItemBriefcase100oz","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","HandGrenade_east","HandGrenade_east","FoodCanSardines","FoodMRE","FoodPistachio","FoodNutmix","FoodMRE","FoodPistachio","FoodNutmix","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks"]
]
];
_loot = _loot_lists call BIS_fnc_selectRandom;
_loot2 = _loot_lists call BIS_fnc_selectRandom;

_loot_amount = 75;
_wait_time = 600;
 
// 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");
};

EPOCH_EVENT_RUNNING = true;


 
// Random location
_position = [getMarkerPos _spawnMarker,0,_spawnRadius,10,0,2000,0] call BIS_fnc_findSafePos;
 


_event_marker = createMarker [ format ["loot_event_marker_%1", _start_time], _position];
_event_marker setMarkerShape "ELLIPSE";
_event_marker setMarkerType "Cricle01";
_event_marker setMarkerColor "ColorBlack";
_event_marker setMarkerAlpha 0.8;
_event_marker setMarkerBrush "DiagGrid";
_event_marker setMarkerSize [(_markerRadius + 50), (_markerRadius + 50)];
 
_loot_pos = [_position,0,(_markerRadius - 100),10,0,2000,0] call BIS_fnc_findSafePos;
 
if (_debug) then {
_debug_marker = createMarker [ format ["loot_event_debug_marker_%1", _start_time], _loot_pos];
_debug_marker setMarkerText "BOMBCRATE";
_debug_marker setMarkerShape "ICON";
_debug_marker setMarkerType "SupplyVehicle";
_debug_marker setMarkerColor "ColorRed";
_debug_marker setMarkerAlpha 1;
_debug_marker setMarkerSize [1,1];
};
 

 
// Create ammo box
_box = createVehicle [_loot_box,_loot_pos,[], 0, "NONE"];
clearMagazineCargoGlobal _box;
clearWeaponCargoGlobal _box;
//_box setVariable ["permaLoot",true];
 

 
// Add loot
{
_box addWeaponCargoGlobal [_x,1];
} forEach (_loot select 0);
{
_box addMagazineCargoGlobal [_x,1];
} forEach (_loot select 1);
{
_box addWeaponCargoGlobal [_x,1];
} forEach (_loot2 select 0);
{
_box addMagazineCargoGlobal [_x,1];
} forEach (_loot2 select 1);
 

// Send center message to users
[nil,nil,rTitleText,"THERS A BOMB CRATE!, Check your Map for the Location!", "PLAIN",10] call RE;


waitUntil{{isPlayer _x && _x distance _box < 10  } count playableunits > 0};
[nil,nil,rTitleText,"BOMBCRATE IS ACTIVE NOW -25 SECONDS BEFORE EXPLODE!", "PLAIN",10] call RE;
_timer = 25;//change me if u want more o less time before bomb explode

 //#############################CREATE THE BOMB FUNCTION TO EXPLODE############################//
bombexp = {

_bomb = ["HelicopterExploSmall","HelicopterExploBig","Bo_GBU12_LGB"] call BIS_fnc_selectRandom;
_dabomb = objNull;

if (true) then
{
    _this = createVehicle [_bomb,_positionobj, [], 2, "CAN_COLLIDE"];
    _dabomb = _this;
};

 


};
//############################EXIT FROM HERE#################################################//


sleep 1;

 


_mark = "RoadFlare" createVehicle getPosATL _box;
_mark attachTo [_box, [0,0,-1]];
_positionobj = getPosATL _box;    

 

sleep _timer;
_playernear = false;

{
if ((isPlayer _x) && (_x distance _box < 15)) then {                                                                                                                                                                                        
_x setDamage 1;
};
} count playableUnits;    


sleep 1;
call bombexp;

 

 
// Clean up
EPOCH_EVENT_RUNNING = false;
deleteVehicle _mark;
deleteVehicle _box;
deleteMarker _event_marker;
if (_debug) then {
deleteMarker _debug_marker;
}; 

 

 

bombcrateai.sqf

Spoiler

 //bombcrate by juandayz with base on rubbletown and 4 sidemissions


private ["_markerRadius","_debug","_loot_box","_loot_lists","_loot","_loot2","_loot_amount","_wait_time","_start_time","_spawnRadius","_spawnMarker","_position",
"_event_marker","_loot_pos","_debug_marker","_box","_timer","_bomb","_dabomb","_this","_positionobj","_mark","_playernear","_spawnChance","_enemytype",
"_enemy","_enemy1","_enemy2","_enemy3","_enemy4","_xpos","_ypos","_waypos1","_waypos2","_waypos3","_waypos4","_waypointend","_objectsm2","_group_gunner","_enemygunner","_statictype"];
 
_spawnChance =  0.70; // Percentage chance of event happening
_markerRadius = 250; // Radius the loot can spawn and used for the marker
_debug = true; // Puts a marker exactly were the loot spawns
_enemytype = "TK_Commander_EP1"; 
_loot_box = "USVehicleBox";
_loot_lists = [
[
["M9SD","FN_FAL","M4A3_CCO_EP1","AKS_74_kobra","Sa58V_RCO_EP1","ItemEtool","ItemCrowbar","ItemKnife","ItemSledge","ItemCompass","Binocular","Binocular_Vector","NVGoggles","ItemGPS"],
["ItemBriefcase100oz","150Rnd_127x107_DSHKM","20Rnd_762x51_FNFAL","20Rnd_762x51_FNFAL","20Rnd_762x51_FNFAL","30Rnd_762x39_SA58","30Rnd_762x39_SA58","30Rnd_762x39_SA58","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_545x39_AK","30Rnd_545x39_AK","30Rnd_545x39_AK","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD"]
],
[
["M4A1_HWS_GL_SD_Camo","M16A2GL","M16A4","M16A4_GL","M16A4_ACG_GL","M16A4_ACG","M4A1","M4A1_HWS_GL","M4A1_HWS_GL_camo","M4A1_HWS_GL_SD_Camo","M4A1_RCO_GL","M4A1_Aim","M4A1_Aim_camo","M4A1_AIM_SD_camo"],
["ItemBriefcase100oz","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor"]
],
[
["ItemToolbox","M4A1_HWS_GL_SD_Camo","M16A2GL","M16A4","M16A4_GL","M16A4_ACG_GL","M16A4_ACG","M4A1","M4A1_HWS_GL","M4A1_HWS_GL_camo","M4A1_HWS_GL_SD_Camo","M4A1_RCO_GL","M4A1_Aim","M4A1_Aim_camo","M4A1_AIM_SD_camo"],
["15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor"]
],
[
["ChainSaw"],
["ItemBriefcase100oz","ItemBriefcase100oz","ItemCorrugated","ItemCorrugated","ItemCorrugated","ItemCorrugated","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemComboLock","ItemGenerator"]
],
[
["G36C_camo","M240_DZ","RPK_74"],
["ItemBriefcase100oz","100Rnd_762x51_M240","100Rnd_762x51_M240","200Rnd_556x45_M249","100Rnd_556x45_BetaCMag","100Rnd_762x51_M240","200Rnd_556x45_M249","100Rnd_556x45_BetaCMag","100Rnd_762x51_M240","200Rnd_556x45_M249","100Rnd_556x45_BetaCMag","100Rnd_762x51_M240","200Rnd_556x45_M249","100Rnd_556x45_BetaCMag","100Rnd_762x51_M240","200Rnd_556x45_M249","100Rnd_762x51_M240","100Rnd_762x51_M240","200Rnd_556x45_M249","2000Rnd_762x51_M134","2000Rnd_762x51_M134","ItemAVE","ItemLRK","ItemTNK","ItemARM","ItemORP","FishCookedSeaBass","FishCookedSeaBass","FishCookedSeaBass","FishCookedSeaBass","FishCookedSeaBass","FishCookedSeaBass","FishCookedSeaBass","FishCookedSeaBass","FishCookedSeaBass","FishCookedSeaBass"]
],
[
["M4A1_HWS_GL_SD_Camo","M16A2GL","M16A4","M16A4_GL","M16A4_ACG_GL","M16A4_ACG","M4A1","M4A1_HWS_GL","M4A1_HWS_GL_camo","M4A1_HWS_GL_SD_Camo","M4A1_RCO_GL","M4A1_Aim","M4A1_Aim_camo","M4A1_AIM_SD_camo"],
["ItemBriefcase100oz","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","FoodCanFrankBeans","FoodCanFrankBeans","FoodCanBakedBeans","FoodMRE","HandGrenade_east","2000Rnd_762x51_M134","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks"]
],
[
["VSS_vintorez","Saiga12K","M8_compact"],
["ItemBriefcase100oz","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","HandGrenade_east","HandGrenade_east","FoodCanSardines","FoodMRE","FoodPistachio","FoodNutmix","FoodMRE","FoodPistachio","FoodNutmix","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks"]
]
];
_loot = _loot_lists call BIS_fnc_selectRandom;
_loot2 = _loot_lists call BIS_fnc_selectRandom;

_loot_amount = 75;
_wait_time = 600;
 
// 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");
};

EPOCH_EVENT_RUNNING = true;

// Random chance of event happening
_spawnRoll = random 1;
if (_spawnRoll > _spawnChance) exitWith {};
 
// Random location
_position = [getMarkerPos _spawnMarker,0,_spawnRadius,10,0,2000,0] call BIS_fnc_findSafePos;
 


_event_marker = createMarker [ format ["loot_event_marker_%1", _start_time], _position];
_event_marker setMarkerShape "ELLIPSE";
_event_marker setMarkerType "Cricle01";
_event_marker setMarkerColor "ColorBlack";
_event_marker setMarkerAlpha 0.8;
_event_marker setMarkerBrush "DiagGrid";
_event_marker setMarkerSize [(_markerRadius + 50), (_markerRadius + 50)];
 
_loot_pos = [_position,0,(_markerRadius - 100),10,0,2000,0] call BIS_fnc_findSafePos;
 
if (_debug) then {
_debug_marker = createMarker [ format ["loot_event_debug_marker_%1", _start_time], _loot_pos];
_debug_marker setMarkerText "BOMBCRATE";
_debug_marker setMarkerShape "ICON";
_debug_marker setMarkerType "SupplyVehicle";
_debug_marker setMarkerColor "ColorRed";
_debug_marker setMarkerAlpha 1;
_debug_marker setMarkerSize [1,1];
};
 
_this = createCenter east;

_this setFriend [west, 0];

_center_1 = _this;
_group_1 = createGroup _center_1;

_waypointsrange = 20;//range to move ai for waypoints
//

//spawnai
_enemy = objNull;
_enemy = _group_1 createUnit [_enemytype,_loot_pos,[],0,"CAN_COLLIDE"];	
_enemy enableAI "TARGET";
_enemy enableAI "AUTOTARGET";
_enemy enableAI "MOVE";
_enemy enableAI "ANIM";
_enemy enableAI "FSM";
_enemy setCombatMode "YELLOW";
_enemy setBehaviour "COMBAT";




_enemy1 = objNull;
_enemy1 = _group_1 createUnit [_enemytype,_loot_pos,[],0,"CAN_COLLIDE"];
_enemy1 enableAI "TARGET";
_enemy1 enableAI "AUTOTARGET";
_enemy1 enableAI "MOVE";
_enemy1 enableAI "ANIM";
_enemy1 enableAI "FSM";
_enemy1 setCombatMode "YELLOW";
_enemy1 setBehaviour "COMBAT";



_enemy2 = objNull;
_enemy2 = _group_1 createUnit [_enemytype,_loot_pos,[],0,"CAN_COLLIDE"];
_enemy2 enableAI "TARGET";
_enemy2 enableAI "AUTOTARGET";
_enemy2 enableAI "MOVE";
_enemy2 enableAI "ANIM";
_enemy2 enableAI "FSM";
_enemy2 setCombatMode "YELLOW";
_enemy2 setBehaviour "COMBAT";


_enemy3 = objNull;
_enemy3 = _group_1 createUnit [_enemytype,_loot_pos,[],0,"CAN_COLLIDE"];
_enemy3 enableAI "TARGET";
_enemy3 enableAI "AUTOTARGET";
_enemy3 enableAI "MOVE";
_enemy3 enableAI "ANIM";
_enemy3 enableAI "FSM";
_enemy3 setCombatMode "YELLOW";
_enemy3 setBehaviour "COMBAT";



_enemy4 = objNull;
_enemy4 = _group_1 createUnit [_enemytype,_loot_pos,[],0,"CAN_COLLIDE"];
_enemy4 enableAI "TARGET";
_enemy4 enableAI "AUTOTARGET";
_enemy4 enableAI "MOVE";
_enemy4 enableAI "ANIM";
_enemy4 enableAI "FSM";
_enemy4 setCombatMode "YELLOW";
_enemy4 setBehaviour "COMBAT";


_xpos = _position select 0;
_ypos = _position select 1;

// These are 4 waypoints in a NorthSEW around the center
_waypos1 = [_xpos, _ypos+20, 0];
_waypos2 = [_xpos+20, _ypos, 0];
_waypos3 = [_xpos, _ypos-20, 0];
_waypos4 = [_xpos-20, _ypos, 0];


_wp1 = _group_1 addWaypoint [_waypos1, _waypointsrange];
_wp1 setWaypointType "MOVE";
_wp2 = _group_1 addWaypoint [_waypos2, _waypointsrange];
_wp2 setWaypointType "MOVE";
_wp3 = _group_1 addWaypoint [_waypos3, _waypointsrange];
_wp3 setWaypointType "MOVE";
_wp4 = _group_1 addWaypoint [_waypos4, _waypointsrange];
_wp4 setWaypointType "MOVE";


_waypointend = _group_1 addWaypoint [[_xpos,_ypos, 0], _waypointsrange];
_waypointend setWaypointType "CYCLE";

_statictype = "ZU23_CDF";
_objectsm2 = createVehicle [_statictype, [(_loot_pos select 0) - 5, (_loot_pos select 1) - 4,0],[], 0, "CAN_COLLIDE"];
_objectsm2 setDir 0;
_objectsm2 setVectorUp surfaceNormal position _objectsm2;
_objectsm2 setVehicleLock "LOCKED";
_objectsm2 	setVehicleAmmo 1;
dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_objectsm2];

sleep 1;
_group_gunner = createGroup _center_1;
_enemygunner = objNull;
_enemygunner = _group_gunner createUnit [_enemytype,_loot_pos,[],0,"CAN_COLLIDE"];
_enemygunner moveingunner _objectsm2; 
 
 
// Create ammo box
_box = createVehicle [_loot_box,_loot_pos,[], 0, "NONE"];
clearMagazineCargoGlobal _box;
clearWeaponCargoGlobal _box;
//_box setVariable ["permaLoot",true];
 

 
// Add loot
{
_box addWeaponCargoGlobal [_x,1];
} forEach (_loot select 0);
{
_box addMagazineCargoGlobal [_x,1];
} forEach (_loot select 1);
{
_box addWeaponCargoGlobal [_x,1];
} forEach (_loot2 select 0);
{
_box addMagazineCargoGlobal [_x,1];
} forEach (_loot2 select 1);
 

// Send center message to users
[nil,nil,rTitleText,"THERS A BOMB CRATE!, Check your Map for the Location!", "PLAIN",10] call RE;


waitUntil{{isPlayer _x && _x distance _box < 10  } count playableunits > 0};
[nil,nil,rTitleText,"BOMBCRATE IS ACTIVE NOW -25 SECONDS BEFORE EXPLODE!", "PLAIN",10] call RE;
_timer = 25;//change me if u want more o less time before bomb explode

 //#############################CREATE THE BOMB FUNCTION TO EXPLODE############################//
bombexp = {

_bomb = ["HelicopterExploSmall","HelicopterExploBig","Bo_GBU12_LGB"] call BIS_fnc_selectRandom;
_dabomb = objNull;

if (true) then
{
    _this = createVehicle [_bomb,_positionobj, [], 2, "CAN_COLLIDE"];
    _dabomb = _this;
};

 


};
//############################EXIT FROM HERE#################################################//


sleep 1;

 


_mark = "RoadFlare" createVehicle getPosATL _box;
_mark attachTo [_box, [0,0,-1]];
_positionobj = getPosATL _box;    

 

sleep _timer;
_playernear = false;

{
if ((isPlayer _x) && (_x distance _box < 15)) then {                                                                                                                                                                                        
_x setDamage 1;
};
} count playableUnits;    


sleep 1;
call bombexp;

 

 
// Clean up
EPOCH_EVENT_RUNNING = false;
deleteVehicle _mark;
deleteVehicle _box;
deleteMarker _event_marker;
deleteVehicle _objectsm2;
deleteVehicle _enemy;
deleteVehicle _enemy1;
deleteVehicle _enemy2;
deleteVehicle _enemy3;
deleteVehicle _enemy4;
deleteVehicle _enemygunner;
if (_debug) then {
deleteMarker _debug_marker;
}; 

 

 

 

open your init.sqf


EpochUseEvents = true; //Enable event scheduler. Define custom scripts in dayz_server\modules to run on a schedule.
EpochEvents = [["any","any","any","any",5,"bombcrate"],["any","any","any","any",30,"crash_spawner"],["any","any","any","any",0,"crash_spawner"],["any","any","any","any",15,"supply_drop"]];

Arm_A2_OA_2016_08_15_19_51_36_72.jpg

 

note: The bomb was fixed. now kill the players again. tnks @Runewulv, @icomrade, @WagnerMello for all your help!

  //ItemSeaBassCooked was changed by FishCookedSeaBass//Mk_48_DZ was removed and changed

koriaba, gernika, Joshyy and 4 others like this

Share this post


Link to post
Share on other sites

Hi Juan hj a player showed me that you can do the mission without activating the bomb

Just stay away from her have to increase the radius to activate the pump?

In the image shows the distance he takes the item but does not activate the bomb

20161218173311_1.jpg

 

juandayz likes this

Share this post


Link to post
Share on other sites

@WagnerMello

nice spot wagner!  changed in main post.

heres the line for distance..

waitUntil{{isPlayer _x && _x distance _loot_box < 3  } count playableunits > 0};

i replace it by 10 mts

waitUntil{{isPlayer _x && _x distance _loot_box < 10  } count playableunits > 0};

koriaba likes this

Share this post


Link to post
Share on other sites

Some the weapon classnames havent been updated I noticed to the 1.0.6 ones, so you might get issues with players trying to sell the weapons, if they even spawn. I havent tried this yet so cant say for sure.

Nice work as usual though Juan.

Share this post


Link to post
Share on other sites

Works great, any chance of releasing an option to have a few AI protecting the crate? This way you have to do a little work before approaching the bomb?

 

Share this post


Link to post
Share on other sites
3 hours ago, Runewulv said:

Works great, any chance of releasing an option to have a few AI protecting the crate? This way you have to do a little work before approaching the bomb?

 

yup. i can merge the armycamp with bombcrate. let me write it,, and i post here for test

Share this post


Link to post
Share on other sites

@Runewulv here you got to test.

bombcrate.sqf

Spoiler



//bombcrate by juandayz with base on rubbletown and 4 sidemissions

private ["_timer","_spawnChance", "_spawnMarker", "_spawnRadius", "_markerRadius", "_item", "_debug", "_start_time", "_loot","_loot2", "_loot_amount", "_loot_box", "_wait_time", "_spawnRoll", "_position", "_event_marker", "_loot_pos", "_debug_marker","_loot_box", "_hint","_spawnenemys","_enemytype","_aicustomgear","_usewaypoints","_waypointsrange","_enemy","_enemy2","_enemy3","_enemy4","_enemy1","_enemy5","_enemy6","_enemy7"];
 
_spawnChance =  0.70; // Percentage chance of event happening
_markerRadius = 250; // Radius the loot can spawn and used for the marker
_debug = true; // Puts a marker exactly were the loot spawns
 

_spawnenemys = true; //allow or disallow enemy AI
_enemytype = ["TK_Commander_EP1","RU_Soldier_AR","Ins_Commander","RU_Soldier_TL","TK_Soldier_SL_EP1"] call BIS_fnc_selectRandom;
_aicustomgear = true;//allow custom gear on ai
_usewaypoints = true; //allow ai to move around
_waypointsrange = 20;//range to move ai for waypoints 
 
 
//------------------------------------------------------------------------------------------------------------------------------------------------------------//
/////////////////////////////////////////////////If _aicustomgear = true; customize the gear////////////////////////////////////////////////////////////////////
//------------------------------------------------------------------------------------------------------------------------------------------------------------//
_Packlist = [
"DZ_Patrol_Pack_EP1",
"DZ_Assault_Pack_EP1",
"DZ_Czech_Vest_Pouch",
"DZ_ALICE_Pack_EP1",
"DZ_TK_Assault_Pack_EP1",
"DZ_British_ACU",
"DZ_CivilBackpack_EP1",
"DZ_Backpack_EP1"
]call BIS_fnc_selectRandom;

_Gear0 = [
"ItemMorphine",
"ItemBandage",
"ItemBriefcase100oz",
"ItemAntibiotic",
"ItemPainkiller",
"FoodMRE",
"ItemGoldBar",
"ItemCanvas",
"CinderBlocks",
"ItemSodaPepsi",
"MortarBucket"
] call BIS_fnc_selectRandom;

_Gear1 = [
"ItemMorphine",
"ItemBandage",
"ItemBriefcase100oz",
"ItemAntibiotic",
"ItemPainkiller",
"FoodMRE",
"ItemGoldBar",
"ItemCanvas",
"CinderBlocks",
"ItemSodaPepsi",
"MortarBucket"
] call BIS_fnc_selectRandom;

_Gear2 = [
"ItemMorphine",
"ItemBandage",
"ItemBriefcase100oz",
"ItemAntibiotic",
"ItemPainkiller",
"FoodMRE",
"ItemGoldBar",
"ItemCanvas",
"CinderBlocks",
"ItemSodaPepsi",
"MortarBucket"
] call BIS_fnc_selectRandom;

_Gear3 = [
"ItemMorphine",
"ItemBandage",
"ItemBriefcase100oz",
"ItemAntibiotic",
"ItemPainkiller",
"FoodMRE",
"ItemGoldBar",
"ItemCanvas",
"CinderBlocks",
"ItemSodaPepsi",
"MortarBucket"
] call BIS_fnc_selectRandom;

_Gear4 = [
"ItemMorphine",
"ItemBandage",
"ItemBriefcase100oz",
"ItemAntibiotic",
"ItemPainkiller",
"FoodMRE",
"ItemGoldBar",
"ItemCanvas",
"CinderBlocks",
"ItemSodaPepsi",
"MortarBucket"
] call BIS_fnc_selectRandom;

_Gear5 = [
"ItemMorphine",
"ItemBandage",
"ItemBriefcase100oz",
"ItemAntibiotic",
"ItemPainkiller",
"FoodMRE",
"ItemGoldBar",
"ItemCanvas",
"CinderBlocks",
"ItemSodaPepsi",
"MortarBucket"
] call BIS_fnc_selectRandom;

_Gear6 = [
"ItemMorphine",
"ItemBandage",
"ItemBriefcase100oz",
"ItemAntibiotic",
"ItemPainkiller",
"FoodMRE",
"ItemGoldBar",
"ItemCanvas",
"CinderBlocks",
"ItemSodaPepsi",
"MortarBucket"
] call BIS_fnc_selectRandom;

_Gear7 = [
"ItemMorphine",
"ItemBandage",
"ItemBriefcase100oz",
"ItemAntibiotic",
"ItemPainkiller",
"FoodMRE",
"ItemGoldBar",
"ItemCanvas",
"CinderBlocks",
"ItemSodaPepsi",
"MortarBucket"
] call BIS_fnc_selectRandom;

_AISkills = [	
	["aimingAccuracy",0.20,0.25],
	["aimingShake",0.85,0.95],
	["aimingSpeed",0.80,0.90],
	["endurance",0.80,0.90],
	["spotDistance",0.70,0.85],
	["spotTime",0.70,0.85],
	["courage",0.80,1.00],
	["reloadSpeed",0.80,0.90],
	["commanding",0.80,0.90],
	["general",0.80,1.00]
];


//------------------------------------------------------------------------------------------------------------------------------------------------------------//
/////////////////////////////////////////////////If _aicustomgear = true; customize the gear////////////////////////////////////////////////////////////////////
//------------------------------------------------------------------------------------------------------------------------------------------------------------//


 
 
 
_loot_box = "USVehicleBox";
_loot_lists = [
[
["M9SD","FN_FAL","M4A3_CCO_EP1","AKS_74_kobra","Sa58V_RCO_EP1","ItemEtool","ItemCrowbar","ItemKnife","ItemSledge","ItemCompass","Binocular","Binocular_Vector","NVGoggles","ItemGPS"],
["ItemBriefcase100oz","150Rnd_127x107_DSHKM","20Rnd_762x51_FNFAL","20Rnd_762x51_FNFAL","20Rnd_762x51_FNFAL","30Rnd_762x39_SA58","30Rnd_762x39_SA58","30Rnd_762x39_SA58","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_545x39_AK","30Rnd_545x39_AK","30Rnd_545x39_AK","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD"]
],
[
["M4A1_HWS_GL_SD_Camo","M16A2GL","M16A4","M16A4_GL","M16A4_ACG_GL","M16A4_ACG","M4A1","M4A1_HWS_GL","M4A1_HWS_GL_camo","M4A1_HWS_GL_SD_Camo","M4A1_RCO_GL","M4A1_Aim","M4A1_Aim_camo","M4A1_AIM_SD_camo"],
["ItemBriefcase100oz","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor"]
],
[
["ItemToolbox","M4A1_HWS_GL_SD_Camo","M16A2GL","M16A4","M16A4_GL","M16A4_ACG_GL","M16A4_ACG","M4A1","M4A1_HWS_GL","M4A1_HWS_GL_camo","M4A1_HWS_GL_SD_Camo","M4A1_RCO_GL","M4A1_Aim","M4A1_Aim_camo","M4A1_AIM_SD_camo"],
["15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor"]
],
[
["ChainSaw"],
["ItemBriefcase100oz","ItemBriefcase100oz","ItemCorrugated","ItemCorrugated","ItemCorrugated","ItemCorrugated","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemComboLock","ItemGenerator"]
],
[
["Mk_48_DZ","M240_DZ","RPK_74"],
["ItemBriefcase100oz","100Rnd_762x51_M240","100Rnd_762x51_M240","200Rnd_556x45_M249","100Rnd_556x45_BetaCMag","100Rnd_762x51_M240","200Rnd_556x45_M249","100Rnd_556x45_BetaCMag","100Rnd_762x51_M240","200Rnd_556x45_M249","100Rnd_556x45_BetaCMag","100Rnd_762x51_M240","200Rnd_556x45_M249","100Rnd_556x45_BetaCMag","100Rnd_762x51_M240","200Rnd_556x45_M249","100Rnd_762x51_M240","100Rnd_762x51_M240","200Rnd_556x45_M249","2000Rnd_762x51_M134","2000Rnd_762x51_M134","ItemAVE","ItemLRK","ItemTNK","ItemARM","ItemORP","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked"]
],
[
["M4A1_HWS_GL_SD_Camo","M16A2GL","M16A4","M16A4_GL","M16A4_ACG_GL","M16A4_ACG","M4A1","M4A1_HWS_GL","M4A1_HWS_GL_camo","M4A1_HWS_GL_SD_Camo","M4A1_RCO_GL","M4A1_Aim","M4A1_Aim_camo","M4A1_AIM_SD_camo"],
["ItemBriefcase100oz","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","FoodCanFrankBeans","FoodCanFrankBeans","FoodCanBakedBeans","FoodMRE","HandGrenade_east","2000Rnd_762x51_M134","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks"]
],
[
["VSS_vintorez","Saiga12K","M8_compact"],
["ItemBriefcase100oz","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","HandGrenade_east","HandGrenade_east","FoodCanSardines","FoodMRE","FoodPistachio","FoodNutmix","FoodMRE","FoodPistachio","FoodNutmix","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks"]
]
];
_loot = _loot_lists call BIS_fnc_selectRandom;
_loot2 = _loot_lists call BIS_fnc_selectRandom;

_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");
};

EPOCH_EVENT_RUNNING = true;

// 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["Spawning loot event at %1", _position]);

_event_marker = createMarker [ format ["loot_event_marker_%1", _start_time], _position];
_event_marker setMarkerShape "ELLIPSE";
_event_marker setMarkerType "Cricle01";
_event_marker setMarkerColor "ColorBlack";
_event_marker setMarkerAlpha 0.8;
_event_marker setMarkerBrush "DiagGrid";
_event_marker setMarkerSize [(_markerRadius + 50), (_markerRadius + 50)];
 
_loot_pos = [_position,0,(_markerRadius - 100),10,0,2000,0] call BIS_fnc_findSafePos;
 
if (_debug) then {
_debug_marker = createMarker [ format ["loot_event_debug_marker_%1", _start_time], _loot_pos];
_debug_marker setMarkerText "BOMBCRATE";
_debug_marker setMarkerShape "ICON";
_debug_marker setMarkerType "SupplyVehicle";
_debug_marker setMarkerColor "ColorRed";
_debug_marker setMarkerAlpha 1;
_debug_marker setMarkerSize [1,1];
};
 
diag_log(format["Creating ammo box at %1", _loot_pos]);
 
// Create ammo box
_loot_box = createVehicle [_loot_box,_loot_pos,[], 0, "NONE"];
clearMagazineCargoGlobal _loot_box;
clearWeaponCargoGlobal _loot_box;
_loot_box setVariable ["permaLoot",true];
 
// Cut the grass around the loot position
_clutter = createVehicle ["ClutterCutter_small_2_EP1", _loot_pos, [], 0, "CAN_COLLIDE"];
_clutter setPos _loot_pos;
// cut the grass    end
 
// Add loot
{
_loot_box addWeaponCargoGlobal [_x,1];
} forEach (_loot select 0);
{
_loot_box addMagazineCargoGlobal [_x,1];
} forEach (_loot select 1);
{
_loot_box addWeaponCargoGlobal [_x,1];
} forEach (_loot2 select 0);
{
_loot_box addMagazineCargoGlobal [_x,1];
} forEach (_loot2 select 1);
 
// Send Top Right message to users , requires Remote message script
//_hint = parseText format["<t align='center' color='#0D00FF' shadow='2' size='1.75'>THERS A BOMB CRATE!, Check your Map for the Location!</t><br/><t align='center' color='#ffffff'>THERS A BOMB CRATE!, Check your Map for the Location!</t>"];
//customRemoteMessage = ['hint', _hint];
//publicVariable "customRemoteMessage";

// Send center message to users
[nil,nil,rTitleText,"THERS A BOMB CRATE!, Check your Map for the Location!", "PLAIN",10] call RE;
diag_log(format["Loot event setup, waiting for %1 seconds", _wait_time]);


if (_spawnenemys) then {
//define side for ai
_this = createCenter east;

_this setFriend [west, 0];

_center_1 = _this;
_group_1 = createGroup _center_1;
//

//spawnai
_enemy = objNull;
_enemy = _group_1 createUnit [_enemytype,_loot_pos,[],0,"CAN_COLLIDE"];	
_enemy enableAI "TARGET";
_enemy enableAI "AUTOTARGET";
_enemy enableAI "MOVE";
_enemy enableAI "ANIM";
_enemy enableAI "FSM";
_enemy setCombatMode "YELLOW";
_enemy setBehaviour "COMBAT";
_enemy setSkill _AISkills;



_enemy1 = objNull;
_enemy1 = _group_1 createUnit [_enemytype,_loot_pos,[],0,"CAN_COLLIDE"];
_enemy1 enableAI "TARGET";
_enemy1 enableAI "AUTOTARGET";
_enemy1 enableAI "MOVE";
_enemy1 enableAI "ANIM";
_enemy1 enableAI "FSM";
_enemy1 setCombatMode "YELLOW";
_enemy1 setBehaviour "COMBAT";
_enemy1 setSkill _AISkills;


_enemy2 = objNull;
_enemy2 = _group_1 createUnit [_enemytype,_loot_pos,[],0,"CAN_COLLIDE"];
_enemy2 enableAI "TARGET";
_enemy2 enableAI "AUTOTARGET";
_enemy2 enableAI "MOVE";
_enemy2 enableAI "ANIM";
_enemy2 enableAI "FSM";
_enemy2 setCombatMode "YELLOW";
_enemy2 setBehaviour "COMBAT";
_enemy2 setSkill _AISkills;


_enemy3 = objNull;
_enemy3 = _group_1 createUnit [_enemytype,_loot_pos,[],0,"CAN_COLLIDE"];
_enemy3 enableAI "TARGET";
_enemy3 enableAI "AUTOTARGET";
_enemy3 enableAI "MOVE";
_enemy3 enableAI "ANIM";
_enemy3 enableAI "FSM";
_enemy3 setCombatMode "YELLOW";
_enemy3 setBehaviour "COMBAT";
_enemy3 setSkill _AISkills;


_enemy4 = objNull;
_enemy4 = _group_1 createUnit [_enemytype,_loot_pos,[],0,"CAN_COLLIDE"];
_enemy4 enableAI "TARGET";
_enemy4 enableAI "AUTOTARGET";
_enemy4 enableAI "MOVE";
_enemy4 enableAI "ANIM";
_enemy4 enableAI "FSM";
_enemy4 setCombatMode "YELLOW";
_enemy4 setBehaviour "COMBAT";
_enemy4 setSkill _AISkills;
	
_enemy5 = objNull;
_enemy5 = _group_1 createUnit [_enemytype,_loot_pos,[],0,"CAN_COLLIDE"];
_enemy5 enableAI "TARGET";
_enemy5 enableAI "AUTOTARGET";
_enemy5 enableAI "MOVE";
_enemy5 enableAI "ANIM";
_enemy5 enableAI "FSM";
_enemy5 setCombatMode "YELLOW";
_enemy5 setBehaviour "COMBAT";
_enemy5 setSkill _AISkills;


_enemy6 = objNull;
_enemy6 = _group_1 createUnit [_enemytype,_loot_pos,[],0,"CAN_COLLIDE"];
_enemy6 enableAI "TARGET";
_enemy6 enableAI "AUTOTARGET";
_enemy6 enableAI "MOVE";
_enemy6 enableAI "ANIM";
_enemy6 enableAI "FSM";
_enemy6 setCombatMode "YELLOW";
_enemy6 setBehaviour "COMBAT";
_enemy6 setSkill _AISkills;

_enemy7 = objNull;
_enemy7 = _group_1 createUnit [_enemytype,_loot_pos,[],0,"CAN_COLLIDE"];
_enemy7 enableAI "TARGET";
_enemy7 enableAI "AUTOTARGET";
_enemy7 enableAI "MOVE";
_enemy7 enableAI "ANIM";
_enemy7 enableAI "FSM";
_enemy7 setCombatMode "YELLOW";
_enemy7 setBehaviour "COMBAT";
_enemy7 setSkill _AISkills;




//use waypoints : allow ai move
if (_usewaypoints) then {

_xpos = _position select 0;
_ypos = _position select 1;

// These are 4 waypoints in a NorthSEW around the center
_waypos1 = [_xpos, _ypos+20, 0];
_waypos2 = [_xpos+20, _ypos, 0];
_waypos3 = [_xpos, _ypos-20, 0];
_waypos4 = [_xpos-20, _ypos, 0];


_wp1 = _group_1 addWaypoint [_waypos1, _waypointsrange];
_wp1 setWaypointType "MOVE";
_wp2 = _group_1 addWaypoint [_waypos2, _waypointsrange];
_wp2 setWaypointType "MOVE";
_wp3 = _group_1 addWaypoint [_waypos3, _waypointsrange];
_wp3 setWaypointType "MOVE";
_wp4 = _group_1 addWaypoint [_waypos4, _waypointsrange];
_wp4 setWaypointType "MOVE";


_waypointend = _group_1 addWaypoint [[_xpos,_ypos, 0], _waypointsrange];
_waypointend setWaypointType "CYCLE";

};
sleep 1;

//If use aicustomgear
if (_aicustomgear) then {

///////////////////////////////////////remove weapons and magazines
removeAllWeapons _enemy;
removeAllItems _enemy;
removeAllWeapons _enemy1;
removeAllItems _enemy1;
removeAllWeapons _enemy2;
removeAllItems _enemy2;
removeAllWeapons _enemy3;
removeAllItems _enemy3;
removeAllWeapons _enemy4;
removeAllItems _enemy4;
removeAllWeapons _enemy5;
removeAllItems _enemy5;
removeAllWeapons _enemy6;
removeAllItems _enemy6;
removeAllWeapons _enemy7;
removeAllItems _enemy7;

///////////////////////////////////////add weapons and magazines
_enemy addWeapon "G36C_camo";
_enemy addMagazine "30Rnd_556x45_G36";
_enemy addMagazine "30Rnd_556x45_G36";
_enemy addMagazine "30Rnd_556x45_G36";
_enemy addMagazine "30Rnd_556x45_G36";
_enemy addMagazine "30Rnd_556x45_G36";
_enemy addMagazine "30Rnd_556x45_G36";

_enemy1 addWeapon "G36C_camo";
_enemy1 addMagazine "30Rnd_556x45_G36";
_enemy1 addMagazine "30Rnd_556x45_G36";
_enemy1 addMagazine "30Rnd_556x45_G36";
_enemy1 addMagazine "30Rnd_556x45_G36";
_enemy1 addMagazine "30Rnd_556x45_G36";
_enemy1 addMagazine "30Rnd_556x45_G36";

_enemy2 addWeapon "M4A1_HWS_GL_camo";
_enemy2 addMagazine "30Rnd_556x45_Stanag";
_enemy2 addMagazine "30Rnd_556x45_Stanag";
_enemy2 addMagazine "30Rnd_556x45_Stanag";
_enemy2 addMagazine "30Rnd_556x45_Stanag";
_enemy2 addMagazine "30Rnd_556x45_Stanag";
_enemy2 addMagazine "30Rnd_556x45_Stanag";

_enemy3 addWeapon "M4A1_HWS_GL_camo";
_enemy3 addMagazine "30Rnd_556x45_Stanag";
_enemy3 addMagazine "30Rnd_556x45_Stanag";
_enemy3 addMagazine "30Rnd_556x45_Stanag";
_enemy3 addMagazine "30Rnd_556x45_Stanag";
_enemy3 addMagazine "30Rnd_556x45_Stanag";
_enemy3 addMagazine "30Rnd_556x45_Stanag";

_enemy4 addWeapon "AKS74U_DZ";
_enemy4 addMagazine "30Rnd_545x39_AK";
_enemy4 addMagazine "30Rnd_545x39_AK";
_enemy4 addMagazine "30Rnd_545x39_AK";
_enemy4 addMagazine "30Rnd_545x39_AK";
_enemy4 addMagazine "30Rnd_545x39_AK";
_enemy4 addMagazine "30Rnd_545x39_AK";

_enemy5 addWeapon "FNFAL_DZ";
_enemy5 addMagazine "20Rnd_762x51_FNFAL";
_enemy5 addMagazine "20Rnd_762x51_FNFAL";
_enemy5 addMagazine "20Rnd_762x51_FNFAL";
_enemy5 addMagazine "20Rnd_762x51_FNFAL";
_enemy5 addMagazine "20Rnd_762x51_FNFAL";
_enemy5 addMagazine "20Rnd_762x51_FNFAL";

_enemy6 addWeapon "M249_DZ";
_enemy6 addMagazine "100Rnd_556x45_M249";
_enemy6 addMagazine "100Rnd_556x45_M249";
_enemy6 addMagazine "100Rnd_556x45_M249";
_enemy6 addMagazine "100Rnd_556x45_M249";

_enemy7 addWeapon "M24_DZ";
_enemy7 addMagazine "5Rnd_762x51_M24";
_enemy7 addMagazine "5Rnd_762x51_M24";
_enemy7 addMagazine "5Rnd_762x51_M24";
_enemy7 addMagazine "5Rnd_762x51_M24";
_enemy7 addMagazine "5Rnd_762x51_M24";
_enemy7 addMagazine "5Rnd_762x51_M24";
//////////////////////////////////////////////

//add items
_enemy addMagazine _Gear0;
_enemy addMagazine _Gear1;
_enemy1 addMagazine _Gear1;
_enemy1 addMagazine _Gear2;
_enemy2 addMagazine _Gear2;
_enemy2 addMagazine _Gear3;
_enemy3 addMagazine _Gear3;
_enemy3 addMagazine _Gear4;
_enemy4 addMagazine _Gear4;
_enemy4 addMagazine _Gear5;
_enemy5 addMagazine _Gear5;
_enemy5 addMagazine _Gear6;
_enemy6 addMagazine _Gear6;
_enemy6 addMagazine _Gear7;
_enemy7 addMagazine _Gear7;
_enemy7 addMagazine _Gear0;


//add backpacks
_enemy addBackpack _Packlist;
_enemy1 addBackpack _Packlist;
_enemy2 addBackpack _Packlist;
_enemy3 addBackpack _Packlist;
_enemy4 addBackpack _Packlist;
_enemy5 addBackpack _Packlist;
_enemy6 addBackpack _Packlist;
_enemy7 addBackpack _Packlist;
};
sleep 1;
//endspawn enemys
};





waitUntil{{isPlayer _x && _x distance _loot_box < 10  } count playableunits > 0};
[nil,nil,rTitleText,"BOMBCRATE IS ACTIVE NOW -25 SECONDS BEFORE EXPLODE!", "PLAIN",10] call RE;
_timer = 30;//change me if u want more o less time before bomb explode

//#############################CREATE THE BOMB FUNCTION TO EXPLODE############################//
bombexp = {
_bomb = ["HelicopterExploSmall","HelicopterExploBig","Bo_GBU12_LGB"] call BIS_fnc_selectRandom;
_dabomb = objNull;
if (true) then
{
_this = createVehicle [_bomb,_positionobj, [], 2, "CAN_COLLIDE"];
_dabomb = _this;
};
};
//############################EXIT FROM HERE#################################################//


sleep 1;

 


_mark = "RoadFlare" createVehicle getPosATL _loot_box;
_mark attachTo [_loot_box, [0,0,-1]];
_positionobj = getPosATL _loot_box;    

 

sleep _timer;
call bombexp;

 

 
// Clean up
EPOCH_EVENT_RUNNING = false;
deleteVehicle _mark;
deleteVehicle _loot_box;
deleteMarker _event_marker;
if (_debug) then {
deleteMarker _debug_marker;
};
if (_spawnenemys) then {
deleteVehicle _enemy;
deleteVehicle _enemy1;
deleteVehicle _enemy2;
deleteVehicle _enemy3;
deleteVehicle _enemy4;
deleteVehicle _enemy5;
deleteVehicle _enemy6;
deleteVehicle _enemy7;
};

 

 

check this lines to config all about ai:

_spawnenemys = true; //allow or disallow enemy AI
_enemytype = ["TK_Commander_EP1","RU_Soldier_AR","Ins_Commander","RU_Soldier_TL","TK_Soldier_SL_EP1"] call BIS_fnc_selectRandom;
_aicustomgear = true;//allow custom gear on ai
_usewaypoints = true; //allow ai to move around
_waypointsrange = 20;//range to move ai for waypoints 

 

Share this post


Link to post
Share on other sites
1 hour ago, Runewulv said:

awesome! ill install this at the next restart. I use army camp as well, works great.

Take a look on army camp i update it 2 hs ago. To add unit skills

Share this post


Link to post
Share on other sites

yeah I have army camp in since this afternoon, big changes? Also, the bombcrate mission with AI works great, unfortunately it suffers the same fate as other systems. The shot AI despawn almost immediately. Any idea how to stop this, they do the same thing on Andre's Convoys.

 

Share this post


Link to post
Share on other sites
10 hours ago, Runewulv said:

yeah I have army camp in since this afternoon, big changes? Also, the bombcrate mission with AI works great, unfortunately it suffers the same fate as other systems. The shot AI despawn almost immediately. Any idea how to stop this, they do the same thing on Andre's Convoys.

 

mm what you talking about "shot ai"  :)

Share this post


Link to post
Share on other sites

juan, meaning when you kill the AI the server cleans their bodies up too quickly. It's a common problem with 1.0.6, have to put a line of code in somewhere to prevent them from cleaning up. Just not sure where it would go.

Share this post


Link to post
Share on other sites
17 minutes ago, Runewulv said:

juan, meaning when you kill the AI the server cleans their bodies up too quickly. It's a common problem with 1.0.6, have to put a line of code in somewhere to prevent them from cleaning up. Just not sure where it would go.

ohh understand you. maybe you can take a look on server_cleanup.sqf

 

Share this post


Link to post
Share on other sites

yeah its not supposed to be amended in server_cleanup.sqf, it's supposed to be amended per script within the script some where.

Share this post


Link to post
Share on other sites
2 hours ago, Runewulv said:

also, I can confirm that the bomb doesn't actually kill the player. Any fix?

 

yes, just give me some time im working on this new event now.

 

Share this post


Link to post
Share on other sites

 

On 29/12/2016 at 8:39 PM, Runewulv said:

also, I can confirm that the bomb doesn't actually kill the player. Any fix?

 

bombcrate special edition :biggrin: fixed for you

Spoiler

//bombcrate by juandayz with base on rubbletown and 4 sidemissions

private ["_timer","_spawnChance", "_spawnMarker", "_spawnRadius", "_markerRadius", "_item", "_debug", "_start_time", "_loot","_loot2", "_loot_amount", "_loot_box", "_wait_time", "_spawnRoll", "_position", "_event_marker", "_loot_pos", "_debug_marker","_loot_box", "_hint","_spawnenemys","_enemytype","_aicustomgear","_usewaypoints","_waypointsrange","_enemy","_enemy2","_enemy3","_enemy4","_enemy1","_enemy5","_enemy6","_enemy7"];
 
_spawnChance =  0.70; // Percentage chance of event happening
_markerRadius = 250; // Radius the loot can spawn and used for the marker
_debug = true; // Puts a marker exactly were the loot spawns
 

_spawnenemys = true; //allow or disallow enemy AI
_enemytype = ["TK_Commander_EP1","RU_Soldier_AR","Ins_Commander","RU_Soldier_TL","TK_Soldier_SL_EP1"] call BIS_fnc_selectRandom;
_aicustomgear = true;//allow custom gear on ai
_usewaypoints = true; //allow ai to move around
_waypointsrange = 20;//range to move ai for waypoints
 
 
//------------------------------------------------------------------------------------------------------------------------------------------------------------//
/////////////////////////////////////////////////If _aicustomgear = true; customize the gear////////////////////////////////////////////////////////////////////
//------------------------------------------------------------------------------------------------------------------------------------------------------------//
_Packlist = [
"DZ_Patrol_Pack_EP1",
"DZ_Assault_Pack_EP1",
"DZ_Czech_Vest_Pouch",
"DZ_ALICE_Pack_EP1",
"DZ_TK_Assault_Pack_EP1",
"DZ_British_ACU",
"DZ_CivilBackpack_EP1",
"DZ_Backpack_EP1"
]call BIS_fnc_selectRandom;

_Gear0 = [
"ItemMorphine",
"ItemBandage",
"ItemBriefcase100oz",
"ItemAntibiotic",
"ItemPainkiller",
"FoodMRE",
"ItemGoldBar",
"ItemCanvas",
"CinderBlocks",
"ItemSodaPepsi",
"MortarBucket"
] call BIS_fnc_selectRandom;

_Gear1 = [
"ItemMorphine",
"ItemBandage",
"ItemBriefcase100oz",
"ItemAntibiotic",
"ItemPainkiller",
"FoodMRE",
"ItemGoldBar",
"ItemCanvas",
"CinderBlocks",
"ItemSodaPepsi",
"MortarBucket"
] call BIS_fnc_selectRandom;

_Gear2 = [
"ItemMorphine",
"ItemBandage",
"ItemBriefcase100oz",
"ItemAntibiotic",
"ItemPainkiller",
"FoodMRE",
"ItemGoldBar",
"ItemCanvas",
"CinderBlocks",
"ItemSodaPepsi",
"MortarBucket"
] call BIS_fnc_selectRandom;

_Gear3 = [
"ItemMorphine",
"ItemBandage",
"ItemBriefcase100oz",
"ItemAntibiotic",
"ItemPainkiller",
"FoodMRE",
"ItemGoldBar",
"ItemCanvas",
"CinderBlocks",
"ItemSodaPepsi",
"MortarBucket"
] call BIS_fnc_selectRandom;

_Gear4 = [
"ItemMorphine",
"ItemBandage",
"ItemBriefcase100oz",
"ItemAntibiotic",
"ItemPainkiller",
"FoodMRE",
"ItemGoldBar",
"ItemCanvas",
"CinderBlocks",
"ItemSodaPepsi",
"MortarBucket"
] call BIS_fnc_selectRandom;

_Gear5 = [
"ItemMorphine",
"ItemBandage",
"ItemBriefcase100oz",
"ItemAntibiotic",
"ItemPainkiller",
"FoodMRE",
"ItemGoldBar",
"ItemCanvas",
"CinderBlocks",
"ItemSodaPepsi",
"MortarBucket"
] call BIS_fnc_selectRandom;

_Gear6 = [
"ItemMorphine",
"ItemBandage",
"ItemBriefcase100oz",
"ItemAntibiotic",
"ItemPainkiller",
"FoodMRE",
"ItemGoldBar",
"ItemCanvas",
"CinderBlocks",
"ItemSodaPepsi",
"MortarBucket"
] call BIS_fnc_selectRandom;

_Gear7 = [
"ItemMorphine",
"ItemBandage",
"ItemBriefcase100oz",
"ItemAntibiotic",
"ItemPainkiller",
"FoodMRE",
"ItemGoldBar",
"ItemCanvas",
"CinderBlocks",
"ItemSodaPepsi",
"MortarBucket"
] call BIS_fnc_selectRandom;

_AISkills = [    
    ["aimingAccuracy",0.20,0.25],
    ["aimingShake",0.85,0.95],
    ["aimingSpeed",0.80,0.90],
    ["endurance",0.80,0.90],
    ["spotDistance",0.70,0.85],
    ["spotTime",0.70,0.85],
    ["courage",0.80,1.00],
    ["reloadSpeed",0.80,0.90],
    ["commanding",0.80,0.90],
    ["general",0.80,1.00]
];


//------------------------------------------------------------------------------------------------------------------------------------------------------------//
/////////////////////////////////////////////////If _aicustomgear = true; customize the gear////////////////////////////////////////////////////////////////////
//------------------------------------------------------------------------------------------------------------------------------------------------------------//


 
 
 
_loot_box = "USVehicleBox";
_loot_lists = [
[
["M9SD","FN_FAL","M4A3_CCO_EP1","AKS_74_kobra","Sa58V_RCO_EP1","ItemEtool","ItemCrowbar","ItemKnife","ItemSledge","ItemCompass","Binocular","Binocular_Vector","NVGoggles","ItemGPS"],
["ItemBriefcase100oz","150Rnd_127x107_DSHKM","20Rnd_762x51_FNFAL","20Rnd_762x51_FNFAL","20Rnd_762x51_FNFAL","30Rnd_762x39_SA58","30Rnd_762x39_SA58","30Rnd_762x39_SA58","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_545x39_AK","30Rnd_545x39_AK","30Rnd_545x39_AK","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD"]
],
[
["M4A1_HWS_GL_SD_Camo","M16A2GL","M16A4","M16A4_GL","M16A4_ACG_GL","M16A4_ACG","M4A1","M4A1_HWS_GL","M4A1_HWS_GL_camo","M4A1_HWS_GL_SD_Camo","M4A1_RCO_GL","M4A1_Aim","M4A1_Aim_camo","M4A1_AIM_SD_camo"],
["ItemBriefcase100oz","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor"]
],
[
["ItemToolbox","M4A1_HWS_GL_SD_Camo","M16A2GL","M16A4","M16A4_GL","M16A4_ACG_GL","M16A4_ACG","M4A1","M4A1_HWS_GL","M4A1_HWS_GL_camo","M4A1_HWS_GL_SD_Camo","M4A1_RCO_GL","M4A1_Aim","M4A1_Aim_camo","M4A1_AIM_SD_camo"],
["15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor"]
],
[
["ChainSaw"],
["ItemBriefcase100oz","ItemBriefcase100oz","ItemCorrugated","ItemCorrugated","ItemCorrugated","ItemCorrugated","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemComboLock","ItemGenerator"]
],
[
["Mk_48_DZ","M240_DZ","RPK_74"],
["ItemBriefcase100oz","100Rnd_762x51_M240","100Rnd_762x51_M240","200Rnd_556x45_M249","100Rnd_556x45_BetaCMag","100Rnd_762x51_M240","200Rnd_556x45_M249","100Rnd_556x45_BetaCMag","100Rnd_762x51_M240","200Rnd_556x45_M249","100Rnd_556x45_BetaCMag","100Rnd_762x51_M240","200Rnd_556x45_M249","100Rnd_556x45_BetaCMag","100Rnd_762x51_M240","200Rnd_556x45_M249","100Rnd_762x51_M240","100Rnd_762x51_M240","200Rnd_556x45_M249","2000Rnd_762x51_M134","2000Rnd_762x51_M134","ItemAVE","ItemLRK","ItemTNK","ItemARM","ItemORP","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked"]
],
[
["M4A1_HWS_GL_SD_Camo","M16A2GL","M16A4","M16A4_GL","M16A4_ACG_GL","M16A4_ACG","M4A1","M4A1_HWS_GL","M4A1_HWS_GL_camo","M4A1_HWS_GL_SD_Camo","M4A1_RCO_GL","M4A1_Aim","M4A1_Aim_camo","M4A1_AIM_SD_camo"],
["ItemBriefcase100oz","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","FoodCanFrankBeans","FoodCanFrankBeans","FoodCanBakedBeans","FoodMRE","HandGrenade_east","2000Rnd_762x51_M134","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks"]
],
[
["VSS_vintorez","Saiga12K","M8_compact"],
["ItemBriefcase100oz","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","HandGrenade_east","HandGrenade_east","FoodCanSardines","FoodMRE","FoodPistachio","FoodNutmix","FoodMRE","FoodPistachio","FoodNutmix","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks"]
]
];
_loot = _loot_lists call BIS_fnc_selectRandom;
_loot2 = _loot_lists call BIS_fnc_selectRandom;

_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");
};

EPOCH_EVENT_RUNNING = true;

// 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["Spawning loot event at %1", _position]);

_event_marker = createMarker [ format ["loot_event_marker_%1", _start_time], _position];
_event_marker setMarkerShape "ELLIPSE";
_event_marker setMarkerType "Cricle01";
_event_marker setMarkerColor "ColorBlack";
_event_marker setMarkerAlpha 0.8;
_event_marker setMarkerBrush "DiagGrid";
_event_marker setMarkerSize [(_markerRadius + 50), (_markerRadius + 50)];
 
_loot_pos = [_position,0,(_markerRadius - 100),10,0,2000,0] call BIS_fnc_findSafePos;
 
if (_debug) then {
_debug_marker = createMarker [ format ["loot_event_debug_marker_%1", _start_time], _loot_pos];
_debug_marker setMarkerText "BOMBCRATE";
_debug_marker setMarkerShape "ICON";
_debug_marker setMarkerType "SupplyVehicle";
_debug_marker setMarkerColor "ColorRed";
_debug_marker setMarkerAlpha 1;
_debug_marker setMarkerSize [1,1];
};
 
diag_log(format["Creating ammo box at %1", _loot_pos]);
 
// Create ammo box
_loot_box = createVehicle [_loot_box,_loot_pos,[], 0, "NONE"];
clearMagazineCargoGlobal _loot_box;
clearWeaponCargoGlobal _loot_box;
_loot_box setVariable ["permaLoot",true];
 
// Cut the grass around the loot position
_clutter = createVehicle ["ClutterCutter_small_2_EP1", _loot_pos, [], 0, "CAN_COLLIDE"];
_clutter setPos _loot_pos;
// cut the grass    end
 
// Add loot
{
_loot_box addWeaponCargoGlobal [_x,1];
} forEach (_loot select 0);
{
_loot_box addMagazineCargoGlobal [_x,1];
} forEach (_loot select 1);
{
_loot_box addWeaponCargoGlobal [_x,1];
} forEach (_loot2 select 0);
{
_loot_box addMagazineCargoGlobal [_x,1];
} forEach (_loot2 select 1);
 
// Send Top Right message to users , requires Remote message script
//_hint = parseText format["<t align='center' color='#0D00FF' shadow='2' size='1.75'>THERS A BOMB CRATE!, Check your Map for the Location!</t><br/><t align='center' color='#ffffff'>THERS A BOMB CRATE!, Check your Map for the Location!</t>"];
//customRemoteMessage = ['hint', _hint];
//publicVariable "customRemoteMessage";

// Send center message to users
[nil,nil,rTitleText,"THERS A BOMB CRATE!, Check your Map for the Location!", "PLAIN",10] call RE;
diag_log(format["Loot event setup, waiting for %1 seconds", _wait_time]);


if (_spawnenemys) then {
//define side for ai
_this = createCenter east;

_this setFriend [west, 0];

_center_1 = _this;
_group_1 = createGroup _center_1;
//

//spawnai
_enemy = objNull;
_enemy = _group_1 createUnit [_enemytype,_loot_pos,[],0,"CAN_COLLIDE"];    
_enemy enableAI "TARGET";
_enemy enableAI "AUTOTARGET";
_enemy enableAI "MOVE";
_enemy enableAI "ANIM";
_enemy enableAI "FSM";
_enemy setCombatMode "YELLOW";
_enemy setBehaviour "COMBAT";
_enemy setSkill _AISkills;

 

_enemy1 = objNull;
_enemy1 = _group_1 createUnit [_enemytype,_loot_pos,[],0,"CAN_COLLIDE"];
_enemy1 enableAI "TARGET";
_enemy1 enableAI "AUTOTARGET";
_enemy1 enableAI "MOVE";
_enemy1 enableAI "ANIM";
_enemy1 enableAI "FSM";
_enemy1 setCombatMode "YELLOW";
_enemy1 setBehaviour "COMBAT";
_enemy1 setSkill _AISkills;


_enemy2 = objNull;
_enemy2 = _group_1 createUnit [_enemytype,_loot_pos,[],0,"CAN_COLLIDE"];
_enemy2 enableAI "TARGET";
_enemy2 enableAI "AUTOTARGET";
_enemy2 enableAI "MOVE";
_enemy2 enableAI "ANIM";
_enemy2 enableAI "FSM";
_enemy2 setCombatMode "YELLOW";
_enemy2 setBehaviour "COMBAT";
_enemy2 setSkill _AISkills;


_enemy3 = objNull;
_enemy3 = _group_1 createUnit [_enemytype,_loot_pos,[],0,"CAN_COLLIDE"];
_enemy3 enableAI "TARGET";
_enemy3 enableAI "AUTOTARGET";
_enemy3 enableAI "MOVE";
_enemy3 enableAI "ANIM";
_enemy3 enableAI "FSM";
_enemy3 setCombatMode "YELLOW";
_enemy3 setBehaviour "COMBAT";
_enemy3 setSkill _AISkills;


_enemy4 = objNull;
_enemy4 = _group_1 createUnit [_enemytype,_loot_pos,[],0,"CAN_COLLIDE"];
_enemy4 enableAI "TARGET";
_enemy4 enableAI "AUTOTARGET";
_enemy4 enableAI "MOVE";
_enemy4 enableAI "ANIM";
_enemy4 enableAI "FSM";
_enemy4 setCombatMode "YELLOW";
_enemy4 setBehaviour "COMBAT";
_enemy4 setSkill _AISkills;
    
_enemy5 = objNull;
_enemy5 = _group_1 createUnit [_enemytype,_loot_pos,[],0,"CAN_COLLIDE"];
_enemy5 enableAI "TARGET";
_enemy5 enableAI "AUTOTARGET";
_enemy5 enableAI "MOVE";
_enemy5 enableAI "ANIM";
_enemy5 enableAI "FSM";
_enemy5 setCombatMode "YELLOW";
_enemy5 setBehaviour "COMBAT";
_enemy5 setSkill _AISkills;


_enemy6 = objNull;
_enemy6 = _group_1 createUnit [_enemytype,_loot_pos,[],0,"CAN_COLLIDE"];
_enemy6 enableAI "TARGET";
_enemy6 enableAI "AUTOTARGET";
_enemy6 enableAI "MOVE";
_enemy6 enableAI "ANIM";
_enemy6 enableAI "FSM";
_enemy6 setCombatMode "YELLOW";
_enemy6 setBehaviour "COMBAT";
_enemy6 setSkill _AISkills;

_enemy7 = objNull;
_enemy7 = _group_1 createUnit [_enemytype,_loot_pos,[],0,"CAN_COLLIDE"];
_enemy7 enableAI "TARGET";
_enemy7 enableAI "AUTOTARGET";
_enemy7 enableAI "MOVE";
_enemy7 enableAI "ANIM";
_enemy7 enableAI "FSM";
_enemy7 setCombatMode "YELLOW";
_enemy7 setBehaviour "COMBAT";
_enemy7 setSkill _AISkills;

 


//use waypoints : allow ai move
if (_usewaypoints) then {

_xpos = _position select 0;
_ypos = _position select 1;

// These are 4 waypoints in a NorthSEW around the center
_waypos1 = [_xpos, _ypos+20, 0];
_waypos2 = [_xpos+20, _ypos, 0];
_waypos3 = [_xpos, _ypos-20, 0];
_waypos4 = [_xpos-20, _ypos, 0];


_wp1 = _group_1 addWaypoint [_waypos1, _waypointsrange];
_wp1 setWaypointType "MOVE";
_wp2 = _group_1 addWaypoint [_waypos2, _waypointsrange];
_wp2 setWaypointType "MOVE";
_wp3 = _group_1 addWaypoint [_waypos3, _waypointsrange];
_wp3 setWaypointType "MOVE";
_wp4 = _group_1 addWaypoint [_waypos4, _waypointsrange];
_wp4 setWaypointType "MOVE";


_waypointend = _group_1 addWaypoint [[_xpos,_ypos, 0], _waypointsrange];
_waypointend setWaypointType "CYCLE";

};
sleep 1;

//If use aicustomgear
if (_aicustomgear) then {

///////////////////////////////////////remove weapons and magazines
removeAllWeapons _enemy;
removeAllItems _enemy;
removeAllWeapons _enemy1;
removeAllItems _enemy1;
removeAllWeapons _enemy2;
removeAllItems _enemy2;
removeAllWeapons _enemy3;
removeAllItems _enemy3;
removeAllWeapons _enemy4;
removeAllItems _enemy4;
removeAllWeapons _enemy5;
removeAllItems _enemy5;
removeAllWeapons _enemy6;
removeAllItems _enemy6;
removeAllWeapons _enemy7;
removeAllItems _enemy7;

///////////////////////////////////////add weapons and magazines
_enemy addWeapon "G36C_camo";
_enemy addMagazine "30Rnd_556x45_G36";
_enemy addMagazine "30Rnd_556x45_G36";
_enemy addMagazine "30Rnd_556x45_G36";
_enemy addMagazine "30Rnd_556x45_G36";
_enemy addMagazine "30Rnd_556x45_G36";
_enemy addMagazine "30Rnd_556x45_G36";

_enemy1 addWeapon "G36C_camo";
_enemy1 addMagazine "30Rnd_556x45_G36";
_enemy1 addMagazine "30Rnd_556x45_G36";
_enemy1 addMagazine "30Rnd_556x45_G36";
_enemy1 addMagazine "30Rnd_556x45_G36";
_enemy1 addMagazine "30Rnd_556x45_G36";
_enemy1 addMagazine "30Rnd_556x45_G36";

_enemy2 addWeapon "M4A1_HWS_GL_camo";
_enemy2 addMagazine "30Rnd_556x45_Stanag";
_enemy2 addMagazine "30Rnd_556x45_Stanag";
_enemy2 addMagazine "30Rnd_556x45_Stanag";
_enemy2 addMagazine "30Rnd_556x45_Stanag";
_enemy2 addMagazine "30Rnd_556x45_Stanag";
_enemy2 addMagazine "30Rnd_556x45_Stanag";

_enemy3 addWeapon "M4A1_HWS_GL_camo";
_enemy3 addMagazine "30Rnd_556x45_Stanag";
_enemy3 addMagazine "30Rnd_556x45_Stanag";
_enemy3 addMagazine "30Rnd_556x45_Stanag";
_enemy3 addMagazine "30Rnd_556x45_Stanag";
_enemy3 addMagazine "30Rnd_556x45_Stanag";
_enemy3 addMagazine "30Rnd_556x45_Stanag";

_enemy4 addWeapon "AKS74U_DZ";
_enemy4 addMagazine "30Rnd_545x39_AK";
_enemy4 addMagazine "30Rnd_545x39_AK";
_enemy4 addMagazine "30Rnd_545x39_AK";
_enemy4 addMagazine "30Rnd_545x39_AK";
_enemy4 addMagazine "30Rnd_545x39_AK";
_enemy4 addMagazine "30Rnd_545x39_AK";

_enemy5 addWeapon "FNFAL_DZ";
_enemy5 addMagazine "20Rnd_762x51_FNFAL";
_enemy5 addMagazine "20Rnd_762x51_FNFAL";
_enemy5 addMagazine "20Rnd_762x51_FNFAL";
_enemy5 addMagazine "20Rnd_762x51_FNFAL";
_enemy5 addMagazine "20Rnd_762x51_FNFAL";
_enemy5 addMagazine "20Rnd_762x51_FNFAL";

_enemy6 addWeapon "M249_DZ";
_enemy6 addMagazine "100Rnd_556x45_M249";
_enemy6 addMagazine "100Rnd_556x45_M249";
_enemy6 addMagazine "100Rnd_556x45_M249";
_enemy6 addMagazine "100Rnd_556x45_M249";

_enemy7 addWeapon "M24_DZ";
_enemy7 addMagazine "5Rnd_762x51_M24";
_enemy7 addMagazine "5Rnd_762x51_M24";
_enemy7 addMagazine "5Rnd_762x51_M24";
_enemy7 addMagazine "5Rnd_762x51_M24";
_enemy7 addMagazine "5Rnd_762x51_M24";
_enemy7 addMagazine "5Rnd_762x51_M24";
//////////////////////////////////////////////

//add items
_enemy addMagazine _Gear0;
_enemy addMagazine _Gear1;
_enemy1 addMagazine _Gear1;
_enemy1 addMagazine _Gear2;
_enemy2 addMagazine _Gear2;
_enemy2 addMagazine _Gear3;
_enemy3 addMagazine _Gear3;
_enemy3 addMagazine _Gear4;
_enemy4 addMagazine _Gear4;
_enemy4 addMagazine _Gear5;
_enemy5 addMagazine _Gear5;
_enemy5 addMagazine _Gear6;
_enemy6 addMagazine _Gear6;
_enemy6 addMagazine _Gear7;
_enemy7 addMagazine _Gear7;
_enemy7 addMagazine _Gear0;


//add backpacks
_enemy addBackpack _Packlist;
_enemy1 addBackpack _Packlist;
_enemy2 addBackpack _Packlist;
_enemy3 addBackpack _Packlist;
_enemy4 addBackpack _Packlist;
_enemy5 addBackpack _Packlist;
_enemy6 addBackpack _Packlist;
_enemy7 addBackpack _Packlist;
};
sleep 1;
//endspawn enemys
};

 

 

waitUntil{{isPlayer _x && _x distance _loot_box < 10  } count playableunits > 0};
[nil,nil,rTitleText,"BOMBCRATE IS ACTIVE NOW -25 SECONDS BEFORE EXPLODE!", "PLAIN",10] call RE;
_timer = 30;//change me if u want more o less time before bomb explode

//#############################CREATE THE BOMB FUNCTION TO EXPLODE############################//
bombexp = {
_bomb = ["HelicopterExploSmall","HelicopterExploBig","Bo_GBU12_LGB"] call BIS_fnc_selectRandom;
_dabomb = objNull;
if (true) then
{
_this = createVehicle [_bomb,_positionobj, [], 2, "CAN_COLLIDE"];
_dabomb = _this;
};
};
//############################EXIT FROM HERE#################################################//


sleep 1;
   
 


_mark = "RoadFlare" createVehicle getPosATL _loot_box;
_mark attachTo [_loot_box, [0,0,-1]];
_positionobj = getPosATL _loot_box;    

 

sleep _timer;
{
if ((isPlayer _x) && (_x distance _loot_box < 15)) then {                                                                                                                                                                                        
_x setDamage 1;
};
} count playableUnits; 
call bombexp;

 

 
// Clean up
EPOCH_EVENT_RUNNING = false;
deleteVehicle _mark;
deleteVehicle _loot_box;
deleteMarker _event_marker;
if (_debug) then {
deleteMarker _debug_marker;
};
if (_spawnenemys) then {
deleteVehicle _enemy;
deleteVehicle _enemy1;
deleteVehicle _enemy2;
deleteVehicle _enemy3;
deleteVehicle _enemy4;
deleteVehicle _enemy5;
deleteVehicle _enemy6;
deleteVehicle _enemy7;
}; 

 

 

 

Share this post


Link to post
Share on other sites
15 hours ago, juandayz said:

 

 

bombcrate special edition :biggrin: fixed for you

  Reveal hidden contents


//bombcrate by juandayz with base on rubbletown and 4 sidemissions

private ["_timer","_spawnChance", "_spawnMarker", "_spawnRadius", "_markerRadius", "_item", "_debug", "_start_time", "_loot","_loot2", "_loot_amount", "_loot_box", "_wait_time", "_spawnRoll", "_position", "_event_marker", "_loot_pos", "_debug_marker","_loot_box", "_hint","_spawnenemys","_enemytype","_aicustomgear","_usewaypoints","_waypointsrange","_enemy","_enemy2","_enemy3","_enemy4","_enemy1","_enemy5","_enemy6","_enemy7"];
 
_spawnChance =  0.70; // Percentage chance of event happening
_markerRadius = 250; // Radius the loot can spawn and used for the marker
_debug = true; // Puts a marker exactly were the loot spawns
 

_spawnenemys = true; //allow or disallow enemy AI
_enemytype = ["TK_Commander_EP1","RU_Soldier_AR","Ins_Commander","RU_Soldier_TL","TK_Soldier_SL_EP1"] call BIS_fnc_selectRandom;
_aicustomgear = true;//allow custom gear on ai
_usewaypoints = true; //allow ai to move around
_waypointsrange = 20;//range to move ai for waypoints
 
 
//------------------------------------------------------------------------------------------------------------------------------------------------------------//
/////////////////////////////////////////////////If _aicustomgear = true; customize the gear////////////////////////////////////////////////////////////////////
//------------------------------------------------------------------------------------------------------------------------------------------------------------//
_Packlist = [
"DZ_Patrol_Pack_EP1",
"DZ_Assault_Pack_EP1",
"DZ_Czech_Vest_Pouch",
"DZ_ALICE_Pack_EP1",
"DZ_TK_Assault_Pack_EP1",
"DZ_British_ACU",
"DZ_CivilBackpack_EP1",
"DZ_Backpack_EP1"
]call BIS_fnc_selectRandom;

_Gear0 = [
"ItemMorphine",
"ItemBandage",
"ItemBriefcase100oz",
"ItemAntibiotic",
"ItemPainkiller",
"FoodMRE",
"ItemGoldBar",
"ItemCanvas",
"CinderBlocks",
"ItemSodaPepsi",
"MortarBucket"
] call BIS_fnc_selectRandom;

_Gear1 = [
"ItemMorphine",
"ItemBandage",
"ItemBriefcase100oz",
"ItemAntibiotic",
"ItemPainkiller",
"FoodMRE",
"ItemGoldBar",
"ItemCanvas",
"CinderBlocks",
"ItemSodaPepsi",
"MortarBucket"
] call BIS_fnc_selectRandom;

_Gear2 = [
"ItemMorphine",
"ItemBandage",
"ItemBriefcase100oz",
"ItemAntibiotic",
"ItemPainkiller",
"FoodMRE",
"ItemGoldBar",
"ItemCanvas",
"CinderBlocks",
"ItemSodaPepsi",
"MortarBucket"
] call BIS_fnc_selectRandom;

_Gear3 = [
"ItemMorphine",
"ItemBandage",
"ItemBriefcase100oz",
"ItemAntibiotic",
"ItemPainkiller",
"FoodMRE",
"ItemGoldBar",
"ItemCanvas",
"CinderBlocks",
"ItemSodaPepsi",
"MortarBucket"
] call BIS_fnc_selectRandom;

_Gear4 = [
"ItemMorphine",
"ItemBandage",
"ItemBriefcase100oz",
"ItemAntibiotic",
"ItemPainkiller",
"FoodMRE",
"ItemGoldBar",
"ItemCanvas",
"CinderBlocks",
"ItemSodaPepsi",
"MortarBucket"
] call BIS_fnc_selectRandom;

_Gear5 = [
"ItemMorphine",
"ItemBandage",
"ItemBriefcase100oz",
"ItemAntibiotic",
"ItemPainkiller",
"FoodMRE",
"ItemGoldBar",
"ItemCanvas",
"CinderBlocks",
"ItemSodaPepsi",
"MortarBucket"
] call BIS_fnc_selectRandom;

_Gear6 = [
"ItemMorphine",
"ItemBandage",
"ItemBriefcase100oz",
"ItemAntibiotic",
"ItemPainkiller",
"FoodMRE",
"ItemGoldBar",
"ItemCanvas",
"CinderBlocks",
"ItemSodaPepsi",
"MortarBucket"
] call BIS_fnc_selectRandom;

_Gear7 = [
"ItemMorphine",
"ItemBandage",
"ItemBriefcase100oz",
"ItemAntibiotic",
"ItemPainkiller",
"FoodMRE",
"ItemGoldBar",
"ItemCanvas",
"CinderBlocks",
"ItemSodaPepsi",
"MortarBucket"
] call BIS_fnc_selectRandom;

_AISkills = [    
    ["aimingAccuracy",0.20,0.25],
    ["aimingShake",0.85,0.95],
    ["aimingSpeed",0.80,0.90],
    ["endurance",0.80,0.90],
    ["spotDistance",0.70,0.85],
    ["spotTime",0.70,0.85],
    ["courage",0.80,1.00],
    ["reloadSpeed",0.80,0.90],
    ["commanding",0.80,0.90],
    ["general",0.80,1.00]
];


//------------------------------------------------------------------------------------------------------------------------------------------------------------//
/////////////////////////////////////////////////If _aicustomgear = true; customize the gear////////////////////////////////////////////////////////////////////
//------------------------------------------------------------------------------------------------------------------------------------------------------------//


 
 
 
_loot_box = "USVehicleBox";
_loot_lists = [
[
["M9SD","FN_FAL","M4A3_CCO_EP1","AKS_74_kobra","Sa58V_RCO_EP1","ItemEtool","ItemCrowbar","ItemKnife","ItemSledge","ItemCompass","Binocular","Binocular_Vector","NVGoggles","ItemGPS"],
["ItemBriefcase100oz","150Rnd_127x107_DSHKM","20Rnd_762x51_FNFAL","20Rnd_762x51_FNFAL","20Rnd_762x51_FNFAL","30Rnd_762x39_SA58","30Rnd_762x39_SA58","30Rnd_762x39_SA58","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_545x39_AK","30Rnd_545x39_AK","30Rnd_545x39_AK","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD"]
],
[
["M4A1_HWS_GL_SD_Camo","M16A2GL","M16A4","M16A4_GL","M16A4_ACG_GL","M16A4_ACG","M4A1","M4A1_HWS_GL","M4A1_HWS_GL_camo","M4A1_HWS_GL_SD_Camo","M4A1_RCO_GL","M4A1_Aim","M4A1_Aim_camo","M4A1_AIM_SD_camo"],
["ItemBriefcase100oz","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor"]
],
[
["ItemToolbox","M4A1_HWS_GL_SD_Camo","M16A2GL","M16A4","M16A4_GL","M16A4_ACG_GL","M16A4_ACG","M4A1","M4A1_HWS_GL","M4A1_HWS_GL_camo","M4A1_HWS_GL_SD_Camo","M4A1_RCO_GL","M4A1_Aim","M4A1_Aim_camo","M4A1_AIM_SD_camo"],
["15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor"]
],
[
["ChainSaw"],
["ItemBriefcase100oz","ItemBriefcase100oz","ItemCorrugated","ItemCorrugated","ItemCorrugated","ItemCorrugated","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemComboLock","ItemGenerator"]
],
[
["Mk_48_DZ","M240_DZ","RPK_74"],
["ItemBriefcase100oz","100Rnd_762x51_M240","100Rnd_762x51_M240","200Rnd_556x45_M249","100Rnd_556x45_BetaCMag","100Rnd_762x51_M240","200Rnd_556x45_M249","100Rnd_556x45_BetaCMag","100Rnd_762x51_M240","200Rnd_556x45_M249","100Rnd_556x45_BetaCMag","100Rnd_762x51_M240","200Rnd_556x45_M249","100Rnd_556x45_BetaCMag","100Rnd_762x51_M240","200Rnd_556x45_M249","100Rnd_762x51_M240","100Rnd_762x51_M240","200Rnd_556x45_M249","2000Rnd_762x51_M134","2000Rnd_762x51_M134","ItemAVE","ItemLRK","ItemTNK","ItemARM","ItemORP","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked"]
],
[
["M4A1_HWS_GL_SD_Camo","M16A2GL","M16A4","M16A4_GL","M16A4_ACG_GL","M16A4_ACG","M4A1","M4A1_HWS_GL","M4A1_HWS_GL_camo","M4A1_HWS_GL_SD_Camo","M4A1_RCO_GL","M4A1_Aim","M4A1_Aim_camo","M4A1_AIM_SD_camo"],
["ItemBriefcase100oz","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","FoodCanFrankBeans","FoodCanFrankBeans","FoodCanBakedBeans","FoodMRE","HandGrenade_east","2000Rnd_762x51_M134","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks"]
],
[
["VSS_vintorez","Saiga12K","M8_compact"],
["ItemBriefcase100oz","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","HandGrenade_east","HandGrenade_east","FoodCanSardines","FoodMRE","FoodPistachio","FoodNutmix","FoodMRE","FoodPistachio","FoodNutmix","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks"]
]
];
_loot = _loot_lists call BIS_fnc_selectRandom;
_loot2 = _loot_lists call BIS_fnc_selectRandom;

_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");
};

EPOCH_EVENT_RUNNING = true;

// 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["Spawning loot event at %1", _position]);

_event_marker = createMarker [ format ["loot_event_marker_%1", _start_time], _position];
_event_marker setMarkerShape "ELLIPSE";
_event_marker setMarkerType "Cricle01";
_event_marker setMarkerColor "ColorBlack";
_event_marker setMarkerAlpha 0.8;
_event_marker setMarkerBrush "DiagGrid";
_event_marker setMarkerSize [(_markerRadius + 50), (_markerRadius + 50)];
 
_loot_pos = [_position,0,(_markerRadius - 100),10,0,2000,0] call BIS_fnc_findSafePos;
 
if (_debug) then {
_debug_marker = createMarker [ format ["loot_event_debug_marker_%1", _start_time], _loot_pos];
_debug_marker setMarkerText "BOMBCRATE";
_debug_marker setMarkerShape "ICON";
_debug_marker setMarkerType "SupplyVehicle";
_debug_marker setMarkerColor "ColorRed";
_debug_marker setMarkerAlpha 1;
_debug_marker setMarkerSize [1,1];
};
 
diag_log(format["Creating ammo box at %1", _loot_pos]);
 
// Create ammo box
_loot_box = createVehicle [_loot_box,_loot_pos,[], 0, "NONE"];
clearMagazineCargoGlobal _loot_box;
clearWeaponCargoGlobal _loot_box;
_loot_box setVariable ["permaLoot",true];
 
// Cut the grass around the loot position
_clutter = createVehicle ["ClutterCutter_small_2_EP1", _loot_pos, [], 0, "CAN_COLLIDE"];
_clutter setPos _loot_pos;
// cut the grass    end
 
// Add loot
{
_loot_box addWeaponCargoGlobal [_x,1];
} forEach (_loot select 0);
{
_loot_box addMagazineCargoGlobal [_x,1];
} forEach (_loot select 1);
{
_loot_box addWeaponCargoGlobal [_x,1];
} forEach (_loot2 select 0);
{
_loot_box addMagazineCargoGlobal [_x,1];
} forEach (_loot2 select 1);
 
// Send Top Right message to users , requires Remote message script
//_hint = parseText format["<t align='center' color='#0D00FF' shadow='2' size='1.75'>THERS A BOMB CRATE!, Check your Map for the Location!</t><br/><t align='center' color='#ffffff'>THERS A BOMB CRATE!, Check your Map for the Location!</t>"];
//customRemoteMessage = ['hint', _hint];
//publicVariable "customRemoteMessage";

// Send center message to users
[nil,nil,rTitleText,"THERS A BOMB CRATE!, Check your Map for the Location!", "PLAIN",10] call RE;
diag_log(format["Loot event setup, waiting for %1 seconds", _wait_time]);


if (_spawnenemys) then {
//define side for ai
_this = createCenter east;

_this setFriend [west, 0];

_center_1 = _this;
_group_1 = createGroup _center_1;
//

//spawnai
_enemy = objNull;
_enemy = _group_1 createUnit [_enemytype,_loot_pos,[],0,"CAN_COLLIDE"];    
_enemy enableAI "TARGET";
_enemy enableAI "AUTOTARGET";
_enemy enableAI "MOVE";
_enemy enableAI "ANIM";
_enemy enableAI "FSM";
_enemy setCombatMode "YELLOW";
_enemy setBehaviour "COMBAT";
_enemy setSkill _AISkills;

 

_enemy1 = objNull;
_enemy1 = _group_1 createUnit [_enemytype,_loot_pos,[],0,"CAN_COLLIDE"];
_enemy1 enableAI "TARGET";
_enemy1 enableAI "AUTOTARGET";
_enemy1 enableAI "MOVE";
_enemy1 enableAI "ANIM";
_enemy1 enableAI "FSM";
_enemy1 setCombatMode "YELLOW";
_enemy1 setBehaviour "COMBAT";
_enemy1 setSkill _AISkills;


_enemy2 = objNull;
_enemy2 = _group_1 createUnit [_enemytype,_loot_pos,[],0,"CAN_COLLIDE"];
_enemy2 enableAI "TARGET";
_enemy2 enableAI "AUTOTARGET";
_enemy2 enableAI "MOVE";
_enemy2 enableAI "ANIM";
_enemy2 enableAI "FSM";
_enemy2 setCombatMode "YELLOW";
_enemy2 setBehaviour "COMBAT";
_enemy2 setSkill _AISkills;


_enemy3 = objNull;
_enemy3 = _group_1 createUnit [_enemytype,_loot_pos,[],0,"CAN_COLLIDE"];
_enemy3 enableAI "TARGET";
_enemy3 enableAI "AUTOTARGET";
_enemy3 enableAI "MOVE";
_enemy3 enableAI "ANIM";
_enemy3 enableAI "FSM";
_enemy3 setCombatMode "YELLOW";
_enemy3 setBehaviour "COMBAT";
_enemy3 setSkill _AISkills;


_enemy4 = objNull;
_enemy4 = _group_1 createUnit [_enemytype,_loot_pos,[],0,"CAN_COLLIDE"];
_enemy4 enableAI "TARGET";
_enemy4 enableAI "AUTOTARGET";
_enemy4 enableAI "MOVE";
_enemy4 enableAI "ANIM";
_enemy4 enableAI "FSM";
_enemy4 setCombatMode "YELLOW";
_enemy4 setBehaviour "COMBAT";
_enemy4 setSkill _AISkills;
    
_enemy5 = objNull;
_enemy5 = _group_1 createUnit [_enemytype,_loot_pos,[],0,"CAN_COLLIDE"];
_enemy5 enableAI "TARGET";
_enemy5 enableAI "AUTOTARGET";
_enemy5 enableAI "MOVE";
_enemy5 enableAI "ANIM";
_enemy5 enableAI "FSM";
_enemy5 setCombatMode "YELLOW";
_enemy5 setBehaviour "COMBAT";
_enemy5 setSkill _AISkills;


_enemy6 = objNull;
_enemy6 = _group_1 createUnit [_enemytype,_loot_pos,[],0,"CAN_COLLIDE"];
_enemy6 enableAI "TARGET";
_enemy6 enableAI "AUTOTARGET";
_enemy6 enableAI "MOVE";
_enemy6 enableAI "ANIM";
_enemy6 enableAI "FSM";
_enemy6 setCombatMode "YELLOW";
_enemy6 setBehaviour "COMBAT";
_enemy6 setSkill _AISkills;

_enemy7 = objNull;
_enemy7 = _group_1 createUnit [_enemytype,_loot_pos,[],0,"CAN_COLLIDE"];
_enemy7 enableAI "TARGET";
_enemy7 enableAI "AUTOTARGET";
_enemy7 enableAI "MOVE";
_enemy7 enableAI "ANIM";
_enemy7 enableAI "FSM";
_enemy7 setCombatMode "YELLOW";
_enemy7 setBehaviour "COMBAT";
_enemy7 setSkill _AISkills;

 


//use waypoints : allow ai move
if (_usewaypoints) then {

_xpos = _position select 0;
_ypos = _position select 1;

// These are 4 waypoints in a NorthSEW around the center
_waypos1 = [_xpos, _ypos+20, 0];
_waypos2 = [_xpos+20, _ypos, 0];
_waypos3 = [_xpos, _ypos-20, 0];
_waypos4 = [_xpos-20, _ypos, 0];


_wp1 = _group_1 addWaypoint [_waypos1, _waypointsrange];
_wp1 setWaypointType "MOVE";
_wp2 = _group_1 addWaypoint [_waypos2, _waypointsrange];
_wp2 setWaypointType "MOVE";
_wp3 = _group_1 addWaypoint [_waypos3, _waypointsrange];
_wp3 setWaypointType "MOVE";
_wp4 = _group_1 addWaypoint [_waypos4, _waypointsrange];
_wp4 setWaypointType "MOVE";


_waypointend = _group_1 addWaypoint [[_xpos,_ypos, 0], _waypointsrange];
_waypointend setWaypointType "CYCLE";

};
sleep 1;

//If use aicustomgear
if (_aicustomgear) then {

///////////////////////////////////////remove weapons and magazines
removeAllWeapons _enemy;
removeAllItems _enemy;
removeAllWeapons _enemy1;
removeAllItems _enemy1;
removeAllWeapons _enemy2;
removeAllItems _enemy2;
removeAllWeapons _enemy3;
removeAllItems _enemy3;
removeAllWeapons _enemy4;
removeAllItems _enemy4;
removeAllWeapons _enemy5;
removeAllItems _enemy5;
removeAllWeapons _enemy6;
removeAllItems _enemy6;
removeAllWeapons _enemy7;
removeAllItems _enemy7;

///////////////////////////////////////add weapons and magazines
_enemy addWeapon "G36C_camo";
_enemy addMagazine "30Rnd_556x45_G36";
_enemy addMagazine "30Rnd_556x45_G36";
_enemy addMagazine "30Rnd_556x45_G36";
_enemy addMagazine "30Rnd_556x45_G36";
_enemy addMagazine "30Rnd_556x45_G36";
_enemy addMagazine "30Rnd_556x45_G36";

_enemy1 addWeapon "G36C_camo";
_enemy1 addMagazine "30Rnd_556x45_G36";
_enemy1 addMagazine "30Rnd_556x45_G36";
_enemy1 addMagazine "30Rnd_556x45_G36";
_enemy1 addMagazine "30Rnd_556x45_G36";
_enemy1 addMagazine "30Rnd_556x45_G36";
_enemy1 addMagazine "30Rnd_556x45_G36";

_enemy2 addWeapon "M4A1_HWS_GL_camo";
_enemy2 addMagazine "30Rnd_556x45_Stanag";
_enemy2 addMagazine "30Rnd_556x45_Stanag";
_enemy2 addMagazine "30Rnd_556x45_Stanag";
_enemy2 addMagazine "30Rnd_556x45_Stanag";
_enemy2 addMagazine "30Rnd_556x45_Stanag";
_enemy2 addMagazine "30Rnd_556x45_Stanag";

_enemy3 addWeapon "M4A1_HWS_GL_camo";
_enemy3 addMagazine "30Rnd_556x45_Stanag";
_enemy3 addMagazine "30Rnd_556x45_Stanag";
_enemy3 addMagazine "30Rnd_556x45_Stanag";
_enemy3 addMagazine "30Rnd_556x45_Stanag";
_enemy3 addMagazine "30Rnd_556x45_Stanag";
_enemy3 addMagazine "30Rnd_556x45_Stanag";

_enemy4 addWeapon "AKS74U_DZ";
_enemy4 addMagazine "30Rnd_545x39_AK";
_enemy4 addMagazine "30Rnd_545x39_AK";
_enemy4 addMagazine "30Rnd_545x39_AK";
_enemy4 addMagazine "30Rnd_545x39_AK";
_enemy4 addMagazine "30Rnd_545x39_AK";
_enemy4 addMagazine "30Rnd_545x39_AK";

_enemy5 addWeapon "FNFAL_DZ";
_enemy5 addMagazine "20Rnd_762x51_FNFAL";
_enemy5 addMagazine "20Rnd_762x51_FNFAL";
_enemy5 addMagazine "20Rnd_762x51_FNFAL";
_enemy5 addMagazine "20Rnd_762x51_FNFAL";
_enemy5 addMagazine "20Rnd_762x51_FNFAL";
_enemy5 addMagazine "20Rnd_762x51_FNFAL";

_enemy6 addWeapon "M249_DZ";
_enemy6 addMagazine "100Rnd_556x45_M249";
_enemy6 addMagazine "100Rnd_556x45_M249";
_enemy6 addMagazine "100Rnd_556x45_M249";
_enemy6 addMagazine "100Rnd_556x45_M249";

_enemy7 addWeapon "M24_DZ";
_enemy7 addMagazine "5Rnd_762x51_M24";
_enemy7 addMagazine "5Rnd_762x51_M24";
_enemy7 addMagazine "5Rnd_762x51_M24";
_enemy7 addMagazine "5Rnd_762x51_M24";
_enemy7 addMagazine "5Rnd_762x51_M24";
_enemy7 addMagazine "5Rnd_762x51_M24";
//////////////////////////////////////////////

//add items
_enemy addMagazine _Gear0;
_enemy addMagazine _Gear1;
_enemy1 addMagazine _Gear1;
_enemy1 addMagazine _Gear2;
_enemy2 addMagazine _Gear2;
_enemy2 addMagazine _Gear3;
_enemy3 addMagazine _Gear3;
_enemy3 addMagazine _Gear4;
_enemy4 addMagazine _Gear4;
_enemy4 addMagazine _Gear5;
_enemy5 addMagazine _Gear5;
_enemy5 addMagazine _Gear6;
_enemy6 addMagazine _Gear6;
_enemy6 addMagazine _Gear7;
_enemy7 addMagazine _Gear7;
_enemy7 addMagazine _Gear0;


//add backpacks
_enemy addBackpack _Packlist;
_enemy1 addBackpack _Packlist;
_enemy2 addBackpack _Packlist;
_enemy3 addBackpack _Packlist;
_enemy4 addBackpack _Packlist;
_enemy5 addBackpack _Packlist;
_enemy6 addBackpack _Packlist;
_enemy7 addBackpack _Packlist;
};
sleep 1;
//endspawn enemys
};

 

 

waitUntil{{isPlayer _x && _x distance _loot_box < 10  } count playableunits > 0};
[nil,nil,rTitleText,"BOMBCRATE IS ACTIVE NOW -25 SECONDS BEFORE EXPLODE!", "PLAIN",10] call RE;
_timer = 30;//change me if u want more o less time before bomb explode

//#############################CREATE THE BOMB FUNCTION TO EXPLODE############################//
bombexp = {
_bomb = ["HelicopterExploSmall","HelicopterExploBig","Bo_GBU12_LGB"] call BIS_fnc_selectRandom;
_dabomb = objNull;
if (true) then
{
_this = createVehicle [_bomb,_positionobj, [], 2, "CAN_COLLIDE"];
_dabomb = _this;
};
};
//############################EXIT FROM HERE#################################################//


sleep 1;
{
if ((isPlayer _x) && (_x distance _loot_box < 15)) then {                                                                                                                                                                                        
_x setDamage 1;
};
} count playableUnits;    
 


_mark = "RoadFlare" createVehicle getPosATL _loot_box;
_mark attachTo [_loot_box, [0,0,-1]];
_positionobj = getPosATL _loot_box;    

 

sleep _timer;
call bombexp;

 

 
// Clean up
EPOCH_EVENT_RUNNING = false;
deleteVehicle _mark;
deleteVehicle _loot_box;
deleteMarker _event_marker;
if (_debug) then {
deleteMarker _debug_marker;
};
if (_spawnenemys) then {
deleteVehicle _enemy;
deleteVehicle _enemy1;
deleteVehicle _enemy2;
deleteVehicle _enemy3;
deleteVehicle _enemy4;
deleteVehicle _enemy5;
deleteVehicle _enemy6;
deleteVehicle _enemy7;
};

 

 

 

Running this "special edition" and when i reach the crate it says exploding in -25 seconds. then i die immediately.  I didn't actually see any information about how to disarm the bomb if i can?

juandayz likes this

Share this post


Link to post
Share on other sites

@kingpapawawa try again mate

Spoiler

//bombcrate by juandayz with base on rubbletown and 4 sidemissions

private ["_playernear","_timer","_spawnChance", "_spawnMarker", "_spawnRadius", "_markerRadius", "_item", "_debug", "_start_time", "_loot","_loot2", "_loot_amount", "_loot_box", "_wait_time", "_spawnRoll", "_position", "_event_marker", "_loot_pos", "_debug_marker","_loot_box", "_hint","_spawnenemys","_enemytype","_aicustomgear","_usewaypoints","_waypointsrange","_enemy","_enemy2","_enemy3","_enemy4","_enemy1","_enemy5","_enemy6","_enemy7"];
 
_spawnChance =  0.70; // Percentage chance of event happening
_markerRadius = 250; // Radius the loot can spawn and used for the marker
_debug = true; // Puts a marker exactly were the loot spawns
 

_spawnenemys = true; //allow or disallow enemy AI
_enemytype = ["TK_Commander_EP1","RU_Soldier_AR","Ins_Commander","RU_Soldier_TL","TK_Soldier_SL_EP1"] call BIS_fnc_selectRandom;
_aicustomgear = true;//allow custom gear on ai
_usewaypoints = true; //allow ai to move around
_waypointsrange = 20;//range to move ai for waypoints
 
 
//------------------------------------------------------------------------------------------------------------------------------------------------------------//
/////////////////////////////////////////////////If _aicustomgear = true; customize the gear////////////////////////////////////////////////////////////////////
//------------------------------------------------------------------------------------------------------------------------------------------------------------//
_Packlist = [
"DZ_Patrol_Pack_EP1",
"DZ_Assault_Pack_EP1",
"DZ_Czech_Vest_Pouch",
"DZ_ALICE_Pack_EP1",
"DZ_TK_Assault_Pack_EP1",
"DZ_British_ACU",
"DZ_CivilBackpack_EP1",
"DZ_Backpack_EP1"
]call BIS_fnc_selectRandom;

_Gear0 = [
"ItemMorphine",
"ItemBandage",
"ItemBriefcase100oz",
"ItemAntibiotic",
"ItemPainkiller",
"FoodMRE",
"ItemGoldBar",
"ItemCanvas",
"CinderBlocks",
"ItemSodaPepsi",
"MortarBucket"
] call BIS_fnc_selectRandom;

_Gear1 = [
"ItemMorphine",
"ItemBandage",
"ItemBriefcase100oz",
"ItemAntibiotic",
"ItemPainkiller",
"FoodMRE",
"ItemGoldBar",
"ItemCanvas",
"CinderBlocks",
"ItemSodaPepsi",
"MortarBucket"
] call BIS_fnc_selectRandom;

_Gear2 = [
"ItemMorphine",
"ItemBandage",
"ItemBriefcase100oz",
"ItemAntibiotic",
"ItemPainkiller",
"FoodMRE",
"ItemGoldBar",
"ItemCanvas",
"CinderBlocks",
"ItemSodaPepsi",
"MortarBucket"
] call BIS_fnc_selectRandom;

_Gear3 = [
"ItemMorphine",
"ItemBandage",
"ItemBriefcase100oz",
"ItemAntibiotic",
"ItemPainkiller",
"FoodMRE",
"ItemGoldBar",
"ItemCanvas",
"CinderBlocks",
"ItemSodaPepsi",
"MortarBucket"
] call BIS_fnc_selectRandom;

_Gear4 = [
"ItemMorphine",
"ItemBandage",
"ItemBriefcase100oz",
"ItemAntibiotic",
"ItemPainkiller",
"FoodMRE",
"ItemGoldBar",
"ItemCanvas",
"CinderBlocks",
"ItemSodaPepsi",
"MortarBucket"
] call BIS_fnc_selectRandom;

_Gear5 = [
"ItemMorphine",
"ItemBandage",
"ItemBriefcase100oz",
"ItemAntibiotic",
"ItemPainkiller",
"FoodMRE",
"ItemGoldBar",
"ItemCanvas",
"CinderBlocks",
"ItemSodaPepsi",
"MortarBucket"
] call BIS_fnc_selectRandom;

_Gear6 = [
"ItemMorphine",
"ItemBandage",
"ItemBriefcase100oz",
"ItemAntibiotic",
"ItemPainkiller",
"FoodMRE",
"ItemGoldBar",
"ItemCanvas",
"CinderBlocks",
"ItemSodaPepsi",
"MortarBucket"
] call BIS_fnc_selectRandom;

_Gear7 = [
"ItemMorphine",
"ItemBandage",
"ItemBriefcase100oz",
"ItemAntibiotic",
"ItemPainkiller",
"FoodMRE",
"ItemGoldBar",
"ItemCanvas",
"CinderBlocks",
"ItemSodaPepsi",
"MortarBucket"
] call BIS_fnc_selectRandom;

_AISkills = [    
    ["aimingAccuracy",0.20,0.25],
    ["aimingShake",0.85,0.95],
    ["aimingSpeed",0.80,0.90],
    ["endurance",0.80,0.90],
    ["spotDistance",0.70,0.85],
    ["spotTime",0.70,0.85],
    ["courage",0.80,1.00],
    ["reloadSpeed",0.80,0.90],
    ["commanding",0.80,0.90],
    ["general",0.80,1.00]
];


//------------------------------------------------------------------------------------------------------------------------------------------------------------//
/////////////////////////////////////////////////If _aicustomgear = true; customize the gear////////////////////////////////////////////////////////////////////
//------------------------------------------------------------------------------------------------------------------------------------------------------------//


 
 
 
_loot_box = "USVehicleBox";
_loot_lists = [
[
["M9SD","FN_FAL","M4A3_CCO_EP1","AKS_74_kobra","Sa58V_RCO_EP1","ItemEtool","ItemCrowbar","ItemKnife","ItemSledge","ItemCompass","Binocular","Binocular_Vector","NVGoggles","ItemGPS"],
["ItemBriefcase100oz","150Rnd_127x107_DSHKM","20Rnd_762x51_FNFAL","20Rnd_762x51_FNFAL","20Rnd_762x51_FNFAL","30Rnd_762x39_SA58","30Rnd_762x39_SA58","30Rnd_762x39_SA58","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_545x39_AK","30Rnd_545x39_AK","30Rnd_545x39_AK","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD"]
],
[
["M4A1_HWS_GL_SD_Camo","M16A2GL","M16A4","M16A4_GL","M16A4_ACG_GL","M16A4_ACG","M4A1","M4A1_HWS_GL","M4A1_HWS_GL_camo","M4A1_HWS_GL_SD_Camo","M4A1_RCO_GL","M4A1_Aim","M4A1_Aim_camo","M4A1_AIM_SD_camo"],
["ItemBriefcase100oz","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor"]
],
[
["ItemToolbox","M4A1_HWS_GL_SD_Camo","M16A2GL","M16A4","M16A4_GL","M16A4_ACG_GL","M16A4_ACG","M4A1","M4A1_HWS_GL","M4A1_HWS_GL_camo","M4A1_HWS_GL_SD_Camo","M4A1_RCO_GL","M4A1_Aim","M4A1_Aim_camo","M4A1_AIM_SD_camo"],
["15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor"]
],
[
["ChainSaw"],
["ItemBriefcase100oz","ItemBriefcase100oz","ItemCorrugated","ItemCorrugated","ItemCorrugated","ItemCorrugated","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemComboLock","ItemGenerator"]
],
[
["Mk_48_DZ","M240_DZ","RPK_74"],
["ItemBriefcase100oz","100Rnd_762x51_M240","100Rnd_762x51_M240","200Rnd_556x45_M249","100Rnd_556x45_BetaCMag","100Rnd_762x51_M240","200Rnd_556x45_M249","100Rnd_556x45_BetaCMag","100Rnd_762x51_M240","200Rnd_556x45_M249","100Rnd_556x45_BetaCMag","100Rnd_762x51_M240","200Rnd_556x45_M249","100Rnd_556x45_BetaCMag","100Rnd_762x51_M240","200Rnd_556x45_M249","100Rnd_762x51_M240","100Rnd_762x51_M240","200Rnd_556x45_M249","2000Rnd_762x51_M134","2000Rnd_762x51_M134","ItemAVE","ItemLRK","ItemTNK","ItemARM","ItemORP","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked"]
],
[
["M4A1_HWS_GL_SD_Camo","M16A2GL","M16A4","M16A4_GL","M16A4_ACG_GL","M16A4_ACG","M4A1","M4A1_HWS_GL","M4A1_HWS_GL_camo","M4A1_HWS_GL_SD_Camo","M4A1_RCO_GL","M4A1_Aim","M4A1_Aim_camo","M4A1_AIM_SD_camo"],
["ItemBriefcase100oz","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","FoodCanFrankBeans","FoodCanFrankBeans","FoodCanBakedBeans","FoodMRE","HandGrenade_east","2000Rnd_762x51_M134","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks"]
],
[
["VSS_vintorez","Saiga12K","M8_compact"],
["ItemBriefcase100oz","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","HandGrenade_east","HandGrenade_east","FoodCanSardines","FoodMRE","FoodPistachio","FoodNutmix","FoodMRE","FoodPistachio","FoodNutmix","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks"]
]
];
_loot = _loot_lists call BIS_fnc_selectRandom;
_loot2 = _loot_lists call BIS_fnc_selectRandom;

_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");
};

EPOCH_EVENT_RUNNING = true;

// 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["Spawning loot event at %1", _position]);

_event_marker = createMarker [ format ["loot_event_marker_%1", _start_time], _position];
_event_marker setMarkerShape "ELLIPSE";
_event_marker setMarkerType "Cricle01";
_event_marker setMarkerColor "ColorBlack";
_event_marker setMarkerAlpha 0.8;
_event_marker setMarkerBrush "DiagGrid";
_event_marker setMarkerSize [(_markerRadius + 50), (_markerRadius + 50)];
 
_loot_pos = [_position,0,(_markerRadius - 100),10,0,2000,0] call BIS_fnc_findSafePos;
 
if (_debug) then {
_debug_marker = createMarker [ format ["loot_event_debug_marker_%1", _start_time], _loot_pos];
_debug_marker setMarkerText "BOMBCRATE";
_debug_marker setMarkerShape "ICON";
_debug_marker setMarkerType "SupplyVehicle";
_debug_marker setMarkerColor "ColorRed";
_debug_marker setMarkerAlpha 1;
_debug_marker setMarkerSize [1,1];
};
 
diag_log(format["Creating ammo box at %1", _loot_pos]);
 
// Create ammo box
_loot_box = createVehicle [_loot_box,_loot_pos,[], 0, "NONE"];
clearMagazineCargoGlobal _loot_box;
clearWeaponCargoGlobal _loot_box;
_loot_box setVariable ["permaLoot",true];
 
// Cut the grass around the loot position
_clutter = createVehicle ["ClutterCutter_small_2_EP1", _loot_pos, [], 0, "CAN_COLLIDE"];
_clutter setPos _loot_pos;
// cut the grass    end
 
// Add loot
{
_loot_box addWeaponCargoGlobal [_x,1];
} forEach (_loot select 0);
{
_loot_box addMagazineCargoGlobal [_x,1];
} forEach (_loot select 1);
{
_loot_box addWeaponCargoGlobal [_x,1];
} forEach (_loot2 select 0);
{
_loot_box addMagazineCargoGlobal [_x,1];
} forEach (_loot2 select 1);
 
// Send Top Right message to users , requires Remote message script
//_hint = parseText format["<t align='center' color='#0D00FF' shadow='2' size='1.75'>THERS A BOMB CRATE!, Check your Map for the Location!</t><br/><t align='center' color='#ffffff'>THERS A BOMB CRATE!, Check your Map for the Location!</t>"];
//customRemoteMessage = ['hint', _hint];
//publicVariable "customRemoteMessage";

// Send center message to users
[nil,nil,rTitleText,"THERS A BOMB CRATE!, Check your Map for the Location!", "PLAIN",10] call RE;
diag_log(format["Loot event setup, waiting for %1 seconds", _wait_time]);


if (_spawnenemys) then {
//define side for ai
_this = createCenter east;

_this setFriend [west, 0];

_center_1 = _this;
_group_1 = createGroup _center_1;
//

//spawnai
_enemy = objNull;
_enemy = _group_1 createUnit [_enemytype,_loot_pos,[],0,"CAN_COLLIDE"];    
_enemy enableAI "TARGET";
_enemy enableAI "AUTOTARGET";
_enemy enableAI "MOVE";
_enemy enableAI "ANIM";
_enemy enableAI "FSM";
_enemy setCombatMode "YELLOW";
_enemy setBehaviour "COMBAT";
_enemy setSkill _AISkills;

 

_enemy1 = objNull;
_enemy1 = _group_1 createUnit [_enemytype,_loot_pos,[],0,"CAN_COLLIDE"];
_enemy1 enableAI "TARGET";
_enemy1 enableAI "AUTOTARGET";
_enemy1 enableAI "MOVE";
_enemy1 enableAI "ANIM";
_enemy1 enableAI "FSM";
_enemy1 setCombatMode "YELLOW";
_enemy1 setBehaviour "COMBAT";
_enemy1 setSkill _AISkills;


_enemy2 = objNull;
_enemy2 = _group_1 createUnit [_enemytype,_loot_pos,[],0,"CAN_COLLIDE"];
_enemy2 enableAI "TARGET";
_enemy2 enableAI "AUTOTARGET";
_enemy2 enableAI "MOVE";
_enemy2 enableAI "ANIM";
_enemy2 enableAI "FSM";
_enemy2 setCombatMode "YELLOW";
_enemy2 setBehaviour "COMBAT";
_enemy2 setSkill _AISkills;


_enemy3 = objNull;
_enemy3 = _group_1 createUnit [_enemytype,_loot_pos,[],0,"CAN_COLLIDE"];
_enemy3 enableAI "TARGET";
_enemy3 enableAI "AUTOTARGET";
_enemy3 enableAI "MOVE";
_enemy3 enableAI "ANIM";
_enemy3 enableAI "FSM";
_enemy3 setCombatMode "YELLOW";
_enemy3 setBehaviour "COMBAT";
_enemy3 setSkill _AISkills;


_enemy4 = objNull;
_enemy4 = _group_1 createUnit [_enemytype,_loot_pos,[],0,"CAN_COLLIDE"];
_enemy4 enableAI "TARGET";
_enemy4 enableAI "AUTOTARGET";
_enemy4 enableAI "MOVE";
_enemy4 enableAI "ANIM";
_enemy4 enableAI "FSM";
_enemy4 setCombatMode "YELLOW";
_enemy4 setBehaviour "COMBAT";
_enemy4 setSkill _AISkills;
    
_enemy5 = objNull;
_enemy5 = _group_1 createUnit [_enemytype,_loot_pos,[],0,"CAN_COLLIDE"];
_enemy5 enableAI "TARGET";
_enemy5 enableAI "AUTOTARGET";
_enemy5 enableAI "MOVE";
_enemy5 enableAI "ANIM";
_enemy5 enableAI "FSM";
_enemy5 setCombatMode "YELLOW";
_enemy5 setBehaviour "COMBAT";
_enemy5 setSkill _AISkills;


_enemy6 = objNull;
_enemy6 = _group_1 createUnit [_enemytype,_loot_pos,[],0,"CAN_COLLIDE"];
_enemy6 enableAI "TARGET";
_enemy6 enableAI "AUTOTARGET";
_enemy6 enableAI "MOVE";
_enemy6 enableAI "ANIM";
_enemy6 enableAI "FSM";
_enemy6 setCombatMode "YELLOW";
_enemy6 setBehaviour "COMBAT";
_enemy6 setSkill _AISkills;

_enemy7 = objNull;
_enemy7 = _group_1 createUnit [_enemytype,_loot_pos,[],0,"CAN_COLLIDE"];
_enemy7 enableAI "TARGET";
_enemy7 enableAI "AUTOTARGET";
_enemy7 enableAI "MOVE";
_enemy7 enableAI "ANIM";
_enemy7 enableAI "FSM";
_enemy7 setCombatMode "YELLOW";
_enemy7 setBehaviour "COMBAT";
_enemy7 setSkill _AISkills;

 


//use waypoints : allow ai move
if (_usewaypoints) then {

_xpos = _position select 0;
_ypos = _position select 1;

// These are 4 waypoints in a NorthSEW around the center
_waypos1 = [_xpos, _ypos+20, 0];
_waypos2 = [_xpos+20, _ypos, 0];
_waypos3 = [_xpos, _ypos-20, 0];
_waypos4 = [_xpos-20, _ypos, 0];


_wp1 = _group_1 addWaypoint [_waypos1, _waypointsrange];
_wp1 setWaypointType "MOVE";
_wp2 = _group_1 addWaypoint [_waypos2, _waypointsrange];
_wp2 setWaypointType "MOVE";
_wp3 = _group_1 addWaypoint [_waypos3, _waypointsrange];
_wp3 setWaypointType "MOVE";
_wp4 = _group_1 addWaypoint [_waypos4, _waypointsrange];
_wp4 setWaypointType "MOVE";


_waypointend = _group_1 addWaypoint [[_xpos,_ypos, 0], _waypointsrange];
_waypointend setWaypointType "CYCLE";

};
sleep 1;

//If use aicustomgear
if (_aicustomgear) then {

///////////////////////////////////////remove weapons and magazines
removeAllWeapons _enemy;
removeAllItems _enemy;
removeAllWeapons _enemy1;
removeAllItems _enemy1;
removeAllWeapons _enemy2;
removeAllItems _enemy2;
removeAllWeapons _enemy3;
removeAllItems _enemy3;
removeAllWeapons _enemy4;
removeAllItems _enemy4;
removeAllWeapons _enemy5;
removeAllItems _enemy5;
removeAllWeapons _enemy6;
removeAllItems _enemy6;
removeAllWeapons _enemy7;
removeAllItems _enemy7;

///////////////////////////////////////add weapons and magazines
_enemy addWeapon "G36C_camo";
_enemy addMagazine "30Rnd_556x45_G36";
_enemy addMagazine "30Rnd_556x45_G36";
_enemy addMagazine "30Rnd_556x45_G36";
_enemy addMagazine "30Rnd_556x45_G36";
_enemy addMagazine "30Rnd_556x45_G36";
_enemy addMagazine "30Rnd_556x45_G36";

_enemy1 addWeapon "G36C_camo";
_enemy1 addMagazine "30Rnd_556x45_G36";
_enemy1 addMagazine "30Rnd_556x45_G36";
_enemy1 addMagazine "30Rnd_556x45_G36";
_enemy1 addMagazine "30Rnd_556x45_G36";
_enemy1 addMagazine "30Rnd_556x45_G36";
_enemy1 addMagazine "30Rnd_556x45_G36";

_enemy2 addWeapon "M4A1_HWS_GL_camo";
_enemy2 addMagazine "30Rnd_556x45_Stanag";
_enemy2 addMagazine "30Rnd_556x45_Stanag";
_enemy2 addMagazine "30Rnd_556x45_Stanag";
_enemy2 addMagazine "30Rnd_556x45_Stanag";
_enemy2 addMagazine "30Rnd_556x45_Stanag";
_enemy2 addMagazine "30Rnd_556x45_Stanag";

_enemy3 addWeapon "M4A1_HWS_GL_camo";
_enemy3 addMagazine "30Rnd_556x45_Stanag";
_enemy3 addMagazine "30Rnd_556x45_Stanag";
_enemy3 addMagazine "30Rnd_556x45_Stanag";
_enemy3 addMagazine "30Rnd_556x45_Stanag";
_enemy3 addMagazine "30Rnd_556x45_Stanag";
_enemy3 addMagazine "30Rnd_556x45_Stanag";

_enemy4 addWeapon "AKS74U_DZ";
_enemy4 addMagazine "30Rnd_545x39_AK";
_enemy4 addMagazine "30Rnd_545x39_AK";
_enemy4 addMagazine "30Rnd_545x39_AK";
_enemy4 addMagazine "30Rnd_545x39_AK";
_enemy4 addMagazine "30Rnd_545x39_AK";
_enemy4 addMagazine "30Rnd_545x39_AK";

_enemy5 addWeapon "FNFAL_DZ";
_enemy5 addMagazine "20Rnd_762x51_FNFAL";
_enemy5 addMagazine "20Rnd_762x51_FNFAL";
_enemy5 addMagazine "20Rnd_762x51_FNFAL";
_enemy5 addMagazine "20Rnd_762x51_FNFAL";
_enemy5 addMagazine "20Rnd_762x51_FNFAL";
_enemy5 addMagazine "20Rnd_762x51_FNFAL";

_enemy6 addWeapon "M249_DZ";
_enemy6 addMagazine "100Rnd_556x45_M249";
_enemy6 addMagazine "100Rnd_556x45_M249";
_enemy6 addMagazine "100Rnd_556x45_M249";
_enemy6 addMagazine "100Rnd_556x45_M249";

_enemy7 addWeapon "M24_DZ";
_enemy7 addMagazine "5Rnd_762x51_M24";
_enemy7 addMagazine "5Rnd_762x51_M24";
_enemy7 addMagazine "5Rnd_762x51_M24";
_enemy7 addMagazine "5Rnd_762x51_M24";
_enemy7 addMagazine "5Rnd_762x51_M24";
_enemy7 addMagazine "5Rnd_762x51_M24";
//////////////////////////////////////////////

//add items
_enemy addMagazine _Gear0;
_enemy addMagazine _Gear1;
_enemy1 addMagazine _Gear1;
_enemy1 addMagazine _Gear2;
_enemy2 addMagazine _Gear2;
_enemy2 addMagazine _Gear3;
_enemy3 addMagazine _Gear3;
_enemy3 addMagazine _Gear4;
_enemy4 addMagazine _Gear4;
_enemy4 addMagazine _Gear5;
_enemy5 addMagazine _Gear5;
_enemy5 addMagazine _Gear6;
_enemy6 addMagazine _Gear6;
_enemy6 addMagazine _Gear7;
_enemy7 addMagazine _Gear7;
_enemy7 addMagazine _Gear0;


//add backpacks
_enemy addBackpack _Packlist;
_enemy1 addBackpack _Packlist;
_enemy2 addBackpack _Packlist;
_enemy3 addBackpack _Packlist;
_enemy4 addBackpack _Packlist;
_enemy5 addBackpack _Packlist;
_enemy6 addBackpack _Packlist;
_enemy7 addBackpack _Packlist;
};
sleep 1;
//endspawn enemys
};

 

 

waitUntil{{isPlayer _x && _x distance _loot_box < 10  } count playableunits > 0};
[nil,nil,rTitleText,"BOMBCRATE IS ACTIVE NOW -25 SECONDS BEFORE EXPLODE!", "PLAIN",10] call RE;
_timer = 30;//change me if u want more o less time before bomb explode

//#############################CREATE THE BOMB FUNCTION TO EXPLODE############################//
bombexp = {
_bomb = ["HelicopterExploSmall","HelicopterExploBig","Bo_GBU12_LGB"] call BIS_fnc_selectRandom;
_dabomb = objNull;
if (true) then
{
_this = createVehicle [_bomb,_positionobj, [], 2, "CAN_COLLIDE"];
_dabomb = _this;
};
};
//############################EXIT FROM HERE#################################################//


sleep 1;
   
 


_mark = "RoadFlare" createVehicle getPosATL _loot_box;
_mark attachTo [_loot_box, [0,0,-1]];
_positionobj = getPosATL _loot_box;    

 

sleep _timer;
_playernear = false;

{
if ((isPlayer _x) && (_x distance _loot_box < 15)) then {																																														
_x setDamage 1;
};
} count playableUnits;	
call bombexp;

 

 
// Clean up
EPOCH_EVENT_RUNNING = false;
deleteVehicle _mark;
deleteVehicle _loot_box;
deleteMarker _event_marker;
if (_debug) then {
deleteMarker _debug_marker;
};
if (_spawnenemys) then {
deleteVehicle _enemy;
deleteVehicle _enemy1;
deleteVehicle _enemy2;
deleteVehicle _enemy3;
deleteVehicle _enemy4;
deleteVehicle _enemy5;
deleteVehicle _enemy6;
deleteVehicle _enemy7;
}; 

 

 

gernika likes this

Share this post


Link to post
Share on other sites

With me appeared the same thing when it shows the message of 25 seconds I die

I'll test this next script.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Similar Content

    • By juandayz
      UPDATED 6/14/17
      Based on  The Book of Eli  movie.
      This start spawning a crate with a holy bible. Then wait for a player to start the second fase of the event.
      In the second fase spawn a priest and a ruined church where player must carry the elis book. (itembible).
      If player give the bible, the priest return a reward of 4 briefcast 100oz.
       
      elisbookevent.sqf   (Dayz_Server\modules\)
      open your init.sqf
      EpochUseEvents = true; //Enable event scheduler. Define custom scripts in dayz_server\modules to run on a schedule. EpochEvents = [["any","any","any","any",10,"elisbookevent"],["any","any","any","any",30,"crash_spawner"],["any","any","any","any",0,"crash_spawner"],["any","any","any","any",15,"supply_drop"]];  
      you need a custom fn_selfactions.sqf and at very bottom paste:
      in custom variables.sqf
      create  elisbook.sqf  (mpmissions\your instance\scripts\)
       
    • By juandayz
      UPDATE 13-6-17
      Spawn a marker with 350 of radius.
      Inside, lost in somewhere thers a corpse with a jewells reward in his inventory. (the body agonize so shoot on him).

      1-Open your init.sqf be sure this line is seted as true;
      EpochUseEvents = true;
      2- in this line add the event:
      EpochEvents = [["any","any","any","any",18,"deathcorpse"],["any","any","any","any",0,"crash_spawner"],["any","any","any","any",15,"supply_drop"]];
       
      3-create deathcorpse.sqf and drop into: dayz_server.pbo\modules\ ¡ 
      VIDEO:
       
    • By juandayz
      UPDATED 6/13/17
      Video
      INSTALL:
      1-open your init.sqf
      EpochUseEvents = true; //Enable event scheduler. Define custom scripts in dayz_server\modules to run on a schedule. EpochEvents = [["any","any","any","any",10,"supply_from_air"],["any","any","any","any",30,"crash_spawner"],["any","any","any","any",0,"crash_spawner"],["any","any","any","any",15,"supply_drop"]];  
      2-Create supply_from_air.sqf ( place into dayz_server\modules\ )
       
    • By LightLoona
      Welcome to our Community
      Anonymous Gaming
      We are a very active and friendly community. Our special Events take place all weekend from Friday to Sunday! We have very active admins, all your feedback and suggestions will be heard, also we make sure the server is free of hackers and dupers to achieve fair and fun gameplay for everyone!
       
      Server IP: 213.32.6.174  Port: 2302              
      Teamspeak: ts.anonymousgaming.info    
      Website: www.anonymousgaming.co.uk
       
      Server Features:
      Change View Distance Custom Spawn Points Custom Traders Deploy Bike|Motorbike|Little Bird Door Management Weekly Events Group Management Locate Vehicle Plot Management Tow|Lift Ai Missions Running Zombies Ore Mines/Veins ...and more! Join us Today! Hope to see you around!
      Event Preview:
       
       

       
    • By juandayz
      UPDATED 1/10/17
      Choose random player/ spawn a plane close of this player/ the pilot suffer a heart disease.. the plane crash on the ground. the pilot its a zed with a small and random reward eating his co-pilot. also thers a small crate with a few random items.
      open your init.sqf
      EpochUseEvents = true; //Enable event scheduler. Define custom scripts in dayz_server\modules to run on a schedule. EpochEvents = [["any","any","any","any",35,"BHD"],["any","any","any","any",30,"crash_spawner"],["any","any","any","any",0,"crash_spawner"],["any","any","any","any",15,"supply_drop"]]; BHD.sqf (dayz_server\modules\)
       
      NOT A EVENT VIDEO. JUST MUSIC
       
       
  • Latest Donations

  • Donation Box

    Please donate to support the community.
    We appreciate all donations!
  • Advertisement
  • Supporters
  • Advertisement
  • Forum Statistics

    • Total Topics
      26318
    • Total Posts
      242930
  • Member Statistics

    • Total Members
      29362
    • Most Online
      1497

    Newest Member
    [Z]EnDoh
    Joined