Jump to content

1.6 [ Remake of Hotwire Safes/Lockboxes]


juandayz

Recommended Posts

INSTALL:

1-You need a custom fn_selfactions.sqf

  Reveal hidden contents

2-In a custom variables.sqf

  Reveal hidden contents

3-Create forcevault.sqf (  drop into mpmissions\yourinstance\scripts\ )

  Reveal hidden contents

and its done. Remember you need have a itemhotwire in your inventory.

Link to comment
Share on other sites

Haven't had time to test it yet, does anyone know if this has the dupe fix in it? I remember on a server I played on that used this script back a few years ago I found a dupe that you could get the scroll wheel option, put the hotwire kit in your backpack with the option to hotwire still, and then click the hotwire option and boom... duped.

Link to comment
Share on other sites

@PillBox_ Maybe I didn't explain correctly. (On the server I played on) After having it in your main inventory, you get the option to crack safe BUT do not click option yet. Then while still looking at the safe, open gear and put the hotwire kit in your backpack. Close your gear while still facing the safe and the option would still be there, then act as if it was there the whole time and still have a X% chance of opening...

In the old version of this

, someone reported the same dupe and I believe it was SchwEde or another user told him he must have installed it wrong because there was a check for that kind of dupe; yet, I saw the same dupe on the server I played on...

Link to comment
Share on other sites

  • 1 month later...

@PillBox_ and @looter809

If you have not fix it yet, just put a test if the player has a hotwire kit in the script at the beginning like that:

private ["_hasHotwire","_vault","_isunlockable","_open","_SetChanceToFail"];

_hasHotwire = "ItemHotwireKit" in magazines player;

if (!_hasHotwire) exitwith { dayz_actionInProgress = false; "You need a hotwire kit to crack a vault" call dayz_rollingMessages;};

.
.
.
...rest of the script

 

Link to comment
Share on other sites

  On 3/10/2017 at 12:47 PM, A Man said:

@PillBox_ and @looter809

If you have not fix it yet, just put a test if the player has a hotwire kit in the script at the beginning like that:

private ["_hasHotwire","_vault","_isunlockable","_open","_SetChanceToFail"];

_hasHotwire = "ItemHotwireKit" in magazines player;

if (!_hasHotwire) exitwith { dayz_actionInProgress = false; "You need a hotwire kit to crack a vault" call dayz_rollingMessages;};

.
.
.
...rest of the script

 

Expand  

the scroll menu in fn_selfactions have this restricttion... if thers no itemhotwire,, the option dsnt show... but anyway i think youre way its better. Cuz with the restriction on scroll menu the option to crack its hidden.. but if u put in on a client side script then allow everybody to know that the option to crack is allowed.

So a change for it:

in fn_selfactions

  Reveal hidden contents

in forcevault.sqf

  Reveal hidden contents

 

Link to comment
Share on other sites

I was able to replicate the dupe, all I needed was the hot wire on me, and then quickly place it inside my backpack or drop it. It would give me the hot wire vault option for a millisecond, but once i hit it, I was able to hot wire the safe. To fix this, do exactly what @A Man said, just add a check to see if the player has a hot wire in their inventory.

if !("ItemHotwireKit" in magazines player) exitwith {    
	cutText [format["No hotwire in inventory."],"PLAIN DOWN"];
};

also, at the very end, add this:

dayz_combination = _vault getVariable["CharacterID","0"];
_vault spawn player_unlockVault;
DZE_ActionInProgress = false;

and remove:

call compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\vault_unlock.sqf";

so here's the fixed version:

private ["_vault","_isunlockable","_open","_SetChanceToFail"];

_vault = _this select 3;
_isunlockable = (((typeOf _vault) == "VaultStorageLocked") || ((typeOf _vault) == "LockboxStorageLocked"));
_open= round(random 10);
_SetChanceToFail = 9;//Value*10 for percentage chance of failure

player removeAction s_player_hotwirevault;
s_player_hotwirevault = -1;

if !("ItemHotwireKit" in magazines player) exitwith {    
	_msg = "No hotwire in inventory."; 
	systemChat ("Server: "+str _msg);
};

dayz_actionInProgress = true;
player removeMagazine "ItemHotwireKit";

if (_isunlockable) then {

if (_open < _SetChanceToFail)  exitWith {
	dayz_actionInProgress = false;
	_msg = "Bad Luck, i could not open it and broke the Hotwire Kit."; 
	systemChat ("Server: "+str _msg);
};

_msg = "Done! I have opened the vault."; 
systemChat ("Server: "+str _msg);
dayz_combination = _vault getVariable["CharacterID","0"];
_vault spawn player_unlockVault;
DZE_ActionInProgress = false;
};

 

Link to comment
Share on other sites

  • 2 months later...
  On 1/20/2017 at 10:55 PM, juandayz said:

This is a rewrite for the old Hotwire Safese/eLockboxes .. all credits for @SchwEde

Fixes by @A Man and @Shawn was added. (tnks guys)

And is fully dedicate for @PillBox_ remake it was his idea!

 

INSTALL:

1-You need a custom fn_selfactions.sqf

  Reveal hidden contents

2-In a custom variables.sqf

  Reveal hidden contents

3-Create forcevault.sqf (  drop into mpmissions\yourinstance\custom )

  Reveal hidden contents

and its done. Remember you need have a itemhotwire in your inventory.

See ya epoch communty im going on vacations

Expand  

Is there a way to enable some sort of logging for when a player attempts/succeeds with this?

Link to comment
Share on other sites

  • 3 weeks later...

@DieTanx

If your using my bomb objects you can use the messages in player_bombobject.sqf

eg.

  Reveal hidden contents

 

Link to comment
Share on other sites

  On 6/12/2017 at 1:36 AM, oldmatechoc said:

@DieTanx

If your using my bomb objects you can use the messages in player_bombobject.sqf

eg.

  Reveal hidden contents

 

Expand  

Cheers, this works great!
21:02:11 "[CRACKSAFE_LOG] SlashnDash (XXXXXXXXXXXXXXXXXX) IS TRYING TO BREAK INTO A SAFE OR LOCKBOX @ 070065  Owner: XXXXXXXXXXXXXXXXXX"
21:02:14 "[CRACKSAFE_LOG] SlashnDash (XXXXXXXXXXXXXXXXXX) IS TRYING TO BREAK INTO A SAFE OR LOCKBOX @ 070065  Owner: XXXXXXXXXXXXXXXXXX"
21:02:16 "[CRACKSAFE_LOG] SlashnDash (XXXXXXXXXXXXXXXXXX) HAS BROKEN INTO A SAFE OR LOCKBOX @ 070065  Owner: XXXXXXXXXXXXXXXXXX"

Link to comment
Share on other sites

  • 3 weeks later...

If anyone is looking for a version like Schwedes that had separate chances for hotwiring lockboxes and safes, I made a version that had that functionality:

  Reveal hidden contents

Code may be a little unoptimized but hey, it works :)

Link to comment
Share on other sites

  • 2 months later...

Hey Juan, I added locked base doors to the vaults list/array not sure what to call it, but they don't work, any ideas on how I can get it to work on locked base doors the same way as safes? Here's how I edited the code, just added to it, the safes still work but nothing on the doors

_isunlockable = (((typeOf _vault) == "VaultStorageLocked") || ((typeOf _vault) == "LockboxStorageLocked") || ((typeOf _vault) == "CinderWallDoorSmallLocked_DZ") || ((typeOf _vault) == "CinderWallDoorLocked_DZ"));

 

Before using the locked door classnames I tried itemComboLock with no luck

Could I add those classnames to this to make it work? --> _vault = _this select 3;

Link to comment
Share on other sites

  On 9/21/2017 at 4:24 AM, _Lance_ said:

Hey Juan, I added locked base doors to the vaults list/array not sure what to call it, but they don't work, any ideas on how I can get it to work on locked base doors the same way as safes? Here's how I edited the code, just added to it, the safes still work but nothing on the doors

_isunlockable = (((typeOf _vault) == "VaultStorageLocked") || ((typeOf _vault) == "LockboxStorageLocked") || ((typeOf _vault) == "CinderWallDoorSmallLocked_DZ") || ((typeOf _vault) == "CinderWallDoorLocked_DZ"));

 

Before using the locked door classnames I tried itemComboLock with no luck

Could I add those classnames to this to make it work? --> _vault = _this select 3;

Expand  

That wont work, doors use a different system to unlock.

Link to comment
Share on other sites

  On 9/21/2017 at 3:08 PM, juandayz said:

Remember a version for doors maded by oldmatechoc.

Expand  

I thought about adding the doors to the "non-god-mode-base" array but on a full mili server it only takes 3 shots from an RPG to drop doors which is way too easy. I'll do some searching for oldmatechoc at lunch and hopefully I can update anything I find, I'll let you know how it turns out. Thanks Juan!

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Discord

×
×
  • Create New...