diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/ai/areas/DragonValley/Fellow/31713-01.html b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/ai/areas/DragonValley/Fellow/31713-01.html new file mode 100644 index 0000000000..e8bae59091 --- /dev/null +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/ai/areas/DragonValley/Fellow/31713-01.html @@ -0,0 +1,4 @@ +Fellow:
+If you are not a member, I cannot help you with anything. Or do you think that such an insignificant number will overcome Antharas? Ha-ha-ha!!!
+ + \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/ai/areas/DragonValley/Fellow/31713.html b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/ai/areas/DragonValley/Fellow/31713.html new file mode 100644 index 0000000000..7575ac79b9 --- /dev/null +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/ai/areas/DragonValley/Fellow/31713.html @@ -0,0 +1,6 @@ +Fellow:
+We've received terrible news! It seems that Antharas is awake! For now the dragon is sealed, but the seal will soon be broken, the beast will break free and burn Giran to the ground.
+Do you have courage to break into Antharas' Nest and prevent an upcoming disaster? Only the bravest warriors can stop the dragon!
+I can only teleport characters of level 70 and higher. an alliance leader must speak to me, and I will use the power of Antharas Watchman Theodric to teleport the alliance consisting of 27-300 members to Antharas' Lair.
+ + \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/ai/areas/DragonValley/Fellow/Fellow.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/ai/areas/DragonValley/Fellow/Fellow.java new file mode 100644 index 0000000000..a242759c31 --- /dev/null +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/ai/areas/DragonValley/Fellow/Fellow.java @@ -0,0 +1,99 @@ +/* + * 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 ai.areas.DragonValley.Fellow; + +import org.l2jmobius.commons.util.Rnd; +import org.l2jmobius.gameserver.enums.ChatType; +import org.l2jmobius.gameserver.model.Location; +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.network.NpcStringId; +import org.l2jmobius.gameserver.network.serverpackets.NpcSay; + +import ai.AbstractNpcAI; + +/** + * @author RobikBobik + */ +public class Fellow extends AbstractNpcAI +{ + // NPC + private static final int FELLOW = 31713; + // Location - Antharas Heart + private static final Location TELEPORT_LOC = new Location(154376, 121290, -3807); + // Misc + private static final NpcStringId[] TEXT = + { + NpcStringId.LET_S_JOIN_OUR_FORCES_AND_FACE_THIS_TOGETHER, + NpcStringId.BALTHUS_KNIGHTS_ARE_LOOKING_FOR_MERCENARIES + }; + + private Fellow() + { + addFirstTalkId(FELLOW); + addTalkId(FELLOW); + addSpawnId(FELLOW); + } + + @Override + public String onAdvEvent(String event, Npc npc, PlayerInstance player) + { + switch (event) + { + case "teleToAntharas": + { + if ((player.getCommandChannel() == null) || (player.getCommandChannel().getLeader() != player) || (player.getCommandChannel().getMemberCount() < 27) || (player.getCommandChannel().getMemberCount() > 300)) + { + return "31713-01.html"; + } + for (PlayerInstance member : player.getCommandChannel().getMembers()) + { + if ((member != null) && (member.getLevel() > 70)) + { + member.teleToLocation(TELEPORT_LOC); + } + } + break; + } + case "CHAT_TIMER": + { + npc.broadcastPacket(new NpcSay(npc, ChatType.NPC_GENERAL, TEXT[Rnd.get(TEXT.length)])); + startQuestTimer("CHAT_TIMER", 30000, npc, null); + break; + } + } + return null; + } + + @Override + public String onFirstTalk(Npc npc, PlayerInstance player) + { + return "31713.html"; + } + + @Override + public String onSpawn(Npc npc) + { + startQuestTimer("CHAT_TIMER", 5000, npc, null); + return super.onSpawn(npc); + } + + public static void main(String[] args) + { + new Fellow(); + } +} diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/ai/areas/TowerOfInsolence/Ateld/Ateld.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/ai/areas/TowerOfInsolence/Ateld/Ateld.java index 7cd60bffce..8f2d03acb4 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/ai/areas/TowerOfInsolence/Ateld/Ateld.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/ai/areas/TowerOfInsolence/Ateld/Ateld.java @@ -16,9 +16,13 @@ */ package ai.areas.TowerOfInsolence.Ateld; +import org.l2jmobius.commons.util.Rnd; +import org.l2jmobius.gameserver.enums.ChatType; import org.l2jmobius.gameserver.model.Location; import org.l2jmobius.gameserver.model.actor.Npc; import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.network.NpcStringId; +import org.l2jmobius.gameserver.network.serverpackets.NpcSay; import ai.AbstractNpcAI; @@ -31,28 +35,45 @@ public class Ateld extends AbstractNpcAI private static final int ATELD = 31714; // Location private static final Location TELEPORT_LOC = new Location(115322, 16756, 9012); + // Misc + private static final NpcStringId[] TEXT = + { + NpcStringId.LET_S_JOIN_OUR_FORCES_AND_FACE_THIS_TOGETHER, + NpcStringId.BALTHUS_KNIGHTS_ARE_LOOKING_FOR_MERCENARIES + }; private Ateld() { addFirstTalkId(ATELD); addTalkId(ATELD); + addSpawnId(ATELD); } @Override public String onAdvEvent(String event, Npc npc, PlayerInstance player) { - if (event.equals("teleToBaium")) + switch (event) { - if ((player.getCommandChannel() == null) || (player.getCommandChannel().getLeader() != player) || (player.getCommandChannel().getMemberCount() < 27) || (player.getCommandChannel().getMemberCount() > 300)) + case "teleToBaium": { - return "31714-01.html"; - } - for (PlayerInstance member : player.getCommandChannel().getMembers()) - { - if ((member != null) && (member.getLevel() > 70)) + if ((player.getCommandChannel() == null) || (player.getCommandChannel().getLeader() != player) || (player.getCommandChannel().getMemberCount() < 27) || (player.getCommandChannel().getMemberCount() > 300)) { - member.teleToLocation(TELEPORT_LOC); + return "31714-01.html"; } + for (PlayerInstance member : player.getCommandChannel().getMembers()) + { + if ((member != null) && (member.getLevel() > 70)) + { + member.teleToLocation(TELEPORT_LOC); + } + } + break; + } + case "CHAT_TIMER": + { + npc.broadcastPacket(new NpcSay(npc, ChatType.NPC_GENERAL, TEXT[Rnd.get(TEXT.length)])); + startQuestTimer("CHAT_TIMER", 30000, npc, null); + break; } } return null; @@ -64,6 +85,13 @@ public class Ateld extends AbstractNpcAI return "31714.html"; } + @Override + public String onSpawn(Npc npc) + { + startQuestTimer("CHAT_TIMER", 5000, npc, null); + return super.onSpawn(npc); + } + public static void main(String[] args) { new Ateld(); diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/spawns/Giran/DragonValey.xml b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/spawns/Giran/DragonValey.xml index f83247a372..38e9fbe1e0 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/spawns/Giran/DragonValey.xml +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/spawns/Giran/DragonValey.xml @@ -953,6 +953,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/ai/areas/DragonValley/Fellow/31713-01.html b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/ai/areas/DragonValley/Fellow/31713-01.html new file mode 100644 index 0000000000..e8bae59091 --- /dev/null +++ b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/ai/areas/DragonValley/Fellow/31713-01.html @@ -0,0 +1,4 @@ +Fellow:
+If you are not a member, I cannot help you with anything. Or do you think that such an insignificant number will overcome Antharas? Ha-ha-ha!!!
+ + \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/ai/areas/DragonValley/Fellow/31713.html b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/ai/areas/DragonValley/Fellow/31713.html new file mode 100644 index 0000000000..7575ac79b9 --- /dev/null +++ b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/ai/areas/DragonValley/Fellow/31713.html @@ -0,0 +1,6 @@ +Fellow:
+We've received terrible news! It seems that Antharas is awake! For now the dragon is sealed, but the seal will soon be broken, the beast will break free and burn Giran to the ground.
+Do you have courage to break into Antharas' Nest and prevent an upcoming disaster? Only the bravest warriors can stop the dragon!
+I can only teleport characters of level 70 and higher. an alliance leader must speak to me, and I will use the power of Antharas Watchman Theodric to teleport the alliance consisting of 27-300 members to Antharas' Lair.
+ + \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/ai/areas/DragonValley/Fellow/Fellow.java b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/ai/areas/DragonValley/Fellow/Fellow.java new file mode 100644 index 0000000000..a242759c31 --- /dev/null +++ b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/ai/areas/DragonValley/Fellow/Fellow.java @@ -0,0 +1,99 @@ +/* + * 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 ai.areas.DragonValley.Fellow; + +import org.l2jmobius.commons.util.Rnd; +import org.l2jmobius.gameserver.enums.ChatType; +import org.l2jmobius.gameserver.model.Location; +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.network.NpcStringId; +import org.l2jmobius.gameserver.network.serverpackets.NpcSay; + +import ai.AbstractNpcAI; + +/** + * @author RobikBobik + */ +public class Fellow extends AbstractNpcAI +{ + // NPC + private static final int FELLOW = 31713; + // Location - Antharas Heart + private static final Location TELEPORT_LOC = new Location(154376, 121290, -3807); + // Misc + private static final NpcStringId[] TEXT = + { + NpcStringId.LET_S_JOIN_OUR_FORCES_AND_FACE_THIS_TOGETHER, + NpcStringId.BALTHUS_KNIGHTS_ARE_LOOKING_FOR_MERCENARIES + }; + + private Fellow() + { + addFirstTalkId(FELLOW); + addTalkId(FELLOW); + addSpawnId(FELLOW); + } + + @Override + public String onAdvEvent(String event, Npc npc, PlayerInstance player) + { + switch (event) + { + case "teleToAntharas": + { + if ((player.getCommandChannel() == null) || (player.getCommandChannel().getLeader() != player) || (player.getCommandChannel().getMemberCount() < 27) || (player.getCommandChannel().getMemberCount() > 300)) + { + return "31713-01.html"; + } + for (PlayerInstance member : player.getCommandChannel().getMembers()) + { + if ((member != null) && (member.getLevel() > 70)) + { + member.teleToLocation(TELEPORT_LOC); + } + } + break; + } + case "CHAT_TIMER": + { + npc.broadcastPacket(new NpcSay(npc, ChatType.NPC_GENERAL, TEXT[Rnd.get(TEXT.length)])); + startQuestTimer("CHAT_TIMER", 30000, npc, null); + break; + } + } + return null; + } + + @Override + public String onFirstTalk(Npc npc, PlayerInstance player) + { + return "31713.html"; + } + + @Override + public String onSpawn(Npc npc) + { + startQuestTimer("CHAT_TIMER", 5000, npc, null); + return super.onSpawn(npc); + } + + public static void main(String[] args) + { + new Fellow(); + } +} diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/ai/areas/TowerOfInsolence/Ateld/Ateld.java b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/ai/areas/TowerOfInsolence/Ateld/Ateld.java index 7cd60bffce..8f2d03acb4 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/ai/areas/TowerOfInsolence/Ateld/Ateld.java +++ b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/ai/areas/TowerOfInsolence/Ateld/Ateld.java @@ -16,9 +16,13 @@ */ package ai.areas.TowerOfInsolence.Ateld; +import org.l2jmobius.commons.util.Rnd; +import org.l2jmobius.gameserver.enums.ChatType; import org.l2jmobius.gameserver.model.Location; import org.l2jmobius.gameserver.model.actor.Npc; import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.network.NpcStringId; +import org.l2jmobius.gameserver.network.serverpackets.NpcSay; import ai.AbstractNpcAI; @@ -31,28 +35,45 @@ public class Ateld extends AbstractNpcAI private static final int ATELD = 31714; // Location private static final Location TELEPORT_LOC = new Location(115322, 16756, 9012); + // Misc + private static final NpcStringId[] TEXT = + { + NpcStringId.LET_S_JOIN_OUR_FORCES_AND_FACE_THIS_TOGETHER, + NpcStringId.BALTHUS_KNIGHTS_ARE_LOOKING_FOR_MERCENARIES + }; private Ateld() { addFirstTalkId(ATELD); addTalkId(ATELD); + addSpawnId(ATELD); } @Override public String onAdvEvent(String event, Npc npc, PlayerInstance player) { - if (event.equals("teleToBaium")) + switch (event) { - if ((player.getCommandChannel() == null) || (player.getCommandChannel().getLeader() != player) || (player.getCommandChannel().getMemberCount() < 27) || (player.getCommandChannel().getMemberCount() > 300)) + case "teleToBaium": { - return "31714-01.html"; - } - for (PlayerInstance member : player.getCommandChannel().getMembers()) - { - if ((member != null) && (member.getLevel() > 70)) + if ((player.getCommandChannel() == null) || (player.getCommandChannel().getLeader() != player) || (player.getCommandChannel().getMemberCount() < 27) || (player.getCommandChannel().getMemberCount() > 300)) { - member.teleToLocation(TELEPORT_LOC); + return "31714-01.html"; } + for (PlayerInstance member : player.getCommandChannel().getMembers()) + { + if ((member != null) && (member.getLevel() > 70)) + { + member.teleToLocation(TELEPORT_LOC); + } + } + break; + } + case "CHAT_TIMER": + { + npc.broadcastPacket(new NpcSay(npc, ChatType.NPC_GENERAL, TEXT[Rnd.get(TEXT.length)])); + startQuestTimer("CHAT_TIMER", 30000, npc, null); + break; } } return null; @@ -64,6 +85,13 @@ public class Ateld extends AbstractNpcAI return "31714.html"; } + @Override + public String onSpawn(Npc npc) + { + startQuestTimer("CHAT_TIMER", 5000, npc, null); + return super.onSpawn(npc); + } + public static void main(String[] args) { new Ateld(); diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/spawns/Giran/DragonValey.xml b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/spawns/Giran/DragonValey.xml index f83247a372..38e9fbe1e0 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/spawns/Giran/DragonValey.xml +++ b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/spawns/Giran/DragonValey.xml @@ -953,6 +953,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/ai/areas/DragonValley/Fellow/31713-01.html b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/ai/areas/DragonValley/Fellow/31713-01.html new file mode 100644 index 0000000000..e8bae59091 --- /dev/null +++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/ai/areas/DragonValley/Fellow/31713-01.html @@ -0,0 +1,4 @@ +Fellow:
+If you are not a member, I cannot help you with anything. Or do you think that such an insignificant number will overcome Antharas? Ha-ha-ha!!!
+ + \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/ai/areas/DragonValley/Fellow/31713.html b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/ai/areas/DragonValley/Fellow/31713.html new file mode 100644 index 0000000000..7575ac79b9 --- /dev/null +++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/ai/areas/DragonValley/Fellow/31713.html @@ -0,0 +1,6 @@ +Fellow:
+We've received terrible news! It seems that Antharas is awake! For now the dragon is sealed, but the seal will soon be broken, the beast will break free and burn Giran to the ground.
+Do you have courage to break into Antharas' Nest and prevent an upcoming disaster? Only the bravest warriors can stop the dragon!
+I can only teleport characters of level 70 and higher. an alliance leader must speak to me, and I will use the power of Antharas Watchman Theodric to teleport the alliance consisting of 27-300 members to Antharas' Lair.
+ + \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/ai/areas/DragonValley/Fellow/Fellow.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/ai/areas/DragonValley/Fellow/Fellow.java new file mode 100644 index 0000000000..a242759c31 --- /dev/null +++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/ai/areas/DragonValley/Fellow/Fellow.java @@ -0,0 +1,99 @@ +/* + * 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 ai.areas.DragonValley.Fellow; + +import org.l2jmobius.commons.util.Rnd; +import org.l2jmobius.gameserver.enums.ChatType; +import org.l2jmobius.gameserver.model.Location; +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.network.NpcStringId; +import org.l2jmobius.gameserver.network.serverpackets.NpcSay; + +import ai.AbstractNpcAI; + +/** + * @author RobikBobik + */ +public class Fellow extends AbstractNpcAI +{ + // NPC + private static final int FELLOW = 31713; + // Location - Antharas Heart + private static final Location TELEPORT_LOC = new Location(154376, 121290, -3807); + // Misc + private static final NpcStringId[] TEXT = + { + NpcStringId.LET_S_JOIN_OUR_FORCES_AND_FACE_THIS_TOGETHER, + NpcStringId.BALTHUS_KNIGHTS_ARE_LOOKING_FOR_MERCENARIES + }; + + private Fellow() + { + addFirstTalkId(FELLOW); + addTalkId(FELLOW); + addSpawnId(FELLOW); + } + + @Override + public String onAdvEvent(String event, Npc npc, PlayerInstance player) + { + switch (event) + { + case "teleToAntharas": + { + if ((player.getCommandChannel() == null) || (player.getCommandChannel().getLeader() != player) || (player.getCommandChannel().getMemberCount() < 27) || (player.getCommandChannel().getMemberCount() > 300)) + { + return "31713-01.html"; + } + for (PlayerInstance member : player.getCommandChannel().getMembers()) + { + if ((member != null) && (member.getLevel() > 70)) + { + member.teleToLocation(TELEPORT_LOC); + } + } + break; + } + case "CHAT_TIMER": + { + npc.broadcastPacket(new NpcSay(npc, ChatType.NPC_GENERAL, TEXT[Rnd.get(TEXT.length)])); + startQuestTimer("CHAT_TIMER", 30000, npc, null); + break; + } + } + return null; + } + + @Override + public String onFirstTalk(Npc npc, PlayerInstance player) + { + return "31713.html"; + } + + @Override + public String onSpawn(Npc npc) + { + startQuestTimer("CHAT_TIMER", 5000, npc, null); + return super.onSpawn(npc); + } + + public static void main(String[] args) + { + new Fellow(); + } +} diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/ai/areas/TowerOfInsolence/Ateld/Ateld.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/ai/areas/TowerOfInsolence/Ateld/Ateld.java index 7cd60bffce..8f2d03acb4 100644 --- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/ai/areas/TowerOfInsolence/Ateld/Ateld.java +++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/ai/areas/TowerOfInsolence/Ateld/Ateld.java @@ -16,9 +16,13 @@ */ package ai.areas.TowerOfInsolence.Ateld; +import org.l2jmobius.commons.util.Rnd; +import org.l2jmobius.gameserver.enums.ChatType; import org.l2jmobius.gameserver.model.Location; import org.l2jmobius.gameserver.model.actor.Npc; import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.network.NpcStringId; +import org.l2jmobius.gameserver.network.serverpackets.NpcSay; import ai.AbstractNpcAI; @@ -31,28 +35,45 @@ public class Ateld extends AbstractNpcAI private static final int ATELD = 31714; // Location private static final Location TELEPORT_LOC = new Location(115322, 16756, 9012); + // Misc + private static final NpcStringId[] TEXT = + { + NpcStringId.LET_S_JOIN_OUR_FORCES_AND_FACE_THIS_TOGETHER, + NpcStringId.BALTHUS_KNIGHTS_ARE_LOOKING_FOR_MERCENARIES + }; private Ateld() { addFirstTalkId(ATELD); addTalkId(ATELD); + addSpawnId(ATELD); } @Override public String onAdvEvent(String event, Npc npc, PlayerInstance player) { - if (event.equals("teleToBaium")) + switch (event) { - if ((player.getCommandChannel() == null) || (player.getCommandChannel().getLeader() != player) || (player.getCommandChannel().getMemberCount() < 27) || (player.getCommandChannel().getMemberCount() > 300)) + case "teleToBaium": { - return "31714-01.html"; - } - for (PlayerInstance member : player.getCommandChannel().getMembers()) - { - if ((member != null) && (member.getLevel() > 70)) + if ((player.getCommandChannel() == null) || (player.getCommandChannel().getLeader() != player) || (player.getCommandChannel().getMemberCount() < 27) || (player.getCommandChannel().getMemberCount() > 300)) { - member.teleToLocation(TELEPORT_LOC); + return "31714-01.html"; } + for (PlayerInstance member : player.getCommandChannel().getMembers()) + { + if ((member != null) && (member.getLevel() > 70)) + { + member.teleToLocation(TELEPORT_LOC); + } + } + break; + } + case "CHAT_TIMER": + { + npc.broadcastPacket(new NpcSay(npc, ChatType.NPC_GENERAL, TEXT[Rnd.get(TEXT.length)])); + startQuestTimer("CHAT_TIMER", 30000, npc, null); + break; } } return null; @@ -64,6 +85,13 @@ public class Ateld extends AbstractNpcAI return "31714.html"; } + @Override + public String onSpawn(Npc npc) + { + startQuestTimer("CHAT_TIMER", 5000, npc, null); + return super.onSpawn(npc); + } + public static void main(String[] args) { new Ateld(); diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/spawns/Giran/DragonValey.xml b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/spawns/Giran/DragonValey.xml index f83247a372..38e9fbe1e0 100644 --- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/spawns/Giran/DragonValey.xml +++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/spawns/Giran/DragonValey.xml @@ -953,6 +953,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/ai/areas/DragonValley/Fellow/31713-01.html b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/ai/areas/DragonValley/Fellow/31713-01.html new file mode 100644 index 0000000000..e8bae59091 --- /dev/null +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/ai/areas/DragonValley/Fellow/31713-01.html @@ -0,0 +1,4 @@ +Fellow:
+If you are not a member, I cannot help you with anything. Or do you think that such an insignificant number will overcome Antharas? Ha-ha-ha!!!
+ + \ No newline at end of file diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/ai/areas/DragonValley/Fellow/31713.html b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/ai/areas/DragonValley/Fellow/31713.html new file mode 100644 index 0000000000..7575ac79b9 --- /dev/null +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/ai/areas/DragonValley/Fellow/31713.html @@ -0,0 +1,6 @@ +Fellow:
+We've received terrible news! It seems that Antharas is awake! For now the dragon is sealed, but the seal will soon be broken, the beast will break free and burn Giran to the ground.
+Do you have courage to break into Antharas' Nest and prevent an upcoming disaster? Only the bravest warriors can stop the dragon!
+I can only teleport characters of level 70 and higher. an alliance leader must speak to me, and I will use the power of Antharas Watchman Theodric to teleport the alliance consisting of 27-300 members to Antharas' Lair.
+ + \ No newline at end of file diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/ai/areas/DragonValley/Fellow/Fellow.java b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/ai/areas/DragonValley/Fellow/Fellow.java new file mode 100644 index 0000000000..a242759c31 --- /dev/null +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/ai/areas/DragonValley/Fellow/Fellow.java @@ -0,0 +1,99 @@ +/* + * 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 ai.areas.DragonValley.Fellow; + +import org.l2jmobius.commons.util.Rnd; +import org.l2jmobius.gameserver.enums.ChatType; +import org.l2jmobius.gameserver.model.Location; +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.network.NpcStringId; +import org.l2jmobius.gameserver.network.serverpackets.NpcSay; + +import ai.AbstractNpcAI; + +/** + * @author RobikBobik + */ +public class Fellow extends AbstractNpcAI +{ + // NPC + private static final int FELLOW = 31713; + // Location - Antharas Heart + private static final Location TELEPORT_LOC = new Location(154376, 121290, -3807); + // Misc + private static final NpcStringId[] TEXT = + { + NpcStringId.LET_S_JOIN_OUR_FORCES_AND_FACE_THIS_TOGETHER, + NpcStringId.BALTHUS_KNIGHTS_ARE_LOOKING_FOR_MERCENARIES + }; + + private Fellow() + { + addFirstTalkId(FELLOW); + addTalkId(FELLOW); + addSpawnId(FELLOW); + } + + @Override + public String onAdvEvent(String event, Npc npc, PlayerInstance player) + { + switch (event) + { + case "teleToAntharas": + { + if ((player.getCommandChannel() == null) || (player.getCommandChannel().getLeader() != player) || (player.getCommandChannel().getMemberCount() < 27) || (player.getCommandChannel().getMemberCount() > 300)) + { + return "31713-01.html"; + } + for (PlayerInstance member : player.getCommandChannel().getMembers()) + { + if ((member != null) && (member.getLevel() > 70)) + { + member.teleToLocation(TELEPORT_LOC); + } + } + break; + } + case "CHAT_TIMER": + { + npc.broadcastPacket(new NpcSay(npc, ChatType.NPC_GENERAL, TEXT[Rnd.get(TEXT.length)])); + startQuestTimer("CHAT_TIMER", 30000, npc, null); + break; + } + } + return null; + } + + @Override + public String onFirstTalk(Npc npc, PlayerInstance player) + { + return "31713.html"; + } + + @Override + public String onSpawn(Npc npc) + { + startQuestTimer("CHAT_TIMER", 5000, npc, null); + return super.onSpawn(npc); + } + + public static void main(String[] args) + { + new Fellow(); + } +} diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/ai/areas/TowerOfInsolence/Ateld/Ateld.java b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/ai/areas/TowerOfInsolence/Ateld/Ateld.java index 7cd60bffce..8f2d03acb4 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/ai/areas/TowerOfInsolence/Ateld/Ateld.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/ai/areas/TowerOfInsolence/Ateld/Ateld.java @@ -16,9 +16,13 @@ */ package ai.areas.TowerOfInsolence.Ateld; +import org.l2jmobius.commons.util.Rnd; +import org.l2jmobius.gameserver.enums.ChatType; import org.l2jmobius.gameserver.model.Location; import org.l2jmobius.gameserver.model.actor.Npc; import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.network.NpcStringId; +import org.l2jmobius.gameserver.network.serverpackets.NpcSay; import ai.AbstractNpcAI; @@ -31,28 +35,45 @@ public class Ateld extends AbstractNpcAI private static final int ATELD = 31714; // Location private static final Location TELEPORT_LOC = new Location(115322, 16756, 9012); + // Misc + private static final NpcStringId[] TEXT = + { + NpcStringId.LET_S_JOIN_OUR_FORCES_AND_FACE_THIS_TOGETHER, + NpcStringId.BALTHUS_KNIGHTS_ARE_LOOKING_FOR_MERCENARIES + }; private Ateld() { addFirstTalkId(ATELD); addTalkId(ATELD); + addSpawnId(ATELD); } @Override public String onAdvEvent(String event, Npc npc, PlayerInstance player) { - if (event.equals("teleToBaium")) + switch (event) { - if ((player.getCommandChannel() == null) || (player.getCommandChannel().getLeader() != player) || (player.getCommandChannel().getMemberCount() < 27) || (player.getCommandChannel().getMemberCount() > 300)) + case "teleToBaium": { - return "31714-01.html"; - } - for (PlayerInstance member : player.getCommandChannel().getMembers()) - { - if ((member != null) && (member.getLevel() > 70)) + if ((player.getCommandChannel() == null) || (player.getCommandChannel().getLeader() != player) || (player.getCommandChannel().getMemberCount() < 27) || (player.getCommandChannel().getMemberCount() > 300)) { - member.teleToLocation(TELEPORT_LOC); + return "31714-01.html"; } + for (PlayerInstance member : player.getCommandChannel().getMembers()) + { + if ((member != null) && (member.getLevel() > 70)) + { + member.teleToLocation(TELEPORT_LOC); + } + } + break; + } + case "CHAT_TIMER": + { + npc.broadcastPacket(new NpcSay(npc, ChatType.NPC_GENERAL, TEXT[Rnd.get(TEXT.length)])); + startQuestTimer("CHAT_TIMER", 30000, npc, null); + break; } } return null; @@ -64,6 +85,13 @@ public class Ateld extends AbstractNpcAI return "31714.html"; } + @Override + public String onSpawn(Npc npc) + { + startQuestTimer("CHAT_TIMER", 5000, npc, null); + return super.onSpawn(npc); + } + public static void main(String[] args) { new Ateld(); diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/spawns/Giran/DragonValey.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/spawns/Giran/DragonValey.xml index f83247a372..38e9fbe1e0 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/spawns/Giran/DragonValey.xml +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/spawns/Giran/DragonValey.xml @@ -953,6 +953,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + +