briefing.htmlNCA\modules\Alice\data\scripts\main.sqfN:0CA\modules\Animals\Data\fsms\Animals_main.fsmNڏCA\modules\Animals\Data\fsms\Animals_spawn.fsmNTCA\modules\Animals\Data\fsms\Delete_Group.fsmNBCA\modules\Functions\systems\fn_locations.sqfN,CA\modules\garbage_collector\data\fsms\garbagecollector.fsmNCA\modules\garbage_collector\data\scripts\process_queue.sqfNCA\modules\Silvie\data\scripts\main.sqfN4CA\modules_e\Alice2\data\actions\combat_hideOut.fsmN% CA\modules_e\Alice2\data\actions\safe_walk.fsmNDCA\modules_e\Alice2\data\fsms\alice2.fsmN&CA\modules_e\Alice2\data\fsms\alice2_town.fsmN]CA\modules_e\Alice2\data\fsms\alice2_traffic.fsmNC=CA\modules_e\Alice2\data\scripts\fn_civilianSet.sqfNgCA\modules_e\Alice2\data\scripts\main.sqfN3common\client\actions\functions.sqfN%common\client\actions\noScript.sqfNcommon\client\AI\functions.sqfN(common\client\briefing.sqfNE/common\client\defines.sqfNcommon\client\gear\functions.sqfNecommon\client\gear\loadouts.sqfN(common\client\images\i_clear.paaNcommon\client\images\i_reload.paaNcommon\client\injured\functions.sqfNcommon\client\mainLoop.sqfNcommon\client\markers\createMarkers.sqfNEcommon\client\markers\functions.sqfNcommon\client\misc\functions.sqfNecommon\client\misc\triggers.sqfNcommon\client\respawn\functions.sqfN common\client\support\functions.sqfN(common\client\UI\functions.sqfxN|common\client\UI\onKeyPress.sqf}N common\client\UI\onMouseMove.sqf}Ncommon\client\UI\setgrass.sqfNcommon\client\variables.sqfN4common\defines.sqfQNcommon\fsm\ServicePoint.bifsmNcommon\fsm\ServicePoint.fsmNocommon\functions.sqfNR.common\initclient-common.sqfNcommon\initserver-common.sqfNcommon\resources\constants.hppNcommon\resources\dialogs.hppN%common\resources\IEDdetect_dialog.hppN: common\resources\IEDdetect_screens.hppN$common\resources\IEDdetect_sounds.hppNcommon\resources\options.hppNcommon\resources\sounds.hppN8common\resources\titles.hppNcommon\resources\types.hppN=common\server\AI\functions.sqfNcommon\server\AI\initUPS.sqfNcommon\server\AI\UPS.sqfNfsm\bon_ai_movement.fsmNcsfsm\dynamicweather.fsmNfsm\markersystem.fsmN0fsm\skiptime.fsmNfsm\vehicle_lifecycle.fsmN2fsm\vehicledrivercheck.fsmNd@init.sqfNinitclient.sqfN?initserver.sqfNSLoadingScreen.extNmip\ALICE2_houseEffects.sqfN-mip\export-alice2.sqfNbmip\export-silvie.sqfNmip\init-alice2.sqfNWmip\init-animals.sqfNmip\init-functions.sqfNmmip\init-silvie.sqfN1mission.sqmNop4\15thlogo.paaNop4\check.sqfN op4\cleanup.sqfN$op4\crate.sqfNPop4\east.sqfNop4\hmvreskin.sqfNYop4\ied.sqfN& op4\iedtrack.sqfNop4\initai.sqfNa op4\jip.sqfN~op4\kick.sqfN|op4\mando.hNop4\mhq.sqfNXop4\ratingcheck.sqfNrop4\rtb.sqfNop4\slx.hNLop4\stayput.sqfNop4\strikor.paaNop4\tkalert.sqfNop4\tkcheck.sqfNop4\tkreport.sqfNop4\vreload.sqfN!op4\vrespawn.sqfNpics\15th.JPGNpics\15thintro.paaNpics\camp.paaN 0 pics\navjack.paaN!pics\readme.txtNpics\Thumbs.dbNpics\usmcflag.paaN(scripts\airport_edgelight.sqfNscripts\ammo_ace.sqfN!scripts\ammo_arma2.sqfNscripts\ammo_baf.sqfN scripts\ammo_pmc.sqfNRscripts\ammobox_load.sqfN6scripts\ammobox_unload.sqfNscripts\ammocrate_filler.sqfNascripts\GuardPost.sqfNkscripts\heli_action.sqfNscripts\heli_lift.sqfN5 scripts\heli_release.sqfNscripts\ofpec_lightbulbs.sqfNU scripts\rearm.sqfNscripts\REP_help.sqfN8scripts\runwaylights.sqfNiscripts\truckzactions.sqfhNscripts\truckzloadout.sqfxNscripts\vehicle.sqfNsupport\scripts\resupply.fsmNysupport\scripts\resupply.sqfN!support\scripts\vehicle.sqfNHx_reload.sqfNu scriptName "Alice\data\scripts\main.sqf"; /* File: main.sqf Author: Karel Moricky Description: Init script - Ambient Life In Civilian Environment Parameter(s): _this: Alice logic unit which triggered this script. */ private ["_logicFnc","_twnlist","_locationParams","_create","_twnlistTemp","_i","_rarity","_faction","_classlist","_scope","_class","_vehicleclass","_actual","_condition","_fsm","_locked","_canrepeat","_initVariables","_init","_allActions","_action","_tempArrayx","_civilianActions","_source","_allActionsx","_allTopics","_endSentences","_tempArray","_element","_type","_topic","_path","_category","_screams","_scream","_categoryId","_oldScreams","_allScreams","_Remarks","_oldRemarks","_allRemarks","_civilianConversations","_civilianScreams","_civilianRemarks","_factionCiv","_name","_logic","_BIS_Alice_path","_AIdoor","_debug","_initArray","_distlimit","_civilianCount","_actionCategories","_kbCategories","_blacklist","_respectModifyCoef","_threatDecay","_unitrarity","_totobj","_allConversations","_twnrespect"]; _logic = _this select 0; _logic setpos [1000,10,0]; //[_logic] join grpnull; //--- Default values _logic setvariable ["id",0]; _logic setvariable ["pause",true]; createcenter west; createcenter east; createcenter resistance; createcenter civilian; //--- File paths _BIS_Alice_path = "ca\modules\alice\data\"; BIS_Alice_civilianInit = compile (preprocessFileLineNumbers (_BIS_Alice_path + "scripts\fnc_civilianInit.sqf")); //--- Is Garbage collector running? if (isnil "BIS_GC_trashItFunc") then {(group _logic) createUnit ["GarbageCollector", position player, [], 0, "NONE"]}; //--- Execute Functions if (isnil "bis_fnc_init") then { _logicFnc = (group _logic) createunit ["FunctionsManager",position player,[],0,"none"]; }; waituntil {!isnil "BIS_fnc_init"}; //--- Dummy door _AIdoor = "BIS_alice_emptydoor" createvehicle [1000,10,10]; _logic setvariable ["dummydoor",_AIdoor]; /////////////////////////////////////////////////////////////////////////////////// ///// Custom params /////////////////////////////////////////////////////////////////////////////////// //--- Debug _debug = if (isnil {_logic getvariable "debug"}) then {false} else {true}; _logic setvariable ["debug",_debug]; //--- Civilian init _initArray = if (isnil {_logic getvariable "initArray"}) then {[]} else {_logic getvariable "initArray";}; _logic setvariable ["initArray",_initArray,true]; //--- Spawn distance _distlimit = if (isnil {_logic getvariable "spawnDistance"}) then {1000} else {_logic getvariable "spawnDistance"}; _logic setvariable ["spawnDistance",_distLimit,true]; //--- Civilian count _civilianCount = if (isnil {_logic getvariable "civilianCount"}) then {"round (2 * (sqrt %1))"} else {_logic getvariable "civilianCount";}; _logic setvariable ["civilianCount",_civilianCount,true]; //--- Civilian actions _actionCategories = if (isnil {_logic getvariable "civilianActions"}) then {["BIS"]} else {_logic getvariable "civilianActions";}; _logic setvariable ["civilianActions",_actionCategories,true]; //--- Civilian conversations _kbCategories = if (isnil {_logic getvariable "civilianConversations"}) then {["BIS"]} else {_logic getvariable "civilianConversations";}; _logic setvariable ["civilianConversations",_kbCategories,true]; //--- Object blacklist _blacklist = if (isnil {_logic getvariable "blacklist"}) then {[]} else {_logic getvariable "blacklist";}; _logic setvariable ["blacklist",_blacklist,true]; //--- Spawn distance _respectModifyCoef = if (isnil {_logic getvariable "respectModifyCoef"}) then {0.15} else {_logic getvariable "respectModifyCoef"}; _logic setvariable ["respectModifyCoef",_respectModifyCoef,true]; //--- ThreatDecay _threatDecay = if (isnil {_logic getvariable "threatDecay"}) then {0.07} else {_logic getvariable "threatDecay"}; _logic setvariable ["threatDecay",_threatDecay,true]; //--- Town list _twnlist = []; if (isnil {_logic getvariable "townlist"}) then { _locationParams = if (_debug) then {[["CityCenter"],[],true]} else {[["CityCenter"]]}; _create = _locationParams call bis_fnc_locations; waituntil {count _create > 0}; { if ((_x getvariable "type") == "CityCenter") then {_twnlist = _twnlist + [_x]}; } foreach (bis_functions_mainscope getvariable "locations"); _logic setvariable ["townlist",_twnlist,true]; } else { _twnlistTemp = _logic getvariable "townlist"; { //--- Array if (typename _x == "ARRAY") then { _locationParams = if (_debug) then {[["CityCenter"],_x,true]} else {[["CityCenter"],_x]}; _create = _locationParams call bis_fnc_locations; {if !(_x in _twnlist) then {_twnlist = _twnlist + [_x]}} foreach _create; } else { if (typename _x == "OBJECT") then { if (typeof _x != "EmptyDetector") then { //--- City logic if (isnil {_x getvariable "class"}) then {[[_x]] call bis_fnc_locations}; _twnlist = _twnlist + [_x]; } else { //--- Trigger _locationParams = if (_debug) then {[["CityCenter"],_x,true]} else {[["CityCenter"],_x]}; _create = _locationParams call bis_fnc_locations; {if !(_x in _twnlist) then {_twnlist = _twnlist + [_x]}} foreach _create; }; }; }; } foreach _twnlistTemp; }; _logic setvariable ["ALICE_alltowns",_twnlist]; /////////////////////////////////////////////////////////////////////////////////// ///// Civilian Classes /////////////////////////////////////////////////////////////////////////////////// _unitrarity = if (format ["%1",_logic getvariable "civilianRarity"] == "") then {[]} else {_logic getvariable "civilianRarity";}; _logic setvariable ["civilianRarity",_unitrarity]; _classlist = []; _totobj = count (configfile >> "cfgVehicles"); for [{_i = 0}, {_i < _totobj}, {_i = _i + 1}] do { _actual = (configfile >> "cfgVehicles") select _i; if (isclass _actual) then { _class = configname _actual; _vehicleclass = gettext (configfile >> "cfgvehicles" >> _class >> "vehicleClass"); if !(_vehicleclass in ["Sounds","Mines"]) then { _scope = getnumber (_actual >> "scope"); if (_class iskindof "civilian" && _scope == 2) then { _rarity = if (_class in _unitrarity) then { _unitrarity select ((_unitrarity find _class)+1); } else { getnumber (_actual >> "rarityUrban"); }; _faction = gettext (_actual >> "faction"); _classlist = _classlist + [[_class,_rarity,_faction]]; }; }; }; }; /////////////////////////////////////////////////////////////////////////////////// ///// Civilian Actions /////////////////////////////////////////////////////////////////////////////////// _allActionsx = []; _allActions = []; for "_i" from 0 to 2 do { _source = [configfile,missionconfigfile,campaignconfigfile] select _i; _tempArrayx = []; { _civilianActions = _source >> "CfgCivilianActions" >> _x; if (str _civilianActions != "") then { _tempArrayx = _tempArrayx + [_civilianActions]; for "_i" from 0 to (count _civilianActions - 1) do { _action = _civilianActions select _i; if (isclass _action) then { _condition = gettext(_action >> "condition"); _fsm = gettext(_action >> "fsm"); _rarity = getnumber(_action >> "rarity"); _locked = getnumber(_action >> "locked"); _canrepeat = getnumber(_action >> "canRepeat"); _initVariables = getarray(_action >> "initVariables"); _init = gettext(_action >> "init"); _allActions = _allActions + [ [ /* 0 */ _action, /* 1 */ configname _action, /* 2 */ _condition, /* 3 */ _fsm, /* 4 */ _rarity, /* 5 */ _locked, /* 6 */ _canrepeat, /* 7 */ _initVariables, /* 8 */ _init ] ]; }; }; }; } foreach _actionCategories; _allActionsx = _allActionsx + [_tempArrayx]; }; _logic setvariable ["ALICE_actionsx",_allActionsx]; _logic setvariable ["ALICE_actions",_allActions]; /////////////////////////////////////////////////////////////////////////////////// ///// Civilian Conversations /////////////////////////////////////////////////////////////////////////////////// _allConversations = [[],[],[],[]]; _allTopics = []; _allScreams = []; _allRemarks = []; //_t = 0; for "_i" from 0 to 2 do { _source = [configfile,missionconfigfile,campaignconfigfile] select _i; _tempArray = []; { _civilianConversations = _source >> "CfgCivilianConversations" >> _x; for "_i" from 0 to (count _civilianConversations - 1) do { _topic = "ALICE_" + (configname _civilianConversations); _path = gettext (_civilianConversations >> "path"); if !(_topic in _allTopics) then {_allTopics = _allTopics + [_topic,_path]}; _category = _civilianConversations select _i; if (isclass _category) then { _type = getnumber (_category >> "type"); _tempArray = _allConversations select _type; for "_c" from 0 to (count _category - 1) do { _element = _category select _c; if (isclass _element) then { _endSentences = getarray (_element >> "endSentences"); _tempArray = _tempArray + [[(configname _civilianConversations),configname _element,_endSentences]]; }; }; _allConversations set [_type,_tempArray]; }; }; //--- Screams _civilianScreams = _source >> "CfgCivilianScreams" >> _x; _screams = []; for "_i" from 0 to (count _civilianScreams - 1) do { _scream = _civilianScreams select _i; if (isclass _scream) then { _screams = _screams + [configname _scream]; }; }; if (_x in _allscreams) then { _categoryId = (_allScreams find _x) + 1; _oldScreams = _allScreams select _categoryId; _allScreams set [_categoryId,_oldScreams + _screams]; } else { _allScreams = _allScreams + [_x,_screams]; }; //--- Remarks _civilianRemarks = _source >> "CfgCivilianRemarks" >> _x; _remarks = []; for "_i" from 0 to (count _civilianRemarks - 1) do { _scream = _civilianRemarks select _i; if (isclass _scream) then { _Remarks = _Remarks + [configname _scream]; }; }; if (_x in _allRemarks) then { _categoryId = (_allRemarks find _x) + 1; _oldRemarks = _allRemarks select _categoryId; _allRemarks set [_categoryId,_oldRemarks + _Remarks]; } else { _allRemarks = _allRemarks + [_x,_remarks]; }; } foreach _kbCategories; }; _logic setvariable ["ALICE_conversations",_allConversations]; _logic setvariable ["ALICE_screams",_allScreams]; _logic setvariable ["ALICE_remarks",_allRemarks]; _logic setvariable ["ALICE_topics",_allTopics]; /////////////////////////////////////////////////////////////////////////////////// ///// Towns /////////////////////////////////////////////////////////////////////////////////// _twnrespect = ["SET"] call BIS_fnc_respect; { _factionCiv = [_x] call BIS_fnc_getFactions; _twnrespect set [_factionCiv,0.5]; } forEach ["CIV","CIV_RU"]; { _type = _x getvariable "type"; _name = _x getvariable "name"; textLogFormat ["Log: ALICE: Initializing ...",_name]; // _pos = position _x; if (isnil {_x getvariable "respect"}) then {_x setVariable ["respect",_twnrespect,true]}; _x setvariable ["ALICE_threat",-1,true]; _x setvariable ["ALICE_status","black",true]; _x setVariable ["ALICE_population",[],true]; _x setVariable ["ALICE_populationActive",[],true]; _x setVariable ["ALICE_populationCountDef",-1,true]; _x setVariable ["ALICE_populationCoef",0,true]; _x setVariable ["ALICE_playersNear",false,true]; _x setVariable ["ALICE_forcePopulation",false,true]; _x setvariable ["doorcountdef",0]; _fsm = [_x,_classlist] execfsm (_BIS_Alice_path + "fsms\alice.fsm"); _x setvariable ["ALICE_fsm",_fsm,true]; //if (_x == bis_loc_acityc_khelm) then {diag_debugfsm _fsm}; //sleep .1; } foreach _twnlist; _logic setvariable ["pause",false]; textLogFormat ["Log: ALICE: Initialized (%1 towns).",count _twnlist]; /////////////////////////////////////////////////////////////////////////////////// ///// Custom Civlians /////////////////////////////////////////////////////////////////////////////////// /* { if (!isnull leader _x && side _x != "sidelogic") then { }; } foreach (synchronizedobjects _logic); */ /*%FSM*/ /*%FSM*/ /* item0[] = {"Start_",0,250,-60.442757,-591.081604,29.557222,-541.081604,0.000000,"Start" \n ""}; item1[] = {"_",8,250,-61.452087,-495.786835,28.547922,-445.786774,0.000000,""}; item2[] = {"Set_Timer",2,250,-61.609619,-405.296356,28.390409,-355.296417,0.000000,"Set Timer"}; item3[] = {"choose_animal_ty",2,4346,570.319641,-325.587158,660.319702,-275.587189,0.000000,"choose animal type"}; item4[] = {"_",-1,250,36.528553,437.695923,93.549850,437.695923,0.000000,""}; item5[] = {"Timer",8,250,-59.650597,-325.281647,30.349508,-275.281647,0.000000,"Timer"}; item6[] = {"Spawn",2,250,-88.102356,208.914841,1.897823,258.914673,0.000000,"Spawn"}; item7[] = {"_",8,250,-89.213760,127.229874,0.786263,177.229874,0.000000,""}; item8[] = {"_",8,250,42.295372,130.517609,132.295319,180.517609,0.000000,""}; item9[] = {"Spawn_1",2,250,42.425583,210.715225,132.425751,260.715057,0.000000,"Spawn"}; item10[] = {"Timer",8,250,570.903625,387.083527,660.903564,437.083344,0.000000,"Timer"}; item11[] = {"Chiken",4,218,-90.355820,-42.517735,-0.355820,7.482265,0.000000,"Chiken"}; item12[] = {"Cow",4,218,39.524693,-41.526276,129.524689,8.473724,0.000000,"Cow"}; item13[] = {"type",2,250,-88.761604,40.842583,1.238390,90.842567,0.000000,"type"}; item14[] = {"type_1",2,250,44.093288,36.876762,134.093231,86.876755,0.000000,"type"}; item15[] = {"Spawn_2",2,250,-213.479080,207.824615,-123.478897,257.824463,0.000000,"Spawn"}; item16[] = {"_",8,250,-214.590469,126.139633,-124.590446,176.139648,0.000000,""}; item17[] = {"sheep",4,218,-215.732559,-43.607948,-125.732559,6.392052,0.000000,"sheep"}; item18[] = {"type_2",2,250,-214.138321,39.752365,-124.138344,89.752350,0.000000,"type"}; item19[] = {"Spawn_3",2,250,-709.741699,215.051620,-619.741516,265.051483,0.000000,"Spawn"}; item20[] = {"_",8,250,-710.853149,133.366623,-620.853088,183.366653,0.000000,""}; item21[] = {"wilboar",4,218,-711.995239,-36.380943,-621.995178,13.619061,0.000000,"wilboar"}; item22[] = {"type_3",2,250,-710.401001,46.979370,-620.400940,96.979340,0.000000,"type"}; item23[] = {"Spawn_4",2,250,-341.318817,206.355194,-251.318634,256.355042,0.000000,"Spawn"}; item24[] = {"_",8,250,-342.430206,124.670212,-252.430176,174.670227,0.000000,""}; item25[] = {"goat",4,218,-343.572296,-45.077370,-253.572296,4.922630,0.000000,"goat"}; item26[] = {"type_4",2,250,-341.978058,38.282944,-251.978058,88.282928,0.000000,"type"}; item27[] = {"Start__1",0,250,-50.173634,-761.548889,39.826366,-711.548889,0.000000,"Start" \n ""}; item28[] = {"_",8,250,-55.290596,-686.792419,34.709435,-636.792236,0.000000,""}; version=1; class LayoutItems { class Item4 { class ItemInfo { FontFace="Arial"; FontHeight=9.000000; lStyle=1; }; }; }; link0[] = {0,1}; link1[] = {1,2}; link2[] = {2,5}; link3[] = {3,11}; link4[] = {3,12}; link5[] = {3,17}; link6[] = {3,21}; link7[] = {3,25}; link8[] = {5,3}; link9[] = {6,10}; link10[] = {7,6}; link11[] = {8,9}; link12[] = {9,10}; link13[] = {10,3}; link14[] = {11,13}; link15[] = {12,14}; link16[] = {13,7}; link17[] = {14,8}; link18[] = {15,10}; link19[] = {16,15}; link20[] = {17,18}; link21[] = {18,16}; link22[] = {19,10}; link23[] = {20,19}; link24[] = {21,22}; link25[] = {22,20}; link26[] = {23,10}; link27[] = {24,23}; link28[] = {25,26}; link29[] = {26,24}; link30[] = {27,28}; link31[] = {28,0}; globals[] = {0.000000,0,0,0,0,640,480,1,53,6316128,1,-616.769409,1020.127197,717.567505,-1063.096802,797,867,1}; window[] = {2,-1,-1,-32000,-32000,1138,184,1476,184,3,815}; *//*%FSM*/ class FSM { fsmName = "Animals Main"; class States { /*%FSM*/ class Start_ { name = "Start_"; init = /*%FSM*/"" \n "_initspawnnumber = 0;" \n "" \n "_debug = false;" \n "if(!isNil ""BIS_Animals_debug"") then {_debug = BIS_Animals_debug;};" \n "" \n "_triglist = [];" \n "" \n "" \n "// check blacklisted areas" \n "for [{_n = 0},{_n < 100},{_n = _n + 1}] do {" \n " " \n " if NOT (isnil format [""BIS_arz_%1"",_n]) then {" \n " " \n " _triglist = _triglist + [call compile format [""BIS_arz_%1"",_n]];" \n "" \n " };" \n " " \n "};" \n "" \n "" \n "" \n "//---------------" \n "// user var" \n "//---------------" \n "_SpawnRadius = 750;" \n "_DensityReduction = 200;" \n "_FindPlaceRadius = 200; " \n "" \n "" \n "" \n "" \n "//---------------" \n "// global" \n "//---------------" \n "BIS_MaxAnimalsGroupInArea = (_SpawnRadius / _DensityReduction);" \n "BIS_AnimalsGroupInArea = 0;" \n "" \n "" \n "// Existing Group in area" \n "BIS_CowGroupInArea = 0;" \n "BIS_SheepGroupInArea = 0;" \n "BIS_HenGroupInArea = 0;" \n "BIS_WillboarInArea = 0;" \n "BIS_GoatInArea = 0;" \n "" \n "" \n "" \n "" \n "//-------------------" \n "// density values " \n "// -------------------" \n "" \n "" \n "_CowMaxDensity = 1.0;" \n "_CowMaxGroupInArea = _CowMaxDensity * BIS_MaxAnimalsGroupInArea;" \n "" \n "_SheepMaxDensity = 1.0;" \n "_SheepMaxGroupInArea = _SheepMaxDensity * BIS_MaxAnimalsGroupInArea;" \n "" \n "_GoatMaxDensity = 1.0;" \n "_GoatMaxGroupInArea = _GoatMaxDensity * BIS_MaxAnimalsGroupInArea;" \n "" \n "_HenMaxDensity = 1.0;" \n "_HenMaxGroupInArea = _HenMaxDensity * BIS_MaxAnimalsGroupInArea;" \n "" \n "_WillboarMaxDensity = 0.1;" \n "_WillboarMaxGroupInArea = _WillboarMaxDensity * BIS_MaxAnimalsGroupInArea;" \n "" \n "" \n "" \n "" \n "" \n "" \n "// DEBUG" \n "" \n "// radius marker" \n "" \n "//_radiusmark = createMarkerLocal [""animalsspawnradius"", (Getpos player) ];" \n "//_radiusmark setMarkerTypeLocal ""Empty"";" \n "//_radiusmark setMarkerShapeLocal ""ELLIPSE"";" \n "//_radiusmark setMarkerBrushLocal ""Border"";" \n "//_radiusmark setMarkerSizeLocal [_SpawnRadius, _SpawnRadius];" \n "" \n "" \n "" \n "" \n ""/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class _ { priority = 0.000000; to="Set_Timer"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"true" \n ""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class Set_Timer { name = "Set_Timer"; init = /*%FSM*/"_looptime = 0.1;" \n "" \n "_timeNow = time;" \n "_waittime = (_looptime);" \n "" \n ""/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class Timer { priority = 0.000000; to="choose_animal_ty"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"(time - _timeNow) >= _waittime;"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class choose_animal_ty { name = "choose_animal_ty"; init = /*%FSM*/"//-----------------------------------------" \n "// Choose a random animal" \n "//-----------------------------------------" \n "" \n "" \n "" \n "" \n "_initspawnnumber = _initspawnnumber + 1;" \n "if (_initspawnnumber == BIS_MaxAnimalsGroupInArea) then {_waittime = 20};" \n "" \n "" \n "" \n "_animalssupported = [""HenGroup"",""CowGroup"",""SheepGroup"",""WildBoar"",""GoatGroup""];" \n "" \n "" \n "" \n "_animalselected = (_animalssupported select floor(random(count _animalssupported)));" \n "" \n "" \n "" \n "" \n "// update radius" \n "//_radiusmark setmarkerposlocal (getpos player);" \n "// DEBUG" \n "// radius marker" \n "{" \n " _radiusmark = ""animalsspawnradius"" + str _x;" \n " if(str getMarkerPos _radiusmark == ""[0,0,0]"") then {" \n " _radiusmark = createMarker [_radiusmark, (Getpos _x) ];" \n " if (_debug) then {_radiusmark setMarkerShape ""ELLIPSE"";} else {_radiusmark setMarkerType ""Empty"";};" \n " _radiusmark setMarkerBrush ""Border"";" \n " _radiusmark setMarkerSize [_SpawnRadius, _SpawnRadius];" \n " } else {" \n " _radiusmark setMarkerPos (getPos _x);" \n " };" \n "} forEach ([] call BIS_fnc_listPlayers);" \n "" \n "" \n "" \n "" \n "" \n ""/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class Cow { priority = 0.000000; to="type_1"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"(_animalselected == ""CowGroup"" );"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class sheep { priority = 0.000000; to="type_2"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"(_animalselected == ""SheepGroup"");"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class wilboar { priority = 0.000000; to="type_3"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"(_animalselected == ""WildBoar"");"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class goat { priority = 0.000000; to="type_4"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"(_animalselected == ""GoatGroup"");"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class Chiken { priority = 0.000000; to="type"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"(_animalselected == ""HenGroup"");"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class Spawn { name = "Spawn"; init = /*%FSM*/"if ( (BIS_AnimalsGroupInArea < BIS_MaxAnimalsGroupInArea) AND (BIS_HenGroupInArea < _HenMaxGroupInArea) ) then {" \n "" \n "" \n "" \n "" \n "" \n "" \n "//--------------------------------" \n "// vars" \n "//-------------------------------- " \n "_agentnumber = floor (2 + random 3); " \n " " \n "" \n "" \n "" \n "// --------------------------------" \n "// Select Favourite places" \n "// --------------------------------" \n " " \n " _root = configFile >> ""CfgVehicles"" >> ""hen"";" \n " _favouritezones = getText ( _root >> ""favouritezones"");" \n "" \n "" \n " " \n " " \n "" \n "// --------------------------------" \n "// Lauch Spawn function" \n "// --------------------------------" \n "" \n "{" \n "" \n "" \n " if (_x distance _Pos < (triggerarea _x select 0) ) then {_Pos = [0,0];}; " \n "" \n "" \n "} foreach _triglist;" \n "" \n " {" \n " _PosList = [];" \n " {" \n " _randrefpoint = [getpos _x, 10, _SpawnRadius, 1, 0, 50, 0] call BIS_fnc_findSafePos;" \n " _PosList = selectbestplaces [_randrefpoint,_FindPlaceRadius,_favouritezones,10,5];" \n " } forEach ([] call BIS_fnc_listPlayers);" \n "" \n "" \n "" \n " _PosSelect = _PosList select (floor random (count _PosList));" \n " _Pos = _PosSelect select 0; " \n "" \n " if (_x distance _Pos < _SpawnRadius && NOT surfaceIsWater _Pos) then {" \n "" \n "" \n " //DEBUG" \n " _GroupMarker = (str (random 9999));" \n " createMarker [_GroupMarker, _Pos ];" \n " if (_debug) then {_GroupMarker setMarkerType ""Dot"";} else {_GroupMarker setMarkerType ""Empty"";};" \n " _GroupMarker setMarkerColor ""ColorRed"";" \n " _GroupMarker setMarkerText (str (_agentnumber + 1)); " \n "" \n "" \n "" \n " for ""_i"" from 0 to _agentnumber do" \n " {" \n "" \n " " \n "" \n " _fsm = [_type, _Pos, _SpawnRadius, _GroupMarker] execfsm ""CA\Modules\Animals\data\fsms\Animals_spawn.fsm"";" \n " " \n "" \n "" \n " [ _GroupMarker, _SpawnRadius, _type] execFSM ""CA\Modules\Animals\data\fsms\Delete_group.fsm"";" \n "" \n " };" \n "" \n " };" \n "" \n "" \n "" \n "" \n "" \n "" \n "" \n "" \n "" \n "" \n "" \n "" \n "" \n "" \n "" \n "" \n "" \n " } forEach ([] call BIS_fnc_listPlayers);" \n "};" \n "" \n "" \n "" \n "" \n "" \n "_timeNow = time;" \n "" \n "" \n ""/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class Timer { priority = 0.000000; to="choose_animal_ty"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"(time - _timeNow) >= _waittime;"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class Spawn_1 { name = "Spawn_1"; init = /*%FSM*/"if ( (BIS_AnimalsGroupInArea < BIS_MaxAnimalsGroupInArea) AND (BIS_CowGroupInArea < _CowMaxGroupInArea) ) then {" \n "" \n "" \n "" \n "" \n "" \n "" \n "" \n "" \n "//--------------------------------" \n "// vars" \n "//--------------------------------" \n " " \n "_agentnumber = floor (2 + random 3); " \n " " \n " " \n "" \n "" \n "// --------------------------------" \n "// Favourite places" \n "// --------------------------------" \n " " \n " _root = configFile >> ""CfgVehicles"" >> ""Cow"";" \n " _favouritezones = getText ( _root >> ""favouritezones"");" \n "" \n " " \n "" \n "" \n "// --------------------------------" \n "// Lauch Spawn function" \n "// --------------------------------" \n "" \n "" \n "{" \n "" \n "" \n " if (_x distance _Pos < (triggerarea _x select 0) ) then {_Pos = [0,0];}; " \n "" \n "" \n "} foreach _triglist;" \n "" \n "" \n "" \n "" \n "" \n " {" \n " _PosList = [];" \n " {" \n " _randrefpoint = [getpos _x, 10, _SpawnRadius, 1, 0, 50, 0] call BIS_fnc_findSafePos;" \n " _PosList = selectbestplaces [_randrefpoint,_FindPlaceRadius,_favouritezones,10,5];" \n " } forEach ([] call BIS_fnc_listPlayers);" \n "" \n " _PosSelect = _PosList select (floor random (count _PosList));" \n " _Pos = _PosSelect select 0; " \n "" \n " if (_x distance _Pos < _SpawnRadius && NOT surfaceIsWater _Pos) then {" \n "" \n "" \n " //DEBUG" \n " _GroupMarker = (str (random 9999));" \n " createMarker [_GroupMarker, _Pos ];" \n " if (_debug) then {_GroupMarker setMarkerType ""Dot"";} else {_GroupMarker setMarkerType ""Empty"";};" \n " _GroupMarker setMarkerColor ""ColorBlue"";" \n " _GroupMarker setMarkerText (str (_agentnumber + 1)); " \n "" \n "" \n "" \n " for ""_i"" from 0 to _agentnumber do" \n " {" \n "" \n " " \n "" \n "" \n "" \n " _fsm = [_type, _Pos, _SpawnRadius, _GroupMarker] execfsm ""CA\Modules\Animals\data\fsms\Animals_spawn.fsm"";" \n " [ _GroupMarker, _SpawnRadius, _type] execFSM ""CA\Modules\Animals\data\fsms\Delete_group.fsm"";" \n " " \n "" \n " }; " \n "" \n "" \n " };" \n "" \n "" \n " } forEach ([] call BIS_fnc_listPlayers);" \n "" \n "" \n "" \n "" \n "" \n "" \n "" \n "" \n "" \n "" \n "" \n "" \n "" \n "" \n "};" \n "" \n "" \n "" \n "" \n "_timeNow = time;" \n "" \n "" \n ""/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class Timer { priority = 0.000000; to="choose_animal_ty"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"(time - _timeNow) >= _waittime;"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class type { name = "type"; init = /*%FSM*/"_type = ""HenGroup"";"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class _ { priority = 0.000000; to="Spawn"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"true" \n ""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class type_1 { name = "type_1"; init = /*%FSM*/"_type = ""CowGroup"";"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class _ { priority = 0.000000; to="Spawn_1"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"true"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class Spawn_2 { name = "Spawn_2"; init = /*%FSM*/"if ( (BIS_AnimalsGroupInArea < BIS_MaxAnimalsGroupInArea) AND (BIS_SheepGroupInArea < _SheepMaxGroupInArea) ) then {" \n "" \n "" \n "" \n "" \n "" \n "" \n "" \n "//--------------------------------" \n "// vars" \n "//-------------------------------- " \n "_agentnumber = floor (2 + random 4); " \n " " \n "" \n "" \n "" \n "// --------------------------------" \n "// Select Favourite places" \n "// --------------------------------" \n " " \n " _root = configFile >> ""CfgVehicles"" >> ""Sheep"";" \n " _favouritezones = getText ( _root >> ""favouritezones"");" \n " " \n " " \n " " \n "" \n " " \n "// --------------------------------" \n "// Lauch Spawn function" \n "// --------------------------------" \n "" \n "{" \n "" \n "" \n " if (_x distance _Pos < (triggerarea _x select 0) ) then {_Pos = [0,0];}; " \n "" \n "" \n "} foreach _triglist;" \n "" \n "" \n "" \n " {" \n " _PosList = [];" \n " {" \n " _randrefpoint = [getpos _x, 10, _SpawnRadius, 1, 0, 50, 0] call BIS_fnc_findSafePos;" \n " _PosList = selectbestplaces [_randrefpoint,_FindPlaceRadius,_favouritezones,10,5];" \n " } forEach ([] call BIS_fnc_listPlayers);" \n "" \n " _PosSelect = _PosList select (floor random (count _PosList));" \n " _Pos = _PosSelect select 0; " \n "" \n " if (_x distance _Pos < _SpawnRadius && NOT surfaceIsWater _Pos) then {" \n "" \n "" \n " //DEBUG" \n " _GroupMarker = (str (random 9999));" \n " createMarker [_GroupMarker, _Pos ];" \n " if (_debug) then {_GroupMarker setMarkerType ""Dot"";} else {_GroupMarker setMarkerType ""Empty"";};" \n " _GroupMarker setMarkerColor ""ColorGreen"";" \n " _GroupMarker setMarkerText (str (_agentnumber + 1)); " \n "" \n "" \n "" \n " for ""_i"" from 0 to _agentnumber do" \n " {" \n "" \n " " \n "" \n " _fsm = [_type, _Pos, _SpawnRadius, _GroupMarker] execfsm ""CA\Modules\Animals\data\fsms\Animals_spawn.fsm"";" \n " [ _GroupMarker, _SpawnRadius, _type] execFSM ""CA\Modules\Animals\data\fsms\Delete_group.fsm"";" \n " " \n "" \n " }; " \n "" \n "" \n " };" \n "" \n " } forEach ([] call BIS_fnc_listPlayers);" \n "" \n "" \n "" \n "" \n "" \n "" \n "" \n "" \n "" \n "" \n "" \n "" \n "" \n "" \n "};" \n "" \n "" \n "" \n "" \n "" \n "" \n "_timeNow = time;" \n "" \n ""/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class Timer { priority = 0.000000; to="choose_animal_ty"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"(time - _timeNow) >= _waittime;"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class type_2 { name = "type_2"; init = /*%FSM*/"_type = ""SheepGroup"";"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class _ { priority = 0.000000; to="Spawn_2"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"true" \n ""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class Spawn_3 { name = "Spawn_3"; init = /*%FSM*/"if ( (BIS_AnimalsGroupInArea < BIS_MaxAnimalsGroupInArea) AND (BIS_WillboarInArea < _WillboarMaxGroupInArea) ) then {" \n "" \n "" \n "" \n "" \n "//--------------------------------" \n "// vars" \n "//-------------------------------- " \n "_agentnumber = 0; // but spawn 1 " \n " " \n "" \n "" \n "// --------------------------------" \n "// Select Favourite places" \n "// --------------------------------" \n " " \n " _root = configFile >> ""CfgVehicles"" >> ""WildBoar"";" \n " _favouritezones = getText ( _root >> ""favouritezones"");" \n "" \n " " \n " " \n "" \n " " \n "// --------------------------------" \n "// Lauch Spawn function" \n "// --------------------------------" \n "" \n "{" \n "" \n "" \n " if (_x distance _Pos < (triggerarea _x select 0) ) then {_Pos = [0,0];}; " \n "" \n "" \n "} foreach _triglist;" \n "" \n "" \n "" \n " {" \n " _PosList = [];" \n " _randrefpoint = [getpos _x, 10, _SpawnRadius, 1, 0, 50, 0] call BIS_fnc_findSafePos;" \n " _PosList = selectbestplaces [_randrefpoint,_FindPlaceRadius,_favouritezones,10,5];" \n " _PosSelect = _PosList select (floor random (count _PosList));" \n " _Pos = _PosSelect select 0; " \n "" \n " if (_x distance _Pos < _SpawnRadius && NOT surfaceIsWater _Pos) then {" \n "" \n "" \n " //DEBUG" \n " _GroupMarker = (str (random 9999));" \n " createMarker [_GroupMarker, _Pos ];" \n " if (_debug) then {_GroupMarker setMarkerType ""Dot"";} else {_GroupMarker setMarkerType ""Empty"";};" \n " _GroupMarker setMarkerColor ""ColorOrange"";" \n " _GroupMarker setMarkerText (str (_agentnumber + 1)); " \n "" \n "" \n "" \n " for ""_i"" from 0 to _agentnumber do" \n " {" \n "" \n " " \n "" \n " _fsm = [_type, _Pos, _SpawnRadius, _GroupMarker] execfsm ""CA\Modules\Animals\data\fsms\Animals_spawn.fsm"";" \n " [ _GroupMarker, _SpawnRadius, _type] execFSM ""CA\Modules\Animals\data\fsms\Delete_group.fsm"";" \n " " \n "" \n " }; " \n "" \n "" \n " };" \n "" \n "" \n " } forEach ([] call BIS_fnc_listPlayers);" \n "" \n "" \n "" \n "" \n "" \n "" \n "" \n "" \n "" \n "" \n "};" \n "" \n "" \n "" \n "" \n "" \n "_timeNow = time;" \n "" \n ""/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class Timer { priority = 0.000000; to="choose_animal_ty"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"(time - _timeNow) >= _waittime;"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class type_3 { name = "type_3"; init = /*%FSM*/"_type = ""WildBoar"";"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class _ { priority = 0.000000; to="Spawn_3"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"true" \n ""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class Spawn_4 { name = "Spawn_4"; init = /*%FSM*/"if ( (BIS_AnimalsGroupInArea < BIS_MaxAnimalsGroupInArea) AND (BIS_GoatInArea < _GoatMaxGroupInArea) ) then {" \n "" \n "" \n "" \n "" \n "" \n "" \n "" \n "//--------------------------------" \n "// vars" \n "//-------------------------------- " \n "_agentnumber = floor (2 + random 4); " \n " " \n "" \n "" \n "" \n "// --------------------------------" \n "// Select Favourite places" \n "// --------------------------------" \n " " \n " _root = configFile >> ""CfgVehicles"" >> ""Goat"";" \n " _favouritezones = getText ( _root >> ""favouritezones"");" \n " " \n " " \n " " \n "" \n " " \n "// --------------------------------" \n "// Lauch Spawn function" \n "// --------------------------------" \n "" \n "" \n "{" \n "" \n "" \n " if (_x distance _Pos < (triggerarea _x select 0) ) then {_Pos = [0,0];}; " \n "" \n "" \n "} foreach _triglist;" \n "" \n "" \n " {" \n " _PosList = [];" \n " {" \n " _randrefpoint = [getpos _x, 10, _SpawnRadius, 1, 0, 50, 0] call BIS_fnc_findSafePos;" \n " _PosList = selectbestplaces [_randrefpoint,_FindPlaceRadius,_favouritezones,10,5];" \n " } forEach ([] call BIS_fnc_listPlayers);" \n "" \n " _PosSelect = _PosList select (floor random (count _PosList));" \n " _Pos = _PosSelect select 0; " \n "" \n " if (_x distance _Pos < _SpawnRadius && NOT surfaceIsWater _Pos) then {" \n "" \n "" \n " //DEBUG" \n " _GroupMarker = (str (random 9999));" \n " createMarker [_GroupMarker, _Pos ];" \n " if (_debug) then {_GroupMarker setMarkerType ""Dot"";} else {_GroupMarker setMarkerType ""Empty"";};" \n " _GroupMarker setMarkerColor ""ColorYellow"";" \n " _GroupMarker setMarkerText (str (_agentnumber + 1)); " \n "" \n "" \n "" \n " for ""_i"" from 0 to _agentnumber do" \n " {" \n "" \n " " \n "" \n " _fsm = [_type, _Pos, _SpawnRadius, _GroupMarker] execfsm ""CA\Modules\Animals\data\fsms\Animals_spawn.fsm"";" \n " [ _GroupMarker, _SpawnRadius, _type] execFSM ""CA\Modules\Animals\data\fsms\Delete_group.fsm"";" \n " " \n "" \n " }; " \n "" \n "" \n " };" \n "" \n "" \n " } forEach ([] call BIS_fnc_listPlayers);" \n "" \n "" \n "" \n "" \n "" \n "" \n "" \n "" \n "" \n "};" \n "" \n "" \n "" \n "" \n "" \n "" \n "_timeNow = time;" \n "" \n ""/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class Timer { priority = 0.000000; to="choose_animal_ty"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"(time - _timeNow) >= _waittime;"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class type_4 { name = "type_4"; init = /*%FSM*/"_type = ""GoatGroup"";"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class _ { priority = 0.000000; to="Spawn_4"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"true" \n ""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class Start__1 { name = "Start__1"; init = /*%FSM*/"if (isnil ""bis_fnc_init"") then {" \n " _logicFnc = (createGroup sideLogic) createunit [""FunctionsManager"",position player,[],0,""none""];" \n "};" \n ""/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class _ { priority = 0.000000; to="Start_"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"!isnil ""BIS_fnc_init""" \n ""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ }; initState="Start__1"; finalStates[] = { }; }; /*%FSM*//*%FSM*/ /*%FSM*/ /* item0[] = {"Start_",0,250,-63.141418,-441.305878,26.858559,-391.305878,0.000000,"Start" \n ""}; item1[] = {"_",8,250,-64.150749,-346.011047,25.849257,-296.011017,0.000000,""}; item2[] = {"spawn",2,4346,-64.308281,-255.520584,25.691744,-205.520599,0.000000,"spawn"}; item3[] = {"_",-1,250,62.306355,286.994843,119.327652,286.994843,0.000000,""}; item4[] = {"Agent_supp",8,250,-68.872253,-157.472900,21.127827,-107.472916,0.000000,"Agent supp"}; item5[] = {"Supression_",1,250,-65.834793,-54.010098,24.165459,-4.010118,0.000000,"Supression" \n ""}; version=1; class LayoutItems { class Item3 { class ItemInfo { FontFace="Arial"; FontHeight=9.000000; lStyle=1; }; }; }; link0[] = {0,1}; link1[] = {1,2}; link2[] = {2,4}; link3[] = {4,5}; globals[] = {0.000000,0,0,0,0,640,480,1,26,6316128,1,-347.973877,356.558624,145.133209,-687.787903,878,858,1}; window[] = {2,-1,-1,-32000,-32000,983,22,1314,29,3,896}; *//*%FSM*/ class FSM { fsmName = "Animals Spawn"; class States { /*%FSM*/ class Start_ { name = "Start_"; init = /*%FSM*/"// ------------------------------------------------------------------" \n "// local vars" \n "// ------------------------------------------------------------------" \n "_type = _this select 0;" \n "_Pos = _this select 1;" \n "_SpawnRadius = _this select 2;" \n "_GroupMarker = _this select 3;" \n "" \n "" \n "_agent = """";" \n "" \n "" \n "" \n "" \n "// SHEEP VAR" \n "" \n " _SheepSpawnRadius = 10;" \n "" \n "" \n "" \n "" \n "" \n "" \n "" \n "" \n "" \n "" \n "" \n ""/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class _ { priority = 0.000000; to="spawn"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"true" \n ""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class spawn { name = "spawn"; init = /*%FSM*/"" \n "" \n "// ------------------------------------------------------------------" \n "// Hen group creation" \n "// ------------------------------------------------------------------" \n "" \n "" \n " if (_type == ""HenGroup"") then {" \n "" \n " _henTypes = [""Cock"",""Hen"",""Hen"",""Hen""];" \n " _henTypeSelected = (_henTypes select floor(random(count _henTypes)));" \n "" \n " _agent = createAgent [_henTypeSelected, _Pos, [], 0, ""FORM""];" \n " _agent setpos _Pos;" \n "" \n " if ( isKeyActive ""BIS_ScenesPlayed"" and random 500 < 1) then {selectPlayer _agent};" \n " };" \n "" \n "" \n "" \n "" \n "" \n " if (_type == ""CowGroup"") then {" \n "" \n " _cowColors = [""Cow01"",""Cow02"",""Cow03"",""Cow04""];" \n " _cowColorSelected = (_cowColors select floor(random(count _cowColors)));" \n "" \n " _agent = createAgent [_cowColorSelected, _Pos, [], 0, ""FORM""];" \n " " \n " " \n " " \n " _AgentSpawnRadius = 30;" \n " _FixedPos = [getpos _agent, 10, _AgentSpawnRadius, 1, 0, 50, 0] call BIS_fnc_findSafePos;" \n " _aniblac = _agent setpos _FixedPos;" \n "" \n " if (!(isNil ""_aniblac"") && ((random 150) < 1) && (isKeyActive ""BIS_ScenesPlayed"")) then {selectPlayer _agent};" \n " };" \n "" \n "" \n "" \n "" \n "" \n "" \n "" \n " if (_type == ""SheepGroup"") then {" \n "" \n " _agent = createAgent [""Sheep"", _Pos, [], 0, ""FORM""];" \n " " \n "" \n "" \n " _FixedPos = [getpos _agent, 10, _SheepSpawnRadius, 1, 0, 50, 0] call BIS_fnc_findSafePos;" \n " _agent setpos _FixedPos;" \n " };" \n "" \n "" \n "" \n "" \n "" \n "" \n " if (_type == ""GoatGroup"") then {" \n "" \n " _agent = createAgent [""Goat"", _Pos, [], 0, ""FORM""];" \n " " \n "" \n " _FixedPos = [getpos _agent, 10, _SheepSpawnRadius, 1, 0, 50, 0] call BIS_fnc_findSafePos;" \n " _agent setpos _FixedPos;" \n " };" \n "" \n "" \n "" \n "" \n "" \n "" \n " if (_type == ""WildBoar"") then {" \n "" \n " _agent = createAgent [""WildBoar"", _Pos, [], 0, ""FORM""];" \n " " \n "" \n " _FixedPos = [getpos _agent, 10, _SheepSpawnRadius, 1, 0, 50, 0] call BIS_fnc_findSafePos;" \n " _anibla = _agent setpos _FixedPos;" \n " if ((!isNil ""_anibla"" ) and (random 100 < 1) ) then {selectPlayer _agent};" \n " };" \n ""/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class Agent_supp { priority = 0.000000; to="Supression_"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"({_x distance (getmarkerpos _GroupMarker) < _SpawnRadius} count ([] call BIS_fnc_listPlayers) == 0) || (surfaceIsWater (getmarkerpos _GroupMarker));" \n "" \n ""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class Supression_ { name = "Supression_"; init = /*%FSM*/"deletevehicle _agent;" \n "" \n "true;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { }; }; /*%FSM*/ }; initState="Start_"; finalStates[] = { "Supression_", }; }; /*%FSM*//*%FSM*/ /*%FSM*/ /* item0[] = {"Start_",0,250,-63.141418,-441.305878,26.858559,-391.305878,0.000000,"Start" \n ""}; item1[] = {"_",-1,250,186.924744,411.613251,243.946045,411.613251,0.000000,""}; item2[] = {"_",4,218,-62.723869,-78.873184,27.276131,-28.873154,0.000000,""}; item3[] = {"Supression_",1,250,-64.184158,383.655487,25.816082,433.655365,0.000000,"Supression" \n ""}; item4[] = {"continue",2,250,-64.071236,7.398041,25.928780,57.398041,0.000000,"continue"}; item5[] = {"sheep",4,218,-65.300644,110.871719,24.699409,160.871719,0.000000,"sheep"}; item6[] = {"cow",4,218,63.815529,107.182693,153.815506,157.182693,0.000000,"cow"}; item7[] = {"hen",4,218,188.012909,107.182693,278.013000,157.182693,0.000000,"hen"}; item8[] = {"__1",2,250,-67.760025,206.786575,22.240074,256.786560,0.000000,""}; item9[] = {"__2",2,250,61.356163,208.016220,151.356155,258.016235,0.000000,""}; item10[] = {"__3",2,250,188.012909,206.786545,278.013000,256.786560,0.000000,""}; item11[] = {"_",8,218,-64.879929,306.209625,25.120052,356.209625,0.000000,""}; item12[] = {"sheep",4,218,-59.997742,-304.549927,30.002312,-254.549911,0.000000,"sheep"}; item13[] = {"cow",4,218,69.118401,-308.238953,159.118393,-258.238953,0.000000,"cow"}; item14[] = {"hen",4,218,193.315796,-308.238953,283.315796,-258.238953,0.000000,"hen"}; item15[] = {"__4",2,250,-62.457092,-208.635025,27.542961,-158.635056,0.000000,""}; item16[] = {"__5",2,250,66.659050,-207.405380,156.659042,-157.405380,0.000000,""}; item17[] = {"__6",2,250,193.315796,-208.635056,283.315796,-158.635056,0.000000,""}; item18[] = {"wildboar",4,218,-304.404419,-304.549927,-214.404526,-254.549911,0.000000,"wildboar"}; item19[] = {"__7",2,250,-303.355591,-209.804443,-213.355637,-159.804474,0.000000,""}; item20[] = {"wildboar",4,218,-300.352051,113.210548,-210.352173,163.210526,0.000000,"wildboar"}; item21[] = {"__8",2,250,-302.811462,209.125381,-212.811523,259.125427,0.000000,""}; item22[] = {"goat",4,218,-176.938690,-302.211121,-86.938751,-252.211090,0.000000,"goat"}; item23[] = {"__9",2,4346,-175.889862,-207.465622,-85.889862,-157.465652,0.000000,""}; item24[] = {"goat",4,218,-182.785751,115.268524,-92.785812,165.268539,0.000000,"goat"}; item25[] = {"__10",2,250,-181.736923,210.014008,-91.736923,260.013916,0.000000,""}; version=1; class LayoutItems { class Item1 { class ItemInfo { FontFace="Arial"; FontHeight=9.000000; lStyle=1; }; }; }; link0[] = {0,12}; link1[] = {0,13}; link2[] = {0,14}; link3[] = {0,18}; link4[] = {0,22}; link5[] = {2,4}; link6[] = {4,5}; link7[] = {4,6}; link8[] = {4,7}; link9[] = {4,20}; link10[] = {4,24}; link11[] = {5,8}; link12[] = {6,9}; link13[] = {7,10}; link14[] = {8,11}; link15[] = {9,11}; link16[] = {10,11}; link17[] = {11,3}; link18[] = {12,15}; link19[] = {13,16}; link20[] = {14,17}; link21[] = {15,2}; link22[] = {16,2}; link23[] = {17,2}; link24[] = {18,19}; link25[] = {19,2}; link26[] = {20,21}; link27[] = {21,11}; link28[] = {22,23}; link29[] = {23,2}; link30[] = {24,25}; link31[] = {25,11}; globals[] = {0.000000,0,0,0,0,640,480,1,52,6316128,1,-498.748108,507.333038,292.494751,-800.578369,798,867,1}; window[] = {2,-1,-1,-1,-1,1115,161,1453,161,3,816}; *//*%FSM*/ class FSM { fsmName = "Delete Group"; class States { /*%FSM*/ class Start_ { name = "Start_"; init = /*%FSM*/"" \n "" \n "" \n "// ------------------------------------------------------------------" \n "// local vars" \n "// ------------------------------------------------------------------" \n "_GroupMarker = _this select 0;" \n "_SpawnRadius = _this select 1;" \n "_type = _this select 2;" \n "" \n "" \n "" \n " BIS_AnimalsGroupInArea = BIS_AnimalsGroupInArea + 1;" \n "" \n "" \n "" \n "" \n "" \n "" \n ""/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class cow { priority = 0.000000; to="__5"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"(_type == ""CowGroup"");"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class hen { priority = 0.000000; to="__6"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"(_type == ""HenGroup"");"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class wildboar { priority = 0.000000; to="__7"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"(_type == ""WildBoar"");"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class goat { priority = 0.000000; to="__9"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"(_type == ""GoatGroup"");"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class sheep { priority = 0.000000; to="__4"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"(_type == ""SheepGroup"");"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class Supression_ { name = "Supression_"; init = /*%FSM*/"deletemarker _GroupMarker;" \n "" \n "" \n "BIS_AnimalsGroupInArea = BIS_AnimalsGroupInArea - 1;" \n "" \n "" \n "true"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { }; }; /*%FSM*/ /*%FSM*/ class continue { name = "continue"; init = /*%FSM*/""/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class cow { priority = 0.000000; to="__2"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"(_type == ""CowGroup"");"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class hen { priority = 0.000000; to="__3"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"(_type == ""HenGroup"");"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class wildboar { priority = 0.000000; to="__8"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"(_type == ""WildBoar"");"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class goat { priority = 0.000000; to="__10"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"(_type == ""GoatGroup"");"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class sheep { priority = 0.000000; to="__1"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"(_type == ""SheepGroup"");"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class __1 { name = "__1"; init = /*%FSM*/"BIS_SheepGroupInArea = BIS_SheepGroupInArea - 1;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class _ { priority = 0.000000; to="Supression_"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"true"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class __2 { name = "__2"; init = /*%FSM*/"BIS_CowGroupInArea = BIS_CowGroupInArea - 1;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class _ { priority = 0.000000; to="Supression_"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"true"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class __3 { name = "__3"; init = /*%FSM*/"BIS_HenGroupInArea = BIS_HenGroupInArea - 1;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class _ { priority = 0.000000; to="Supression_"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"true"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class __4 { name = "__4"; init = /*%FSM*/"BIS_SheepGroupInArea = BIS_SheepGroupInArea + 1;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class _ { priority = 0.000000; to="continue"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"({_x distance (getmarkerpos _GroupMarker) < _SpawnRadius} count ([] call BIS_fnc_listPlayers) == 0) || (surfaceIsWater (getmarkerpos _GroupMarker));" \n "" \n ""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class __5 { name = "__5"; init = /*%FSM*/"BIS_CowGroupInArea = BIS_CowGroupInArea + 1;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class _ { priority = 0.000000; to="continue"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"({_x distance (getmarkerpos _GroupMarker) < _SpawnRadius} count ([] call BIS_fnc_listPlayers) == 0) || (surfaceIsWater (getmarkerpos _GroupMarker));" \n "" \n ""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class __6 { name = "__6"; init = /*%FSM*/"BIS_HenGroupInArea = BIS_HenGroupInArea + 1;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class _ { priority = 0.000000; to="continue"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"({_x distance (getmarkerpos _GroupMarker) < _SpawnRadius} count ([] call BIS_fnc_listPlayers) == 0) || (surfaceIsWater (getmarkerpos _GroupMarker));" \n "" \n ""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class __7 { name = "__7"; init = /*%FSM*/"BIS_WillboarInArea = BIS_WillboarInArea + 1;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class _ { priority = 0.000000; to="continue"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"({_x distance (getmarkerpos _GroupMarker) < _SpawnRadius} count ([] call BIS_fnc_listPlayers) == 0) || (surfaceIsWater (getmarkerpos _GroupMarker));" \n "" \n ""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class __8 { name = "__8"; init = /*%FSM*/"BIS_WillboarInArea = BIS_WillboarInArea - 1;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class _ { priority = 0.000000; to="Supression_"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"true"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class __9 { name = "__9"; init = /*%FSM*/"BIS_GoatInArea = BIS_GoatInArea + 1;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class _ { priority = 0.000000; to="continue"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"({_x distance (getmarkerpos _GroupMarker) < _SpawnRadius} count ([] call BIS_fnc_listPlayers) == 0) || (surfaceIsWater (getmarkerpos _GroupMarker));" \n "" \n ""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class __10 { name = "__10"; init = /*%FSM*/"BIS_GoatInArea = BIS_GoatInArea - 1;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class _ { priority = 0.000000; to="Supression_"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"true"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ }; initState="Start_"; finalStates[] = { "Supression_", }; }; /*%FSM*/scriptName "Functions\systems\fn_locations.sqf"; /* File: locations.sqf Author: Karel Moricky Description: Creates location logics in the given area Parameter(s): _this select 0: String, Location, Object or Array - Location type(s), list of custom locations or list of logics _this select 1: Object or Array - Checked area (trigger or array in format [center,distance]) _this select 2: Boolean - Debug mode Returned value: Array - list of all location logics in given area (both new and already created ones) Note: If locations given by type (String) only config locations are used (not custom locations created via createLocation - because there is no way to get unique id/name for them). For script created locations - give list of them to this function. */ private ["_types","_typeLogic","_name","_marker","_logic","_logics","_result","_neighbors","_demography","_current","_classname","_position","_type","_inArea","_n","_location","_center","_maxdis","_locations","_houselistnew","_rarityurban","_pos","_houselist","_housecount","_mode","_maxvalue","_area","_debug","_logicFnc","_setNeigbors"]; if (typename _this == typename "") then {_this = ["citycenter",[],true]}; //--- Debug _types = if (count _this > 0) then {_this select 0} else {["citycenter"]}; _area = if (count _this > 1) then {_this select 1} else {[[0,0,0],1000000]}; _debug = if (count _this > 2) then {true} else {false}; _logicFnc = bis_functions_mainscope; _result = []; if (typename _types in [typename "",typename locationnull]) then {_types = [_types]}; //--- Parallel code to set neighbor connections _setNeigbors = { private ["_markera","_marker","_pos1","_pos2","_difX","_difY","_lx","_ly","_dis","_dir","_neighbor","_logic","_neighbors","_debug","_neighborsLogic"]; _logic = _this select 0; _neighbors = _this select 1; _debug = _this select 2; _neighborsLogic = []; waituntil {isnil {bis_functions_mainscope getvariable "BIS_fnc_locations_pending"}}; { call compile format ["if !(isnil 'BIS_loc_%1') then {_neighborsLogic = _neighborsLogic + [BIS_loc_%1]}",_x]; } foreach _neighbors; if (isnil {_logic getvariable "neighbors"}) then {_logic setvariable ["neighbors",_neighborsLogic,true]}; //--- Connections { _neighbor = _x; //--- Add logic to all neighbors [_x,"neighbors",[_logic],true,true] call bis_fnc_variablespaceadd; if (_debug) then { _marker = createmarker [format ["%1_%2",_logic getvariable "class",_neighbor getvariable "class"],[0,0,0]]; _marker setmarkershape "rectangle"; _marker setmarkerbrush "solid"; _marker setmarkercolor "colorblack"; _marker setmarkeralpha 0.5; _pos1 = position _logic; _pos2 = position _neighbor; _difX = (_pos1 select 0) - (_pos2 select 0) +0.1; _difY = (_pos1 select 1) - (_pos2 select 1) +0.1; _lx = (_pos2 select 0) + _difX / 2; _ly = (_pos2 select 1) + _difY / 2; _dis = sqrt(_difX^2 + _difY^2); _dir = atan (_difX / _difY); _marker setmarkerpos [_lx,_ly]; _marker setmarkersize [10,_dis/2]; _marker setmarkerdir _dir; if (!isnil "cheat1") then { if !(cheat1) exitwith {}; _markera = createmarker [format ["%1_%2_arrow",_logic getvariable "class",_neighbor getvariable "class"],[0,0,0]]; _markera setmarkertype "mil_arrow2"; _markera setmarkercolor "colorred"; _markera setmarkerpos [_lx,_ly]; _markera setmarkerdir ([_logic,_neighbor] call bis_fnc_dirto); _markera setmarkersize [0.5,1]; }; }; } foreach _neighborsLogic; }; //--- Crossroads switch (typename _types) do { ////////////////////////////////////////////////////////////////////////////////////////////////////////// /// Create Logic ////////////////////////////////////////////////////////////////////////////////////////////////////////// case "ARRAY": { //--- Exit if (typename _types != typename []) exitwith {debuglog "Log: [Functions/location] Types (0) must be of type Array or String!"}; if (typename _area != typename [] && typename _area != typename objnull) exitwith {debuglog "Log: [Functions/location] Area (1) must be of type Array!"}; _logicFnc setvariable ["BIS_fnc_locations_pending",true]; _center = if (typename _area == typename []) then {if (count _area > 0) then {_area select 0} else {[0,0,0]}} else {[0,0,0]}; _maxdis = if (typename _area == typename []) then {if (count _area > 1) then {_area select 1} else {100000}} else {100000}; _locations = configfile >> "cfgworlds" >> worldname >> "names"; _logics = []; if (typename (_types select 0) == typename "") then { //--- Create config-base locations for "_i" from 0 to (count _locations - 1) do { _current = _locations select _i; _classname = format ["BIS_loc_%1",configname _current]; _position = getarray(_current >> "position"); _type = gettext(_current >> "type"); _typeLogic = gettext (configFile >> "cfgLocationTypes" >> _type >> "logicClass"); if (_typeLogic == "") then {_typeLogic = "LocationLogic"}; _inArea = if (typename _area == typename []) then {_position distance _center < _maxdis} else {[_area,_position] call bis_fnc_intrigger}; if (isnil _classname && {_x == _type} count _types > 0 && _inArea) then { //--- Create logic _logic = (group _logicFnc) createunit [_typeLogic,_position,[],0,"none"]; _logics = _logics + [_logic]; _result = _result + [_logic]; _name = gettext(_current >> "name"); if (_name == "") then {_name = _classname}; _neighbors = getarray(_current >> "neighbors"); _demography = getarray(_current >> "demography"); //--- Set name call compile format ["%1 = _logic; publicvariable '%1';",_classname]; _logic setvariable ["name",_name,true]; _logic setvariable ["class",configname _current,true]; _logic setvariable ["type",_type,true]; if (!isnil "_demography") then {_logic setvariable ["demography",_demography,true]}; //--- Save neighbors if (count _neighbors > 0) then { [_logic,_neighbors,_debug] spawn _setNeigbors; } else {_logic setvariable ["neighbors",[],true];}; //--- Debug - draw marker if (_debug) then { _marker = createmarker [_classname,_position]; _marker setmarkertype "mil_dot"; _marker setmarkercolor "colorblack"; if (typename _this == typename "") then {_marker setmarkertext _name}; _marker setmarkeralpha 0.5; }; } else { if (!isnil _classname && {_x == _type} count _types > 0 && _position distance _center < _maxdis) then { _logic = objnull; call compile format ["_logic = %1",_classname]; if !(isnull _logic) then {_result = _result + [_logic]}; }; }; }; } else { //--- Create custom created locations if (typename (_types select 0) == typename locationnull) then { { _location = _x; _position = position _location; _classname = "BIS_loc_" + name _location; _name = name _location; //_class = _classname; _type = type _location; _typeLogic = gettext (configFile >> "cfgLocationTypes" >> _type >> "logicClass"); if (_typeLogic == "") then {_typeLogic = "LocationLogic"}; if (_classname == "BIS_loc_") then { _n = 0; while {!isnil format ["BIS_loc_custom_%1",_n]} do { _n = _n + 1; }; _classname = format ["BIS_loc_custom_%1",_n]; }; if (_name == "") then {_name = _classname}; //--- Create logic _logic = (group _logicFnc) createunit [_typeLogic,_position,[],0,"none"]; _logics = _logics + [_logic]; _result = _result + [_logic]; //--- Set name call compile format ["%1 = _logic; publicvariable '%1';",_classname]; _logic setvariable ["name",_name,true]; _logic setvariable ["class",_classname,true]; _logic setvariable ["neighbors",[]]; //--- Debug - draw marker if (_debug) then { _marker = createmarker [_classname,_position]; _marker setmarkertype "mil_dot"; _marker setmarkercolor "colorblack"; _marker setmarkertext _name; }; } foreach _types; } else { //--- Register already existing logic if (typename (_types select 0) == typename objnull) then { { _logic = _x; _classname = _logic getvariable "class"; _name = _logic getvariable "name"; if (isnil "_classname") then { _n = 0; while {!isnil format ["BIS_loc_custom_%1",_n]} do { _n = _n + 1; }; _classname = format ["BIS_loc_custom_%1",_n]; _name = _logic getvariable "name"; if (isnil "_name") then {_name = _classname}; _logic setvariable ["name",_name,true]; _logic setvariable ["class",_classname,true]; //--- Register logic (EP1) _logics = _logics + [_logic]; _result = _result + [_logic]; //--- Set name call compile format ["%1 = _logic; publicvariable '%1';",_classname]; //--- Debug - draw marker if (_debug) then { _marker = createmarker [_name,position _logic]; _marker setmarkertype "mil_dot"; _marker setmarkercolor "colorblack"; _marker setmarkertext _name; }; } else {textLogFormat ["Log: [Functions/location] Object %1 is already registred, only neighbors were set.",_logic]}; //--- Save neighbors _neighbors = _logic getvariable "neighbors"; if !(isnil "_neighbors") then { [_logic,_neighbors,_debug] spawn _setNeigbors; } else {_logic setvariable ["neighbors",synchronizedobjects _logic]}; //--- EP - synchronized objects } foreach _types; }; }; }; [_logicFnc,"locations",_logics,true] call bis_fnc_variablespaceadd; _logicFnc setvariable ["BIS_fnc_locations_pending",nil]; }; ////////////////////////////////////////////////////////////////////////////////////////////////////////// /// Set rarity value ////////////////////////////////////////////////////////////////////////////////////////////////////////// case "OBJECT": { _logic = _types; _mode = _area select 0; _maxvalue = if (count _area > 1) then {_area select 1} else {100}; _result = -1; _classname = _logic getvariable "class"; //--- Exit if (typename _mode != typename "") exitwith {debuglog "Log: [Functions/location] Mode (1) must be of type String!"}; if (_maxvalue == 0) exitwith {debuglog "Log: [Functions/location] Maxvalue (1/1) must not be 0!"}; switch (_mode) do { case "RARITY": { _pos = position _logic; //waituntil {_pos nearObjectsReady 500}; _houselist = _pos nearobjects ["House",500]; _houselistnew = []; //--- Remove small objects and objects on blacklist { if ((_x selectionposition "AIdoor1") distance [0,0,0] != 0) then { _houselistnew = _houselistnew + [_x]; }; } foreach _houselist; _housecount = count _houselistnew; _rarityurban = _housecount / _maxvalue; if (_rarityurban > 1) then {_rarityurban = 1}; if (_rarityurban < 0) then {_rarityurban = 0}; _result = _rarityurban; _logic setvariable ["rarityurban",_rarityurban,true]; if (_debug) then { _classname setmarkertext str _rarityurban; }; }; }; }; }; _result;/*%FSM*/ /*%FSM*/ /* item0[] = {"Start",0,250,-20.000000,-160.000000,70.000000,-110.000000,0.000000,"Start"}; item1[] = {"Check_queue",2,250,-20.000000,-10.000000,70.000000,40.000000,0.000000,"Check queue"}; item2[] = {"Empty",4,218,-87.128693,82.178215,2.871286,132.178223,1.000000,"Empty"}; item3[] = {"Not_empty",4,218,43.564377,82.178215,133.564362,132.178223,0.000000,"Not empty"}; item4[] = {"Delay",2,250,-210.000000,80.000000,-120.000000,130.000000,0.000000,"Delay"}; item5[] = {"Delay_over___10s",4,4314,-220.000000,-20.000000,-110.000000,40.000000,0.000000,"Delay over " \n "(10s)"}; item6[] = {"___process_queue",2,250,40.000000,200.000000,150.000000,250.000000,0.000000,"* process_queue *"}; item7[] = {"Always",8,218,-210.000000,200.000000,-120.000000,250.000000,0.000000,"Always"}; item8[] = {"Always",8,218,-20.000000,-90.000000,70.000000,-40.000000,0.000000,"Always"}; link0[] = {0,8}; link1[] = {1,2}; link2[] = {1,3}; link3[] = {2,4}; link4[] = {3,6}; link5[] = {4,5}; link6[] = {5,1}; link7[] = {6,7}; link8[] = {7,4}; link9[] = {8,1}; globals[] = {10.000000,1,0,1,16777215,640,480,1,10,6316128,1,-359.369995,359.369965,308.294342,-310.134918,781,858,1}; window[] = {2,-1,-1,-1,-1,812,176,1040,232,3,799}; *//*%FSM*/ class FSM { fsmName = "Garbage Collector"; class States { /*%FSM*/ class Start { name = "Start"; init = /*%FSM*/"//TODO:" \n "debugLog ""Log: [GC] Starting Garbage Collector..."";" \n "" \n "private [""_collector"", ""_timeNow"", ""_handle"", ""_path"", ""_autotime""];" \n "_collector = _this;" \n "_path = ""ca\modules\garbage_collector\data\"";" \n "_autotime = 0;" \n "" \n "//Initialize the queue." \n "private [""_queue""];" \n "_collector setVariable [""queue"", []];" \n "" \n "//Compile the function that allows trashing of content." \n "BIS_GC_trashItFunc = compile (preprocessFileLineNumbers (_path + ""scripts\trashIt.sqf""));"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class Always { priority = 0.000000; to="Check_queue"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"true"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class Check_queue { name = "Check_queue"; init = /*%FSM*/"_queue = _collector getVariable ""queue"";" \n "" \n "if (_collector getVariable [""auto"", false] && time > _autotime) then {" \n " {" \n " if (!alive _x) then {" \n " [_x] call BIS_GC_trashItFunc;" \n " };" \n " } forEach nearestObjects [getArray (configFile >> ""CfgWorlds"" >> worldName >> ""centerPosition""), [""Man"",""Car"",""Tank"",""Air""], 100000];" \n "" \n " {" \n " if (_x == grpNull) then {" \n " [_x] call BIS_GC_trashItFunc;" \n " };" \n " } foreach allGroups;" \n "" \n " _autotime = time + 300;" \n "};"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class Empty { priority = 1.000000; to="Delay"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"(count _queue) == 0"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class Not_empty { priority = 0.000000; to="___process_queue"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"true"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class Delay { name = "Delay"; init = /*%FSM*/"_timeNow = time;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class Delay_over___10s { priority = 0.000000; to="Check_queue"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"(time - _timeNow) >= 10"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class ___process_queue { name = "___process_queue"; init = /*%FSM*/"_handle = execVM (_path + ""scripts\process_queue.sqf"");"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class Always { priority = 0.000000; to="Delay"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"true"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ }; initState="Start"; finalStates[] = { }; }; /*%FSM*/scriptName "garbage_collector\data\scripts\process_queue.sqf"; /* File: process_queue.sqf Related: garbagecollector.fsm Author: Joris-Jan van 't Land Description: Process the garbage queue for the Garbage Collector FSM. */ private ["_queue"]; //--- Execute Functions if (isnil "bis_fnc_init") then { (group BIS_GC) createunit ["FunctionsManager",position player,[],0,"none"]; }; waituntil {!isnil "BIS_fnc_init"}; _queue = BIS_GC getVariable "queue"; for "_i" from 0 to ((count _queue) - 1) do { private ["_entry", "_time"]; _entry = _queue select _i; _time = _entry select 1; //Check the object was in the queue for at least the assigned time (expiry date). if (_time <= time) then { private ["_object"]; _object = _entry select 0; switch (typeName _object) do { case (typeName objNull): { //Player and his squadmates cannot be too close. //ToDo: use 'cameraOn' as well? if (({(_x distance _object) <= 500} count ([] call BIS_fnc_listPlayers)) == 0) then { deleteVehicle _object; _queue set [_i, -1]; }; }; case (typeName grpNull): { //Make sure the group is empty. if (({alive _x} count (units _object)) == 0) then { deleteGroup _object; _queue set [_i, -1]; }; }; default {}; }; }; }; _queue = _queue - [-1]; BIS_GC setVariable ["queue", _queue]; truescriptName "Silvie\data\scripts\main.sqf"; /* File: main.sqf Author: Karel Moricky Description: Init script - System for Including Land Vehicles Into Environment Parameter(s): _this: the Zora logic unit which triggered this script. */ private ["_logicFnc","_twnlist","_locationParams","_create","_twnlistTemp","_i","_rarityNumber","_rarity","_classlist","_vehicleclass","_actual","_fsm","_logic","_defaultBlacklist","_debug","_vehicleCountFormula","_roaddis","_attemptsTotal","_blacklist","_vehiclerarity","_vehicleinit","_totobj"]; _logic = _this select 0; //--- Is Garbage collector running? if (isnil "BIS_GC_trashItFunc") then {(group _logic) createUnit ["GarbageCollector", position _logic, [], 0, "NONE"]}; //--- Execute Functions if (isnil "bis_fnc_init") then { _logicFnc = (group _logic) createunit ["FunctionsManager",position player,[],0,"none"]; }; waituntil {!isnil "BIS_fnc_init"}; _logic setvariable ["id",0]; _logic setvariable ["currentTown",""]; _logic setvariable ["carlist",[]]; _defaultBlacklist = [ "Land_sloup_vn_dratZ", "Land_sloup_vn", "Land_Farm_WTower", "land_nav_pier_c", "land_nav_pier_c2", "land_nav_pier_c2_end", "land_nav_pier_c_270", "land_nav_pier_c_90", "land_nav_pier_c_big", "land_nav_pier_C_L", "land_nav_pier_C_L10", "land_nav_pier_C_L30", "land_nav_pier_C_R", "land_nav_pier_C_R10", "land_nav_pier_C_R30", "land_nav_pier_c_t15", "land_nav_pier_c_t20", "land_nav_pier_F_17", "land_nav_pier_F_23", "land_nav_pier_m", "land_nav_pier_m_1", "land_nav_pier_m_end", "land_nav_pier_M_fuel", "land_nav_pier_pneu", "land_nav_pier_uvaz", "WarfareBDepot", "WarfareBAirport", "USMC_WarfareBBarracks", "RU_WarfareBBarracks", "CDF_WarfareBBarracks", "Ins_WarfareBBarracks", "Gue_WarfareBBarracks", "USMC_WarfareBLightFactory", "RU_WarfareBLightFactory", "CDF_WarfareBLightFactory", "Ins_WarfareBLightFactory", "Gue_WarfareBLightFactory", "USMC_WarfareBHeavyFactory", "RU_WarfareBHeavyFactory", "CDF_WarfareBHeavyFactory", "Ins_WarfareBHeavyFactory", "Gue_WarfareBHeavyFactory", "USMC_WarfareBAircraftFactory", "RU_WarfareBAircraftFactory", "CDF_WarfareBAircraftFactory", "WarfareBAircraftFactory_CDF", "INS_WarfareBAircraftFactory", "WarfareBAircraftFactory_Ins", "GUE_WarfareBAircraftFactory", "WarfareBAircraftFactory_Gue", "USMC_WarfareBAntiAirRadar", "RU_WarfareBAntiAirRadar", "CDF_WarfareBAntiAirRadar", "INS_WarfareBAntiAirRadar", "GUE_WarfareBAntiAirRadar", "USMC_WarfareBArtilleryRadar", "RU_WarfareBArtilleryRadar", "CDF_WarfareBArtilleryRadar", "Ins_WarfareBArtilleryRadar", "Gue_WarfareBArtilleryRadar", "USMC_WarfareBUAVterminal", "RU_WarfareBUAVterminal", "CDF_WarfareBUAVterminal", "INS_WarfareBUAVterminal", "GUE_WarfareBUAVterminal", "USMC_WarfareBVehicleServicePoint", "RU_WarfareBVehicleServicePoint", "CDF_WarfareBVehicleServicePoint", "INS_WarfareBVehicleServicePoint", "GUE_WarfareBVehicleServicePoint", "Base_WarfareBBarrier5x", "Base_WarfareBBarrier10x", "Base_WarfareBBarrier10xTall", "BRDM2_HQ_Gue_unfolded", "BTR90_HQ_unfolded", "LAV25_HQ_unfolded", "BMP2_HQ_INS_unfolded", "BMP2_HQ_CDF_unfolded" ]; //--- Get custom params --------------------------- //--- Debug _debug = if (format ["%1",_logic getvariable "debug"] == "") then {false} else {true}; /* //--- Town list _twnlist = []; if (format ["%1",_logic getvariable "townlist"] == "") then { _twnlist = nearestLocations [position _logic, ["CityCenter"], 20000]; _logic setvariable ["townlist",_twnlist]; } else { _twnlist = _logic getvariable "townlist"; }; */ //--- Town list _twnlist = []; if (isnil {_logic getvariable "townlist"}) then { _locationParams = if (_debug) then {[["CityCenter"],[],true]} else {[["CityCenter"]]}; _create = _locationParams call bis_fnc_locations; waituntil {count _create > 0}; { if ((_x getvariable "type") == "CityCenter") then {_twnlist = _twnlist + [_x]}; } foreach (bis_functions_mainscope getvariable "locations"); _logic setvariable ["townlist",_twnlist,true]; } else { _twnlistTemp = _logic getvariable "townlist"; { //--- Array if (typename _x == "ARRAY") then { _locationParams = if (_debug) then {[["CityCenter"],_x,true]} else {[["CityCenter"],_x]}; _create = _locationParams call bis_fnc_locations; {if !(_x in _twnlist) then {_twnlist = _twnlist + [_x]}} foreach _create; } else { if (typename _x == "OBJECT") then { if (typeof _x != "EmptyDetector") then { //--- City logic if (isnil {_x getvariable "class"}) then {[[_x]] call bis_fnc_locations}; _twnlist = _twnlist + [_x]; } else { //--- Trigger _locationParams = if (_debug) then {[["CityCenter"],_x,true]} else {[["CityCenter"],_x]}; _create = _locationParams call bis_fnc_locations; {if !(_x in _twnlist) then {_twnlist = _twnlist + [_x]}} foreach _create; }; }; }; } foreach _twnlistTemp; }; //---Vehicle count _vehicleCountFormula = if (isnil {_logic getvariable "vehicleCount"}) then {"round ((sqrt %1) * 1.5)"} else {_logic getvariable "vehicleCount";}; _logic setvariable ["vehicleCount",_vehicleCountFormula]; //--- Road distance _roaddis = if (isnil {_logic getvariable "roadDistance"}) then {20} else {_logic getvariable "roadDistance";}; _logic setvariable ["roadDistance",_roaddis]; //--- Attempts to create car _attemptsTotal = if (isnil {_logic getvariable "attempts"}) then {10} else {_logic getvariable "attempts";}; _logic setvariable ["attempts",_attemptsTotal]; //--- Object blacklist _blacklist = if (isnil {_logic getvariable "blacklist"}) then {_defaultBlacklist} else {_logic getvariable "blacklist";}; _logic setvariable ["blacklist",_blacklist]; //--- Vehicle blacklist _vehiclerarity = if (isnil {_logic getvariable "vehicleRarity"}) then {[]} else {_logic getvariable "vehicleRarity";}; _logic setvariable ["vehicleRarity",_vehiclerarity]; //--- Vehicle init _vehicleinit = if (isnil {_logic getvariable "vehicleinit"}) then {{}} else {_logic getvariable "vehicleinit";}; _logic setvariable ["vehicleInit",_vehicleInit]; //--- Get vehicle classes _classlist = []; _totobj = count (configfile >> "cfgVehicles"); for [{_i = 0}, {_i < _totobj}, {_i = _i + 1}] do { _actual = (configfile >> "cfgVehicles") select _i; if (isclass _actual) then { private ["_class","_scope","_side"]; _class = configname _actual; _vehicleclass = gettext (configfile >> "cfgvehicles" >> _class >> "vehicleClass"); if !(_vehicleclass in ["Sounds","Mines"]) then { _scope = getnumber (_actual >> "scope"); _side = getnumber (_actual >> "side"); if (_class iskindof "LandVehicle" && _scope == 2 && _side == 3) then { _rarity = if (_class in _vehiclerarity) then { _vehiclerarity select ((_vehiclerarity find _class)+1); } else { _rarityNumber = getnumber (_actual >> "rarityUrban"); //--- Exclude if rarity number is not defined if (str _rarityNumber == "") then {-1} else {_rarityNumber}; }; _classlist = _classlist + [[_class,_rarity]]; }; }; }; }; //--- EXECUTE --------------------------- { _fsm = [_x,_classlist] execFSM "ca\modules\silvie\data\fsms\silvie.fsm"; //if (_twnlist find _x == 0) then {diag_debugfsm _fsm}; } foreach _twnlist; //[_logic] join grpnull;/*%FSM*/ /*%FSM*/ /* item0[] = {"COMBAT_HIDE_OUTS",0,250,-25.000000,-200.000000,75.000000,-150.000000,0.000000,"COMBAT" \n "HIDE OUTSIDE"}; item1[] = {"Combat_end",4,218,-25.000000,-100.000000,75.000000,-50.000000,0.000000,"Combat end"}; item2[] = {"End",1,4346,-25.000000,0.000000,75.000000,50.000000,0.000000,"End"}; link0[] = {0,1}; link1[] = {1,2}; globals[] = {25.000000,1,0,0,16777215,640,480,1,3,6316128,1,-202.103897,368.489807,427.600128,-409.208588,613,872,1}; window[] = {2,-1,-1,-1,-1,818,88,1348,88,3,630}; *//*%FSM*/ class FSM { fsmName = "ALICE Action - Hide Out"; class States { /*%FSM*/ class COMBAT_HIDE_OUTS { name = "COMBAT_HIDE_OUTS"; init = /*%FSM*/"/////////////////////////////////////////////////////////////////////////////////////////////" \n "// HIDE INSIDE" \n "// Unit will hide in home" \n "/////////////////////////////////////////////////////////////////////////////////////////////" \n "" \n "_unit = _this select 0;" \n "_twn = _unit getvariable ""ALICE_twn"";" \n "_unit setbehaviour ""stealth"";" \n "_unit setspeedmode ""full"";" \n "_unit forcewalk false;" \n "" \n "_home = _unit getvariable ""ALICE_home"";" \n "if (!isnull _home) then {" \n " _unit domove position _home;" \n "} else {" \n " _unit domove [" \n " (position _twn select 0) + (-50 + random 100)," \n " (position _twn select 1) + (-50 + random 100)," \n " 0" \n " ];" \n "};" \n "" \n "" \n "_marker = """";" \n "if (bis_alice_mainscope getvariable ""debug"") then {" \n " _marker = _unit getvariable ""ALICE_marker"";" \n " _marker setmarkertype ""mil_unknown"";" \n "};"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class Combat_end { priority = 0.000000; to="End"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"if (isnil ""_twn"") then {_twn = objnull};" \n "_twn getvariable ""ALICE_threat"" == 0 || (_unit getvariable ""ALICE_action"") == """"" \n ""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class End { name = "End"; init = /*%FSM*/"_unit forcewalk true;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { }; }; /*%FSM*/ }; initState="COMBAT_HIDE_OUTS"; finalStates[] = { "End", }; }; /*%FSM*//*%FSM*/ /*%FSM*/ /* item0[] = {"SAFE___WALK",0,250,-425.000000,-300.000000,-325.000000,-250.000000,0.000000,"SAFE - WALK"}; item1[] = {"Ready",4,218,25.000000,-150.000000,125.000000,-100.000000,2.000000,"Ready"}; item2[] = {"End",1,250,25.000000,-300.000000,125.000000,-250.000000,0.000000,"End"}; item3[] = {"Delay",4,218,-300.000000,75.000000,-200.000000,125.000000,0.000000,"Delay"}; item4[] = {"Loop",2,250,-300.000000,-150.000000,-200.000000,-100.000000,0.000000,"Loop"}; item5[] = {"Talk",4,218,-75.000000,0.000000,25.000000,50.000000,1.000000,"Talk"}; item6[] = {"Talk",2,250,150.000000,225.000000,250.000000,275.000000,0.000000,"Talk"}; item7[] = {"Come_here",2,250,25.000000,75.000000,125.000000,125.000000,0.000000,"Come here"}; item8[] = {"Near_enough",4,218,25.000000,150.000000,125.000000,200.000000,0.000000,"Near enough"}; item9[] = {"Expired",4,218,-75.000000,225.000000,25.000000,275.000000,1.000000,"Expired"}; item10[] = {"Conversation_End",2,250,-300.000000,225.000000,-200.000000,275.000000,0.000000,"Conversation" \n "End"}; item11[] = {"Delay",4,4314,-75.000000,-75.000000,25.000000,-25.000000,0.000000,"Delay"}; item12[] = {"Check",2,250,-200.000000,0.000000,-100.000000,50.000000,0.000000,"Check"}; item13[] = {"Return",8,218,-200.000000,-75.000000,-100.000000,-25.000000,0.000000,"Return"}; link0[] = {0,1}; link1[] = {0,3}; link2[] = {1,2}; link3[] = {3,4}; link4[] = {4,1}; link5[] = {4,11}; link6[] = {5,7}; link7[] = {6,1}; link8[] = {6,3}; link9[] = {6,9}; link10[] = {7,1}; link11[] = {7,3}; link12[] = {7,8}; link13[] = {8,6}; link14[] = {9,10}; link15[] = {10,3}; link16[] = {11,12}; link17[] = {12,5}; link18[] = {12,13}; link19[] = {13,4}; globals[] = {25.000000,1,0,0,16777215,640,480,1,16,6316128,1,-519.024048,408.892853,565.994263,-538.902954,755,899,1}; window[] = {2,-1,-1,-1,-1,778,-1232,28,48,3,772}; *//*%FSM*/ class FSM { fsmName = "ALICE Action - Walk"; class States { /*%FSM*/ class SAFE___WALK { name = "SAFE___WALK"; itemno = 0; init = /*%FSM*/"/////////////////////////////////////////////////////////////////////////////////////////////" \n "// WALK" \n "// Unit will travel to random position in town" \n "/////////////////////////////////////////////////////////////////////////////////////////////" \n "" \n "_logic = bis_alice_mainscope;" \n "_unit = _this select 0;" \n "_twn = _this select 1;" \n "_neighbours = (_twn getvariable ""ALICE_population"") - [_unit];" \n "_neighboursUsed = [];" \n "_debug = _logic getvariable ""debug"";" \n "//_isWoman = _unit iskindof ""Woman_EP1"";" \n "" \n "_destination = if (count _neighbours > 0 && (random 1 > 0.5)) then {" \n " _neighbours call BIS_fnc_selectRandom;" \n "} else {" \n " _twnSize = _twn getvariable ""ALICE_townsize"";" \n " _houses = (position _twn) nearobjects [""House"",_twnSize];" \n " _houses call BIS_fnc_selectRandom;" \n "};" \n "_unit setspeedmode ""limited"";" \n "_unit domove position _destination;" \n "" \n "_unit setbehaviour ""safe"";" \n "_unit forcewalk true;" \n "" \n "_delay = 5;" \n "_delayConversation = 120;" \n "_timeNow = time;" \n "_timeConversation = time - _delayConversation;" \n "" \n "_marker = """";" \n "if (bis_alice_mainscope getvariable ""debug"") then {" \n " _marker = _unit getvariable ""ALICE_marker"";" \n " if(!isNil ""_marker"") then {" \n " _marker setmarkertype ""mil_end"";" \n " };" \n "};"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class Ready { itemno = 1; priority = 2.000000; to="End"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"(unitready _unit && isnil ""_neighbour"") || " \n "(_unit getvariable ""ALICE_action"") == """" "/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class Delay { itemno = 3; priority = 0.000000; to="Loop"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"(time - _timeNow) >= _delay"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class End { name = "End"; itemno = 2; init = /*%FSM*/"if ((bis_alice_mainscope getvariable ""debug"") && (_unit getvariable ""ALICE_action"") == """" ) then {" \n " debuglog str [""Log::::::TERMINATED"",_unit getvariable ""ALICE_id""];" \n "};"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { }; }; /*%FSM*/ /*%FSM*/ class Loop { name = "Loop"; itemno = 4; init = /*%FSM*/"_delay = 5;" \n "_timeNow = time;" \n "" \n "/*" \n "_neigbourCandidates = [];" \n "{" \n " //_isNeighbourWoman = _x iskindof ""Woman_EP1"";" \n " if (_x distance _unit < 15 && faction _unit == faction _x) then {" \n " _actionLocked = _x getvariable ""ALICE_action_locked"";" \n " if !(isnil ""_actionLocked"") then {" \n " if (_actionLocked == 0) then {" \n " _neigbourCandidates = _neigbourCandidates + [_x];" \n " };" \n " };" \n " };" \n "} foreach _neighbours;" \n "*/" \n "" \n "//--- Reset" \n "if !(isnil ""_neighbour"") then {" \n " _neighbour setvariable [""ALICE_action_fsm"",-1,true];" \n " _neighbour = nil;" \n " _unit setspeedmode ""limited"";" \n " _unit domove position _destination;" \n "" \n " if (bis_alice_mainscope getvariable ""debug"") then {" \n " _marker = _unit getvariable ""ALICE_marker"";" \n " if(!isNil ""_marker"") then {" \n " _marker setmarkertype ""mil_end"";" \n " };" \n " };" \n "};"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class Ready { itemno = 1; priority = 2.000000; to="End"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"(unitready _unit && isnil ""_neighbour"") || " \n "(_unit getvariable ""ALICE_action"") == """" "/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class Delay { itemno = 11; priority = 0.000000; to="Check"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"(time - _timeNow) > 5 && (time - _timeConversation) > _delayConversation"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class Talk { name = "Talk"; itemno = 6; init = /*%FSM*/"_unit setspeedmode ""limited"";" \n "_unit domove position _unit;" \n "_neighbour domove position _neighbour;" \n "" \n "//--- Speak" \n "_conversations = _logic getvariable ""ALICE_conversations"";" \n "//_ran = floor random (count _conversations);" \n "_ran = 0;" \n "_typeList = _conversations select _ran;" \n "" \n "_sentenceList = _typeList call bis_fnc_selectrandom;" \n "_topic = ""ALICE_"" + (_sentencelist select 0);" \n "_sentenceId = _sentencelist select 1;" \n "_endSentences = _sentencelist select 2;" \n "" \n "_unit kbtell [_neighbour,_topic,_sentenceId];" \n "" \n "if (_debug) then {" \n " debuglog str [""Log:::::::START"",_unit getvariable ""ALICE_id"",[_neighbour,_topic,_sentenceId]];" \n "};" \n "" \n "" \n "_delay = 60; //--- Emergency exit" \n "_timeNow = time;" \n "" \n "//player setpos position _unit;" \n "//setacctime 1;" \n "" \n "//--- TODO: Not same anims" \n "_moves = _unit getvariable ""ALICE_moves"";" \n "_movesList = getarray (configfile >> _moves >> ""ALICE_anims"" >> (_sentencelist select 0) >> format [""moves%1"",_ran]);" \n "_move = _movesList call bis_fnc_selectrandom;" \n "_unit playmove _move;" \n "" \n "/*" \n "_moves = _neighbour getvariable ""ALICE_moves"";" \n "_movesList = getarray (configfile >> _moves >> ""ALICE_anims"" >> (_sentencelist select 0) >> format [""moves%1"",_ran]);" \n "_move = _movesList call bis_fnc_selectrandom;" \n "_neighbour playmove _move;" \n "*/" \n "" \n "_timeNow = time;" \n "" \n "" \n "if (bis_alice_mainscope getvariable ""debug"") then {" \n " _marker = _unit getvariable ""ALICE_marker"";" \n " _marker setmarkertype ""mil_join"";" \n " _marker setmarkercolor ""colorpink"";" \n " _marker2 = _neighbour getvariable ""ALICE_marker"";" \n " _marker2 setmarkertype ""mil_join"";" \n " _marker2 setmarkercolor ""colorpink"";" \n "};"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class Ready { itemno = 1; priority = 2.000000; to="End"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"(unitready _unit && isnil ""_neighbour"") || " \n "(_unit getvariable ""ALICE_action"") == """" "/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class Expired { itemno = 9; priority = 1.000000; to="Conversation_End"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"{" \n " _unit kbwassaid [_neighbour,_topic,_x,1]" \n " || " \n " _neighbour kbwassaid [_unit,_topic,_x,1]" \n "} count _endSentences > 0;"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class Delay { itemno = 3; priority = 0.000000; to="Loop"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"(time - _timeNow) >= _delay"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class Come_here { name = "Come_here"; itemno = 7; init = /*%FSM*/"_neighbour = _neigbourCandidates select 0;" \n "_neighboursUsed = _neighboursUsed + [_neighbour];" \n "" \n "//--- Copy params" \n "_neighbour setvariable [""ALICE_action"","""",true];" \n "_neighbour setvariable [""ALICE_action_fsm"",_unit getvariable ""ALICE_action_fsm"",true];" \n "_neighbour setvariable [""ALICE_action_locked"",1,true];" \n "//_neighbour setvariable [""ALICE_action_locked"",_unit getvariable ""ALICE_action_locked"",true];" \n "" \n "_unit setvariable [""ALICE_action_locked"",1,true];" \n "" \n "_unit setspeedmode ""limited"";" \n "_unit domove position _unit;" \n "_unit dowatch _neighbour;" \n "_unit domove position _neighbour;" \n "_neighbour dowatch _unit;" \n "" \n "_randis = 2 + random 2;" \n "_delay = 60;" \n "_timeNow = time;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class Ready { itemno = 1; priority = 2.000000; to="End"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"(unitready _unit && isnil ""_neighbour"") || " \n "(_unit getvariable ""ALICE_action"") == """" "/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class Near_enough { itemno = 8; priority = 0.000000; to="Talk"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"_unit distance _neighbour < _ranDis"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class Delay { itemno = 3; priority = 0.000000; to="Loop"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"(time - _timeNow) >= _delay"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class Conversation_End { name = "Conversation_End"; itemno = 10; init = /*%FSM*/"_delay = 0;" \n "_timeNow = time;" \n "_timeConversation = time;" \n "" \n "_neighbour setvariable [""ALICE_action"","""",true];" \n "" \n "if (_debug) then {" \n " debuglog str [""Log:::::::END"",_unit getvariable ""ALICE_id"",[_neighbour,_topic,_sentenceId]];" \n "};"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class Delay { itemno = 3; priority = 0.000000; to="Loop"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"(time - _timeNow) >= _delay"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class Check { name = "Check"; itemno = 12; init = /*%FSM*/"_neighbours = (_twn getvariable ""ALICE_population"") - [_unit] - _neighboursUsed;" \n "_neigbourCandidates = [];" \n "{" \n " if (_x distance _unit < 15) then {" \n " if (faction _unit == faction _x) then {" \n " _actionLocked = _x getvariable ""ALICE_action_locked"";" \n " if !(isnil ""_actionLocked"") then {" \n " if (_actionLocked == 0) then {" \n " _neigbourCandidates = _neigbourCandidates + [_x];" \n " };" \n " };" \n " };" \n " };" \n "} foreach _neighbours;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class Talk { itemno = 5; priority = 1.000000; to="Come_here"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"count _neigbourCandidates > 0 && (time - _timeConversation) > _delayConversation"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class Return { itemno = 13; priority = 0.000000; to="Loop"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ }; initState="SAFE___WALK"; finalStates[] = { "End" }; }; /*%FSM*//*%FSM*/ /*%FSM*/ /* item0[] = {"ALICE_2",0,250,-75.000000,-275.000000,25.000000,-225.000000,0.000000,"ALICE 2"}; item1[] = {"Loop",2,250,-75.000000,-25.000000,25.000000,25.000000,0.000000,"Loop"}; item2[] = {"Wait",4,218,-75.000000,-175.000000,25.000000,-125.000000,0.000000,"Wait"}; item3[] = {"Reset",2,250,75.000000,-175.000000,175.000000,-125.000000,0.000000,"Reset"}; item4[] = {"Loop",4,218,-75.000000,75.000000,25.000000,125.000000,1.000000,"Loop"}; item5[] = {"Town",2,4346,75.000000,75.000000,175.000000,125.000000,0.000000,"Town"}; item6[] = {"True",8,218,75.000000,-25.000000,175.000000,25.000000,0.000000,"True"}; link0[] = {0,2}; link1[] = {1,2}; link2[] = {1,4}; link3[] = {2,3}; link4[] = {3,6}; link5[] = {4,5}; link6[] = {5,6}; link7[] = {6,1}; globals[] = {25.000000,1,0,0,16777215,640,480,1,8,6316128,1,-335.309540,341.370117,-29.107285,-475.985321,610,899,1}; window[] = {2,-1,-1,-1,-1,754,-1256,4,24,3,627}; *//*%FSM*/ class FSM { fsmName = "ALICE 2"; class States { /*%FSM*/ class ALICE_2 { name = "ALICE_2"; itemno = 0; init = /*%FSM*/"_logic = _this;" \n "_spawnDisMinMain = _logic getvariable ""spawnDistance"";" \n "//_spawnDisMaxMain = _spawnDisMin * 1.2;" \n "_trafficDisMinMain = _logic getvariable ""trafficDistance"";" \n "//_trafficDisMaxMain = _trafficDisMin * 1.2;" \n "_alltowns = _logic getvariable ""ALICE_alltowns"";" \n "_alltownsCount = count _alltowns;" \n "_debug = _logic getvariable ""debug"";" \n "" \n "_delay = 0;" \n "_timeNow = time;" \n "_debuglist = [];" \n "" \n "createcenter civilian;" \n "_logic setvariable [""id"",0,true];"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class Wait { itemno = 2; priority = 0.000000; to="Reset"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"(time - _timeNow) > _delay"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class Loop { name = "Loop"; itemno = 1; init = /*%FSM*/"_timeNow = time;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class Loop { itemno = 4; priority = 1.000000; to="Town"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"_n <_alltownsCount"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class Wait { itemno = 2; priority = 0.000000; to="Reset"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"(time - _timeNow) > _delay"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class Reset { name = "Reset"; itemno = 3; init = /*%FSM*/"_n = 0;" \n "_delay = 1;" \n "" \n ""/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class True { itemno = 6; priority = 0.000000; to="Loop"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class Town { name = "Town"; itemno = 5; init = /*%FSM*/"_town = _alltowns select _n;" \n "_name = _town getvariable ""name"";" \n "" \n "//--- Virgin - define variables for first time" \n "if (isnil {_town getvariable ""ALICE_active""}) then {" \n " _town setvariable [""ALICE_active"",false,true];" \n " _town setvariable [""ALICE_active_traffic"",0,true];" \n " _town setvariable [""ALICE_threat"",-1,true];" \n " _town setvariable [""ALICE_status"",""black"",true];" \n "};" \n "if (isnil {_town getvariable ""demography""} || count (_town getvariable ""demography"") == 0) then {" \n " _town setvariable [""demography"",_logic getvariable ""townsFaction"",true];" \n "};" \n "" \n "_active = _town getvariable ""ALICE_active"";" \n "_activeTraffic = _town getvariable ""ALICE_active_traffic"";" \n "" \n "////////////////////////////////////////////////////////////////////////////////////////////////" \n "//--- Spawn distance" \n "_spawnDisMin = if (isnil {_town getvariable ""ALICE_spawnDistance""}) then {_spawnDisMinMain} else {_town getvariable ""ALICE_spawnDistance""};" \n "_spawnDisMax = _spawnDisMin * 1.2;" \n "" \n "//--- Start " \n "if (!_active && {_town distance _x < _spawnDisMin} count ([] call BIS_fnc_listPlayers) > 0) then {" \n " _town setvariable [""ALICE_active"",true,true];" \n " textLogFormat [""Log: [ALICE 2]: %1 populated."",_name];" \n " _fsm = [_logic,_town] execfsm (BIS_Alice2_path + ""fsms\alice2_town.fsm"");" \n "};" \n "" \n "//--- End" \n "if (_active && {_town distance _x < _spawnDisMax} count ([] call BIS_fnc_listPlayers) == 0) then {" \n " _town setvariable [""ALICE_active"",false,true];" \n " textLogFormat [""Log: [ALICE 2]: %1 depopulated."",_name];" \n "};" \n "" \n "////////////////////////////////////////////////////////////////////////////////////////////////" \n "//--- Traffic distance" \n "_trafficDisMin = if (isnil {_town getvariable ""ALICE_trafficDistance""}) then {_trafficDisMinMain} else {_town getvariable ""ALICE_trafficDistance""};" \n "_trafficDisMax = _trafficDisMin * 1.2;" \n "" \n "//--- Start " \n "_maxtraffic = 3;" \n "if (_activeTraffic < _maxtraffic && {_town distance _x < _trafficDisMin} count ([] call BIS_fnc_listPlayers) > 0) then {" \n " _activeTraffic = _activeTraffic + 1;" \n " _town setvariable [""ALICE_active_traffic"",_activeTraffic,true];" \n " diag_log Format [""Log: [ALICE 2]: %1-%2 traffic start."",_name,_activeTraffic];" \n " textLogFormat [""Log: [ALICE 2]: %1-%2 traffic start."",_name,_activeTraffic];" \n " _fsmTraffic = [_logic,_town] execfsm (BIS_Alice2_path + ""fsms\alice2_traffic.fsm"");" \n "};" \n "" \n "//--- End" \n "if (_activeTraffic > 0 && {_town distance _x < _trafficDisMax} count ([] call BIS_fnc_listPlayers) == 0) then {" \n " _activeTraffic = _activeTraffic - 1;" \n " _town setvariable [""ALICE_active_traffic"",_activeTraffic,true];" \n " diag_log Format [""Log: [ALICE 2]: %1-%2 traffic end."",_name,_activeTraffic];" \n " textLogFormat [""Log: [ALICE 2]: %1-%2 traffic end."",_name,_activeTraffic];" \n "};" \n "////////////////////////////////////////////////////////////////////////////////////////////////" \n "" \n "_n = _n + 1;" \n "" \n "" \n "" \n "" \n "if (_debug) then {" \n " if (_town in _debuglist) exitwith {};" \n " _twnclass = _town getvariable ""class"";" \n "" \n " _markerx = createmarker [_twnclass+""_spawn"",position _town];" \n " _markerx setmarkersize [_spawnDisMin,_spawnDisMin];" \n " _markerx setmarkershape ""ellipse"";" \n " _markerx setmarkerbrush ""border"";" \n " _markerx setmarkercolor ""colorred"";" \n " _markerx setmarkeralpha 0.5;" \n "" \n " _markerx = createmarker [_twnclass+""_traffic"",position _town];" \n " _markerx setmarkersize [_trafficDisMin,_trafficDisMin];" \n " _markerx setmarkershape ""ellipse"";" \n " _markerx setmarkerbrush ""border"";" \n " _markerx setmarkercolor ""colorblue"";" \n " _markerx setmarkeralpha 0.5;" \n "" \n " _debuglist = _debuglist + [_town];" \n "};"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class True { itemno = 6; priority = 0.000000; to="Loop"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ }; initState="ALICE_2"; finalStates[] = { }; }; /*%FSM*//*%FSM*/ /*%FSM*/ /* item0[] = {"ALICE_2_TOWN",0,250,25.000000,-200.000000,125.000000,-150.000000,0.000000,"ALICE 2" \n "TOWN"}; item1[] = {"True",8,218,25.000000,25.000000,125.000000,75.000000,0.000000,"True"}; item2[] = {"Loop",2,250,125.000000,100.000000,225.000000,150.000000,0.000000,"Loop"}; item3[] = {"Loop",4,218,25.000000,175.000000,125.000000,225.000000,1.000000,"Loop"}; item4[] = {"Create",2,250,-75.000000,100.000000,25.000000,150.000000,0.000000,"Create"}; item5[] = {"Continue",8,218,500.000000,100.000000,600.000000,150.000000,0.000000,"Continue"}; item6[] = {"Loop_1",2,250,650.000000,-50.000000,750.000000,0.000000,0.000000,"Loop"}; item7[] = {"Terminate",4,218,650.000000,-200.000000,750.000000,-150.000000,1.000000,"Terminate"}; item8[] = {"Load_houses",4,218,25.000000,-125.000000,125.000000,-75.000000,0.000000,"Load houses"}; item9[] = {"Init",2,250,25.000000,-50.000000,125.000000,0.000000,0.000000,"Init"}; item10[] = {"END",1,250,175.000000,-200.000000,275.000000,-150.000000,0.000000,"END"}; item11[] = {"New_civilian",4,218,750.000000,-125.000000,850.000000,-75.000000,1.000000,"New civilian"}; item12[] = {"Action",2,4346,850.000000,-50.000000,950.000000,0.000000,0.000000,"Action"}; item13[] = {"Return",8,218,750.000000,25.000000,850.000000,75.000000,0.000000,"Return"}; item14[] = {"Reset",4,218,500.000000,-50.000000,600.000000,0.000000,0.000000,"Reset"}; item15[] = {"Define",2,250,650.000000,100.000000,750.000000,150.000000,0.000000,"Define"}; item16[] = {"Reset",2,250,500.000000,25.000000,600.000000,75.000000,0.000000,"Reset"}; item17[] = {"Continue",8,218,250.000000,100.000000,350.000000,150.000000,0.000000,"Continue"}; item18[] = {"Start",2,250,375.000000,100.000000,475.000000,150.000000,0.000000,"Start"}; item19[] = {"No_Houses",4,218,175.000000,-50.000000,275.000000,0.000000,1.000000,"No Houses"}; link0[] = {0,8}; link1[] = {1,2}; link2[] = {2,3}; link3[] = {2,17}; link4[] = {3,4}; link5[] = {4,1}; link6[] = {5,15}; link7[] = {6,7}; link8[] = {6,11}; link9[] = {6,14}; link10[] = {7,10}; link11[] = {8,9}; link12[] = {9,1}; link13[] = {9,19}; link14[] = {11,12}; link15[] = {12,13}; link16[] = {13,6}; link17[] = {14,16}; link18[] = {15,13}; link19[] = {16,5}; link20[] = {17,18}; link21[] = {18,5}; link22[] = {19,10}; globals[] = {25.000000,1,0,0,16777215,640,480,1,21,6316128,1,483.385681,1014.860107,535.224182,-367.455200,514,873,1}; window[] = {2,-1,-1,-1,-1,778,48,1308,48,3,531}; *//*%FSM*/ class FSM { fsmName = "ALICE2 - Town"; class States { /*%FSM*/ class ALICE_2_TOWN { name = "ALICE_2_TOWN"; itemno = 0; init = /*%FSM*/"_logic = _this select 0;" \n "_twn = _this select 1;" \n "" \n "_debug = _logic getvariable ""debug"";" \n "" \n "_twnpos = position _twn;" \n "_twntype = _twn getvariable ""type"";" \n "if (isnil ""_twntype"") then {_twntype = ""ERROR: Missing type""};" \n "_twnclass = _twn getvariable ""class"";" \n "if (isnil ""_twnclass"") then{_twnclass = ""ERROR: Missing class""};" \n "_twnname = _twn getvariable ""name"";" \n "if (isnil ""_twnname"") then {_twnname = ""ERROR: Missing name""};" \n "_twndemography = _twn getvariable ""demography"";" \n "if (isnil ""_twndemography"") then {" \n " _twndemography = getarray(configfile >> ""cfgworlds"" >> worldname >> ""names"" >> _twnclass >> ""demography"");" \n "};" \n "//--- Wrong value" \n "if (count _twndemography == 0) then {" \n " _twndemography = [""BIS_TK_CIV""]; //--- Default value" \n " _twn setvariable [""demography"",_twndemography,true];" \n "};" \n "if (!isnil {_twn getvariable ""demography""}) then {_twndemography = _twn getvariable ""demography""};" \n "" \n "//--- Default values" \n "//_twn setvariable [""ALICE_threat"",-1,true];" \n "//_twn setvariable [""ALICE_status"",""black"",true];" \n "" \n "_distLimit = _logic getvariable ""spawnDistance"";" \n "_civilianCount = _logic getvariable ""civilianCount"";" \n "_classlistAll = _logic getvariable ""ALICE_classes"";" \n "_civilianActionsAll = _logic getvariable ""ALICE_actions"";" \n "" \n "//--- Spawn distance" \n "_distlimit = if (isnil {_twn getvariable ""ALICE_spawnDistance""}) then {_distLimit} else {_twn getvariable ""ALICE_spawnDistance""};" \n "_twn setvariable [""ALICE_spawnDistance"",_distLimit,true];" \n "" \n "//--- Town size" \n "_twnSize = if (isnil {_twn getvariable ""ALICE_townsize""}) then {_distLimit * 2/3} else {_twn getvariable ""ALICE_townsize"";};" \n "_twn setvariable [""ALICE_townsize"",_twnSize,true];" \n "" \n "//--- Restecpa!" \n "_twnrespect = [""SET""] call BIS_fnc_respect;" \n "if (isnil {_twn getvariable ""respect""}) then {_twn setVariable [""respect"",_twnrespect,true]};" \n "" \n "//--- Get rarityUrban value" \n "_twnRarityUrban = _logic getvariable ""rarityurban"";" \n "if (isnil ""_twnRarityUrban"") then {_twnRarityUrban = [_twn,[""RARITY""]] call bis_fnc_locations};" \n "" \n "_grp = grpnull;" \n "if (isnil {_twn getvariable ""ALICE_group""}) then {" \n " _grp = creategroup civilian;" \n " _twn setvariable [""ALICE_group"",_grp,true];" \n "};" \n "" \n "_classlist = [];" \n "{ " \n " _faction = _x select 2;" \n " if (_faction in _twndemography) then {_classlist = _classlist + [_x]};" \n "} foreach _classlistAll;" \n "" \n "" \n "" \n "" \n "" \n "" \n "" \n "" \n "" \n "" \n "_marker = """";" \n "//--- Debug mode, halellujah" \n "if (_debug) then {" \n " _markerx = createmarker [_twnclass+""_size"",position _twn];" \n " _markerx setmarkersize [_twnSize,_twnSize];" \n " _markerx setmarkershape ""ellipse"";" \n " _markerx setmarkerbrush ""border"";" \n " _markerx setmarkercolor ""colorblack"";" \n " _markerx setmarkeralpha 0.5;" \n "" \n " _marker = createmarker [_twnclass+""_twn"",position _twn];" \n " _marker setmarkertypelocal ""flag1"";" \n " _marker setmarkersizelocal [1,1];" \n " _marker setmarkercolor ""colorwhite"";" \n " [_marker,_twn] spawn {" \n " _marker = _this select 0;" \n " _twn = _this select 1;" \n " while {true} do {" \n " _threat = _twn getvariable ""ALICE_threat"";" \n " _color = ""colorwhite"";" \n " if (_threat >= 0) then {_color = ""color"" + (_twn getvariable ""ALICE_status"")};" \n " _marker setmarkercolor _color;" \n " _marker setmarkertext format [""%1 (%2)"",_threat,count (_twn getvariable ""ALICE_population"")];" \n " sleep 1;" \n " };" \n " };" \n "};" \n ""/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class Load_houses { itemno = 8; priority = 0.000000; to="Init"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"_twnpos nearObjectsReady _twnSize;"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class Loop { name = "Loop"; itemno = 2; init = /*%FSM*/""/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class Loop { itemno = 3; priority = 1.000000; to="Create"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"_n < _populationcount;"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class Continue { itemno = 17; priority = 0.000000; to="Start"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class Create { name = "Create"; itemno = 4; init = /*%FSM*/"_n = _n + 1;" \n "" \n "_class = (_classlist call bis_fnc_selectrandom) select 0;" \n "_house = _houselist call bis_fnc_selectrandom;" \n "" \n "//debuglog [""Log:::::::::::::::::"",_classlist];" \n "" \n "[_class,_twn,_house] spawn BIS_ALICE2_fnc_civilianSet;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class True { itemno = 1; priority = 0.000000; to="Loop"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class Loop_1 { name = "Loop_1"; itemno = 6; init = /*%FSM*/"_timeNow = time;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class New_civilian { itemno = 11; priority = 1.000000; to="Action"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"_n < _populationcount;"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class Terminate { itemno = 7; priority = 1.000000; to="END"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"!(_twn getvariable ""ALICE_active"")"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class Reset { itemno = 14; priority = 0.000000; to="Reset"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"(time - _timeNow) > 1"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class Init { name = "Init"; itemno = 9; init = /*%FSM*/"_houselistRaw = _twnpos nearobjects [""House"",_twnSize];" \n "_houselist = [];" \n "{" \n " _bbox = abs((boundingbox _x select 1) select 0) min abs((boundingbox _x select 1) select 1);" \n " _point = _x selectionposition ""AIspawnpos_0"";" \n " if (_bbox > 3 && _point distance [0,0,0] > 0.1) then {" \n " _houselist = _houselist + [_x]" \n " } else {" \n " _doors = _x call BIS_ALICE_fnc_doorCreate;" \n " _houselist = _houselist + _doors" \n " };" \n "} foreach _houselistRaw;" \n "_housecount = count _houselist;" \n "" \n "_populationCount = call compile format [_civilianCount,_housecount]; //--- Total" \n "_twn setvariable [""ALICE_populationCountDef"",_populationCount,true];" \n "_twn setvariable [""ALICE_population"",[],true];" \n "" \n "" \n "//--- Pre-set neighbors" \n "_nearbyTownsAll = _twn getvariable ""neighbors"";" \n "" \n "//--- Find neighbors if no pre-sets are available" \n "if (count _nearbyTownsAll == 0) then {" \n " {" \n " if (_x distance _twn < 2500) then {_nearbyTownsAll = _nearbyTownsAll + [_x]};" \n " } foreach (bis_functions_mainscope getvariable ""locations"");" \n "};" \n "" \n "_nearbyTowns = [];" \n "{" \n " if !(isnil {_x getvariable ""ALICE_threat""}) then {_nearbyTowns = _nearbyTowns + [_x]};" \n "} foreach _nearbyTownsAll;" \n "" \n "_twn setvariable [""ALICE_nearbyTowns"",_nearbyTowns,true];" \n "" \n "" \n "_n = 0;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class No_Houses { itemno = 19; priority = 1.000000; to="END"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"count _houselist == 0;"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class True { itemno = 1; priority = 0.000000; to="Loop"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class END { name = "END"; itemno = 10; init = /*%FSM*/"_population = _twn getvariable ""alice_population"";" \n "" \n "{" \n " deletevehicle _x;" \n "} foreach _population;" \n "" \n "if (count _houselist == 0) then {" \n " debuglog [""Log: ALICE 2: [ERROR] No houses in %1!"",_twnclass];" \n "};"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { }; }; /*%FSM*/ /*%FSM*/ class Action { name = "Action"; itemno = 12; init = /*%FSM*/"_unit = _population select _n;" \n "_action = _unit getvariable ""ALICE_action"";" \n "_fsm = _unit getvariable ""ALICE_action_fsm"";" \n "" \n "if (alive _unit) then {_populationAfter = _populationAfter + [_unit]} else {" \n " _action = """";" \n " _fsm = -1;" \n " _unit setvariable [""ALICE_action"","""",true];" \n "};" \n "" \n "if (_twnstatuschanged) then {_action = """"};" \n "if (isnil ""_action"") then {hintc str [""A"",_unit,_action,_fsm];_action = """"};" \n "if (isnil ""_fsm"") then {hintc str [""B"",_unit,_action,_fsm];_fsm = -1};" \n "" \n "if ((_action == """" || completedFSM _fsm) && alive _unit && !isnull _unit) then {" \n "" \n " //--- Homeless" \n " _home = _unit getvariable ""ALICE_home"";" \n " if (!alive _home) then {" \n " _houselistNew = [];" \n " {" \n " if (alive _x) then {_houselistNew = _houselistNew + [_x]};" \n " } foreach _houselist;" \n " _houselist = _houselistNew;" \n " if (count _houselist > 0) then {" \n " _newhome = _houselist call bis_fnc_selectrandom;" \n " _unit setvariable [""ALICE_home"",_newhome,true];" \n " } else {" \n " _unit setvariable [""ALICE_home"",objnull,true];" \n " };" \n " };" \n "" \n " //--- Passed arguments" \n " _arguments = [_unit,_twn,_nearbyTowns];" \n "" \n " //--- BEHOLD THE MIGHTY RANDOM NUMBER!" \n " _randomRarity = random _totalRarity;" \n "" \n " //--- Find out which action is it" \n " _selectedAction = _civilianActionClasses select 0; //--- First action is default" \n " _totalRarityTemp = 0;" \n " {" \n " _rarity = _x select 4;" \n " _totalRarityTemp = _totalRarityTemp + _rarity;" \n "" \n "" \n " if (_totalRarityTemp > _randomRarity) exitwith {_selectedAction = _x};" \n " } foreach _civilianActionClasses;" \n "" \n "" \n " /////////////////////////////////////////////////////////////////////////////////////////////" \n " //--- Execute associated FSM" \n " _fsmPath = _selectedAction select 3;" \n " _fsm = _arguments execfsm _fsmPath;" \n " _unit setvariable [""ALICE_action_fsm"",_fsm,true];" \n " _unit setvariable [""ALICE_action"",_selectedaction select 1,true];" \n " _unit setvariable [""ALICE_action_locked"",_selectedAction select 5,true];" \n " /////////////////////////////////////////////////////////////////////////////////////////////" \n "" \n " if (_debug) then {" \n " _id = _unit getvariable ""ALICE_id"";" \n " textLogFormat [""Log: [ALICE] %1 - %2"",_id,_fsmPath];" \n " };" \n "};" \n "" \n "_n = _n + 1;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class Return { itemno = 13; priority = 0.000000; to="Loop_1"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class Define { name = "Define"; itemno = 15; init = /*%FSM*/"_twnthreatold =_twnthreat;" \n "_twnthreat = _twn getvariable ""ALICE_threat"";" \n "" \n "//--- Decrease threat level" \n "if (_twnthreat > 0) then {" \n " _decay = _logic getvariable ""threatDecay"";" \n " _twnthreat = _twnthreat - _decay;" \n " if (_twnthreat < 0) then {_twnthreat = 0};" \n " _twn setvariable [""ALICE_threat"",_twnthreat,true];" \n "};" \n "" \n "" \n "//--- Status changed" \n "_twnstatusold =_twnstatus;" \n "_twnstatus = if (_twnthreatold != _twnthreat) then {" \n " _status = ""black"";" \n " _status = if (_twnthreat == 0) then {""green""} else {" \n " if (_twnthreat > 0) then {""red""} else {""black""};" \n " };" \n " _twn setvariable [""ALICE_status"",_status,true];" \n " _status" \n "} else {_twn getvariable ""ALICE_status""};" \n "" \n "_twnstatusChanged = if (_twnstatus != _twnstatusold) then {true} else {false};" \n "" \n "_populationAfter = if (isnil ""_populationAfter"") then {_twn getvariable ""ALICE_population""} else {_populationAfter};" \n "_population = _populationAfter;" \n "_populationAfter = [];" \n "_populationCount = count _population;" \n "_playersNear = _twn getvariable ""ALICE_playersNear"";" \n "" \n "" \n "" \n "//--- Select suitable actions -----------------------------------------------------------" \n "_neighbours = (_twn getvariable ""ALICE_population"");" \n "" \n "" \n "//--- Previous action cannot be repeated" \n "//if (_canrepeat == 0) then {_civilianActionClasses = _civilianActionClasses - [_selectedaction]};" \n "" \n "_arguments = [objnull,_twn,_nearbyTowns];" \n "_civilianActionClasses = [];" \n "{" \n " _condition = _x select 2;" \n " _this = _arguments;" \n " if (call compile _condition) then {_civilianActionClasses = _civilianActionClasses + [_x]};" \n "} foreach _civilianActionsAll;" \n "" \n "" \n "//--- Compose rarities" \n "_totalRarity = 0;" \n "{" \n " _rarity =_x select 4;" \n " _totalRarity = _totalRarity + _rarity;" \n "} foreach _civilianActionClasses;" \n "" \n "xxx = _civilianActionsAll;" \n "yyy = _totalrarity;" \n "" \n "_n = 0;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class Return { itemno = 13; priority = 0.000000; to="Loop_1"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class Reset { name = "Reset"; itemno = 16; init = /*%FSM*/"_twn setvariable [""ALICE_population"",_populationAfter,true];" \n "" \n ""/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class Continue { itemno = 5; priority = 0.000000; to="Define"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class Start { name = "Start"; itemno = 18; init = /*%FSM*/"_twn setvariable [""ALICE_threat"",0,true];" \n "_twn setvariable [""ALICE_status"",""green"",true];" \n "" \n "_twnthreat = 0;" \n "_twnstatus = ""green"";"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class Continue { itemno = 5; priority = 0.000000; to="Define"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ }; initState="ALICE_2_TOWN"; finalStates[] = { "END", }; }; /*%FSM*//*%FSM*/ /*%FSM*/ /* item0[] = {"START",0,250,-400.000000,-25.000000,-300.000000,25.000000,0.000000,"START"}; item1[] = {"No_Neighbors",4,218,-550.000000,-25.000000,-450.000000,25.000000,1.000000,"No Neighbors"}; item2[] = {"END",1,250,-550.000000,75.000000,-450.000000,125.000000,0.000000,"END"}; item3[] = {"True",8,218,-250.000000,-125.000000,-150.000000,-75.000000,0.000000,"True"}; item4[] = {"Spawn_Car",2,250,-250.000000,175.000000,-150.000000,225.000000,0.000000,"Spawn Car"}; item5[] = {"Exception",2,250,-400.000000,175.000000,-300.000000,225.000000,0.000000,"Exception"}; item6[] = {"Delete",2,250,-700.000000,-125.000000,-600.000000,-75.000000,0.000000,"Delete"}; item7[] = {"Continue_",2,250,-250.000000,-25.000000,-150.000000,25.000000,0.000000,"Continue?"}; item8[] = {"Yes",4,218,-250.000000,75.000000,-150.000000,125.000000,0.000000,"Yes"}; item9[] = {"No",4,218,-400.000000,75.000000,-300.000000,125.000000,1.000000,"No"}; item10[] = {"Safe_Distance",4,4314,-700.000000,175.000000,-600.000000,225.000000,1.000000,"Safe" \n "Distance"}; item11[] = {"Exception",4,218,-400.000000,275.000000,-300.000000,325.000000,1.000000,"Exception"}; item12[] = {"Arrived",4,218,-550.000000,375.000000,-450.000000,425.000000,0.000000,"Arrived"}; item13[] = {"Arrived",2,250,-700.000000,375.000000,-600.000000,425.000000,0.000000,"Arrived"}; item14[] = {"Continue",8,218,-250.000000,375.000000,-150.000000,425.000000,0.000000,"Continue"}; item15[] = {"Move",2,250,-400.000000,375.000000,-300.000000,425.000000,0.000000,"Move"}; item16[] = {"Restart",4,218,-700.000000,475.000000,-600.000000,525.000000,0.000000,"Restart"}; item17[] = {"Restart",2,250,-250.000000,475.000000,-150.000000,525.000000,0.000000,"Restart"}; link0[] = {0,1}; link1[] = {0,3}; link2[] = {1,2}; link3[] = {3,7}; link4[] = {4,14}; link5[] = {5,10}; link6[] = {6,3}; link7[] = {7,8}; link8[] = {7,9}; link9[] = {8,4}; link10[] = {9,2}; link11[] = {10,6}; link12[] = {11,5}; link13[] = {12,13}; link14[] = {13,10}; link15[] = {13,16}; link16[] = {14,15}; link17[] = {15,11}; link18[] = {15,12}; link19[] = {16,17}; link20[] = {17,14}; globals[] = {25.000000,1,0,0,16777215,640,480,1,21,6316128,1,-846.809387,-124.570236,657.285034,-235.827698,727,899,1}; window[] = {2,-1,-1,-1,-1,870,-1266,-6,140,3,744}; *//*%FSM*/ class FSM { fsmName = "ALICE2 - Traffic"; class States { /*%FSM*/ class START { name = "START"; init = /*%FSM*/"_logic = _this select 0;" \n "_twn = _this select 1;" \n "" \n "_debug = _logic getvariable ""debug"";" \n "" \n "_spawnDistance = _logic getvariable ""trafficDistance"";" \n "" \n "_grp = grpnull;" \n "if (isnil {_twn getvariable ""ALICE_group""}) then {" \n " _grp = creategroup civilian;" \n " _twn setvariable [""ALICE_group"",_grp,true];" \n "};" \n "" \n "_neighbors = _twn getvariable ""neighbors"";" \n "if(isNil ""_neighbors"") then {_neighbors = [];};"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class No_Neighbors { priority = 1.000000; to="END"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"count _neighbors == 0"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class True { priority = 0.000000; to="Continue_"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class END { name = "END"; init = /*%FSM*/""/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { }; }; /*%FSM*/ /*%FSM*/ class Spawn_Car { name = "Spawn_Car"; init = /*%FSM*/"_classlist = _logic getvariable ""ALICE_classes"";" \n "_classlistVehicles = _logic getvariable ""ALICE_classesVehicles"";" \n "_classVehicle = _classlistVehicles call bis_fnc_selectrandom;" \n "_destination = _neighbors call bis_fnc_selectrandom;" \n "" \n "//--- Determine radius" \n "_twnSize = _twn getvariable ""ALICE_townsize"";" \n "if (isnil ""_twnSize"") then {_twnSize = _logic getvariable ""ALICE_townsize""};" \n "_destinationSize = _destination getvariable ""ALICE_townsize"";" \n "if (isnil ""_destinationSize"") then {_destinationSize = _logic getvariable ""ALICE_townsize""};" \n "" \n "//--- Find roads" \n "_twnRoads = _twn nearroads _twnSize;" \n "_twnPos = if (count _twnRoads > 0) then {_twnRoads call bis_fnc_selectrandom} else {_twn};" \n "_destinationRoads = _destination nearroads _destinationSize;" \n "_destinationPos = if (count _destinationRoads > 0) then {_destinationRoads call bis_fnc_selectrandom} else {_destination};" \n "" \n "//--- Select driver" \n "_classlistMen = [];" \n "{" \n " _class = _x select 0;" \n " _rarity = _x select 1;" \n " _faction = _x select 2;" \n " _woman = _x select 3;" \n " if (_woman == 0 && _faction in (_twn getVariable [""demography"", _logic getvariable ""townsFaction""])) then {" \n " _classlistMen = _classlistMen + [_class];" \n " };" \n "} foreach _classlist;" \n "_classMan = _classlistMen call bis_fnc_selectrandom;" \n "" \n "//--- Spawn vehicle" \n "_car = createvehicle [_classVehicle,position _twnPos,[],300,""none""];" \n "_car setdir direction _twnPos;" \n "_grp = _twn getvariable ""ALICE_group"";" \n "_driver = _grp createunit [_classMan,position _car,[],0,""none""];" \n "_driver setSkill 0.5;" \n "{_driver disableAI _x} count [""AUTOTARGET"",""TARGET""];" \n "_driver allowFleeing 0;" \n "_driver assignasdriver _car;" \n "_driver setbehaviour ""SAFE"";" \n "_driver moveindriver _car;" \n "" \n "_cargo = getNumber(configFile >> ""CfgVehicles"" >> _classVehicle >> ""transportSoldier"");" \n "for ""_i"" from 0 to floor(random _cargo) do {" \n " _classManx = _classlistMen call bis_fnc_selectrandom;" \n " _cargoMan = _grp createunit [_classManx,position _car,[],0,""none""];" \n " _cargoMan setSkill 0;" \n " _cargoMan assignascargo _car;" \n " _cargoMan setbehaviour ""SAFE"";" \n " _cargoMan moveincargo _car; " \n "" \n " //--- Custom init" \n " _globalInit = _logic getvariable ""ALICE_civilianinit"";" \n " _localInit = _twn getvariable ""ALICE_civilianinit"";" \n " if !(isnil ""_globalInit"") then {{_cargoMan call _x} foreach _globalInit};" \n " if !(isnil ""_localInit"") then {{_cargoMan call _x} foreach _localInit};" \n "};" \n "" \n "_marker = """";" \n "//--- Debug mode, halellujah" \n "if (_debug) then {" \n " _markertext = format [""%1-%2"",_twn, floor(random 9999)];" \n " _marker = createmarker [_markertext,position _driver];" \n " _marker setmarkertype ""Dot"";" \n " _marker setmarkersize [0.5,0.5];" \n " _marker setmarkertext _markertext;" \n " _marker setmarkercolor ""coloryellow"";" \n " _driver setvariable [""ALICE_marker"",_marker,true];" \n " [_marker,_driver] spawn {" \n " _marker = _this select 0;" \n " _driver = _this select 1;" \n " while {alive _driver} do {" \n " _marker setmarkerpos position vehicle _driver;" \n " sleep 0.1;" \n " };" \n " };" \n "};" \n "_fsmFormation = _driver execfsm ""ca\modules_e\alice2\data\fsms\alice2Formation.fsm"";"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class Continue { priority = 0.000000; to="Move"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class Exception { name = "Exception"; init = /*%FSM*/""/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class Safe_Distance { priority = 1.000000; to="Delete"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"{(position _car) distance _x < _spawnDistance} count ([] call BIS_fnc_listPlayers) == 0"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class Delete { name = "Delete"; init = /*%FSM*/"_cargo = assignedCargo _car;" \n "{" \n " deletevehicle _x;" \n "} forEach _cargo;" \n "if (_debug) then {" \n " deleteMarker (_driver getvariable ""ALICE_marker"");" \n "};" \n "deletevehicle _driver;" \n "deletevehicle _car;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class True { priority = 0.000000; to="Continue_"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class Continue_ { name = "Continue_"; init = /*%FSM*/"_timeNow = time;" \n "_delay = random 15;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class No { priority = 1.000000; to="END"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"((_twn getvariable ""ALICE_active_traffic"") == 0)"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class Yes { priority = 0.000000; to="Spawn_Car"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"(_twn getvariable ""ALICE_active"")" \n " && " \n "//(_twn getvariable ""ALICE_threat"") <= 0" \n "// && " \n "(time - _timeNow > _delay)" \n "&&" \n "{(position _twn) distance _x < _spawnDistance} count ([] call BIS_fnc_listPlayers) > 0"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class Arrived { name = "Arrived"; init = /*%FSM*/""/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class Safe_Distance { priority = 1.000000; to="Delete"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"{(position _car) distance _x < _spawnDistance} count ([] call BIS_fnc_listPlayers) == 0"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class Restart { priority = 0.000000; to="Restart"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class Move { name = "Move"; init = /*%FSM*/"_driver domove position _destinationPos;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class Exception { priority = 1.000000; to="Exception"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"vehicle _driver == _driver || !alive _driver || !alive _car || !canmove _car"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class Arrived { priority = 0.000000; to="Arrived"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"unitready _driver || {(position _car) distance _x < _spawnDistance * 1.2} count ([] call BIS_fnc_listPlayers) == 0"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class Restart { name = "Restart"; init = /*%FSM*/"_twnPos = if (count _twnRoads > 0) then {_twnRoads call bis_fnc_selectrandom} else {_twn};" \n "_destinationPos = _twnPos;" \n ""/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class Continue { priority = 0.000000; to="Move"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ }; initState="START"; finalStates[] = { "END", }; }; /*%FSM*/scriptName "Alice2\data\scripts\fnc_civilianSet.sqf"; /* File: fnc_civilianSet.sqf Author: Karel Moricky Description: Sets basic ALICE 2 values for civilian unit Parameter(s): _this select 0: Object - Unit _this select 1: Object - Town _this select 2: Object - House */ private ["_grp","_class","_pos","_unit","_movein","_twns","_houses","_pointPos","_pointMarker","_posList","_point","_color","_marker","_spawnpos","_topic","_path","_bikb","_fsm","_markerx","_logic","_debug","_twn","_house","_id","_moves","_allTopics","_globalInit","_localInit","_add"]; _logic = bis_alice_mainscope; _debug = _logic getvariable "debug"; _movein = false; _unit = _this select 0; if (typename _unit == typename "") then { _grp = if (count _this > 1) then {(_this select 1) getvariable "ALICE_group"} else {createcenter civilian; creategroup civilian;}; _class = _unit; _pos = if (count _this > 2) then {position (_this select 2)} else { if (count _this > 1) then {position (_this select 1)} else {[1,1,1]}; }; _unit = _grp createUnit [_class, _pos, [], 0, "NONE"]; //_unit allowdamage false; _movein = true; }; _twn = if (count _this > 1) then {_this select 1} else { _twns = position _unit nearEntities ["LocationLogicCityCenter",100000]; //--- TODO GITA if (count _twns > 0) then{ _twns select 0; } else {debuglog format ["Log: [ALICE] Cannot add %1 - no towns available!",_unit];false}; }; if (typename _twn == "BOOL") exitwith {}; _house = if (count _this > 2) then {_this select 2} else { _houses = nearestobjects [position _twn,["bis_alice_emptydoor"],500]; if (count _houses > 0) then { _houses call BIS_fnc_selectRandom; } else { _houses = nearestobjects [position _twn,["house"],500]; if (count _houses > 0) then { _houses call BIS_fnc_selectRandom; } else {debuglog format ["Log: [ALICE] Cannot add %1 - no houses available in %2!",_unit,_twn];false}; }; }; if (typename _house == "BOOL") exitwith {}; _id = _logic getvariable "id"; [_logic,"id",1,true] call bis_fnc_variablespaceadd; sleep 0.01; //--- Set values if (_movein && _house isKindOf "bis_alice_emptydoor") then { _unit setpos position _house; }; if (_movein && _house isKindOf "house") then { scopename "moveIn"; _marker = if (_debug) then {_house call BIS_fnc_boundingBoxMarker;} else {""}; //--- In da house _posList = []; for "_i" from 0 to 10 do { _point = _house selectionposition format ["AIspawnpos_%1",_i]; if (_point distance [0,0,0] > 0.1) then { _posList = _posList + [_point]; if (_debug) then { _pointPos = _house modeltoworld _point; _pointMarker = createmarker [format ["X%1",floor random 99999],_pointpos]; _pointMarker setmarkertype "mil_dot"; _pointMarker setmarkercolor "colorpink"; }; } else {breakto "moveIn"}; }; if (_debug) then { _color = if (count _posList > 0) then {"colorgreen"} else {"colorred"}; _marker setmarkercolor _color; }; if (count _posList == 0) then {_posList = [[0,0,0]]}; _spawnpos = _house modeltoworld (_posList call bis_fnc_selectrandom); _unit setposatl _spawnpos; _unit setskill (random 0.5); _unit setvelocity [0,0,0]; }; [_unit] join (_twn getvariable "ALICE_group"); _unit forcewalk true; _unit setbehaviour "safe"; _unit setvariable ["ALICE_id",_id,true]; _unit setvariable ["ALICE_twn",_twn,true]; _unit setvariable ["ALICE_home",_house,true]; _unit setvariable ["ALICE_randomValue",random 1,true]; _unit setvariable ["ALICE_action","",true]; _unit setvariable ["ALICE_action_fsm",-1,true]; _unit setvariable ["ALICE_type",getnumber(configfile >> "cfgvehicles" >> typeof _unit >> "characterID"),true]; _moves = gettext(configfile >> "cfgvehicles" >> typeof _unit >> "moves"); _unit setvariable ["ALICE_moves",_moves,true]; ["ADD",_unit,0.1] call BIS_fnc_respect; _fsm = _unit execfsm "ca\modules_e\alice2\data\fsms\alice2Formation.fsm"; _unit setvariable ["ALICE_fsm",_fsm,true]; //if (_id == 33) then {diag_debugFSM _fsm}; //--- Add conversation topics _allTopics = _logic getvariable "ALICE_topics"; for "_i" from 0 to (count _allTopics - 1) step 2 do { _topic = _allTopics select _i; _path = _allTopics select (_i + 1); _bikb = _path + "CfgCivilianConversations.bikb"; _fsm = _path + "CfgCivilianConversations.fsm"; _unit kbaddtopic [_topic, _bikb, _fsm]; }; sleep 0.01; //--- Storing variables //[_twn,"ALICE_populationCountDef",1,true] call bis_fnc_variablespaceadd; _add = [_twn,"ALICE_population",[_unit]] call bis_fnc_variablespaceadd; debuglog str ["Log::::::::::::",_unit,typeof _unit,count _add]; //--- Event Handlers _unit addeventhandler ["hit",{_this call BIS_ALICE2_fnc_civilianHit}]; _unit addeventhandler ["killed",{_this call BIS_ALICE2_fnc_civilianKilled}]; //--- Custom init _globalInit = _logic getvariable "ALICE_civilianinit"; _localInit = _twn getvariable "ALICE_civilianinit"; if !(isnil "_globalInit") then {{_unit call _x} foreach _globalInit}; if !(isnil "_localInit") then {{_unit call _x} foreach _localInit}; //--- Reacting to danger /* 0 - DCEnemyDetected - the first enemy detected 1 - DCFire - fire visible 2 - DCHit - vehicle hit 3 - DCEnemyNear - enemy very close to me 4 - DCExplosion, - explosion detected 5 - DCDeadBodyGroup - dead soldier from my group found 6 - DCDeadBody - other dead soldier found 7 - DCScream - hit soldier screaming */ [_unit,"BIS_dangerHandler",[{scriptname 'ALICE: dangerHandler'; _unit = _this select 0; _danger = _this select 1; _twn = _unit getvariable "alice_twn"; _dangerCoef = 0.03; debuglog str ["Log:::::::::::::::::::DEAD",["DCEnemyDetected","DCFire","DCHit","DCEnemyNear","DCExplosion","DCDeadBodyGroup","DCDeadBody","DCScream"] select _danger]; //--- Clear & Present Danger if (_danger >= 0) then { _newstatus = [_twn,"ALICE_threat",(1 + _danger)*_dangerCoef,true] call bis_fnc_variablespaceadd; }; if (random 1 > 0.666) then { if (_danger == 1 || _danger == 4 || _danger == 6) then { _screams = bis_alice_mainscope getVariable "ALICE_screams"; _ran = floor random count _screams; _selectId = _ran - (_ran % 2); _topic = "ALICE_" + (_screams select _selectId); _sentences = _screams select (_selectId + 1); _sentenceId = _sentences call bis_fnc_selectrandom; //_sentenceId = format ["ALICE_Scream_0%1",ceil random 8]; //_topic = "ALICE_BIS"; _unit kbtell [_unit,_topic,_sentenceId]; }; }; }]] call bis_fnc_variablespaceadd; //--- Behold the mighty debug mode! _marker = ""; if (_debug) then { _marker = createmarker [format ["BIS_alice_civ_%1",_id],position _unit]; _marker setmarkertypelocal "dot"; _marker setmarkercolor "colorwhite"; _marker setmarkersizelocal [.6,.6]; _marker setmarkertextlocal str(_id); _unit setvariable ["ALICE_marker",_marker,true]; _markerx = createmarker [format ["BIS_alice_civ_%1_w",_id],position _unit]; _markerx setmarkertypelocal "mil_destroy"; _markerx setmarkerdirlocal 45; _markerx setmarkersizelocal [0.3,0.3]; _markerx setmarkertext (str _id); _markerx setmarkercolor "colorwhite"; [_unit,_marker,_markerx] spawn { private ["_color","_twn","_threat","_ed","_unit","_marker","_markerx"]; _unit = _this select 0; _marker = _this select 1; _markerx = _this select 2; while {alive _unit} do { _twn = _unit getvariable "ALICE_twn"; _threat = _twn getvariable "ALICE_threat"; _color = "colorwhite"; if (_threat >= 0) then {_color = "color" + (_twn getvariable "ALICE_status")}; if (_twn == _unit) then {_color = "coloryellow"}; _marker setmarkercolor _color; _marker setmarkerpos position vehicle _unit; _ed = (expecteddestination _unit) select 0; _markerx setmarkerpos _ed; sleep 0.1; }; _marker setmarkertype "mil_dot"; _marker setmarkercolor "colorbrown"; if (isnull _unit) then {deletemarker _marker}; deletemarker _markerx; }; }; true; private ["_logicFnc","_twnlist","_locationParams","_create","_twnlistTemp","_i","_rarity","_faction","_classlist","_classlistVehicles","_scope","_side","_woman","_class","_vehicleclass","_actual","_condition","_fsm","_locked","_canrepeat","_initVariables","_init","_allActions","_action","_tempArrayx","_civilianActions","_source","_allActionsx","_allTopics","_endSentences","_tempArray","_element","_type","_topic","_path","_category","_screams","_scream","_categoryId","_oldScreams","_allScreams","_Remarks","_oldRemarks","_allRemarks","_civilianConversations","_civilianScreams","_civilianRemarks","_factionCiv","_logic","_debug","_initArray","_distlimit","_trafficDistance","_twnSize","_civilianCount","_actionCategories","_kbCategories","_townsFaction","_blacklist","_respectModifyCoef","_threatDecay","_unitrarity","_totobj","_allConversations","_twnrespect"]; scriptName "Alice2\data\scripts\main.sqf"; /* File: main.sqf Author: Karel Moricky Description: Init script - Ambient Life In Civilian Environment 2 Parameter(s): _this: Alice2 logic unit which triggered this script. */ _logic = _this select 0; _logic setpos [1,1,1]; //--- Default values _logic setvariable ["id",0,true]; _logic setvariable ["pause",true,true]; createcenter west; createcenter east; createcenter resistance; createcenter civilian; //--- File paths BIS_Alice2_path = "ca\modules_e\alice2\data\"; //--- Is Garbage collector running? if (isnil "BIS_GC_trashItFunc") then {(group _logic) createUnit ["GarbageCollector", position player, [], 0, "NONE"]}; //--- Execute Functions if (isnil "bis_fnc_init") then { _logicFnc = (group _logic) createunit ["FunctionsManager",position player,[],0,"none"]; }; waituntil {!isnil "BIS_fnc_init"}; //--- Wait for functions if (!isnil "bis_gita_0") then {waituntil {!isnil "bis_gita_init"}}; //--- If present, wait for GITA (town generator) /////////////////////////////////////////////////////////////////////////////////// ///// Custom params /////////////////////////////////////////////////////////////////////////////////// //--- Debug _debug = if (isnil {_logic getvariable "debug"}) then {false} else {true}; _logic setvariable ["debug",_debug,true]; //--- Civilian init _initArray = if (isnil {_logic getvariable "initArray"}) then {[]} else {_logic getvariable "initArray";}; _logic setvariable ["initArray",_initArray,true]; //--- Spawn distance _distlimit = if (isnil {_logic getvariable "spawnDistance"}) then {400} else {_logic getvariable "spawnDistance"}; _logic setvariable ["spawnDistance",_distLimit,true]; //--- Traffic distance _trafficDistance = if (isnil {_logic getvariable "trafficDistance"}) then {500} else {_logic getvariable "trafficDistance"}; _logic setvariable ["trafficDistance",_trafficDistance,true]; //--- Town size _twnSize = if (isnil {_logic getvariable "ALICE_townsize"}) then {_distLimit * 2/3} else {_logic getvariable "ALICE_townsize";}; _logic setvariable ["ALICE_townsize",_twnSize,true]; //--- Civilian count _civilianCount = if (isnil {_logic getvariable "civilianCount"}) then {"round (4 * (sqrt %1))"} else {_logic getvariable "civilianCount";}; _logic setvariable ["civilianCount",_civilianCount,true]; //--- Civilian actions _actionCategories = if (isnil {_logic getvariable "civilianActions"}) then {["BIS"]} else {_logic getvariable "civilianActions";}; _logic setvariable ["civilianActions",_actionCategories,true]; //--- Civilian conversations _kbCategories = if (isnil {_logic getvariable "civilianConversations"}) then {["BIS"]} else {_logic getvariable "civilianConversations";}; _logic setvariable ["civilianConversations",_kbCategories,true]; //--- Towns faction _townsFaction = if (isnil {_logic getvariable "townsFaction"}) then {["BIS_TK_CIV"]} else {_logic getvariable "townsFaction";}; _logic setvariable ["townsFaction",_townsFaction,true]; //--- Object blacklist _blacklist = if (isnil {_logic getvariable "blacklist"}) then {[]} else {_logic getvariable "blacklist";}; _logic setvariable ["blacklist",_blacklist,true]; //--- Respect modify _respectModifyCoef = if (isnil {_logic getvariable "respectModifyCoef"}) then {0.15} else {_logic getvariable "respectModifyCoef"}; _logic setvariable ["respectModifyCoef",_respectModifyCoef,true]; //--- ThreatDecay _threatDecay = if (isnil {_logic getvariable "threatDecay"}) then {0.07} else {_logic getvariable "threatDecay"}; _logic setvariable ["threatDecay",_threatDecay,true]; //--- Town list _twnlist = []; if (isnil {_logic getvariable "townlist"}) then { _locationParams = if (_debug) then {[["CityCenter"],[],true]} else {[["CityCenter"]]}; _create = _locationParams call bis_fnc_locations; //waituntil {count _create > 0}; waituntil {count (bis_functions_mainscope getvariable "locations") > 0}; { if ((_x getvariable "type") == "CityCenter") then {_twnlist = _twnlist + [_x]}; } foreach (bis_functions_mainscope getvariable "locations"); _logic setvariable ["townlist",_twnlist,true]; } else { _twnlistTemp = _logic getvariable "townlist"; { //--- Array if (typename _x == "ARRAY") then { _locationParams = if (_debug) then {[["CityCenter"],_x,true]} else {[["CityCenter"],_x]}; _create = _locationParams call bis_fnc_locations; {if !(_x in _twnlist) then {_twnlist = _twnlist + [_x]}} foreach _create; } else { if (typename _x == "OBJECT") then { if (typeof _x != "EmptyDetector") then { //--- City logic if (isnil {_x getvariable "class"}) then {[[_x]] call bis_fnc_locations}; _twnlist = _twnlist + [_x]; } else { //--- Trigger _locationParams = if (_debug) then {[["CityCenter"],_x,true]} else {[["CityCenter"],_x]}; _create = _locationParams call bis_fnc_locations; {if !(_x in _twnlist) then {_twnlist = _twnlist + [_x]}} foreach _create; }; }; }; } foreach _twnlistTemp; }; _logic setvariable ["ALICE_alltowns",_twnlist,true]; /////////////////////////////////////////////////////////////////////////////////// ///// Civilian & Vehicles Classes /////////////////////////////////////////////////////////////////////////////////// _unitrarity = if (format ["%1",_logic getvariable "civilianRarity"] == "") then {[]} else {_logic getvariable "civilianRarity";}; _logic setvariable ["civilianRarity",_unitrarity,true]; _classlist = []; _classlistVehicles = []; _totobj = count (configfile >> "cfgVehicles"); for [{_i = 0}, {_i < _totobj}, {_i = _i + 1}] do { _actual = (configfile >> "cfgVehicles") select _i; if (isclass _actual) then { _class = configname _actual; _vehicleclass = gettext (configfile >> "cfgvehicles" >> _class >> "vehicleClass"); if !(_vehicleclass in ["Sounds","Mines"]) then { _scope = getnumber (_actual >> "scope"); _side = getnumber (_actual >> "side"); _woman = getnumber (_actual >> "woman"); //--- Civilians if (_class iskindof "civilian" && _scope == 2) then { _rarity = if (_class in _unitrarity) then { _unitrarity select ((_unitrarity find _class)+1); } else { getnumber (_actual >> "rarityUrban"); }; _faction = gettext (_actual >> "faction"); _classlist = _classlist + [[_class,_rarity,_faction,_woman]]; }; //--- Civilian Cars if (_vehicleclass == "Car" && _side == 3 && _scope == 2) then { _classlistVehicles = _classlistVehicles + [_class]; }; }; }; }; _logic setvariable ["ALICE_classes",_classlist,true]; _logic setvariable ["ALICE_classesVehicles",_classlistVehicles,true]; /////////////////////////////////////////////////////////////////////////////////// ///// Civilian Actions /////////////////////////////////////////////////////////////////////////////////// _allActionsx = []; _allActions = []; for "_i" from 0 to 2 do { _source = [configfile,missionconfigfile,campaignconfigfile] select _i; _tempArrayx = []; { _civilianActions = _source >> "CfgCivilianActions_EP1" >> _x; if (str _civilianActions != "") then { _tempArrayx = _tempArrayx + [_civilianActions]; for "_i" from 0 to (count _civilianActions - 1) do { _action = _civilianActions select _i; if (isclass _action) then { _condition = gettext(_action >> "condition"); _fsm = gettext(_action >> "fsm"); _rarity = getnumber(_action >> "rarity"); _locked = getnumber(_action >> "locked"); _canrepeat = getnumber(_action >> "canRepeat"); _initVariables = getarray(_action >> "initVariables"); _init = gettext(_action >> "init"); _allActions = _allActions + [ [ /* 0 */ _action, /* 1 */ configname _action, /* 2 */ _condition, /* 3 */ _fsm, /* 4 */ _rarity, /* 5 */ _locked, /* 6 */ _canrepeat, /* 7 */ _initVariables, /* 8 */ _init ] ]; }; }; }; } foreach _actionCategories; _allActionsx = _allActionsx + [_tempArrayx]; }; _logic setvariable ["ALICE_actionsx",_allActionsx,true]; _logic setvariable ["ALICE_actions",_allActions,true]; /////////////////////////////////////////////////////////////////////////////////// ///// Civilian Conversations /////////////////////////////////////////////////////////////////////////////////// _allConversations = [[],[],[],[]]; _allTopics = []; _allScreams = []; _allRemarks = []; for "_i" from 0 to 2 do { _source = [configfile,missionconfigfile,campaignconfigfile] select _i; _tempArray = []; { _civilianConversations = _source >> "CfgCivilianConversations_EP1" >> _x; for "_i" from 0 to (count _civilianConversations - 1) do { _topic = "ALICE_" + (configname _civilianConversations); _path = gettext (_civilianConversations >> "path"); if !(_topic in _allTopics) then {_allTopics = _allTopics + [_topic,_path]}; _category = _civilianConversations select _i; if (isclass _category) then { _type = getnumber (_category >> "type"); _tempArray = _allConversations select _type; for "_c" from 0 to (count _category - 1) do { _element = _category select _c; if (isclass _element) then { _endSentences = getarray (_element >> "endSentences"); _tempArray = _tempArray + [[(configname _civilianConversations),configname _element,_endSentences]]; }; }; _allConversations set [_type,_tempArray]; }; }; //--- Screams _civilianScreams = _source >> "CfgCivilianScreams_EP1" >> _x; _screams = []; for "_i" from 0 to (count _civilianScreams - 1) do { _scream = _civilianScreams select _i; if (isclass _scream) then { _screams = _screams + [configname _scream]; }; }; if (_x in _allscreams) then { _categoryId = (_allScreams find _x) + 1; _oldScreams = _allScreams select _categoryId; _allScreams set [_categoryId,_oldScreams + _screams]; } else { _allScreams = _allScreams + [_x,_screams]; }; //--- Remarks _civilianRemarks = _source >> "CfgCivilianRemarks_EP1" >> _x; _remarks = []; for "_i" from 0 to (count _civilianRemarks - 1) do { _scream = _civilianRemarks select _i; if (isclass _scream) then { _Remarks = _Remarks + [configname _scream]; }; }; if (_x in _allRemarks) then { _categoryId = (_allRemarks find _x) + 1; _oldRemarks = _allRemarks select _categoryId; _allRemarks set [_categoryId,_oldRemarks + _Remarks]; } else { _allRemarks = _allRemarks + [_x,_remarks]; }; } foreach _kbCategories; }; _logic setvariable ["ALICE_conversations",_allConversations,true]; _logic setvariable ["ALICE_screams",_allScreams,true]; _logic setvariable ["ALICE_remarks",_allRemarks,true]; _logic setvariable ["ALICE_topics",_allTopics,true]; /////////////////////////////////////////////////////////////////////////////////// ///// Execute /////////////////////////////////////////////////////////////////////////////////// _fsm = _logic execfsm (BIS_Alice2_path + "fsms\alice2.fsm"); /////////////////////////////////////////////////////////////////////////////////// ///// Towns /////////////////////////////////////////////////////////////////////////////////// //debuglog format ["Log: ALICE 2: Initializing ...",_twnname]; _twnrespect = ["SET"] call BIS_fnc_respect; { _factionCiv = [_x] call BIS_fnc_getFactions; _twnrespect set [_factionCiv,0.5]; } forEach _townsFaction; /* { _type = _x getvariable "type"; _name = _x getvariable "name"; _pos = position _x; if (isnil {_x getvariable "respect"}) then {_x setVariable ["respect",_twnrespect,true]}; _x setVariable ["ALICE_active",false,true]; _x setVariable ["ALICE_active_traffic",0,true]; _x setvariable ["ALICE_threat",-1,true]; _x setvariable ["ALICE_status","black",true]; _x setVariable ["ALICE_population",[],true]; _x setVariable ["ALICE_populationCount",-1,true]; _fsm = [_x,_classlist] execfsm (BIS_Alice2_path + "fsms\alice2.fsm"); _x setvariable ["ALICE_fsm",_fsm,true]; //if (_x == bis_loc_acityc_khelm) then {diag_debugfsm _fsm}; //sleep .1; } foreach _twnlist; _logic setvariable ["pause",false,true]; */ debuglog format ["Log: ALICE 2: Initialized (%1 towns).",count _twnlist]; bis_alice2_init = true; addActions = { // if !isNil "actionLoadout" then { HQ removeAction actionLoadout; actionLoadout = nil; }; // actionLoadout = HQ addAction ["Loadout","common\client\actions\noScript.sqf","[] spawn gearDialog;",1,false,true,"",""]; if !isNil "actionHQDeploy" then { player removeAction actionHQDeploy; actionHQDeploy = nil; }; actionHQDeploy = player addAction ["Deploy HQ","common\client\actions\noScript.sqf",' _pos = getPosATL MHQ; if (count (_pos isFlatEmpty [0,0,0.2,20,0,false,MHQ]) == 0) exitWith { player groupChat "Cannot deploy here. The terrain is unsuitable"; }; { moveOut _x } forEach crew MHQ; MHQ setPosATL spawnPos; sleep 0.5; HQ setPosATL _pos; HQ setDir getDir MHQ; HQ setVariable ["hqdT",time,true]; ',1,false,true,"",'vehicle _target == _target && _target distance MHQ < 4']; if !isNil "actionHQMobilise" then { HQ removeAction actionHQMobilise; actionHQMobilise = nil; }; actionHQMobilise = HQ addAction ["Mobilise HQ","common\client\actions\noScript.sqf",' if (lifeState player == "UNCONSCIOUS") exitWith {}; if (mhqDeployTimer == -1) exitWith { player groupChat "The HQ is bolted in place, you cannot redeploy!"; }; _timePassed = HQ getVariable ["hqdT",0]; _dT = mhqDeployTimer - (time - _timePassed); if (_dT > 0 && _timePassed != 0) exitWith { player groupChat format ["You have to wait approx. %1 minutes to mobilize the MHQ.", (round((abs _dT)/60))]; }; _leader = call compile squadLeader(player); _str = "You need a squad leader to mobilise the HQ"; if (isNil "_leader") exitWith { player groupChat _str; }; if (isNull _leader || !isPlayer _leader) exitWith { player groupChat _str; }; if (!alive _leader || isDead(_leader)) exitWith { player groupChat "Your squad leader is dead!"; }; player sideChat format["Sent request to %1 (%2).", unitID(_leader), getName(_leader)]; [nil,_leader,"loc",rSPAWN,player,{ requestingPlayer = _this; player sideChat format["%1, (%2) is requesting permission to mobilise the HQ. Accept?", unitID(_this), getName(_this)]; showCommandingMenu "#USER:query_Menu_MHQ"; }] call RE; ',1,false,true,"",'']; // if !isNil "actionBagsDeploy" then { player removeAction actionBagsDeploy; actionBagsDeploy = nil; }; // actionBagsDeploy = player addAction ["Deploy sandbags","common\client\actions\noScript.sqf"," // _cT = cursorTarget; // _bags = call compile format[""bags%1"", _cT]; // _pos = _cT modelToWorld [0,-5,0]; // _bags setDir (getDir _cT); // _bags setPosATL [_pos select 0,_pos select 1,0]; // ",1,false,true,"",' // _cT = cursorTarget; // if !isNull _cT then { // if (!(typeOf _cT in (westVehicleClasses-[ATVTYPE]-[HELITYPE])) || !alive _cT) exitWith {}; // _pos = _cT modelToWorld [0,-3,0]; // _bags = call compile format["bags%1", _cT]; // alive _cT && player distance _pos < 3 && _bags distance spawnPos < 50 // }; // ']; // // if !isNil "actionBagsLoad" then { player removeAction actionBagsLoad; actionBagsLoad = nil; }; // actionBagsLoad = player addAction ["Load sandbags","common\client\actions\noScript.sqf"," // cursorTarget setPosATL [0,0,0]; // ",1,false,true,"",' // _cT = cursorTarget; // if !isNull _cT then { // if !(typeOf _cT == "Land_BagFenceRound") exitWith {}; // _vcl = call compile format["humv1%1", unitNumber(_cT)]; // player distance _cT < 3 && _cT distance _vcl < 10 // }; // ']; if !isNil "actionTyre" then { player removeAction actionTyre; actionTyre = nil; }; actionTyre = player addAction ["Change tyre","common\client\actions\noScript.sqf","[] spawn changeTyre",1,false,true,"",' _cT = cursorTarget; if !isNull _cT then { if !(typeOf _cT in westVehicleClasses) exitWith {}; alive _cT && !canMove _cT && _cT call getTyre != ""; }; ']; if !isNil "actionPullout" then { player removeAction actionPullout; actionPullout = nil; }; actionPullout = player addAction ["Pull Out Injured","common\client\actions\noScript.sqf",' _anim = "AmovPercMstpSnonWnonDnon_AcrgPknlMstpSnonWnonDnon_getInLow"; player playMove _anim; waitUntil { animationState player == _anim }; waitUntil { animationState player != _anim }; { if (lifestate _x == "UNCONSCIOUS") then { moveOut _x; }; } foreach crew cursorTarget; ',1,false,true,"",' _cT = cursorTarget; if !isNull _cT then { if !(_cT isKindOf "LandVehicle" || _cT isKindOf "Air") exitWith {}; _crew = crew _cT; _bool = false; { if (lifestate _x == "UNCONSCIOUS") exitWith { _bool = true; }; } foreach _crew; _bool && _target distance _cT < 5 }; ']; if !isNil "actionLoadInjured" then { player removeAction actionLoadInjured; actionLoadInjured = nil; }; actionLoadInjured = player addAction ["Load Injured Into Vehicle","common\client\actions\noScript.sqf",' _dragged = (nearestPlayers(getPosATL player,5,false,"array") - [player]); { _anim = animationState _x; if (_anim in carriedAnims) exitWith { _dragged = _x; }; } forEach _dragged; if (typeName _dragged == "ARRAY") then { _dragged = _dragged select 0; }; detach _dragged; player playAction "released"; [nil,_dragged,"loc",rSWITCHACTION,"released"] call RE; sleep 0.8; [nil,_dragged,"loc",rSPAWN,cursorTarget,{player moveInCargo _this;}] call RE; ',1,false,true,"",' _cT = cursorTarget; if !isNull _cT then { if !(_cT in westVehicles) exitWith {}; _cT distance player < 5 && _cT emptyPositions "Cargo" > 0 && animationState player == carrierAnim }; ']; if !isNil "actionDrag" then { player removeAction actionDrag; actionDrag = nil; }; actionDrag = player addAction ["Drag","common\client\actions\noScript.sqf",' _cT = cursorTarget; player playActionNow "grabdrag"; sleep 1; [nil,_cT,"loc",rSPAWN,player,{ detach player; player switchMove "ainjppnemstpsnonwrfldb_still"; player attachTo [_this, [0.1, 1.01, 0]]; sleep 0.001; player setDir 180; }] call RE; ',1,false,true,"",' _cT = cursorTarget; if !isNull _cT then { _target distance _cT < 3 && lifeState _cT == "UNCONSCIOUS" && !(animationState _target in (draggerAnims+[carrierAnim])) && animationState _cT == "ainjppnemstpsnonwrfldnon" } ']; if !isNil "actionCarry" then { player removeAction actionCarry; actionCarry = nil; }; actionCarry = player addAction ["Carry","common\client\actions\noScript.sqf",' _dragged = (nearestPlayers(getPosATL player,5,false,"array") - [player]); { if (animationState _x == draggedAnim) exitWith { _dragged = _x; }; } forEach _dragged; if (typeName _dragged == "ARRAY") then { _dragged = _dragged select 0; }; detach _dragged; [nil,_dragged,rSWITCHMOVE,"ainjpfalmstpsnonwrfldnon_carried_up"] call RE; player switchMove "acinpknlmstpsraswrfldnon_acinpercmrunsraswrfldnon"; sleep 10; _dragged attachTo [player,[0,-0.1,-1.2], "RightShoulder"]; [nil, _dragged, rSETDIR, 180] call RE; ',1,false,true,"",'animationState _target in draggerAnims']; if !isNil "actionDrop" then { player removeAction actionDrop; actionDrop = nil; }; actionDrop = player addAction ["Drop","common\client\actions\noScript.sqf",' _dragged = (nearestPlayers(getPosATL player,5,false,"array") - [player]); { _anim = animationState _x; if (_anim == draggedAnim || _anim in carriedAnims) exitWith { _dragged = _x; }; } forEach _dragged; if (typeName _dragged == "ARRAY") then { _dragged = _dragged select 0; }; detach _dragged; player playAction "released"; if (animationState _dragged in carriedAnims) exitWith { [nil,_dragged,"loc",rSWITCHMOVE,"AinjPfalMstpSnonWrflDnon_carried_down"] call RE; }; [nil,_dragged,"loc",rSWITCHACTION,"released"] call RE; ',1,false,true,"",'animationState _target in (draggerAnims+[carrierAnim])' ]; if !isNil "actionRearm" then { player removeAction actionRearm; actionRearm = nil; }; actionRearm = player addAction ["Rearm stationary weapon","common\client\actions\noScript.sqf"," _vcl = cursorTarget; player groupChat ""rearming...""; player playMove ""ainvpknlmstpslaywrfldnon_medic""; curTime = time; waitUntil{ animationState player == ""ainvpknlmstpslaywrfldnon_medic""}; waitUntil{ animationState player != ""ainvpknlmstpslaywrfldnon_medic""}; if (time - curTime > 7) then { _vcl setVehicleAmmo 1; }; ",1,false,true,"",' _cT = cursorTarget; if !isNull _cT then { _cT isKindOf "staticWeapon" && alive _cT } ']; }; changeTyre = { private ["_vcl","_tyre"]; _vcl = cursorTarget; _tyre = _vcl call getTyre; player groupChat "changing tyre..."; player playMove "ainvpknlmstpslaywrfldnon_medic"; sleep 3; waitUntil { animationState player != "ainvpknlmstpslaywrfldnon_medic"}; [nil, nil, rSPAWN, [_vcl, _tyre], { (_this select 0) setHit [_this select 1, 0]; (_this select 0) setVelocity[0,0,1]; }] call RE; }; getTyre = { private ["_offset","_pos"]; _offset = [-1,1.7,-2]; _pos = _this modelToWorld _offset; if (player distance _pos < 1.5 && canSee(player,_pos,45)) exitWith { "wheel_1_1_steering" }; _offset = [-1,-1.7,-2]; _pos = _this modelToWorld _offset; if (player distance _pos < 1.5 && canSee(player,_pos,45)) exitWith { "wheel_1_2_steering" }; _offset = [1,1.7,-2]; _pos = _this modelToWorld _offset; if (player distance _pos < 1.5 && canSee(player,_pos,45)) exitWith { "wheel_2_1_steering" }; _offset = [1,-1.7,-2]; _pos = _this modelToWorld _offset; if (player distance _pos < 1.5 && canSee(player,_pos,45)) exitWith { "wheel_2_2_steering" }; };private "_code"; _code = _this select 3; if ((typeName _code) == "ARRAY") then { { call compile _x; } forEach _code; } else { call compile _code; }; aiMonitor = { private ["_ai","_gun","_ais","_guns"]; _ais = nearestEastMen(getPosATL player,100,true,"array"); _guns = nearestObjects[getPosATL player, eastStationaryGuns, 500]; _ai = objNull; _gun = objNull; if (count _ais > 0) then { if (vehicle (_ais select 0) == (_ais select 0)) then { _ai = _ais select 0; }; }; if (count _guns > 0) then { _gun = gunner (_guns select 0); }; if (isNull _gun && isNull _ai) exitWith {}; [nil,server,"loc",rSPAWN,[_ai,player,_gun],{ _ai = _this select 0; _plr = _this select 1; _gun = _this select 2; if !isNull _ai then { _ai reveal _plr; _ai setUnitPos "UP"; _ai doWatch _plr; _ai doMove getPosATL _plr; }; if !isNull _gun then { _gun reveal _plr; _dir = ((getPosATL _plr select 0) - (getPosATL _gun select 0)) atan2 ((getPosATL _plr select 1) - (getPosATL _gun select 1)); group _gun setFormDir _dir; _gun doTarget _plr; sleep 1; curTime = time; while { time - curTime < 5 } do { vehicle _gun fireAtTarget [_plr,currentWeapon vehicle _gun]; sleep (0.1 + random 0.2); }; }; }] call RE; }; // findHousesFront; find enterable houses close to the player findHousesFront = { private ["_buildings","_minPositions","_enterables"]; // find houses within a certain radius based on a position _buildings = nearestObjects [_this select 0, ["House"], _this select 1]; // house should have _minPositions spawn points, 0 based _minPositions = (_this select 2) - 1; _enterables = []; { //checking if enough spawn positions are found in the house ([0,0,0] returned means illegal position), //if it's a house from OA (optional through mapping defines), is not listed in 'ILLEGALHOUSES', is not damaged and player can see it if ( format["%1", _x buildingPos _minPositions] != "[0,0,0]" && EP1HOUSES && !(typeOf _x in ILLEGALHOUSES) && damage _x == 0 && canSee(player,_x,60) ) then { _enterables set [count _enterables, _x]; }; } forEach _buildings; _enterables }; // makes up the AI name based on player squad name plus a incrementing number and returns it // each player has its "own" AI spawned, defined by the count defined in the mission params // from 25% == 1 AI up to 100% == 4 AIs per player findSquadAIName = { private ["_i","_squad","_str","_unit","_plrs","_pos","_arr"]; _squad = _this select 0; _i = _this select 1; if (_i > maxAIPerPlayer) exitWith { "" }; _str = format["%1ai%2", _squad, _i]; if isNil _str exitWith { _str }; _unit = call compile _str; if isNull _unit exitWith { _str }; _pos = getPosATL _unit; _plrs = nearestPlayers(_pos,SPAWNRANGE,true,"array"); if ( alive _unit && !(str leader _unit in eastPlayerStrings) && ( (count _plrs == 0 || !arrCanSee(_plrs,_unit,90,100)) || (!(player in _plrs) && !arrCanSee(_plrs,_unit,35,50)) ) ) exitWith { _str }; [_squad, _i+1] call findSquadAIName; }; #define findSquadAIName(X) ([X,1] call findSquadAIName) #define exitCondition (findSquadAIName(player) == "" || !alive player) fillHouseEast = { private ["_x","_process","_arr","_inc","_pID","_pos","_bool","_unit","_name","_class","_ai","_nPos","_house","_cCount","_hID","_wCount","_i","_group","_skill"]; scopeName "fillHouseEastMain"; _house = _this select 0; _wCount = _this select 1; _inc = _this select 2; // when this is true, setVehicleInit is processed (i.e. AI is created) _process = false; // number of spawn positions in a house _nPos = nPos(_house); // 0 based count of OPFOR infantry class members _cCount = count eastInfClasses - 1; // random spawn position _x = round random (_nPos-1); // checks if the house is a valid house for AI spawns (if not it's -1) _hID = CACHEHOUSEPOSITIONS find (typeOf _house); _arr = []; if (_hID != -1 && _wCount > 0) then { _arr = CACHEHOUSEPOSITIONS select (_hID + 1); }; for [{ _i=_x},{ _i<((_nPos-1)+_x)},{ _i=_i+_inc}] do { if (count _arr == 0 && _wCount > 0 && _hID != -1) exitWith {}; _pos = _house buildingPos (_i % _nPos); if (count _arr > 0) then { _pID = (_arr select 0); _pos = _house buildingPos _pID; _arr = _arr - [(_arr select 1)] - [_pID]; }; // create an AI at _pos if no other "Man" in radus of 3 meters of _pos if (count nearestObjects[_pos, ["Man"], 3] == 0) then { _name = findSquadAIName(player); if (_name == "") exitWith { breakTo "fillHouseEastMain"; }; _bool = !isNil _name; if _bool then { _bool = alive (call compile _name); }; // when the AI unit (found by name) is alive, make sure it's healthy and, make it // "look-alive" by issuing a move command if _bool exitWith { _unit = call compile _name; _unit setPosATL _pos; _unit setDamage 0; [server,server,"loc",rSPAWN,_unit,{ _this doMove getPosATL _this; sleep 1; doStop _this; }] call RE; if DEBUG then { server globalChat format["moving %1", _name]; }; }; // if there are no appropriate AI units around, prepare for spawning them if DEBUG then { server globalChat format["spawning %1", _name]; }; _class = eastInfClasses select (random _cCount); _group = [player, "EastAIGrp", "", "east"] call getGroup; // create an AI group _ai = _group createUnit [_class, spawnPos, [], 0, "NONE"]; _ai setPosATL _pos; _skill = aiSkill / 10; call compile format[' %1 = _ai; _ai setVehicleInit '' this setVehicleVarName ''''%1''''; %1 = this; doStop this; this addMagazine (%2 select (random (count %2 - 1))); this addMagazine (%2 select (random (count %2 - 1))); // Chance AI will have a nightvision device - Disabled in coop only!!! if (random 100 > 75 && eastRatio > 0) then { if !(this hasWeapon ''''NVGoggles'''') then { this addWeapon ''''NVGoggles''''; if DEBUG then { diag_log format [''''Adding NVG to %1'''', this]; }; }; }; this setSkill %3; this addEventHandler [''''killed'''', { missionNamespace setVariable [''''%1var'''', time]; if (random 100 > 90 || DEBUG) then { _case = createVehicle [''''suitcase'''', %4, [], 0, ''''None'''']; _case setPosATL getPosATL (_this select 0); }; }]; ''; ', _name, IEDList, _skill, spawnPos]; _process = true; }; sleep 0.1; }; // spawns the AI prepared with 'setVehicleInit' if _process then { processInitCommands; }; }; aiSpawn = { private ["_inc","_hPos","_eCount","_wUnits","_wCount","_house","_clear","_gMkr","_houses","_hCount"]; if exitCondition exitWith {}; // player dead or has no name for ai squad name generation, then exit _houses = [getPosATL player, SPAWNRANGE, 3] call findHousesFront; // find available houses for spawn posits _hCount = count _houses; if (_hCount == 0) exitWith {}; _inc = 6; if (_hCount < 10) then { _inc = 3; }; for "_j" from 0 to (count _houses - 1) do { _house = _houses select _j; _clear = _house getVariable "cleared"; _gMkr = str(_house call getGridPos); if (markerColor _gMkr == "ColorRed" && isNil "_clear") then { // make sure it's a red square _hPos = getPosATL _house; _eCount = count nearestObjects[_hPos, ["Man"], 15]; _wUnits = nearestPlayers(_hPos,SPAWNRANGE-200,true,"array"); _wCount = count _wUnits; // players need not to be within SPAWNRANGE-200 from a house or they need not to see the spawn position for its AI to spawn if (_eCount == 0 && (_wCount == 0 || !arrCanSee(_wUnits,_hPos,30,50))) then { [_house, _wCount, _inc] call fillHouseEast; }; }; if exitCondition exitWith {}; }; }; // aiDespawn, removes dead AI aiDespawn = { private ["_unit","_str","_var","_plrs"]; for "_i" from 1 to 4 do { _str = format["%1ai%2", player, _i]; if !isNil _str then { _unit = call compile _str; if isNull _unit exitWith {}; if !alive _unit then { _str = _str + "var"; if (_unit distance graveDigger < 10) exitWith { if DEBUG then { server globalChat format["deleting %1 at gravedigger...", format["%1ai%2", player, _i]]; }; deleteVehicle _unit; missionNamespace setVariable [_str, nil]; }; _plrs = nearestPlayers(getPosATL _unit,200,true,"array"); if (count _plrs == 0 || !arrCanSee(_plrs,_unit,35,30)) then { _var = missionNamespace getVariable _str; if isNil "_var" exitWith { missionNamespace setVariable [_str, time]; }; if (time - _var < infDeleteTime) exitWith { if DEBUG then { server globalChat format["waiting to delete %1: %2s left", format["%1ai%2", player, _i], infDeleteTime - (time - _var)]; }; }; if (_unit distance graveDigger >= 10 && isPlayer _unit && !isNull group _unit) exitWith { _unit call setGrpNull; }; if DEBUG then { server globalChat format["deleting %1...", format["%1ai%2", player, _i]]; }; deleteVehicle _unit; missionNamespace setVariable [_str, nil]; }; sleep 0.01; }; }; }; }; // returns East AI to the gravedigger position setGrpNull = { private "_unit"; _unit = _this; if DEBUG then { server globalChat format["sending %1 to gravedigger", format["%1ai%2", player, _unit]]; }; if alive _unit then { _unit setDamage 1; }; [_unit] join group graveDigger; _unit setPosATL getPosATL graveDigger; }; // this function has no purpose in 0.72 - I assume it was originally used for AIs bought by players and forgotten /* groupAI = { private ["_unit","_waited"]; scopeName "main"; if (isDead(player) || lifeState player != "ALIVE" || vehicle player != player) exitWith {}; if (nearestEastMen(getPosATL player,respawnRange,true,"count") > 0) exitWith {}; if ((round (time*10)) % 50 != 0) exitWith {}; { if !(isNil _x) then { _unit = call compile _x; if (isNull _unit) exitWith {}; _waited = _unit getVariable "waited"; if !(isDead(_unit) && alive _unit && local _unit) exitWith { if !(isNil "_waited") then { _unit setVariable ["waited", nil]; }; }; if (isNil "_waited") exitWith { _unit setVariable ["waited", true]; breakTo "main"; }; _unit setVariable ["waited", nil]; _unit setPosATL getPosATL player; breakTo "main"; }; } forEach squadUnitStrings(squadString(player)); }; */player createDiaryRecord ["Diary", [ "Credits", " Mission by pogoman, revised and further developed by Fireball.
Insurgency is based on the gamemode created by Project Reality (an excellent realism mod for battlefield 2).
The patrolling AI vehicles use Kronzy's fantastic Urban Patrol Script (UPS).
Thanks to Swedge for the briefing contribution.
Converted to ACE and heavily modified by Strikor

15th Insurgency was converted from op4gaming.us Insurgancy mission and further modified by Cytreen Spiegel

3rd party scripts in 15th Insurgency by Bon_Inf* and Oliver.
" ] ]; player createDiaryRecord["Diary", ["Teamspeak Info","Teamspeak 3 Address: ts3.15thmeu.net:9177 pass:15nd"]]; player createDiaryRecord ["Diary", [ "Controls", " Respawn camera additional controls:
N: night vision, M: open map

The M136 requires no magazines, it is a single shot disposable weapon as irl.

If your Humvee's wheel(s) are busted you can change the tyre if via the ACE action menu if you have a spare tire and are close enough to the damaged tyre with the spare.

Ctrl+TAB: Toggle Insurgency menu.

Shift+PageUp: Increase color intensity.

Shift+PageDown: Decrease color intensity.

" ] ]; //----------Misc---------- player createDiaryRecord["Diary", ["Misc","If you can not read the sign post go to Options>Video>Advanced>Interface Size Set to Small or varry small"]]; player createDiaryRecord["Diary", ["Misc","The sign posts around the base will aid in explaining Base Features"]]; player createDiaryRecord["Diary", ["Misc","HMMWV respawn after 60 seconds, APCs after 3 minutes, Tanks and Transport Choppers after 5 minutes, Attack Helicopter after 10 minutes."]]; player createDiaryRecord["Diary", ["Misc","Vehicles can be repaired at the Vehicle Service here."]]; player createDiaryRecord["Diary", ["Misc","Helichopter can be repaired at the Chopper service here."]]; // --------- Assets ---------- player createDiaryRecord["Diary", ["Assets","Support Trucks are here."]]; player createDiaryRecord["Diary", ["Assets","Attack helicopters are here."]]; player createDiaryRecord["Diary", ["Assets","Transport Helicopters are here."]]; player createDiaryRecord["Diary", ["Assets","APCs and Tanks are here."]]; player createDiaryRecord["Diary", ["Assets","HMMWVs are here."]]; player createDiaryRecord["Diary", ["Assets","Base Hospital assets are located Hospital."]]; player createDiaryRecord["Diary", ["Assets","Base Ammobox here."]]; player createDiaryRecord["Diary", ["Assets",""]]; //if (ambientCivilians == 1) then { //player createDiaryrecord["Diary", ["Civilian Population"," //

//Command has issued a warning about the local population. It seems that a Terrorist Cell Organization is recruiting the local populace into there ranks.

//Be vary wary when approaching civilians. Do not get Complacent in your duty as some of them may be working with the Insurgence by setting up IEDs. It has been confirmed that the use of Cellphones and pagers in detonation of IED.

//Some Civilians are believed to conceal bombs in the clothing in hops of becoming a martyr. Suspect everything even when entering a house.

//If someone looks suspicious keep an eye on them for behavior changes. If they react in unfriendly manner confirm with command on your ROE.

"] //] //}; player createDiaryRecord ["Diary", [ "Mission and Situation", " * BLUFOR objective is to find and destroy up to 9 ammo caches.

* When OPFOR units are killed, some will drop silver briefcases. Every briefcase that is collected by BLUFOR reveals another map clue showing the rough distance to an ammo cache. Ammo caches can then be located and destroyed with a satchel or other explosives.

* Red grid-squares may contain OPFOR units and need to be cleared by BLUFOR to become green grid-squares. For this to happen there must be no OPFOR units in the square and at least 1 BLUFOR infantry (up to 3, depending on mission settings) must enter it on foot.

" ] ]; player createDiaryRecord ["Diary", [ "BLUFOR Instructions", " * If at any time there is not text to spawn on the MHQ press your Map Key.

* Injured players can be revived by other players. Dead players cannot.

* To change your weapon as BLUFOR, go to the ammo boxes on the ground next to HQ and choose 'Gear' from the action menu.

* Dead BLUFOR can respawn at the HQ or on group-members. You can only spawn on group-members if they are not wounded or not close to enemy.

* BLUFOR players can choose the 'Mobilise HQ' option from the action menu when nearby, to request permission to move the HQ.

* On the map, click on a player/vehicle's marker to see their position then again for name.

* If a BLUFOR vehicle wheel is damaged, get close ACE action menu show cargo unload tire. Ace menu the tire. Move Tire to damage wheel. Ace actionn menu Vehicle select 'Replace Tyre' waite for the load bar to compleat.

* To use weapons such as the mortar, one player must drop a Tripod bag, then a player carrying the M252 bag must aim at the tripod bag and choose the Assemble option from the action menu.

* Group leaders can request Helicopter Transport with the Communication command on the radio. Press 0 then 8 then 'Control Helicopter'. The player will take control of the pilot remotely. While doing this he will be unable to control his group leader unit. Press Backspace to return to control of your group leader unit.

* Players can request Close Air Support with the Communication command on the radio. Press 0 then 8 then 'Request CAS (A10)'. These requests must be approved by the group leader. When instructed, click the location on the map that you intend to bomb. You will then control the A10 remotely. CAS is available every 20 minutes.

" ] ]; player createDiaryRecord ["Diary", ["Mission Information","Base assets are on very long respawn timers, MHQ assets are normal. Abuse of base assets will be punished.

ACE wounding system is enabled. All players can use bandages, morphine, and epinephrine, and Medkits.

Vehicle service can take a few minutes and varies by vehicle type.

IEDs are present. See something suspicious? Hit it with a 203, AT, or just stay the hell away." ] ]; // -------------Server Rules ------------------- player createDiaryRecord ["Diary",["15th Server Rules","Server Rules and Regulations

Teamspeak 3 presence is required for air and armor use. The Teamspeak server is for ACRE use only. If you do not have ACRE installed and are on TS keep coms to a minimum. If there is a larg enough server population without ACRE please use the none ACRE channel.

* Minor Infractions - Warn then kick. Repeated violations after a kick will result in a ban.

Piloting Aircraft and Driving Armor assets without Voice communication

Special Duty Roles - If all special duty roles are full and no one is apparently doing their jobs or responding to request to assist. The highest ping of the non-performing players in the Special Duty Roles will be kicked first.

Team Killing - When unknown if teamkilll is intentional or not ask, the offender to be mindfull of other players. Repeated teamkilling will be viewed as intentional.

Shooting at vehicles for rides - Shooting at vehicles for a ride is not a proper way to ask for transport. If they kill someone in a vehicle while shooting them will result in a kick.

Language and Racial Comments/Jokes - Name calling, foul language and racial related comments or jokes are not tolerated. Ask the offender to cease their activity.

* Major Infractions - These are infractions that result in immediate banning.

These are serious so be sure that you are absolutely certain befor reporting violators. If you witnessed the violations or that you have several witnesses reporting the violation.

Griefing - Griefing is the purposeful act of making the game un-enjoyable for other players. Acts such as shooting players in the legs.

Scripting/Hacking - Any confirmed hacking and scripting such as but not limited to; an admin observing a player teleporting across the island, spawning a vehicle right in front of them or flying an aircraft they do not have the permissions to fly.

Intentional Killing - If you witness someone walk up to another person and shoot them. Or watching someone taking a 5-ton truck and ramming a fully loaded helicopter are some examples.
" ] ]; player createDiaryRecord ["Diary",["15thmeu Information","

First and foremost - we are NOT the real 15th Marine Expeditionary Unit. We are an Armed Assault Realism Unit with a very high view of the Corps, and a very high view on realistic gaming. We gather and play to simulate a Marine Corps environment, in honor of the real Leathernecks who serve.

We play ArmA II in all of its forms. Armed Assault is a great combat simulator that is very conducive to the environment we've set here. Armed Assault information can be found at http://www.arma2.com/

That being said, we do share more than a few similarities. We're simulating a Marine environment in a virtual world - same ranks, same ideals, same values. Hell, even a few of our members are Marines or are planning to serve in the Corps. They bring their experience to the table to further enhance our Unit.


We uphold the Corps Values of Honor, Courage and Commitment.

Honor: Marines are held to a high standard of the utmost ethical and moral behavior. Honesty and honor are held in great regard. Respect for others is essential. You are expected to act responsibly in a mature and dependable manner. Every Marine is accountable for his or her actions and meeting the highest standard of the Corps.

Courage: Courage is not the absence of fear. It is the ability to face fear and overcome it. It is the mental, moral and physical strength ingrained in Marines. It steadies them in times of stress, carries them through every challenge and aids them in facing new and unknown confrontations.

Commitment: Commitment is the spirit of determination and dedication found in Marines. It is what impels Marines to serve our country and the Corps. Every aspect of life in the Corps shows commitment, from the high standard of excellence to the vigilances the Marines show for training.

Next Page

Why do we do this? We'd like to think that a member in our unit would take from these and be a better person for it. A better person for the unit and hopefully a better person in life. They will learn what it is work together in team and work towards a common goal. They will learn what the words determination and dedication mean. They will learn to be dependable, respectful, and respectable.

They will earn the right to be called a Marine in the 15th MEU Realism Unit, and they will uphold all that comes with that title so not to tarnish the great name of the Corps and those who serve it.

If this sounds like something you're interested in, by all means please register and let us know. But keep in mind, once you take that step and commit to joining, we're going to hold you the same standards we hold every other member to.

Semper Fidelis
Command Staff
http://www.15thmeu.net
" ] ]; //Misc #define night (daytime >= 18 || daytime <= 6) #define time2 (time - startTime) #define isEast (typeOf player in eastInfClasses) #define isWest (typeOf player in westSoldierClasses) #define remoteControlling (typeOf cameraOn == HELITYPE && (driver cameraOn in units group player || !(player in crew cameraOn))) #define sTypes ["#ZRPole", "#ZRTrava"] //Gear #define leaderItems [] #include "gear\loadouts.sqf" //Injured //#define healPlace0 [0.75,0.15,0] //#define healPlace1 [-0.75,0.1,0] //#define healInjuredModelChestPos [0,0.08,0] //#define bloodloosCrit 30 //#define bloodlossFreq 60 //#define bloodlossInc 5 //#define reviveTime 300 //#define minHealTime 20 //#define healAnims ["ainvpknlmstpsnonwrfldnon_ainvpknlmstpsnonwrfldnon_medic","ainvpknlmstpsnonwrfldnon_medic","ainvpknlmstpsnonwrfldr_medic0s","ainvpknlmstpsnonwrfldnon_medic0s","ainvpknlmstpsnonwrfldr_medic0","ainvpknlmstpsnonwrfldnon_medic0","ainvpknlmstpsnonwrfldr_medic1","ainvpknlmstpsnonwrfldnon_medic1","ainvpknlmstpsnonwrfldr_medic2","ainvpknlmstpsnonwrfldnon_medic2","ainvpknlmstpsnonwrfldr_medic3","ainvpknlmstpsnonwrfldnon_medic3","ainvpknlmstpsnonwrfldr_medic4","ainvpknlmstpsnonwrfldnon_medic4","ainvpknlmstpsnonwrfldr_medic5","ainvpknlmstpsnonwrfldnon_medic5"] //#define draggedAnim "ainjppnemstpsnonwrfldb_still" //#define draggerAnims ["acinpknlmstpsraswrfldnon","acinpknlmwlksraswrfldb"] //#define carrierAnim "acinpercmstpsraswrfldnon" //#define carriedAnims ["ainjpfalmstpsnonwrfldnon_carried_up","ainjpfalmstpsnonwrfldnon_carried_down","ainjpfalmstpsnonwrfldnon_carried_still","ainjpfalmstpsnonwrfldf_carried_fallwc"] //Respawn #define respawnRange 75 #define A10respawn 1500 #define artyRespawn 1800 #define eastRespawnTime 30 getQuantity = { private ["_str","_unit","_wep2","_arr","_wep","_quantity"]; if isEast exitWith { "" }; scopeName "main"; _str = ""; _wep = _this; _quantity = call compile format["quantity%1", _wep]; if (!isNil "_quantity") then { _str = str(_quantity - nearestWeapons(_wep,CENTERPOS,AORADIUS,true,"count")); }; if (_wep in limitedGearList) then { for "_i" from 0 to (count limitedSquadGear - 1) do { _arr = limitedSquadGear select _i; if (_wep in _arr) then { for "_j" from 0 to (count _arr - 1) do { _wep2 = _arr select _j; { if (!isNil _x) then { _unit = call compile _x; if (_unit hasWeapon _wep2 && !isDead(_unit) && alive _unit) exitWith { _str = format["H-%1-%2", squadNumber(_unit), unitNumber(_unit)]; breakTo "main"; }; }; } forEach squadUnitStrings(squadString(player)); }; }; }; }; _str }; replaceInventoryAmmo = { private ["_magazines","_newMag","_oldMags","_replacement","_inc","_size","_type"]; _newMag = _this select 0; _oldMags = _this select 1; _magazines = _this select 2; if isNil "_newMag" exitWith { _magazines }; if ((_oldMags select 0) == "20rnd_762x51_B_SCAR" && !((_oldMags select 0) in _magazines)) then { _oldMags set[0, "20Rnd_762x51_B_SCAR"]; }; _replacement = []; _inc = getNumber(configFile >> 'CfgMagazines' >> _newMag >> 'type'); _size = 128; if (_inc >= 256) then { _size = 3072; }; { _type = getNumber(configFile >> 'CfgMagazines' >> _x >> 'type'); if (_type == _inc || _type == _inc*2 || _type == _inc/2 || _type == _inc*6 || _type == _inc/6) then { _size = _size - _type; }; } forEach (_magazines - _oldMags); for "_i" from _inc to _size step _inc do { _replacement = _replacement + [_newMag] }; _magazines = (_magazines - _oldMags) + _replacement; _magazines }; displayInventory = { private ["_inventorySlots","_loadout","_miscItemSlots","_sidearmInventorySlots","_wSlot","_sSlot","_iSlot","_count","_space","_inventoryGUI","_sidearmInvGUI","_miscInvGUI"]; _loadout = _this; _inventoryGUI = 3503; _sidearmInvGUI = 3515; _miscInvGUI = 3523; for [{_count = 0},{_count < 12},{_count = _count + 1}] do {CtrlSetText[_inventoryGUI + _count,"\Ca\UI\Data\ui_gear_mag_gs.paa"]}; for [{_count = 0},{_count < 8},{_count = _count + 1}] do {CtrlSetText[_sidearmInvGUI + _count,"\Ca\UI\Data\ui_gear_mag_gs.paa"]}; for [{_count = 0},{_count < 12},{_count = _count + 1}] do {CtrlSetText[_miscInvGUI + _count,"\Ca\UI\Data\ui_gear_eq_gs.paa"]}; _inventorySlots = []; _sidearmInventorySlots = []; _miscItemSlots = []; _wSlot = 0; _sSlot = 0; _iSlot = 0; { _space = getNumber(configFile >> 'CfgMagazines' >> _x >> 'type'); if (_space >= 256) then { ctrlSetText[_inventoryGUI + _wSlot, getText(configFile >> 'CfgMagazines' >> _x >> 'picture')]; _wSlot = _wSlot + 1; _inventorySlots = _inventorySlots + [_x]; for [{_count = _space/256 - 1},{_count > 0},{_count = _count - 1}] do { ctrlSetText[_inventoryGUI + _wSlot,""]; _wSlot = _wSlot + 1; _inventorySlots = _inventorySlots + [""]; }; }; if (_space == 16) then { ctrlSetText[_sidearmInvGUI + _sSlot,getText(configFile >> 'CfgMagazines' >> _x >> 'picture')]; _sSlot = _sSlot + 1; _sidearmInventorySlots = _sidearmInventorySlots + [_x]; for [{_count = _space/16 - 1},{_count > 0},{_count = _count - 1}] do { ctrlSetText[_sidearmInvGUI + _sSlot,""]; _sSlot = _sSlot + 1; _sidearmInventorySlots = _sidearmInventorySlots + [""]; }; }; if (_space == 0) then { _space = getNumber(configFile >> 'CfgWeapons' >> _x >> 'type'); ctrlSetText[_miscInvGUI + _iSlot, getText(configFile >> 'CfgWeapons' >> _x >> 'picture')]; _iSlot = _iSlot + 1; _miscItemSlots = _miscItemSlots + [_x]; for [{_count = _space/131072 - 1},{_count > 0},{_count = _count - 1}] do { ctrlSetText[_miscInvGUI + _iSlot,""]; _iSlot = _iSlot + 1; _miscItemSlots = _miscItemSlots + [""]; }; }; } forEach _loadout; [_inventorySlots,_sidearmInventorySlots,_miscItemSlots] }; gearDialog = { private ["_updateFiller","_list","_id","_currentRow","_currentData","_currentValue","_currentItem","_listMagazines","_quantity","_skip","_oldMags","_currentMags","_currentMagazines","_slist","_index","_type","_currentWeapons","_displayInv","_u","_currentSpecials","_currentItems","_currentMag","_currentMagValue","_currentPrimary","_currentSecondary","_currentSidearm","_sideGear","_picture","_i","_data","_inventorySlots","_sidearmInventorySlots","_miscItemSlots","_updateUnit","_slot","_x","_magTypeOld","_typeOld","_magTypeNew","_typeNew","_count","_weapons","_ammo","_filler","_lastFiller","_primaries","_secondaries","_sidearms","_misc","_all","_lb","_lbm","_primaryIDC","_secondaryIDC","_sidearmIDC","_specialIDC","_display","_totalWeapons","_fillerIDC","_fillerTypes","_listPictures","_old","_replaceArray","_getMagazines","_fillList","_addMagazine","_addItem"]; if dialog exitWith { closeDialog 0; }; createDialog "RscGear"; _primaries = primaries; _secondaries = secondaries; _sidearms = sidearms; _misc = misc; _all = _primaries + _secondaries + _sidearms + _misc; lbChange = false; lbMainAction = ""; inventoryClick = -1; WF_Gear_Action = ""; primClicked = false; secoClicked = false; sideClicked = false; saveLoadout = false; buyLoadout = false; _displayInv = false; _updateUnit = true; _updateFiller = false; disableSerialization; _lb = 3700; _lbm = 3701; _primaryIDC = 3500; _secondaryIDC = 3501; _sidearmIDC = 3502; _specialIDC = 3535; _display = findDisplay 16000; _totalWeapons = count primaries + count secondaries + count sidearms; _fillerIDC = [3401,3402,3403,3404,3405]; _fillerTypes = ["all","primaries","secondaries","sidearms","misc"]; _inventorySlots = []; _lastFiller = "nil"; _id = _fillerTypes find "primaries"; _list = []; _listPictures = []; _listMagazines = []; _miscItemSlots = []; _sidearmInventorySlots = []; (_display DisplayCtrl (_fillerIDC select _id)) ctrlSetTextColor [0.7, 1, 0.7, 1]; _currentItem = ""; _currentMags = []; _currentMagValue = 0; _currentData = ""; _currentValue = ""; _currentPrimary = ""; _currentSecondary = ""; _currentSidearm = ""; _old = ""; _currentWeapons = []; _currentSpecials = []; _currentItems = []; _currentMagazines = []; //--- Set command is just terrific... _replaceArray = { private ["_array","_indexExcluded","_newArray","_x"]; _array = _this select 0; _indexExcluded = _this select 1; _newArray = []; for [{_x = 0},{_x < count(_array)},{_x = _x + 1}] do { if (_x != _indexExcluded) then { _newArray = _newArray + [_array select _x]; }; }; _newArray }; _getMagazines = { private ["_artm","_tm"]; _tm = getArray(configFile >> "CfgWeapons" >> _this >> "magazines"); _artm = _tm; { if (!(_x in legalMagazines)) then {_artm = _artm - [_x]}; } forEach _tm; _artm }; _fillList = { private ["_list","_filler","_i","_listBox","_listBoxArray","_u","_quant","_class","_char","_name","_pic"]; _list = _this select 0; _filler = _this select 1; _listBox = _this select 2; _listBoxArray = []; _u = 0; _i = 0; { _quant = _x call getQuantity; if (_filler == "magazine") then { _quant = ""; }; _class = "CfgMagazines"; if ( (!(_x in legalMagazines) || (_x in legalMagazines && _x in secondaries)) && _filler != "magazine") then { _class = "CfgWeapons"; }; _name = getText(configFile >> _class >> _x >> "displayName"); _pic = getText(configFile >> _class >> _x >> "picture"); if (_name == "") then { _name = toArray(_x); for "_j" from 0 to (count _name - 1) do { _char = [_name select _j]; if (toString(_char) == "_" || _j >= (count _name - 3)) then { _name set[_j,toArray(" ") select 0]; }; }; _name = toString(_name); _pic = getText(configFile >> "cfgVehicles" >> _x >> "picture"); }; lnbAddRow [_listBox,[_quant,_name]]; lnbSetPicture [_listBox,[_i,0],_pic]; lnbSetData [_listBox,[_i,0],_filler]; lnbSetData [_listBox,[_i,1],_quant]; lnbSetValue [_listBox,[_i,0],_u]; _i = _i + 1; _u = _u + 1; } forEach _list; lnbSetCurSelRow [_listBox,0] }; _addMagazine = { private ["_type","_mag","_magazines","_size","_inc"]; _magazines = _this select 0; _mag = _this select 1; _inc = getNumber(configFile >> "CfgMagazines" >> _mag >> "type"); _size = 128; if (_inc >= 256) then { _size = 3072; }; { _type = getNumber(configFile >> "CfgMagazines" >> _x >> "type"); if (_type == _inc || _type == _inc*2 || _type == _inc/2 || _type == _inc*6 || _type == _inc/6) then { _size = _size - getNumber(configFile >> "CfgMagazines" >> _x >> "type"); }; } forEach _magazines; if (_size >= _inc) then {_magazines = _magazines + [_mag]; }; _magazines }; _addItem = { private ["_items","_limit","_mag","_size"]; _items = _this select 0; _mag = _this select 1; _size = 0; _limit = 12; {_size = _size + 1} forEach _items; if (_size + 1 <= _limit) then {_items = _items + [_mag]}; _items }; server setVariable ["filler", "all"]; while {alive player && dialog} do { scopeName "main"; _filler = server getVariable "filler"; //--- _filler Changed. if (_filler != _lastFiller || _updateFiller) then { _updateFiller = false; _list = call compile format["_%1", _filler]; lnbClear _lb; [_list,_filler,_lb] call _fillList; _id = _fillerTypes find _filler; {(_display displayCtrl _x) ctrlSetTextColor [1, 1, 1, 1]} forEach _fillerIDC; (_display displayCtrl (_fillerIDC select _id)) ctrlSetTextColor [0.7, 1, 0.7, 1]; //--- Update the list since the _filler changed. lbChange = true; }; //--- List Selection Changed. if lbChange then { lbChange = false; _currentRow = lnbCurSelRow _lb; _currentData = lnbData[_lb,[_currentRow,0]]; _currentValue = lnbValue[_lb,[_currentRow,0]]; _currentItem = _list select _currentValue; lnbClear _lbm; _listMagazines = _currentItem call _getMagazines; [_listMagazines,'magazine',_lbm] call _fillList; }; //--- Player have clicked on one of the listbox. if (lbMainAction != "") then { _quantity = lnbData [_lb,[lnbCurSelRow _lb, 1]]; if (lbMainAction != "addWeapon") then { _quantity = ""; }; if (_quantity == "NA") exitWith { player groupChat "this item is not available"; lbMainAction = ""; }; if (_quantity == "0") exitWith { player groupChat "unavailable at this time"; lbMainAction = ""; }; if (_quantity != "1" && _quantity != "2" && _quantity != "") exitWith { player groupChat "your squad is already using a weapon of this type"; lbMainAction = ""; }; switch lbMainAction do { case "addWeapon": { _skip = true; if (_filler == "primaries" || _filler == "secondaries" || _filler == "sidearms" || _filler == "all") then { if (_currentItem in misc) then {_skip = false;_currentValue = _currentValue - _totalWeapons}; if (_skip) then { _slist = call compile format ["_%1",_currentData]; _index = _slist find _currentItem; _type = getNumber(configFile >> "CfgWeapons" >> _currentItem >> "type"); if (_type == 0) then { _currentData = "secondary"; }; if (_type == 4 && getNumber(configFile >> "CfgWeapons" >> _currentPrimary >> "type") == 5) exitWith { player groupChat "you cannot carry two heavy weapons"; lbMainAction = ""; breakTo "main"; }; if (_type == 5 && _currentSecondary != "") exitWith { player groupChat "you cannot carry two heavy weapons"; lbMainAction = ""; breakTo "main"; }; if (_index != -1) then { if (_type == 1 || _type == 5) then {_currentData = "primary"} else { if (_type == 4) then {_currentData = "secondary"} else { if (_type == 2) then {_currentData = "sidearm"}; }; }; if ( (_currentData == "primary" && _currentItem in limitedGearList && _currentSecondary in limitedGearList) || (_currentData == "secondary" && _currentItem in limitedGearList && _currentPrimary in limitedGearList) ) exitWith { player groupChat "you cannot use two different specialised weapons"; lbMainAction = ""; breakTo "main"; }; call compile format [" _old = _current%1; _currentWeapons = _currentWeapons - [_current%1]; _current%1 = _slist select _index; _picture = getText(configFile >> ""CfgWeapons"" >> _currentItem >> ""picture""); if (_type == 0) then { _picture = getText(configFile >> ""CfgVehicles"" >> _currentItem >> ""picture""); }; ctrlSetText[_%1IDC,_picture] ",_currentData]; _currentMags = _currentItem call _getMagazines; _oldMags = []; if (!isNil "_old") then { _oldMags = _old call _getMagazines; }; _currentMagazines = [_currentMags select 0,_oldMags,_currentMagazines] call replaceInventoryAmmo; }; _currentWeapons = _currentWeapons + [_currentItem]; _displayInv = true; }; }; if (_filler == "misc" || !_skip) then { _type = getNumber(configFile >> "CfgWeapons" >> _currentItem >> "type"); if (_type == 0 || _type == 65536) then { _type = getNumber(configFile >> "CfgMagazines" >> _currentItem >> "type"); if (_type == 16 || _type >= 256) then { _currentMagazines = [_currentMagazines,_currentItem] call _addMagazine; _displayInv = true; }; }; if (_type == 4096 && count _currentSpecials < 3 && !(_currentItem in _currentSpecials)) then { _currentSpecials = _currentSpecials + [_currentItem]; _u = 0; { _index = misc find _x; ctrlSetText[_specialIDC + _u,getText(configFile >> "CfgWeapons" >> _x >> "picture")]; _u = _u + 1; } forEach _currentSpecials; _displayInv = true; }; if (_type == 131072) then { if (!(_currentItem in _currentItems)) then { _currentItems = [_currentItems,_currentItem] call _addItem; _displayInv = true; }; }; }; }; case "addMagazine": { _currentMagValue = lnbValue[_lbm,[lnbCurSelRow _lbm,0]]; _currentMag = _currentItem call _getMagazines select _currentMagValue; _currentMagazines = [_currentMagazines,_currentMag] call _addMagazine; _displayInv = true; }; }; lbMainAction = ""; }; //--- Remove a weapon by clicking on it. if (primClicked) then {primClicked = false;if (_currentPrimary != "") then {ctrlSetText [_primaryIDC,"\ca\ui\data\ui_gear_gun_gs.paa"];_index = primaries find _currentPrimary;_currentWeapons = _currentWeapons - [_currentPrimary];_currentPrimary = "";_displayInv = true}}; if (secoClicked) then {secoClicked = false;if (_currentSecondary != "") then {ctrlSetText [_secondaryIDC,"\ca\ui\data\ui_gear_sec_gs.paa"];_index = secondaries find _currentSecondary;_currentWeapons = _currentWeapons - [_currentSecondary];_currentSecondary = "";_displayInv = true}}; if (sideClicked) then {sideClicked = false;if (_currentSidearm != "") then {ctrlSetText [_sidearmIDC,"\ca\ui\data\ui_gear_hgun_gs.paa"];_index = sidearms find _currentSidearm;_currentWeapons = _currentWeapons - [_currentSidearm];_currentSidearm = "";_displayInv = true}}; if (_updateUnit) then { _currentWeapons = respawnWeapons; _currentMagazines = respawnMagazines; _currentSpecials = []; _currentItems = []; _currentPrimary = ""; _currentSecondary = ""; _currentSidearm = ""; _sideGear = _currentWeapons; {if (!(_x in _all)) then {_sideGear = _sideGear - [_x]}} forEach _currentWeapons; _currentWeapons = _sideGear; _sideGear = _currentMagazines; {if (!(_x in misc) && !(_x in legalMagazines)) then {_sideGear = _sideGear - [_x]}} forEach _currentMagazines; _currentMagazines = _sideGear; ctrlSetText [_primaryIDC,"\ca\ui\data\ui_gear_gun_gs.paa"]; ctrlSetText [_secondaryIDC,"\ca\ui\data\ui_gear_sec_gs.paa"]; ctrlSetText [_sidearmIDC,"\ca\ui\data\ui_gear_hgun_gs.paa"]; ctrlSetText [3535,"\Ca\UI\Data\ui_gear_eq_gs.paa"]; ctrlSetText [3536,"\Ca\UI\Data\ui_gear_eq_gs.paa"]; { _index = primaries find _x; if (_index != -1) then {_currentPrimary = primaries select _index; ctrlSetText[_primaryIDC,getText(configFile >> "CfgWeapons" >> _x >> "picture")]}; _index = secondaries find _x; if (_index != -1) then { _currentSecondary = secondaries select _index; _picture = getText(configFile >> "CfgWeapons" >> _x >> "picture"); if (_picture == "") then { _picture = getText(configFile >> "CfgVehicles" >> _x >> "picture"); }; ctrlSetText[_secondaryIDC,_picture]; }; _index = sidearms find _x; if (_index != -1) then {_currentSidearm = sidearms select _index;ctrlSetText[_sidearmIDC,getText(configFile >> "CfgWeapons" >> _x >> "picture")]}; _index = misc find _x; if (_index != -1) then { _type = getNumber(configFile >> "CfgWeapons" >> _x >> "type"); if (_type == 0) then { _type = getNumber(configFile >> "CfgMagazines" >> _x >> "type"); }; switch _type do { case 4096: { _currentSpecials = _currentSpecials + [_x]; _u = 0; { _i = misc find _x; ctrlSetText[_specialIDC + _u,getText(configFile >> "CfgWeapons" >> _x >> "picture")]; _u = _u + 1; } forEach _currentSpecials; }; case 131072: { _currentItems = _currentItems + [_x]; }; }; }; } forEach _currentWeapons; _currentWeapons = _currentWeapons - misc; _data = (_currentMagazines + _currentItems) call DisplayInventory; _inventorySlots = _data select 0; _sidearmInventorySlots = _data select 1; _miscItemSlots = _data select 2; _updateUnit = false; }; //--- Remove a magazine by clicking on it. if (inventoryClick != -1) then { //--- Main Inventory. if (inventoryClick > 3502 && inventoryClick < 3515) then { _slot = inventoryClick - 3503; if (_slot < count _inventorySlots) then { _index = _currentMagazines find (_inventorySlots Select _slot); if (_index != -1) then {_currentMagazines = [_currentMagazines,_index] call _replaceArray}; }; }; //--- Handgun Inventory if (inventoryClick > 3514 && inventoryClick < 3523) then { _slot = inventoryClick - 3515; if (_slot < count _sidearmInventorySlots) then { _index = _currentMagazines find (_sidearmInventorySlots Select _slot); if (_index != -1) then {_currentMagazines = [_currentMagazines,_index] call _replaceArray}; }; }; //--- Misc Inventory if (inventoryClick > 3522 && inventoryClick < 3535) then { _slot = inventoryClick - 3523; if (_slot < count _miscItemSlots) then { _index = _currentItems find (_miscItemSlots Select _slot); if (_index != -1) then {_currentItems = [_currentItems,_index] call _replaceArray}; }; }; //--- Remove a special item. if (inventoryClick == 3535 || inventoryClick == 3536) then { _slot = inventoryClick - 3535; if (_slot < count _currentSpecials) then { _currentSpecials = _currentSpecials - [_currentSpecials select _slot]; for [{_x = 0},{_x < 2},{_x = _x + 1}] do {ctrlSetText[_specialIDC + _x,"\Ca\UI\Data\ui_gear_eq_gs.paa"]}; _u = 0; { _index = misc find _x; ctrlSetText[_specialIDC + _u,getText(configFile >> "CfgWeapons" >> _x >> "picture")]; _u = _u + 1; } forEach _currentSpecials; }; }; InventoryClick = -1; _displayInv = true; }; //--- Custom UA. if (WF_Gear_Action != "") then { switch (WF_Gear_Action) do { case "reload": { if !(isNil "respawnWeapons") then { _currentPrimary = ""; _currentSecondary = ""; _currentSidearm = ""; _currentWeapons = []; _currentItems = []; _currentSpecials = []; { _index = primaries find _x; if (_index != -1) then {_currentWeapons = _currentWeapons + [_x];_currentPrimary = _x;ctrlSetText[_primaryIDC,getText(configFile >> "CfgWeapons" >> _x >> "picture")]} else { _index = secondaries find _x; if (_index != -1) then {_currentWeapons = _currentWeapons + [_x];_currentSecondary = _x;ctrlSetText[_secondaryIDC,getText(configFile >> "CfgWeapons" >> _x >> "picture")]} else { _index = sidearms find _x; if (_index != -1) then {_currentWeapons = _currentWeapons + [_x];_currentSidearm = _x;ctrlSetText[_sidearmIDC,getText(configFile >> "CfgWeapons" >> _x >> "picture")]}; }; }; _index = misc find _x; if (_index != -1) then { _type = getNumber(configFile >> "CfgWeapons" >> _x >> "type"); if (_type == 0) then { _type = getNumber(configFile >> "CfgMagazines" >> _x >> "type"); }; switch _type do { case 4096: { _currentSpecials = _currentSpecials + [_x]; }; case 131072: { _currentItems = _currentItems + [_x]; }; }; }; } forEach respawnWeapons; if (_currentPrimary == "") then {ctrlSetText [_primaryIDC,"\ca\ui\data\ui_gear_gun_gs.paa"]}; if (_currentSecondary == "") then {ctrlSetText [_secondaryIDC,"\ca\ui\data\ui_gear_sec_gs.paa"]}; if (_currentSidearm == "") then {ctrlSetText [_sidearmIDC,"\ca\ui\data\ui_gear_hgun_gs.paa"]}; _currentMagazines = respawnMagazines; for [{_x = 0},{_x < 2},{_x = _x + 1}] do {ctrlSetText[_specialIDC + _x,"\Ca\UI\Data\ui_gear_eq_gs.paa"]}; _u = 0; { _index = misc find _x; ctrlSetText[_specialIDC + _u,getText(configFile >> "CfgWeapons" >> _x >> "picture")]; _u = _u + 1; } forEach _currentSpecials; _displayInv = true; }; }; case "clear": { _currentPrimary = ""; _currentSecondary = ""; _currentSidearm = ""; _currentWeapons = []; _currentItems = []; _currentSpecials = []; _currentMagazines = []; ctrlSetText [_primaryIDC,"\ca\ui\data\ui_gear_gun_gs.paa"]; ctrlSetText [_secondaryIDC,"\ca\ui\data\ui_gear_sec_gs.paa"]; ctrlSetText [_sidearmIDC,"\ca\ui\data\ui_gear_hgun_gs.paa"]; for [{_x = 0},{_x < 2},{_x = _x + 1}] do {ctrlSetText[_specialIDC + _x,"\Ca\UI\Data\ui_gear_eq_gs.paa"]}; _displayInv = true; }; }; WF_Gear_Action = ""; }; //Kit Limiting _quantity = _currentPrimary call getQuantity; if (_quantity != "" && _quantity != "1" && _quantity != "2") then { _currentWeapons = _currentWeapons - [_currentPrimary] + [startWeapon]; _magTypeOld = getArray(configFile >> "CfgWeapons" >> _currentPrimary >> "magazines") select 0; if !(_magTypeOld in respawnMagazines) then { _magTypeOld = getArray(configFile >> "CfgWeapons" >> _currentPrimary >> "magazines") select 1; }; _typeOld = getNumber(configFile >> 'CfgMagazines' >> _magTypeOld >> 'type'); _magTypeNew = getArray(configFile >> "CfgWeapons" >> startWeapon >> "magazines") select 0; _typeNew = getNumber(configFile >> 'CfgMagazines' >> _magTypeNew >> 'type'); _count = count respawnMagazines; respawnMagazines = respawnMagazines - [_magTypeOld]; for "_i" from 0 to ((_count - count respawnMagazines)*(_typeOld/_typeNew) - 1) do { respawnMagazines = respawnMagazines + [_magTypeNew]; }; respawnWeapons = respawnWeapons - [_currentPrimary] + [startWeapon]; _currentPrimary = startWeapon; _updateFiller = true; _updateUnit = true; }; _quantity = _currentSecondary call getQuantity; if (_quantity != "" && _quantity != "1" && _quantity != "2") then { _currentWeapons = _currentWeapons - [_currentSecondary]; _magTypeOld = getArray(configFile >> "CfgWeapons" >> _currentSecondary >> "magazines") select 0; if !(_magTypeOld in respawnMagazines) then { _magTypeOld = getArray(configFile >> "CfgWeapons" >> _currentSecondary >> "magazines") select 1; }; _typeOld = getNumber(configFile >> 'CfgMagazines' >> _magTypeOld >> 'type'); _magTypeNew = getArray(configFile >> "CfgWeapons" >> _currentPrimary >> "magazines") select 0; _typeNew = getNumber(configFile >> 'CfgMagazines' >> _magTypeNew >> 'type'); _count = count respawnMagazines; respawnMagazines = respawnMagazines - [_magTypeOld]; for "_i" from 0 to ((_count - count respawnMagazines)*(_typeOld/_typeNew) - 1) do { respawnMagazines = respawnMagazines + [_magTypeNew]; }; respawnWeapons = respawnWeapons - [_currentSecondary]; _currentSecondary = ""; _updateFiller = true; _updateUnit = true; }; //--- Show inventory (Icons). if (_displayInv) then { _displayInv = false; _data = (_currentMagazines + _currentItems) call displayInventory; _inventorySlots = _data select 0; _sidearmInventorySlots = _data select 1; _miscItemSlots = _data select 2; }; //--- Buy a loadout. if (buyLoadout) then { buyLoadout = false; respawnWeapons = _currentWeapons + _currentSpecials + _currentItems; respawnMagazines = _currentMagazines; if (player distance HQ < 50 && isWest) then { hint "Weapons updated!"; call loadout; _updateFiller = true; }; _weapons = (_currentWeapons + _currentSpecials + _currentItems); _ammo = _currentMagazines; _data = (_currentMagazines + _currentItems) call displayInventory; _inventorySlots = _data select 0; _sidearmInventorySlots = _data select 1; _miscItemSlots = _data select 2; }; _lastFiller = _filler; sleep 0.05; }; }; if isWest then { #ifndef __BAF__ primaries = [ "M16A2", "M16A2GL", "M24_des_EP1", "M14_EP1", "m240_scoped_EP1", "M249_EP1", "M249_TWS_EP1", "M249_m145_EP1", "M4A1", "M4A3_CCO_EP1", "M4A3_RCO_GL_EP1", "SCAR_L_CQC", "SCAR_L_CQC_Holo", "SCAR_L_STD_Mk4CQT", "SCAR_L_STD_EGLM_RCO", "SCAR_L_CQC_EGLM_Holo", "SCAR_L_STD_EGLM_TWS", "SCAR_L_STD_HOLO", "SCAR_H_CQC_CCO", "SCAR_H_STD_EGLM_Spect", "M8_HOLO_SD", "M8_COMPACT_PMC", "M8_CARBINE_PMC", "AA12_PMC", "G36A_camo", "G36C_camo", "G36_C_SD_camo", "G36K_camo" ]; secondaries = [ "M136", "Javelin", "US_Assault_Pack_EP1", "US_Assault_Pack_Ammo_EP1", "US_Assault_Pack_AmmoSAW_EP1", "US_Assault_Pack_Explosives_EP1", "US_Patrol_Pack_EP1", "US_Patrol_Pack_Ammo_EP1", "US_Patrol_Pack_Specops_EP1", "US_Backpack_EP1", "US_Backpack_AmmoMG_EP1", "US_Backpack_AT_EP1", "US_Backpack_Specops_EP1", "Tripod_Bag", "M252_US_Bag_EP1", "TOW_TriPod_US_Bag_EP1", "MK19_TriPod_US_Bag_EP1", "M2HD_mini_TriPod_US_Bag_EP1", "M2StaticMG_US_Bag_EP1" ]; sidearms = [ "Colt1911", "M9", "glock17_EP1", "UZI_EP1", "UZI_SD_EP1", "Sa61_EP1" ]; misc = [ "HandGrenade_West", "IR_Strobe_Target", "IR_Strobe_Marker", "SmokeShell", "SmokeShellRed", "SmokeShellGreen", "SmokeShellBlue", "SmokeShellYellow", "SmokeShellOrange", "SmokeShellPurple", "FlareWhite_M203", "FlareYellow_M203", "FlareGreen_M203", "FlareRed_M203", "1Rnd_HE_M203", "1Rnd_Smoke_M203", "1Rnd_SmokeRed_M203", "1Rnd_SmokeGreen_M203", "1Rnd_SmokeYellow_M203", "Laserdesignator", "Mine", "PipeBomb", "Binocular", "NVGoggles", "Binocular_Vector", "ItemCompass", "ItemGPS", "ItemMap", "ItemRadio", "ItemWatch" ]; #else primaries = [ "M14_EP1", "BAF_L110A1_Aim", "BAF_L7A2_GPMG", "BAF_L85A2_RIS_ACOG", "BAF_L85A2_RIS_CWS", "BAF_L85A2_RIS_Holo", "BAF_L85A2_RIS_SUSAT", "BAF_L85A2_UGL_ACOG", "BAF_L85A2_UGL_Holo", "BAF_L85A2_UGL_SUSAT", "BAF_L86A2_ACOG", "BAF_LRR_scoped", "M16A2", "M16A2GL", "M4A1", "M4A3_CCO_EP1", "M4A3_RCO_GL_EP1", "M8_HOLO_SD", "M8_COMPACT_PMC", "M8_CARBINE_PMC", "AA12_PMC", "G36A_camo", "G36C_camo", "G36_C_SD_camo", "G36K_camo" ]; secondaries = [ "BAF_NLAW_Launcher", "Javelin", "BAF_AssaultPack_RifleAmmo", "BAF_AssaultPack_ARAmmo", "BAF_AssaultPack_MGAmmo", "BAF_AssaultPack_ATAmmo", "BAF_AssaultPack_HATAmmo", "BAF_AssaultPack_Special", "BAF_AssaultPack_FAC", "BAF_AssaultPack_HAAAmmo", "BAF_AssaultPack_LRRAmmo", "Tripod_Bag", "M252_US_Bag_EP1", "TOW_TriPod_US_Bag_EP1", "MK19_TriPod_US_Bag_EP1", "M2HD_mini_TriPod_US_Bag_EP1", "M2StaticMG_US_Bag_EP1" ]; sidearms = [ "Colt1911", "M9", "glock17_EP1", "UZI_EP1", "UZI_SD_EP1", "Sa61_EP1" ]; misc = [ "BAF_L109A1_HE", "IR_Strobe_Target", "IR_Strobe_Marker", "SmokeShell", "SmokeShellRed", "SmokeShellGreen", "SmokeShellBlue", "SmokeShellYellow", "SmokeShellOrange", "SmokeShellPurple", "FlareWhite_M203", "FlareYellow_M203", "FlareGreen_M203", "FlareRed_M203", "1Rnd_HE_M203", "1Rnd_Smoke_M203", "1Rnd_SmokeRed_M203", "1Rnd_SmokeGreen_M203", "1Rnd_SmokeYellow_M203", "Laserdesignator", "Mine", "PipeBomb", "Binocular", "NVGoggles", "Binocular_Vector", "ItemCompass", "ItemGPS", "ItemMap", "ItemRadio", "ItemWatch" ]; #endif }; GGATCGVAGGATGALFGGATSFFO@pw~ UUUUUUUU-m۶m#QUUU5Զmۆ$UUI$~` UUWJI$I$IJUUUTUUUUUUUUUUUU7m[bU5=M$\AXWU}$Ir AWUU $Iy UU$ApU϶mۅڶUUTPUUUU1m۶a;ӜUU\ځM}!qZTV gޏ!% "(B`? HAH$I$BTWUUG㉘!qM5I$I$AUUUVI 55X-۰m)JTWUU_H$L$ cP&x' P\\TUUUUUUUUIDI6M۱=ӜWVTVڶb+6by55r ۳ۯ{UUWTx&bT\P?nm۶-EmkUUUUUUUUUUUUUUU ^cm cUUUݱ !T\SIo6j %U$E)WCZzI$H$UWTWUUUUUUUUUUUU Fb#mUUI'Ĝ U\% ѶmUUUMةg] UVpI$I$AUUUVUUUUUUUUUUUUUUUUI$I$UUU$I$u UUU̕ !p^U H$I$bTUUUUUUUUUUUp,sUU5gIr P cAU 'uI9,c Ux wI$O' cUUWTj9*Q cAIqP`.0 bb&I$\!PZUUz[r=Y6ZPsaie^` c aMCs!b -)\y!U_PX$I$AiUUUɗI$ c5UUf-H1ZA-U~&b$!WXXWUUUU@7a -~:xQ W~|6v =؄MӜ WTVVo_E6Q}ss}N%2IJ$!T\\:;ZGGATCGVAGGATGALFGGATSFFO@pw~ UUUUUUUUI$IXqUUU5׶mۆ$UUI$~` UUWLI$I$iJUUUTUUUUUUUUUUUU9m[bU5=Mqsyܶb'p&M$!\^WWooȖ60b}C}P: R9V^^JKhandleDamage = { private ["_unit","_hitArea","_damage","_shooter","_ammoUsed","_bool"]; _unit = _this select 0; _hitArea = _this select 1; _damage = _this select 2; _shooter = _this select 3; _ammoUsed = _this select 4; _bool = (_hitArea == "legs" || _hitArea == "hands") && (handsHit _unit == 1 || !canStand _unit); if (!alive _unit) exitWith { _damage}; if (_hitArea == "" && vehicle player == player) exitWith {0}; if (lifeState _unit == "UNCONSCIOUS") exitWith { bloodloss = bloodloss + _damage; if (bloodloss > 100) then { bloodloss = 100; }; hintSilent ("Approximate bloodloss: "+str(round bloodloss)+"%\nCritical bloodloss: 30%"); if (bloodloss >= bloodloosCrit) then { player setDamage 1; }; 0 }; if (vehicle _unit != _unit && _damage > 0.9 && lifeState _unit != "UNCONSCIOUS") exitWith { _unit setUnconscious true; _unit setDamage 0.8; 0.8 }; if (_hitArea == "body" && _damage > 0.9 && lifeState _unit != "UNCONSCIOUS") exitWith { _unit setUnconscious true; _unit setDamage 0.8; 0.8 }; if (_bool && _damage > 0.9 && lifeState _unit != "UNCONSCIOUS") exitWith { _unit setUnconscious true; _unit setDamage 0.8; _damage }; _damage }; handleHeal = { private ["_healPlace","_injured","_anim","_pWep","_posh","_posi","_dy","_dx","_dir"]; _injured = _this select 0; _healPlace = "healPlace0"; _anim = animationState _injured; if (_anim == draggedAnim || _anim in carriedAnims) exitWith { player groupChat "you must release the soldier first!"; false }; _pWep = primaryWeapon player; if (_pWep == "") exitWith { player groupChat "due to scripting limitations you need a primaryWeapon to perform this action"; }; if (currentWeapon player != _pWep) then { player selectWeapon _pWep; sleep 2; }; if ((player distance (_injured modelToWorld healPlace1))<((_injured modelToWorld healPlace0) distance player)) then { _healPlace = "healPlace1"; }; if (_healPlace == "healPlace0") then { player attachTo [_injured, healPlace0]; player playActionNow "medicStartRightSide"; } else { player attachTo [_injured, healPlace1]; player playActionNow "medicStart"; }; sleep 0.001; _posh = player modelToWorld [0,0,0]; _posi = _injured modelToWorld healInjuredModelChestPos; _dy = (_posh select 1) - (_posi select 1); _dx = (_posh select 0) - (_posi select 0); _dir = getDir player; player setDir (270 - (_dy atan2 _dx) - direction _injured); [nil, _injured, "loc", rSPAWN, player, { _healer = _this; nMedics = nMedics + 1; if (animationState player != "ainjppnemstpsnonwrfldnon") then { player playAction "agonyStart"; }; curTime = time - 1; waitUntil { animationState _healer in healAnims }; waitUntil { if (animationState player != "ainjppnemstpsnonwrfldnon") then { player playAction "agonyStart"; }; !alive player || !(animationState _healer in healAnims) || round(time - curTime)*nMedics >= round(minHealTime + bloodloss) }; nMedics = nMedics - 1; if (alive player && animationState _healer in healAnims) then { player setDamage 0; }; }] call RE; waitUntil { animationState player in healAnims }; curTime = time; waitUntil { !(animationState player in healAnims) || !alive _injured || damage _injured == 0}; if (lifeState player == "ALIVE") exitWith { detach player; player switchAction "medicStart"; player playActionNow "medicStop"; true }; false }; injuredLoop = { private ["_bool","_agony"]; { if (lifeState _x == "UNCONSCIOUS") then { _agony = format["%1inAgony", _x]; _bool = missionNamespace getVariable _agony; if isNil "_bool" then { missionNamespace setVariable [_agony, false]; _bool = false; }; if !_bool then { missionNamespace setVariable [_agony, true]; _x spawn animations; }; }; } forEach playableUnits; }; ppEffects = { //if (isNil "ppEffectsOn") then { ppEffectsOn = false; }; //if (isNil "ppUnconscious") then { ppUnconscious = ppEffectCreate [["radialblur", 170], ["colorcorrections", 1580]]; }; if (alive player && lifeState player == "UNCONSCIOUS" && floor((time - curTime)*10 % 5) == 0) then { if!(ppEffectsOn) then { ppEffectsOn = true; { _x ppEffectEnable true } forEach ppUnconscious; }; ppUnconscious select 0 ppEffectAdjust [random 0.005 + 0.0025, random 0.005 + 0.0025, 0.0, 0.0]; ppUnconscious select 0 ppEffectCommit 0.5; ppUnconscious select 1 ppEffectAdjust [1.0, 1.0, 0.0, random 0.6, 0.0, 0.0, random 0.6, 0.0, 1.0, 1.0, 1.0, 0.199, 0.587, 0.114, 0.0]; ppUnconscious select 1 ppEffectCommit 0.5; }; if ((!alive player || lifeState player != "UNCONSCIOUS") && ppEffectsOn) then { { _x ppEffectEnable false} forEach ppUnconscious; ppEffectsOn = false; }; }; initBloodloss = { private ["_anim"]; curTime = time; nMedics = 0; if (animationState player in healAnims) then { detach player; player switchAction "medicStart"; player playActionNow "medicStop"; }; if (animationState player in (draggerAnims+[carrierAnim]+carriedAnims+[draggedAnim])) then { detach player; player switchAction "released"; }; waitUntil { !(animationState player in healAnims) }; if (vehicle player == player) then { player playAction "agonyStart"; }; if (!captive player) then { [nil,player, rSETCAPTIVE, true] call RE; }; while{ alive player && damage player > 0}do{ waitUntil { nMedics == 0 }; if (round(time - curTime) % bloodlossFreq == 0) then { if (bloodloss >= bloodloosCrit) exitWith { player setDamage 1; }; hint ("Approximate bloodloss: "+str(round bloodloss)+"%\nCritical bloodloss: 30%"); _anim = animationState player; if (_anim == draggedAnim || _anim in carriedAnims) exitWith {}; if (!captive player) then { [nil,player, rSETCAPTIVE, true] call RE; }; player playAction "agonyStart"; waitUntil { animationState player == "ainjppnemstpsnonwrfldnon"}; curTime = time; waitUntil { _anim = animationState player; if (_anim != "ainjppnemstpsnonwrfldnon" && _anim != draggedAnim && !(_anim in carriedAnims)) then { player playAction "agonyStart"; }; (time - curTime) > bloodloss*bloodlossFreq/bloodloosCrit || nMedics > 0 }; }; bloodloss = bloodloss + bloodloosCrit/reviveTime; sleep 1; }; if (captive player) then { [nil,player, rSETCAPTIVE, false] call RE; }; player setUnconscious false; if (!alive player) exitWith {}; player playAction "agonyStop"; }; animations = { if isWest then { _this removeAllEventHandlers "handleHeal"; _this addEventHandler ["handleHeal", { _this spawn handleHeal; }]; _this sideChat (switch floor random 2 do { case 0: { "[ugh]"}; case 1: { "[aaah]"}; default { "[arrrrrrrghhhhhh]"}}); }; if (player == _this) then { [] spawn initBloodloss; }; while { lifeState _this == "UNCONSCIOUS"} do { if (vehicle _this != _this) then { _this playAction "GestureAgonyCargo"; waitUntil { vehicle _this == _this }; if (player == _this) then { player playAction "agonyStart"; }; }; waitUntil { vehicle _this != _this || animationState _this == "ainjppnemstpsnonwrfldnon" || lifeState _this != "UNCONSCIOUS" }; _this playAction "GestureSpasm" + str floor random 7; waitUntil { vehicle _this != _this || animationState _this != "ainjppnemstpsnonwrfldnon" || lifeState _this != "UNCONSCIOUS" }; _this playAction "GestureNod"; }; waitUntil { !isNull _this }; _this removeAllEventHandlers "handleHeal"; missionNamespace setVariable [format["%1inAgony", _this], false]; }; private ["_sign","_weapons","_oldPlayerGroup","_playerGroupMembers","_pos","_oldUnit","_Block","_A10Timer","_c","_ctrlText","_PlayerGroup","_HQstate", "_dir", "_xpos", "_ypos", "_vector"]; call disableSerialization; _Block = 10; _A10Timer = time; //_ArtyTimer = time; // arty is definitely an overkill in Insurgency _PlayerGroup = grpNull; _HQstate = startLocation; if isEast then { eastSpawnPos = getMarkerPos "respawn_east"; eastPlayer = player; removeAllWeapons player; }; if isWest then { [] spawn { call disableSerialization; while { true } do { //UI call playerTags; call vehicleTags; sleep 0.1; }; }; }; if isWest then { [] spawn { _aiTimer = time; while { true } do { //AI call aiSpawn; call aiDespawn; if (time - _aiTimer > 30) then { _aiTimer = time; call aiMonitor; }; //call groupAI; sleep 0.1; }; }; }; while { isWest } do { //Injured // call injuredLoop; // call ppEffects; //Markers call gridPath; if (markersEnabled == 1) then { call playerMarkers; call vehicleMarkers; call markerTexts; }; //Misc call clearHouses; call casePickup; // call oneShotM136; call nameStrings; if (_HQstate != startLocation) then { if (_HQstate == HQ) then { hint "HQ mobilised!"; } else { hint "HQ deployed!"; "USFLAG" setMarkerPosLocal startPos; }; _HQstate = startLocation; }; if (getMarkerPos "USFLAG" distance (vehicleServicePoint modelToWorld [10,0,0]) > 10) then { "USFLAG" setMarkerPosLocal (vehicleServicePoint modelToWorld [10,0,0]); }; if (remoteControlling && heliRC == 1) then { hintSilent "You are remotely controlling this vehicle. Press the 'Backspace' key at any time to exit."; if (!alive cameraOn || !alive driver cameraOn || !alive player) then { call exitRC; }; }; //make sure the player returns to his original squad group unless he's piloting the heli _playerGroupMembers = groupMembers(true,"array"); if ((count units group player == 1 && count _playerGroupMembers > 0) && lifeState player != "UNCONSCIOUS" && heliRC == 1) then { _PlayerGroup = group (_playerGroupMembers select 0); if (isNil "heli") exitWith { }; //'heli' might not be a valid object until initWestVehicle has run if (driver heli in units _PlayerGroup) exitWith {}; _oldPlayerGroup = group player; [player] joinSilent _PlayerGroup; deleteGroup _oldPlayerGroup; }; //Respawn if (isDead(player) && isNull respawnCamera) then { [] spawn respawnSystem; }; if (livesLeft == 0 && time > 30) then { if (nearestPlayers(CENTERPOS,AORADIUS,true,"count") == 0) then { endMission "LOSER"; }; }; //Support if !(a10Mode == 0) then { call supportTimer; }; // check to see if a player logged in as admin isAdmin = serverCommandAvailable "#kick"; sleep 0.1; }; while { isEast } do { //Injured // call injuredLoop; //Markers call AImarkers; call markerTexts; //Respawn if (isDead(player) && !visibleMap) then { hintSilent "To start playing, open your map and click on the ai unit you wish to become. You can switch units at any time during the game by doing this. If there are no ai units visible on the map it means no blufor players are near hostile areas and so no ai have spawned. In this case either wait awhile or join the blufor team."; }; if (!alive player && player != eastPlayer) then { // respawn delay for east players _c = eastRespawnTime; waitUntil { cutRsc["Rtags", "PLAIN"]; _ctrlText = (uiNamespace getVariable 'TAGS_HUD') displayCtrl 64434; _ctrlText ctrlSetStructuredText parseText format[ "Respawn in %1" , abs ceil _c, "#FFFFFF"]; _c = _c - 0.1; sleep 0.1; (ceil _c) <= 0 }; _oldUnit = player; selectPlayer eastPlayer; [_oldUnit] joinSilent oldGroup; }; if (player distance eastSpawnPos > 10 && isDead(player)) then { player setPosATL eastSpawnPos; }; if (player distance startPos < hqProtectionRing && !isDead(HQ)) then { _pos = getPosATL player; _dir = getDirTo(player, startPos); if (_dir < 0) then { _dir = 360 + _dir; }; _vector = [sin(_dir),cos(_dir)]; _xpos = (_pos select 0) - (_vector select 0); _ypos = (_pos select 1) - (_vector select 1); _pos = [_xpos,_ypos,0]; player setPosATL _pos; hintSilent "You are not allowed near the enemy's main base."; }; //UI call eastPlayerTags; sleep 0.1; }; private ["_mkr","_var","_pos","_houses"]; _houses = [CENTERPOS,AORADIUS, 3, true] call findHouses; { _pos = _x call getGridPos; _mkr = str _pos; if (getMarkerPos _mkr select 0 == 0) then { _mkr = createMarkerLocal[_mkr, _pos]; _mkr setMarkerShapeLocal "RECTANGLE"; _mkr setMarkerTypeLocal "SOLID"; _mkr setMarkerSizeLocal [50,50]; _mkr setMarkerAlphaLocal 0.2; }; _var = missionNamespace getVariable format["%1cleared", _mkr]; if isNil "_var" then { _mkr setMarkerColorLocal "ColorRed"; } else { _mkr setMarkerColorLocal "ColorGreen"; }; } forEach _houses; if (isWest && markersEnabled == 1) then { { _mkr = createMarkerLocal[_x, spawnPos]; _mkr setMarkerTypeLocal "mil_triangle"; _mkr setMarkerSizeLocal [0.5,0.7]; } forEach westPlayerStrings; { _mkr = createMarkerLocal[_x, spawnPos]; _mkr setMarkerTypeLocal "mil_triangle"; _mkr setMarkerSizeLocal [0.8,1.0]; _i = westVehicleStrings find _x; if (_i > 3 && _i < 8) then { _mkr setMarkerSizeLocal [0.65,0.85]; }; } forEach westVehicleStrings; }; gridPath = { private ["_gMkr"]; if (vehicle player != player) exitWith {}; _gMkr = str(player call getGridPos); if isNil "_gMkr" exitWith {}; if (markerColor _gMkr == "ColorGreen") exitWith {}; if (nearestEastMen(call compile _gMkr,70,true,"count") > 0 || nearestPlayers(call compile _gMkr,140,true,"count") < playersNeeded) exitWith {}; _gMkr setMarkerColor "ColorGreen"; missionNamespace setVariable [format["%1cleared", _gMkr], true]; publicVariable format["%1cleared", _gMkr]; }; AImarkers = { private ["_mkr","_txt","_color","_isPlayer"]; { if (alive _x && _x != graveDigger) then { _mkr = str _x; if (getMarkerPos _mkr select 0 == 0) then { _mkr = createMarkerLocal[_mkr, getPosATL _x]; _mkr setMarkerShapeLocal "ICON"; _mkr setMarkerTypeLocal "mil_triangle"; _mkr setMarkerSizeLocal [0.5,0.7]; _mkr spawn { sleep 10; deleteMarkerLocal _this; }; }; _mkr setMarkerPosLocal getPosATL _x; _mkr setMarkerDirLocal getDir _x; _txt = getText (configFile >> "CfgVehicles" >> typeOf _x >> "displayName"); _isPlayer = str leader _x in eastPlayerStrings; if _isPlayer then { _txt = name _x; }; _mkr setMarkerTextLocal _txt; _color = "ColorRed"; if (_isPlayer || nearestPlayers(getPosATL _x,100,true,"count") > 0 || startPos distance _x < hqProtectionRing) then { _color = "ColorOrange"; }; _mkr setMarkerColorLocal _color; }; } forEach nearestObjects[CENTERPOS, eastInfClasses, AORADIUS]; }; playerMarkers = { private ["_colour","_plr","_vcl"]; { if !isNil _x then { _plr = call compile _x; if(isNull _plr) exitWith { _x setMarkerPosLocal spawnPos; _x setMarkerTextLocal ""; }; _vcl = vehicle _plr; if (_vcl != _plr) exitWith { _x setMarkerPosLocal spawnPos; }; _colour = "ColorBlue"; if (str _plr in squadUnitStrings(squadString(player))) then { _colour = "ColorGreen"; }; if (!alive _plr) then { _colour = "ColorBlack"; }; if (lifeState _plr == "UNCONSCIOUS") then { _colour = "ColorRed"; }; _x setMarkerColorLocal _colour; _x setMarkerPosLocal getPosATL _plr; _x setMarkerDirLocal getDir _plr; } else { _x setMarkerPosLocal spawnPos; _x setMarkerTextLocal ""; }; } forEach westPlayerStrings; }; vehicleMarkers = { private ["_bool","_mkr","_vcl","_crew","_type"]; { if !isNil _x then { _mkr = _x; _vcl = call compile _x; _mkr setMarkerPosLocal getPosATL _vcl; _mkr setMarkerDirLocal getDir _vcl; _crew = crew _vcl; _type = typeOf _vcl; if (!alive _vcl) then { _mkr setMarkerColorLocal "ColorBlack"} else { if (count _crew == 0 || (count _crew == 1 && _type == HELITYPE) ) then { _mkr setMarkerColorLocal "ColorYellow"; } else { _bool = false; for "_i" from 0 to (count _crew - 1) do { if (str (_crew select _i) in squadUnitStrings(squadString(player))) then { _bool = true; }; }; if (_bool) then { _mkr setMarkerColorLocal "ColorGreen"; } else { _mkr setMarkerColorLocal "ColorBlue"; }; }; }; }; } forEach westVehicleStrings; }; markerTexts = { if (isNil "mapClickBool") then { mapClickBool = false; }; if !visibleMap exitWith { if mapClickBool then { mapClickBool = false; }; if mapInUse then { mapInUse = false; }; }; if !(mapClickBool || mapInUse) then { mapClickBool = true; onMapSingleClick ' _pos = [_pos select 0, _pos select 1]; if isEast exitWith { // Mission is set to COOP only if (eastRatio == -1) exitWith { _text = format["The mission is set to COOP only! Please join BLUFOR!",_num]; titleText[_text, "PLAIN", 3]; }; // If teams are not balanced, do not let OPFOR players spawn _num = floor(playersNumber west / eastRatio); _pstr = call compile (player getVariable ["INS_playerString","9"]); if !(unitNumber(_pstr) <= _num) exitWith { _text = format["Only OPFOR units up to slot %1 can spawn, due to imbalance (OPFOR:BLUFOR ratio is 1:%2)!",_num, eastRatio]; titleText[_text, "PLAIN", 3]; }; _units = nearestEastMen(_pos,40,true,"array"); if (count _units == 0) exitWith {}; _unit = _units select 0; if (str leader _unit in eastPlayerStrings) exitWith { player groupChat "Cannot switch into a player''s unit"; }; if (nearestPlayers(getPosATL _unit,100,true,"count") > 0 || startPos distance _unit < hqProtectionRing) exitWith { player groupChat "This unit is too close to the enemy"; }; _unit spawn { _unit = _this; _PlayerGroup = group _unit; [_unit] joinSilent startGroup; _oldUnit = player; waitUntil { local _unit }; selectPlayer _unit; player setVariable ["INS_playerString",str _oldUnit, true]; hint "Switched unit!"; if !(str _oldUnit in eastPlayerStrings) then { [_oldUnit] joinSilent oldGroup; }; oldGroup = _PlayerGroup; }; openMap false; }; _units = nearestObjects[_pos,westAllClasses,40]; if (count _units == 0) exitWith {}; _unit = _units select 0; _mkr = str _unit; if (_unit isKindOf "man" && _mkr in westPlayerStrings) then { _id = unitID(_unit); _name = getName(_unit); if (markerText _mkr == "") exitWith { _mkr setMarkerTextLocal _id; }; if (markerText _mkr == _id) exitWith { _mkr setMarkerTextLocal _name; }; _mkr setMarkerTextLocal ""; }; if (_unit in westVehicles) then { _id = victorID(_unit); if (markerText _mkr == "") exitWith { _mkr setMarkerTextLocal _id; }; _mkr setMarkerTextLocal ""; }; '; }; }; clearHouses = { private ["_house","_cleared","_houses","_gMkr"]; _gMkr = str(player call getGridPos); if (markerColor _gMkr == "ColorRed") then { _houses = [getPosATL player, 8, 3, false] call findHouses; if (count _houses > 0) then { _house = _houses select 0; _cleared = _house getVariable "cleared"; if (isNil "_cleared") then { if (nearestEastMen(getPosATL _house, 10, true, "count") == 0) then { _house setVariable ["cleared", true]; }; }; }; }; }; casePickup = { private ["_cases","_case","_cache"]; if (_Block < 10) exitWith { _Block = _Block + 1; }; _cases = nearestObjects[getPosATL player,["suitcase"], 3]; if (count _cases == 0) exitWith {}; _case = _cases select 0; if isNull _case exitWith {}; _Block = 0; deleteVehicle _case; player groupChat "you retrieved some intel on the location of an ammo cache"; _cache = nearestObjects[getPosATL player, [cacheType], AORADIUS] select 0; if (isNil "_cache") exitWith { hint "Currently, there is no intel on caches within your AO. Time to move on and look elsewhere!"; }; [nil,nil,rSPAWN,_cache,{ if (isServer) then { _this call createIntel; }; hint "New intel received on the location of an ammo cache. A marker has been added to the map."; }] call RE; }; firedEH = { if ((_this select 1) == ATTYPE) then { [] spawn { sleep 0.5; player removeWeapon ATTYPE; }; }; if (captive player) then { [nil,player, rSETCAPTIVE, false] call RE; }; }; oneShotM136 = { if (currentWeapon player == ATTYPE && !(ATMAGTYPE in magazines player)) then { player removeWeapon ATTYPE; player addMagazine ATMAGTYPE; player addWeapon ATTYPE; player selectWeapon ATTYPE; }; if (currentWeapon player != ATTYPE && ATMAGTYPE in magazines player) then { player removeMagazine ATMAGTYPE; }; }; nameStrings = { private ["_id","_name","_plr"]; { _id = westPlayerStrings find _x; if !isNil _x then { _plr = call compile _x; if (!isNull _plr && isPlayer _plr) then { if alive _plr then { if (playerNames select _id == "Error: No unit") exitWith {}; _name = name _plr; if (playerNames select _id != _name) then { playerNames set[_id, _name]; }; }; } else { if (playerNames select _id != "") then { playerNames set[_id, ""]; }; }; } else { if (playerNames select _id != "") then { playerNames set[_id, ""]; }; }; } forEach westPlayerStrings; }; vclisFull = { if (_this isKindOf "man" || _this isKindOf "building") exitWith { false }; if (_this emptyPositions "Driver" > 0) exitWith { false }; if (_this emptyPositions "Gunner" > 0)exitWith { false }; if (_this emptyPositions "Commander" > 0) exitWith { false }; if (_this emptyPositions "Cargo" > 0) exitWith { false }; true }; moveInVehicle = { private ["_id"]; if (_this emptyPositions "Driver" > 0) exitWith { player action["getInDriver", _this]; }; if (_this emptyPositions "Gunner" > 0) exitWith { player action["getInTurret", _this, [0]]; }; if (_this emptyPositions "Commander" > 0) exitWith { player action["getInCommander", _this]; }; if (_this emptyPositions "Cargo" > 0) exitWith { _id = count (crew _this - [driver _this] - [gunner _this] - [commander _this]); player action["getInCargo", _this, _id]; }; }; crewToStr = { private ["_pos","_str","_man","_num","_vcl"]; _num = count _this - 1; _vcl = vehicle (_this select 0); _str = ""; for "_j" from 0 to (_num) do { _man = _this select _j; if (alive _man && str _man in westPlayerStrings) then { _str = _str + getName(_man); _pos = " (Cargo)"; if (driver _vcl == _man) then { _pos = " (Driver)"; }; if (_vcl turretUnit [0] == _man) then { _pos = " (Turret)"; }; if (_vcl turretUnit [1] == _man) then { _pos = " (Front Gunner)"; }; _str = _str + _pos; if (_j < _num) then { _str = _str + "
"; }; }; }; _str }; equals = { private ["_bool","_arr1","_arr2"]; _arr1 = _this select 0; _arr2 = _this select 1; _bool = true; if (count _arr1 != count _arr2) exitWith { false}; for "_i" from 0 to (count _arr1 - 1) do { if (!((_arr1 select _i) in _arr2)) exitWith { _bool = false; }; if (!((_arr2 select _i) in _arr1)) exitWith { _bool = false; }; }; _bool }; private ["_trg"]; _trg = createTrigger ["EmptyDetector", position player]; _trg setTriggerText "Ammo Caches Left"; _trg setTriggerActivation ["ALPHA", "PRESENT", true]; _trg setTriggerStatements ["this", ' hint parseText format[" %1/%2 ammo cache''s have been destroyed. ",cacheCount - count cacheList, cacheCount] ', ""]; _trg = createTrigger ["EmptyDetector", position player]; _trg setTriggerText "Player Identities"; _trg setTriggerActivation ["BRAVO", "PRESENT", true]; _trg setTriggerStatements ["this", ' _str = ""; { if (!isNil _x) then { _plr = call compile _x; if !isNull _plr then { _color = "#0000FF"; if (str _plr in squadUnitStrings(squadString(player))) then { _color = "#00FF00"; }; _str = _str + format[" %2: %3

", _color, unitID(_plr), getName(_plr)]; }; }; } forEach westPlayerStrings; hint parseText _str; ', ""]; _trg = createTrigger ["EmptyDetector", position player]; _trg setTriggerText "Server Load"; _trg setTriggerActivation ["CHARLIE", "PRESENT", true]; _trg setTriggerStatements ["this", ' if (serverLoadHint) exitWith { player groupChat "You may only check the server load every 30 seconds to prevent network lag"; }; serverLoadHint = true; [nil,server,"loc",rSPAWN,player,{ [nil,_this,"loc",rSPAWN,diag_fps,{ hint format["nAiUnits: %1\nnGroups: %2\nServer FPS: %3\n Run Time: %4 mins", numberOfAI, count allGroups, round _this, round (time/60)]; sleep 30; serverLoadHint = false; }] call RE; }] call RE; ', ""]; _trg = createTrigger ["EmptyDetector", position player]; _trg setTriggerText "View Distance - 100"; _trg setTriggerActivation ["DELTA", "PRESENT", true]; _trg setTriggerStatements ["this", 'if (viewDistance > 0) then { setViewDistance (viewDistance - 100); }; hintSilent format["View Distance: %1", viewDistance]', ""]; _trg = createTrigger ["EmptyDetector", position player]; _trg setTriggerText "View Distance + 100"; _trg setTriggerActivation ["ECHO", "PRESENT", true]; _trg setTriggerStatements ["this", 'if (viewDistance < 5000) then { setViewDistance (viewDistance + 100); }; hintSilent format["View Distance: %1", viewDistance]', ""]; _trg = createTrigger ["EmptyDetector", position player]; _trg setTriggerText "Fix Headbug"; _trg setTriggerActivation ["FOXTROT", "PRESENT", true]; _trg setTriggerStatements ["this", ' if (lifeState player == "UNCONSCIOUS") exitWith {}; _pos = getPosATL player; _vcl = "Old_bike_TK_CIV_EP1" createVehicleLocal spawnPos; player moveInDriver _vcl; moveOut player; player setPosATL _pos; deleteVehicle _vcl; player switchCamera "INTERNAL"; detach player; ', ""]; _trg = createTrigger ["EmptyDetector", position player]; _trg setTriggerText "Unflip Vehicle"; _trg setTriggerActivation ["GOLF", "PRESENT", true]; _trg setTriggerStatements ["this", ' _vehicle = vehicle player; if (player != _vehicle) then { _vehicle setPos [getPos _vehicle select 0, getPos _vehicle select 1, 0.5]; _vehicle setVelocity [0,0,-0.5]; }; if (player == _vehicle) then { _objects = player nearEntities[["Car","Motorcycle","Tank"],5]; { if (count _objects > 0) then { _x setPos [getPos _x select 0, getPos _x select 1, 0.5]; _x setVelocity [0,0,-0.5]; }; } forEach _objects; }; ', ""]; if (startLives > -1) then { deleteVehicle _trg; _trg = createTrigger ["EmptyDetector", position player]; _trg setTriggerText "Lives remaining"; _trg setTriggerActivation ["GOLF", "PRESENT", true]; _trg setTriggerStatements ["this", ' hint parseText format[" West lives remaining: %1 ",livesLeft]; ', ""]; }; _trg = createTrigger ["EmptyDetector", position player]; _trg setTriggerText " "; _trg setTriggerActivation ["HOTEL", "PRESENT", true]; _trg = createTrigger ["EmptyDetector", position player]; _trg setTriggerText " "; _trg setTriggerActivation ["INDIA", "PRESENT", true]; if DEBUG then { deleteVehicle _trg; _trg = createTrigger ["EmptyDetector", position player]; _trg setTriggerText "teleport"; _trg setTriggerActivation ["INDIA", "PRESENT", true]; _trg setTriggerStatements ["this", 'hint "Click on map to select teleport destination"; onMapSingleClick "player setPosATL _pos; onMapSingleClick """"; hint ""Teleported!"" " ',""]; }; showRadio true; onPlayerKilled = { if (livesLeft > 0 && time > 30) then { westDeaths = westDeaths + 1; publicVariable "westDeaths"; hint parseText format[" West lives remaining: %1 ",livesLeft]; }; if (remoteControlling && heliRC == 1) then { call exitRC; }; detach player; player setUnconscious false; if (captive player) then { [nil,player, rSETCAPTIVE, false] call RE; }; bloodloss = 0; camPlayer = objNull; deadPos = getPosATL player; [server,server,"loc",rSPAWN,player,{ sleep remPlayerBodyTime; hideBody _this; sleep 10; deleteVehicle _this; }] call RE; }; respawnSystem = { private ["_c","_vehicle","_arr","_camPlayer","_plrs","_ctrlText","_pos"]; call disableSerialization; scopeName "main"; _camPlayer = objNull; respawnCamera = "camera" camCreate [0,0,0]; respawnCamera cameraEffect ["INTERNAL","Back"]; while {isDead(player) && time > 30} do { if (isNull camPlayer || _camPlayer != camPlayer) then { _arr = groupMembers(true,"array")+[fieldHospital]; if (livesLeft == 0) then { _arr = nearestPlayers(CENTERPOS,AORADIUS,true,"array"); }; if (isNull camPlayer) then { camPlayer = _arr select 0; }; camAttachCoords = [0,-3,1.5]; if (camPlayer == fieldHospital) then { camAttachCoords = [-50, 0, 12]; }; respawnCamera camSetTarget camPlayer; titleText [" ","Black in", 2]; respawnCamera camCommit 0; respawnCamera attachTo [camPlayer, camAttachCoords]; _camPlayer = camPlayer; _vehicle = camPlayer; enterSpawn = false; _c = 5; }; if (alive camPlayer && !enterSpawn && isDead(player)) then { if (_c < 5) then { _c = 5; }; if (_vehicle != vehicle camPlayer) then { _vehicle = vehicle camPlayer; respawnCamera attachTo [_vehicle, camAttachCoords]; respawnCamera camSetTarget _vehicle; respawnCamera camCommit 0; }; call respawnTags; }; if (_camPlayer == camPlayer && enterSpawn) then { _plrs = nearestPlayers(getPosATL camPlayer,300,true,"array"); if (camPlayer != fieldHospital && (nearestEastMen(getPosATL camPlayer,respawnRange,true,"count") > 0 || vehicle camPlayer call vclisFull) ) exitWith { enterSpawn = false; _c = 5; }; cutRsc["Rtags", "PLAIN"]; _ctrlText = (uiNamespace getVariable 'TAGS_HUD') displayCtrl 64434; _ctrlText ctrlSetStructuredText parseText format[ "Spawning in %1

Left Arrow: Previous unit
Right Arrow: Next unit
Backspace: Respawn gear menu
" , abs ceil _c, "#FFFFFF"]; if ((ceil _c) <= 0) exitWith { breakTo "main"; }; _c = _c - 0.1; }; if (!alive camPlayer) then { camPlayer = objNull; }; sleep 0.1; }; if (!isNull camPlayer && alive camPlayer) then { call loadout; call addActions; if (vehicle camPlayer != camPlayer) exitWith { (vehicle camPlayer) call moveInVehicle; }; player setDir getDir camPlayer; player setPosATL getPosATL camPlayer; } else { _pos = startLocation modelToWorld [-14,-13+(squadNumber(player)-1)*6+(unitNumber(player)-1)*1.2,0]; player setPosATL _pos; player setDir (getDir startLocation)+90; }; openMap [false,false]; respawnCamera cameraEffect ["terminate","back"]; camDestroy respawnCamera; "dynamicBlur" ppEffectEnable true; "dynamicBlur" ppEffectAdjust [6]; "dynamicBlur" ppEffectCommit 0; "dynamicBlur" ppEffectAdjust [0.0]; "dynamicBlur" ppEffectCommit 5; };exitRC = { objNull remoteControl driver cameraOn; vehicle player switchCamera "INTERNAL"; [player] joinSilent startGroup; }; supportTimer = { private ["_leader"]; _leader = squadLeader(player); if (_A10Timer == 99999 && !A10available) then { _A10Timer = time; }; if (isNil _leader) exitWith { }; if ((player == call compile _leader) && !A10available && time - _A10Timer > A10respawn) then { [west,"HQ"] sideChat "CAS (A10) is now available for your squad"; A10available = true; _A10Timer = 99999; }; }; if isWest then { controlChopper = { private ["_pilot"]; _PlayerGroup = ["pilot" + str _this, "Grp", "", "west"] call getGroup; _pilot = driver _this; if !(pilotController in units (group _pilot)) exitWith { player groupChat "This helicopter is currently being controlled by another player"; }; player joinAsSilent [_PlayerGroup, 1]; _pilot joinAsSilent [_PlayerGroup, 2]; waitUntil { local _pilot }; _pilot disableAI "TARGET"; _pilot disableAI "AUTOTARGET"; _pilot disableAI "MOVE"; _pilot disableAI "ANIM"; _this switchCamera "INTERNAL"; player remoteControl _pilot; }; if (heliRC == 1) then { BIS_MENU_GroupCommunication = [ ["Support",true], ["Request CAS (A10)", [2], "", -5, [["expression", ' if (lifeState player == "UNCONSCIOUS") exitWith {}; if (a10Mode == 0) exitWith { [west,"HQ"] sideChat "CAS (A10) support is not available on this mission"; }; _leader = call compile squadLeader(player); _str = "you need a squad leader to call for support"; if (isNil "_leader") exitWith { player groupChat _str; }; if (isNull _leader || !isPlayer _leader) exitWith { player groupChat _str; }; if (!alive _leader || isDead(_leader)) exitWith { player groupChat "your squad leader is dead!"; }; player sideChat format["Sent request to %1 (%2) for support.", unitID(_leader), getName(_leader)]; [nil,_leader,"loc",rSPAWN,player,{ if (!A10available && !DEBUG) exitWith { [nil,_this,"loc",rSPAWN,player,{[west,"HQ"] sideChat "CAS (A10) support is currently not available for your squad";}] call RE; }; requestingPlayer = _this; player sideChat format["%1 (%2) is requesting CAS support. Accept?", unitID(_this), getName(_this)]; showCommandingMenu "#USER:query_Menu_CAS"; }] call RE; ']], "1", "1"], ["Control Helicopter", [3], "", -5, [["expression", ' heli spawn controlChopper; ']], "1", "1"] ]; } else { BIS_MENU_GroupCommunication = [ ["Support",true], ["Request CAS (A10)", [2], "", -5, [["expression", ' if (lifeState player == "UNCONSCIOUS") exitWith {}; if (a10Mode == 0) exitWith { [west,"HQ"] sideChat "CAS (A10) support is not available on this mission"; }; _leader = call compile squadLeader(player); _str = "you need a squad leader to call for support"; if (isNil "_leader") exitWith { player groupChat _str; }; if (isNull _leader || !isPlayer _leader) exitWith { player groupChat _str; }; if (!alive _leader || isDead(_leader)) exitWith { player groupChat "your squad leader is dead!"; }; player sideChat format["Sent request to %1 (%2) for support.", unitID(_leader), getName(_leader)]; [nil,_leader,"loc",rSPAWN,player,{ if (a10Mode == 0) exitWith { [nil,_this,"loc",rSPAWN,player,{[west,"HQ"] sideChat "CAS (A10) support is not available on this mission";}] call RE; }; if (!A10available && !DEBUG) exitWith { [nil,_this,"loc",rSPAWN,player,{[west,"HQ"] sideChat "CAS (A10) support is currently not available for your squad";}] call RE; }; requestingPlayer = _this; player sideChat format["%1 (%2) is requesting CAS support. Accept?", unitID(_this), getName(_this)]; showCommandingMenu "#USER:query_Menu_CAS"; }] call RE; ']], "1", "1"] ]; }; query_Menu_CAS = [ ["Accept call for support",false], ["Yes",[2],"",-5,[["expression",' [nil,requestingPlayer,"loc",rSPAWN,player,{ if (a10Mode == 2) then { player sideChat format["%1 (%2) accepted your request for support. Click a location on the map to designate for CAS", unitID(_this), getName(_this)]; mapInUse = true; openMap true; onMapSingleClick "call spawnA10;"; } else { player sideChat format["%1 (%2) accepted your request for support. CAS inbound.", unitID(_this), getName(_this)]; call spawnA10; }; }] call RE; ']],"1","1"], ["No",[3],"",-5,[["expression",' [nil,requestingPlayer,"loc",rSPAWN,player,{ player sideChat format["%1 (%2) Denied your request for support", unitID(_this), getName(_this)]; }] call RE; ']],"1","1"] ]; query_Menu_MHQ = [ ["Accept mobilise request",false], ["Yes",[2],"",-5,[["expression",' _pos = HQ modelToWorld [14,0,0]; _pos set [2,0]; HQ setPosATL spawnPos; MHQ setDamage 0; MHQ setFuel 1; MHQ setPosATL _pos; ']],"1","1"], ["No",[3],"",-5,[["expression",' [nil,requestingPlayer,"loc",rSPAWN,player,{ player sideChat format["%1 (%2) Denied your request to mobilise the HQ", unitID(_this), getName(_this)]; }] call RE; ']],"1","1"] ]; }; artillery = { private ["_c","_pos","_sID","_gPos"]; _pos = _this; artyAvailable = false; _pos set [2,0]; hint "Position selected!"; openMap [false,false]; mapInUse = false; _sID = squadID(player); _gPos = mapGridPosition _pos; player sideChat format["Crossroad, this is %1, Adjust fire, over.", _sID]; sleep 5; [west,"HQ"] sideChat format["%1 this is Crossroad, adjust fire, out.", _sID]; sleep 4; player sideChat format["Grid %1, over", _gPos]; sleep 3; [west,"HQ"] sideChat format["Grid %1, out", _gPos]; sleep 5; [west,"HQ"] sideChat "R, F, DPICM in effect, 5 rounds, over."; sleep 3; player sideChat "DPICM in effect, 5 rounds, out."; sleep 7; [west,"HQ"] sideChat "shot, over."; sleep 3; player sideChat "shot, out."; sleep 25; [west,"HQ"] sideChat "splash, over."; sleep 2; player sideChat "splash, out."; sleep 5; _c = 0; while { _c < 5 } do { "ARTY_R_227mm_HE" createVehicle [(_pos select 0) + random 50 - random 50,(_pos select 1) + random 50 - random 50,(_pos select 2)]; sleep (0.5+random 2); _c = _c + 1; }; }; spawnA10 = { private ["_startPos","_dir","_pos2","_vcl","_ai","_grp"]; [nil,call compile (squadString(player)+"1"),"loc",rSPAWN,player,{ A10available = false; }] call RE; if (a10Mode == 2) then { hint "Position selected!"; onMapSingleClick ""; openMap [false,false]; mapInUse = false; _startPos = getPosATL player; _dir = ((_pos select 0) - (CENTERPOS select 0)) atan2 ((_pos select 1) - (CENTERPOS select 1)); _pos2 = [(_pos select 0) + (sin _dir)*5000,(_pos select 1) + (cos _dir)*8000,500]; _vcl = createVehicle ["A10_US_EP1",spawnPos,[],0,"NONE"]; _vcl engineOn true; _vcl setPosATL _pos2; _dir = ((_pos select 0) - (_pos2 select 0)) atan2 ((_pos select 1) - (_pos2 select 1)); _vcl setDir _dir; _vcl setVelocity [(sin _dir)*100,(cos _dir)*100,20]; moveOut player; player moveInDriver _vcl; [nil,nil,rSPAWN,[_vcl,player,_startPos,_pos],{ _vcl = _this select 0; _plr = _this select 1; _pos = _this select 3; if (player == _plr) then { flyTime = "-"; _vcl addEventHandler ["fired",{ (_this select 0) removeEventHandler ["fired",0]; flyTime = a10FlyTime;}]; while { alive player } do { if (typeName flyTime != "STRING") exitWith {}; hintSilent format[ "Distance to target: %1m\nBearing-target offset: %2dgs" , round(player distance _pos), round([player,_pos] call getBearing)]; }; curTime = time; waitUntil { hintSilent format[ "Time remaining: %1s\nDistance to target: %2m\nBearing-target offset: %3dgs" , round(flyTime - (time - curTime)), round(player distance _pos), round([player,_pos] call getBearing)]; time - curTime > flyTime || !alive player }; if (alive player && vehicle player == _vcl) then { player setPosATL (_this select 2); if (lifeState player == "UNCONSCIOUS") then { player setUnconscious false; }; }; }; if isServer then { waitUntil { !isNull (driver _vcl) }; waitUntil { isNull (driver _vcl) || !alive _vcl }; if !alive _vcl exitWith {}; _dir = getDir _vcl; _grp = createGroup civilian; _man = _grp createUnit [typeOf _plr, spawnPos, [], 0, "NONE"]; _man assignAsDriver _vcl; _man moveInDriver _vcl; _vcl flyInHeight 300; _vcl engineOn true; _vcl setCaptive true; _pos2 = getPosATL _vcl; _man doMove [(_pos2 select 0) + (sin _dir)*10000,(_pos2 select 1) + (cos _dir)*10000,0]; waitUntil { nearestPlayers(getPosATL _vcl, 3000, true, "count") == 0 || !alive _vcl }; if alive _vcl then { deleteVehicle _vcl; }; deleteVehicle _man; deleteGroup _grp; }; }] call RE; } else { _grp = group player; _pos = getPosATL player; _dir = ((_pos select 0) - (CENTERPOS select 0)) atan2 ((_pos select 1) - (CENTERPOS select 1)); _pos2 = [(_pos select 0) + (sin _dir)*5000,(_pos select 1) + (cos _dir)*8000,500]; _arr = [_pos2, 180, "A10_US_EP1", _grp] call bis_fnc_spawnvehicle; _vcl = _arr select 0; _ai = (_arr select 1) select 0; _vcl engineOn true; _vcl setPosATL _pos2; _dir = ((_pos select 0) - (_pos2 select 0)) atan2 ((_pos select 1) - (_pos2 select 1)); _vcl setDir _dir; _vcl setVelocity [(sin _dir)*100,(cos _dir)*100,20]; flyTime = a10FlyTime*2; curTime = time; waitUntil { hintSilent format[ "Eagle CAS standby, taking orders!\n\nTime remaining: %1s" , round((flyTime) - (time - curTime))]; time - curTime > (flyTime) || !alive _ai || !alive _vcl }; if (alive _vcl) then { player sideChat format["Eagle to %1: We are bingo fuel, RTB. See you soon! Eagle over and out.",unitID(player)]; hint "Eagle CAS is RTB"; _grp = createGroup civilian; [_vcl] join _grp; _vcl doMove [(_pos2 select 0) + (sin _dir)*10000,(_pos2 select 1) + (cos _dir)*10000,0]; waitUntil { nearestPlayers(getPosATL _vcl, 3000, true, "count") == 0 || !alive _vcl }; deleteVehicle _vcl; } else { hint "Eagle CAS was destroyed"; _grp = createGroup west; if (alive _ai) then { [_ai] join _grp; }; }; }; }; fillOptionsDialog = { disableSerialization; private ["_display","_ctrl","_glindex","_index"]; _disp = (uiNameSpace getVariable "INSURGENCY_OPTIONS"); _ctrl = _disp displayCtrl 1001; _glindex = -1; { _index = _ctrl lbAdd _x; if (grasslayer == _index) then {_glindex = _index}; } forEach ["No Gras","Little Gras", "Default", "Full Grass"]; }; respawnTags = { private ["_txt","_ctrlText","_bool","_color"]; if camMap exitWith {}; if (livesLeft == 0) exitWith { cutRsc["Rtags", "PLAIN"]; _color = "#347C17"; if (!(str camPlayer in squadUnitStrings(squadString(player)))) then { _color = "#C11B17"; }; _txt = format["%1: %2 (Spectating)", unitID(camPlayer), getName(camPlayer)]; _ctrlText = (uiNamespace getVariable 'TAGS_HUD') displayCtrl 64434; _ctrlText ctrlSetStructuredText parseText format[ "%1" , _txt, _color]; }; _bool = nearestEastMen(getPosATL camPlayer,respawnRange,true,"count") == 0; if (camPlayer != fieldHospital) then { _txt = format["%1: %2 (Press Enter to Spawn)", unitID(camPlayer), getName(camPlayer)]; _color = "#347C17"; if !_bool then { _txt = format["%1: %2 (Cannot spawn while enemies near)", unitID(camPlayer), getName(camPlayer)]; _color = "#C11B17"; }; } else { _txt = "Main Base (Press Enter to Spawn)"; _color = "#2554C7"; }; if (lifeState camPlayer == "UNCONSCIOUS") then { _txt = format["%1: %2 (Cannot spawn on a critically wounded soldier)", unitID(camPlayer), getName(camPlayer)]; _color = "#C11B17"; }; if (vehicle camPlayer call vclisFull) then { _txt = format["%1: %2 (Cannot spawn while vehicle is full)", unitID(camPlayer), getName(camPlayer)]; _color = "#C11B17"; }; cutRsc["Rtags", "PLAIN"]; _ctrlText = (uiNamespace getVariable 'TAGS_HUD') displayCtrl 64434; _ctrlText ctrlSetStructuredText parseText format[ "%1

Left Arrow: Previous unit
Right Arrow: Next unit
" , _txt, _color]; }; playerTags = { private ["_color","_cT","_ctrlOffset"]; if (!isNull respawnCamera || isNull cursorTarget || !tagsOn || cameraView == "GUNNER") exitWith {}; _cT = cursorTarget; if (!(str _cT in westPlayerStrings) || !(_cT isKindOf "man") || (!alive _cT && lifeState _cT != "DEAD-RESPAWN") ) exitWith {}; cutRsc["Rtags", "PLAIN"]; _ctrlOffset = (uiNamespace getVariable 'TAGS_HUD') displayCtrl 64435; _color = "#2554C7"; if (str _cT in squadUnitStrings(squadString(player))) then { _color = "#347C17"; }; if (lifeState _cT == "UNCONSCIOUS") then { _color = "#C11B17"; }; if (lifeState _cT == "DEAD-RESPAWN") then { _color = "#736F6E"; }; _ctrlOffset ctrlSetStructuredText parseText format[ "%1
%2
" , unitID(_cT), getName(_cT), _color]; }; eastPlayerTags = { private ["_color","_cT","_ctrlOffset"]; if (!isNull respawnCamera || isNull cursorTarget || !tagsOn || cameraView == "GUNNER") exitWith {}; _cT = cursorTarget; if (!(str leader _cT in eastPlayerStrings) || !(_cT isKindOf "man") || !alive _cT ) exitWith {}; cutRsc["Rtags", "PLAIN"]; _ctrlOffset = (uiNamespace getVariable 'TAGS_HUD') displayCtrl 64435; _color = "#2554C7"; if (_cT in units group player) then { _color = "#347C17"; }; _ctrlOffset ctrlSetStructuredText parseText format[ "%1" , name _cT, _color]; }; vehicleTags = { private ["_bool","_color","_crew","_ctrlOffset","_cT","_dist","_nVcls","_vcl","_ctrlCenter"]; if (!isNull respawnCamera || isNull cursorTarget || !tagsOn || cameraView == "GUNNER") exitWith {}; _cT = cursorTarget; _dist = player distance _cT; if (_cT in westVehicles) then { _crew = crew _cT; if (count _crew == 0 || _dist < 4) exitWith {}; _bool = false; _color = "#2554C7"; for "_i" from 0 to (count _crew - 1) do { if (str (_crew select _i) in squadUnitStrings(squadString(player))) exitWith { _bool = true; }; }; if (_bool) then { _color = "#347C17"; }; cutRsc["Rtags", "PLAIN"]; _ctrlOffset = (uiNamespace getVariable 'TAGS_HUD') displayCtrl 64435; _ctrlOffset ctrlSetStructuredText parseText format[ "%1" , crew _cT call crewToStr, _color]; }; }; atEntryPoint = { private ["_facing","_offset","_pos"]; _offset = [0,0.5,-1.5]; _pos = _this modelToWorld _offset; _facing = false; if (player distance _pos < 3 && canSee(player,_pos,45)) then { _facing = true; }; if (!alive _this || _this call vclisFull || !_facing) exitWith { false }; true }; superman = { if (!DEBUG) exitWith {}; player allowDamage false; case 57: { _vcl = vehicle player; if (_shift) then { _vcl setVelocity[(velocity _vcl select 0),(velocity _vcl select 1),(velocity _vcl select 2)+1]; if (_vcl == player) then { _handled=true; }; }; }; case 17: { _vcl = vehicle player; if (_shift) then { _vcl setVelocity[(velocity _vcl select 0)+(sin (getDir _vcl)),(velocity _vcl select 1)+(cos (getDir _vcl)),velocity _vcl select 2]; if (_vcl == player) then { _handled=true; }; }; }; case 31: { _vcl = vehicle player; if (_shift) then { _vcl setVelocity[(velocity _vcl select 0)-(sin (getDir _vcl)),(velocity _vcl select 1)-(cos (getDir _vcl)),velocity _vcl select 2]; if (_vcl == player) then { _handled=true; }; }; }; case 30: { _vcl = vehicle player; if (_shift) then { _vcl setVelocity[(velocity _vcl select 0)-(cos (getDir _vcl)),(velocity _vcl select 1)+(sin (getDir _vcl)),velocity _vcl select 2]; if (_vcl == player) then { _handled=true; }; }; }; case 32: { _vcl = vehicle player; if (_shift) then { _vcl setVelocity[(velocity _vcl select 0)+(cos (getDir _vcl)),(velocity _vcl select 1)-(sin (getDir _vcl)),velocity _vcl select 2]; if (_vcl == player) then { _handled=true; }; }; }; }; onKeyPress = { private ["_handled","_vcl","_cT","_dist","_nVcls","_list","_id","_size","_intensity","_key","_shift","_ctrl","_alt"]; _key = _this select 1; _shift = _this select 2; _ctrl = _this select 3; _alt = _this select 4; _handled = false; if (difficultyEnabled "3rdPersonView" && _key in actionKeys "personView" && remoteControlling) exitWith { if (cameraView == "INTERNAL") then { cameraOn switchCamera "EXTERNAL"; } else { cameraOn switchCamera "INTERNAL"; }; true }; if (_key in actionKeys "tacticalView") then { hint "Tactical View is disabled in Insurgency"; _handled=true; }; if (!alive player) exitWith {}; if (_key in (actionKeys 'showmap')) then { if isNull respawnCamera exitWith {}; camMap = !camMap; openMap [camMap,camMap]; if camMap then { mapAnimAdd [0,0.1,getPosATL camPlayer]; mapAnimCommit; }; }; switch _key do { //TAB key case 15: { if (!_ctrl) exitWith {}; if (useroptions != 1) exitWith {}; if (!dialog) then { createDialog "INSURGENCY_OPTIONS"; } else { closeDialog 0; }; }; //E key //N key case 49: { if (isNull respawnCamera) exitWith {}; if (isNil "camNVG") then { camNVG = true; }; camUseNVG camNVG; camNVG = !camNVG; }; if DEBUG then { call superman; }; //W key case 17: { if (speed player == 0 && lifeState player != "UNCONSCIOUS") then { detach player; }; }; //S key case 31: { if (speed player == 0 && lifeState player != "UNCONSCIOUS") then { detach player; }; }; //Enter key case 28: { if (isNull respawnCamera || camMap || livesLeft == 0) exitWith {}; if enterSpawn exitWith { enterSpawn = false; }; if (!enterSpawn && camPlayer == fieldHospital) exitWith { enterSpawn = true; }; if (nearestEastMen(getPosATL camPlayer,respawnRange,true,"count") > 0) exitWith {}; if (vehicle camPlayer call vclisFull) exitWith {}; if (lifeState camPlayer == "UNCONSCIOUS") exitWith {}; if !enterSpawn then { enterSpawn = true; }; }; //Left case 203: { if isNull respawnCamera exitWith {}; _list = [fieldHospital] + groupMembers(true,"array"); if (livesLeft == 0) then { _list = nearestPlayers(CENTERPOS,AORADIUS,true,"array"); }; _size = count _list; _id = _list find camPlayer; _id = _id - 1; if (_id < 0) then { _id = _size - 1; }; camPlayer = _list select _id; }; //Right case 205: { if isNull respawnCamera exitWith {}; _list = [fieldHospital] + groupMembers(true,"array"); if (livesLeft == 0) then { _list = nearestPlayers(CENTERPOS,AORADIUS,true,"array"); }; _size = count _list; _id = _list find camPlayer; _id = _id + 1; if (_id == _size) then { _id = 0; }; camPlayer = _list select _id; }; //Backspace case 14: { if isNull respawnCamera exitWith { if remoteControlling then { call exitRC; }; }; // if (startLocation == MHQ) exitWith { player groupChat "Unavailable when the HQ is mobilised"; }; // [] spawn gearDialog; _handled = true; }; //PAGE UP //PAGE DOWN }; _handled; }; onMouseMove = { private ["_xS","_yS","_xC","_yC","_zC"]; if (isNull respawnCamera || camPlayer == fieldHospital || dialog) exitWith {}; _xS = (_this select 1)/45; _yS = (_this select 2)/25; if (abs _xS < abs _yS) then { _xS = 0; }; if (abs _yS < abs _xS) then { _yS = 0; }; _xC = (camAttachCoords select 0) - _xS; if (_xC > 3) then { _xC = 3; }; if (_xC < -3) then { _xC = -3; }; _yC = camAttachCoords select 1; if (_xC <= 0) then { _yC = _yC + _xS; }; if (_xC > 0) then { _yC = _yC - _xS; }; if (_yC > 0) then { _yC = 0; }; if (_yC < -3 && camPlayer isKindOf "man") then { _yC = -3; }; if (_yC < -3 && !(camPlayer isKindOf "man")) then { _yC = -7; }; _zC = (camAttachCoords select 2) + _yS; if (_zC > 7) then { _zC = 7; }; if (_zC < -2) then { _zC = -2; }; camAttachCoords = [_xC,_yC,_zC]; respawnCamera attachTo [vehicle camPlayer, camAttachCoords]; respawnCamera camSetTarget vehicle camPlayer; respawnCamera camCommit 0; }; private ["_selection", "_control", "_selectedIndex", "_real_list", "_vlist"]; disableSerialization; _selection = _this select 0; _control = _selection select 0; _selectedIndex = _selection select 1; if (_selectedIndex == -1) exitWith {}; _real_list = [50, 25, 12.5, 3.125]; _vlist = ["No Grass","Little Gras", "Default","Full Gras"]; if (grasslayer != _selectedIndex) then { grasslayer = _selectedIndex; setTerrainGrid (_real_list select grasslayer); };//Gear respawnWeapons = weapons player; respawnMagazines = magazines player; startWeapon = primaryWeapon player; //Injured bloodloss = 0; //Limiting #ifdef __BAF__ quantityBAF_LRR_scoped = 2; #endif #ifndef __BAF__ quantityM24_des_EP1 = 2; #endif quantityJavelin = 1; //Misc isAdmin = false; playerNames = ["","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]; serverLoadHint = false; mapInUse = false; startTime = time; startGroup = group player; oldGroup = group player; ppEffectsOn = false; ppUnconscious = ppEffectCreate [["radialblur", 170], ["colorcorrections", 1580]]; mapClickBool = false; //Timers _A10Timer = 0; _ArtyTimer = 0; //Respawn camPlayer = objNull; enterSpawn = false; respawnCamera = objNull; camMap = false; deadPos = CENTERPOS; //Support A10available = false; artyAvailable = false; requestingPlayer = objNull; //User Interface keyblock = false; tagsOn = true; #define DEBUG false //Constants #define VIEWDISTANCE 1200 #define SPAWNRANGE 350 #define WEP_DESPAWN_RANGE 350 //Misc Functions // getDirTo - vector of X towards Y in degrees while Y can be either a position or an object; // if X is in the East of Y, vector is from 0.01 to 179.99 and if on the West it's from -0.01 to -179.99 (N is 0, S is 180) #define getDirTo(X,Y) (((if(typeName Y == "OBJECT")then{getPosATL Y}else{Y} select 0) - (getPosATL X select 0)) atan2 ((if(typeName Y == "OBJECT")then{getPosATL Y}else{Y} select 1) - (getPosATL X select 1))) //Params if (isNil "paramsArray") then { if (isClass (missionConfigFile/"Params")) then { for "_i" from 0 to (count (missionConfigFile/"Params") - 1) do { _paramName = configName ((missionConfigFile >> "Params") select _i); missionNamespace setVariable [_paramName, getNumber (missionConfigFile >> "Params" >> _paramName >> "default")]; }; }; } else { for "_i" from 0 to (count paramsArray - 1) do { missionNamespace setVariable [configName ((missionConfigFile >> "Params") select _i), paramsArray select _i]; }; }; #define startLocation (if(isDead(MHQ))then{HQ}else{MHQ}) #define startPos (getPosATL fieldHospital) #define livesLeft (startLives - westDeaths) //AI #define infDeleteTime 30 //String Functions #define squadNumber(X) call compile toString[toArray(str X) select 7] #define squadString(X) ("Hitman1" + str squadNumber(X)) #define squadUnitStrings(X) [X+"1",X+"2",X+"3",X+"4",X+"5"] #define unitNumber(X) call compile toString[toArray(str X) select (count toArray(str X) - 1)] #define vehicleSquad(X) (call compile ("Hitman1" + str unitNumber(X))) #define getName(X) (playerNames select (westPlayerStrings find str X)) #define squadLeader(X) (squadString(X)+"1") // these macros do NOT return the actual name of the unit - these are only for text references #define squadVictor(X) ("Victor-1-" + str squadNumber(X)) #define vehicleID(X) ("Hitman-1-" + str unitNumber(X)) #define squadID(X) ("Hitman-1-" + str squadNumber(X)) #define unitID(X) ("Hitman-1-" + str squadNumber(X) + "-" + str unitNumber(X)) #define victorID(X) (\ if(typeOf X == ATVTYPE)then{"ATV-1-" + str unitNumber(X)}else{\ if(typeOf X == HELITYPE)then{"Heli"}else{\ if(typeOf X == MHQTYPE)then{"MHQ"}else{\ "Victor-1-" + str unitNumber(X)}}}) #define IEDList ["BAF_ied_v1","BAF_ied_v2","BAF_ied_v3","BAF_ied_v4"] #define cacheType "GuerillaCacheBox_EP1" #define ammoBoxType "UNBasicWeapons_EP1" #define westVehicles [humv11,humv12,humv13,humv14,humv15,humv16,atv11,atv12,atv13,atv14,heli,MHQ] #define westVehicleStrings ["humv11","humv12","humv13","humv14","humv15","humv16","atv11","atv12","atv13","atv14","heli","MHQ"] #define westPlayerStrings ["Hitman111","Hitman112","Hitman113","Hitman114","Hitman115",\ "Hitman121","Hitman122","Hitman123","Hitman124","Hitman125",\ "Hitman131","Hitman132","Hitman133","Hitman134","Hitman135",\ "Hitman141","Hitman142","Hitman143","Hitman144","Hitman145",\ "Hitman151","Hitman152","Hitman153","Hitman154","Hitman155",\ "Hitman161","Hitman162","Hitman163","Hitman164","Hitman165"] #define eastPlayerStrings ["east1","east2","east3","east4"] #define westAllClasses (westSoldierClasses + westVehicleClasses) #define eastStationaryGuns ["KORD_high_UN_EP1","DSHKM_TK_INS_EP1"] #define eastVclClasses ["BRDM2_TK_EP1","M113_TK_EP1","BTR60_TK_EP1","LandRover_MG_TK_INS_EP1",\ "LandRover_SPG9_TK_INS_EP1","T34_TK_EP1","T55_TK_EP1","KORD_high_UN_EP1",\ "DSHKM_TK_INS_EP1"] #define eastRanks ["CAPTAIN","LIEUTENANT","SERGEANT","CORPORAL","PRIVATE"] #define eastInfClasses [\ "TK_INS_Warlord_EP1",\ "TK_INS_Soldier_TL_EP1",\ "TK_INS_Bonesetter_EP1",\ "TK_INS_Soldier_AT_EP1",\ "TK_INS_Soldier_AT_EP1",\ "TK_INS_Soldier_MG_EP1",\ "TK_INS_Soldier_AR_EP1",\ "TK_INS_Soldier_AR_EP1",\ "TK_INS_Soldier_AAT_EP1",\ "TK_INS_Soldier_EP1",\ "TK_INS_Soldier_2_EP1",\ "TK_INS_Soldier_3_EP1",\ "TK_INS_Soldier_4_EP1"\ ] #define eastAllClasses (eastInfClasses + eastStationaryGuns + eastVclClasses) #define legalMagazines [\ "20Rnd_762x51_DMR",\ "10x_303",\ "5Rnd_127x99_as50",\ "5rnd_127x99_as50",\ "200Rnd_556x45_L110A1",\ "5Rnd_86x70_L115A1",\ "100Rnd_762x54_PK",\ "75Rnd_545x39_RPK",\ "10Rnd_762x54_SVD",\ "8Rnd_9x18_Makarov",\ "6Rnd_45ACP",\ "20Rnd_B_765x17_Ball",\ "30Rnd_9x19_UZI",\ "PG7V",\ "PG7VL",\ "PG7VR",\ "OG7",\ "RPG18",\ "Strela",\ "20Rnd_762x51_FNFAL",\ "30Rnd_545x39_AK",\ "30Rnd_762x39_AK47",\ "30Rnd_556x45_Stanag",\ "5Rnd_762x51_M24",\ "100Rnd_762x51_M240",\ "200Rnd_556x45_M249",\ "20Rnd_762x51_B_SCAR",\ "20rnd_762x51_B_SCAR",\ "Laserbatteries",\ "Javelin",\ "Mine",\ "PipeBomb",\ "15Rnd_9x19_M9",\ "7Rnd_45ACP_1911",\ "17Rnd_9x19_glock17",\ "HandGrenade_West",\ "HandGrenade_East",\ "SmokeShell",\ "1Rnd_HE_M203",\ "1Rnd_Smoke_M203",\ "IR_Strobe_Target",\ "IR_Strobe_Marker",\ "SmokeShellRed",\ "SmokeShellGreen",\ "SmokeShellBlue",\ "SmokeShellYellow",\ "SmokeShellOrange",\ "SmokeShellPurple",\ "FlareWhite_M203",\ "FlareYellow_M203",\ "FlareGreen_M203",\ "FlareRed_M203",\ "1Rnd_SmokeRed_M203",\ "1Rnd_SmokeGreen_M203",\ "1Rnd_SmokeYellow_M203",\ "1Rnd_HE_GP25",\ "FlareWhite_GP25",\ "FlareGreen_GP25",\ "FlareRed_GP25",\ "FlareYellow_GP25",\ "1Rnd_Smoke_GP25",\ "1Rnd_SmokeRed_GP25",\ "1Rnd_SmokeGreen_GP25",\ "1Rnd_SmokeYellow_GP25",\ "30Rnd_9x19_MP5",\ "30Rnd_9x19_MP5SD",\ "30Rnd_9x19_UZI",\ "30Rnd_9x19_UZI_SD",\ "10Rnd_B_765x17_Ball",\ "20Rnd_B_765x17_Ball",\ "20Rnd_556x45_Stanag",\ "30Rnd_556x45_G36",\ "30Rnd_556x45_G36SD",\ "30Rnd_556x45_StanagSD",\ "20Rnd_B_AA12_74Slug",\ "20Rnd_B_AA12_Pellets"\ ] version=1; class GraphItems { class Item0 { Flags=250; BasicText=""; Left=-96.262619; Top=136.01894; Right=-6.2626419; Bottom=186.01894; BgColor=255; class ItemInfo { Text="Init ServicePoint"; lStyle=-842150451; Shape=6; FontFace="Arial"; FontHeight=9; FontWeight=700; FontUnderline=1; FontCharSet=0; ItemType=0; class ItemInfo { Id=0; InitCode="private [""_objlist"",""_vcl"",""_timedelay"",""_pos""];" \n "_timedelay = time+11;"; }; }; }; class Item1 { Flags=4314; BasicText=""; Left=-96.79274; Top=401.94778; Right=-6.7927341; Bottom=451.94748; BgColor=65535; class ItemInfo { Text="Vehicle present?"; lStyle=-842150451; Shape=2; FontFace="Arial"; FontHeight=8; FontWeight=0; FontCharSet=0; ItemType=4; class ItemInfo { Id=1; Priority=1; Condition="count _objlist > 0 && (_objlist select 0) in [humv11,humv12,humv13,humv14,humv15,humv16,atv11,atv12,atv13,atv14,heli,MHQ]"; }; }; }; class Item2 { Flags=250; BasicText=""; Left=-96.956436; Top=319.48734; Right=-6.9564037; Bottom=369.48734; BgColor=16777215; class ItemInfo { Text="Gather Objects"; lStyle=-842150451; FontFace="Arial"; FontHeight=10; FontWeight=0; FontCharSet=0; ItemType=2; class ItemInfo { Id=2; InitCode="_pos = vehicleServicePoint modelToWorld [-5,0,0];" \n "_pos set [2,0];" \n "_objlist = _pos nearEntities [[""Air"",""Car""],5];"; }; }; }; class Item3 { Flags=218; BasicText=""; Left=-96.465317; Top=229.54578; Right=-6.4652371; Bottom=279.54578; BgColor=65535; class ItemInfo { Text="Wait"; lStyle=-842150451; Shape=2; FontFace="Arial"; FontHeight=10; FontWeight=0; FontCharSet=0; ItemType=4; class ItemInfo { Id=3; Condition="time > _timedelay"; ConditionTab=2; }; }; }; class Item4 { Flags=250; BasicText=""; Left=-262.25064; Top=408.89178; Right=-172.25058; Bottom=458.89194; BgColor=16777215; class ItemInfo { Text="Repair Vehicle"; lStyle=-842150451; FontFace="Arial"; FontHeight=10; FontWeight=0; FontCharSet=0; ItemType=2; class ItemInfo { Id=4; InitCode="_vcl setVehicleInit '" \n "this setVehicleAmmo 1;" \n "this setFuel 1;" \n "this setDamage 0;" \n "clearWeaponCargo this;" \n "clearMagazineCargo this;" \n "{ this addMagazineCargo [_x select 0, _x select 1]; } forEach humvMagazines;" \n "if (player in crew this) then { titleText[""Vehicle serviced"", ""PLAIN DOWN""]; };" \n "';" \n "processInitCommands;"; }; }; }; class Item5 { Flags=218; BasicText=""; Left=-261.71317; Top=320.83105; Right=-171.71307; Bottom=370.83105; BgColor=8421440; class ItemInfo { Text=""; lStyle=-842150451; Shape=2; FontFace="Arial"; FontHeight=10; FontWeight=0; FontCharSet=0; ItemType=8; class ItemInfo { Id=5; }; }; }; class Item6 { Flags=250; BasicText=""; Left=-261.35068; Top=229.09021; Right=-171.35068; Bottom=279.09021; BgColor=16777215; class ItemInfo { Text="Delay"; lStyle=-842150451; FontFace="Arial"; FontHeight=10; FontWeight=0; FontCharSet=0; ItemType=2; class ItemInfo { Id=6; InitCode="_timedelay = time+11;"; }; }; }; class Item7 { Flags=250; BasicText=""; Left=-97.245003; Top=489.35303; Right=-7.2450352; Bottom=539.35303; BgColor=16777215; class ItemInfo { Text="Vehicle Check"; lStyle=-842150451; Group=-842150451; FontFace="Arial"; FontHeight=10; FontWeight=0; FontCharSet=0; ItemType=2; class ItemInfo { Id=17; InitCode="_vcl = _objlist select 0;" \n ""; }; }; }; class Item8 { Flags=218; BasicText=""; Left=-262.66339; Top=488.27878; Right=-172.66335; Bottom=538.27881; BgColor=65535; class ItemInfo { Text="Vehicle service needed?"; lStyle=-842150451; Shape=2; Group=-842150451; FontFace="Arial"; FontHeight=6; FontWeight=0; FontCharSet=0; ItemType=4; class ItemInfo { Id=18; Priority=1; Condition="(damage _vcl) > 0.001 || (fuel _vcl) < 0.99 || !(someAmmo _vcl)"; }; }; }; }; class GraphLinks { class Link0 { From=0; To=3; Color=6316128; Flags=2; class Extra { ArrowSize=0; }; }; class Link1 { From=1; To=7; Color=6316128; Flags=2; class Extra { ArrowSize=0; }; }; class Link2 { From=2; To=1; Color=6316128; Flags=2; class Extra { ArrowSize=0; }; }; class Link3 { From=2; To=5; Color=6316128; Flags=2; class Extra { ArrowSize=0; }; }; class Link4 { From=3; To=2; Color=6316128; Flags=2; class Extra { ArrowSize=0; }; }; class Link5 { From=4; To=5; Color=6316128; Flags=2; class Extra { ArrowSize=0; }; }; class Link6 { From=5; To=6; Color=6316128; Flags=2; class Extra { ArrowSize=0; }; }; class Link7 { From=6; To=3; Color=6316128; Flags=2; class Extra { ArrowSize=0; }; }; class Link8 { From=7; To=5; Color=6316128; Flags=2; class Extra { ArrowSize=0; }; }; class Link9 { From=7; To=8; Color=6316128; Flags=2; class Extra { ArrowSize=0; }; }; class Link10 { From=8; To=4; Color=6316128; Flags=2; class Extra { ArrowSize=0; }; }; }; class Globals { NextGroupID=1; NextID=19; FSMName="ServicePoint"; CompileConfig="D:\Games\BI Tools\FSM Editor Personal Edition\scriptedFSM.cfg"; class DefaultLink { ArrowSize=0; }; DefaultLinkColor=6316128; DefaultLinkUseCustom=1; PZoomLeft=-288.01981; PZoomRight=64.836761; PZoomBottom=555.86993; PZoomTop=105.2662; Clxs=657; Clys=839; Aspect=1; }; class Window { Flags=2; MaxPosX=-1; MaxPosY=-1; MinPosX=-1; MinPosY=-1; Left=25; Top=25; Right=985; Bottom=743; ShowCmd=3; SplitPos=675; }; /*%FSM*/ /*%FSM*/ /* item0[] = {"Init_ServicePoin",0,250,-96.262619,136.018936,-6.262642,186.018936,0.000000,"Init ServicePoint"}; item1[] = {"Vehicle_present",4,4314,-96.792740,401.947784,-6.792734,451.947479,1.000000,"Vehicle present?"}; item2[] = {"Gather_Objects",2,250,-96.956436,319.487335,-6.956404,369.487335,0.000000,"Gather Objects"}; item3[] = {"Wait",4,218,-96.465317,229.545776,-6.465237,279.545776,0.000000,"Wait"}; item4[] = {"Repair_Vehicle",2,250,-262.250641,408.891785,-172.250580,458.891937,0.000000,"Repair Vehicle"}; item5[] = {"_",8,218,-261.713165,320.831055,-171.713074,370.831055,0.000000,""}; item6[] = {"Delay",2,250,-261.350677,229.090210,-171.350677,279.090210,0.000000,"Delay"}; item7[] = {"Vehicle_Check",2,250,-97.245003,489.353027,-7.245035,539.353027,0.000000,"Vehicle Check"}; item8[] = {"Vehicle_service",4,218,-262.663391,488.278778,-172.663345,538.278809,1.000000,"Vehicle service needed?"}; link0[] = {0,3}; link1[] = {1,7}; link2[] = {2,1}; link3[] = {2,5}; link4[] = {3,2}; link5[] = {4,5}; link6[] = {5,6}; link7[] = {6,3}; link8[] = {7,5}; link9[] = {7,8}; link10[] = {8,4}; globals[] = {0.000000,0,0,0,0,640,480,1,19,6316128,1,-288.019806,64.836761,555.869934,105.266197,657,839,1}; window[] = {2,-1,-1,-1,-1,743,25,985,25,3,675}; *//*%FSM*/ class FSM { fsmName = "ServicePoint"; class States { /*%FSM*/ class Init_ServicePoin { name = "Init_ServicePoin"; init = /*%FSM*/"private [""_objlist"",""_vcl"",""_timedelay"",""_pos""];" \n "_timedelay = time+11;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class Wait { priority = 0.000000; to="Gather_Objects"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"time > _timedelay"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class Gather_Objects { name = "Gather_Objects"; init = /*%FSM*/"_pos = vehicleServicePoint modelToWorld [-5,0,0];" \n "_pos set [2,0];" \n "_objlist = _pos nearEntities [[""Air"",""Car""],5];"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class Vehicle_present { priority = 1.000000; to="Vehicle_Check"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"count _objlist > 0 && (_objlist select 0) in [humv11,humv12,humv13,humv14,humv15,humv16,atv11,atv12,atv13,atv14,heli,MHQ]"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class _ { priority = 0.000000; to="Delay"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class Repair_Vehicle { name = "Repair_Vehicle"; init = /*%FSM*/"_vcl setVehicleInit '" \n "this setVehicleAmmo 1;" \n "this setFuel 1;" \n "this setDamage 0;" \n "clearWeaponCargo this;" \n "clearMagazineCargo this;" \n "{ this addMagazineCargo [_x select 0, _x select 1]; } forEach humvMagazines;" \n "if (player in crew this) then { titleText[""Vehicle serviced"", ""PLAIN DOWN""]; };" \n "';" \n "processInitCommands;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class _ { priority = 0.000000; to="Delay"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class Delay { name = "Delay"; init = /*%FSM*/"_timedelay = time+11;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class Wait { priority = 0.000000; to="Gather_Objects"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"time > _timedelay"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class Vehicle_Check { name = "Vehicle_Check"; init = /*%FSM*/"_vcl = _objlist select 0;" \n ""/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class Vehicle_service { priority = 1.000000; to="Repair_Vehicle"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"(damage _vcl) > 0.001 || (fuel _vcl) < 0.99 || !(someAmmo _vcl)"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class _ { priority = 0.000000; to="Delay"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ }; initState="Init_ServicePoin"; finalStates[] = { }; }; /*%FSM*/// return true when distance to spawnPos is less than 1000m unless the unit is flying (i.e. altitude higher than 50m) isDead = { (getPosATL _this select 2 < 50 && (_this distance spawnPos) < 500) }; #define isDead(X) (X call isDead) // find all valid houses which offer a certain minimum count of positions findHouses = { private ["_buildings","_minPositions","_enterables","_alive"]; _buildings = nearestObjects [_this select 0, ["House"], _this select 1]; _minPositions = (_this select 2) - 1; _alive = _this select 3; _enterables = []; { if ( format["%1", _x buildingPos _minPositions] != "[0,0,0]" && EP1HOUSES && !(typeOf _x in ILLEGALHOUSES) && (alive _x || !_alive) ) then { _enterables set [count _enterables, _x]; }; } forEach _buildings; _enterables }; setSurrendered = { if !isDedicated then { if (player distance _this <= 20) then { private "_txt"; switch (round random 1) do { case 0: { _txt = "I Surrender!"; }; case 1: { _txt = "I give up!"; }; }; _this globalChat format["%1: %2", getText (configFile >> "CfgVehicles" >> typeOf _this >> "displayName"), _txt]; }; }; if isServer then { removeAllWeapons _this; _this setUnitPos "UP"; _this disableAI "move"; _this playMoveNow "AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon"; _this disableAI "anim"; }; }; getDir2 = { private ["_dirW","_dirS"]; _dirW = screenToWorld [0.5,0.5]; _dirS = ((_dirW select 0) - (getPosATL player select 0)) atan2 ((_dirW select 1) - (getPosATL player select 1)); ((_dirS+360) % 360) }; #define getDir2 (call getDir2) nearestWeapons = { private ["_wep","_pos","_rds","_alive","_type","_result"]; _wep = _this select 0; _pos = _this select 1; _rds = _this select 2; _alive = _this select 3; _type = _this select 4; if (_type == "count") then { _result = 0; } else { _result = []; }; { if (_x isKindOf "man" && (!alive _x || _alive)) then { if (_wep in weapons _x) then { if (_type == "count") then { _result = _result + 1; } else { _result = _result + [_x]; }; }; } else { if (_wep in (getWeaponCargo _x select 0)) then { if (_type == "count") then { _result = _result + 1; } else { _result = _result + [_x]; }; }; }; } forEach nearestObjects[_pos,["weaponHolder","man","ReammoBox","AllVehicles"],_rds]; _result }; #define nearestWeapons(V,W,X,Y,Z) ([V,W,X,Y,Z] call nearestWeapons) groupMembers = { private ["_result","_plr","_alive","_type"]; _alive = _this select 0; _type = _this select 1; if (_type == "count") then { _result = 0; } else { _result = []; }; { if (!isNil _x) then { _plr = call compile _x; if (!isNull _plr) then { if ((alive _plr && !isDead(_plr)) || !_alive) then { if (_type == "count") then { _result = _result + 1; } else { _result = _result + [_plr]; }; }; }; }; } forEach (squadUnitStrings(squadString(player))-[player]); _result }; #define groupMembers(Y,Z) ([Y,Z] call groupMembers) nearestPlayers = { private ["_result","_pos","_range","_type","_alive","_arr"]; _pos = _this select 0; _range = _this select 1; _alive = _this select 2; _type = _this select 3; if (_type == "count") then { _result = 0; } else { _result = []; }; { if (!isNil _x) then { _plr = call compile _x; if (!isNull _plr) then { if (_plr distance _pos <= _range && (alive _plr || !_alive)) then { if (_type == "count") then { _result = _result + 1; } else { _result = _result + [_plr]; }; }; }; }; } forEach westPlayerStrings; _result }; #define nearestPlayers(W,X,Y,Z) ([W,X,Y,Z] call nearestPlayers) nearestInfantry = { private ["_result","_arr","_alive","_type"]; _arr = nearestObjects[_this select 0, ["Man"], _this select 1]; _alive = _this select 2; _type = _this select 3; if (_type == "count") then { _result = 0; } else { _result = []; }; { if (!(_x in westPlayerStrings) && ( (alive _x && primaryWeapon _x != "") || !_alive ) ) then { if (_type == "count") then { _result = _result + 1; } else { _result set [count _result, _x]; }; }; } forEach _arr; _result }; #define nearestInfantry(W,X,Y,Z) ([W,X,Y,Z] call nearestInfantry) nearestEastMen = { private ["_result","_arr1","_arr2","_alive","_type"]; _arr1 = nearestObjects[_this select 0, ["LandVehicle"], _this select 1]; _arr2 = nearestObjects[_this select 0, ["Man"], _this select 1]; _alive = _this select 2; _type = _this select 3; if (_type == "count") then { _result = 0; } else { _result = []; }; { if (typeOf _x in eastInfClasses && ( (alive _x && primaryWeapon _x != "") || !_alive ) ) then { if (_type == "count") then { _result = _result + 1; } else { _result set [count _result, _x]; }; }; } forEach _arr2; for "_i" from 0 to (count _arr1 - 1) do { { if (typeOf _x in eastInfClasses && (alive _x || !_alive) ) then { if (_type == "count") then { _result = _result + 1; } else { _result set [count _result, _x]; }; }; } forEach (crew (_arr1 select _i)); }; _result }; #define nearestEastMen(W,X,Y,Z) ([W,X,Y,Z] call nearestEastMen) #define numberOfAI nearestEastMen(CENTERPOS,AORADIUS,false,"count") nearestMen2 = { private ["_result","_arr1","_arr2","_alive","_type"]; _arr1 = nearestObjects[_this select 0, ["Car","Tank"], _this select 1]; _arr2 = nearestObjects[_this select 0, ["Man"], _this select 1]; _alive = _this select 2; _type = _this select 3; if (_type == "count") then { _result = 0; } else { _result = []; }; { if (!isDead(_x) && _x isKindOf "Man" && !(str _x in westPlayerStrings) && ( (alive _x && primaryWeapon _x != "") || !_alive ) ) then { if (_type == "count") then { _result = _result + 1; } else { _result set [count _result, _x]; }; }; } forEach _arr2; for "_i" from 0 to (count _arr1 - 1) do { { if (!(str _x in westPlayerStrings) && (alive _x || !_alive) ) then { if (_type == "count") then { _result = _result + 1; } else { _result set [count _result, _x]; }; }; } forEach (crew (_arr1 select _i)); }; _result }; #define nearestMen2(W,X,Y,Z) ([W,X,Y,Z] call nearestMen2) knowsAboutAll = { private ["_knows","_unit","_ai","_arr"]; _ai = _this select 0; _arr = _this select 1; _knows = true; for "_i" from 0 to (count _arr - 1) do { _unit = _arr select _i; if (_ai knowsAbout _unit < 1) exitWith { _knows = false; }; }; _knows }; #define knowsAboutAll(X,Y) ([X,Y] call knowsAboutAll) getBearing = { private ["_dirTo","_unit","_obj","_uDir"]; _unit = _this select 0; _obj = _this select 1; _dirTo = abs(getDirTo(_unit,_obj)); _uDir = getDir(vehicle _unit); if (abs(_dirTo - _uDir) > 180) then { _dirTo = -1*(360 - _dirTo); }; (_dirTo - _uDir) }; // canSee; returns true if a _unit looks at the _obj within a certain _arc (field of view) in degrees canSee = { private ["_unit","_obj","_dirTo","_uDir","_vcl","_arc"]; _unit = _this select 0; _obj = _this select 1; _arc = _this select 2; _dirTo = getDirTo(_unit,_obj); // vector from _unit to _obj _uDir = getDir (vehicle _unit); // heading of _unit if (vehicle _unit != _unit) then { // if it's a vehicle and _unit is in a turret we take the heading of that turret _vcl = vehicle _unit; if (_vcl turretUnit [0] == _unit) then { _uDir = _vcl weaponDirection (_vcl weaponsTurret [0] select 0); _uDir = (_uDir select 0) atan2 (_uDir select 1); }; }; if (abs(_dirTo - _uDir) > 180) then { _uDir = -1*(360 - _uDir); }; abs(_dirTo - _uDir) <= _arc }; #define canSee(X,Y,Z) ([X,Y,Z] call canSee) arrCanSee = { private ["_arc","_pos","_arr","_rng","_unit","_canSee"]; _arr = _this select 0; _pos = _this select 1; _arc = _this select 2; _rng = _this select 3; _canSee = false; for "_i" from 0 to (count _arr - 1) do { _unit = _arr select _i; if (alive _unit && (canSee(_unit,_pos,_arc) || _unit distance _pos <= _rng)) exitWith { _canSee = true; }; }; _canSee }; #define arrCanSee(W,X,Y,Z) ([W,X,Y,Z] call arrCanSee) canSeeArr = { private ["_canSee","_unit","_pos","_arr","_arc"]; _pos = _this select 0; _arr = _this select 1; _arc = _this select 2; _canSee = true; for "_i" from 0 to (count _arr - 1) do { _unit = _arr select _i; if !canSee(_pos,_unit,_arc) exitWith { _canSee = false; }; }; _canSee }; #define canSeeArr(X,Y,Z) ([X,Y,Z] call canSeeArr) // create an AI group based on the supplied params and returns the concatenated name // if the AI group already exists it only returns the name getGroup = { private ["_side","_prefix","_name","_suffix"]; _prefix = _this select 0; _name = _this select 1; _suffix = _this select 2; _side = _this select 3; call compile format[" if isNil ""%1%2%3"" exitWith { %1%2%3 = createGroup %4; %1%2%3 }; if isNull %1%2%3 exitWith { %1%2%3 = createGroup %4; %1%2%3 }; %1%2%3 ", _prefix, _name, _suffix, _side]; }; countPositions = { private ["_i","_house","_hPos"]; _house = _this select 0; _i = _this select 1; _hPos = format["%1", _house buildingPos _i]; if (_hPos == "[0,0,0]") exitWith { _i; }; [_house, _i+1] call countPositions; }; #define nPos(X) ([X,0] call countPositions) getGridPos = { private ["_pos","_x","_y"]; _pos = getPosATL _this; _x = _pos select 0; _y = _pos select 1; _x = _x - (_x % 100); _y = _y - (_y % 100); [_x + 50, _y + 50, 0] }; getCaches = { private ["_i","_arr","_str","_cache"]; _arr = _this select 0; _i = _this select 1; if (_i >= cacheCount) exitWith { _arr; }; _str = format["cache%1", _i+1]; _cache = call compile _str; if (!isNull _cache) then { if (alive _cache) then { _arr = _arr + [_cache]; }; }; [_arr, _i+1] call getCaches; }; #define cacheList ([[],0] call getCaches) getCacheMarkers = { private ["_i","_cache","_arr","_mkr"]; _cache = _this select 0; _arr = _this select 1; _i = _this select 2; _mkr = format["%1intel%2", _cache, _i]; if ((getMarkerPos _mkr select 0) == 0) exitWith { _arr; }; _arr set [_i, _mkr]; [_cache, _arr, _i+1] call getCacheMarkers; }; #define cacheMarkers(X) ([X,[],0] call getCacheMarkers) createDebugMarker = { private ["_txt","_dir","_unit","_mkr"]; _unit = _this select 0; if (isNil "_unit") exitWith { }; _mkr = createMarkerLocal["DEBUG" + str _unit, getPosATL _unit]; _mkr setMarkerShapeLocal "ICON"; _mkr setMarkerTypeLocal "mil_triangle"; _mkr setMarkerSizeLocal [0.5,0.7]; _txt = str _unit; //if (typeName _txt == "OBJECT") then {_txt = getText (configFile >> "CfgVehicles" >> typeOf vehicle(_this select 1) >> "displayName"); }; if (str _unit in eastPlayerStrings) then { _txt = name _unit; }; _mkr setMarkerTextLocal _txt; _mkr setMarkerColorLocal "ColorRed"; _dir = getDir _unit; if (vehicle _unit != _unit) then { _dir = formationDirection _unit; }; _mkr setMarkerDirLocal _dir; if (!alive _unit) then { _mkr setMarkerColorLocal "ColorBlack"; }; [_mkr, _unit] spawn { private ["_mkr","_unit"]; _mkr = _this select 0; _unit = _this select 1; while{!isNull _unit && DEBUG}do{ _mkr setMarkerPosLocal getPosATL _unit; _mkr setMarkerDirLocal getDir _unit; if !alive _unit then { _mkr setMarkerColorLocal "ColorBlack"; }; sleep 0.1; }; if !DEBUG then { sleep 5; }; deleteMarkerLocal _mkr; }; }; // \initclient-common.sqf #include "defines.sqf" #include "functions.sqf" #include "client\defines.sqf" #include "client\variables.sqf" #include "client\briefing.sqf" #include "client\AI\functions.sqf" #include "client\actions\functions.sqf" #include "client\gear\functions.sqf" //#include "client\injured\functions.sqf" #include "client\markers\functions.sqf" #include "client\markers\createMarkers.sqf" #include "client\misc\functions.sqf" #include "client\misc\triggers.sqf" #include "client\respawn\functions.sqf" #include "client\support\functions.sqf" #include "client\UI\functions.sqf" #include "client\UI\onKeyPress.sqf" #include "client\UI\onMouseMove.sqf" player enableIRLasers true; player enableGunLights true; player setVariable ["BIS_noCoreConversations", true]; // Grass grasslayer = 1; setTerrainGrid 12.5; // FSM for service point (vehicle repairs etc.) //execFSM "common\fsm\ServicePoint.fsm"; execVM "op4\jip.sqf"; execVM "op4\hmvreskin.sqf"; execVM "op4\ratingcheck.sqf"; if isWest then { //player addRating 1000000; player addEventHandler ["handleDamage", { _this call handleDamage; }]; player addEventHandler ["killed",{ _this call onPlayerKilled; }]; player addEventHandler ["respawn",{ titleCut ["", "BLACK IN", 10]; }]; player addEventHandler ["fired",{ call firedEH; }]; call addActions; HQ addaction ["Return to FOB", "op4\rtb.sqf",[],1,false,true,"","true"]; flag1 addaction ["Move to MHQ", "op4\mhq.sqf",[],1,false,true,"","true"]; }; if isEast then { player setVariable ["INS_playerString",str player, true]; player addEventHandler ["respawn",{ removeAllWeapons player; }]; }; if (isServer) then { [] spawn { call compile preprocessFileLineNumbers "initserver.sqf"; }; }; endLoadingScreen; waitUntil { !(isNull (findDisplay 46)) }; (findDisplay 46) displayAddEventHandler ["KeyDown", "_this call onKeyPress"]; (findDisplay 46) displayAddEventHandler ["MouseMoving", "_this call onMouseMove"]; waitUntil { !isDead(HQ) || time > 30 }; #include "client\mainLoop.sqf"#include "defines.sqf" #include "functions.sqf" #include "server\defines.sqf" #include "server\cleanup\functions.sqf" #include "server\markers\functions.sqf" #include "server\AI\functions.sqf" #include "server\AI\initUPS.sqf" #include "server\caches\functions.sqf" #include "server\vehicles\functions.sqf" onPlayerConnected ' _caches = cacheList; for "_i" from 0 to (count _caches - 1) do { _cache = _caches select _i; { _x setMarkerPos (getMarkerPos _x); _x setMarkerText (markerText _x); } forEach cacheMarkers(_cache); }; '; //if (ambientCivilians == 1) then { // nul0 = [] execVM "common\server\IEDdetect\IEDdetect_init.sqf"; // /* 200 - is the ambient radius from the player // 1 - is the minimum amount of civilians near the player // 70 - is the % of presence of a triggerman among them // 10 - is the scan interval time // "house" - is the object classtype of what could potentially host triggermen bombs (there is always a 50% chance it will be a suicide bomber) // 0 - is the beeping (0=no beep, 1=beep, 2=random) // 100 - is the area to scan for suitable objects (e.g. "car") and attach the bomb to one of those, randomly. This is also the scan area for the triggerman to trigger the bomb // 5 - is the area to scan for hostiles that can instill fear in the triggerman (read above for how fear works). // 20 - is the area to scan for possible victims that will make the triggerman touch the bomb off. // 65 - is the % for the triggerman to be a suicide bomber instead // WEST - is the side to consider enemy of the triggerman */ // nul0 = [200,1,65,15,"house",2,100,8,20,65,WEST] execVM "common\server\IEDdetect\IEDdetect_ambientBombers.sqf"; //}; setDate [2010, Month, Day, Hour, Minute + (time/60)]; setViewDistance VIEWDISTANCE; //_pos = randPos; //while { count (_pos isFlatEmpty [30,0,0.2,20,0,false,objNull]) == 0 || getTerrainHeightASL _pos <= 2 } do { // _pos = randPos; //}; //HQ setDir (((CENTERPOS select 0) - (_pos select 0)) atan2 ((CENTERPOS select 1) - (_pos select 1))+90); //HQ setPosATL _pos; HQ setposATL (getmarkerpos "hq"); waitUntil { !isDead(HQ) }; [] spawn { call spawnAIGuns; }; [] spawn { call setupCaches; }; [] spawn { call spawnAIVehicles; }; #include "server\mainLoop.sqf"// Control types #define CT_STATIC 0 #define CT_BUTTON 1 #define CT_EDIT 2 #define CT_SLIDER 3 #define CT_COMBO 4 #define CT_LISTBOX 5 #define CT_TOOLBOX 6 #define CT_CHECKBOXES 7 #define CT_PROGRESS 8 #define CT_HTML 9 #define CT_STATIC_SKEW 10 #define CT_ACTIVETEXT 11 #define CT_TREE 12 #define CT_STRUCTURED_TEXT 13 #define CT_CONTEXT_MENU 14 #define CT_CONTROLS_GROUP 15 #define CT_SHORTCUT_BUTTON 16 // Arma 2 - textured button #define CT_XKEYDESC 40 #define CT_XBUTTON 41 #define CT_XLISTBOX 42 #define CT_XSLIDER 43 #define CT_XCOMBO 44 #define CT_ANIMATED_TEXTURE 45 #define CT_OBJECT 80 #define CT_OBJECT_ZOOM 81 #define CT_OBJECT_CONTAINER 82 #define CT_OBJECT_CONT_ANIM 83 #define CT_LINEBREAK 98 #define CT_USER 99 #define CT_MAP 100 #define CT_MAP_MAIN 101 #define CT_List_N_Box 102 // Arma 2 - N columns list box // Static styles #define ST_POS 0x0F #define ST_HPOS 0x03 #define ST_VPOS 0x0C #define ST_LEFT 0x00 #define ST_RIGHT 0x01 #define ST_CENTER 0x02 #define ST_DOWN 0x04 #define ST_UP 0x08 #define ST_VCENTER 0x0c #define ST_TYPE 0xF0 #define ST_SINGLE 0 #define ST_MULTI 16 #define ST_TITLE_BAR 32 #define ST_PICTURE 48 #define ST_FRAME 64 #define ST_BACKGROUND 80 #define ST_GROUP_BOX 96 #define ST_GROUP_BOX2 112 #define ST_HUD_BACKGROUND 128 #define ST_TILE_PICTURE 144 #define ST_WITH_RECT 160 #define ST_LINE 176 #define ST_SHADOW 0x100 #define ST_NO_RECT 0x200 #define ST_KEEP_ASPECT_RATIO 0x800 #define ST_TITLE ST_TITLE_BAR + ST_CENTER // Slider styles #define SL_DIR 0x400 #define SL_VERT 0 #define SL_HORZ 0x400 #define SL_TEXTURES 0x10 // Listbox styles #define LB_TEXTURES 0x10 #define LB_MULTI 0x20 #define FontM "Zeppelin32"//#include "IEDdetect_dialog.hpp" //--- Gear Menu. class RscGear { movingEnable = 1; idd = 16000; class controlsBackground { class Mainback : RscPicture { x = 0.04; y = 0.01; w = 1.2549; h = 1.6732; moving = 1; text = "\ca\ui\data\igui_background_gear_ca.paa"; }; }; class controls { class FilterButtonSidearm : RscClickableText { idc = 3400 + 4; style = 48 + 0x800; x = 0.300; y = 0.047; w = 0.086; h = 0.086; color[] = {1, 1, 1, 1}; colorActive[] = subcolor1; text = "\CA\warfare2\images\GearIconSidearm.paa"; action = "server setVariable ['filler', 'sidearms'];"; }; class FilterButtonMisc : FilterButtonSidearm { idc = 3400 + 5; x = 0.375; text = "\CA\warfare2\images\GearIconMisc.paa"; action = "server setVariable ['filler', 'misc'];"; }; class FilterButtonSecondary : FilterButtonSidearm { idc = 3400 + 3; x = 0.225; text = "\CA\warfare2\images\GearIconSecondary.paa"; action = "server setVariable ['filler', 'secondaries'];"; }; class FilterButtonPrimary : FilterButtonSidearm { idc = 3400 + 2; x = 0.15; text = "\CA\warfare2\images\GearIconPrimary.paa"; action = "server setVariable ['filler', 'primaries'];"; }; class FilterButtonAll : FilterButtonSidearm { idc = 3400 + 1; x = 0.075; text = "\CA\warfare2\images\GearIconAll.paa"; action = "server setVariable ['filler', 'all'];"; }; class ConClear : FilterButtonSidearm { idc = 3800; x = 0.902; y = 0.014; w = 0.032; h = 0.032; tooltip = "Gear: Clear the current loadout."; text = "common\client\images\i_clear.paa"; action = "WF_Gear_Action = 'clear'"; }; class ConReload : ConClear { idc = 3800 + 1; x = 0.93; tooltip = "Gear: Reload the previous loadout."; text = "common\client\images\i_reload.paa"; action = "WF_Gear_Action = 'reload'"; }; class MainList : RscListBoxA { idc = 3700; columns[] = {0.01, 0.25}; drawSideArrows = 0; idcRight = -1; idcLeft = -1; x = 0.043; y = 0.127676; w = 0.45; h = 0.52; onLBSelChanged = "lbChange = true;"; onLBDblClick = "lbMainAction = 'addWeapon';"; }; class SecondaryList : RscListBoxA { idc = 3701; columns[] = {0.01, 0.25}; drawSideArrows = 0; idcRight = -1; idcLeft = -1; x = 0.043; y = 0.66; w = 0.45; h = 0.24; onLBDblClick = "lbMainAction = 'addMagazine';"; }; class PrimaryWeapon : RscClickableText { idc = 3500; x = 0.502; y = 0.244; w = 0.286; h = 0.15; style = 48 + 0x800; soundDoubleClick[] = {"", 0.1, 1}; colorBackground[] = {0.6, 0.83, 0.47, 1}; colorBackgroundSelected[] = {0.6, 0.83, 0.47, 1}; colorFocused[] = {0, 0, 0, 0}; color[] = {0.85, 0.85, 0.85, 1}; colorText[] = {0.85, 0.85, 0.85, 1}; colorActive[] = {1, 1, 1, 1}; text = "\Ca\UI\Data\ui_gear_gun_gs.paa"; action = "primClicked = true"; }; class SecondaryWeapon : PrimaryWeapon { idc = 3500 + 1; y = 0.398; text = "\Ca\UI\Data\ui_gear_sec_gs.paa"; action = "secoClicked = true"; }; class Sidearm : PrimaryWeapon { idc = 3500 + 2; x = 0.56; y = 0.551; w = 0.113; h = 0.15; text = "\Ca\UI\Data\ui_gear_hgun_gs.paa"; action = "sideClicked = true"; }; class InventorySlot0 : PrimaryWeapon { idc = 3500 + 3; x = 0.79; y = 0.244; w = 0.055; h = 0.074; text = "\Ca\UI\Data\ui_gear_mag_gs.paa"; action = "inventoryClick = 3503"; }; class InventorySlot1 : InventorySlot0 { idc = 3500 + 4; x = 0.847; y = 0.244; action = "inventoryClick = 3504;"; }; class InventorySlot2 : InventorySlot0 { idc = 3500 + 5; x = 0.904366; y = 0.244; action = "inventoryClick = 3505"; }; class InventorySlot3 : InventorySlot0 { idc = 3500 + 6; x = 0.79; y = 0.321; action = "inventoryClick = 3506"; }; class InventorySlot4 : InventorySlot0 { idc = 3500 + 7; x = 0.847; y = 0.321; action = "inventoryClick = 3507"; }; class InventorySlot5 : InventorySlot0 { idc = 3500 + 8; x = 0.904366; y = 0.321; action = "inventoryClick = 3508"; }; class InventorySlot6 : InventorySlot0 { idc = 3500 + 9; x = 0.79; y = 0.398; action = "inventoryClick = 3509"; }; class InventorySlot7 : InventorySlot0 { idc = 3500 + 10; x = 0.847; y = 0.398; action = "inventoryClick = 3510"; }; class InventorySlot8 : InventorySlot0 { idc = 3500 + 11; x = 0.904366; y = 0.398; action = "inventoryClick = 3511"; }; class InventorySlot9 : InventorySlot0 { idc = 3500 + 12; x = 0.79; y = 0.474; action = "inventoryClick = 3512"; }; class InventorySlot10 : InventorySlot0 { idc = 3500 + 13; x = 0.847; y = 0.474; action = "inventoryClick = 3513"; }; class InventorySlot11 : InventorySlot0 { idc = 3500 + 14; x = 0.904366; y = 0.474; action = "inventoryClick = 3514"; }; class SidearmInventorySlot0 : InventorySlot0 { idc = 3500 + 15; x = 0.674; y = 0.551; w = 0.055; h = 0.074; text = "\Ca\UI\Data\ui_gear_hgunmag_gs.paa"; action = "inventoryClick = 3515"; }; class SidearmInventorySlot1 : SidearmInventorySlot0 { idc = 3500 + 16; x = 0.733; y = 0.551; action = "inventoryClick = 3516"; }; class SidearmInventorySlot2 : SidearmInventorySlot0 { idc = 3500 + 17; x = 0.79; action = "inventoryClick = 3517"; }; class SidearmInventorySlot3 : SidearmInventorySlot0 { idc = 3500 + 18; x = 0.847; action = "inventoryClick = 3518"; }; class SidearmInventorySlot4 : SidearmInventorySlot0 { idc = 3500 + 19; x = 0.674; y = 0.628; action = "inventoryClick = 3519"; }; class SidearmInventorySlot5 : SidearmInventorySlot0 { idc = 3500 + 20; x = 0.733; y = 0.628; action = "inventoryClick = 3520"; }; class SidearmInventorySlot6 : SidearmInventorySlot0 { idc = 3500 + 21; x = 0.79; y = 0.628; action = "inventoryClick = 3521"; }; class SidearmInventorySlot7 : SidearmInventorySlot0 { idc = 3500 + 22; x = 0.847; y = 0.628; action = "inventoryClick = 3522"; }; class MiscInventorySlot0 : InventorySlot0 { idc = 3500 + 23; x = 0.56; y = 0.705; w = 0.055; h = 0.074; colorActive[] = {0.85, 0.85, 0.85, 1}; text = "\Ca\UI\Data\ui_gear_eq_gs.paa"; action = "inventoryClick = 3523"; }; class MiscInventorySlot1 : MiscInventorySlot0 { idc = 3500 + 24; x = 0.617; y = 0.705; action = "inventoryClick = 3524"; }; class MiscInventorySlot2 : MiscInventorySlot0 { idc = 3500 + 25; x = 0.674; y = 0.705; action = "inventoryClick = 3525"; }; class MiscInventorySlot3 : MiscInventorySlot0 { idc = 3500 + 26; x = 0.733; y = 0.705; action = "inventoryClick = 3526"; }; class MiscInventorySlot4 : MiscInventorySlot0 { idc = 3500 + 27; x = 0.79; y = 0.705; action = "inventoryClick = 3527"; }; class MiscInventorySlot5 : MiscInventorySlot0 { idc = 3500 + 28; x = 0.847; y = 0.705; action = "inventoryClick = 3528"; }; class MiscInventorySlot6 : MiscInventorySlot0 { idc = 3500 + 29; x = 0.56; y = 0.782; action = "inventoryClick = 3529"; }; class MiscInventorySlot7 : MiscInventorySlot0 { idc = 3500 + 30; x = 0.617; y = 0.782; action = "inventoryClick = 3530"; }; class MiscInventorySlot8 : MiscInventorySlot0 { idc = 3500 + 31; x = 0.674; y = 0.782; action = "inventoryClick = 3531"; }; class MiscInventorySlot9 : MiscInventorySlot0 { idc = 3500 + 32; x = 0.733; y = 0.782; action = "inventoryClick = 3532"; }; class MiscInventorySlot10 : MiscInventorySlot0 { idc = 3500 + 33; x = 0.79; y = 0.782; action = "inventoryClick = 3533"; }; class MiscInventorySlot11 : MiscInventorySlot0 { idc = 3500 + 34; x = 0.847; y = 0.782; action = "inventoryClick = 3534"; }; class SpecialInventorySlot0 : InventorySlot0 { idc = 3500 + 35; x = 0.502; y = 0.09; w = 0.113; h = 0.15; colorActive[] = {0.85, 0.85, 0.85, 1}; text = "\Ca\UI\Data\ui_gear_eq_gs.paa"; action = "inventoryClick = 3535"; }; class SpecialInventorySlot1 : SpecialInventorySlot0 { idc = 3500 + 36; x = 0.847; y = 0.09; action = "inventoryClick = 3536"; }; class CA_Money_Value : RscText { idc = 3850; x = 0.727942; y = 0.86; SizeEx = 0.03; text = ""; colorText[] = subcolor1; }; class CA_GearLabel : CA_Money_Value { idc = 3852; style = 2; x = 0.502419; y = 0.0492156; w = 0.456; SizeEx = 0.03; text = "Respawn loadout:"; }; class Gear_Title : CA_Money_Value { idc = 3853; x = 0.047634; y = 0.01; text = "Gear Menu:"; }; class BuyButton : RscIGUIShortcutButton { idc = 3900; x = 0.0392 + 0.245*2; y = 0.897; w = 0.185; h = 0.052; text = "Save"; action = "buyLoadout = true"; }; class CloseButton : BuyButton { idc = 3901; x = 0.0392 + 0.245; text = "Close"; action = "closeDialog 0"; }; }; }; #include "options.hpp"////////////////////////////////////////////////////////////////// // Function file for Armed Assault // Created by: Reezo of SR5 Tactical - www.sr5tactical.net // IED Detection and Disposal Scripts ////////////////////////////////////////////////////////////////// #define CT_STATIC 0 #define CT_BUTTON 1 #define CT_EDIT 2 #define CT_SLIDER 3 #define CT_COMBO 4 #define CT_LISTBOX 5 #define CT_ACTIVETEXT 11 #define CT_STRUCTURED_TEXT 13 #define ST_LEFT 0 #define ST_RIGHT 1 #define ST_CENTER 2 #define ST_MULTI 16 #define ST_PICTURE 48 #define ST_FRAME 64 #define ST_SHADOW 256 #define ST_NO_RECT 512 #define SL_HORZ 0x400 #define SL_VERT 0 #define FontM "Bitstream" class RscButton { type = CT_BUTTON; idc = -1; style = ST_CENTER; font = FontM; sizeEx = 0.018; default = false; colorText[] = {1, 1, 1, 1}; colorDisabled[] = {0.35, 0.35, 0.45, 1}; colorBackground[] = {0.95, 0.95, 0.95, 1}; colorBackgroundDisabled[] = {0.65, 0.65, 0.75, 1}; colorBackgroundActive[] = {0.51, 1, 0.01, 1}; offsetX = 0.004; offsetY = 0.004; offsetPressedX = 0.002; offsetPressedY = 0.002; colorFocused[] = {0, 0, 0, 0}; colorShadow[] = {0, 0, 0, 0}; colorBorder[] = {0, 0, 0, 0}; borderSize = 0.008; soundEnter[] = {"", 0.1, 1}; soundPush[] = {"", 0.1, 1}; soundClick[] = {"", 0.1, 1}; soundEscape[] = {"", 0.1, 1}; }; class RscButtonTextOnly: RscButton { colorBackground[] = {1,1,1,0}; colorBackgroundActive[] = {1,1,1,0}; colorBackgroundDisabled[] = {1,1,1,0}; colorFocused[] = {1,1,1,0}; colorShadow[] = {1,1,1,0}; borderSize = 0; }; class IEDdetect_injector { idd = 650; movingEnable = false; enableSimulation = true; duration = 99999; fadein = 0.33; fadeout = 0.33; name = "IEDdetect_injector"; //onUnload = "; class controlsBackground {}; class objects {}; class controls { class IEDdetect_tool: RscPicture { idc = 651; x=0.88; y=0.60; w=0.35; h=0.45; text = "common\server\IEDdetect\screens\IEDdetect_09.paa"; }; class IEDdetect_readings: RscText { idc = 660; x = 1.1; y = 0.75; w = 0.15; h = 0.09; sizeEx = 0.05; colorText[] = {1,1,1,1}; text = ""; }; class IEDdetect_injectP : RscPicture { idc = 652; x = 1.078; y = 0.905; w = 0.10; h = 0.0584; text = "common\server\IEDdetect\screens\IEDdetect_injectbutton.paa"; action = ""; }; class IEDdetect_injectB : RscButtonTextOnly { idc = 653; x = 1.078; y = 0.905; w = 0.10; h = 0.0584; text = ""; action = ""; onMouseButtonDown = "_dummy = [_this, ""MouseButtonDown"", [653], ""2""] execVM ""common\server\IEDdetect\IEDdetect_injection.sqf"";"; onMouseButtonUp = ""; onMouseButtonDblClick = "_dummy = [_this, ""MouseButtonDown"", [653], ""2""] execVM ""common\server\IEDdetect\IEDdetect_injection.sqf"";"; onMouseEnter = ""; onMouseExit = ""; onSetFocus = ""; onKillFocus = ""; }; }; };////////////////////////////////////////////////////////////////// // Function file for Armed Assault // Created by: Reezo of SR5 Tactical - www.sr5tactical.net // Screens for my IED Detection Script ////////////////////////////////////////////////////////////////// class IEDdetect_01 { idd = -1; movingEnable = 0; duration = 4; fadein = 0.33; fadeout = 0.33; name="IEDdetect_01"; controls[]={"Picture"}; class Picture { x=0.88; y=0.60; w=0.35; h=0.45; text="common\server\IEDdetect\screens\IEDdetect_01.paa"; sizeEx = 1; type=0; idc=-1; style=48; colorBackground[]={0,0,0,0}; colorText[]={1,1,1,1}; font="Bitstream"; }; }; class IEDdetect_02 { idd = -1; movingEnable = 0; duration = 4; fadein = 0.33; fadeout = 0.33; name="IEDdetect_02"; controls[]={"Picture"}; class Picture { x=0.88; y=0.60; w=0.35; h=0.45; text="common\server\IEDdetect\screens\IEDdetect_02.paa"; sizeEx = 1; type=0; idc=-1; style=48; colorBackground[]={0,0,0,0}; colorText[]={1,1,1,1}; font="Bitstream"; }; }; class IEDdetect_03 { idd = -1; movingEnable = 0; duration = 4; fadein = 0.33; fadeout = 0.33; name="IEDdetect_03"; controls[]={"Picture"}; class Picture { x=0.88; y=0.60; w=0.35; h=0.45; text="common\server\IEDdetect\screens\IEDdetect_03.paa"; sizeEx = 1; type=0; idc=-1; style=48; colorBackground[]={0,0,0,0}; colorText[]={1,1,1,1}; font="Bitstream"; }; }; class IEDdetect_04 { idd = -1; movingEnable = 0; duration = 4; fadein = 0.33; fadeout = 0.33; name="IEDdetect_04"; controls[]={"Picture"}; class Picture { x=0.88; y=0.60; w=0.35; h=0.45; text="common\server\IEDdetect\screens\IEDdetect_04.paa"; sizeEx = 1; type=0; idc=-1; style=48; colorBackground[]={0,0,0,0}; colorText[]={1,1,1,1}; font="Bitstream"; }; }; class IEDdetect_05 { idd = -1; movingEnable = 0; duration = 4; fadein = 0.33; fadeout = 0.33; name="IEDdetect_05"; controls[]={"Picture"}; class Picture { x=0.88; y=0.60; w=0.35; h=0.45; text="common\server\IEDdetect\screens\IEDdetect_05.paa"; sizeEx = 1; type=0; idc=-1; style=48; colorBackground[]={0,0,0,0}; colorText[]={1,1,1,1}; font="Bitstream"; }; }; class IEDdetect_06 { idd = -1; movingEnable = 0; duration = 4; fadein = 0.33; fadeout = 0.33; name="IEDdetect_06"; controls[]={"Picture"}; class Picture { x=0.88; y=0.60; w=0.35; h=0.45; text="common\server\IEDdetect\screens\IEDdetect_06.paa"; sizeEx = 1; type=0; idc=-1; style=48; colorBackground[]={0,0,0,0}; colorText[]={1,1,1,1}; font="Bitstream"; }; }; class IEDdetect_07 { idd = -1; movingEnable = 0; duration = 4; fadein = 0.33; fadeout = 0.33; name="IEDdetect_07"; controls[]={"Picture"}; class Picture { x=0.88; y=0.60; w=0.35; h=0.45; text="common\server\IEDdetect\screens\IEDdetect_07.paa"; sizeEx = 1; type=0; idc=-1; style=48; colorBackground[]={0,0,0,0}; colorText[]={1,1,1,1}; font="Bitstream"; }; }; class IEDdetect_10 { idd = -1; movingEnable = 0; duration = 4; fadein = 0.33; fadeout = 0.33; name="IEDdetect_10"; controls[]={"Picture"}; class Picture { x=0.88; y=0.60; w=0.35; h=0.45; text="common\server\IEDdetect\screens\IEDdetect_10.paa"; sizeEx = 1; type=0; idc=-1; style=48; colorBackground[]={0,0,0,0}; colorText[]={1,1,1,1}; font="Bitstream"; }; }; class IEDdetect_11 { idd = -1; movingEnable = 0; duration = 4; fadein = 0.33; fadeout = 0.33; name="IEDdetect_11"; controls[]={"Picture"}; class Picture { x=0.88; y=0.60; w=0.35; h=0.45; text="common\server\IEDdetect\screens\IEDdetect_11.paa"; sizeEx = 1; type=0; idc=-1; style=48; colorBackground[]={0,0,0,0}; colorText[]={1,1,1,1}; font="Bitstream"; }; }; class IEDdetect_12 { idd = -1; movingEnable = 0; duration = 4; fadein = 0.33; fadeout = 0.33; name="IEDdetect_12"; controls[]={"Picture"}; class Picture { x=0.88; y=0.60; w=0.35; h=0.45; text="common\server\IEDdetect\screens\IEDdetect_12.paa"; sizeEx = 1; type=0; idc=-1; style=48; colorBackground[]={0,0,0,0}; colorText[]={1,1,1,1}; font="Bitstream"; }; }; class IEDdetect_13 { idd = -1; movingEnable = 0; duration = 4; fadein = 0.33; fadeout = 0.33; name="IEDdetect_13"; controls[]={"Picture"}; class Picture { x=0.88; y=0.60; w=0.35; h=0.45; text="common\server\IEDdetect\screens\IEDdetect_13.paa"; sizeEx = 1; type=0; idc=-1; style=48; colorBackground[]={0,0,0,0}; colorText[]={1,1,1,1}; font="Bitstream"; }; };////////////////////////////////////////////////////////////////// // Function file for Armed Assault // Created by: Reezo of SR5 Tactical - www.sr5tactical.net // Sounds for my IED detection script ////////////////////////////////////////////////////////////////// class IEDdetect_beep { name = "IEDdetect_beep"; sound[] = {"common\server\IEDdetect\sounds\IEDdetect_beep.ogg", db-24, 1.0}; titles[] = {}; }; class IEDdetect_beep2 { name = "IEDdetect_beep2"; sound[] = {"common\server\IEDdetect\sounds\IEDdetect_beep2.ogg", db-24, 1.0}; titles[] = {}; }; class IEDdetect_beep3 { name = "IEDdetect_beep3"; sound[] = {"common\server\IEDdetect\sounds\IEDdetect_beep3.ogg", db-56, 1.0}; titles[] = {}; }; class IEDdetect_wave { name = "IEDdetect_wave"; sound[] = {"common\server\IEDdetect\sounds\IEDdetect_wave.ogg", db-24, 1.0}; titles[] = {}; }; class IEDdetect_click { name = "IEDdetect_click"; sound[] = {"common\server\IEDdetect\sounds\IEDdetect_click.ogg", db-24, 1.0}; titles[] = {}; }; class akbar { name = "akbar"; sound[] = {"common\server\IEDdetect\sounds\akbar.ogg", db-10, 1.0}; titles[] = {}; };// Settings Dialog class INSURGENCY_OPTIONS { idd = -1; movingEnable = 1; onLoad = "uiNamespace setVariable ['INSURGENCY_OPTIONS', _this select 0]; _this call fillOptionsDialog"; class controlsBackground { class INS_BackGround : RscText { idc = -1; type = 0; style = 48; x = 0; y = 0; w = 0.8; h = 0.43; colorBackground[] = {0,0,0,0}; text = "\ca\ui\data\ui_mainmenu_background_ca.paa"; font = "Zeppelin32"; sizeEx = 0.032; }; }; class controls { class INS_GraslayerCaption : RscText { idc = -1; x = 0.12; y = 0.063; w = 0.25; h = 0.1; sizeEx = 0.029; colorBackground[] = {1, 1, 1, 0}; text = "Gras Layer:"; }; class INS_GraslayerCombo:RscCombo { idc = 1001; x = 0.125; y = 0.163; w = 0.17; h = 0.03; onLBSelChanged = "[_this] execVM 'common\client\UI\setgrass.sqf'"; }; class INS_CloseButton: RscShortcutButtonMain { idc = -1; text = "X"; action = "closeDialog 0"; default = true; x = 0.25; y = 0.31; h = 0.04; w = 0.1; sizeEx = 0.029; size = 0.029; class TextPos { left = 0.05; top = 0.002; right = 0; bottom = 0; }; }; class INS_MainCaption : RscText { x = 0.12; y = -0.025; w = 0.25; h = 0.1; sizeEx = 0.035; colorBackground[] = {1, 1, 1, 0}; text = "Settings"; }; }; }; class CfgSounds { #include "IEDdetect_sounds.hpp" };class RscTitles { //#include "IEDdetect_screens.hpp" class Rtags { idd=64431; movingEnable = true; fadein = 0; fadeout = 0; duration = 0.2; name = "TAGS_HUD"; controls[] = { "camtag", "nametag", "interact"}; onLoad = "uiNamespace setVariable ['TAGS_HUD', _this select 0]"; class camtag { type = CT_STRUCTURED_TEXT; idc = 64434; style = 0x00; x = safeZoneX; y = safeZoneY+safeZoneH/2+0.3; w = safeZoneW; h = safeZoneH; font = "Zeppelin33"; size = 0.03; colorText[] = { 0, 0.4, 0.8, 0.8}; colorBackground[] ={ 0,0,0,0.0}; text = ""; class Attributes { font = "Zeppelin33"; color = "#347C17"; align = "center"; valign = "middle"; shadow = "1"; shadowColor = "#000000"; size = "1"; }; }; class nametag { type = CT_STRUCTURED_TEXT; idc = 64435; style = 0x00; x = safeZoneX+ 0.1; y = safeZoneY+safeZoneH/2+0.05; w = safeZoneW; h = safeZoneH; font = "Zeppelin33"; size = 0.03; colorText[] = { 0, 0.4, 0.8, 0.8}; colorBackground[] ={ 0,0,0,0.0}; text = ""; class Attributes { font = "Zeppelin33"; color = "#2B60DE"; align = "center"; valign = "middle"; shadow = "1"; shadowColor = "#000000"; size = "1"; }; }; class interact { type = CT_STRUCTURED_TEXT; idc = 64436; style = 0x00; x = safeZoneX; y = safeZoneY+safeZoneH/2+0.2; w = safeZoneW; h = safeZoneH; font = "Zeppelin33"; size = 0.03; colorText[] = { 1, 1, 0, 0.8}; colorBackground[] ={ 0,0,0,0.0}; text = ""; class Attributes { font = "Zeppelin33"; color = "#2B60DE"; align = "center"; valign = "middle"; shadow = "1"; shadowColor = "#000000"; size = "1"; }; }; }; }; /* Controls Definitions. */ #ifdef VANILLA /* Green */ #define subcolor1 {0.7,1,0.7,1} #define subcolor1hex "#b3ffb3" #define WFBE_SoundClick "ui\ui_ok" #define WFBE_SoundEnter "ui\ui_over" #define WFBE_SoundEscape "ui\ui_cc" #else /* Yellow */ #define subcolor1 {1,1,0.7,1} #define subcolor1hex "#ffffb3" #define WFBE_SoundClick "\ca\ui\data\sound\onclick" #define WFBE_SoundEnter "\ca\ui\data\sound\onover" #define WFBE_SoundEscape "\ca\ui\data\sound\onescape" #endif class RscPicture { type = 0; idc = -1; style = 48; colorText[] = {0.75, 0.75, 0.75, 1}; colorBackground[] = {0, 0, 0, 0}; font = "Bitstream"; sizeEx = 0.025; soundClick[] = {WFBE_SoundClick, 0.2, 1}; soundEnter[] = {WFBE_SoundEnter, 0.2, 1}; soundEscape[] = {WFBE_SoundEscape, 0.2, 1}; soundPush[] = {"", 0.2, 1}; w = 0.275; h = 0.04; text = ""; }; class RscShortcutButton { type = 16; idc = -1; style = 0; default = 0; w = 0.183825; h = 0.104575; color[] = {0.543, 0.5742, 0.4102, 1.0}; color2[] = {0.95, 0.95, 0.95, 1}; colorBackground[] = {1, 1, 1, 1}; colorbackground2[] = {1, 1, 1, 0.4}; colorDisabled[] = {1, 1, 1, 0.25}; periodFocus = 1.2; periodOver = 0.8; class HitZone { left = 0.004; top = 0.029; right = 0.004; bottom = 0.029; }; class ShortcutPos { left = 0.004; top = 0.026; w = 0.0392157; h = 0.0522876; }; class TextPos { left = 0.05; top = 0.034; right = 0.005; bottom = 0.005; }; animTextureNormal = "\ca\ui\data\ui_button_normal_ca.paa"; animTextureDisabled = "\ca\ui\data\ui_button_disabled_ca.paa"; animTextureOver = "\ca\ui\data\ui_button_over_ca.paa"; animTextureFocused = "\ca\ui\data\ui_button_focus_ca.paa"; animTexturePressed = "\ca\ui\data\ui_button_down_ca.paa"; animTextureDefault = "\ca\ui\data\ui_button_default_ca.paa"; textureNoShortcut = ""; period = 0.4; font = "Zeppelin32"; size = 0.03521; sizeEx = 0.03521; text = ""; soundEnter[] = {"\ca\ui\data\sound\mouse2", 0.09, 1}; soundPush[] = {"\ca\ui\data\sound\new1", 0.09, 1}; soundClick[] = {"\ca\ui\data\sound\mouse3", 0.07, 1}; soundEscape[] = {"\ca\ui\data\sound\mouse1", 0.09, 1}; action = ""; class Attributes { font = "Zeppelin32"; color = "#E5E5E5"; align = "left"; shadow = "true"; }; class AttributesImage { font = "Zeppelin32"; color = "#E5E5E5"; align = "left"; }; }; class RscIGUIShortcutButton : RscShortcutButton { w = 0.183825; h = 0.0522876; style = 2; color[] = {1, 1, 1, 1}; color2[] = {1, 1, 1, 0.85}; colorBackground[] = {1, 1, 1, 1}; colorbackground2[] = {1, 1, 1, 0.85}; colorDisabled[] = {1, 1, 1, 0.4}; class HitZone { left = 0.002; top = 0.003; right = 0.002; bottom = 0.016; }; class ShortcutPos { left = -0.006; top = -0.007; w = 0.0392157; h = 0.0522876; }; class TextPos { left = 0.02; top = 0.0; right = 0.002; bottom = 0.016; }; animTextureNormal = "\ca\ui\data\igui_button_normal_ca.paa"; animTextureDisabled = "\ca\ui\data\igui_button_disabled_ca.paa"; animTextureOver = "\ca\ui\data\igui_button_over_ca.paa"; animTextureFocused = "\ca\ui\data\igui_button_focus_ca.paa"; animTexturePressed = "\ca\ui\data\igui_button_down_ca.paa"; animTextureDefault = "\ca\ui\data\igui_button_normal_ca.paa"; class Attributes { font = "Zeppelin32"; color = "#E5E5E5"; align = "center"; shadow = "true"; }; }; class RscShortcutButtonMain: RscShortcutButton { w = 0.313726; h = 0.104575; color[] = {0.543, 0.5742, 0.4102, 1.0}; colorDisabled[] = {1, 1, 1, 0.25}; class HitZone { left = 0.0; top = 0.0; right = 0.0; bottom = 0.0; }; class ShortcutPos { left = 0.0204; top = 0.026; w = 0.0392157; h = 0.0522876; }; class TextPos { left = 0.08; top = 0.034; right = 0.005; bottom = 0.005; }; animTextureNormal = "\ca\ui\data\ui_button_main_normal_ca.paa"; animTextureDisabled = "\ca\ui\data\ui_button_main_disabled_ca.paa"; animTextureOver = "\ca\ui\data\ui_button_main_over_ca.paa"; animTextureFocused = "\ca\ui\data\ui_button_main_focus_ca.paa"; animTexturePressed = "\ca\ui\data\ui_button_main_down_ca.paa"; animTextureDefault = "\ca\ui\data\ui_button_main_normal_ca.paa"; period = 0.5; font = "Zeppelin32"; size = 0.03921; sizeEx = 0.03921; text = ""; soundEnter[] = {"\ca\ui\data\sound\mouse2", 0.09, 1}; soundPush[] = {"\ca\ui\data\sound\new1", 0.09, 1}; soundClick[] = {"\ca\ui\data\sound\mouse3", 0.07, 1}; soundEscape[] = {"\ca\ui\data\sound\mouse1", 0.09, 1}; action = ""; class Attributes { font = "Zeppelin32"; color = "#E5E5E5"; align = "left"; shadow = "false"; }; class AttributesImage { font = "Zeppelin32"; color = "#E5E5E5"; align = "false"; }; }; class RscListBox { idc = -1; type = 5; style = 0 + 0x10; font = "Zeppelin32"; sizeEx = 0.04221; color[] = {1, 1, 1, 1}; colorText[] = {1, 1, 1, 0.75}; colorScrollbar[] = {0.95, 0.95, 0.95, 1}; colorSelect[] = {0.95, 0.95, 0.95, 1}; colorSelect2[] = {0.95, 0.95, 0.95, 1}; colorSelectBackground[] = {0.6, 0.8392, 0.4706, 1.0}; colorSelectBackground2[] = {0.6, 0.8392, 0.4706, 1.0}; columns[] = {0.1, 0.7, 0.1, 0.1}; period = 0; colorBackground[] = {0, 0, 0, 1}; maxHistoryDelay = 1.0; autoScrollSpeed = -1; autoScrollDelay = 5; autoScrollRewind = 0; soundSelect[] = {"\ca\ui\data\sound\new1", 0.09, 1}; class ScrollBar { color[] = {1, 1, 1, 0.6}; colorActive[] = {1, 1, 1, 1}; colorDisabled[] = {1, 1, 1, 0.3}; thumb = "\ca\ui\data\igui_scrollbar_thumb_ca.paa"; arrowFull = "\ca\ui\data\igui_arrow_top_active_ca.paa"; arrowEmpty = "\ca\ui\data\igui_arrow_top_ca.paa"; border = "\ca\ui\data\igui_border_scroll_ca.paa"; }; }; class RscListBoxA : RscListBox { type = 102; lineSpacing = 1; sizeEx = 0.029; rowHeight = 0.03; style = 16; arrowEmpty = "#(argb,8,8,3)color(1,1,1,1)"; arrowFull = "#(argb,8,8,3)color(1,1,1,1)"; }; class RscText { idc = -1; type = 0; x = 0; y = 0; h = 0.037; w = 0.3; style = 256; font = "Zeppelin32"; text = ""; SizeEx = 0.03921; colorText[] = {0.543, 0.5742, 0.4102, 1.0}; colorBackground[] = {0, 0, 0, 0}; }; class RscStructuredText { type = 13; idc = -1; style = 0; x = 0; y = 0; h = 0.035; w = 0.1; text = ""; size = 0.03421; colorText[] = subcolor1; class Attributes { font = "Zeppelin32"; color = subcolor1hex; align = "left"; shadow = true; }; }; class RscXSliderH { idc = -1; type = 43; style = 0x400 + 0x10; x = 0; y = 0; h = 0.029412; w = 0.4; color[] = {1, 1, 1, 0.4}; colorActive[] = {1, 1, 1, 1}; colorDisabled[] = {1, 1, 1, 0.2}; arrowEmpty = "\ca\ui\data\ui_arrow_left_ca.paa"; arrowFull = "\ca\ui\data\ui_arrow_left_active_ca.paa"; border = "\ca\ui\data\ui_border_frame_ca.paa"; thumb = "\ca\ui\data\ui_slider_bar_ca.paa"; }; class RscCombo { idc = -1; type = 4; style = 1; x = 0; y = 0; w = 0.3; h = 0.035; colorSelect[] = {0.023529, 0, 0.0313725, 1}; colorText[] = {0.023529, 0, 0.0313725, 1}; colorBackground[] = {0.95, 0.95, 0.95, 1}; colorSelectBackground[] = {0.543, 0.5742, 0.4102, 1.0}; colorScrollbar[] = {0.023529, 0, 0.0313725, 1}; arrowEmpty = "\ca\ui\data\ui_arrow_combo_ca.paa"; arrowFull = "\ca\ui\data\ui_arrow_combo_active_ca.paa"; wholeHeight = 0.45; color[] = {0, 0, 0, 0.6}; colorActive[] = {0, 0, 0, 1}; colorDisabled[] = {0, 0, 0, 0.3}; font = "Zeppelin32"; sizeEx = 0.031; soundSelect[] = {"\ca\ui\data\sound\new1", 0.09, 1}; soundExpand[] = {"\ca\ui\data\sound\new1", 0.09, 1}; soundCollapse[] = {"\ca\ui\data\sound\new1", 0.09, 1}; maxHistoryDelay = 1.0; class ScrollBar { color[] = {1, 1, 1, 0.6}; colorActive[] = {1, 1, 1, 1}; colorDisabled[] = {1, 1, 1, 0.3}; thumb = "\ca\ui\data\ui_scrollbar_thumb_ca.paa"; arrowFull = "\ca\ui\data\ui_arrow_top_active_ca.paa"; arrowEmpty = "\ca\ui\data\ui_arrow_top_ca.paa"; border = "\ca\ui\data\ui_border_scroll_ca.paa"; }; }; class RscClickableText { idc = -1; type = 11; style = 48 + 0x800; color[] = {0.75,0.75,0.75,1}; colorActive[] = {1,1,1,1}; colorBackground[] = {0.6, 0.8392, 0.4706, 1.0}; colorBackgroundSelected[] = {0.6, 0.8392, 0.4706, 1.0}; colorFocused[] = {0.0, 0.0, 0.0, 0}; font = "Zeppelin32"; sizeEx = 0.03921; soundClick[] = {WFBE_SoundClick,0.2,1}; soundDoubleClick[] = {"", 0.1, 1}; soundEnter[] = {WFBE_SoundEnter,0.2,1}; soundEscape[] = {WFBE_SoundEscape,0.2,1}; soundPush[] = {, 0.2, 1}; w = 0.275; h = 0.04; text = ""; }; class RscMapControl { type = 101; moveOnEdges = 1; sizeEx = 0.025; style = 48; x = 0.2; y = 0.2; w = 0.2; h = 0.2; ptsPerSquareSea = 8; ptsPerSquareTxt = 10; ptsPerSquareCLn = 10; ptsPerSquareExp = 10; ptsPerSquareCost = 10; ptsPerSquareFor = "6.0f"; ptsPerSquareForEdge = "15.0f"; ptsPerSquareRoad = "3f"; ptsPerSquareObj = 15; showCountourInterval = "false"; maxSatelliteAlpha = 0.75; alphaFadeStartScale = 0.15; alphaFadeEndScale = 0.29; colorLevels[] = {0.65, 0.6, 0.45, 1}; colorSea[] = {0.46, 0.65, 0.74, 0.5}; colorForest[] = {0.45, 0.64, 0.33, 0.5}; colorRocks[] = {0, 0, 0, 0.3}; colorCountlines[] = {0.85, 0.8, 0.65, 1}; colorMainCountlines[] = {0.45, 0.4, 0.25, 1}; colorCountlinesWater[] = {0.25, 0.4, 0.5, 0.3}; colorMainCountlinesWater[] = {0.25, 0.4, 0.5, 0.9}; colorPowerLines[] = {0.1, 0.1, 0.1, 1}; colorRailWay[] = {0.8, 0.2, 0, 1}; colorForestBorder[] = {0, 0, 0, 0}; colorRocksBorder[] = {0, 0, 0, 0}; colorNames[] = {0.1, 0.1, 0.1, 0.9}; colorInactive[] = {1, 1, 1, 0.5}; colorText[] = {0, 0, 0, 1}; colorBackground[] = {0.8, 0.8, 0.8, 1}; font = "EtelkaNarrowMediumPro"; colorOutside[] = {0, 0, 0, 1}; fontLabel = "Zeppelin32"; sizeExLabel = 0.034; fontGrid = "Zeppelin32"; sizeExGrid = 0.03; fontUnits = "Zeppelin32"; sizeExUnits = 0.034; fontNames = "Zeppelin32"; sizeExNames = 0.056; fontInfo = "Zeppelin32"; sizeExInfo = 0.034; fontLevel = "Zeppelin32"; sizeExLevel = 0.024; text = "\ca\ui\data\map_background2_co.paa"; class Task { icon = "\ca\ui\data\ui_taskstate_current_CA.paa"; iconCreated = "\ca\ui\data\ui_taskstate_new_CA.paa"; iconCanceled = "#(argb,8,8,3)color(0,0,0,0)"; iconDone = "\ca\ui\data\ui_taskstate_done_CA.paa"; iconFailed = "\ca\ui\data\ui_taskstate_failed_CA.paa"; color[] = {0.863, 0.584, 0.0, 1}; colorCreated[] = {0.95, 0.95, 0.95, 1}; colorCanceled[] = {0.606, 0.606, 0.606, 1}; colorDone[] = {0.424, 0.651, 0.247, 1}; colorFailed[] = {0.706, 0.0745, 0.0196, 1}; size = 27; importance = 1; coefMin = 1; coefMax = 1; }; class CustomMark { icon = "\ca\ui\data\map_waypoint_ca.paa"; color[] = {0.6471, 0.6706, 0.6235, 1.0}; size = 18; importance = 1; coefMin = 1; coefMax = 1; }; class Legend { x = "SafeZoneX"; y = "SafeZoneY"; w = 0.34; h = 0.152; font = "Zeppelin32"; sizeEx = 0.03921; colorBackground[] = {0.906, 0.901, 0.88, 0}; color[] = {0, 0, 0, 1}; }; class Bunker { icon = "\ca\ui\data\map_bunker_ca.paa"; size = 14; color[] = {0, 0, 1, 1}; importance = 1.5 * 14 * 0.05; coefMin = 0.25; coefMax = 4; }; class Bush { icon = "\ca\ui\data\map_bush_ca.paa"; color[] = {0.55, 0.64, 0.43, 1}; size = 14; importance = 0.2 * 14 * 0.05; coefMin = 0.25; coefMax = 4; }; class BusStop { icon = "\ca\ui\data\map_busstop_ca.paa"; color[] = {0, 0, 1, 1}; size = 12; importance = 1 * 10 * 0.05; coefMin = 0.25; coefMax = 4; }; class Command { icon = "\ca\ui\data\map_waypoint_ca.paa"; color[] = {0, 0.9, 0, 1}; size = 18; importance = 1; coefMin = 1; coefMax = 1; }; class Cross { icon = "\ca\ui\data\map_cross_ca.paa"; size = 16; color[] = {0, 0.9, 0, 1}; importance = 0.7 * 16 * 0.05; coefMin = 0.25; coefMax = 4; }; class Fortress { icon = "\ca\ui\data\map_bunker_ca.paa"; size = 16; color[] = {0, 0.9, 0, 1}; importance = 2 * 16 * 0.05; coefMin = 0.25; coefMax = 4; }; class Fuelstation { icon = "\ca\ui\data\map_fuelstation_ca.paa"; size = 16; color[] = {0, 0.9, 0, 1}; importance = 2 * 16 * 0.05; coefMin = 0.75; coefMax = 4; }; class Fountain { icon = "\ca\ui\data\map_fountain_ca.paa"; color[] = {0.2, 0.45, 0.7, 1}; size = 11; importance = 1 * 12 * 0.05; coefMin = 0.25; coefMax = 4; }; class Hospital { icon = "\ca\ui\data\map_hospital_ca.paa"; color[] = {0.78, 0, 0.05, 1}; size = 16; importance = 2 * 16 * 0.05; coefMin = 0.5; coefMax = 4; }; class Chapel { icon = "\ca\ui\data\map_chapel_ca.paa"; color[] = {0, 0, 1, 1}; size = 16; importance = 1 * 16 * 0.05; coefMin = 0.9; coefMax = 4; }; class Church { icon = "\ca\ui\data\map_church_ca.paa"; size = 16; color[] = {0, 0.9, 0, 1}; importance = 2 * 16 * 0.05; coefMin = 0.9; coefMax = 4; }; class Lighthouse { icon = "\ca\ui\data\map_lighthouse_ca.paa"; size = 14; color[] = {0, 0.9, 0, 1}; importance = 3 * 16 * 0.05; coefMin = 0.9; coefMax = 4; }; class Quay { icon = "\ca\ui\data\map_quay_ca.paa"; size = 16; color[] = {0, 0.9, 0, 1}; importance = 2 * 16 * 0.05; coefMin = 0.5; coefMax = 4; }; class Rock { icon = "\ca\ui\data\map_rock_ca.paa"; color[] = {0.1, 0.1, 0.1, 0.8}; size = 12; importance = 0.5 * 12 * 0.05; coefMin = 0.25; coefMax = 4; }; class Ruin { icon = "\ca\ui\data\map_ruin_ca.paa"; size = 16; color[] = {0, 0.9, 0, 1}; importance = 1.2 * 16 * 0.05; coefMin = 1; coefMax = 4; }; class SmallTree { icon = "\ca\ui\data\map_smalltree_ca.paa"; color[] = {0.45, 0.64, 0.33, 0.4}; size = 12; importance = 0.6 * 12 * 0.05; coefMin = 0.25; coefMax = 4; }; class Stack { icon = "\ca\ui\data\map_stack_ca.paa"; size = 20; color[] = {0, 0.9, 0, 1}; importance = 2 * 16 * 0.05; coefMin = 0.9; coefMax = 4; }; class Tree { icon = "\ca\ui\data\map_tree_ca.paa"; color[] = {0.45, 0.64, 0.33, 0.4}; size = 12; importance = 0.9 * 16 * 0.05; coefMin = 0.25; coefMax = 4; }; class Tourism { icon = "\ca\ui\data\map_tourism_ca.paa"; size = 16; color[] = {0.78, 0, 0.05, 1}; importance = 1 * 16 * 0.05; coefMin = 0.7; coefMax = 4; }; class Transmitter { icon = "\ca\ui\data\map_transmitter_ca.paa"; color[] = {0, 0.9, 0, 1}; size = 20; importance = 2 * 16 * 0.05; coefMin = 0.9; coefMax = 4; }; class ViewTower { icon = "\ca\ui\data\map_viewtower_ca.paa"; color[] = {0, 0.9, 0, 1}; size = 16; importance = 2.5 * 16 * 0.05; coefMin = 0.5; coefMax = 4; }; class Watertower { icon = "\ca\ui\data\map_watertower_ca.paa"; color[] = {0.2, 0.45, 0.7, 1}; size = 20; importance = 1.2 * 16 * 0.05; coefMin = 0.9; coefMax = 4; }; class Waypoint { icon = "\ca\ui\data\map_waypoint_ca.paa"; color[] = {0, 0, 1, 1}; size = 14; importance = 2.5 * 16 * 0.05; coefMin = 0.5; coefMax = 4; }; class WaypointCompleted { icon = "\ca\ui\data\map_waypoint_completed_ca.paa"; color[] = {0, 0, 1, 1}; size = 14; importance = 2.5 * 16 * 0.05; coefMin = 0.5; coefMax = 4; }; class ActiveMarker { icon = ""; color[] = {0, 0, 1, 1}; size = 14; importance = 2.5 * 16 * 0.05; coefMin = 0.5; coefMax = 4; }; }; createHeliPilot = { call compile format[' %1 = _PGroup createUnit [PILOTTYPE, spawnPos, [], 0, "NONE"]; %1 setVehicleVarName "%1"; %1 ', _this]; }; pilotAI = { private ["_pilot","_stopped","_landing","_movePos","_units","_vcl"]; _pilot = "heliPilot"; if isNil _pilot then { _pilot call createHeliPilot; }; _pilot = call compile _pilot; if isNull _pilot then { // null objects can't be re-used in SQF _pilot = "heliPilot"; _pilot call createHeliPilot; }; if !alive _pilot then { deleteVehicle _pilot; _pilot = _pilot call createHeliPilot; }; _units = units group _pilot; if (!(pilotController in _units) && count _units == 1) then { [_pilot] join _PGroup; }; _vcl = vehicle _pilot; if (_vcl == _pilot) then { if (alive heli && heli distance startPos < 300) then { heli setDamage 0; heli setFuel 1; heli lockDriver false; _pilot assignAsDriver heli; _pilot moveInDriver heli; heli lockDriver true; }; } else { _stopped = _vcl getVariable "stopped"; _landing = _vcl getVariable "landing"; if !(pilotController in _units) exitWith { if !isNil "_stopped" then { _vcl setVariable ["stopped", nil]; }; if !isNil "_landing" then { _vcl setVariable ["landing", nil]; }; }; if (getPosATL _vcl select 2 < 5 && count crew _vcl > 1 && isEngineOn _vcl) exitWith { if !isNil "_stopped" exitWith {}; doStop _pilot; _vcl flyInHeight (getPosATL _vcl select 2); _vcl setVariable ["stopped", true]; }; if !isNil "_stopped" then { _vcl setVariable ["stopped", nil]; }; _movePos = expectedDestination _pilot select 0; if (_movePos select 0 == 0 && _vcl distance helipad > 200) exitWith { _vcl flyInHeight 30; _vcl doMove getPosATL helipad; }; if (_vcl distance helipad <= 200 && isEngineOn _vcl) exitWith { if (getPosATL _vcl select 2 < 2) exitWith { _pilot action ["EngineOff", _vcl]; }; if !isNil "_landing" exitWith {}; _vcl land "land"; _vcl setVariable ["landing", true]; }; if !isNil "_landing" then { _vcl setVariable ["landing", nil]; }; }; }; spawnAIVehicle = { private ["_num","_track","_speed","_grp","_type","_obj","_mkr","_pos","_vcl","_ai","_unum"]; _unum = _this; _num = _unum % 3; if (_num == 0) then { _num = 3; }; _grp = ["","vclGrp",_unum+1,"east"] call getGroup; _type = eastVehiclesFreq select round(random (count eastVehiclesFreq - 1)); _obj = call compile ("vclSpawn" + str(_num)); _mkr = str _unum; _pos = getPosATL _obj; _vcl = createVehicle [_type, _pos, [], 0, "None"]; if (DEBUG) then { server globalChat format["AI VEHICLE %1 of TYPE %2 CREATED! POSITION: %3", _unum, str _vcl, str _pos]; }; _vcl setDir getDir _obj; _ai = _grp createUnit [vclCrewClass, _pos, [], 0, "None"]; _ai setRank (eastRanks select 2); _ai moveInDriver _vcl; _ai = _grp createUnit [vclCrewClass, _pos, [], 0, "None"]; _ai setRank (eastRanks select 3); _ai moveInGunner _vcl; if !(typeOf _vcl in eastLightVehicles) then { _vcl lockDriver true; _vcl lockTurret [[0], true]; }; _speed = "slow"; _track = ""; if (DEBUG) then { _track = "track"; }; if (typeOf _vcl in eastLightVehicles) then { _speed = "noslow"; }; [leader _grp, _mkr, _speed, "nowait", _track, "delete:", 200] execVM "common\server\AI\UPS.sqf"; }; spawnAIVehicles = { private "_num"; for "_i" from 1 to eastVehicleNum do { _i call spawnAIVehicle; if (DEBUG) then { server globalChat format ["SPAWNING AI VEHICLE %1", _i]; }; }; }; spawnAIGuns = { private ["_id","_gCount","_house","_houses"]; _houses = [CENTERPOS,AORADIUS, 4, true] call findHouses; _gCount = 0; while{ _gCount < maxStaticGuns && count _houses > 0} do{ _house = _houses select random(count _houses - 1); _id = GUNROOFPOSITIONS find (typeOf _house); if (_id != -1 && _house distance startLocation > 500) then { if (count nearestObjects[getPosATL _house, eastStationaryGuns, 800] == 0) then { [_id, _house, _gCount] call createRoofGun; _gCount = _gCount + 1; }; }; _houses = _houses - [_house]; }; _gCount }; createRoofGun = { private ["_class","_housePositions","_id","_housePosition","_classId","_gun","_house","_dir","_grp","_gCount","_ai"]; _id = _this select 0; _house = _this select 1; _gCount = _this select 2; _housePositions = GUNROOFPOSITIONS select (_id+1); _housePosition = (_housePositions select random (count _housePositions - 1)) select 0; _classId = (_housePositions select random (count _housePositions - 1)) select 1; if (_classId <= 0.2) then { _class = stationaryGunsLow select random(count stationaryGunsLow - 1); }; if (_classId > 0.2 && _classId < 0.5) then { _class = stationaryGunsMed select random(count stationaryGunsMed - 1); }; if (_classId >= 0.5) then { _class = stationaryGunsHigh select random(count stationaryGunsHigh - 1); }; _gun = createVehicle [_class, spawnPos, [], 0, "None"]; for "_j" from 0 to 10 do { _gun addMagazine (magazines _gun select 0); }; _gun setPosATL (_house buildingPos _housePosition); _dir = ((boundingCenter _house select 0) - (getPosATL _gun select 0)) atan2 ((boundingCenter _house select 1) - (getPosATL _gun select 1)); _dir = (360 - _dir); //_dir = ((getPosATL startLocation select 0) - (getPosATL _gun select 0)) atan2 ((getPosATL startLocation select 1) - (getPosATL _gun select 1)); _gun setDir _dir; _grp = ["static","Grp",str _gCount,"east"] call getGroup; _ai = _grp createUnit [staticClass, spawnPos, [], 0, "NONE"]; _ai assignAsGunner _gun; _ai moveInGunner _gun; _grp setFormDir _dir; if DEBUG then { [_house, _ai] call createDebugMarker; }; }; KRON_UPS_Debug = DEBUG; // find a random position within a radius KRON_randomPos = { private["_cx","_cy","_rx","_ry","_cd","_sd","_ad","_tx","_ty","_xout","_yout"]; _cx=_this select 0; _cy=_this select 1; _rx=_this select 2; _ry=_this select 3; _cd=_this select 4; _sd=_this select 5; _ad=_this select 6; _tx=random (_rx*2)-_rx; _ty=random (_ry*2)-_ry; _xout=if (_ad!=0) then { _cx+ (_cd*_tx - _sd*_ty)} else { _cx+_tx}; _yout=if (_ad!=0) then { _cy+ (_sd*_tx + _cd*_ty)} else { _cy+_ty}; [_xout,_yout,0] }; // find any building (and its possible building positions) near a position KRON_PosInfo = { private["_pos","_lst","_bld","_bldpos"]; _pos=_this select 0; _lst= nearestObjects [_pos,["House","vbs2_house"],20]; if (count _lst==0) then { _bld=0; _bldpos=0} else { _bld=_lst select 0; _bldpos=[_bld] call KRON_BldPos}; [_bld,_bldpos]}; /// find the highest building position KRON_BldPos = { private ["_bld","_bi","_bldpos","_maxZ","_bp","_bz","_higher"]; _bld=_this select 0; _maxZ=0; _bi=0; _bldpos=0; while { _bi>=0} do { _bp = _bld BuildingPos _bi; if ((_bp select 0)==0) then { _bi=-99} else { _bz=_bp select 2; _higher = ((_bz>_maxZ) || ((abs(_bz-_maxZ)<.5) && (random 1>.5))); if ((_bz>4) && _higher) then { _maxZ=_bz; _bldpos=_bi}}; _bi=_bi+1}; _bldpos}; KRON_OnRoad = { private["_pos","_car","_tries","_lst"]; _pos=_this select 0; _car=_this select 1; _tries=_this select 2; _lst=_pos nearRoads 4; if ((count _lst!=0) && (_car || !(surfaceIsWater _pos))) then { _tries=99}; (_tries+1)}; KRON_getDirPos = { private["_a","_b","_from","_to","_return"]; _from = _this select 0; _to = _this select 1; _return = 0; _a = ((_to select 0) - (_from select 0)); _b = ((_to select 1) - (_from select 1)); if (_a != 0 || _b != 0) then { _return = _a atan2 _b}; if ( _return < 0 ) then { _return = _return + 360}; _return}; KRON_distancePosSqr = { (((_this select 0) select 0)-((_this select 1) select 0))^2 + (((_this select 0) select 1)-((_this select 1) select 1))^2}; KRON_relPos = { private["_p","_d","_a","_x","_y","_xout","_yout"]; _p=_this select 0; _x=_p select 0; _y=_p select 1; _d=_this select 1; _a=_this select 2; _xout=_x + sin(_a)*_d; _yout=_y + cos(_a)*_d; [_xout,_yout,0]}; KRON_rotpoint = { private["_cp","_a","_tx","_ty","_cd","_sd","_cx","_cy","_xout","_yout"]; _cp=_this select 0; _cx=_cp select 0; _cy=_cp select 1; _a=_this select 1; _cd=cos(_a*-1); _sd=sin(_a*-1); _tx=_this select 2; _ty=_this select 3; _xout=if (_a!=0) then { _cx+ (_cd*_tx - _sd*_ty)} else { _cx+_tx}; _yout=if (_a!=0) then { _cy+ (_sd*_tx + _cd*_ty)} else { _cy+_ty}; [_xout,_yout,0]}; KRON_stayInside = { private["_np","_nx","_ny","_cp","_cx","_cy","_rx","_ry","_d","_tp","_tx","_ty","_fx","_fy"]; _np=_this select 0; _nx=_np select 0; _ny=_np select 1; _cp=_this select 1; _cx=_cp select 0; _cy=_cp select 1; _rx=_this select 2; _ry=_this select 3; _d=_this select 4; _tp = [_cp,_d,(_nx-_cx),(_ny-_cy)] call KRON_rotpoint; _tx = _tp select 0; _fx=_tx; _ty = _tp select 1; _fy=_ty; if (_tx<(_cx-_rx)) then { _fx=_cx-_rx}; if (_tx>(_cx+_rx)) then { _fx=_cx+_rx}; if (_ty<(_cy-_ry)) then { _fy=_cy-_ry}; if (_ty>(_cy+_ry)) then { _fy=_cy+_ry}; if ((_fx!=_tx) || (_fy!=_ty)) then { _np = [_cp,_d*-1,(_fx-_cx),(_fy-_cy)] call KRON_rotpoint}; _np; }; KRON_getArg = { private["_cmd","_arg","_list","_a","_v"]; _cmd=_this select 0; _arg=_this select 1; _list=_this select 2; _a=-1; { _a=_a+1; _v=format["%1",_list select _a]; if (_v==_cmd) then { _arg=(_list select _a+1)}; } foreach _list; _arg }; KRON_deleteDead = { private["_u","_s"]; _u=_this select 0; _s= _this select 1; _u removeAllEventHandlers "killed"; sleep _s; hideBody _u; sleep 5; deletevehicle _u; }; KRON_AllWest=[]; KRON_AllEast=[]; KRON_AllRes=[]; KRON_KnownEnemy=[objNull,objNull]; { _s = side _x; switch (_s) do { case west: { KRON_AllWest=KRON_AllWest+[_x]; }; case east: { KRON_AllEast=KRON_AllEast+[_x]; }; case resistance: { KRON_AllRes=KRON_AllRes+[_x]; }; }; }forEach allUnits; if (isNil("KRON_UPS_Debug")) then { KRON_UPS_Debug=false}; KRON_HQ="Logic" createUnit [[0,0], group Server]; KRON_UPS_Instances=0; KRON_UPS_Total=0; KRON_UPS_Exited=0; // ========================================================================================================= // Urban Patrol Script // Version: 2.1.0 // Author: Kronzky (www.kronzky.info / kronzky@gmail.com) // Modified by pogoman for insurgency // --------------------------------------------------------------------------------------------------------- // Required parameters: // unit = Unit to patrol area (1st argument) // markername = Name of marker that covers the active area. (2nd argument) // (e.g. nul=[this,"town"] execVM "ups.sqf") // // Optional parameters: // nomove = Unit will stay at start position until enemy is spotted. // nofollow = Unit will only follow an enemy within the marker area. // delete:n = Delete dead units after 'n' seconds. // nowait = Do not wait at patrol end points. // noslow = Keep default behaviour of unit (don't change to "safe" and "limited"). // noai = Don't use enhanced AI for evasive and flanking maneuvers. // trigger = Display a message when no more units are left in sector. // empty:n = Consider area empty, even if 'n' units are left. // track = Display a position and destination marker for each unit. // // ========================================================================================================= // how far opfors should move away if they're under attack // set this to 200-300, when using the script in open areas (rural surroundings) #define SAFEDIST 75 // how close unit has to be to target to generate a new one #define CLOSEENOUGH 10 // how close units have to be to each other to share information #define SHAREDIST 100 // how long AI units should be in alert mode after initially spotting an enemy #define ALERTTIME 180 #define westPlayerStrings ["Hitman111","Hitman112","Hitman113","Hitman114","Hitman115",\ "Hitman121","Hitman122","Hitman123","Hitman124","Hitman125",\ "Hitman131","Hitman132","Hitman133","Hitman134","Hitman135",\ "Hitman141","Hitman142","Hitman143","Hitman144","Hitman145",\ "Hitman151","Hitman152","Hitman153","Hitman154","Hitman155",\ "Hitman161","Hitman162","Hitman163","Hitman164","Hitman165"] // bugfix value #define CENTERPOS getArray (configFile >> "CfgWorlds" >> worldName >> "centerPosition") nearestPlayers = { private ["_result","_pos","_range","_type","_alive"]; _pos = _this select 0; _range = _this select 1; _alive = _this select 2; _type = _this select 3; if (_type == "count") then { _result = 0; } else { _result = []; }; { if (!isNil _x) then { _plr = call compile _x; if (!isNull _plr) then { if (_plr distance _pos <= _range && (alive _plr || !_alive)) then { if (_type == "count") then { _result = _result + 1; } else { _result = _result + [_plr]; }; }; }; }; } forEach westPlayerStrings; _result }; #define nearestPlayers(W,X,Y,Z) ([W,X,Y,Z] call nearestPlayers) // --------------------------------------------------------------------------------------------------------- //echo format["[K] %1",_this]; // convert argument list to uppercase _UCthis = []; for [{ _i=0},{ _i0) then { { if (alive _x) then { _npc = _x; _exit = false; }} forEach _obj; }; }; // give this group a unique index _grpidx = format["%1",KRON_UPS_Instances]; _grpname = format["%1_%2",(side _npc),_grpidx]; // remember the original group members, so we can later find a new leader, in case he dies _members = units _npc; KRON_UPS_Total = KRON_UPS_Total + (count _members); // what type of "vehicle" is unit ? _isman = _npc isKindOf "Man"; _iscar = _npc isKindOf "vbs2_LandVehicles"; _isboat = _npc isKindOf "Ship"; _isplane = _npc isKindOf "Air"; // check to see whether group is an enemy of the player (for attack and avoidance maneuvers) // since countenemy doesn't count vehicles, and also only counts enemies if they're known, // we just have to brute-force it for now, and declare *everyone* an enemy who isn't a civilian _issoldier = side _npc != civilian; _friends=[]; _enemies=[]; _sharedenemy=0; //TODO: FIND A WAY TO DETERMINE ASSOCIATION OF RESISTANCE UNITS if (_issoldier) then { switch (side _npc) do { case west: { _friends=_friends+KRON_AllWest; _enemies=_enemies+KRON_AllEast+KRON_AllRes; _sharedenemy=0; }; case east: { _friends=_friends+KRON_AllEast; _enemies=_enemies+KRON_AllWest+KRON_AllRes; _sharedenemy=1; }; case resistance: { _enemies=_enemies+KRON_AllEast+KRON_AllWest; _sharedenemy=2; }; }; { _friends=_friends-[_x]; _x disableAI "autotarget"; } forEach _members; }; // global unit variable to externally influence script _named = false; _npcname = str(side _npc); if ("NAMED" in _UCthis) then { _named = true; _npcname = format["%1",_npc]; _grpidx = _npcname; }; // create global variable for this group call compile format ["KRON_UPS_%1=1",_npcname]; // store some trig calculations _cosdir=cos(_areadir); _sindir=sin(_areadir); // minimum distance of new target position if (_rangeX==0) exitWith { hint format["UPS: Cannot patrol Sector: %1\nArea Marker doesn't exist",_areaname]; }; _mindist=(_rangeX^2+_rangeY^2)/4; // remember the original mode & speed _orgMode = behaviour _npc; _orgSpeed = speedmode _npc; _speedmode = _orgSpeed; // set first target to current position (so we'll generate a new one right away) _currPos = getPosATL _npc; _orgPos = _currPos; _orgWatch=[_currPos,50,getDir _npc] call KRON_relPos; _orgDir = getDir _npc; _avoidPos = [0,0]; _flankPos = [0,0]; _attackPos = [0,0]; _dist = 0; _lastdist = 0; _lastmove1 = 0; _lastmove2 = 0; _maxmove=0; _moved=0; _damm=0; _dammchg=0; _lastdamm = 0; curTimeontarget = 0; _fightmode = "walk"; _fm=0; _gothit = false; _hitPos=[0,0,0]; _react = 99; _lastdamage = 0; _lastknown = 0; _opfknowval = 0; _sin90=1; _cos90=0; _sin270=-1; _cos270=0; // set target tolerance high for choppers & planes _closeenough=CLOSEENOUGH*CLOSEENOUGH; if (_isplane) then { _closeenough=5000}; // ***************************************** optional arguments ***************************************** // wait at patrol end points _pause = if ("NOWAIT" in _UCthis) then { "NOWAIT"} else { "WAIT"}; // don't move until an enemy is spotted _nomove = if ("NOMOVE" in _UCthis) then { "NOMOVE"} else { "MOVE"}; // don't follow outside of marker area _nofollow = if ("NOFOLLOW" in _UCthis) then { "NOFOLLOW"} else { "FOLLOW"}; // share enemy info _shareinfo = if ("NOSHARE" in _UCthis) then { "NOSHARE"} else { "SHARE"}; // "area cleared" trigger activator _usetrigger = if ("TRIGGER" in _UCthis) then { "TRIGGER"} else { if ("NOTRIGGER" in _UCthis) then { "NOTRIGGER"} else { "SILENTTRIGGER"}}; // suppress fight behaviour if ("NOAI" in _UCthis) then { _issoldier=false}; // adjust cycle delay _cycle = ["CYCLE:",5,_UCthis] call KRON_getArg; // drop units at random positions _initpos = "ORIGINAL"; if ("RANDOM" in _UCthis) then { _initpos = "RANDOM"}; if ("RANDOMUP" in _UCthis) then { _initpos = "RANDOMUP"}; if ("RANDOMDN" in _UCthis) then { _initpos = "RANDOMDN"}; // don't position groups or vehicles on rooftops if ((_initpos!="ORIGINAL") && ((!_isman) || (count _members)>1)) then { _initpos="RANDOMDN"}; // set behaviour modes (or not) _noslow = if ("NOSLOW" in _UCthis) then { "NOSLOW"} else { "SLOW"}; if (_noslow!="NOSLOW") then { _npc setbehaviour "safe"; _npc setSpeedMode "limited"; _speedmode = "limited"; }; // track unit _track = if (("TRACK" in _UCthis) || KRON_UPS_Debug) then { "TRACK"} else { "NOTRACK"}; _trackername = ""; _destname = ""; if (_track=="TRACK") then { _track = "TRACK"; _trackername=format["trk_%1",_grpidx]; _markerobj = createMarker[_trackername,[0,0]]; _markerobj setMarkerShape "ICON"; _markertype = if (isClass(configFile >> "cfgMarkers" >> "WTF_Dot")) then { "WTF_DOT"} else { "DOT"}; _trackername setMarkerType _markertype; _markercolor = switch (side _npc) do { case west: { "ColorGreen"}; case east: { "ColorRed"}; case resistance: { "ColorBlue"}; default { "ColorBlack"}; }; _trackername setMarkerColor _markercolor; _trackername setMarkerText format["%1",_grpidx]; _trackername setmarkerpos _currPos; _trackername setMarkerSize [.5,.5]; _destname=format["dest_%1",_grpidx]; _markerobj = createMarker[_destname,[0,0]]; _markerobj setMarkerShape "ICON"; _markertype = if (isClass(configFile >> "cfgMarkers" >> "WTF_Flag")) then { "WTF_FLAG"} else { "FLAG"}; _destname setMarkerType _markertype; _destname setMarkerColor _markercolor; _destname setMarkerText format["%1",_grpidx]; _destname setMarkerSize [.5,.5]; }; // delete dead units _deletedead = ["DELETE:",0,_UCthis] call KRON_getArg; if (_deletedead>0) then { { _x addEventHandler['killed',format["[_this select 0,%1] spawn KRON_deleteDead",_deletedead]]}forEach _members; }; // init done _makenewtarget=true; _newpos=false; _targetPos = _currPos; _swimming = false; _waiting = if (_nomove=="NOMOVE") then { 9999} else { 0}; // exit if something went wrong during initialization (or if unit is on roof) if (_exit) exitWith { if ((KRON_UPS_Debug) && !_onroof) then { hint "Initialization aborted"}; }; _vcl = vehicle _npc; _grp = group _npc; // *********************************************************************************************************** // ************************************************ MAIN LOOP ************************************************ _loop=true; _currcycle=_cycle; while { _loop} do { sleep .01; // keep track of how long we've been moving towards a destination curTimeontarget=curTimeontarget+_currcycle; _react=_react+_currcycle; // did anybody in the group got hit? _newdamage=0; { if ((damage _x)>0.2) then { _newdamage=_newdamage+(damage _x); // damage has increased since last round if (_newdamage>_lastdamage) then { _lastdamage=_newdamage; _gothit=true; }; _hitPos= getPosATL _x; if (!alive _x) then { _members=_members-[_x]; _friends=_friends-[_x]; }; }; if (primaryWeapon _x == "") then { _members=_members-[_x]; _friends=_friends-[_x]; }; } forEach _members; sleep .01; // nobody left alive, exit routine if (count _members==0) then { _exit=true; if (KRON_UPS_Debug) then { server globalChat format["UPS group %1 all dead or surrendered", _grpidx]; }; sleep 5; deleteGroup (group _npc); sleep 300+(random aiVehicleRespawnTime); (call compile _grpidx) call spawnAIVehicle; } else { // did the leader die? if (!alive _npc || primaryWeapon _npc == "") then { _npc = _members select 0; group _npc selectLeader _npc; if (isPlayer _npc) then { _exit=true}; }; }; // current position _currPos = getPosATL _npc; _currX = _currPos select 0; _currY = _currPos select 1; if (_track=="TRACK") then { _trackername setmarkerpos _currPos; }; // if the AI is a civilian we don't have to bother checking for enemy encounters if ((_issoldier) && ((count _enemies)>0) && !(_exit)) then { // if the leader comes across another unit that's either injured or dead, go into combat mode as well. // If the other person is still alive, share enemy information. if ((_shareinfo=="SHARE") && (behaviour _npc=="SAFE")) then { _others=_friends-_members; { if ((!(isNull _x) && (_npc distance _x.5) || (behaviour _x in ["AWARE","COMBAT"]))) exitWith { _npc setBehaviour "aware"; _gothit=true; if ((_hitPos select 0)==0) then { _hitPos = getPosATL _x}; if (_npc knowsabout _x>3) then { if (alive _x) then { _npc reveal (KRON_KnownEnemy select _sharedenemy)}; }; }; }forEach _others; }; sleep .01; // did the group spot an enemy? _lastknown=_opfknowval; _opfknowval=0; _maxknowledge=0; { _knows=_npc knowsabout _x; if ((alive _x) && (_knows>0.2) && (_knows>_maxknowledge)) then { KRON_KnownEnemy set [_sharedenemy,_x]; _opfknowval=_opfknowval+_knows; _maxknowledge=_knows; }; if (!alive _x) then { _enemies=_enemies-[_x]}; if (_maxknowledge==4) exitWith {}; }forEach _enemies; sleep .01; _pursue=false; _accuracy=100; // opfor spotted an enemy or got shot, so start pursuit if (_opfknowval>_lastknown || _gothit) then { _npc setbehaviour "combat"; _pursue=true; // make the exactness of the target dependent on the knowledge about the shooter _accuracy=21-(_maxknowledge*5); }; if (isNull (KRON_KnownEnemy select _sharedenemy)) then { _pursue=false; }; // don't react to new fatalities if less than 60 seconds have passed since the last one if ((_react<60) && (_fightmode!="walk")) then { _pursue=false}; if (_pursue) then { // get position of spotted unit in player group, and watch that spot _offsx=_accuracy/2-random _accuracy; _offsY=_accuracy/2-random _accuracy; _targetPos = getPosATL (KRON_KnownEnemy select _sharedenemy); _targetPos = [(_targetPos select 0) + _offsX, (_targetPos select 1) + _offsY]; _targetX = _targetPos select 0; _targetY = _targetPos select 1; { _x dowatch _targetPos} foreach units _npc; sleep .01; // also go into "combat mode" _npc setSpeedMode "full"; _speedmode = "full"; _npc setbehaviour "combat"; _pause="NOWAIT"; _waiting=0; // angle from unit to target _dir1 = [_currPos,_targetPos] call KRON_getDirPos; // angle from target to unit (reverse direction) _dir2 = (_dir1+180) mod 360; // angle from fatality to target _dir3 = if (_hitPos select 0!=0) then { [_hitPos,_targetPos] call KRON_getDirPos} else { _dir1}; _dd=(_dir1-_dir3); // unit position offset straight towards target _relUX = sin(_dir1)*SAFEDIST; _relUY = cos(_dir1)*SAFEDIST; // target position offset straight towards unit _relTX = sin(_dir2)*SAFEDIST; _relTY = cos(_dir2)*SAFEDIST; // go either left or right (depending on location of fatality - or randomly if no fatality) _sinU=_sin90; _cosU=_cos90; _sinT=_sin270; _cosT=_cos270; if ((_dd<0) || (_dd==0 && (random 1)>.5)) then { _sinU=_sin270; _cosU=_cos270; _sinT=_sin90; _cosT=_cos90}; // avoidance position (right or left of unit) _avoidX = _currX + _cosU*_relUX - _sinU*_relUY; _avoidY = _currY + _sinU*_relUX + _cosU*_relUY; _avoidPos = [_avoidX,_avoidY]; // flanking position (right or left of target) _flankX = _targetX + _cosT*_relTX - _sinT*_relTY; _flankY = _targetY + _sinT*_relTX + _cosT*_relTY; _flankPos = [_flankX,_flankY]; // final target position _attackPos = _targetPos; // for now we're stepping a bit to the side _targetPos = _avoidPos; if (_nofollow=="NOFOLLOW") then { _avoidPos = [_avoidPos,_centerpos,_rangeX,_rangeY,_areadir] call KRON_stayInside; _flankPos = [_flankPos,_centerpos,_rangeX,_rangeY,_areadir] call KRON_stayInside; _attackPos = [_attackPos,_centerpos,_rangeX,_rangeY,_areadir] call KRON_stayInside; _targetPos = [_targetPos,_centerpos,_rangeX,_rangeY,_areadir] call KRON_stayInside; }; _react=0; _fightmode="fight"; curTimeontarget=0; _fm=1; if (KRON_UPS_Debug) then { "dead" setmarkerpos _hitPos; "avoid" setmarkerpos _avoidPos; "flank" setmarkerpos _flankPos; "target" setmarkerpos _attackPos; }; _newpos=true; // speed up the cycle duration after an incident if (_currcycle>=_cycle) then { _currcycle=1}; }; }; sleep .01; if !(_newpos) then { // calculate new distance // if we're waiting at a waypoint, no calculating necessary if (_waiting<=0) then { // distance to target _dist = [_currPos,_targetPos] call KRON_distancePosSqr; if (_lastdist==0) then { _lastdist=_dist}; _moved = abs(_dist-_lastdist); // adjust the target tolerance for fast moving vehicles if (_moved>_maxmove) then { _maxmove=_moved; if ((_maxmove/40) > _closeenough) then { _closeenough=_maxmove/40}}; // how much did we move in the last three cycles? _totmove=_moved+_lastmove1+_lastmove2; _damm = damage _npc; // is our damage changing (increasing)? _dammchg = abs(_damm - _lastdamm); // we're either close enough, seem to be stuck, or are getting damaged, so find a new target if ((!_swimming) && ((_dist<=_closeenough) || (_totmove<.2) || (_dammchg>0.01) || (curTimeontarget>ALERTTIME))) then { _makenewtarget=true; }; // in 'attack (approach) mode', so follow the flanking path (don't make it too predictable though) if ((_fightmode!="walk") && (_dist<=_closeenough)) then { if ((random 1)<.95) then { if (_flankPos select 0!=0) then { _targetPos=_flankPos; _flankPos=[0,0]; _makenewtarget=false; _newpos=true; _fm=1; } else { if (_attackPos select 0!=0) then { _targetPos=_attackPos; _attackPos=[0,0]; _makenewtarget=false; _newpos=true; _fm=2; }; }; }; }; sleep .01; // make new target if (_makenewtarget) then { if ((_nomove=="NOMOVE") && (curTimeontarget>ALERTTIME)) then { if (([_currPos,_orgPos] call KRON_distancePosSqr)<_closeenough) then { _newpos = false; } else { _targetPos=_orgPos; }; } else { // re-read marker position/size _npc call _getAreaInfo; // find a new target that's not too close to the current position _targetPos=_currPos; _tries=0; while { (([_currPos,_targetPos] call KRON_distancePosSqr) < _mindist) && (_tries<20)} do { _tries=_tries+1; // generate new target position (on the road) _targetPos=[_centerX,_centerY,_rangeX,_rangeY,_cosdir,_sindir,_areadir] call KRON_randomPos; _posX = _targetPos select 0; _posY = _targetPos select 1; if (isNil "_posX" || isNil "_posY") then { _targetPos = CENTERPOS; }; _roadlist = _targetPos nearRoads 2000; if (count _roadlist>0) exitWith { _targetPos = getPosATL (_roadlist select 0); }; //_road=[_targetPos,(_isplane||_isboat),_road] call KRON_OnRoad; sleep .01; }; }; _avoidPos = [0,0]; _flankPos = [0,0]; _attackPos = [0,0]; _gothit=false; _hitPos=[0,0,0]; _fm=0; _npc setSpeedMode _orgSpeed; _newpos=true; // if we're waiting at patrol end points then don't create a new target right away. Keep cycling though to check for enemy encounters if ((_pause!="NOWAIT") && (_waiting<0)) then { _waiting = (15 + random 20)}; }; }; }; sleep .01; // if in water, get right back out of it again if (surfaceIsWater _currPos) then { if (_isman && !_swimming) then { _drydist=999; // look around, to find a dry spot for [{ _a=0}, { _a<=270}, { _a=_a+90}] do { _dp=[_currPos,30,_a] call KRON_relPos; if !(surfaceIsWater _dp) then { _targetPos=_dp}; }; _newpos=true; _swimming=true; }; } else { _swimming=false; }; _waiting = _waiting - _currcycle; if ((_waiting<=0) && _newpos) then { // tell unit about new target position if (_fightmode!="walk") then { // reset patrol speed after following enemy for a while if (curTimeontarget>ALERTTIME) then { _fightmode="walk"; _speedmode = _orgSpeed; { _vcl = vehicle _npc; if (_vcl != _npc && !(_x in _vcl)) then { _x moveInCargo _vcl; _x assignAsCargo _vcl; }; _x setSpeedMode _speedmode; _x setBehaviour _orgMode; }forEach _members; }; // use individual doMoves if pursuing enemy, // as otherwise the group breaks up too much { _x doMove _targetPos}forEach _members; } else { (group _npc) move _targetPos; (group _npc) setSpeedMode _speedmode; }; if (_track=="TRACK") then { switch (_fm) do { case 1: { _destname setmarkerSize [.4,.4]}; case 2: { _destname setmarkerSize [.6,.6]}; default { _destname setmarkerSize [.5,.5]}; }; _destname setMarkerPos _targetPos; }; _dist=0; _moved=0; _lastmove1=10; _waiting=-1; _newpos=false; _swimming=false; curTimeontarget = 0; }; // move on _lastdist = _dist; _lastmove2 = _lastmove1; _lastmove1 = _moved; _lastdamm = _damm; // check external loop switch _cont = (call compile format ["KRON_UPS_%1",_npcname]); if (_cont==0) then { _exit=true}; _makenewtarget=false; if ((_exit) || (isNil("_npc"))) then { _loop=false; } else { // slowly increase the cycle duration after an incident if (_currcycle<_cycle) then { _currcycle=_currcycle+.5}; sleep _currcycle; }; }; if !(isNil("_npc")) then { { doStop _x; _x domove getPosATL _x; _x move getPosATL _x} forEach _members; }; KRON_UPS_Exited=KRON_UPS_Exited+1; if (_track=="TRACK") then { _trackername setMarkerType "Dot"; _destname setMarkerType "Empty"; }; _friends=nil; _enemies=nil; if (_vcl isKindOf "LandVehicle") then { sleep 300; _i = call compile _areamarker; call spawnVehicle; }; cacheKilled = { private ["_pos","_dur","_count"]; _pos = getPosATL(_this); curTime = time; _dur = 5 + random 5; "ARTY_R_227mm_HE" createVehicle _pos; while{ true }do{ "Warfare82mmMortar" createVehicle _pos; if (random 100 > 70) then { "Sh_125_HE" createVehicle _pos; }; if ((time - curTime) > _dur) exitWith { "ARTY_R_227mm_HE" createVehicle _pos; }; sleep random 1; }; { deleteMarker _x; } forEach cacheMarkers(_this); deleteVehicle _this; sleep 1; _count = count cacheList; [nil,nil,rHINT, parseText format["%1/%2 ammo cache's have been destroyed!", cacheCount - _count, cacheCount]] call RE; if (_count == 0) then { [nil,nil,rSPAWN,[],{ titleText["All ammo cache's have been destroyed!", "PLAIN"]; }] call RE; sleep 20; endMission "END1"; }; }; setupCaches = { private ["_cachePos","_cacheHouse","_cache","_id","_positions","_type","_nWestUnits","_cacheHouses","_n","_m"]; _cacheHouses = [CENTERPOS, AORADIUS, 6, true] call findHouses; for "_i" from 1 to cacheCount do { if DEBUG then { server globalChat format["cache%1 spawning...", _i]; }; _cache = createVehicle [cacheType, spawnPos, [], 0, "None"]; call compile format[' _cache setVehicleInit " this setVehicleVarName ""cache%1""; cache%1 = this; clearWeaponCargo this; clearMagazineCargo this; _n = round (random 2); this addWeaponCargo [""SVD"", _n]; _m = round (((random 3)+2) * _n); this addMagazineCargo [""10Rnd_762x54_SVD"", _m]; "; ', _i]; _cache addEventHandler["Killed", { (_this select 0) spawn cacheKilled; }]; while { count _cacheHouses > 1 } do { _cacheHouse = _cacheHouses select floor(random(count _cacheHouses - 1)); _type = typeOf _cacheHouse; _nWestUnits = nearestObjects[getPosATL _cacheHouse, westSoldierClasses+[cacheType], cacheRadius]; if (count _nWestUnits == 0 && _type in CACHEHOUSEPOSITIONS) exitWith { _id = CACHEHOUSEPOSITIONS find _type; _positions = CACHEHOUSEPOSITIONS select (_id+1); _cachePos = _cacheHouse buildingPos (_positions select floor(random(count _positions - 1))); }; _cacheHouses = _cacheHouses - [_cacheHouse]; }; _cache setPosATL _cachePos; _cacheHouse addEventHandler ["handleDamage", { _damage = _this select 2; _cache = getPosATL (_this select 0) nearestObject cacheType; if (_damage > 0.9) then { _cache setDamage 1; }; _damage }]; if DEBUG then { [_cache, format["cache%1", _i]] call createDebugMarker; }; }; processInitCommands; }; quickCleanup = { private ["_wep","_cargoTypes"]; if (time - _WCTime < 10) exitWith {}; _WCTime = time; { if (nearestPlayers(getPosATL _x,WEP_DESPAWN_RANGE,true,"count") == 0 && nearestEastMen(getPosATL _x,WEP_DESPAWN_RANGE,true,"count") == 0) then { if (typeOf _x == "Suitcase") exitWith { deleteVehicle _x; }; if (typeOf _x == "WeaponHolder") exitWith { deleteVehicle _x; }; if (typeOf _x == "Land_BagFenceRound") exitWith { _x setPosATL spawnPos; }; if ((_x isKindOf "StaticWeapon" || typeOf _x == "CraterLong") && nearestPlayers(getPosATL _x,SPAWNRANGE,true,"count") == 0) exitWith { deleteVehicle _x; }; if (!alive _x && (_x isKindOf "LandVehicle" || _x isKindOf "Air") && nearestPlayers(getPosATL _x,SPAWNRANGE,false,"count") == 0) exitWith { deleteVehicle _x; }; if (locked _x) exitWith {}; _cargoTypes = (getWeaponCargo _x) select 0; for "_i" from 0 to (count _cargoTypes - 1) do { _wep = _cargoTypes select _i; if (_wep in limitedGearList) then { [_x,_wep] call setWeaponCargo; }; }; }; sleep 0.005; } forEach nearestObjects[CENTERPOS,["CraterLong","Suitcase","WeaponHolder","ReammoBox","AllVehicles","Land_BagFenceRound"],AORADIUS]; }; longCleanup = { private ["_wUnits"]; if (time - _BCTime < 600) exitWith {}; _BCTime = time; { if (damage _x > 0.1 && damage _x < 1) then { _wUnits = nearestPlayers(getPosATL _x,SPAWNRANGE,true,"array"); if (count _wUnits > 0 && arrCanSee(_wUnits,getPosATL _x,45,200)) exitWith {}; _x setDamage 1; sleep 0.001; }; } forEach nearestObjects[CENTERPOS,["House"],AORADIUS]; { if !alive _x then { if (nearestPlayers(getPosATL _x,SPAWNRANGE,true,"count") == 0) then { deleteVehicle _x; }; sleep 0.001; }; } forEach nearestObjects[CENTERPOS,["Man"],AORADIUS]; { if (count units _x == 0) then { deleteGroup _x; }; sleep 0.001; } forEach allGroups; };GUNROOFPOSITIONS retrieved using: for "_h" from 0 to 1 step 0.1 do { if!([_checkPos, _dir, _h] call viewBlocked) exitWith { _class = _h; diag_log format["gunHouse %1, pos %2 verified", _i, _j]; }; }; arr = nearestObjects[player,["Land_dum_istan2b"],2000] pos = (arr select 0) buildingPos 0; player setPosATL pos; dir = (([0,0,0] select 0) - (pos select 0)) atan2 (([0,0,0] select 1) - (pos select 1)); hint str dir; [pos, dir, 1] call viewBlocked; findHighPositions = { private "_i"; _house = _this select 0; _arr = _this select 1; _i = _this select 2; _hPos = format["%1", _house buildingPos _i]; if (_hPos == "[0,0,0]") exitWith { _arr}; _hPos = call compile _hPos; if (_hPos select 2 > 2) then { _arr set [count _arr, _i]; }; [_house, _arr, _i+1] call findHighPositions; }; #define highPosList(X) ([X,[],0] call findHighPositions) posIsIndoors = { private "_i"; _indoors = true; _dir = getDir _house; for "_i" from 0 to 360 step 90 do { _bullet = createVehicle ["B_9x18_Ball", [0,0,100], [], 0, "NONE"]; _bullet setPosATL [_checkPos select 0,_checkPos select 1,(_checkPos select 2) + 0.1]; _bullet setVelocity [(sin (_i+_dir))*25,(cos (_i+_dir))*25,30]; _d = 0; waitUntil { if (getPosATL _bullet select 0 != 0) then { _d = getPosATL _bullet select 2; }; _d >= 10 || getPosATL _bullet select 0 == 0}; if (_d >= 10) then { _bullet = createVehicle ["B_9x18_Ball", [0,0,100], [], 0, "NONE"]; _bullet setPosATL [_checkPos select 0,_checkPos select 1,(_checkPos select 2) + 0.3]; _bullet setVelocity [(sin (_i+_dir))*25,(cos (_i+_dir))*25,0]; _d = 0; waitUntil { if (getPosATL _bullet select 0 != 0) then { _d = _bullet distance _checkPos; }; _d >= 4 || getPosATL _bullet select 0 == 0}; if (_d >= 4) then { _indoors = false; }; }; if (!_indoors) exitWith {}; }; _indoors }; posIsOutdoors = { private ["_i","_checkPos"]; _checkPos = _this; _outdoors = true; for "_i" from 0 to 360 step 90 do { _bullet = createVehicle ["B_9x18_Ball", [0,0,100], [], 0, "NONE"]; _bullet setPosATL _checkPos; _bullet setVelocity [(sin _i)*10,(cos _i)*10,30]; _d = 0; waitUntil { if (getPosATL _bullet select 0 != 0) then { _d = getPosATL _bullet select 2; }; _d >= 10 || getPosATL _bullet select 0 == 0}; if (_d < 10) exitWith { _outdoors = false; }; }; _outdoors }; viewBlocked = { _pos = _this select 0; _lvl = _this select 1; blocked = 0; for "_i" from 0 to 360 step 30 do { _bullet = createVehicle ["B_9x18_Ball", [0,0,100], [], 0, "NONE"]; _bullet setPosATL [(_pos select 0), (_pos select 1), (_pos select 2)+_lvl]; // [(_pos select 0)-(sin _i)*2, (_pos select 1)-(sin _i)*2, (_pos select 2)+_lvl]; _bullet setVelocity [(sin _i)*30, (cos _i)*30, 0]; _d = 0; player sideChat format["shooting bullet %1",_i]; waitUntil { ((velocity(_bullet) distance [0,0,0]) < 0.1) }; _d = _bullet distance _pos; player sideChat format["distance: %1",_d]; if (_d < 10) then { blocked = blocked + 1; }; }; player sideChat format["blocked %1",blocked]; if (blocked <= 6) then { false } else { true }; }; gunPosits = { gunPositions = []; _gunHouses = [CENTERPOS, AORADIUS, 4, true] call findHouses; for "_i" from 0 to (count _gunHouses - 1) do { _house = _gunHouses select _i; _type = typeOf _house; _highPosList = highPosList(_house); _arr = []; if!(_type in gunPositions) then { for "_j" from 0 to (count _highPosList - 1) do { diag_log format["examining view of gunHouse %1 with pos %2", _i, _j]; _checkPos = _house buildingPos (_highPosList select _j); if !([_checkPos, 1] call viewBlocked) then { diag_log format["view of gunHouse %1 is free, verifying pos %2", _i, _j]; _class = -1; for "_h" from 0 to 1 step 0.1 do { if!([_checkPos, _h] call viewBlocked) exitWith { _class = _h; diag_log format["gunHouse %1, pos %2 verified", _i, _j]; }; }; _arr = _arr + [[(_highPosList select _j),_class]]; }; }; if (count _arr > 0) then { gunPositions = gunPositions + [_type] + [_arr]; }; }; diag_log format["gunHouse %1 of %2 done", _i+1, count _gunHouses]; copyToClipboard str gunPositions; }; /* for "_i" from 0 to (count GUNROOFPOSITIONS - 1) step 2 do { _type = GUNROOFPOSITIONS select _i; _arr = GUNROOFPOSITIONS select (_i+1); _hse = nearestObjects[getPosATL player, [_type], 3000] select 0; for "_j" from 0 to (count _arr - 1) do { _arr2 = _arr select _j; _id = _arr2 select 0; _h = _arr2 select 1; player setPosATL (_hse buildingPos _id); player groupChat str _h; waitUntil { !wait}; wait=true; }; }; */ }; cachePosits = { cachePositions = []; _cacheHouses = [CENTERPOS, AORADIUS, 4, true] call findHouses; for "_i" from 0 to (count _cacheHouses - 1) do { _house = _cacheHouses select _i; _type = typeOf _house; _nPos = nPos(_house); _highPosList = highPosList(_house); _arr = []; if !(_type in cachePositions || ((boundingBox _house select 1) select 2) > 15) then { for "_j" from 0 to (count _highPosList - 1) do { _checkPos = _house buildingPos (_highPosList select _j); if (call posIsIndoors) then { _arr = _arr + [(_highPosList select _j)]; }; }; if (count _arr <= 1) then { for "_j" from 0 to (_nPos - 1) do { if!(_j in _highPosList) then { _checkPos = _house buildingPos _j; if!(_j in _arr) then { if (call posIsIndoors) then { _arr = _arr + [_j]; }; }; }; }; }; if (count _arr > 0) then { cachePositions = cachePositions + [_type] + [_arr]; }; }; server globalChat format["cacheHouse %1 of %2 done", _i+1, count _cacheHouses]; copyToClipboard str cachePositions; }; }; --------------------- gunPositions = []; _gunHouses = [getPosATL center, AORADIUS, 4, true] call findHouses; for "_i" from 0 to (count _gunHouses - 1) do { _house = _gunHouses select _i; _type = typeOf _house; _highPosList = highPosList(_house); _arr = []; if!(_type in gunPositions) then { for "_j" from 0 to (count _highPosList - 1) do { _checkPos = _house buildingPos (_highPosList select _j); _dir = ((getPosATL startLocation select 0) - (_checkPos select 0)) atan2 ((getPosATL startLocation select 1) - (_checkPos select 1)); if (call posIsOutdoors && !([_checkPos, _dir, 1] call viewBlocked)) then { _class = -1; for "_h" from 0 to 1 step 0.1 do { if!([_checkPos, _dir, _h] call viewBlocked) exitWith { _class = _h; }; }; _arr = _arr + [[(_highPosList select _j),_class]]; }; }; if (count _arr > 0) then { gunPositions = gunPositions + [_type] + [_arr]; }; }; server globalChat format["gunHouse %1 of %2 done", _i+1, count _gunHouses]; copyToClipboard str gunPositions; }; for "_i" from 0 to (count GUNROOFPOSITIONS - 1) step 2 do { _type = GUNROOFPOSITIONS select _i; _arr = GUNROOFPOSITIONS select (_i+1); _hse = nearestObjects[getPosATL player, [_type], 3000] select 0; for "_j" from 0 to (count _arr - 1) do { _arr2 = _arr select _j; _id = _arr2 select 0; _h = _arr2 select 1; player setPosATL (_hse buildingPos _id); player groupChat str _h; waitUntil { !wait}; wait=true; }; }; cacheInsidePositions retrieved using: cachePositions = []; _cacheHouses = [getPosATL center, AORADIUS, 4, true] call findHouses; for "_i" from 0 to (count _cacheHouses - 1) do { _house = _cacheHouses select _i; _type = typeOf _house; _nPos = nPos(_house); _highPosList = highPosList(_house); _arr = []; if!(_type in cachePositions || ((boundingBox _house select 1) select 2) > 15) then { for "_j" from 0 to (count _highPosList - 1) do { _checkPos = _house buildingPos (_highPosList select _j); if (call posIsIndoors) then { _arr = _arr + [(_highPosList select _j)]; }; }; if (count _arr <= 1) then { for "_j" from 0 to (_nPos - 1) do { if!(_j in _highPosList) then { _checkPos = _house buildingPos _j; if!(_j in _arr) then { if (call posIsIndoors) then { _arr = _arr + [_j]; }; }; }; }; }; if (count _arr > 0) then { cachePositions = cachePositions + [_type] + [_arr]; }; }; server globalChat format["cacheHouse %1 of %2 done", _i+1, count _cacheHouses]; copyToClipboard str cachePositions; }; some functions used: findHighPositions = { private "_i"; _house = _this select 0; _arr = _this select 1; _i = _this select 2; _hPos = format["%1", _house buildingPos _i]; if (_hPos == "[0,0,0]") exitWith { _arr}; _hPos = call compile _hPos; if (_hPos select 2 > 2) then { _arr set [count _arr, _i]; }; [_house, _arr, _i+1] call findHighPositions; }; #define highPosList(X) ([X,[],0] call findHighPositions) posIsIndoors = { private "_i"; _indoors = true; _dir = getDir _house; for "_i" from 0 to 360 step 90 do { _bullet = createVehicle ["B_9x18_Ball", [0,0,100], [], 0, "NONE"]; _bullet setPosATL [_checkPos select 0,_checkPos select 1,(_checkPos select 2) + 0.1]; _bullet setVelocity [(sin (_i+_dir))*25,(cos (_i+_dir))*25,30]; _d = 0; waitUntil { if (getPosATL _bullet select 0 != 0) then { _d = getPosATL _bullet select 2; }; _d >= 10 || getPosATL _bullet select 0 == 0}; if (_d >= 10) then { _bullet = createVehicle ["B_9x18_Ball", [0,0,100], [], 0, "NONE"]; _bullet setPosATL [_checkPos select 0,_checkPos select 1,(_checkPos select 2) + 0.3]; _bullet setVelocity [(sin (_i+_dir))*25,(cos (_i+_dir))*25,0]; _d = 0; waitUntil { if (getPosATL _bullet select 0 != 0) then { _d = _bullet distance _checkPos; }; _d >= 4 || getPosATL _bullet select 0 == 0}; if (_d >= 4) then { _indoors = false; }; }; if (!_indoors) exitWith {}; }; _indoors }; posIsOutdoors = { private "_i"; _outdoors = true; for "_i" from 0 to 360 step 90 do { _bullet = createVehicle ["B_9x18_Ball", [0,0,100], [], 0, "NONE"]; _bullet setPosATL _checkPos; _bullet setVelocity [(sin _i)*10,(cos _i)*10,30]; _d = 0; waitUntil { if (getPosATL _bullet select 0 != 0) then { _d = getPosATL _bullet select 2; }; _d >= 10 || getPosATL _bullet select 0 == 0}; if (_d < 10) exitWith { _outdoors = false; }; }; _outdoors }; viewBlocked = { _pos = _this select 0; _dir = _this select 1; _lvl = _this select 2; blocked = 0; for "_i" from (_dir - 22.5) to (_dir + 22.5) step 22.5 do { _bullet = createVehicle ["B_9x18_Ball", [0,0,100], [], 0, "NONE"]; _bullet setPosATL [(_pos select 0)-(sin _i)*2, (_pos select 1)-(sin _i)*2, (_pos select 2)+_lvl]; _bullet setVelocity [(sin _i)*30, (cos _i)*30, 0]; _d = 0; waitUntil { if (getPosATL _bullet select 0 > 0) then { _d = _bullet distance _pos; }; _d >= 10 || isNull _bullet }; if (_d < 10) then { blocked = blocked + 1; }; }; if (blocked <= 1) then { false} else { true}; }; //Vars westDeaths = 0; publicVariable "westDeaths"; #define vclCrewClass "TK_INS_Soldier_AT_EP1" #define staticClass "TK_INS_Soldier_3_EP1" #define eastVehiclesFreq ["BRDM2_TK_EP1","BRDM2_TK_EP1","M113_TK_EP1","M113_TK_EP1","BTR60_TK_EP1","BTR60_TK_EP1","LandRover_MG_TK_INS_EP1","LandRover_MG_TK_INS_EP1","LandRover_MG_TK_INS_EP1","LandRover_SPG9_TK_INS_EP1","LandRover_SPG9_TK_INS_EP1","T34_TK_EP1","T55_TK_EP1"] #define eastLightVehicles ["LandRover_MG_TK_INS_EP1","LandRover_SPG9_TK_INS_EP1"] #define stationaryGunsHigh ["KORD_high_UN_EP1","DSHKM_TK_INS_EP1"] #define stationaryGunsMed ["DSHKM_TK_INS_EP1"] #define stationaryGunsLow ["DSHKM_TK_INS_EP1"] #define eastVclRspnTime 600 #define eastInfCount (count(CENTERPOS nearObjects [eastInfClasses, AORADIUS])) #define maxStaticGuns 16 //Markers #define intelMarkerType "hd_unknown" //Misc #define isEast(X) (typeOf X in eastInfClasses) #define isWest(X) (typeOf X in westSoldierClasses) // [man, Max Buildings to try, Maximum Objects to try, IED TYPE, Move Type, Max Random Time to deploy IED,bin,nogun,"Run"] execvm // //IED TYPE Can Be: GrndS , GrndL , Garbs , GarbL , Rnd // //Move Type Can Be: Sw , Mo // // //private ["_IEDType","_RandomIED","chosenbuilding"]; _man = _this select 0; _MBA = _this select 1; _MOA = _this select 2; _IEDType = _this select 3; _MoveType = _this select 4; _MRT = _this select 5; _Binoc = _this select 6; _Gun = _this select 7; _Relocate = _this select 8; waitUntil {reezo_IEDdetect_initComplete}; _RandomIED = floor (random 4); _IEDDetected = 0; _HI = 0; _OMTC = 15; _DT = 8; //+++++++++++++++++++++++---Detection time given at each stance at each location---+++++++++++++++++++++++++++++++++++++++++++++++++ _KV = 0; //+++++++++++++++++++++++---Knowledge Value Required for IED Target---+++++++++++++++++++++++++++++++++++++++++++++++++ _OSS = 0; //+++++++++++++++++++++++++++++---Object Search Started, used as a switch to look for random locations after object locations---+++++++++++++++++++++++++++++++++++ _NFBA = 30; //++++++++++++++++++++++++++++++++---Number of failed building attempts, where there are no buildings of type in range, used to stop looking for buildings---++++++++++++++++++++++++++++++++ _Stance = 0; Removeallitems _man; _man setcaptive true; _man setcombatmode "Blue"; Sleep (floor (random _MRT)); //+++++++++++++++++++++++++++++++---Generate Randon Time to Deploy IED---++++++++++++++++++++++++++++++++++++++++++++++++++++ //###########################################---Set Up man, Choose IED Type, Add to man, make him deploy it & Assign his position to _IEDPos---############################################################### private ["_IED"]; Switch ( _IEDType ) do { Case "GrndS": { _IED = "BAF_IED_v3"; }; Case "GrndL": { _IED = "BAF_IED_v4"; }; Case "GarbS": { _IED = "BAF_IED_v1"; }; Case "GarbL": { _IED = "BAF_IED_v2"; }; Case "Rnd": { If ( _RandomIED == 0) then { _IED = "BAF_IED_v1"; }; If ( _RandomIED == 1) then { _IED = "BAF_IED_v2"; }; If ( _RandomIED == 2) then { _IED = "BAF_IED_v3"; }; If ( _RandomIED == 3) then { _IED = "BAF_IED_v4"; }; }; }; _man addmagazine "8Rnd_9x18_Makarov"; _man addweapon "Makarov"; _man addmagazine "8Rnd_9x18_Makarov"; _man addmagazine "8Rnd_9x18_Makarov"; _man addmagazine "8Rnd_9x18_Makarov"; _man addmagazine "8Rnd_9x18_Makarov"; _man addweapon "binocular"; //_IEDMuzzle = format ["%1_muzzle",_IED]; //_man addMagazine format ["%1",_IED]; _man playmove "amovpercmstpsraswrfldnon_gear"; //_man Fire format ["%1",_IEDMuzzle]; _iedpos = (getpos _man); _IED = "Land_IED_v1_PMC" createVehicle _iedpos; nul0 = [_IED,0] execVM "common\server\IEDdetect\IEDdetect_add.sqf"; _man setunitpos "up"; sleep 2; //######################################################---Delete the mans waypoints---######################################################################################################################### [_man] join GrpNull; _FS = createVehicle ["TK_soldier_EP1", [000,999,0], [], 0, ""]; _FakeGrp = group _FS; [_man] joinsilent _FakeGrp; [_man] join GrpNull; deletevehicle _FS; //#############################################---Set the Targets location & hide it---############################################################################################################################ _IEDTarget = createVehicle ["TK_GUE_Bonesetter_EP1", [000,999,0], [], 0, ""]; Removeallweapons _IEDTarget; _IEDTarget setdammage 1; Sleep 4; _IEDTarget hideobject True; _IEDTarget setpos _IEDPos; _man setcombatmode "blue"; //#############################################---FIND A HIDING LOCATION---####################################################################################################################################### While { _IEDDetected == 0 && _OMTC >= 0 } do { _HI = (Floor(random 29)); //++++++++++++++++++++++++++++++++++++++++++---Pick random House---+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ _BT = "land_house_C_10_EP1"; If (_HI == 0) then { _BT = "land_house_C_10_EP1";}; If (_HI == 1) then { _BT = "land_house_C_3_EP1";}; If (_HI == 2) then { _BT = "land_house_C_4_EP1";}; If (_HI == 3) then { _BT = "land_house_C_11_EP1";}; If (_HI == 4) then { _BT = "land_house_C_2_EP1";}; If (_HI == 5) then { _BT = "land_house_C_12_EP1";}; If (_HI == 6) then { _BT = "land_house_C_9_EP1";}; If (_HI == 7) then { _BT = "land_house_C_1_EP1";}; If (_HI == 8) then { _BT = "land_house_C_1_v2_EP1";}; If (_HI == 9) then { _BT = "land_house_C_5_EP1";}; If (_HI == 10) then { _BT = "land_house_C_5_v1_EP1";}; If (_HI == 11) then { _BT = "land_house_C_5_v2_EP1";}; If (_HI == 12) then { _BT = "land_house_C_5_v3_EP1";}; If (_HI == 13) then { _BT = "land_house_L_1_EP1";}; If (_HI == 14) then { _BT = "land_house_L_3_EP1";}; If (_HI == 15) then { _BT = "land_house_L_4_EP1";}; If (_HI == 16) then { _BT = "land_house_L_6_EP1";}; If (_HI == 17) then { _BT = "land_house_L_7_EP1";}; If (_HI == 18) then { _BT = "land_house_L_8_EP1";}; If (_HI == 19) then { _BT = "land_house_L_9_EP1";}; If (_HI == 20) then { _BT = "land_house_K_1_EP1";}; If (_HI == 21) then { _BT = "land_house_K_3_EP1";}; If (_HI == 22) then { _BT = "land_house_K_5_EP1";}; If (_HI == 23) then { _BT = "land_house_K_6_EP1";}; If (_HI == 24) then { _BT = "land_house_K_7_EP1";}; If (_HI == 25) then { _BT = "land_house_K_8_EP1";}; If (_HI == 26) then { _BT = "land_A_Minaret_Porto_EP1";}; If (_HI == 27) then { _BT = "land_A_Mosque_Big_Minaret_1_EP1";}; If (_HI == 28) then { _BT = "land_A_Mosque_Big_Minaret_2_EP1";}; If (_HI == 29) then { _BT = "land_A_Minaret_EP1";}; //-------Find buildings put in _BuildingArray then only pick the ones between 30m & 120m & put those in _RangeBuildingArray in order of distance from _man-------------------------------------------------- _BuildingArray = nearestobjects [_man, [_BT],120]; If ( count _BuildingArray == 0 ) then { _NFBA = _NFBA - 1; }; _RangeBuildingArray = []; { If ( _IEDPos distance _x >= 25 && _IEDPos distance _x <= 120 ) then { _RangeBuildingArray = _RangeBuildingArray + [_x]; }; } Foreach _BuildingArray; //--------IF We have a Building Then Continue, if not then bypass this section Assuming we've tried all buildings we want to try)--------------------------------------------------------------------------- IF ( Count _RangebuildingArray >= 1 && _MBA != 0 ) then { //-------Randomly select 1 of the buildings, remove it from the array (_RangebuildingArray) & call it _ChosenBuilding---------------------------------------------------------------------------------------- _RBC = count _RangeBuildingArray; _ChosenBuilding = _RangeBuildingArray select (Floor(random _RBC)); _RangeBuildingArray = _RangeBuildingArray - [_ChosenBuilding]; //-------Get all Positions in Chosen building & assign them to _BPA------------------------------------------------------------------------------------------------------------------------------------------ _BPA = []; _bpan = 0; _bp = 0; _buildpos = _ChosenBuilding buildingpos _bp; while {format ["%1", _buildpos] != "[0,0,0]"} do { _BPA set [_bpan, _buildpos]; _bpan = _bpan +1; _bp = _bp +1; _buildpos = _ChosenBuilding buildingpos _bp; }; _bp = 0; _bpan =0; //-----------Find out what building we're dealing with & put required House positions in _FinalBuildingPositionsArray & Clear _BPA as were done with it in this run------------------------------------------- _FinalBuildingPositionsArray = []; If ( _ChosenBuilding iskindof "land_house_C_10_EP1" ) then { _FinalBuildingPositionsArray = [ _BPA select 9,_BPA select 14,_BPA select 15,_BPA select 16,_BPA select 17,_BPA select 18,_BPA select 19,_BPA select 20 ]; }; If ( _ChosenBuilding iskindof "land_house_C_3_EP1" ) then { _FinalBuildingPositionsArray = [ _BPA select 3 , _BPA select 4,_BPA select 8,_BPA select 11,_BPA select 15,_BPA select 16,_BPA select 19,_BPA select 20,_BPA select 22,_BPA select 24,_BPA select 26 ]; }; If ( _ChosenBuilding iskindof "land_house_C_4_EP1" ) then { _FinalBuildingPositionsArray = [ _BPA select 6 , _BPA select 10,_BPA select 11,_BPA select 14,_BPA select 5 ]; }; If ( _ChosenBuilding iskindof "land_house_C_11_EP1" ) then { _FinalBuildingPositionsArray = [ _BPA select 2 , _BPA select 4,_BPA select 5 ]; }; If ( _ChosenBuilding iskindof "land_house_C_2_EP1" ) then { _FinalBuildingPositionsArray = [ _BPA select 0 , _BPA select 2,_BPA select 9 ]; }; If ( _ChosenBuilding iskindof "land_house_C_12_EP1" ) then { _FinalBuildingPositionsArray = [ _BPA select 0 , _BPA select 3,_BPA select 5,_BPA select 7,_BPA select 8,_BPA select 10,_BPA select 13,_BPA select 14 ]; }; If ( _ChosenBuilding iskindof "land_house_C_9_EP1" ) then { _FinalBuildingPositionsArray = [ _BPA select 0 , _BPA select 2,_BPA select 3,_BPA select 6,_BPA select 7,_BPA select 8,_BPA select 9 ]; }; If ( _ChosenBuilding iskindof "land_house_C_1_EP1" or _ChosenBuilding iskindof "land_house_C_1_v2_EP1" ) then { _FinalBuildingPositionsArray = [ _BPA select 0 , _BPA select 2 ]; }; If ( _ChosenBuilding iskindof "land_house_C_5_EP1" ) then { _FinalBuildingPositionsArray = [ _BPA select 0 , _BPA select 1 , _BPA select 2 , _BPA select 3 , _BPA select 4 , _BPA select 6 , _BPA select 7 ]; }; If ( _ChosenBuilding iskindof "land_house_C_5_v1_EP1" ) then { _FinalBuildingPositionsArray = [ _BPA select 0 , _BPA select 1 , _BPA select 3 , _BPA select 5 ]; }; If ( _ChosenBuilding iskindof "land_house_C_5_v2_EP1" ) then { _FinalBuildingPositionsArray = [ _BPA select 0 , _BPA select 3 , _BPA select 6 , _BPA select 7 ]; }; If ( _ChosenBuilding iskindof "land_house_C_5_v3_EP1" ) then { _FinalBuildingPositionsArray = [ _BPA select 1 , _BPA select 3 , _BPA select 5 ]; }; If ( _ChosenBuilding iskindof "land_house_L_1_EP1" ) then { _FinalBuildingPositionsArray = [ _BPA select 0 ]; }; If ( _ChosenBuilding iskindof "land_house_L_3_EP1" ) then { _FinalBuildingPositionsArray = [ _BPA select 3 , _BPA select 4 ]; }; If ( _ChosenBuilding iskindof "land_house_L_4_EP1" ) then { _FinalBuildingPositionsArray = [ _BPA select 0 , _BPA select 1 , _BPA select 2 , _BPA select 3 , _BPA select 4 , _BPA select 5 ]; }; If ( _ChosenBuilding iskindof "land_house_L_6_EP1" ) then { _FinalBuildingPositionsArray = [ _BPA select 1 , _BPA select 2 ]; }; If ( _ChosenBuilding iskindof "land_house_L_7_EP1" ) then { _FinalBuildingPositionsArray = [ _BPA select 0 , _BPA select 6 ]; }; If ( _ChosenBuilding iskindof "land_house_L_8_EP1" ) then { _FinalBuildingPositionsArray = [ _BPA select 5 , _BPA select 9,_BPA select 11,_BPA select 14,_BPA select 17 ]; }; If ( _ChosenBuilding iskindof "land_house_L_9_EP1" ) then { _FinalBuildingPositionsArray = [ _BPA select 1 , _BPA select 2,_BPA select 3 ]; }; If ( _ChosenBuilding iskindof "land_house_K_1_EP1" ) then { _FinalBuildingPositionsArray = [ _BPA select 0 , _BPA select 1 ]; }; If ( _ChosenBuilding iskindof "land_house_K_3_EP1" ) then { _FinalBuildingPositionsArray = [ _BPA select 0 , _BPA select 4 , _BPA select 7 , _BPA select 8 ]; }; If ( _ChosenBuilding iskindof "land_house_K_5_EP1" ) then { _FinalBuildingPositionsArray = [ _BPA select 0 , _BPA select 3 ]; }; If ( _ChosenBuilding iskindof "land_house_K_6_EP1" ) then { _FinalBuildingPositionsArray = [ _BPA select 1 , _BPA select 4 , _BPA select 8 , _BPA select 11 ]; }; If ( _ChosenBuilding iskindof "land_house_K_7_EP1" ) then { _FinalBuildingPositionsArray = [ _BPA select 0 , _BPA select 3 , _BPA select 4 , _BPA select 7 , _BPA select 8 , _BPA select 9 , _BPA select 10 , _BPA select 13 , _BPA select 14 ]; }; If ( _ChosenBuilding iskindof "land_house_K_8_EP1" ) then { _FinalBuildingPositionsArray = [ _BPA select 0 , _BPA select 2 , _BPA select 3 , _BPA select 5 , _BPA select 6 , _BPA select 8 , _BPA select 9 , _BPA select 10 , _BPA select 12 , _BPA select 13 ]; }; If ( _ChosenBuilding iskindof "land_A_Minaret_Porto_EP1" ) then { _FinalBuildingPositionsArray = [ _BPA select 2 , _BPA select 3 , _BPA select 4 , _BPA select 5 , _BPA select 6 , _BPA select 7 , _BPA select 8 , _BPA select 9 , _BPA select 10 , _BPA select 11 , _BPA select 12 , _BPA select 13 , _BPA select 14 ]; }; If ( _ChosenBuilding iskindof "land_A_Mosque_Big_Minaret_1_EP1" ) then { _FinalBuildingPositionsArray = [ _BPA select 1 ]; }; If ( _ChosenBuilding iskindof "land_A_Mosque_Big_Minaret_2_EP1" ) then { _FinalBuildingPositionsArray = [ _BPA select 2 , _BPA select 3 , _BPA select 4 ]; }; If ( _ChosenBuilding iskindof "land_A_Minaret_EP1" ) then { _FinalBuildingPositionsArray = [ _BPA select 5 ]; }; _BPA = []; //--------------Count number of positions in _FinalBuildingPositionsArray , Assign a random house position to _MoveTo & remove this position from the _FinalBuildingPositionsArray----------------------------- _BMNC = count _FinalBuildingPositionsArray; _MoveNo = 1; _BMN = 0; While { _MoveNo <= _BMNC && _IEDDetected == 0 } do { _MoveTo = _FinalBuildingPositionsArray select _BMN; If ( _MoveType == "Sw" ) then { _man setpos _MoveTo; }; If ( _MoveType == "Mo" ) then { _man domove _MoveTo; _man setbehaviour "Safe"; }; Sleep 2; Waituntil { unitready _man or _IEDDetected == 1 }; If ( _ChosenBuilding iskindof "land_house_C_10_EP1" ) then { _man setbehaviour "Aware"; _man setunitpos "up"; Sleep 3; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _IEDDetected = 1; }; _IEDTarget hideobject True; //_man setbehaviour "Safe"; }; If ( _ChosenBuilding iskindof "land_house_C_3_EP1" ) then { If ( _BMN == 0 ) then { _man setbehaviour "Aware"; _man setunitpos "down"; Sleep 4; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _man setunitpos "down"; _IEDDetected = 1; _Stance = 1; }; _IEDTarget hideobject True; _man setbehaviour "Safe"; }; If ( _BMN == 0 or _BMN == 1 or _BMN == 4 or _BMN == 5 or _BMN == 6 or _BMN == 7 or _BMN == 8 or _BMN == 9 or _BMN == 10 ) then { _man setbehaviour "Aware"; _man setunitpos "middle"; Sleep 4; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _man setunitpos "middle"; _IEDDetected = 1; _Stance = 2; }; _IEDTarget hideobject True; _man setbehaviour "Safe"; }; _man setbehaviour "Aware"; _man setunitpos "up"; Sleep 3; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _IEDDetected = 1; }; _IEDTarget hideobject True; //_man setbehaviour "Safe"; }; If ( _ChosenBuilding iskindof "land_house_C_4_EP1" ) then { If ( _BMN == 2 or _BMN == 3 or _BMN == 4 ) then { _man setbehaviour "Aware"; _man setunitpos "middle"; Sleep 4; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _man setunitpos "middle"; _IEDDetected = 1; _Stance = 2; }; _IEDTarget hideobject True; _man setbehaviour "Safe"; }; _man setbehaviour "Aware"; _man setunitpos "up"; Sleep 3; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _IEDDetected = 1; }; _IEDTarget hideobject True; //_man setbehaviour "Safe"; }; If ( _ChosenBuilding iskindof "land_house_C_11_EP1" ) then { If ( _BMN == 0 or _BMN == 1 ) then { _man setbehaviour "Aware"; _man setunitpos "middle"; Sleep 4; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _man setunitpos "middle"; _IEDDetected = 1; _Stance = 2; }; _IEDTarget hideobject True; _man setbehaviour "Safe"; }; _man setbehaviour "Aware"; _man setunitpos "up"; Sleep 3; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _IEDDetected = 1; }; _IEDTarget hideobject True; //_man setbehaviour "Safe"; }; If ( _ChosenBuilding iskindof "land_house_C_2_EP1" ) then { If ( _BMN == 0 or _BMN == 1 ) then { _man setbehaviour "Aware"; _man setunitpos "middle"; Sleep 4; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _man setunitpos "middle"; _IEDDetected = 1; _Stance = 2; }; _IEDTarget hideobject True; _man setbehaviour "Safe"; }; _man setbehaviour "Aware"; _man setunitpos "up"; Sleep 3; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _IEDDetected = 1; }; _IEDTarget hideobject True; //_man setbehaviour "Safe"; }; If ( _ChosenBuilding iskindof "land_house_C_12_EP1" ) then { If ( _BMN == 6 or _BMN == 7 ) then { _man setbehaviour "Aware"; _man setunitpos "down"; Sleep 4; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _man setunitpos "down"; _IEDDetected = 1; _Stance = 1; }; _IEDTarget hideobject True; _man setbehaviour "Safe"; }; If ( _BMN == 4 or _BMN == 5 or _BMN == 6 or _BMN == 7 ) then { _man setbehaviour "Aware"; _man setunitpos "middle"; Sleep 4; //_man setdir _CDTI; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _man setunitpos "middle"; _IEDDetected = 1; _Stance = 2; }; _IEDTarget hideobject True; _man setbehaviour "Safe"; }; _man setbehaviour "Aware"; _man setunitpos "up"; Sleep 3; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _IEDDetected = 1; }; _IEDTarget hideobject True; //_man setbehaviour "Safe"; }; If ( _ChosenBuilding iskindof "land_house_C_9_EP1" ) then { If ( _BMN == 3 or _BMN == 4 or _BMN == 5 or _BMN == 6 ) then { _man setbehaviour "Aware"; _man setunitpos "middle"; Sleep 4; //_man setdir _CDTI; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _man setunitpos "middle"; _IEDDetected = 1; _Stance = 2; }; _IEDTarget hideobject True; _man setbehaviour "Safe"; }; _man setbehaviour "Aware"; _man setunitpos "up"; Sleep 3; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _IEDDetected = 1; }; _IEDTarget hideobject True; //_man setbehaviour "Safe"; }; If ( _ChosenBuilding iskindof "land_house_C_1_EP1" or _ChosenBuilding iskindof "land_house_C_1_v2_EP1" ) then { _man setbehaviour "Aware"; _man setunitpos "up"; Sleep 3; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _IEDDetected = 1; }; _IEDTarget hideobject True; //_man setbehaviour "Safe"; }; If ( _ChosenBuilding iskindof "land_house_C_5_EP1" ) then { If ( _BMN == 0 or _BMN == 1 or _BMN == 2 or _BMN == 4 or _BMN == 5 ) then { _man setbehaviour "Aware"; _man setunitpos "middle"; Sleep 4; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _man setunitpos "middle"; _IEDDetected = 1; }; _IEDTarget hideobject True; _man setbehaviour "Safe"; }; _man setbehaviour "Aware"; _man setunitpos "up"; Sleep 3; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _IEDDetected = 1; }; _IEDTarget hideobject True; //_man setbehaviour "Safe"; }; If ( _ChosenBuilding iskindof "land_house_C_5_v1_EP1" ) then { If ( _BMN == 0 or _BMN == 1 or _BMN == 3 ) then { _man setbehaviour "Aware"; _man setunitpos "middle"; Sleep 4; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _man setunitpos "middle"; _IEDDetected = 1; _Stance = 2; }; _IEDTarget hideobject True; _man setbehaviour "Safe"; }; _man setbehaviour "Aware"; _man setunitpos "up"; Sleep 3; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _IEDDetected = 1; }; _IEDTarget hideobject True; //_man setbehaviour "Safe"; }; If ( _ChosenBuilding iskindof "land_house_C_5_v2_EP1" ) then { If ( _BMN == 1 or _BMN == 2 or _BMN == 3 ) then { _man setbehaviour "Aware"; _man setunitpos "middle"; Sleep 4; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _man setunitpos "middle"; _IEDDetected = 1; _Stance = 2; }; _IEDTarget hideobject True; _man setbehaviour "Safe"; }; _man setbehaviour "Aware"; _man setunitpos "up"; Sleep 3; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _IEDDetected = 1; }; _IEDTarget hideobject True; //_man setbehaviour "Safe"; }; If ( _ChosenBuilding iskindof "land_house_C_5_v3_EP1" ) then { If ( _BMN == 0 or _BMN == 2 ) then { _man setbehaviour "Aware"; _man setunitpos "middle"; Sleep 4; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _man setunitpos "middle"; _IEDDetected = 1; _Stance = 2; }; _IEDTarget hideobject True; _man setbehaviour "Safe"; }; _man setbehaviour "Aware"; _man setunitpos "up"; Sleep 3; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _IEDDetected = 1; }; _IEDTarget hideobject True; //_man setbehaviour "Safe"; }; If ( _ChosenBuilding iskindof "land_house_L_1_EP1" ) then { _man setbehaviour "Aware"; _man setunitpos "up"; Sleep 3; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _IEDDetected = 1; }; _IEDTarget hideobject True; //_man setbehaviour "Safe"; }; If ( _ChosenBuilding iskindof "land_house_L_3_EP1" ) then { If ( _BMN == 0 or _BMN == 1 ) then { _man setbehaviour "Aware"; _man setunitpos "middle"; Sleep 4; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _man setunitpos "middle"; _IEDDetected = 1; _Stance = 2; }; _IEDTarget hideobject True; _man setbehaviour "Safe"; }; _man setbehaviour "Aware"; _man setunitpos "up"; Sleep 3; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _IEDDetected = 1; }; _IEDTarget hideobject True; //_man setbehaviour "Safe"; }; If ( _ChosenBuilding iskindof "land_house_L_4_EP1" ) then { If ( _BMN == 2 or _BMN == 3 or _BMN == 5 ) then { _man setbehaviour "Aware"; _man setunitpos "down"; Sleep 4; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _man setunitpos "down"; _IEDDetected = 1; _Stance = 1; }; _IEDTarget hideobject True; _man setbehaviour "Safe"; }; If ( _BMN == 2 or _BMN == 3 or _BMN == 4 or _BMN == 5 ) then { _man setbehaviour "Aware"; _man setunitpos "middle"; Sleep 4; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _man setunitpos "middle"; _IEDDetected = 1; _Stance = 2; }; _IEDTarget hideobject True; _man setbehaviour "Safe"; }; _man setbehaviour "Aware"; _man setunitpos "up"; Sleep 3; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _IEDDetected = 1; }; _IEDTarget hideobject True; //_man setbehaviour "Safe"; }; If ( _ChosenBuilding iskindof "land_house_L_6_EP1" ) then { If ( _BMN == 0 or _BMN == 1 ) then { _man setbehaviour "Aware"; _man setunitpos "down"; Sleep 4; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _man setunitpos "down"; _IEDDetected = 1; }; _IEDTarget hideobject True; _man setbehaviour "Safe"; }; If ( _BMN == 0 or _BMN == 1 ) then { _man setbehaviour "Aware"; _man setunitpos "middle"; Sleep 4; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _man setunitpos "middle"; _IEDDetected = 1; _Stance = 2; }; _IEDTarget hideobject True; _man setbehaviour "Safe"; }; _man setbehaviour "Aware"; _man setunitpos "up"; Sleep 3; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _IEDDetected = 1; }; _IEDTarget hideobject True; //_man setbehaviour "Safe"; }; If ( _ChosenBuilding iskindof "land_house_L_7_EP1" ) then { _man setbehaviour "Aware"; _man setunitpos "up"; Sleep 3; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _IEDDetected = 1; }; _IEDTarget hideobject True; //_man setbehaviour "Safe"; }; If ( _ChosenBuilding iskindof "land_house_L_8_EP1" ) then { If ( _BMN == 3 or _BMN == 4 ) then { _man setbehaviour "Aware"; _man setunitpos "middle"; Sleep 4; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _man setunitpos "middle"; _IEDDetected = 1; _Stance = 2; }; _IEDTarget hideobject True; _man setbehaviour "Safe"; }; _man setbehaviour "Aware"; _man setunitpos "up"; Sleep 3; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _IEDDetected = 1; }; _IEDTarget hideobject True; //_man setbehaviour "Safe"; }; If ( _ChosenBuilding iskindof "land_house_L_9_EP1" ) then { _man setbehaviour "Aware"; _man setunitpos "up"; Sleep 3; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _IEDDetected = 1; }; _IEDTarget hideobject True; //_man setbehaviour "Safe"; }; If ( _ChosenBuilding iskindof "land_house_K_1_EP1" ) then { _man setbehaviour "Aware"; _man setunitpos "up"; Sleep 3; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _IEDDetected = 1; }; _IEDTarget hideobject True; //_man setbehaviour "Safe"; }; If ( _ChosenBuilding iskindof "land_house_K_3_EP1" ) then { If ( _BMN == 2 or _BMN == 3 ) then { _man setbehaviour "Aware"; _man setunitpos "middle"; Sleep 4; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _man setunitpos "middle"; _IEDDetected = 1; _Stance = 2; }; _IEDTarget hideobject True; _man setbehaviour "Safe"; }; _man setbehaviour "Aware"; _man setunitpos "up"; Sleep 3; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _IEDDetected = 1; }; _IEDTarget hideobject True; //_man setbehaviour "Safe"; }; If ( _ChosenBuilding iskindof "land_house_K_5_EP1" or _ChosenBuilding iskindof "land_house_K_6_EP1" ) then { _man setbehaviour "Aware"; _man setunitpos "up"; Sleep 3; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _IEDDetected = 1; }; _IEDTarget hideobject True; //_man setbehaviour "Safe"; }; If ( _ChosenBuilding iskindof "land_house_K_7_EP1" ) then { If ( _BMN == 7 or _BMN == 8 ) then { _man setbehaviour "Aware"; _man setunitpos "down"; Sleep 4; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _man setunitpos "down"; _IEDDetected = 1; _Stance = 1; }; _IEDTarget hideobject True; _man setbehaviour "Safe"; }; If ( _BMN == 3 or _BMN == 4 or _BMN == 5 or _BMN == 6 or _BMN == 7 or _BMN == 8 ) then { _man setbehaviour "Aware"; _man setunitpos "middle"; Sleep 4; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _man setunitpos "middle"; _IEDDetected = 1; _Stance = 2; }; _IEDTarget hideobject True; _man setbehaviour "Safe"; }; _man setbehaviour "Aware"; _man setunitpos "up"; Sleep 3; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _IEDDetected = 1; }; _IEDTarget hideobject True; //_man setbehaviour "Safe"; }; If ( _ChosenBuilding iskindof "land_house_K_8_EP1" ) then { If ( _BMN == 3 or _BMN == 4 or _BMN == 5 or _BMN == 6 or _BMN == 7 or _BMN == 8 or _BMN == 9 ) then { _man setbehaviour "Aware"; _man setunitpos "middle"; Sleep 4; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _man setunitpos "middle"; _IEDDetected = 1; _Stance = 2; }; _IEDTarget hideobject True; _man setbehaviour "Safe"; }; _man setbehaviour "Aware"; _man setunitpos "up"; Sleep 3; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _IEDDetected = 1; }; _IEDTarget hideobject True; //_man setbehaviour "Safe"; }; If ( _ChosenBuilding iskindof "land_A_Minaret_Porto_EP1" ) then { _man setbehaviour "Aware"; _man setunitpos "middle"; Sleep 4; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _man setunitpos "middle"; _IEDDetected = 1; _Stance = 2; }; _IEDTarget hideobject True; _man setbehaviour "Safe"; Sleep 1; _man setbehaviour "Aware"; _man setunitpos "up"; Sleep 3; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _IEDDetected = 1; }; _IEDTarget hideobject True; //_man setbehaviour "Safe"; }; If ( _ChosenBuilding iskindof "land_A_Mosque_Big_Minaret_1_EP1" or _ChosenBuilding iskindof "land_A_Mosque_Big_Minaret_2_EP1" ) then { _man setbehaviour "Aware"; _man setunitpos "up"; Sleep 3; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _IEDDetected = 1; }; _IEDTarget hideobject True; //_man setbehaviour "Safe"; }; If ( _ChosenBuilding iskindof "land_A_Minaret_EP1" ) then { _man setbehaviour "Aware"; _man setunitpos "middle"; Sleep 4; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _man setunitpos "middle"; _IEDDetected = 1; _Stance = 2; }; _IEDTarget hideobject True; _man setbehaviour "Safe"; Sleep 1; _man setbehaviour "Aware"; _man setunitpos "up"; Sleep 3; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _IEDDetected = 1; }; _IEDTarget hideobject True; //_man setbehaviour "Safe"; }; Sleep 2; _MoveNo = _MoveNo +1; _BMN = _BMN +1; }; _MBA = _MBA -1; If ( _NFBA == 0 ) then { _MBA = 0; }; // Checks Number of failed building attempts & sets _MBA to 0 so houses stopped being checked }; //-----------------------------No Building Options, so find an Object to hide by----------------------------------------------------------------------------- If ( _MBA == 0 or _NFBA == 0 && _MOA != 0 ) then { //-------Find Objects put in _ObjectArray then only pick the ones between 30m & 120m & put those in _RangeObjectArray in order of distance from _man-------------------------------------------------- _ObjectArray = nearestobjects [_IEDPos, [],120]; _OSS = 1; _RangeObjectArray = []; _BuildingArrayAll = []; _HIR = count nearestobjects [_IEDPos, ["house"],50]; //++++++++++++---Houses in range (50m) used to see if he's in a town---++++++++++++++++++++++++++++++++++++++++++++++++ _MinDist = 40; _MaxDist = 120; If ( _HIR <= 2 ) then { _MinDist = 40; _MaxDist = 120; }; If ( _HIR >= 10 ) then { _MinDist = 25; _MaxDist = 50; }; { If ( _IEDPos distance _x >= _MinDist && _IEDPos distance _x <= _MaxDist ) then { _RangeObjectArray = _RangeObjectArray + [_x]; }; } Foreach _ObjectArray; IF ( Count _RangeObjectArray >= 1 ) then { //-------Randomly select 1 of the Objects, remove it from the array (_RangeObjectArray) & call it _ChosenObject---------------------------------------------------------------------------------------- While { _MOA != 0 && _IEDDetected != 1 } do { _ROC = count _RangeObjectArray; _ChosenObject = _RangeObjectArray select (Floor(random _ROC)); _RangeObjectArray = _RangeObjectArray - [_ChosenObject]; while { _ChosenObject iskindof "house" or isonroad getpos _Chosenobject } do { _ROC = count _RangeObjectArray; _ChosenObject = _RangeObjectArray select (Floor(random _ROC)); _RangeObjectArray = _RangeObjectArray - [_ChosenObject]; }; If ( _MoveType == "Sw" ) then { _man setposATL [(getpos _ChosenObject select 0),(getpos _ChosenObject select 1),0]; }; If ( _MoveType == "Mo" ) then { _man domove getpos _ChosenObject; _man setbehaviour "Safe"; }; Waituntil { unitready _man or _IEDDetected == 1 }; "IED_Man" setMarkerPos getpos _man; _man setbehaviour "Aware"; _man setunitpos "down"; Sleep 4; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _man setunitpos "down"; _IEDDetected = 1; _Stance = 1; }; _IEDTarget hideobject True; _man setunitpos "middle"; Sleep 4; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _man setunitpos "middle"; _IEDDetected = 1; _Stance = 2; }; _IEDTarget hideobject True; _man setunitpos "up"; Sleep 4; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _IEDDetected = 1; }; _IEDTarget hideobject True; //_man setbehaviour "Safe"; _MOA = _MOA -1; }; }; }; //----------------------------------No Building or Object options, so just find a random position within 30-100m---------------------------------------------------------------- If ( _OSS == 1 ) then { _HIR = count nearestobjects [_IEDPos, ["house"],50]; //++++++++++++---Houses in range (50m) used to see if he's in a town---++++++++++++++++++++++++++++++++++++++++++++++++ If ( _HIR <= 2 ) then { _MinDist = 60; _MaxDist = 120; }; If ( _HIR >= 10 ) then { _MinDist = 25; _MaxDist = 50; }; While { _OMTC > 0 && _IEDDetected != 1} do { _Moveto = [( _IEDPos select 0) + ( -50 + (random(100))), ( _IEDPos select 1) + ( -50 + (random(100)))]; while { _Moveto distance _IEDPos <= _MinDist && _Moveto distance _IEDPos >= _MaxDist && isonroad _Moveto } do { _Moveto = [( _IEDPos select 0) + ( -100 + (random(200))), ( _IEDPos select 1) + ( -100 + (random(200)))]; }; If ( _MoveType == "Sw" ) then { _man setpos _Moveto; }; If ( _MoveType == "Mo" ) then { _man domove _MoveTo; _man setbehaviour "Safe"; }; Waituntil { unitready _man or _IEDDetected == 1 }; "IED_Man" setMarkerPos getpos _man; _man setbehaviour "Aware"; _man setunitpos "down"; Sleep 4; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _man setunitpos "down"; _IEDDetected = 1; _Stance = 1; }; _IEDTarget hideobject True; _man setunitpos "middle"; Sleep 4; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _man setunitpos "middle"; _IEDDetected = 1; _Stance = 2; }; _IEDTarget hideobject True; _man setunitpos "up"; Sleep 4; _IEDTarget hideobject False; _man dowatch _IEDTarget; Sleep _DT; If ( _man knowsabout _IEDTarget > _KV ) then { _man disableai "anim"; _IEDDetected = 1; }; _IEDTarget hideobject True; _OMTC = _OMTC -1; }; }; }; //#############################################---Create & Define Detonation & detection Triggers---############################################################################################################## _IEDtriggerOuter = createTrigger["EmptyDetector", _iedpos]; _IEDtriggerOuter setTriggerActivation ["WEST", "PRESENT", true]; _IEDtriggerOuter setTriggerArea [30, 30, 0, false]; _IEDtriggerOuter setTriggerStatements ["this", "" ,""]; _IEDtriggerInner = createTrigger["EmptyDetector", _iedpos]; _IEDtriggerInner setTriggerActivation ["WEST", "PRESENT", true]; _IEDtriggerInner setTriggerArea [15, 15, 0, false]; _IEDtriggerInner setTriggerStatements ["this", "" ,""]; [_man] Spawn { WaitUntil { Player knowsabout (_this Select 0) >= 4 && CursorTarget == (_this Select 0) }; Sleep (floor (random 5)); (_this Select 0) setCaptive False; (_this Select 0) addrating -10000; }; _man addweapon "ItemMap"; _man enableai "anim"; _man disableai "move"; deleteVehicle _IEDTarget; Sleep 2; _man setcombatmode "blue"; If ( _Stance == 1 ) then { _man setunitpos "down" ; }; If ( _Stance == 2 ) then { _man setunitpos "Middle" ; }; Sleep 2; If ( _binoc == "bin" ) then { _man selectweapon "Binocular"; }; If ( _Gun == "noGun" ) then { Removeallweapons _man; }; _IEDDeted = 0; _shouted = 0; Waituntil {triggeractivated _IEDtriggerOuter}; { While {_man knowsabout _x >=0.1 && _IEDDeted == 0 } do { Waituntil {triggeractivated _IEDtriggerinner}; reezo_IEDdetect_canFear = 1; publicVariable "reezo_IEDdetect_canFear"; nul0 = [_x,_man] execVM "common\server\IEDdetect\IEDdetect_cursorTarget.sqf"; Sleep (floor (random 5)); while {alive _man && reezo_IEDdetect_cursorTarget > -1 && reezo_IEDdetect_canFear == 1} do { sleep 1 }; if (_shouted == 0) then { _shouted = 1; _man say "akbar"; sleep 1.4; }; if (alive _man) then { Reezo_IED_detector_objects = Reezo_IED_detector_objects - [_IED]; publicVariable "Reezo_IED_detector_objects"; reezo_IEDdetect_cursorTarget = 0; publicVariable "reezo_IEDdetect_cursorTarget"; reezo_IEDdetect_Targeters = reezo_IEDdetect_Targeters - [_x]; publicVariable "reezo_IEDdetect_Targeters"; reezo_IEDdetect_canFear = 0; publicVariable "reezo_IEDdetect_canFear"; _rnd = random 1; if (_rnd < 0.4) then { "B_30mm_HE" createVehicle (getPos _IED) }; if (_rnd > 0.6) then { "Sh_125_HE" createVehicle (getPos _IED) } else { "Bo_GBU12_LGB" createVehicle (getPos _IED)}; deleteVehicle _IED; }; _IEDDeted = 1; }; } Foreach list _IEDtriggerOuter; Waituntil { _IEDDeted == 1 }; Sleep (floor (random 10)); _man addrating -10000; _man setcaptive False; _man enableai "move"; _man setunitpos "middle"; _man setcombatmode "Green"; _man setbehaviour "stealth"; _man dowatch objnull; If ( _Relocate == "RUN" ) then { _ObjectArray2 = nearestobjects [_man, [],200]; _RangeObjectArray2 = []; _MOM = 5; { If ( _man distance _x >= 80 && _man distance _x <= 200 ) then { _RangeObjectArray2 = _RangeObjectArray2 + [_x]; }; } Foreach _ObjectArray2; IF ( Count _RangeObjectArray2 >= 1 ) then { //-------Randomly select 1 of the Objects, remove it from the array (_RangeObjectArray) & call it _ChosenObject---------------------------------------------------------------------------------------- While { _MOM > 0 } do { _ROC2 = count _RangeObjectArray2; _ChosenObject2 = _RangeObjectArray2 select (Floor(random _ROC2)); _RangeObjectArray2 = _RangeObjectArray2 - [_ChosenObject2]; _man domove getpos _chosenObject2; Sleep 3; Waituntil { unitready _man }; Sleep (floor (random 60)); _MOM = _MOM -1; }; }; };////////////////////////////////////////////////////////////////// // Function file for Armed Assault // Created by: Reezo of SR5 Tactical - www.sr5tactical.net // IED Detection and Disposal Scripts ////////////////////////////////////////////////////////////////// // INIT private ["_detector","_range","_interval","_skill","_fakeRatio","_near","_nearCount","_IEDmarker","_rnd","_posX","_posY","_sign","_y","_h","_iedMarkename","_createvarname","_numberMarker","_action_reezo_IEDdetect_remoteDet","_action_reezo_IEDdetect_manualDefuse","_lapse","_nearHosts","_thisHost","_action_reezo_IEDdetect_detach","_fakeIED"]; _detector = _this select 0; _range = _this select 1; _interval = _this select 2; _skill = _this select 3; _fakeRatio = _this select 4; if !(local _detector) exitWith {}; waitUntil {reezo_IEDdetect_initComplete}; reezo_IEDdetect_EODs = reezo_IEDdetect_EODs + [_detector]; publicVariable "reezo_IEDdetect_EODs"; reezo_IEDdetect_detector_respawn = [_detector,_range,_interval,_skill,_fakeRatio]; // MAIN SCAN LOOP while {alive _detector} do { if (reezo_IEDdetect_debug) then { player globalChat "NOW RUNNING: MAIN SCAN LOOP" }; while {count reezo_IED_detector_objects == 0} do { sleep (_interval * 2) }; { if (_detector == driver _x) then { sleep _interval }; } forEach reezo_IEDdetect_EODvehicles; if !(_detector in reezo_IEDdetect_EODs) then { reezo_IEDdetect_EODs = reezo_IEDdetect_EODs + [_detector]; publicVariable "reezo_IEDdetect_EODs"; }; _fakeIED = 0; if (reezo_IEDdetect_busy == 0) then { _near = (getPos _detector) nearObjects (_range - ((speed _detector) * 1.25)); _nearCount = count _near; if (_nearCount > 50) then {_nearCount = 50}; // CASE 1. FAKE IED DETECTED (radio interferences or whatever gizmo might trigger it) _rnd = random 100; if (_rnd < _fakeRatio && reezo_IEDdetect_busy == 0 && _nearCount > 5) then { if (reezo_IEDdetect_debug) then { player globalChat "NOW RUNNING: FAKE IED CODE"; sleep 1; }; // Script goes busy reezo_IEDdetect_busy = 1; publicVariable "reezo_IEDdetect_busy"; _fakeIED = 1; // ACQUIRE IED AND BROADCAST, adding it to the "Found IEDs" array reezo_IEDdetect_activeIED = _near select (floor (random _nearCount)); publicVariable "reezo_IEDdetect_activeIED"; reezo_IEDdetect_activeEOD = _detector; publicVariable "reezo_IEDdetect_activeEOD"; // Scanner notification (Scanning..) waitUntil {!dialog}; cutRsc ["IEDdetect_01", "PLAIN", 0]; playsound "IEDdetect_beep"; sleep 1; playsound "IEDdetect_beep"; sleep 1; playsound "IEDdetect_beep"; sleep 1; sleep 2; //MARKER PLACEMENT (approximate) deleteMarkerLocal "REEZOIED"; deleteMarkerLocal _iedMarkename; sleep 0.1; _rnd = random _range; _sign = random 1; if (_sign < 0.5) then { _rnd = -1 * _rnd }; _posX = (getPos (_detector) select 0) + _rnd; _rnd = random _range; _sign = random 1; if (_sign < 0.5) then { _rnd = -1 * _rnd }; _posY = (getPos (_detector) select 1) + _rnd; // GENERATE NAME NOT IN USE GLOBALLY _iedMarkename = "REEZOIED"; _numberMarker = 0; if (isnil ("REEZOIED")) then {_iedMarkename="REEZOIED"} else { _createvarname = true; while {_createvarname} do { _iedMarkename = format["REEZOIED_%1",_numberMarker]; if (isnil ("_iedMarkename")) then { _createvarname = false; } else { _numberMarker = _numberMarker+ 1; }; }; }; _IEDmarker = createMarkerLocal[_iedMarkename,[_posX,_posY]]; _IEDmarker setMarkerShape "ICON"; _IEDmarker setMarkerType "WARNING"; _IEDmarker setMarkerColor "colorRed"; _IEDmarker setMarkerText "IED Approx. Position"; _IEDmarker setMarkerSize [.50, .50]; // Report the fake IED waitUntil {!dialog}; cutRsc ["IEDdetect_02", "PLAIN", 0]; playsound "IEDdetect_beep2"; sleep 15 + floor (random 90); // After some time..declare the IED fake waitUntil {!dialog}; cutRsc ["IEDdetect_07", "PLAIN", 0]; playsound "IEDdetect_beep2"; // Cleaning deleteMarkerLocal "REEZOIED"; deleteMarkerLocal _iedMarkename; }; if (_fakeIED == 0) then { for [{_y = 0},{_y < _nearCount},{_y = _y + 1}] do { { if (_detector == driver _x) then { sleep _interval }; } forEach reezo_IEDdetect_EODvehicles; // CASE 2. REAL IED DETECTED if ((_near select _y) in reezo_IED_detector_objects && reezo_IEDdetect_busy == 0 && alive _detector) then { if (reezo_IEDdetect_debug) then { player globalChat "NOW RUNNING: REAL IED CODE" }; sleep 1; // Script goes busy reezo_IEDdetect_busy = 1; publicVariable "reezo_IEDdetect_busy"; // ACQUIRE IED AND BROADCAST, adding it to the "Found IEDs" array reezo_IEDdetect_activeIED = _near select _y; publicVariable "reezo_IEDdetect_activeIED"; reezo_IEDdetect_activeEOD = _detector; publicVariable "reezo_IEDdetect_activeEOD"; if (reezo_IEDdetect_debug) then { hint Format["Array:\n\n%1\n\nActiveIED:\n\n%2\n\nActiveEOD:\n\n%3",reezo_IED_detector_objects,reezo_IEDdetect_activeIED, reezo_IEDdetect_activeEOD]; sleep 1; }; // Scanner notification (Scanning..) waitUntil {!dialog}; cutRsc ["IEDdetect_01", "PLAIN", 0]; playsound "IEDdetect_beep"; sleep 1; playsound "IEDdetect_beep"; sleep 1; playsound "IEDdetect_beep"; sleep 1; sleep 2; //MARKER PLACEMENT (approximate) deleteMarkerLocal "REEZOIED"; deleteMarkerLocal _iedMarkename; sleep 0.1; _rnd = random 5; _sign = random 1; if (_sign < 0.5) then { _rnd = -1 * _rnd }; _posX = (getPos (reezo_IEDdetect_activeIED) select 0) + _rnd; _rnd = random 5; _sign = random 1; if (_sign < 0.5) then { _rnd = -1 * _rnd }; _posY = (getPos (reezo_IEDdetect_activeIED) select 1) + _rnd; // GENERATE NAME NOT IN USE GLOBALLY _iedMarkename = "REEZOIED"; _numberMarker = 0; if (isnil ("REEZOIED")) then {_iedMarkename="REEZOIED"} else { _createvarname = true; while {_createvarname} do { _iedMarkename = format["REEZOIED_%1",_numberMarker]; if (isnil ("_iedMarkename")) then { _createvarname = false; } else { _numberMarker = _numberMarker+ 1; }; }; }; _IEDmarker = createMarkerLocal[_iedMarkename,[_posX,_posY]]; _IEDmarker setMarkerShape "ICON"; _IEDmarker setMarkerType "WARNING"; _IEDmarker setMarkerColor "colorRed"; _IEDmarker setMarkerText "IED Approx. Position"; _IEDmarker setMarkerSize [.50, .50]; // Notify the IED found, add disarm actions waitUntil {!dialog}; cutRsc ["IEDdetect_02", "PLAIN", 0]; playsound "IEDdetect_beep2"; reezo_IEDdetect_activeIED removeAction _action_reezo_IEDdetect_manualDefuse; _action_reezo_IEDdetect_manualDefuse = reezo_IEDdetect_activeIED addAction [''+"Defuse Bomb"+'', "common\server\IEDdetect\IEDdetect_manualDefuse.sqf", [], 0, false, true, "",""]; //check if IED is attached to something and if it is, place a Detach action on it if (reezo_IEDdetect_activeIED in reezo_IEDdetect_attachedIEDs) then { _nearHosts = ((getPos reezo_IEDdetect_activeIED) nearObjects 3) - [reezo_IEDdetect_activeIED]; for [{_h= 0},{_h < (count _nearhosts)},{_h = _h + 1}] do { _thisHost = _nearHosts select _h; if (_thisHost in reezo_IEDdetect_hostIEDs) then { _action_reezo_IEDdetect_detach = _thisHost addAction [''+"Detach IED"+'', "common\server\IEDdetect\IEDdetect_detach.sqf", [reezo_IEDdetect_activeIED], 0, false, true, "",""]; }; }; }; // Remote Det possibility _rnd = random 100; if (_rnd < _skill) then { sleep 4; waitUntil {!dialog}; cutRsc ["IEDdetect_03", "PLAIN", 0]; playsound "IEDdetect_beep2"; reezo_IEDdetect_activeEOD removeAction _action_reezo_IEDdetect_remoteDet; _action_reezo_IEDdetect_remoteDet = reezo_IEDdetect_activeEOD addAction [''+"Remotely Detonate Bomb"+'', "common\server\IEDdetect\IEDdetect_remoteDet.sqf", [reezo_IEDdetect_activeIED], 0, false, true, "",""]; }; }; // END IF // MAIN WAIT LOOP _lapse = 1; while { reezo_IEDdetect_busy == 1 && _lapse < 36 && alive reezo_IEDdetect_activeIED && alive reezo_IEDdetect_activeEOD && reezo_IEDdetect_activeIED distance reezo_IEDdetect_activeEOD < 300} do { // update IED marker if it moved in the meantime if (speed reezo_IEDdetect_activeIED != 0) then { _rnd = random 5; _sign = random 1; if (_sign < 0.5) then { _rnd = -1 * _rnd }; _posX = (getPos (reezo_IEDdetect_activeIED) select 0) + _rnd; _rnd = random 5; _sign = random 1; if (_sign < 0.5) then { _rnd = -1 * _rnd }; _posY = (getPos (reezo_IEDdetect_activeIED) select 1) + _rnd; _iedMarkename setMarkerPos [_posX, _posY]; }; sleep 5; _lapse = _lapse + 1; }; reezo_IEDdetect_activeIED removeAction _action_reezo_IEDdetect_manualDefuse; reezo_IEDdetect_activeEOD removeAction _action_reezo_IEDdetect_remoteDet; deleteMarkerLocal "REEZOIED"; deleteMarkerLocal _iedMarkename; }; // END FOR }; //END IF FAKEIED == 0 reezo_IEDdetect_busy = 0; publicVariable "reezo_IEDdetect_busy"; }; // END IF IEDDETECT_BUSY == 0 sleep _interval; }; // END WHILE deleteMarkerLocal "REEZOIED"; deleteMarkerLocal _iedMarkename; reezo_IEDdetect_busy = 0; publicVariable "reezo_IEDdetect_busy"; reezo_IEDdetect_EODs = reezo_IEDdetect_EODs - [_detector]; publicVariable "reezo_IEDdetect_EODs"; sleep 1; if (reezo_IEDdetect_debug) then { player globalChat "REEZO_IEDDETECT DEBUG: RESPAWN - RESPAWNING.."; sleep 1; }; waitUntil {alive player}; nul0 = [player,(reezo_IEDdetect_detector_respawn select 1),(reezo_IEDdetect_detector_respawn select 2),(reezo_IEDdetect_detector_respawn select 3),(reezo_IEDdetect_detector_respawn select 4)] execVM "common\server\IEDdetect\IEDdetect.sqf"; if (reezo_IEDdetect_debug) then { player globalChat "REEZO_IEDDETECT DEBUG: RESPAWN - RESPAWNED CORRECTLY"; sleep 1; }; if (reezo_IEDdetect_debug) then { player globalChat "reezo_IEDDETECT DEBUG: IEDDETECT.SQF COMPLETE" }; if (true) exitWith {};////////////////////////////////////////////////////////////////// // Function file for Armed Assault // Created by: Reezo of SR5 Tactical - www.sr5tactical.net // IED Detection and Disposal Scripts ////////////////////////////////////////////////////////////////// // INIT private ["_object","_rnd","_beep","_detonate","_wait","_currentDamage"]; if (!isServer) exitWith{}; if (count _this < 1 OR count _this > 2) exitWith {hint "IED_DETECT_ADD.SQF WRONG PARAMETERS, QUITTING.." }; _object = _this select 0; if (count _this == 2) then {_beep = _this select 1 } else { _beep = 2 }; waitUntil {!(isNull _object)}; waitUntil {_object == _object}; waitUntil {reezo_IEDdetect_initComplete}; Reezo_IED_detector_objects = Reezo_IED_detector_objects + [_object]; publicVariable "Reezo_IED_detector_objects"; if (_beep == 2) then { _rnd = random 1; if (_rnd > 0.5) then { _beep = 1 } else { _beep = 0 }; }; if (_beep == 1) then { reezo_IEDdetect_beepers = reezo_IEDdetect_beepers + [_object]; publicVariable "reezo_IEDdetect_beepers"; }; if (reezo_IEDdetect_debug) then { sleep 1; player globalChat "REEZO_IEDDETECT DEBUG: ADD DONE AND WAITING"; sleep 1;}; // blow up the IED if it gets shot or destroyed _wait = true; _detonate = false; while { _wait } do { _rnd = random 1; if (_rnd < damage _object) then { _detonate = true; _wait = false; }; if (!alive _object) then { _wait = false }; if (_wait) then { sleep 3 }; }; if (_detonate && _object in reezo_IED_detector_objects) then { _rnd = random 1; if (_rnd < 0.4) then { "B_30mm_HE" createVehicle (getPos _object) }; if (_rnd > 0.6) then { "Sh_125_HE" createVehicle (getPos _object) } else { "Bo_GBU12_LGB" createVehicle (getPos _object) }; }; if (_object in Reezo_IED_detector_objects) then { Reezo_IED_detector_objects = Reezo_IED_detector_objects - [_object]; publicVariable "reezo_IED_detector_objects"; }; if (_object in reezo_IEDdetect_beepers) then { reezo_IEDdetect_beepers = reezo_IEDdetect_beepers - [_object]; publicVariable "reezo_IEDdetect_beepers"; }; if (reezo_IEDdetect_canFear == 1) then { reezo_IEDdetect_cursorTarget = 0; publicVariable "reezo_IEDdetect_cursorTarget"; reezo_IEDdetect_Targeters = []; publicVariable "reezo_IEDdetect_Targeters"; reezo_IEDdetect_canFear = 0; publicVariable "reezo_IEDdetect_canFear"; }; if (alive _object) then { deleteVehicle _object }; if (reezo_IEDdetect_debug) then { sleep 1; player globalChat "REEZO_IEDDETECT DEBUG: ADD COMPLETE"; sleep 1;}; if (true) exitWith {};////////////////////////////////////////////////////////////////// // Function file for Armed Assault // Created by: Reezo of SR5 Tactical - www.sr5tactical.net // IED Detection and Disposal Scripts ////////////////////////////////////////////////////////////////// // INIT private ["_soldier","_ambientGROUP","_civilians","_vehicles","_triggerman","_minNumber","_chance","_interval","_bomb","_IEDtype","_beep","_scanArea","_fearArea","_detArea","_suicideRate","_enemySide","_rnd","_fate","_actualPos","_y","_k","_ambientRadius"]; _soldier = player; _ambientGROUP = group _soldier; if !(local _soldier) exitWith{}; if (_soldier != leader group _soldier) exitWith{}; waitUntil {reezo_IEDdetect_initComplete}; if (count _this != 11) exitWith{ hint "IEDdetect_ambientBombers error: wrong parameters!" }; _ambientRadius = _this select 0; _minNumber = _this select 1; _chance = _this select 2; _interval = _this select 3; _IEDtype = _this select 4; _beep = _this select 5; _scanArea = _this select 6; _fearArea = _this select 7; _detArea = _this select 8; _suicideRate = _this select 9; _enemySide = _this select 10; if (side _soldier != _enemySide) exitWith{}; waitUntil { time > 3 }; // MAIN LOOP while {alive _soldier} do { //RANDOMIZE BASED ON CHANCE AND RUN CODE ONLY IF TRUE (SAVES CYCLES IN ACCORDANCE WITH KYOTO PACTS) _fate = random 100; if (_fate < _chance) then { //CHECK HOW MANY CIVILIANS ARE IN THE AREA _civilians = []; _nearPeople = (getPos _soldier) nearObjects ["Man",_ambientRadius]; for [{_y = 0},{_y < (count _nearPeople)},{_y = _y + 1}] do { if (side (_nearPeople select _y) == CIVILIAN) then { _civilians = _civilians + [_nearPeople select _y]; }; }; //PROCEED ONLY IF ENOUGH CIVVIES ARE FOUND AND CHECK FOR ALTITUDE DIFFERENCE TO AVOID TRIGGERING WHEN FLYING OVER _soldierAltitude = (getPos _soldier) select 2; _civAltitude = (getPos (_civilians select 0)) select 2; if (count _civilians >= _minNumber && (abs (_soldierAltitude - _civAltitude)) < 5 ) then { _triggerman = (_civilians select (floor (random (count _civilians)))); _civilians = []; _nearPeople = (getPos _triggerman) nearObjects ["Man",_ambientRadius]; for [{_y = 0},{_y < (count _nearPeople)},{_y = _y + 1}] do { if (side (_nearPeople select _y) == CIVILIAN) then { _civilians = _civilians + [_nearPeople select _y]; }; }; _triggerman = (_civilians select (floor (random (count _civilians)))); _bomb = _triggerman; if (reezo_IEDdetect_debug) then { _soldier globalChat "DEBUG IEDDETECT_AMBIENTBOMBERS: TRIGGERMAN FOUND"; sleep 1; }; _rnd = random 100; _vehicles = []; _nearCars = (getPos _triggerman) nearObjects [_IEDtype,_scanArea]; //DECIDE: SUICIDE BOMBER OR TRIGGERMAN? if (_rnd < _suicideRate && count _nearCars > 0) then { for [{_k = 0},{_k < (count _nearCars)},{_k = _k + 1}] do { if !(side (_nearCars select _k) == _enemySide) then { if (isNull driver (_nearCars select _k) && !(isEngineOn (_nearCars select _k))) then { //hint Format ["%1",(side (_nearCars select _k))]; _vehicles = _vehicles + [_nearCars select _k]; }; }; }; _bomb = (_vehicles select (floor (random (count _vehicles)))); if (reezo_IEDdetect_debug) then { _soldier globalChat "DEBUG IEDDETECT_AMBIENTBOMBERS: BOMB IS OBJECT"; sleep 1; }; } else { _bomb = _triggerman; if (reezo_IEDdetect_debug) then { _soldier globalChat "DEBUG IEDDETECT_AMBIENTBOMBERS: BOMB IS TRIGGERMAN"; sleep 1; }; }; //FINALLY ACTIVATE THE SON OF A BITCH sleep 1; if (reezo_IEDdetect_debug) then { hintSilent Format["TRIGGERMAN:\n%1\n\nBOMB:\n%2\n\nBEEP:\n%3\n\nFEARAREA:\n%4\n\nDETAREA:\n%5\n\nENEMYSIDE:\n%6",_triggerman,_bomb,_beep,_fearArea,_detArea,_enemySide]; }; nul0 = [_triggerman,_bomb,_beep,_fearArea,_detArea,_enemySide] execVM "common\server\IEDdetect\IEDdetect_triggerman.sqf"; while {_soldier distance _triggerman < (_ambientRadius/2) && alive _triggerman} do { if (reezo_IEDdetect_debug) then { _soldier globalChat "DEBUG IEDDETECT_AMBIENTBOMBERS: WAIT TYPE 2"; _debugMRK1 = createMarkerLocal ["debugMRK1", position _triggerman]; _debugMRK1 setMarkerShapeLocal "ICON"; _debugMRK1 setMarkerTypeLocal "DOT"; if (_triggerman == _bomb) then { _debugMRK1 setMarkerTextLocal "Suicide Bomber"; } else { _debugMRK2 = createMarkerLocal ["debugMRK2", position _bomb]; _debugMRK2 setMarkerShapeLocal "ICON"; _debugMRK2 setMarkerTypeLocal "DOT"; _debugMRK1 setMarkerTextLocal "Triggerman"; _debugMRK2 setMarkerTextLocal "IED"; }; }; sleep _interval; }; } else { //YOU NEVER GET ENOUGH SLEEP WHEN YOU ARE A LAZY PERSON if (reezo_IEDdetect_debug) then { _soldier globalChat "DEBUG IEDDETECT_AMBIENTBOMBERS: NOT ENOUGH CIVVIES"; sleep 1; }; sleep _interval; }; //SLEEP IF _soldier DOES NOT MOVE FROM THE AREA _actualPos = getPos _soldier; while {_actualPos distance (getPos _soldier) < (_ambientRadius/2)} do { if (reezo_IEDdetect_debug) then { _soldier globalChat "DEBUG IEDDETECT_AMBIENTBOMBERS: WAIT TYPE 1"; sleep 1; }; sleep _interval; }; if (!alive _soldier) then { _soldier = leader _ambientGROUP }; }; }; //END MAIN LOOP // END if (reezo_IEDdetect_debug) then { _soldier globalChat "DEBUG IEDDETECT_AMBIENTBOMBERS: SCRIPT COMPLETE"; sleep 1; }; if (true) exitWith{};////////////////////////////////////////////////////////////////// // Function file for Armed Assault // Created by: Reezo of SR5 Tactical - www.sr5tactical.net // IED Detection and Disposal Scripts ////////////////////////////////////////////////////////////////// // INIT private ["_soldier","_ambientGROUP","_objects","_vehicles","_proximityIED","_minNumber","_chance","_interval","_bomb","_IEDtype","_beep","_scanArea","_fearArea","_detArea","_typeRate","_enemySide","_rnd","_fate","_actualPos","_y","_k","_ambientRadius","_IEDskins"]; _soldier = player; _ambientGROUP = group _soldier; if !(local _soldier) exitWith{}; if (_soldier != leader group _soldier) exitWith{}; waitUntil {reezo_IEDdetect_initComplete}; if (count _this != 6) exitWith{ hint "IEDDETECT_AMBIENTPROXYIEDS error: wrong parameters!" }; _ambientRadius = _this select 0; _chance = _this select 1; _interval = _this select 2; _beep = _this select 3; _typeRate = _this select 4; _enemySide = _this select 5; if (reezo_IEDdetect_debug) then { hintSilent Format["RADIUS:\n%1\n\nCHANCE:\n%2\n\nINTERVAL:\n%3\n\nBEEP:\n%4\n\nTYPERATE:\n%5\n\nENEMYSIDE:\n%6",_ambientRadius,_chance,_interval,_beep,_typeRate,_enemySide]; sleep 1; }; _IEDskins = ["Land_IED_v1_PMC","Land_IED_v2_PMC","Land_IED_v3_PMC","Land_IED_v4_PMC"]; if (side _soldier != _enemySide) exitWith{}; waitUntil { time > 3 }; // MAIN LOOP while {alive _soldier} do { if (reezo_IEDdetect_debug) then { _soldier globalChat "DEBUG IEDDETECT_AMBIENTPROXYIEDS: START MAIN LOOP"; sleep 1; }; //RANDOMIZE BASED ON CHANCE AND RUN CODE ONLY IF TRUE (SAVES CYCLES IN ACCORDANCE WITH KYOTO PACTS) _fate = random 100; if (_fate < _chance) then { //CHECK HOW MANY ROADS ARE IN THE AREA _nearRoads = []; _goodSpots = []; _nearRoads = (getPos _soldier) nearRoads _ambientRadius; //FIND SUITABLE SPOTS AT LEAST 2/3 OF THE SOLDIER POSITION for [{_y = 0},{_y < (count _nearRoads)},{_y = _y + 1}] do { if ((getPos (_nearRoads select _y)) distance getPos _soldier > (_ambientRadius * 0.67)) then { _goodSpots = _goodSpots + [getPos (_nearRoads select _y)]; if (reezo_IEDdetect_debug) then { _soldier globalChat "DEBUG IEDDETECT_AMBIENTPROXYIEDS: GOOD SPOT FOUND"; hintSilent Format["GOOD SPOT:\n%1\n\nPOSITION:\n%2",(_nearRoads select _y),(getPos (_nearRoads select _y))]; sleep 1; }; }; }; //SPAWN THE IED AND MAKE IT A PROXIMITY IED if (count _goodSpots > 0 && ((getPos _soldier) select 2 < 5)) then { //RANDOMIZE A GOOD POSITION AND AN IED TYPE _IEDtype = _IEDskins select (floor (random (count _IEDskins))); _IEDpos = _goodSpots select (floor (random (count _goodSpots))); //RANDOMIZE POSITION AROUND THE GOOD SPOT FOUND _rndX = 5.5 + random 1.5; _rndY = 5.5 + random 1.5; _segno = random 1; if (_segno < 0.5) then { _rndX = -1 * _rndX }; _segno = random 1; if (_segno < 0.5) then { _rndY = -1 * _rndY }; _IEDpos = [(_IEDpos select 0) + _rndX, (_IEDpos select 1) + _rndY, (_IEDpos select 2)]; if (reezo_IEDdetect_debug) then { hintSilent Format["IEDTYPE:\n%1\n\nIEDPOS:\n%2\n\nSOLDIERPOS:\n%3",_IEDtype,_IEDpos,(getPos _soldier)]; sleep 1; }; _proximityIED = createVehicle [_IEDtype, _IEDpos, [], 0, "NONE"]; _proximityIED setDir (random 360); //_proximityIED = _IEDtype createVehicle ((getPos _goodSpots) select (floor (random (count _goodSpots)))); _rnd = random 100; if (_rnd < _typeRate) then { nul0 = [_proximityIED,_beep,0] execVM "common\server\IEDdetect\IEDdetect_proximity.sqf"; } else { nul0 = [_proximityIED,_beep,1] execVM "common\server\IEDdetect\IEDdetect_proximity.sqf"; }; if (reezo_IEDdetect_debug) then { _soldier globalChat "DEBUG IEDDETECT_AMBIENTPROXYIEDS: PROXIMITY IED SPAWNED"; sleep 1; }; }; while {_soldier distance _proximityIED <= (_ambientRadius) && alive _proximityIED} do { if (reezo_IEDdetect_debug) then { _soldier globalChat "DEBUG IEDDETECT_AMBIENTPROXYIEDS: WAIT TYPE 2"; deleteMarker "debugMRK1"; _debugMRK1 = createMarkerLocal ["debugMRK1", position _proximityIED]; _debugMRK1 setMarkerShapeLocal "ICON"; _debugMRK1 setMarkerTypeLocal "DOT"; _debugMRK1 setMarkerTextLocal "DEBUG: Proximity IED"; }; sleep _interval; }; } else { //YOU NEVER GET ENOUGH SLEEP WHEN YOU ARE A LAZY PERSON if (reezo_IEDdetect_debug) then { _soldier globalChat "DEBUG IEDDETECT_AMBIENTPROXYIEDS: WAIT TYPE 3"; sleep 1; }; sleep _interval; }; //SLEEP IF _soldier DOES NOT MOVE FROM THE AREA while {_proximityIED distance _soldier < (_ambientRadius * 1.33)} do { if (reezo_IEDdetect_debug) then { _soldier globalChat "DEBUG IEDDETECT_AMBIENTPROXYIEDS: WAIT TYPE 1"; sleep 1; }; sleep _interval; }; reezo_IED_detector_objects = reezo_IED_detector_objects - [_proximityIED]; publicVariable "reezo_IED_detector_objects"; deleteVehicle _proximityIED; if (!alive _soldier) then { _soldier = leader _ambientGROUP }; }; //END MAIN LOOP // END if (reezo_IEDdetect_debug) then { _soldier globalChat "DEBUG IEDDETECT_AMBIENTPROXYIEDS: SCRIPT COMPLETE"; sleep 1; }; if (true) exitWith{};////////////////////////////////////////////////////////////////// // Function file for Armed Assault // Created by: Reezo of SR5 Tactical - www.sr5tactical.net // IED Detection and Disposal Scripts ////////////////////////////////////////////////////////////////// // INIT private ["_object","_beep","_attachedIED","_rnd","_detonate","_wait","_currentDamage"]; if (!isServer) exitWith{}; if (count _this < 1 OR count _this > 2) exitWith {hint "IED_DETECT_ADD.SQF WRONG PARAMETERS, QUITTING.." }; _object = _this select 0; if (count _this == 2) then {_beep = _this select 1 } else { _beep = 0 }; // Better wait until the host object is ready waitUntil {!(isNull _object)}; waitUntil {_object == _object}; waitUntil {reezo_IEDdetect_initComplete}; // Spawn the explosive object _attachedIED = "Explosive" createVehicle (getPos _object); sleep 0.1; //Add that object to the array Reezo_IED_detector_objects = Reezo_IED_detector_objects + [_attachedIED]; publicVariable "Reezo_IED_detector_objects"; //..and add it to the IEDs that are ATTACHED to something Reezo_IEDdetect_attachedIEDs = Reezo_IEDdetect_attachedIEDs + [_attachedIED]; publicVariable "Reezo_IEDdetect_attachedIEDs"; //..and add the object it is attached to in the list of IED hosts reezo_IEDdetect_hostIEDs = reezo_IEDdetect_hostIEDs + [_object]; publicVariable "reezo_IEDdetect_hostIEDs"; // To beep or not to beep, this is the question if (_beep == 2) then { _rnd = random 1; if (_rnd > 0.5) then { _beep = 1 } else { _beep = 0 }; }; if (_beep == 1) then { reezo_IEDdetect_beepers = reezo_IEDdetect_beepers + [_attachedIED]; publicVariable "reezo_IEDdetect_beepers"; }; // Attach the IED to the object if (_object isKindof "Car" OR _object isKindOf "Tank") then { _attachedIED attachTo [_object,[0,0,-1],"hatch1"]; } else { _attachedIED attachTo [_object,[0,0,0],"hatch1"]; }; sleep 0.1; if (reezo_IEDdetect_debug) then { player globalChat "REEZO_IEDDETECT DEBUG: ATTACH DONE AND WAITING" }; // blow up the IED if it gets shot or destroyed _wait = true; _detonate = false; while { _wait } do { if (!alive _attachedIED) then { _wait = false }; _rnd = random 1; if (_object in reezo_IEDdetect_hostIEDs && !(_object isKindOf "Man") && _rnd < damage _object) then { _detonate = true; _wait = false; }; if (!(_object in reezo_IEDdetect_hostIEDs) && _attachedIED in reezo_IEDdetect_attachedIEDs && damage _attachedIED != 0) then { _detonate = true; _wait = false; }; //if (!(_attachedIED in reezo_IED_detector_objects)) then { _wait = false; }; if (_wait) then { sleep 3 }; }; if (_detonate && _attachedIED in reezo_IEDdetect_attachedIEDs) then { _rnd = random 1; if (_rnd < 0.4) then { "B_30mm_HE" createVehicle (getPos _attachedIED) }; if (_rnd > 0.6) then { "Sh_125_HE" createVehicle (getPos _attachedIED) } else { "Bo_GBU12_LGB" createVehicle (getPos _attachedIED) }; }; if (_attachedIED in Reezo_IED_detector_objects) then { Reezo_IED_detector_objects = Reezo_IED_detector_objects - [_attachedIED]; publicVariable "reezo_IED_detector_objects"; }; if (_attachedIED in reezo_IEDdetect_attachedIEDs) then { reezo_IEDdetect_attachedIEDs = reezo_IEDdetect_attachedIEDs - [_attachedIED]; publicVariable "reezo_IEDdetect_attachedIEDs"; }; if (_attachedIED in reezo_IEDdetect_beepers) then { reezo_IEDdetect_beepers = reezo_IEDdetect_beepers - [_attachedIED]; publicVariable "reezo_IEDdetect_beepers"; }; if (_object in reezo_IEDdetect_hostIEDs) then { reezo_IEDdetect_hostIEDs = reezo_IEDdetect_hostIEDs - [_object]; publicVariable "reezo_IEDdetect_hostIEDs"; }; if (reezo_IEDdetect_canFear == 1) then { reezo_IEDdetect_cursorTarget = 0; publicVariable "reezo_IEDdetect_cursorTarget"; reezo_IEDdetect_Targeters = []; publicVariable "reezo_IEDdetect_Targeters"; reezo_IEDdetect_canFear = 0; publicVariable "reezo_IEDdetect_canFear"; }; if (alive _attachedIED) then { deleteVehicle _attachedIED }; if (reezo_IEDdetect_debug) then { player globalChat "REEZO_IEDDETECT DEBUG: ATTACH COMPLETE" }; if (true) exitWith {};////////////////////////////////////////////////////////////////// // Function file for Armed Assault // Created by: Reezo of SR5 Tactical - www.sr5tactical.net // IED Detection and Disposal Scripts ////////////////////////////////////////////////////////////////// // INIT if (isDedicated) exitWith{}; // BEEPER SOUND while { true } do { { if (alive _x) then { _x say3D "IEDdetect_beep3" }; } forEach reezo_IEDdetect_beepers; sleep 2; }; if (true) exitWith {};////////////////////////////////////////////////////////////////// // Function file for Armed Assault // Created by: Reezo of SR5 Tactical - www.sr5tactical.net // IED Detection and Disposal Scripts ////////////////////////////////////////////////////////////////// private ["_soldier","_triggerman","_nearStuff"]; _soldier = _this select 0; if !(local _soldier) exitWith{}; if (_soldier in reezo_IEDdetect_Targeters) exitWith{}; if (!isMultiplayer && _soldier != player) exitWith{}; if !(_soldier in reezo_IEDdetect_Targeters) then { reezo_IEDdetect_Targeters = reezo_IEDdetect_Targeters + [_soldier]; publicVariable "reezo_IEDdetect_Targeters"; }; _triggerman = _this select 1; while {alive _soldier && alive _triggerman && reezo_IEDdetect_canFear == 1} do { if (reezo_IEDdetect_debug) then { hint Format["CursorTarget\nFEAR:\n\n%1",reezo_IEDdetect_cursorTarget]; }; if (cursorTarget == _triggerman ) then { if (reezo_IEDdetect_cursorTarget > 4) then { reezo_IEDdetect_cursorTarget = 4; } else { reezo_IEDdetect_cursorTarget = reezo_IEDdetect_cursorTarget + 1; }; publicVariable "reezo_IEDdetect_cursorTarget"; } else { if (reezo_IEDdetect_cursorTarget < -4) then { reezo_IEDdetect_cursorTarget = -4; } else { reezo_IEDdetect_cursorTarget = reezo_IEDdetect_cursorTarget - 1; }; publicVariable "reezo_IEDdetect_cursorTarget"; }; sleep 1; }; reezo_IEDdetect_Targeters = reezo_IEDdetect_Targeters - [_soldier]; publicVariable "reezo_IEDdetect_Targeters"; if (reezo_IEDdetect_debug) then { _soldier globalChat "IEDDETECT_CURSORTARGET.SQF COMPLETE" }; if (true) exitWith{};////////////////////////////////////////////////////////////////// // Function file for Armed Assault // Created by: Reezo of SR5 Tactical - www.sr5tactical.net // IED Detection and Disposal Scripts ////////////////////////////////////////////////////////////////// // INIT private ["_object","_title","_text","_EOD","_id","_attachedIED"]; _object = _this select 0; _EOD = _this select 1; _id = _this select 2; _attachedIED = (_this select 3) select 0; if !(local _EOD) exitWith {}; if (!alive _attachedIED) exitWith {_object removeAction _id}; if !(_EOD in reezo_IEDdetect_EODs) exitWith { _title = "UNABLE

"; _text = "You do not have the required expertise"; hint parseText (_title + _text) }; _EOD playMove "AinvPknlMstpSnonWrflDnon_medic3"; sleep 1; _EOD playMove "amovpknlmstpslowwrfldnon_amovpercmstpsraswrfldnon"; sleep 3; if (alive _attachedIED) then { detach _attachedIED; _attachedIED setPos (getPos _EOD); _object removeAction _id; reezo_IEDdetect_hostIEDs = reezo_IEDdetect_hostIEDs - [_object]; }; if (reezo_IEDdetect_debug) then { player globalChat "REEZO_IEDDETECT DEBUG: DETACH COMPLETE" }; if (true) exitWith {};////////////////////////////////////////////////////////////////// // Function file for Armed Assault // Created by: Reezo of SR5 Tactical - www.sr5tactical.net // IED Detection and Disposal Scripts ////////////////////////////////////////////////////////////////// // INIT private ["_detector","_range","_interval","_skill","_fakeRatio"]; if (count _this != 5) exitWith {hint "REEZO_IEDDETECT: WRONG PARAMETERS, QUITTING.."}; _detector = _this select 0; if (!local _detector) exitWith {}; if !(_detector isKindOf "Man") exitWith { hint "REEZO_IEDDETECT: DETECTOR IS NOT A UNIT, QUITTING.."}; waitUntil {reezo_IEDdetect_initComplete}; waitUntil {!(isNull _detector)}; waitUntil {_detector == _detector}; _range = _this select 1; _interval = _this select 2; _skill = _this select 3; _fakeRatio = _this select 4; if (_range < 5) then { _range = 5 }; if (_interval < 5) then { _interval = 5 }; //nul0 = [_detector,_range,_interval,_skill,_fakeRatio] execVM "common\server\IEDdetect\IEDdetect_respawn_detector.sqf"; nul0 = [_detector,_range,_interval,_skill,_fakeRatio] execVM "common\server\IEDdetect\IEDdetect.sqf"; if (reezo_IEDdetect_debug) then { player globalChat "REEZO_IEDDETECT DEBUG: DETECTOR.SQF COMPLETE" }; if (true) exitWith {};////////////////////////////////////////////////////////////////// // Function file for Armed Assault // Created by: Reezo of SR5 Tactical - www.sr5tactical.net // IED Detection and Disposal Scripts ////////////////////////////////////////////////////////////////// // INIT private ["_detector","_vehicle","_range","_interval","_skill","_fakeRatio","_title","_text"]; if (count _this != 5) exitWith {hint "REEZO_IEDDETECT_DETECTOR_VEHICLE: WRONG PARAMETERS, QUITTING.."}; _vehicle = _this select 0; if (_detector isKindOf "Man") exitWith { hint "REEZO_IEDDETECT: DETECTOR IS NOT A VEHICLE, QUITTING.."}; _range = _this select 1; _interval = _this select 2; _skill = _this select 3; _fakeRatio = _this select 4; waitUntil {!(isNull _vehicle)}; waitUntil {_vehicle == _vehicle}; waitUntil {reezo_IEDdetect_initComplete}; if (_range < 5) then { _range = 5 }; if (_interval < 5) then { _interval = 5 }; reezo_IEDdetect_EODvehicles = reezo_IEDdetect_EODvehicles + [_vehicle]; publicVariable "reezo_IEDdetect_EODvehicles"; while { true } do { while {isNull driver _vehicle} do { sleep (_interval * 2) }; if (!(isNull driver _vehicle) && alive _vehicle) then { _detector = driver _vehicle; nul0 = [_detector,_range,_interval,_skill,_fakeRatio,_vehicle] execVM "common\server\IEDdetect\IEDdetect_vehicle.sqf"; while {alive _vehicle && alive _detector && _detector == driver _vehicle} do { sleep (_interval); _detector = driver _vehicle;}; }; }; if (reezo_IEDdetect_debug) then { player globalChat "REEZO_IEDDETECT DEBUG: DETECTOR.SQF COMPLETE" }; if (true) exitWith {};////////////////////////////////////////////////////////////////// // Function file for Armed Assault // Created by: Reezo of SR5 Tactical - www.sr5tactical.net // IED Detection and Disposal Scripts ////////////////////////////////////////////////////////////////// // INIT if (!isServer) exitWith{}; reezo_IEDdetect_debug = false; //make TRUE to turn on debug messages publicVariable "reezo_IEDdetect_debug"; reezo_IEDdetect_busy = 0; publicVariable "reezo_IEDdetect_busy"; reezo_IED_detector_objects = []; publicVariable "reezo_IED_detector_objects"; reezo_IEDdetect_attachedIEDs = []; publicVariable "reezo_IEDdetect_attachedIEDs"; reezo_IEDdetect_hostIEDs = []; publicVariable "reezo_IEDdetect_hostIEDs"; reezo_IEDdetect_EODs = []; publicVariable "reezo_IEDdetect_EODs"; reezo_IEDdetect_beepers = []; publicVariable "reezo_IEDdetect_beepers"; reezo_IEDdetect_EODvehicles = []; publicVariable "reezo_IEDdetect_EODvehicles"; reezo_IEDdetect_cursorTarget = 0; publicVariable "reezo_IEDdetect_cursorTarget"; reezo_IEDdetect_Targeters = []; publicVariable "reezo_IEDdetect_Targeters"; reezo_IEDdetect_canFear = 0; publicVariable "reezo_IEDdetect_canFear"; reezo_IEDdetect_initComplete = true; publicVariable "reezo_IEDdetect_initComplete"; nul0 = [] execVM "common\server\IEDdetect\IEDdetect_beeper.sqf"; if (reezo_IEDdetect_debug) then { player globalChat "REEZO_IEDDETECT DEBUG: INIT COMPLETE" }; if (true) exitWith {};////////////////////////////////////////////////////////////////// // Function file for Armed Assault // Created by: Reezo of SR5 Tactical - www.sr5tactical.net // IED Detection and Disposal Scripts ////////////////////////////////////////////////////////////////// private ["_event","_IED","_b","_rnd"]; _display = _this select 0; _event = _this select 1; _control = _this select 2; _modulator = _this select 3; _IED = reezo_IEDdetect_activeIED; _EOD = reezo_IEDdetect_activeEOD; switch (_event) do { case "MouseButtonDown": { if (reezo_IEDdetect_reading mod 3 == 0) then { playsound "IEDdetect_click"; sleep 0.33; closedialog 0; waitUntil {!dialog}; cutRsc ["IEDdetect_10", "PLAIN", 0]; playsound "IEDdetect_beep2"; } else { playsound "IEDdetect_click"; sleep 0.33; closedialog 0; waitUntil {!dialog}; cutRsc ["IEDdetect_11", "PLAIN", 0]; sleep random 2; for [{_b = 24},{_b > 0},{_b = _b - 2}] do { _IED say3D "IEDdetect_Beep3"; sleep (_b / (15 + floor (random 3))); }; _rnd = random 1; if (_rnd < 0.4) then { "B_30mm_HE" createVehicle (getPos _IED) }; if (_rnd > 0.6) then { "Sh_125_HE" createVehicle (getPos _IED) } else { "Bo_GBU12_LGB" createVehicle (getPos _IED) }; }; }; default {}; }; Reezo_IED_detector_objects = Reezo_IED_detector_objects - [_IED]; deleteVehicle _IED; reezo_IEDdetect_injection = 0; publicVariable "reezo_IEDdetect_injection"; reezo_IEDdetect_cursorTarget = 0; publicVariable "reezo_IEDdetect_cursorTarget"; reezo_IEDdetect_Targeters = []; publicVariable "reezo_IEDdetect_Targeters"; reezo_IEDdetect_canFear = 0; publicVariable "reezo_IEDdetect_canFear"; if (reezo_IEDdetect_debug) then { player globalChat "REEZO_IEDDETECT DEBUG: INJECTION.SQF COMPLETED" }; if (true) exitWith {};////////////////////////////////////////////////////////////////// // Function file for Armed Assault // Created by: Reezo of SR5 Tactical - www.sr5tactical.net // IED Detection and Disposal Scripts ////////////////////////////////////////////////////////////////// // INIT private ["_IED","_EOD","_id","_ok"]; _IED = _this select 0; _EOD = _this select 1; _id = _this select 2; if (!local _EOD) exitWith {}; if (!alive _IED OR !alive _EOD) exitWith{}; if !(_EOD in reezo_IEDdetect_EODs) exitWith { _title = "UNABLE

"; _text = "You do not have the required expertise"; hint parseText (_title + _text) }; _IED removeAction _id; _ok = createDialog "IEDdetect_injector"; reezo_IEDdetect_injection = 1; publicVariable "reezo_IEDdetect_injection"; while { reezo_IEDdetect_injection == 1 && alive _IED && alive _EOD} do { reezo_IEDdetect_reading = floor (random 200); publicVariable "reezo_IEDdetect_reading"; (finddisplay 650) displayctrl 660 ctrlSetText format ["%1", reezo_IEDdetect_reading]; sleep 0.2; sleep random 3; }; deleteMarkerLocal "REEZOIED"; Reezo_IED_detector_objects = Reezo_IED_detector_objects - [_IED]; publicVariable "Reezo_IED_detector_objects"; if (_IED in reezo_IEDdetect_attachedIEDs) then { reezo_IEDdetect_attachedIEDs = reezo_IEDdetect_attachedIEDs - [_IED]; publicVariable "reezo_IEDdetect_attachedIEDs"; }; if (_IED in reezo_IEDdetect_beepers) then { reezo_IEDdetect_beepers = reezo_IEDdetect_beepers - [_IED]; publicVariable "reezo_IEDdetect_beepers"; }; if (reezo_IEDdetect_debug) then { player globalChat "REEZO_IEDDETECT DEBUG: MANUAL.SQF COMPLETE" }; if (true) exitWith {};////////////////////////////////////////////////////////////////// // Function file for Armed Assault // Created by: Reezo of SR5 Tactical - www.sr5tactical.net // IED Detection and Disposal Scripts ////////////////////////////////////////////////////////////////// // INIT private ["_object","_rnd","_beep","_detonate","_wait","_currentDamage","_proximity","_pressureType","_proxyMen","_proxyCars","_proxyTanks"]; if (!isServer) exitWith{}; if (count _this < 1 OR count _this > 3) exitWith {hint "IED_DETECT_PROXIMITY.SQF WRONG PARAMETERS, QUITTING.." }; _object = _this select 0; _beep = _this select 1; _pressureType = _this select 2; if (_pressureType == 2) then { _rnd = random 1; if (_rnd < 0.5) then { _pressureType = 0 } else { _pressureType = 1 }; }; waitUntil {!(isNull _object)}; waitUntil {_object == _object}; waitUntil {reezo_IEDdetect_initComplete}; Reezo_IED_detector_objects = Reezo_IED_detector_objects + [_object]; publicVariable "Reezo_IED_detector_objects"; // BEEPER VALUES if (_beep == 2) then { _rnd = random 1; if (_rnd > 0.5) then { _beep = 1 } else { _beep = 0 }; }; if (_beep == 1) then { reezo_IEDdetect_beepers = reezo_IEDdetect_beepers + [_object]; publicVariable "reezo_IEDdetect_beepers"; }; // MAIN LOOP _wait = true; _detonate = false; while { _wait } do { if (reezo_IEDdetect_debug) then { player globalChat "REEZO_IEDDETECT DEBUG: PROXIMITY MAIN LOOP" }; _proximity = []; _proxyCars = []; _proxyTanks = []; if (_pressureType == 1 && alive _object) then { _proxyCars = position _object nearObjects ["Car",(6 + random 2)]; _proxyTanks = position _object nearObjects ["Tank",(6 + random 2)]; _proximity = _proxyCars + _proxyTanks; }; if (_pressureType == 0 && alive _object) then { _proxyCars = position _object nearObjects ["Car",(6 + random 2)]; _proxyTanks = position _object nearObjects ["Tank",(6 + random 2)]; _proxyMen = position _object nearObjects ["Man",(2 + random 2)]; _proximity = _proxyMen + _proxyCars + _proxyTanks; }; if (count _proximity > 0) then { _detonate = true; _wait = false;}; if (damage _object != 0) then { _detonate = true; _wait = false; }; if (!alive _object) then { _wait = false }; if (_wait) then { sleep 3 }; }; if (_detonate) then { _rnd = random 1; _object say3D "IEDdetect_beep3"; sleep 0.2; _object say3D "IEDdetect_beep3"; sleep 0.2; _object say3D "IEDdetect_beep3"; sleep 0.33; _object say3D "IEDdetect_beep3"; sleep 0.33; _object say3D "IEDdetect_beep3"; sleep 1 + random 5; if (_rnd < 0.4) then { "B_30mm_HE" createVehicle (getPos _object) }; if (_rnd > 0.6) then { "Sh_125_HE" createVehicle (getPos _object) } else { "Bo_GBU12_LGB" createVehicle (getPos _object) }; }; if (_object in reezo_IED_detector_objects) then { reezo_IED_detector_objects = reezo_IED_detector_objects - [_object]; publicVariable "reezo_IED_detector_objects"; }; if (_object in reezo_IEDdetect_beepers) then { reezo_IEDdetect_beepers = reezo_IEDdetect_beepers - [_object]; publicVariable "reezo_IEDdetect_beepers"; }; if (reezo_IEDdetect_canFear == 1) then { reezo_IEDdetect_cursorTarget = 0; publicVariable "reezo_IEDdetect_cursorTarget"; reezo_IEDdetect_Targeters = []; publicVariable "reezo_IEDdetect_Targeters"; reezo_IEDdetect_canFear = 0; publicVariable "reezo_IEDdetect_canFear"; }; if (alive _object) then {deleteVehicle _object}; if (reezo_IEDdetect_debug) then { sleep 1; player globalChat "REEZO_IEDDETECT DEBUG: PROXIMITY COMPLETE"; sleep 1;}; if (true) exitWith {};////////////////////////////////////////////////////////////////// // Function file for Armed Assault // Created by: Reezo of SR5 Tactical - www.sr5tactical.net // IED Detection and Disposal Scripts ////////////////////////////////////////////////////////////////// // INIT private ["_soldier","_ambientGROUP","_objects","_vehicles","_proximityIED","_minNumber","_chance","_interval","_bomb","_IEDtype","_beep","_scanArea","_fearArea","_detArea","_typeRate","_enemySide","_rnd","_fate","_actualPos","_y","_k","_ambientRadius","_IEDskins","_posX","_posY","_posZ","_randomPos"]; if !(isServer) exitWith{}; waitUntil {reezo_IEDdetect_initComplete}; if (count _this != 6) exitWith{ hint "IEDDETECT_AMBIENTPROXYIEDS error: wrong parameters!" }; _center = _this select 0; _radius = _this select 1; _quantity = _this select 2; _chance = _this select 3; _beep = _this select 4; _typeRate = _this select 5; _IEDskins = ["Land_IED_v1_PMC","Land_IED_v2_PMC","Land_IED_v3_PMC","Land_IED_v4_PMC"]; //CHECK HOW MANY ROADS ARE IN THE AREA _nearRoads = []; _goodSpots = []; _nearRoads = (getMarkerPos _center) nearRoads _radius; if (reezo_IEDdetect_debug) then { _soldier globalChat "DEBUG IEDDETECT SCATTER: SPOTS ACQUIRED" }; //FIND SUITABLE SPOTS IN THE GIVEN AREA if (count _nearRoads > 0) then { for [{_y = 0},{_y < (count _nearRoads)},{_y = _y + 1}] do { _goodSpots = _goodSpots + [getPos (_nearRoads select _y)]; if (reezo_IEDdetect_debug) then { _soldier globalChat "DEBUG IEDDETECT SCATTER: GOOD SPOT FOUND (ON ROAD)"; hintSilent Format["GOOD SPOT:\n%1\n\nPOSITION:\n%2",(_nearRoads select _y),(getPos (_nearRoads select _y))]; sleep 0.05; }; }; } else { for [{_y = 0},{_y < _quantity},{_y = _y + 1}] do { _segno = random 1; if (_segno < 0.5) then { _posX = random _radius } else { _posX = -1 * (random _radius) }; _segno = random 1; if (_segno < 0.5) then { _posY = random _radius } else { _posY = -1 * (random _radius) }; _posX = _posX + ((getMarkerPos _center) select 0); _posY = _posY + ((getMarkerPos _center) select 1); _posZ = (getMarkerPos _center) select 2; _randomPos = [_posX,_posY,_posZ]; _goodSpots = _goodSpots + [_randomPos]; if (reezo_IEDdetect_debug) then { _soldier globalChat "DEBUG IEDDETECT SCATTER: GOOD SPOT FOUND (NOT ON ROAD)"; hintSilent Format["GOOD SPOT:\n\nPOSITION:\n%1",_randomPos]; sleep 0.05; }; }; }; _n = 0; // MAIN LOOP while { _n <= _quantity && count _goodSpots > 0} do { if (reezo_IEDdetect_debug) then { _soldier globalChat "DEBUG IEDDETECT SCATTER: START MAIN LOOP" }; //RANDOMIZE BASED ON CHANCE _fate = random 100; if (_fate < _chance) then { //RANDOMIZE A GOOD POSITION, AN IED TYPE AND REMOVE THAT LOCATION FROM THE AVAILABLE SPOTS _IEDtype = _IEDskins select (floor (random (count _IEDskins))); _IEDpos = _goodSpots select (floor (random (count _goodSpots))); _goodSpots = _goodSpots - [_IEDpos]; _n = _n + 1; //RANDOMIZE POSITION AROUND THE GOOD SPOT FOUND _rndX = 5.5 + random 1.5; _rndY = 5.5 + random 1.5; _segno = random 1; if (_segno < 0.5) then { _rndX = -1 * _rndX }; _segno = random 1; if (_segno < 0.5) then { _rndY = -1 * _rndY }; _IEDpos = [(_IEDpos select 0) + _rndX, (_IEDpos select 1) + _rndY, (_IEDpos select 2)]; _proximityIED = createVehicle [_IEDtype, _IEDpos, [], 0, "NONE"]; _proximityIED setDir (random 360); _rnd = random 100; if (_rnd < _typeRate) then { nul0 = [_proximityIED,_beep,0] execVM "common\server\IEDdetect\IEDdetect_proximity.sqf"; } else { nul0 = [_proximityIED,_beep,1] execVM "common\server\IEDdetect\IEDdetect_proximity.sqf"; }; if (reezo_IEDdetect_debug) then { hintSilent Format["IEDTYPE:\n%1\n\nIEDPOS:\n%2",_IEDtype,_IEDpos]; _soldier globalChat "DEBUG IEDDETECT SCATTER: PROXIMITY IED SPAWNED"; _debugProxyName = Format["DEBUG_PROXY_MARKER_%1",_n]; _debugMRK1 = createMarkerLocal[_debugProxyName,position _proximityIED]; _debugMRK1 setMarkerShapeLocal "ICON"; _debugMRK1 setMarkerTypeLocal "DOT"; _debugMRK1 setMarkerTextLocal "DEBUG: Proximity IED Scatter"; sleep 0.05; }; }; //END IF }; //END MAIN LOOP // EXIT if (reezo_IEDdetect_debug) then { _soldier globalChat "DEBUG IEDDETECT SCATTER: SCRIPT COMPLETE"; sleep 1; }; if (true) exitWith{};////////////////////////////////////////////////////////////////// // Function file for Armed Assault // Created by: Reezo of SR5 Tactical - www.sr5tactical.net // IED Detection and Disposal Scripts ////////////////////////////////////////////////////////////////// // INIT private ["_object","_id","_IED","_EOD","_rnd","_y","_nearstuff","_EMP"]; _object = _this select 0; _EOD = _this select 1; _id = _this select 2; _IED = (_this select 3) select 0; _EMP = true; if (!local _EOD) exitWith {}; playsound "IEDdetect_click"; sleep 0.2; _nearstuff = getPos reezo_IEDdetect_activeIED nearObjects 50; // TOO CLOSE for [{_y = 0},{_y < (count _nearstuff)},{_y = _y + 1}] do { if (side (_nearstuff select _y) == side reezo_IEDdetect_activeEOD) then { waitUntil {!dialog}; cutRsc ["IEDdetect_05", "PLAIN", 0]; playsound "IEDdetect_beep2"; _EMP = false; }; }; // TOO FAR if ((reezo_IEDdetect_activeEOD distance reezo_IEDdetect_activeIED) > 150) then { waitUntil {!dialog}; cutRsc ["IEDdetect_06", "PLAIN", 0]; playsound "IEDdetect_beep2"; _EMP = false; }; if (_EMP) then { _object removeAction _id }; if (alive reezo_IEDdetect_activeIED && _EMP) then { waitUntil {!dialog}; cutRsc ["IEDdetect_04", "PLAIN", 0]; playsound "IEDdetect_wave"; sleep 2.5; sleep random 1.5; _rnd = random 1; if (_rnd < 0.4) then { "B_30mm_HE" createVehicle (getPos _IED) }; if (_rnd > 0.6) then { "Sh_125_HE" createVehicle (getPos _IED) } else { "Bo_GBU12_LGB" createVehicle (getPos _IED)}; Reezo_IED_detector_objects = Reezo_IED_detector_objects - [reezo_IEDdetect_activeIED]; publicVariable "Reezo_IED_detector_objects"; deleteVehicle reezo_IEDdetect_activeIED; reezo_IEDdetect_cursorTarget = 0; publicVariable "reezo_IEDdetect_cursorTarget"; reezo_IEDdetect_Targeters = []; publicVariable "reezo_IEDdetect_Targeters"; reezo_IEDdetect_canFear = 0; publicVariable "reezo_IEDdetect_canFear"; }; if (reezo_IEDdetect_debug) then { player globalChat "IEDDETECT_DEBUG: REMOTEDET COMPLETE" }; if (true) exitWith {};////////////////////////////////////////////////////////////////// // Function file for Armed Assault // Created by: Reezo of SR5 Tactical - www.sr5tactical.net // IED Detection and Disposal Scripts ////////////////////////////////////////////////////////////////// //INIT if (!isServer) exitWith{}; private ["_triggerman","_scanDistance","_triggerDistance","_IEDhost","_enemySide","_armed","_nearUnits","_nearStuff","_nearTargets","_nearMen","_nearCars","_nearTanks","_nearTargetsMen","_nearTargetsCars","_nearTargetsTanks","_IED","_soldier","_y","_rnd","_trigGROUP","_posX","_posY","_escape"]; if (count _this != 6) exitWith{ hint "IEDdetect_triggerman error: wrong parameters!" }; waitUntil {reezo_IEDdetect_initComplete}; _triggerman = _this select 0; _IEDhost = _this select 1; _beep = _this select 2; _scanDistance = _this select 3; _triggerDistance = _this select 4; _enemySide = _this select 5; _armed = 0; _fearing = 0; _nearUnits = []; _nearTargets = []; _victimsCount = 0; //ATTACH BOMB TO OBJECT nul0 = [_IEDhost,_beep] execVM "common\server\IEDdetect\IEDdetect_attach.sqf"; waitUntil {_IEDhost in reezo_IEDdetect_hostIEDs}; //GET THE ACTUAL IED AND STORE IT INTO A VARIABLE _nearStuff = (getPos _IEDhost) nearObjects ["Explosive",10]; for [{_y = 0},{_y < (count _nearStuff)},{_y = _y + 1}] do { if ((_nearStuff select _y) in reezo_IEDdetect_attachedIEDs) then { _IED = _nearStuff select _y; }; }; //MAIN LOOP while {_armed != 2} do { //SEARCH FOR POTENTIAL VICTIMS AND DECIDE WHETHER TO TRIGGER THE BOMB OR NOT _nearTargetsMen = (getPos _IED) nearObjects ["Man",_triggerDistance]; _nearTargetsCars = (getPos _IED) nearObjects ["Car",_triggerDistance]; _nearTargetsTanks = (getPos _IED) nearObjects ["Tank",_triggerDistance]; _nearTargets = _nearTargetsMen + _nearTargetsCars + _nearTargetsTanks; _victimsCount = 0; for [{_y = 0},{_y < (count _nearTargets)},{_y = _y + 1}] do { _victim = _nearTargets select _y; if (side _victim == _enemySide && _triggerman knowsAbout _victim > 0.22) then { _victimsCount = _victimsCount + 1; }; }; _rnd = random 10; if (_rnd < _victimsCount) then { _armed = 1; _triggerman addRating -1000; reezo_IEDdetect_canFear = 1; publicVariable "reezo_IEDdetect_canFear"; if (reezo_IEDdetect_debug) then {_soldier globalChat "IEDDETECT_CARBOMB DEBUG: Armed"; sleep 1;}; }; //SEARCH FOR UNITS THAT CAN INSTILL FEAR IN THE TRIGGERMAN if (_armed == 1) then { _nearMen = (getPos _triggerman) nearObjects ["Man",_scanDistance]; _nearCars = (getPos _triggerman) nearObjects ["Car",_scanDistance]; _nearTanks = (getPos _triggerman) nearObjects ["Tank",_scanDistance]; _nearUnits = _nearMen + _nearCars + _nearTanks; for [{_y = 0},{_y < (count _nearUnits)},{_y = _y + 1}] do { _soldier = _nearUnits select _y; if (side _soldier == _enemySide) then { _fearing = 1; nul0 = [_soldier,_triggerman] execVM "common\server\IEDdetect\IEDdetect_cursorTarget.sqf"; } else { _fearing = 0; }; }; sleep 3; }; //CHECK FOR THE EFFECTS OF FEAR AND CAUSE IT IN THE TRIGGERMAN BY PAUSING THIS SCRIPT while {_fearing == 1 && alive _triggerman && reezo_IEDdetect_cursorTarget > -1 && reezo_IEDdetect_canFear == 1} do { sleep 1 }; //DURING THE FEAR PHASE, THE TRIGGERMAN OR THE BOMB MIGHT HAVE BEEN NEUTRALIZED if (!alive _IED OR !(_IED in reezo_IED_detector_objects) OR !alive _triggerman) then { _armed = 2; if (reezo_IEDdetect_debug) then { _soldier globalChat "IEDDETECT_CARBOMB DEBUG: armed=2"; sleep 1; }; }; //WITH NO FEAR, ALIVE AND READY, THE TRIGGERMAN DETONATES HIS IED if (_armed == 1 && _IED in reezo_IED_detector_objects && alive _triggerman && reezo_IEDdetect_cursorTarget < 1) then { _triggerman playmove "AmovPercMstpSsurWnonDnon"; _triggerman disableAI "ANIM"; _triggerman disableAI "MOVE"; sleep 0.1; _triggerman say "akbar"; sleep 1.4; //ONE LAST CHECK FOR THE REQUISITES TO MEET BEFORE EXPLOSION if (alive _triggerman && alive _IED && damage _triggerman < 0.8) then { _rnd = random 1; if (_rnd < 0.4) then { "B_30mm_HE" createVehicle (getPos _IEDhost) }; if (_rnd > 0.6) then { "Sh_125_HE" createVehicle (getPos _IEDhost) } else { "Bo_GBU12_LGB" createVehicle (getPos _IEDhost)}; reezo_IEDdetect_canFear = 0; publicVariable "reezo_IEDdetect_canFear"; _armed = 2; }; }; if (_armed != 2) then { sleep 3 }; }; //CLEAN UP IF IED IS NO LONGER PRESENT Reezo_IED_detector_objects = Reezo_IED_detector_objects - [_IED]; publicVariable "Reezo_IED_detector_objects"; reezo_IEDdetect_attachedIEDs = reezo_IEDdetect_attachedIEDs - [_IED]; publicVariable "reezo_IEDdetect_attachedIEDs"; reezo_IEDdetect_hostIEDs = reezo_IEDdetect_hostIEDs - [_IEDhost]; publicVariable "reezo_IEDdetect_hostIEDs"; deleteVehicle _IED; reezo_IEDdetect_cursorTarget = 0; publicVariable "reezo_IEDdetect_cursorTarget"; reezo_IEDdetect_Targeters = reezo_IEDdetect_Targeters - [_soldier]; publicVariable "reezo_IEDdetect_Targeters"; reezo_IEDdetect_canFear = 0; publicVariable "reezo_IEDdetect_canFear"; if (reezo_IEDdetect_debug) then { _soldier globalChat "IEDDETECT_CARBOMB DEBUG: IED Cleared from array"; sleep 1; }; //RANDOMIZE TRIGGERMAN REACTION IF HE IS STILL ALIVE _rnd = random 100; if (damage _triggerman < 0.9 && _rnd >= 25) then { _triggerman enableAI "ANIM"; _triggerman enableAI "MOVE"; _trigGROUP = createGroup EAST; [_triggerman] join _trigGROUP; _triggerman addRating -1000; if (_rnd >= 75) then { if (reezo_IEDdetect_debug) then { _soldier globalChat "DEBUG IEDDETECT_TRIGGERMAN FIGHTING" }; _triggerman addWeapon "AK_47_M"; _triggerman addMagazine "30Rnd_762x39_AK47"; _triggerman addMagazine "30Rnd_762x39_AK47"; _triggerman setCombatMode "RED"; _triggerman setBehaviour "COMBAT"; doGetout _triggerman; _triggerman setSkill (random 0.8); //_triggerman doTarget _soldier; //_triggerman doFire _soldier; }; if (_rnd > 0.25 && _rnd <= 0.75) then { if (reezo_IEDdetect_debug) then { _soldier globalChat "DEBUG IEDDETECT_TRIGGERMAN ESCAPING" }; _posX = 250 + random 250; _poxY = 250 + random 250; _segno = random 1; if (_segno < 0.5) then { _posX = -1 * _posX }; _segno = random 1; if (_segno < 0.5) then { _posX = -1 * _posY }; _escape = [_posX,_posY]; _trigGROUP addWaypoint [_escape, 0]; [_trigGROUP, 0] setWaypointType "MOVE"; [_trigGROUP, 0] setWaypointSpeed "FULL"; [_trigGROUP, 0] setWaypointBehaviour "AWARE"; }; }; //FINALLY GET THE FUCK OUT OF THIS SCRIPT if (reezo_IEDdetect_debug) then { _soldier globalChat "DEBUG IEDDETECT_TRIGGERMAN COMPLETE" }; if (true) exitWith{};////////////////////////////////////////////////////////////////// // Function file for Armed Assault // Created by: Reezo of SR5 Tactical - www.sr5tactical.net // IED Detection and Disposal Scripts ////////////////////////////////////////////////////////////////// if (!isServer) exitWith{}; private ["_center","_area","_civilians","_chance","_IEDtype","_beep","_scanArea","_fearArea","_detArea","_suicideRate","_enemySide","_vehicles","_triggerman","_rnd","_nearCars","_bomb"]; if (count _this != 9) exitWith{ hint "IEDdetect_triggerman_spawn error: wrong parameters!" }; waitUntil {reezo_IEDdetect_initComplete}; _name = _this select 0; _center = getPos _name; _area = (((triggerArea _name) select 0) + ((triggerArea _name) select 1) / 2); _chance = _this select 1; _IEDtype = _this select 2; _beep = _this select 3; _scanArea = _this select 4; _fearArea = _this select 5; _detArea = _this select 6; _suicideRate = _this select 7; _enemySide = _this select 8; if (reezo_IEDdetect_debug) then { player globalChat "DEBUG IEDDETECT_TRIGGERMAN_SPAWN: BEGIN SCRIPT" }; _rnd = random 100; if (_rnd > _chance) exitWith{}; _civilians = []; _nearPeople = _center nearObjects ["Man",_area]; for [{_y = 0},{_y < (count _nearPeople)},{_y = _y + 1}] do { if (side (_nearPeople select _y) == CIVILIAN) then { _civilians = _civilians + [_nearPeople select _y]; }; }; _triggerman = (_civilians select (floor (random (count _civilians)))); if (reezo_IEDdetect_debug) then { player globalChat "DEBUG IEDDETECT_TRIGGERMAN_SPAWN: TRIGGERMAN FOUND" }; _rnd = random 100; _nearCars = (getPos _triggerman) nearObjects [_IEDtype,_scanArea]; _vehicles = []; if (_rnd < _suicideRate && count _nearCars > 0) then { for [{_y = 0},{_y < (count _nearCars)},{_y = _y + 1}] do { if !(side (_nearCars select _y) == _enemySide) then { if (isNull driver (_nearCars select _y) && !(isEngineOn (_nearCars select _y))) then { _vehicles = _vehicles + [_nearCars select _y]; }; }; }; _bomb = (_vehicles select (floor (random (count _vehicles)))); if (reezo_IEDdetect_debug) then { player globalChat "DEBUG IEDDETECT_TRIGGERMAN_SPAWN: BOMB IS OBJECT" }; } else { _bomb = _triggerman; if (reezo_IEDdetect_debug) then { player globalChat "DEBUG IEDDETECT_TRIGGERMAN_SPAWN: BOMB IS TRIGGERMAN" }; }; nul0 = [_triggerman,_bomb,_beep,_fearArea,_detArea,_enemySide] execVM "common\server\IEDdetect\IEDdetect_triggerman.sqf"; if (reezo_IEDdetect_debug) then { player globalChat "IEDDETECT_TRIGGERMAN_SPAWN COMPLETE" }; if (true) exitWith{};////////////////////////////////////////////////////////////////// // Function file for Armed Assault // Created by: Reezo of SR5 Tactical - www.sr5tactical.net // IED Detection and Disposal Scripts ////////////////////////////////////////////////////////////////// // INIT private ["_detector","_range","_interval","_skill","_fakeRatio","_vehicle","_near","_nearCount","_IEDmarker","_rnd","_posX","_posY","_sign","_y","_h","_iedMarkename","_createvarname","_numberMarker","_action_reezo_IEDdetect_remoteDet","_action_reezo_IEDdetect_manualDefuse","_lapse","_nearHosts","_thisHost","_action_reezo_IEDdetect_detach","_fakeIED"]; _detector = _this select 0; _range = _this select 1; _interval = _this select 2; _skill = _this select 3; _fakeRatio = _this select 4; _vehicle = _this select 5; if !(local _detector) exitWith {}; if (damage _vehicle > 0.75) exitWith{}; waitUntil {reezo_IEDdetect_initComplete}; reezo_IEDdetect_EODs = reezo_IEDdetect_EODs + [_detector]; publicVariable "reezo_IEDdetect_EODs"; waitUntil {!dialog}; cutRsc ["IEDdetect_13", "PLAIN", 0]; playsound "IEDdetect_beep2"; // MAIN SCAN LOOP while {alive _detector && alive _vehicle && driver _vehicle == _detector} do { if (reezo_IEDdetect_debug) then { player globalChat "NOW RUNNING: MAIN SCAN LOOP" }; _detector = driver _vehicle; _fakeIED = 0; if !(_detector in reezo_IEDdetect_EODs && driver _vehicle == _detector) then { reezo_IEDdetect_EODs = reezo_IEDdetect_EODs + [_detector]; publicVariable "reezo_IEDdetect_EODs"; }; while {count reezo_IED_detector_objects == 0} do { sleep (_interval * 2) }; if (reezo_IEDdetect_busy == 0) then { _near = (getPos _vehicle) nearObjects (_range - ((speed _vehicle) * 1.25)); _nearCount = count _near; if (_nearCount > 50) then {_nearCount = 50}; // CASE 1. FAKE IED DETECTED (radio interferences or whatever gizmo might trigger it) _rnd = random 100; if (_rnd < _fakeRatio && reezo_IEDdetect_busy == 0 && _nearCount > 5 && _detector == driver _vehicle) then { if (reezo_IEDdetect_debug) then { player globalChat "NOW RUNNING: FAKE IED CODE" }; // Script goes busy reezo_IEDdetect_busy = 1; publicVariable "reezo_IEDdetect_busy"; _fakeIED = 1; // ACQUIRE IED AND BROADCAST, adding it to the "Found IEDs" array reezo_IEDdetect_activeIED = _near select (floor (random _nearCount)); publicVariable "reezo_IEDdetect_activeIED"; reezo_IEDdetect_activeEOD = _detector; publicVariable "reezo_IEDdetect_activeEOD"; // Scanner notification (Scanning..) waitUntil {!dialog}; cutRsc ["IEDdetect_01", "PLAIN", 0]; playsound "IEDdetect_beep"; sleep 1; playsound "IEDdetect_beep"; sleep 1; playsound "IEDdetect_beep"; sleep 1; sleep 2; //MARKER PLACEMENT (approximate) deleteMarkerLocal "REEZOIED"; deleteMarkerLocal _iedMarkename; sleep 0.1; _rnd = random _range; _sign = random 1; if (_sign < 0.5) then { _rnd = -1 * _rnd }; _posX = (getPos (_detector) select 0) + _rnd; _rnd = random _range; _sign = random 1; if (_sign < 0.5) then { _rnd = -1 * _rnd }; _posY = (getPos (_detector) select 1) + _rnd; // GENERATE NAME NOT IN USE GLOBALLY _iedMarkename = "REEZOIED"; _numberMarker = 0; if (isnil ("REEZOIED")) then {_iedMarkename="REEZOIED"} else { _createvarname = true; while {_createvarname} do { _iedMarkename = format["REEZOIED_%1",_numberMarker]; if (isnil ("_iedMarkename")) then { _createvarname = false; } else { _numberMarker = _numberMarker+ 1; }; }; }; _IEDmarker = createMarkerLocal[_iedMarkename,[_posX,_posY]]; _IEDmarker setMarkerShape "ICON"; _IEDmarker setMarkerType "WARNING"; _IEDmarker setMarkerColor "colorRed"; _IEDmarker setMarkerText "IED Approx. Position"; _IEDmarker setMarkerSize [.50, .50]; // Report the fake IED waitUntil {!dialog}; cutRsc ["IEDdetect_02", "PLAIN", 0]; playsound "IEDdetect_beep2"; sleep 15 + floor (random 90); // After some time..declare the IED fake waitUntil {!dialog}; cutRsc ["IEDdetect_07", "PLAIN", 0]; playsound "IEDdetect_beep2"; // Cleaning deleteMarkerLocal "REEZOIED"; deleteMarkerLocal _iedMarkename; }; if (_fakeIED == 0 && _detector == driver _vehicle && alive _detector) then { for [{_y = 0},{_y < _nearCount},{_y = _y + 1}] do { // CASE 2. REAL IED DETECTED if ((_near select _y) in reezo_IED_detector_objects && _detector == driver _vehicle) then { if (reezo_IEDdetect_debug) then { player globalChat "NOW RUNNING: REAL IED CODE" }; sleep 1; // Script goes busy reezo_IEDdetect_busy = 1; publicVariable "reezo_IEDdetect_busy"; // ACQUIRE IED AND BROADCAST, adding it to the "Found IEDs" array reezo_IEDdetect_activeIED = _near select _y; publicVariable "reezo_IEDdetect_activeIED"; reezo_IEDdetect_activeEOD = _detector; publicVariable "reezo_IEDdetect_activeEOD"; if (reezo_IEDdetect_debug) then { hint Format["Array:\n\n%1\n\nActiveIED:\n\n%2\n\nActiveEOD:\n\n%3",reezo_IED_detector_objects,reezo_IEDdetect_activeIED, reezo_IEDdetect_activeEOD]; sleep 1; }; // Scanner notification (Scanning..) waitUntil {!dialog}; cutRsc ["IEDdetect_01", "PLAIN", 0]; playsound "IEDdetect_beep"; sleep 1; playsound "IEDdetect_beep"; sleep 1; playsound "IEDdetect_beep"; sleep 1; sleep 2; //MARKER PLACEMENT (approximate) deleteMarkerLocal "REEZOIED"; deleteMarkerLocal _iedMarkename; sleep 0.1; _rnd = random 5; _sign = random 1; if (_sign < 0.5) then { _rnd = -1 * _rnd }; _posX = (getPos (reezo_IEDdetect_activeIED) select 0) + _rnd; _rnd = random 5; _sign = random 1; if (_sign < 0.5) then { _rnd = -1 * _rnd }; _posY = (getPos (reezo_IEDdetect_activeIED) select 1) + _rnd; // GENERATE NAME NOT IN USE GLOBALLY _iedMarkename = "REEZOIED"; _numberMarker = 0; if (isnil ("REEZOIED")) then {_iedMarkename="REEZOIED"} else { _createvarname = true; while {_createvarname} do { _iedMarkename = format["REEZOIED_%1",_numberMarker]; if (isnil ("_iedMarkename")) then { _createvarname = false; } else { _numberMarker = _numberMarker+ 1; }; }; }; _IEDmarker = createMarkerLocal[_iedMarkename,[_posX,_posY]]; _IEDmarker setMarkerShape "ICON"; _IEDmarker setMarkerType "WARNING"; _IEDmarker setMarkerColor "colorRed"; _IEDmarker setMarkerText "IED Approx. Position"; _IEDmarker setMarkerSize [.50, .50]; // Notify the IED found, add disarm actions waitUntil {!dialog}; cutRsc ["IEDdetect_02", "PLAIN", 0]; playsound "IEDdetect_beep2"; reezo_IEDdetect_activeIED removeAction _action_reezo_IEDdetect_manualDefuse; _action_reezo_IEDdetect_manualDefuse = reezo_IEDdetect_activeIED addAction [''+"Defuse Bomb"+'', "common\server\IEDdetect\IEDdetect_manualDefuse.sqf", [], 0, false, true, "",""]; //check if IED is attached to something and if it is, place a Detach action on it if (reezo_IEDdetect_activeIED in reezo_IEDdetect_attachedIEDs) then { _nearHosts = ((getPos reezo_IEDdetect_activeIED) nearObjects 3) - [reezo_IEDdetect_activeIED]; for [{_h= 0},{_h < (count _nearhosts)},{_h = _h + 1}] do { _thisHost = _nearHosts select _h; if (_thisHost in reezo_IEDdetect_hostIEDs) then { _action_reezo_IEDdetect_detach = _thisHost addAction [''+"Detach IED"+'', "common\server\IEDdetect\IEDdetect_detach.sqf", [reezo_IEDdetect_activeIED], 0, false, true, "",""]; }; }; }; // Remote Det possibility _rnd = random 100; if (_rnd < _skill) then { sleep 4; waitUntil {!dialog}; cutRsc ["IEDdetect_03", "PLAIN", 0]; playsound "IEDdetect_beep2"; _vehicle removeAction _action_reezo_IEDdetect_remoteDet; _action_reezo_IEDdetect_remoteDet = _vehicle addAction [''+"Remotely Detonate Bomb"+'', "common\server\IEDdetect\IEDdetect_remoteDet.sqf", [reezo_IEDdetect_activeIED], 0, false, true, "",""]; }; }; // END IF // MAIN WAIT LOOP _lapse = 1; while { _detector == driver _vehicle && reezo_IEDdetect_busy == 1 && _lapse < 36 && alive reezo_IEDdetect_activeIED && alive reezo_IEDdetect_activeEOD && _vehicle distance reezo_IEDdetect_activeEOD < 300} do { // update IED marker if it moved in the meantime if (speed reezo_IEDdetect_activeIED != 0) then { _rnd = random 5; _sign = random 1; if (_sign < 0.5) then { _rnd = -1 * _rnd }; _posX = (getPos (reezo_IEDdetect_activeIED) select 0) + _rnd; _rnd = random 5; _sign = random 1; if (_sign < 0.5) then { _rnd = -1 * _rnd }; _posY = (getPos (reezo_IEDdetect_activeIED) select 1) + _rnd; _iedMarkename setMarkerPos [_posX, _posY]; }; sleep 5; _lapse = _lapse + 1; }; if (!alive _vehicle OR !alive reezo_IEDdetect_activeIED OR _detector != driver _vehicle) then { reezo_IEDdetect_activeIED removeAction _action_reezo_IEDdetect_manualDefuse; _vehicle removeAction _action_reezo_IEDdetect_remoteDet; }; deleteMarkerLocal "REEZOIED"; deleteMarkerLocal _iedMarkename; //reezo_IEDdetect_activeIED = _detector; //publicVariable "reezo_IEDdetect_activeIED"; //reezo_IEDdetect_activeEOD = _detector; //publicVariable "reezo_IEDdetect_activeEOD"; }; // END FOR }; //END IF FAKEIED == 0 reezo_IEDdetect_busy = 0; publicVariable "reezo_IEDdetect_busy"; reezo_IEDdetect_EODs = reezo_IEDdetect_EODs - [_detector]; publicVariable "reezo_IEDdetect_EODs"; }; // END IF IEDDETECT_BUSY == 0 sleep _interval; }; // END WHILE reezo_IEDdetect_busy = 0; publicVariable "reezo_IEDdetect_busy"; reezo_IEDdetect_EODs = reezo_IEDdetect_EODs - [_detector]; publicVariable "reezo_IEDdetect_EODs"; if (reezo_IEDdetect_debug) then {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4ѩزVj J(zVQSa?{k"W?\l$W u0]hf;6t;vHE6AELli ljx Pa* B-հk_TE]jXG/7 =%FŪhТ*j !W5l6>QEA@IW[fNO- X2_,$6!D\ j*U@ɪ@U0(5 Xl>A.-ߢ~Z-EZE$O7^Y{u$$eK4r'#$bŁ^+ 2PFPru"yn,V2#Gwz^I/kx@-vACL,PՠC6= !6X`uV4j [*!9/%оiS#Q,j0xnL/5 ԨXFjŪ+DFU5UEP '(֢ +EBX\{j)ܑZP7Z8TLdժc2UkVUfaK+haŖ@0UrV<숑ҹgxt+;6Txޫ/r;",ڒINu)k !p * m lHw,, #=ܝu8pZp8^SӯV h3֪ *j V(jbb( 黷p=I_4JW:B,9b ʤc Cde5ݷsa+Bqէ_L~ݏuq۷B*[i1h'V HAIjMQ%Ն+cQh{HjS$y+ D㯵JQ V)#1 bU,"jX(b- 1wE#2Z =ę 0,aXXWvJ VFӕ])[ )$"FU, 9˶m5z[A"pP۷M0$Gih$&uQ*nbuxtW3R2XwJuaHر! ޭPvIdAiiקl1juUEMchD  Pi[K=[Ƅ&[@_PzJC eV+mER$^E4H` ZJm[.Nw-NB &0)? x5TUTw+hUv^Ƿ(ŷ4b!gI"p<u0~YR$8R?@$Kh5$U$ @B;X#\S/ghY (6f΁(}mHj$$^l[0I1aaiN 9F4vɇB"p"08 pp?@fH!-W ozU4qbYPLj (%RJf6tP).[Ɠ[|o'l4_AB ~g|,IZM/k*gVA+BQQlDl_5?UXՇ*A bP{*j 0R`"H ? ISn> #`,f1 =GkV{ @Z63 D_OƆt`lm/->) "Vm rprivate ["_PGroup","_WCTime","_BCTime"]; _PGroup = group pilotController; _WCTime = time; _BCTime = time; while { true } do { call westVehicleChecker; if (heliRC == 1) then { call pilotAI; }; call quickCleanup; call longCleanup; if (livesLeft == 0 && time > 30) then { if (nearestPlayers(CENTERPOS,AORADIUS,true,"count") == 0) then { endMission "LOSER"; }; }; sleep 0.1; }; createIntel = { private ["_i","_sign","_sign2","_radius","_cache","_pos","_mkr","_range"]; _cache = _this; _i = 0; while{ (getMarkerPos format["%1intel%2", _cache, _i] select 0) != 0}do{ _i = _i + 1; }; _sign = 1; if (random 100 > 50) then { _sign = -1; }; _sign2 = 1; if (random 100 > 50) then { _sign2 = -1; }; _radius = intelRadius - _i*50; if (_radius < 50) then { _radius = 50; }; _pos = [ (getPosATL _cache select 0) + _sign *(random _radius), (getPosATL _cache select 1) + _sign2*(random _radius) ]; _mkr = createMarker[format["%1intel%2", _cache, _i], _pos]; _mkr setMarkerType intelMarkerType; _range = round sqrt(_radius^2*2); _range = _range - (_range % 50); _mkr setMarkerText format["%1m", _range]; _mkr setMarkerColor "ColorRed"; _mkr setMarkerSize [0.5,0.5]; }; westVehicleChecker = { private ["_vcl","_pos","_range","_driver","_plrs","_str"]; if (!alive MHQ && startLocation == MHQ) exitWith { _vcl = createVehicle [MHQTYPE, spawnPos, [], 0, "None"]; _vcl setVehicleInit format["this setVehicleVarName ""%1""; %1 = this;", "MHQ"]; processInitCommands; HQ setDir (getDir vehicleServicePoint + 90); _pos = vehicleServicePoint modelToWorld [10,0,0]; _pos set [2,0]; HQ setPosATL _pos; }; if (startLocation != HQ) exitWith {}; _pos = startLocation modelToWorld [3,15,0]; _pos set [2,0]; if (helipad distance _pos > 1) then { helipad setPosATL _pos; helipad setDir (getDir startLocation - 90); }; _pos = startLocation modelToWorld [0,-10,0]; _pos set [2,0]; if (vehicleServicePoint distance _pos > 1) then { vehicleServicePoint setPosATL _pos; vehicleServicePoint setDir (getDir startLocation - 90); }; _pos = startLocation modelToWorld [6,-3,0]; _pos set [2,0]; if (fieldHospital distance _pos > 1) then { fieldHospital setPosATL _pos; fieldHospital setDir (getDir startLocation); }; _pos = startLocation modelToWorld [6,4,0]; _pos set [2,0]; if (mhqbox distance _pos > 1) then { mhqbox setPosATL _pos; mhqbox setDir (getDir startLocation); }; for "_i" from 0 to (count westVehicleStrings - 1) do { _str = westVehicleStrings select _i; // isNil _str check if the vehicle is undefined // note that, _str does NOT get wrapped in quotes because _str contains the vehicle name // and we are checking for the presence of the vehicle, I assume _str whill always be a valid string if (isNil _str) then { _i call resetWestVehicle; } else { _vcl = call compile _str; // _vcl should not be NIL here .... due to ( isNil _str) protecting us // but it could be anything, so ... check its an object if (typeName _vcl=="OBJECT") then { if ( isNull _vcl) then { _i call resetWestVehicle; } else { if (!alive _vcl) then { _i call resetWestVehicle; } else { scopeName "main"; _range = 400; if (typeOf _vcl == ATVTYPE) then { _range = 100; }; if (typeOf _vcl == HELITYPE && heliRC == 1) exitWith { breakTo "main"; }; _plrs = nearestPlayers(getPosATL _vcl,SPAWNRANGE,false,"array"); if (alive _vcl && !arrCanSee(_plrs,_vcl,45,_range) && _vcl distance startLocation > 100) then { _driver = driver _vcl; _gunner = gunner _vcl; if (!isNull _driver || !isNull _gunner) then { if (alive _driver || alive _gunner) exitWith { breakTo "main"; }; }; { moveOut _x; } forEach (crew _vcl); _i call resetWestVehicle; }; }; }; }; }; sleep 0.01; }; }; // returns one specific vehicle or re-creates it at the start position resetWestVehicle = { private ["_vcl","_str","_objs","_type","_bool","_pos","_dir","_id","_i"]; _i = _this; _str = westVehicleStrings select _i; if (_i > 10 || _i == -1) exitWith { }; //only return listed vehicles, but not MHQ _id = _i % 6; _pos = startLocation modelToWorld [-10,-10+_id*6,0]; _dir = getDir startLocation - 90; _type = if (_id % 2 == 1) then { CAR1TYPE } else { CAR2TYPE }; if (_i >= 6) then { _id = _id + 1; _type = ATVTYPE; _pos = startLocation modelToWorld [-10,-7+_id*6,0]; }; if (_i == 10) then { _type = HELITYPE; _pos = getPosATL helipad; _dir = getDir helipad; if (_pos distance startLocation > 100) exitWith {}; //avoid racing condition, where helipad is still at spawnPos }; _pos set [2,0]; _bool = isNil _str; _vcl = call compile _str; if !_bool then { _bool = isNull _vcl || !alive _vcl; }; if _bool then { _objs = nearestObjects[_pos,["LandVehicle","Air","CraterLong"],20]; if (count _objs > 0) then { { if (!(_x isKindOf "AllVehicles") || !alive _x) then { deleteVehicle _x; }; } forEach _objs; }; _vcl = createVehicle [_type, spawnPos, [], 0, "None"]; _vcl setVehicleInit format["this setVehicleVarName ""%1""; %1 = this;", _str]; _vcl setDir _dir; _vcl setPosATL _pos; if (_i < 6 || _i == 10) then { _vcl call setVclAmmoCargo; }; processInitCommands; [player,_vcl,"loc",rSPAWN,_vcl,{ _this call addActionLock; }] call RE; } else { _vcl call vehicleService; _vcl engineOn false; _vcl setDir _dir; _vcl setPosATL _pos; }; }; setWeaponCargo = { private ["_vci","_wep","_num","_cargo","_arr1","_arr2","_count","_id"]; _vcl = _this select 0; _wep = _this select 1; _num = 0; _cargo = getWeaponCargo _vcl; _arr1 = _cargo select 0; _id = _arr1 find _wep; if (_id == -1) exitWith {}; _arr1 set[_id, str _wep]; _arr2 = (_cargo select 1); _arr2 set[_id, 0]; _cargo = [_arr1,_arr2]; _count = count _arr2; call compile format[' _vcl setVehicleInit " clearWeaponCargo this; for ""_i"" from 0 to (%2 - 1) do { _wep = (%1 select 0) select _i; _num = (%1 select 1) select _i; this addWeaponCargo [_wep,_num]; }; "; processInitCommands; ', _cargo, _count]; }; vehicleService = { _this call setVclAmmoCargo; processInitCommands; }; setVclAmmoCargo = { _this setVehicleInit ' this setVehicleAmmo 1; this setFuel 1; this setDamage 0; clearWeaponCargo this; clearMagazineCargo this; { this addMagazineCargo [_x select 0, _x select 1]; } forEach humvMagazines; if (player in crew this) then { titleText["Vehicle serviced", "PLAIN DOWN"]; }; '; }; addActionLock = { private "_actionIndex"; _actionIndex = _this addAction ["Lock","common\client\actions\noScript.sqf",' _this select 0 lock true; _this select 0 removeAction (_this select 2); _this select 0 call addActionUnlock; ',1,false,true,"","isAdmin"]; }; addActionUnlock = { private "_actionIndex"; _actionIndex = _this addAction ["Unlock","common\client\actions\noScript.sqf",' _this select 0 lock false; _this select 0 removeAction (_this select 2); _this select 0 call addActionLock; ',1,false,true,"","isAdmin"]; }; //15th MEU Zargabad Insurgency config written by Cytreen Spiegel. Adapted from tfor. tfor_artitype = "M119_US_EP1"; tfor_ammobox = "USVehicleBox_EP1"; // <- the thing at base tfor_pilots = ["US_Soldier_Pilot_EP1","US_Pilot_Light_EP1","CZ_Soldier_Pilot_EP1","BAF_Pilot_MTP"]; tfor_crewmen = ["US_Soldier_Crew_EP1","BAF_crewman_MTP"]; tfor_sniper = ["US_Soldier_Sniper_EP1","CZ_Soldier_Sniper_EP1","BAF_Soldier_Sniper_MTP","ACE_USMC_SoldierS_Sniper_D"]; tfor_commanders = ["US_Soldier_Officer_EP1","BAF_Soldier_Officer_MTP","ACE_USMC_Soldier_Officer_D"]; tfor_choppers_can_lift = ["CH_47F_EP1","CH_47F_BAF","MV22"]; tfor_rallypoint_type = "Misc_Backpackheap_EP1"; tfor_mobileuavterminals = ["HMMWV_M1035_DES_EP1"]; // enter one of these vehicles and dismount again to access UAV tfor_vehicles_canload_ammo = ["MtvrReammo_DES_EP1","UH60M_EP1","BAF_Merlin_HC3_D"]; tfor_loadable_boxtype = "USBasicWeapons_EP1";// Universal Crate Filler 2.0 // by Tophe of �stg�ta Ops // Usage: // nul = [this] execVM "crateFiller.sqf" // // Optional settings: // nul = [this,side(west,east,all),game(all,arma,oa,baf,pmc,user),refill(true/false),weapons(amount),magazines(amount),equipment(amount)] execVM "crateFiller.sqf" // // Default values: // nul = [this,"west","all",false,30,75,30] execVM "crateFiller.sqf" // Set variables _box = _this select 0; _side = if (count _this > 1) then {_this select 1} else {"west"}; _game = if (count _this > 2) then {_this select 2} else {"all"}; _refill = if (count _this > 3) then {_this select 3} else {false}; _amountw = if (count _this > 4) then {_this select 4} else {30}; _amountm = if (count _this > 5) then {_this select 5} else {75}; _amounte = if (count _this > 6) then {_this select 6} else {30}; _run = true; _west = false; _east = false; _arma = false; _oa = false; _baf = false; _pmc = false; _ace = false; _user = false; // Check variables //hint format ["%1", typename _side]; if !(typename _side == "STRING") then {hint "Universal Box Filler:\n Side setting must be West/East/All \n \n It is now changed to West \n Set it in the map editor"; _side = "west"}; if !(typename _game == "STRING") then {hint "Universal Box Filler:\n Game setting must be all/arma/oa/baf/pmc/ace/user \n \n It is now changed to All \n Set it in the map editor"; _side = "west"}; if !(_side == "west" or _side == "east" or _side == "all") then {hint "Universal Box Filler:\n Side setting must be West/East/All \n \n It is now changed to West \n Set it in the map editor"; _side = "west"}; if !(_game == "arma" or _game == "oa" or _game == "all" or _game == "baf" or _game == "pmc" or _game == "ace" or _game == "user") then {hint "Universal Box Filler:\n Game setting must be all/arma/ao/baf/pmc/user\n \n It is now changed to All \n Set it in the map editor";_game = "all"}; if !(typename _refill == "BOOL") then {hint "Universal Box Filler:\n Refill must be set to True/False \n \n It is now changed to False\n Set it in the map editor";_refill = false}; if !(typename _amountw == "SCALAR") then {hint "Universal Box Filler:\n Weapon amount must be a number \n \n It is now changed to 30\n Set it in the map editor"; _amountw = 30}; if !(typename _amountm == "SCALAR") then {hint "Universal Box Filler:\n Magazine amount must be a number \n \n It is now changed to 75\n Set it in the map editor"; _amountw = 75}; if !(typename _amounte == "SCALAR") then {hint "Universal Box Filler:\n Equipment amount must be a number \n \n It is now changed to 30\n Set it in the map editor"; _amountw = 30}; // Debug //hint format["Side: %1, Game: %2, Refill: %3, w: %4, m: %5, e: %6",_side, _game, _refill, _amountw, _amountm, _amounte]; //hint format["Side: %1, Game: %2, Refill: %3, w: %4, m: %5, e: %6",_side, _game, _refill, _amountw, _amountm, _amounte]; if (_side == "west" or _side == "all") then {_west = true}; if (_side == "east" or _side == "all") then {_east = true}; if (_game == "arma" or _game == "all") then {_arma = true}; if (_game == "oa" or _game == "all") then {_oa = true}; if (_game == "oa" or _game == "all" or _game == "baf" ) then {_baf = true}; if (_game == "oa" or _game == "all" or _game == "pmc" ) then {_pmc = true}; if (_game == "ace" ) then {_ace = true}; if (_game == "user" or _game == "all" or _game == "pmc") then {_user = true}; //// WEAPON-ARRAYS //// // User Defined Arrays, activated when 'game' option is set to 'user' _user_weapons_west = ["ACE_YardAge450","ACE_SpottingScope","ACE_P226","ACE_USPSD","ACE_USP","ACE_SpareBarrel","m14_ep1","BAF_L86A2_ACOG","ACE_HK417_Shortdot","ACE_HK417_micro","ACE_HK417_leupold","ACE_HK416_D14_TWS","ACE_HK416_D14_SD","ACE_HK416_D14_COMPM3_M320","ACE_HK416_D14_COMPM3","ACE_HK416_D14_ACOG_PVS14","ACE_HK416_D14","ACE_HK416_D10_SD","ACE_HK416_D10_M320","ACE_HK416_D10_Holo","ACE_HK416_D10_COMPM3_SD","ACE_HK416_D10_COMPM3","ACE_HK416_D10_AIM","ACE_HK416_D10","ACE_m16a2_scope","ACE_HK417_Eotech_4x","ACE_M16A4_CCO_GL","ACE_M4A1_ACOG","ACE_SOC_M4A1_GL","ACE_SOC_M4A1_GL_13","ACE_M4A1_GL_SD","ACE_SOC_M4A1_GL_SD","ACE_SOC_M4A1_GL_EOTECH","ACE_SOC_M4A1_GL_AIMPOINT","ACE_M4A1_ACOG","ACE_M4A1_ACOG","ACE_SOC_M4A1_SHORTDOT_SD","ACE_M4A1_ACOG_SD","ACE_M27_IAR","ACE_M27_IAR_ACOG","ACE_M249_PIP_ACOG","ACE_M4A1_Aim_SD","ACE_M4A1_Eotech","ACE_SOC_M4A1_Eotech","ACE_SOC_M4A1_RCO_GL","ACE_M249Para","ACE_M60","ACE_M136_CSRS","ACE_TAC50","ACE_TAC50_SD","ACE_M224Proxy","ACE_M224TripodProxy","ACE_Javelin_Direct"]; _user_magazines_west = ["ACE_15Rnd_9x19_P226","ACE_12Rnd_45ACP_USP","ACE_12Rnd_45ACP_USPSD","100Rnd_556x45_BetaCMag","ACE_20Rnd_762x51_B_HK417","ACE_20Rnd_762x51_S_HK417","ACE_20Rnd_762x51_SB_HK417","ACE_20Rnd_762x51_SB_S_HK417","ACE_20Rnd_762x51_T_HK417","100Rnd_556x45_BetaCMag","ACE_30Rnd_556x45_T_Stanag","ACE_30Rnd_556x45_SB_Stanag","ACE_200Rnd_556x45_T_M249","ACE_10Rnd_127x99_Raufoss_m107","ACE_10Rnd_127x99_Raufoss_m107","ACE_5Rnd_762x51_T_M24","ACE_5Rnd_25x59_HEDP_Barrett","ACE_6Rnd_CS_M32","ACE_SSWhite_FG","ACE_SSRed_FG","ACE_SSGreen_FG","ACE_SSYellow_FG","ACE_SSWhite_M203","ACE_SSGreen_M203","ACE_SSRed_M203","ACE_SSYellow_M203","ACE_LargeBandage","ACE_Bandage","ACE_Morphine","ACE_Epinephrine","ACE_Medkit","ACE_SMAW_SPOTTING","ACE_Flashbang","ACE_6Rnd_12Ga_Buck00","ACE_6Rnd_12Ga_Slug","8Rnd_B_Beneli_Pellets","ACE_8Rnd_12Ga_Buck00","ACE_Knicklicht_R","ACE_Knicklicht_W","ACE_Knicklicht_G","ACE_Knicklicht_Y","ACE_Knicklicht_B","ACE_Knicklicht_IR","ACE_HuntIR_M203","ACE_5Rnd_127x99_B_TAC50","ACE_5Rnd_127x99_S_TAC50","ACE_5Rnd_127x99_T_TAC50","ACE_M224HE_CSWDM","ACE_M224IL_CSWDM","ACE_M224WP_CSWDM","ACE_M15","ACE_M34","ACE_M2_CSWDM","ACE_MK19_CSWDM"]; _user_weapons_east = []; _user_magazines_east = []; // EQUIPMENT _equipment = ["binocular","nvgoggles","laserdesignator","itemcompass","itemgps","itemmap","itemradio","itemwatch","ACE_GlassesTactical","ACE_Map_Tools","ACE_KeyCuffs","ACE_Kestrel4500","ACE_HuntIR_monitor","ACE_DAGR","ace_arty_rangeTable_m224_legacy","ACE_Javelin_CLU"]; _equipment_oa = ["binocular_vector","ACE_Earplugs","ACE_GlassesRoundGlasses","ACE_GlassesSunglasses","ACE_GlassesLHD_glasses","ACE_GlassesGasMask_US","ACE_Rucksack_MOLLE_Green","ACE_Rucksack_MOLLE_Brown","ACE_Rucksack_MOLLE_Wood","ACE_Rucksack_MOLLE_ACU","ACE_Rucksack_MOLLE_WMARPAT","ACE_Rucksack_MOLLE_DMARPAT","ACE_Rucksack_MOLLE_Green_Medic","ACE_Rucksack_MOLLE_Brown_Medic","ACE_Rucksack_MOLLE_ACU_Medic","ACE_Rucksack_MOLLE_WMARPAT_Medic","ACE_Rucksack_MOLLE_DMARPAT_Medic","ACE_ANPRC77","ACE_VTAC_RUSH72","ACE_VTAC_RUSH72_TT_MEDIC","ACE_VTAC_RUSH72_FT_MEDIC","ACE_CharliePack","ACE_CharliePack_WMARPAT", "ACE_CharliePack_ACU","ACE_CharliePack_ACU_Medic","ACE_PRC119","ACE_PRC119_MAR","ACE_PRC119_ACU","ACE_FAST_PackEDC_ACU","ACE_Coyote_Pack","ACE_Coyote_Pack_Black","ACE_BackPack_ACR","ACE_BackPack_ACR_TT","ACE_BackPack_ACR_FL","ACE_BackPack_ACR_Small","ACE_ALICE_Backpack","ACE_Backpack_US","ACE_Backpack_FL","ACE_Backpack_TT","ACE_P159_RD90","ACE_P159_RD54","ACE_P159_RD99","ACRE_PRC117F","ACRE_PRC119","ACRE_PRC148_UHF","ACRE_PRC148"]; // ORDONANCE _ordonance = ["smokeshell","smokeshellblue","smokeshellgreen","smokeshellorange","smokeshellpurple","smokeshellred","smokeshellyellow","pipebomb","handgrenade","laserbatteries","ACE_Claymore_M","ACE_C4_M","ACE_BBetty_M","ACE_TripFlare_M","ACE_VS17Panel_M","ACE_Battery_Rangefinder"]; _ordonance_oa = ["ir_strobe_target","ir_strobe_marker","baf_ied_v1","baf_ied_v2","baf_ied_v3","baf_ied_v4"]; _west_ordonance = ["mine","handgrenade_west"]; _west_ordonance_oa = ["baf_l109a1_he"]; _east_ordonance = ["minee","handgrenade_east"]; // WEST WEAPONS & MAGAZINES _west_weapons = [ //Rifles "m16a2","m16a2gl","m16a4","m16a4_gl","m16a4_acg","m16a4_acg_gl", "m4a1","m4a1_aim","m4a1_aim_camo","m4a1_aim_sd_camo","m4a1_hws_gl","m4a1_hws_gl_camo","m4a1_hws_gl_sd_camo","m4a1_rco_gl", "m8_carbine","m8_carbinegl","m8_compact","m8_sharpshooter", "g36a","g36k","g36c","g36_c_sd_eotech", "mp5a5","mp5sd", "m1014", // machineguns "m249","m240","mk_48","mg36","m8_saw", // sniper rifles "m24","m40a3","m107","m4spr","dmr", // sidearms "colt1911","m9","m9sd", // launchers "m136","smaw","stinger"]; _west_weapons_oa = [ // rifles "m16a2","m16a2gl", "m4a1","m4a3_cco_ep1","m4a3_rco_gl_ep1", "fn_fal","fn_fal_anpvs4","g36_c_sd_camo","g36a_camo","g36c_camo","g36k_camo", "scar_h_cqc_cco","scar_h_cqc_cco_sd","scar_h_lng_sniper","scar_h_lng_sniper_sd","scar_h_std_eglm_spect","scar_h_std_tws_sd", "scar_l_cqc","scar_l_cqc_cco_sd","scar_l_cqc_eglm_holo","scar_l_cqc_holo","scar_l_std_eglm_rco","scar_l_std_eglm_tws","scar_l_std_holo","scar_l_std_mk4cqt", // sniper rifles "leeenfield","m110_nvg_ep1","m110_tws_ep1","m14_ep1","m24_des_ep1","m107","m107_tws_ep1", // machinegus "m60a4_ep1","mg36_camo","m240_scoped_ep1","m249_ep1","m249_m145_ep1","m249_tws_ep1","mk_48_des_ep1", // grenade launchers "m79_ep1","m32_ep1","mk13_ep1", // sidearms "colt1911","glock17_ep1","m9","m9sd","revolver_ep1","revolver_gold_ep1", // launchers "m136","m47launcher_ep1","maaws","stinger","ACE_M72A2"]; _west_weapons_baf = [ // rifles "baf_as50_scoped","baf_as50_tws","baf_l110a1_aim","baf_l7a2_gpmg","baf_l85a2_ris_acog", "baf_l85a2_ris_cws","baf_l85a2_ris_holo","baf_l85a2_ris_susat","baf_l85a2_ugl_acog","baf_l85a2_ugl_holo","baf_l85a2_ugl_susat","baf_l86a2_acog", // sniper rifles "baf_lrr_scoped","baf_lrr_scoped_w", // launchers "baf_nlaw_launcher"]; _west_weapons_pmc = [ // rifles "m8_tws","m8_tws_sd","m8_carbine_pmc","m8_carbine","m8_carbinegl","m8_compact","m8_compact_pmc","m8_holo_sd","aa12_pmc", //sniper rifles "m8_sharpshooter", // machine guns "m8_saw"]; _west_weapons_ace = ["ACE_M16A4_CCO_GL","ACE_HK417_Eotech_4x","ACE_M4A1_ACOG","ACE_SOC_M4A1_GL","ACE_SOC_M4A1_GL_13","ACE_M4A1_GL_SD","ACE_SOC_M4A1_GL_SD","ACE_SOC_M4A1_GL_EOTECH","ACE_SOC_M4A1_GL_AIMPOINT","ACE_M4A1_ACOG","ACE_M4A1_ACOG","ACE_M4A1_ACOG_CQB","ACE_SOC_M4A1_SHORTDOT","ACE_SOC_M4A1_SHORTDOT_CQB","ACE_M4A1_ACOG_SD","ACE_M27_IAR","ACE_M27_IAR_ACOG","ACE_M249_PIP_ACOG","ACE_M4A1_ACOG_SD_CQB","ACE_SOC_M4A1_SHORTDOT_SD","ACE_SOC_M4A1_SHORTDOT_SD_CQB","ACE_M4A1_Aim_SD""ACE_M4A1_Eotech","ACE_SOC_M4A1_Eotech","ACE_M4A1_RCO_GL_CQB","ACE_SOC_M4A1_RCO_GL","ACE_SOC_M4A1_RCO_GL_CQB","ACE_M249Para","ACE_M249Para_M145","ACE_M240G_M145","ACE_M240G_M145_CQB","ACE_M60"]; _west_magazines = [ // rifle mags "30rnd_556x45_stanag","30rnd_556x45_stanagsd","30rnd_556x45_g36","30rnd_556x45_g36sd","30rnd_9x19_mp5","30rnd_9x19_mp5sd","8rnd_b_beneli_74slug", // under-barrel grenade launchers "1rnd_he_m203","flarewhite_m203","flaregreen_m203","flarered_m203","flareyellow_m203","1rnd_smoke_m203","1rnd_smokegreen_m203","1rnd_smokered_m203","1rnd_smokeyellow_m203", // sniper rifles "20rnd_556x45_stanag","20rnd_762x51_dmr","5rnd_762x51_m24","10rnd_127x99_m107", // machineguns "100rnd_556x45_betacmag","200rnd_556x45_m249","100rnd_762x51_m240", // side arms "7rnd_45acp_1911","15rnd_9x19_m9","15rnd_9x19_m9sd", // launchers "smaw_heaa","smaw_hedp","javelin","stinger"]; _west_magazines_oa = [ // rifles "20rnd_556x45_stanag","30rnd_556x45_stanag","30rnd_556x45_stanagsd","20rnd_762x51_dmr", "20rnd_762x51_fnfal","30rnd_556x45_g36","30rnd_556x45_g36sd","100rnd_556x45_betacmag","20rnd_762x51_b_scar", // under-barrell launcher "1rnd_he_m203","1rnd_smoke_m203","1rnd_smokegreen_m203","1rnd_smokered_m203","1rnd_smokeyellow_m203","flaregreen_m203","flarered_m203","flarewhite_m203","flareyellow_m203", // grenade launcher "6rnd_flaregreen_m203","6rnd_flarered_m203","6rnd_flarewhite_m203","6rnd_flareyellow_m203","6rnd_he_m203","6rnd_smoke_m203","6rnd_smokegreen_m203","6rnd_smokered_m203","6rnd_smokeyellow_m203", // sniper rifles "5rnd_762x51_m24","20rnd_762x51_sb_scar","5rnd_86x70_l115a1","10x_303","10rnd_127x99_m107", // side arms "10rnd_b_765x17_ball","20rnd_b_765x17_ball","30rnd_9x19_mp5","30rnd_9x19_mp5sd", "7rnd_45acp_1911","15rnd_9x19_m9","15rnd_9x19_m9sd","17rnd_9x19_glock17","6rnd_45acp", // machineguns "100rnd_556x45_m249","100rnd_762x51_m240","200rnd_556x45_l110a1","200rnd_556x45_m249", // launchers "nlaw","javelin","dragon_ep1","maaws_heat","maaws_hedp","stinger"]; _west_magazines_baf = [ "30rnd_556x45_stanag","5rnd_86x70_l115a1","5rnd_127x99_as50","200rnd_556x45_l110a1","100rnd_762x51_m240", "nlaw", "1rnd_he_m203","flarewhite_m203","flaregreen_m203","flarered_m203","flareyellow_m203","1rnd_smoke_m203","1rnd_smokered_m203","1rnd_smokegreen_m203","1rnd_smokeyellow_m203"]; _west_magazines_pmc = [ "20rnd_b_aa12_74slug","20rnd_b_aa12_he","20rnd_b_aa12_pellets","30rnd_556x45_stanagsd", "1rnd_he_m203","flarewhite_m203","flaregreen_m203","flarered_m203","flareyellow_m203","1rnd_smoke_m203","1rnd_smokered_m203","1rnd_smokegreen_m203","1rnd_smokeyellow_m203"]; _west_magazines_ace = ["100Rnd_556x45_BetaCMag","ACE_30Rnd_556x45_T_Stanag","ACE_30Rnd_556x45_SB_Stanag","ACE_200Rnd_556x45_T_M249","ACE_10Rnd_127x99_Raufoss_m107","ACE_10Rnd_127x99_Raufoss_m107","ACE_5Rnd_762x51_T_M24","ACE_5Rnd_25x59_HEDP_Barrett","ACE_6Rnd_CS_M32","ACE_SSWhite_FG","ACE_SSRed_FG","ACE_SSGreen_FG","ACE_SSYellow_FG","ACE_SSWhite_M203","ACE_SSGreen_M203","ACE_SSRed_M203","ACE_SSYellow_M203","ACE_Bandage","ACE_LargeBandage","ACE_Morphine","ACE_Epinephrine","ACE_Medpack","ACE_SMAW_SPOTTING"]; // EAST WEAPONS & MAGAZINES _east_weapons = [ // rifles "ak_47_m","ak_47_s","aks_gold", "ak_74","ak_74_gl","aks_74_kobra","aks_74_pso","aks_74_u","aks_74_un_kobra", "ak_107_kobra","ak_107_gl_kobra","ak_107_pso","ak_107_gl_pso", "bizon","bizon_silenced", "saiga12k", // machineguns "rpk_74","pk","pecheneg", // sniper rifles "huntingrifle","vss_vintorez","svd","svd_camo","ksvk", // side arms "makarov","makarovsd", // launchers "rpg7v","rpg18","metislauncher","strela","igla"]; _east_weapons_oa = [ // rifles "ak_47_m","ak_47_s", "ak_74","ak_74_gl","ak_74_gl_kobra","aks_74","aks_74_goshawk","aks_74_kobra","aks_74_nspu","aks_74_pso","aks_74_u", "sa58p_ep1","sa58v_cco_ep1","sa58v_ep1","sa58v_rco_ep1", // sniper rifles "svd","svd_des_ep1","svd_nspu_ep1","ksvk", // machineguns "rpk_74","pk", // side arms "makarov","makarovsd","sa61_ep1","uzi_ep1","uzi_sd_ep1", // launchers "igla","metislauncher","rpg18","rpg7v","strela"]; _east_weapons_ace = []; _east_magazines = [ // rifles "30rnd_762x39_ak47","30rnd_545x39_ak","30rnd_545x39_aksd","64rnd_9x19_bizon","64rnd_9x19_sd_bizon","8rnd_b_saiga12_74slug", // under-barrel grenade launchers "1rnd_he_gp25","flarewhite_gp25","flaregreen_gp25","flarered_gp25","flareyellow_gp25","1rnd_smoke_gp25","1rnd_smokegreen_gp25","1rnd_smokered_gp25","1rnd_smokeyellow_gp25", // sniper rifles "5x_22_lr_17_hmr","10rnd_9x39_sp5_vss","20rnd_9x39_sp5_vss","10rnd_762x54_svd","5rnd_127x108_ksvk", // machineguns "75rnd_545x39_rpk","100rnd_762x54_pk", // side arms "8rnd_9x18_makarov","8rnd_9x18_makarovsd", // launchers "pg7v","pg7vl","pg7vr","og7","at13","strela","igla"]; _east_magazines_oa = [ // rifles "30rnd_762x39_ak47","30rnd_762x39_sa58","30rnd_545x39_ak","30rnd_545x39_aksd", // under-barrel grenade launchers "1rnd_he_gp25","1rnd_smoke_gp25","1rnd_smokegreen_gp25","1rnd_smokered_gp25","1rnd_smokeyellow_gp25","flaregreen_gp25","flarered_gp25","flarewhite_gp25","flareyellow_gp25", // sniper rifles "10rnd_762x54_svd","5rnd_127x108_ksvk", // machineguns "100rnd_762x54_pk","75rnd_545x39_rpk", // side arms "30rnd_9x19_uzi","30rnd_9x19_uzi_sd","8rnd_9x18_makarov","8rnd_9x18_makarovsd", // launchers "at13","rpg18","og7","pg7v","pg7vl","pg7vr","strela","igla"]; _east_magazines_ace = []; // Trim arrays to avoid duplications. if (_arma && _oa) then { _east_weapons_oa = _east_weapons_oa - _east_weapons; _east_magazines_oa = _east_magazines_oa - _east_magazines; _west_weapons_oa = _west_weapons_oa - _west_weapons; _west_magazines_oa = _west_magazines_oa - _west_magazines; }; // baf & pmc if (_oa) then { _west_weapons_baf = _west_weapons_baf - _west_weapons_oa; _west_magazines_baf = _west_magazines_baf - _west_magazines_oa; _west_weapons_pmc = _west_weapons_pmc - _west_weapons_oa; _west_magazines_pmc = _west_magazines_pmc - _west_magazines_oa; }; if (_arma) then { _west_weapons_baf = _west_weapons_baf - _west_weapons; _west_magazines_baf = _west_magazines_baf - _west_magazines; _west_weapons_pmc = _west_weapons_pmc - _west_weapons; _west_magazines_pmc = _west_magazines_pmc - _west_magazines; }; // Start loop while {_run} do { clearWeaponCargo _box; clearMagazineCargo _box; // ALL // EQUIPMENT { _box addWeaponCargo [_x, _amounte]; } foreach _equipment; if (_oa) then { { _box addWeaponCargo [_x, _amounte]; } foreach _equipment_oa; }; // ORDONANCE { _box addMagazineCargo [_x, _amountm ]; } foreach _ordonance; if (_oa || _baf) then { { _box addMagazineCargo [_x, _amountm ]; } foreach _ordonance_oa; }; // WEST // ORDONANCE if (_west) then { { _box addMagazineCargo [_x, _amountm ]; } foreach _west_ordonance; }; if (_west && _oa) then { { _box addMagazineCargo [_x, _amounte]; } foreach _west_ordonance_oa; }; // WEAPONS & MAGAZINES if (_west && _arma) then { { _box addWeaponCargo [_x, _amountw]; } foreach _west_weapons; { _box addMagazineCargo [_x, _amountm]; } foreach _west_magazines; }; // OA WEAPONS & MAGAZINES if (_west && _oa) then { { _box addWeaponCargo [_x, _amountw]; } foreach _west_weapons_oa; { _box addMagazineCargo [_x, _amountm]; } foreach _west_magazines_oa; }; // BAF if (_west && _baf) then { { _box addWeaponCargo [_x, _amountw]; } foreach _west_weapons_baf; { _box addMagazineCargo [_x, _amountm]; } foreach _west_magazines_baf; }; // PMC if (_west && _pmc) then { { _box addWeaponCargo [_x, _amountw]; } foreach _west_weapons_pmc; { _box addMagazineCargo [_x, _amountm]; } foreach _west_magazines_pmc; }; // USER DEFINED if (_user) then { { _box addWeaponCargo [_x, _amountw]; } foreach _user_weapons_west; { _box addMagazineCargo [_x, _amountm]; } foreach _user_magazines_west; }; // EAST // ORDONANCE if (_east) then { { _box addMagazineCargo [_x, _amountm ]; } foreach _east_ordonance; }; // WEAPONS & MAGAZINES if (_east && _arma) then { { _box addWeaponCargo [_x, _amountw]; } foreach _east_weapons; { _box addMagazineCargo [_x, _amountm]; } foreach _east_magazines; }; // OA WEAPONS & MAGAZINES if (_east && _oa) then { { _box addWeaponCargo [_x, _amountw]; } foreach _east_weapons_oa; { _box addMagazineCargo [_x, _amountm]; } foreach _east_magazines_oa; }; // USER DEFINED if (_user) then { { _box addWeaponCargo [_x, _amountw]; } foreach _user_weapons_east; { _box addMagazineCargo [_x, _amountm]; } foreach _user_magazines_east; }; // Refill or end loop if (!alive _box) then {_run = false}; if (!_refill) then {_run = false}; sleep 1800; };//////map specific definitions/macros //fallujah has no compatible houses for ambient civilians, thus overriding inexistent mission param ambientCivilians = 0; //spawnPos must remain available in global missionNamespace, a definition does not spawnPos = [0,0,0]; #define CENTERPOS [4948.3,4833.76,0] #define AORADIUS 4800 // first define has more variations but many outside positions, second (default) define is always inside of a house but most likely it's always at the same place in the few houses with inside places, too //#define CACHEHOUSEPOSITIONS ["Land_dum_istan2b",[0,1,2,3,4,5,6,7,8],"Land_dum_istan3",[3,4],"Land_dum_istan3_pumpa",[1,2,3,4,5],"Land_dum_zboreny",[7,8],"Land_dum_istan2",[0,1,2,3,4,5,6,7,8],"Land_water_tank",[1,2,3,4],"Land_dum_istan3_hromada2",[1,2,3,4,5,6,7,8,9,10],"Land_Vysilac_FM",[1,2,3,4],"Land_A_GeneralStore_01",[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],"Land_dum_istan2_02",[0,1,2,3],"Land_Panelak",[6,7,8,9,10,11,12,13,14,15,16,17],"Land_dum_mesto_in",[0,1,2,3,4,5,6,7,8],"Land_watertower1",[0,1,2,3,4,5,6],"Land_Hlidac_budka",[0,1,2,3,4],"Land_dum_zboreny_total",[0,1,2,3,4,5],"Land_repair_center",[0,1,2,3],"Land_Misc_Cargo1Bo",[0,1,2,3],"Land_Misc_Cargo1Ao",[0,1,2,3],"Land_Ind_Mlyn_03",[0,1,2,3,4,5,6,7],"Land_hut_old02",[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17],"Land_A_Crane_02b",[0,1,2,3,4,5,6,7],"Land_A_Crane_02a",[1,2,3,4,5,6,7],"Land_trafostanica_mala",[0,1,2,3,4,5,6,7],"Land_Ind_SawMill",[0,1,2,3,4,5],"Land_Ind_Vysypka",[0,1,2,3,4,5,6,7,8,9,10],"Land_Ind_SawMillPen",[0,1,2,3,4,5,6],"Land_Tovarna2",[9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,36],"Land_A_BuildingWIP",[15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60],"Land_hotel",[41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261],"Land_Panelak2",[0,1,2,3,4,5,6,7,8,9,10,11,12,13],"Land_Barn_Metal",[7,8,9,10,11],"Land_A_GeneralStore_01a",[0,1,2,3,4,5,6,7,8,9,10,11,12],"Land_Ind_Quarry",[9,10,11,12,13,14],"Land_trafostanica_velka",[0,1,2,3,4,5,6,7],"Land_Hangar_2",[0,1,2,3,4,5,6,7],"Land_kostel_trosky",[0,1,2,3,4,5,6],"Land_Nasypka",[1,2,3,4],"Land_A_statue02",[0,1,2,3,4,5,6,7],"Land_fortified_nest_big",[0,1,2,3,4,5,6,7,8,9,10,11,12],"Land_a_stationhouse",[6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],"Land_SS_hangar",[0,1,2,3,4,5,6,7,8,9],"Land_budova4_in",[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],"Land_Barrack2",[0,1,2,3,4,5],"Land_vysilac_FM2",[1,2,3,4],"Land_Mil_Barracks_i",[0,1,2,3,4,5,6,7,8],"Land_Mil_ControlTower",[2,3,4,5,6,7,8,9,10,11,12,13,14,15,17,18,19,20],"Land_Shed_Ind02",[3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]] #define CACHEHOUSEPOSITIONS ["Land_dum_istan3_pumpa",[1],"Land_dum_zboreny",[0,1,2,3],"Land_dum_istan3_hromada2",[1,0],"Land_A_GeneralStore_01",[1,2,3,4,5,6,7,8,9,11,12,14],"Land_Panelak",[7,8,10,11,12,13,14,15,16,17],"Land_dum_istan2b",[1],"Land_dum_mesto_in",[0,1,2,3,4,5,6,7,8],"Land_Hlidac_budka",[1,2,3,4],"Land_dum_istan3",[0],"Land_Misc_Cargo1Bo",[1],"Land_Misc_Cargo1Ao",[1,3],"Land_hut_old02",[1,2,3,4,6,7,8,9,10,11,12,13,14,16,17],"Land_A_Crane_02b",[2],"Land_Ind_Vysypka",[1,2,3,4,6,8,10],"Land_Ind_SawMillPen",[1,2,3],"Land_Tovarna2",[22,23,25,27,28,29,31,33,34,36],"Land_A_BuildingWIP",[18,20,24,25,26,27,28,29,30,31],"Land_hotel",[41,42,43,44,45,46,47,48,49,50,51,55,56,57,58,59,60,61,62,63,67,68,69,70,71,72,73,74,75,79,80,81,82,83,84,85,86,87,88,89,90,94,95,96,97,98,99,100,101,102,103,104,105,259,262,263,264,265],"Land_Panelak2",[0,4],"Land_trafostanica_mala",[3,4],"Land_A_GeneralStore_01a",[0,1,2,3,4,5,6,7,9,10,12],"Land_Ind_Quarry",[0],"Land_Hangar_2",[0,1,2,3,4,5,6,7],"Land_dum_istan2",[1],"Land_fortified_nest_big",[1,2,3,4,5,6,7,8,9,10,11,12],"Land_a_stationhouse",[0,1,2,3,4,5],"Land_budova4_in",[6,7,12,13,14],"Land_Barrack2",[2,3,4,5],"Land_Mil_Barracks_i",[1,2,3,4,5,6,7,8],"Land_Mil_ControlTower",[2,3,4,6],"Land_Vysilac_FM",[4],"Land_Shed_Ind02",[3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]] #define GUNROOFPOSITIONS ["Land_dum_istan2b",[[0,0],[1,0.1],[2,0],[3,0.1],[4,0.1],[5,0.2],[6,0.2],[7,0.1],[8,0.2]],"Land_dum_istan3",[[3,0.2]],"Land_dum_istan3_pumpa",[[2,0],[3,0],[4,0],[5,0.2]],"Land_dum_istan2",[[1,0.7],[2,0.2],[3,0.2],[4,0.1],[5,0.1],[6,0.2],[7,0.1],[8,0.2]],"Land_water_tank",[[1,0],[2,0],[3,0],[4,0]],"Land_dum_istan3_hromada2",[[3,0.3],[4,0.3],[5,0.5],[6,0.4],[7,0.5],[8,0.2],[9,0.2],[10,0.2]],"Land_Vysilac_FM",[[1,0],[2,0],[3,0],[4,0]],"Land_A_CraneCon",[[1,0],[2,0]],"Land_Panelak",[[10,-1],[13,0.4],[14,0.3],[15,0.3],[16,0.3],[17,0.3]],"Land_Panelak3",[[4,0],[5,0],[6,0],[7,0]],"Land_watertower1",[[0,0],[1,0],[2,0],[3,0],[4,0],[5,0],[6,0]],"Land_Ind_Mlyn_01",[[1,0],[3,0.2]],"Land_A_TVTower_Base",[[3,0],[4,0],[5,0],[6,0],[7,0],[8,0],[9,0],[10,0],[12,0]],"Land_Ind_Mlyn_03",[[1,0],[2,0],[3,0],[4,0],[6,0],[7,0]],"Land_A_Crane_02b",[[4,0],[5,0],[6,0.8],[7,0]],"Land_A_Crane_02a",[[1,0],[2,0],[3,0],[4,0],[5,0],[6,0],[7,0]],"Land_dum_zboreny",[[8,1]],"Land_Tovarna2",[[13,0],[14,0],[15,0],[16,0],[17,0.1],[18,0.2],[34,0.8],[35,0.1]],"Land_A_BuildingWIP",[[19,0.7],[20,0.5],[21,0.8],[22,0.2],[23,0],[24,0.9],[25,0.8],[26,0.9],[27,0.9],[28,0.9],[33,1],[34,1],[35,1],[36,1],[37,1],[38,1],[39,0.9],[40,0.6],[41,0.1],[42,0.4],[43,0.5],[44,1],[45,0.5],[46,0.1],[47,0.5],[48,0],[49,0.2],[51,1],[53,0.3],[54,0.2],[55,0],[56,0],[57,0.3],[58,1],[59,0.3],[60,0.9]],"Land_hotel",[[52,0.9],[53,0.6],[54,0.1],[55,1],[57,-1],[64,0.7],[65,0.6],[66,0.6],[67,1],[70,0.7],[76,0.7],[77,0.6],[78,0.6],[91,0.7],[92,0.6],[93,0.6],[94,1],[97,0.7],[99,0.9],[115,1],[116,0.6],[117,0.6],[118,1],[126,0.7],[127,0.6],[128,0.6],[129,1],[132,0.7],[138,0.7],[139,0.6],[140,0.6],[153,0.7],[154,0.6],[155,0.6],[156,1],[159,0.7],[161,0.8],[165,0.3],[177,1],[178,0.6],[179,0.6],[180,1],[188,0.7],[189,0.6],[190,0.6],[191,1],[194,0.7],[200,0.7],[201,0.6],[202,0.6],[215,0.7],[216,0.6],[217,0.6],[218,1],[221,0.7],[223,0.9],[227,0.3],[237,0.3],[238,0.3],[239,0.6],[240,0.3],[241,0.6],[242,0.3],[243,0.6],[244,0.3],[245,0.6],[246,0.3],[247,0.3],[248,0.3],[249,0.3],[250,0.3],[251,0.8],[252,0.3],[253,0.3],[254,0.3],[255,0.3],[256,0.3],[257,0.3],[258,0.3]],"Land_Panelak2",[[1,0.1],[9,0.3],[10,0],[11,0],[12,0],[13,0]],"Land_Barn_Metal",[[7,0.1],[8,0.3],[9,0],[10,0],[11,0]],"Land_Ind_MalyKomin",[[1,0],[2,0],[3,0],[4,0],[5,0.2]],"Land_Ind_Stack_Big",[[1,0],[2,0],[3,0],[4,0],[5,0],[6,0],[7,0]],"Land_Ind_SiloVelke_01",[[0,0],[1,0],[2,0],[3,0],[4,0],[5,0],[6,0],[7,0]],"Land_Ind_Quarry",[[9,0],[10,0],[11,0],[12,0.2],[13,0.3]],"Land_Nasypka",[[1,0],[2,0],[3,0],[4,0]],"Land_a_stationhouse",[[12,0.1],[14,0.1],[15,0.1],[16,0.1],[17,0.1],[18,0.1],[19,0.1],[20,0.1],[21,0.1],[22,0.1],[23,0.1],[24,0.1],[25,0]],"Land_Ind_Pec_01",[[2,0],[3,0],[4,0],[5,0],[6,0.1],[7,0],[9,0],[10,0.3],[11,0.3]],"Land_vysilac_FM2",[[1,0],[2,0],[3,0],[4,0]],"Land_Mil_ControlTower",[[2,-1],[4,-1],[9,0],[10,0],[11,0],[12,0],[13,0],[14,0],[15,0],[17,0],[18,0],[19,0],[20,0]],"Land_Shed_Ind02",[[4,0.2],[5,0],[16,0.2]]] #define ILLEGALHOUSES ["Land_Mil_hangar_EP1", "Land_Mil_ControlTower_EP1", "Land_Mil_Guardhouse_EP1", "Land_Mil_Repair_center_EP1","Land_Mil_Barracks_i_EP1","Land_A_Minaret_EP1","Land_Ind_Coltan_Main_EP1"] // set EP1HOUSES to 'true' in order to have the param ignored and AI will spawn in every building, which got positions #define EP1HOUSES true #define randPos [(CENTERPOS select 0)+random 4000-random 3000,(CENTERPOS select 1)+random 4000-random 3000, 0] #define cacheRadius 500 #define intelRadius 400 //////class definitions #define westVehicleClasses ["AAV","LAV25","ACE_AH1Z_AGM_D","HMMWV_M998A2_SOV_DES_EP1","HMMWV_M998_crows_MK19_DES_EP1","HMMWV_M998_crows_M2_DES_EP1","M1A2_US_TUSK_MG_EP1","","UH1Y","ACE_AH1W_AGM_W","HMMWV_M1151_M2_DES_EP1","HMMWV_MK19_DES_EP1","HMMWV_Armored","M1126_ICV_mk19_EP1","M1126_ICV_M2_EP1",ATVTYPE,HELITYPE] #define limitedSquadGear [] #define limitedGearList [] #define westSoldierClasses ["ACE_USMC_Soldier_TL_D","ACE_USMC_Soldier_Medic_D","ACE_USMC_Soldier_LAT_D","ACE_USMC_Soldier_D","ACE_USMC_Soldier_AR_D"] //////unit definitions #define ATVTYPE "ATV_US_EP1" #define HELITYPE "UH1Y" #define PILOTTYPE "US_Soldier_Pilot_EP1" #define CAR1TYPE "HMMWV_M1151_M2_DES_EP1" #define CAR2TYPE "HMMWV_M1151_M2_DES_EP1" #define MHQTYPE "LAV25_HQ" /////weapon and magazine definitions //#define ATTYPE "M136" //#define ATMAGTYPE "M136" #define humvMagazines [\ ["30Rnd_556x45_Stanag",12],\ ["5Rnd_762x51_M24",4],\ ["100Rnd_762x51_M240",3],\ ["200Rnd_556x45_M249",3],\ ["20Rnd_762x51_B_SCAR",8],\ ["PipeBomb",2],\ ["15Rnd_9x19_M9",4],\ ["HandGrenade_West",4],\ ["SmokeShell",4],\ ["1Rnd_HE_M203",6],\ ["ACE_M2_CSWDM",6]\ ]showCompass = 1; showGPS = 1; showMap = 1; showWatch = 1; debriefing = 1; respawn = 3; respawnDelay = 30; respawnDialog = 1; disabledAI = 1; class Header { gameType = Coop; minPlayers = 1; maxPlayers = 30; }; class Params { class EmtpyLine1 { title = ":: Game Settings"; values[]={0,0}; texts[]={ "",""}; default = 0; }; //ambientCivilians should remain first param class ambientCivilians { title=" Ambient Civilians"; values[]={ 0 }; texts[]={ "Disabled"}; default=0; code = ""; }; class aiSkill { title=" AI Accuracy"; values[]={ 1,2,3,4,5,6,7,8,9,10 }; texts[]={ "0.1","0.2","0.3","0.4","0.5","0.6","0.7","0.8","0.9","1.0" }; default=2; code = ""; }; class maxAIPerPlayer { title=" AI Numbers"; values[]={ 2,4,6,8 }; texts[]={ "50%","100%","150%","200%" }; default=2; code = ""; }; class eastRatio { title=" OPFOR Ratio"; values[]={ -1 }; texts[]={ "COOP only" }; default=-1; code = ""; }; class markersEnabled { title=" Enable Insurgency Markers"; values[]={ 0,1 }; texts[]={ "False","True" }; default=0; code = ""; }; class cacheCount { title=" Number of Ammo Caches"; values[]={ 1,2,3,4,5,6,7,8,18 }; texts[]={ "1","2","3","4","5","6","7","8","18" }; default=8; code = ""; }; class startLives { title=" Number of Respawns"; values[]={ -1,0,5,10,20,50,100,200,350,500 }; texts[]={ "Infinite","0","5","10","20","50","100","200","350","500" }; default=-1; code = ""; }; class playersNeeded { title=" Players needed to clear a Square"; values[]={ 1,2,3 }; texts[]={ "1","2","3" }; default=1; code = ""; }; class eastVehicleNum { title=" Number of OPFOR AI Vehicles"; values[]={ 1,2,3,4,5,6,7,8,9 }; texts[]={ "1","2","3","4","5","6","7","8","9" }; default=3; code = ""; }; class aiVehicleRespawnTime { title=" Random Time to OPFOR AI Vehicle Respawn (+5min)"; values[]={ 600,900,1200,1800 }; texts[]={ "10 min","15 min","20 min","30 min" }; default=1200; code = ""; }; class heliRC { title=" Remote-controlled Helicopter"; values[]={ 1,0 }; texts[]={ "Yes","No" }; default=0; code = ""; }; class a10Mode { title=" A-10 CAS Mode"; values[]={ 0,1,2 }; texts[]={ "Disabled","AI","Player" }; default=0; code = ""; }; class a10FlyTime { title=" A-10 Flying Time (x2 on AI A-10)"; values[]={ 30,45,60,90,120 }; texts[]={ "30 seconds","45 seconds","60 seconds","90 seconds","120 seconds" }; default=45; code = ""; }; class mhqDeployTimer { title=" HQ Re-deployment Timer"; values[]={ 0,1800,3600,7200,10800,14400,18000,-1 }; texts[]={ "Instant","30 minutes","60 minutes","120 minutes","180 minutes","240 minutes","300 minutes","Never"}; default=1800; code = ""; }; class hqProtectionRing { title=" HQ Base Protection"; values[]={ -1,100,200,300,400 }; texts[]={ "None","100 meters","200 meters","300 meters","400 meters"}; default=-1; code = ""; }; class EmtpyLine2 { title = ":: UI Settings"; values[]={0,0}; texts[]={ "",""}; default = 0; }; class useroptions { title=" Players can adjust Viewdistance and Grass"; values[]={ 0,1 }; texts[]={ "No","Yes" }; default=1; code = ""; }; class EmtpyLine3 { title = ":: Time & Date Settings"; values[]={0,0}; texts[]={ "",""}; default = 0; }; class Month { title=" Month"; values[]={ 1,2,3,4,5,6,7,8,9,10,11,12}; texts[]={ "January","Febuary", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}; default=3; code = ""; }; class Day { title=" Day"; values[]={ 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31}; texts[]={ "1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31"}; default=5; code = ""; }; class Hour { title=" Hour"; values[]={ 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24}; texts[]={ "1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24"}; default=4; code = ""; }; class Minute { title=" Minute"; values[]={ 00,15,30,45}; texts[]={ "00","15","30","45"}; default=00; code = ""; }; }; #include "common\resources\constants.hpp" #include "common\resources\types.hpp" #include "common\resources\dialogs.hpp" #include "common\resources\titles.hpp" #include "common\resources\sounds.hpp" //#define LOADSCREEN "\CA\Missions_e\campaign\missions\CE2_Pathfinder.Takistan\img\loading03_co.paa" #define LOADSCREEN "pics\15thintro.paa" //#define LOADSCREENTEXT "Insurgency - by pogoman, Fireball" #define LOADSCREENTEXT "15th ACE Fallujah Insurgency [v0.4se] - by Cytreen Spiegel based on Insurgency 0.81a by Fireball" #include "LoadingScreen.ext" loadScreen = LOADSCREEN; //onLoadMission = LOADSCREENTEXT; onLoadMission=www.15thmeu.net - Communications required for air and armor use - See Briefing Notes for details; onLoadMissionTime = false; /*%FSM*/ /*%FSM*/ /* item0[] = {"start",0,250,-124.188171,-214.382950,-81.679817,-184.449814,0.000000,"start"}; item1[] = {"init",2,4346,-166.651398,-102.417480,-128.825302,-77.166618,0.000000,"init"}; item2[] = {"bad__args",4,218,-224.989075,-219.005737,-158.400330,-178.370316,99.000000,"bad" \n "#args"}; item3[] = {"exit",1,250,-283.720215,-183.436172,-251.245270,-154.840775,0.000000,"exit"}; item4[] = {"bad_args",4,218,-217.878662,-161.618378,-163.387009,-118.902184,0.000000,"bad" \n "args"}; item5[] = {"_",8,218,-129.548065,-154.073212,-79.608734,-127.745422,0.000000,""}; item6[] = {"patrol",4,218,-199.740311,113.412323,-114.111847,161.663757,0.000000,"patrol"}; item7[] = {"hide",4,218,476.272003,199.381683,566.272034,249.381622,0.000000,"hide"}; item8[] = {"standby",4,218,-863.882507,194.225769,-773.882385,244.225739,0.000000,"standby"}; item9[] = {"generate_waypoin",2,250,-202.471329,235.238281,-112.471298,285.238312,0.000000,"generate" \n "waypoints"}; item10[] = {"search_houses",4,218,-201.712845,345.488098,-111.712830,395.488159,99.000000,"search" \n "houses"}; item11[] = {"add_building_pos",2,250,-74.005463,148.641479,15.994370,198.641602,0.000000,"add building" \n "positions"}; item12[] = {"assign_waypoints",2,250,-2.013130,371.359100,87.986771,421.359253,0.000000,"assign" \n "waypoints"}; item13[] = {"not_in_combat_2",4,218,-73.779526,236.670959,16.220337,286.670959,0.000000,"not in" \n "combat"}; item14[] = {"in_combat",4,218,-200.288010,666.636108,-110.287987,716.636108,0.000000,"in" \n "combat"}; item15[] = {"in_combat_mode",2,250,-194.551987,793.765259,-104.551666,843.765503,0.000000,"in combat" \n "mode"}; item16[] = {"occupy_buildings",2,250,472.568329,360.681396,562.568298,410.681519,0.000000,"occupy" \n "buildings"}; item17[] = {"not_in_combat",4,218,468.288361,516.517883,558.288147,566.517883,0.000000,"not in" \n "combat"}; item18[] = {"not_enough_build",4,218,333.362579,365.482727,423.362518,415.482727,0.000000,"not enough" \n "buildings"}; item19[] = {"restart_as_patro",2,250,-184.857864,457.748962,-132.221176,492.659912,0.000000,"restart" \n "as patrol"}; item20[] = {"sit_down",2,250,-851.557922,442.619995,-787.363220,478.958221,0.000000,"sit" \n "down"}; item21[] = {"no_chill__places",4,218,-716.871582,373.865662,-626.871582,423.865692,0.000000,"no chill-" \n "places"}; item22[] = {"not_in_combat_1",4,218,-998.221558,428.527832,-908.221619,478.527679,0.000000,"not in" \n "combat"}; item23[] = {"find__go_to_chil",2,250,-854.292908,277.757782,-781.389221,319.779480,0.000000,"find, go to" \n "chillplaces"}; item24[] = {"arrived_at_chill",4,218,-863.641907,355.131195,-773.641907,405.131195,0.000000,"arrived" \n "at chillplace"}; item25[] = {"not_server",4,218,-130.589417,-293.415344,-60.971046,-254.646027,101.000000,"not" \n "server"}; item26[] = {"exit_1",1,250,-207.956390,-289.255859,-172.446014,-264.628906,0.000000,"exit"}; item27[] = {"all_units_dead",4,218,-198.061050,1020.847412,-108.060997,1070.847412,0.000000,"all units" \n "dead"}; item28[] = {"exit_2",1,250,-175.947006,1134.576660,-127.015953,1171.940430,0.000000,"exit"}; link0[] = {0,2}; link1[] = {0,5}; link2[] = {0,25}; link3[] = {1,4}; link4[] = {1,6}; link5[] = {1,7}; link6[] = {1,8}; link7[] = {2,3}; link8[] = {4,3}; link9[] = {5,1}; link10[] = {6,9}; link11[] = {7,16}; link12[] = {8,23}; link13[] = {9,10}; link14[] = {9,13}; link15[] = {10,11}; link16[] = {11,13}; link17[] = {12,14}; link18[] = {12,27}; link19[] = {13,12}; link20[] = {14,15}; link21[] = {15,13}; link22[] = {15,17}; link23[] = {15,22}; link24[] = {15,27}; link25[] = {16,14}; link26[] = {16,18}; link27[] = {16,27}; link28[] = {17,16}; link29[] = {18,19}; link30[] = {19,6}; link31[] = {20,14}; link32[] = {20,27}; link33[] = {21,19}; link34[] = {22,23}; link35[] = {23,21}; link36[] = {23,24}; link37[] = {23,27}; link38[] = {24,20}; link39[] = {25,26}; link40[] = {27,28}; globals[] = {0.000000,0,0,0,0,640,480,1,14,6316128,1,-524.607361,709.540833,855.487793,-261.661682,893,881,1}; window[] = {2,-1,-1,-1,-1,962,225,1485,225,3,911}; *//*%FSM*/ class FSM { fsmName = "advanced_patrol"; class States { /*%FSM*/ class start { name = "start"; init = /*%FSM*/"_debug = false;" \n "" \n "_behaviors = [""patrol"",""standby"",""hide""];" \n "" \n "_searchhouses = true;" \n "" \n "_maxdist = 250;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class not_server { priority = 101.000000; to="exit_1"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"not isServer"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class bad__args { priority = 99.000000; to="exit"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"count _this < 3"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class _ { priority = 0.000000; to="init"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class init { name = "init"; init = /*%FSM*/"private [""_group"",""_orientation"",""_behavior""];" \n "" \n "switch (typeName (_this select 0)) do {" \n "" \n " case ""GROUP"" : {" \n " _group = _this select 0;" \n " };" \n "" \n " case ""OBJECT"" : {" \n " if(not isNull driver (_this select 0)) then {" \n " _group = group driver (_this select 0);" \n " };" \n " };" \n "" \n "};" \n "" \n "switch (typeName (_this select 1)) do {" \n "" \n " case ""STRING"" : {" \n " if(count (getMarkerPos (_this select 1) - [0]) > 0) then {" \n " _orientation = getMarkerPos (_this select 1);" \n " };" \n " };" \n "" \n " case ""LOCATION"" : {" \n " _orientation = position (_this select 1);" \n " };" \n "" \n " case ""OBJECT"" : {" \n " _orientation = position (_this select 1);" \n " };" \n "" \n " case ""ARRAY"" : {" \n " if(count (_this select 1) == 3) then {_orientation = _this select 1};" \n " if(count (_this select 1) == 2) then {_orientation = [(_this select 1) select 0,(_this select 1) select 1,0]};" \n " };" \n "" \n "};" \n "" \n "if((_this select 2) in _behaviors) then {" \n " _behavior = _this select 2;" \n "};" \n "" \n "if(count _this > 3) then {" \n " if(typeName (_this select 3) == ""SCALAR"") then {_maxdist = 0 max (_this select 3)};" \n "};" \n "" \n "" \n "if(_debug) then {" \n " diag_log format[""Bon AI_Mov initialized: _group: %1 _orientation: %2 _behavior: %3"",_group,_orientation,_behavior];" \n "};"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class patrol { priority = 0.000000; to="generate_waypoin"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"_behavior == ""patrol"""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class hide { priority = 0.000000; to="occupy_buildings"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"_behavior == ""hide"""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class standby { priority = 0.000000; to="find__go_to_chil"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"_behavior == ""standby"""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class bad_args { priority = 0.000000; to="exit"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"isNil ""_group"" ||" \n "isNil ""_orientation"" ||" \n "isNil ""_behavior"""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class exit { name = "exit"; init = /*%FSM*/"hint ""Bon AI_Mov Failure: insufficient arguments"";" \n "diag_log ""Bon AI_Mov FAILURE: insufficient arguments"";"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { }; }; /*%FSM*/ /*%FSM*/ class generate_waypoin { name = "generate_waypoin"; init = /*%FSM*/"_waypoints = [];" \n "" \n "" \n "_ang = random 360;" \n "_radius = 25 + random (_maxdist-25);" \n "_wpcount = round (_radius / 15) max 5;" \n "_inc = 360/_wpcount; " \n "" \n "_counterclockwise = if(random 1 < 0.5) then{1} else {-1};" \n "" \n "for ""_i"" from 0 to _wpcount do {" \n "" \n " _ang = _inc * _i * _counterclockwise;" \n "" \n " _a = (_orientation select 0)+(sin(_ang)*_radius);" \n " _b = (_orientation select 1)+(cos(_ang)*_radius);" \n "" \n " if(not surfaceIsWater [_a,_b]) then{" \n " _waypoints = _waypoints + [[_a,_b, 0]];" \n " };" \n "" \n "};" \n "" \n "if(_debug) then{" \n " diag_log format[""Bon AI_Mov: %1 patrol waypoints for group %2 around %3 generated."",count _waypoints,_group,_orientation];" \n "};"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class search_houses { priority = 99.000000; to="add_building_pos"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"_searchhouses"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class not_in_combat { priority = 0.000000; to="assign_waypoints"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"behaviour leader _group != ""COMBAT"" && _behavior == ""patrol"""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class add_building_pos { name = "add_building_pos"; init = /*%FSM*/"_buildingwaypointcount = 0;" \n "" \n "for ""_i"" from 0 to (count _waypoints - 1) do {" \n "" \n " _nearhouses = nearestObjects [_waypoints select _i,[""House""],10];" \n "" \n " if(count _nearhouses > 0 && random 1 < 0.7501) then {" \n "" \n " private [""_buildingpos"",""_house""];" \n " {" \n " _house = _x;" \n " _buildingpos = 0;" \n " while{count ((_house buildingpos _buildingpos) - [0]) > 0} do {_buildingpos = _buildingpos + 1};" \n " _buildingpos = _buildingpos - 1;" \n " if(_buildingpos > 1) exitWith{};" \n " } foreach _nearhouses;" \n "" \n " if(_buildingpos > 1) then {" \n " _newwaypointpos = _house buildingpos (round random _buildingpos max 2);" \n " _waypoints set [_i,_newwaypointpos];" \n " _buildingwaypointcount = _buildingwaypointcount + 1;" \n " };" \n "" \n " };" \n "" \n "};" \n "" \n "if(_debug) then{" \n " diag_log format[""Bon_AI_Mov: patrol route for group %1 around %2 contains %3 building sweeps."",_group,_orientation,_buildingwaypointcount];" \n "};" \n "_buildingwaypointcount = nil;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class not_in_combat { priority = 0.000000; to="assign_waypoints"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"behaviour leader _group != ""COMBAT"" && _behavior == ""patrol"""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class assign_waypoints { name = "assign_waypoints"; init = /*%FSM*/"{deleteWaypoint _x} foreach waypoints _group;" \n "" \n "_wp = """";" \n "_index = 0;" \n "{" \n " _wp = _group addWaypoint [_x,0];" \n " _wp setWaypointBehaviour ""SAFE"";" \n " _wp setWaypointFormation ""COLUMN"";" \n " _wp setWaypointSpeed ""NORMAL"";" \n "" \n " if(_debug) then {" \n " _marker = createMarker [format[""bon_ap%1"",_x],_x];" \n " _marker setMarkerType ""dot"";" \n " _marker setMarkersize [0.5,0.5];" \n " _marker setMarkerText str _index;" \n " _index = _index + 1;" \n " };" \n "" \n "} foreach _waypoints;" \n "" \n "if(typeName _wp == ""ARRAY"") then {_wp setWaypointType ""CYCLE""};"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class all_units_dead { priority = 0.000000; to="exit_2"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"{alive _x} count units _group == 0"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class in_combat { priority = 0.000000; to="in_combat_mode"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"behaviour leader _group == ""COMBAT"";"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class in_combat_mode { name = "in_combat_mode"; init = /*%FSM*/"{" \n " _x stop false;" \n " _x setUnitPos ""AUTO"";" \n "} foreach units _group;" \n "" \n "_group setFormation ""LINE"";" \n "" \n "{" \n "" \n " if(side _x == side leader _group && not isPlayer leader _x) then {" \n " group _x setBehaviour ""COMBAT"";" \n " };" \n "" \n "} foreach nearestObjects [_orientation,[""Man"",""LandVehicle"",""Air""],_maxdist] ;" \n "" \n "" \n "if(_debug) then{" \n " diag_log format[""Bon_AI_Mov: group %1 entered COMBAT Mode at time %2."",_group,time];" \n "};"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class not_in_combat { priority = 0.000000; to="occupy_buildings"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"behaviour leader _group != ""COMBAT"" && _behavior == ""hide"""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class not_in_combat_1 { priority = 0.000000; to="find__go_to_chil"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"behaviour leader _group != ""COMBAT"" && _behavior == ""standby"""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class all_units_dead { priority = 0.000000; to="exit_2"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"{alive _x} count units _group == 0"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class not_in_combat_2 { priority = 0.000000; to="assign_waypoints"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"behaviour leader _group != ""COMBAT"" && _behavior == ""patrol"""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class occupy_buildings { name = "occupy_buildings"; init = /*%FSM*/"_nearhouses = nearestObjects [_orientation,[""House""],_maxdist];" \n "" \n "" \n "_house = ObjNull;" \n "" \n "_fortpositions = [];" \n "while{count _nearhouses > 0 && count _fortpositions < count units _group} do {" \n " _buildingpos = 0;" \n "" \n " _house = _nearhouses select (floor random count _nearhouses);" \n " _nearhouses = _nearhouses - [_house];" \n "" \n " while{count ((_house buildingpos _buildingpos) - [0]) > 0} do {_buildingpos = _buildingpos + 1};" \n " _buildingpos = _buildingpos - 1;" \n "" \n " for ""_i"" from 2 to _buildingpos do {" \n " _fortpositions = _fortpositions + [_house buildingpos _i];" \n " };" \n "};" \n "" \n "_notenoughbuildings = false;" \n "if(count _fortpositions < count units _group) then {" \n " _notenoughbuildings = true;" \n " diag_log format[""Bon_AI_Mov: no buildings to hide for group %1. Sending to patrol."",_group];" \n "} else {" \n " for ""_i"" from 0 to (count units _group - 1) do {" \n " _unit = units _group select _i;" \n " _fortpos = _fortpositions select _i;" \n "" \n " if(_debug) then {" \n " _marker = createMarker [str random 999999,_fortpos];" \n " _marker setMarkerType ""dot"";" \n " _marker setMarkerSize [0.5,0.5];" \n " _marker setMarkerColor ""ColorOrange"";" \n " _marker setMarkerText ""hide"";" \n " };" \n "" \n " [_unit,_fortpos] spawn {" \n " (_this select 0) doMove (_this select 1);" \n "" \n " WaitUntil{currentCommand (_this select 0) != ""MOVE""};" \n " (_this select 0) setUnitPos ""Middle"";" \n " (_this select 0) stop true;" \n " };" \n " };" \n "};"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class not_enough_build { priority = 0.000000; to="restart_as_patro"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"_notenoughbuildings"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class all_units_dead { priority = 0.000000; to="exit_2"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"{alive _x} count units _group == 0"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class in_combat { priority = 0.000000; to="in_combat_mode"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"behaviour leader _group == ""COMBAT"";"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class restart_as_patro { name = "restart_as_patro"; init = /*%FSM*/"_behavior = ""patrol"";"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class patrol { priority = 0.000000; to="generate_waypoin"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"_behavior == ""patrol"""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class sit_down { name = "sit_down"; init = /*%FSM*/"{" \n " if(_x isKindOf ""Man"" && vehicle _x == _x) then {" \n " if(leader _x != _x) then {" \n " _x setpos [((getpos leader _x) select 0) + 5 - random 10, ((getpos leader _x) select 1) + 5 - random 10,0];" \n " _x doWatch position leader _x;" \n " };" \n " _x playMove ""amovpercmstpslowwrfldnon_amovpsitmstpsraswrfldnon"";" \n " _x setDir random 360;" \n " };" \n " _x stop true;" \n "} foreach units _group;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class all_units_dead { priority = 0.000000; to="exit_2"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"{alive _x} count units _group == 0"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class in_combat { priority = 0.000000; to="in_combat_mode"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"behaviour leader _group == ""COMBAT"";"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class find__go_to_chil { name = "find__go_to_chil"; init = /*%FSM*/"private [""_wp""];" \n "" \n "_isFlatEmpty = [];" \n "_count = 0;" \n "While{count _isFlatEmpty == 0 && _count < 10000} do {" \n "" \n " _randomplace = [(_orientation select 0) + _maxdist - random (2*_maxdist),(_orientation select 1) + _maxdist - random (2*_maxdist),0];" \n "" \n " _isFlatEmpty = _randomplace isflatempty [" \n " 5, //--- Minimal distance from another object" \n " 0, //--- If 0, just check position. If >0, select new one" \n " 0.4, //--- Max gradient" \n " 10, //--- Gradient area" \n " 0, //--- 0 for restricted water, 2 for required water," \n " false, //--- True if some water can be in 25m radius" \n " ObjNull //--- Ignored object" \n " ];" \n " if(count _isFlatEmpty > 0) then {" \n " if(count (_isFlatEmpty nearRoads 10) > 0) then {_isFlatEmpty = []};" \n " };" \n "" \n " _count = _count + 1;" \n "};" \n "" \n "_nochillplaces = false;" \n "if(_count == 10000) then {" \n " _nochillplaces = true;" \n " diag_log format[""Bon_AI_Mov: no places appropriate to standby for group %1. Sending to patrol."",_group];" \n "} else {" \n "" \n " if(_debug) then {" \n " _marker = createMarker [str random 999999,_isFlatEmpty];" \n " _marker setMarkerType ""dot"";" \n " _marker setMarkerSize [0.5,0.5];" \n " _marker setMarkerColor ""ColorBlue"";" \n " _marker setMarkerText ""standby"";" \n " };" \n "" \n " {deleteWaypoint _x} foreach waypoints _group;" \n " _wp = _group addWaypoint [_isFlatEmpty,0];" \n " _wp setWaypointFormation ""DIAMOND"";" \n "};"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class arrived_at_chill { priority = 0.000000; to="sit_down"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"currentWaypoint _group != _wp select 1"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class all_units_dead { priority = 0.000000; to="exit_2"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"{alive _x} count units _group == 0"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class no_chill__places { priority = 0.000000; to="restart_as_patro"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"_nochillplaces"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class exit_1 { name = "exit_1"; init = /*%FSM*/"diag_log ""Bon AI_Mov ABORT: The patrol system must run on serverside only"";"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { }; }; /*%FSM*/ /*%FSM*/ class exit_2 { name = "exit_2"; init = /*%FSM*/"diag_log format[""Bon_AI_Mov: all units of group %1 are dead."",_group];"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { }; }; /*%FSM*/ }; initState="start"; finalStates[] = { "exit", "exit_1", "exit_2", }; }; /*%FSM*//*%FSM*/ /*%FSM*/ /* item0[] = {"start",0,250,-113.254494,-153.959671,-70.013596,-122.759712,0.000000,"start"}; item1[] = {"not_isServer",4,218,-268.035706,-163.419235,-178.035797,-113.419220,0.000000,"not isServer"}; item2[] = {"client",1,250,-378.001617,-156.046555,-320.331726,-117.194901,0.000000,"client"}; item3[] = {"isServer",4,218,-133.853210,-64.630264,-43.853191,-14.630260,0.000000,"isServer"}; item4[] = {"set_new_overcast",2,250,-136.919006,42.170704,-46.918991,92.170700,0.000000,"set new" \n "overcast"}; item5[] = {"sleep",4,218,-136.919006,136.597046,-46.919006,186.597046,0.000000,"sleep"}; item6[] = {"set_new_weather",2,4346,61.744202,139.049667,151.744263,189.049622,0.000000,"set new" \n "weather"}; item7[] = {"sleep",4,218,65.423157,40.944389,155.423248,90.944397,0.000000,"sleep"}; link0[] = {0,1}; link1[] = {0,3}; link2[] = {1,2}; link3[] = {3,4}; link4[] = {4,5}; link5[] = {5,6}; link6[] = {6,7}; link7[] = {7,4}; globals[] = {0.000000,0,0,0,0,640,480,1,17,6316128,1,-544.055969,435.770630,432.139252,-293.839905,799,592,1}; window[] = {0,-1,-1,-32000,-32000,919,184,1443,182,1,817}; *//*%FSM*/ class FSM { fsmName = "dynamic weather"; class States { /*%FSM*/ class start { name = "start"; init = /*%FSM*/"_min_delay = 20*60; // min. time between weather change: 20min"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class isServer { priority = 0.000000; to="set_new_overcast"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"isServer"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class not_isServer { priority = 0.000000; to="client"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"not isServer && time > 0"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class client { name = "client"; init = /*%FSM*/"if(not isNil ""bon_new_weather"") then {" \n " _changetime = 0 max ((bon_new_weather select 3) - time + (bon_new_weather select 2)); " \n " _changetime setRain (bon_new_weather select 0);" \n " 0 setFog (bon_new_weather select 1);" \n "};" \n """bon_new_weather"" addPublicVariableEventHandler {" \n " _rain_prob = (_this select 1) select 0;" \n " _fog_prob = (_this select 1) select 1;" \n " _changetime = (_this select 1) select 2;" \n "" \n " _changetime setRain _rain_prob;" \n " _changetime setFog _fog_prob;" \n "};" \n "" \n "" \n "" \n "if(not isNil ""bon_new_overcast"") then {" \n " 0 setOvercast (bon_new_overcast select 3);" \n " _changetime = 0 max ((bon_new_overcast select 2) - time + (bon_new_overcast select 1)); " \n " _changetime setOvercast (bon_new_overcast select 0);" \n "};" \n """bon_new_overcast"" addPublicVariableEventHandler {" \n " _new_overcast = (_this select 1) select 0;" \n " _changetime = (_this select 1) select 1;" \n "" \n " _changetime setOvercast _new_overcast;" \n "};"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { }; }; /*%FSM*/ /*%FSM*/ class set_new_overcast { name = "set_new_overcast"; init = /*%FSM*/"_old_overcast = 0;" \n "if(not isNil ""_new_overcast"") then {_old_overcast = _new_overcast};" \n "_new_overcast = random 1;" \n "" \n "_delay = _min_delay + random (15*60);" \n "_changetime = _delay min ((15*60) + random (15*60));" \n "" \n "bon_new_overcast = [_new_overcast,_changetime,time,_old_overcast];" \n "publicVariable ""bon_new_overcast"";" \n "" \n "_changetime setOvercast _new_overcast;" \n "" \n "" \n "_time = time;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class sleep { priority = 0.000000; to="set_new_weather"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"time - _time > _changetime"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class set_new_weather { name = "set_new_weather"; init = /*%FSM*/"_rain_probability = 0;" \n "if(_new_overcast >= 0.7) then {" \n " _rain_probability = random 1;" \n "};" \n "" \n "_fog_probability = 0;" \n "if(_new_overcast > 0.7 && _rain_probability < 0.3) then {" \n " _fog_probability = random 1;" \n "};" \n "" \n "_delay = _min_delay + random (15*60);" \n "_changetime = _delay min ((15*60) + random (15*60));" \n "" \n "bon_new_weather = [_rain_probability,_fog_probability,_changetime,time];" \n "publicVariable ""bon_new_weather"";" \n "" \n "_changetime setRain _rain_probability;" \n "_changetime setFog _fog_probability;" \n "" \n "_time = time;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class sleep { priority = 0.000000; to="set_new_overcast"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"time - _time > _delay"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ }; initState="start"; finalStates[] = { "client", }; }; /*%FSM*//*%FSM*/ /*%FSM*/ /* item0[] = {"init",0,250,-24.991344,-359.127289,23.536909,-330.532104,0.000000,"init"}; item1[] = {"Marker",2,250,-27.105236,-189.770767,22.092102,-150.473236,0.000000,"Marker"}; item2[] = {"sleep",4,4314,77.353188,-188.417542,151.822403,-149.044235,0.000000,"sleep"}; item3[] = {"_",8,218,-22.888268,-284.468689,21.335150,-256.539551,0.000000,""}; item4[] = {"new_vec",4,218,91.887566,-282.180298,151.642426,-242.807129,10.000000,"new vec"}; item5[] = {"_",8,218,101.976181,-77.600906,127.928886,-55.532070,0.000000,""}; item6[] = {"change_markertyp",2,250,183.086990,-187.861282,254.286331,-146.853134,0.000000,"change" \n "markertype"}; item7[] = {"disabled",4,218,-453.669464,-364.791992,-381.653137,-324.601227,101.000000,"disabled"}; item8[] = {"exit",1,250,-435.283752,-44.881542,-399.234680,-15.317562,0.000000,"exit"}; item9[] = {"killed",4,218,-30.985111,-95.269806,26.719883,-55.206718,101.000000,"killed"}; item10[] = {"not_alive_unit",2,250,-192.484116,-95.269669,-133.122910,-55.206726,0.000000,"not alive" \n "unit"}; item11[] = {"is_Playable",4,218,-307.114502,-123.739967,-225.808273,-74.418938,0.000000,"is Playable"}; item12[] = {"not_Playable",4,218,-300.182037,-51.224136,-231.816772,-6.216805,0.000000,"not" \n "Playable"}; item13[] = {"MarkerColor_Blac",2,250,-304.342499,-189.353867,-227.656281,-151.003372,0.000000,"MarkerColor" \n "Black"}; item14[] = {"respawned",4,218,-309.335236,-290.870361,-222.663620,-250.024063,0.000000,"respawned"}; item15[] = {"set_Entity",2,250,-160.382401,-285.882080,-97.841888,-255.020538,0.000000,"set Entity"}; link0[] = {0,3}; link1[] = {0,7}; link2[] = {1,2}; link3[] = {1,4}; link4[] = {1,9}; link5[] = {2,1}; link6[] = {3,1}; link7[] = {4,6}; link8[] = {5,1}; link9[] = {6,5}; link10[] = {7,8}; link11[] = {9,10}; link12[] = {10,11}; link13[] = {10,12}; link14[] = {11,13}; link15[] = {12,8}; link16[] = {13,14}; link17[] = {14,15}; link18[] = {15,3}; globals[] = {0.000000,0,0,0,0,640,480,1,26,6316128,1,-496.810822,368.067627,206.433792,-431.980194,598,592,1}; window[] = {0,-1,-1,-1,-1,887,150,1409,150,1,616}; *//*%FSM*/ class FSM { fsmName = "markersystem"; class States { /*%FSM*/ class init { name = "init"; init = /*%FSM*/"private [""_isplayable"",""_my_marker"",""_curr_markertype""," \n " ""_markertype_inf"",""_markertype_car"",""_markertype_tank""," \n " ""_markertype_heli"",""_markertype_plane""];" \n "" \n "_unit = _this select 0;" \n "_isplayable =" \n " if(isMultiplayer) then{" \n " if(_unit in playableUnits) then{true} else{false};" \n " } else {" \n " if(_unit in allUnits) then{true} else {false};" \n " };" \n "" \n "bon_marker_system = true;" \n "ace_sys_tracking_markers_enabled = false;" \n "" \n "_vehicle = vehicle _unit;" \n "_name = name _unit;" \n "_shownname = _name;" \n "if(not _isplayable || not isPlayer _unit) then{_shownname = ""AI""};" \n "" \n "" \n "" \n "_disabled = false;" \n "_leaders_only = false;" \n "_all_units = false;" \n "" \n "switch (_this select 1) do {" \n " case 0 : {_disabled = true};" \n " case 1 : {_leaders_only = true};" \n " case 2 : {_all_units = true};" \n "};" \n "" \n "" \n "switch (side _unit) do {" \n " case WEST : {" \n " _curr_markertype = ""b_inf"";" \n "" \n " _markertype_inf = ""b_inf"";" \n " _markertype_car = ""b_motor_inf"";" \n " _markertype_tank = ""b_armor"";" \n " _markertype_heli = ""b_air"";" \n " _markertype_plane = ""b_plane"";" \n " };" \n " case EAST : {" \n " _curr_markertype = ""o_inf"";" \n "" \n " _markertype_inf = ""o_inf"";" \n " _markertype_car = ""o_motor_inf"";" \n " _markertype_tank = ""o_armor"";" \n " _markertype_heli = ""o_air"";" \n " _markertype_plane = ""o_plane"";" \n " };" \n " default {" \n " _curr_markertype = ""n_inf"";" \n "" \n " _markertype_inf = ""n_inf"";" \n " _markertype_car = ""n_motor_inf"";" \n " _markertype_tank = ""n_armor"";" \n " _markertype_heli = ""n_air"";" \n " _markertype_plane = ""n_plane"";" \n " };" \n "};"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class disabled { priority = 101.000000; to="exit"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"_disabled"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class _ { priority = 0.000000; to="Marker"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class Marker { name = "Marker"; init = /*%FSM*/"if(not isNil ""_my_marker"") then {deleteMarker _my_marker};" \n "" \n "_showmarker = (leader _unit == _unit && _leaders_only) || _all_units;" \n "_showmarker = _showmarker &&" \n " if(_vehicle == _unit) then {true}" \n " else{" \n " if(commander _vehicle == _unit) then {true}" \n " else{" \n " if((not isPlayer commander _vehicle || isNull commander _vehicle) && driver _vehicle == _unit) then{true}" \n " else{false};" \n " };" \n " };" \n "" \n "if(_showmarker) then {" \n " _my_marker = createMarker [format[""marker_%1"",_name],position _unit];" \n " _my_marker setMarkerType _curr_markertype;" \n " _my_marker setMarkerText format["" %1 [%2]"",_shownname, round (getPos _unit select 2)];" \n " _my_marker setMarkerSize [0.75,0.75];" \n "};" \n "" \n "if(_unit getVariable ""bon_ais_agony"") then {_my_marker setMarkerColor ""ColorRed""};" \n "" \n "_timenow = time;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class killed { priority = 101.000000; to="not_alive_unit"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"not alive _unit"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class new_vec { priority = 10.000000; to="change_markertyp"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"vehicle player != _vehicle"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class sleep { priority = 0.000000; to="Marker"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"time - _timenow > 2"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class change_markertyp { name = "change_markertyp"; init = /*%FSM*/"_vehicle = vehicle _unit;" \n "" \n "if(_vehicle isKindOf ""Man"") then{_curr_markertype = _markertype_inf};" \n "if(_vehicle isKindOf ""Car"") then{_curr_markertype = _markertype_car};" \n "if(_vehicle isKindOf ""Tank"") then{_curr_markertype = _markertype_tank};" \n "if(_vehicle isKindOf ""Helicopter"") then{_curr_markertype = _markertype_heli};" \n "if(_vehicle isKindOf ""Plane"") then{_curr_markertype = _markertype_plane};"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class _ { priority = 0.000000; to="Marker"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class exit { name = "exit"; init = /*%FSM*/"if(not isNil ""_my_marker"") then {deleteMarker _my_marker};"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { }; }; /*%FSM*/ /*%FSM*/ class not_alive_unit { name = "not_alive_unit"; init = /*%FSM*/""/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class not_Playable { priority = 0.000000; to="exit"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"not _isplayable"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class is_Playable { priority = 0.000000; to="MarkerColor_Blac"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"_isplayable"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class MarkerColor_Blac { name = "MarkerColor_Blac"; init = /*%FSM*/"_my_marker setMarkerColor ""ColorBlack"";"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class respawned { priority = 0.000000; to="set_Entity"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"{_name == name _x} count playableUnits > 0"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class set_Entity { name = "set_Entity"; init = /*%FSM*/"{" \n " if(name _x == _name) exitWith{_unit = _x};" \n "} foreach playableUnits;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class _ { priority = 0.000000; to="Marker"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ }; initState="init"; finalStates[] = { "exit", }; }; /*%FSM*//*%FSM*/ /*%FSM*/ /* item0[] = {"start",0,250,-258.712280,-264.799255,-214.197327,-235.535110,0.000000,"start"}; item1[] = {"fast_time",4,218,-98.662277,-274.581726,-19.364550,-227.257507,0.000000,"fast time"}; item2[] = {"skip_time",2,250,-104.013321,-183.612030,-14.013351,-133.612030,0.000000,"skip time"}; item3[] = {"normal_time",4,218,-280.601746,-190.301010,-197.290955,-141.638794,0.000000,"normal time"}; item4[] = {"_",-1,250,-241.137131,-201.003357,-214.381271,-201.003357,0.000000,""}; item5[] = {"exit",1,250,-259.197388,-93.979942,-216.688934,-66.722427,0.000000,"exit"}; item6[] = {"sleep_120",4,4314,-104.013397,-105.351196,-14.013378,-55.351173,0.000000,"sleep 120"}; version=1; class LayoutItems { class Item4 { class ItemInfo { FontFace="Arial"; FontHeight=10; lStyle=1; }; }; }; link0[] = {0,1}; link1[] = {0,3}; link2[] = {1,2}; link3[] = {2,6}; link4[] = {3,5}; link5[] = {6,2}; globals[] = {0.000000,0,0,0,0,640,480,1,8,6316128,1,-300.000000,300.000000,300.000000,-300.000000,897,592,1}; window[] = {0,-1,-1,-1,-1,787,50,1310,50,1,915}; *//*%FSM*/ class FSM { fsmName = "skiptime"; class States { /*%FSM*/ class start { name = "start"; init = /*%FSM*/"private ['_skipvalue'];" \n "" \n "_hours = _this select 0;" \n "" \n "switch _hours do {" \n " case 12 : {_skipvalue = 2};" \n " case 6 : {_skipvalue = 6};" \n " default {_skipvalue = 0; _hours = 0;};" \n "};" \n "" \n "_year = date select 0;" \n "_month = date select 1;" \n "_day = date select 2;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class normal_time { priority = 0.000000; to="exit"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"_hours == 0"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class fast_time { priority = 0.000000; to="skip_time"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"_hours != 0"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class skip_time { name = "skip_time"; init = /*%FSM*/"_hour = date select 3;" \n "_minute = (date select 4) + _skipvalue;" \n "" \n "setDate [_year,_month,_day,_hour,_minute];" \n "" \n "_timenow = time;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class sleep_120 { priority = 0.000000; to="skip_time"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"time - _timenow > 120"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class exit { name = "exit"; init = /*%FSM*/""/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { }; }; /*%FSM*/ }; initState="start"; finalStates[] = { "exit", }; }; /*%FSM*//*%FSM*/ /*%FSM*/ /* item0[] = {"start",0,250,-382.232910,-492.960907,-338.386841,-460.352448,0.000000,"start"}; item1[] = {"isServer",4,218,-285.776672,-502.070831,-226.227982,-451.507050,0.000000,"isServer"}; item2[] = {"not_isServer",4,218,-656.666504,-498.876709,-570.613892,-450.568512,0.000000,"not" \n "isServer"}; item3[] = {"exit",1,250,-632.742249,198.612488,-594.247192,231.889923,0.000000,"exit"}; item4[] = {"intact",2,250,-125.413277,-444.872650,7.247948,-343.482147,0.000000,"intact"}; item5[] = {"no_crew",4,218,55.170044,-465.527924,117.538483,-431.881378,0.000000,"no crew"}; item6[] = {"inactive",2,250,245.065598,-434.828888,300.903290,-408.417236,0.000000,"inactive"}; item7[] = {"has_crew",4,218,51.634956,-396.357666,111.169594,-354.531342,10.000000,"has crew"}; item8[] = {"not_canMove",4,218,-16.079824,-222.566971,77.986984,-156.299225,99.000000,"not" \n "canMove"}; item9[] = {"too_long_inactiv",4,4314,339.640320,-446.992981,429.640320,-396.993011,0.000000,"too long" \n "inactive"}; item10[] = {"reset_vec_to_bas",2,250,355.962860,-556.764343,413.427307,-515.711731,0.000000,"reset vec" \n "to base"}; item11[] = {"_",8,218,-79.569199,-550.767700,-36.745808,-518.662354,0.000000,""}; item12[] = {"wait_for_repairs",2,250,-83.124237,-15.370652,-15.899085,33.815956,0.000000,"wait for" \n "repairs"}; item13[] = {"canMove",4,218,-199.147476,-215.246506,-109.147522,-165.246506,101.000000,"canMove"}; item14[] = {"no_repairs_appli",4,218,-324.998016,-16.589272,-234.998032,33.410728,0.000000,"no repairs" \n "applied"}; item15[] = {"destruct_vehicle",2,250,-497.164063,-17.803951,-407.163696,32.196045,0.000000,"destruct" \n "vehicle"}; item16[] = {"sleep_spawndelay",4,218,-498.064514,-128.257950,-408.064575,-78.257950,0.000000,"sleep" \n "spawndelay"}; item17[] = {"respawn_vehicle",2,250,-495.528076,-230.721710,-405.528076,-180.721695,0.000000,"respawn" \n "vehicle"}; item18[] = {"_",8,218,-267.842651,-312.214111,-230.896515,-285.364868,0.000000,""}; item19[] = {"isnull",4,218,-99.853821,187.208328,-9.853992,237.208344,0.000000,"isnull"}; link0[] = {0,1}; link1[] = {0,2}; link2[] = {1,4}; link3[] = {2,3}; link4[] = {4,5}; link5[] = {4,8}; link6[] = {4,19}; link7[] = {5,6}; link8[] = {6,7}; link9[] = {6,8}; link10[] = {6,9}; link11[] = {6,19}; link12[] = {7,4}; link13[] = {8,12}; link14[] = {9,10}; link15[] = {10,11}; link16[] = {11,4}; link17[] = {12,13}; link18[] = {12,14}; link19[] = {12,19}; link20[] = {13,4}; link21[] = {14,15}; link22[] = {15,16}; link23[] = {15,19}; link24[] = {16,17}; link25[] = {17,18}; link26[] = {18,4}; link27[] = {19,3}; globals[] = {0.000000,0,0,0,0,640,480,1,22,6316128,1,-781.047729,523.981567,264.032715,-603.688599,1325,951,1}; window[] = {2,-1,-1,-1,-1,787,1970,3230,50,3,1343}; *//*%FSM*/ class FSM { fsmName = "vehicle respawn"; class States { /*%FSM*/ class start { name = "start"; init = /*%FSM*/"_vehicle = vehicle (_this select 0);" \n "_spawntime = _this select 1;" \n "_startpos = getPos _vehicle;" \n "_pos = _startpos;" \n "_dir = getDir _vehicle;" \n "_typ = typeOf _vehicle;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class not_isServer { priority = 0.000000; to="exit"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"not isServer"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class isServer { priority = 0.000000; to="intact"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"isServer"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class exit { name = "exit"; init = /*%FSM*/""/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { }; }; /*%FSM*/ /*%FSM*/ class intact { name = "intact"; init = /*%FSM*/""/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class not_canMove { priority = 99.000000; to="wait_for_repairs"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"not canMove _vehicle || fuel _vehicle == 0"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class isnull { priority = 0.000000; to="exit"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"isNull _vehicle"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class no_crew { priority = 0.000000; to="inactive"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"count crew _vehicle == 0"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class inactive { name = "inactive"; init = /*%FSM*/"_timenow = time;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class not_canMove { priority = 99.000000; to="wait_for_repairs"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"not canMove _vehicle || fuel _vehicle == 0"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class has_crew { priority = 10.000000; to="intact"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"count crew _vehicle > 0"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class isnull { priority = 0.000000; to="exit"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"isNull _vehicle"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class too_long_inactiv { priority = 0.000000; to="reset_vec_to_bas"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"time - _timenow > 3600"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class reset_vec_to_bas { name = "reset_vec_to_bas"; init = /*%FSM*/"_vehicle setPos [_pos select 0, _pos select 1, 0];" \n "" \n "_vehicle engineOn false;" \n "_vehicle setDir _dir;" \n "_vehicle setDamage 0;" \n "_vehicle setFuel 1;" \n "_vehicle setVehicleAmmo 1;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class _ { priority = 0.000000; to="intact"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class wait_for_repairs { name = "wait_for_repairs"; init = /*%FSM*/"_timenow = time;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class canMove { priority = 101.000000; to="intact"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"canMove _vehicle && fuel _vehicle > 0"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class isnull { priority = 0.000000; to="exit"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"isNull _vehicle"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class no_repairs_appli { priority = 0.000000; to="destruct_vehicle"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"time - _timenow > 600 || damage _vehicle == 1"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class destruct_vehicle { name = "destruct_vehicle"; init = /*%FSM*/"_vehicle setDamage 1;" \n "_timenow = time;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class isnull { priority = 0.000000; to="exit"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"isNull _vehicle"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class sleep_spawndelay { priority = 0.000000; to="respawn_vehicle"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"time - _timenow > _spawntime"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class respawn_vehicle { name = "respawn_vehicle"; init = /*%FSM*/"deleteVehicle _vehicle;" \n "_vehicle = _typ createVehicle [_pos select 0, _pos select 1, 0];" \n "_vehicle setPos [_pos select 0, _pos select 1, 0];" \n "_vehicle setDir _dir;" \n "_vehicle lock false;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class _ { priority = 0.000000; to="intact"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ }; initState="start"; finalStates[] = { "exit", }; }; /*%FSM*//*%FSM*/ /*%FSM*/ /* item0[] = {"start",0,250,-373.032593,-284.857239,-318.484283,-253.586380,0.000000,"start"}; item1[] = {"died",4,218,-391.451599,228.116882,-301.451599,278.116913,0.000000,"died"}; item2[] = {"is_dead",2,250,-391.269012,87.134377,-301.268982,137.134491,0.000000,"is dead"}; item3[] = {"on_foot",2,250,-21.742039,-285.148743,32.806461,-247.188858,0.000000,"on foot"}; item4[] = {"_",8,218,-251.031876,-280.686462,-194.052063,-251.006500,0.000000,""}; item5[] = {"entered_vehicle",4,218,-39.488911,-189.243393,50.511112,-139.243393,0.000000,"entered" \n "vehicle"}; item6[] = {"in_vehicle",2,250,-44.157448,-71.059593,57.565674,2.034799,0.000000,"in vehicle"}; item7[] = {"get_out",4,218,-27.269299,469.415649,62.730694,519.415649,99.000000,"get out"}; item8[] = {"remove_actions",2,4346,-13.643346,680.463928,40.309288,718.207825,0.000000,"remove" \n "actions"}; item9[] = {"_",8,218,276.669250,-286.053375,337.110413,-246.867584,0.000000,""}; item10[] = {"is_crew",4,218,-155.750076,92.536636,-65.750084,142.536621,0.000000,"is crew"}; item11[] = {"no_crew",4,218,48.788742,90.360695,138.788818,140.360687,0.000000,"no crew"}; item12[] = {"is_driver",2,250,-155.750092,226.357239,-65.750061,276.357300,0.000000,"is driver"}; item13[] = {"is_not_driver",2,250,48.788738,223.093323,138.788727,273.093292,0.000000,"is not driver"}; item14[] = {"not_playable",4,218,-391.231781,-13.326699,-301.231781,36.673271,0.000000,"not playable"}; item15[] = {"exit",1,250,-373.518372,-109.127876,-316.243805,-74.962837,0.000000,"exit"}; item16[] = {"not_local_unit",4,218,-390.408997,-215.380112,-300.408997,-165.380112,0.000000,"not local" \n "unit"}; item17[] = {"is_playable",4,218,-512.367798,87.683662,-440.136139,137.264435,0.000000,"is" \n "playable"}; item18[] = {"wait_for_respawn",2,250,-637.015747,94.686630,-586.250916,130.419525,0.000000,"wait for" \n "respawn"}; item19[] = {"alive_again",4,218,-648.175781,-17.617540,-578.863342,34.522636,0.000000,"alive" \n "again"}; item20[] = {"set_Entity",2,250,-645.959534,-408.561798,-583.369629,-385.210632,0.000000,"set Entity"}; item21[] = {"",7,210,300.773651,692.957947,308.773682,700.957947,0.000000,""}; item22[] = {"",7,210,-226.233566,-398.654358,-218.233566,-390.654358,0.000000,""}; link0[] = {0,4}; link1[] = {0,16}; link2[] = {1,2}; link3[] = {2,14}; link4[] = {2,17}; link5[] = {3,1}; link6[] = {3,5}; link7[] = {4,3}; link8[] = {5,6}; link9[] = {6,1}; link10[] = {6,10}; link11[] = {6,11}; link12[] = {7,8}; link13[] = {8,1}; link14[] = {8,21}; link15[] = {9,3}; link16[] = {10,12}; link17[] = {11,13}; link18[] = {12,1}; link19[] = {12,7}; link20[] = {12,11}; link21[] = {13,7}; link22[] = {13,10}; link23[] = {14,15}; link24[] = {16,15}; link25[] = {17,18}; link26[] = {18,19}; link27[] = {19,20}; link28[] = {20,22}; link29[] = {21,9}; link30[] = {22,4}; globals[] = {0.000000,0,0,0,0,640,480,1,32,6316128,1,-531.483215,344.906769,973.917175,-314.254211,647,951,1}; window[] = {2,-1,-1,-1,-1,862,2045,3305,125,3,665}; *//*%FSM*/ class FSM { fsmName = "vehicledrivercheck"; class States { /*%FSM*/ class start { name = "start"; init = /*%FSM*/"private [""_resupply"",""_halo"",""_loadammo"",""_unloadammo"",""_vehicle"",""_uavaction"",""_supplydropaction""];" \n "" \n "_unit = player;" \n "if(not isNil ""_this"") then {" \n " if(count _this > 0) then {_unit = _this select 0};" \n "};" \n "" \n "_isplayable =" \n " if(isMultiplayer) then{" \n " if(_unit in playableUnits) then{true} else{false};" \n " } else { false};" \n "" \n "" \n ""/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class not_local_unit { priority = 0.000000; to="exit"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"not local _unit"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class _ { priority = 0.000000; to="on_foot"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class is_dead { name = "is_dead"; init = /*%FSM*/""/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class is_playable { priority = 0.000000; to="wait_for_respawn"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"_isplayable"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class not_playable { priority = 0.000000; to="exit"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"not _isplayable"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class on_foot { name = "on_foot"; init = /*%FSM*/"_vehicle = vehicle _unit;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class entered_vehicle { priority = 0.000000; to="in_vehicle"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"vehicle _unit != _unit"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class died { priority = 0.000000; to="is_dead"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"not alive _unit"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class in_vehicle { name = "in_vehicle"; init = /*%FSM*/"_vehicle = vehicle _unit;" \n "" \n "if(typeOf _vehicle in tfor_mobileuavterminals && not isNil ""bon_uav_logic"") then {" \n " _terminals = bon_uav_logic getVariable ""uav_terminals"";" \n " bon_uav_logic setVariable [""uav_terminals"",(_terminals-[_vehicle])+[_vehicle]];" \n "};"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class is_crew { priority = 0.000000; to="is_driver"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"driver _vehicle == _unit || commander _vehicle == _unit || gunner _vehicle == _unit"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class no_crew { priority = 0.000000; to="is_not_driver"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"driver _vehicle != _unit && commander _vehicle != _unit && gunner _vehicle != _unit"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class died { priority = 0.000000; to="is_dead"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"not alive _unit"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class remove_actions { name = "remove_actions"; init = /*%FSM*/"if(not isNil ""_resupply"") then{_vehicle removeAction _resupply};" \n "if(not isNil ""_loadammo"") then {_vehicle removeAction _loadammo};" \n "if(not isNil ""_unloadammo"") then {_vehicle removeAction _unloadammo};" \n "if(not isNil ""_supplydropaction"") then {_vehicle removeAction _supplydropaction};"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class _ { priority = 0.000000; to="on_foot"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class died { priority = 0.000000; to="is_dead"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"not alive _unit"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class is_driver { name = "is_driver"; init = /*%FSM*/"" \n "" \n "_resupply_condition = ""count nearestObjects [_target,['Base_WarfareBVehicleServicePoint'],10] > 0"";" \n "if(driver _vehicle == _unit) then {" \n " _resupply = _vehicle addAction [""Resupply"",""scripts\rearm.sqf"",[],99,true,true,"""",_resupply_condition];" \n "};" \n "" \n "if(driver _vehicle == _unit && typeOf _vehicle in tfor_vehicles_canload_ammo) then {" \n " _loadammo = _vehicle addAction [""Load Ammo"",""scripts\ammobox_load.sqf"",[],1,false,true,"""",_resupply_condition + "" || count nearestObjects [position _target,[tfor_loadable_boxtype],5] > 0"" ];" \n " _unloadammo = _vehicle addAction [""Unload Ammo"",""scripts\ammobox_unload.sqf"",[],1,false,true,"""",""_target getVariable 'tfor_ammoloaded'""];" \n "};" \n "" \n "if(driver _vehicle == _unit && typeOf _vehicle in tfor_choppers_can_lift) then {" \n " [_vehicle] execVM ""scripts\heli_lift.sqf"";" \n "};"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class get_out { priority = 99.000000; to="remove_actions"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"vehicle _unit == _unit"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class no_crew { priority = 0.000000; to="is_not_driver"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"driver _vehicle != _unit && commander _vehicle != _unit && gunner _vehicle != _unit"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class died { priority = 0.000000; to="is_dead"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"not alive _unit"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class is_not_driver { name = "is_not_driver"; init = /*%FSM*/"if(not isNil ""_resupply"") then{_vehicle removeAction _resupply};" \n "if(not isNil ""_loadammo"") then {_vehicle removeAction _loadammo};" \n "if(not isNil ""_unloadammo"") then {_vehicle removeAction _unloadammo};"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class get_out { priority = 99.000000; to="remove_actions"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"vehicle _unit == _unit"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class is_crew { priority = 0.000000; to="is_driver"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"driver _vehicle == _unit || commander _vehicle == _unit || gunner _vehicle == _unit"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class exit { name = "exit"; init = /*%FSM*/""/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { }; }; /*%FSM*/ /*%FSM*/ class wait_for_respawn { name = "wait_for_respawn"; init = /*%FSM*/"_name_unit = name _unit;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class alive_again { priority = 0.000000; to="set_Entity"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"{_name_unit == name _x} count playableUnits > 0"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class set_Entity { name = "set_Entity"; init = /*%FSM*/"{" \n " if(name _x == _name_unit) exitWith{_unit = _x};" \n "} foreach playableUnits;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class _ { priority = 0.000000; to="on_foot"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ }; initState="start"; finalStates[] = { "exit", }; }; /*%FSM*/if !isDedicated then { startLoadingScreen ["Loading...","RscLoadScreenCustom"]; }; enableSaving [false, false]; waitUntil { isServer || !isNull player }; waitUntil { !isNil "BIS_MPF_InitDone" }; waitUntil { BIS_MPF_InitDone }; #include "config.sqf" [] execFSM "fsm\vehicledrivercheck.fsm"; _ammo = tfor_ammobox createVehicleLocal getMarkerPos "ammoboxes"; _ammo allowDamage false; _ammo addAction ["Save Loadout", "scripts\saveloadout.sqf",[],-99,false,true,"",""]; [_ammo] execVM "scripts\ammocrate_filler.sqf"; res = [] execVM "scripts\ofpec_lightbulbs.sqf"; // Global Variable Init curTime = time; //mission start time serverLoadHint = false; //server load hint message if (local player) then { call compile preprocessFileLineNumbers "initclient.sqf"; }; if (isServer) then { call compile preprocessFileLineNumbers "initserver.sqf"; }; #include "defines.sqf" #include "common\initclient-common.sqf"if (isServer) then { execVM "op4\cleanup.sqf"; nul= [i1,z1,1000,3600] execVM "op4\ied.sqf"; nul= [i2,z2,1000,3600] execVM "op4\ied.sqf"; nul= [i3,z3,1000,3600] execVM "op4\ied.sqf"; nul= [i4,z4,1000,3600] execVM "op4\ied.sqf"; nul= [i5,z5,1000,3600] execVM "op4\ied.sqf"; nul= [i6,z6,1000,3600] execVM "op4\ied.sqf"; nul= [i7,center,3000,3600] execVM "op4\ied.sqf"; nul= [i8,center,3000,3600] execVM "op4\ied.sqf"; nul= [i9,center,3000,3600] execVM "op4\ied.sqf"; nul= [i10,center,3000,3600] execVM "op4\ied.sqf"; }; #include "defines.sqf" #include "common\initserver-common.sqf"// ====================== // Loading screen related // ====================== #ifndef LOADSCREENTEXT #define LOADSCREEN "img\loading_CO.paa" #endif #ifndef LOADSCREENTEXT #define LOADSCREENTEXT "Loading..." #endif class RscLoadingText : RscText { x = SafezoneX+0.025; y = SafezoneY; w = SafezoneW*0.95; h = SafezoneH*0.075; sizeEx = 0.05; text = ""; colorText[] = { 1,1,0.8,1}; shadow = 2; }; class RscProgress { idc = 104; type = 8; style = 0; shadow = 2; texture = "\ca\ui\data\loadscreen_progressbar_ca.paa"; colorFrame[] = { 0,0,0,0}; colorBar[] = { 1,1,1,1}; x = (SafezoneX+(SafezoneW -SafezoneH*3/4)/2)+ (0.5/2/4)*3*SafezoneH; y = SafezoneY+SafezoneH*0.95; w =0.5* (((SafezoneW*3)/4)/SafezoneW)/(1/SafezoneH); h = 0.0261438; }; class RscLoadingBg : RscText { x = SafeZoneXAbs; y = safezoneY; w = SafeZoneWAbs; h = safezoneH; text = ""; colorText[] = { 0,0,0,0}; colorBackground[] = { 0,0,0,1}; }; class RscLoadingPicture: RscPicture { style = 48 + 0x800; // Keep aspect ratio x = SafezoneX; y = SafezoneY+SafezoneH*0.075; w = SafezoneW; h = SafezoneH*0.85; text = ""; }; class RscLoadScreenCustom { idd = -1; duration = 10e10; fadein = 0; fadeout = 0; name = "Loading Screen"; class ControlsBackground { class Loading_BG : RscLoadingBg { }; class Loading_CE2 : RscLoadingPicture { text = LOADSCREEN; }; }; class controls { class Title1 : RscLoadingText { text = LOADSCREENTEXT; }; class CA_Progress : RscProgress { }; }; }; /////////////////////////////////////////////////////////////////// // Function file for Armed Assault // Created by: BIS // Customised for OA by (AEF)Wolffy.au [CTB] // Created: 20110315 // Contact: http://dev-heaven.net/projects/mip // Purpose: Enable house effects for ALICE2 module /////////////////////////////////////////////////////////////////// private ["_allTopics","_endSentences","_tempArray","_element","_type","_topic","_path","_category","_screams","_scream","_categoryId","_oldScreams","_allScreams","_Remarks","_oldRemarks","_allRemarks","_civilianConversations","_civilianScreams","_civilianRemarks","_source","_twnEffects","_doors","_doorlist","_bbox","_obj","_houselist","_doorcount","_doorsAll","_twn","_logic","_AIdoor","_allConversations","_kbCategories"]; waituntil {!isnil "BIS_fnc_init"}; _logic = bis_alice_mainscope; //--- Dummy door _AIdoor = "BIS_alice_emptydoor" createvehicle [1000,10,10]; _logic setvariable ["dummydoor",_AIdoor]; /////////////////////////////////////////////////////////////////////////////////// ///// Civilian Actions /////////////////////////////////////////////////////////////////////////////////// /* _allActionsx = _logic getvariable ["ALICE_actionsx", []]; _allActions = _logic getvariable ["ALICE_actions", []]; _actionCategories = _logic getvariable "civilianActions"; for "_i" from 0 to 2 do { _source = [configfile,missionconfigfile,campaignconfigfile] select _i; _tempArrayx = []; { _civilianActions = _source >> "CfgCivilianActions" >> _x; if (str _civilianActions != "") then { _tempArrayx = _tempArrayx + [_civilianActions]; for "_i" from 0 to (count _civilianActions - 1) do { _action = _civilianActions select _i; if (isclass _action) then { _condition = gettext(_action >> "condition"); _fsm = gettext(_action >> "fsm"); _rarity = getnumber(_action >> "rarity"); _locked = getnumber(_action >> "locked"); _canrepeat = getnumber(_action >> "canRepeat"); _initVariables = getarray(_action >> "initVariables"); _init = gettext(_action >> "init"); _allActions = _allActions + [ [ _action, // 0 configname _action, // 1 _condition, // 2 _fsm, // 3 _rarity, // 4 _locked, // 5 _canrepeat, // 6 _initVariables, // 7 _init // 8 ] ]; }; }; }; } foreach _actionCategories; _allActionsx = _allActionsx + [_tempArrayx]; }; _logic setvariable ["ALICE_actionsx",_allActionsx]; _logic setvariable ["ALICE_actions",_allActions]; */ /////////////////////////////////////////////////////////////////////////////////// ///// Civilian Conversations /////////////////////////////////////////////////////////////////////////////////// _allConversations = _logic getvariable ["ALICE_conversations", [[],[],[],[]]]; _allTopics = _logic getvariable ["ALICE_topics", []]; _allScreams = _logic getvariable ["ALICE_screams", []]; _allRemarks = _logic getvariable ["ALICE_remarks", []]; _kbCategories = _logic getvariable "civilianConversations"; for "_i" from 0 to 2 do { _source = [configfile,missionconfigfile,campaignconfigfile] select _i; _tempArray = []; { _civilianConversations = _source >> "CfgCivilianConversations" >> _x; for "_i" from 0 to (count _civilianConversations - 1) do { _topic = "ALICE_" + (configname _civilianConversations); _path = gettext (_civilianConversations >> "path"); if !(_topic in _allTopics) then {_allTopics = _allTopics + [_topic,_path]}; _category = _civilianConversations select _i; if (isclass _category) then { _type = getnumber (_category >> "type"); _tempArray = _allConversations select _type; for "_c" from 0 to (count _category - 1) do { _element = _category select _c; if (isclass _element) then { _endSentences = getarray (_element >> "endSentences"); _tempArray = _tempArray + [[(configname _civilianConversations),configname _element,_endSentences]]; }; }; _allConversations set [_type,_tempArray]; }; }; //--- Screams _civilianScreams = _source >> "CfgCivilianScreams" >> _x; _screams = []; for "_i" from 0 to (count _civilianScreams - 1) do { _scream = _civilianScreams select _i; if (isclass _scream) then { _screams = _screams + [configname _scream]; }; }; if (_x in _allscreams) then { _categoryId = (_allScreams find _x) + 1; _oldScreams = _allScreams select _categoryId; _allScreams set [_categoryId,_oldScreams + _screams]; } else { _allScreams = _allScreams + [_x,_screams]; }; //--- Remarks _civilianRemarks = _source >> "CfgCivilianRemarks" >> _x; _remarks = []; for "_i" from 0 to (count _civilianRemarks - 1) do { _scream = _civilianRemarks select _i; if (isclass _scream) then { _Remarks = _Remarks + [configname _scream]; }; }; if (_x in _allRemarks) then { _categoryId = (_allRemarks find _x) + 1; _oldRemarks = _allRemarks select _categoryId; _allRemarks set [_categoryId,_oldRemarks + _Remarks]; } else { _allRemarks = _allRemarks + [_x,_remarks]; }; } foreach _kbCategories; }; _logic setvariable ["ALICE_conversations",_allConversations]; _logic setvariable ["ALICE_screams",_allScreams]; _logic setvariable ["ALICE_remarks",_allRemarks]; _logic setvariable ["ALICE_topics",_allTopics]; _twnEffects = []; while{!isNil "BIS_ALICE_fnc_houseEffects"} do { { _twn = _x; if(!(_twn getVariable "ALICE_active") && (_twn in _twnEffects)) then { _twnEffects = _twnEffects - [_twn]; }; if(!isNil "BIS_ALICE_fnc_houseEffects" && (_twn getVariable "ALICE_active") && !(_twn in _twnEffects)) then { _twnEffects = _twnEffects + [_twn]; //--- Remove small objects and objects on blacklist _houselist = nearestObjects [_twn, ["Building"], 500]; _doorlist = []; private["_x"]; { _bbox = abs((boundingbox _x select 1) select 0) min abs((boundingbox _x select 1) select 1); if (_bbox > 3) then { //--- Include _doors = _x call BIS_ALICE_fnc_doorCreate; _doorlist = _doorlist + _doors; }; } foreach _houselist; _doorcount = count _doorlist; _twn setvariable ["doorcountdef",_doorcount]; _doorsAll = _twn nearentities ["bis_alice_emptydoor",500]; _doors = []; private["_x"]; { _obj = _x getvariable "ALICE_obj"; if (!isnil "_obj") then { if (alive _obj) then { _doors = _doors + [_x] } else { if (count crew _obj == 0) then {deletevehicle _obj}; }; }; } foreach _doorsAll; { [_x] spawn { private ["_door","_timeStop","_randomValue","_daytimeStart","_daytimeEnd","_rain","_overcast","_fog"]; _door = _this select 0; [1,_door] spawn BIS_ALICE_fnc_houseEffects; _timeStop = time + ((random 30) * 60); _randomValue = random 1; _daytimeStart = 5 + 4*_randomValue; _daytimeEnd = 18 + 2*_randomValue; _rain = 0.2*_randomValue; _overcast = 0.8 + 0.2*_randomValue; _fog = 0.8 + 0.2*_randomValue; waitUntil{!alive _door || time > _timeStop || ((daytime >=_daytimeStart && daytime <= _daytimeEnd) && rain <= _rain && overcast <= _overcast && fog <= _fog) }; [0,_door] spawn BIS_ALICE_fnc_houseEffects; }; } forEach _doors; }; } forEach (_logic getvariable "ALICE_alltowns"); sleep 1; }; /////////////////////////////////////////////////////////////////// // Function file for Armed Assault // Created by: (AEF)Wolffy.au [CTB] // Created: 20110315 // Contact: http://dev-heaven.net/projects/mip // Purpose: Export settings for amibent civilian module /////////////////////////////////////////////////////////////////// diag_log "----------"; diag_log "ALICE2 default settings"; { diag_log format["%1 = %2", _x, BIS_alice_mainscope getVariable _x]; } forEach [ "townlist", "spawnDistance", "trafficDistance", "civilianRarity", "civilianCount", "civilianActions", "respectModifyCoef", "threatDecay", "ALICE_civilianinit", "townsFaction", "ALICE_alltowns", "ALICE_classes", "ALICE_classesVehicles", "ALICE_actions", "ALICE_topics", "ALICE_screams", "rarityurban", "ALICE_townsize", "initArray", "civilianActions", "civilianConversations", "blacklist" ]; diag_log "----------"; /////////////////////////////////////////////////////////////////// // Function file for Armed Assault // Created by: (AEF)Wolffy.au [CTB] // Created: 20110315 // Contact: http://dev-heaven.net/projects/mip // Purpose: Export settings for amibent civilian vehicles module /////////////////////////////////////////////////////////////////// diag_log "----------"; diag_log "SILVIE default settings"; { diag_log format["%1 = %2", _x, BIS_silvie_mainscope getVariable _x]; } forEach [ "townlist", "blackList", "vehicleRarity", "vehicleCount", "vehicleInit", "roadDistance", "attempts", "rarityurban" ]; diag_log "----------"; ////////////////////////////////////////////////////////////////// // Function file for Armed Assault // Created by: (AEF)Wolffy.au [CTB] // Created: 20110315 // Contact: http://dev-heaven.net/projects/mip // Purpose: Setup amibent civilian module /////////////////////////////////////////////////////////////////// // Override default BIS_ALICE2_fnc_civilianSet function with MIP patch // - Fixed issues with units spawning on roofs in Chernarus // - Fixed some typos // - Added bis_alice_emptydoor code for A2 building compatibility // - Reduced default AI skill for less CPU // - Changed unit speed to LIMITED BIS_ALICE2_fnc_civilianSet = compile preprocessFileLineNumbers "CA\modules_e\alice2\data\scripts\fn_civilianSet.sqf"; // See http://community.bistudio.com/wiki/Ambient_Civilians //BIS_alice_mainscope setVariable ["debug", true]; // list of places where civilians will be spawned. Can be location logic (created by BIS_fnc_locations), array in format [center,distance] or trigger. // BIS_alice_mainscope setVariable ["townlist",[bis_loc_acityc_mogilevka,[position this,3000],trigger1]]; // distance of player(s) to town logic (in metres) in which system is starting to spawn civilians. // BIS_alice_mainscope setVariable ["spawnDistance", 400]; // distance of player(s) to town logic (in metres) in which system is starting to spawn civilian traffic. // BIS_alice_mainscope setVariable ["trafficDistance", 500]; // Changing civilian rarity numbers (e.g. to have villagers spawned in cities, or to disable spawning of given class completely with unusual number like 10). Default rarity numbers are set in config under rarityUrban value (in range from 0/village to 1/city) // BIS_alice_mainscope setVariable ["vehicleRarity",["Citizen1",10,"Worker2",0.8]]; // formula on which basis system calculates number of civilians for locations. %1 is number of buildings with door (memory points called "AIDoor1", "AIDoor2", ...) in 500 metres from location. // BIS_alice_mainscope setVariable ["civilianCount","round (4 * (sqrt %1))"]; switch toLower(worldName) do { case "chernarus": { BIS_alice_mainscope setvariable ["trafficDistance",1000]; BIS_alice_mainscope setvariable ["spawnDistance",700]; BIS_alice_mainscope setVariable ["townsFaction",["CIV","CIV_RU"]]; [] spawn compile preprocessFileLineNumbers "mip\ALICE2_houseEffects.sqf"; }; case "eden": { BIS_alice_mainscope setvariable ["trafficDistance",700]; BIS_alice_mainscope setvariable ["spawnDistance",350]; BIS_alice_mainscope setVariable ["townsFaction",["CIV","CIV_RU"]]; [] spawn compile preprocessFileLineNumbers "mip\ALICE2_houseEffects.sqf"; }; case "fallujah": { BIS_alice_mainscope setvariable ["trafficDistance",600, true]; BIS_alice_mainscope setvariable ["spawnDistance",250, true]; BIS_alice_mainscope setVariable ["townsFaction",["BIS_TK_CIV","BIS_CIV_special"], true]; }; case "isladuala": { BIS_alice_mainscope setvariable ["trafficDistance",1000]; BIS_alice_mainscope setvariable ["spawnDistance",700]; BIS_alice_mainscope setVariable ["civilianCount","round (5 * (sqrt %1))"]; [] spawn compile preprocessFileLineNumbers "mip\ALICE2_houseEffects.sqf"; }; case "takistan": { BIS_alice_mainscope setvariable ["trafficDistance",1000]; BIS_alice_mainscope setvariable ["spawnDistance",700]; // Add some rare english speaking civilians to the mix //BIS_alice_mainscope setVariable ["townsFaction",["BIS_TK_CIV","BIS_CIV_special"]]; }; case "torabora": { BIS_alice_mainscope setvariable ["trafficDistance",1500, true]; BIS_alice_mainscope setvariable ["spawnDistance",600, true]; //BIS_alice_mainscope setVariable ["townsFaction",["BIS_TK_CIV","BIS_CIV_special"]]; }; case "utes": { BIS_alice_mainscope setvariable ["trafficDistance",650]; BIS_alice_mainscope setvariable ["spawnDistance",500]; BIS_alice_mainscope setVariable ["townsFaction",["CIV","CIV_RU"]]; [] spawn compile preprocessFileLineNumbers "mip\ALICE2_houseEffects.sqf"; }; case "zargabad": { BIS_alice_mainscope setvariable ["trafficDistance",750]; BIS_alice_mainscope setvariable ["spawnDistance",600]; // Add some rare english speaking civilians to the mix //BIS_alice_mainscope setVariable ["townsFaction",["BIS_TK_CIV","BIS_CIV_special"]]; //[BIS_alice_mainscope, "civilianRarity",["CIV_EuroWoman01_EP1", 1, "CIV_EuroWoman02_EP1", 1, "Dr_Annie_Baker_EP1", 10, "Rita_Ensler_EP1", 10, "CIV_EuroMan01_EP1", 1, "CIV_EuroMan02_EP1", 10, "Haris_Press_EP1", 10, "Dr_Hladik_EP1", 10, "Citizen2_EP1", 1, "Citizen3_EP1", 1, "Profiteer2_EP1", 1, "Functionary1_EP1", 1, "Functionary2_EP1", 1]] call BIS_fnc_variableSpaceAdd; }; }; // list of action categories from CfgCivilianActions // BIS_alice_mainscope setVariable ["civilianActions",["BIS"]]; // artificial coeficient to set how much will be town's respect decreased once some civilian is hit or killed. The higher the number is, the more is respect towards killer's faction decreased. // BIS_alice_mainscope setVariable ["respectModifyCoef",0.15]; BIS_alice_mainscope setvariable ["respectModifyCoef", 0.7]; // value which is removed from town threat every 5 seconds (until threat reaches 0) // BIS_alice_mainscope setVariable ["threatDecay",0.07 ]; BIS_alice_mainscope setvariable ["threatDecay", 0.00005]; // array of codes which is executed upon every civilian unit created. //[BIS_alice_mainscope,"ALICE_civilianinit",[{_this addweapon "Mk_48"}]] call bis_fnc_variablespaceadd; // Dumb down civilian units to use less CPU (see http://creobellum.org/node/175) BIS_alice_mainscope setvariable ["ALICE_civilianinit",[ {_this setSkill 0.4}, {_this allowFleeing 1}, {removeAllWeapons _this}, {removeAllItems _this}, { // add handguns to 40% of the civilians if (random 1 > 0.6) then { if (random 1 > 0.5) then { _this addMagazine "8Rnd_9x18_Makarov"; _this addMagazine "8Rnd_9x18_Makarov"; _this addWeapon "Makarov"; } else { _this addMagazine "6Rnd_45ACP"; _this addMagazine "6Rnd_45ACP"; _this addWeapon "revolver_EP1"; }; }; } ]];////////////////////////////////////////////////////////////////// // Function file for Armed Assault // Created by: (AEF)Wolffy.au [CTB] // Created: 20110315 // Contact: http://dev-heaven.net/projects/mip // Purpose: Setup amibent animals module /////////////////////////////////////////////////////////////////// // http://community.bistudio.com/wiki/Ambient_Animals BIS_animals_debug = true;////////////////////////////////////////////////////////////////// // Function file for Armed Assault // Created by: (AEF)Wolffy.au [CTB] // Created: 20110315 // Contact: http://dev-heaven.net/projects/mip // Purpose: Setup functions module /////////////////////////////////////////////////////////////////// // Override default BIS_fnc_locations function with MIP patch // - Used town name variable to set unique marker ID in custom locations BIS_fnc_locations = compile preprocessFileLineNumbers "CA\modules\functions\systems\fn_locations.sqf"; // See http://community.bistudio.com/wiki/Functions_Library////////////////////////////////////////////////////////////////// // Function file for Armed Assault // Created by: (AEF)Wolffy.au [CTB] // Created: 20110315 // Contact: http://dev-heaven.net/projects/mip // Purpose: Setup amibent civilian vehicles module /////////////////////////////////////////////////////////////////// // http://community.bistudio.com/wiki/Ambient_Civilian_Vehicles //BIS_silvie_mainscope setVariable ["debug", true]; // list of places where vehicles will be spawned. Can be location logic (created by BIS_fnc_locations), array in format [center,distance] or trigger. // BIS_silvie_mainscope setVariable ["townlist", [bis_loc_acityc_mogilevka,[position this,3000],trigger1]]; // object classes which will be excluded from list of building around which cars are generated. // BIS_silvie_mainscope setVariable ["blackList", ["house1","house2"]]; // Changing vehicle rarity numbers (e.g. to have village cars spawned in cities, or to disable spawning of given class completely with unusual number like 10). Default rarity numbers are set in config under rarityUrban value (in range from 0/village to 1/city) // BIS_silvie_mainscope setVariable ["vehicleRarity",["skodaRed",10,"skodaBlue",0.8]]; // add motorbikes and bicycles to Ambient Vehicles BIS_silvie_mainscope setVariable ["vehicleRarity",[ "MMT_Civ ", (random 1), "TT650_Civ", (random 1), "TT650_TK_CIV_EP1", (random 1), "Old_bike_TK_CIV_EP1", (random 1), "Old_moto_TK_Civ_EP1", (random 1) ]]; // formula on which basis system calculates number of vehicles for location. %1 is number of buildings (blacklisted objects are excluded) in 500 metres from location. // BIS_silvie_mainscope setVariable ["vehicleCount","round ((sqrt %1) * 1.5)"]; // Reduce vehicle count formula to try to reduce number of civilian vehicles switch toLower(worldName) do { case "chernarus": { BIS_silvie_mainscope setvariable ["vehicleCount","round ((sqrt %1) * 1.0)"]; }; case "eden": { BIS_silvie_mainscope setvariable ["vehicleCount","round ((sqrt %1) * 0.75)"]; }; case "fallujah": { BIS_silvie_mainscope setvariable ["vehicleCount","round ((sqrt %1) * 0.5)"]; }; case "isladuala": { BIS_silvie_mainscope setvariable ["vehicleCount","round ((sqrt %1) * 2.0)"]; }; case "takistan": { BIS_silvie_mainscope setvariable ["vehicleCount","round ((sqrt %1) * 1.0)"]; }; case "torabora": { BIS_silvie_mainscope setvariable ["vehicleCount","round ((sqrt %1) * 1.0)"]; }; case "utes": { BIS_silvie_mainscope setvariable ["vehicleCount","round ((sqrt %1) * 0.75)"]; }; case "zargabad": { BIS_silvie_mainscope setvariable ["vehicleCount","round ((sqrt %1) * 0.5)"]; }; }; // custom init which is executed on every car. Vehicle can be accessed using _this variable. Init is executed as separate script, so sleep or waituntil commands can be used without limitations. // BIS_silvie_mainscope setVariable ["vehicleInit",{}]; BIS_silvie_mainscope setVariable ["vehicleInit",{ if (random 1>0.6) then { _this lock true; } else { _this setFuel (random 1); _this setDamage (random 0.5); } }]; // when creating car around building, if there is some road closer than this value, vehicle will be attached to this road instead of to building. // BIS_silvie_mainscope setVariable ["roadDistance",25]; // number of attempts to create vehicle (failed attempt is for instance when some road is detected near building, but it's crossroad). // BIS_silvie_mainscope setVariable ["attempts",10]; version=11; class Mission { addOns[]= { "fallujah_v1_0", "acex_usnavy_men_usmc", "ca_modules_functions", "CA_Modules_Alice2", "ca_modules_silvie", "ca_modules_e_weather", "ca_modules_clouds", "cacharacters_e", "caweapons_e", "ace_sys_wounds", "ace_sys_playerhud", "camisc_e_wf", "camisc3", "camisc_e", "CAWheeled2_LAV25", "warfarebuildings", "CAWheeled_E", "CAAir2_UH1Y", "CATracked2_AAV", "CATracked_E", "cawheeled_e_hmmwv", "cawheeled2_m1114_armored", "CAMisc", "ace_sys_repair", "CAWheeled_E_ATV", "casigns_e", "acex_usnavy_veh_ah1", "caweapons_e_ammoboxes", "camp_armory_misc_info_board", "ace_sys_crewserved", "ace_sys_fastroping", "ca_missions_garbagecollector" }; addOnsAuto[]= { "acex_usnavy_men_usmc", "ca_modules_functions", "cacharacters_e", "ca_missions_garbagecollector", "CA_Modules_Alice2", "ca_modules_silvie", "ace_sys_wounds", "ace_sys_playerhud", "ace_sys_repair", "CAWheeled_E", "cawheeled_e_hmmwv", "cawheeled2_m1114_armored", "CAMisc", "camisc3", "camisc_e", "CAWheeled_E_ATV", "casigns_e", "caweapons_e_ammoboxes", "camp_armory_misc_info_board", "CAAir2_UH1Y", "acex_usnavy_veh_ah1", "camisc_e_wf", "CATracked_E", "CATracked2_AAV", "CAWheeled2_LAV25", "caweapons_e", "ace_sys_crewserved", "ace_sys_fastroping", "warfarebuildings", "fallujah_v1_0" }; randomSeed=4821503; class Intel { briefingName="15th ACE Fallujah Insurgency [v0.4se]"; briefingDescription="Edits by Cytreen Spiegel"; resistanceEast=1; startWeather=0; forecastWeather=0; year=2010; month=1; day=11; hour=12; minute=0; }; class Groups { items=50; class Item0 { side="LOGIC"; class Vehicles { items=1; class Item0 { position[]={10118.187,7,5211.4194}; azimut=-85.014992; id=0; side="LOGIC"; vehicle="Logic"; leader=1; skill=0.60000002; text="vclSpawn1"; }; }; }; class Item1 { side="LOGIC"; class Vehicles { items=1; class Item0 { position[]={6426.0269,6.9800091,71.638672}; azimut=330.76736; id=1; side="LOGIC"; vehicle="Logic"; leader=1; skill=0.60000002; text="vclSpawn3"; }; }; }; class Item2 { side="LOGIC"; class Vehicles { items=1; class Item0 { position[]={71.224358,7,8927.1504}; azimut=512.37317; id=2; side="LOGIC"; vehicle="Logic"; leader=1; skill=0.60000002; text="vclSpawn2"; }; }; }; class Item3 { side="LOGIC"; class Vehicles { items=1; class Item0 { position[]={5073.1509,10.357053,4976.2783}; id=3; side="LOGIC"; vehicle="Logic"; leader=1; skill=0.60000002; text="center"; }; }; }; class Item4 { side="LOGIC"; class Vehicles { items=1; class Item0 { position[]={3719.4541,6.9900088,5893.2236}; special="NONE"; id=7; side="LOGIC"; vehicle="Logic"; leader=1; skill=1; text="z1"; }; }; }; class Item5 { side="LOGIC"; class Vehicles { items=1; class Item0 { position[]={6047.5142,10.410429,6004.9727}; special="NONE"; id=8; side="LOGIC"; vehicle="Logic"; leader=1; skill=1; text="z2"; }; }; }; class Item6 { side="LOGIC"; class Vehicles { items=1; class Item0 { position[]={3986.9109,6.9907308,4393.7085}; special="NONE"; id=9; side="LOGIC"; vehicle="Logic"; leader=1; skill=1; text="z3"; }; }; }; class Item7 { side="LOGIC"; class Vehicles { items=1; class Item0 { position[]={6141.6406,7,4239.1499}; special="NONE"; id=10; side="LOGIC"; vehicle="Logic"; leader=1; skill=1; text="z4"; }; }; }; class Item8 { side="LOGIC"; class Vehicles { items=1; class Item0 { position[]={4408.3086,6.9907308,2993.0142}; special="NONE"; id=11; side="LOGIC"; vehicle="Logic"; leader=1; skill=1; text="z5"; }; }; }; class Item9 { side="LOGIC"; class Vehicles { items=1; class Item0 { position[]={5707.52,7,2781.5933}; special="NONE"; id=12; side="LOGIC"; vehicle="Logic"; leader=1; skill=1; text="z6"; }; }; }; class Item10 { side="WEST"; class Vehicles { items=1; class Item0 { position[]={5694.9233,7,9864.5537}; azimut=263.31921; id=14; side="WEST"; vehicle="ACE_USMC_Soldier2_D"; leader=1; skill=0.60000002; init="this moveindriver flag1; this allowdamage false;"; }; }; }; class Item11 { side="LOGIC"; class Vehicles { items=1; class Item0 { position[]={5684.9727,7,9833.4521}; azimut=677.70007; id=36; side="LOGIC"; vehicle="LocationLogic"; leader=1; skill=0.2; init="if(isserver)then{(createvehicle [""Land_Lampa_Ind_EP1"",[getPos this select 0, getPos this select 1, (getPos this select 2) +1],[],0,""NONE""]) setdir ((getdir this)+90)};"; description="Lamp"; }; }; }; class Item12 { side="LOGIC"; class Vehicles { items=1; class Item0 { position[]={5642.625,7,9840.6816}; id=66; side="LOGIC"; vehicle="Logic"; leader=1; skill=0.60000002; text="fob"; }; }; }; class Item13 { side="WEST"; class Vehicles { items=1; class Item0 { position[]={5697.6421,9.7800007,9952.1289}; azimut=408.91699; id=68; side="WEST"; vehicle="ACE_USMC_Soldier_D"; leader=1; skill=1; init="this allowdamage false; this moveingunner (nearestObject [this, ""M2HD_mini_TriPod_US_EP1""]);"; }; }; }; class Item14 { side="WEST"; class Vehicles { items=1; class Item0 { position[]={5757.0054,11.903811,9898.6865}; azimut=493.461; id=70; side="WEST"; vehicle="ACE_USMC_Soldier_D"; leader=1; skill=1; init="this allowdamage false; this moveingunner (nearestObject [this, ""M2HD_mini_TriPod_US_EP1""]);"; }; }; }; class Item15 { side="WEST"; class Vehicles { items=1; class Item0 { position[]={5756.1499,7,9812.6953}; azimut=45; id=72; side="WEST"; vehicle="ACE_USMC_Soldier_D"; leader=1; skill=1; init="this allowdamage false; this moveingunner (nearestObject [this, ""M2HD_mini_TriPod_US_EP1""]);"; }; }; }; class Item16 { side="WEST"; class Vehicles { items=1; class Item0 { position[]={5708.896,9.7800007,9858.1504}; azimut=70; id=74; side="WEST"; vehicle="ACE_USMC_Soldier_D"; leader=1; skill=1; init="this allowdamage false; this moveingunner (nearestObject [this, ""ACE_M240M145_Tripod""]);"; }; }; }; class Item17 { side="WEST"; class Vehicles { items=1; class Item0 { position[]={5760.4058,7,9771.7881}; azimut=222.297; id=76; side="WEST"; vehicle="ACE_USMC_Soldier_D"; leader=1; skill=1; init="this allowdamage false; this moveingunner (nearestObject [this, ""M2HD_mini_TriPod_US_EP1""]);"; }; }; }; class Item18 { side="WEST"; class Vehicles { items=1; class Item0 { position[]={5700.2202,9.7800007,9764.6328}; azimut=225.744; id=78; side="WEST"; vehicle="ACE_USMC_Soldier_D"; leader=1; skill=1; init="this allowdamage false; this moveingunner (nearestObject [this, ""M2HD_mini_TriPod_US_EP1""]);"; }; }; }; class Item19 { side="WEST"; class Vehicles { items=1; class Item0 { position[]={5647.4438,7,9802.1387}; azimut=160; id=80; side="WEST"; vehicle="ACE_USMC_Soldier_D"; leader=1; skill=1; init="this allowdamage false; this moveingunner (nearestObject [this, ""ACE_M240M145_Tripod""]);"; }; }; }; class Item20 { side="WEST"; class Vehicles { items=1; class Item0 { position[]={5593.7944,9.7800007,9856.2783}; azimut=318.18201; id=82; side="WEST"; vehicle="ACE_USMC_Soldier_D"; leader=1; skill=1; init="this allowdamage false; this moveingunner (nearestObject [this, ""M2HD_mini_TriPod_US_EP1""]);"; }; }; }; class Item21 { side="WEST"; class Vehicles { items=5; class Item0 { position[]={1.7657733,7,3.4373527}; azimut=4.7759399; special="NONE"; id=84; side="WEST"; vehicle="ACE_USMC_Soldier_TL_D"; player="PLAYER COMMANDER"; leader=1; rank="SERGEANT"; skill=1; text="Hitman111"; init="this setGroupId [""Hitman 1 - 1 -""];"; description="Hitman 1-1-1 (Team Leader)"; }; class Item1 { position[]={1.0781373,7,2.8034699}; azimut=4.7759399; special="NONE"; id=85; side="WEST"; vehicle="ACE_USMC_Soldier_Medic_D"; player="PLAY CDG"; rank="CORPORAL"; skill=1; text="Hitman112"; description="Hitman 1-1-2 (Corpsman)"; }; class Item2 { position[]={1.5337583,7,2.8125782}; azimut=4.7759399; special="NONE"; id=86; side="WEST"; vehicle="ACE_USMC_Soldier_LAT_D"; player="PLAY CDG"; skill=1; text="Hitman113"; description="Hitman 1-1-3 (AT)"; }; class Item3 { position[]={1.9412911,7,2.7849002}; azimut=4.7759399; special="NONE"; id=87; side="WEST"; vehicle="ACE_USMC_Soldier_D"; player="PLAY CDG"; skill=1; text="Hitman114"; description="Hitman 1-1-4 (Rifleman)"; }; class Item4 { position[]={2.4534035,7,2.7664626}; azimut=-4.4677; special="NONE"; id=106; side="WEST"; vehicle="ACE_USMC_Soldier_AR_D"; player="PLAY CDG"; skill=0.60000002; text="Hitman115"; description="Hitman 1-1-5 (AR)"; }; }; }; class Item22 { side="WEST"; class Vehicles { items=5; class Item0 { position[]={3.9395819,7,3.4560547}; azimut=-2.1303799; special="NONE"; id=88; side="WEST"; vehicle="ACE_USMC_Soldier_TL_D"; player="PLAY CDG"; leader=1; rank="SERGEANT"; skill=1; text="Hitman121"; init="this setGroupId [""Hitman 1 - 2 -""]; "; description="Hitman 1-2-1 (Team Leader)"; }; class Item1 { position[]={3.2301433,7,2.8671875}; azimut=7.6438298; special="NONE"; id=89; side="WEST"; vehicle="ACE_USMC_Soldier_Medic_D"; player="PLAY CDG"; rank="CORPORAL"; skill=1; text="Hitman122"; description="Hitman 1-2-2 (Corpsman)"; }; class Item2 { position[]={3.645098,7,2.8535156}; azimut=10.358; special="NONE"; id=90; side="WEST"; vehicle="ACE_USMC_Soldier_LAT_D"; player="PLAY CDG"; skill=1; text="Hitman123"; description="Hitman 1-2-3 (AT)"; }; class Item3 { position[]={4.1069016,7,2.8193359}; azimut=4.5981202; special="NONE"; id=91; side="WEST"; vehicle="ACE_USMC_Soldier_D"; player="PLAY CDG"; skill=1; text="Hitman124"; description="Hitman 1-2-4 (Rifleman)"; }; class Item4 { position[]={4.5620127,7,2.8256836}; special="NONE"; id=105; side="WEST"; vehicle="ACE_USMC_Soldier_AR_D"; player="PLAY CDG"; skill=0.60000002; text="Hitman125"; description="Hitman 1-2-5 (AR)"; }; }; }; class Item23 { side="WEST"; class Vehicles { items=5; class Item0 { position[]={6.2073793,7,3.498395}; azimut=1.64; special="NONE"; id=92; side="WEST"; vehicle="ACE_USMC_Soldier_TL_D"; player="PLAY CDG"; leader=1; rank="SERGEANT"; skill=1; text="Hitman131"; init="this setGroupId [""Hitman 1 - 3 -""]; "; description="Hitman 1-3-1 (Team Leader)"; }; class Item1 { position[]={5.3095813,7,2.8268929}; azimut=1.64; special="NONE"; id=93; side="WEST"; vehicle="ACE_USMC_Soldier_Medic_D"; player="PLAY CDG"; rank="CORPORAL"; skill=1; text="Hitman132"; description="Hitman 1-3-2 (Corpsman)"; }; class Item2 { position[]={5.807363,7,2.8464806}; azimut=1.64; special="NONE"; id=94; side="WEST"; vehicle="ACE_USMC_Soldier_LAT_D"; player="PLAY CDG"; skill=1; fuel=0.76006347; text="Hitman133"; description="Hitman 1-3-3 (AT)"; }; class Item3 { position[]={6.3340859,7,2.8438385}; azimut=1.64; special="NONE"; id=95; side="WEST"; vehicle="ACE_USMC_Soldier_D"; player="PLAY CDG"; skill=1; text="Hitman134"; description="Hitman 1-3-4 (Rifleman)"; }; class Item4 { position[]={6.8696146,7,2.8564608}; azimut=-0.95768797; special="NONE"; id=104; side="WEST"; vehicle="ACE_USMC_Soldier_AR_D"; player="PLAY CDG"; skill=0.60000002; text="Hitman135"; description="Hitman 1-3-5 (AR)"; }; }; }; class Item24 { side="WEST"; class Vehicles { items=5; class Item0 { position[]={1.7314167,7,1.9123759}; azimut=1.33568; special="NONE"; id=96; side="WEST"; vehicle="ACE_USMC_Soldier_TL_D"; player="PLAY CDG"; leader=1; rank="SERGEANT"; skill=1; text="Hitman141"; init="this setGroupId [""Hitman 1 - 4 -""]; "; description="Hitman 1-4-1 (Team Leader)"; }; class Item1 { position[]={1.007308,7,1.2594087}; azimut=1.33568; special="NONE"; id=97; side="WEST"; vehicle="ACE_USMC_Soldier_Medic_D"; player="PLAY CDG"; rank="CORPORAL"; skill=1; text="Hitman142"; description="Hitman 1-4-2 (Corpsman)"; }; class Item2 { position[]={1.5102125,7,1.2810047}; azimut=1.33568; special="NONE"; id=98; side="WEST"; vehicle="ACE_USMC_Soldier_LAT_D"; player="PLAY CDG"; skill=1; text="Hitman143"; description="Hitman 1-4-3 (AT)"; }; class Item3 { position[]={2.0118525,7,1.2586508}; azimut=1.33568; special="NONE"; id=99; side="WEST"; vehicle="ACE_USMC_Soldier_D"; player="PLAY CDG"; skill=1; text="Hitman144"; description="Hitman 1-4-4 (Rifleman)"; }; class Item4 { position[]={2.4703214,7,1.2753761}; azimut=-1.2427599; special="NONE"; id=103; side="WEST"; vehicle="ACE_USMC_Soldier_AR_D"; player="PLAY CDG"; skill=0.60000002; text="Hitman145"; description="Hitman 1-4-5 (AR)"; }; }; }; class Item25 { side="LOGIC"; class Vehicles { items=1; class Item0 { position[]={-735.82593,7,793.14502}; id=102; side="LOGIC"; vehicle="Logic"; leader=1; skill=0.60000002; text="server"; }; }; }; class Item26 { side="EAST"; class Vehicles { items=1; class Item0 { presence=0; position[]={-5.9152722,7,-322.61963}; azimut=93.227798; special="NONE"; id=111; side="EAST"; vehicle="TK_INS_Soldier_TL_EP1"; leader=1; skill=1; text="east1"; }; }; }; class Item27 { side="EAST"; class Vehicles { items=1; class Item0 { presence=0; position[]={43.145344,7,-321.63916}; azimut=93.227798; special="NONE"; id=110; side="EAST"; vehicle="TK_INS_Soldier_TL_EP1"; leader=1; skill=1; text="east2"; }; }; }; class Item28 { side="EAST"; class Vehicles { items=1; class Item0 { presence=0; position[]={83.375076,7,-398.17432}; azimut=93.227798; special="NONE"; id=109; side="EAST"; vehicle="TK_INS_Soldier_TL_EP1"; leader=1; skill=1; text="east3"; }; }; }; class Item29 { side="EAST"; class Vehicles { items=1; class Item0 { presence=0; position[]={-39.276482,7,-410.92822}; azimut=93.227798; special="NONE"; id=108; side="EAST"; vehicle="TK_INS_Soldier_TL_EP1"; leader=1; skill=1; text="east4"; }; }; }; class Item30 { side="EAST"; class Vehicles { items=1; class Item0 { position[]={-597.59009,7,800.89337}; azimut=-180.42642; special="NONE"; id=116; side="EAST"; vehicle="TK_INS_Soldier_EP1"; leader=1; rank="COLONEL"; skill=1; text="graveDigger"; init="this allowDamage false; doStop this"; }; }; }; class Item31 { side="CIV"; class Vehicles { items=1; class Item0 { position[]={-615.27405,7,1093.0129}; id=120; side="CIV"; vehicle="TK_CIV_Takistani01_EP1"; leader=1; skill=1; text="pilotController"; init="this allowDamage false; doStop this"; }; }; }; class Item32 { side="WEST"; class Vehicles { items=5; class Item0 { position[]={4.041914,7,1.918457}; azimut=4.8561201; special="NONE"; id=121; side="WEST"; vehicle="ACE_USMC_Soldier_TL_D"; player="PLAY CDG"; leader=1; rank="SERGEANT"; skill=1; text="Hitman151"; init="this setGroupId [""Hitman 1 - 5 -""];"; description="Hitman 1-5-1 (Team Leader)"; }; class Item1 { position[]={3.3739378,7,1.2495117}; azimut=1.05485; special="NONE"; id=122; side="WEST"; vehicle="ACE_USMC_Soldier_Medic_D"; player="PLAY CDG"; rank="CORPORAL"; skill=1; text="Hitman152"; description="Hitman 1-5-2 (Corpsman)"; }; class Item2 { position[]={3.8905909,7,1.2543945}; azimut=-1.6067801; special="NONE"; id=123; side="WEST"; vehicle="ACE_USMC_Soldier_LAT_D"; player="PLAY CDG"; skill=1; text="Hitman153"; description="Hitman 1-5-3 (AT)"; }; class Item3 { position[]={4.3325014,7,1.2324219}; azimut=-6.9849401; special="NONE"; id=124; side="WEST"; vehicle="ACE_USMC_Soldier_D"; player="PLAY CDG"; skill=1; text="Hitman154"; description="Hitman 1-5-4 (Rifleman)"; }; class Item4 { position[]={4.7770553,7,1.2387695}; special="NONE"; id=125; side="WEST"; vehicle="ACE_USMC_Soldier_AR_D"; player="PLAY CDG"; skill=0.60000002; text="Hitman155"; description="Hitman 1-5-5 (AR)"; }; }; }; class Item33 { side="WEST"; class Vehicles { items=5; class Item0 { position[]={6.305481,7,1.8191528}; azimut=7.3308802; special="NONE"; id=126; side="WEST"; vehicle="ACE_USMC_Soldier_TL_D"; player="PLAY CDG"; leader=1; rank="SERGEANT"; skill=1; text="Hitman161"; init="this setGroupId [""Hitman 1 - 6 -""];"; description="Hitman 1-6-1 (Team Leader)"; }; class Item1 { position[]={5.4636683,7,1.1077285}; azimut=2.4711499; special="NONE"; id=127; side="WEST"; vehicle="ACE_USMC_Soldier_Medic_D"; player="PLAY CDG"; rank="CORPORAL"; skill=1; text="Hitman162"; description="Hitman 1-6-2 (Corpsman)"; }; class Item2 { position[]={5.9256964,7,1.0980116}; azimut=2.4778199; special="NONE"; id=128; side="WEST"; vehicle="ACE_USMC_Soldier_LAT_D"; player="PLAY CDG"; skill=1; text="Hitman163"; description="Hitman 1-6-3 (AT)"; }; class Item3 { position[]={6.4335089,7,1.0810617}; azimut=-0.64619201; special="NONE"; id=129; side="WEST"; vehicle="ACE_USMC_Soldier_D"; player="PLAY CDG"; skill=1; text="Hitman164"; description="Hitman 1-6-4 (Rifleman)"; }; class Item4 { position[]={6.936636,7,1.0518495}; azimut=0.77029699; special="NONE"; id=130; side="WEST"; vehicle="ACE_USMC_Soldier_AR_D"; player="PLAY CDG"; skill=0.60000002; text="Hitman165"; description="Hitman 1-6-5 (AR)"; }; }; }; class Item34 { side="LOGIC"; class Vehicles { items=1; class Item0 { position[]={-662.73523,7,1010.6333}; id=132; side="LOGIC"; vehicle="GarbageCollector"; leader=1; lock="UNLOCKED"; skill=0.60000002; init="BIS_GC setVariable [""auto"",true];"; }; }; }; class Item35 { side="LOGIC"; class Vehicles { items=3; class Item0 { position[]={-723.53101,7,960.0874}; id=100; side="LOGIC"; vehicle="FunctionsManager"; leader=1; lock="UNLOCKED"; skill=0.60000002; init="call compile preprocessFileLineNumbers ""mip\init-functions.sqf"";"; }; class Item1 { presenceCondition="isServer && (paramsArray select 1 == 1)"; position[]={-722.71631,7,895.06836}; id=131; side="LOGIC"; vehicle="Alice2Manager"; lock="UNLOCKED"; skill=0.60000002; init="call compile preprocessFileLineNumbers ""mip\init-alice2.sqf"";"; }; class Item2 { presenceCondition="isServer && (paramsArray select 1 == 1)"; position[]={-668.41187,7,858.91113}; id=133; side="LOGIC"; vehicle="SilvieManager"; lock="UNLOCKED"; skill=0.60000002; init="call compile preprocessFileLineNumbers ""mip\init-silvie.sqf"";"; }; }; }; class Item36 { side="LOGIC"; class Vehicles { items=1; class Item0 { position[]={23.889166,7,11.12854}; id=134; side="LOGIC"; vehicle="Logic"; leader=1; skill=0.60000002; text="mhqbox"; }; }; }; class Item37 { side="LOGIC"; class Vehicles { items=1; class Item0 { position[]={-670.68903,7,512.21643}; id=135; side="LOGIC"; vehicle="ACE_Wounds_Logic"; leader=1; lock="UNLOCKED"; skill=0.60000002; init="ace_sys_wounds_leftdam = 0; ace_sys_wounds_no_rpunish = true; ace_sys_wounds_withSpect = true; ace_wounds_prevtime = 320; ace_sys_wounds_noai = true;"; }; }; }; class Item38 { side="LOGIC"; class Vehicles { items=1; class Item0 { position[]={-595.75793,7,514.00977}; id=136; side="LOGIC"; vehicle="ACE_Wounds_EveryoneMedic"; leader=1; lock="UNLOCKED"; skill=0.60000002; }; }; }; class Item39 { side="LOGIC"; class Vehicles { items=1; class Item0 { position[]={-512.75378,7,514.67236}; id=137; side="LOGIC"; vehicle="ACE_SYS_PRespawn_Logic"; leader=1; lock="UNLOCKED"; skill=0.60000002; }; }; }; class Item40 { side="LOGIC"; class Vehicles { items=1; class Item0 { position[]={59.70174,7,-28.462646}; special="NONE"; id=138; side="LOGIC"; vehicle="Logic"; leader=1; skill=1; text="i1"; }; }; }; class Item41 { side="LOGIC"; class Vehicles { items=1; class Item0 { position[]={163.56479,7,-53.19165}; special="NONE"; id=147; side="LOGIC"; vehicle="Logic"; leader=1; skill=1; text="i10"; }; }; }; class Item42 { side="LOGIC"; class Vehicles { items=1; class Item0 { position[]={59.70174,7,-50.718994}; special="NONE"; id=143; side="LOGIC"; vehicle="Logic"; leader=1; skill=1; text="i6"; }; }; }; class Item43 { side="LOGIC"; class Vehicles { items=1; class Item0 { position[]={84.430984,7,-52.839111}; special="NONE"; id=144; side="LOGIC"; vehicle="Logic"; leader=1; skill=1; text="i7"; }; }; }; class Item44 { side="LOGIC"; class Vehicles { items=1; class Item0 { position[]={83.017654,7,-27.403076}; special="NONE"; id=139; side="LOGIC"; vehicle="Logic"; leader=1; skill=1; text="i2"; }; }; }; class Item45 { side="LOGIC"; class Vehicles { items=1; class Item0 { position[]={105.98079,7,-27.756104}; special="NONE"; id=140; side="LOGIC"; vehicle="Logic"; leader=1; skill=1; text="i3"; }; }; }; class Item46 { side="LOGIC"; class Vehicles { items=1; class Item0 { position[]={108.10042,7,-53.545654}; special="NONE"; id=145; side="LOGIC"; vehicle="Logic"; leader=1; skill=1; text="i8"; }; }; }; class Item47 { side="LOGIC"; class Vehicles { items=1; class Item0 { position[]={134.59607,7,-52.13208}; special="NONE"; id=146; side="LOGIC"; vehicle="Logic"; leader=1; skill=1; text="i9"; }; }; }; class Item48 { side="LOGIC"; class Vehicles { items=1; class Item0 { position[]={133.88951,7,-28.109619}; special="NONE"; id=141; side="LOGIC"; vehicle="Logic"; leader=1; skill=1; text="i4"; }; }; }; class Item49 { side="LOGIC"; class Vehicles { items=1; class Item0 { position[]={162.85825,7,-26.696533}; special="NONE"; id=142; side="LOGIC"; vehicle="Logic"; leader=1; skill=1; text="i5"; }; }; }; }; class Vehicles { items=127; class Item0 { position[]={5614.3062,7,9834.6553}; azimut=764.73102; id=4; side="EMPTY"; vehicle="ACE_MTVRRefuel_DES_EP1"; skill=0.60000002; init="_resp = [this,60] execFSM ""fsm\vehicle_lifecycle.fsm""; this addWeaponCargo [""ACE_PRC119_ACU"",1];;"; }; class Item1 { position[]={5606.0356,7,9842.9961}; azimut=764.73102; id=5; side="EMPTY"; vehicle="ACE_MTVRRepair_DES_EP1"; skill=0.60000002; init="_resp = [this,60] execFSM ""fsm\vehicle_lifecycle.fsm""; this addWeaponCargo [""ACE_PRC119_ACU"",1];"; }; class Item2 { position[]={5596.8135,7,9851.9082}; azimut=763.51001; id=6; side="EMPTY"; vehicle="MTVR_DES_EP1"; skill=0.60000002; init="_resp = [this,60] execFSM ""fsm\vehicle_lifecycle.fsm""; this addWeaponCargo [""ACE_PRC119_ACU"",1];"; }; class Item3 { position[]={5692.6328,7,9865.958}; azimut=193.31891; id=13; side="EMPTY"; vehicle="HMMWV_DES_EP1"; leader=1; lock="LOCKED"; skill=0.60000002; text="flag1"; init="this allowdamage false; nul= [this] execVM ""op4\stayput.sqf""; this setFuel 0;"; }; class Item4 { position[]={5611.561,7,9837.5869}; azimut=764.73102; id=15; side="EMPTY"; vehicle="ACE_MTVRRefuel_DES_EP1"; skill=0.60000002; init="_resp = [this,60] execFSM ""fsm\vehicle_lifecycle.fsm""; this addWeaponCargo [""ACE_PRC119_ACU"",1];"; }; class Item5 { position[]={5608.7168,7,9840.292}; azimut=764.73102; id=16; side="EMPTY"; vehicle="ACE_MTVRRepair_DES_EP1"; skill=0.60000002; init="_resp = [this,60] execFSM ""fsm\vehicle_lifecycle.fsm""; this addWeaponCargo [""ACE_PRC119_ACU"",1];"; }; class Item6 { position[]={5600.123,7,9848.623}; azimut=403.67899; special="NONE"; id=17; side="EMPTY"; vehicle="MtvrReammo_DES_EP1"; leader=1; skill=1; init="_resp = [this,60] execFSM ""fsm\vehicle_lifecycle.fsm""; this addWeaponCargo [""ACE_PRC119_ACU"",1];"; }; class Item7 { position[]={5603.2559,7,9845.6973}; azimut=403.67899; special="NONE"; id=18; side="EMPTY"; vehicle="MtvrReammo_DES_EP1"; leader=1; skill=1; init="_resp = [this,60] execFSM ""fsm\vehicle_lifecycle.fsm""; this addWeaponCargo [""ACE_PRC119_ACU"",1];"; }; class Item8 { position[]={5642.3433,7,9886.4473}; azimut=-133.38289; special="NONE"; id=19; side="EMPTY"; vehicle="HMMWV_M1151_M2_DES_EP1"; leader=1; skill=1; text="hmmv4"; init="_resp = [this,60] execFSM ""fsm\vehicle_lifecycle.fsm""; this addWeaponCargo [""ACE_PRC119_ACU"",1];"; }; class Item9 { position[]={5623.9395,7,9886.3076}; azimut=408.66516; special="NONE"; id=20; side="EMPTY"; vehicle="HMMWV_M998_crows_M2_DES_EP1"; leader=1; skill=1; text="hmmwv9"; init="_resp = [this,60] execFSM ""fsm\vehicle_lifecycle.fsm""; this addWeaponCargo [""ACE_PRC119_ACU"",1];"; }; class Item10 { position[]={5626.6104,7,9883.5352}; azimut=408.66516; special="NONE"; id=21; side="EMPTY"; vehicle="HMMWV_M998_crows_MK19_DES_EP1"; leader=1; skill=1; text="hmmwv8"; init="_resp = [this,60] execFSM ""fsm\vehicle_lifecycle.fsm""; this addWeaponCargo [""ACE_PRC119_ACU"",1];"; }; class Item11 { position[]={5636.9609,7,9892.2598}; azimut=-133.528; special="NONE"; id=22; side="EMPTY"; vehicle="HMMWV_M1151_M2_DES_EP1"; leader=1; skill=1; text="hmmwv2"; init="_resp = [this,60] execFSM ""fsm\vehicle_lifecycle.fsm""; this addWeaponCargo [""ACE_PRC119_ACU"",1];"; }; class Item12 { position[]={5639.7495,7,9889.1953}; azimut=-133.528; special="NONE"; id=23; side="EMPTY"; vehicle="HMMWV_M1151_M2_DES_EP1"; leader=1; skill=1; text="hmmwv3"; init="_resp = [this,60] execFSM ""fsm\vehicle_lifecycle.fsm""; this addWeaponCargo [""ACE_PRC119_ACU"",1];"; }; class Item13 { position[]={5634.394,7,9894.9043}; azimut=-133.528; special="NONE"; id=24; side="EMPTY"; vehicle="HMMWV_MK19_DES_EP1"; leader=1; skill=1; text="hmmwv5"; init="_resp = [this,60] execFSM ""fsm\vehicle_lifecycle.fsm""; this addWeaponCargo [""ACE_PRC119_ACU"",1];"; }; class Item14 { position[]={5632.1367,7,9877.8174}; azimut=48.165257; special="NONE"; id=25; side="EMPTY"; vehicle="HMMWV_Armored"; leader=1; skill=1; text="hmmwv6"; init="_resp = [this,60] execFSM ""fsm\vehicle_lifecycle.fsm""; this addWeaponCargo [""ACE_PRC119_ACU"",1];"; }; class Item15 { position[]={5629.3687,7,9880.5684}; azimut=48.165257; special="NONE"; id=26; side="EMPTY"; vehicle="HMMWV_M998A2_SOV_DES_EP1"; leader=1; skill=1; text="hmmwv7"; init="_resp = [this,60] execFSM ""fsm\vehicle_lifecycle.fsm""; this addWeaponCargo [""ACE_PRC119_ACU"",1];"; }; class Item16 { position[]={5681.4795,7,9833.6484}; azimut=204.2995; id=27; side="EMPTY"; vehicle="ACE_Spare_Tyre_HD"; skill=0.60000002; init="0 = [this, 10] execVM ""support\scripts\resupply.sqf"";"; }; class Item17 { position[]={5680.7319,7,9832.4385}; azimut=204.2995; id=28; side="EMPTY"; vehicle="ACE_Spare_Tyre_HDAPC"; skill=0.60000002; init="0 = [this, 10] execVM ""support\scripts\resupply.sqf"";"; }; class Item18 { position[]={5682.5576,7,9830.8994}; azimut=-51.924271; id=29; side="EMPTY"; vehicle="Barrels"; leader=1; skill=0.46666664; init="this setFuelCargo 0"; }; class Item19 { position[]={5683.8926,7,9831.8389}; azimut=-42.607349; id=30; side="EMPTY"; vehicle="Barrels"; leader=1; skill=0.46666664; init="this setFuelCargo 0"; }; class Item20 { position[]={5682.333,7,9832.7031}; azimut=-42.607349; id=31; side="EMPTY"; vehicle="Barrels"; leader=1; skill=0.46666664; init="this setFuelCargo 0"; }; class Item21 { position[]={5685.2646,7,9838.1416}; azimut=42.530216; id=32; side="EMPTY"; vehicle="Sr_border"; skill=0.60000002; }; class Item22 { position[]={5699.5132,7,9827.9619}; azimut=-133.194; id=33; side="EMPTY"; vehicle="HMMWV_Ambulance_DES_EP1"; leader=1; lock="UNLOCKED"; skill=0.60000002; init="_resp = [this,60] execFSM ""fsm\vehicle_lifecycle.fsm"";this addWeaponCargo [""ACE_PRC119_ACU"",1];"; }; class Item23 { position[]={5709.6201,7,9818.2197}; azimut=150.03552; special="NONE"; id=34; side="EMPTY"; vehicle="FlagCarrierRedCross_EP1"; leader=1; skill=0.60000002; }; class Item24 { position[]={5707.9912,7,9815.0361}; azimut=-43.369999; id=35; side="EMPTY"; vehicle="HMMWV_Ambulance_DES_EP1"; leader=1; lock="UNLOCKED"; skill=0.60000002; init="_resp = [this,60] execFSM ""fsm\vehicle_lifecycle.fsm"";this addWeaponCargo [""ACE_PRC119_ACU"",1];"; }; class Item25 { position[]={5625.2695,7,9874.3457}; azimut=587.12469; id=37; side="EMPTY"; vehicle="ATV_US_EP1"; skill=0.60000002; init="0 = [this, 360] execVM ""support\scripts\vehicle.sqf"";"; }; class Item26 { position[]={5627.2817,7,9872.0713}; azimut=587.12469; id=38; side="EMPTY"; vehicle="ATV_US_EP1"; skill=0.60000002; init="0 = [this, 360] execVM ""support\scripts\vehicle.sqf"";"; }; class Item27 { position[]={5771.0381,7,9771.8633}; azimut=313.49414; id=39; side="EMPTY"; vehicle="SignM_FOB_Revolve_EP1"; leader=1; skill=0.60000002; text="camp"; init="this setobjecttexture [0,""pics\camp.paa""]; camp setvectorup [0,0,1];"; }; class Item28 { position[]={5675.3921,7,9861.4551}; azimut=318.06699; id=40; side="EMPTY"; vehicle="USVehicleBox_EP1"; skill=0.2; init="nul = [this,""west"",""all"",true,30,75,30] execVM ""crateFiller.sqf"";this setVariable [""R3F_LOG_disabled"", true]; this allowdamage false;"; }; class Item29 { position[]={5694.1348,7,9927.708}; azimut=-234.17599; special="NONE"; id=41; side="EMPTY"; vehicle="HeliHEmpty"; lock="UNLOCKED"; skill=0.60000002; init="_lights = [this,8] execVM ""scripts\runwaylights.sqf"";"; }; class Item30 { position[]={5706.7593,7,9942.0469}; azimut=318.01343; id=42; side="EMPTY"; vehicle="Land_Misc_Cargo1E_EP1"; skill=0.2; init="0 = [this, 28800] execVM ""support\scripts\resupply.sqf"";"; }; class Item31 { position[]={5710.6714,9.6017199,9938.9893}; azimut=495.13062; id=43; side="EMPTY"; vehicle="Barrels"; skill=0.2; }; class Item32 { position[]={5704.5864,7,9946.2686}; azimut=495.13062; id=44; side="EMPTY"; vehicle="Barrels"; skill=0.2; }; class Item33 { position[]={5706.5327,7,9941.4199}; azimut=396.43146; id=45; side="EMPTY"; vehicle="Land_CamoNet_NATO_EP1"; skill=0.2; init="0 = [this, 28800] execVM ""support\scripts\resupply.sqf"";"; }; class Item34 { position[]={5703.5273,7,9788.8662}; azimut=47.885639; special="NONE"; id=46; side="EMPTY"; vehicle="HeliH"; lock="UNLOCKED"; skill=0.60000002; }; class Item35 { position[]={5709.3662,7,9781.8779}; azimut=52.285641; id=47; side="EMPTY"; vehicle="Land_Misc_Cargo1E_EP1"; skill=0.2; init="0 = [this, 28800] execVM ""support\scripts\resupply.sqf"";"; }; class Item36 { position[]={5706.0298,7,9778.2021}; azimut=229.40218; id=48; side="EMPTY"; vehicle="Barrels"; skill=0.2; }; class Item37 { position[]={5713.7549,7,9783.7217}; azimut=229.40218; id=49; side="EMPTY"; vehicle="Barrels"; skill=0.2; }; class Item38 { position[]={5684.3472,7,9833.9619}; azimut=133.62569; id=50; side="EMPTY"; vehicle="Info_Board_EP1"; skill=0.2; text="coinbld_2"; init="this addAction [""Repair Station Help"",""scripts\REP_Help.sqf""];"; }; class Item39 { position[]={5730.1602,0.076503001,9906.46}; azimut=311.71701; special="NONE"; id=51; side="EMPTY"; vehicle="UH1Y"; lock="UNLOCKED"; skill=0.2; init="_resp = [this,300] execFSM ""fsm\vehicle_lifecycle.fsm""; nop = [] spawn { while {not isnull ah1} do { ""mkr_ah2z"" setmarkerpos getpos ah2; sleep 52; }; };this addWeaponCargo [""ACE_PRC119_ACU"",1];"; }; class Item40 { position[]={5716.3062,7,9882.5332}; azimut=312.06799; special="NONE"; id=52; side="EMPTY"; vehicle="ACE_AH1Z_AGM_D"; lock="UNLOCKED"; skill=0.2; init="_resp = [this,600] execFSM ""fsm\vehicle_lifecycle.fsm""; nop = [] spawn { while {not isnull ah1} do { ""mkr_ah2z"" setmarkerpos getpos ah2; sleep 52; }; };this addWeaponCargo [""ACE_PRC119_ACU"",1];"; }; class Item41 { position[]={5689.5,0,9834.5498}; azimut=44.985199; special="NONE"; id=53; side="EMPTY"; vehicle="US_WarfareBVehicleServicePoint_Base_EP1"; lock="UNLOCKED"; skill=0.2; init="this setPos [5689.5, 9834.55, 0]; this setDir 44.9852; doStop this; this allowdamage false;"; }; class Item42 { position[]={5685.5,-0.13004,9898.0303}; azimut=222.34599; special="NONE"; id=54; side="EMPTY"; vehicle="M1A2_US_TUSK_MG_EP1"; lock="UNLOCKED"; skill=0.2; init="_resp = [this,300] execFSM ""fsm\vehicle_lifecycle.fsm""; this addWeaponCargo [""ACE_PRC119_ACU"",1];"; }; class Item43 { position[]={5674.48,-0.16946,9909.25}; azimut=226.59599; special="NONE"; id=55; side="EMPTY"; vehicle="AAV"; lock="UNLOCKED"; skill=0.2; init="_resp = [this,300] execFSM ""fsm\vehicle_lifecycle.fsm""; this addWeaponCargo [""ACE_PRC119_ACU"",1];"; }; class Item44 { position[]={5672.46,7.6293898,9870.1602}; azimut=47.975101; special="NONE"; id=56; side="EMPTY"; vehicle="HMMWV_M1151_M2_DES_EP1"; lock="UNLOCKED"; skill=0.2; init="this setPos [5672.46, 9870.16, 7.62939e-00]; this setDir 47.9751; doStop this; _resp = [this,60] execFSM ""fsm\vehicle_lifecycle.fsm""; this addWeaponCargo [""ACE_PRC119_ACU"",1];"; }; class Item45 { position[]={5670.04,6.6757202,9872.7998}; azimut=47.975101; special="NONE"; id=57; side="EMPTY"; vehicle="HMMWV_M1151_M2_DES_EP1"; lock="UNLOCKED"; skill=0.2; init="this setPos [5670.04, 9872.8, 6.67572e-00]; this setDir 47.9751; doStop this; _resp = [this,60] execFSM ""fsm\vehicle_lifecycle.fsm""; this addWeaponCargo [""ACE_PRC119_ACU"",1];"; }; class Item46 { position[]={5667.6099,5.7220502,9875.3604}; azimut=47.975101; special="NONE"; id=58; side="EMPTY"; vehicle="HMMWV_M1151_M2_DES_EP1"; lock="UNLOCKED"; skill=0.2; init="this setPos [5667.61, 9875.36, 5.72205e-00]; this setDir 47.9751; doStop this;_resp = [this,60] execFSM ""fsm\vehicle_lifecycle.fsm""; this addWeaponCargo [""ACE_PRC119_ACU"",1];"; }; class Item47 { position[]={5665.46,9.5367403,9877.8096}; azimut=47.975101; special="NONE"; id=59; side="EMPTY"; vehicle="HMMWV_M1151_M2_DES_EP1"; lock="UNLOCKED"; skill=0.2; init="this setPos [5665.46, 9877.81, 9.53674e-00]; this setDir 47.9751; doStop this;_resp = [this,60] execFSM ""fsm\vehicle_lifecycle.fsm""; this addWeaponCargo [""ACE_PRC119_ACU"",1];"; }; class Item48 { position[]={5663.1699,6.6757202,9880.3203}; azimut=47.975101; special="NONE"; id=60; side="EMPTY"; vehicle="HMMWV_M1151_M2_DES_EP1"; lock="UNLOCKED"; skill=0.2; init="this setPos [5663.17, 9880.32, 6.67572e-00]; this setDir 47.9751; doStop this;_resp = [this,60] execFSM ""fsm\vehicle_lifecycle.fsm""; this addWeaponCargo [""ACE_PRC119_ACU"",1];"; }; class Item49 { position[]={5643.0845,7,9896.1367}; azimut=137.321; special="NONE"; id=61; side="EMPTY"; vehicle="LAV25"; lock="UNLOCKED"; skill=0.2; init="_resp = [this,180] execFSM ""fsm\vehicle_lifecycle.fsm""; this addWeaponCargo [""ACE_PRC119_ACU"",1];"; }; class Item50 { position[]={5704.7598,0,9830.1904}; azimut=-2.4882901; special="NONE"; id=62; side="EMPTY"; vehicle="FlagCarrierUSA"; lock="UNLOCKED"; skill=0.2; init="this setPos [5704.76, 9830.19, 0]; this setDir -2.48829; doStop this; this setFlagTexture ""pics\usmcflag.paa"";"; }; class Item51 { position[]={5705.8701,0,9831.1699}; azimut=-2.4882901; special="NONE"; id=63; side="EMPTY"; vehicle="FlagCarrierUSA"; lock="UNLOCKED"; skill=0.2; init="this setPos [5705.87, 9831.17, 0]; this setDir -2.48829; doStop this; this setFlagTexture ""pics\15th.jpg"";"; }; class Item52 { position[]={5706.9902,0,9832.3799}; azimut=-2.4882901; special="NONE"; id=64; side="EMPTY"; vehicle="FlagCarrierUSA"; lock="UNLOCKED"; skill=0.2; init="this setPos [5706.99, 9832.38, 0]; this setDir -2.48829; doStop this; this setFlagTexture ""pics\navjack.paa"";"; }; class Item53 { position[]={5703.6899,0,9829.04}; azimut=-2.4882901; special="NONE"; id=65; side="EMPTY"; vehicle="FlagCarrierUSA_EP1"; lock="UNLOCKED"; skill=0.2; text="tobase"; init="this setPos [5703.69, 9829.04, 0]; this setDir -2.48829; "; }; class Item54 { position[]={5698.9878,9.7800007,9953.4902}; azimut=408.91699; id=67; side="EMPTY"; vehicle="M2HD_mini_TriPod_US_EP1"; leader=1; skill=0.60000002; init="this setpos [getPos this select 0, getPos this select 1, +2.7]; this addEventHandler [""HandleDamage"", {false}]; nul = this spawn { while {alive _this} do { _this setvehicleammo 1; sleep 300 } };"; }; class Item55 { position[]={5754.5483,9.7800007,9896.7832}; azimut=493.46201; id=69; side="EMPTY"; vehicle="M2HD_mini_TriPod_US_EP1"; leader=1; skill=0.60000002; init="this setpos [getPos this select 0, getPos this select 1, +2.7]; this addEventHandler [""HandleDamage"", {false}]; nul = this spawn { while {alive _this} do { _this setvehicleammo 1; sleep 300 } };"; }; class Item56 { position[]={5755.0952,9.7800007,9811.0996}; azimut=45; id=71; side="EMPTY"; vehicle="M2HD_mini_TriPod_US_EP1"; leader=1; skill=0.60000002; init="this setpos [getPos this select 0, getPos this select 1, +2.7]; this addEventHandler [""HandleDamage"", {false}]; nul = this spawn { while {alive _this} do { _this setvehicleammo 1; sleep 300 } };"; }; class Item57 { position[]={5708.6685,9.7800007,9857.4395}; azimut=70; id=73; side="EMPTY"; vehicle="ACE_M240M145_Tripod"; leader=1; skill=0.60000002; init="this setpos [getPos this select 0, getPos this select 1, +2.7]; this addEventHandler [""HandleDamage"", {false}]; nul = this spawn { while {alive _this} do { _this setvehicleammo 1; sleep 300 } };"; }; class Item58 { position[]={5761.3862,9.7800007,9773.4199}; azimut=222.297; id=75; side="EMPTY"; vehicle="M2HD_mini_TriPod_US_EP1"; leader=1; skill=0.60000002; init="this setpos [getPos this select 0, getPos this select 1, +2.7]; this addEventHandler [""HandleDamage"", {false}]; nul = this spawn { while {alive _this} do { _this setvehicleammo 1; sleep 300 } };"; }; class Item59 { position[]={5701.2983,9.7800007,9766.2031}; azimut=225.744; id=77; side="EMPTY"; vehicle="M2HD_mini_TriPod_US_EP1"; leader=1; skill=0.60000002; init="this setpos [getPos this select 0, getPos this select 1, +2.7]; this addEventHandler [""HandleDamage"", {false}]; nul = this spawn { while {alive _this} do { _this setvehicleammo 1; sleep 300 } };"; }; class Item60 { position[]={5646.9351,9.7800007,9803.9648}; azimut=160; id=79; side="EMPTY"; vehicle="ACE_M240M145_Tripod"; leader=1; skill=0.60000002; init="this setpos [getPos this select 0, getPos this select 1, +2.7]; this addEventHandler [""HandleDamage"", {false}]; nul = this spawn { while {alive _this} do { _this setvehicleammo 1; sleep 300 } };"; }; class Item61 { position[]={5592.4214,9.7800007,9857.6201}; azimut=318.18201; id=81; side="EMPTY"; vehicle="M2HD_mini_TriPod_US_EP1"; leader=1; skill=0.60000002; init="this setpos [getPos this select 0, getPos this select 1, +2.7]; this addEventHandler [""HandleDamage"", {false}]; nul = this spawn { while {alive _this} do { _this setvehicleammo 1; sleep 300 } };"; }; class Item62 { position[]={5711.2231,7,9912.0752}; azimut=-47.779598; id=83; side="EMPTY"; vehicle="ACE_RopeBox"; skill=0.60000002; init="this allowdamage false;"; }; class Item63 { position[]={63.589409,7,20.193359}; id=101; side="EMPTY"; vehicle="US_WarfareBVehicleServicePoint_EP1"; skill=0.60000002; text="vehicleServicePoint"; init="this allowDamage false"; }; class Item64 { position[]={63.102745,7,-26.346497}; id=107; side="EMPTY"; vehicle="HeliH"; skill=0.60000002; text="helipad"; }; class Item65 { position[]={23.59333,7,24.680115}; id=112; side="EMPTY"; vehicle="Land_BagFenceRound"; skill=0.60000002; text="bagshumv11"; init="this allowDamage false"; }; class Item66 { position[]={23.59333,7,9.9753418}; id=113; side="EMPTY"; vehicle="Land_BagFenceRound"; skill=0.60000002; text="bagshumv12"; init="this allowDamage false"; }; class Item67 { position[]={24.293045,7,-2.6300049}; id=114; side="EMPTY"; vehicle="Land_BagFenceRound"; skill=0.60000002; text="bagshumv13"; init="this allowDamage false"; }; class Item68 { position[]={24.293045,7,-15.234497}; id=115; side="EMPTY"; vehicle="Land_BagFenceRound"; skill=0.60000002; text="bagshumv14"; init="this allowDamage false"; }; class Item69 { position[]={-59.159859,7,-32.505432}; id=117; side="EMPTY"; vehicle="MASH_EP1"; skill=0.60000002; text="fieldHospital"; init="this addEventHandler [""handleDamage"", {0}];"; }; class Item70 { position[]={2.3782272,7,-29.21637}; id=118; side="EMPTY"; vehicle="LAV25_HQ"; skill=0.60000002; text="MHQ"; }; class Item71 { position[]={-70.69809,7,20.12146}; id=119; side="EMPTY"; vehicle="LAV25_HQ_unfolded"; skill=0.60000002; text="HQ"; init="this allowDamage false; hq setvectorup [0,0,1];"; }; class Item72 { position[]={5664.9741,7,9865.998}; azimut=-42.623829; id=148; side="EMPTY"; vehicle="PowGen_Big_EP1"; skill=0.60000002; text="gen2"; }; class Item73 { position[]={5636.9629,27.320599,9901.7773}; azimut=677.396; id=149; side="EMPTY"; vehicle="HeliHEmpty"; leader=1; skill=0.60000002; text="tour"; init="this setpos [(getpos this) select 0, (getpos this) select 1, 10.35]; light30 = ""#lightpoint"" createVehicleLocal getpos tour; light30 setLightBrightness .2; light30 setLightAmbient[1.0, 1.0, 1.0]; light30 setLightColor[1.0, 1.0, 1.0]; light30 lightAttachObject [tour, [0,0,13]]; this allowdamage false;"; }; class Item74 { position[]={5659.2124,7,9872.4512}; azimut=1577.6349; id=150; side="EMPTY"; vehicle="PowGen_Big_EP1"; leader=1; skill=0.60000002; text="gen1"; }; class Item75 { position[]={5693.8721,27.320599,9838.4326}; azimut=677.396; id=151; side="EMPTY"; vehicle="HeliHEmpty"; leader=1; skill=0.60000002; text="tour2"; init="this setpos [(getpos this) select 0, (getpos this) select 1, 10.35]; light31 = ""#lightpoint"" createVehicleLocal getpos tour2; light31 setLightBrightness .2; light31 setLightAmbient[1.0, 1.0, 1.0]; light31 setLightColor[1.0, 1.0, 1.0]; light31 lightAttachObject [tour2, [0,0,13]]; this allowdamage false;"; }; class Item76 { position[]={5736.3711,27.320599,9792.1396}; azimut=677.396; id=152; side="EMPTY"; vehicle="HeliHEmpty"; leader=1; skill=0.60000002; text="tour3"; init="this setpos [(getpos this) select 0, (getpos this) select 1, 10.35]; light32 = ""#lightpoint"" createVehicleLocal getpos tour3; light32 setLightBrightness .2; light32 setLightAmbient[1.0, 1.0, 1.0]; light32 setLightColor[1.0, 1.0, 1.0]; light32 lightAttachObject [tour3, [0,0,13]]; this allowdamage false;"; }; class Item77 { position[]={5708.29,7,9909.0254}; azimut=-47.779598; id=153; side="EMPTY"; vehicle="ACE_RopeBox"; skill=0.60000002; init="this allowdamage false;"; }; class Item78 { position[]={-8.6529703,7,16.876343}; id=154; side="EMPTY"; vehicle="Land_HBarrier_large"; skill=0.60000002; }; class Item79 { position[]={-0.68812656,7,16.876343}; id=155; side="EMPTY"; vehicle="Land_HBarrier_large"; skill=0.60000002; }; class Item80 { position[]={7.3587484,7,16.876465}; id=156; side="EMPTY"; vehicle="Land_HBarrier_large"; skill=0.60000002; }; class Item81 { position[]={15.323592,7,16.876465}; id=157; side="EMPTY"; vehicle="Land_HBarrier_large"; skill=0.60000002; }; class Item82 { position[]={20.760115,7,14.463257}; azimut=89.449181; id=158; side="EMPTY"; vehicle="Land_HBarrier_large"; skill=0.60000002; }; class Item83 { position[]={20.837263,7,6.4980469}; azimut=89.449181; id=159; side="EMPTY"; vehicle="Land_HBarrier_large"; skill=0.60000002; }; class Item84 { position[]={20.915388,7,-1.5489502}; azimut=89.449181; id=160; side="EMPTY"; vehicle="Land_HBarrier_large"; skill=0.60000002; }; class Item85 { position[]={20.992537,7,-9.5142822}; azimut=89.449181; id=161; side="EMPTY"; vehicle="Land_HBarrier_large"; skill=0.60000002; }; class Item86 { position[]={-8.2516031,7,-12.09082}; id=162; side="EMPTY"; vehicle="Land_HBarrier_large"; skill=0.60000002; }; class Item87 { position[]={-0.28675938,7,-12.09082}; id=163; side="EMPTY"; vehicle="Land_HBarrier_large"; skill=0.60000002; }; class Item88 { position[]={7.7601156,7,-12.090698}; id=164; side="EMPTY"; vehicle="Land_HBarrier_large"; skill=0.60000002; }; class Item89 { position[]={15.72496,7,-12.090698}; id=165; side="EMPTY"; vehicle="Land_HBarrier_large"; skill=0.60000002; }; class Item90 { position[]={-13.718399,7,-9.5147705}; azimut=-89.642525; id=166; side="EMPTY"; vehicle="Land_HBarrier_large"; skill=0.60000002; }; class Item91 { position[]={-13.670547,7,-1.5510254}; azimut=-89.642525; id=167; side="EMPTY"; vehicle="Land_HBarrier_large"; skill=0.60000002; }; class Item92 { position[]={-13.617813,7,6.4979248}; azimut=-89.642525; id=168; side="EMPTY"; vehicle="Land_HBarrier_large"; skill=0.60000002; }; class Item93 { position[]={-13.569962,7,14.461792}; azimut=-89.642525; id=169; side="EMPTY"; vehicle="Land_HBarrier_large"; skill=0.60000002; }; class Item94 { position[]={3.2312727,7,9.8619385}; id=170; side="EMPTY"; vehicle="FlagCarrierUSA"; skill=0.2; text="baseflag"; init="this setVariable [""R3F_LOG_disabled"", true];this addAction [""Teleport to Base"",""scripts\teleport.sqf""]; this allowdamage false;"; }; class Item95 { position[]={-10.092676,7,-16.098511}; id=171; side="EMPTY"; vehicle="Land_HBarrier_large"; skill=0.60000002; }; class Item96 { position[]={-2.1278362,7,-16.098511}; id=172; side="EMPTY"; vehicle="Land_HBarrier_large"; skill=0.60000002; }; class Item97 { position[]={5.9190392,7,-16.098389}; id=173; side="EMPTY"; vehicle="Land_HBarrier_large"; skill=0.60000002; }; class Item98 { position[]={13.883883,7,-16.098389}; id=174; side="EMPTY"; vehicle="Land_HBarrier_large"; skill=0.60000002; }; class Item99 { position[]={19.320406,7,-18.511597}; azimut=89.449181; id=175; side="EMPTY"; vehicle="Land_HBarrier_large"; skill=0.60000002; }; class Item100 { position[]={19.397554,7,-26.476807}; azimut=89.449181; id=176; side="EMPTY"; vehicle="Land_HBarrier_large"; skill=0.60000002; }; class Item101 { position[]={19.475679,7,-34.523804}; azimut=89.449181; id=177; side="EMPTY"; vehicle="Land_HBarrier_large"; skill=0.60000002; }; class Item102 { position[]={19.552828,7,-42.489136}; azimut=89.449181; id=178; side="EMPTY"; vehicle="Land_HBarrier_large"; skill=0.60000002; }; class Item103 { position[]={-9.6913099,7,-45.065674}; id=179; side="EMPTY"; vehicle="Land_HBarrier_large"; skill=0.60000002; }; class Item104 { position[]={-1.726469,7,-45.065674}; id=180; side="EMPTY"; vehicle="Land_HBarrier_large"; skill=0.60000002; }; class Item105 { position[]={6.3204069,7,-45.065552}; id=181; side="EMPTY"; vehicle="Land_HBarrier_large"; skill=0.60000002; }; class Item106 { position[]={14.285251,7,-45.065552}; id=182; side="EMPTY"; vehicle="Land_HBarrier_large"; skill=0.60000002; }; class Item107 { position[]={-15.158106,7,-42.489624}; azimut=-89.642525; id=183; side="EMPTY"; vehicle="Land_HBarrier_large"; skill=0.60000002; }; class Item108 { position[]={-15.110254,7,-34.525879}; azimut=-89.642525; id=184; side="EMPTY"; vehicle="Land_HBarrier_large"; skill=0.60000002; }; class Item109 { position[]={-15.05752,7,-26.476929}; azimut=-89.642525; id=185; side="EMPTY"; vehicle="Land_HBarrier_large"; skill=0.60000002; }; class Item110 { position[]={-15.009668,7,-18.513062}; azimut=-89.642525; id=186; side="EMPTY"; vehicle="Land_HBarrier_large"; skill=0.60000002; }; class Item111 { position[]={-84.679581,7,35.080078}; id=187; side="EMPTY"; vehicle="Land_HBarrier_large"; skill=0.60000002; }; class Item112 { position[]={-76.714737,7,35.080078}; id=188; side="EMPTY"; vehicle="Land_HBarrier_large"; skill=0.60000002; }; class Item113 { position[]={-68.667862,7,35.0802}; id=189; side="EMPTY"; vehicle="Land_HBarrier_large"; skill=0.60000002; }; class Item114 { position[]={-60.703003,7,35.0802}; id=190; side="EMPTY"; vehicle="Land_HBarrier_large"; skill=0.60000002; }; class Item115 { position[]={-55.266483,7,32.666992}; azimut=89.449181; id=191; side="EMPTY"; vehicle="Land_HBarrier_large"; skill=0.60000002; }; class Item116 { position[]={-55.189335,7,24.701782}; azimut=89.449181; id=192; side="EMPTY"; vehicle="Land_HBarrier_large"; skill=0.60000002; }; class Item117 { position[]={-55.11121,7,16.654785}; azimut=89.449181; id=193; side="EMPTY"; vehicle="Land_HBarrier_large"; skill=0.60000002; }; class Item118 { position[]={-55.034061,7,8.6894531}; azimut=89.449181; id=194; side="EMPTY"; vehicle="Land_HBarrier_large"; skill=0.60000002; }; class Item119 { position[]={-84.278214,7,6.112915}; id=195; side="EMPTY"; vehicle="Land_HBarrier_large"; skill=0.60000002; }; class Item120 { position[]={-76.31337,7,6.112915}; id=196; side="EMPTY"; vehicle="Land_HBarrier_large"; skill=0.60000002; }; class Item121 { position[]={-68.266495,7,6.1130371}; id=197; side="EMPTY"; vehicle="Land_HBarrier_large"; skill=0.60000002; }; class Item122 { position[]={-60.30164,7,6.1130371}; id=198; side="EMPTY"; vehicle="Land_HBarrier_large"; skill=0.60000002; }; class Item123 { position[]={-89.74501,7,8.6889648}; azimut=-89.642525; id=199; side="EMPTY"; vehicle="Land_HBarrier_large"; skill=0.60000002; }; class Item124 { position[]={-89.697159,7,16.65271}; azimut=-89.642525; id=200; side="EMPTY"; vehicle="Land_HBarrier_large"; skill=0.60000002; }; class Item125 { position[]={-89.644424,7,24.70166}; azimut=-89.642525; id=201; side="EMPTY"; vehicle="Land_HBarrier_large"; skill=0.60000002; }; class Item126 { position[]={-89.596573,7,32.665527}; azimut=-89.642525; id=202; side="EMPTY"; vehicle="Land_HBarrier_large"; skill=0.60000002; }; }; class Markers { items=24; class Item0 { position[]={10220.094,7,12.907104}; name="jail"; type="Empty"; }; class Item1 { position[]={9820.5615,7,9571.5791}; name="ts3"; text="Voice Communications Presence Required to Fly Aircraft"; type="mil_warning"; colorName="ColorRed"; a=0.69999999; b=0.69999999; }; class Item2 { position[]={9824.5508,7,9931.1211}; name="ts3part2"; text="Voice Communications Presence Required to Operate Armored Vehicles"; type="mil_warning"; colorName="ColorRed"; a=0.69999999; b=0.69999999; }; class Item3 { position[]={8189.311,7,10021.851}; name="vdis"; text="Disabled Vehicle"; type="n_maint"; colorName="ColorOrange"; }; class Item4 { position[]={8189.2876,7,9822.5381}; name="vdes"; text="Destroyed Vehicle"; type="waypoint"; colorName="ColorBlack"; }; class Item5 { position[]={8189.354,7,9622.1045}; name="vhelo"; text="Helicopter"; type="b_air"; }; class Item6 { position[]={8190.3677,7,9423.1045}; name="varm"; text="Armor"; type="b_mech_inf"; }; class Item7 { position[]={8189.8618,7,9222.0791}; name="vsup"; text="Support"; type="b_service"; }; class Item8 { position[]={8189.9653,7,9026.3721}; name="vtr"; text="Transport"; type="b_motor_inf"; colorName="ColorBlue"; }; class Item9 { position[]={9827.2549,7,9196.7832}; name="ts3_1"; text="Teamspeak Info can be Found in the Briefing Notes"; type="mil_warning"; colorName="ColorRed"; a=0.69999999; b=0.69999999; }; class Item10 { position[]={5711.0186,7,9810.1084}; name="Hospital"; type="b_med"; a=0.75; b=0.75; angle=-37.452393; }; class Item11 { position[]={5602.772,7,9844.2012}; name="support"; type="b_support"; a=0.75; b=0.75; angle=44.210617; }; class Item12 { position[]={5679.6436,7,9904.5254}; name="armor"; type="b_armor"; a=0.75; b=0.75; angle=-133.85474; }; class Item13 { position[]={5730.4326,7,9905.8701}; name="heli"; type="b_air"; a=0.75; b=0.75; angle=132.77737; }; class Item14 { position[]={5694.2407,7,9927.6318}; name="VehicleService_2"; text="Chopper Service"; type="b_maint"; colorName="ColorBlue"; angle=312.97232; }; class Item15 { position[]={5685.1553,7,9838.0859}; name="VehicleService_1"; text="Vehicle Service"; type="b_maint"; colorName="ColorBlue"; angle=-404.61029; }; class Item16 { position[]={5631.2847,7,9888.21}; name="cars"; type="b_motor_inf"; a=0.75; b=0.75; angle=48.129314; }; class Item17 { position[]={5713.416,7,9885.6387}; name="plane"; type="b_plane"; a=0.75; b=0.75; angle=-46.504547; }; class Item18 { position[]={5642.1304,7,9848.1084}; name="hq"; type="Empty"; }; class Item19 { position[]={5693.167,7,9872.4678}; name="tomhq"; text="Teleport to MHQ"; type="b_hq"; }; class Item20 { position[]={5673.0684,7,9858.6377}; name="ammoboxes2"; text="Ammobox"; type="b_service"; colorName="ColorBlue"; angle=-180.483; }; class Item21 { position[]={-499.20776,7,761.74854}; name="USFLAG"; type="Faction_USA_EP1"; }; class Item22 { position[]={6.6000357,7,1.3648726}; name="respawn_west"; type="Empty"; angle=-61.987446; }; class Item23 { position[]={0.95320749,7,-399.15479}; name="respawn_east"; type="Empty"; angle=93.227806; }; }; class Sensors { items=5; class Item0 { position[]={5694.0947,7,9927.6982}; a=8; b=8; angle=-180.23569; activationBy="WEST"; repeating=1; interruptable=1; age="UNKNOWN"; expCond="(""Helicopter"" countType thislist > 0) && count (thislist unitsBelowHeight 1.6) > 0;"; expActiv="_xhandle= [(thislist select 0)] execVM ""x_reload.sqf"";"; class Effects { }; }; class Item1 { position[]={5703.5361,7,9788.8496}; a=5; b=5; angle=-152.18803; activationBy="ANY"; repeating=1; interruptable=1; age="UNKNOWN"; expCond="(""LandVehicle"" countType thislist > 0) && count (thislist unitsBelowHeight 1) > 0"; expActiv="_xhandle= [(thislist select 0)] execVM ""x_reload.sqf"";"; class Effects { }; }; class Item2 { position[]={-710.66772,7,1149.5513}; activationBy="JULIET"; interruptable=1; age="UNKNOWN"; text=" "; class Effects { }; }; class Item3 { position[]={5685.1694,7,9838.3613}; a=5; b=5; angle=84.355797; activationBy="WEST"; repeating=1; interruptable=1; age="UNKNOWN"; name="_trktrgr"; expActiv="playerz = (thislist select 0);0=[playerz] execVM ""scripts\truckzactions.sqf"";"; expDesactiv="playerz removeaction truckzid1;playerz removeaction truckzid2;playerz removeaction truckzid3;playerz removeaction truckzid4;playerz removeaction truckzid5;playerz removeaction truckzid6"; class Effects { }; }; class Item4 { position[]={5685.1602,7,9838.501}; a=5; b=5; angle=84.355751; activationBy="WEST"; activationType="GUER D"; repeating=1; interruptable=1; age="UNKNOWN"; name="_trktrgr_1"; expActiv="truckz =vehicle (thislist select 0); truckzid1 = truckz addAction [("""" + ""Rifleman Fire Team Loadout"" + """"),""truckzloadout.sqf"",1]; truckzid2 = truckz addAction [("""" + ""Morter Team Loadout"" + """"),""truckzloadout.sqf"",2]; truckzid3 = truckz addAction [("""" + ""MG Team Loadout"" + """"),""truckzloadout.sqf"",3]; truckzid4 = truckz addAction [("""" + ""AnitArmor Team Loadout"" + """"),""truckzloadout.sqf"",4]; "; expDesactiv="trktrgr_1"; class Effects { }; }; }; }; class Intro { addOns[]= { "fallujah_v1_0" }; addOnsAuto[]= { "fallujah_v1_0" }; randomSeed=4015067; class Intel { startWeather=0; forecastWeather=0; year=2010; month=1; day=11; hour=12; minute=0; }; }; class OutroWin { addOns[]= { "fallujah_v1_0" }; addOnsAuto[]= { "fallujah_v1_0" }; randomSeed=7012232; class Intel { startWeather=0; forecastWeather=0; year=2010; month=1; day=11; hour=12; minute=0; }; }; class OutroLoose { addOns[]= { "fallujah_v1_0" }; addOnsAuto[]= { "fallujah_v1_0" }; randomSeed=7465311; class Intel { startWeather=0; forecastWeather=0; year=2010; month=1; day=11; hour=12; minute=0; }; }; GGATCGVA\sGGATCXAMGGATGALFGGATSFFO@0a7>EL`A) < I$IX`Cgt9xVU=۟1 5 I~X @Nʶm۶m0{_z!\ 6IJW^`T\Umht BUUn%x 9UUݶ 6V7 R }|\)> S#ζ ]O2֜] I'U6^B}J c -W~Y- OH~e#%`_T i^+ (} | <7@/ wE)X=^FޘYf1XW\Y91@?V U[-ۑE %>轋 Z[xD}us~U]qc~JXsy8 _  R + _ GZf)-g1Y+Hݦ9]]'>UU)<|(?+=-|'>~ _)}'=9 [*WV~{ ;-@W 9 UU۶#+B]''(~sx+$ mu |ovT1p\VW| B!:z1МE) %U]|?~- py~a3{p@6j^~ sB|i9 ו% 9 \}*=)<|oH F~Y յ^l\|A~UL69^UUȖ{Z\U(~}kU'ȝi' ^)| A(<G-)<h(~EY~(>%Y(>bAYf(>Y5(>(YW(>RYY(>dbY(~&Y)(>Q(H`)<_j~*|9U*<^W)<~#WJg1T~O^//>T܅7i#vo|`p^AA14|E\ptu$!5^ >!"?M 5 '="Y$ @\ov [}\"m\5) A U ' Ad!*{~KUӜ_ p4 pW'?s+?(Ն+<W )<f)(|  ̋j(~IY(>`j)}7ra(< @V&(| ( Sw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9U^1UIݧ1UU ͧ1UUI1UU9U9UU 9U+{ B92hjA g媪*9\7 է9PVUڴm9%o#mB\`?o#1U_9 UIH-#Z HQm$bcCbKB#ZEdbJzb9H#ZzZ$9jAKjk9^ h9XUU?\9UU5 t09 Iome1_b`9UU^Hݧ1UW9U1{A+cbDEjErzrz9U9WU( ͧ9`UU=nm1U/= ۶mR?}6b۶mRx&ome)W66f1UW}`c9UU}o9UU949UU(91UU)a9UUM`9UUpm1UF۶me)%H$I$@@WI$IZ@$m+9pWUC95_!ɶmFR\ի膖JJxU `'jRU )JzB=W+IHRWa;A@}U#95UUI$I'B m۶a#IJ`F)x}9'է9 hjh e1>Wh%1*U)Ue1 UhE)u Hݦ9p*9WXGA]ufm۰ RI$IZ@ngc9XVUUr/{!2Hf1 6ZHI`V A\f$I%EUEU8z)=^)"9 U)`9\U!5_UӶm۲1 6I$I${@:m۶mZ 1vob#IJPPPPE(BW% BI+b\Uz0P% izWhb`_ʪ@_Uq ^UU5fU P5%_B??$)667%$I$ZWh$I$1 -I$I{@F%iXTW@bI!VuAAUUU`}5cAUBAUU\XfAUU/b = e~j@ۧ$Y5cvnJ@pP\(ZhpɂWU-A!UW%fb`QXX\U(٭W~W^xe~ze$9`@%ۇ}1 ȯ%i\TVW XXѢ( ᵵ--(@y$qrBbI_U%))bIUUWXIBI(ɀ^xxц~xEz'ҏ%a55_E)J f----ɭ---(-- `PYAZz~)-Օj]j`p#A}%Շk4j`o٦xxzxfxxxx?%qhE(B f-------Rpz;<!Z.hVUo[Rp6(JUn)J+ U%%RW ضmb6hhHRP_$I$(yVUrh?_IFZWU\vo\TTT5%y5?EVoT%7 ɨZpXeHn6jju;NJ恂V.5hU5`OmFZ_@`ȿy}E)˥Ypozro5y1q^^}?^^)ŅyCif (isServer) exitWith {}; player sidechat "INITIALIZING"; addonclear = false; naughty = false; #include "mando.h" #include "slx.h" da_lostkey = isClass(configFile >> "CfgPatches" >> "Loki_Lost_Key"); da_inkodisp = isClass(configFile >> "CfgPatches" >> "inko_disposable_oa"); da_jtd = isClass(configFile >> "CfgPatches" >> "JTD_FireAndSmoke"); sleep 0.5; while {!addonclear} do { if (da_mando) then { hintc "***ADDON DISALLOWED***\n\nMando Missile\n\nPlease disable this if you wish to play here.\n\nREASON: Undesired behavior"; player sidechat "***ADDON DISALLOWED*** Mando Missile Please disable this if you wish to play here. REASON: Undesired behavior"; naughty = true; }; sleep 0.25; if (da_lostkey) then { hintc "***ADDON DISALLOWED***\n\nLost Key\n\nPlease disable this if you wish to play here.\n\nREASON: Undesired behavior"; player sidechat "***ADDON DISALLOWED*** Lost Key Please disable this if you wish to play here. REASON: Undesired behavior"; naughty = true; }; sleep 0.25; if (da_inkodisp) then { hintc "***ADDON DISALLOWED***\n\nINKO Disposable\n\nPlease disable this if you wish to play here.\n\nREASON: ACE already does this, why are you running this addon?"; player sidechat "***ADDON DISALLOWED*** INKO Disposable Please disable this if you wish to play here. REASON: ACE already does this, why are you running this addon?"; naughty = true; }; sleep 0.25; if (da_jtd) then { hintc "***ADDON DISALLOWED***\n\nJTD Fire and Smoke\n\nPlease disable this if you wish to play here.\n\nREASON: Multiplayer unfriendly"; player sidechat "***ADDON DISALLOWED*** JTD Fire and Smoke Please disable this if you wish to play here. REASON: Multiplayer unfriendly"; naughty = true; }; sleep 0.25; if (da_slx) then { hintc "***ADDON DISALLOWED***\n\nSLX\n\nPlease disable this if you wish to play here.\n\nREASON: Multiplayer unfriendly"; player sidechat "***ADDON DISALLOWED*** SLX Please disable this if you wish to play here. REASON: Multiplayer unfriendly"; naughty = true; }; sleep 0.25; if (naughty) then { player sidechat "YOU WILL NOW BE DISCONNECTED"; player action ["eject", vehicle player]; removeallweapons player; removeallitems player; player setPos (getmarkerpos "jail"); sleep 5; endmission "end3"; }; if (!naughty) exitWith { addonclear = true; player sidechat "INITIALIZATION COMPLETE"; nul= [player] execVM "op4\tkcheck.sqf"; hint "Remember to check the ''Mission Information, and 15th Server Rules'' section in your briefing notes for information on unique features and Server Rules."; player sidechat "Remember to check the ''Mission Information, and 15th Server Rules'' section in your briefing notes for information on unique features and Server Rules."; }; sleep 0.5; };if (isServer) then { while {true} do { sleep 1800; _tt = time; _no = nearestObjects [center,["ACE_UsedPara_Base","ACE_EjectionSeat","weaponholder","Bag_Base_EP1"],10000]; for "_i" from 0 to count _no - 1 do { deleteVehicle (_no select _i); sleep 0.056; }; }; }; // Universal Crate Filler 2.0 // by Tophe of �stg�ta Ops // Usage: // nul = [this] execVM "crateFiller.sqf" // // Optional settings: // nul = [this,side(west,east,all),game(all,arma,oa,baf,pmc,user),refill(true/false),weapons(amount),magazines(amount),equipment(amount)] execVM "crateFiller.sqf" // // Default values: // nul = [this,"west","all",false,30,75,30] execVM "crateFiller.sqf" // Set variables _box = _this select 0; _side = if (count _this > 1) then {_this select 1} else {"west"}; _game = if (count _this > 2) then {_this select 2} else {"all"}; _refill = if (count _this > 3) then {_this select 3} else {false}; _amountw = if (count _this > 4) then {_this select 4} else {30}; _amountm = if (count _this > 5) then {_this select 5} else {75}; _amounte = if (count _this > 6) then {_this select 6} else {30}; _run = true; _west = false; _east = false; _arma = false; _oa = false; _baf = false; _pmc = false; _ace = false; _user = false; // Check variables //hint format ["%1", typename _side]; if !(typename _side == "STRING") then {hint "Universal Box Filler:\n Side setting must be West/East/All \n \n It is now changed to West \n Set it in the map editor"; _side = "west"}; if !(typename _game == "STRING") then {hint "Universal Box Filler:\n Game setting must be all/arma/oa/baf/pmc/ace/user \n \n It is now changed to All \n Set it in the map editor"; _side = "west"}; if !(_side == "west" or _side == "east" or _side == "all") then {hint "Universal Box Filler:\n Side setting must be West/East/All \n \n It is now changed to West \n Set it in the map editor"; _side = "west"}; if !(_game == "arma" or _game == "oa" or _game == "all" or _game == "baf" or _game == "pmc" or _game == "ace" or _game == "user") then {hint "Universal Box Filler:\n Game setting must be all/arma/ao/baf/pmc/user\n \n It is now changed to All \n Set it in the map editor";_game = "all"}; if !(typename _refill == "BOOL") then {hint "Universal Box Filler:\n Refill must be set to True/False \n \n It is now changed to False\n Set it in the map editor";_refill = false}; if !(typename _amountw == "SCALAR") then {hint "Universal Box Filler:\n Weapon amount must be a number \n \n It is now changed to 30\n Set it in the map editor"; _amountw = 30}; if !(typename _amountm == "SCALAR") then {hint "Universal Box Filler:\n Magazine amount must be a number \n \n It is now changed to 75\n Set it in the map editor"; _amountw = 75}; if !(typename _amounte == "SCALAR") then {hint "Universal Box Filler:\n Equipment amount must be a number \n \n It is now changed to 30\n Set it in the map editor"; _amountw = 30}; // Debug //hint format["Side: %1, Game: %2, Refill: %3, w: %4, m: %5, e: %6",_side, _game, _refill, _amountw, _amountm, _amounte]; //hint format["Side: %1, Game: %2, Refill: %3, w: %4, m: %5, e: %6",_side, _game, _refill, _amountw, _amountm, _amounte]; if (_side == "west" or _side == "all") then {_west = true}; if (_side == "east" or _side == "all") then {_east = true}; if (_game == "arma" or _game == "all") then {_arma = true}; if (_game == "oa" or _game == "all") then {_oa = true}; if (_game == "oa" or _game == "all" or _game == "baf" ) then {_baf = true}; if (_game == "oa" or _game == "all" or _game == "pmc" ) then {_pmc = true}; if (_game == "ace" ) then {_ace = true}; if (_game == "user" or _game == "all" or _game == "pmc") then {_user = true}; //// WEAPON-ARRAYS //// // User Defined Arrays, activated when 'game' option is set to 'user' _user_weapons_west = ["ACE_YardAge450","ACE_SpottingScope","ACE_P226","ACE_USPSD","ACE_USP","ACE_SpareBarrel","m14_ep1","BAF_L86A2_ACOG","ACE_HK417_Shortdot","ACE_HK417_micro","ACE_HK417_leupold","ACE_HK416_D14_TWS","ACE_HK416_D14_SD","ACE_HK416_D14_COMPM3_M320","ACE_HK416_D14_COMPM3","ACE_HK416_D14_ACOG_PVS14","ACE_HK416_D14","ACE_HK416_D10_SD","ACE_HK416_D10_M320","ACE_HK416_D10_Holo","ACE_HK416_D10_COMPM3_SD","ACE_HK416_D10_COMPM3","ACE_HK416_D10_AIM","ACE_HK416_D10","ACE_m16a2_scope","ACE_HK417_Eotech_4x","ACE_M16A4_CCO_GL","ACE_M4A1_ACOG","ACE_SOC_M4A1_GL","ACE_SOC_M4A1_GL_13","ACE_M4A1_GL_SD","ACE_SOC_M4A1_GL_SD","ACE_SOC_M4A1_GL_EOTECH","ACE_SOC_M4A1_GL_AIMPOINT","ACE_M4A1_ACOG","ACE_M4A1_ACOG","ACE_SOC_M4A1_SHORTDOT_SD","ACE_M4A1_ACOG_SD","ACE_M27_IAR","ACE_M27_IAR_ACOG","ACE_M249_PIP_ACOG","ACE_M4A1_Aim_SD","ACE_M4A1_Eotech","ACE_SOC_M4A1_Eotech","ACE_SOC_M4A1_RCO_GL","ACE_M249Para","ACE_M60","ACE_M136_CSRS","ACE_TAC50","ACE_TAC50_SD","ACE_M224Proxy","ACE_M224TripodProxy","ACE_Javelin_Direct"]; _user_magazines_west = ["ACE_15Rnd_9x19_P226","ACE_12Rnd_45ACP_USP","ACE_12Rnd_45ACP_USPSD","100Rnd_556x45_BetaCMag","ACE_20Rnd_762x51_B_HK417","ACE_20Rnd_762x51_S_HK417","ACE_20Rnd_762x51_SB_HK417","ACE_20Rnd_762x51_SB_S_HK417","ACE_20Rnd_762x51_T_HK417","100Rnd_556x45_BetaCMag","ACE_30Rnd_556x45_T_Stanag","ACE_30Rnd_556x45_SB_Stanag","ACE_200Rnd_556x45_T_M249","ACE_10Rnd_127x99_Raufoss_m107","ACE_10Rnd_127x99_Raufoss_m107","ACE_5Rnd_762x51_T_M24","ACE_5Rnd_25x59_HEDP_Barrett","ACE_6Rnd_CS_M32","ACE_SSWhite_FG","ACE_SSRed_FG","ACE_SSGreen_FG","ACE_SSYellow_FG","ACE_SSWhite_M203","ACE_SSGreen_M203","ACE_SSRed_M203","ACE_SSYellow_M203","ACE_LargeBandage","ACE_Bandage","ACE_Morphine","ACE_Epinephrine","ACE_Medkit","ACE_SMAW_SPOTTING","ACE_Flashbang","ACE_6Rnd_12Ga_Buck00","ACE_6Rnd_12Ga_Slug","8Rnd_B_Beneli_Pellets","ACE_8Rnd_12Ga_Buck00","ACE_Knicklicht_R","ACE_Knicklicht_W","ACE_Knicklicht_G","ACE_Knicklicht_Y","ACE_Knicklicht_B","ACE_Knicklicht_IR","ACE_HuntIR_M203","ACE_5Rnd_127x99_B_TAC50","ACE_5Rnd_127x99_S_TAC50","ACE_5Rnd_127x99_T_TAC50","ACE_M224HE_CSWDM","ACE_M224IL_CSWDM","ACE_M224WP_CSWDM","ACE_M15","ACE_M34","ACE_M2_CSWDM","ACE_MK19_CSWDM"]; _user_weapons_east = []; _user_magazines_east = []; // EQUIPMENT _equipment = ["binocular","nvgoggles","laserdesignator","itemcompass","itemgps","itemmap","itemradio","itemwatch","ACE_GlassesTactical","ACE_Map_Tools","ACE_KeyCuffs","ACE_Kestrel4500","ACE_HuntIR_monitor","ACE_DAGR","ace_arty_rangeTable_m224_legacy","ACE_Javelin_CLU"]; _equipment_oa = ["binocular_vector","ACE_Earplugs","ACE_GlassesRoundGlasses","ACE_GlassesSunglasses","ACE_GlassesLHD_glasses","ACE_GlassesGasMask_US","ACE_Rucksack_MOLLE_Green","ACE_Rucksack_MOLLE_Brown","ACE_Rucksack_MOLLE_Wood","ACE_Rucksack_MOLLE_ACU","ACE_Rucksack_MOLLE_WMARPAT","ACE_Rucksack_MOLLE_DMARPAT","ACE_Rucksack_MOLLE_Green_Medic","ACE_Rucksack_MOLLE_Brown_Medic","ACE_Rucksack_MOLLE_ACU_Medic","ACE_Rucksack_MOLLE_WMARPAT_Medic","ACE_Rucksack_MOLLE_DMARPAT_Medic","ACE_ANPRC77","ACE_VTAC_RUSH72","ACE_VTAC_RUSH72_TT_MEDIC","ACE_VTAC_RUSH72_FT_MEDIC","ACE_CharliePack","ACE_CharliePack_WMARPAT", "ACE_CharliePack_ACU","ACE_CharliePack_ACU_Medic","ACE_PRC119","ACE_PRC119_MAR","ACE_PRC119_ACU","ACE_FAST_PackEDC_ACU","ACE_Coyote_Pack","ACE_Coyote_Pack_Black","ACE_BackPack_ACR","ACE_BackPack_ACR_TT","ACE_BackPack_ACR_FL","ACE_BackPack_ACR_Small","ACE_ALICE_Backpack","ACE_Backpack_US","ACE_Backpack_FL","ACE_Backpack_TT","ACE_P159_RD90","ACE_P159_RD54","ACE_P159_RD99","ACRE_PRC117F","ACRE_PRC119","ACRE_PRC148_UHF","ACRE_PRC148"]; // ORDONANCE _ordonance = ["smokeshell","smokeshellblue","smokeshellgreen","smokeshellorange","smokeshellpurple","smokeshellred","smokeshellyellow","pipebomb","handgrenade","laserbatteries","ACE_Claymore_M","ACE_C4_M","ACE_BBetty_M","ACE_TripFlare_M","ACE_VS17Panel_M","ACE_Battery_Rangefinder"]; _ordonance_oa = ["ir_strobe_target","ir_strobe_marker","baf_ied_v1","baf_ied_v2","baf_ied_v3","baf_ied_v4"]; _west_ordonance = ["mine","handgrenade_west"]; _west_ordonance_oa = ["baf_l109a1_he"]; _east_ordonance = ["minee","handgrenade_east"]; // WEST WEAPONS & MAGAZINES _west_weapons = [ //Rifles "m16a2","m16a2gl","m16a4","m16a4_gl","m16a4_acg","m16a4_acg_gl", "m4a1","m4a1_aim","m4a1_aim_camo","m4a1_aim_sd_camo","m4a1_hws_gl","m4a1_hws_gl_camo","m4a1_hws_gl_sd_camo","m4a1_rco_gl", "m8_carbine","m8_carbinegl","m8_compact","m8_sharpshooter", "g36a","g36k","g36c","g36_c_sd_eotech", "mp5a5","mp5sd", "m1014", // machineguns "m249","m240","mk_48","mg36","m8_saw", // sniper rifles "m24","m40a3","m107","m4spr","dmr", // sidearms "colt1911","m9","m9sd", // launchers "m136","smaw","stinger"]; _west_weapons_oa = [ // rifles "m16a2","m16a2gl", "m4a1","m4a3_cco_ep1","m4a3_rco_gl_ep1", "fn_fal","fn_fal_anpvs4","g36_c_sd_camo","g36a_camo","g36c_camo","g36k_camo", "scar_h_cqc_cco","scar_h_cqc_cco_sd","scar_h_lng_sniper","scar_h_lng_sniper_sd","scar_h_std_eglm_spect","scar_h_std_tws_sd", "scar_l_cqc","scar_l_cqc_cco_sd","scar_l_cqc_eglm_holo","scar_l_cqc_holo","scar_l_std_eglm_rco","scar_l_std_eglm_tws","scar_l_std_holo","scar_l_std_mk4cqt", // sniper rifles "leeenfield","m110_nvg_ep1","m110_tws_ep1","m14_ep1","m24_des_ep1","m107","m107_tws_ep1", // machinegus "m60a4_ep1","mg36_camo","m240_scoped_ep1","m249_ep1","m249_m145_ep1","m249_tws_ep1","mk_48_des_ep1", // grenade launchers "m79_ep1","m32_ep1","mk13_ep1", // sidearms "colt1911","glock17_ep1","m9","m9sd","revolver_ep1","revolver_gold_ep1", // launchers "m136","m47launcher_ep1","maaws","stinger","ACE_M72A2"]; _west_weapons_baf = [ // rifles "baf_as50_scoped","baf_as50_tws","baf_l110a1_aim","baf_l7a2_gpmg","baf_l85a2_ris_acog", "baf_l85a2_ris_cws","baf_l85a2_ris_holo","baf_l85a2_ris_susat","baf_l85a2_ugl_acog","baf_l85a2_ugl_holo","baf_l85a2_ugl_susat","baf_l86a2_acog", // sniper rifles "baf_lrr_scoped","baf_lrr_scoped_w", // launchers "baf_nlaw_launcher"]; _west_weapons_pmc = [ // rifles "m8_tws","m8_tws_sd","m8_carbine_pmc","m8_carbine","m8_carbinegl","m8_compact","m8_compact_pmc","m8_holo_sd","aa12_pmc", //sniper rifles "m8_sharpshooter", // machine guns "m8_saw"]; _west_weapons_ace = ["ACE_M16A4_CCO_GL","ACE_HK417_Eotech_4x","ACE_M4A1_ACOG","ACE_SOC_M4A1_GL","ACE_SOC_M4A1_GL_13","ACE_M4A1_GL_SD","ACE_SOC_M4A1_GL_SD","ACE_SOC_M4A1_GL_EOTECH","ACE_SOC_M4A1_GL_AIMPOINT","ACE_M4A1_ACOG","ACE_M4A1_ACOG","ACE_M4A1_ACOG_CQB","ACE_SOC_M4A1_SHORTDOT","ACE_SOC_M4A1_SHORTDOT_CQB","ACE_M4A1_ACOG_SD","ACE_M27_IAR","ACE_M27_IAR_ACOG","ACE_M249_PIP_ACOG","ACE_M4A1_ACOG_SD_CQB","ACE_SOC_M4A1_SHORTDOT_SD","ACE_SOC_M4A1_SHORTDOT_SD_CQB","ACE_M4A1_Aim_SD""ACE_M4A1_Eotech","ACE_SOC_M4A1_Eotech","ACE_M4A1_RCO_GL_CQB","ACE_SOC_M4A1_RCO_GL","ACE_SOC_M4A1_RCO_GL_CQB","ACE_M249Para","ACE_M249Para_M145","ACE_M240G_M145","ACE_M240G_M145_CQB","ACE_M60"]; _west_magazines = [ // rifle mags "30rnd_556x45_stanag","30rnd_556x45_stanagsd","30rnd_556x45_g36","30rnd_556x45_g36sd","30rnd_9x19_mp5","30rnd_9x19_mp5sd","8rnd_b_beneli_74slug", // under-barrel grenade launchers "1rnd_he_m203","flarewhite_m203","flaregreen_m203","flarered_m203","flareyellow_m203","1rnd_smoke_m203","1rnd_smokegreen_m203","1rnd_smokered_m203","1rnd_smokeyellow_m203", // sniper rifles "20rnd_556x45_stanag","20rnd_762x51_dmr","5rnd_762x51_m24","10rnd_127x99_m107", // machineguns "100rnd_556x45_betacmag","200rnd_556x45_m249","100rnd_762x51_m240", // side arms "7rnd_45acp_1911","15rnd_9x19_m9","15rnd_9x19_m9sd", // launchers "smaw_heaa","smaw_hedp","javelin","stinger"]; _west_magazines_oa = [ // rifles "20rnd_556x45_stanag","30rnd_556x45_stanag","30rnd_556x45_stanagsd","20rnd_762x51_dmr", "20rnd_762x51_fnfal","30rnd_556x45_g36","30rnd_556x45_g36sd","100rnd_556x45_betacmag","20rnd_762x51_b_scar", // under-barrell launcher "1rnd_he_m203","1rnd_smoke_m203","1rnd_smokegreen_m203","1rnd_smokered_m203","1rnd_smokeyellow_m203","flaregreen_m203","flarered_m203","flarewhite_m203","flareyellow_m203", // grenade launcher "6rnd_flaregreen_m203","6rnd_flarered_m203","6rnd_flarewhite_m203","6rnd_flareyellow_m203","6rnd_he_m203","6rnd_smoke_m203","6rnd_smokegreen_m203","6rnd_smokered_m203","6rnd_smokeyellow_m203", // sniper rifles "5rnd_762x51_m24","20rnd_762x51_sb_scar","5rnd_86x70_l115a1","10x_303","10rnd_127x99_m107", // side arms "10rnd_b_765x17_ball","20rnd_b_765x17_ball","30rnd_9x19_mp5","30rnd_9x19_mp5sd", "7rnd_45acp_1911","15rnd_9x19_m9","15rnd_9x19_m9sd","17rnd_9x19_glock17","6rnd_45acp", // machineguns "100rnd_556x45_m249","100rnd_762x51_m240","200rnd_556x45_l110a1","200rnd_556x45_m249", // launchers "nlaw","javelin","dragon_ep1","maaws_heat","maaws_hedp","stinger"]; _west_magazines_baf = [ "30rnd_556x45_stanag","5rnd_86x70_l115a1","5rnd_127x99_as50","200rnd_556x45_l110a1","100rnd_762x51_m240", "nlaw", "1rnd_he_m203","flarewhite_m203","flaregreen_m203","flarered_m203","flareyellow_m203","1rnd_smoke_m203","1rnd_smokered_m203","1rnd_smokegreen_m203","1rnd_smokeyellow_m203"]; _west_magazines_pmc = [ "20rnd_b_aa12_74slug","20rnd_b_aa12_he","20rnd_b_aa12_pellets","30rnd_556x45_stanagsd", "1rnd_he_m203","flarewhite_m203","flaregreen_m203","flarered_m203","flareyellow_m203","1rnd_smoke_m203","1rnd_smokered_m203","1rnd_smokegreen_m203","1rnd_smokeyellow_m203"]; _west_magazines_ace = ["100Rnd_556x45_BetaCMag","ACE_30Rnd_556x45_T_Stanag","ACE_30Rnd_556x45_SB_Stanag","ACE_200Rnd_556x45_T_M249","ACE_10Rnd_127x99_Raufoss_m107","ACE_10Rnd_127x99_Raufoss_m107","ACE_5Rnd_762x51_T_M24","ACE_5Rnd_25x59_HEDP_Barrett","ACE_6Rnd_CS_M32","ACE_SSWhite_FG","ACE_SSRed_FG","ACE_SSGreen_FG","ACE_SSYellow_FG","ACE_SSWhite_M203","ACE_SSGreen_M203","ACE_SSRed_M203","ACE_SSYellow_M203","ACE_Bandage","ACE_LargeBandage","ACE_Morphine","ACE_Epinephrine","ACE_Medpack","ACE_SMAW_SPOTTING"]; // EAST WEAPONS & MAGAZINES _east_weapons = [ // rifles "ak_47_m","ak_47_s","aks_gold", "ak_74","ak_74_gl","aks_74_kobra","aks_74_pso","aks_74_u","aks_74_un_kobra", "ak_107_kobra","ak_107_gl_kobra","ak_107_pso","ak_107_gl_pso", "bizon","bizon_silenced", "saiga12k", // machineguns "rpk_74","pk","pecheneg", // sniper rifles "huntingrifle","vss_vintorez","svd","svd_camo","ksvk", // side arms "makarov","makarovsd", // launchers "rpg7v","rpg18","metislauncher","strela","igla"]; _east_weapons_oa = [ // rifles "ak_47_m","ak_47_s", "ak_74","ak_74_gl","ak_74_gl_kobra","aks_74","aks_74_goshawk","aks_74_kobra","aks_74_nspu","aks_74_pso","aks_74_u", "sa58p_ep1","sa58v_cco_ep1","sa58v_ep1","sa58v_rco_ep1", // sniper rifles "svd","svd_des_ep1","svd_nspu_ep1","ksvk", // machineguns "rpk_74","pk", // side arms "makarov","makarovsd","sa61_ep1","uzi_ep1","uzi_sd_ep1", // launchers "igla","metislauncher","rpg18","rpg7v","strela"]; _east_weapons_ace = []; _east_magazines = [ // rifles "30rnd_762x39_ak47","30rnd_545x39_ak","30rnd_545x39_aksd","64rnd_9x19_bizon","64rnd_9x19_sd_bizon","8rnd_b_saiga12_74slug", // under-barrel grenade launchers "1rnd_he_gp25","flarewhite_gp25","flaregreen_gp25","flarered_gp25","flareyellow_gp25","1rnd_smoke_gp25","1rnd_smokegreen_gp25","1rnd_smokered_gp25","1rnd_smokeyellow_gp25", // sniper rifles "5x_22_lr_17_hmr","10rnd_9x39_sp5_vss","20rnd_9x39_sp5_vss","10rnd_762x54_svd","5rnd_127x108_ksvk", // machineguns "75rnd_545x39_rpk","100rnd_762x54_pk", // side arms "8rnd_9x18_makarov","8rnd_9x18_makarovsd", // launchers "pg7v","pg7vl","pg7vr","og7","at13","strela","igla"]; _east_magazines_oa = [ // rifles "30rnd_762x39_ak47","30rnd_762x39_sa58","30rnd_545x39_ak","30rnd_545x39_aksd", // under-barrel grenade launchers "1rnd_he_gp25","1rnd_smoke_gp25","1rnd_smokegreen_gp25","1rnd_smokered_gp25","1rnd_smokeyellow_gp25","flaregreen_gp25","flarered_gp25","flarewhite_gp25","flareyellow_gp25", // sniper rifles "10rnd_762x54_svd","5rnd_127x108_ksvk", // machineguns "100rnd_762x54_pk","75rnd_545x39_rpk", // side arms "30rnd_9x19_uzi","30rnd_9x19_uzi_sd","8rnd_9x18_makarov","8rnd_9x18_makarovsd", // launchers "at13","rpg18","og7","pg7v","pg7vl","pg7vr","strela","igla"]; _east_magazines_ace = []; // Trim arrays to avoid duplications. if (_arma && _oa) then { _east_weapons_oa = _east_weapons_oa - _east_weapons; _east_magazines_oa = _east_magazines_oa - _east_magazines; _west_weapons_oa = _west_weapons_oa - _west_weapons; _west_magazines_oa = _west_magazines_oa - _west_magazines; }; // baf & pmc if (_oa) then { _west_weapons_baf = _west_weapons_baf - _west_weapons_oa; _west_magazines_baf = _west_magazines_baf - _west_magazines_oa; _west_weapons_pmc = _west_weapons_pmc - _west_weapons_oa; _west_magazines_pmc = _west_magazines_pmc - _west_magazines_oa; }; if (_arma) then { _west_weapons_baf = _west_weapons_baf - _west_weapons; _west_magazines_baf = _west_magazines_baf - _west_magazines; _west_weapons_pmc = _west_weapons_pmc - _west_weapons; _west_magazines_pmc = _west_magazines_pmc - _west_magazines; }; // Start loop while {_run} do { clearWeaponCargo _box; clearMagazineCargo _box; // ALL // EQUIPMENT { _box addWeaponCargo [_x, _amounte]; } foreach _equipment; if (_oa) then { { _box addWeaponCargo [_x, _amounte]; } foreach _equipment_oa; }; // ORDONANCE { _box addMagazineCargo [_x, _amountm ]; } foreach _ordonance; if (_oa || _baf) then { { _box addMagazineCargo [_x, _amountm ]; } foreach _ordonance_oa; }; // WEST // ORDONANCE if (_west) then { { _box addMagazineCargo [_x, _amountm ]; } foreach _west_ordonance; }; if (_west && _oa) then { { _box addMagazineCargo [_x, _amounte]; } foreach _west_ordonance_oa; }; // WEAPONS & MAGAZINES if (_west && _arma) then { { _box addWeaponCargo [_x, _amountw]; } foreach _west_weapons; { _box addMagazineCargo [_x, _amountm]; } foreach _west_magazines; }; // OA WEAPONS & MAGAZINES if (_west && _oa) then { { _box addWeaponCargo [_x, _amountw]; } foreach _west_weapons_oa; { _box addMagazineCargo [_x, _amountm]; } foreach _west_magazines_oa; }; // BAF if (_west && _baf) then { { _box addWeaponCargo [_x, _amountw]; } foreach _west_weapons_baf; { _box addMagazineCargo [_x, _amountm]; } foreach _west_magazines_baf; }; // PMC if (_west && _pmc) then { { _box addWeaponCargo [_x, _amountw]; } foreach _west_weapons_pmc; { _box addMagazineCargo [_x, _amountm]; } foreach _west_magazines_pmc; }; // USER DEFINED if (_user) then { { _box addWeaponCargo [_x, _amountw]; } foreach _user_weapons_west; { _box addMagazineCargo [_x, _amountm]; } foreach _user_magazines_west; }; // EAST // ORDONANCE if (_east) then { { _box addMagazineCargo [_x, _amountm ]; } foreach _east_ordonance; }; // WEAPONS & MAGAZINES if (_east && _arma) then { { _box addWeaponCargo [_x, _amountw]; } foreach _east_weapons; { _box addMagazineCargo [_x, _amountm]; } foreach _east_magazines; }; // OA WEAPONS & MAGAZINES if (_east && _oa) then { { _box addWeaponCargo [_x, _amountw]; } foreach _east_weapons_oa; { _box addMagazineCargo [_x, _amountm]; } foreach _east_magazines_oa; }; // USER DEFINED if (_user) then { { _box addWeaponCargo [_x, _amountw]; } foreach _user_weapons_east; { _box addMagazineCargo [_x, _amountm]; } foreach _user_magazines_east; }; // Refill or end loop if (!alive _box) then {_run = false}; if (!_refill) then {_run = false}; sleep 1800; };//by Strikor, Op4Gaming.us if (isServer) exitWith {}; player removeweapon "itemmap"; sleep 2.5; player sidechat "CHECKING OP4 STATUS"; addonclear = false; naughty = false; player enablesimulation false; sleep 1; is13th = isClass(configFile >> "CfgPatches" >> "op4_13thcrate"); sleep 1; if (is13th) then { player sidechat "***Op4 13th TOC access granted***"; player addweapon "itemmap"; player enablesimulation true; execVM "op4\iedtrack.sqf"; } else { endmission "end2"; };while {true} do { sleep 15; _tt = time; _no = nearestObjects [center,["HMMWV_Armored"],10000]; for "_i" from 0 to count _no - 1 do { (_no select _i) setobjecttexture [0,"ca\wheeled_e\hmmwv\data\hmmwv_body_co.paa"]; (_no select _i) setobjecttexture [1,"ca\wheeled_e\hmmwv\data\hmmwv_body_co.paa"]; sleep 0.056; }; }; if (isServer) then { _marker = _this select 0; _area = _this select 1; _radius = _this select 2; _respawn = _this select 3; _list = _area nearRoads _radius; _iedarray = ["Garbage_can","Garbage_container","Land_Crates_stack_EP1","Land_tires_EP1","Land_transport_crates_EP1","BMP2Wreck","BRDMWreck","LADAWreck","hiluxWreck","datsun01Wreck","datsun02Wreck","SKODAWreck","T72Wreck","T72WreckTurret","UAZWreck","UralWreck"]; _roadpositions = [0, 2, 3, 4, 5, 6, -6, -5, -4, -3, -2]; PAPABEAR=[West,"HQ"]; sleep 10; while {true} do { _roads = floor random (count _list); _road = _list select _roads; _ieds = floor random (count _iedarray); _ied = _iedarray select _ieds; _roadpos = floor random (count _roadpositions); _offset = _roadpositions select _roadpos; _iedobj = _ied createVehicle (position _road); _iedobj setPos (_road modelToWorld [_offset, 0, 0]); _iedobj setdamage 0.75; _iedobj setdir (random 359); _marker setpos (getpos _iedobj); _trg=createTrigger["EmptyDetector",getPos _iedobj]; _trg setTriggerArea[10,10,0,false]; _trg setTriggerActivation["WEST","PRESENT",false]; _trg setTriggerStatements["this", "_bomb = nearestObject [getPos (thislist select 0), 'static']; _bomb setdamage 1; [center,nil,rGLOBALCHAT,'ALLAHU AKBAR!!!'] call RE;", ""]; while {alive _iedobj} do { sleep 0.5; }; _boom1 = "ACE_PipebombExplosion" createVehicle (position _iedobj); _boom2 = "ACE_PipebombExplosion" createVehicle [(getPos _iedobj select 0) + 2.5, getPos _iedobj select 1, getPos _iedobj select 2]; _boom3 = "ACE_PipebombExplosion" createVehicle [(getPos _iedobj select 0) - 2.5, getPos _iedobj select 1, getPos _iedobj select 2]; _boom4 = "ACE_PipebombExplosion" createVehicle [getPos _iedobj select 0, (getPos _iedobj select 1) + 2.5, getPos _iedobj select 2]; _boom5 = "ACE_PipebombExplosion" createVehicle [getPos _iedobj select 0, (getPos _iedobj select 1) - 2.5, getPos _iedobj select 2]; _he = "sh_125_he" createVehicle (position _iedobj); _wp1 = "sh_105_wp" createVehicle (position _iedobj); _wp2 = "ACE_M34" createVehicle (position _iedobj); _sm = "ARTY_SmokeShellWhite" createVehicle (position _iedobj); deletevehicle _iedobj; deletevehicle _trg; _marker setpos (getpos server); sleep 1 + (random 2); [PAPABEAR,nil,rSIDECHAT,"IED Detonated!"] call RE; sleep _respawn; }; };while {true} do { deletemarker "i1"; _mark1 = createMarkerlocal ["i1", (position i1)]; _mark1 setMarkerShape "ICON"; "i1" setMarkerType "waypoint"; "i1" setMarkerColor "ColorBlue"; deletemarker "i2"; _mark2 = createMarkerlocal ["i2", (position i2)]; _mark2 setMarkerShape "ICON"; "i2" setMarkerType "waypoint"; "i2" setMarkerColor "ColorBlue"; deletemarker "i3"; _mark3 = createMarkerlocal ["i3", (position i3)]; _mark3 setMarkerShape "ICON"; "i3" setMarkerType "waypoint"; "i3" setMarkerColor "ColorBlue"; deletemarker "i4"; _mark4 = createMarkerlocal ["i4", (position i4)]; _mark4 setMarkerShape "ICON"; "i4" setMarkerType "waypoint"; "i4" setMarkerColor "ColorBlue"; deletemarker "i5"; _mark5 = createMarkerlocal ["i5", (position i5)]; _mark5 setMarkerShape "ICON"; "i5" setMarkerType "waypoint"; "i5" setMarkerColor "ColorBlue"; deletemarker "i6"; _mark6 = createMarkerlocal ["i6", (position i6)]; _mark6 setMarkerShape "ICON"; "i6" setMarkerType "waypoint"; "i6" setMarkerColor "ColorBlue"; deletemarker "i7"; _mark7 = createMarkerlocal ["i7", (position i7)]; _mark7 setMarkerShape "ICON"; "i7" setMarkerType "waypoint"; "i7" setMarkerColor "ColorBlue"; deletemarker "i8"; _mark8 = createMarkerlocal ["i8", (position i8)]; _mark8 setMarkerShape "ICON"; "i8" setMarkerType "waypoint"; "i8" setMarkerColor "ColorBlue"; deletemarker "i9"; _mark9 = createMarkerlocal ["i9", (position i9)]; _mark9 setMarkerShape "ICON"; "i9" setMarkerType "waypoint"; "i9" setMarkerColor "ColorBlue"; deletemarker "i10"; _mark10 = createMarkerlocal ["i10", (position i10)]; _mark10 setMarkerShape "ICON"; "i10" setMarkerType "waypoint"; "i10" setMarkerColor "ColorBlue"; sleep 10; };_haji = _this select 0; _allrifles = ["AK_47_M","AK_47_S","ACE_AKM","ACE_AKMS","AKS_GOLD","AK_74","AKS_74","AKS_74_U","AKS_74","ACE_SKS","ACE_SKS","ACE_SKS","ACE_M3A1","LeeEnfield","Sa58P_EP1","Sa58V_EP1","Saiga12K","FN_FAL","ACE_G3A3","M16A2","bizon", "AK_74_GL","ACE_AKS74_GP25","ACE_AKM_GL", "ACE_RPK","RPK_74","PK", "ACE_SVD_Bipod","SVD","huntingrifle","ksvk"]; _allmags = ["30Rnd_762x39_AK47","30Rnd_762x39_AK47","30Rnd_762x39_AK47","30Rnd_762x39_AK47","30Rnd_762x39_AK47","30Rnd_545x39_AK","30Rnd_545x39_AK","30Rnd_545x39_AK","30Rnd_545x39_AK","ACE_10Rnd_762x39_B_SKS","ACE_10Rnd_762x39_B_SKS","ACE_10Rnd_762x39_B_SKS","ACE_30Rnd_1143x23_B_M3","10x_303","30Rnd_762x39_SA58","30Rnd_762x39_SA58","8Rnd_B_Saiga12_Pellets","20Rnd_762x51_FNFAL","ACE_20Rnd_762x51_B_G3","30Rnd_556x45_Stanag","64Rnd_9x19_Bizon", "30Rnd_545x39_AK","30Rnd_545x39_AK","30Rnd_762x39_AK47", "ACE_75Rnd_762x39_B_AK47","ACE_45Rnd_545x39_B_AK","100Rnd_762x54_PK", "10Rnd_762x54_SVD","10Rnd_762x54_SVD","5x_22_LR_17_HMR","5Rnd_127x108_KSVK"]; _extras = ["BAF_ied_v1","BAF_ied_v2","BAF_ied_v3","BAF_ied_v4","BAF_L109A1_HE","HandGrenade_East","HandGrenade","Mine","MineE","ACE_MON50_M","ACE_Pomz_M","PipeBomb"]; _noextras = ["AK_74_GL","ACE_AKS74_GP25","ACE_AK74M_GL","ACE_AKM_GL","ACE_RPK","RPK_74","PK","ACE_SVD_Bipod","SVD","huntingrifle","ksvk"]; _gl = ["AK_74_GL","ACE_AKS74_GP25","ACE_AK74M_GL","ACE_AKM_GL"]; _rpg = ["OG7","PG7V","PG7VL","PG7VR"]; if (side _haji == east) then { if !(_haji hasweapon "ACE_GlassesBalaklava") then { _rnd = floor random (count _allrifles); _rifle = _allrifles select _rnd; _mag = _allmags select _rnd; removeAllWeapons _haji; for [{_i=1},{_i<=8},{_i=_i+1}] do { _haji addMagazine _mag; }; _haji addWeapon _rifle; _haji selectweapon _rifle; _gun = primaryweapon _haji; if (_gun in _gl) then { for [{_i=1},{_i<=4},{_i=_i+1}] do { _haji addMagazine "1Rnd_HE_GP25"; }; }; if !(_gun in _noextras) then { if (random 1 < 0.26) then { if (random 1 < 0.26) then { _haji addmagazine "strela"; _haji addweapon "strela"; } else { _rndrpg1 = floor random (count _rpg); _rpg1 = _rpg select _rndrpg1; _rndrpg2 = floor random (count _rpg); _rpg2 = _rpg select _rndrpg2; _rndrpg3 = floor random (count _rpg); _rpg3 = _rpg select _rndrpg3; _haji addmagazine _rpg1; _haji addmagazine _rpg2; _haji addmagazine _rpg3; _haji addweapon "RPG7V"; }; } else { _rndextras1 = floor random (count _extras); _extras1 = _extras select _rndextras1; _rndextras2 = floor random (count _extras); _extras2 = _extras select _rndextras2; _haji addmagazine _extras1; _haji addmagazine _extras2; }; }; _haji setskill ["aimingAccuracy",(0.15 + random 0.25)]; _haji setskill ["spotDistance",0.85]; _haji setskill ["spotTime",0.85]; _haji setskill ["courage",0.85]; _haji setskill ["commanding",0.85]; _haji setskill ["aimingShake",0.15]; _haji setskill ["aimingSpeed",0.65]; _haji addweapon "ACE_GlassesBalaklava"; ["ace_sys_wounds_rev", {if (side (_this select 0) == east) then {(_this select 0) setdamage 1};}] call CBA_fnc_addEventhandler; }; };if ((side player == west)) then { nul= [player] execVM "op4\check.sqf"; _cr01 = "USVehicleBox" createvehiclelocal (getpos server); sleep 1; _cr01 allowdamage false; _cr01 setammocargo 0; nul=[_cr01] execVM "op4\crate.sqf"; while {true} do { _cr01 setpos (getpos mhqbox); sleep 60; }; }; if ((side player == east)) then { nul= [player] execVM "op4\east.sqf"; };if (isdedicated) exitwith {}; _driver = _this select 1; if !(_driver == player) exitwith {}; sleep 1; endmission "end3";da_mando = isClass(configFile >> "CfgPatches" >> "Mando_Missile_Addon"); da_mando = isClass(configFile >> "CfgPatches" >> "mando_phalanx"); da_mando = isClass(configFile >> "CfgPatches" >> "mando_portables"); da_mando = isClass(configFile >> "CfgPatches" >> "MMA_XEH_AutoLaunch");if (hq distance [0,0,0] < 100) exitwith {PAPABEAR=[West,"HQ"]; PAPABEAR sidechat "REQUEST DENIED - MHQ IS NOT DEPLOYED"}; cutText ["MOVING OUT", "BLACK OUT",2]; sleep 9; _safe = "RoadCone" createvehiclelocal (position hq); player setpos (getpos _safe); deletevehicle _safe; sleep 1; cutText ["","BLACK IN",2]; player setdir (getdir hq);while {true} do { _rating = rating player; if (_rating < 5000) then { player addrating 5000; }; sleep 30; };cutText ["MOVING OUT", "BLACK OUT",2]; sleep 9; _safe = "RoadCone" createvehiclelocal (position fob); player setpos (getpos _safe); deletevehicle _safe; sleep 1; cutText ["","BLACK IN",2]; player setdir 315;da_slx = isClass(configFile >> "CfgPatches" >> "slx_a2_backcompatibility"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_ace_fixes"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_actions"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_ai"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_ai_diff_armor_balance"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_ai_difficulties"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_ai_dodge"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_ai_identify"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_ai_noautoengage"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_ai_spawnskill"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_ai_steering"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_aiskill"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_alpha_numbers"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_alpha_teams"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_anim_ai_lowriflemove"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_anim_at_lying"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_anim_binocularmove"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_anim_crawl"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_anim_death"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_anim_grenadethrow"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_anim_headbob"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_anim_holdsprint"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_anim_idle"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_anim_injured"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_anim_jump"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_anim_movetransitions"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_anim_pistolcivil"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_anim_prone"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_anim_steeplying"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_anim_swim"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_anim_turnspeed"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_anim_weapontransitions"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_animals"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_anims"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_birds"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_bis_bc_fix"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_bis_xeh"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_cannonsmoke"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_cargunner"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_cartriges"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_cloud"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_dialogue"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_effects"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_explosiondust"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_findcover"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_fov"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_gl3"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_gl3_giveradios"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_gunsmoke"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_helicopter_ai_fix"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_impacts"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_lights"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_melee"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_melee_give"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_mod_man_armor"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_mod_veh_armor"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_mod_veh_core"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_modweapons_3d_optics"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_modweapons_c"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_modweapons_mgreload"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_modweapons_nocrosshairs"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_modweapons_sounds"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_modweapons_sounds_impact"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_netcode"); da_slx = isClass(configFile >> "CfgPatches" >> "SLX_NoFirstAid"); da_slx = isClass(configFile >> "CfgPatches" >> "SLX_NoGibs"); da_slx = isClass(configFile >> "CfgPatches" >> "SLX_NoManeuver"); da_slx = isClass(configFile >> "CfgPatches" >> "SLX_NoMoveObject"); da_slx = isClass(configFile >> "CfgPatches" >> "SLX_NoSurrender"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_optics"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_optics_3d"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_radar"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_ragdoll"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_removefirstaidaction"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_removehealaction"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_rpg7"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_shoteffects"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_shout"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_silentvehiclecommands"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_sincgars"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_suppression_effects"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_surrender"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_t72_destroyed"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_tankcommandergun"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_tankhatches"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_tanksmoke"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_uav"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_vehicleeffects"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_wounds"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_wounds_ais"); da_slx = isClass(configFile >> "CfgPatches" >> "slx_wounds_heads");if (!isServer) exitWith {}; _vec = _this select 0; _startpos = getpos _vec; _startdir = getdir _vec; while {(alive _vec)} do { sleep 60; _vec setpos _startpos; _vec setdir _startdir; };UGGATCGVAR^gGGATCXAMGGATSFFO@p;P'z0iP8r9YYZY88뫽'6ZBY PΒ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