فهرست منبع

BETA: Chest Caught Quests from Jython to Java by '''nonom''' (thanks '''Adry_85''' for testing).

MELERIX 13 سال پیش
والد
کامیت
04b8116e2b
55فایلهای تغییر یافته به همراه624 افزوده شده و 367 حذف شده
  1. 4 4
      L2J_DataPack_BETA/dist/game/data/scripts.cfg
  2. 0 1
      L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/Fear.java
  3. 0 83
      L2J_DataPack_BETA/dist/game/data/scripts/quests/27_ChestCaughtWithABaitOfWind/__init__.py
  4. 0 94
      L2J_DataPack_BETA/dist/game/data/scripts/quests/28_ChestCaughtWithABaitOfIcyAir/__init__.py
  5. 0 4
      L2J_DataPack_BETA/dist/game/data/scripts/quests/29_ChestCaughtWithABaitOfEarth/31574-03.htm
  6. 0 94
      L2J_DataPack_BETA/dist/game/data/scripts/quests/29_ChestCaughtWithABaitOfEarth/__init__.py
  7. 0 83
      L2J_DataPack_BETA/dist/game/data/scripts/quests/30_ChestCaughtWithABaitOfFire/__init__.py
  8. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q27_ChestCaughtWithABaitOfWind/31434-00.htm
  9. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q27_ChestCaughtWithABaitOfWind/31434-01.htm
  10. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q27_ChestCaughtWithABaitOfWind/31434-02.htm
  11. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q27_ChestCaughtWithABaitOfWind/31570-01.htm
  12. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q27_ChestCaughtWithABaitOfWind/31570-02.htm
  13. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q27_ChestCaughtWithABaitOfWind/31570-03.htm
  14. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q27_ChestCaughtWithABaitOfWind/31570-04.htm
  15. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q27_ChestCaughtWithABaitOfWind/31570-05.htm
  16. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q27_ChestCaughtWithABaitOfWind/31570-06.htm
  17. 2 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q27_ChestCaughtWithABaitOfWind/31570-07.htm
  18. 154 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q27_ChestCaughtWithABaitOfWind/Q27_ChestCaughtWithABaitOfWind.java
  19. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/31442-01.htm
  20. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/31442-02.htm
  21. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/31442-03.htm
  22. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/31572-01.htm
  23. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/31572-02.htm
  24. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/31572-03.htm
  25. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/31572-04.htm
  26. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/31572-05.htm
  27. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/31572-06.htm
  28. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/31572-07.htm
  29. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/31572-08.htm
  30. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/31572-09.htm
  31. 153 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/Q28_ChestCaughtWithABaitOfIcyAir.java
  32. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q29_ChestCaughtWithABaitOfEarth/30909-01.htm
  33. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q29_ChestCaughtWithABaitOfEarth/30909-02.htm
  34. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q29_ChestCaughtWithABaitOfEarth/30909-03.htm
  35. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q29_ChestCaughtWithABaitOfEarth/31574-01.htm
  36. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q29_ChestCaughtWithABaitOfEarth/31574-02.htm
  37. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q29_ChestCaughtWithABaitOfEarth/31574-04.htm
  38. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q29_ChestCaughtWithABaitOfEarth/31574-05.htm
  39. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q29_ChestCaughtWithABaitOfEarth/31574-06.htm
  40. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q29_ChestCaughtWithABaitOfEarth/31574-07.htm
  41. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q29_ChestCaughtWithABaitOfEarth/31574-08.htm
  42. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q29_ChestCaughtWithABaitOfEarth/31574-09.htm
  43. 153 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q29_ChestCaughtWithABaitOfEarth/Q29_ChestCaughtWithABaitOfEarth.java
  44. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q30_ChestCaughtWithABaitOfFire/30629-01.htm
  45. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q30_ChestCaughtWithABaitOfFire/30629-02.htm
  46. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q30_ChestCaughtWithABaitOfFire/30629-03.htm
  47. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q30_ChestCaughtWithABaitOfFire/31577-00.htm
  48. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q30_ChestCaughtWithABaitOfFire/31577-01.htm
  49. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q30_ChestCaughtWithABaitOfFire/31577-02.htm
  50. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q30_ChestCaughtWithABaitOfFire/31577-03.htm
  51. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q30_ChestCaughtWithABaitOfFire/31577-03a.htm
  52. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q30_ChestCaughtWithABaitOfFire/31577-04.htm
  53. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q30_ChestCaughtWithABaitOfFire/31577-04a.htm
  54. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q30_ChestCaughtWithABaitOfFire/31577-05.htm
  55. 154 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q30_ChestCaughtWithABaitOfFire/Q30_ChestCaughtWithABaitOfFire.java

+ 4 - 4
L2J_DataPack_BETA/dist/game/data/scripts.cfg

@@ -285,10 +285,10 @@ quests/23_LidiasHeart/__init__.py
 quests/24_InhabitantsOfTheForrestOfTheDead/__init__.py
 quests/25_HidingBehindTheTruth/__init__.py
 quests/Q26_TiredOfWaiting/Q26_TiredOfWaiting.java
-quests/27_ChestCaughtWithABaitOfWind/__init__.py
-quests/28_ChestCaughtWithABaitOfIcyAir/__init__.py
-quests/29_ChestCaughtWithABaitOfEarth/__init__.py
-quests/30_ChestCaughtWithABaitOfFire/__init__.py
+quests/Q27_ChestCaughtWithABaitOfWind/Q27_ChestCaughtWithABaitOfWind.java
+quests/Q28_ChestCaughtWithABaitOfIcyAir/Q28_ChestCaughtWithABaitOfIcyAir.java
+quests/Q29_ChestCaughtWithABaitOfEarth/Q29_ChestCaughtWithABaitOfEarth.java
+quests/Q30_ChestCaughtWithABaitOfFire/Q30_ChestCaughtWithABaitOfFire.java
 quests/31_SecretBuriedInTheSwamp/__init__.py
 quests/32_AnObviousLie/__init__.py
 quests/33_MakeAPairOfDressShoes/__init__.py

