Jump to content

[Release] AutoLockPicker (Unlock script for vehicles and locked doors)


second_coming

Recommended Posts

Rejoice, AutoLockPicker v1.2 is here!

What is it? I hear you ask.

It's a lock picking script which can unlock locked doors, lock boxes and locked vehicles.

 

What's Changed Since v1.1?

 

Now uses cursortarget to be more accurate in selecting the target.

The option to attach a lock pick should only become available if the door or vehicle you are targeting is locked for you.

Added more user configurable settings:

 

// Which locks can be opened
LockpickLandVehicles        = true;                    // All land vehicles (cars, vans, trucks etc)   ::: acceptable values true or false
LockpickAir                 = true;                    // Helis and jets   ::: acceptable values true or false
LockpickShip                = true;                    // Boats, jetskis and submarines   ::: acceptable values true or false
LockpickEpochDoors          = true;                    // Epoch build-able doors   ::: acceptable values true or false
 
// Chance to succeed or be electrocuted
SuccessChanceVehicles         = 20;                      // (Between 1-100) % Chance to successfully pick the lock
SuccessChanceEpochDoors       = 20;                      // (Between 1-100) % Chance to successfully pick the lock
ElectrocuteChance           = 10;                      // (Between 1-100) % Chance of electrocution on if the lock pick fails
 
// Damage Settings
InflictDamage               = true;                    // If true damage is added, if false just stun 
MinimumDamage               = 50;                      // (Between 1-100) min% of full health Damage to inflict must be less than MaximumDamage
MaximumDamage               = 90;                      // (Between 1-100) max% of full health Damage to inflict must be more than MinimumDamage
StunTime                    = 15;                      // Time in seconds to stun the player on electrocution (if it doesn't kill them)
 
// Materials Required to Create AutoLockPicker
EnergyRequired              = 100;                     // Amount of energy expended operating AutoLockPicker (0 for zero energy required)
MaterialRequired1           = 'CircuitParts';          // First material required to create AutoLockPicker (default is 'CircuitParts' or Electronic Component)
MaterialRequired1Count      = 1;
MaterialRequired2           = 'ItemCorrugated';        // Second material required to create AutoLockPicker (default is 'ItemCorrugated' or small metal parts)
MaterialRequired2Count      = 1; 

// Usage Restrictions
AllowInSafeZone             = false;                   // (Leave true if you don't use inSafezone) Allow use of AutoLockPicker in safezones 
                                                       // (using the boolean variable inSafezone set here
                                                       // http://epochmod.com/forum/index.php?/topic/32555-extended-safezone-script-working/)

_MinimumPlayers             = 0;                       // Number of players required online before the option to lock pick becomes available (set to 0 to always allow)
AllowLockPicksNear          = false;                   // (Leave true for no restriction) selecting false will make the script check if one has been placed within 5m of the player
 
 

How does it work?

(On default settings) the script has a 20% chance to successfully unlock any locked door or vehicle and a 10% chance to electrocute the player causing between 50% and 90% overall damage and giving some funky sound and visual effects :)

It uses 1 x Electronic Components and 1 x Small Salvage Metal to be able to activate the AutoLockPicker (which are consumed in the attempt to unlock).

If you are carrying both items and are next to a door or vehicle you get a scroll wheel action to attach the AutoLockPicker. Then use the mousewheel again to select to activate the AutoLockPicker.

Credits:

