瀏覽代碼

BETA: Retail-like quest '''Dig Up the Sea of Spores! ''' (356).

Adry_85 10 年之前
父節點
當前提交
960fd3f543
共有 31 個文件被更改,包括 259 次插入143 次删除
  1. 0 1
      L2J_DataPack_BETA/dist/game/data/scripts.cfg
  2. 0 4
      L2J_DataPack_BETA/dist/game/data/scripts/quests/356_DigUpTheSeaOfSpores/30717-0.htm
  3. 0 3
      L2J_DataPack_BETA/dist/game/data/scripts/quests/356_DigUpTheSeaOfSpores/30717-10.htm
  4. 0 3
      L2J_DataPack_BETA/dist/game/data/scripts/quests/356_DigUpTheSeaOfSpores/30717-2.htm
  5. 0 5
      L2J_DataPack_BETA/dist/game/data/scripts/quests/356_DigUpTheSeaOfSpores/30717-4.htm
  6. 0 3
      L2J_DataPack_BETA/dist/game/data/scripts/quests/356_DigUpTheSeaOfSpores/30717-5.htm
  7. 0 3
      L2J_DataPack_BETA/dist/game/data/scripts/quests/356_DigUpTheSeaOfSpores/30717-6.htm
  8. 0 6
      L2J_DataPack_BETA/dist/game/data/scripts/quests/356_DigUpTheSeaOfSpores/30717-7.htm
  9. 0 4
      L2J_DataPack_BETA/dist/game/data/scripts/quests/356_DigUpTheSeaOfSpores/30717-8.htm
  10. 0 106
      L2J_DataPack_BETA/dist/game/data/scripts/quests/356_DigUpTheSeaOfSpores/__init__.py
  11. 5 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00356_DigUpTheSeaOfSpores/30717-01.html
  12. 2 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00356_DigUpTheSeaOfSpores/30717-02.html
  13. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00356_DigUpTheSeaOfSpores/30717-03.html
  14. 2 2
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00356_DigUpTheSeaOfSpores/30717-04.html
  15. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00356_DigUpTheSeaOfSpores/30717-05.html
  16. 5 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00356_DigUpTheSeaOfSpores/30717-06.htm
  17. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00356_DigUpTheSeaOfSpores/30717-07.html
  18. 5 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00356_DigUpTheSeaOfSpores/30717-08.html
  19. 5 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00356_DigUpTheSeaOfSpores/30717-09.html
  20. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00356_DigUpTheSeaOfSpores/30717-10.html
  21. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00356_DigUpTheSeaOfSpores/30717-11.html
  22. 5 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00356_DigUpTheSeaOfSpores/30717-12.html
  23. 6 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00356_DigUpTheSeaOfSpores/30717-13.html
  24. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00356_DigUpTheSeaOfSpores/30717-14.html
  25. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00356_DigUpTheSeaOfSpores/30717-15.html
  26. 2 2
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00356_DigUpTheSeaOfSpores/30717-16.html
  27. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00356_DigUpTheSeaOfSpores/30717-17.html
  28. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00356_DigUpTheSeaOfSpores/30717-18.html
  29. 187 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00356_DigUpTheSeaOfSpores/Q00356_DigUpTheSeaOfSpores.java
  30. 2 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/QuestMasterHandler.java
  31. 1 0
      L2J_DataPack_BETA/dist/sql/game/updates/20141023update.sql

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

@@ -260,7 +260,6 @@ quests/348_ArrogantSearch/__init__.py
 quests/351_BlackSwan/__init__.py
 quests/352_HelpRoodRaiseANewPet/__init__.py
 quests/355_FamilyHonor/__init__.py
-quests/356_DigUpTheSeaOfSpores/__init__.py
 quests/371_ShriekOfGhosts/__init__.py
 quests/372_LegacyOfInsolence/__init__.py
 quests/373_SupplierOfReagents/__init__.py

+ 0 - 4
L2J_DataPack_BETA/dist/game/data/scripts/quests/356_DigUpTheSeaOfSpores/30717-0.htm

