From f901c5df63409aded3e92e7002e9bb3acb66875e Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 16 May 2020 22:06:18 -0300 Subject: Small, simple loop for Fishing --- npc/commands/event.txt | 1 + npc/functions/aurora.txt | 10 +++++++++- npc/functions/fishing.txt | 7 +++++-- npc/functions/news.txt | 12 ++++++++++++ 4 files changed, 27 insertions(+), 3 deletions(-) (limited to 'npc') diff --git a/npc/commands/event.txt b/npc/commands/event.txt index c21832b76..0d9d161bf 100644 --- a/npc/commands/event.txt +++ b/npc/commands/event.txt @@ -88,6 +88,7 @@ function script sClear { DelItemFromEveryPlayer(EventTreasure1); DelItemFromEveryPlayer(EventTreasure2); DelItemFromEveryPlayer(EventTreasure3); + DelItemFromEveryPlayer(EventFish); // We must remove any event drop charcommand("@reloadmobdb"); diff --git a/npc/functions/aurora.txt b/npc/functions/aurora.txt index 962e9409e..d9f396808 100644 --- a/npc/functions/aurora.txt +++ b/npc/functions/aurora.txt @@ -150,9 +150,17 @@ function script FYE_Expo { } +// Modify Fishing +function script FYE_Fishing { + // TODO: Merit-based random formula + getitem EventFish, 1; + return; +} + + // Stops any Aurora Event function script FYStopEvent { - setarray .@av$, "Kamelot", "Regnum"; + setarray .@av$, "Kamelot", "Regnum", "Expo", "Fishing"; if (array_find(.@av$, $EVENT$) >= 0) { sClear(); $EVENT$=""; diff --git a/npc/functions/fishing.txt b/npc/functions/fishing.txt index 92a0161c8..647ff19d5 100644 --- a/npc/functions/fishing.txt +++ b/npc/functions/fishing.txt @@ -236,13 +236,16 @@ function script fishing { if (MPQUEST) Mobpt+=.@bai*limit(1, BaseLevel/10, 10); - if(!checkweight(.@fish_id, 1)) - { + if(!checkweight(.@fish_id, 1)) { 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") + FYE_Fishing(); } } else diff --git a/npc/functions/news.txt b/npc/functions/news.txt index 786183189..6593e9fd0 100644 --- a/npc/functions/news.txt +++ b/npc/functions/news.txt @@ -484,6 +484,18 @@ function script EventHelp { mes l("This exposition has to be a success!"); mesc l("Location: Treasure Chests, hidden inside dungeons."), 3; ///////////////////////////////////////////////////////////////////////// + } else if ($EVENT$ == "Fishing") { + mesc ".:: " + l("Catch the Golden Fish!") + " ::.", 2; + mes ""; + mes l("yadda yadda yadda"); + mes l("While fishing you may randomly get a golden fish"); + mes ""; + mes l("yadda yadda yadda"); + mes l("Return them at the event NPC in Tulimshar"); + mes ""; + mes l("Catch the golden fish swarm!"); + mesc l("Location: Fishing spots in the water."), 3; + ///////////////////////////////////////////////////////////////////////// } else { mesc l("There's no help available for this event."); ///////////////////////////////////////////////////////////////////////// -- cgit v1.2.3-60-g2f50