Skip to content
Snippets Groups Projects
Commit a42ee275 authored by ivantotov's avatar ivantotov
Browse files

Quest: Relic Exploration (183) update.

Reviewed by: @Zoey76
parent 95ee64fb
No related branches found
No related tags found
No related merge requests found
<html><body>Head Blacksmith Kusto:<br> <html><body>Head Blacksmith Kusto:<br>
My trade is a very competitive one. I believed that the lost knowledge of the Giants would benefit me and all those with interests in the Black Anvil Guild... <br> My trade is a very competitive one. I believed that the lost knowledge of the Giants would benefit me and all those with interests in the Black Anvil Guild...<br>
<a action="bypass -h Quest Q00183_RelicExploration 30512-02.htm">Listen to his story.</a> <a action="bypass -h Quest Q00183_RelicExploration 30512-02.htm">Listen to his story.</a>
</body></html> </body></html>
\ No newline at end of file
<html><body>Head Blacksmith Kusto:<br> <html><body>Head Blacksmith Kusto:<br>
I allied myself with Lorain, a member of the Bronze Key Guild. I promised that we would share equally any of the secrets we discovered in our quest. However, I think something terrible has recently happened to her. Would you help me?<br> I allied myself with Lorain, a member of the Bronze Key Guild. I promised that we would share equally any of the secrets we discovered in our quest. However, I think something terrible has recently happened to her. Would you help me?<br>
<a action="bypass -h Quest Q00183_RelicExploration 30512-03.htm">"How can I help?"</a> <a action="bypass -h Quest Q00183_RelicExploration 30512-04.htm">"How can I help?"</a>
</body></html> </body></html>
\ No newline at end of file
<html><body>Researcher Lorain:<br> <html><body>Researcher Lorain:<br>
Ah! You're the one I was promised could help me... <br> Ah! You're the one I was promised could help me...<br>
But you're too late. I was surprised by a monster while searching the 2nd floor, and I ended up having a big fight with that arrogant Nikola over there. He's so frustrating! I know he has a great deal of insight into these matters, but I can't stand working with him. <br> But you're too late. I was surprised by a monster while searching the 2nd floor, and I ended up having a big fight with that arrogant Nikola over there. He's so frustrating! I know he has a great deal of insight into these matters, but I can't stand working with him.<br>
<a action="bypass -h Quest Q00183_RelicExploration 30673-03.html">"But you have to continue your work!"</a> <a action="bypass -h Quest Q00183_RelicExploration 30673-03.html">"But you have to continue your work!"</a>
</body></html> </body></html>
\ No newline at end of file
<html><body>Researcher Lorain:<br> <html><body>Researcher Lorain:<br>
Would you work with someone who abandoned you in the face of danger? You and I can work together, and I'm sure we'll make progress. Of course, it is going to be harder to find the area we need... <br> Would you work with someone who abandoned you in the face of danger? You and I can work together, and I'm sure we'll make progress. Of course, it is going to be harder to find the area we need...<br>
<a action="bypass -h Quest Q00183_RelicExploration 30673-04.html">"Give me some time and I'll see if I can patch things up between you two."</a> <a action="bypass -h Quest Q00183_RelicExploration 30673-04.html">"Give me some time and I'll see if I can patch things up between you two."</a>
</body></html> </body></html>
\ No newline at end of file
...@@ -18,16 +18,18 @@ ...@@ -18,16 +18,18 @@
*/ */
package quests.Q00183_RelicExploration; package quests.Q00183_RelicExploration;
import quests.Q00184_ArtOfPersuasion.Q00184_ArtOfPersuasion;
import quests.Q00185_NikolasCooperation.Q00185_NikolasCooperation;
import com.l2jserver.gameserver.instancemanager.QuestManager; import com.l2jserver.gameserver.instancemanager.QuestManager;
import com.l2jserver.gameserver.model.actor.L2Npc; import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.quest.Quest; import com.l2jserver.gameserver.model.quest.Quest;
import com.l2jserver.gameserver.model.quest.QuestState; import com.l2jserver.gameserver.model.quest.QuestState;
import com.l2jserver.gameserver.model.quest.State;
/** /**
* Relic Exploration (183) * Relic Exploration (183)
* @author IvanTotov * @author ivantotov
*/ */
public final class Q00183_RelicExploration extends Quest public final class Q00183_RelicExploration extends Quest
{ {
...@@ -35,6 +37,9 @@ public final class Q00183_RelicExploration extends Quest ...@@ -35,6 +37,9 @@ public final class Q00183_RelicExploration extends Quest
private static final int HEAD_BLACKSMITH_KUSTO = 30512; private static final int HEAD_BLACKSMITH_KUSTO = 30512;
private static final int MAESTRO_NIKOLA = 30621; private static final int MAESTRO_NIKOLA = 30621;
private static final int RESEARCHER_LORAIN = 30673; private static final int RESEARCHER_LORAIN = 30673;
// Misc
private static final int MIN_LEVEL = 40;
private static final int MAX_LEVEL_FOR_EXP_SP = 46;
public Q00183_RelicExploration() public Q00183_RelicExploration()
{ {
...@@ -46,66 +51,93 @@ public final class Q00183_RelicExploration extends Quest ...@@ -46,66 +51,93 @@ public final class Q00183_RelicExploration extends Quest
@Override @Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{ {
QuestState st = getQuestState(player, false); final QuestState qs = getQuestState(player, false);
if (qs == null)
if (st == null)
{ {
return null; return null;
} }
String htmltext = null; String htmltext = null;
switch (event) switch (event)
{ {
case "30512-02.htm": case "30512-04.htm":
case "30673-02.html":
case "30673-03.html":
{ {
qs.startQuest();
qs.setMemoState(1);
htmltext = event; htmltext = event;
break; break;
} }
case "30512-03.htm": case "30512-02.htm":
{ {
st.startQuest();
htmltext = event; htmltext = event;
break; break;
} }
case "30673-04.html": case "30621-02.html":
{ {
st.setCond(2, true); if (qs.isMemoState(2))
htmltext = event; {
qs.giveAdena(18100, true);
if (player.getLevel() < MAX_LEVEL_FOR_EXP_SP)
{
qs.addExpAndSp(60000, 3000);
qs.exitQuest(false, true);
htmltext = event;
}
}
break; break;
} }
case "30621-02.html": case "30673-02.html":
case "30673-03.html":
{ {
if (player.getLevel() < 43) if (qs.isMemoState(1))
{ {
st.addExpAndSp(60000, 3000); htmltext = event;
}
break;
}
case "30673-04.html":
{
if (qs.isMemoState(1))
{
qs.setMemoState(2);
qs.setCond(2, true);
htmltext = event;
} }
st.giveAdena(18100, true);
st.exitQuest(false, true);
htmltext = event;
break; break;
} }
case "Contract": case "Contract":
{ {
final Quest quest = QuestManager.getInstance().getQuest("184_Nikolas_Cooperation_Contract"); final QuestState qs184 = player.getQuestState(Q00184_ArtOfPersuasion.class.getSimpleName());
st = player.getQuestState("184_Nikolas_Cooperation_Contract"); final QuestState qs185 = player.getQuestState(Q00185_NikolasCooperation.class.getSimpleName());
if ((quest != null) && (st == null)) final Quest quest = QuestManager.getInstance().getQuest(Q00184_ArtOfPersuasion.class.getSimpleName());
if ((quest != null) && (qs184 == null) && (qs185 == null))
{ {
st = quest.newQuestState(player); if (player.getLevel() >= MIN_LEVEL)
st.setState(State.STARTED); {
quest.notifyEvent("30621-01.htm", npc, player); quest.notifyEvent("30621-03.htm", npc, player);
}
else
{
quest.notifyEvent("30621-03a.html", npc, player);
}
} }
break; break;
} }
case "Consideration": case "Consideration":
{ {
final Quest quest = QuestManager.getInstance().getQuest("185_Nikolas_Cooperation_Consideration"); final QuestState qs184 = player.getQuestState(Q00184_ArtOfPersuasion.class.getSimpleName());
st = player.getQuestState("185_Nikolas_Cooperation_Consideration"); final QuestState qs185 = player.getQuestState(Q00185_NikolasCooperation.class.getSimpleName());
if ((quest != null) && (st == null)) final Quest quest = QuestManager.getInstance().getQuest(Q00185_NikolasCooperation.class.getSimpleName());
if ((quest != null) && (qs184 == null) && (qs185 == null))
{ {
st = quest.newQuestState(player); if (player.getLevel() >= MIN_LEVEL)
st.setState(State.STARTED); {
quest.notifyEvent("30621-01.htm", npc, player); quest.notifyEvent("30621-03.htm", npc, player);
}
else
{
quest.notifyEvent("30621-03a.html", npc, player);
}
} }
break; break;
} }
...@@ -116,57 +148,53 @@ public final class Q00183_RelicExploration extends Quest ...@@ -116,57 +148,53 @@ public final class Q00183_RelicExploration extends Quest
@Override @Override
public String onTalk(L2Npc npc, L2PcInstance player) public String onTalk(L2Npc npc, L2PcInstance player)
{ {
final QuestState qs = getQuestState(player, true);
String htmltext = getNoQuestMsg(player); String htmltext = getNoQuestMsg(player);
final QuestState st = getQuestState(player, true); if (qs.isCreated())
if (st == null)
{ {
return htmltext; if (npc.getId() == HEAD_BLACKSMITH_KUSTO)
{
htmltext = (player.getLevel() >= MIN_LEVEL) ? "30512-01.htm" : "30512-03.html";
}
} }
else if (qs.isStarted())
switch (npc.getId())
{ {
case HEAD_BLACKSMITH_KUSTO: switch (npc.getId())
{ {
switch (st.getState()) case HEAD_BLACKSMITH_KUSTO:
{ {
case State.CREATED: htmltext = "30512-05.html";
break;
}
case MAESTRO_NIKOLA:
{
if (qs.isMemoState(2))
{ {
htmltext = (player.getLevel() < 40) ? "30512-00.htm" : "30512-01.htm"; htmltext = "30621-01.html";
break;
} }
case State.STARTED: break;
}
case RESEARCHER_LORAIN:
{
if (qs.isMemoState(1))
{ {
if (st.isCond(1)) htmltext = "30673-01.html";
{
htmltext = "30512-04.html";
}
break;
} }
case State.COMPLETED: else if (qs.isMemoState(2))
{ {
htmltext = getAlreadyCompletedMsg(player); htmltext = "30673-05.html";
break;
} }
break;
} }
break;
}
case RESEARCHER_LORAIN:
{
if (st.isStarted())
{
htmltext = st.isCond(1) ? "30673-01.html" : "30673-05.html";
}
break;
} }
case MAESTRO_NIKOLA: }
if (qs.isCompleted())
{
if (npc.getId() == HEAD_BLACKSMITH_KUSTO)
{ {
if (st.isCond(2)) htmltext = getAlreadyCompletedMsg(player);
{
htmltext = "30621-01.html";
}
break;
} }
} }
return htmltext; return htmltext;
} }
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment