Quests rework.
This commit is contained in:
@@ -72,8 +72,8 @@ public final class Q00197_SevenSignsTheSacredBookOfSeal extends Quest
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
||||
final QuestState st = getQuestState(player, false);
|
||||
if (st == null)
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if (qs == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@@ -89,13 +89,13 @@ public final class Q00197_SevenSignsTheSacredBookOfSeal extends Quest
|
||||
}
|
||||
case "32593-04.html":
|
||||
{
|
||||
st.startQuest();
|
||||
qs.startQuest();
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "32593-08.html":
|
||||
{
|
||||
if (st.isCond(6) && st.hasQuestItems(MYSTERIOUS_HAND_WRITTEN_TEXT, SCULPTURE_OF_DOUBT))
|
||||
if (qs.isCond(6) && hasQuestItems(player, MYSTERIOUS_HAND_WRITTEN_TEXT, SCULPTURE_OF_DOUBT))
|
||||
{
|
||||
htmltext = event;
|
||||
}
|
||||
@@ -103,12 +103,12 @@ public final class Q00197_SevenSignsTheSacredBookOfSeal extends Quest
|
||||
}
|
||||
case "32593-09.html":
|
||||
{
|
||||
if (st.isCond(6))
|
||||
if (qs.isCond(6))
|
||||
{
|
||||
if (player.getLevel() >= MIN_LEVEL)
|
||||
{
|
||||
st.addExpAndSp(52518015, 5817677);
|
||||
st.exitQuest(false, true);
|
||||
addExpAndSp(player, 52518015, 5817677);
|
||||
qs.exitQuest(false, true);
|
||||
htmltext = event;
|
||||
}
|
||||
else
|
||||
@@ -121,7 +121,7 @@ public final class Q00197_SevenSignsTheSacredBookOfSeal extends Quest
|
||||
case "30857-02.html":
|
||||
case "30857-03.html":
|
||||
{
|
||||
if (st.isCond(1))
|
||||
if (qs.isCond(1))
|
||||
{
|
||||
htmltext = event;
|
||||
}
|
||||
@@ -129,16 +129,16 @@ public final class Q00197_SevenSignsTheSacredBookOfSeal extends Quest
|
||||
}
|
||||
case "30857-04.html":
|
||||
{
|
||||
if (st.isCond(1))
|
||||
if (qs.isCond(1))
|
||||
{
|
||||
st.setCond(2, true);
|
||||
qs.setCond(2, true);
|
||||
htmltext = event;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "32594-02.html":
|
||||
{
|
||||
if (st.isCond(2))
|
||||
if (qs.isCond(2))
|
||||
{
|
||||
htmltext = event;
|
||||
}
|
||||
@@ -146,9 +146,9 @@ public final class Q00197_SevenSignsTheSacredBookOfSeal extends Quest
|
||||
}
|
||||
case "32594-03.html":
|
||||
{
|
||||
if (st.isCond(2))
|
||||
if (qs.isCond(2))
|
||||
{
|
||||
st.setCond(3, true);
|
||||
qs.setCond(3, true);
|
||||
htmltext = event;
|
||||
}
|
||||
break;
|
||||
@@ -156,7 +156,7 @@ public final class Q00197_SevenSignsTheSacredBookOfSeal extends Quest
|
||||
case "32595-02.html":
|
||||
case "32595-03.html":
|
||||
{
|
||||
if (st.isCond(3))
|
||||
if (qs.isCond(3))
|
||||
{
|
||||
htmltext = event;
|
||||
}
|
||||
@@ -164,7 +164,7 @@ public final class Q00197_SevenSignsTheSacredBookOfSeal extends Quest
|
||||
}
|
||||
case "32595-04.html":
|
||||
{
|
||||
if (st.isCond(3))
|
||||
if (qs.isCond(3))
|
||||
{
|
||||
isBusy = true;
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.S1_THAT_STRANGER_MUST_BE_DEFEATED_HERE_IS_THE_ULTIMATE_HELP).addStringParameter(player.getName()));
|
||||
@@ -179,7 +179,7 @@ public final class Q00197_SevenSignsTheSacredBookOfSeal extends Quest
|
||||
case "32595-07.html":
|
||||
case "32595-08.html":
|
||||
{
|
||||
if (st.isCond(4) && st.hasQuestItems(SCULPTURE_OF_DOUBT))
|
||||
if (qs.isCond(4) && hasQuestItems(player, SCULPTURE_OF_DOUBT))
|
||||
{
|
||||
htmltext = event;
|
||||
}
|
||||
@@ -187,9 +187,9 @@ public final class Q00197_SevenSignsTheSacredBookOfSeal extends Quest
|
||||
}
|
||||
case "32595-09.html":
|
||||
{
|
||||
if (st.isCond(4) && st.hasQuestItems(SCULPTURE_OF_DOUBT))
|
||||
if (qs.isCond(4) && hasQuestItems(player, SCULPTURE_OF_DOUBT))
|
||||
{
|
||||
st.setCond(5, true);
|
||||
qs.setCond(5, true);
|
||||
htmltext = event;
|
||||
}
|
||||
break;
|
||||
@@ -197,7 +197,7 @@ public final class Q00197_SevenSignsTheSacredBookOfSeal extends Quest
|
||||
case "32596-02.html":
|
||||
case "32596-03.html":
|
||||
{
|
||||
if (st.isCond(5) && st.hasQuestItems(SCULPTURE_OF_DOUBT))
|
||||
if (qs.isCond(5) && hasQuestItems(player, SCULPTURE_OF_DOUBT))
|
||||
{
|
||||
htmltext = event;
|
||||
}
|
||||
@@ -205,10 +205,10 @@ public final class Q00197_SevenSignsTheSacredBookOfSeal extends Quest
|
||||
}
|
||||
case "32596-04.html":
|
||||
{
|
||||
if (st.isCond(5) && st.hasQuestItems(SCULPTURE_OF_DOUBT))
|
||||
if (qs.isCond(5) && hasQuestItems(player, SCULPTURE_OF_DOUBT))
|
||||
{
|
||||
st.giveItems(MYSTERIOUS_HAND_WRITTEN_TEXT, 1);
|
||||
st.setCond(6, true);
|
||||
giveItems(player, MYSTERIOUS_HAND_WRITTEN_TEXT, 1);
|
||||
qs.setCond(6, true);
|
||||
htmltext = event;
|
||||
}
|
||||
break;
|
||||
@@ -226,12 +226,12 @@ public final class Q00197_SevenSignsTheSacredBookOfSeal extends Quest
|
||||
return null;
|
||||
}
|
||||
|
||||
final QuestState st = getQuestState(partyMember, false);
|
||||
final QuestState qs = getQuestState(partyMember, false);
|
||||
if (npc.isInsideRadius(partyMember, 1500, true, false))
|
||||
{
|
||||
st.giveItems(SCULPTURE_OF_DOUBT, 1);
|
||||
st.playSound(QuestSound.ITEMSOUND_QUEST_FINISH);
|
||||
st.setCond(4);
|
||||
giveItems(player, SCULPTURE_OF_DOUBT, 1);
|
||||
playSound(player, QuestSound.ITEMSOUND_QUEST_FINISH);
|
||||
qs.setCond(4);
|
||||
}
|
||||
|
||||
isBusy = false;
|
||||
@@ -243,9 +243,9 @@ public final class Q00197_SevenSignsTheSacredBookOfSeal extends Quest
|
||||
@Override
|
||||
public String onTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
QuestState st = getQuestState(player, true);
|
||||
QuestState qs = getQuestState(player, true);
|
||||
String htmltext = getNoQuestMsg(player);
|
||||
switch (st.getState())
|
||||
switch (qs.getState())
|
||||
{
|
||||
case State.COMPLETED:
|
||||
{
|
||||
@@ -256,8 +256,8 @@ public final class Q00197_SevenSignsTheSacredBookOfSeal extends Quest
|
||||
{
|
||||
if (npc.getId() == WOOD)
|
||||
{
|
||||
st = player.getQuestState(Q00196_SevenSignsSealOfTheEmperor.class.getSimpleName());
|
||||
htmltext = ((player.getLevel() >= MIN_LEVEL) && (st != null) && (st.isCompleted())) ? "32593-01.htm" : "32593-05.html";
|
||||
qs = player.getQuestState(Q00196_SevenSignsSealOfTheEmperor.class.getSimpleName());
|
||||
htmltext = ((player.getLevel() >= MIN_LEVEL) && (qs != null) && (qs.isCompleted())) ? "32593-01.htm" : "32593-05.html";
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -267,13 +267,13 @@ public final class Q00197_SevenSignsTheSacredBookOfSeal extends Quest
|
||||
{
|
||||
case WOOD:
|
||||
{
|
||||
if ((st.getCond() > 0) && (st.getCond() < 6))
|
||||
if ((qs.getCond() > 0) && (qs.getCond() < 6))
|
||||
{
|
||||
htmltext = "32593-06.html";
|
||||
}
|
||||
else if (st.isCond(6))
|
||||
else if (qs.isCond(6))
|
||||
{
|
||||
if (st.hasQuestItems(MYSTERIOUS_HAND_WRITTEN_TEXT, SCULPTURE_OF_DOUBT))
|
||||
if (hasQuestItems(player, MYSTERIOUS_HAND_WRITTEN_TEXT, SCULPTURE_OF_DOUBT))
|
||||
{
|
||||
htmltext = "32593-07.html";
|
||||
}
|
||||
@@ -282,11 +282,11 @@ public final class Q00197_SevenSignsTheSacredBookOfSeal extends Quest
|
||||
}
|
||||
case ORVEN:
|
||||
{
|
||||
if (st.isCond(1))
|
||||
if (qs.isCond(1))
|
||||
{
|
||||
htmltext = "30857-01.html";
|
||||
}
|
||||
else if (st.getCond() >= 2)
|
||||
else if (qs.getCond() >= 2)
|
||||
{
|
||||
htmltext = "30857-05.html";
|
||||
}
|
||||
@@ -294,11 +294,11 @@ public final class Q00197_SevenSignsTheSacredBookOfSeal extends Quest
|
||||
}
|
||||
case LEOPARD:
|
||||
{
|
||||
if (st.isCond(2))
|
||||
if (qs.isCond(2))
|
||||
{
|
||||
htmltext = "32594-01.html";
|
||||
}
|
||||
else if (st.getCond() >= 3)
|
||||
else if (qs.getCond() >= 3)
|
||||
{
|
||||
htmltext = "32594-04.html";
|
||||
}
|
||||
@@ -306,7 +306,7 @@ public final class Q00197_SevenSignsTheSacredBookOfSeal extends Quest
|
||||
}
|
||||
case LAWRENCE:
|
||||
{
|
||||
if (st.isCond(3))
|
||||
if (qs.isCond(3))
|
||||
{
|
||||
if (isBusy)
|
||||
{
|
||||
@@ -317,16 +317,16 @@ public final class Q00197_SevenSignsTheSacredBookOfSeal extends Quest
|
||||
htmltext = "32595-01.html";
|
||||
}
|
||||
}
|
||||
else if (st.isCond(4))
|
||||
else if (qs.isCond(4))
|
||||
{
|
||||
if (st.hasQuestItems(SCULPTURE_OF_DOUBT))
|
||||
if (hasQuestItems(player, SCULPTURE_OF_DOUBT))
|
||||
{
|
||||
htmltext = "32595-06.html";
|
||||
}
|
||||
}
|
||||
else if (st.getCond() >= 5)
|
||||
else if (qs.getCond() >= 5)
|
||||
{
|
||||
if (st.hasQuestItems(SCULPTURE_OF_DOUBT))
|
||||
if (hasQuestItems(player, SCULPTURE_OF_DOUBT))
|
||||
{
|
||||
htmltext = "32595-10.html";
|
||||
}
|
||||
@@ -335,16 +335,16 @@ public final class Q00197_SevenSignsTheSacredBookOfSeal extends Quest
|
||||
}
|
||||
case SOPHIA:
|
||||
{
|
||||
if (st.isCond(5))
|
||||
if (qs.isCond(5))
|
||||
{
|
||||
if (st.hasQuestItems(SCULPTURE_OF_DOUBT))
|
||||
if (hasQuestItems(player, SCULPTURE_OF_DOUBT))
|
||||
{
|
||||
htmltext = "32596-01.html";
|
||||
}
|
||||
}
|
||||
else if (st.getCond() >= 6)
|
||||
else if (qs.getCond() >= 6)
|
||||
{
|
||||
if (st.hasQuestItems(SCULPTURE_OF_DOUBT, MYSTERIOUS_HAND_WRITTEN_TEXT))
|
||||
if (hasQuestItems(player, SCULPTURE_OF_DOUBT, MYSTERIOUS_HAND_WRITTEN_TEXT))
|
||||
{
|
||||
htmltext = "32596-05.html";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user