This commit is contained in:
icomrade
2016-10-02 15:00:49 -04:00
14 changed files with 26 additions and 40 deletions

View File

@@ -24,12 +24,11 @@ Z_ChangeOverflow = false;
if (_combine) then { if (_combine) then {
_trade_total = 0; _trade_total = 0;
_total_currency = 0; _total_currency = 0;
_inventoryMoney = [];
_combineOk = 1; _combineOk = 1;
{ {
_part = (configFile >> "CfgMagazines" >> _x); _part = configFile >> "CfgMagazines" >> _x;
_worth = (_part >> "worth"); _worth = (_part >> "worth");
if isNumber (_worth) then { if (isNumber _worth) then {
_combineOk = [player,_part,1] call BIS_fnc_invRemove; _combineOk = [player,_part,1] call BIS_fnc_invRemove;
_total_currency = _total_currency + getNumber(_worth); _total_currency = _total_currency + getNumber(_worth);
} else { } else {

View File

@@ -36,14 +36,13 @@ if (_canAfford) then {
// total currency // total currency
_total_currency = 0; _total_currency = 0;
{ {
_part = (configFile >> "CfgMagazines" >> _x); _part = configFile >> "CfgMagazines" >> _x;
_worth = (_part >> "worth"); _worth = (_part >> "worth");
if isNumber (_worth) then { if (isNumber _worth) then {
if (([player,_part,1] call BIS_fnc_invRemove) == 1) then { if (([player,_part,1] call BIS_fnc_invRemove) == 1) then {
_total_currency = _total_currency + getNumber(_worth); _total_currency = _total_currency + getNumber(_worth);
}; };
}; };
} count (magazines player); } count (magazines player);
//diag_log format["DEBUG TRADER INPUT CURRENCY TOTAL: %1", _total_currency]; //diag_log format["DEBUG TRADER INPUT CURRENCY TOTAL: %1", _total_currency];

View File

@@ -94,10 +94,7 @@ if (_unit == player) then {
// - Accidental Murder - \\ When wearing the garb of a non-civilian you are taking your life in your own hands // - Accidental Murder - \\ When wearing the garb of a non-civilian you are taking your life in your own hands
// Attackers humanity should not be punished for killing a survivor who has shrouded his identity in military garb. // Attackers humanity should not be punished for killing a survivor who has shrouded his identity in military garb.
_punishment = _punishment = ((_isBandit or {player getVariable ["OpenTarget",false]}) && !_isPZombie);
((_isBandit ||
{player getVariable ["OpenTarget",false]}) &&
{!_isPZombie});
_humanityHit = 0; _humanityHit = 0;
if (!_punishment && {(dayz_lastHumanityChange + 3) < diag_tickTime}) then { if (!_punishment && {(dayz_lastHumanityChange + 3) < diag_tickTime}) then {
@@ -116,7 +113,7 @@ if (_unit == player) then {
private ["_source","_humanityHit"]; private ["_source","_humanityHit"];
_source = _this select 0; _source = _this select 0;
_humanityHit = _this select 1; _humanityHit = _this select 1;
PVDZ_send = [_source,"Humanity",[_source,_humanityHit,30]]; PVDZ_send = [_source,"Humanity",[_humanityHit,30]];
publicVariableServer "PVDZ_send"; publicVariableServer "PVDZ_send";
}; };
}; };

View File

@@ -76,14 +76,12 @@ _array = _this;
if (count _array > 0) then { if (count _array > 0) then {
_source = _array select 0; _source = _array select 0;
_method = _array select 1; _method = _array select 1;
if ((!isNull _source) && (_source != player)) then { if (!isNull _source && _source != player && isPlayer _source) then { //Don't send humanity hit to AI units
_isBandit = (player getVariable["humanity",0]) <= -2000; _isBandit = (player getVariable["humanity",0]) <= -2000;
//_isBandit = (_model in ["Bandit1_DZ","BanditW1_DZ"]); //_isBandit = (_model in ["Bandit1_DZ","BanditW1_DZ"]);
//if you are a bandit or start first - player will not recieve humanity drop //if you are a bandit or start first - player will not recieve humanity drop
_punishment = _punishment = ((_isBandit or {player getVariable ["OpenTarget",false]}) && !(player isKindOf "PZombie_VB"));
_isBandit ||
{player getVariable ["OpenTarget",false]};
_humanityHit = 0; _humanityHit = 0;
if (!_punishment) then { if (!_punishment) then {
@@ -95,20 +93,17 @@ if (count _array > 0) then {
_humanityHit = -(2000 - _myKills); _humanityHit = -(2000 - _myKills);
_kills = _source getVariable ["humanKills",0]; _kills = _source getVariable ["humanKills",0];
_source setVariable ["humanKills",(_kills + 1),true]; _source setVariable ["humanKills",(_kills + 1),true];
PVDZ_send = [_source,"Humanity",[_source,_humanityHit,300]]; PVDZ_send = [_source,"Humanity",[_humanityHit,300]];
publicVariableServer "PVDZ_send"; publicVariableServer "PVDZ_send";
} else { } else {
//i'm "guilty" - kill me as bandit //i'm "guilty" - kill me as bandit
_killsV = _source getVariable ["banditKills",0]; _killsV = _source getVariable ["banditKills",0];
_source setVariable ["banditKills",(_killsV + 1),true]; _source setVariable ["banditKills",(_killsV + 1),true];
}; };
}; //Setup for study bodys.
_body setVariable ["deathType",_method,true];
//Setup for study bodys.
if ((!isNull _source) && (_source != player)) then {
_body setVariable ["KillingBlow",_source,true]; _body setVariable ["KillingBlow",_source,true];
}; };
_body setVariable ["deathType",_method,true];
}; };
terminate dayz_musicH; terminate dayz_musicH;

View File

@@ -1,7 +1,6 @@
private ["_object","_change","_wait","_humanity","_model","_isMen","_isMenH","_isMenB","_isWomen","_isWomenH","_isWomenB"]; private ["_change","_wait","_humanity","_model","_isMen","_isMenH","_isMenB","_isWomen","_isWomenH","_isWomenB"];
_object = _this select 0; _change = _this select 0;
_change = _this select 1; _wait = _this select 1;
_wait = if (count _this > 2) then { _this select 2 } else { 0 };
_humanity = (player getVariable["humanity",0]) + _change; _humanity = (player getVariable["humanity",0]) + _change;
player setVariable["humanity",_humanity,true]; player setVariable["humanity",_humanity,true];

View File

@@ -45,7 +45,7 @@ if (_hasAntibiotics) then {
publicVariableServer "PVDZ_send"; publicVariableServer "PVDZ_send";
//Give humnaity for good deeds //Give humnaity for good deeds
[player,20] call player_humanityChange; [20,0] call player_humanityChange;
_msg = "str_actions_medical_gave_antibiotics"; _msg = "str_actions_medical_gave_antibiotics";
}; };

View File

@@ -55,7 +55,7 @@ if (_finished) then {
} else { } else {
PVDZ_send = [_unit,"Bandage",[_unit,player]]; PVDZ_send = [_unit,"Bandage",[_unit,player]];
publicVariableServer "PVDZ_send"; publicVariableServer "PVDZ_send";
[player,20] call player_humanityChange; [20,0] call player_humanityChange;
}; };
} else { } else {
r_interrupt = false; r_interrupt = false;

View File

@@ -51,7 +51,7 @@ if (_finished) then {
//Give humanity reward to player giving the morphine to another player. //Give humanity reward to player giving the morphine to another player.
if (_item in ["ItemMorphine"]) then { if (_item in ["ItemMorphine"]) then {
[player,50] call player_humanityChange; [50,0] call player_humanityChange;
}; };
}; };

View File

@@ -14,7 +14,7 @@ if (!_isDead) then {
uiSleep 5; uiSleep 5;
//give humanity //give humanity
[player,25] call player_humanityChange; [25,0] call player_humanityChange;
PVDZ_send = [_unit,"Epinephrine",[_unit,player,"ItemEpinephrine"]]; PVDZ_send = [_unit,"Epinephrine",[_unit,player,"ItemEpinephrine"]];
publicVariableServer "PVDZ_send"; publicVariableServer "PVDZ_send";

View File

@@ -45,8 +45,7 @@ if ((_unit == player) or (vehicle player != player)) then {
//Self Healing //Self Healing
_id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medMorphine.sqf"; _id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medMorphine.sqf";
} else { } else {
//PVCDZ_plr_Humanity = [player,50]; [50,0] call player_humanityChange;
[player,50] call player_humanityChange;
}; };
//["PVCDZ_hlt_Morphine",[_unit,player]] call broadcastRpcCallAll; //["PVCDZ_hlt_Morphine",[_unit,player]] call broadcastRpcCallAll;

View File

@@ -15,8 +15,7 @@ if ((_unit == player) or (vehicle player != player)) then {
//Self Healing //Self Healing
_id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medPainkiller.sqf"; _id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medPainkiller.sqf";
} else { } else {
//PVCDZ_plr_Humanity = [player,20]; [20,0] call player_humanityChange;
[player,20] call player_humanityChange;
}; };
player removeMagazine "ItemPainkiller"; player removeMagazine "ItemPainkiller";

View File

@@ -194,7 +194,7 @@ while {r_doLoop} do {
localize "str_actions_medical_transfusion_successful" call dayz_rollingMessages; localize "str_actions_medical_transfusion_successful" call dayz_rollingMessages;
//see Note 1 //see Note 1
//[player,_unit,"loc",rTITLETEXT,localize "str_actions_medical_transfusion_successful","PLAIN DOWN"] call RE; //[player,_unit,"loc",rTITLETEXT,localize "str_actions_medical_transfusion_successful","PLAIN DOWN"] call RE;
if (!_badBag and _bagFound) then { [player,_humanityAwarded] call player_humanityChange; }; if (!_badBag and _bagFound) then { [_humanityAwarded,0] call player_humanityChange; };
r_doLoop = false; r_doLoop = false;
}; };

View File

@@ -2737,7 +2737,6 @@
<Spanish>M9 Silenciada</Spanish> <Spanish>M9 Silenciada</Spanish>
<French>M9 Silencieux</French> <French>M9 Silencieux</French>
<Czech>M9 s tlumičem</Czech> <Czech>M9 s tlumičem</Czech>
<German>M9 SD</German>
</Key> </Key>
<Key ID="STR_CRAFT_DESC_M9SD"> <Key ID="STR_CRAFT_DESC_M9SD">
<English>Blueprint to create a M9SD. Required - 1 M9, 1 Attachment_Silencer. - ToolBox</English> <English>Blueprint to create a M9SD. Required - 1 M9, 1 Attachment_Silencer. - ToolBox</English>

View File

@@ -23,7 +23,7 @@ _timerMonitor = diag_ticktime;
player setVariable ["temperature",dayz_temperatur,true]; player setVariable ["temperature",dayz_temperatur,true];
player setVariable["friendlies",DZE_Friends,true]; player setVariable["friendlies",DZE_Friends,true];
[player,0] call player_humanityChange; [0,0] call player_humanityChange;
//player addMagazine "Hatchet_swing"; //player addMagazine "Hatchet_swing";
//player addWeapon "MeleeHatchet"; //player addWeapon "MeleeHatchet";
@@ -79,7 +79,7 @@ while {1 == 1} do {
_humanity = player getVariable ["humanity",0]; _humanity = player getVariable ["humanity",0];
if (_humanity < 1 or _forceHumanity) then { if (_humanity < 1 or _forceHumanity) then {
if (vehicle player != player) then { if (vehicle player != player) then {
[player, round(_timeOut / 10)] call player_humanityChange; [round(_timeOut / 10),0] call player_humanityChange;
_forceHumanity = false; _forceHumanity = false;
} else { } else {
_humanity = _humanity + round(_timeOut / 10); _humanity = _humanity + round(_timeOut / 10);
@@ -93,7 +93,7 @@ while {1 == 1} do {
/* /*
if ((Dayz_loginCompleted) && (diag_tickTime < 25)) then { if ((Dayz_loginCompleted) && (diag_tickTime < 25)) then {
[player,0] call player_humanityChange; [0,0] call player_humanityChange;
diag_log ("Running"); diag_log ("Running");
_timer10 = diag_Ticktime; _timer10 = diag_Ticktime;