Egg Delivery
- ID
- 621
- Название
- Egg Delivery
- start_npcs_json
- [31521]
- npc_ids_json
- [31521,31543,31544,31545,31546,31547,31584]
- constants_json
- {"JEREMY":31521,"PULIN":31543,"NAFF":31544,"CROCUS":31545,"KUBER":31546,"BEOLIN":31547,"VALENTINE":31584,"BOILED_EGGS":7195,"FEE_OF_BOILED_EGG":7196,"HASTE_POTION":1062}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00621_EggDelivery/Q00621_EggDelivery.java
NPC квеста
| ID | Название | Старт квеста | Уровень |
|---|---|---|---|
| 31521 | Jeremy | Да | 70 |
| 31543 | Pulin | Нет | 70 |
| 31544 | Naff | Нет | 70 |
| 31545 | Crocus | Нет | 70 |
| 31546 | Kuber | Нет | 70 |
| 31547 | Beolin | Нет | 70 |
| 31584 | Valentine | Нет | 70 |
Условия уровней: выражения из Java
htmltext = (player.getLevel() < 68) ? "31521-03.htm" : "31521-01.htm";
Выдача предметов, адены и опыта: выражения из Java
giveItems(player, BOILED_EGGS, 5); giveItems(player, FEE_OF_BOILED_EGG, 1); giveItems(player, FEE_OF_BOILED_EGG, 1); giveItems(player, FEE_OF_BOILED_EGG, 1); giveItems(player, FEE_OF_BOILED_EGG, 1); giveItems(player, FEE_OF_BOILED_EGG, 1); rewardItems(player, RECIPES[getRandom(3)], 1); giveAdena(player, 18800, true); rewardItems(player, HASTE_POTION, 1);
Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.
Тексты квеста
[31521-01.htm] Chef Jeremy: You look like you could use a few extra adena... Well I'm looking for a helper! You'll earn an honest wage around here, that's for sure! All you have to do is take these steaming hot hard-boiled eggs I just made to my customers. Their names are already written on them. Deliver them quickly, and who knows? I might teach you a secret cooking technique! Ha! "I'll deliver your eggs."
[31521-02.htm] Chef Jeremy: Take these hard-Boiled Eggs to my customers at the hot springs resort. Everyone likes their eggs done a different way. You must deliver them in the order! Look at the note I gave you for details, and don't ever forget our motto, "The Customer Always Comes First"!
[31521-03.htm] Chef Jeremy: Many dangerous and ferocious beasts lurk these parts. I'd really hate to have to bury another assistant! (This quest may only be undertaken by a character of level 68 and above.)
[31521-04.htm] Chef Jeremy: What are you waiting for? My customers must be salivating, waiting for my delicious eggs to arrive! Get going!
[31521-05.htm] Chef Jeremy: Good! Did all the deliveries go off without a hitch? "I made all the deliveries."
[31521-06.htm] Chef Jeremy: Excellent! You seem to have more aptitude for delivery work than I thought. You did a good job, but unfortunately, I don't have the adena to pay you. I don't have any more work for you, either... Talk to Valentine in the Town of Goddard. He owes me, and he'll give you a satisfactory reward.
[31521-07.htm] Jeremy: Hey, what are you doing here? You should've visited Valentine in the Town of Goddard. I don't have any adena to give you.
[31521-08.htm] Chef Jeremy: Do you mean to say you dropped off my eggs without getting paid for them? How could you make such an idiotic mistake?
[31543-01.htm] Pulin: I'm starving! When will that eggman get here? "I've got some Boiled Eggs for you."
[31543-02.htm] Pulin: Woohoo! Yummy! There's nothing like a nice boiled egg at the hot springs! I could eat a thousand of these! Oh, thank you for the eggs! Here's your money. I know you are busy, so leave now. There are many places you must be, but here is not one of them.
[31543-03.htm] Pulin: Smack! Mmm... Chomp! Snort! Can't talk! ...Gulp! ...Eating!
[31544-01.htm] Naff: Oh, that feels great! If only I had some Boiled Eggs to go with it! "I have some Boiled Eggs for you!"
[31544-02.htm] Naff: Wow, this is great!
[31544-03.htm] Naff: Hmm... I know I'm sexy, but you're embarrassing me! Don't you have something else to do?
[31545-01.htm] Crocus: The hot springs just aren't the same without hard Boiled Eggs! Do you have any eggs? Do you?! "I've got your eggs right here."
[31545-02.htm] Crocus: There's nothing quite like the taste of a good egg! Jeremy's eggs taste better than anybody's!
[31545-03.htm] Crocus: If I only had a drink... I'd be the happiest person in the world!
[31546-01.htm] Kuber: Hot hot hot springs! I'm so happy to be here! It's so heavenly... My spirit soars! All my worries~ Far~ far~away~ Come what may~ I'll take it easy~~whatever happens~ "Egg delivery, sir!"
[31546-02.htm] Kuber: Oh my god! This is it! It's so good!
[31546-03.htm] Kuber: I need a nap.
[31547-01.htm] Beolin: I'm so hungry I could eat a thousand wyvern eggs! You don't happen to have any eggs, do you? I've got your eggs right here.
[31547-02.htm] Beolin: What excellent timing! If you were a minute later, I would've starved to death! Here's some money for your eggs!
[31547-03.htm] Beolin: That was awesome! I feel so much better! Tell Jeremy that the food was delicious!
[31584-01.htm] Brewer Valentine: Would you like a drink? What is it that you want? "Jeremy sent me."
[31584-02.htm] Brewer Valentine: Jeremy? He wants to be paid?... I thought this matter was settled! I distinctly remember paying you before!
Исходник условий и наград (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.Q00621_EggDelivery;
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 Q00621_EggDelivery extends Quest
{
// NPCs
private static final int JEREMY = 31521;
private static final int PULIN = 31543;
private static final int NAFF = 31544;
private static final int CROCUS = 31545;
private static final int KUBER = 31546;
private static final int BEOLIN = 31547;
private static final int VALENTINE = 31584;
// Items
private static final int BOILED_EGGS = 7195;
private static final int FEE_OF_BOILED_EGG = 7196;
// Rewards
private static final int HASTE_POTION = 1062;
private static final int[] RECIPES =
{
6847,
6849,
6851
};
public Q00621_EggDelivery()
{
super(621, "Egg Delivery");
registerQuestItems(BOILED_EGGS, FEE_OF_BOILED_EGG);
addStartNpc(JEREMY);
addTalkId(JEREMY, PULIN, NAFF, CROCUS, KUBER, BEOLIN, VALENTINE);
}
@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 "31521-02.htm":
{
st.startQuest();
giveItems(player, BOILED_EGGS, 5);
break;
}
case "31543-02.htm":
{
st.setCond(2);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
takeItems(player, BOILED_EGGS, 1);
giveItems(player, FEE_OF_BOILED_EGG, 1);
break;
}
case "31544-02.htm":
{
st.setCond(3);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
takeItems(player, BOILED_EGGS, 1);
giveItems(player, FEE_OF_BOILED_EGG, 1);
break;
}
case "31545-02.htm":
{
st.setCond(4);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
takeItems(player, BOILED_EGGS, 1);
giveItems(player, FEE_OF_BOILED_EGG, 1);
break;
}
case "31546-02.htm":
{
st.setCond(5);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
takeItems(player, BOILED_EGGS, 1);
giveItems(player, FEE_OF_BOILED_EGG, 1);
break;
}
case "31547-02.htm":
{
st.setCond(6);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
takeItems(player, BOILED_EGGS, 1);
giveItems(player, FEE_OF_BOILED_EGG, 1);
break;
}
case "31521-06.htm":
{
if (getQuestItemsCount(player, FEE_OF_BOILED_EGG) < 5)
{
htmltext = "31521-08.htm";
playSound(player, QuestSound.ITEMSOUND_QUEST_GIVEUP);
st.exitQuest(true);
}
else
{
st.setCond(7, true);
takeItems(player, FEE_OF_BOILED_EGG, 5);
}
break;
}
case "31584-02.htm":
{
if (getRandom(5) < 1)
{
rewardItems(player, RECIPES[getRandom(3)], 1);
st.exitQuest(true, true);
}
else
{
giveAdena(player, 18800, true);
rewardItems(player, HASTE_POTION, 1);
st.exitQuest(true, 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() < 68) ? "31521-03.htm" : "31521-01.htm";
break;
}
case State.STARTED:
{
final int cond = st.getCond();
switch (npc.getId())
{
case JEREMY:
{
if (cond == 1)
{
htmltext = "31521-04.htm";
}
else if (cond == 6)
{
htmltext = "31521-05.htm";
}
else if (cond == 7)
{
htmltext = "31521-07.htm";
}
break;
}
case PULIN:
{
if ((cond == 1) && (getQuestItemsCount(player, BOILED_EGGS) == 5))
{
htmltext = "31543-01.htm";
}
else if (cond > 1)
{
htmltext = "31543-03.htm";
}
break;
}
case NAFF:
{
if ((cond == 2) && (getQuestItemsCount(player, BOILED_EGGS) == 4))
{
htmltext = "31544-01.htm";
}
else if (cond > 2)
{
htmltext = "31544-03.htm";
}
break;
}
case CROCUS:
{
if ((cond == 3) && (getQuestItemsCount(player, BOILED_EGGS) == 3))
{
htmltext = "31545-01.htm";
}
else if (cond > 3)
{
htmltext = "31545-03.htm";
}
break;
}
case KUBER:
{
if ((cond == 4) && (getQuestItemsCount(player, BOILED_EGGS) == 2))
{
htmltext = "31546-01.htm";
}
else if (cond > 4)
{
htmltext = "31546-03.htm";
}
break;
}
case BEOLIN:
{
if ((cond == 5) && (getQuestItemsCount(player, BOILED_EGGS) == 1))
{
htmltext = "31547-01.htm";
}
else if (cond > 5)
{
htmltext = "31547-03.htm";
}
break;
}
case VALENTINE:
{
if (cond == 7)
{
htmltext = "31584-01.htm";
}
break;
}
}
break;
}
}
return htmltext;
}
}