summaryrefslogtreecommitdiff
path: root/npc/functions
diff options
context:
space:
mode:
Diffstat (limited to 'npc/functions')
-rw-r--r--npc/functions/fishing.txt10
1 files changed, 8 insertions, 2 deletions
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);