Эх сурвалжийг харах

Retail-like quest Black Swan (351).

Adry_85 10 жил өмнө
parent
commit
e6628cecdc
29 өөрчлөгдсөн 327 нэмэгдсэн , 211 устгасан
  1. 40 40
      L2J_DataPack/dist/game/data/multisell/7897.xml
  2. 0 1
      L2J_DataPack/dist/game/data/scripts.cfg
  3. 0 4
      L2J_DataPack/dist/game/data/scripts/quests/351_BlackSwan/30916-00.htm
  4. 0 4
      L2J_DataPack/dist/game/data/scripts/quests/351_BlackSwan/30916-01.htm
  5. 0 5
      L2J_DataPack/dist/game/data/scripts/quests/351_BlackSwan/30969-01.htm
  6. 0 4
      L2J_DataPack/dist/game/data/scripts/quests/351_BlackSwan/30969-02.htm
  7. 0 4
      L2J_DataPack/dist/game/data/scripts/quests/351_BlackSwan/30969-03.htm
  8. 0 6
      L2J_DataPack/dist/game/data/scripts/quests/351_BlackSwan/30969-04.htm
  9. 0 119
      L2J_DataPack/dist/game/data/scripts/quests/351_BlackSwan/__init__.py
  10. 8 4
      L2J_DataPack/dist/game/data/scripts/quests/Q00345_MethodToRaiseTheDead/Q00345_MethodToRaiseTheDead.java
  11. 1 1
      L2J_DataPack/dist/game/data/scripts/quests/Q00351_BlackSwan/30897-01.html
  12. 0 0
      L2J_DataPack/dist/game/data/scripts/quests/Q00351_BlackSwan/30897-02.html
  13. 4 0
      L2J_DataPack/dist/game/data/scripts/quests/Q00351_BlackSwan/30916-01.htm
  14. 3 3
      L2J_DataPack/dist/game/data/scripts/quests/Q00351_BlackSwan/30916-02.htm
  15. 2 2
      L2J_DataPack/dist/game/data/scripts/quests/Q00351_BlackSwan/30916-03.htm
  16. 4 0
      L2J_DataPack/dist/game/data/scripts/quests/Q00351_BlackSwan/30916-04.html
  17. 2 2
      L2J_DataPack/dist/game/data/scripts/quests/Q00351_BlackSwan/30916-05.html
  18. 5 0
      L2J_DataPack/dist/game/data/scripts/quests/Q00351_BlackSwan/30969-01.html
  19. 3 3
      L2J_DataPack/dist/game/data/scripts/quests/Q00351_BlackSwan/30969-02.html
  20. 6 0
      L2J_DataPack/dist/game/data/scripts/quests/Q00351_BlackSwan/30969-03.html
  21. 4 0
      L2J_DataPack/dist/game/data/scripts/quests/Q00351_BlackSwan/30969-04.html
  22. 2 2
      L2J_DataPack/dist/game/data/scripts/quests/Q00351_BlackSwan/30969-05.html
  23. 5 0
      L2J_DataPack/dist/game/data/scripts/quests/Q00351_BlackSwan/30969-06.html
  24. 3 3
      L2J_DataPack/dist/game/data/scripts/quests/Q00351_BlackSwan/30969-07.html
  25. 2 2
      L2J_DataPack/dist/game/data/scripts/quests/Q00351_BlackSwan/30969-08.html
  26. 1 1
      L2J_DataPack/dist/game/data/scripts/quests/Q00351_BlackSwan/30969-09.html
  27. 228 0
      L2J_DataPack/dist/game/data/scripts/quests/Q00351_BlackSwan/Q00351_BlackSwan.java
  28. 2 0
      L2J_DataPack/dist/game/data/scripts/quests/QuestMasterHandler.java
  29. 2 1
      L2J_DataPack/dist/sql/game/updates/20141122update.sql

+ 40 - 40
L2J_DataPack/dist/game/data/multisell/7897.xml

@@ -4,93 +4,93 @@
 		<npc>30897</npc> <!-- Roman (Head Blacksmith) -->
 	</npcs>
 	<item>
-		<!-- Iason Heine's Bill -->
-		<ingredient count="1" id="4310" />
+		<!-- Bill of Iason Heine -->
+		<ingredient count="1" id="4407" />
 		<!-- Adena -->
 		<production count="700" id="57" />
 	</item>
 	<item>
-		<!-- Iason Heine's Bill -->
-		<ingredient count="3" id="4310" />
+		<!-- Bill of Iason Heine -->
+		<ingredient count="3" id="4407" />
 		<!-- Animal Skin -->
 		<production count="20" id="1867" />
 	</item>
 	<item>
-		<!-- Iason Heine's Bill -->
-		<ingredient count="3" id="4310" />
+		<!-- Bill of Iason Heine -->
+		<ingredient count="3" id="4407" />
 		<!-- Animal Bone -->
 		<production count="20" id="1872" />
 	</item>
 	<item>
