mirror of
https://github.com/Bjanski/ExAd.git
synced 2024-08-30 16:52:14 +00:00
Merge pull request #103 from GamingAtDeathsDoor/master
Deleting VG, Hacking and Grinding for Exile Default.
This commit is contained in:
commit
23f8c101ec
@ -1 +0,0 @@
|
||||
exad_grinding
|
@ -1,47 +0,0 @@
|
||||
/*
|
||||
fn_grindProgress.sqf
|
||||
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
private ["_object","_databaseID"];
|
||||
|
||||
_object = objectFromNetId ([_this, 0, "",[""]] call BIS_fnc_param);
|
||||
|
||||
if(isNull _object)exitWith{false};
|
||||
|
||||
_territory = _object call ExileClient_util_world_getTerritoryAtPosition;
|
||||
_serverTime = time;
|
||||
if(_serverTime > ((_territory getVariable ["ExileXM8MobileNotifiedTime",-1800]) + 1800))then
|
||||
{
|
||||
_territory call ExileServer_system_xm8_sendBaseRaid;
|
||||
_territory setVariable ["ExileXM8MobileNotifiedTime", _serverTime];
|
||||
};
|
||||
|
||||
if((_object getVariable ["ExAd_Grinding_progress", 0]) >= ExAd_GRINDING_OBJECT_MAX)then{
|
||||
_object setVariable ["ExileAccessCode", nil];
|
||||
_object setVariable ["ExileIsLocked", nil, true];
|
||||
|
||||
_databaseID = _object getVariable ["ExileDatabaseID",0];
|
||||
format ["addDoorLock:%1:%2","000000",_databaseID] call ExileServer_system_database_query_fireAndForget;
|
||||
|
||||
["Grinding", format["Grind successful: Territory ID - %1|Object ID - %2", _object setVariable ["ExileTerritoryID", -1], _object getVariable ["ExileDatabaseID",0]]] call ExAdServer_fnc_log;
|
||||
};
|
||||
|
||||
|
||||
|
||||
_object setVariable ["ExAd_Grinding_progress", (_object getVariable ["ExAd_Grinding_progress", 0]) + ExAd_GRINDING_PROGRESS, true];
|
||||
|
||||
true
|
@ -1,29 +0,0 @@
|
||||
/*
|
||||
fn_restoreLock.sqf
|
||||
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
private ["_object","_databaseID"];
|
||||
|
||||
_object = objectFromNetId ([_this, 0, "",[""]] call BIS_fnc_param);
|
||||
|
||||
if(isNull _object)exitWith{false};
|
||||
|
||||
_object setVariable ["ExAd_Grinding_progress", 0, true];
|
||||
|
||||
["Grinding", format["Lock restored: Territory ID - %1|Object ID - %2", _object setVariable ["ExileTerritoryID", -1], _object getVariable ["ExileDatabaseID",0]]] call ExAdServer_fnc_log;
|
||||
|
||||
true
|
@ -1 +0,0 @@
|
||||
exad_grinding
|
@ -1,46 +0,0 @@
|
||||
/*
|
||||
config.cpp
|
||||
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
class CfgPatches {
|
||||
class ExAd_Grinding {
|
||||
requiredVersion = 0.1;
|
||||
requiredAddons[] = {"ExAd_Core"};
|
||||
};
|
||||
};
|
||||
|
||||
class CfgFunctions {
|
||||
class ExAdServer {
|
||||
class Grinding {
|
||||
file = "exad_grinding\Functions";
|
||||
class grindProgress {};
|
||||
class restoreLock {};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class CfgNetworkMessages
|
||||
{
|
||||
class grindProgress
|
||||
{
|
||||
parameters[] = {"STRING"};
|
||||
};
|
||||
class restoreLock
|
||||
{
|
||||
parameters[] = {"STRING"};
|
||||
};
|
||||
};
|
@ -1 +0,0 @@
|
||||
exad_hacking
|
@ -1,179 +0,0 @@
|
||||
/*
|
||||
fn_startHack.sqf
|
||||
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
private ["_object","_player","_laptops","_pos","_laptop"];
|
||||
|
||||
_object = objectFromNetId ([_this, 0, "",[""]] call BIS_fnc_param);
|
||||
_player = objectFromNetId ([_this, 1, "",[""]] call BIS_fnc_param);
|
||||
|
||||
if(isNull _object || isNull _player)exitWith{false};
|
||||
|
||||
_flag = ((getPos _object) nearObjects ["Exile_Construction_Flag_Static", 150]) select 0;
|
||||
|
||||
if(_flag isEqualTo objNull)exitWith{false};
|
||||
|
||||
if(ExAd_HACKING_PLAYER_ONLINE && !([_flag] call ExAdServer_fnc_territoryPlayerPresent))exitWith{
|
||||
[STR_ExAd_HACKING_NOTI_NO_PLAYER_PRESENT ,0,0.6,2,0] remoteExec ["BIS_fnc_dynamicText",owner _player];
|
||||
};
|
||||
|
||||
if(_flag getVariable ["ExAd_HACKS_SUCCEEDED",0] >= ExAd_HACKING_TERRITORY_MAX)exitWith{
|
||||
[STR_ExAd_HACKING_NOTI_MAX_TERRITORY_HACKS_REACHED ,0,0.6,2,0] remoteExec ["BIS_fnc_dynamicText",owner _player];
|
||||
};
|
||||
|
||||
_laptops = nearestObjects [getPos _object, ["Exile_Construction_Laptop_Static"], 200];
|
||||
if(({(_x getVariable ["ExAd_HACKING_IN_PROGRESS", false])}count _laptops) >= 1)exitWith{
|
||||
[STR_ExAd_HACKING_NOTI_TERRITORY_ONE_HACK,0,0.6,2,0] remoteExec ["BIS_fnc_dynamicText",owner _player];
|
||||
false
|
||||
};
|
||||
|
||||
if(isNil "ExAd_HACKS_IN_PROGRESS")then{
|
||||
ExAd_HACKS_IN_PROGRESS = 0;
|
||||
};
|
||||
|
||||
["Hacking", format["Hack started: Player - %1(%2)|Territory - %3|Hacks in motion - %4",name _player, getPlayerUID _player, _flag getVariable ["ExileTerritoryName", "Unknown"], ExAd_HACKS_IN_PROGRESS]] call ExAdServer_fnc_log;
|
||||
|
||||
_territory = _flag call ExileClient_util_world_getTerritoryAtPosition;
|
||||
_serverTime = time;
|
||||
if(_serverTime > ((_territory getVariable ["ExileXM8MobileNotifiedTime",-1800]) + 1800))then
|
||||
{
|
||||
_territory call ExileServer_system_xm8_sendBaseRaid;
|
||||
_territory setVariable ["ExileXM8MobileNotifiedTime", _serverTime];
|
||||
};
|
||||
|
||||
_pos = _player modelToWorld [0, +0.5, 0];
|
||||
_pos set [2,((getPosATL _player) select 2)];
|
||||
|
||||
_laptop = createVehicle ["Exile_Construction_Laptop_Static", _pos, [], 0, "CAN_COLLIDE"];
|
||||
_laptop setDir ((direction _player) - 90);
|
||||
|
||||
_laptop setVariable ["ExAd_HACKING_IN_PROGRESS", true, true];
|
||||
_laptop animate ["LaptopLidRotation", 1];
|
||||
|
||||
_player removeItem "Exile_Item_Laptop";
|
||||
|
||||
[_object, _player, _laptop, _flag] spawn {
|
||||
params ["_object","_player","_laptop","_flag","_markers","_marker","_success","_ticks","_newSize","_destroy","_msg"];
|
||||
UISleep 2;
|
||||
|
||||
["baguetteRequest", ["Hacktivity Detected on the Grid!"]] call ExileServer_system_network_send_broadcast;
|
||||
|
||||
if(ExAd_HACKS_IN_PROGRESS >= ExAd_HACKING_ALLOWED_HACKS)exitWith{
|
||||
_laptop setVariable ["ExAd_HACKING_IN_PROGRESS", false, true];
|
||||
_laptop setDamage 1;
|
||||
[format[STR_ExAd_HACKING_NOTI_MAX_SIM_HACKS],0,0.6,2,0] remoteExec ["BIS_fnc_dynamicText",owner _player];
|
||||
false
|
||||
};
|
||||
|
||||
ExAd_HACKS_IN_PROGRESS = ExAd_HACKS_IN_PROGRESS + 1;
|
||||
|
||||
_markers = [getPos _laptop, ExAd_HACKING_MARKER_COLOR, 200, str (netId _object), ExAd_HACKING_MARKER_TITLE,true] call ExAdServer_fnc_createMarker;
|
||||
_marker = _markers select 0;
|
||||
_success = false;
|
||||
|
||||
while {!(_laptop getVariable ["ExAd_HACK_INTERUPTED",false]) && _laptop getVariable ["ExAd_HACK", 0] <= ExAd_HACKING_MAX_TIME} do {
|
||||
UISleep 1;
|
||||
_ticks = (_laptop getVariable ["ExAd_HACK", 0]) + 1;
|
||||
_laptop setVariable ["ExAd_HACK", _ticks];
|
||||
|
||||
if((_ticks % (ExAd_HACKING_MAX_TIME / 10)) == 0)then{
|
||||
_newSize = ((getMarkerSize _marker) select 0) - 20;
|
||||
_marker setMarkerSize [_newSize,_newSize];
|
||||
};
|
||||
|
||||
if(_ticks >= ExAd_HACKING_MAX_TIME)exitWith{_success = true};
|
||||
|
||||
waitUntil{{(_x distance (getPosATL _laptop)) < ExAd_HACKING_MAX_DISTANCE}count playableUnits > 0};
|
||||
};
|
||||
|
||||
_laptop setVariable ["ExAd_HACKING_IN_PROGRESS", false, true];
|
||||
_laptop animate ["LaptopLidRotation", 0];
|
||||
_destroy = false;
|
||||
|
||||
_msg = if(_success && ((random 1) > ExAd_HACKING_FAILED_HACK))then{
|
||||
_flag setVariable ["ExAd_HACKS_SUCCEEDED", (_flag getVariable ["ExAd_HACKS_SUCCEEDED",0]) + 1];
|
||||
if(_object isKindOf "Exile_Construction_Flag_Static")then{
|
||||
if(!isClass(configFile >> "CfgPatches" >> "ExAd_VG"))then{
|
||||
["startHack", "You are missing the ExAd_VG dependenci to run this function.", true] call ExAd_fnc_debugHandler;
|
||||
"This server isn't using the ExAd Virtual Garage, tell the admins to get a grip!!"
|
||||
}else{
|
||||
private ["_vehList","_objId","_vehObj","_extDB2Message","_pos"];
|
||||
_vehList = _object getVariable ["ExAdVGVeh", []];
|
||||
if((count _vehList) > 0)then{
|
||||
_objId = (_vehList call BIS_fnc_selectRandom) select 0;
|
||||
{
|
||||
if((_x select 0) isEqualTo _objId)exitWith{
|
||||
_vehList deleteAt _forEachIndex;
|
||||
}
|
||||
}forEach _vehList;
|
||||
_object setVariable ["ExAdVGVeh", _vehList, true];
|
||||
|
||||
_vehObj = _objId call ExileServer_object_vehicle_database_load;
|
||||
_extDB2Message = ["loadVehFromVG", [_objId]] call ExileServer_util_extDB2_createMessage;
|
||||
_extDB2Message call ExileServer_system_database_query_fireAndForget;
|
||||
|
||||
_pos = getPosATL _vehObj;
|
||||
_pos set [2, (_pos select 2) + 0.1];
|
||||
_vehObj setPosATL _pos;
|
||||
_vehObj lock 0;
|
||||
|
||||
_displayName = getText(ConfigFile >> "CfgVehicles" >> typeOf _vehObj >> "displayName");
|
||||
["Hacking", format["Hack Successful: Territory - %1| Virtual Garage - %2(%3)",_flag getVariable ["ExileTerritoryName", "Unknown"], _displayName, _objId]] call ExAdServer_fnc_log;
|
||||
|
||||
format[STR_ExAd_HACKING_NOTI_VG_SUCCESS, _displayName]
|
||||
}else{
|
||||
["Hacking", format["Hack Successful: Territory - %1| Virtual Garage - No Vehicle",_flag getVariable ["ExileTerritoryName", "Unknown"]]] call ExAdServer_fnc_log;
|
||||
STR_ExAd_HACKING_NOTI_VG_NO_VEH
|
||||
}
|
||||
}
|
||||
}else{
|
||||
["Hacking", format["Hack Successful: Territory - %1| Safe(%2) opened",_flag getVariable ["ExileTerritoryName", "Unknown"], _object getVariable ["ExileDatabaseID", -1]]] call ExAdServer_fnc_log;
|
||||
|
||||
_object setVariable ["ExileIsLocked",0,true];
|
||||
STR_ExAd_HACKING_NOTI_SAFE_SUCCESS
|
||||
}
|
||||
}else{
|
||||
if(_laptop getVariable ["ExAd_HACK_INTERUPTED",false])then{
|
||||
["Hacking", format["Hack Interupted: Territory - %1",_flag getVariable ["ExileTerritoryName", "Unknown"]]] call ExAdServer_fnc_log;
|
||||
STR_ExAd_HACKING_NOTI_INTERUPTED
|
||||
}else{
|
||||
_destroy = true;
|
||||
["Hacking", format["Hack Failed: Territory - %1",_flag getVariable ["ExileTerritoryName", "Unknown"]]] call ExAdServer_fnc_log;
|
||||
STR_ExAd_HACKING_NOTI_FAILED
|
||||
}
|
||||
};
|
||||
|
||||
if(_destroy)then{
|
||||
_laptop setDamage 1;
|
||||
}else{
|
||||
private ["_holderPos","_holder"];
|
||||
_holderPos = getPosATL _laptop;
|
||||
deleteVehicle _laptop;
|
||||
_holder = createVehicle ["GroundWeaponHolder", _holderPos, [], 0, "CAN_COLLIDE"];
|
||||
_holder addMagazineCargoGlobal ["Exile_Item_Laptop", 1];
|
||||
};
|
||||
|
||||
{
|
||||
if(((getPosATL _laptop) distance (getPosATL _x)) < ExAd_HACKING_MAX_DISTANCE)then{
|
||||
[_msg,0,0.6,2,0] remoteExec ["BIS_fnc_dynamicText", owner _x]
|
||||
}
|
||||
}forEach playableUnits;
|
||||
|
||||
ExAd_HACKS_IN_PROGRESS = ExAd_HACKS_IN_PROGRESS - 1;
|
||||
{deleteMarker _x}forEach _markers;
|
||||
};
|
||||
|
||||
true
|
@ -1 +0,0 @@
|
||||
exad_hacking
|
@ -1,46 +0,0 @@
|
||||
/*
|
||||
config.cpp
|
||||
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
class CfgPatches {
|
||||
class ExAd_Hacking {
|
||||
requiredVersion = 0.1;
|
||||
requiredAddons[] = {"ExAd_Core"};
|
||||
};
|
||||
};
|
||||
|
||||
class CfgFunctions {
|
||||
class ExAdServer {
|
||||
class Hacking {
|
||||
file = "exad_hacking\Functions";
|
||||
class startHack {};
|
||||
class stopHack {};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class CfgNetworkMessages
|
||||
{
|
||||
class startHack
|
||||
{
|
||||
parameters[] = {"STRING","STRING"};
|
||||
};
|
||||
class stopHack
|
||||
{
|
||||
parameters[] = {"STRING"};
|
||||
};
|
||||
};
|
@ -1 +0,0 @@
|
||||
exad_vg
|
@ -1,68 +0,0 @@
|
||||
/*
|
||||
fn_VGLoad.sqf
|
||||
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
private ["_objVehNetId","_objVeh","_flagNetId","_flag","_objVehId","_flagId","_data","_extDB2Message","_vehList"];
|
||||
|
||||
_objId = [_this,0,"",[""]] call BIS_fnc_param;
|
||||
_flagNetId = [_this,1,"",[""]] call BIS_fnc_param;
|
||||
_playerNetId = [_this,2,"",[""]] call BIS_fnc_param;
|
||||
_flag = objectFromNetId _flagNetId;
|
||||
_player = objectFromNetId _playerNetId;
|
||||
_requestFrom = owner _player;
|
||||
|
||||
_proceed = false;
|
||||
_vehList = _flag getVariable ["ExAdVGVeh", []];
|
||||
|
||||
{
|
||||
if((format["%1",_x select 0]) isEqualTo _objId)exitWith{
|
||||
_vehList deleteAt _forEachIndex;
|
||||
_proceed = true;
|
||||
}
|
||||
}forEach _vehList;
|
||||
|
||||
if(!_proceed)exitWith{[_owner, "toastRequest", ["ErrorTitleAndText", ["ExAd - Virtual Garage", STR_ExAd_VG_NOTI_NOT_AVAILABLE]]] call ExileServer_system_network_send_to};
|
||||
|
||||
_flag setVariable ["ExAdVGVeh", _vehList, true];
|
||||
|
||||
_vehObj = (parseNumber _objId) call ExileServer_object_vehicle_database_load;
|
||||
_extDB2Message = ["loadVehFromVG", [parseNumber _objId]] call ExileServer_util_extDB2_createMessage;
|
||||
_extDB2Message call ExileServer_system_database_query_fireAndForget;
|
||||
|
||||
if(ExAd_VG_SHOW_ADVHINT)then{
|
||||
[["advancedHint", ["VGLoad",[_vehObj getVariable["ExileAccessCode",""]]]], _requestFrom] call ExAdServer_fnc_clientDispatch;
|
||||
};
|
||||
|
||||
_pos = getPosATL _vehObj;
|
||||
_pos set [2, (_pos select 2) + 0.1];
|
||||
_vehObj setPosATL _pos;
|
||||
|
||||
if (ExAd_VG_GIVE_GM)then
|
||||
{
|
||||
_vehObj allowDamage false;
|
||||
["VirtualGarage", format["Spawned: Player - %1(%2)|Vehicle - %3(%4)|",name _player, getPlayerUID _player, typeOf _vehObj, _objId]] call ExAdServer_fnc_log;
|
||||
|
||||
sleep ExAd_VG_GM_TIME;
|
||||
|
||||
_vehObj allowDamage true;
|
||||
}
|
||||
else
|
||||
{
|
||||
["VirtualGarage", format["Spawned: Player - %1(%2)|Vehicle - %3(%4)|",name _player, getPlayerUID _player, typeOf _vehObj, _objId]] call ExAdServer_fnc_log;
|
||||
};
|
||||
|
||||
true
|
@ -1,67 +0,0 @@
|
||||
/*
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
*/
|
||||
|
||||
private ["_objVehNetId","_objVeh","_flagNetId","_flag","_owner","_objVehId","_flagId","_data","_extDB2Message","_vehList"];
|
||||
|
||||
_objVehNetId = [_this,0,"",[""]] call BIS_fnc_param;
|
||||
_objVeh = objectFromNetId _objVehNetId;
|
||||
_flagNetId = [_this,1,"",[""]] call BIS_fnc_param;
|
||||
_flag = objectFromNetId _flagNetId;
|
||||
_owner = owner _objVeh;
|
||||
_player = {if(owner _x == _owner)exitWith{_x}}forEach playableUnits;
|
||||
|
||||
if!(_objVeh getVariable ["ExileIsPersistent", false])exitWith{[_owner, "toastRequest", ["ErrorTitleAndText", ["ExAd - Virtual Garage", STR_ExAd_VG_NOTI_NOT_PERSISTENT]]] call ExileServer_system_network_send_to;false};
|
||||
|
||||
if!(_objVeh setOwner 2)exitWith{format["Get out of the vehicle before storing it."] remoteExec ["hint", _owner]; false};
|
||||
|
||||
if!(isNil "ExAd_VG_CLEAN_ON_STORE")then{
|
||||
if(ExAd_VG_CLEAN_ON_STORE)then{
|
||||
clearBackpackCargoGlobal _objVeh;
|
||||
clearItemCargoGlobal _objVeh;
|
||||
clearMagazineCargoGlobal _objVeh;
|
||||
clearWeaponCargoGlobal _objVeh;
|
||||
_objVeh setVariable ["ExileMoney", 0, true];
|
||||
}
|
||||
};
|
||||
|
||||
_objVeh call ExileServer_object_vehicle_database_update;
|
||||
|
||||
_objVehId = _objVeh getVariable ["ExileDatabaseID",-1];
|
||||
_flagId = _flag getVariable ["ExileDatabaseID", -1];
|
||||
|
||||
if(_objVehId > -1 && _flagId > -1)then{
|
||||
["VirtualGarage", format["Store: Player - %1(%2)|Vehicle - %3(%4)|Reset gear - %5",name _player, getPlayerUID _player, typeOf _objVeh, _objVehId, str ExAd_VG_CLEAN_ON_STORE]] call ExAdServer_fnc_log;
|
||||
|
||||
_data = [_flagId, _objVehId];
|
||||
|
||||
_extDB2Message = ["loadVehToVG", _data] call ExileServer_util_extDB2_createMessage;
|
||||
_extDB2Message call ExileServer_system_database_query_fireAndForget;
|
||||
|
||||
_objVeh call ExileServer_system_vehicleSaveQueue_removeVehicle;
|
||||
_objVeh call ExileServer_system_simulationMonitor_removeVehicle;
|
||||
deleteVehicle _objVeh;
|
||||
|
||||
_vehList = _flag getVariable ["ExAdVGVeh", []];
|
||||
_vehList pushBack [_objVehId, typeOf _objVeh];
|
||||
_flag setVariable ["ExAdVGVeh", _vehList, true];
|
||||
|
||||
if(ExAd_VG_SHOW_ADVHINT)then{
|
||||
[["advancedHint", ["VGStore",[]]], _owner] call ExAdServer_fnc_clientDispatch;
|
||||
};
|
||||
};
|
||||
|
||||
true
|
@ -1,46 +0,0 @@
|
||||
/*
|
||||
fn_requestVGDetailInfo.sqf
|
||||
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
private ["_objVehNetId","_objVeh","_flagNetId","_flag","_objVehId","_flagId","_data","_extDB2Message","_vehList"];
|
||||
|
||||
_objId = [_this,0,"",[""]] call BIS_fnc_param;
|
||||
_flagNetId = [_this,1,"",[""]] call BIS_fnc_param;
|
||||
_streamFriendlyUI = [_this,2,0,[0]] call BIS_fnc_param;
|
||||
_playerNetId = [_this,3,"",[""]] call BIS_fnc_param;
|
||||
_ctrl = [_this,4,-1,[0]] call BIS_fnc_param;
|
||||
_flag = objectFromNetId _flagNetId;
|
||||
_requestFrom = owner (objectFromNetId _playerNetId);
|
||||
|
||||
_data = format ["loadVehicle:%1", _objId] call ExileServer_system_database_query_selectSingle;
|
||||
|
||||
if(count _data > 0)then{
|
||||
_displayName = getText(ConfigFile >> "CfgVehicles" >> (_data select 1) >> "displayName");
|
||||
_pinCode = if(_streamFriendlyUI == 0)then{_data select 20}else{"XXXX"};
|
||||
_fuel = _data select 5;
|
||||
_damage = _data select 6;
|
||||
_texture = _data select 21;
|
||||
_items = _data select 17;
|
||||
_magazines = _data select 18;
|
||||
_weapons = _data select 19;
|
||||
|
||||
_text = format[STR_ExAd_VG_APP_DETAILS, "<br/>", _displayName, _pinCode, _fuel, _damage, _texture, _items, _magazines, _weapons];
|
||||
|
||||
[_text,_ctrl] remoteExec ["ExAd_fnc_loadVGDetailView", _requestFrom];
|
||||
};
|
||||
|
||||
true
|
@ -1 +0,0 @@
|
||||
exad_vg
|
@ -1,51 +0,0 @@
|
||||
/*
|
||||
config.cpp
|
||||
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
class CfgPatches {
|
||||
class ExAd_VG {
|
||||
requiredVersion = 0.1;
|
||||
requiredAddons[] = {"ExAd_Core"};
|
||||
};
|
||||
};
|
||||
|
||||
class CfgFunctions {
|
||||
class ExAdServer {
|
||||
class VG {
|
||||
file = "exad_vg\Functions";
|
||||
class requestVGDetailInfo {};
|
||||
class VGLoad {};
|
||||
class VGStore {};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class CfgNetworkMessages
|
||||
{
|
||||
class VGStore
|
||||
{
|
||||
parameters[] = {"STRING","STRING","STRING"};
|
||||
};
|
||||
class VGLoad
|
||||
{
|
||||
parameters[] = {"STRING","STRING","STRING"};
|
||||
};
|
||||
class requestVGDetailInfo
|
||||
{
|
||||
parameters[] = {"STRING","STRING","SCALAR","STRING","SCALAR"};
|
||||
};
|
||||
};
|
@ -1 +0,0 @@
|
||||
#Examples
|
@ -1,53 +0,0 @@
|
||||
# Installation
|
||||
|
||||
Remember for this plugin to work you first need to install
|
||||
* [Core]((https://github.com/Bjanski/ExAd/blob/master/docs/core/installation.md)
|
||||
|
||||
## Client
|
||||
|
||||
* Place the folder "Grinding" into "mpmissions\exile.<MAP>\ExAdClient\"
|
||||
|
||||
* Goto "mpmissions\exile.<MAP>\ExAdClient\CfgFunctions" and uncomment
|
||||
|
||||
_From_
|
||||
```cpp
|
||||
//#include "Grinding\CfgFunctions.cpp"
|
||||
```
|
||||
_To_
|
||||
```cpp
|
||||
#include "Grinding\CfgFunctions.cpp"
|
||||
```
|
||||
|
||||
* In "config.cpp" find "CfgInteractionMenus" and add to "Construction".
|
||||
```cpp
|
||||
class Construction
|
||||
{
|
||||
targetType = 2;
|
||||
target = "Exile_Construction_Abstract_Static";
|
||||
|
||||
class Actions
|
||||
{
|
||||
class Grind : ExileAbstractAction
|
||||
{
|
||||
title = "Grind Lock";
|
||||
condition = "call ExAd_fnc_canGrindLock";
|
||||
action = "_this spawn ExAd_fnc_grindLock";
|
||||
};
|
||||
|
||||
class RestoreLock : ExileAbstractAction
|
||||
{
|
||||
title = "Restore Lock";
|
||||
condition = "_object call ExAd_fnc_canRestoreLock";
|
||||
action = "_this spawn ExAd_fnc_restoreLock";
|
||||
};
|
||||
};
|
||||
};
|
||||
```
|
||||
|
||||
* Modify - "mpmissions\exile.<MAP>\stringtable.xml" - add package="Grinding" and change to desirable notifications
|
||||
|
||||
* Now you can go into "mpmissions\exile.<MAP>\ExAdClient\Grinding\customize.sqf" and change to desirable settings.
|
||||
|
||||
## Server
|
||||
|
||||
* Copy over and pack "@ExileServer\addons\exad_grinding" into a pbo.
|
@ -1,21 +0,0 @@
|
||||
#Grinding
|
||||
## Instructions:
|
||||
|
||||
### v0.7.7
|
||||
* Replace "mpmissions\Exile.<map>\ExAdClient\Grinding"
|
||||
* Replace and pack "@ExileServer\addons\exad_grinding"
|
||||
|
||||
### v0.7.6
|
||||
* Replace or merge "mpmissions\Exile.<map>\ExAdClient\Grinding\customize.sqf"
|
||||
* Replace or merge "mpmissions\Exile.<map>\stringtable.xml"
|
||||
* Replace "mpmissions\Exile.<map>\ExAdClient\Grinding" - Big update
|
||||
* Replace and pack "@ExileServer\addons\exad_grinding"
|
||||
|
||||
### v0.7.3
|
||||
* Replace "mpmissions\Exile.<map>\ExAdClient\Grinding\postInit.sqf"
|
||||
|
||||
### v0.6.1
|
||||
* Replace "ExAdClient\Grinding\Functions"
|
||||
|
||||
### v0.6.0
|
||||
* Full installation
|
@ -1 +0,0 @@
|
||||
#Examples
|
@ -1,53 +0,0 @@
|
||||
# Installation
|
||||
|
||||
Remember for this plugin to work you first need to install
|
||||
* [Core](https://github.com/Bjanski/ExAd/blob/master/docs/core/installation.md)
|
||||
* [(VirtualGarage)](https://github.com/Bjanski/ExAd/blob/master/docs/VirtualGarage/installation.md) - Only necessary if you want to be able to hack it
|
||||
|
||||
## Client
|
||||
|
||||
* Place the folder "Hacking" into "mpmissions\exile.<MAP>\ExAdClient\"
|
||||
|
||||
* Goto "mpmissions\exile.<MAP>\ExAdClient\CfgFunctions" and uncomment
|
||||
|
||||
_From_
|
||||
```cpp
|
||||
//#include "Hacking\CfgFunctions.cpp"
|
||||
```
|
||||
_To_
|
||||
```cpp
|
||||
#include "Hacking\CfgFunctions.cpp"
|
||||
```
|
||||
|
||||
* In "config.cpp" find ("CfgInteractionMenus") and add the actions you want used. If you don't want to use a specific action e.g. hacking safe just ignore adding it.
|
||||
Available actions are
|
||||
* HackVG -> ("CfgInteractionMenus" >> "Flag" >> "Actions" >> "HackVG")
|
||||
* HackSafe -> ("CfgInteractionMenus" >> "Safe" >> "Actions" >> "HackSafe")
|
||||
* StopHack -> ("CfgInteractionMenus" >> "Laptop" >> "Actions" >> "StopHack")
|
||||
|
||||
Example
|
||||
```cpp
|
||||
class Flag
|
||||
{
|
||||
targetType = 2;
|
||||
target = "Exile_Construction_Flag_Static";
|
||||
|
||||
class Actions
|
||||
{
|
||||
class HackVG : ExileAbstractAction
|
||||
{
|
||||
title = "Hack Virtual Garage";
|
||||
condition = "call ExAd_fnc_canHackVG";
|
||||
action = "_this spawn ExAd_fnc_startHack";
|
||||
};
|
||||
};
|
||||
};
|
||||
```
|
||||
|
||||
* Modify - "mpmissions\exile.<MAP>\stringtable.xml" - add package="Hacking" and change to desirable notifications
|
||||
|
||||
* Now you can go into "mpmissions\exile.<MAP>\ExAdClient\Hacking\customize.sqf" and change to desirable settings.
|
||||
|
||||
## Server
|
||||
|
||||
* Copy over and pack "@ExileServer\addons\exad_hacking" into a pbo.
|
@ -1,22 +0,0 @@
|
||||
#Hacking
|
||||
## Instructions:
|
||||
|
||||
### v0.7.7
|
||||
* Replace "mpmissions\Exile.<map>\ExAdClient\Hacking"
|
||||
* Replace and pack "@ExileServer\addons\exad_hacking"
|
||||
|
||||
### v0.7.6
|
||||
* Replace or merge "mpmissions\Exile.<map>\ExAdClient\Hacking\customize.sqf"
|
||||
* Replace or merge "mpmissions\Exile.<map>\stringtable.xml"
|
||||
* Replace "mpmissions\Exile.<map>\ExAdClient\Hacking" - Big update
|
||||
* Replace and pack "@ExileServer\addons\exad_hacking"
|
||||
|
||||
### v0.7.3
|
||||
* Replace and pack "@ExileServer\addons\exad_hacking"
|
||||
* Replace "mpmissions\Exile.<map>\ExAdClient\Hacking\postInit.sqf"
|
||||
|
||||
### v0.7.1
|
||||
* Replace and pack "@ExileServer\addons\exad_hacking"
|
||||
|
||||
### v0.7.0
|
||||
* Full installation
|
40
docs/VehicleSalvage/installation.md
Normal file
40
docs/VehicleSalvage/installation.md
Normal file
@ -0,0 +1,40 @@
|
||||
# Installation
|
||||
|
||||
Remember for this plugin to work you first need to install
|
||||
* [Core]((https://github.com/Bjanski/ExAd/blob/master/docs/core/installation.md)
|
||||
|
||||
## Client
|
||||
|
||||
* Make sure the VehicleSalvage folder is present in mpmissions\missionname.mapname\ExAdClient
|
||||
|
||||
* Goto "mpmissions\exile.<MAP>\ExAdClient\CfgFunctions" and uncomment
|
||||
|
||||
_From_
|
||||
```cpp
|
||||
//#include "VehicleSalvage\CfgFunctions.cpp"
|
||||
```
|
||||
_To_
|
||||
```cpp
|
||||
#include "VehicleSalvage\CfgFunctions.cpp"
|
||||
```
|
||||
|
||||
* In "config.cpp" find "CfgInteractionMenus"
|
||||
|
||||
* Under CfgInteractionMenus you will see "class Car"
|
||||
|
||||
* Add to the bottom of "class Car" menus this:
|
||||
|
||||
```cpp
|
||||
class ExAdSalvage: ExileAbstractAction
|
||||
{
|
||||
title = "<t color='#ff0000'>ExAd Salvage Aircraft</t>";
|
||||
condition = "(!(alive (ExileClientInteractionObject)))";
|
||||
action = "_this call ExAd_fnc_vehicleSalvage";
|
||||
};
|
||||
```
|
||||
|
||||
* Make sure it follows the formatting of the rest of the actions.
|
||||
|
||||
* Repeat this to add it to "class Air", "class Boat" and "class Tank" if you have it. Vanilla servers do not have "class Tank" so you may need to add it yourself.
|
||||
|
||||
ALL DONE! Enjoy :D
|
@ -1 +0,0 @@
|
||||
#Examples
|
@ -1,64 +0,0 @@
|
||||
# Installation
|
||||
|
||||
Remember for this plugin to work you first need to install
|
||||
* [Core](https://github.com/Bjanski/ExAd/blob/master/docs/core/installation.md)
|
||||
* [XM8](https://github.com/Bjanski/ExAd/blob/master/docs/XM8/installation.md)
|
||||
|
||||
## Client
|
||||
|
||||
* Place the folder "VirtualGarage" into "mpmissions\exile.<MAP>\ExAdClient\"
|
||||
|
||||
* Goto "mpmissions\exile.<MAP>\ExAdClient\CfgFunctions" and uncomment
|
||||
|
||||
_From_
|
||||
```cpp
|
||||
//#include "VirtualGarage\CfgFunctions.cpp"
|
||||
```
|
||||
_To_
|
||||
```cpp
|
||||
#include "VirtualGarage\CfgFunctions.cpp"
|
||||
```
|
||||
* Repeat last step for "CfgHints"
|
||||
|
||||
* In "config.cpp" in the mission root folder, find class CfgExileCustomCode and add the following row
|
||||
```js
|
||||
ExileServer_system_territory_database_load = "ExAdClient\VirtualGarage\CustomCode\ExileServer_system_territory_database_load.sqf";
|
||||
```
|
||||
* In "config.cpp" you can also add the ("CfgInteractionMenus" >> "Flag" >> "VG") class if you want to be able to fast load the app through your flag pole.
|
||||
|
||||
* Modify - "mpmissions\exile.<MAP>\stringtable.xml" - add if missing package="VirtualGarage" and change to desirable notifications
|
||||
|
||||
* Now you can go into "mpmissions\exile.<MAP>\ExAdClient\VirtualGarage\customize.sqf" and change to desirable settings.
|
||||
|
||||
### XM8 App
|
||||
|
||||
* Copy over "ExileClient\XM8\Apps\VG"
|
||||
* Add ("CfgXM8" >> "Exad_VG") to "mpmissions\exile.<MAP>\config.cpp"
|
||||
```
|
||||
class CfgXM8
|
||||
{
|
||||
extraApps[] = {"ExAd_VG"};
|
||||
|
||||
class ExAd_VG
|
||||
{
|
||||
title = "Virtual Garage";
|
||||
controlID = 50000; //These need to be unique
|
||||
onLoad = "ExAdClient\XM8\Apps\VG\onLoad.sqf";
|
||||
onOpen = "ExAdClient\XM8\Apps\VG\onOpen.sqf";
|
||||
onClose = "ExAdClient\XM8\Apps\VG\onClose.sqf";
|
||||
};
|
||||
};
|
||||
```
|
||||
|
||||
## Server
|
||||
|
||||
* Copy over and pack "@ExileServer\addons\exad_vg" into a pbo.
|
||||
|
||||
## Database
|
||||
* Run the following sql command in you database.
|
||||
```sql
|
||||
ALTER TABLE `vehicle` ADD `territory_id` INT(11) UNSIGNED NULL DEFAULT NULL;
|
||||
ALTER TABLE `vehicle` ADD CONSTRAINT `vehicle_ibfk_2` FOREIGN KEY (`territory_id`) REFERENCES `territory`(`id`) ON DELETE CASCADE ON UPDATE RESTRICT;
|
||||
```
|
||||
|
||||
* Copy over content from "@ExileServer\extDB\sql_custom_v2\exile.ini" - Follow the instructions in the file.
|
@ -1,52 +0,0 @@
|
||||
#VirtualGarage
|
||||
## Instructions:
|
||||
|
||||
### v0.7.7
|
||||
* Remove XM8_Apps
|
||||
* Install [XM8](https://github.com/Bjanski/ExAd/tree/master/docs/XM8)
|
||||
* Replace "mpmissions\Exile.<map>\ExAdClient\VG"
|
||||
* Replace and pack "@ExileServer\addons\exad_vg"
|
||||
* Update "@ExileServer\extDB\sql_custom_v2\exile.ini" ->
|
||||
```
|
||||
[loadVehicleIdPage]
|
||||
SQL1_1 = SELECT id FROM vehicle WHERE deleted_at IS NULL AND territory_id IS NULL LIMIT ?,?
|
||||
Number Of Inputs = 2
|
||||
SQL1_INPUTS = 1,2
|
||||
OUTPUT = 1
|
||||
```
|
||||
|
||||
### v0.7.6
|
||||
* Replace or merge "mpmissions\Exile.<map>\ExAdClient\VG\customize.sqf"
|
||||
* Replace or merge "mpmissions\Exile.<map>\stringtable.xml"
|
||||
* Replace "mpmissions\Exile.<map>\ExAdClient\VG" - Big update
|
||||
* Replace "mpmissions\Exile.<map>\XM8_apps\apps\XM8_VG"
|
||||
* Replace and pack "@ExileServer\addons\exad_vg"
|
||||
|
||||
### v0.7.3
|
||||
* Replace "mpmissions\Exile.<map>\ExAdClient\VirtualGarage\postInit.sqf"
|
||||
|
||||
### v0.7.0
|
||||
* Copy over the new VirtualGarage Package in "stringtable.xml"
|
||||
* Replace and pack "@ExileServer\addons\exad_vg"
|
||||
|
||||
|
||||
### v0.6.1
|
||||
* Modify config.cpp ("CfgInteractionMenus" >> "Flag")
|
||||
```cpp
|
||||
class VG : ExileAbstractAction
|
||||
{
|
||||
title = "Virtual Garage";
|
||||
condition = "(([_object, getPlayerUID player] call ExileClient_util_territory_getAccessLevel) select 0) >= ExAd_VG_ACCESS_LEVEL";
|
||||
action = "[] spawn {[] call ExileClient_gui_xm8_show; UISleep 1; call XM8_VG_checkNearByFlags}";
|
||||
};
|
||||
```
|
||||
|
||||
|
||||
### v0.5.1
|
||||
* Add battleye exceptions
|
||||
* Replace "ExAdClient\VirtualGarage\Functions"
|
||||
* Replace "ExAdClient\VirtualGarage\CfgHints.cpp"
|
||||
* Replace "XM8_apps\apps\XM8_VG"
|
||||
|
||||
### 160428 12:00 . v0.5.0
|
||||
* Full installation
|
@ -21,11 +21,9 @@ class ExAd
|
||||
{
|
||||
tag = "ExAd";
|
||||
#include "Core\CfgFunctions.cpp"
|
||||
//#include "VirtualGarage\CfgFunctions.cpp"
|
||||
//#include "AdminEvents\CfgFunctions.cpp"
|
||||
//#include "Hacking\CfgFunctions.cpp"
|
||||
//#include "Grinding\CfgFunctions.cpp"
|
||||
//#include "HaloParachute\CfgFunctions.cpp"
|
||||
//#include "XM8\CfgFunctions.cpp"
|
||||
//#include "StatsBar\CfgFunctions.cpp"
|
||||
};
|
||||
//#include "VehicleSalvage\CfgFunctions.cpp"
|
||||
};
|
||||
|
@ -1,22 +0,0 @@
|
||||
/*
|
||||
CfgHints.cpp
|
||||
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
class ExAd
|
||||
{
|
||||
displayName = "ExAd Virtual Garage";
|
||||
//#include "VirtualGarage\CfgHints.cpp"
|
||||
};
|
@ -18,8 +18,5 @@
|
||||
|
||||
|
||||
//#include "Core\ExAd.cpp"
|
||||
//#include "VirtualGarage\ExAd.cpp"
|
||||
//#include "AdminEvents\ExAd.cpp"
|
||||
//#include "Hacking\ExAd.cpp"
|
||||
//#include "Grinding\ExAd.cpp"
|
||||
//#include "HaloParachute\ExAd.cpp"
|
||||
//#include "HaloParachute\ExAd.cpp"
|
||||
|
@ -1,19 +0,0 @@
|
||||
/*
|
||||
fn_canGrindLock.sqf
|
||||
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
(((ExileClientInteractionObject getvariable ['ExileIsLocked',1]) isEqualTo -1) && !ExAd_GRINDING && ('Exile_Item_Grinder' in (magazines player)))
|
@ -1,19 +0,0 @@
|
||||
/*
|
||||
fn_canRestoreLock.sqf
|
||||
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
(('Exile_Item_Codelock' in (magazines player)) && (ExileClientInteractionObject getVariable ['ExAd_Grinding_progress', 0] > 0) && (ExileClientInteractionObject getVariable ['ExAd_Grinding_progress', 0] < ExAd_GRINDING_OBJECT_MAX))
|
@ -1,105 +0,0 @@
|
||||
/*
|
||||
fn_grindLock.sqf
|
||||
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
private ["_soundSrc","_ticker"];
|
||||
|
||||
if(vehicle player != player)exitWith{false};
|
||||
|
||||
ExAd_GRINDING_OBJECT = _this select 0;
|
||||
ExAd_GRINDING = true;
|
||||
|
||||
{
|
||||
ExileClientInteractionObject removeAction _x;
|
||||
}
|
||||
forEach ExileClientInteractionHandles;
|
||||
|
||||
if(isClass(configFile >> "CfgVehicles" >> "Sound_Factory10")) then {
|
||||
_soundSrc = createSoundSource ["Sound_Factory10", position ExAd_GRINDING_OBJECT, [], 0];
|
||||
};
|
||||
player playActionNow "medicStart";
|
||||
|
||||
ExAd_DRAW3D_HANDLER = addMissionEventHandler ["Draw3D", {
|
||||
private ["_object","_progress"];
|
||||
|
||||
_height = ExAd_GRINDING_PROGRESSBAR_POS;
|
||||
|
||||
_object = if(isNil "ExAd_GRINDING_OBJECT")then{ExileClientInteractionObject}else{ExAd_GRINDING_OBJECT};
|
||||
_progress = 1 min ((_object getVariable ["ExAd_Grinding_progress", 1]) / ExAd_GRINDING_OBJECT_MAX);
|
||||
|
||||
drawLine3D [_object modelToWorld [-0.5, -0.15, _height], _object modelToWorld [0.5, -0.15, _height], [0,0,0,1]];
|
||||
drawLine3D [_object modelToWorld [-0.5, -0.15, _height - 0.05], _object modelToWorld [0.5, -0.15, _height - 0.05], [0,0,0,1]];
|
||||
drawLine3D [_object modelToWorld [-0.5, 0.15, _height], _object modelToWorld [0.5, 0.15, _height], [0,0,0,1]];
|
||||
drawLine3D [_object modelToWorld [-0.5, 0.15, _height - 0.05], _object modelToWorld [0.5, 0.15, _height - 0.05], [0,0,0,1]];
|
||||
|
||||
drawLine3D [_object modelToWorld [-0.5, -0.15, _height], _object modelToWorld [-0.5, -0.15, _height - 0.05], [0,0,0,1]];
|
||||
drawLine3D [_object modelToWorld [0.5, -0.15, _height], _object modelToWorld [0.5, -0.15, _height - 0.05], [0,0,0,1]];
|
||||
drawLine3D [_object modelToWorld [-0.5, 0.15, _height], _object modelToWorld [-0.5, 0.15, _height - 0.05], [0,0,0,1]];
|
||||
drawLine3D [_object modelToWorld [0.5, -0.15, _height], _object modelToWorld [0.5, -0.15, _height - 0.05], [0,0,0,1]];
|
||||
|
||||
for "_i" from 1 to 49 do {
|
||||
drawLine3D [_object modelToWorld [-0.5, -0.15, _height - (0.001 * _i)], _object modelToWorld [((-0.5) + _progress), -0.15, _height - (0.001 * _i)], [1,0.482,0,1]];
|
||||
drawLine3D [_object modelToWorld [0.5, 0.15, _height - (0.001 * _i)], _object modelToWorld [((0.5) - _progress), 0.15, _height - (0.001 * _i)], [1,0.482,0,1]];
|
||||
|
||||
drawLine3D [_object modelToWorld [0.5, -0.15, _height - (0.001 * _i)], _object modelToWorld [((-0.5) + _progress), -0.15, _height - (0.001 * _i)], [0.55,0.55,0.55,1]];
|
||||
drawLine3D [_object modelToWorld [-0.5, 0.15, _height - (0.001 * _i)], _object modelToWorld [((0.5) - _progress), 0.15, _height - (0.001 * _i)], [0.55,0.55,0.55,1]];
|
||||
}
|
||||
}];
|
||||
|
||||
_ticker = 1;
|
||||
while{(ExAd_GRINDING_OBJECT == ExileClientInteractionObject) && ExAd_GRINDING}do{
|
||||
UISleep 1;
|
||||
|
||||
if(random[0,50,100] < 1)exitWith{
|
||||
player removeItem "Exile_Item_Grinder";
|
||||
["ErrorTitleAndText", ["ExAd - Grinding", STR_ExAd_GRINDING_NOTI_BROKE]] call ExileClient_gui_toaster_addTemplateToast;
|
||||
false
|
||||
};
|
||||
|
||||
if!("Exile_Magazine_Battery" in (magazines player))exitWith{
|
||||
["ErrorTitleAndText", ["ExAd - Grinding", STR_ExAd_GRINDING_NOTI_EMPTY_BAT]] call ExileClient_gui_toaster_addTemplateToast;
|
||||
false
|
||||
};
|
||||
|
||||
if((_ticker % ExAd_GRINDING_PROGRESS_INTERVALL) == 0)then{
|
||||
player removeItem "Exile_Magazine_Battery";
|
||||
|
||||
["grindProgress", [netId ExAd_GRINDING_OBJECT]] call ExAd_fnc_serverDispatch;
|
||||
["SuccessTitleAndText", ["ExAd - Grinding", STR_ExAd_GRINDING_NOTI_PROGRESS]] call ExileClient_gui_toaster_addTemplateToast;
|
||||
|
||||
player playActionNow "medicStart";
|
||||
};
|
||||
|
||||
if(ExAd_GRINDING_OBJECT getVariable ["ExAd_Grinding_progress", 0] > ExAd_GRINDING_OBJECT_MAX)exitWith{
|
||||
UISleep 2;
|
||||
["SuccessTitleAndText", ["ExAd - Grinding", STR_ExAd_GRINDING_NOTI_FINISHED]] call ExileClient_gui_toaster_addTemplateToast;
|
||||
["grindProgress", [netId ExAd_GRINDING_OBJECT]] call ExAd_fnc_serverDispatch;
|
||||
};
|
||||
_ticker = _ticker + 1;
|
||||
};
|
||||
|
||||
if(isClass(configFile >> "CfgVehicles" >> "Sound_Factory10")) then {
|
||||
deleteVehicle _soundSrc;
|
||||
};
|
||||
|
||||
player playActionNow "medicStop";
|
||||
removeMissionEventHandler ["Draw3D",ExAd_DRAW3D_HANDLER];
|
||||
|
||||
ExAd_GRINDING_OBJECT = nil;
|
||||
ExAd_GRINDING = false;
|
||||
call ExileClient_gui_interactionMenu_unhook;
|
||||
|
||||
true
|
@ -1,33 +0,0 @@
|
||||
/*
|
||||
fn_restoreLock.sqf
|
||||
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
params["_object"];
|
||||
|
||||
if(vehicle player != player)exitWith{false};
|
||||
|
||||
call ExileClient_gui_interactionMenu_unhook;
|
||||
player playActionNow "medic";
|
||||
|
||||
UISleep 5;
|
||||
player removeItem "Exile_Item_Codelock";
|
||||
["SuccessTitleAndText", ["ExAd - Grinding", STR_ExAd_GRINDING_NOTI_RESTORED]] call ExileClient_gui_toaster_addTemplateToast;
|
||||
|
||||
["restoreLock", [netId _object]] call ExAd_fnc_serverDispatch;
|
||||
|
||||
call ExileClient_gui_interactionMenu_unhook;
|
||||
|
||||
true
|
@ -1,29 +0,0 @@
|
||||
/*
|
||||
customize.sqf
|
||||
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
ExAd_GRINDING_PROGRESS_INTERVALL = 5; //SCALAR - Grinding, interval time measured in seconds.
|
||||
|
||||
ExAd_GRINDING_PROGRESS = 30; //SCALAR - Damage each finished interval will take from the code lock.
|
||||
|
||||
ExAd_GRINDING_OBJECT_MAX = 300; //SCALAR - Code lock sustainability.
|
||||
|
||||
ExAd_GRINDING_PROGRESSBAR_POS = "Mid"; //SCALAR/STRING - You can use values between 0.3-2 or using "LOW"|"MID"|"HIGH"
|
||||
|
||||
/*
|
||||
The default values above means that a full succesful grind will take (900 / 30) * 60 = 1800 = 20 minutes
|
||||
*/
|
@ -1,47 +0,0 @@
|
||||
/*
|
||||
postInit.sqf
|
||||
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
_path = "ExAdClient\Grinding\customize.sqf";
|
||||
call compile preprocessFileLineNumbers _path;
|
||||
|
||||
if(isNil "ExAd_GRINDING_PROGRESS_INTERVALL")then{ExAd_GRINDING_PROGRESS_INTERVALL = 60;};
|
||||
if(isNil "ExAd_GRINDING_PROGRESS")then{ExAd_GRINDING_PROGRESS = 30;};
|
||||
if(isNil "ExAd_GRINDING_OBJECT_MAX")then{ExAd_GRINDING_OBJECT_MAX = 900;};
|
||||
|
||||
ExAd_GRINDING = false;
|
||||
|
||||
["STR_ExAd_GRINDING_NOTI_BROKE", "Your grinder broke, get a new one before you can continue."] call ExAd_fnc_localize;
|
||||
["STR_ExAd_GRINDING_NOTI_EMPTY_BAT", "Find some batteries to get the grinder to work."] call ExAd_fnc_localize;
|
||||
["STR_ExAd_GRINDING_NOTI_PROGRESS", "Your grinder broke, get a new one before you can continue."] call ExAd_fnc_localize;
|
||||
["STR_ExAd_GRINDING_NOTI_FINISHED", "You have broken the code lock."] call ExAd_fnc_localize;
|
||||
["STR_ExAd_GRINDING_NOTI_RESTORED", "You've changed the look"] call ExAd_fnc_localize;
|
||||
|
||||
ExAd_GRINDING_PROGRESSBAR_POS = if!(isNil "ExAd_GRINDING_PROGRESSBAR_POS")then{
|
||||
if(typeName ExAd_GRINDING_PROGRESSBAR_POS isEqualTo "SCALAR")then{
|
||||
((2 min ExAd_GRINDING_PROGRESSBAR_POS) max 0.3)
|
||||
}else{
|
||||
if(typeName ExAd_GRINDING_PROGRESSBAR_POS isEqualTo "STRING")then{
|
||||
switch (toLower ExAd_GRINDING_PROGRESSBAR_POS) do {
|
||||
case "low": {0.3};
|
||||
case "mid": {1};
|
||||
case "high": {1.8};
|
||||
default {1};
|
||||
}
|
||||
} else {1}
|
||||
}
|
||||
}else{1};
|
@ -1,28 +0,0 @@
|
||||
/*
|
||||
CfgFunctions.cpp
|
||||
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
class Hacking
|
||||
{
|
||||
file = "ExAdClient\Hacking\Functions";
|
||||
class canHackSafe {};
|
||||
class canHackVG {};
|
||||
class startHack {};
|
||||
class stopHack {};
|
||||
class postInitHacking {file = "ExAdClient\Hacking\postInit.sqf"; postInit = 1;};
|
||||
};
|
@ -1,18 +0,0 @@
|
||||
/*
|
||||
fn_canHackSafe.sqf
|
||||
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
(('Exile_Item_Laptop' in (magazines player)) && ((ExileClientInteractionObject getvariable ['ExileIsLocked',1]) isEqualTo -1) && (({alive _x}count allPlayers) >= ExAd_HACKING_MIN_PLAYERS_ONLINE))
|
@ -1,18 +0,0 @@
|
||||
/*
|
||||
fn_canHackVG.sqf
|
||||
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
(('Exile_Item_Laptop' in (magazines player)) && ((([ExileClientInteractionObject, getPlayerUID player] call ExileClient_util_territory_getAccessLevel) select 0) < ExAd_VG_ACCESS_LEVEL) && (({alive _x}count allPlayers) >= ExAd_HACKING_MIN_PLAYERS_ONLINE))
|
@ -1,18 +0,0 @@
|
||||
/*
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
*/
|
||||
|
||||
["stopHack", [netId (_this select 0)]] call ExAd_fnc_serverDispatch;
|
@ -1,35 +0,0 @@
|
||||
/*
|
||||
customize.sqf
|
||||
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
ExAd_HACKING_MIN_PLAYERS_ONLINE = 30; //SCALAR - Minimun allowed players online to initalize a hack.
|
||||
|
||||
ExAd_HACKING_ALLOWED_HACKS = 1; //SCALAR - Simultaneous hacks allowed.
|
||||
|
||||
ExAd_HACKING_MAX_TIME = 1200; //SCALAR - Time to complete a hack
|
||||
|
||||
ExAd_HACKING_MAX_DISTANCE = 50; //SCALAR - Maximum distance away from the object being hack players for the hack to proceed.
|
||||
|
||||
ExAd_HACKING_TERRITORY_MAX = 3; //SCALAR - Maximun times a territory can get hacked before a new restart.
|
||||
|
||||
ExAd_HACKING_MARKER_COLOR = "ColorOrange"; //STRING - What color should the map marker have.
|
||||
|
||||
ExAd_HACKING_MARKER_TITLE = "Hacker activity"; //STRING - What title should the map marker have.
|
||||
|
||||
ExAd_HACKING_FAILED_HACK = 0.15; //SCALAR - 0-1 The possability for the hack to fail once finished.
|
||||
|
||||
ExAd_HACKING_PLAYER_ONLINE = false; //BOLLEAN - True if a player with build permissions for a base needs to be online for a hack to be possible.
|
@ -1,46 +0,0 @@
|
||||
/*
|
||||
postInit.sqf
|
||||
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
*/
|
||||
|
||||
_path = "ExAdClient\Hacking\customize.sqf";
|
||||
call compile preprocessFileLineNumbers _path;
|
||||
|
||||
if(isNil "ExAd_HACKING_MIN_PLAYERS_ONLINE")then{ExAd_HACKING_MIN_PLAYERS_ONLINE = 30;};
|
||||
if(isNil "ExAd_HACKING_ALLOWED_HACKS")then{ExAd_HACKING_ALLOWED_HACKS = 1;};
|
||||
if(isNil "ExAd_HACKING_MAX_TIME")then{ExAd_HACKING_MAX_TIME = 1200;};
|
||||
if(isNil "ExAd_HACKING_MAX_DISTANCE")then{ExAd_HACKING_MAX_DISTANCE = 50;};
|
||||
if(isNil "ExAd_HACKING_TERRITORY_MAX")then{ExAd_HACKING_TERRITORY_MAX = 3;};
|
||||
if(isNil "ExAd_HACKING_MARKER_COLOR")then{ExAd_HACKING_MARKER_COLOR = "ColorOrange";};
|
||||
if(isNil "ExAd_HACKING_MARKER_TITLE")then{ExAd_HACKING_MARKER_TITLE = "Hacker activity";};
|
||||
if(isNil "ExAd_HACKING_FAILED_HACK")then{ExAd_HACKING_FAILED_HACK = 0.15;};
|
||||
|
||||
if(isNil "ExAd_VG_ACCESS_LEVEL")then{ExAd_VG_ACCESS_LEVEL = 1;};
|
||||
|
||||
if(isNil "ExAd_HACKING_FAILED_HACK")then{ExAd_VG_ACCESS_LEVEL = 1;}; /*Needs to be here if peolpe don't use the VirtualGarage*/
|
||||
|
||||
["STR_ExAd_HACKING_NOTI_MAX_TERRITORY_HACKS_REACHED", "Connection failed! Territory Wi-Fi is down!"] call ExAd_fnc_localize;
|
||||
["STR_ExAd_HACKING_NOTI_TERRITORY_ONE_HACK", "Wi-Fi occupied!!"] call ExAd_fnc_localize;
|
||||
["STR_ExAd_HACKING_NOTI_MAX_SIM_HACKS", "The laptop overloaded and got destroyed! Another hacker is already using the grid."] call ExAd_fnc_localize;
|
||||
["STR_ExAd_HACKING_NOTI_NO_PLAYER_PRESENT", "No Wi-Fi available!"] call ExAd_fnc_localize;
|
||||
["STR_ExAd_HACKING_HINT_TITLE", "Hack Activity"] call ExAd_fnc_localize;
|
||||
["STR_ExAd_HACKING_HINT_HACK_START", "A brute force hack is detected on the grid!"] call ExAd_fnc_localize;
|
||||
["STR_ExAd_HACKING_NOTI_VG_SUCCESS", "Hack successful! The Virtual Garage unloaded a %1"] call ExAd_fnc_localize;
|
||||
["STR_ExAd_HACKING_NOTI_VG_NO_VEH", "Hack successful! No vehicles were stored in the Virtual Garage."] call ExAd_fnc_localize;
|
||||
["STR_ExAd_HACKING_NOTI_SAFE_SUCCESS", "Hack successful! The safe is now unlocked."] call ExAd_fnc_localize;
|
||||
["STR_ExAd_HACKING_NOTI_INTERUPTED", "Hack has been interupted"] call ExAd_fnc_localize;
|
||||
["STR_ExAd_HACKING_NOTI_FAILED", "Hack failed! Circuits overloaded!"] call ExAd_fnc_localize;
|
@ -2,6 +2,8 @@
|
||||
CfgFunctions.cpp
|
||||
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
Added to ExAd by [GADD]Monkeynutz
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@ -17,12 +19,9 @@
|
||||
*/
|
||||
|
||||
|
||||
class Grinding
|
||||
class VehicleSalvage
|
||||
{
|
||||
file = "ExAdClient\Grinding\Functions";
|
||||
class canGrindLock {};
|
||||
class canRestoreLock {};
|
||||
class grindLock {};
|
||||
class restoreLock {};
|
||||
class postInitGrinding {file = "ExAdClient\Grinding\postInit.sqf"; postInit = 1;};
|
||||
file = "ExAdClient\VehicleSalvage\Functions";
|
||||
class vehicleSalvage {};
|
||||
class postInitSV {file = "ExAdClient\VehicleSalvage\postInit.sqf"; postInit = 1;};
|
||||
};
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
fn_stopHack.sqf
|
||||
customize.sqf
|
||||
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
@ -15,8 +15,6 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
_object = objectFromNetId ([_this, 0, "",[""]] call BIS_fnc_param);
|
||||
|
||||
_object setVariable ["ExAd_HACK_INTERUPTED",true];
|
||||
|
||||
true
|
||||
ExAd_SV_DISALLOW_DURING_COMBAT = true; //BOOLEAN - Set to true to prevent people salvaging their vehicles during combat.
|
||||
ExAd_SV_TIME_TAKEN_TO_SALVAGE = 10; //SCALAR - Set in seconds how long you wish for salvaging to take players. (Default = 10)
|
@ -0,0 +1,97 @@
|
||||
/**
|
||||
ExAd Salvage Vehicle Script
|
||||
Old script found & fixed, edited, optimized and added to by [GADD]Monkeynutz
|
||||
Written for ExAd by [ExAd]Janski
|
||||
**/
|
||||
|
||||
if (ExileClientActionDelayShown) exitWith { false };
|
||||
ExileClientActionDelayShown = true;
|
||||
ExileClientActionDelayAbort = false;
|
||||
|
||||
if (ExileClientPlayerIsInCombat && ExAd_SV_DISALLOW_DURING_COMBAT) exitWith
|
||||
{
|
||||
["ErrorTitleAndText",["Vehicle Salvage!", "You cannot salvage a vehicle while in combat!"]] call ExileClient_gui_toaster_addTemplateToast;
|
||||
ExileClientActionDelayShown = false;
|
||||
ExileClientActionDelayAbort = false;
|
||||
};
|
||||
|
||||
["InfoTitleAndText",["Vehicle Salvage!", "Salvaging Vehicle!"]] call ExileClient_gui_toaster_addTemplateToast;
|
||||
|
||||
disableSerialization;
|
||||
("ExileActionProgressLayer" call BIS_fnc_rscLayer) cutRsc ["RscExileActionProgress", "PLAIN", 1, false];
|
||||
|
||||
private _duration = ExAd_SV_TIME_TAKEN_TO_SALVAGE;
|
||||
private _keyDown = (findDisplay 46) displayAddEventHandler ["KeyDown","_this call ExileClient_action_event_onKeyDown"];
|
||||
private _mouseDown = (findDisplay 46) displayAddEventHandler ["MouseButtonDown","_this call ExileClient_action_event_onMouseButtonDown"];
|
||||
private _startTime = diag_tickTime;
|
||||
private _sleepTime = _duration / 100;
|
||||
private _progress = 0;
|
||||
private _uiControl = uiNamespace getVariable "RscExileActionProgress";
|
||||
private _percentage = _uiControl displayCtrl 4002;
|
||||
private _progressBarBackground = _uiControl displayCtrl 4001;
|
||||
private _progressBarMaxSize = ctrlPosition _progressBarBackground;
|
||||
private _progressBar = _uiControl displayCtrl 4000;
|
||||
private _barColour = [];
|
||||
|
||||
player playAction "Exile_Acts_RepairVehicle01_Animation01";
|
||||
["switchMoveRequest", [netId player, "Exile_Acts_RepairVehicle01_Animation01"]] call ExileClient_system_network_send;
|
||||
_percentage ctrlSetText "0%";
|
||||
_progressBar ctrlSetPosition [_progressBarMaxSize select 0, _progressBarMaxSize select 1, 0, _progressBarMaxSize select 3];
|
||||
_progressBar ctrlSetBackgroundColor [0, 0.78, 0.93, 1];
|
||||
_progressBar ctrlCommit 0;
|
||||
_progressBar ctrlSetPosition _progressBarMaxSize;
|
||||
_progressBar ctrlCommit _duration;
|
||||
try
|
||||
{
|
||||
while {_progress < 1} do
|
||||
{
|
||||
if (ExileClientActionDelayAbort) then
|
||||
{
|
||||
throw 1;
|
||||
};
|
||||
|
||||
uiSleep _sleepTime;
|
||||
_progress = ((diag_tickTime - _startTime) / _duration) min 1;
|
||||
_percentage ctrlSetText format["%1%2", round (_progress * 100), "%"];
|
||||
};
|
||||
throw 0;
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
switch (_exception) do
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
_barColour = [0.7, 0.93, 0, 1];
|
||||
deleteVehicle (_this select 0);
|
||||
|
||||
[
|
||||
"SuccessTitleAndText",
|
||||
["Vehicle Salvage!", "You have successfully Salvaged this Vehicle! Junk Metal fell on the floor!"]
|
||||
] call ExileClient_gui_toaster_addTemplateToast;
|
||||
private _junk = "groundweaponHolder" createVehicle position player;
|
||||
_junk addMagazineCargo ["Exile_Item_JunkMetal", 1];
|
||||
_junk setPosATL getPosATL player;
|
||||
};
|
||||
case 1:
|
||||
{
|
||||
[
|
||||
"ErrorTitleAndText",
|
||||
["Vehicle Salvage!", "Salvaging Canceled!"]
|
||||
] call ExileClient_gui_toaster_addTemplateToast;
|
||||
_barColour = [0.82, 0.82, 0.82, 1];
|
||||
};
|
||||
};
|
||||
player switchMove "";
|
||||
["switchMoveRequest", [netId player, ""]] call ExileClient_system_network_send;
|
||||
_progressBar ctrlSetBackgroundColor _barColour;
|
||||
_progressBar ctrlSetPosition _progressBarMaxSize;
|
||||
_progressBar ctrlCommit 0;
|
||||
};
|
||||
|
||||
("ExileActionProgressLayer" call BIS_fnc_rscLayer) cutFadeOut 2;
|
||||
(findDisplay 46) displayRemoveEventHandler ["KeyDown", _keyDown];
|
||||
(findDisplay 46) displayRemoveEventHandler ["MouseButtonDown", _mouseDown];
|
||||
ExileClientActionDelayShown = false;
|
||||
ExileClientActionDelayAbort = false;
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
fn_startHack.sqf
|
||||
postInit.sqf
|
||||
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
@ -14,8 +14,11 @@
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
*/
|
||||
|
||||
player playActionNow "SitDown";
|
||||
_path = "ExAdClient\VehicleSalvage\customize.sqf";
|
||||
call compile preprocessFileLineNumbers _path;
|
||||
|
||||
["startHack", [netId (_this select 0), netId player]] call ExAd_fnc_serverDispatch;
|
||||
if(isNil "ExAd_SV_DISALLOW_DURING_COMBAT")then{ExAd_SV_DISALLOW_DURING_COMBAT = false;};
|
||||
if(isNil "ExAd_SV_TIME_TAKEN_TO_SALVAGE")then{ExAd_SV_TIME_TAKEN_TO_SALVAGE = 10;};
|
@ -1,30 +0,0 @@
|
||||
/*
|
||||
CfgFunctions.cpp
|
||||
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
class VirtualGarage
|
||||
{
|
||||
file = "ExAdClient\VirtualGarage\Functions";
|
||||
class allowedVGVeh {};
|
||||
class allowVGStore {};
|
||||
class fillVGList {};
|
||||
class loadVGContent {};
|
||||
class loadVGDetailView {};
|
||||
class onBtnClickVG {};
|
||||
class postInitVG {file = "ExAdClient\VirtualGarage\postInit.sqf"; postInit = 1;};
|
||||
};
|
@ -1,38 +0,0 @@
|
||||
/*
|
||||
CfgHints.cpp
|
||||
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
class VGStore
|
||||
{
|
||||
displayName = "Vehicle stored";
|
||||
/*displayNameShort = "Your vehicle has been stored and is available through the Virtual Garage interface";*/
|
||||
description = "Your vehicle has been stored and is only available through the territory it has been stored at. ";
|
||||
image = "ExAdClient\Core\Img\logo.paa";
|
||||
noImage = false;
|
||||
tip = "";
|
||||
arguments[] = {};
|
||||
};
|
||||
class VGLoad
|
||||
{
|
||||
displayName = "Vehicle loaded to world";
|
||||
description = "%1Your vehicle has been loaded to the world, the pin code is %11";
|
||||
image = "ExAdClient\Core\Img\logo.paa";
|
||||
noImage = false;
|
||||
tip = "";
|
||||
arguments[] = {"VGLoad select 0"};
|
||||
parameters[] = {"STRING"};
|
||||
};
|
@ -1,61 +0,0 @@
|
||||
/**
|
||||
* ExileServer_system_territory_database_load
|
||||
*
|
||||
* Exile Mod
|
||||
* www.exilemod.com
|
||||
* © 2015 Exile Mod Team
|
||||
*
|
||||
* This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
*/
|
||||
|
||||
private["_territoryID","_data","_id","_owner","_position","_radius","_level","_flagTexture","_flagStolen","_flagStolenBy","_lastPayed","_buildRights","_moderators","_flagObject"];
|
||||
_territoryID = _this;
|
||||
_data = format ["loadTerritory:%1", _territoryID] call ExileServer_system_database_query_selectSingle;
|
||||
_id = _data select 0;
|
||||
_owner = _data select 1;
|
||||
_name = _data select 2;
|
||||
_position =
|
||||
[
|
||||
_data select 3,
|
||||
_data select 4,
|
||||
_data select 5
|
||||
];
|
||||
_radius = _data select 6;
|
||||
_level = _data select 7;
|
||||
_flagTexture = _data select 8;
|
||||
_flagStolen = _data select 9;
|
||||
_flagStolenBy = _data select 10;
|
||||
_lastPayed = _data select 11;
|
||||
_buildRights = _data select 12;
|
||||
_moderators = _data select 13;
|
||||
_flagObject = createVehicle ["Exile_Construction_Flag_Static",_position, [], 0, "CAN_COLLIDE"];
|
||||
if (_flagStolen isEqualTo 0) then
|
||||
{
|
||||
_flagObject setFlagTexture _flagTexture;
|
||||
};
|
||||
ExileLocations pushBack _flagObject;
|
||||
_flagObject setVariable ["ExileTerritoryName", _name, true];
|
||||
_flagObject setVariable ["ExileDatabaseID", _id];
|
||||
_flagObject setVariable ["ExileOwnerUID", _owner, true];
|
||||
_flagObject setVariable ["ExileTerritorySize", _radius, true];
|
||||
_flagObject setVariable ["ExileTerritoryBuildRights", _buildRights, true];
|
||||
_flagObject setVariable ["ExileTerritoryModerators", _moderators, true];
|
||||
_flagObject setVariable ["ExileTerritoryLevel", _level, true];
|
||||
_flagObject setVariable ["ExileTerritoryLastPayed", _lastPayed];
|
||||
_flagObject call ExileServer_system_territory_maintenance_recalculateDueDate;
|
||||
_flagObject setVariable ["ExileTerritoryNumberOfConstructions", _data select 15, true];
|
||||
_flagObject setVariable ["ExileRadiusShown", false, true];
|
||||
_flagObject setVariable ["ExileFlagStolen",_flagStolen,true];
|
||||
_flagObject setVariable ["ExileFlagTexture",_flagTexture];
|
||||
|
||||
////////////////////////
|
||||
///// ExAd START /////
|
||||
////////////////////////
|
||||
_vehicles = format ["loadTerritoryVehicles:%1", _territoryID] call ExileServer_system_database_query_selectFull;
|
||||
_flagObject setVariable ["ExAdVGVeh", _vehicles, true];
|
||||
////////////////////////
|
||||
///// ExAd END /////
|
||||
////////////////////////
|
||||
|
||||
true
|
@ -1,31 +0,0 @@
|
||||
/*
|
||||
fn_allowVGStore.sqf
|
||||
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
private ["_res","_flag","_cmon1","_cmon2"];
|
||||
|
||||
_cmon1 = if (ExileClientPlayerIsInCombat && ExAd_STOP_COMBAT_STORING)exitWith{["ErrorTitleAndText", ["ExAd - Virtual Garage", "You cannot store Vehicles While in Combat!"]] call ExileClient_gui_toaster_addTemplateToast;};
|
||||
|
||||
_cmon2 = if (isNil "ExAdCurFlagNetId")exitWith{diag_log "ExAdClient: allowVGStore - ExAdCurFlagNetId is nil";false};
|
||||
|
||||
_flag = objectFromNetId ExAdCurFlagNetId;
|
||||
|
||||
_allowedVeh = _flag call ExAd_fnc_allowedVGVeh;
|
||||
_storedVeh = count (_flag getVariable ["ExAdVGVeh", []]);
|
||||
|
||||
_res = if(_allowedVeh > _storedVeh)then{true}else{false};
|
||||
|
||||
_res
|
@ -1,22 +0,0 @@
|
||||
/*
|
||||
fn_allowedVGVeh.sqf
|
||||
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
params ["_flag"];
|
||||
|
||||
_res = ExAd_VG_MIN_ALLOWED_VEH + round(ExAd_VG_ALLOWED_VEH_MULTIPLE_FACTOR * (_flag getVariable ["ExileTerritoryLevel", 1]));
|
||||
|
||||
_res
|
@ -1,38 +0,0 @@
|
||||
/*
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
*/
|
||||
|
||||
private ["_list","_idc","_vehClass","_data","_name","_index","_pic"];
|
||||
|
||||
_list = _this select 0;
|
||||
_idc = _this select 1;
|
||||
|
||||
lbClear _idc;
|
||||
|
||||
{
|
||||
_vehClass = if(typeName _x isEqualTo "ARRAY")then{_x select 1}else{typeOf _x};
|
||||
_data = if(typeName _x isEqualTo "ARRAY")then{format["%1",_x select 0]}else{netId _x};
|
||||
|
||||
_name = getText(configFile >> "CfgVehicles" >> _vehClass >> "displayName");
|
||||
_index = lbAdd[_idc,_name];
|
||||
_pic = getText(configFile >> "CfgVehicles" >> _vehClass >> "picture");
|
||||
lbSetPicture [_idc, _index, _pic];
|
||||
lbSetPictureColor [_idc, _index, [1,1,1,1]];
|
||||
lbSetData [_idc, _index, _data];
|
||||
lbSetTooltip [_idc, _index, _vehClass];
|
||||
}forEach _list;
|
||||
|
||||
true
|
@ -1,44 +0,0 @@
|
||||
/*
|
||||
fn_loadVGContent.sqf
|
||||
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
private ["_display","_error","_slides","_flag","_allowedVeh","_storedVeh","_strTxtVehCntColor","_strTxtVehCnt"];
|
||||
|
||||
_display = uiNameSpace getVariable ["RscExileXM8", displayNull];
|
||||
if (isNull _display) exitWith {_error = "Error loading XM8 VG app, display is null"; systemChat _error; diag_log _error;};
|
||||
|
||||
_slides = _display displayCtrl 4007;
|
||||
if (isNull _slides) exitWith {_error = "Error loading XM8 VG app, slides control is null"; systemChat _error; diag_log _error;};
|
||||
|
||||
_flag = if(typeName ExAdCurFlagNetId == "STRING")then{objectFromNetId ExAdCurFlagNetId}else{ExAdCurFlagNetId};
|
||||
|
||||
_allowedVeh = _flag call ExAd_fnc_allowedVGVeh;
|
||||
_storedVeh = count (_flag getVariable ["ExAdVGVeh", []]);
|
||||
_strTxtVehCntColor = if(_allowedVeh > _storedVeh)then{"#FFFFFF"}else{"#B22400"};
|
||||
|
||||
_strTxtVehCnt = [_display,"ExAd_VG","SubTitle1Cnt"] call ExAd_fnc_getAppCtrl;
|
||||
_strTxtVehCnt ctrlSetStructuredText parseText format ["<t size='1' align='right' color='%1'>%2/%3</t>",_strTxtVehCntColor,_storedVeh,_allowedVeh];
|
||||
|
||||
[(objectFromNetId ExAdCurFlagNetId) getVariable ["ExAdVGVeh", []],ctrlIDC ([_display,"ExAd_VG","StoreVehList"] call ExAd_fnc_getAppCtrl)] call ExAd_fnc_fillVGList;
|
||||
for "_i" from 0 to 3 do {
|
||||
_index = lbAdd[ctrlIDC ([_display,"ExAd_VG","StoreVehList"] call ExAd_fnc_getAppCtrl),""];
|
||||
};
|
||||
|
||||
[[_flag, ExAd_VG_ALLOWED_VEH_TYPE,_flag getVariable ["ExileTerritorySize", 50]] call ExAd_fnc_getNearByLocalVeh,ctrlIDC ([_display,"ExAd_VG","NearVehicleList"] call ExAd_fnc_getAppCtrl)] call ExAd_fnc_fillVGList;
|
||||
|
||||
([_display,"ExAd_VG","InfoCB"] call ExAd_fnc_getAppCtrl) cbSetChecked ((profileNamespace getVariable["ExAd_StreamFriendlyUI",0]) == 1);
|
||||
|
||||
true
|
@ -1,27 +0,0 @@
|
||||
/*
|
||||
fn_loadVGDetailView.sqf
|
||||
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
params ["_text","_idc"];
|
||||
disableSerialization;
|
||||
|
||||
_display = uiNameSpace getVariable ["RscExileXM8", displayNull];
|
||||
|
||||
if(isNull _display)exitWith{false};
|
||||
|
||||
(_display displayCtrl _idc) ctrlSetStructuredText parseText _text;
|
||||
|
||||
true
|
@ -1,40 +0,0 @@
|
||||
/*
|
||||
fn_onBtnClickVG.sqf
|
||||
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
private ["_fnc","_idc","_data"];
|
||||
|
||||
_fnc = [_this,0,nil] call BIS_fnc_param;
|
||||
_idc = [_this,1,nil] call BIS_fnc_param;
|
||||
|
||||
if(isNil "ExAdCurFlagNetId" || isNil "_fnc" || isNil "_idc")exitWith{
|
||||
disableUserInput false;
|
||||
["extraApps", 1] call ExileClient_gui_xm8_slide;
|
||||
false
|
||||
};
|
||||
|
||||
_data = lbData [_idc, lbCurSel _idc];
|
||||
|
||||
if(count _data == 0)then{
|
||||
["ErrorTitleAndText", ["ExAd - Virtual Garage", "You have to choose a vehicle in the proper list!!"]] call ExileClient_gui_toaster_addTemplateToast;
|
||||
}else{
|
||||
[_fnc, [_data, ExAdCurFlagNetId, netId player]] call ExAd_fnc_serverDispatch;
|
||||
closeDialog 0;
|
||||
};
|
||||
disableUserInput false;
|
||||
|
||||
true
|
@ -1,35 +0,0 @@
|
||||
/*
|
||||
customize.sqf
|
||||
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
ExAd_VG_MIN_ALLOWED_VEH = 5; //SCALAR - Minimun allowed vehicles in the virtual garage.
|
||||
|
||||
ExAd_VG_ALLOWED_VEH_MULTIPLE_FACTOR = 3;//SCALAR - How many extra vehicle slots for each territory level.
|
||||
|
||||
ExAd_VG_ACCESS_LEVEL = 1; //SCALAR - Lowest level that can access the Virtual Garage --> 1|2|3 -> Pleb|Moderator|Owner.
|
||||
|
||||
ExAd_VG_CLEAN_ON_STORE = true; //BOOLEAN - If vehicle inventory should reset when stored.
|
||||
|
||||
ExAd_VG_SHOW_ADVHINT = false; //BOOLEAN - If the virtual garage should display an Advanced hint upon store and fetch.
|
||||
|
||||
ExAd_STOP_COMBAT_STORING = true; //BOOLEAN - If set to true players cannot store vehicles while they are in combat. Prevents combat storing.
|
||||
|
||||
ExAd_VG_GIVE_GM = false; //BOOLEAN - If set to true, vehicles spawned from the VG will have Godmode enabled on them.
|
||||
|
||||
ExAd_VG_GM_TIME = 20; //SCALAR - Time for vehicles to have Godmode enabled in seconds (Will be ingored if ExAd_VG_GIVE_GODMODE = false)
|
||||
|
||||
ExAd_VG_ALLOWED_VEH_TYPE = ["Car","Tank","Plane","Air","Ship","Submarine"];//ARRAY - Array with allowed vehicle types for the virtual garage. | "Car", "Tank", "Helicopter", "Plane" or "Air" for both WARNING DON'T USE "LandVehicle" Can crash the Exile system.
|
@ -1,44 +0,0 @@
|
||||
/*
|
||||
postInit.sqf
|
||||
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
*/
|
||||
|
||||
_path = "ExAdClient\VirtualGarage\customize.sqf";
|
||||
call compile preprocessFileLineNumbers _path;
|
||||
|
||||
if(isNil "ExAd_VG_MIN_ALLOWED_VEH")then{ExAd_VG_MIN_ALLOWED_VEH = 5;};
|
||||
if(isNil "ExAd_VG_ALLOWED_VEH_MULTIPLE_FACTOR")then{ExAd_VG_ALLOWED_VEH_MULTIPLE_FACTOR = 3;};
|
||||
if(isNil "ExAd_VG_ACCESS_LEVEL")then{ExAd_VG_ACCESS_LEVEL = 1;};
|
||||
if(isNil "ExAd_VG_CLEAN_ON_STORE")then{ExAd_VG_CLEAN_ON_STORE = true;};
|
||||
if(isNil "ExAd_VG_SHOW_ADVHINT")then{ExAd_VG_SHOW_ADVHINT = false;};
|
||||
if(isNil "ExAd_STOP_COMBAT_STORING")then{ExAd_STOP_COMBAT_STORING = true;};
|
||||
if(isNil "ExAd_VG_GIVE_GM")then{ExAd_VG_GIVE_GM = false;};
|
||||
if(isNil "ExAd_VG_GM_TIME")then{ExAd_VG_GM_TIME = 20;};
|
||||
if(isNil "ExAd_VG_ALLOWED_VEH_TYPE")then{ExAd_VG_ALLOWED_VEH_TYPE = ["Car","Tank","Plane","Air","Ship","Submarine"];};
|
||||
|
||||
["STR_ExAd_VG_NOTI_FULL", "The garage is full"] call ExAd_fnc_localize;
|
||||
["STR_ExAd_VG_NOTI_NOT_PERSISTENT", "You can only store pincode protected vehicles into the garage!"] call ExAd_fnc_localize;
|
||||
["STR_ExAd_VG_NOTI_NOT_AVAILABLE", "The vehicle is not available anymore!"] call ExAd_fnc_localize;
|
||||
|
||||
["STR_ExAd_VG_APP_DETAILS", "%2 %1Pin code: %3 %1Fuel: %4 %1Damage: %5 %1Texture: %6 %1Items: %7 %1Magazines: %8 %1Weapons: %9"] call ExAd_fnc_localize;
|
||||
["STR_ExAd_VG_APP_BTN_BACK", "Go Back"] call ExAd_fnc_localize;
|
||||
["STR_ExAd_VG_APP_BTN_FETCH", "Fetch"] call ExAd_fnc_localize;
|
||||
["STR_ExAd_VG_APP_BTN_STORE", "Store"] call ExAd_fnc_localize;
|
||||
["STR_ExAd_VG_APP_TTL_STORED", "Stored"] call ExAd_fnc_localize;
|
||||
["STR_ExAd_VG_APP_TTL_DETAILS", "Stored Vehicle Details"] call ExAd_fnc_localize;
|
||||
["STR_ExAd_VG_APP_TTL_NEAR", "In Radius"] call ExAd_fnc_localize;
|
||||
["STR_ExAd_VG_APP_CB_SECRET", "Stream friendly UI"] call ExAd_fnc_localize;
|
@ -1,16 +1,7 @@
|
||||
class CfgXM8
|
||||
{
|
||||
extraApps[] = {"ExAd_VG","ExAd_Info","ExAd_CHVD","ExAd_Journal","ExAd_Bike","ExAd_Quad","ExAd_SB"};
|
||||
|
||||
class ExAd_VG
|
||||
{
|
||||
title = "Virtual Garage";
|
||||
controlID = 50000; //IDC:50000 -> 50015 || These need to be unique and out of range from each other
|
||||
logo = "ExadClient\XM8\Apps\VG\Icon_VG.paa";
|
||||
onLoad = "ExAdClient\XM8\Apps\VG\onLoad.sqf";
|
||||
onOpen = "ExAdClient\XM8\Apps\VG\onOpen.sqf";
|
||||
onClose = "ExAdClient\XM8\Apps\VG\onClose.sqf";
|
||||
};
|
||||
extraApps[] = {"ExAd_Info","ExAd_CHVD","ExAd_Journal","ExAd_Bike","ExAd_Quad","ExAd_SB"};
|
||||
|
||||
class ExAd_Info
|
||||
{
|
||||
title = "Server Info";
|
||||
@ -73,9 +64,9 @@ class CfgXM8
|
||||
|
||||
class CfgExileCustomCode
|
||||
{
|
||||
ExileServer_system_territory_database_load = "ExAdClient\VirtualGarage\CustomCode\ExileServer_system_territory_database_load.sqf";
|
||||
ExileClient_gui_xm8_slide = "ExAdClient\XM8\CustomCode\ExileClient_gui_xm8_slide.sqf";
|
||||
ExileClient_gui_xm8_show = "ExAdClient\XM8\CustomCode\ExileClient_gui_xm8_show.sqf";
|
||||
//ExileServer_system_territory_database_load = "ExAdClient\VirtualGarage\CustomCode\ExileServer_system_territory_database_load.sqf";
|
||||
//ExileClient_gui_xm8_slide = "ExAdClient\XM8\CustomCode\ExileClient_gui_xm8_slide.sqf";
|
||||
//ExileClient_gui_xm8_show = "ExAdClient\XM8\CustomCode\ExileClient_gui_xm8_show.sqf";
|
||||
};
|
||||
|
||||
class CfgInteractionMenus
|
||||
@ -93,6 +84,12 @@ class CfgInteractionMenus
|
||||
condition = "call ExAd_XM8_DV_fnc_canPack";
|
||||
action = "call ExAd_XM8_DV_fnc_pack";
|
||||
};
|
||||
class ExAdSalvage: ExileAbstractAction
|
||||
{
|
||||
title = "<t color='#ff0000'>ExAd Salvage Aircraft</t>";
|
||||
condition = "(!(alive (ExileClientInteractionObject)))";
|
||||
action = "_this call ExAd_fnc_vehicleSalvage";
|
||||
};
|
||||
};
|
||||
};
|
||||
class Bikes
|
||||
@ -110,20 +107,6 @@ class CfgInteractionMenus
|
||||
};
|
||||
};
|
||||
};
|
||||
class Flag
|
||||
{
|
||||
targetType = 2;
|
||||
target = "Exile_Construction_Flag_Static";
|
||||
class Actions
|
||||
{
|
||||
class HackVG : ExileAbstractAction
|
||||
{
|
||||
title = "Hack Virtual Garage";
|
||||
condition = "call ExAd_fnc_canHackVG";
|
||||
action = "_this spawn ExAd_fnc_startHack";
|
||||
};
|
||||
};
|
||||
};
|
||||
class Construction
|
||||
{
|
||||
targetType = 2;
|
||||
|
@ -10,11 +10,6 @@ class RscTitles
|
||||
#include "ExAdClient\RscTitles.cpp"
|
||||
};
|
||||
|
||||
class CfgHints
|
||||
{
|
||||
#include "ExAdClient\CfgHints.cpp"
|
||||
};
|
||||
|
||||
class CfgNetworkMessages
|
||||
{
|
||||
#include "ExAdClient\CfgNetworkMessages.cpp"
|
||||
|
@ -18,102 +18,6 @@
|
||||
</Key>
|
||||
</Container>
|
||||
</Package>
|
||||
<Package name="VirtualGarage">
|
||||
<Container name="Notifications">
|
||||
<Key ID="STR_ExAd_VG_NOTI_FULL">
|
||||
<Original>You garage is full!</Original>
|
||||
</Key>
|
||||
<Key ID="STR_ExAd_VG_NOTI_NOT_PERSISTENT">
|
||||
<Original>You can only store pincode protected vehicles into the garage!</Original>
|
||||
</Key>
|
||||
<Key ID="STR_ExAd_VG_NOTI_NOT_AVAILABLE">
|
||||
<Original>The vehicle is not available anymore!</Original>
|
||||
</Key>
|
||||
</Container>
|
||||
<Container name="APP">
|
||||
<Key ID="STR_ExAd_VG_APP_DETAILS">
|
||||
<Original>%2 %1Pin code: %3 %1Fuel: %4 %1Damage: %5 %1Texture: %6 %1Items: %7 %1Magazines: %8 %1Weapons: %9</Original> <!-- %1 - New line | %2 - Vehicle class display name | %3 - Pin Code | %4 - Fuel | %5 - Damage | %6 - Texture | %7 - Items | %8 - Magazines | %9 - Weapons -->
|
||||
</Key>
|
||||
<Key ID="STR_ExAd_VG_APP_BTN_BACK">
|
||||
<Original>GO BACK</Original>
|
||||
</Key>
|
||||
<Key ID="STR_ExAd_VG_APP_BTN_FETCH">
|
||||
<Original>Fetch</Original>
|
||||
</Key>
|
||||
<Key ID="STR_ExAd_VG_APP_BTN_STORE">
|
||||
<Original>Store</Original>
|
||||
</Key>
|
||||
<Key ID="STR_ExAd_VG_APP_TTL_DETAILS">
|
||||
<Original>Stored Vehicle Details</Original>
|
||||
</Key>
|
||||
<Key ID="STR_ExAd_VG_APP_TTL_STORED">
|
||||
<Original>Stored</Original>
|
||||
</Key>
|
||||
<Key ID="STR_ExAd_VG_APP_TTL_NEAR">
|
||||
<Original>In Radius</Original>
|
||||
</Key>
|
||||
<Key ID="STR_ExAd_VG_APP_CB_SECRET">
|
||||
<Original>Stream friendly UI</Original>
|
||||
</Key>
|
||||
</Container>
|
||||
</Package>
|
||||
<Package name="Grinding">
|
||||
<Container name="Notifications">
|
||||
<Key ID="STR_ExAd_GRINDING_NOTI_BROKE">
|
||||
<Original>Your grinder broke, get a new one before you can continue.</Original>
|
||||
</Key>
|
||||
<Key ID="STR_ExAd_GRINDING_NOTI_EMPTY_BAT">
|
||||
<Original>Find some batteries to get the grinder to work.</Original>
|
||||
</Key>
|
||||
<Key ID="STR_ExAd_GRINDING_NOTI_PROGRESS">
|
||||
<Original>I think I'm getting through.</Original>
|
||||
</Key>
|
||||
<Key ID="STR_ExAd_GRINDING_NOTI_FINISHED">
|
||||
<Original>You have broken the code lock.</Original>
|
||||
</Key>
|
||||
<Key ID="STR_ExAd_GRINDING_NOTI_RESTORED">
|
||||
<Original>You've changed the look</Original>
|
||||
</Key>
|
||||
</Container>
|
||||
<Package name="Hacking">
|
||||
<Container name="Notifications">
|
||||
<Key ID="STR_ExAd_HACKING_NOTI_MAX_TERRITORY_HACKS_REACHED">
|
||||
<Original>Connection failed! Territory Wi-Fi is down!</Original>
|
||||
</Key>
|
||||
<Key ID="STR_ExAd_HACKING_NOTI_TERRITORY_ONE_HACK">
|
||||
<Original>Wi-Fi occupied!!</Original>
|
||||
</Key>
|
||||
<Key ID="STR_ExAd_HACKING_NOTI_MAX_SIM_HACKS">
|
||||
<Original>The laptop overloaded and got destroyed! Another hacker is already using the grid.</Original>
|
||||
</Key>
|
||||
<Key ID="STR_ExAd_HACKING_NOTI_NO_PLAYER_PRESENT">
|
||||
<Original>No Wi-Fi available!</Original>
|
||||
</Key>
|
||||
<Key ID="STR_ExAd_HACKING_NOTI_VG_SUCCESS">
|
||||
<Original>Hack successful! The Virtual Garage unloaded a %1</Original> <!-- %1 indicates the vehicle class name that's going to be shown-->
|
||||
</Key>
|
||||
<Key ID="STR_ExAd_HACKING_NOTI_VG_NO_VEH">
|
||||
<Original>Hack successful! No vehicles were stored in the Virtual Garage.</Original>
|
||||
</Key>
|
||||
<Key ID="STR_ExAd_HACKING_NOTI_SAFE_SUCCESS">
|
||||
<Original>Hack successful! The safe is now unlocked.</Original>
|
||||
</Key>
|
||||
<Key ID="STR_ExAd_HACKING_NOTI_INTERUPTED">
|
||||
<Original>Hack has been interupted</Original>
|
||||
</Key>
|
||||
<Key ID="STR_ExAd_HACKING_NOTI_FAILED">
|
||||
<Original>Hack failed! Circuits overloaded!</Original>
|
||||
</Key>
|
||||
</Container>
|
||||
<Container name="Hint">
|
||||
<Key ID="STR_ExAd_HACKING_HINT_TITLE">
|
||||
<Original>Hack Activity</Original>
|
||||
</Key>
|
||||
<Key ID="STR_ExAd_HACKING_HINT_HACK_START">
|
||||
<Original>Someone is hacking another person's base!</Original>
|
||||
</Key>
|
||||
</Container>
|
||||
</Package>
|
||||
<Package name="StatsBar">
|
||||
<Container name="App">
|
||||
<Key ID="STR_ExAd_SB_APP_GO_BACK">
|
||||
|
Loading…
Reference in New Issue
Block a user