Legacy of Insolence
- ID
- 372
- Название
- Legacy of Insolence
- start_npcs_json
- [30844]
- npc_ids_json
- [30839,30844,30855,30929,31001]
- constants_json
- {"WALDERAL":30844,"PATRIN":30929,"HOLLY":30839,"CLAUDIA":31001,"DESMOND":30855}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00372_LegacyOfInsolence/Q00372_LegacyOfInsolence.java
NPC квеста
| ID | Название | Старт квеста | Уровень |
|---|---|---|---|
| 30839 | Holly | Нет | 70 |
| 30844 | Walderal | Да | 70 |
| 30855 | Desmond | Нет | 70 |
| 30929 | Patrin | Нет | 70 |
| 31001 | Claudia Athebaldt | Нет | 70 |
Условия уровней: выражения из Java
htmltext = (player.getLevel() < 59) ? "30844-01.htm" : "30844-02.htm";
Выдача предметов, адены и опыта: выражения из Java
giveItems(partyMember, MONSTERS_DROPS[1][i], 1); rewardItems(player, reward[1], 1);
Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.
Тексты квеста
[30839-01.htm] Trader Holly: How did you know that I'm researching the history of the empire? I'm trying to convince everyone I'm just a pure and naive girl... History is my passion! My grandfather was also a researcher studying the history of the Elmoreden empire. I'm currently researching the genealogy of the royal family. If you come across any books dealing with that subject, please bring them to me. You wouldn't refuse an innocent and naive girl's request, would you? Well... I wouldn't ask you to do it for free... If bring me all the records of genealogy of the empire, I'll give you a few valuable relics my grandfather left me.
[30839-02.htm] Trader Holly: Amazing! Please give it to me. Hmm... I knew it! Baium wasn't the last emperor of the Elmoreden empire! Although his reign was brief, Printes, Baium's son, ruled the empire. He eventually went missing somewhere in the Goddard region... Thank you for bringing me the book! I find it so fascinating! Here is your reward. If you find any other books like this, please bring them to me!
[30844-01.htm] Warehouse Keeper Walderal: Recently, some fearless people have gone into the Tower of Insolence. They are frantically searching for ancient, secret treasure. We of the Gray Pillar Guild cannot be left out of what's going on in there. That tower was built by dwarves! We can't allow outsiders to plunder it! We already have a team in there, are you interested? Well, come to think of it, you don't look very experienced... I wouldn't want to have to haul your cold corpse out of there... (This quest may only be undertaken by a character of level 59 and above.)
[30844-02.htm] Warehouse Keeper Walderal: Recently, some fearless people have gone into the Tower of Insolence. They are frantically searching for ancient, secret treasure. We of the Gray Pillar Guild cannot be left out of what's going on in there. That tower was built by dwarves! We can't allow outsiders to plunder it! We already have a team in there. Ah, the mysteries of the Tower... How did our noble ancestors do it? It is said that the original blueprints are located somewhere in the tower. Would you be interested in recovering them for us? "I'll do it."
[30844-03.htm] Warehouse Keeper Walderal: Marvelous! In the middle section of the Tower of Insolence you will find monsters such as corrupt sages, erin ediunces, Hallate's inspectors, Platinum tribe overlords, Platinum guardian prefects, and messenger angels. It is they who are in possession of the blueprints of the tower. Please recover the blueprints and bring them to me. In return, I will give you a very rare and precious recipe or ingredient. What do you say? Interested? "I'll do it."
[30844-04.htm] Warehouse Keeper Walderal: All right! Then, off you go! Make sure to bring me back the blueprints. All I need to do is to complete the blueprint for the entire tower... Although you may find some other stuff, I promise I won't touch it. The objective of our guild is to obtain the technical knowledge that was used to build the Tower of Insolence!
[30844-05.htm] Warehouse Keeper Walderal: Did you find anything? Or perhaps you have a question? "Tell me more about the Contract I signed." "I have found many other things besides blueprints..." "I've brought you all the blueprints for 13 floors of the Tower of Insolence." "I'll continue to look for more blueprints." "I want out of the Contract."
[30844-05a.htm] Warehouse Keeper Walderal: Are you OK? How did you forget so quickly? OK, once more. Listen carefully. Bring to me the blueprints of the Tower of Insolence. There are 13 of them. Take them from corrupt sages, erin ediunces, Hallate's inspectors, Platinum tribe overlords, Platinum guardian prefects and messenger angels. You can keep anything else you find on them. All I want are the blueprints... If you're able to get and bring back the blueprints for all 13 floors, then, I will give you a very rare and precious recipe or ingredient. Is that clear? Now, please, get going. Back
[30844-05b.htm] Warehouse Keeper Walderal: Hmm, a book, eh? Well, we're only interested in blueprints... Wait a minute..., come to think of it, I heard that Madam Claudia Athebaldt is looking for a book titled "Revelation of the Seals". It seems that Magister Desmond is searching for the same book. It must be important... Trader Holly in Aden Castle Town also collects history books. She is especially interested in any documents related to imperial genealogy. Patrin of Oren Castle Town, the antiques dealer, is wild about epics. Back
[30844-06.htm] Warehouse Keeper Walderal: Unfortunately, blueprints for just a couple of floors are of no use to us. We must have the design of the entire structure to truly understand its mysteries. Please bring them all to us.
[30844-07-0.htm] Warehouse Keeper Walderal: Here it is! This will be helpful if you're thinking of getting any A grade dark crystal equipment. By the way... I've heard that there are still copies of the blueprints for the Tower of Insolence available! Would you bring me some? "Here are some more blueprints." "I'll look for more blueprints." "I want to quit."
[30844-07-1.htm] Warehouse Keeper Walderal: Here it is! This will be helpful if you're thinking of getting any A grade tallum equipment. By the way... I've heard that there are still copies of the blueprints for the Tower of Insolence available! Would you bring me some? "Here are some more blueprints." "I'll look for more blueprints." "I want to quit."
[30844-07-2.htm] Warehouse Keeper Walderal: Here it is! This will be helpful if you're thinking of getting any A grade nightmare equipment. By the way... I've heard that there are still copies of the blueprints for the Tower of Insolence available! Would you bring me some? "Here are some more blueprints." "I'll look for more blueprints." "I want to quit."
[30844-07-3.htm] Warehouse Keeper Walderal: Here it is! This will be helpful if you're thinking of getting any A grade majestic equipment. By the way... I've heard that there are still copies of the blueprints for the Tower of Insolence available! Would you bring me some? "Here are some more blueprints." "I'll look for more blueprints." "I want to quit."
[30844-07.htm] Warehouse Keeper Walderal: Let me see... Ah, the blueprints for all 13 floors! Excellent! Now we shall learn the secrets of the tower! One day the mighty Gray Pillar Guild will construct an even grander building! Thank you for your hard work. You'll be well-rewarded... I just received several different recipes and ingredients from the famous workshop of Maestro Reorin! Which type would you like? Dark Crystal Tallum Nightmare Majestic
[30844-07a.htm] Warehouse Keeper Walderal: What...? I thought you said you had more blueprints...? No, no... Just one or two floors won't be helpful at all. We must understand the structure of each floor systematically, which means knowing the weight-bearing walls, types of pillars and things like that... I must have blueprints for all 13 floors! Please continue to look for them.
[30844-08.htm] Warehouse Keeper Walderal: Wonderful! These blueprints are actually in quite poor condition... I'd appreciate it very much if you could find some more and bring them to me! Get them from corrupt sages, erin ediunces, Hallate's inspectors, Platinum tribe overlords, Platinum guardian prefects and messenger angels. I'll wait here.
[30844-09.htm] Warehouse Keeper Walderal: Oh, really? Well, I can hardly blame you. Thank you for your help.
[30844-10.htm] Warehouse Keeper Walderal: Oh, really? Are you tired of fighting with them? Well, I don't blame you. I understand. If that is your wish I won't stop you. Thank you for your help. Well, I'll take the blueprints you've gathered so far. I'm sure they will be helpful to our research. Thank you. Here is your reward.
[30844-11.htm] Warehouse Keeper Walderal: Oh, really? Please show it to me! Show him the blueprint for the Tower of Insolence.
[30855-01.htm] Magister Desmond: You're bringing the "Revelation of the Seals", aren't you? Here, let me see. What's this? You didn't bring them all! Go get the rest! I'll hold onto these for now. When you bring more, I'll send them to my superior! Then you shall receive your reward.
[30855-02.htm] Magister Desmond: Is this the entire set of the "Revelation of the Seals"? Ah, yes! Give them here! Now I am so much closer to discovering the secret of the seven seals! Soon we, the Revolutionaries of Dusk, will rule the world! Here is your reward. If you find any more of these kind of books, bring them to me, do you understand?
[30929-01.htm] Antique Dealer Patrin: There's a rumor that you've been collecting old scrolls at the Tower of Insolence... Have you come across a scroll of ancient epic, written by a troubadour from the ancient era? If you have such an item, it could be of great value. Artistic value is quite subjective. It may look like someone's doodling to you, but to the trained eye, it could prove to be more valuable than precious stones. If you find such an epic, please bring it to me! I'll pay you very well for it.
[30929-02.htm] Antique Dealer Patrin: Wow! Is this an ancient epic? What a find! I'll take it! I can pay you this much. If you find any more ancient epics, please bring them all to me. I will appraise them and give you the best possible prices.
[31001-01.htm] Claudia Athebaldt: Have you brought "The Revelation of the Seals"? Once you collect all seven books, bring them to me. The Lords of Dawn have very high expectations of you...
[31001-02.htm] Claudia Athebaldt: This is "The Revelation of the Seals"... Many wish to possess this book, my husband foremost among them... I appreciate your hard work. Here is your reward.
Исходник условий и наград (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.Q00372_LegacyOfInsolence;
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 Q00372_LegacyOfInsolence extends Quest
{
// NPCs
private static final int WALDERAL = 30844;
private static final int PATRIN = 30929;
private static final int HOLLY = 30839;
private static final int CLAUDIA = 31001;
private static final int DESMOND = 30855;
// Monsters
private static final int[][] MONSTERS_DROPS =
{
// @formatter:off
{20817, 20821, 20825, 20829, 21069, 21063}, // npcId
{5966, 5966, 5966, 5967, 5968, 5969}, // parchment (red, blue, black, white)
{300000, 400000, 460000, 400000, 250000, 250000} // rate
};
// Items
private static final int[][] SCROLLS =
{
{5989, 6001}, // Walderal => 13 blueprints => parts, recipes.
{5984, 5988}, // Holly -> 5x Imperial Genealogy -> Dark Crystal parts/Adena
{5979, 5983}, // Patrin -> 5x Ancient Epic -> Tallum parts/Adena
{5972, 5978}, // Claudia -> 7x Revelation of the Seals -> Nightmare parts/Adena
{5972, 5978}, // Desmond -> 7x Revelation of the Seals -> Majestic parts/Adena
};
// Rewards matrice.
private static final int[][][] REWARDS_MATRICE =
{
// Walderal DC choice
{{13, 5496},{26, 5508},{40, 5525},{58, 5368},{76, 5392},{100, 5426}},
// Walderal Tallum choice
{{13, 5497},{26, 5509},{40, 5526},{58, 5370},{76, 5394},{100, 5428}},
// Walderal NM choice
{{20, 5502},{40, 5514},{58, 5527},{73, 5380},{87, 5404},{100, 5430}},
// Walderal Maja choice
{{20, 5503},{40, 5515},{58, 5528},{73, 5382},{87, 5406},{100, 5432}},
// Holly DC parts + adenas.
{{33, 5496},{66, 5508},{89, 5525},{100, 57}},
// Patrin Tallum parts + adenas.
{{33, 5497},{66, 5509},{89, 5526},{100, 57}},
// Claudia NM parts + adenas.
{{35, 5502},{70, 5514},{87, 5527},{100, 57}},
// Desmond Maja choice
{{35, 5503},{70, 5515},{87, 5528},{100, 57}}
// @formatter:on
};
public Q00372_LegacyOfInsolence()
{
super(372, "Legacy of Insolence");
addStartNpc(WALDERAL);
addTalkId(WALDERAL, PATRIN, HOLLY, CLAUDIA, DESMOND);
addKillId(MONSTERS_DROPS[0]);
}
@Override
public String onEvent(String event, Npc npc, Player player)
{
String htmltext = event;
final QuestState st = getQuestState(player, false);
if (st == null)
{
return htmltext;
}
if (event.equals("30844-04.htm"))
{
st.startQuest();
}
else if (event.equals("30844-05b.htm"))
{
if (st.isCond(1))
{
st.setCond(2, true);
}
}
else if (event.equals("30844-07.htm"))
{
for (int blueprint = 5989; blueprint <= 6001; blueprint++)
{
if (!hasQuestItems(player, blueprint))
{
htmltext = "30844-06.htm";
break;
}
}
}
else if (event.startsWith("30844-07-"))
{
checkAndRewardItems(player, 0, Integer.parseInt(event.substring(9, 10)), WALDERAL);
}
else if (event.equals("30844-09.htm"))
{
st.exitQuest(true, true);
}
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() < 59) ? "30844-01.htm" : "30844-02.htm";
break;
}
case State.STARTED:
{
switch (npc.getId())
{
case WALDERAL:
{
htmltext = "30844-05.htm";
break;
}
case HOLLY:
{
htmltext = checkAndRewardItems(player, 1, 4, HOLLY);
break;
}
case PATRIN:
{
htmltext = checkAndRewardItems(player, 2, 5, PATRIN);
break;
}
case CLAUDIA:
{
htmltext = checkAndRewardItems(player, 3, 6, CLAUDIA);
break;
}
case DESMOND:
{
htmltext = checkAndRewardItems(player, 4, 7, DESMOND);
break;
}
}
break;
}
}
return htmltext;
}
@Override
public void onKill(Npc npc, Player player, boolean isPet)
{
final QuestState st = getRandomPartyMemberState(player, -1, 3, npc);
if (st == null)
{
return;
}
final int npcId = npc.getId();
for (int i = 0; i < MONSTERS_DROPS[0].length; i++)
{
if ((MONSTERS_DROPS[0][i] == npcId) && (getRandom(1000000) < MONSTERS_DROPS[2][i]))
{
final Player partyMember = st.getPlayer();
giveItems(partyMember, MONSTERS_DROPS[1][i], 1);
playSound(partyMember, QuestSound.ITEMSOUND_QUEST_ITEMGET);
break;
}
}
}
private static String checkAndRewardItems(Player player, int itemType, int rewardType, int npcId)
{
// Retrieve array with items to check.
final int[] itemsToCheck = SCROLLS[itemType];
// Check set of items.
for (int item = itemsToCheck[0]; item <= itemsToCheck[1]; item++)
{
if (!hasQuestItems(player, item))
{
return npcId + ((npcId == WALDERAL) ? "-07a.htm" : "-01.htm");
}
}
// Remove set of items.
for (int item = itemsToCheck[0]; item <= itemsToCheck[1]; item++)
{
takeItems(player, item, 1);
}
// Retrieve array with rewards.
final int[][] rewards = REWARDS_MATRICE[rewardType];
final int chance = getRandom(100);
for (int[] reward : rewards)
{
if (chance < reward[0])
{
rewardItems(player, reward[1], 1);
return npcId + "-02.htm";
}
}
return npcId + ((npcId == WALDERAL) ? "-07a.htm" : "-01.htm");
}
}