From 21e4ff401652850f93e9e320968b9f016969c2f0 Mon Sep 17 00:00:00 2001 From: Ghostrider-DbD- Date: Sat, 3 Jun 2017 16:35:00 -0400 Subject: [PATCH 1/7] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 38cca4a..473a0cd 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ Blckegls mission system Ver 6.58 -Build 59 +Build 60 Included is an updated version of blckeagls mission system. This began as an effort to fix bugs in and upgrade version 2.0.2 as updated by Narines and has now evolved to a complete reworking of almost all code. From 4f4c65e32c275ad9dc78eb502a4b28a372947ab3 Mon Sep 17 00:00:00 2001 From: Ghostrider-DbD- Date: Sat, 3 Jun 2017 16:36:07 -0400 Subject: [PATCH 2/7] Update changeLog.sqf --- changeLog.sqf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/changeLog.sqf b/changeLog.sqf index 6c37419..4d774af 100644 --- a/changeLog.sqf +++ b/changeLog.sqf @@ -4,6 +4,11 @@ Loosely based on the AI mission system by blckeagls ver 2.0.2 Contributions by Narines: bug fixes, testing, infinite ammo fix. Ideas or code from that by Vampire and KiloSwiss have been used for certain functions. +6/1/17 Version 6.59 Build 60 +[changed] Players are no longer given crypto for each AI kill. Crypto added to AI Bodies was increased. +[fixed] error in GMS_fnc_setupWaypoints wherein _arc was not defined early enough in the script. +[fixed] Exile Respect Loss bug (temporary fix only). + 5/21/17 Version 6.58 build 58 [Fixed] typos for blck_epochValuables. [Fixed] All loot was removed from AI vehicles at the time a mission was completed. From 908e3cc4d4a0cbad7f108650358867bd133307a9 Mon Sep 17 00:00:00 2001 From: Ghostrider-DbD- Date: Sat, 3 Jun 2017 16:36:39 -0400 Subject: [PATCH 3/7] Update build.sqf --- @epochhive/addons/custom_server/init/build.sqf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/@epochhive/addons/custom_server/init/build.sqf b/@epochhive/addons/custom_server/init/build.sqf index 1c52a49..af85147 100644 --- a/@epochhive/addons/custom_server/init/build.sqf +++ b/@epochhive/addons/custom_server/init/build.sqf @@ -1,3 +1,3 @@ private ["_version","_versionDate"]; -_blck_version = "6.58 Build 58"; -_blck_versionDate = "4-30-17 8:00 PM"; +_blck_version = "6.58 Build 60"; +_blck_versionDate = "6-3-17 5:00 PM"; From e7104cf0d1a3f709dc4e726c7bf3121bc1695bd0 Mon Sep 17 00:00:00 2001 From: Ghostrider-DbD- Date: Sun, 4 Jun 2017 09:28:55 -0400 Subject: [PATCH 4/7] Update GMS_fnc_setupWaypoints.sqf Moved definition of _arc to an appropriate location. --- .../custom_server/Compiles/Groups/GMS_fnc_setupWaypoints.sqf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/@epochhive/addons/custom_server/Compiles/Groups/GMS_fnc_setupWaypoints.sqf b/@epochhive/addons/custom_server/Compiles/Groups/GMS_fnc_setupWaypoints.sqf index b646aa2..d1cc454 100644 --- a/@epochhive/addons/custom_server/Compiles/Groups/GMS_fnc_setupWaypoints.sqf +++ b/@epochhive/addons/custom_server/Compiles/Groups/GMS_fnc_setupWaypoints.sqf @@ -3,7 +3,7 @@ for DBD Clan By Ghostrider-DBD- Copyright 2016 - Last modified 4/29/17 + Last modified 6/1/17 -------------------------- License @@ -43,6 +43,7 @@ if (_soldierType isEqualTo "emplaced") then }; if !(_soldierType isEqualTo "emplaced") then { + _arc = 360/5; _group setcombatmode "YELLOW"; _group setBehaviour "COMBAT"; _group setVariable["patrolCenter",_pos]; @@ -56,7 +57,7 @@ if !(_soldierType isEqualTo "emplaced") then _group setVariable["wpArc",_arc]; _group setVariable["soldierType",_soldierType]; _dir = 0; - _arc = 360/5; + _wpradius = 30; _dis = (_minDis) + random( (_maxDis) - (_minDis) ); _newPos = _pos getPos[_dis,_dir]; From 27e31c5f48de04fd303db74a4ef045b252c1406b Mon Sep 17 00:00:00 2001 From: Ghostrider-DbD- Date: Sun, 4 Jun 2017 09:30:45 -0400 Subject: [PATCH 5/7] Update GMS_fnc_processAIKill.sqf Moved code to remove event handlers so that this is done for both legal and illegal kills. --- .../Compiles/Units/GMS_fnc_processAIKill.sqf | 20 ++++++------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/@epochhive/addons/custom_server/Compiles/Units/GMS_fnc_processAIKill.sqf b/@epochhive/addons/custom_server/Compiles/Units/GMS_fnc_processAIKill.sqf index 0febd8b..a8a9cde 100644 --- a/@epochhive/addons/custom_server/Compiles/Units/GMS_fnc_processAIKill.sqf +++ b/@epochhive/addons/custom_server/Compiles/Units/GMS_fnc_processAIKill.sqf @@ -1,6 +1,6 @@ /* Handle AI Deaths - Last Modified 3/23/17 + Last Modified 5/31/17 By Ghostrider-DBD- Copyright 2016 -------------------------- @@ -17,14 +17,6 @@ params["_unit","_killer","_isLegal"]; _unit setVariable ["blck_cleanupAt", (diag_tickTime) + blck_bodyCleanUpTimer, true]; -/* -if (vehicle _unit != _unit) then { - if (count crew (vehicle _unit) isEqualTo 0) then - { - [vehicle _unit] call blck_fnc_releaseVehicleToPlayers; - }; -};*/ - blck_deadAI pushback _unit; _group = group _unit; [_unit] joinSilent grpNull; @@ -35,11 +27,13 @@ if !(isPlayer _killer) exitWith {}; //[_unit,_killer] call blck_fnc_alertNearbyUnits; [_unit,_killer] call blck_fnc_alertNearbyLeader; _group = group _unit; -//_group setBehavior "COMBAT"; _wp = [_group, currentWaypoint _group]; _wp setWaypointBehaviour "COMBAT"; _group setCombatMode "RED"; _wp setWaypointCombatMode "RED"; +{ + _unit removeAllEventHandlers _x; +}forEach ["Killed","Fired","HandleDamage","HandleHeal","FiredNear","Hit"]; _isLegal = [_unit,_killer] call blck_fnc_processIlleagalAIKills; @@ -70,8 +64,6 @@ if (blck_useKillMessages) then //diag_log format["[blck] unit killed message is %1",_message,""]; [["aikilled",_message,"victory"],playableUnits] call blck_fnc_messageplayers; }; -[_unit,_killer,_kills] call blck_fnc_rewardKiller; -{ - _unit removeAllEventHandlers _x; -}forEach ["Killed","Fired","HandleDamage","HandleHeal","FiredNear","Hit"] +[_unit,_killer] call blck_fnc_rewardKiller; + From e8b863a8f5239f31c2348a62418fe82494a19034 Mon Sep 17 00:00:00 2001 From: Ghostrider-DbD- Date: Sun, 4 Jun 2017 09:31:44 -0400 Subject: [PATCH 6/7] Update GMS_fnc_processIlleagalAIKills.sqf Cleaned up code a bit. --- .../Compiles/Units/GMS_fnc_processIlleagalAIKills.sqf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/@epochhive/addons/custom_server/Compiles/Units/GMS_fnc_processIlleagalAIKills.sqf b/@epochhive/addons/custom_server/Compiles/Units/GMS_fnc_processIlleagalAIKills.sqf index e8fcf9f..6a2ab40 100644 --- a/@epochhive/addons/custom_server/Compiles/Units/GMS_fnc_processIlleagalAIKills.sqf +++ b/@epochhive/addons/custom_server/Compiles/Units/GMS_fnc_processIlleagalAIKills.sqf @@ -1,6 +1,6 @@ /* by Ghostrider - 4-12-17 + 6-1-17 -------------------------- License -------------------------- @@ -12,13 +12,13 @@ private["_missionType","_wasRunover","_launcher","_legal"]; params["_unit","_killer"]; -//diag_log format["##-processIlleagalAIKills.sqf-## processing illeagal kills for unit %1",_unit]; +diag_log format["##-processIlleagalAIKills.sqf-## processing illeagal kills for unit %1",_unit]; _launcher = _unit getVariable ["Launcher",""]; _legal = true; _fn_targetVehicle = { // force AI to fire on the vehicle with launchers if equiped params["_unit","_vk"]; - private + private["_unit"]; { if ( ( (getPos _vk) distance2d (getPos _x) ) < 500 ) then { From af1c80696bef0c8aabcc39416f0ae272ab8a7966 Mon Sep 17 00:00:00 2001 From: Ghostrider-DbD- Date: Sun, 4 Jun 2017 09:34:57 -0400 Subject: [PATCH 7/7] Update GMS_fnc_rewardKiller.sqf Put in fix for respect loss bug on Exile servers. This is a temporary fix to deal with the fact that (vehicle _killer) and (objectParent _killer) seem to be broken, and because for some reason, the server can not read certain variables for the _killer object when the _killer is in a vehicle. --- .../Compiles/Units/GMS_fnc_rewardKiller.sqf | 89 +++++++++++++------ 1 file changed, 62 insertions(+), 27 deletions(-) diff --git a/@epochhive/addons/custom_server/Compiles/Units/GMS_fnc_rewardKiller.sqf b/@epochhive/addons/custom_server/Compiles/Units/GMS_fnc_rewardKiller.sqf index 2d53cdc..69c52a3 100644 --- a/@epochhive/addons/custom_server/Compiles/Units/GMS_fnc_rewardKiller.sqf +++ b/@epochhive/addons/custom_server/Compiles/Units/GMS_fnc_rewardKiller.sqf @@ -1,9 +1,9 @@ /* - calculate a reward player for AI Kills in crypto. + calculate a reward player for AI Kills Code fragment adapted from VEMF call as [_unit,_killer] call blck_fnc_rewardKiller; - Last modified 1/22/17 + Last modified 6/3/17 -------------------------- License -------------------------- @@ -13,14 +13,15 @@ */ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; -params["_unit","_killer","_kills"]; +params["_unit","_killer"]; //diag_log format["rewardKiller:: _unit = %1 and _killer %2",_unit,_killer]; private["_modType","_reward","_maxReward","_dist","_killstreakReward","_distanceBonus","_newKillerScore","_newKillerFrags","_money"]; _modType = call blck_fnc_getModType; -//diag_log format["[blckeagles] rewardKiller:: - _modType = %1",_modType]; - +diag_log format["[blckeagles] rewardKiller:: - _modType = %1",_modType]; +if (_modType isEqualTo "Epoch") exitWith {}; // Have players pull crypto from AI bodies now that this feature is available. +/* if (_modType isEqualTo "Epoch") then { //diag_log "calculating reward for Epoch"; @@ -53,33 +54,67 @@ if (_modType isEqualTo "Epoch") then }; }; }; +*/ +/* +_player setVariable ["ExileHunger", _data select 4]; +_player setVariable ["ExileThirst", _data select 5]; +_player setVariable ["ExileAlcohol", _data select 6]; +_player setVariable ["ExileTemperature", _data select 44]; +_player setVariable ["ExileWetness", _data select 45]; +*/ if (_modType isEqualTo "Exile") then { private["_distanceBonus","_overallRespectChange","_newKillerScore","_newKillerFrags","_maxReward","_money","_message"]; - _distanceBonus = floor((_unit distance _killer)/100); - - _overallRespectChange = 50 + _distanceBonus; - _newKillerScore = _killer getVariable ["ExileScore", 0]; - _newKillerScore = _newKillerScore + (_overallRespectChange/2); - _killer setVariable ["ExileScore", _newKillerScore]; - format["setAccountScore:%1:%2", _newKillerScore,getPlayerUID _killer] call ExileServer_system_database_query_fireAndForget; - _newKillerFrags = _killer getVariable ["ExileKills", 0]; - _newKillerFrags = _newKillerFrags + 1; - _killer setVariable ["ExileKills", _newKillerFrags]; - format["addAccountKill:%1", getPlayerUID _killer] call ExileServer_system_database_query_fireAndForget; - if (blck_addAIMoney) then + /* + // Temporary fix for the Loss of Respect Bug. + diag_log format["GMS_fnc_rewardKiller.sqf:: _killer name = %2 | ExileScore = %1 | Kills %3",_killer getVariable [ "ExileScore", 0 ], name _killer, _killer getVariable["ExileKills",0]]; + diag_log format["GMS_fnc_rewardKiller.sqf:: _killer = %1 | vehicle _killer = %2 | objectParent _killer %3",_killer, vehicle _killer, objectParent _killer]; + diag_log format["GMS_fnc_rewardKiller.sqf:: _killer is gunner = %1 | killer is driver = %2",_killer isEqualTo gunner objectParent _killer,_killer isEqualTo driver objectParent _killer]; + diag_log format["GMS_fnc_rewardKiller.sqf:: _killer ExileOwnerUID = %1 ",_killer getVariable["ExileOwnerUID",0]]; // ExileOwnerUID + diag_log format["GMS_fnc_rewardKiller.sqf:: _killer ExileHunger = %1 ",_killer getVariable["ExileHunger",0]]; // ExileOwnerUID + diag_log format["GMS_fnc_rewardKiller.sqf:: _killer ExileThirst = %1 ",_killer getVariable["ExileThirst",0]]; // ExileOwnerUID + diag_log format["GMS_fnc_rewardKiller.sqf:: _killer ExileAlcohol = %1 ",_killer getVariable["ExileAlcohol",0]]; // ExileOwnerUID + diag_log format["GMS_fnc_rewardKiller.sqf:: _killer ExileWetness = %1 ",_killer getVariable["ExileWetness",0]]; // ExileOwnerUID + */ + if ( (isPlayer _killer) && (_killer getVariable["ExileHunger",0] > 0) && (_killer getVariable["ExileThirst",0] > 0) ) then { - _money = _killer getVariable ["ExileMoney", 0]; - _money = _money + (_overallRespectChange/2) + (_kills * 2); - _killer setVariable ["ExileMoney", _money]; - format["setAccountMoney:%1:%2", _money, (getPlayerUID _killer)] call ExileServer_system_database_query_fireAndForget; - }; - //_message = ["showFragRequest",_overallRespectChange]; - _killer call ExileServer_object_player_sendStatsUpdate; - if (blck_useKillScoreMessage) then - { - [["showScore",[50,_distanceBonus,_kills]], [_killer]] call blck_fnc_messageplayers; + _distanceBonus = floor((_unit distance _killer)/100); + _killstreakBonus = 3 * (_killer getVariable["blck_kills",0]); + _respectGained = 25 + _distanceBonus + _killstreakBonus; + _score = _killer getVariable ["ExileScore", 0]; + diag_log format["GMS_fnc_rewardKiller.sqf:: ExileScore = %1",_killer getVariable ["ExileScore", 0]]; + _score = _score + (_respectGained); + diag_log format["GMS_fnc_rewardKiller.sqf:: _new = %1",_score]; + _killer setVariable ["ExileScore", _score]; + format["setAccountScore:%1:%2", _score,getPlayerUID _killer] call ExileServer_system_database_query_fireAndForget; + _newKillerFrags = _killer getVariable ["ExileKills", 0]; + _newKillerFrags = _newKillerFrags + 1; + _killer setVariable ["ExileKills", _newKillerFrags]; + format["addAccountKill:%1", getPlayerUID _killer] call ExileServer_system_database_query_fireAndForget; + //_message = ["showFragRequest",_respectGained]; + _killer call ExileServer_object_player_sendStatsUpdate; + if (blck_useKillScoreMessage) then + { + [["showScore",[_respectGained,_distanceBonus,_kills]], [_killer]] call blck_fnc_messageplayers; + }; }; }; + +/* + if (_overallRespectChange > 0) then { + _score = _killer getVariable ["ExileScore", 0]; + _score = _score + _overallRespectChange; + _killer setVariable ["ExileScore", _score]; + format["setAccountScore:%1:%2", _score,_killerPlayerUID] call ExileServer_system_database_query_fireAndForget; + [_killer, "showFragRequest", [_killerRespectPoints]] call A3XAI_sendExileMessage; + }; + + //["systemChatRequest", [_killMessage]] call ExileServer_system_network_send_broadcast; //To-do: Non-global version + _newKillerFrags = _killer getVariable ["ExileKills", 0]; + _killer setVariable ["ExileKills", _newKillerFrags + 1]; + format["addAccountKill:%1", _killerPlayerUID] call ExileServer_system_database_query_fireAndForget; + + _killer call ExileServer_object_player_sendStatsUpdate; +};