Quests 10415, 10766 and 10791.

Contributed by gigilo1968.
This commit is contained in:
MobiusDev
2016-07-25 20:34:23 +00:00
parent dfc47df2f2
commit 1ff8e57d59
49 changed files with 787 additions and 14 deletions

View File

@@ -0,0 +1,4 @@
<html><body>Tracker Dokara:<br>
Wait! I thought if we felled that many Stakatos it'd be enough, but there's more of them. We'll need to find a better solution to this.<br>
<Button ALIGN=LEFT ICON="Normal" action="bypass -h Quest Q10791_TheManOfMystery 33847-02.htm">"What do you want me to do?"</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Tracker Dokara:<br>
I thought for sure that we'd gotten rid of them all...Were you really as thorough as you claim?<br>
No, someone recommended by Innocentin wouldn't be so careless. Did you happen to discover anything strange while fighting the Stakatos?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10791_TheManOfMystery 33847-03.htm">"I did hear about a Suspicious Cocoon."</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Tracker Dokara:<br>
A cocoon? No!<br>Are all these Stakatos being born out of cocoons? Wait, it sounds plausible. This means we need to get rid of more than just the Stakatos!<br>
I need your help again, in that case.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10791_TheManOfMystery 33847-04.htm">"Don't tell me..."</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Tracker Dokara:<br>
I'm guessing that these Suspicious Cocoons are the real problem. If we got rid of them, we'd be rid of the Stakato problem as well.<br>
Go get rid of 5 <font color="LEVEL">Suspicious Cocoons.</font>That shouldn't be too difficult.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Tracker Dokara:<br>
You're a few monsters short.<br1>
You weren't trying to fast talk me like everyone else, were you?
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Tracker Dokara:<br>
I think that takes care of it. Did anything happen while you were getting rid of those Suspicious Cocoons?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10791_TheManOfMystery 33847-07.html">"Kinda..."</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
html><body>Tracker Dokara:<br>
So, this Kain has appeared and helped you again? Pa'agrio always shows the way to outstanding warriors.<br>
Anyway, we know that those Suspicious Cocoons are the root of our problems, and you've gotten rid of a high number of them, so there's no longer a need to worry. Of course, this Kain fellow helped you, but to me, the outcome is all the same.<br>
Thank you for your help.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Kain:<br>
You aren't strong enough to be out here alone.<br>
I stopped by because someone was having trouble with Stakato. How funny it's another Ertheia.<br>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Kain:<br>
What are Stakatos doing here?<br>
Huh? You're Ertheia. Faeron must be stable enough for you to leave town, eh?<br>
But what are you doing here? Did Stakatos attack you?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10791_TheManOfMystery thank">"Yes. Thank you for helping me."</Button>
</body></html>

View File

