Addition of Camille instance.
Contributed by Sero.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<html><body>Erda:<br>
|
||||
Thank you. Without your help, we couldn't have won easily.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Chat 0"><font color="LEVEL">"I want to enter Outer Messiah's Castle."</font></Button>
|
||||
<Button ALIGN=LEFT ICON="TELEPORT" action="bypass -h Quest Erda tp_inner"><font color="LEVEL">"I want to enter Inner Messiah's Castle."</font></Button>
|
||||
<Button ALIGN=LEFT ICON="TELEPORT" action="bypass -h Quest Camille enterInstance"><font color="LEVEL">"I want to enter Inner Messiah's Castle."</font></Button>
|
||||
<Button ALIGN=LEFT ICON="TELEPORT" action="bypass -h Quest Erda teleport"><font color="LEVEL">"Please open the way to Etinah Great Temple."</font></Button>
|
||||
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
|
||||
</body></html>
|
4
L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/ai/bosses/Camille/34324.html
vendored
Normal file
4
L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/ai/bosses/Camille/34324.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Transporter:<br>
|
||||
This device sends you up.
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Camille teleup">Enter the Inner Messiah Castle</Button>
|
||||
</body></html>
|
121
L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/ai/bosses/Camille/Camille.java
vendored
Normal file
121
L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/ai/bosses/Camille/Camille.java
vendored
Normal file
@@ -0,0 +1,121 @@
|
||||
/*
|
||||
* 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 ai.bosses.Camille;
|
||||
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.DoorInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.instancezone.Instance;
|
||||
|
||||
import instances.AbstractInstance;
|
||||
|
||||
/**
|
||||
* Camille instance zone.
|
||||
* @author Sero
|
||||
* @URL https://www.youtube.com/watch?v=jpv9S_xQVrA
|
||||
*/
|
||||
public class Camille extends AbstractInstance
|
||||
{
|
||||
// NPCs
|
||||
private static final int CAMILLE = 26236;
|
||||
private static final int MAMUT = 26243;
|
||||
private static final int ISBURG = 26244;
|
||||
private static final int TRANSMISSION_UNIT = 34324;
|
||||
private static final int ERDA = 34319;
|
||||
// Locations
|
||||
private static final Location ENTER_LOCATION = new Location(-245768, 147832, 4662);
|
||||
private static final Location TELEPORTER_LOCATION = new Location(-245752, 151112, 4662);
|
||||
private static final Location CAMILLE_LOCATION = new Location(-245752, 150392, 11845);
|
||||
// Misc
|
||||
private static final int TEMPLATE_ID = 266;
|
||||
|
||||
public Camille()
|
||||
{
|
||||
super(TEMPLATE_ID);
|
||||
addStartNpc(ERDA);
|
||||
addTalkId(ERDA, TRANSMISSION_UNIT);
|
||||
addFirstTalkId(TRANSMISSION_UNIT);
|
||||
addKillId(CAMILLE, MAMUT, ISBURG);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
|
||||
{
|
||||
switch (event)
|
||||
{
|
||||
case "enterInstance":
|
||||
{
|
||||
enterInstance(player, npc, TEMPLATE_ID);
|
||||
final Instance world = player.getInstanceWorld();
|
||||
if (isInInstance(world))
|
||||
{
|
||||
world.getPlayers().forEach(p -> p.teleToLocation(ENTER_LOCATION));
|
||||
world.getDoors().forEach(DoorInstance::closeMe);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "teleup":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
if (isInInstance(world) && (npc.getId() == TRANSMISSION_UNIT))
|
||||
{
|
||||
world.getPlayers().forEach(p -> p.teleToLocation(CAMILLE_LOCATION));
|
||||
world.getDoors().forEach(DoorInstance::closeMe);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onKill(Npc npc, PlayerInstance player, boolean isSummon)
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
if (isInInstance(world))
|
||||
{
|
||||
switch (npc.getId())
|
||||
{
|
||||
case MAMUT:
|
||||
{
|
||||
world.openCloseDoor(world.getTemplateParameters().getInt("firstDoorId"), true);
|
||||
world.openCloseDoor(world.getTemplateParameters().getInt("secondDoorId"), true);
|
||||
world.setReenterTime();
|
||||
break;
|
||||
}
|
||||
case ISBURG:
|
||||
{
|
||||
addSpawn(TRANSMISSION_UNIT, TELEPORTER_LOCATION, false, 0, false, world.getId());
|
||||
world.setReenterTime();
|
||||
break;
|
||||
}
|
||||
case CAMILLE:
|
||||
{
|
||||
world.finishInstance();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return super.onKill(npc, player, isSummon);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new Camille();
|
||||
}
|
||||
}
|
3
L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/ai/bosses/Camille/condNoParty.html
vendored
Normal file
3
L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/ai/bosses/Camille/condNoParty.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Crystal Prison Entrance Portal:<br>
|
||||
You must be in a party to enter.
|
||||
</body></html>
|
3
L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/ai/bosses/Camille/condNoPartyLeader.html
vendored
Normal file
3
L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/ai/bosses/Camille/condNoPartyLeader.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Crystal Prison Entrance Portal:<br>
|
||||
The leader of the party should try to enter.
|
||||
</body></html>
|
Reference in New Issue
Block a user