diff options
-rw-r--r-- | npc/items/mercenary.txt | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/npc/items/mercenary.txt b/npc/items/mercenary.txt index c87081760..15060795d 100644 --- a/npc/items/mercenary.txt +++ b/npc/items/mercenary.txt @@ -14,9 +14,15 @@ function script merc_boxset { .@s1=getarg(4,0); .@sumup=.@s5+.@s4+.@s3+.@s2+.@s1; + /* I wonder if this is needed...? + .@s4+=.@s5; + .@s3+=.@s4; + .@s2+=.@s3; + .@s1+=.@s2; + */ // Make the seed. More level and luck increases odds of higher rarity - .@seed=rand(0, .@sumup)-BaseLevel-readparam(bLuk); + .@seed=max(0, rand(0, .@sumup)-BaseLevel-readparam(bLuk)); // 5 ★ if (.@seed < .@s5) { @@ -40,7 +46,7 @@ function script merc_boxset { .@n=any_of(.@r); } - getitem .@r[.@n], 1; + getitem .@n, 1; return; } |