@@ -0,0 +1,222 @@
/*
* 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.Q10791_TheManOfMystery;
import com.l2jmobius.gameserver.enums.QuestSound;
import com.l2jmobius.gameserver.enums.Race;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.actor.instance.L2QuestGuardInstance;
import com.l2jmobius.gameserver.model.base.ClassId;
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 quests.Q10790_AMercenaryHelper.Q10790_AMercenaryHelper;
/**
* The Man Of Mystery (10791)
* @URL https://l2wiki.com/The_Man_of_Mystery
* @author Gigi
*/
public class Q10791_TheManOfMystery extends Quest
{
// NPCs
private static final int DOKARA = 33847;
private static final int KAIN_VAN_HALTER = 33993;
// Monsters
private static final int SUSPICIOUS_COCOON = 27536;
private static final int SUSPICIOUS_COCOON1 = 27537;
private static final int SUSPICIOUS_COCOON2 = 27538;
private static final int NEEDLE_STAKATO_CAPTAIN = 27542;
private static final int NEEDLE_STAKATO = 27543;
// Items
private static final int EAA = 730;
// Misc
private static final int MIN_LEVEL = 65;
private static final int MAX_LEVEL = 70;
public Q10791_TheManOfMystery()
{
super(10791);
addStartNpc(DOKARA);
addTalkId(DOKARA, KAIN_VAN_HALTER);
addFirstTalkId(KAIN_VAN_HALTER);
addKillId(SUSPICIOUS_COCOON, SUSPICIOUS_COCOON1, SUSPICIOUS_COCOON2, NEEDLE_STAKATO_CAPTAIN);
addAttackId(NEEDLE_STAKATO_CAPTAIN);
addCondLevel(MIN_LEVEL, MAX_LEVEL, "no_level.html");
addCondRace(Race.ERTHEIA, "noErtheia.html");
addCondClassId(ClassId.MARAUDER, "no_quest.html");
addCondCompletedQuest(Q10790_AMercenaryHelper.class.getSimpleName(), "restriction.html");
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = event;
final QuestState qs = getQuestState(player, false);
if (qs == null)
{
return getNoQuestMsg(player);
}
switch (event)
{
case "33847-02.htm":
case "33847-03.htm":
{
break;
}
case "33847-04.htm":
{
qs.startQuest();
break;
}
case "thank":
{
npc.deleteMe();
htmltext = "33993-01.html";
break;
}
default:
{
if (qs.isCond(3))
{
addExpAndSp(player, 16968420, 4072);
giveStoryQuestReward(player, 63);
giveItems(player, EAA, 2);
qs.exitQuest(false, true);
htmltext = "33847-07.html";
break;
}
}
}
return htmltext;
}
@Override
public String onTalk(L2Npc npc, L2PcInstance player)
{
final QuestState qs = getQuestState(player, true);
String htmltext = getNoQuestMsg(player);
switch (qs.getState())
{
case State.CREATED:
{
htmltext = "33847-01.htm";
break;
}
case State.STARTED:
{
if ((qs.getCond() > 0) && (qs.getCond() < 3))
{
htmltext = "33847-05.html";
}
else if (qs.isCond(3))
{
htmltext = "33847-06.html";
}
break;
}
case State.COMPLETED:
{
htmltext = getAlreadyCompletedMsg(player);
break;
}
}
return htmltext;
}
@Override
public String onFirstTalk(L2Npc npc, L2PcInstance player)
{
return "33993.html";
}
@Override
public String onAttack(L2Npc npc, L2PcInstance attacker, int damage, boolean isSummon)
{
if (npc.isScriptValue(0))
{
for (int i = 0; i < 5; i++)
{
final L2Npc creature = addSpawn(NEEDLE_STAKATO, npc.getX() + getRandom(-20, 20), npc.getY() + getRandom(-20, 20), npc.getZ(), npc.getHeading(), true, 120000, false);
addAttackPlayerDesire(creature, attacker);
npc.setScriptValue(1);
}
}
return super.onAttack(npc, attacker, damage, isSummon);
}
@Override
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
final QuestState qs = getQuestState(killer, true);
if ((qs != null) && (qs.getCond() > 0))
{
switch (npc.getId())
{
case SUSPICIOUS_COCOON:
case SUSPICIOUS_COCOON1:
case SUSPICIOUS_COCOON2:
{
int kills = qs.getInt(Integer.toString(SUSPICIOUS_COCOON));
if (kills < 5)
{
kills++;
qs.set(Integer.toString(SUSPICIOUS_COCOON), kills);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
if (kills >= 5)
{
final L2Npc monster = addSpawn(NEEDLE_STAKATO_CAPTAIN, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, 600000, false);
final L2QuestGuardInstance kain = (L2QuestGuardInstance) addSpawn(KAIN_VAN_HALTER, killer.getX() + getRandom(-100, 100), killer.getY() + getRandom(-100, 100), killer.getZ(), 0, true, 300000, false);
kain.setRunning();
kain.setIsInvul(true);
kain.reduceCurrentHp(1, monster, null); // TODO: Find better way for attack
addAttackPlayerDesire(monster, killer);
qs.setCond(2);
}
break;
}
case NEEDLE_STAKATO_CAPTAIN:
{
int kills = qs.getInt(Integer.toString(NEEDLE_STAKATO_CAPTAIN));
if ((kills < 1) && qs.isCond(2))
{
kills++;
qs.set(Integer.toString(NEEDLE_STAKATO_CAPTAIN), kills);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
if (qs.getInt(Integer.toString(NEEDLE_STAKATO_CAPTAIN)) >= 1)
{
qs.setCond(1);
qs.setCond(3, true);
}
break;
}
}
final ExQuestNpcLogList log = new ExQuestNpcLogList(getId());
log.addNpc(SUSPICIOUS_COCOON, qs.getInt(Integer.toString(SUSPICIOUS_COCOON)));
log.addNpc(NEEDLE_STAKATO_CAPTAIN, qs.getInt(Integer.toString(NEEDLE_STAKATO_CAPTAIN)));
qs.getPlayer().sendPacket(log);
}
return super.onKill(npc, killer, isSummon);
}
}

View File

@@ -0,0 +1,3 @@
<html><body>Tracker Dokara:<br>
You are not Ertheia, this quest is not for you.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>You don't meet class requirements<br>
(Quest available for Ertheia Marauder.)
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Tracker Dokara:<br>
You don't meet level requirements<br>
(Quest available from level 65 - 70)
</body></html>

View File

@@ -0,0 +1 @@
<html><body>You are not Marauder class, this quest is not for you.</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Research Pio:<br>
(Quest only available to Ertheia characters Lv. 58-61 who have completed the quest "A Mercenary Helper.")
</body></html>