added randomly comsumable toolbox for cracking vaults, tweaks to allow
interaction with large boats/helicopters. Changed kill message to use
title text instead of global chat.
This commit is contained in:
vbawol
2013-02-03 09:44:50 -06:00
parent 6cdcf6c094
commit ad3ad6e642
6 changed files with 36 additions and 24 deletions

View File

@@ -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,10 +226,12 @@ 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(_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, "",""];
};
};
};
} else {
player removeAction s_player_unlockvault;
@@ -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 (_isMan and !_isPZombie and (s_last_trader != _traderType) 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;
};
};
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;

View File

@@ -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,8 +21,16 @@ 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 {
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"];
};
};
};
@@ -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;

View File

@@ -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
};
};

View File

@@ -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;

View File

@@ -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</STATEINIT""">*/;
"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</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{

View File

@@ -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];