From 7459f5bce60b928c4e7dd45d729ed415bbc93c22 Mon Sep 17 00:00:00 2001 From: malyelfik <malyelfik@users.noreply.github.com> Date: Sat, 20 Apr 2013 17:30:30 +0000 Subject: [PATCH] BETA: '''Vanquish Remnants''' (326) in Java Patch by: xban1x Reviewed by: jurchiks, !UnAfraid, malyelfik Tested by: sirrion --- L2J_DataPack_BETA/dist/game/data/scripts.cfg | 2 +- .../quests/326_VanquishRemnants/30435-01.htm | 6 - .../quests/326_VanquishRemnants/30435-03.htm | 6 - .../quests/326_VanquishRemnants/30435-04.htm | 7 - .../quests/326_VanquishRemnants/__init__.py | 101 ----------- .../Q00326_VanquishRemnants/30435-01.htm | 5 + .../30435-02.htm | 10 +- .../Q00326_VanquishRemnants/30435-03.htm | 6 + .../Q00326_VanquishRemnants/30435-04.html | 7 + .../30435-05.html} | 4 +- .../30435-06.html} | 4 +- .../30435-07.html} | 0 .../30435-08.html} | 0 .../30435-09.html} | 4 +- .../Q00326_VanquishRemnants.java | 159 ++++++++++++++++++ .../dist/sql/game/updates/20130420update.sql | 1 + 16 files changed, 190 insertions(+), 132 deletions(-) delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/326_VanquishRemnants/30435-01.htm delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/326_VanquishRemnants/30435-03.htm delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/326_VanquishRemnants/30435-04.htm delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/326_VanquishRemnants/__init__.py create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00326_VanquishRemnants/30435-01.htm rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{326_VanquishRemnants => Q00326_VanquishRemnants}/30435-02.htm (66%) create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00326_VanquishRemnants/30435-03.htm create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00326_VanquishRemnants/30435-04.html rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{326_VanquishRemnants/30435-05.htm => Q00326_VanquishRemnants/30435-05.html} (69%) rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{326_VanquishRemnants/30435-06.htm => Q00326_VanquishRemnants/30435-06.html} (78%) rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{326_VanquishRemnants/30435-07.htm => Q00326_VanquishRemnants/30435-07.html} (100%) rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{326_VanquishRemnants/30435-08.htm => Q00326_VanquishRemnants/30435-08.html} (100%) rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{326_VanquishRemnants/30435-09.htm => Q00326_VanquishRemnants/30435-09.html} (76%) create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00326_VanquishRemnants/Q00326_VanquishRemnants.java create mode 100644 L2J_DataPack_BETA/dist/sql/game/updates/20130420update.sql diff --git a/L2J_DataPack_BETA/dist/game/data/scripts.cfg b/L2J_DataPack_BETA/dist/game/data/scripts.cfg index 06049fdbbc..93923a105a 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts.cfg +++ b/L2J_DataPack_BETA/dist/game/data/scripts.cfg @@ -549,7 +549,7 @@ quests/319_ScentOfDeath/__init__.py quests/320_BonesTellFuture/__init__.py quests/Q00324_SweetestVenom/Q00324_SweetestVenom.java quests/325_GrimCollector/__init__.py -quests/326_VanquishRemnants/__init__.py +quests/Q00326_VanquishRemnants/Q00326_VanquishRemnants.java quests/327_ReclaimTheLand/__init__.py quests/Q00328_SenseForBusiness/Q00328_SenseForBusiness.java quests/329_CuriosityOfDwarf/__init__.py diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/326_VanquishRemnants/30435-01.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/326_VanquishRemnants/30435-01.htm deleted file mode 100644 index 0adcffd868..0000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/326_VanquishRemnants/30435-01.htm +++ /dev/null @@ -1,6 +0,0 @@ -<html><body>Leopold:<br> -Currently, the Black Lion mercenaries are working for the lord of Gludio. They are in charge of getting rid of the<font color="LEVEL"> remnants of ol mahum</font>, who are still staying and causing problems in this land. They have been fighting against the remnants for several months.<br> -However, ol mahums are not savages like werewolves, but highly trained soldiers. They are very difficult to deal with, since they are well organized like regular armies.<br> -A few days ago, our Black Lion troop was shamefully defeated in close battle with ol mahums on the outskirts of Gludin. Many brothers lost their lives in combat. We are short of troops until the second platoon returns from the Wastelands in the south. I am very worried ... We may have to recruit some good fighters who will fight with us ...<br> -(Quest for characters level 21 and above.) -</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/326_VanquishRemnants/30435-03.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/326_VanquishRemnants/30435-03.htm deleted file mode 100644 index a2bff1f43a..0000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/326_VanquishRemnants/30435-03.htm +++ /dev/null @@ -1,6 +0,0 @@ -<html><body>Leopold:<br> -The Black Lion undoubtedly rewards its members according to skill and performance. You will be paid according to the number of enemies you kill. One condition, though, you must take the<font color="LEVEL"> badge of ranking</font> as a token of proof.<br> -ol mahum use badges in the shape of a cross, taking after the foreign troops of Gracia. Soldiers have red, sergeants have blue, and officers have black cross badges. Naturally, you will receive a higher award depending on the rank of the ol mahum you killed.<br> -If you display great skills on the battlefield, you can become an official member of the Black Lions. For this, you must gather<font color="LEVEL"> 100 badges of the ol mahum</font> to prove your skills.<br> -Currently, ol mahum are camping in the<font color="LEVEL"> Abandoned Camp</font>. If you don't know how to get there, ask Guard Lynchuss. Wonderful! Now get ready to depart, my comrade. Forward to victory! -</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/326_VanquishRemnants/30435-04.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/326_VanquishRemnants/30435-04.htm deleted file mode 100644 index 0bfb149dfa..0000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/326_VanquishRemnants/30435-04.htm +++ /dev/null @@ -1,7 +0,0 @@ -<html><body>Leopold:<br> -Comrade, how is the situation on the battlefield? As you have no badge of the ol mahum in your hand, I see your performance has not been good. If you think fighting against the ol mahum is too difficult for you, you can always quit. It is better for both of us if you acknowledge your limits instead of aiming too high.<br> -If you are thinking of continuing to fight ol mahums, I will give you some advice. As I already told you, the ol mahum may seem like savage beasts, but they have an organization that has been trained as well as any country's official army. Ol mahums will help companions in danger, so you may have to face several ol mahums at once.<br> -Unless you form a troop like them, you have no choice but to approach them carefully and use guerilla tactics to deal with them one at a time. Knights may say it is a dishonorable way to fight, but it's quite an effective method.<br> -<a action="bypass -h Quest 326_VanquishRemnants 30435-07.htm">Say you will quit</a><br> -<a action="bypass -h Quest 326_VanquishRemnants 30435-08.htm">Say you will continue</a> -</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/326_VanquishRemnants/__init__.py b/L2J_DataPack_BETA/dist/game/data/scripts/quests/326_VanquishRemnants/__init__.py deleted file mode 100644 index d9acb5223c..0000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/326_VanquishRemnants/__init__.py +++ /dev/null @@ -1,101 +0,0 @@ -# Made by Mr. - Version 0.3 by DrLecter -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 = "326_VanquishRemnants" - -RED_CROSS_BADGE,BLUE_CROSS_BADGE,BLACK_CROSS_BADGE, = range(1359,1362) -ADENA = 57 -BLACK_LION_MARK = 1369 - -DROPLIST={ -20053:[RED_CROSS_BADGE,25], -20437:[RED_CROSS_BADGE,25], -20058:[RED_CROSS_BADGE,25], -20061:[BLUE_CROSS_BADGE,25], -20063:[BLUE_CROSS_BADGE,25], -20436:[BLUE_CROSS_BADGE,25], -20439:[BLUE_CROSS_BADGE,25], -20438:[BLACK_CROSS_BADGE,35], -20066:[BLACK_CROSS_BADGE,25], -} - -class Quest (JQuest) : - - def __init__(self,id,name,descr): - JQuest.__init__(self,id,name,descr) - self.questItemIds = [RED_CROSS_BADGE, BLUE_CROSS_BADGE, BLACK_CROSS_BADGE] - - def onEvent (self,event,st) : - htmltext = event - if event == "30435-03.htm" : - st.set("cond","1") - st.setState(State.STARTED) - st.playSound("ItemSound.quest_accept") - elif event == "30435-07.htm" : - st.playSound("ItemSound.quest_finish") - st.exitQuest(1) - 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 : - st.set("cond","0") - if st.getInt("cond")==0 : - if player.getLevel() >= 21 : - htmltext = "30435-02.htm" - else: - htmltext = "30435-01.htm" - st.exitQuest(1) - else : - red=st.getQuestItemsCount(RED_CROSS_BADGE) - blue=st.getQuestItemsCount(BLUE_CROSS_BADGE) - black=st.getQuestItemsCount(BLACK_CROSS_BADGE) - if red+blue+black == 0 : - htmltext = "30435-04.htm" - else : - htmltext = "30435-05.htm" - st.giveItems(ADENA,60*red+65*blue+70*black) - st.takeItems(RED_CROSS_BADGE,-1) - st.takeItems(BLUE_CROSS_BADGE,-1) - st.takeItems(BLACK_CROSS_BADGE,-1) - if red+blue+black >= 100 : - htmltext = "30435-09.htm" - if st.getQuestItemsCount(BLACK_LION_MARK) == 0 : - st.giveItems(BLACK_LION_MARK,1) - htmltext = "30435-06.htm" - return htmltext - - def onKill(self,npc,player,isPet): - st = player.getQuestState(qn) - if not st : return - if st.getState() != State.STARTED : return - - item,chance=DROPLIST[npc.getNpcId()] - if self.getRandom(100)<chance : - st.giveItems(item,1) - st.playSound("ItemSound.quest_itemget") - return - -QUEST = Quest(326,qn,"Vanquish Remnants") - -QUEST.addStartNpc(30435) - -QUEST.addTalkId(30435) - -QUEST.addKillId(20436) -QUEST.addKillId(20437) -QUEST.addKillId(20438) -QUEST.addKillId(20439) -QUEST.addKillId(20053) -QUEST.addKillId(20058) -QUEST.addKillId(20061) -QUEST.addKillId(20063) -QUEST.addKillId(20066) \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00326_VanquishRemnants/30435-01.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00326_VanquishRemnants/30435-01.htm new file mode 100644 index 0000000000..837d0861bc --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00326_VanquishRemnants/30435-01.htm @@ -0,0 +1,5 @@ +<html><body>Leopold:<br> +Currently, the Black Lion mercenaries are working for the lord of Gludio. They are in charge of getting rid of the <font color="LEVEL">remnants of Ol Mahum</font>, who are still staying and causing problems in this land. They have been fighting against the remnants for several months.<br> +However, Ol Mahums are not savages like werewolves, but highly trained soldiers. They are very difficult to deal with, since they are well organized like regular armies.<br>A few days ago, our Black Lion troop was shamefully defeated in close battle with Ol Mahums on the outskirts of Gludin. Many brothers lost their lives in combat. We are short of troops until the second platoon returns from the Wastelands in the south. I am very worried ... We may have to recruit some good fighters who will fight with us ...<br> +(Quest for characters level 21 and above.) +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/326_VanquishRemnants/30435-02.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00326_VanquishRemnants/30435-02.htm similarity index 66% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/326_VanquishRemnants/30435-02.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00326_VanquishRemnants/30435-02.htm index c9293ae11b..eaacb5b754 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/326_VanquishRemnants/30435-02.htm +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00326_VanquishRemnants/30435-02.htm @@ -1,7 +1,7 @@ <html><body>Leopold:<br> -Currently, the Black Lion mercenaries are working for the lord of Gludio. They are in charge of getting rid of the<font color="LEVEL"> remnants of ol mahum</font>, who are still staying and causing problems in this land. They have been fighting against the remnants for several months.<br> -However, ol mahums are not savages like werewolves, but highly trained soldiers. They are very difficult to deal with, since they are well organized like regular armies.<br> -A few days ago, our Black Lion troop was shamefully defeated in a close battle with ol mahums on the outskirts of Gludin. Many brothers lost their lives in combat. We are short of troops until our brothers of the second platoon, who have been dispatched to the Wastelands in the south, return. So we have decided to recruit skilled fighters to temporarily fill our troop.<br> -From the scars on your armor and the way you hold your weapon, you seem like you have had a lot of experience on the field. What do you think? Won't you fight for the Black Lions? It is an opportunity to play a role in punishing the cruel ol mahum who have ruined this land.<br> -<a action="bypass -h Quest 326_VanquishRemnants 30435-03.htm">Say you will fight</a> +Currently, the Black Lion mercenaries are working for the lord of Gludio. They are in charge of getting rid of the <font color="LEVEL">remnants of Ol Mahum</font>, who are still staying and causing problems in this land. They have been fighting against the remnants for several months.<br> +However, Ol Mahums are not savages like werewolves, but highly trained soldiers. They are very difficult to deal with, since they are well organized like regular armies.<br> +A few days ago, our Black Lion troop was shamefully defeated in a close battle with Ol Mahums on the outskirts of Gludin. Many brothers lost their lives in combat. We are short of troops until our brothers of the second platoon, who have been dispatched to the Wastelands in the south, return. So we have decided to recruit skilled fighters to temporarily fill our troop.<br> +From the scars on your armor and the way you hold your weapon, you seem like you have had a lot of experience on the field. What do you think? Won't you fight for the Black Lions? It is an opportunity to play a role in punishing the cruel Ol Mahum who have ruined this land.<br> +<a action="bypass -h Quest Q00326_VanquishRemnants 30435-03.htm">Say you will fight</a> </body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00326_VanquishRemnants/30435-03.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00326_VanquishRemnants/30435-03.htm new file mode 100644 index 0000000000..48e2d151c5 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00326_VanquishRemnants/30435-03.htm @@ -0,0 +1,6 @@ +<html><body>Leopold:<br> +The Black Lion undoubtedly rewards its members according to skill and performance. You will be paid according to the number of enemies you kill. One condition, though, you must take the <font color="LEVEL">badge of ranking</font> as a token of proof.<br> +Ol Mahum use badges in the shape of a cross, taking after the foreign troops of Gracia. Patrols and guards have red, suppliers, officers, and shooters have blue, and the generals and captains have Black Cross Badges. Naturally, you will receive a higher award depending on the rank of the Ol Mahum you killed.<br> +If you display great skills on the battlefield, you can become an official member of the Black Lions. For this, you must gather <font color="LEVEL">100 badges of the Ol Mahum</font> to prove your skills.<br> +Currently, Ol Mahum are camping in the <font color="LEVEL">abandoned camp</font>. If you don't know how to get there, ask Guard Linus. Wonderful! Now get ready to depart, my comrade. Forward to victory! +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00326_VanquishRemnants/30435-04.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00326_VanquishRemnants/30435-04.html new file mode 100644 index 0000000000..42e73a5176 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00326_VanquishRemnants/30435-04.html @@ -0,0 +1,7 @@ +<html><body>Leopold:<br> +Comrade, how is the situation on the battlefield? As you have no badge of the Ol Mahum in your hand, I see your performance has not been good. If you think fighting against the Ol Mahum is too difficult for you, you can always quit. It is better for both of us if you acknowledge your limits instead of aiming too high.<br> +If you are thinking of continuing to fight Ol Mahums, I will give you some advice. As I already told you, the Ol Mahum may seem like savage beasts, but they have an organization that has been trained as well as any country's official army. Ol Mahums will help companions in danger, so you may have to face several Ol Mahums at once.<br> +Unless you form a troop like them, you have no choice but to approach them carefully and use guerilla tactics to deal with them one at a time. Knights may say it is a dishonorable way to fight, but it's quite an effective method.<br> +<a action="bypass -h Quest Q00326_VanquishRemnants 30435-07.html">Say you will quit</a><br> +<a action="bypass -h Quest Q00326_VanquishRemnants 30435-08.html">Say you will continue</a> +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/326_VanquishRemnants/30435-05.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00326_VanquishRemnants/30435-05.html similarity index 69% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/326_VanquishRemnants/30435-05.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00326_VanquishRemnants/30435-05.html index fa0caa714b..f8b5e76177 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/326_VanquishRemnants/30435-05.htm +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00326_VanquishRemnants/30435-05.html @@ -1,6 +1,6 @@ <html><body>Leopold:<br> Welcome, comrade of the sword! Seeing you safely return from the scene of battle gives me great joy. The badges of the enemy in your hand show that the goddess of victory has smiled upon you.<br> I received a letter that the brothers of the second platoon, who were dispatched to the south part of Gludio, will return later than planned. I will need more of your services for the time being.<br> -<a action="bypass -h Quest 326_VanquishRemnants 30435-07.htm">Say you will quit</a><br> -<a action="bypass -h Quest 326_VanquishRemnants 30435-08.htm">Say you will continue</a> +<a action="bypass -h Quest Q00326_VanquishRemnants 30435-07.html">Say you will quit</a><br> +<a action="bypass -h Quest Q00326_VanquishRemnants 30435-08.html">Say you will continue</a> </body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/326_VanquishRemnants/30435-06.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00326_VanquishRemnants/30435-06.html similarity index 78% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/326_VanquishRemnants/30435-06.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00326_VanquishRemnants/30435-06.html index ab626d93c3..103ec1452b 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/326_VanquishRemnants/30435-06.htm +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00326_VanquishRemnants/30435-06.html @@ -2,6 +2,6 @@ Welcome, my comrade of the sword! I congratulate you on your safe return. How was your performance on the battlefield?<br> How truly amazing! You have really brought me 100 badges! Magnificent! As I promised, I acknowledge you a member of the Black Lions. Because of our current situation, we cannot give you a proper joining ceremony, but instead, I give you this mark. The mark shows that you are a member of the proud Black Lions.<br> I received a letter that the brothers of the second platoon, who were dispatched to the south part of Gludio, will return later than planned. You must go back to the battlefield and fight, comrade of the sword!<br> -<a action="bypass -h Quest 326_VanquishRemnants 30435-07.htm">Say you will quit</a><br> -<a action="bypass -h Quest 326_VanquishRemnants 30435-08.htm">Say you will continue</a> +<a action="bypass -h Quest Q00326_VanquishRemnants 30435-07.html">Say you will quit</a><br> +<a action="bypass -h Quest Q00326_VanquishRemnants 30435-08.html">Say you will continue</a> </body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/326_VanquishRemnants/30435-07.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00326_VanquishRemnants/30435-07.html similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/326_VanquishRemnants/30435-07.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00326_VanquishRemnants/30435-07.html diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/326_VanquishRemnants/30435-08.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00326_VanquishRemnants/30435-08.html similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/326_VanquishRemnants/30435-08.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00326_VanquishRemnants/30435-08.html diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/326_VanquishRemnants/30435-09.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00326_VanquishRemnants/30435-09.html similarity index 76% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/326_VanquishRemnants/30435-09.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00326_VanquishRemnants/30435-09.html index fd014d2742..0934a01c8e 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/326_VanquishRemnants/30435-09.htm +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00326_VanquishRemnants/30435-09.html @@ -2,6 +2,6 @@ Welcome, my comrade of the sword! I congratulate you on your safe return. How was your performance on the battlefield?<br> How truly amazing! You brought back another hundred badges! Magnificent! Ha ha! You have already proven your skills and have been acknowledged as a member of the Black Lions, and yet you still amaze me!<br> I received a letter that the brothers of the second platoon, who were dispatched to the south part of Gludio, will return later than planned. Our brothers here must hold on until they return. Go on back to the battlefield and fight, brother of the sword!<br> -<a action="bypass -h Quest 326_VanquishRemnants 30435-07.htm">Say you will quit</a><br> -<a action="bypass -h Quest 326_VanquishRemnants 30435-08.htm">Say you will continue</a> +<a action="bypass -h Quest Q00326_VanquishRemnants 30435-07.html">Say you will quit</a><br> +<a action="bypass -h Quest Q00326_VanquishRemnants 30435-08.html">Say you will continue</a> </body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00326_VanquishRemnants/Q00326_VanquishRemnants.java b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00326_VanquishRemnants/Q00326_VanquishRemnants.java new file mode 100644 index 0000000000..f5b0d96a4e --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00326_VanquishRemnants/Q00326_VanquishRemnants.java @@ -0,0 +1,159 @@ +/* + * 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.Q00326_VanquishRemnants; + +import java.util.HashMap; +import java.util.Map; + +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; + +/** + * Vanquish Remnants (326) + * @author xban1x + */ +public final class Q00326_VanquishRemnants extends Quest +{ + // NPC + private static final int LEOPOLD = 30435; + // Items + private static final int RED_CROSS_BADGE = 1359; + private static final int BLUE_CROSS_BADGE = 1360; + private static final int BLACK_CROSS_BADGE = 1361; + private static final int BLACK_LION_MARK = 1369; + // Monsters + private static final Map<Integer, int[]> MONSTERS = new HashMap<>(); + //@formatter:off + static + { + MONSTERS.put(20053, new int[] {61, RED_CROSS_BADGE}); // Ol Mahum Patrol + MONSTERS.put(20058, new int[] {61, RED_CROSS_BADGE}); // Ol Mahum Guard + MONSTERS.put(20061, new int[] {57, BLUE_CROSS_BADGE}); // Ol Mahum Remnants + MONSTERS.put(20063, new int[] {63, BLUE_CROSS_BADGE}); // Ol Mahum Shooter + MONSTERS.put(20066, new int[] {59, BLACK_CROSS_BADGE}); // Ol Mahum Captain + MONSTERS.put(20436, new int[] {55, BLUE_CROSS_BADGE}); // Ol Mahum Supplier + MONSTERS.put(20437, new int[] {59, RED_CROSS_BADGE}); // Ol Mahum Recruit + MONSTERS.put(20438, new int[] {60, BLACK_CROSS_BADGE}); // Ol Mahum General + MONSTERS.put(20439, new int[] {62, BLUE_CROSS_BADGE}); // Ol Mahum Officer + } + //@formatter:on + // Misc + private static final int MIN_LVL = 21; + + private Q00326_VanquishRemnants(int questId, String name, String descr) + { + super(questId, name, descr); + addStartNpc(LEOPOLD); + addTalkId(LEOPOLD); + addKillId(MONSTERS.keySet()); + registerQuestItems(RED_CROSS_BADGE, BLUE_CROSS_BADGE, BLACK_CROSS_BADGE); + } + + @Override + public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) + { + final QuestState st = player.getQuestState(getName()); + String htmltext = null; + if (st != null) + { + switch (event) + { + case "30435-03.htm": + { + st.startQuest(); + htmltext = event; + break; + } + case "30435-07.html": + { + st.exitQuest(true, true); + htmltext = event; + break; + } + case "30435-08.html": + { + htmltext = event; + break; + } + } + } + return htmltext; + } + + @Override + public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon) + { + final QuestState st = killer.getQuestState(getName()); + if ((st != null) && st.isStarted() && (getRandom(100) < MONSTERS.get(npc.getNpcId())[0])) + { + st.giveItems(MONSTERS.get(npc.getNpcId())[1], 1); + st.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET); + } + return super.onKill(npc, killer, isSummon); + } + + @Override + public String onTalk(L2Npc npc, L2PcInstance player) + { + final QuestState st = player.getQuestState(getName()); + String htmltext = null; + if (st != null) + { + switch (st.getState()) + { + case State.CREATED: + { + htmltext = (player.getLevel() >= MIN_LVL) ? "30435-02.htm" : "30435-01.htm"; + break; + } + case State.STARTED: + { + final long red_badges = st.getQuestItemsCount(RED_CROSS_BADGE); + final long blue_badges = st.getQuestItemsCount(BLUE_CROSS_BADGE); + final long black_badges = st.getQuestItemsCount(BLACK_CROSS_BADGE); + final long sum = red_badges + blue_badges + black_badges; + if (sum > 0) + { + if ((sum >= 100) && !st.hasQuestItems(BLACK_LION_MARK)) + { + st.giveItems(BLACK_LION_MARK, 1); + } + st.giveAdena(((red_badges * 46) + (blue_badges * 52) + (black_badges * 58) + ((sum >= 10) ? 4320 : 0)), true); + takeItems(player, -1, RED_CROSS_BADGE, BLUE_CROSS_BADGE, BLACK_CROSS_BADGE); + htmltext = (sum >= 100) ? (st.hasQuestItems(BLACK_LION_MARK)) ? "30435-09.html" : "30435-06.html" : "30435-05.html"; + } + else + { + htmltext = "30435-04.html"; + } + break; + } + } + } + return htmltext; + } + + public static void main(String[] args) + { + new Q00326_VanquishRemnants(326, Q00326_VanquishRemnants.class.getSimpleName(), "Vanquish Remnants"); + } +} \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/sql/game/updates/20130420update.sql b/L2J_DataPack_BETA/dist/sql/game/updates/20130420update.sql new file mode 100644 index 0000000000..a0399e5fc4 --- /dev/null +++ b/L2J_DataPack_BETA/dist/sql/game/updates/20130420update.sql @@ -0,0 +1 @@ +UPDATE character_quests SET name='Q00326_VanquishRemnants' WHERE name='326_VanquishRemnants'; \ No newline at end of file -- GitLab