From 8a9b0487193783344549fe1ea08f00106e177cec Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Fri, 16 Dec 2016 20:42:57 +0000 Subject: [PATCH] Minor quest improvements. --- .../Q00337_AudienceWithTheLandDragon.java | 6 +- .../Q10310_TwistedCreationTree.java | 11 ++-- .../Q10318_DecayingDarkness.java | 16 ++++-- .../Q10351_OwnerOfHall.java | 18 +++--- .../Q10354_ResurrectedOwnerOfHall.java | 17 +++--- .../Q10377_TheInvadedExecutionGrounds.java | 2 +- .../Q10379_AnUninvitedGuest.java | 5 +- .../Q10432_ChasingVarangka.java | 4 +- .../Q10435_ChasingKeltron.java | 3 +- .../Q10438_ChasingLoygen.java | 3 +- .../Q10441_ChasingMeccadan.java | 4 +- .../Q10455_ElikiasLetter.java | 17 ++++-- .../Q10459_ASickAmbition.java | 15 +++-- .../Q10753_WindsOfFateChoices.java | 2 +- .../Q10766_ANewCraft/Q10766_ANewCraft.java | 57 ++++++++++++------- .../Q10791_TheManOfMystery.java | 5 +- ...Q10795_LettersFromTheQueenWallOfAgros.java | 7 +-- ...10798_LettersFromTheQueenDragonValley.java | 8 +-- .../Q10799_StrangeThingsAfootInTheValley.java | 6 +- .../Q10800_ReconnaissanceAtDragonValley.java | 5 +- 20 files changed, 125 insertions(+), 86 deletions(-) diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00337_AudienceWithTheLandDragon/Q00337_AudienceWithTheLandDragon.java b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00337_AudienceWithTheLandDragon/Q00337_AudienceWithTheLandDragon.java index 6316379db5..61be883b1b 100644 --- a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00337_AudienceWithTheLandDragon/Q00337_AudienceWithTheLandDragon.java +++ b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00337_AudienceWithTheLandDragon/Q00337_AudienceWithTheLandDragon.java @@ -120,7 +120,8 @@ public class Q00337_AudienceWithTheLandDragon extends Quest { return getNoQuestMsg(player); } - String htmltext = event; + + String htmltext = null; switch (event) { case "30753-02.htm": @@ -175,6 +176,7 @@ public class Q00337_AudienceWithTheLandDragon extends Quest { return htmltext; } + switch (npc.getId()) { case GABRIELLE: @@ -636,6 +638,6 @@ public class Q00337_AudienceWithTheLandDragon extends Quest break; } } - return null; + return super.onKill(npc, player, isSummon); } } \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10310_TwistedCreationTree/Q10310_TwistedCreationTree.java b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10310_TwistedCreationTree/Q10310_TwistedCreationTree.java index 26893dd707..8e8a6241c1 100644 --- a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10310_TwistedCreationTree/Q10310_TwistedCreationTree.java +++ b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10310_TwistedCreationTree/Q10310_TwistedCreationTree.java @@ -59,12 +59,13 @@ public final class Q10310_TwistedCreationTree extends Quest @Override public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { - String htmltext = null; final QuestState qs = getQuestState(player, false); if (qs == null) { - return htmltext; + return null; } + + String htmltext = null; switch (event) { case "33032-02.htm": @@ -90,7 +91,7 @@ public final class Q10310_TwistedCreationTree extends Quest } default: { - if (event.startsWith("giveReward_")) + if (qs.isCond(3) && event.startsWith("giveReward_")) { final int itemId = Integer.parseInt(event.replace("giveReward_", "")); qs.exitQuest(false, true); @@ -99,6 +100,7 @@ public final class Q10310_TwistedCreationTree extends Quest addExpAndSp(player, 50178765, 12042); htmltext = "33031-07.html"; } + break; } } return htmltext; @@ -108,7 +110,7 @@ public final class Q10310_TwistedCreationTree extends Quest public String onTalk(L2Npc npc, L2PcInstance player) { final QuestState qs = getQuestState(player, true); - String htmltext = null; + String htmltext = getNoQuestMsg(player); switch (qs.getState()) { @@ -243,7 +245,6 @@ public final class Q10310_TwistedCreationTree extends Quest qs.getPlayer().sendPacket(log); if ((qs.getInt(Integer.toString(GARDEN_SENTRY)) >= 10) && (qs.getInt(Integer.toString(GARDEN_SCOUT)) >= 10) && (qs.getInt(Integer.toString(GARDEN_COMMANDER)) >= 10) && (qs.getInt(Integer.toString(GARDEN_DESTROYER)) >= 10) && (qs.getInt(Integer.toString(GARDEN_DESTROYER)) >= 10)) { - qs.setCond(1); qs.setCond(3, true); } } diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10318_DecayingDarkness/Q10318_DecayingDarkness.java b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10318_DecayingDarkness/Q10318_DecayingDarkness.java index 23b25c9a86..2e8c0b76fc 100644 --- a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10318_DecayingDarkness/Q10318_DecayingDarkness.java +++ b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10318_DecayingDarkness/Q10318_DecayingDarkness.java @@ -70,13 +70,13 @@ public final class Q10318_DecayingDarkness extends Quest @Override public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { - String htmltext = null; final QuestState qs = getQuestState(player, false); if (qs == null) { - return htmltext; + return null; } + String htmltext = null; switch (event) { case "32892-02.htm": @@ -94,10 +94,13 @@ public final class Q10318_DecayingDarkness extends Quest } case "32892-07.html": { - giveAdena(player, 5427900, false); - addExpAndSp(player, 79260650, 19022); - qs.exitQuest(false, true); - htmltext = event; + if (qs.isCond(2)) + { + giveAdena(player, 5427900, false); + addExpAndSp(player, 79260650, 19022); + qs.exitQuest(false, true); + htmltext = event; + } break; } } @@ -113,6 +116,7 @@ public final class Q10318_DecayingDarkness extends Quest { return htmltext; } + final int npcId = npc.getId(); switch (qs.getState()) { diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10351_OwnerOfHall/Q10351_OwnerOfHall.java b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10351_OwnerOfHall/Q10351_OwnerOfHall.java index 4d43b98dcf..4f261a2848 100644 --- a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10351_OwnerOfHall/Q10351_OwnerOfHall.java +++ b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10351_OwnerOfHall/Q10351_OwnerOfHall.java @@ -53,13 +53,13 @@ public final class Q10351_OwnerOfHall extends Quest @Override public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { - String htmltext = null; final QuestState qs = getQuestState(player, false); if (qs == null) { - return htmltext; + return null; } + String htmltext = null; switch (event) { case "32892-02.htm": @@ -77,11 +77,14 @@ public final class Q10351_OwnerOfHall extends Quest } case "32892-08.html": { - giveAdena(player, 23655000, false); - addExpAndSp(player, 897850000, 215484); - giveItems(player, OCTAVIS_BRACELET, 1); - qs.exitQuest(false, true); - htmltext = getHtm(player.getHtmlPrefix(), "32892-08.html").replace("%name%", player.getName()); + if (qs.isCond(2)) + { + giveAdena(player, 23655000, false); + addExpAndSp(player, 897850000, 215484); + giveItems(player, OCTAVIS_BRACELET, 1); + qs.exitQuest(false, true); + htmltext = getHtm(player.getHtmlPrefix(), "32892-08.html").replace("%name%", player.getName()); + } break; } } @@ -97,6 +100,7 @@ public final class Q10351_OwnerOfHall extends Quest { return htmltext; } + final int npcId = npc.getId(); switch (qs.getState()) { diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10354_ResurrectedOwnerOfHall/Q10354_ResurrectedOwnerOfHall.java b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10354_ResurrectedOwnerOfHall/Q10354_ResurrectedOwnerOfHall.java index c489bff9f0..ebec723c8d 100644 --- a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10354_ResurrectedOwnerOfHall/Q10354_ResurrectedOwnerOfHall.java +++ b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10354_ResurrectedOwnerOfHall/Q10354_ResurrectedOwnerOfHall.java @@ -53,13 +53,13 @@ public final class Q10354_ResurrectedOwnerOfHall extends Quest @Override public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { - String htmltext = null; final QuestState qs = getQuestState(player, false); if (qs == null) { - return htmltext; + return null; } + String htmltext = null; switch (event) { case "32892-02.htm": @@ -76,11 +76,14 @@ public final class Q10354_ResurrectedOwnerOfHall extends Quest } case "32892-07.html": { - giveAdena(player, 23655000, false); - addExpAndSp(player, 897850000, 215484); - giveItems(player, OCTAVIS_SOUL_BOTTLE, 1); - qs.exitQuest(false, true); - htmltext = getHtm(player.getHtmlPrefix(), "32892-07.html").replace("%name%", player.getName()); + if (qs.isCond(2)) + { + giveAdena(player, 23655000, false); + addExpAndSp(player, 897850000, 215484); + giveItems(player, OCTAVIS_SOUL_BOTTLE, 1); + qs.exitQuest(false, true); + htmltext = getHtm(player.getHtmlPrefix(), "32892-07.html").replace("%name%", player.getName()); + } break; } } diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10377_TheInvadedExecutionGrounds/Q10377_TheInvadedExecutionGrounds.java b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10377_TheInvadedExecutionGrounds/Q10377_TheInvadedExecutionGrounds.java index 2837717ad9..a34c606824 100644 --- a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10377_TheInvadedExecutionGrounds/Q10377_TheInvadedExecutionGrounds.java +++ b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10377_TheInvadedExecutionGrounds/Q10377_TheInvadedExecutionGrounds.java @@ -95,7 +95,6 @@ public final class Q10377_TheInvadedExecutionGrounds extends Quest } case "warden_roderik_q10377_03.html": { - qs.setCond(0); qs.setCond(3, true); takeItems(player, HARLANS_ORDERS, -1); giveItems(player, ENDRIGOS_REPORT, 1); @@ -164,6 +163,7 @@ public final class Q10377_TheInvadedExecutionGrounds extends Quest { return htmltext; } + switch (qs.getState()) { case State.CREATED: diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10379_AnUninvitedGuest/Q10379_AnUninvitedGuest.java b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10379_AnUninvitedGuest/Q10379_AnUninvitedGuest.java index fb18d0c704..6bbaede145 100644 --- a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10379_AnUninvitedGuest/Q10379_AnUninvitedGuest.java +++ b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10379_AnUninvitedGuest/Q10379_AnUninvitedGuest.java @@ -70,13 +70,13 @@ public final class Q10379_AnUninvitedGuest extends Quest @Override public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { - String htmltext = event; final QuestState qs = getQuestState(player, false); if (qs == null) { - return getNoQuestMsg(player); + return null; } + String htmltext = null; switch (event) { case "warden_endrigo_q10379_04.htm": @@ -179,7 +179,6 @@ public final class Q10379_AnUninvitedGuest extends Quest final ExQuestNpcLogList log = new ExQuestNpcLogList(getId()); log.addNpc(SCALDISECT_THE_FURIOUS, qs.getInt("SCALDISECT_THE_FURIOUS")); player.sendPacket(log); - } if (qs.getInt(Integer.toString(SCALDISECT_THE_FURIOUS)) == 1) { diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10432_ChasingVarangka/Q10432_ChasingVarangka.java b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10432_ChasingVarangka/Q10432_ChasingVarangka.java index c0aa4a23b4..839d776c99 100644 --- a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10432_ChasingVarangka/Q10432_ChasingVarangka.java +++ b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10432_ChasingVarangka/Q10432_ChasingVarangka.java @@ -63,6 +63,7 @@ public class Q10432_ChasingVarangka extends Quest { return null; } + String htmltext = null; switch (event) { @@ -94,8 +95,8 @@ public class Q10432_ChasingVarangka extends Quest giveStoryQuestReward(player, 30); addExpAndSp(player, 14120400, 3388); qs.exitQuest(false, true); + htmltext = "33868-03.html"; } - htmltext = "33868-03.html"; break; } } @@ -111,6 +112,7 @@ public class Q10432_ChasingVarangka extends Quest { return htmltext; } + switch (qs.getState()) { case State.CREATED: diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10435_ChasingKeltron/Q10435_ChasingKeltron.java b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10435_ChasingKeltron/Q10435_ChasingKeltron.java index b0fe0a03c6..194ac3b610 100644 --- a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10435_ChasingKeltron/Q10435_ChasingKeltron.java +++ b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10435_ChasingKeltron/Q10435_ChasingKeltron.java @@ -92,8 +92,8 @@ public class Q10435_ChasingKeltron extends Quest giveStoryQuestReward(player, 30); addExpAndSp(player, 14120400, 3388); qs.exitQuest(false, true); + htmltext = "33841-07.html"; } - htmltext = "33841-07.html"; break; } } @@ -109,6 +109,7 @@ public class Q10435_ChasingKeltron extends Quest { return htmltext; } + switch (qs.getState()) { diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10438_ChasingLoygen/Q10438_ChasingLoygen.java b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10438_ChasingLoygen/Q10438_ChasingLoygen.java index 47c71616d0..6b30f30456 100644 --- a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10438_ChasingLoygen/Q10438_ChasingLoygen.java +++ b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10438_ChasingLoygen/Q10438_ChasingLoygen.java @@ -93,8 +93,8 @@ public class Q10438_ChasingLoygen extends Quest giveStoryQuestReward(player, 30); addExpAndSp(player, 14120400, 3388); qs.exitQuest(false, true); + htmltext = "32742-08.html"; } - htmltext = "32742-08.html"; break; } } @@ -110,6 +110,7 @@ public class Q10438_ChasingLoygen extends Quest { return htmltext; } + switch (qs.getState()) { case State.CREATED: diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10441_ChasingMeccadan/Q10441_ChasingMeccadan.java b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10441_ChasingMeccadan/Q10441_ChasingMeccadan.java index 82596a4301..da088b7aef 100644 --- a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10441_ChasingMeccadan/Q10441_ChasingMeccadan.java +++ b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10441_ChasingMeccadan/Q10441_ChasingMeccadan.java @@ -116,7 +116,6 @@ public class Q10441_ChasingMeccadan extends Quest addExpAndSp(player, 14120400, 3388); qs.exitQuest(false, true); htmltext = "32641-08.html"; - break; } else if (npc.getId() == ATHENIA) { @@ -127,9 +126,9 @@ public class Q10441_ChasingMeccadan extends Quest addExpAndSp(player, 14120400, 3388); qs.exitQuest(false, true); htmltext = "32643-08.html"; - break; } } + break; } } return htmltext; @@ -144,6 +143,7 @@ public class Q10441_ChasingMeccadan extends Quest { return htmltext; } + switch (npc.getId()) { case HELVETICA: diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10455_ElikiasLetter/Q10455_ElikiasLetter.java b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10455_ElikiasLetter/Q10455_ElikiasLetter.java index 8da421e2d8..94cf707091 100644 --- a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10455_ElikiasLetter/Q10455_ElikiasLetter.java +++ b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10455_ElikiasLetter/Q10455_ElikiasLetter.java @@ -52,12 +52,13 @@ public class Q10455_ElikiasLetter extends Quest @Override public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { - String htmltext = null; final QuestState qs = getQuestState(player, false); if (qs == null) { return null; } + + String htmltext = null; switch (event) { case "31620-02.htm": @@ -83,11 +84,14 @@ public class Q10455_ElikiasLetter extends Quest } case "31595-03.html": { - giveAdena(player, 32962, true); - addExpAndSp(player, 3859143, 14816); - npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, LEONA_BLACKBIRD_FIRE_DRAGON_BRIDE, NpcStringId.HAVE_YOU_MADE_PREPARATIONS_FOR_THE_MISSION_THERE_ISN_T_MUCH_TIME)); - qs.exitQuest(false, true); - htmltext = event; + if (qs.isCond(2)) + { + giveAdena(player, 32962, true); + addExpAndSp(player, 3859143, 14816); + npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, LEONA_BLACKBIRD_FIRE_DRAGON_BRIDE, NpcStringId.HAVE_YOU_MADE_PREPARATIONS_FOR_THE_MISSION_THERE_ISN_T_MUCH_TIME)); + qs.exitQuest(false, true); + htmltext = event; + } break; } } @@ -103,6 +107,7 @@ public class Q10455_ElikiasLetter extends Quest { return htmltext; } + switch (npc.getId()) { case ELRIKIA_VERDURE_ELDER: diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10459_ASickAmbition/Q10459_ASickAmbition.java b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10459_ASickAmbition/Q10459_ASickAmbition.java index b5b20d017a..14d3d0ec4b 100644 --- a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10459_ASickAmbition/Q10459_ASickAmbition.java +++ b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10459_ASickAmbition/Q10459_ASickAmbition.java @@ -55,12 +55,13 @@ public class Q10459_ASickAmbition extends Quest @Override public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { - String htmltext = null; final QuestState qs = getQuestState(player, false); if (qs == null) { return null; } + + String htmltext = null; switch (event) { case "31595-02.htm": @@ -77,10 +78,13 @@ public class Q10459_ASickAmbition extends Quest } case "33899-02.html": { - giveItems(player, SP_RUNE_PACK, 1); - addExpAndSp(player, 555716700, 2133952); - qs.exitQuest(false, true); - htmltext = event; + if (qs.isCond(2)) + { + giveItems(player, SP_RUNE_PACK, 1); + addExpAndSp(player, 555716700, 2133952); + qs.exitQuest(false, true); + htmltext = event; + } break; } } @@ -96,6 +100,7 @@ public class Q10459_ASickAmbition extends Quest { return htmltext; } + switch (qs.getState()) { case State.CREATED: diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10753_WindsOfFateChoices/Q10753_WindsOfFateChoices.java b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10753_WindsOfFateChoices/Q10753_WindsOfFateChoices.java index 1662e586c0..d34be4a13c 100644 --- a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10753_WindsOfFateChoices/Q10753_WindsOfFateChoices.java +++ b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10753_WindsOfFateChoices/Q10753_WindsOfFateChoices.java @@ -143,8 +143,8 @@ public final class Q10753_WindsOfFateChoices extends Quest { return null; } - String htmltext = event; + String htmltext = null; switch (event) { case "33943-02.htm": diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10766_ANewCraft/Q10766_ANewCraft.java b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10766_ANewCraft/Q10766_ANewCraft.java index d003a3e0fe..b79fe7475a 100644 --- a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10766_ANewCraft/Q10766_ANewCraft.java +++ b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10766_ANewCraft/Q10766_ANewCraft.java @@ -70,6 +70,7 @@ public class Q10766_ANewCraft extends Quest { return null; } + String htmltext = null; switch (event) { @@ -111,13 +112,16 @@ public class Q10766_ANewCraft extends Quest } case "33978-07.html": { - takeItems(player, AIR_STONE, 1); - takeItems(player, WINDY_HEALING_POTION_1, 1); - giveItems(player, WINDY_HEALING_POTION); - giveItems(player, WINDY_QUICK_HEALING_POTION); - addExpAndSp(player, EXP_REWARD, SP_REWARD); - qs.exitQuest(false, true); - htmltext = event; + if (qs.isCond(4)) + { + takeItems(player, AIR_STONE, 1); + takeItems(player, WINDY_HEALING_POTION_1, 1); + giveItems(player, WINDY_HEALING_POTION); + giveItems(player, WINDY_QUICK_HEALING_POTION); + addExpAndSp(player, EXP_REWARD, SP_REWARD); + qs.exitQuest(false, true); + htmltext = event; + } break; } } @@ -174,22 +178,33 @@ public class Q10766_ANewCraft extends Quest } case ZEPHYRA: { - if (qs.isCond(1)) + switch (qs.getCond()) { - htmltext = "33978-01.html"; - } - if (qs.isCond(2)) - { - htmltext = "33978-04.html"; - } - if (qs.isCond(3) && ((getQuestItemsCount(player, AIR_STONE) == 0) || (getQuestItemsCount(player, WINDY_HEALING_POTION_1) == 1))) - { - htmltext = "33978-08.html"; - } - if (qs.isCond(4)) - { - htmltext = "33978-06.html"; + case 1: + { + htmltext = "33978-01.html"; + break; + } + case 2: + { + htmltext = "33978-04.html"; + break; + } + case 3: + { + if ((getQuestItemsCount(player, AIR_STONE) == 0) || (getQuestItemsCount(player, WINDY_HEALING_POTION_1) == 1)) + { + htmltext = "33978-08.html"; + } + break; + } + case 4: + { + htmltext = "33978-06.html"; + break; + } } + break; } } return htmltext; diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10791_TheManOfMystery/Q10791_TheManOfMystery.java b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10791_TheManOfMystery/Q10791_TheManOfMystery.java index 5cb3feacc2..fb876dd74f 100644 --- a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10791_TheManOfMystery/Q10791_TheManOfMystery.java +++ b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10791_TheManOfMystery/Q10791_TheManOfMystery.java @@ -68,13 +68,13 @@ public class Q10791_TheManOfMystery extends Quest @Override public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { - String htmltext = event; final QuestState qs = getQuestState(player, false); if (qs == null) { - return getNoQuestMsg(player); + return null; } + String htmltext = null; switch (event) { case "33847-02.htm": @@ -114,7 +114,6 @@ public class Q10791_TheManOfMystery extends Quest { final QuestState qs = getQuestState(player, true); String htmltext = getNoQuestMsg(player); - switch (qs.getState()) { case State.CREATED: diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10795_LettersFromTheQueenWallOfAgros/Q10795_LettersFromTheQueenWallOfAgros.java b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10795_LettersFromTheQueenWallOfAgros/Q10795_LettersFromTheQueenWallOfAgros.java index 13cec5ae58..4122a3fab9 100644 --- a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10795_LettersFromTheQueenWallOfAgros/Q10795_LettersFromTheQueenWallOfAgros.java +++ b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10795_LettersFromTheQueenWallOfAgros/Q10795_LettersFromTheQueenWallOfAgros.java @@ -49,7 +49,8 @@ public class Q10795_LettersFromTheQueenWallOfAgros extends LetterQuest { return null; } - String htmltext = event; + + String htmltext = null; switch (event) { case "31279-02.html": @@ -78,8 +79,6 @@ public class Q10795_LettersFromTheQueenWallOfAgros extends LetterQuest } break; } - default: - htmltext = null; } return htmltext; } @@ -88,7 +87,7 @@ public class Q10795_LettersFromTheQueenWallOfAgros extends LetterQuest public String onTalk(L2Npc npc, L2PcInstance player) { final QuestState qs = getQuestState(player, true); - String htmltext = null; + String htmltext = getNoQuestMsg(player); if (qs == null) { return htmltext; diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10798_LettersFromTheQueenDragonValley/Q10798_LettersFromTheQueenDragonValley.java b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10798_LettersFromTheQueenDragonValley/Q10798_LettersFromTheQueenDragonValley.java index f3bbabe574..ad8a12aef6 100644 --- a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10798_LettersFromTheQueenDragonValley/Q10798_LettersFromTheQueenDragonValley.java +++ b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10798_LettersFromTheQueenDragonValley/Q10798_LettersFromTheQueenDragonValley.java @@ -49,7 +49,6 @@ public class Q10798_LettersFromTheQueenDragonValley extends LetterQuest { super(10798); addTalkId(MAXIMILIAN, NAMO); - setIsErtheiaQuest(true); setLevel(MIN_LEVEL, MAX_LEVEL); setStartLocation(SOE_TOWN_OF_GIRAN, TELEPORT_LOC); @@ -65,7 +64,8 @@ public class Q10798_LettersFromTheQueenDragonValley extends LetterQuest { return null; } - String htmltext = event; + + String htmltext = null; switch (event) { case "30120-02.html": @@ -94,8 +94,6 @@ public class Q10798_LettersFromTheQueenDragonValley extends LetterQuest } break; } - default: - htmltext = null; } return htmltext; } @@ -104,7 +102,7 @@ public class Q10798_LettersFromTheQueenDragonValley extends LetterQuest public String onTalk(L2Npc npc, L2PcInstance player) { final QuestState qs = getQuestState(player, true); - String htmltext = null; + String htmltext = getNoQuestMsg(player); if (qs == null) { return htmltext; diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10799_StrangeThingsAfootInTheValley/Q10799_StrangeThingsAfootInTheValley.java b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10799_StrangeThingsAfootInTheValley/Q10799_StrangeThingsAfootInTheValley.java index a19e8b5a36..0331e061c7 100644 --- a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10799_StrangeThingsAfootInTheValley/Q10799_StrangeThingsAfootInTheValley.java +++ b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10799_StrangeThingsAfootInTheValley/Q10799_StrangeThingsAfootInTheValley.java @@ -74,13 +74,13 @@ public class Q10799_StrangeThingsAfootInTheValley extends Quest @Override public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { - String htmltext = event; final QuestState qs = getQuestState(player, false); if (qs == null) { - return getNoQuestMsg(player); + return null; } + String htmltext = null; switch (event) { case "33973-02.htm": @@ -96,7 +96,7 @@ public class Q10799_StrangeThingsAfootInTheValley extends Quest } default: { - if (event.startsWith("giveReward_") && qs.isCond(2) && (player.getLevel() >= MIN_LEVEL)) + if (qs.isCond(2) && event.startsWith("giveReward_") && (player.getLevel() >= MIN_LEVEL)) { final int itemId = Integer.parseInt(event.replace("giveReward_", "")); qs.exitQuest(false, true); diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10800_ReconnaissanceAtDragonValley/Q10800_ReconnaissanceAtDragonValley.java b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10800_ReconnaissanceAtDragonValley/Q10800_ReconnaissanceAtDragonValley.java index 0c4f02f99f..1b0bcdd80a 100644 --- a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10800_ReconnaissanceAtDragonValley/Q10800_ReconnaissanceAtDragonValley.java +++ b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10800_ReconnaissanceAtDragonValley/Q10800_ReconnaissanceAtDragonValley.java @@ -74,13 +74,13 @@ public class Q10800_ReconnaissanceAtDragonValley extends Quest @Override public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { - String htmltext = event; final QuestState qs = getQuestState(player, false); if (qs == null) { return getNoQuestMsg(player); } + String htmltext = null; switch (event) { case "33973-02.htm": @@ -96,7 +96,7 @@ public class Q10800_ReconnaissanceAtDragonValley extends Quest } default: { - if (event.startsWith("giveReward_") && qs.isCond(2) && (player.getLevel() >= MIN_LEVEL)) + if (qs.isCond(2) && event.startsWith("giveReward_") && (player.getLevel() >= MIN_LEVEL)) { final int itemId = Integer.parseInt(event.replace("giveReward_", "")); qs.exitQuest(false, true); @@ -106,6 +106,7 @@ public class Q10800_ReconnaissanceAtDragonValley extends Quest addExpAndSp(player, 84722400, 20333); htmltext = "33973-08.html"; } + break; } } return htmltext;