summaryrefslogtreecommitdiff
path: root/npc/functions
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-09-13 17:40:24 -0300
committerJesusaves <cpntb1@ymail.com>2019-09-13 17:40:24 -0300
commitbeae655236dca8a2453e135e4e0acf9455c061be (patch)
tree50323be6e5f4483924dc5d703a1c1d5986e67f34 /npc/functions
parent7a3255b162221fb3fab4a91eea6af10b76b1e658 (diff)
downloadserverdata-beae655236dca8a2453e135e4e0acf9455c061be.tar.gz
serverdata-beae655236dca8a2453e135e4e0acf9455c061be.tar.bz2
serverdata-beae655236dca8a2453e135e4e0acf9455c061be.tar.xz
serverdata-beae655236dca8a2453e135e4e0acf9455c061be.zip
[Tentacles] when fishing now have 1% chance for [Ancient Blueprint]
Dungeon Fishing (Tulimshar mines) double this value
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);