Dwarven Kinship
- ID
- 167
- Название
- Dwarven Kinship
- start_npcs_json
- [30350]
- npc_ids_json
- [30210,30255,30350]
- constants_json
- {"CARLON":30350,"NORMAN":30210,"HAPROCK":30255,"CARLON_LETTER":1076,"NORMAN_LETTER":1106}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00167_DwarvenKinship/Q00167_DwarvenKinship.java
NPC квеста
Условия уровней: выражения из Java
htmltext = (player.getLevel() < 15) ? "30350-02.htm" : "30350-03.htm";
Выдача предметов, адены и опыта: выражения из Java
giveItems(player, CARLON_LETTER, 1); giveItems(player, NORMAN_LETTER, 1); giveAdena(player, 2000, true); giveAdena(player, 3000, true); giveAdena(player, 20000, true);
Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.
Тексты квеста
[30210-01.htm] Warehouse Keeper Norman: Hmm, a letter from my wife? What? But I'm not married ... Ah! Yes! A letter from my dear wife ...! Oh, how I've waited for this ...! Thank you! Is it something like a guild financial statement now?
[30210-02.htm] Warehouse Keeper Norman: Tsk tsk. Did you know already ...? My, how embarrassing ... We did not mean any harm, so please don't be offended. Actually, it's such an urgent letter ... I'm sure Haprock had no choice but to ask you. Usually, he would have delivered it through the guild carriage that travels regularly between the villages ... Please forgive us. Now! Please take this. It is a long standing tradition for us Dwarves to always pay when receiving aid from others. So don't refuse, just accept it! May the grace of Maphr be with you!
[30255-01.htm] Warehouse Keeper Haprock: Ah, a letter from Carlon. Let me see ... Oh ... Hmm ... The operations profit of the warehouse increased twofold in the first half of the year ... Good ... Very good ... The guild leader will be satisfied ... Carlon is more competent than I expected ... Ask him why he is reading other people's letters
[30255-02.htm] Warehouse Keeper Haprock: ... What the! Are you still here? Dear, dear ...! Thank you for bringing Carlon's Letter. By the way, if you plan to travel along the western shores, can I ask you a favor? It is not a difficult task; just delivering a letter to my kinsman in the village of Gludin ... Say you will do the favor Decline request
[30255-03.htm] Warehouse Keeper Haprock: First, take this! It may not be much, but please accept it as a token of thanks for your work. It is more than enough money to cover your travel expenses from the Dark Elf Village to here. And what I want you to do is ... deliver a letter to Warehouse Keeper Norman of the village of Gludin. The letter came in a bundle of mail delivered from the Dwarven Kingdom a few days ago, and normally it would be sent on to Gludin on one of the carriages that will leave for Gludin in a few weeks. But I know how Norman is hungry for news from home, so I am asking you to deliver it now. Actually, Warehouse Keeper Norman has a wife at home who waits for her husband's return ... But Norman cannot return, as he has obligations to the guild ... They express their longing for each other by sending the occasional letter. A lonely man who longs for his wife in a faraway land ... doesn't that make your heart ache? So please, make sure to deliver this letter to Norman. He will be very thankful. Of course, he will compensate you for your efforts.
[30255-04.htm] Warehouse Keeper Haprock: I guess it can't be helped. I must ask someone else, I suppose ... Oh, please take this before you go! It's not much, but think of it as a token of thanks for delivering Carlon's Letter. It is more than enough money to cover your travel expenses from the Dark Elven village to here. Goodbye, then. May the protection of the Earth be with you!
[30255-05.htm] Warehouse Keeper Haprock: Hey! You haven't left yet? Hurry to the village of Gludin, for the sake of my friend Norman, who is anxiously awaiting his wife's letter. Go to the warehouse in the village of Gludin and ask for Norman.
[30350-02.htm] Warehouse Freightman Carlon: ... It's been almost ten years since I was kidnapped and brought to this village ... Long ago, my entire family was nearly trapped by slave hunters, but they were able to escape when I allowed myself to be caught to buy them time. And so I was brought here. Fortunately, I am good at calculations, so the elders have entrusted me with the management of the warehouse. I have gotten rather used to this situation, I think ... But I miss my family, from time to time. However, I can't even dream of running away, because the sentry guards always keep a close watch over me. I write to my family whenever I think of them and ask kind guests to deliver the letters for me. And you ... you seem to be a kind and trustworthy type of person. Do you think I could ask you ... to deliver this letter to my family in my home far to the north ...? (This quest may only be undertaken by a character of level 15 and above.)
[30350-03.htm] Warehouse Freightman Carlon: ... It's been almost ten years since I was kidnapped and brought to this village ... Long ago, my entire family was chased by slave hunters. I bought some time for my family to escape but was caught, and brought to this place. Fortunately, I am good at calculations, so the elders have entrusted me with the management of the warehouse. I have gotten used to this situation, I think ... But I miss my family from time to time. However, I can't even dream of running away, because the sentry guards always keep a close watch over me. I write to my family whenever I think of them and ask kind guests to deliver the letters for me. And you ... you seem to be very kind and trustworthy. Maybe you could do me a favor. This letter that I wrote to my family in my homeland far to the north ... could I ask you to deliver it? Say you will do the favor
[30350-04.htm] Warehouse Freightman Carlon: Ahh ... As I thought. You are a kindhearted person. This is a letter I wrote to my family. Take it. There is no need for you to travel all the way to the northern lands of the Dwarven Kingdom. Just deliver this to Haprock, a Dwarf in the town of Gludio. He will send my letter along on the coach that goes to my hometown. He will pay you as well. He is a generous person, and will reward you handsomely.
[30350-05.htm] Warehouse Freightman Carlon: ... Ah, Hello! You haven't left for Gludio yet I see ... Ah! I didn't mean to rush you ... I'm sorry! When you have a chance to travel to the town of Gludio, be sure to stop by the warehouse and give Haprock my letter.
Исходник условий и наград (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.Q00167_DwarvenKinship;
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.QuestState;
import org.l2jmobius.gameserver.mechanics.script.State;
public class Q00167_DwarvenKinship extends Quest
{
// NPCs
private static final int CARLON = 30350;
private static final int NORMAN = 30210;
private static final int HAPROCK = 30255;
// Items
private static final int CARLON_LETTER = 1076;
private static final int NORMAN_LETTER = 1106;
public Q00167_DwarvenKinship()
{
super(167, "Dwarven Kinship");
registerQuestItems(CARLON_LETTER, NORMAN_LETTER);
addStartNpc(CARLON);
addTalkId(CARLON, HAPROCK, NORMAN);
}
@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 "30350-04.htm":
{
st.startQuest();
giveItems(player, CARLON_LETTER, 1);
break;
}
case "30255-03.htm":
{
st.setCond(2);
takeItems(player, CARLON_LETTER, 1);
giveItems(player, NORMAN_LETTER, 1);
giveAdena(player, 2000, true);
break;
}
case "30255-04.htm":
{
takeItems(player, CARLON_LETTER, 1);
giveAdena(player, 3000, true);
st.exitQuest(false, true);
break;
}
case "30210-02.htm":
{
takeItems(player, NORMAN_LETTER, 1);
giveAdena(player, 20000, true);
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() < 15) ? "30350-02.htm" : "30350-03.htm";
break;
}
case State.STARTED:
{
final int cond = st.getCond();
switch (npc.getId())
{
case CARLON:
{
if (cond == 1)
{
htmltext = "30350-05.htm";
}
break;
}
case HAPROCK:
{
if (cond == 1)
{
htmltext = "30255-01.htm";
}
else if (cond == 2)
{
htmltext = "30255-05.htm";
}
break;
}
case NORMAN:
{
if (cond == 2)
{
htmltext = "30210-01.htm";
}
break;
}
}
break;
}
case State.COMPLETED:
{
htmltext = getAlreadyCompletedMsg(player);
break;
}
}
return htmltext;
}
}