From 8579f4788a1656b06d62ff7a817399c5cd215065 Mon Sep 17 00:00:00 2001 From: malyelfik <malyelfik@users.noreply.github.com> Date: Thu, 28 Mar 2013 09:25:57 +0000 Subject: [PATCH] BETA: Quests in Java * Fruit of the Mother Tree (161) * Steps for Honor (176) --- L2J_DataPack_BETA/dist/game/data/scripts.cfg | 4 +- .../quests/161_FruitsOfMothertree/__init__.py | 83 ----------- .../quests/176_StepsForHonor/36479-01.htm | 7 - .../quests/176_StepsForHonor/36479-02.htm | 7 - .../quests/176_StepsForHonor/36479-04.htm | 7 - .../quests/176_StepsForHonor/36479-11.htm | 6 - .../quests/176_StepsForHonor/__init__.py | 84 ----------- .../30362-01.htm} | 0 .../30362-02.htm | 2 +- .../30362-03.htm | 5 +- .../30362-04.htm | 2 +- .../30362-05.html} | 0 .../30362-06.html} | 0 .../30371-01.html} | 6 +- .../30371-02.html} | 4 +- .../30371-03.html} | 3 +- .../Q00161_FruitOfTheMotherTree.java | 137 ++++++++++++++++++ .../quests/Q00176_StepsForHonor/36479-01.html | 3 + .../36479-02.html} | 9 +- .../quests/Q00176_StepsForHonor/36479-03.html | 4 + .../quests/Q00176_StepsForHonor/36479-04.html | 4 + .../36479-05.html} | 7 +- .../36479-06.html} | 9 +- .../quests/Q00176_StepsForHonor/36479-07.html | 4 + .../36479-08.html} | 7 +- .../36479-09.html} | 11 +- .../36479-10.html} | 9 +- .../36479-11.html} | 7 +- .../36479-12.html} | 9 +- .../36479-13.html} | 9 +- .../Q00176_StepsForHonor.java | 124 ++++++++++++++++ .../TerritoryWarSuperClass.java | 3 +- .../dist/sql/game/updates/20130328update.sql | 2 + 33 files changed, 316 insertions(+), 262 deletions(-) delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/161_FruitsOfMothertree/__init__.py delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/176_StepsForHonor/36479-01.htm delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/176_StepsForHonor/36479-02.htm delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/176_StepsForHonor/36479-04.htm delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/176_StepsForHonor/36479-11.htm delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/176_StepsForHonor/__init__.py rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{161_FruitsOfMothertree/30362-00.htm => Q00161_FruitOfTheMotherTree/30362-01.htm} (100%) rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{161_FruitsOfMothertree => Q00161_FruitOfTheMotherTree}/30362-02.htm (87%) rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{161_FruitsOfMothertree => Q00161_FruitOfTheMotherTree}/30362-03.htm (84%) rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{161_FruitsOfMothertree => Q00161_FruitOfTheMotherTree}/30362-04.htm (74%) rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{161_FruitsOfMothertree/30362-05.htm => Q00161_FruitOfTheMotherTree/30362-05.html} (100%) rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{161_FruitsOfMothertree/30362-06.htm => Q00161_FruitOfTheMotherTree/30362-06.html} (100%) rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{161_FruitsOfMothertree/30371-01.htm => Q00161_FruitOfTheMotherTree/30371-01.html} (56%) rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{161_FruitsOfMothertree/30371-02.htm => Q00161_FruitOfTheMotherTree/30371-02.html} (58%) rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{161_FruitsOfMothertree/30371-03.htm => Q00161_FruitOfTheMotherTree/30371-03.html} (54%) create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00161_FruitOfTheMotherTree/Q00161_FruitOfTheMotherTree.java create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00176_StepsForHonor/36479-01.html rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{176_StepsForHonor/36479-00.htm => Q00176_StepsForHonor/36479-02.html} (71%) create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00176_StepsForHonor/36479-03.html create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00176_StepsForHonor/36479-04.html rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{176_StepsForHonor/36479-tw.htm => Q00176_StepsForHonor/36479-05.html} (70%) rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{176_StepsForHonor/36479-03.htm => Q00176_StepsForHonor/36479-06.html} (69%) create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00176_StepsForHonor/36479-07.html rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{176_StepsForHonor/36479-05.htm => Q00176_StepsForHonor/36479-08.html} (74%) rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{176_StepsForHonor/36479-06.htm => Q00176_StepsForHonor/36479-09.html} (52%) rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{176_StepsForHonor/36479-07.htm => Q00176_StepsForHonor/36479-10.html} (65%) rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{176_StepsForHonor/36479-08.htm => Q00176_StepsForHonor/36479-11.html} (80%) rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{176_StepsForHonor/36479-09.htm => Q00176_StepsForHonor/36479-12.html} (65%) rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{176_StepsForHonor/36479-10.htm => Q00176_StepsForHonor/36479-13.html} (50%) create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00176_StepsForHonor/Q00176_StepsForHonor.java create mode 100644 L2J_DataPack_BETA/dist/sql/game/updates/20130328update.sql diff --git a/L2J_DataPack_BETA/dist/game/data/scripts.cfg b/L2J_DataPack_BETA/dist/game/data/scripts.cfg index 5479276dce..e72c7c7da1 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts.cfg +++ b/L2J_DataPack_BETA/dist/game/data/scripts.cfg @@ -413,7 +413,7 @@ quests/Q00157_RecoverSmuggledGoods/Q00157_RecoverSmuggledGoods.java quests/Q00158_SeedOfEvil/Q00158_SeedOfEvil.java quests/Q00159_ProtectTheWaterSource/Q00159_ProtectTheWaterSource.java quests/160_NerupasFavor/__init__.py -quests/161_FruitsOfMothertree/__init__.py +quests/Q00161_FruitOfTheMotherTree/Q00161_FruitOfTheMotherTree.java quests/Q00162_CurseOfTheUndergroundFortress/Q00162_CurseOfTheUndergroundFortress.java quests/Q00163_LegacyOfThePoet/Q00163_LegacyOfThePoet.java quests/Q00164_BloodFiend/Q00164_BloodFiend.java @@ -428,7 +428,7 @@ quests/Q00172_NewHorizons/Q00172_NewHorizons.java quests/Q00173_ToTheIsleOfSouls/Q00173_ToTheIsleOfSouls.java quests/Q00174_SupplyCheck/Q00174_SupplyCheck.java quests/175_TheWayOfTheWarrior/__init__.py -quests/176_StepsForHonor/__init__.py +quests/Q00176_StepsForHonor/Q00176_StepsForHonor.java quests/178_IconicTrinity/__init__.py quests/Q00179_IntoTheLargeCavern/Q00179_IntoTheLargeCavern.java quests/Q00182_NewRecruits/Q00182_NewRecruits.java diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/161_FruitsOfMothertree/__init__.py b/L2J_DataPack_BETA/dist/game/data/scripts/quests/161_FruitsOfMothertree/__init__.py deleted file mode 100644 index 4b7d51e7a1..0000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/161_FruitsOfMothertree/__init__.py +++ /dev/null @@ -1,83 +0,0 @@ -# Made by Mr. Have fun! -# Version 0.3 by H1GHL4ND3R -import sys -from com.l2jserver.gameserver.model.quest import State -from com.l2jserver.gameserver.model.quest import QuestState -from com.l2jserver.gameserver.model.quest.jython import QuestJython as JQuest - -qn = "161_FruitsOfMothertree" - -ANDELLRIAS_LETTER = 1036 -MOTHERTREE_FRUIT = 1037 -ADENA = 57 - -class Quest (JQuest) : - - def __init__(self,id,name,descr): - JQuest.__init__(self,id,name,descr) - self.questItemIds = [MOTHERTREE_FRUIT, ANDELLRIAS_LETTER] - - def onAdvEvent (self,event,npc, player) : - htmltext = event - st = player.getQuestState(qn) - if not st : return - if event == "30362-04.htm" : - st.set("cond","1") - st.setState(State.STARTED) - st.giveItems(ANDELLRIAS_LETTER,1) - st.playSound("ItemSound.quest_accept") - return htmltext - - def onTalk (self,npc,player): - htmltext = Quest.getNoQuestMsg(player) - st = player.getQuestState(qn) - if not st : return htmltext - - npcId = npc.getNpcId() - id = st.getState() - if id == State.CREATED : - if player.getRace().ordinal() != 1 : - htmltext = "30362-00.htm" - elif player.getLevel() >= 3 : - htmltext = "30362-03.htm" - st.set("cond","0") - else: - htmltext = "30362-02.htm" - st.exitQuest(1) - elif id == State.COMPLETED : - htmltext = Quest.getAlreadyCompletedMsg(player) - - elif id == State.STARTED : - try : - cond = st.getInt("cond") - except : - cond = None - if cond == 1 : - if npcId == 30362 : - htmltext = "30362-05.htm" - elif npcId == 30371 and st.getQuestItemsCount(ANDELLRIAS_LETTER) : - htmltext = "30371-01.htm" - st.takeItems(ANDELLRIAS_LETTER,1) - st.giveItems(MOTHERTREE_FRUIT,1) - st.set("cond", "2") - st.playSound("ItemSound.quest_middle") - elif cond == 2 : - if npcId == 30362 and st.getQuestItemsCount(MOTHERTREE_FRUIT) : - htmltext = "30362-06.htm" - st.giveItems(ADENA,1000) - st.takeItems(MOTHERTREE_FRUIT,1) - st.addExpAndSp(1000,0) - st.unset("cond") - st.exitQuest(False) - st.playSound("ItemSound.quest_finish") - elif npcId == 30371 and st.getQuestItemsCount(MOTHERTREE_FRUIT) : - htmltext = "30371-02.htm" - return htmltext - -QUEST = Quest(161,qn,"Fruits Of the Mothertree") - -QUEST.addStartNpc(30362) - -QUEST.addTalkId(30362) - -QUEST.addTalkId(30371) \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/176_StepsForHonor/36479-01.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/176_StepsForHonor/36479-01.htm deleted file mode 100644 index 9b00987cbd..0000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/176_StepsForHonor/36479-01.htm +++ /dev/null @@ -1,7 +0,0 @@ -<html> -<body> -Rapidus:<br> -The winning of fame does not come without effort, even pain. Are you prepared?<br> -<a action="bypass -h Quest 176_StepsForHonor 36479-02.htm">Say yes.</a><br> -</body> -</html> diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/176_StepsForHonor/36479-02.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/176_StepsForHonor/36479-02.htm deleted file mode 100644 index 3e494f3ee3..0000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/176_StepsForHonor/36479-02.htm +++ /dev/null @@ -1,7 +0,0 @@ -<html> -<body> -Rapidus:<br> -Good! But I will test your will. First, participate in a territory battle and defeat at least 9 enemies. They must be worthy of your attention, or I will not count them toward your tally. <br> -(You must kill PCs who are level 61 or higher.)<br> -</body> -</html> diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/176_StepsForHonor/36479-04.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/176_StepsForHonor/36479-04.htm deleted file mode 100644 index a9d8a52fa4..0000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/176_StepsForHonor/36479-04.htm +++ /dev/null @@ -1,7 +0,0 @@ -<html> -<body> -Rapidus:<br> -Ah, you passed the test! But perhaps this was too easy... I will give you another test. This time, kill 18 enemies in a territory battle! As before, slay only those worthy of your attention. <br> -(You must kill PCs who are level 61 or higher.)<br> -</body> -</html> diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/176_StepsForHonor/36479-11.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/176_StepsForHonor/36479-11.htm deleted file mode 100644 index 6ce2bc32e2..0000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/176_StepsForHonor/36479-11.htm +++ /dev/null @@ -1,6 +0,0 @@ -<html> -<body> -Rapidus:<br> -I salute your patience and effort. I hope you set an ever bigger goal for yourself in the future.<br> -</body> -</html> diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/176_StepsForHonor/__init__.py b/L2J_DataPack_BETA/dist/game/data/scripts/quests/176_StepsForHonor/__init__.py deleted file mode 100644 index d6edce472f..0000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/176_StepsForHonor/__init__.py +++ /dev/null @@ -1,84 +0,0 @@ -# 2010-08-01 by Gnacik -# Based on official server Franz - -import sys -from com.l2jserver import Config -from com.l2jserver.gameserver.instancemanager import TerritoryWarManager -from com.l2jserver.gameserver.model.quest import State -from com.l2jserver.gameserver.model.quest import QuestState -from com.l2jserver.gameserver.model.quest.jython import QuestJython as JQuest - -qn = "176_StepsForHonor" - -# NPCs -RAPIDUS = 36479 - -# ITEMS -CLOAK = 14603 - -class Quest (JQuest) : - def __init__(self,id,name,descr): - JQuest.__init__(self,id,name,descr) - self.questItemIds = [] - - def onAdvEvent(self, event, npc, player) : - htmltext = event - st = player.getQuestState(qn) - if not st : return - - if event == "36479-02.htm" : - st.setState(State.STARTED) - st.set("cond","1") - st.playSound("ItemSound.quest_accept") - return htmltext - - def onTalk (self, npc, player) : - htmltext = Quest.getNoQuestMsg(player) - st = player.getQuestState(qn) - if not st : return htmltext - - cond = st.getInt("cond") - - if npc.getNpcId() == RAPIDUS : - if st.getState() == State.STARTED : - if TerritoryWarManager.getInstance().isTWInProgress() : - htmltext = "36479-tw.htm" - elif cond == 1 : - htmltext = "36479-03.htm" - elif cond == 2 : - st.playSound("ItemSound.quest_middle") - st.set("cond","3") - htmltext = "36479-04.htm" - elif cond == 3 : - htmltext = "36479-05.htm" - elif cond == 4 : - st.playSound("ItemSound.quest_middle") - st.set("cond","5") - htmltext = "36479-06.htm" - elif cond == 5 : - htmltext = "36479-07.htm" - elif cond == 6 : - st.playSound("ItemSound.quest_middle") - st.set("cond","7") - htmltext = "36479-08.htm" - elif cond == 7 : - htmltext = "36479-09.htm" - elif cond == 8 : - st.giveItems(CLOAK,1) - st.exitQuest(False) - st.playSound("ItemSound.quest_finish") - htmltext = "36479-10.htm" - elif st.getState() == State.CREATED : - if player.getLevel() >= 80 : - htmltext = "36479-01.htm" - else : - htmltext = "36479-00.htm" - elif st.getState() == State.COMPLETED : - htmltext = "36479-11.htm" - - return htmltext - -QUEST = Quest(176,qn,"Steps for honor") - -QUEST.addStartNpc(RAPIDUS) -QUEST.addTalkId(RAPIDUS) diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/161_FruitsOfMothertree/30362-00.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00161_FruitOfTheMotherTree/30362-01.htm similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/161_FruitsOfMothertree/30362-00.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00161_FruitOfTheMotherTree/30362-01.htm diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/161_FruitsOfMothertree/30362-02.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00161_FruitOfTheMotherTree/30362-02.htm similarity index 87% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/161_FruitsOfMothertree/30362-02.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00161_FruitOfTheMotherTree/30362-02.htm index 3933b37e75..7f445cbd05 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/161_FruitsOfMothertree/30362-02.htm +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00161_FruitOfTheMotherTree/30362-02.htm @@ -1,5 +1,5 @@ <html><body>Andellia:<br> -My sisters and I are in charge of taking care of the young Mother Trees in the forest. This task lets us see the changes to the Mother Trees and the Elven woods in all four seasons, and we find it a delightful task. The nectar that gives we children of the forest our nearly eternal lives is made from the<font color="LEVEL"> fruit of the Mother Tree</font>.<br> +My sisters and I are in charge of taking care of the young Mother Trees in the forest. This task lets us see the changes to the Mother Trees and the Elven woods in all four seasons, and we find it a delightful task. The nectar that gives we children of the forest our nearly eternal lives is made from the <font color="LEVEL">Fruit of The Mother Tree</font>.<br> Fruit harvests have been gradually decreasing lately, and I think it is because of the spores that spread to our woods from the Sea of Spores on the other side of the mountain. At this rate, we may not be able to make nectar anymore.<br> My sister Thalia is the protector of the Mother Tree near Lake Iris, and has said that the Mother Tree there may soon bear fruit. Do you think you could go and get the fruit from her when it is ready?<br> (Elf characters with Level 3 and higher may undertake this quest.) diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/161_FruitsOfMothertree/30362-03.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00161_FruitOfTheMotherTree/30362-03.htm similarity index 84% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/161_FruitsOfMothertree/30362-03.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00161_FruitOfTheMotherTree/30362-03.htm index 0db17a6ef2..12357b8102 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/161_FruitsOfMothertree/30362-03.htm +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00161_FruitOfTheMotherTree/30362-03.htm @@ -1,6 +1,7 @@ <html><body>Andellia:<br> -My sisters and I are in charge of taking care of the young Mother Trees in the forest. It is our joy in life to take care of the Mother Trees in all four seasons while keeping company with the creatures of the beautiful Elven Forest. The nectar that gives us children of the forest our nearly eternal lives is made from the<font color="LEVEL"> Fruit of The Mother Tree</font>.<br> +My sisters and I are in charge of taking care of the young Mother Trees in the forest. It is our joy in life to take care of the Mother Trees in all four seasons while keeping company with the creatures of the beautiful Elven Forest. The nectar that gives us children of the forest our nearly eternal lives is made from the <font color="LEVEL">Fruit of The Mother Tree</font>.<br> Fruit harvests have been gradually decreasing lately, and I think it is because of the spores that spread to our woods from the Sea of Spores on the other side of the mountain.<br> A few days ago, I received a letter from my younger sister, Thalia, that the Mother Tree near Lake Iris had borne fruit. We sisters cannot travel far from our Mother Trees, as we must stay close and maintain our tie to it. My sister has probably finished her harvest by now. Would you be able to travel there and bring back the fruit from her?<br> No one but us sisters may harvest the Mother Tree's fruits, and it is a rare opportunity to be able to see a real Mother Tree fruit in person.<br> -<a action="bypass -h Quest 161_FruitsOfMothertree 30362-04.htm">Say you will perform the task</a></body></html> \ No newline at end of file +<a action="bypass -h Quest Q00161_FruitOfTheMotherTree 30362-04.htm">Say you will perform the task</a> +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/161_FruitsOfMothertree/30362-04.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00161_FruitOfTheMotherTree/30362-04.htm similarity index 74% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/161_FruitsOfMothertree/30362-04.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00161_FruitOfTheMotherTree/30362-04.htm index 734c36fcba..506b177a88 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/161_FruitsOfMothertree/30362-04.htm +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00161_FruitOfTheMotherTree/30362-04.htm @@ -1,5 +1,5 @@ <html><body>Andellia:<br> -Thank you so much. First, take this letter. Show it to<font color="LEVEL"> Thalia</font> and she will know that I sent you. Get the Mother Tree fruit from her and bring it back to me. Please hurry, as the fruit may spoil. We cannot make nectar from spoiled fruit.<br> +Thank you so much. First, take this letter. Show it to <font color="LEVEL">Thalia</font> and she will know that I sent you. Get the Mother Tree fruit from her and bring it back to me. Please hurry, as the fruit may spoil. We cannot make nectar from spoiled fruit.<br> Just follow the southern path from the village to reach Lake Iris. My sister Thalia lives in the small observatory on the eastern lake shore.<br> Thank you in advance and please send her my regards. </body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/161_FruitsOfMothertree/30362-05.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00161_FruitOfTheMotherTree/30362-05.html similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/161_FruitsOfMothertree/30362-05.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00161_FruitOfTheMotherTree/30362-05.html diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/161_FruitsOfMothertree/30362-06.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00161_FruitOfTheMotherTree/30362-06.html similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/161_FruitsOfMothertree/30362-06.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00161_FruitOfTheMotherTree/30362-06.html diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/161_FruitsOfMothertree/30371-01.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00161_FruitOfTheMotherTree/30371-01.html similarity index 56% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/161_FruitsOfMothertree/30371-01.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00161_FruitOfTheMotherTree/30371-01.html index 170dc492a6..49058dd522 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/161_FruitsOfMothertree/30371-01.htm +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00161_FruitOfTheMotherTree/30371-01.html @@ -1,6 +1,4 @@ <html><body>Thalia:<br> - -My sister Andellia has sent you, I see. This is the Mother Tree fruit I harvested this year. It is a very precious fruit, the only one that has been harvested this year. Please deliver it safely to my sister<font color="LEVEL"> Andellia</font> in the village.<br> - -<a action="bypass -h Quest 161_FruitsOfMothertree 30371-03.htm">Ask about the geography around Lake Iris</a> +My sister Andellia has sent you, I see. This is the Mother Tree fruit I harvested this year. It is a very precious fruit, the only one that has been harvested this year. Please deliver it safely to my sister <font color="LEVEL">Andellia</font> in the village.<br> +<a action="bypass -h Quest Q00161_FruitOfTheMotherTree 30371-03.html">Ask about the geography around Lake Iris</a> </body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/161_FruitsOfMothertree/30371-02.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00161_FruitOfTheMotherTree/30371-02.html similarity index 58% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/161_FruitsOfMothertree/30371-02.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00161_FruitOfTheMotherTree/30371-02.html index 8f65f3b04f..8ab75e1a23 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/161_FruitsOfMothertree/30371-02.htm +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00161_FruitOfTheMotherTree/30371-02.html @@ -1,6 +1,4 @@ <html><body>Thalia:<br> - Haven't you left yet? Please deliver this Mother Tree fruit to Andellia. You need to get there before the fruit spoils ...<br> - -<a action="bypass -h Quest 161_FruitsOfMothertree 30371-03.htm">Ask about the geography around Lake Iris</a> +<a action="bypass -h Quest Q00161_FruitOfTheMotherTree 30371-03.html">Ask about the geography around Lake Iris</a> </body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/161_FruitsOfMothertree/30371-03.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00161_FruitOfTheMotherTree/30371-03.html similarity index 54% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/161_FruitsOfMothertree/30371-03.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00161_FruitOfTheMotherTree/30371-03.html index 7c970ee9de..183297690b 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/161_FruitsOfMothertree/30371-03.htm +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00161_FruitOfTheMotherTree/30371-03.html @@ -1,4 +1,3 @@ <html><body>Thalia:<br> - -Lake Iris has an irregular shape. North of the lake is the Elven Village, while the falls are located to the northwest. To the west is the Underground Elven Fortress. Beyond the Misty Mountains to the north, there is a place which was formerly a battlefield ... But now, everything there has become deformed due to magical influences, only the poisonous Sea of Spores remains. +Lake Iris has an irregular shape. North of the lake is the Elven Village, while the falls are located to the northwest. To the west is the Underground Elven Fortress. Beyond the Misty Mountains north of the village, there is a place which was formerly a battlefield ... But now, everything there has become deformed due to magical influences, only the poisonous Sea of Spores remains. </body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00161_FruitOfTheMotherTree/Q00161_FruitOfTheMotherTree.java b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00161_FruitOfTheMotherTree/Q00161_FruitOfTheMotherTree.java new file mode 100644 index 0000000000..c39a7060ba --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00161_FruitOfTheMotherTree/Q00161_FruitOfTheMotherTree.java @@ -0,0 +1,137 @@ +/* + * Copyright (C) 2004-2013 L2J DataPack + * + * This file is part of L2J DataPack. + * + * L2J DataPack is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * L2J DataPack is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +package quests.Q00161_FruitOfTheMotherTree; + +import com.l2jserver.gameserver.model.actor.L2Npc; +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.base.Race; +import com.l2jserver.gameserver.model.quest.Quest; +import com.l2jserver.gameserver.model.quest.QuestState; +import com.l2jserver.gameserver.model.quest.State; + +/** + * Fruit of the Mother Tree (161) + * @author malyelfik + */ +public class Q00161_FruitOfTheMotherTree extends Quest +{ + // NPCs + private static final int ANDELLIA = 30362; + private static final int THALIA = 30371; + // Items + private static final int ANDELLRIAS_LETTER = 1036; + private static final int MOTHERTREE_FRUIT = 1037; + // Misc + private static final int MIN_LEVEL = 3; + + private Q00161_FruitOfTheMotherTree(int questId, String name, String descr) + { + super(questId, name, descr); + addStartNpc(ANDELLIA); + addTalkId(ANDELLIA, THALIA); + registerQuestItems(ANDELLRIAS_LETTER, MOTHERTREE_FRUIT); + } + + @Override + public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) + { + final QuestState st = player.getQuestState(getName()); + if (st == null) + { + return null; + } + + String htmltext = event; + switch (event) + { + case "30362-04.htm": + st.startQuest(); + st.giveItems(ANDELLRIAS_LETTER, 1); + break; + case "30371-03.html": + break; + default: + htmltext = null; + break; + + } + return htmltext; + } + + @Override + public String onTalk(L2Npc npc, L2PcInstance player) + { + String htmltext = getNoQuestMsg(player); + final QuestState st = player.getQuestState(getName()); + if (st == null) + { + return htmltext; + } + + switch (npc.getNpcId()) + { + case ANDELLIA: + switch (st.getState()) + { + case State.CREATED: + htmltext = (player.getRace() == Race.Elf) ? (player.getLevel() >= MIN_LEVEL) ? "30362-03.htm" : "30362-02.htm" : "30362-01.htm"; + break; + case State.STARTED: + if (st.isCond(1)) + { + htmltext = "30362-05.html"; + } + else if (st.isCond(2) && st.hasQuestItems(MOTHERTREE_FRUIT)) + { + st.giveAdena(1000, true); + st.addExpAndSp(1000, 0); + st.exitQuest(false, true); + htmltext = "30362-06.html"; + } + break; + case State.COMPLETED: + htmltext = getAlreadyCompletedMsg(player); + break; + } + break; + case THALIA: + if (st.isStarted()) + { + if (st.isCond(1) && st.hasQuestItems(ANDELLRIAS_LETTER)) + { + st.takeItems(ANDELLRIAS_LETTER, -1); + st.giveItems(MOTHERTREE_FRUIT, 1); + st.setCond(2, true); + htmltext = "30371-01.html"; + } + else if (st.isCond(2) && st.hasQuestItems(MOTHERTREE_FRUIT)) + { + htmltext = "30371-02.html"; + } + } + break; + } + return htmltext; + } + + public static void main(String[] args) + { + new Q00161_FruitOfTheMotherTree(161, Q00161_FruitOfTheMotherTree.class.getSimpleName(), "Fruit of the Mother Tree"); + } +} \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00176_StepsForHonor/36479-01.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00176_StepsForHonor/36479-01.html new file mode 100644 index 0000000000..d9a7d3dfbc --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00176_StepsForHonor/36479-01.html @@ -0,0 +1,3 @@ +<html><body>Rapidus:<br> +I salute your patience and effort. I hope you set an ever bigger goal for yourself in the future. +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/176_StepsForHonor/36479-00.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00176_StepsForHonor/36479-02.html similarity index 71% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/176_StepsForHonor/36479-00.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00176_StepsForHonor/36479-02.html index 422f5cbda6..20506f2ecc 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/176_StepsForHonor/36479-00.htm +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00176_StepsForHonor/36479-02.html @@ -1,7 +1,4 @@ -<html> -<body> -Rapidus:<br> +<html><body>Rapidus:<br> Your ambition exceeds your ability. Come back after your skills have increased.<br> -(Only characters who are level 80 or higher may undertake this quest.)<br> -</body> -</html> \ No newline at end of file +(Only characters who are level 80 or higher may undertake this quest.) +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00176_StepsForHonor/36479-03.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00176_StepsForHonor/36479-03.html new file mode 100644 index 0000000000..1c857bc2ce --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00176_StepsForHonor/36479-03.html @@ -0,0 +1,4 @@ +<html><body>Rapidus:<br> +The winning of fame does not come without effort, even pain. Are you prepared?<br> +<a action="bypass -h Quest Q00176_StepsForHonor 36479-04.html">Say yes.</a> +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00176_StepsForHonor/36479-04.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00176_StepsForHonor/36479-04.html new file mode 100644 index 0000000000..922050959e --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00176_StepsForHonor/36479-04.html @@ -0,0 +1,4 @@ +<html><body>Rapidus:<br> +Good! But I will test your will. First, participate in a territory battle and defeat at least 9 enemies. They must be worthy of your attention, or I will not count them toward your tally.<br> +(You must kill PCs who are level 61 or higher.) +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/176_StepsForHonor/36479-tw.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00176_StepsForHonor/36479-05.html similarity index 70% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/176_StepsForHonor/36479-tw.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00176_StepsForHonor/36479-05.html index 03a0a0074b..c5e40f9621 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/176_StepsForHonor/36479-tw.htm +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00176_StepsForHonor/36479-05.html @@ -1,6 +1,3 @@ -<html> -<body> -Rapidus:<br> +<html><body>Rapidus:<br> Distraction is one of a warrior's greatest foes. Focus your attention and your will completely on the battle. -</body> -</html> \ No newline at end of file +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/176_StepsForHonor/36479-03.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00176_StepsForHonor/36479-06.html similarity index 69% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/176_StepsForHonor/36479-03.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00176_StepsForHonor/36479-06.html index 588c9c48fb..2fa350495e 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/176_StepsForHonor/36479-03.htm +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00176_StepsForHonor/36479-06.html @@ -1,6 +1,3 @@ -<html> -<body> -Rapidus:<br> -You want fame, but cannot even accomplish such a small task? Do not disappoint me. You must defeat 9 enemies in a territory battle.<br> -</body> -</html> \ No newline at end of file +<html><body>Rapidus:<br> +You want fame, but cannot even accomplish such a small task? Do not disappoint me. You must defeat 9 enemies in a territory battle. +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00176_StepsForHonor/36479-07.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00176_StepsForHonor/36479-07.html new file mode 100644 index 0000000000..5d05277a20 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00176_StepsForHonor/36479-07.html @@ -0,0 +1,4 @@ +<html><body>Rapidus:<br> +Ah, you passed the test! But perhaps this was too easy... I will give you another test. This time, kill 18 enemies in a territory battle! As before, slay only those worthy of your attention.<br> +(You must kill PCs who are level 61 or higher.) +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/176_StepsForHonor/36479-05.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00176_StepsForHonor/36479-08.html similarity index 74% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/176_StepsForHonor/36479-05.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00176_StepsForHonor/36479-08.html index 4ad1de1f7b..84a5a0af65 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/176_StepsForHonor/36479-05.htm +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00176_StepsForHonor/36479-08.html @@ -1,6 +1,3 @@ -<html> -<body> -Rapidus:<br> +<html><body>Rapidus:<br> You want a reward, but cannot even accomplish such a small task? Do not disappoint me. You must defeat 18 enemies in a territory battle. -</body> -</html> \ No newline at end of file +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/176_StepsForHonor/36479-06.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00176_StepsForHonor/36479-09.html similarity index 52% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/176_StepsForHonor/36479-06.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00176_StepsForHonor/36479-09.html index 6d5d7e09ef..99b8deda5f 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/176_StepsForHonor/36479-06.htm +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00176_StepsForHonor/36479-09.html @@ -1,7 +1,4 @@ -<html> -<body> -Rapidus:<br> -Now I will give you third test. This time kill 27 enemies in a territory battle! As before, slay only those worthy of your attention. <br> -(You must kill only PCs who are level 61 or higher.)<br> -</body> -</html> \ No newline at end of file +<html><body>Rapidus:<br> +Now I will give you third test. This time kill 27 enemies in a territory battle! As before, slay only those worthy of your attention.<br> +(You must kill only PCs who are level 61 or higher.) +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/176_StepsForHonor/36479-07.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00176_StepsForHonor/36479-10.html similarity index 65% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/176_StepsForHonor/36479-07.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00176_StepsForHonor/36479-10.html index 809e26f154..49e944e05b 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/176_StepsForHonor/36479-07.htm +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00176_StepsForHonor/36479-10.html @@ -1,6 +1,3 @@ -<html> -<body> -Rapidus:<br> -You want a reward, but cannot even accomplish the task I assigned you? Do not disappoint me. You must defeat 27 enemies in a territory battle.<br> -</body> -</html> \ No newline at end of file +<html><body>Rapidus:<br> +You want a reward, but cannot even accomplish the task I assigned you? Do not disappoint me. You must defeat 27 enemies in a territory battle. +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/176_StepsForHonor/36479-08.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00176_StepsForHonor/36479-11.html similarity index 80% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/176_StepsForHonor/36479-08.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00176_StepsForHonor/36479-11.html index 7ed0b32879..b4c1998d09 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/176_StepsForHonor/36479-08.htm +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00176_StepsForHonor/36479-11.html @@ -1,7 +1,4 @@ -<html> -<body> -Rapidus:<br> +<html><body>Rapidus:<br> Now I will give you fourth test. This time kill 36 enemies in a territory battle! As before, slay only those worthy of your attention.<br> (You must kill only PCs who are level 61 or higher.) -</body> -</html> \ No newline at end of file +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/176_StepsForHonor/36479-09.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00176_StepsForHonor/36479-12.html similarity index 65% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/176_StepsForHonor/36479-09.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00176_StepsForHonor/36479-12.html index e926fdec86..e81274d1be 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/176_StepsForHonor/36479-09.htm +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00176_StepsForHonor/36479-12.html @@ -1,6 +1,3 @@ -<html> -<body> -Rapidus:<br> -You want a reward, but cannot even accomplish the task I assigned you? Do not disappoint me. You must defeat 36 enemies in a territory battle.<br> -</body> -</html> \ No newline at end of file +<html><body>Rapidus:<br> +You want a reward, but cannot even accomplish the task I assigned you? Do not disappoint me. You must defeat 36 enemies in a territory battle. +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/176_StepsForHonor/36479-10.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00176_StepsForHonor/36479-13.html similarity index 50% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/176_StepsForHonor/36479-10.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00176_StepsForHonor/36479-13.html index bbdbb4e528..379b72124f 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/176_StepsForHonor/36479-10.htm +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00176_StepsForHonor/36479-13.html @@ -1,6 +1,3 @@ -<html> -<body> -Rapidus:<br> -I prepared something to reward you for your efforts. Wear this with pride.<br> -</body> -</html> +<html><body>Rapidus:<br> +I prepared something to reward you for your efforts. Wear this with pride. +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00176_StepsForHonor/Q00176_StepsForHonor.java b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00176_StepsForHonor/Q00176_StepsForHonor.java new file mode 100644 index 0000000000..1d3d52f5af --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00176_StepsForHonor/Q00176_StepsForHonor.java @@ -0,0 +1,124 @@ +/* + * Copyright (C) 2004-2013 L2J DataPack + * + * This file is part of L2J DataPack. + * + * L2J DataPack is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * L2J DataPack is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +package quests.Q00176_StepsForHonor; + +import com.l2jserver.gameserver.instancemanager.TerritoryWarManager; +import com.l2jserver.gameserver.model.actor.L2Npc; +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.quest.Quest; +import com.l2jserver.gameserver.model.quest.QuestState; +import com.l2jserver.gameserver.model.quest.State; + +/** + * Steps for Honor (176) + * @author malyelfik + */ +public class Q00176_StepsForHonor extends Quest +{ + // NPC + private static final int RAPIDUS = 36479; + // Item + private static final int CLOAK = 14603; + // Misc + private static final int MIN_LEVEL = 80; + + private Q00176_StepsForHonor(int questId, String name, String descr) + { + super(questId, name, descr); + addStartNpc(RAPIDUS); + addTalkId(RAPIDUS); + } + + @Override + public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) + { + final QuestState st = player.getQuestState(getName()); + if ((st != null) && event.equalsIgnoreCase("36479-04.html")) + { + st.startQuest(); + return event; + } + return null; + } + + @Override + public String onTalk(L2Npc npc, L2PcInstance player) + { + String htmltext = getNoQuestMsg(player); + final QuestState st = player.getQuestState(getName()); + if (st == null) + { + return htmltext; + } + + switch (st.getState()) + { + case State.CREATED: + htmltext = (player.getLevel() >= MIN_LEVEL) ? "36479-03.html" : "36479-02.html"; + break; + case State.STARTED: + if (TerritoryWarManager.getInstance().isTWInProgress()) + { + return "36479-05.html"; + } + switch (st.getCond()) + { + case 1: + htmltext = "36479-06.html"; + break; + case 2: + st.setCond(3, true); + htmltext = "36479-07.html"; + break; + case 3: + htmltext = "36479-08.html"; + break; + case 4: + st.setCond(5, true); + htmltext = "36479-09.html"; + break; + case 5: + htmltext = "36479-10.html"; + break; + case 6: + st.setCond(7, true); + htmltext = "36479-11.html"; + break; + case 7: + htmltext = "36479-12.html"; + break; + case 8: + st.giveItems(CLOAK, 1); + st.exitQuest(false, true); + htmltext = "36479-13.html"; + break; + } + break; + case State.COMPLETED: + htmltext = "36479-01.html"; + break; + } + return htmltext; + } + + public static void main(String[] args) + { + new Q00176_StepsForHonor(176, Q00176_StepsForHonor.class.getSimpleName(), "Steps for Honor"); + } +} \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/TerritoryWarScripts/TerritoryWarSuperClass.java b/L2J_DataPack_BETA/dist/game/data/scripts/quests/TerritoryWarScripts/TerritoryWarSuperClass.java index 9c06cbd7ce..873beacfce 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/TerritoryWarScripts/TerritoryWarSuperClass.java +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/TerritoryWarScripts/TerritoryWarSuperClass.java @@ -23,6 +23,7 @@ import java.util.StringTokenizer; import quests.Q00147_PathtoBecominganEliteMercenary.Q00147_PathtoBecominganEliteMercenary; import quests.Q00148_PathtoBecominganExaltedMercenary.Q00148_PathtoBecominganExaltedMercenary; +import quests.Q00176_StepsForHonor.Q00176_StepsForHonor; import com.l2jserver.gameserver.SevenSigns; import com.l2jserver.gameserver.instancemanager.TerritoryWarManager; @@ -560,7 +561,7 @@ public class TerritoryWarSuperClass extends Quest int kills = 0; int cond = 0; // Additional Handle for Quest - QuestState _sfh = player.getQuestState("176_StepsForHonor"); + final QuestState _sfh = player.getQuestState(Q00176_StepsForHonor.class.getSimpleName()); if ((_sfh != null) && _sfh.isStarted()) { cond = _sfh.getCond(); diff --git a/L2J_DataPack_BETA/dist/sql/game/updates/20130328update.sql b/L2J_DataPack_BETA/dist/sql/game/updates/20130328update.sql new file mode 100644 index 0000000000..1ba4a70b3e --- /dev/null +++ b/L2J_DataPack_BETA/dist/sql/game/updates/20130328update.sql @@ -0,0 +1,2 @@ +UPDATE character_quests SET name='Q00161_FruitOfTheMotherTree' WHERE name='161_FruitsOfMothertree'; +UPDATE character_quests SET name='Q00176_StepsForHonor' WHERE name='176_StepsForHonor'; \ No newline at end of file -- GitLab