Quest To Revive The Fishing Guild (937).

Contributed by gigilo1968.
This commit is contained in:
MobiusDev
2017-10-01 14:51:32 +00:00
parent 244582ebfc
commit f67c9c86f3
11 changed files with 234 additions and 1 deletions

View File

@@ -68,7 +68,6 @@
930 Disparaging the Phantoms 930 Disparaging the Phantoms
931 Memories of the Wind 931 Memories of the Wind
932 Sayha's Energy 932 Sayha's Energy
937 To Revive the Fishing Guild
938 The Fisherman's Other Hobby 938 The Fisherman's Other Hobby
940 Hunter Guild Request - Atelia Fortress 940 Hunter Guild Request - Atelia Fortress
10298 Wasteland Queen 10298 Wasteland Queen

View File

@@ -0,0 +1,4 @@
<html><body>Fishing Guild Member:<br>
Hmm, so you're interested in joining the Fishing Guild?<br>I have an interesting proposal for you, then. Will you let me explain?<br>
<Button ALIGN=LEFT ICON="Normal" action="bypass -h Quest Q00937_ToReviveTheFishingGuild Guild-02.htm">"What is it?"</Button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Fishing Guild Member:<br>
Actually, the king himself loves fishing. Did you know that the Fishing Guild was hung out to dry because the royal servants are against us?<br>
Of course, all of this information is supposed to be confidential. I was only able to come across it because I'm stationed in Aden Castle.<br>
Anyways, the King is also working hard to return the Fishing Guild to good standing, but it's not easy, given how vehemently opposed the royal servants are.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00937_ToReviveTheFishingGuild Guild-03.htm">"Go on."</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Fishing Guild Member:<br>
Our new guild leader Santiago was a famous fishing nut among us with ties to none other than the King himself!<br>
So the situation we have right now began with a conversation the two had while fishing together. They got to talking about getting adventurers to help bring the Fishing Guild out of the shadows, to add to the efforts of the guild members.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00937_ToReviveTheFishingGuild Guild-04.htm">What do I need to do?</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Fishing Guild Member:<br>
With more explorers fishing, more people aware of the benefits of the sport, and less reason for the royal servants to oppose it, Santiago will make himself known to the public, stressing how awesome a hobby fishing is. The plan is that when this happens, his majesty the King will take the opportunity to acknowledge our guild and allow us to engage in our activities openly on the Aden continent.<br>
To this end, we have agreed that whenever a fisher comes to us with proof that they have made 100 successful catches, we will acknowledge that they have helped us out, and will give them gifts.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Fishing Guild Member Linnaeus:<br>
We're sorry, but in order to show the world that you adventurers can't get enough of fishing, and that fishing is a truly beneficial sport, we need data as well.<br>
The minimum effort required for data collection is 100 catches, so I hope you aren't too offended. Please fish a bit more, and come back later.
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Fishing Guild Member:<br>
Have you fished enough?<br
>Did you catch anything?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00937_ToReviveTheFishingGuild Guild-07.html">"Yes, I did."</Button>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Fishing Guild Member:<br>
Thank you. As a token of our appreciation, here is a small gift. I hope you find it useful.
</body></html>

View File

