Keep proper instance of SevenSignsRBs script.
This commit is contained in:
@@ -14,27 +14,28 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package instances.SevenSignsRBs;
|
package ai.bosses.SevenSignsRBs;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.l2jmobius.gameserver.enums.RaidBossStatus;
|
||||||
|
import org.l2jmobius.gameserver.instancemanager.DBSpawnManager;
|
||||||
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.Creature;
|
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||||
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.skill.AbnormalVisualEffect;
|
||||||
import org.l2jmobius.gameserver.model.zone.type.NoRestartZone;
|
import org.l2jmobius.gameserver.model.zone.type.NoRestartZone;
|
||||||
|
|
||||||
import instances.AbstractInstance;
|
import ai.AbstractNpcAI;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author RobikBobik
|
* @author RobikBobik
|
||||||
* @NOTE: Retail like work
|
* @NOTE: Retail like work
|
||||||
* @TODO: When one RB die, the second will be invul for 5 minutes.
|
|
||||||
*/
|
*/
|
||||||
public class SevenSignsRBs extends AbstractInstance
|
public class SevenSignsRBs extends AbstractNpcAI
|
||||||
{
|
{
|
||||||
// NPCs
|
// NPCs
|
||||||
private static final int ANAKIM_GATEKEEPER_SPIRIT = 31089;
|
private static final int ANAKIM_GATEKEEPER_SPIRIT = 31089;
|
||||||
@@ -42,17 +43,14 @@ public class SevenSignsRBs extends AbstractInstance
|
|||||||
private static final int GATEKEEPER_SPIRIT_OUT_TELEPORT = 31088;
|
private static final int GATEKEEPER_SPIRIT_OUT_TELEPORT = 31088;
|
||||||
private static final int ANAKIM = 25286;
|
private static final int ANAKIM = 25286;
|
||||||
private static final int LILITH = 25283;
|
private static final int LILITH = 25283;
|
||||||
|
|
||||||
// Misc
|
// Misc
|
||||||
private static final int ANAKIM_TEMPLATE_ID = 200;
|
|
||||||
private static final int LILITH_TEMPLATE_ID = 199;
|
|
||||||
|
|
||||||
private static final int MAX_PLAYERS_IN_ZONE = 300;
|
private static final int MAX_PLAYERS_IN_ZONE = 300;
|
||||||
|
|
||||||
private static final NoRestartZone ANAKIM_ZONE = ZoneManager.getInstance().getZoneById(70052, NoRestartZone.class);
|
private static final NoRestartZone ANAKIM_ZONE = ZoneManager.getInstance().getZoneById(70052, NoRestartZone.class);
|
||||||
private static final NoRestartZone LILITH_ZONE = ZoneManager.getInstance().getZoneById(70053, NoRestartZone.class);
|
private static final NoRestartZone LILITH_ZONE = ZoneManager.getInstance().getZoneById(70053, NoRestartZone.class);
|
||||||
|
|
||||||
// TELEPORTS
|
// TELEPORTS
|
||||||
|
private static final Location TELEPORT_TO_LILITH = new Location(185657, -10112, -5496);
|
||||||
|
private static final Location TELEPORT_TO_ANAKIM = new Location(-7283, 19086, -5496);
|
||||||
|
|
||||||
private static final Location[] TELEPORT_TO_DARK_ELVEN =
|
private static final Location[] TELEPORT_TO_DARK_ELVEN =
|
||||||
{
|
{
|
||||||
new Location(12168, 17149, -4575),
|
new Location(12168, 17149, -4575),
|
||||||
@@ -61,19 +59,20 @@ public class SevenSignsRBs extends AbstractInstance
|
|||||||
new Location(11169, 15922, -4585),
|
new Location(11169, 15922, -4585),
|
||||||
};
|
};
|
||||||
|
|
||||||
// TODO: When teleport from instance done. Enable it
|
private static final Location[] TELEPORT_TO_ADEN =
|
||||||
/*
|
{
|
||||||
* private static final Location[] TELEPORT_TO_ADEN = { new Location(148053, 26935, -2206), new Location(148053, 28017, -2269), new Location(146558, 28017, -2269), new Location(146558, 26935, -2206), };
|
new Location(148053, 26935, -2206),
|
||||||
*/
|
new Location(148053, 28017, -2269),
|
||||||
|
new Location(146558, 28017, -2269),
|
||||||
|
new Location(146558, 26935, -2206),
|
||||||
|
};
|
||||||
|
|
||||||
public SevenSignsRBs()
|
public SevenSignsRBs()
|
||||||
{
|
{
|
||||||
super(ANAKIM_TEMPLATE_ID, LILITH_TEMPLATE_ID);
|
|
||||||
addStartNpc(ANAKIM_GATEKEEPER_SPIRIT, LILITH_GATEKEEPER_SPIRIT);
|
addStartNpc(ANAKIM_GATEKEEPER_SPIRIT, LILITH_GATEKEEPER_SPIRIT);
|
||||||
addTalkId(ANAKIM_GATEKEEPER_SPIRIT, LILITH_GATEKEEPER_SPIRIT, GATEKEEPER_SPIRIT_OUT_TELEPORT);
|
addTalkId(ANAKIM_GATEKEEPER_SPIRIT, LILITH_GATEKEEPER_SPIRIT, GATEKEEPER_SPIRIT_OUT_TELEPORT);
|
||||||
addKillId(ANAKIM, LILITH);
|
addKillId(ANAKIM, LILITH);
|
||||||
addAttackId(ANAKIM, LILITH);
|
addAttackId(ANAKIM, LILITH);
|
||||||
addInstanceLeaveId(ANAKIM_TEMPLATE_ID, LILITH_TEMPLATE_ID);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -83,6 +82,11 @@ public class SevenSignsRBs extends AbstractInstance
|
|||||||
{
|
{
|
||||||
case "ANAKIM_ENTER":
|
case "ANAKIM_ENTER":
|
||||||
{
|
{
|
||||||
|
if (DBSpawnManager.getInstance().getStatus(ANAKIM) != RaidBossStatus.ALIVE)
|
||||||
|
{
|
||||||
|
player.sendMessage("Anakim is not present at the moment");
|
||||||
|
break;
|
||||||
|
}
|
||||||
if (player.isInParty())
|
if (player.isInParty())
|
||||||
{
|
{
|
||||||
final Party party = player.getParty();
|
final Party party = player.getParty();
|
||||||
@@ -90,7 +94,7 @@ public class SevenSignsRBs extends AbstractInstance
|
|||||||
final List<Player> members = (isInCC) ? party.getCommandChannel().getMembers() : party.getMembers();
|
final List<Player> members = (isInCC) ? party.getCommandChannel().getMembers() : party.getMembers();
|
||||||
if (members.size() > (MAX_PLAYERS_IN_ZONE - ANAKIM_ZONE.getPlayersInside().size()))
|
if (members.size() > (MAX_PLAYERS_IN_ZONE - ANAKIM_ZONE.getPlayersInside().size()))
|
||||||
{
|
{
|
||||||
player.sendMessage("Lilith Sanctum reached 300 players. You cannot enter now.");
|
player.sendMessage("Anakims Sanctum reached " + MAX_PLAYERS_IN_ZONE + " players. You cannot enter now.");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -100,13 +104,13 @@ public class SevenSignsRBs extends AbstractInstance
|
|||||||
{
|
{
|
||||||
player.sendMessage("Player " + member.getName() + " must go closer to Gatekeeper Spirit.");
|
player.sendMessage("Player " + member.getName() + " must go closer to Gatekeeper Spirit.");
|
||||||
}
|
}
|
||||||
enterInstance(member, npc, ANAKIM_TEMPLATE_ID);
|
member.teleToLocation(TELEPORT_TO_ANAKIM);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (player.isGM())
|
else if (player.isGM())
|
||||||
{
|
{
|
||||||
enterInstance(player, npc, ANAKIM_TEMPLATE_ID);
|
player.teleToLocation(TELEPORT_TO_ANAKIM);
|
||||||
player.sendMessage("SYS: You have entered as GM/Admin to Anakim Instance");
|
player.sendMessage("SYS: You have entered as GM/Admin to Anakim Instance");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -114,13 +118,19 @@ public class SevenSignsRBs extends AbstractInstance
|
|||||||
if (!player.isInsideRadius3D(npc, 1000))
|
if (!player.isInsideRadius3D(npc, 1000))
|
||||||
{
|
{
|
||||||
player.sendMessage("You must go closer to Gatekeeper Spirit.");
|
player.sendMessage("You must go closer to Gatekeeper Spirit.");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
enterInstance(player, npc, ANAKIM_TEMPLATE_ID);
|
player.teleToLocation(TELEPORT_TO_ANAKIM);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "LILITH_ENTER":
|
case "LILITH_ENTER":
|
||||||
{
|
{
|
||||||
|
if (DBSpawnManager.getInstance().getStatus(LILITH) != RaidBossStatus.ALIVE)
|
||||||
|
{
|
||||||
|
player.sendMessage("Lilith is not present at the moment");
|
||||||
|
break;
|
||||||
|
}
|
||||||
if (player.isInParty())
|
if (player.isInParty())
|
||||||
{
|
{
|
||||||
final Party party = player.getParty();
|
final Party party = player.getParty();
|
||||||
@@ -128,7 +138,7 @@ public class SevenSignsRBs extends AbstractInstance
|
|||||||
final List<Player> members = (isInCC) ? party.getCommandChannel().getMembers() : party.getMembers();
|
final List<Player> members = (isInCC) ? party.getCommandChannel().getMembers() : party.getMembers();
|
||||||
if (members.size() > (MAX_PLAYERS_IN_ZONE - LILITH_ZONE.getPlayersInside().size()))
|
if (members.size() > (MAX_PLAYERS_IN_ZONE - LILITH_ZONE.getPlayersInside().size()))
|
||||||
{
|
{
|
||||||
player.sendMessage("Lilith Sanctum reached 300 players. You cannot enter now.");
|
player.sendMessage("Lilith Sanctum reached " + MAX_PLAYERS_IN_ZONE + " players. You cannot enter now.");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -138,13 +148,13 @@ public class SevenSignsRBs extends AbstractInstance
|
|||||||
{
|
{
|
||||||
player.sendMessage("Player " + member.getName() + " must go closer to Gatekeeper Spirit.");
|
player.sendMessage("Player " + member.getName() + " must go closer to Gatekeeper Spirit.");
|
||||||
}
|
}
|
||||||
enterInstance(member, npc, LILITH_TEMPLATE_ID);
|
member.teleToLocation(TELEPORT_TO_LILITH);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (player.isGM())
|
else if (player.isGM())
|
||||||
{
|
{
|
||||||
enterInstance(player, npc, LILITH_TEMPLATE_ID);
|
player.teleToLocation(TELEPORT_TO_LILITH);
|
||||||
player.sendMessage("SYS: You have entered as GM/Admin to Anakim Instance");
|
player.sendMessage("SYS: You have entered as GM/Admin to Anakim Instance");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -152,8 +162,9 @@ public class SevenSignsRBs extends AbstractInstance
|
|||||||
if (!player.isInsideRadius3D(npc, 1000))
|
if (!player.isInsideRadius3D(npc, 1000))
|
||||||
{
|
{
|
||||||
player.sendMessage("You must go closer to Gatekeeper Spirit.");
|
player.sendMessage("You must go closer to Gatekeeper Spirit.");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
enterInstance(player, npc, LILITH_TEMPLATE_ID);
|
player.teleToLocation(TELEPORT_TO_LILITH);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -181,34 +192,55 @@ public class SevenSignsRBs extends AbstractInstance
|
|||||||
}
|
}
|
||||||
case "TELEPORT_OUT":
|
case "TELEPORT_OUT":
|
||||||
{
|
{
|
||||||
// TODO: Different teleport location from instance.
|
if (ANAKIM_ZONE.isInsideZone(player.getLocation()))
|
||||||
// switch (player.getInstanceId())
|
{
|
||||||
// {
|
final Location destination = TELEPORT_TO_DARK_ELVEN[getRandom(TELEPORT_TO_DARK_ELVEN.length)];
|
||||||
// case ANAKIM_TEMPLATE_ID:
|
player.teleToLocation(destination.getX() + getRandom(100), destination.getY() + getRandom(100), destination.getZ());
|
||||||
// {
|
break;
|
||||||
// final Location destination = TELEPORT_TO_DARK_ELVEN[getRandom(TELEPORT_TO_DARK_ELVEN.length)];
|
}
|
||||||
// player.teleToLocation(destination.getX() + getRandom(100), destination.getY() + getRandom(100), destination.getZ());
|
if (LILITH_ZONE.isInsideZone(player.getLocation()))
|
||||||
// break;
|
{
|
||||||
// }
|
final Location destination = TELEPORT_TO_ADEN[getRandom(TELEPORT_TO_ADEN.length)];
|
||||||
// case LILITH_TEMPLATE_ID:
|
player.teleToLocation(destination.getX() + getRandom(100), destination.getY() + getRandom(100), destination.getZ());
|
||||||
// {
|
break;
|
||||||
// final Location destination = TELEPORT_TO_ADEN[getRandom(TELEPORT_TO_ADEN.length)];
|
}
|
||||||
// player.teleToLocation(destination.getX() + getRandom(100), destination.getY() + getRandom(100), destination.getZ());
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
final Location destination = TELEPORT_TO_DARK_ELVEN[getRandom(TELEPORT_TO_DARK_ELVEN.length)];
|
|
||||||
player.teleToLocation(destination.getX() + getRandom(100), destination.getY() + getRandom(100), destination.getZ());
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "ANAKIM_DEATH_CAST_LILITH_INVUL":
|
case "ANAKIM_DEATH_CAST_LILITH_INVUL":
|
||||||
{
|
{
|
||||||
// TODO: When one RB die, the second will be invul for 5 minutes.
|
if (DBSpawnManager.getInstance().getStatus(LILITH) == RaidBossStatus.ALIVE)
|
||||||
|
{
|
||||||
|
Npc LILITH_NPC = DBSpawnManager.getInstance().getNpcs().get(LILITH);
|
||||||
|
LILITH_NPC.setInvul(true);
|
||||||
|
LILITH_NPC.getEffectList().startAbnormalVisualEffect(AbnormalVisualEffect.INVINCIBILITY);
|
||||||
|
startQuestTimer("LILITH_INVUL_END", 300000, null, player);
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "LILITH_DEATH_CAST_ANAKIM_INVUL":
|
case "LILITH_DEATH_CAST_ANAKIM_INVUL":
|
||||||
{
|
{
|
||||||
// TODO: When one RB die, the second will be invul for 5 minutes.
|
if (DBSpawnManager.getInstance().getStatus(ANAKIM) == RaidBossStatus.ALIVE)
|
||||||
|
{
|
||||||
|
Npc ANAKIM_NPC = DBSpawnManager.getInstance().getNpcs().get(ANAKIM);
|
||||||
|
ANAKIM_NPC.setInvul(true);
|
||||||
|
ANAKIM_NPC.getEffectList().startAbnormalVisualEffect(AbnormalVisualEffect.INVINCIBILITY);
|
||||||
|
startQuestTimer("ANAKIM_INVUL_END", 300000, null, player);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "LILITH_INVUL_END":
|
||||||
|
{
|
||||||
|
Npc LILITH_NPC = DBSpawnManager.getInstance().getNpcs().get(LILITH);
|
||||||
|
LILITH_NPC.setInvul(false);
|
||||||
|
LILITH_NPC.getEffectList().stopAbnormalVisualEffect(AbnormalVisualEffect.INVINCIBILITY);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "ANAKIM_INVUL_END":
|
||||||
|
{
|
||||||
|
Npc ANAKIM_NPC = DBSpawnManager.getInstance().getNpcs().get(ANAKIM);
|
||||||
|
ANAKIM_NPC.setInvul(false);
|
||||||
|
ANAKIM_NPC.getEffectList().stopAbnormalVisualEffect(AbnormalVisualEffect.INVINCIBILITY);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -222,26 +254,17 @@ public class SevenSignsRBs extends AbstractInstance
|
|||||||
{
|
{
|
||||||
case ANAKIM:
|
case ANAKIM:
|
||||||
{
|
{
|
||||||
// TODO:
|
startQuestTimer("ANAKIM_DEATH_CAST_LILITH_INVUL", 1000, null, null);
|
||||||
// startQuestTimer("ANAKIM_DEATH_CAST_LILITH_INVUL", 1000, null, null);
|
|
||||||
startQuestTimer("REMOVE_PLAYERS_FROM_ZONE_ANAKIM", 600000, null, player);
|
|
||||||
addSpawn(GATEKEEPER_SPIRIT_OUT_TELEPORT, -6664, 18501, -5495, 0, false, 600000, false, npc.getInstanceId());
|
addSpawn(GATEKEEPER_SPIRIT_OUT_TELEPORT, -6664, 18501, -5495, 0, false, 600000, false, npc.getInstanceId());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case LILITH:
|
case LILITH:
|
||||||
{
|
{
|
||||||
// TODO:
|
startQuestTimer("LILITH_DEATH_CAST_ANAKIM_INVUL", 1000, null, null);
|
||||||
// startQuestTimer("LILITH_DEATH_CAST_ANAKIM_INVUL", 1000, null, null);
|
|
||||||
startQuestTimer("REMOVE_PLAYERS_FROM_ZONE_LILITH", 600000, null, player);
|
|
||||||
addSpawn(GATEKEEPER_SPIRIT_OUT_TELEPORT, 185062, -9612, -5493, 0, false, 600000, false, npc.getInstanceId());
|
addSpawn(GATEKEEPER_SPIRIT_OUT_TELEPORT, 185062, -9612, -5493, 0, false, 600000, false, npc.getInstanceId());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
final Instance world = npc.getInstanceWorld();
|
|
||||||
if (world != null)
|
|
||||||
{
|
|
||||||
world.finishInstance();
|
|
||||||
}
|
|
||||||
return super.onKill(npc, player, isSummon);
|
return super.onKill(npc, player, isSummon);
|
||||||
}
|
}
|
||||||
|
|
@@ -272,5 +272,4 @@ public class SevenSignsRBs extends AbstractNpcAI
|
|||||||
{
|
{
|
||||||
new SevenSignsRBs();
|
new SevenSignsRBs();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -75,4 +75,15 @@
|
|||||||
<skill id="51297" level="3" /> <!-- Frintezza Doll's Sorcery -->
|
<skill id="51297" level="3" /> <!-- Frintezza Doll's Sorcery -->
|
||||||
</skills>
|
</skills>
|
||||||
</item>
|
</item>
|
||||||
|
<item id="91652" name="Giant Cobweb" type="EtcItem">
|
||||||
|
<!-- A light and shiny cobweb made by Giant Spiders. -->
|
||||||
|
<set name="icon" val="icon.etc_cobweb_i00" />
|
||||||
|
<set name="material" val="STEEL" />
|
||||||
|
<set name="is_tradable" val="false" />
|
||||||
|
<set name="is_dropable" val="false" />
|
||||||
|
<set name="is_sellable" val="false" />
|
||||||
|
<set name="is_depositable" val="false" />
|
||||||
|
<set name="is_stackable" val="true" />
|
||||||
|
<set name="is_questitem" val="true" />
|
||||||
|
</item>
|
||||||
</list>
|
</list>
|
||||||
|
@@ -14,27 +14,28 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package instances.SevenSignsRBs;
|
package ai.bosses.SevenSignsRBs;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.l2jmobius.gameserver.enums.RaidBossStatus;
|
||||||
|
import org.l2jmobius.gameserver.instancemanager.DBSpawnManager;
|
||||||
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.Creature;
|
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||||
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.skill.AbnormalVisualEffect;
|
||||||
import org.l2jmobius.gameserver.model.zone.type.NoRestartZone;
|
import org.l2jmobius.gameserver.model.zone.type.NoRestartZone;
|
||||||
|
|
||||||
import instances.AbstractInstance;
|
import ai.AbstractNpcAI;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author RobikBobik
|
* @author RobikBobik
|
||||||
* @NOTE: Retail like work
|
* @NOTE: Retail like work
|
||||||
* @TODO: When one RB die, the second will be invul for 5 minutes.
|
|
||||||
*/
|
*/
|
||||||
public class SevenSignsRBs extends AbstractInstance
|
public class SevenSignsRBs extends AbstractNpcAI
|
||||||
{
|
{
|
||||||
// NPCs
|
// NPCs
|
||||||
private static final int ANAKIM_GATEKEEPER_SPIRIT = 31089;
|
private static final int ANAKIM_GATEKEEPER_SPIRIT = 31089;
|
||||||
@@ -42,17 +43,14 @@ public class SevenSignsRBs extends AbstractInstance
|
|||||||
private static final int GATEKEEPER_SPIRIT_OUT_TELEPORT = 31088;
|
private static final int GATEKEEPER_SPIRIT_OUT_TELEPORT = 31088;
|
||||||
private static final int ANAKIM = 25286;
|
private static final int ANAKIM = 25286;
|
||||||
private static final int LILITH = 25283;
|
private static final int LILITH = 25283;
|
||||||
|
|
||||||
// Misc
|
// Misc
|
||||||
private static final int ANAKIM_TEMPLATE_ID = 200;
|
|
||||||
private static final int LILITH_TEMPLATE_ID = 199;
|
|
||||||
|
|
||||||
private static final int MAX_PLAYERS_IN_ZONE = 300;
|
private static final int MAX_PLAYERS_IN_ZONE = 300;
|
||||||
|
|
||||||
private static final NoRestartZone ANAKIM_ZONE = ZoneManager.getInstance().getZoneById(70052, NoRestartZone.class);
|
private static final NoRestartZone ANAKIM_ZONE = ZoneManager.getInstance().getZoneById(70052, NoRestartZone.class);
|
||||||
private static final NoRestartZone LILITH_ZONE = ZoneManager.getInstance().getZoneById(70053, NoRestartZone.class);
|
private static final NoRestartZone LILITH_ZONE = ZoneManager.getInstance().getZoneById(70053, NoRestartZone.class);
|
||||||
|
|
||||||
// TELEPORTS
|
// TELEPORTS
|
||||||
|
private static final Location TELEPORT_TO_LILITH = new Location(185657, -10112, -5496);
|
||||||
|
private static final Location TELEPORT_TO_ANAKIM = new Location(-7283, 19086, -5496);
|
||||||
|
|
||||||
private static final Location[] TELEPORT_TO_DARK_ELVEN =
|
private static final Location[] TELEPORT_TO_DARK_ELVEN =
|
||||||
{
|
{
|
||||||
new Location(12168, 17149, -4575),
|
new Location(12168, 17149, -4575),
|
||||||
@@ -61,19 +59,20 @@ public class SevenSignsRBs extends AbstractInstance
|
|||||||
new Location(11169, 15922, -4585),
|
new Location(11169, 15922, -4585),
|
||||||
};
|
};
|
||||||
|
|
||||||
// TODO: When teleport from instance done. Enable it
|
private static final Location[] TELEPORT_TO_ADEN =
|
||||||
/*
|
{
|
||||||
* private static final Location[] TELEPORT_TO_ADEN = { new Location(148053, 26935, -2206), new Location(148053, 28017, -2269), new Location(146558, 28017, -2269), new Location(146558, 26935, -2206), };
|
new Location(148053, 26935, -2206),
|
||||||
*/
|
new Location(148053, 28017, -2269),
|
||||||
|
new Location(146558, 28017, -2269),
|
||||||
|
new Location(146558, 26935, -2206),
|
||||||
|
};
|
||||||
|
|
||||||
public SevenSignsRBs()
|
public SevenSignsRBs()
|
||||||
{
|
{
|
||||||
super(ANAKIM_TEMPLATE_ID, LILITH_TEMPLATE_ID);
|
|
||||||
addStartNpc(ANAKIM_GATEKEEPER_SPIRIT, LILITH_GATEKEEPER_SPIRIT);
|
addStartNpc(ANAKIM_GATEKEEPER_SPIRIT, LILITH_GATEKEEPER_SPIRIT);
|
||||||
addTalkId(ANAKIM_GATEKEEPER_SPIRIT, LILITH_GATEKEEPER_SPIRIT, GATEKEEPER_SPIRIT_OUT_TELEPORT);
|
addTalkId(ANAKIM_GATEKEEPER_SPIRIT, LILITH_GATEKEEPER_SPIRIT, GATEKEEPER_SPIRIT_OUT_TELEPORT);
|
||||||
addKillId(ANAKIM, LILITH);
|
addKillId(ANAKIM, LILITH);
|
||||||
addAttackId(ANAKIM, LILITH);
|
addAttackId(ANAKIM, LILITH);
|
||||||
addInstanceLeaveId(ANAKIM_TEMPLATE_ID, LILITH_TEMPLATE_ID);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -83,6 +82,11 @@ public class SevenSignsRBs extends AbstractInstance
|
|||||||
{
|
{
|
||||||
case "ANAKIM_ENTER":
|
case "ANAKIM_ENTER":
|
||||||
{
|
{
|
||||||
|
if (DBSpawnManager.getInstance().getStatus(ANAKIM) != RaidBossStatus.ALIVE)
|
||||||
|
{
|
||||||
|
player.sendMessage("Anakim is not present at the moment");
|
||||||
|
break;
|
||||||
|
}
|
||||||
if (player.isInParty())
|
if (player.isInParty())
|
||||||
{
|
{
|
||||||
final Party party = player.getParty();
|
final Party party = player.getParty();
|
||||||
@@ -90,7 +94,7 @@ public class SevenSignsRBs extends AbstractInstance
|
|||||||
final List<Player> members = (isInCC) ? party.getCommandChannel().getMembers() : party.getMembers();
|
final List<Player> members = (isInCC) ? party.getCommandChannel().getMembers() : party.getMembers();
|
||||||
if (members.size() > (MAX_PLAYERS_IN_ZONE - ANAKIM_ZONE.getPlayersInside().size()))
|
if (members.size() > (MAX_PLAYERS_IN_ZONE - ANAKIM_ZONE.getPlayersInside().size()))
|
||||||
{
|
{
|
||||||
player.sendMessage("Lilith Sanctum reached 300 players. You cannot enter now.");
|
player.sendMessage("Anakims Sanctum reached " + MAX_PLAYERS_IN_ZONE + " players. You cannot enter now.");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -100,13 +104,13 @@ public class SevenSignsRBs extends AbstractInstance
|
|||||||
{
|
{
|
||||||
player.sendMessage("Player " + member.getName() + " must go closer to Gatekeeper Spirit.");
|
player.sendMessage("Player " + member.getName() + " must go closer to Gatekeeper Spirit.");
|
||||||
}
|
}
|
||||||
enterInstance(member, npc, ANAKIM_TEMPLATE_ID);
|
member.teleToLocation(TELEPORT_TO_ANAKIM);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (player.isGM())
|
else if (player.isGM())
|
||||||
{
|
{
|
||||||
enterInstance(player, npc, ANAKIM_TEMPLATE_ID);
|
player.teleToLocation(TELEPORT_TO_ANAKIM);
|
||||||
player.sendMessage("SYS: You have entered as GM/Admin to Anakim Instance");
|
player.sendMessage("SYS: You have entered as GM/Admin to Anakim Instance");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -114,13 +118,19 @@ public class SevenSignsRBs extends AbstractInstance
|
|||||||
if (!player.isInsideRadius3D(npc, 1000))
|
if (!player.isInsideRadius3D(npc, 1000))
|
||||||
{
|
{
|
||||||
player.sendMessage("You must go closer to Gatekeeper Spirit.");
|
player.sendMessage("You must go closer to Gatekeeper Spirit.");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
enterInstance(player, npc, ANAKIM_TEMPLATE_ID);
|
player.teleToLocation(TELEPORT_TO_ANAKIM);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "LILITH_ENTER":
|
case "LILITH_ENTER":
|
||||||
{
|
{
|
||||||
|
if (DBSpawnManager.getInstance().getStatus(LILITH) != RaidBossStatus.ALIVE)
|
||||||
|
{
|
||||||
|
player.sendMessage("Lilith is not present at the moment");
|
||||||
|
break;
|
||||||
|
}
|
||||||
if (player.isInParty())
|
if (player.isInParty())
|
||||||
{
|
{
|
||||||
final Party party = player.getParty();
|
final Party party = player.getParty();
|
||||||
@@ -128,7 +138,7 @@ public class SevenSignsRBs extends AbstractInstance
|
|||||||
final List<Player> members = (isInCC) ? party.getCommandChannel().getMembers() : party.getMembers();
|
final List<Player> members = (isInCC) ? party.getCommandChannel().getMembers() : party.getMembers();
|
||||||
if (members.size() > (MAX_PLAYERS_IN_ZONE - LILITH_ZONE.getPlayersInside().size()))
|
if (members.size() > (MAX_PLAYERS_IN_ZONE - LILITH_ZONE.getPlayersInside().size()))
|
||||||
{
|
{
|
||||||
player.sendMessage("Lilith Sanctum reached 300 players. You cannot enter now.");
|
player.sendMessage("Lilith Sanctum reached " + MAX_PLAYERS_IN_ZONE + " players. You cannot enter now.");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -138,13 +148,13 @@ public class SevenSignsRBs extends AbstractInstance
|
|||||||
{
|
{
|
||||||
player.sendMessage("Player " + member.getName() + " must go closer to Gatekeeper Spirit.");
|
player.sendMessage("Player " + member.getName() + " must go closer to Gatekeeper Spirit.");
|
||||||
}
|
}
|
||||||
enterInstance(member, npc, LILITH_TEMPLATE_ID);
|
member.teleToLocation(TELEPORT_TO_LILITH);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (player.isGM())
|
else if (player.isGM())
|
||||||
{
|
{
|
||||||
enterInstance(player, npc, LILITH_TEMPLATE_ID);
|
player.teleToLocation(TELEPORT_TO_LILITH);
|
||||||
player.sendMessage("SYS: You have entered as GM/Admin to Anakim Instance");
|
player.sendMessage("SYS: You have entered as GM/Admin to Anakim Instance");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -152,8 +162,9 @@ public class SevenSignsRBs extends AbstractInstance
|
|||||||
if (!player.isInsideRadius3D(npc, 1000))
|
if (!player.isInsideRadius3D(npc, 1000))
|
||||||
{
|
{
|
||||||
player.sendMessage("You must go closer to Gatekeeper Spirit.");
|
player.sendMessage("You must go closer to Gatekeeper Spirit.");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
enterInstance(player, npc, LILITH_TEMPLATE_ID);
|
player.teleToLocation(TELEPORT_TO_LILITH);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -181,34 +192,55 @@ public class SevenSignsRBs extends AbstractInstance
|
|||||||
}
|
}
|
||||||
case "TELEPORT_OUT":
|
case "TELEPORT_OUT":
|
||||||
{
|
{
|
||||||
// TODO: Different teleport location from instance.
|
if (ANAKIM_ZONE.isInsideZone(player.getLocation()))
|
||||||
// switch (player.getInstanceId())
|
{
|
||||||
// {
|
final Location destination = TELEPORT_TO_DARK_ELVEN[getRandom(TELEPORT_TO_DARK_ELVEN.length)];
|
||||||
// case ANAKIM_TEMPLATE_ID:
|
player.teleToLocation(destination.getX() + getRandom(100), destination.getY() + getRandom(100), destination.getZ());
|
||||||
// {
|
break;
|
||||||
// final Location destination = TELEPORT_TO_DARK_ELVEN[getRandom(TELEPORT_TO_DARK_ELVEN.length)];
|
}
|
||||||
// player.teleToLocation(destination.getX() + getRandom(100), destination.getY() + getRandom(100), destination.getZ());
|
if (LILITH_ZONE.isInsideZone(player.getLocation()))
|
||||||
// break;
|
{
|
||||||
// }
|
final Location destination = TELEPORT_TO_ADEN[getRandom(TELEPORT_TO_ADEN.length)];
|
||||||
// case LILITH_TEMPLATE_ID:
|
player.teleToLocation(destination.getX() + getRandom(100), destination.getY() + getRandom(100), destination.getZ());
|
||||||
// {
|
break;
|
||||||
// final Location destination = TELEPORT_TO_ADEN[getRandom(TELEPORT_TO_ADEN.length)];
|
}
|
||||||
// player.teleToLocation(destination.getX() + getRandom(100), destination.getY() + getRandom(100), destination.getZ());
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
final Location destination = TELEPORT_TO_DARK_ELVEN[getRandom(TELEPORT_TO_DARK_ELVEN.length)];
|
|
||||||
player.teleToLocation(destination.getX() + getRandom(100), destination.getY() + getRandom(100), destination.getZ());
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "ANAKIM_DEATH_CAST_LILITH_INVUL":
|
case "ANAKIM_DEATH_CAST_LILITH_INVUL":
|
||||||
{
|
{
|
||||||
// TODO: When one RB die, the second will be invul for 5 minutes.
|
if (DBSpawnManager.getInstance().getStatus(LILITH) == RaidBossStatus.ALIVE)
|
||||||
|
{
|
||||||
|
Npc LILITH_NPC = DBSpawnManager.getInstance().getNpcs().get(LILITH);
|
||||||
|
LILITH_NPC.setInvul(true);
|
||||||
|
LILITH_NPC.getEffectList().startAbnormalVisualEffect(AbnormalVisualEffect.INVINCIBILITY);
|
||||||
|
startQuestTimer("LILITH_INVUL_END", 300000, null, player);
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "LILITH_DEATH_CAST_ANAKIM_INVUL":
|
case "LILITH_DEATH_CAST_ANAKIM_INVUL":
|
||||||
{
|
{
|
||||||
// TODO: When one RB die, the second will be invul for 5 minutes.
|
if (DBSpawnManager.getInstance().getStatus(ANAKIM) == RaidBossStatus.ALIVE)
|
||||||
|
{
|
||||||
|
Npc ANAKIM_NPC = DBSpawnManager.getInstance().getNpcs().get(ANAKIM);
|
||||||
|
ANAKIM_NPC.setInvul(true);
|
||||||
|
ANAKIM_NPC.getEffectList().startAbnormalVisualEffect(AbnormalVisualEffect.INVINCIBILITY);
|
||||||
|
startQuestTimer("ANAKIM_INVUL_END", 300000, null, player);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "LILITH_INVUL_END":
|
||||||
|
{
|
||||||
|
Npc LILITH_NPC = DBSpawnManager.getInstance().getNpcs().get(LILITH);
|
||||||
|
LILITH_NPC.setInvul(false);
|
||||||
|
LILITH_NPC.getEffectList().stopAbnormalVisualEffect(AbnormalVisualEffect.INVINCIBILITY);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "ANAKIM_INVUL_END":
|
||||||
|
{
|
||||||
|
Npc ANAKIM_NPC = DBSpawnManager.getInstance().getNpcs().get(ANAKIM);
|
||||||
|
ANAKIM_NPC.setInvul(false);
|
||||||
|
ANAKIM_NPC.getEffectList().stopAbnormalVisualEffect(AbnormalVisualEffect.INVINCIBILITY);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -222,26 +254,17 @@ public class SevenSignsRBs extends AbstractInstance
|
|||||||
{
|
{
|
||||||
case ANAKIM:
|
case ANAKIM:
|
||||||
{
|
{
|
||||||
// TODO:
|
startQuestTimer("ANAKIM_DEATH_CAST_LILITH_INVUL", 1000, null, null);
|
||||||
// startQuestTimer("ANAKIM_DEATH_CAST_LILITH_INVUL", 1000, null, null);
|
|
||||||
startQuestTimer("REMOVE_PLAYERS_FROM_ZONE_ANAKIM", 600000, null, player);
|
|
||||||
addSpawn(GATEKEEPER_SPIRIT_OUT_TELEPORT, -6664, 18501, -5495, 0, false, 600000, false, npc.getInstanceId());
|
addSpawn(GATEKEEPER_SPIRIT_OUT_TELEPORT, -6664, 18501, -5495, 0, false, 600000, false, npc.getInstanceId());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case LILITH:
|
case LILITH:
|
||||||
{
|
{
|
||||||
// TODO:
|
startQuestTimer("LILITH_DEATH_CAST_ANAKIM_INVUL", 1000, null, null);
|
||||||
// startQuestTimer("LILITH_DEATH_CAST_ANAKIM_INVUL", 1000, null, null);
|
|
||||||
startQuestTimer("REMOVE_PLAYERS_FROM_ZONE_LILITH", 600000, null, player);
|
|
||||||
addSpawn(GATEKEEPER_SPIRIT_OUT_TELEPORT, 185062, -9612, -5493, 0, false, 600000, false, npc.getInstanceId());
|
addSpawn(GATEKEEPER_SPIRIT_OUT_TELEPORT, 185062, -9612, -5493, 0, false, 600000, false, npc.getInstanceId());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
final Instance world = npc.getInstanceWorld();
|
|
||||||
if (world != null)
|
|
||||||
{
|
|
||||||
world.finishInstance();
|
|
||||||
}
|
|
||||||
return super.onKill(npc, player, isSummon);
|
return super.onKill(npc, player, isSummon);
|
||||||
}
|
}
|
||||||
|
|
@@ -14,27 +14,28 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package instances.SevenSignsRBs;
|
package ai.bosses.SevenSignsRBs;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.l2jmobius.gameserver.enums.RaidBossStatus;
|
||||||
|
import org.l2jmobius.gameserver.instancemanager.DBSpawnManager;
|
||||||
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.Creature;
|
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||||
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.skill.AbnormalVisualEffect;
|
||||||
import org.l2jmobius.gameserver.model.zone.type.NoRestartZone;
|
import org.l2jmobius.gameserver.model.zone.type.NoRestartZone;
|
||||||
|
|
||||||
import instances.AbstractInstance;
|
import ai.AbstractNpcAI;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author RobikBobik
|
* @author RobikBobik
|
||||||
* @NOTE: Retail like work
|
* @NOTE: Retail like work
|
||||||
* @TODO: When one RB die, the second will be invul for 5 minutes.
|
|
||||||
*/
|
*/
|
||||||
public class SevenSignsRBs extends AbstractInstance
|
public class SevenSignsRBs extends AbstractNpcAI
|
||||||
{
|
{
|
||||||
// NPCs
|
// NPCs
|
||||||
private static final int ANAKIM_GATEKEEPER_SPIRIT = 31089;
|
private static final int ANAKIM_GATEKEEPER_SPIRIT = 31089;
|
||||||
@@ -42,17 +43,14 @@ public class SevenSignsRBs extends AbstractInstance
|
|||||||
private static final int GATEKEEPER_SPIRIT_OUT_TELEPORT = 31088;
|
private static final int GATEKEEPER_SPIRIT_OUT_TELEPORT = 31088;
|
||||||
private static final int ANAKIM = 25286;
|
private static final int ANAKIM = 25286;
|
||||||
private static final int LILITH = 25283;
|
private static final int LILITH = 25283;
|
||||||
|
|
||||||
// Misc
|
// Misc
|
||||||
private static final int ANAKIM_TEMPLATE_ID = 200;
|
|
||||||
private static final int LILITH_TEMPLATE_ID = 199;
|
|
||||||
|
|
||||||
private static final int MAX_PLAYERS_IN_ZONE = 300;
|
private static final int MAX_PLAYERS_IN_ZONE = 300;
|
||||||
|
|
||||||
private static final NoRestartZone ANAKIM_ZONE = ZoneManager.getInstance().getZoneById(70052, NoRestartZone.class);
|
private static final NoRestartZone ANAKIM_ZONE = ZoneManager.getInstance().getZoneById(70052, NoRestartZone.class);
|
||||||
private static final NoRestartZone LILITH_ZONE = ZoneManager.getInstance().getZoneById(70053, NoRestartZone.class);
|
private static final NoRestartZone LILITH_ZONE = ZoneManager.getInstance().getZoneById(70053, NoRestartZone.class);
|
||||||
|
|
||||||
// TELEPORTS
|
// TELEPORTS
|
||||||
|
private static final Location TELEPORT_TO_LILITH = new Location(185657, -10112, -5496);
|
||||||
|
private static final Location TELEPORT_TO_ANAKIM = new Location(-7283, 19086, -5496);
|
||||||
|
|
||||||
private static final Location[] TELEPORT_TO_DARK_ELVEN =
|
private static final Location[] TELEPORT_TO_DARK_ELVEN =
|
||||||
{
|
{
|
||||||
new Location(12168, 17149, -4575),
|
new Location(12168, 17149, -4575),
|
||||||
@@ -61,19 +59,20 @@ public class SevenSignsRBs extends AbstractInstance
|
|||||||
new Location(11169, 15922, -4585),
|
new Location(11169, 15922, -4585),
|
||||||
};
|
};
|
||||||
|
|
||||||
// TODO: When teleport from instance done. Enable it
|
private static final Location[] TELEPORT_TO_ADEN =
|
||||||
/*
|
{
|
||||||
* private static final Location[] TELEPORT_TO_ADEN = { new Location(148053, 26935, -2206), new Location(148053, 28017, -2269), new Location(146558, 28017, -2269), new Location(146558, 26935, -2206), };
|
new Location(148053, 26935, -2206),
|
||||||
*/
|
new Location(148053, 28017, -2269),
|
||||||
|
new Location(146558, 28017, -2269),
|
||||||
|
new Location(146558, 26935, -2206),
|
||||||
|
};
|
||||||
|
|
||||||
public SevenSignsRBs()
|
public SevenSignsRBs()
|
||||||
{
|
{
|
||||||
super(ANAKIM_TEMPLATE_ID, LILITH_TEMPLATE_ID);
|
|
||||||
addStartNpc(ANAKIM_GATEKEEPER_SPIRIT, LILITH_GATEKEEPER_SPIRIT);
|
addStartNpc(ANAKIM_GATEKEEPER_SPIRIT, LILITH_GATEKEEPER_SPIRIT);
|
||||||
addTalkId(ANAKIM_GATEKEEPER_SPIRIT, LILITH_GATEKEEPER_SPIRIT, GATEKEEPER_SPIRIT_OUT_TELEPORT);
|
addTalkId(ANAKIM_GATEKEEPER_SPIRIT, LILITH_GATEKEEPER_SPIRIT, GATEKEEPER_SPIRIT_OUT_TELEPORT);
|
||||||
addKillId(ANAKIM, LILITH);
|
addKillId(ANAKIM, LILITH);
|
||||||
addAttackId(ANAKIM, LILITH);
|
addAttackId(ANAKIM, LILITH);
|
||||||
addInstanceLeaveId(ANAKIM_TEMPLATE_ID, LILITH_TEMPLATE_ID);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -83,6 +82,11 @@ public class SevenSignsRBs extends AbstractInstance
|
|||||||
{
|
{
|
||||||
case "ANAKIM_ENTER":
|
case "ANAKIM_ENTER":
|
||||||
{
|
{
|
||||||
|
if (DBSpawnManager.getInstance().getStatus(ANAKIM) != RaidBossStatus.ALIVE)
|
||||||
|
{
|
||||||
|
player.sendMessage("Anakim is not present at the moment");
|
||||||
|
break;
|
||||||
|
}
|
||||||
if (player.isInParty())
|
if (player.isInParty())
|
||||||
{
|
{
|
||||||
final Party party = player.getParty();
|
final Party party = player.getParty();
|
||||||
@@ -90,7 +94,7 @@ public class SevenSignsRBs extends AbstractInstance
|
|||||||
final List<Player> members = (isInCC) ? party.getCommandChannel().getMembers() : party.getMembers();
|
final List<Player> members = (isInCC) ? party.getCommandChannel().getMembers() : party.getMembers();
|
||||||
if (members.size() > (MAX_PLAYERS_IN_ZONE - ANAKIM_ZONE.getPlayersInside().size()))
|
if (members.size() > (MAX_PLAYERS_IN_ZONE - ANAKIM_ZONE.getPlayersInside().size()))
|
||||||
{
|
{
|
||||||
player.sendMessage("Lilith Sanctum reached 300 players. You cannot enter now.");
|
player.sendMessage("Anakims Sanctum reached " + MAX_PLAYERS_IN_ZONE + " players. You cannot enter now.");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -100,13 +104,13 @@ public class SevenSignsRBs extends AbstractInstance
|
|||||||
{
|
{
|
||||||
player.sendMessage("Player " + member.getName() + " must go closer to Gatekeeper Spirit.");
|
player.sendMessage("Player " + member.getName() + " must go closer to Gatekeeper Spirit.");
|
||||||
}
|
}
|
||||||
enterInstance(member, npc, ANAKIM_TEMPLATE_ID);
|
member.teleToLocation(TELEPORT_TO_ANAKIM);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (player.isGM())
|
else if (player.isGM())
|
||||||
{
|
{
|
||||||
enterInstance(player, npc, ANAKIM_TEMPLATE_ID);
|
player.teleToLocation(TELEPORT_TO_ANAKIM);
|
||||||
player.sendMessage("SYS: You have entered as GM/Admin to Anakim Instance");
|
player.sendMessage("SYS: You have entered as GM/Admin to Anakim Instance");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -114,13 +118,19 @@ public class SevenSignsRBs extends AbstractInstance
|
|||||||
if (!player.isInsideRadius3D(npc, 1000))
|
if (!player.isInsideRadius3D(npc, 1000))
|
||||||
{
|
{
|
||||||
player.sendMessage("You must go closer to Gatekeeper Spirit.");
|
player.sendMessage("You must go closer to Gatekeeper Spirit.");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
enterInstance(player, npc, ANAKIM_TEMPLATE_ID);
|
player.teleToLocation(TELEPORT_TO_ANAKIM);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "LILITH_ENTER":
|
case "LILITH_ENTER":
|
||||||
{
|
{
|
||||||
|
if (DBSpawnManager.getInstance().getStatus(LILITH) != RaidBossStatus.ALIVE)
|
||||||
|
{
|
||||||
|
player.sendMessage("Lilith is not present at the moment");
|
||||||
|
break;
|
||||||
|
}
|
||||||
if (player.isInParty())
|
if (player.isInParty())
|
||||||
{
|
{
|
||||||
final Party party = player.getParty();
|
final Party party = player.getParty();
|
||||||
@@ -128,7 +138,7 @@ public class SevenSignsRBs extends AbstractInstance
|
|||||||
final List<Player> members = (isInCC) ? party.getCommandChannel().getMembers() : party.getMembers();
|
final List<Player> members = (isInCC) ? party.getCommandChannel().getMembers() : party.getMembers();
|
||||||
if (members.size() > (MAX_PLAYERS_IN_ZONE - LILITH_ZONE.getPlayersInside().size()))
|
if (members.size() > (MAX_PLAYERS_IN_ZONE - LILITH_ZONE.getPlayersInside().size()))
|
||||||
{
|
{
|
||||||
player.sendMessage("Lilith Sanctum reached 300 players. You cannot enter now.");
|
player.sendMessage("Lilith Sanctum reached " + MAX_PLAYERS_IN_ZONE + " players. You cannot enter now.");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -138,13 +148,13 @@ public class SevenSignsRBs extends AbstractInstance
|
|||||||
{
|
{
|
||||||
player.sendMessage("Player " + member.getName() + " must go closer to Gatekeeper Spirit.");
|
player.sendMessage("Player " + member.getName() + " must go closer to Gatekeeper Spirit.");
|
||||||
}
|
}
|
||||||
enterInstance(member, npc, LILITH_TEMPLATE_ID);
|
member.teleToLocation(TELEPORT_TO_LILITH);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (player.isGM())
|
else if (player.isGM())
|
||||||
{
|
{
|
||||||
enterInstance(player, npc, LILITH_TEMPLATE_ID);
|
player.teleToLocation(TELEPORT_TO_LILITH);
|
||||||
player.sendMessage("SYS: You have entered as GM/Admin to Anakim Instance");
|
player.sendMessage("SYS: You have entered as GM/Admin to Anakim Instance");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -152,8 +162,9 @@ public class SevenSignsRBs extends AbstractInstance
|
|||||||
if (!player.isInsideRadius3D(npc, 1000))
|
if (!player.isInsideRadius3D(npc, 1000))
|
||||||
{
|
{
|
||||||
player.sendMessage("You must go closer to Gatekeeper Spirit.");
|
player.sendMessage("You must go closer to Gatekeeper Spirit.");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
enterInstance(player, npc, LILITH_TEMPLATE_ID);
|
player.teleToLocation(TELEPORT_TO_LILITH);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -181,34 +192,55 @@ public class SevenSignsRBs extends AbstractInstance
|
|||||||
}
|
}
|
||||||
case "TELEPORT_OUT":
|
case "TELEPORT_OUT":
|
||||||
{
|
{
|
||||||
// TODO: Different teleport location from instance.
|
if (ANAKIM_ZONE.isInsideZone(player.getLocation()))
|
||||||
// switch (player.getInstanceId())
|
{
|
||||||
// {
|
final Location destination = TELEPORT_TO_DARK_ELVEN[getRandom(TELEPORT_TO_DARK_ELVEN.length)];
|
||||||
// case ANAKIM_TEMPLATE_ID:
|
player.teleToLocation(destination.getX() + getRandom(100), destination.getY() + getRandom(100), destination.getZ());
|
||||||
// {
|
break;
|
||||||
// final Location destination = TELEPORT_TO_DARK_ELVEN[getRandom(TELEPORT_TO_DARK_ELVEN.length)];
|
}
|
||||||
// player.teleToLocation(destination.getX() + getRandom(100), destination.getY() + getRandom(100), destination.getZ());
|
if (LILITH_ZONE.isInsideZone(player.getLocation()))
|
||||||
// break;
|
{
|
||||||
// }
|
final Location destination = TELEPORT_TO_ADEN[getRandom(TELEPORT_TO_ADEN.length)];
|
||||||
// case LILITH_TEMPLATE_ID:
|
player.teleToLocation(destination.getX() + getRandom(100), destination.getY() + getRandom(100), destination.getZ());
|
||||||
// {
|
break;
|
||||||
// final Location destination = TELEPORT_TO_ADEN[getRandom(TELEPORT_TO_ADEN.length)];
|
}
|
||||||
// player.teleToLocation(destination.getX() + getRandom(100), destination.getY() + getRandom(100), destination.getZ());
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
final Location destination = TELEPORT_TO_DARK_ELVEN[getRandom(TELEPORT_TO_DARK_ELVEN.length)];
|
|
||||||
player.teleToLocation(destination.getX() + getRandom(100), destination.getY() + getRandom(100), destination.getZ());
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "ANAKIM_DEATH_CAST_LILITH_INVUL":
|
case "ANAKIM_DEATH_CAST_LILITH_INVUL":
|
||||||
{
|
{
|
||||||
// TODO: When one RB die, the second will be invul for 5 minutes.
|
if (DBSpawnManager.getInstance().getStatus(LILITH) == RaidBossStatus.ALIVE)
|
||||||
|
{
|
||||||
|
Npc LILITH_NPC = DBSpawnManager.getInstance().getNpcs().get(LILITH);
|
||||||
|
LILITH_NPC.setInvul(true);
|
||||||
|
LILITH_NPC.getEffectList().startAbnormalVisualEffect(AbnormalVisualEffect.INVINCIBILITY);
|
||||||
|
startQuestTimer("LILITH_INVUL_END", 300000, null, player);
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "LILITH_DEATH_CAST_ANAKIM_INVUL":
|
case "LILITH_DEATH_CAST_ANAKIM_INVUL":
|
||||||
{
|
{
|
||||||
// TODO: When one RB die, the second will be invul for 5 minutes.
|
if (DBSpawnManager.getInstance().getStatus(ANAKIM) == RaidBossStatus.ALIVE)
|
||||||
|
{
|
||||||
|
Npc ANAKIM_NPC = DBSpawnManager.getInstance().getNpcs().get(ANAKIM);
|
||||||
|
ANAKIM_NPC.setInvul(true);
|
||||||
|
ANAKIM_NPC.getEffectList().startAbnormalVisualEffect(AbnormalVisualEffect.INVINCIBILITY);
|
||||||
|
startQuestTimer("ANAKIM_INVUL_END", 300000, null, player);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "LILITH_INVUL_END":
|
||||||
|
{
|
||||||
|
Npc LILITH_NPC = DBSpawnManager.getInstance().getNpcs().get(LILITH);
|
||||||
|
LILITH_NPC.setInvul(false);
|
||||||
|
LILITH_NPC.getEffectList().stopAbnormalVisualEffect(AbnormalVisualEffect.INVINCIBILITY);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "ANAKIM_INVUL_END":
|
||||||
|
{
|
||||||
|
Npc ANAKIM_NPC = DBSpawnManager.getInstance().getNpcs().get(ANAKIM);
|
||||||
|
ANAKIM_NPC.setInvul(false);
|
||||||
|
ANAKIM_NPC.getEffectList().stopAbnormalVisualEffect(AbnormalVisualEffect.INVINCIBILITY);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -222,26 +254,17 @@ public class SevenSignsRBs extends AbstractInstance
|
|||||||
{
|
{
|
||||||
case ANAKIM:
|
case ANAKIM:
|
||||||
{
|
{
|
||||||
// TODO:
|
startQuestTimer("ANAKIM_DEATH_CAST_LILITH_INVUL", 1000, null, null);
|
||||||
// startQuestTimer("ANAKIM_DEATH_CAST_LILITH_INVUL", 1000, null, null);
|
|
||||||
startQuestTimer("REMOVE_PLAYERS_FROM_ZONE_ANAKIM", 600000, null, player);
|
|
||||||
addSpawn(GATEKEEPER_SPIRIT_OUT_TELEPORT, -6664, 18501, -5495, 0, false, 600000, false, npc.getInstanceId());
|
addSpawn(GATEKEEPER_SPIRIT_OUT_TELEPORT, -6664, 18501, -5495, 0, false, 600000, false, npc.getInstanceId());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case LILITH:
|
case LILITH:
|
||||||
{
|
{
|
||||||
// TODO:
|
startQuestTimer("LILITH_DEATH_CAST_ANAKIM_INVUL", 1000, null, null);
|
||||||
// startQuestTimer("LILITH_DEATH_CAST_ANAKIM_INVUL", 1000, null, null);
|
|
||||||
startQuestTimer("REMOVE_PLAYERS_FROM_ZONE_LILITH", 600000, null, player);
|
|
||||||
addSpawn(GATEKEEPER_SPIRIT_OUT_TELEPORT, 185062, -9612, -5493, 0, false, 600000, false, npc.getInstanceId());
|
addSpawn(GATEKEEPER_SPIRIT_OUT_TELEPORT, 185062, -9612, -5493, 0, false, 600000, false, npc.getInstanceId());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
final Instance world = npc.getInstanceWorld();
|
|
||||||
if (world != null)
|
|
||||||
{
|
|
||||||
world.finishInstance();
|
|
||||||
}
|
|
||||||
return super.onKill(npc, player, isSummon);
|
return super.onKill(npc, player, isSummon);
|
||||||
}
|
}
|
||||||
|
|
@@ -14,27 +14,28 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package instances.SevenSignsRBs;
|
package ai.bosses.SevenSignsRBs;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.l2jmobius.gameserver.enums.RaidBossStatus;
|
||||||
|
import org.l2jmobius.gameserver.instancemanager.DBSpawnManager;
|
||||||
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.Creature;
|
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||||
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.skill.AbnormalVisualEffect;
|
||||||
import org.l2jmobius.gameserver.model.zone.type.NoRestartZone;
|
import org.l2jmobius.gameserver.model.zone.type.NoRestartZone;
|
||||||
|
|
||||||
import instances.AbstractInstance;
|
import ai.AbstractNpcAI;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author RobikBobik
|
* @author RobikBobik
|
||||||
* @NOTE: Retail like work
|
* @NOTE: Retail like work
|
||||||
* @TODO: When one RB die, the second will be invul for 5 minutes.
|
|
||||||
*/
|
*/
|
||||||
public class SevenSignsRBs extends AbstractInstance
|
public class SevenSignsRBs extends AbstractNpcAI
|
||||||
{
|
{
|
||||||
// NPCs
|
// NPCs
|
||||||
private static final int ANAKIM_GATEKEEPER_SPIRIT = 31089;
|
private static final int ANAKIM_GATEKEEPER_SPIRIT = 31089;
|
||||||
@@ -42,17 +43,14 @@ public class SevenSignsRBs extends AbstractInstance
|
|||||||
private static final int GATEKEEPER_SPIRIT_OUT_TELEPORT = 31088;
|
private static final int GATEKEEPER_SPIRIT_OUT_TELEPORT = 31088;
|
||||||
private static final int ANAKIM = 25286;
|
private static final int ANAKIM = 25286;
|
||||||
private static final int LILITH = 25283;
|
private static final int LILITH = 25283;
|
||||||
|
|
||||||
// Misc
|
// Misc
|
||||||
private static final int ANAKIM_TEMPLATE_ID = 200;
|
|
||||||
private static final int LILITH_TEMPLATE_ID = 199;
|
|
||||||
|
|
||||||
private static final int MAX_PLAYERS_IN_ZONE = 300;
|
private static final int MAX_PLAYERS_IN_ZONE = 300;
|
||||||
|
|
||||||
private static final NoRestartZone ANAKIM_ZONE = ZoneManager.getInstance().getZoneById(70052, NoRestartZone.class);
|
private static final NoRestartZone ANAKIM_ZONE = ZoneManager.getInstance().getZoneById(70052, NoRestartZone.class);
|
||||||
private static final NoRestartZone LILITH_ZONE = ZoneManager.getInstance().getZoneById(70053, NoRestartZone.class);
|
private static final NoRestartZone LILITH_ZONE = ZoneManager.getInstance().getZoneById(70053, NoRestartZone.class);
|
||||||
|
|
||||||
// TELEPORTS
|
// TELEPORTS
|
||||||
|
private static final Location TELEPORT_TO_LILITH = new Location(185657, -10112, -5496);
|
||||||
|
private static final Location TELEPORT_TO_ANAKIM = new Location(-7283, 19086, -5496);
|
||||||
|
|
||||||
private static final Location[] TELEPORT_TO_DARK_ELVEN =
|
private static final Location[] TELEPORT_TO_DARK_ELVEN =
|
||||||
{
|
{
|
||||||
new Location(12168, 17149, -4575),
|
new Location(12168, 17149, -4575),
|
||||||
@@ -61,19 +59,20 @@ public class SevenSignsRBs extends AbstractInstance
|
|||||||
new Location(11169, 15922, -4585),
|
new Location(11169, 15922, -4585),
|
||||||
};
|
};
|
||||||
|
|
||||||
// TODO: When teleport from instance done. Enable it
|
private static final Location[] TELEPORT_TO_ADEN =
|
||||||
/*
|
{
|
||||||
* private static final Location[] TELEPORT_TO_ADEN = { new Location(148053, 26935, -2206), new Location(148053, 28017, -2269), new Location(146558, 28017, -2269), new Location(146558, 26935, -2206), };
|
new Location(148053, 26935, -2206),
|
||||||
*/
|
new Location(148053, 28017, -2269),
|
||||||
|
new Location(146558, 28017, -2269),
|
||||||
|
new Location(146558, 26935, -2206),
|
||||||
|
};
|
||||||
|
|
||||||
public SevenSignsRBs()
|
public SevenSignsRBs()
|
||||||
{
|
{
|
||||||
super(ANAKIM_TEMPLATE_ID, LILITH_TEMPLATE_ID);
|
|
||||||
addStartNpc(ANAKIM_GATEKEEPER_SPIRIT, LILITH_GATEKEEPER_SPIRIT);
|
addStartNpc(ANAKIM_GATEKEEPER_SPIRIT, LILITH_GATEKEEPER_SPIRIT);
|
||||||
addTalkId(ANAKIM_GATEKEEPER_SPIRIT, LILITH_GATEKEEPER_SPIRIT, GATEKEEPER_SPIRIT_OUT_TELEPORT);
|
addTalkId(ANAKIM_GATEKEEPER_SPIRIT, LILITH_GATEKEEPER_SPIRIT, GATEKEEPER_SPIRIT_OUT_TELEPORT);
|
||||||
addKillId(ANAKIM, LILITH);
|
addKillId(ANAKIM, LILITH);
|
||||||
addAttackId(ANAKIM, LILITH);
|
addAttackId(ANAKIM, LILITH);
|
||||||
addInstanceLeaveId(ANAKIM_TEMPLATE_ID, LILITH_TEMPLATE_ID);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -83,6 +82,11 @@ public class SevenSignsRBs extends AbstractInstance
|
|||||||
{
|
{
|
||||||
case "ANAKIM_ENTER":
|
case "ANAKIM_ENTER":
|
||||||
{
|
{
|
||||||
|
if (DBSpawnManager.getInstance().getStatus(ANAKIM) != RaidBossStatus.ALIVE)
|
||||||
|
{
|
||||||
|
player.sendMessage("Anakim is not present at the moment");
|
||||||
|
break;
|
||||||
|
}
|
||||||
if (player.isInParty())
|
if (player.isInParty())
|
||||||
{
|
{
|
||||||
final Party party = player.getParty();
|
final Party party = player.getParty();
|
||||||
@@ -90,7 +94,7 @@ public class SevenSignsRBs extends AbstractInstance
|
|||||||
final List<Player> members = (isInCC) ? party.getCommandChannel().getMembers() : party.getMembers();
|
final List<Player> members = (isInCC) ? party.getCommandChannel().getMembers() : party.getMembers();
|
||||||
if (members.size() > (MAX_PLAYERS_IN_ZONE - ANAKIM_ZONE.getPlayersInside().size()))
|
if (members.size() > (MAX_PLAYERS_IN_ZONE - ANAKIM_ZONE.getPlayersInside().size()))
|
||||||
{
|
{
|
||||||
player.sendMessage("Lilith Sanctum reached 300 players. You cannot enter now.");
|
player.sendMessage("Anakims Sanctum reached " + MAX_PLAYERS_IN_ZONE + " players. You cannot enter now.");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -100,13 +104,13 @@ public class SevenSignsRBs extends AbstractInstance
|
|||||||
{
|
{
|
||||||
player.sendMessage("Player " + member.getName() + " must go closer to Gatekeeper Spirit.");
|
player.sendMessage("Player " + member.getName() + " must go closer to Gatekeeper Spirit.");
|
||||||
}
|
}
|
||||||
enterInstance(member, npc, ANAKIM_TEMPLATE_ID);
|
member.teleToLocation(TELEPORT_TO_ANAKIM);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (player.isGM())
|
else if (player.isGM())
|
||||||
{
|
{
|
||||||
enterInstance(player, npc, ANAKIM_TEMPLATE_ID);
|
player.teleToLocation(TELEPORT_TO_ANAKIM);
|
||||||
player.sendMessage("SYS: You have entered as GM/Admin to Anakim Instance");
|
player.sendMessage("SYS: You have entered as GM/Admin to Anakim Instance");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -114,13 +118,19 @@ public class SevenSignsRBs extends AbstractInstance
|
|||||||
if (!player.isInsideRadius3D(npc, 1000))
|
if (!player.isInsideRadius3D(npc, 1000))
|
||||||
{
|
{
|
||||||
player.sendMessage("You must go closer to Gatekeeper Spirit.");
|
player.sendMessage("You must go closer to Gatekeeper Spirit.");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
enterInstance(player, npc, ANAKIM_TEMPLATE_ID);
|
player.teleToLocation(TELEPORT_TO_ANAKIM);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "LILITH_ENTER":
|
case "LILITH_ENTER":
|
||||||
{
|
{
|
||||||
|
if (DBSpawnManager.getInstance().getStatus(LILITH) != RaidBossStatus.ALIVE)
|
||||||
|
{
|
||||||
|
player.sendMessage("Lilith is not present at the moment");
|
||||||
|
break;
|
||||||
|
}
|
||||||
if (player.isInParty())
|
if (player.isInParty())
|
||||||
{
|
{
|
||||||
final Party party = player.getParty();
|
final Party party = player.getParty();
|
||||||
@@ -128,7 +138,7 @@ public class SevenSignsRBs extends AbstractInstance
|
|||||||
final List<Player> members = (isInCC) ? party.getCommandChannel().getMembers() : party.getMembers();
|
final List<Player> members = (isInCC) ? party.getCommandChannel().getMembers() : party.getMembers();
|
||||||
if (members.size() > (MAX_PLAYERS_IN_ZONE - LILITH_ZONE.getPlayersInside().size()))
|
if (members.size() > (MAX_PLAYERS_IN_ZONE - LILITH_ZONE.getPlayersInside().size()))
|
||||||
{
|
{
|
||||||
player.sendMessage("Lilith Sanctum reached 300 players. You cannot enter now.");
|
player.sendMessage("Lilith Sanctum reached " + MAX_PLAYERS_IN_ZONE + " players. You cannot enter now.");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -138,13 +148,13 @@ public class SevenSignsRBs extends AbstractInstance
|
|||||||
{
|
{
|
||||||
player.sendMessage("Player " + member.getName() + " must go closer to Gatekeeper Spirit.");
|
player.sendMessage("Player " + member.getName() + " must go closer to Gatekeeper Spirit.");
|
||||||
}
|
}
|
||||||
enterInstance(member, npc, LILITH_TEMPLATE_ID);
|
member.teleToLocation(TELEPORT_TO_LILITH);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (player.isGM())
|
else if (player.isGM())
|
||||||
{
|
{
|
||||||
enterInstance(player, npc, LILITH_TEMPLATE_ID);
|
player.teleToLocation(TELEPORT_TO_LILITH);
|
||||||
player.sendMessage("SYS: You have entered as GM/Admin to Anakim Instance");
|
player.sendMessage("SYS: You have entered as GM/Admin to Anakim Instance");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -152,8 +162,9 @@ public class SevenSignsRBs extends AbstractInstance
|
|||||||
if (!player.isInsideRadius3D(npc, 1000))
|
if (!player.isInsideRadius3D(npc, 1000))
|
||||||
{
|
{
|
||||||
player.sendMessage("You must go closer to Gatekeeper Spirit.");
|
player.sendMessage("You must go closer to Gatekeeper Spirit.");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
enterInstance(player, npc, LILITH_TEMPLATE_ID);
|
player.teleToLocation(TELEPORT_TO_LILITH);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -181,34 +192,55 @@ public class SevenSignsRBs extends AbstractInstance
|
|||||||
}
|
}
|
||||||
case "TELEPORT_OUT":
|
case "TELEPORT_OUT":
|
||||||
{
|
{
|
||||||
// TODO: Different teleport location from instance.
|
if (ANAKIM_ZONE.isInsideZone(player.getLocation()))
|
||||||
// switch (player.getInstanceId())
|
{
|
||||||
// {
|
final Location destination = TELEPORT_TO_DARK_ELVEN[getRandom(TELEPORT_TO_DARK_ELVEN.length)];
|
||||||
// case ANAKIM_TEMPLATE_ID:
|
player.teleToLocation(destination.getX() + getRandom(100), destination.getY() + getRandom(100), destination.getZ());
|
||||||
// {
|
break;
|
||||||
// final Location destination = TELEPORT_TO_DARK_ELVEN[getRandom(TELEPORT_TO_DARK_ELVEN.length)];
|
}
|
||||||
// player.teleToLocation(destination.getX() + getRandom(100), destination.getY() + getRandom(100), destination.getZ());
|
if (LILITH_ZONE.isInsideZone(player.getLocation()))
|
||||||
// break;
|
{
|
||||||
// }
|
final Location destination = TELEPORT_TO_ADEN[getRandom(TELEPORT_TO_ADEN.length)];
|
||||||
// case LILITH_TEMPLATE_ID:
|
player.teleToLocation(destination.getX() + getRandom(100), destination.getY() + getRandom(100), destination.getZ());
|
||||||
// {
|
break;
|
||||||
// final Location destination = TELEPORT_TO_ADEN[getRandom(TELEPORT_TO_ADEN.length)];
|
}
|
||||||
// player.teleToLocation(destination.getX() + getRandom(100), destination.getY() + getRandom(100), destination.getZ());
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
final Location destination = TELEPORT_TO_DARK_ELVEN[getRandom(TELEPORT_TO_DARK_ELVEN.length)];
|
|
||||||
player.teleToLocation(destination.getX() + getRandom(100), destination.getY() + getRandom(100), destination.getZ());
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "ANAKIM_DEATH_CAST_LILITH_INVUL":
|
case "ANAKIM_DEATH_CAST_LILITH_INVUL":
|
||||||
{
|
{
|
||||||
// TODO: When one RB die, the second will be invul for 5 minutes.
|
if (DBSpawnManager.getInstance().getStatus(LILITH) == RaidBossStatus.ALIVE)
|
||||||
|
{
|
||||||
|
Npc LILITH_NPC = DBSpawnManager.getInstance().getNpcs().get(LILITH);
|
||||||
|
LILITH_NPC.setInvul(true);
|
||||||
|
LILITH_NPC.getEffectList().startAbnormalVisualEffect(AbnormalVisualEffect.INVINCIBILITY);
|
||||||
|
startQuestTimer("LILITH_INVUL_END", 300000, null, player);
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "LILITH_DEATH_CAST_ANAKIM_INVUL":
|
case "LILITH_DEATH_CAST_ANAKIM_INVUL":
|
||||||
{
|
{
|
||||||
// TODO: When one RB die, the second will be invul for 5 minutes.
|
if (DBSpawnManager.getInstance().getStatus(ANAKIM) == RaidBossStatus.ALIVE)
|
||||||
|
{
|
||||||
|
Npc ANAKIM_NPC = DBSpawnManager.getInstance().getNpcs().get(ANAKIM);
|
||||||
|
ANAKIM_NPC.setInvul(true);
|
||||||
|
ANAKIM_NPC.getEffectList().startAbnormalVisualEffect(AbnormalVisualEffect.INVINCIBILITY);
|
||||||
|
startQuestTimer("ANAKIM_INVUL_END", 300000, null, player);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "LILITH_INVUL_END":
|
||||||
|
{
|
||||||
|
Npc LILITH_NPC = DBSpawnManager.getInstance().getNpcs().get(LILITH);
|
||||||
|
LILITH_NPC.setInvul(false);
|
||||||
|
LILITH_NPC.getEffectList().stopAbnormalVisualEffect(AbnormalVisualEffect.INVINCIBILITY);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "ANAKIM_INVUL_END":
|
||||||
|
{
|
||||||
|
Npc ANAKIM_NPC = DBSpawnManager.getInstance().getNpcs().get(ANAKIM);
|
||||||
|
ANAKIM_NPC.setInvul(false);
|
||||||
|
ANAKIM_NPC.getEffectList().stopAbnormalVisualEffect(AbnormalVisualEffect.INVINCIBILITY);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -222,26 +254,17 @@ public class SevenSignsRBs extends AbstractInstance
|
|||||||
{
|
{
|
||||||
case ANAKIM:
|
case ANAKIM:
|
||||||
{
|
{
|
||||||
// TODO:
|
startQuestTimer("ANAKIM_DEATH_CAST_LILITH_INVUL", 1000, null, null);
|
||||||
// startQuestTimer("ANAKIM_DEATH_CAST_LILITH_INVUL", 1000, null, null);
|
|
||||||
startQuestTimer("REMOVE_PLAYERS_FROM_ZONE_ANAKIM", 600000, null, player);
|
|
||||||
addSpawn(GATEKEEPER_SPIRIT_OUT_TELEPORT, -6664, 18501, -5495, 0, false, 600000, false, npc.getInstanceId());
|
addSpawn(GATEKEEPER_SPIRIT_OUT_TELEPORT, -6664, 18501, -5495, 0, false, 600000, false, npc.getInstanceId());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case LILITH:
|
case LILITH:
|
||||||
{
|
{
|
||||||
// TODO:
|
startQuestTimer("LILITH_DEATH_CAST_ANAKIM_INVUL", 1000, null, null);
|
||||||
// startQuestTimer("LILITH_DEATH_CAST_ANAKIM_INVUL", 1000, null, null);
|
|
||||||
startQuestTimer("REMOVE_PLAYERS_FROM_ZONE_LILITH", 600000, null, player);
|
|
||||||
addSpawn(GATEKEEPER_SPIRIT_OUT_TELEPORT, 185062, -9612, -5493, 0, false, 600000, false, npc.getInstanceId());
|
addSpawn(GATEKEEPER_SPIRIT_OUT_TELEPORT, 185062, -9612, -5493, 0, false, 600000, false, npc.getInstanceId());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
final Instance world = npc.getInstanceWorld();
|
|
||||||
if (world != null)
|
|
||||||
{
|
|
||||||
world.finishInstance();
|
|
||||||
}
|
|
||||||
return super.onKill(npc, player, isSummon);
|
return super.onKill(npc, player, isSummon);
|
||||||
}
|
}
|
||||||
|
|
@@ -1,252 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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.SevenSignsRBs;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
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.type.NoRestartZone;
|
|
||||||
|
|
||||||
import instances.AbstractInstance;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author RobikBobik
|
|
||||||
* @NOTE: Retail like work
|
|
||||||
* @TODO: When one RB die, the second will be invul for 5 minutes.
|
|
||||||
*/
|
|
||||||
public class SevenSignsRBs extends AbstractInstance
|
|
||||||
{
|
|
||||||
// NPCs
|
|
||||||
private static final int ANAKIM_GATEKEEPER_SPIRIT = 31089;
|
|
||||||
private static final int LILITH_GATEKEEPER_SPIRIT = 31087;
|
|
||||||
private static final int GATEKEEPER_SPIRIT_OUT_TELEPORT = 31088;
|
|
||||||
private static final int ANAKIM = 25286;
|
|
||||||
private static final int LILITH = 25283;
|
|
||||||
|
|
||||||
// Misc
|
|
||||||
private static final int ANAKIM_TEMPLATE_ID = 200;
|
|
||||||
private static final int LILITH_TEMPLATE_ID = 199;
|
|
||||||
|
|
||||||
private static final int MAX_PLAYERS_IN_ZONE = 300;
|
|
||||||
|
|
||||||
private static final NoRestartZone ANAKIM_ZONE = ZoneManager.getInstance().getZoneById(70052, NoRestartZone.class);
|
|
||||||
private static final NoRestartZone LILITH_ZONE = ZoneManager.getInstance().getZoneById(70053, NoRestartZone.class);
|
|
||||||
|
|
||||||
// TELEPORTS
|
|
||||||
private static final Location[] TELEPORT_TO_DARK_ELVEN =
|
|
||||||
{
|
|
||||||
new Location(12168, 17149, -4575),
|
|
||||||
new Location(11688, 18219, -4585),
|
|
||||||
new Location(10502, 17112, -4588),
|
|
||||||
new Location(11169, 15922, -4585),
|
|
||||||
};
|
|
||||||
|
|
||||||
// TODO: When teleport from instance done. Enable it
|
|
||||||
/*
|
|
||||||
* private static final Location[] TELEPORT_TO_ADEN = { new Location(148053, 26935, -2206), new Location(148053, 28017, -2269), new Location(146558, 28017, -2269), new Location(146558, 26935, -2206), };
|
|
||||||
*/
|
|
||||||
|
|
||||||
public SevenSignsRBs()
|
|
||||||
{
|
|
||||||
super(ANAKIM_TEMPLATE_ID, LILITH_TEMPLATE_ID);
|
|
||||||
addStartNpc(ANAKIM_GATEKEEPER_SPIRIT, LILITH_GATEKEEPER_SPIRIT);
|
|
||||||
addTalkId(ANAKIM_GATEKEEPER_SPIRIT, LILITH_GATEKEEPER_SPIRIT, GATEKEEPER_SPIRIT_OUT_TELEPORT);
|
|
||||||
addKillId(ANAKIM, LILITH);
|
|
||||||
addAttackId(ANAKIM, LILITH);
|
|
||||||
addInstanceLeaveId(ANAKIM_TEMPLATE_ID, LILITH_TEMPLATE_ID);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String onAdvEvent(String event, Npc npc, Player player)
|
|
||||||
{
|
|
||||||
switch (event)
|
|
||||||
{
|
|
||||||
case "ANAKIM_ENTER":
|
|
||||||
{
|
|
||||||
if (player.isInParty())
|
|
||||||
{
|
|
||||||
final Party party = player.getParty();
|
|
||||||
final boolean isInCC = party.isInCommandChannel();
|
|
||||||
final List<Player> members = (isInCC) ? party.getCommandChannel().getMembers() : party.getMembers();
|
|
||||||
if (members.size() > (MAX_PLAYERS_IN_ZONE - ANAKIM_ZONE.getPlayersInside().size()))
|
|
||||||
{
|
|
||||||
player.sendMessage("Lilith Sanctum reached 300 players. You cannot enter now.");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
for (Player member : members)
|
|
||||||
{
|
|
||||||
if (!member.isInsideRadius3D(npc, 1000))
|
|
||||||
{
|
|
||||||
player.sendMessage("Player " + member.getName() + " must go closer to Gatekeeper Spirit.");
|
|
||||||
}
|
|
||||||
enterInstance(member, npc, ANAKIM_TEMPLATE_ID);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (player.isGM())
|
|
||||||
{
|
|
||||||
enterInstance(player, npc, ANAKIM_TEMPLATE_ID);
|
|
||||||
player.sendMessage("SYS: You have entered as GM/Admin to Anakim Instance");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (!player.isInsideRadius3D(npc, 1000))
|
|
||||||
{
|
|
||||||
player.sendMessage("You must go closer to Gatekeeper Spirit.");
|
|
||||||
}
|
|
||||||
enterInstance(player, npc, ANAKIM_TEMPLATE_ID);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case "LILITH_ENTER":
|
|
||||||
{
|
|
||||||
if (player.isInParty())
|
|
||||||
{
|
|
||||||
final Party party = player.getParty();
|
|
||||||
final boolean isInCC = party.isInCommandChannel();
|
|
||||||
final List<Player> members = (isInCC) ? party.getCommandChannel().getMembers() : party.getMembers();
|
|
||||||
if (members.size() > (MAX_PLAYERS_IN_ZONE - LILITH_ZONE.getPlayersInside().size()))
|
|
||||||
{
|
|
||||||
player.sendMessage("Lilith Sanctum reached 300 players. You cannot enter now.");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
for (Player member : members)
|
|
||||||
{
|
|
||||||
if (!member.isInsideRadius3D(npc, 1000))
|
|
||||||
{
|
|
||||||
player.sendMessage("Player " + member.getName() + " must go closer to Gatekeeper Spirit.");
|
|
||||||
}
|
|
||||||
enterInstance(member, npc, LILITH_TEMPLATE_ID);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (player.isGM())
|
|
||||||
{
|
|
||||||
enterInstance(player, npc, LILITH_TEMPLATE_ID);
|
|
||||||
player.sendMessage("SYS: You have entered as GM/Admin to Anakim Instance");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (!player.isInsideRadius3D(npc, 1000))
|
|
||||||
{
|
|
||||||
player.sendMessage("You must go closer to Gatekeeper Spirit.");
|
|
||||||
}
|
|
||||||
enterInstance(player, npc, LILITH_TEMPLATE_ID);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case "REMOVE_PLAYERS_FROM_ZONE_ANAKIM":
|
|
||||||
{
|
|
||||||
for (Creature charInside : ANAKIM_ZONE.getCharactersInside())
|
|
||||||
{
|
|
||||||
if ((charInside != null) && charInside.isPlayer())
|
|
||||||
{
|
|
||||||
charInside.teleToLocation(-20185 + getRandom(50), 13476 + getRandom(50), -4901);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case "REMOVE_PLAYERS_FROM_ZONE_LILITH":
|
|
||||||
{
|
|
||||||
for (Creature charInside : LILITH_ZONE.getCharactersInside())
|
|
||||||
{
|
|
||||||
if ((charInside != null) && charInside.isPlayer())
|
|
||||||
{
|
|
||||||
charInside.teleToLocation(171346 + getRandom(50), -17599 + getRandom(50), -4901);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case "TELEPORT_OUT":
|
|
||||||
{
|
|
||||||
// TODO: Different teleport location from instance.
|
|
||||||
// switch (player.getInstanceId())
|
|
||||||
// {
|
|
||||||
// case ANAKIM_TEMPLATE_ID:
|
|
||||||
// {
|
|
||||||
// final Location destination = TELEPORT_TO_DARK_ELVEN[getRandom(TELEPORT_TO_DARK_ELVEN.length)];
|
|
||||||
// player.teleToLocation(destination.getX() + getRandom(100), destination.getY() + getRandom(100), destination.getZ());
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// case LILITH_TEMPLATE_ID:
|
|
||||||
// {
|
|
||||||
// final Location destination = TELEPORT_TO_ADEN[getRandom(TELEPORT_TO_ADEN.length)];
|
|
||||||
// player.teleToLocation(destination.getX() + getRandom(100), destination.getY() + getRandom(100), destination.getZ());
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
final Location destination = TELEPORT_TO_DARK_ELVEN[getRandom(TELEPORT_TO_DARK_ELVEN.length)];
|
|
||||||
player.teleToLocation(destination.getX() + getRandom(100), destination.getY() + getRandom(100), destination.getZ());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case "ANAKIM_DEATH_CAST_LILITH_INVUL":
|
|
||||||
{
|
|
||||||
// TODO: When one RB die, the second will be invul for 5 minutes.
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case "LILITH_DEATH_CAST_ANAKIM_INVUL":
|
|
||||||
{
|
|
||||||
// TODO: When one RB die, the second will be invul for 5 minutes.
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String onKill(Npc npc, Player player, boolean isSummon)
|
|
||||||
{
|
|
||||||
switch (npc.getId())
|
|
||||||
{
|
|
||||||
case ANAKIM:
|
|
||||||
{
|
|
||||||
// TODO:
|
|
||||||
// startQuestTimer("ANAKIM_DEATH_CAST_LILITH_INVUL", 1000, null, null);
|
|
||||||
startQuestTimer("REMOVE_PLAYERS_FROM_ZONE_ANAKIM", 600000, null, player);
|
|
||||||
addSpawn(GATEKEEPER_SPIRIT_OUT_TELEPORT, -6664, 18501, -5495, 0, false, 600000, false, npc.getInstanceId());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case LILITH:
|
|
||||||
{
|
|
||||||
// TODO:
|
|
||||||
// startQuestTimer("LILITH_DEATH_CAST_ANAKIM_INVUL", 1000, null, null);
|
|
||||||
startQuestTimer("REMOVE_PLAYERS_FROM_ZONE_LILITH", 600000, null, player);
|
|
||||||
addSpawn(GATEKEEPER_SPIRIT_OUT_TELEPORT, 185062, -9612, -5493, 0, false, 600000, false, npc.getInstanceId());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
final Instance world = npc.getInstanceWorld();
|
|
||||||
if (world != null)
|
|
||||||
{
|
|
||||||
world.finishInstance();
|
|
||||||
}
|
|
||||||
return super.onKill(npc, player, isSummon);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void main(String[] args)
|
|
||||||
{
|
|
||||||
new SevenSignsRBs();
|
|
||||||
}
|
|
||||||
}
|
|
275
L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/ai/bosses/SevenSignsRBs/SevenSignsRBs.java
vendored
Normal file
275
L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/ai/bosses/SevenSignsRBs/SevenSignsRBs.java
vendored
Normal file
@@ -0,0 +1,275 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the L2J Mobius project.
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package ai.bosses.SevenSignsRBs;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.l2jmobius.gameserver.enums.RaidBossStatus;
|
||||||
|
import org.l2jmobius.gameserver.instancemanager.DBSpawnManager;
|
||||||
|
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.skill.AbnormalVisualEffect;
|
||||||
|
import org.l2jmobius.gameserver.model.zone.type.NoRestartZone;
|
||||||
|
|
||||||
|
import ai.AbstractNpcAI;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author RobikBobik
|
||||||
|
* @NOTE: Retail like work
|
||||||
|
*/
|
||||||
|
public class SevenSignsRBs extends AbstractNpcAI
|
||||||
|
{
|
||||||
|
// NPCs
|
||||||
|
private static final int ANAKIM_GATEKEEPER_SPIRIT = 31089;
|
||||||
|
private static final int LILITH_GATEKEEPER_SPIRIT = 31087;
|
||||||
|
private static final int GATEKEEPER_SPIRIT_OUT_TELEPORT = 31088;
|
||||||
|
private static final int ANAKIM = 25286;
|
||||||
|
private static final int LILITH = 25283;
|
||||||
|
// Misc
|
||||||
|
private static final int MAX_PLAYERS_IN_ZONE = 300;
|
||||||
|
private static final NoRestartZone ANAKIM_ZONE = ZoneManager.getInstance().getZoneById(70052, NoRestartZone.class);
|
||||||
|
private static final NoRestartZone LILITH_ZONE = ZoneManager.getInstance().getZoneById(70053, NoRestartZone.class);
|
||||||
|
// TELEPORTS
|
||||||
|
private static final Location TELEPORT_TO_LILITH = new Location(185657, -10112, -5496);
|
||||||
|
private static final Location TELEPORT_TO_ANAKIM = new Location(-7283, 19086, -5496);
|
||||||
|
|
||||||
|
private static final Location[] TELEPORT_TO_DARK_ELVEN =
|
||||||
|
{
|
||||||
|
new Location(12168, 17149, -4575),
|
||||||
|
new Location(11688, 18219, -4585),
|
||||||
|
new Location(10502, 17112, -4588),
|
||||||
|
new Location(11169, 15922, -4585),
|
||||||
|
};
|
||||||
|
|
||||||
|
private static final Location[] TELEPORT_TO_ADEN =
|
||||||
|
{
|
||||||
|
new Location(148053, 26935, -2206),
|
||||||
|
new Location(148053, 28017, -2269),
|
||||||
|
new Location(146558, 28017, -2269),
|
||||||
|
new Location(146558, 26935, -2206),
|
||||||
|
};
|
||||||
|
|
||||||
|
public SevenSignsRBs()
|
||||||
|
{
|
||||||
|
addStartNpc(ANAKIM_GATEKEEPER_SPIRIT, LILITH_GATEKEEPER_SPIRIT);
|
||||||
|
addTalkId(ANAKIM_GATEKEEPER_SPIRIT, LILITH_GATEKEEPER_SPIRIT, GATEKEEPER_SPIRIT_OUT_TELEPORT);
|
||||||
|
addKillId(ANAKIM, LILITH);
|
||||||
|
addAttackId(ANAKIM, LILITH);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String onAdvEvent(String event, Npc npc, Player player)
|
||||||
|
{
|
||||||
|
switch (event)
|
||||||
|
{
|
||||||
|
case "ANAKIM_ENTER":
|
||||||
|
{
|
||||||
|
if (DBSpawnManager.getInstance().getStatus(ANAKIM) != RaidBossStatus.ALIVE)
|
||||||
|
{
|
||||||
|
player.sendMessage("Anakim is not present at the moment");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (player.isInParty())
|
||||||
|
{
|
||||||
|
final Party party = player.getParty();
|
||||||
|
final boolean isInCC = party.isInCommandChannel();
|
||||||
|
final List<Player> members = (isInCC) ? party.getCommandChannel().getMembers() : party.getMembers();
|
||||||
|
if (members.size() > (MAX_PLAYERS_IN_ZONE - ANAKIM_ZONE.getPlayersInside().size()))
|
||||||
|
{
|
||||||
|
player.sendMessage("Anakims Sanctum reached " + MAX_PLAYERS_IN_ZONE + " players. You cannot enter now.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for (Player member : members)
|
||||||
|
{
|
||||||
|
if (!member.isInsideRadius3D(npc, 1000))
|
||||||
|
{
|
||||||
|
player.sendMessage("Player " + member.getName() + " must go closer to Gatekeeper Spirit.");
|
||||||
|
}
|
||||||
|
member.teleToLocation(TELEPORT_TO_ANAKIM);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (player.isGM())
|
||||||
|
{
|
||||||
|
player.teleToLocation(TELEPORT_TO_ANAKIM);
|
||||||
|
player.sendMessage("SYS: You have entered as GM/Admin to Anakim Instance");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!player.isInsideRadius3D(npc, 1000))
|
||||||
|
{
|
||||||
|
player.sendMessage("You must go closer to Gatekeeper Spirit.");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
player.teleToLocation(TELEPORT_TO_ANAKIM);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "LILITH_ENTER":
|
||||||
|
{
|
||||||
|
if (DBSpawnManager.getInstance().getStatus(LILITH) != RaidBossStatus.ALIVE)
|
||||||
|
{
|
||||||
|
player.sendMessage("Lilith is not present at the moment");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (player.isInParty())
|
||||||
|
{
|
||||||
|
final Party party = player.getParty();
|
||||||
|
final boolean isInCC = party.isInCommandChannel();
|
||||||
|
final List<Player> members = (isInCC) ? party.getCommandChannel().getMembers() : party.getMembers();
|
||||||
|
if (members.size() > (MAX_PLAYERS_IN_ZONE - LILITH_ZONE.getPlayersInside().size()))
|
||||||
|
{
|
||||||
|
player.sendMessage("Lilith Sanctum reached " + MAX_PLAYERS_IN_ZONE + " players. You cannot enter now.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for (Player member : members)
|
||||||
|
{
|
||||||
|
if (!member.isInsideRadius3D(npc, 1000))
|
||||||
|
{
|
||||||
|
player.sendMessage("Player " + member.getName() + " must go closer to Gatekeeper Spirit.");
|
||||||
|
}
|
||||||
|
member.teleToLocation(TELEPORT_TO_LILITH);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (player.isGM())
|
||||||
|
{
|
||||||
|
player.teleToLocation(TELEPORT_TO_LILITH);
|
||||||
|
player.sendMessage("SYS: You have entered as GM/Admin to Anakim Instance");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!player.isInsideRadius3D(npc, 1000))
|
||||||
|
{
|
||||||
|
player.sendMessage("You must go closer to Gatekeeper Spirit.");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
player.teleToLocation(TELEPORT_TO_LILITH);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "REMOVE_PLAYERS_FROM_ZONE_ANAKIM":
|
||||||
|
{
|
||||||
|
for (Creature charInside : ANAKIM_ZONE.getCharactersInside())
|
||||||
|
{
|
||||||
|
if ((charInside != null) && charInside.isPlayer())
|
||||||
|
{
|
||||||
|
charInside.teleToLocation(-20185 + getRandom(50), 13476 + getRandom(50), -4901);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "REMOVE_PLAYERS_FROM_ZONE_LILITH":
|
||||||
|
{
|
||||||
|
for (Creature charInside : LILITH_ZONE.getCharactersInside())
|
||||||
|
{
|
||||||
|
if ((charInside != null) && charInside.isPlayer())
|
||||||
|
{
|
||||||
|
charInside.teleToLocation(171346 + getRandom(50), -17599 + getRandom(50), -4901);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "TELEPORT_OUT":
|
||||||
|
{
|
||||||
|
if (ANAKIM_ZONE.isInsideZone(player.getLocation()))
|
||||||
|
{
|
||||||
|
final Location destination = TELEPORT_TO_DARK_ELVEN[getRandom(TELEPORT_TO_DARK_ELVEN.length)];
|
||||||
|
player.teleToLocation(destination.getX() + getRandom(100), destination.getY() + getRandom(100), destination.getZ());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (LILITH_ZONE.isInsideZone(player.getLocation()))
|
||||||
|
{
|
||||||
|
final Location destination = TELEPORT_TO_ADEN[getRandom(TELEPORT_TO_ADEN.length)];
|
||||||
|
player.teleToLocation(destination.getX() + getRandom(100), destination.getY() + getRandom(100), destination.getZ());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "ANAKIM_DEATH_CAST_LILITH_INVUL":
|
||||||
|
{
|
||||||
|
if (DBSpawnManager.getInstance().getStatus(LILITH) == RaidBossStatus.ALIVE)
|
||||||
|
{
|
||||||
|
Npc LILITH_NPC = DBSpawnManager.getInstance().getNpcs().get(LILITH);
|
||||||
|
LILITH_NPC.setInvul(true);
|
||||||
|
LILITH_NPC.getEffectList().startAbnormalVisualEffect(AbnormalVisualEffect.INVINCIBILITY);
|
||||||
|
startQuestTimer("LILITH_INVUL_END", 300000, null, player);
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "LILITH_DEATH_CAST_ANAKIM_INVUL":
|
||||||
|
{
|
||||||
|
if (DBSpawnManager.getInstance().getStatus(ANAKIM) == RaidBossStatus.ALIVE)
|
||||||
|
{
|
||||||
|
Npc ANAKIM_NPC = DBSpawnManager.getInstance().getNpcs().get(ANAKIM);
|
||||||
|
ANAKIM_NPC.setInvul(true);
|
||||||
|
ANAKIM_NPC.getEffectList().startAbnormalVisualEffect(AbnormalVisualEffect.INVINCIBILITY);
|
||||||
|
startQuestTimer("ANAKIM_INVUL_END", 300000, null, player);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "LILITH_INVUL_END":
|
||||||
|
{
|
||||||
|
Npc LILITH_NPC = DBSpawnManager.getInstance().getNpcs().get(LILITH);
|
||||||
|
LILITH_NPC.setInvul(false);
|
||||||
|
LILITH_NPC.getEffectList().stopAbnormalVisualEffect(AbnormalVisualEffect.INVINCIBILITY);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "ANAKIM_INVUL_END":
|
||||||
|
{
|
||||||
|
Npc ANAKIM_NPC = DBSpawnManager.getInstance().getNpcs().get(ANAKIM);
|
||||||
|
ANAKIM_NPC.setInvul(false);
|
||||||
|
ANAKIM_NPC.getEffectList().stopAbnormalVisualEffect(AbnormalVisualEffect.INVINCIBILITY);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String onKill(Npc npc, Player player, boolean isSummon)
|
||||||
|
{
|
||||||
|
switch (npc.getId())
|
||||||
|
{
|
||||||
|
case ANAKIM:
|
||||||
|
{
|
||||||
|
startQuestTimer("ANAKIM_DEATH_CAST_LILITH_INVUL", 1000, null, null);
|
||||||
|
addSpawn(GATEKEEPER_SPIRIT_OUT_TELEPORT, -6664, 18501, -5495, 0, false, 600000, false, npc.getInstanceId());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case LILITH:
|
||||||
|
{
|
||||||
|
startQuestTimer("LILITH_DEATH_CAST_ANAKIM_INVUL", 1000, null, null);
|
||||||
|
addSpawn(GATEKEEPER_SPIRIT_OUT_TELEPORT, 185062, -9612, -5493, 0, false, 600000, false, npc.getInstanceId());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return super.onKill(npc, player, isSummon);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args)
|
||||||
|
{
|
||||||
|
new SevenSignsRBs();
|
||||||
|
}
|
||||||
|
}
|
@@ -1,252 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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.SevenSignsRBs;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
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.type.NoRestartZone;
|
|
||||||
|
|
||||||
import instances.AbstractInstance;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author RobikBobik
|
|
||||||
* @NOTE: Retail like work
|
|
||||||
* @TODO: When one RB die, the second will be invul for 5 minutes.
|
|
||||||
*/
|
|
||||||
public class SevenSignsRBs extends AbstractInstance
|
|
||||||
{
|
|
||||||
// NPCs
|
|
||||||
private static final int ANAKIM_GATEKEEPER_SPIRIT = 31089;
|
|
||||||
private static final int LILITH_GATEKEEPER_SPIRIT = 31087;
|
|
||||||
private static final int GATEKEEPER_SPIRIT_OUT_TELEPORT = 31088;
|
|
||||||
private static final int ANAKIM = 25286;
|
|
||||||
private static final int LILITH = 25283;
|
|
||||||
|
|
||||||
// Misc
|
|
||||||
private static final int ANAKIM_TEMPLATE_ID = 200;
|
|
||||||
private static final int LILITH_TEMPLATE_ID = 199;
|
|
||||||
|
|
||||||
private static final int MAX_PLAYERS_IN_ZONE = 300;
|
|
||||||
|
|
||||||
private static final NoRestartZone ANAKIM_ZONE = ZoneManager.getInstance().getZoneById(70052, NoRestartZone.class);
|
|
||||||
private static final NoRestartZone LILITH_ZONE = ZoneManager.getInstance().getZoneById(70053, NoRestartZone.class);
|
|
||||||
|
|
||||||
// TELEPORTS
|
|
||||||
private static final Location[] TELEPORT_TO_DARK_ELVEN =
|
|
||||||
{
|
|
||||||
new Location(12168, 17149, -4575),
|
|
||||||
new Location(11688, 18219, -4585),
|
|
||||||
new Location(10502, 17112, -4588),
|
|
||||||
new Location(11169, 15922, -4585),
|
|
||||||
};
|
|
||||||
|
|
||||||
// TODO: When teleport from instance done. Enable it
|
|
||||||
/*
|
|
||||||
* private static final Location[] TELEPORT_TO_ADEN = { new Location(148053, 26935, -2206), new Location(148053, 28017, -2269), new Location(146558, 28017, -2269), new Location(146558, 26935, -2206), };
|
|
||||||
*/
|
|
||||||
|
|
||||||
public SevenSignsRBs()
|
|
||||||
{
|
|
||||||
super(ANAKIM_TEMPLATE_ID, LILITH_TEMPLATE_ID);
|
|
||||||
addStartNpc(ANAKIM_GATEKEEPER_SPIRIT, LILITH_GATEKEEPER_SPIRIT);
|
|
||||||
addTalkId(ANAKIM_GATEKEEPER_SPIRIT, LILITH_GATEKEEPER_SPIRIT, GATEKEEPER_SPIRIT_OUT_TELEPORT);
|
|
||||||
addKillId(ANAKIM, LILITH);
|
|
||||||
addAttackId(ANAKIM, LILITH);
|
|
||||||
addInstanceLeaveId(ANAKIM_TEMPLATE_ID, LILITH_TEMPLATE_ID);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String onAdvEvent(String event, Npc npc, Player player)
|
|
||||||
{
|
|
||||||
switch (event)
|
|
||||||
{
|
|
||||||
case "ANAKIM_ENTER":
|
|
||||||
{
|
|
||||||
if (player.isInParty())
|
|
||||||
{
|
|
||||||
final Party party = player.getParty();
|
|
||||||
final boolean isInCC = party.isInCommandChannel();
|
|
||||||
final List<Player> members = (isInCC) ? party.getCommandChannel().getMembers() : party.getMembers();
|
|
||||||
if (members.size() > (MAX_PLAYERS_IN_ZONE - ANAKIM_ZONE.getPlayersInside().size()))
|
|
||||||
{
|
|
||||||
player.sendMessage("Lilith Sanctum reached 300 players. You cannot enter now.");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
for (Player member : members)
|
|
||||||
{
|
|
||||||
if (!member.isInsideRadius3D(npc, 1000))
|
|
||||||
{
|
|
||||||
player.sendMessage("Player " + member.getName() + " must go closer to Gatekeeper Spirit.");
|
|
||||||
}
|
|
||||||
enterInstance(member, npc, ANAKIM_TEMPLATE_ID);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (player.isGM())
|
|
||||||
{
|
|
||||||
enterInstance(player, npc, ANAKIM_TEMPLATE_ID);
|
|
||||||
player.sendMessage("SYS: You have entered as GM/Admin to Anakim Instance");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (!player.isInsideRadius3D(npc, 1000))
|
|
||||||
{
|
|
||||||
player.sendMessage("You must go closer to Gatekeeper Spirit.");
|
|
||||||
}
|
|
||||||
enterInstance(player, npc, ANAKIM_TEMPLATE_ID);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case "LILITH_ENTER":
|
|
||||||
{
|
|
||||||
if (player.isInParty())
|
|
||||||
{
|
|
||||||
final Party party = player.getParty();
|
|
||||||
final boolean isInCC = party.isInCommandChannel();
|
|
||||||
final List<Player> members = (isInCC) ? party.getCommandChannel().getMembers() : party.getMembers();
|
|
||||||
if (members.size() > (MAX_PLAYERS_IN_ZONE - LILITH_ZONE.getPlayersInside().size()))
|
|
||||||
{
|
|
||||||
player.sendMessage("Lilith Sanctum reached 300 players. You cannot enter now.");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
for (Player member : members)
|
|
||||||
{
|
|
||||||
if (!member.isInsideRadius3D(npc, 1000))
|
|
||||||
{
|
|
||||||
player.sendMessage("Player " + member.getName() + " must go closer to Gatekeeper Spirit.");
|
|
||||||
}
|
|
||||||
enterInstance(member, npc, LILITH_TEMPLATE_ID);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (player.isGM())
|
|
||||||
{
|
|
||||||
enterInstance(player, npc, LILITH_TEMPLATE_ID);
|
|
||||||
player.sendMessage("SYS: You have entered as GM/Admin to Anakim Instance");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (!player.isInsideRadius3D(npc, 1000))
|
|
||||||
{
|
|
||||||
player.sendMessage("You must go closer to Gatekeeper Spirit.");
|
|
||||||
}
|
|
||||||
enterInstance(player, npc, LILITH_TEMPLATE_ID);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case "REMOVE_PLAYERS_FROM_ZONE_ANAKIM":
|
|
||||||
{
|
|
||||||
for (Creature charInside : ANAKIM_ZONE.getCharactersInside())
|
|
||||||
{
|
|
||||||
if ((charInside != null) && charInside.isPlayer())
|
|
||||||
{
|
|
||||||
charInside.teleToLocation(-20185 + getRandom(50), 13476 + getRandom(50), -4901);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case "REMOVE_PLAYERS_FROM_ZONE_LILITH":
|
|
||||||
{
|
|
||||||
for (Creature charInside : LILITH_ZONE.getCharactersInside())
|
|
||||||
{
|
|
||||||
if ((charInside != null) && charInside.isPlayer())
|
|
||||||
{
|
|
||||||
charInside.teleToLocation(171346 + getRandom(50), -17599 + getRandom(50), -4901);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case "TELEPORT_OUT":
|
|
||||||
{
|
|
||||||
// TODO: Different teleport location from instance.
|
|
||||||
// switch (player.getInstanceId())
|
|
||||||
// {
|
|
||||||
// case ANAKIM_TEMPLATE_ID:
|
|
||||||
// {
|
|
||||||
// final Location destination = TELEPORT_TO_DARK_ELVEN[getRandom(TELEPORT_TO_DARK_ELVEN.length)];
|
|
||||||
// player.teleToLocation(destination.getX() + getRandom(100), destination.getY() + getRandom(100), destination.getZ());
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// case LILITH_TEMPLATE_ID:
|
|
||||||
// {
|
|
||||||
// final Location destination = TELEPORT_TO_ADEN[getRandom(TELEPORT_TO_ADEN.length)];
|
|
||||||
// player.teleToLocation(destination.getX() + getRandom(100), destination.getY() + getRandom(100), destination.getZ());
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
final Location destination = TELEPORT_TO_DARK_ELVEN[getRandom(TELEPORT_TO_DARK_ELVEN.length)];
|
|
||||||
player.teleToLocation(destination.getX() + getRandom(100), destination.getY() + getRandom(100), destination.getZ());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case "ANAKIM_DEATH_CAST_LILITH_INVUL":
|
|
||||||
{
|
|
||||||
// TODO: When one RB die, the second will be invul for 5 minutes.
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case "LILITH_DEATH_CAST_ANAKIM_INVUL":
|
|
||||||
{
|
|
||||||
// TODO: When one RB die, the second will be invul for 5 minutes.
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String onKill(Npc npc, Player player, boolean isSummon)
|
|
||||||
{
|
|
||||||
switch (npc.getId())
|
|
||||||
{
|
|
||||||
case ANAKIM:
|
|
||||||
{
|
|
||||||
// TODO:
|
|
||||||
// startQuestTimer("ANAKIM_DEATH_CAST_LILITH_INVUL", 1000, null, null);
|
|
||||||
startQuestTimer("REMOVE_PLAYERS_FROM_ZONE_ANAKIM", 600000, null, player);
|
|
||||||
addSpawn(GATEKEEPER_SPIRIT_OUT_TELEPORT, -6664, 18501, -5495, 0, false, 600000, false, npc.getInstanceId());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case LILITH:
|
|
||||||
{
|
|
||||||
// TODO:
|
|
||||||
// startQuestTimer("LILITH_DEATH_CAST_ANAKIM_INVUL", 1000, null, null);
|
|
||||||
startQuestTimer("REMOVE_PLAYERS_FROM_ZONE_LILITH", 600000, null, player);
|
|
||||||
addSpawn(GATEKEEPER_SPIRIT_OUT_TELEPORT, 185062, -9612, -5493, 0, false, 600000, false, npc.getInstanceId());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
final Instance world = npc.getInstanceWorld();
|
|
||||||
if (world != null)
|
|
||||||
{
|
|
||||||
world.finishInstance();
|
|
||||||
}
|
|
||||||
return super.onKill(npc, player, isSummon);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void main(String[] args)
|
|
||||||
{
|
|
||||||
new SevenSignsRBs();
|
|
||||||
}
|
|
||||||
}
|
|
275
L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/ai/bosses/SevenSignsRBs/SevenSignsRBs.java
vendored
Normal file
275
L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/ai/bosses/SevenSignsRBs/SevenSignsRBs.java
vendored
Normal file
@@ -0,0 +1,275 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the L2J Mobius project.
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package ai.bosses.SevenSignsRBs;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.l2jmobius.gameserver.enums.RaidBossStatus;
|
||||||
|
import org.l2jmobius.gameserver.instancemanager.DBSpawnManager;
|
||||||
|
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.skill.AbnormalVisualEffect;
|
||||||
|
import org.l2jmobius.gameserver.model.zone.type.NoRestartZone;
|
||||||
|
|
||||||
|
import ai.AbstractNpcAI;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author RobikBobik
|
||||||
|
* @NOTE: Retail like work
|
||||||
|
*/
|
||||||
|
public class SevenSignsRBs extends AbstractNpcAI
|
||||||
|
{
|
||||||
|
// NPCs
|
||||||
|
private static final int ANAKIM_GATEKEEPER_SPIRIT = 31089;
|
||||||
|
private static final int LILITH_GATEKEEPER_SPIRIT = 31087;
|
||||||
|
private static final int GATEKEEPER_SPIRIT_OUT_TELEPORT = 31088;
|
||||||
|
private static final int ANAKIM = 25286;
|
||||||
|
private static final int LILITH = 25283;
|
||||||
|
// Misc
|
||||||
|
private static final int MAX_PLAYERS_IN_ZONE = 300;
|
||||||
|
private static final NoRestartZone ANAKIM_ZONE = ZoneManager.getInstance().getZoneById(70052, NoRestartZone.class);
|
||||||
|
private static final NoRestartZone LILITH_ZONE = ZoneManager.getInstance().getZoneById(70053, NoRestartZone.class);
|
||||||
|
// TELEPORTS
|
||||||
|
private static final Location TELEPORT_TO_LILITH = new Location(185657, -10112, -5496);
|
||||||
|
private static final Location TELEPORT_TO_ANAKIM = new Location(-7283, 19086, -5496);
|
||||||
|
|
||||||
|
private static final Location[] TELEPORT_TO_DARK_ELVEN =
|
||||||
|
{
|
||||||
|
new Location(12168, 17149, -4575),
|
||||||
|
new Location(11688, 18219, -4585),
|
||||||
|
new Location(10502, 17112, -4588),
|
||||||
|
new Location(11169, 15922, -4585),
|
||||||
|
};
|
||||||
|
|
||||||
|
private static final Location[] TELEPORT_TO_ADEN =
|
||||||
|
{
|
||||||
|
new Location(148053, 26935, -2206),
|
||||||
|
new Location(148053, 28017, -2269),
|
||||||
|
new Location(146558, 28017, -2269),
|
||||||
|
new Location(146558, 26935, -2206),
|
||||||
|
};
|
||||||
|
|
||||||
|
public SevenSignsRBs()
|
||||||
|
{
|
||||||
|
addStartNpc(ANAKIM_GATEKEEPER_SPIRIT, LILITH_GATEKEEPER_SPIRIT);
|
||||||
|
addTalkId(ANAKIM_GATEKEEPER_SPIRIT, LILITH_GATEKEEPER_SPIRIT, GATEKEEPER_SPIRIT_OUT_TELEPORT);
|
||||||
|
addKillId(ANAKIM, LILITH);
|
||||||
|
addAttackId(ANAKIM, LILITH);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String onAdvEvent(String event, Npc npc, Player player)
|
||||||
|
{
|
||||||
|
switch (event)
|
||||||
|
{
|
||||||
|
case "ANAKIM_ENTER":
|
||||||
|
{
|
||||||
|
if (DBSpawnManager.getInstance().getStatus(ANAKIM) != RaidBossStatus.ALIVE)
|
||||||
|
{
|
||||||
|
player.sendMessage("Anakim is not present at the moment");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (player.isInParty())
|
||||||
|
{
|
||||||
|
final Party party = player.getParty();
|
||||||
|
final boolean isInCC = party.isInCommandChannel();
|
||||||
|
final List<Player> members = (isInCC) ? party.getCommandChannel().getMembers() : party.getMembers();
|
||||||
|
if (members.size() > (MAX_PLAYERS_IN_ZONE - ANAKIM_ZONE.getPlayersInside().size()))
|
||||||
|
{
|
||||||
|
player.sendMessage("Anakims Sanctum reached " + MAX_PLAYERS_IN_ZONE + " players. You cannot enter now.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for (Player member : members)
|
||||||
|
{
|
||||||
|
if (!member.isInsideRadius3D(npc, 1000))
|
||||||
|
{
|
||||||
|
player.sendMessage("Player " + member.getName() + " must go closer to Gatekeeper Spirit.");
|
||||||
|
}
|
||||||
|
member.teleToLocation(TELEPORT_TO_ANAKIM);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (player.isGM())
|
||||||
|
{
|
||||||
|
player.teleToLocation(TELEPORT_TO_ANAKIM);
|
||||||
|
player.sendMessage("SYS: You have entered as GM/Admin to Anakim Instance");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!player.isInsideRadius3D(npc, 1000))
|
||||||
|
{
|
||||||
|
player.sendMessage("You must go closer to Gatekeeper Spirit.");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
player.teleToLocation(TELEPORT_TO_ANAKIM);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "LILITH_ENTER":
|
||||||
|
{
|
||||||
|
if (DBSpawnManager.getInstance().getStatus(LILITH) != RaidBossStatus.ALIVE)
|
||||||
|
{
|
||||||
|
player.sendMessage("Lilith is not present at the moment");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (player.isInParty())
|
||||||
|
{
|
||||||
|
final Party party = player.getParty();
|
||||||
|
final boolean isInCC = party.isInCommandChannel();
|
||||||
|
final List<Player> members = (isInCC) ? party.getCommandChannel().getMembers() : party.getMembers();
|
||||||
|
if (members.size() > (MAX_PLAYERS_IN_ZONE - LILITH_ZONE.getPlayersInside().size()))
|
||||||
|
{
|
||||||
|
player.sendMessage("Lilith Sanctum reached " + MAX_PLAYERS_IN_ZONE + " players. You cannot enter now.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for (Player member : members)
|
||||||
|
{
|
||||||
|
if (!member.isInsideRadius3D(npc, 1000))
|
||||||
|
{
|
||||||
|
player.sendMessage("Player " + member.getName() + " must go closer to Gatekeeper Spirit.");
|
||||||
|
}
|
||||||
|
member.teleToLocation(TELEPORT_TO_LILITH);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (player.isGM())
|
||||||
|
{
|
||||||
|
player.teleToLocation(TELEPORT_TO_LILITH);
|
||||||
|
player.sendMessage("SYS: You have entered as GM/Admin to Anakim Instance");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!player.isInsideRadius3D(npc, 1000))
|
||||||
|
{
|
||||||
|
player.sendMessage("You must go closer to Gatekeeper Spirit.");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
player.teleToLocation(TELEPORT_TO_LILITH);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "REMOVE_PLAYERS_FROM_ZONE_ANAKIM":
|
||||||
|
{
|
||||||
|
for (Creature charInside : ANAKIM_ZONE.getCharactersInside())
|
||||||
|
{
|
||||||
|
if ((charInside != null) && charInside.isPlayer())
|
||||||
|
{
|
||||||
|
charInside.teleToLocation(-20185 + getRandom(50), 13476 + getRandom(50), -4901);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "REMOVE_PLAYERS_FROM_ZONE_LILITH":
|
||||||
|
{
|
||||||
|
for (Creature charInside : LILITH_ZONE.getCharactersInside())
|
||||||
|
{
|
||||||
|
if ((charInside != null) && charInside.isPlayer())
|
||||||
|
{
|
||||||
|
charInside.teleToLocation(171346 + getRandom(50), -17599 + getRandom(50), -4901);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "TELEPORT_OUT":
|
||||||
|
{
|
||||||
|
if (ANAKIM_ZONE.isInsideZone(player.getLocation()))
|
||||||
|
{
|
||||||
|
final Location destination = TELEPORT_TO_DARK_ELVEN[getRandom(TELEPORT_TO_DARK_ELVEN.length)];
|
||||||
|
player.teleToLocation(destination.getX() + getRandom(100), destination.getY() + getRandom(100), destination.getZ());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (LILITH_ZONE.isInsideZone(player.getLocation()))
|
||||||
|
{
|
||||||
|
final Location destination = TELEPORT_TO_ADEN[getRandom(TELEPORT_TO_ADEN.length)];
|
||||||
|
player.teleToLocation(destination.getX() + getRandom(100), destination.getY() + getRandom(100), destination.getZ());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "ANAKIM_DEATH_CAST_LILITH_INVUL":
|
||||||
|
{
|
||||||
|
if (DBSpawnManager.getInstance().getStatus(LILITH) == RaidBossStatus.ALIVE)
|
||||||
|
{
|
||||||
|
Npc LILITH_NPC = DBSpawnManager.getInstance().getNpcs().get(LILITH);
|
||||||
|
LILITH_NPC.setInvul(true);
|
||||||
|
LILITH_NPC.getEffectList().startAbnormalVisualEffect(AbnormalVisualEffect.INVINCIBILITY);
|
||||||
|
startQuestTimer("LILITH_INVUL_END", 300000, null, player);
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "LILITH_DEATH_CAST_ANAKIM_INVUL":
|
||||||
|
{
|
||||||
|
if (DBSpawnManager.getInstance().getStatus(ANAKIM) == RaidBossStatus.ALIVE)
|
||||||
|
{
|
||||||
|
Npc ANAKIM_NPC = DBSpawnManager.getInstance().getNpcs().get(ANAKIM);
|
||||||
|
ANAKIM_NPC.setInvul(true);
|
||||||
|
ANAKIM_NPC.getEffectList().startAbnormalVisualEffect(AbnormalVisualEffect.INVINCIBILITY);
|
||||||
|
startQuestTimer("ANAKIM_INVUL_END", 300000, null, player);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "LILITH_INVUL_END":
|
||||||
|
{
|
||||||
|
Npc LILITH_NPC = DBSpawnManager.getInstance().getNpcs().get(LILITH);
|
||||||
|
LILITH_NPC.setInvul(false);
|
||||||
|
LILITH_NPC.getEffectList().stopAbnormalVisualEffect(AbnormalVisualEffect.INVINCIBILITY);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "ANAKIM_INVUL_END":
|
||||||
|
{
|
||||||
|
Npc ANAKIM_NPC = DBSpawnManager.getInstance().getNpcs().get(ANAKIM);
|
||||||
|
ANAKIM_NPC.setInvul(false);
|
||||||
|
ANAKIM_NPC.getEffectList().stopAbnormalVisualEffect(AbnormalVisualEffect.INVINCIBILITY);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String onKill(Npc npc, Player player, boolean isSummon)
|
||||||
|
{
|
||||||
|
switch (npc.getId())
|
||||||
|
{
|
||||||
|
case ANAKIM:
|
||||||
|
{
|
||||||
|
startQuestTimer("ANAKIM_DEATH_CAST_LILITH_INVUL", 1000, null, null);
|
||||||
|
addSpawn(GATEKEEPER_SPIRIT_OUT_TELEPORT, -6664, 18501, -5495, 0, false, 600000, false, npc.getInstanceId());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case LILITH:
|
||||||
|
{
|
||||||
|
startQuestTimer("LILITH_DEATH_CAST_ANAKIM_INVUL", 1000, null, null);
|
||||||
|
addSpawn(GATEKEEPER_SPIRIT_OUT_TELEPORT, 185062, -9612, -5493, 0, false, 600000, false, npc.getInstanceId());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return super.onKill(npc, player, isSummon);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args)
|
||||||
|
{
|
||||||
|
new SevenSignsRBs();
|
||||||
|
}
|
||||||
|
}
|
@@ -1,252 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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.SevenSignsRBs;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
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.type.NoRestartZone;
|
|
||||||
|
|
||||||
import instances.AbstractInstance;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author RobikBobik
|
|
||||||
* @NOTE: Retail like work
|
|
||||||
* @TODO: When one RB die, the second will be invul for 5 minutes.
|
|
||||||
*/
|
|
||||||
public class SevenSignsRBs extends AbstractInstance
|
|
||||||
{
|
|
||||||
// NPCs
|
|
||||||
private static final int ANAKIM_GATEKEEPER_SPIRIT = 31089;
|
|
||||||
private static final int LILITH_GATEKEEPER_SPIRIT = 31087;
|
|
||||||
private static final int GATEKEEPER_SPIRIT_OUT_TELEPORT = 31088;
|
|
||||||
private static final int ANAKIM = 25286;
|
|
||||||
private static final int LILITH = 25283;
|
|
||||||
|
|
||||||
// Misc
|
|
||||||
private static final int ANAKIM_TEMPLATE_ID = 200;
|
|
||||||
private static final int LILITH_TEMPLATE_ID = 199;
|
|
||||||
|
|
||||||
private static final int MAX_PLAYERS_IN_ZONE = 300;
|
|
||||||
|
|
||||||
private static final NoRestartZone ANAKIM_ZONE = ZoneManager.getInstance().getZoneById(70052, NoRestartZone.class);
|
|
||||||
private static final NoRestartZone LILITH_ZONE = ZoneManager.getInstance().getZoneById(70053, NoRestartZone.class);
|
|
||||||
|
|
||||||
// TELEPORTS
|
|
||||||
private static final Location[] TELEPORT_TO_DARK_ELVEN =
|
|
||||||
{
|
|
||||||
new Location(12168, 17149, -4575),
|
|
||||||
new Location(11688, 18219, -4585),
|
|
||||||
new Location(10502, 17112, -4588),
|
|
||||||
new Location(11169, 15922, -4585),
|
|
||||||
};
|
|
||||||
|
|
||||||
// TODO: When teleport from instance done. Enable it
|
|
||||||
/*
|
|
||||||
* private static final Location[] TELEPORT_TO_ADEN = { new Location(148053, 26935, -2206), new Location(148053, 28017, -2269), new Location(146558, 28017, -2269), new Location(146558, 26935, -2206), };
|
|
||||||
*/
|
|
||||||
|
|
||||||
public SevenSignsRBs()
|
|
||||||
{
|
|
||||||
super(ANAKIM_TEMPLATE_ID, LILITH_TEMPLATE_ID);
|
|
||||||
addStartNpc(ANAKIM_GATEKEEPER_SPIRIT, LILITH_GATEKEEPER_SPIRIT);
|
|
||||||
addTalkId(ANAKIM_GATEKEEPER_SPIRIT, LILITH_GATEKEEPER_SPIRIT, GATEKEEPER_SPIRIT_OUT_TELEPORT);
|
|
||||||
addKillId(ANAKIM, LILITH);
|
|
||||||
addAttackId(ANAKIM, LILITH);
|
|
||||||
addInstanceLeaveId(ANAKIM_TEMPLATE_ID, LILITH_TEMPLATE_ID);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String onAdvEvent(String event, Npc npc, Player player)
|
|
||||||
{
|
|
||||||
switch (event)
|
|
||||||
{
|
|
||||||
case "ANAKIM_ENTER":
|
|
||||||
{
|
|
||||||
if (player.isInParty())
|
|
||||||
{
|
|
||||||
final Party party = player.getParty();
|
|
||||||
final boolean isInCC = party.isInCommandChannel();
|
|
||||||
final List<Player> members = (isInCC) ? party.getCommandChannel().getMembers() : party.getMembers();
|
|
||||||
if (members.size() > (MAX_PLAYERS_IN_ZONE - ANAKIM_ZONE.getPlayersInside().size()))
|
|
||||||
{
|
|
||||||
player.sendMessage("Lilith Sanctum reached 300 players. You cannot enter now.");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
for (Player member : members)
|
|
||||||
{
|
|
||||||
if (!member.isInsideRadius3D(npc, 1000))
|
|
||||||
{
|
|
||||||
player.sendMessage("Player " + member.getName() + " must go closer to Gatekeeper Spirit.");
|
|
||||||
}
|
|
||||||
enterInstance(member, npc, ANAKIM_TEMPLATE_ID);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (player.isGM())
|
|
||||||
{
|
|
||||||
enterInstance(player, npc, ANAKIM_TEMPLATE_ID);
|
|
||||||
player.sendMessage("SYS: You have entered as GM/Admin to Anakim Instance");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (!player.isInsideRadius3D(npc, 1000))
|
|
||||||
{
|
|
||||||
player.sendMessage("You must go closer to Gatekeeper Spirit.");
|
|
||||||
}
|
|
||||||
enterInstance(player, npc, ANAKIM_TEMPLATE_ID);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case "LILITH_ENTER":
|
|
||||||
{
|
|
||||||
if (player.isInParty())
|
|
||||||
{
|
|
||||||
final Party party = player.getParty();
|
|
||||||
final boolean isInCC = party.isInCommandChannel();
|
|
||||||
final List<Player> members = (isInCC) ? party.getCommandChannel().getMembers() : party.getMembers();
|
|
||||||
if (members.size() > (MAX_PLAYERS_IN_ZONE - LILITH_ZONE.getPlayersInside().size()))
|
|
||||||
{
|
|
||||||
player.sendMessage("Lilith Sanctum reached 300 players. You cannot enter now.");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
for (Player member : members)
|
|
||||||
{
|
|
||||||
if (!member.isInsideRadius3D(npc, 1000))
|
|
||||||
{
|
|
||||||
player.sendMessage("Player " + member.getName() + " must go closer to Gatekeeper Spirit.");
|
|
||||||
}
|
|
||||||
enterInstance(member, npc, LILITH_TEMPLATE_ID);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (player.isGM())
|
|
||||||
{
|
|
||||||
enterInstance(player, npc, LILITH_TEMPLATE_ID);
|
|
||||||
player.sendMessage("SYS: You have entered as GM/Admin to Anakim Instance");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (!player.isInsideRadius3D(npc, 1000))
|
|
||||||
{
|
|
||||||
player.sendMessage("You must go closer to Gatekeeper Spirit.");
|
|
||||||
}
|
|
||||||
enterInstance(player, npc, LILITH_TEMPLATE_ID);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case "REMOVE_PLAYERS_FROM_ZONE_ANAKIM":
|
|
||||||
{
|
|
||||||
for (Creature charInside : ANAKIM_ZONE.getCharactersInside())
|
|
||||||
{
|
|
||||||
if ((charInside != null) && charInside.isPlayer())
|
|
||||||
{
|
|
||||||
charInside.teleToLocation(-20185 + getRandom(50), 13476 + getRandom(50), -4901);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case "REMOVE_PLAYERS_FROM_ZONE_LILITH":
|
|
||||||
{
|
|
||||||
for (Creature charInside : LILITH_ZONE.getCharactersInside())
|
|
||||||
{
|
|
||||||
if ((charInside != null) && charInside.isPlayer())
|
|
||||||
{
|
|
||||||
charInside.teleToLocation(171346 + getRandom(50), -17599 + getRandom(50), -4901);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case "TELEPORT_OUT":
|
|
||||||
{
|
|
||||||
// TODO: Different teleport location from instance.
|
|
||||||
// switch (player.getInstanceId())
|
|
||||||
// {
|
|
||||||
// case ANAKIM_TEMPLATE_ID:
|
|
||||||
// {
|
|
||||||
// final Location destination = TELEPORT_TO_DARK_ELVEN[getRandom(TELEPORT_TO_DARK_ELVEN.length)];
|
|
||||||
// player.teleToLocation(destination.getX() + getRandom(100), destination.getY() + getRandom(100), destination.getZ());
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// case LILITH_TEMPLATE_ID:
|
|
||||||
// {
|
|
||||||
// final Location destination = TELEPORT_TO_ADEN[getRandom(TELEPORT_TO_ADEN.length)];
|
|
||||||
// player.teleToLocation(destination.getX() + getRandom(100), destination.getY() + getRandom(100), destination.getZ());
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
final Location destination = TELEPORT_TO_DARK_ELVEN[getRandom(TELEPORT_TO_DARK_ELVEN.length)];
|
|
||||||
player.teleToLocation(destination.getX() + getRandom(100), destination.getY() + getRandom(100), destination.getZ());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case "ANAKIM_DEATH_CAST_LILITH_INVUL":
|
|
||||||
{
|
|
||||||
// TODO: When one RB die, the second will be invul for 5 minutes.
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case "LILITH_DEATH_CAST_ANAKIM_INVUL":
|
|
||||||
{
|
|
||||||
// TODO: When one RB die, the second will be invul for 5 minutes.
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String onKill(Npc npc, Player player, boolean isSummon)
|
|
||||||
{
|
|
||||||
switch (npc.getId())
|
|
||||||
{
|
|
||||||
case ANAKIM:
|
|
||||||
{
|
|
||||||
// TODO:
|
|
||||||
// startQuestTimer("ANAKIM_DEATH_CAST_LILITH_INVUL", 1000, null, null);
|
|
||||||
startQuestTimer("REMOVE_PLAYERS_FROM_ZONE_ANAKIM", 600000, null, player);
|
|
||||||
addSpawn(GATEKEEPER_SPIRIT_OUT_TELEPORT, -6664, 18501, -5495, 0, false, 600000, false, npc.getInstanceId());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case LILITH:
|
|
||||||
{
|
|
||||||
// TODO:
|
|
||||||
// startQuestTimer("LILITH_DEATH_CAST_ANAKIM_INVUL", 1000, null, null);
|
|
||||||
startQuestTimer("REMOVE_PLAYERS_FROM_ZONE_LILITH", 600000, null, player);
|
|
||||||
addSpawn(GATEKEEPER_SPIRIT_OUT_TELEPORT, 185062, -9612, -5493, 0, false, 600000, false, npc.getInstanceId());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
final Instance world = npc.getInstanceWorld();
|
|
||||||
if (world != null)
|
|
||||||
{
|
|
||||||
world.finishInstance();
|
|
||||||
}
|
|
||||||
return super.onKill(npc, player, isSummon);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void main(String[] args)
|
|
||||||
{
|
|
||||||
new SevenSignsRBs();
|
|
||||||
}
|
|
||||||
}
|
|
Reference in New Issue
Block a user