| @@ -1,142 +1,138 @@ | ||
|
|
||
| // current target | ||
|
|
||
| _currentTarget = objNull; | ||
| _cursorTarget = ([10] call EPOCH_fnc_cursorTarget); | ||
| if (!isNull _cursorTarget && {!(EPOCH_target isEqualTo _cursorTarget)}) then { | ||
| if (_cursorTarget isKindOf "ThingX" || _cursorTarget isKindOf "Constructions_static_F" || _cursorTarget isKindOf "Constructions_foundation_F" || _cursorTarget isKindOf "WeaponHolder" || _cursorTarget isKindOf "AllVehicles" || _cursorTarget isKindOf "PlotPole_EPOCH") then{ | ||
| if (_cursorTarget isKindOf "Animal_Base_F") then { | ||
| if !(alive _cursorTarget) then { | ||
| _currentTarget = _cursorTarget; | ||
| }; | ||
| } else { | ||
| _currentTarget = _cursorTarget; | ||
| }; | ||
| }; | ||
| }; | ||
| EPOCH_currentTarget = _currentTarget; | ||
|
|
||
| _increaseStamina = false; | ||
| _vehicle = vehicle player; | ||
| if (_vehicle == player) then { | ||
| _val = log(abs(speed player)); | ||
| _staminaThreshold = 0.7; | ||
| if (EPOCH_playerIsSwimming) then {_staminaThreshold = 0.3}; | ||
| if (_val>_staminaThreshold) then { | ||
| EPOCH_playerStamina = (EPOCH_playerStamina - (_val/4)) max 0; | ||
| } else { | ||
| _increaseStamina = true; | ||
| _currentTarget = objNull; | ||
| _cursorTarget = ([10] call EPOCH_fnc_cursorTarget); | ||
| if (!isNull _cursorTarget && {!(EPOCH_target isEqualTo _cursorTarget)}) then { | ||
| if (_cursorTarget isKindOf "ThingX" || _cursorTarget isKindOf "Constructions_static_F" || _cursorTarget isKindOf "Constructions_foundation_F" || _cursorTarget isKindOf "WeaponHolder" || _cursorTarget isKindOf "AllVehicles" || _cursorTarget isKindOf "PlotPole_EPOCH") then{ | ||
| if (_cursorTarget isKindOf "Animal_Base_F") then { | ||
| if !(alive _cursorTarget) then { | ||
| _currentTarget = _cursorTarget; | ||
| }; | ||
| } else { | ||
| if (EPOCH_buildMode > 0) then { | ||
| EPOCH_buildMode = 0; | ||
| EPOCH_snapDirection = 0; | ||
| hintsilent "BUILD MODE: DISABLED"; | ||
| EPOCH_Target = objNull; | ||
| // EPOCH_SURVEY = []; | ||
| }; | ||
| _increaseStamina = true; | ||
|
|
||
| switch (typeOf _vehicle) do { | ||
| case "jetski_epoch": { | ||
| _clock_hour10 = floor ((date select 3)/10); | ||
| _clock_minute10 = floor ((date select 4)/10); | ||
| { | ||
| _vehicle setObjectTexture [_forEachIndex,_x]; | ||
| }forEach[ | ||
| format["\x\addons\a3_epoch_vehicles\data\num%1_ca.paa",_clock_hour10], | ||
| format["\x\addons\a3_epoch_vehicles\data\num%1_ca.paa",(date select 3)-(_clock_hour10*10)], | ||
| format["\x\addons\a3_epoch_vehicles\data\num%1_ca.paa",_clock_minute10], | ||
| format["\x\addons\a3_epoch_vehicles\data\num%1_ca.paa",(date select 4)-(_clock_minute10*10)], | ||
| format["\x\addons\a3_epoch_vehicles\data\fuel%1_ca.paa",floor(fuel _vehicle*10)] | ||
| ]; | ||
| }; | ||
| case "ebike_epoch": { | ||
| { | ||
| _vehicle setObjectTexture [_forEachIndex,_x]; | ||
| }forEach[ | ||
| format["\x\addons\a3_epoch_vehicles\data\speed%1_ca.paa",floor(speed _vehicle/9) max 0], | ||
| format["\x\addons\a3_epoch_vehicles\data\energ%1_ca.paa",floor(fuel _vehicle*14)] | ||
| ]; | ||
| }; | ||
| }; | ||
| _currentTarget = _cursorTarget; | ||
| }; | ||
|
|
||
| _envCold = EPOCH_playerTemp <= 95.0; | ||
| _envHot = EPOCH_playerTemp >= 106.7; | ||
| _hungry = EPOCH_playerHunger <= 0; | ||
| _thirsty = EPOCH_playerThirst <= 0; | ||
| _warnbloodPressure = EPOCH_playerBloodP > 120; | ||
|
|
||
| _thirst ctrlShow (EPOCH_playerThirst <= 625); | ||
| if (ctrlShown _thirst) then { | ||
| [_thirst,_thirsty] call _fadeUI; | ||
| _thirstScale = linearConversion [0,EPOCH_playerThirst,2500,0.01,1,true]; | ||
| _thirst ctrlSetTextColor [_thirstScale, _thirstScale, 0.9, 1]; | ||
| }; | ||
|
|
||
| _hunger ctrlShow (EPOCH_playerHunger <= 1250); | ||
| if (ctrlShown _hunger) then { | ||
| [_hunger,_hungry] call _fadeUI; | ||
| _hungerScale = linearConversion [0,EPOCH_playerHunger,5000,0.01,1,true]; | ||
| _hunger ctrlSetTextColor [1, _hungerScale, _hungerScale, 1]; | ||
| }; | ||
| }; | ||
| EPOCH_currentTarget = _currentTarget; | ||
|
|
||
| _increaseStamina = false; | ||
| _vehicle = vehicle player; | ||
| if (_vehicle == player) then { | ||
| _val = log(abs(speed player)); | ||
| _staminaThreshold = 0.7; | ||
| if (EPOCH_playerIsSwimming) then {_staminaThreshold = 0.3}; | ||
| if (_val>_staminaThreshold) then { | ||
| EPOCH_playerStamina = (EPOCH_playerStamina - (_val/4)) max 0; | ||
| } else { | ||
| _increaseStamina = true; | ||
| }; | ||
| } else { | ||
| if (EPOCH_buildMode > 0) then { | ||
| EPOCH_buildMode = 0; | ||
| EPOCH_snapDirection = 0; | ||
| hintsilent "BUILD MODE: DISABLED"; | ||
| EPOCH_Target = objNull; | ||
| // EPOCH_SURVEY = []; | ||
| }; | ||
| _increaseStamina = true; | ||
|
|
||
| switch (typeOf _vehicle) do { | ||
| case "jetski_epoch": { | ||
| _clock_hour10 = floor ((date select 3)/10); | ||
| _clock_minute10 = floor ((date select 4)/10); | ||
| { | ||
| _vehicle setObjectTexture [_forEachIndex,_x]; | ||
| }forEach[ | ||
| format["\x\addons\a3_epoch_vehicles\data\num%1_ca.paa",_clock_hour10], | ||
| format["\x\addons\a3_epoch_vehicles\data\num%1_ca.paa",(date select 3)-(_clock_hour10*10)], | ||
| format["\x\addons\a3_epoch_vehicles\data\num%1_ca.paa",_clock_minute10], | ||
| format["\x\addons\a3_epoch_vehicles\data\num%1_ca.paa",(date select 4)-(_clock_minute10*10)], | ||
| format["\x\addons\a3_epoch_vehicles\data\fuel%1_ca.paa",floor(fuel _vehicle*10)] | ||
| ]; | ||
| }; | ||
|
|
||
| _playerOxygen = getOxygenRemaining player; | ||
| _oxygen ctrlShow (_playerOxygen < 1); | ||
| if (ctrlShown _oxygen) then { | ||
| [_oxygen,(_playerOxygen <= 0.55)] call _fadeUI; | ||
| _oxygen ctrlSetTextColor [1, _playerOxygen, _playerOxygen, 1]; | ||
| }; | ||
|
|
||
| _hazzard ctrlShow (EPOCH_playerToxicity > 1); | ||
| if (ctrlShown _hazzard) then { | ||
| [_hazzard,(EPOCH_playerToxicity >= 55)] call _fadeUI; | ||
| _toxicScale = 1-linearConversion [0,EPOCH_playerToxicity,100,0.01,1,true]; | ||
| _hazzard ctrlSetTextColor [_toxicScale, 1, _toxicScale, 1]; | ||
| case "ebike_epoch": { | ||
| { | ||
| _vehicle setObjectTexture [_forEachIndex,_x]; | ||
| }forEach[ | ||
| format["\x\addons\a3_epoch_vehicles\data\speed%1_ca.paa",floor(speed _vehicle/9) max 0], | ||
| format["\x\addons\a3_epoch_vehicles\data\energ%1_ca.paa",floor(fuel _vehicle*14)] | ||
| ]; | ||
| }; | ||
|
|
||
| _broken ctrlShow ((player getHitPointDamage "HitLegs") >= 0.5); | ||
| if (ctrlShown _broken) then { | ||
| [_broken,true] call _fadeUI; | ||
| }; | ||
|
|
||
| if (_envCold || _envHot || _hungry || _thirsty) then { | ||
| if (_envHot || _envCold) then { | ||
| player setFatigue 1; | ||
| }; | ||
| }; | ||
|
|
||
| _envCold = EPOCH_playerTemp <= 95.0; | ||
| _envHot = EPOCH_playerTemp >= 106.7; | ||
| _hungry = EPOCH_playerHunger <= 0; | ||
| _thirsty = EPOCH_playerThirst <= 0; | ||
| _warnbloodPressure = EPOCH_playerBloodP > 120; | ||
|
|
||
| _thirst ctrlShow (EPOCH_playerThirst <= 625); | ||
| if (ctrlShown _thirst) then { | ||
| [_thirst,_thirsty] call _fadeUI; | ||
| _thirstScale = linearConversion [0,EPOCH_playerThirst,2500,0.01,1,true]; | ||
| _thirst ctrlSetTextColor [_thirstScale, _thirstScale, 0.9, 1]; | ||
| }; | ||
|
|
||
| _hunger ctrlShow (EPOCH_playerHunger <= 1250); | ||
| if (ctrlShown _hunger) then { | ||
| [_hunger,_hungry] call _fadeUI; | ||
| _hungerScale = linearConversion [0,EPOCH_playerHunger,5000,0.01,1,true]; | ||
| _hunger ctrlSetTextColor [1, _hungerScale, _hungerScale, 1]; | ||
| }; | ||
|
|
||
| _playerOxygen = getOxygenRemaining player; | ||
| _oxygen ctrlShow (_playerOxygen < 1); | ||
| if (ctrlShown _oxygen) then { | ||
| [_oxygen,(_playerOxygen <= 0.55)] call _fadeUI; | ||
| _oxygen ctrlSetTextColor [1, _playerOxygen, _playerOxygen, 1]; | ||
| }; | ||
|
|
||
| _hazzard ctrlShow (EPOCH_playerToxicity > 1); | ||
| if (ctrlShown _hazzard) then { | ||
| [_hazzard,(EPOCH_playerToxicity >= 55)] call _fadeUI; | ||
| _toxicScale = 1-linearConversion [0,EPOCH_playerToxicity,100,0.01,1,true]; | ||
| _hazzard ctrlSetTextColor [_toxicScale, 1, _toxicScale, 1]; | ||
| }; | ||
|
|
||
| _broken ctrlShow ((player getHitPointDamage "HitLegs") >= 0.5); | ||
| if (ctrlShown _broken) then { | ||
| [_broken,true] call _fadeUI; | ||
| }; | ||
|
|
||
| if (_envCold || _envHot || _hungry || _thirsty) then { | ||
| if (_envHot || _envCold) then { | ||
| player setFatigue 1; | ||
| }; | ||
| EPOCH_playerBloodP = (EPOCH_playerBloodP + 0.05) min 190; | ||
| _increaseStamina = false; | ||
| } else { | ||
| if (EPOCH_playerStamina > 0) then { | ||
| if !(_panic) then { | ||
| if (!_warnbloodPressure) then { | ||
| player setFatigue 0; | ||
| }; | ||
| EPOCH_playerBloodP = (EPOCH_playerBloodP + 0.05) min 190; | ||
| _increaseStamina = false; | ||
| } else { | ||
| if (EPOCH_playerStamina > 0) then { | ||
| if !(_panic) then { | ||
| if (!_warnbloodPressure) then { | ||
| player setFatigue 0; | ||
| }; | ||
| EPOCH_playerBloodP = EPOCH_playerBloodP - 1 max 100; | ||
| }; | ||
| }; | ||
| }; | ||
|
|
||
| _critical = (damage player >= 0.7 || _warnbloodPressure); | ||
| _emergency ctrlShow _critical; | ||
| if (ctrlShown _emergency) then { | ||
| [_emergency,(EPOCH_playerBloodP > 140)] call _fadeUI; | ||
| _emergencyScale = 1-linearConversion [0,EPOCH_playerBloodP,180,0.01,1,true]; | ||
| _emergency ctrlSetTextColor [1, _emergencyScale, _emergencyScale, 1]; | ||
| EPOCH_playerBloodP = EPOCH_playerBloodP - 1 max 100; | ||
| }; | ||
|
|
||
| if (EPOCH_playerBloodP >= 180) then { | ||
| true call EPOCH_pushCustomVar; | ||
| }; | ||
| if (_increaseStamina && (getFatigue player) == 0) then { | ||
| EPOCH_playerStamina = (EPOCH_playerStamina + 0.5) min EPOCH_playerStaminaMax; | ||
| }; | ||
| if (EPOCH_debugMode) then { | ||
| call EPOCH_debugMonitor; | ||
| }; | ||
|
|
||
| call EPOCH_TradeLoop; | ||
|
|
||
|
|
||
| onEachFrame EPOCH_onEachFrame; | ||
| }; | ||
| }; | ||
|
|
||
| _critical = (damage player >= 0.7 || _warnbloodPressure); | ||
| _emergency ctrlShow _critical; | ||
| if (ctrlShown _emergency) then { | ||
| [_emergency,(EPOCH_playerBloodP > 140)] call _fadeUI; | ||
| _emergencyScale = 1-linearConversion [0,EPOCH_playerBloodP,180,0.01,1,true]; | ||
| _emergency ctrlSetTextColor [1, _emergencyScale, _emergencyScale, 1]; | ||
| }; | ||
|
|
||
| if (EPOCH_playerBloodP >= 180) then { | ||
| true call EPOCH_pushCustomVar; | ||
| }; | ||
| if (_increaseStamina && (getFatigue player) == 0) then { | ||
| EPOCH_playerStamina = (EPOCH_playerStamina + 0.5) min EPOCH_playerStaminaMax; | ||
| }; | ||
| if (EPOCH_debugMode) then { | ||
| call EPOCH_debugMonitor; | ||
| }; | ||
|
|
||
| call EPOCH_TradeLoop; | ||
|
|
||
| onEachFrame EPOCH_onEachFrame; |
| @@ -1,97 +1,103 @@ | ||
|
|
||
| if !(EPOCH_arr_interactedObjs isEqualTo[]) then { | ||
| EPOCH_arr_interactedObjs remoteExec["EPOCH_server_save_vehicles", 2]; | ||
| EPOCH_arr_interactedObjs = []; | ||
| }; | ||
|
|
||
| if (damage player != _damagePlayer) then { | ||
| if (alive player) then { | ||
| true call EPOCH_pushCustomVar; | ||
| _damagePlayer = damage player; | ||
| }; | ||
| }; | ||
|
|
||
| if ((rating player) < 0) then { | ||
| player addRating abs(rating player); | ||
| }; | ||
|
|
||
| // calculate total available power | ||
| // 1. number of power production devices within range 75m | ||
|
|
||
| // find share of power based on factors | ||
| // 1. number of players | ||
| // 2. Other sources of drain (Lights) | ||
|
|
||
| _energyValue = EPOCH_chargeRate min _energyRegenMax; | ||
| _vehicle = vehicle player; | ||
| if (_vehicle != player && isEngineOn _vehicle) then { | ||
| _energyValue = _energyValue + 5; | ||
| }; | ||
|
|
||
| if (currentVisionMode player == 1) then { //NV enabled | ||
| _energyValue = _energyValue - _energyCostNV; | ||
| if (EPOCH_playerEnergy == 0) then { | ||
| player action["nvGogglesOff", player]; | ||
| }; | ||
| }; | ||
|
|
||
| EPOCH_playerEnergy = ((EPOCH_playerEnergy + _energyValue) min EPOCH_playerEnergyMax) max 0; | ||
|
|
||
| if !(EPOCH_playerEnergy isEqualTo _prevEnergy) then { | ||
| 9993 cutRsc["EpochGameUI3", "PLAIN", 0, false]; | ||
| _display3 = uiNamespace getVariable "EPOCH_EpochGameUI3"; | ||
| _energyDiff = round(EPOCH_playerEnergy - _prevEnergy); | ||
| _diffText = if (_energyDiff > 0) then {format["+%1",_energyDiff]} else {format["%1",_energyDiff]}; | ||
| // hint str [_energyValue,_prevEnergy,EPOCH_playerEnergy]; | ||
| (_display3 displayCtrl 21210) ctrlSetText format["%1/%2 %3", round(EPOCH_playerEnergy), EPOCH_playerEnergyMax, _diffText]; | ||
| _prevEnergy = EPOCH_playerEnergy; | ||
| }; | ||
|
|
||
| if (EPOCH_playerEnergy == 0) then { | ||
| if (EPOCH_buildMode > 0) then { | ||
| EPOCH_buildMode = 0; | ||
| EPOCH_snapDirection = 0; | ||
| _dt = ["<t size = '0.8' shadow = '0' color = '#99ffffff'>Build Mode Disabled: Need Energy< / t>", 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext; | ||
| EPOCH_Target = objNull; | ||
| EPOCH_Z_OFFSET = 0; | ||
| EPOCH_X_OFFSET = 0; | ||
| EPOCH_Y_OFFSET = 5; | ||
| }; | ||
| }; | ||
|
|
||
| _attackers = player nearEntities[["Snake_random_EPOCH", "GreatWhite_F", "Epoch_Cloak_F"], 30]; | ||
| if !(_attackers isEqualTo[]) then { | ||
| (_attackers select 0) call EPOCH_client_bitePlayer; | ||
| _panic = true; | ||
| } else { | ||
| // custom poision | ||
| _toxicObjs = player nearobjects["SmokeShellCustom", 6]; | ||
| if!(_toxicObjs IsEqualTo[]) then { | ||
| (_toxicObjs select 0) call EPOCH_client_bitePlayer; | ||
| _panic = true; | ||
| } else { | ||
| _panic = false; | ||
| }; | ||
| }; | ||
|
|
||
| call EPOCH_fnc_Weather; | ||
|
|
||
| // Hunger / Thirst | ||
| _HTlossRate = _baseHTLoss; | ||
| if (EPOCH_playerStamina < 100) then { | ||
| if ((getFatigue player) > 0) then { | ||
| _HTlossRate = _HTlossRate + (_HTlossRate*(getFatigue player)); | ||
| }; | ||
| } else { | ||
| _HTlossRate = (_HTlossRate / 2); | ||
| }; | ||
|
|
||
| EPOCH_playerHunger = (EPOCH_playerHunger - _HTlossRate) max 0; | ||
| EPOCH_playerThirst = (EPOCH_playerThirst - _HTlossRate) max 0; | ||
|
|
||
| call _lootBubble; | ||
|
|
||
| EPOCH_playerStaminaMax = (100 * (round(EPOCH_playerAliveTime/360)/10)) min 2500; | ||
|
|
||
| //player setAnimSpeedCoef 0.75; | ||
| //player setCustomAimCoef 1; | ||
| if !(EPOCH_arr_interactedObjs isEqualTo[]) then { | ||
| EPOCH_arr_interactedObjs remoteExec["EPOCH_server_save_vehicles", 2]; | ||
| EPOCH_arr_interactedObjs = []; | ||
| }; | ||
|
|
||
| if (damage player != _damagePlayer) then { | ||
| if (alive player) then { | ||
| true call EPOCH_pushCustomVar; | ||
| _damagePlayer = damage player; | ||
| }; | ||
| }; | ||
|
|
||
| // this fixes issues with players being unable to ride in the same vehicle | ||
| if ((rating player) < 0) then { | ||
| player addRating abs(rating player); | ||
| }; | ||
|
|
||
| // calculate total available power | ||
| // 1. number of power production devices within range 75m | ||
|
|
||
| // find share of power based on factors | ||
| // 1. number of players | ||
| // 2. Other sources of drain (Lights) | ||
|
|
||
| _energyValue = EPOCH_chargeRate min _energyRegenMax; | ||
| _vehicle = vehicle player; | ||
| if (_vehicle != player && isEngineOn _vehicle) then { | ||
| _energyValue = _energyValue + 5; | ||
| }; | ||
|
|
||
| if (currentVisionMode player == 1) then { //NV enabled | ||
| _energyValue = _energyValue - _energyCostNV; | ||
| if (EPOCH_playerEnergy == 0) then { | ||
| player action["nvGogglesOff", player]; | ||
| }; | ||
| }; | ||
|
|
||
| // Sets visual effect | ||
| if (EPOCH_playerAlcohol > 20) then { | ||
| _drunkVal = linearConversion [0,100,EPOCH_playerAlcohol,0.1,1,true]; | ||
| [(round(_drunkVal * 10)/10), 2] call epoch_setDrunk; | ||
| diag_log format["DEBUG: _drunkVal: %1",_drunkVal]; | ||
| } else { | ||
| [0, 2] call epoch_setDrunk; | ||
| }; | ||
|
|
||
| EPOCH_playerEnergy = ((EPOCH_playerEnergy + _energyValue) min EPOCH_playerEnergyMax) max 0; | ||
|
|
||
| if !(EPOCH_playerEnergy isEqualTo _prevEnergy) then { | ||
| 9993 cutRsc["EpochGameUI3", "PLAIN", 0, false]; | ||
| _display3 = uiNamespace getVariable "EPOCH_EpochGameUI3"; | ||
| _energyDiff = round(EPOCH_playerEnergy - _prevEnergy); | ||
| _diffText = if (_energyDiff > 0) then {format["+%1",_energyDiff]} else {format["%1",_energyDiff]}; | ||
| // hint str [_energyValue,_prevEnergy,EPOCH_playerEnergy]; | ||
| (_display3 displayCtrl 21210) ctrlSetText format["%1/%2 %3", round(EPOCH_playerEnergy), EPOCH_playerEnergyMax, _diffText]; | ||
| _prevEnergy = EPOCH_playerEnergy; | ||
| }; | ||
|
|
||
| if (EPOCH_playerEnergy == 0) then { | ||
| if (EPOCH_buildMode > 0) then { | ||
| EPOCH_buildMode = 0; | ||
| EPOCH_snapDirection = 0; | ||
| _dt = ["<t size = '0.8' shadow = '0' color = '#99ffffff'>Build Mode Disabled: Need Energy< / t>", 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext; | ||
| EPOCH_Target = objNull; | ||
| EPOCH_Z_OFFSET = 0; | ||
| EPOCH_X_OFFSET = 0; | ||
| EPOCH_Y_OFFSET = 5; | ||
| }; | ||
| }; | ||
|
|
||
| _attackers = player nearEntities[["Snake_random_EPOCH", "GreatWhite_F", "Epoch_Cloak_F"], 30]; | ||
| if !(_attackers isEqualTo[]) then { | ||
| (_attackers select 0) call EPOCH_client_bitePlayer; | ||
| _panic = true; | ||
| } else { | ||
| // custom poision | ||
| _toxicObjs = player nearobjects["SmokeShellCustom", 6]; | ||
| if!(_toxicObjs IsEqualTo[]) then { | ||
| (_toxicObjs select 0) call EPOCH_client_bitePlayer; | ||
| _panic = true; | ||
| } else { | ||
| _panic = false; | ||
| }; | ||
| }; | ||
|
|
||
| call EPOCH_fnc_Weather; | ||
|
|
||
| // Hunger / Thirst | ||
| _HTlossRate = _baseHTLoss; | ||
| if (EPOCH_playerStamina < 100) then { | ||
| if ((getFatigue player) > 0) then { | ||
| _HTlossRate = _HTlossRate + (_HTlossRate*(getFatigue player)); | ||
| }; | ||
| } else { | ||
| _HTlossRate = (_HTlossRate / 2); | ||
| }; | ||
|
|
||
| EPOCH_playerHunger = (EPOCH_playerHunger - _HTlossRate) max 0; | ||
| EPOCH_playerThirst = (EPOCH_playerThirst - _HTlossRate) max 0; | ||
|
|
||
| call _lootBubble; | ||
|
|
||
| EPOCH_playerStaminaMax = (100 * (round(EPOCH_playerAliveTime/360)/10)) min 2500; |
| @@ -1,6 +1,5 @@ | ||
|
|
||
| if !(_prevEquippedItem isEqualTo EPOCH_equippedItem_PVS) then { | ||
| _EPOCH_15 = _tickTime; | ||
| _prevEquippedItem = EPOCH_equippedItem_PVS; | ||
| publicVariableServer "EPOCH_equippedItem_PVS"; | ||
| }; | ||
| if !(_prevEquippedItem isEqualTo EPOCH_equippedItem_PVS) then { | ||
| _EPOCH_15 = _tickTime; | ||
| _prevEquippedItem = EPOCH_equippedItem_PVS; | ||
| EPOCH_equippedItem_PVS remoteExec ["EPOCH_server_equippedItem",2]; | ||
| }; |
| @@ -1,17 +1,15 @@ | ||
| _nearByBobbersLocal = []; | ||
| _nearByBobbers = player nearEntities[["Bobber_EPOCH"], 12]; | ||
| { | ||
| if (local _x) then { | ||
| _nearByBobbersLocal pushBack _x | ||
| } | ||
| } forEach _nearByBobbers; | ||
|
|
||
| _nearByBobbersLocal = []; | ||
| _nearByBobbers = player nearEntities[["Bobber_EPOCH"], 12]; | ||
| { | ||
| if (local _x) then { | ||
| _nearByBobbersLocal pushBack _x | ||
| } | ||
| } forEach _nearByBobbers; | ||
|
|
||
| if !(_nearByBobbersLocal isEqualTo []) then { | ||
| if ((random 100) < 50) then { | ||
| _bobber = _nearByBobbersLocal select floor(random(count _nearByBobbers)); | ||
| _bobber setVelocity [0,-1,-1]; | ||
| _bobber setVariable ["EPOCH_fishOnLine" , diag_tickTime]; | ||
| }; | ||
|
|
||
| }; | ||
| if !(_nearByBobbersLocal isEqualTo []) then { | ||
| if ((random 100) < 50) then { | ||
| _bobber = _nearByBobbersLocal select floor(random(count _nearByBobbers)); | ||
| _bobber setVelocity [0,-1,-1]; | ||
| _bobber setVariable ["EPOCH_fishOnLine" , diag_tickTime]; | ||
| }; | ||
| }; |
| @@ -1,3 +1,5 @@ | ||
| private["_ok"]; | ||
| if (isNull _this) exitWith {}; | ||
| if !(alive _this) exitWith {}; | ||
| _ok = createdialog "MissionSelect"; | ||
| if (!_ok) exitWith {}; | ||
| if (!_ok) exitWith {}; |
| @@ -1,14 +1,16 @@ | ||
| private ["_index","_type","_config","_name","_picture","_qty","_items","_qtys","_ok","_vehicles","_aiItems","_target","_slot"]; | ||
| _target = cursorTarget; | ||
| _slot = _target getVariable ["AI_SLOT",-1]; | ||
| if (_slot != -1) then { | ||
| EPOCH_lastNPCtradeTarget = _target; | ||
| closeDialog 0; | ||
| _ok = createdialog "TradeNPCMenu"; | ||
| if (!_ok) exitWith {}; | ||
| 9992 cutRsc["EpochGameUI2", "PLAIN", 2, false]; | ||
| ((uiNamespace getVariable "EPOCH_EpochGameUI2") displayCtrl 21208) ctrlSetText format["%1", EPOCH_playerCrypto]; | ||
| {lbAdd[42100,_x];lbAdd[42101,_x]} forEach ["All","Magazines","Items","Vehicles"]; | ||
| lbSetCurSel[42100, 0]; | ||
| lbSetCurSel[42101, 0]; | ||
| }; | ||
| if (alive _target) then { | ||
| _slot = _target getVariable ["AI_SLOT",-1]; | ||
| if (_slot != -1) then { | ||
| EPOCH_lastNPCtradeTarget = _target; | ||
| closeDialog 0; | ||
| _ok = createdialog "TradeNPCMenu"; | ||
| if (!_ok) exitWith {}; | ||
| 9992 cutRsc["EpochGameUI2", "PLAIN", 2, false]; | ||
| ((uiNamespace getVariable "EPOCH_EpochGameUI2") displayCtrl 21208) ctrlSetText format["%1", EPOCH_playerCrypto]; | ||
| {lbAdd[42100,_x];lbAdd[42101,_x]} forEach ["All","Magazines","Items","Vehicles"]; | ||
| lbSetCurSel[42100, 0]; | ||
| lbSetCurSel[42101, 0]; | ||
| }; | ||
| }; |