| @@ -0,0 +1,19 @@ | ||
| /* | ||
| Author: Aaron Clark - EpochMod.com | ||
| Contributors: [Ignatz] He-Man | ||
| Description: | ||
| A3 Epoch InventoryClosed Eventhandler | ||
| Licence: | ||
| Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike | ||
| Github: | ||
| https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/event_handlers/EPOCH_InventoryClosed.sqf | ||
| */ | ||
| params ["_unit","_container"]; | ||
| if !(EPOCH_arr_interactedObjs isEqualTo[]) then { | ||
| [EPOCH_arr_interactedObjs] remoteExec['EPOCH_server_save_vehicles', 2]; | ||
| EPOCH_arr_interactedObjs = []; | ||
| }; |
| @@ -0,0 +1,37 @@ | ||
| /* | ||
| Author: Aaron Clark - EpochMod.com | ||
| Contributors: [Ignatz] He-Man | ||
| Description: | ||
| A3 Epoch InventoryOpened Eventhandler | ||
| Licence: | ||
| Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike | ||
| Github: | ||
| https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/event_handlers/EPOCH_InventoryOpened.sqf | ||
| */ | ||
| params ["_unit","_container","_sec"]; | ||
| setMousePosition[0.5, 0.5]; | ||
| call EPOCH_showStats; | ||
| _this spawn EPOCH_initUI; | ||
| _containerlocked = (locked _container in [2, 3] || _container getVariable['EPOCH_Locked', false]); | ||
| _seclocked = false; | ||
| if !(isNull _sec) then { | ||
| _seclocked = (locked _sec in [2, 3] || _sec getVariable['EPOCH_Locked', false]); | ||
| }; | ||
| _blocked = (_containerlocked && _seclocked); | ||
| if (!_blocked && _containerlocked || _seclocked) then { | ||
| [] spawn { | ||
| disableSerialization; | ||
| waitUntil {!isNull findDisplay 602}; | ||
| _d = findDisplay 602; | ||
| _cargo = _d displayCtrl 6401; | ||
| _ground = _d displayCtrl 6321; | ||
| _cargo ctrlEnable false; | ||
| ctrlSetFocus _ground; | ||
| ctrlActivate _ground; | ||
| }; | ||
| }; | ||
| _blocked |
| @@ -0,0 +1,14 @@ | ||
| if (vehicle player == player) exitwith {false}; | ||
| if !(local vehicle player) exitwith {false}; | ||
| if (speed vehicle player > 2 || speed vehicle player < -2) exitwith {false}; | ||
| if (((getpos vehicle player) select 2) > 1) exitwith {false}; | ||
|
|
||
| _config = 'CfgServicePoint' call EPOCH_returnConfig; | ||
| _servicepoints = getArray (_config >> worldname >> 'ServicePoints'); | ||
| _servicepointDist = ["CfgServicePoint", "ServicePointDist", 40] call EPOCH_fnc_returnConfigEntryV2; | ||
|
|
||
| if (_servicepoints isequalto []) exitwith {false}; | ||
| if !(({player distance _x < _servicepointDist} count _servicepoints > 0)) exitwith {false}; | ||
| _Vehicle = vehicle player; | ||
| if (!(_Vehicle iskindof 'ship') && (((getposasl _Vehicle) select 2) < 1)) exitwith {false}; | ||
| true |
| @@ -0,0 +1,30 @@ | ||
| params ['_vehicle','_ammotype','_turret','_reloagmags','_ammocount','_costs']; | ||
| private ['_magname']; | ||
| _vehtype = typeof _vehicle; | ||
| _VehName = getText(configFile >> 'cfgVehicles' >> _vehtype >> 'displayName'); | ||
| if (!local _vehicle) exitWith { | ||
| _line = 'Rearm denied - Vehicle is not local to you!'; | ||
| [_line,5] call Epoch_message; | ||
| }; | ||
| if(count (crew _vehicle) > 1) exitWith { | ||
| _line = 'Rearm denied - All Passengers must exit the Vehicle!'; | ||
| [_line,5] call Epoch_message; | ||
| }; | ||
| if (EPOCH_playerCrypto < _costs) exitWith { | ||
| _line = format ['You need %1 Crypto to re-arm %2', _costs,_VehName]; | ||
| [_line,5] call Epoch_message; | ||
| }; | ||
|
|
||
| if(_costs > 0)then{ | ||
| [player,(_costs*-1),Epoch_personalToken] remoteexec ['epoch_server_paycrypto',2]; | ||
| }; | ||
| _vehicle removeMagazinesTurret [_ammotype,_turret]; | ||
| for '_i' from 1 to _reloagmags do { | ||
| _vehicle addMagazineTurret [_ammotype, _turret, _ammocount]; | ||
| }; | ||
| _magname = getText (configFile >> 'CfgMagazines' >> _ammotype >> 'displayName'); | ||
| if (_magname isequalto '') then { | ||
| _magname = _ammotype; | ||
| }; | ||
| _line = format ['%1 rearmed with %2', _VehName, _magname]; | ||
| [_line,5] call Epoch_message; |
| @@ -0,0 +1,33 @@ | ||
| private ['_vehicle','_args','_servicePoint','_costs','_updateInterval','_amount','_type','_name','_textMissing']; | ||
| _vehicle = _this select 0; | ||
| if (!local _vehicle) exitWith {}; | ||
| _args = _this select 1; | ||
| _costs = _args select 0; | ||
| _updateInterval = _args select 1; | ||
| _amount = _args select 2; | ||
| _type = typeOf _vehicle; | ||
| _name = getText(configFile >> 'cfgVehicles' >> _type >> 'displayName'); | ||
| if (EPOCH_playerCrypto < _costs) exitWith { | ||
| _line = format ['You need %1 Crypto to refuel %2', _costs,_name]; | ||
| [_line,5] call Epoch_message; | ||
| }; | ||
| if(_costs > 0)then{ | ||
| [player,(_costs*-1),Epoch_personalToken] remoteexec ['epoch_server_paycrypto',2]; | ||
| }; | ||
| _vehicle engineOn false; | ||
| if ((vehicle player != _vehicle) || (!local _vehicle) || speed _vehicle < -2 || speed _vehicle > 2) exitWith { | ||
| _line = format ['Fueling of %1 stopped', _name]; | ||
| [_line,5] call Epoch_message; | ||
| }; | ||
| while {(vehicle player == _vehicle) && (local _vehicle)} do { | ||
| if (speed _vehicle > 2 || speed _vehicle < -2 ) exitWith { | ||
| _line = format ['Refueling of %1 stopped', _name]; | ||
| [_line,5] call Epoch_message; | ||
| }; | ||
| _vehicle setFuel ((Fuel _vehicle)+_amount); | ||
| if (Fuel _vehicle > 0.99) exitWith { | ||
| _line = format ['%1 Refueled', _name]; | ||
| [_line,5] call Epoch_message; | ||
| }; | ||
| uisleep _updateInterval; | ||
| }; |
| @@ -0,0 +1,50 @@ | ||
| private ['_Ignatz_vehicle','_args','_servicePoint','_costs','_repairTime','_type','_name','_hitpoints','_allRepaired']; | ||
| _Ignatz_vehicle = _this select 0; | ||
| if (!local _Ignatz_vehicle) exitWith { | ||
| diag_log format['Error: called service_point_repair.sqf with non-local vehicle: %1', _Ignatz_vehicle] | ||
| }; | ||
| _args = _this select 1; | ||
| _costs = _args select 0; | ||
| _repairTime = _args select 1; | ||
| _type = typeOf _Ignatz_vehicle; | ||
| _name = getText(configFile >> 'cfgVehicles' >> _type >> 'displayName'); | ||
| if (EPOCH_playerCrypto < _costs) exitWith { | ||
| _line = format ['You need %1 Crypto to Repair %2', _costs,_name]; | ||
| [_line,5] call Epoch_message; | ||
| }; | ||
| if(_costs > 0)then{ | ||
| [player,(_costs*-1),Epoch_personalToken] remoteexec ['epoch_server_paycrypto',2]; | ||
| }; | ||
| _Ignatz_vehicle engineOn false; | ||
| _repaired = []; | ||
| _allRepaired = true; | ||
| _allHitPointsDamage = getAllHitPointsDamage _Ignatz_vehicle; | ||
| { | ||
| if ((vehicle player != _Ignatz_vehicle) || (!local _Ignatz_vehicle) || speed _Ignatz_vehicle < -2 || speed _Ignatz_vehicle > 2) exitWith { | ||
| _allRepaired = false; | ||
| _line = format ['Repairing of %1 stopped', _name]; | ||
| [_line,5] call Epoch_message; | ||
| }; | ||
| if (!(_x in _repaired) && !(_x isequalto "") && (_allHitPointsDamage select 2 select _foreachindex) > 0) then { | ||
| _partName = toarray _x; | ||
| _partName set [0,20]; | ||
| _partName set [1,45]; | ||
| _partName set [2,20]; | ||
| _partName = toString _partName; | ||
| _Ignatz_vehicle setHitPointDamage [_x,0]; | ||
| _line = format ['Repairing%1 ...', _partName]; | ||
| [_line,5] call Epoch_message; | ||
| _repaired pushback _x; | ||
| uisleep _repairTime; | ||
| }; | ||
| } foreach (_allHitPointsDamage select 0); | ||
| if (_allRepaired) then { | ||
| if ((damage _Ignatz_vehicle) > 0) then { | ||
| [_Ignatz_vehicle,["ALL",0],player,Epoch_personalToken] remoteExec ["EPOCH_server_repairVehicle",2]; | ||
| }; | ||
| _pos = getposatl _Ignatz_vehicle; | ||
| _pos set [2,(_pos select 2)+0.25]; | ||
| _Ignatz_vehicle setposatl _pos; | ||
| _line = format ['%1 full Repaired', _name]; | ||
| [_line,5] call Epoch_message; | ||
| }; |
| @@ -0,0 +1,104 @@ | ||
| Ignatz_Refuel = nil; | ||
| Ignatz_Repair = nil; | ||
| Ignatz_Rearm0 = nil; | ||
| Ignatz_Rearm1 = nil; | ||
| Ignatz_Rearm2 = nil; | ||
| Ignatz_Rearm3 = nil; | ||
|
|
||
| if (vehicle player == player) exitwith {false}; | ||
| if !(local vehicle player) exitwith {false}; | ||
| if (speed vehicle player > 2 || speed vehicle player < -2) exitwith {false}; | ||
| if (((getpos vehicle player) select 2) > 1) exitwith {false}; | ||
|
|
||
| private ['_missingammo','_ownedcompletemags','_magname','_actionTitle','_costs','_vehicle','_refuel_costs','_refuel_updateInterval','_refuel_amount','_costsFree','_repair_costs','_repair_repairTime','_fnc_getCosts','_fnc_actionTitle']; | ||
|
|
||
| _config = 'CfgServicePoint' call EPOCH_returnConfig; | ||
| _servicepoints = getArray (_config >> worldname >> 'ServicePoints'); | ||
| _servicepointDist = ["CfgServicePoint", "ServicePointDist", 40] call EPOCH_fnc_returnConfigEntryV2; | ||
|
|
||
| if !(({player distance _x < _servicepointDist} count _servicepoints > 0)) exitwith {false}; | ||
| _Vehicle = vehicle player; | ||
| if (!(_Vehicle iskindof 'ship') && (((getposasl _Vehicle) select 2) < 1)) exitwith {false}; | ||
|
|
||
| _repair_costs = ["CfgServicePoint", "repair_costs", []] call EPOCH_fnc_returnConfigEntryV2; | ||
| _refuel_costs = ["CfgServicePoint", "refuel_costs", []] call EPOCH_fnc_returnConfigEntryV2; | ||
| _refuel_updateInterval = ["CfgServicePoint", "refuel_updateInterval", 1] call EPOCH_fnc_returnConfigEntryV2; | ||
| _refuel_amount = ["CfgServicePoint", "refuel_amount", 0.1] call EPOCH_fnc_returnConfigEntryV2; | ||
| _repairTime = ["CfgServicePoint", "repairTime", 1.2] call EPOCH_fnc_returnConfigEntryV2; | ||
| _VehiclesAndAmmo = ["CfgServicePoint", "VehiclesAndAmmo", []] call EPOCH_fnc_returnConfigEntryV2; | ||
|
|
||
| _Ignatz_SP_Array = []; | ||
| _costsFree = 'free'; | ||
|
|
||
| _fnc_getCosts = { | ||
| private ['_typeName','_vehicle','_costs','_cost']; | ||
| _vehicle = _this select 0; | ||
| _costs = _this select 1; | ||
| _cost = 0; | ||
| { | ||
| _typeName = _x select 0; | ||
| if (_vehicle isKindOf _typeName) exitWith { | ||
| _cost = _x select 1; | ||
| }; | ||
| } forEach _costs; | ||
| _cost | ||
| }; | ||
| _fnc_actionTitle = { | ||
| private ['_itemName','_displayName','_actionName','_costs','_costsText','_actionTitle']; | ||
| _actionName = _this select 0; | ||
| _costs = _this select 1; | ||
| _costsText = _costsFree; | ||
| if (_costs > 0) then { | ||
| _costsText = format ['%1 Crypto',_costs]; | ||
| }; | ||
| _actionTitle = format ['%1 (%2)', _actionName, _costsText]; | ||
| _actionTitle | ||
| }; | ||
|
|
||
| { | ||
| if ((typeof _vehicle) == _x select 0) exitwith { | ||
| { | ||
| _ammotype = _x select 0; | ||
| _turret = _x select 1; | ||
| _maxmags = _x select 2; | ||
| _costs = _x select 3; | ||
| _ammocount = getNumber (configfile >> "CfgMagazines" >> (_x select 0) >> "count"); | ||
| _maxammototal = _maxmags*_ammocount; | ||
| _totalammocount = 0; | ||
| { | ||
| if (_ammotype isequalto (_x select 0) && _turret isequalto (_x select 1)) then { | ||
| _totalammocount = _totalammocount + (_x select 2); | ||
| }; | ||
| } foreach (magazinesAllTurrets _vehicle); | ||
| if (_totalammocount < _maxammototal) then { | ||
| for '_i' from 1 to 10 do { | ||
| if (_totalammocount < _i*_ammocount) exitwith { | ||
| _ownedcompletemags = _i-1; | ||
| _missingammo = _ammocount*_i - _totalammocount; | ||
| _costs = round (_costs/_ammocount*_missingammo); | ||
| }; | ||
| }; | ||
| _magname = getText (configFile >> 'CfgMagazines' >> _ammotype >> 'displayName'); | ||
| if (_magname isequalto '') then { | ||
| _magname = _ammotype; | ||
| }; | ||
| _reloagmags = _ownedcompletemags+1; | ||
| _actionTitle = format['Rearm %1 with %2 round %3 (%4 Crypto)',getText (configFile >> 'Cfgvehicles' >> typeOf _vehicle >> 'displayName'),_missingammo,_magname, _costs]; | ||
| _Ignatz_SP_Array pushback [_actionTitle,[_vehicle,_ammotype,_turret,_reloagmags,_ammocount,_costs]]; | ||
| }; | ||
| } foreach (_x select 1); | ||
| }; | ||
| } foreach _VehiclesAndAmmo; | ||
|
|
||
| _costs = [_vehicle, _refuel_costs] call _fnc_getCosts; | ||
| _actionTitle = [format['Refuel %1',getText (configFile >> 'Cfgvehicles' >> typeOf _vehicle >> 'displayName')], _costs] call _fnc_actionTitle; | ||
| Ignatz_Refuel = [_actionTitle,[_vehicle,[_costs, _refuel_updateInterval,_refuel_amount]]]; | ||
|
|
||
| _costs = [_vehicle, _repair_costs] call _fnc_getCosts; | ||
| _actionTitle = [format['Repair %1',getText (configFile >> 'Cfgvehicles' >> typeOf _vehicle >> 'displayName')], _costs] call _fnc_actionTitle; | ||
| Ignatz_Repair = [_actionTitle,[_vehicle,[_costs, _repairTime]]]; | ||
| if (count _Ignatz_SP_Array > 0) then {Ignatz_Rearm0 = _Ignatz_SP_Array select 0;}; | ||
| if (count _Ignatz_SP_Array > 1) then {Ignatz_Rearm1 = _Ignatz_SP_Array select 1;}; | ||
| if (count _Ignatz_SP_Array > 2) then {Ignatz_Rearm2 = _Ignatz_SP_Array select 2;}; | ||
| if (count _Ignatz_SP_Array > 3) then {Ignatz_Rearm3 = _Ignatz_SP_Array select 3;}; | ||
| true |
| @@ -0,0 +1,73 @@ | ||
| /* | ||
| Author: Aaron Clark - EpochMod.com | ||
| Contributors: He-Man | ||
| Description: | ||
| NPC trade code | ||
| Licence: | ||
| Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike | ||
| Github: | ||
| https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/traders/EPOCH_startNpcTrade.sqf | ||
| Example: | ||
| cursorTarget call EPOCH_startNpcTrade; | ||
| Parameter(s): | ||
| _this: OBJECT | ||
| Returns: | ||
| NOTHING | ||
| */ | ||
| //[[[cog import generate_private_arrays ]]] | ||
| private ["_addWeaponToHands","_arrayIn","_arrayOut","_config","_current_crypto","_errorMsg","_item","_itemTax","_itemWorth","_sizeOut","_tax","_type","_vehSlot","_vehicle","_vehicles"]; | ||
| //[[[end]]] | ||
| params [["_returnIn",[]],["_returnOut",[]],["_message",""]]; | ||
|
|
||
| if (isNil "EPOCH_TRADE_STARTED") exitWith{}; | ||
|
|
||
| if !(_returnOut isEqualTo[]) then { | ||
| // add purchased items | ||
| { | ||
| if ([_x, "CfgWeapons"] call EPOCH_fnc_isAny) then { | ||
| _type = getNumber(configfile >> "CfgWeapons" >> (_x) >> "type"); | ||
| _addWeaponToHands = false; | ||
| switch (_type) do { | ||
| case 1: { | ||
| if (primaryWeapon player == "") then { | ||
| _addWeaponToHands = true; | ||
| }; | ||
| }; | ||
| case 4: { | ||
| if (secondaryWeapon player == "") then { | ||
| _addWeaponToHands = true; | ||
| }; | ||
| }; | ||
| case 2: { | ||
| if (handgunWeapon player == "") then { | ||
| _addWeaponToHands = true; | ||
| }; | ||
| }; | ||
| }; | ||
| if (_addWeaponToHands) then { | ||
| player addWeapon _x; | ||
| } | ||
| else { | ||
| _x call EPOCH_fnc_addItemOverflow; | ||
| }; | ||
| } | ||
| else { | ||
| if ([_x, "CfgMagazines"] call EPOCH_fnc_isAny) then { | ||
| _x call EPOCH_fnc_addItemOverflow; | ||
| }; | ||
| }; | ||
| } forEach _returnOut; | ||
| }; | ||
|
|
||
| if !(_message isequalto "") then { | ||
| [_message, 5] call Epoch_message; | ||
| }; | ||
|
|
||
| EPOCH_TRADE_STARTED = nil; |
| @@ -0,0 +1,15 @@ | ||
| /* | ||
| Author: Aaron Clark - EpochMod.com | ||
| Contributors: [Ignatz] He-Man | ||
| Description: | ||
| Custom A3 Epoch FiredMan Eventhandler | ||
| Licence: | ||
| Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike | ||
| Github: | ||
| https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/custom/EPOCH_custom_EH_FiredMan.sqf | ||
| */ | ||
| params ["_unit","_weapon","_muzzle","_mode","_ammo","_magazine","_projectile"]; |
| @@ -0,0 +1,16 @@ | ||
| /* | ||
| Author: Aaron Clark - EpochMod.com | ||
| Contributors: [Ignatz] He-Man | ||
| Description: | ||
| Custom A3 Epoch GetInMan Eventhandler | ||
| Licence: | ||
| Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike | ||
| Github: | ||
| https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/custom/EPOCH_custom_EH_GetInMan.sqf | ||
| */ | ||
| params ["_unit","_position","_vehicle"]; | ||
|
|
| @@ -0,0 +1,16 @@ | ||
| /* | ||
| Author: Aaron Clark - EpochMod.com | ||
| Contributors: [Ignatz] He-Man | ||
| Description: | ||
| Custom A3 Epoch GetOutMan Eventhandler | ||
| Licence: | ||
| Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike | ||
| Github: | ||
| https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/custom/EPOCH_custom_EH_GetOutMan.sqf | ||
| */ | ||
| params ["_unit","_position","_vehicle"]; | ||
|
|
| @@ -0,0 +1,15 @@ | ||
| /* | ||
| Author: Aaron Clark - EpochMod.com | ||
| Contributors: [Ignatz] He-Man | ||
| Description: | ||
| Custom A3 Epoch InventoryClosed Eventhandler | ||
| Licence: | ||
| Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike | ||
| Github: | ||
| https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/custom/EPOCH_custom_EH_Take.sqf | ||
| */ | ||
| params ["_unit","_container"]; |
| @@ -0,0 +1,21 @@ | ||
| /* | ||
| Author: Aaron Clark - EpochMod.com | ||
| Contributors: [Ignatz] He-Man | ||
| Description: | ||
| Custom A3 Epoch InventoryOpened Eventhandler | ||
| Licence: | ||
| Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike | ||
| Github: | ||
| https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/custom/EPOCH_custom_EH_InventoryOpened.sqf | ||
| */ | ||
| params ["_unit","_container","_sec"]; | ||
| // Start Custom Code | ||
|
|
||
|
|
||
|
|
||
| // End Custom Code | ||
| false |
| @@ -0,0 +1,19 @@ | ||
| /* | ||
| Author: Aaron Clark - EpochMod.com | ||
| Contributors: [Ignatz] He-Man | ||
| Description: | ||
| Custom A3 Epoch KeyUp Eventhandler | ||
| Licence: | ||
| Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike | ||
| Github: | ||
| https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/custom/EPOCH_custom_EH_KeyDown.sqf | ||
| */ | ||
| params ["_display","_dikCode","_shift","_ctrl","_alt"]; | ||
| _handled = false; | ||
|
|
||
|
|
||
| _handled |
| @@ -0,0 +1,19 @@ | ||
| /* | ||
| Author: Aaron Clark - EpochMod.com | ||
| Contributors: [Ignatz] He-Man | ||
| Description: | ||
| Custom A3 Epoch KeyUp Eventhandler | ||
| Licence: | ||
| Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike | ||
| Github: | ||
| https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/custom/EPOCH_custom_EH_KeyUp.sqf | ||
| */ | ||
| params ["_display","_dikCode","_shift","_ctrl","_alt"]; | ||
| _handled = false; | ||
|
|
||
|
|
||
| _handled |
| @@ -0,0 +1,15 @@ | ||
| /* | ||
| Author: Aaron Clark - EpochMod.com | ||
| Contributors: [Ignatz] He-Man | ||
| Description: | ||
| Custom A3 Epoch Killed Eventhandler | ||
| Licence: | ||
| Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike | ||
| Github: | ||
| https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/custom/EPOCH_custom_EH_Killed.sqf | ||
| */ | ||
| params [["_unit",objNull,[objNull]],["_killer",objNull,[objNull]] ]; |
| @@ -0,0 +1,15 @@ | ||
| /* | ||
| Author: Aaron Clark - EpochMod.com | ||
| Contributors: [Ignatz] He-Man | ||
| Description: | ||
| Custom A3 Epoch Put Eventhandler | ||
| Licence: | ||
| Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike | ||
| Github: | ||
| https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/custom/EPOCH_custom_EH_Put.sqf | ||
| */ | ||
| params ["_unit","_container","_itemclass"]; |
| @@ -0,0 +1,15 @@ | ||
| /* | ||
| Author: Aaron Clark - EpochMod.com | ||
| Contributors: [Ignatz] He-Man | ||
| Description: | ||
| Custom A3 Epoch Take Eventhandler | ||
| Licence: | ||
| Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike | ||
| Github: | ||
| https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/custom/EPOCH_custom_EH_Take.sqf | ||
| */ | ||
| params ["_unit","_container","_itemclass"]; |
| @@ -0,0 +1,14 @@ | ||
| /* | ||
| Author: Aaron Clark - EpochMod.com | ||
| Contributors: [Ignatz] He-Man | ||
| Description: | ||
| Custom A3 Epoch OnEachFrame | ||
| Licence: | ||
| Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike | ||
| Github: | ||
| https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/custom/EPOCH_custom_OnEachFrame.sqf | ||
| */ |
| @@ -0,0 +1,248 @@ | ||
| class CfgServicePoint { | ||
| class Altis { | ||
| ServicePoints[] = { | ||
| {13325,14477,0} | ||
| }; | ||
| }; | ||
| class Tanoa { | ||
| ServicePoints[] = { | ||
| /* | ||
| {2157.79,3477.65,0}, | ||
| {11731.5,3125.95,0}, | ||
| {7008.93,7582.59,0}, | ||
| {2326.28,13167.9,0}, | ||
| {11805.8,13100.6,0}, | ||
|
|
||
| {5525.8,10345.2,0}, | ||
| {11916,2383.88,0}, | ||
| {13562.4,12139.5,0} | ||
| */ | ||
| }; | ||
| }; | ||
| class Chernarus { | ||
| ServicePoints[] = { | ||
|
|
||
| }; | ||
| }; | ||
| ServicePointDist = 40; | ||
| refuel_updateInterval = 1; | ||
| refuel_amount = 0.1; | ||
| repairTime = 1.2; | ||
| repair_costs[] = { | ||
| {"Air",0}, | ||
| {"Tank",0}, | ||
| {"Ship",0}, | ||
| {"Landvehicle",0} | ||
| }; | ||
| refuel_costs[] = { | ||
| {"Air",0}, | ||
| {"Tank",0}, | ||
| {"Ship",0}, | ||
| {"Landvehicle",0} | ||
| }; | ||
| VehiclesAndAmmo[] = { | ||
| /* | ||
| { | ||
| "typeof vehicle", | ||
| { | ||
| {"Ammoclass",{Turretpath},MaxMagsCount,PricePerMag}, | ||
| {"Ammoclass",{Turretpath},MaxMagsCount,PricePerMag} | ||
| } | ||
| }, | ||
| */ | ||
| { | ||
| "B_G_Offroad_01_armed_F", | ||
| { | ||
| {"100Rnd_127x99_mag_Tracer_Yellow",{0},4,200} | ||
| } | ||
| }, | ||
| { | ||
| "O_G_Offroad_01_armed_F", | ||
| { | ||
| {"100Rnd_127x99_mag_Tracer_Yellow",{0},4,200} | ||
| } | ||
| }, | ||
| { | ||
| "I_G_Offroad_01_armed_F", | ||
| { | ||
| {"100Rnd_127x99_mag_Tracer_Yellow",{0},4,200} | ||
| } | ||
| }, | ||
| { | ||
| "I_MRAP_03", | ||
| { | ||
| {"SmokeLauncherMag",{0},1,150} | ||
| } | ||
| }, | ||
| { | ||
| "I_MRAP_03_EPOCH", | ||
| { | ||
| } | ||
| }, | ||
| { | ||
| "O_MRAP_02_F", | ||
| { | ||
| {"SmokeLauncherMag",{-1},1,150} | ||
| } | ||
| }, | ||
| { | ||
| "B_LSV_01_armed_olive_F", | ||
| { | ||
| {"100Rnd_127x99_mag_Tracer_Red",{0},3,200}, | ||
| {"130Rnd_338_Mag",{1},3,260} | ||
| } | ||
| }, | ||
| { | ||
| "B_LSV_01_armed_black_F", | ||
| { | ||
| {"100Rnd_127x99_mag_Tracer_Red",{0},3,200}, | ||
| {"130Rnd_338_Mag",{1},3,260} | ||
| } | ||
| }, | ||
| { | ||
| "O_T_LSV_02_armed_black_F", | ||
| { | ||
| {"500Rnd_65x39_Belt_Tracer_Green_Splash",{0},3,500} | ||
| } | ||
| }, | ||
| { | ||
| "O_T_LSV_02_armed_ghex_F", | ||
| { | ||
| {"500Rnd_65x39_Belt_Tracer_Green_Splash",{0},3,500} | ||
| } | ||
| }, | ||
| { | ||
| "B_SDV_01_EPOCH", | ||
| { | ||
| } | ||
| }, | ||
| { | ||
| "B_Heli_Light_01_armed_F", | ||
| { | ||
| {"5000Rnd_762x51_Belt",{-1},1,1600} | ||
| } | ||
| }, | ||
| { | ||
| "O_Heli_Light_02_unarmed_EPOCH", | ||
| { | ||
| {"168Rnd_CMFlare_Chaff_Magazine",{-1},1,150} | ||
| } | ||
| }, | ||
| { | ||
| "O_Heli_Light_02_v2_F", | ||
| { | ||
| {"2000Rnd_65x39_Belt_Tracer_Green_Splash",{-1},1,1200}, | ||
| {"168Rnd_CMFlare_Chaff_Magazine",{-1},1,150} | ||
| } | ||
| }, | ||
| { | ||
| "B_Heli_Transport_01_EPOCH", | ||
| { | ||
| {"168Rnd_CMFlare_Chaff_Magazine",{-1},1,150}, | ||
| {"2000Rnd_65x39_Belt_Tracer_Red",{1},1,1200}, | ||
| {"2000Rnd_65x39_Belt_Tracer_Red",{2},1,1200} | ||
| } | ||
| }, | ||
| { | ||
| "I_Heli_Transport_02_F", | ||
| { | ||
| {"168Rnd_CMFlare_Chaff_Magazine",{-1},1,150} | ||
| } | ||
| }, | ||
| { | ||
| "I_Heli_Transport_02_EPOCH", | ||
| { | ||
| {"168Rnd_CMFlare_Chaff_Magazine",{-1},1,150} | ||
| } | ||
| }, | ||
| { | ||
| "B_Heli_Transport_03_F", | ||
| { | ||
| {"168Rnd_CMFlare_Chaff_Magazine",{-1},1,150}, | ||
| {"2000Rnd_65x39_Belt_Tracer_Red",{1},1,1200}, | ||
| {"2000Rnd_65x39_Belt_Tracer_Red",{2},1,1200} | ||
| } | ||
| }, | ||
| { | ||
| "B_Heli_Transport_03_black_F", | ||
| { | ||
| {"168Rnd_CMFlare_Chaff_Magazine",{-1},1,150}, | ||
| {"2000Rnd_65x39_Belt_Tracer_Red",{1},1,1200}, | ||
| {"2000Rnd_65x39_Belt_Tracer_Red",{2},1,1200} | ||
| } | ||
| }, | ||
| { | ||
| "B_Heli_Transport_03_unarmed_EPOCH", | ||
| { | ||
| {"168Rnd_CMFlare_Chaff_Magazine",{-1},1,150} | ||
| } | ||
| }, | ||
| { | ||
| "I_Heli_light_03_unarmed_EPOCH", | ||
| { | ||
| {"168Rnd_CMFlare_Chaff_Magazine",{-1},1,150} | ||
| } | ||
| }, | ||
| { | ||
| "B_T_VTOL_01_vehicle_blue_F", | ||
| { | ||
| {"240Rnd_CMFlare_Chaff_Magazine",{-1},1,150} | ||
| } | ||
| }, | ||
| { | ||
| "B_T_VTOL_01_infantry_olive_F", | ||
| { | ||
| {"240Rnd_CMFlare_Chaff_Magazine",{-1},1,150} | ||
| } | ||
| }, | ||
| { | ||
| "B_T_VTOL_01_infantry_blue_F", | ||
| { | ||
| {"240Rnd_CMFlare_Chaff_Magazine",{-1},1,150} | ||
| } | ||
| }, | ||
| { | ||
| "O_T_VTOL_02_vehicle_F", | ||
| { | ||
| {"168Rnd_CMFlare_Chaff_Magazine",{-1},1,150} | ||
| } | ||
| }, | ||
| { | ||
| "O_T_VTOL_02_vehicle_grey_F", | ||
| { | ||
| {"168Rnd_CMFlare_Chaff_Magazine",{-1},1,150} | ||
| } | ||
| }, | ||
| { | ||
| "O_T_VTOL_02_infantry_F", | ||
| { | ||
| {"168Rnd_CMFlare_Chaff_Magazine",{-1},1,150} | ||
| } | ||
| }, | ||
| { | ||
| "B_Heli_Attack_01_F", | ||
| { | ||
| {"240Rnd_CMFlare_Chaff_Magazine",{-1},1,150} | ||
| } | ||
| }, | ||
| { | ||
| "O_Heli_Attack_02_black_F", | ||
| { | ||
| {"192Rnd_CMFlare_Chaff_Magazine",{-1},1,150} | ||
| } | ||
| }, | ||
| { | ||
| "O_Heli_Attack_02_F", | ||
| { | ||
| {"192Rnd_CMFlare_Chaff_Magazine",{-1},1,150} | ||
| } | ||
| }, | ||
| { | ||
| "O_Boat_Armed_01_hmg_F", | ||
| { | ||
| {"SmokeLauncherMag_boat",{-1},1,100}, | ||
| {"200Rnd_127x99_mag_Tracer_Green",{1},3,300} | ||
| } | ||
| } | ||
| }; | ||
| }; |
| @@ -1 +1 @@ | ||
| build=675; | ||
| build=741; |
| @@ -1 +1 @@ | ||
| build=675; | ||
| build=741; |
| @@ -0,0 +1,41 @@ | ||
| /* | ||
| Author: Aaron Clark - EpochMod.com | ||
|
|
||
| Contributors: He-Man | ||
|
|
||
| Description: | ||
| Add items/weapons to player containers | ||
|
|
||
| Licence: | ||
| Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike | ||
|
|
||
| Github: | ||
| https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/both/EPOCH_isAny.sqf | ||
|
|
||
| Example: | ||
| [_player, _itemsInContainers] call EPOCH_fnc_addItemToX; | ||
|
|
||
| Parameter(s): | ||
| _this select 0: OBJECT - player | ||
| _this select 1: ARRAY - | ||
| [ | ||
| [["itemClass",1],["anotherClass",5]], // addItemToUniform | ||
| [["thatClass",2],["thisClass",2]], // addItemToVest | ||
| [["yourClass",4],["myClass",3]] // addItemToBackpack | ||
| ] | ||
| */ | ||
| private ["_itemSlot"]; | ||
| params ["_player","_slots"]; | ||
| { | ||
| _itemSlot = _forEachIndex; | ||
| _x params ["_items","_itemqtys"]; | ||
| { | ||
| for "_i" from 1 to (_itemqtys select _forEachIndex) do { | ||
| switch _itemSlot do { | ||
| case 0: { _player addItemToUniform _x }; | ||
| case 1: { _player addItemToVest _x }; | ||
| case 2: { _player addItemToBackpack _x }; | ||
| }; | ||
| }; | ||
| } forEach(_items); | ||
| } forEach (_slots); |
| @@ -0,0 +1,7 @@ | ||
| params [["_player",objNull,[objNull]],["_crypto",0,[0]],["_token","",[""]]]; | ||
| if !([_player, _token] call EPOCH_server_getPToken) exitWith{}; | ||
| if (_crypto > 0) exitwith { // This is only for pay Crypto, not for give Crypto ;) | ||
| diag_log format ['Player %1 (%2) killed for Code hack',name _player, getplayeruid _player]; | ||
| _player setdamage 1 | ||
| }; | ||
| _this call EPOCH_server_effectCrypto; |
| @@ -0,0 +1,47 @@ | ||
| /* | ||
| Author: Aaron Clark - EpochMod.com | ||
|
|
||
| Contributors: | ||
|
|
||
| Description: | ||
| Select spawn point | ||
|
|
||
| Licence: | ||
| Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike | ||
|
|
||
| Github: | ||
| https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_player/EPOCH_server_selectSpawnpoint.sqf | ||
| */ | ||
| params [["_jammer",objNull],["_player",objNull],["_token",""]]; | ||
| // check token | ||
| if !([_player, _token] call EPOCH_server_getPToken) exitWith{}; | ||
| // require object | ||
| if (isNull _jammer) exitWith {}; | ||
| // reject if player is too far away | ||
| if (_player distance _jammer > 20) exitWith{}; | ||
| // check if in group with owner | ||
| if (alive _jammer) then { | ||
| if ((_jammer getVariable["BUILD_OWNER", "-1"]) in [getPlayerUID _player, _player getVariable["GROUP", ""]]) then { | ||
| _server_vars = _player getVariable["SERVER_VARS", []]; | ||
| _currentPos = _server_vars param [0,[]]; | ||
| // invalidate previous position | ||
| if (!(_currentPos isEqualTo []) && {_jammer distance _currentPos > 20}) then { _currentPos = [] }; | ||
| if (_currentPos isEqualTo []) then { | ||
| // set position of spawnpoint to players SERVER_VARS | ||
| _server_vars set [0, getposATL _jammer]; // 0 = RESPAWN POS | ||
| _player setVariable ["SERVER_VARS", _server_vars]; | ||
| ["Spawnpoint set", 5] remoteExec ['Epoch_message',_player]; | ||
| } | ||
| else | ||
| { | ||
| // remove position of spawnpoint from players SERVER_VARS | ||
| _server_vars set [0, []]; // 0 = RESPAWN POS | ||
| _player setVariable ["SERVER_VARS", _server_vars]; | ||
| ["Spawnpoint removed", 5] remoteExec ['Epoch_message',_player]; | ||
| }; | ||
| } | ||
| else | ||
| { | ||
| ["This is not one of your Group's Jammers", 5] remoteExec ['Epoch_message',_player]; | ||
| }; | ||
| }; |