浏览代码

Retail-like quest Treasure Hunt (383).

Adry_85 10 年之前
父节点
当前提交
8ef027819b
共有 35 个文件被更改,包括 421 次插入163 次删除
  1. 0 1
      L2J_DataPack/dist/game/data/scripts.cfg
  2. 0 3
      L2J_DataPack/dist/game/data/scripts/quests/383_SearchingForTreasure/30890-00.htm
  3. 0 6
      L2J_DataPack/dist/game/data/scripts/quests/383_SearchingForTreasure/30890-01.htm
  4. 0 6
      L2J_DataPack/dist/game/data/scripts/quests/383_SearchingForTreasure/30890-01a.htm
  5. 0 6
      L2J_DataPack/dist/game/data/scripts/quests/383_SearchingForTreasure/30890-02.htm
  6. 0 5
      L2J_DataPack/dist/game/data/scripts/quests/383_SearchingForTreasure/30890-02a.htm
  7. 0 3
      L2J_DataPack/dist/game/data/scripts/quests/383_SearchingForTreasure/30890-02b.htm
  8. 0 5
      L2J_DataPack/dist/game/data/scripts/quests/383_SearchingForTreasure/30890-03.htm
  9. 0 4
      L2J_DataPack/dist/game/data/scripts/quests/383_SearchingForTreasure/30890-03a.htm
  10. 0 6
      L2J_DataPack/dist/game/data/scripts/quests/383_SearchingForTreasure/30890-05.htm
  11. 0 3
      L2J_DataPack/dist/game/data/scripts/quests/383_SearchingForTreasure/30890-07.htm
  12. 0 4
      L2J_DataPack/dist/game/data/scripts/quests/383_SearchingForTreasure/31148-01.htm
  13. 0 3
      L2J_DataPack/dist/game/data/scripts/quests/383_SearchingForTreasure/31148-02.htm
  14. 0 3
      L2J_DataPack/dist/game/data/scripts/quests/383_SearchingForTreasure/31148-03.htm
  15. 0 98
      L2J_DataPack/dist/game/data/scripts/quests/383_SearchingForTreasure/__init__.py
  16. 6 0
      L2J_DataPack/dist/game/data/scripts/quests/Q00383_TreasureHunt/30890-01.html
  17. 6 0
      L2J_DataPack/dist/game/data/scripts/quests/Q00383_TreasureHunt/30890-02.html
  18. 6 0
      L2J_DataPack/dist/game/data/scripts/quests/Q00383_TreasureHunt/30890-03.htm
  19. 5 0
      L2J_DataPack/dist/game/data/scripts/quests/Q00383_TreasureHunt/30890-04.htm
  20. 5 0
      L2J_DataPack/dist/game/data/scripts/quests/Q00383_TreasureHunt/30890-05.htm
  21. 6 0
      L2J_DataPack/dist/game/data/scripts/quests/Q00383_TreasureHunt/30890-06.htm
  22. 5 0
      L2J_DataPack/dist/game/data/scripts/quests/Q00383_TreasureHunt/30890-07.htm
  23. 2 2
      L2J_DataPack/dist/game/data/scripts/quests/Q00383_TreasureHunt/30890-08.html
  24. 5 0
      L2J_DataPack/dist/game/data/scripts/quests/Q00383_TreasureHunt/30890-09.html
  25. 5 5
      L2J_DataPack/dist/game/data/scripts/quests/Q00383_TreasureHunt/30890-10.html
  26. 9 0
      L2J_DataPack/dist/game/data/scripts/quests/Q00383_TreasureHunt/30890-11.html
  27. 3 0
      L2J_DataPack/dist/game/data/scripts/quests/Q00383_TreasureHunt/30890-12.html
  28. 5 0
      L2J_DataPack/dist/game/data/scripts/quests/Q00383_TreasureHunt/30890-13.html
  29. 3 0
      L2J_DataPack/dist/game/data/scripts/quests/Q00383_TreasureHunt/30890-14.html
  30. 4 0
      L2J_DataPack/dist/game/data/scripts/quests/Q00383_TreasureHunt/31148-01.html
  31. 3 0
      L2J_DataPack/dist/game/data/scripts/quests/Q00383_TreasureHunt/31148-02.html
  32. 3 0
      L2J_DataPack/dist/game/data/scripts/quests/Q00383_TreasureHunt/31148-03.html
  33. 337 0
      L2J_DataPack/dist/game/data/scripts/quests/Q00383_TreasureHunt/Q00383_TreasureHunt.java
  34. 2 0
      L2J_DataPack/dist/game/data/scripts/quests/QuestMasterHandler.java
  35. 1 0
      L2J_DataPack/dist/sql/game/updates/20141130update.sql

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

@@ -235,7 +235,6 @@ quests/343_UnderTheShadowOfTheIvoryTower/__init__.py
 quests/348_ArrogantSearch/__init__.py
 quests/372_LegacyOfInsolence/__init__.py
 quests/373_SupplierOfReagents/__init__.py
-quests/383_SearchingForTreasure/__init__.py
 quests/384_WarehouseKeepersPastime/__init__.py
 quests/386_StolenDignity/__init__.py
 quests/419_GetAPet/__init__.py

+ 0 - 3
L2J_DataPack/dist/game/data/scripts/quests/383_SearchingForTreasure/30890-00.htm

@@ -1,3 +0,0 @@
-<html><body>Trader Espen:<br>
-There is now way i can help you! If you brought back some<font color="LEVEL"> treasure maps</font> then we would figure something out! Till then bye!
-</body></html>

+ 0 - 6
L2J_DataPack/dist/game/data/scripts/quests/383_SearchingForTreasure/30890-01.htm

@@ -1,6 +0,0 @@
-<html><body>Trader Espen:<br>
-As a way of escaping my boring daily life, I have a hobby of collecting pirate memoribilia. I'm especially intrested in anything to do with Zaken, the legendary scourge of high seas.<br>
-It is said that he was once Zaken's boatswain, and when Zaken's ship was anchored at Innadril Harbor, he made off with a few treasure chests and stashed them somewhere on Alligator Island.<br>
-But, the exact location of the treasure chests hasn't been discovered yet...<br>
-<a action="bypass -h Quest 383_SearchingForTreasure 30890-02a.htm">Show him the pirates treasure map.</a>
-</body></html>

+ 0 - 6
L2J_DataPack/dist/game/data/scripts/quests/383_SearchingForTreasure/30890-01a.htm

@@ -1,6 +0,0 @@
-<html><body>Trader Espen:<br>
-As a way of escaping my boring daily life, I have a hobby of collecting pirate memoribilia. I'm especially intrested in anything to do with Zaken, the legendary scourge of high seas.<br>
-It is said that he was once Zaken's boatswain, and when Zaken's ship was anchored at Innadril Harbor, he made off with a few treasure chests and stashed them somewhere on Alligator Island.<br>
-But, the exact location of the treasure chests hasn't been discovered yet...<br>
-<font color="LEVEL">(Quest for characters level 42 or above)</font>
-</body></html>

+ 0 - 6
L2J_DataPack/dist/game/data/scripts/quests/383_SearchingForTreasure/30890-02.htm

@@ -1,6 +0,0 @@
-<html><body>Trader Espen:<br>
-Humph! I guess you're not as stupid as you look... Well, although it's only a part of it, it will lead you to the treasure of the great pirate Zaken... I know that you don't want to give up the map so easily.<br>
-Hey, listen! Wouldn't you like to know what kind of treasure is hidden out there? Just the sight of that map makes my heart pound like a drum!<br>
-How about this? I'll decipher and interpret the map for you, then you go and find the treasure. In exchange for my services, all i want is the treasure map. I'd like to keep it as a souvenir. What do you think?<br>
-<a action="bypass -h Quest 383_SearchingForTreasure 30890-03.htm">"I accept your offer."</a>
-</body></html>

+ 0 - 5
L2J_DataPack/dist/game/data/scripts/quests/383_SearchingForTreasure/30890-02a.htm

@@ -1,5 +0,0 @@
-<html><body>Trader Espen:<br>
-Oh Oh?! Could it be...? Is that really Muska's map? Where did you find it? Let me buy the map from you! It won't do you any good anyway. Why should you keep it? I'll pay you 1000 adena for it!<br>
-<a action="bypass -h Quest 383_SearchingForTreasure 30890-02b.htm">Sell the map</a><br>
-<a action="bypass -h Quest 383_SearchingForTreasure 30890-02.htm">"I don't want to sell it."</a>
-</body></html>

+ 0 - 3
L2J_DataPack/dist/game/data/scripts/quests/383_SearchingForTreasure/30890-02b.htm

@@ -1,3 +0,0 @@
-<html><body>Trader Espen:<br>
-Good! Here's your money, hehe. Keep coming whenever you find another of these pieces. We'll have a deal for sure.
-</body></html>

+ 0 - 5
L2J_DataPack/dist/game/data/scripts/quests/383_SearchingForTreasure/30890-03.htm

@@ -1,5 +0,0 @@
-<html><body>Trader Espen:<br>
-Heh Heh Heh... Ah, yes, good decision. You won't regret your decision...<br>
-Before I begin, let me tell you a story about the pirate Zaken and his traitorous boatswain, Muska. Listen carefully, as this information will be quite helpful to you in the future.<br>
-<a action="bypass -h Quest 383_SearchingForTreasure 30890-04.htm">"I'm listening."</a>
-</body></html>

+ 0 - 4
L2J_DataPack/dist/game/data/scripts/quests/383_SearchingForTreasure/30890-03a.htm

@@ -1,4 +0,0 @@
-<html><body>Trader Espen:<br>
-So, you are still here? Haven't you go for your treasure yet!?<br>
-I've put a mark on your map already!
-</body></html>

+ 0 - 6
L2J_DataPack/dist/game/data/scripts/quests/383_SearchingForTreasure/30890-05.htm

