Help the Son!
- ID
- 44
- Название
- Help the Son!
- start_npcs_json
- [30827]
- npc_ids_json
- [20919,20920,20921,30505,30827]
- constants_json
- {"LUNDY":30827,"DRIKUS":30505,"MAILLE":20919,"MAILLE_SCOUT":20920,"MAILLE_GUARD":20921,"WORK_HAMMER":168,"GEMSTONE_FRAGMENT":7552,"GEMSTONE":7553,"PET_TICKET":7585}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00044_HelpTheSon/Q00044_HelpTheSon.java
NPC квеста
| ID | Название | Старт квеста | Уровень |
|---|---|---|---|
| 20919 | Maille Lizardman | Нет | 20 |
| 20920 | Maille Lizardman Scout | Нет | 22 |
| 20921 | Maille Lizardman Guard | Нет | 24 |
| 30505 | Drikus | Нет | 70 |
| 30827 | Lundy | Да | 70 |
Условия уровней: выражения из Java
htmltext = (player.getLevel() < 24) ? "30827-00a.htm" : "30827-00.htm";
Выдача предметов, адены и опыта: выражения из Java
giveItems(player, GEMSTONE, 1); giveItems(player, PET_TICKET, 1); giveItems(player, GEMSTONE_FRAGMENT, 1);
Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.
Тексты квеста
[30505-05.htm] High Prefect Drikus: Oh no! The orb! It's broken! This is the orb of ancestors that Dudamara's totem told me about! It was stolen by lesser Orcs a very long time ago. Does it belong to you? "I'm not sure."
[30505-06.htm] High Prefect Drikus: Hmm... you sound doubtful! Obviously, this is the property of the Orcs! Only we are qualified to possess it! Tell this to whoever is competing with you for it! Once its ownership is decided, come back and talk to me.
[30505-06a.htm] High Prefect Drikus: Determine the owner. He must come to me alone.
[30827-00.htm] Pet Manager Lundy: This stuff drives me crazy! What was he thinking? Hey, buddy, can I talk to you for a minute? "Sure."
[30827-00a.htm] Pet Manager Lundy: Hmm, well, never mind. I was going to ask you for a favor, but on second thought, you're too young. Come back when you're older. (This quest may only be undertaken by a character of level 24 and above.)
[30827-01.htm] Pet Manager Lundy: Great! Will you do me a favor? I need a work hammer immediately! I could buy one in any store around here, but I don't have the money!
[30827-01a.htm] Pet Manager Lundy: Please bring me a work hammer. I really need one.
[30827-02.htm] Pet Manager Lundy: Is this work hammer for me? Thank you! You will be blessed! What? Money? I don't have any, silly! By the way, I need another favor! My son went to Talking Island seeking adventure! He'll be graduating soon, and I want to send him this work hammer as a graduation present. But there are fearsome bandits laying in wait around here. You must kill them! Of course, I'll still need the work hammer. "I'll do it."
[30827-03.htm] Pet Manager Lundy: Thank you! You are so generous! There are Maille Lizardmen around here. They always try to steal the things going out from this town. Wouldn't you be upset if your generosity, the Work Hammer, could not reach Talking Island because it was stolen by thieves? So, please take the Maille Lizardmen down. I would be grateful if you could take out the Maille Lizardman Guards, Maille Lizardman Scouts, and Maille Lizardmen. Defeat 30 of them.
[30827-03a.htm] Pet Manager Lundy: You haven't destroyed 30 Maille Lizardmen yet, have you?
[30827-04.htm] Pet Manager Lundy: You defeated them! Good job! By the way, what are those shiny things? Wow, can I see one? Hmm... It looks like a head. What if we put it together? Like so... "Hm..."
[30827-05.htm] Pet Manager Lundy: Hmm... What misterious beads! I heard that Drikus is collecting things like this. I shined them up a bit. Would you take them and investigate?
[30827-05a.htm] Pet Manager Lundy: What did High Prefect Drikus say? Why haven't you seen him yet! Go!
[30827-06.htm] Pet Manager Lundy: Oh really? The owner? Honestly, you can take the credit! Why are you so interested in that bead? I think you should choose something else! Drikus may not get around to fixing it for a long time... "Whatever."
[30827-07.htm] Pet Manager Lundy: Excellent! I'll give you one of my most valuable possessions. There are very few of these, even among the very rich, and today you become one of the chosen few owners! Please accept this pet exchange ticket. Your new pet is a very popular breed from the north. Raise it carefully! It is very, very rare!
Исходник условий и наград (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.Q00044_HelpTheSon;
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 Q00044_HelpTheSon extends Quest
{
// NPCs
private static final int LUNDY = 30827;
private static final int DRIKUS = 30505;
// Monsters
private static final int MAILLE = 20919;
private static final int MAILLE_SCOUT = 20920;
private static final int MAILLE_GUARD = 20921;
// Items
private static final int WORK_HAMMER = 168;
private static final int GEMSTONE_FRAGMENT = 7552;
private static final int GEMSTONE = 7553;
private static final int PET_TICKET = 7585;
public Q00044_HelpTheSon()
{
super(44, "Help the Son!");
registerQuestItems(GEMSTONE_FRAGMENT, GEMSTONE);
addStartNpc(LUNDY);
addTalkId(LUNDY, DRIKUS);
addKillId(MAILLE, MAILLE_SCOUT, MAILLE_GUARD);
}
@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 "30827-01.htm":
{
st.startQuest();
break;
}
case "30827-03.htm":
{
if (hasQuestItems(player, WORK_HAMMER))
{
st.setCond(2, true);
takeItems(player, WORK_HAMMER, 1);
}
break;
}
case "30827-05.htm":
{
st.setCond(4, true);
takeItems(player, GEMSTONE_FRAGMENT, 30);
giveItems(player, GEMSTONE, 1);
break;
}
case "30505-06.htm":
{
st.setCond(5, true);
takeItems(player, GEMSTONE, 1);
break;
}
case "30827-07.htm":
{
giveItems(player, PET_TICKET, 1);
st.exitQuest(false, 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() < 24) ? "30827-00a.htm" : "30827-00.htm";
break;
}
case State.STARTED:
{
final int cond = st.getCond();
switch (npc.getId())
{
case LUNDY:
{
if (cond == 1)
{
htmltext = (!hasQuestItems(player, WORK_HAMMER)) ? "30827-01a.htm" : "30827-02.htm";
}
else if (cond == 2)
{
htmltext = "30827-03a.htm";
}
else if (cond == 3)
{
htmltext = "30827-04.htm";
}
else if (cond == 4)
{
htmltext = "30827-05a.htm";
}
else if (cond == 5)
{
htmltext = "30827-06.htm";
}
break;
}
case DRIKUS:
{
if (cond == 4)
{
htmltext = "30505-05.htm";
}
else if (cond == 5)
{
htmltext = "30505-06a.htm";
}
break;
}
}
break;
}
case State.COMPLETED:
{
htmltext = getAlreadyCompletedMsg(player);
break;
}
}
return htmltext;
}
@Override
public void onKill(Npc npc, Player player, boolean isSummon)
{
final QuestState qs = getQuestState(player, false);
if ((qs != null) && qs.isCond(2))
{
giveItems(player, GEMSTONE_FRAGMENT, 1);
if (getQuestItemsCount(player, GEMSTONE_FRAGMENT) == 30)
{
qs.setCond(3, true);
}
else
{
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
}
}