Merged with released L2J-Unity files.

This commit is contained in:
mobiusdev
2016-06-12 01:34:09 +00:00
parent e003e87887
commit 635557f5da
18352 changed files with 3245113 additions and 2892959 deletions

View File

@@ -0,0 +1,4 @@
<html><body>Shuvann:<br>
Capable warriors are hard to come by these days, let alone capable AND trustworthy.<br>
(This quest is only for Ertheia characters.)
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Shuvann:<br>
They don't call this place "the Fields of Massacre" for nothing. Run far away from this area, until you have more experience.<br>
(This quest is for characters Lv. 61 or above who have completed the quest "Resident Problem Solver.")
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Shuvann:<br>
I remember now. Sorry to have kept you waiting.<br>
What I found was a part of a device to be exact. I came across it while watching the Embryo...<br>
<Button ALIGN=LEFT ICON="Normal" action="bypass -h Quest Q10787_ASpyMission 33867-03.htm">"The Embryo come here, too?"</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Shuvann:<br>
Yes. More Embryo have been coming here, so I kept my eyes on them. Embryo showing up was never a good sign in the past.<br>
This time, they had a device I had never seen before.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10787_ASpyMission 33867-04.htm">"Tell me about the device."</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Shuvann:<br>
In fact, the device didn't seem to be in sound condition. Embryo panicked, which is why I was able to pick up on their identity. Had they been like their usual selves, I would have thought that they were just passing adventurers.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10787_ASpyMission 33867-05.htm">"What happened then?"</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Shuvann:<br>
I don't know the details because I couldn't get close. But they gathered with the device, looked confused, and disappeared.<br>
It happened near a box. Go see the <font color="LEVEL">Suspicious Box</font> over <font color="LEVEL">there</font>. The Embryo stayed there for a while. Occasionally, people who seemed like Embryo came to the box. I'm sure you can find something there.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Shuvann:<br>
I've seen Embryo gathering around the Suspicious Box over there. Go look for the box.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Shuvann:<br>
Did you investigate the box?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10787_ASpyMission 33867-08.html">"I did."</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Shuvann:<br>
This is the message Embryo send each other.<br>
You didn't get what you wanted, but at least now we know that Embryo cannot use the device you were looking for.<br>
Since you helped me so much this time, I will tell you later when I have something.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Suspicious Box:<br>
(The box is locked, but it can be forced open for an investigation.)<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10787_ASpyMission 33994-02.html">"Let's see what's inside."</Button>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Suspicious Box:<br>
(Nothing special inside. Nothing in this box is useful.)
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Suspicious Box:<br>
(Found Embryo message in the box. This could be useful.)
</body></html>

View File

@@ -0,0 +1,158 @@
/*
* 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.Q10787_ASpyMission;
import com.l2jmobius.gameserver.enums.Race;
import com.l2jmobius.gameserver.model.L2World;
import com.l2jmobius.gameserver.model.StatsSet;
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 quests.Q10786_ResidentProblemSolver.Q10786_ResidentProblemSolver;
/**
* A Spy Mission (10787)
* @author malyelfik
*/
public final class Q10787_ASpyMission extends Quest
{
// NPCs
private static final int SHUVANN = 33867;
private static final int SUSPICIOUS_BOX = 33994;
// Monster
private static final int EMBRYO_PURIFIER = 27540;
// Items
private static final int ENCHANT_ARMOR_A = 26351;
private static final int EMBRYO_MISSIVES = 39724;
// Misc
private static final int MIN_LEVEL = 61;
private static final int MAX_LEVEL = 65;
private static final int ITEMGET_CHANCE = 30;
public Q10787_ASpyMission()
{
super(10787);
addStartNpc(SHUVANN);
addTalkId(SHUVANN, SUSPICIOUS_BOX);
addCondRace(Race.ERTHEIA, "33867-00.html");
addCondLevel(MIN_LEVEL, MAX_LEVEL, "33867-01.htm");
addCondCompletedQuest(Q10786_ResidentProblemSolver.class.getSimpleName(), "33867-01.htm");
registerQuestItems(EMBRYO_MISSIVES);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
final QuestState qs = getQuestState(player, false);
if (qs == null)
{
return null;
}
String htmltext = event;
switch (event)
{
case "33867-03.htm":
case "33867-04.htm":
break;
case "33867-05.htm":
qs.startQuest();
break;
case "33994-02.html":
{
if (qs.isCond(1))
{
if (getRandom(100) < ITEMGET_CHANCE)
{
giveItems(player, EMBRYO_MISSIVES, 1);
qs.setCond(2, true);
htmltext = "33994-03.html";
}
// @formatter:off
L2World.getInstance().getVisibleObjects(npc, L2Npc.class, 150).stream()
.filter(n -> (n.getId() == EMBRYO_PURIFIER))
.forEach(mob -> addAttackPlayerDesire(mob, player));
// @formatter:on
getTimers().addTimer("DESPAWN", 1000, npc, null);
}
break;
}
case "33867-08.html":
{
if (qs.isCond(2))
{
giveItems(player, ENCHANT_ARMOR_A, 5);
giveStoryQuestReward(player, 29);
if (player.getLevel() >= MIN_LEVEL)
{
addExpAndSp(player, 3125586, 750);
}
qs.exitQuest(false, true);
}
break;
}
default:
htmltext = null;
}
return htmltext;
}
@Override
public String onTalk(L2Npc npc, L2PcInstance player)
{
final QuestState qs = getQuestState(player, true);
String htmltext = getNoQuestMsg(player);
if (npc.getId() == SHUVANN)
{
switch (qs.getState())
{
case State.CREATED:
htmltext = "33867-02.htm";
break;
case State.STARTED:
htmltext = (qs.isCond(1)) ? "33867-06.html" : "33867-07.html";
break;
case State.COMPLETED:
htmltext = getAlreadyCompletedMsg(player);
break;
}
}
else if (qs.isStarted() && qs.isCond(1))
{
htmltext = "33994-01.html";
}
return htmltext;
}
@Override
public void onTimerEvent(String event, StatsSet params, L2Npc npc, L2PcInstance player)
{
if ((npc != null) && (npc.getId() == SUSPICIOUS_BOX) && event.equals("DESPAWN"))
{
npc.deleteMe();
}
else
{
super.onTimerEvent(event, params, npc, player);
}
}
}