+ 0 - 1
L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/Fear.java

@@ -23,7 +23,6 @@ import com.l2jserver.gameserver.model.Location;
 import com.l2jserver.gameserver.model.actor.instance.L2DefenderInstance;
 import com.l2jserver.gameserver.model.actor.instance.L2FortCommanderInstance;
 import com.l2jserver.gameserver.model.actor.instance.L2NpcInstance;
-import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
 import com.l2jserver.gameserver.model.actor.instance.L2PetInstance;
 import com.l2jserver.gameserver.model.actor.instance.L2SiegeFlagInstance;
 import com.l2jserver.gameserver.model.actor.instance.L2SiegeSummonInstance;

+ 0 - 83
L2J_DataPack_BETA/dist/game/data/scripts/quests/27_ChestCaughtWithABaitOfWind/__init__.py

@@ -1,83 +0,0 @@
-# Made by DooMIta (ethernaly@email.it) and DrLecter.
-# Visit http://www.l2jdp.com/trac if you find a bug and wish to report it.
-# Visit http://www.l2jdp.com/forum/ for more details about our community and the project.
-import sys
-from com.l2jserver.gameserver.model.quest import State
-from com.l2jserver.gameserver.model.quest import QuestState
-from com.l2jserver.gameserver.model.quest.jython import QuestJython as JQuest
-
-qn = "27_ChestCaughtWithABaitOfWind"
-
-#NPC
-LANOSCO = 31570
-SHALING = 31434
-
-#QUEST ITEMs and REWARD
-BLUE_TREASURE_BOX    = 6500
-STRANGE_BLUESPRINT   = 7625
-BLACK_PEARL_RING     = 880
-
-class Quest (JQuest) :
-
-  def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)
-  
-  def onAdvEvent (self,event,npc, player) :
-    htmltext = event
-    st = player.getQuestState(qn)
-    if not st : return
-    if event== "31570-03.htm" :
-      st.set("cond","1")
-      st.setState(State.STARTED)
-      st.playSound("ItemSound.quest_accept")
-    elif event == "31570-05.htm" and st.getQuestItemsCount(BLUE_TREASURE_BOX) :
-      htmltext="31570-06.htm"
-      st.playSound("ItemSound.quest_middle")
-      st.giveItems(STRANGE_BLUESPRINT, 1)
-      st.takeItems(BLUE_TREASURE_BOX,-1)
-      st.set("cond","2")
-    elif event == "31434-02.htm" and st.getQuestItemsCount(BLACK_PEARL_RING) :
-      htmltext = "31434-01.htm"
-      st.playSound("ItemSound.quest_finish")
-      st.giveItems(BLACK_PEARL_RING, 1)
-      st.takeItems(STRANGE_BLUESPRINT,-1)
-      st.unset("cond")
-      st.exitQuest(False)
-    return htmltext
-
-  def onTalk(self, npc, player):
-    htmltext = Quest.getNoQuestMsg(player)
-    st = player.getQuestState(qn)
-    if not st : return htmltext
-    npcId=npc.getNpcId()
-    id = st.getState()
-    if id == State.CREATED :
-      req = player.getQuestState("50_LanoscosSpecialBait")
-      if req : reqst = req.getState()
-      if player.getLevel() >= 27 and req and reqst == State.COMPLETED :
-        htmltext = "31570-01.htm"
-      else :
-        st.exitQuest(1)
-        htmltext = "31570-02.htm"
-    elif id == State.STARTED :
-      cond = st.getInt("cond")
-      if npcId == LANOSCO :
-        if cond == 1 :
-          if st.getQuestItemsCount(BLUE_TREASURE_BOX) :
-            htmltext = "31570-03.htm"
-          else :
-            htmltext = "31570-04.htm"
-        else :
-          htmltext = "31570-05.htm"
-      else :
-        htmltext = "31434-00.htm"
-    elif id == State.COMPLETED :
-      htmltext = Quest.getAlreadyCompletedMsg(player)
-
-    return htmltext
-
-QUEST=Quest(27,qn,"Chest Caught With A Bait Of Wind")
-
-
-QUEST.addStartNpc(LANOSCO)
-QUEST.addTalkId(LANOSCO)
-QUEST.addTalkId(SHALING)

+ 0 - 94
L2J_DataPack_BETA/dist/game/data/scripts/quests/28_ChestCaughtWithABaitOfIcyAir/__init__.py

@@ -1,94 +0,0 @@
-### ---------------------------------------------------------------------------
-###  Create by Skeleton!!!
-### ---------------------------------------------------------------------------
-import sys
-from com.l2jserver.gameserver.model.quest import State
-from com.l2jserver.gameserver.model.quest import QuestState
-from com.l2jserver.gameserver.model.quest.jython import QuestJython as JQuest
-
-qn = "28_ChestCaughtWithABaitOfIcyAir"
-
-# NPC List
-OFulle=31572
-Kiki=31442
-# ~~~
-# Item List
-BigYellowTreasureChest=6503
-KikisLetter=7626
-ElvenRing=881
-# ~~~
-class Quest (JQuest) :
-    def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)
-    def onAdvEvent (self,event,npc, player) :
-        htmltext = event
-        st = player.getQuestState(qn)
-        if not st : return
-        if event=="31572-04.htm" :
-            st.set("cond","1")
-            st.playSound("ItemSound.quest_accept")
-        elif event=="31572-07.htm" :
-            if st.getQuestItemsCount(BigYellowTreasureChest) :
-                st.set("cond","2")
-                st.takeItems(BigYellowTreasureChest,1)
-                st.giveItems(KikisLetter,1)
-            else :
-                htmltext="31572-08.htm"
-        elif event=="31442-02.htm" :
-            if st.getQuestItemsCount(KikisLetter)==1 :
-                htmltext="31442-02.htm"
-                st.takeItems(KikisLetter,-1)
-                st.giveItems(ElvenRing,1)
-                st.set("cond","0")
-                st.exitQuest(False)
-                st.playSound("ItemSound.quest_finish")
-            else :
-                htmltext="31442-03.htm"
-        return htmltext
-
-    def onTalk (self,npc,player):
-        htmltext = Quest.getNoQuestMsg(player)
-        st = player.getQuestState(qn)
-        if not st : return htmltext
-        npcId = npc.getNpcId()
-        id=st.getState()
-        if id==State.CREATED :
-            st.setState(State.STARTED)
-            st.set("cond","0")
-        cond=st.getInt("cond")
-        id = st.getState()
-        if npcId==OFulle :
-            if cond==0 and id==State.STARTED:
-                PlayerLevel = player.getLevel()
-                if PlayerLevel >= 36 :
-                    OFullesSpecialBait= player.getQuestState("51_OFullesSpecialBait")
-                    if OFullesSpecialBait :
-                        if OFullesSpecialBait.getState() == State.COMPLETED :
-                            htmltext="31572-01.htm"
-                        else :
-                            htmltext="31572-02.htm"
-                            st.exitQuest(1)
-                    else :
-                        htmltext="31572-03.htm"
-                        st.exitQuest(1)
-                else :
-                    htmltext="31572-02.htm"
-            elif cond==1 :
-                htmltext="31572-05.htm"
-                if st.getQuestItemsCount(BigYellowTreasureChest)==0 :
-                    htmltext="31572-06.htm"
-            elif cond==2 :
-                htmltext="31572-09.htm"
-            elif cond==0 and id==State.COMPLETED :
-                htmltext=Quest.getAlreadyCompletedMsg(player)
-
-        elif npcId==Kiki :
-            if cond==2 :
-                htmltext="31442-01.htm"
-        return htmltext
-
-QUEST      = Quest(28,qn,"Chest Caught With A Bait Of Icy Air")
-
-
-QUEST.addStartNpc(OFulle)
-QUEST.addTalkId(OFulle)
-QUEST.addTalkId(Kiki)

+ 0 - 4
L2J_DataPack_BETA/dist/game/data/scripts/quests/29_ChestCaughtWithABaitOfEarth/31574-03.htm

@@ -1,4 +0,0 @@
-<html><body>Fishermen's Guild Member Willie:<br>
-Well, it's obvious you're not here to buy fishing gear! Have you ever been fishing? Try it once, you'll be hooked! Heh heh! I'm the man to think of when you need bait!<br>
-(This quest may only be undertaken by characters of level 48 or above who have completed Willie's Special Bait quest.)
-</body></html>

+ 0 - 94
L2J_DataPack_BETA/dist/game/data/scripts/quests/29_ChestCaughtWithABaitOfEarth/__init__.py

@@ -1,94 +0,0 @@
-### ---------------------------------------------------------------------------
-###  Create by Skeleton!!!
-### ---------------------------------------------------------------------------
-import sys
-from com.l2jserver.gameserver.model.quest import State
-from com.l2jserver.gameserver.model.quest import QuestState
-from com.l2jserver.gameserver.model.quest.jython import QuestJython as JQuest
-
-qn = "29_ChestCaughtWithABaitOfEarth"
-
-# NPC List
-Willie =31574
-Anabel =30909
-# ~~~
-# Item List
-SmallPurpleTreasureChest =6507
-SmallGlassBox =7627
-PlatedLeatherGloves =2455
-# ~~~
-class Quest (JQuest) :
-    def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)
-    def onAdvEvent (self,event,npc, player) :
-        htmltext = event
-        st = player.getQuestState(qn)
-        if not st : return
-        if event =="31574-04.htm" :
-            st.set("cond","1")
-            st.playSound("ItemSound.quest_accept")
-        elif event=="31574-07.htm" :
-            if st.getQuestItemsCount(SmallPurpleTreasureChest) :
-                st.set("cond","2")
-                st.takeItems(SmallPurpleTreasureChest,1)
-                st.giveItems(SmallGlassBox,1)
-            else :
-                htmltext="31574-08.htm"
-        elif event =="30909-02.htm" :
-            if st.getQuestItemsCount(SmallGlassBox)==1 :
-                st.takeItems(SmallGlassBox,-1)
-                st.giveItems(PlatedLeatherGloves,1)
-                st.set("cond","0")
-                st.exitQuest(False)
-                st.playSound("ItemSound.quest_finish")
-            else :
-                htmltext ="30909-03.htm"
-        return htmltext
-
-    def onTalk (self,npc,player):
-        htmltext = Quest.getNoQuestMsg(player)
-        st = player.getQuestState(qn)
-        if not st : return htmltext
-        npcId = npc.getNpcId()
-        id = st.getState()
-        if id==State.CREATED :
-            st.setState(State.STARTED)
-            st.set("cond","0")
-        cond=st.getInt("cond")
-        id = st.getState()
-        if npcId ==Willie :
-            if cond==0 and id==State.STARTED :
-                PlayerLevel = player.getLevel()
-                if PlayerLevel >= 48 :
-                    WilliesSpecialBait = player.getQuestState("52_WilliesSpecialBait")
-                    if WilliesSpecialBait:
-                        if WilliesSpecialBait.getState() == State.COMPLETED :
-                            htmltext="31574-01.htm"
-                        else :
-                            htmltext="31574-02.htm"
-                            st.exitQuest(1)
-                    else :
-                        htmltext="31574-03.htm"
-                        st.exitQuest(1)
-                else :
-                   htmltext="31574-02.htm"
-                   st.exitQuest(1) 
-            elif cond==0 and id==State.COMPLETED :
-                htmltext =Quest.getAlreadyCompletedMsg(player)
-
-            elif cond==1 :
-                htmltext="31574-05.htm"
-                if st.getQuestItemsCount(SmallPurpleTreasureChest)==0 :
-                    htmltext ="31574-06.htm"
-            elif cond==2 :
-                htmltext="31574-09.htm"
-        elif npcId ==Anabel :
-            if cond==2 :
-                htmltext="30909-01.htm"
-        return htmltext
-
-QUEST       = Quest(29,qn,"Chest Caught With A Bait Of Earth")
-
-
-QUEST.addStartNpc(Willie)
-QUEST.addTalkId(Willie)
-QUEST.addTalkId(Anabel)

+ 0 - 83
L2J_DataPack_BETA/dist/game/data/scripts/quests/30_ChestCaughtWithABaitOfFire/__init__.py

@@ -1,83 +0,0 @@
-# Made by Ethernaly ethernaly@email.it
-# cleanup by DrLecter for the Official L2J Datapack Project.
-# Visit http://www.l2jdp.com/forum/ for more details.
-import sys
-from com.l2jserver.gameserver.model.quest import State
-from com.l2jserver.gameserver.model.quest import QuestState
-from com.l2jserver.gameserver.model.quest.jython import QuestJython as JQuest
-
-qn = "30_ChestCaughtWithABaitOfFire"
-
-#NPC
-LINNAEUS = 31577
-RUKAL    = 30629
-
-#QUEST ITEM and REWARD
-RED_TREASURE_BOX    = 6511
-RUKAL_MUSICAL       = 7628
-PROTECTION_NECKLACE = 916
-
-class Quest (JQuest) :
-
-  def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)
-  
-  def onAdvEvent (self,event,npc, player) :
-    htmltext = event
-    st = player.getQuestState(qn)
-    if not st : return
-    if event== "31577-02.htm" :
-      st.set("cond","1")
-      st.setState(State.STARTED)
-      st.playSound("ItemSound.quest_accept")
-    elif event == "31577-04a.htm" and st.getQuestItemsCount(RED_TREASURE_BOX) :
-      htmltext="31577-04.htm"
-      st.playSound("ItemSound.quest_middle")
-      st.giveItems(RUKAL_MUSICAL, 1)
-      st.takeItems(RED_TREASURE_BOX,-1)
-      st.set("cond","2")
-    elif event == "30629-02.htm" and st.getQuestItemsCount(RUKAL_MUSICAL) :
-      htmltext = "30629-03.htm"
-      st.playSound("ItemSound.quest_finish")
-      st.giveItems(PROTECTION_NECKLACE, 1)
-      st.takeItems(RUKAL_MUSICAL,-1)
-      st.unset("cond")
-      st.exitQuest(False)
-    return htmltext
-
-  def onTalk(self, npc, player):
-    htmltext = Quest.getNoQuestMsg(player)
-    st = player.getQuestState(qn)
-    if not st : return htmltext
-    npcId=npc.getNpcId()
-    id = st.getState()
-    if id == State.CREATED :
-      req = player.getQuestState("53_LinnaeusSpecialBait")
-      if req : reqst = req.getState()
-      if player.getLevel() >= 61 and req and reqst == State.COMPLETED :
-        htmltext = "31577-01.htm"
-      else :
-        st.exitQuest(1)
-        htmltext = "31577-00.htm"
-    elif id == State.STARTED :
-      cond = st.getInt("cond")
-      if npcId == LINNAEUS :
-        if cond == 1 :
-          if st.getQuestItemsCount(RED_TREASURE_BOX) :
-            htmltext = "31577-03.htm"
-          else :
-            htmltext = "31577-03a.htm"
-        else :
-          htmltext = "31577-05.htm"
-      else :
-        htmltext = "30629-01.htm"
-    elif id == State.COMPLETED :
-      htmltext = Quest.getAlreadyCompletedMsg(player)
-
-    return htmltext
-
-QUEST=Quest(30,qn,"Chest Caught With A Bait Of Fire")
-
-
-QUEST.addStartNpc(LINNAEUS)
-QUEST.addTalkId(LINNAEUS)
-QUEST.addTalkId(RUKAL)

+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/27_ChestCaughtWithABaitOfWind/31434-00.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q27_ChestCaughtWithABaitOfWind/31434-00.htm


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/27_ChestCaughtWithABaitOfWind/31434-01.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q27_ChestCaughtWithABaitOfWind/31434-01.htm


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/27_ChestCaughtWithABaitOfWind/31434-02.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q27_ChestCaughtWithABaitOfWind/31434-02.htm


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/27_ChestCaughtWithABaitOfWind/31570-01.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q27_ChestCaughtWithABaitOfWind/31570-01.htm


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/27_ChestCaughtWithABaitOfWind/31570-02.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q27_ChestCaughtWithABaitOfWind/31570-02.htm


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/27_ChestCaughtWithABaitOfWind/31570-03.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q27_ChestCaughtWithABaitOfWind/31570-03.htm


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/27_ChestCaughtWithABaitOfWind/31570-04.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q27_ChestCaughtWithABaitOfWind/31570-04.htm


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/27_ChestCaughtWithABaitOfWind/31570-05.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q27_ChestCaughtWithABaitOfWind/31570-05.htm


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/27_ChestCaughtWithABaitOfWind/31570-06.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q27_ChestCaughtWithABaitOfWind/31570-06.htm


+ 2 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q27_ChestCaughtWithABaitOfWind/31570-07.htm

@@ -0,0 +1,2 @@
+<html><body>Fishermen's Guild Member Lanosco:<br>
+Why haven't you gone to see Shaling yet? Take the blueprint of golem to her in the Blacksmith Shop immediately!</body></html>

+ 154 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q27_ChestCaughtWithABaitOfWind/Q27_ChestCaughtWithABaitOfWind.java

@@ -0,0 +1,154 @@
+/*
+ * This program 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.
+ * 
+ * This program 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.Q27_ChestCaughtWithABaitOfWind;
+
+import com.l2jserver.gameserver.model.actor.L2Npc;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.model.quest.Quest;
+import com.l2jserver.gameserver.model.quest.QuestState;
+import com.l2jserver.gameserver.model.quest.State;
+
+/**
+ * Chest Caught With A Bait Of Wind (27)<br>
+ * Original Jython script by DooMIta
+ * @author nonom
+ */
+public class Q27_ChestCaughtWithABaitOfWind extends Quest
+{
+	private static final String qn = "27_ChestCaughtWithABaitOfWind";
+	
+	// NPCs
+	private static final int LANOSCO = 31570;
+	private static final int SHALING = 31434;
+	
+	// Items
+	private static final int BLUE_TREASURE_BOX = 6500;
+	private static final int STRANGE_BLUESPRINT = 7625;
+	private static final int BLACK_PEARL_RING = 880;
+	
+	@Override
+	public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
+	{
+		String htmltext = event;
+		final QuestState st = player.getQuestState(qn);
+		if (st == null)
+		{
+			return htmltext;
+		}
+		
+		switch (event)
+		{
+			case "31570-03.htm":
+				st.set("cond", "1");
+				st.setState(State.STARTED);
+				st.playSound("ItemSound.quest_accept");
+				break;
+			case "31570-05.htm":
+				if ((st.getInt("cond") == 1) && (st.hasQuestItems(BLUE_TREASURE_BOX)))
+				{
+					htmltext = "31570-06.htm";
+					st.set("cond", "2");
+					st.giveItems(STRANGE_BLUESPRINT, 1);
+					st.takeItems(BLUE_TREASURE_BOX, -1);
+					st.playSound("ItemSound.quest_middle");
+				}
+				break;
+			case "31434-02.htm":
+				if ((st.getInt("cond") == 2) && (st.hasQuestItems(STRANGE_BLUESPRINT)))
+				{
+					htmltext = "31434-01.htm";
+					st.giveItems(BLACK_PEARL_RING, 1);
+					st.takeItems(STRANGE_BLUESPRINT, -1);
+					st.playSound("ItemSound.quest_finish");
+					st.exitQuest(false);
+				}
+				break;
+		
+		}
+		return htmltext;
+	}
+	
+	@Override
+	public String onTalk(L2Npc npc, L2PcInstance player)
+	{
+		String htmltext = getNoQuestMsg(player);
+		final QuestState st = player.getQuestState(qn);
+		if (st == null)
+		{
+			return htmltext;
+		}
+		
+		final int npcId = npc.getNpcId();
+		switch (st.getState())
+		{
+			case State.COMPLETED:
+				htmltext = getAlreadyCompletedMsg(player);
+				break;
+			case State.CREATED:
+				final QuestState qs = player.getQuestState("50_LanoscosSpecialBait");
+				if (npcId == LANOSCO)
+				{
+					htmltext = "31570-02.htm";
+					if (qs != null)
+					{
+						htmltext = ((player.getLevel() >= 27) && qs.isCompleted()) ? "31570-01.htm" : htmltext;
+					}
+				}
+				break;
+			case State.STARTED:
+				final int cond = st.getInt("cond");
+				switch (npcId)
+				{
+					case LANOSCO:
+						if (cond == 1)
+						{
+							if (st.hasQuestItems(BLUE_TREASURE_BOX))
+							{
+								htmltext = "31570-04.htm";
+							}
+							else
+							{
+								htmltext = "31570-05.htm";
+							}
+						}
+						else
+						{
+							htmltext = "31570-07.htm";
+						}
+						break;
+					case SHALING:
+						if (cond == 2)
+						{
+							htmltext = "31434-00.htm";
+						}
+						break;
+				}
+		}
+		return htmltext;
+	}
+	
+	public Q27_ChestCaughtWithABaitOfWind(int questId, String name, String descr)
+	{
+		super(questId, name, descr);
+		
+		addStartNpc(LANOSCO);
+		addTalkId(LANOSCO, SHALING);
+	}
+	
+	public static void main(String[] args)
+	{
+		new Q27_ChestCaughtWithABaitOfWind(27, qn, "Chest Caught With A Bait Of Wind");
+	}
+}

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/28_ChestCaughtWithABaitOfIcyAir/31442-01.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/31442-01.htm

@@ -1,5 +1,5 @@
 <html><body>Mineral Trader Kiki:<br>
 If you're not here to buy minerals, why have you come?<br>
 You must be either a soldier or a traveler.<br>
-<a action="bypass -h Quest 28_ChestCaughtWithABaitOfIcyAir 31442-02.htm">"I have a letter for you."</a>
+<a action="bypass -h Quest 28_ChestCaughtWithABaitOfIcyAir 31442-03.htm">"I have a letter for you."</a>
 </body></html>

+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/28_ChestCaughtWithABaitOfIcyAir/31442-02.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/31442-02.htm


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/28_ChestCaughtWithABaitOfIcyAir/31442-03.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/31442-03.htm


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/28_ChestCaughtWithABaitOfIcyAir/31572-01.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/31572-01.htm


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/28_ChestCaughtWithABaitOfIcyAir/31572-02.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/31572-02.htm


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/28_ChestCaughtWithABaitOfIcyAir/31572-03.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/31572-03.htm


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/28_ChestCaughtWithABaitOfIcyAir/31572-04.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/31572-04.htm


+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/28_ChestCaughtWithABaitOfIcyAir/31572-05.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/31572-05.htm

@@ -1,4 +1,4 @@
 <html><body>Fishermen's Guild Member O'Fulle:<br>
 Did you find the <font color="LEVEL">large yellow treasure box</font> If so, let me authenticate it! I'll open it to verify its contents.<br>
-<a action="bypass -h Quest 28_ChestCaughtWithABaitOfIcyAir 31572-07.htm">"Here it is."</a>
+<a action="bypass -h Quest 28_ChestCaughtWithABaitOfIcyAir 31572-08.htm">"Here it is."</a>
 </body></html>

+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/28_ChestCaughtWithABaitOfIcyAir/31572-06.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/31572-06.htm


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/28_ChestCaughtWithABaitOfIcyAir/31572-07.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/31572-07.htm


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/28_ChestCaughtWithABaitOfIcyAir/31572-08.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/31572-08.htm


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/28_ChestCaughtWithABaitOfIcyAir/31572-09.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/31572-09.htm


+ 153 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/Q28_ChestCaughtWithABaitOfIcyAir.java

@@ -0,0 +1,153 @@
+/*
+ * This program 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.
+ * 
+ * This program 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.Q28_ChestCaughtWithABaitOfIcyAir;
+
+import com.l2jserver.gameserver.model.actor.L2Npc;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.model.quest.Quest;
+import com.l2jserver.gameserver.model.quest.QuestState;
+import com.l2jserver.gameserver.model.quest.State;
+
+/**
+ * Chest Caught With A Bait Of Icy Air (28)<br>
+ * Original Jython script by Skeleton
+ * @author nonom
+ */
+public class Q28_ChestCaughtWithABaitOfIcyAir extends Quest
+{
+	private static final String qn = "28_ChestCaughtWithABaitOfIcyAir";
+	
+	// NPCs
+	private static final int OFULLE = 31572;
+	private static final int KIKI = 31442;
+	
+	// Items
+	private static final int YELLOW_TREASURE_BOX = 6503;
+	private static final int KIKIS_LETTER = 7626;
+	private static final int ELVEN_RING = 881;
+	
+	@Override
+	public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
+	{
+		String htmltext = event;
+		final QuestState st = player.getQuestState(qn);
+		if (st == null)
+		{
+			return htmltext;
+		}
+		
+		switch (event)
+		{
+			case "31572-04.htm":
+				st.set("cond", "1");
+				st.setState(State.STARTED);
+				st.playSound("ItemSound.quest_accept");
+				break;
+			case "31572-08.htm":
+				if ((st.getInt("cond") == 1) && (st.hasQuestItems(YELLOW_TREASURE_BOX)))
+				{
+					htmltext = "31572-07.htm";
+					st.set("cond", "2");
+					st.giveItems(KIKIS_LETTER, 1);
+					st.takeItems(YELLOW_TREASURE_BOX, -1);
+					st.playSound("ItemSound.quest_middle");
+				}
+				break;
+			case "31442-03.htm":
+				if ((st.getInt("cond") == 2) && (st.hasQuestItems(KIKIS_LETTER)))
+				{
+					htmltext = "31442-02.htm";
+					st.giveItems(ELVEN_RING, 1);
+					st.takeItems(KIKIS_LETTER, -1);
+					st.playSound("ItemSound.quest_finish");
+					st.exitQuest(false);
+				}
+				break;
+		
+		}
+		return htmltext;
+	}
+	
+	@Override
+	public String onTalk(L2Npc npc, L2PcInstance player)
+	{
+		String htmltext = getNoQuestMsg(player);
+		final QuestState st = player.getQuestState(qn);
+		if (st == null)
+		{
+			return htmltext;
+		}
+		
+		final int npcId = npc.getNpcId();
+		switch (st.getState())
+		{
+			case State.COMPLETED:
+				htmltext = getAlreadyCompletedMsg(player);
+				break;
+			case State.CREATED:
+				final QuestState qs = player.getQuestState("51_OFullesSpecialBait");
+				if (npcId == OFULLE)
+				{
+					htmltext = "31572-02.htm";
+					if (qs != null)
+					{
+						htmltext = ((player.getLevel() >= 36) && qs.isCompleted()) ? "31572-01.htm" : htmltext;
+					}
+				}
+				break;
+			case State.STARTED:
+				final int cond = st.getInt("cond");
+				switch (npcId)
+				{
+					case OFULLE:
+						switch (cond)
+						{
+							case 1:
+								htmltext = "31572-06.htm";
+								if (st.hasQuestItems(YELLOW_TREASURE_BOX))
+								{
+									htmltext = "31572-05.htm";
+								}
+								break;
+							case 2:
+								htmltext = "31572-09.htm";
+								break;
+						}
+						break;
+					case KIKI:
+						if (cond == 2)
+						{
+							htmltext = "31442-01.htm";
+						}
+						break;
+				}
+				break;
+		}
+		return htmltext;
+	}
+	
+	public Q28_ChestCaughtWithABaitOfIcyAir(int questId, String name, String descr)
+	{
+		super(questId, name, descr);
+		
+		addStartNpc(OFULLE);
+		addTalkId(OFULLE, KIKI);
+	}
+	
+	public static void main(String[] args)
+	{
+		new Q28_ChestCaughtWithABaitOfIcyAir(28, qn, "Chest Caught With A Bait Of Icy Air");
+	}
+}

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/29_ChestCaughtWithABaitOfEarth/30909-01.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q29_ChestCaughtWithABaitOfEarth/30909-01.htm

@@ -1,5 +1,5 @@
 <html><body>Magister Anabel:<br>
 Neither love nor friendship will ever last between a mortal Human and an Elf.<br>
 They fade with time, but memories, they'll last forever. What can I do for you?<br>
-<a action="bypass -h Quest 29_ChestCaughtWithABaitOfEarth 30909-02.htm">"I found the box with the names Anabel and Liesel on it."</a>
+<a action="bypass -h Quest 29_ChestCaughtWithABaitOfEarth 30909-03.htm">"I found the box with the names Anabel and Liesel on it."</a>
 </body></html>

+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/29_ChestCaughtWithABaitOfEarth/30909-02.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q29_ChestCaughtWithABaitOfEarth/30909-02.htm


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/29_ChestCaughtWithABaitOfEarth/30909-03.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q29_ChestCaughtWithABaitOfEarth/30909-03.htm


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/29_ChestCaughtWithABaitOfEarth/31574-01.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q29_ChestCaughtWithABaitOfEarth/31574-01.htm


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/29_ChestCaughtWithABaitOfEarth/31574-02.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q29_ChestCaughtWithABaitOfEarth/31574-02.htm


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/29_ChestCaughtWithABaitOfEarth/31574-04.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q29_ChestCaughtWithABaitOfEarth/31574-04.htm