@@ -1,4 +0,0 @@
-<html><body>Magister Gauen:<br>
-Since the era of Shunaiman, the first emperor of the ancient Elmoreden Empire, the Mystic of the Ivory Tower have been researching the Sea of Spores. Around E.D 500 they constructed a force field tower which stopped the spread of the wretched sea. Their research has continued throughout the centuries<br>
-Althought the ancient barrier appears to be holding, the Sea of Spores continues to threaten us. A final solution to this problem must be found.<br>
-<a action="bypass -h Quest 356_DigUpTheSeaOfSpores 30717-1.htm">What can we do?</a></body></html>

+ 0 - 3
L2J_DataPack_BETA/dist/game/data/scripts/quests/356_DigUpTheSeaOfSpores/30717-10.htm

@@ -1,3 +0,0 @@
-<html><body>Magister Gauen:<br>
-Here we go... I acknowledge that I received from you 50 Herbivorous Spores and 50 Carnivorous Spores. Here is your reward. If you wish, come back and help me again. We have enough from now, but I'm sure that in the future we shall need more.
-</body></html>

+ 0 - 3
L2J_DataPack_BETA/dist/game/data/scripts/quests/356_DigUpTheSeaOfSpores/30717-2.htm

@@ -1,3 +0,0 @@
-<html><body>Magister Gauen:<br>
-I must have a tissue sample of an organism that has joined with spores and grown root.<font color="LEVEL"> Rotting Tree Spores</font> and<font color="LEVEL"> Spore zombies</font> will do nicely.<br>
-<a action="bypass -h Quest 356_DigUpTheSeaOfSpores 30717-3.htm">I'll do it.</a></body></html>

+ 0 - 5
L2J_DataPack_BETA/dist/game/data/scripts/quests/356_DigUpTheSeaOfSpores/30717-4.htm

@@ -1,5 +0,0 @@
-<html><body>Magister Gauen:<br>
-There are many different types of spores, all with unique and often dangerous characteristics. Are you sure you want to do this?<br>
-I think you'd need more experience in order to help us.<br>
-<font color="LEVEL">(Quest for characters level 43 or above)</font>
-</body></html>

+ 0 - 3
L2J_DataPack_BETA/dist/game/data/scripts/quests/356_DigUpTheSeaOfSpores/30717-5.htm

@@ -1,3 +0,0 @@
-<html><body>Magister Gauen:<br>
-Your resolve is admirable! Go and get the spores that live as parasites on<font color="LEVEL"> rotten trees</font> and<font color="LEVEL"> spore zombies</font>. Put the spores from the spore zombies in this grey pouch and put the spores from the rotten trees in this yellow pouch. The capacity of the pouches varies according to the size of the spores. Each puch usually holds about<font color="LEVEL"> 50</font> spores. Thank you for your assistance.
-</body></html>

+ 0 - 3
L2J_DataPack_BETA/dist/game/data/scripts/quests/356_DigUpTheSeaOfSpores/30717-6.htm

@@ -1,3 +0,0 @@
-<html><body>Magister Gauen:<br>
-Have you been to the<font color="LEVEL"> Sea of Spores</font>? Bring me the<font color="LEVEL"> spores from rotten trees</font> in this yellow pouch and the<font color="LEVEL"> spores from spore zombies</font> in this grey pouch. Fill the pouches with<font color="LEVEL"> 50 spores each</font> and then bring them back to me.
-</body></html>

+ 0 - 6
L2J_DataPack_BETA/dist/game/data/scripts/quests/356_DigUpTheSeaOfSpores/30717-7.htm

@@ -1,6 +0,0 @@
-<html><body>Magister Gauen:<br>
-Ah, you've returned! Give me the pouches. Hmm...<br>
-Actually, I'm a little busy... Just put them anywhere...<br>
-<a action="bypass -h Quest 356_DigUpTheSeaOfSpores 30717-10.htm">Put down the pouches.</a><br>
-<a action="bypass -h Quest 356_DigUpTheSeaOfSpores 30717-8.htm">All of that trouble and you aren't even going to look at them?</a>
-</body></html>

+ 0 - 4
L2J_DataPack_BETA/dist/game/data/scripts/quests/356_DigUpTheSeaOfSpores/30717-8.htm

@@ -1,4 +0,0 @@
-<html><body>Magister Gauen:<br>
-I'm sorry, I was distracted. Let's see, first we must sort them... What do we have here?
-<br><a action="bypass -h Quest 356_DigUpTheSeaOfSpores 30717-9.htm">Open the pouch</a>
-</body></html>

+ 0 - 106
L2J_DataPack_BETA/dist/game/data/scripts/quests/356_DigUpTheSeaOfSpores/__init__.py

@@ -1,106 +0,0 @@
-# Made by disKret
-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 = "356_DigUpTheSeaOfSpores"
-
-#NPC
-GAUEN = 30717
-
-#MOBS
-SPORE_ZOMBIE = 20562
-ROTTING_TREE = 20558
-
-#QUEST ITEMS
-CARNIVORE_SPORE = 5865
-HERBIBOROUS_SPORE = 5866
-
-class Quest (JQuest) :
-
- def __init__(self,id,name,descr):
-     JQuest.__init__(self,id,name,descr)
-     self.questItemIds = [CARNIVORE_SPORE, HERBIBOROUS_SPORE]
-
- def onEvent (self,event,st) :
-   htmltext = event
-   carn=st.getQuestItemsCount(CARNIVORE_SPORE)
-   herb=st.getQuestItemsCount(HERBIBOROUS_SPORE)
-   if event == "30717-5.htm" :
-     if st.getPlayer().getLevel() >= 43 :
-       st.set("cond","1")
-       st.setState(State.STARTED)
-       st.playSound("ItemSound.quest_accept")
-     else :
-       htmltext = "30717-4.htm"
-       st.exitQuest(1)
-   elif event in [ "30717-10.htm", "30717-9.htm" ] and (carn>=50 and herb>=50) :
-     if event == "30717-9.htm" :
-        st.giveItems(57,44000)
-     else :
-        st.addExpAndSp(36000,2600)
-     st.takeItems(CARNIVORE_SPORE,-1)
-     st.takeItems(HERBIBOROUS_SPORE,-1)
-     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.getId()
-   id = st.getState()
-   cond = st.getInt("cond")
-   carn=st.getQuestItemsCount(CARNIVORE_SPORE)
-   herb=st.getQuestItemsCount(HERBIBOROUS_SPORE)
-   if cond == 0 :
-     htmltext = "30717-0.htm"
-   elif cond != 3 :
-     htmltext = "30717-6.htm"
-   elif cond == 3 or (carn>=50 and herb>=50) :
-     htmltext = "30717-7.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()
-   carn=st.getQuestItemsCount(CARNIVORE_SPORE)
-   herb=st.getQuestItemsCount(HERBIBOROUS_SPORE)
-   if npcId == SPORE_ZOMBIE and carn < 50 :
-     st.giveItems(CARNIVORE_SPORE,1)
-     if carn == 49 :
-       if herb >= 50 :
-         st.playSound("ItemSound.quest_middle")
-         st.set("cond","3")
-       else :
-         st.playSound("ItemSound.quest_middle")
-         st.set("cond","2")
-     else :
-       st.playSound("ItemSound.quest_itemget")
-   elif npcId == ROTTING_TREE and herb < 50 :
-     st.giveItems(HERBIBOROUS_SPORE,1)
-     if herb == 49 :
-       if carn >= 50 :
-         st.playSound("ItemSound.quest_middle")
-         st.set("cond","3")
-       else :
-         st.playSound("ItemSound.quest_middle")
-         st.set("cond","2")
-     else:
-       st.playSound("ItemSound.quest_itemget")
-   return
-
-QUEST       = Quest(356,qn,"Dig Up The Sea Of Spores")
-
-QUEST.addStartNpc(GAUEN)
-
-QUEST.addTalkId(GAUEN)
-
-QUEST.addKillId(SPORE_ZOMBIE)
-QUEST.addKillId(ROTTING_TREE)

+ 5 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00356_DigUpTheSeaOfSpores/30717-01.html

@@ -0,0 +1,5 @@
+<html><body>Magister Gauen:<br>
+Since the era of Shunaiman, the first emperor of the ancient Elmoreden Empire, the Mystics of the Ivory Tower have been researching the Sea of Spores. Around E.D. 500 they constructed a force field tower which stopped the spread of that wretched sea. Their research has continued throughout the centuries.<br>
+Although the ancient barrier appears to be holding, the Sea of Spores continues to threaten us. A final solution to this problem must be found.<br>
+<a action="bypass -h Quest Q00356_DigUpTheSeaOfSpores 30717-02.html">What can we do?</a>
+</body></html>

+ 2 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/356_DigUpTheSeaOfSpores/30717-1.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00356_DigUpTheSeaOfSpores/30717-02.html

@@ -3,4 +3,5 @@ Frankly, I'm not sure. Up to now our research has been focused on sustaining and
 However, it has become clear that we need a more permanent solution. For this we must return to the Sea of Spores itself.<br>
 We must shift our strategy to researching each individual spore, one by one.<br>
 We must study the colonies they build, how they spawn and the complex relationships between the plants and animals of the sea.<br>
-<a action="bypass -h Quest 356_DigUpTheSeaOfSpores 30717-2.htm">Very interesting.</a></body></html>
+<a action="bypass -h Quest Q00356_DigUpTheSeaOfSpores 30717-03.html">"Very interesting."</a>
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00356_DigUpTheSeaOfSpores/30717-03.html

@@ -0,0 +1,4 @@
+<html><body>Magister Gauen:<br>
+I must have a tissue sample of an organism that has joined with spores and grown roots. <font color="LEVEL">Rotting Tree Spores</font> and <font color="LEVEL">spore zombies</font> will do nicely.<br>
+<a action="bypass -h Quest Q00356_DigUpTheSeaOfSpores 30717-04.html">"I'll do it."</a>
+</body></html>

+ 2 - 2
L2J_DataPack_BETA/dist/game/data/scripts/quests/356_DigUpTheSeaOfSpores/30717-3.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00356_DigUpTheSeaOfSpores/30717-04.html

@@ -1,4 +1,4 @@
 <html><body>Magister Gauen:<br>
 There are many different types of spores, all with unique and often dangerous characteristics. Are you sure you want to do this?<br>
-<a action="bypass -h Quest 356_DigUpTheSeaOfSpores 30717-5.htm">I'll do it.</a>
-</body></html>
+<a action="bypass -h Quest Q00356_DigUpTheSeaOfSpores 30717-05.html">"I'll do it."</a>
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00356_DigUpTheSeaOfSpores/30717-05.html

@@ -0,0 +1,3 @@
+<html><body>Magister Gauen:<br>
+Your resolve is admirable! Go and get the spores that live as parasites on <font color="LEVEL">rotten trees</font> and <font color="LEVEL">spore zombies</font>. Put the spores from the spore zombies in this grey pouch and put the spores from the rotten trees in this yellow pouch. The capacity of the pouches varies according to the size of the spores. Each pouch usually holds about <font color="LEVEL">50</font> spores. Thank you for your assistance.
+</body></html>

+ 5 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00356_DigUpTheSeaOfSpores/30717-06.htm

@@ -0,0 +1,5 @@
+<html><body>Magister Gauen:<br>
+Since the era of Shunaiman, the first emperor of the ancient Elmoreden Empire, the Mystics of the Ivory Tower have been researching the Sea of Spores. Around E.D. 500 they constructed a force field tower which stopped the spread of that wretched sea. Their research has continued through the centuries.<br>
+They could use some help in their studies, but I'm afraid you're not yet ready.<br>
+(This quest may only be undertaken by a character of level 43 or above.)
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00356_DigUpTheSeaOfSpores/30717-07.html

@@ -0,0 +1,3 @@
+<html><body>Magister Gauen:<br>
+Have you been to the <font color="LEVEL">Sea of Spores</font>? Bring me the <font color="LEVEL">spores from rotten trees</font> in this yellow pouch and the <font color="LEVEL">spores from spore zombies</font> in this grey pouch. Fill the pouches with <font color="LEVEL">50 spores each</font> and then bring them back to me.
+</body></html>

+ 5 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00356_DigUpTheSeaOfSpores/30717-08.html

@@ -0,0 +1,5 @@
+<html><body>Magister Gauen:<br>
+Have you just returned from the <font color="LEVEL">Sea of Spores</font>? I see that you have filled the yellow pouch. Due to inevitable...ah, shrinkage, I had hoped that you would fill both pouches. Well, no matter. What do you wish to do? Will you give me the yellow pouch?<br>
+<a action="bypass -h Quest Q00356_DigUpTheSeaOfSpores 30717-09.html">Give him the yellow pouch.</a><br>
+<a action="bypass -h Quest Q00356_DigUpTheSeaOfSpores 30717-10.html">Say you will continue.</a>
+</body></html>

+ 5 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00356_DigUpTheSeaOfSpores/30717-09.html

@@ -0,0 +1,5 @@
+<html><body>Magister Gauen:<br>
+Do you wish to continue collecting spores or would you like to quit?<br>
+<a action="bypass -h Quest Q00356_DigUpTheSeaOfSpores 30717-10.html">"I will collect more spores."</a><br>
+<a action="bypass -h Quest Q00356_DigUpTheSeaOfSpores 30717-11.html">"I quit."</a>
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00356_DigUpTheSeaOfSpores/30717-10.html

@@ -0,0 +1,3 @@
+<html><body>Magister Gauen:<br>
+Go to the <font color="LEVEL"> Sea of Spores</font> and bring back the spores that are parasites on the bodies of <font color="LEVEL">rotten trees</font> and <font color="LEVEL">spore zombies</font>. Collect 50 of each kind in each of the two pouches. Please do this and restore peace to the community.
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00356_DigUpTheSeaOfSpores/30717-11.html

@@ -0,0 +1,3 @@
+<html><body>Magister Gauen:<br>
+Thank you very much. <br>If you ever return to the Sea of Spores, come and see me.
+</body></html>

+ 5 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00356_DigUpTheSeaOfSpores/30717-12.html

@@ -0,0 +1,5 @@
+<html><body>Magister Gauen:<br>
+Have you just returned from the <font color="LEVEL">Sea of Spores</font>? I see that you have filled the grey pouch. Due to inevitable...ah, shrinkage, I had hoped that you would fill both pouches. Well, no matter. What do you wish to do? Will you give me the grey pouch?<br>
+<a action="bypass -h Quest Q00356_DigUpTheSeaOfSpores 30717-09.html">Give him the grey pouch.</a><br>
+<a action="bypass -h Quest Q00356_DigUpTheSeaOfSpores 30717-10.html">Say you will continue.</a>
+</body></html>

+ 6 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00356_DigUpTheSeaOfSpores/30717-13.html

@@ -0,0 +1,6 @@
+<html><body>Magister Gauen:<br>
+Ah, you've returned! Give me the pouches. Hmm...<br>
+Actually, I'm a little busy... Just put them anywhere...<br>
+<a action="bypass -h Quest Q00356_DigUpTheSeaOfSpores 30717-14.html">Put down the pouches.</a><br>
+<a action="bypass -h Quest Q00356_DigUpTheSeaOfSpores 30717-18.html">"All of that trouble and you aren't even going to look at them?"</a>
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00356_DigUpTheSeaOfSpores/30717-14.html

@@ -0,0 +1,4 @@
+<html><body>Magister Gauen:<br>
+Please put them in that box over there. Thanks to you, we can continue to conduct highly productive and effective research. Your contribution will be duly noted.<br>
+Would you like to help us some more?
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00356_DigUpTheSeaOfSpores/30717-15.html

@@ -0,0 +1,4 @@
+<html><body>Magister Gauen:<br>
+Oh yes, this is great! Splendid work! Even experts aren't so neat!<br>
+You must be rewarded! Please take this. You have greatly aided our research. I may ask for your assistance again. You are very good at this!
+</body></html>

+ 2 - 2
L2J_DataPack_BETA/dist/game/data/scripts/quests/356_DigUpTheSeaOfSpores/30717-9.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00356_DigUpTheSeaOfSpores/30717-16.html

@@ -1,3 +1,3 @@
 <html><body>Magister Gauen:<br>
-Here we go... I acknowledge that I received from you 50 Herbivorous Spores and 50 Carnivorous Spores. Here is your reward. If you wish, come back and help me again. We have enough from now, but I'm sure that in the future we shall need more.
-</body></html>
+Here we go... I acknowledge that I received from you 50 Herbivorous Spores and 50 carnivorous spores.  Here is your reward. If you wish, come back and help me again. We have enough for now, but I'm sure that in the future we shall need more.
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00356_DigUpTheSeaOfSpores/30717-17.html

@@ -0,0 +1,4 @@
+<html><body>Magister Gauen:<br>
+What's this? They're all <font color="LEVEL">crushed together</font>! I can't count them when they're like this... Well, they feel to be about the right weight...<br>
+They have been too badly damaged to be useful for our research. But a deal's a deal, I shall pay you. If you wish to continue in this job, you must be more careful!
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00356_DigUpTheSeaOfSpores/30717-18.html

@@ -0,0 +1,4 @@
+<html><body>Magister Gauen:<br>
+I'm sorry, I was distracted. Let's see, first we must sort them... What do we have here?<br>
+<a action="bypass -h Quest Q00356_DigUpTheSeaOfSpores FINISH">Open the pouch.</a>
+</body></html>

+ 187 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00356_DigUpTheSeaOfSpores/Q00356_DigUpTheSeaOfSpores.java

@@ -0,0 +1,187 @@
+/*
+ * 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.Q00356_DigUpTheSeaOfSpores;
+
+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.holders.ItemChanceHolder;
+import com.l2jserver.gameserver.model.quest.Quest;
+import com.l2jserver.gameserver.model.quest.QuestState;
+import com.l2jserver.util.Rnd;
+
+/**
+ * Dig Up the Sea of Spores! (356)
+ * @author Adry_85
+ */
+public final class Q00356_DigUpTheSeaOfSpores extends Quest
+{
+	// NPC
+	private static final int GAUEN = 30717;
+	// Items
+	private static final int CARNIVORE_SPORE = 5865;
+	private static final int HERBIVOROUS_SPORE = 5866;
+	// Misc
+	private static final int MIN_LEVEL = 43;
+	// Monsters
+	private static final Map<Integer, ItemChanceHolder> MONSTERS = new HashMap<>();
+	static
+	{
+		MONSTERS.put(20558, new ItemChanceHolder(HERBIVOROUS_SPORE, 0.73, 1));
+		MONSTERS.put(20562, new ItemChanceHolder(CARNIVORE_SPORE, 0.94, 1));
+	}
+	
+	public Q00356_DigUpTheSeaOfSpores()
+	{
+		super(356, Q00356_DigUpTheSeaOfSpores.class.getSimpleName(), "Dig Up the Sea of Spores!");
+		addStartNpc(GAUEN);
+		addTalkId(GAUEN);
+		addKillId(MONSTERS.keySet());
+		registerQuestItems(HERBIVOROUS_SPORE, CARNIVORE_SPORE);
+	}
+	
+	@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 "30717-02.html":
+			case "30717-03.html":
+			case "30717-04.html":
+			case "30717-10.html":
+			case "30717-18.html":
+			{
+				htmltext = event;
+				break;
+			}
+			case "30717-05.html":
+			{
+				qs.startQuest();
+				htmltext = event;
+				break;
+			}
+			case "30717-09.html":
+			{
+				addExpAndSp(player, 31850, 0);
+				takeItems(player, CARNIVORE_SPORE, -1);
+				takeItems(player, HERBIVOROUS_SPORE, -1);
+				htmltext = event;
+				break;
+			}
+			case "30717-11.html":
+			{
+				qs.exitQuest(true, true);
+				htmltext = event;
+				break;
+			}
+			case "30717-14.html":
+			{
+				addExpAndSp(player, 45500, 2600);
+				qs.exitQuest(true, true);
+				htmltext = event;
+				break;
+			}
+			case "FINISH":
+			{
+				final int value = Rnd.get(100);
+				int adena = 0;
+				if (value < 20)
+				{
+					adena = 44000;
+					htmltext = "30717-15.html";
+				}
+				else if (value < 70)
+				{
+					adena = 20950;
+					htmltext = "30717-16.html";
+				}
+				else
+				{
+					adena = 10400;
+					htmltext = "30717-17.html";
+				}
+				giveAdena(player, adena, true);
+				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)
+		{
+			final ItemChanceHolder item = MONSTERS.get(npc.getId());
+			if (giveItemRandomly(qs.getPlayer(), npc, item.getId(), item.getCount(), 50, item.getChance(), true) //
+				&& (getQuestItemsCount(qs.getPlayer(), CARNIVORE_SPORE) >= 50) //
+				&& (getQuestItemsCount(qs.getPlayer(), CARNIVORE_SPORE) >= 50))
+			{
+				qs.setCond(3, true);
+			}
+			else
+			{
+				qs.setCond(2, true);
+			}
+		}
+		return super.onKill(npc, killer, isSummon);
+	}
+	
+	@Override
+	public String onTalk(L2Npc npc, L2PcInstance player)
+	{
+		QuestState qs = getQuestState(player, true);
+		String htmltext = getNoQuestMsg(player);
+		if (qs.isCreated())
+		{
+			htmltext = (player.getLevel() >= MIN_LEVEL) ? "30717-01.html" : "30717-06.htm";
+		}
+		else if (qs.isStarted())
+		{
+			if ((getQuestItemsCount(player, HERBIVOROUS_SPORE) < 50) && (getQuestItemsCount(player, CARNIVORE_SPORE) < 50))
+			{
+				htmltext = "30717-07.html";
+			}
+			else if ((getQuestItemsCount(player, HERBIVOROUS_SPORE) >= 50) && (getQuestItemsCount(player, CARNIVORE_SPORE) < 50))
+			{
+				htmltext = "30717-08.html";
+			}
+			else if ((getQuestItemsCount(player, HERBIVOROUS_SPORE) < 50) && (getQuestItemsCount(player, CARNIVORE_SPORE) >= 50))
+			{
+				htmltext = "30717-12.html";
+			}
+			else
+			{
+				htmltext = "30717-13.html";
+			}
+		}
+		return htmltext;
+	}
+}

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

@@ -236,6 +236,7 @@ import quests.Q00344_1000YearsTheEndOfLamentation.Q00344_1000YearsTheEndOfLament
 import quests.Q00347_GoGetTheCalculator.Q00347_GoGetTheCalculator;
 import quests.Q00350_EnhanceYourWeapon.Q00350_EnhanceYourWeapon;
 import quests.Q00354_ConquestOfAlligatorIsland.Q00354_ConquestOfAlligatorIsland;
+import quests.Q00356_DigUpTheSeaOfSpores.Q00356_DigUpTheSeaOfSpores;
 import quests.Q00357_WarehouseKeepersAmbition.Q00357_WarehouseKeepersAmbition;
 import quests.Q00358_IllegitimateChildOfTheGoddess.Q00358_IllegitimateChildOfTheGoddess;
 import quests.Q00359_ForASleeplessDeadman.Q00359_ForASleeplessDeadman;
@@ -623,6 +624,7 @@ public class QuestMasterHandler
 		Q00347_GoGetTheCalculator.class,
 		Q00350_EnhanceYourWeapon.class,
 		Q00354_ConquestOfAlligatorIsland.class,
+		Q00356_DigUpTheSeaOfSpores.class,
 		Q00357_WarehouseKeepersAmbition.class,
 		Q00358_IllegitimateChildOfTheGoddess.class,
 		Q00359_ForASleeplessDeadman.class,

+ 1 - 0
L2J_DataPack_BETA/dist/sql/game/updates/20141023update.sql

@@ -0,0 +1 @@
+UPDATE character_quests SET name='Q00356_DigUpTheSeaOfSpores' WHERE name='356_DigUpTheSeaOfSpores';