@@ -1,6 +0,0 @@
-<html><body>Trader Espen:<br>
-Unfortunately, Muska made a bad choice when he fell in love with Fatima. Her heart concealed dark tendencies...
-While her lover was risking his life stealing treasure, she had already found herself a lover in Heine, and was plotting to betray Muska...<br>
-When Muska returned to her after hiding the treasure somewhere, Fatima gave him poison and he died.<br>
-<a action="bypass -h Quest 383_SearchingForTreasure 30890-06.htm">"Continue to listen to the story."</a>
-</body></html>

+ 0 - 3
L2J_DataPack/dist/game/data/scripts/quests/383_SearchingForTreasure/30890-07.htm

@@ -1,3 +0,0 @@
-<html><body>Trader Espen:<br>
-Not much left to say, just go get it! Good Luck!
-</body></html>

+ 0 - 4
L2J_DataPack/dist/game/data/scripts/quests/383_SearchingForTreasure/31148-01.htm

@@ -1,4 +0,0 @@
-<html><body>Pirate's Chest:<br>
-Muska's treasure could be inside...<br>
-<a action="bypass -h Quest 383_SearchingForTreasure 31148-02.htm">Open the chest</a>
-</body></html>

+ 0 - 3
L2J_DataPack/dist/game/data/scripts/quests/383_SearchingForTreasure/31148-02.htm

@@ -1,3 +0,0 @@
-<html><body>Pirate's Chest:<br>
-Here are the chest contents..
-</body></html>

+ 0 - 3
L2J_DataPack/dist/game/data/scripts/quests/383_SearchingForTreasure/31148-03.htm

@@ -1,3 +0,0 @@
-<html><body>Pirate's Chest:<br>
-You can't open the chest since you don't have a<font color="LEVEL"> Key of Thief</font>.
-</body></html>

+ 0 - 98
L2J_DataPack/dist/game/data/scripts/quests/383_SearchingForTreasure/__init__.py

@@ -1,98 +0,0 @@
-# Made by mtrix & 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 import Quest as JQuest
-
-qn = "383_SearchingForTreasure"
-
-SHARK=20314
-PIRATES_TREASURE_MAP = 5915
-PIRATES_CHEST = 31148
-ESPEN = 30890
-
-#itemid:[maxqty,chance in 1000].
-REWARDS={1338:[2,150],3452:[1,140],1337:[1,130],3455:[1,120],4409:[1,220],4408:[1,220],4418:[1,220],4419:[1,220],956:[1,15],952:[1,8],2451:[1,2],2450:[1,2]}
-
-class Quest (JQuest) :
-
- def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)
-
- def onEvent (self,event,st) :
-     htmltext = event
-     if event == "30890-03.htm" :
-        st.set("cond","1")
-        st.setState(State.STARTED)
-     elif event == "30890-07.htm" :
-        if st.getQuestItemsCount(PIRATES_TREASURE_MAP) :
-           st.set("cond","2")
-           st.takeItems(PIRATES_TREASURE_MAP,1)
-           st.addSpawn(PIRATES_CHEST,106583,197747,-4209,900000)
-           st.addSpawn(SHARK,106570,197740,-4209,900000)
-           st.addSpawn(SHARK,106580,197747,-4209,900000)
-           st.addSpawn(SHARK,106590,197743,-4209,900000)
-           st.playSound("ItemSound.quest_accept")
-        else:
-           htmltext="You don't have required items"
-           st.exitquest(1)
-     elif event == "30890-02b.htm":
-        if st.getQuestItemsCount(PIRATES_TREASURE_MAP) :
-           st.takeItems(PIRATES_TREASURE_MAP,1)
-           st.giveItems(57,1000)
-           st.playSound("ItemSound.quest_finish")
-        else:
-           htmltext="You don't have required items"
-        st.exitQuest(1)
-     elif event == "31148-02.htm":
-        if st.getQuestItemsCount(1661):
-           st.takeItems(1661,1)
-           st.giveItems(57,500+(self.getRandom(5)*300))
-           count=0
-           while count < 1 :
-             for item in REWARDS.keys() :
-              qty,chance=REWARDS[item]
-              if self.getRandom(1000) < chance and count < 2 :
-                 st.giveItems(item,self.getRandom(qty)+1)
-                 count+=1
-              if count < 2 :
-                for i in range(4481,4505) :
-                  if self.getRandom(500) == 1 and count < 2 :
-                     st.giveItems(i,1)
-                     count+=1
-           st.playSound("ItemSound.quest_finish")
-           st.exitQuest(1)
-        else :
-           htmltext = "31148-03.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 id == State.CREATED :
-       if player.getLevel() >= 42:  
-          if st.getQuestItemsCount(PIRATES_TREASURE_MAP) :
-            htmltext = "30890-01.htm"
-          else :
-            htmltext = "30890-00.htm"
-            st.exitQuest(1)
-       else :
-          htmltext = "30890-01a.htm"
-          st.exitQuest(1)
-     elif npcId == ESPEN :
-        htmltext = "30890-03a.htm"
-     elif npcId == PIRATES_CHEST and st.getInt("cond") == 2 and id == State.STARTED:
-        htmltext = "31148-01.htm"
-     return htmltext
-
-QUEST       = Quest(383,qn,"Searching For Treasure")
-
-
-QUEST.addStartNpc(ESPEN)
-
-QUEST.addTalkId(ESPEN)
-
-QUEST.addTalkId(PIRATES_CHEST)

+ 6 - 0
L2J_DataPack/dist/game/data/scripts/quests/Q00383_TreasureHunt/30890-01.html

@@ -0,0 +1,6 @@
+<html><body>Trader Espen:<br>
+As a way of escaping my boring daily life, I have a hobby of collecting pirate memorabilia. I'm especially interested in anything to do with Zaken, the legendary scourge of the high seas.<br>
+Currently, I'm conducting research about Muska, Zaken's subordinate who stole his treasure and ran away. It is said that he was once Zaken's boatswain, and when Zaken's ship was anchored at Innadril Harbor, he made off with a few Treasure Chests and stashed them somewhere on Alligator Island. Isn't that interesting?<br>
+Soon, I plan to organize an expedition and go look for the treasure. Of course, I will need to hire seasoned adventurers...<br>
+(This quest may only be undertaken by a character who possesses the Pirate's Treasure Map and whose level is 42 or above.)
+</body></html>

+ 6 - 0
L2J_DataPack/dist/game/data/scripts/quests/Q00383_TreasureHunt/30890-02.html

@@ -0,0 +1,6 @@
+<html><body>Trader Espen:<br>
+As a way of escaping my boring daily life, I have a hobby of collecting pirate memorabilia. I'm especially interested in anything to do with Zaken, the legendary scourge of the high seas.<br>
+It is said that he was once Zaken's boatswain, and when Zaken's ship was anchored at Innadril Harbor, he made off with a few Treasure Chests and stashed them somewhere on Alligator Island.<br>
+I don't know the exact location of the Treasure Chests... Muska was certainly no fool... he must have drawn a Map...<br>
+(This quest may only be undertaken by a character who possesses the Pirate's Treasure Map and whose level is 42 or above.)
+</body></html>

+ 6 - 0
L2J_DataPack/dist/game/data/scripts/quests/Q00383_TreasureHunt/30890-03.htm

@@ -0,0 +1,6 @@
+<html><body>Trader Espen:<br>
+As a way of escaping my boring daily life, I have a hobby of collecting pirate memorabilia. I'm especially interested in anything to do with Zaken, the legendary scourge of the high seas.<br>
+It is said that he was once Zaken's boatswain, and when Zaken's ship was anchored at Innadril Harbor, he made off with a few Treasure Chests and stashed them somewhere on Alligator Island.<br>
+But, the exact location of the Treasure Chests hasn't been discovered yet...<br>
+<a action="bypass -h Quest Q00383_TreasureHunt 30890-04.htm">Show him the Pirate's Treasure Map.</a>
+</body></html>

+ 5 - 0
L2J_DataPack/dist/game/data/scripts/quests/Q00383_TreasureHunt/30890-04.htm

@@ -0,0 +1,5 @@
+<html><body>Trader Espen:<br>
+Oh Oh?! Could it be...? Is that really Muska's Map? Where did you find it? Let me buy the Map from you! It won't do you any good anyway. Why should you keep it? I'll pay you 1000 Adena for it!<br>
+<a action="bypass -h Quest Q00383_TreasureHunt 30890-05.htm">Sell the Map.</a><br>
+<a action="bypass -h Quest Q00383_TreasureHunt 30890-06.htm">"I don't want to sell it."</a>
+</body></html>

+ 5 - 0
L2J_DataPack/dist/game/data/scripts/quests/Q00383_TreasureHunt/30890-05.htm

@@ -0,0 +1,5 @@
+<html><body>Trader Espen:<br>
+Do you mean it? Are you sure you won't regret your decision? Here... Here is 1000 Adena. Ha! Finally, I have Muska's treasure Map! This is truly the chance of a lifetime. At last, Lady Luck smiled on me. I can give up my job as a trader and just enjoy being filthy rich!<br>
+Let me see... where would the treasure be...? First I must decipher the pirates' jargon...<br>
+Hmm? What are you still doing here? Go away! This Map is mine! You're an adventurer, so go and have one!
+</body></html>

+ 6 - 0
L2J_DataPack/dist/game/data/scripts/quests/Q00383_TreasureHunt/30890-06.htm

@@ -0,0 +1,6 @@
+<html><body>Trader Espen:<br>
+Humph! I guess you're not as stupid as you look... Well, although it's only a part of it, it will lead you to the treasure of the great Pirate Captain Zaken... I know that you don't want to give up the Map so easily.<br>
+Hey, listen! Wouldn't you like to know what kind of treasure is hidden out there? Just the sight of that Map makes my heart pound like a drum!<br>
+How about this? I'll decipher and interpret the Map for you, then you go and find the treasure. In exchange for my services, all I want is the treasure Map. I'd like to keep it as a souvenir. What do you think?<br>
+<a action="bypass -h Quest Q00383_TreasureHunt 30890-07.htm">"I accept your offer."</a>
+</body></html>

+ 5 - 0
L2J_DataPack/dist/game/data/scripts/quests/Q00383_TreasureHunt/30890-07.htm

@@ -0,0 +1,5 @@
+<html><body>Trader Espen:<br>
+Heh Heh Heh... Ah, yes, good decision. You won't regret your decision...<br>
+Before I begin, let me tell you a story about the Pirate Captain Zaken and his traitorous boatswain, Muska. Listen carefully, as this information will be quite helpful to you in the future.<br>
+<a action="bypass -h Quest Q00383_TreasureHunt 30890-08.html">"I'm listening."</a>
+</body></html>

+ 2 - 2
L2J_DataPack/dist/game/data/scripts/quests/383_SearchingForTreasure/30890-04.htm → L2J_DataPack/dist/game/data/scripts/quests/Q00383_TreasureHunt/30890-08.html

@@ -2,6 +2,6 @@
 At one time Muska was a faithful underling of Zaken. But, when Zaken's ship was anchored here in Heine, he fell in love with Fatima, a woman from Abella.<br>
 Fatima seduced Muska and convinced him to betray his captain and steal the treasure.<br>
 Blinded by love, Muska violated the cardinal rule of pirates by betraying his captain and fled with the captain's treasure! To escape his pursuers, he hid himself on Alligator Island and secreted the treasure away there.<br>
-To remember the location of the treasure, he draw a map. It is the map you are now holding in your hand.<br>
-<a action="bypass -h Quest 383_SearchingForTreasure 30890-05.htm">"Continue to listen to the story."</a>
+To remember the location of the treasure, he drew a Map. It is the Map you are now holding in your hand.<br>
+<a action="bypass -h Quest Q00383_TreasureHunt 30890-09.html">Continue to listen to the story.</a>
 </body></html>

+ 5 - 0
L2J_DataPack/dist/game/data/scripts/quests/Q00383_TreasureHunt/30890-09.html

@@ -0,0 +1,5 @@
+<html><body>Trader Espen:<br>
+Unfortunately, Muska made a bad choice when he fell in love with Fatima. Her heart concealed dark tendencies... While her lover was risking his life stealing treasure, she had already found herself a lover in Heine, and was plotting to betray Muska...<br>
+When Muska returned to her after hiding the treasure somewhere, Fatima gave him poison and he died.<br>
+<a action="bypass -h Quest Q00383_TreasureHunt 30890-10.html">Continue to listen to the story.</a>
+</body></html>

+ 5 - 5
L2J_DataPack/dist/game/data/scripts/quests/383_SearchingForTreasure/30890-06.htm → L2J_DataPack/dist/game/data/scripts/quests/Q00383_TreasureHunt/30890-10.html

@@ -1,7 +1,7 @@
 <html><body>Trader Espen:<br>
-Muska was a hardened pirate as well, who greatly distrusted people... and Fatima was no exception. The treasure map found on Muska's corpse was written in code, and no one could decipher it.<br>
-When Zaken's ship ran aground on Devil's Isle and its captain and all of his crew were killed, it seemed the map would never be decoded.<br>
-Fatima, enraged by this turn of events, demanded her new lover go to Devil's Isle immediately and find the treasure for her at any cost. Fatima's unfortunate lover was a mere tailor by trade and soon went missing, along with Muska's treasure map...<br>
-It was widely believed that the map was lost for good, and now you show up with it!<br>
-<a action="bypass -h Quest 383_SearchingForTreasure 30890-07.htm">"I see."</a>
+Muska was a hardened pirate as well, who greatly distrusted people... and Fatima was no exception. The treasure Map found on Muska's corpse was written in code, and no one could decipher it.<br>
+When Zaken's ship ran aground on Devil's Isle and its captain and all of his crew were all killed, it seemed the Map would never be decoded.<br>
+Fatima, enraged by this turn of events, demanded her new lover go to Devil's Isle immediately and find the treasure for her at any cost. Fatima's unfortunate lover was a mere tailor by trade and soon went missing, along with Muska's treasure Map...<br>
+It was widely believed that the Map was lost for good, and now you show up with it!<br>
+<a action="bypass -h Quest Q00383_TreasureHunt 30890-11.html">Continue to listen to the story.</a>
 </body></html>

+ 9 - 0
L2J_DataPack/dist/game/data/scripts/quests/Q00383_TreasureHunt/30890-11.html

@@ -0,0 +1,9 @@
+<html><body>Trader Espen:<br>
+You should thank your lucky stars for running into me. Why? Because I'm the only person in the world who can decipher this Map.<br>
+I recently purchased Zaken's journal from some adventurers who had been exploring on Devil's Isle. It contained a detailed description of the method of decoding the pirates' jargon. Although Zaken was a seemingly fearless pirate who dominated all the great oceans, he was an unexpectedly cautious individual. He wrote a very detailed explanation of the code in his journal, as though he was afraid of forgetting how to decipher it...<br>
+Now, I've told you everything I know. Come on, show me the Map. Let's find out where the treasure is hidden!<br>
+These are the coordinates on the Map. Let me see... 12 feathers of parrot... 50 glasses of rum... the coordinates are...<br>
+Oh, it's right there! It is the northern part of Alligator Beach! Ha ha! It's not far from here. I will mark it on your Map.<br>
+Phew... all my life I have followed the legend of Zaken... And now my fate is just to interpret the Map for someone else... What a disappointment! Well, all I can do is ask you to be a brave treasure hunter...<br>
+Now, get going! Find the finale of the legend... Ah! One last piece of advice... To open a Treasure Chest you must first obtain a <font color="LEVEL">Thief Key</font>!
+</body></html>

+ 3 - 0
L2J_DataPack/dist/game/data/scripts/quests/Q00383_TreasureHunt/30890-12.html

@@ -0,0 +1,3 @@
+<html><body>Trader Espen:<br>
+Hey you... Do you or don't you have the treasure Map? You must have heard the rumor that I'm a great pirate aficionado. So, are you trying to rip me off? Get lost!
+</body></html>

+ 5 - 0
L2J_DataPack/dist/game/data/scripts/quests/Q00383_TreasureHunt/30890-13.html

@@ -0,0 +1,5 @@
+<html><body>Trader Espen:<br>
+This Map that you discovered on Alligator Island... Doesn't it make your heart pound just looking at it?<br>
+Ah, you want me to decipher it? Very well... But before I decipher the Map... first I must tell you the story of boatswain Muska, who betrayed Zaken, the great pirate. If you're going to search for Zaken's treasure, you should listen to the story first...<br>
+<a action="bypass -h Quest Q00383_TreasureHunt 30890-08.html">Listen to the story.</a>
+</body></html>

+ 3 - 0
L2J_DataPack/dist/game/data/scripts/quests/Q00383_TreasureHunt/30890-14.html

@@ -0,0 +1,3 @@
+<html><body>Trader Espen:<br>
+Welcome back, brave hunter! What?! You haven't found the treasure yet? Didn't I mark the coordinates on the Map for you? Take a closer look at your Map! If you go to the coordinates I marked, you will definitely find the treasure...!
+</body></html>

+ 4 - 0
L2J_DataPack/dist/game/data/scripts/quests/Q00383_TreasureHunt/31148-01.html

@@ -0,0 +1,4 @@
+<html><body>Pirate's Treasure Chest:<br>
+I found a locked Treasure Chest!<br>
+<a action="bypass -h Quest Q00383_TreasureHunt 31148-02.html">Open it.</a>
+</body></html>

+ 3 - 0
L2J_DataPack/dist/game/data/scripts/quests/Q00383_TreasureHunt/31148-02.html

@@ -0,0 +1,3 @@
+<html><body>Pirate's Treasure Chest:<br>
+The key worked, what shall I find inside?
+</body></html>

+ 3 - 0
L2J_DataPack/dist/game/data/scripts/quests/Q00383_TreasureHunt/31148-03.html

@@ -0,0 +1,3 @@
+<html><body>Pirate's Treasure Chest:<br>
+To open it you must obtain a <font color="LEVEL">Thief Key</font>.
+</body></html>

+ 337 - 0
L2J_DataPack/dist/game/data/scripts/quests/Q00383_TreasureHunt/Q00383_TreasureHunt.java

@@ -0,0 +1,337 @@
+/*
+ * 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.Q00383_TreasureHunt;
+
+import com.l2jserver.gameserver.model.actor.L2Npc;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.model.holders.ItemHolder;
+import com.l2jserver.gameserver.model.quest.Quest;
+import com.l2jserver.gameserver.model.quest.QuestState;
+
+/**
+ * Treasure Hunt (383)
+ * @author Adry_85
+ */
+public final class Q00383_TreasureHunt extends Quest
+{
+	// NPCs
+	private static final int ESPEN = 30890;
+	private static final int PIRATES_CHEST = 31148;
+	// Items
+	private static final int THIEF_KEY = 1661;
+	private static final int PIRATES_TREASURE_MAP = 5915;
+	// Misc
+	private static final int MIN_LEVEL = 42;
+	// Rewards
+	private static final ItemHolder SCROLL_ENCHANT_ARMOR_C = new ItemHolder(952, 1);
+	private static final ItemHolder SCROLL_ENCHANT_ARMOR_D = new ItemHolder(956, 1);
+	private static final ItemHolder EMERALD = new ItemHolder(1337, 1);
+	private static final ItemHolder BLUE_ONYX = new ItemHolder(1338, 2);
+	private static final ItemHolder ONYX = new ItemHolder(1339, 2);
+	private static final ItemHolder MITHRIL_GLOVES = new ItemHolder(2450, 1);
+	private static final ItemHolder SAGES_WORN_GLOVES = new ItemHolder(2451, 1);
+	private static final ItemHolder MOONSTONE = new ItemHolder(3447, 2);
+	private static final ItemHolder ALEXANDRITE = new ItemHolder(3450, 1);
+	private static final ItemHolder FIRE_EMERALD = new ItemHolder(3453, 1);
+	private static final ItemHolder IMPERIAL_DIAMOND = new ItemHolder(3456, 1);
+	private static final ItemHolder MUSICAL_SCORE_THEME_OF_LOVE = new ItemHolder(4408, 1);
+	private static final ItemHolder MUSICAL_SCORE_THEME_OF_BATTLE = new ItemHolder(4409, 1);
+	private static final ItemHolder MUSICAL_SCORE_THEME_OF_CELEBRATION = new ItemHolder(4418, 1);
+	private static final ItemHolder MUSICAL_SCORE_THEME_OF_COMEDY = new ItemHolder(4419, 1);
+	private static final ItemHolder DYE_S1C3_C = new ItemHolder(4481, 1); // Greater Dye of STR <Str+1 Con-3>
+	private static final ItemHolder DYE_S1D3_C = new ItemHolder(4482, 1); // Greater Dye of STR <Str+1 Dex-3>
+	private static final ItemHolder DYE_C1S3_C = new ItemHolder(4483, 1); // Greater Dye of CON<Con+1 Str-3>
+	private static final ItemHolder DYE_C1C3_C = new ItemHolder(4484, 1); // Greater Dye of CON<Con+1 Dex-3>
+	private static final ItemHolder DYE_D1S3_C = new ItemHolder(4485, 1); // Greater Dye of DEX <Dex+1 Str-3>
+	private static final ItemHolder DYE_D1C3_C = new ItemHolder(4486, 1); // Greater Dye of DEX <Dex+1 Con-3>
+	private static final ItemHolder DYE_I1M3_C = new ItemHolder(4487, 1); // Greater Dye of INT <Int+1 Men-3>
+	private static final ItemHolder DYE_I1W3_C = new ItemHolder(4488, 1); // Greater Dye of INT <Int+1 Wit-3>
+	private static final ItemHolder DYE_M1I3_C = new ItemHolder(4489, 1); // Greater Dye of MEN <Men+1 Int-3>
+	private static final ItemHolder DYE_M1W3_C = new ItemHolder(4490, 1); // Greater Dye of MEN <Men+1 Wit-3>
+	private static final ItemHolder DYE_W1I3_C = new ItemHolder(4491, 1); // Greater Dye of WIT <Wit+1 Int-3>
+	private static final ItemHolder DYE_W1M3_C = new ItemHolder(4492, 1); // Greater Dye of WIT <Wit+1 Men-3>
+	
+	public Q00383_TreasureHunt()
+	{
+		super(383, Q00383_TreasureHunt.class.getSimpleName(), "Treasure Hunt");
+		addStartNpc(ESPEN);
+		addTalkId(ESPEN, PIRATES_CHEST);
+	}
+	
+	@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 "30890-04.htm":
+			{
+				htmltext = event;
+				break;
+			}
+			case "30890-05.htm":
+			{
+				if (hasQuestItems(player, PIRATES_TREASURE_MAP))
+				{
+					giveAdena(player, 1000, false);
+					takeItems(player, PIRATES_TREASURE_MAP, -1);
+					htmltext = event;
+				}
+				break;
+			}
+			case "30890-06.htm":
+			{
+				htmltext = (hasQuestItems(player, PIRATES_TREASURE_MAP)) ? event : "30890-12.html";
+				break;
+			}
+			case "30890-07.htm":
+			{
+				if (hasQuestItems(player, PIRATES_TREASURE_MAP))
+				{
+					qs.startQuest();
+					takeItems(player, PIRATES_TREASURE_MAP, -1);
+					htmltext = event;
+				}
+				break;
+			}
+			case "30890-08.html":
+			case "30890-09.html":
+			case "30890-10.html":
+			{
+				if (qs.isCond(1))
+				{
+					htmltext = event;
+				}
+				break;
+			}
+			case "30890-11.html":
+			{
+				if (qs.isCond(1))
+				{
+					qs.setCond(2, true);
+					htmltext = event;
+				}
+				break;
+			}
+			case "31148-02.html":
+			{
+				if (qs.isCond(2))
+				{
+					if (hasQuestItems(player, THIEF_KEY))
+					{
+						takeItems(player, THIEF_KEY, -1);
+						qs.exitQuest(true, true);
+						htmltext = event;
+						
+						int bonus = 0;
+						int random = getRandom(100);
+						
+						if (random < 5)
+						{
+							rewardItems(player, MITHRIL_GLOVES);
+						}
+						else if (random < 6)
+						{
+							rewardItems(player, SAGES_WORN_GLOVES);
+						}
+						else if (random < 18)
+						{
+							rewardItems(player, SCROLL_ENCHANT_ARMOR_D);
+						}
+						else if (random < 28)
+						{
+							rewardItems(player, SCROLL_ENCHANT_ARMOR_C);
+						}
+						else
+						{
+							bonus += 500;
+						}
+						
+						random = getRandom(1000);
+						
+						if (random < 25)
+						{
+							rewardItems(player, DYE_S1C3_C);
+						}
+						else if (random < 50)
+						{
+							rewardItems(player, DYE_S1D3_C);
+						}
+						else if (random < 75)
+						{
+							rewardItems(player, DYE_C1S3_C);
+						}
+						else if (random < 100)
+						{
+							rewardItems(player, DYE_C1C3_C);
+						}
+						else if (random < 125)
+						{
+							rewardItems(player, DYE_D1S3_C);
+						}
+						else if (random < 150)
+						{
+							rewardItems(player, DYE_D1C3_C);
+						}
+						else if (random < 175)
+						{
+							rewardItems(player, DYE_I1M3_C);
+						}
+						else if (random < 200)
+						{
+							rewardItems(player, DYE_I1W3_C);
+						}
+						else if (random < 225)
+						{
+							rewardItems(player, DYE_M1I3_C);
+						}
+						else if (random < 250)
+						{
+							rewardItems(player, DYE_M1W3_C);
+						}
+						else if (random < 275)
+						{
+							rewardItems(player, DYE_W1I3_C);
+						}
+						else if (random < 300)
+						{
+							rewardItems(player, DYE_W1M3_C);
+						}
+						else
+						{
+							bonus += 300;
+						}
+						
+						random = getRandom(100);
+						
+						if (random < 4)
+						{
+							rewardItems(player, EMERALD);
+						}
+						else if (random < 8)
+						{
+							rewardItems(player, BLUE_ONYX);
+						}
+						else if (random < 12)
+						{
+							rewardItems(player, ONYX);
+						}
+						else if (random < 16)
+						{
+							rewardItems(player, MOONSTONE);
+						}
+						else if (random < 20)
+						{
+							rewardItems(player, ALEXANDRITE);
+						}
+						else if (random < 25)
+						{
+							rewardItems(player, FIRE_EMERALD);
+						}
+						else if (random < 27)
+						{
+							rewardItems(player, IMPERIAL_DIAMOND);
+						}
+						else
+						{
+							bonus += 500;
+						}
+						
+						random = getRandom(100);
+						
+						if (random < 20)
+						{
+							rewardItems(player, MUSICAL_SCORE_THEME_OF_LOVE);
+						}
+						else if (random < 40)
+						{
+							rewardItems(player, MUSICAL_SCORE_THEME_OF_BATTLE);
+						}
+						else if (random < 60)
+						{
+							rewardItems(player, MUSICAL_SCORE_THEME_OF_CELEBRATION);
+						}
+						else if (random < 80)
+						{
+							rewardItems(player, MUSICAL_SCORE_THEME_OF_COMEDY);
+						}
+						else
+						{
+							bonus += 500;
+						}
+						
+						giveAdena(player, bonus, true);
+					}
+					else
+					{
+						htmltext = "31148-03.html";
+					}
+				}
+				break;
+			}
+		}
+		return htmltext;
+	}
+	
+	@Override
+	public String onTalk(L2Npc npc, L2PcInstance player)
+	{
+		final QuestState qs = getQuestState(player, true);
+		String htmltext = getNoQuestMsg(player);
+		if (qs.isCreated())
+		{
+			if (player.getLevel() >= MIN_LEVEL)
+			{
+				htmltext = (hasQuestItems(player, PIRATES_TREASURE_MAP)) ? "30890-03.htm" : "30890-02.html";
+			}
+			else
+			{
+				htmltext = "30890-01.html";
+			}
+		}
+		else if (qs.isStarted())
+		{
+			if (npc.getId() == ESPEN)
+			{
+				if (qs.isCond(1))
+				{
+					htmltext = "30890-13.html";
+				}
+				else if (qs.isCond(2))
+				{
+					htmltext = "30890-14.html";
+				}
+			}
+			else
+			{
+				if (qs.isCond(2))
+				{
+					htmltext = "31148-01.html";
+				}
+			}
+		}
+		return htmltext;
+	}
+}

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

@@ -318,6 +318,7 @@ import quests.Q00379_FantasyWine.Q00379_FantasyWine;
 import quests.Q00380_BringOutTheFlavorOfIngredients.Q00380_BringOutTheFlavorOfIngredients;
 import quests.Q00381_LetsBecomeARoyalMember.Q00381_LetsBecomeARoyalMember;
 import quests.Q00382_KailsMagicCoin.Q00382_KailsMagicCoin;
+import quests.Q00383_TreasureHunt.Q00383_TreasureHunt;
 import quests.Q00385_YokeOfThePast.Q00385_YokeOfThePast;
 import quests.Q00401_PathOfTheWarrior.Q00401_PathOfTheWarrior;
 import quests.Q00402_PathOfTheHumanKnight.Q00402_PathOfTheHumanKnight;
@@ -771,6 +772,7 @@ public class QuestMasterHandler
 		Q00380_BringOutTheFlavorOfIngredients.class,
 		Q00381_LetsBecomeARoyalMember.class,
 		Q00382_KailsMagicCoin.class,
+		Q00383_TreasureHunt.class,
 		Q00385_YokeOfThePast.class,
 		Q00401_PathOfTheWarrior.class,
 		Q00402_PathOfTheHumanKnight.class,

+ 1 - 0
L2J_DataPack/dist/sql/game/updates/20141130update.sql

@@ -0,0 +1 @@
+UPDATE character_quests SET name='Q00383_TreasureHunt' WHERE name='383_SearchingForTreasure';