diff --git a/L2J_DataPack_BETA/dist/game/data/scripts.cfg b/L2J_DataPack_BETA/dist/game/data/scripts.cfg index 2d7a341aba5b1301b917ae60473b33d2b9c783ab..effaa054696957490c0cdba3a00be26d36f06abf 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts.cfg +++ b/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 diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/Fear.java b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/Fear.java index 3e213160023aa2eff2fe3c80e990dad336c5a5dd..6bc13f042e3f3e6bc0021587bdf4467d96694df7 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/Fear.java +++ b/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; diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/27_ChestCaughtWithABaitOfWind/__init__.py b/L2J_DataPack_BETA/dist/game/data/scripts/quests/27_ChestCaughtWithABaitOfWind/__init__.py deleted file mode 100644 index 450ec0fde09c5d5eb5a90bec90e1ed09f684dc44..0000000000000000000000000000000000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/27_ChestCaughtWithABaitOfWind/__init__.py +++ /dev/null @@ -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) diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/28_ChestCaughtWithABaitOfIcyAir/__init__.py b/L2J_DataPack_BETA/dist/game/data/scripts/quests/28_ChestCaughtWithABaitOfIcyAir/__init__.py deleted file mode 100644 index 5842121c29379704919384bee9db78fff71e8e65..0000000000000000000000000000000000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/28_ChestCaughtWithABaitOfIcyAir/__init__.py +++ /dev/null @@ -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) diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/29_ChestCaughtWithABaitOfEarth/31574-03.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/29_ChestCaughtWithABaitOfEarth/31574-03.htm deleted file mode 100644 index a5eb7495baf574540b98fb33eb0fc24e41a8bec8..0000000000000000000000000000000000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/29_ChestCaughtWithABaitOfEarth/31574-03.htm +++ /dev/null @@ -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> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/29_ChestCaughtWithABaitOfEarth/__init__.py b/L2J_DataPack_BETA/dist/game/data/scripts/quests/29_ChestCaughtWithABaitOfEarth/__init__.py deleted file mode 100644 index 9f41e831d0fec3b2c4b4166e3b57795afba7df42..0000000000000000000000000000000000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/29_ChestCaughtWithABaitOfEarth/__init__.py +++ /dev/null @@ -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) diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/30_ChestCaughtWithABaitOfFire/__init__.py b/L2J_DataPack_BETA/dist/game/data/scripts/quests/30_ChestCaughtWithABaitOfFire/__init__.py deleted file mode 100644 index 080719d61e9a40879f5e8449638abf5ebe2025fe..0000000000000000000000000000000000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/30_ChestCaughtWithABaitOfFire/__init__.py +++ /dev/null @@ -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) diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/27_ChestCaughtWithABaitOfWind/31434-00.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q27_ChestCaughtWithABaitOfWind/31434-00.htm similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/27_ChestCaughtWithABaitOfWind/31434-00.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q27_ChestCaughtWithABaitOfWind/31434-00.htm diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/27_ChestCaughtWithABaitOfWind/31434-01.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q27_ChestCaughtWithABaitOfWind/31434-01.htm similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/27_ChestCaughtWithABaitOfWind/31434-01.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q27_ChestCaughtWithABaitOfWind/31434-01.htm diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/27_ChestCaughtWithABaitOfWind/31434-02.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q27_ChestCaughtWithABaitOfWind/31434-02.htm similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/27_ChestCaughtWithABaitOfWind/31434-02.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q27_ChestCaughtWithABaitOfWind/31434-02.htm diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/27_ChestCaughtWithABaitOfWind/31570-01.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q27_ChestCaughtWithABaitOfWind/31570-01.htm similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/27_ChestCaughtWithABaitOfWind/31570-01.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q27_ChestCaughtWithABaitOfWind/31570-01.htm diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/27_ChestCaughtWithABaitOfWind/31570-02.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q27_ChestCaughtWithABaitOfWind/31570-02.htm similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/27_ChestCaughtWithABaitOfWind/31570-02.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q27_ChestCaughtWithABaitOfWind/31570-02.htm diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/27_ChestCaughtWithABaitOfWind/31570-03.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q27_ChestCaughtWithABaitOfWind/31570-03.htm similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/27_ChestCaughtWithABaitOfWind/31570-03.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q27_ChestCaughtWithABaitOfWind/31570-03.htm diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/27_ChestCaughtWithABaitOfWind/31570-04.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q27_ChestCaughtWithABaitOfWind/31570-04.htm similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/27_ChestCaughtWithABaitOfWind/31570-04.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q27_ChestCaughtWithABaitOfWind/31570-04.htm diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/27_ChestCaughtWithABaitOfWind/31570-05.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q27_ChestCaughtWithABaitOfWind/31570-05.htm similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/27_ChestCaughtWithABaitOfWind/31570-05.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q27_ChestCaughtWithABaitOfWind/31570-05.htm diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/27_ChestCaughtWithABaitOfWind/31570-06.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q27_ChestCaughtWithABaitOfWind/31570-06.htm similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/27_ChestCaughtWithABaitOfWind/31570-06.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q27_ChestCaughtWithABaitOfWind/31570-06.htm diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q27_ChestCaughtWithABaitOfWind/31570-07.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q27_ChestCaughtWithABaitOfWind/31570-07.htm new file mode 100644 index 0000000000000000000000000000000000000000..c5eab222a90f0c957ced1cef223cbd6350240cde --- /dev/null +++ b/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> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q27_ChestCaughtWithABaitOfWind/Q27_ChestCaughtWithABaitOfWind.java b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q27_ChestCaughtWithABaitOfWind/Q27_ChestCaughtWithABaitOfWind.java new file mode 100644 index 0000000000000000000000000000000000000000..54348fec562ad4691245fe4c6760b731eb1ce144 --- /dev/null +++ b/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"); + } +} diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/28_ChestCaughtWithABaitOfIcyAir/31442-01.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/31442-01.htm similarity index 83% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/28_ChestCaughtWithABaitOfIcyAir/31442-01.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/31442-01.htm index 049931d2587fe5ed2e5089e0780e5015baa2b549..f8f0fa7ac4b7c5a1b713c0022af7a84fcd3ec0f2 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/28_ChestCaughtWithABaitOfIcyAir/31442-01.htm +++ b/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> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/28_ChestCaughtWithABaitOfIcyAir/31442-02.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/31442-02.htm similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/28_ChestCaughtWithABaitOfIcyAir/31442-02.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/31442-02.htm diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/28_ChestCaughtWithABaitOfIcyAir/31442-03.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/31442-03.htm similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/28_ChestCaughtWithABaitOfIcyAir/31442-03.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/31442-03.htm diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/28_ChestCaughtWithABaitOfIcyAir/31572-01.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/31572-01.htm similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/28_ChestCaughtWithABaitOfIcyAir/31572-01.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/31572-01.htm diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/28_ChestCaughtWithABaitOfIcyAir/31572-02.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/31572-02.htm similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/28_ChestCaughtWithABaitOfIcyAir/31572-02.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/31572-02.htm diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/28_ChestCaughtWithABaitOfIcyAir/31572-03.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/31572-03.htm similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/28_ChestCaughtWithABaitOfIcyAir/31572-03.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/31572-03.htm diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/28_ChestCaughtWithABaitOfIcyAir/31572-04.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/31572-04.htm similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/28_ChestCaughtWithABaitOfIcyAir/31572-04.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/31572-04.htm diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/28_ChestCaughtWithABaitOfIcyAir/31572-05.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/31572-05.htm similarity index 90% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/28_ChestCaughtWithABaitOfIcyAir/31572-05.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/31572-05.htm index 39714b8a30d6277b7c0c073606b9ae7714244690..2b675c0a7f224642efe4392b6ba053e9b887887e 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/28_ChestCaughtWithABaitOfIcyAir/31572-05.htm +++ b/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> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/28_ChestCaughtWithABaitOfIcyAir/31572-06.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/31572-06.htm similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/28_ChestCaughtWithABaitOfIcyAir/31572-06.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/31572-06.htm diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/28_ChestCaughtWithABaitOfIcyAir/31572-07.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/31572-07.htm similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/28_ChestCaughtWithABaitOfIcyAir/31572-07.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/31572-07.htm diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/28_ChestCaughtWithABaitOfIcyAir/31572-08.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/31572-08.htm similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/28_ChestCaughtWithABaitOfIcyAir/31572-08.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/31572-08.htm diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/28_ChestCaughtWithABaitOfIcyAir/31572-09.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/31572-09.htm similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/28_ChestCaughtWithABaitOfIcyAir/31572-09.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/31572-09.htm diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/Q28_ChestCaughtWithABaitOfIcyAir.java b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q28_ChestCaughtWithABaitOfIcyAir/Q28_ChestCaughtWithABaitOfIcyAir.java new file mode 100644 index 0000000000000000000000000000000000000000..c0ec6b524ee114d1a9ba956f0d2f108339e19604 --- /dev/null +++ b/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"); + } +} diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/29_ChestCaughtWithABaitOfEarth/30909-01.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q29_ChestCaughtWithABaitOfEarth/30909-01.htm similarity index 80% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/29_ChestCaughtWithABaitOfEarth/30909-01.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q29_ChestCaughtWithABaitOfEarth/30909-01.htm index 346cce2beff650ca46477c9abdd70010e4cc9464..25834eca4a469da50a8e4bb18b165fee6b017ab5 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/29_ChestCaughtWithABaitOfEarth/30909-01.htm +++ b/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> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/29_ChestCaughtWithABaitOfEarth/30909-02.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q29_ChestCaughtWithABaitOfEarth/30909-02.htm similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/29_ChestCaughtWithABaitOfEarth/30909-02.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q29_ChestCaughtWithABaitOfEarth/30909-02.htm diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/29_ChestCaughtWithABaitOfEarth/30909-03.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q29_ChestCaughtWithABaitOfEarth/30909-03.htm similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/29_ChestCaughtWithABaitOfEarth/30909-03.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q29_ChestCaughtWithABaitOfEarth/30909-03.htm diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/29_ChestCaughtWithABaitOfEarth/31574-01.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q29_ChestCaughtWithABaitOfEarth/31574-01.htm similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/29_ChestCaughtWithABaitOfEarth/31574-01.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q29_ChestCaughtWithABaitOfEarth/31574-01.htm diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/29_ChestCaughtWithABaitOfEarth/31574-02.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q29_ChestCaughtWithABaitOfEarth/31574-02.htm similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/29_ChestCaughtWithABaitOfEarth/31574-02.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q29_ChestCaughtWithABaitOfEarth/31574-02.htm diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/29_ChestCaughtWithABaitOfEarth/31574-04.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q29_ChestCaughtWithABaitOfEarth/31574-04.htm similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/29_ChestCaughtWithABaitOfEarth/31574-04.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q29_ChestCaughtWithABaitOfEarth/31574-04.htm diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/29_ChestCaughtWithABaitOfEarth/31574-05.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q29_ChestCaughtWithABaitOfEarth/31574-05.htm similarity index 90% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/29_ChestCaughtWithABaitOfEarth/31574-05.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q29_ChestCaughtWithABaitOfEarth/31574-05.htm index d8c175a3b206a8d099645cd295064e3366260853..f93b4b41d9f66417fed679956533a8a01a56d96c 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/29_ChestCaughtWithABaitOfEarth/31574-05.htm +++ b/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> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/29_ChestCaughtWithABaitOfEarth/31574-06.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q29_ChestCaughtWithABaitOfEarth/31574-06.htm similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/29_ChestCaughtWithABaitOfEarth/31574-06.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q29_ChestCaughtWithABaitOfEarth/31574-06.htm diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/29_ChestCaughtWithABaitOfEarth/31574-07.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q29_ChestCaughtWithABaitOfEarth/31574-07.htm similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/29_ChestCaughtWithABaitOfEarth/31574-07.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q29_ChestCaughtWithABaitOfEarth/31574-07.htm diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/29_ChestCaughtWithABaitOfEarth/31574-08.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q29_ChestCaughtWithABaitOfEarth/31574-08.htm similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/29_ChestCaughtWithABaitOfEarth/31574-08.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q29_ChestCaughtWithABaitOfEarth/31574-08.htm diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/29_ChestCaughtWithABaitOfEarth/31574-09.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q29_ChestCaughtWithABaitOfEarth/31574-09.htm similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/29_ChestCaughtWithABaitOfEarth/31574-09.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q29_ChestCaughtWithABaitOfEarth/31574-09.htm diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q29_ChestCaughtWithABaitOfEarth/Q29_ChestCaughtWithABaitOfEarth.java b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q29_ChestCaughtWithABaitOfEarth/Q29_ChestCaughtWithABaitOfEarth.java new file mode 100644 index 0000000000000000000000000000000000000000..65f3e392a2f963a608f557492ef1ddff23d338fc --- /dev/null +++ b/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"); + } +} diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/30_ChestCaughtWithABaitOfFire/30629-01.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q30_ChestCaughtWithABaitOfFire/30629-01.htm similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/30_ChestCaughtWithABaitOfFire/30629-01.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q30_ChestCaughtWithABaitOfFire/30629-01.htm diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/30_ChestCaughtWithABaitOfFire/30629-02.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q30_ChestCaughtWithABaitOfFire/30629-02.htm similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/30_ChestCaughtWithABaitOfFire/30629-02.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q30_ChestCaughtWithABaitOfFire/30629-02.htm diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/30_ChestCaughtWithABaitOfFire/30629-03.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q30_ChestCaughtWithABaitOfFire/30629-03.htm similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/30_ChestCaughtWithABaitOfFire/30629-03.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q30_ChestCaughtWithABaitOfFire/30629-03.htm diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/30_ChestCaughtWithABaitOfFire/31577-00.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q30_ChestCaughtWithABaitOfFire/31577-00.htm similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/30_ChestCaughtWithABaitOfFire/31577-00.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q30_ChestCaughtWithABaitOfFire/31577-00.htm diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/30_ChestCaughtWithABaitOfFire/31577-01.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q30_ChestCaughtWithABaitOfFire/31577-01.htm similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/30_ChestCaughtWithABaitOfFire/31577-01.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q30_ChestCaughtWithABaitOfFire/31577-01.htm diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/30_ChestCaughtWithABaitOfFire/31577-02.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q30_ChestCaughtWithABaitOfFire/31577-02.htm similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/30_ChestCaughtWithABaitOfFire/31577-02.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q30_ChestCaughtWithABaitOfFire/31577-02.htm diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/30_ChestCaughtWithABaitOfFire/31577-03.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q30_ChestCaughtWithABaitOfFire/31577-03.htm similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/30_ChestCaughtWithABaitOfFire/31577-03.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q30_ChestCaughtWithABaitOfFire/31577-03.htm diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/30_ChestCaughtWithABaitOfFire/31577-03a.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q30_ChestCaughtWithABaitOfFire/31577-03a.htm similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/30_ChestCaughtWithABaitOfFire/31577-03a.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q30_ChestCaughtWithABaitOfFire/31577-03a.htm diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/30_ChestCaughtWithABaitOfFire/31577-04.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q30_ChestCaughtWithABaitOfFire/31577-04.htm similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/30_ChestCaughtWithABaitOfFire/31577-04.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q30_ChestCaughtWithABaitOfFire/31577-04.htm diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/30_ChestCaughtWithABaitOfFire/31577-04a.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q30_ChestCaughtWithABaitOfFire/31577-04a.htm similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/30_ChestCaughtWithABaitOfFire/31577-04a.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q30_ChestCaughtWithABaitOfFire/31577-04a.htm diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/30_ChestCaughtWithABaitOfFire/31577-05.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q30_ChestCaughtWithABaitOfFire/31577-05.htm similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/30_ChestCaughtWithABaitOfFire/31577-05.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q30_ChestCaughtWithABaitOfFire/31577-05.htm diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q30_ChestCaughtWithABaitOfFire/Q30_ChestCaughtWithABaitOfFire.java b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q30_ChestCaughtWithABaitOfFire/Q30_ChestCaughtWithABaitOfFire.java new file mode 100644 index 0000000000000000000000000000000000000000..3947f9804ce361539e9f1810c450580e9b05c36b --- /dev/null +++ b/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"); + } +}