Made Command Post instance available.

This commit is contained in:
MobiusDevelopment
2021-12-23 02:03:04 +00:00
parent 74a110a5cd
commit bbafd95780
60 changed files with 880 additions and 1340 deletions

View File

@@ -1,4 +1,4 @@
<html><body>Truth Scholar Devianne:<br>
<html><body>Truth Seeker Devianne:<br>
The command Post is where the Embryo are training new recruits.<br>
The one in charge there is Commander Burnstein. I hear all kinds of inhumane things are going inside.<br>
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h npc_%objectId%_Chat 0">"Back"</Button>

View File

@@ -1,4 +1,4 @@
<html><body>Truth Scholar Devianne:<br>
<html><body>Truth Seeker Devianne:<br>
Shh! Please be quiet. This is enemy territory.<br>
You don't need to introduce yourself. I've heard of your accomplishments.<br>
If only you could've come sooner... We are waiting for Burnstein to come out of the command post.<br>

View File

@@ -80,12 +80,12 @@
<npc id="23509" x="-44500" y="44173" z="-8865" /> <!-- Fortress Dark Wizard -->
</group>
<group name="geork" spawnByDefault="false">
<npc id="26135" x="-44036" y="43708" z="-8795"/> <!-- Geork -->
<npc id="26135" x="-44036" y="43708" z="-8795" heading="-8100" /> <!-- Geork -->
</group>
<group name="group_1" spawnByDefault="false">
<territories>
<territory name="group_1" shape="Cylinder" minZ="-8096" maxZ="-8090" rad="10">
<node x="-43313" y="44516"/>
<node x="-43313" y="44516" />
</territory>
</territories>
<npc id="23605" count="1" /> <!-- Brainwashed Aden Elite Knight -->
@@ -96,7 +96,7 @@
<group name="group_2" spawnByDefault="false">
<territories>
<territory name="group_2" shape="Cylinder" minZ="-8096" maxZ="-8090" rad="10">
<node x="-43314" y="44109"/>
<node x="-43314" y="44109" />
</territory>
</territories>
<npc id="23590" count="1" /> <!-- Brainwashed Aden Vanguard Adolph -->
@@ -108,7 +108,7 @@
<group name="group_3" spawnByDefault="false">
<territories>
<territory name="group_3" shape="Cylinder" minZ="-8096" maxZ="-8090" rad="10">
<node x="-44739" y="44503"/>
<node x="-44739" y="44503" />
</territory>
</territories>
<npc id="23605" count="1" /> <!-- Brainwashed Aden Elite Knight -->
@@ -119,7 +119,7 @@
<group name="group_4" spawnByDefault="false">
<territories>
<territory name="group_4" shape="Cylinder" minZ="-8096" maxZ="-8090" rad="10">
<node x="-44765" y="44108"/>
<node x="-44765" y="44108" />
</territory>
</territories>
<npc id="23610" count="1" /> <!-- Corrupted High Priest -->
@@ -129,22 +129,22 @@
<npc id="23615" count="2" /> <!-- Elite Shaman -->
</group>
<group name="adolph" spawnByDefault="false">
<npc id="34305" x="-44033" y="44333" z="-6971"/> <!-- Adolph -->
<npc id="34305" x="-44033" y="44333" z="-6971" /> <!-- Adolph -->
</group>
<group name="barton" spawnByDefault="false">
<npc id="34306" x="-44033" y="44333" z="-6971"/> <!-- Barton -->
<npc id="34306" x="-44033" y="44333" z="-6971" /> <!-- Barton -->
</group>
<group name="hayuk" spawnByDefault="false">
<npc id="34307" x="-44033" y="44333" z="-6971"/> <!-- Hayuk -->
<npc id="34307" x="-44033" y="44333" z="-6971" /> <!-- Hayuk -->
</group>
<group name="elise" spawnByDefault="false">
<npc id="34308" x="-44033" y="44333" z="-6971"/> <!-- Elise -->
<npc id="34308" x="-44033" y="44333" z="-6971" /> <!-- Elise -->
</group>
<group name="elryah" spawnByDefault="false">
<npc id="34309" x="-44033" y="44333" z="-6971"/> <!-- Elryah -->
<npc id="34309" x="-44033" y="44333" z="-6971" /> <!-- Elryah -->
</group>
<group name="boss" spawnByDefault="false">
<npc id="26136" x="-44033" y="44333" z="-6971"/> <!-- Burnstein -->
<npc id="26136" x="-44033" y="44333" z="-6971" /> <!-- Burnstein -->
</group>
</spawnlist>
</instance>

View File

