Altar of Sacrifice.
Contributed by gigilo1968.
This commit is contained in:
parent
5e02c67d5b
commit
ab630a2442
125
L2J_Mobius_Helios/dist/game/data/scripts/ai/areas/Rune/AltarOfSacrifice/AltarOfSacrifice.java
vendored
Normal file
125
L2J_Mobius_Helios/dist/game/data/scripts/ai/areas/Rune/AltarOfSacrifice/AltarOfSacrifice.java
vendored
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
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();
|
||||
}
|
||||
}
|
@ -14,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package ai.areas.RuneCastle.Venom;
|
||||
package ai.areas.Rune.RuneCastle.Venom;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
12
L2J_Mobius_Helios/dist/game/data/spawns/Rune/AltarOfSacrifice.xml
vendored
Normal file
12
L2J_Mobius_Helios/dist/game/data/spawns/Rune/AltarOfSacrifice.xml
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/spawns.xsd">
|
||||
<spawn name="AltarOfSacrifice">
|
||||
<group>
|
||||
<npc id="33887" x="48227" y="-30305" z="-1680" heading="24000" respawnTime="60sec" /> <!-- Jenna's Personal Guard -->
|
||||
<npc id="33881" x="48319" y="-30204" z="-1680" heading="24000" respawnTime="60sec" /> <!-- Kato Sicanus -->
|
||||
<npc id="19478" x="48402" y="-30105" z="-1680" heading="58192" respawnTime="60sec" /> <!-- Immariel -->
|
||||
<npc id="33812" x="48471" y="-30182" z="-1680" heading="24212" respawnTime="60sec" /> <!-- Giggle -->
|
||||
<npc id="33813" x="48445" y="-30210" z="-1680" heading="24212" respawnTime="60sec" /> <!-- not named in client -->
|
||||
</group>
|
||||
</spawn>
|
||||
</list>
|
125
L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/Rune/AltarOfSacrifice/AltarOfSacrifice.java
vendored
Normal file
125
L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/Rune/AltarOfSacrifice/AltarOfSacrifice.java
vendored
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
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();
|
||||
}
|
||||
}
|
@ -14,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package ai.areas.RuneCastle.Venom;
|
||||
package ai.areas.Rune.RuneCastle.Venom;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
12
L2J_Mobius_Underground/dist/game/data/spawns/Rune/AltarOfSacrifice.xml
vendored
Normal file
12
L2J_Mobius_Underground/dist/game/data/spawns/Rune/AltarOfSacrifice.xml
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/spawns.xsd">
|
||||
<spawn name="AltarOfSacrifice">
|
||||
<group>
|
||||
<npc id="33887" x="48227" y="-30305" z="-1680" heading="24000" respawnTime="60sec" /> <!-- Jenna's Personal Guard -->
|
||||
<npc id="33881" x="48319" y="-30204" z="-1680" heading="24000" respawnTime="60sec" /> <!-- Kato Sicanus -->
|
||||
<npc id="19478" x="48402" y="-30105" z="-1680" heading="58192" respawnTime="60sec" /> <!-- Immariel -->
|
||||
<npc id="33812" x="48471" y="-30182" z="-1680" heading="24212" respawnTime="60sec" /> <!-- Giggle -->
|
||||
<npc id="33813" x="48445" y="-30210" z="-1680" heading="24212" respawnTime="60sec" /> <!-- not named in client -->
|
||||
</group>
|
||||
</spawn>
|
||||
</list>
|
Loading…
Reference in New Issue
Block a user