-		<!-- Iason Heine's Bill -->
-		<ingredient count="2" id="4310" />
+		<!-- Bill of Iason Heine -->
+		<ingredient count="2" id="4407" />
 		<!-- Coal -->
 		<production count="10" id="1870" />
 	</item>
 	<item>
-		<!-- Iason Heine's Bill -->
-		<ingredient count="2" id="4310" />
+		<!-- Bill of Iason Heine -->
+		<ingredient count="2" id="4407" />
 		<!-- Charcoal -->
 		<production count="10" id="1871" />
 	</item>
 	<item>
-		<!-- Iason Heine's Bill -->
-		<ingredient count="9" id="4310" />
-		<!-- Leather -->
-		<production count="10" id="1882" />
-	</item>
-	<item>
-		<!-- Iason Heine's Bill -->
-		<ingredient count="5" id="4310" />
-		<!-- Cokes -->
-		<production count="6" id="1879" />
-	</item>
-	<item>
-		<!-- Iason Heine's Bill -->
-		<ingredient count="5" id="4310" />
-		<!-- Metal Hardener -->
-		<production count="1" id="5220" />
-	</item>
-	<item>
-		<!-- Iason Heine's Bill -->
-		<ingredient count="3" id="4310" />
+		<!-- Bill of Iason Heine -->
+		<ingredient count="3" id="4407" />
 		<!-- Coarse Bone Powder -->
 		<production count="2" id="1881" />
 	</item>
 	<item>
-		<!-- Iason Heine's Bill -->
-		<ingredient count="3" id="4310" />
+		<!-- Bill of Iason Heine -->
+		<ingredient count="3" id="4407" />
 		<!-- Oriharukon Ore -->
 		<production count="1" id="1874" />
 	</item>
 	<item>
-		<!-- Iason Heine's Bill -->
-		<ingredient count="3" id="4310" />
+		<!-- Bill of Iason Heine -->
+		<ingredient count="3" id="4407" />
 		<!-- Stone of Purity -->
 		<production count="1" id="1875" />
 	</item>
 	<item>
-		<!-- Iason Heine's Bill -->
-		<ingredient count="6" id="4310" />
+		<!-- Bill of Iason Heine -->
+		<ingredient count="5" id="4407" />
+		<!-- Metal Hardener -->
+		<production count="1" id="5220" />
+	</item>
+	<item>
+		<!-- Bill of Iason Heine -->
+		<ingredient count="5" id="4407" />
+		<!-- Cokes -->
+		<production count="6" id="1879" />
+	</item>
+	<item>
+		<!-- Bill of Iason Heine -->
+		<ingredient count="6" id="4407" />
 		<!-- Crafted Leather -->
 		<production count="1" id="1894" />
 		<!-- Adena -->
 		<production count="210" id="57" />
 	</item>
 	<item>
-		<!-- Iason Heine's Bill -->
-		<ingredient count="7" id="4310" />
+		<!-- Bill of Iason Heine -->
+		<ingredient count="7" id="4407" />
 		<!-- Synthetic Cokes -->
 		<production count="1" id="1888" />
 		<!-- Adena -->
 		<production count="280" id="57" />
 	</item>
 	<item>
-		<!-- Iason Heine's Bill -->
-		<ingredient count="9" id="4310" />
+		<!-- Bill of Iason Heine -->
+		<ingredient count="9" id="4407" />
 		<!-- Varnish of Purity -->
 		<production count="1" id="1887" />
 		<!-- Adena -->
 		<production count="630" id="57" />
 	</item>
+	<item>
+		<!-- Bill of Iason Heine -->
+		<ingredient count="9" id="4407" />
+		<!-- Leather -->
+		<production count="10" id="1882" />
+	</item>
 </list>

+ 0 - 1
L2J_DataPack/dist/game/data/scripts.cfg

@@ -237,7 +237,6 @@ quests/337_AudienceWithTheLandDragon/__init__.py
 quests/340_SubjugationOfLizardmen/__init__.py
 quests/343_UnderTheShadowOfTheIvoryTower/__init__.py
 quests/348_ArrogantSearch/__init__.py
-quests/351_BlackSwan/__init__.py
 quests/372_LegacyOfInsolence/__init__.py
 quests/373_SupplierOfReagents/__init__.py
 quests/383_SearchingForTreasure/__init__.py

+ 0 - 4
L2J_DataPack/dist/game/data/scripts/quests/351_BlackSwan/30916-00.htm

@@ -1,4 +0,0 @@
-<html><body>Captain Gosta:<br>
-Don't you relize that the Heine family is the most prominent family in all of Heine? For years they have dominated Innadril's commerce and it is rumored that their personal fortune has swelled to several billion adena. Now word comes that cargo belonging to Iason Heine, the patriarch of the Heine family has been stolen... Why am I telling you this. You can't do anything about it.<br>
-(This is a quest that can only be undertaken by a character of level 32 or higher.)
-</body></html>

+ 0 - 4
L2J_DataPack/dist/game/data/scripts/quests/351_BlackSwan/30916-01.htm

