Dragon Fangs
- ID
- 38
- Название
- Dragon Fangs
- start_npcs_json
- [30386]
- npc_ids_json
- [30034,30344,30386]
- constants_json
- {"LUIS":30386,"IRIS":30034,"ROHMER":30344,"FEATHER_ORNAMENT":7173,"TOOTH_OF_TOTEM":7174,"TOOTH_OF_DRAGON":7175,"LETTER_OF_IRIS":7176,"LETTER_OF_ROHMER":7177}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00038_DragonFangs/Q00038_DragonFangs.java
NPC квеста
Условия уровней: выражения из Java
htmltext = (player.getLevel() < 19) ? "30386-01a.htm" : "30386-01.htm";
Выдача предметов, адены и опыта: выражения из Java
giveItems(player, TOOTH_OF_TOTEM, 1); giveItems(player, LETTER_OF_IRIS, 1); giveItems(player, LETTER_OF_ROHMER, 1); giveItems(player, REWARD[position][0], 1); giveAdena(player, REWARD[position][1], true); giveItems(player, itemId, 1);
Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.
Тексты квеста
[30034-01.htm] Magister Iris: What can I do for you? Ah, Luis sent you! What's this about? Oh I see! Those vile Langk lizardmen are causing problems in the south. You've already dealt with them? Very impressive! The Langk lizardmen's sorcery has long been a mystery to us. Up to now we haven't given them much thought, since our magic has been more than enough to keep them in check. This new sorcery of theirs is something else, however. I must find out what they're up to. I'm glad to see you! Well, let me take a look at that... Hmm... This is no ordinary object! What could be the source of its mysterious power?... Who would have such a thing?... I can't say where it came from, but it's obvious that its sorcery bestows the power of a formidable entity into the bodies of Warriors... and I detect the scent of a dragon! I fear the Land Dragon has awakened from its slumber... Well, we've obviously got to deal with this thing. Hopefully it's not too late... But what ever shall we do? Its power is growing by the moment!... I'll bet Magister Rohmer of Gludio Castle knows what we should do.... But I can't just drop everything and run to him... "I'll go and ask Magister Rohmer what we should do!"
[30034-02.htm] Magister Iris: Can you really do that for me? Thank you so much! Please take this letter to Magister Rohmer in the Temple of Einhasad in the Town of Gludio. Bring me his reply as soon as possible. You can find him if you follow the road in a northeast from here. Miss Richlin can get you there faster through the gate of time and space. This sorcery will only grow more dangerous over time. I'll make preparations until your return.
[30034-02a.htm] Magister Iris: What have you done with the Tooth of sorcery? You must have it with you when you meet Magister Rohmer, or he won't tell you anything! Please, bring it to me!
[30034-02b.htm] Magister Iris: This is urgent! You must leave as soon as possible! Take my letter to Magister Rohmer at the temple in Gludio Castle Town.
[30034-03.htm] Magister Iris: You're back! I've been waiting for you! We must hurry! Work has come from the guards that Langk Lizardmen are attacking travelers again! They must be dealt with immediately! Please give me Magister Rohmer's reply! Just as I thought! We can do this, we just need to gather the ingredients we need to nullify thir sorcery. We'll have this problem resolved soon! Will you help me finish the job? "I'll help you finish the job."
[30034-04.htm] Magister Iris: Thank you so very much! I've found out that the Langk Lizardmen use a dragon tooth to perform their sorcery. I'm not sure whether or not it's actually a tooth from a dragon, but their sorcery is strong, and has evolved from ancient times. The document Magister Rohmer sent me is from that period. The document explains that only by using the same medium can its power be canceled. The more of this medium we possess, the more power we'll have over the sorcery. Unfortunately, I don't have enough dragon teeth yet. While you were away, I inventoried my supplies and have only 50 of them. We'll need some more if we're going to cancel that sorcery. Go to the Langk Lizardmen Dwellings, get 50 dragon teeth and bring them to me. Only the shamans and leaders have the teeth. You'd better get started! Good luck!
[30034-04a.htm] Magister Iris: Where is the letter from Magister Rohmer? We can't do anything without it! Did you drop it? You must find it!
[30034-05.htm] Magister Iris: Great job! Exactly 50! You dealt with that challenge admirably! My compliments! The very survival of our world depends on Warriors like you! Well, I have all the ingredients I need, and I also know how to cancel the effects of their sorcery, all there is to do now is make it happen! You've worked very hard collecting the teeth, I should do my part, right? Ha! Now, please give me the ingredients! "Here are the dragon teeth."
[30034-05a.htm] Magister Iris: Come in! Have you completed your mission? I'm impressed! What? You haven't collected all of them yet? If we are to cancel the sorcery of the Langk lizardmen, you must bring me 50 dragon teeth. Get them from Langk Lizardman shamans and leaders that can be found in the deepest parts of the Langk Lizardman Dwellings.
[30034-06.htm] Magister Iris: Whew! What a relief! Thank you for your hard work. Please accept this gift from myself and the guards, a small token of our gratitude. We may not have driven the Langk Lizardmen out completely, but they've lost their powerful sorcery, and no longer pose a mortal threat to us.
[30034-06a.htm] Magister Iris: Listen! You must collect 50 dragon teeth if I am to cancel the powerful effects of their sorcery. Take the teeth from Langk Lizardman Leaders and Shamans.
[30344-01.htm] Magister Rohmer: Let me read the letter from Magister Iris. Is seems the Langk Lizardmen in the south have obtained some very powerful sorcery. Take the notes I've collected in this letter back to Iris, she'll need them to complete her work. "I'll take it."
[30344-02.htm] Magister Rohmer: Don't lose this letter, it's the only copy! It's very urgent, you must hurry!
[30344-02a.htm] Magister Rohmer: Something's missing. The letter I gave you is useless without the sample I enclosed in it. You'd better bring it back.
[30344-03.htm] Magister Rohmer: Follow this road southwest to Gludin Village, you'll find Magister Iris there. This sorcery grows stronger by the day, you should hurry!
[30386-01.htm] Guard Luis: I've been looking for someone like you. I trust you've seen the havoc wrought throughout Gludio Territory. It was enough to have Ol Mahum Stragglers and Turek Orcs bothering us. Now the lizardmen from the south! The highway of the southern shoreline that leads to Giran has seen frequent attacks by Langk Lizardmen. People are scared. Even the temple priests traveling to Gludin were attacked! We Gludio guards are already stretched thin. Will you help us? "I'll help!"
[30386-01a.htm] Guard Luis: Your face is unfamiliar. You must be traveling through here. I trust you've seen the havoc wrought throughout Gludio Territory. It was enough to have ol mahum stragglers and Turek Orcs bothering us, now the lizardmen have joined in! The highway of the southern shoreline that leads to Giran has seen frequent attacks by Langk Lizardman. People are scared. Even the temple priests traveling to Gludin were attacked! We need more experienced help. (This quest may only be undertaken by a character of level 19 and above.)
[30386-02.htm] Guard Luis: Many thanks. The Langk Lizardman tribe used to keep to themselves on the southern shoreline, hunting and looting. Our scouts tell us that they've become organized and pose a serious threat! Some of their warriors are said to possess incredible new powers! We need your help clearing the southern shoreline road of Langk lizardmen. There are mainly Langk Lizardman sentinels and Langk Lizardman lieutenants threatening the roadway. Bring back 100 Feather Ornaments worn by Langk Lizardman Warriors as proof of your deed. Keep on the lookout for anything suspicious that might explain their sudden aggression. Good luck!
[30386-02a.htm] Guard Luis: Have you driven them off yet? The raids continue. Perhaps you should keep at it. (Collect 100 Feather Ornaments.)
[30386-03.htm] Guard Luis: Thanks to your help, the southern shoreline road is much safer! Let me see the Feather Ornaments. Hmm... this one's odd. This is a very ominous tooth, not a normal Langk Lizardman decoration. There's something sinister here. Can you take this tooth to Magister Iris of Einhasad Temple? "Yes, I'll go."
[30386-03a.htm] Guard Luis: You haven't been to Magister Iris yet? This is very important. Please go quickly and show her the tooth. She's at the Einhasad temple in the square of the northern part of the village.
[30386-04.htm] Guard Luis: Thank you! We're indebted to Magister Iris for her help. I'm guessing from the pattern engraved on the tooth that it's a magic symbol. Show it to her. She's at the Einhasad Temple next to the square in the northern part of the village. Now hurry!
Исходник условий и наград (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.Q00038_DragonFangs;
import java.util.HashMap;
import java.util.Map;
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 Q00038_DragonFangs extends Quest
{
// NPCs
private static final int LUIS = 30386;
private static final int IRIS = 30034;
private static final int ROHMER = 30344;
// Items
private static final int FEATHER_ORNAMENT = 7173;
private static final int TOOTH_OF_TOTEM = 7174;
private static final int TOOTH_OF_DRAGON = 7175;
private static final int LETTER_OF_IRIS = 7176;
private static final int LETTER_OF_ROHMER = 7177;
// Reward { item, adena }
private static final int[][] REWARD =
{
// @formatter:off
{45, 5200},
{627, 1500},
{1123, 3200},
{605, 3200}
// @formatter:on
};
// Droplist
private static final Map<Integer, int[]> DROPLIST = new HashMap<>();
static
{
// @formatter:off
DROPLIST.put(21100, new int[]{1, FEATHER_ORNAMENT, 100, 1000000});
DROPLIST.put(20357, new int[]{1, FEATHER_ORNAMENT, 100, 1000000});
DROPLIST.put(21101, new int[]{6, TOOTH_OF_DRAGON, 50, 500000});
DROPLIST.put(20356, new int[]{6, TOOTH_OF_DRAGON, 50, 500000});
// @formatter:on
}
public Q00038_DragonFangs()
{
super(38, "Dragon Fangs");
registerQuestItems(FEATHER_ORNAMENT, TOOTH_OF_TOTEM, TOOTH_OF_DRAGON, LETTER_OF_IRIS, LETTER_OF_ROHMER);
addStartNpc(LUIS);
addTalkId(LUIS, IRIS, ROHMER);
addKillId(DROPLIST.keySet());
}
@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 "30386-02.htm":
{
st.startQuest();
break;
}
case "30386-04.htm":
{
st.setCond(3, true);
takeItems(player, FEATHER_ORNAMENT, 100);
giveItems(player, TOOTH_OF_TOTEM, 1);
break;
}
case "30034-02a.htm":
{
if (hasQuestItems(player, TOOTH_OF_TOTEM))
{
htmltext = "30034-02.htm";
st.setCond(4, true);
takeItems(player, TOOTH_OF_TOTEM, 1);
giveItems(player, LETTER_OF_IRIS, 1);
}
break;
}
case "30344-02a.htm":
{
if (hasQuestItems(player, LETTER_OF_IRIS))
{
htmltext = "30344-02.htm";
st.setCond(5, true);
takeItems(player, LETTER_OF_IRIS, 1);
giveItems(player, LETTER_OF_ROHMER, 1);
}
break;
}
case "30034-04a.htm":
{
if (hasQuestItems(player, LETTER_OF_ROHMER))
{
htmltext = "30034-04.htm";
st.setCond(6, true);
takeItems(player, LETTER_OF_ROHMER, 1);
}
break;
}
case "30034-06a.htm":
{
if (getQuestItemsCount(player, TOOTH_OF_DRAGON) >= 50)
{
final int position = getRandom(REWARD.length);
htmltext = "30034-06.htm";
takeItems(player, TOOTH_OF_DRAGON, 50);
giveItems(player, REWARD[position][0], 1);
giveAdena(player, REWARD[position][1], 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() < 19) ? "30386-01a.htm" : "30386-01.htm";
break;
case State.STARTED:
final int cond = st.getCond();
switch (npc.getId())
{
case LUIS:
if (cond == 1)
{
htmltext = "30386-02a.htm";
}
else if (cond == 2)
{
htmltext = "30386-03.htm";
}
else if (cond > 2)
{
htmltext = "30386-03a.htm";
}
break;
case IRIS:
if (cond == 3)
{
htmltext = "30034-01.htm";
}
else if (cond == 4)
{
htmltext = "30034-02b.htm";
}
else if (cond == 5)
{
htmltext = "30034-03.htm";
}
else if (cond == 6)
{
htmltext = "30034-05a.htm";
}
else if (cond == 7)
{
htmltext = "30034-05.htm";
}
break;
case ROHMER:
if (cond == 4)
{
htmltext = "30344-01.htm";
}
else if (cond > 4)
{
htmltext = "30344-03.htm";
}
break;
}
break;
case State.COMPLETED:
htmltext = getAlreadyCompletedMsg(player);
break;
}
return htmltext;
}
@Override
public void onKill(Npc npc, Player player, boolean isPet)
{
final QuestState st = getQuestState(player, false);
if ((st == null) || !st.isStarted())
{
return;
}
final int[] droplist = DROPLIST.get(npc.getId());
if ((droplist != null) && st.isCond(droplist[0]))
{
final int itemId = droplist[1];
final int amount = droplist[2];
final int chance = droplist[3];
if (getRandom(1000000) < chance)
{
giveItems(player, itemId, 1);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
if (getQuestItemsCount(player, itemId) >= amount)
{
st.setCond(droplist[0] + 1, true);
}
}
}
}
}