Family Honor
- ID
- 355
- Название
- Family Honor
- start_npcs_json
- [30181]
- npc_ids_json
- [20767,20768,20769,20770,30181,30929]
- constants_json
- {"GALIBREDO":30181,"PATRIN":30929,"TIMAK_ORC_TROOP_LEADER":20767,"TIMAK_ORC_TROOP_SHAMAN":20768,"TIMAK_ORC_TROOP_WARRIOR":20769,"TIMAK_ORC_TROOP_ARCHER":20770,"GALIBREDO_BUST":4252,"WORK_OF_BERONA":4350,"STATUE_PROTOTYPE":4351,"STATUE_ORIGINAL":4352,"STATUE_REPLICA":4353,"STATUE_FORGERY":4354}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00355_FamilyHonor/Q00355_FamilyHonor.java
NPC квеста
| ID | Название | Старт квеста | Уровень |
|---|---|---|---|
| 20767 | Timak Orc Troop Leader | Нет | 45 |
| 20768 | Timak Orc Troop Shaman | Нет | 44 |
| 20769 | Timak Orc Troop Warrior | Нет | 43 |
| 20770 | Timak Orc Troop Archer | Нет | 41 |
| 30181 | Galibredo | Да | 70 |
| 30929 | Patrin | Нет | 70 |
Условия уровней: выражения из Java
htmltext = (player.getLevel() < 36) ? "30181-0a.htm" : "30181-0.htm";
Выдача предметов, адены и опыта: выражения из Java
giveAdena(player, reward, true); giveItems(player, STATUE_REPLICA, 1); giveItems(player, STATUE_ORIGINAL, 1); giveItems(player, STATUE_FORGERY, 1); giveItems(player, STATUE_PROTOTYPE, 1);
Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.
Тексты квеста
[30181-0.htm] Trader Galibredo: Although now I'm merely a merchant, at one time my family was prominent! Although I may not look it, the blood of kings courses through my veins! Whenever I say this, people laugh at me and think I'm lying. It's so very frustrating! But at last, now I have a chance to prove my noble heritage! All I need is a bit of help from an adventurer like yourself! I will pay you generously for your work! No cost is too great when the honor of my family is at stake! Will you help this old man? "How can I help you?"
[30181-0a.htm] Trader Galibredo: Although now I'm merely a merchant, at one time my family was prominent! Although I may not look it, the blood of kings courses through my veins! What's with the expression? Does it mean you don't believe me? You must think I'm just a crazy old man! Get away from me! (This quest may only be undertaken by a character of level 36 and above.)
[30181-1.htm] Trader Galibredo: Have you ever heard of Berona, a sculptor from the Elmoreden Empire? She is well-known among antique lovers... A few months ago, hundreds of her works were excavated in Innadril. "Galfredo Romer's Bust" was one of them. He was one of my ancestors who was as an aid to the Emperor! It is recorded in my family's genealogy! If you don't believe me, I'll show it to you! Anyway, I sent my nephew to Innadril to buy all the sculptures for me. But, while they were being delivered to me, they were stolen by orc bandits. I'm very upset with my nephew! I told him repeatedly to hire guards! Ahem! So, here's the deal. Will you recover the sculptures for me? "Yes I will!"
[30181-2.htm] Trader Galibredo: The thieves who stole my precious sculptures are the Timak orc troop. According to my nephew, the troop consists of Timak orc troop archers, timak orc troop warriors, timak orc troop leaders and the Timak orc troop shaman. I doubt that those brutes even know the value of what they have! If you bring me "Galfredo Romer's Busts", I will pay you handsomely. If you bring me 100 or more of them at one time, you will receive a bonus. Please try your best! You can keep any other sculptures you recover. You can sell them to a store or give them to someone as a gift. They move around in a group, so it is not a bad idea to go with a couple of friends, if they wish to. Good luck! I'm counting on you.
[30181-3.htm] Trader Galibredo: Come on in! I've been waiting for you. How did you do? Let me say this to you again. The thieves who stole my precious antiques are the Timak orc troop archers, timak orc troop warriors, timak orc troop leaders and the Timak orc troop shaman. I trust that you destroyed them and recovered my goods? Settle the account now. Settle the account later. Quit.
[30181-3a.htm] Trader Galibredo: Welcome back! I've been waiting for you. Were you successful? I trust that you destroyed the Timak orc troop and brought back my goods? As I told you, all I want is "Galfredo Romer's Busts". You can keep the other works of sculptor Berona for yourself. You should be able to sell them for a fairly good price. Or... if you would like, you can also take them to the antique dealer Patrin over there and get them appraised. Since we are close friends, I'll put in a good word for you. If the statues are prototypes or originals they are more valuable. If they are imitations or fakes, then they are worthless. It's a gamble. Settle the account. Settle the account later. Quit
[30181-4.htm] Trader Galibredo: Oh, at last! The proof of the prestigious heritage of my family! The dignity of my great ancestors is restored! Thank you very much young man! Let me see... how may busts did you bring me? Oh yes! Here is your reward! Continue working for him. Quit working for him.
[30181-4a.htm] Trader Galibredo: Oh, at last! The proof of the prestigious heritage of my family! The dignity of my great ancestors is restored! Let me see... how may busts did you bring me? 70... 80... 90... Oh, wonderful! It's more than 100! Then, in addition to your regular pay, I'll add a bonus... Here you go! Thank you for your hard work! Continue working for him. Quit working for him.
[30181-4b.htm] Trader Galibredo: What the...? Where are the statues of my ancestor...? Don't you know?! I mean, where are Galfredo Romer's Busts? Do you expect me to pay you for nothing?
[30181-5.htm] Trader Galibredo: I'm counting on you! Go punish those dastardly thieves and recover my precious antiques.
[30181-6.htm] Trader Galibredo: You want to quit? Sigh...! That's the problem with today's young people... always hopping from job to job, they never stay in one place very long! Don't you know that once you accept a job, you should finish it? Dear me... Oh, well, if that is really what you want, I won't stop you. Thank you for your hard work.
[30929-0.htm] Antique Dealer Patrin: Yes, Trader Galibredo told me about you. He said that you would be stopping by with some antique statues to be appraised... Oh my! That statue... is that the "Lady of the Court" by Berona? Where did you find such a precious item...? Let me have a look! "What happens after the appraisal?" "Please appraise this statue!"
[30929-1.htm] Antique Dealer Patrin: Why, you find the true value of the item! To the untrained eye, an antique like this may seem rather ordinary. But to an expert like myself, each subtle mark and worn surface tells a story. The materials and techniques used in its manufacture are revealed to me. The different aspects will determine the true value of the statue. Statues that are appraised to be prototypes or genuine are the most valuable. If the appraisal shows that the statue is an imitation or a forgery, its value will be minimal. Sometimes it is better to skip the appraisal altogether. Back
[30929-2.htm] Antique Dealer Patrin: Just a moment... Let me get my reading glasses... Now, what have we here? Hmm... Huh...?!! I barely touched it! How could I have made such a mistake! May I offer my abject apologies! Ancient articles such as this are so very fragile!
[30929-3.htm] Antique Dealer Patrin: Just a moment... Let me get my reading glasses... Now, what have we here? Hmm...?! Oh... Heh heh...! This is no work of Berona. It is a very cleverly made imitation! An apprentice sculptor must have copied the work of Berona. It is not worth much.
[30929-4.htm] Antique Dealer Patrin: Just a moment... Let me get my reading glasses... Now, what have we here? Hmm... Oh Oh...! Hmm...?! In... indeed...! This is indeed a genuine statue. It was made from the prototype. Although not as valuable as its prototype, it is highly regarded among antique dealers. It will fetch a pretty good price at any store.
[30929-5.htm] Antique Dealer Patrin: Just a moment... Let me get my reading glasses... Now, shall I take a look at it? Hmm... Oh Oh...! Hmm...?! Heh Heh...! This is not Berona's work! It's a forgery! It must have been made by a skillful counterfeiter! I am sorry. It is virtually worthless.
[30929-6.htm] Antique Dealer Patrin: Just a moment... Let me get my reading glasses... Now, what have we here? Hmm... Oh Oh...! Hmm...?! In... indeed...! This is a prototype made by the very hands of Berona! This was used to make molds from which many other statues were produced. You must understand that this is one of the most valuable antiques you will ever find. It will fetch a handsome price at any store.
[30929-7.htm] Antique Dealer Patrin: Why would you come to me empty-handed and ask for an appraisal? Are you kidding? What insolence!
Исходник условий и наград (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.Q00355_FamilyHonor;
import java.util.HashMap;
import java.util.Map;
import org.l2jmobius.gameserver.config.PlayerConfig;
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;
import org.l2jmobius.gameserver.util.LocationUtil;
public class Q00355_FamilyHonor extends Quest
{
private static class DropInfo
{
public int _firstChance;
public int _secondChance;
public DropInfo(int firstChance, int secondChance)
{
_firstChance = firstChance;
_secondChance = secondChance;
}
public int getFirstChance()
{
return _firstChance;
}
public int getSecondChance()
{
return _secondChance;
}
}
// NPCs
private static final int GALIBREDO = 30181;
private static final int PATRIN = 30929;
// Monsters
private static final int TIMAK_ORC_TROOP_LEADER = 20767;
private static final int TIMAK_ORC_TROOP_SHAMAN = 20768;
private static final int TIMAK_ORC_TROOP_WARRIOR = 20769;
private static final int TIMAK_ORC_TROOP_ARCHER = 20770;
// Items
private static final int GALIBREDO_BUST = 4252;
private static final int WORK_OF_BERONA = 4350;
private static final int STATUE_PROTOTYPE = 4351;
private static final int STATUE_ORIGINAL = 4352;
private static final int STATUE_REPLICA = 4353;
private static final int STATUE_FORGERY = 4354;
// Drop chances
private static final Map<Integer, DropInfo> MOBS = new HashMap<>();
static
{
MOBS.put(TIMAK_ORC_TROOP_LEADER, new DropInfo(560, 684)); // timak_orc_troop_leader
MOBS.put(TIMAK_ORC_TROOP_SHAMAN, new DropInfo(530, 650)); // timak_orc_troop_shaman
MOBS.put(TIMAK_ORC_TROOP_WARRIOR, new DropInfo(420, 516)); // timak_orc_troop_warrior
MOBS.put(TIMAK_ORC_TROOP_ARCHER, new DropInfo(440, 560)); // timak_orc_troop_archer
}
public Q00355_FamilyHonor()
{
super(355, "Family Honor");
registerQuestItems(GALIBREDO_BUST);
addStartNpc(GALIBREDO);
addTalkId(GALIBREDO, PATRIN);
addKillId(TIMAK_ORC_TROOP_LEADER, TIMAK_ORC_TROOP_SHAMAN, TIMAK_ORC_TROOP_WARRIOR, TIMAK_ORC_TROOP_ARCHER);
}
@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 "30181-2.htm":
{
st.startQuest();
break;
}
case "30181-4b.htm":
{
final int count = getQuestItemsCount(player, GALIBREDO_BUST);
if (count > 0)
{
htmltext = "30181-4.htm";
int reward = count * 232;
if (count >= 100)
{
htmltext = "30181-4a.htm";
reward += 5000;
}
takeItems(player, GALIBREDO_BUST, count);
giveAdena(player, reward, true);
}
break;
}
case "30929-7.htm":
{
if (hasQuestItems(player, WORK_OF_BERONA))
{
takeItems(player, WORK_OF_BERONA, 1);
final int appraising = getRandom(100);
if (appraising < 20)
{
htmltext = "30929-2.htm";
}
else if (appraising < 40)
{
htmltext = "30929-3.htm";
giveItems(player, STATUE_REPLICA, 1);
}
else if (appraising < 60)
{
htmltext = "30929-4.htm";
giveItems(player, STATUE_ORIGINAL, 1);
}
else if (appraising < 80)
{
htmltext = "30929-5.htm";
giveItems(player, STATUE_FORGERY, 1);
}
else
{
htmltext = "30929-6.htm";
giveItems(player, STATUE_PROTOTYPE, 1);
}
}
break;
}
case "30181-6.htm":
{
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() < 36) ? "30181-0a.htm" : "30181-0.htm";
break;
}
case State.STARTED:
{
switch (npc.getId())
{
case GALIBREDO:
{
htmltext = (hasQuestItems(player, GALIBREDO_BUST)) ? "30181-3a.htm" : "30181-3.htm";
break;
}
case PATRIN:
{
htmltext = "30929-0.htm";
break;
}
}
break;
}
}
return htmltext;
}
@Override
public void onKill(Npc npc, Player killer, boolean isSummon)
{
final QuestState qs = getQuestState(killer, false);
if ((qs == null) || !LocationUtil.checkIfInRange(PlayerConfig.ALT_PARTY_RANGE, npc, killer, true))
{
return;
}
final DropInfo info = MOBS.get(npc.getId());
final int random = getRandom(1000);
if (random < info.getFirstChance())
{
giveItemRandomly(killer, npc, GALIBREDO_BUST, 1, 0, 1, true);
}
else if (random < info.getSecondChance())
{
giveItemRandomly(killer, npc, WORK_OF_BERONA, 1, 0, 1, true);
}
}
}