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

@@ -57,8 +57,8 @@ public class Q00126_TheNameOfEvil2 extends Quest
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
final QuestState st = getQuestState(player, false);
if (st == null)
final QuestState qs = getQuestState(player, false);
if (qs == null)
{
return getNoQuestMsg(player);
}
@@ -66,266 +66,266 @@ public class Q00126_TheNameOfEvil2 extends Quest
switch (event)
{
case "32115-1.html":
st.startQuest();
qs.startQuest();
break;
case "32115-1b.html":
if (st.isCond(1))
if (qs.isCond(1))
{
st.setCond(2, true);
qs.setCond(2, true);
}
break;
case "32119-3.html":
if (st.isCond(2))
if (qs.isCond(2))
{
st.setCond(3, true);
qs.setCond(3, true);
}
break;
case "32119-4.html":
if (st.isCond(3))
if (qs.isCond(3))
{
st.setCond(4, true);
qs.setCond(4, true);
}
break;
case "32119-4a.html":
case "32119-5b.html":
st.playSound(QuestSound.ETCSOUND_ELROKI_SONG_1ST);
playSound(player, QuestSound.ETCSOUND_ELROKI_SONG_1ST);
break;
case "32119-5.html":
if (st.isCond(4))
if (qs.isCond(4))
{
st.setCond(5, true);
qs.setCond(5, true);
}
break;
case "32120-3.html":
if (st.isCond(5))
if (qs.isCond(5))
{
st.setCond(6, true);
qs.setCond(6, true);
}
break;
case "32120-4.html":
if (st.isCond(6))
if (qs.isCond(6))
{
st.setCond(7, true);
qs.setCond(7, true);
}
break;
case "32120-4a.html":
case "32120-5b.html":
st.playSound(QuestSound.ETCSOUND_ELROKI_SONG_2ND);
playSound(player, QuestSound.ETCSOUND_ELROKI_SONG_2ND);
break;
case "32120-5.html":
if (st.isCond(7))
if (qs.isCond(7))
{
st.setCond(8, true);
qs.setCond(8, true);
}
break;
case "32121-3.html":
if (st.isCond(8))
if (qs.isCond(8))
{
st.setCond(9, true);
qs.setCond(9, true);
}
break;
case "32121-4.html":
if (st.isCond(9))
if (qs.isCond(9))
{
st.setCond(10, true);
qs.setCond(10, true);
}
break;
case "32121-4a.html":
case "32121-5b.html":
st.playSound(QuestSound.ETCSOUND_ELROKI_SONG_3RD);
playSound(player, QuestSound.ETCSOUND_ELROKI_SONG_3RD);
break;
case "32121-5.html":
if (st.isCond(10))
if (qs.isCond(10))
{
st.giveItems(GAZKH_FRAGMENT, 1);
st.setCond(11, true);
giveItems(player, GAZKH_FRAGMENT, 1);
qs.setCond(11, true);
}
break;
case "32122-2a.html":
npc.broadcastPacket(new MagicSkillUse(npc, player, 5089, 1, 1000, 0));
break;
case "32122-2d.html":
st.takeItems(GAZKH_FRAGMENT, -1);
takeItems(player, GAZKH_FRAGMENT, -1);
break;
case "32122-3.html":
if (st.isCond(12))
if (qs.isCond(12))
{
st.setCond(13, true);
qs.setCond(13, true);
}
break;
case "32122-4.html":
if (st.isCond(13))
if (qs.isCond(13))
{
st.setCond(14, true);
qs.setCond(14, true);
}
break;
case "DO_One":
st.set("DO", "1");
qs.set("DO", "1");
event = "32122-4d.html";
break;
case "MI_One":
st.set("MI", "1");
qs.set("MI", "1");
event = "32122-4f.html";
break;
case "FA_One":
st.set("FA", "1");
qs.set("FA", "1");
event = "32122-4h.html";
break;
case "SOL_One":
st.set("SOL", "1");
qs.set("SOL", "1");
event = "32122-4j.html";
break;
case "FA2_One":
st.set("FA2", "1");
if (st.isCond(14) && (st.getInt("DO") > 0) && (st.getInt("MI") > 0) && (st.getInt("FA") > 0) && (st.getInt("SOL") > 0) && (st.getInt("FA2") > 0))
qs.set("FA2", "1");
if (qs.isCond(14) && (qs.getInt("DO") > 0) && (qs.getInt("MI") > 0) && (qs.getInt("FA") > 0) && (qs.getInt("SOL") > 0) && (qs.getInt("FA2") > 0))
{
event = "32122-4n.html";
st.setCond(15, true);
qs.setCond(15, true);
}
else
{
event = "32122-4m.html";
}
st.unset("DO");
st.unset("MI");
st.unset("FA");
st.unset("SOL");
st.unset("FA2");
qs.unset("DO");
qs.unset("MI");
qs.unset("FA");
qs.unset("SOL");
qs.unset("FA2");
break;
case "32122-4m.html":
st.unset("DO");
st.unset("MI");
st.unset("FA");
st.unset("SOL");
st.unset("FA2");
qs.unset("DO");
qs.unset("MI");
qs.unset("FA");
qs.unset("SOL");
qs.unset("FA2");
break;
case "FA_Two":
st.set("FA", "1");
qs.set("FA", "1");
event = "32122-5a.html";
break;
case "SOL_Two":
st.set("SOL", "1");
qs.set("SOL", "1");
event = "32122-5c.html";
break;
case "TI_Two":
st.set("TI", "1");
qs.set("TI", "1");
event = "32122-5e.html";
break;
case "SOL2_Two":
st.set("SOL2", "1");
qs.set("SOL2", "1");
event = "32122-5g.html";
break;
case "FA2_Two":
st.set("FA2", "1");
if (st.isCond(15) && (st.getInt("FA") > 0) && (st.getInt("SOL") > 0) && (st.getInt("TI") > 0) && (st.getInt("SOL2") > 0) && (st.getInt("FA2") > 0))
qs.set("FA2", "1");
if (qs.isCond(15) && (qs.getInt("FA") > 0) && (qs.getInt("SOL") > 0) && (qs.getInt("TI") > 0) && (qs.getInt("SOL2") > 0) && (qs.getInt("FA2") > 0))
{
event = "32122-5j.html";
st.setCond(16, true);
qs.setCond(16, true);
}
else
{
event = "32122-5i.html";
}
st.unset("FA");
st.unset("SOL");
st.unset("TI");
st.unset("SOL2");
st.unset("FA2");
qs.unset("FA");
qs.unset("SOL");
qs.unset("TI");
qs.unset("SOL2");
qs.unset("FA2");
break;
case "32122-5i.html":
st.unset("FA");
st.unset("SOL");
st.unset("TI");
st.unset("SOL2");
st.unset("FA2");
qs.unset("FA");
qs.unset("SOL");
qs.unset("TI");
qs.unset("SOL2");
qs.unset("FA2");
break;
case "SOL_Three":
st.set("SOL", "1");
qs.set("SOL", "1");
event = "32122-6a.html";
break;
case "FA_Three":
st.set("FA", "1");
qs.set("FA", "1");
event = "32122-6c.html";
break;
case "MI_Three":
st.set("MI", "1");
qs.set("MI", "1");
event = "32122-6e.html";
break;
case "FA2_Three":
st.set("FA2", "1");
qs.set("FA2", "1");
event = "32122-6g.html";
break;
case "MI2_Three":
st.set("MI2", "1");
if (st.isCond(16) && (st.getInt("SOL") > 0) && (st.getInt("FA") > 0) && (st.getInt("MI") > 0) && (st.getInt("FA2") > 0) && (st.getInt("MI2") > 0))
qs.set("MI2", "1");
if (qs.isCond(16) && (qs.getInt("SOL") > 0) && (qs.getInt("FA") > 0) && (qs.getInt("MI") > 0) && (qs.getInt("FA2") > 0) && (qs.getInt("MI2") > 0))
{
event = "32122-6j.html";
st.setCond(17, true);
qs.setCond(17, true);
}
else
{
event = "32122-6i.html";
}
st.unset("SOL");
st.unset("FA");
st.unset("MI");
st.unset("FA2");
st.unset("MI2");
qs.unset("SOL");
qs.unset("FA");
qs.unset("MI");
qs.unset("FA2");
qs.unset("MI2");
break;
case "32122-6i.html":
st.unset("SOL");
st.unset("FA");
st.unset("MI");
st.unset("FA2");
st.unset("MI2");
qs.unset("SOL");
qs.unset("FA");
qs.unset("MI");
qs.unset("FA2");
qs.unset("MI2");
break;
case "32122-7.html":
st.giveItems(BONE_POWDER, 1);
st.playSound(QuestSound.ETCSOUND_ELROKI_SONG_FULL);
giveItems(player, BONE_POWDER, 1);
playSound(player, QuestSound.ETCSOUND_ELROKI_SONG_FULL);
npc.broadcastPacket(new MagicSkillUse(npc, player, 5089, 1, 1000, 0));
break;
case "32122-8.html":
if (st.isCond(17))
if (qs.isCond(17))
{
st.setCond(18, true);
qs.setCond(18, true);
}
break;
case "32109-2.html":
if (st.isCond(18))
if (qs.isCond(18))
{
st.setCond(19, true);
qs.setCond(19, true);
}
break;
case "32109-3.html":
if (st.isCond(19))
if (qs.isCond(19))
{
st.takeItems(BONE_POWDER, -1);
st.setCond(20, true);
takeItems(player, BONE_POWDER, -1);
qs.setCond(20, true);
}
break;
case "32115-4.html":
if (st.isCond(20))
if (qs.isCond(20))
{
st.setCond(21, true);
qs.setCond(21, true);
}
break;
case "32115-5.html":
if (st.isCond(21))
if (qs.isCond(21))
{
st.setCond(22, true);
qs.setCond(22, true);
}
break;
case "32114-2.html":
if (st.isCond(22))
if (qs.isCond(22))
{
st.setCond(23, true);
qs.setCond(23, true);
}
break;
case "32114-3.html":
st.rewardItems(ENCHANT_WEAPON_A, 1);
st.giveAdena(460483, true);
st.addExpAndSp(1015973, 102802);
st.exitQuest(false, true);
rewardItems(player, ENCHANT_WEAPON_A, 1);
giveAdena(player, 460483, true);
addExpAndSp(player, 1015973, 102802);
qs.exitQuest(false, true);
break;
}
return event;
@@ -335,8 +335,8 @@ public class Q00126_TheNameOfEvil2 extends Quest
public String onTalk(L2Npc npc, L2PcInstance player)
{
String htmltext = getNoQuestMsg(player);
QuestState st = getQuestState(player, true);
if (st == null)
QuestState qs = getQuestState(player, true);
if (qs == null)
{
return htmltext;
}
@@ -344,7 +344,7 @@ public class Q00126_TheNameOfEvil2 extends Quest
switch (npc.getId())
{
case ASAMAH:
switch (st.getState())
switch (qs.getState())
{
case State.CREATED:
if (player.getLevel() < 77)
@@ -353,12 +353,12 @@ public class Q00126_TheNameOfEvil2 extends Quest
}
else
{
st = player.getQuestState(Q00125_TheNameOfEvil1.class.getSimpleName());
htmltext = ((st != null) && st.isCompleted()) ? "32115-0a.htm" : "32115-0b.htm";
qs = player.getQuestState(Q00125_TheNameOfEvil1.class.getSimpleName());
htmltext = ((qs != null) && qs.isCompleted()) ? "32115-0a.htm" : "32115-0b.htm";
}
break;
case State.STARTED:
switch (st.getCond())
switch (qs.getCond())
{
case 1:
htmltext = "32115-1d.html";
@@ -402,9 +402,9 @@ public class Q00126_TheNameOfEvil2 extends Quest
}
break;
case ULU_KAIMU:
if (st.isStarted())
if (qs.isStarted())
{
switch (st.getCond())
switch (qs.getCond())
{
case 1:
htmltext = "32119-1.html";
@@ -426,9 +426,9 @@ public class Q00126_TheNameOfEvil2 extends Quest
}
break;
case BALU_KAIMU:
if (st.isStarted())
if (qs.isStarted())
{
switch (st.getCond())
switch (qs.getCond())
{
case 1:
case 2:
@@ -453,9 +453,9 @@ public class Q00126_TheNameOfEvil2 extends Quest
}
break;
case CHUTA_KAIMU:
if (st.isStarted())
if (qs.isStarted())
{
switch (st.getCond())
switch (qs.getCond())
{
case 1:
case 2:
@@ -483,9 +483,9 @@ public class Q00126_TheNameOfEvil2 extends Quest
}
break;
case WARRIORS_GRAVE:
if (st.isStarted())
if (qs.isStarted())
{
switch (st.getCond())
switch (qs.getCond())
{
case 1:
case 2:
@@ -501,7 +501,7 @@ public class Q00126_TheNameOfEvil2 extends Quest
break;
case 11:
htmltext = "32122-2.html";
st.setCond(12, true);
qs.setCond(12, true);
break;
case 12:
htmltext = "32122-2l.html";
@@ -511,30 +511,30 @@ public class Q00126_TheNameOfEvil2 extends Quest
break;
case 14:
htmltext = "32122-4.html";
st.unset("DO");
st.unset("MI");
st.unset("FA");
st.unset("SOL");
st.unset("FA2");
qs.unset("DO");
qs.unset("MI");
qs.unset("FA");
qs.unset("SOL");
qs.unset("FA2");
break;
case 15:
htmltext = "32122-5.html";
st.unset("FA");
st.unset("SOL");
st.unset("TI");
st.unset("SOL2");
st.unset("FA2");
qs.unset("FA");
qs.unset("SOL");
qs.unset("TI");
qs.unset("SOL2");
qs.unset("FA2");
break;
case 16:
htmltext = "32122-6.html";
st.unset("SOL");
st.unset("FA");
st.unset("MI");
st.unset("FA2");
st.unset("MI2");
qs.unset("SOL");
qs.unset("FA");
qs.unset("MI");
qs.unset("FA2");
qs.unset("MI2");
break;
case 17:
htmltext = st.hasQuestItems(BONE_POWDER) ? "32122-7.html" : "32122-7b.html";
htmltext = hasQuestItems(player, BONE_POWDER) ? "32122-7.html" : "32122-7b.html";
break;
case 18:
htmltext = "32122-8.html";
@@ -546,9 +546,9 @@ public class Q00126_TheNameOfEvil2 extends Quest
}
break;
case SHILENS_STONE_STATUE:
if (st.isStarted())
if (qs.isStarted())
{
switch (st.getCond())
switch (qs.getCond())
{
case 1:
case 2:
@@ -570,7 +570,7 @@ public class Q00126_TheNameOfEvil2 extends Quest
htmltext = "32109-1a.html";
break;
case 18:
if (st.hasQuestItems(BONE_POWDER))
if (hasQuestItems(player, BONE_POWDER))
{
htmltext = "32109-1.html";
}
@@ -588,13 +588,13 @@ public class Q00126_TheNameOfEvil2 extends Quest
}
break;
case MUSHIKA:
if (st.isStarted())
if (qs.isStarted())
{
if (st.getCond() < 22)
if (qs.getCond() < 22)
{
htmltext = "32114-4.html";
}
else if (st.isCond(22))
else if (qs.isCond(22))
{
htmltext = "32114-1.html";
}