diff --git a/L2J_DataPack_BETA/dist/game/data/scripts.cfg b/L2J_DataPack_BETA/dist/game/data/scripts.cfg index 027178314bf947ee6481c9e3674847a36058bfd2..045d2d79c1172227e33dc9a7b2b2b15a58177406 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts.cfg +++ b/L2J_DataPack_BETA/dist/game/data/scripts.cfg @@ -657,7 +657,7 @@ quests/626_ADarkTwilight/__init__.py quests/627_HeartInSearchOfPower/__init__.py quests/628_HuntGoldenRam/__init__.py quests/629_CleanUpTheSwampOfScreams/__init__.py -quests/631_DeliciousTopChoiceMeat/__init__.py +quests/Q00631_DeliciousTopChoiceMeat/Q00631_DeliciousTopChoiceMeat.java quests/632_NecromancersRequest/__init__.py quests/633_InTheForgottenVillage/__init__.py quests/634_InSearchofDimensionalFragments/__init__.py diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/631_DeliciousTopChoiceMeat/31537-01.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/631_DeliciousTopChoiceMeat/31537-01.htm deleted file mode 100644 index ed45a5934e9ab288cbf24bfc09026ea27d80a99f..0000000000000000000000000000000000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/631_DeliciousTopChoiceMeat/31537-01.htm +++ /dev/null @@ -1,6 +0,0 @@ -<html><body>Beast Herder Tunatun:<br> -The meat of wild beasts is renowned for its succulence! From the clean taste of Kookaburra to the gamy taste of cougar, and Buffalo, with it's strong, musky taste...<br> -Unfortunately, there's no one left to raise and slaughter them... As they mature, they become ever more menacing and ferocious!<br> -None of us dare go near them!<br> -<a action="bypass -h Quest 631_DeliciousTopChoiceMeat 31537-03.htm">"I'll do it."</a> -</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/631_DeliciousTopChoiceMeat/31537-01a.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/631_DeliciousTopChoiceMeat/31537-01a.htm deleted file mode 100644 index 3b0b16885f0ffd9b43c2613df2eca70e79e83366..0000000000000000000000000000000000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/631_DeliciousTopChoiceMeat/31537-01a.htm +++ /dev/null @@ -1,3 +0,0 @@ -<html><body>Beast Herder Tunatun:<br> -Bring me 120 pieces of meat. One piece of meat makes a meal for one person. My customer needs 120 pieces of meat per day. -</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/631_DeliciousTopChoiceMeat/31537-02.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/631_DeliciousTopChoiceMeat/31537-02.htm deleted file mode 100644 index b3e5d72e2e6d06d0c6ffde5911d53ba3047144f7..0000000000000000000000000000000000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/631_DeliciousTopChoiceMeat/31537-02.htm +++ /dev/null @@ -1,5 +0,0 @@ -<html><body>Beast Herder Tunatun:<br> -You're very brave!<br> -But don't underestimate those creatures! They may look cute now, but the bigger they get, the more powerful they become! Honestly, my friend, I don't think you're up to it...<br> -(Only a character of level 65 or above may undertake this quest.) -</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/631_DeliciousTopChoiceMeat/31537-03.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/631_DeliciousTopChoiceMeat/31537-03.htm deleted file mode 100644 index b4f3b49b9627330bfc359abdeb50d36cff5f13a5..0000000000000000000000000000000000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/631_DeliciousTopChoiceMeat/31537-03.htm +++ /dev/null @@ -1,5 +0,0 @@ -<html><body>Beast Herder Tunatun:<br> -You're very brave!<br> -The best meat is obtained after a beast has grown a bit Not too young, nor fully grown... If they've become vicious, their meat will be bitter. You'll get a better feeling for this when you've done it a while...<br> -Bring me<font color="LEVEL"> 120 pieces of meet</font>... I need that much for one shipment. Please bring only the hightest quality meat! It's for Mr. Vladimir! I'm counting on you! -</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/631_DeliciousTopChoiceMeat/31537-04.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/631_DeliciousTopChoiceMeat/31537-04.htm deleted file mode 100644 index e16b82f5dd745e1749e90d693859f44b09909bf4..0000000000000000000000000000000000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/631_DeliciousTopChoiceMeat/31537-04.htm +++ /dev/null @@ -1,5 +0,0 @@ -<html><body>Beast Herder Tunatun:<br> -You've brought the meat! Good job! Mr. Vladimir will be very pleased!<br> -Thank you! While managing the pastureland, I often get items in lieu of money. As you can imagine, I have a lot of items! Would you be willing to accept an item in lieu of money...?<br> -<a action="bypass -h Quest 631_DeliciousTopChoiceMeat 31537-05.htm">"Sure, no problem."</a> -</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/631_DeliciousTopChoiceMeat/31537-05.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/631_DeliciousTopChoiceMeat/31537-05.htm deleted file mode 100644 index f93b5e0bf9f6a3a9ae21285d613e4bb4ef281b9a..0000000000000000000000000000000000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/631_DeliciousTopChoiceMeat/31537-05.htm +++ /dev/null @@ -1,9 +0,0 @@ -<html><body>Beast Herder Tunatun:<br> -Go ahead and choose! I have a vast selection, I'm sure you'll find something you like!<br> -<a action="bypass -h Quest 631_DeliciousTopChoiceMeat 1">15 units of Mold Glue</a><br> -<a action="bypass -h Quest 631_DeliciousTopChoiceMeat 2">15 units of Asofe</a><br> -<a action="bypass -h Quest 631_DeliciousTopChoiceMeat 3">15 Thons</a><br> -<a action="bypass -h Quest 631_DeliciousTopChoiceMeat 4">10 units of Mold Lubricant</a><br> -<a action="bypass -h Quest 631_DeliciousTopChoiceMeat 5">10 Enrias</a><br> -<a action="bypass -h Quest 631_DeliciousTopChoiceMeat 6">5 units of Mold Hardener</a> -</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/631_DeliciousTopChoiceMeat/31537-06.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/631_DeliciousTopChoiceMeat/31537-06.htm deleted file mode 100644 index 50776dba668ec2bd78e3a8cf34a35c4c38f61798..0000000000000000000000000000000000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/631_DeliciousTopChoiceMeat/31537-06.htm +++ /dev/null @@ -1,3 +0,0 @@ -<html><body>Beast Herder Tunatun:<br> -Thanks for your help! If you get a chance, come back and help me again. People always need meat! My customers can't get enought of it! -</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/631_DeliciousTopChoiceMeat/31537-07.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/631_DeliciousTopChoiceMeat/31537-07.htm deleted file mode 100644 index d5634ffe1eb21d7981634ea85f624a0420fe74f3..0000000000000000000000000000000000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/631_DeliciousTopChoiceMeat/31537-07.htm +++ /dev/null @@ -1,3 +0,0 @@ -<html><body>Beast Herder Tunatun:<br> -And here is your reward! Hey, wait! Where did that piece of meat go? It was right here!? -</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/631_DeliciousTopChoiceMeat/__init__.py b/L2J_DataPack_BETA/dist/game/data/scripts/quests/631_DeliciousTopChoiceMeat/__init__.py deleted file mode 100644 index e55ef4c7c2c39e6035b439bb5a7e18e0ef15f3bc..0000000000000000000000000000000000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/631_DeliciousTopChoiceMeat/__init__.py +++ /dev/null @@ -1,97 +0,0 @@ -# Made by Renji v0.1 -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.jython import QuestJython as JQuest - -qn = "631_DeliciousTopChoiceMeat" - -#NPC -TUNATUN = 31537 - -#ITEMS -TOP_QUALITY_MEAT = 7546 - -#REWARDS -MOLD_GLUE,MOLD_LUBRICANT,MOLD_HARDENER,ENRIA,ASOFE,THONS = 4039,4040,4041,4042,4043,4044 -REWARDS={"1":[MOLD_GLUE,15],"2":[ASOFE,15],"3":[THONS,15],"4":[MOLD_LUBRICANT,10],"5":[ENRIA,10],"6":[MOLD_HARDENER,5]} - - -class Quest (JQuest) : - - def __init__(self,id,name,descr): - JQuest.__init__(self,id,name,descr) - self.questItemIds = [TOP_QUALITY_MEAT] - - def onEvent (self,event,st) : - htmltext = event - if event == "31537-03.htm" : - st.set("cond","1") - st.setState(State.STARTED) - st.playSound("ItemSound.quest_accept") - elif event == "31537-05.htm" and st.getQuestItemsCount(TOP_QUALITY_MEAT) == 120 : - st.set("cond","3") - elif event in REWARDS.keys() : - htmltext = "31537-07.htm" - item,qty=REWARDS[event] - if st.getQuestItemsCount(TOP_QUALITY_MEAT) == 120 and st.getInt("cond") == 3: - htmltext = "31537-06.htm" - st.takeItems(TOP_QUALITY_MEAT,120) - st.rewardItems(item,qty) - st.playSound("ItemSound.quest_finish") - st.exitQuest(1) - return htmltext - - def onTalk (self,npc,player): - htmltext = Quest.getNoQuestMsg(player) - st = player.getQuestState(qn) - if st : - npcId = npc.getNpcId() - id = st.getState() - cond = st.getInt("cond") - if cond == 0 : - if player.getLevel() >= 65 : - htmltext = "31537-01.htm" - else: - htmltext = "31537-02.htm" - st.exitQuest(1) - elif id == State.STARTED : - if cond == 1 : - htmltext = "31537-01a.htm" - elif cond == 2 and st.getQuestItemsCount(TOP_QUALITY_MEAT) == 120 : - htmltext = "31537-04.htm" - elif cond == 3 : - htmltext = "31537-05.htm" - return htmltext - - def onKill(self,npc,player,isPet): - partyMember = self.getRandomPartyMember(player, "1") - if not partyMember: return - st = partyMember.getQuestState(qn) - if st : - if st.getState() == State.STARTED : - count = st.getQuestItemsCount(TOP_QUALITY_MEAT) - if st.getInt("cond") == 1 and count < 120 : - chance = 100 * Config.RATE_QUEST_DROP - numItems, chance = divmod(chance,100) - if self.getRandom(100) < chance : - numItems += 1 - if numItems : - if count + numItems >= 120 : - numItems = 120 - count - st.playSound("ItemSound.quest_middle") - st.set("cond","2") - else: - st.playSound("ItemSound.quest_itemget") - st.giveItems(TOP_QUALITY_MEAT,int(numItems)) - return - -QUEST = Quest(631,qn,"Delicious Top Choice Meat") - -QUEST.addStartNpc(TUNATUN) - -QUEST.addTalkId(TUNATUN) - -for npcId in range(21460,21468)+ range(21479,21487)+range(21498,21506) : - QUEST.addKillId(npcId) \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00631_DeliciousTopChoiceMeat/31537-01.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00631_DeliciousTopChoiceMeat/31537-01.htm new file mode 100644 index 0000000000000000000000000000000000000000..92151fe0fb8f556adb4a8dfb961b37979c6e59a2 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00631_DeliciousTopChoiceMeat/31537-01.htm @@ -0,0 +1,4 @@ +<html><body>Beast Herder Tunatun:<br> +The meat here is famous, and I'm not bragging. A hint of Kookaburra, a savory note of Cougar, and the tender taste of Buffalo meat... I'd offer a sample of Grendel meat, <br>IF we had a butcher!<br>The problem is they get too big, we need a butcher to handle them when they're full grown.<br> +<a action="bypass -h Quest Q00631_DeliciousTopChoiceMeat quest_accept">Say that you will do it</a> +</body></html> diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00631_DeliciousTopChoiceMeat/31537-02.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00631_DeliciousTopChoiceMeat/31537-02.html new file mode 100644 index 0000000000000000000000000000000000000000..6fe78d0cb4dd581e677cc446606a0c27d795d2aa --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00631_DeliciousTopChoiceMeat/31537-02.html @@ -0,0 +1,3 @@ +<html><body>Beast Herder Tunatun:<br> +Wow, you really ARE ready for anything! Ha!<br>Alright, let's talk business. We need the best meat, if the beasts aren't big enough then the meat isn't ready. The young ones taste okay, but if we don't provide the best someone else will.<br>For a good harvest we'll need <font color="LEVEL">about 120 units...</font> That would turn a nice profit. Vladimir will decide if the meat is good enough. Ahh.. I love a good beast hunt. Let's get it done! +</body></html> diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00631_DeliciousTopChoiceMeat/31537-03.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00631_DeliciousTopChoiceMeat/31537-03.html new file mode 100644 index 0000000000000000000000000000000000000000..9d1fcd4224491421a45a1d5e696a06855bf1ce04 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00631_DeliciousTopChoiceMeat/31537-03.html @@ -0,0 +1,3 @@ +<html><body>Beast Herder Tunatun:<br> +Wow, ready for anything aren't you? Haha!<br>Listen, you can't take these beasts lightly. The moment you do.. well.. there are no kind words for it. Even an adventurer with your skills could fall prey to a big one.. <br>(Only characters with level 82 and above are permitted to take on this quest.) +</body></html> diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00631_DeliciousTopChoiceMeat/31537-04.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00631_DeliciousTopChoiceMeat/31537-04.html new file mode 100644 index 0000000000000000000000000000000000000000..2ee0b933734b71e3cb7ee4a44d8994e948d29143 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00631_DeliciousTopChoiceMeat/31537-04.html @@ -0,0 +1,3 @@ +<html><body>Beast Herder Tunatun:<br> +We need 120 units of meat. One unit serves one person. My customer feeds 120 people, really it's not hard to understand.. +</body></html> diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00631_DeliciousTopChoiceMeat/31537-05.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00631_DeliciousTopChoiceMeat/31537-05.html new file mode 100644 index 0000000000000000000000000000000000000000..390420e12e811dddfa9da0fa546e18dc7c183a56 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00631_DeliciousTopChoiceMeat/31537-05.html @@ -0,0 +1,4 @@ +<html><body>Beast Herder Tunatun:<br> +You make it look so easy! Too bad I can't convince you to stay.. skills like yours are always welcome!<br>Here's the deal. Cash is thin right now, and we won't receive payment until we ship. For now, how about an item instead?<br> +<a action="bypass -h Quest Q00631_DeliciousTopChoiceMeat 31537-06.html">Say that you understand and will accept whatever the item is</a> +</body></html> diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00631_DeliciousTopChoiceMeat/31537-06.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00631_DeliciousTopChoiceMeat/31537-06.html new file mode 100644 index 0000000000000000000000000000000000000000..d0353fa4afafb1eb1302e551bb92d7d9e72bdf91 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00631_DeliciousTopChoiceMeat/31537-06.html @@ -0,0 +1,3 @@ +<html><body>Beast Herder Tunatun:<br> +Great, you've really been working hard. We'll have to do it again sometime! I could ship this daily, so the work is always here if you want it. +</body></html> diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00631_DeliciousTopChoiceMeat/Q00631_DeliciousTopChoiceMeat.java b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00631_DeliciousTopChoiceMeat/Q00631_DeliciousTopChoiceMeat.java new file mode 100644 index 0000000000000000000000000000000000000000..8b814840c8de7c9381983eb24480c46240733c04 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00631_DeliciousTopChoiceMeat/Q00631_DeliciousTopChoiceMeat.java @@ -0,0 +1,255 @@ +/* + * 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.Q00631_DeliciousTopChoiceMeat; + +import java.util.HashMap; +import java.util.Map; + +import com.l2jserver.Config; +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; + +/** + * Delicious Top Choice Meat (631) + * @author Adry_85 + */ +public class Q00631_DeliciousTopChoiceMeat extends Quest +{ + // NPCs + private static final int TUNATUN = 31537; + // Items + private static final int TOP_QUALITY_MEAT = 7546; + private static final int PRIME_MEAT = 15534; + // Misc + private static final int MIN_LEVEL = 82; + // Rewards + private static final int[] RECIPE = + { + 10373, // Recipe - Icarus Sawsword (60%) + 10374, // Recipe - Icarus Disperser (60%) + 10375, // Recipe - Icarus Spirit (60%) + 10376, // Recipe - Icarus Heavy Arms (60%) + 10377, // Recipe - Icarus Trident (60%) + 10378, // Recipe - Icarus Hammer (60%) + 10379, // Recipe - Icarus Hand (60%) + 10380, // Recipe - Icarus Hall (60%) + 10381, // Recipe - Icarus Spitter (60%) + }; + + private static final int[] PIECE = + { + 10397, // Icarus Sawsword Piece + 10398, // Icarus Disperser Piece + 10399, // Icarus Spirit Piece + 10400, // Icarus Heavy Arms Piece + 10401, // Icarus Trident Piece + 10402, // Icarus Hammer Piece + 10403, // Icarus Hand Piece + 10404, // Icarus Hall Piece + 10405, // Icarus Spitter Piece + }; + + private static final int GOLDEN_SPICE_CRATE = 15482; + private static final int CRYSTAL_SPICE_COMPRESSED_PACK = 15483; + + private static final Map<Integer, Integer> MOBS_MEAT = new HashMap<>(); + + static + { + MOBS_MEAT.put(18878, 172); // Full Grown Kookaburra + MOBS_MEAT.put(18879, 334); // Full Grown Kookaburra + MOBS_MEAT.put(18885, 172); // Full Grown Cougar + MOBS_MEAT.put(18886, 334); // Full Grown Cougar + MOBS_MEAT.put(18892, 182); // Full Grown Buffalo + MOBS_MEAT.put(18893, 349); // Full Grown Buffalo + MOBS_MEAT.put(18899, 182); // Full Grown Grendel + MOBS_MEAT.put(18900, 349); // Full Grown Grendel + } + + public Q00631_DeliciousTopChoiceMeat(int questId, String name, String descr) + { + super(questId, name, descr); + + addStartNpc(TUNATUN); + addTalkId(TUNATUN); + addKillId(MOBS_MEAT.keySet()); + registerQuestItems(TOP_QUALITY_MEAT, PRIME_MEAT); + } + + @Override + public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) + { + final QuestState st = player.getQuestState(getName()); + if (st == null) + { + return null; + } + + String htmltext = null; + switch (event) + { + case "quest_accept": + { + if (player.getLevel() >= MIN_LEVEL) + { + st.startQuest(); + htmltext = "31537-02.html"; + } + else + { + htmltext = "31537-03.html"; + } + break; + } + case "31537-06.html": + { + if (st.isCond(2) && (st.getQuestItemsCount(PRIME_MEAT) >= 120)) + { + switch (getRandom(10)) + { + case 0: + { + st.rewardItems(RECIPE[getRandom(RECIPE.length)], 1); + break; + } + case 1: + { + st.rewardItems(PIECE[getRandom(PIECE.length)], 1); + break; + } + case 2: + { + st.rewardItems(PIECE[getRandom(PIECE.length)], 2); + break; + } + case 3: + { + st.rewardItems(PIECE[getRandom(PIECE.length)], 3); + break; + } + case 4: + { + st.rewardItems(PIECE[getRandom(PIECE.length)], getRandom(5) + 2); + break; + } + case 5: + { + st.rewardItems(PIECE[getRandom(PIECE.length)], getRandom(7) + 2); + break; + } + case 6: + { + st.rewardItems(GOLDEN_SPICE_CRATE, 1); + break; + } + case 7: + { + st.rewardItems(GOLDEN_SPICE_CRATE, 2); + break; + } + case 8: + { + st.rewardItems(CRYSTAL_SPICE_COMPRESSED_PACK, 1); + break; + } + case 9: + { + st.rewardItems(CRYSTAL_SPICE_COMPRESSED_PACK, 2); + break; + } + } + st.exitQuest(true, true); + htmltext = event; + } + break; + } + } + return htmltext; + } + + @Override + public String onTalk(L2Npc npc, L2PcInstance player) + { + QuestState st = player.getQuestState(getName()); + String htmltext = getNoQuestMsg(player); + if (st == null) + { + return htmltext; + } + + switch (st.getState()) + { + case State.CREATED: + { + htmltext = "31537-01.htm"; + break; + } + case State.STARTED: + { + if (st.isCond(1)) + { + if (st.getQuestItemsCount(PRIME_MEAT) < 120) + { + htmltext = "31537-04.html"; + } + } + else if (st.isCond(2)) + { + if (st.getQuestItemsCount(PRIME_MEAT) >= 120) + { + htmltext = "31537-05.html"; + } + } + break; + } + } + return htmltext; + } + + @Override + public String onKill(L2Npc npc, L2PcInstance player, boolean isPet) + { + final L2PcInstance partyMember = getRandomPartyMember(player, "1"); + if (partyMember == null) + { + return super.onKill(npc, player, isPet); + } + + final QuestState st = partyMember.getQuestState(getName()); + int npcId = npc.getNpcId(); + int chance = (int) ((MOBS_MEAT.get(npcId) * Config.RATE_QUEST_DROP) % 1000); + if (getRandom(1000) < chance) + { + st.rewardItems(PRIME_MEAT, 1); + if (st.getQuestItemsCount(PRIME_MEAT) < 120) + { + st.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET); + } + else + { + st.setCond(2, true); + } + } + return super.onKill(npc, player, isPet); + } + + public static void main(String args[]) + { + new Q00631_DeliciousTopChoiceMeat(631, Q00631_DeliciousTopChoiceMeat.class.getSimpleName(), "Delicious Top Choice Meat"); + } +} diff --git a/L2J_DataPack_BETA/dist/sql/game/updates/20121218update.sql b/L2J_DataPack_BETA/dist/sql/game/updates/20121218update.sql new file mode 100644 index 0000000000000000000000000000000000000000..a0e82880191ca2b94563d73ab6cabed29205d5c8 --- /dev/null +++ b/L2J_DataPack_BETA/dist/sql/game/updates/20121218update.sql @@ -0,0 +1 @@ +DELETE FROM character_quests WHERE name='631_DeliciousTopChoiceMeat'; \ No newline at end of file