added cancel to repair and salvage menus, added message to salvage when
player does not, fixed bulk crates selling of weapons and backpacks, Can
no longer place vaults on roads or within 50m of trader citys, Added now
entering/leaving messages to trader citys, Added kill messages from f0rt
and stapo.
This commit is contained in:
vbawol
2013-02-01 16:05:05 -06:00
parent d8883bbf93
commit 15f091ef44
17 changed files with 91 additions and 103 deletions

View File

@@ -0,0 +1,3 @@
private [];
{dayz_myCursorTarget removeAction _x} forEach s_player_repairActions;s_player_repairActions = [];
s_player_repair_crtl = -1;

View File

@@ -60,5 +60,10 @@ if (_allFixed) then {
_vehicle setDamage 0; _vehicle setDamage 0;
}; };
if(count _hitpoints > 0 ) then {
_cancel = dayz_myCursorTarget addAction ["Cancel", "\z\addons\dayz_code\actions\repair_cancel.sqf","repair", 0, true, false, "",""];
s_player_repairActions set [count s_player_repairActions,_cancel];
s_player_repair_crtl = 1; s_player_repair_crtl = 1;
};

View File

@@ -43,6 +43,8 @@ if (_hasToolbox) then {
cutText [format["You have successfully removed %1 from the %2",_namePart,_nameType], "PLAIN DOWN"]; cutText [format["You have successfully removed %1 from the %2",_namePart,_nameType], "PLAIN DOWN"];
} else {
cutText [localize "STR_DAYZ_CODE_2", "PLAIN DOWN"];
}; };

View File

@@ -57,6 +57,10 @@ _hitpoints = _vehicle call vehicle_getHitpoints;
} forEach _hitpoints; } forEach _hitpoints;
if(count _hitpoints > 0 ) then {
_cancel = dayz_myCursorTarget addAction ["Cancel", "\z\addons\dayz_code\actions\repair_cancel.sqf","repair", 0, true, false, "",""];
s_player_repairActions set [count s_player_repairActions,_cancel];
s_player_repair_crtl = 1; s_player_repair_crtl = 1;
};

View File

