Jump to content

working on cracking lockboxes and safes


Recommended Posts

Something i was given a LONG time ago

private ["_obj"];
     
    _CrackTime = 180; // Time in seconds it takes to crack a safe.
    _CrackOdds = 20; // Percent chance out of 100 to crack the safe.
     
    // ------- CONFIG END -------
    _ctTool = {_x == "ItemToolbox"} count items player;
    _ctCrow = {_x == "ItemCrowbar"} count items player;
    _ctWire = {_x == "ItemHotwireKit"} count magazines player;
	_obj = _this select 3;
	{player removeAction _x} forEach s_player_combi;s_player_combi = [];
    if ((_ctTool == 0) || (_ctCrow == 0) || (_ctWire == 0)) exitWith {cutText [format["You need a toolbox, crowbar, and hotwire kit to crack a safe."], "PLAIN DOWN"];};
    if ((_ctTool > 0) && (_ctCrow > 0) && (_ctWire > 0)) then
    {
            startcracking = true;
			player playActionNow "Medic";
            _dis=10;
            _sfx = "";
            [player,_sfx,0,false,_dis] call dayz_zombieSpeak;
            [player,_dis,true,(getPosATL player)] spawn player_alertZombies;
			DZE_ActionInProgress = true;
            r_interrupt = false;
            _animState = animationState player;
            r_doLoop = true;
            _started = false;
            _finished = false;
			_overallTime = time;
            while {r_doLoop} do
            {		[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
                    _animState = animationState player;
                    _isMedic = ["medic",_animState] call fnc_inString;
                    if (_isMedic) then
                    {
                            _started = true;
                    };
                    if(!_isMedic && !r_interrupt && (time - _overallTime) < _CrackTime) then
                    {
                            player playActionNow "Medic";
                            _isMedic = true;
                    };
                    if (_started && !_isMedic && (time - _overallTime) > _CrackTime) then
                    {
                            r_doLoop = false;
                            _finished = true;
                            lastBloodbag = time;
                    };
                    if (r_interrupt) then
                    {
                            r_doLoop = false;
                    };
                    sleep 0.1;
            };
           
            if (_finished) then
            {
                    if ((round(random 100)) < _CrackOdds) then
                    {
						dayz_combination = _obj getVariable["CharacterID","0"];
						dayz_selectedVault = _obj;
						_obj spawn player_unlockVault;
						player removeMagazine "ItemHotwireKit";
						cutText [format["You have cracked the safe!"], "PLAIN DOWN"];
						DZE_ActionInProgress = false;
						startcracking = false;
                    }else{
						cutText [format["You have failed to cracked the safe!"], "PLAIN DOWN"];
						player removeMagazine "ItemHotwireKit";
						DZE_ActionInProgress = false;
						startcracking = false;
					};
            } else {
                    r_interrupt = false;
                    player switchMove "";
                    player playActionNow "stop";
                    cutText [format["You have stopped cracking the safe!"], "PLAIN DOWN"];
					startcracking = false;
					DZE_ActionInProgress = false;
            };
    };
Link to comment
Share on other sites

How comes this is not deleted? It's neither a Realease, nor a ask for Help, it's just somebody pointing out nana i got something that you haven't got..

Link to comment
Share on other sites

How comes this is not deleted? It's neither a Realease, nor a ask for Help, it's just somebody pointing out nana i got something that you haven't got..

How is this bragging about what he has?

He's showing what he's working on, not putting it in anybodies face.

It just seems like you're salty because you don't have this script.

Link to comment
Share on other sites

I would like to point out how wrong UKMartin is about this post! After joining loki's TeamSpeak and seeing His work in action this script is Brilliant and we will be using it on are server with his consent! So if you would like to come over to ZeroDayz Server and check it out it works great. I would also recommend jumping on Loki's TeamSpeak and talking with him if you are interested in using this script. He has been very helpful with are server and was a pleasure to chat with.

Link to comment
Share on other sites

I would like to point out how wrong UKMartin is about this post! After joining loki's TeamSpeak and seeing His work in action this script is Brilliant and we will be using it on are server with his consent! So if you would like to come over to ZeroDayz Server and check it out it works great. I would also recommend jumping on Loki's TeamSpeak and talking with him if you are interested in using this script. He has been very helpful with are server and was a pleasure to chat with.

THANKS MATE :)

Link to comment
Share on other sites

I used it for a few months, ended up having players quit due to being able to loose everything they had gained

not worth it imo

That is correct, I have 0000 reset, but thats controllable by the safe owner. Cracking safes shouldn't be as easy as unlocking vehicles.

Link to comment
Share on other sites

  • 2 weeks later...

i am working on a mod so people can crack a safe/lockbox with a few tools on ur person :) its close to being done a few more tests then i show ya 

 

The safes were supposed to be the only way to keep your items safe...... why would you want to change that???  :huh:

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Discord

×
×
  • Create New...