Addition of missing fisherman quest.
Contributed by CostyKiller.
This commit is contained in:
@@ -45,7 +45,6 @@
|
||||
922 Hunter Guild Request - Northern Region, Isle of Prayer
|
||||
925 Hunter Guild Request - Garden of Spirits
|
||||
929 Seeker Rescue
|
||||
938 The Fisherman's Other Hobby
|
||||
940 Hunter Guild Request - Atelia Fortress
|
||||
10298 Wasteland Queen
|
||||
10357 Altar of Blood that Awakens Destruction
|
||||
|
@@ -159,19 +159,22 @@ public class Q00937_ToReviveTheFishingGuild extends Quest
|
||||
@RegisterType(ListenerRegisterType.GLOBAL_PLAYERS)
|
||||
public void onPlayerFishing(OnPlayerFishing event)
|
||||
{
|
||||
final Player player = event.getPlayer();
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if ((qs != null) && qs.isCond(1) && (event.getReason() == FishingEndReason.WIN))
|
||||
if (event.getReason() == FishingEndReason.WIN)
|
||||
{
|
||||
int count = qs.getInt(COUNT_VAR);
|
||||
qs.set(COUNT_VAR, ++count);
|
||||
if (count >= 100)
|
||||
final Player player = event.getPlayer();
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if ((qs != null) && qs.isCond(1))
|
||||
{
|
||||
qs.setCond(2, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
int count = qs.getInt(COUNT_VAR);
|
||||
qs.set(COUNT_VAR, ++count);
|
||||
if (count >= 100)
|
||||
{
|
||||
qs.setCond(2, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,4 @@
|
||||
<html><body>Fishing Guild Member:<br>
|
||||
As a Fishing Guild member, have you ever dreamed of doing something new, for example, finding a new hobby?<br>
|
||||
<Button ALIGN=LEFT ICON="Normal" action="bypass -h Quest Q00938_TheFishermansOtherHobby Guild-02.htm">"Yes, that is correct."</Button>
|
||||
</body></html>
|
@@ -0,0 +1,5 @@
|
||||
<html><body>Fishing Guild Member:<br>
|
||||
You know, we at the Fishing Guild always advise you to get some good fishing gear.<br>
|
||||
It's even better when getting top-grade equipment turns into a hobby. Do you want to know why we give so much importance to gear?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00938_TheFishermansOtherHobby Guild-03.htm">Nod</Button>
|
||||
</body></html>
|
@@ -0,0 +1,6 @@
|
||||
<html><body>Fishing Guild Member:<br>
|
||||
Equipment plays a big part in fishing. It's significance shouldn't be underestimated. Warriors preparing for the battle choose most enduring swords and shields to overcome the enemy for sure. We, fishermen, do the same. We choose a firmer fishing rod to get a rich take.<br>
|
||||
A clever fisherman always tries to get good equipment. A <font color="LEVEL">Master Fishing Rod</font> is the best choice!<br>
|
||||
The Fishing Guild wants as many fishermen as possible to learn about this fishing rod and get it. Well, are you interested?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00938_TheFishermansOtherHobby Guild-04.htm">Nod</Button>
|
||||
</body></html>
|
@@ -0,0 +1,6 @@
|
||||
<html><body>Fishing Guild Member:<br>
|
||||
So, I'll to tell you everything I know about Master Fishing Rod.<br>
|
||||
First of all, to get one you must do something. Bring me <font color="LEVEL">40 Nimble Fish</font>.<br>
|
||||
It doesn't matter how you get them. The point is that you bring me the exact number I'm asking for. It's the main ingredient.<br>
|
||||
Bring me <font color="LEVEL">40 Nimble Fish</font>, and I will reward you with materials for your <font color="LEVEL">Master Fishing Rod</font>.
|
||||
</body></html>
|
@@ -0,0 +1,3 @@
|
||||
<html><body>Fishing Guild Member:<br>
|
||||
You must gather <font color="LEVEL">40 Nimble Fish</font>, but I don't see any of them. It doesn't matter how you get them. Just bring me <font color="LEVEL">40 Nimble Fish</font>.
|
||||
</body></html>
|
@@ -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 Q00938_TheFishermansOtherHobby Guild-07.html">"Yes, I did."</Button>
|
||||
</body></html>
|
@@ -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>
|
@@ -0,0 +1,168 @@
|
||||
/*
|
||||
* 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.Q00938_TheFishermansOtherHobby;
|
||||
|
||||
import org.l2jmobius.gameserver.enums.Faction;
|
||||
import org.l2jmobius.gameserver.enums.FishingEndReason;
|
||||
import org.l2jmobius.gameserver.enums.QuestSound;
|
||||
import org.l2jmobius.gameserver.enums.QuestType;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.events.EventType;
|
||||
import org.l2jmobius.gameserver.model.events.ListenerRegisterType;
|
||||
import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
|
||||
import org.l2jmobius.gameserver.model.events.annotations.RegisterType;
|
||||
import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerFishing;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.quest.QuestState;
|
||||
import org.l2jmobius.gameserver.model.quest.State;
|
||||
|
||||
/**
|
||||
* The Fisherman's Other Hobby (938)
|
||||
* @author CostyKiller
|
||||
*/
|
||||
public class Q00938_TheFishermansOtherHobby 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;
|
||||
private static final int SANTIAGO = 34138;
|
||||
// Reward
|
||||
private static final int SANTIAGOS_REEL_FRAGMENT = 47562;
|
||||
// Misc
|
||||
private static final int MIN_LEVEL = 85;
|
||||
private static final int NIMBLE_FISH = 47551;
|
||||
private static final int NIMBLE_FISH_NEEDED = 40;
|
||||
|
||||
public Q00938_TheFishermansOtherHobby()
|
||||
{
|
||||
super(938);
|
||||
addStartNpc(OFULLE, LINNAEUS, PERELIN, BLEAKER, CYANO, PAMFUS, LANOSCO, HUFS, MONAKAN, BERIX, LITULON, WILLIE, HILGENDORF, PLATIS, KLAUS, BATIDAE, EINDARKNER, GALBA, SANTIAGO);
|
||||
addTalkId(OFULLE, LINNAEUS, PERELIN, BLEAKER, CYANO, PAMFUS, LANOSCO, HUFS, MONAKAN, BERIX, LITULON, WILLIE, HILGENDORF, PLATIS, KLAUS, BATIDAE, EINDARKNER, GALBA, SANTIAGO);
|
||||
addCondMinLevel(MIN_LEVEL, "noLevel.htm");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, Npc npc, Player 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))
|
||||
{
|
||||
takeItems(player, NIMBLE_FISH, NIMBLE_FISH_NEEDED);
|
||||
giveItems(player, SANTIAGOS_REEL_FRAGMENT, 2);
|
||||
addFactionPoints(player, Faction.FISHING_GUILD, 100);
|
||||
qs.exitQuest(QuestType.REPEATABLE, true);
|
||||
htmltext = event;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(Npc npc, Player 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)
|
||||
{
|
||||
if (event.getReason() == FishingEndReason.WIN)
|
||||
{
|
||||
final Player player = event.getPlayer();
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if ((qs != null) && qs.isCond(1))
|
||||
{
|
||||
if (getQuestItemsCount(player, NIMBLE_FISH) >= NIMBLE_FISH_NEEDED)
|
||||
{
|
||||
qs.setCond(2, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -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>
|
@@ -217,6 +217,7 @@ import quests.Q00930_DisparagingThePhantoms.Q00930_DisparagingThePhantoms;
|
||||
import quests.Q00931_MemoriesOfTheWind.Q00931_MemoriesOfTheWind;
|
||||
import quests.Q00932_SayhasEnergy.Q00932_SayhasEnergy;
|
||||
import quests.Q00937_ToReviveTheFishingGuild.Q00937_ToReviveTheFishingGuild;
|
||||
import quests.Q00938_TheFishermansOtherHobby.Q00938_TheFishermansOtherHobby;
|
||||
import quests.Q10273_GoodDayToFly.Q10273_GoodDayToFly;
|
||||
import quests.Q10274_CollectingInTheAir.Q10274_CollectingInTheAir;
|
||||
import quests.Q10275_ContainingTheAttributePower.Q10275_ContainingTheAttributePower;
|
||||
@@ -516,7 +517,6 @@ import quests.not_done.Q00912_RedLibraRequestLv3;
|
||||
import quests.not_done.Q00913_RedLibraRequestLv4;
|
||||
import quests.not_done.Q00914_RedLibraRequestLv5;
|
||||
import quests.not_done.Q00929_SeekerRescue;
|
||||
import quests.not_done.Q00938_TheFishermansOtherHobby;
|
||||
import quests.not_done.Q10298_WastelandQueen;
|
||||
import quests.not_done.Q10357_AltarOfBloodThatAwakensDestruction;
|
||||
import quests.not_done.Q10396_WitchOfSpores;
|
||||
@@ -766,7 +766,7 @@ public class QuestMasterHandler
|
||||
Q00931_MemoriesOfTheWind.class,
|
||||
Q00932_SayhasEnergy.class,
|
||||
Q00937_ToReviveTheFishingGuild.class,
|
||||
Q00938_TheFishermansOtherHobby.class, // TODO: Not done.
|
||||
Q00938_TheFishermansOtherHobby.class,
|
||||
Q10273_GoodDayToFly.class,
|
||||
Q10274_CollectingInTheAir.class,
|
||||
Q10275_ContainingTheAttributePower.class,
|
||||
|
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* 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.not_done;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class Q00938_TheFishermansOtherHobby extends Quest
|
||||
{
|
||||
private static final int START_NPC = 34138;
|
||||
|
||||
public Q00938_TheFishermansOtherHobby()
|
||||
{
|
||||
super(938);
|
||||
addStartNpc(START_NPC);
|
||||
addTalkId(START_NPC);
|
||||
addCondMinLevel(Config.PLAYER_MAXIMUM_LEVEL, getNoQuestMsg(null));
|
||||
}
|
||||
}
|
@@ -96,7 +96,6 @@
|
||||
922 Hunter Guild Request - Northern Region, Isle of Prayer
|
||||
925 Hunter Guild Request - Garden of Spirits
|
||||
929 Seeker Rescue
|
||||
938 The Fisherman's Other Hobby
|
||||
940 Hunter Guild Request - Atelia Fortress
|
||||
986 Adventure Guild's Special Request - Lv. 2
|
||||
987 Adventure Guild's Special Request - Lv. 3
|
||||
|
@@ -159,19 +159,22 @@ public class Q00937_ToReviveTheFishingGuild extends Quest
|
||||
@RegisterType(ListenerRegisterType.GLOBAL_PLAYERS)
|
||||
public void onPlayerFishing(OnPlayerFishing event)
|
||||
{
|
||||
final Player player = event.getPlayer();
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if ((qs != null) && qs.isCond(1) && (event.getReason() == FishingEndReason.WIN))
|
||||
if (event.getReason() == FishingEndReason.WIN)
|
||||
{
|
||||
int count = qs.getInt(COUNT_VAR);
|
||||
qs.set(COUNT_VAR, ++count);
|
||||
if (count >= 100)
|
||||
final Player player = event.getPlayer();
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if ((qs != null) && qs.isCond(1))
|
||||
{
|
||||
qs.setCond(2, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
int count = qs.getInt(COUNT_VAR);
|
||||
qs.set(COUNT_VAR, ++count);
|
||||
if (count >= 100)
|
||||
{
|
||||
qs.setCond(2, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,4 @@
|
||||
<html><body>Fishing Guild Member:<br>
|
||||
As a Fishing Guild member, have you ever dreamed of doing something new, for example, finding a new hobby?<br>
|
||||
<Button ALIGN=LEFT ICON="Normal" action="bypass -h Quest Q00938_TheFishermansOtherHobby Guild-02.htm">"Yes, that is correct."</Button>
|
||||
</body></html>
|
@@ -0,0 +1,5 @@
|
||||
<html><body>Fishing Guild Member:<br>
|
||||
You know, we at the Fishing Guild always advise you to get some good fishing gear.<br>
|
||||
It's even better when getting top-grade equipment turns into a hobby. Do you want to know why we give so much importance to gear?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00938_TheFishermansOtherHobby Guild-03.htm">Nod</Button>
|
||||
</body></html>
|
@@ -0,0 +1,6 @@
|
||||
<html><body>Fishing Guild Member:<br>
|
||||
Equipment plays a big part in fishing. It's significance shouldn't be underestimated. Warriors preparing for the battle choose most enduring swords and shields to overcome the enemy for sure. We, fishermen, do the same. We choose a firmer fishing rod to get a rich take.<br>
|
||||
A clever fisherman always tries to get good equipment. A <font color="LEVEL">Master Fishing Rod</font> is the best choice!<br>
|
||||
The Fishing Guild wants as many fishermen as possible to learn about this fishing rod and get it. Well, are you interested?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00938_TheFishermansOtherHobby Guild-04.htm">Nod</Button>
|
||||
</body></html>
|
@@ -0,0 +1,6 @@
|
||||
<html><body>Fishing Guild Member:<br>
|
||||
So, I'll to tell you everything I know about Master Fishing Rod.<br>
|
||||
First of all, to get one you must do something. Bring me <font color="LEVEL">40 Nimble Fish</font>.<br>
|
||||
It doesn't matter how you get them. The point is that you bring me the exact number I'm asking for. It's the main ingredient.<br>
|
||||
Bring me <font color="LEVEL">40 Nimble Fish</font>, and I will reward you with materials for your <font color="LEVEL">Master Fishing Rod</font>.
|
||||
</body></html>
|
@@ -0,0 +1,3 @@
|
||||
<html><body>Fishing Guild Member:<br>
|
||||
You must gather <font color="LEVEL">40 Nimble Fish</font>, but I don't see any of them. It doesn't matter how you get them. Just bring me <font color="LEVEL">40 Nimble Fish</font>.
|
||||
</body></html>
|
@@ -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 Q00938_TheFishermansOtherHobby Guild-07.html">"Yes, I did."</Button>
|
||||
</body></html>
|
@@ -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>
|
@@ -0,0 +1,168 @@
|
||||
/*
|
||||
* 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.Q00938_TheFishermansOtherHobby;
|
||||
|
||||
import org.l2jmobius.gameserver.enums.Faction;
|
||||
import org.l2jmobius.gameserver.enums.FishingEndReason;
|
||||
import org.l2jmobius.gameserver.enums.QuestSound;
|
||||
import org.l2jmobius.gameserver.enums.QuestType;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.events.EventType;
|
||||
import org.l2jmobius.gameserver.model.events.ListenerRegisterType;
|
||||
import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
|
||||
import org.l2jmobius.gameserver.model.events.annotations.RegisterType;
|
||||
import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerFishing;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.quest.QuestState;
|
||||
import org.l2jmobius.gameserver.model.quest.State;
|
||||
|
||||
/**
|
||||
* The Fisherman's Other Hobby (938)
|
||||
* @author CostyKiller
|
||||
*/
|
||||
public class Q00938_TheFishermansOtherHobby 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;
|
||||
private static final int SANTIAGO = 34138;
|
||||
// Reward
|
||||
private static final int SANTIAGOS_REEL_FRAGMENT = 47562;
|
||||
// Misc
|
||||
private static final int MIN_LEVEL = 85;
|
||||
private static final int NIMBLE_FISH = 47551;
|
||||
private static final int NIMBLE_FISH_NEEDED = 40;
|
||||
|
||||
public Q00938_TheFishermansOtherHobby()
|
||||
{
|
||||
super(938);
|
||||
addStartNpc(OFULLE, LINNAEUS, PERELIN, BLEAKER, CYANO, PAMFUS, LANOSCO, HUFS, MONAKAN, BERIX, LITULON, WILLIE, HILGENDORF, PLATIS, KLAUS, BATIDAE, EINDARKNER, GALBA, SANTIAGO);
|
||||
addTalkId(OFULLE, LINNAEUS, PERELIN, BLEAKER, CYANO, PAMFUS, LANOSCO, HUFS, MONAKAN, BERIX, LITULON, WILLIE, HILGENDORF, PLATIS, KLAUS, BATIDAE, EINDARKNER, GALBA, SANTIAGO);
|
||||
addCondMinLevel(MIN_LEVEL, "noLevel.htm");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, Npc npc, Player 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))
|
||||
{
|
||||
takeItems(player, NIMBLE_FISH, NIMBLE_FISH_NEEDED);
|
||||
giveItems(player, SANTIAGOS_REEL_FRAGMENT, 2);
|
||||
addFactionPoints(player, Faction.FISHING_GUILD, 100);
|
||||
qs.exitQuest(QuestType.REPEATABLE, true);
|
||||
htmltext = event;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(Npc npc, Player 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)
|
||||
{
|
||||
if (event.getReason() == FishingEndReason.WIN)
|
||||
{
|
||||
final Player player = event.getPlayer();
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if ((qs != null) && qs.isCond(1))
|
||||
{
|
||||
if (getQuestItemsCount(player, NIMBLE_FISH) >= NIMBLE_FISH_NEEDED)
|
||||
{
|
||||
qs.setCond(2, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -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>
|
@@ -223,6 +223,7 @@ import quests.Q00930_DisparagingThePhantoms.Q00930_DisparagingThePhantoms;
|
||||
import quests.Q00931_MemoriesOfTheWind.Q00931_MemoriesOfTheWind;
|
||||
import quests.Q00932_SayhasEnergy.Q00932_SayhasEnergy;
|
||||
import quests.Q00937_ToReviveTheFishingGuild.Q00937_ToReviveTheFishingGuild;
|
||||
import quests.Q00938_TheFishermansOtherHobby.Q00938_TheFishermansOtherHobby;
|
||||
import quests.Q10273_GoodDayToFly.Q10273_GoodDayToFly;
|
||||
import quests.Q10274_CollectingInTheAir.Q10274_CollectingInTheAir;
|
||||
import quests.Q10275_ContainingTheAttributePower.Q10275_ContainingTheAttributePower;
|
||||
@@ -786,6 +787,7 @@ public class QuestMasterHandler
|
||||
Q00931_MemoriesOfTheWind.class,
|
||||
Q00932_SayhasEnergy.class,
|
||||
Q00937_ToReviveTheFishingGuild.class,
|
||||
Q00938_TheFishermansOtherHobby.class,
|
||||
Q00985_AdventureGuildsSpecialRequestLv1.class, // TODO: Not done.
|
||||
Q00986_AdventureGuildsSpecialRequestLv2.class, // TODO: Not done.
|
||||
Q00987_AdventureGuildsSpecialRequestLv3.class, // TODO: Not done.
|
||||
|
@@ -102,7 +102,6 @@
|
||||
922 Hunter Guild Request - Northern Region, Isle of Prayer
|
||||
925 Hunter Guild Request - Garden of Spirits
|
||||
929 Seeker Rescue
|
||||
938 The Fisherman's Other Hobby
|
||||
940 Hunter Guild Request - Atelia Fortress
|
||||
986 Adventure Guild's Special Request - Lv. 2
|
||||
987 Adventure Guild's Special Request - Lv. 3
|
||||
|
@@ -160,21 +160,24 @@ public class Q00937_ToReviveTheFishingGuild extends Quest
|
||||
@RegisterType(ListenerRegisterType.GLOBAL_PLAYERS)
|
||||
public void onPlayerFishing(OnPlayerFishing event)
|
||||
{
|
||||
final Player player = event.getPlayer();
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if ((qs != null) && qs.isCond(1) && (event.getReason() == FishingEndReason.WIN))
|
||||
if (event.getReason() == FishingEndReason.WIN)
|
||||
{
|
||||
int count = qs.getInt(COUNT_VAR);
|
||||
qs.set(COUNT_VAR, ++count);
|
||||
if (count >= 100)
|
||||
final Player player = event.getPlayer();
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if ((qs != null) && qs.isCond(1))
|
||||
{
|
||||
qs.setCond(2, true);
|
||||
int count = qs.getInt(COUNT_VAR);
|
||||
qs.set(COUNT_VAR, ++count);
|
||||
if (count >= 100)
|
||||
{
|
||||
qs.setCond(2, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
sendNpcLogList(player);
|
||||
}
|
||||
else
|
||||
{
|
||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
sendNpcLogList(player);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,4 @@
|
||||
<html><body>Fishing Guild Member:<br>
|
||||
As a Fishing Guild member, have you ever dreamed of doing something new, for example, finding a new hobby?<br>
|
||||
<Button ALIGN=LEFT ICON="Normal" action="bypass -h Quest Q00938_TheFishermansOtherHobby Guild-02.htm">"Yes, that is correct."</Button>
|
||||
</body></html>
|
@@ -0,0 +1,5 @@
|
||||
<html><body>Fishing Guild Member:<br>
|
||||
You know, we at the Fishing Guild always advise you to get some good fishing gear.<br>
|
||||
It's even better when getting top-grade equipment turns into a hobby. Do you want to know why we give so much importance to gear?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00938_TheFishermansOtherHobby Guild-03.htm">Nod</Button>
|
||||
</body></html>
|
@@ -0,0 +1,6 @@
|
||||
<html><body>Fishing Guild Member:<br>
|
||||
Equipment plays a big part in fishing. It's significance shouldn't be underestimated. Warriors preparing for the battle choose most enduring swords and shields to overcome the enemy for sure. We, fishermen, do the same. We choose a firmer fishing rod to get a rich take.<br>
|
||||
A clever fisherman always tries to get good equipment. A <font color="LEVEL">Master Fishing Rod</font> is the best choice!<br>
|
||||
The Fishing Guild wants as many fishermen as possible to learn about this fishing rod and get it. Well, are you interested?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00938_TheFishermansOtherHobby Guild-04.htm">Nod</Button>
|
||||
</body></html>
|
@@ -0,0 +1,6 @@
|
||||
<html><body>Fishing Guild Member:<br>
|
||||
So, I'll to tell you everything I know about Master Fishing Rod.<br>
|
||||
First of all, to get one you must do something. Bring me <font color="LEVEL">40 Nimble Fish</font>.<br>
|
||||
It doesn't matter how you get them. The point is that you bring me the exact number I'm asking for. It's the main ingredient.<br>
|
||||
Bring me <font color="LEVEL">40 Nimble Fish</font>, and I will reward you with materials for your <font color="LEVEL">Master Fishing Rod</font>.
|
||||
</body></html>
|
@@ -0,0 +1,3 @@
|
||||
<html><body>Fishing Guild Member:<br>
|
||||
You must gather <font color="LEVEL">40 Nimble Fish</font>, but I don't see any of them. It doesn't matter how you get them. Just bring me <font color="LEVEL">40 Nimble Fish</font>.
|
||||
</body></html>
|
@@ -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 Q00938_TheFishermansOtherHobby Guild-07.html">"Yes, I did."</Button>
|
||||
</body></html>
|
@@ -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>
|
@@ -0,0 +1,168 @@
|
||||
/*
|
||||
* 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.Q00938_TheFishermansOtherHobby;
|
||||
|
||||
import org.l2jmobius.gameserver.enums.Faction;
|
||||
import org.l2jmobius.gameserver.enums.FishingEndReason;
|
||||
import org.l2jmobius.gameserver.enums.QuestSound;
|
||||
import org.l2jmobius.gameserver.enums.QuestType;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.events.EventType;
|
||||
import org.l2jmobius.gameserver.model.events.ListenerRegisterType;
|
||||
import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
|
||||
import org.l2jmobius.gameserver.model.events.annotations.RegisterType;
|
||||
import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerFishing;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.quest.QuestState;
|
||||
import org.l2jmobius.gameserver.model.quest.State;
|
||||
|
||||
/**
|
||||
* The Fisherman's Other Hobby (938)
|
||||
* @author CostyKiller
|
||||
*/
|
||||
public class Q00938_TheFishermansOtherHobby 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;
|
||||
private static final int SANTIAGO = 34138;
|
||||
// Reward
|
||||
private static final int SANTIAGOS_REEL_FRAGMENT = 47562;
|
||||
// Misc
|
||||
private static final int MIN_LEVEL = 85;
|
||||
private static final int NIMBLE_FISH = 47551;
|
||||
private static final int NIMBLE_FISH_NEEDED = 40;
|
||||
|
||||
public Q00938_TheFishermansOtherHobby()
|
||||
{
|
||||
super(938);
|
||||
addStartNpc(OFULLE, LINNAEUS, PERELIN, BLEAKER, CYANO, PAMFUS, LANOSCO, HUFS, MONAKAN, BERIX, LITULON, WILLIE, HILGENDORF, PLATIS, KLAUS, BATIDAE, EINDARKNER, GALBA, SANTIAGO);
|
||||
addTalkId(OFULLE, LINNAEUS, PERELIN, BLEAKER, CYANO, PAMFUS, LANOSCO, HUFS, MONAKAN, BERIX, LITULON, WILLIE, HILGENDORF, PLATIS, KLAUS, BATIDAE, EINDARKNER, GALBA, SANTIAGO);
|
||||
addCondMinLevel(MIN_LEVEL, "noLevel.htm");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, Npc npc, Player 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))
|
||||
{
|
||||
takeItems(player, NIMBLE_FISH, NIMBLE_FISH_NEEDED);
|
||||
giveItems(player, SANTIAGOS_REEL_FRAGMENT, 2);
|
||||
addFactionPoints(player, Faction.FISHING_GUILD, 100);
|
||||
qs.exitQuest(QuestType.REPEATABLE, true);
|
||||
htmltext = event;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(Npc npc, Player 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)
|
||||
{
|
||||
if (event.getReason() == FishingEndReason.WIN)
|
||||
{
|
||||
final Player player = event.getPlayer();
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if ((qs != null) && qs.isCond(1))
|
||||
{
|
||||
if (getQuestItemsCount(player, NIMBLE_FISH) >= NIMBLE_FISH_NEEDED)
|
||||
{
|
||||
qs.setCond(2, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -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>
|
@@ -155,22 +155,25 @@ public class Q10575_LetsGoFishing extends Quest
|
||||
@RegisterType(ListenerRegisterType.GLOBAL_PLAYERS)
|
||||
public void onPlayerFishing(OnPlayerFishing event)
|
||||
{
|
||||
final Player player = event.getPlayer();
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if ((qs != null) && qs.isCond(2) && (event.getReason() == FishingEndReason.WIN))
|
||||
if (event.getReason() == FishingEndReason.WIN)
|
||||
{
|
||||
int count = qs.getInt(COUNT_VAR);
|
||||
qs.set(COUNT_VAR, ++count);
|
||||
if (count >= 5)
|
||||
final Player player = event.getPlayer();
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if ((qs != null) && qs.isCond(2))
|
||||
{
|
||||
qs.setCond(3, true);
|
||||
int count = qs.getInt(COUNT_VAR);
|
||||
qs.set(COUNT_VAR, ++count);
|
||||
if (count >= 5)
|
||||
{
|
||||
qs.setCond(3, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
|
||||
sendNpcLogList(player);
|
||||
}
|
||||
else
|
||||
{
|
||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
|
||||
sendNpcLogList(player);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -245,6 +245,7 @@ import quests.Q00930_DisparagingThePhantoms.Q00930_DisparagingThePhantoms;
|
||||
import quests.Q00931_MemoriesOfTheWind.Q00931_MemoriesOfTheWind;
|
||||
import quests.Q00932_SayhasEnergy.Q00932_SayhasEnergy;
|
||||
import quests.Q00937_ToReviveTheFishingGuild.Q00937_ToReviveTheFishingGuild;
|
||||
import quests.Q00938_TheFishermansOtherHobby.Q00938_TheFishermansOtherHobby;
|
||||
import quests.Q10273_GoodDayToFly.Q10273_GoodDayToFly;
|
||||
import quests.Q10274_CollectingInTheAir.Q10274_CollectingInTheAir;
|
||||
import quests.Q10282_ToTheSeedOfAnnihilation.Q10282_ToTheSeedOfAnnihilation;
|
||||
@@ -862,6 +863,7 @@ public class QuestMasterHandler
|
||||
Q00931_MemoriesOfTheWind.class,
|
||||
Q00932_SayhasEnergy.class,
|
||||
Q00937_ToReviveTheFishingGuild.class,
|
||||
Q00938_TheFishermansOtherHobby.class,
|
||||
Q00985_AdventureGuildsSpecialRequestLv1.class, // TODO: Not done.
|
||||
Q00986_AdventureGuildsSpecialRequestLv2.class, // TODO: Not done.
|
||||
Q00987_AdventureGuildsSpecialRequestLv3.class, // TODO: Not done.
|
||||
|
@@ -110,7 +110,6 @@
|
||||
922 Hunter Guild Request - Northern Region, Isle of Prayer
|
||||
925 Hunter Guild Request - Garden of Spirits
|
||||
929 Seeker Rescue
|
||||
938 The Fisherman's Other Hobby
|
||||
940 Hunter Guild Request - Atelia Fortress
|
||||
986 Adventure Guild's Special Request - Lv. 2
|
||||
987 Adventure Guild's Special Request - Lv. 3
|
||||
|
@@ -160,21 +160,24 @@ public class Q00937_ToReviveTheFishingGuild extends Quest
|
||||
@RegisterType(ListenerRegisterType.GLOBAL_PLAYERS)
|
||||
public void onPlayerFishing(OnPlayerFishing event)
|
||||
{
|
||||
final Player player = event.getPlayer();
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if ((qs != null) && qs.isCond(1) && (event.getReason() == FishingEndReason.WIN))
|
||||
if (event.getReason() == FishingEndReason.WIN)
|
||||
{
|
||||
int count = qs.getInt(COUNT_VAR);
|
||||
qs.set(COUNT_VAR, ++count);
|
||||
if (count >= 100)
|
||||
final Player player = event.getPlayer();
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if ((qs != null) && qs.isCond(1))
|
||||
{
|
||||
qs.setCond(2, true);
|
||||
int count = qs.getInt(COUNT_VAR);
|
||||
qs.set(COUNT_VAR, ++count);
|
||||
if (count >= 100)
|
||||
{
|
||||
qs.setCond(2, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
sendNpcLogList(player);
|
||||
}
|
||||
else
|
||||
{
|
||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
sendNpcLogList(player);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,4 @@
|
||||
<html><body>Fishing Guild Member:<br>
|
||||
As a Fishing Guild member, have you ever dreamed of doing something new, for example, finding a new hobby?<br>
|
||||
<Button ALIGN=LEFT ICON="Normal" action="bypass -h Quest Q00938_TheFishermansOtherHobby Guild-02.htm">"Yes, that is correct."</Button>
|
||||
</body></html>
|
@@ -0,0 +1,5 @@
|
||||
<html><body>Fishing Guild Member:<br>
|
||||
You know, we at the Fishing Guild always advise you to get some good fishing gear.<br>
|
||||
It's even better when getting top-grade equipment turns into a hobby. Do you want to know why we give so much importance to gear?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00938_TheFishermansOtherHobby Guild-03.htm">Nod</Button>
|
||||
</body></html>
|
@@ -0,0 +1,6 @@
|
||||
<html><body>Fishing Guild Member:<br>
|
||||
Equipment plays a big part in fishing. It's significance shouldn't be underestimated. Warriors preparing for the battle choose most enduring swords and shields to overcome the enemy for sure. We, fishermen, do the same. We choose a firmer fishing rod to get a rich take.<br>
|
||||
A clever fisherman always tries to get good equipment. A <font color="LEVEL">Master Fishing Rod</font> is the best choice!<br>
|
||||
The Fishing Guild wants as many fishermen as possible to learn about this fishing rod and get it. Well, are you interested?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00938_TheFishermansOtherHobby Guild-04.htm">Nod</Button>
|
||||
</body></html>
|
@@ -0,0 +1,6 @@
|
||||
<html><body>Fishing Guild Member:<br>
|
||||
So, I'll to tell you everything I know about Master Fishing Rod.<br>
|
||||
First of all, to get one you must do something. Bring me <font color="LEVEL">40 Nimble Fish</font>.<br>
|
||||
It doesn't matter how you get them. The point is that you bring me the exact number I'm asking for. It's the main ingredient.<br>
|
||||
Bring me <font color="LEVEL">40 Nimble Fish</font>, and I will reward you with materials for your <font color="LEVEL">Master Fishing Rod</font>.
|
||||
</body></html>
|
@@ -0,0 +1,3 @@
|
||||
<html><body>Fishing Guild Member:<br>
|
||||
You must gather <font color="LEVEL">40 Nimble Fish</font>, but I don't see any of them. It doesn't matter how you get them. Just bring me <font color="LEVEL">40 Nimble Fish</font>.
|
||||
</body></html>
|
@@ -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 Q00938_TheFishermansOtherHobby Guild-07.html">"Yes, I did."</Button>
|
||||
</body></html>
|
@@ -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>
|
@@ -0,0 +1,168 @@
|
||||
/*
|
||||
* 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.Q00938_TheFishermansOtherHobby;
|
||||
|
||||
import org.l2jmobius.gameserver.enums.Faction;
|
||||
import org.l2jmobius.gameserver.enums.FishingEndReason;
|
||||
import org.l2jmobius.gameserver.enums.QuestSound;
|
||||
import org.l2jmobius.gameserver.enums.QuestType;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.events.EventType;
|
||||
import org.l2jmobius.gameserver.model.events.ListenerRegisterType;
|
||||
import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
|
||||
import org.l2jmobius.gameserver.model.events.annotations.RegisterType;
|
||||
import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerFishing;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.quest.QuestState;
|
||||
import org.l2jmobius.gameserver.model.quest.State;
|
||||
|
||||
/**
|
||||
* The Fisherman's Other Hobby (938)
|
||||
* @author CostyKiller
|
||||
*/
|
||||
public class Q00938_TheFishermansOtherHobby 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;
|
||||
private static final int SANTIAGO = 34138;
|
||||
// Reward
|
||||
private static final int SANTIAGOS_REEL_FRAGMENT = 47562;
|
||||
// Misc
|
||||
private static final int MIN_LEVEL = 85;
|
||||
private static final int NIMBLE_FISH = 47551;
|
||||
private static final int NIMBLE_FISH_NEEDED = 40;
|
||||
|
||||
public Q00938_TheFishermansOtherHobby()
|
||||
{
|
||||
super(938);
|
||||
addStartNpc(OFULLE, LINNAEUS, PERELIN, BLEAKER, CYANO, PAMFUS, LANOSCO, HUFS, MONAKAN, BERIX, LITULON, WILLIE, HILGENDORF, PLATIS, KLAUS, BATIDAE, EINDARKNER, GALBA, SANTIAGO);
|
||||
addTalkId(OFULLE, LINNAEUS, PERELIN, BLEAKER, CYANO, PAMFUS, LANOSCO, HUFS, MONAKAN, BERIX, LITULON, WILLIE, HILGENDORF, PLATIS, KLAUS, BATIDAE, EINDARKNER, GALBA, SANTIAGO);
|
||||
addCondMinLevel(MIN_LEVEL, "noLevel.htm");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, Npc npc, Player 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))
|
||||
{
|
||||
takeItems(player, NIMBLE_FISH, NIMBLE_FISH_NEEDED);
|
||||
giveItems(player, SANTIAGOS_REEL_FRAGMENT, 2);
|
||||
addFactionPoints(player, Faction.FISHING_GUILD, 100);
|
||||
qs.exitQuest(QuestType.REPEATABLE, true);
|
||||
htmltext = event;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(Npc npc, Player 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)
|
||||
{
|
||||
if (event.getReason() == FishingEndReason.WIN)
|
||||
{
|
||||
final Player player = event.getPlayer();
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if ((qs != null) && qs.isCond(1))
|
||||
{
|
||||
if (getQuestItemsCount(player, NIMBLE_FISH) >= NIMBLE_FISH_NEEDED)
|
||||
{
|
||||
qs.setCond(2, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -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>
|
@@ -155,22 +155,25 @@ public class Q10575_LetsGoFishing extends Quest
|
||||
@RegisterType(ListenerRegisterType.GLOBAL_PLAYERS)
|
||||
public void onPlayerFishing(OnPlayerFishing event)
|
||||
{
|
||||
final Player player = event.getPlayer();
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if ((qs != null) && qs.isCond(2) && (event.getReason() == FishingEndReason.WIN))
|
||||
if (event.getReason() == FishingEndReason.WIN)
|
||||
{
|
||||
int count = qs.getInt(COUNT_VAR);
|
||||
qs.set(COUNT_VAR, ++count);
|
||||
if (count >= 5)
|
||||
final Player player = event.getPlayer();
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if ((qs != null) && qs.isCond(2))
|
||||
{
|
||||
qs.setCond(3, true);
|
||||
int count = qs.getInt(COUNT_VAR);
|
||||
qs.set(COUNT_VAR, ++count);
|
||||
if (count >= 5)
|
||||
{
|
||||
qs.setCond(3, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
|
||||
sendNpcLogList(player);
|
||||
}
|
||||
else
|
||||
{
|
||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
|
||||
sendNpcLogList(player);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -221,6 +221,7 @@ import quests.Q00930_DisparagingThePhantoms.Q00930_DisparagingThePhantoms;
|
||||
import quests.Q00931_MemoriesOfTheWind.Q00931_MemoriesOfTheWind;
|
||||
import quests.Q00932_SayhasEnergy.Q00932_SayhasEnergy;
|
||||
import quests.Q00937_ToReviveTheFishingGuild.Q00937_ToReviveTheFishingGuild;
|
||||
import quests.Q00938_TheFishermansOtherHobby.Q00938_TheFishermansOtherHobby;
|
||||
import quests.Q10282_ToTheSeedOfAnnihilation.Q10282_ToTheSeedOfAnnihilation;
|
||||
import quests.Q10283_RequestOfIceMerchant.Q10283_RequestOfIceMerchant;
|
||||
import quests.Q10284_AcquisitionOfDivineSword.Q10284_AcquisitionOfDivineSword;
|
||||
@@ -804,6 +805,7 @@ public class QuestMasterHandler
|
||||
Q00931_MemoriesOfTheWind.class,
|
||||
Q00932_SayhasEnergy.class,
|
||||
Q00937_ToReviveTheFishingGuild.class,
|
||||
Q00938_TheFishermansOtherHobby.class,
|
||||
Q00985_AdventureGuildsSpecialRequestLv1.class, // TODO: Not done.
|
||||
Q00986_AdventureGuildsSpecialRequestLv2.class, // TODO: Not done.
|
||||
Q00987_AdventureGuildsSpecialRequestLv3.class, // TODO: Not done.
|
||||
|
@@ -113,7 +113,6 @@
|
||||
922 Hunter Guild Request - Northern Region, Isle of Prayer
|
||||
925 Hunter Guild Request - Garden of Spirits
|
||||
929 Seeker Rescue
|
||||
938 The Fisherman's Other Hobby
|
||||
940 Hunter Guild Request - Atelia Fortress
|
||||
986 Adventure Guild's Special Request - Lv. 2
|
||||
987 Adventure Guild's Special Request - Lv. 3
|
||||
|
@@ -160,21 +160,24 @@ public class Q00937_ToReviveTheFishingGuild extends Quest
|
||||
@RegisterType(ListenerRegisterType.GLOBAL_PLAYERS)
|
||||
public void onPlayerFishing(OnPlayerFishing event)
|
||||
{
|
||||
final Player player = event.getPlayer();
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if ((qs != null) && qs.isCond(1) && (event.getReason() == FishingEndReason.WIN))
|
||||
if (event.getReason() == FishingEndReason.WIN)
|
||||
{
|
||||
int count = qs.getInt(COUNT_VAR);
|
||||
qs.set(COUNT_VAR, ++count);
|
||||
if (count >= 100)
|
||||
final Player player = event.getPlayer();
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if ((qs != null) && qs.isCond(1))
|
||||
{
|
||||
qs.setCond(2, true);
|
||||
int count = qs.getInt(COUNT_VAR);
|
||||
qs.set(COUNT_VAR, ++count);
|
||||
if (count >= 100)
|
||||
{
|
||||
qs.setCond(2, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
sendNpcLogList(player);
|
||||
}
|
||||
else
|
||||
{
|
||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
sendNpcLogList(player);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,4 @@
|
||||
<html><body>Fishing Guild Member:<br>
|
||||
As a Fishing Guild member, have you ever dreamed of doing something new, for example, finding a new hobby?<br>
|
||||
<Button ALIGN=LEFT ICON="Normal" action="bypass -h Quest Q00938_TheFishermansOtherHobby Guild-02.htm">"Yes, that is correct."</Button>
|
||||
</body></html>
|
@@ -0,0 +1,5 @@
|
||||
<html><body>Fishing Guild Member:<br>
|
||||
You know, we at the Fishing Guild always advise you to get some good fishing gear.<br>
|
||||
It's even better when getting top-grade equipment turns into a hobby. Do you want to know why we give so much importance to gear?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00938_TheFishermansOtherHobby Guild-03.htm">Nod</Button>
|
||||
</body></html>
|
@@ -0,0 +1,6 @@
|
||||
<html><body>Fishing Guild Member:<br>
|
||||
Equipment plays a big part in fishing. It's significance shouldn't be underestimated. Warriors preparing for the battle choose most enduring swords and shields to overcome the enemy for sure. We, fishermen, do the same. We choose a firmer fishing rod to get a rich take.<br>
|
||||
A clever fisherman always tries to get good equipment. A <font color="LEVEL">Master Fishing Rod</font> is the best choice!<br>
|
||||
The Fishing Guild wants as many fishermen as possible to learn about this fishing rod and get it. Well, are you interested?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00938_TheFishermansOtherHobby Guild-04.htm">Nod</Button>
|
||||
</body></html>
|
@@ -0,0 +1,6 @@
|
||||
<html><body>Fishing Guild Member:<br>
|
||||
So, I'll to tell you everything I know about Master Fishing Rod.<br>
|
||||
First of all, to get one you must do something. Bring me <font color="LEVEL">40 Nimble Fish</font>.<br>
|
||||
It doesn't matter how you get them. The point is that you bring me the exact number I'm asking for. It's the main ingredient.<br>
|
||||
Bring me <font color="LEVEL">40 Nimble Fish</font>, and I will reward you with materials for your <font color="LEVEL">Master Fishing Rod</font>.
|
||||
</body></html>
|
@@ -0,0 +1,3 @@
|
||||
<html><body>Fishing Guild Member:<br>
|
||||
You must gather <font color="LEVEL">40 Nimble Fish</font>, but I don't see any of them. It doesn't matter how you get them. Just bring me <font color="LEVEL">40 Nimble Fish</font>.
|
||||
</body></html>
|
@@ -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 Q00938_TheFishermansOtherHobby Guild-07.html">"Yes, I did."</Button>
|
||||
</body></html>
|
@@ -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>
|
@@ -0,0 +1,168 @@
|
||||
/*
|
||||
* 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.Q00938_TheFishermansOtherHobby;
|
||||
|
||||
import org.l2jmobius.gameserver.enums.Faction;
|
||||
import org.l2jmobius.gameserver.enums.FishingEndReason;
|
||||
import org.l2jmobius.gameserver.enums.QuestSound;
|
||||
import org.l2jmobius.gameserver.enums.QuestType;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.events.EventType;
|
||||
import org.l2jmobius.gameserver.model.events.ListenerRegisterType;
|
||||
import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
|
||||
import org.l2jmobius.gameserver.model.events.annotations.RegisterType;
|
||||
import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerFishing;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.quest.QuestState;
|
||||
import org.l2jmobius.gameserver.model.quest.State;
|
||||
|
||||
/**
|
||||
* The Fisherman's Other Hobby (938)
|
||||
* @author CostyKiller
|
||||
*/
|
||||
public class Q00938_TheFishermansOtherHobby 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;
|
||||
private static final int SANTIAGO = 34138;
|
||||
// Reward
|
||||
private static final int SANTIAGOS_REEL_FRAGMENT = 47562;
|
||||
// Misc
|
||||
private static final int MIN_LEVEL = 85;
|
||||
private static final int NIMBLE_FISH = 47551;
|
||||
private static final int NIMBLE_FISH_NEEDED = 40;
|
||||
|
||||
public Q00938_TheFishermansOtherHobby()
|
||||
{
|
||||
super(938);
|
||||
addStartNpc(OFULLE, LINNAEUS, PERELIN, BLEAKER, CYANO, PAMFUS, LANOSCO, HUFS, MONAKAN, BERIX, LITULON, WILLIE, HILGENDORF, PLATIS, KLAUS, BATIDAE, EINDARKNER, GALBA, SANTIAGO);
|
||||
addTalkId(OFULLE, LINNAEUS, PERELIN, BLEAKER, CYANO, PAMFUS, LANOSCO, HUFS, MONAKAN, BERIX, LITULON, WILLIE, HILGENDORF, PLATIS, KLAUS, BATIDAE, EINDARKNER, GALBA, SANTIAGO);
|
||||
addCondMinLevel(MIN_LEVEL, "noLevel.htm");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, Npc npc, Player 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))
|
||||
{
|
||||
takeItems(player, NIMBLE_FISH, NIMBLE_FISH_NEEDED);
|
||||
giveItems(player, SANTIAGOS_REEL_FRAGMENT, 2);
|
||||
addFactionPoints(player, Faction.FISHING_GUILD, 100);
|
||||
qs.exitQuest(QuestType.REPEATABLE, true);
|
||||
htmltext = event;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(Npc npc, Player 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)
|
||||
{
|
||||
if (event.getReason() == FishingEndReason.WIN)
|
||||
{
|
||||
final Player player = event.getPlayer();
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if ((qs != null) && qs.isCond(1))
|
||||
{
|
||||
if (getQuestItemsCount(player, NIMBLE_FISH) >= NIMBLE_FISH_NEEDED)
|
||||
{
|
||||
qs.setCond(2, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -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>
|
@@ -155,22 +155,25 @@ public class Q10575_LetsGoFishing extends Quest
|
||||
@RegisterType(ListenerRegisterType.GLOBAL_PLAYERS)
|
||||
public void onPlayerFishing(OnPlayerFishing event)
|
||||
{
|
||||
final Player player = event.getPlayer();
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if ((qs != null) && qs.isCond(2) && (event.getReason() == FishingEndReason.WIN))
|
||||
if (event.getReason() == FishingEndReason.WIN)
|
||||
{
|
||||
int count = qs.getInt(COUNT_VAR);
|
||||
qs.set(COUNT_VAR, ++count);
|
||||
if (count >= 5)
|
||||
final Player player = event.getPlayer();
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if ((qs != null) && qs.isCond(2))
|
||||
{
|
||||
qs.setCond(3, true);
|
||||
int count = qs.getInt(COUNT_VAR);
|
||||
qs.set(COUNT_VAR, ++count);
|
||||
if (count >= 5)
|
||||
{
|
||||
qs.setCond(3, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
|
||||
sendNpcLogList(player);
|
||||
}
|
||||
else
|
||||
{
|
||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
|
||||
sendNpcLogList(player);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -227,6 +227,7 @@ import quests.Q00930_DisparagingThePhantoms.Q00930_DisparagingThePhantoms;
|
||||
import quests.Q00931_MemoriesOfTheWind.Q00931_MemoriesOfTheWind;
|
||||
import quests.Q00932_SayhasEnergy.Q00932_SayhasEnergy;
|
||||
import quests.Q00937_ToReviveTheFishingGuild.Q00937_ToReviveTheFishingGuild;
|
||||
import quests.Q00938_TheFishermansOtherHobby.Q00938_TheFishermansOtherHobby;
|
||||
import quests.Q10282_ToTheSeedOfAnnihilation.Q10282_ToTheSeedOfAnnihilation;
|
||||
import quests.Q10283_RequestOfIceMerchant.Q10283_RequestOfIceMerchant;
|
||||
import quests.Q10284_AcquisitionOfDivineSword.Q10284_AcquisitionOfDivineSword;
|
||||
@@ -832,6 +833,7 @@ public class QuestMasterHandler
|
||||
Q00931_MemoriesOfTheWind.class,
|
||||
Q00932_SayhasEnergy.class,
|
||||
Q00937_ToReviveTheFishingGuild.class,
|
||||
Q00938_TheFishermansOtherHobby.class,
|
||||
Q00985_AdventureGuildsSpecialRequestLv1.class, // TODO: Not done.
|
||||
Q00986_AdventureGuildsSpecialRequestLv2.class, // TODO: Not done.
|
||||
Q00987_AdventureGuildsSpecialRequestLv3.class, // TODO: Not done.
|
||||
|
@@ -108,7 +108,6 @@
|
||||
918 Red Libra Request - Atelia Fortress
|
||||
919 Red Libra Request - Superion
|
||||
929 Seeker Rescue
|
||||
938 The Fisherman's Other Hobby
|
||||
986 Adventure Guild's Special Request - Lv. 2
|
||||
987 Adventure Guild's Special Request - Lv. 3
|
||||
988 Adventure Guild's Special Request - Lv. 4
|
||||
|
@@ -160,21 +160,24 @@ public class Q00937_ToReviveTheFishingGuild extends Quest
|
||||
@RegisterType(ListenerRegisterType.GLOBAL_PLAYERS)
|
||||
public void onPlayerFishing(OnPlayerFishing event)
|
||||
{
|
||||
final Player player = event.getPlayer();
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if ((qs != null) && qs.isCond(1) && (event.getReason() == FishingEndReason.WIN))
|
||||
if (event.getReason() == FishingEndReason.WIN)
|
||||
{
|
||||
int count = qs.getInt(COUNT_VAR);
|
||||
qs.set(COUNT_VAR, ++count);
|
||||
if (count >= 100)
|
||||
final Player player = event.getPlayer();
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if ((qs != null) && qs.isCond(1))
|
||||
{
|
||||
qs.setCond(2, true);
|
||||
int count = qs.getInt(COUNT_VAR);
|
||||
qs.set(COUNT_VAR, ++count);
|
||||
if (count >= 100)
|
||||
{
|
||||
qs.setCond(2, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
sendNpcLogList(player);
|
||||
}
|
||||
else
|
||||
{
|
||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
sendNpcLogList(player);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,4 @@
|
||||
<html><body>Fishing Guild Member:<br>
|
||||
As a Fishing Guild member, have you ever dreamed of doing something new, for example, finding a new hobby?<br>
|
||||
<Button ALIGN=LEFT ICON="Normal" action="bypass -h Quest Q00938_TheFishermansOtherHobby Guild-02.htm">"Yes, that is correct."</Button>
|
||||
</body></html>
|
@@ -0,0 +1,5 @@
|
||||
<html><body>Fishing Guild Member:<br>
|
||||
You know, we at the Fishing Guild always advise you to get some good fishing gear.<br>
|
||||
It's even better when getting top-grade equipment turns into a hobby. Do you want to know why we give so much importance to gear?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00938_TheFishermansOtherHobby Guild-03.htm">Nod</Button>
|
||||
</body></html>
|
@@ -0,0 +1,6 @@
|
||||
<html><body>Fishing Guild Member:<br>
|
||||
Equipment plays a big part in fishing. It's significance shouldn't be underestimated. Warriors preparing for the battle choose most enduring swords and shields to overcome the enemy for sure. We, fishermen, do the same. We choose a firmer fishing rod to get a rich take.<br>
|
||||
A clever fisherman always tries to get good equipment. A <font color="LEVEL">Master Fishing Rod</font> is the best choice!<br>
|
||||
The Fishing Guild wants as many fishermen as possible to learn about this fishing rod and get it. Well, are you interested?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00938_TheFishermansOtherHobby Guild-04.htm">Nod</Button>
|
||||
</body></html>
|
@@ -0,0 +1,6 @@
|
||||
<html><body>Fishing Guild Member:<br>
|
||||
So, I'll to tell you everything I know about Master Fishing Rod.<br>
|
||||
First of all, to get one you must do something. Bring me <font color="LEVEL">40 Nimble Fish</font>.<br>
|
||||
It doesn't matter how you get them. The point is that you bring me the exact number I'm asking for. It's the main ingredient.<br>
|
||||
Bring me <font color="LEVEL">40 Nimble Fish</font>, and I will reward you with materials for your <font color="LEVEL">Master Fishing Rod</font>.
|
||||
</body></html>
|
@@ -0,0 +1,3 @@
|
||||
<html><body>Fishing Guild Member:<br>
|
||||
You must gather <font color="LEVEL">40 Nimble Fish</font>, but I don't see any of them. It doesn't matter how you get them. Just bring me <font color="LEVEL">40 Nimble Fish</font>.
|
||||
</body></html>
|
@@ -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 Q00938_TheFishermansOtherHobby Guild-07.html">"Yes, I did."</Button>
|
||||
</body></html>
|
@@ -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>
|
@@ -0,0 +1,168 @@
|
||||
/*
|
||||
* 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.Q00938_TheFishermansOtherHobby;
|
||||
|
||||
import org.l2jmobius.gameserver.enums.Faction;
|
||||
import org.l2jmobius.gameserver.enums.FishingEndReason;
|
||||
import org.l2jmobius.gameserver.enums.QuestSound;
|
||||
import org.l2jmobius.gameserver.enums.QuestType;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.events.EventType;
|
||||
import org.l2jmobius.gameserver.model.events.ListenerRegisterType;
|
||||
import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
|
||||
import org.l2jmobius.gameserver.model.events.annotations.RegisterType;
|
||||
import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerFishing;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.quest.QuestState;
|
||||
import org.l2jmobius.gameserver.model.quest.State;
|
||||
|
||||
/**
|
||||
* The Fisherman's Other Hobby (938)
|
||||
* @author CostyKiller
|
||||
*/
|
||||
public class Q00938_TheFishermansOtherHobby 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;
|
||||
private static final int SANTIAGO = 34138;
|
||||
// Reward
|
||||
private static final int SANTIAGOS_REEL_FRAGMENT = 47562;
|
||||
// Misc
|
||||
private static final int MIN_LEVEL = 85;
|
||||
private static final int NIMBLE_FISH = 47551;
|
||||
private static final int NIMBLE_FISH_NEEDED = 40;
|
||||
|
||||
public Q00938_TheFishermansOtherHobby()
|
||||
{
|
||||
super(938);
|
||||
addStartNpc(OFULLE, LINNAEUS, PERELIN, BLEAKER, CYANO, PAMFUS, LANOSCO, HUFS, MONAKAN, BERIX, LITULON, WILLIE, HILGENDORF, PLATIS, KLAUS, BATIDAE, EINDARKNER, GALBA, SANTIAGO);
|
||||
addTalkId(OFULLE, LINNAEUS, PERELIN, BLEAKER, CYANO, PAMFUS, LANOSCO, HUFS, MONAKAN, BERIX, LITULON, WILLIE, HILGENDORF, PLATIS, KLAUS, BATIDAE, EINDARKNER, GALBA, SANTIAGO);
|
||||
addCondMinLevel(MIN_LEVEL, "noLevel.htm");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, Npc npc, Player 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))
|
||||
{
|
||||
takeItems(player, NIMBLE_FISH, NIMBLE_FISH_NEEDED);
|
||||
giveItems(player, SANTIAGOS_REEL_FRAGMENT, 2);
|
||||
addFactionPoints(player, Faction.FISHING_GUILD, 100);
|
||||
qs.exitQuest(QuestType.REPEATABLE, true);
|
||||
htmltext = event;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(Npc npc, Player 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)
|
||||
{
|
||||
if (event.getReason() == FishingEndReason.WIN)
|
||||
{
|
||||
final Player player = event.getPlayer();
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if ((qs != null) && qs.isCond(1))
|
||||
{
|
||||
if (getQuestItemsCount(player, NIMBLE_FISH) >= NIMBLE_FISH_NEEDED)
|
||||
{
|
||||
qs.setCond(2, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -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>
|
@@ -155,22 +155,25 @@ public class Q10575_LetsGoFishing extends Quest
|
||||
@RegisterType(ListenerRegisterType.GLOBAL_PLAYERS)
|
||||
public void onPlayerFishing(OnPlayerFishing event)
|
||||
{
|
||||
final Player player = event.getPlayer();
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if ((qs != null) && qs.isCond(2) && (event.getReason() == FishingEndReason.WIN))
|
||||
if (event.getReason() == FishingEndReason.WIN)
|
||||
{
|
||||
int count = qs.getInt(COUNT_VAR);
|
||||
qs.set(COUNT_VAR, ++count);
|
||||
if (count >= 5)
|
||||
final Player player = event.getPlayer();
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if ((qs != null) && qs.isCond(2))
|
||||
{
|
||||
qs.setCond(3, true);
|
||||
int count = qs.getInt(COUNT_VAR);
|
||||
qs.set(COUNT_VAR, ++count);
|
||||
if (count >= 5)
|
||||
{
|
||||
qs.setCond(3, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
|
||||
sendNpcLogList(player);
|
||||
}
|
||||
else
|
||||
{
|
||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
|
||||
sendNpcLogList(player);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -140,6 +140,7 @@ import quests.Q00930_DisparagingThePhantoms.Q00930_DisparagingThePhantoms;
|
||||
import quests.Q00931_MemoriesOfTheWind.Q00931_MemoriesOfTheWind;
|
||||
import quests.Q00932_SayhasEnergy.Q00932_SayhasEnergy;
|
||||
import quests.Q00937_ToReviveTheFishingGuild.Q00937_ToReviveTheFishingGuild;
|
||||
import quests.Q00938_TheFishermansOtherHobby.Q00938_TheFishermansOtherHobby;
|
||||
import quests.Q00985_AdventureGuildsSpecialRequestLv1.Q00985_AdventureGuildsSpecialRequestLv1;
|
||||
import quests.Q10282_ToTheSeedOfAnnihilation.Q10282_ToTheSeedOfAnnihilation;
|
||||
import quests.Q10283_RequestOfIceMerchant.Q10283_RequestOfIceMerchant;
|
||||
@@ -481,6 +482,7 @@ public class QuestMasterHandler
|
||||
Q00931_MemoriesOfTheWind.class,
|
||||
Q00932_SayhasEnergy.class,
|
||||
Q00937_ToReviveTheFishingGuild.class,
|
||||
Q00938_TheFishermansOtherHobby.class,
|
||||
Q00985_AdventureGuildsSpecialRequestLv1.class,
|
||||
Q00986_AdventureGuildsSpecialRequestLv2.class, // TODO: Not done.
|
||||
Q00987_AdventureGuildsSpecialRequestLv3.class, // TODO: Not done.
|
||||
|
@@ -46,9 +46,7 @@
|
||||
839 Request from the Unworldly Visitors
|
||||
840 Request from the Kingdom's Royal Guard
|
||||
861 Kain's Choice
|
||||
938 The Fisherman's Other Hobby
|
||||
1900 Storm Isle - Secret Spot
|
||||
1901 Storm Isle - Furtive Deal
|
||||
10507 Obtaining New Power
|
||||
10595 The Dimensional Warp, Part 8
|
||||
10596 The Dimensional Warp, Part 9
|
@@ -160,21 +160,24 @@ public class Q00937_ToReviveTheFishingGuild extends Quest
|
||||
@RegisterType(ListenerRegisterType.GLOBAL_PLAYERS)
|
||||
public void onPlayerFishing(OnPlayerFishing event)
|
||||
{
|
||||
final Player player = event.getPlayer();
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if ((qs != null) && qs.isCond(1) && (event.getReason() == FishingEndReason.WIN))
|
||||
if (event.getReason() == FishingEndReason.WIN)
|
||||
{
|
||||
int count = qs.getInt(COUNT_VAR);
|
||||
qs.set(COUNT_VAR, ++count);
|
||||
if (count >= 100)
|
||||
final Player player = event.getPlayer();
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if ((qs != null) && qs.isCond(1))
|
||||
{
|
||||
qs.setCond(2, true);
|
||||
int count = qs.getInt(COUNT_VAR);
|
||||
qs.set(COUNT_VAR, ++count);
|
||||
if (count >= 100)
|
||||
{
|
||||
qs.setCond(2, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
sendNpcLogList(player);
|
||||
}
|
||||
else
|
||||
{
|
||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
sendNpcLogList(player);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,4 @@
|
||||
<html><body>Fishing Guild Member:<br>
|
||||
As a Fishing Guild member, have you ever dreamed of doing something new, for example, finding a new hobby?<br>
|
||||
<Button ALIGN=LEFT ICON="Normal" action="bypass -h Quest Q00938_TheFishermansOtherHobby Guild-02.htm">"Yes, that is correct."</Button>
|
||||
</body></html>
|
@@ -0,0 +1,5 @@
|
||||
<html><body>Fishing Guild Member:<br>
|
||||
You know, we at the Fishing Guild always advise you to get some good fishing gear.<br>
|
||||
It's even better when getting top-grade equipment turns into a hobby. Do you want to know why we give so much importance to gear?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00938_TheFishermansOtherHobby Guild-03.htm">Nod</Button>
|
||||
</body></html>
|
@@ -0,0 +1,6 @@
|
||||
<html><body>Fishing Guild Member:<br>
|
||||
Equipment plays a big part in fishing. It's significance shouldn't be underestimated. Warriors preparing for the battle choose most enduring swords and shields to overcome the enemy for sure. We, fishermen, do the same. We choose a firmer fishing rod to get a rich take.<br>
|
||||
A clever fisherman always tries to get good equipment. A <font color="LEVEL">Master Fishing Rod</font> is the best choice!<br>
|
||||
The Fishing Guild wants as many fishermen as possible to learn about this fishing rod and get it. Well, are you interested?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00938_TheFishermansOtherHobby Guild-04.htm">Nod</Button>
|
||||
</body></html>
|
@@ -0,0 +1,6 @@
|
||||
<html><body>Fishing Guild Member:<br>
|
||||
So, I'll to tell you everything I know about Master Fishing Rod.<br>
|
||||
First of all, to get one you must do something. Bring me <font color="LEVEL">40 Nimble Fish</font>.<br>
|
||||
It doesn't matter how you get them. The point is that you bring me the exact number I'm asking for. It's the main ingredient.<br>
|
||||
Bring me <font color="LEVEL">40 Nimble Fish</font>, and I will reward you with materials for your <font color="LEVEL">Master Fishing Rod</font>.
|
||||
</body></html>
|
@@ -0,0 +1,3 @@
|
||||
<html><body>Fishing Guild Member:<br>
|
||||
You must gather <font color="LEVEL">40 Nimble Fish</font>, but I don't see any of them. It doesn't matter how you get them. Just bring me <font color="LEVEL">40 Nimble Fish</font>.
|
||||
</body></html>
|
@@ -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 Q00938_TheFishermansOtherHobby Guild-07.html">"Yes, I did."</Button>
|
||||
</body></html>
|
@@ -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>
|
@@ -0,0 +1,168 @@
|
||||
/*
|
||||
* 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.Q00938_TheFishermansOtherHobby;
|
||||
|
||||
import org.l2jmobius.gameserver.enums.Faction;
|
||||
import org.l2jmobius.gameserver.enums.FishingEndReason;
|
||||
import org.l2jmobius.gameserver.enums.QuestSound;
|
||||
import org.l2jmobius.gameserver.enums.QuestType;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.events.EventType;
|
||||
import org.l2jmobius.gameserver.model.events.ListenerRegisterType;
|
||||
import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
|
||||
import org.l2jmobius.gameserver.model.events.annotations.RegisterType;
|
||||
import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerFishing;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.quest.QuestState;
|
||||
import org.l2jmobius.gameserver.model.quest.State;
|
||||
|
||||
/**
|
||||
* The Fisherman's Other Hobby (938)
|
||||
* @author CostyKiller
|
||||
*/
|
||||
public class Q00938_TheFishermansOtherHobby 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;
|
||||
private static final int SANTIAGO = 34138;
|
||||
// Reward
|
||||
private static final int SANTIAGOS_REEL_FRAGMENT = 47562;
|
||||
// Misc
|
||||
private static final int MIN_LEVEL = 85;
|
||||
private static final int NIMBLE_FISH = 47551;
|
||||
private static final int NIMBLE_FISH_NEEDED = 40;
|
||||
|
||||
public Q00938_TheFishermansOtherHobby()
|
||||
{
|
||||
super(938);
|
||||
addStartNpc(OFULLE, LINNAEUS, PERELIN, BLEAKER, CYANO, PAMFUS, LANOSCO, HUFS, MONAKAN, BERIX, LITULON, WILLIE, HILGENDORF, PLATIS, KLAUS, BATIDAE, EINDARKNER, GALBA, SANTIAGO);
|
||||
addTalkId(OFULLE, LINNAEUS, PERELIN, BLEAKER, CYANO, PAMFUS, LANOSCO, HUFS, MONAKAN, BERIX, LITULON, WILLIE, HILGENDORF, PLATIS, KLAUS, BATIDAE, EINDARKNER, GALBA, SANTIAGO);
|
||||
addCondMinLevel(MIN_LEVEL, "noLevel.htm");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, Npc npc, Player 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))
|
||||
{
|
||||
takeItems(player, NIMBLE_FISH, NIMBLE_FISH_NEEDED);
|
||||
giveItems(player, SANTIAGOS_REEL_FRAGMENT, 2);
|
||||
addFactionPoints(player, Faction.FISHING_GUILD, 100);
|
||||
qs.exitQuest(QuestType.REPEATABLE, true);
|
||||
htmltext = event;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(Npc npc, Player 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)
|
||||
{
|
||||
if (event.getReason() == FishingEndReason.WIN)
|
||||
{
|
||||
final Player player = event.getPlayer();
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if ((qs != null) && qs.isCond(1))
|
||||
{
|
||||
if (getQuestItemsCount(player, NIMBLE_FISH) >= NIMBLE_FISH_NEEDED)
|
||||
{
|
||||
qs.setCond(2, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -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>
|
@@ -155,22 +155,25 @@ public class Q10575_LetsGoFishing extends Quest
|
||||
@RegisterType(ListenerRegisterType.GLOBAL_PLAYERS)
|
||||
public void onPlayerFishing(OnPlayerFishing event)
|
||||
{
|
||||
final Player player = event.getPlayer();
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if ((qs != null) && qs.isCond(2) && (event.getReason() == FishingEndReason.WIN))
|
||||
if (event.getReason() == FishingEndReason.WIN)
|
||||
{
|
||||
int count = qs.getInt(COUNT_VAR);
|
||||
qs.set(COUNT_VAR, ++count);
|
||||
if (count >= 5)
|
||||
final Player player = event.getPlayer();
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if ((qs != null) && qs.isCond(2))
|
||||
{
|
||||
qs.setCond(3, true);
|
||||
int count = qs.getInt(COUNT_VAR);
|
||||
qs.set(COUNT_VAR, ++count);
|
||||
if (count >= 5)
|
||||
{
|
||||
qs.setCond(3, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
|
||||
sendNpcLogList(player);
|
||||
}
|
||||
else
|
||||
{
|
||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
|
||||
sendNpcLogList(player);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -28,6 +28,7 @@ import quests.Q00833_DevilsTreasureTauti.Q00833_DevilsTreasureTauti;
|
||||
import quests.Q00835_PitiableMelisa.Q00835_PitiableMelisa;
|
||||
import quests.Q00933_TombRaiders.Q00933_TombRaiders;
|
||||
import quests.Q00937_ToReviveTheFishingGuild.Q00937_ToReviveTheFishingGuild;
|
||||
import quests.Q00938_TheFishermansOtherHobby.Q00938_TheFishermansOtherHobby;
|
||||
import quests.Q10423_EmbryoStrongholdRaid.Q10423_EmbryoStrongholdRaid;
|
||||
import quests.Q10454_FinalEmbryoApostle.Q10454_FinalEmbryoApostle;
|
||||
import quests.Q10507_ObtainingNewPower.Q10507_ObtainingNewPower;
|
||||
@@ -99,6 +100,7 @@ public class QuestMasterHandler
|
||||
Q00840_RequestFromTheKingdomsRoyalGuard.class, // TODO: Not done.
|
||||
Q00933_TombRaiders.class,
|
||||
Q00937_ToReviveTheFishingGuild.class,
|
||||
Q00938_TheFishermansOtherHobby.class,
|
||||
Q01900_StormIsleSecretSpot.class, // TODO: Not done.
|
||||
Q01901_StormIsleFurtiveDeal.class, // TODO: Not done.
|
||||
Q10423_EmbryoStrongholdRaid.class,
|
||||
|
@@ -46,9 +46,7 @@
|
||||
839 Request from the Unworldly Visitors
|
||||
840 Request from the Kingdom's Royal Guard
|
||||
861 Kain's Choice
|
||||
938 The Fisherman's Other Hobby
|
||||
1900 Storm Isle - Secret Spot
|
||||
1901 Storm Isle - Furtive Deal
|
||||
10507 Obtaining New Power
|
||||
10595 The Dimensional Warp, Part 8
|
||||
10596 The Dimensional Warp, Part 9
|
@@ -160,21 +160,24 @@ public class Q00937_ToReviveTheFishingGuild extends Quest
|
||||
@RegisterType(ListenerRegisterType.GLOBAL_PLAYERS)
|
||||
public void onPlayerFishing(OnPlayerFishing event)
|
||||
{
|
||||
final Player player = event.getPlayer();
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if ((qs != null) && qs.isCond(1) && (event.getReason() == FishingEndReason.WIN))
|
||||
if (event.getReason() == FishingEndReason.WIN)
|
||||
{
|
||||
int count = qs.getInt(COUNT_VAR);
|
||||
qs.set(COUNT_VAR, ++count);
|
||||
if (count >= 100)
|
||||
final Player player = event.getPlayer();
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if ((qs != null) && qs.isCond(1))
|
||||
{
|
||||
qs.setCond(2, true);
|
||||
int count = qs.getInt(COUNT_VAR);
|
||||
qs.set(COUNT_VAR, ++count);
|
||||
if (count >= 100)
|
||||
{
|
||||
qs.setCond(2, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
sendNpcLogList(player);
|
||||
}
|
||||
else
|
||||
{
|
||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
sendNpcLogList(player);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,4 @@
|
||||
<html><body>Fishing Guild Member:<br>
|
||||
As a Fishing Guild member, have you ever dreamed of doing something new, for example, finding a new hobby?<br>
|
||||
<Button ALIGN=LEFT ICON="Normal" action="bypass -h Quest Q00938_TheFishermansOtherHobby Guild-02.htm">"Yes, that is correct."</Button>
|
||||
</body></html>
|
@@ -0,0 +1,5 @@
|
||||
<html><body>Fishing Guild Member:<br>
|
||||
You know, we at the Fishing Guild always advise you to get some good fishing gear.<br>
|
||||
It's even better when getting top-grade equipment turns into a hobby. Do you want to know why we give so much importance to gear?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00938_TheFishermansOtherHobby Guild-03.htm">Nod</Button>
|
||||
</body></html>
|
@@ -0,0 +1,6 @@
|
||||
<html><body>Fishing Guild Member:<br>
|
||||
Equipment plays a big part in fishing. It's significance shouldn't be underestimated. Warriors preparing for the battle choose most enduring swords and shields to overcome the enemy for sure. We, fishermen, do the same. We choose a firmer fishing rod to get a rich take.<br>
|
||||
A clever fisherman always tries to get good equipment. A <font color="LEVEL">Master Fishing Rod</font> is the best choice!<br>
|
||||
The Fishing Guild wants as many fishermen as possible to learn about this fishing rod and get it. Well, are you interested?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00938_TheFishermansOtherHobby Guild-04.htm">Nod</Button>
|
||||
</body></html>
|
@@ -0,0 +1,6 @@
|
||||
<html><body>Fishing Guild Member:<br>
|
||||
So, I'll to tell you everything I know about Master Fishing Rod.<br>
|
||||
First of all, to get one you must do something. Bring me <font color="LEVEL">40 Nimble Fish</font>.<br>
|
||||
It doesn't matter how you get them. The point is that you bring me the exact number I'm asking for. It's the main ingredient.<br>
|
||||
Bring me <font color="LEVEL">40 Nimble Fish</font>, and I will reward you with materials for your <font color="LEVEL">Master Fishing Rod</font>.
|
||||
</body></html>
|
@@ -0,0 +1,3 @@
|
||||
<html><body>Fishing Guild Member:<br>
|
||||
You must gather <font color="LEVEL">40 Nimble Fish</font>, but I don't see any of them. It doesn't matter how you get them. Just bring me <font color="LEVEL">40 Nimble Fish</font>.
|
||||
</body></html>
|
@@ -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 Q00938_TheFishermansOtherHobby Guild-07.html">"Yes, I did."</Button>
|
||||
</body></html>
|
@@ -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>
|
@@ -0,0 +1,168 @@
|
||||
/*
|
||||
* 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.Q00938_TheFishermansOtherHobby;
|
||||
|
||||
import org.l2jmobius.gameserver.enums.Faction;
|
||||
import org.l2jmobius.gameserver.enums.FishingEndReason;
|
||||
import org.l2jmobius.gameserver.enums.QuestSound;
|
||||
import org.l2jmobius.gameserver.enums.QuestType;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.events.EventType;
|
||||
import org.l2jmobius.gameserver.model.events.ListenerRegisterType;
|
||||
import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
|
||||
import org.l2jmobius.gameserver.model.events.annotations.RegisterType;
|
||||
import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerFishing;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.quest.QuestState;
|
||||
import org.l2jmobius.gameserver.model.quest.State;
|
||||
|
||||
/**
|
||||
* The Fisherman's Other Hobby (938)
|
||||
* @author CostyKiller
|
||||
*/
|
||||
public class Q00938_TheFishermansOtherHobby 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;
|
||||
private static final int SANTIAGO = 34138;
|
||||
// Reward
|
||||
private static final int SANTIAGOS_REEL_FRAGMENT = 47562;
|
||||
// Misc
|
||||
private static final int MIN_LEVEL = 85;
|
||||
private static final int NIMBLE_FISH = 47551;
|
||||
private static final int NIMBLE_FISH_NEEDED = 40;
|
||||
|
||||
public Q00938_TheFishermansOtherHobby()
|
||||
{
|
||||
super(938);
|
||||
addStartNpc(OFULLE, LINNAEUS, PERELIN, BLEAKER, CYANO, PAMFUS, LANOSCO, HUFS, MONAKAN, BERIX, LITULON, WILLIE, HILGENDORF, PLATIS, KLAUS, BATIDAE, EINDARKNER, GALBA, SANTIAGO);
|
||||
addTalkId(OFULLE, LINNAEUS, PERELIN, BLEAKER, CYANO, PAMFUS, LANOSCO, HUFS, MONAKAN, BERIX, LITULON, WILLIE, HILGENDORF, PLATIS, KLAUS, BATIDAE, EINDARKNER, GALBA, SANTIAGO);
|
||||
addCondMinLevel(MIN_LEVEL, "noLevel.htm");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, Npc npc, Player 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))
|
||||
{
|
||||
takeItems(player, NIMBLE_FISH, NIMBLE_FISH_NEEDED);
|
||||
giveItems(player, SANTIAGOS_REEL_FRAGMENT, 2);
|
||||
addFactionPoints(player, Faction.FISHING_GUILD, 100);
|
||||
qs.exitQuest(QuestType.REPEATABLE, true);
|
||||
htmltext = event;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(Npc npc, Player 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)
|
||||
{
|
||||
if (event.getReason() == FishingEndReason.WIN)
|
||||
{
|
||||
final Player player = event.getPlayer();
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if ((qs != null) && qs.isCond(1))
|
||||
{
|
||||
if (getQuestItemsCount(player, NIMBLE_FISH) >= NIMBLE_FISH_NEEDED)
|
||||
{
|
||||
qs.setCond(2, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user