summaryrefslogtreecommitdiff
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
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
-rw-r--r--npc/007-1/treasure.txt1
-rw-r--r--npc/functions/fishing.txt10
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);