Jump to content

BaseBattle / PvP HotSpot


Shak

Recommended Posts

BASEBATTLE / PVP HOTSPOT / BATTLEFIELD - WHATEVER YOU WANT TO CALL IT

 

Fk6NBOw.jpg

 

 

This script will spawn in a pre-built collection of buildings, add a marker to the map, alert the players and then finally spawn a loot box after a certain amount of time, which is also announced to the server.

It is very easy to modify the location of the buildings and loot spawns to suit your server.

Each base battle that I've created has multiple sniper and counter sniping areas. 

 

DOWNSIDES / LIMITATIONS

This script requires the 'execute epoch events manually' by Sandbird to run, but I am sure that someone with greater scripting ability then me could make this execute via the epoch events system, or perhaps at server startup.

It would be great if this script detected if a player were nearby and only spawned the loot crate if the area had been 'held' for a certain amount of time. Alas, that's well beyond my level.

The event marker does not show to people who either die or join after the event has started.

The event marker does not delete, it stays until restart. I don't really see that as an issue however, as each .sqf is quite small (7-12kb) and they do contain military buildings to loot.

The loot in the rewards boxes may be unsuitable for your server - But it's very easy to change.

The location of the BaseBattles may clash with your current map additions. I suggest testing these in a test environment before adding to a live server.

This has not been tested on a full / busy server. The sleep 1800 may bother you.

 

Installation.

1. Backup your current files and make a copy.

2. Install Sandbird's excellent script and confirm you have that working.

 

3. Save these files as kamenka.sqf, cherno.sqf and nwcastle.sqf respectively. Add them to your server.pbo/modules folder, where the helicrash and ikea events are.

kamenka.sqf

Spoiler

if (isServer) then {

_vehicle_2 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_grav_10_100", [1129.6265, 2386.269, -1.4305115e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_2 = _this;
  _this setDir -26.478056;
  _this setPos [1129.6265, 2386.269, -1.4305115e-006];
};

_vehicle_3 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_grav_10_100", [1119.696, 2418.342, -1.6212463e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_3 = _this;
  _this setDir -10.097669;
  _this setPos [1119.696, 2418.342, -1.6212463e-005];
};

_vehicle_4 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_grav_10_100", [1123.6772, 2401.999, 2.0980835e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_4 = _this;
  _this setDir -18.492533;
  _this setPos [1123.6772, 2401.999, 2.0980835e-005];
};

_vehicle_6 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Mil_Guardhouse", [1119.215, 2387.885, 7.6293945e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_6 = _this;
  _this setDir -117.61716;
  _this setPos [1119.215, 2387.885, 7.6293945e-006];
};

