The Finest Food
- ID
- 623
- Название
- The Finest Food
- start_npcs_json
- [31521]
- npc_ids_json
- [21315,21316,21318,31521]
- constants_json
- {"JEREMY":31521,"FLAVA":21316,"BUFFALO":21315,"ANTELOPE":21318,"LEAF_OF_FLAVA":7199,"BUFFALO_MEAT":7200,"ANTELOPE_HORN":7201}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00623_TheFinestFood/Q00623_TheFinestFood.java
NPC квеста
| ID | Название | Старт квеста | Уровень |
|---|---|---|---|
| 21315 | Hot Springs Buffalo | Нет | 73 |
| 21316 | Hot Springs Flava | Нет | 74 |
| 21318 | Hot Springs Antelope | Нет | 74 |
| 31521 | Jeremy | Да | 70 |
Условия уровней: выражения из Java
if (player.getLevel() >= 71)
Выдача предметов, адены и опыта: выражения из Java
giveAdena(player, 25000, true); giveItems(player, 6849, 1); giveAdena(player, 65000, true); giveItems(player, 6847, 1); giveAdena(player, 25000, true); giveItems(player, 6851, 1); giveAdena(player, 73000, true); addExpAndSp(player, 230000, 18250); giveItems(partyMember, LEAF_OF_FLAVA, 1); giveItems(partyMember, BUFFALO_MEAT, 1); giveItems(partyMember, ANTELOPE_HORN, 1);
Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.
Тексты квеста
[31521-01.htm] Chef Jeremy: 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! As hard as they tried, no one could find fault with my food! Those cretins had the nerve to point out that they weren't served a specialty dish indigenous to this region! Then and there I resolved to make a dish so indigenous to this region that those barbarians would be silenced once and for all! But, as I'm sure you're aware, it takes more than ingredients to make a dish. The monsters in this region are too tough, don't you think? Will you help me? "I'll help you."
[31521-02.htm] Chef Jeremy: Wonderful! I need some Leaves of Hot Springs Flava, Meat of Hot Springs Buffalo and Horn of Hot Springs Antelope. Please bring me one hundred of each. I know it's a lot, but what can I say? Do it for the advancement of culinary science!
[31521-03.htm] Chef Jeremy: Thanks anyway, but you're definitely not up to it. (This quest may only be undertaken by a character of level 71 and above.)
[31521-04.htm] Chef Jeremy: Excellent! I didn't think you'd survive! Oh, did I say that out loud? I meant to say, I'm very happy to see you back so soon! Now, let's have a look at those ingredients. "Here you go."
[31521-05.htm] Chef Jeremy: Fantastic! You obviously know talent when you see it! This is my current menu. It changes frequently, since my customers are constantly dropping off delicious new ingredients!
[31521-06.htm] Chef Jeremy: No, no, no! I can't do it unless you bring me the exact amount of ingredients! What did I do to deserve this?
[31521-07.htm] Chef Jeremy: This amount of materials is not enough!
Исходник условий и наград (Java)
/*
* Copyright (c) 2013 L2jMobius
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
* IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package quests.Q00623_TheFinestFood;
import org.l2jmobius.gameserver.entity.actor.Npc;
import org.l2jmobius.gameserver.entity.actor.Player;
import org.l2jmobius.gameserver.mechanics.script.Quest;
import org.l2jmobius.gameserver.mechanics.script.QuestSound;
import org.l2jmobius.gameserver.mechanics.script.QuestState;
import org.l2jmobius.gameserver.mechanics.script.State;
public class Q00623_TheFinestFood extends Quest
{
// NPC
private static final int JEREMY = 31521;
// Monsters
private static final int FLAVA = 21316;
private static final int BUFFALO = 21315;
private static final int ANTELOPE = 21318;
// Items
private static final int LEAF_OF_FLAVA = 7199;
private static final int BUFFALO_MEAT = 7200;
private static final int ANTELOPE_HORN = 7201;
public Q00623_TheFinestFood()
{
super(623, "The Finest Food");
registerQuestItems(LEAF_OF_FLAVA, BUFFALO_MEAT, ANTELOPE_HORN);
addStartNpc(JEREMY);
addTalkId(JEREMY);
addKillId(FLAVA, BUFFALO, ANTELOPE);
}
@Override
public String onEvent(String event, Npc npc, Player player)
{
String htmltext = event;
final QuestState st = getQuestState(player, false);
if (st == null)
{
return htmltext;
}
if (event.equals("31521-02.htm"))
{
if (player.getLevel() >= 71)
{
st.startQuest();
}
else
{
htmltext = "31521-03.htm";
}
}
else if (event.equals("31521-05.htm"))
{
takeItems(player, LEAF_OF_FLAVA, -1);
takeItems(player, BUFFALO_MEAT, -1);
takeItems(player, ANTELOPE_HORN, -1);
final int luck = getRandom(100);
if (luck < 11)
{
giveAdena(player, 25000, true);
giveItems(player, 6849, 1);
}
else if (luck < 23)
{
giveAdena(player, 65000, true);
giveItems(player, 6847, 1);
}
else if (luck < 33)
{
giveAdena(player, 25000, true);
giveItems(player, 6851, 1);
}
else
{
giveAdena(player, 73000, true);
addExpAndSp(player, 230000, 18250);
}
st.exitQuest(true, true);
}
return htmltext;
}
@Override
public String onTalk(Npc npc, Player player)
{
String htmltext = getNoQuestMsg(player);
final QuestState st = getQuestState(player, true);
switch (st.getState())
{
case State.CREATED:
{
htmltext = "31521-01.htm";
break;
}
case State.STARTED:
{
final int cond = st.getCond();
if (cond == 1)
{
htmltext = "31521-06.htm";
}
else if (cond == 2)
{
if ((getQuestItemsCount(player, LEAF_OF_FLAVA) >= 100) && (getQuestItemsCount(player, BUFFALO_MEAT) >= 100) && (getQuestItemsCount(player, ANTELOPE_HORN) >= 100))
{
htmltext = "31521-04.htm";
}
else
{
htmltext = "31521-07.htm";
}
}
break;
}
}
return htmltext;
}
@Override
public void onKill(Npc npc, Player player, boolean isPet)
{
final QuestState qs = getRandomPartyMemberState(player, 1, 3, npc);
if (qs == null)
{
return;
}
final Player partyMember = qs.getPlayer();
final QuestState st = getQuestState(partyMember, false);
if (st == null)
{
return;
}
switch (npc.getId())
{
case FLAVA:
{
if (getQuestItemsCount(partyMember, LEAF_OF_FLAVA) < 100)
{
giveItems(partyMember, LEAF_OF_FLAVA, 1);
if ((getQuestItemsCount(partyMember, LEAF_OF_FLAVA) >= 100) && (getQuestItemsCount(partyMember, BUFFALO_MEAT) >= 100) && (getQuestItemsCount(partyMember, ANTELOPE_HORN) >= 100))
{
st.setCond(2, true);
}
else
{
playSound(partyMember, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
break;
}
case BUFFALO:
{
if (getQuestItemsCount(partyMember, BUFFALO_MEAT) < 100)
{
giveItems(partyMember, BUFFALO_MEAT, 1);
if ((getQuestItemsCount(partyMember, BUFFALO_MEAT) >= 100) && (getQuestItemsCount(partyMember, LEAF_OF_FLAVA) >= 100) && (getQuestItemsCount(partyMember, ANTELOPE_HORN) >= 100))
{
st.setCond(2, true);
}
else
{
playSound(partyMember, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
break;
}
case ANTELOPE:
{
if (getQuestItemsCount(partyMember, ANTELOPE_HORN) < 100)
{
giveItems(partyMember, ANTELOPE_HORN, 1);
if ((getQuestItemsCount(partyMember, ANTELOPE_HORN) >= 100) && (getQuestItemsCount(partyMember, LEAF_OF_FLAVA) >= 100) && (getQuestItemsCount(partyMember, BUFFALO_MEAT) >= 100))
{
st.setCond(2, true);
}
else
{
playSound(partyMember, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
break;
}
}
}
}