From 1fd22c2b59de510816e570210ff8fa6a58ab6aff Mon Sep 17 00:00:00 2001 From: ivantotov <gmtotov@gmail.com> Date: Thu, 21 Aug 2014 19:21:49 +0000 Subject: [PATCH] BETA: Quest Path Of The Elven Knight (406) in Java. Reviewed by: joxit, Zoey76 --- L2J_DataPack_BETA/dist/game/data/scripts.cfg | 1 - .../quests/406_PathToElvenKnight/30317-01.htm | 4 - .../quests/406_PathToElvenKnight/30317-02.htm | 4 - .../quests/406_PathToElvenKnight/30317-03.htm | 4 - .../quests/406_PathToElvenKnight/30327-03.htm | 3 - .../quests/406_PathToElvenKnight/30327-04.htm | 3 - .../quests/406_PathToElvenKnight/30327-08.htm | 3 - .../quests/406_PathToElvenKnight/30327-09.htm | 4 - .../quests/406_PathToElvenKnight/30327-10.htm | 4 - .../quests/406_PathToElvenKnight/__init__.py | 165 ----------- .../Q00406_PathOfTheElvenKnight/30317-01.html | 4 + .../Q00406_PathOfTheElvenKnight/30317-02.html | 4 + .../Q00406_PathOfTheElvenKnight/30317-03.html | 4 + .../30317-04.html} | 2 +- .../30317-05.html} | 8 +- .../30317-06.html} | 2 +- .../30327-01.htm | 4 +- .../30327-02.htm | 2 +- .../30327-02a.htm | 2 +- .../Q00406_PathOfTheElvenKnight/30327-03.htm | 4 + .../Q00406_PathOfTheElvenKnight/30327-04.htm | 3 + .../30327-05.htm | 4 +- .../30327-06.htm | 4 +- .../30327-07.html} | 0 .../Q00406_PathOfTheElvenKnight/30327-08.html | 3 + .../Q00406_PathOfTheElvenKnight/30327-09.html | 4 + .../Q00406_PathOfTheElvenKnight/30327-10.html | 4 + .../30327-11.html} | 2 +- .../Q00406_PathOfTheElvenKnight.java | 277 ++++++++++++++++++ .../scripts/quests/QuestMasterHandler.java | 2 + .../dist/sql/game/updates/20140821update.sql | 1 + 31 files changed, 325 insertions(+), 210 deletions(-) delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30317-01.htm delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30317-02.htm delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30317-03.htm delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30327-03.htm delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30327-04.htm delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30327-08.htm delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30327-09.htm delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30327-10.htm delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/__init__.py create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30317-01.html create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30317-02.html create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30317-03.html rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{406_PathToElvenKnight/30317-04.htm => Q00406_PathOfTheElvenKnight/30317-04.html} (88%) rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{406_PathToElvenKnight/30317-05.htm => Q00406_PathOfTheElvenKnight/30317-05.html} (68%) rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{406_PathToElvenKnight/30317-06.htm => Q00406_PathOfTheElvenKnight/30317-06.html} (89%) rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{406_PathToElvenKnight => Q00406_PathOfTheElvenKnight}/30327-01.htm (76%) rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{406_PathToElvenKnight => Q00406_PathOfTheElvenKnight}/30327-02.htm (88%) rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{406_PathToElvenKnight => Q00406_PathOfTheElvenKnight}/30327-02a.htm (90%) create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30327-03.htm create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30327-04.htm rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{406_PathToElvenKnight => Q00406_PathOfTheElvenKnight}/30327-05.htm (84%) rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{406_PathToElvenKnight => Q00406_PathOfTheElvenKnight}/30327-06.htm (79%) rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{406_PathToElvenKnight/30327-07.htm => Q00406_PathOfTheElvenKnight/30327-07.html} (100%) create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30327-08.html create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30327-09.html create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30327-10.html rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{406_PathToElvenKnight/30327-11.htm => Q00406_PathOfTheElvenKnight/30327-11.html} (90%) create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/Q00406_PathOfTheElvenKnight.java create mode 100644 L2J_DataPack_BETA/dist/sql/game/updates/20140821update.sql diff --git a/L2J_DataPack_BETA/dist/game/data/scripts.cfg b/L2J_DataPack_BETA/dist/game/data/scripts.cfg index 0a66828e6c..d3a0242a1a 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts.cfg +++ b/L2J_DataPack_BETA/dist/game/data/scripts.cfg @@ -266,7 +266,6 @@ quests/379_FantasyWine/__init__.py quests/383_SearchingForTreasure/__init__.py quests/384_WarehouseKeepersPastime/__init__.py quests/386_StolenDignity/__init__.py -quests/406_PathToElvenKnight/__init__.py quests/408_PathToElvenwizard/__init__.py quests/409_PathToOracle/__init__.py quests/410_PathToPalusKnight/__init__.py diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30317-01.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30317-01.htm deleted file mode 100644 index e8232b9dd3..0000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30317-01.htm +++ /dev/null @@ -1,4 +0,0 @@ -<html><body>Blacksmith Kluto:<br> -Oh ho, so you want to be an Elven Knight? Of course, I know how to make the brooch. However, nothing in this world is free ... If you want the Elven Knight brooch, you must first do me a service.<br> -<a action="bypass -h Quest 406_PathToElvenKnight 30317-02.htm">Ask about the favor</a> -</body></html> diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30317-02.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30317-02.htm deleted file mode 100644 index 7b6207f93c..0000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30317-02.htm +++ /dev/null @@ -1,4 +0,0 @@ -<html><body>Blacksmith Kluto:<br> -East of here, there is a camp of the ol mahums. They are indeed ferocious scoundrels. Their trainees come out to the outskirts of the camp, and I want you to get rid of them. You need not know the reason.<br> -There will be about twenty of them. Hmm ... I would have to know whether or not you really killed all twenty. If you bring me<font color="LEVEL"> twenty of the jewels that the Ol mahums carry with them, I will accommodate you</font>. I'll give you this so you do not forget. Now, off you go! -</body></html> diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30317-03.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30317-03.htm deleted file mode 100644 index ef28c5bdf5..0000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30317-03.htm +++ /dev/null @@ -1,4 +0,0 @@ -<html><body>Blacksmith Kluto:<br> -Why have you returned so early? Were you afraid? They are only ol mahum rookies ... You are quite a timid fellow.<br> -If I may give you a piece of advice, don't go deep into the camp. If the ol mahum come upon you in a group, with your skills you'd never be able to deal with them. Do you understand what I'm saying? Well, be off now! -</body></html> diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30327-03.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30327-03.htm deleted file mode 100644 index 7f0b1a8490..0000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30327-03.htm +++ /dev/null @@ -1,3 +0,0 @@ -<html><body>Master Sorius:<br> -However, you do not have enough experience. I feel that your movements and steps are not enough to study the skills of a higher level. Be patient and train yourself. Your eyes are filled with passion and faith. I will wait for that time. -</body></html> diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30327-04.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30327-04.htm deleted file mode 100644 index f0ba4330a2..0000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30327-04.htm +++ /dev/null @@ -1,3 +0,0 @@ -<html><body>Master Sorius:<br> -I see you have the<font color="LEVEL"> Elven Knight brooch</font>. Take the brooch and go to<font color="LEVEL"> Grand Master Ramos</font>. Then he will change your profession to Elven Knight. -</body></html> diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30327-08.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30327-08.htm deleted file mode 100644 index 20d239669f..0000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30327-08.htm +++ /dev/null @@ -1,3 +0,0 @@ -<html><body>Master Sorius:<br> -It is still not enough. You must have<font color="LEVEL"> 20 topaz pieces</font>. May the divine blessing of Einhasad and Eva be with you. -</body></html> diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30327-09.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30327-09.htm deleted file mode 100644 index bac906543d..0000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30327-09.htm +++ /dev/null @@ -1,4 +0,0 @@ -<html><body>Master Sorius:<br> -Congratulations. You have safely completed the test. The topaz that you brought will be used to make the Elven Knight brooch, symbol of the Elven Knights. With this, you can prove your skills openly to the grandmaster.<br> -However, the topaz piece is not enough to complete the Elven Knight brooch. Take this letter and go to<font color="LEVEL"> Blacksmith Kluto of the village of Gludin</font>. He will tell you how to make these jewels into an Elven Knight brooch. If you don't know how to go to Gludin, ask Guard Praga.<br> -</body></html> diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30327-10.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30327-10.htm deleted file mode 100644 index ff8712f419..0000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30327-10.htm +++ /dev/null @@ -1,4 +0,0 @@ -<html><body>Master Sorius:<br> -I see you have safely passed Kluto's test. Congratulations. You have proved through this test that you have the ability to not be timid, but to show the courage of an Elven Knight. This brooch is made of materials collected by other Elves who have gone through the Test of the Elven Knight before you. Thus, we are continuing the brilliant tradition of the Elven race in the circle of fate where we receive from our ancestors and pass on to our future generations.<br> -You can change your profession to Elven Knight when you give this brooch to<font color="LEVEL"> Grand Master Rains</font> of the Fighters Guild. Well then, until the next time we meet, may the protection of Eva be with you! -</body></html> diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/__init__.py b/L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/__init__.py deleted file mode 100644 index 36302e1f9d..0000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/__init__.py +++ /dev/null @@ -1,165 +0,0 @@ -# Made by Mr. - Version 0.3 by kmarty and DrLecter -# Shadow Weapon Coupons contributed by BiTi for the Official L2J Datapack Project -# Visit http://www.l2jdp.com/forum/ for more details -import sys -from com.l2jserver.gameserver.model.quest import State -from com.l2jserver.gameserver.model.quest import QuestState -from com.l2jserver.gameserver.model.quest import Quest as JQuest -from com.l2jserver.gameserver.network.serverpackets import SocialAction - -qn = "406_PathToElvenKnight" - -SORIUS_LETTER1 = 1202 -KLUTO_BOX = 1203 -ELVEN_KNIGHT_BROOCH = 1204 -TOPAZ_PIECE = 1205 -EMERALD_PIECE = 1206 -KLUTO_MEMO = 1276 - -class Quest (JQuest) : - - def __init__(self,id,name,descr): - JQuest.__init__(self,id,name,descr) - self.questItemIds = [SORIUS_LETTER1, EMERALD_PIECE, TOPAZ_PIECE, KLUTO_MEMO, KLUTO_BOX] - - def onEvent (self,event,st) : - htmltext = event - player = st.getPlayer() - if event == "30327-05.htm" : - if player.getClassId().getId() != 0x12 : - if player.getClassId().getId() == 0x13 : - htmltext = "30327-02a.htm" - else: - htmltext = "30327-02.htm" - st.exitQuest(1) - else: - if player.getLevel()<18 : - htmltext = "30327-03.htm" - st.exitQuest(1) - else: - if st.getQuestItemsCount(ELVEN_KNIGHT_BROOCH) : - htmltext = "30327-04.htm" - elif event == "30327-06.htm" : - st.set("cond","1") - st.setState(State.STARTED) - st.playSound("ItemSound.quest_accept") - elif event == "30317-02.htm" : - if st.getInt("cond") == 3 : - st.takeItems(SORIUS_LETTER1,-1) - if st.getQuestItemsCount(KLUTO_MEMO) == 0 : - st.giveItems(KLUTO_MEMO,1) - st.set("cond","4") - else : - htmltext = Quest.getNoQuestMsg(player) - else : - htmltext = Quest.getNoQuestMsg(player) - return htmltext - - def onTalk (self,npc,player): - htmltext = Quest.getNoQuestMsg(player) - st = player.getQuestState(qn) - if not st : return htmltext - - npcId = npc.getId() - id = st.getState() - if npcId != 30327 and id != State.STARTED : return htmltext - - if id == State.CREATED : - st.set("cond","0") - cond=0 - else : - cond=st.getInt("cond") - if npcId == 30327 : - if cond == 0 : - htmltext = "30327-01.htm" - elif cond == 1 : - if st.getQuestItemsCount(TOPAZ_PIECE)==0 : - htmltext = "30327-07.htm" - else: - htmltext = "30327-08.htm" - elif cond == 2 : - if st.getQuestItemsCount(SORIUS_LETTER1) == 0 : - st.giveItems(SORIUS_LETTER1,1) - st.set("cond","3") - htmltext = "30327-09.htm" - elif cond in [3, 4, 5] : - htmltext = "30327-11.htm" - elif cond == 6 : - st.takeItems(KLUTO_BOX,-1) - isFinished = st.getGlobalQuestVar("1ClassQuestFinished") - if isFinished == "" : - if player.getLevel() >= 20 : - st.addExpAndSp(320534, 23152) - elif player.getLevel() == 19 : - st.addExpAndSp(456128, 29850) - else: - st.addExpAndSp(591724, 33328) - st.giveItems(57, 163800) - player.sendPacket(SocialAction(player.getObjectId(),3)) - st.set("cond","0") - st.exitQuest(False) - st.playSound("ItemSound.quest_finish") - st.saveGlobalQuestVar("1ClassQuestFinished","1") - if st.getQuestItemsCount(ELVEN_KNIGHT_BROOCH) == 0 : - st.giveItems(ELVEN_KNIGHT_BROOCH,1) - htmltext = "30327-10.htm" - elif npcId == 30317 : - if cond == 3 : - htmltext = "30317-01.htm" - elif cond == 4 : - if st.getQuestItemsCount(EMERALD_PIECE)==0 : - htmltext = "30317-03.htm" - else: - htmltext = "30317-04.htm" - elif cond == 5 : - st.takeItems(EMERALD_PIECE,-1) - st.takeItems(TOPAZ_PIECE,-1) - if st.getQuestItemsCount(KLUTO_BOX) == 0 : - st.giveItems(KLUTO_BOX,1) - st.takeItems(KLUTO_MEMO,-1) - st.set("cond","6") - htmltext = "30317-05.htm" - elif cond == 6 : - htmltext = "30317-06.htm" - return htmltext - - def onKill(self,npc,player,isPet): - st = player.getQuestState(qn) - if not st : return - if st.getState() != State.STARTED : return - - npcId = npc.getId() - if npcId != 20782 : - if st.getInt("cond")==1 and st.getQuestItemsCount(TOPAZ_PIECE)<20 and self.getRandom(100)<70 : - st.giveItems(TOPAZ_PIECE,1) - if st.getQuestItemsCount(TOPAZ_PIECE) == 20 : - st.playSound("ItemSound.quest_middle") - st.set("cond","2") - else: - st.playSound("ItemSound.quest_itemget") - else : - if st.getInt("cond")==4 and st.getQuestItemsCount(EMERALD_PIECE)<20 and self.getRandom(100)<50 : - st.giveItems(EMERALD_PIECE,1) - if st.getQuestItemsCount(EMERALD_PIECE) == 20 : - st.playSound("ItemSound.quest_middle") - st.set("cond","5") - else: - st.playSound("ItemSound.quest_itemget") - return - -QUEST = Quest(406,qn,"Path of the Elven Knight") - -QUEST.addStartNpc(30327) - -QUEST.addTalkId(30327) - -QUEST.addTalkId(30317) -QUEST.addTalkId(30327) - -QUEST.addKillId(20035) -QUEST.addKillId(20042) -QUEST.addKillId(20045) -QUEST.addKillId(20051) -QUEST.addKillId(20054) -QUEST.addKillId(20060) -QUEST.addKillId(20782) \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30317-01.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30317-01.html new file mode 100644 index 0000000000..854782867f --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30317-01.html @@ -0,0 +1,4 @@ +<html><body>Blacksmith Kluto:<br> +Oh ho, so you want to be an Elven Knight? Of course, I know how to make the brooch. However, nothing in this world is free ... If you want the Elven Knight Brooch, you must first do me a service.<br> +<a action="bypass -h Quest Q00406_PathOfTheElvenKnight 30317-02.html">Ask about the favor</a> +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30317-02.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30317-02.html new file mode 100644 index 0000000000..c2c4e91334 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30317-02.html @@ -0,0 +1,4 @@ +<html><body>Blacksmith Kluto:<br> +East of here, there is a camp of the Ol Mahums. They are indeed ferocious scoundrels. Their trainees come out to the southeast of the Abandoned Camp, and I want you to get rid of them. You need not know the reason.<br> +There will be about twenty of them. Hmm ... I would have to know whether or not you really killed all twenty. If you bring me <font color="LEVEL">twenty of the jewels that the Ol Mahums carry with them, I will accommodate you</font>. I'll give you this so you do not forget. Now, off you go! +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30317-03.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30317-03.html new file mode 100644 index 0000000000..ec90c14531 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30317-03.html @@ -0,0 +1,4 @@ +<html><body>Blacksmith Kluto:<br> +Why have you returned so early? Were you afraid? They are only Ol Mahum Novices... You are quite timid.<br> +If I may give you a piece of advice, don't go deep into the camp. If the Ol Mahum come upon you in a group, with your skills you'd never be able to deal with them. Do you understand what I'm saying? Well, be off now! +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30317-04.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30317-04.html similarity index 88% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30317-04.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30317-04.html index 0a064c4fef..efb3b3d098 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30317-04.htm +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30317-04.html @@ -1,3 +1,3 @@ <html><body>Blacksmith Kluto:<br> Did I not tell you to bring twenty jewels? I cannot accommodate you even if you are only one short. -</body></html> +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30317-05.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30317-05.html similarity index 68% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30317-05.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30317-05.html index aea3c5aad3..4302da1230 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30317-05.htm +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30317-05.html @@ -1,5 +1,5 @@ <html><body>Blacksmith Kluto:<br> -Amazing! To be frank, I wasn't expecting much out of you. Indeed, Master Sorius knows a good candidate. To tell the truth, bringing back the emeralds was also part of the test. Since Sorius saved my life long ago, I have been assisting him in testing young Elven Fighters. When we have some time, I will tell you how Sorius saved me from the Orcs.<br> -Give me the topaz pieces and emerald pieces. These jewels will be used as materials to make the brooches for the next youngsters who qualify to become Elven Knights. Your brooch has already been made from the jewels collected by those that took the test before you.<br> -Now take this box. In it is the completed Elven Knight brooch. Take this to<font color="LEVEL"> Master Sorius</font> and he will conduct the official presentation. You have rightfully earned it. -</body></html> +Amazing! To be frank, I wasn't expecting much out of you. Indeed, Master Sorius knows a good candidate. To tell the truth, bringing back the Emeralds was also part of the test. Since Sorius saved my life long ago, I have been assisting him in testing young Elven Fighters. When we have some time, I will tell you how Sorius saved me from the Orcs.<br> +Give me the Topaz Pieces and Emerald Pieces. These jewels will be used as materials to make the brooches for the next youngsters who qualify to become Elven Knights. Your brooch has already been made from the jewels collected by those that took the test before you.<br> +Now take this box. In it is the completed Elven Knight Brooch. Take this to <font color="LEVEL">Master Sorius</font> and he will conduct the official presentation. You have rightfully earned it. +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30317-06.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30317-06.html similarity index 89% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30317-06.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30317-06.html index d4685f4514..daa3b615a4 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30317-06.htm +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30317-06.html @@ -1,3 +1,3 @@ <html><body>Blacksmith Kluto:<br> Have you not gone yet? Aren't you eager to begin your career as an Elven Knight. Get along now to Master Sorius! -</body></html> +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30327-01.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30327-01.htm similarity index 76% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30327-01.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30327-01.htm index d061c234d2..eea7f50f83 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30327-01.htm +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30327-01.htm @@ -1,4 +1,4 @@ <html><body>Master Sorius:<br> Greetings, child in search of the training of the sword. When I look at the new candidates like yourself that seek me, I am sure that the long tradition of our Elven race is being continued.<br> -<a action="bypass -h Quest 406_PathToElvenKnight 30327-05.htm">Say you want to be an Elven Knight</a> -</body></html> +<a action="bypass -h Quest Q00406_PathOfTheElvenKnight ACCEPT">Say you want to be an Elven Knight</a> +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30327-02.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30327-02.htm similarity index 88% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30327-02.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30327-02.htm index b49e9cead5..dfa0f89c89 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30327-02.htm +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30327-02.htm @@ -1,3 +1,3 @@ <html><body>Sorius:<br> Haven't you already chosen the path that you must take? Train yourself more before aspiring to a higher level. -</body></html> +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30327-02a.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30327-02a.htm similarity index 90% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30327-02a.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30327-02a.htm index 08e58991a9..7d3d1e2653 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30327-02a.htm +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30327-02a.htm @@ -1,3 +1,3 @@ <html><body>Sorius:<br> You are already walking the path of an Elven Knight. Train yourself more before proceeding to a higher level. May the starlight guide you. -</body></html> +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30327-03.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30327-03.htm new file mode 100644 index 0000000000..71158df07b --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30327-03.htm @@ -0,0 +1,4 @@ +<html><body>Master Sorius:<br> +Ah, it seems that you are still inexperienced. Just from watching your footwork and movements, I can tell that you are not ready to learn the skills I teach. Be patient and keep training. I see in your eyes that you have the passion and conviction to succeed. I will look forward to training you when you are truly ready!<br> +(Only characters level 18 and above may undertake this quest.) +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30327-04.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30327-04.htm new file mode 100644 index 0000000000..e1c6a78061 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30327-04.htm @@ -0,0 +1,3 @@ +<html><body>Master Sorius:<br> +I see you have the <font color="LEVEL">Elven Knight Brooch</font>. Take the brooch and go to <font color="LEVEL">Grand Master Rains</font>. Then he will change your profession to Elven Knight. +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30327-05.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30327-05.htm similarity index 84% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30327-05.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30327-05.htm index 53086c22d3..97417ccc10 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30327-05.htm +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30327-05.htm @@ -1,5 +1,5 @@ <html><body>Master Sorius:<br> Elven Knights choose the path of the sword over archery, both of which were developed by our race for thousands of years. These days, many Elven Knights enter the Human world to practice the will of Einhasad and Eva, even though they were originally created to protect the Mother Trees from invaders.<br> We must test your skills to see if you have what it takes to become an Elven Knight. This is a test to judge your skills, but I am sure one of your level will pass with no particular difficulties. What do you say? Will you assume the challenge of the test?<br> -<a action="bypass -h Quest 406_PathToElvenKnight 30327-06.htm">Challenge the test</a> -</body></html> +<a action="bypass -h Quest Q00406_PathOfTheElvenKnight 30327-06.htm">Challenge the test</a> +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30327-06.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30327-06.htm similarity index 79% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30327-06.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30327-06.htm index f775b93628..ea8a5f1782 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30327-06.htm +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30327-06.htm @@ -1,5 +1,5 @@ <html><body>Master Sorius:<br> -There is a place called the<font color="LEVEL"> Ruins of Agony</font> in the war-devastated area at the northern part of Gludio. Cruel and violent undead skeletons and the spartoi are disturbing and harming innocent people who travel near there. Elven Knights follow the teachings of Einhasad and Eva. There is no better place than the Ruins of Agony where an Elven Knight can perform his or her duty. If you don't know how to go to the Ruins of Agony, ask Guard Babenco.<br> -Please go to the Ruins of Agony and hunt<font color="LEVEL"> skeletons and spartoi</font>. If you defeat the undead, you will be able to get some<font color="LEVEL"> topaz pieces</font>. You must bring back twenty of these jewels. Also, you must be extra careful because those undead can help each other.<br> +There is a place called the <font color="LEVEL">Ruins of Agony</font> in the war-devastated area at the northern part of Gludio. Cruel and violent undead skeletons and the spartoi are disturbing and harming innocent people who travel near there. Elven Knights follow the teachings of Einhasad and Eva. There is no better place than the Ruins of Agony where an Elven Knight can perform his or her duty. If you don't know how to go to the Ruins of Agony, ask Guard Babenco.<br> +Please go to the Ruins of Agony and hunt <font color="LEVEL">skeletons and spartoi</font>. If you defeat the undead, you will be able to get some <font color="LEVEL">Topaz Pieces</font>. You must bring back twenty of these jewels. Also, you must be extra careful because those undead can help each other.<br> This is your first test. Now, it's time to test your talent. I will pray for you to distinguish yourself in war. </body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30327-07.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30327-07.html similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30327-07.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30327-07.html diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30327-08.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30327-08.html new file mode 100644 index 0000000000..4dc9271122 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30327-08.html @@ -0,0 +1,3 @@ +<html><body>Master Sorius:<br> +It is still not enough. You must have <font color="LEVEL">20 Topaz Pieces</font>. May the divine blessing of Einhasad and Eva be with you. +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30327-09.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30327-09.html new file mode 100644 index 0000000000..346fc42c99 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30327-09.html @@ -0,0 +1,4 @@ +<html><body>Master Sorius:<br> +Congratulations. You safely completed the test. The topaz you brought back will be used as an ingredient for the "Elven Knight Brooch.", which will be proof of your skill, enough that you can then present yourself to a grand master.<br> +But the "Elven Knight Brooch" cannot be completed with just the topaz fragment. Take this letter and go see <font color="LEVEL">Blacksmith Kluto in Gludin Castle Town.</font> He will tell you how to make the "Elven Knight Brooch" with these jewels. If you don't know the way to Gludin Castle Town, go ask Guard Praga.<br> +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30327-10.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30327-10.html new file mode 100644 index 0000000000..fb3381f12c --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30327-10.html @@ -0,0 +1,4 @@ +<html><body>Master Sorius:<br> +I see you have safely passed Kluto's test. Congratulations! You have proven that you have the courage to become an Elven Knight. This brooch is made of materials collected by other Elves who have gone through this same test. Another brilliant tradition of the Elven race is passed on to future generations!<br> +If you wish to change your profession to Elven Knight, give this brooch to <font color="LEVEL">Grand Master Rains</font>. Until we meet again, may the protection of Eva be with you! +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30327-11.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30327-11.html similarity index 90% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30327-11.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30327-11.html index f252d71799..4693473801 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/406_PathToElvenKnight/30327-11.htm +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/30327-11.html @@ -1,3 +1,3 @@ <html><body>Master Sorius:<br> You haven't found Kluto yet? You can meet Kluto at the blacksmith's shop in Gludin. If you don't know how to get to Gludin, ask Guard Praga. -</body></html> +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/Q00406_PathOfTheElvenKnight.java b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/Q00406_PathOfTheElvenKnight.java new file mode 100644 index 0000000000..1b9d097198 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00406_PathOfTheElvenKnight/Q00406_PathOfTheElvenKnight.java @@ -0,0 +1,277 @@ +/* + * Copyright (C) 2004-2014 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.Q00406_PathOfTheElvenKnight; + +import java.util.HashMap; +import java.util.Map; + +import com.l2jserver.gameserver.enums.QuestSound; +import com.l2jserver.gameserver.model.actor.L2Npc; +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.base.ClassId; +import com.l2jserver.gameserver.model.holders.ItemChanceHolder; +import com.l2jserver.gameserver.model.quest.Quest; +import com.l2jserver.gameserver.model.quest.QuestState; +import com.l2jserver.gameserver.network.serverpackets.SocialAction; +import com.l2jserver.gameserver.util.Util; + +/** + * Path Of The Elven Knight (406) + * @author ivantotov + */ +public final class Q00406_PathOfTheElvenKnight extends Quest +{ + // NPCs + private static final int BLACKSMITH_KLUTO = 30317; + private static final int MASTER_SORIUS = 30327; + // Items + private static final int SORIUS_LETTER = 1202; + private static final int KLUTO_BOX = 1203; + private static final int TOPAZ_PIECE = 1205; + private static final int EMERALD_PIECE = 1206; + private static final int KLUTO_MEMO = 1276; + // Reward + private static final int ELVEN_KNIGHT_BROOCH = 1204; + // Misc + private static final int MIN_LEVEL = 18; + // Mobs + private static final int OL_MAHUM_NOVICE = 20782; + private static final Map<Integer, ItemChanceHolder> MONSTER_DROPS = new HashMap<>(); + static + { + MONSTER_DROPS.put(20035, new ItemChanceHolder(TOPAZ_PIECE, 70)); // Tracker Skeleton + MONSTER_DROPS.put(20042, new ItemChanceHolder(TOPAZ_PIECE, 70)); // Tracker Skeleton Leader + MONSTER_DROPS.put(20045, new ItemChanceHolder(TOPAZ_PIECE, 70)); // Skeleton Scout + MONSTER_DROPS.put(20051, new ItemChanceHolder(TOPAZ_PIECE, 70)); // Skeleton Bowman + MONSTER_DROPS.put(20054, new ItemChanceHolder(TOPAZ_PIECE, 70)); // Ruin Spartoi + MONSTER_DROPS.put(20060, new ItemChanceHolder(TOPAZ_PIECE, 70)); // Salamander Noble + MONSTER_DROPS.put(OL_MAHUM_NOVICE, new ItemChanceHolder(EMERALD_PIECE, 50)); // Ol Mahum Novice + } + + public Q00406_PathOfTheElvenKnight() + { + super(406, Q00406_PathOfTheElvenKnight.class.getSimpleName(), "Path Of The Elven Knight"); + addStartNpc(MASTER_SORIUS); + addTalkId(MASTER_SORIUS, BLACKSMITH_KLUTO); + addKillId(MONSTER_DROPS.keySet()); + registerQuestItems(SORIUS_LETTER, KLUTO_BOX, TOPAZ_PIECE, EMERALD_PIECE, KLUTO_MEMO); + } + + @Override + public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) + { + final QuestState qs = getQuestState(player, false); + if (qs == null) + { + return null; + } + + String htmltext = null; + switch (event) + { + case "ACCEPT": + { + if (player.getClassId() != ClassId.elvenFighter) + { + if (player.getClassId() == ClassId.elvenKnight) + { + htmltext = "30327-02a.htm"; + } + else + { + htmltext = "30327-02.htm"; + } + } + else if (player.getLevel() < MIN_LEVEL) + { + htmltext = "30327-03.htm"; + } + else if (hasQuestItems(player, ELVEN_KNIGHT_BROOCH)) + { + htmltext = "30327-04.htm"; + } + else + { + htmltext = "30327-05.htm"; + } + break; + } + case "30327-06.htm": + { + qs.startQuest(); + htmltext = event; + break; + } + case "30317-02.html": + { + takeItems(player, SORIUS_LETTER, 1); + if (!hasQuestItems(player, KLUTO_MEMO)) + { + giveItems(player, KLUTO_MEMO, 1); + } + qs.setCond(4, true); + htmltext = event; + break; + } + } + return htmltext; + } + + @Override + public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon) + { + final QuestState qs = killer.getQuestState(getName()); + final ItemChanceHolder reward = MONSTER_DROPS.get(npc.getId()); + int requiredItemId = KLUTO_BOX; + int cond = 2; + boolean check = !hasQuestItems(killer, requiredItemId); + if (npc.getId() == OL_MAHUM_NOVICE) + { + requiredItemId = KLUTO_MEMO; + cond = 5; + check = hasQuestItems(killer, requiredItemId); + } + + if ((qs != null) && qs.isStarted() && Util.checkIfInRange(1500, npc, killer, false)) + { + if (check && (getQuestItemsCount(killer, reward.getId()) < 20) && (getRandom(100) < reward.getChance())) + { + giveItems(killer, reward); + if (getQuestItemsCount(killer, reward.getId()) == 20) + { + qs.setCond(cond, true); + } + else + { + playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET); + } + } + } + return super.onKill(npc, killer, isSummon); + } + + @Override + public String onTalk(L2Npc npc, L2PcInstance player) + { + final QuestState qs = getQuestState(player, true); + String htmltext = getNoQuestMsg(player); + if (qs.isCreated() || qs.isCompleted()) + { + if (npc.getId() == MASTER_SORIUS) + { + htmltext = "30327-01.htm"; + } + } + else if (qs.isStarted()) + { + switch (npc.getId()) + { + case MASTER_SORIUS: + { + if (!hasQuestItems(player, KLUTO_BOX)) + { + if (!hasQuestItems(player, TOPAZ_PIECE)) + { + htmltext = "30327-07.html"; + } + else if (hasQuestItems(player, TOPAZ_PIECE) && (getQuestItemsCount(player, TOPAZ_PIECE) < 20)) + { + htmltext = "30327-08.html"; + } + else if (!hasAtLeastOneQuestItem(player, KLUTO_MEMO, SORIUS_LETTER) && (getQuestItemsCount(player, TOPAZ_PIECE) >= 20)) + { + if (!hasQuestItems(player, SORIUS_LETTER)) + { + giveItems(player, SORIUS_LETTER, 1); + } + qs.setCond(3, true); + htmltext = "30327-09.html"; + } + else if ((getQuestItemsCount(player, TOPAZ_PIECE) >= 20) && hasAtLeastOneQuestItem(player, SORIUS_LETTER, KLUTO_MEMO)) + { + htmltext = "30327-11.html"; + } + } + else + { + giveAdena(player, 163800, true); + if (!hasQuestItems(player, ELVEN_KNIGHT_BROOCH)) + { + giveItems(player, ELVEN_KNIGHT_BROOCH, 1); + } + final int level = player.getLevel(); + if (level >= 20) + { + addExpAndSp(player, 320534, 23152); + } + else if (level == 19) + { + addExpAndSp(player, 456128, 29850); + } + else + { + addExpAndSp(player, 591724, 33328); + } + qs.exitQuest(false, true); + player.sendPacket(new SocialAction(player.getObjectId(), 3)); + qs.saveGlobalQuestVar("1ClassQuestFinished", "1"); + htmltext = "30327-10.html"; + } + break; + } + case BLACKSMITH_KLUTO: + { + if (!hasQuestItems(player, KLUTO_BOX)) + { + if (hasQuestItems(player, SORIUS_LETTER) && (getQuestItemsCount(player, TOPAZ_PIECE) >= 20)) + { + htmltext = "30317-01.html"; + } + else if (!hasQuestItems(player, EMERALD_PIECE) && hasQuestItems(player, KLUTO_MEMO) && (getQuestItemsCount(player, TOPAZ_PIECE) >= 20)) + { + htmltext = "30317-03.html"; + } + else if (hasQuestItems(player, KLUTO_MEMO, EMERALD_PIECE) && (getQuestItemsCount(player, TOPAZ_PIECE) >= 20) && (getQuestItemsCount(player, EMERALD_PIECE) < 20)) + { + htmltext = "30317-04.html"; + } + else if (hasQuestItems(player, KLUTO_MEMO) && (getQuestItemsCount(player, TOPAZ_PIECE) >= 20) && (getQuestItemsCount(player, EMERALD_PIECE) >= 20)) + { + if (!hasQuestItems(player, KLUTO_BOX)) + { + giveItems(player, KLUTO_BOX, 1); + } + takeItems(player, TOPAZ_PIECE, -1); + takeItems(player, EMERALD_PIECE, -1); + takeItems(player, KLUTO_MEMO, 1); + qs.setCond(6, true); + htmltext = "30317-05.html"; + } + } + else if (hasQuestItems(player, KLUTO_BOX)) + { + htmltext = "30317-06.html"; + } + break; + } + } + } + return htmltext; + } +} \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/QuestMasterHandler.java b/L2J_DataPack_BETA/dist/game/data/scripts/quests/QuestMasterHandler.java index a397d5263e..fcf5041181 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/QuestMasterHandler.java +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/QuestMasterHandler.java @@ -259,6 +259,7 @@ import quests.Q00402_PathOfTheHumanKnight.Q00402_PathOfTheHumanKnight; import quests.Q00403_PathOfTheRogue.Q00403_PathOfTheRogue; import quests.Q00404_PathOfTheHumanWizard.Q00404_PathOfTheHumanWizard; import quests.Q00405_PathOfTheCleric.Q00405_PathOfTheCleric; +import quests.Q00406_PathOfTheElvenKnight.Q00406_PathOfTheElvenKnight; import quests.Q00407_PathOfTheElvenScout.Q00407_PathOfTheElvenScout; import quests.Q00416_PathOfTheOrcShaman.Q00416_PathOfTheOrcShaman; import quests.Q00420_LittleWing.Q00420_LittleWing; @@ -635,6 +636,7 @@ public class QuestMasterHandler Q00403_PathOfTheRogue.class, Q00404_PathOfTheHumanWizard.class, Q00405_PathOfTheCleric.class, + Q00406_PathOfTheElvenKnight.class, Q00407_PathOfTheElvenScout.class, Q00416_PathOfTheOrcShaman.class, Q00420_LittleWing.class, diff --git a/L2J_DataPack_BETA/dist/sql/game/updates/20140821update.sql b/L2J_DataPack_BETA/dist/sql/game/updates/20140821update.sql new file mode 100644 index 0000000000..8230bb001b --- /dev/null +++ b/L2J_DataPack_BETA/dist/sql/game/updates/20140821update.sql @@ -0,0 +1 @@ +UPDATE character_quests SET name='406_PathToElvenKnight' WHERE name='Q00406_PathOfTheElvenKnight'; \ No newline at end of file -- GitLab