diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/instances/KrofinNest.xml b/L2J_Mobius_08.2_Homunculus/dist/game/data/instances/KrofinNest.xml
index 6ac51830ba..d631b29848 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/instances/KrofinNest.xml
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/instances/KrofinNest.xml
@@ -22,8 +22,9 @@
-
+
+
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/instances/KrofinNest/KrofinNest.java b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/instances/KrofinNest/KrofinNest.java
index eb7d9adb9a..09a0366be7 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/instances/KrofinNest/KrofinNest.java
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/instances/KrofinNest/KrofinNest.java
@@ -28,6 +28,7 @@ import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.network.NpcStringId;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
+import org.l2jmobius.gameserver.network.serverpackets.OnEventTrigger;
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
import instances.AbstractInstance;
@@ -83,6 +84,16 @@ public class KrofinNest extends AbstractInstance
private static final int DOOR2 = 24250002;
private static final int DOOR3 = 24250004;
private static final int DOOR4 = 24250006;
+ // Effect Triggers
+ private static final int DOOR1_CLOSED = 23227500;
+ private static final int DOOR1_OPENING = 23227502;
+ private static final int DOOR2_CLOSED = 24257710;
+ private static final int DOOR2_OPENING = 24257712;
+ private static final int DOOR3_CLOSED = 24257720;
+ private static final int DOOR3_OPENING = 24257722;
+ private static final int DOOR4_CLOSED = 24257730;
+ private static final int DOOR4_OPENING = 24257732;
+ private static final int BOSS_WATERFALL = 24257780;
public KrofinNest()
{
@@ -103,134 +114,243 @@ public class KrofinNest extends AbstractInstance
@Override
public String onAdvEvent(String event, Npc npc, Player player)
{
- switch (event)
+ if (event.contains("enterInstance"))
{
- case "enterInstance":
+ if (player.isInParty())
{
- if (player.isInParty())
- {
- final Party party = player.getParty();
- if (!party.isLeader(player))
- {
- player.sendPacket(new SystemMessage(SystemMessageId.ONLY_A_PARTY_LEADER_CAN_MAKE_THE_REQUEST_TO_ENTER));
- return null;
- }
-
- if (player.isInCommandChannel())
- {
- player.sendPacket(new SystemMessage(SystemMessageId.YOU_CANNOT_ENTER_BECAUSE_YOU_DO_NOT_MEET_THE_REQUIREMENTS));
- return null;
- }
-
- final long currentTime = System.currentTimeMillis();
- final List members = party.getMembers();
- for (Player member : members)
- {
- if (!member.isInsideRadius3D(npc, 1000))
- {
- player.sendMessage("Player " + member.getName() + " must come closer.");
- return null;
- }
-
- if (currentTime < InstanceManager.getInstance().getInstanceTime(member, TEMPLATE_ID))
- {
- final SystemMessage msg = new SystemMessage(SystemMessageId.SINCE_C1_ENTERED_ANOTHER_INSTANCE_ZONE_THEREFORE_YOU_CANNOT_ENTER_THIS_DUNGEON);
- msg.addString(member.getName());
- party.broadcastToPartyMembers(member, msg);
- return null;
- }
- }
-
- for (Player member : members)
- {
- enterInstance(member, npc, TEMPLATE_ID);
- }
- }
- else if (player.isGM())
- {
- enterInstance(player, npc, TEMPLATE_ID);
- }
- else
- {
- player.sendPacket(new SystemMessage(SystemMessageId.YOU_ARE_NOT_CURRENTLY_IN_A_PARTY_SO_YOU_CANNOT_ENTER));
- }
-
- if (player.getInstanceWorld() != null)
- {
- startQuestTimer("check_status", 1000, null, player);
- }
- return null;
- }
- case "check_status":
- {
- final Instance world = player.getInstanceWorld();
- if (!isInInstance(world))
+ final Party party = player.getParty();
+ if (!party.isLeader(player))
{
+ player.sendPacket(new SystemMessage(SystemMessageId.ONLY_A_PARTY_LEADER_CAN_MAKE_THE_REQUEST_TO_ENTER));
return null;
}
- switch (world.getStatus())
+ if (player.isInCommandChannel())
{
- case 0:
+ player.sendPacket(new SystemMessage(SystemMessageId.YOU_CANNOT_ENTER_BECAUSE_YOU_DO_NOT_MEET_THE_REQUIREMENTS));
+ return null;
+ }
+
+ final long currentTime = System.currentTimeMillis();
+ final List members = party.getMembers();
+ for (Player member : members)
+ {
+ if (!member.isInsideRadius3D(npc, 1000))
{
- world.setStatus(1);
- world.spawnGroup("FIRST_AREA");
- startQuestTimer("check_status", 10000, null, player);
- break;
+ player.sendMessage("Player " + member.getName() + " must come closer.");
+ return null;
}
- case 1:
+
+ if (currentTime < InstanceManager.getInstance().getInstanceTime(member, TEMPLATE_ID))
{
- if (world.getAliveNpcCount(FIRST_AREA) == 0)
- {
- showOnScreenMsg(world, NpcStringId.THE_WATER_ENERGY_IS_NO_LONGER_ACTIVE_THE_WAY_IS_CLEAR, ExShowScreenMessage.TOP_CENTER, 10000, true);
- world.setStatus(2);
- world.getDoor(DOOR1).openMe();
- world.spawnGroup("SECOND_AREA");
- }
- startQuestTimer("check_status", 1000, null, player);
- break;
- }
- case 2:
- {
- if (world.getAliveNpcCount(SECOND_AREA) == 0)
- {
- showOnScreenMsg(world, NpcStringId.THE_WATER_ENERGY_IS_NO_LONGER_ACTIVE_THE_WAY_IS_CLEAR, ExShowScreenMessage.TOP_CENTER, 10000, true);
- world.setStatus(3);
- world.getDoor(DOOR2).openMe();
- world.spawnGroup("THIRD_AREA");
- }
- startQuestTimer("check_status", 10000, null, player);
- break;
- }
- case 3:
- {
- if (world.getAliveNpcCount(THIRD_AREA) == 0)
- {
- showOnScreenMsg(world, NpcStringId.THE_WATER_ENERGY_IS_NO_LONGER_ACTIVE_THE_WAY_IS_CLEAR, ExShowScreenMessage.TOP_CENTER, 10000, true);
- world.setStatus(4);
- world.getDoor(DOOR3).openMe();
- world.spawnGroup("FOURTH_AREA");
- }
- startQuestTimer("check_status", 10000, null, player);
- break;
- }
- case 4:
- {
- if (world.getAliveNpcCount(FOURTH_AREA) == 0)
- {
- showOnScreenMsg(world, NpcStringId.THE_WATER_ENERGY_IS_NO_LONGER_ACTIVE_THE_WAY_IS_CLEAR, ExShowScreenMessage.TOP_CENTER, 10000, true);
- world.setStatus(5);
- world.getDoor(DOOR4).openMe();
- world.spawnGroup("KROSHA_FIRST_FORM");
- }
- startQuestTimer("check_status", 10000, null, player);
- break;
+ final SystemMessage msg = new SystemMessage(SystemMessageId.SINCE_C1_ENTERED_ANOTHER_INSTANCE_ZONE_THEREFORE_YOU_CANNOT_ENTER_THIS_DUNGEON);
+ msg.addString(member.getName());
+ party.broadcastToPartyMembers(member, msg);
+ return null;
}
}
- return null;
+
+ for (Player member : members)
+ {
+ enterInstance(member, npc, TEMPLATE_ID);
+ }
+ }
+ else if (player.isGM())
+ {
+ enterInstance(player, npc, TEMPLATE_ID);
+ }
+ else
+ {
+ player.sendPacket(new SystemMessage(SystemMessageId.YOU_ARE_NOT_CURRENTLY_IN_A_PARTY_SO_YOU_CANNOT_ENTER));
+ }
+
+ if (player.getInstanceWorld() != null)
+ {
+ startQuestTimer("check_status", 1000, null, player);
+ startQuestTimer("door_closed_effects", 1000, null, player);
}
}
- return super.onAdvEvent(event, npc, player);
+ else if (event.equals("door_closed_effects"))
+ {
+ final Instance world = player.getInstanceWorld();
+ if (!isInInstance(world))
+ {
+ return null;
+ }
+
+ switch (world.getStatus())
+ {
+ case 1:
+ {
+ world.broadcastPacket(new OnEventTrigger(DOOR1_CLOSED, true));
+ break;
+ }
+ case 2:
+ {
+ world.broadcastPacket(new OnEventTrigger(DOOR2_CLOSED, true));
+ break;
+ }
+ case 3:
+ {
+ world.broadcastPacket(new OnEventTrigger(DOOR3_CLOSED, true));
+ break;
+ }
+ case 4:
+ {
+ world.broadcastPacket(new OnEventTrigger(DOOR4_CLOSED, true));
+ break;
+ }
+ }
+ }
+ else if (event.equals("door_opening_effects"))
+ {
+ final Instance world = player.getInstanceWorld();
+ if (!isInInstance(world))
+ {
+ return null;
+ }
+
+ switch (world.getStatus())
+ {
+ case 2:
+ {
+ world.broadcastPacket(new OnEventTrigger(DOOR1_OPENING, true));
+ break;
+ }
+ case 3:
+ {
+ world.broadcastPacket(new OnEventTrigger(DOOR2_OPENING, true));
+ break;
+ }
+ case 4:
+ {
+ world.broadcastPacket(new OnEventTrigger(DOOR3_OPENING, true));
+ break;
+ }
+ case 5:
+ {
+ world.broadcastPacket(new OnEventTrigger(DOOR4_OPENING, true));
+ break;
+ }
+ }
+ }
+ else if (event.equals("door_effects_off"))
+ {
+ final Instance world = player.getInstanceWorld();
+ if (!isInInstance(world))
+ {
+ return null;
+ }
+
+ switch (world.getStatus())
+ {
+ case 2:
+ {
+ world.broadcastPacket(new OnEventTrigger(DOOR1_OPENING, false));
+ world.broadcastPacket(new OnEventTrigger(DOOR1_CLOSED, false));
+ break;
+ }
+ case 3:
+ {
+ world.broadcastPacket(new OnEventTrigger(DOOR2_OPENING, false));
+ world.broadcastPacket(new OnEventTrigger(DOOR2_CLOSED, false));
+ break;
+ }
+ case 4:
+ {
+ world.broadcastPacket(new OnEventTrigger(DOOR3_OPENING, false));
+ world.broadcastPacket(new OnEventTrigger(DOOR3_CLOSED, false));
+ break;
+ }
+ case 5:
+ {
+ world.broadcastPacket(new OnEventTrigger(DOOR4_OPENING, false));
+ world.broadcastPacket(new OnEventTrigger(DOOR4_CLOSED, false));
+ break;
+ }
+ }
+ }
+ else if (event.equals("check_status"))
+ {
+ final Instance world = player.getInstanceWorld();
+ if (!isInInstance(world))
+ {
+ return null;
+ }
+
+ switch (world.getStatus())
+ {
+ case 0:
+ {
+ world.setStatus(1);
+ world.spawnGroup("FIRST_AREA");
+ startQuestTimer("door_closed_effects", 2000, null, player);
+ startQuestTimer("check_status", 10000, null, player);
+ break;
+ }
+ case 1:
+ {
+ if (world.getAliveNpcCount(FIRST_AREA) == 0)
+ {
+ showOnScreenMsg(world, NpcStringId.THE_WATER_ENERGY_IS_NO_LONGER_ACTIVE_THE_WAY_IS_CLEAR, ExShowScreenMessage.TOP_CENTER, 10000, true);
+ world.setStatus(2);
+ world.getDoor(DOOR1).openMe();
+ startQuestTimer("door_opening_effects", 1000, null, player);
+ startQuestTimer("door_effects_off", 5000, null, player);
+ world.spawnGroup("SECOND_AREA");
+ startQuestTimer("door_closed_effects", 10000, null, player);
+ }
+ startQuestTimer("check_status", 1000, null, player);
+ break;
+ }
+ case 2:
+ {
+ if (world.getAliveNpcCount(SECOND_AREA) == 0)
+ {
+ showOnScreenMsg(world, NpcStringId.THE_WATER_ENERGY_IS_NO_LONGER_ACTIVE_THE_WAY_IS_CLEAR, ExShowScreenMessage.TOP_CENTER, 10000, true);
+ world.setStatus(3);
+ world.getDoor(DOOR2).openMe();
+ startQuestTimer("door_opening_effects", 1000, null, player);
+ startQuestTimer("door_effects_off", 5000, null, player);
+ world.spawnGroup("THIRD_AREA");
+ startQuestTimer("door_closed_effects", 2000, null, player);
+ }
+ startQuestTimer("check_status", 10000, null, player);
+ break;
+ }
+ case 3:
+ {
+ if (world.getAliveNpcCount(THIRD_AREA) == 0)
+ {
+ showOnScreenMsg(world, NpcStringId.THE_WATER_ENERGY_IS_NO_LONGER_ACTIVE_THE_WAY_IS_CLEAR, ExShowScreenMessage.TOP_CENTER, 10000, true);
+ world.setStatus(4);
+ world.getDoor(DOOR3).openMe();
+ startQuestTimer("door_opening_effects", 1000, null, player);
+ startQuestTimer("door_effects_off", 5000, null, player);
+ world.spawnGroup("FOURTH_AREA");
+ startQuestTimer("door_closed_effects", 2000, null, player);
+ }
+ startQuestTimer("check_status", 10000, null, player);
+ break;
+ }
+ case 4:
+ {
+ if (world.getAliveNpcCount(FOURTH_AREA) == 0)
+ {
+ showOnScreenMsg(world, NpcStringId.THE_WATER_ENERGY_IS_NO_LONGER_ACTIVE_THE_WAY_IS_CLEAR, ExShowScreenMessage.TOP_CENTER, 10000, true);
+ world.setStatus(5);
+ world.getDoor(DOOR4).openMe();
+ startQuestTimer("door_opening_effects", 1000, null, player);
+ startQuestTimer("door_effects_off", 5000, null, player);
+ world.spawnGroup("KROSHA_FIRST_FORM");
+ world.broadcastPacket(new OnEventTrigger(BOSS_WATERFALL, true));
+ }
+ startQuestTimer("check_status", 10000, null, player);
+ break;
+ }
+ }
+ }
+ return null;
}
@Override
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/instances/KrofinNest/condNoLevel.html b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/instances/KrofinNest/condNoLevel.html
new file mode 100644
index 0000000000..1ab587d8fe
--- /dev/null
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/instances/KrofinNest/condNoLevel.html
@@ -0,0 +1,4 @@
+Benusta:
+You are too weak. I won't let you enter.
+(Only players of at least level 105 may participate.)
+
\ No newline at end of file
diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/instances/KrofinNest.xml b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/instances/KrofinNest.xml
index 6ac51830ba..d631b29848 100644
--- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/instances/KrofinNest.xml
+++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/instances/KrofinNest.xml
@@ -22,8 +22,9 @@
-
+
+
diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/instances/KrofinNest110.xml b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/instances/KrofinNest110.xml
index d7dccf0f91..90754b315b 100644
--- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/instances/KrofinNest110.xml
+++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/instances/KrofinNest110.xml
@@ -22,8 +22,9 @@
-
-
+
+
+
diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/instances/KrofinNest/KrofinNest.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/instances/KrofinNest/KrofinNest.java
index 931374632f..8ca270eb3b 100644
--- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/instances/KrofinNest/KrofinNest.java
+++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/instances/KrofinNest/KrofinNest.java
@@ -28,6 +28,7 @@ import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.network.NpcStringId;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
+import org.l2jmobius.gameserver.network.serverpackets.OnEventTrigger;
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
import instances.AbstractInstance;
@@ -101,6 +102,7 @@ public class KrofinNest extends AbstractInstance
};
// Items
private static final ItemHolder BENUSTAS_REWARD_BOX = new ItemHolder(81151, 1);
+ private static final ItemHolder BENUSTAS_SHINING_REWARD_BOX = new ItemHolder(81452, 1);
private static final ItemHolder BENUSTAS_REWARD_BOX_110 = new ItemHolder(81741, 1);
// Misc
private static final int[] TEMPLATE_IDS =
@@ -108,10 +110,21 @@ public class KrofinNest extends AbstractInstance
291, // lv. 105
315, // lv. 110
};
+ private static int INITIAL_PARTY_MEMBERS = 0;
private static final int DOOR1 = 23220101;
private static final int DOOR2 = 24250002;
private static final int DOOR3 = 24250004;
private static final int DOOR4 = 24250006;
+ // Effect Triggers
+ private static final int DOOR1_CLOSED = 23227500;
+ private static final int DOOR1_OPENING = 23227502;
+ private static final int DOOR2_CLOSED = 24257710;
+ private static final int DOOR2_OPENING = 24257712;
+ private static final int DOOR3_CLOSED = 24257720;
+ private static final int DOOR3_OPENING = 24257722;
+ private static final int DOOR4_CLOSED = 24257730;
+ private static final int DOOR4_OPENING = 24257732;
+ private static final int BOSS_WATERFALL = 24257780;
public KrofinNest()
{
@@ -195,6 +208,107 @@ public class KrofinNest extends AbstractInstance
if (player.getInstanceWorld() != null)
{
startQuestTimer("check_status", 1000, null, player);
+ startQuestTimer("door_closed_effects", 1000, null, player);
+ }
+ }
+ else if (event.equals("door_closed_effects"))
+ {
+ final Instance world = player.getInstanceWorld();
+ if (!isInInstance(world))
+ {
+ return null;
+ }
+
+ switch (world.getStatus())
+ {
+ case 1:
+ {
+ world.broadcastPacket(new OnEventTrigger(DOOR1_CLOSED, true));
+ break;
+ }
+ case 2:
+ {
+ world.broadcastPacket(new OnEventTrigger(DOOR2_CLOSED, true));
+ break;
+ }
+ case 3:
+ {
+ world.broadcastPacket(new OnEventTrigger(DOOR3_CLOSED, true));
+ break;
+ }
+ case 4:
+ {
+ world.broadcastPacket(new OnEventTrigger(DOOR4_CLOSED, true));
+ break;
+ }
+ }
+ }
+ else if (event.equals("door_opening_effects"))
+ {
+ final Instance world = player.getInstanceWorld();
+ if (!isInInstance(world))
+ {
+ return null;
+ }
+
+ switch (world.getStatus())
+ {
+ case 2:
+ {
+ world.broadcastPacket(new OnEventTrigger(DOOR1_OPENING, true));
+ break;
+ }
+ case 3:
+ {
+ world.broadcastPacket(new OnEventTrigger(DOOR2_OPENING, true));
+ break;
+ }
+ case 4:
+ {
+ world.broadcastPacket(new OnEventTrigger(DOOR3_OPENING, true));
+ break;
+ }
+ case 5:
+ {
+ world.broadcastPacket(new OnEventTrigger(DOOR4_OPENING, true));
+ break;
+ }
+ }
+ }
+ else if (event.equals("door_effects_off"))
+ {
+ final Instance world = player.getInstanceWorld();
+ if (!isInInstance(world))
+ {
+ return null;
+ }
+
+ switch (world.getStatus())
+ {
+ case 2:
+ {
+ world.broadcastPacket(new OnEventTrigger(DOOR1_OPENING, false));
+ world.broadcastPacket(new OnEventTrigger(DOOR1_CLOSED, false));
+ break;
+ }
+ case 3:
+ {
+ world.broadcastPacket(new OnEventTrigger(DOOR2_OPENING, false));
+ world.broadcastPacket(new OnEventTrigger(DOOR2_CLOSED, false));
+ break;
+ }
+ case 4:
+ {
+ world.broadcastPacket(new OnEventTrigger(DOOR3_OPENING, false));
+ world.broadcastPacket(new OnEventTrigger(DOOR3_CLOSED, false));
+ break;
+ }
+ case 5:
+ {
+ world.broadcastPacket(new OnEventTrigger(DOOR4_OPENING, false));
+ world.broadcastPacket(new OnEventTrigger(DOOR4_CLOSED, false));
+ break;
+ }
}
}
else if (event.equals("check_status"))
@@ -211,6 +325,7 @@ public class KrofinNest extends AbstractInstance
{
world.setStatus(1);
world.spawnGroup("FIRST_AREA");
+ startQuestTimer("door_closed_effects", 2000, null, player);
startQuestTimer("check_status", 10000, null, player);
break;
}
@@ -221,7 +336,10 @@ public class KrofinNest extends AbstractInstance
showOnScreenMsg(world, NpcStringId.THE_WATER_ENERGY_IS_NO_LONGER_ACTIVE_THE_WAY_IS_CLEAR, ExShowScreenMessage.TOP_CENTER, 10000, true);
world.setStatus(2);
world.getDoor(DOOR1).openMe();
+ startQuestTimer("door_opening_effects", 1000, null, player);
+ startQuestTimer("door_effects_off", 5000, null, player);
world.spawnGroup("SECOND_AREA");
+ startQuestTimer("door_closed_effects", 10000, null, player);
}
startQuestTimer("check_status", 1000, null, player);
break;
@@ -233,7 +351,10 @@ public class KrofinNest extends AbstractInstance
showOnScreenMsg(world, NpcStringId.THE_WATER_ENERGY_IS_NO_LONGER_ACTIVE_THE_WAY_IS_CLEAR, ExShowScreenMessage.TOP_CENTER, 10000, true);
world.setStatus(3);
world.getDoor(DOOR2).openMe();
+ startQuestTimer("door_opening_effects", 1000, null, player);
+ startQuestTimer("door_effects_off", 5000, null, player);
world.spawnGroup("THIRD_AREA");
+ startQuestTimer("door_closed_effects", 2000, null, player);
}
startQuestTimer("check_status", 10000, null, player);
break;
@@ -245,7 +366,10 @@ public class KrofinNest extends AbstractInstance
showOnScreenMsg(world, NpcStringId.THE_WATER_ENERGY_IS_NO_LONGER_ACTIVE_THE_WAY_IS_CLEAR, ExShowScreenMessage.TOP_CENTER, 10000, true);
world.setStatus(4);
world.getDoor(DOOR3).openMe();
+ startQuestTimer("door_opening_effects", 1000, null, player);
+ startQuestTimer("door_effects_off", 5000, null, player);
world.spawnGroup("FOURTH_AREA");
+ startQuestTimer("door_closed_effects", 2000, null, player);
}
startQuestTimer("check_status", 10000, null, player);
break;
@@ -257,7 +381,10 @@ public class KrofinNest extends AbstractInstance
showOnScreenMsg(world, NpcStringId.THE_WATER_ENERGY_IS_NO_LONGER_ACTIVE_THE_WAY_IS_CLEAR, ExShowScreenMessage.TOP_CENTER, 10000, true);
world.setStatus(5);
world.getDoor(DOOR4).openMe();
+ startQuestTimer("door_opening_effects", 1000, null, player);
+ startQuestTimer("door_effects_off", 5000, null, player);
world.spawnGroup(world.getTemplateId() == TEMPLATE_IDS[0] ? "KROSHA_FIRST_FORM" : "KROSHA_FINAL_FORM");
+ world.broadcastPacket(new OnEventTrigger(BOSS_WATERFALL, true));
}
startQuestTimer("check_status", 10000, null, player);
break;
@@ -301,6 +428,12 @@ public class KrofinNest extends AbstractInstance
return super.onAttack(npc, attacker, damage, isSummon);
}
+ @Override
+ public void onInstanceCreated(Instance instance, Player player)
+ {
+ INITIAL_PARTY_MEMBERS = (player.getParty() != null ? player.getParty().getMemberCount() : 1);
+ }
+
@Override
public String onKill(Npc npc, Player killer, boolean isPet)
{
@@ -308,6 +441,8 @@ public class KrofinNest extends AbstractInstance
if (isInInstance(world))
{
final boolean kroshaFirstFormMinionsSpawnedTwice = world.getParameters().getBoolean("KROSHA_FIRST_FORM_MINIONS_SPAWNED_TWICE", false);
+ final boolean kroshaFinalFormSpawned = world.getParameters().getBoolean("KROSHA_FINAL_FORM_SPAWNED", false);
+ final Player randomPl = world.getFirstPlayer().getParty().getRandomPlayer();
if (world.getStatus() == 5)
{
if (CommonUtil.contains(KROSHA_FIRST_FORM_MINIONS, npc.getId()))
@@ -326,9 +461,10 @@ public class KrofinNest extends AbstractInstance
}
else if (CommonUtil.contains(ENHANCED_MINIONS, npc.getId()))
{
- if (world.getAliveNpcCount(ENHANCED_MINIONS) == 0)
+ if ((world.getAliveNpcCount(ENHANCED_MINIONS) == 0) && !kroshaFinalFormSpawned)
{
world.spawnGroup("KROSHA_FINAL_FORM");
+ world.getParameters().set("KROSHA_FINAL_FORM_SPAWNED", true);
showOnScreenMsg(world, NpcStringId.QUEEN_KROSHA_HAS_RETURNED_MORE_POWERFUL_THAN_EVER, ExShowScreenMessage.TOP_CENTER, 7000, true);
}
}
@@ -338,6 +474,16 @@ public class KrofinNest extends AbstractInstance
{
giveItems(member, BENUSTAS_REWARD_BOX);
}
+ if (world.getPlayersCount() == INITIAL_PARTY_MEMBERS)
+ {
+ if (getRandom(100) < 80)
+ {
+ if (randomPl != null)
+ {
+ giveItems(randomPl, BENUSTAS_SHINING_REWARD_BOX);
+ }
+ }
+ }
showOnScreenMsg(world, NpcStringId.THE_WATER_POWER_PROTECTING_QUEEN_KROSHA_HAS_DISAPPEARED, ExShowScreenMessage.TOP_CENTER, 7000, true);
world.finishInstance();
}
@@ -347,6 +493,16 @@ public class KrofinNest extends AbstractInstance
{
giveItems(member, BENUSTAS_REWARD_BOX_110);
}
+ if (world.getPlayersCount() == INITIAL_PARTY_MEMBERS)
+ {
+ if (getRandom(100) < 80)
+ {
+ if (randomPl != null)
+ {
+ giveItems(randomPl, BENUSTAS_SHINING_REWARD_BOX);
+ }
+ }
+ }
showOnScreenMsg(world, NpcStringId.THE_WATER_POWER_PROTECTING_QUEEN_KROSHA_HAS_DISAPPEARED, ExShowScreenMessage.TOP_CENTER, 7000, true);
world.finishInstance();
}
diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/instances/KrofinNest/condNoLevel.html b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/instances/KrofinNest/condNoLevel.html
new file mode 100644
index 0000000000..1ab587d8fe
--- /dev/null
+++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/instances/KrofinNest/condNoLevel.html
@@ -0,0 +1,4 @@
+Benusta:
+You are too weak. I won't let you enter.
+(Only players of at least level 105 may participate.)
+
\ No newline at end of file
diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/instances/KrofinNest/condNoLevel110.html b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/instances/KrofinNest/condNoLevel110.html
new file mode 100644
index 0000000000..5642abd633
--- /dev/null
+++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/instances/KrofinNest/condNoLevel110.html
@@ -0,0 +1,4 @@
+Benusta:
+You are too weak. I won't let you enter.
+(Only players of at least level 110 may participate.)
+
\ No newline at end of file
diff --git a/L2J_Mobius_10.1_MasterClass/dist/game/data/instances/KrofinNest.xml b/L2J_Mobius_10.1_MasterClass/dist/game/data/instances/KrofinNest.xml
index 6ac51830ba..d631b29848 100644
--- a/L2J_Mobius_10.1_MasterClass/dist/game/data/instances/KrofinNest.xml
+++ b/L2J_Mobius_10.1_MasterClass/dist/game/data/instances/KrofinNest.xml
@@ -22,8 +22,9 @@
-
+
+
diff --git a/L2J_Mobius_10.1_MasterClass/dist/game/data/instances/KrofinNest110.xml b/L2J_Mobius_10.1_MasterClass/dist/game/data/instances/KrofinNest110.xml
index d7dccf0f91..90754b315b 100644
--- a/L2J_Mobius_10.1_MasterClass/dist/game/data/instances/KrofinNest110.xml
+++ b/L2J_Mobius_10.1_MasterClass/dist/game/data/instances/KrofinNest110.xml
@@ -22,8 +22,9 @@
-
-
+
+
+
diff --git a/L2J_Mobius_10.1_MasterClass/dist/game/data/scripts/instances/KrofinNest/KrofinNest.java b/L2J_Mobius_10.1_MasterClass/dist/game/data/scripts/instances/KrofinNest/KrofinNest.java
index 931374632f..8ca270eb3b 100644
--- a/L2J_Mobius_10.1_MasterClass/dist/game/data/scripts/instances/KrofinNest/KrofinNest.java
+++ b/L2J_Mobius_10.1_MasterClass/dist/game/data/scripts/instances/KrofinNest/KrofinNest.java
@@ -28,6 +28,7 @@ import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.network.NpcStringId;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
+import org.l2jmobius.gameserver.network.serverpackets.OnEventTrigger;
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
import instances.AbstractInstance;
@@ -101,6 +102,7 @@ public class KrofinNest extends AbstractInstance
};
// Items
private static final ItemHolder BENUSTAS_REWARD_BOX = new ItemHolder(81151, 1);
+ private static final ItemHolder BENUSTAS_SHINING_REWARD_BOX = new ItemHolder(81452, 1);
private static final ItemHolder BENUSTAS_REWARD_BOX_110 = new ItemHolder(81741, 1);
// Misc
private static final int[] TEMPLATE_IDS =
@@ -108,10 +110,21 @@ public class KrofinNest extends AbstractInstance
291, // lv. 105
315, // lv. 110
};
+ private static int INITIAL_PARTY_MEMBERS = 0;
private static final int DOOR1 = 23220101;
private static final int DOOR2 = 24250002;
private static final int DOOR3 = 24250004;
private static final int DOOR4 = 24250006;
+ // Effect Triggers
+ private static final int DOOR1_CLOSED = 23227500;
+ private static final int DOOR1_OPENING = 23227502;
+ private static final int DOOR2_CLOSED = 24257710;
+ private static final int DOOR2_OPENING = 24257712;
+ private static final int DOOR3_CLOSED = 24257720;
+ private static final int DOOR3_OPENING = 24257722;
+ private static final int DOOR4_CLOSED = 24257730;
+ private static final int DOOR4_OPENING = 24257732;
+ private static final int BOSS_WATERFALL = 24257780;
public KrofinNest()
{
@@ -195,6 +208,107 @@ public class KrofinNest extends AbstractInstance
if (player.getInstanceWorld() != null)
{
startQuestTimer("check_status", 1000, null, player);
+ startQuestTimer("door_closed_effects", 1000, null, player);
+ }
+ }
+ else if (event.equals("door_closed_effects"))
+ {
+ final Instance world = player.getInstanceWorld();
+ if (!isInInstance(world))
+ {
+ return null;
+ }
+
+ switch (world.getStatus())
+ {
+ case 1:
+ {
+ world.broadcastPacket(new OnEventTrigger(DOOR1_CLOSED, true));
+ break;
+ }
+ case 2:
+ {
+ world.broadcastPacket(new OnEventTrigger(DOOR2_CLOSED, true));
+ break;
+ }
+ case 3:
+ {
+ world.broadcastPacket(new OnEventTrigger(DOOR3_CLOSED, true));
+ break;
+ }
+ case 4:
+ {
+ world.broadcastPacket(new OnEventTrigger(DOOR4_CLOSED, true));
+ break;
+ }
+ }
+ }
+ else if (event.equals("door_opening_effects"))
+ {
+ final Instance world = player.getInstanceWorld();
+ if (!isInInstance(world))
+ {
+ return null;
+ }
+
+ switch (world.getStatus())
+ {
+ case 2:
+ {
+ world.broadcastPacket(new OnEventTrigger(DOOR1_OPENING, true));
+ break;
+ }
+ case 3:
+ {
+ world.broadcastPacket(new OnEventTrigger(DOOR2_OPENING, true));
+ break;
+ }
+ case 4:
+ {
+ world.broadcastPacket(new OnEventTrigger(DOOR3_OPENING, true));
+ break;
+ }
+ case 5:
+ {
+ world.broadcastPacket(new OnEventTrigger(DOOR4_OPENING, true));
+ break;
+ }
+ }
+ }
+ else if (event.equals("door_effects_off"))
+ {
+ final Instance world = player.getInstanceWorld();
+ if (!isInInstance(world))
+ {
+ return null;
+ }
+
+ switch (world.getStatus())
+ {
+ case 2:
+ {
+ world.broadcastPacket(new OnEventTrigger(DOOR1_OPENING, false));
+ world.broadcastPacket(new OnEventTrigger(DOOR1_CLOSED, false));
+ break;
+ }
+ case 3:
+ {
+ world.broadcastPacket(new OnEventTrigger(DOOR2_OPENING, false));
+ world.broadcastPacket(new OnEventTrigger(DOOR2_CLOSED, false));
+ break;
+ }
+ case 4:
+ {
+ world.broadcastPacket(new OnEventTrigger(DOOR3_OPENING, false));
+ world.broadcastPacket(new OnEventTrigger(DOOR3_CLOSED, false));
+ break;
+ }
+ case 5:
+ {
+ world.broadcastPacket(new OnEventTrigger(DOOR4_OPENING, false));
+ world.broadcastPacket(new OnEventTrigger(DOOR4_CLOSED, false));
+ break;
+ }
}
}
else if (event.equals("check_status"))
@@ -211,6 +325,7 @@ public class KrofinNest extends AbstractInstance
{
world.setStatus(1);
world.spawnGroup("FIRST_AREA");
+ startQuestTimer("door_closed_effects", 2000, null, player);
startQuestTimer("check_status", 10000, null, player);
break;
}
@@ -221,7 +336,10 @@ public class KrofinNest extends AbstractInstance
showOnScreenMsg(world, NpcStringId.THE_WATER_ENERGY_IS_NO_LONGER_ACTIVE_THE_WAY_IS_CLEAR, ExShowScreenMessage.TOP_CENTER, 10000, true);
world.setStatus(2);
world.getDoor(DOOR1).openMe();
+ startQuestTimer("door_opening_effects", 1000, null, player);
+ startQuestTimer("door_effects_off", 5000, null, player);
world.spawnGroup("SECOND_AREA");
+ startQuestTimer("door_closed_effects", 10000, null, player);
}
startQuestTimer("check_status", 1000, null, player);
break;
@@ -233,7 +351,10 @@ public class KrofinNest extends AbstractInstance
showOnScreenMsg(world, NpcStringId.THE_WATER_ENERGY_IS_NO_LONGER_ACTIVE_THE_WAY_IS_CLEAR, ExShowScreenMessage.TOP_CENTER, 10000, true);
world.setStatus(3);
world.getDoor(DOOR2).openMe();
+ startQuestTimer("door_opening_effects", 1000, null, player);
+ startQuestTimer("door_effects_off", 5000, null, player);
world.spawnGroup("THIRD_AREA");
+ startQuestTimer("door_closed_effects", 2000, null, player);
}
startQuestTimer("check_status", 10000, null, player);
break;
@@ -245,7 +366,10 @@ public class KrofinNest extends AbstractInstance
showOnScreenMsg(world, NpcStringId.THE_WATER_ENERGY_IS_NO_LONGER_ACTIVE_THE_WAY_IS_CLEAR, ExShowScreenMessage.TOP_CENTER, 10000, true);
world.setStatus(4);
world.getDoor(DOOR3).openMe();
+ startQuestTimer("door_opening_effects", 1000, null, player);
+ startQuestTimer("door_effects_off", 5000, null, player);
world.spawnGroup("FOURTH_AREA");
+ startQuestTimer("door_closed_effects", 2000, null, player);
}
startQuestTimer("check_status", 10000, null, player);
break;
@@ -257,7 +381,10 @@ public class KrofinNest extends AbstractInstance
showOnScreenMsg(world, NpcStringId.THE_WATER_ENERGY_IS_NO_LONGER_ACTIVE_THE_WAY_IS_CLEAR, ExShowScreenMessage.TOP_CENTER, 10000, true);
world.setStatus(5);
world.getDoor(DOOR4).openMe();
+ startQuestTimer("door_opening_effects", 1000, null, player);
+ startQuestTimer("door_effects_off", 5000, null, player);
world.spawnGroup(world.getTemplateId() == TEMPLATE_IDS[0] ? "KROSHA_FIRST_FORM" : "KROSHA_FINAL_FORM");
+ world.broadcastPacket(new OnEventTrigger(BOSS_WATERFALL, true));
}
startQuestTimer("check_status", 10000, null, player);
break;
@@ -301,6 +428,12 @@ public class KrofinNest extends AbstractInstance
return super.onAttack(npc, attacker, damage, isSummon);
}
+ @Override
+ public void onInstanceCreated(Instance instance, Player player)
+ {
+ INITIAL_PARTY_MEMBERS = (player.getParty() != null ? player.getParty().getMemberCount() : 1);
+ }
+
@Override
public String onKill(Npc npc, Player killer, boolean isPet)
{
@@ -308,6 +441,8 @@ public class KrofinNest extends AbstractInstance
if (isInInstance(world))
{
final boolean kroshaFirstFormMinionsSpawnedTwice = world.getParameters().getBoolean("KROSHA_FIRST_FORM_MINIONS_SPAWNED_TWICE", false);
+ final boolean kroshaFinalFormSpawned = world.getParameters().getBoolean("KROSHA_FINAL_FORM_SPAWNED", false);
+ final Player randomPl = world.getFirstPlayer().getParty().getRandomPlayer();
if (world.getStatus() == 5)
{
if (CommonUtil.contains(KROSHA_FIRST_FORM_MINIONS, npc.getId()))
@@ -326,9 +461,10 @@ public class KrofinNest extends AbstractInstance
}
else if (CommonUtil.contains(ENHANCED_MINIONS, npc.getId()))
{
- if (world.getAliveNpcCount(ENHANCED_MINIONS) == 0)
+ if ((world.getAliveNpcCount(ENHANCED_MINIONS) == 0) && !kroshaFinalFormSpawned)
{
world.spawnGroup("KROSHA_FINAL_FORM");
+ world.getParameters().set("KROSHA_FINAL_FORM_SPAWNED", true);
showOnScreenMsg(world, NpcStringId.QUEEN_KROSHA_HAS_RETURNED_MORE_POWERFUL_THAN_EVER, ExShowScreenMessage.TOP_CENTER, 7000, true);
}
}
@@ -338,6 +474,16 @@ public class KrofinNest extends AbstractInstance
{
giveItems(member, BENUSTAS_REWARD_BOX);
}
+ if (world.getPlayersCount() == INITIAL_PARTY_MEMBERS)
+ {
+ if (getRandom(100) < 80)
+ {
+ if (randomPl != null)
+ {
+ giveItems(randomPl, BENUSTAS_SHINING_REWARD_BOX);
+ }
+ }
+ }
showOnScreenMsg(world, NpcStringId.THE_WATER_POWER_PROTECTING_QUEEN_KROSHA_HAS_DISAPPEARED, ExShowScreenMessage.TOP_CENTER, 7000, true);
world.finishInstance();
}
@@ -347,6 +493,16 @@ public class KrofinNest extends AbstractInstance
{
giveItems(member, BENUSTAS_REWARD_BOX_110);
}
+ if (world.getPlayersCount() == INITIAL_PARTY_MEMBERS)
+ {
+ if (getRandom(100) < 80)
+ {
+ if (randomPl != null)
+ {
+ giveItems(randomPl, BENUSTAS_SHINING_REWARD_BOX);
+ }
+ }
+ }
showOnScreenMsg(world, NpcStringId.THE_WATER_POWER_PROTECTING_QUEEN_KROSHA_HAS_DISAPPEARED, ExShowScreenMessage.TOP_CENTER, 7000, true);
world.finishInstance();
}
diff --git a/L2J_Mobius_10.1_MasterClass/dist/game/data/scripts/instances/KrofinNest/condNoLevel.html b/L2J_Mobius_10.1_MasterClass/dist/game/data/scripts/instances/KrofinNest/condNoLevel.html
new file mode 100644
index 0000000000..1ab587d8fe
--- /dev/null
+++ b/L2J_Mobius_10.1_MasterClass/dist/game/data/scripts/instances/KrofinNest/condNoLevel.html
@@ -0,0 +1,4 @@
+Benusta:
+You are too weak. I won't let you enter.
+(Only players of at least level 105 may participate.)
+
\ No newline at end of file
diff --git a/L2J_Mobius_10.1_MasterClass/dist/game/data/scripts/instances/KrofinNest/condNoLevel110.html b/L2J_Mobius_10.1_MasterClass/dist/game/data/scripts/instances/KrofinNest/condNoLevel110.html
new file mode 100644
index 0000000000..5642abd633
--- /dev/null
+++ b/L2J_Mobius_10.1_MasterClass/dist/game/data/scripts/instances/KrofinNest/condNoLevel110.html
@@ -0,0 +1,4 @@
+Benusta:
+You are too weak. I won't let you enter.
+(Only players of at least level 110 may participate.)
+
\ No newline at end of file
diff --git a/L2J_Mobius_10.2_MasterClass/dist/game/data/instances/KrofinNest.xml b/L2J_Mobius_10.2_MasterClass/dist/game/data/instances/KrofinNest.xml
index 6ac51830ba..d631b29848 100644
--- a/L2J_Mobius_10.2_MasterClass/dist/game/data/instances/KrofinNest.xml
+++ b/L2J_Mobius_10.2_MasterClass/dist/game/data/instances/KrofinNest.xml
@@ -22,8 +22,9 @@
-
+
+
diff --git a/L2J_Mobius_10.2_MasterClass/dist/game/data/instances/KrofinNest110.xml b/L2J_Mobius_10.2_MasterClass/dist/game/data/instances/KrofinNest110.xml
index d7dccf0f91..90754b315b 100644
--- a/L2J_Mobius_10.2_MasterClass/dist/game/data/instances/KrofinNest110.xml
+++ b/L2J_Mobius_10.2_MasterClass/dist/game/data/instances/KrofinNest110.xml
@@ -22,8 +22,9 @@
-
-
+
+
+
diff --git a/L2J_Mobius_10.2_MasterClass/dist/game/data/scripts/instances/KrofinNest/KrofinNest.java b/L2J_Mobius_10.2_MasterClass/dist/game/data/scripts/instances/KrofinNest/KrofinNest.java
index 931374632f..8ca270eb3b 100644
--- a/L2J_Mobius_10.2_MasterClass/dist/game/data/scripts/instances/KrofinNest/KrofinNest.java
+++ b/L2J_Mobius_10.2_MasterClass/dist/game/data/scripts/instances/KrofinNest/KrofinNest.java
@@ -28,6 +28,7 @@ import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.network.NpcStringId;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
+import org.l2jmobius.gameserver.network.serverpackets.OnEventTrigger;
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
import instances.AbstractInstance;
@@ -101,6 +102,7 @@ public class KrofinNest extends AbstractInstance
};
// Items
private static final ItemHolder BENUSTAS_REWARD_BOX = new ItemHolder(81151, 1);
+ private static final ItemHolder BENUSTAS_SHINING_REWARD_BOX = new ItemHolder(81452, 1);
private static final ItemHolder BENUSTAS_REWARD_BOX_110 = new ItemHolder(81741, 1);
// Misc
private static final int[] TEMPLATE_IDS =
@@ -108,10 +110,21 @@ public class KrofinNest extends AbstractInstance
291, // lv. 105
315, // lv. 110
};
+ private static int INITIAL_PARTY_MEMBERS = 0;
private static final int DOOR1 = 23220101;
private static final int DOOR2 = 24250002;
private static final int DOOR3 = 24250004;
private static final int DOOR4 = 24250006;
+ // Effect Triggers
+ private static final int DOOR1_CLOSED = 23227500;
+ private static final int DOOR1_OPENING = 23227502;
+ private static final int DOOR2_CLOSED = 24257710;
+ private static final int DOOR2_OPENING = 24257712;
+ private static final int DOOR3_CLOSED = 24257720;
+ private static final int DOOR3_OPENING = 24257722;
+ private static final int DOOR4_CLOSED = 24257730;
+ private static final int DOOR4_OPENING = 24257732;
+ private static final int BOSS_WATERFALL = 24257780;
public KrofinNest()
{
@@ -195,6 +208,107 @@ public class KrofinNest extends AbstractInstance
if (player.getInstanceWorld() != null)
{
startQuestTimer("check_status", 1000, null, player);
+ startQuestTimer("door_closed_effects", 1000, null, player);
+ }
+ }
+ else if (event.equals("door_closed_effects"))
+ {
+ final Instance world = player.getInstanceWorld();
+ if (!isInInstance(world))
+ {
+ return null;
+ }
+
+ switch (world.getStatus())
+ {
+ case 1:
+ {
+ world.broadcastPacket(new OnEventTrigger(DOOR1_CLOSED, true));
+ break;
+ }
+ case 2:
+ {
+ world.broadcastPacket(new OnEventTrigger(DOOR2_CLOSED, true));
+ break;
+ }
+ case 3:
+ {
+ world.broadcastPacket(new OnEventTrigger(DOOR3_CLOSED, true));
+ break;
+ }
+ case 4:
+ {
+ world.broadcastPacket(new OnEventTrigger(DOOR4_CLOSED, true));
+ break;
+ }
+ }
+ }
+ else if (event.equals("door_opening_effects"))
+ {
+ final Instance world = player.getInstanceWorld();
+ if (!isInInstance(world))
+ {
+ return null;
+ }
+
+ switch (world.getStatus())
+ {
+ case 2:
+ {
+ world.broadcastPacket(new OnEventTrigger(DOOR1_OPENING, true));
+ break;
+ }
+ case 3:
+ {
+ world.broadcastPacket(new OnEventTrigger(DOOR2_OPENING, true));
+ break;
+ }
+ case 4:
+ {
+ world.broadcastPacket(new OnEventTrigger(DOOR3_OPENING, true));
+ break;
+ }
+ case 5:
+ {
+ world.broadcastPacket(new OnEventTrigger(DOOR4_OPENING, true));
+ break;
+ }
+ }
+ }
+ else if (event.equals("door_effects_off"))
+ {
+ final Instance world = player.getInstanceWorld();
+ if (!isInInstance(world))
+ {
+ return null;
+ }
+
+ switch (world.getStatus())
+ {
+ case 2:
+ {
+ world.broadcastPacket(new OnEventTrigger(DOOR1_OPENING, false));
+ world.broadcastPacket(new OnEventTrigger(DOOR1_CLOSED, false));
+ break;
+ }
+ case 3:
+ {
+ world.broadcastPacket(new OnEventTrigger(DOOR2_OPENING, false));
+ world.broadcastPacket(new OnEventTrigger(DOOR2_CLOSED, false));
+ break;
+ }
+ case 4:
+ {
+ world.broadcastPacket(new OnEventTrigger(DOOR3_OPENING, false));
+ world.broadcastPacket(new OnEventTrigger(DOOR3_CLOSED, false));
+ break;
+ }
+ case 5:
+ {
+ world.broadcastPacket(new OnEventTrigger(DOOR4_OPENING, false));
+ world.broadcastPacket(new OnEventTrigger(DOOR4_CLOSED, false));
+ break;
+ }
}
}
else if (event.equals("check_status"))
@@ -211,6 +325,7 @@ public class KrofinNest extends AbstractInstance
{
world.setStatus(1);
world.spawnGroup("FIRST_AREA");
+ startQuestTimer("door_closed_effects", 2000, null, player);
startQuestTimer("check_status", 10000, null, player);
break;
}
@@ -221,7 +336,10 @@ public class KrofinNest extends AbstractInstance
showOnScreenMsg(world, NpcStringId.THE_WATER_ENERGY_IS_NO_LONGER_ACTIVE_THE_WAY_IS_CLEAR, ExShowScreenMessage.TOP_CENTER, 10000, true);
world.setStatus(2);
world.getDoor(DOOR1).openMe();
+ startQuestTimer("door_opening_effects", 1000, null, player);
+ startQuestTimer("door_effects_off", 5000, null, player);
world.spawnGroup("SECOND_AREA");
+ startQuestTimer("door_closed_effects", 10000, null, player);
}
startQuestTimer("check_status", 1000, null, player);
break;
@@ -233,7 +351,10 @@ public class KrofinNest extends AbstractInstance
showOnScreenMsg(world, NpcStringId.THE_WATER_ENERGY_IS_NO_LONGER_ACTIVE_THE_WAY_IS_CLEAR, ExShowScreenMessage.TOP_CENTER, 10000, true);
world.setStatus(3);
world.getDoor(DOOR2).openMe();
+ startQuestTimer("door_opening_effects", 1000, null, player);
+ startQuestTimer("door_effects_off", 5000, null, player);
world.spawnGroup("THIRD_AREA");
+ startQuestTimer("door_closed_effects", 2000, null, player);
}
startQuestTimer("check_status", 10000, null, player);
break;
@@ -245,7 +366,10 @@ public class KrofinNest extends AbstractInstance
showOnScreenMsg(world, NpcStringId.THE_WATER_ENERGY_IS_NO_LONGER_ACTIVE_THE_WAY_IS_CLEAR, ExShowScreenMessage.TOP_CENTER, 10000, true);
world.setStatus(4);
world.getDoor(DOOR3).openMe();
+ startQuestTimer("door_opening_effects", 1000, null, player);
+ startQuestTimer("door_effects_off", 5000, null, player);
world.spawnGroup("FOURTH_AREA");
+ startQuestTimer("door_closed_effects", 2000, null, player);
}
startQuestTimer("check_status", 10000, null, player);
break;
@@ -257,7 +381,10 @@ public class KrofinNest extends AbstractInstance
showOnScreenMsg(world, NpcStringId.THE_WATER_ENERGY_IS_NO_LONGER_ACTIVE_THE_WAY_IS_CLEAR, ExShowScreenMessage.TOP_CENTER, 10000, true);
world.setStatus(5);
world.getDoor(DOOR4).openMe();
+ startQuestTimer("door_opening_effects", 1000, null, player);
+ startQuestTimer("door_effects_off", 5000, null, player);
world.spawnGroup(world.getTemplateId() == TEMPLATE_IDS[0] ? "KROSHA_FIRST_FORM" : "KROSHA_FINAL_FORM");
+ world.broadcastPacket(new OnEventTrigger(BOSS_WATERFALL, true));
}
startQuestTimer("check_status", 10000, null, player);
break;
@@ -301,6 +428,12 @@ public class KrofinNest extends AbstractInstance
return super.onAttack(npc, attacker, damage, isSummon);
}
+ @Override
+ public void onInstanceCreated(Instance instance, Player player)
+ {
+ INITIAL_PARTY_MEMBERS = (player.getParty() != null ? player.getParty().getMemberCount() : 1);
+ }
+
@Override
public String onKill(Npc npc, Player killer, boolean isPet)
{
@@ -308,6 +441,8 @@ public class KrofinNest extends AbstractInstance
if (isInInstance(world))
{
final boolean kroshaFirstFormMinionsSpawnedTwice = world.getParameters().getBoolean("KROSHA_FIRST_FORM_MINIONS_SPAWNED_TWICE", false);
+ final boolean kroshaFinalFormSpawned = world.getParameters().getBoolean("KROSHA_FINAL_FORM_SPAWNED", false);
+ final Player randomPl = world.getFirstPlayer().getParty().getRandomPlayer();
if (world.getStatus() == 5)
{
if (CommonUtil.contains(KROSHA_FIRST_FORM_MINIONS, npc.getId()))
@@ -326,9 +461,10 @@ public class KrofinNest extends AbstractInstance
}
else if (CommonUtil.contains(ENHANCED_MINIONS, npc.getId()))
{
- if (world.getAliveNpcCount(ENHANCED_MINIONS) == 0)
+ if ((world.getAliveNpcCount(ENHANCED_MINIONS) == 0) && !kroshaFinalFormSpawned)
{
world.spawnGroup("KROSHA_FINAL_FORM");
+ world.getParameters().set("KROSHA_FINAL_FORM_SPAWNED", true);
showOnScreenMsg(world, NpcStringId.QUEEN_KROSHA_HAS_RETURNED_MORE_POWERFUL_THAN_EVER, ExShowScreenMessage.TOP_CENTER, 7000, true);
}
}
@@ -338,6 +474,16 @@ public class KrofinNest extends AbstractInstance
{
giveItems(member, BENUSTAS_REWARD_BOX);
}
+ if (world.getPlayersCount() == INITIAL_PARTY_MEMBERS)
+ {
+ if (getRandom(100) < 80)
+ {
+ if (randomPl != null)
+ {
+ giveItems(randomPl, BENUSTAS_SHINING_REWARD_BOX);
+ }
+ }
+ }
showOnScreenMsg(world, NpcStringId.THE_WATER_POWER_PROTECTING_QUEEN_KROSHA_HAS_DISAPPEARED, ExShowScreenMessage.TOP_CENTER, 7000, true);
world.finishInstance();
}
@@ -347,6 +493,16 @@ public class KrofinNest extends AbstractInstance
{
giveItems(member, BENUSTAS_REWARD_BOX_110);
}
+ if (world.getPlayersCount() == INITIAL_PARTY_MEMBERS)
+ {
+ if (getRandom(100) < 80)
+ {
+ if (randomPl != null)
+ {
+ giveItems(randomPl, BENUSTAS_SHINING_REWARD_BOX);
+ }
+ }
+ }
showOnScreenMsg(world, NpcStringId.THE_WATER_POWER_PROTECTING_QUEEN_KROSHA_HAS_DISAPPEARED, ExShowScreenMessage.TOP_CENTER, 7000, true);
world.finishInstance();
}
diff --git a/L2J_Mobius_10.2_MasterClass/dist/game/data/scripts/instances/KrofinNest/condNoLevel.html b/L2J_Mobius_10.2_MasterClass/dist/game/data/scripts/instances/KrofinNest/condNoLevel.html
new file mode 100644
index 0000000000..1ab587d8fe
--- /dev/null
+++ b/L2J_Mobius_10.2_MasterClass/dist/game/data/scripts/instances/KrofinNest/condNoLevel.html
@@ -0,0 +1,4 @@
+Benusta:
+You are too weak. I won't let you enter.
+(Only players of at least level 105 may participate.)
+
\ No newline at end of file
diff --git a/L2J_Mobius_10.2_MasterClass/dist/game/data/scripts/instances/KrofinNest/condNoLevel110.html b/L2J_Mobius_10.2_MasterClass/dist/game/data/scripts/instances/KrofinNest/condNoLevel110.html
new file mode 100644
index 0000000000..5642abd633
--- /dev/null
+++ b/L2J_Mobius_10.2_MasterClass/dist/game/data/scripts/instances/KrofinNest/condNoLevel110.html
@@ -0,0 +1,4 @@
+Benusta:
+You are too weak. I won't let you enter.
+(Only players of at least level 110 may participate.)
+
\ No newline at end of file