@@ -1,4 +0,0 @@
-<html><body>Captain Gosta:<br>
-Don't you relize that the Heine family is the most prominent family in all of Heine? For years they have dominated Innadril's commerce and it is rumored that their personal fortune has swelled to several billion adena. Now word comes that cargo belonging to Iason Heine, the patriarch of the Heine family has been stolen... When he heard about the robbery, the Lord decided to use this incident as an excuse to mobilize his army to drive away the<font color="LEVEL"> Tasaba lizardmen</font>. Those filthy reptiles have threatened the safety of travelers for too long...<br>
-<a action="bypass -h Quest 351_BlackSwan 30916-02.htm">"Was he successful?"</a>
-</body></html>

+ 0 - 5
L2J_DataPack/dist/game/data/scripts/quests/351_BlackSwan/30969-01.htm

@@ -1,5 +0,0 @@
-<html><body>Iason Heine:<br>
-Oh, my! I should have noticed the captain's seal earlier! So you are here to help me... What has become of those filthy<font color="LEVEL"> Tasaba lizardmen</font>? Have you recovered any of the stolen cargo ?<br>
-<a action="bypass -h Quest 351_BlackSwan 30969-02a.htm">"Here are the fangs of the lizardmen."</a><br>
-<a action="bypass -h Quest 351_BlackSwan 30969-03a.htm">"Here is the cargo we recovered."</a>
-</body></html>

+ 0 - 4
L2J_DataPack/dist/game/data/scripts/quests/351_BlackSwan/30969-02.htm

@@ -1,4 +0,0 @@
-<html><body>Iason Heine:<br>
-Let's see... We agreed upon 20 adena per fang, correct? Then total is... this. Correct?<br>
-<a action="bypass -h Quest 351_BlackSwan 30969-04.htm">Return</a>
-</body></html>

+ 0 - 4
L2J_DataPack/dist/game/data/scripts/quests/351_BlackSwan/30969-03.htm

@@ -1,4 +0,0 @@
-<html><body>Iason Heine:<br>
-Oh yes, that is definetely the cargo that was stolen from our trade guild. But this is not all of it. There is still much to be recovered. Please continue to look for it.<br> Ah, the reward. I only have a small amount of cash on me. I'll tell you what, take this bill to<font color="LEVEL"> Head Blacsmith Roman</font> of Blacksmith guild. He will take care of you.<br>
-<a action="bypass -h Quest 351_BlackSwan 30969-04.htm">Return</a>
-</body></html>

+ 0 - 6
L2J_DataPack/dist/game/data/scripts/quests/351_BlackSwan/30969-04.htm

@@ -1,6 +0,0 @@
-<html><body>Iason Heine:<br>
-Is there anything else I can do for you? The ranks of Tasaba lizardmen are swelling as we speak. They must be delt with. Please don't quit now/<br>
-<a action="bypass -h Quest 351_BlackSwan 30969-02a.htm">Show the Tasaba lizardmen fangs.</a><br>
-<a action="bypass -h Quest 351_BlackSwan 30969-03a.htm">Show the wooden barrels that belong to the trade guild.</a><br>
-<a action="bypass -h Quest 351_BlackSwan 30969-05.htm">Quit the task.</a>
-</body></html>

+ 0 - 119
L2J_DataPack/dist/game/data/scripts/quests/351_BlackSwan/__init__.py

