An Elder Sows Seeds
- ID
- 370
- Название
- An Elder Sows Seeds
- start_npcs_json
- [30612]
- npc_ids_json
- [30612]
- constants_json
- {"CASIAN":30612,"SPELLBOOK_PAGE":5916,"CHAPTER_OF_FIRE":5917,"CHAPTER_OF_WATER":5918,"CHAPTER_OF_WIND":5919,"CHAPTER_OF_EARTH":5920}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00370_AnElderSowsSeeds/Q00370_AnElderSowsSeeds.java
NPC квеста
| ID | Название | Старт квеста | Уровень |
|---|---|---|---|
| 30612 | Casian | Да | 70 |
Условия уровней: выражения из Java
htmltext = (player.getLevel() < 28) ? "30612-0a.htm" : "30612-0.htm";
Выдача предметов, адены и опыта: выражения из Java
giveAdena(player, 3600, true);
Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.
Тексты квеста
[30612-0.htm] Wiseman Casian: Did you know that at one time this barren wasteland was one of the most fertile places in Aden? For centuries farmers sowed their seeds and harvested abundant crops here. Ah, yes, those were the days... But then that devil Beleth and his minions arrived. We had to come up with a resolution quickly. We were compelled to at last open the forbidden spellbook... For two days and nights fire rained down on us and dark magic swept the land like a whirlwind... It wasn't at all what we'd anticipated... I couldn't bear to stay in this ruined place, so I wandered the world for many years. But now I find myself drawn back, hoping to somehow restore this land to its former beauty. I shan't be able to do this alone... "What can I do to help?"
[30612-0a.htm] Wiseman Casian: Did you know that at one time this barren wasteland was one of the most fertile places in Aden? For centuries, farmers sowed their seeds and harvested their abundant crops here. Ah, yes, those were the days... But then that devil Beleth and his minions arrived. We had to act quickly. We were compelled to at last open the forbidden spellbook... For two days and nights fire rained down on us and dark magic swept over the land like a whirlwind... It wasn't at all what we'd anticipated... When it was over, this is all that was left... A dusty wasteland inhabited by weird-looking freaks... Some day, hopefully, we shall find a way to change this place back into the verdant farmland it once was... I hope we can count on you when that time comes. (This quest may only be undertaken by a character of level 28 and above.)
[30612-1.htm] Wiseman Casian: The magic we unwittingly unleashed came from "Kranvel's Spellbook", one of the forbidden tomes of the Ivory Tower. Its fearsome power sucked the magic from all living organisms in the area, and then unleashed it all back upon us with a vengeance! Poor Spellsinger Diena saw the whole thing and fell into a deep state of shock. As she shed blood and tears, she destroyed the book and scattered it to the wind... She was determined that no one should ever use such evil magic again... We couldn't stop her! We all felt as if we were in a terrible nightmare, and just stared blankly at her... But now we know that that spellbook is the key to the restoration of this place. Please find the pieces of the book that were scattered to the wind. "Where should I look for the pieces of "Kranvel's Spellbook"?"
[30612-2.htm] Wiseman Casian: Ironically, the deformed beasts around us hold the clues to finding the legacy of Kranvel. Giant ants are known to pick up anything they find and take it to their nests. It is said that they have collected a great number of ancient relics and taken them to their nest in the maze-like caves beneath the wasteland. You will most likely find the pieces of "Kranvel's Spellbook" in the Ant Nest. You mustn't attempt this alone! Take some reliable colleagues along with you. "You can count on me."
[30612-3.htm] Wiseman Casian: In order to obtain the pieces of the spellbook, you must conquer the ant recruits, ant patrols, ant guards, the noble ant and the noble ant leader. Check carefully any scraps of paper you come across. The pieces of "Kranvel's Spellbook" should be easy to identify. The spellbook has four chapters: the Chapter of Fire, the Chapter of Water, the Chapter of Wind and the Chapter of Earth. The contents will only be discernible if you recover all four chapters. This is a challenging task, but I think you are ready for it. May the divine blessing be with you...
[30612-4.htm] Wiseman Casian: The wind is unusually scorching today... Do you feel it? The angry cries of the souls of those who perished here seem carried on the blistering breeze across the Wasteland... Forgive me. This place has that effect on me. By the way, how are things at the Ant Nest? "Where can I find the spellbook?" "I have brought all four chapters of "Kranvel's Spellbook"." "I need to find more chapters." "I quit."
[30612-5.htm] Wiseman Casian: How could you forget? You must slay ant recruits, ant patrols, ant guards, noble ants, and the noble ant leader in order to obtain the pieces of the spellbook. Examine any scraps of paper you come across carefully. The pieces of "Kranvel's Spellbook" should be instantly recognizable. You must find all four chapters: the Chapter of Fire, the Chapter of Water, the Chapter of Wind and the Chapter of Earth. Back
[30612-6.htm] Wiseman Casian: How could you have forgotten so quickly? "Kranvel's Spellbook" consists of four chapters: the Chapter of Fire, the Chapter of Water, the Chapter of Wind and the Chapter of Earth. The contents will not be discernible unless you find all four chapters. Please, you must help us! We're counting on you!
[30612-7.htm] Wiseman Casian: Thank you for helping us. Hopefully someday our efforts will pay off, and restore this wasteland to its former beauty. Bless you, my child...
[30612-8.htm] Wiseman Casian: Let's see, the Chapter of Fire, the Chapter of Water, the Chapter of Wind, and the Chapter of Earth... you have brought them all! Perhaps your discovery will lead to a way to restore this ruined place. At last I shall be redeemed... This is all thanks to you. Please accept this humble token of my appreciation. But this sad chapter is not yet complete... The dark magic that caused this disaster had many sources, united in their power and holding copies of "Kranvel's Spellbook"! Alas, it's true! There remain many pieces of that horrid tome scattered about the inside of the Ant Nest. If I am to continue my research, and above all to keep this dreadful power from falling into the wrong hands, the remaining fragments of "Kranvel's Spellbook" must be recovered! Please help! "I will continue to help." "I quit."
[30612-9.htm] Wiseman Casian: I understand. Your assistance has given me the opportunity to redeem myself. I don't know exactly where my research will lead, but hopefully to a better world... We all must do what we think is best. Only time will tell whether our choices are good ones... Thank you so very much for your help. May you be blessed by the gods...
Исходник условий и наград (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.Q00370_AnElderSowsSeeds;
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.QuestState;
import org.l2jmobius.gameserver.mechanics.script.State;
public class Q00370_AnElderSowsSeeds extends Quest
{
// NPC
private static final int CASIAN = 30612;
// Items
private static final int SPELLBOOK_PAGE = 5916;
private static final int CHAPTER_OF_FIRE = 5917;
private static final int CHAPTER_OF_WATER = 5918;
private static final int CHAPTER_OF_WIND = 5919;
private static final int CHAPTER_OF_EARTH = 5920;
// Drop chances
private static final Map<Integer, Integer> MOBS1 = new HashMap<>();
private static final Map<Integer, Double> MOBS2 = new HashMap<>();
static
{
MOBS1.put(20082, 9); // ant_recruit
MOBS1.put(20086, 9); // ant_guard
MOBS1.put(20090, 22); // noble_ant_leader
MOBS2.put(20084, 0.101); // ant_patrol
MOBS2.put(20089, 0.100); // noble_ant
}
public Q00370_AnElderSowsSeeds()
{
super(370, "An Elder Sows Seeds");
addStartNpc(CASIAN);
addTalkId(CASIAN);
addKillId(20082, 20084, 20086, 20089, 20090);
}
@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 "30612-3.htm":
{
st.startQuest();
break;
}
case "30612-6.htm":
{
if (hasQuestItems(player, CHAPTER_OF_FIRE, CHAPTER_OF_WATER, CHAPTER_OF_WIND, CHAPTER_OF_EARTH))
{
htmltext = "30612-8.htm";
takeItems(player, CHAPTER_OF_FIRE, 1);
takeItems(player, CHAPTER_OF_WATER, 1);
takeItems(player, CHAPTER_OF_WIND, 1);
takeItems(player, CHAPTER_OF_EARTH, 1);
giveAdena(player, 3600, true);
}
break;
}
case "30612-9.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() < 28) ? "30612-0a.htm" : "30612-0.htm";
break;
}
case State.STARTED:
{
htmltext = "30612-4.htm";
break;
}
}
return htmltext;
}
@Override
public void onKill(Npc npc, Player player, boolean isSummon)
{
final QuestState qs = getRandomPartyMemberState(player, -1, 3, npc);
if (qs != null)
{
final int npcId = npc.getId();
final Integer mobs1Chance = MOBS1.get(npcId);
if (mobs1Chance != null)
{
if (getRandom(100) < mobs1Chance)
{
final Player luckyPlayer = getRandomPartyMember(player, npc);
if (luckyPlayer != null)
{
giveItemRandomly(luckyPlayer, npc, SPELLBOOK_PAGE, 1, 0, 1, true);
}
}
}
else
{
giveItemRandomly(qs.getPlayer(), npc, SPELLBOOK_PAGE, 1, 0, MOBS2.get(npcId), true);
}
}
}
}