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,5 @@
<html><body>Darin:<br>
Have you ever woken up one morning to realize how beautiful the world is? As if you've been born again. I feel like that these days.<br>
Say, ever read a book called <font color="LEVEL">The Sorrow of Young Lovers</font> by Gouthe? I definitely recommend it. It will change your life!<br>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Roxxy:<br>
He's very shy, it's true, but someday he'll talk to me.<br>
Oh who is he? He's a very romantic person.<br>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
</body></html>

View File

@@ -0,0 +1,7 @@
<html><body>Mysterious Dark Knight:<br>
Ye bound by the Red Thread of Fate...<br>
So you have been following the pull of your destiny. Lighting Shilen's darkness, breathing life to the dying Mother Tree, filling the emptiness in the Kamaels' hearts... the flame you lit at the Pa'agrio Temple will go on to touch the Orcs with that person's fond heart.<br>
Your part is done. Now return, and march onward toward your destiny.<br>
Do not forget what you have seen here - you shall never see this place again.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10385_RedThreadOfFate 33751-01.html">"Wait, what person?"</Button>
</body></html>

View File

@@ -0,0 +1,143 @@
/*
* 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 instances.TalkingIslandPast;
import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureSee;
import com.l2jmobius.gameserver.model.instancezone.Instance;
import com.l2jmobius.gameserver.model.quest.QuestState;
import com.l2jmobius.gameserver.model.zone.L2ZoneType;
import com.l2jmobius.gameserver.network.NpcStringId;
import com.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
import instances.AbstractInstance;
import quests.Q10385_RedThreadOfFate.Q10385_RedThreadOfFate;
/**
* Talking Island (Past) instance zone.
* @author Gladicek
*/
public final class TalkingIslandPast extends AbstractInstance
{
// NPCs
private static final int DARIN = 33748;
private static final int ROXXY = 33749;
private static final int MYSTERIOUS_DARK_KNIGHT = 33751;
private static final int INVISIBLE_TI_NPC = 18919;
// Misc
private static final int TEMPLATE_ID = 241;
// Location
private static final Location TOWN_TELEPORT = new Location(210799, 13426, -3720);
private static final Location TI_LOC_1 = new Location(210779, 15547, -3732);
private static final Location TI_LOC_2 = new Location(209267, 14943, -3729);
private static final Location TI_LOC_3 = new Location(210332, 13156, -3729);
// Zones
private static final int TALKING_ISLAND_ZONE = 12035;
public TalkingIslandPast()
{
addTalkId(DARIN, ROXXY, MYSTERIOUS_DARK_KNIGHT);
addFirstTalkId(DARIN, ROXXY, MYSTERIOUS_DARK_KNIGHT);
addExitZoneId(TALKING_ISLAND_ZONE);
addSpawnId(INVISIBLE_TI_NPC);
setCreatureSeeId(this::onCreatureSee, INVISIBLE_TI_NPC);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
if (event.equals("enterInstance"))
{
enterInstance(player, npc, TEMPLATE_ID);
}
else if (event.equals("exitInstance"))
{
final Instance world = getPlayerInstance(player);
if (world != null)
{
teleportPlayerOut(player, world);
}
}
return super.onAdvEvent(event, npc, player);
}
@Override
protected void onEnter(L2PcInstance player, Instance instance, boolean firstEnter)
{
final QuestState qs = player.getQuestState(Q10385_RedThreadOfFate.class.getSimpleName());
if ((qs != null) && qs.isCond(21) && (qs.isMemoState(2)))
{
final L2Npc knight = addSpawn(MYSTERIOUS_DARK_KNIGHT, TI_LOC_3, false, 0, false, instance.getId());
knight.getAI().startFollow(player);
knight.setIsRunning(true);
showOnScreenMsg(player, NpcStringId.A_MYSTERIOUS_DARK_KNIGHT_IS_HERE, ExShowScreenMessage.TOP_CENTER, 5000);
getTimers().addTimer("MSG", null, 5000, null, player, n -> showOnScreenMsg(n.getPlayer(), NpcStringId.TALK_TO_THE_MYSTERIOUS_DARK_KNIGHT, ExShowScreenMessage.TOP_CENTER, 5000));
}
super.onEnter(player, instance, firstEnter);
}
@Override
public String onSpawn(L2Npc npc)
{
npc.initSeenCreatures();
return super.onSpawn(npc);
}
@Override
public String onExitZone(L2Character character, L2ZoneType zone)
{
final Instance instance = character.getInstanceWorld();
if ((instance != null) && character.isPlayer())
{
character.teleToLocation(TOWN_TELEPORT);
}
return super.onExitZone(character, zone);
}
public void onCreatureSee(OnCreatureSee event)
{
final L2Character creature = event.getSeen();
final L2Npc npc = (L2Npc) event.getSeer();
if (creature.isPlayer())
{
final Instance instance = creature.getInstanceWorld();
final L2PcInstance player = creature.getActingPlayer();
final QuestState qs = player.getQuestState(Q10385_RedThreadOfFate.class.getSimpleName());
if ((instance != null) && (npc.getId() == INVISIBLE_TI_NPC) && (qs != null) && qs.isCond(21) && qs.isMemoState(1))
{
final Location loc = npc.isInsideRadius(TI_LOC_1, 1000, false, false) ? TI_LOC_1 : TI_LOC_2;
qs.setMemoState(2);
final L2Npc knight = addSpawn(MYSTERIOUS_DARK_KNIGHT, loc, false, 0, false, instance.getId());
knight.getAI().startFollow(player);
knight.setIsRunning(true);
showOnScreenMsg(player, NpcStringId.A_MYSTERIOUS_DARK_KNIGHT_IS_HERE, ExShowScreenMessage.TOP_CENTER, 5000);
getTimers().addTimer("MSG", null, 5000, npc, player, n -> showOnScreenMsg(n.getPlayer(), NpcStringId.TALK_TO_THE_MYSTERIOUS_DARK_KNIGHT, ExShowScreenMessage.TOP_CENTER, 5000));
}
}
}
public static void main(String[] args)
{
new TalkingIslandPast();
}
}