Jump to content

Kumyrna Functional Town.


Recommended Posts

##################################Kumyrna Town allow you to live in community.###########################

@many tnks to @Cherdenko for all help.

Plant , fertilize and collect vegetables.

Heal Sick AI.

Help to fill water barrels.

and others.

Arm_A2_OA_2016_07_20_22_17_09_23.jpg

Pics:

1-A First create this path.   Mpmissions\instance_11.chernarus\custom\scripts\town\

1-B Create all this sqf and paste into town folder.

collect.sqf

Spoiler

private ["_inventory","_hasMachete","_brokemachete","_plant","_objectID","_objectUID"];

_inventory = items player;
_hasMachete =     "ItemMachete" in _inventory;
_brokemachete = round(random 10);
_plant = nearestObject [player, "MAP_c_fern"];


if !(_hasMachete) exitWith {
    cutText [format["Needs ItemMachete in your toolbelt"], "PLAIN DOWN"];
};
 
 
if (_hasMachete) then {
if (_brokemachete < 3) exitWith {
    player removeWeapon "ItemMachete";
        cutText [format["%1, broke your Machete :(",name player], "PLAIN DOWN"];
    };
 
         player playMove "AinvPknlMstpSnonWrflDnon_medic1";

         sleep 5;
        _objectID = _plant getVariable["ObjectID","0"];
        _objectUID = _plant getVariable["ObjectUID","0"];
        deleteVehicle _plant;
        [_objectID,_objectUID] call server_deleteObj;
        deleteVehicle _plant;

         player switchMove "AinvPknlMstpSnonWrflDnon_medic1";
        
        [format["<t size='0.70' color='#FFCC00'>>You collect some vegetables Press C</t>"],0,0,2,2] spawn BIS_fnc_dynamicText;

        player addMagazine "FoodCanCurgon";
};

fertilize.sqf

Spoiler

private ["_removed","_position","_inventory","_plantitems","_lastObj","_Lastplant","_Time"];

_position = getPosATL player;
_inventory = items player;
_plantitems = [["ItemZombieParts",2], "ItemWaterBottle"] call player_checkItems;
_Lastplant = 300;
_Time = time - lastuse;

if(_Time < _Lastplant) exitWith {
    cutText [format["wait anothers  %1 seconds",(round(_Time - _Lastplant))], "PLAIN DOWN"];
};

if (!_plantitems) exitWith {cutText [format["Needs 2xZombieParts and 1xWaterBottle"], "PLAIN DOWN"];};

if (_plantitems) then {
lastuse = time;
player addMagazine "ItemWaterbottleUnfilled";
sleep 3;
_removed = [["ItemZombieParts",2], "ItemWaterBottle"] call player_removeItems;
[format["<t size='0.70' color='#FFCC00'>>You plant some vegetables press C</t>"],0,0,2,2] spawn BIS_fnc_dynamicText;
player playMove "AinvPknlMstpSnonWrflDnon_medic1";
sleep 1;
_lastObj = "MAP_c_fern" createVehicle (_position);
_lastObj setVariable ["ObjectID", "1", true];
_lastObj setVariable ["ObjectUID", "1", true];

player switchMove "AinvPknlMstpSnonWrflDnon_medic1";

};

fill.sqf

Spoiler

private ["_hasitem"];

_hasitem = "ItemWaterbottleUnfilled" in magazines player;


if (!_hasitem) exitWith {cutText [format["Needs 1xItemWaterbottleUnfilled"], "PLAIN DOWN"];};

if (_hasitem) then {

player playMove "c7a_bravoKnl_idle1";
sleep 1;
[format["<t size='0.70' color='#FFCC00'>>You help with water tanks +Humanity. press C</t>"],0,0,2,2] spawn BIS_fnc_dynamicText;
[player,10] call player_humanityChange;
player switchMove "c7a_bravoKnl_idle1";
};

 

healia.sqf

Spoiler

private ["_LastUsedTime","_Time","_hasitem","_inventory","_hastool","_infectionChance","_extractChance","_bullet"];

_LastUsedTime = 1200;
_Time = time - lastuse;
_hasitem = "ItemBloodbag" in magazines player;
_inventory = items player;
_hastool =     "ItemKnife" in _inventory;
_infectionChance = round(random 10);
_extractChance = round(random 10);
_bullet = ["WoodenArrow","2Rnd_shotgun_74Slug","2Rnd_shotgun_74Pellets"] call BIS_fnc_selectRandom;

if(_Time < _LastUsedTime) exitWith {
    cutText [format["wait %1 seconds",(round(_Time - _LastUsedTime))], "PLAIN DOWN"];
};

if !(_hasitem) exitWith {
    cutText [format["Needs 1xBloodbag"], "PLAIN DOWN"];
};
if !(_hastool) exitWith {
    cutText [format["Needs ItemKnife in your inventory"], "PLAIN DOWN"];
};

if (_hastool && _hasitem) then {
   lastuse = time;
 player removeMagazine "ItemBloodbag";  
if (_infectionChance < 4) then {r_player_infected = true;
        cutText [format["%1, you get infected by some kind of virus",name player], "PLAIN DOWN"];
    };  
    sleep 1;
if (_extractChance < 5) then {
player addMagazine _bullet;
cutText [format["%1, you extract a bullet",name player], "PLAIN DOWN"];
};  
   player playMove "AinvPknlMstpSnonWrflDnon_medic1";
   sleep 5;
   player switchMove "AinvPknlMstpSnonWrflDnon_medic1";
   [format["<t size='0.70' color='#FFCC00'>>healed this man +70Humanity Press C</t>"],0,0,2,2] spawn BIS_fnc_dynamicText;
[player,70] call player_humanityChange;
};

repair.sqf

Spoiler

private["_inventory","_hastool","_items","_Lastuse","_Time","_rew","_broketool"];

 

_inventory = items player;
_hastool =     "ItemToolbox" in _inventory;
_items = [["PartGeneric",2], "PartEngine"] call player_checkItems;
_Lastuse = 600;
_Time = time - lastuse;
_rew = ["ItemSodaOrangeSherbet","HandGrenade_west","ItemSodaEmpty","ItemTrashRazor","ItemTrashToiletpaper","TrashJackDaniels","TrashTinCan","ItemOilBarrel","ItemFuelBarrel","ItemBriefcase50oz","ItemAluminumBar10oz","FoodSteakRaw","ItemWaterbottle","ItemAntibiotic","ItemBloodbag","ItemEpinephrine","ItemMorphine","ItemCanvas","MortarBucket","ItemLightBulb","PartWheel","ItemTent","ItemTentOld","Skin_FR_OHara_DZ","ItemGenerator","ItemComboLock","ItemMixOil","ItemKiloHemp","ItemSandbag","30Rnd_556x45_StanagSD","100Rnd_762x54_PK","20Rnd_762x51_DMR","PartGlass","ItemRuby"] call BIS_fnc_selectRandom;
_broketool = round(random 10);
if(_Time < _Lastuse) exitWith {
    cutText [format["wait anothers  %1 seconds",(round(_Time - _Lastuse))], "PLAIN DOWN"];
};

if !(_items) exitWith {cutText [format["Needs 2xPartGeneric and 1xPartEngine"], "PLAIN DOWN"];};
if !(_hastool) exitWith {cutText [format["Needs 1xToolbox"], "PLAIN DOWN"];};

if (_items && _hastool) then {

if (_brokemachete < 3) exitWith {
    player removeWeapon "ItemToolbox";
        cutText [format["%1, broke your toolbox",name player], "PLAIN DOWN"];
    };

lastuse = time;

player playActionNow "Medic";
[format["<t size='0.70' color='#FFCC00'>>You helped repair the vehicle. Gain 1xItem+70Humanity</t>"],0,0,2,2] spawn BIS_fnc_dynamicText;
sleep 1;
_removed = [["PartGeneric",2], "PartEngine"] call player_removeItems;
player addMagazine _rew;
[player,70] call player_humanityChange;
};

kumyrna_crates.sqf

Spoiler

private ["_cratemodels","_variete","_stone","_wood","_farm","_aiweapon","_crate1"];

spawncrate = {
_cratemodels=["USBasicWeapons_EP1","LocalBasicAmmunitionBox"] call BIS_fnc_selectRandom;
 
_variete = ["ItemSodaOrangeSherbet","HandGrenade_west","ItemSodaEmpty","ItemTrashRazor","ItemTrashToiletpaper","TrashJackDaniels","TrashTinCan","ItemOilBarrel","ItemFuelBarrel","ItemBriefcase50oz","ItemAluminumBar10oz","FoodSteakRaw","ItemWaterbottle","ItemAntibiotic","ItemBloodbag","ItemEpinephrine","ItemMorphine","ItemCanvas","MortarBucket","ItemLightBulb","PartWheel","ItemTent","ItemTentOld","Skin_FR_OHara_DZ","ItemGenerator","ItemComboLock","ItemMixOil","ItemKiloHemp","ItemSandbag","30Rnd_556x45_StanagSD","100Rnd_762x54_PK","20Rnd_762x51_DMR","PartGlass","ItemRuby"] call BIS_fnc_selectRandom;
_stone = ["CinderBlocks","MortarBucket","PartOreSilver"] call BIS_fnc_selectRandom;
_wood = ["PartPlywoodPack","PartWoodPile","PartWoodLumber"] call  BIS_fnc_selectRandom;
_farm =  ["FoodchickenRaw","FoodCanCorn","FoodrabbitRaw","ItemKiloHemp","FoodCanCurgon"] call BIS_fnc_selectRandom;
_aiweapon = ["M16A2","M4A1"] call BIS_fnc_selectRandom;
 
         _crate1 = objNull;
            if (true) then{
               

                _this = createVehicle [_cratemodels, [8352.9189, 5950.7417, -3.0517578e-005], [], 0, "CAN_COLLIDE"];
                _crate1 = _this;
               
                 clearWeaponCargoGlobal _crate1;
                 clearMagazineCargoGlobal _crate1;      
                 _crate1 addWeaponCargoGlobal [_aiweapon, 1];
                 _crate1 addmagazinecargoglobal [_variete, 2];
                 _crate1 addmagazinecargoglobal [_wood, 5];
                 _crate1 addmagazinecargoglobal [_stone, 3];
                 _crate1 addmagazinecargoglobal [_farm, 3];
                 _crate1 setVariable ["permaLoot",true];
            };
            
             sleep 400;
 
                deleteVehicle _crate1;  

};

 

waituntil {(round(time)) > 300};

 
    if (time > 300) then {
    [nil,nil,rTitleText,"New Supplies in Kumyrna Town", "PLAIN",10] call RE;
    call spawncrate;
    };   
    
waituntil {(round(time)) > 1200};

 
    if (time > 1200) then {
    [nil,nil,rTitleText,"New Supplies in Kumyrna Town", "PLAIN",10] call RE;
    call spawncrate;
    };

waituntil {(round(time)) > 2400};

 
    if (time > 2400) then {
    [nil,nil,rTitleText,"New Supplies in Kumyrna Town", "PLAIN",10] call RE;
    call spawncrate;
    };     
    
waituntil {(round(time)) > 3600};

 
    if (time > 3600) then {
    [nil,nil,rTitleText,"New Supplies in Kumyrna Town", "PLAIN",10] call RE;
    call spawncrate;
    };

waituntil {(round(time)) > 4800};

 
    if (time > 4800) then {
    [nil,nil,rTitleText,"New Supplies in Kumyrna Town", "PLAIN",10] call RE;
    call spawncrate;
    };     
       
waituntil {(round(time)) > 6000};

 
    if (time > 6000) then {
    [nil,nil,rTitleText,"New Supplies in Kumyrna Town", "PLAIN",10] call RE;
    call spawncrate;
    };     

waituntil {(round(time)) > 7200};

 
    if (time > 7200) then {
    [nil,nil,rTitleText,"New Supplies in Kumyrna Town", "PLAIN",10] call RE;
    call spawncrate;
    };            
    

 

town.sqf

Spoiler

if (isServer) then {
    


private ["_cratemodels","_variete","_stone","_wood","_farm","_aiweapon"];

 

 

_cratemodels=["USBasicWeapons_EP1","LocalBasicAmmunitionBox"] call BIS_fnc_selectRandom;

_variete = ["ItemSodaOrangeSherbet","HandGrenade_west","ItemSodaEmpty","ItemTrashRazor","ItemTrashToiletpaper","TrashJackDaniels","TrashTinCan","ItemOilBarrel","ItemFuelBarrel","ItemBriefcase50oz","ItemAluminumBar10oz","FoodSteakRaw","ItemWaterbottle","ItemAntibiotic","ItemBloodbag","ItemEpinephrine","ItemMorphine","ItemCanvas","MortarBucket","ItemLightBulb","PartWheel","ItemTent","ItemTentOld","Skin_FR_OHara_DZ","ItemGenerator","ItemComboLock","ItemMixOil","ItemKiloHemp","ItemSandbag","30Rnd_556x45_StanagSD","100Rnd_762x54_PK","20Rnd_762x51_DMR","PartGlass","ItemRuby"] call BIS_fnc_selectRandom;
_stone = ["CinderBlocks","MortarBucket","PartOreSilver"] call BIS_fnc_selectRandom;
_wood = ["PartPlywoodPack","PartWoodPile","PartWoodLumber"] call  BIS_fnc_selectRandom;
_farm =  ["FoodchickenRaw","FoodCanCorn","FoodrabbitRaw","ItemKiloHemp","FoodCanCurgon"] call BIS_fnc_selectRandom;
_aiweapon = ["M16A2","M4A1"] call BIS_fnc_selectRandom;

 

 


_vehicle_0 = objNull;
if (true) then
{
  _this = createVehicle ["Land_wagon_flat", [8388.8428, 5985.5498, -3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_0 = _this;
  _this setDir 4.7935038;
  _this setPos [8388.8428, 5985.5498, -3.0517578e-005];
};

_vehicle_1 = objNull;
if (true) then
{
  _this = createVehicle ["Land_wagon_tanker", [8324.6475, 6002.02, -3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_1 = _this;
  _this setDir 6.921792;
  _this setPos [8324.6475, 6002.02, -3.0517578e-005];
};

_vehicle_2 = objNull;
if (true) then
{
  _this = createVehicle ["Land_wagon_tanker", [8322.0645, 5986.6348, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_2 = _this;
  _this setDir -169.59525;
  _this setPos [8322.0645, 5986.6348, 3.0517578e-005];
};

_vehicle_3 = objNull;
if (true) then
{
  _this = createVehicle ["Land_loco_742_blue", [8391.083, 6000.3823, -0.32315558], [], 0, "CAN_COLLIDE"];
  _vehicle_3 = _this;
  _this setDir 7.733901;
  _this setPos [8391.083, 6000.3823, -0.32315558];
};

_vehicle_5 = objNull;
if (true) then
{
  _this = createVehicle ["Base_WarfareBBarrier10x", [8376.5957, 5953.9277, 6.1035156e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_5 = _this;
  _this setDir -55.811733;
  _this setPos [8376.5957, 5953.9277, 6.1035156e-005];
};

_vehicle_6 = objNull;
if (true) then
{
  _this = createVehicle ["Base_WarfareBBarrier10x", [8347.1592, 5943.7881, -3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_6 = _this;
  _this setDir 9.8064079;
  _this setPos [8347.1592, 5943.7881, -3.0517578e-005];
};

_vehicle_7 = objNull;
if (true) then
{
  _this = createVehicle ["Base_WarfareBBarrier10x", [8331.7471, 5946.2349], [], 0, "CAN_COLLIDE"];
  _vehicle_7 = _this;
  _this setDir 8.5330505;
  _this setPos [8331.7471, 5946.2349];
};

_vehicle_8 = objNull;
if (true) then
{
  _this = createVehicle ["Base_WarfareBBarrier10x", [8320.3662, 5960.1929, -9.1552734e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_8 = _this;
  _this setDir -84.58651;
  _this setPos [8320.3662, 5960.1929, -9.1552734e-005];
};

_vehicle_9 = objNull;
if (true) then
{
  _this = createVehicle ["RU_WarfareBContructionSite1", [8321.3662, 5949.6025, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_9 = _this;
  _this setDir -43.935574;
  _this setPos [8321.3662, 5949.6025, 3.0517578e-005];
};

_vehicle_10 = objNull;
if (true) then
{
  _this = createVehicle ["USMC_WarfareBContructionSite1", [8360.9004, 5942.9434], [], 0, "CAN_COLLIDE"];
  _vehicle_10 = _this;
  _this setDir -74.842644;
  _this setPos [8360.9004, 5942.9434];
};

_vehicle_11 = objNull;
if (true) then
{
  _this = createVehicle ["Gue_WarfareBContructionSite", [8367.5313, 5943.333, 6.1035156e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_11 = _this;
  _this setDir -115.11785;
  _this setPos [8367.5313, 5943.333, 6.1035156e-005];
};

_vehicle_12 = objNull;
if (true) then
{
  _this = createVehicle ["CDF_WarfareBContructionSite", [8373.0127, 5944.062, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_12 = _this;
  _this setDir -39.452511;
  _this setPos [8373.0127, 5944.062, 3.0517578e-005];
};

_vehicle_14 = objNull;
if (true) then
{
  _this = createVehicle ["WarfareBDepot", [8312.5313, 5971.9531, -0.72902364], [], 0, "CAN_COLLIDE"];
  _vehicle_14 = _this;
  _this setDir 96.092987;
  _this setPos [8312.5313, 5971.9531, -0.72902364];
};

_vehicle_15 = objNull;
if (true) then
{
  _this = createVehicle ["Base_WarfareBBarrier10x", [8345.9961, 6001.0469, -0.11430262], [], 0, "CAN_COLLIDE"];
  _vehicle_15 = _this;
  _this setDir 9.2801857;
  _this setPos [8345.9961, 6001.0469, -0.11430262];
};

_vehicle_16 = objNull;
if (true) then
{
  _this = createVehicle ["Base_WarfareBBarrier10x", [8383.0986, 6008.4897, -0.19163758], [], 0, "CAN_COLLIDE"];
  _vehicle_16 = _this;
  _this setDir 6.0567055;
  _this setPos [8383.0986, 6008.4897, -0.19163758];
};

_vehicle_17 = objNull;
if (true) then
{
  _this = createVehicle ["Base_WarfareBBarrier5x", [8329.6641, 6004.4277, -0.091218382], [], 0, "CAN_COLLIDE"];
  _vehicle_17 = _this;
  _this setDir 6.5544825;
  _this setPos [8329.6641, 6004.4277, -0.091218382];
};

_vehicle_18 = objNull;
if (true) then
{
  _this = createVehicle ["Base_WarfareBBarrier5x", [8364.4102, 6005.9946, -0.19929199], [], 0, "CAN_COLLIDE"];
  _vehicle_18 = _this;
  _this setDir 6.3449373;
  _this setPos [8364.4102, 6005.9946, -0.19929199];
};

_vehicle_20 = objNull;
if (true) then
{
  _this = createVehicle ["RU_WarfareBContructionSite", [8370.1016, 6010.3584, -0.12425319], [], 0, "CAN_COLLIDE"];
  _vehicle_20 = _this;
  _this setDir -81.004128;
  _this setPos [8370.1016, 6010.3584, -0.12425319];
};

_vehicle_21 = objNull;
if (true) then
{
  _this = createVehicle ["USMC_WarfareBContructionSite", [8365.5176, 6009.6616, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_21 = _this;
  _this setDir 9.2589092;
  _this setPos [8365.5176, 6009.6616, 3.0517578e-005];
};

_vehicle_22 = objNull;
if (true) then
{
  _this = createVehicle ["USMC_WarfareBContructionSite", [8386.748, 5969.0156, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_22 = _this;
  _this setDir 0.85828412;
  _this setPos [8386.748, 5969.0156, 3.0517578e-005];
};

_vehicle_23 = objNull;
if (true) then
{
  _this = createVehicle ["RU_WarfareBContructionSite1", [8389.3477, 5990.4277, 1.0548754], [], 0, "CAN_COLLIDE"];
  _vehicle_23 = _this;
  _this setDir 4.7629237;
  _this setPos [8389.3477, 5990.4277, 1.0548754];
};

_vehicle_25 = objNull;
if (true) then
{
  _this = createVehicle ["Base_WarfareBBarrier5x", [8388.7959, 5983.4014, 1.0953301], [], 0, "CAN_COLLIDE"];
  _vehicle_25 = _this;
  _this setDir -86.121201;
  _this setPos [8388.7959, 5983.4014, 1.0953301];
};

_vehicle_26 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Barbedwire", [8389.4326, 5965.6001, -9.1552734e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_26 = _this;
  _this setDir -94.107643;
  _this setPos [8389.4326, 5965.6001, -9.1552734e-005];
};

_vehicle_27 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Barbedwire", [8389.0557, 5984.2617, 2.5191019], [], 0, "CAN_COLLIDE"];
  _vehicle_27 = _this;
  _this setDir -86.050621;
  _this setPos [8389.0557, 5984.2617, 2.5191019];
};

_vehicle_28 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_CamoNet_EAST_var1", [8383.4854, 5975.1123, -3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_28 = _this;
  _this setDir -83.844536;
  _this setPos [8383.4854, 5975.1123, -3.0517578e-005];
};

_vehicle_29 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_CamoNet_EAST_var1", [8357.0996, 6002.4399, 0.465601], [], 0, "CAN_COLLIDE"];
  _vehicle_29 = _this;
  _this setDir -1.4553945;
  _this setPos [8357.0996, 6002.4399, 0.465601];
};

_vehicle_30 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_HBarrier3", [8387.8096, 5974.3154, 6.1035156e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_30 = _this;
  _this setDir -86.540047;
  _this setPos [8387.8096, 5974.3154, 6.1035156e-005];
};

_vehicle_31 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Barbedwire", [8387.917, 5974.8955, 0.93780017], [], 0, "CAN_COLLIDE"];
  _vehicle_31 = _this;
  _this setDir -89.159958;
  _this setPos [8387.917, 5974.8955, 0.93780017];
};

_vehicle_34 = objNull;
if (true) then
{
  _this = createVehicle ["Land_BarGate2", [8323.3936, 5994.2856], [], 0, "CAN_COLLIDE"];
  _vehicle_34 = _this;
  _this setDir 103.59898;
  _this setPos [8323.3936, 5994.2856];
};

_vehicle_36 = objNull;
if (true) then
{
  _this = createVehicle ["Land_HBarrier1", [8323.54, 5996.5957, -6.1035156e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_36 = _this;
  _this setDir -81.6035;
  _this setPos [8323.54, 5996.5957, -6.1035156e-005];
};

_vehicle_37 = objNull;
if (true) then
{
  _this = createVehicle ["Land_HBarrier1", [8322.8213, 5991.9712], [], 0, "CAN_COLLIDE"];
  _vehicle_37 = _this;
  _this setDir -83.788101;
  _this setPos [8322.8213, 5991.9712];
};

_vehicle_38 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_R2_Boulder2", [8362.7979, 5959.6895, -3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_38 = _this;
  _this setPos [8362.7979, 5959.6895, -3.0517578e-005];
};

_vehicle_39 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_R2_Boulder1", [8363.8965, 5962.1372, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_39 = _this;
  _this setDir 10.356806;
  _this setPos [8363.8965, 5962.1372, 3.0517578e-005];
};

_vehicle_41 = objNull;
if (true) then
{
  _this = createVehicle ["Land_covering_hut_big_EP1", [8370.1699, 5955.4365, -6.1035156e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_41 = _this;
  _this setDir 32.41983;
  _this setPos [8370.1699, 5955.4365, -6.1035156e-005];
};

_vehicle_42 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Wheel_cart_EP1", [8366.3721, 5963.7271], [], 0, "CAN_COLLIDE"];
  _vehicle_42 = _this;
  _this setDir -46.691227;
  _this setPos [8366.3721, 5963.7271];
};

_vehicle_44 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Reservoir_EP1", [8370.9678, 5956.5571], [], 0, "CAN_COLLIDE"];
  _vehicle_44 = _this;
  _this setPos [8370.9678, 5956.5571];
};

_vehicle_45 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Fire_barrel", [8368.2139, 5955.7925, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_45 = _this;
  _this setPos [8368.2139, 5955.7925, 3.0517578e-005];
};

_vehicle_46 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Fire_barrel", [8325.5957, 5989.6372, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_46 = _this;
  _this setPos [8325.5957, 5989.6372, 3.0517578e-005];
};

_vehicle_47 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Fire_barrel", [8327.4092, 5997.4282], [], 0, "CAN_COLLIDE"];
  _vehicle_47 = _this;
  _this setPos [8327.4092, 5997.4282];
};

_vehicle_48 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Fire_barrel", [8385.7207, 5991.8506, -3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_48 = _this;
  _this setPos [8385.7207, 5991.8506, -3.0517578e-005];
};

_vehicle_49 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Fire_barrel", [8386.4482, 5981.1143, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_49 = _this;
  _this setPos [8386.4482, 5981.1143, 3.0517578e-005];
};

_vehicle_50 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Fire_barrel", [8326.8047, 5971.9688, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_50 = _this;
  _this setPos [8326.8047, 5971.9688, 3.0517578e-005];
};

_vehicle_51 = objNull;
if (true) then
{
  _this = createVehicle ["Axe_woodblock", [8366.8477, 5957.105], [], 0, "CAN_COLLIDE"];
  _vehicle_51 = _this;
  _this setPos [8366.8477, 5957.105];
};

_vehicle_52 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Ind_Timbers", [8377.9697, 5960.623], [], 0, "CAN_COLLIDE"];
  _vehicle_52 = _this;
  _this setDir 33.38015;
  _this setPos [8377.9697, 5960.623];
};

_vehicle_53 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Misc_deerstand", [8384.918, 5984.9512], [], 0, "CAN_COLLIDE"];
  _vehicle_53 = _this;
  _this setDir -84.597298;
  _this setPos [8384.918, 5984.9512];
};

_vehicle_54 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Misc_deerstand", [8335.9395, 5948.1255], [], 0, "CAN_COLLIDE"];
  _vehicle_54 = _this;
  _this setDir 9.029458;
  _this setPos [8335.9395, 5948.1255];
};

_this = createCenter west;
_this setFriend [east, 0];
_center_1 = _this;

_group_1 = createGroup _center_1;

_unit_1 = objNull;
if (true) then
{
  _this = _group_1 createUnit ["Villager4", [8366.3359, 5962.3247, -3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _unit_1 = _this;
  _this setDir -116.44053;
  _this setVehicleVarName "stone";
  stone = _this;
  _this setUnitAbility 0.60000002;
  _this addEventHandler ["handleDamage", {false}];
   removeAllWeapons _unit_1;
  _unit_1 addWeapon "MeleeSledge";
  if (true) then {_group_1 selectLeader _this;};
};

_unit_4 = objNull;
if (true) then
{
  _this = _group_1 createUnit ["RU_Villager4", [8367.0449, 5958.147, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _unit_4 = _this;
  _this setDir -106.38377;
  _this setVehicleVarName "cut";
  cut = _this;
  _this setUnitAbility 0.60000002;
  _this addEventHandler ["handleDamage", {false}];
   removeAllWeapons _unit_4;
  _unit_4 addWeapon "MeleeHatchet_DZE";
  if (false) then {_group_1 selectLeader _this;};
};

_unit_10 = objNull;
if (true) then
{
  _this = createAgent ["INS_Worker2_DZ", [8368.874, 5995.4102], [], 0, "CAN_COLLIDE"];
  _unit_10 = _this;
  _this setDir 150.14445;
  _this setVehicleVarName "worker";
  worker = _this;
  _this setUnitAbility 0.60000002;
  _this setVehicleInit "this allowDammage false; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'AUTOTARGET'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0;";
  _this addEventHandler ["handleDamage", {false}];
  _this allowDammage false; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; _this setBehaviour 'CARELESS'; _this forceSpeed 0;_this enableSimulation false;};
  if (false) then {_group_1 selectLeader _this;};


_vehicle_58 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_VilVar1_Pole", [8328.0557, 5955.2822], [], 0, "CAN_COLLIDE"];
  _vehicle_58 = _this;
  _this setPos [8328.0557, 5955.2822];
};

_vehicle_60 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_VilVar1_Pole", [8328.3857, 5963.6211], [], 0, "CAN_COLLIDE"];
  _vehicle_60 = _this;
  _this setPos [8328.3857, 5963.6211];
};

_vehicle_61 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_VilVar1_Pole", [8337.9668, 5955.022], [], 0, "CAN_COLLIDE"];
  _vehicle_61 = _this;
  _this setPos [8337.9668, 5955.022];
};

_vehicle_62 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_VilVar1_Pole", [8338.333, 5962.3271], [], 0, "CAN_COLLIDE"];
  _vehicle_62 = _this;
  _this setPos [8338.333, 5962.3271];
};

_vehicle_63 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_Wood1_5_2", [8330.6299, 5955.1558, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_63 = _this;
  _this setDir 1.0499007;
  _this setPos [8330.6299, 5955.1558, 3.0517578e-005];
};

_vehicle_64 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_Wood1_5_2", [8335.5869, 5955.0718, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_64 = _this;
  _this setPos [8335.5869, 5955.0718, 3.0517578e-005];
};

_vehicle_65 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_Wood1_5_2", [8328.1172, 5957.79, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_65 = _this;
  _this setDir 92.289703;
  _this setPos [8328.1172, 5957.79, 3.0517578e-005];
};

_vehicle_66 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_Wood1_5_2", [8328.2217, 5961.1382], [], 0, "CAN_COLLIDE"];
  _vehicle_66 = _this;
  _this setDir 93.159111;
  _this setPos [8328.2217, 5961.1382];
};

_vehicle_67 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_Wood1_5_2", [8330.9492, 5963.3481], [], 0, "CAN_COLLIDE"];
  _vehicle_67 = _this;
  _this setDir 3.9450212;
  _this setPos [8330.9492, 5963.3481];
};

_vehicle_68 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_Wood1_5_2", [8335.833, 5962.7515], [], 0, "CAN_COLLIDE"];
  _vehicle_68 = _this;
  _this setDir 10.408673;
  _this setPos [8335.833, 5962.7515];
};

_vehicle_69 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_Wood1_5_2", [8338.4355, 5959.7056], [], 0, "CAN_COLLIDE"];
  _vehicle_69 = _this;
  _this setDir -90.638199;
  _this setPos [8338.4355, 5959.7056];
};

_vehicle_70 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_Wood1D_5", [8351.3203, 5947.9678], [], 0, "CAN_COLLIDE"];
  _vehicle_70 = _this;
  _this setDir 13.287337;
  _this setPos [8351.3203, 5947.9678];
};

_vehicle_71 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_Wood1D_5", [8354.2139, 5947.2686, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_71 = _this;
  _this setDir 13.987359;
  _this setPos [8354.2139, 5947.2686, 3.0517578e-005];
};

_vehicle_72 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_Wood1D_5", [8351.6709, 5953.6138, -0.089589462], [], 0, "CAN_COLLIDE"];
  _vehicle_72 = _this;
  _this setDir 9.6791744;
  _this setPos [8351.6709, 5953.6138, -0.089589462];
};

_vehicle_73 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_Wood1D_5", [8357.5605, 5951.0068, -0.21609959], [], 0, "CAN_COLLIDE"];
  _vehicle_73 = _this;
  _this setDir -76.184227;
  _this setPos [8357.5605, 5951.0068, -0.21609959];
};

_vehicle_74 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_Wood1D_5", [8355.3477, 5952.8369, -0.1629236], [], 0, "CAN_COLLIDE"];
  _vehicle_74 = _this;
  _this setDir 12.478394;
  _this setPos [8355.3477, 5952.8369, -0.1629236];
};

_vehicle_77 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_c_fern", [8332.1621, 5956.9165, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_77 = _this;
  _this setPos [8332.1621, 5956.9165, 3.0517578e-005];
};

_vehicle_78 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_c_fern2", [8334.4199, 5958.1523, 0], [], 0, "CAN_COLLIDE"];
  _vehicle_78 = _this;
  _this setPos [8334.4199, 5958.1523, 0];
};

_vehicle_79 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_c_fern", [8335.4824, 5957.2729, 0], [], 0, "CAN_COLLIDE"];
  _vehicle_79 = _this;
  _this setPos [8335.4824, 5957.2729, 0];
};

_vehicle_80 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_c_fern", [8336.0664, 5956.062, -0.00012207031], [], 0, "CAN_COLLIDE"];
  _vehicle_80 = _this;
  _this setPos [8336.0664, 5956.062, -0.00012207031];
};

_vehicle_81 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_c_fern", [8335.0967, 5961.1987, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_81 = _this;
  _this setPos [8335.0967, 5961.1987, 3.0517578e-005];
};

_vehicle_82 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_c_fern", [8331.5625, 5959.7031, 0], [], 0, "CAN_COLLIDE"];
  _vehicle_82 = _this;
  _this setPos [8331.5625, 5959.7031, 0];
};

_vehicle_83 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_c_fern", [8335.2139, 5959.4448, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_83 = _this;
  _this setPos [8335.2139, 5959.4448, 3.0517578e-005];
};

_vehicle_84 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_c_fern", [8336.6289, 5958.6616, 0], [], 0, "CAN_COLLIDE"];
  _vehicle_84 = _this;
  _this setPos [8336.6289, 5958.6616, 0];
};

_vehicle_85 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_c_fern", [8337.5059, 5960.0957, -3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_85 = _this;
  _this setPos [8337.5059, 5960.0957, -3.0517578e-005];
};

_vehicle_86 = objNull;
if (true) then
{
  _this = createVehicle ["Land_transport_cart_EP1", [8339.4473, 5960.8838], [], 0, "CAN_COLLIDE"];
  _vehicle_86 = _this;
  _this setPos [8339.4473, 5960.8838];
};

_vehicle_95 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Checkered_flag_holder", [8334.0234, 5959.1826], [], 0, "CAN_COLLIDE"];
  _vehicle_95 = _this;
  _this setPos [8334.0234, 5959.1826];
};

_vehicle_96 = objNull;
if (true) then
{
  _this = createVehicle ["LADAWreck", [8366.5479, 5996.3906, -0.15960589], [], 0, "CAN_COLLIDE"];
  _vehicle_96 = _this;
  _this setDir -87.113503;
  _this setPos [8366.5479, 5996.3906, -0.15960589];
};

_vehicle_103 = objNull;
if (true) then
{
  _this = createVehicle ["Land_tires_EP1", [8371.1084, 5996.2373, -3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_103 = _this;
  _this setPos [8371.1084, 5996.2373, -3.0517578e-005];
};

_vehicle_106 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_pumpa", [8347.4893, 5953.0474], [], 0, "CAN_COLLIDE"];
  _vehicle_106 = _this;
  _this setPos [8347.4893, 5953.0474];
};

_vehicle_111 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_GasMeterExt", [8368.4697, 5997.4556, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_111 = _this;
  _this setDir 1.6018223;
  _this setPos [8368.4697, 5997.4556, 3.0517578e-005];
};

_this = createTrigger ["EmptyDetector", [8368.3916, 5963.3784, 0]];
_this setTriggerArea [5, 5, 0, false];
_this setTriggerActivation ["WEST", "PRESENT", true];
_this setTriggerStatements ["this", "stone playMove ""AinvPknlMstpSnonWrflDnon_medic"";", ""];
_trigger_0 = _this;

_this = createTrigger ["EmptyDetector", [8367.5137, 5957.3271, 0]];
_this setTriggerArea [5, 5, 0, false];
_this setTriggerActivation ["WEST", "PRESENT", true];
_this setTriggerStatements ["this", "cut playMove ""AinvPknlMstpSnonWrflDr_medic5"";", ""];
_trigger_1 = _this;

_unit_5 = objNull;
if (true) then
{
  _this = _group_1 createUnit ["BAF_Soldier_AR_MTP", [8326.0518, 5993.2832], [], 0, "CAN_COLLIDE"];
  _unit_5 = _this;
  _this setDir -444.9227;
  _this setVehicleVarName "sol1";
  sol1 = _this;
  _this setUnitAbility 0.60000002;
  _this addEventHandler ["handleDamage", {false}];
  if (false) then {_group_1 selectLeader _this;};
};

_this = createTrigger ["EmptyDetector", [8327.917, 5993.374, 3.0517578e-005]];
_this setTriggerArea [5, 5, 0, false];
_this setTriggerActivation ["WEST", "PRESENT", true];
_this setTriggerStatements ["this", "sol1 playMove ""ActsPercMstpSlowWpstDnon_sceneNikitinDisloyalty_Lopotev2"";", ""];
_trigger_2 = _this;

_unit_6 = objNull;
if (true) then
{
  _this = _group_1 createUnit ["FR_Commander", [8381.8691, 5987.4048], [], 0, "CAN_COLLIDE"];
  _unit_6 = _this;
  _this setDir -274.75079;
  _this setVehicleVarName "sol2";
  sol2 = _this;
  _this setUnitAbility 0.60000002;
  _this addEventHandler ["handleDamage", {false}];
  if (false) then {_group_1 selectLeader _this;};
};


_this = createTrigger ["EmptyDetector", [8382.2852, 5986.1982, 0]];
_this setTriggerArea [5, 5, 0, false];
_this setTriggerActivation ["WEST", "PRESENT", true];
_this setTriggerStatements ["this", "sol2 playMove ""ActsPercMstpSnonWpstDnon_sceneBardakRifle01"";", ""];
_trigger_4 = _this;

 

_this = createTrigger ["EmptyDetector", [8337.9189, 5956.1699, 0]];
_this setTriggerArea [5, 5, 0, false];
_this setTriggerActivation ["WEST", "PRESENT", true];
_this setTriggerStatements ["this", "farm playMove ""ActsPercMstpSnonWpstDnon_sceneBardakRifle01"";", ""];
_trigger_5 = _this;

 