+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/29_ChestCaughtWithABaitOfEarth/31574-05.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q29_ChestCaughtWithABaitOfEarth/31574-05.htm

@@ -1,4 +1,4 @@
 <html><body>Fishermen's Guild Member Willie:<br>
 Certainly you're not finished already! I don't believe it! Have you already found the <font color="LEVEL">small purple treasure box</font>? Let me see it!<br>
-<a action="bypass -h Quest 29_ChestCaughtWithABaitOfEarth 31574-07.htm">"Here it is."</a>
+<a action="bypass -h Quest 29_ChestCaughtWithABaitOfEarth 31574-08.htm">"Here it is."</a>
 </body></html>

+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/29_ChestCaughtWithABaitOfEarth/31574-06.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q29_ChestCaughtWithABaitOfEarth/31574-06.htm


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/29_ChestCaughtWithABaitOfEarth/31574-07.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q29_ChestCaughtWithABaitOfEarth/31574-07.htm


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/29_ChestCaughtWithABaitOfEarth/31574-08.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q29_ChestCaughtWithABaitOfEarth/31574-08.htm


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/29_ChestCaughtWithABaitOfEarth/31574-09.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q29_ChestCaughtWithABaitOfEarth/31574-09.htm


+ 153 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q29_ChestCaughtWithABaitOfEarth/Q29_ChestCaughtWithABaitOfEarth.java

@@ -0,0 +1,153 @@
+/*
+ * This program 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.
+ * 
+ * This program 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.Q29_ChestCaughtWithABaitOfEarth;
+
+import com.l2jserver.gameserver.model.actor.L2Npc;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.model.quest.Quest;
+import com.l2jserver.gameserver.model.quest.QuestState;
+import com.l2jserver.gameserver.model.quest.State;
+
+/**
+ * Chest Caught With A Bait Of Earth (29)<br>
+ * Original Jython script by Skeleton
+ * @author nonom
+ */
+public class Q29_ChestCaughtWithABaitOfEarth extends Quest
+{
+	private static final String qn = "29_ChestCaughtWithABaitOfEarth";
+	
+	// NPCs
+	private static final int WILLIE = 31574;
+	private static final int ANABEL = 30909;
+	
+	// Items
+	private static final int PURPLE_TREASURE_BOX = 6507;
+	private static final int SMALL_GLASS_BOX = 7627;
+	private static final int PLATED_LEATHER_GLOVES = 2455;
+	
+	@Override
+	public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
+	{
+		String htmltext = event;
+		final QuestState st = player.getQuestState(qn);
+		if (st == null)
+		{
+			return htmltext;
+		}
+		
+		switch (event)
+		{
+			case "31574-04.htm":
+				st.set("cond", "1");
+				st.setState(State.STARTED);
+				st.playSound("ItemSound.quest_accept");
+				break;
+			case "31574-08.htm":
+				if ((st.getInt("cond") == 1) && (st.hasQuestItems(PURPLE_TREASURE_BOX)))
+				{
+					htmltext = "31574-07.htm";
+					st.set("cond", "2");
+					st.giveItems(SMALL_GLASS_BOX, 1);
+					st.takeItems(PURPLE_TREASURE_BOX, -1);
+					st.playSound("ItemSound.quest_middle");
+				}
+				break;
+			case "30909-03.htm":
+				if ((st.getInt("cond") == 2) && (st.hasQuestItems(SMALL_GLASS_BOX)))
+				{
+					htmltext = "30909-02.htm";
+					st.giveItems(PLATED_LEATHER_GLOVES, 1);
+					st.takeItems(SMALL_GLASS_BOX, -1);
+					st.playSound("ItemSound.quest_finish");
+					st.exitQuest(false);
+				}
+				break;
+		
+		}
+		return htmltext;
+	}
+	
+	@Override
+	public String onTalk(L2Npc npc, L2PcInstance player)
+	{
+		String htmltext = getNoQuestMsg(player);
+		final QuestState st = player.getQuestState(qn);
+		if (st == null)
+		{
+			return htmltext;
+		}
+		
+		final int npcId = npc.getNpcId();
+		switch (st.getState())
+		{
+			case State.COMPLETED:
+				htmltext = getAlreadyCompletedMsg(player);
+				break;
+			case State.CREATED:
+				final QuestState qs = player.getQuestState("52_WilliesSpecialBait");
+				if (npcId == WILLIE)
+				{
+					htmltext = "31574-02.htm";
+					if (qs != null)
+					{
+						htmltext = ((player.getLevel() >= 48) && qs.isCompleted()) ? "31574-01.htm" : htmltext;
+					}
+				}
+				break;
+			case State.STARTED:
+				final int cond = st.getInt("cond");
+				switch (npcId)
+				{
+					case WILLIE:
+						switch (cond)
+						{
+							case 1:
+								htmltext = "31574-06.htm";
+								if (st.hasQuestItems(PURPLE_TREASURE_BOX))
+								{
+									htmltext = "31574-05.htm";
+								}
+								break;
+							case 2:
+								htmltext = "31574-09.htm";
+								break;
+						}
+						break;
+					case ANABEL:
+						if (cond == 2)
+						{
+							htmltext = "30909-01.htm";
+						}
+						break;
+				}
+				break;
+		}
+		return htmltext;
+	}
+	
+	public Q29_ChestCaughtWithABaitOfEarth(int questId, String name, String descr)
+	{
+		super(questId, name, descr);
+		
+		addStartNpc(WILLIE);
+		addTalkId(WILLIE, ANABEL);
+	}
+	
+	public static void main(String[] args)
+	{
+		new Q29_ChestCaughtWithABaitOfEarth(29, qn, "Chest Caught With A Bait Of Earth");
+	}
+}

