summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
Diffstat (limited to 'npc')
-rw-r--r--npc/functions/lockpicks.txt15
1 files changed, 14 insertions, 1 deletions
diff --git a/npc/functions/lockpicks.txt b/npc/functions/lockpicks.txt
index 72811d7f9..88171c3dd 100644
--- a/npc/functions/lockpicks.txt
+++ b/npc/functions/lockpicks.txt
@@ -70,8 +70,14 @@ function script LockPicking {
rif(.@m >= 5, l("Apply very strong pressure")), 5,
l("Give up!"), 0;
- if (!@menuret)
+ if (!@menuret) {
+ // 10% chance to save the lockpick
+ if (rand(1,10) == 7)
+ getitem Lockpicks, 1;
+ else
+ dispbottom l("The lockpick broke.");
close;
+ }
// Is your guess correct?
if (@pins[@pos] == @menuret) {
@@ -86,6 +92,13 @@ function script LockPicking {
}
if (@pos >= .@d) {
+ // 10% chance to save the lockpick
+ if (rand(1,10) == 7)
+ getitem Lockpicks, 1;
+ else
+ dispbottom l("The lockpick broke.");
+
+ // Get EXP and inform the success
THIEF_EXP += .@d*.@m-THIEF_RANK;
return 1;
}