////////////////////////#################BOX##############################///////////////
_box = objNull;
if (true) then
{
  _this = createVehicle [_cratemodels, [8369.6289, 5959.0688, -0.15827452], [], 0, "CAN_COLLIDE"];
  _box = _this;
  clearWeaponCargoGlobal _box;
  clearMagazineCargoGlobal _box;  
   _box addWeaponCargoGlobal [_aiweapon, 1];
   _box addmagazinecargoglobal [_variete, 1];
   _box addmagazinecargoglobal [_wood, 5];
   _box addmagazinecargoglobal [_stone, 3];
   _box addmagazinecargoglobal [_farm, 3];
   _box setVariable ["permaLoot",true];
};
/////////////////////////////////////////////////////////////////////////////////////////////

_this = createTrigger ["EmptyDetector", [8363.1113, 5989.0464, -3.0517578e-005]];
_this setTriggerActivation ["WEST", "PRESENT", true];
_this setTitleEffect ["TEXT", "PLAIN", "Welcome to Kumyrna Town. Youre safe now."];
_trigger_6 = _this;


_vehicle_115 = objNull;
if (true) then
{
  _this = createVehicle ["RU_WarfareBFieldhHospital", [8351.4287, 5981.8735, -0.16440336], [], 0, "CAN_COLLIDE"];
  _vehicle_115 = _this;
  _this setDir 5.4390907;
  _this setPos [8351.4287, 5981.8735, -0.16440336];
};

_unit_12 = objNull;
if (true) then
{
  _this = _group_1 createUnit ["USMC_LHD_Crew_Brown", [8351.3896, 5980.269, -3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _unit_12 = _this;
  _this setDir 76.29496;
  _this setVehicleVarName "sick";
  sick = _this;
  _this setUnitAbility 0.60000002;
  _this addEventHandler ["handleDamage", {false}];
  if (false) then {_group_1 selectLeader _this;};
};

_this = createTrigger ["EmptyDetector", [8351.0264, 5982.0693, 0]];
_this setTriggerArea [5, 5, 0, false];
_this setTriggerActivation ["WEST", "PRESENT", true];
_this setTriggerStatements ["this", "sick playMove ""AidlPpneMstpSnonWnonDnon_SleepA_death"";", ""];
_trigger_7 = _this;

_vehicle_131 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_water_tank", [8340.6123, 5997.957, -1.0013086], [], 0, "CAN_COLLIDE"];
  _vehicle_131 = _this;
  _this setDir 98.646637;
  _this setPos [8340.6123, 5997.957, -1.0013086];
};

_vehicle_132 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Fire_barrel", [8330.5078, 5953.0903, -6.1035156e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_132 = _this;
  _this setPos [8330.5078, 5953.0903, -6.1035156e-005];
};

_vehicle_133 = objNull;
if (true) then
{
  _this = createVehicle ["Barrels", [8339.9053, 5996.084, -0.049478441], [], 0, "CAN_COLLIDE"];
  _vehicle_133 = _this;
  _this setDir 8.3690462;
  _this setPos [8339.9053, 5996.084, -0.049478441];
};

_vehicle_134 = objNull;
if (true) then
{
  _this = createVehicle ["Barrels", [8342.6426, 5999.8315, -0.10469418], [], 0, "CAN_COLLIDE"];
  _vehicle_134 = _this;
  _this setPos [8342.6426, 5999.8315, -0.10469418];
};

_vehicle_135 = objNull;
if (true) then
{
  _this = createVehicle ["MetalBucket", [8340.793, 5996.9634, -0.035919987], [], 0, "CAN_COLLIDE"];
  _vehicle_135 = _this;
  _this setPos [8340.793, 5996.9634, -0.035919987];
};

};

2-Now at bottom of your custom fn_selfAction.sqf paste

Spoiler


////////////KUMYRN A TOWN//
//collect
private["_playerPos","_neartrader"];

_playerPos = getPosATL player;
_neartrader = count nearestObjects [_playerPos, ["MAP_c_fern"], 3] > 0;
 
if (_neartrader) then {
        if (s_player_t1 < 0) then {
            s_player_t1 = player addaction[("<t color=""#F7D708"">" + ("Collect Vegetables") +"</t>"),"custom\scripts\town\collect.sqf"];
        };
    } else {
        player removeAction s_player_t1;
        s_player_t1 = -1;
    };
/////////////////
////////////KUMYRN A TOWN//
//fertileze
private["_playerPos","_neartrader"];

_playerPos = getPosATL player;
_neartrader = count nearestObjects [_playerPos, ["MAP_Checkered_flag_holder"], 3] > 0;
 
if (_neartrader) then {
        if (s_player_t2 < 0) then {
            s_player_t2 = player addaction[("<t color=""#F7D708"">" + ("Fertilize n Plant") +"</t>"),"custom\scripts\town\fertilize.sqf"];
        };
    } else {
        player removeAction s_player_t2;
        s_player_t2 = -1;
    };
    
////////////KUMYRN A TOWN//
//fill
private["_playerPos","_neartrader"];

_playerPos = getPosATL player;
_neartrader = count nearestObjects [_playerPos, ["MetalBucket"], 3] > 0;
 
if (_neartrader) then {
        if (s_player_t3 < 0) then {
            s_player_t3 = player addaction[("<t color=""#F7D708"">" + ("Fill Barrels") +"</t>"),"custom\scripts\town\fill.sqf"];
        };
    } else {
        player removeAction s_player_t3;
        s_player_t3 = -1;
    };    
    
//healia
private["_playerPos","_neartrader"];

_playerPos = getPosATL player;
_neartrader = count nearestObjects [_playerPos, ["USMC_LHD_Crew_Brown"], 3] > 0;
 
if (_neartrader) then {
        if (s_player_t4 < 0) then {
            s_player_t4 = player addaction[("<t color=""#F7D708"">" + ("Heal Sick") +"</t>"),"custom\scripts\town\healia.sqf"];
        };
    } else {
        player removeAction s_player_t4;
        s_player_t4 = -1;
    };        
    
//fill
private["_playerPos","_neartrader"];

_playerPos = getPosATL player;
_neartrader = count nearestObjects [_playerPos, ["INS_Worker2_DZ"], 3] > 0;
 
if (_neartrader) then {
        if (s_player_t5 < 0) then {
            s_player_t5 = player addaction[("<t color=""#F7D708"">" + ("Help Repairing") +"</t>"),"custom\scripts\town\repair.sqf"];
        };
    } else {
        player removeAction s_player_t5;
        s_player_t5 = -1;
    };        

 

3-open your init.sqf  into if is Server section paste ONLY lines in red:

Spoiler

if (isServer) then {
    call compile preprocessFileLineNumbers "\z\addons\dayz_server\missions\DayZ_Epoch_11.Chernarus\dynamic_vehicle.sqf";
    _nil = [] execVM "\z\addons\dayz_server\missions\DayZ_Epoch_11.Chernarus\mission.sqf";

    _serverMonitor =     [] execVM "\z\addons\dayz_server\system\server_monitor.sqf";

    _kumyrna_crates = [] execVM "custom\scripts\town\kumyrna_crates.sqf"; //if u have some kind of issue like crashes or something just remove this line and delete kumyrna_crates.sqf  from town folder
    
};

4-again in your init.sqf but at very bottom paste.:

Spoiler

[] execVM "custom\scripts\town\town.sqf";

 

Link to comment
Share on other sites

2 hours ago, Cherdenko said:

Also Arma carshes everytime when the mission cache spawns in

hey you my tester :D   your game crash when crates spawns :S  ?  its strange i tested it.... any way let me see..maybe a forgot something when i do the last change for update it. for all AI with no damage  replace your town.sqf with this new:

town.sqf

Spoiler

if (isServer) then {
    


private ["_cratemodels","_variete","_stone","_wood","_farm","_aiweapon"];

 

 

_cratemodels=[
"GuerillaCacheBox",
"RULaunchersBox",
"RUBasicAmmunitionBox",
"RUOrdnanceBox",
"USBasicAmmunitionBox"
] call BIS_fnc_selectRandom;

_variete = ["ItemSodaOrangeSherbet","HandGrenade_west","ItemSodaEmpty","ItemTrashRazor","ItemTrashToiletpaper","TrashJackDaniels","TrashTinCan","ItemOilBarrel","ItemFuelBarrel","ItemBriefcase50oz","ItemAluminumBar10oz","FoodSteakRaw","ItemWaterbottle","ItemAntibiotic","ItemBloodbag","ItemEpinephrine","ItemMorphine","ItemCanvas","MortarBucket","ItemLightBulb","PartWheel","ItemTent","ItemTentOld","Skin_FR_OHara_DZ","ItemGenerator","ItemComboLock","ItemMixOil","ItemKiloHemp","ItemSandbag","30Rnd_556x45_StanagSD","100Rnd_762x54_PK","20Rnd_762x51_DMR","PartGlass","ItemRuby"] call BIS_fnc_selectRandom;
_stone = ["CinderBlocks","MortarBucket","PartOreSilver"] call BIS_fnc_selectRandom;
_wood = ["PartPlywoodPack","PartWoodPile","PartWoodLumber"] call  BIS_fnc_selectRandom;
_farm =  ["FoodchickenRaw","FoodCanCorn","FoodrabbitRaw","ItemKiloHemp","FoodCanCurgon"] call BIS_fnc_selectRandom;
_aiweapon = ["M16A2","M4A1"] call BIS_fnc_selectRandom;

 

 


_vehicle_0 = objNull;
if (true) then
{
  _this = createVehicle ["Land_wagon_flat", [8388.8428, 5985.5498, -3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_0 = _this;
  _this setDir 4.7935038;
  _this setPos [8388.8428, 5985.5498, -3.0517578e-005];
};

_vehicle_1 = objNull;
if (true) then
{
  _this = createVehicle ["Land_wagon_tanker", [8324.6475, 6002.02, -3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_1 = _this;
  _this setDir 6.921792;
  _this setPos [8324.6475, 6002.02, -3.0517578e-005];
};

_vehicle_2 = objNull;
if (true) then
{
  _this = createVehicle ["Land_wagon_tanker", [8322.0645, 5986.6348, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_2 = _this;
  _this setDir -169.59525;
  _this setPos [8322.0645, 5986.6348, 3.0517578e-005];
};

_vehicle_3 = objNull;
if (true) then
{
  _this = createVehicle ["Land_loco_742_blue", [8391.083, 6000.3823, -0.32315558], [], 0, "CAN_COLLIDE"];
  _vehicle_3 = _this;
  _this setDir 7.733901;
  _this setPos [8391.083, 6000.3823, -0.32315558];
};

_vehicle_5 = objNull;
if (true) then
{
  _this = createVehicle ["Base_WarfareBBarrier10x", [8376.5957, 5953.9277, 6.1035156e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_5 = _this;
  _this setDir -55.811733;
  _this setPos [8376.5957, 5953.9277, 6.1035156e-005];
};

_vehicle_6 = objNull;
if (true) then
{
  _this = createVehicle ["Base_WarfareBBarrier10x", [8347.1592, 5943.7881, -3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_6 = _this;
  _this setDir 9.8064079;
  _this setPos [8347.1592, 5943.7881, -3.0517578e-005];
};

_vehicle_7 = objNull;
if (true) then
{
  _this = createVehicle ["Base_WarfareBBarrier10x", [8331.7471, 5946.2349], [], 0, "CAN_COLLIDE"];
  _vehicle_7 = _this;
  _this setDir 8.5330505;
  _this setPos [8331.7471, 5946.2349];
};

_vehicle_8 = objNull;
if (true) then
{
  _this = createVehicle ["Base_WarfareBBarrier10x", [8320.3662, 5960.1929, -9.1552734e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_8 = _this;
  _this setDir -84.58651;
  _this setPos [8320.3662, 5960.1929, -9.1552734e-005];
};

_vehicle_9 = objNull;
if (true) then
{
  _this = createVehicle ["RU_WarfareBContructionSite1", [8321.3662, 5949.6025, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_9 = _this;
  _this setDir -43.935574;
  _this setPos [8321.3662, 5949.6025, 3.0517578e-005];
};

_vehicle_10 = objNull;
if (true) then
{
  _this = createVehicle ["USMC_WarfareBContructionSite1", [8360.9004, 5942.9434], [], 0, "CAN_COLLIDE"];
  _vehicle_10 = _this;
  _this setDir -74.842644;
  _this setPos [8360.9004, 5942.9434];
};

_vehicle_11 = objNull;
if (true) then
{
  _this = createVehicle ["Gue_WarfareBContructionSite", [8367.5313, 5943.333, 6.1035156e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_11 = _this;
  _this setDir -115.11785;
  _this setPos [8367.5313, 5943.333, 6.1035156e-005];
};

_vehicle_12 = objNull;
if (true) then
{
  _this = createVehicle ["CDF_WarfareBContructionSite", [8373.0127, 5944.062, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_12 = _this;
  _this setDir -39.452511;
  _this setPos [8373.0127, 5944.062, 3.0517578e-005];
};

_vehicle_14 = objNull;
if (true) then
{
  _this = createVehicle ["WarfareBDepot", [8312.5313, 5971.9531, -0.72902364], [], 0, "CAN_COLLIDE"];
  _vehicle_14 = _this;
  _this setDir 96.092987;
  _this setPos [8312.5313, 5971.9531, -0.72902364];
};

_vehicle_15 = objNull;
if (true) then
{
  _this = createVehicle ["Base_WarfareBBarrier10x", [8345.9961, 6001.0469, -0.11430262], [], 0, "CAN_COLLIDE"];
  _vehicle_15 = _this;
  _this setDir 9.2801857;
  _this setPos [8345.9961, 6001.0469, -0.11430262];
};

_vehicle_16 = objNull;
if (true) then
{
  _this = createVehicle ["Base_WarfareBBarrier10x", [8383.0986, 6008.4897, -0.19163758], [], 0, "CAN_COLLIDE"];
  _vehicle_16 = _this;
  _this setDir 6.0567055;
  _this setPos [8383.0986, 6008.4897, -0.19163758];
};

_vehicle_17 = objNull;
if (true) then
{
  _this = createVehicle ["Base_WarfareBBarrier5x", [8329.6641, 6004.4277, -0.091218382], [], 0, "CAN_COLLIDE"];
  _vehicle_17 = _this;
  _this setDir 6.5544825;
  _this setPos [8329.6641, 6004.4277, -0.091218382];
};

_vehicle_18 = objNull;
if (true) then
{
  _this = createVehicle ["Base_WarfareBBarrier5x", [8364.4102, 6005.9946, -0.19929199], [], 0, "CAN_COLLIDE"];
  _vehicle_18 = _this;
  _this setDir 6.3449373;
  _this setPos [8364.4102, 6005.9946, -0.19929199];
};

_vehicle_20 = objNull;
if (true) then
{
  _this = createVehicle ["RU_WarfareBContructionSite", [8370.1016, 6010.3584, -0.12425319], [], 0, "CAN_COLLIDE"];
  _vehicle_20 = _this;
  _this setDir -81.004128;
  _this setPos [8370.1016, 6010.3584, -0.12425319];
};

_vehicle_21 = objNull;
if (true) then
{
  _this = createVehicle ["USMC_WarfareBContructionSite", [8365.5176, 6009.6616, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_21 = _this;
  _this setDir 9.2589092;
  _this setPos [8365.5176, 6009.6616, 3.0517578e-005];
};

_vehicle_22 = objNull;
if (true) then
{
  _this = createVehicle ["USMC_WarfareBContructionSite", [8386.748, 5969.0156, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_22 = _this;
  _this setDir 0.85828412;
  _this setPos [8386.748, 5969.0156, 3.0517578e-005];
};

_vehicle_23 = objNull;
if (true) then
{
  _this = createVehicle ["RU_WarfareBContructionSite1", [8389.3477, 5990.4277, 1.0548754], [], 0, "CAN_COLLIDE"];
  _vehicle_23 = _this;
  _this setDir 4.7629237;
  _this setPos [8389.3477, 5990.4277, 1.0548754];
};

_vehicle_25 = objNull;
if (true) then
{
  _this = createVehicle ["Base_WarfareBBarrier5x", [8388.7959, 5983.4014, 1.0953301], [], 0, "CAN_COLLIDE"];
  _vehicle_25 = _this;
  _this setDir -86.121201;
  _this setPos [8388.7959, 5983.4014, 1.0953301];
};

_vehicle_26 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Barbedwire", [8389.4326, 5965.6001, -9.1552734e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_26 = _this;
  _this setDir -94.107643;
  _this setPos [8389.4326, 5965.6001, -9.1552734e-005];
};

_vehicle_27 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Barbedwire", [8389.0557, 5984.2617, 2.5191019], [], 0, "CAN_COLLIDE"];
  _vehicle_27 = _this;
  _this setDir -86.050621;
  _this setPos [8389.0557, 5984.2617, 2.5191019];
};

_vehicle_28 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_CamoNet_EAST_var1", [8383.4854, 5975.1123, -3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_28 = _this;
  _this setDir -83.844536;
  _this setPos [8383.4854, 5975.1123, -3.0517578e-005];
};

_vehicle_29 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_CamoNet_EAST_var1", [8357.0996, 6002.4399, 0.465601], [], 0, "CAN_COLLIDE"];
  _vehicle_29 = _this;
  _this setDir -1.4553945;
  _this setPos [8357.0996, 6002.4399, 0.465601];
};

_vehicle_30 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_HBarrier3", [8387.8096, 5974.3154, 6.1035156e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_30 = _this;
  _this setDir -86.540047;
  _this setPos [8387.8096, 5974.3154, 6.1035156e-005];
};

_vehicle_31 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Barbedwire", [8387.917, 5974.8955, 0.93780017], [], 0, "CAN_COLLIDE"];
  _vehicle_31 = _this;
  _this setDir -89.159958;
  _this setPos [8387.917, 5974.8955, 0.93780017];
};

_vehicle_34 = objNull;
if (true) then
{
  _this = createVehicle ["Land_BarGate2", [8323.3936, 5994.2856], [], 0, "CAN_COLLIDE"];
  _vehicle_34 = _this;
  _this setDir 103.59898;
  _this setPos [8323.3936, 5994.2856];
};

_vehicle_36 = objNull;
if (true) then
{
  _this = createVehicle ["Land_HBarrier1", [8323.54, 5996.5957, -6.1035156e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_36 = _this;
  _this setDir -81.6035;
  _this setPos [8323.54, 5996.5957, -6.1035156e-005];
};

_vehicle_37 = objNull;
if (true) then
{
  _this = createVehicle ["Land_HBarrier1", [8322.8213, 5991.9712], [], 0, "CAN_COLLIDE"];
  _vehicle_37 = _this;
  _this setDir -83.788101;
  _this setPos [8322.8213, 5991.9712];
};

_vehicle_38 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_R2_Boulder2", [8362.7979, 5959.6895, -3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_38 = _this;
  _this setPos [8362.7979, 5959.6895, -3.0517578e-005];
};

_vehicle_39 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_R2_Boulder1", [8363.8965, 5962.1372, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_39 = _this;
  _this setDir 10.356806;
  _this setPos [8363.8965, 5962.1372, 3.0517578e-005];
};

_vehicle_41 = objNull;
if (true) then
{
  _this = createVehicle ["Land_covering_hut_big_EP1", [8370.1699, 5955.4365, -6.1035156e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_41 = _this;
  _this setDir 32.41983;
  _this setPos [8370.1699, 5955.4365, -6.1035156e-005];
};

_vehicle_42 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Wheel_cart_EP1", [8366.3721, 5963.7271], [], 0, "CAN_COLLIDE"];
  _vehicle_42 = _this;
  _this setDir -46.691227;
  _this setPos [8366.3721, 5963.7271];
};

_vehicle_44 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Reservoir_EP1", [8370.9678, 5956.5571], [], 0, "CAN_COLLIDE"];
  _vehicle_44 = _this;
  _this setPos [8370.9678, 5956.5571];
};

_vehicle_45 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Fire_barrel", [8368.2139, 5955.7925, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_45 = _this;
  _this setPos [8368.2139, 5955.7925, 3.0517578e-005];
};

_vehicle_46 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Fire_barrel", [8325.5957, 5989.6372, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_46 = _this;
  _this setPos [8325.5957, 5989.6372, 3.0517578e-005];
};

_vehicle_47 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Fire_barrel", [8327.4092, 5997.4282], [], 0, "CAN_COLLIDE"];
  _vehicle_47 = _this;
  _this setPos [8327.4092, 5997.4282];
};

_vehicle_48 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Fire_barrel", [8385.7207, 5991.8506, -3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_48 = _this;
  _this setPos [8385.7207, 5991.8506, -3.0517578e-005];
};

_vehicle_49 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Fire_barrel", [8386.4482, 5981.1143, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_49 = _this;
  _this setPos [8386.4482, 5981.1143, 3.0517578e-005];
};

_vehicle_50 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Fire_barrel", [8326.8047, 5971.9688, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_50 = _this;
  _this setPos [8326.8047, 5971.9688, 3.0517578e-005];
};

_vehicle_51 = objNull;
if (true) then
{
  _this = createVehicle ["Axe_woodblock", [8366.8477, 5957.105], [], 0, "CAN_COLLIDE"];
  _vehicle_51 = _this;
  _this setPos [8366.8477, 5957.105];
};

_vehicle_52 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Ind_Timbers", [8377.9697, 5960.623], [], 0, "CAN_COLLIDE"];
  _vehicle_52 = _this;
  _this setDir 33.38015;
  _this setPos [8377.9697, 5960.623];
};

_vehicle_53 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Misc_deerstand", [8384.918, 5984.9512], [], 0, "CAN_COLLIDE"];
  _vehicle_53 = _this;
  _this setDir -84.597298;
  _this setPos [8384.918, 5984.9512];
};

_vehicle_54 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Misc_deerstand", [8335.9395, 5948.1255], [], 0, "CAN_COLLIDE"];
  _vehicle_54 = _this;
  _this setDir 9.029458;
  _this setPos [8335.9395, 5948.1255];
};

_this = createCenter west;
_this setFriend [east, 0];
_center_1 = _this;

_group_1 = createGroup _center_1;

_unit_1 = objNull;
if (true) then
{
  _this = _group_1 createUnit ["Villager4", [8366.3359, 5962.3247, -3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _unit_1 = _this;
  _this setDir -116.44053;
  _this setVehicleVarName "stone";
  stone = _this;
  _this setUnitAbility 0.60000002;
  _this addEventHandler ["handleDamage", {false}];
   removeAllWeapons _unit_1;
  _unit_1 addWeapon "MeleeSledge";
  if (true) then {_group_1 selectLeader _this;};
};

_unit_4 = objNull;
if (true) then
{
  _this = _group_1 createUnit ["RU_Villager4", [8367.0449, 5958.147, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _unit_4 = _this;
  _this setDir -106.38377;
  _this setVehicleVarName "cut";
  cut = _this;
  _this setUnitAbility 0.60000002;
  _this addEventHandler ["handleDamage", {false}];
   removeAllWeapons _unit_4;
  _unit_4 addWeapon "MeleeHatchet_DZE";
  if (false) then {_group_1 selectLeader _this;};
};

_unit_10 = objNull;
if (true) then
{
  _this = createAgent ["INS_Worker2_DZ", [8368.874, 5995.4102], [], 0, "CAN_COLLIDE"];
  _unit_10 = _this;
  _this setDir 150.14445;
  _this setVehicleVarName "worker";
  worker = _this;
  _this setUnitAbility 0.60000002;
  _this setVehicleInit "this allowDammage false; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'AUTOTARGET'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0;";
  _this addEventHandler ["handleDamage", {false}];
  _this allowDammage false; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; _this setBehaviour 'CARELESS'; _this forceSpeed 0;_this enableSimulation false;};
  if (false) then {_group_1 selectLeader _this;};


_vehicle_58 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_VilVar1_Pole", [8328.0557, 5955.2822], [], 0, "CAN_COLLIDE"];
  _vehicle_58 = _this;
  _this setPos [8328.0557, 5955.2822];
};

_vehicle_60 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_VilVar1_Pole", [8328.3857, 5963.6211], [], 0, "CAN_COLLIDE"];
  _vehicle_60 = _this;
  _this setPos [8328.3857, 5963.6211];
};

_vehicle_61 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_VilVar1_Pole", [8337.9668, 5955.022], [], 0, "CAN_COLLIDE"];
  _vehicle_61 = _this;
  _this setPos [8337.9668, 5955.022];
};

_vehicle_62 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_VilVar1_Pole", [8338.333, 5962.3271], [], 0, "CAN_COLLIDE"];
  _vehicle_62 = _this;
  _this setPos [8338.333, 5962.3271];
};

_vehicle_63 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_Wood1_5_2", [8330.6299, 5955.1558, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_63 = _this;
  _this setDir 1.0499007;
  _this setPos [8330.6299, 5955.1558, 3.0517578e-005];
};

_vehicle_64 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_Wood1_5_2", [8335.5869, 5955.0718, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_64 = _this;
  _this setPos [8335.5869, 5955.0718, 3.0517578e-005];
};

_vehicle_65 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_Wood1_5_2", [8328.1172, 5957.79, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_65 = _this;
  _this setDir 92.289703;
  _this setPos [8328.1172, 5957.79, 3.0517578e-005];
};

_vehicle_66 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_Wood1_5_2", [8328.2217, 5961.1382], [], 0, "CAN_COLLIDE"];
  _vehicle_66 = _this;
  _this setDir 93.159111;
  _this setPos [8328.2217, 5961.1382];
};

_vehicle_67 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_Wood1_5_2", [8330.9492, 5963.3481], [], 0, "CAN_COLLIDE"];
  _vehicle_67 = _this;
  _this setDir 3.9450212;
  _this setPos [8330.9492, 5963.3481];
};

_vehicle_68 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_Wood1_5_2", [8335.833, 5962.7515], [], 0, "CAN_COLLIDE"];
  _vehicle_68 = _this;
  _this setDir 10.408673;
  _this setPos [8335.833, 5962.7515];
};

_vehicle_69 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_Wood1_5_2", [8338.4355, 5959.7056], [], 0, "CAN_COLLIDE"];
  _vehicle_69 = _this;
  _this setDir -90.638199;
  _this setPos [8338.4355, 5959.7056];
};

_vehicle_70 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_Wood1D_5", [8351.3203, 5947.9678], [], 0, "CAN_COLLIDE"];
  _vehicle_70 = _this;
  _this setDir 13.287337;
  _this setPos [8351.3203, 5947.9678];
};

