Collector's Dream
- ID
- 261
- Название
- Collector's Dream
- start_npcs_json
- [30222]
- npc_ids_json
- []
- constants_json
- {"GIANT_SPIDER_LEG":1087}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00261_CollectorsDream/Q00261_CollectorsDream.java
NPC квеста
Записей нет.
Условия уровней: выражения из Java
htmltext = (player.getLevel() < 15) ? "30222-01.htm" : "30222-02.htm";
Выдача предметов, адены и опыта: выражения из Java
giveAdena(player, 1000, true); addExpAndSp(player, 2000, 0); giveItems(player, GIANT_SPIDER_LEG, 1);
Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.
Тексты квеста
[30222-01.htm] Alshupes: Lately I've put aside the money lending business and have taken up the hobby of collecting the skins or claws of rare animals. There are many that criticize my hobby, saying that only Humans would gather the bodies of dead animals as trophies, but these are the same people that turn around and come to see or borrow them for a few days, saying that they need them for magic research -- of course, asking me to keep it a secret from everyone else. One day, when you become skilled enough to hunt rare animals, stop by and see me. I will give you a rewarding task to complete. Right now, though, I think it would be far too difficult for you. (This quest may only be undertaken by a character of level 15 and above.)
[30222-02.htm] Alshupes: Lately I've put aside the money lending business and have taken up the hobby of collecting the skins or claws of rare animals. There are many that criticize my hobby, saying that only Humans would gather the bodies of dead animals as trophies, but these are the same people that turn around and come to see or borrow them for a few days, saying that they need them for magic research -- of course, asking me to keep it a secret from everyone else. So how about it, will you take on a job for me? It involves searching the fields and hunting rare animals for trophies. I can't say it's an easy task, but I will compensate you generously for your labor. What do you say, would you like to give it a try? Say you will take the task
[30222-03.htm] Alshupes: Currently, my main interest is in the large insects that I saw while traveling in the Human land of Gludio. As you would know if you studied history, when the Mystics of the Ivory Tower battled the Dark Sorcerer Beleth, also called a devil by the Humans of old, the strong magical energy which arose from their combat caused southern Gludio to become a barren plain and produced abnormalities such as ants the size of houses and spiders the size of Buffalos. In the last ten years, those great spiders have spread even to these Elven Woods. The tame creatures that have become accustomed to the care of the spirits and fairies of our woods are the perfect prey for those gigantic predators. Isn't that interesting? There are three kinds of giant spiders: crimson spiders, hook spiders, and pincer spiders. I don't have a preference, but I want to put into my hands a giant spider trophy. What you must do for me is to hunt the great spiders in the forest, cut off eight legs, and bring them back to me. It is a bit dangerous, but I will reward you generously for your efforts. Giant spiders are often found past the first three-way junction to the west of the village.
[30222-04.htm] Alshupes: Didn't I ask you to fetch eight Giant Spider legs for me? I don't care if it is a crimson spider, hook spider, or a pincer spider. Bring me all eight and I will pay you generously, as promised. The giants spiders are mostly found past the first three-way junction to the west of the village.
[30222-05.htm] Alshupes: Oh, so you've managed to get them. I guess I will have to see you in a new light. You're more skilled than you appear. Here is your reward. Thank you for your good work.
Исходник условий и наград (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.Q00261_CollectorsDream;
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 Q00261_CollectorsDream extends Quest
{
// Items
private static final int GIANT_SPIDER_LEG = 1087;
public Q00261_CollectorsDream()
{
super(261, "Collector's Dream");
registerQuestItems(GIANT_SPIDER_LEG);
addStartNpc(30222); // Alshupes
addTalkId(30222);
addKillId(20308, 20460, 20466);
}
@Override
public String onEvent(String event, Npc npc, Player player)
{
final String htmltext = event;
final QuestState st = getQuestState(player, false);
if (st == null)
{
return htmltext;
}
if (event.equals("30222-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) ? "30222-01.htm" : "30222-02.htm";
break;
}
case State.STARTED:
{
if (st.isCond(2))
{
htmltext = "30222-05.htm";
takeItems(player, GIANT_SPIDER_LEG, -1);
giveAdena(player, 1000, true);
addExpAndSp(player, 2000, 0);
st.exitQuest(true, true);
}
else
{
htmltext = "30222-04.htm";
}
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.isCond(1))
{
return;
}
giveItems(player, GIANT_SPIDER_LEG, 1);
if (getQuestItemsCount(player, GIANT_SPIDER_LEG) >= 8)
{
st.setCond(2, true);
}
else
{
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
}