Dig Up the Sea of Spores!
- ID
- 356
- Название
- Dig Up the Sea of Spores!
- start_npcs_json
- [30717]
- npc_ids_json
- [20558,20562]
- constants_json
- {"HERB_SPORE":5866,"CARN_SPORE":5865,"ROTTING_TREE":20558,"SPORE_ZOMBIE":20562}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00356_DigUpTheSeaOfSpores/Q00356_DigUpTheSeaOfSpores.java
NPC квеста
Условия уровней: выражения из Java
htmltext = (player.getLevel() < 43) ? "30717-01.htm" : "30717-02.htm";
Выдача предметов, адены и опыта: выражения из Java
giveAdena(player, 44000, true); addExpAndSp(player, 35000, 2600); addExpAndSp(player, 24500, 0); addExpAndSp(player, 0, 1820); giveItems(player, HERB_SPORE, 1); giveItems(player, CARN_SPORE, 1);
Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.
Тексты квеста
[30717-01.htm] Magister Gauen: Since the era of Shunaiman, the first emperor of the ancient Elmoreden Empire, the Mystics of the Ivory Tower have been researching the Sea of Spores. Around E.D. 500 they constructed a force field tower which stopped the spread of that wretched sea. Their research has continued through the centuries. They could use some help in their studies, but I'm afraid you're not yet ready. (This quest may only be undertaken by a character of level 43 and above.)
[30717-02.htm] Magister Gauen: Since the era of Shunaiman, the first emperor of the ancient Elmoreden Empire, the Mystics of the Ivory Tower have been researching the Sea of Spores. Around E.D. 500 they constructed a force field tower which stopped the spread of that wretched sea. Their research has continued throughout the centuries. Although the ancient barrier appears to be holding, the Sea of Spores continues to threaten us. A final solution to this problem must be found. "What can we do?"
[30717-03.htm] Magister Gauen: Frankly, I'm not sure. Up to now our research has been focused on sustaining and strengthening the magic force field tower. However, it has become clear that we need a more permanent solution. For this we must return to the Sea of Spores itself. We must shift our strategy to researching each individual spore, one by one. We must study the colonies they build, how they spawn and the complex relationships between the plants and animals of the sea. "Very interesting."
[30717-04.htm] Magister Gauen: I must have a tissue sample of an organism that has joined with spores and grown roots. Rotting Tree Spores and spore zombies will do nicely. "I'll do it."
[30717-05.htm] Magister Gauen: There are many different types of spores, all with unique and often dangerous characteristics. Are you sure you want to do this? "I'll do it."
[30717-06.htm] Magister Gauen: Your resolve is admirable! Go and get the spores that live as parasites on rotten trees and spore zombies. Put the spores from the spore zombies in this grey pouch and put the spores from the rotten trees in this yellow pouch. The capacity of the pouches varies according to the size of the spores. Each pouch usually holds about 50 spores. Thank you for your assistance.
[30717-07.htm] Magister Gauen: Have you been to the Sea of Spores? Bring me the spores from rotten trees in this yellow pouch and the spores from spore zombies in this grey pouch. Fill the pouches with 50 spores each and then bring them back to me.
[30717-08.htm] Magister Gauen: Have you just returned from the Sea of Spores? I see that you have filled the yellow pouch. Due to inevitable shrinkage, I hoped you would bring both pouches full... Oh well. What do you want to do? Do you want to give me the yellow pouch? Give him the yellow pouch. "I will continue the work."
[30717-09.htm] Magister Gauen: Have you just returned from the Sea of Spores? I see that you have filled the grey pouch. Due to inevitable shrinkage, I hoped you would bring both pouches full... Oh well. What do you want to do? Do you want to give me the grey pouch? Give him the grey pouch. "I will continue the work."
[30717-10.htm] Magister Gauen: Ah, you've returned! Give me the pouches. Hmm... Actually, I'm a little busy... Just put them anywhere... Put down the pouches. "All of that trouble and you aren't even going to look at them?"
[30717-11.htm] Magister Gauen: Go to the Sea of Spores and bring back the spores that are parasites on the bodies of rotten trees and spore zombies. Collect 50 of each kind in each of the two pouches. Please do this and restore peace to the community.
[30717-12.htm] Magister Gauen: I'll hold onto this for now. Do you wish to continue collecting spores or would you like to quit? "I will collect more spores." "I quit."
[30717-13.htm] Magister Gauen: I'll keep this with me for now. Do you wish to collect more spores or do you want to quit? "I will continue to collect spores." "I quit."
[30717-14.htm] Magister Gauen: Please put them in that box over there. Thanks to you, we can continue to conduct highly productive and effective research. Your contribution will be duly noted. Would you like to help us some more?
[30717-15.htm] Magister Gauen: I'm sorry, I was distracted. Let's see, first we must sort them... What do we have here? Open the pouch.
[30717-16.htm] Magister Gauen: Here we go... I acknowledge that I received from you 50 Herbivorous Spores and 50 carnivorous spores. Here is your reward. If you wish, come back and help me again. We have enough for now, but I'm sure that in the future we shall need more.
[30717-17.htm] Magister Gauen: Thank you very much. If you ever return to the Sea of Spores, come and see me.
Исходник условий и наград (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.Q00356_DigUpTheSeaOfSpores;
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 Q00356_DigUpTheSeaOfSpores extends Quest
{
// Items
private static final int HERB_SPORE = 5866;
private static final int CARN_SPORE = 5865;
// Monsters
private static final int ROTTING_TREE = 20558;
private static final int SPORE_ZOMBIE = 20562;
public Q00356_DigUpTheSeaOfSpores()
{
super(356, "Dig Up the Sea of Spores!");
registerQuestItems(HERB_SPORE, CARN_SPORE);
addStartNpc(30717); // Gauen
addTalkId(30717);
addKillId(ROTTING_TREE, SPORE_ZOMBIE);
}
@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 "30717-06.htm":
{
st.startQuest();
break;
}
case "30717-16.htm":
{
takeItems(player, HERB_SPORE, -1);
takeItems(player, CARN_SPORE, -1);
giveAdena(player, 44000, true);
st.exitQuest(true, true);
break;
}
case "30717-14.htm":
{
takeItems(player, HERB_SPORE, -1);
takeItems(player, CARN_SPORE, -1);
addExpAndSp(player, 35000, 2600);
st.exitQuest(true, true);
break;
}
case "30717-12.htm":
{
takeItems(player, HERB_SPORE, -1);
addExpAndSp(player, 24500, 0);
break;
}
case "30717-13.htm":
{
takeItems(player, CARN_SPORE, -1);
addExpAndSp(player, 0, 1820);
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() < 43) ? "30717-01.htm" : "30717-02.htm";
break;
}
case State.STARTED:
{
final int cond = st.getCond();
if (cond == 1)
{
htmltext = "30717-07.htm";
}
else if (cond == 2)
{
if (getQuestItemsCount(player, HERB_SPORE) >= 50)
{
htmltext = "30717-08.htm";
}
else if (getQuestItemsCount(player, CARN_SPORE) >= 50)
{
htmltext = "30717-09.htm";
}
else
{
htmltext = "30717-07.htm";
}
}
else if (cond == 3)
{
htmltext = "30717-10.htm";
}
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 cond = st.getCond();
if (cond < 3)
{
switch (npc.getId())
{
case ROTTING_TREE:
{
if (getRandom(100) < 63)
{
giveItems(player, HERB_SPORE, 1);
if (getQuestItemsCount(player, HERB_SPORE) < 50)
{
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
else
{
st.setCond(cond == 2 ? 3 : 2, true);
}
}
break;
}
case SPORE_ZOMBIE:
{
if (getRandom(100) < 76)
{
giveItems(player, CARN_SPORE, 1);
if (getQuestItemsCount(player, CARN_SPORE) < 50)
{
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
else
{
st.setCond(cond == 2 ? 3 : 2, true);
}
}
break;
}
}
}
}
}