_vehicle_71 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_Wood1D_5", [8354.2139, 5947.2686, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_71 = _this;
  _this setDir 13.987359;
  _this setPos [8354.2139, 5947.2686, 3.0517578e-005];
};

_vehicle_72 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_Wood1D_5", [8351.6709, 5953.6138, -0.089589462], [], 0, "CAN_COLLIDE"];
  _vehicle_72 = _this;
  _this setDir 9.6791744;
  _this setPos [8351.6709, 5953.6138, -0.089589462];
};

_vehicle_73 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_Wood1D_5", [8357.5605, 5951.0068, -0.21609959], [], 0, "CAN_COLLIDE"];
  _vehicle_73 = _this;
  _this setDir -76.184227;
  _this setPos [8357.5605, 5951.0068, -0.21609959];
};

_vehicle_74 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Wall_Wood1D_5", [8355.3477, 5952.8369, -0.1629236], [], 0, "CAN_COLLIDE"];
  _vehicle_74 = _this;
  _this setDir 12.478394;
  _this setPos [8355.3477, 5952.8369, -0.1629236];
};

_vehicle_77 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_c_fern", [8332.1621, 5956.9165, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_77 = _this;
  _this setPos [8332.1621, 5956.9165, 3.0517578e-005];
};

_vehicle_78 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_c_fern2", [8334.4199, 5958.1523, 0], [], 0, "CAN_COLLIDE"];
  _vehicle_78 = _this;
  _this setPos [8334.4199, 5958.1523, 0];
};

_vehicle_79 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_c_fern", [8335.4824, 5957.2729, 0], [], 0, "CAN_COLLIDE"];
  _vehicle_79 = _this;
  _this setPos [8335.4824, 5957.2729, 0];
};

_vehicle_80 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_c_fern", [8336.0664, 5956.062, -0.00012207031], [], 0, "CAN_COLLIDE"];
  _vehicle_80 = _this;
  _this setPos [8336.0664, 5956.062, -0.00012207031];
};

_vehicle_81 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_c_fern", [8335.0967, 5961.1987, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_81 = _this;
  _this setPos [8335.0967, 5961.1987, 3.0517578e-005];
};

_vehicle_82 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_c_fern2", [8331.5625, 5959.7031, 0], [], 0, "CAN_COLLIDE"];
  _vehicle_82 = _this;
  _this setPos [8331.5625, 5959.7031, 0];
};

_vehicle_83 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_c_fern", [8335.2139, 5959.4448, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_83 = _this;
  _this setPos [8335.2139, 5959.4448, 3.0517578e-005];
};

_vehicle_84 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_c_fern", [8336.6289, 5958.6616, 0], [], 0, "CAN_COLLIDE"];
  _vehicle_84 = _this;
  _this setPos [8336.6289, 5958.6616, 0];
};

_vehicle_85 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_c_fern", [8337.5059, 5960.0957, -3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_85 = _this;
  _this setPos [8337.5059, 5960.0957, -3.0517578e-005];
};

_vehicle_86 = objNull;
if (true) then
{
  _this = createVehicle ["Land_transport_cart_EP1", [8339.4473, 5960.8838], [], 0, "CAN_COLLIDE"];
  _vehicle_86 = _this;
  _this setPos [8339.4473, 5960.8838];
};

_vehicle_95 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Checkered_flag_holder", [8334.0234, 5959.1826], [], 0, "CAN_COLLIDE"];
  _vehicle_95 = _this;
  _this setPos [8334.0234, 5959.1826];
};

_vehicle_96 = objNull;
if (true) then
{
  _this = createVehicle ["LADAWreck", [8366.5479, 5996.3906, -0.15960589], [], 0, "CAN_COLLIDE"];
  _vehicle_96 = _this;
  _this setDir -87.113503;
  _this setPos [8366.5479, 5996.3906, -0.15960589];
};

_vehicle_103 = objNull;
if (true) then
{
  _this = createVehicle ["Land_tires_EP1", [8371.1084, 5996.2373, -3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_103 = _this;
  _this setPos [8371.1084, 5996.2373, -3.0517578e-005];
};

_vehicle_106 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_pumpa", [8347.4893, 5953.0474], [], 0, "CAN_COLLIDE"];
  _vehicle_106 = _this;
  _this setPos [8347.4893, 5953.0474];
};

_vehicle_111 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_GasMeterExt", [8368.4697, 5997.4556, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_111 = _this;
  _this setDir 1.6018223;
  _this setPos [8368.4697, 5997.4556, 3.0517578e-005];
};

_this = createTrigger ["EmptyDetector", [8368.3916, 5963.3784, 0]];
_this setTriggerArea [5, 5, 0, false];
_this setTriggerActivation ["WEST", "PRESENT", true];
_this setTriggerStatements ["this", "stone playMove ""AinvPknlMstpSnonWrflDnon_medic"";", ""];
_trigger_0 = _this;

_this = createTrigger ["EmptyDetector", [8367.5137, 5957.3271, 0]];
_this setTriggerArea [5, 5, 0, false];
_this setTriggerActivation ["WEST", "PRESENT", true];
_this setTriggerStatements ["this", "cut playMove ""AinvPknlMstpSnonWrflDr_medic5"";", ""];
_trigger_1 = _this;

_unit_5 = objNull;
if (true) then
{
  _this = _group_1 createUnit ["BAF_Soldier_AR_MTP", [8326.0518, 5993.2832], [], 0, "CAN_COLLIDE"];
  _unit_5 = _this;
  _this setDir -444.9227;
  _this setVehicleVarName "sol1";
  sol1 = _this;
  _this setUnitAbility 0.60000002;
  _this addEventHandler ["handleDamage", {false}];
  if (false) then {_group_1 selectLeader _this;};
};

_this = createTrigger ["EmptyDetector", [8327.917, 5993.374, 3.0517578e-005]];
_this setTriggerArea [5, 5, 0, false];
_this setTriggerActivation ["WEST", "PRESENT", true];
_this setTriggerStatements ["this", "sol1 playMove ""ActsPercMstpSlowWpstDnon_sceneNikitinDisloyalty_Lopotev2"";", ""];
_trigger_2 = _this;

_unit_6 = objNull;
if (true) then
{
  _this = _group_1 createUnit ["FR_Commander", [8381.8691, 5987.4048], [], 0, "CAN_COLLIDE"];
  _unit_6 = _this;
  _this setDir -274.75079;
  _this setVehicleVarName "sol2";
  sol2 = _this;
  _this setUnitAbility 0.60000002;
  _this addEventHandler ["handleDamage", {false}];
  if (false) then {_group_1 selectLeader _this;};
};


_this = createTrigger ["EmptyDetector", [8382.2852, 5986.1982, 0]];
_this setTriggerArea [5, 5, 0, false];
_this setTriggerActivation ["WEST", "PRESENT", true];
_this setTriggerStatements ["this", "sol2 playMove ""ActsPercMstpSnonWpstDnon_sceneBardakRifle01"";", ""];
_trigger_4 = _this;

 

_this = createTrigger ["EmptyDetector", [8337.9189, 5956.1699, 0]];
_this setTriggerArea [5, 5, 0, false];
_this setTriggerActivation ["WEST", "PRESENT", true];
_this setTriggerStatements ["this", "farm playMove ""ActsPercMstpSnonWpstDnon_sceneBardakRifle01"";", ""];
_trigger_5 = _this;

 


////////////////////////#################BOX##############################///////////////
_box = objNull;
if (true) then
{
  _this = createVehicle [_cratemodels, [8369.6289, 5959.0688, -0.15827452], [], 0, "CAN_COLLIDE"];
  _box = _this;
  clearWeaponCargoGlobal _box;
  clearMagazineCargoGlobal _box;  
   _box addWeaponCargoGlobal [_aiweapon, 1];
   _box addmagazinecargoglobal [_variete, 1];
   _box addmagazinecargoglobal [_wood, 5];
   _box addmagazinecargoglobal [_stone, 3];
   _box addmagazinecargoglobal [_farm, 3];
   _box setVariable ["permaLoot",true];
};
/////////////////////////////////////////////////////////////////////////////////////////////

_this = createTrigger ["EmptyDetector", [8363.1113, 5989.0464, -3.0517578e-005]];
_this setTriggerActivation ["WEST", "PRESENT", true];
_this setTitleEffect ["TEXT", "PLAIN", "Welcome to Kumyrna Town. Youre safe now."];
_trigger_6 = _this;


_vehicle_115 = objNull;
if (true) then
{
  _this = createVehicle ["RU_WarfareBFieldhHospital", [8351.4287, 5981.8735, -0.16440336], [], 0, "CAN_COLLIDE"];
  _vehicle_115 = _this;
  _this setDir 5.4390907;
  _this setPos [8351.4287, 5981.8735, -0.16440336];
};

_unit_12 = objNull;
if (true) then
{
  _this = _group_1 createUnit ["USMC_LHD_Crew_Brown", [8351.3896, 5980.269, -3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _unit_12 = _this;
  _this setDir 76.29496;
  _this setVehicleVarName "sick";
  sick = _this;
  _this setUnitAbility 0.60000002;
  _this addEventHandler ["handleDamage", {false}];
  if (false) then {_group_1 selectLeader _this;};
};

_this = createTrigger ["EmptyDetector", [8351.0264, 5982.0693, 0]];
_this setTriggerArea [5, 5, 0, false];
_this setTriggerActivation ["WEST", "PRESENT", true];
_this setTriggerStatements ["this", "sick playMove ""AidlPpneMstpSnonWnonDnon_SleepA_death"";", ""];
_trigger_7 = _this;

_vehicle_131 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_water_tank", [8340.6123, 5997.957, -1.0013086], [], 0, "CAN_COLLIDE"];
  _vehicle_131 = _this;
  _this setDir 98.646637;
  _this setPos [8340.6123, 5997.957, -1.0013086];
};

_vehicle_132 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Fire_barrel", [8330.5078, 5953.0903, -6.1035156e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_132 = _this;
  _this setPos [8330.5078, 5953.0903, -6.1035156e-005];
};

_vehicle_133 = objNull;
if (true) then
{
  _this = createVehicle ["Barrels", [8339.9053, 5996.084, -0.049478441], [], 0, "CAN_COLLIDE"];
  _vehicle_133 = _this;
  _this setDir 8.3690462;
  _this setPos [8339.9053, 5996.084, -0.049478441];
};

_vehicle_134 = objNull;
if (true) then
{
  _this = createVehicle ["Barrels", [8342.6426, 5999.8315, -0.10469418], [], 0, "CAN_COLLIDE"];
  _vehicle_134 = _this;
  _this setPos [8342.6426, 5999.8315, -0.10469418];
};

_vehicle_135 = objNull;
if (true) then
{
  _this = createVehicle ["MetalBucket", [8340.793, 5996.9634, -0.035919987], [], 0, "CAN_COLLIDE"];
  _vehicle_135 = _this;
  _this setPos [8340.793, 5996.9634, -0.035919987];
};

};

this was added in main post too.

Link to comment
Share on other sites

  • 3 weeks later...

Really nice town, thanks :)

I've removed the units and the crates from the town.sqf to make it work with infistar, and replaced some items in fn_selfAction.sqf, and now all work just fine.

I use also Epoch Life and Working Places in my server, a must have for roleplayers :)

 

 

Link to comment
Share on other sites

35 minutes ago, Elderwind said:

Really nice town, thanks :)

I've removed the units and the crates from the town.sqf to make it work with infistar, and replaced some items in fn_selfAction.sqf, and now all work just fine.

I use also Epoch Life and Working Places in my server, a must have for roleplayers :)

 

 

take a look in "workshop" mod . I merge the Epoch Life ,some of working places  and others new in it. 

Link to comment
Share on other sites

Create an account or sign in to comment

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

Create an account

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

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...