diff options
author | Jesusaves <cpntb1@ymail.com> | 2018-12-16 13:56:02 -0200 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2018-12-16 13:56:02 -0200 |
commit | d7d377939975609d65812679115983767de7da14 (patch) | |
tree | f3fb9a61fa177826d6c71c38c9a2389499d56748 /npc/functions | |
parent | 72bc3413d34df0ad03c21df1cd5949b455deb14b (diff) | |
download | serverdata-d7d377939975609d65812679115983767de7da14.tar.gz serverdata-d7d377939975609d65812679115983767de7da14.tar.bz2 serverdata-d7d377939975609d65812679115983767de7da14.tar.xz serverdata-d7d377939975609d65812679115983767de7da14.zip |
Minor rework to how rare-fish fishing goes
Diffstat (limited to 'npc/functions')
-rw-r--r-- | npc/functions/fishing.txt | 21 | ||||
-rw-r--r-- | npc/functions/instances.txt | 4 |
2 files changed, 11 insertions, 14 deletions
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; } |