Updated Baylor warzone AI.
Contributed by CostyKiller.
This commit is contained in:
@@ -64,24 +64,24 @@
|
||||
<npc id="29213" x="153378" y="141997" z="-12736" heading="36076" /> <!-- Baylor -->
|
||||
</group>
|
||||
<group name="PRISON_GUARD_GROUP_1" spawnByDefault="false">
|
||||
<npc id="29104" x="153360" y="141936" z="-12736" heading="8192" spawnAnimation="true" /> <!-- Crystal Prison Guard -->
|
||||
<npc id="29104" x="153312" y="142048" z="-12736" heading="0" spawnAnimation="true" /> <!-- Crystal Prison Guard -->
|
||||
<npc id="29104" x="153333" y="142176" z="-12736" heading="61439" spawnAnimation="true" /> <!-- Crystal Prison Guard -->
|
||||
<npc id="29217" x="153360" y="141936" z="-12736" heading="8192" spawnAnimation="true" /> <!-- Crystal Prison Guard -->
|
||||
<npc id="29217" x="153312" y="142048" z="-12736" heading="0" spawnAnimation="true" /> <!-- Crystal Prison Guard -->
|
||||
<npc id="29217" x="153333" y="142176" z="-12736" heading="61439" spawnAnimation="true" /> <!-- Crystal Prison Guard -->
|
||||
</group>
|
||||
<group name="PRISON_GUARD_GROUP_2" spawnByDefault="false">
|
||||
<npc id="29104" x="153727" y="141875" z="-12736" heading="24500" spawnAnimation="true" /> <!-- Crystal Prison Guard -->
|
||||
<npc id="29104" x="153600" y="141824" z="-12736" heading="16384" spawnAnimation="true" /> <!-- Crystal Prison Guard -->
|
||||
<npc id="29104" x="153472" y="141840" z="-12736" heading="12288" spawnAnimation="true" /> <!-- Crystal Prison Guard -->
|
||||
<npc id="29217" x="153727" y="141875" z="-12736" heading="24500" spawnAnimation="true" /> <!-- Crystal Prison Guard -->
|
||||
<npc id="29217" x="153600" y="141824" z="-12736" heading="16384" spawnAnimation="true" /> <!-- Crystal Prison Guard -->
|
||||
<npc id="29217" x="153472" y="141840" z="-12736" heading="12288" spawnAnimation="true" /> <!-- Crystal Prison Guard -->
|
||||
</group>
|
||||
<group name="PRISON_GUARD_GROUP_3" spawnByDefault="false">
|
||||
<npc id="29104" x="153776" y="142224" z="-12736" heading="40960" spawnAnimation="true" /> <!-- Crystal Prison Guard -->
|
||||
<npc id="29104" x="153824" y="142112" z="-12736" heading="32768" spawnAnimation="true" /> <!-- Crystal Prison Guard -->
|
||||
<npc id="29104" x="153808" y="141984" z="-12736" heading="28672" spawnAnimation="true" /> <!-- Crystal Prison Guard -->
|
||||
<npc id="29217" x="153776" y="142224" z="-12736" heading="40960" spawnAnimation="true" /> <!-- Crystal Prison Guard -->
|
||||
<npc id="29217" x="153824" y="142112" z="-12736" heading="32768" spawnAnimation="true" /> <!-- Crystal Prison Guard -->
|
||||
<npc id="29217" x="153808" y="141984" z="-12736" heading="28672" spawnAnimation="true" /> <!-- Crystal Prison Guard -->
|
||||
</group>
|
||||
<group name="PRISON_GUARD_GROUP_4" spawnByDefault="false">
|
||||
<npc id="29104" x="153424" y="142288" z="-12736" heading="57344" spawnAnimation="true" /> <!-- Crystal Prison Guard -->
|
||||
<npc id="29104" x="153520" y="142336" z="-12736" heading="49152" spawnAnimation="true" /> <!-- Crystal Prison Guard -->
|
||||
<npc id="29104" x="153666" y="142312" z="-12736" heading="45055" spawnAnimation="true" /> <!-- Crystal Prison Guard -->
|
||||
<npc id="29217" x="153424" y="142288" z="-12736" heading="57344" spawnAnimation="true" /> <!-- Crystal Prison Guard -->
|
||||
<npc id="29217" x="153520" y="142336" z="-12736" heading="49152" spawnAnimation="true" /> <!-- Crystal Prison Guard -->
|
||||
<npc id="29217" x="153666" y="142312" z="-12736" heading="45055" spawnAnimation="true" /> <!-- Crystal Prison Guard -->
|
||||
</group>
|
||||
</spawnlist>
|
||||
</instance>
|
||||
|
@@ -28,7 +28,6 @@ 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.actor.instance.Door;
|
||||
import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureDeath;
|
||||
import org.l2jmobius.gameserver.model.holders.ItemHolder;
|
||||
import org.l2jmobius.gameserver.model.holders.SkillHolder;
|
||||
import org.l2jmobius.gameserver.model.instancezone.Instance;
|
||||
@@ -47,7 +46,7 @@ public class BaylorWarzone extends AbstractInstance
|
||||
{
|
||||
// NPCs
|
||||
private static final int BAYLOR = 29213;
|
||||
private static final int PRISON_GUARD = 29104;
|
||||
private static final int PRISON_GUARD = 29217;
|
||||
private static final int BENUSTA = 34542;
|
||||
private static final int INVISIBLE_NPC_1 = 29106;
|
||||
private static final int INVISIBLE_NPC_2 = 29108;
|
||||
@@ -71,7 +70,7 @@ public class BaylorWarzone extends AbstractInstance
|
||||
addInstanceCreatedId(TEMPLATE_ID);
|
||||
addSpellFinishedId(INVISIBLE_NPC_1);
|
||||
addCreatureSeeId(INVISIBLE_NPC_1);
|
||||
setCreatureKillId(this::onBossKill, BAYLOR);
|
||||
addKillId(BAYLOR);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -335,6 +334,7 @@ public class BaylorWarzone extends AbstractInstance
|
||||
public void onInstanceCreated(Instance instance, Player player)
|
||||
{
|
||||
instance.getParameters().set("INITIAL_PARTY_MEMBERS", player.getParty() != null ? player.getParty().getMemberCount() : 1);
|
||||
instance.getParameters().set("ONE_BAYLOR_KILLED", false);
|
||||
getTimers().addTimer("BATTLE_PORT", 3000, e ->
|
||||
{
|
||||
instance.getPlayers().forEach(p -> p.teleToLocation(BATTLE_PORT));
|
||||
@@ -342,13 +342,13 @@ public class BaylorWarzone extends AbstractInstance
|
||||
});
|
||||
}
|
||||
|
||||
public void onBossKill(OnCreatureDeath event)
|
||||
@Override
|
||||
public String onKill(Npc npc, Player killer, boolean isSummon)
|
||||
{
|
||||
final Npc npc = (Npc) event.getTarget();
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
if (isInInstance(world))
|
||||
{
|
||||
if (world.getAliveNpcs(BAYLOR).isEmpty())
|
||||
if (world.getParameters().getBoolean("ONE_BAYLOR_KILLED", false))
|
||||
{
|
||||
for (Player member : world.getPlayers())
|
||||
{
|
||||
@@ -363,9 +363,11 @@ public class BaylorWarzone extends AbstractInstance
|
||||
}
|
||||
else
|
||||
{
|
||||
world.getParameters().set("ONE_BAYLOR_KILLED", true);
|
||||
world.setReenterTime();
|
||||
}
|
||||
}
|
||||
return super.onKill(npc, killer, isSummon);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -244,7 +244,7 @@
|
||||
<height normal="47" />
|
||||
</collision>
|
||||
</npc>
|
||||
<npc id="29106" level="83" type="Monster">
|
||||
<npc id="29106" level="83" type="Folk">
|
||||
<race>CONSTRUCT</race>
|
||||
<sex>MALE</sex>
|
||||
<stats str="88" int="79" dex="55" wit="78" con="82" men="78">
|
||||
@@ -277,7 +277,7 @@
|
||||
<height normal="0.1" />
|
||||
</collision>
|
||||
</npc>
|
||||
<npc id="29107" level="83" type="Monster">
|
||||
<npc id="29107" level="83" type="Folk">
|
||||
<race>CONSTRUCT</race>
|
||||
<sex>MALE</sex>
|
||||
<stats str="88" int="79" dex="55" wit="78" con="82" men="78">
|
||||
@@ -310,7 +310,7 @@
|
||||
<height normal="0.1" />
|
||||
</collision>
|
||||
</npc>
|
||||
<npc id="29108" level="83" type="Monster">
|
||||
<npc id="29108" level="83" type="Folk">
|
||||
<race>CONSTRUCT</race>
|
||||
<sex>MALE</sex>
|
||||
<stats str="88" int="79" dex="55" wit="78" con="82" men="78">
|
||||
@@ -343,7 +343,7 @@
|
||||
<height normal="0.1" />
|
||||
</collision>
|
||||
</npc>
|
||||
<npc id="29109" level="83" type="Monster">
|
||||
<npc id="29109" level="83" type="Folk">
|
||||
<race>CONSTRUCT</race>
|
||||
<sex>MALE</sex>
|
||||
<stats str="88" int="79" dex="55" wit="78" con="82" men="78">
|
||||
|
Reference in New Issue
Block a user