The starting point for this script was StealthSticks ExplosivestoVehicle script (http://www.armaholic.com/page.php?id=21652)

Electrocution visual after effects are from here http://www.altisliferpg.com/topic/224-effects-on-marijuana-use/

 

https://www.youtube.com/watch?v=OinUNGW6eAA

I have also created a modified version of Leighams ud.pbo () to handle the unlocking of vehicles as it has to be done server side otherwise they just relock within a few seconds.

(If you already use ud.pbo this will not clash with it)

I'm sold, how do I Install this badboy?

Step 1: Add the required Battleye Filters:

Add the following to publicvariable.txt

!="AUTOLOCKPICK"
Add the following to attachto.txt

!"Land_PortableLongRangeRadio_F"
Add the following to scripts.txt:

 

line 1 (BIS_fnc_)

!"call BIS_fnc_SetPitchBank"
Around line 5 (attachTo)

7 attachTo !"_autolockpick attachTo [_unit,[0,0,0]," !"_autolockpick attachTo [_nearVehicle, [0,0,0.2]];"
Around line 21 (exec)

7 execVM !"AutoLockPicker.sqf"
Around line 19 (playableunits)

!="if(AllowInSafeZone && count playableUnits >= _MinimumPlayers) then"
Around line 47 (setDamage)

!="player setDamage 1;"
If I have missed any filters let me know and I will add them here.

 

Step 2: Mission Installation

Place AutoLockPicker.sqf in your mission file and add a call for it to your mission file (I initialise it from onPlayerRespawn.sqf):

Here is the onPlayerRespawn.sqf I use: (if you don't already have an onPlayerRespawn.sqf just copy the one supplied in the download into your mission folder)

if (!isDedicated and hasInterface) then 
{
	waitUntil {alive vehicle player};	
	waitUntil {typeOF player != "VirtualMan_EPOCH"};			

	// Activate AutoLockPicker
	[] execVM "AutoLockPicker.sqf";	
	systemchat("AutoLockPicker activated...");
};
Edit your description.ext and add the following:

class CfgSounds
{
	class shocker
	{
		name = "electrocute";
		// filename, volume, pitch
		sound[] = {"sounds\electrocute.ogg", 1, 1};
		titles[] = {};
	};		
};
Then create a folder called sounds in your mission folder and copy electrocute.ogg inside it (from the download)

 

Step 3: Install the Server side addon

Place a3_epoch_autolockpicker.pbo in @epochhive/addons

Step 4: All done! YAY!

DOWNLOAD HERE

Link to comment
Share on other sites

I wrote already in craft a bike, addaction works.... every script work with the stock ah..... the ug addon.... all addactions.....

 

the "special trader" on my server work with addaction

 

special trader = strider and irfrit, but do not save after restart.... (players like it)   or my 4th or 5th portal work with a addaction... no problem with the stock ah....only zuba hud builder dont work for the players....

Link to comment
Share on other sites

Hi, great script, very nice!!!

 

 

I´m testing it, To me in order to make it work, it was necessary to add this to script.txt:

 

7 setDamage !"resetCamShake" !"radialBlur" !"AutoLockPicker.sqf"

 

 

I got successfuly unlocked/open a wall door, but I noticed that once it´s locked it is not possibleto close it back. Is that right ?

Link to comment
Share on other sites

I got successfully unlocked/open a wall door, but I noticed that once it´s locked it is not possible to close it back. Is that right ?

 

It opens the doors by forcing the animation for 'open door', it doesn't actually unlock the door as the person picking the lock is not authorised to open it. You are just forcing the door open temporarily.

 

Also, I take it that it was the locked wooden door? I tested it on both that and the garage door and was able to close the garage door after picking the lock (effectively relocking it) but the wooden door is not able to be opened/closed until after server restart (although if you have you base broken into you could try moving the wall and replacing it to see if it resets the door).

Link to comment
Share on other sites

Tested this on a vehicle and it didn't work properly.  I placed the lockpick and then activated it.  I got a message saying it was successful but the vehicle remained locked.

 

It can sometimes take several seconds for the vehicle to register as unlocked. Have you managed to successfully unlock any vehicles?

Link to comment
Share on other sites

I'm stumped lol

 

03.04.2015 09:33:29: [ASM] Liqu1dShadow (83.122.22.149:2304) 137xxxxxxxxxxxxxxxxxxxxxd0e - #0 "andom1 = random 180;
[_autolockpick,_random0,_random1] call BIS_fnc_SetPitchBank;
[_autolockpick,_nearVehicle,_unit,_random0,_ra"

 

Is it this?

!="andom1 = random 180;[_autolockpick,_random0,_random1] call BIS_fnc_SetPitchBank;[_autolockpick,_nearVehicle,_unit,_random0,_ra"

Link to comment
Share on other sites

I had the same issue as Darth where base's unlocked fine but vehicles are a no go even with the successful message.  I left it at that due to the fact I wasn't going to use it on my main server anyway just wanted to check it  out.  This is all using infiSTAR so I might look at it later if I get time.

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
×
×
  • Create New...