@@ -0,0 +1,197 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package quests.Q00937_ToReviveTheFishingGuild;
import java.util.HashSet;
import java.util.Set;
import com.l2jmobius.gameserver.enums.Faction;
import com.l2jmobius.gameserver.enums.QuestSound;
import com.l2jmobius.gameserver.enums.QuestType;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.ListenerRegisterType;
import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
import com.l2jmobius.gameserver.model.events.annotations.RegisterType;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerFishing;
import com.l2jmobius.gameserver.model.holders.NpcLogListHolder;
import com.l2jmobius.gameserver.model.quest.Quest;
import com.l2jmobius.gameserver.model.quest.QuestState;
import com.l2jmobius.gameserver.model.quest.State;
import com.l2jmobius.gameserver.network.NpcStringId;
import com.l2jmobius.gameserver.network.serverpackets.fishing.ExFishingEnd.FishingEndReason;
/**
* To Revive The Fishing Guild (937)
* @author Gigi
* @date 2017-04-23 - [20:42:23]
*/
public class Q00937_ToReviveTheFishingGuild extends Quest
{
// NPCs
private static final int OFULLE = 31572;
private static final int LINNAEUS = 31577;
private static final int PERELIN = 31563;
private static final int BLEAKER = 31567;
private static final int CYANO = 31569;
private static final int PAMFUS = 31568;
private static final int LANOSCO = 31570;
private static final int HUFS = 31571;
private static final int MONAKAN = 31573;
private static final int BERIX = 31576;
private static final int LITULON = 31575;
private static final int WILLIE = 31574;
private static final int HILGENDORF = 31578;
private static final int PLATIS = 31696;
private static final int KLAUS = 31579;
private static final int BATIDAE = 31989;
private static final int EINDARKNER = 31697;
private static final int GALBA = 32007;
// Reward
private static final int BASIC_SUPPLY_BOX = 47571;
private static final int INTERMEDIATE_SUPPLY_BOX = 47572;
// Misc
private static final int MIN_LEVEL = 85;
private static final String COUNT_VAR = "FishWinCount";
public Q00937_ToReviveTheFishingGuild()
{
super(937);
addStartNpc(OFULLE, LINNAEUS, PERELIN, BLEAKER, CYANO, PAMFUS, LANOSCO, HUFS, MONAKAN, BERIX, LITULON, WILLIE, HILGENDORF, PLATIS, KLAUS, BATIDAE, EINDARKNER, GALBA);
addTalkId(OFULLE, LINNAEUS, PERELIN, BLEAKER, CYANO, PAMFUS, LANOSCO, HUFS, MONAKAN, BERIX, LITULON, WILLIE, HILGENDORF, PLATIS, KLAUS, BATIDAE, EINDARKNER, GALBA);
addCondMinLevel(MIN_LEVEL, "noLevel.htm");
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
final QuestState qs = getQuestState(player, false);
if (qs == null)
{
return null;
}
String htmltext = null;
switch (event)
{
case "Guild-02.htm":
case "Guild-03.htm":
{
htmltext = event;
break;
}
case "Guild-04.htm":
{
qs.startQuest();
htmltext = event;
break;
}
case "Guild-07.html":
{
if (qs.isCond(2))
{
if (player.getFactionLevel(Faction.FISHING_GUILD) <= 2) // Fisher Guild Lvl: 2
{
giveItems(player, BASIC_SUPPLY_BOX, 1);
}
else if (player.getFactionLevel(Faction.FISHING_GUILD) > 2)
{
giveItems(player, INTERMEDIATE_SUPPLY_BOX, 1);
}
player.addFactionPoints(Faction.FISHING_GUILD, 100);
qs.exitQuest(QuestType.REPEATABLE, true);
htmltext = event;
}
break;
}
}
return htmltext;
}
@Override
public String onTalk(L2Npc npc, L2PcInstance player)
{
final QuestState qs = getQuestState(player, true);
String htmltext = getNoQuestMsg(player);
switch (qs.getState())
{
case State.CREATED:
{
htmltext = "Guild-01.htm";
break;
}
case State.STARTED:
{
if (qs.isCond(1))
{
htmltext = "Guild-05.html";
}
else if (qs.isCond(2))
{
htmltext = "Guild-06.html";
}
break;
}
case State.COMPLETED:
{
htmltext = getAlreadyCompletedMsg(player);
break;
}
}
return htmltext;
}
@RegisterEvent(EventType.ON_PLAYER_FISHING)
@RegisterType(ListenerRegisterType.GLOBAL_PLAYERS)
public void onPlayerFishing(OnPlayerFishing event)
{
final L2PcInstance player = event.getActiveChar();
final QuestState qs = getQuestState(player, false);
if ((qs != null) && qs.isCond(1) && (event.getReason() == FishingEndReason.WIN))
{
int count = qs.getInt(COUNT_VAR);
qs.set(COUNT_VAR, ++count);
if (count >= 100)
{
qs.setCond(2, true);
}
else
{
sendNpcLogList(player);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
}
@Override
public Set<NpcLogListHolder> getNpcLogList(L2PcInstance player)
{
final QuestState qs = getQuestState(player, false);
if ((qs != null) && qs.isCond(1))
{
final int Count = qs.getInt(COUNT_VAR);
if (Count > 0)
{
final Set<NpcLogListHolder> holder = new HashSet<>();
holder.add(new NpcLogListHolder(NpcStringId.FISHING, Count));
return holder;
}
}
return super.getNpcLogList(player);
}
}

View File

@@ -0,0 +1,4 @@
<html><body>Fishing Guild Member:<br>
Hmm, it would seem that it's a bit too early still to discuss the Fishing Guild with you. Please return after you've become stronger.<br>
(Only characters with Lv. 85 or above may undertake this quest.)
</body></html>

View File

@@ -192,6 +192,7 @@ import quests.Q00904_DragonTrophyAntharas.Q00904_DragonTrophyAntharas;
import quests.Q00905_RefinedDragonBlood.Q00905_RefinedDragonBlood; import quests.Q00905_RefinedDragonBlood.Q00905_RefinedDragonBlood;
import quests.Q00906_TheCallOfValakas.Q00906_TheCallOfValakas; import quests.Q00906_TheCallOfValakas.Q00906_TheCallOfValakas;
import quests.Q00907_DragonTrophyValakas.Q00907_DragonTrophyValakas; import quests.Q00907_DragonTrophyValakas.Q00907_DragonTrophyValakas;
import quests.Q00937_ToReviveTheFishingGuild.Q00937_ToReviveTheFishingGuild;
import quests.Q10273_GoodDayToFly.Q10273_GoodDayToFly; import quests.Q10273_GoodDayToFly.Q10273_GoodDayToFly;
import quests.Q10274_CollectingInTheAir.Q10274_CollectingInTheAir; import quests.Q10274_CollectingInTheAir.Q10274_CollectingInTheAir;
import quests.Q10275_ContainingTheAttributePower.Q10275_ContainingTheAttributePower; import quests.Q10275_ContainingTheAttributePower.Q10275_ContainingTheAttributePower;
@@ -611,6 +612,7 @@ public class QuestMasterHandler
Q00905_RefinedDragonBlood.class, Q00905_RefinedDragonBlood.class,
Q00906_TheCallOfValakas.class, Q00906_TheCallOfValakas.class,
Q00907_DragonTrophyValakas.class, Q00907_DragonTrophyValakas.class,
Q00937_ToReviveTheFishingGuild.class,
Q10273_GoodDayToFly.class, Q10273_GoodDayToFly.class,
Q10274_CollectingInTheAir.class, Q10274_CollectingInTheAir.class,
Q10275_ContainingTheAttributePower.class, Q10275_ContainingTheAttributePower.class,