From fc8366e044ad1564534562b68427c3fddf7750e0 Mon Sep 17 00:00:00 2001 From: Zoey76 <zoey_76@msn.com> Date: Fri, 7 Mar 2014 00:50:39 +0000 Subject: [PATCH] BETA: Quests in Java: * Red-Eyed Invaders (39) * The Finest Food (623) Patch by: janiko Reviewed by: jurchiks, xban1x, Zoey76 --- L2J_DataPack_BETA/dist/game/data/scripts.cfg | 4 +- .../quests/39_RedEyedInvaders/30332-1.htm | 8 - .../quests/39_RedEyedInvaders/30332-2.htm | 5 - .../quests/39_RedEyedInvaders/30334-0.htm | 6 - .../quests/39_RedEyedInvaders/30334-1.htm | 4 - .../quests/39_RedEyedInvaders/30334-2.htm | 4 - .../quests/39_RedEyedInvaders/30334-3.htm | 3 - .../quests/39_RedEyedInvaders/__init__.py | 142 --------- .../quests/623_TheFinestFood/31521-03.htm | 5 - .../quests/623_TheFinestFood/__init__.py | 122 -------- .../30332-01.html} | 4 +- .../Q00039_RedEyedInvaders/30332-02.html | 8 + .../Q00039_RedEyedInvaders/30332-03.html | 4 + .../Q00039_RedEyedInvaders/30332-04.html | 5 + .../30332-05.html} | 4 +- .../Q00039_RedEyedInvaders/30332-06.html | 4 + .../Q00039_RedEyedInvaders/30332-07.html | 4 + .../30332-08.html} | 4 +- .../30332-09.html} | 4 +- .../Q00039_RedEyedInvaders/30332-10.html | 4 + .../Q00039_RedEyedInvaders/30334-01.htm | 5 + .../Q00039_RedEyedInvaders/30334-02.htm | 4 + .../Q00039_RedEyedInvaders/30334-03.htm | 4 + .../Q00039_RedEyedInvaders/30334-04.html | 3 + .../Q00039_RedEyedInvaders.java | 280 ++++++++++++++++++ .../31521-01.htm | 4 +- .../31521-02.htm | 0 .../quests/Q00623_TheFinestFood/31521-03.htm | 5 + .../31521-04.html} | 0 .../31521-05.html} | 2 +- .../31521-06.html} | 0 .../31521-07.html} | 0 .../Q00623_TheFinestFood.java | 189 ++++++++++++ .../dist/sql/game/updates/20140307update.sql | 2 + 34 files changed, 534 insertions(+), 312 deletions(-) delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/39_RedEyedInvaders/30332-1.htm delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/39_RedEyedInvaders/30332-2.htm delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/39_RedEyedInvaders/30334-0.htm delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/39_RedEyedInvaders/30334-1.htm delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/39_RedEyedInvaders/30334-2.htm delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/39_RedEyedInvaders/30334-3.htm delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/39_RedEyedInvaders/__init__.py delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/623_TheFinestFood/31521-03.htm delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/623_TheFinestFood/__init__.py rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{39_RedEyedInvaders/30332-0.htm => Q00039_RedEyedInvaders/30332-01.html} (65%) create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30332-02.html create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30332-03.html create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30332-04.html rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{39_RedEyedInvaders/30332-3.htm => Q00039_RedEyedInvaders/30332-05.html} (52%) create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30332-06.html create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30332-07.html rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{39_RedEyedInvaders/30332-4.htm => Q00039_RedEyedInvaders/30332-08.html} (65%) rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{39_RedEyedInvaders/30332-5.htm => Q00039_RedEyedInvaders/30332-09.html} (85%) create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30332-10.html create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30334-01.htm create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30334-02.htm create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30334-03.htm create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30334-04.html create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/Q00039_RedEyedInvaders.java rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{623_TheFinestFood => Q00623_TheFinestFood}/31521-01.htm (77%) rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{623_TheFinestFood => Q00623_TheFinestFood}/31521-02.htm (100%) create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00623_TheFinestFood/31521-03.htm rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{623_TheFinestFood/31521-05.htm => Q00623_TheFinestFood/31521-04.html} (100%) rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{623_TheFinestFood/31521-04.htm => Q00623_TheFinestFood/31521-05.html} (72%) rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{623_TheFinestFood/31521-06.htm => Q00623_TheFinestFood/31521-06.html} (100%) rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{623_TheFinestFood/31521-07.htm => Q00623_TheFinestFood/31521-07.html} (100%) create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00623_TheFinestFood/Q00623_TheFinestFood.java create mode 100644 L2J_DataPack_BETA/dist/sql/game/updates/20140307update.sql diff --git a/L2J_DataPack_BETA/dist/game/data/scripts.cfg b/L2J_DataPack_BETA/dist/game/data/scripts.cfg index ef18ba8866..00d0556772 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts.cfg +++ b/L2J_DataPack_BETA/dist/game/data/scripts.cfg @@ -280,7 +280,7 @@ quests/Q00035_FindGlitteringJewelry/Q00035_FindGlitteringJewelry.java quests/Q00036_MakeASewingKit/Q00036_MakeASewingKit.java quests/Q00037_MakeFormalWear/Q00037_MakeFormalWear.java quests/Q00038_DragonFangs/Q00038_DragonFangs.java -quests/39_RedEyedInvaders/__init__.py +quests/Q00039_RedEyedInvaders/Q00039_RedEyedInvaders.java quests/Q00040_ASpecialOrder/Q00040_ASpecialOrder.java quests/Q00042_HelpTheUncle/Q00042_HelpTheUncle.java quests/Q00043_HelpTheSister/Q00043_HelpTheSister.java @@ -607,7 +607,7 @@ quests/Q00619_RelicsOfTheOldEmpire/Q00619_RelicsOfTheOldEmpire.java quests/620_FourGoblets/__init__.py quests/Q00621_EggDelivery/Q00621_EggDelivery.java quests/Q00622_SpecialtyLiquorDelivery/Q00622_SpecialtyLiquorDelivery.java -quests/623_TheFinestFood/__init__.py +quests/Q00623_TheFinestFood/Q00623_TheFinestFood.java quests/Q00624_TheFinestIngredientsPart1/Q00624_TheFinestIngredientsPart1.java quests/625_TheFinestIngredientsPart2/__init__.py quests/Q00626_ADarkTwilight/Q00626_ADarkTwilight.java diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/39_RedEyedInvaders/30332-1.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/39_RedEyedInvaders/30332-1.htm deleted file mode 100644 index ebcb1ae4a1..0000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/39_RedEyedInvaders/30332-1.htm +++ /dev/null @@ -1,8 +0,0 @@ -<html><body>Captain Bathis:<br> -The mission is simple:<br> -Find the Maille Lizardmen on the plains west of the village and kill them!<br> -Their advance unit consists of<font color="LEVEL"> Maille Lizardmen, Maille Lizardmen Scouts and Maille Lizardmen Guards.</font> You must destroy them and stop their advance.<br> -All Maille Lizardmen wear a<font color="LEVEL"> Bone Totem Necklace</font> into battle. Bring me these Necklaces and I'll reward you based how many you bring back. You'll find<font color="LEVEL"> Black Bone Totem Necklaces</font> and<font color="LEVEL"> Red Bone Totem Necklaces</font>. Bring me<font color="LEVEL"> One-hundred</font> of each.<br> -Compared with other tribes, the Maille Lizardmen are physicaly weak. But this is more than made up for by their superior intelligence. When attacking them, you mustn't let them surround you! I've heard they have giant spiders fighting alongside them, so watch out for them!<br> -As I said, you'll find them on the<font color="LEVEL"> plains west of the village</font>. Good hunting! -</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/39_RedEyedInvaders/30332-2.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/39_RedEyedInvaders/30332-2.htm deleted file mode 100644 index 22a54be196..0000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/39_RedEyedInvaders/30332-2.htm +++ /dev/null @@ -1,5 +0,0 @@ -<html><body>Captain Bathis:<br> -Good job! We won't have to worry about them for a while!<br> -We were sucessful that time, but reports from the battlefield of giant, deadly arachnids are reason for concern... Would you help us get rid of these horrible spiders?<br> -<a action="bypass -h Quest 39_RedEyedInvaders 30332-3.htm">Well, I suppose I'll do it.</a> -</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/39_RedEyedInvaders/30334-0.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/39_RedEyedInvaders/30334-0.htm deleted file mode 100644 index 7a928151d4..0000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/39_RedEyedInvaders/30334-0.htm +++ /dev/null @@ -1,6 +0,0 @@ -<html><body>Guard Babenco:<br> -I just received a report that a large army of savage<font color="LEVEL"> Maille Lizardmen</font> is gathering in the western section of Gludio Castle Town. They're not satisfied staying on the plains.<br> -<font color="LEVEL">Captain Bathis</font> is recruting militiamen in Gludio, and we need all the help we can get.<br> -You seem worthly. Would you join us?<br> -<a action="bypass -h Quest 39_RedEyedInvaders 30334-1.htm">I'll help!</a> -</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/39_RedEyedInvaders/30334-1.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/39_RedEyedInvaders/30334-1.htm deleted file mode 100644 index 1370804802..0000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/39_RedEyedInvaders/30334-1.htm +++ /dev/null @@ -1,4 +0,0 @@ -<html><body>Guard Babenco:<br> -Thanks for your help. I'm honored.<br> -Report to<font color="LEVEL"> Captain Bathis</font> for your orders. He's at the<font color="LEVEL"> northern entrance of Gludio Castle Town</font>. -</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/39_RedEyedInvaders/30334-2.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/39_RedEyedInvaders/30334-2.htm deleted file mode 100644 index feef365ad6..0000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/39_RedEyedInvaders/30334-2.htm +++ /dev/null @@ -1,4 +0,0 @@ -<html><body>Guard Babenco:<br> -I just received a report that a large army of savage<font color="LEVEL"> Maille Lizardmen</font> is gathering in the western section of Gludio Castle Town. They're not satisfied staying on the plains.<br> -<font color="LEVEL">Captain Bathis</font> is recruiting militiamen in Gludio, and we need help, but this is too dangerous for beginners.<br> -(Only a character of level 20 or above can undertake this quest.)</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/39_RedEyedInvaders/30334-3.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/39_RedEyedInvaders/30334-3.htm deleted file mode 100644 index 9a60a32fd7..0000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/39_RedEyedInvaders/30334-3.htm +++ /dev/null @@ -1,3 +0,0 @@ -<html><body>Guard Babenco:<br> -Report to<font color="LEVEL"> Captain Bathis</font> for your orders. He's at the<font color="LEVEL"> northern entrance of Gludio Castle Town</font>. -</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/39_RedEyedInvaders/__init__.py b/L2J_DataPack_BETA/dist/game/data/scripts/quests/39_RedEyedInvaders/__init__.py deleted file mode 100644 index 3548794d3b..0000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/39_RedEyedInvaders/__init__.py +++ /dev/null @@ -1,142 +0,0 @@ -# Made by disKret, as a part of the -# Official L2J Datapack Project, please visit -# http://www.l2jdp.com/forum/ to meet the community behind it, or -# http://l2jdp.com/trac if you need to report a bug. -import sys -from com.l2jserver import Config -from com.l2jserver.gameserver.model.quest import State -from com.l2jserver.gameserver.model.quest import QuestState -from com.l2jserver.gameserver.model.quest import Quest as JQuest - -qn = "39_RedEyedInvaders" - -#NPC -BABENCO = 30334 -BATHIS = 30332 - -#MOBS -M_LIZARDMAN = 20919 -M_LIZARDMAN_SCOUT = 20920 -M_LIZARDMAN_GUARD = 20921 -ARANEID = 20925 - -#QUEST DROPS -BLACK_BONE_NECKLACE,RED_BONE_NECKLACE,INCENSE_POUCH,GEM_OF_MAILLE = range(7178,7182) - -NECKLACE={M_LIZARDMAN_GUARD:[RED_BONE_NECKLACE,100,BLACK_BONE_NECKLACE,"3"], - M_LIZARDMAN:[BLACK_BONE_NECKLACE,100,RED_BONE_NECKLACE,"3"], - M_LIZARDMAN_SCOUT:[BLACK_BONE_NECKLACE,100,RED_BONE_NECKLACE,"3"] -} -DROPLIST={ARANEID:[GEM_OF_MAILLE,30,INCENSE_POUCH,"5"], - M_LIZARDMAN_GUARD:[INCENSE_POUCH,30,GEM_OF_MAILLE,"5"], - M_LIZARDMAN_SCOUT:[INCENSE_POUCH,30,GEM_OF_MAILLE,"5"] -} -#REWARDS -GREEN_COLORED_LURE_HG = 6521 -BABY_DUCK_RODE = 6529 -FISHING_SHOT_NG = 6535 - -def drop(partyMember,array) : - item,max,item2,condition = array - st = partyMember.getQuestState(qn) - count = st.getQuestItemsCount(item) - numItems,chance = divmod(100*Config.RATE_QUEST_DROP,100) - if st.getQuest().getRandom(100) < chance : - numItems = numItems + 1 - if count+numItems > max : - numItems = max - count - st.giveItems(item,int(numItems)) - if st.getQuestItemsCount(item) == max and st.getQuestItemsCount(item2) == max: - st.playSound("ItemSound.quest_middle") - st.set("cond",condition) - else: - st.playSound("ItemSound.quest_itemget") - return - -class Quest (JQuest) : - - def __init__(self,id,name,descr): - JQuest.__init__(self,id,name,descr) - self.questItemIds = range(7178,7182) - - def onEvent (self,event,st) : - htmltext = event - cond = st.getInt("cond") - if st.getState() != State.COMPLETED : - if event == "30334-1.htm" and cond == 0 : - st.set("cond","1") - st.setState(State.STARTED) - st.playSound("ItemSound.quest_accept") - elif event == "30332-1.htm" and cond == 1 : - st.set("cond","2") - elif event == "30332-3.htm" : - if st.getQuestItemsCount(BLACK_BONE_NECKLACE) == st.getQuestItemsCount(RED_BONE_NECKLACE) == 100 and cond == 3: - st.takeItems(BLACK_BONE_NECKLACE,100) - st.takeItems(RED_BONE_NECKLACE,100) - st.set("cond","4") - else : - htmltext = "You don't have required items" - elif event == "30332-5.htm" : - if st.getQuestItemsCount(INCENSE_POUCH) == st.getQuestItemsCount(GEM_OF_MAILLE) == 30 and cond == 5 : - st.takeItems(INCENSE_POUCH,30) - st.takeItems(GEM_OF_MAILLE,30) - st.giveItems(GREEN_COLORED_LURE_HG,60) - st.giveItems(BABY_DUCK_RODE,1) - st.giveItems(FISHING_SHOT_NG,500) - st.addExpAndSp(62366,2783) - st.unset("cond") - st.playSound("ItemSound.quest_finish") - st.exitQuest(False) - else : - htmltext = "You don't have required items" - return htmltext - - def onTalk (self,npc,player): - htmltext = Quest.getNoQuestMsg(player) - st = player.getQuestState(qn) - if not st : return htmltext - npcId = npc.getId() - id = st.getState() - cond = st.getInt("cond") - if id == State.COMPLETED : - htmltext = Quest.getAlreadyCompletedMsg(player) - - elif npcId == BABENCO : - if id == State.CREATED : - if player.getLevel() >= 20 : - htmltext = "30334-0.htm" - else : - st.exitQuest(1) - htmltext = "30334-2.htm" - else : - htmltext = "30334-3.htm" - elif npcId == BATHIS and id == State.STARTED: - if cond == 1 : - htmltext = "30332-0.htm" - elif st.getQuestItemsCount(BLACK_BONE_NECKLACE) == st.getQuestItemsCount(RED_BONE_NECKLACE) == 100 : - htmltext = "30332-2.htm" - elif st.getQuestItemsCount(INCENSE_POUCH) == st.getQuestItemsCount(GEM_OF_MAILLE) == 30 : - htmltext = "30332-4.htm" - return htmltext - - def onKill(self,npc,player,isPet): - npcId = npc.getId() - partyMember = self.getRandomPartyMember(player, 2) - if (partyMember and npcId != ARANEID) : - drop(partyMember,NECKLACE[npcId]) - else: - partyMember = self.getRandomPartyMember(player, 4) - if (partyMember and npcId != M_LIZARDMAN) : - drop(partyMember,DROPLIST[npcId]) - return - -QUEST = Quest(39,qn,"Red Eyed Invaders") - -QUEST.addStartNpc(BABENCO) -QUEST.addTalkId(BABENCO) -QUEST.addTalkId(BATHIS) - -QUEST.addKillId(M_LIZARDMAN) -QUEST.addKillId(M_LIZARDMAN_SCOUT) -QUEST.addKillId(M_LIZARDMAN_GUARD) -QUEST.addKillId(ARANEID) \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/623_TheFinestFood/31521-03.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/623_TheFinestFood/31521-03.htm deleted file mode 100644 index 7fa2666932..0000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/623_TheFinestFood/31521-03.htm +++ /dev/null @@ -1,5 +0,0 @@ -<html><body>Chef Jeremy:<br> -Wonderful!<br> -I need some<font color="LEVEL"> Leaves of Hot Springs Flava</font>,<font color="LEVEL"> Meat of Hot Springs Buffalo</font> and<font color="LEVEL"> Horn of Hot Springs Antelope</font>. Please bring me one hundred of each.<br> -I know it's a lot, but what can I say? Do it for the advancement of culinary science!<br> -</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/623_TheFinestFood/__init__.py b/L2J_DataPack_BETA/dist/game/data/scripts/quests/623_TheFinestFood/__init__.py deleted file mode 100644 index ecb4065c3b..0000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/623_TheFinestFood/__init__.py +++ /dev/null @@ -1,122 +0,0 @@ -# The Finest Food - v0.1 by disKret & DrLecter -import sys -from com.l2jserver import Config -from com.l2jserver.util import Rnd -from com.l2jserver.gameserver.model.quest import State -from com.l2jserver.gameserver.model.quest import QuestState -from com.l2jserver.gameserver.model.quest import Quest as JQuest - -qn = "623_TheFinestFood" - -#NPC -JEREMY = 31521 - -#ITEMS -LEAF_OF_FLAVA,BUFFALO_MEAT,ANTELOPE_HORN = range(7199,7202) - -#MOBS, DROPS, CHANCES & REWARDS -BUFFALO,FLAVA,ANTELOPE = [ 21315,21316,21318 ] -DROPLIST = {BUFFALO:[BUFFALO_MEAT,99],FLAVA:[LEAF_OF_FLAVA,99],ANTELOPE:[ANTELOPE_HORN,99]} -REWARDS = [[6849,25000,0,11],[6847,65000,12,23],[6851,25000,24,33],[0,73000,34,100]] - -#needed count - -class Quest (JQuest) : - - def __init__(self,id,name,descr): - JQuest.__init__(self,id,name,descr) - self.questItemIds = range(7199,7202) - - def onEvent (self,event,st) : - cond = st.getInt("cond") - htmltext = event - leaf = st.getQuestItemsCount(LEAF_OF_FLAVA) - meat = st.getQuestItemsCount(BUFFALO_MEAT) - horn = st.getQuestItemsCount(ANTELOPE_HORN) - if event == "31521-03.htm" and cond == 0 : - if st.getPlayer().getLevel() >= 71 : - st.set("cond","1") - st.setState(State.STARTED) - st.playSound("ItemSound.quest_accept") - else : - htmltext = "31521-02.htm" - st.exitQuest(1) - elif event == "31521-07.htm" : - if cond == 2 and leaf == meat == horn == 100 : - htmltext = "31521-06.htm" - st.playSound("ItemSound.quest_finish") - random = self.getRandom(100) - i = 0 - while i < len(REWARDS) : - item,adena,chance,chance2=REWARDS[i] - if chance<=random<= chance2 : - break - i = i+1 - st.giveItems(57,adena) - if item : - st.giveItems(item,1) - else : - st.addExpAndSp(230000,18250) - st.takeItems(LEAF_OF_FLAVA,-1) - st.takeItems(BUFFALO_MEAT,-1) - st.takeItems(ANTELOPE_HORN,-1) - st.exitQuest(1) - return htmltext - - def onTalk (self,npc,player) : - htmltext = Quest.getNoQuestMsg(player) - st = player.getQuestState(qn) - if st : - cond = st.getInt("cond") - leaf = st.getQuestItemsCount(LEAF_OF_FLAVA) - meat = st.getQuestItemsCount(BUFFALO_MEAT) - horn = st.getQuestItemsCount(ANTELOPE_HORN) - if cond == 0 : - htmltext = "31521-01.htm" - elif st.getState() == State.STARTED : - if cond == 1 : - htmltext = "31521-05.htm" - elif cond == 2 and leaf == meat == horn == 100 : - htmltext = "31521-04.htm" - return htmltext - - def onKill(self,npc,player,isPet): - partyMember1 = self.getRandomPartyMember(player, 1) - partyMember2 = self.getRandomPartyMemberState(player, State.COMPLETED) - if not partyMember1 and not partyMember2 : return - partyMember = partyMember1 - item,chance = DROPLIST[npc.getId()] - dropchance = Rnd.get(100) - if dropchance < chance: - # player who has State.COMPLETED up to 2 out of 3 item collections may consume the party drop - if partyMember2 : - if Rnd.get(100) <= 66: - return - else : - partyMember = partyMember1 - st = partyMember.getQuestState(qn) - if st : - if st.getState() == State.STARTED : - count = st.getQuestItemsCount(item) - if st.getInt("cond") == 1 and count < 100 : - numItems, chance = divmod(chance*Config.RATE_QUEST_DROP,100) - if dropchance < chance: - numItems += 1 - if count + numItems >= 100 : - numItems = 100 - count - if numItems != 0 : - st.giveItems(item,int(numItems)) - if st.getQuestItemsCount(LEAF_OF_FLAVA) == st.getQuestItemsCount(BUFFALO_MEAT) == st.getQuestItemsCount(ANTELOPE_HORN) == 100 : - st.set("cond","2") - st.playSound("ItemSound.quest_middle") - else : - st.playSound("ItemSound.quest_itemget") - return - -QUEST = Quest(623,qn,"The Finest Food") - -QUEST.addStartNpc(JEREMY) -QUEST.addTalkId(JEREMY) - -for mob in DROPLIST.keys() : - QUEST.addKillId(mob) \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/39_RedEyedInvaders/30332-0.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30332-01.html similarity index 65% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/39_RedEyedInvaders/30332-0.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30332-01.html index c621e59674..c67dc7f82d 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/39_RedEyedInvaders/30332-0.htm +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30332-01.html @@ -1,6 +1,6 @@ <html><body>Captain Bathis:<br> -Did Guard Babenco send you?<br> +Did Guard Babenco send you?<br> Hmm... You don't have very good armor, do you? Oh well, I do have to commend you for your bravery!<br> This is a critical and potentially very dangerous mission! You must listen carefully!<br> -<a action="bypass -h Quest 39_RedEyedInvaders 30332-1.htm">I'm listening.</a> +<a action="bypass -h Quest Q00039_RedEyedInvaders 30332-02.html">"I'm listening."</a> </body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30332-02.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30332-02.html new file mode 100644 index 0000000000..66c823c8ef --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30332-02.html @@ -0,0 +1,8 @@ +<html><body>Captain Bathis:<br> +The mission is simple:<br> +Find the Maille Lizardmen on the plains west of the village and kill them!<br> +Their advance unit consists of <font color="LEVEL">Maille Lizardmen, Maille Lizardman Scouts, and Maille Lizardman Guards</font>. You must destroy them and stop their advance.<br> +All Maille Lizardman wear a <font color="LEVEL">Bone Totem Necklace</font> into battle. Bring me these Necklaces and I'll reward you based how many you bring back. You'll find <font color="LEVEL">Black Bone Totem Necklaces</font> and <font color="LEVEL">Red Bone Totem Necklaces</font>. Bring me <font color="LEVEL">One-hundred</font> of each.<br> +Compared with other tribes, the Maille Lizardmen are physically weak. But this is more than made up for by their superior intelligence. When attacking them, you mustn't let them surround you! I've heard they have giant spiders fighting alongside them, so watch out for them!<br> +As I said, you'll find them on the <font color="LEVEL">plains west of the village</font>. Good hunting! +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30332-03.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30332-03.html new file mode 100644 index 0000000000..8f08e3249b --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30332-03.html @@ -0,0 +1,4 @@ +<html><body>Captain Bathis:<br> +The battle continues! The lizardmen may attack at any moment! Drop off your delivery and return to the battlefield immediately!<br> +Don't forget to bring back some war trophies! I need <font color="LEVEL">100 Red Totem Necklaces</font> and <font color="LEVEL">100 black Totem Necklaces</font>. The Maille Lizardmen can be found on the plains west of the village. +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30332-04.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30332-04.html new file mode 100644 index 0000000000..659a20e4c5 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30332-04.html @@ -0,0 +1,5 @@ +<html><body>Captain Bathis:<br> +Good job! We won't have to worry about them for a while!<br> +We were successful that time, but reports from the battlefield of giant, deadly arachnids are reason for concern... Would you help us get rid of these horrible spiders?<br> +<a action="bypass -h Quest Q00039_RedEyedInvaders 30332-05.html">"Well, I suppose I'll do it."</a> +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/39_RedEyedInvaders/30332-3.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30332-05.html similarity index 52% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/39_RedEyedInvaders/30332-3.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30332-05.html index 0de41197c8..b7d3bcde5a 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/39_RedEyedInvaders/30332-3.htm +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30332-05.html @@ -1,5 +1,5 @@ <html><body>Captain Bathis:<br> I realize you just completed a difficult task, but we still need your help!<br> -We must discover the<font color="LEVEL"> connection between Maille Lizardmen and the Araneids</font>. They've been fighting alongside the lizardmen! This is unheard of!<br> -Return to the<font color="LEVEL"> Maille Lizardmen Barracks</font> and investigate this unholy alliance! You should be able to find out more if you kill<font color="LEVEL"> Maille Lizardmen Scouts and Guards</font> and the<font color="LEVEL"> Giant Araneids</font>. +We must discover the <font color="LEVEL">connection between Maille Lizardmen and the Araneids</font>. They've been fighting alongside the lizardmen! This is unheard of!<br> +Return to the <font color="LEVEL">Maille Lizardman Barracks</font> and investigate this unholy alliance! You should be able to find out more if you kill <font color="LEVEL">Maille Lizardman Scouts and Guards</font> and the <font color="LEVEL"> Giant Araneids</font>. </body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30332-06.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30332-06.html new file mode 100644 index 0000000000..8f08e3249b --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30332-06.html @@ -0,0 +1,4 @@ +<html><body>Captain Bathis:<br> +The battle continues! The lizardmen may attack at any moment! Drop off your delivery and return to the battlefield immediately!<br> +Don't forget to bring back some war trophies! I need <font color="LEVEL">100 Red Totem Necklaces</font> and <font color="LEVEL">100 black Totem Necklaces</font>. The Maille Lizardmen can be found on the plains west of the village. +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30332-07.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30332-07.html new file mode 100644 index 0000000000..39fa7e106a --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30332-07.html @@ -0,0 +1,4 @@ +<html><body>Captain Bathis:<br> +Thank you for your hard work, but we still need more items to fully investigate this matter.<br> +I need <font color="LEVEL">30 mysterious Incense Pouches</font> and <font color="LEVEL">30 five-colored beads</font>. Don't let me down! +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/39_RedEyedInvaders/30332-4.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30332-08.html similarity index 65% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/39_RedEyedInvaders/30332-4.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30332-08.html index 3a3fa302c0..09d08aba41 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/39_RedEyedInvaders/30332-4.htm +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30332-08.html @@ -1,5 +1,5 @@ -<html><body>Captain Bathis:<br> +<html><body>Captain Bathis:<br> You've proven the conspiracy between the Maille Lizardmen and the giant spiders! Magister Rohmer attributes it to the lizardmen's magic. This matter must be investigated further!<br> We'll get to the bottom of this eventually!<br> -<a action="bypass -h Quest 39_RedEyedInvaders 30332-5.htm">Is my mission over?</a> +<a action="bypass -h Quest Q00039_RedEyedInvaders 30332-09.html">"Is my mission over?"</a> </body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/39_RedEyedInvaders/30332-5.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30332-09.html similarity index 85% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/39_RedEyedInvaders/30332-5.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30332-09.html index fa92098ed6..2a2d035714 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/39_RedEyedInvaders/30332-5.htm +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30332-09.html @@ -1,4 +1,4 @@ -<html><body>Captain Bathis:<br> +<html><body>Captain Bathis:<br> Thank you very much! Now we have enough ingredients for Magister Rohmer to determine the roots of this conspiracy! We couldn't have done it without you!<br> -The future of Gludio is secure in the hands of noble warriors like you. Please accept this humble reward as a token of our appreciation! +The future of Gludio is secure in the hands of noble warriors like you. Please accept this humble reward as a token of our appreciation!<br> </body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30332-10.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30332-10.html new file mode 100644 index 0000000000..0714397b12 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30332-10.html @@ -0,0 +1,4 @@ +<html><body>Captain Bathis:<br> +Thank you for your hard work, but we still need some more items to fully investigate this matter.<br> +Bring me <font color="LEVEL">30 mysterious Incense Pouches</font> and <font color="LEVEL">30 five-colored beads</font>. I'm counting on you! +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30334-01.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30334-01.htm new file mode 100644 index 0000000000..0c9a68528a --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30334-01.htm @@ -0,0 +1,5 @@ +<html><body>Guard Babenco:<br> +I just received a report that a large army of savage <font color="LEVEL">Maille Lizardmen</font> is gathering in the western section of the Town of Gludio. They're not satisfied staying on the plains.<br><font color="LEVEL">Captain Bathis</font> is recruiting militiamen in Gludio, and we need all the help we can get.<br> +You seem worthy. Would you join us?<br> +<a action="bypass -h Quest Q00039_RedEyedInvaders 30334-03.htm">"I'll help!"</a> +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30334-02.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30334-02.htm new file mode 100644 index 0000000000..b27762c058 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30334-02.htm @@ -0,0 +1,4 @@ +<html><body>Guard Babenco:<br> +I just received a report that a large army of savage <font color="LEVEL">Maille Lizardmen</font> is gathering in the western section of the Town of Gludio. They're not satisfied staying on the plains.<br><font color="LEVEL">Captain Bathis</font> is recruiting militiamen in Gludio, and we need help, but this is too dangerous for beginners.<br> +(Only a character of level 20 or above can undertake this quest.) +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30334-03.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30334-03.htm new file mode 100644 index 0000000000..16b9dbc917 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30334-03.htm @@ -0,0 +1,4 @@ +<html><body>Guard Babenco:<br> +Thanks for your help. I'm honored.<br> +Report to <font color="LEVEL">Captain Bathis</font> for your orders. He's at the <font color="LEVEL">northern entrance of the Town of Gludio</font>. +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30334-04.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30334-04.html new file mode 100644 index 0000000000..9056e4f07f --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/30334-04.html @@ -0,0 +1,3 @@ +<html><body>Guard Babenco:<br> +Report to <font color="LEVEL">Captain Bathis</font> for your orders. He's at the <font color="LEVEL">northern entrance of the Town of Gludio</font>. +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/Q00039_RedEyedInvaders.java b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/Q00039_RedEyedInvaders.java new file mode 100644 index 0000000000..626f276ea5 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00039_RedEyedInvaders/Q00039_RedEyedInvaders.java @@ -0,0 +1,280 @@ +/* + * Copyright (C) 2004-2014 L2J DataPack + * + * This file is part of L2J DataPack. + * + * L2J DataPack is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * L2J DataPack is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +package quests.Q00039_RedEyedInvaders; + +import com.l2jserver.gameserver.model.actor.L2Npc; +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.holders.ItemHolder; +import com.l2jserver.gameserver.model.quest.Quest; +import com.l2jserver.gameserver.model.quest.QuestState; + +/** + * Red-eyed Invaders (39) + * @author janiko + */ +public final class Q00039_RedEyedInvaders extends Quest +{ + // NPCs + private static final int CAPTAIN_BATHIA = 30332; + private static final int GUARD_BABENCO = 30334; + // Monsters + private static final int MALE_LIZARDMAN = 20919; + private static final int MALE_LIZARDMAN_SCOUT = 20920; + private static final int MALE_LIZARDMAN_GUARD = 20921; + private static final int GIANT_ARANE = 20925; + // Items + private static final ItemHolder LIZ_NECKLACE_A = new ItemHolder(7178, 100); + private static final ItemHolder LIZ_NECKLACE_B = new ItemHolder(7179, 100); + private static final ItemHolder LIZ_PERFUME = new ItemHolder(7180, 30); + private static final ItemHolder LIZ_GEM = new ItemHolder(7181, 30); + // Rewards + private static final ItemHolder GREEN_HIGH_LURE = new ItemHolder(6521, 60); + private static final ItemHolder BABYDUCK_ROD = new ItemHolder(6529, 1); + private static final ItemHolder FISHING_SHOT_NONE = new ItemHolder(6535, 500); + // Misc + private static final int MIN_LVL = 20; + + private Q00039_RedEyedInvaders() + { + super(39, Q00039_RedEyedInvaders.class.getSimpleName(), "Red-eyed Invaders"); + addStartNpc(GUARD_BABENCO); + addTalkId(GUARD_BABENCO, CAPTAIN_BATHIA); + addKillId(MALE_LIZARDMAN_GUARD, MALE_LIZARDMAN_SCOUT, MALE_LIZARDMAN, GIANT_ARANE); + registerQuestItems(LIZ_NECKLACE_A.getId(), LIZ_NECKLACE_B.getId(), LIZ_PERFUME.getId(), LIZ_GEM.getId()); + } + + @Override + public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) + { + final QuestState qs = getQuestState(player, false); + String htmltext = null; + if (qs == null) + { + return htmltext; + } + switch (event) + { + case "30334-03.htm": + { + if (qs.isCreated()) + { + qs.startQuest(); + htmltext = event; + } + break; + } + case "30332-02.html": + { + if (qs.isCond(1)) + { + qs.setCond(2, true); + htmltext = event; + } + break; + } + case "30332-05.html": + { + if (qs.isCond(3)) + { + if (hasAllItems(player, true, LIZ_NECKLACE_A, LIZ_NECKLACE_B)) + { + qs.setCond(4, true); + takeAllItems(player, LIZ_NECKLACE_A, LIZ_NECKLACE_B); + htmltext = event; + } + else + { + htmltext = "30332-06.html"; + } + } + break; + } + case "30332-09.html": + { + if (qs.isCond(5)) + { + if (hasAllItems(player, true, LIZ_PERFUME, LIZ_GEM)) + { + rewardItems(player, GREEN_HIGH_LURE); + rewardItems(player, BABYDUCK_ROD); + rewardItems(player, FISHING_SHOT_NONE); + addExpAndSp(player, 62366, 2783); + qs.exitQuest(false, true); + htmltext = event; + } + else + { + htmltext = "30332-10.html"; + } + } + break; + } + } + return htmltext; + } + + @Override + public String onTalk(L2Npc npc, L2PcInstance talker) + { + final QuestState qs = getQuestState(talker, true); + String htmltext = getNoQuestMsg(talker); + switch (npc.getId()) + { + case CAPTAIN_BATHIA: + { + switch (qs.getCond()) + { + case 1: + { + htmltext = "30332-01.html"; + break; + } + case 2: + { + htmltext = "30332-03.html"; + break; + } + case 3: + { + htmltext = "30332-04.html"; + break; + } + case 4: + { + htmltext = "30332-07.html"; + break; + } + case 5: + { + htmltext = "30332-08.html"; + break; + } + } + break; + } + case GUARD_BABENCO: + { + if (qs.isCreated()) + { + htmltext = (talker.getLevel() >= MIN_LVL) ? "30334-01.htm" : "30334-02.htm"; + } + else if (qs.isStarted() && qs.isCond(1)) + { + htmltext = "30334-04.html"; + } + else if (qs.isCompleted()) + { + htmltext = getAlreadyCompletedMsg(talker); + } + break; + } + } + return htmltext; + } + + @Override + public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon) + { + switch (npc.getId()) + { + case MALE_LIZARDMAN: + { + final QuestState qs = getRandomPartyMemberState(killer, 2, 3, npc); + if ((qs != null) && giveItemRandomly(qs.getPlayer(), npc, LIZ_NECKLACE_A.getId(), 1, LIZ_NECKLACE_A.getCount(), 0.5, true)) + { + if (hasItem(qs.getPlayer(), LIZ_NECKLACE_B)) + { + qs.setCond(3); + } + } + break; + } + case MALE_LIZARDMAN_SCOUT: + { + if (getRandomBoolean()) + { + final QuestState qs = getRandomPartyMemberState(killer, 2, 3, npc); + if ((qs != null) && giveItemRandomly(qs.getPlayer(), npc, LIZ_NECKLACE_A.getId(), 1, LIZ_NECKLACE_A.getCount(), 0.5, true)) + { + if (hasItem(qs.getPlayer(), LIZ_NECKLACE_B)) + { + qs.setCond(3); + } + } + } + else + { + final QuestState qs = getRandomPartyMemberState(killer, 4, 3, npc); + if ((qs != null) && giveItemRandomly(qs.getPlayer(), npc, LIZ_PERFUME.getId(), 1, LIZ_PERFUME.getCount(), 0.25, true)) + { + if (hasItem(qs.getPlayer(), LIZ_GEM)) + { + qs.setCond(5); + } + } + } + break; + } + case MALE_LIZARDMAN_GUARD: + { + if (getRandomBoolean()) + { + final QuestState qs = getRandomPartyMemberState(killer, 2, 3, npc); + if ((qs != null) && giveItemRandomly(qs.getPlayer(), npc, LIZ_NECKLACE_B.getId(), 1, LIZ_NECKLACE_B.getCount(), 0.5, true)) + { + if (hasItem(qs.getPlayer(), LIZ_NECKLACE_A)) + { + qs.setCond(3); + } + } + } + else + { + final QuestState qs = getRandomPartyMemberState(killer, 4, 3, npc); + if ((qs != null) && giveItemRandomly(qs.getPlayer(), npc, LIZ_PERFUME.getId(), 1, LIZ_PERFUME.getCount(), 0.3, true)) + { + if (hasItem(qs.getPlayer(), LIZ_GEM)) + { + qs.setCond(5); + } + } + } + break; + } + case GIANT_ARANE: + { + final QuestState qs = getRandomPartyMemberState(killer, 4, 3, npc); + if ((qs != null) && giveItemRandomly(qs.getPlayer(), npc, LIZ_GEM.getId(), 1, LIZ_GEM.getCount(), 0.3, true)) + { + if (hasItem(qs.getPlayer(), LIZ_PERFUME)) + { + qs.setCond(5); + } + } + break; + } + } + return super.onKill(npc, killer, isSummon); + } + + public static void main(String[] args) + { + new Q00039_RedEyedInvaders(); + } +} \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/623_TheFinestFood/31521-01.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00623_TheFinestFood/31521-01.htm similarity index 77% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/623_TheFinestFood/31521-01.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00623_TheFinestFood/31521-01.htm index 2a4682c7e4..7e6f39e4bc 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/623_TheFinestFood/31521-01.htm +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00623_TheFinestFood/31521-01.htm @@ -1,10 +1,10 @@ <html><body>Chef Jeremy:<br> -Long ago, the most distinguished aristocrats of the empire came here for their excursions. Those bastards! When I refused to be their personal chef, they insulted my food! They have no appreciation for haute cuisine!<br> +Long ago, the most distinguished aristocrats of the empire came here for their excursions. Those bastards! When I refused to be their personal chef, they insulted my food! They have no appreciation for haute cuisine!<br> As hard as they tried, no one could find fault with my food!<br> Those cretins had the nerve to point out that they weren't served a specialty dish indigenous to this region!<br> Then and there I resolved to make a dish so indigenous to this region that those barbarians would be silenced once and for all!<br> But, as I'm sure you're aware, it takes more than ingredients to make a dish.<br> The monsters in this region are too tough, don't you think?<br> Will you help me?<br> -<a action="bypass -h Quest 623_TheFinestFood 31521-03.htm">"I'll help you."</a> +<a action="bypass -h Quest Q00623_TheFinestFood 31521-03.htm>">"I'll help you."</a> </body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/623_TheFinestFood/31521-02.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00623_TheFinestFood/31521-02.htm similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/623_TheFinestFood/31521-02.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00623_TheFinestFood/31521-02.htm diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00623_TheFinestFood/31521-03.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00623_TheFinestFood/31521-03.htm new file mode 100644 index 0000000000..13ecafe1b9 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00623_TheFinestFood/31521-03.htm @@ -0,0 +1,5 @@ +<html><body>Chef Jeremy:<br> +Wonderful!<br> +I need some <font color="LEVEL">Leaves of Hot Springs Flava</font>, <font color="LEVEL">Meat of Hot Springs Buffalo</font> and <font color="LEVEL">Horn of Hot Springs Antelope</font>. Please bring me one hundred of each.<br> +I know it's a lot, but what can I say? Do it for the advancement of culinary science! +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/623_TheFinestFood/31521-05.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00623_TheFinestFood/31521-04.html similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/623_TheFinestFood/31521-05.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00623_TheFinestFood/31521-04.html diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/623_TheFinestFood/31521-04.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00623_TheFinestFood/31521-05.html similarity index 72% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/623_TheFinestFood/31521-04.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00623_TheFinestFood/31521-05.html index 16b927be2a..90ed40506a 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/623_TheFinestFood/31521-04.htm +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00623_TheFinestFood/31521-05.html @@ -1,5 +1,5 @@ <html><body>Chef Jeremy:<br> Excellent! I didn't think you'd survive! Oh, did I say that out loud?<br> I meant to say, I'm very happy to see you back so soon! Now, let's have a look at those ingredients.<br> -<a action="bypass -h Quest 623_TheFinestFood 31521-07.htm">"Here you go."</a> +<a action="bypass -h Quest Q00623_TheFinestFood 31521-06.html">"Here you go."</a> </body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/623_TheFinestFood/31521-06.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00623_TheFinestFood/31521-06.html similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/623_TheFinestFood/31521-06.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00623_TheFinestFood/31521-06.html diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/623_TheFinestFood/31521-07.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00623_TheFinestFood/31521-07.html similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/623_TheFinestFood/31521-07.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00623_TheFinestFood/31521-07.html diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00623_TheFinestFood/Q00623_TheFinestFood.java b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00623_TheFinestFood/Q00623_TheFinestFood.java new file mode 100644 index 0000000000..6b532dd6e9 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00623_TheFinestFood/Q00623_TheFinestFood.java @@ -0,0 +1,189 @@ +/* + * Copyright (C) 2004-2014 L2J DataPack + * + * This file is part of L2J DataPack. + * + * L2J DataPack is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * L2J DataPack is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +package quests.Q00623_TheFinestFood; + +import java.util.HashMap; +import java.util.Map; + +import com.l2jserver.gameserver.model.actor.L2Npc; +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.holders.ItemHolder; +import com.l2jserver.gameserver.model.quest.Quest; +import com.l2jserver.gameserver.model.quest.QuestState; + +/** + * The Finest Food (623) + * @author janiko + */ +public final class Q00623_TheFinestFood extends Quest +{ + // NPCs + private static final int JEREMY = 31521; + // Monsters + private static final int THERMAL_BUFFALO = 21315; + private static final int THERMAL_FLAVA = 21316; + private static final int THERMAL_ANTELOPE = 21318; + // Items + private static final ItemHolder LEAF_OF_FLAVA = new ItemHolder(7199, 100); + private static final ItemHolder BUFFALO_MEAT = new ItemHolder(7200, 100); + private static final ItemHolder HORN_OF_ANTELOPE = new ItemHolder(7201, 100); + // Rewards + private static final ItemHolder RING_OF_AURAKYRA = new ItemHolder(6849, 1); + private static final ItemHolder SEALED_SANDDRAGONS_EARING = new ItemHolder(6847, 1); + private static final ItemHolder DRAGON_NECKLACE = new ItemHolder(6851, 1); + // Misc + private static final int MIN_LVL = 71; + + private static final Map<Integer, ItemHolder> MONSTER_DROPS = new HashMap<>(); + static + { + MONSTER_DROPS.put(THERMAL_BUFFALO, BUFFALO_MEAT); + MONSTER_DROPS.put(THERMAL_FLAVA, LEAF_OF_FLAVA); + MONSTER_DROPS.put(THERMAL_ANTELOPE, HORN_OF_ANTELOPE); + } + + public Q00623_TheFinestFood() + { + super(623, Q00623_TheFinestFood.class.getSimpleName(), "The Finest Food"); + addStartNpc(JEREMY); + addTalkId(JEREMY); + addKillId(THERMAL_BUFFALO, THERMAL_FLAVA, THERMAL_ANTELOPE); + registerQuestItems(LEAF_OF_FLAVA.getId(), BUFFALO_MEAT.getId(), HORN_OF_ANTELOPE.getId()); + } + + @Override + public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) + { + final QuestState qs = getQuestState(player, false); + String htmltext = null; + if (qs == null) + { + return htmltext; + } + switch (event) + { + case "31521-03.htm": + { + if (qs.isCreated()) + { + qs.startQuest(); + htmltext = event; + } + break; + } + case "31521-06.html": + { + if (qs.isCond(2)) + { + if (hasAllItems(player, true, LEAF_OF_FLAVA, BUFFALO_MEAT, HORN_OF_ANTELOPE)) + { + int random = getRandom(1000); + if (random < 120) + { + giveAdena(player, 25000, true); + rewardItems(player, RING_OF_AURAKYRA); + } + else if (random < 240) + { + giveAdena(player, 65000, true); + rewardItems(player, SEALED_SANDDRAGONS_EARING); + } + else if (random < 340) + { + giveAdena(player, 25000, true); + rewardItems(player, DRAGON_NECKLACE); + } + else if (random < 940) + { + giveAdena(player, 73000, true); + addExpAndSp(player, 230000, 18200); + } + qs.exitQuest(false, true); + htmltext = event; + } + else + { + htmltext = "31521-07.html"; + } + } + break; + } + } + return htmltext; + } + + @Override + public String onTalk(L2Npc npc, L2PcInstance talker) + { + final QuestState qs = getQuestState(talker, true); + String htmltext = getNoQuestMsg(talker); + switch (npc.getId()) + { + case JEREMY: + { + if (qs.isCreated()) + { + htmltext = (talker.getLevel() >= MIN_LVL) ? "31521-01.htm" : "31521-02.htm"; + } + else if (qs.isStarted()) + { + switch (qs.getCond()) + { + case 1: + { + htmltext = "31521-04.html"; + break; + } + case 2: + { + htmltext = "31521-05.html"; + break; + } + } + } + else if (qs.isCompleted()) + { + htmltext = getAlreadyCompletedMsg(talker); + } + break; + } + } + return htmltext; + } + + @Override + public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon) + { + final QuestState qs = getRandomPartyMemberState(killer, 1, 3, npc); + final ItemHolder holder = MONSTER_DROPS.get(npc.getId()); + if ((qs != null) && giveItemRandomly(qs.getPlayer(), npc, holder.getId(), 1, holder.getCount(), 1, true)) + { + if (hasAllItems(qs.getPlayer(), true, BUFFALO_MEAT, HORN_OF_ANTELOPE, LEAF_OF_FLAVA)) + { + qs.setCond(2); + } + } + return super.onKill(npc, killer, isSummon); + } + + public static void main(String[] args) + { + new Q00623_TheFinestFood(); + } +} \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/sql/game/updates/20140307update.sql b/L2J_DataPack_BETA/dist/sql/game/updates/20140307update.sql new file mode 100644 index 0000000000..79754648e6 --- /dev/null +++ b/L2J_DataPack_BETA/dist/sql/game/updates/20140307update.sql @@ -0,0 +1,2 @@ +UPDATE character_quests SET name='Q00039_RedEyedInvaders' WHERE name='39_RedEyedInvaders'; +UPDATE character_quests SET name='Q00623_TheFinestFood' WHERE name='623_TheFinestFood'; \ No newline at end of file -- GitLab