Improved Command Post walker behavior.
This commit is contained in:
parent
bbafd95780
commit
a43abc7c56
@ -19,10 +19,12 @@ package instances.CommandPost;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.l2jmobius.commons.util.Chronos;
|
import org.l2jmobius.commons.util.Chronos;
|
||||||
|
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||||
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||||
import org.l2jmobius.gameserver.model.Location;
|
import org.l2jmobius.gameserver.model.Location;
|
||||||
import org.l2jmobius.gameserver.model.Party;
|
import org.l2jmobius.gameserver.model.Party;
|
||||||
|
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||||
import org.l2jmobius.gameserver.model.actor.Player;
|
import org.l2jmobius.gameserver.model.actor.Player;
|
||||||
import org.l2jmobius.gameserver.model.instancezone.Instance;
|
import org.l2jmobius.gameserver.model.instancezone.Instance;
|
||||||
@ -50,40 +52,27 @@ public class CommandPost extends AbstractInstance
|
|||||||
private static final int ELRYAH = 23594;
|
private static final int ELRYAH = 23594;
|
||||||
private static final int[] FIRST_FLOOR =
|
private static final int[] FIRST_FLOOR =
|
||||||
{
|
{
|
||||||
23595,
|
23595, // Fortress Raider
|
||||||
23596,
|
23596, // Fortress Guardian Captain
|
||||||
23597,
|
23597, // Atelia Passionate Soldier
|
||||||
23600,
|
23600, // Atelia Flame Master
|
||||||
};
|
};
|
||||||
private static final int[] GROUP_1 =
|
private static final int[] WALKING_MONSTERS =
|
||||||
{
|
{
|
||||||
23605,
|
23590, // Adolph - Brainwashed Aden Vanguard
|
||||||
23606,
|
23591, // Barton - Brainwashed Aden Vanguard
|
||||||
23607,
|
23592, // Hayuk - Brainwashed Aden Vanguard
|
||||||
23608,
|
23593, // Elise - Brainwashed Aden Vanguard
|
||||||
};
|
23594, // Eliyah - Brainwashed Aden Vanguard
|
||||||
private static final int[] GROUP_2 =
|
23605, // Aden Elite Knight - Brainwashed
|
||||||
{
|
23606, // Aden Elite Warrior - Brainwashed
|
||||||
23590,
|
23607, // Aden Elite Archer - Brainwashed
|
||||||
23591,
|
23608, // Aden Elite Wizard - Brainwashed
|
||||||
23592,
|
23610, // Corrupted High Priest - Embryo
|
||||||
23593,
|
23612, // Elite Priest - Embryo
|
||||||
23594,
|
23613, // Elite Instructor - Embryo
|
||||||
};
|
23614, // Elite Executioner - Embryo
|
||||||
private static final int[] GROUP_3 =
|
23615, // Elite Shaman - Embryo
|
||||||
{
|
|
||||||
23605,
|
|
||||||
23606,
|
|
||||||
23607,
|
|
||||||
23608,
|
|
||||||
};
|
|
||||||
private static final int[] GROUP_4 =
|
|
||||||
{
|
|
||||||
23610,
|
|
||||||
23612,
|
|
||||||
23613,
|
|
||||||
23614,
|
|
||||||
23615,
|
|
||||||
};
|
};
|
||||||
// Items
|
// Items
|
||||||
// private static final int EMERGENCY_WHISTLE = 46404;
|
// private static final int EMERGENCY_WHISTLE = 46404;
|
||||||
@ -111,11 +100,8 @@ public class CommandPost extends AbstractInstance
|
|||||||
super(TEMPLATE_ID);
|
super(TEMPLATE_ID);
|
||||||
addStartNpc(DEVIANNE);
|
addStartNpc(DEVIANNE);
|
||||||
addTalkId(DEVIANNE);
|
addTalkId(DEVIANNE);
|
||||||
addMoveFinishedId(GROUP_1);
|
addMoveFinishedId(WALKING_MONSTERS);
|
||||||
addMoveFinishedId(GROUP_2);
|
addKillId(BURNSTEIN);
|
||||||
addMoveFinishedId(GROUP_3);
|
|
||||||
addMoveFinishedId(GROUP_4);
|
|
||||||
addKillId(GEORK, BURNSTEIN);
|
|
||||||
addInstanceLeaveId(TEMPLATE_ID);
|
addInstanceLeaveId(TEMPLATE_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -379,6 +365,25 @@ public class CommandPost extends AbstractInstance
|
|||||||
{
|
{
|
||||||
npc.setInvul(false);
|
npc.setInvul(false);
|
||||||
npc.setTargetable(true);
|
npc.setTargetable(true);
|
||||||
|
|
||||||
|
double minDistance = Double.MAX_VALUE;
|
||||||
|
Player target = null;
|
||||||
|
for (Player player : world.getPlayers())
|
||||||
|
{
|
||||||
|
final double distance = player.calculateDistance2D(npc);
|
||||||
|
if (distance < minDistance)
|
||||||
|
{
|
||||||
|
target = player;
|
||||||
|
minDistance = distance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (target != null)
|
||||||
|
{
|
||||||
|
npc.setRunning();
|
||||||
|
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);
|
||||||
|
((Attackable) npc).addDamageHate(target, 1, 999);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
super.onMoveFinished(npc);
|
super.onMoveFinished(npc);
|
||||||
}
|
}
|
||||||
|
@ -19,10 +19,12 @@ package instances.CommandPost;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.l2jmobius.commons.util.Chronos;
|
import org.l2jmobius.commons.util.Chronos;
|
||||||
|
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||||
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||||
import org.l2jmobius.gameserver.model.Location;
|
import org.l2jmobius.gameserver.model.Location;
|
||||||
import org.l2jmobius.gameserver.model.Party;
|
import org.l2jmobius.gameserver.model.Party;
|
||||||
|
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||||
import org.l2jmobius.gameserver.model.actor.Player;
|
import org.l2jmobius.gameserver.model.actor.Player;
|
||||||
import org.l2jmobius.gameserver.model.instancezone.Instance;
|
import org.l2jmobius.gameserver.model.instancezone.Instance;
|
||||||
@ -50,40 +52,27 @@ public class CommandPost extends AbstractInstance
|
|||||||
private static final int ELRYAH = 23594;
|
private static final int ELRYAH = 23594;
|
||||||
private static final int[] FIRST_FLOOR =
|
private static final int[] FIRST_FLOOR =
|
||||||
{
|
{
|
||||||
23595,
|
23595, // Fortress Raider
|
||||||
23596,
|
23596, // Fortress Guardian Captain
|
||||||
23597,
|
23597, // Atelia Passionate Soldier
|
||||||
23600,
|
23600, // Atelia Flame Master
|
||||||
};
|
};
|
||||||
private static final int[] GROUP_1 =
|
private static final int[] WALKING_MONSTERS =
|
||||||
{
|
{
|
||||||
23605,
|
23590, // Adolph - Brainwashed Aden Vanguard
|
||||||
23606,
|
23591, // Barton - Brainwashed Aden Vanguard
|
||||||
23607,
|
23592, // Hayuk - Brainwashed Aden Vanguard
|
||||||
23608,
|
23593, // Elise - Brainwashed Aden Vanguard
|
||||||
};
|
23594, // Eliyah - Brainwashed Aden Vanguard
|
||||||
private static final int[] GROUP_2 =
|
23605, // Aden Elite Knight - Brainwashed
|
||||||
{
|
23606, // Aden Elite Warrior - Brainwashed
|
||||||
23590,
|
23607, // Aden Elite Archer - Brainwashed
|
||||||
23591,
|
23608, // Aden Elite Wizard - Brainwashed
|
||||||
23592,
|
23610, // Corrupted High Priest - Embryo
|
||||||
23593,
|
23612, // Elite Priest - Embryo
|
||||||
23594,
|
23613, // Elite Instructor - Embryo
|
||||||
};
|
23614, // Elite Executioner - Embryo
|
||||||
private static final int[] GROUP_3 =
|
23615, // Elite Shaman - Embryo
|
||||||
{
|
|
||||||
23605,
|
|
||||||
23606,
|
|
||||||
23607,
|
|
||||||
23608,
|
|
||||||
};
|
|
||||||
private static final int[] GROUP_4 =
|
|
||||||
{
|
|
||||||
23610,
|
|
||||||
23612,
|
|
||||||
23613,
|
|
||||||
23614,
|
|
||||||
23615,
|
|
||||||
};
|
};
|
||||||
// Items
|
// Items
|
||||||
// private static final int EMERGENCY_WHISTLE = 46404;
|
// private static final int EMERGENCY_WHISTLE = 46404;
|
||||||
@ -111,11 +100,8 @@ public class CommandPost extends AbstractInstance
|
|||||||
super(TEMPLATE_ID);
|
super(TEMPLATE_ID);
|
||||||
addStartNpc(DEVIANNE);
|
addStartNpc(DEVIANNE);
|
||||||
addTalkId(DEVIANNE);
|
addTalkId(DEVIANNE);
|
||||||
addMoveFinishedId(GROUP_1);
|
addMoveFinishedId(WALKING_MONSTERS);
|
||||||
addMoveFinishedId(GROUP_2);
|
addKillId(BURNSTEIN);
|
||||||
addMoveFinishedId(GROUP_3);
|
|
||||||
addMoveFinishedId(GROUP_4);
|
|
||||||
addKillId(GEORK, BURNSTEIN);
|
|
||||||
addInstanceLeaveId(TEMPLATE_ID);
|
addInstanceLeaveId(TEMPLATE_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -379,6 +365,25 @@ public class CommandPost extends AbstractInstance
|
|||||||
{
|
{
|
||||||
npc.setInvul(false);
|
npc.setInvul(false);
|
||||||
npc.setTargetable(true);
|
npc.setTargetable(true);
|
||||||
|
|
||||||
|
double minDistance = Double.MAX_VALUE;
|
||||||
|
Player target = null;
|
||||||
|
for (Player player : world.getPlayers())
|
||||||
|
{
|
||||||
|
final double distance = player.calculateDistance2D(npc);
|
||||||
|
if (distance < minDistance)
|
||||||
|
{
|
||||||
|
target = player;
|
||||||
|
minDistance = distance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (target != null)
|
||||||
|
{
|
||||||
|
npc.setRunning();
|
||||||
|
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);
|
||||||
|
((Attackable) npc).addDamageHate(target, 1, 999);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
super.onMoveFinished(npc);
|
super.onMoveFinished(npc);
|
||||||
}
|
}
|
||||||
|
@ -19,10 +19,12 @@ package instances.CommandPost;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.l2jmobius.commons.util.Chronos;
|
import org.l2jmobius.commons.util.Chronos;
|
||||||
|
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||||
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||||
import org.l2jmobius.gameserver.model.Location;
|
import org.l2jmobius.gameserver.model.Location;
|
||||||
import org.l2jmobius.gameserver.model.Party;
|
import org.l2jmobius.gameserver.model.Party;
|
||||||
|
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||||
import org.l2jmobius.gameserver.model.actor.Player;
|
import org.l2jmobius.gameserver.model.actor.Player;
|
||||||
import org.l2jmobius.gameserver.model.instancezone.Instance;
|
import org.l2jmobius.gameserver.model.instancezone.Instance;
|
||||||
@ -50,40 +52,27 @@ public class CommandPost extends AbstractInstance
|
|||||||
private static final int ELRYAH = 23594;
|
private static final int ELRYAH = 23594;
|
||||||
private static final int[] FIRST_FLOOR =
|
private static final int[] FIRST_FLOOR =
|
||||||
{
|
{
|
||||||
23595,
|
23595, // Fortress Raider
|
||||||
23596,
|
23596, // Fortress Guardian Captain
|
||||||
23597,
|
23597, // Atelia Passionate Soldier
|
||||||
23600,
|
23600, // Atelia Flame Master
|
||||||
};
|
};
|
||||||
private static final int[] GROUP_1 =
|
private static final int[] WALKING_MONSTERS =
|
||||||
{
|
{
|
||||||
23605,
|
23590, // Adolph - Brainwashed Aden Vanguard
|
||||||
23606,
|
23591, // Barton - Brainwashed Aden Vanguard
|
||||||
23607,
|
23592, // Hayuk - Brainwashed Aden Vanguard
|
||||||
23608,
|
23593, // Elise - Brainwashed Aden Vanguard
|
||||||
};
|
23594, // Eliyah - Brainwashed Aden Vanguard
|
||||||
private static final int[] GROUP_2 =
|
23605, // Aden Elite Knight - Brainwashed
|
||||||
{
|
23606, // Aden Elite Warrior - Brainwashed
|
||||||
23590,
|
23607, // Aden Elite Archer - Brainwashed
|
||||||
23591,
|
23608, // Aden Elite Wizard - Brainwashed
|
||||||
23592,
|
23610, // Corrupted High Priest - Embryo
|
||||||
23593,
|
23612, // Elite Priest - Embryo
|
||||||
23594,
|
23613, // Elite Instructor - Embryo
|
||||||
};
|
23614, // Elite Executioner - Embryo
|
||||||
private static final int[] GROUP_3 =
|
23615, // Elite Shaman - Embryo
|
||||||
{
|
|
||||||
23605,
|
|
||||||
23606,
|
|
||||||
23607,
|
|
||||||
23608,
|
|
||||||
};
|
|
||||||
private static final int[] GROUP_4 =
|
|
||||||
{
|
|
||||||
23610,
|
|
||||||
23612,
|
|
||||||
23613,
|
|
||||||
23614,
|
|
||||||
23615,
|
|
||||||
};
|
};
|
||||||
// Items
|
// Items
|
||||||
// private static final int EMERGENCY_WHISTLE = 46404;
|
// private static final int EMERGENCY_WHISTLE = 46404;
|
||||||
@ -111,11 +100,8 @@ public class CommandPost extends AbstractInstance
|
|||||||
super(TEMPLATE_ID);
|
super(TEMPLATE_ID);
|
||||||
addStartNpc(DEVIANNE);
|
addStartNpc(DEVIANNE);
|
||||||
addTalkId(DEVIANNE);
|
addTalkId(DEVIANNE);
|
||||||
addMoveFinishedId(GROUP_1);
|
addMoveFinishedId(WALKING_MONSTERS);
|
||||||
addMoveFinishedId(GROUP_2);
|
addKillId(BURNSTEIN);
|
||||||
addMoveFinishedId(GROUP_3);
|
|
||||||
addMoveFinishedId(GROUP_4);
|
|
||||||
addKillId(GEORK, BURNSTEIN);
|
|
||||||
addInstanceLeaveId(TEMPLATE_ID);
|
addInstanceLeaveId(TEMPLATE_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -379,6 +365,25 @@ public class CommandPost extends AbstractInstance
|
|||||||
{
|
{
|
||||||
npc.setInvul(false);
|
npc.setInvul(false);
|
||||||
npc.setTargetable(true);
|
npc.setTargetable(true);
|
||||||
|
|
||||||
|
double minDistance = Double.MAX_VALUE;
|
||||||
|
Player target = null;
|
||||||
|
for (Player player : world.getPlayers())
|
||||||
|
{
|
||||||
|
final double distance = player.calculateDistance2D(npc);
|
||||||
|
if (distance < minDistance)
|
||||||
|
{
|
||||||
|
target = player;
|
||||||
|
minDistance = distance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (target != null)
|
||||||
|
{
|
||||||
|
npc.setRunning();
|
||||||
|
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);
|
||||||
|
((Attackable) npc).addDamageHate(target, 1, 999);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
super.onMoveFinished(npc);
|
super.onMoveFinished(npc);
|
||||||
}
|
}
|
||||||
|
@ -19,10 +19,12 @@ package instances.CommandPost;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.l2jmobius.commons.util.Chronos;
|
import org.l2jmobius.commons.util.Chronos;
|
||||||
|
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||||
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||||
import org.l2jmobius.gameserver.model.Location;
|
import org.l2jmobius.gameserver.model.Location;
|
||||||
import org.l2jmobius.gameserver.model.Party;
|
import org.l2jmobius.gameserver.model.Party;
|
||||||
|
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||||
import org.l2jmobius.gameserver.model.actor.Player;
|
import org.l2jmobius.gameserver.model.actor.Player;
|
||||||
import org.l2jmobius.gameserver.model.instancezone.Instance;
|
import org.l2jmobius.gameserver.model.instancezone.Instance;
|
||||||
@ -50,40 +52,27 @@ public class CommandPost extends AbstractInstance
|
|||||||
private static final int ELRYAH = 23594;
|
private static final int ELRYAH = 23594;
|
||||||
private static final int[] FIRST_FLOOR =
|
private static final int[] FIRST_FLOOR =
|
||||||
{
|
{
|
||||||
23595,
|
23595, // Fortress Raider
|
||||||
23596,
|
23596, // Fortress Guardian Captain
|
||||||
23597,
|
23597, // Atelia Passionate Soldier
|
||||||
23600,
|
23600, // Atelia Flame Master
|
||||||
};
|
};
|
||||||
private static final int[] GROUP_1 =
|
private static final int[] WALKING_MONSTERS =
|
||||||
{
|
{
|
||||||
23605,
|
23590, // Adolph - Brainwashed Aden Vanguard
|
||||||
23606,
|
23591, // Barton - Brainwashed Aden Vanguard
|
||||||
23607,
|
23592, // Hayuk - Brainwashed Aden Vanguard
|
||||||
23608,
|
23593, // Elise - Brainwashed Aden Vanguard
|
||||||
};
|
23594, // Eliyah - Brainwashed Aden Vanguard
|
||||||
private static final int[] GROUP_2 =
|
23605, // Aden Elite Knight - Brainwashed
|
||||||
{
|
23606, // Aden Elite Warrior - Brainwashed
|
||||||
23590,
|
23607, // Aden Elite Archer - Brainwashed
|
||||||
23591,
|
23608, // Aden Elite Wizard - Brainwashed
|
||||||
23592,
|
23610, // Corrupted High Priest - Embryo
|
||||||
23593,
|
23612, // Elite Priest - Embryo
|
||||||
23594,
|
23613, // Elite Instructor - Embryo
|
||||||
};
|
23614, // Elite Executioner - Embryo
|
||||||
private static final int[] GROUP_3 =
|
23615, // Elite Shaman - Embryo
|
||||||
{
|
|
||||||
23605,
|
|
||||||
23606,
|
|
||||||
23607,
|
|
||||||
23608,
|
|
||||||
};
|
|
||||||
private static final int[] GROUP_4 =
|
|
||||||
{
|
|
||||||
23610,
|
|
||||||
23612,
|
|
||||||
23613,
|
|
||||||
23614,
|
|
||||||
23615,
|
|
||||||
};
|
};
|
||||||
// Items
|
// Items
|
||||||
// private static final int EMERGENCY_WHISTLE = 46404;
|
// private static final int EMERGENCY_WHISTLE = 46404;
|
||||||
@ -111,11 +100,8 @@ public class CommandPost extends AbstractInstance
|
|||||||
super(TEMPLATE_ID);
|
super(TEMPLATE_ID);
|
||||||
addStartNpc(DEVIANNE);
|
addStartNpc(DEVIANNE);
|
||||||
addTalkId(DEVIANNE);
|
addTalkId(DEVIANNE);
|
||||||
addMoveFinishedId(GROUP_1);
|
addMoveFinishedId(WALKING_MONSTERS);
|
||||||
addMoveFinishedId(GROUP_2);
|
addKillId(BURNSTEIN);
|
||||||
addMoveFinishedId(GROUP_3);
|
|
||||||
addMoveFinishedId(GROUP_4);
|
|
||||||
addKillId(GEORK, BURNSTEIN);
|
|
||||||
addInstanceLeaveId(TEMPLATE_ID);
|
addInstanceLeaveId(TEMPLATE_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -379,6 +365,25 @@ public class CommandPost extends AbstractInstance
|
|||||||
{
|
{
|
||||||
npc.setInvul(false);
|
npc.setInvul(false);
|
||||||
npc.setTargetable(true);
|
npc.setTargetable(true);
|
||||||
|
|
||||||
|
double minDistance = Double.MAX_VALUE;
|
||||||
|
Player target = null;
|
||||||
|
for (Player player : world.getPlayers())
|
||||||
|
{
|
||||||
|
final double distance = player.calculateDistance2D(npc);
|
||||||
|
if (distance < minDistance)
|
||||||
|
{
|
||||||
|
target = player;
|
||||||
|
minDistance = distance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (target != null)
|
||||||
|
{
|
||||||
|
npc.setRunning();
|
||||||
|
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);
|
||||||
|
((Attackable) npc).addDamageHate(target, 1, 999);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
super.onMoveFinished(npc);
|
super.onMoveFinished(npc);
|
||||||
}
|
}
|
||||||
|
@ -19,10 +19,12 @@ package instances.CommandPost;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.l2jmobius.commons.util.Chronos;
|
import org.l2jmobius.commons.util.Chronos;
|
||||||
|
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||||
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||||
import org.l2jmobius.gameserver.model.Location;
|
import org.l2jmobius.gameserver.model.Location;
|
||||||
import org.l2jmobius.gameserver.model.Party;
|
import org.l2jmobius.gameserver.model.Party;
|
||||||
|
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||||
import org.l2jmobius.gameserver.model.actor.Player;
|
import org.l2jmobius.gameserver.model.actor.Player;
|
||||||
import org.l2jmobius.gameserver.model.instancezone.Instance;
|
import org.l2jmobius.gameserver.model.instancezone.Instance;
|
||||||
@ -50,40 +52,27 @@ public class CommandPost extends AbstractInstance
|
|||||||
private static final int ELRYAH = 23594;
|
private static final int ELRYAH = 23594;
|
||||||
private static final int[] FIRST_FLOOR =
|
private static final int[] FIRST_FLOOR =
|
||||||
{
|
{
|
||||||
23595,
|
23595, // Fortress Raider
|
||||||
23596,
|
23596, // Fortress Guardian Captain
|
||||||
23597,
|
23597, // Atelia Passionate Soldier
|
||||||
23600,
|
23600, // Atelia Flame Master
|
||||||
};
|
};
|
||||||
private static final int[] GROUP_1 =
|
private static final int[] WALKING_MONSTERS =
|
||||||
{
|
{
|
||||||
23605,
|
23590, // Adolph - Brainwashed Aden Vanguard
|
||||||
23606,
|
23591, // Barton - Brainwashed Aden Vanguard
|
||||||
23607,
|
23592, // Hayuk - Brainwashed Aden Vanguard
|
||||||
23608,
|
23593, // Elise - Brainwashed Aden Vanguard
|
||||||
};
|
23594, // Eliyah - Brainwashed Aden Vanguard
|
||||||
private static final int[] GROUP_2 =
|
23605, // Aden Elite Knight - Brainwashed
|
||||||
{
|
23606, // Aden Elite Warrior - Brainwashed
|
||||||
23590,
|
23607, // Aden Elite Archer - Brainwashed
|
||||||
23591,
|
23608, // Aden Elite Wizard - Brainwashed
|
||||||
23592,
|
23610, // Corrupted High Priest - Embryo
|
||||||
23593,
|
23612, // Elite Priest - Embryo
|
||||||
23594,
|
23613, // Elite Instructor - Embryo
|
||||||
};
|
23614, // Elite Executioner - Embryo
|
||||||
private static final int[] GROUP_3 =
|
23615, // Elite Shaman - Embryo
|
||||||
{
|
|
||||||
23605,
|
|
||||||
23606,
|
|
||||||
23607,
|
|
||||||
23608,
|
|
||||||
};
|
|
||||||
private static final int[] GROUP_4 =
|
|
||||||
{
|
|
||||||
23610,
|
|
||||||
23612,
|
|
||||||
23613,
|
|
||||||
23614,
|
|
||||||
23615,
|
|
||||||
};
|
};
|
||||||
// Items
|
// Items
|
||||||
// private static final int EMERGENCY_WHISTLE = 46404;
|
// private static final int EMERGENCY_WHISTLE = 46404;
|
||||||
@ -111,11 +100,8 @@ public class CommandPost extends AbstractInstance
|
|||||||
super(TEMPLATE_ID);
|
super(TEMPLATE_ID);
|
||||||
addStartNpc(DEVIANNE);
|
addStartNpc(DEVIANNE);
|
||||||
addTalkId(DEVIANNE);
|
addTalkId(DEVIANNE);
|
||||||
addMoveFinishedId(GROUP_1);
|
addMoveFinishedId(WALKING_MONSTERS);
|
||||||
addMoveFinishedId(GROUP_2);
|
addKillId(BURNSTEIN);
|
||||||
addMoveFinishedId(GROUP_3);
|
|
||||||
addMoveFinishedId(GROUP_4);
|
|
||||||
addKillId(GEORK, BURNSTEIN);
|
|
||||||
addInstanceLeaveId(TEMPLATE_ID);
|
addInstanceLeaveId(TEMPLATE_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -379,6 +365,25 @@ public class CommandPost extends AbstractInstance
|
|||||||
{
|
{
|
||||||
npc.setInvul(false);
|
npc.setInvul(false);
|
||||||
npc.setTargetable(true);
|
npc.setTargetable(true);
|
||||||
|
|
||||||
|
double minDistance = Double.MAX_VALUE;
|
||||||
|
Player target = null;
|
||||||
|
for (Player player : world.getPlayers())
|
||||||
|
{
|
||||||
|
final double distance = player.calculateDistance2D(npc);
|
||||||
|
if (distance < minDistance)
|
||||||
|
{
|
||||||
|
target = player;
|
||||||
|
minDistance = distance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (target != null)
|
||||||
|
{
|
||||||
|
npc.setRunning();
|
||||||
|
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);
|
||||||
|
((Attackable) npc).addDamageHate(target, 1, 999);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
super.onMoveFinished(npc);
|
super.onMoveFinished(npc);
|
||||||
}
|
}
|
||||||
|
@ -19,10 +19,12 @@ package instances.CommandPost;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.l2jmobius.commons.util.Chronos;
|
import org.l2jmobius.commons.util.Chronos;
|
||||||
|
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||||
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||||
import org.l2jmobius.gameserver.model.Location;
|
import org.l2jmobius.gameserver.model.Location;
|
||||||
import org.l2jmobius.gameserver.model.Party;
|
import org.l2jmobius.gameserver.model.Party;
|
||||||
|
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||||
import org.l2jmobius.gameserver.model.actor.Player;
|
import org.l2jmobius.gameserver.model.actor.Player;
|
||||||
import org.l2jmobius.gameserver.model.instancezone.Instance;
|
import org.l2jmobius.gameserver.model.instancezone.Instance;
|
||||||
@ -50,40 +52,27 @@ public class CommandPost extends AbstractInstance
|
|||||||
private static final int ELRYAH = 23594;
|
private static final int ELRYAH = 23594;
|
||||||
private static final int[] FIRST_FLOOR =
|
private static final int[] FIRST_FLOOR =
|
||||||
{
|
{
|
||||||
23595,
|
23595, // Fortress Raider
|
||||||
23596,
|
23596, // Fortress Guardian Captain
|
||||||
23597,
|
23597, // Atelia Passionate Soldier
|
||||||
23600,
|
23600, // Atelia Flame Master
|
||||||
};
|
};
|
||||||
private static final int[] GROUP_1 =
|
private static final int[] WALKING_MONSTERS =
|
||||||
{
|
{
|
||||||
23605,
|
23590, // Adolph - Brainwashed Aden Vanguard
|
||||||
23606,
|
23591, // Barton - Brainwashed Aden Vanguard
|
||||||
23607,
|
23592, // Hayuk - Brainwashed Aden Vanguard
|
||||||
23608,
|
23593, // Elise - Brainwashed Aden Vanguard
|
||||||
};
|
23594, // Eliyah - Brainwashed Aden Vanguard
|
||||||
private static final int[] GROUP_2 =
|
23605, // Aden Elite Knight - Brainwashed
|
||||||
{
|
23606, // Aden Elite Warrior - Brainwashed
|
||||||
23590,
|
23607, // Aden Elite Archer - Brainwashed
|
||||||
23591,
|
23608, // Aden Elite Wizard - Brainwashed
|
||||||
23592,
|
23610, // Corrupted High Priest - Embryo
|
||||||
23593,
|
23612, // Elite Priest - Embryo
|
||||||
23594,
|
23613, // Elite Instructor - Embryo
|
||||||
};
|
23614, // Elite Executioner - Embryo
|
||||||
private static final int[] GROUP_3 =
|
23615, // Elite Shaman - Embryo
|
||||||
{
|
|
||||||
23605,
|
|
||||||
23606,
|
|
||||||
23607,
|
|
||||||
23608,
|
|
||||||
};
|
|
||||||
private static final int[] GROUP_4 =
|
|
||||||
{
|
|
||||||
23610,
|
|
||||||
23612,
|
|
||||||
23613,
|
|
||||||
23614,
|
|
||||||
23615,
|
|
||||||
};
|
};
|
||||||
// Items
|
// Items
|
||||||
// private static final int EMERGENCY_WHISTLE = 46404;
|
// private static final int EMERGENCY_WHISTLE = 46404;
|
||||||
@ -111,11 +100,8 @@ public class CommandPost extends AbstractInstance
|
|||||||
super(TEMPLATE_ID);
|
super(TEMPLATE_ID);
|
||||||
addStartNpc(DEVIANNE);
|
addStartNpc(DEVIANNE);
|
||||||
addTalkId(DEVIANNE);
|
addTalkId(DEVIANNE);
|
||||||
addMoveFinishedId(GROUP_1);
|
addMoveFinishedId(WALKING_MONSTERS);
|
||||||
addMoveFinishedId(GROUP_2);
|
addKillId(BURNSTEIN);
|
||||||
addMoveFinishedId(GROUP_3);
|
|
||||||
addMoveFinishedId(GROUP_4);
|
|
||||||
addKillId(GEORK, BURNSTEIN);
|
|
||||||
addInstanceLeaveId(TEMPLATE_ID);
|
addInstanceLeaveId(TEMPLATE_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -379,6 +365,25 @@ public class CommandPost extends AbstractInstance
|
|||||||
{
|
{
|
||||||
npc.setInvul(false);
|
npc.setInvul(false);
|
||||||
npc.setTargetable(true);
|
npc.setTargetable(true);
|
||||||
|
|
||||||
|
double minDistance = Double.MAX_VALUE;
|
||||||
|
Player target = null;
|
||||||
|
for (Player player : world.getPlayers())
|
||||||
|
{
|
||||||
|
final double distance = player.calculateDistance2D(npc);
|
||||||
|
if (distance < minDistance)
|
||||||
|
{
|
||||||
|
target = player;
|
||||||
|
minDistance = distance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (target != null)
|
||||||
|
{
|
||||||
|
npc.setRunning();
|
||||||
|
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);
|
||||||
|
((Attackable) npc).addDamageHate(target, 1, 999);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
super.onMoveFinished(npc);
|
super.onMoveFinished(npc);
|
||||||
}
|
}
|
||||||
|
@ -19,10 +19,12 @@ package instances.CommandPost;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.l2jmobius.commons.util.Chronos;
|
import org.l2jmobius.commons.util.Chronos;
|
||||||
|
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||||
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||||
import org.l2jmobius.gameserver.model.Location;
|
import org.l2jmobius.gameserver.model.Location;
|
||||||
import org.l2jmobius.gameserver.model.Party;
|
import org.l2jmobius.gameserver.model.Party;
|
||||||
|
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||||
import org.l2jmobius.gameserver.model.actor.Player;
|
import org.l2jmobius.gameserver.model.actor.Player;
|
||||||
import org.l2jmobius.gameserver.model.instancezone.Instance;
|
import org.l2jmobius.gameserver.model.instancezone.Instance;
|
||||||
@ -50,40 +52,27 @@ public class CommandPost extends AbstractInstance
|
|||||||
private static final int ELRYAH = 23594;
|
private static final int ELRYAH = 23594;
|
||||||
private static final int[] FIRST_FLOOR =
|
private static final int[] FIRST_FLOOR =
|
||||||
{
|
{
|
||||||
23595,
|
23595, // Fortress Raider
|
||||||
23596,
|
23596, // Fortress Guardian Captain
|
||||||
23597,
|
23597, // Atelia Passionate Soldier
|
||||||
23600,
|
23600, // Atelia Flame Master
|
||||||
};
|
};
|
||||||
private static final int[] GROUP_1 =
|
private static final int[] WALKING_MONSTERS =
|
||||||
{
|
{
|
||||||
23605,
|
23590, // Adolph - Brainwashed Aden Vanguard
|
||||||
23606,
|
23591, // Barton - Brainwashed Aden Vanguard
|
||||||
23607,
|
23592, // Hayuk - Brainwashed Aden Vanguard
|
||||||
23608,
|
23593, // Elise - Brainwashed Aden Vanguard
|
||||||
};
|
23594, // Eliyah - Brainwashed Aden Vanguard
|
||||||
private static final int[] GROUP_2 =
|
23605, // Aden Elite Knight - Brainwashed
|
||||||
{
|
23606, // Aden Elite Warrior - Brainwashed
|
||||||
23590,
|
23607, // Aden Elite Archer - Brainwashed
|
||||||
23591,
|
23608, // Aden Elite Wizard - Brainwashed
|
||||||
23592,
|
23610, // Corrupted High Priest - Embryo
|
||||||
23593,
|
23612, // Elite Priest - Embryo
|
||||||
23594,
|
23613, // Elite Instructor - Embryo
|
||||||
};
|
23614, // Elite Executioner - Embryo
|
||||||
private static final int[] GROUP_3 =
|
23615, // Elite Shaman - Embryo
|
||||||
{
|
|
||||||
23605,
|
|
||||||
23606,
|
|
||||||
23607,
|
|
||||||
23608,
|
|
||||||
};
|
|
||||||
private static final int[] GROUP_4 =
|
|
||||||
{
|
|
||||||
23610,
|
|
||||||
23612,
|
|
||||||
23613,
|
|
||||||
23614,
|
|
||||||
23615,
|
|
||||||
};
|
};
|
||||||
// Items
|
// Items
|
||||||
// private static final int EMERGENCY_WHISTLE = 46404;
|
// private static final int EMERGENCY_WHISTLE = 46404;
|
||||||
@ -111,11 +100,8 @@ public class CommandPost extends AbstractInstance
|
|||||||
super(TEMPLATE_ID);
|
super(TEMPLATE_ID);
|
||||||
addStartNpc(DEVIANNE);
|
addStartNpc(DEVIANNE);
|
||||||
addTalkId(DEVIANNE);
|
addTalkId(DEVIANNE);
|
||||||
addMoveFinishedId(GROUP_1);
|
addMoveFinishedId(WALKING_MONSTERS);
|
||||||
addMoveFinishedId(GROUP_2);
|
addKillId(BURNSTEIN);
|
||||||
addMoveFinishedId(GROUP_3);
|
|
||||||
addMoveFinishedId(GROUP_4);
|
|
||||||
addKillId(GEORK, BURNSTEIN);
|
|
||||||
addInstanceLeaveId(TEMPLATE_ID);
|
addInstanceLeaveId(TEMPLATE_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -379,6 +365,25 @@ public class CommandPost extends AbstractInstance
|
|||||||
{
|
{
|
||||||
npc.setInvul(false);
|
npc.setInvul(false);
|
||||||
npc.setTargetable(true);
|
npc.setTargetable(true);
|
||||||
|
|
||||||
|
double minDistance = Double.MAX_VALUE;
|
||||||
|
Player target = null;
|
||||||
|
for (Player player : world.getPlayers())
|
||||||
|
{
|
||||||
|
final double distance = player.calculateDistance2D(npc);
|
||||||
|
if (distance < minDistance)
|
||||||
|
{
|
||||||
|
target = player;
|
||||||
|
minDistance = distance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (target != null)
|
||||||
|
{
|
||||||
|
npc.setRunning();
|
||||||
|
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);
|
||||||
|
((Attackable) npc).addDamageHate(target, 1, 999);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
super.onMoveFinished(npc);
|
super.onMoveFinished(npc);
|
||||||
}
|
}
|
||||||
|
@ -19,10 +19,12 @@ package instances.CommandPost;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.l2jmobius.commons.util.Chronos;
|
import org.l2jmobius.commons.util.Chronos;
|
||||||
|
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||||
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||||
import org.l2jmobius.gameserver.model.Location;
|
import org.l2jmobius.gameserver.model.Location;
|
||||||
import org.l2jmobius.gameserver.model.Party;
|
import org.l2jmobius.gameserver.model.Party;
|
||||||
|
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||||
import org.l2jmobius.gameserver.model.actor.Player;
|
import org.l2jmobius.gameserver.model.actor.Player;
|
||||||
import org.l2jmobius.gameserver.model.instancezone.Instance;
|
import org.l2jmobius.gameserver.model.instancezone.Instance;
|
||||||
@ -50,40 +52,27 @@ public class CommandPost extends AbstractInstance
|
|||||||
private static final int ELRYAH = 23594;
|
private static final int ELRYAH = 23594;
|
||||||
private static final int[] FIRST_FLOOR =
|
private static final int[] FIRST_FLOOR =
|
||||||
{
|
{
|
||||||
23595,
|
23595, // Fortress Raider
|
||||||
23596,
|
23596, // Fortress Guardian Captain
|
||||||
23597,
|
23597, // Atelia Passionate Soldier
|
||||||
23600,
|
23600, // Atelia Flame Master
|
||||||
};
|
};
|
||||||
private static final int[] GROUP_1 =
|
private static final int[] WALKING_MONSTERS =
|
||||||
{
|
{
|
||||||
23605,
|
23590, // Adolph - Brainwashed Aden Vanguard
|
||||||
23606,
|
23591, // Barton - Brainwashed Aden Vanguard
|
||||||
23607,
|
23592, // Hayuk - Brainwashed Aden Vanguard
|
||||||
23608,
|
23593, // Elise - Brainwashed Aden Vanguard
|
||||||
};
|
23594, // Eliyah - Brainwashed Aden Vanguard
|
||||||
private static final int[] GROUP_2 =
|
23605, // Aden Elite Knight - Brainwashed
|
||||||
{
|
23606, // Aden Elite Warrior - Brainwashed
|
||||||
23590,
|
23607, // Aden Elite Archer - Brainwashed
|
||||||
23591,
|
23608, // Aden Elite Wizard - Brainwashed
|
||||||
23592,
|
23610, // Corrupted High Priest - Embryo
|
||||||
23593,
|
23612, // Elite Priest - Embryo
|
||||||
23594,
|
23613, // Elite Instructor - Embryo
|
||||||
};
|
23614, // Elite Executioner - Embryo
|
||||||
private static final int[] GROUP_3 =
|
23615, // Elite Shaman - Embryo
|
||||||
{
|
|
||||||
23605,
|
|
||||||
23606,
|
|
||||||
23607,
|
|
||||||
23608,
|
|
||||||
};
|
|
||||||
private static final int[] GROUP_4 =
|
|
||||||
{
|
|
||||||
23610,
|
|
||||||
23612,
|
|
||||||
23613,
|
|
||||||
23614,
|
|
||||||
23615,
|
|
||||||
};
|
};
|
||||||
// Items
|
// Items
|
||||||
// private static final int EMERGENCY_WHISTLE = 46404;
|
// private static final int EMERGENCY_WHISTLE = 46404;
|
||||||
@ -111,11 +100,8 @@ public class CommandPost extends AbstractInstance
|
|||||||
super(TEMPLATE_ID);
|
super(TEMPLATE_ID);
|
||||||
addStartNpc(DEVIANNE);
|
addStartNpc(DEVIANNE);
|
||||||
addTalkId(DEVIANNE);
|
addTalkId(DEVIANNE);
|
||||||
addMoveFinishedId(GROUP_1);
|
addMoveFinishedId(WALKING_MONSTERS);
|
||||||
addMoveFinishedId(GROUP_2);
|
addKillId(BURNSTEIN);
|
||||||
addMoveFinishedId(GROUP_3);
|
|
||||||
addMoveFinishedId(GROUP_4);
|
|
||||||
addKillId(GEORK, BURNSTEIN);
|
|
||||||
addInstanceLeaveId(TEMPLATE_ID);
|
addInstanceLeaveId(TEMPLATE_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -379,6 +365,25 @@ public class CommandPost extends AbstractInstance
|
|||||||
{
|
{
|
||||||
npc.setInvul(false);
|
npc.setInvul(false);
|
||||||
npc.setTargetable(true);
|
npc.setTargetable(true);
|
||||||
|
|
||||||
|
double minDistance = Double.MAX_VALUE;
|
||||||
|
Player target = null;
|
||||||
|
for (Player player : world.getPlayers())
|
||||||
|
{
|
||||||
|
final double distance = player.calculateDistance2D(npc);
|
||||||
|
if (distance < minDistance)
|
||||||
|
{
|
||||||
|
target = player;
|
||||||
|
minDistance = distance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (target != null)
|
||||||
|
{
|
||||||
|
npc.setRunning();
|
||||||
|
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);
|
||||||
|
((Attackable) npc).addDamageHate(target, 1, 999);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
super.onMoveFinished(npc);
|
super.onMoveFinished(npc);
|
||||||
}
|
}
|
||||||
|
@ -19,10 +19,12 @@ package instances.CommandPost;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.l2jmobius.commons.util.Chronos;
|
import org.l2jmobius.commons.util.Chronos;
|
||||||
|
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||||
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||||
import org.l2jmobius.gameserver.model.Location;
|
import org.l2jmobius.gameserver.model.Location;
|
||||||
import org.l2jmobius.gameserver.model.Party;
|
import org.l2jmobius.gameserver.model.Party;
|
||||||
|
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||||
import org.l2jmobius.gameserver.model.actor.Player;
|
import org.l2jmobius.gameserver.model.actor.Player;
|
||||||
import org.l2jmobius.gameserver.model.instancezone.Instance;
|
import org.l2jmobius.gameserver.model.instancezone.Instance;
|
||||||
@ -50,40 +52,27 @@ public class CommandPost extends AbstractInstance
|
|||||||
private static final int ELRYAH = 23594;
|
private static final int ELRYAH = 23594;
|
||||||
private static final int[] FIRST_FLOOR =
|
private static final int[] FIRST_FLOOR =
|
||||||
{
|
{
|
||||||
23595,
|
23595, // Fortress Raider
|
||||||
23596,
|
23596, // Fortress Guardian Captain
|
||||||
23597,
|
23597, // Atelia Passionate Soldier
|
||||||
23600,
|
23600, // Atelia Flame Master
|
||||||
};
|
};
|
||||||
private static final int[] GROUP_1 =
|
private static final int[] WALKING_MONSTERS =
|
||||||
{
|
{
|
||||||
23605,
|
23590, // Adolph - Brainwashed Aden Vanguard
|
||||||
23606,
|
23591, // Barton - Brainwashed Aden Vanguard
|
||||||
23607,
|
23592, // Hayuk - Brainwashed Aden Vanguard
|
||||||
23608,
|
23593, // Elise - Brainwashed Aden Vanguard
|
||||||
};
|
23594, // Eliyah - Brainwashed Aden Vanguard
|
||||||
private static final int[] GROUP_2 =
|
23605, // Aden Elite Knight - Brainwashed
|
||||||
{
|
23606, // Aden Elite Warrior - Brainwashed
|
||||||
23590,
|
23607, // Aden Elite Archer - Brainwashed
|
||||||
23591,
|
23608, // Aden Elite Wizard - Brainwashed
|
||||||
23592,
|
23610, // Corrupted High Priest - Embryo
|
||||||
23593,
|
23612, // Elite Priest - Embryo
|
||||||
23594,
|
23613, // Elite Instructor - Embryo
|
||||||
};
|
23614, // Elite Executioner - Embryo
|
||||||
private static final int[] GROUP_3 =
|
23615, // Elite Shaman - Embryo
|
||||||
{
|
|
||||||
23605,
|
|
||||||
23606,
|
|
||||||
23607,
|
|
||||||
23608,
|
|
||||||
};
|
|
||||||
private static final int[] GROUP_4 =
|
|
||||||
{
|
|
||||||
23610,
|
|
||||||
23612,
|
|
||||||
23613,
|
|
||||||
23614,
|
|
||||||
23615,
|
|
||||||
};
|
};
|
||||||
// Items
|
// Items
|
||||||
// private static final int EMERGENCY_WHISTLE = 46404;
|
// private static final int EMERGENCY_WHISTLE = 46404;
|
||||||
@ -111,11 +100,8 @@ public class CommandPost extends AbstractInstance
|
|||||||
super(TEMPLATE_ID);
|
super(TEMPLATE_ID);
|
||||||
addStartNpc(DEVIANNE);
|
addStartNpc(DEVIANNE);
|
||||||
addTalkId(DEVIANNE);
|
addTalkId(DEVIANNE);
|
||||||
addMoveFinishedId(GROUP_1);
|
addMoveFinishedId(WALKING_MONSTERS);
|
||||||
addMoveFinishedId(GROUP_2);
|
addKillId(BURNSTEIN);
|
||||||
addMoveFinishedId(GROUP_3);
|
|
||||||
addMoveFinishedId(GROUP_4);
|
|
||||||
addKillId(GEORK, BURNSTEIN);
|
|
||||||
addInstanceLeaveId(TEMPLATE_ID);
|
addInstanceLeaveId(TEMPLATE_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -379,6 +365,25 @@ public class CommandPost extends AbstractInstance
|
|||||||
{
|
{
|
||||||
npc.setInvul(false);
|
npc.setInvul(false);
|
||||||
npc.setTargetable(true);
|
npc.setTargetable(true);
|
||||||
|
|
||||||
|
double minDistance = Double.MAX_VALUE;
|
||||||
|
Player target = null;
|
||||||
|
for (Player player : world.getPlayers())
|
||||||
|
{
|
||||||
|
final double distance = player.calculateDistance2D(npc);
|
||||||
|
if (distance < minDistance)
|
||||||
|
{
|
||||||
|
target = player;
|
||||||
|
minDistance = distance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (target != null)
|
||||||
|
{
|
||||||
|
npc.setRunning();
|
||||||
|
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);
|
||||||
|
((Attackable) npc).addDamageHate(target, 1, 999);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
super.onMoveFinished(npc);
|
super.onMoveFinished(npc);
|
||||||
}
|
}
|
||||||
|
@ -19,10 +19,12 @@ package instances.CommandPost;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.l2jmobius.commons.util.Chronos;
|
import org.l2jmobius.commons.util.Chronos;
|
||||||
|
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||||
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||||
import org.l2jmobius.gameserver.model.Location;
|
import org.l2jmobius.gameserver.model.Location;
|
||||||
import org.l2jmobius.gameserver.model.Party;
|
import org.l2jmobius.gameserver.model.Party;
|
||||||
|
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||||
import org.l2jmobius.gameserver.model.actor.Player;
|
import org.l2jmobius.gameserver.model.actor.Player;
|
||||||
import org.l2jmobius.gameserver.model.instancezone.Instance;
|
import org.l2jmobius.gameserver.model.instancezone.Instance;
|
||||||
@ -50,40 +52,27 @@ public class CommandPost extends AbstractInstance
|
|||||||
private static final int ELRYAH = 23594;
|
private static final int ELRYAH = 23594;
|
||||||
private static final int[] FIRST_FLOOR =
|
private static final int[] FIRST_FLOOR =
|
||||||
{
|
{
|
||||||
23595,
|
23595, // Fortress Raider
|
||||||
23596,
|
23596, // Fortress Guardian Captain
|
||||||
23597,
|
23597, // Atelia Passionate Soldier
|
||||||
23600,
|
23600, // Atelia Flame Master
|
||||||
};
|
};
|
||||||
private static final int[] GROUP_1 =
|
private static final int[] WALKING_MONSTERS =
|
||||||
{
|
{
|
||||||
23605,
|
23590, // Adolph - Brainwashed Aden Vanguard
|
||||||
23606,
|
23591, // Barton - Brainwashed Aden Vanguard
|
||||||
23607,
|
23592, // Hayuk - Brainwashed Aden Vanguard
|
||||||
23608,
|
23593, // Elise - Brainwashed Aden Vanguard
|
||||||
};
|
23594, // Eliyah - Brainwashed Aden Vanguard
|
||||||
private static final int[] GROUP_2 =
|
23605, // Aden Elite Knight - Brainwashed
|
||||||
{
|
23606, // Aden Elite Warrior - Brainwashed
|
||||||
23590,
|
23607, // Aden Elite Archer - Brainwashed
|
||||||
23591,
|
23608, // Aden Elite Wizard - Brainwashed
|
||||||
23592,
|
23610, // Corrupted High Priest - Embryo
|
||||||
23593,
|
23612, // Elite Priest - Embryo
|
||||||
23594,
|
23613, // Elite Instructor - Embryo
|
||||||
};
|
23614, // Elite Executioner - Embryo
|
||||||
private static final int[] GROUP_3 =
|
23615, // Elite Shaman - Embryo
|
||||||
{
|
|
||||||
23605,
|
|
||||||
23606,
|
|
||||||
23607,
|
|
||||||
23608,
|
|
||||||
};
|
|
||||||
private static final int[] GROUP_4 =
|
|
||||||
{
|
|
||||||
23610,
|
|
||||||
23612,
|
|
||||||
23613,
|
|
||||||
23614,
|
|
||||||
23615,
|
|
||||||
};
|
};
|
||||||
// Items
|
// Items
|
||||||
// private static final int EMERGENCY_WHISTLE = 46404;
|
// private static final int EMERGENCY_WHISTLE = 46404;
|
||||||
@ -111,11 +100,8 @@ public class CommandPost extends AbstractInstance
|
|||||||
super(TEMPLATE_ID);
|
super(TEMPLATE_ID);
|
||||||
addStartNpc(DEVIANNE);
|
addStartNpc(DEVIANNE);
|
||||||
addTalkId(DEVIANNE);
|
addTalkId(DEVIANNE);
|
||||||
addMoveFinishedId(GROUP_1);
|
addMoveFinishedId(WALKING_MONSTERS);
|
||||||
addMoveFinishedId(GROUP_2);
|
addKillId(BURNSTEIN);
|
||||||
addMoveFinishedId(GROUP_3);
|
|
||||||
addMoveFinishedId(GROUP_4);
|
|
||||||
addKillId(GEORK, BURNSTEIN);
|
|
||||||
addInstanceLeaveId(TEMPLATE_ID);
|
addInstanceLeaveId(TEMPLATE_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -379,6 +365,25 @@ public class CommandPost extends AbstractInstance
|
|||||||
{
|
{
|
||||||
npc.setInvul(false);
|
npc.setInvul(false);
|
||||||
npc.setTargetable(true);
|
npc.setTargetable(true);
|
||||||
|
|
||||||
|
double minDistance = Double.MAX_VALUE;
|
||||||
|
Player target = null;
|
||||||
|
for (Player player : world.getPlayers())
|
||||||
|
{
|
||||||
|
final double distance = player.calculateDistance2D(npc);
|
||||||
|
if (distance < minDistance)
|
||||||
|
{
|
||||||
|
target = player;
|
||||||
|
minDistance = distance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (target != null)
|
||||||
|
{
|
||||||
|
npc.setRunning();
|
||||||
|
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);
|
||||||
|
((Attackable) npc).addDamageHate(target, 1, 999);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
super.onMoveFinished(npc);
|
super.onMoveFinished(npc);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user