From cced73a53284fcccb6cee7de38088d62ad756ad6 Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Sun, 6 Dec 2020 23:36:17 +0000 Subject: [PATCH] Addition of Kastia Extreme and Exceptional instances. --- .../dist/game/data/html/default/34541.htm | 10 +- .../game/data/instances/KastiaExceptional.xml | 88 +++++++++ .../game/data/instances/KastiaExtreme.xml | 88 +++++++++ .../KastiaExceptional/KastiaExceptional.java | 181 ++++++++++++++++++ .../KastiaExceptional/condNoLevel.html | 4 + .../KastiaExceptional/condOverLevel.html | 4 + .../KastiaExtreme/KastiaExtreme.java | 181 ++++++++++++++++++ .../instances/KastiaExtreme/condNoLevel.html | 4 + .../KastiaExtreme/condOverLevel.html | 4 + 9 files changed, 560 insertions(+), 4 deletions(-) create mode 100644 L2J_Mobius_8.0_Homunculus/dist/game/data/instances/KastiaExceptional.xml create mode 100644 L2J_Mobius_8.0_Homunculus/dist/game/data/instances/KastiaExtreme.xml create mode 100644 L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/instances/KastiaExceptional/KastiaExceptional.java create mode 100644 L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/instances/KastiaExceptional/condNoLevel.html create mode 100644 L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/instances/KastiaExceptional/condOverLevel.html create mode 100644 L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/instances/KastiaExtreme/KastiaExtreme.java create mode 100644 L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/instances/KastiaExtreme/condNoLevel.html create mode 100644 L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/instances/KastiaExtreme/condOverLevel.html diff --git a/L2J_Mobius_8.0_Homunculus/dist/game/data/html/default/34541.htm b/L2J_Mobius_8.0_Homunculus/dist/game/data/html/default/34541.htm index 2ccf3d0efc..b5b5b5199f 100644 --- a/L2J_Mobius_8.0_Homunculus/dist/game/data/html/default/34541.htm +++ b/L2J_Mobius_8.0_Homunculus/dist/game/data/html/default/34541.htm @@ -1,6 +1,8 @@ Karinia:
-Welcome! My name is Karinia. I help adventures to travel to instance zones. Every adventurer of Lv. 100 and highter can enter the Kastia's Labyrinth. But there's one requirement. If you have defeated the last boss on any of three difficulty levels, you can't enter the Kastia's Labyrinth again until the next day. Remember it.
- - - +Welcome! My name is Karinia. I help heroes access instance zones. Kastia's Labyrinth is open for any hero who has reached Lv. 100. There is one condition, though. If you have defeated the final boss on any of the five difficulty levels, you can't enter Kastia's Labyrinth again until the next day. Keep that in mind.

+ + + + + \ No newline at end of file diff --git a/L2J_Mobius_8.0_Homunculus/dist/game/data/instances/KastiaExceptional.xml b/L2J_Mobius_8.0_Homunculus/dist/game/data/instances/KastiaExceptional.xml new file mode 100644 index 0000000000..b410082fca --- /dev/null +++ b/L2J_Mobius_8.0_Homunculus/dist/game/data/instances/KastiaExceptional.xml @@ -0,0 +1,88 @@ + + + + \ No newline at end of file diff --git a/L2J_Mobius_8.0_Homunculus/dist/game/data/instances/KastiaExtreme.xml b/L2J_Mobius_8.0_Homunculus/dist/game/data/instances/KastiaExtreme.xml new file mode 100644 index 0000000000..b36c147df1 --- /dev/null +++ b/L2J_Mobius_8.0_Homunculus/dist/game/data/instances/KastiaExtreme.xml @@ -0,0 +1,88 @@ + + + + \ No newline at end of file diff --git a/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/instances/KastiaExceptional/KastiaExceptional.java b/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/instances/KastiaExceptional/KastiaExceptional.java new file mode 100644 index 0000000000..c83ebe83a2 --- /dev/null +++ b/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/instances/KastiaExceptional/KastiaExceptional.java @@ -0,0 +1,181 @@ +/* + * 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 . + */ +package instances.KastiaExceptional; + +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.model.holders.ItemHolder; +import org.l2jmobius.gameserver.model.instancezone.Instance; +import org.l2jmobius.gameserver.network.NpcStringId; +import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage; + +import instances.AbstractInstance; + +/** + * @author Mobius + */ +public class KastiaExceptional extends AbstractInstance +{ + // NPC + private static final int KARINIA = 34541; + // Monsters + private static final int[] MONSTERS = + { + 24588, // Kastia's Keeper + 24589, // Kastia's Overseer + 24590, // Kastia's Warder + 24591, // Vishes + }; + // Item + private static final ItemHolder KASTIAS_LV4_PACK = new ItemHolder(81465, 1); + // Misc + private static final int TEMPLATE_ID = 305; + + public KastiaExceptional() + { + super(TEMPLATE_ID); + addStartNpc(KARINIA); + addTalkId(KARINIA); + addKillId(MONSTERS); + } + + @Override + public String onAdvEvent(String event, Npc npc, PlayerInstance player) + { + switch (event) + { + case "enterInstance": + { + /* + * Cannot enter if player finished another Kastia instance. if ((System.currentTimeMillis() > InstanceManager.getInstance().getInstanceTime(player, 299)) || (System.currentTimeMillis() > InstanceManager.getInstance().getInstanceTime(player, 298))) { player.sendPacket(new + * SystemMessage(SystemMessageId.SINCE_C1_ENTERED_ANOTHER_INSTANCE_ZONE_THEREFORE_YOU_CANNOT_ENTER_THIS_DUNGEON).addString(player.getName())); return null; } + */ + enterInstance(player, npc, TEMPLATE_ID); + if (player.getInstanceWorld() != null) + { + startQuestTimer("check_status", 10000, null, player); + } + return null; + } + case "check_status": + { + final Instance world = player.getInstanceWorld(); + if (!isInInstance(world)) + { + return null; + } + switch (world.getStatus()) + { + case 0: + { + showOnScreenMsg(world, NpcStringId.STAGE_1, ExShowScreenMessage.TOP_CENTER, 10000, true); + world.setStatus(1); + world.spawnGroup("wave_1"); + startQuestTimer("check_status", 10000, null, player); + break; + } + case 1: + { + if (world.getAliveNpcs().isEmpty()) + { + showOnScreenMsg(world, NpcStringId.STAGE_2, ExShowScreenMessage.TOP_CENTER, 10000, true); + world.setStatus(2); + world.spawnGroup("wave_2"); + } + startQuestTimer("check_status", 10000, null, player); + break; + } + case 2: + { + if (world.getAliveNpcs().isEmpty()) + { + showOnScreenMsg(world, NpcStringId.STAGE_3, ExShowScreenMessage.TOP_CENTER, 10000, true); + world.setStatus(3); + world.spawnGroup("wave_3"); + } + startQuestTimer("check_status", 10000, null, player); + break; + } + case 3: + { + if (world.getAliveNpcs().isEmpty()) + { + showOnScreenMsg(world, NpcStringId.STAGE_4, ExShowScreenMessage.TOP_CENTER, 10000, true); + world.setStatus(4); + world.spawnGroup("wave_4"); + } + startQuestTimer("check_status", 10000, null, player); + break; + } + case 4: + { + if (world.getAliveNpcs().isEmpty()) + { + showOnScreenMsg(world, NpcStringId.STAGE_5, ExShowScreenMessage.TOP_CENTER, 10000, true); + world.setStatus(5); + world.spawnGroup("wave_5"); + } + startQuestTimer("check_status", 10000, null, player); + break; + } + case 5: + { + if (world.getAliveNpcs().isEmpty()) + { + showOnScreenMsg(world, NpcStringId.STAGE_6, ExShowScreenMessage.TOP_CENTER, 10000, true); + world.setStatus(6); + world.spawnGroup("wave_6"); + } + startQuestTimer("check_status", 10000, null, player); + break; + } + case 6: + { + if (world.getAliveNpcs().isEmpty()) + { + showOnScreenMsg(world, NpcStringId.STAGE_7, ExShowScreenMessage.TOP_CENTER, 10000, true); + world.setStatus(7); + world.spawnGroup("wave_7"); + } + startQuestTimer("check_status", 10000, null, player); + break; + } + case 7: + { + if (world.getAliveNpcs().isEmpty()) + { + giveItems(player, KASTIAS_LV4_PACK); + world.finishInstance(); + } + else + { + startQuestTimer("check_status", 10000, null, player); + } + break; + } + } + return null; + } + } + return super.onAdvEvent(event, npc, player); + } + + public static void main(String[] args) + { + new KastiaExceptional(); + } +} \ No newline at end of file diff --git a/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/instances/KastiaExceptional/condNoLevel.html b/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/instances/KastiaExceptional/condNoLevel.html new file mode 100644 index 0000000000..c7e0549a8c --- /dev/null +++ b/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/instances/KastiaExceptional/condNoLevel.html @@ -0,0 +1,4 @@ +Karinia:
+You are too weak. I won't let you enter.
+(Only players of at least level 115 may participate.) + \ No newline at end of file diff --git a/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/instances/KastiaExceptional/condOverLevel.html b/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/instances/KastiaExceptional/condOverLevel.html new file mode 100644 index 0000000000..27f209c6e9 --- /dev/null +++ b/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/instances/KastiaExceptional/condOverLevel.html @@ -0,0 +1,4 @@ +Karinia:
+You are powerful. I won't let you enter.
+(Only players under level 120 may participate.) + \ No newline at end of file diff --git a/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/instances/KastiaExtreme/KastiaExtreme.java b/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/instances/KastiaExtreme/KastiaExtreme.java new file mode 100644 index 0000000000..9942e56e93 --- /dev/null +++ b/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/instances/KastiaExtreme/KastiaExtreme.java @@ -0,0 +1,181 @@ +/* + * 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 . + */ +package instances.KastiaExtreme; + +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.model.holders.ItemHolder; +import org.l2jmobius.gameserver.model.instancezone.Instance; +import org.l2jmobius.gameserver.network.NpcStringId; +import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage; + +import instances.AbstractInstance; + +/** + * @author Mobius + */ +public class KastiaExtreme extends AbstractInstance +{ + // NPC + private static final int KARINIA = 34541; + // Monsters + private static final int[] MONSTERS = + { + 24592, // Kastia's Keeper + 24593, // Kastia's Overseer + 24594, // Kastia's Warder + 24595, // Tykan + }; + // Item + private static final ItemHolder KASTIAS_LV5_PACK = new ItemHolder(81466, 1); + // Misc + private static final int TEMPLATE_ID = 306; + + public KastiaExtreme() + { + super(TEMPLATE_ID); + addStartNpc(KARINIA); + addTalkId(KARINIA); + addKillId(MONSTERS); + } + + @Override + public String onAdvEvent(String event, Npc npc, PlayerInstance player) + { + switch (event) + { + case "enterInstance": + { + /* + * Cannot enter if player finished another Kastia instance. if ((System.currentTimeMillis() > InstanceManager.getInstance().getInstanceTime(player, 299)) || (System.currentTimeMillis() > InstanceManager.getInstance().getInstanceTime(player, 298))) { player.sendPacket(new + * SystemMessage(SystemMessageId.SINCE_C1_ENTERED_ANOTHER_INSTANCE_ZONE_THEREFORE_YOU_CANNOT_ENTER_THIS_DUNGEON).addString(player.getName())); return null; } + */ + enterInstance(player, npc, TEMPLATE_ID); + if (player.getInstanceWorld() != null) + { + startQuestTimer("check_status", 10000, null, player); + } + return null; + } + case "check_status": + { + final Instance world = player.getInstanceWorld(); + if (!isInInstance(world)) + { + return null; + } + switch (world.getStatus()) + { + case 0: + { + showOnScreenMsg(world, NpcStringId.STAGE_1, ExShowScreenMessage.TOP_CENTER, 10000, true); + world.setStatus(1); + world.spawnGroup("wave_1"); + startQuestTimer("check_status", 10000, null, player); + break; + } + case 1: + { + if (world.getAliveNpcs().isEmpty()) + { + showOnScreenMsg(world, NpcStringId.STAGE_2, ExShowScreenMessage.TOP_CENTER, 10000, true); + world.setStatus(2); + world.spawnGroup("wave_2"); + } + startQuestTimer("check_status", 10000, null, player); + break; + } + case 2: + { + if (world.getAliveNpcs().isEmpty()) + { + showOnScreenMsg(world, NpcStringId.STAGE_3, ExShowScreenMessage.TOP_CENTER, 10000, true); + world.setStatus(3); + world.spawnGroup("wave_3"); + } + startQuestTimer("check_status", 10000, null, player); + break; + } + case 3: + { + if (world.getAliveNpcs().isEmpty()) + { + showOnScreenMsg(world, NpcStringId.STAGE_4, ExShowScreenMessage.TOP_CENTER, 10000, true); + world.setStatus(4); + world.spawnGroup("wave_4"); + } + startQuestTimer("check_status", 10000, null, player); + break; + } + case 4: + { + if (world.getAliveNpcs().isEmpty()) + { + showOnScreenMsg(world, NpcStringId.STAGE_5, ExShowScreenMessage.TOP_CENTER, 10000, true); + world.setStatus(5); + world.spawnGroup("wave_5"); + } + startQuestTimer("check_status", 10000, null, player); + break; + } + case 5: + { + if (world.getAliveNpcs().isEmpty()) + { + showOnScreenMsg(world, NpcStringId.STAGE_6, ExShowScreenMessage.TOP_CENTER, 10000, true); + world.setStatus(6); + world.spawnGroup("wave_6"); + } + startQuestTimer("check_status", 10000, null, player); + break; + } + case 6: + { + if (world.getAliveNpcs().isEmpty()) + { + showOnScreenMsg(world, NpcStringId.STAGE_7, ExShowScreenMessage.TOP_CENTER, 10000, true); + world.setStatus(7); + world.spawnGroup("wave_7"); + } + startQuestTimer("check_status", 10000, null, player); + break; + } + case 7: + { + if (world.getAliveNpcs().isEmpty()) + { + giveItems(player, KASTIAS_LV5_PACK); + world.finishInstance(); + } + else + { + startQuestTimer("check_status", 10000, null, player); + } + break; + } + } + return null; + } + } + return super.onAdvEvent(event, npc, player); + } + + public static void main(String[] args) + { + new KastiaExtreme(); + } +} \ No newline at end of file diff --git a/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/instances/KastiaExtreme/condNoLevel.html b/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/instances/KastiaExtreme/condNoLevel.html new file mode 100644 index 0000000000..d6aeb8609f --- /dev/null +++ b/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/instances/KastiaExtreme/condNoLevel.html @@ -0,0 +1,4 @@ +Karinia:
+You are too weak. I won't let you enter.
+(Only players of at least level 120 may participate.) + \ No newline at end of file diff --git a/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/instances/KastiaExtreme/condOverLevel.html b/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/instances/KastiaExtreme/condOverLevel.html new file mode 100644 index 0000000000..27f209c6e9 --- /dev/null +++ b/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/instances/KastiaExtreme/condOverLevel.html @@ -0,0 +1,4 @@ +Karinia:
+You are powerful. I won't let you enter.
+(Only players under level 120 may participate.) + \ No newline at end of file