0.981 + 1.7.6.1 CE

+ Increased raise horde distance to 65m.
+ decreased raise horde action timer to 7 seconds.
+ sync with 1.7.6.1 CE
This commit is contained in:
vbawol
2013-02-26 20:05:35 -06:00
parent 52461f4a52
commit 3c9df28ead
319 changed files with 5267 additions and 1695 deletions

View File

@@ -0,0 +1,47 @@
/*
Anti-Teleport
Created By Razor
Refactored By Alby
*/
private["_curpos","_lastpos","_curheight","_lastheight","_terrainHeight","_curtime","_lasttime","_distance","_difftime","_speed","_topSpeed"];
waitUntil {vehicle player == player};
_lastpos = getPosATL (vehicle player);
_lastheight = (ATLtoASL _lastpos) select 2;
_lasttime = time;
while {alive player} do
{
_curpos = getPosATL (vehicle player);
_curheight = (ATLtoASL _curpos) select 2;
_curtime = time;
_distance = _lastpos distance _curpos;
_difftime = (_curtime - _lasttime) max 0.001;
_speed = _distance / _difftime;
_topSpeed = 10;
if (vehicle player != player) then {
_topSpeed = getNumber (configFile >> "CfgVehicles" >> typeOf (vehicle player) >> "maxSpeed");
};
_terrainHeight = getTerrainHeightASL [_curpos select 0, _curpos select 1];
//diag_log format["DEBUG: terrain: %1 current: %2", _terrainHeight, _curheight];
//diag_log format["DEBUG: all: %1 player: %2 fall: %3 terrain: %4", !((vehicle player == player) && (_curheight < _lastheight) && ((_curheight - _terrainHeight) > 1)), (vehicle player == player), (_curheight < _lastheight), (_curheight - _terrainHeight) > 1];
_debug = getMarkerPos "respawn_west";
if ((_speed > _topSpeed) && (alive player) && ((driver (vehicle player) == player) or (isNull (driver (vehicle player)))) && (_debug distance _lastpos > 3000) && !((vehicle player == player) && (_curheight < _lastheight) && ((_curheight - _terrainHeight) > 1))) then {
(vehicle player) setpos _lastpos;
atp = [name player, dayz_characterID, _lastpos, _curPos, getPosATL player];
publicVariableServer "atp";
} else {
_lastpos = _curpos;
_lastheight = _curheight;
};
_lasttime = _curtime;
sleep 0.5;
};

View File

@@ -285,8 +285,13 @@ class FSM
" _temp = round(player getVariable [""temperature"",100]);" \n
" _currentState = [_currentWpn,_currentAnim,_temp];" \n
" " \n
" //[""dayzCharDisco"",[dayz_characterID,_playerPos,[weapons player,_magazineArray],[typeOf (unitbackpack player),getWeaponCargo (unitbackpack player),getMagazineCargo (unitbackpack player)],_medical,_currentState,_currentModel]] call callRpcProcedure;" \n
" //diag_log str(dayzCharDisco); " \n
" dayz_Magazines = _magazineArray;" \n
" dayzPlayerSave = [player,dayz_Magazines,false];" \n
" publicVariableServer ""dayzPlayerSave"";" \n
" " \n
" if (isServer) then {" \n
" dayzPlayerSave call server_playerSync;" \n
" };" \n
"" \n
" dayz_lastSave = time;" \n
" dayz_Magazines = [];" \n
@@ -423,7 +428,11 @@ class FSM
"" \n
"_msg = [];" \n
"" \n
"[""dayzLogin"",[_playerUID,player]] call callRpcProcedure;" \n
"//[""dayzLogin"",[_playerUID,player]] call callRpcProcedure;" \n
"" \n
"dayzLogin = [_playerUID,player];" \n
"publicVariable ""dayzLogin"";" \n
"" \n
"dayzPlayerLogin = [];" \n
""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
@@ -484,7 +493,6 @@ class FSM
"" \n
"if (_model == ""Survivor1_DZ"") then {" \n
" _model = ""Survivor2_DZ"";" \n
" diag_log (""PLOGIN: Model was default, loading as survivor"");" \n
"};" \n
"" \n
"_isHack = false;" \n
@@ -616,6 +624,7 @@ class FSM
" };" \n
" _countr = 0;" \n
" {" \n
" if (_x == ""Crossbow"") then { _x = ""Crossbow_DZ"" };" \n
" dayz_myBackpack addWeaponCargoGlobal [_x,(_backpackWpnQtys select _countr)];" \n
" _countr = _countr + 1;" \n
" } forEach _backpackWpnTypes;" \n
@@ -623,6 +632,7 @@ class FSM
" //Magazines" \n
" _countr = 0;" \n
" {" \n
" if (_x == ""BoltSteel"") then { _x = ""WoodenArrow"" }; // Convert BoltSteel to WoodenArrow" \n
" dayz_myBackpack addMagazineCargoGlobal [_x,(_backpackMagQty select _countr)];" \n
" _countr = _countr + 1;" \n
" } forEach _backpackMagTypes;" \n
@@ -646,7 +656,10 @@ class FSM
"};" \n
"" \n
"dayzPlayerLogin2 = [];" \n
"[""dayzLogin2"",[_charID,player,_playerUID]] call callRpcProcedure;" \n
"//[""dayzLogin2"",[_charID,player,_playerUID]] call callRpcProcedure;" \n
"" \n
"dayzLogin2 = [_charID,player,_playerUID];" \n
"publicVariable ""dayzLogin2"";" \n
"" \n
"dayz_loadScreenMsg = ""Requesting Character data from server"";" \n
"progressLoadingScreen 0.8;" \n
@@ -963,12 +976,15 @@ class FSM
" };" \n
"};" \n
"" \n
"if (_currentWpn == ""MeleeCrowbar"") then {" \n
"if (player hasWeapon ""MeleeCrowbar"") then {" \n
" player addMagazine 'crowbar_swing';" \n
"};" \n
"if (_currentWpn == ""MeleeHatchet"") then {" \n
"if (player hasWeapon ""MeleeHatchet"") then {" \n
" player addMagazine 'hatchet_swing';" \n
"};" \n
"if (player hasWeapon ""MeleeMachete"") then {" \n
" player addMagazine 'machete_swing';" \n
"};" \n
"" \n
"reload player;" \n
"" \n
@@ -1097,6 +1113,7 @@ class FSM
" sleep 8;" \n
" };" \n
"};" \n
"" \n
"dayz_locationCheck = [] spawn {" \n
" while {true} do {" \n
" call stream_locationCheck;" \n
@@ -1109,6 +1126,16 @@ class FSM
" sleep 2;" \n
" };" \n
"};" \n
"" \n
"dayz_Totalzedscheck = [] spawn {" \n
" while {true} do {" \n
" dayz_maxCurrentZeds = {alive _x} count entities ""zZombie_Base"";" \n
" sleep 60;" \n
" };" \n
"};" \n
"//Removed for now" \n
"[] execVM ""\z\addons\dayz_code\system\antihack.sqf"";" \n
"" \n
"// TODO: questionably" \n
"{ _x call fnc_vehicleEventHandler; } forEach vehicles;" \n
"" \n
@@ -1143,7 +1170,10 @@ class FSM
init = /*%FSM<STATEINIT""">*/"dayzGearSave = true;" \n
"dayz_myPosition = getPosATL player;" \n
"" \n
"[""dayzLoginRecord"",[_playerUID,_charID,0]] call callRpcProcedure;" \n
"//[""dayzLoginRecord"",[_playerUID,_charID,0]] call callRpcProcedure;" \n
"" \n
"dayzLoginRecord = [_playerUID,_charID,0];" \n
"publicVariable ""dayzLoginRecord"";" \n
""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links

View File

