From 20014a0c0c595aebe906229a6aabd2c283157763 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Fri, 24 Apr 2020 14:12:08 -0300 Subject: Allow LockPicking minigame to be called without thief skill check. This will be useful for Kamelot --- npc/functions/lockpicks.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'npc') diff --git a/npc/functions/lockpicks.txt b/npc/functions/lockpicks.txt index 33ee1ea4f..390a01588 100644 --- a/npc/functions/lockpicks.txt +++ b/npc/functions/lockpicks.txt @@ -10,7 +10,7 @@ // THIEF_RANK // Position on the Thief Tree -// LockPicking(num_pins, max_pins) +// LockPicking(num_pins, max_pins, min_rank=num_pins) // Returns 0 upon failure, 1 upon success // Closes script if an error happen or if you give up / cannot try. // @@ -27,13 +27,14 @@ function script LockPicking { .@d=getarg(0,1); .@m=getarg(1,3); + .@minrank=getarg(2, .@d); // Invalid Argument (kill script) if (.@d < 1 || .@m < 2 || .@m > 5) end; // You must be rank (number of locks - 1) to try - if (THIEF_RANK+1 < .@d) { + if (THIEF_RANK+1 < .@minrank) { mesc l("This lock is beyond your current capacity."), 1; close; } -- cgit v1.2.3-60-g2f50