diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-02-25 10:56:43 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-02-25 10:56:43 -0300 |
commit | aa2ba120465fd265526dac744daf60b8603b4f00 (patch) | |
tree | c6a20fedacf60e13acaa644daba6d49c5b3f16e2 /npc/functions | |
parent | 119bcaa618235378d045474c1424872715431d0a (diff) | |
download | serverdata-aa2ba120465fd265526dac744daf60b8603b4f00.tar.gz serverdata-aa2ba120465fd265526dac744daf60b8603b4f00.tar.bz2 serverdata-aa2ba120465fd265526dac744daf60b8603b4f00.tar.xz serverdata-aa2ba120465fd265526dac744daf60b8603b4f00.zip |
Livio Patch's: You can now escape from the cops (max. 40% runaway chance)
Diffstat (limited to 'npc/functions')
-rw-r--r-- | npc/functions/lockpicks.txt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/npc/functions/lockpicks.txt b/npc/functions/lockpicks.txt index 879c3b334..78878eaf6 100644 --- a/npc/functions/lockpicks.txt +++ b/npc/functions/lockpicks.txt @@ -115,3 +115,15 @@ function script LockPicking { THIEF_EXP += 1; return 0; } + +// Script helper to say if you were arrested or not +function script ArrestedChances { + .@runaway=limit(0, readbattleparam(bLuk)+readbattleparam(bAgi), 200); // 20% + .@runaway+=is_night()*125; // 12.5% + .@runaway+=limit(0, THIEF_RANK*15, 100); // real max 7.5% + // Max runaway chance: 40% + if (rand2(1000) < .@runaway) + return false + return true +} + |