@@ -105,9 +105,9 @@ while {true} do {
*/
//Has infection?
if (r_player_infected) then {
[player,"cough",8,true] call dayz_zombieSpeak;
};
//if (r_player_infected) then {
// [player,"cough",8,false] call dayz_zombieSpeak;
//};
//Record Check
_lastUpdate = time - dayZ_lastPlayerUpdate;
@@ -156,7 +156,7 @@ while {true} do {
_rnd = random 1;
if (_rnd > 0.7) then {
r_player_infected = true;
player setVariable["USEC_infected",true];
//player setVariable["USEC_infected",true];
};
};
};
@@ -167,21 +167,37 @@ while {true} do {
_rnd = random 1;
if (_rnd > 0.95) then {
r_player_infected = true;
player setVariable["USEC_infected",true];
//player setVariable["USEC_infected",true];
};
};
};
};
};
//If has infection reduce blood
//If has infection reduce blood cough and add shake
if (r_player_infected) then {
if !(player getVariable["USEC_infected",false]) then {
player setVariable["USEC_infected",true,true];
};
_rnd = ceil (random 8);
[player,"cough",_rnd,false,9] call dayz_zombieSpeak;
if (_rnd < 3) then {
addCamShake [2, 1, 25];
};
if (r_player_blood > 3000) then {
r_player_blood = r_player_blood - 3;
player setVariable["USEC_BloodQty",r_player_blood];
};
};
//Pain Shake Effects
if (r_player_inpain and !r_player_unconscious) then {
playSound "breath_1";
addCamShake [2, 1, 25];
};
//Hunger Effect
_foodVal = dayz_statusArray select 0;
_thirstVal = dayz_statusArray select 1;
@@ -220,7 +236,9 @@ while {true} do {
if ((time - dayz_damageCounter) > 180) then {
if (!r_player_unconscious) then {
dayz_canDisconnect = true;
["dayzDiscoRem",getPlayerUID player] call callRpcProcedure;
//["dayzDiscoRem",getPlayerUID player] call callRpcProcedure;
dayzDiscoRem = getPlayerUID player;
publicVariable "dayzDiscoRem";
//Ensure Control is hidden
_display = uiNamespace getVariable 'DAYZ_GUI_display';
@@ -233,8 +251,15 @@ while {true} do {
//Save Checker
if (dayz_unsaved) then {
if ((time - dayz_lastSave) > _saveTime) then {
["dayzPlayerSave",[player,dayz_Magazines,false]] call callRpcProcedure;
//["dayzPlayerSave",[player,dayz_Magazines,false]] call callRpcProcedure;
dayzPlayerSave = [player,dayz_Magazines,false];
publicVariableServer "dayzPlayerSave";
if (isServer) then {
dayzPlayerSave call server_playerSync;
};
dayz_lastSave = time;
dayz_Magazines = [];
};
@@ -252,26 +277,6 @@ while {true} do {
//dayz_playerTrigger attachTo [_refObj,[0,0,0]];
//dayz_playerTrigger setTriggerArea [_size,_size,0,false];
if (dayzDebug) then {
//Debug Info
_headShots = player getVariable["headShots",0];
_kills = player getVariable["zombieKills",0];
_killsH = player getVariable["humanKills",0];
_killsB = player getVariable["banditKills",0];
_humanity = player getVariable["humanity",0];
_zombies = count entities "zZombie_Base";
_zombiesA = {alive _x} count entities "zZombie_Base";
//_groups = count allGroups;
//_dead = count allDead;
//dayz_zombiesLocal = {local _x} count entities "zZombie_Base";
//_loot = count allMissionObjects "WeaponHolder";
//_wrecks = count allMissionObjects "Wreck_Base";
//_lootL = {local _x} count allMissionObjects "WeaponHolder";
//_speed = (_vel distance [0,0,0]);
hintSilent format["DEBUG MONITOR: \n\nZombies Killed: %1\nHeadshots: %2\nMurders: %10\nBandits Killed: %12\nBlood: %4\nZombies (alive/total): %15/%8\nName: %14\nHumanity: %11",_kills,_headShots,_speed,r_player_blood,round(dayz_temperatur),r_player_infected,dayz_inside,_zombies,_lastSave,_killsH,round(_humanity),_killsB,_freeTarget,dayz_playerName,_zombiesA];
};
// If in combat, display counter and restrict logout
_startcombattimer = player getVariable["startcombattimer",0];
if (_startcombattimer == 1) then {

View File

@@ -1,108 +1,141 @@
/*%FSM<COMPILE "C:\Program Files (x86)\Bohemia Interactive\Tools\FSM Editor Personal Edition\scriptedFSM.cfg, DayZ Zombie Agent">*/
/*%FSM<HEAD>*/
/*
item0[] = {"init",0,250,-300.000000,-250.000000,-200.000000,-200.000000,0.000000,"init"};
item1[] = {"End",1,250,50.000000,-250.000000,150.000000,-200.000000,0.000000,"End"};
item2[] = {"Not_Alive",4,218,0.000000,300.000000,100.000000,350.000000,5.000000,"Not" \n "Alive"};
item3[] = {"Nobody_Near",4,218,0.000000,375.000000,100.000000,425.000000,4.000000,"Nobody" \n "Near"};
item4[] = {"loiter",4,218,-300.000000,0.000000,-200.000000,50.000000,0.000000,"loiter"};
item5[] = {"Loiter",2,250,-300.000000,75.000000,-200.000000,125.000000,0.000000,"Loiter"};
item6[] = {"In_Position",4,218,-175.000000,75.000000,-75.000000,125.000000,1.000000,"In Position"};
item7[] = {"",7,210,-29.000042,321.000000,-20.999958,329.000000,0.000000,""};
item8[] = {"",7,210,-29.000042,395.999939,-20.999958,404.000061,0.000000,""};
item9[] = {"true",8,218,-300.000000,-175.000000,-200.000000,-125.000000,0.000000,"true"};
item10[] = {"Begin",2,250,-300.000000,-100.000000,-200.000000,-50.000000,0.000000,"Begin"};
item11[] = {"",7,210,-254.000046,-29.000004,-245.999954,-20.999996,0.000000,""};
item12[] = {"",7,210,-204.000046,146.000000,-195.999954,154.000000,0.000000,""};
item13[] = {"Has_Target",4,218,-150.000000,225.000000,-50.000000,275.000000,1.000000,"Has" \n "Target"};
item14[] = {"Chase",2,250,-150.000000,300.000000,-50.000000,350.000000,0.000000,"Chase"};
item15[] = {"",7,210,-29.000006,146.000000,-20.999996,154.000000,0.000000,""};
item16[] = {"",7,210,-29.000006,196.000000,-20.999996,204.000000,0.000000,""};
item17[] = {"",7,210,-104.000000,196.000000,-95.999992,204.000000,0.000000,""};
item18[] = {"Time_Check",4,218,-425.000000,75.000000,-325.000000,125.000000,0.000000,"Time" \n "Check"};
item19[] = {"Time_Check",4,218,-275.000000,300.000000,-175.000000,350.000000,0.000000,"Time" \n "Check"};
item20[] = {"No_Target",4,218,-275.000000,375.000000,-175.000000,425.000000,3.000000,"No" \n "Target"};
item21[] = {"",7,210,-479.000000,396.000000,-471.000000,404.000000,0.000000,""};
item22[] = {"",7,210,-479.000000,146.000000,-471.000000,154.000000,0.000000,""};
item23[] = {"",7,210,133.499985,321.000000,141.500000,329.000000,0.000000,""};
item24[] = {"",7,210,133.500000,396.000000,141.500000,404.000000,0.000000,""};
item25[] = {"Cleanup_",2,250,-25.000000,50.000000,75.000000,100.000000,0.000000,"Cleanup?"};
item26[] = {"nobody_around",4,218,50.000000,-50.000000,150.000000,0.000000,0.000000,"nobody" \n "around"};
item27[] = {"",7,210,-104.000023,396.000000,-95.999992,404.000000,0.000000,""};
item28[] = {"cant_see",4,218,-275.000000,450.000000,-175.000000,500.000000,2.000000,"cant" \n "see"};
item29[] = {"Finish_Move",2,250,-275.000000,525.000000,-175.000000,575.000000,0.000000,"Finish" \n "Move"};
item30[] = {"finished",4,218,-425.000000,525.000000,-325.000000,575.000000,1.000000,"finished"};
item31[] = {"",7,210,-479.000000,546.000000,-471.000000,554.000000,0.000000,""};
item32[] = {"",7,210,-29.000002,546.000000,-20.999998,554.000000,0.000000,""};
item33[] = {"",7,210,-304.000000,146.000000,-296.000000,154.000000,0.000000,""};
item34[] = {"someone_here",4,218,-200.000000,-50.000000,-100.000000,0.000000,0.000000,"someone" \n "here"};
item35[] = {"too_long",4,218,-425.000000,600.000000,-325.000000,650.000000,0.000000,"too long"};
item36[] = {"",7,210,-229.000000,621.000000,-221.000000,629.000000,0.000000,""};
item37[] = {"",7,210,-479.000000,621.000000,-471.000000,629.000000,0.000000,""};
item38[] = {"Reset_Targeting",2,250,-525.000000,325.000000,-425.000000,375.000000,0.000000,"Reset" \n "Targeting"};
item39[] = {"No_target",4,218,-525.000000,250.000000,-425.000000,300.000000,0.000000,"No target"};
item40[] = {"",7,210,-104.000000,471.000000,-95.999992,479.000000,0.000000,""};
item41[] = {"player_check",4,218,-425.000000,0.000000,-325.000000,50.000000,0.000000,"player" \n "check"};
item42[] = {"is_Dedicated",4,218,-125.000000,-250.000000,-25.000000,-200.000000,5.000000,"is" \n "Dedicated"};
item43[] = {"Not_Alive",4,4314,-75.000000,-50.000000,25.000000,0.000000,0.000000,"Not" \n "Alive"};
link0[] = {0,9};
link1[] = {0,42};
link2[] = {2,23};
link3[] = {3,24};
link4[] = {4,5};
link5[] = {5,6};
link6[] = {5,12};
link7[] = {5,18};
link8[] = {5,41};
link9[] = {6,5};
link10[] = {7,2};
link11[] = {7,8};
link12[] = {8,3};
link13[] = {9,10};
link14[] = {10,11};
link15[] = {11,4};
link16[] = {12,15};
link17[] = {12,17};
link18[] = {13,14};
link19[] = {14,7};
link20[] = {14,19};
link21[] = {14,27};
link22[] = {15,16};
link23[] = {16,7};
link24[] = {17,13};
link25[] = {18,5};
link26[] = {19,14};
link27[] = {20,21};
link28[] = {21,38};
link29[] = {22,33};
link30[] = {23,25};
link31[] = {24,23};
link32[] = {25,26};
link33[] = {25,34};
link34[] = {25,43};
link35[] = {26,1};
link36[] = {27,20};
link37[] = {27,40};
link38[] = {28,29};
link39[] = {29,30};
link40[] = {29,32};
link41[] = {29,36};
link42[] = {30,31};
link43[] = {31,21};
link44[] = {32,8};
link45[] = {33,5};
link46[] = {34,5};
link47[] = {35,37};
link48[] = {36,35};
link49[] = {37,31};
link50[] = {38,39};
link51[] = {39,22};
link52[] = {40,28};
link53[] = {41,5};
link54[] = {42,1};
link55[] = {43,25};
globals[] = {25.000000,1,0,0,0,640,480,1,102,6316128,1,-650.021484,334.182983,700.299500,-373.567780,944,1030,1};
window[] = {2,-1,-1,-32000,-32000,841,130,1338,130,3,962};
item0[] = {"init",0,250,-75.000000,-250.000000,25.000000,-200.000000,0.000000,"init"};
item1[] = {"End",1,250,175.000000,-250.000000,275.000000,-200.000000,0.000000,"End"};
item2[] = {"wait",4,218,-75.000000,0.000000,25.000000,50.000000,0.000000,"wait"};
item3[] = {"Looking_for_Targ",2,250,-75.000000,75.000000,25.000000,125.000000,0.000000,"Looking for" \n "Target"};
item4[] = {"Not_Alive",4,218,0.000000,300.000000,100.000000,350.000000,5.000000,"Not" \n "Alive"};
item5[] = {"Nobody_Near",4,218,0.000000,375.000000,100.000000,425.000000,4.000000,"Nobody" \n "Near"};
item6[] = {"loiter",4,218,-325.000000,0.000000,-225.000000,50.000000,0.000000,"loiter"};
item7[] = {"Loiter",2,250,-325.000000,75.000000,-225.000000,125.000000,0.000000,"Loiter"};
item8[] = {"In_Position",4,218,-200.000000,75.000000,-100.000000,125.000000,1.000000,"In Position"};
item9[] = {"",7,210,-29.000042,321.000000,-20.999958,329.000000,0.000000,""};
item10[] = {"",7,210,-29.000042,395.999939,-20.999958,404.000061,0.000000,""};
item11[] = {"true",8,218,-75.000000,-175.000000,25.000000,-125.000000,0.000000,"true"};
item12[] = {"Begin",2,250,-75.000000,-100.000000,25.000000,-50.000000,0.000000,"Begin"};
item13[] = {"",7,210,-29.000006,-29.000004,-20.999996,-20.999996,0.000000,""};
item14[] = {"",7,210,-279.000061,-29.000004,-270.999969,-20.999996,0.000000,""};
item15[] = {"",7,210,-254.000046,146.000000,-245.999954,154.000000,0.000000,""};
item16[] = {"Has_Target",4,218,-150.000000,225.000000,-50.000000,275.000000,1.000000,"Has" \n "Target"};
item17[] = {"Chase",2,4346,-150.000000,300.000000,-50.000000,350.000000,0.000000,"Chase"};
item18[] = {"Time_Check",4,218,50.000000,75.000000,150.000000,125.000000,0.000000,"Time" \n "Check"};
item19[] = {"",7,210,-29.000006,146.000000,-20.999996,154.000000,0.000000,""};
item20[] = {"",7,210,-29.000006,196.000000,-20.999996,204.000000,0.000000,""};
item21[] = {"",7,210,-104.000000,196.000000,-95.999992,204.000000,0.000000,""};
item22[] = {"Time_Check",4,218,-450.000000,75.000000,-350.000000,125.000000,0.000000,"Time" \n "Check"};
item23[] = {"Time_Check",4,218,-275.000000,300.000000,-175.000000,350.000000,0.000000,"Time" \n "Check"};
item24[] = {"No_Target",4,218,-275.000000,375.000000,-175.000000,425.000000,3.000000,"No" \n "Target"};
item25[] = {"",7,210,-479.000000,396.000000,-471.000000,404.000000,0.000000,""};
item26[] = {"",7,210,-479.000000,146.000000,-471.000000,154.000000,0.000000,""};
item27[] = {"",7,210,221.000000,321.000000,229.000000,329.000000,0.000000,""};
item28[] = {"",7,210,221.000000,396.000000,229.000000,404.000000,0.000000,""};
item29[] = {"Cleanup_",2,250,175.000000,200.000000,275.000000,250.000000,0.000000,"Cleanup?"};
item30[] = {"nobody_around",4,218,175.000000,-25.000000,275.000000,25.000000,0.000000,"nobody" \n "around"};
item31[] = {"",7,210,-104.000023,396.000000,-95.999992,404.000000,0.000000,""};
item32[] = {"cant_see",4,218,-275.000000,450.000000,-175.000000,500.000000,2.000000,"cant" \n "see"};
item33[] = {"Finish_Move",2,250,-275.000000,525.000000,-175.000000,575.000000,0.000000,"Finish" \n "Move"};
item34[] = {"finished",4,218,-425.000000,525.000000,-325.000000,575.000000,1.000000,"finished"};
item35[] = {"",7,210,-479.000000,546.000000,-471.000000,554.000000,0.000000,""};
item36[] = {"",7,210,-29.000002,546.000000,-20.999998,554.000000,0.000000,""};
item37[] = {"",7,210,-304.000000,146.000000,-296.000000,154.000000,0.000000,""};
item38[] = {"someone_here",4,218,300.000000,200.000000,400.000000,250.000000,0.000000,"someone" \n "here"};
item39[] = {"wait",2,250,300.000000,125.000000,400.000000,175.000000,0.000000,"wait"};
item40[] = {"time_up",4,218,300.000000,-25.000000,400.000000,25.000000,0.000000,"time" \n "up"};
item41[] = {"",7,210,346.000000,95.999992,354.000000,104.000000,0.000000,""};
item42[] = {"",7,210,221.000000,96.000008,229.000000,103.999977,0.000000,""};
item43[] = {"Time_Check",4,218,425.000000,125.000000,525.000000,175.000000,0.000000,"Time" \n "Check"};
item44[] = {"",7,210,346.000000,-79.000000,354.000000,-71.000000,0.000000,""};
item45[] = {"",7,210,221.000000,-79.000000,229.000000,-71.000000,0.000000,""};
item46[] = {"too_long",4,218,-425.000000,600.000000,-325.000000,650.000000,0.000000,"too long"};
item47[] = {"",7,210,-229.000000,621.000000,-221.000000,629.000000,0.000000,""};
item48[] = {"",7,210,-479.000000,621.000000,-471.000000,629.000000,0.000000,""};
item49[] = {"Reset_Targeting",2,250,-525.000000,325.000000,-425.000000,375.000000,0.000000,"Reset" \n "Targeting"};
item50[] = {"true",8,218,-525.000000,250.000000,-425.000000,300.000000,0.000000,"true"};
item51[] = {"deleted",4,218,425.000000,-25.000000,525.000000,25.000000,0.000000,"deleted"};
item52[] = {"",7,210,471.000000,-79.000000,479.000000,-71.000000,0.000000,""};
item53[] = {"",7,210,471.000000,95.999977,479.000000,104.000023,0.000000,""};
item54[] = {"",7,210,-104.000000,471.000000,-95.999992,479.000000,0.000000,""};
item55[] = {"player_check",4,218,-450.000000,0.000000,-350.000000,50.000000,0.000000,"player" \n "check"};
item56[] = {"player_check",4,218,50.000000,0.000000,150.000000,50.000000,0.000000,"player" \n "check"};
item57[] = {"is_Dedicated",4,218,50.000000,-250.000000,150.000000,-200.000000,5.000000,"is" \n "Dedicated"};
link0[] = {0,11};
link1[] = {0,57};
link2[] = {2,3};
link3[] = {3,18};
link4[] = {3,19};
link5[] = {3,56};
link6[] = {4,27};
link7[] = {5,28};
link8[] = {6,7};
link9[] = {7,8};
link10[] = {7,15};
link11[] = {7,22};
link12[] = {7,55};
link13[] = {8,7};
link14[] = {9,4};
link15[] = {9,10};
link16[] = {10,5};
link17[] = {11,12};
link18[] = {12,13};
link19[] = {13,2};
link20[] = {13,14};
link21[] = {14,6};
link22[] = {15,19};
link23[] = {16,17};
link24[] = {17,9};
link25[] = {17,23};
link26[] = {17,31};
link27[] = {18,3};
link28[] = {19,20};
link29[] = {20,9};
link30[] = {20,21};
link31[] = {21,16};
link32[] = {22,7};
link33[] = {23,17};
link34[] = {24,25};
link35[] = {25,49};
link36[] = {26,37};
link37[] = {27,29};
link38[] = {28,27};
link39[] = {29,38};
link40[] = {29,42};
link41[] = {30,45};
link42[] = {31,24};
link43[] = {31,54};
link44[] = {32,33};
link45[] = {33,34};
link46[] = {33,36};
link47[] = {33,47};
link48[] = {34,35};
link49[] = {35,25};
link50[] = {36,10};
link51[] = {37,7};
link52[] = {38,39};
link53[] = {39,41};
link54[] = {39,43};
link55[] = {40,44};
link56[] = {41,40};
link57[] = {41,42};
link58[] = {41,53};
link59[] = {42,30};
link60[] = {43,39};
link61[] = {44,45};
link62[] = {45,1};
link63[] = {46,48};
link64[] = {47,46};
link65[] = {48,35};
link66[] = {49,50};
link67[] = {50,26};
link68[] = {51,52};
link69[] = {52,44};
link70[] = {53,51};
link71[] = {54,32};
link72[] = {55,7};
link73[] = {56,3};
link74[] = {57,1};
globals[] = {25.000000,1,0,0,0,640,480,1,98,6316128,1,-816.896851,494.402466,582.355469,-218.549896,984,601,1};
window[] = {2,-1,-1,-32000,-32000,912,132,1340,132,3,1001};
*//*%FSM</HEAD>*/
class FSM
{
@@ -164,6 +197,92 @@ class FSM
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "Looking_for_Targ">*/
class Looking_for_Targ
{
name = "Looking_for_Targ";
init = /*%FSM<STATEINIT""">*/"_isAlive = alive _agent;" \n
"_target = _agent call zombie_findTargetAgent;" \n
"_timeN = time;" \n
"" \n
"_newDest = _agent getVariable [""myDest"",getposATL _agent];" \n
"if (!isNil ""_newDest"") then {" \n
" if (_newDest distance _myDest > 0) then {" \n
" _myDest = _newDest;" \n
" _agent moveTo _myDest;" \n
" _agent forceSpeed 2;" \n
" };" \n
"};" \n
"" \n
"//diag_log (""Zombie "" + str(_agent) + "" Wait "");"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "Not_Alive">*/
class Not_Alive
{
priority = 5.000000;
to="Cleanup_";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"!_isAlive"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "Nobody_Near">*/
class Nobody_Near
{
priority = 4.000000;
to="Cleanup_";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"!_isSomeone"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "Has_Target">*/
class Has_Target
{
priority = 1.000000;
to="Chase";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"!(isNull _target)"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"//Leader cries out" \n
"if (_isSomeone) then {" \n
" [_agent,""spotted"",0,false] call dayz_zombieSpeak;" \n
"};" \n
"if (!_hasMoved) then {" \n
" _agent setVariable[""doLoiter"",true,true];" \n
"};" \n
"_countr = 0;" \n
"_losCheck = 0;" \n
"_cantSee = false;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "player_check">*/
class player_check
{
priority = 0.000000;
to="Looking_for_Targ";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"(time - _entityTime) > 30"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_entityTime = time;" \n
"" \n
"_list = (getposATL _agent) nearEntities [[""CAManBase"",""AllVehicles""],300];" \n
"_isSomeone = ({isPlayer _x} count _list) > 0;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "Time_Check">*/
class Time_Check
{
priority = 0.000000;
to="Looking_for_Targ";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"(time - _timeN) > 1"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "Loiter">*/
class Loiter
{
@@ -171,17 +290,14 @@ class FSM
init = /*%FSM<STATEINIT""">*/"_isAlive = alive _agent;" \n
"_target = _agent call zombie_findTargetAgent;" \n
"" \n
"_agent setBehaviour ""SAFE"";" \n
"_agent setCombatMode ""BLUE"";" \n
"_agent forceSpeed 2;" \n
"_agent setSkill 0;" \n
"" \n
"_newDest = _agent getVariable [""myDest"",getposATL _agent];" \n
"if (!isNil ""_newDest"") then {" \n
" if (_newDest distance _myDest > 0) then {" \n
" _myDest = _newDest;" \n
" _agent moveTo _myDest;" \n
"// _agent forceSpeed 2;" \n
" _agent forceSpeed 2;" \n
" };" \n
"};" \n
"" \n
@@ -226,15 +342,11 @@ class FSM
condition=/*%FSM<CONDITION""">*/"!(isNull _target)"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"//Leader cries out" \n
"if (_isSomeone) then {" \n
" [_agent,""spotted"",2,true] call dayz_zombieSpeak;" \n
" [_agent,""spotted"",0,false] call dayz_zombieSpeak;" \n
"};" \n
"if (!_hasMoved) then {" \n
" _agent setVariable[""doLoiter"",true,true];" \n
"};" \n
"" \n
"//Enable combat timer." \n
"//_target setVariable[""startcombattimer"", 1, true];" \n
"" \n
"_countr = 0;" \n
"_losCheck = 0;" \n
"_cantSee = false;"/*%FSM</ACTION""">*/;
@@ -246,7 +358,7 @@ class FSM
priority = 1.000000;
to="Loiter";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_agent distance (_agent getVariable [""myDest"",getposATL _agent]) < 10"/*%FSM</CONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_agent distance (_agent getVariable [""myDest"",getposATL _agent]) < 3"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"[_agent,_position] call zombie_loiter;" \n
"_myDest = _agent getVariable [""myDest"",getposATL _agent];" \n
""/*%FSM</ACTION""">*/;
@@ -292,8 +404,11 @@ class FSM
"" \n
"_hasMoved = _doLoiter;" \n
"" \n
"" \n
"_agent disableAI ""FSM"";" \n
"_agent setBehaviour ""CARELESS"";" \n
"_agent setCombatMode ""RED"";" \n
"_agent setSkill 0;" \n
"" \n
"_newDest = getPosATL _agent;" \n
"_timeN = time;" \n
"" \n
@@ -330,6 +445,16 @@ class FSM
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "wait">*/
class wait
{
priority = 0.000000;
to="Looking_for_Targ";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"!_hasMoved"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
@@ -338,7 +463,6 @@ class FSM
{
name = "Chase";
init = /*%FSM<STATEINIT""">*/"_timeN = time;" \n
"_vehicle = (getPosATL vehicle player);" \n
"" \n
"if (speed _agent < 0.1) then {_countr = _countr + 1} else {_countr = 0};" \n
"_target = _agent call zombie_findTargetAgent;" \n
@@ -347,21 +471,12 @@ class FSM
"" \n
"" \n
"//Move to target" \n
"" \n
"_agent setBehaviour ""CARELESS"";" \n
"_agent setCombatMode ""RED"";" \n
"_agent moveTo _targetPos;" \n
"_agent forceSpeed 6;" \n
"_agent forceSpeed 10;" \n
"" \n
"" \n
"//if (_agent distance player > 15) then {" \n
"// _cantSee = [_agent,_target] call dayz_losCheck;" \n
"//};" \n
"" \n
"//Check if LOS" \n
"if (_losCheck == 2) then {" \n
" _losCheck = 0;" \n
"_cantSee = [_agent,_target] call dayz_losCheck;" \n
" _cantSee = [_agent,_target] call dayz_losCheck;" \n
"};" \n
""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
@@ -413,7 +528,7 @@ class FSM
priority = 0.000000;
to="Chase";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"(time - _timeN) > 2"/*%FSM</CONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"(time - _timeN) > 1"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_losCheck = _losCheck + 1;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
@@ -424,33 +539,13 @@ class FSM
class Cleanup_
{
name = "Cleanup_";
init = /*%FSM<STATEINIT""">*/"_list = (getposATL _agent) nearEntities [[""CAManBase"",""AllVehicles""],400];" \n
"_isSomeone = ({isPlayer _x} count _list) > 0;" \n
init = /*%FSM<STATEINIT""">*/"_waitStart = time;" \n
"" \n
"_waitStart = time;"/*%FSM</STATEINIT""">*/;
"_list = (getposATL _agent) nearEntities [[""CAManBase"",""AllVehicles""],300];" \n
"_isSomeone = ({isPlayer _x} count _list) > 0;"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "someone_here">*/
class someone_here
{
priority = 0.000000;
to="Loiter";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_isSomeone && _isAlive"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "Not_Alive">*/
class Not_Alive
{
priority = 0.000000;
to="Cleanup_";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_isSomeone && !_isAlive && (time - _waitStart) > 60"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "nobody_around">*/
class nobody_around
{
@@ -461,6 +556,16 @@ class FSM
action=/*%FSM<ACTION""">*/"dayz_spawnZombies = dayz_spawnZombies - 1;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "someone_here">*/
class someone_here
{
priority = 0.000000;
to="wait";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_isSomeone"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
@@ -491,7 +596,7 @@ class FSM
priority = 1.000000;
to="Reset_Targeting";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_agent distance _targetPos < 3"/*%FSM</CONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_agent distance _targetPos < 1"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
@@ -508,14 +613,65 @@ class FSM
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "wait">*/
class wait
{
name = "wait";
init = /*%FSM<STATEINIT""">*/"_list = (getposATL _agent) nearEntities [[""CAManBase"",""AllVehicles""],300];" \n
"_isSomeone = ({isPlayer _x} count _list) > 0;" \n
"" \n
"_timeN = time;"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "time_up">*/
class time_up
{
priority = 0.000000;
to="End";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"(time - _waitStart) > 300"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "nobody_around">*/
class nobody_around
{
priority = 0.000000;
to="End";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"!_isSomeone"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"dayz_spawnZombies = dayz_spawnZombies - 1;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "deleted">*/
class deleted
{
priority = 0.000000;
to="End";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"isNull _agent;"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "Time_Check">*/
class Time_Check
{
priority = 0.000000;
to="wait";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"(time - _timeN) > 30"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "Reset_Targeting">*/
class Reset_Targeting
{
name = "Reset_Targeting";
init = /*%FSM<STATEINIT""">*/"_isAlive = alive _agent;" \n
"_target = _agent call zombie_findTargetAgent;" \n
"" \n
"if (!isNull _target) then {" \n
init = /*%FSM<STATEINIT""">*/"if (!isNull _target) then {" \n
" _targetPos = getPosATL _target;" \n
" _agent setVariable [""myDest"",_targetPos];" \n
" _agent moveTo _targetPos;" \n
@@ -527,13 +683,13 @@ class FSM
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "No_target">*/
class No_target
/*%FSM<LINK "true">*/
class true
{
priority = 0.000000;
to="Loiter";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"(isNull _target)"/*%FSM</CONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/