diff options
-rw-r--r-- | npc/007-1/treasure.txt | 1 | ||||
-rw-r--r-- | npc/functions/fishing.txt | 10 |
2 files changed, 9 insertions, 2 deletions
diff --git a/npc/007-1/treasure.txt b/npc/007-1/treasure.txt index 21d4631bd..9c887ed49 100644 --- a/npc/007-1/treasure.txt +++ b/npc/007-1/treasure.txt @@ -15,6 +15,7 @@ OnInit: .sex = G_OTHER; .distance = 4; .cooldown = 200; + .bp_chance = 2; end; } diff --git a/npc/functions/fishing.txt b/npc/functions/fishing.txt index 0dd05dc9e..d7303529a 100644 --- a/npc/functions/fishing.txt +++ b/npc/functions/fishing.txt @@ -96,6 +96,9 @@ function script fishing { .@regen_time = getvariableofnpc(.cooldown, .@npc$); // cooldown for the fishing spot .@regen_time = (.@regen_time ? .@regen_time : 20); + .@bp_chance = getvariableofnpc(.bp_chance, .@npc$); // Blueprint chance + .@bp_chance = (.@bp_chance ? .@bp_chance : 1); + .@success_fx = getvariableofnpc(.success_fx, .@npc$); // effect to show on success .@success_fx = (.@success_fx ? .@success_fx : FX_SUCCESS); @@ -217,8 +220,11 @@ function script fishing { // Luck can increase up to 5% when it is at 100. // Level can increase up to 10% when it is at 100. .@boost=(readparam2(bLuk)/20)+(BaseLevel/10); - if (rand2(0, 100) < getvariableofnpc(.bait_ids[@bait_d+1], .@npc$)+.@boost) - { + .@bai=getvariableofnpc(.bait_ids[@bait_d+1], .@npc$); + // Ancient Blueprint: 0.1% BP Chance - bait weight + if (rand2(1000) < .@bp_chance*.@bai) { + .@fish_id = AncientBlueprint; + } else if (rand2(0, 100) < .@bai+.@boost) { .@fish_id = any_of(.@rare_fish); } else { .@fish_id = any_of(.@common_fish); |