Fantasy Wine
- ID
- 379
- Название
- Fantasy Wine
- start_npcs_json
- [30074]
- npc_ids_json
- [20291,20292,30074]
- constants_json
- {"HARLAN":30074,"ENKU_CHAMPION":20291,"ENKU_SHAMAN":20292,"LEAF":5893,"STONE":5894}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00379_FantasyWine/Q00379_FantasyWine.java
NPC квеста
Условия уровней: выражения из Java
htmltext = (player.getLevel() < 20) ? "30074-0a.htm" : "30074-0.htm";
Выдача предметов, адены и опыта: выражения из Java
giveItems(player, 5956, 1); giveItems(player, 5957, 1); giveItems(player, 5958, 1); giveItems(player, LEAF, 1); giveItems(player, STONE, 1);
Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.
Тексты квеста
[30074-0.htm] Guard Harlan: Hello, stranger! My wife just recently gave birth to a beautiful baby girl! The countless amusements of fatherhood fill me with indescribable joy... I just want to play peek-a-boo all day! I don't care if people laugh... I would do anything for my precious baby! I see that you disapprove, but you must understand... My wife and I tried for 10 years to have a child! To finally have produced such a perfect baby would drive anyone to distraction! You are obviously not a parent! I'm sorry.
[30074-0a.htm] Guard Harlan: Hello, stranger! My wife just recently gave birth to a beautiful baby girl! The countless amusements of fatherhood fill me with indescribable joy... I just want to play peek-a-boo all day! I don't care if people laugh... I would do anything for my precious baby! I need a favor, but you are not yet skilled enough to do it for me. Please come back to see me later. (This quest may only be undertaken by a character of level 20 and above.)
[30074-1.htm] Guard Harlan: Apology accepted, my friend... I suppose I overreacted. To mark the birth of my daughter I want to make fantasy wine. The recipe has been in my family for many generations. When she marries I will serve it at her wedding! I am lacking some of the ingredients I need to make the wine. These ingredients have always been rare, but nowadays it's practically impossible to get them. To make matters worse, my duties as a guard keep me from going out and finding them myself. Would you help me? "What are the ingredients?" "I can't help you."
[30074-2.htm] Guard Harlan: Well, let's see, I'll need some leaves of eucalyptus... They can be obtained from an Enku orc champion. To properly age the wine I'll require some stones of chill... They're made and used by the Enku orc shaman. Bring these items to me and I'll make the wine. "I'll help you." "I'm sorry. I can't help you."
[30074-2a.htm] Guard Harlan: I understand, you're busy. If you should change your mind and we meet again, I could really use the help. Have a safe journey.
[30074-3.htm] Guard Harlan: Oh, great! Please bring me 80 Leaves of Eucalyptus... That should be enough for one barrel of wine. I'll need some Stones of Chill to properly age the wine... 100 should be enough. If you bring me these items, I'll give you a genuine bottle of Dion wine! No cost is too high for the sake of my precious daughter!
[30074-4.htm] Guard Harlan: Have you brought the ingredients for the fantasy wine? I'll need 80 leaves of eucalyptus from the Enku Orc Champions and 100 stones of chill from the Enku Orc Shamans.
[30074-4a.htm] Guard Harlan: You've brought all the leaves of eucalyptus I need, but I still don't have enough stones of chill. As I said, I need 100 of them.
[30074-4b.htm] Guard Harlan: You've brought enough stones of chill, but I still need more leaves of eucalyptus. As I said, I need 80 of them.
[30074-5.htm] Guard Harlan: Do you have all the ingredients? Let me see them! "Here, take them..."
[30074-6.htm] Guard Harlan: These ingredients aren't the best you can get, but they'll do. At least I can make the fantasy wine to celebrate my daughter's wedding. Thank you for helping me with this. Here is some wine made by my father. This is truly a rare gift. Share it with your friends on a happy occasion.
[30074-7.htm] Guard Harlan: Now I can make the fantasy wine! I'll let it age and serve it when my daughter gets married. Thank you! Here is some excellent wine made by my father. Open it to celebrate a special occasion with your family and friends.
[30074-8.htm] Guard Harlan: These are very high quality ingredients! Now I can make the very finest fantasy wine. What a wonderful gift for my daughter this will make! Here, take this excellent bottle of wine. It's very rare! In fact, there are only a few bottles of it in the entire kingdom!
Исходник условий и наград (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.Q00379_FantasyWine;
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 Q00379_FantasyWine extends Quest
{
// NPCs
private static final int HARLAN = 30074;
// Monsters
private static final int ENKU_CHAMPION = 20291;
private static final int ENKU_SHAMAN = 20292;
// Items
private static final int LEAF = 5893;
private static final int STONE = 5894;
public Q00379_FantasyWine()
{
super(379, "Fantasy Wine");
registerQuestItems(LEAF, STONE);
addStartNpc(HARLAN);
addTalkId(HARLAN);
addKillId(ENKU_CHAMPION, ENKU_SHAMAN);
}
@Override
public String onEvent(String event, Npc npc, Player player)
{
String htmltext = event;
final QuestState st = getQuestState(player, false);
if (st == null)
{
return htmltext;
}
switch (event)
{
case "30074-3.htm":
{
st.startQuest();
break;
}
case "30074-6.htm":
{
takeItems(player, LEAF, 80);
takeItems(player, STONE, 100);
final int rand = getRandom(10);
if (rand < 3)
{
htmltext = "30074-6.htm";
giveItems(player, 5956, 1);
}
else if (rand < 9)
{
htmltext = "30074-7.htm";
giveItems(player, 5957, 1);
}
else
{
htmltext = "30074-8.htm";
giveItems(player, 5958, 1);
}
st.exitQuest(true, true);
break;
}
case "30074-2a.htm":
{
st.exitQuest(true);
break;
}
}
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 = (player.getLevel() < 20) ? "30074-0a.htm" : "30074-0.htm";
break;
}
case State.STARTED:
{
final int leaf = getQuestItemsCount(player, LEAF);
final int stone = getQuestItemsCount(player, STONE);
if ((leaf >= 80) && (stone >= 100))
{
htmltext = "30074-5.htm";
}
else if (leaf >= 80)
{
htmltext = "30074-4a.htm";
}
else if (stone >= 100)
{
htmltext = "30074-4b.htm";
}
else
{
htmltext = "30074-4.htm";
}
break;
}
}
return htmltext;
}
@Override
public void onKill(Npc npc, Player player, boolean isPet)
{
final QuestState st = getQuestState(player, false);
if ((st == null) || !st.isCond(1))
{
return;
}
if (npc.getId() == ENKU_CHAMPION)
{
// Stop at the required amount, further kills would only bloat the inventory.
if (getQuestItemsCount(player, LEAF) < 80)
{
giveItems(player, LEAF, 1);
if ((getQuestItemsCount(player, LEAF) >= 80) && (getQuestItemsCount(player, STONE) >= 100))
{
st.setCond(2, true);
}
else
{
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
}
else
{
// Stop at the required amount, further kills would only bloat the inventory.
if (getQuestItemsCount(player, STONE) < 100)
{
giveItems(player, STONE, 1);
if ((getQuestItemsCount(player, STONE) >= 100) && (getQuestItemsCount(player, LEAF) >= 80))
{
st.setCond(2, true);
}
else
{
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
}
}
}