diff --git a/L2J_Mobius_Helios/dist/game/data/scripts/ai/areas/Rune/AltarOfSacrifice/AltarOfSacrifice.java b/L2J_Mobius_Helios/dist/game/data/scripts/ai/areas/Rune/AltarOfSacrifice/AltarOfSacrifice.java new file mode 100644 index 0000000000..cb37e1acbc --- /dev/null +++ b/L2J_Mobius_Helios/dist/game/data/scripts/ai/areas/Rune/AltarOfSacrifice/AltarOfSacrifice.java @@ -0,0 +1,125 @@ +/* + * 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.Rune.AltarOfSacrifice; + +import com.l2jmobius.gameserver.ThreadPoolManager; +import com.l2jmobius.gameserver.enums.ChatType; +import com.l2jmobius.gameserver.model.actor.L2Character; +import com.l2jmobius.gameserver.model.actor.L2Npc; +import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; +import com.l2jmobius.gameserver.network.NpcStringId; +import com.l2jmobius.gameserver.network.serverpackets.NpcSay; + +import ai.AbstractNpcAI; + +/** + * Altar Of Sacrifice AI + * @author Gigi + */ +public class AltarOfSacrifice extends AbstractNpcAI +{ + // NPCs + private static final int IMMERIAL = 19478; + private static final int JENNAS_GUARD = 33887; + private static final int GIGGLE = 33812; + + private static L2Npc _immerial; + private static L2Npc _jenas_guard; + private static L2Npc _giggle; + + private AltarOfSacrifice() + { + addSeeCreatureId(JENNAS_GUARD); + addSpawnId(IMMERIAL, JENNAS_GUARD, GIGGLE); + } + + @Override + public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) + { + if (event.equalsIgnoreCase("msg_text")) + { + sendMessage(_giggle, NpcStringId.IT_SURE_SEEMS_STURDY_BUT_WOULD_THIS_REALLY_BE_ABLE_TO_STOP_THE_SACRIFICES_HM, 10000); // It sure seems sturdy, but would this really be able to stop the sacrifices? Hm.. + sendMessage(_immerial, NpcStringId.WE_DID_MAKE_THIS_GENERATOR_AT_LADY_JENNA_S_SUGGESTION_BUT_I_M_STILL_NERVOUS, 25000); // We did make this Generator at Lady Jenna's suggestion, but...I'm still nervous. + sendMessage(_jenas_guard, NpcStringId.YOU_NEED_TO_USE_A_SKILL_JUST_RIGHT_ON_THE_GENERATOR_TO_OBTAIN_A_SCALE_TALK_TO_JENNA_ABOUT_IT, 35000); // You need to use a skill just right on the Generator to obtain a scale. Talk to Jenna about it. + sendMessage(_giggle, NpcStringId.RUMORS_HAVE_IT_THAT_LINDVIOR_IS_HEADED_THIS_WAY, 37000); // Rumors have it that Lindvior is headed this way. + sendMessage(_giggle, NpcStringId.DO_YOU_THINK_HE_CAN_BE_STOPPED, 42000); // Do you think he can be stopped? + sendMessage(_immerial, NpcStringId.FOR_NOW_WE_HAVE_NO_CHOICE_BUT_TO_RELY_ON_THESE_CANNONS_PLACED_AROUND_THE_GENERATORS, 52000); // For now, we have no choice but to rely on these cannons placed around the Generators. + sendMessage(_immerial, NpcStringId.MAY_THE_GODS_WATCH_OVER_US, 57000); // May the gods watch over us + sendMessage(_giggle, NpcStringId.I_VE_NEVER_SEEN_SO_MANY_SCHOLARS_AND_WIZARDS_IN_MY_LIFE, 87000); // I've never seen so many scholars and wizards in my life. + sendMessage(_jenas_guard, NpcStringId.YOU_NEED_TO_USE_A_SKILL_JUST_RIGHT_ON_THE_GENERATOR_TO_OBTAIN_A_SCALE_TALK_TO_JENNA_ABOUT_IT, 97000); // You need to use a skill just right on the Generator to obtain a scale. Talk to Jenna about it. + sendMessage(_immerial, NpcStringId.IT_S_NOT_EVERYDAY_YOU_GET_TO_SEE_SUCH_A_SIGHT_HUH, 99000); // It's not everyday you get to see such a sight, huh? + sendMessage(_giggle, NpcStringId.IT_JUST_GOES_TO_SHOW_HOW_IMPORTANT_AND_DIFFICULT_IT_IS_TO_ACTIVATE_THE_SEAL_DEVICE, 109000); // It just goes to show how important and difficult it is to activate the Seal Device! + sendMessage(_immerial, NpcStringId.THIS_HAS_BEEN_TOO_TAXING_ON_US_ALL, 119000); // This has been too taxing on us all. + sendMessage(_immerial, NpcStringId.WE_NEED_A_NEW_SOUL_THAT_CAN_MAINTAIN_THE_SEAL, 126000); // We need a new soul that can maintain the seal. + + startQuestTimer("msg_text", 135000, npc, null); + _jenas_guard.setScriptValue(0); + } + return super.onAdvEvent(event, npc, player); + } + + @Override + public String onSeeCreature(L2Npc npc, L2Character creature, boolean isSummon) + { + if (creature.isPlayer() && _jenas_guard.isScriptValue(0)) + { + startQuestTimer("msg_text", 3000, npc, null); + _jenas_guard.setScriptValue(1); + } + return super.onSeeCreature(npc, creature, isSummon); + } + + @Override + public String onSpawn(L2Npc npc) + { + switch (npc.getId()) + { + case IMMERIAL: + { + _immerial = npc; + break; + } + case GIGGLE: + { + _giggle = npc; + break; + } + case JENNAS_GUARD: + { + _jenas_guard = npc; + break; + } + } + return super.onSpawn(npc); + } + + private void sendMessage(L2Npc npc, NpcStringId npcString, int delay) + { + ThreadPoolManager.getInstance().scheduleGeneral(() -> + { + if (npc != null) + { + npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), npcString)); + } + }, delay); + } + + public static void main(String[] args) + { + new AltarOfSacrifice(); + } +} diff --git a/L2J_Mobius_Helios/dist/game/data/scripts/ai/areas/RuneCastle/Venom/29055.html b/L2J_Mobius_Helios/dist/game/data/scripts/ai/areas/Rune/RuneCastle/Venom/29055.html similarity index 100% rename from L2J_Mobius_Helios/dist/game/data/scripts/ai/areas/RuneCastle/Venom/29055.html rename to L2J_Mobius_Helios/dist/game/data/scripts/ai/areas/Rune/RuneCastle/Venom/29055.html diff --git a/L2J_Mobius_Helios/dist/game/data/scripts/ai/areas/RuneCastle/Venom/35506-02.html b/L2J_Mobius_Helios/dist/game/data/scripts/ai/areas/Rune/RuneCastle/Venom/35506-02.html similarity index 100% rename from L2J_Mobius_Helios/dist/game/data/scripts/ai/areas/RuneCastle/Venom/35506-02.html rename to L2J_Mobius_Helios/dist/game/data/scripts/ai/areas/Rune/RuneCastle/Venom/35506-02.html diff --git a/L2J_Mobius_Helios/dist/game/data/scripts/ai/areas/RuneCastle/Venom/35506.html b/L2J_Mobius_Helios/dist/game/data/scripts/ai/areas/Rune/RuneCastle/Venom/35506.html similarity index 100% rename from L2J_Mobius_Helios/dist/game/data/scripts/ai/areas/RuneCastle/Venom/35506.html rename to L2J_Mobius_Helios/dist/game/data/scripts/ai/areas/Rune/RuneCastle/Venom/35506.html diff --git a/L2J_Mobius_Helios/dist/game/data/scripts/ai/areas/RuneCastle/Venom/Venom.java b/L2J_Mobius_Helios/dist/game/data/scripts/ai/areas/Rune/RuneCastle/Venom/Venom.java similarity index 99% rename from L2J_Mobius_Helios/dist/game/data/scripts/ai/areas/RuneCastle/Venom/Venom.java rename to L2J_Mobius_Helios/dist/game/data/scripts/ai/areas/Rune/RuneCastle/Venom/Venom.java index e37e907a0e..f37f63de65 100644 --- a/L2J_Mobius_Helios/dist/game/data/scripts/ai/areas/RuneCastle/Venom/Venom.java +++ b/L2J_Mobius_Helios/dist/game/data/scripts/ai/areas/Rune/RuneCastle/Venom/Venom.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package ai.areas.RuneCastle.Venom; +package ai.areas.Rune.RuneCastle.Venom; import java.util.ArrayList; import java.util.List; diff --git a/L2J_Mobius_Helios/dist/game/data/spawns/Rune/AltarOfSacrifice.xml b/L2J_Mobius_Helios/dist/game/data/spawns/Rune/AltarOfSacrifice.xml new file mode 100644 index 0000000000..ccba895f44 --- /dev/null +++ b/L2J_Mobius_Helios/dist/game/data/spawns/Rune/AltarOfSacrifice.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/Rune/AltarOfSacrifice/AltarOfSacrifice.java b/L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/Rune/AltarOfSacrifice/AltarOfSacrifice.java new file mode 100644 index 0000000000..cb37e1acbc --- /dev/null +++ b/L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/Rune/AltarOfSacrifice/AltarOfSacrifice.java @@ -0,0 +1,125 @@ +/* + * 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.Rune.AltarOfSacrifice; + +import com.l2jmobius.gameserver.ThreadPoolManager; +import com.l2jmobius.gameserver.enums.ChatType; +import com.l2jmobius.gameserver.model.actor.L2Character; +import com.l2jmobius.gameserver.model.actor.L2Npc; +import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; +import com.l2jmobius.gameserver.network.NpcStringId; +import com.l2jmobius.gameserver.network.serverpackets.NpcSay; + +import ai.AbstractNpcAI; + +/** + * Altar Of Sacrifice AI + * @author Gigi + */ +public class AltarOfSacrifice extends AbstractNpcAI +{ + // NPCs + private static final int IMMERIAL = 19478; + private static final int JENNAS_GUARD = 33887; + private static final int GIGGLE = 33812; + + private static L2Npc _immerial; + private static L2Npc _jenas_guard; + private static L2Npc _giggle; + + private AltarOfSacrifice() + { + addSeeCreatureId(JENNAS_GUARD); + addSpawnId(IMMERIAL, JENNAS_GUARD, GIGGLE); + } + + @Override + public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) + { + if (event.equalsIgnoreCase("msg_text")) + { + sendMessage(_giggle, NpcStringId.IT_SURE_SEEMS_STURDY_BUT_WOULD_THIS_REALLY_BE_ABLE_TO_STOP_THE_SACRIFICES_HM, 10000); // It sure seems sturdy, but would this really be able to stop the sacrifices? Hm.. + sendMessage(_immerial, NpcStringId.WE_DID_MAKE_THIS_GENERATOR_AT_LADY_JENNA_S_SUGGESTION_BUT_I_M_STILL_NERVOUS, 25000); // We did make this Generator at Lady Jenna's suggestion, but...I'm still nervous. + sendMessage(_jenas_guard, NpcStringId.YOU_NEED_TO_USE_A_SKILL_JUST_RIGHT_ON_THE_GENERATOR_TO_OBTAIN_A_SCALE_TALK_TO_JENNA_ABOUT_IT, 35000); // You need to use a skill just right on the Generator to obtain a scale. Talk to Jenna about it. + sendMessage(_giggle, NpcStringId.RUMORS_HAVE_IT_THAT_LINDVIOR_IS_HEADED_THIS_WAY, 37000); // Rumors have it that Lindvior is headed this way. + sendMessage(_giggle, NpcStringId.DO_YOU_THINK_HE_CAN_BE_STOPPED, 42000); // Do you think he can be stopped? + sendMessage(_immerial, NpcStringId.FOR_NOW_WE_HAVE_NO_CHOICE_BUT_TO_RELY_ON_THESE_CANNONS_PLACED_AROUND_THE_GENERATORS, 52000); // For now, we have no choice but to rely on these cannons placed around the Generators. + sendMessage(_immerial, NpcStringId.MAY_THE_GODS_WATCH_OVER_US, 57000); // May the gods watch over us + sendMessage(_giggle, NpcStringId.I_VE_NEVER_SEEN_SO_MANY_SCHOLARS_AND_WIZARDS_IN_MY_LIFE, 87000); // I've never seen so many scholars and wizards in my life. + sendMessage(_jenas_guard, NpcStringId.YOU_NEED_TO_USE_A_SKILL_JUST_RIGHT_ON_THE_GENERATOR_TO_OBTAIN_A_SCALE_TALK_TO_JENNA_ABOUT_IT, 97000); // You need to use a skill just right on the Generator to obtain a scale. Talk to Jenna about it. + sendMessage(_immerial, NpcStringId.IT_S_NOT_EVERYDAY_YOU_GET_TO_SEE_SUCH_A_SIGHT_HUH, 99000); // It's not everyday you get to see such a sight, huh? + sendMessage(_giggle, NpcStringId.IT_JUST_GOES_TO_SHOW_HOW_IMPORTANT_AND_DIFFICULT_IT_IS_TO_ACTIVATE_THE_SEAL_DEVICE, 109000); // It just goes to show how important and difficult it is to activate the Seal Device! + sendMessage(_immerial, NpcStringId.THIS_HAS_BEEN_TOO_TAXING_ON_US_ALL, 119000); // This has been too taxing on us all. + sendMessage(_immerial, NpcStringId.WE_NEED_A_NEW_SOUL_THAT_CAN_MAINTAIN_THE_SEAL, 126000); // We need a new soul that can maintain the seal. + + startQuestTimer("msg_text", 135000, npc, null); + _jenas_guard.setScriptValue(0); + } + return super.onAdvEvent(event, npc, player); + } + + @Override + public String onSeeCreature(L2Npc npc, L2Character creature, boolean isSummon) + { + if (creature.isPlayer() && _jenas_guard.isScriptValue(0)) + { + startQuestTimer("msg_text", 3000, npc, null); + _jenas_guard.setScriptValue(1); + } + return super.onSeeCreature(npc, creature, isSummon); + } + + @Override + public String onSpawn(L2Npc npc) + { + switch (npc.getId()) + { + case IMMERIAL: + { + _immerial = npc; + break; + } + case GIGGLE: + { + _giggle = npc; + break; + } + case JENNAS_GUARD: + { + _jenas_guard = npc; + break; + } + } + return super.onSpawn(npc); + } + + private void sendMessage(L2Npc npc, NpcStringId npcString, int delay) + { + ThreadPoolManager.getInstance().scheduleGeneral(() -> + { + if (npc != null) + { + npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), npcString)); + } + }, delay); + } + + public static void main(String[] args) + { + new AltarOfSacrifice(); + } +} diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/RuneCastle/Venom/29055.html b/L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/Rune/RuneCastle/Venom/29055.html similarity index 100% rename from L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/RuneCastle/Venom/29055.html rename to L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/Rune/RuneCastle/Venom/29055.html diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/RuneCastle/Venom/35506-02.html b/L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/Rune/RuneCastle/Venom/35506-02.html similarity index 100% rename from L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/RuneCastle/Venom/35506-02.html rename to L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/Rune/RuneCastle/Venom/35506-02.html diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/RuneCastle/Venom/35506.html b/L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/Rune/RuneCastle/Venom/35506.html similarity index 100% rename from L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/RuneCastle/Venom/35506.html rename to L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/Rune/RuneCastle/Venom/35506.html diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/RuneCastle/Venom/Venom.java b/L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/Rune/RuneCastle/Venom/Venom.java similarity index 99% rename from L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/RuneCastle/Venom/Venom.java rename to L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/Rune/RuneCastle/Venom/Venom.java index e37e907a0e..f37f63de65 100644 --- a/L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/RuneCastle/Venom/Venom.java +++ b/L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/Rune/RuneCastle/Venom/Venom.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package ai.areas.RuneCastle.Venom; +package ai.areas.Rune.RuneCastle.Venom; import java.util.ArrayList; import java.util.List; diff --git a/L2J_Mobius_Underground/dist/game/data/spawns/Rune/AltarOfSacrifice.xml b/L2J_Mobius_Underground/dist/game/data/spawns/Rune/AltarOfSacrifice.xml new file mode 100644 index 0000000000..ccba895f44 --- /dev/null +++ b/L2J_Mobius_Underground/dist/game/data/spawns/Rune/AltarOfSacrifice.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file