@@ -1,119 +0,0 @@
-# Made by mtrix
-import sys
-from com.l2jserver import Config
-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
-
-qn = "351_BlackSwan"
-
-ADENA = 57
-ORDER_OF_GOSTA = 4296
-LIZARD_FANG = 4297
-BARREL_OF_LEAGUE = 4298
-BILL_OF_IASON_HEINE = 4310
-CHANCE = 10
-CHANCE2 = 15
-CHANCE_barrel = 0
-class Quest (JQuest) :
-
- def __init__(self,id,name,descr):
-     JQuest.__init__(self,id,name,descr)
-     self.questItemIds = [ORDER_OF_GOSTA, BARREL_OF_LEAGUE, LIZARD_FANG]
-
- def onEvent (self,event,st) :
-     htmltext = event
-     amount = st.getQuestItemsCount(LIZARD_FANG)
-     amount2 = st.getQuestItemsCount(BARREL_OF_LEAGUE)
-     bonus=0
-     if event == "30916-03.htm" :
-         st.setState(State.STARTED)
-         st.set("cond","1")
-         st.giveItems(ORDER_OF_GOSTA,1)
-         st.playSound("ItemSound.quest_accept")
-     elif event == "30969-02a.htm" and amount :
-         if amount > 10 :
-            bonus=3880
-         htmltext = "30969-02.htm"
-         st.giveItems(ADENA,amount*20+bonus)
-         st.takeItems(LIZARD_FANG,-1)
-     elif event == "30969-03a.htm" :
-         if amount2 :
-             htmltext = "30969-03.htm"
-             st.giveItems(ADENA,3880)
-             st.rewardItems(BILL_OF_IASON_HEINE,int(amount2))
-             st.takeItems(BARREL_OF_LEAGUE,-1)
-     elif event == "30969-06.htm" :
-         if not (amount + amount2) :
-            st.exitQuest(1)
-            st.playSound("ItemSound.quest_finish")
-            htmltext="30969-07.htm"
-     return htmltext
-
- def onTalk (self,npc,player):
-     htmltext = Quest.getNoQuestMsg(player)
-     st = self.getQuestState(player, True)
-     if not st : return htmltext
-     npcId = npc.getId()
-     id = st.getState()
-     if npcId != 30916 and id != State.STARTED : return htmltext
-  
-     level = player.getLevel()
-     cond = st.getInt("cond")
-     if npcId==30916 :
-         if id == State.CREATED :
-             if level>=32 :
-                 htmltext = "30916-01.htm"
-             else :
-                 htmltext = "30916-00.htm"
-                 st.exitQuest(1)
-         elif cond :
-             htmltext = "30916-04.htm"
-     elif npcId==30969 and cond :
-         htmltext = "30969-01.htm"
-     elif npcId == 30897 :
-         if st.getQuestItemsCount(BILL_OF_IASON_HEINE):
-            htmltext="30897-01.htm"
-         else:
-            htmltext="30897-02.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()
-     cond = st.getInt("cond")
-     random = self.getRandom(20)
-     if random<CHANCE :
-         st.giveItems(LIZARD_FANG,1)
-         st.playSound("ItemSound.quest_itemget")
-         if random==CHANCE_barrel :
-              st.giveItems(BARREL_OF_LEAGUE,1)
-              st.set("cond","2")
-     elif random<CHANCE2 :
-         st.giveItems(LIZARD_FANG,2)
-         st.playSound("ItemSound.quest_itemget")
-         if random==CHANCE_barrel :
-             st.giveItems(BARREL_OF_LEAGUE,1)
-             st.set("cond","2")
-     elif self.getRandom(100)<4:
-         st.giveItems(BARREL_OF_LEAGUE,1)
-         st.playSound("ItemSound.quest_itemget")
-         st.set("cond","2")
-     return
-
-QUEST       = Quest(351,qn,"Black Swan")
-
-QUEST.addStartNpc(30916)
-
-QUEST.addTalkId(30916)
-QUEST.addTalkId(30969)
-QUEST.addTalkId(30897)
-
-QUEST.addKillId(20784)
-QUEST.addKillId(20785)
-QUEST.addKillId(21639)
-QUEST.addKillId(21640)
-QUEST.addKillId(21642)
-QUEST.addKillId(21643)

+ 8 - 4
L2J_DataPack/dist/game/data/scripts/quests/Q00345_MethodToRaiseTheDead/Q00345_MethodToRaiseTheDead.java

