Resource icon

Lockpicking mini-game v0.1

No permission to download
This is a first pitch to gather opinions and ideas.

Custom script and gumps to handle the lockpicking differently. It opens a gump with a total of 10 lock parts to chose from. In order to unlock a lock, the player must find the correct lock order. Depending on the player's skill level, the number of locks to choose from ranges from all 10 to 3 (modifiable).

The gumps are from Oblivion's lockpicking system.




To-do / future:
  • Make a better looking gump.
  • Balance and finetune the difficulty curve to better reflect initial chances to open a lock.
  • Modify the way lockpick consumption works so a player with very high skills doesn't break so many.
  • Add sound effects for a better the immersion.

How to install:
  1. Download the package.
  2. Insert the "LockpickingGump.cs" script into your project.
  3. Call the "LockpickingGump" from the "LockPick.cs" file (see below).
  4. Optional: Modify your gumparts with the included bitmaps.
  5. Optional: Modify the constants to your liking. You may also use existing gumps for a less immersive mini-game using existing buttons ID.
LockPick.cs:
protected override void OnTarget(Mobile from, object targeted)
{
    if (m_Item.Deleted)
        return;

    if (targeted is ILockpickable)
    {
        from.SendGump(new LockpickingGump((PlayerMobile)from, (ILockpickable) targeted, m_Item));
        //m_Item.BeginLockpick(from, (ILockpickable)targeted);
    }
    else
    {
        from.SendLocalizedMessage(501666); // You can't unlock that!
    }
}

I only ask that if you use this script and modify the gumps or improve its function, you share with us so we can build upon it together.

Thank you!
Author
fink
Downloads
67
Views
1,313
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from fink

Latest Updates

  1. Cleaned the code, added sound effects and a delay when checking the combination.

    Cleaned the code and renamed some variables. Added the following: 25% chance of a broken...
Back