From 36019c0a82d76b7fb8f90b006c86edf257b50fe1 Mon Sep 17 00:00:00 2001 From: Fedja Beader Date: Sat, 11 Jan 2025 20:36:47 +0000 Subject: Fishing: Don't return before giving event rewards (Might not address all edge case scenarios) * Sorry, I mixed up fishing with mining event. There's only one event fish. * Jes was right, using NPCEyes for invcheck is easiest. * Don't return before giving event rewards **** Approved-by: Jesusalva Jesusalva --- npc/functions/fishing.txt | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/npc/functions/fishing.txt b/npc/functions/fishing.txt index 2b38be7fd..4a251dc2a 100644 --- a/npc/functions/fishing.txt +++ b/npc/functions/fishing.txt @@ -173,6 +173,13 @@ function script fishing { return -1; } + // Check weight & inventory slots. NPCEyes were 200g at moment of + // writing this, which exceeds any obtainable reward. + inventoryplace NPCEyes, .@net_ratio + + 1 + // ancient blueprint + $EVENT$ == "Fishing" ? 1 : 0; + + if (.@account_id > 0 && !isloggedin(.@account_id, .@char_id)) { fishing_cleanup .@npc$; // reset @@ -239,12 +246,12 @@ function script fishing { if (MPQUEST) Mobpt+=.@bai*limit(1, BaseLevel/10, 10); - if(!checkweight(.@fish_id, 1)) { + if (checkweight(.@fish_id, 1)) { + getitem .@fish_id, 1; + } else { dispbottom l("You caught a @@ but had no room in your inventory to carry it.", getitemlink(.@fish_id)); makeitem .@fish_id, 1, .@mapbis$, .@xbis, .@ybis; // drop on the ground - return 0; } - getitem .@fish_id, 1; // Catch the Golden Fish Event if ($EVENT$ == "Fishing") -- cgit v1.2.3-70-g09d2