@@ -76,7 +76,6 @@ public final class Q00345_MethodToRaiseTheDead extends Quest
 		{
 			case "30970-02.htm":
 			{
-				qs.setMemoState(0);
 				qs.startQuest();
 				htmltext = event;
 				break;
@@ -105,9 +104,14 @@ public final class Q00345_MethodToRaiseTheDead extends Quest
 			}
 			case "30971-03.html":
 			{
-				giveAdena(player, getQuestItemsCount(player, USELESS_BONE_PIECES) * 104, true);
-				takeItems(player, USELESS_BONE_PIECES, -1);
-				htmltext = event;
+				final long uselessBonePiecesCount = getQuestItemsCount(player, USELESS_BONE_PIECES);
+				
+				if (uselessBonePiecesCount > 0)
+				{
+					giveAdena(player, uselessBonePiecesCount * 104, true);
+					takeItems(player, USELESS_BONE_PIECES, -1);
+					htmltext = event;
+				}
 				break;
 			}
 			case "30973-02.html":

+ 1 - 1
L2J_DataPack/dist/game/data/scripts/quests/351_BlackSwan/30897-01.htm → L2J_DataPack/dist/game/data/scripts/quests/Q00351_BlackSwan/30897-01.html

@@ -1,4 +1,4 @@
 <html><body>Head Blacksmith Roman:<br>
-Hmm... This is definitely the signature of Iason Heine. What would you like to trade for it?<br>
+Hmm... This is definitely the signature of Iason Heine.  What would you like to trade for it?<br>
 <a action="bypass -h npc_%objectId%_multisell 7897">View the Bill Exchange List</a>
 </body></html>

+ 0 - 0
L2J_DataPack/dist/game/data/scripts/quests/351_BlackSwan/30897-02.htm → L2J_DataPack/dist/game/data/scripts/quests/Q00351_BlackSwan/30897-02.html


+ 4 - 0
L2J_DataPack/dist/game/data/scripts/quests/Q00351_BlackSwan/30916-01.htm

@@ -0,0 +1,4 @@
+<html><body>Captain Gosta:<br>
+Don't you realize that the Heine family is the most prominent family in all of Heine? For years they have dominated Innadril's commerce and it is rumored that their personal fortune has swelled to several billion Adena. Now word comes that cargo belonging to Iason Heine, the patriarch of the Heine family has been stolen... When he heard about the robbery, the Lord decided to use this incident as an excuse to mobilize his army to drive away the <font color="LEVEL">Tasaba lizardmen</font>. Those filthy reptiles have threatened the safety of travelers for too long...<br>
+<a action="bypass -h Quest Q00351_BlackSwan 30916-02.htm">"Was he successful?"</a>
+</body></html>

+ 3 - 3
L2J_DataPack/dist/game/data/scripts/quests/351_BlackSwan/30916-02.htm → L2J_DataPack/dist/game/data/scripts/quests/Q00351_BlackSwan/30916-02.htm

@@ -1,5 +1,5 @@
 <html><body>Captain Gosta:<br>
 Duke Iason Heine refused the Lord's offer, saying that it was a private matter and he would deal with it. This would be a good time to compliment the Duke on his concern for the public treasury, but, alas, I know him too well.<br>
-Anyway, I'm recruiting volunteers to drive away the Tasaba lizardmen for the Duke. He will personaly give out the rewards when we are successful. If you wish to volunteer, speak up now!<br>
-<a action="bypass -h Quest 351_BlackSwan 30916-03.htm">"I will join your effort against the Tasaba lizardmen."</a>
-</body></html>
+Anyway, I'm recruiting volunteers to drive away the Tasaba lizardmen for the Duke. He will personally give out the rewards when we are successful. If you wish to volunteer, speak up now!<br>
+<a action="bypass -h Quest Q00351_BlackSwan 30916-03.htm">"I will join your effort against the Tasaba lizardmen."</a>
+</body></html>

+ 2 - 2
L2J_DataPack/dist/game/data/scripts/quests/351_BlackSwan/30916-03.htm → L2J_DataPack/dist/game/data/scripts/quests/Q00351_BlackSwan/30916-03.htm

@@ -1,3 +1,3 @@
 <html><body>Captain Gosta:<br>
-Regardless of his character,<font color="LEVEL"> Duke Iason Heine</font> has a point. The<font color="LEVEL"> Tasaba lizardmen</font> are definitely a menace to Innadril. It would be one thing if all they did was attack travelers, but now it is said they have something far more sinister planned... Take this order. I wish you luck.
-</body></html>
+Regardless of his character, <font color="LEVEL">Duke Iason Heine</font> has a point. The <font color="LEVEL">Tasaba lizardmen</font> are definitely a menace to Innadril. It would be one thing if all they did was attack travelers, but now it is said they have something far more sinister planned... Take this order. I wish you luck.
+</body></html>

+ 4 - 0
L2J_DataPack/dist/game/data/scripts/quests/Q00351_BlackSwan/30916-04.html

@@ -0,0 +1,4 @@
+<html><body>Captain Gosta:<br>
+Don't you realize that the Heine family is the most prominent family in all of Heine? For years they have dominated Innadril's commerce and it is rumored that their personal fortune has swelled to several billion Adena. Now word comes that cargo belonging to Iason Heine, the patriarch of the Heine family has been stolen... Why am I telling you this. You can't do anything about it...<br>
+(This quest can only be undertaken by a character of level 32 or higher.)
+</body></html>

+ 2 - 2
L2J_DataPack/dist/game/data/scripts/quests/351_BlackSwan/30916-04.htm → L2J_DataPack/dist/game/data/scripts/quests/Q00351_BlackSwan/30916-05.html

@@ -1,3 +1,3 @@
 <html><body>Captain Gosta:<br>
-How is your mission coming along? He may have many faults, but one thing you can say about<font color="LEVEL"> Duke Iason Heine</font>, he is not a miser. You will be well-compensated for your efforts. Still, you mustn't believe everything he says...
-</body></html>
+How is your mission coming along? He may have many faults, but one thing you can say about <font color="LEVEL">Duke Iason Heine</font>, he is not a miser. You will be well-compensated for your efforts. Still, you mustn't believe everything he says...
+</body></html>

+ 5 - 0
L2J_DataPack/dist/game/data/scripts/quests/Q00351_BlackSwan/30969-01.html

@@ -0,0 +1,5 @@
+<html><body>Iason Heine:<br>
+Oh, my! I should have noticed the captain's seal earlier! So you are here to help me.... What has become of those filthy <font color="LEVEL">Tasaba lizardmen</font>? Have you recovered any of the stolen cargo?<br>
+<a action="bypass -h Quest Q00351_BlackSwan 30969-02.html">"Here are the fangs of the lizardmen."</a><br>
+<a action="bypass -h Quest Q00351_BlackSwan 30969-05.html">"Here is the cargo we recovered."</a>
+</body></html>

+ 3 - 3
L2J_DataPack/dist/game/data/scripts/quests/351_BlackSwan/30969-02a.htm → L2J_DataPack/dist/game/data/scripts/quests/Q00351_BlackSwan/30969-02.html

@@ -1,4 +1,4 @@
 <html><body>Iason Heine:<br>
-Unless you present proof that you have killed the lizardmen I will be unable to compensate you. This has nothing to with trust. I believe what you say, I just must have the fangs. I have turned away others who lacked proof. If I were to give you special treatment there would be reprisals against me. Do you understand? Go and get the<font color="LEVEL"> lizardmen fangs</font>.<br>
-<a action="bypass -h Quest 351_BlackSwan 30969-04.htm">Return</a>
-</body></html>
+Unless you present proof that you have killed the lizardmen I will be unable to compensate you. This has nothing to with trust. I believe what you say, I just must have the fangs. I have turned away others who lacked proof. If I were to give you special treatment there would be reprisals against me. Do you understand? Go and get the <font color="LEVEL">lizardmen fangs</font>.<br>
+<a action="bypass -h Quest Q00351_BlackSwan 30969-03.html">Return</a>
+</body></html>

+ 6 - 0
L2J_DataPack/dist/game/data/scripts/quests/Q00351_BlackSwan/30969-03.html

@@ -0,0 +1,6 @@
+<html><body>Iason Heine:<br>
+Is there anything else I can do for you? The ranks of the Tasaba lizardmen are swelling as we speak. They must be dealt with. Please don't quit now.<br>
+<a action="bypass -h Quest Q00351_BlackSwan 30969-02.html">Show the Tasaba lizardmen fangs.</a><br>
+<a action="bypass -h Quest Q00351_BlackSwan 30969-05.html">Show the wooden barrels that belong to the trade guild.</a><br>
+<a action="bypass -h Quest Q00351_BlackSwan 30969-07.html">Quit the task.</a>
+</body></html>

+ 4 - 0
L2J_DataPack/dist/game/data/scripts/quests/Q00351_BlackSwan/30969-04.html

@@ -0,0 +1,4 @@
+<html><body>Iason Heine:<br>
+Let's see... We agreed upon 20 adena per fang, correct? Then the total is... this. Correct?<br>
+<a action="bypass -h Quest Q00351_BlackSwan 30969-03.html">Return</a>
+</body></html>

+ 2 - 2
L2J_DataPack/dist/game/data/scripts/quests/351_BlackSwan/30969-03a.htm → L2J_DataPack/dist/game/data/scripts/quests/Q00351_BlackSwan/30969-05.html

@@ -1,4 +1,4 @@
 <html><body>Iason Heine:<br>
 Ah, you have recovered our trade guild's wooden barrel? That is wonderful news! Where is it? Is it in a warehouse? Please bring it to me right away! ... I hope you didn't try to open it! Or send it somewhere else? Ha! Just kidding.<br>
-<a action="bypass -h Quest 351_BlackSwan 30969-04.htm">Return</a>
-</body></html>
+<a action="bypass -h Quest Q00351_BlackSwan 30969-03.html">Return</a>
+</body></html>

+ 5 - 0
L2J_DataPack/dist/game/data/scripts/quests/Q00351_BlackSwan/30969-06.html

@@ -0,0 +1,5 @@
+<html><body>Iason Heine:<br>
+Oh yes, that is definitely the cargo that was stolen from our trade guild. But this is not all of it. There is still much to be recovered. Please continue to look for it.<br>
+Ah, the reward. I only have a small amount of cash on me. I'll tell you what, take this bill to <font color="LEVEL">Head Blacksmith Roman</font> of the Blacksmith Guild. He will take care of you.<br>
+<a action="bypass -h Quest Q00351_BlackSwan 30969-03.html">Return</a>
+</body></html>

+ 3 - 3
L2J_DataPack/dist/game/data/scripts/quests/351_BlackSwan/30969-05.htm → L2J_DataPack/dist/game/data/scripts/quests/Q00351_BlackSwan/30969-07.html

@@ -1,6 +1,6 @@
 <html><body>Iason Heine:<br>
 How can you leave us like this? Most of our stolen cargo has yet to be recovered... and, even more importantly, the Tasaba lizardmen are increasingly threatening our precious Innadril!<br>
 ... Do you know something I don't? Please reconsider your decision!<br>
-<a action="bypass -h Quest 351_BlackSwan 30969-04.htm">Return</a>
-<a action="bypass -h Quest 351_BlackSwan 30969-06.htm">Quit the task.</a>
-</body></html>
+<a action="bypass -h Quest Q00351_BlackSwan 30969-03.html">Return</a><br>
+<a action="bypass -h Quest Q00351_BlackSwan 30969-09.html">"I quit."</a>
+</body></html>

+ 2 - 2
L2J_DataPack/dist/game/data/scripts/quests/351_BlackSwan/30969-06.htm → L2J_DataPack/dist/game/data/scripts/quests/Q00351_BlackSwan/30969-08.html

@@ -1,4 +1,4 @@
 <html><body>Iason Heine:<br>
 OK, look, you can quit any time you want to, but you still need to be paid, right? Let's take care of that and then talk about whether or not you'll quit...<br>
-<a action="bypass -h Quest 351_BlackSwan 30969-04.htm">Return</a>
-</body></html>
+<a action="bypass -h Quest Q00351_BlackSwan 30969-03.html">Return</a>
+</body></html>

+ 1 - 1
L2J_DataPack/dist/game/data/scripts/quests/351_BlackSwan/30969-07.htm → L2J_DataPack/dist/game/data/scripts/quests/Q00351_BlackSwan/30969-09.html

@@ -1,3 +1,3 @@
 <html><body>Iason Heine:<br>
 You are very hard-headed! Well, as I said, you are free to go. Have a safe trip... and don't forget to come and visit me occasionally.
-</body></html>
+</body></html>

+ 228 - 0
L2J_DataPack/dist/game/data/scripts/quests/Q00351_BlackSwan/Q00351_BlackSwan.java

@@ -0,0 +1,228 @@
+/*
+ * 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.Q00351_BlackSwan;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import quests.Q00345_MethodToRaiseTheDead.Q00345_MethodToRaiseTheDead;
+
+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.quest.Quest;
+import com.l2jserver.gameserver.model.quest.QuestState;
+import com.l2jserver.gameserver.util.Util;
+
+/**
+ * Black Swan (351)
+ * @author Adry_85
+ */
+public final class Q00351_BlackSwan extends Quest
+{
+	// NPCs
+	private static final int ROMAN = 30897;
+	private static final int GOSTA = 30916;
+	private static final int IASON_HEINE = 30969;
+	// Items
+	private static final int ORDER_OF_GOSTA = 4296;
+	private static final int LIZARD_FANG = 4297;
+	private static final int BARREL_OF_LEAGUE = 4298;
+	private static final int BILL_OF_IASON_HEINE = 4407;
+	// Misc
+	private static final int MIN_LEVEL = 32;
+	// Monsters
+	private static final int TASABA_LIZARDMAN1 = 20784;
+	private static final int TASABA_LIZARDMAN_SHAMAN1 = 20785;
+	private static final int TASABA_LIZARDMAN2 = 21639;
+	private static final int TASABA_LIZARDMAN_SHAMAN2 = 21640;
+	private static final Map<Integer, Integer> MONSTER_DROP_CHANCES = new HashMap<>();
+	static
+	{
+		MONSTER_DROP_CHANCES.put(TASABA_LIZARDMAN1, 4);
+		MONSTER_DROP_CHANCES.put(TASABA_LIZARDMAN_SHAMAN1, 3);
+		MONSTER_DROP_CHANCES.put(TASABA_LIZARDMAN2, 4);
+		MONSTER_DROP_CHANCES.put(TASABA_LIZARDMAN_SHAMAN2, 3);
+	}
+	
+	public Q00351_BlackSwan()
+	{
+		super(351, Q00351_BlackSwan.class.getSimpleName(), "Black Swan");
+		addStartNpc(GOSTA, ROMAN);
+		addTalkId(GOSTA, IASON_HEINE, ROMAN);
+		addKillId(TASABA_LIZARDMAN1, TASABA_LIZARDMAN_SHAMAN1, TASABA_LIZARDMAN2, TASABA_LIZARDMAN_SHAMAN2);
+		registerQuestItems(ORDER_OF_GOSTA, LIZARD_FANG, BARREL_OF_LEAGUE);
+	}
+	
+	@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 "30916-02.htm":
+			case "30969-03.html":
+			{
+				htmltext = event;
+				break;
+			}
+			case "30916-03.htm":
+			{
+				giveItems(player, ORDER_OF_GOSTA, 1);
+				qs.startQuest();
+				htmltext = event;
+				break;
+			}
+			case "30969-02.html":
+			{
+				final long lizardFangCount = getQuestItemsCount(player, LIZARD_FANG);
+				
+				if (lizardFangCount == 0)
+				{
+					htmltext = event;
+				}
+				else
+				{
+					final long adenaBonus = (lizardFangCount >= 10) ? 3880 : 0;
+					giveAdena(player, adenaBonus + (20 * lizardFangCount), true);
+					takeItems(player, LIZARD_FANG, -1);
+					htmltext = "30969-04.html";
+				}
+				break;
+			}
+			case "30969-05.html":
+			{
+				final long barrelOfLeagueCount = getQuestItemsCount(player, BARREL_OF_LEAGUE);
+				
+				if (barrelOfLeagueCount == 0)
+				{
+					htmltext = event;
+				}
+				else
+				{
+					giveItems(player, BILL_OF_IASON_HEINE, barrelOfLeagueCount);
+					giveAdena(player, 3880, true);
+					takeItems(player, BARREL_OF_LEAGUE, -1);
+					qs.setCond(2);
+					htmltext = "30969-06.html";
+				}
+				break;
+			}
+			case "30969-07.html":
+			{
+				htmltext = (!hasQuestItems(player, BARREL_OF_LEAGUE, LIZARD_FANG)) ? event : "30969-08.html";
+				break;
+			}
+			case "30969-09.html":
+			{
+				htmltext = event;
+				qs.exitQuest(true, true);
+				break;
+			}
+		}
+		return htmltext;
+	}
+	
+	@Override
+	public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
+	{
+		final QuestState qs = getRandomPartyMemberState(killer, -1, 3, npc);
+		
+		if ((qs == null) || !Util.checkIfInRange(1500, npc, killer, true))
+		{
+			return null;
+		}
+		
+		final int random = getRandom(20);
+		if (random < 10)
+		{
+			giveItems(qs.getPlayer(), LIZARD_FANG, 1);
+			playSound(qs.getPlayer(), QuestSound.ITEMSOUND_QUEST_ITEMGET);
+			
+			if (getRandom(20) == 0)
+			{
+				giveItems(qs.getPlayer(), BARREL_OF_LEAGUE, 1);
+			}
+		}
+		else if (random < 15)
+		{
+			giveItems(qs.getPlayer(), LIZARD_FANG, 2);
+			playSound(qs.getPlayer(), QuestSound.ITEMSOUND_QUEST_ITEMGET);
+			
+			if (getRandom(20) == 0)
+			{
+				giveItems(qs.getPlayer(), BARREL_OF_LEAGUE, 1);
+			}
+		}
+		else if (getRandom(100) < MONSTER_DROP_CHANCES.get(npc.getId()))
+		{
+			giveItems(qs.getPlayer(), BARREL_OF_LEAGUE, 1);
+			playSound(qs.getPlayer(), QuestSound.ITEMSOUND_QUEST_ITEMGET);
+		}
+		
+		return super.onKill(npc, killer, isSummon);
+	}
+	
+	@Override
+	public String onTalk(L2Npc npc, L2PcInstance player)
+	{
+		QuestState qs = getQuestState(player, true);
+		QuestState qs2 = player.getQuestState(Q00345_MethodToRaiseTheDead.class.getSimpleName());
+		String htmltext = getNoQuestMsg(player);
+		
+		switch (npc.getId())
+		{
+			case GOSTA:
+			{
+				if (qs.isCreated())
+				{
+					htmltext = (player.getLevel() >= MIN_LEVEL) ? "30916-01.htm" : "30916-04.html";
+				}
+				else if (qs.isStarted())
+				{
+					htmltext = "30916-05.html";
+				}
+				break;
+			}
+			case IASON_HEINE:
+			{
+				if (qs.isStarted())
+				{
+					htmltext = "30969-01.html";
+				}
+				break;
+			}
+			case ROMAN:
+			{
+				if (qs.isStarted() || ((qs2 != null) && qs2.isStarted()))
+				{
+					htmltext = (hasQuestItems(player, BILL_OF_IASON_HEINE)) ? "30897-01.html" : "30897-02.html";
+				}
+				break;
+			}
+		}
+		return htmltext;
+	}
+}

