summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFedja Beader <fedja@protonmail.ch>2025-01-11 20:36:47 +0000
committerJesusalva Jesusalva <jesusalva@tmw2.org>2025-01-11 20:36:47 +0000
commit36019c0a82d76b7fb8f90b006c86edf257b50fe1 (patch)
tree0b312ccfa573486b8433844778df85521b1e8050
parent6fc6df78be7e9aa5880f53897397c10d540db054 (diff)
downloadserverdata-36019c0a82d76b7fb8f90b006c86edf257b50fe1.tar.gz
serverdata-36019c0a82d76b7fb8f90b006c86edf257b50fe1.tar.bz2
serverdata-36019c0a82d76b7fb8f90b006c86edf257b50fe1.tar.xz
serverdata-36019c0a82d76b7fb8f90b006c86edf257b50fe1.zip
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 <jesusalva@tmw2.org>
-rw-r--r--npc/functions/fishing.txt13
1 files 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")