This commit is contained in:
2022-04-21 16:15:41 +03:00
commit 9d4fc88901
601 changed files with 66252 additions and 0 deletions

View File

@ -0,0 +1,184 @@
// Updated mission example for DayZ Epoch 1.0.6+. Please review missions in the hero and bandit folder for additional examples.
// Include local variables in this list
private ["_messages","_missionType","_aiType","_mission","_position","_num"];
// Get mission number, important we do this early
_mission = count wai_mission_data -1;
_missionType = _this select 0; // Type of mission "MainHero" or "MainBandit"
_aiType = _this select 1; // Type of AI - opposite of mission type
// Get a safe position 80 meters from the nearest object. You can change this number.
_position = [80] call find_position;
// Sends a message to the server's rpt file
diag_log format["WAI: Mission Test Mission started at %1",_position];
// Crate Spawning Format - [loot, position, crate type(array or class name), [x-offset, y-offset,z-coordinate(optional)],direction(optional)]
// Multiple crates can be spawned. See Firestation mission for example.
// See lines 203-205 in config.sqf for crate classname arrays
// Dynamic loot array example
// Parameters: 0: _crate
// 1: Max number of long guns OR [MAX number of long guns,gun_array]
// 2: Max number of tools OR [MAX number of tools,tool_array]
// 3: Max number of items OR [MAX number of items,item_array]
// 4: Max number of pistols OR [MAX number of pistol,pistol_array]
// 5: Max number of backpacks OR [MAX number of backpacks,backpack_array]
//[16,[8,crate_tools_sniper],[3,crate_items_high_value],3,[4,crate_backpacks_large]] - example of calling custom arrays instead of default
// Save loot array to a variable
_loot = [[1,crate_weapons_buildables],[4,crate_tools_buildable],[30,crate_items_buildables],3,4];
//Spawn Crate with loot variable in first position.
[[
[_loot,crates_large,[0,0]] // [loot variable, crate array, 2d offsets]
],_position,_mission] call wai_spawnCrate;
//Spawn Crate with fixed classname and loot array not previously save to variable. It works either way.
[[
[[8,5,15,3,2],"USBasicWeaponsBox",[.3,0,-.01],30] // [[loot array, crate classname, 3d offests], direction]
],_position,_mission] call wai_spawnCrate;
// Mission object Spawning Format - [class name, [x-offset, y-offset,z-offset(optional)],direction(optional)]
// Offsets are modifications to the [x,y,z] coordinates relative to the [0,0,0] mission center position.
// If no z-coordinate or direction are provided, then the function will set them to 0.
_baserunover = [[
["land_fortified_nest_big",[-40,0],90],
["land_fortified_nest_big",[40,0],270],
["land_fortified_nest_big",[0,-40]],
["land_fortified_nest_big",[0,40],180],
["Land_Fort_Watchtower",[-10,0]],
["Land_Fort_Watchtower",[10,0],180],
["Land_Fort_Watchtower",[0,-10],270],
["Land_Fort_Watchtower",[0,10],90]
],_position,_mission] call wai_spawnObjects;
// Group Spawn Examples
// Parameters: 0: Position
// 1: Unit Count
// 2: Unit Skill ("easy","medium","hard","extreme" or "random")
// 3: Guns (gun or [gun,launcher])
// Guns options : (0 = ai_wep_assault, 1 = ai_wep_machine, 2 = ai_wep_sniper, "random" = random weapon, "Unarmed" = no weapon)
// Launcher options: (at = ai_wep_launchers_AT, aa = ai_wep_launchers_AA or "classname")
// 4: Magazine Count
// 5: Backpack ("random" or "classname")
// 6: Skin ("Hero","bandit","random","special" or "classname")
// 7: Gear (0:ai_gear0, 1:ai_gear1, 2:ai_gear2, 3:ai_gear3, 4:ai_gear4 or "random")
// 8: AI Type ("bandit","Hero","special" or ["type", #] format to overwrite default gain amount) ***Used to determine humanity gain or loss***
// 9: Mission variable from line 7 (_mission)
_num = round (random 3) + 4;
[[_position select 0, _position select 1, 0],_num,"extreme",["random","at"],4,"random","bandit","random",["bandit",150],_mission] call spawn_group;
[[_position select 0, _position select 1, 0],4,"hard","random",4,"random","bandit","random","bandit",_mission] call spawn_group;
[[_position select 0, _position select 1, 0],4,"random","random",4,"random","bandit","random","bandit",_mission] call spawn_group;
[[_position select 0, _position select 1, 0],4,"random","random",4,"random","bandit","random","bandit",_mission] call spawn_group;
[[_position select 0, _position select 1, 0],4,"random","random",4,"random","bandit","random","bandit",_mission] call spawn_group;
// Humvee Patrol Example
// Parameters: 0: Patrol position
// 1: Starting position
// 2: Patrol radius
// 3: Number of Waypoints
// 4: Vehicle classname
// 5: Unit Skill ("easy","medium","hard","extreme" or "random")
// 6: Skin ("Hero","bandit","random","special" or "classname")
// 7: AI Type ("bandit","Hero" or "special") ***Used to determine humanity gain or loss***
// 8: Mission Variable from line 7 (_mission)
[[(_position select 0) + 100, _position select 1, 0],[(_position select 0) + 100, _position select 1, 0],50,2,"HMMWV_Armored","random","bandit","bandit",_mission] call vehicle_patrol;
// Static Turret Examples
// Parameters: 0: Spawn positions
// 1: Classname ("classname" or "random" to pick from ai_static_weapons)
// 2: Unit Skill ("easy","medium","hard","extreme" or "random") ***NO effect if ai_static_skills = true;***
// 3: Skin ("Hero","bandit","random","special" or "classname")
// 4: AI Type ("bandit","Hero" or "special") ***Used to determine humanity gain or loss***
// 5: Gun (0:ai_wep_assault 1:ai_wep_machine 2:ai_wep_sniper or "random") ***NO effect if ai_static_useweapon = false;***
// 6: Magazine Count ***NO effect if ai_static_useweapon = false;***
// 7: Backpack ("random" or "classname") ***NO effect if ai_static_useweapon = false;***
// 8: Gear (0:ai_gear0, 1:ai_gear1, 2:ai_gear2, 3:ai_gear3, 4:ai_gear4 or "random") ***NO effect if ai_static_useweapon = false;***
// 9: Mission variable from line 7 (_mission)
};
[[
[(_position select 0) - 10, (_position select 1) + 10, 0],
[(_position select 0) + 10, (_position select 1) - 10, 0],
[(_position select 0) + 10, (_position select 1) + 10, 0],
[(_position select 0) - 10, (_position select 1) - 10, 0]
],"M2StaticMG","easy","bandit","bandit",0,2,"random","random",_mission] call spawn_static;
// Heli Paradrop Example
// Parameters: 0: Paradrop position
// 1: Trigger radius
// 2: Vehicle classname
// 3: Direction of approach for the helicopter. Options: "North","South","East","West"
// 4: Random distance from the mission the helicopter should start. [min distance, max distance].
// 5: Fly in height of the helicopter. Be careful that the height is not too low or the AI might die when they hit the ground
// 6: Time in seconds between each deployed paratrooper. Higher number means paradropped AI will be more spread apart. Time of 0 means they all jump out rapidly.
// 7: Distance from the mission the helicopter should start dropping paratroopers
// 8: Amount of paratroopers
// 9: Unit Skill ("easy","medium","hard","extreme" or "random") ***NO effect if ai_static_skills = true;***
// 10: Gun (0:ai_wep_assault 1:ai_wep_machine 2:ai_wep_sniper or "random")
// 11: Magazine Count
// 12: Backpack ("random" or "classname")
// 13: Skin ("Hero","bandit","random","special" or "classname")
// 14: Gear (0:ai_gear0, 1:ai_gear1, 2:ai_gear2, 3:ai_gear3, 4:ai_gear4 or "random")
// 15: AI Type ("bandit","Hero" or "special") ***Used to determine humanity gain or loss***
// 16: Heli stay and fight after troop deployment? (true or false)
// 17: Mission variable from line 7 (_mission)
[_position,400,"UH60M_EP1_DZE","East",[3000,4000],150,1.0,200,10,"Random","Random",4,"Random","Hero","Random","Hero",false,_mission] spawn heli_para;
// Assassination target example
// This is the same as normal group spawns but we assign it to a variable instead for use in the trigger below (if there are multiple units in this group you'll need to kill them all)
_unitGroup = [[_position select 0, _position select 1, 0],1,"hard","random",4,"random","special","random","bandit",_mission] call spawn_group;
// Spawn Mission Vehicle Example
// Parameters: 0: Classname or Array from config.sqf
// 1: Position
// 2: Mission variable
// 3: Fixed vehicle position? If false the mission will pick a random position for the vehicle
// 4: Optional direction. If no number provided the mission will select a random direction
["MV22_DZ",[(_position select 0) - 20.5,(_position select 1) - 5.2,0], _mission,true,-82.5] call custom_publish; // with declared vehicle class, optional fixed position, and optional direction
[cargo_trucks,_position,_mission] call custom_publish; // with vehicle array, random position, and random direction
_vehicle = [cargo_trucks,_position,_mission] call custom_publish; // Same as above but saved to variable if necessary
// Mission messages examples - they go into an array
"A Mission has spawned, hurry up to claim the loot!", // mission announcement - this message displays when the mission starts
"The mission was complete/objective reached", // mission success - this message displays when the mission is completed by a player
"The mission timed out and nobody was in the vicinity" // mission fail - this message displays when a mission times out.
// Example with localized message strings
_messages = if (_missionType == "MainHero") then {
["STR_CL_HERO_MISSIONNAME_ANNOUNCE","STR_CL_HERO_MISSIONNAME_WIN","STR_CL_HERO_MISSIONNAME_FAIL"];
} else {
["STR_CL_BANDIT_MISSIONNAME_ANNOUNCE","STR_CL_BANDIT_MISSIONNAME_WIN","STR_CL_BANDIT_MISSIONNAME_FAIL"];
};
// Array of options to send to mission_winorfail with non-localized announcements
[
_mission, // Mission Variable - This is a number.
_position, // Position of mission
"Hard", // Difficulty "Easy", "Medium", "Hard", "Extreme",
"Name of Mission", // Name of Mission
_missionType, // Mission Type: MainHero or MainBandit
true, // show mission marker?
true, // make minefields available for this mission?
["crate"], // Completion type: ["crate"], ["kill"], or ["assassinate", _unitGroup], : crate - you have to get within 20 meters of the crate and kill at least the number of ai defined by variable wai_kill_percent in config.sqf. kill = you have to kill all of the AI. assassinate - you have to kill a special ai (see Mayor's Mansion mission).
_messages
] call mission_winorfail;
// Array of options to send to mission_winorfail with localized announcements. You have to create localized strings in the community stringtable for this to work
[
_mission, // Mission number
_position, // Position of mission
"Hard", // Difficulty
"Lunch break Convoy", // Name of Mission
_missionType, // Mission Type: MainHero or MainBandit
true, // show mission marker?
true, // make minefields available for this mission
["crate"], // Completion type: ["crate"], ["kill"], or ["assassinate", _unitGroup],
_messages
] call mission_winorfail;

View File

@ -0,0 +1,192 @@
// Updated single location mission example for DayZ Epoch 1.0.6+ by JasonTM. Please review missions in the hero and bandit folders for additional examples.
// Include local variables in this list
private ["_messages","_missionType","_aiType","_baserunover","_mission","_directions","_position","_crate","_crate_type","_num"];
// Get mission number, important we do this early
_mission = count wai_mission_data -1;
_missionType = _this select 0; // Type of mission "MainHero" or "MainBandit"
_aiType = _this select 1; // Type of AI - opposite of mission type
// Declare your static spawn point. You can also use static positions for your buildings, vehicles, and crate.
// Normally with the z coordinate you will just use 0 because 0 means that it is on the ground.
// Round the coordinates you get from the editor to whole numbers to make it easier. Ex. 1783.42963 is just 1783.
_position = [x, y, 0];
// If this is a hero mission use this line - delete if not
if !([_position] call wai_validSpotCheck) exitWith {h_missionsrunning = h_missionsrunning - 1; wai_mission_data set [_mission, -1]; WAI_MarkerReady = true;};
// if this is a bandit mission use this line - delete if not
if !([_position] call wai_validSpotCheck) exitWith {b_missionsrunning = b_missionsrunning - 1; wai_mission_data set [_mission, -1]; WAI_MarkerReady = true;};
// Sends a message to the server's rpt file
diag_log format["WAI: Mission Test Mission started at %1",_position];
// Crate Spawning Format - [loot, position, crate type(array or class name), [x-offset, y-offset,z-coordinate(optional)],direction(optional)]
// Multiple crates can be spawned. See Firestation mission for example.
// See lines 203-205 in config.sqf for crate classname arrays
// Dynamic loot array example
// Parameters: 0: _crate
// 1: Max number of long guns OR [MAX number of long guns,gun_array]
// 2: Max number of tools OR [MAX number of tools,tool_array]
// 3: Max number of items OR [MAX number of items,item_array]
// 4: Max number of pistols OR [MAX number of pistol,pistol_array]
// 5: Max number of backpacks OR [MAX number of backpacks,backpack_array]
//[16,[8,crate_tools_sniper],[3,crate_items_high_value],3,[4,crate_backpacks_large]] - example of calling custom arrays instead of default
// Save loot array to a variable
_loot = [[1,crate_weapons_buildables],[4,crate_tools_buildable],[30,crate_items_buildables],3,4];
//Spawn Crate with loot variable in first position.
[[
[_loot,crates_large,[0,0]] // [loot variable, crate array, 2d offsets]
],_position,_mission] call wai_spawnCrate;
//Spawn Crate with fixed classname and loot array not previously save to variable. It works either way.
[[
[[8,5,15,3,2],"USBasicWeaponsBox",[.3,0,-.01],30] // [[loot array, crate classname, 3d offests], direction]
],_position,_mission] call wai_spawnCrate;
// Mission object Spawning Format - [class name, [x-offset, y-offset,z-offset(optional)],direction(optional)]
// Offsets are modifications to the [x,y,z] coordinates relative to the [0,0,0] mission center position.
// If no z-coordinate or direction are provided, then the function will set them to 0.
_baserunover = [[
["land_fortified_nest_big",[-40,0],90],
["land_fortified_nest_big",[40,0],270],
["land_fortified_nest_big",[0,-40]],
["land_fortified_nest_big",[0,40],180],
["Land_Fort_Watchtower",[-10,0]],
["Land_Fort_Watchtower",[10,0],180],
["Land_Fort_Watchtower",[0,-10],270],
["Land_Fort_Watchtower",[0,10],90]
],_position,_mission] call wai_spawnObjects;
// Group Spawn Examples
// Parameters: 0: Position
// 1: Unit Count
// 2: Unit Skill ("easy","medium","hard","extreme" or "random")
// 3: Guns (gun or [gun,launcher])
// Guns options : (0 = ai_wep_assault, 1 = ai_wep_machine, 2 = ai_wep_sniper, "random" = random weapon, "Unarmed" = no weapon)
// Launcher options: (at = ai_wep_launchers_AT, aa = ai_wep_launchers_AA or "classname")
// 4: Magazine Count
// 5: Backpack ("random" or "classname")
// 6: Skin ("Hero","bandit","random","special" or "classname")
// 7: Gear (0:ai_gear0, 1:ai_gear1, 2:ai_gear2, 3:ai_gear3, 4:ai_gear4 or "random")
// 8: AI Type ("bandit","Hero","special" or ["type", #] format to overwrite default gain amount) ***Used to determine humanity gain or loss***
// 9: Mission variable from line 9 (_mission)
_num = round (random 3) + 4;
[[_position select 0, _position select 1, 0],_num,"extreme",["random","at"],4,"random","bandit","random",["bandit",150],_mission] call spawn_group;
[[_position select 0, _position select 1, 0],4,"hard","random",4,"random","bandit","random","bandit",_mission] call spawn_group;
[[_position select 0, _position select 1, 0],4,"random","random",4,"random","bandit","random","bandit",_mission] call spawn_group;
[[_position select 0, _position select 1, 0],4,"random","random",4,"random","bandit","random","bandit",_mission] call spawn_group;
[[_position select 0, _position select 1, 0],4,"random","random",4,"random","bandit","random","bandit",_mission] call spawn_group;
// Humvee Patrol Example
// Parameters: 0: Patrol position
// 1: Starting position
// 2: Patrol radius
// 3: Number of Waypoints
// 4: Vehicle classname
// 5: Unit Skill ("easy","medium","hard","extreme" or "random")
// 6: Skin ("Hero","bandit","random","special" or "classname")
// 7: AI Type ("bandit","Hero" or "special") ***Used to determine humanity gain or loss***
// 8: Mission Variable
[[(_position select 0) + 100, _position select 1, 0],[(_position select 0) + 100, _position select 1, 0],50,2,"HMMWV_Armored","random","bandit","bandit",_mission] call vehicle_patrol;
// Static Turret Examples
// Parameters: 0: Spawn positions
// 1: Classname ("classname" or "random" to pick from ai_static_weapons)
// 2: Unit Skill ("easy","medium","hard","extreme" or "random") ***NO effect if ai_static_skills = true;***
// 3: Skin ("Hero","bandit","random","special" or "classname")
// 4: AI Type ("bandit","Hero" or "special") ***Used to determine humanity gain or loss***
// 5: Gun (0:ai_wep_assault 1:ai_wep_machine 2:ai_wep_sniper or "random") ***NO effect if ai_static_useweapon = false;***
// 6: Magazine Count ***NO effect if ai_static_useweapon = false;***
// 7: Backpack ("random" or "classname") ***NO effect if ai_static_useweapon = false;***
// 8: Gear (0:ai_gear0, 1:ai_gear1, 2:ai_gear2, 3:ai_gear3, 4:ai_gear4 or "random") ***NO effect if ai_static_useweapon = false;***
// 9: Mission variable from line 7 (_mission)
[[
[(_position select 0) - 10, (_position select 1) + 10, 0],
[(_position select 0) + 10, (_position select 1) - 10, 0],
[(_position select 0) + 10, (_position select 1) + 10, 0],
[(_position select 0) - 10, (_position select 1) - 10, 0]
],"M2StaticMG","easy","bandit","bandit",0,2,"random","random",_mission] call spawn_static;
// Heli Paradrop Example
// Parameters: 0: Paradrop position
// 1: Trigger radius
// 2: Vehicle classname
// 3: Direction of approach for the helicopter. Options: "North","South","East","West"
// 4: Random distance from the mission the helicopter should start. [min distance, max distance].
// 5: Fly in height of the helicopter. Be careful that the height is not too low or the AI might die when they hit the ground
// 6: Time in seconds between each deployed paratrooper. Higher number means paradropped AI will be more spread apart. Time of 0 means they all jump out rapidly.
// 7: Distance from the mission the helicopter should start dropping paratroopers
// 8: Amount of paratroopers
// 9: Unit Skill ("easy","medium","hard","extreme" or "random") ***NO effect if ai_static_skills = true;***
// 10: Gun (0:ai_wep_assault 1:ai_wep_machine 2:ai_wep_sniper or "random")
// 11: Magazine Count
// 12: Backpack ("random" or "classname")
// 13: Skin ("Hero","bandit","random","special" or "classname")
// 14: Gear (0:ai_gear0, 1:ai_gear1, 2:ai_gear2, 3:ai_gear3, 4:ai_gear4 or "random")
// 15: AI Type ("bandit","Hero" or "special") ***Used to determine humanity gain or loss***
// 16: Heli stay and fight after troop deployment? (true or false)
// 17: Mission variable from line 7 (_mission)
[_position,400,"UH60M_EP1_DZE","East",[3000,4000],150,1.0,200,10,"Random","Random",4,"Random","Hero","Random","Hero",false,_mission] spawn heli_para;
// Assassination target example
// This is the same as normal group spawns but we assign it to a variable instead for use in the trigger below (if there are multiple units in this group you'll need to kill them all)
_unitGroup = [[_position select 0, _position select 1, 0],1,"hard","random",4,"random","special","random","bandit",_mission] call spawn_group;
// Spawn Mission Vehicle Example
// Parameters: 0: Classname or Array from config.sqf
// 1: Position
// 2: Mission variable
// 3: Fixed vehicle position? If false the mission will pick a random position for the vehicle
// 4: Optional direction. If no number provided the mission will select a random direction
["MV22_DZ",[(_position select 0) - 20.5,(_position select 1) - 5.2,0], _mission,true,-82.5] call custom_publish; // with declared vehicle class, optional fixed position, and optional direction
[cargo_trucks,_position,_mission] call custom_publish; // with vehicle array, random position, and random direction
_vehicle = [cargo_trucks,_position,_mission] call custom_publish; // Same as above but saved to variable if necessary
// Mission messages examples - they go into an array
"A Mission has spawned, hurry up to claim the loot!", // mission announcement - this message displays when the mission starts
"The mission was complete/objective reached", // mission success - this message displays when the mission is completed by a player
"The mission timed out and nobody was in the vicinity" // mission fail - this message displays when a mission times out.
// Example with localized message strings
_messages = if (_missionType == "MainHero") then {
["STR_CL_HERO_MISSIONNAME_ANNOUNCE","STR_CL_HERO_MISSIONNAME_WIN","STR_CL_HERO_MISSIONNAME_FAIL"];
} else {
["STR_CL_BANDIT_MISSIONNAME_ANNOUNCE","STR_CL_BANDIT_MISSIONNAME_WIN","STR_CL_BANDIT_MISSIONNAME_FAIL"];
};
// Array of options to send to mission_winorfail with non-localized announcements
[
_mission, // Mission Variable - This is a number.
_position, // Position of mission
"Hard", // Difficulty "Easy", "Medium", "Hard", "Extreme",
"Name of Mission", // Name of Mission
_missionType, // Mission Type: Hero or Bandit
true, // show mission marker?
true, // make minefields available for this mission?
["crate"], // Completion type: ["crate"], ["kill"], or ["assassinate", _unitGroup], : crate - you have to get within 20 meters of the crate and kill at least the number of ai defined by variable wai_kill_percent in config.sqf. kill = you have to kill all of the AI. assassinate - you have to kill a special ai (see Mayor's Mansion mission).
_messages
] call mission_winorfail;
// Array of options to send to mission_winorfail with localized announcements. You have to create localized strings in the community stringtable for this to work
[
_mission, // Mission number
_position, // Position of mission
"Hard", // Difficulty
"Lunch break Convoy", // Name of Mission
_missionType, // Mission Type: Hero or Bandit
true, // show mission marker?
true, // make minefields available for this mission
["crate"], // Completion type: ["crate"], ["kill"], or ["assassinate", _unitGroup],
_messages
] call mission_winorfail;

