1.0.1.2 Release

+ [CHANGED] commented out many diag_logs
+ [CHANGED] bandit status is now at -5000 instead of -2000
This commit is contained in:
vbawol
2013-06-26 09:11:30 -05:00
parent 6abd497261
commit 91b05db8e0
22 changed files with 69 additions and 111 deletions

View File

@@ -13,14 +13,14 @@ _trader_id = (_this select 3) select 0;
dayzTraderMenuResult = call compile format["tcacheBuy_%1;",_trader_id]; dayzTraderMenuResult = call compile format["tcacheBuy_%1;",_trader_id];
if(isNil "dayzTraderMenuResult") then { if(isNil "dayzTraderMenuResult") then {
diag_log format["DEBUG TRADER OBJ: %1", _trader_id]; //diag_log format["DEBUG TRADER OBJ: %1", _trader_id];
//["dayzTraderMenu",[_activatingPlayer,_trader_id,_category,_action]] call callRpcProcedure; //["dayzTraderMenu",[_activatingPlayer,_trader_id,_category,_action]] call callRpcProcedure;
dayzTraderMenu = [_activatingPlayer,_trader_id]; dayzTraderMenu = [_activatingPlayer,_trader_id];
publicVariableServer "dayzTraderMenu"; publicVariableServer "dayzTraderMenu";
waitUntil {!isNil "dayzTraderMenuResult"}; waitUntil {!isNil "dayzTraderMenuResult"};
}; };
diag_log format["DEBUG Buy: %1", dayzTraderMenuResult]; //diag_log format["DEBUG Buy: %1", dayzTraderMenuResult];
{ {
_header = _x select 0; // "TRD" _header = _x select 0; // "TRD"
@@ -106,7 +106,7 @@ diag_log format["DEBUG Buy: %1", dayzTraderMenuResult];
_part = player addAction [_Display, _File,[_name,_bname,_out,_bqty,"buy",_textCurrency,_textPart,_header], _order, true, true, "",""]; _part = player addAction [_Display, _File,[_name,_bname,_out,_bqty,"buy",_textCurrency,_textPart,_header], _order, true, true, "",""];
diag_log format["DEBUG TRADER: %1", _part]; //diag_log format["DEBUG TRADER: %1", _part];
s_player_parts set [count s_player_parts,_part]; s_player_parts set [count s_player_parts,_part];
} forEach dayzTraderMenuResult; } forEach dayzTraderMenuResult;

View File

