Quests rework.

This commit is contained in:
MobiusDev
2016-02-11 21:39:33 +00:00
parent b2cafd8e2e
commit 09976b0ce6
173 changed files with 6416 additions and 4720 deletions

View File

@@ -85,8 +85,8 @@ public final class Q00128_PailakaSongOfIceAndFire extends Quest
public final String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = null;
final QuestState st = getQuestState(player, false);
if (st == null)
final QuestState qs = getQuestState(player, false);
if (qs == null)
{
return getNoQuestMsg(player);
}
@@ -106,18 +106,18 @@ public final class Q00128_PailakaSongOfIceAndFire extends Quest
}
case "32497-03.htm":
{
if (!st.isStarted())
if (!qs.isStarted())
{
st.startQuest();
qs.startQuest();
htmltext = event;
}
break;
}
case "32500-06.htm":
{
if (st.isCond(1))
if (qs.isCond(1))
{
st.setCond(2, true);
qs.setCond(2, true);
giveItems(player, SWORD, 1);
giveItems(player, BOOK1, 1);
htmltext = event;
@@ -126,9 +126,9 @@ public final class Q00128_PailakaSongOfIceAndFire extends Quest
}
case "32507-04.htm":
{
if (st.isCond(3))
if (qs.isCond(3))
{
st.setCond(4, true);
qs.setCond(4, true);
takeItems(player, SWORD, -1);
takeItems(player, WATER_ESSENCE, -1);
takeItems(player, BOOK2, -1);
@@ -140,9 +140,9 @@ public final class Q00128_PailakaSongOfIceAndFire extends Quest
}
case "32507-08.htm":
{
if (st.isCond(6))
if (qs.isCond(6))
{
st.setCond(7, true);
qs.setCond(7, true);
takeItems(player, ENH_SWORD1, -1);
takeItems(player, BOOK5, -1);
takeItems(player, FIRE_ESSENCE, -1);
@@ -154,7 +154,7 @@ public final class Q00128_PailakaSongOfIceAndFire extends Quest
}
case "32510-02.htm":
{
st.exitQuest(false, true);
qs.exitQuest(false, true);
final Instance inst = InstanceManager.getInstance().getInstance(npc.getInstanceId());
inst.setDuration(EXIT_TIME * 60000);
@@ -181,8 +181,8 @@ public final class Q00128_PailakaSongOfIceAndFire extends Quest
public final String onTalk(L2Npc npc, L2PcInstance player)
{
String htmltext = getNoQuestMsg(player);
final QuestState st = getQuestState(player, true);
if (st == null)
final QuestState qs = getQuestState(player, true);
if (qs == null)
{
return htmltext;
}
@@ -191,7 +191,7 @@ public final class Q00128_PailakaSongOfIceAndFire extends Quest
{
case ADLER1:
{
switch (st.getState())
switch (qs.getState())
{
case State.CREATED:
{
@@ -211,7 +211,7 @@ public final class Q00128_PailakaSongOfIceAndFire extends Quest
}
case State.STARTED:
{
if (st.getCond() > 1)
if (qs.getCond() > 1)
{
htmltext = "32497-00.htm";
}
@@ -236,7 +236,7 @@ public final class Q00128_PailakaSongOfIceAndFire extends Quest
}
case SINAI:
{
if (st.getCond() > 1)
if (qs.getCond() > 1)
{
htmltext = "32500-00.htm";
}
@@ -248,7 +248,7 @@ public final class Q00128_PailakaSongOfIceAndFire extends Quest
}
case INSPECTOR:
{
switch (st.getCond())
switch (qs.getCond())
{
case 1:
{
@@ -286,11 +286,11 @@ public final class Q00128_PailakaSongOfIceAndFire extends Quest
}
case ADLER2:
{
if (st.isCompleted())
if (qs.isCompleted())
{
htmltext = "32510-00.htm";
}
else if (st.isCond(9))
else if (qs.isCond(9))
{
htmltext = "32510-01.htm";
}
@@ -303,16 +303,16 @@ public final class Q00128_PailakaSongOfIceAndFire extends Quest
@Override
public final String onKill(L2Npc npc, L2PcInstance player, boolean isSummon)
{
final QuestState st = getQuestState(player, false);
if ((st != null) && st.isStarted())
final QuestState qs = getQuestState(player, false);
if ((qs != null) && qs.isStarted())
{
switch (npc.getId())
{
case HILLAS:
{
if (st.isCond(2))
if (qs.isCond(2))
{
st.setCond(3);
qs.setCond(3);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
takeItems(player, BOOK1, -1);
giveItems(player, BOOK2, 1);
@@ -323,9 +323,9 @@ public final class Q00128_PailakaSongOfIceAndFire extends Quest
}
case PAPION:
{
if (st.isCond(4))
if (qs.isCond(4))
{
st.setCond(5);
qs.setCond(5);
takeItems(player, BOOK3, -1);
giveItems(player, BOOK4, 1);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
@@ -335,9 +335,9 @@ public final class Q00128_PailakaSongOfIceAndFire extends Quest
}
case KINSUS:
{
if (st.isCond(5))
if (qs.isCond(5))
{
st.setCond(6);
qs.setCond(6);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
takeItems(player, BOOK4, -1);
giveItems(player, BOOK5, 1);
@@ -348,9 +348,9 @@ public final class Q00128_PailakaSongOfIceAndFire extends Quest
}
case GARGOS:
{
if (st.isCond(7))
if (qs.isCond(7))
{
st.setCond(8);
qs.setCond(8);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
takeItems(player, BOOK6, -1);
giveItems(player, BOOK7, 1);
@@ -360,9 +360,9 @@ public final class Q00128_PailakaSongOfIceAndFire extends Quest
}
case ADIANTUM:
{
if (st.isCond(8))
if (qs.isCond(8))
{
st.setCond(9);
qs.setCond(9);
playSound(player, QuestSound.ITEMSOUND_QUEST_MIDDLE);
takeItems(player, BOOK7, -1);
addSpawn(ADLER2, -53297, 185027, -4617, 33486, false, 0, false, npc.getInstanceId());