+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/30_ChestCaughtWithABaitOfFire/30629-01.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q30_ChestCaughtWithABaitOfFire/30629-01.htm


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/30_ChestCaughtWithABaitOfFire/30629-02.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q30_ChestCaughtWithABaitOfFire/30629-02.htm


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/30_ChestCaughtWithABaitOfFire/30629-03.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q30_ChestCaughtWithABaitOfFire/30629-03.htm


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/30_ChestCaughtWithABaitOfFire/31577-00.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q30_ChestCaughtWithABaitOfFire/31577-00.htm


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/30_ChestCaughtWithABaitOfFire/31577-01.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q30_ChestCaughtWithABaitOfFire/31577-01.htm


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/30_ChestCaughtWithABaitOfFire/31577-02.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q30_ChestCaughtWithABaitOfFire/31577-02.htm


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/30_ChestCaughtWithABaitOfFire/31577-03.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q30_ChestCaughtWithABaitOfFire/31577-03.htm


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/30_ChestCaughtWithABaitOfFire/31577-03a.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q30_ChestCaughtWithABaitOfFire/31577-03a.htm


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/30_ChestCaughtWithABaitOfFire/31577-04.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q30_ChestCaughtWithABaitOfFire/31577-04.htm


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/30_ChestCaughtWithABaitOfFire/31577-04a.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q30_ChestCaughtWithABaitOfFire/31577-04a.htm


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/30_ChestCaughtWithABaitOfFire/31577-05.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q30_ChestCaughtWithABaitOfFire/31577-05.htm


+ 154 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q30_ChestCaughtWithABaitOfFire/Q30_ChestCaughtWithABaitOfFire.java

@@ -0,0 +1,154 @@
+/*
+ * This program 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.
+ * 
+ * This program 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.Q30_ChestCaughtWithABaitOfFire;
+
+import com.l2jserver.gameserver.model.actor.L2Npc;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.model.quest.Quest;
+import com.l2jserver.gameserver.model.quest.QuestState;
+import com.l2jserver.gameserver.model.quest.State;
+
+/**
+ * Chest Caught With A Bait Of Fire (30)<br>
+ * Original Jython script by Ethernaly
+ * @author nonom
+ */
+public class Q30_ChestCaughtWithABaitOfFire extends Quest
+{
+	private static final String qn = "30_ChestCaughtWithABaitOfFire";
+	
+	// NPCs
+	private static final int LINNAEUS = 31577;
+	private static final int RUKAL = 30629;
+	
+	// Items
+	private static final int RED_TREASURE_BOX = 6511;
+	private static final int RUKAL_MUSICAL = 7628;
+	private static final int PROTECTION_NECKLACE = 916;
+	
+	@Override
+	public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
+	{
+		String htmltext = event;
+		final QuestState st = player.getQuestState(qn);
+		if (st == null)
+		{
+			return htmltext;
+		}
+		
+		switch (event)
+		{
+			case "31577-02.htm":
+				st.set("cond", "1");
+				st.setState(State.STARTED);
+				st.playSound("ItemSound.quest_accept");
+				break;
+			case "31577-04a.htm":
+				if ((st.getInt("cond") == 1) && (st.hasQuestItems(RED_TREASURE_BOX)))
+				{
+					htmltext = "31577-04.htm";
+					st.set("cond", "2");
+					st.giveItems(RUKAL_MUSICAL, 1);
+					st.takeItems(RED_TREASURE_BOX, -1);
+					st.playSound("ItemSound.quest_middle");
+				}
+				break;
+			case "30629-02.htm":
+				if ((st.getInt("cond") == 2) && (st.hasQuestItems(RUKAL_MUSICAL)))
+				{
+					htmltext = "30629-03.htm";
+					st.giveItems(PROTECTION_NECKLACE, 1);
+					st.takeItems(RUKAL_MUSICAL, -1);
+					st.playSound("ItemSound.quest_finish");
+					st.exitQuest(false);
+				}
+				break;
+		
+		}
+		return htmltext;
+	}
+	
+	@Override
+	public String onTalk(L2Npc npc, L2PcInstance player)
+	{
+		String htmltext = getNoQuestMsg(player);
+		final QuestState st = player.getQuestState(qn);
+		if (st == null)
+		{
+			return htmltext;
+		}
+		
+		final int npcId = npc.getNpcId();
+		
+		switch (st.getState())
+		{
+			case State.COMPLETED:
+				htmltext = getAlreadyCompletedMsg(player);
+				break;
+			case State.CREATED:
+				final QuestState qs = player.getQuestState("53_LinnaeusSpecialBait");
+				if (npcId == LINNAEUS)
+				{
+					htmltext = "31577-00.htm";
+					if (qs != null)
+					{
+						htmltext = ((player.getLevel() >= 61) && qs.isCompleted()) ? "31577-01.htm" : htmltext;
+					}
+				}
+				break;
+			case State.STARTED:
+				final int cond = st.getInt("cond");
+				switch (npcId)
+				{
+					case LINNAEUS:
+						switch (cond)
+						{
+							case 1:
+								htmltext = "31577-03a.htm";
+								if (st.hasQuestItems(RED_TREASURE_BOX))
+								{
+									htmltext = "31577-03.htm";
+								}
+								break;
+							case 2:
+								htmltext = "31577-05.htm";
+								break;
+						}
+						break;
+					case RUKAL:
+						if (cond == 2)
+						{
+							htmltext = "30629-01.htm";
+						}
+						break;
+				}
+				break;
+		}
+		return htmltext;
+	}
+	
+	public Q30_ChestCaughtWithABaitOfFire(int questId, String name, String descr)
+	{
+		super(questId, name, descr);
+		
+		addStartNpc(LINNAEUS);
+		addTalkId(LINNAEUS, RUKAL);
+	}
+	
+	public static void main(String[] args)
+	{
+		new Q30_ChestCaughtWithABaitOfFire(30, qn, "Chest Caught With A Bait Of Fire");
+	}
+}