diff options
author | Jesusaves <cpntb1@ymail.com> | 2019-03-07 11:37:20 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2019-03-07 11:37:20 -0300 |
commit | 919349e09023215c743186ccb8aca9f89e2310b4 (patch) | |
tree | 4bbe959bc0470d9833f8d25f0431d8cd1c71df7e /npc/008-2-6 | |
parent | 8885ac72ad393f428b25c4b0e4c1f12825eee9ad (diff) | |
download | serverdata-jesusalva/fakerandom.tar.gz serverdata-jesusalva/fakerandom.tar.bz2 serverdata-jesusalva/fakerandom.tar.xz serverdata-jesusalva/fakerandom.zip |
Make Alan's Wood Breaking pseudo-random.jesusalva/fakerandom
This means you have a fixed amount of fails, and likewise, you cannot fail
more than a certain amount of times.
These values are min 10 fails and max 30 fails per @Micksha request.
They can be tweaked at will. The code behind fake radomness is fairly simple ^.^
Diffstat (limited to 'npc/008-2-6')
-rw-r--r-- | npc/008-2-6/alan.txt | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/npc/008-2-6/alan.txt b/npc/008-2-6/alan.txt index 35d75437..92262ebf 100644 --- a/npc/008-2-6/alan.txt +++ b/npc/008-2-6/alan.txt @@ -1,8 +1,20 @@ // Evol scripts. // Author: +// Jesusalva // Micksha // Description: // Alan the bow-maker. +// Quest states (forest bow): +// [1] 0 - cannot do the quest +// [1] 1 - can do the quest +// [1] 2 - alan wants to ask jack +// [1] 3 - jack explained problem +// [1] 4 - alan asks to find wood +// [1] 5 - found perfect wood +// [1] 6 - got the bow +// [2] fail count +// [3] unused +// [t] unused 008-2-6,31,26,0 script Alan NPC_YOUNG_MAN_KFAHR,{ @@ -190,7 +202,8 @@ narrator(4, l("Alan bends the log over his knee.")); - if (rand(.success_rate) == 0) + .@fails=getq2(.quest_bow); + if (rand(.minfail, .maxfail) - .@fails <= 0) { narrator(4 | 8, l("Alan tries as hard as he can but the log won't bend.")); @@ -210,6 +223,7 @@ bow_make; end; } + setq2(.quest_bow, .@fails+1); narrator(4 | 8, l("The log breaks with a loud crack.")); @@ -282,7 +296,10 @@ OnInit: .req_esp = 10000; // amount of Esperin required to make the bow .reward_item = ForestBow; // quest reward (item) .reward_exp = 500; // quest reward (exp) - .success_rate = 20; // one in X chances to get a perfect log + + // one in X chances to get a perfect log + .minfail = 10; + .maxfail = 30; .quest_bow = HurnscaldQuests_ForestBow; .quest_shield = HurnscaldQuests_WoodenShield; |