@@ -19,17 +19,13 @@ package instances.CommandPost;
import java.util.List;
import org.l2jmobius.commons.util.Chronos;
import org.l2jmobius.commons.util.CommonUtil;
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.Party;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.zone.ZoneId;
import org.l2jmobius.gameserver.model.zone.ZoneType;
import org.l2jmobius.gameserver.model.zone.type.ScriptZone;
import org.l2jmobius.gameserver.network.NpcStringId;
import org.l2jmobius.gameserver.network.SystemMessageId;
@@ -39,7 +35,7 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
import instances.AbstractInstance;
/**
* @author NasSeKa
* @author NasSeKa, Mobius
*/
public class CommandPost extends AbstractInstance
{
@@ -47,10 +43,6 @@ public class CommandPost extends AbstractInstance
private static final int DEVIANNE = 34089;
private static final int GEORK = 26135;
private static final int BURNSTEIN = 26136;
private static final int ELITE_KNIGHT = 23605;
private static final int ELITE_WARRIOR = 23606;
private static final int ELITE_ARCHER = 23607;
private static final int ELITE_WIZARD = 23608;
private static final int ADOLPH = 23590;
private static final int BARTON = 23591;
private static final int HAYUK = 23592;
@@ -111,7 +103,6 @@ public class CommandPost extends AbstractInstance
// Zones
private static final ScriptZone FLOOR_1_TP = ZoneManager.getInstance().getZoneById(25901, ScriptZone.class);
private static final ScriptZone FLOOR_2_TP = ZoneManager.getInstance().getZoneById(25902, ScriptZone.class);
private static final ScriptZone FLOOR_2_START = ZoneManager.getInstance().getZoneById(25903, ScriptZone.class);
// Misc
private static final int TEMPLATE_ID = 259;
@@ -120,7 +111,6 @@ public class CommandPost extends AbstractInstance
super(TEMPLATE_ID);
addStartNpc(DEVIANNE);
addTalkId(DEVIANNE);
addEnterZoneId(FLOOR_1_TP.getId(), FLOOR_2_TP.getId(), FLOOR_2_START.getId());
addMoveFinishedId(GROUP_1);
addMoveFinishedId(GROUP_2);
addMoveFinishedId(GROUP_3);
@@ -220,8 +210,8 @@ public class CommandPost extends AbstractInstance
if (world.getAliveNpcs(FIRST_FLOOR).isEmpty())
{
showOnScreenMsg(world, NpcStringId.THE_TELEPORT_GATE_TO_THE_2ND_FLOOR_HAS_BEEN_ACTIVATED, ExShowScreenMessage.TOP_CENTER, 2000, true);
world.setStatus(2);
world.getNpc(GEORK).teleToLocation(GEORK_FLOOR_2_SPAWN);
world.setStatus(2);
for (Npc monster : world.spawnGroup("group_1"))
{
monster.setInvul(true);
@@ -257,23 +247,25 @@ public class CommandPost extends AbstractInstance
}
case 2:
{
if (!player.isGM())
int teleported = world.getParameters().getInt("TELEPORTED", 0);
for (Player member : world.getPlayers())
{
final Party party = player.getParty();
final List<Player> members = party.getMembers();
for (Player member : members)
if (!member.isTeleporting() && FLOOR_1_TP.isInsideZone(member))
{
if (FLOOR_1_TP.isInsideZone(member))
{
member.teleToLocation(FLOOR_2_SPAWN);
}
member.teleToLocation(FLOOR_2_SPAWN);
teleported++;
}
}
else if (FLOOR_1_TP.isInsideZone(player))
if (teleported == world.getPlayersCount())
{
player.teleToLocation(FLOOR_2_SPAWN);
world.setStatus(3);
world.setParameter("TELEPORTED", 0);
world.openCloseDoor(world.getTemplateParameters().getInt("firstGroupId"), true);
}
else
{
world.setParameter("TELEPORTED", teleported);
}
startQuestTimer("check_status", 3000, null, player);
break;
}
@@ -285,17 +277,13 @@ public class CommandPost extends AbstractInstance
monster.setWalking();
monster.getAI().moveTo(GROUP_1_MOVE);
}
world.setStatus(4);
startQuestTimer("check_status", 3000, null, player);
break;
}
case 4:
{
if ((world.getStatus() == 4) && //
(!world.getNpc(ELITE_KNIGHT).isInsideZone(ZoneId.SCRIPT)) && //
(!world.getNpc(ELITE_WARRIOR).isInsideZone(ZoneId.SCRIPT)) && //
(!world.getNpc(ELITE_ARCHER).isInsideZone(ZoneId.SCRIPT)) && //
(!world.getNpc(ELITE_WIZARD).isInsideZone(ZoneId.SCRIPT)))
if (world.getAliveNpcs().size() == 19)
{
for (Npc monster : world.getNpcsOfGroup("group_2"))
{
@@ -306,13 +294,12 @@ public class CommandPost extends AbstractInstance
world.openCloseDoor(world.getTemplateParameters().getInt("secondGroupId"), true);
world.setStatus(5);
}
startQuestTimer("check_status", 3000, null, player);
break;
}
case 5:
{
if (world.getAliveNpcs(GROUP_2).isEmpty())
if (world.getAliveNpcs().size() == 14)
{
for (Npc monster : world.getNpcsOfGroup("group_3"))
{
@@ -323,13 +310,12 @@ public class CommandPost extends AbstractInstance
world.openCloseDoor(world.getTemplateParameters().getInt("thirdGroupId"), true);
world.setStatus(6);
}
startQuestTimer("check_status", 3000, null, player);
break;
}
case 6:
{
if (world.getAliveNpcs(GROUP_3).isEmpty())
if (world.getAliveNpcs().size() == 8)
{
for (Npc monster : world.getNpcsOfGroup("group_4"))
{
@@ -340,23 +326,43 @@ public class CommandPost extends AbstractInstance
world.openCloseDoor(world.getTemplateParameters().getInt("fourthGroupId"), true);
world.setStatus(7);
}
startQuestTimer("check_status", 3000, null, player);
break;
}
case 7:
{
// if (world.getAliveNpcs(GROUP_4).isEmpty())
// {
// System.out.println("Status is 7.");
// }
if (world.getAliveNpcs().size() == 1)
{
showOnScreenMsg(world, NpcStringId.THE_TELEPORT_GATE_TO_THE_3RD_FLOOR_HAS_BEEN_ACTIVATED, ExShowScreenMessage.TOP_CENTER, 2000, true);
world.getNpc(GEORK).deleteMe();
world.setStatus(8);
}
startQuestTimer("check_status", 3000, null, player);
break;
}
default:
case 8:
{
int teleported = world.getParameters().getInt("TELEPORTED", 0);
for (Player member : world.getPlayers())
{
if (!member.isTeleporting() && FLOOR_2_TP.isInsideZone(member))
{
member.teleToLocation(FLOOR_3_SPAWN);
teleported++;
}
}
if (teleported == world.getPlayersCount())
{
world.setStatus(9);
world.spawnGroup("boss");
world.setParameter("TELEPORTED", 0);
}
else
{
world.setParameter("TELEPORTED", teleported);
}
startQuestTimer("check_status", 3000, null, player);
break;
}
}
break;
@@ -369,56 +375,14 @@ public class CommandPost extends AbstractInstance
public void onMoveFinished(Npc npc)
{
final Instance world = npc.getInstanceWorld();
if (world != null)
if (isInInstance(world))
{
npc.setInvul(false);
npc.setTargetable(true);
if (CommonUtil.contains(GROUP_1, npc.getId()))
{
world.setStatus(4);
}
}
super.onMoveFinished(npc);
}
@Override
public String onEnterZone(Creature creature, ZoneType zone)
{
final Instance world = creature.getInstanceWorld();
if (world != null)
{
switch (zone.getId())
{
case 25901:
{
if (creature.isPlayer() && isInInstance(world) && (world.getStatus() >= 2))
{
creature.teleToLocation(FLOOR_2_SPAWN);
}
break;
}
case 25902:
{
if (creature.isPlayer() && isInInstance(world) && (world.getStatus() >= 3))
{
creature.teleToLocation(FLOOR_3_SPAWN);
}
break;
}
case 25903:
{
if (creature.isPlayer() && isInInstance(world) && (world.getStatus() == 2))
{
world.setStatus(3);
world.openCloseDoor(world.getTemplateParameters().getInt("firstGroupId"), true);
}
break;
}
}
}
return super.onEnterZone(creature, zone);
}
@Override
public String onKill(Npc npc, Player player, boolean isPet)
{
@@ -430,51 +394,52 @@ public class CommandPost extends AbstractInstance
case BURNSTEIN:
{
world.finishInstance();
showOnScreenMsg(world, NpcStringId.YOU_VE_SUCCESSFULLY_ATTACKED_THE_COMMAND_POST_AND_DEFEATED_COMMANDER_BURNSTEIN, ExShowScreenMessage.TOP_CENTER, 10000, true);
break;
}
case ADOLPH:
{
world.spawnGroup("adolph");
world.getNpc(ADOLPH).setInvul(true);
world.getNpc(ADOLPH).setRandomWalking(false);
world.getNpc(ADOLPH).setTargetable(false);
addMoveToDesire(world.getNpc(ADOLPH), ADOLPH_MOVE, 6);
final Npc adolph = world.spawnGroup("adolph").stream().findFirst().get();
adolph.setInvul(true);
adolph.setRandomWalking(false);
adolph.setTargetable(false);
addMoveToDesire(adolph, ADOLPH_MOVE, 6);
break;
}
case BARTON:
{
world.spawnGroup("barton");
world.getNpc(BARTON).setInvul(true);
world.getNpc(BARTON).setRandomWalking(false);
world.getNpc(BARTON).setTargetable(false);
addMoveToDesire(world.getNpc(BARTON), BARTON_MOVE, 6);
final Npc barton = world.spawnGroup("barton").stream().findFirst().get();
barton.setInvul(true);
barton.setRandomWalking(false);
barton.setTargetable(false);
addMoveToDesire(barton, BARTON_MOVE, 6);
break;
}
case HAYUK:
{
world.spawnGroup("hayuk");
world.getNpc(HAYUK).setInvul(true);
world.getNpc(HAYUK).setRandomWalking(false);
world.getNpc(HAYUK).setTargetable(false);
addMoveToDesire(world.getNpc(HAYUK), HAYUK_MOVE, 6);
final Npc hayuk = world.spawnGroup("hayuk").stream().findFirst().get();
hayuk.setInvul(true);
hayuk.setRandomWalking(false);
hayuk.setTargetable(false);
addMoveToDesire(hayuk, HAYUK_MOVE, 6);
break;
}
case ELISE:
{
world.spawnGroup("elise");
world.getNpc(ELISE).setInvul(true);
world.getNpc(ELISE).setRandomWalking(false);
world.getNpc(ELISE).setTargetable(false);
addMoveToDesire(world.getNpc(ELISE), ELISE_MOVE, 6);
final Npc elise = world.spawnGroup("elise").stream().findFirst().get();
elise.setInvul(true);
elise.setRandomWalking(false);
elise.setTargetable(false);
addMoveToDesire(elise, ELISE_MOVE, 6);
break;
}
case ELRYAH:
{
world.spawnGroup("elryah");
world.getNpc(ELRYAH).setInvul(true);
world.getNpc(ELRYAH).setRandomWalking(false);
world.getNpc(ELRYAH).setTargetable(false);
addMoveToDesire(world.getNpc(ELRYAH), ELRYAH_MOVE, 6);
final Npc elryah = world.spawnGroup("elryah").stream().findFirst().get();
elryah.setInvul(true);
elryah.setRandomWalking(false);
elryah.setTargetable(false);
addMoveToDesire(elryah, ELRYAH_MOVE, 6);
break;
}
}

View File

@@ -2,6 +2,7 @@
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/spawns.xsd">
<spawn name="AteliaFortress">
<group>
<npc id="34089" x="-50063" y="49439" z="-1695" heading="42326" respawnTime="60sec" /> <!-- Devianne -->
<npc id="23505" x="-47693" y="45333" z="-1632" heading="54492" respawnTime="60sec" /> <!-- Fortress Raider -->
<npc id="23505" x="-47674" y="49213" z="-2400" heading="19214" respawnTime="60sec" /> <!-- Fortress Raider -->
<npc id="23505" x="-47648" y="52896" z="-2400" heading="1297" respawnTime="60sec" /> <!-- Fortress Raider -->

View File

@@ -1158,22 +1158,10 @@
<zone name="Tauti_Scarab_Zone" id="80033" type="ScriptZone" shape="Cylinder" minZ="-9150" maxZ="-9000" rad="550">
<node X="148800" Y="-153125" />
</zone>
<zone name="Command_Post_Floor_1" id="25901" type="ScriptZone" shape="Cylinder" minZ="-8784" maxZ="-8750" rad="100">
<zone name="Command_Post_Floor_1" id="25901" type="ScriptZone" shape="Cylinder" minZ="-8800" maxZ="-8750" rad="100">
<node X="-44036" Y="43258" />
</zone>
<zone name="Command_Post_Floor_2" id="25902" type="ScriptZone" shape="Cylinder" minZ="-8100" maxZ="-8000" rad="100">
<node X="-44037" Y="45821" />
</zone>
<zone name="Command_Post_Floor_2_Start" id="25903" type="ScriptZone" shape="Cylinder" minZ="-8100" maxZ="-8050" rad="100">
<node X="-43563" Y="44499" />
</zone>
<zone name="Command_Post_Group_1_Pass" id="25904" type="ScriptZone" shape="NPoly" minZ="-8100" maxZ="-8050">
<node X="-44604" Y="43589" />
<node X="-44039" Y="43082" />
<node X="-43398" Y="43524" />
<node X="-43286" Y="44573" />
<node X="-43567" Y="45499" />
<node X="-44015" Y="46009" />
<node X="-44945" Y="45667" />
</zone>
</list>