Cure for Fever Disease
- ID
- 151
- Название
- Cure for Fever Disease
- start_npcs_json
- [30050]
- npc_ids_json
- [30032,30050]
- constants_json
- {"ELIAS":30050,"YOHANES":30032,"POISON_SAC":703,"FEVER_MEDICINE":704}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00151_CureForFever/Q00151_CureForFever.java
NPC квеста
Условия уровней: выражения из Java
htmltext = (player.getLevel() < 15) ? "30050-01.htm" : "30050-02.htm";
Выдача предметов, адены и опыта: выражения из Java
giveItems(player, 102, 1); giveItems(player, FEVER_MEDICINE, 1); giveItems(killer, POISON_SAC, 1);
Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.
Тексты квеста
[30032-01.htm] Priest Yohanes: Elias has sent you, I presume. I will hurry and make the medicine from the Poison Sacs you have brought me. Anyhow, Elias must be devastated at the turn of events that has happened to his students. But I think that Elias is largely responsible... taking the students to such a dangerous place and all. We Priests always request the protection of the guards when venturing outside the village, but they say that Elias refused the help of the guards, relying only on his magic. So his students pay for his folly... tsk tsk... Here, the medicine is finished. Take this and hurry back to Elias. I'd like to see the students from the magic school run through the streets again. I pray that the blessings of Einhasad be with them. With this medicine and the powers of Einhasad, I am sure that the students will recover soon. May the blessings of Einhasad be with you.
[30032-02.htm] Priest Yohanes: Have you met Elias yet? I am sure he is anxiously awaiting your return. Please hurry, the lives of many students are at stake.
[30050-01.htm] Elias: I'm Elias, one of the teachers from the Einhovant School of Wizardry. My students and I went to the forest to the north of the island on a field trip recently, but some of my students have fallen ill with a strange fever. It has been more than a week since they became ill, but we have yet to find a treatment. I am going crazy with worry that my students may die. Thankfully, the Priest Yohanes is researching methods to create a medicine for them. He is very learned in herb lore, and has treated many illnesses. I trust that he will soon find a way to create a medicine for them. But I worry that because there are so many students that need to be treated, he may not have enough ingredients. If we are short on ingredients, I will ask for your aid, so please help us if it is necessary. (This quest may only be undertaken by a character of level 15 and above.)
[30050-02.htm] Elias: I am Elias, one of the teachers from the Einhovant's School of Wizardry. My students and I went to the forest to the north of the island on a field trip recently, but some of my students have fallen ill with a strange fever. It has been more than a week since they became ill, but we have yet to find a treatment. I am going crazy with worry that my students may die. Thankfully, the Priest Yohanes has created a medicine, but he is running short on ingredients. Will you not go and gather the necessary ingredients for my dying students? Your aid is urgently needed. We need the Poison Sac of the giant spider, and I am asking you because I trust that someone of your abilities can easily manage this task. Say you will help
[30050-03.htm] Elias: I can't thank you enough for your help. The giant spiders abound in the northern parts of the island, so hunt them and bring back their Poison Sacs. Once you have obtained the Poison Sacs, go to Priest Yohanes. He will create a fever medicine from the Poison Sacs. Bring the medicine back to me. If one of my students should die, how will I ever face their parents? I just want to run far, far away. I implore you, please find those Poison Sacs. My students are dying!
[30050-04.htm] Elias: You haven't left yet? Hurry and fetch the Poison Sacs. My students are dying, and it pains my heart to see those youngsters in feverish hallucinations. Go to the northern end of Talking Island to hunt the giant spiders and obtain their Poison Sacs. Take the Poison Sacs to Priest Yohanes, and he will make a fever medicine for you. Bring the medicine back to me. I beg you to help, my dear friend!
[30050-05.htm] Elias: Ah ... You have managed to obtain the Poison Sacs! I sincerely thank you!! Go at once and take them to Priest Yohanes at the Temple of Einhasad. He will create a fever medicine for you. When he has finished creating the medicine, bring it back to me.
[30050-06.htm] Elias: So this is the fever medicine. Ahh ... I am deeply grateful to you. Because you have so willingly helped others, we can save the lives of my students. May the angels bless you. I must hurry and send this medicine off to the school. But first ... Please accept this. This is a token of appreciation for having saved my students.
Исходник условий и наград (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.Q00151_CureForFever;
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 Q00151_CureForFever extends Quest
{
// NPCs
private static final int ELIAS = 30050;
private static final int YOHANES = 30032;
// Items
private static final int POISON_SAC = 703;
private static final int FEVER_MEDICINE = 704;
public Q00151_CureForFever()
{
super(151, "Cure for Fever Disease");
registerQuestItems(FEVER_MEDICINE, POISON_SAC);
addStartNpc(ELIAS);
addTalkId(ELIAS, YOHANES);
addKillId(20103, 20106, 20108);
}
@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("30050-03.htm"))
{
st.startQuest();
}
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) ? "30050-01.htm" : "30050-02.htm";
break;
}
case State.STARTED:
{
final int cond = st.getCond();
switch (npc.getId())
{
case ELIAS:
{
if (cond == 1)
{
htmltext = "30050-04.htm";
}
else if (cond == 2)
{
htmltext = "30050-05.htm";
}
else if (cond == 3)
{
htmltext = "30050-06.htm";
takeItems(player, FEVER_MEDICINE, 1);
giveItems(player, 102, 1);
st.exitQuest(false, true);
}
break;
}
case YOHANES:
{
if (cond == 2)
{
htmltext = "30032-01.htm";
st.setCond(3, true);
takeItems(player, POISON_SAC, 1);
giveItems(player, FEVER_MEDICINE, 1);
}
else if (cond == 3)
{
htmltext = "30032-02.htm";
}
break;
}
}
break;
}
case State.COMPLETED:
{
htmltext = getAlreadyCompletedMsg(player);
break;
}
}
return htmltext;
}
@Override
public void onKill(Npc npc, Player killer, boolean isSummon)
{
final QuestState qs = getQuestState(killer, false);
if ((qs != null) && qs.isCond(1) && (getRandom(10) < 2))
{
giveItems(killer, POISON_SAC, 1);
qs.setCond(2, true);
}
}
}