Quest Be Lost in the Mysterious Scent (468).

Contributed by gigilo1968.
This commit is contained in:
MobiusDev 2016-09-21 19:08:28 +00:00
parent 848927e24d
commit a0de93d6c6
11 changed files with 237 additions and 1 deletions

View File

@ -7,7 +7,6 @@
460 Precious Research Material
462 Stuffed Ancient Heroes
465 We Are Friends
468 Be Lost in the Mysterious Scent
469 Suspicious Gardener
471 Breaking through the Emerald Square
472 Challenge, Steam Corridor

View File

@ -0,0 +1,3 @@
<html><body>Selina:<br>
Thank you for helping me! Do you think you could come by tomorrow? There's plenty of researching to be done!
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Selina:<br>
Thanks again for helping us! We're well on our way to having enough samples to send Aden's way.<br>
(You have already completed this quest.)
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Selina:<br>
How could this garden full of such violent mysterious creatures be operated without a hitch for such a long time? That was my biggest question ever since I first came here. And after an exhaustive investigation, I finally came to a conclusion. I believe that those beings known as Gardeners have been breeding and maintaining those creatures. So I have a favor to ask you.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00468_BeLostInTheMysteriousScent 33032-02.htm">"Ask what the favor is."</Button>
</body></html>

View File

@ -0,0 +1,6 @@
<html><body>Selina:<br>
We need your help to understand how the gardeners have gained control over the creatures. <br1>
I saw something a few days ago, you know. One of the creatures was becoming increasingly violent and angry, when one of the gardeners grabbed it and dragged it to the rose vines in the garden. They held them against the flowers, let them breath in the scents, and within minutes, they were sound asleep! <br1>
I want blood samples from the creatures that fell asleep. Do you think you can help?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00468_BeLostInTheMysteriousScent 33032-03.htm">"Leave it to me."</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Selina:<br>
Thank you! <br1>
Take creatures to the rose vines and expose them to whatever scent it is that sends them to sleep. If they fall unconscious, start collecting the 20 blood samples we need. If they get aggressive, well... kill them. Easy enough, right? Good luck!
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Selina:<br>
Thank you! <br1>
Take creatures to the rose vines and expose them to whatever scent it is that sends them to sleep. If they fall unconscious, start collecting the 20 blood samples we need. If they get aggressive, well... kill them. Easy enough, right? Good luck!
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Selina:<br>
Aha! There you are! The scientist extraordinaire!<br>
How did you get on? Did the experiment turn out? Do you have the blood samples?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00468_BeLostInTheMysteriousScent 33032-06.html">"Well, yes, and yes!"</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Selina:<br>
Excellent! I'll send them to Aden and hopefully have some concoction concocted before the animals get out of control. <br1>
Here's your reward. Now... this is an ongoing study, so if you'd like to help out again tomorrow, you'd be more than welcome!
</body></html>

View File

@ -0,0 +1,201 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package quests.Q00468_BeLostInTheMysteriousScent;
import com.l2jmobius.gameserver.enums.QuestSound;
import com.l2jmobius.gameserver.enums.QuestType;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.quest.Quest;
import com.l2jmobius.gameserver.model.quest.QuestState;
import com.l2jmobius.gameserver.model.quest.State;
import com.l2jmobius.gameserver.network.serverpackets.ExQuestNpcLogList;
import com.l2jmobius.gameserver.util.Util;
/**
* Be Lost in the Mysterious Scent (468)
* @URL https://l2wiki.com/Be_Lost_in_the_Mysterious_Scent
* @author Gigi
*/
public class Q00468_BeLostInTheMysteriousScent extends Quest
{
// NPCs
private static final int SELINA = 33032;
private static final int MOON_GARDEN_MANAGER = 22958;
private static final int GARDEN_PROTECTOR = 22959;
private static final int GARDEN_COMMANDER = 22962;
private static final int MOON_GARDENER = 22960;
// Item
private static final int CERTIFICATE_OF_LIFE = 30385;
// Misc
private static final int MIN_LEVEL = 90;
public Q00468_BeLostInTheMysteriousScent()
{
super(468);
addStartNpc(SELINA);
addTalkId(SELINA);
addKillId(MOON_GARDEN_MANAGER, GARDEN_PROTECTOR, GARDEN_COMMANDER, MOON_GARDENER);
addCondMinLevel(MIN_LEVEL, "32892-00a.html");
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = null;
final QuestState qs = getQuestState(player, false);
if (qs == null)
{
return getNoQuestMsg(player);
}
switch (event)
{
case "33032-02.htm":
{
htmltext = event;
break;
}
case "33032-03.htm":
{
qs.startQuest();
htmltext = event;
break;
}
case "33032-06.html":
{
if (qs.isCond(2))
{
giveItems(player, CERTIFICATE_OF_LIFE, 2);
qs.exitQuest(QuestType.DAILY, true);
}
htmltext = event;
break;
}
}
return htmltext;
}
@Override
public String onTalk(L2Npc npc, L2PcInstance player)
{
final QuestState qs = getQuestState(player, true);
String htmltext = getNoQuestMsg(player);
if (npc.getId() == SELINA)
{
switch (qs.getState())
{
case State.COMPLETED:
{
if (!qs.isNowAvailable())
{
htmltext = "32892-00.html";
break;
}
qs.setState(State.CREATED);
}
case State.CREATED:
{
htmltext = "33032-01.htm";
qs.isStarted();
break;
}
case State.STARTED:
{
if (qs.isCond(1))
{
htmltext = "33032-04.html";
}
else if (qs.isCond(2))
{
htmltext = "33032-05.html";
}
break;
}
}
}
return htmltext;
}
@Override
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
final QuestState qs = getRandomPartyMemberState(killer, 1, 3, npc);
if ((qs != null) && qs.isCond(1) && Util.checkIfInRange(1500, npc, qs.getPlayer(), false))
{
switch (npc.getId())
{
case MOON_GARDEN_MANAGER:
{
int kills = qs.getInt(Integer.toString(MOON_GARDEN_MANAGER));
if (kills < 10)
{
kills++;
qs.set(Integer.toString(MOON_GARDEN_MANAGER), kills);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
break;
}
case GARDEN_PROTECTOR:
{
int kills = qs.getInt(Integer.toString(GARDEN_PROTECTOR));
if (kills < 10)
{
kills++;
qs.set(Integer.toString(GARDEN_PROTECTOR), kills);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
break;
}
case GARDEN_COMMANDER:
{
int kills = qs.getInt(Integer.toString(GARDEN_COMMANDER));
if (kills < 10)
{
kills++;
qs.set(Integer.toString(GARDEN_COMMANDER), kills);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
break;
}
case MOON_GARDENER:
{
int kills = qs.getInt(Integer.toString(MOON_GARDENER));
if (kills < 10)
{
kills++;
qs.set(Integer.toString(MOON_GARDENER), kills);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
break;
}
}
final ExQuestNpcLogList log = new ExQuestNpcLogList(getId());
log.addNpc(MOON_GARDEN_MANAGER, qs.getInt(Integer.toString(MOON_GARDEN_MANAGER)));
log.addNpc(GARDEN_PROTECTOR, qs.getInt(Integer.toString(GARDEN_PROTECTOR)));
log.addNpc(GARDEN_COMMANDER, qs.getInt(Integer.toString(GARDEN_COMMANDER)));
log.addNpc(MOON_GARDENER, qs.getInt(Integer.toString(MOON_GARDENER)));
qs.getPlayer().sendPacket(log);
if ((qs.getInt(Integer.toString(MOON_GARDEN_MANAGER)) >= 10) && (qs.getInt(Integer.toString(GARDEN_PROTECTOR)) >= 10) && (qs.getInt(Integer.toString(GARDEN_COMMANDER)) >= 10) && (qs.getInt(Integer.toString(MOON_GARDENER)) >= 10))
{
qs.setCond(2, true);
}
}
return super.onKill(npc, killer, isSummon);
}
}

View File

@ -123,6 +123,7 @@ import quests.Q00458_PerfectForm.Q00458_PerfectForm;
import quests.Q00463_IMustBeaGenius.Q00463_IMustBeaGenius;
import quests.Q00464_Oath.Q00464_Oath;
import quests.Q00466_PlacingMySmallPower.Q00466_PlacingMySmallPower;
import quests.Q00468_BeLostInTheMysteriousScent.Q00468_BeLostInTheMysteriousScent;
import quests.Q00470_DivinityProtector.Q00470_DivinityProtector;
import quests.Q00474_WaitingForTheSummer.Q00474_WaitingForTheSummer;
import quests.Q00476_PlainMission.Q00476_PlainMission;
@ -513,6 +514,7 @@ public class QuestMasterHandler
Q00463_IMustBeaGenius.class,
Q00464_Oath.class,
Q00466_PlacingMySmallPower.class,
Q00468_BeLostInTheMysteriousScent.class,
Q00470_DivinityProtector.class,
Q00474_WaitingForTheSummer.class,
Q00476_PlainMission.class,