diff --git a/dayz_code/compile/fn_selfActions.sqf b/dayz_code/compile/fn_selfActions.sqf index 6a7e6286c..0f5694185 100644 --- a/dayz_code/compile/fn_selfActions.sqf +++ b/dayz_code/compile/fn_selfActions.sqf @@ -65,14 +65,13 @@ if(_isPZombie) then { }; -if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4)) then { //Has some kind of target +if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 6)) then { //Has some kind of target _isHarvested = cursorTarget getVariable["meatHarvested",false]; _isVehicle = cursorTarget isKindOf "AllVehicles"; _isVehicletype = typeOf cursorTarget in ["ATV_US_EP1","ATV_CZ_EP1"]; _isMan = cursorTarget isKindOf "Man"; _traderType = typeOf cursorTarget; _ownerID = cursorTarget getVariable ["characterID","0"]; - diag_log ("owner = " + str(_ownerID) + " of " + str(cursorTarget)); _isAnimal = cursorTarget isKindOf "Animal"; _isDog = (cursorTarget isKindOf "DZ_Pastor" || cursorTarget isKindOf "DZ_Fin"); _isZombie = cursorTarget isKindOf "zZombie_base"; @@ -94,7 +93,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4)) if (_hasFuelE) then { _isFuel = (cursorTarget isKindOf "Land_Ind_TankSmall") or (cursorTarget isKindOf "Land_fuel_tank_big") or (cursorTarget isKindOf "Land_fuel_tank_stairs") or (cursorTarget isKindOf "Land_fuel_tank_stairs_ep1") or (cursorTarget isKindOf "Land_wagon_tanker") or (cursorTarget isKindOf "Land_fuelstation") or (cursorTarget isKindOf "Land_fuelstation_army"); }; - //diag_log ("OWNERID = " + _ownerID + " CHARID = " + dayz_characterID + " " + str(_ownerID == dayz_characterID)); + // diag_log ("OWNERID = " + _ownerID + " CHARID = " + dayz_characterID + " " + str(_ownerID == dayz_characterID)); //Allow player to delete objects if(_isDestructable and _hasToolbox and _canDo) then { @@ -227,8 +226,10 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4)) s_player_unlockvault = player addAction ["Unlock Vault", "\z\addons\dayz_code\actions\vault_unlock.sqf",cursorTarget, 0, false, true, "",""]; }; } else { - if ((s_player_unlockvault < 0) and (player distance cursorTarget < 3)) then { - s_player_unlockvault = player addAction ["Crack Vault", "\z\addons\dayz_code\actions\vault_unlock.sqf",cursorTarget, 0, false, true, "",""]; + if(_hasToolbox) then{ + if ((s_player_unlockvault < 0) and (player distance cursorTarget < 3)) then { + s_player_unlockvault = player addAction ["Crack Vault", "\z\addons\dayz_code\actions\vault_unlock.sqf",cursorTarget, 0, false, true, "",""]; + }; }; }; @@ -273,7 +274,6 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4)) if (s_player_repair_crtl < 0) then { _vehicle = cursorTarget; - dayz_myCursorTarget = _vehicle; _menu = dayz_myCursorTarget addAction ["Repair Vehicle", "\z\addons\dayz_code\actions\repair_vehicle.sqf",_vehicle, 0, true, false, "",""]; @@ -300,13 +300,9 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4)) // All Traders - if (_isMan and !_isPZombie and _traderType in serverTraders) then { - - if((!isNil "s_last_trader") and s_player_parts_crtl == 1) then { - if(s_last_trader != _traderType) then { - s_player_parts_crtl -1; - }; - }; + if (_isMan and !_isPZombie and (s_last_trader != _traderType) and _traderType in serverTraders) then { + + s_last_trader = _traderType; if (s_player_parts_crtl < 0) then { @@ -349,11 +345,12 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4)) }; s_player_parts_crtl = 1; - s_last_trader = _traderType; + }; } else { {player removeAction _x} forEach s_player_parts;s_player_parts = []; s_player_parts_crtl = -1; + s_last_trader = objNUll }; @@ -437,7 +434,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4)) //s_player_madsci_crtl = -1; s_player_parts_crtl = -1; - s_last_trader = -1; + s_last_trader = objNull; // lock unlock vehicles s_player_lockUnlock_crtl = -1; diff --git a/dayz_code/compile/player_unlockVault.sqf b/dayz_code/compile/player_unlockVault.sqf index 35a106255..d67c55fb6 100644 --- a/dayz_code/compile/player_unlockVault.sqf +++ b/dayz_code/compile/player_unlockVault.sqf @@ -1,7 +1,7 @@ /* [_obj] spawn player_unlockVault; */ -private["_objectID","_objectUID","_obj","_ownerID","_dir","_pos","_bag","_holder","_weapons","_magazines","_backpacks","_objWpnTypes","_objWpnQty","_countr"]; +private ["_objectID","_objectUID","_obj","_ownerID","_dir","_pos","_holder","_weapons","_magazines","_backpacks","_objWpnTypes","_objWpnQty","_countr","_allowunlock","_alreadyPacking","_item","_hasToolbox"]; _obj = _this; _ownerID = _obj getVariable["CharacterID","0"]; _objectID = _obj getVariable["ObjectID","0"]; @@ -10,6 +10,10 @@ player playActionNow "Medic"; player removeAction s_player_unlockvault; +_item = "ItemToolbox"; +_hasToolbox = _item in items player; + + _allowunlock = false; if (_ownerID == dayz_playerUID) then { _allowunlock = true; @@ -17,10 +21,18 @@ if (_ownerID == dayz_playerUID) then { // do random roll to try to unlock vault // start low to test figure out what works later - if(round (random 100000) == 1337) then { - _allowunlock = true; + if(_hasToolbox) then { + if(floor (random 10000) == 1337) then { + _allowunlock = true; + + }; + // Chance to break toolbox randomly + if(floor (random 15) == 1) then { + player removeWeapon _item; + cutText ["Your toolbox is now broken, you will need to find another one.", "PLAIN DOWN"]; + }; }; - + }; if(_allowunlock) then { @@ -92,7 +104,7 @@ if(_allowunlock) then { cutText ["This vault has been unlocked", "PLAIN DOWN"]; } else { player playActionNow "Medic"; - sleep 1; + sleep 3; [player,"repair",0,false] call dayz_zombieSpeak; null = [player,50,true,(getPosATL player)] spawn player_alertZombies; sleep 5; diff --git a/dayz_code/config.cpp b/dayz_code/config.cpp index 0f06f879a..498de0aa1 100644 --- a/dayz_code/config.cpp +++ b/dayz_code/config.cpp @@ -33,7 +33,7 @@ class CfgMods hidePicture = 0; hideName = 0; action = "http://www.dayzepoch.com"; - version = "0.9"; + version = "0.91"; hiveVersion = 0.96; //0.93 }; }; diff --git a/dayz_code/rscTitles.hpp b/dayz_code/rscTitles.hpp index ace3eeca8..e86652090 100644 --- a/dayz_code/rscTitles.hpp +++ b/dayz_code/rscTitles.hpp @@ -87,7 +87,7 @@ class RscDisplayMain : RscStandardDisplay class DAYZ_Version : CA_Version { idc = -1; - text = "DayZ Epoch 0.9 (1.7.5)"; + text = "DayZ Epoch 0.91 (1.7.5)"; y = "(SafeZoneH + SafeZoneY) - (1 - 0.95)"; }; class CA_TitleMainMenu; diff --git a/dayz_code/system/player_monitor.fsm b/dayz_code/system/player_monitor.fsm index ef2624f06..020d1214a 100644 --- a/dayz_code/system/player_monitor.fsm +++ b/dayz_code/system/player_monitor.fsm @@ -544,7 +544,7 @@ class FSM "selectNoPlayer;" \n "" \n "_myTime = time;" \n - "1 cutText [""This server is running an incorrect version of the server side application. You cannot play on this server. If you are the server admin please contact DayZ staff."", ""PLAIN"",5];"/*%FSM*/; + "1 cutText [""This server is running an incorrect version of the server side application. You cannot play on this server. If you are the server admin please contact DayZepoch.com staff."", ""PLAIN"",5];"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { diff --git a/dayz_server/compile/server_playerDied.sqf b/dayz_server/compile/server_playerDied.sqf index d1701408c..b1cb3b9d1 100644 --- a/dayz_server/compile/server_playerDied.sqf +++ b/dayz_server/compile/server_playerDied.sqf @@ -27,7 +27,10 @@ if (_killerName == "nil" || _victimName == _killerName) then { diag_log _loc_message; //SHOW THE MESSAGE INGAME [GLOBAL CHAT] -[nil, nil, rspawn, [_victim, _message], { (_this select 0) globalChat (_this select 1) }] call RE; +// [nil, nil, rspawn, [_victim, _message], { (_this select 0) globalChat (_this select 1) }] call RE; + +//SHOW THE MESSAGE INGAME [TITLE TEXT] +[nil,nil,rTITLETEXT,_message,"PLAIN DOWN"] call RE; _victim setVariable["AttackedBy", "nil", true]; _victim setVariable["AttackedByName", "nil", true];