@@ -3,7 +3,7 @@ private ["_activatingPlayer"];
// [ _trader_id, _category, _action ]; // [ _trader_id, _category, _action ];
_activatingPlayer = _this select 1; _activatingPlayer = _this select 1;
diag_log format["DEBUG DEATH OBJ: %1", _this select 0]; //diag_log format["DEBUG DEATH OBJ: %1", _this select 0];
//["dayzPlayerDeaths",[_activatingPlayer]] call callRpcProcedure; //["dayzPlayerDeaths",[_activatingPlayer]] call callRpcProcedure;
dayzPlayerDeaths = [_activatingPlayer]; dayzPlayerDeaths = [_activatingPlayer];
@@ -11,7 +11,7 @@ publicVariableServer "dayzPlayerDeaths";
waitUntil {!isNil "dayzPlayerDeathsResult"}; waitUntil {!isNil "dayzPlayerDeathsResult"};
diag_log format["DEBUG Death: %1", dayzPlayerDeathsResult]; //diag_log format["DEBUG Death: %1", dayzPlayerDeathsResult];
if((count dayzPlayerDeathsResult) > 0) then { if((count dayzPlayerDeathsResult) > 0) then {
"Recent Player Deaths:" hintC dayzPlayerDeathsResult; "Recent Player Deaths:" hintC dayzPlayerDeathsResult;

View File

@@ -44,7 +44,7 @@ _findNearestTree = [];
} foreach nearestObjects [getPos player, [], 20]; } foreach nearestObjects [getPos player, [], 20];
diag_log format["DEBUG TREES: %1", _findNearestTree]; //diag_log format["DEBUG TREES: %1", _findNearestTree];
if (count(_findNearestTree) >= 1) then { if (count(_findNearestTree) >= 1) then {
@@ -58,7 +58,7 @@ if (count(_findNearestTree) >= 1) then {
_countOut = ceil(_distance3d-_distance2d); _countOut = ceil(_distance3d-_distance2d);
diag_log format["DEBUG TREE DISTANCE: %1 - %2 = %3", _distance3d,_distance2d,(_distance3d-_distance2d)]; //diag_log format["DEBUG TREE DISTANCE: %1 - %2 = %3", _distance3d,_distance2d,(_distance3d-_distance2d)];
// Start chop tree loop // Start chop tree loop
_counter = 0; _counter = 0;
@@ -123,7 +123,7 @@ if (count(_findNearestTree) >= 1) then {
if("" == typeOf _tree) then { if("" == typeOf _tree) then {
_tree setDamage 1; _tree setDamage 1;
}; };
diag_log format["DEBUG TREE DAMAGE: %1", _tree]; //diag_log format["DEBUG TREE DAMAGE: %1", _tree];
cutText [format["%1 piles of wood has been successfully added to your inventory.", _countOut], "PLAIN DOWN"]; cutText [format["%1 piles of wood has been successfully added to your inventory.", _countOut], "PLAIN DOWN"];

View File

@@ -64,8 +64,8 @@ if (_canDo) then {
if(!_missingTools) then { if(!_missingTools) then {
diag_log format["Selected Recipe Input: %1", _selectedRecipeInput]; //diag_log format["Selected Recipe Input: %1", _selectedRecipeInput];
diag_log format["Selected Recipe Output: %1", _selectedRecipeOutput]; //diag_log format["Selected Recipe Output: %1", _selectedRecipeOutput];
// Dry run to see if all parts are available. // Dry run to see if all parts are available.
_proceed = true; _proceed = true;
@@ -73,7 +73,7 @@ if (_canDo) then {
_itemIn = _x select 0; _itemIn = _x select 0;
_countIn = _x select 1; _countIn = _x select 1;
diag_log format["Recipe Check: %1 %2", _itemIn,_countIn]; //diag_log format["Recipe Check: %1 %2", _itemIn,_countIn];
// not neccessary // not neccessary
//if (!(_itemIn in magazines player)) exitWith { _missing = _itemIn; _missingQty = _countIn; _proceed = false; }; //if (!(_itemIn in magazines player)) exitWith { _missing = _itemIn; _missingQty = _countIn; _proceed = false; };
@@ -144,7 +144,7 @@ if (_canDo) then {
} forEach _selectedRecipeInput; } forEach _selectedRecipeInput;
diag_log format["removed: %1 of: %2", _removed, _tobe_removed_total]; //diag_log format["removed: %1 of: %2", _removed, _tobe_removed_total];
// Only proceed if all parts were removed successfully // Only proceed if all parts were removed successfully
if(_removed_total == _tobe_removed_total) then { if(_removed_total == _tobe_removed_total) then {
@@ -158,7 +158,7 @@ if (_canDo) then {
_itemOut = _x select 0; _itemOut = _x select 0;
_countOut = _x select 1; _countOut = _x select 1;
diag_log format["Recipe Output: %1 %2", _itemOut,_countOut]; //diag_log format["Recipe Output: %1 %2", _itemOut,_countOut];
for "_x" from 1 to _countOut do { for "_x" from 1 to _countOut do {
player addMagazine _itemOut; player addMagazine _itemOut;

View File

@@ -64,8 +64,8 @@ if (_canDo) then {
if(!_missingTools) then { if(!_missingTools) then {
diag_log format["Selected Recipe Input: %1", _selectedRecipeInput]; //diag_log format["Selected Recipe Input: %1", _selectedRecipeInput];
diag_log format["Selected Recipe Output: %1", _selectedRecipeOutput]; //diag_log format["Selected Recipe Output: %1", _selectedRecipeOutput];
// Dry run to see if all parts are available. // Dry run to see if all parts are available.
_proceed = true; _proceed = true;
@@ -73,7 +73,7 @@ if (_canDo) then {
_itemIn = _x select 0; _itemIn = _x select 0;
_countIn = _x select 1; _countIn = _x select 1;
diag_log format["Recipe Check: %1 %2", _itemIn,_countIn]; //diag_log format["Recipe Check: %1 %2", _itemIn,_countIn];
// not neccessary // not neccessary
//if (!(_itemIn in magazines player)) exitWith { _missing = _itemIn; _missingQty = _countIn; _proceed = false; }; //if (!(_itemIn in magazines player)) exitWith { _missing = _itemIn; _missingQty = _countIn; _proceed = false; };
@@ -144,7 +144,7 @@ if (_canDo) then {
} forEach _selectedRecipeInput; } forEach _selectedRecipeInput;
diag_log format["removed: %1 of: %2", _removed, _tobe_removed_total]; //diag_log format["removed: %1 of: %2", _removed, _tobe_removed_total];
// Only proceed if all parts were removed successfully // Only proceed if all parts were removed successfully
if(_removed_total == _tobe_removed_total) then { if(_removed_total == _tobe_removed_total) then {
@@ -158,7 +158,7 @@ if (_canDo) then {
_itemOut = _x select 0; _itemOut = _x select 0;
_countOut = _x select 1; _countOut = _x select 1;
diag_log format["Recipe Output: %1 %2", _itemOut,_countOut]; //diag_log format["Recipe Output: %1 %2", _itemOut,_countOut];
for "_x" from 1 to _countOut do { for "_x" from 1 to _countOut do {
player addMagazine _itemOut; player addMagazine _itemOut;

View File

@@ -64,8 +64,8 @@ if (_canDo) then {
if(!_missingTools) then { if(!_missingTools) then {
diag_log format["Selected Recipe Input: %1", _selectedRecipeInput]; //diag_log format["Selected Recipe Input: %1", _selectedRecipeInput];
diag_log format["Selected Recipe Output: %1", _selectedRecipeOutput]; //diag_log format["Selected Recipe Output: %1", _selectedRecipeOutput];
// Dry run to see if all parts are available. // Dry run to see if all parts are available.
_proceed = true; _proceed = true;
@@ -73,7 +73,7 @@ if (_canDo) then {
_itemIn = _x select 0; _itemIn = _x select 0;
_countIn = _x select 1; _countIn = _x select 1;
diag_log format["Recipe Check: %1 %2", _itemIn,_countIn]; //diag_log format["Recipe Check: %1 %2", _itemIn,_countIn];
// not neccessary // not neccessary
//if (!(_itemIn in magazines player)) exitWith { _missing = _itemIn; _missingQty = _countIn; _proceed = false; }; //if (!(_itemIn in magazines player)) exitWith { _missing = _itemIn; _missingQty = _countIn; _proceed = false; };
@@ -144,7 +144,7 @@ if (_canDo) then {
} forEach _selectedRecipeInput; } forEach _selectedRecipeInput;
diag_log format["removed: %1 of: %2", _removed, _tobe_removed_total]; //diag_log format["removed: %1 of: %2", _removed, _tobe_removed_total];
// Only proceed if all parts were removed successfully // Only proceed if all parts were removed successfully
if(_removed_total == _tobe_removed_total) then { if(_removed_total == _tobe_removed_total) then {
@@ -158,7 +158,7 @@ if (_canDo) then {
_itemOut = _x select 0; _itemOut = _x select 0;
_countOut = _x select 1; _countOut = _x select 1;
diag_log format["Recipe Output: %1 %2", _itemOut,_countOut]; //diag_log format["Recipe Output: %1 %2", _itemOut,_countOut];
for "_x" from 1 to _countOut do { for "_x" from 1 to _countOut do {
player addMagazine _itemOut; player addMagazine _itemOut;

View File

@@ -64,8 +64,8 @@ if (_canDo) then {
if(!_missingTools) then { if(!_missingTools) then {
diag_log format["Selected Recipe Input: %1", _selectedRecipeInput]; //diag_log format["Selected Recipe Input: %1", _selectedRecipeInput];
diag_log format["Selected Recipe Output: %1", _selectedRecipeOutput]; //diag_log format["Selected Recipe Output: %1", _selectedRecipeOutput];
// Dry run to see if all parts are available. // Dry run to see if all parts are available.
_proceed = true; _proceed = true;
@@ -73,7 +73,7 @@ if (_canDo) then {
_itemIn = _x select 0; _itemIn = _x select 0;
_countIn = _x select 1; _countIn = _x select 1;
diag_log format["Recipe Check: %1 %2", _itemIn,_countIn]; //diag_log format["Recipe Check: %1 %2", _itemIn,_countIn];
// not neccessary // not neccessary
//if (!(_itemIn in magazines player)) exitWith { _missing = _itemIn; _missingQty = _countIn; _proceed = false; }; //if (!(_itemIn in magazines player)) exitWith { _missing = _itemIn; _missingQty = _countIn; _proceed = false; };
@@ -144,7 +144,7 @@ if (_canDo) then {
} forEach _selectedRecipeInput; } forEach _selectedRecipeInput;
diag_log format["removed: %1 of: %2", _removed, _tobe_removed_total]; //diag_log format["removed: %1 of: %2", _removed, _tobe_removed_total];
// Only proceed if all parts were removed successfully // Only proceed if all parts were removed successfully
if(_removed_total == _tobe_removed_total) then { if(_removed_total == _tobe_removed_total) then {
@@ -158,7 +158,7 @@ if (_canDo) then {
_itemOut = _x select 0; _itemOut = _x select 0;
_countOut = _x select 1; _countOut = _x select 1;
diag_log format["Recipe Output: %1 %2", _itemOut,_countOut]; //diag_log format["Recipe Output: %1 %2", _itemOut,_countOut];
for "_x" from 1 to _countOut do { for "_x" from 1 to _countOut do {
player addMagazine _itemOut; player addMagazine _itemOut;

View File

@@ -64,8 +64,8 @@ if (_canDo) then {
if(!_missingTools) then { if(!_missingTools) then {
diag_log format["Selected Recipe Input: %1", _selectedRecipeInput]; //diag_log format["Selected Recipe Input: %1", _selectedRecipeInput];
diag_log format["Selected Recipe Output: %1", _selectedRecipeOutput]; //diag_log format["Selected Recipe Output: %1", _selectedRecipeOutput];
// Dry run to see if all parts are available. // Dry run to see if all parts are available.
_proceed = true; _proceed = true;
@@ -73,7 +73,7 @@ if (_canDo) then {
_itemIn = _x select 0; _itemIn = _x select 0;
_countIn = _x select 1; _countIn = _x select 1;
diag_log format["Recipe Check: %1 %2", _itemIn,_countIn]; //diag_log format["Recipe Check: %1 %2", _itemIn,_countIn];
// not neccessary // not neccessary
//if (!(_itemIn in magazines player)) exitWith { _missing = _itemIn; _missingQty = _countIn; _proceed = false; }; //if (!(_itemIn in magazines player)) exitWith { _missing = _itemIn; _missingQty = _countIn; _proceed = false; };
@@ -144,7 +144,7 @@ if (_canDo) then {
} forEach _selectedRecipeInput; } forEach _selectedRecipeInput;
diag_log format["removed: %1 of: %2", _removed, _tobe_removed_total]; //diag_log format["removed: %1 of: %2", _removed, _tobe_removed_total];
// Only proceed if all parts were removed successfully // Only proceed if all parts were removed successfully
if(_removed_total == _tobe_removed_total) then { if(_removed_total == _tobe_removed_total) then {
@@ -158,7 +158,7 @@ if (_canDo) then {
_itemOut = _x select 0; _itemOut = _x select 0;
_countOut = _x select 1; _countOut = _x select 1;
diag_log format["Recipe Output: %1 %2", _itemOut,_countOut]; //diag_log format["Recipe Output: %1 %2", _itemOut,_countOut];
for "_x" from 1 to _countOut do { for "_x" from 1 to _countOut do {
player addMagazine _itemOut; player addMagazine _itemOut;

View File

@@ -24,7 +24,7 @@ if (vehicle player != player) exitWith {TradeInprogress = false; cutText ["You m
_myModel = (typeOf player); _myModel = (typeOf player);
_itemNew = "Skin_" + _myModel; _itemNew = "Skin_" + _myModel;
diag_log ("Debug Clothes: model In: " + str(_itemNew) + " Out: " + str(_item)); //diag_log ("Debug Clothes: model In: " + str(_itemNew) + " Out: " + str(_item));
if ( (isClass(_config >> _itemNew)) ) then { if ( (isClass(_config >> _itemNew)) ) then {
if ( (isClass(_config >> _item)) ) then { if ( (isClass(_config >> _item)) ) then {
@@ -33,7 +33,7 @@ if ( (isClass(_config >> _itemNew)) ) then {
_currentSex = getText (configFile >> "CfgSurvival" >> "Skins" >> _itemNew >> "sex"); _currentSex = getText (configFile >> "CfgSurvival" >> "Skins" >> _itemNew >> "sex");
// Sex of new skin // Sex of new skin
_newSex = getText (configFile >> "CfgSurvival" >> "Skins" >> _item >> "sex"); _newSex = getText (configFile >> "CfgSurvival" >> "Skins" >> _item >> "sex");
diag_log ("Debug Clothes: sex In: " + str(_currentSex) + " Out: " + str(_newSex)); //diag_log ("Debug Clothes: sex In: " + str(_currentSex) + " Out: " + str(_newSex));
if(_currentSex == _newSex) then { if(_currentSex == _newSex) then {
// Get model name from config // Get model name from config

View File

@@ -35,7 +35,7 @@ _availableCans = ["ItemJerrycan","ItemFuelBarrel"];
// calculate new fuel // calculate new fuel
_newFuel = (_newFuel / _capacity); _newFuel = (_newFuel / _capacity);
diag_log ("refuel check: " + str(_newFuel) + " / " + str(_capacity)); //diag_log ("refuel check: " + str(_newFuel) + " / " + str(_capacity));
cutText [format["Preparing to refuel, stand still to drain %1.",_canText], "PLAIN DOWN"]; cutText [format["Preparing to refuel, stand still to drain %1.",_canText], "PLAIN DOWN"];

View File

@@ -14,14 +14,14 @@ _trader_id = (_this select 3) select 0;
dayzTraderMenuResult = call compile format["tcacheSell_%1;",_trader_id]; dayzTraderMenuResult = call compile format["tcacheSell_%1;",_trader_id];
if(isNil "dayzTraderMenuResult") then { if(isNil "dayzTraderMenuResult") then {
diag_log format["DEBUG TRADER OBJ: %1", _trader_id]; //diag_log format["DEBUG TRADER OBJ: %1", _trader_id];
//["dayzTraderMenu",[_activatingPlayer,_trader_id,_category,_action]] call callRpcProcedure; //["dayzTraderMenu",[_activatingPlayer,_trader_id,_category,_action]] call callRpcProcedure;
dayzTraderMenu = [_activatingPlayer,_trader_id]; dayzTraderMenu = [_activatingPlayer,_trader_id];
publicVariableServer "dayzTraderMenu"; publicVariableServer "dayzTraderMenu";
waitUntil {!isNil "dayzTraderMenuResult"}; waitUntil {!isNil "dayzTraderMenuResult"};
}; };
diag_log format["DEBUG Buy: %1", dayzTraderMenuResult]; //diag_log format["DEBUG Buy: %1", dayzTraderMenuResult];
{ {
_header = _x select 0; // "TRD" _header = _x select 0; // "TRD"

View File

@@ -19,10 +19,10 @@ _availableCansEmpty = ["ItemJerrycanEmpty","ItemFuelBarrelEmpty"];
// Loop to find containers that can could hold fuel and fill them // Loop to find containers that can could hold fuel and fill them
{ {
_configCanEmpty = configFile >> "CfgMagazines" >> _x; _configCanEmpty = configFile >> "CfgMagazines" >> _x;
diag_log format["Looking for: %1", _x]; //diag_log format["Looking for: %1", _x];
if(_x in _availableCansEmpty) then { if(_x in _availableCansEmpty) then {
diag_log format["gas fuelQuantity config : %1", _x]; //diag_log format["gas fuelQuantity config : %1", _x];
// Get Empty can size // Get Empty can size
_canNameEmpty = _x; _canNameEmpty = _x;
@@ -36,7 +36,7 @@ _availableCansEmpty = ["ItemJerrycanEmpty","ItemFuelBarrelEmpty"];
// is empty // is empty
if(_canSizeEmpty == 0) then { if(_canSizeEmpty == 0) then {
diag_log format["is empty fuelQuantity : %1", _x]; //diag_log format["is empty fuelQuantity : %1", _x];
_curFuel = ((fuel _vehicle) * _capacity); _curFuel = ((fuel _vehicle) * _capacity);
_newFuel = (_curFuel - _canSize); _newFuel = (_curFuel - _canSize);

View File

@@ -85,11 +85,11 @@ if (_qty >= _qty_in) then {
dayzTradeObject = [_activatingPlayer,_traderID,_bos]; dayzTradeObject = [_activatingPlayer,_traderID,_bos];
publicVariableServer "dayzTradeObject"; publicVariableServer "dayzTradeObject";
diag_log format["DEBUG Starting to wait for answer: %1", dayzTradeObject]; //diag_log format["DEBUG Starting to wait for answer: %1", dayzTradeObject];
waitUntil {!isNil "dayzTradeResult"}; waitUntil {!isNil "dayzTradeResult"};
diag_log format["DEBUG Complete Trade: %1", dayzTradeResult]; //diag_log format["DEBUG Complete Trade: %1", dayzTradeResult];
if(dayzTradeResult == "PASS") then { if(dayzTradeResult == "PASS") then {

View File

@@ -84,11 +84,11 @@ if (_qty >= _qty_in) then {
dayzTradeObject = [_activatingPlayer,_traderID,_bos]; dayzTradeObject = [_activatingPlayer,_traderID,_bos];
publicVariableServer "dayzTradeObject"; publicVariableServer "dayzTradeObject";
diag_log format["DEBUG Starting to wait for answer: %1", dayzTradeObject]; //diag_log format["DEBUG Starting to wait for answer: %1", dayzTradeObject];
waitUntil {!isNil "dayzTradeResult"}; waitUntil {!isNil "dayzTradeResult"};
diag_log format["DEBUG Complete Trade: %1", dayzTradeResult]; //diag_log format["DEBUG Complete Trade: %1", dayzTradeResult];
if(dayzTradeResult == "PASS") then { if(dayzTradeResult == "PASS") then {

View File

@@ -87,11 +87,11 @@ if (_qty >= _qty_in) then {
dayzTradeObject = [_activatingPlayer,_traderID,_bos]; dayzTradeObject = [_activatingPlayer,_traderID,_bos];
publicVariableServer "dayzTradeObject"; publicVariableServer "dayzTradeObject";
diag_log format["DEBUG Starting to wait for answer: %1", dayzTradeObject]; //diag_log format["DEBUG Starting to wait for answer: %1", dayzTradeObject];
waitUntil {!isNil "dayzTradeResult"}; waitUntil {!isNil "dayzTradeResult"};
diag_log format["DEBUG Complete Trade: %1", dayzTradeResult]; //diag_log format["DEBUG Complete Trade: %1", dayzTradeResult];
if(dayzTradeResult == "PASS") then { if(dayzTradeResult == "PASS") then {

View File

@@ -148,7 +148,7 @@ for "_x" from 1 to _total_trades do {
// pay out // pay out
if(_total_parts_out >= 1) then { if(_total_parts_out >= 1) then {
diag_log format["DEBUG TRADE #: %1", _total_parts_out]; //diag_log format["DEBUG TRADE #: %1", _total_parts_out];
if(_bos == 1) then { if(_bos == 1) then {
//convert currency trades into next bar //convert currency trades into next bar
@@ -196,7 +196,7 @@ if(_total_parts_out >= 1) then {
}; };
}; };
diag_log format["DEBUG TRADE part: %1 next: %2", _part_out,_next_highest_bar]; //diag_log format["DEBUG TRADE part: %1 next: %2", _part_out,_next_highest_bar];
if(_total_parts_out >= _next_highest_conv) then { if(_total_parts_out >= _next_highest_conv) then {
_next_parts_out_raw = _total_parts_out / _next_highest_conv; _next_parts_out_raw = _total_parts_out / _next_highest_conv;
@@ -204,12 +204,12 @@ if(_total_parts_out >= 1) then {
// whole parts // whole parts
_next_parts_out = floor(_next_parts_out_raw); _next_parts_out = floor(_next_parts_out_raw);
diag_log format["DEBUG TRADE next whole parts: %1 part: %2", _next_parts_out,_next_highest_bar]; //diag_log format["DEBUG TRADE next whole parts: %1 part: %2", _next_parts_out,_next_highest_bar];
// find any whole remains // find any whole remains
_remainder = floor((_next_parts_out_raw - _next_parts_out) * _next_highest_conv); _remainder = floor((_next_parts_out_raw - _next_parts_out) * _next_highest_conv);
diag_log format["DEBUG TRADE remainder parts: %1 part: %2", _remainder,_part_out]; //diag_log format["DEBUG TRADE remainder parts: %1 part: %2", _remainder,_part_out];
for "_x" from 1 to _remainder do { for "_x" from 1 to _remainder do {
player addMagazine _part_out; player addMagazine _part_out;
@@ -223,7 +223,7 @@ if(_total_parts_out >= 1) then {
// whole parts // whole parts
_third_parts_out = floor(_third_parts_out_raw); _third_parts_out = floor(_third_parts_out_raw);
diag_log format["DEBUG TRADE third whole parts: %1 part: %2", _third_parts_out,_third_highest_bar]; //diag_log format["DEBUG TRADE third whole parts: %1 part: %2", _third_parts_out,_third_highest_bar];
for "_x" from 1 to _third_parts_out do { for "_x" from 1 to _third_parts_out do {
player addMagazine _third_highest_bar; player addMagazine _third_highest_bar;
@@ -232,7 +232,7 @@ if(_total_parts_out >= 1) then {
// find any whole remains // find any whole remains
_remainder = floor((_third_parts_out_raw - _third_parts_out) * _third_highest_conv); _remainder = floor((_third_parts_out_raw - _third_parts_out) * _third_highest_conv);
diag_log format["DEBUG TRADE remainder parts: %1 part: %2", _remainder,_next_highest_bar]; //diag_log format["DEBUG TRADE remainder parts: %1 part: %2", _remainder,_next_highest_bar];
for "_x" from 1 to _remainder do { for "_x" from 1 to _remainder do {
player addMagazine _next_highest_bar; player addMagazine _next_highest_bar;
@@ -240,7 +240,7 @@ if(_total_parts_out >= 1) then {
} else { } else {
diag_log format["DEBUG TRADE next parts: %1 part: %2", _next_parts_out,_next_highest_bar]; //diag_log format["DEBUG TRADE next parts: %1 part: %2", _next_parts_out,_next_highest_bar];
for "_x" from 1 to _next_parts_out do { for "_x" from 1 to _next_parts_out do {
player addMagazine _next_highest_bar; player addMagazine _next_highest_bar;
@@ -249,7 +249,7 @@ if(_total_parts_out >= 1) then {
} else { } else {
diag_log "DEBUG TRADE SELLING NORMALLY"; //diag_log "DEBUG TRADE SELLING NORMALLY";
for "_x" from 1 to _total_parts_out do { for "_x" from 1 to _total_parts_out do {
player addMagazine _part_out; player addMagazine _part_out;
@@ -258,7 +258,7 @@ if(_total_parts_out >= 1) then {
} else { } else {
diag_log "DEBUG TRADE BUYING"; //diag_log "DEBUG TRADE BUYING";
for "_x" from 1 to _total_parts_out do { for "_x" from 1 to _total_parts_out do {
player addMagazine _part_out; player addMagazine _part_out;

View File

@@ -24,7 +24,7 @@ _metals_conversion = [
// Static Menu // Static Menu
{ {
diag_log format["DEBUG TRADER: %1", _x]; //diag_log format["DEBUG TRADER: %1", _x];
_buy = player addAction [format["Trade %1 %2 for %3 %4",(_x select 3),(_x select 5),(_x select 2),(_x select 6)], "\z\addons\dayz_code\actions\trade_items_wo_db.sqf",[(_x select 0),(_x select 1),(_x select 2),(_x select 3),(_x select 4),(_x select 5),(_x select 6)], (_x select 7), true, true, "",""]; _buy = player addAction [format["Trade %1 %2 for %3 %4",(_x select 3),(_x select 5),(_x select 2),(_x select 6)], "\z\addons\dayz_code\actions\trade_items_wo_db.sqf",[(_x select 0),(_x select 1),(_x select 2),(_x select 3),(_x select 4),(_x select 5),(_x select 6)], (_x select 7), true, true, "",""];
s_player_parts set [count s_player_parts,_buy]; s_player_parts set [count s_player_parts,_buy];

View File

@@ -85,7 +85,7 @@ if (_qty >= _qty_in) then {
waitUntil {!isNil "dayzTradeResult"}; waitUntil {!isNil "dayzTradeResult"};
diag_log format["DEBUG Complete Trade: %1", dayzTradeResult]; //diag_log format["DEBUG Complete Trade: %1", dayzTradeResult];
if(dayzTradeResult == "PASS") then { if(dayzTradeResult == "PASS") then {

View File

@@ -447,11 +447,11 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
_low_high = "low"; _low_high = "low";
_humanity_logic = false; _humanity_logic = false;
if((_traderMenu select 2) == "friendly") then { if((_traderMenu select 2) == "friendly") then {
_humanity_logic = (_humanity < -2000); _humanity_logic = (_humanity < -5000);
}; };
if((_traderMenu select 2) == "hostile") then { if((_traderMenu select 2) == "hostile") then {
_low_high = "high"; _low_high = "high";
_humanity_logic = (_humanity > -2000); _humanity_logic = (_humanity > -5000);
}; };
if((_traderMenu select 2) == "hero") then { if((_traderMenu select 2) == "hero") then {
_humanity_logic = (_humanity < 5000); _humanity_logic = (_humanity < 5000);

View File

@@ -17,13 +17,13 @@ _tagList = player getVariable ["tagList", []];
// Add sphere to everyone // Add sphere to everyone
_position = [0,0,0]; _position = [0,0,0];
_tag = "Sign_sphere10cm_EP1" createVehicleLocal _position; _tag = "Sign_sphere10cm_EP1" createVehicleLocal _position;
_tag attachTo [_x,[0,0,0],"lwrist"]; _tag attachTo [_x,[0,0,0],"lwrist"]; // Pelvis
_tag setVariable ["belongsTo", _rcharID]; _tag setVariable ["belongsTo", _rcharID];
// Force white // Force white
// _tag setobjecttexture [0,"#(argb,8,8,3)color(1,1,1,0.5,ca)"]; // _tag setobjecttexture [0,"#(argb,8,8,3)color(1,1,1,0.5,ca)"];
diag_log format["SETUP ORB FOR: %1", _x]; //diag_log format["SETUP ORB FOR: %1", _x];
// Maintenance array // Maintenance array
_tagList set [count _tagList, [_x, _tag,"init"]]; _tagList set [count _tagList, [_x, _tag,"init"]];
@@ -73,7 +73,7 @@ _newTagList = [];
// Get humanity // Get humanity
_humanity = _player getVariable ["humanity",0]; _humanity = _player getVariable ["humanity",0];
if(_humanity < -2000) then { if(_humanity < -5000) then {
_statusNew = "red"; _statusNew = "red";
_tagColor = "#(argb,8,8,3)color(1,0,0,0.5,ca)"; _tagColor = "#(argb,8,8,3)color(1,0,0,0.5,ca)";
} else { } else {
@@ -88,7 +88,7 @@ _newTagList = [];
if(_statusNew != _status) then { if(_statusNew != _status) then {
diag_log format["STATUS CHANGED: %1 != %2", _statusNew, _status]; //diag_log format["STATUS CHANGED: %1 != %2", _statusNew, _status];
// Set texture based on humanity or friendship status // Set texture based on humanity or friendship status
_tag setobjecttexture [0,_tagColor]; _tag setobjecttexture [0,_tagColor];
_status = _statusNew; _status = _statusNew;

View File

@@ -42,14 +42,14 @@ if (_vehicle != player) then {
} forEach _openVehicles; } forEach _openVehicles;
}; };
diag_log ("Hitpoints " +str(_wound) + "hit points " + str(_hpList)); //diag_log ("Hitpoints " +str(_wound) + "hit points " + str(_hpList));
if (_wound in DZE_vehicleZwounds) then { if (_wound in DZE_vehicleZwounds) then {
_strH = "hit_" + (_wound); _strH = "hit_" + (_wound);
_dam = _vehicle getVariable [_strH,0]; _dam = _vehicle getVariable [_strH,0];
diag_log ("Hitpoints " +str(_wound) +str(_total)); //diag_log ("Hitpoints " +str(_wound) +str(_total));
//["dayzHitV",[_vehicle, _wound,_total, _unit,"zombie"]] call broadcastRpcCallAll; //["dayzHitV",[_vehicle, _wound,_total, _unit,"zombie"]] call broadcastRpcCallAll;
if (_dam >= 1) then { if (_dam >= 1) then {
@@ -65,7 +65,7 @@ if (_vehicle != player) then {
_wound = (DAYZ_woundHit_ok select 0) select _index; _wound = (DAYZ_woundHit_ok select 0) select _index;
}; };
_damage = 0.1 + random (1.2); _damage = 0.1 + random (1.2);
diag_log ("START DAM: Player Hit on " + _wound + " for " + str(_damage)); //diag_log ("START DAM: Player Hit on " + _wound + " for " + str(_damage));
[player, _wound, _damage, _unit,"zombie"] call fnc_usec_damageHandler; [player, _wound, _damage, _unit,"zombie"] call fnc_usec_damageHandler;
//dayzHit = [player,_wound, _damage, _unit,"zombie"]; //dayzHit = [player,_wound, _damage, _unit,"zombie"];
//publicVariable "dayzHit"; //publicVariable "dayzHit";
@@ -101,13 +101,13 @@ if (_vehicle != player) then {
}; };
_damage = 0.1 + random (1.2); _damage = 0.1 + random (1.2);
diag_log ("START DAM: Player Hit on " + _wound + " for " + str(_damage)); //diag_log ("START DAM: Player Hit on " + _wound + " for " + str(_damage));
[player, _wound, _damage, _unit,"zombie"] call fnc_usec_damageHandler; [player, _wound, _damage, _unit,"zombie"] call fnc_usec_damageHandler;
//dayzHit = [player,_wound, _damage, _unit,"zombie"]; //dayzHit = [player,_wound, _damage, _unit,"zombie"];
//publicVariable "dayzHit"; //publicVariable "dayzHit";
[_unit,"hit",2,false] call dayz_zombieSpeak; [_unit,"hit",2,false] call dayz_zombieSpeak;
} else { } else {
diag_log ("NO LOS: Player Hit on " + str(_unit) + " for " + str(_vehicle)); //diag_log ("NO LOS: Player Hit on " + str(_unit) + " for " + str(_vehicle));
/* /*
_isZombieInside = [_unit,_building] call fnc_isInsideBuilding; _isZombieInside = [_unit,_building] call fnc_isInsideBuilding;
if (_isPlayerInside) then { if (_isPlayerInside) then {
@@ -120,16 +120,6 @@ if (_vehicle != player) then {
}; };
*/ */
}; };
} else {
diag_log ("out of angle : tpos " + str(_tPos) + " zpos " + str(_zPos) + " dir" + str(getdir _unit));
}; };
} else {
if(!((_unit distance player) <= dayz_areaAffect)) then {
_tPos = (getPosASL _vehicle);
_zPos = (getPosASL _unit);
diag_log ("to far to hit player : tpos " + str(_tPos) + " zpos " + str(_zPos));
};
}; };
}; };

View File

@@ -77,38 +77,6 @@ while {true} do {
player setVariable ["humanity",_humanity,true]; player setVariable ["humanity",_humanity,true];
}; };
}; };
/*
if (_humanity < -2000 and !_isBandit) then {
_isBandit = true;
_model = typeOf player;
if (_model == "Survivor2_DZ") then {
[dayz_playerUID,dayz_characterID,"Bandit1_DZ"] spawn player_humanityMorph;
};
if (_model == "SurvivorW2_DZ") then {
[dayz_playerUID,dayz_characterID,"BanditW1_DZ"] spawn player_humanityMorph;
};
};
if (_humanity > 0 and _isBandit) then {
_isBandit = false;
_model = typeOf player;
if (_model == "Bandit1_DZ") then {
[dayz_playerUID,dayz_characterID,"Survivor2_DZ"] spawn player_humanityMorph;
};
if (_model == "BanditW1_DZ") then {
[dayz_playerUID,dayz_characterID,"SurvivorW2_DZ"] spawn player_humanityMorph;
};
};
if (_humanity > 5000 and !_isHero) then {
_isBandit = false;
_model = typeOf player;
if (_model == "Survivor2_DZ") then {
[dayz_playerUID,dayz_characterID,"Survivor3_DZ"] spawn player_humanityMorph;
};
};
*/
//Has infection? //Has infection?
//if (r_player_infected) then { //if (r_player_infected) then {