Addition of Command Post instance.
Contributed by nasseka.
This commit is contained in:
@@ -3,5 +3,5 @@ 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>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Chat 1">"The command post?"</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Chat 0">"I want to go inside command post."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest CommandPost enterInstance">"I want to go inside command post."</Button>
|
||||
</body></html>
|
150
L2J_Mobius_04.0_GrandCrusade/dist/game/data/instances/CommandPost.xml
vendored
Normal file
150
L2J_Mobius_04.0_GrandCrusade/dist/game/data/instances/CommandPost.xml
vendored
Normal file
@@ -0,0 +1,150 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Command Post -->
|
||||
<instance id="259" maxWorlds="100" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
|
||||
<time duration="60" empty="1" />
|
||||
<locations>
|
||||
<enter type="FIXED">
|
||||
<location x="-44031" y="45819" z="-8847" heading="0" /> <!-- Command Post -->
|
||||
</enter>
|
||||
<exit type="ORIGIN" />
|
||||
</locations>
|
||||
<parameters>
|
||||
<param name="firstGroupId" value="18190100" />
|
||||
<param name="secondGroupId" value="18190102" />
|
||||
<param name="thirdGroupId" value="18190104" />
|
||||
<param name="fourthGroupId" value="18190106" />
|
||||
</parameters>
|
||||
<conditions>
|
||||
<condition type="GroupMin">
|
||||
<param name="limit" value="2" />
|
||||
</condition>
|
||||
<condition type="GroupMax">
|
||||
<param name="limit" value="7" />
|
||||
</condition>
|
||||
<condition type="Level">
|
||||
<param name="min" value="100" />
|
||||
<param name="max" value="105" />
|
||||
</condition>
|
||||
<condition type="Distance" />
|
||||
<condition type="Reenter" />
|
||||
</conditions>
|
||||
<reenter apply="ON_FINISH">
|
||||
<reset day="MONDAY" hour="6" minute="30" />
|
||||
<reset day="TUESDAY" hour="6" minute="30" />
|
||||
<reset day="WEDNESDAY" hour="6" minute="30" />
|
||||
<reset day="THURSDAY" hour="6" minute="30" />
|
||||
<reset day="FRIDAY" hour="6" minute="30" />
|
||||
<reset day="SATURDAY" hour="6" minute="30" />
|
||||
<reset day="SUNDAY" hour="6" minute="30" />
|
||||
</reenter>
|
||||
<doorlist>
|
||||
<door id="18190100">
|
||||
<openStatus default="close" />
|
||||
</door>
|
||||
<door id="18190102">
|
||||
<openStatus default="close" />
|
||||
</door>
|
||||
<door id="18190104">
|
||||
<openStatus default="close" />
|
||||
</door>
|
||||
<door id="18190106">
|
||||
<openStatus default="close" />
|
||||
</door>
|
||||
</doorlist>
|
||||
<spawnlist>
|
||||
<group name="first_floor" spawnByDefault="true">
|
||||
<npc id="23595" x="-44354" y="45228" z="-8865" /> <!-- Fortress Raider -->
|
||||
<npc id="23595" x="-44356" y="45129" z="-8865" /> <!-- Fortress Raider -->
|
||||
<npc id="23595" x="-44399" y="45008" z="-8865" /> <!-- Fortress Raider -->
|
||||
<npc id="23595" x="-43720" y="44410" z="-8865" /> <!-- Fortress Raider -->
|
||||
<npc id="23595" x="-43733" y="44508" z="-8865" /> <!-- Fortress Raider -->
|
||||
<npc id="23595" x="-43552" y="45147" z="-8865" /> <!-- Fortress Raider -->
|
||||
<npc id="23595" x="-43531" y="45432" z="-8865" /> <!-- Fortress Raider -->
|
||||
<npc id="23595" x="-43455" y="44121" z="-8865" /> <!-- Fortress Raider -->
|
||||
<npc id="23595" x="-44585" y="44583" z="-8865" /> <!-- Fortress Raider -->
|
||||
<npc id="23595" x="-44050" y="45222" z="-8865" /> <!-- Fortress Raider -->
|
||||
<npc id="23596" x="-44036" y="45281" z="-8865" /> <!-- Fortress Guardian Captain -->
|
||||
<npc id="23596" x="-43947" y="44917" z="-8865" /> <!-- Fortress Guardian Captain -->
|
||||
<npc id="23597" x="-44590" y="45084" z="-8865" /> <!-- Atelia Passionate Soldier -->
|
||||
<npc id="23597" x="-44624" y="45026" z="-8865" /> <!-- Atelia Passionate Soldier -->
|
||||
<npc id="23597" x="-43723" y="45250" z="-8865" /> <!-- Atelia Passionate Soldier -->
|
||||
<npc id="23597" x="-43727" y="45082" z="-8865" /> <!-- Atelia Passionate Soldier -->
|
||||
<npc id="23597" x="-44050" y="45222" z="-8865" /> <!-- Atelia Passionate Soldier -->
|
||||
<npc id="23600" x="-44024" y="44290" z="-8865" /> <!-- Atelia Flame Master -->
|
||||
<npc id="23600" x="-44366" y="44298" z="-8865" /> <!-- Atelia Flame Master -->
|
||||
<npc id="23600" x="-44580" y="44196" z="-8865" /> <!-- Atelia Flame Master -->
|
||||
<npc id="23601" x="-44035" y="44191" z="-8865" /> <!-- Fortress Archon -->
|
||||
<npc id="23598" x="-44024" y="44290" z="-8865" /> <!-- Atelia Elite Captain -->
|
||||
<npc id="23602" x="-43746" y="44111" z="-8865" /> <!-- Atelia High Priest -->
|
||||
<npc id="23509" x="-44050" y="45222" z="-8865" /> <!-- Fortress Dark Wizard -->
|
||||
<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 -->
|
||||
</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"/>
|
||||
</territory>
|
||||
</territories>
|
||||
<npc id="23605" count="1" /> <!-- Brainwashed Aden Elite Knight -->
|
||||
<npc id="23606" count="3" /> <!-- Brainwashed Aden Elite Warrior -->
|
||||
<npc id="23607" count="1" /> <!-- Brainwashed Aden Elite Archer -->
|
||||
<npc id="23608" count="2" /> <!-- Brainwashed Aden Elite Wizard -->
|
||||
</group>
|
||||
<group name="group_2" spawnByDefault="false">
|
||||
<territories>
|
||||
<territory name="group_2" shape="Cylinder" minZ="-8096" maxZ="-8090" rad="10">
|
||||
<node x="-43314" y="44109"/>
|
||||
</territory>
|
||||
</territories>
|
||||
<npc id="23590" count="1" /> <!-- Brainwashed Aden Vanguard Adolph -->
|
||||
<npc id="23591" count="1" /> <!-- Brainwashed Aden Vanguard Barton -->
|
||||
<npc id="23592" count="1" /> <!-- Brainwashed Aden Vanguard Hayuk -->
|
||||
<npc id="23593" count="1" /> <!-- Brainwashed Aden Vanguard Elise -->
|
||||
<npc id="23594" count="1" /> <!-- Brainwashed Aden Vanguard Elryah -->
|
||||
</group>
|
||||
<group name="group_3" spawnByDefault="false">
|
||||
<territories>
|
||||
<territory name="group_3" shape="Cylinder" minZ="-8096" maxZ="-8090" rad="10">
|
||||
<node x="-44739" y="44503"/>
|
||||
</territory>
|
||||
</territories>
|
||||
<npc id="23605" count="1" /> <!-- Brainwashed Aden Elite Knight -->
|
||||
<npc id="23606" count="3" /> <!-- Brainwashed Aden Elite Warrior -->
|
||||
<npc id="23607" count="1" /> <!-- Brainwashed Aden Elite Archer -->
|
||||
<npc id="23608" count="1" /> <!-- Brainwashed Aden Elite Wizard -->
|
||||
</group>
|
||||
<group name="group_4" spawnByDefault="false">
|
||||
<territories>
|
||||
<territory name="group_4" shape="Cylinder" minZ="-8096" maxZ="-8090" rad="10">
|
||||
<node x="-44765" y="44108"/>
|
||||
</territory>
|
||||
</territories>
|
||||
<npc id="23610" count="1" /> <!-- Corrupted High Priest -->
|
||||
<npc id="23612" count="2" /> <!-- Elite Priest -->
|
||||
<npc id="23613" count="1" /> <!-- Elite Instructor -->
|
||||
<npc id="23614" count="1" /> <!-- Elite Executioner -->
|
||||
<npc id="23615" count="2" /> <!-- Elite Shaman -->
|
||||
</group>
|
||||
<group name="adolph" spawnByDefault="false">
|
||||
<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 -->
|
||||
</group>
|
||||
<group name="hayuk" spawnByDefault="false">
|
||||
<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 -->
|
||||
</group>
|
||||
<group name="elryah" spawnByDefault="false">
|
||||
<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 -->
|
||||
</group>
|
||||
</spawnlist>
|
||||
</instance>
|
497
L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/instances/CommandPost/CommandPost.java
vendored
Normal file
497
L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/instances/CommandPost/CommandPost.java
vendored
Normal file
@@ -0,0 +1,497 @@
|
||||
/*
|
||||
* 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.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;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
|
||||
import instances.AbstractInstance;
|
||||
|
||||
/**
|
||||
* @author NasSeKa
|
||||
*/
|
||||
public class CommandPost extends AbstractInstance
|
||||
{
|
||||
// NPCs
|
||||
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;
|
||||
private static final int ELISE = 23593;
|
||||
private static final int ELRYAH = 23594;
|
||||
private static final int[] FIRST_FLOOR =
|
||||
{
|
||||
23595,
|
||||
23596,
|
||||
23597,
|
||||
23600,
|
||||
};
|
||||
private static final int[] GROUP_1 =
|
||||
{
|
||||
23605,
|
||||
23606,
|
||||
23607,
|
||||
23608,
|
||||
};
|
||||
private static final int[] GROUP_2 =
|
||||
{
|
||||
23590,
|
||||
23591,
|
||||
23592,
|
||||
23593,
|
||||
23594,
|
||||
};
|
||||
private static final int[] GROUP_3 =
|
||||
{
|
||||
23605,
|
||||
23606,
|
||||
23607,
|
||||
23608,
|
||||
};
|
||||
private static final int[] GROUP_4 =
|
||||
{
|
||||
23610,
|
||||
23612,
|
||||
23613,
|
||||
23614,
|
||||
23615,
|
||||
};
|
||||
// Items
|
||||
// private static final int EMERGENCY_WHISTLE = 46404;
|
||||
// Location
|
||||
private static final Location FLOOR_2_SPAWN = new Location(-44037, 44009, -8097);
|
||||
private static final Location FLOOR_3_SPAWN = new Location(-44035, 45439, -6971);
|
||||
private static final Location GEORK_FLOOR_2_SPAWN = new Location(-44035, 45365, -8031);
|
||||
private static final Location GROUP_1_MOVE = new Location(-43540, 44519, -8097);
|
||||
private static final Location GROUP_2_MOVE = new Location(-43514, 44116, -8097);
|
||||
private static final Location GROUP_3_MOVE = new Location(-44532, 44510, -8097);
|
||||
private static final Location GROUP_4_MOVE = new Location(-44532, 44109, -8097);
|
||||
private static final Location ADOLPH_MOVE = new Location(-44020, 45085, -8097);
|
||||
private static final Location BARTON_MOVE = new Location(-43922, 44994, -8097);
|
||||
private static final Location HAYUK_MOVE = new Location(-44014, 44998, -8097);
|
||||
private static final Location ELISE_MOVE = new Location(-44120, 44999, -8097);
|
||||
private static final Location ELRYAH_MOVE = new Location(-44072, 45004, -8097);
|
||||
// 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;
|
||||
|
||||
public CommandPost()
|
||||
{
|
||||
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);
|
||||
addMoveFinishedId(GROUP_4);
|
||||
addKillId(GEORK, BURNSTEIN);
|
||||
addInstanceLeaveId(TEMPLATE_ID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, Npc npc, Player player)
|
||||
{
|
||||
if (event.contains("enterInstance"))
|
||||
{
|
||||
final Party party = player.getParty();
|
||||
if (player.isInParty())
|
||||
{
|
||||
final long currentTime = Chronos.currentTimeMillis();
|
||||
|
||||
if (!party.isLeader(player))
|
||||
{
|
||||
player.sendPacket(new SystemMessage(SystemMessageId.ONLY_A_PARTY_LEADER_CAN_MAKE_THE_REQUEST_TO_ENTER));
|
||||
return null;
|
||||
}
|
||||
|
||||
if (player.isInCommandChannel())
|
||||
{
|
||||
player.sendPacket(new SystemMessage(SystemMessageId.YOU_CANNOT_ENTER_BECAUSE_YOU_DO_NOT_MEET_THE_REQUIREMENTS));
|
||||
return null;
|
||||
}
|
||||
|
||||
final List<Player> members = party.getMembers();
|
||||
for (Player member : members)
|
||||
{
|
||||
if (!member.isInsideRadius3D(npc, 1000))
|
||||
{
|
||||
player.sendMessage("Player " + member.getName() + " must go closer to Gatekeeper Spirit.");
|
||||
return null;
|
||||
}
|
||||
|
||||
if (currentTime < InstanceManager.getInstance().getInstanceTime(member, TEMPLATE_ID))
|
||||
{
|
||||
final SystemMessage msg = new SystemMessage(SystemMessageId.YOU_HAVE_ENTERED_ANOTHER_INSTANT_ZONE_THEREFORE_YOU_CANNOT_ENTER_CORRESPONDING_DUNGEON);
|
||||
msg.addString(member.getName());
|
||||
party.broadcastToPartyMembers(member, msg);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
for (Player member : members)
|
||||
{
|
||||
enterInstance(member, npc, TEMPLATE_ID);
|
||||
}
|
||||
}
|
||||
else if (player.isGM())
|
||||
{
|
||||
enterInstance(player, npc, TEMPLATE_ID);
|
||||
}
|
||||
else
|
||||
{
|
||||
player.sendPacket(new SystemMessage(SystemMessageId.YOU_ARE_NOT_CURRENTLY_IN_A_PARTY_SO_YOU_CANNOT_ENTER));
|
||||
}
|
||||
|
||||
if (player.getInstanceWorld() != null)
|
||||
{
|
||||
startQuestTimer("check_status", 3000, null, player);
|
||||
}
|
||||
}
|
||||
else if (event.equals("check_status"))
|
||||
{
|
||||
final Instance world = player.getInstanceWorld();
|
||||
if (!isInInstance(world))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
switch (world.getStatus())
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
world.setStatus(1);
|
||||
world.spawnGroup("geork");
|
||||
if (world.getNpc(GEORK) != null)
|
||||
{
|
||||
world.getNpc(GEORK).setInvul(true);
|
||||
world.getNpc(GEORK).setImmobilized(true);
|
||||
world.getNpc(GEORK).setRandomWalking(false);
|
||||
world.getNpc(GEORK).setTargetable(false);
|
||||
}
|
||||
startQuestTimer("check_status", 3000, null, player);
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
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);
|
||||
for (Npc monster : world.spawnGroup("group_1"))
|
||||
{
|
||||
monster.setInvul(true);
|
||||
monster.setImmobilized(true);
|
||||
monster.setRandomWalking(false);
|
||||
monster.setTargetable(false);
|
||||
monster.setScriptValue(1);
|
||||
}
|
||||
for (Npc monster : world.spawnGroup("group_2"))
|
||||
{
|
||||
monster.setInvul(true);
|
||||
monster.setImmobilized(true);
|
||||
monster.setRandomWalking(false);
|
||||
monster.setTargetable(false);
|
||||
}
|
||||
for (Npc monster : world.spawnGroup("group_3"))
|
||||
{
|
||||
monster.setInvul(true);
|
||||
monster.setImmobilized(true);
|
||||
monster.setRandomWalking(false);
|
||||
monster.setTargetable(false);
|
||||
}
|
||||
for (Npc monster : world.spawnGroup("group_4"))
|
||||
{
|
||||
monster.setInvul(true);
|
||||
monster.setImmobilized(true);
|
||||
monster.setRandomWalking(false);
|
||||
monster.setTargetable(false);
|
||||
}
|
||||
}
|
||||
startQuestTimer("check_status", 3000, null, player);
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
if (!player.isGM())
|
||||
{
|
||||
final Party party = player.getParty();
|
||||
final List<Player> members = party.getMembers();
|
||||
for (Player member : members)
|
||||
{
|
||||
if (FLOOR_1_TP.isInsideZone(member))
|
||||
{
|
||||
member.teleToLocation(FLOOR_2_SPAWN);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (FLOOR_1_TP.isInsideZone(player))
|
||||
{
|
||||
player.teleToLocation(FLOOR_2_SPAWN);
|
||||
}
|
||||
|
||||
startQuestTimer("check_status", 3000, null, player);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
for (Npc monster : world.getNpcsOfGroup("group_1"))
|
||||
{
|
||||
monster.setImmobilized(false);
|
||||
monster.setWalking();
|
||||
monster.getAI().moveTo(GROUP_1_MOVE);
|
||||
}
|
||||
|
||||
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)))
|
||||
{
|
||||
for (Npc monster : world.getNpcsOfGroup("group_2"))
|
||||
{
|
||||
monster.setImmobilized(false);
|
||||
monster.setWalking();
|
||||
monster.getAI().moveTo(GROUP_2_MOVE);
|
||||
}
|
||||
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())
|
||||
{
|
||||
for (Npc monster : world.getNpcsOfGroup("group_3"))
|
||||
{
|
||||
monster.setImmobilized(false);
|
||||
monster.setWalking();
|
||||
monster.getAI().moveTo(GROUP_3_MOVE);
|
||||
}
|
||||
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())
|
||||
{
|
||||
for (Npc monster : world.getNpcsOfGroup("group_4"))
|
||||
{
|
||||
monster.setImmobilized(false);
|
||||
monster.setWalking();
|
||||
monster.getAI().moveTo(GROUP_4_MOVE);
|
||||
}
|
||||
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.");
|
||||
}
|
||||
|
||||
startQuestTimer("check_status", 3000, null, player);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
startQuestTimer("check_status", 3000, null, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMoveFinished(Npc npc)
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
if (world != null)
|
||||
{
|
||||
if (CommonUtil.contains(GROUP_1, npc.getId()))
|
||||
{
|
||||
npc.setInvul(false);
|
||||
npc.setTargetable(true);
|
||||
world.setStatus(4);
|
||||
}
|
||||
else if (CommonUtil.contains(GROUP_2, npc.getId()))
|
||||
{
|
||||
npc.setInvul(false);
|
||||
npc.setTargetable(true);
|
||||
}
|
||||
else if (CommonUtil.contains(GROUP_3, npc.getId()))
|
||||
{
|
||||
npc.setInvul(false);
|
||||
npc.setTargetable(true);
|
||||
}
|
||||
else if (CommonUtil.contains(GROUP_4, npc.getId()))
|
||||
{
|
||||
npc.setInvul(false);
|
||||
npc.setTargetable(true);
|
||||
}
|
||||
}
|
||||
super.onMoveFinished(npc);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onEnterZone(Creature creature, ZoneType zone)
|
||||
{
|
||||
final Instance world = creature.getInstanceWorld();
|
||||
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)
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
if (isInInstance(world))
|
||||
{
|
||||
switch (npc.getId())
|
||||
{
|
||||
case BURNSTEIN:
|
||||
{
|
||||
world.finishInstance();
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
break;
|
||||
}
|
||||
}
|
||||
startQuestTimer("check_status", 3000, null, player);
|
||||
}
|
||||
return super.onKill(npc, player, isPet);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new CommandPost();
|
||||
}
|
||||
}
|
@@ -1158,4 +1158,22 @@
|
||||
<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">
|
||||
<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>
|
Reference in New Issue
Block a user