+ 2 - 0
L2J_DataPack/dist/game/data/scripts/quests/QuestMasterHandler.java

@@ -288,6 +288,7 @@ import quests.Q00344_1000YearsTheEndOfLamentation.Q00344_1000YearsTheEndOfLament
 import quests.Q00345_MethodToRaiseTheDead.Q00345_MethodToRaiseTheDead;
 import quests.Q00347_GoGetTheCalculator.Q00347_GoGetTheCalculator;
 import quests.Q00350_EnhanceYourWeapon.Q00350_EnhanceYourWeapon;
+import quests.Q00351_BlackSwan.Q00351_BlackSwan;
 import quests.Q00352_HelpRoodRaiseANewPet.Q00352_HelpRoodRaiseANewPet;
 import quests.Q00354_ConquestOfAlligatorIsland.Q00354_ConquestOfAlligatorIsland;
 import quests.Q00355_FamilyHonor.Q00355_FamilyHonor;
@@ -736,6 +737,7 @@ public class QuestMasterHandler
 		Q00345_MethodToRaiseTheDead.class,
 		Q00347_GoGetTheCalculator.class,
 		Q00350_EnhanceYourWeapon.class,
+		Q00351_BlackSwan.class,
 		Q00352_HelpRoodRaiseANewPet.class,
 		Q00354_ConquestOfAlligatorIsland.class,
 		Q00355_FamilyHonor.class,

+ 2 - 1
L2J_DataPack/dist/sql/game/updates/20141122update.sql

@@ -1,3 +1,4 @@
 UPDATE character_quests SET name='Q00228_TestOfMagus' WHERE name='228_TestOfMagus'; 
 UPDATE character_quests SET name='Q00229_TestOfWitchcraft' WHERE name='229_TestOfWitchcraft'; 
-UPDATE character_quests SET name='Q00232_TestOfTheLord' WHERE name='232_TestOfLord'; 
+UPDATE character_quests SET name='Q00232_TestOfTheLord' WHERE name='232_TestOfLord'; 
+UPDATE character_quests SET name='Q00351_BlackSwan' WHERE name='351_BlackSwan';