Myth: Everyone has a chance to successfully lockpick a car.
Most likely only players with a luck trait higher than 1 or with a high lockpick skill can succeed in breaking into a car.
Algorithm for lockpicking a car:*[1]
min chance = RoundDown(luck / 2)
So if you have 1 luck then your min. chance is 0%,
if you have 2 luck then your min. chance is 1%,
for 10 luck it's 5%.
base chance = lockpick skill - 200
bonuses:
lockpick in active slot >>> base chance + 25
expanded lock pick in active slot >>> base chance + 50
If base chance is smaller than min chance it is set to min chance.
If base chance exceedes 100 then it is set to 95.
So if you have lockpick skill below 200 and no tool then your chance is equal to min chance.
If your skill is for example 220 then your chance to lock pick a car is 20%.
If your skill is for example 250 and you use super lock pick then your base chance is equal to 100 but max chance is set to 95% so it is 95% in the end.
*there is a possibility that the algorithm was changed by fonline2238 team.
Reference
1. The corresponding fragment of a source code from http://svn.xp-dev.com/svn/fonline_sdk/Server/scripts/car.fos
bool UseSkillOnCar( Critter& cr, Item& car, int skill ) // Export
{
(...)
else if( skill == SK_LOCKPICK )
{
if( cr.Timeout[ TO_SK_LOCKPICK ] > 0 )
{
cr.SayMsg( SAY_NETMSG, TEXTMSG_GAME, STR_SKILL_WEARINESS );
return true;
}
if( _CarIsNoLockpick( car ) )
{
cr.SayMsg( SAY_NETMSG, TEXTMSG_GAME, STR_SKILL_LOCKPICK_FAIL );
return true;
}
int base = cr.Skill[ SK_LOCKPICK ] - 200;
uint8 mode = 0;
uint16 activePid = cr.GetSlotProto( SLOT_HAND1, mode ).ProtoId;
if( activePid == PID_LOCKPICKS )
{
base += 25;
if( Random( 0, 30 ) == 0 )
cr.DeleteItem( PID_LOCKPICKS, 1 );
}
else if( activePid == PID_EXP_LOCKPICK_SET )
{
base += 50;
if( Random( 0, 30 ) == 0 )
cr.DeleteItem( PID_EXP_LOCKPICK_SET, 1 );
}
int minChance = cr.Stat[ ST_LUCK ] / 2;
base = CLAMP( base, minChance, 95 );
if( base >= Random( 1, 100 ) && car.LockerId != 1 )
{
DriveToGlobal( cr, car, true );
cr.StatBase[ ST_EXPERIENCE ] += 200;
cr.AddScore( SCORE_CRACKER, 1 );
Item@ key = cr.GetItem( PID_KEY, SLOT_HAND1 );
if( not valid( key ) )
@key = cr.GetItem( PID_KEY, SLOT_HAND2 );
if( valid( key ) )
key.LockerId = car.LockerId;
}
else
{
cr.SayMsg( SAY_NETMSG, TEXTMSG_GAME, STR_SKILL_LOCKPICK_FAIL );
}
cr.TimeoutBase[ TO_SK_LOCKPICK ] = LOCKPICK_TIMEOUT( cr );
}
(...)
}