From d7d377939975609d65812679115983767de7da14 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sun, 16 Dec 2018 13:56:02 -0200 Subject: Minor rework to how rare-fish fishing goes --- npc/functions/fishing.txt | 21 +++++++++------------ npc/functions/instances.txt | 4 ++-- 2 files changed, 11 insertions(+), 14 deletions(-) (limited to 'npc/functions') diff --git a/npc/functions/fishing.txt b/npc/functions/fishing.txt index 33f746c9d..40f5bfb26 100644 --- a/npc/functions/fishing.txt +++ b/npc/functions/fishing.txt @@ -121,20 +121,17 @@ function script fishing { GrassCarp; } - .@rare_fish_chance = getvariableofnpc(.rare_fish_chance, .@npc$); - .@rare_fish_chance = (.@rare_fish_chance ? .@rare_fish_chance : 25); - if (getvariableofnpc(.bait_ids[0], .@npc$) < 1) { - // default baits (bait, chance booster) + // default baits (bait, chance booster) rand(0, 100) setarray getvariableofnpc(.bait_ids[0], .@npc$), - SmallTentacles, 1, - Bread, 1, - Aquada, 2, - Tentacles, 3, - BugLeg, 0, - CaveSnakeTongue, 1, - RoastedMaggot, 2; + SmallTentacles, 4, + Bread, 4, + Aquada, 8, + Tentacles, 12, + BugLeg, 1, + CaveSnakeTongue, 4, + RoastedMaggot, 8; } @@ -195,7 +192,7 @@ function script fishing { } // RNG to obtain a rare fish or common fish - if (rand(.@rare_fish_chance) <= getvariableofnpc(.bait_ids[@bait_d+1], .@npc$)) + if (rand(0, 100) < getvariableofnpc(.bait_ids[@bait_d+1], .@npc$)) { .@fish_id = .@rare_fish[rand(getarraysize(.@rare_fish))]; } else { diff --git a/npc/functions/instances.txt b/npc/functions/instances.txt index 38e2f15f3..f42817588 100644 --- a/npc/functions/instances.txt +++ b/npc/functions/instances.txt @@ -7,7 +7,7 @@ - script #GlobalInstanceCore NPC_HIDDEN,{ OnInterIfInit: -OnRestart: +OnInstRestart: /* Nard's Ship */ // Candor Instance (we do all tests for debugmes here) .CANDOR_INSTID = instance_create("002-1@CandorInst", 0, IOT_NONE); @@ -62,7 +62,7 @@ OnRestart: OnMinute18: OnMinute47: if (!isinstance(.HURNS_INSTID) && !isinstance(.NIVAL_INSTID)) - donpcevent("#GlobalInstanceCore::OnRestart"); + donpcevent("#GlobalInstanceCore::OnInstRestart"); end; } -- cgit v1.2.3-60-g2f50