View File

@ -0,0 +1,69 @@
private ["_mission","_position","_rndnum","_messages","_aiType","_missionType","_loot"];
// Get mission number, important we do this early
_mission = count wai_mission_data -1;
_missionType = _this select 0; // Type of mission: "MainHero" or "MainBandit"
_aiType = _this select 1; // Type of AI - opposite of mission type
_position = [30] call find_position;
diag_log format["WAI: [Mission:[%2] Abandoned Trader]: Starting... %1",_position,_missionType];
_loot = if (_missionType == "MainHero") then {Loot_AbandonedTrader select 0;} else {Loot_AbandonedTrader select 1;};
//Spawn Crates
[[
[_loot,crates_medium,[.3,0]]
],_position,_mission] call wai_spawnCrate;
// Spawn Objects
[[
["Land_Misc_Garb_Heap_EP1",[-0.9,4.2,-0.01]],
["Land_Misc_Garb_Heap_EP1",[-18,1.5,-0.01]],
["Land_Shed_W03_EP1",[-4,4.7,-0.01]],
["Land_Shed_M01_EP1",[-10,5,-0.01]],
["Land_Market_shelter_EP1",[-10,-0.4,-0.01]],
["Land_Market_stalls_02_EP1",[-10,-5.8,-0.01],-2.5],
["Land_Market_stalls_01_EP1",[11,5,-0.01],-0.34],
["Land_Market_stalls_02_EP1",[10,-5.8,-0.01]],
["Land_Market_shelter_EP1",[10,-0.4,-0.01],2.32],
["Land_transport_crates_EP1",[22,2,-0.01],-43.88],
["Fort_Crate_wood",[18,-1,-0.01]],
["UralWreck",[27,-3,-0.01],-67.9033],
["Land_Canister_EP1",[18,1.4,-0.01],28.73],
["MAP_ground_garbage_square5",[13.6,-2,-0.01]],
["MAP_ground_garbage_square5",[-16,-2,-0.01]],
["MAP_ground_garbage_long",[-0.4,-2,-0.01]],
["MAP_garbage_misc",[-8,-2,-0.01]]
],_position,_mission] call wai_spawnObjects;
//Troops
[_position,5,"Medium",["Random","AT"],4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
[_position,5,"Medium","Random",4,"Random","Hero","Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 4);
[_position,_rndnum,"Medium","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 4);
[_position,_rndnum,"Medium","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
//Static Guns
[[
[(_position select 0) + 0.1, (_position select 1) + 20, 0],
[(_position select 0) + 0.1, (_position select 1) - 20, 0]
],"M2StaticMG","Easy",_aiType,_aiType,0,2,"Random","Random",_mission] call spawn_static;
_messages = if (_missionType == "MainHero") then {
["STR_CL_HERO_ABANDONEDTRADER_ANNOUNCE","STR_CL_HERO_ABANDONEDTRADER_WIN","STR_CL_HERO_ABANDONEDTRADER_FAIL"];
} else {
["STR_CL_BANDIT_ABANDONEDTRADER_ANNOUNCE","STR_CL_BANDIT_ABANDONEDTRADER_WIN","STR_CL_BANDIT_ABANDONEDTRADER_FAIL"];
};
[
_mission, // Mission number
_position, // Position of mission
"Medium", // Difficulty
"Abandoned Trader", // Name of Mission
_missionType, // Mission Type: MainHero or MainBandit
true, // show mission marker?
true, // make minefields available for this mission
["crate"], // Completion type: ["crate"], ["kill"], or ["assassinate", _unitGroup],
_messages
] call mission_winorfail;

View File

@ -0,0 +1,97 @@
local _mission = count WAI_MissionData -1;
local _aiType = _this select 0; // "Bandit" or "Hero"
local _position = [30] call WAI_FindPos;
local _vehclass = WAI_APC call BIS_fnc_selectRandom; //Armed Land Vehicle
local _vehname = getText (configFile >> "CfgVehicles" >> _vehclass >> "displayName");
local _name = format["Disabled %1",_vehname];
local _startTime = diag_tickTime;
local _difficulty = "Medium";
local _localized = ["STR_CL_MISSION_BANDIT", "STR_CL_MISSION_HERO"] select (_aiType == "Hero");
local _localName = ["STR_CL_ARMEDVEHICLE_TITLE",_vehname];
local _text = [_localized,_localName];
diag_log format["WAI: %1 %2 started at %3.",_aiType,_name,_position];
local _messages = if (_aiType == "Hero") then {
["STR_CL_HERO_ARMEDVEHICLE_ANNOUNCE","STR_CL_HERO_ARMEDVEHICLE_WIN","STR_CL_HERO_ARMEDVEHICLE_FAIL"];
} else {
["STR_CL_BANDIT_ARMEDVEHICLE_ANNOUNCE","STR_CL_BANDIT_ARMEDVEHICLE_WIN","STR_CL_BANDIT_ARMEDVEHICLE_FAIL"];
};
////////////////////// Do not edit this section ///////////////////////////
local _markers = [1,1,1,1];
//[position,createMarker,setMarkerColor,setMarkerType,setMarkerShape,setMarkerBrush,setMarkerSize,setMarkerText,setMarkerAlpha]
_markers set [0, [_position, "WAI" + str(_mission), "ColorYellow", "", "ELLIPSE", "Solid", [300,300], [], 0]];
_markers set [1, [_position, "WAI" + str(_mission) + "dot", "ColorBlack", "mil_dot", "", "", [], _text, 0]];
if (WAI_AutoClaim) then {_markers set [2, [_position, "WAI" + str(_mission) + "auto", "ColorRed", "", "ELLIPSE", "Border", [WAI_AcAlertDistance,WAI_AcAlertDistance], [], 0]];};
DZE_ServerMarkerArray set [count DZE_ServerMarkerArray, _markers]; // Markers added to global array for JIP player requests.
_markerIndex = count DZE_ServerMarkerArray - 1;
PVDZ_ServerMarkerSend = ["start",_markers];
publicVariable "PVDZ_ServerMarkerSend";
WAI_MarkerReady = true;
// Add the mission's position to the global array so that other missions do not spawn near it.
DZE_MissionPositions set [count DZE_MissionPositions, _position];
local _posIndex = count DZE_MissionPositions - 1;
// Send announcement
[_difficulty,(_messages select 0)] call WAI_Message;
// Wait until a player is within range or timeout is reached.
local _timeout = false;
local _claimPlayer = objNull;
while {WAI_WaitForPlayer && !_timeout && {isNull _claimPlayer}} do {
_claimPlayer = [_position, WAI_TimeoutDist] call isClosestPlayer;
if (diag_tickTime - _startTime >= (WAI_Timeout * 60)) then {
_timeout = true;
};
uiSleep 1;
};
if (_timeout) exitWith {
[_mission, _aiType, _markerIndex, _posIndex] call WAI_AbortMission;
[_difficulty,(_messages select 2)] call WAI_Message;
diag_log format["WAI: %1 %2 aborted.",_aiType,_name,_position];
};
//////////////////////////////// End //////////////////////////////////////
//Spawn Crates
[[
[[0,0,[20,WAI_VehAmmo],0,1],WAI_CrateMd,[0,5]]
],_position,_mission] call WAI_SpawnCrate;
//Troops
[_position, 5, _difficulty, "Random", "AT", "Random", _aiType, "Random", _aiType, _mission] call WAI_SpawnGroup;
[_position, 5, _difficulty, "Random", "AA", "Random", "Hero", "Random", _aiType, _mission] call WAI_SpawnGroup;
[_position,(ceil random 4),_difficulty,"Random","","Random",_aiType,"Random",_aiType,_mission] call WAI_SpawnGroup;
[_position,(ceil random 4),_difficulty,"Random","","Random",_aiType,"Random",_aiType,_mission] call WAI_SpawnGroup;
//Static Guns
[[
[(_position select 0) + 29,(_position select 1) + 7, 0],
[(_position select 0) + 13,(_position select 1) + 42, 0],
[(_position select 0),(_position select 1) + 10, 0]
],"Random",_difficulty,_aiType,_aiType,"Random","Random","Random",_mission] call WAI_SpawnStatic;
//Spawn vehicles
local _vehicle = [_vehclass,_position,_mission] call WAI_PublishVeh;
[_vehicle,_vehclass,2] call WAI_LoadAmmo;
[
_mission, // Mission number
_position, // Position of mission
_difficulty, // Difficulty
_name, // Name of Mission
_localName, // localized marker text
_aiType, // "Bandit" or "Hero"
_markerIndex,
_posIndex,
_claimPlayer,
true, // show mission marker?
true, // make minefields available for this mission
["crate"], // Completion type: ["crate"], ["kill"], or ["assassinate", _unitGroup],
_messages
] spawn WAI_MissionMonitor;

View File

@ -0,0 +1,55 @@
private ["_mission","_rndnum","_vehname","_position","_vehclass","_messages","_aiType","_missionType","_loot"];
_mission = count wai_mission_data -1;
_missionType = _this select 0; // Type of mission: "MainHero" or "MainBandit"
_aiType = _this select 1; // Type of AI - opposite of mission type
_position = [30] call find_position;
//Armed Land Vehicle
_vehclass = armed_vehicle call BIS_fnc_selectRandom;
_vehname = getText (configFile >> "CfgVehicles" >> _vehclass >> "displayName");
diag_log format["WAI: [Mission:[%2] Armed Vehicle]: Starting... %1",_position,_missionType];
_loot = if (_missionType == "MainHero") then {Loot_ArmedVehicle select 0;} else {Loot_ArmedVehicle select 1;};
//Spawn Crates
[[
[_loot,crates_small,[0,5]]
],_position,_mission] call wai_spawnCrate;
//Troops
[_position,5,"Medium",["Random","AT"],3,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
[_position,5,"Medium","Random",3,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 4);
[_position,_rndnum,"Medium","Random",3,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 4);
[_position,_rndnum,"Medium","Random",3,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
//Static Guns
[[[(_position select 0),(_position select 1) + 10, 0]],"Random","Medium",_aiType,_aiType,0,2,"Random","Random",_mission] call spawn_static;
//Spawn vehicles
[_vehclass,_position,_mission] call custom_publish;
if(wai_debug_mode) then {
diag_log format["WAI: [%2] armed_vehicle spawned a %1",_vehname,_missionType];
};
_messages = if (_missionType == "MainHero") then {
["STR_CL_HERO_ARMEDVEHICLE_ANNOUNCE","STR_CL_HERO_ARMEDVEHICLE_WIN","STR_CL_HERO_ARMEDVEHICLE_FAIL"];
} else {
["STR_CL_BANDIT_ARMEDVEHICLE_ANNOUNCE","STR_CL_BANDIT_ARMEDVEHICLE_WIN","STR_CL_BANDIT_ARMEDVEHICLE_FAIL"];
};
[
_mission, // Mission number
_position, // Position of mission
"Medium", // Difficulty
format["Disabled %1",_vehname], // Name of Mission
_missionType, // Mission Type: MainHero or MainBandit
true, // show mission marker?
true, // make minefields available for this mission
["crate"], // Completion type: ["crate"], ["kill"], or ["assassinate", _unitGroup],
_messages
] call mission_winorfail;

View File

@ -0,0 +1,92 @@
private ["_rndnum","_mission","_position","_aiType","_missionType","_loot"];
_mission = count wai_mission_data -1;
_missionType = _this select 0; // Type of mission: "MainHero" or "MainBandit"
_aiType = _this select 1; // Type of AI - opposite of mission type
_position = [30] call find_position;
diag_log format["WAI: [Mission:[%2] ARMY Base]: Starting... %1",_position,_missionType];
_loot = if (_missionType == "MainHero") then {Loot_ArmyBase select 0;} else {Loot_ArmyBase select 1;};
//Spawn Crates
[[
[_loot,crates_small,[1.2,0]]
],_position,_mission] call wai_spawnCrate;
// Spawn Objects
[[
["WarfareBCamp",[-1,-12.4,-0.12]],
["Base_WarfareBBarrier10xTall",[15,-16,-0.64]],
["Base_WarfareBBarrier10xTall",[-15,-16,-0.64]],
["Base_WarfareBBarrier10xTall",[15,16,-0.64]],
["Base_WarfareBBarrier10xTall",[-15,16,-0.64]],
["MAP_posed",[17,11]],
["MAP_posed",[-20,11]],
["MAP_fort_artillery_nest",[-1,-31,-0.56],-178.615],
["MAP_Fortress_02",[-27,-13]],
["MAP_Fortress_02",[25,-13],-89.16],
["MAP_fortified_nest_big",[26,13],-180.55],
["MAP_fortified_nest_big",[-26,13],-179.808],
["MAP_Barbedwire",[10,-20]],
["MAP_Barbedwire",[-11,-20]],
["MAP_Barbedwire",[16,-20]],
["MAP_Barbedwire",[-17,-20]],
["WarfareBDepot",[-0.02,20,-0.1],-179.832],
["T72Wreck",[29,-30],82.75],
["T72WreckTurret",[20,-36]],
["MAP_T34",[2,5],-71.49],
["Land_Fort_Watchtower_EP1",[26,-4],-180.097],
["Land_Fort_Watchtower_EP1",[-28,-6],0.999],
["Land_transport_crates_EP1",[-18,-9],52.43],
["MAP_Barel4",[-16,-10]],
["MAP_Barel1",[-16,-11]],
["MAP_t_picea3f",[-8,-6]],
["MAP_t_picea3f",[16,20]],
["MAP_t_pinusS2f",[14,9]],
["MAP_t_pinusS2f",[-3,-6],-99.19],
["MAP_t_picea3f",[10,-13]],
["MAP_t_pinusN2s",[14,-8]],
["MAP_t_pinusN2s",[12,19],-73.36],
["MAP_t_pinusN2s",[-21,-13],52.65],
["MAP_t_pinusS2f",[-34,12]],
["MAP_t_picea3f",[-13,21]],
["MAP_t_picea2s",[-17,21]],
["MAP_t_picea2s",[13,-12]],
["MAP_t_picea1s",[30,-0.01]],
["MAP_t_picea2s",[-47,-21]],
["MAP_t_picea2s",[34,-48]],
["MAP_t_pinusN2s",[31,-52]],
["MAP_t_pinusS2f",[12,-5]],
["Land_Fire_barrel_burning",[-0.01,-0.01]]
],_position,_mission] call wai_spawnObjects;
//Troops
[[(_position select 0) - 12, (_position select 1) + 2, 0],5,"Hard",["Random","AT"],4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
[[(_position select 0) + 2, (_position select 1) + 2, 0],5,"Hard","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
[[(_position select 0) + 14, (_position select 1) - 35, 0],5,"Hard","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 5);
[[(_position select 0) + 13, (_position select 1) + 35, 0],_rndnum,"Hard","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 5);
[[(_position select 0) + 13, (_position select 1) + 35, 0],_rndnum,"Hard","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
//Humvee Patrol
[[(_position select 0) - 22, (_position select 1) - 56, 0],[(_position select 0) + 22, (_position select 1) + 56, 0],50,2,"HMMWV_Armored","Hard",_aiType,_aiType,_mission] call vehicle_patrol;
//Static Guns
[[
[(_position select 0) - 0.01, (_position select 1) + 41, 0],
[(_position select 0) + 0.1, (_position select 1) - 25, 0]
],"M2StaticMG","Hard",_aiType,_aiType,0,2,"Random","Random",_mission] call spawn_static;
[
_mission, // Mission number
_position, // Position of mission
"Hard", // Difficulty
"Army Base", // Name of Mission
_missionType, // Mission Type: MainHero or MainBandit
true, // show mission marker?
true, // make minefields available for this mission
["crate"], // Completion type: ["crate"], ["kill"], or ["assassinate", _unitGroup],
["STR_CL_GENERAL_ARMYBASE_ANNOUNCE","STR_CL_GENERAL_ARMYBASE_WIN","STR_CL_GENERAL_ARMYBASE_FAIL"]
] call mission_winorfail;

View File

@ -0,0 +1,69 @@
private ["_mission","_position","_rndnum","_aiType","_messages","_missionType","_loot"];
_mission = count wai_mission_data -1;
_missionType = _this select 0; // Type of mission: "MainHero" or "MainBandit"
_aiType = _this select 1; // Type of AI - opposite of mission type
_position = [80] call find_position;
diag_log format["WAI: [Mission:[%2] Base]: Starting... %1",_position,_missionType];
_loot = if (_missionType == "MainHero") then {Loot_Base select 0;} else {Loot_Base select 1;};
//Spawn Crates
[[
[_loot,crates_large,[0,0]]
],_position,_mission] call wai_spawnCrate;
// Spawn Objects
[[
["land_fortified_nest_big",[-40,0],90],
["land_fortified_nest_big",[40,0],270],
["land_fortified_nest_big",[0,-40]],
["land_fortified_nest_big",[0,40],180],
["Land_Fort_Watchtower",[-10,0]],
["Land_Fort_Watchtower",[10,0],180],
["Land_Fort_Watchtower",[0,-10],270],
["Land_Fort_Watchtower",[0,10],90]
],_position,_mission] call wai_spawnObjects;
//Troops
[_position,5,"Hard",["Random","AT"],4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
[_position,5,"Hard","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
[_position,5,"Hard","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 5);
[_position,_rndnum,"Hard","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 5);
[_position,_rndnum,"Hard","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
//Humvee Patrol
[[(_position select 0) + 100, _position select 1, 0],[(_position select 0) + 100, _position select 1, 0],50,2,"HMMWV_Armored","Hard",_aiType,_aiType,_mission] call vehicle_patrol;
//Static Guns
[[
[(_position select 0) - 10, (_position select 1) + 10, 0],
[(_position select 0) + 10, (_position select 1) - 10, 0],
[(_position select 0) + 10, (_position select 1) + 10, 0],
[(_position select 0) - 10, (_position select 1) - 10, 0]
],"M2StaticMG","Hard",_aiType,_aiType,0,2,"Random","Random",_mission] call spawn_static;
//Heli Paradrop
[_position,400,"UH1H_DZ","East",[3000,4000],150,1.0,200,10,"Hard","Random",4,"Random",_aiType,"Random",_aiType,true,_mission] spawn heli_para;
_messages = if (_missionType == "MainHero") then {
["STR_CL_HERO_BANDITBASE_ANNOUNCE","STR_CL_HERO_BANDITBASE_WIN","STR_CL_HERO_BANDITBASE_FAIL"];
} else {
["STR_CL_BANDIT_HEROBASE_ANNOUNCE","STR_CL_BANDIT_HEROBASE_WIN","STR_CL_BANDIT_HEROBASE_FAIL"];
};
[
_mission, // Mission number
_position, // Position of mission
"Hard", // Difficulty
"Base", // Name of Mission
_missionType, // Mission Type: MainHero or MainBandit
true, // show mission marker?
true, // make minefields available for this mission
["crate"], // Completion type: ["crate"], ["kill"], or ["assassinate", _unitGroup],
_messages
] call mission_winorfail;

View File

@ -0,0 +1,52 @@
private ["_mission","_position","_rndnum","_aiType","_messages","_missionType","_loot"];
_mission = count wai_mission_data -1;
_missionType = _this select 0; // Type of mission: "MainHero" or "MainBandit"
_aiType = _this select 1; // Type of AI - opposite of mission type
_position = [30] call find_position;
diag_log format["WAI: [Mission:[%2] Black Hawk Crash]: Starting... %1",_position,_missionType];
_loot = if (_missionType == "MainHero") then {Loot_BHC select 0;} else {Loot_BHC select 1;};
//Spawn Crates
[[
[_loot,crates_medium,[0,0]]
],_position,_mission] call wai_spawnCrate;
// Spawn Objects
[[
["UH60_ARMY_Wreck_burned_DZ",[5,5]]
],_position,_mission] call wai_spawnObjects;
//Troops
[_position,5,"Medium",["Random","AT"],4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
[_position,5,"Medium","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 4);
[_position,_rndnum,"Medium","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 4);
[_position,_rndnum,"Medium","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
//Static Guns
[[
[(_position select 0) + 25, (_position select 1) + 25, 0],
[(_position select 0) - 25, (_position select 1) - 25, 0]
],"M2StaticMG","Easy",_aiType,_aiType,0,2,"Random","Random",_mission] call spawn_static;
_messages = if (_missionType == "MainHero") then {
["STR_CL_HERO_BHCRASH_ANNOUNCE","STR_CL_HERO_BHCRASH_WIN","STR_CL_HERO_BHCRASH_FAIL"];
} else {
["STR_CL_BANDIT_BHCRASH_ANNOUNCE","STR_CL_BANDIT_BHCRASH_WIN","STR_CL_BANDIT_BHCRASH_FAIL"];
};
[
_mission, // Mission number
_position, // Position of mission
"Medium", // Difficulty
"Black Hawk Crash", // Name of Mission
_missionType, // Mission Type: MainHero or MainBandit
true, // show mission marker?
true, // make minefields available for this mission
["crate"], // Completion type: ["crate"], ["kill"], or ["assassinate", _unitGroup],
_messages
] call mission_winorfail;

View File

@ -0,0 +1,46 @@
private ["_mission","_position","_rndnum","_messages","_aiType","_missionType","_loot"];
_mission = count wai_mission_data -1;
_missionType = _this select 0; // Type of mission: "MainHero" or "MainBandit"
_aiType = _this select 1; // Type of AI - opposite of mission type
_position = [30] call find_position;
diag_log format["WAI: [Mission:[%2] Ural Attack]: Starting... %1",_position,_missionType];
_loot = if (_missionType == "MainHero") then {Loot_UralAttack select 0;} else {Loot_UralAttack select 1;};
//Spawn Crates
[[
[_loot,crates_medium,[-5,-5]]
],_position,_mission] call wai_spawnCrate;
// Spawn Objects
[[
["UralWreck",[0,0]]
],_position,_mission] call wai_spawnObjects;
//Troops
_rndnum = round (random 5);
[_position,5,"Easy",["Random","AT"],4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 3);
[_position,_rndnum,"Easy","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 3);
[_position,_rndnum,"Easy","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_messages = if (_missionType == "MainHero") then {
["STR_CL_HERO_URAL_ANNOUNCE","STR_CL_HERO_URAL_WIN","STR_CL_HERO_URAL_FAIL"];
} else {
["STR_CL_BANDIT_URAL_ANNOUNCE","STR_CL_BANDIT_URAL_WIN","STR_CL_BANDIT_URAL_FAIL"];
};
[
_mission, // Mission number
_position, // Position of mission
"Easy", // Difficulty
"Ural Attack", // Name of Mission
_missionType, // Mission Type: MainHero or MainBandit
true, // show mission marker?
true, // make minefields available for this mission
["kill"], // Completion type: ["crate"], ["kill"], or ["assassinate", _unitGroup],
_messages
] call mission_winorfail;

View File

@ -0,0 +1,63 @@
private ["_mission","_position","_rndnum","_aiType","_missionType","_loot"];
_mission = count wai_mission_data -1;
_missionType = _this select 0; // Type of mission: "MainHero" or "MainBandit"
_aiType = _this select 1; // Type of AI - opposite of mission type
_position = [80] call find_position;
diag_log format["WAI: Mission:[%2] Cannibal started at %1",_position,_missionType];
_loot = if (_missionType == "MainHero") then {Loot_CannibalCave select 0;} else {Loot_CannibalCave select 1;};
//Spawn Crates
[[
[_loot,crates_large,[5,7]]
],_position,_mission] call wai_spawnCrate;
// Spawn Objects
[[
["MAP_R2_RockWall",[10,28,-4.15]],
["MAP_R2_RockWall",[-23,9,-6.55],-96.315],
["MAP_R2_RockWall",[25,4,-7.74],262.32],
["MAP_R2_RockWall",[1,7,10.81],-29.29],
["MAP_R2_RockWall",[18,-11,-5.509],-222.72],
["MAP_R2_RockWall",[-22,6,-11.55],-44.01],
["MAP_t_picea2s",[-13,-32,-0.1]],
["MAP_t_picea2s",[-17,6,-0.2]],
["MAP_t_pinusN2s",[-24,-53,-0.2]],
["MAP_t_pinusN1s",[-22,-42,-0.2]],
["MAP_t_picea1s",[-22.3,-35,-0.2]],
["MAP_t_picea2s",[-33,-53,-0.2]],
["MAP_t_picea2s",[-3,-43,-0.2]],
["MAP_t_picea2s",[28,-39,-0.2]],
["MAP_t_picea2s",[13,43,-0.2]],
["MAP_t_picea1s",[57,11,-0.2]],
["MAP_t_quercus3s",[31,49.3,-0.2]],
["MAP_t_quercus3s",[-47,20,-0.2]],
["MAP_R2_Rock1",[-47,-45,-14.29]],
["Land_Campfire_burning",[-0.01,-0.01]],
["Mass_grave",[-6,-7,-0.02],-50.94],
["SKODAWreck",[-11,-46],151.15],
["datsun01Wreck",[-2,-60],34.54],
["UralWreck",[-41.3,-26],19.15]
],_position,_mission] call wai_spawnObjects;
[[(_position select 0) + 12, (_position select 1) + 42.5, .01],5,"extreme",["random","AT"],4,"random",_aiType,"random",_aiType,_mission] call spawn_group;
[[(_position select 0) + 11, (_position select 1) + 41, .01],5,"hard","random",4,"random",_aiType,"random",_aiType,_mission] call spawn_group;
[[(_position select 0) - 12, (_position select 1) - 43, .01],5,"random","random",4,"random",_aiType,"random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 5);
[[(_position select 0) - 13, (_position select 1) - 43, .01],_rndnum,"random","random",4,"random",_aiType,"random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 5);
[[(_position select 0) - 20, (_position select 1) - 43, .01],_rndnum,"random","random",4,"random",_aiType,"random",_aiType,_mission] call spawn_group;
[
_mission,
_position, // Position of mission
"Hard", // Difficulty
"Cannibal Cave", // Name of Mission
_missionType, // Mission Type: MainHero or MainBandit
true, // show mission marker?
true, // make minefields available for this mission
["crate"], // Completion type: ["crate"], ["kill"], or ["assassinate", _unitGroup],
["STR_CL_GENERAL_CANNIBALCAVE_ANNOUNCE","STR_CL_GENERAL_CANNIBALCAVE_WIN","STR_CL_GENERAL_CANNIBALCAVE_FAIL"]
] call mission_winorfail;

View File

@ -0,0 +1,66 @@
private ["_mission","_position","_rndnum","_loot","_aiType","_messages","_missionType","_loot"];
_mission = count wai_mission_data -1;
_missionType = _this select 0; // Type of mission: "MainHero" or "MainBandit"
_aiType = _this select 1; // Type of AI - opposite of mission type
_position = [30] call find_position;
diag_log format["WAI: [Mission:[%2] Captured MV22]: Starting... %1",_position,_missionType];
_loot = if (_missionType == "MainHero") then {Loot_CapturedMV22 select 0;} else {Loot_CapturedMV22 select 1;};
//Spawn Crates
[[
[_loot,"USBasicWeaponsBox",[11.2,12.2,.1]]
],_position,_mission] call wai_spawnCrate;
// Spawn Objects
[[
["USMC_WarfareBFieldhHospital",[12.7,6.5],-210],
["Barrack2",[16,-11],150],
["Misc_cargo_cont_small",[2.8,17.4],12.5],
["Barrack2",[9,-15],150],
["Misc_cargo_cont_small",[6.7,18.3],12.5]
],_position,_mission] call wai_spawnObjects;
//Troops
[[_position select 0,_position select 1,0],5,"Hard",["Random","AT"],4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
[[(_position select 0) + 33,(_position select 1) - 7,0.1],5,"Hard","Random",4,"Random","RU_Doctor","Random",[_aiType,100],_mission] call spawn_group;
[[(_position select 0) - 33,(_position select 1) - 18,0.1],5,"Hard","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 5);
[[(_position select 0) + 1,(_position select 1) + 29,0.1],_rndnum,"Hard","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 5);
[[(_position select 0) + 1,(_position select 1) + 29,0.1],_rndnum,"Hard","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
//Static Guns
[[
[(_position select 0) - 9.3, (_position select 1) + 11.2, 0],
[(_position select 0) - 6, (_position select 1) - 21.4, 0]
],"M2StaticMG","Hard",_aiType,_aiType,0,2,"Random","Random",_mission] call spawn_static;
//Spawn vehicles
["MV22_DZ",[(_position select 0) - 20.5,(_position select 1) - 5.2,0], _mission,true,-82.5] call custom_publish;
if(wai_debug_mode) then {
diag_log format["WAI: [%2] captured_mv22 spawned a MV22 at %1", _position,_missionType];
};
_messages = if (_missionType == "MainHero") then {
["STR_CL_HERO_MV22_ANNOUNCE","STR_CL_HERO_MV22_WIN","STR_CL_HERO_MV22_FAIL"];
} else {
["STR_CL_BANDIT_MV22_ANNOUNCE","STR_CL_BANDIT_MV22_WIN","STR_CL_BANDIT_MV22_FAIL"];
};
[
_mission, // Mission number
_position, // Position of mission
"Hard", // Difficulty
"Captured MV22", // Name of Mission
_missionType, // Mission Type: MainHero or MainBandit
true, // show mission marker?
true, // make minefields available for this mission
["crate"], // Completion type: ["crate"], ["kill"], or ["assassinate", _unitGroup],
_messages
] call mission_winorfail;

View File

@ -0,0 +1,77 @@
private ["_rndnum","_crate_type","_mission","_position","_crate","_baserunover","_baserunover0","_baserunover1","_baserunover2","_baserunover3","_baserunover4","_baserunover5","_baserunover6","_baserunover7","_baserunover8","_baserunover9","_baserunover10","_baserunover11","_baserunover12","_baserunover13","_baserunover14","_baserunover15","_baserunover16","_baserunover17","_baserunover18","_baserunover19","_baserunover20","_baserunover21","_baserunover22"];
// Get mission number, important we do this early
_mission = count wai_mission_data -1;
_missionType = _this select 0; // Type of mission: "MainHero" or "MainBandit"
_aiType = _this select 1; // Type of AI - opposite of mission type
_position = [30] call find_position;
diag_log format["WAI: [Mission:[Hero] Cargo]: Starting... %1",_position];
//Setup the crate
_crate_type = crates_small call BIS_fnc_selectRandom;
_crate = createVehicle [_crate_type,[(_position select 0) + 0.2,(_position select 1),0], [], 0, "CAN_COLLIDE"];
_crate call wai_crate_setup;
//Buildings
_baserunover0 = createVehicle ["MAP_Misc_Cargo1Bo",[(_position select 0)+14, (_position select 1) -10, 0],[], 0, "CAN_COLLIDE"];
_baserunover1 = createVehicle ["MAP_Misc_Cargo2A",[(_position select 0) +18, (_position select 1) -10, 0],[], 0, "CAN_COLLIDE"];
_baserunover2 = createVehicle ["MAP_Misc_Cargo2B",[(_position select 0) +20, (_position select 1) - 3, 0],[], 0, "CAN_COLLIDE"];
_baserunover3 = createVehicle ["MAP_Misc_Cargo2C", [(_position select 0) +14, (_position select 1) +1, 0],[], 0, "CAN_COLLIDE"];
_baserunover4 = createVehicle ["MAP_Misc_Cargo2C", [(_position select 0) +21, (_position select 1) -17, 0],[], 0, "CAN_COLLIDE"];
_baserunover5 = createVehicle ["MAP_Misc_Cargo1G", [(_position select 0) +9, (_position select 1) -1, 0],[], 0, "CAN_COLLIDE"];
_baserunover6 = createVehicle ["MAP_Misc_Cargo1E",[(_position select 0) + 11, (_position select 1) +7, 0],[], 0, "CAN_COLLIDE"];
_baserunover7 = createVehicle ["MAP_Misc_Cargo1C",[(_position select 0) +2, (_position select 1) -15, 0],[], 0, "CAN_COLLIDE"];
_baserunover8 = createVehicle ["MAP_Misc_Cargo1B",[(_position select 0) +6, (_position select 1) -8, 0],[], 0, "CAN_COLLIDE"];
_baserunover9 = createVehicle ["MAP_Misc_Cargo2E", [(_position select 0) +3.5, (_position select 1) +6, 0],[], 0, "CAN_COLLIDE"];
_baserunover10 = createVehicle ["MAP_Misc_Cargo2D", [(_position select 0) -2, (_position select 1) -10, 0],[], 0, "CAN_COLLIDE"];
_baserunover11 = createVehicle ["MAP_Misc_Cargo1F", [(_position select 0) -11, (_position select 1) +10, 0],[], 0, "CAN_COLLIDE"];
_baserunover12 = createVehicle ["MAP_Misc_Cargo1E",[(_position select 0) -9, (_position select 1) -4, 0],[], 0, "CAN_COLLIDE"];
_baserunover13 = createVehicle ["MAP_Misc_Cargo1D",[(_position select 0) +21, (_position select 1) +6, 0],[], 0, "CAN_COLLIDE"];
_baserunover14 = createVehicle ["MAP_Misc_Cargo1Bo",[(_position select 0) -6, (_position select 1) +6, 0],[], 0, "CAN_COLLIDE"];
_baserunover15 = createVehicle ["MAP_Misc_Cargo1B",[(_position select 0) -19, (_position select 1) -7, 0],[], 0, "CAN_COLLIDE"];
_baserunover16 = createVehicle ["MAP_Misc_Cargo1A",[(_position select 0) -15, (_position select 1) -1, 0],[], 0, "CAN_COLLIDE"];
_baserunover17 = createVehicle ["MAP_Misc_Cargo1G", [(_position select 0) -4, (_position select 1) +16, 0],[], 0, "CAN_COLLIDE"];
_baserunover18 = createVehicle ["MAP_Misc_Cargo2C", [(_position select 0) +7, (_position select 1) +11, 0],[], 0, "CAN_COLLIDE"];
_baserunover19 = createVehicle ["MAP_Misc_Cargo2B", [(_position select 0) +4, (_position select 1) -24, 0],[], 0, "CAN_COLLIDE"];
_baserunover20 = createVehicle ["MAP_Misc_Cargo2C",[(_position select 0) +4, (_position select 1) +20, 0],[], 0, "CAN_COLLIDE"];
_baserunover21 = createVehicle ["MAP_Misc_Cargo2A",[(_position select 0) -12, (_position select 1) -13, 0],[], 0, "CAN_COLLIDE"];
_baserunover22 = createVehicle ["MAP_A_CraneCon",[(_position select 0) -21, (_position select 1) +10, 0],[], 0, "CAN_COLLIDE"];
_baserunover = [_baserunover0,_baserunover1,_baserunover2,_baserunover3,_baserunover4,_baserunover5,_baserunover6,_baserunover7,_baserunover8,_baserunover9,_baserunover10,_baserunover11,_baserunover12,_baserunover13,_baserunover14,_baserunover15,_baserunover16,_baserunover17,_baserunover18,_baserunover19,_baserunover20,_baserunover21,_baserunover22];
_directions = [0,-89,2,0,119,39,86,0,111,-40,0,0,0,-48,-139,-41,14,109,-114,-74,-44,-22,0];
{ _x setDir (_directions select _forEachIndex) } forEach _baserunover;
{ _x setVectorUp surfaceNormal position _x; } count _baserunover;
//Troops
_rndnum = round (random 5);
[[(_position select 0) +3, (_position select 1) +25, 0],5,"Hard",["Random","AT"],4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
[[(_position select 0) -27, (_position select 1) -4, 0],5,"Hard","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
[[(_position select 0) +33, (_position select 1) -2, 0],5,"Hard","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
[[(_position select 0) +10, (_position select 1) -37, 0],_rndnum,"Hard","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
//Humvee Patrol
[[(_position select 0) +60, _position select 1, 0],[(_position select 0) -60, _position select 1, 0],50,2,"HMMWV_Armored","Hard",_aiType,_aiType,_mission] call vehicle_patrol;
//Static Guns
[[[(_position select 0) +80, (_position select 1) -28, 0]],"KORD_high_TK_EP1","Easy",_aiType,_aiType,0,2,"Random","Random",_mission] call spawn_static;
[[[(_position select 0) +27, (_position select 1) -40, 0]],"KORD_high_TK_EP1","Easy",_aiType,_aiType,0,2,"Random","Random",_mission] call spawn_static;
// Array of mission variables to send
[
_mission, // Mission number
_position, // Position of mission
"Medium", // Difficulty
"Cargo", // Name of Mission
_missionType, // Mission Type: MainHero or MainBandit
true, // show mission marker?
true, // make minefields available for this mission
_crate, // crate object info
["crate"], // Completion type: ["crate"], ["kill"], or ["assassinate", _unitGroup],
[_baserunover], // cleanup objects
"STR_CL_HERO_CARGO_ANNOUNCE", // mission announcement
"STR_CL_HERO_CARGO_WIN", // mission success
"STR_CL_HERO_CARGO_FAIL", // mission fail
[10,5,20,3,2] // Dynamic crate array
] call mission_winorfail;

View File

@ -0,0 +1,168 @@
local _mission = count WAI_MissionData -1;
local _aiType = _this select 0; // "Bandit" or "Hero"
local _hero = _aiType == "Hero";
local _name = "Castle Grayskull";
local _supportedMaps = ["chernarus","chernarus_winter"]; // The default positions listed below are for Chernarus. If you wish to use this mission on another map then you must gather your own list of flat terrain positions.
local _flatPositions = [[4277.94,9457.53],[4144.92,9439.12],[4229.24,9749.14],[3314.31,10614.7],[2152.91,10467.1],[1956.85,10338.3],[4138.71,12630.3],[3999.11,12659.3],[3733.19,14063.7],[3505.19,14168.2],[5191.49,13994.6],[5986.83,14403.1],[6282.33,14097.3],[6497.14,13582.8],[14255.6,14169.6],[13231.9,10718.3],[12080.6,9895.28],[10612.5,8441.86],[8737.68,9200.67],[7137.15,9483.91],[7406.85,3487.04],[7139.72,5321.27],[5227.21,2202.33],[4149.34,2772.77],[1143.01,2439.9],[1230.53,2526.4],[1157.66,4245.54],[1246.03,4612.52],[4436.68,8472.96],[4748.81,5867.21],[5852.48,11010.3]]; // Chernarus
local _position = [_flatPositions] call isValidSpot;
if (count _position < 1 || {!(toLower worldName in _supportedMaps)}) exitWith {
if (_hero) then {
WAI_HeroRunning = WAI_HeroRunning - 1; WAI_MissionData set [_mission, -1]; WAI_MarkerReady = true;
} else {
WAI_BanditRunning = WAI_BanditRunning - 1; WAI_MissionData set [_mission, -1]; WAI_MarkerReady = true;
};
};
local _startTime = diag_tickTime;
local _difficulty = "Extreme";
local _localized = ["STR_CL_MISSION_BANDIT", "STR_CL_MISSION_HERO"] select _hero;
local _localName = "STR_CL_GRAYSKULL_TITLE";
diag_log format["[WAI]: %1 %2 started at %3.",_aiType,_name,_position];
local _messages = ["STR_CL_GRAYSKULL_ANNOUNCE","STR_CL_GRAYSKULL_WIN","STR_CL_GRAYSKULL_FAIL"];
////////////////////// Do not edit this section ///////////////////////////
local _markers = [1,1,1,1];
//[position,createMarker,setMarkerColor,setMarkerType,setMarkerShape,setMarkerBrush,setMarkerSize,setMarkerText,setMarkerAlpha]
_markers set [0, [_position, "WAI" + str(_mission), "ColorBlack", "", "ELLIPSE", "Solid", [300,300], [], 0]];
_markers set [1, [_position, "WAI" + str(_mission) + "dot", "ColorBlack", "mil_dot", "", "", [], [_localized,_localName], 0]];
if (WAI_AutoClaim) then {_markers set [2, [_position, "WAI" + str(_mission) + "auto", "ColorRed", "", "ELLIPSE", "Border", [WAI_AcAlertDistance,WAI_AcAlertDistance], [], 0]];};
DZE_ServerMarkerArray set [count DZE_ServerMarkerArray, _markers]; // Markers added to global array for JIP player requests.
_markerIndex = count DZE_ServerMarkerArray - 1;
PVDZ_ServerMarkerSend = ["start",_markers];
publicVariable "PVDZ_ServerMarkerSend";
WAI_MarkerReady = true;
// Add the mission's position to the global array so that other missions do not spawn near it.
DZE_MissionPositions set [count DZE_MissionPositions, _position];
local _posIndex = count DZE_MissionPositions - 1;
// Send announcement
[_difficulty,(_messages select 0)] call WAI_Message;
// Wait until a player is within range or timeout is reached.
local _timeout = false;
local _claimPlayer = objNull;
while {WAI_WaitForPlayer && !_timeout && {isNull _claimPlayer}} do {
_claimPlayer = [_position, WAI_TimeoutDist] call isClosestPlayer;
if (diag_tickTime - _startTime >= (WAI_Timeout * 60)) then {
_timeout = true;
};
uiSleep 1;
};
if (_timeout) exitWith {
[_mission, _aiType, _markerIndex, _posIndex] call WAI_AbortMission;
[_difficulty,(_messages select 2)] call WAI_Message;
diag_log format["WAI: %1 %2 aborted.",_aiType,_name,_position];
};
//////////////////////////////// End //////////////////////////////////////
// Spawn Objects
local _objects = [[
["MAP_A_Castle_Bergfrit",[0, 0, 0],-118],
["Land_A_Castle_Donjon",[-9.9136, -56.3155, -6.9],150],
["Land_A_Castle_Donjon",[48.269, -23.5899, -6.9],150],
["Land_A_Castle_Gate",[19.6933, -39.376, 0.16360788],150],
["Land_A_Castle_Stairs_A",[-3.2178, -9.418, -0.15027224],-27],
["Land_A_Castle_Wall1_20",[35.7534, -31.0733, -1.0470082],150],
["Land_A_Castle_Wall1_20",[-22.2061, 31.915, 0],-30],
["Land_A_Castle_Wall2_30",[-19.3956,-39.5801, -0.5399434],-120],
["Land_A_Castle_Wall2_30",[38.3569, -9.7383, -0.53297883],-300],
["Land_A_Castle_Bastion",[-42.6607, 20.5839, 0],-76],
["Land_A_Castle_Bastion",[-0.7754, 41.1093, 0],33],
["Land_A_Castle_WallS_End",[11.0483, -8.8145, 0]],
["Land_A_Castle_Wall2_End_2",[-28.252, -15.7022, 0],60],
["Land_A_Castle_Wall2_End_2",[25.1665, 13.6259, 0],53],
["Land_A_Castle_Wall2_Corner_2",[10.893, 25.8378, 0],7],
["Land_A_Castle_Wall2_Corner_2",[-35.1402, 2.0625, 0],-107],
["Land_A_Castle_Wall2_End",[-15.6451, -1.5752, 0],-30],
["Land_A_Castle_Wall2_End",[-12.125, 12.2656, 0],60],
["Land_A_Castle_Bergfrit",[0, 0, 0],-118],
["Land_A_Castle_Wall1_20_Turn_ruins",[1.5449, -49.2315, -1.810002],-18],
["Land_fortified_nest_big",[-4.6485, 11.4218, 0],-29],
["Land_Fort_Watchtower",[31.0649, -20.5664, 0],-120],
["Land_Fort_Watchtower",[-2.4654, -40.1768, 0],-120],
["Land_Fort_Watchtower",[17.6709, 5.6084, 0],-210],
["Land_HBarrier_large",[-20.0684, 9.3222, -0.16],-114],
["Land_HBarrier_large",[-8.1246, 29.4492, -0.16],30],
["Land_HBarrier_large",[0.5297, -31.6856, -0.16],-67],
["Land_HBarrier_large",[21.2143, -20.9278, -0.16],5],
["Land_HBarrier_large",[-29.604, 17.0527, -0.16],-74],
["Land_fort_artillery_nest",[-32.8667, 50.4794, 0.4],-30],
["Land_fort_artillery_nest",[42.645, 18.2978, 0.4],58],
["Land_fort_artillery_nest",[-48.6299, -29.17, 0.4],-120],
["Land_fort_artillery_nest",[18.1303, 64.9013, 0.4],34],
["Land_fort_artillery_nest",[-72.543, 15.9394, 0.4],-90],
["Land_fort_artillery_nest",[11.02, -81.7247, 0.4],-180],
["Land_fort_artillery_nest",[59.4721, -53.6338, 0.4],-240]
],_position,_mission] call WAI_SpawnObjects;
//Spawn Crates
local _loot1 = [Loot_GraySkull1 select 1, Loot_GraySkull1 select 0] select _hero;
local _loot2 = [Loot_GraySkull2 select 1, Loot_GraySkull2 select 0] select _hero;
local _loot3 = [Loot_GraySkull3 select 1, Loot_GraySkull3 select 0] select _hero;
local _loot4 = [Loot_GraySkull4 select 1, Loot_GraySkull4 select 0] select _hero;
[[ // Crate in the tower
[_loot1, WAI_CrateMd, [0,0], -32]
],((_objects select 0) modelToWorld [0.341797,-1.85889,8.7569]),_mission] call WAI_SpawnCrate;
[[
[_loot2, WAI_CrateMd, [31.7817, -20.461], -34],
[_loot3, WAI_CrateMd, [17.4746, 6.5839], -118],
[_loot4, WAI_CrateMd, [-1.4278, -40.1006], -30]
],_position,_mission] call WAI_SpawnCrate;
// External Troops
[[(_position select 0) + 37, (_position select 1) + 15, 0],5,_difficulty,"Random","AA","Random",WAI_ApocalypticSkin,"Random",_aiType,_mission] call WAI_SpawnGroup;
[[(_position select 0) + 15, (_position select 1) + 60, 0],5,_difficulty,"Random","AT","Random",WAI_ApocalypticSkin,"Random",_aiType,_mission] call WAI_SpawnGroup;
[[(_position select 0) - 30, (_position select 1) + 45, 0],5,_difficulty,"Random","","Random",WAI_ApocalypticSkin,"Random",_aiType,_mission] call WAI_SpawnGroup;
//[[(_position select 0) - 66, (_position select 1) + 15, 0],5,_difficulty,"Random","","Random",WAI_ApocalypticSkin,"Random",_aiType,_mission] call WAI_SpawnGroup;
//[[(_position select 0) - 43, (_position select 1) - 26, 0],5,_difficulty,"Random","","Random",WAI_ApocalypticSkin,"Random",_aiType,_mission] call WAI_SpawnGroup;
//[[(_position select 0) + 10, (_position select 1) - 77, 0],5,_difficulty,"Random","","Random",WAI_ApocalypticSkin,"Random",_aiType,_mission] call WAI_SpawnGroup;
//[[(_position select 0) + 55, (_position select 1) - 51, 0],5,_difficulty,"Random","","Random",WAI_ApocalypticSkin,"Random",_aiType,_mission] call WAI_SpawnGroup;
// Internal Troops - these use "SENTRY" waypoint type
[[(_position select 0) - 10, (_position select 1) - 29, .25],5,_difficulty,"Random","AT","Random",WAI_ApocalypticSkin,"Random",_aiType,_mission] call WAI_SpawnGroup;
[[(_position select 0) + 22, (_position select 1) - 11, .25],5,_difficulty,"Random","AA","Random",WAI_ApocalypticSkin,"Random",_aiType,_mission] call WAI_SpawnGroup;
[[(_position select 0) - 1, (_position select 1) + 39, .25],5,_difficulty,"Random","","Random",WAI_ApocalypticSkin,"Random",_aiType,_mission] call WAI_SpawnGroup;
//[[(_position select 0) - 16, (_position select 1) + 25, .25],5,_difficulty,"Random","","Random",WAI_ApocalypticSkin,"Random",_aiType,_mission] call WAI_SpawnGroup;
//[[(_position select 0) - 17, (_position select 1) + 3, .25],5,_difficulty,"Random","","Random",WAI_ApocalypticSkin,"Random",_aiType,_mission] call WAI_SpawnGroup;
// Vehicle Patrol
[[(_position select 0) + 100, _position select 1, 0],[(_position select 0) + 100, _position select 1, 0],50,2,"BAF_Jackal2_L2A1_D_DZ","Random",_aiType,_aiType,_mission] call WAI_VehPatrol;
[WAI_UnarmedTrackedVeh,[(_position select 0) - 9.7, (_position select 1) - 8],_mission, true, -209] call WAI_PublishVeh;
//Static guns
[[
[(_position select 0) + 27.3671, (_position select 1) - 30.6905, 0],
((_objects select 2) modelToWorld [-6.04492,6.05078,13.6449]),
[(_position select 0) - 55.6475, (_position select 1) + 33.6943, 0],
[(_position select 0) - 5.6695, (_position select 1) + 59.6269, 0],
((_objects select 1) modelToWorld [6.00293,6.05811,13.7865]),
[(_position select 0) - 39.3331, (_position select 1) + 19.7656, 0],
[(_position select 0) - 2.6773, (_position select 1) + 7.0332, 0]
],"Random",_difficulty,WAI_ApocalypticSkin,_aiType,"Random","Random","Random",_mission] call WAI_SpawnStatic;
[
_mission, // Mission number
_position, // Position of mission
_difficulty, // Difficulty
_name, // Name of Mission
_localName,
_aiType, // "Bandit" or "Hero"
_markerIndex,
_posIndex,
_claimPlayer,
true, // show mission marker?
false, // make minefields available for this mission
["crate"], // Completion type: ["crate"], ["kill"], or ["assassinate", _unitGroup],
_messages
] spawn WAI_MissionMonitor;

View File

@ -0,0 +1,77 @@
private ["_mission","_position","_rndnum","_aiType","_missionType","_loot"];
_mission = count wai_mission_data -1;
_missionType = _this select 0; // Type of mission: "MainHero" or "MainBandit"
_aiType = _this select 1; // Type of AI - opposite of mission type
_position = [80] call find_position;
diag_log format["WAI: [Mission:[%2] Hippy Commune]: Starting... %1",_position,_missionType];
_loot = if (_missionType == "MainHero") then {Loot_CropRaider select 0;} else {Loot_CropRaider select 1;};
//Spawn Crates
[[
[_loot,crates_small,[2,0,.1]]
],_position,_mission] call wai_spawnCrate;
// Spawn Objects
[[
["fiberplant",[-10.8,-16.3]],
["fiberplant",[16.2,-17.6]],
["fiberplant",[-17.3,21]],
["fiberplant",[28.6,29]],
["fiberplant",[-29.8,-31.1]],
["fiberplant",[30.2,-33]],
["fiberplant",[-32,28.7]],
["fiberplant",[-32,-1.1]],
["fiberplant",[1.3,-28]],
["fiberplant",[27,2]],
["fiberplant",[-0.3,26]],
["fiberplant",[35.9,39]],
["fiberplant",[-39,-40.3]],
["fiberplant",[-36.9,-38.6]],
["fiberplant",[38,-38.9]],
["fiberplant",[-37,39.7]],
["fiberplant",[-0.1,42.3]],
["fiberplant",[42.1,-0.1]],
["fiberplant",[0.1,-40.2]],
["hruzdum",[-0.01,-0.01]],
["fiberplant",[-10,-11]],
["fiberplant",[13,12.2]],
["fiberplant",[12.3,-10.6]],
["fiberplant",[-11.3,12.7]],
["fiberplant",[15,10]]
],_position,_mission] call wai_spawnObjects;
//Group Spawning
[[(_position select 0) + 9, (_position select 1) - 13, 0],5,"Hard",["Random","AT"],4,"Random","Rocker3_DZ","Random",_aiType,_mission] call spawn_group;
[[(_position select 0) + 13, (_position select 1) + 15, 0],5,"Hard","Random",4,"Random","Rocker1_DZ","Random",_aiType,_mission] call spawn_group;
[[(_position select 0) + 13, (_position select 1) + 15, 0],5,"Hard","Random",4,"Random","Rocker1_DZ","Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 5);
[[(_position select 0) - 13, (_position select 1) + 15, 0],_rndnum,"Hard","Random",4,"Random","Policeman","Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 5);
[[_position select 0, _position select 1, 0],_rndnum,"Hard","Random",4,"Random","Policeman","Random",_aiType,_mission] call spawn_group;
//Humvee Patrol
[[(_position select 0) + 55, _position select 1, 0],[(_position select 0) + 50, _position select 1, 0],50,2,"HMMWV_Armored","Hard",_aiType,_aiType,_mission] call vehicle_patrol;
//Static Guns
[[
[(_position select 0) - 48, (_position select 1) + 0.1, 0],
[(_position select 0) + 2, (_position select 1) + 48, 0]
],"M2StaticMG","Hard","Policeman",_aiType,0,2,"Random","Random",_mission] call spawn_static;
//Heli Paradrop
[_position,200,"UH1H_DZ","East",[3000,4000],150,1.0,200,10,"Hard","Random",4,"Random",_aiType,"Random",_aiType,true,_mission] spawn heli_para;
[
_mission, // Mission number
_position, // Position of mission
"Hard", // Difficulty
"Crop Raider", // Name of Mission
_missionType, // Mission Type: MainHero or MainBandit
true, // show mission marker?
true, // make minefields available for this mission
["crate"], // Completion type: ["crate"], ["kill"], or ["assassinate", _unitGroup],
["STR_CL_GENERAL_CROPRAIDER_ANNOUNCE","STR_CL_GENERAL_CROPRAIDER_WIN","STR_CL_GENERAL_CROPRAIDER_FAIL"]
] call mission_winorfail;

View File

@ -0,0 +1,69 @@
private ["_mission","_position","_rndnum","_aiType","_messages","_missionType","_loot"];
_mission = count wai_mission_data -1;
_missionType = _this select 0; // Type of mission: "MainHero" or "MainBandit"
_aiType = _this select 1; // Type of AI - opposite of mission type
_position = [80] call find_position;
diag_log format["WAI: [Mission:[%2] Drone Pilot]: Starting... %1",_position,_missionType];
_loot = if (_missionType == "MainHero") then {Loot_DronePilot select 0;} else {Loot_DronePilot select 1;};
//Spawn Crates
[[
[_loot,crates_large,[2,0]]
],_position,_mission] call wai_spawnCrate;
// Spawn Objects
[[
["MQ9PredatorB",[11,-28]],
["TK_WarfareBUAVterminal_EP1",[-6,-15],-153.81],
["Land_budova4_in",[-13,3.5]],
["Land_Vysilac_FM",[-10,-7]],
["MAP_runway_poj_draha",[10,5]],
["ClutterCutter_EP1",[10,36]],
["ClutterCutter_EP1",[10,30]],
["ClutterCutter_EP1",[10,24]],
["ClutterCutter_EP1",[10,18]],
["ClutterCutter_EP1",[10,12]],
["ClutterCutter_EP1",[10,6]],
["ClutterCutter_EP1",[10,0.1]],
["ClutterCutter_EP1",[10,-6]],
["ClutterCutter_EP1",[10,-12]],
["ClutterCutter_EP1",[10,-18]],
["ClutterCutter_EP1",[10,-24]],
["ClutterCutter_EP1",[-4,-5]]
],_position,_mission] call wai_spawnObjects;
// Troops
[[(_position select 0) + 17, (_position select 1) - 18, 0],5,"Hard",["Random","AT"],4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
[[(_position select 0) - 11, (_position select 1) + 9, 0],5,"Hard","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
[[(_position select 0) + 15, (_position select 1) - 15, 0],5,"Hard","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 5);
[[(_position select 0) + 2, (_position select 1) + 18, 0],_rndnum,"Hard","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 5);
[[(_position select 0) + 2, (_position select 1) + 18, 0],_rndnum,"Hard","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
//Humvee Patrol
[[(_position select 0) + 55, _position select 1, 0],[(_position select 0) + 17, _position select 1, 0],50,2,"HMMWV_Armored","Hard",_aiType,_aiType,_mission] call vehicle_patrol;
//Static Guns
[[[(_position select 0) - 7, (_position select 1) + 19, 0]],"KORD_high_TK_EP1","Hard",_aiType,_aiType,0,2,"Random","Random",_mission] call spawn_static;
_messages = if (_missionType == "MainHero") then {
["STR_CL_HERO_DRONE_ANNOUNCE","STR_CL_HERO_DRONE_WIN","STR_CL_HERO_DRONE_FAIL"];
} else {
["STR_CL_BANDIT_DRONEPILOT_ANNOUNCE","STR_CL_BANDIT_DRONEPILOT_WIN","STR_CL_BANDIT_DRONEPILOT_FAIL"];
};
[
_mission, // Mission number
_position, // Position of mission
"Hard", // Difficulty
"Drone Pilot", // Name of Mission
_missionType, // Mission Type: MainHero or MainBandit
true, // show mission marker?
true, // make minefields available for this mission
["crate"], // Completion type: ["crate"], ["kill"], or ["assassinate", _unitGroup],
_messages
] call mission_winorfail;

View File

@ -0,0 +1,69 @@
private ["_rndnum","_mission","_position","_aiType","_messages","_missionType","_loot"];
_mission = count wai_mission_data -1;
_missionType = _this select 0; // Type of mission: "MainHero" or "MainBandit"
_aiType = _this select 1; // Type of AI - opposite of mission type
_position = [30] call find_position;
diag_log format["WAI: [Mission:[%2] Drug Bust]: Starting... %1",_position,_missionType];
_loot = if (_missionType == "MainHero") then {Loot_DrugBust select 0;} else {Loot_DrugBust select 1;};
//Spawn Crates
[[
[_loot,crates_medium,[2.3,-3,.1]]
],_position,_mission] call wai_spawnCrate;
// Spawn Objects
[[
["Land_dum_zboreny",[-0.01,0.02,-0.1]],
["Land_Misc_Garb_Heap_EP1",[5.6,3.4,-0.01]],
["MAP_Kitchenstove_Elec",[2,5,-0.1]],
["MAP_P_toilet_b_02",[-4.4,-3.3,-0.01],-90.84],
["MAP_P_bath",[-4.9,-5,-0.01]],
["MAP_armchair",[-1.7,-4.6,-0.01],179.92],
["MAP_SmallTable",[2.6,1.4,-0.15]],
["MAP_kitchen_chair_a",[2.5,2.2,-0.01]],
["Land_Boots_EP1",[8.4,-1.5,-0.01],-170.27],
["Land_Blankets_EP1",[-6.3,4.8,0.01],-170.27],
["Land_Bench_EP1",[-3.2,-2.2,0.015]],
["Land_Water_pipe_EP1",[-1.4,-3,0.01],105.15],
["Land_Bag_EP1",[-5.9,1.9,0.01]],
["LADAWreck",[-8,-4,-0.01],-119.578],
["SKODAWreck",[11,-3,-0.01]],
["MAP_tv_a",[-2.7,-0.1,0.01]],
["MAP_Dkamna_uhli",[-0.01,5,-0.1]],
["MAP_Skrin_opalena",[1.2,0.1,0.05]],
["MAP_Dhangar_whiteskrin",[0.9,1.6,0.05],91.19],
["MAP_garbage_paleta",[5.3,-2,-0.01]],
["MAP_t_salix2s",[-0.01,15,-0.01],47.639],
["MAP_t_salix2s",[-0.01,-17,-0.01]],
["MAP_t_salix2s",[25,-0.01,-0.01]],
["MAP_t_salix2s",[-24,-0.01,-0.01]]
],_position,_mission] call wai_spawnObjects;
//Troops
[[(_position select 0) - 12, (_position select 1) - 15,0],5,"Medium",["Random","AT"],4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
[[(_position select 0) + 12, (_position select 1) + 15,0],5,"Medium","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 4);
[[(_position select 0), (_position select 1), 0],_rndnum,"Medium","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 4);
[[(_position select 0), (_position select 1), 0],_rndnum,"Medium","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_messages = if (_missionType == "MainHero") then {
["STR_CL_HERO_DRUGBUST_ANNOUNCE","STR_CL_HERO_DRUGBUST_WIN","STR_CL_HERO_DRUGBUST_FAIL"];
} else {
["STR_CL_BANDIT_DRUGBUST_ANNOUNCE","STR_CL_BANDIT_DRUGBUST_WIN","STR_CL_BANDIT_DRUGBUST_FAIL"];
};
[
_mission, // Mission number
_position, // Position of mission
"Medium", // Difficulty
"Drug Bust", // Name of Mission
_missionType, // Mission Type: MainHero or MainBandit
true, // show mission marker?
true, // make minefields available for this mission
["crate"], // Completion type: ["crate"], ["kill"], or ["assassinate", _unitGroup],
_messages
] call mission_winorfail;

View File

@ -0,0 +1,65 @@
private ["_crate_type","_mission","_position","_crate","_rndnum","_baserunover","_baserunover0","_baserunover1","_baserunover2","_baserunover3","_baserunover4","_baserunover5"];
// Get mission number, important we do this early
_mission = count wai_mission_data -1;
_missionType = _this select 0; // Type of mission: "MainHero" or "MainBandit"
_aiType = _this select 1; // Type of AI - opposite of mission type
_position = [30] call find_position;
diag_log format["WAI: [Mission:[Hero] Fallen Satellite]: Starting... %1",_position];
//Setup the crate
_crate_type = crates_small call BIS_fnc_selectRandom;
_crate = createVehicle [_crate_type,[5935.9839,12235.38,0],[],0,"CAN_COLLIDE"];
_crate call wai_crate_setup;
//Buildings
_baserunover0 = createVehicle ["Satelit",[(_position select 0) - 8.41, (_position select 1) + 3.37, -0.013],[], 0, "CAN_COLLIDE"];
_baserunover1 = createVehicle ["MAP_rubble_metal_plates_03",[(_position select 0) - 8.1, (_position select 1) - 3.8, 0.01],[], 0, "CAN_COLLIDE"];
_baserunover2 = createVehicle ["MAP_rubble_metal_plates_01",[(_position select 0) - 6.8, (_position select 1) - 1.6, -0.015],[], 0, "CAN_COLLIDE"];
_baserunover3 = createVehicle ["Land_Dirthump01",[(_position select 0) - 7.4, (_position select 1) -2.8, -1.96],[], 0, "CAN_COLLIDE"];
_baserunover4 = createVehicle ["Land_Dirthump01",[(_position select 0) - 6.6, (_position select 1) -2.8, -1.99],[], 0, "CAN_COLLIDE"];
_baserunover5 = createVehicle ["Land_Fire_barrel_burning",[(_position select 0) -6.1, (_position select 1) -3.8, -0.85],[], 0, "CAN_COLLIDE"];
// Adding buildings to one variable just for tidiness
_baserunover = [_baserunover0,_baserunover1,_baserunover2,_baserunover3,_baserunover4,_baserunover5];
// Set some directions for our buildings
_directions = [0,0,61.76,-2.706,-66.12,0];
{ _x setDir (_directions select _forEachIndex) } forEach _baserunover;
// Make buildings flat on terrain surface
{ _x setVectorUp surfaceNormal position _x; } count _baserunover;
//Troops
_rndnum = round (random 5);
[[(_position select 0) - 22, (_position select 1) +7,0],5,"Easy",["Random","AT"],3,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
[[(_position select 0) +15, (_position select 1) -19,0],5,"Easy","Random",3,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
[[(_position select 0) +15, (_position select 1) +3,0],4,"Easy","Random",3,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
[[(_position select 0) - 16, (_position select 1) -13,0],_rndnum,"Easy","Random",3,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
//Static Guns
[[
[(_position select 0) - 8, (_position select 1) + 12, 0.1],
[(_position select 0) - 4.7, (_position select 1) - 16, 0.1]
],"M2StaticMG","Easy",_aiType,_aiType,0,2,"Random","Random",_mission] call spawn_static;
// Array of mission variables to send
[
_mission, // Mission number
_position, // Position of mission
"Medium", // Difficulty
"Fallen Satellite", // Name of Mission
_missionType, // Mission Type: MainHero or MainBandit
true, // show mission marker?
true, // make minefields available for this mission
_crate, // crate object info
["crate"], // Completion type: ["crate"], ["kill"], or ["assassinate", _unitGroup],
[], // cleanup objects
"STR_CL_HERO_FALLENSATELLITE_ANNOUNCE", // mission announcement
"STR_CL_HERO_FALLENSATELLITE_WIN", // mission success
"STR_CL_HERO_FALLENSATELLITE_FAIL", // mission fail
[10,4,0,3,2] // Dynamic crate array
] call mission_winorfail;

View File

@ -0,0 +1,58 @@
private ["_rndnum","_mission","_position","_messages","_aiType","_missionType","_loot"];
_mission = count wai_mission_data -1;
_missionType = _this select 0; // Type of mission: "MainHero" or "MainBandit"
_aiType = _this select 1; // Type of AI - opposite of mission type
_position = [30] call find_position;
diag_log format["WAI: [Mission:[%2] Farmer]: Starting... %1",_position,_missionType];
_loot = if (_missionType == "MainHero") then {Loot_Farmer select 0;} else {Loot_Farmer select 1;};
//Spawn Crates
[[
[_loot,crates_medium,[.3,0,.4]]
],_position,_mission] call wai_spawnCrate;
// Spawn Objects
[[
["MAP_HouseV2_01A",[-37,15],-107],
["MAP_Farm_WTower",[-17,32]],
["MAP_sara_stodola3",[12,36.5],20.6],
["MAP_Misc_Cargo1C",[17,4],5.9],
["MAP_Misc_Cargo1C",[15,12],-41.2],
["MAP_t_picea2s",[-17.5,9]],
["MAP_t_picea2s",[-1,-13]],
["MAP_t_picea2s",[-8.5,51.5]],
["MAP_t_picea2s",[18.5,-9.4]],
["Haystack",[7,24.5],15.3],
["MAP_stodola_old_open",[0,-2,0.4],-80.8]
],_position,_mission] call wai_spawnObjects;
//Troops
[[(_position select 0) -17,(_position select 1) +29,0],5,"Easy",["Random","AT"],4,"Random","RU_Villager2","Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 3);
[[(_position select 0) -12,(_position select 1) +20,0],_rndnum,"Random","Random",4,"Random","Citizen2_EP1","Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 3);
[[(_position select 0) -17,(_position select 1) +29,0],_rndnum,"Easy",["Random","AT"],4,"Random","RU_Villager2","Random",_aiType,_mission] call spawn_group;
//Spawn vehicles
["Tractor_DZE",[(_position select 0) -6.5, (_position select 1) +12.7],_mission,true,46.7] call custom_publish;
_messages = if (_missionType == "MainHero") then {
["STR_CL_HERO_FARMER_ANNOUNCE","STR_CL_HERO_FARMER_WIN","STR_CL_HERO_FARMER_FAIL"];
} else {
["STR_CL_BANDIT_FARMER_ANNOUNCE","STR_CL_BANDIT_FARMER_WIN","STR_CL_BANDIT_FARMER_FAIL"];
};
[
_mission, // Mission number
_position, // Position of mission
"Easy", // Difficulty
"Farmer", // Name of Mission
_missionType, // Mission Type: MainHero or MainBandit
true, // show mission marker?
true, // make minefields available for this mission
["kill"], // Completion type: ["crate"], ["kill"], or ["assassinate", _unitGroup],
_messages
] call mission_winorfail;

View File

@ -0,0 +1,69 @@
private ["_rndnum","_mission","_position","_messages","_aiType","_missionType","_loot1","_loot2"];
_mission = count wai_mission_data -1;
_missionType = _this select 0; // Type of mission: "MainHero" or "MainBandit"
_aiType = _this select 1; // Type of AI - opposite of mission type
_position = [50] call find_position;
diag_log format["WAI: [Mission:[%2] Fire Station]: Starting... %1",_position,_missionType];
_loot1 = if (_missionType == "MainHero") then {Loot_Firestation1 select 0;} else {Loot_Firestation1 select 1;};
_loot2 = if (_missionType == "MainHero") then {Loot_Firestation2 select 0;} else {Loot_Firestation2 select 1;};
//Spawn Crates
[[
[_loot1,crates_large,[-3.6,-4.4],-30],
[_loot2,crates_large,[2,-1.1],-30]
],_position,_mission] call wai_spawnCrate;
// Spawn Objects
[[
["MAP_a_stationhouse",[0,0],-210],
["Land_fort_bagfence_round",[3.5,-20],68],
["Land_fort_bagfence_round",[-1,-23.3],219]
],_position,_mission] call wai_spawnObjects;
//Troops
[_position,5,"Extreme",["Random","AT"],4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
[_position,5,"Extreme","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
[_position,5,"Extreme","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
[_position,5,"Extreme","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 5);
[_position,_rndnum,"Extreme","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 5);
[_position,_rndnum,"Extreme","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
// Spawn Vehicle
[armed_vehicle,[(_position select 0) -9.5, (_position select 1) -6.8],_mission,true,-29] call custom_publish;
//Humvee Patrol
[[(_position select 0) + 100, _position select 1, 0],[(_position select 0) + 100, _position select 1, 0],50,2,"HMMWV_Armored","Random",_aiType,_aiType,_mission] call vehicle_patrol;
//Heli Paradrop
[_position,400,"UH60M_EP1_DZE","East",[3000,4000],150,1.0,200,10,"Random","Random",4,"Random",_aiType,"Random",_aiType,false,_mission] spawn heli_para;
//Static guns
[[
[(_position select 0) + 4.9, (_position select 1) + 6.5, 17.94],
[(_position select 0) - 12.8, (_position select 1) - 4.2, 4.97],
[(_position select 0) + 0.9, (_position select 1) - 20.9, 0],
[(_position select 0) + 23.5, (_position select 1) + 1.1, 8.94]
],"M2StaticMG","Extreme",_aiType,_aiType,1,2,"Random","Random",_mission] call spawn_static;
_messages = if (_missionType == "MainHero") then {
["STR_CL_HERO_FIRESTATION_ANNOUNCE","STR_CL_HERO_FIRESTATION_WIN","STR_CL_HERO_FIRESTATION_FAIL"];
} else {
["STR_CL_BANDIT_FIRESTATION_ANNOUNCE","STR_CL_BANDIT_FIRESTATION_WIN","STR_CL_BANDIT_FIRESTATION_FAIL"];
};
[
_mission, // Mission number
_position, // Position of mission
"Extreme", // Difficulty
"Fire Station", // Name of Mission
_missionType, // Mission Type: MainHero or MainBandit
true, // show mission marker?
true, // make minefields available for this mission
["crate"], // Completion type: ["crate"], ["kill"], or ["assassinate", _unitGroup],
_messages
] call mission_winorfail;

View File

@ -0,0 +1,55 @@
private ["_mission","_position","_aiType","_rndnum","_missionType","_loot"];
_mission = count wai_mission_data -1;
_missionType = _this select 0; // Type of mission: "MainHero" or "MainBandit"
_aiType = _this select 1; // Type of AI - opposite of mission type
_position = [80] call find_position;
diag_log format["WAI: [Mission:[%2] Gem Tower]: Starting... %1",_position,_missionType];
_loot = if (_missionType == "MainHero") then {Loot_GemTower select 0;} else {Loot_GemTower select 1;};
//Spawn Crates
[[
[_loot,crates_medium,[-20,11]]
],_position,_mission] call wai_spawnCrate;
// Spawn Objects
[[
["Land_Misc_Coltan_Heap_EP1",[-3.41,16.4,-2.5],-82.16],
["Land_Ind_SiloVelke_01",[-0.01,-0.01,-0.25]],
["Land_Ind_SiloVelke_01",[-21,-0.4,-0.25],182.209],
["Land_Misc_Coltan_Heap_EP1",[-31,12,-2],8.27],
["Land_A_Castle_Bastion",[-21,11,-0.2]],
["Land_Misc_Coltan_Heap_EP1",[-26,34,-2]]
],_position,_mission] call wai_spawnObjects;
//Troops
[[(_position select 0) + 29, (_position select 1) - 21, 0],5,"Hard",["Random","AT"],4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
[[(_position select 0) + 21, (_position select 1) + 19, 0],5,"Hard","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
[[(_position select 0) - 23, (_position select 1) - 19, 0],5,"Hard","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 5);
[[(_position select 0) - 12, (_position select 1) + 23, 0],_rndnum,"Hard","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 5);
[[(_position select 0) - 12, (_position select 1) + 23, 0],_rndnum,"Hard","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
//Humvee Patrol
[[(_position select 0) + 50, _position select 1, 0],[(_position select 0) - 60, _position select 1, 0],50,2,"HMMWV_Armored","Hard",_aiType,_aiType,_mission] call vehicle_patrol;
//Static Guns
[[
[(_position select 0) - 1, (_position select 1) + 39, 0],
[(_position select 0) + 33, (_position select 1) - 21, 0]
],"KORD_high_TK_EP1","Easy",_aiType,_aiType,0,2,"Random","Random",_mission] call spawn_static;
[
_mission, // Mission number
_position, // Position of mission
"Hard", // Difficulty
"Gem Tower", // Name of Mission
_missionType, // Mission Type: MainHero or MainBandit
true, // show mission marker?
true, // make minefields available for this mission
["crate"], // Completion type: ["crate"], ["kill"], or ["assassinate", _unitGroup],
["STR_CL_GENERAL_GEMTOWER_ANNOUNCE","STR_CL_GENERAL_GEMTOWER_WIN","STR_CL_GENERAL_GEMTOWER_FAIL"]
] call mission_winorfail;

View File

@ -0,0 +1,84 @@
private ["_rndnum","_crate_type","_mission","_position","_crate","_baserunover","_baserunover0","_baserunover1","_baserunover2","_baserunover3","_baserunover4","_baserunover5","_baserunover6","_baserunover7","_baserunover8","_baserunover9","_baserunover10","_baserunover11","_baserunover12","_baserunover13","_baserunover14","_baserunover15","_baserunover16","_baserunover17","_baserunover18","_baserunover19","_baserunover20","_baserunover21","_baserunover22","_baserunover23","_baserunover24","_baserunover25","_baserunover26","_baserunover27","_baserunover28","_baserunover29","_baserunover30"];
// Get mission number, important we do this early
_mission = count wai_mission_data -1;
_missionType = _this select 0; // Type of mission: "MainHero" or "MainBandit"
_aiType = _this select 1; // Type of AI - opposite of mission type
_position = [30] call find_position;
diag_log format["WAI: [Mission:[Hero] Gold Mine]: Starting... %1",_position];
//Setup the crate
_crate_type = crates_small call BIS_fnc_selectRandom;
_crate = createVehicle [_crate_type,[(_position select 0) + 0.2,(_position select 1),0], [], 0, "CAN_COLLIDE"];
_crate call wai_crate_setup;
//Buildings
_baserunover0 = createVehicle ["MAP_R2_RockWall",[(_position select 0) -24, (_position select 1) +11,-7.1],[], 0, "CAN_COLLIDE"];
_baserunover1 = createVehicle ["MAP_R2_RockWall",[(_position select 0) +6, (_position select 1) +16, -5.9],[], 0, "CAN_COLLIDE"];
_baserunover2 = createVehicle ["MAP_R2_RockWall",[(_position select 0) + 30, (_position select 1) + 3, -7.1],[], 0, "CAN_COLLIDE"];
_baserunover3 = createVehicle ["MAP_R2_RockWall", [(_position select 0) +45, (_position select 1) -18, -7.1],[], 0, "CAN_COLLIDE"];
_baserunover4 = createVehicle ["MAP_R2_RockWall", [(_position select 0) - 29, (_position select 1) -12, -7.1],[], 0, "CAN_COLLIDE"];
_baserunover5 = createVehicle ["MAP_R2_RockWall", [(_position select 0) - 0.1, (_position select 1) +15, +16.85],[], 0, "CAN_COLLIDE"];
_baserunover6 = createVehicle ["MAP_R2_RockWall",[(_position select 0) + 19, (_position select 1) -9, +17.6],[], 0, "CAN_COLLIDE"];
_baserunover7 = createVehicle ["MAP_R2_RockWall",[(_position select 0) -11, (_position select 1) -3, +14.8],[], 0, "CAN_COLLIDE"];
_baserunover8 = createVehicle ["MAP_R2_RockWall",[(_position select 0) -3, (_position select 1) -9, +20.37],[], 0, "CAN_COLLIDE"];
_baserunover9 = createVehicle ["MAP_R2_RockWall", [(_position select 0) -29, (_position select 1) -27, -7.1],[], 0, "CAN_COLLIDE"];
_baserunover10 = createVehicle ["MAP_R2_RockWall", [(_position select 0) -20, (_position select 1) -36, -7.1],[], 0, "CAN_COLLIDE"];
_baserunover11 = createVehicle ["MAP_R2_RockWall", [(_position select 0) - 2, (_position select 1) - 25, +16.2],[], 0, "CAN_COLLIDE"];
_baserunover12 = createVehicle ["MAP_R2_RockWall",[(_position select 0) + 11, (_position select 1) - 30, +16.2],[], 0, "CAN_COLLIDE"];
_baserunover13 = createVehicle ["MAP_R2_RockTower",[(_position select 0) +7, (_position select 1) - 24, -20.4],[], 0, "CAN_COLLIDE"];
_baserunover14 = createVehicle ["MAP_R2_Boulder2",[(_position select 0) +14, (_position select 1) - 27, -0.015],[], 0, "CAN_COLLIDE"];
_baserunover15 = createVehicle ["MAP_R2_Boulder1",[(_position select 0) +18, (_position select 1) - 37, -0.015],[], 0, "CAN_COLLIDE"];
_baserunover16 = createVehicle ["MAP_R2_Rock1",[(_position select 0) - 2, (_position select 1) - 7, -25.05],[], 0, "CAN_COLLIDE"];
_baserunover17 = createVehicle ["MAP_Ind_HammerMill", [(_position select 0) +30, (_position select 1) - 53,-6.1],[], 0, "CAN_COLLIDE"];
_baserunover18 = createVehicle ["UralWreck", [(_position select 0) +34, (_position select 1) -59,-0.01],[], 0, "CAN_COLLIDE"];
_baserunover19 = createVehicle ["MAP_Ind_Conveyer", [(_position select 0) + 22, (_position select 1) -45, 0.1],[], 0, "CAN_COLLIDE"];
_baserunover20 = createVehicle ["Land_Dirthump01",[(_position select 0) +13, (_position select 1) - 38,-1.41],[], 0, "CAN_COLLIDE"];
_baserunover21 = createVehicle ["Land_Dirthump01",[(_position select 0) +13, (_position select 1) - 39,-1.45],[], 0, "CAN_COLLIDE"];
_baserunover22 = createVehicle ["MAP_R2_RockTower",[(_position select 0) + 60, (_position select 1) -55,-26.69],[], 0, "CAN_COLLIDE"];
_baserunover23 = createVehicle ["MAP_R2_RockTower", [(_position select 0) + 12, (_position select 1) -121,-0.02],[], 0, "CAN_COLLIDE"];
_baserunover24 = createVehicle ["Gold_Vein_DZE", [(_position select 0) +13, (_position select 1) -14,-0.01],[], 0, "CAN_COLLIDE"];
_baserunover25 = createVehicle ["Gold_Vein_DZE", [(_position select 0) - 6, (_position select 1) - 25,-0.01],[], 0, "CAN_COLLIDE"];
_baserunover26 = createVehicle ["Gold_Vein_DZE",[(_position select 0) - 8, (_position select 1) -17,-0.01],[], 0, "CAN_COLLIDE"];
_baserunover27 = createVehicle ["fiberplant",[(_position select 0) +7, (_position select 1) -1,-0.02],[], 0, "CAN_COLLIDE"];
_baserunover28 = createVehicle ["fiberplant",[(_position select 0) +5, (_position select 1) -6,-0.02],[], 0, "CAN_COLLIDE"];
_baserunover29 = createVehicle ["fiberplant",[(_position select 0) - 13, (_position select 1) -21,-0.02],[], 0, "CAN_COLLIDE"];
_baserunover30 = createVehicle ["fiberplant", [(_position select 0) + 19, (_position select 1) -21,-0.02],[], 0, "CAN_COLLIDE"];
_baserunover = [_baserunover0,_baserunover1,_baserunover2,_baserunover3,_baserunover4,_baserunover5,_baserunover6,_baserunover7,_baserunover8,_baserunover9,_baserunover10,_baserunover11,_baserunover12,_baserunover13,_baserunover14,_baserunover15,_baserunover16,_baserunover17,_baserunover18,_baserunover19,_baserunover20,_baserunover21,_baserunover22,_baserunover23,_baserunover24,_baserunover25,_baserunover26,_baserunover27,_baserunover28,_baserunover29,_baserunover30];
_directions = [-85.388,-151.6,40.18,131.1,-258.57,0,-128.72,165.8,0,66.4,23.5,-13.9,-28.07,0,0,0,-4.74,-69.97,14.54,116.29,92.4,42.23,0,98.4,0,0,0,0,0,0,0];
{ _x setDir (_directions select _forEachIndex) } forEach _baserunover;
{ _x setVectorUp surfaceNormal position _x; } count _baserunover;
//Troops
_rndnum = round (random 5);
[[(_position select 0) +20, (_position select 1) - 54, 0],5,"Medium",["Random","AT"],4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
[[(_position select 0) - 15, (_position select 1) - 70, 0],5,"Medium","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
[[(_position select 0) + 60, (_position select 1) - 38, 0],4,"Medium","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
[[(_position select 0) + 33, (_position select 1) + 20, 0],_rndnum,"Medium","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
//Static Guns
[[
[(_position select 0) + 44, (_position select 1) - 55, 0],
[(_position select 0) + 4, (_position select 1) - 70, 0]
],"M2StaticMG","Hard",_aiType,_aiType,1,2,"Random","Random",_mission] call spawn_static;
// Array of mission variables to send
[
_mission, // Mission number
_position, // Position of mission
"Medium", // Difficulty
"Gold Mine", // Name of Mission
_missionType, // Mission Type: MainHero or MainBandit
true, // show mission marker?
true, // make minefields available for this mission
_crate, // crate object info
["crate"], // Completion type: ["crate"], ["kill"], or ["assassinate", _unitGroup],
[_baserunover], // cleanup objects
"STR_CL_HERO_GOLDMINE_ANNOUNCE", // mission announcement
"STR_CL_HERO_GOLDMINE_WIN", // mission success
"STR_CL_HERO_GOLDMINE_FAIL", // mission fail
[10,5,20,3,2] // Dynamic crate array
] call mission_winorfail;

View File

@ -0,0 +1,56 @@
private ["_rndnum","_mission","_position","_aiType","_messages","_missionType","_loot"];
_mission = count wai_mission_data -1;
_missionType = _this select 0; // Type of mission: "MainHero" or "MainBandit"
_aiType = _this select 1; // Type of AI - opposite of mission type
_position = [40] call find_position;
diag_log format["WAI: [Mission:[%2] Lunch break Convoy]: Starting... %1",_position,_missionType];
_loot = if (_missionType == "MainHero") then {Loot_IkeaConvoy select 0;} else {Loot_IkeaConvoy select 1;};
//Spawn Crates
[[
[_loot,crates_large,[0,0]]
],_position,_mission] call wai_spawnCrate;
//Troops
[_position,5,"Hard",["Random","AT"],4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
[_position,5,"Hard","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
[_position,5,"Hard","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 5);
[_position,_rndnum,"Hard","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 5);
[_position,_rndnum,"Hard","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
//Static Guns
[[
[(_position select 0) - 30, (_position select 1) + 4, 0],
[(_position select 0) + 10, (_position select 1) - 30, 0],
[(_position select 0) + 8, (_position select 1) + 30, 0]
],"M2StaticMG","Hard",_aiType,_aiType,1,2,"Random","Random",_mission] call spawn_static;
//Heli Para Drop
[_position,400,"BAF_Merlin_HC3_D","North",[3000,4000],150,1.0,200,10,"Random","Random",4,"Random",_aiType,"Random",_aiType,false,_mission] spawn heli_para;
[cargo_trucks,[(_position select 0) + 19,(_position select 1) + 11],_mission,true,90] call custom_publish;
[refuel_trucks,[(_position select 0) - 14,(_position select 1) - 14],_mission,true,-90] call custom_publish;
[military_unarmed,[(_position select 0) - 20,(_position select 1) - 6],_mission,true,-90] call custom_publish;
_messages = if (_missionType == "MainHero") then {
["STR_CL_HERO_IKEA_ANNOUNCE","STR_CL_HERO_IKEA_WIN","STR_CL_HERO_IKEA_FAIL"];
} else {
["STR_CL_BANDIT_IKEA_ANNOUNCE","STR_CL_BANDIT_IKEA_WIN","STR_CL_BANDIT_IKEA_FAIL"];
};
[
_mission, // Mission number
_position, // Position of mission
"Hard", // Difficulty
"IKEA Convoy", // Name of Mission
_missionType, // Mission Type: MainHero or MainBandit
true, // show mission marker?
true, // make minefields available for this mission
["crate"], // Completion type: ["crate"], ["kill"], or ["assassinate", _unitGroup],
_messages
] call mission_winorfail;

View File

@ -0,0 +1,77 @@
private ["_rndnum","_mission","_position","_aiType","_messages","_missionType","_loot"];
_mission = count wai_mission_data -1;
_missionType = _this select 0; // Type of mission: "MainHero" or "MainBandit"
_aiType = _this select 1; // Type of AI - opposite of mission type
_position = [30] call find_position;
diag_log format["WAI: [Mission:[%2] Junk Yard]: Starting... %1",_position,_missionType];
_loot = if (_missionType == "MainHero") then {Loot_Junkyard select 0;} else {Loot_Junkyard select 1;};
//Spawn Crates
[[
[_loot,crates_small,[.2,0]]
],_position,_mission] call wai_spawnCrate;
// Spawn Objects
[[
["Mi8Wreck",[31,-12.4,-0.12]],
["UralWreck",[-7,-9,-0.04],-49.99],
["UralWreck",[23,4,-0.04],201.46],
["UralWreck",[-7,23,-0.04],80.879],
["HMMWVWreck",[-8,7,-0.04],44.77],
["BMP2Wreck",[-4,24,-0.02],-89],
["T72Wreck",[11,-13,-0.02],27],
["UralWreck",[14,10,-0.02],162],
["T72Wreck",[4,16,-0.02]],
["UH60_ARMY_Wreck_DZ",[7,1.3,-0.02],-41],
["Land_Dirthump01",[9,1,-1.59],25],
["Land_Dirthump01",[8,0.2,-1.59],53],
["Mi8Wreck",[5,-34,-0.02],94],
["BRDMWreck",[-1,-20,-0.12],-1.7],
["T72Wreck",[-9,-21,-0.02],-75],
["Mi8Wreck",[-21,-5,-0.02],-24],
["Land_Misc_Rubble_EP1",[-10.02,7,-0.1]],
["Land_Shed_W03_EP1",[-7,-1.4,-0.02],-99],
["Land_Misc_Garb_Heap_EP1",[-6,1,-0.02]],
["Land_Misc_Garb_Heap_EP1",[18,10,-0.02]],
["Land_Misc_Garb_Heap_EP1",[-10,-12,-0.02]],
["MAP_garbage_misc",[5,-21,-0.02]],
["MAP_garbage_misc",[7,18,-0.02],-178],
["MAP_garbage_paleta",[-12,14,-0.02],-91],
["MAP_Kitchenstove_Elec",[-11,1.5,-0.02],146],
["MAP_tv_a",[-12,-0.01,-0.02],108],
["MAP_washing_machine",[-11,-1,-0.02],100],
["MAP_P_toilet_b_02",[-16,0.01,-0.02],36],
["Land_Misc_Garb_Heap_EP1",[-17,-3,-0.02],93],
["MAP_garbage_paleta",[-11,-0.01,-0.02],21],
["Land_Fire_barrel_burning",[-13,-3,-0.02]],
["Land_Fire_barrel_burning",[2,-9,-0.02]]
],_position,_mission] call wai_spawnObjects;
//Troops
[[(_position select 0) - 2, (_position select 1) - 5, 0],5,"Medium",["Random","AT"],4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
[[(_position select 0) - 19, (_position select 1) + 19, 0],5,"Medium","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 4);
[[(_position select 0) + 17, (_position select 1) + 21, 0],_rndnum,"Medium","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 4);
[[(_position select 0) + 17, (_position select 1) + 21, 0],_rndnum,"Medium","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_messages = if (_missionType == "MainHero") then {
["STR_CL_HERO_JUNKYARD_ANNOUNCE","STR_CL_HERO_JUNKYARD_WIN","STR_CL_HERO_JUNKYARD_FAIL"];
} else {
["STR_CL_BANDIT_JUNKYARD_ANNOUNCE","STR_CL_BANDIT_JUNKYARD_WIN","STR_CL_BANDIT_JUNKYARD_FAIL"];
};
[
_mission, // Mission number
_position, // Position of mission
"Medium", // Difficulty
"Junk Yard", // Name of Mission
_missionType, // Mission Type: MainHero or MainBandit
true, // show mission marker?
true, // make minefields available for this mission
["crate"], // Completion type: ["crate"], ["kill"], or ["assassinate", _unitGroup],
_messages
] call mission_winorfail;

View File

@ -0,0 +1,55 @@
private ["_mission","_position","_loot","_rndnum","_aiType","_messages","_missionType"];
_mission = count wai_mission_data -1;
_missionType = _this select 0; // Type of mission: "MainHero" or "MainBandit"
_aiType = _this select 1; // Type of AI - opposite of mission type
_position = [80] call find_position;
diag_log format["WAI: Mission:[%2] Lumber Mill started at %1",_position,_missionType];
_loot = if (_missionType == "MainHero") then {Loot_LumberJack select 0;} else {Loot_LumberJack select 1;};
//Spawn Crates
[[
[_loot,crates_large,[5,7]]
],_position,_mission] call wai_spawnCrate;
// Spawn Objects
[[
["Land_Ind_SawMill",[-2.4,24]],
["Land_Ind_Timbers",[11,8.6,-.1]],
["Land_Ind_Timbers",[16,12,-.1],-10.45],
["Land_Ind_Timbers",[6,-15],104.95],
["Misc_palletsfoiled",[5,-9,-0.009]],
["Misc_palletsfoiled_heap",[9,-8,-0.05]],
["Land_water_tank",[-10,-7]],
["UralWreck",[-17,5],59.2],
["MAP_t_quercus3s",[22,25,-0.2]]
],_position,_mission] call wai_spawnObjects;
// Troops
[[(_position select 0) + 12, (_position select 1) + 22.5, 0],5,"extreme",["random","at"],4,"random",_aiType,"random",[_aiType,150],_mission] call spawn_group;
[[(_position select 0) + 21, (_position select 1) + 11, 0],5,"hard","random",4,"random",_aiType,"random",_aiType,_mission] call spawn_group;
[[(_position select 0) - 1.12, (_position select 1) - 0.43, 0],5,"random","random",4,"random",_aiType,"random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 5);
[[(_position select 0) - 13, (_position select 1) - 23, 0],_rndnum,"random","random",4,"random",_aiType,"random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 5);
[[(_position select 0) - 13, (_position select 1) - 23, 0],_rndnum,"random","random",4,"random",_aiType,"random",_aiType,_mission] call spawn_group;
_messages = if (_missionType == "MainHero") then {
["STR_CL_HERO_LUMBER_ANNOUNCE","STR_CL_HERO_LUMBER_WIN","STR_CL_HERO_LUMBER_FAIL"];
} else {
["STR_CL_BANDIT_LUMBERMILL_ANNOUNCE","STR_CL_BANDIT_LUMBERMILL_WIN","STR_CL_BANDIT_LUMBERMILL_FAIL"];
};
[
_mission, // Mission number
_position, // Position of mission
"Hard", // Difficulty
"Lumber Mill", // Name of Mission
_missionType, // Mission Type: MainHero or MainBandit
true, // show mission marker?
true, // make minefields available for this mission
["crate"], // Completion type: ["crate"], ["kill"], or ["assassinate", _unitGroup],
_messages
] call mission_winorfail;

View File

@ -0,0 +1,61 @@
private ["_rndnum","_mission","_position","_aiType","_loot"];
_mission = count wai_mission_data -1;
_missionType = _this select 0; // Type of mission: "MainHero" or "MainBandit"
_aiType = _this select 1; // Type of AI - opposite of mission type
_position = [30] call find_position;
diag_log format["WAI: [Mission:[%2] The Farm]: Starting... %1",_position,_missionType];
_loot = if (_missionType == "MainHero") then {Loot_MacDonald select 0;} else {Loot_MacDonald select 1;};
//Spawn Crates
[[
[_loot,crates_small,[.02,0,.15]]
],_position,_mission] call wai_spawnCrate;
// Spawn Objects
[[
["MAP_sara_stodola",[4,-5,-0.12]],
["MAP_HouseV_2T2",[18,-11,-0.14]],
["MAP_t_quercus3s",[32.4,-32,-0.14]],
["MAP_t_quercus2f",[14,-3,-0.14]],
["MAP_t_pinusN2s",[-12,5,-0.14]],
["datsun01Wreck",[-10,-1,-0.02]],
["Haystack",[-1,-32,-0.02]],
["Haystack_small",[-25,-36,-0.16]],
["Haystack_small",[33,-43,-0.02]],
["Haystack_small",[10,-49,-0.02]],
["Haystack_small",[13,60,-0.02]],
["Haystack_small",[-33,-51,-0.02]],
["Haystack_small",[20,-67,-0.02]],
["Land_Shed_wooden",[10,-24,-0.02]],
["fiberplant",[12,-23,-0.02]]
],_position,_mission] call wai_spawnObjects;
//Troops
[[(_position select 0) - 1, (_position select 1) - 10, 0],5,"Hard",["Random","AT"],4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
[[(_position select 0) - 2, (_position select 1) - 50, 0],5,"Hard","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
[[(_position select 0) - 1, (_position select 1) + 11, 0],5,"Hard","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 5);
[[(_position select 0) - 1, (_position select 1) + 11, 0],_rndnum,"Hard","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 5);
[[(_position select 0) - 1, (_position select 1) + 11, 0],_rndnum,"Hard","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
//Humvee Patrol
[[(_position select 0) - 27, (_position select 1) - 18, 0],[(_position select 0) + 32, (_position select 1) + 1, 0],50,2,"Offroad_DSHKM_Gue_DZ","Hard",_aiType,_aiType,_mission] call vehicle_patrol;
//Static Guns
[[[(_position select 0) - 12, (_position select 1) - 18, 0]],"M2StaticMG","Hard",_aiType,_aiType,0,2,"Random","Random",_mission] call spawn_static;
[
_mission, // Mission number
_position, // Position of mission
"Hard", // Difficulty
"The Farm", // Name of Mission
_missionType, // Mission Type: MainHero or MainBandit
true, // show mission marker?
true, // make minefields available for this mission
["crate"], // Completion type: ["crate"], ["kill"], or ["assassinate", _unitGroup],
["STR_CL_GENERAL_FARM_ANNOUNCE","STR_CL_GENERAL_FARM_WIN","STR_CL_GENERAL_FARM_FAIL"]
] call mission_winorfail;

View File

@ -0,0 +1,75 @@
private ["_rndnum","_room","_mayor_himself","_mission","_position","_mansion","_mayor","_aiType","_loot"];
_mission = count wai_mission_data -1;
_missionType = _this select 0; // Type of mission: "MainHero" or "MainBandit"
_aiType = _this select 1; // Type of AI - opposite of mission type
_position = [40] call find_position;
diag_log format["WAI: [Mission:[%2] Mayors Mansion]: Starting... %1",_position,_missionType];
_loot = if (_missionType == "MainHero") then {Loot_Mayors select 0;} else {Loot_Mayors select 1;};
//Spawn Crates
[[
[_loot,crates_large,[0,0,.25]]
],_position,_mission] call wai_spawnCrate;
// Spawn Objects
_mansion = [[
["Land_A_Villa_EP1",[0,0]]
],_position,_mission] call wai_spawnObjects;
//Troops
[_position,5,"Extreme",["Random","AT"],4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
[_position,5,"Extreme","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
[_position,5,"Extreme","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
[_position,5,"Extreme","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 5);
[_position,_rndnum,"Extreme","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 5);
[_position,_rndnum,"Extreme","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
//The Mayor Himself
_mayor = [_position,1,"Extreme","Random",4,"Random","Special","Random",[_aiType,300],_mission] call spawn_group;
_mayor_himself = (units _mayor) select 0;
//Put the Mayor in his room
_room = (6 + ceil(random(3)));
_mayor_himself disableAI "MOVE";
_mayor_himself setPos (_mansion buildingPos _room);
//Let him move once player is near
_mayor_himself spawn {
private ["_mayor","_player_near"];
_mayor = _this;
_player_near = false;
while {!_player_near} do {
_player_near = [(position _mayor),30] call isNearPlayer;
uiSleep 1;
};
_mayor enableAI "MOVE";
};
//Humvee Patrol
[[(_position select 0) + 100, _position select 1, 0],[(_position select 0) + 100, _position select 1, 0],50,2,"HMMWV_Armored","Random",_aiType,_aiType,_mission] call vehicle_patrol;
//Heli Paradrop
[_position,400,"UH60M_EP1_DZE","North",[3000,4000],150,1.0,100,10,"Random","Random",4,"Random",_aiType,"Random",_aiType,false,_mission] spawn heli_para;
//Static mounted guns
[[
[(_position select 0) - 15, (_position select 1) + 15, 8],
[(_position select 0) + 15, (_position select 1) - 15, 8]
],"M2StaticMG","Extreme",_aiType,_aiType,1,2,"Random","Random",_mission] call spawn_static;
[
_mission, // Mission number
_position, // Position of mission
"Extreme", // Difficulty
"Mayors Mansion", // Name of Mission
_missionType, // Mission Type: MainHero or MainBandit
true, // show mission marker?
true, // make minefields available for this mission
["assassinate",_mayor], // Completion type: ["crate"], ["kill"], or ["assassinate", _unitGroup],
["STR_CL_MAYOR_ANNOUNCE","STR_CL_MAYOR_WIN","STR_CL_MAYOR_FAIL"]
] call mission_winorfail;

View File

@ -0,0 +1,50 @@
private ["_rndnum","_mission","_position","_aiType","_messages","_missionType","_loot"];
_mission = count wai_mission_data -1;
_missionType = _this select 0; // Type of mission: "MainHero" or "MainBandit"
_aiType = _this select 1; // Type of AI - opposite of mission type
_position = [30] call find_position;
diag_log format["WAI: [Mission:[%2] Medical Supply Camp]: Starting... %1",_position,_missionType];
_loot = if (_missionType == "MainHero") then {Loot_MediCamp select 0;} else {Loot_MediCamp select 1;};
//Spawn Crates
[[
[_loot,"USVehicleBox",[0,0],60]
],_position,_mission] call wai_spawnCrate;
// Spawn Objects
[[
["MAP_fort_watchtower",[1.5,12.6],-210],
["MAP_MASH",[-17,5.3],60],
["MAP_Stan_east",[-16.5,15.9],-30],
["USMC_WarfareBFieldhHospital",[3,-4.4],60],
["MAP_Stan_east",[-10,19.6],-30],
["MAP_MASH",[-14,-0.4],60]
],_position,_mission] call wai_spawnObjects;
//Troops
[[(_position select 0) - 7.5,(_position select 1) + 7.9,0],5,"Easy",["Random","AT"],4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 3);
[[(_position select 0) - 26,(_position select 1) - 2.4,0],_rndnum,"Easy","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 3);
[[(_position select 0) - 26,(_position select 1) - 2.4,0],_rndnum,"Easy","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_messages = if (_missionType == "MainHero") then {
["STR_CL_HERO_MSC_ANNOUNCE","STR_CL_HERO_MSC_WIN","STR_CL_HERO_MSC_FAIL"];
} else {
["STR_CL_BANDIT_MSC_ANNOUNCE","STR_CL_BANDIT_MSC_WIN","STR_CL_BANDIT_MSC_FAIL"];
};
[
_mission, // Mission number
_position, // Position of mission
"Easy", // Difficulty
"Medical Supply Camp", // Name of Mission
_missionType, // Mission Type: MainHero or MainBandit
true, // show mission marker?
true, // make minefields available for this mission
["kill"], // Completion type: ["crate"], ["kill"], or ["assassinate", _unitGroup],
_messages
] call mission_winorfail;

View File

@ -0,0 +1,73 @@
private ["_rndnum","_crate_type","_mission","_position","_crate","_baserunover","_baserunover0","_baserunover1","_baserunover2","_baserunover3","_baserunover4","_baserunover5","_baserunover6","_baserunover7","_baserunover8","_baserunover9","_baserunover10","_baserunover11","_baserunover12","_baserunover13","_baserunover14","_baserunover15"];
// Get mission number, important we do this early
_mission = count wai_mission_data -1;
_missionType = _this select 0; // Type of mission: "MainHero" or "MainBandit"
_aiType = _this select 1; // Type of AI - opposite of mission type
_position = [30] call find_position;
diag_log format["WAI: [Mission:[Hero] Oil Depot]: Starting... %1",_position];
//Setup the crate
_crate_type = crates_small call BIS_fnc_selectRandom;
_crate = createVehicle [_crate_type,[(_position select 0) + 0.2,(_position select 1),0], [], 0, "CAN_COLLIDE"];
_crate call wai_crate_setup;
//Buildings
_baserunover0 = createVehicle ["MAP_Ind_TankBig",[(_position select 0) - 9.5, (_position select 1) +7,-0.15],[], 0, "CAN_COLLIDE"];
_baserunover1 = createVehicle ["MAP_Ind_TankBig",[(_position select 0) + 11, (_position select 1) +4,-0.15],[], 0, "CAN_COLLIDE"];
_baserunover2 = createVehicle ["MAP_Ind_TankBig",[(_position select 0) +8, (_position select 1) -6,-0.15],[], 0, "CAN_COLLIDE"];
_baserunover3 = createVehicle ["MAP_Ind_TankBig",[(_position select 0) -11, (_position select 1) -12,-0.15],[], 0, "CAN_COLLIDE"];
_baserunover4 = createVehicle ["MAP_Ind_TankBig",[(_position select 0) -28.5, (_position select 1) -1.2,-0.15],[], 0, "CAN_COLLIDE"];
_baserunover5 = createVehicle ["MAP_Ind_TankBig",[(_position select 0) - 26.2, (_position select 1) +20,-0.15],[], 0, "CAN_COLLIDE"];
_baserunover6 = createVehicle ["MAP_Ind_TankBig",[(_position select 0) - 6, (_position select 1) +28,-0.015],[], 0, "CAN_COLLIDE"];
_baserunover7 = createVehicle ["GUE_WarfareBVehicleServicePoint",[(_position select 0) -30, (_position select 1) -15,-0.015],[], 0, "CAN_COLLIDE"];
_baserunover8 = createVehicle ["GUE_WarfareBVehicleServicePoint",[(_position select 0) +21, (_position select 1) +3,-0.015],[], 0, "CAN_COLLIDE"];
_baserunover9 = createVehicle ["GUE_WarfareBVehicleServicePoint",[(_position select 0) - 7, (_position select 1) +43,-0.015],[], 0, "CAN_COLLIDE"];
_baserunover10 = createVehicle ["Barrels",[(_position select 0) +0.1, (_position select 1) +6,-0.015],[], 0, "CAN_COLLIDE"];
_baserunover11 = createVehicle ["Barrels",[(_position select 0) - 17, (_position select 1) +15,-0.015],[], 0, "CAN_COLLIDE"];
_baserunover12 = createVehicle ["Barrels",[(_position select 0) +18, (_position select 1) -2,-0.015],[], 0, "CAN_COLLIDE"];
_baserunover13 = createVehicle ["Barrel1",[(_position select 0) -16, (_position select 1) -2,-0.015],[], 0, "CAN_COLLIDE"];
_baserunover14 = createVehicle ["Barrel1",[(_position select 0) +3, (_position select 1) +6,-0.015],[], 0, "CAN_COLLIDE"];
_baserunover15 = createVehicle ["Barrel1",[(_position select 0) -11.6, (_position select 1) +18,-0.015],[], 0, "CAN_COLLIDE"];
// Adding buildings to one variable just for tidiness
_baserunover = [_baserunover0,_baserunover1,_baserunover2,_baserunover3,_baserunover4,_baserunover5,_baserunover6,_baserunover7,_baserunover8,_baserunover9,_baserunover10,_baserunover11,_baserunover12,_baserunover13,_baserunover14,_baserunover15];
// Set some directions for our buildings
_directions = [0,0,0,0,0,0,0,-176.24,122.11,-0.11,82.81,-0.5,-48,0,0,0];
{ _x setDir (_directions select _forEachIndex) } forEach _baserunover;
// Make buildings flat on terrain surface
{ _x setVectorUp surfaceNormal position _x; } count _baserunover;
//Troops
_rndnum = round (random 5);
[[(_position select 0) - 25, (_position select 1) - 21, 0],5,"Medium",["Random","AT"],4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
[[(_position select 0) + 32, (_position select 1) + 2, 0],5,"Medium","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
[[(_position select 0) + 9, (_position select 1) +40, 0],4,"Medium","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
[[(_position select 0) -41, (_position select 1) +6, 0],_rndnum,"Medium","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
//Static Guns
[[[(_position select 0) +6.2, (_position select 1) -28, 0]],"KORD_high_TK_EP1","Easy",_aiType,_aiType,0,2,"Random","Random",_mission] call spawn_static;
[[[(_position select 0) -26, (_position select 1) +47, 0]],"KORD_high_TK_EP1","Easy",_aiType,_aiType,0,2,"Random","Random",_mission] call spawn_static;
// Array of mission variables to send
[
_mission, // Mission number
_position, // Position of mission
"Medium", // Difficulty
"Oil Depot", // Name of Mission
_missionType, // Mission Type: MainHero or MainBandit
true, // show mission marker?
true, // make minefields available for this mission
_crate, // crate object info
["crate"], // Completion type: ["crate"], ["kill"], or ["assassinate", _unitGroup],
[_baserunover], // cleanup objects
"STR_CL_HERO_OIL_ANNOUNCE", // mission announcement
"STR_CL_HERO_OIL_WIN", // mission success
"STR_CL_HERO_OIL_FAIL", // mission fail
[10,5,20,3,2] // Dynamic crate array
] call mission_winorfail;

View File

@ -0,0 +1,51 @@
private ["_rndnum","_mission","_position","_aiType","_messages","_missionType","_loot"];
_mission = count wai_mission_data -1;
_missionType = _this select 0; // Type of mission: "MainHero" or "MainBandit"
_aiType = _this select 1; // Type of AI - opposite of mission type
_position = [30] call find_position;
diag_log format["WAI: [Mission:[%2] Hero Outpost]: Starting... %1",_position,_missionType];
_loot = if (_missionType == "MainHero") then {Loot_Outpost select 0;} else {Loot_Outpost select 1;};
//Spawn Crates
[[
[_loot,crates_large,[0,0]]
],_position,_mission] call wai_spawnCrate;
// Spawn Objects
[[
["MAP_76n6_ClamShell",[-6,25],172],
["MAP_budova4_in",[-29,18],0.24],
["MAP_budova4_in",[-29,8],0.24],
["MAP_Mil_Barracks_L",[-23,-13],-119],
["MAP_CamoNetB_NATO",[1.6,0],-203],
["MAP_fort_watchtower",[19,11],-185],
["MAP_fort_watchtower",[4,-20],-103]
],_position,_mission] call wai_spawnObjects;
//Troops
[[(_position select 0) + 2,_position select 1,0],5,"Easy",["Random","AT"],4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 3);
[[(_position select 0) - 2,_position select 1,0],_rndnum,"Easy","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 3);
[[(_position select 0),(_position select 1) + 15,0],_rndnum,"Easy","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_messages = if (_missionType == "MainHero") then {
["STR_CL_HERO_BANDITOUTPOST_ANNOUNCE","STR_CL_HERO_BANDITOUTPOST_WIN","STR_CL_HERO_BANDITOUTPOST_FAIL"];
} else {
["STR_CL_BANDIT_HEROOUTPOST_ANNOUNCE","STR_CL_BANDIT_HEROOUTPOST_WIN","STR_CL_BANDIT_HEROOUTPOST_FAIL"];
};
[
_mission, // Mission number
_position, // Position of mission
"Easy", // Difficulty
"Outpost", // Name of Mission
_missionType, // Mission Type: MainHero or MainBandit
true, // show mission marker?
true, // make minefields available for this mission
["kill"], // Completion type: ["crate"], ["kill"], or ["assassinate", _unitGroup],
_messages
] call mission_winorfail;

View File

@ -0,0 +1,60 @@
private ["_mission","_vehname","_vehicle","_position","_vehclass","_name","_locations","_location","_blacklist","_messages","_missionType","_loot"];
_mission = count wai_mission_data -1;
_missionType = _this select 0; // Type of mission: "MainHero" or "MainBandit"
_aiType = _this select 1; // Type of AI - opposite of mission type
_loot = if (_missionType == "MainHero") then {Loot_Patrol select 0;} else {Loot_Patrol select 1;};
//Armed Land Vehicle
_vehclass = armed_vehicle call BIS_fnc_selectRandom;
_vehname = getText (configFile >> "CfgVehicles" >> _vehclass >> "displayName");
_locations = nearestLocations [getMarkerPos "center", ["NameCityCapital","NameCity","NameVillage"],15000];
_location = _locations call BIS_fnc_selectRandom;
_position = position _location;
_name = text _location;
_blacklist = ["Stary Sobor"];
{
if ((text _x) == (text _location) || (text _x) in _blacklist) then {
_locations set [_forEachIndex, "rem"];
_locations = _locations - ["rem"];
};
} forEach _locations;
diag_log format["WAI: [Mission:[%2] Patrol]: Starting... %1",_position,_missionType];
//Spawn units
[[(_position select 0) + 4,(_position select 1),0.1],3,"Hard","Random",3,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
//Spawn vehicles
_vehicle = [_vehclass,_position,_mission] call custom_publish;
// load the guns
[_vehicle,_vehclass] call load_ammo;
((wai_mission_data select _mission) select 3) set [count ((wai_mission_data select _mission) select 3), [_vehicle,_loot]];
if(wai_debug_mode) then {
diag_log format["WAI: [%2] patrol spawned a %1",_vehname,_missionType];
};
_messages = if (_missionType == "MainHero") then {
[["STR_CL_HERO_PATROL_ANNOUNCE",_name],"STR_CL_HERO_PATROL_WIN","STR_CL_HERO_PATROL_FAIL"];
} else {
[["STR_CL_BANDIT_PATROL_ANNOUNCE",_name],"STR_CL_BANDIT_PATROL_WIN","STR_CL_BANDIT_PATROL_FAIL"];
};
[
_mission,
_position, // Position of mission
"Medium", // Difficulty
format["Patrol %1",_vehname], // Name of Mission
_missionType, // Mission Type: MainHero or MainBandit
true, // show mission marker?
3, // Number of wayPoints
_locations, // WayPoints
["kill"], // Completion type: ["crate"], ["kill"], or ["assassinate", _unitGroup],
_messages
] call patrol_winorfail;

View File

@ -0,0 +1,74 @@
private ["_rndnum","_president_himself","_mission","_position","_president","_firstlady","_aiType","_missionType","_loot"];
_mission = count wai_mission_data -1;
_missionType = _this select 0; // Type of mission: "MainHero" or "MainBandit"
_aiType = _this select 1; // Type of AI - opposite of mission type
_position = [50] call find_position;
diag_log format["WAI: [Mission:[%2] Presidents in Town]: Starting... %1",_position,_missionType];
_loot = if (_missionType == "MainHero") then {Loot_Presidents select 0;} else {Loot_Presidents select 1;};
//Spawn Crates
[[
[_loot,crates_large,[0,0,.25]]
],_position,_mission] call wai_spawnCrate;
// Spawn Objects
[[
["Land_A_Office01",[0,0]]
],_position,_mission] call wai_spawnObjects;
//Troops
[_position,5,"Extreme",["Random","AT"],4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
[_position,5,"Extreme","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
[_position,5,"Extreme","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
[_position,5,"Extreme","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 5);
[_position,_rndnum,"Extreme","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 5);
[_position,_rndnum,"Extreme","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
//The President Himself
_president = [[((_position select 0) + 5), _position select 1, 4.1],1,"Extreme","Random",4,"none","Special","Random",[_aiType,500],_mission] call spawn_group;
_firstlady = [[((_position select 0) + 5), _position select 1, 4.1],1,"Extreme","Unarmed",4,"none","Secretary1","Random",[_aiType,0],_mission] call spawn_group;
_president_himself = (units _president) select 0;
_president_himself disableAI "MOVE";
//Let him move once player is near
_president_himself spawn {
private ["_president","_player_near"];
_president = _this;
_player_near = false;
while {!_player_near} do {
_player_near = [(position _president),50] call isNearPlayer;
uiSleep 1;
};
_president enableAI "MOVE";
};
//Humvee Patrol
[[(_position select 0) + 100, _position select 1, 0],[(_position select 0) + 100, _position select 1, 0],50,2,"HMMWV_Armored","Random",_aiType,_aiType,_mission] call vehicle_patrol;
//Heli Paradrop
[_position,400,"UH60M_EP1_DZE","East",[3000,4000],150,1.0,200,10,"Random","Random",4,"Random",_aiType,"Random",_aiType,false,_mission] spawn heli_para;
//Static guns
[[
[(_position select 0) - 13.135, (_position select 1) + 5.025, 5.27],
[(_position select 0) + 14.225, (_position select 1) + 5.025, 5.27],
[(_position select 0) + 1.97, (_position select 1) - 2.368, 10.54]
],"M2StaticMG","Extreme",_aiType,_aiType,1,2,"Random","Random",_mission] call spawn_static;
[
_mission, // Mission number
_position, // Position of mission
"Extreme", // Difficulty
"President's in Town", // Name of Mission
_missionType, // Mission Type: MainHero or MainBandit
true, // show mission marker?
true, // make minefields available for this mission
["assassinate",_president], // Completion type: ["crate"], ["kill"], or ["assassinate", _unitGroup],
["STR_CL_PRESIDENT_ANNOUNCE","STR_CL_PRESIDENT_WIN","STR_CL_PRESIDENT_FAIL"]
] call mission_winorfail;

View File

@ -0,0 +1,61 @@
private ["_mission","_position","_rndnum","_aiType","_messages","_missionType","_loot"];
_mission = count wai_mission_data -1;
_missionType = _this select 0; // Type of mission: "MainHero" or "MainBandit"
_aiType = _this select 1; // Type of AI - opposite of mission type
_position = [80] call find_position;
diag_log format["WAI: Mission:[%2] Radio Tower started at %1",_position,_missionType];
_loot = if (_missionType == "MainHero") then {Loot_Radioshack select 0;} else {Loot_Radioshack select 1;};
//Spawn Crates
[[
[_loot,"UNBasicWeapons_EP1",[.01,.01]]
],_position,_mission] call wai_spawnCrate;
// Spawn Objects
[[
["Land_cihlovej_dum_in",[-3,-1]],
["Land_Com_tower_ep1",[5,-2]],
["LADAWreck",[-7.5,-3]],
["FoldTable",[-1.2,-4]],
["FoldChair",[-1,-3]],
["SmallTV",[-1.7,-4,0.82]],
["SatPhone",[-0.8,-4,0.82],-201.34],
["MAP_t_picea2s",[-4.5,7]],
["MAP_t_picea2s",[13,10]],
["MAP_t_pinusN2s",[3,9]],
["MAP_t_pinusN1s",[8,17]],
["MAP_t_picea1s",[7,10]],
["MAP_t_picea2s",[34,-29]],
["MAP_t_fraxinus2s",[-14,1]],
["MAP_t_carpinus2s",[28,-13]]
],_position,_mission] call wai_spawnObjects;
// Troops
[[(_position select 0) - 1.2, (_position select 1) - 20, 0],5,"extreme",["random","at"],4,"random",_aiType,"random",[_aiType,150],_mission] call spawn_group;
[[(_position select 0) - 4, (_position select 1) + 16, 0],5,"hard","random",4,"random",_aiType,"random",_aiType,_mission] call spawn_group;
[[(_position select 0) - 17, (_position select 1) - 4, 0],5,"random","random",4,"random",_aiType,"random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 5);
[[(_position select 0) + 14, (_position select 1) - 3, 0],_rndnum,"random","random",4,"random",_aiType,"random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 5);
[[(_position select 0) + 14, (_position select 1) - 3, 0],_rndnum,"random","random",4,"random",_aiType,"random",_aiType,_mission] call spawn_group;
_messages = if (_missionType == "MainHero") then {
["STR_CL_HERO_RADIO_ANNOUNCE","STR_CL_HERO_RADIO_WIN","STR_CL_HERO_RADIO_FAIL"];
} else {
["STR_CL_BANDIT_RADIOTOWER_ANNOUNCE","STR_CL_BANDIT_RADIOTOWER_WIN","STR_CL_BANDIT_RADIOTOWER_FAIL"];
};
[
_mission, // Mission number
_position, // Position of mission
"Hard", // Difficulty
"Radio Tower", // Name of Mission
_missionType, // Mission Type: MainHero or MainBandit
true, // show mission marker?
true, // make minefields available for this mission
["crate"], // Completion type: ["crate"], ["kill"], or ["assassinate", _unitGroup],
_messages
] call mission_winorfail;

View File

@ -0,0 +1,64 @@
private ["_crate_type","_mission","_position","_crate","_rndnum","_baserunover","_baserunover0","_baserunover1","_baserunover2","_baserunover3","_baserunover4","_baserunover5","_baserunover6","_baserunover7","_baserunover8","_baserunover9","_baserunover10"];
// Get mission number, important we do this early
_mission = count wai_mission_data -1;
_missionType = _this select 0; // Type of mission: "MainHero" or "MainBandit"
_aiType = _this select 1; // Type of AI - opposite of mission type
_position = [80] call find_position;
diag_log format["WAI: [Mission:[Hero] Refugee Camp]: Starting... %1",_position];
//Setup the crate
_crate_type = crates_large call BIS_fnc_selectrandom; // Choose between crates_large, crates_medium and crates_small
_crate = createVehicle [_crate_type,[(_position select 0) - 0.01, (_position select 1) - 0.01,-0.15],[],0,"CAN_COLLIDE"];
_crate call wai_crate_setup;
//Buildings
_baserunover0 = createVehicle ["MAP_Astan",[(_position select 0) - 3, (_position select 1) -5.4,-0.15],[], 0, "CAN_COLLIDE"];
_baserunover1 = createVehicle ["MAP_A_tent",[(_position select 0) + 3.8, (_position select 1) -1,-0.15],[], 0, "CAN_COLLIDE"];
_baserunover2 = createVehicle ["Land_Campfire_burning",[(_position select 0) - 2, (_position select 1) -1,-0.15],[], 0, "CAN_COLLIDE"];
_baserunover3 = createVehicle ["Fuel_can",[(_position select 0) +0.1, (_position select 1) +3,-0.15],[], 0, "CAN_COLLIDE"];
_baserunover4 = createVehicle ["Land_Blankets_EP1",[(_position select 0) - 4, (_position select 1) +0.4,-0.15],[], 0, "CAN_COLLIDE"];
_baserunover5 = createVehicle ["Park_bench1",[(_position select 0) - 1, (_position select 1) +4,-0.15],[], 0, "CAN_COLLIDE"];
_baserunover6 = createVehicle ["MAP_Astan",[(_position select 0) - 4, (_position select 1) +10,-0.015],[], 0, "CAN_COLLIDE"];
_baserunover7 = createVehicle ["Land_Bag_EP1",[(_position select 0) +1, (_position select 1) +7,-0.015],[], 0, "CAN_COLLIDE"];
_baserunover8 = createVehicle ["Land_A_tent",[(_position select 0) - 10, (_position select 1) -6,-0.015],[], 0, "CAN_COLLIDE"];
_baserunover9 = createVehicle ["LADAWreck",[(_position select 0) - 11, (_position select 1) +2,-0.015],[], 0, "CAN_COLLIDE"];
_baserunover10 = createVehicle ["Land_transport_cart_EP1",[(_position select 0) - 9, (_position select 1) +7,-0.015],[], 0, "CAN_COLLIDE"];
// Adding buildings to one variable just for tidiness
_baserunover = [_baserunover0,_baserunover1,_baserunover2,_baserunover3,_baserunover4,_baserunover5,_baserunover6,_baserunover7,_baserunover8,_baserunover9,_baserunover10];
// Set some directions for our buildings
_directions = [0,64,0,0,0,0,128,0,-166.5,16.4,23];
{ _x setDir (_directions select _forEachIndex) } forEach _baserunover;
// Make buildings flat on terrain surface
{ _x setVectorUp surfaceNormal position _x; } count _baserunover;
//Troops
_rndnum = round (random 5);
[[(_position select 0) - 13, (_position select 1) - 7,0],5,"Easy",["Random","AT"],3,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
[[(_position select 0) + 7, (_position select 1) + 15,0],5,"Easy","Random",3,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
[[(_position select 0) + 4, (_position select 1)- 14,0],_rndnum,"Easy","Random",3,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
// Array of mission variables to send
[
_mission, // Mission number
_position, // Position of mission
"Medium", // Difficulty
"Refugee Camp", // Name of Mission
_missionType, // Mission Type: MainHero or MainBandit
true, // show mission marker?
true, // make minefields available for this mission
_crate, // crate object info
["crate"], // Completion type: ["crate"], ["kill"], or ["assassinate", _unitGroup],
[], // cleanup objects
"STR_CL_HERO_REFUGEE_ANNOUNCE", // mission announcement
"STR_CL_HERO_REFUGEE_WIN", // mission success
"STR_CL_HERO_REFUGEE_FAIL", // mission fail
[10,4,0,3,2] // Dynamic crate array
] call mission_winorfail;

View File

@ -0,0 +1,43 @@
private ["_mission","_position","_rndnum","_aiType","_messages","_missionType","_loot"];
_mission = count wai_mission_data -1;
_missionType = _this select 0; // Type of mission: "MainHero" or "MainBandit"
_aiType = _this select 1; // Type of AI - opposite of mission type
_position = [30] call find_position;
diag_log format["WAI: [Mission:[%2] Scout Patrol]: Starting... %1",_position,_missionType];
_loot = if (_missionType == "MainHero") then {Loot_ScoutPatrol select 0;} else {Loot_ScoutPatrol select 1;};
// Spawn crates
[[
[_loot,crates_medium,[0,0]]
],_position,_mission] call wai_spawnCrate;
//Troops
[_position,5,"Easy",["Random","AT"],4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 3);
[_position,_rndnum,"Easy","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 3);
[_position,_rndnum,"Easy","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
//Spawn vehicle
[civil_vehicles,_position,_mission] call custom_publish;
_messages = if (_missionType == "MainHero") then {
["STR_CL_HERO_BANDITPATROL_ANNOUNCE","STR_CL_HERO_BANDITPATROL_WIN","STR_CL_HERO_BANDITPATROL_FAIL"];
} else {
["STR_CL_BANDIT_HEROPATROL_ANNOUNCE","STR_CL_BANDIT_HEROPATROL_WIN","STR_CL_BANDIT_HEROPATROL_FAIL"];
};
[
_mission, // Mission number
_position, // Position of mission
"Easy", // Difficulty
"Scout Patrol", // Name of Mission
_missionType, // Mission Type: MainHero or MainBandit
true, // show mission marker?
true, // make minefields available for this mission
["kill"], // Completion type: ["crate"], ["kill"], or ["assassinate", _unitGroup],
_messages
] call mission_winorfail;

View File

@ -0,0 +1,51 @@
private ["_rndnum","_mission","_position","_aiType","_missionType","_loot"];
_mission = count wai_mission_data -1;
_missionType = _this select 0; // Type of mission: "MainHero" or "MainBandit"
_aiType = _this select 1; // Type of AI - opposite of mission type
_position = [30] call find_position;
diag_log format["WAI: [Mission:[%2] Slaughter House]: Starting... %1",_position,_missionType];
_loot = if (_missionType == "MainHero") then {Loot_SlaughterHouse select 0;} else {Loot_SlaughterHouse select 1;};
//Spawn Crates
[[
[_loot,crates_medium,[2.5,0,.1]]
],_position,_mission] call wai_spawnCrate;
// Spawn Objects
[[
["Land_aif_tovarna1",[-0.01,-0.01,-0.02]],
["Land_stand_meat_EP1",[-4,2,-0.02],0.3693],
["Land_stand_meat_EP1",[-2,2,-0.02],0.3693],
["Land_stand_meat_EP1",[0.001,2,-0.02],0.3693],
["Land_stand_meat_EP1",[-1,2,-0.02],0.3693],
["Land_stand_meat_EP1",[2,2,-0.02],0.3693],
["Land_stand_meat_EP1",[4,2,-0.02],0.3693],
["Mass_grave",[-3,20,-0.02]],
["Mass_grave",[4,18,-0.02]],
["Mass_grave",[0,-15,-0.02]],
["Axe_woodblock",[-4,-14,-0.02],-25],
["Land_Table_EP1",[2,-2,-0.02]],
["MAP_icebox",[-2,-0.01,-0.02]]
],_position,_mission] call wai_spawnObjects;
//Troops
[[(_position select 0) + 9, (_position select 1) - 13, 0],5,"Easy",["Random","AT"],4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 3);
[[(_position select 0) + 13, (_position select 1) + 15, 0],_rndnum,"Easy","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 3);
[[(_position select 0) + 13, (_position select 1) + 15, 0],_rndnum,"Easy","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
[
_mission, // Mission number
_position, // Position of mission
"Easy", // Difficulty
"Slaughter House", // Name of Mission
_missionType, // Mission Type: MainHero or MainBandit
true, // show mission marker?
true, // make minefields available for this mission
["crate"], // Completion type: ["crate"], ["kill"], or ["assassinate", _unitGroup],
["STR_CL_GENERAL_SLAUGHTERHOUSE_ANNOUNCE","STR_CL_GENERAL_SLAUGHTERHOUSE_WIN","STR_CL_GENERAL_SLAUGHTERHOUSE_FAIL"]
] call mission_winorfail;

View File

@ -0,0 +1,62 @@
private ["_rndnum","_mission","_vehname","_vehicle","_position","_vehclass","_aiType","_messages","_missionType","_loot"];
_mission = count wai_mission_data -1;
_missionType = _this select 0; // Type of mission: "MainHero" or "MainBandit"
_aiType = _this select 1; // Type of AI - opposite of mission type
_position = [30] call find_position;
//Military Chopper
_vehclass = armed_chopper call BIS_fnc_selectRandom;
_vehname = getText (configFile >> "CfgVehicles" >> _vehclass >> "displayName");
diag_log format["WAI: [Mission:[%2] Sniper Extraction]: Starting... %1",_position,_missionType];
_loot = if (_missionType == "MainHero") then {Loot_Extraction select 0;} else {Loot_Extraction select 1;};
//Spawn Crates
[[
[_loot,crates_medium,[0,10]]
],_position,_mission] call wai_spawnCrate;
//Troops
[_position,5,"Hard",["Random","AT"],4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
[_position,5,"Hard","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
[_position,5,"Hard","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 5);
[_position,_rndnum,"Hard","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 5);
[_position,_rndnum,"Hard","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
//Static Guns
[[
[(_position select 0) + 30, (_position select 1) - 30, 0],
[(_position select 0) + 30, (_position select 1) + 30, 0],
[(_position select 0) - 30, (_position select 1) - 30, 0],
[(_position select 0) - 30, (_position select 1) + 30, 0]
],"M2StaticMG","Hard",_aiType,_aiType,0,2,"Random","Random",_mission] call spawn_static;
//Spawn vehicle
[_vehclass,_position,_mission] call custom_publish;
if(wai_debug_mode) then {
diag_log format["WAI: [%2] sniper_extraction spawned a %1",_vehname,_missionType];
};
_messages = if (_missionType == "MainHero") then {
["STR_CL_HERO_MILCHOPPER_ANNOUNCE","STR_CL_HERO_MILCHOPPER_WIN","STR_CL_HERO_MILCHOPPER_FAIL"];
} else {
["STR_CL_BANDIT_EXTRACTION_ANNOUNCE","STR_CL_BANDIT_EXTRACTION_WIN","STR_CL_BANDIT_EXTRACTION_FAIL"];
};
// Array of mission variables to send
[
_mission, // Mission number
_position, // Position of mission
"Hard", // Difficulty
format["Sniper Extraction %1", _vehname], // Name of Mission
_missionType, // Mission Type: MainHero or MainBandit
true, // show mission marker?
true, // make minefields available for this mission
["crate"], // Completion type: ["crate"], ["kill"], or ["assassinate", _unitGroup],
_messages
] call mission_winorfail;

View File

@ -0,0 +1,67 @@
private ["_rndnum","_mission","_position","_aiType","_messages","_missionType","_loot"];
_mission = count wai_mission_data -1;
_missionType = _this select 0; // Type of mission: "MainHero" or "MainBandit"
_aiType = _this select 1; // Type of AI - opposite of mission type
_position = [30] call find_position;
diag_log format["WAI: [Mission:[%2] Tank Column]: Starting... %1",_position,_missionType];
_loot = if (_missionType == "MainHero") then {Loot_TankColumn select 0;} else {Loot_TankColumn select 1;};
//Spawn Crates
[[
[_loot,crates_small,[.02,0]]
],_position,_mission] call wai_spawnCrate;
// Spawn Objects
[[
["MAP_T34",[2.2,-12],91.28],
["MAP_T34",[12.2,-12],92.01],
["MAP_T34",[21,-13],108.4],
["MAP_T34",[29,-16],112.3],
["GUE_WarfareBVehicleServicePoint",[10,-19]],
["MAP_Hlidac_budka",[10,-7]],
["Land_tent_east",[-0.3,0.3],90],
["MAP_t_picea2s",[-3,12]],
["MAP_t_pinusN1s",[-12,3]],
["MAP_t_pinusN2s",[-10,13,-0.02]],
["MAP_t_acer2s",[9,2]],
["Land_Fire_barrel_burning",[-9,-1]]
],_position,_mission] call wai_spawnObjects;
//Troops
[[(_position select 0) - 7, (_position select 1) - 10, 0],5,"Hard",["Random","AT"],4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
[[(_position select 0) + 16, (_position select 1) - 5, 0],5,"Hard","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
[[(_position select 0) + 4, (_position select 1) + 18, 0],5,"Hard","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 5);
[[(_position select 0) + 4, (_position select 1) + 18, 0],_rndnum,"Hard","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 5);
[[(_position select 0) + 4, (_position select 1) + 18, 0],_rndnum,"Hard","Random",4,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
//Humvee Patrol
[[(_position select 0) + 22, (_position select 1) + 32, 0],[(_position select 0) + 15, (_position select 1) - 33, 0],50,2,"HMMWV_Armored","Hard",_aiType,_aiType,_mission] call vehicle_patrol;
//Static Guns
[[
[(_position select 0) + 8, (_position select 1) - 29, 0],
[(_position select 0) + 12, (_position select 1) + 24, 0]
],"M2StaticMG","Hard",_aiType,_aiType,0,2,"Random","Random",_mission] call spawn_static;
_messages = if (_missionType == "MainHero") then {
["STR_CL_HERO_TANK_ANNOUNCE","STR_CL_HERO_TANK_WIN","STR_CL_HERO_TANK_FAIL"];
} else {
["STR_CL_BANDIT_TANK_ANNOUNCE","STR_CL_BANDIT_TANK_WIN","STR_CL_BANDIT_TANK_FAIL"];
};
[
_mission, // Mission number
_position, // Position of mission
"Hard", // Difficulty
"Tank Column", // Name of Mission
_missionType, // Mission Type: MainHero or MainBandit
true, // show mission marker?
true, // make minefields available for this mission
["crate"], // Completion type: ["crate"], ["kill"], or ["assassinate", _unitGroup],
_messages
] call mission_winorfail;

View File

@ -0,0 +1,48 @@
private ["_missionType","_messages","_aiType","_mission","_rndnum","_vehname","_position","_vehclass","_plane","_startArray","_startPos","_dropzone","_aigroup","_pilot","_wp","_complete","_timeout","_vehDropped","_vehicle","_parachute","_missionType","_color"];
_mission = count wai_mission_data -1;
_missionType = _this select 0; // Type of mission: "MainHero" or "MainBandit"
_aiType = _this select 1; // Type of AI - opposite of mission type
_position = [30] call find_position;
//Armed Land Vehicle
_vehclass = armed_vehicle call BIS_fnc_selectRandom;
_vehname = getText (configFile >> "CfgVehicles" >> _vehclass >> "displayName");
// Plane
_airClass = ["C130J_US_EP1_DZ","MV22_DZ"] call BIS_fnc_selectRandom;
_airName = getText (configFile >> "CfgVehicles" >> _airClass >> "displayName");
diag_log format["WAI: [Mission:[%3] %1 Vehicle Drop]: Starting... %2",_airName,_position,_missionType];
//Troops
[_position,5,"Medium",["Random","AT"],3,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
[_position,5,"Medium","Random",3,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 4);
[_position,_rndnum,"Medium","Random",3,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 4);
[_position,_rndnum,"Medium","Random",3,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
if(wai_debug_mode) then {
diag_log format["WAI: [%3] %1 Vehicle Drop spawned a %2",_airName,_vehname,_missionType];
};
_messages = if (_missionType == "MainHero") then {
[["STR_CL_HERO_AIRDROP_ANNOUNCE",_airName,_vehname],["STR_CL_HERO_AIRDROP_CRASH",_airName],["STR_CL_HERO_AIRDROP_DROP",_vehname],["STR_CL_HERO_AIRDROP_WIN",_vehname],["STR_CL_HERO_AIRDROP_FAIL",_vehname]];
} else {
[["STR_CL_BANDIT_AIRDROP_ANNOUNCE",_airName,_vehname],["STR_CL_BANDIT_AIRDROP_CRASH",_airName],["STR_CL_BANDIT_AIRDROP_DROP",_vehname],["STR_CL_BANDIT_AIRDROP_WIN",_vehname],["STR_CL_BANDIT_AIRDROP_FAIL",_vehname]];
};
[
_mission, // Mission number
_position, // Position of mission
"Medium", // Difficulty
format["%1 Air Drop",_airName], // Name of Mission
_missionType, // Mission Type: MainHero or MainBandit
true, // show mission marker?
true, // make minefields available for this mission
["crate"], // Completion type: ["crate"], ["kill"], or ["assassinate", _unitGroup],
_airClass, // Class of plane to deliver the vehicle
_vehclass, // Class of vehicle to air drop
_messages
] call wai_air_drop;

View File

@ -0,0 +1,58 @@
private ["_mission","_position","_rndnum","_aiType","_messages","_missionType","_loot"];
_mission = count wai_mission_data -1;
_missionType = _this select 0; // Type of mission: "MainHero" or "MainBandit"
_aiType = _this select 1; // Type of AI - opposite of mission type
_position = [30] call find_position;
diag_log format["WAI: [Mission:[%2] Weapons Cache]: Starting... %1",_position,_missionType];
_loot = if (_missionType == "MainHero") then {Loot_WeaponCache select 0;} else {Loot_WeaponCache select 1;};
// Spawn crates
[[
[_loot,crates_large,[0,0]]
],_position,_mission] call wai_spawnCrate;
// Spawn Objects
[[
["Land_fortified_nest_big_EP1",[-14,23.5],-210],
["Land_fortified_nest_big_EP1",[12,-24,-0.01],-390],
["Land_HBarrier_large",[-18,1,-0.3],90],
["Land_HBarrier_large",[-8,-16,-0.3],30],
["Land_HBarrier_large",[18,-1.5,-0.3],90],
["Land_HBarrier_large",[7,16,-0.3],30],
["DesertLargeCamoNet_DZ",[-1,0],-26]
],_position,_mission] call wai_spawnObjects;
//Troops
[[(_position select 0) + 6.5,(_position select 1) - 12,0],5,"Easy",["Random","AT"],3,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
[[(_position select 0) - 8,(_position select 1) + 14,0],5,"Easy","Random",3,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 4);
[[(_position select 0) - 21,(_position select 1) - 12.5,0],_rndnum,"Easy","Random",3,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
_rndnum = ceil (random 4);
[[(_position select 0) - 21,(_position select 1) - 12.5,0],_rndnum,"Easy","Random",3,"Random",_aiType,"Random",_aiType,_mission] call spawn_group;
//Static Guns
[[
[(_position select 0) + 18, (_position select 1) - 13, 0],
[(_position select 0) - 19.5, (_position select 1) + 12, 0]
],"M2StaticMG","Easy",_aiType,_aiType,0,2,"Random","Random",_mission] call spawn_static;
_messages = if (_missionType == "MainHero") then {
["STR_CL_HERO_WEAPONCACHE_ANNOUNCE","STR_CL_HERO_WEAPONCACHE_WIN","STR_CL_HERO_WEAPONCACHE_FAIL"];
} else {
["STR_CL_BANDIT_WEAPONCACHE_ANNOUNCE","STR_CL_BANDIT_WEAPONCACHE_WIN","STR_CL_BANDIT_WEAPONCACHE_FAIL"];
};
[
_mission, // Mission number
_position, // Position of mission
"Medium", // Difficulty
"Weapon Cache", // Name of Mission
_missionType, // Mission Type: MainHero or MainBandit
true, // show mission marker?
true, // make minefields available for this mission
["crate"], // Completion type: ["crate"], ["kill"], or ["assassinate", _unitGroup],
_messages
] call mission_winorfail;

View File

@ -0,0 +1,182 @@
local _mission = count WAI_MissionData -1;
local _aiType = _this select 0; // "Bandit" or "Hero"
local _name = "Wuhan Lab";
local _supportedMaps = ["chernarus","chernarus_winter"]; // The default positions listed below are for Chernarus. If you wish to use this mission on another map then you must gather your own list of flat terrain positions.
local _flatPositions = [[4277.94,9457.53],[4144.92,9439.12],[4229.24,9749.14],[3314.31,10614.7],[2152.91,10467.1],[1956.85,10338.3],[4138.71,12630.3],[3999.11,12659.3],[3733.19,14063.7],[3505.19,14168.2],[5191.49,13994.6],[5986.83,14403.1],[6282.33,14097.3],[6497.14,13582.8],[14255.6,14169.6],[13231.9,10718.3],[12080.6,9895.28],[10612.5,8441.86],[8737.68,9200.67],[7137.15,9483.91],[7406.85,3487.04],[7139.72,5321.27],[5227.21,2202.33],[4149.34,2772.77],[1143.01,2439.9],[1230.53,2526.4],[1157.66,4245.54],[1246.03,4612.52],[4436.68,8472.96],[4748.81,5867.21],[5852.48,11010.3]]; // Chernarus
local _position = [_flatPositions] call isValidSpot;
if (count _position < 1 || {!(toLower worldName in _supportedMaps)}) exitWith {
if (_aiType == "Hero") then {
WAI_HeroRunning = WAI_HeroRunning - 1; WAI_MissionData set [_mission, -1]; WAI_MarkerReady = true;
} else {
WAI_BanditRunning = WAI_BanditRunning - 1; WAI_MissionData set [_mission, -1]; WAI_MarkerReady = true;
};
};
local _startTime = diag_tickTime;
local _difficulty = "Extreme";
local _localized = ["STR_CL_MISSION_BANDIT", "STR_CL_MISSION_HERO"] select (_aiType == "Hero");
local _localName = "STR_CL_WUHAN_TITLE";
diag_log format["[WAI]: %1 %2 started at %3.",_aiType,_name,_position];
local _messages = ["STR_CL_WUHAN_ANNOUNCE","STR_CL_WUHAN_WIN","STR_CL_WUHAN_FAIL"];
////////////////////// Do not edit this section ///////////////////////////
local _markers = [1,1,1,1];
//[position,createMarker,setMarkerColor,setMarkerType,setMarkerShape,setMarkerBrush,setMarkerSize,setMarkerText,setMarkerAlpha]
_markers set [0, [_position, "WAI" + str(_mission), "ColorBlack", "", "ELLIPSE", "Solid", [300,300], [], 0]];
_markers set [1, [_position, "WAI" + str(_mission) + "dot", "ColorBlack", "mil_dot", "", "", [], [_localized,_localName], 0]];
if (WAI_AutoClaim) then {_markers set [2, [_position, "WAI" + str(_mission) + "auto", "ColorRed", "", "ELLIPSE", "Border", [WAI_AcAlertDistance,WAI_AcAlertDistance], [], 0]];};
DZE_ServerMarkerArray set [count DZE_ServerMarkerArray, _markers]; // Markers added to global array for JIP player requests.
_markerIndex = count DZE_ServerMarkerArray - 1;
PVDZ_ServerMarkerSend = ["start",_markers];
publicVariable "PVDZ_ServerMarkerSend";
WAI_MarkerReady = true;
// Add the mission's position to the global array so that other missions do not spawn near it.
DZE_MissionPositions set [count DZE_MissionPositions, _position];
local _posIndex = count DZE_MissionPositions - 1;
// Send announcement
[_difficulty,(_messages select 0)] call WAI_Message;
// Wait until a player is within range or timeout is reached.
local _timeout = false;
local _claimPlayer = objNull;
while {WAI_WaitForPlayer && !_timeout && {isNull _claimPlayer}} do {
_claimPlayer = [_position, WAI_TimeoutDist] call isClosestPlayer;
if (diag_tickTime - _startTime >= (WAI_Timeout * 60)) then {
_timeout = true;
};
uiSleep 1;
};
if (_timeout) exitWith {
[_mission, _aiType, _markerIndex, _posIndex] call WAI_AbortMission;
[_difficulty,(_messages select 2)] call WAI_Message;
diag_log format["WAI: %1 %2 aborted.",_aiType,_name,_position];
};
//////////////////////////////// End //////////////////////////////////////
// Random position for doctor and loot crate pair.
local _pos1 = [[0.791992,-2.81055,-6.12189],[1.79688,-1.57813,-6.12915]];
local _pos2 = [[-8.97363,10.8223,-6.01758],[-6.66406,13.3125,-6.1272]];
local _pos3 = [[2.0957,11.3994,-6.0177],[3.22754,13.25,-6.1203]];
local _pos4 = [[1.17383,7.71289,-6.12878],[-0.625,8.07324,-6.1272]];
local _pos5 = [[4.36523,4.60059,-6.01764],[3.87012,8.42773,-6.12732]];
local _pos6 = [[5.82227,13.2188,-6.12933],[5.83398,10.6621,-6.01636]];
local _pos7 = [[12.3428,13.1719,-6.1283],[12.2422,10.1768,-6.01428]];
local _pos8 = [[11.7949,6.40527,-6.11945],[8.39355,4.33887,-6.02197]];
local _random = [_pos1,_pos2,_pos3,_pos4,_pos5,_pos6,_pos7,_pos8] call BIS_fnc_selectRandom;
local _drPos = _random select 0;
local _cratePos = _random select 1;
// Spawn Objects
local _objects = [[
["Land_Fort_Watchtower",[-4.4077, -60.0694, 0],-120],
["Land_Fort_Watchtower",[56.2158, -25.0235, 0],-120],
["Land_MBG_Warehouse",[12.1426, -16.8252, 0],150],
["Land_fortified_nest_big",[0,0,-0.15467919],-30.100697],
["Land_MBG_Shoothouse_1",[13.271, -19.3584, 0.28743303],60],
["Land_MBG_Cinderwall_5",[4.0615, -33.7168, 0],60], // MBG_Cinderwall_5_InEditor
["Land_MBG_Cinderwall_5",[1.5293, -29.4073, 0],60],
["Land_MBG_Cinderwall_5",[-1.0054, -25.0909, 0],60],
["Land_MBG_Cinderwall_5",[-3.5005, -20.8243, 0],60],
["Land_MBG_Killhouse_3",[-22.3096, -0.5235, 0],-120],
["Land_MBG_Killhouse_4",[-13.5767, 30.7295, 0],150],
["Land_MBG_Killhouse_3",[15.9302, 20.9648, 0],-300],
["Land_MBG_Cinderwall_5_Corner",[3.478, 37.1357, 0],150], // MBG_Cinderwall_5_Corner_InEditor
["Land_MBG_Cinderwall_5_Gate",[-0.2002, 36.3154, 0],-30], // MBG_Cinderwall_5_Gate_InEditor
["Land_MBG_Cinderwall_5_Gate",[-26.4517, 21.4033, 0],-30],
["Land_MBG_Cinderwall_5_Corner",[-29.0083, 18.5996, 0],60],
["Land_MBG_Cinderwall_5",[-28.1431, 14.999, 0],60],
["Land_MBG_Cinderwall_5",[6.2939, 34.4404, 0],60],
["Land_MBG_Cinderwall_5",[-4.4482, 33.8613, 0],-30],
["Land_MBG_Cinderwall_5",[-22.2583, 23.8632, 0],-30],
["MAP_Misc_Cargo1B",[24.9292, 0.9345, 0],-30],
["MAP_Misc_Cargo1B",[34.9565, -15.6846, 0],-30],
["MAP_Misc_Cargo1B",[6.5254, -41.9004, 0],60],
["Land_fort_bagfence_round",[-37.1982, 23.5771, -0.14746886],-70],
["Land_fort_bagfence_round",[3.3857, 45.7832, -0.14746886],14],
["Land_fortified_nest_small",[-9.4155, -0.4756, -0.14746886],183],
["MetalFloor4x_DZ",[8.9087, -26.669, 3.24],-30],
["MetalFloor4x_DZ",[18.0439, -21.3194, 3.24],-30],
["MetalFloor4x_DZ",[4.6528, -19.3653, 3.24],-30],
["MetalFloor4x_DZ",[13.7612, -14.1309, 3.24],-30],
["MetalFloor4x_DZ",[21.3423, -19.4834, 3.24],-30],
["MetalFloor4x_DZ",[17.272, -12.2481, 3.24],-30],
["Base_WarfareBBarrier10xTall",[26.7978, 41.8203, 0],60],
["Base_WarfareBBarrier10xTall",[39.0347, 20.0703, 0],60],
["Base_WarfareBBarrier10xTall",[51.9346, -2.4209, 0],60],
["Base_WarfareBBarrier10xTall",[-50.4038, 0.7959, 0],60],
["Base_WarfareBBarrier10xTall",[-36.96, -21.9727, 0],60],
["Base_WarfareBBarrier10xTall",[-23.4951, -44.9912, 0],60],
["Base_WarfareBBarrier10xTall",[30.8892, -53.1153, 0],-30],
["Base_WarfareBBarrier10xTall",[-26.7476, 52.0547, 0],150]
],_position,_mission] call WAI_SpawnObjects;
//Spawn Crates
local _loot = if (_aiType == "Hero") then {Loot_Wuhan select 0;} else {Loot_Wuhan select 1;};
[[
[_loot,WAI_CrateSm,[0,0]]
],((_objects select 2) modelToWorld _cratePos),_mission] call WAI_SpawnCrate;
// The doctor
local _drGrp = [((_objects select 2) modelToWorld _drPos),1,"Easy","Random","","none","Gardener_DZ","Random",[_aiType,500],_mission] call WAI_SpawnGroup;
_drGrp setVariable ["DoNotFreeze", true];
local _doctor = leader _drGrp;
_doctor disableAI "MOVE";
// External Troops
[[(_position select 0) - 26.7149, (_position select 1) + 44.2705, 0],5,_difficulty,"Random","AA","Random",WAI_ScientistSkin,"Random",_aiType,_mission] call WAI_SpawnGroup;
[[(_position select 0) - 35.6089, (_position select 1) - 11.2735, 0],5,_difficulty,"Random","","Random",WAI_ScientistSkin,"Random",_aiType,_mission] call WAI_SpawnGroup;
[[(_position select 0) - 26.1333, (_position select 1) - 45.6035, 0],5,_difficulty,"Random","","Random",WAI_ScientistSkin,"Random",_aiType,_mission] call WAI_SpawnGroup;
//[[(_position select 0) + 34.8667, (_position select 1) + 7.6396, 0],5,_difficulty,"Random","","Random",WAI_ScientistSkin,"Random",_aiType,_mission] call WAI_SpawnGroup;
// Internal Troops - these use "SENTRY" waypoint type
//[[(_position select 0) - 14.0933, (_position select 1) + 8.5674, .25],5,_difficulty,"Random","AT","Random","RU_Doctor","Random",_aiType,_mission] call WAI_SpawnGroup;
[[(_position select 0) + 4.646, (_position select 1) + 18.4238, .25],5,_difficulty,"Random","","Random","RU_Doctor","Random",_aiType,_mission] call WAI_SpawnGroup;
[[(_position select 0) + 2.5156, (_position select 1) - 10.1075, .25],5,_difficulty,"Random","","Random","RU_Doctor","Random",_aiType,_mission] call WAI_SpawnGroup;
[[(_position select 0) + 28.0249, (_position select 1) - 12.8565, .25],5,_difficulty,"Random","","Random","RU_Doctor","Random",_aiType,_mission] call WAI_SpawnGroup;
//[[(_position select 0) + 14.7788, (_position select 1) - 20.7061, .25],5,_difficulty,"Random","","Random","RU_Doctor","Random",_aiType,_mission] call WAI_SpawnGroup;
// Vehicle Patrol
[[(_position select 0) + 100, _position select 1, 0],[(_position select 0) + 100, _position select 1, 0],50,2,"T810A_PKT_DES_ACR_DZ","Random",_aiType,_aiType,_mission] call WAI_VehPatrol;
//Static guns
[[
((_objects select 0) modelToWorld [-0.0166016,2.62402,0.558044]),
((_objects select 1) modelToWorld [-0.0166016,2.62402,0.558044]),
[(_position select 0) - 35.5835, (_position select 1) + 23.0283, 0],
[(_position select 0) + 2.835, (_position select 1) + 44.1552, 0],
((_objects select 2) modelToWorld [15.1514,-2.4043,-6.13165]),
[(_position select 0) - 10.0166, (_position select 1) + 0.2011, 0],
((_objects select 2) modelToWorld [19.4072,16.3848,-6.10211])
],"KORD_high",_difficulty,_aiType,_aiType,"Random","Random","Random",_mission] call WAI_SpawnStatic;
// Spawn Vehicles
local _vehicle = [WAI_APC,[(_position select 0) + 5.4551, (_position select 1) + 5.9316], _mission, true, -30] call WAI_PublishVeh;
[_vehicle,(typeOf _vehicle),2] call WAI_LoadAmmo;
uiSleep 1; // the warehouse needs to be fully spawned in to place the heli on the roof.
_vehicle = [WAI_ArmedHeli,[(_position select 0) + 2.1392, (_position select 1) - 21.5498, 11.75], _mission, true, -30] call WAI_PublishVeh;
[_vehicle,(typeOf _vehicle),2] call WAI_LoadAmmo;
[
_mission, // Mission number
_position, // Position of mission
_difficulty, // Difficulty
_name, // Name of Mission
_localName,
_aiType, // "Bandit" or "Hero"
_markerIndex,
_posIndex,
_claimPlayer,
true, // show mission marker?
false, // make minefields available for this mission
["assassinate",_doctor], // Completion type: ["crate"], ["kill"], or ["assassinate", _unitGroup],
_messages
] spawn WAI_MissionMonitor;