_vehicle_11 = objNull;
if (true) then
{
  _this = createVehicle ["SignM_FOB_Revolve_EP1", [1113.6974, 2434.7244, 3.3378601e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_11 = _this;
  _this setDir -17.412813;
  _this setPos [1113.6974, 2434.7244, 3.3378601e-006];
};

_vehicle_12 = objNull;
if (true) then
{
  _this = createVehicle ["ZavoraAnim", [1115.4059, 2437.4473, 1.0967255e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_12 = _this;
  _this setDir -0.17232984;
  _this setPos [1115.4059, 2437.4473, 1.0967255e-005];
};

_vehicle_18 = objNull;
if (true) then
{
  _this = createVehicle ["Base_WarfareBBarrier10x", [1107.301, 2436.4436], [], 0, "CAN_COLLIDE"];
  _vehicle_18 = _this;
  _this setPos [1107.301, 2436.4436];
};

_vehicle_19 = objNull;
if (true) then
{
  _this = createVehicle ["Base_WarfareBBarrier10x", [1095.9281, 2442.5447, 3.8146973e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_19 = _this;
  _this setDir 55.119934;
  _this setPos [1095.9281, 2442.5447, 3.8146973e-006];
};

_vehicle_20 = objNull;
if (true) then
{
  _this = createVehicle ["Base_WarfareBBarrier10x", [1092.3409, 2456.2629, 2.0027161e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_20 = _this;
  _this setDir 94.230927;
  _this setPos [1092.3409, 2456.2629, 2.0027161e-005];
};

_vehicle_21 = objNull;
if (true) then
{
  _this = createVehicle ["Base_WarfareBBarrier10x", [1129.8011, 2436.4199, 4.2915344e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_21 = _this;
  _this setPos [1129.8011, 2436.4199, 4.2915344e-006];
};

_vehicle_22 = objNull;
if (true) then
{
  _this = createVehicle ["Base_WarfareBBarrier10x", [1139.9489, 2443.3875, 7.1525574e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_22 = _this;
  _this setDir -66.984467;
  _this setPos [1139.9489, 2443.3875, 7.1525574e-006];
};

_vehicle_23 = objNull;
if (true) then
{
  _this = createVehicle ["Base_WarfareBBarrier10x", [1141.7319, 2457.3696, 1.2397766e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_23 = _this;
  _this setDir -98.155785;
  _this setPos [1141.7319, 2457.3696, 1.2397766e-005];
};

_vehicle_24 = objNull;
if (true) then
{
  _this = createVehicle ["Base_WarfareBBarrier10xTall", [1136.3959, 2469.0649, -1.9073486e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_24 = _this;
  _this setDir 53.053627;
  _this setPos [1136.3959, 2469.0649, -1.9073486e-006];
};

_vehicle_25 = objNull;
if (true) then
{
  _this = createVehicle ["Base_WarfareBBarrier10xTall", [1124.3733, 2475.2996, 1.6689301e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_25 = _this;
  _this setPos [1124.3733, 2475.2996, 1.6689301e-005];
};

_vehicle_26 = objNull;
if (true) then
{
  _this = createVehicle ["Base_WarfareBBarrier10xTall", [1108.8578, 2475.5015, 5.2452087e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_26 = _this;
  _this setPos [1108.8578, 2475.5015, 5.2452087e-006];
};

_vehicle_27 = objNull;
if (true) then
{
  _this = createVehicle ["Base_WarfareBBarrier10xTall", [1097.5596, 2469.5088, 2.3841858e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_27 = _this;
  _this setDir -55.715305;
  _this setPos [1097.5596, 2469.5088, 2.3841858e-005];
};

_vehicle_28 = objNull;
if (true) then
{
  _this = createVehicle ["Land_fortified_nest_small", [1111.2129, 2427.6116, 7.1525574e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_28 = _this;
  _this setDir -29.786638;
  _this setPos [1111.2129, 2427.6116, 7.1525574e-006];
};

_vehicle_30 = objNull;
if (true) then
{
  _this = createVehicle ["CampEast", [1105.0399, 2468.7356, 3.8146973e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_30 = _this;
  _this setDir 0.8054316;
  _this setPos [1105.0399, 2468.7356, 3.8146973e-006];
};

_vehicle_31 = objNull;
if (true) then
{
  _this = createVehicle ["CampEast", [1116.0919, 2468.6709, 1.4305115e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_31 = _this;
  _this setDir 0.8054316;
  _this setPos [1116.0919, 2468.6709, 1.4305115e-006];
};

_vehicle_32 = objNull;
if (true) then
{
  _this = createVehicle ["CampEast", [1126.4152, 2468.5161, 1.5735626e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_32 = _this;
  _this setDir 0.8054316;
  _this setPos [1126.4152, 2468.5161, 1.5735626e-005];
};

_vehicle_33 = objNull;
if (true) then
{
  _this = createVehicle ["Base_WarfareBBarrier5x", [1118.1024, 2441.9338, 4.9114227e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_33 = _this;
  _this setPos [1118.1024, 2441.9338, 4.9114227e-005];
};

_vehicle_34 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Misc_deerstand", [1106.4084, 2438.9233, 8.4877014e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_34 = _this;
  _this setPos [1106.4084, 2438.9233, 8.4877014e-005];
};

_vehicle_35 = objNull;
if (true) then
{
  _this = createVehicle ["Land_CamoNetB_EAST", [1134.1475, 2453.9512, 6.4373016e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_35 = _this;
  _this setDir 86.921455;
  _this setPos [1134.1475, 2453.9512, 6.4373016e-005];
};

_vehicle_36 = objNull;
if (true) then
{
  _this = createVehicle ["Misc_Cargo1Bo_military", [1111.2062, 2450.0581, 8.0108643e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_36 = _this;
  _this setDir -149.21425;
  _this setPos [1111.2062, 2450.0581, 8.0108643e-005];
};

_vehicle_37 = objNull;
if (true) then
{
  _this = createVehicle ["Misc_Cargo1B_military", [1100.1855, 2453.5139, 2.0027161e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_37 = _this;
  _this setDir -63.169716;
  _this setPos [1100.1855, 2453.5139, 2.0027161e-005];
};

_vehicle_38 = objNull;
if (true) then
{
  _this = createVehicle ["HeliHRescue", [1138.1475, 2413.0051, 7.4863434e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_38 = _this;
  _this setPos [1138.1475, 2413.0051, 7.4863434e-005];
};

_vehicle_39 = objNull;
if (true) then
{
  _this = createVehicle ["Land_a_stationhouse", [1259.7458, 2410.8625, -7.1525574e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_39 = _this;
  _this setDir 4.448832;
  _this setPos [1259.7458, 2410.8625, -7.1525574e-006];
  _this setVectorUp [0, 0, 1];
};

_vehicle_40 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Panelak2", [1094.2219, 2376.9944, 1.0490417e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_40 = _this;
  _this setDir 151.44084;
  _this setPos [1094.2219, 2376.9944, 1.0490417e-005];
  _this setVectorUp [0, 0, 1];
};

_vehicle_42 = objNull;
if (true) then
{
  _this = createVehicle ["Land_A_Mosque_big_minaret_2_EP1", [868.85681, 2520.9946, 1.5258789e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_42 = _this;
  _this setDir -110.39372;
  _this setPos [868.85681, 2520.9946, 1.5258789e-005];
  _this setVectorUp [0, 0, 1];
};

_vehicle_43 = objNull;
if (true) then
{
  _this = createVehicle ["Land_A_Castle_Bergfrit", [1203.209, 2650.501, -1.1444092e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_43 = _this;
  _this setDir 178.91963;
  _this setPos [1203.209, 2650.501, -1.1444092e-005];
  _this setVectorUp [0, 0, 1];
};

_vehicle_44 = objNull;
if (true) then
{
  _this = createVehicle ["Land_A_Castle_Stairs_A", [1210.739, 2643.2219, -0.54828709], [], 0, "CAN_COLLIDE"];
  _vehicle_44 = _this;
  _this setDir -91.185287;
  _this setPos [1210.739, 2643.2219, -0.54828709];
};

_marker = createMarker ["Battle FieldKam", [1133.4269, 2453.2378, 7.6293945e-006]];
_marker setMarkerText "Battle Field";
_marker setMarkerType "mil_ambush";
_marker setMarkerColor "ColorRed";
marker_1 = _this;

_hMSG = "<t align='center' color='#DF0101' shadow='2' size='1.75'>Battle Field</t><br/><t align='center' color='#5FB404'>Battle Field Kamenka spawned. Secure the area, loot will spawn in 30 minutes.</t>";
[nil, nil, rspawn, [_hMSG], {if (isNil "hint_debug_msn") then {hint_debug_msn=false;};if (debugMonitor) then {hint_debug_msn=true;[] spawn fnc_debug_toggle;};sleep 1;hint parseText (_this select 0);sleep 3;if (hint_debug_msn) then {hint_debug_msn=false;[] spawn fnc_debug_toggle;};}] call RE;

sleep 1800;

_hMSG = "<t align='center' color='#DF0101' shadow='2' size='1.75'>Battle Field</t><br/><t align='center' color='#5FB404'>The loot box has spawned!</t>";
[nil, nil, rspawn, [_hMSG], {if (isNil "hint_debug_msn") then {hint_debug_msn=false;};if (debugMonitor) then {hint_debug_msn=true;[] spawn fnc_debug_toggle;};sleep 1;hint parseText (_this select 0);sleep 3;if (hint_debug_msn) then {hint_debug_msn=false;[] spawn fnc_debug_toggle;};}] call RE;

_vehicle_53 = objNull;
if (true) then
{
  _this = createVehicle ["CZBasicWeapons_EP1", [1133.4269, 2453.2378, 7.6293945e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_53 = _this;
  _this setDir 14.22659;
  _vehicle_42 setVariable ["ObjectID","1",true];
  _vehicle_42 setVariable ["permaLoot",true];
  clearweaponcargoGlobal _this;
  clearmagazinecargoGlobal _this;
  
  _this addWeaponCargoGlobal ["m107_TWS_EP1",1];

  _this addmagazineCargoGlobal ["10Rnd_127x99_m107",3];
  _this addmagazineCargoGlobal ["ItemBriefcase100oz",1];
  _this addmagazineCargoGlobal ["ItemHotwireKit",1];

  _this addbackpackCargoGlobal ["DZ_largeGunBag_EP1",1];
  
  _this setPos [1133.4269, 2453.2378, 7.6293945e-006];
};

};

Cherno.sqf

Spoiler

if (isServer) then {

_vehicle_0 = objNull;
if (true) then
{
  _this = createVehicle ["Land_A_Mosque_big_minaret_2_EP1", [7191.7051, 2575.2668, -1.1920929e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_0 = _this;
  _this setDir -219.80923;
  _this setPos [7191.7051, 2575.2668, -1.1920929e-005];
  _this setVectorUp [0, 0, 1];
};

_vehicle_1 = objNull;
if (true) then
{
  _this = createVehicle ["Land_A_Castle_Bergfrit", [7196.1963, 3012.0596, 5.7220459e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_1 = _this;
  _this setDir -162.87993;
  _this setPos [7196.1963, 3012.0596, 5.7220459e-005];
  _this setVectorUp [0, 0, 1];
};

_vehicle_2 = objNull;
if (true) then
{
  _this = createVehicle ["Land_A_Castle_Stairs_A", [7201.4028, 3003.4851, 0.47840202], [], 0, "CAN_COLLIDE"];
  _vehicle_2 = _this;
  _this setDir -76.823143;
  _this setPos [7201.4028, 3003.4851, 0.47840202];
};

_vehicle_8 = objNull;
if (true) then
{
  _this = createVehicle ["GUE_WarfareBAntiAirRadar", [7092.9492, 2577.9119, 4.5776367e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_8 = _this;
  _this setDir 274.48871;
  _this setPos [7092.9492, 2577.9119, 4.5776367e-005];
};

_vehicle_9 = objNull;
if (true) then
{
  _this = createVehicle ["Gue_WarfareBArtilleryRadar", [6992.9497, 2632.7942, 3.8146973e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_9 = _this;
  _this setDir -70.895981;
  _this setPos [6992.9497, 2632.7942, 3.8146973e-006];
};

_vehicle_10 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Mil_Barracks_i", [7057.2881, 2673.9368, -3.8146973e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_10 = _this;
  _this setDir 51.648674;
  _this setPos [7057.2881, 2673.9368, -3.8146973e-006];
};

_vehicle_11 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Mil_Barracks_i", [7048.375, 2576.0479, 0.00022172928], [], 0, "CAN_COLLIDE"];
  _vehicle_11 = _this;
  _this setDir 232.85529;
  _this setPos [7048.375, 2576.0479, 0.00022172928];
};

_vehicle_12 = objNull;
if (true) then
{
  _this = createVehicle ["CampEast", [6969.0288, 2582.0859, 1.9073486e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_12 = _this;
  _this setDir -126.66647;
  _this setPos [6969.0288, 2582.0859, 1.9073486e-005];
};

_vehicle_13 = objNull;
if (true) then
{
  _this = createVehicle ["CampEast", [6976.0762, 2572.5432, 5.7220459e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_13 = _this;
  _this setDir -126.66647;
  _this setPos [6976.0762, 2572.5432, 5.7220459e-005];
};

_vehicle_14 = objNull;
if (true) then
{
  _this = createVehicle ["CampEast", [6962.1836, 2591.5125, 1.9073486e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_14 = _this;
  _this setDir -126.66647;
  _this setPos [6962.1836, 2591.5125, 1.9073486e-005];
};

_vehicle_15 = objNull;
if (true) then
{
  _this = createVehicle ["CampEast", [6955.0591, 2600.864, 9.1552734e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_15 = _this;
  _this setDir -126.66647;
  _this setPos [6955.0591, 2600.864, 9.1552734e-005];
};

_vehicle_17 = objNull;
if (true) then
{
  _this = createVehicle ["Land_CamoNetVar_NATO_EP1", [7004.2021, 2596.7241, 3.4332275e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_17 = _this;
  _this setDir 54.831745;
  _this setPos [7004.2021, 2596.7241, 3.4332275e-005];
};

_vehicle_19 = objNull;
if (true) then
{
  _this = createVehicle ["Land_fort_rampart_EP1", [7024.521, 2606.3794, 1.9073486e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_19 = _this;
  _this setDir 75.771164;
  _this setPos [7024.521, 2606.3794, 1.9073486e-005];
};

_vehicle_20 = objNull;
if (true) then
{
  _this = createVehicle ["Land_fort_rampart_EP1", [7044.0352, 2659.6729, 7.1048737e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_20 = _this;
  _this setDir 104.6836;
  _this setPos [7044.0352, 2659.6729, 7.1048737e-005];
};

_vehicle_22 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Panelak3", [7129.2173, 2666.0913, 3.8146973e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_22 = _this;
  _this setDir -127.30562;
  _this setPos [7129.2173, 2666.0913, 3.8146973e-006];
  _this setVectorUp [0, 0, 1];
};

_vehicle_23 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Panelak3", [6978.1108, 2771.5164, 0.0001168251], [], 0, "CAN_COLLIDE"];
  _vehicle_23 = _this;
  _this setDir 143.44891;
  _this setPos [6978.1108, 2771.5164, 0.0001168251];
  _this setVectorUp [0, 0, 1];
};

_vehicle_24 = objNull;
if (true) then
{
  _this = createVehicle ["USMC_WarfareBBarracks", [7026.1108, 2584.748, 0.00012588501], [], 0, "CAN_COLLIDE"];
  _vehicle_24 = _this;
  _this setDir 235.14229;
  _this setPos [7026.1108, 2584.748, 0.00012588501];
};

_vehicle_25 = objNull;
if (true) then
{
  _this = createVehicle ["RU_WarfareBContructionSite1", [7009.5396, 2658.3943, 1.1444092e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_25 = _this;
  _this setPos [7009.5396, 2658.3943, 1.1444092e-005];
};

_vehicle_26 = objNull;
if (true) then
{
  _this = createVehicle ["Ins_WarfareBContructionSite", [7031.8145, 2671.627, 5.3405762e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_26 = _this;
  _this setDir -36.580395;
  _this setPos [7031.8145, 2671.627, 5.3405762e-005];
};

_vehicle_27 = objNull;
if (true) then
{
  _this = createVehicle ["Ins_WarfareBContructionSite1", [7031.2754, 2652.9995, -1.5258789e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_27 = _this;
  _this setDir 34.524063;
  _this setPos [7031.2754, 2652.9995, -1.5258789e-005];
};

_marker = createMarker ["BattleFieldCher", [7002.105, 2598.7014, 2.8610229e-006]];
_marker setMarkerText "Battle Field";
_marker setMarkerType "mil_ambush";
_marker setMarkerColor "ColorRed";
marker_2 = _this;

_hMSG = "<t align='center' color='#DF0101' shadow='2' size='1.75'>Battle Field</t><br/><t align='center' color='#5FB404'>Battle Field Cherno spawned. Secure the area, loot will spawn in 30 minutes.</t>";
[nil, nil, rspawn, [_hMSG], {if (isNil "hint_debug_msn") then {hint_debug_msn=false;};if (debugMonitor) then {hint_debug_msn=true;[] spawn fnc_debug_toggle;};sleep 1;hint parseText (_this select 0);sleep 3;if (hint_debug_msn) then {hint_debug_msn=false;[] spawn fnc_debug_toggle;};}] call RE;

sleep 1800;

_hMSG = "<t align='center' color='#DF0101' shadow='2' size='1.75'>Battle Field</t><br/><t align='center' color='#5FB404'>The loot box has spawned!</t>";
[nil, nil, rspawn, [_hMSG], {if (isNil "hint_debug_msn") then {hint_debug_msn=false;};if (debugMonitor) then {hint_debug_msn=true;[] spawn fnc_debug_toggle;};sleep 1;hint parseText (_this select 0);sleep 3;if (hint_debug_msn) then {hint_debug_msn=false;[] spawn fnc_debug_toggle;};}] call RE;

_vehicle_28 = objNull;
if (true) then
{
  _this = createVehicle ["CZBasicWeapons_EP1", [7002.105, 2598.7014, 2.8610229e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_28 = _this;
  _vehicle_42 setVariable ["ObjectID","1",true];
  _vehicle_42 setVariable ["permaLoot",true];
  clearweaponcargoGlobal _this;
  clearmagazinecargoGlobal _this;
  
  _this addWeaponCargoGlobal ["BAF_AS50_scoped",1];

  _this addmagazineCargoGlobal ["10Rnd_127x99_m107",5];
  _this addmagazineCargoGlobal ["ItemBriefcase100oz",1];
  _this addmagazineCargoGlobal ["ItemHotwireKit",1];

  _this addbackpackCargoGlobal ["DZ_largeGunBag_EP1",1];
  
  _this setPos [7002.105, 2598.7014, 2.8610229e-006];
};

};

nwcastle.sqf

Spoiler

if (isServer) then {

_vehicle_2 = objNull;
if (true) then
{
  _this = createVehicle ["Land_A_Castle_Bergfrit", [3776.3965, 10157.147, -0.00012207031], [], 0, "CAN_COLLIDE"];
  _vehicle_2 = _this;
  _this setDir -12.811339;
  _this setPos [3776.3965, 10157.147, -0.00012207031];
};

_vehicle_3 = objNull;
if (true) then
{
  _this = createVehicle ["Land_A_Castle_Bergfrit", [3723.5933, 10102.562, -0.00015258789], [], 0, "CAN_COLLIDE"];
  _vehicle_3 = _this;
  _this setDir -281.50497;
  _this setPos [3723.5933, 10102.562, -0.00015258789];
};

_vehicle_4 = objNull;
if (true) then
{
  _this = createVehicle ["Land_A_Castle_Bastion", [3723.0566, 10177.742, -3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_4 = _this;
  _this setDir -27.736301;
  _this setPos [3723.0566, 10177.742, -3.0517578e-005];
};

_vehicle_5 = objNull;
if (true) then
{
  _this = createVehicle ["Land_A_Castle_Gate", [3753.6687, 10109.418, -3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_5 = _this;
  _this setDir -13.35919;
  _this setPos [3753.6687, 10109.418, -3.0517578e-005];
};

_vehicle_7 = objNull;
if (true) then
{
  _this = createVehicle ["Land_A_Castle_Wall1_20", [3736.9255, 10102.809, -3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_7 = _this;
  _this setDir -191.71408;
  _this setPos [3736.9255, 10102.809, -3.0517578e-005];
};

_vehicle_8 = objNull;
if (true) then
{
  _this = createVehicle ["Land_A_Castle_Wall1_20", [3775.2014, 10111.047, -0.00012207031], [], 0, "CAN_COLLIDE"];
  _vehicle_8 = _this;
  _this setDir 168.75772;
  _this setPos [3775.2014, 10111.047, -0.00012207031];
};

_vehicle_9 = objNull;
if (true) then
{
  _this = createVehicle ["Land_A_Castle_Wall1_20", [3711.6448, 10105.746, -6.1035156e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_9 = _this;
  _this setDir -134.93031;
  _this setPos [3711.6448, 10105.746, -6.1035156e-005];
};

_vehicle_10 = objNull;
if (true) then
{
  _this = createVehicle ["Land_A_Castle_Wall1_20", [3701.6343, 10122.554, -6.1035156e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_10 = _this;
  _this setDir -107.62096;
  _this setPos [3701.6343, 10122.554, -6.1035156e-005];
};

_vehicle_11 = objNull;
if (true) then
{
  _this = createVehicle ["Land_A_Castle_Wall1_20", [3710.3611, 10158.626, 0.00018310547], [], 0, "CAN_COLLIDE"];
  _vehicle_11 = _this;
  _this setDir -45.281017;
  _this setPos [3710.3611, 10158.626, 0.00018310547];
};

_vehicle_13 = objNull;
if (true) then
{
  _this = createVehicle ["Land_A_Castle_Wall1_20", [3745.7622, 10176.22, 6.1035156e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_13 = _this;
  _this setDir -7.0727739;
  _this setPos [3745.7622, 10176.22, 6.1035156e-005];
};

_vehicle_14 = objNull;
if (true) then
{
  _this = createVehicle ["Land_A_Castle_Wall1_20", [3701.0227, 10141.902], [], 0, "CAN_COLLIDE"];
  _vehicle_14 = _this;
  _this setDir -78.119011;
  _this setPos [3701.0227, 10141.902];
};

_vehicle_15 = objNull;
if (true) then
{
  _this = createVehicle ["Land_A_Castle_Wall1_20", [3763.5298, 10170.129], [], 0, "CAN_COLLIDE"];
  _vehicle_15 = _this;
  _this setDir 43.023094;
  _this setPos [3763.5298, 10170.129];
};

_vehicle_16 = objNull;
if (true) then
{
  _this = createVehicle ["Land_A_Castle_Wall1_20", [3778.4734, 10141.784, 9.1552734e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_16 = _this;
  _this setDir 79.23851;
  _this setPos [3778.4734, 10141.784, 9.1552734e-005];
};

_vehicle_17 = objNull;
if (true) then
{
  _this = createVehicle ["Land_A_Castle_Wall1_20", [3782.2444, 10121.992, -9.1552734e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_17 = _this;
  _this setDir 77.623032;
  _this setPos [3782.2444, 10121.992, -9.1552734e-005];
};

_vehicle_18 = objNull;
if (true) then
{
  _this = createVehicle ["Land_A_Castle_Stairs_A", [3728.959, 10112.195, -6.1035156e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_18 = _this;
  _this setDir 164.54971;
  _this setPos [3728.959, 10112.195, -6.1035156e-005];
};

_vehicle_19 = objNull;
if (true) then
{
  _this = createVehicle ["Land_A_Castle_Stairs_A", [3767.1323, 10162.585, 9.1552734e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_19 = _this;
  _this setDir 75.480789;
  _this setPos [3767.1323, 10162.585, 9.1552734e-005];
};

_vehicle_20 = objNull;
if (true) then
{
  _this = createVehicle ["Land_A_Castle_WallS_5_D", [3734.9587, 10076.931, -6.1035156e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_20 = _this;
  _this setDir 51.477222;
  _this setPos [3734.9587, 10076.931, -6.1035156e-005];
};

_vehicle_21 = objNull;
if (true) then
{
  _this = createVehicle ["Land_A_Castle_WallS_5_D", [3790.521, 10095.14, -6.1035156e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_21 = _this;
  _this setDir -64.877487;
  _this setPos [3790.521, 10095.14, -6.1035156e-005];
};

_vehicle_22 = objNull;
if (true) then
{
  _this = createVehicle ["ZavoraAnim", [3759.5823, 10103.732, -3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_22 = _this;
  _this setDir -9.6397591;
  _this setPos [3759.5823, 10103.732, -3.0517578e-005];
};

_vehicle_23 = objNull;
if (true) then
{
  _this = createVehicle ["ZavoraAnim", [3756.8044, 10117.209], [], 0, "CAN_COLLIDE"];
  _vehicle_23 = _this;
  _this setDir -10.500534;
  _this setPos [3756.8044, 10117.209];
};

_vehicle_24 = objNull;
if (true) then
{
  _this = createVehicle ["BagFenceRound_DZ", [3726.52, 10170.402, 6.1035156e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_24 = _this;
  _this setDir -24.727003;
  _this setPos [3726.52, 10170.402, 6.1035156e-005];
};

_vehicle_25 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Fort_Watchtower", [3762.345, 10144.101, -3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_25 = _this;
  _this setDir -64.379967;
  _this setPos [3762.345, 10144.101, -3.0517578e-005];
};

_vehicle_27 = objNull;
if (true) then
{
  _this = createVehicle ["Land_BagFenceLong", [3746.9146, 10117.845], [], 0, "CAN_COLLIDE"];
  _vehicle_27 = _this;
  _this setDir 78.9702;
  _this setPos [3746.9146, 10117.845];
};

_vehicle_28 = objNull;
if (true) then
{
  _this = createVehicle ["Land_BagFenceLong", [3746.3171, 10120.673, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_28 = _this;
  _this setDir 78.501839;
  _this setPos [3746.3171, 10120.673, 3.0517578e-005];
};

_vehicle_29 = objNull;
if (true) then
{
  _this = createVehicle ["Land_BagFenceLong", [3745.7483, 10123.581], [], 0, "CAN_COLLIDE"];
  _vehicle_29 = _this;
  _this setDir -101.52193;
  _this setPos [3745.7483, 10123.581];
};

_vehicle_30 = objNull;
if (true) then
{
  _this = createVehicle ["Land_BagFenceLong", [3748.1304, 10115.348], [], 0, "CAN_COLLIDE"];
  _vehicle_30 = _this;
  _this setDir 46.866314;
  _this setPos [3748.1304, 10115.348];
};

_vehicle_31 = objNull;
if (true) then
{
  _this = createVehicle ["Misc_Cargo1Bo_military", [3746.2014, 10127.341, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_31 = _this;
  _this setDir 43.577423;
  _this setPos [3746.2014, 10127.341, 3.0517578e-005];
};

_vehicle_32 = objNull;
if (true) then
{
  _this = createVehicle ["Misc_Cargo1Bo_military", [3727.2583, 10154.35, 9.1552734e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_32 = _this;
  _this setDir 221.92862;
  _this setPos [3727.2583, 10154.35, 9.1552734e-005];
};

_vehicle_33 = objNull;
if (true) then
{
  _this = createVehicle ["Land_House_C_12_EP1", [3710.385, 10144.405, -3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_33 = _this;
  _this setDir 120.49993;
  _this setPos [3710.385, 10144.405, -3.0517578e-005];
};

_vehicle_34 = objNull;
if (true) then
{
  _this = createVehicle ["HeliHCivil", [3735.9084, 10143.52, 0], [], 0, "CAN_COLLIDE"];
  _vehicle_34 = _this;
  _this setPos [3735.9084, 10143.52, 0];
};

_vehicle_35 = objNull;
if (true) then
{
  _this = createVehicle ["Land_CamoNet_NATO_EP1", [3723.478, 10176.973, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_35 = _this;
  _this setDir -26.722837;
  _this setPos [3723.478, 10176.973, 3.0517578e-005];
};

_vehicle_36 = objNull;
if (true) then
{
  _this = createVehicle ["CampEast", [3713.4192, 10113.438, -0.038785078], [], 0, "CAN_COLLIDE"];
  _vehicle_36 = _this;
  _this setDir -136.93507;
  _this setPos [3713.4192, 10113.438, -0.038785078];
};

_vehicle_37 = objNull;
if (true) then
{
  _this = createVehicle ["CampEast", [3706.7813, 10126.447, -0.016013544], [], 0, "CAN_COLLIDE"];
  _vehicle_37 = _this;
  _this setDir -108.32375;
  _this setPos [3706.7813, 10126.447, -0.016013544];
};

_vehicle_38 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Misc_Cargo1E_EP1", [3724.2461, 10129.699, 6.1035156e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_38 = _this;
  _this setDir -24.972923;
  _this setPos [3724.2461, 10129.699, 6.1035156e-005];
};

_vehicle_39 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Misc_Cargo1E_EP1", [3744.2671, 10159.913, 9.1552734e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_39 = _this;
  _this setDir 87.445534;
  _this setPos [3744.2671, 10159.913, 9.1552734e-005];
};

_vehicle_40 = objNull;
if (true) then
{
  _this = createVehicle ["Land_A_Mosque_big_minaret_2_EP1", [3827.915, 9881.9902, 0.00033569336], [], 0, "CAN_COLLIDE"];
  _vehicle_40 = _this;
  _this setDir 420.43274;
  _this setPos [3827.915, 9881.9902, 0.00033569336];
  _this setVectorUp [0, 0, 1];
};

_vehicle_41 = objNull;
if (true) then
{
  _this = createVehicle ["Land_A_Mosque_big_minaret_2_EP1", [3526.1372, 10542.251, 0.00015258789], [], 0, "CAN_COLLIDE"];
  _vehicle_41 = _this;
  _this setDir 287.65759;
  _this setPos [3526.1372, 10542.251, 0.00015258789];
  _this setVectorUp [0, 0, 1];
};

_marker = createMarker ["BattleFieldNWC", [3722.2339, 10174.404, 3.0517578e-005]];
_marker setMarkerText "Battle Field";
_marker setMarkerType "mil_ambush";
_marker setMarkerColor "ColorRed";
marker_3 = _this;

_hMSG = "<t align='center' color='#DF0101' shadow='2' size='1.75'>Battle Field</t><br/><t align='center' color='#5FB404'>Battle Field NWAF Castle spawned. Secure the area, loot will spawn in 30 minutes.</t>";
[nil, nil, rspawn, [_hMSG], {if (isNil "hint_debug_msn") then {hint_debug_msn=false;};if (debugMonitor) then {hint_debug_msn=true;[] spawn fnc_debug_toggle;};sleep 1;hint parseText (_this select 0);sleep 3;if (hint_debug_msn) then {hint_debug_msn=false;[] spawn fnc_debug_toggle;};}] call RE;

sleep 1800;

_hMSG = "<t align='center' color='#DF0101' shadow='2' size='1.75'>Battle Field</t><br/><t align='center' color='#5FB404'>The loot box has spawned!</t>";
[nil, nil, rspawn, [_hMSG], {if (isNil "hint_debug_msn") then {hint_debug_msn=false;};if (debugMonitor) then {hint_debug_msn=true;[] spawn fnc_debug_toggle;};sleep 1;hint parseText (_this select 0);sleep 3;if (hint_debug_msn) then {hint_debug_msn=false;[] spawn fnc_debug_toggle;};}] call RE;

_vehicle_42 = objNull;
if (true) then
{
  _this = createVehicle ["CZBasicWeapons_EP1", [3722.2339, 10174.404, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_42 = _this;
  _this setDir 11.964259;
  _vehicle_42 setVariable ["ObjectID","1",true];
  _vehicle_42 setVariable ["permaLoot",true];
  clearweaponcargoGlobal _this;
  clearmagazinecargoGlobal _this;
  
  _this addWeaponCargoGlobal ["BAF_AS50_TWS",1];

  _this addmagazineCargoGlobal ["10Rnd_127x99_m107",3];
  _this addmagazineCargoGlobal ["ItemBriefcase100oz",1];
  _this addmagazineCargoGlobal ["ItemHotwireKit",1];

  _this addbackpackCargoGlobal ["DZ_largeGunBag_EP1",1];
  
  _this setPos [3722.2339, 10174.404, 3.0517578e-005];
};

};

4. Edit mission/custom/execute.sqf so that it looks like this

 

Spoiler

private ["_adminList"];
_adminList = call compile preProcessFileLineNumbers "superadmins.sqf";  // Recheck if player is allowed to run this
if ((getPlayerUID player) in _adminList) then {
    adminmenu =
    [
        ["",true],
            ["BB Kamenka", [2], "", -5, [["expression", '["kamenka"] call SNDB_CALL']], "1", "1"],
            ["BB Cherno", [3], "", -5, [["expression", '["cherno"] call SNDB_CALL']], "1", "1"],
            ["BB NWAF Castle", [4], "", -5, [["expression", '["nwcastle"] call SNDB_CALL']], "1", "1"],
            ["", [-1], "", -5, [["expression", ""]], "1", "0"],
        ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]        
    ];
};
showCommandingMenu "#USER:adminmenu";

SNDB_CALL =
{    
    DO_THIS = {
        PVDZE_spawnEvent = [_this select 0];
        publicVariableServer "PVDZE_spawnEvent";    
    };
    call DO_THIS;
};

 

DONE!

Repack, upload your files to your server. Log in, spawn yourself a map_debug. Scroll your mouse, select events. Enjoy.

 

To make your own BaseBattles

1. Make the area for the basebattle in the editor.  Example - Novy Lug MilBase. Make sure to add the lootbox that you want to use for the reward last, I personally use CZBasicWeapons_EP1

2. In your server/modules folder, make a copy of kamenka.sqf. 

3. Rename the copy of kamenka.sqf copy to novylug.sqf

4. Add your custom buildings into novylug.sqf.

5. Edit the marker location and name in novylug.sqf (The first line in the marker section needs to be unique per basebattle). 

6. Edit the Color and text of the announcement.

7. Lastly, edit the weapons box location. This is also where you edit the loot. Take note of where the _this setPos line is, it's at the bottom, different to the rest of the buildings.

Spoiler

_vehicle_42 = objNull;
if (true) then
{
  _this = createVehicle ["CZBasicWeapons_EP1", [3722.2339, 10174.404, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_42 = _this;
  _this setDir 11.964259;
  _vehicle_42 setVariable ["ObjectID","1",true];
  _vehicle_42 setVariable ["permaLoot",true];
  clearweaponcargoGlobal _this;
  clearmagazinecargoGlobal _this;
  
  _this addWeaponCargoGlobal ["BAF_AS50_TWS",1];

  _this addmagazineCargoGlobal ["10Rnd_127x99_m107",3];
  _this addmagazineCargoGlobal ["ItemBriefcase100oz",1];
  _this addmagazineCargoGlobal ["ItemHotwireKit",1];

  _this addbackpackCargoGlobal ["DZ_largeGunBag_EP1",1];
  
  _this setPos [3722.2339, 10174.404, 3.0517578e-005];
};

 

btPLpTh.jpg

 

 

 

 

 

U1cRsgJ.png

 

 

 

 

RuwuLf1.jpg

 

 

 

Credits

Epoch team - legends

DE1000 - Original concept

Killerkiwi - Released something kinda the same which jogged my memory to do this.

Sandbird - His manual execution of events is required to do this.

 

Link to comment
Share on other sites

  • 2 weeks later...
  • 4 weeks later...
  • 2 weeks later...
On 6/10/2016 at 2:00 AM, Shak said:

DOWNSIDES / LIMITATIONS

This script requires the 'execute epoch events manually' by Sandbird to run, but I am sure that someone with greater scripting ability then me could make this execute via the epoch events system, or perhaps at server startup.

It would be great if this script detected if a player were nearby and only spawned the loot crate if the area had been 'held' for a certain amount of time. Alas, that's well beyond my level.

The event marker does not show to people who either die or join after the event has started.

The event marker does not delete, it stays until restart. I don't really see that as an issue however, as each .sqf is quite small (7-12kb) and they do contain military buildings to loot.

  1. What is actually stopping this from being executed as an Epoch Event?  From a quick glance, I believe you should be able to.  You could even randomly choose which battlefield location spawns.
  2. This is very rough pseudo code, and could be completely incorrect or bad practice, but I believe you could do something along the lines of:
    i = 0;
    while {players are within radius of area} do {
    	waitUntil { _i = _i + 1; _i >= "# in seconds to wait" };
    	create loot box;
    };

     

  3. You can refresh the markers in whatever interval you want by creating a while loop that runs while the event is active (more pseudo code):
    while {EventRunning} do {
    	//create your marker(s)
    	sleep "# in seconds for refresh";
    	//delete your marker(s)
    };

     

  4. To delete the marker you should only have to:
  5. deleteMarker "Marker Name";

     

It's almost 5 in the morning, so if this was completely unintelligible, then please ignore me. xD

Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...

I got them all fixed thanks. Love it! I have noticed that my markers dont refresh, and if using a debug monitor the message only shows for a split second.

So I changed the messages to this, they work perfect now.

Spoiler

_txt = "BattleField Kamenka secure the area and wait for the loot!";
_colortask = [1,0,0,1];
_tasktype = "taskNew";
fnc_show_colorMiddleMsg = [_txt,_colortask,_tasktype];
publicVariable 'fnc_show_colorMiddleMsg';

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...