diff --git a/L2J_Mobius_Underground/dist/game/data/html/default/33669-1.htm b/L2J_Mobius_Underground/dist/game/data/html/default/33669-1.htm index 7fa0d88ecd..8b2aa028ed 100644 --- a/L2J_Mobius_Underground/dist/game/data/html/default/33669-1.htm +++ b/L2J_Mobius_Underground/dist/game/data/html/default/33669-1.htm @@ -1,6 +1,7 @@ Sizrak:
You'd like to challenge Tauti, eh? We would as well.
(In order to challenge Tauti, you need an alliance with parties that are level 97 or above. Maximum of 35 people can join at once. You can enter the Instanced Zone through the alliance leader. Every member must also have a Mark of Resistance.)
- + + \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/instances/TautiWarzoneCommon.xml b/L2J_Mobius_Underground/dist/game/data/instances/TautiWarzoneCommon.xml new file mode 100644 index 0000000000..121f225f77 --- /dev/null +++ b/L2J_Mobius_Underground/dist/game/data/instances/TautiWarzoneCommon.xml @@ -0,0 +1,216 @@ + + + + \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/instances/TautiWarzoneExtreme.xml b/L2J_Mobius_Underground/dist/game/data/instances/TautiWarzoneExtreme.xml new file mode 100644 index 0000000000..ad4cd1724a --- /dev/null +++ b/L2J_Mobius_Underground/dist/game/data/instances/TautiWarzoneExtreme.xml @@ -0,0 +1,216 @@ + + + + \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/instances/TautiWarzone/33675.htm b/L2J_Mobius_Underground/dist/game/data/scripts/instances/TautiWarzone/33675.htm new file mode 100644 index 0000000000..841c1f662e --- /dev/null +++ b/L2J_Mobius_Underground/dist/game/data/scripts/instances/TautiWarzone/33675.htm @@ -0,0 +1,4 @@ +Finaria:
+Welcome back! I've been waiting for you. A fierce battle between the Revolutionaries and Kundas.
+Be careful! If all the Revolutionaries fall, our plans to the end! Help Revolutionaries to beat Kunda. Before everyone power Revolutionaries run out of, you must immediately kill Tauti!
+ \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/instances/TautiWarzone/33678-1.htm b/L2J_Mobius_Underground/dist/game/data/scripts/instances/TautiWarzone/33678-1.htm new file mode 100644 index 0000000000..a9c6090baf --- /dev/null +++ b/L2J_Mobius_Underground/dist/game/data/scripts/instances/TautiWarzone/33678-1.htm @@ -0,0 +1,3 @@ +Teleport Device:
+You do not have the key.
+ \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/instances/TautiWarzone/33678-2.htm b/L2J_Mobius_Underground/dist/game/data/scripts/instances/TautiWarzone/33678-2.htm new file mode 100644 index 0000000000..bbc4936189 --- /dev/null +++ b/L2J_Mobius_Underground/dist/game/data/scripts/instances/TautiWarzone/33678-2.htm @@ -0,0 +1,4 @@ +Teleport Device:
+Mechanical device. Requires key.
+ + \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/instances/TautiWarzone/33678-3.htm b/L2J_Mobius_Underground/dist/game/data/scripts/instances/TautiWarzone/33678-3.htm new file mode 100644 index 0000000000..3f0899edd2 --- /dev/null +++ b/L2J_Mobius_Underground/dist/game/data/scripts/instances/TautiWarzone/33678-3.htm @@ -0,0 +1,4 @@ +Teleport Device:
+Teleport Device is now working.
+ + \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/instances/TautiWarzone/PartyEnterCommon.html b/L2J_Mobius_Underground/dist/game/data/scripts/instances/TautiWarzone/PartyEnterCommon.html new file mode 100644 index 0000000000..efb6e2fb97 --- /dev/null +++ b/L2J_Mobius_Underground/dist/game/data/scripts/instances/TautiWarzone/PartyEnterCommon.html @@ -0,0 +1,3 @@ +Sizrak:
+I will pray that you defeat Tauti... I hope your decision is the right one... I will pray. + \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/instances/TautiWarzone/PartyEnterExtreme.html b/L2J_Mobius_Underground/dist/game/data/scripts/instances/TautiWarzone/PartyEnterExtreme.html new file mode 100644 index 0000000000..e7b49927c6 --- /dev/null +++ b/L2J_Mobius_Underground/dist/game/data/scripts/instances/TautiWarzone/PartyEnterExtreme.html @@ -0,0 +1,3 @@ +Sizrak:
+We will win! We must! + \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/instances/TautiWarzone/PartyMemberReenter.html b/L2J_Mobius_Underground/dist/game/data/scripts/instances/TautiWarzone/PartyMemberReenter.html new file mode 100644 index 0000000000..f239e7892a --- /dev/null +++ b/L2J_Mobius_Underground/dist/game/data/scripts/instances/TautiWarzone/PartyMemberReenter.html @@ -0,0 +1,3 @@ +Sizrak:
+Please prove your decision is the right one and help your members. + \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/instances/TautiWarzone/TautiWarzone.java b/L2J_Mobius_Underground/dist/game/data/scripts/instances/TautiWarzone/TautiWarzone.java new file mode 100644 index 0000000000..3829227c59 --- /dev/null +++ b/L2J_Mobius_Underground/dist/game/data/scripts/instances/TautiWarzone/TautiWarzone.java @@ -0,0 +1,240 @@ +/* + * 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.TautiWarzone; + +import java.util.List; + +import com.l2jmobius.gameserver.enums.Movie; +import com.l2jmobius.gameserver.model.Location; +import com.l2jmobius.gameserver.model.actor.L2Npc; +import com.l2jmobius.gameserver.model.actor.instance.L2MonsterInstance; +import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; +import com.l2jmobius.gameserver.model.instancezone.Instance; + +import instances.AbstractInstance; + +/** + * Tauti Warzone instance zone. + * @author Mobius + */ +public final class TautiWarzone extends AbstractInstance +{ + // NPCs + private static final int FINARIA = 33675; + private static final int ZAHAK = 19266; + private static final int TELEPORTER = 33678; + private static final int TAUTI_COMMON = 29233; + private static final int TAUTI_EXTREME = 29234; + private static final int TAUTI_COMMON_AXE = 29236; + private static final int TAUTI_EXTREME_AXE = 29237; + // Item + private static final int KEY_OF_DARKNESS = 34899; + // Teleport + private static final Location TAUTI_TELEPORT = new Location(-148972, 209879, -10199); + // Misc + private static final int TEMPLATE_ID = 218; + private static final int EXTREME_TEMPLATE_ID = 219; + private static final int DOOR_1 = 15240001; + private static final int DOOR_2 = 15240002; + + public TautiWarzone() + { + addTalkId(FINARIA, TELEPORTER); + addFirstTalkId(FINARIA, TELEPORTER); + addAttackId(TAUTI_COMMON, TAUTI_EXTREME); + addKillId(ZAHAK, TAUTI_COMMON_AXE, TAUTI_EXTREME_AXE); + } + + @Override + public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) + { + switch (event) + { + case "enterEasyInstance": + { + enterInstance(player, npc, TEMPLATE_ID); + startQuestTimer("WORLD_STATUS_CHECK", 5000, null, player, false); + break; + } + case "enterExtremeInstance": + { + enterInstance(player, npc, EXTREME_TEMPLATE_ID); + startQuestTimer("WORLD_STATUS_CHECK", 5000, null, player, false); + break; + } + case "useKey": + { + final Instance world = npc.getInstanceWorld(); + if (hasAtLeastOneQuestItem(player, KEY_OF_DARKNESS)) + { + takeItems(player, KEY_OF_DARKNESS, -1); + world.setStatus(3); + return "33678-3.htm"; + } + return "33678-1.htm"; + } + case "teleport": + { + final Instance world = npc.getInstanceWorld(); + world.setStatus(4); + world.openCloseDoor(DOOR_2, true); + for (L2PcInstance member : world.getPlayers()) + { + member.teleToLocation(TAUTI_TELEPORT, world); + startQuestTimer("PLAY_OPENING_B_MOVIE", 5000, null, member, false); + } + startQuestTimer("SPAWN_TAUTI", 60000, npc, null, false); + break; + } + case "PLAY_OPENING_B_MOVIE": + { + playMovie(player, Movie.SC_TAUTI_OPENING_B); + break; + } + case "SPAWN_TAUTI": + { + final Instance world = npc.getInstanceWorld(); + world.openCloseDoor(DOOR_1, true); + world.spawnGroup("boss"); + break; + } + case "SPAWN_AXE": + { + final L2Npc axe = addSpawn(npc.getId() == TAUTI_EXTREME ? TAUTI_EXTREME_AXE : TAUTI_COMMON_AXE, npc, false, 0, false, npc.getInstanceId()); + axe.setRandomWalking(false); + axe.setIsImmobilized(true); + break; + } + case "WORLD_STATUS_CHECK": + { + if ((player == null) || (player.getInstanceId() == 0)) + { + return null; + } + final Instance world = player.getInstanceWorld(); + if (world.isStatus(0)) + { + world.setStatus(1); + world.spawnGroup("room1"); + playMovie(world.getPlayers(), Movie.SC_TAUTI_OPENING); + for (L2PcInstance member : world.getPlayers()) + { + takeItems(member, KEY_OF_DARKNESS, -1); + } + startQuestTimer("WORLD_STATUS_CHECK", 5000, null, player, false); + } + else if (world.isStatus(1)) + { + if (world.getAliveNpcs(L2MonsterInstance.class).isEmpty()) + { + world.setStatus(2); + final List monsters = world.spawnGroup("room2"); + for (L2Npc monster : monsters) + { + monster.setRandomWalking(false); + } + } + startQuestTimer("WORLD_STATUS_CHECK", 5000, null, player, false); + } + return null; + } + } + return super.onAdvEvent(event, npc, player); + } + + @Override + public String onFirstTalk(L2Npc npc, L2PcInstance player) + { + String htmltext = ""; + switch (npc.getId()) + { + case FINARIA: + { + htmltext = "33675.htm"; + break; + } + case TELEPORTER: + { + final int worldStatus = npc.getInstanceWorld().getStatus(); + if (worldStatus > 2) + { + htmltext = "33678-3.htm"; + } + else if ((worldStatus == 2) && hasAtLeastOneQuestItem(player, KEY_OF_DARKNESS)) + { + htmltext = "33678-2.htm"; + } + else + { + htmltext = "33678-1.htm"; + } + break; + } + } + return htmltext; + } + + @Override + public String onAttack(L2Npc npc, L2PcInstance attacker, int damage, boolean isSummon) + { + final Instance world = npc.getInstanceWorld(); + if (world.isStatus(5) && (npc.getCurrentHp() < (npc.getMaxHp() * 0.15))) + { + world.setStatus(6); + npc.deleteMe(); + startQuestTimer("SPAWN_AXE", 15000, npc, null, false); + playMovie(world.getPlayers(), Movie.SC_TAUTI_PHASE); + } + if (world.isStatus(4)) + { + world.setStatus(5); + world.openCloseDoor(DOOR_1, false); + world.openCloseDoor(DOOR_2, false); + } + return super.onAttack(npc, attacker, damage, isSummon); + } + + @Override + public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon) + { + if (npc.getId() == ZAHAK) + { + npc.dropItem(killer, KEY_OF_DARKNESS, 1); + } + else + { + final Instance world = npc.getInstanceWorld(); + playMovie(world.getPlayers(), Movie.SC_TAUTI_ENDING); + npc.deleteMe(); + } + return super.onKill(npc, killer, isSummon); + } + + @Override + public void onInstanceCreated(Instance instance, L2PcInstance player) + { + if (player != null) + { + showHtmlFile(player, instance.getTemplateId() == EXTREME_TEMPLATE_ID ? "PartyEnterExtreme.html" : "PartyEnterCommon.html"); + } + } + + public static void main(String[] args) + { + new TautiWarzone(); + } +} \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/instances/TautiWarzone/condBigGroup.html b/L2J_Mobius_Underground/dist/game/data/scripts/instances/TautiWarzone/condBigGroup.html new file mode 100644 index 0000000000..6a8dc82c09 --- /dev/null +++ b/L2J_Mobius_Underground/dist/game/data/scripts/instances/TautiWarzone/condBigGroup.html @@ -0,0 +1,4 @@ +Sizrak:
+That many people can't be moved.
+(A maximum of 35 people can participate.) + \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/instances/TautiWarzone/condNoGroup.html b/L2J_Mobius_Underground/dist/game/data/scripts/instances/TautiWarzone/condNoGroup.html new file mode 100644 index 0000000000..ec6f5e53cd --- /dev/null +++ b/L2J_Mobius_Underground/dist/game/data/scripts/instances/TautiWarzone/condNoGroup.html @@ -0,0 +1,3 @@ +Sizrak:
+As I explained earlier, you can enter only by forming an association. + \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/instances/TautiWarzone/condNoLevelCommon.html b/L2J_Mobius_Underground/dist/game/data/scripts/instances/TautiWarzone/condNoLevelCommon.html new file mode 100644 index 0000000000..a209efe5a1 --- /dev/null +++ b/L2J_Mobius_Underground/dist/game/data/scripts/instances/TautiWarzone/condNoLevelCommon.html @@ -0,0 +1,4 @@ +Sizrak:
+I don't think you are quite prepared yet.
+(Party includes character(s) under level 95.) + \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/instances/TautiWarzone/condNoLevelExtreme.html b/L2J_Mobius_Underground/dist/game/data/scripts/instances/TautiWarzone/condNoLevelExtreme.html new file mode 100644 index 0000000000..ad816eafe8 --- /dev/null +++ b/L2J_Mobius_Underground/dist/game/data/scripts/instances/TautiWarzone/condNoLevelExtreme.html @@ -0,0 +1,4 @@ +Sizrak:
+I don't think you are quite prepared yet.
+(Party includes character(s) under level 97.) + \ No newline at end of file