Help the Uncle!
- ID
- 42
- Название
- Help the Uncle!
- start_npcs_json
- [30828]
- npc_ids_json
- [20068,20266,30735,30828]
- constants_json
- {"WATERS":30828,"SOPHYA":30735,"MONSTER_EYE_DESTROYER":20068,"MONSTER_EYE_GAZER":20266,"TRIDENT":291,"MAP_PIECE":7548,"MAP":7549,"PET_TICKET":7583}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00042_HelpTheUncle/Q00042_HelpTheUncle.java
NPC квеста
| ID | Название | Старт квеста | Уровень |
|---|---|---|---|
| 20068 | Monster Eye Destroyer | Нет | 26 |
| 20266 | Monster Eye Gazer | Нет | 25 |
| 30735 | Sophya | Нет | 70 |
| 30828 | Waters | Да | 70 |
Условия уровней: выражения из Java
htmltext = (player.getLevel() < 25) ? "30828-00a.htm" : "30828-00.htm";
Выдача предметов, адены и опыта: выражения из Java
giveItems(player, MAP, 1); giveItems(player, PET_TICKET, 1); giveItems(player, MAP_PIECE, 1);
Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.
Тексты квеста
[30735-05.htm] Chief Mercenary Sophya: The map! This is good information. Where did you get it? "From Pet Manager Waters."
[30735-06.htm] Chief Mercenary Sophya: Give him my thanks and tell him I'll look after this well!
[30735-06a.htm] Chief Mercenary Sophya: Did you give my thanks to Waters?
[30828-00.htm] Pet Manager Waters: Hey, could you do me a favor? "What do you need?"
[30828-00a.htm] Pet Manager Waters: Hmm... Now that I see you in the light... You're not what I'm looking for at all! You look too scruffy and poor! (This quest may only be undertaken by a character of level 25 and above.)
[30828-01.htm] Pet Manager Waters: Awesome! Please, bring me a trident! I simply must have one! They probably sell them in the stores around here, but I don't have enough adena...
[30828-01a.htm] Pet Manager Waters: Please bring me a trident. I really need one.
[30828-02.htm] Pet Manager Waters: Oh, you got it. Thank you. My uncle suddenly is saying he wants to build a pastureland in the north. He wishes to become an adventurer to make money for the pastureland. He says he is not a beginner anymore. But he still worries me... so I hope this might help him a little bit. And.. It is really hard to ask since you gave me a Trident, but I have one request. Ask what it is
[30828-03.htm] Pet Manager Waters: I need to send the trident, but outlaws have been rampant in this area lately! Please kill at least 30 monster eye gazers and destroyers! Destroy them so I can send the Trident safely. Please, you must help me!
[30828-03a.htm] Pet Manager Waters: Please destroy the monsterous eye so I can ship the trident safely.
[30828-04.htm] Pet Manager Waters: Thank you! I've heard marvelous stories about a great adventurer who defeated the monsters in this area. Well, where is the map piece? "Here it is."
[30828-05.htm] Pet Manager Waters: Hmm... Let's see... I think I can put them together... Voila! Isn't it beautiful? Look! The attack plan is written on it! This is great! Send it to Sophya of the Black Lions.
[30828-05a.htm] Pet Manager Waters: Please take the map to Sophya of the Black Lions.
[30828-06.htm] Pet Manager Waters: The Black Lion Mercenaries have always been trustworthy, but this time you've outdone yourselves! Thank you so much! I should really do something for you... "It was nothing!"
[30828-07.htm] Pet Manager Waters: Don't be modest, my friend! Please accept this as a token of my esteem! It's quite rare, even among very wealthy! It's a pet exchange ticket. Enjoy your new pet, and raise it well!
Исходник условий и наград (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.Q00042_HelpTheUncle;
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 Q00042_HelpTheUncle extends Quest
{
// NPCs
private static final int WATERS = 30828;
private static final int SOPHYA = 30735;
// Monsters
private static final int MONSTER_EYE_DESTROYER = 20068;
private static final int MONSTER_EYE_GAZER = 20266;
// Items
private static final int TRIDENT = 291;
private static final int MAP_PIECE = 7548;
private static final int MAP = 7549;
private static final int PET_TICKET = 7583;
public Q00042_HelpTheUncle()
{
super(42, "Help the Uncle!");
registerQuestItems(MAP_PIECE, MAP);
addStartNpc(WATERS);
addTalkId(WATERS, SOPHYA);
addKillId(MONSTER_EYE_DESTROYER, MONSTER_EYE_GAZER);
}
@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 "30828-01.htm":
{
st.startQuest();
break;
}
case "30828-03.htm":
{
if (hasQuestItems(player, TRIDENT))
{
st.setCond(2, true);
takeItems(player, TRIDENT, 1);
}
break;
}
case "30828-05.htm":
{
st.setCond(4, true);
takeItems(player, MAP_PIECE, 30);
giveItems(player, MAP, 1);
break;
}
case "30735-06.htm":
{
st.setCond(5, true);
takeItems(player, MAP, 1);
break;
}
case "30828-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() < 25) ? "30828-00a.htm" : "30828-00.htm";
break;
}
case State.STARTED:
{
final int cond = st.getCond();
switch (npc.getId())
{
case WATERS:
{
if (cond == 1)
{
htmltext = (!hasQuestItems(player, TRIDENT)) ? "30828-01a.htm" : "30828-02.htm";
}
else if (cond == 2)
{
htmltext = "30828-03a.htm";
}
else if (cond == 3)
{
htmltext = "30828-04.htm";
}
else if (cond == 4)
{
htmltext = "30828-05a.htm";
}
else if (cond == 5)
{
htmltext = "30828-06.htm";
}
break;
}
case SOPHYA:
{
if (cond == 4)
{
htmltext = "30735-05.htm";
}
else if (cond == 5)
{
htmltext = "30735-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, MAP_PIECE, 1);
if (getQuestItemsCount(player, MAP_PIECE) == 30)
{
qs.setCond(3, true);
}
else
{
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
}
}