@@ -12,6 +12,7 @@ _textPartIn = (_this select 3) select 5;
_textPartOut = (_this select 3) select 6; _textPartOut = (_this select 3) select 6;
_traderID = (_this select 3) select 7; _traderID = (_this select 3) select 7;
_bos = 0; _bos = 0;
_bulkqty = 0;
if(_buy_o_sell == "buy") then { if(_buy_o_sell == "buy") then {
_qty = {_x == _part_in} count magazines player; _qty = {_x == _part_in} count magazines player;

View File

@@ -1,4 +1,4 @@
private["_iarray","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_traderID","_bos","_isOk"]; private ["_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_traderID","_bos","_bulkItem","_bulkqty","_gold_out","_gold_qty_out","_partial_qty_out","_silver_qty_out","_needed","_activatingPlayer","_textPartIn","_textPartOut"];
// [part_out,part_in, qty_out, qty_in,"buy"]; // [part_out,part_in, qty_out, qty_in,"buy"];
_activatingPlayer = _this select 1; _activatingPlayer = _this select 1;
@@ -12,6 +12,7 @@ _textPartIn = (_this select 3) select 5;
_textPartOut = (_this select 3) select 6; _textPartOut = (_this select 3) select 6;
_traderID = (_this select 3) select 7; _traderID = (_this select 3) select 7;
_bos = 0; _bos = 0;
_bulkqty = 0;
if(_buy_o_sell == "buy") then { if(_buy_o_sell == "buy") then {
_qty = {_x == _part_in} count magazines player; _qty = {_x == _part_in} count magazines player;
@@ -48,8 +49,6 @@ if (_bulkqty >= 1) then {
}; };
}; };
_qty_out = _qty_out * 12; _qty_out = _qty_out * 12;
// gold = 36 copper // gold = 36 copper
@@ -97,11 +96,6 @@ if (_bulkqty >= 1) then {
}; };
}; };
cutText [format[("Traded %1 %2 for %3 %4"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"]; cutText [format[("Traded %1 %2 for %3 %4"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
dayzTradeResult = nil; dayzTradeResult = nil;

View File

@@ -4,7 +4,7 @@ call gear_ui_init;
_playerPos = getPosATL player; _playerPos = getPosATL player;
_item = _this; _item = _this;
_hastentitem = _this in magazines player; _hastentitem = _this in magazines player;
_location = player modeltoworld [0,2.5,0]; _location = player modeltoworld [0,1,0];
_location set [2,0]; _location set [2,0];
_building = nearestObject [(vehicle player), "HouseBase"]; _building = nearestObject [(vehicle player), "HouseBase"];
_isOk = [(vehicle player),_building] call fnc_isInsideBuilding; _isOk = [(vehicle player),_building] call fnc_isInsideBuilding;
@@ -19,6 +19,9 @@ if (!_hastentitem) exitWith {cutText [format[(localize "str_player_31"),_text,"p
//blocked //blocked
if (["concrete",dayz_surfaceType] call fnc_inString) then { _isOk = true; diag_log ("surface concrete"); }; if (["concrete",dayz_surfaceType] call fnc_inString) then { _isOk = true; diag_log ("surface concrete"); };
if (isOnRoad _playerPos) then { _isOk = true; diag_log ("surface is road"); };
if(!placevault) then { _isOk = true; diag_log ("is trader city"); };
//Block Tents in pounds //Block Tents in pounds
_objectsPond = nearestObjects [_playerPos, [], 10]; _objectsPond = nearestObjects [_playerPos, [], 10];
{ {

View File

@@ -33,7 +33,7 @@ class CfgMods
hidePicture = 0; hidePicture = 0;
hideName = 0; hideName = 0;
action = "http://www.dayepoch.com"; action = "http://www.dayepoch.com";
version = "0.85"; version = "0.87";
hiveVersion = 0.96; //0.93 hiveVersion = 0.96; //0.93
}; };
}; };
@@ -83,20 +83,20 @@ class CfgInGameUI
colorEast[] = {0,0,0,0}; //{0.95,0.7,0.7,1}; colorEast[] = {0,0,0,0}; //{0.95,0.7,0.7,1};
colorCiv[] = {0,0,0,0}; //{0.8,0.8,0.8,1}; colorCiv[] = {0,0,0,0}; //{0.8,0.8,0.8,1};
colorRes[] = {0,0,0,0}; //{0.7,0.7,0.95,1}; colorRes[] = {0,0,0,0}; //{0.7,0.7,0.95,1};
font = "EtelkaNarrowMediumPro"; font = "";
size = "( 21 / 408 )"; //"( 21 / 408 )"; size = ""; //"( 21 / 408 )";
class Columns class Columns
{ {
class Order class Order
{ {
width = 0.046; //0.046; width = 0; //0.046;
colorBg[] = {0.1,0.27,0.1,0.8}; //{0.1,0.27,0.1,0.8}; colorBg[] = {0,0,0,0}; //{0.1,0.27,0.1,0.8};
doubleLine = 0; doubleLine = 0;
}; };
class Player class Player
{ {
width = 0.25; //0.25; width = 0; //0.25;
colorBg[] = {0.1,0.23,0.1,0.8}; //{0.1,0.23,0.1,0.8}; colorBg[] = {0,0,0,0}; //{0.1,0.23,0.1,0.8};
doubleLine = 0; doubleLine = 0;
}; };
class KillsInfantry class KillsInfantry
@@ -136,9 +136,9 @@ class CfgInGameUI
}; };
class KillsTotal class KillsTotal
{ {
width = 0.1; //0.1; width = 0; //0.1;
doubleLine = 0; doubleLine = 0;
colorBg[] = {0.1,0.35,0.1,0.9}; //{0.1,0.35,0.1,0.9}; colorBg[] = {0,0,0,0}; //{0.1,0.35,0.1,0.9};
picture = "\ca\ui\data\stats_total_ca.paa"; //"\ca\ui\data\stats_total_ca.paa"; picture = "\ca\ui\data\stats_total_ca.paa"; //"\ca\ui\data\stats_total_ca.paa";
}; };
}; };

View File

@@ -221,15 +221,10 @@ if (!isDedicated) then {
dayz_spaceInterrupt = { dayz_spaceInterrupt = {
private ["_dikCode", "_handled"]; private ["_dikCode", "_handled"];
_DisplayOrDialogOrControl = _this select 0;
_dikCode = _this select 1; _dikCode = _this select 1;
_shiftState = _this select 2;
_ctrlState = _this select 3;
_altState = _this select 4;
_handled = false; _handled = false;
DoRE = ({isPlayer _x} count (player nearEntities ["AllVehicles",500]) > 1);
if (_dikCode in (actionKeys "GetOver")) then { if (_dikCode in (actionKeys "GetOver")) then {
DoRE = ({isPlayer _x} count (player nearEntities ["AllVehicles",500]) > 1);
if (canRoll && animationState player in ["amovpercmrunslowwrfldf","amovpercmrunsraswrfldf","amovpercmevaslowwrfldf","amovpercmevasraswrfldf"]) then { if (canRoll && animationState player in ["amovpercmrunslowwrfldf","amovpercmrunsraswrfldf","amovpercmevaslowwrfldf","amovpercmevasraswrfldf"]) then {
canRoll = false; canRoll = false;
null = [] spawn { null = [] spawn {
@@ -281,7 +276,9 @@ if (!isDedicated) then {
[player,15,false,(getPosATL player)] spawn player_alertZombies; [player,15,false,(getPosATL player)] spawn player_alertZombies;
}; };
if ((_dikCode == 0x38 or _dikCode == 0xB8) and (time - dayz_lastCheckBit > 10)) then { if ((_dikCode == 0x38 or _dikCode == 0xB8) and (time - dayz_lastCheckBit > 10)) then {
dayz_lastCheckBit = time;
call dayz_forceSave; call dayz_forceSave;
}; };
/* /*

View File

@@ -53,6 +53,7 @@ pz_priest = "pz_priest";
dayz_combatLog = ""; dayz_combatLog = "";
canRoll = true; canRoll = true;
placevault = true;
//Hunting Variables //Hunting Variables
dayZ_partClasses = [ dayZ_partClasses = [

View File

@@ -87,7 +87,7 @@ class RscDisplayMain : RscStandardDisplay
class DAYZ_Version : CA_Version class DAYZ_Version : CA_Version
{ {
idc = -1; idc = -1;
text = "DayZ Epoch 0.85 (1.7.5.M1D25)"; text = "DayZ Epoch 0.87 (1.7.5.M2D1)";
y = "(SafeZoneH + SafeZoneY) - (1 - 0.95)"; y = "(SafeZoneH + SafeZoneY) - (1 - 0.95)";
}; };
class CA_TitleMainMenu; class CA_TitleMainMenu;

View File

@@ -0,0 +1,20 @@
private ["_victim", "_attacker","_weapon","_distance"];
_victim = _this select 0;
_attacker = _this select 1;
if (!isPlayer _victim || !isPlayer _attacker) exitWith {};
if ((name _victim) == (name _attacker)) exitWith {};
_weapon = weaponState _attacker;
if (_weapon select 0 == "Throw") then {
_weapon = _weapon select 3;
} else {
_weapon = _weapon select 0;
};
_distance = _victim distance _attacker;
_victim setVariable["AttackedBy", _attacker, true];
_victim setVariable["AttackedByName", (name _attacker), true];
_victim setVariable["AttackedByWeapon", _weapon, true];
_victim setVariable["AttackedFromDistance", _distance, true];

View File

@@ -1,28 +0,0 @@
private["_item","_qty","_type","_meat","_loop"];
_item = _this select 0;
_qty = _this select 1;
_type = typeOf _item;
_meat = 0;
_loop = true;
_rawfoodtype = configFile >> "CfgSurvival" >> "Meat" >> _type >> "rawfoodtype";
if (local _item) then {
for "_x" from 1 to _qty do {
_item addMagazine _rawfoodtype;
};
sleep 2;
_timer = time;
while {_loop} do {
_meat = count magazines _item;
if (_meat == 0) then {_loop = false};
if ((time - _timer) > 300) then {_loop = false};
sleep 1;
};
["dayzHideBody",_item] call broadcastRpcCallAll;
sleep 10;
deleteVehicle _item;
} else {
_ehLoc = "client";
if (isServer) then { _ehLoc = "server"; };
diag_log format["gutObject EH on %1 item not local ! Type: %2",_ehLoc,str(_item)];
};

View File

@@ -1,24 +0,0 @@
private["_item","_qty","_type","_meat","_loop"];
_item = _this select 0;
_qty = _this select 1;
_type = typeOf _item;
_meat = 0;
_loop = true;
if (local _item) then {
_item addMagazine "ItemZombieParts";
sleep 2;
_timer = time;
while {_loop} do {
_meat = count magazines _item;
if (_meat == 0) then {_loop = false};
if ((time - _timer) > 300) then {_loop = false};
sleep 1;
};
["dayzHideBody",_item] call broadcastRpcCallAll;
sleep 10;
deleteVehicle _item;
} else {
_ehLoc = "client";
if (isServer) then { _ehLoc = "server"; };
diag_log format["gutObject EH on %1 item not local ! Type: %2",_ehLoc,str(_item)];
};

View File

@@ -7,16 +7,36 @@ _playerID = _this select 3;
_playerName = _this select 4; _playerName = _this select 4;
_infected = _this select 5; _infected = _this select 5;
_victim removeAllEventHandlers "MPHit";
_victim = _this select 2;
_victimName = _victim getVariable["bodyName", "nil"];
_killer = _victim getVariable["AttackedBy", "nil"];
_killerName = _victim getVariable["AttackedByName", "nil"];
if (_killerName == "nil" || _victimName == _killerName) then {
_message = format["%1 Commited Suicide Or Was Killed By A Zombie",_victimName];
_loc_message = format["KILLMSG: %1 Commited Suicide Or Was Killed By A Zombie", _victimName];
} else {
_weapon = _victim getVariable["AttackedByWeapon", "nil"];
_distance = _victim getVariable["AttackedFromDistance", "nil"];
_message = format["%1 Was Killed By %2 With A %3",_victimName, _killerName, _weapon];
_loc_message = format["KILLMSG: %1 Was Killed By %2 With A %3 From %4m", _victimName, _killerName, _weapon, _distance];
};
diag_log _loc_message;
//SHOW THE MESSAGE INGAME [GLOBAL CHAT]
[nil, nil, rspawn, [_victim, _message], { (_this select 0) globalChat (_this select 1) }] call RE;
_victim setVariable["AttackedBy", "nil", true];
_victim setVariable["AttackedByName", "nil", true];
_victim setVariable["AttackedByWeapon", "nil", true];
_victim setVariable["AttackedFromDistance", "nil", true];
dayz_disco = dayz_disco - [_playerID]; dayz_disco = dayz_disco - [_playerID];
_newObject setVariable["processedDeath",time]; _newObject setVariable["processedDeath",time];
/*
diag_log ("DW_DEBUG: (isnil _characterID): " + str(isnil "_characterID"));
if (isnil "_characterID") then {
diag_log ("DW_DEBUG: _newObject: " + str(_newObject));
};
*/
if (typeName _minutes == "STRING") then if (typeName _minutes == "STRING") then
{ {
_minutes = parseNumber _minutes; _minutes = parseNumber _minutes;
@@ -25,24 +45,9 @@ if (typeName _minutes == "STRING") then
if (_characterID != "0") then if (_characterID != "0") then
{ {
_key = format["CHILD:202:%1:%2:%3:",_characterID,_minutes,_infected]; _key = format["CHILD:202:%1:%2:%3:",_characterID,_minutes,_infected];
//diag_log ("HIVE: WRITE: "+ str(_key));
_key call server_hiveWrite; _key call server_hiveWrite;
} }
else else
{ {
deleteVehicle _newObject; deleteVehicle _newObject;
}; };
diag_log ("PDEATH: Player Died " + _playerID);
/*
_eh = [_newObject] spawn {
_body = _this select 0;
_method = _body getVariable["deathType","unknown"];
_name = _body getVariable["bodyName","unknown"];
waitUntil{!isPlayer _body;sleep 1};
_body setVariable["deathType",_method,true];
_body setVariable["bodyName",_name,true];
diag_log ("PDEATH: Player Left Body " + _name);
};
*/
//dead_bodyCleanup set [count dead_bodyCleanup,_newObject];

View File

@@ -10,6 +10,9 @@ if (isNull _playerObj) exitWith {
diag_log ("SETUP INIT FAILED: Exiting, player object null: " + str(_playerObj)); diag_log ("SETUP INIT FAILED: Exiting, player object null: " + str(_playerObj));
}; };
//Add MPHit event handler
_playerObj addMPEventHandler ["MPHit", {_this spawn fnc_plyrHit;}];
if (_playerID == "") then { if (_playerID == "") then {
_playerID = getPlayerUID _playerObj; _playerID = getPlayerUID _playerObj;
}; };

View File

@@ -21,6 +21,8 @@ server_playerSync = compile preprocessFileLineNumbers "\z\addons\dayz_server\c
zombie_findOwner = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\zombie_findOwner.sqf"; zombie_findOwner = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\zombie_findOwner.sqf";
server_updateNearbyObjects = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_updateNearbyObjects.sqf"; server_updateNearbyObjects = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_updateNearbyObjects.sqf";
server_spawnCrashSite = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_spawnCrashSite.sqf"; server_spawnCrashSite = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_spawnCrashSite.sqf";
fnc_plyrHit = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\fnc_plyrHit.sqf";
vehicle_handleInteract = { vehicle_handleInteract = {
private["_object"]; private["_object"];