New Trasken AI.
Contributed by gigilo1968.
This commit is contained in:
parent
067388cb2e
commit
4e648532ab
@ -20,6 +20,7 @@ INSERT IGNORE INTO `grandboss_data` (`boss_id`,`loc_x`,`loc_y`,`loc_z`,`heading`
|
||||
(29068, 185708, 114298, -8221,32768, 62802301, 1998000), -- Antharas
|
||||
(29028, -105200, -253104, -15264, 0, 62041918, 2248572), -- Valakas
|
||||
(29240, 0, 0, 0, 0, 288282589, 47100), -- Lindvior
|
||||
(29197, 81208, -182095, -9895, 0, 512402016, 47100), -- Trasken
|
||||
(29118, 0, 0, 0, 0, 4109288, 1220547), -- Beleth
|
||||
(25286, 185080, -12613, -5499, 16550, 556345880, 86847), -- Anakim
|
||||
(25283, 185062, -9605, -5499, 15640, 486021997, 79600); -- Lilith
|
||||
|
@ -1,4 +0,0 @@
|
||||
<html><body>Head Priest of the Earth Daichir:<br>
|
||||
Before you go, make sure that everyone in your party is ready. No one needs more food, a tissue, to clear out their saddle bag... no one has to use the bathroom?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest EarthWyrmCave enterInstance">"Our preparations are complete. Let us in!"</Button>
|
||||
</body></html>
|
@ -3,6 +3,6 @@
|
||||
Although we are unfortunate to be suffering, do not pity yourself. All is meant. All will be remedied.<br>
|
||||
The Goddess of the Earth is always beside you. We must repay her for the kindness she allows us.<br>
|
||||
If you want the blessing of goddess to be always with you, remember my words! <font color="LEVEL">"Karna Maphra!"</font><br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Chat 1">"What of Trasken?"</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Trasken enterZone">"What of Trasken?"</Button>
|
||||
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
|
||||
</body></html>
|
@ -1,4 +1,4 @@
|
||||
<html><body>Teleport Device:<br>
|
||||
This is a teleport device made to move to the ground.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest EarthWyrmCave exitInstance">Go up to the town.</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Trasken exitZone">Go up to the town.</Button>
|
||||
</body></html>
|
@ -1,167 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Earth Wyrm Cave -->
|
||||
<!-- TODO: Find proper instance id. (138?) -->
|
||||
<instance id="192" maxWorlds="50" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/instance.xsd">
|
||||
<time duration="120" empty="10" />
|
||||
<locations>
|
||||
<enter type="FIXED">
|
||||
<location x="75445" y="-182112" z="-9880" />
|
||||
</enter>
|
||||
<exit type="ORIGIN" />
|
||||
</locations>
|
||||
<conditions>
|
||||
<condition type="Party" />
|
||||
<condition type="PartyLeader" />
|
||||
<condition type="GroupMin">
|
||||
<param name="limit" value="5" />
|
||||
</condition>
|
||||
<condition type="GroupMax">
|
||||
<param name="limit" value="7" />
|
||||
</condition>
|
||||
<condition type="Level">
|
||||
<param name="min" value="85" />
|
||||
</condition>
|
||||
<condition type="Distance" />
|
||||
<condition type="Reenter" />
|
||||
</conditions>
|
||||
<reenter apply="ON_FINISH">
|
||||
<reset day="MONDAY" hour="6" minute="30" />
|
||||
<reset day="TUESDAY" hour="6" minute="30" />
|
||||
<reset day="WEDNESDAY" hour="6" minute="30" />
|
||||
<reset day="THURSDAY" hour="6" minute="30" />
|
||||
<reset day="FRIDAY" hour="6" minute="30" />
|
||||
<reset day="SATURDAY" hour="6" minute="30" />
|
||||
<reset day="SUNDAY" hour="6" minute="30" />
|
||||
</reenter>
|
||||
<doorlist>
|
||||
<door id="22120001" />
|
||||
</doorlist>
|
||||
<spawnlist>
|
||||
<group>
|
||||
<!-- Belenora -->
|
||||
<npc id="33506" x="75254" y="-182400" z="-9888" heading="40960" />
|
||||
<!-- Dark Elf Soldier -->
|
||||
<npc id="33507" x="75210" y="-182546" z="-9896" heading="8192" />
|
||||
<npc id="33507" x="76280" y="-182298" z="-9888" heading="0" />
|
||||
<npc id="33507" x="75106" y="-182365" z="-9888" heading="8192" />
|
||||
<npc id="33507" x="75067" y="-182406" z="-9888" heading="8192" />
|
||||
<npc id="33507" x="75150" y="-182417" z="-9896" heading="8192" />
|
||||
<npc id="33507" x="75249" y="-182497" z="-9896" heading="8192" />
|
||||
<npc id="33507" x="75227" y="-182626" z="-9899" heading="8192" />
|
||||
<npc id="33507" x="75292" y="-182532" z="-9896" heading="8192" />
|
||||
<npc id="33507" x="75177" y="-182587" z="-9888" heading="8192" />
|
||||
<npc id="33507" x="75119" y="-182461" z="-9888" heading="8192" />
|
||||
<npc id="33507" x="75166" y="-182505" z="-9888" heading="8192" />
|
||||
<npc id="33507" x="76333" y="-182254" z="-9888" heading="0" />
|
||||
<npc id="33507" x="75259" y="-182579" z="-9896" heading="8192" />
|
||||
<npc id="33507" x="75199" y="-182458" z="-9896" heading="8192" />
|
||||
<npc id="33507" x="75133" y="-182552" z="-9864" heading="8192" />
|
||||
<npc id="33507" x="75032" y="-182453" z="-9888" heading="8192" />
|
||||
<!-- Alejandro -->
|
||||
<npc id="33502" x="75179" y="-182148" z="-9888" heading="32768" />
|
||||
<!-- Dwarf Soldier -->
|
||||
<npc id="33503" x="75067" y="-182208" z="-9896" heading="0" />
|
||||
<npc id="33503" x="75015" y="-182211" z="-9896" heading="0" />
|
||||
<npc id="33503" x="75067" y="-182148" z="-9896" heading="0" />
|
||||
<npc id="33503" x="75012" y="-182148" z="-9896" heading="0" />
|
||||
<npc id="33503" x="74955" y="-182145" z="-9896" heading="0" />
|
||||
<npc id="33503" x="74952" y="-182082" z="-9896" heading="0" />
|
||||
<npc id="33503" x="75015" y="-182082" z="-9896" heading="0" />
|
||||
<npc id="33503" x="74952" y="-182211" z="-9896" heading="0" />
|
||||
<npc id="33503" x="74949" y="-182019" z="-9880" heading="0" />
|
||||
<npc id="33503" x="75015" y="-182019" z="-9896" heading="0" />
|
||||
<npc id="33503" x="74952" y="-182269" z="-9896" heading="0" />
|
||||
<npc id="33503" x="75015" y="-182272" z="-9896" heading="0" />
|
||||
<npc id="33503" x="75067" y="-182272" z="-9896" heading="0" />
|
||||
<npc id="33503" x="75067" y="-182022" z="-9896" heading="0" />
|
||||
<npc id="33503" x="76277" y="-181919" z="-9896" heading="0" />
|
||||
<npc id="33503" x="76342" y="-181971" z="-9896" heading="0" />
|
||||
<npc id="33503" x="75067" y="-182085" z="-9896" heading="0" />
|
||||
<!-- Teleport Device -->
|
||||
<npc id="33513" x="75179" y="-181893" z="-9896" heading="0" />
|
||||
<!-- Wooden Medic -->
|
||||
<npc id="33505" x="75372" y="-181770" z="-9888" heading="24576" />
|
||||
<!-- Dwarf Soldier -->
|
||||
<npc id="33504" x="75372" y="-181644" z="-9888" heading="45056" />
|
||||
<npc id="33504" x="75459" y="-181612" z="-9896" heading="16384" />
|
||||
<npc id="33504" x="75287" y="-181685" z="-9896" heading="32768" />
|
||||
<npc id="33504" x="75205" y="-181755" z="-9888" heading="0" />
|
||||
<!-- Fernando -->
|
||||
<!--
|
||||
<npc id="33160" x="77154" y="-182196" z="-9888" heading="30708" />
|
||||
-->
|
||||
<!-- Tentacle -->
|
||||
<npc id="29198" x="79526" y="-181507" z="-9896" heading="42749" />
|
||||
<npc id="29198" x="80432" y="-180356" z="-9896" heading="19795" />
|
||||
<npc id="29198" x="80432" y="-180850" z="-9896" heading="44991" />
|
||||
<npc id="29198" x="80432" y="-184308" z="-9896" heading="37585" />
|
||||
<npc id="29198" x="80783" y="-180092" z="-9896" heading="12194" />
|
||||
<npc id="29198" x="80168" y="-183593" z="-9896" heading="26626" />
|
||||
<npc id="29198" x="80872" y="-180246" z="-9888" heading="10554" />
|
||||
<npc id="29198" x="81443" y="-182945" z="-9872" heading="46798" />
|
||||
<npc id="29198" x="81273" y="-183674" z="-9896" heading="2271" />
|
||||
<npc id="29198" x="81358" y="-184079" z="-9896" heading="5310" />
|
||||
<npc id="29198" x="81273" y="-183026" z="-9872" heading="18796" />
|
||||
<npc id="29198" x="79938" y="-181744" z="-9896" heading="38441" />
|
||||
<npc id="29198" x="81139" y="-180477" z="-9872" heading="55592" />
|
||||
<npc id="29198" x="81495" y="-181016" z="-9872" heading="3517" />
|
||||
<npc id="29198" x="80872" y="-181170" z="-9896" heading="2987" />
|
||||
<npc id="29198" x="80961" y="-180015" z="-9888" heading="48027" />
|
||||
<npc id="29198" x="82315" y="-182058" z="-9896" heading="29777" />
|
||||
<npc id="29198" x="82564" y="-181977" z="-9896" heading="57134" />
|
||||
<npc id="29198" x="81940" y="-180939" z="-9880" heading="42939" />
|
||||
<npc id="29198" x="82066" y="-182058" z="-9896" heading="38882" />
|
||||
<npc id="29198" x="82790" y="-183073" z="-9888" heading="41801" />
|
||||
<npc id="29198" x="80763" y="-183512" z="-9888" heading="63581" />
|
||||
<!-- Tentacle -->
|
||||
<npc id="29205" x="79423" y="-182218" z="-9896" heading="35179" />
|
||||
<npc id="29205" x="80783" y="-180246" z="-9896" heading="34912" />
|
||||
<npc id="29205" x="80170" y="-180356" z="-9896" heading="21512" />
|
||||
<npc id="29205" x="80423" y="-183674" z="-9872" heading="25477" />
|
||||
<npc id="29205" x="80144" y="-181823" z="-9896" heading="34942" />
|
||||
<npc id="29205" x="80432" y="-179862" z="-9896" heading="47116" />
|
||||
<npc id="29205" x="80516" y="-180862" z="-9896" heading="43485" />
|
||||
<npc id="29205" x="81742" y="-184061" z="-9896" heading="23309" />
|
||||
<npc id="29205" x="81103" y="-184079" z="-9896" heading="41642" />
|
||||
<npc id="29205" x="81273" y="-183917" z="-9896" heading="38136" />
|
||||
<npc id="29205" x="81900" y="-182382" z="-9896" heading="44739" />
|
||||
<npc id="29205" x="81050" y="-180554" z="-9888" heading="51101" />
|
||||
<npc id="29205" x="81900" y="-181977" z="-9896" heading="1962" />
|
||||
<npc id="29205" x="80783" y="-180862" z="-9896" heading="39953" />
|
||||
<npc id="29205" x="81443" y="-183836" z="-9896" heading="25283" />
|
||||
<npc id="29205" x="82564" y="-182625" z="-9896" heading="15729" />
|
||||
<npc id="29205" x="82896" y="-181653" z="-9896" heading="13615" />
|
||||
<npc id="29205" x="82813" y="-182706" z="-9896" heading="12202" />
|
||||
<npc id="29205" x="82813" y="-181491" z="-9896" heading="17260" />
|
||||
<npc id="29205" x="83228" y="-181653" z="-9896" heading="19761" />
|
||||
<npc id="29205" x="83228" y="-182139" z="-9896" heading="40650" />
|
||||
<npc id="29205" x="79938" y="-182534" z="-9872" heading="26203" />
|
||||
<npc id="29205" x="83062" y="-181977" z="-9896" heading="23729" />
|
||||
<npc id="29205" x="81406" y="-180631" z="-9888" heading="1241" />
|
||||
<!-- Earth Wyrm Topography 1 -->
|
||||
<!--
|
||||
<npc id="19025" x="81184" y="-182093" z="-9888" heading="49151" />
|
||||
-->
|
||||
<!-- Earth Wyrm Topography 2 -->
|
||||
<!--
|
||||
<npc id="19026" x="81184" y="-182099" z="-9888" heading="49151" />
|
||||
-->
|
||||
<!-- Earth Wyrm Topography 3 -->
|
||||
<!--
|
||||
<npc id="19027" x="81184" y="-182099" z="-9888" heading="49151" />
|
||||
-->
|
||||
<!-- Earth Wyrm Topography 4 -->
|
||||
<!--
|
||||
<npc id="19028" x="81184" y="-182099" z="-9888" heading="49151" />
|
||||
-->
|
||||
<!-- Stomach Gland -->
|
||||
<!--
|
||||
<npc id="29206" x="87919" y="-173954" z="-15980" heading="26284" />
|
||||
<npc id="29206" x="88117" y="-173391" z="-15980" heading="4393" />
|
||||
<npc id="29206" x="88636" y="-173489" z="-15980" heading="61965" />
|
||||
<npc id="29206" x="88768" y="-173759" z="-15980" heading="65268" />
|
||||
<npc id="29206" x="87795" y="-173762" z="-15980" heading="33501" />
|
||||
-->
|
||||
</group>
|
||||
</spawnlist>
|
||||
</instance>
|
@ -1,147 +0,0 @@
|
||||
/*
|
||||
* 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.bosses.Trasken;
|
||||
|
||||
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 com.l2jmobius.gameserver.network.NpcStringId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
|
||||
|
||||
import instances.AbstractInstance;
|
||||
|
||||
/**
|
||||
* Earth Wyrm Cave instance zone. (simple implementation)
|
||||
* @Video http://www.youtube.com/watch?v=0Vyu7GJvuBo
|
||||
* @author Mobius
|
||||
*/
|
||||
public final class EarthWyrmCave extends AbstractInstance
|
||||
{
|
||||
// NPCs
|
||||
private static final int DAICHIR = 30537;
|
||||
private static final int TRASKEN = 29197;
|
||||
// Location
|
||||
private static final Location TRASKEN_SPAWN_LOC = new Location(82383, -183527, -9892, 26533);
|
||||
// Door
|
||||
private static final int DOOR_ID = 22120001;
|
||||
// Misc
|
||||
private static final int OPEN_DOOR = 5; // minutes
|
||||
private static final int TEMPLATE_ID = 192;
|
||||
|
||||
public EarthWyrmCave()
|
||||
{
|
||||
super(TEMPLATE_ID);
|
||||
addStartNpc(DAICHIR);
|
||||
addTalkId(DAICHIR);
|
||||
addKillId(TRASKEN);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
switch (event)
|
||||
{
|
||||
case "enterInstance":
|
||||
{
|
||||
enterInstance(player, npc, TEMPLATE_ID);
|
||||
startQuestTimer("OPEN_DOOR", OPEN_DOOR * 60 * 1000, null, player);
|
||||
break;
|
||||
}
|
||||
case "exitInstance":
|
||||
{
|
||||
if (player.getInstanceId() == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
player.getInstanceWorld().ejectPlayer(player);
|
||||
break;
|
||||
}
|
||||
case "OPEN_DOOR":
|
||||
{
|
||||
if ((player == null) || (player.getInstanceId() == 0))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
final Instance world = player.getInstanceWorld();
|
||||
world.openCloseDoor(DOOR_ID, true);
|
||||
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.ELIMINATE_THOSE_WHO_PROTECT_THE_HEART_OF_THE_EARTH_WYRM, ExShowScreenMessage.TOP_CENTER, 7000));
|
||||
startQuestTimer("CLOSE_DOOR", 60000, null, player); // close door after a minute
|
||||
startQuestTimer("WAIT_TO_CLEAR_MONSTERS", 5000, null, player);
|
||||
break;
|
||||
}
|
||||
case "CLOSE_DOOR":
|
||||
{
|
||||
if ((player == null) || (player.getInstanceId() == 0))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
final Instance world = player.getInstanceWorld();
|
||||
world.openCloseDoor(DOOR_ID, false);
|
||||
break;
|
||||
}
|
||||
case "WAIT_TO_CLEAR_MONSTERS":
|
||||
{
|
||||
if ((player == null) || (player.getInstanceId() == 0))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
final Instance world = player.getInstanceWorld();
|
||||
if (world.getAliveNpcs(L2MonsterInstance.class).isEmpty())
|
||||
{
|
||||
addSpawn(TRASKEN, TRASKEN_SPAWN_LOC, false, 0, false, player.getInstanceId());
|
||||
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.FIND_THE_EARTH_WYRM_S_WEAKNESS_TO_DEFEAT_IT, ExShowScreenMessage.TOP_CENTER, 5000));
|
||||
}
|
||||
else
|
||||
{
|
||||
startQuestTimer("WAIT_TO_CLEAR_MONSTERS", 5000, null, player);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
|
||||
{
|
||||
final Instance instance = npc.getInstanceWorld();
|
||||
if (isInInstance(instance))
|
||||
{
|
||||
switch (npc.getId())
|
||||
{
|
||||
case TRASKEN:
|
||||
{
|
||||
npc.deleteMe();
|
||||
instance.broadcastPacket(new ExShowScreenMessage(NpcStringId.HEART_OF_EARTH_WYRM_HAS_BEEN_DESTROYED, ExShowScreenMessage.TOP_CENTER, 5000));
|
||||
playMovie(instance.getPlayers(), Movie.SC_EARTHWORM_ENDING);
|
||||
instance.openCloseDoor(DOOR_ID, true);
|
||||
instance.finishInstance();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return super.onKill(npc, killer, isSummon);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new EarthWyrmCave();
|
||||
}
|
||||
}
|
923
L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Trasken/Trasken.java
vendored
Normal file
923
L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Trasken/Trasken.java
vendored
Normal file
@ -0,0 +1,923 @@
|
||||
/*
|
||||
* 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.bosses.Trasken;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import com.l2jmobius.commons.util.Rnd;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.DoorData;
|
||||
import com.l2jmobius.gameserver.datatables.SpawnTable;
|
||||
import com.l2jmobius.gameserver.enums.Movie;
|
||||
import com.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
import com.l2jmobius.gameserver.model.L2World;
|
||||
import com.l2jmobius.gameserver.model.Location;
|
||||
import com.l2jmobius.gameserver.model.StatsSet;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Playable;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2MonsterInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.holders.SkillHolder;
|
||||
import com.l2jmobius.gameserver.model.skills.BuffInfo;
|
||||
import com.l2jmobius.gameserver.model.zone.L2ZoneType;
|
||||
import com.l2jmobius.gameserver.model.zone.type.L2NoSummonFriendZone;
|
||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.Earthquake;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ExSendUIEvent;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.OnEventTrigger;
|
||||
import com.l2jmobius.gameserver.util.Broadcast;
|
||||
|
||||
import ai.AbstractNpcAI;
|
||||
|
||||
/**
|
||||
* Trasken RB
|
||||
* @author Gigi
|
||||
* @date 2017-07-27 - [10:11:22]
|
||||
*/
|
||||
public class Trasken extends AbstractNpcAI
|
||||
{
|
||||
// NPCs
|
||||
private static final int TRASKEN = 29197;
|
||||
private static final int TAIL_TRASKEN = 29200;
|
||||
private static final int TIE = 29205;
|
||||
private static final int BIG_TIE = 29199;
|
||||
private static final int VICTIM_EARTWORMS_1 = 29201;
|
||||
private static final int VICTIM_EARTWORMS_2 = 29202;
|
||||
private static final int VICTIM_EARTWORMS_3 = 29203;
|
||||
private static final int LAVRA_1 = 29204;
|
||||
private static final int LAVRA_2 = 29207;
|
||||
private static final int LAVRA_3 = 29208;
|
||||
private static final int DIGISTIVE = 29206;
|
||||
private static final int TRADJAN = 19160;
|
||||
private static final int HEART_ERTHWYRM = 19081;
|
||||
// Zone
|
||||
private static final int ZONE_ID = 12108;
|
||||
private static final int ZONE_ID_HEART = 12109;
|
||||
private final int[] eventTriggers = new int[]
|
||||
{
|
||||
22120840,
|
||||
22120842,
|
||||
22120844,
|
||||
22120846
|
||||
};
|
||||
private static final int DOOR = 22120001;
|
||||
private static final Location ENTER_LOCATION = new Location(75445, -182112, -9880);
|
||||
private static final Location EXIT_LOCATION = new Location(87679, -141982, -1341);
|
||||
static final Location CENTER_LOCATION = new Location(81208, -182095, -9895);
|
||||
static final Location HEART_LOCATION = new Location(81208, -182095, -9895);
|
||||
// Skill
|
||||
private static final SkillHolder SKILL_TAIL = new SkillHolder(14342, 1);
|
||||
private static final SkillHolder SKILL_TAIL_2 = new SkillHolder(14343, 1);
|
||||
private static final SkillHolder SKILL_TRASKEN_FIRST = new SkillHolder(14336, 1);
|
||||
private static final SkillHolder SKILL_TRASKEN_BUFF = new SkillHolder(14341, 1);
|
||||
private static final SkillHolder SKILL_TRASKEN_SLEEP = new SkillHolder(14504, 1); // 24 sec
|
||||
private static final SkillHolder SKILL_TRASKEN_UP = new SkillHolder(14505, 1);
|
||||
private static final SkillHolder SKILL_TIE_ROOT = new SkillHolder(14332, 1);
|
||||
private static final SkillHolder SKILL_TIE_CHAIN = new SkillHolder(14333, 1);
|
||||
private static final SkillHolder SKILL_1 = new SkillHolder(14334, 1); // Poison Puddle
|
||||
private static final SkillHolder SKILL_2 = new SkillHolder(14337, 1); // Earth Wyrm Body Strike
|
||||
private static final SkillHolder SKILL_3 = new SkillHolder(14338, 1); // Earth Wyrm Body Strike
|
||||
private static final SkillHolder SKILL_4 = new SkillHolder(14339, 1); // Earth Wyrm Body Strike
|
||||
private static final SkillHolder SKILL_5 = new SkillHolder(14340, 1); // Earth Wyrm Poison Cannon
|
||||
// Status
|
||||
private static final int ALIVE = 0;
|
||||
private static final int DEAD = 3;
|
||||
// Others
|
||||
protected double hp_tail;
|
||||
protected double hp_trasken;
|
||||
private static L2Npc tie_trasken;
|
||||
private static L2Npc trasken;
|
||||
private static L2NoSummonFriendZone _zoneLair;
|
||||
private static L2NoSummonFriendZone _zoneLair2;
|
||||
private int playersToEnter;
|
||||
protected int _statusZone = 0;
|
||||
protected ScheduledFuture<?> _collapseTask;
|
||||
protected AtomicInteger _killsTie = new AtomicInteger(0);
|
||||
protected AtomicInteger _killsTradjan = new AtomicInteger(0);
|
||||
// Spawns
|
||||
private static final Location Spawn_Heart = new Location(88292, -173758, -15965);
|
||||
private static final Location[] Spawn_Tie = new Location[]
|
||||
{
|
||||
new Location(79075, -180963, -9897, 4527),
|
||||
new Location(81047, -182282, -9897, 33582),
|
||||
new Location(79942, -179851, -9897, 40574),
|
||||
new Location(81931, -180069, -9897, 2849),
|
||||
new Location(80864, -184281, -9897, 46457),
|
||||
new Location(81233, -179842, -9897, 28503),
|
||||
new Location(78735, -183107, -9897, 34160),
|
||||
new Location(80139, -180923, -9897, 34232),
|
||||
new Location(81758, -181902, -9897, 29365),
|
||||
new Location(81851, -180719, -9897, 11837),
|
||||
new Location(79181, -182178, -9897, 65110),
|
||||
new Location(83296, -182275, -9897, 4710),
|
||||
new Location(83966, -181084, -9897, 18435),
|
||||
new Location(83181, -181023, -9897, 63036),
|
||||
new Location(82263, -182977, -9897, 36550),
|
||||
new Location(80950, -182856, -9897, 27788),
|
||||
new Location(79966, -182812, -9897, 26489),
|
||||
new Location(82237, -184076, -9897, 45551),
|
||||
new Location(80868, -181154, -9897, 13967),
|
||||
new Location(80209, -184234, -9897, 27683),
|
||||
new Location(83150, -183279, -9897, 62418),
|
||||
new Location(79795, -182271, -9897, 5870)
|
||||
};
|
||||
private static final Location[] Spawn_Big_Tie = new Location[]
|
||||
{
|
||||
new Location(83235, -182070, -9897, 31663),
|
||||
new Location(83913, -183256, -9897, 4038),
|
||||
new Location(82853, -180868, -9897, 32158),
|
||||
new Location(78730, -182917, -9897, 35257),
|
||||
new Location(82175, -180300, -9897, 39388),
|
||||
new Location(79981, -181057, -9897, 14008),
|
||||
new Location(79019, -181882, -9897, 6394),
|
||||
new Location(79846, -182025, -9897, 28780),
|
||||
new Location(81224, -184186, -9897, 4064),
|
||||
new Location(80725, -181051, -9897, 34486),
|
||||
new Location(79838, -184216, -9897, 45196),
|
||||
new Location(82073, -181956, -9897, 27212),
|
||||
new Location(81920, -180981, -9897, 47056),
|
||||
new Location(80820, -183285, -9897, 31129),
|
||||
new Location(81788, -183047, -9897, 18980),
|
||||
new Location(78860, -179717, -9897, 53788),
|
||||
new Location(81105, -180268, -9897, 23643),
|
||||
new Location(83222, -184038, -9897, 13689),
|
||||
new Location(82093, -184188, -9897, 61993)
|
||||
};
|
||||
private static final Location[] Spawn_Larva_1 = new Location[]
|
||||
{
|
||||
new Location(81869, -181917, -9897, 59394),
|
||||
new Location(82831, -182837, -9897, 19463),
|
||||
new Location(79771, -184114, -9897, 15764),
|
||||
new Location(79887, -180114, -9897, 17733),
|
||||
new Location(80987, -181006, -9897, 12119),
|
||||
new Location(79065, -182890, -9897, 63705),
|
||||
new Location(78883, -183839, -9897, 5843),
|
||||
new Location(80014, -182944, -9897, 6195)
|
||||
};
|
||||
private static final Location[] Spawn_Larva_2 = new Location[]
|
||||
{
|
||||
new Location(81869, -181917, -9897, 20701),
|
||||
new Location(82831, -182837, -9897, 6257),
|
||||
new Location(79771, -184114, -9897, 28729),
|
||||
new Location(79887, -180114, -9897, 26087),
|
||||
new Location(80987, -181006, -9897, 59020),
|
||||
new Location(79065, -182890, -9897, 44820),
|
||||
new Location(78883, -183839, -9897, 23282),
|
||||
new Location(80014, -182944, -9897, 9306)
|
||||
};
|
||||
private static final Location[] Spawn_Larva_3 = new Location[]
|
||||
{
|
||||
new Location(79785, -181954, -9897, 65516),
|
||||
new Location(81727, -184036, -9897, 63858),
|
||||
new Location(81909, -181006, -9897, 12875),
|
||||
new Location(79264, -180704, -9897, 53464),
|
||||
new Location(80769, -183944, -9897, 31310),
|
||||
new Location(79886, -183771, -9897, 53311),
|
||||
new Location(78706, -183267, -9897, 862),
|
||||
new Location(81947, -182190, -9897, 43213),
|
||||
new Location(83103, -181089, -9897, 30877),
|
||||
new Location(81847, -179971, -9897, 40880),
|
||||
new Location(81908, -183298, -9897, 6597),
|
||||
new Location(79227, -181739, -9897, 63462),
|
||||
new Location(79918, -183288, -9897, 31839),
|
||||
new Location(80720, -181130, -9897, 9352),
|
||||
new Location(80166, -179956, -9897, 28989),
|
||||
new Location(81156, -179891, -9897, 9000),
|
||||
new Location(80874, -182796, -9897, 51715),
|
||||
new Location(80205, -180998, -9897, 1193),
|
||||
new Location(77961, -182792, -9897, 16867),
|
||||
new Location(83190, -184199, -9897, 57438),
|
||||
new Location(82764, -182099, -9897, 36113),
|
||||
new Location(78890, -179873, -9897, 50574),
|
||||
new Location(77805, -180767, -9897, 20522),
|
||||
new Location(82806, -180142, -9897, 46858),
|
||||
new Location(82152, -184742, -9897, 26490),
|
||||
new Location(82732, -183220, -9897, 60425),
|
||||
new Location(77975, -181902, -9897, 23116),
|
||||
new Location(81255, -182176, -9897, 53943),
|
||||
new Location(78796, -184218, -9897, 40593)
|
||||
};
|
||||
private static final Location[] Spawn_Victim_1 = new Location[]
|
||||
{
|
||||
new Location(87891, -173888, 0, 14559),
|
||||
new Location(87777, -172808, 0, 54130),
|
||||
new Location(88896, -174206, 0, 4641)
|
||||
};
|
||||
private static final Location[] Spawn_Victim_2 = new Location[]
|
||||
{
|
||||
new Location(88085, -174105, 0, 39106),
|
||||
new Location(88949, -174227, 0, 58094),
|
||||
new Location(89000, -172909, 0, 55350),
|
||||
new Location(87941, -173185, 0, 22119)
|
||||
};
|
||||
private static final Location[] Spawn_Victim_3 = new Location[]
|
||||
{
|
||||
new Location(88247, -174298, 0, 4884),
|
||||
new Location(88924, -173858, 0, 44289),
|
||||
new Location(88204, -172812, 0, 24052)
|
||||
};
|
||||
private static final Location[] Spawn_Tradjan = new Location[]
|
||||
{
|
||||
new Location(79785, -181954, -9897, 65516),
|
||||
new Location(81727, -184036, -9897, 63858),
|
||||
new Location(81909, -181006, -9897, 12875),
|
||||
new Location(79264, -180704, -9897, 53464),
|
||||
new Location(80769, -183944, -9897, 31310),
|
||||
new Location(79886, -183771, -9897, 53311),
|
||||
new Location(78706, -183267, -9897, 862),
|
||||
new Location(81947, -182190, -9897, 43213),
|
||||
new Location(83103, -181089, -9897, 30877),
|
||||
new Location(81847, -179971, -9897, 40880),
|
||||
new Location(81908, -183298, -9897, 6597),
|
||||
new Location(79227, -181739, -9897, 63462),
|
||||
new Location(79918, -183288, -9897, 31839),
|
||||
new Location(80720, -181130, -9897, 9352),
|
||||
new Location(80166, -179956, -9897, 28989),
|
||||
new Location(81156, -179891, -9897, 9000),
|
||||
new Location(80874, -182796, -9897, 51715),
|
||||
new Location(80205, -180998, -9897, 1193),
|
||||
new Location(77961, -182792, -9897, 16867),
|
||||
new Location(83190, -184199, -9897, 57438),
|
||||
new Location(82764, -182099, -9897, 36113),
|
||||
new Location(78890, -179873, -9897, 50574),
|
||||
new Location(77805, -180767, -9897, 20522),
|
||||
new Location(82806, -180142, -9897, 46858),
|
||||
new Location(82152, -184742, -9897, 26490),
|
||||
new Location(82732, -183220, -9897, 60425),
|
||||
new Location(77975, -181902, -9897, 23116),
|
||||
new Location(81255, -182176, -9897, 53943),
|
||||
new Location(78796, -184218, -9897, 40593)
|
||||
};
|
||||
private static final Location[] Spawn_Digestive = new Location[]
|
||||
{
|
||||
new Location(88114, -173387, -15980),
|
||||
new Location(88640, -173491, -15980),
|
||||
new Location(88546, -174051, -15981),
|
||||
new Location(87913, -173950, -15981)
|
||||
};
|
||||
// @formatter:off
|
||||
private static final int[][] Rnd_Spawn_Tail = new int[][]
|
||||
{
|
||||
{80966, -183780, -9896},
|
||||
{82949, -181947, -9899},
|
||||
{81688, -181059, -9895},
|
||||
{81208, -182095, -9895}
|
||||
};
|
||||
private static final int[][] Rnd_Spawn_Trasken = new int[][]
|
||||
{
|
||||
{82564, -180742, -9896},
|
||||
{82379, -183532, -9896},
|
||||
{79602, -183321, -9896},
|
||||
{79698, -180859, -9896},
|
||||
{81208, -182095, -9896}
|
||||
};
|
||||
// @formatter:on
|
||||
|
||||
public Trasken()
|
||||
{
|
||||
super();
|
||||
_zoneLair = ZoneManager.getInstance().getZoneById(ZONE_ID, L2NoSummonFriendZone.class);
|
||||
_zoneLair2 = ZoneManager.getInstance().getZoneById(ZONE_ID_HEART, L2NoSummonFriendZone.class);
|
||||
int[] creature = new int[]
|
||||
{
|
||||
TRASKEN,
|
||||
TIE,
|
||||
BIG_TIE,
|
||||
TAIL_TRASKEN,
|
||||
VICTIM_EARTWORMS_1,
|
||||
VICTIM_EARTWORMS_2,
|
||||
VICTIM_EARTWORMS_3,
|
||||
LAVRA_1,
|
||||
LAVRA_2,
|
||||
LAVRA_3,
|
||||
TRADJAN,
|
||||
HEART_ERTHWYRM
|
||||
};
|
||||
registerMobs(creature);
|
||||
addEnterZoneId(ZONE_ID);
|
||||
addExitZoneId(ZONE_ID);
|
||||
addEnterZoneId(ZONE_ID_HEART);
|
||||
addExitZoneId(ZONE_ID_HEART);
|
||||
init();
|
||||
if (DoorData.getInstance().getDoor(DOOR) != null)
|
||||
{
|
||||
DoorData.getInstance().getDoor(DOOR).openMe();
|
||||
}
|
||||
}
|
||||
|
||||
private void init()
|
||||
{
|
||||
int status = GrandBossManager.getInstance().getBossStatus(TRASKEN);
|
||||
final StatsSet info = GrandBossManager.getInstance().getStatsSet(TRASKEN);
|
||||
final Long respawnTime = info.getLong("respawn_time");
|
||||
if ((status == 3) && (respawnTime <= System.currentTimeMillis()))
|
||||
{
|
||||
GrandBossManager.getInstance().setBossStatus(TRASKEN, ALIVE);
|
||||
}
|
||||
else if (status == 3)
|
||||
{
|
||||
ThreadPoolManager.schedule(() -> GrandBossManager.getInstance().setBossStatus(TRASKEN, ALIVE), respawnTime - System.currentTimeMillis());
|
||||
}
|
||||
int size = _zoneLair.getPlayersInside().size();
|
||||
if ((size >= 14) && (size <= 28))
|
||||
{
|
||||
playersToEnter = 7;
|
||||
}
|
||||
else if ((size >= 28) && (size <= 56))
|
||||
{
|
||||
playersToEnter = 14;
|
||||
}
|
||||
else if ((size >= 56) && (size <= 102))
|
||||
{
|
||||
playersToEnter = 21;
|
||||
}
|
||||
else
|
||||
{
|
||||
playersToEnter = 1;
|
||||
}
|
||||
}
|
||||
|
||||
protected void Clean()
|
||||
{
|
||||
_statusZone = 0;
|
||||
if (_collapseTask != null)
|
||||
{
|
||||
_collapseTask.cancel(false);
|
||||
_collapseTask = null;
|
||||
}
|
||||
_zoneLair.getCharactersInside().forEach(mob ->
|
||||
{
|
||||
if (mob.isNpc())
|
||||
{
|
||||
mob.deleteMe();
|
||||
mob.setIsDead(true);
|
||||
}
|
||||
});
|
||||
_zoneLair2.getCharactersInside().forEach(mob ->
|
||||
{
|
||||
if (mob.isNpc())
|
||||
{
|
||||
mob.deleteMe();
|
||||
mob.setIsDead(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void Fail(final boolean clean)
|
||||
{
|
||||
if (clean)
|
||||
{
|
||||
Clean();
|
||||
}
|
||||
_zoneLair.oustAllPlayers();
|
||||
_zoneLair2.oustAllPlayers();
|
||||
GrandBossManager.getInstance().setBossStatus(TRASKEN, ALIVE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAttack(L2Npc npc, L2PcInstance attacker, int damage, boolean isSummon)
|
||||
{
|
||||
switch (npc.getId())
|
||||
{
|
||||
case TAIL_TRASKEN:
|
||||
{
|
||||
hp_tail = npc.getCurrentHp();
|
||||
break;
|
||||
}
|
||||
case TRASKEN:
|
||||
{
|
||||
if (npc.isCastingNow())
|
||||
{
|
||||
return super.onAttack(npc, attacker, damage, isSummon);
|
||||
}
|
||||
L2World.getInstance().forEachVisibleObjectInRange(npc, L2PcInstance.class, 250, cha ->
|
||||
{
|
||||
if (cha != null)
|
||||
{
|
||||
npc.setTarget(cha);
|
||||
}
|
||||
});
|
||||
if (getRandom(100) < 30)
|
||||
{
|
||||
final L2Npc doom = addSpawn(18998, attacker.getX() + 25, attacker.getY() + 25, attacker.getZ(), 0, false, 30, false);
|
||||
doom.setTarget(doom);
|
||||
doom.isCastingNow();
|
||||
doom.doCast(SKILL_1.getSkill());
|
||||
ThreadPoolManager.schedule(() -> doom.deleteMe(), 15000);
|
||||
}
|
||||
final double percent = ((npc.getCurrentHp() - damage) / npc.getMaxHp()) * 100.0;
|
||||
if ((percent <= 30) && (_statusZone == 4))
|
||||
{
|
||||
TraskenStay(npc);
|
||||
_statusZone = 5;
|
||||
}
|
||||
if ((percent <= 40) && (_statusZone == 3))
|
||||
{
|
||||
TraskenStay(npc);
|
||||
_statusZone = 4;
|
||||
}
|
||||
if (getRandom(100) < 50)
|
||||
{
|
||||
npc.doCast(SKILL_2.getSkill());
|
||||
}
|
||||
|
||||
if (getRandom(100) < 40)
|
||||
{
|
||||
npc.doCast(SKILL_3.getSkill());
|
||||
}
|
||||
|
||||
if (getRandom(100) < 25)
|
||||
{
|
||||
npc.doCast(SKILL_4.getSkill());
|
||||
}
|
||||
|
||||
if (getRandom(100) < 15)
|
||||
{
|
||||
npc.doCast(SKILL_5.getSkill());
|
||||
}
|
||||
hp_trasken = npc.getCurrentHp();
|
||||
break;
|
||||
}
|
||||
}
|
||||
return super.onAttack(npc, attacker, damage, isSummon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onSpawn(final L2Npc npc)
|
||||
{
|
||||
switch (npc.getId())
|
||||
{
|
||||
case TAIL_TRASKEN:
|
||||
{
|
||||
npc.setIsOverloaded(true);
|
||||
npc.setRandomWalking(true);
|
||||
npc.doCast(SKILL_TAIL.getSkill());
|
||||
break;
|
||||
}
|
||||
case TRASKEN:
|
||||
{
|
||||
npc.setIsOverloaded(true);
|
||||
npc.setRandomWalking(true);
|
||||
npc.setIsDead(false);
|
||||
break;
|
||||
}
|
||||
case TIE:
|
||||
case BIG_TIE:
|
||||
{
|
||||
L2World.getInstance().forEachVisibleObjectInRange(npc, L2PcInstance.class, 600, cha ->
|
||||
{
|
||||
npc.setTarget(cha);
|
||||
});
|
||||
npc.setIsOverloaded(true);
|
||||
npc.setRandomWalking(true);
|
||||
npc.getSpawn().setRespawnDelay(60);
|
||||
break;
|
||||
}
|
||||
case TRADJAN:
|
||||
{
|
||||
npc.getSpawn().setRespawnDelay(120);
|
||||
L2World.getInstance().forEachVisibleObjectInRange(npc, L2PcInstance.class, 3500, cha ->
|
||||
{
|
||||
npc.setTarget(cha);
|
||||
});
|
||||
break;
|
||||
}
|
||||
case LAVRA_1:
|
||||
case LAVRA_2:
|
||||
case LAVRA_3:
|
||||
{
|
||||
npc.getSpawn().setRespawnDelay(200);
|
||||
L2World.getInstance().forEachVisibleObjectInRange(npc, L2PcInstance.class, 3500, cha ->
|
||||
{
|
||||
npc.setTarget(cha);
|
||||
});
|
||||
break;
|
||||
}
|
||||
case VICTIM_EARTWORMS_1:
|
||||
case VICTIM_EARTWORMS_2:
|
||||
case VICTIM_EARTWORMS_3:
|
||||
{
|
||||
npc.getSpawn().setRespawnDelay(30);
|
||||
L2World.getInstance().forEachVisibleObjectInRange(npc, L2PcInstance.class, 1000, cha ->
|
||||
{
|
||||
npc.setTarget(cha);
|
||||
});
|
||||
break;
|
||||
}
|
||||
case DIGISTIVE:
|
||||
{
|
||||
npc.setIsOverloaded(true);
|
||||
npc.setRandomWalking(true);
|
||||
npc.getSpawn().setRespawnDelay(60);
|
||||
L2World.getInstance().forEachVisibleObjectInRange(npc, L2PcInstance.class, 1000, cha ->
|
||||
{
|
||||
npc.setTarget(cha);
|
||||
});
|
||||
break;
|
||||
}
|
||||
case HEART_ERTHWYRM:
|
||||
{
|
||||
npc.setIsOverloaded(true);
|
||||
npc.setRandomWalking(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return super.onSpawn(npc);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onSeeCreature(L2Npc npc, L2Character player, boolean isSummon)
|
||||
{
|
||||
if (npc.isDead() || (player == null))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
if ((npc.getId() == LAVRA_1) || (npc.getId() == LAVRA_2) || (npc.getId() == LAVRA_3) || (npc.getId() == TRADJAN))
|
||||
{
|
||||
addAttackPlayerDesire(npc, _zoneLair.getPlayersInside().get(getRandom(_zoneLair.getPlayersInside().size())));
|
||||
}
|
||||
else if ((npc.getId() == TIE) || (npc.getId() == BIG_TIE))
|
||||
{
|
||||
if (getRandom(100) < 60)
|
||||
{
|
||||
npc.setTarget(player);
|
||||
npc.doCast(SKILL_TIE_ROOT.getSkill());
|
||||
addAttackPlayerDesire(npc, (L2Playable) player);
|
||||
}
|
||||
else
|
||||
{
|
||||
npc.setTarget(player);
|
||||
npc.doCast(SKILL_TIE_CHAIN.getSkill());
|
||||
addAttackPlayerDesire(npc, (L2Playable) player);
|
||||
}
|
||||
}
|
||||
return super.onSeeCreature(npc, player, isSummon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(final String event, final L2Npc npc, final L2PcInstance player)
|
||||
{
|
||||
switch (event)
|
||||
{
|
||||
case "enterZone":
|
||||
{
|
||||
player.teleToLocation(ENTER_LOCATION);
|
||||
break;
|
||||
}
|
||||
case "exitZone":
|
||||
{
|
||||
player.teleToLocation(EXIT_LOCATION);
|
||||
break;
|
||||
}
|
||||
case "finish":
|
||||
{
|
||||
GrandBossManager.getInstance().setBossStatus(TRASKEN, DEAD);
|
||||
trasken.doDie(player);
|
||||
trasken.setIsDead(true);
|
||||
_zoneLair2.getPlayersInside().forEach(players -> players.teleToLocation(CENTER_LOCATION));
|
||||
_zoneLair2.getPlayersInside().forEach(p ->
|
||||
{
|
||||
playMovie(p, Movie.SC_EARTHWORM_ENDING);
|
||||
});
|
||||
final long respawnTime = 72 * 3600000;
|
||||
if (_collapseTask != null)
|
||||
{
|
||||
_collapseTask.cancel(true);
|
||||
_collapseTask = null;
|
||||
}
|
||||
_zoneLair.getCharactersInside().stream().filter(L2Character::isNpc).forEach(mob -> mob.deleteMe());
|
||||
_zoneLair.getCharactersInside().stream().filter(L2Object::isMonster).forEach(cha -> ((L2MonsterInstance) cha).getSpawn().stopRespawn());
|
||||
_zoneLair2.getCharactersInside().stream().filter(L2Character::isNpc).forEach(mob -> mob.deleteMe());
|
||||
_zoneLair2.getCharactersInside().stream().filter(L2Object::isMonster).forEach(cha -> ((L2MonsterInstance) cha).getSpawn().stopRespawn());
|
||||
ThreadPoolManager.schedule(() -> npc.decayMe(), 10000);
|
||||
ThreadPoolManager.schedule(new UnlockTrasken(), respawnTime);
|
||||
cancelQuestTimer("finish", npc, null);
|
||||
break;
|
||||
}
|
||||
case "spawn_rnd":
|
||||
{
|
||||
switch (npc.getId())
|
||||
{
|
||||
case TAIL_TRASKEN:
|
||||
{
|
||||
if (_statusZone == 2)
|
||||
{
|
||||
tie_trasken.doCast(SKILL_TAIL_2.getSkill());
|
||||
tie_trasken.getSpawn().stopRespawn();
|
||||
tie_trasken.decayMe();
|
||||
|
||||
final int[] spawn = Rnd_Spawn_Tail[Rnd.get(Rnd_Spawn_Tail.length)];
|
||||
if (SpawnTable.getInstance().getSpawns(TAIL_TRASKEN) == null)
|
||||
{
|
||||
ThreadPoolManager.schedule(() ->
|
||||
{
|
||||
tie_trasken = addSpawn(TAIL_TRASKEN, spawn[0], spawn[1], spawn[2], 0, false, 0, true);
|
||||
tie_trasken.setCurrentHp(hp_tail);
|
||||
}, 5000);
|
||||
}
|
||||
startQuestTimer("spawn_rnd", 30000, tie_trasken, null);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case TRASKEN:
|
||||
{
|
||||
if (_statusZone == 3)
|
||||
{
|
||||
trasken.doCast(SKILL_TRASKEN_FIRST.getSkill());
|
||||
trasken.getSpawn().stopRespawn();
|
||||
trasken.decayMe();
|
||||
|
||||
final int[] spawn1 = Rnd_Spawn_Trasken[Rnd.get(Rnd_Spawn_Trasken.length)];
|
||||
if (SpawnTable.getInstance().getSpawns(TRASKEN) == null)
|
||||
{
|
||||
ThreadPoolManager.schedule(() ->
|
||||
{
|
||||
trasken = addSpawn(TRASKEN, spawn1[0], spawn1[1], spawn1[2], 0, false, 0, true);
|
||||
trasken.doCast(SKILL_TRASKEN_UP.getSkill());
|
||||
trasken.setCurrentHp(hp_trasken);
|
||||
}, 10000);
|
||||
}
|
||||
startQuestTimer("spawn_rnd", 70000, trasken, null);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
|
||||
{
|
||||
switch (npc.getId())
|
||||
{
|
||||
case TIE:
|
||||
case BIG_TIE:
|
||||
{
|
||||
_killsTie.incrementAndGet();
|
||||
if ((_killsTie.get() == 27) && (_statusZone == 0))
|
||||
{
|
||||
_statusZone = 1;
|
||||
nextStage(_statusZone);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case TRADJAN:
|
||||
{
|
||||
_killsTradjan.incrementAndGet();
|
||||
if ((_killsTradjan.get() == 18) && (_statusZone == 1))
|
||||
{
|
||||
_statusZone = 2;
|
||||
nextStage(_statusZone);
|
||||
}
|
||||
npc.getSpawn().startRespawn();
|
||||
break;
|
||||
}
|
||||
case TAIL_TRASKEN:
|
||||
{
|
||||
_statusZone = 3;
|
||||
nextStage(_statusZone);
|
||||
break;
|
||||
}
|
||||
case HEART_ERTHWYRM:
|
||||
{
|
||||
_zoneLair.getPlayersInside().forEach(p -> p.broadcastPacket(new ExShowScreenMessage(NpcStringId.HEART_OF_EARTH_WYRM_HAS_BEEN_DESTROYED, 5, 4000, true)));
|
||||
_zoneLair2.getPlayersInside().forEach(p -> p.broadcastPacket(new ExShowScreenMessage(NpcStringId.HEART_OF_EARTH_WYRM_HAS_BEEN_DESTROYED, 5, 4000, true)));
|
||||
cancelQuestTimer("spawn_rnd", trasken, null);
|
||||
startQuestTimer("finish", 5000, npc, killer);
|
||||
break;
|
||||
}
|
||||
case LAVRA_1:
|
||||
case LAVRA_2:
|
||||
case LAVRA_3:
|
||||
{
|
||||
npc.getSpawn().startRespawn();
|
||||
break;
|
||||
}
|
||||
case VICTIM_EARTWORMS_1:
|
||||
case VICTIM_EARTWORMS_2:
|
||||
case VICTIM_EARTWORMS_3:
|
||||
{
|
||||
npc.getSpawn().startRespawn();
|
||||
break;
|
||||
}
|
||||
case DIGISTIVE:
|
||||
{
|
||||
npc.getSpawn().startRespawn();
|
||||
break;
|
||||
}
|
||||
}
|
||||
return super.onKill(npc, killer, isSummon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onEnterZone(final L2Character character, final L2ZoneType zone)
|
||||
{
|
||||
if ((zone.getId() == ZONE_ID) && character.isPlayer())
|
||||
{
|
||||
for (int info : eventTriggers)
|
||||
{
|
||||
character.broadcastPacket(new OnEventTrigger(info, true));
|
||||
}
|
||||
|
||||
if (_collapseTask != null)
|
||||
{
|
||||
_collapseTask.cancel(true);
|
||||
_collapseTask = null;
|
||||
}
|
||||
_statusZone = 0;
|
||||
nextStage(_statusZone);
|
||||
}
|
||||
|
||||
if ((zone.getId() == ZONE_ID_HEART) && character.isPlayer())
|
||||
{
|
||||
_zoneLair2.movePlayersTo(HEART_LOCATION);
|
||||
if (_collapseTask != null)
|
||||
{
|
||||
_collapseTask.cancel(true);
|
||||
_collapseTask = null;
|
||||
}
|
||||
final int time = 540000;
|
||||
zone.getPlayersInside().forEach(temp -> temp.sendPacket(new ExSendUIEvent(temp, false, false, 540, 0, NpcStringId.REMAINING_TIME)));
|
||||
_collapseTask = ThreadPoolManager.schedule(() -> Fail(true), time);
|
||||
}
|
||||
return super.onEnterZone(character, zone);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onExitZone(final L2Character character, final L2ZoneType zone)
|
||||
{
|
||||
if ((zone.getId() == ZONE_ID_HEART) && zone.getPlayersInside().isEmpty())
|
||||
{
|
||||
_collapseTask = ThreadPoolManager.schedule(() ->
|
||||
{
|
||||
Fail(true);
|
||||
for (int info : eventTriggers)
|
||||
{
|
||||
character.broadcastPacket(new OnEventTrigger(info, false));
|
||||
}
|
||||
}, 900000);
|
||||
}
|
||||
return super.onExitZone(character, zone);
|
||||
}
|
||||
|
||||
private void nextStage(int taskId)
|
||||
{
|
||||
switch (taskId)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
for (Location loc : Spawn_Tie)
|
||||
{
|
||||
addSpawn(TIE, loc, false, 0, true);
|
||||
}
|
||||
|
||||
for (Location loc : Spawn_Big_Tie)
|
||||
{
|
||||
addSpawn(BIG_TIE, loc, false, 0, true);
|
||||
}
|
||||
|
||||
addSpawn(HEART_ERTHWYRM, Spawn_Heart, false, 0, true);
|
||||
|
||||
for (Location loc : Spawn_Victim_1)
|
||||
{
|
||||
addSpawn(VICTIM_EARTWORMS_1, loc, false, 0, true);
|
||||
}
|
||||
|
||||
for (Location loc : Spawn_Victim_2)
|
||||
{
|
||||
addSpawn(VICTIM_EARTWORMS_2, loc, false, 0, true);
|
||||
}
|
||||
|
||||
for (Location loc : Spawn_Victim_3)
|
||||
{
|
||||
addSpawn(VICTIM_EARTWORMS_3, loc, false, 0, true);
|
||||
}
|
||||
|
||||
for (Location loc : Spawn_Digestive)
|
||||
{
|
||||
addSpawn(DIGISTIVE, loc, false, 0, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
for (Location loc : Spawn_Tradjan)
|
||||
{
|
||||
addSpawn(TRADJAN, loc, false, 0, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
tie_trasken = addSpawn(TAIL_TRASKEN, CENTER_LOCATION, false, 0, true);
|
||||
hp_tail = tie_trasken.getCurrentHp();
|
||||
startQuestTimer("spawn_rnd", 30000, tie_trasken, null);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
cancelQuestTimer("spawn_rnd", tie_trasken, null);
|
||||
|
||||
trasken = addSpawn(TRASKEN, CENTER_LOCATION, false, 0, true);
|
||||
trasken.doCast(SKILL_TRASKEN_UP.getSkill());
|
||||
hp_trasken = trasken.getCurrentHp();
|
||||
|
||||
startQuestTimer("spawn_rnd", 70000, trasken, null);
|
||||
for (Location loc : Spawn_Larva_1)
|
||||
{
|
||||
addSpawn(LAVRA_1, loc, false, 0, true);
|
||||
}
|
||||
|
||||
for (Location loc : Spawn_Larva_2)
|
||||
{
|
||||
addSpawn(LAVRA_2, loc, false, 0, true);
|
||||
}
|
||||
|
||||
for (Location loc : Spawn_Larva_3)
|
||||
{
|
||||
addSpawn(LAVRA_3, loc, false, 0, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void TraskenStay(L2Character character)
|
||||
{
|
||||
character.broadcastPacket(new ExShowScreenMessage(NpcStringId.THE_EARTH_WYRM_HAS_LOST_CONSCIOUSNESS, 5, 4600, true));
|
||||
character.doCast(SKILL_TRASKEN_BUFF.getSkill()); // 12 sec combo
|
||||
if (playersToEnter == _zoneLair2.getPlayersInside().size())
|
||||
{
|
||||
final BuffInfo traskenBuff = character.getEffectList().getBuffInfoBySkillId(SKILL_TRASKEN_BUFF.getSkillId());
|
||||
if (traskenBuff != null)
|
||||
{
|
||||
character.getEffectList().remove(true, traskenBuff, null);
|
||||
}
|
||||
}
|
||||
ThreadPoolManager.schedule(() ->
|
||||
{
|
||||
character.broadcastPacket(new ExShowScreenMessage(NpcStringId.YOU_VE_EXCEEDED_THE_MAXIMUM_NUMBER_OF_PERSONNEL, 5, 24000, true));
|
||||
character.doCast(SKILL_TRASKEN_SLEEP.getSkill());
|
||||
}, 4050);
|
||||
}
|
||||
|
||||
public boolean getTimeUnlock()
|
||||
{
|
||||
Calendar cal = Calendar.getInstance();
|
||||
if ((cal.get(Calendar.WEEK_OF_MONTH) == 1) || (cal.get(Calendar.WEEK_OF_MONTH) == 3))
|
||||
{
|
||||
switch (cal.get(Calendar.DAY_OF_WEEK))
|
||||
{
|
||||
case Calendar.FRIDAY:
|
||||
case Calendar.SATURDAY:
|
||||
case Calendar.SUNDAY:
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private class UnlockTrasken implements Runnable
|
||||
{
|
||||
public UnlockTrasken()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
GrandBossManager.getInstance().setBossStatus(TRASKEN, ALIVE);
|
||||
Broadcast.toAllOnlinePlayers(new Earthquake(CENTER_LOCATION.getX(), CENTER_LOCATION.getY(), CENTER_LOCATION.getZ(), CENTER_LOCATION.getHeading(), 10));
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new Trasken();
|
||||
}
|
||||
}
|
59
L2J_Mobius_1.0_Ertheia/dist/game/data/spawns/Schuttgart/EarthWyrmCave.xml
vendored
Normal file
59
L2J_Mobius_1.0_Ertheia/dist/game/data/spawns/Schuttgart/EarthWyrmCave.xml
vendored
Normal file
@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/spawns.xsd">
|
||||
<spawn name="EarthWyrmCave">
|
||||
<group>
|
||||
<!-- Belenora -->
|
||||
<npc id="33506" x="75254" y="-182400" z="-9888" heading="40960" />
|
||||
<!-- Dark Elf Soldier -->
|
||||
<npc id="33507" x="75210" y="-182546" z="-9896" heading="8192" />
|
||||
<npc id="33507" x="76280" y="-182298" z="-9888" heading="0" />
|
||||
<npc id="33507" x="75106" y="-182365" z="-9888" heading="8192" />
|
||||
<npc id="33507" x="75067" y="-182406" z="-9888" heading="8192" />
|
||||
<npc id="33507" x="75150" y="-182417" z="-9896" heading="8192" />
|
||||
<npc id="33507" x="75249" y="-182497" z="-9896" heading="8192" />
|
||||
<npc id="33507" x="75227" y="-182626" z="-9899" heading="8192" />
|
||||
<npc id="33507" x="75292" y="-182532" z="-9896" heading="8192" />
|
||||
<npc id="33507" x="75177" y="-182587" z="-9888" heading="8192" />
|
||||
<npc id="33507" x="75119" y="-182461" z="-9888" heading="8192" />
|
||||
<npc id="33507" x="75166" y="-182505" z="-9888" heading="8192" />
|
||||
<npc id="33507" x="76333" y="-182254" z="-9888" heading="0" />
|
||||
<npc id="33507" x="75259" y="-182579" z="-9896" heading="8192" />
|
||||
<npc id="33507" x="75199" y="-182458" z="-9896" heading="8192" />
|
||||
<npc id="33507" x="75133" y="-182552" z="-9864" heading="8192" />
|
||||
<npc id="33507" x="75032" y="-182453" z="-9888" heading="8192" />
|
||||
<!-- Alejandro -->
|
||||
<npc id="33502" x="75179" y="-182148" z="-9888" heading="32768" />
|
||||
<!-- Dwarf Soldier -->
|
||||
<npc id="33503" x="75067" y="-182208" z="-9896" heading="0" />
|
||||
<npc id="33503" x="75015" y="-182211" z="-9896" heading="0" />
|
||||
<npc id="33503" x="75067" y="-182148" z="-9896" heading="0" />
|
||||
<npc id="33503" x="75012" y="-182148" z="-9896" heading="0" />
|
||||
<npc id="33503" x="74955" y="-182145" z="-9896" heading="0" />
|
||||
<npc id="33503" x="74952" y="-182082" z="-9896" heading="0" />
|
||||
<npc id="33503" x="75015" y="-182082" z="-9896" heading="0" />
|
||||
<npc id="33503" x="74952" y="-182211" z="-9896" heading="0" />
|
||||
<npc id="33503" x="74949" y="-182019" z="-9880" heading="0" />
|
||||
<npc id="33503" x="75015" y="-182019" z="-9896" heading="0" />
|
||||
<npc id="33503" x="74952" y="-182269" z="-9896" heading="0" />
|
||||
<npc id="33503" x="75015" y="-182272" z="-9896" heading="0" />
|
||||
<npc id="33503" x="75067" y="-182272" z="-9896" heading="0" />
|
||||
<npc id="33503" x="75067" y="-182022" z="-9896" heading="0" />
|
||||
<npc id="33503" x="76277" y="-181919" z="-9896" heading="0" />
|
||||
<npc id="33503" x="76342" y="-181971" z="-9896" heading="0" />
|
||||
<npc id="33503" x="75067" y="-182085" z="-9896" heading="0" />
|
||||
<!-- Teleport Device -->
|
||||
<npc id="33513" x="75179" y="-181893" z="-9896" heading="0" />
|
||||
<!-- Wooden Medic -->
|
||||
<npc id="33505" x="75372" y="-181770" z="-9888" heading="24576" />
|
||||
<!-- Dwarf Soldier -->
|
||||
<npc id="33504" x="75372" y="-181644" z="-9888" heading="45056" />
|
||||
<npc id="33504" x="75459" y="-181612" z="-9896" heading="16384" />
|
||||
<npc id="33504" x="75287" y="-181685" z="-9896" heading="32768" />
|
||||
<npc id="33504" x="75205" y="-181755" z="-9888" heading="0" />
|
||||
<!-- Fernando -->
|
||||
<!--
|
||||
<npc id="33160" x="77154" y="-182196" z="-9888" heading="30708" />
|
||||
-->
|
||||
</group>
|
||||
</spawn>
|
||||
</list>
|
@ -4414,8 +4414,7 @@
|
||||
<height normal="135" />
|
||||
</collision>
|
||||
</npc>
|
||||
<npc id="29197" level="99" type="L2RaidBoss" name="Earth Wyrm Trasken" title="Hell's Gate">
|
||||
<!-- AUTO GENERATED NPC TODO: FIX IT -->
|
||||
<npc id="29197" level="99" type="L2GrandBoss" name="Earth Wyrm Trasken" title="Hell's Gate">
|
||||
<parameters>
|
||||
<skill name="skill01" id="14335" level="1" />
|
||||
<skill name="skill03" id="14336" level="1" />
|
||||
|
@ -181,4 +181,10 @@
|
||||
<node X="49357" Y="-28620" />
|
||||
<node X="47553" Y="-29161" />
|
||||
</zone>
|
||||
<zone name="Trasken_Zone" id="12108" type="NoSummonFriendZone" shape="Cylinder" minZ="-16000" maxZ="16000" rad="8000" >
|
||||
<node X="81955" Y="-181606" />
|
||||
</zone>
|
||||
<zone name="Heart_Trasken_Zone" id="12109" type="NoSummonFriendZone" shape="Cylinder" minZ="-16000" maxZ="16000" rad="2500" >
|
||||
<node X="88110" Y="-173795" />
|
||||
</zone>
|
||||
</list>
|
@ -20,6 +20,7 @@ INSERT IGNORE INTO `grandboss_data` (`boss_id`,`loc_x`,`loc_y`,`loc_z`,`heading`
|
||||
(29068, 185708, 114298, -8221,32768, 62802301, 1998000), -- Antharas
|
||||
(29028, -105200, -253104, -15264, 0, 62041918, 2248572), -- Valakas
|
||||
(29240, 0, 0, 0, 0, 288282589, 47100), -- Lindvior
|
||||
(29197, 81208, -182095, -9895, 0, 512402016, 47100), -- Trasken
|
||||
(29118, 0, 0, 0, 0, 4109288, 1220547), -- Beleth
|
||||
(25286, 185080, -12613, -5499, 16550, 556345880, 86847), -- Anakim
|
||||
(25283, 185062, -9605, -5499, 15640, 486021997, 79600), -- Lilith
|
||||
|
@ -1,4 +0,0 @@
|
||||
<html><body>Head Priest of the Earth Daichir:<br>
|
||||
Before you go, make sure that everyone in your party is ready. No one needs more food, a tissue, to clear out their saddle bag... no one has to use the bathroom?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest EarthWyrmCave enterInstance">"Our preparations are complete. Let us in!"</Button>
|
||||
</body></html>
|
@ -3,6 +3,6 @@
|
||||
Although we are unfortunate to be suffering, do not pity yourself. All is meant. All will be remedied.<br>
|
||||
The Goddess of the Earth is always beside you. We must repay her for the kindness she allows us.<br>
|
||||
If you want the blessing of goddess to be always with you, remember my words! <font color="LEVEL">"Karna Maphra!"</font><br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Chat 1">"What of Trasken?"</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Trasken enterZone">"What of Trasken?"</Button>
|
||||
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
|
||||
</body></html>
|
@ -1,4 +1,4 @@
|
||||
<html><body>Teleport Device:<br>
|
||||
This is a teleport device made to move to the ground.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest EarthWyrmCave exitInstance">Go up to the town.</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Trasken exitZone">Go up to the town.</Button>
|
||||
</body></html>
|
@ -1,167 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Earth Wyrm Cave -->
|
||||
<!-- TODO: Find proper instance id. (138?) -->
|
||||
<instance id="192" maxWorlds="50" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/instance.xsd">
|
||||
<time duration="120" empty="10" />
|
||||
<locations>
|
||||
<enter type="FIXED">
|
||||
<location x="75445" y="-182112" z="-9880" />
|
||||
</enter>
|
||||
<exit type="ORIGIN" />
|
||||
</locations>
|
||||
<conditions>
|
||||
<condition type="Party" />
|
||||
<condition type="PartyLeader" />
|
||||
<condition type="GroupMin">
|
||||
<param name="limit" value="5" />
|
||||
</condition>
|
||||
<condition type="GroupMax">
|
||||
<param name="limit" value="7" />
|
||||
</condition>
|
||||
<condition type="Level">
|
||||
<param name="min" value="85" />
|
||||
</condition>
|
||||
<condition type="Distance" />
|
||||
<condition type="Reenter" />
|
||||
</conditions>
|
||||
<reenter apply="ON_FINISH">
|
||||
<reset day="MONDAY" hour="6" minute="30" />
|
||||
<reset day="TUESDAY" hour="6" minute="30" />
|
||||
<reset day="WEDNESDAY" hour="6" minute="30" />
|
||||
<reset day="THURSDAY" hour="6" minute="30" />
|
||||
<reset day="FRIDAY" hour="6" minute="30" />
|
||||
<reset day="SATURDAY" hour="6" minute="30" />
|
||||
<reset day="SUNDAY" hour="6" minute="30" />
|
||||
</reenter>
|
||||
<doorlist>
|
||||
<door id="22120001" />
|
||||
</doorlist>
|
||||
<spawnlist>
|
||||
<group>
|
||||
<!-- Belenora -->
|
||||
<npc id="33506" x="75254" y="-182400" z="-9888" heading="40960" />
|
||||
<!-- Dark Elf Soldier -->
|
||||
<npc id="33507" x="75210" y="-182546" z="-9896" heading="8192" />
|
||||
<npc id="33507" x="76280" y="-182298" z="-9888" heading="0" />
|
||||
<npc id="33507" x="75106" y="-182365" z="-9888" heading="8192" />
|
||||
<npc id="33507" x="75067" y="-182406" z="-9888" heading="8192" />
|
||||
<npc id="33507" x="75150" y="-182417" z="-9896" heading="8192" />
|
||||
<npc id="33507" x="75249" y="-182497" z="-9896" heading="8192" />
|
||||
<npc id="33507" x="75227" y="-182626" z="-9899" heading="8192" />
|
||||
<npc id="33507" x="75292" y="-182532" z="-9896" heading="8192" />
|
||||
<npc id="33507" x="75177" y="-182587" z="-9888" heading="8192" />
|
||||
<npc id="33507" x="75119" y="-182461" z="-9888" heading="8192" />
|
||||
<npc id="33507" x="75166" y="-182505" z="-9888" heading="8192" />
|
||||
<npc id="33507" x="76333" y="-182254" z="-9888" heading="0" />
|
||||
<npc id="33507" x="75259" y="-182579" z="-9896" heading="8192" />
|
||||
<npc id="33507" x="75199" y="-182458" z="-9896" heading="8192" />
|
||||
<npc id="33507" x="75133" y="-182552" z="-9864" heading="8192" />
|
||||
<npc id="33507" x="75032" y="-182453" z="-9888" heading="8192" />
|
||||
<!-- Alejandro -->
|
||||
<npc id="33502" x="75179" y="-182148" z="-9888" heading="32768" />
|
||||
<!-- Dwarf Soldier -->
|
||||
<npc id="33503" x="75067" y="-182208" z="-9896" heading="0" />
|
||||
<npc id="33503" x="75015" y="-182211" z="-9896" heading="0" />
|
||||
<npc id="33503" x="75067" y="-182148" z="-9896" heading="0" />
|
||||
<npc id="33503" x="75012" y="-182148" z="-9896" heading="0" />
|
||||
<npc id="33503" x="74955" y="-182145" z="-9896" heading="0" />
|
||||
<npc id="33503" x="74952" y="-182082" z="-9896" heading="0" />
|
||||
<npc id="33503" x="75015" y="-182082" z="-9896" heading="0" />
|
||||
<npc id="33503" x="74952" y="-182211" z="-9896" heading="0" />
|
||||
<npc id="33503" x="74949" y="-182019" z="-9880" heading="0" />
|
||||
<npc id="33503" x="75015" y="-182019" z="-9896" heading="0" />
|
||||
<npc id="33503" x="74952" y="-182269" z="-9896" heading="0" />
|
||||
<npc id="33503" x="75015" y="-182272" z="-9896" heading="0" />
|
||||
<npc id="33503" x="75067" y="-182272" z="-9896" heading="0" />
|
||||
<npc id="33503" x="75067" y="-182022" z="-9896" heading="0" />
|
||||
<npc id="33503" x="76277" y="-181919" z="-9896" heading="0" />
|
||||
<npc id="33503" x="76342" y="-181971" z="-9896" heading="0" />
|
||||
<npc id="33503" x="75067" y="-182085" z="-9896" heading="0" />
|
||||
<!-- Teleport Device -->
|
||||
<npc id="33513" x="75179" y="-181893" z="-9896" heading="0" />
|
||||
<!-- Wooden Medic -->
|
||||
<npc id="33505" x="75372" y="-181770" z="-9888" heading="24576" />
|
||||
<!-- Dwarf Soldier -->
|
||||
<npc id="33504" x="75372" y="-181644" z="-9888" heading="45056" />
|
||||
<npc id="33504" x="75459" y="-181612" z="-9896" heading="16384" />
|
||||
<npc id="33504" x="75287" y="-181685" z="-9896" heading="32768" />
|
||||
<npc id="33504" x="75205" y="-181755" z="-9888" heading="0" />
|
||||
<!-- Fernando -->
|
||||
<!--
|
||||
<npc id="33160" x="77154" y="-182196" z="-9888" heading="30708" />
|
||||
-->
|
||||
<!-- Tentacle -->
|
||||
<npc id="29198" x="79526" y="-181507" z="-9896" heading="42749" />
|
||||
<npc id="29198" x="80432" y="-180356" z="-9896" heading="19795" />
|
||||
<npc id="29198" x="80432" y="-180850" z="-9896" heading="44991" />
|
||||
<npc id="29198" x="80432" y="-184308" z="-9896" heading="37585" />
|
||||
<npc id="29198" x="80783" y="-180092" z="-9896" heading="12194" />
|
||||
<npc id="29198" x="80168" y="-183593" z="-9896" heading="26626" />
|
||||
<npc id="29198" x="80872" y="-180246" z="-9888" heading="10554" />
|
||||
<npc id="29198" x="81443" y="-182945" z="-9872" heading="46798" />
|
||||
<npc id="29198" x="81273" y="-183674" z="-9896" heading="2271" />
|
||||
<npc id="29198" x="81358" y="-184079" z="-9896" heading="5310" />
|
||||
<npc id="29198" x="81273" y="-183026" z="-9872" heading="18796" />
|
||||
<npc id="29198" x="79938" y="-181744" z="-9896" heading="38441" />
|
||||
<npc id="29198" x="81139" y="-180477" z="-9872" heading="55592" />
|
||||
<npc id="29198" x="81495" y="-181016" z="-9872" heading="3517" />
|
||||
<npc id="29198" x="80872" y="-181170" z="-9896" heading="2987" />
|
||||
<npc id="29198" x="80961" y="-180015" z="-9888" heading="48027" />
|
||||
<npc id="29198" x="82315" y="-182058" z="-9896" heading="29777" />
|
||||
<npc id="29198" x="82564" y="-181977" z="-9896" heading="57134" />
|
||||
<npc id="29198" x="81940" y="-180939" z="-9880" heading="42939" />
|
||||
<npc id="29198" x="82066" y="-182058" z="-9896" heading="38882" />
|
||||
<npc id="29198" x="82790" y="-183073" z="-9888" heading="41801" />
|
||||
<npc id="29198" x="80763" y="-183512" z="-9888" heading="63581" />
|
||||
<!-- Tentacle -->
|
||||
<npc id="29205" x="79423" y="-182218" z="-9896" heading="35179" />
|
||||
<npc id="29205" x="80783" y="-180246" z="-9896" heading="34912" />
|
||||
<npc id="29205" x="80170" y="-180356" z="-9896" heading="21512" />
|
||||
<npc id="29205" x="80423" y="-183674" z="-9872" heading="25477" />
|
||||
<npc id="29205" x="80144" y="-181823" z="-9896" heading="34942" />
|
||||
<npc id="29205" x="80432" y="-179862" z="-9896" heading="47116" />
|
||||
<npc id="29205" x="80516" y="-180862" z="-9896" heading="43485" />
|
||||
<npc id="29205" x="81742" y="-184061" z="-9896" heading="23309" />
|
||||
<npc id="29205" x="81103" y="-184079" z="-9896" heading="41642" />
|
||||
<npc id="29205" x="81273" y="-183917" z="-9896" heading="38136" />
|
||||
<npc id="29205" x="81900" y="-182382" z="-9896" heading="44739" />
|
||||
<npc id="29205" x="81050" y="-180554" z="-9888" heading="51101" />
|
||||
<npc id="29205" x="81900" y="-181977" z="-9896" heading="1962" />
|
||||
<npc id="29205" x="80783" y="-180862" z="-9896" heading="39953" />
|
||||
<npc id="29205" x="81443" y="-183836" z="-9896" heading="25283" />
|
||||
<npc id="29205" x="82564" y="-182625" z="-9896" heading="15729" />
|
||||
<npc id="29205" x="82896" y="-181653" z="-9896" heading="13615" />
|
||||
<npc id="29205" x="82813" y="-182706" z="-9896" heading="12202" />
|
||||
<npc id="29205" x="82813" y="-181491" z="-9896" heading="17260" />
|
||||
<npc id="29205" x="83228" y="-181653" z="-9896" heading="19761" />
|
||||
<npc id="29205" x="83228" y="-182139" z="-9896" heading="40650" />
|
||||
<npc id="29205" x="79938" y="-182534" z="-9872" heading="26203" />
|
||||
<npc id="29205" x="83062" y="-181977" z="-9896" heading="23729" />
|
||||
<npc id="29205" x="81406" y="-180631" z="-9888" heading="1241" />
|
||||
<!-- Earth Wyrm Topography 1 -->
|
||||
<!--
|
||||
<npc id="19025" x="81184" y="-182093" z="-9888" heading="49151" />
|
||||
-->
|
||||
<!-- Earth Wyrm Topography 2 -->
|
||||
<!--
|
||||
<npc id="19026" x="81184" y="-182099" z="-9888" heading="49151" />
|
||||
-->
|
||||
<!-- Earth Wyrm Topography 3 -->
|
||||
<!--
|
||||
<npc id="19027" x="81184" y="-182099" z="-9888" heading="49151" />
|
||||
-->
|
||||
<!-- Earth Wyrm Topography 4 -->
|
||||
<!--
|
||||
<npc id="19028" x="81184" y="-182099" z="-9888" heading="49151" />
|
||||
-->
|
||||
<!-- Stomach Gland -->
|
||||
<!--
|
||||
<npc id="29206" x="87919" y="-173954" z="-15980" heading="26284" />
|
||||
<npc id="29206" x="88117" y="-173391" z="-15980" heading="4393" />
|
||||
<npc id="29206" x="88636" y="-173489" z="-15980" heading="61965" />
|
||||
<npc id="29206" x="88768" y="-173759" z="-15980" heading="65268" />
|
||||
<npc id="29206" x="87795" y="-173762" z="-15980" heading="33501" />
|
||||
-->
|
||||
</group>
|
||||
</spawnlist>
|
||||
</instance>
|
@ -1,147 +0,0 @@
|
||||
/*
|
||||
* 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.bosses.Trasken;
|
||||
|
||||
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 com.l2jmobius.gameserver.network.NpcStringId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
|
||||
|
||||
import instances.AbstractInstance;
|
||||
|
||||
/**
|
||||
* Earth Wyrm Cave instance zone. (simple implementation)
|
||||
* @Video http://www.youtube.com/watch?v=0Vyu7GJvuBo
|
||||
* @author Mobius
|
||||
*/
|
||||
public final class EarthWyrmCave extends AbstractInstance
|
||||
{
|
||||
// NPCs
|
||||
private static final int DAICHIR = 30537;
|
||||
private static final int TRASKEN = 29197;
|
||||
// Location
|
||||
private static final Location TRASKEN_SPAWN_LOC = new Location(82383, -183527, -9892, 26533);
|
||||
// Door
|
||||
private static final int DOOR_ID = 22120001;
|
||||
// Misc
|
||||
private static final int OPEN_DOOR = 5; // minutes
|
||||
private static final int TEMPLATE_ID = 192;
|
||||
|
||||
public EarthWyrmCave()
|
||||
{
|
||||
super(TEMPLATE_ID);
|
||||
addStartNpc(DAICHIR);
|
||||
addTalkId(DAICHIR);
|
||||
addKillId(TRASKEN);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
switch (event)
|
||||
{
|
||||
case "enterInstance":
|
||||
{
|
||||
enterInstance(player, npc, TEMPLATE_ID);
|
||||
startQuestTimer("OPEN_DOOR", OPEN_DOOR * 60 * 1000, null, player);
|
||||
break;
|
||||
}
|
||||
case "exitInstance":
|
||||
{
|
||||
if (player.getInstanceId() == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
player.getInstanceWorld().ejectPlayer(player);
|
||||
break;
|
||||
}
|
||||
case "OPEN_DOOR":
|
||||
{
|
||||
if ((player == null) || (player.getInstanceId() == 0))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
final Instance world = player.getInstanceWorld();
|
||||
world.openCloseDoor(DOOR_ID, true);
|
||||
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.ELIMINATE_THOSE_WHO_PROTECT_THE_HEART_OF_THE_EARTH_WYRM, ExShowScreenMessage.TOP_CENTER, 7000));
|
||||
startQuestTimer("CLOSE_DOOR", 60000, null, player); // close door after a minute
|
||||
startQuestTimer("WAIT_TO_CLEAR_MONSTERS", 5000, null, player);
|
||||
break;
|
||||
}
|
||||
case "CLOSE_DOOR":
|
||||
{
|
||||
if ((player == null) || (player.getInstanceId() == 0))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
final Instance world = player.getInstanceWorld();
|
||||
world.openCloseDoor(DOOR_ID, false);
|
||||
break;
|
||||
}
|
||||
case "WAIT_TO_CLEAR_MONSTERS":
|
||||
{
|
||||
if ((player == null) || (player.getInstanceId() == 0))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
final Instance world = player.getInstanceWorld();
|
||||
if (world.getAliveNpcs(L2MonsterInstance.class).isEmpty())
|
||||
{
|
||||
addSpawn(TRASKEN, TRASKEN_SPAWN_LOC, false, 0, false, player.getInstanceId());
|
||||
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.FIND_THE_EARTH_WYRM_S_WEAKNESS_TO_DEFEAT_IT, ExShowScreenMessage.TOP_CENTER, 5000));
|
||||
}
|
||||
else
|
||||
{
|
||||
startQuestTimer("WAIT_TO_CLEAR_MONSTERS", 5000, null, player);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
|
||||
{
|
||||
final Instance instance = npc.getInstanceWorld();
|
||||
if (isInInstance(instance))
|
||||
{
|
||||
switch (npc.getId())
|
||||
{
|
||||
case TRASKEN:
|
||||
{
|
||||
npc.deleteMe();
|
||||
instance.broadcastPacket(new ExShowScreenMessage(NpcStringId.HEART_OF_EARTH_WYRM_HAS_BEEN_DESTROYED, ExShowScreenMessage.TOP_CENTER, 5000));
|
||||
playMovie(instance.getPlayers(), Movie.SC_EARTHWORM_ENDING);
|
||||
instance.openCloseDoor(DOOR_ID, true);
|
||||
instance.finishInstance();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return super.onKill(npc, killer, isSummon);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new EarthWyrmCave();
|
||||
}
|
||||
}
|
923
L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/bosses/Trasken/Trasken.java
vendored
Normal file
923
L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/bosses/Trasken/Trasken.java
vendored
Normal file
@ -0,0 +1,923 @@
|
||||
/*
|
||||
* 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.bosses.Trasken;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import com.l2jmobius.commons.util.Rnd;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.DoorData;
|
||||
import com.l2jmobius.gameserver.datatables.SpawnTable;
|
||||
import com.l2jmobius.gameserver.enums.Movie;
|
||||
import com.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
import com.l2jmobius.gameserver.model.L2World;
|
||||
import com.l2jmobius.gameserver.model.Location;
|
||||
import com.l2jmobius.gameserver.model.StatsSet;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Playable;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2MonsterInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.holders.SkillHolder;
|
||||
import com.l2jmobius.gameserver.model.skills.BuffInfo;
|
||||
import com.l2jmobius.gameserver.model.zone.L2ZoneType;
|
||||
import com.l2jmobius.gameserver.model.zone.type.L2NoSummonFriendZone;
|
||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.Earthquake;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ExSendUIEvent;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.OnEventTrigger;
|
||||
import com.l2jmobius.gameserver.util.Broadcast;
|
||||
|
||||
import ai.AbstractNpcAI;
|
||||
|
||||
/**
|
||||
* Trasken RB
|
||||
* @author Gigi
|
||||
* @date 2017-07-27 - [10:11:22]
|
||||
*/
|
||||
public class Trasken extends AbstractNpcAI
|
||||
{
|
||||
// NPCs
|
||||
private static final int TRASKEN = 29197;
|
||||
private static final int TAIL_TRASKEN = 29200;
|
||||
private static final int TIE = 29205;
|
||||
private static final int BIG_TIE = 29199;
|
||||
private static final int VICTIM_EARTWORMS_1 = 29201;
|
||||
private static final int VICTIM_EARTWORMS_2 = 29202;
|
||||
private static final int VICTIM_EARTWORMS_3 = 29203;
|
||||
private static final int LAVRA_1 = 29204;
|
||||
private static final int LAVRA_2 = 29207;
|
||||
private static final int LAVRA_3 = 29208;
|
||||
private static final int DIGISTIVE = 29206;
|
||||
private static final int TRADJAN = 19160;
|
||||
private static final int HEART_ERTHWYRM = 19081;
|
||||
// Zone
|
||||
private static final int ZONE_ID = 12108;
|
||||
private static final int ZONE_ID_HEART = 12109;
|
||||
private final int[] eventTriggers = new int[]
|
||||
{
|
||||
22120840,
|
||||
22120842,
|
||||
22120844,
|
||||
22120846
|
||||
};
|
||||
private static final int DOOR = 22120001;
|
||||
private static final Location ENTER_LOCATION = new Location(75445, -182112, -9880);
|
||||
private static final Location EXIT_LOCATION = new Location(87679, -141982, -1341);
|
||||
static final Location CENTER_LOCATION = new Location(81208, -182095, -9895);
|
||||
static final Location HEART_LOCATION = new Location(81208, -182095, -9895);
|
||||
// Skill
|
||||
private static final SkillHolder SKILL_TAIL = new SkillHolder(14342, 1);
|
||||
private static final SkillHolder SKILL_TAIL_2 = new SkillHolder(14343, 1);
|
||||
private static final SkillHolder SKILL_TRASKEN_FIRST = new SkillHolder(14336, 1);
|
||||
private static final SkillHolder SKILL_TRASKEN_BUFF = new SkillHolder(14341, 1);
|
||||
private static final SkillHolder SKILL_TRASKEN_SLEEP = new SkillHolder(14504, 1); // 24 sec
|
||||
private static final SkillHolder SKILL_TRASKEN_UP = new SkillHolder(14505, 1);
|
||||
private static final SkillHolder SKILL_TIE_ROOT = new SkillHolder(14332, 1);
|
||||
private static final SkillHolder SKILL_TIE_CHAIN = new SkillHolder(14333, 1);
|
||||
private static final SkillHolder SKILL_1 = new SkillHolder(14334, 1); // Poison Puddle
|
||||
private static final SkillHolder SKILL_2 = new SkillHolder(14337, 1); // Earth Wyrm Body Strike
|
||||
private static final SkillHolder SKILL_3 = new SkillHolder(14338, 1); // Earth Wyrm Body Strike
|
||||
private static final SkillHolder SKILL_4 = new SkillHolder(14339, 1); // Earth Wyrm Body Strike
|
||||
private static final SkillHolder SKILL_5 = new SkillHolder(14340, 1); // Earth Wyrm Poison Cannon
|
||||
// Status
|
||||
private static final int ALIVE = 0;
|
||||
private static final int DEAD = 3;
|
||||
// Others
|
||||
protected double hp_tail;
|
||||
protected double hp_trasken;
|
||||
private static L2Npc tie_trasken;
|
||||
private static L2Npc trasken;
|
||||
private static L2NoSummonFriendZone _zoneLair;
|
||||
private static L2NoSummonFriendZone _zoneLair2;
|
||||
private int playersToEnter;
|
||||
protected int _statusZone = 0;
|
||||
protected ScheduledFuture<?> _collapseTask;
|
||||
protected AtomicInteger _killsTie = new AtomicInteger(0);
|
||||
protected AtomicInteger _killsTradjan = new AtomicInteger(0);
|
||||
// Spawns
|
||||
private static final Location Spawn_Heart = new Location(88292, -173758, -15965);
|
||||
private static final Location[] Spawn_Tie = new Location[]
|
||||
{
|
||||
new Location(79075, -180963, -9897, 4527),
|
||||
new Location(81047, -182282, -9897, 33582),
|
||||
new Location(79942, -179851, -9897, 40574),
|
||||
new Location(81931, -180069, -9897, 2849),
|
||||
new Location(80864, -184281, -9897, 46457),
|
||||
new Location(81233, -179842, -9897, 28503),
|
||||
new Location(78735, -183107, -9897, 34160),
|
||||
new Location(80139, -180923, -9897, 34232),
|
||||
new Location(81758, -181902, -9897, 29365),
|
||||
new Location(81851, -180719, -9897, 11837),
|
||||
new Location(79181, -182178, -9897, 65110),
|
||||
new Location(83296, -182275, -9897, 4710),
|
||||
new Location(83966, -181084, -9897, 18435),
|
||||
new Location(83181, -181023, -9897, 63036),
|
||||
new Location(82263, -182977, -9897, 36550),
|
||||
new Location(80950, -182856, -9897, 27788),
|
||||
new Location(79966, -182812, -9897, 26489),
|
||||
new Location(82237, -184076, -9897, 45551),
|
||||
new Location(80868, -181154, -9897, 13967),
|
||||
new Location(80209, -184234, -9897, 27683),
|
||||
new Location(83150, -183279, -9897, 62418),
|
||||
new Location(79795, -182271, -9897, 5870)
|
||||
};
|
||||
private static final Location[] Spawn_Big_Tie = new Location[]
|
||||
{
|
||||
new Location(83235, -182070, -9897, 31663),
|
||||
new Location(83913, -183256, -9897, 4038),
|
||||
new Location(82853, -180868, -9897, 32158),
|
||||
new Location(78730, -182917, -9897, 35257),
|
||||
new Location(82175, -180300, -9897, 39388),
|
||||
new Location(79981, -181057, -9897, 14008),
|
||||
new Location(79019, -181882, -9897, 6394),
|
||||
new Location(79846, -182025, -9897, 28780),
|
||||
new Location(81224, -184186, -9897, 4064),
|
||||
new Location(80725, -181051, -9897, 34486),
|
||||
new Location(79838, -184216, -9897, 45196),
|
||||
new Location(82073, -181956, -9897, 27212),
|
||||
new Location(81920, -180981, -9897, 47056),
|
||||
new Location(80820, -183285, -9897, 31129),
|
||||
new Location(81788, -183047, -9897, 18980),
|
||||
new Location(78860, -179717, -9897, 53788),
|
||||
new Location(81105, -180268, -9897, 23643),
|
||||
new Location(83222, -184038, -9897, 13689),
|
||||
new Location(82093, -184188, -9897, 61993)
|
||||
};
|
||||
private static final Location[] Spawn_Larva_1 = new Location[]
|
||||
{
|
||||
new Location(81869, -181917, -9897, 59394),
|
||||
new Location(82831, -182837, -9897, 19463),
|
||||
new Location(79771, -184114, -9897, 15764),
|
||||
new Location(79887, -180114, -9897, 17733),
|
||||
new Location(80987, -181006, -9897, 12119),
|
||||
new Location(79065, -182890, -9897, 63705),
|
||||
new Location(78883, -183839, -9897, 5843),
|
||||
new Location(80014, -182944, -9897, 6195)
|
||||
};
|
||||
private static final Location[] Spawn_Larva_2 = new Location[]
|
||||
{
|
||||
new Location(81869, -181917, -9897, 20701),
|
||||
new Location(82831, -182837, -9897, 6257),
|
||||
new Location(79771, -184114, -9897, 28729),
|
||||
new Location(79887, -180114, -9897, 26087),
|
||||
new Location(80987, -181006, -9897, 59020),
|
||||
new Location(79065, -182890, -9897, 44820),
|
||||
new Location(78883, -183839, -9897, 23282),
|
||||
new Location(80014, -182944, -9897, 9306)
|
||||
};
|
||||
private static final Location[] Spawn_Larva_3 = new Location[]
|
||||
{
|
||||
new Location(79785, -181954, -9897, 65516),
|
||||
new Location(81727, -184036, -9897, 63858),
|
||||
new Location(81909, -181006, -9897, 12875),
|
||||
new Location(79264, -180704, -9897, 53464),
|
||||
new Location(80769, -183944, -9897, 31310),
|
||||
new Location(79886, -183771, -9897, 53311),
|
||||
new Location(78706, -183267, -9897, 862),
|
||||
new Location(81947, -182190, -9897, 43213),
|
||||
new Location(83103, -181089, -9897, 30877),
|
||||
new Location(81847, -179971, -9897, 40880),
|
||||
new Location(81908, -183298, -9897, 6597),
|
||||
new Location(79227, -181739, -9897, 63462),
|
||||
new Location(79918, -183288, -9897, 31839),
|
||||
new Location(80720, -181130, -9897, 9352),
|
||||
new Location(80166, -179956, -9897, 28989),
|
||||
new Location(81156, -179891, -9897, 9000),
|
||||
new Location(80874, -182796, -9897, 51715),
|
||||
new Location(80205, -180998, -9897, 1193),
|
||||
new Location(77961, -182792, -9897, 16867),
|
||||
new Location(83190, -184199, -9897, 57438),
|
||||
new Location(82764, -182099, -9897, 36113),
|
||||
new Location(78890, -179873, -9897, 50574),
|
||||
new Location(77805, -180767, -9897, 20522),
|
||||
new Location(82806, -180142, -9897, 46858),
|
||||
new Location(82152, -184742, -9897, 26490),
|
||||
new Location(82732, -183220, -9897, 60425),
|
||||
new Location(77975, -181902, -9897, 23116),
|
||||
new Location(81255, -182176, -9897, 53943),
|
||||
new Location(78796, -184218, -9897, 40593)
|
||||
};
|
||||
private static final Location[] Spawn_Victim_1 = new Location[]
|
||||
{
|
||||
new Location(87891, -173888, 0, 14559),
|
||||
new Location(87777, -172808, 0, 54130),
|
||||
new Location(88896, -174206, 0, 4641)
|
||||
};
|
||||
private static final Location[] Spawn_Victim_2 = new Location[]
|
||||
{
|
||||
new Location(88085, -174105, 0, 39106),
|
||||
new Location(88949, -174227, 0, 58094),
|
||||
new Location(89000, -172909, 0, 55350),
|
||||
new Location(87941, -173185, 0, 22119)
|
||||
};
|
||||
private static final Location[] Spawn_Victim_3 = new Location[]
|
||||
{
|
||||
new Location(88247, -174298, 0, 4884),
|
||||
new Location(88924, -173858, 0, 44289),
|
||||
new Location(88204, -172812, 0, 24052)
|
||||
};
|
||||
private static final Location[] Spawn_Tradjan = new Location[]
|
||||
{
|
||||
new Location(79785, -181954, -9897, 65516),
|
||||
new Location(81727, -184036, -9897, 63858),
|
||||
new Location(81909, -181006, -9897, 12875),
|
||||
new Location(79264, -180704, -9897, 53464),
|
||||
new Location(80769, -183944, -9897, 31310),
|
||||
new Location(79886, -183771, -9897, 53311),
|
||||
new Location(78706, -183267, -9897, 862),
|
||||
new Location(81947, -182190, -9897, 43213),
|
||||
new Location(83103, -181089, -9897, 30877),
|
||||
new Location(81847, -179971, -9897, 40880),
|
||||
new Location(81908, -183298, -9897, 6597),
|
||||
new Location(79227, -181739, -9897, 63462),
|
||||
new Location(79918, -183288, -9897, 31839),
|
||||
new Location(80720, -181130, -9897, 9352),
|
||||
new Location(80166, -179956, -9897, 28989),
|
||||
new Location(81156, -179891, -9897, 9000),
|
||||
new Location(80874, -182796, -9897, 51715),
|
||||
new Location(80205, -180998, -9897, 1193),
|
||||
new Location(77961, -182792, -9897, 16867),
|
||||
new Location(83190, -184199, -9897, 57438),
|
||||
new Location(82764, -182099, -9897, 36113),
|
||||
new Location(78890, -179873, -9897, 50574),
|
||||
new Location(77805, -180767, -9897, 20522),
|
||||
new Location(82806, -180142, -9897, 46858),
|
||||
new Location(82152, -184742, -9897, 26490),
|
||||
new Location(82732, -183220, -9897, 60425),
|
||||
new Location(77975, -181902, -9897, 23116),
|
||||
new Location(81255, -182176, -9897, 53943),
|
||||
new Location(78796, -184218, -9897, 40593)
|
||||
};
|
||||
private static final Location[] Spawn_Digestive = new Location[]
|
||||
{
|
||||
new Location(88114, -173387, -15980),
|
||||
new Location(88640, -173491, -15980),
|
||||
new Location(88546, -174051, -15981),
|
||||
new Location(87913, -173950, -15981)
|
||||
};
|
||||
// @formatter:off
|
||||
private static final int[][] Rnd_Spawn_Tail = new int[][]
|
||||
{
|
||||
{80966, -183780, -9896},
|
||||
{82949, -181947, -9899},
|
||||
{81688, -181059, -9895},
|
||||
{81208, -182095, -9895}
|
||||
};
|
||||
private static final int[][] Rnd_Spawn_Trasken = new int[][]
|
||||
{
|
||||
{82564, -180742, -9896},
|
||||
{82379, -183532, -9896},
|
||||
{79602, -183321, -9896},
|
||||
{79698, -180859, -9896},
|
||||
{81208, -182095, -9896}
|
||||
};
|
||||
// @formatter:on
|
||||
|
||||
public Trasken()
|
||||
{
|
||||
super();
|
||||
_zoneLair = ZoneManager.getInstance().getZoneById(ZONE_ID, L2NoSummonFriendZone.class);
|
||||
_zoneLair2 = ZoneManager.getInstance().getZoneById(ZONE_ID_HEART, L2NoSummonFriendZone.class);
|
||||
int[] creature = new int[]
|
||||
{
|
||||
TRASKEN,
|
||||
TIE,
|
||||
BIG_TIE,
|
||||
TAIL_TRASKEN,
|
||||
VICTIM_EARTWORMS_1,
|
||||
VICTIM_EARTWORMS_2,
|
||||
VICTIM_EARTWORMS_3,
|
||||
LAVRA_1,
|
||||
LAVRA_2,
|
||||
LAVRA_3,
|
||||
TRADJAN,
|
||||
HEART_ERTHWYRM
|
||||
};
|
||||
registerMobs(creature);
|
||||
addEnterZoneId(ZONE_ID);
|
||||
addExitZoneId(ZONE_ID);
|
||||
addEnterZoneId(ZONE_ID_HEART);
|
||||
addExitZoneId(ZONE_ID_HEART);
|
||||
init();
|
||||
if (DoorData.getInstance().getDoor(DOOR) != null)
|
||||
{
|
||||
DoorData.getInstance().getDoor(DOOR).openMe();
|
||||
}
|
||||
}
|
||||
|
||||
private void init()
|
||||
{
|
||||
int status = GrandBossManager.getInstance().getBossStatus(TRASKEN);
|
||||
final StatsSet info = GrandBossManager.getInstance().getStatsSet(TRASKEN);
|
||||
final Long respawnTime = info.getLong("respawn_time");
|
||||
if ((status == 3) && (respawnTime <= System.currentTimeMillis()))
|
||||
{
|
||||
GrandBossManager.getInstance().setBossStatus(TRASKEN, ALIVE);
|
||||
}
|
||||
else if (status == 3)
|
||||
{
|
||||
ThreadPoolManager.schedule(() -> GrandBossManager.getInstance().setBossStatus(TRASKEN, ALIVE), respawnTime - System.currentTimeMillis());
|
||||
}
|
||||
int size = _zoneLair.getPlayersInside().size();
|
||||
if ((size >= 14) && (size <= 28))
|
||||
{
|
||||
playersToEnter = 7;
|
||||
}
|
||||
else if ((size >= 28) && (size <= 56))
|
||||
{
|
||||
playersToEnter = 14;
|
||||
}
|
||||
else if ((size >= 56) && (size <= 102))
|
||||
{
|
||||
playersToEnter = 21;
|
||||
}
|
||||
else
|
||||
{
|
||||
playersToEnter = 1;
|
||||
}
|
||||
}
|
||||
|
||||
protected void Clean()
|
||||
{
|
||||
_statusZone = 0;
|
||||
if (_collapseTask != null)
|
||||
{
|
||||
_collapseTask.cancel(false);
|
||||
_collapseTask = null;
|
||||
}
|
||||
_zoneLair.getCharactersInside().forEach(mob ->
|
||||
{
|
||||
if (mob.isNpc())
|
||||
{
|
||||
mob.deleteMe();
|
||||
mob.setIsDead(true);
|
||||
}
|
||||
});
|
||||
_zoneLair2.getCharactersInside().forEach(mob ->
|
||||
{
|
||||
if (mob.isNpc())
|
||||
{
|
||||
mob.deleteMe();
|
||||
mob.setIsDead(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void Fail(final boolean clean)
|
||||
{
|
||||
if (clean)
|
||||
{
|
||||
Clean();
|
||||
}
|
||||
_zoneLair.oustAllPlayers();
|
||||
_zoneLair2.oustAllPlayers();
|
||||
GrandBossManager.getInstance().setBossStatus(TRASKEN, ALIVE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAttack(L2Npc npc, L2PcInstance attacker, int damage, boolean isSummon)
|
||||
{
|
||||
switch (npc.getId())
|
||||
{
|
||||
case TAIL_TRASKEN:
|
||||
{
|
||||
hp_tail = npc.getCurrentHp();
|
||||
break;
|
||||
}
|
||||
case TRASKEN:
|
||||
{
|
||||
if (npc.isCastingNow())
|
||||
{
|
||||
return super.onAttack(npc, attacker, damage, isSummon);
|
||||
}
|
||||
L2World.getInstance().forEachVisibleObjectInRange(npc, L2PcInstance.class, 250, cha ->
|
||||
{
|
||||
if (cha != null)
|
||||
{
|
||||
npc.setTarget(cha);
|
||||
}
|
||||
});
|
||||
if (getRandom(100) < 30)
|
||||
{
|
||||
final L2Npc doom = addSpawn(18998, attacker.getX() + 25, attacker.getY() + 25, attacker.getZ(), 0, false, 30, false);
|
||||
doom.setTarget(doom);
|
||||
doom.isCastingNow();
|
||||
doom.doCast(SKILL_1.getSkill());
|
||||
ThreadPoolManager.schedule(() -> doom.deleteMe(), 15000);
|
||||
}
|
||||
final double percent = ((npc.getCurrentHp() - damage) / npc.getMaxHp()) * 100.0;
|
||||
if ((percent <= 30) && (_statusZone == 4))
|
||||
{
|
||||
TraskenStay(npc);
|
||||
_statusZone = 5;
|
||||
}
|
||||
if ((percent <= 40) && (_statusZone == 3))
|
||||
{
|
||||
TraskenStay(npc);
|
||||
_statusZone = 4;
|
||||
}
|
||||
if (getRandom(100) < 50)
|
||||
{
|
||||
npc.doCast(SKILL_2.getSkill());
|
||||
}
|
||||
|
||||
if (getRandom(100) < 40)
|
||||
{
|
||||
npc.doCast(SKILL_3.getSkill());
|
||||
}
|
||||
|
||||
if (getRandom(100) < 25)
|
||||
{
|
||||
npc.doCast(SKILL_4.getSkill());
|
||||
}
|
||||
|
||||
if (getRandom(100) < 15)
|
||||
{
|
||||
npc.doCast(SKILL_5.getSkill());
|
||||
}
|
||||
hp_trasken = npc.getCurrentHp();
|
||||
break;
|
||||
}
|
||||
}
|
||||
return super.onAttack(npc, attacker, damage, isSummon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onSpawn(final L2Npc npc)
|
||||
{
|
||||
switch (npc.getId())
|
||||
{
|
||||
case TAIL_TRASKEN:
|
||||
{
|
||||
npc.setIsOverloaded(true);
|
||||
npc.setRandomWalking(true);
|
||||
npc.doCast(SKILL_TAIL.getSkill());
|
||||
break;
|
||||
}
|
||||
case TRASKEN:
|
||||
{
|
||||
npc.setIsOverloaded(true);
|
||||
npc.setRandomWalking(true);
|
||||
npc.setIsDead(false);
|
||||
break;
|
||||
}
|
||||
case TIE:
|
||||
case BIG_TIE:
|
||||
{
|
||||
L2World.getInstance().forEachVisibleObjectInRange(npc, L2PcInstance.class, 600, cha ->
|
||||
{
|
||||
npc.setTarget(cha);
|
||||
});
|
||||
npc.setIsOverloaded(true);
|
||||
npc.setRandomWalking(true);
|
||||
npc.getSpawn().setRespawnDelay(60);
|
||||
break;
|
||||
}
|
||||
case TRADJAN:
|
||||
{
|
||||
npc.getSpawn().setRespawnDelay(120);
|
||||
L2World.getInstance().forEachVisibleObjectInRange(npc, L2PcInstance.class, 3500, cha ->
|
||||
{
|
||||
npc.setTarget(cha);
|
||||
});
|
||||
break;
|
||||
}
|
||||
case LAVRA_1:
|
||||
case LAVRA_2:
|
||||
case LAVRA_3:
|
||||
{
|
||||
npc.getSpawn().setRespawnDelay(200);
|
||||
L2World.getInstance().forEachVisibleObjectInRange(npc, L2PcInstance.class, 3500, cha ->
|
||||
{
|
||||
npc.setTarget(cha);
|
||||
});
|
||||
break;
|
||||
}
|
||||
case VICTIM_EARTWORMS_1:
|
||||
case VICTIM_EARTWORMS_2:
|
||||
case VICTIM_EARTWORMS_3:
|
||||
{
|
||||
npc.getSpawn().setRespawnDelay(30);
|
||||
L2World.getInstance().forEachVisibleObjectInRange(npc, L2PcInstance.class, 1000, cha ->
|
||||
{
|
||||
npc.setTarget(cha);
|
||||
});
|
||||
break;
|
||||
}
|
||||
case DIGISTIVE:
|
||||
{
|
||||
npc.setIsOverloaded(true);
|
||||
npc.setRandomWalking(true);
|
||||
npc.getSpawn().setRespawnDelay(60);
|
||||
L2World.getInstance().forEachVisibleObjectInRange(npc, L2PcInstance.class, 1000, cha ->
|
||||
{
|
||||
npc.setTarget(cha);
|
||||
});
|
||||
break;
|
||||
}
|
||||
case HEART_ERTHWYRM:
|
||||
{
|
||||
npc.setIsOverloaded(true);
|
||||
npc.setRandomWalking(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return super.onSpawn(npc);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onSeeCreature(L2Npc npc, L2Character player, boolean isSummon)
|
||||
{
|
||||
if (npc.isDead() || (player == null))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
if ((npc.getId() == LAVRA_1) || (npc.getId() == LAVRA_2) || (npc.getId() == LAVRA_3) || (npc.getId() == TRADJAN))
|
||||
{
|
||||
addAttackPlayerDesire(npc, _zoneLair.getPlayersInside().get(getRandom(_zoneLair.getPlayersInside().size())));
|
||||
}
|
||||
else if ((npc.getId() == TIE) || (npc.getId() == BIG_TIE))
|
||||
{
|
||||
if (getRandom(100) < 60)
|
||||
{
|
||||
npc.setTarget(player);
|
||||
npc.doCast(SKILL_TIE_ROOT.getSkill());
|
||||
addAttackPlayerDesire(npc, (L2Playable) player);
|
||||
}
|
||||
else
|
||||
{
|
||||
npc.setTarget(player);
|
||||
npc.doCast(SKILL_TIE_CHAIN.getSkill());
|
||||
addAttackPlayerDesire(npc, (L2Playable) player);
|
||||
}
|
||||
}
|
||||
return super.onSeeCreature(npc, player, isSummon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(final String event, final L2Npc npc, final L2PcInstance player)
|
||||
{
|
||||
switch (event)
|
||||
{
|
||||
case "enterZone":
|
||||
{
|
||||
player.teleToLocation(ENTER_LOCATION);
|
||||
break;
|
||||
}
|
||||
case "exitZone":
|
||||
{
|
||||
player.teleToLocation(EXIT_LOCATION);
|
||||
break;
|
||||
}
|
||||
case "finish":
|
||||
{
|
||||
GrandBossManager.getInstance().setBossStatus(TRASKEN, DEAD);
|
||||
trasken.doDie(player);
|
||||
trasken.setIsDead(true);
|
||||
_zoneLair2.getPlayersInside().forEach(players -> players.teleToLocation(CENTER_LOCATION));
|
||||
_zoneLair2.getPlayersInside().forEach(p ->
|
||||
{
|
||||
playMovie(p, Movie.SC_EARTHWORM_ENDING);
|
||||
});
|
||||
final long respawnTime = 72 * 3600000;
|
||||
if (_collapseTask != null)
|
||||
{
|
||||
_collapseTask.cancel(true);
|
||||
_collapseTask = null;
|
||||
}
|
||||
_zoneLair.getCharactersInside().stream().filter(L2Character::isNpc).forEach(mob -> mob.deleteMe());
|
||||
_zoneLair.getCharactersInside().stream().filter(L2Object::isMonster).forEach(cha -> ((L2MonsterInstance) cha).getSpawn().stopRespawn());
|
||||
_zoneLair2.getCharactersInside().stream().filter(L2Character::isNpc).forEach(mob -> mob.deleteMe());
|
||||
_zoneLair2.getCharactersInside().stream().filter(L2Object::isMonster).forEach(cha -> ((L2MonsterInstance) cha).getSpawn().stopRespawn());
|
||||
ThreadPoolManager.schedule(() -> npc.decayMe(), 10000);
|
||||
ThreadPoolManager.schedule(new UnlockTrasken(), respawnTime);
|
||||
cancelQuestTimer("finish", npc, null);
|
||||
break;
|
||||
}
|
||||
case "spawn_rnd":
|
||||
{
|
||||
switch (npc.getId())
|
||||
{
|
||||
case TAIL_TRASKEN:
|
||||
{
|
||||
if (_statusZone == 2)
|
||||
{
|
||||
tie_trasken.doCast(SKILL_TAIL_2.getSkill());
|
||||
tie_trasken.getSpawn().stopRespawn();
|
||||
tie_trasken.decayMe();
|
||||
|
||||
final int[] spawn = Rnd_Spawn_Tail[Rnd.get(Rnd_Spawn_Tail.length)];
|
||||
if (SpawnTable.getInstance().getSpawns(TAIL_TRASKEN) == null)
|
||||
{
|
||||
ThreadPoolManager.schedule(() ->
|
||||
{
|
||||
tie_trasken = addSpawn(TAIL_TRASKEN, spawn[0], spawn[1], spawn[2], 0, false, 0, true);
|
||||
tie_trasken.setCurrentHp(hp_tail);
|
||||
}, 5000);
|
||||
}
|
||||
startQuestTimer("spawn_rnd", 30000, tie_trasken, null);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case TRASKEN:
|
||||
{
|
||||
if (_statusZone == 3)
|
||||
{
|
||||
trasken.doCast(SKILL_TRASKEN_FIRST.getSkill());
|
||||
trasken.getSpawn().stopRespawn();
|
||||
trasken.decayMe();
|
||||
|
||||
final int[] spawn1 = Rnd_Spawn_Trasken[Rnd.get(Rnd_Spawn_Trasken.length)];
|
||||
if (SpawnTable.getInstance().getSpawns(TRASKEN) == null)
|
||||
{
|
||||
ThreadPoolManager.schedule(() ->
|
||||
{
|
||||
trasken = addSpawn(TRASKEN, spawn1[0], spawn1[1], spawn1[2], 0, false, 0, true);
|
||||
trasken.doCast(SKILL_TRASKEN_UP.getSkill());
|
||||
trasken.setCurrentHp(hp_trasken);
|
||||
}, 10000);
|
||||
}
|
||||
startQuestTimer("spawn_rnd", 70000, trasken, null);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
|
||||
{
|
||||
switch (npc.getId())
|
||||
{
|
||||
case TIE:
|
||||
case BIG_TIE:
|
||||
{
|
||||
_killsTie.incrementAndGet();
|
||||
if ((_killsTie.get() == 27) && (_statusZone == 0))
|
||||
{
|
||||
_statusZone = 1;
|
||||
nextStage(_statusZone);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case TRADJAN:
|
||||
{
|
||||
_killsTradjan.incrementAndGet();
|
||||
if ((_killsTradjan.get() == 18) && (_statusZone == 1))
|
||||
{
|
||||
_statusZone = 2;
|
||||
nextStage(_statusZone);
|
||||
}
|
||||
npc.getSpawn().startRespawn();
|
||||
break;
|
||||
}
|
||||
case TAIL_TRASKEN:
|
||||
{
|
||||
_statusZone = 3;
|
||||
nextStage(_statusZone);
|
||||
break;
|
||||
}
|
||||
case HEART_ERTHWYRM:
|
||||
{
|
||||
_zoneLair.getPlayersInside().forEach(p -> p.broadcastPacket(new ExShowScreenMessage(NpcStringId.HEART_OF_EARTH_WYRM_HAS_BEEN_DESTROYED, 5, 4000, true)));
|
||||
_zoneLair2.getPlayersInside().forEach(p -> p.broadcastPacket(new ExShowScreenMessage(NpcStringId.HEART_OF_EARTH_WYRM_HAS_BEEN_DESTROYED, 5, 4000, true)));
|
||||
cancelQuestTimer("spawn_rnd", trasken, null);
|
||||
startQuestTimer("finish", 5000, npc, killer);
|
||||
break;
|
||||
}
|
||||
case LAVRA_1:
|
||||
case LAVRA_2:
|
||||
case LAVRA_3:
|
||||
{
|
||||
npc.getSpawn().startRespawn();
|
||||
break;
|
||||
}
|
||||
case VICTIM_EARTWORMS_1:
|
||||
case VICTIM_EARTWORMS_2:
|
||||
case VICTIM_EARTWORMS_3:
|
||||
{
|
||||
npc.getSpawn().startRespawn();
|
||||
break;
|
||||
}
|
||||
case DIGISTIVE:
|
||||
{
|
||||
npc.getSpawn().startRespawn();
|
||||
break;
|
||||
}
|
||||
}
|
||||
return super.onKill(npc, killer, isSummon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onEnterZone(final L2Character character, final L2ZoneType zone)
|
||||
{
|
||||
if ((zone.getId() == ZONE_ID) && character.isPlayer())
|
||||
{
|
||||
for (int info : eventTriggers)
|
||||
{
|
||||
character.broadcastPacket(new OnEventTrigger(info, true));
|
||||
}
|
||||
|
||||
if (_collapseTask != null)
|
||||
{
|
||||
_collapseTask.cancel(true);
|
||||
_collapseTask = null;
|
||||
}
|
||||
_statusZone = 0;
|
||||
nextStage(_statusZone);
|
||||
}
|
||||
|
||||
if ((zone.getId() == ZONE_ID_HEART) && character.isPlayer())
|
||||
{
|
||||
_zoneLair2.movePlayersTo(HEART_LOCATION);
|
||||
if (_collapseTask != null)
|
||||
{
|
||||
_collapseTask.cancel(true);
|
||||
_collapseTask = null;
|
||||
}
|
||||
final int time = 540000;
|
||||
zone.getPlayersInside().forEach(temp -> temp.sendPacket(new ExSendUIEvent(temp, false, false, 540, 0, NpcStringId.REMAINING_TIME)));
|
||||
_collapseTask = ThreadPoolManager.schedule(() -> Fail(true), time);
|
||||
}
|
||||
return super.onEnterZone(character, zone);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onExitZone(final L2Character character, final L2ZoneType zone)
|
||||
{
|
||||
if ((zone.getId() == ZONE_ID_HEART) && zone.getPlayersInside().isEmpty())
|
||||
{
|
||||
_collapseTask = ThreadPoolManager.schedule(() ->
|
||||
{
|
||||
Fail(true);
|
||||
for (int info : eventTriggers)
|
||||
{
|
||||
character.broadcastPacket(new OnEventTrigger(info, false));
|
||||
}
|
||||
}, 900000);
|
||||
}
|
||||
return super.onExitZone(character, zone);
|
||||
}
|
||||
|
||||
private void nextStage(int taskId)
|
||||
{
|
||||
switch (taskId)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
for (Location loc : Spawn_Tie)
|
||||
{
|
||||
addSpawn(TIE, loc, false, 0, true);
|
||||
}
|
||||
|
||||
for (Location loc : Spawn_Big_Tie)
|
||||
{
|
||||
addSpawn(BIG_TIE, loc, false, 0, true);
|
||||
}
|
||||
|
||||
addSpawn(HEART_ERTHWYRM, Spawn_Heart, false, 0, true);
|
||||
|
||||
for (Location loc : Spawn_Victim_1)
|
||||
{
|
||||
addSpawn(VICTIM_EARTWORMS_1, loc, false, 0, true);
|
||||
}
|
||||
|
||||
for (Location loc : Spawn_Victim_2)
|
||||
{
|
||||
addSpawn(VICTIM_EARTWORMS_2, loc, false, 0, true);
|
||||
}
|
||||
|
||||
for (Location loc : Spawn_Victim_3)
|
||||
{
|
||||
addSpawn(VICTIM_EARTWORMS_3, loc, false, 0, true);
|
||||
}
|
||||
|
||||
for (Location loc : Spawn_Digestive)
|
||||
{
|
||||
addSpawn(DIGISTIVE, loc, false, 0, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
for (Location loc : Spawn_Tradjan)
|
||||
{
|
||||
addSpawn(TRADJAN, loc, false, 0, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
tie_trasken = addSpawn(TAIL_TRASKEN, CENTER_LOCATION, false, 0, true);
|
||||
hp_tail = tie_trasken.getCurrentHp();
|
||||
startQuestTimer("spawn_rnd", 30000, tie_trasken, null);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
cancelQuestTimer("spawn_rnd", tie_trasken, null);
|
||||
|
||||
trasken = addSpawn(TRASKEN, CENTER_LOCATION, false, 0, true);
|
||||
trasken.doCast(SKILL_TRASKEN_UP.getSkill());
|
||||
hp_trasken = trasken.getCurrentHp();
|
||||
|
||||
startQuestTimer("spawn_rnd", 70000, trasken, null);
|
||||
for (Location loc : Spawn_Larva_1)
|
||||
{
|
||||
addSpawn(LAVRA_1, loc, false, 0, true);
|
||||
}
|
||||
|
||||
for (Location loc : Spawn_Larva_2)
|
||||
{
|
||||
addSpawn(LAVRA_2, loc, false, 0, true);
|
||||
}
|
||||
|
||||
for (Location loc : Spawn_Larva_3)
|
||||
{
|
||||
addSpawn(LAVRA_3, loc, false, 0, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void TraskenStay(L2Character character)
|
||||
{
|
||||
character.broadcastPacket(new ExShowScreenMessage(NpcStringId.THE_EARTH_WYRM_HAS_LOST_CONSCIOUSNESS, 5, 4600, true));
|
||||
character.doCast(SKILL_TRASKEN_BUFF.getSkill()); // 12 sec combo
|
||||
if (playersToEnter == _zoneLair2.getPlayersInside().size())
|
||||
{
|
||||
final BuffInfo traskenBuff = character.getEffectList().getBuffInfoBySkillId(SKILL_TRASKEN_BUFF.getSkillId());
|
||||
if (traskenBuff != null)
|
||||
{
|
||||
character.getEffectList().remove(true, traskenBuff, null);
|
||||
}
|
||||
}
|
||||
ThreadPoolManager.schedule(() ->
|
||||
{
|
||||
character.broadcastPacket(new ExShowScreenMessage(NpcStringId.YOU_VE_EXCEEDED_THE_MAXIMUM_NUMBER_OF_PERSONNEL, 5, 24000, true));
|
||||
character.doCast(SKILL_TRASKEN_SLEEP.getSkill());
|
||||
}, 4050);
|
||||
}
|
||||
|
||||
public boolean getTimeUnlock()
|
||||
{
|
||||
Calendar cal = Calendar.getInstance();
|
||||
if ((cal.get(Calendar.WEEK_OF_MONTH) == 1) || (cal.get(Calendar.WEEK_OF_MONTH) == 3))
|
||||
{
|
||||
switch (cal.get(Calendar.DAY_OF_WEEK))
|
||||
{
|
||||
case Calendar.FRIDAY:
|
||||
case Calendar.SATURDAY:
|
||||
case Calendar.SUNDAY:
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private class UnlockTrasken implements Runnable
|
||||
{
|
||||
public UnlockTrasken()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
GrandBossManager.getInstance().setBossStatus(TRASKEN, ALIVE);
|
||||
Broadcast.toAllOnlinePlayers(new Earthquake(CENTER_LOCATION.getX(), CENTER_LOCATION.getY(), CENTER_LOCATION.getZ(), CENTER_LOCATION.getHeading(), 10));
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new Trasken();
|
||||
}
|
||||
}
|
59
L2J_Mobius_2.5_Underground/dist/game/data/spawns/Schuttgart/EarthWyrmCave.xml
vendored
Normal file
59
L2J_Mobius_2.5_Underground/dist/game/data/spawns/Schuttgart/EarthWyrmCave.xml
vendored
Normal file
@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/spawns.xsd">
|
||||
<spawn name="EarthWyrmCave">
|
||||
<group>
|
||||
<!-- Belenora -->
|
||||
<npc id="33506" x="75254" y="-182400" z="-9888" heading="40960" />
|
||||
<!-- Dark Elf Soldier -->
|
||||
<npc id="33507" x="75210" y="-182546" z="-9896" heading="8192" />
|
||||
<npc id="33507" x="76280" y="-182298" z="-9888" heading="0" />
|
||||
<npc id="33507" x="75106" y="-182365" z="-9888" heading="8192" />
|
||||
<npc id="33507" x="75067" y="-182406" z="-9888" heading="8192" />
|
||||
<npc id="33507" x="75150" y="-182417" z="-9896" heading="8192" />
|
||||
<npc id="33507" x="75249" y="-182497" z="-9896" heading="8192" />
|
||||
<npc id="33507" x="75227" y="-182626" z="-9899" heading="8192" />
|
||||
<npc id="33507" x="75292" y="-182532" z="-9896" heading="8192" />
|
||||
<npc id="33507" x="75177" y="-182587" z="-9888" heading="8192" />
|
||||
<npc id="33507" x="75119" y="-182461" z="-9888" heading="8192" />
|
||||
<npc id="33507" x="75166" y="-182505" z="-9888" heading="8192" />
|
||||
<npc id="33507" x="76333" y="-182254" z="-9888" heading="0" />
|
||||
<npc id="33507" x="75259" y="-182579" z="-9896" heading="8192" />
|
||||
<npc id="33507" x="75199" y="-182458" z="-9896" heading="8192" />
|
||||
<npc id="33507" x="75133" y="-182552" z="-9864" heading="8192" />
|
||||
<npc id="33507" x="75032" y="-182453" z="-9888" heading="8192" />
|
||||
<!-- Alejandro -->
|
||||
<npc id="33502" x="75179" y="-182148" z="-9888" heading="32768" />
|
||||
<!-- Dwarf Soldier -->
|
||||
<npc id="33503" x="75067" y="-182208" z="-9896" heading="0" />
|
||||
<npc id="33503" x="75015" y="-182211" z="-9896" heading="0" />
|
||||
<npc id="33503" x="75067" y="-182148" z="-9896" heading="0" />
|
||||
<npc id="33503" x="75012" y="-182148" z="-9896" heading="0" />
|
||||
<npc id="33503" x="74955" y="-182145" z="-9896" heading="0" />
|
||||
<npc id="33503" x="74952" y="-182082" z="-9896" heading="0" />
|
||||
<npc id="33503" x="75015" y="-182082" z="-9896" heading="0" />
|
||||
<npc id="33503" x="74952" y="-182211" z="-9896" heading="0" />
|
||||
<npc id="33503" x="74949" y="-182019" z="-9880" heading="0" />
|
||||
<npc id="33503" x="75015" y="-182019" z="-9896" heading="0" />
|
||||
<npc id="33503" x="74952" y="-182269" z="-9896" heading="0" />
|
||||
<npc id="33503" x="75015" y="-182272" z="-9896" heading="0" />
|
||||
<npc id="33503" x="75067" y="-182272" z="-9896" heading="0" />
|
||||
<npc id="33503" x="75067" y="-182022" z="-9896" heading="0" />
|
||||
<npc id="33503" x="76277" y="-181919" z="-9896" heading="0" />
|
||||
<npc id="33503" x="76342" y="-181971" z="-9896" heading="0" />
|
||||
<npc id="33503" x="75067" y="-182085" z="-9896" heading="0" />
|
||||
<!-- Teleport Device -->
|
||||
<npc id="33513" x="75179" y="-181893" z="-9896" heading="0" />
|
||||
<!-- Wooden Medic -->
|
||||
<npc id="33505" x="75372" y="-181770" z="-9888" heading="24576" />
|
||||
<!-- Dwarf Soldier -->
|
||||
<npc id="33504" x="75372" y="-181644" z="-9888" heading="45056" />
|
||||
<npc id="33504" x="75459" y="-181612" z="-9896" heading="16384" />
|
||||
<npc id="33504" x="75287" y="-181685" z="-9896" heading="32768" />
|
||||
<npc id="33504" x="75205" y="-181755" z="-9888" heading="0" />
|
||||
<!-- Fernando -->
|
||||
<!--
|
||||
<npc id="33160" x="77154" y="-182196" z="-9888" heading="30708" />
|
||||
-->
|
||||
</group>
|
||||
</spawn>
|
||||
</list>
|
@ -4440,8 +4440,7 @@
|
||||
<height normal="135" />
|
||||
</collision>
|
||||
</npc>
|
||||
<npc id="29197" level="99" type="L2RaidBoss" name="Earth Wyrm Trasken" title="Hell's Gate">
|
||||
<!-- AUTO GENERATED NPC TODO: FIX IT -->
|
||||
<npc id="29197" level="99" type="L2GrandBoss" name="Earth Wyrm Trasken" title="Hell's Gate">
|
||||
<parameters>
|
||||
<skill name="skill01" id="14335" level="1" />
|
||||
<skill name="skill03" id="14336" level="1" />
|
||||
|
@ -181,4 +181,10 @@
|
||||
<node X="49357" Y="-28620" />
|
||||
<node X="47553" Y="-29161" />
|
||||
</zone>
|
||||
<zone name="Trasken_Zone" id="12108" type="NoSummonFriendZone" shape="Cylinder" minZ="-16000" maxZ="16000" rad="8000" >
|
||||
<node X="81955" Y="-181606" />
|
||||
</zone>
|
||||
<zone name="Heart_Trasken_Zone" id="12109" type="NoSummonFriendZone" shape="Cylinder" minZ="-16000" maxZ="16000" rad="2500" >
|
||||
<node X="88110" Y="-173795" />
|
||||
</zone>
|
||||
</list>
|
@ -20,6 +20,7 @@ INSERT IGNORE INTO `grandboss_data` (`boss_id`,`loc_x`,`loc_y`,`loc_z`,`heading`
|
||||
(29068, 185708, 114298, -8221,32768, 62802301, 1998000), -- Antharas
|
||||
(29028, -105200, -253104, -15264, 0, 62041918, 2248572), -- Valakas
|
||||
(29240, 0, 0, 0, 0, 288282589, 47100), -- Lindvior
|
||||
(29197, 81208, -182095, -9895, 0, 512402016, 47100), -- Trasken
|
||||
(29118, 0, 0, 0, 0, 4109288, 1220547), -- Beleth
|
||||
(25286, 185080, -12613, -5499, 16550, 556345880, 86847), -- Anakim
|
||||
(25283, 185062, -9605, -5499, 15640, 486021997, 79600), -- Lilith
|
||||
|
@ -1,4 +0,0 @@
|
||||
<html><body>Head Priest of the Earth Daichir:<br>
|
||||
Before you go, make sure that everyone in your party is ready. No one needs more food, a tissue, to clear out their saddle bag... no one has to use the bathroom?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest EarthWyrmCave enterInstance">"Our preparations are complete. Let us in!"</Button>
|
||||
</body></html>
|
@ -3,6 +3,6 @@
|
||||
Although we are unfortunate to be suffering, do not pity yourself. All is meant. All will be remedied.<br>
|
||||
The Goddess of the Earth is always beside you. We must repay her for the kindness she allows us.<br>
|
||||
If you want the blessing of goddess to be always with you, remember my words! <font color="LEVEL">"Karna Maphra!"</font><br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Chat 1">"What of Trasken?"</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Trasken enterZone">"What of Trasken?"</Button>
|
||||
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
|
||||
</body></html>
|
@ -1,4 +1,4 @@
|
||||
<html><body>Teleport Device:<br>
|
||||
This is a teleport device made to move to the ground.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest EarthWyrmCave exitInstance">Go up to the town.</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Trasken exitZone">Go up to the town.</Button>
|
||||
</body></html>
|
@ -1,167 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Earth Wyrm Cave -->
|
||||
<!-- TODO: Find proper instance id. (138?) -->
|
||||
<instance id="192" maxWorlds="50" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/instance.xsd">
|
||||
<time duration="120" empty="10" />
|
||||
<locations>
|
||||
<enter type="FIXED">
|
||||
<location x="75445" y="-182112" z="-9880" />
|
||||
</enter>
|
||||
<exit type="ORIGIN" />
|
||||
</locations>
|
||||
<conditions>
|
||||
<condition type="Party" />
|
||||
<condition type="PartyLeader" />
|
||||
<condition type="GroupMin">
|
||||
<param name="limit" value="5" />
|
||||
</condition>
|
||||
<condition type="GroupMax">
|
||||
<param name="limit" value="7" />
|
||||
</condition>
|
||||
<condition type="Level">
|
||||
<param name="min" value="85" />
|
||||
</condition>
|
||||
<condition type="Distance" />
|
||||
<condition type="Reenter" />
|
||||
</conditions>
|
||||
<reenter apply="ON_FINISH">
|
||||
<reset day="MONDAY" hour="6" minute="30" />
|
||||
<reset day="TUESDAY" hour="6" minute="30" />
|
||||
<reset day="WEDNESDAY" hour="6" minute="30" />
|
||||
<reset day="THURSDAY" hour="6" minute="30" />
|
||||
<reset day="FRIDAY" hour="6" minute="30" />
|
||||
<reset day="SATURDAY" hour="6" minute="30" />
|
||||
<reset day="SUNDAY" hour="6" minute="30" />
|
||||
</reenter>
|
||||
<doorlist>
|
||||
<door id="22120001" />
|
||||
</doorlist>
|
||||
<spawnlist>
|
||||
<group>
|
||||
<!-- Belenora -->
|
||||
<npc id="33506" x="75254" y="-182400" z="-9888" heading="40960" />
|
||||
<!-- Dark Elf Soldier -->
|
||||
<npc id="33507" x="75210" y="-182546" z="-9896" heading="8192" />
|
||||
<npc id="33507" x="76280" y="-182298" z="-9888" heading="0" />
|
||||
<npc id="33507" x="75106" y="-182365" z="-9888" heading="8192" />
|
||||
<npc id="33507" x="75067" y="-182406" z="-9888" heading="8192" />
|
||||
<npc id="33507" x="75150" y="-182417" z="-9896" heading="8192" />
|
||||
<npc id="33507" x="75249" y="-182497" z="-9896" heading="8192" />
|
||||
<npc id="33507" x="75227" y="-182626" z="-9899" heading="8192" />
|
||||
<npc id="33507" x="75292" y="-182532" z="-9896" heading="8192" />
|
||||
<npc id="33507" x="75177" y="-182587" z="-9888" heading="8192" />
|
||||
<npc id="33507" x="75119" y="-182461" z="-9888" heading="8192" />
|
||||
<npc id="33507" x="75166" y="-182505" z="-9888" heading="8192" />
|
||||
<npc id="33507" x="76333" y="-182254" z="-9888" heading="0" />
|
||||
<npc id="33507" x="75259" y="-182579" z="-9896" heading="8192" />
|
||||
<npc id="33507" x="75199" y="-182458" z="-9896" heading="8192" />
|
||||
<npc id="33507" x="75133" y="-182552" z="-9864" heading="8192" />
|
||||
<npc id="33507" x="75032" y="-182453" z="-9888" heading="8192" />
|
||||
<!-- Alejandro -->
|
||||
<npc id="33502" x="75179" y="-182148" z="-9888" heading="32768" />
|
||||
<!-- Dwarf Soldier -->
|
||||
<npc id="33503" x="75067" y="-182208" z="-9896" heading="0" />
|
||||
<npc id="33503" x="75015" y="-182211" z="-9896" heading="0" />
|
||||
<npc id="33503" x="75067" y="-182148" z="-9896" heading="0" />
|
||||
<npc id="33503" x="75012" y="-182148" z="-9896" heading="0" />
|
||||
<npc id="33503" x="74955" y="-182145" z="-9896" heading="0" />
|
||||
<npc id="33503" x="74952" y="-182082" z="-9896" heading="0" />
|
||||
<npc id="33503" x="75015" y="-182082" z="-9896" heading="0" />
|
||||
<npc id="33503" x="74952" y="-182211" z="-9896" heading="0" />
|
||||
<npc id="33503" x="74949" y="-182019" z="-9880" heading="0" />
|
||||
<npc id="33503" x="75015" y="-182019" z="-9896" heading="0" />
|
||||
<npc id="33503" x="74952" y="-182269" z="-9896" heading="0" />
|
||||
<npc id="33503" x="75015" y="-182272" z="-9896" heading="0" />
|
||||
<npc id="33503" x="75067" y="-182272" z="-9896" heading="0" />
|
||||
<npc id="33503" x="75067" y="-182022" z="-9896" heading="0" />
|
||||
<npc id="33503" x="76277" y="-181919" z="-9896" heading="0" />
|
||||
<npc id="33503" x="76342" y="-181971" z="-9896" heading="0" />
|
||||
<npc id="33503" x="75067" y="-182085" z="-9896" heading="0" />
|
||||
<!-- Teleport Device -->
|
||||
<npc id="33513" x="75179" y="-181893" z="-9896" heading="0" />
|
||||
<!-- Wooden Medic -->
|
||||
<npc id="33505" x="75372" y="-181770" z="-9888" heading="24576" />
|
||||
<!-- Dwarf Soldier -->
|
||||
<npc id="33504" x="75372" y="-181644" z="-9888" heading="45056" />
|
||||
<npc id="33504" x="75459" y="-181612" z="-9896" heading="16384" />
|
||||
<npc id="33504" x="75287" y="-181685" z="-9896" heading="32768" />
|
||||
<npc id="33504" x="75205" y="-181755" z="-9888" heading="0" />
|
||||
<!-- Fernando -->
|
||||
<!--
|
||||
<npc id="33160" x="77154" y="-182196" z="-9888" heading="30708" />
|
||||
-->
|
||||
<!-- Tentacle -->
|
||||
<npc id="29198" x="79526" y="-181507" z="-9896" heading="42749" />
|
||||
<npc id="29198" x="80432" y="-180356" z="-9896" heading="19795" />
|
||||
<npc id="29198" x="80432" y="-180850" z="-9896" heading="44991" />
|
||||
<npc id="29198" x="80432" y="-184308" z="-9896" heading="37585" />
|
||||
<npc id="29198" x="80783" y="-180092" z="-9896" heading="12194" />
|
||||
<npc id="29198" x="80168" y="-183593" z="-9896" heading="26626" />
|
||||
<npc id="29198" x="80872" y="-180246" z="-9888" heading="10554" />
|
||||
<npc id="29198" x="81443" y="-182945" z="-9872" heading="46798" />
|
||||
<npc id="29198" x="81273" y="-183674" z="-9896" heading="2271" />
|
||||
<npc id="29198" x="81358" y="-184079" z="-9896" heading="5310" />
|
||||
<npc id="29198" x="81273" y="-183026" z="-9872" heading="18796" />
|
||||
<npc id="29198" x="79938" y="-181744" z="-9896" heading="38441" />
|
||||
<npc id="29198" x="81139" y="-180477" z="-9872" heading="55592" />
|
||||
<npc id="29198" x="81495" y="-181016" z="-9872" heading="3517" />
|
||||
<npc id="29198" x="80872" y="-181170" z="-9896" heading="2987" />
|
||||
<npc id="29198" x="80961" y="-180015" z="-9888" heading="48027" />
|
||||
<npc id="29198" x="82315" y="-182058" z="-9896" heading="29777" />
|
||||
<npc id="29198" x="82564" y="-181977" z="-9896" heading="57134" />
|
||||
<npc id="29198" x="81940" y="-180939" z="-9880" heading="42939" />
|
||||
<npc id="29198" x="82066" y="-182058" z="-9896" heading="38882" />
|
||||
<npc id="29198" x="82790" y="-183073" z="-9888" heading="41801" />
|
||||
<npc id="29198" x="80763" y="-183512" z="-9888" heading="63581" />
|
||||
<!-- Tentacle -->
|
||||
<npc id="29205" x="79423" y="-182218" z="-9896" heading="35179" />
|
||||
<npc id="29205" x="80783" y="-180246" z="-9896" heading="34912" />
|
||||
<npc id="29205" x="80170" y="-180356" z="-9896" heading="21512" />
|
||||
<npc id="29205" x="80423" y="-183674" z="-9872" heading="25477" />
|
||||
<npc id="29205" x="80144" y="-181823" z="-9896" heading="34942" />
|
||||
<npc id="29205" x="80432" y="-179862" z="-9896" heading="47116" />
|
||||
<npc id="29205" x="80516" y="-180862" z="-9896" heading="43485" />
|
||||
<npc id="29205" x="81742" y="-184061" z="-9896" heading="23309" />
|
||||
<npc id="29205" x="81103" y="-184079" z="-9896" heading="41642" />
|
||||
<npc id="29205" x="81273" y="-183917" z="-9896" heading="38136" />
|
||||
<npc id="29205" x="81900" y="-182382" z="-9896" heading="44739" />
|
||||
<npc id="29205" x="81050" y="-180554" z="-9888" heading="51101" />
|
||||
<npc id="29205" x="81900" y="-181977" z="-9896" heading="1962" />
|
||||
<npc id="29205" x="80783" y="-180862" z="-9896" heading="39953" />
|
||||
<npc id="29205" x="81443" y="-183836" z="-9896" heading="25283" />
|
||||
<npc id="29205" x="82564" y="-182625" z="-9896" heading="15729" />
|
||||
<npc id="29205" x="82896" y="-181653" z="-9896" heading="13615" />
|
||||
<npc id="29205" x="82813" y="-182706" z="-9896" heading="12202" />
|
||||
<npc id="29205" x="82813" y="-181491" z="-9896" heading="17260" />
|
||||
<npc id="29205" x="83228" y="-181653" z="-9896" heading="19761" />
|
||||
<npc id="29205" x="83228" y="-182139" z="-9896" heading="40650" />
|
||||
<npc id="29205" x="79938" y="-182534" z="-9872" heading="26203" />
|
||||
<npc id="29205" x="83062" y="-181977" z="-9896" heading="23729" />
|
||||
<npc id="29205" x="81406" y="-180631" z="-9888" heading="1241" />
|
||||
<!-- Earth Wyrm Topography 1 -->
|
||||
<!--
|
||||
<npc id="19025" x="81184" y="-182093" z="-9888" heading="49151" />
|
||||
-->
|
||||
<!-- Earth Wyrm Topography 2 -->
|
||||
<!--
|
||||
<npc id="19026" x="81184" y="-182099" z="-9888" heading="49151" />
|
||||
-->
|
||||
<!-- Earth Wyrm Topography 3 -->
|
||||
<!--
|
||||
<npc id="19027" x="81184" y="-182099" z="-9888" heading="49151" />
|
||||
-->
|
||||
<!-- Earth Wyrm Topography 4 -->
|
||||
<!--
|
||||
<npc id="19028" x="81184" y="-182099" z="-9888" heading="49151" />
|
||||
-->
|
||||
<!-- Stomach Gland -->
|
||||
<!--
|
||||
<npc id="29206" x="87919" y="-173954" z="-15980" heading="26284" />
|
||||
<npc id="29206" x="88117" y="-173391" z="-15980" heading="4393" />
|
||||
<npc id="29206" x="88636" y="-173489" z="-15980" heading="61965" />
|
||||
<npc id="29206" x="88768" y="-173759" z="-15980" heading="65268" />
|
||||
<npc id="29206" x="87795" y="-173762" z="-15980" heading="33501" />
|
||||
-->
|
||||
</group>
|
||||
</spawnlist>
|
||||
</instance>
|
@ -1,147 +0,0 @@
|
||||
/*
|
||||
* 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.bosses.Trasken;
|
||||
|
||||
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 com.l2jmobius.gameserver.network.NpcStringId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
|
||||
|
||||
import instances.AbstractInstance;
|
||||
|
||||
/**
|
||||
* Earth Wyrm Cave instance zone. (simple implementation)
|
||||
* @Video http://www.youtube.com/watch?v=0Vyu7GJvuBo
|
||||
* @author Mobius
|
||||
*/
|
||||
public final class EarthWyrmCave extends AbstractInstance
|
||||
{
|
||||
// NPCs
|
||||
private static final int DAICHIR = 30537;
|
||||
private static final int TRASKEN = 29197;
|
||||
// Location
|
||||
private static final Location TRASKEN_SPAWN_LOC = new Location(82383, -183527, -9892, 26533);
|
||||
// Door
|
||||
private static final int DOOR_ID = 22120001;
|
||||
// Misc
|
||||
private static final int OPEN_DOOR = 5; // minutes
|
||||
private static final int TEMPLATE_ID = 192;
|
||||
|
||||
public EarthWyrmCave()
|
||||
{
|
||||
super(TEMPLATE_ID);
|
||||
addStartNpc(DAICHIR);
|
||||
addTalkId(DAICHIR);
|
||||
addKillId(TRASKEN);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
switch (event)
|
||||
{
|
||||
case "enterInstance":
|
||||
{
|
||||
enterInstance(player, npc, TEMPLATE_ID);
|
||||
startQuestTimer("OPEN_DOOR", OPEN_DOOR * 60 * 1000, null, player);
|
||||
break;
|
||||
}
|
||||
case "exitInstance":
|
||||
{
|
||||
if (player.getInstanceId() == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
player.getInstanceWorld().ejectPlayer(player);
|
||||
break;
|
||||
}
|
||||
case "OPEN_DOOR":
|
||||
{
|
||||
if ((player == null) || (player.getInstanceId() == 0))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
final Instance world = player.getInstanceWorld();
|
||||
world.openCloseDoor(DOOR_ID, true);
|
||||
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.ELIMINATE_THOSE_WHO_PROTECT_THE_HEART_OF_THE_EARTH_WYRM, ExShowScreenMessage.TOP_CENTER, 7000));
|
||||
startQuestTimer("CLOSE_DOOR", 60000, null, player); // close door after a minute
|
||||
startQuestTimer("WAIT_TO_CLEAR_MONSTERS", 5000, null, player);
|
||||
break;
|
||||
}
|
||||
case "CLOSE_DOOR":
|
||||
{
|
||||
if ((player == null) || (player.getInstanceId() == 0))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
final Instance world = player.getInstanceWorld();
|
||||
world.openCloseDoor(DOOR_ID, false);
|
||||
break;
|
||||
}
|
||||
case "WAIT_TO_CLEAR_MONSTERS":
|
||||
{
|
||||
if ((player == null) || (player.getInstanceId() == 0))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
final Instance world = player.getInstanceWorld();
|
||||
if (world.getAliveNpcs(L2MonsterInstance.class).isEmpty())
|
||||
{
|
||||
addSpawn(TRASKEN, TRASKEN_SPAWN_LOC, false, 0, false, player.getInstanceId());
|
||||
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.FIND_THE_EARTH_WYRM_S_WEAKNESS_TO_DEFEAT_IT, ExShowScreenMessage.TOP_CENTER, 5000));
|
||||
}
|
||||
else
|
||||
{
|
||||
startQuestTimer("WAIT_TO_CLEAR_MONSTERS", 5000, null, player);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
|
||||
{
|
||||
final Instance instance = npc.getInstanceWorld();
|
||||
if (isInInstance(instance))
|
||||
{
|
||||
switch (npc.getId())
|
||||
{
|
||||
case TRASKEN:
|
||||
{
|
||||
npc.deleteMe();
|
||||
instance.broadcastPacket(new ExShowScreenMessage(NpcStringId.HEART_OF_EARTH_WYRM_HAS_BEEN_DESTROYED, ExShowScreenMessage.TOP_CENTER, 5000));
|
||||
playMovie(instance.getPlayers(), Movie.SC_EARTHWORM_ENDING);
|
||||
instance.openCloseDoor(DOOR_ID, true);
|
||||
instance.finishInstance();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return super.onKill(npc, killer, isSummon);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new EarthWyrmCave();
|
||||
}
|
||||
}
|
923
L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/bosses/Trasken/Trasken.java
vendored
Normal file
923
L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/bosses/Trasken/Trasken.java
vendored
Normal file
@ -0,0 +1,923 @@
|
||||
/*
|
||||
* 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.bosses.Trasken;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import com.l2jmobius.commons.util.Rnd;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.DoorData;
|
||||
import com.l2jmobius.gameserver.datatables.SpawnTable;
|
||||
import com.l2jmobius.gameserver.enums.Movie;
|
||||
import com.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
import com.l2jmobius.gameserver.model.L2World;
|
||||
import com.l2jmobius.gameserver.model.Location;
|
||||
import com.l2jmobius.gameserver.model.StatsSet;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Playable;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2MonsterInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.holders.SkillHolder;
|
||||
import com.l2jmobius.gameserver.model.skills.BuffInfo;
|
||||
import com.l2jmobius.gameserver.model.zone.L2ZoneType;
|
||||
import com.l2jmobius.gameserver.model.zone.type.L2NoSummonFriendZone;
|
||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.Earthquake;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ExSendUIEvent;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.OnEventTrigger;
|
||||
import com.l2jmobius.gameserver.util.Broadcast;
|
||||
|
||||
import ai.AbstractNpcAI;
|
||||
|
||||
/**
|
||||
* Trasken RB
|
||||
* @author Gigi
|
||||
* @date 2017-07-27 - [10:11:22]
|
||||
*/
|
||||
public class Trasken extends AbstractNpcAI
|
||||
{
|
||||
// NPCs
|
||||
private static final int TRASKEN = 29197;
|
||||
private static final int TAIL_TRASKEN = 29200;
|
||||
private static final int TIE = 29205;
|
||||
private static final int BIG_TIE = 29199;
|
||||
private static final int VICTIM_EARTWORMS_1 = 29201;
|
||||
private static final int VICTIM_EARTWORMS_2 = 29202;
|
||||
private static final int VICTIM_EARTWORMS_3 = 29203;
|
||||
private static final int LAVRA_1 = 29204;
|
||||
private static final int LAVRA_2 = 29207;
|
||||
private static final int LAVRA_3 = 29208;
|
||||
private static final int DIGISTIVE = 29206;
|
||||
private static final int TRADJAN = 19160;
|
||||
private static final int HEART_ERTHWYRM = 19081;
|
||||
// Zone
|
||||
private static final int ZONE_ID = 12108;
|
||||
private static final int ZONE_ID_HEART = 12109;
|
||||
private final int[] eventTriggers = new int[]
|
||||
{
|
||||
22120840,
|
||||
22120842,
|
||||
22120844,
|
||||
22120846
|
||||
};
|
||||
private static final int DOOR = 22120001;
|
||||
private static final Location ENTER_LOCATION = new Location(75445, -182112, -9880);
|
||||
private static final Location EXIT_LOCATION = new Location(87679, -141982, -1341);
|
||||
static final Location CENTER_LOCATION = new Location(81208, -182095, -9895);
|
||||
static final Location HEART_LOCATION = new Location(81208, -182095, -9895);
|
||||
// Skill
|
||||
private static final SkillHolder SKILL_TAIL = new SkillHolder(14342, 1);
|
||||
private static final SkillHolder SKILL_TAIL_2 = new SkillHolder(14343, 1);
|
||||
private static final SkillHolder SKILL_TRASKEN_FIRST = new SkillHolder(14336, 1);
|
||||
private static final SkillHolder SKILL_TRASKEN_BUFF = new SkillHolder(14341, 1);
|
||||
private static final SkillHolder SKILL_TRASKEN_SLEEP = new SkillHolder(14504, 1); // 24 sec
|
||||
private static final SkillHolder SKILL_TRASKEN_UP = new SkillHolder(14505, 1);
|
||||
private static final SkillHolder SKILL_TIE_ROOT = new SkillHolder(14332, 1);
|
||||
private static final SkillHolder SKILL_TIE_CHAIN = new SkillHolder(14333, 1);
|
||||
private static final SkillHolder SKILL_1 = new SkillHolder(14334, 1); // Poison Puddle
|
||||
private static final SkillHolder SKILL_2 = new SkillHolder(14337, 1); // Earth Wyrm Body Strike
|
||||
private static final SkillHolder SKILL_3 = new SkillHolder(14338, 1); // Earth Wyrm Body Strike
|
||||
private static final SkillHolder SKILL_4 = new SkillHolder(14339, 1); // Earth Wyrm Body Strike
|
||||
private static final SkillHolder SKILL_5 = new SkillHolder(14340, 1); // Earth Wyrm Poison Cannon
|
||||
// Status
|
||||
private static final int ALIVE = 0;
|
||||
private static final int DEAD = 3;
|
||||
// Others
|
||||
protected double hp_tail;
|
||||
protected double hp_trasken;
|
||||
private static L2Npc tie_trasken;
|
||||
private static L2Npc trasken;
|
||||
private static L2NoSummonFriendZone _zoneLair;
|
||||
private static L2NoSummonFriendZone _zoneLair2;
|
||||
private int playersToEnter;
|
||||
protected int _statusZone = 0;
|
||||
protected ScheduledFuture<?> _collapseTask;
|
||||
protected AtomicInteger _killsTie = new AtomicInteger(0);
|
||||
protected AtomicInteger _killsTradjan = new AtomicInteger(0);
|
||||
// Spawns
|
||||
private static final Location Spawn_Heart = new Location(88292, -173758, -15965);
|
||||
private static final Location[] Spawn_Tie = new Location[]
|
||||
{
|
||||
new Location(79075, -180963, -9897, 4527),
|
||||
new Location(81047, -182282, -9897, 33582),
|
||||
new Location(79942, -179851, -9897, 40574),
|
||||
new Location(81931, -180069, -9897, 2849),
|
||||
new Location(80864, -184281, -9897, 46457),
|
||||
new Location(81233, -179842, -9897, 28503),
|
||||
new Location(78735, -183107, -9897, 34160),
|
||||
new Location(80139, -180923, -9897, 34232),
|
||||
new Location(81758, -181902, -9897, 29365),
|
||||
new Location(81851, -180719, -9897, 11837),
|
||||
new Location(79181, -182178, -9897, 65110),
|
||||
new Location(83296, -182275, -9897, 4710),
|
||||
new Location(83966, -181084, -9897, 18435),
|
||||
new Location(83181, -181023, -9897, 63036),
|
||||
new Location(82263, -182977, -9897, 36550),
|
||||
new Location(80950, -182856, -9897, 27788),
|
||||
new Location(79966, -182812, -9897, 26489),
|
||||
new Location(82237, -184076, -9897, 45551),
|
||||
new Location(80868, -181154, -9897, 13967),
|
||||
new Location(80209, -184234, -9897, 27683),
|
||||
new Location(83150, -183279, -9897, 62418),
|
||||
new Location(79795, -182271, -9897, 5870)
|
||||
};
|
||||
private static final Location[] Spawn_Big_Tie = new Location[]
|
||||
{
|
||||
new Location(83235, -182070, -9897, 31663),
|
||||
new Location(83913, -183256, -9897, 4038),
|
||||
new Location(82853, -180868, -9897, 32158),
|
||||
new Location(78730, -182917, -9897, 35257),
|
||||
new Location(82175, -180300, -9897, 39388),
|
||||
new Location(79981, -181057, -9897, 14008),
|
||||
new Location(79019, -181882, -9897, 6394),
|
||||
new Location(79846, -182025, -9897, 28780),
|
||||
new Location(81224, -184186, -9897, 4064),
|
||||
new Location(80725, -181051, -9897, 34486),
|
||||
new Location(79838, -184216, -9897, 45196),
|
||||
new Location(82073, -181956, -9897, 27212),
|
||||
new Location(81920, -180981, -9897, 47056),
|
||||
new Location(80820, -183285, -9897, 31129),
|
||||
new Location(81788, -183047, -9897, 18980),
|
||||
new Location(78860, -179717, -9897, 53788),
|
||||
new Location(81105, -180268, -9897, 23643),
|
||||
new Location(83222, -184038, -9897, 13689),
|
||||
new Location(82093, -184188, -9897, 61993)
|
||||
};
|
||||
private static final Location[] Spawn_Larva_1 = new Location[]
|
||||
{
|
||||
new Location(81869, -181917, -9897, 59394),
|
||||
new Location(82831, -182837, -9897, 19463),
|
||||
new Location(79771, -184114, -9897, 15764),
|
||||
new Location(79887, -180114, -9897, 17733),
|
||||
new Location(80987, -181006, -9897, 12119),
|
||||
new Location(79065, -182890, -9897, 63705),
|
||||
new Location(78883, -183839, -9897, 5843),
|
||||
new Location(80014, -182944, -9897, 6195)
|
||||
};
|
||||
private static final Location[] Spawn_Larva_2 = new Location[]
|
||||
{
|
||||
new Location(81869, -181917, -9897, 20701),
|
||||
new Location(82831, -182837, -9897, 6257),
|
||||
new Location(79771, -184114, -9897, 28729),
|
||||
new Location(79887, -180114, -9897, 26087),
|
||||
new Location(80987, -181006, -9897, 59020),
|
||||
new Location(79065, -182890, -9897, 44820),
|
||||
new Location(78883, -183839, -9897, 23282),
|
||||
new Location(80014, -182944, -9897, 9306)
|
||||
};
|
||||
private static final Location[] Spawn_Larva_3 = new Location[]
|
||||
{
|
||||
new Location(79785, -181954, -9897, 65516),
|
||||
new Location(81727, -184036, -9897, 63858),
|
||||
new Location(81909, -181006, -9897, 12875),
|
||||
new Location(79264, -180704, -9897, 53464),
|
||||
new Location(80769, -183944, -9897, 31310),
|
||||
new Location(79886, -183771, -9897, 53311),
|
||||
new Location(78706, -183267, -9897, 862),
|
||||
new Location(81947, -182190, -9897, 43213),
|
||||
new Location(83103, -181089, -9897, 30877),
|
||||
new Location(81847, -179971, -9897, 40880),
|
||||
new Location(81908, -183298, -9897, 6597),
|
||||
new Location(79227, -181739, -9897, 63462),
|
||||
new Location(79918, -183288, -9897, 31839),
|
||||
new Location(80720, -181130, -9897, 9352),
|
||||
new Location(80166, -179956, -9897, 28989),
|
||||
new Location(81156, -179891, -9897, 9000),
|
||||
new Location(80874, -182796, -9897, 51715),
|
||||
new Location(80205, -180998, -9897, 1193),
|
||||
new Location(77961, -182792, -9897, 16867),
|
||||
new Location(83190, -184199, -9897, 57438),
|
||||
new Location(82764, -182099, -9897, 36113),
|
||||
new Location(78890, -179873, -9897, 50574),
|
||||
new Location(77805, -180767, -9897, 20522),
|
||||
new Location(82806, -180142, -9897, 46858),
|
||||
new Location(82152, -184742, -9897, 26490),
|
||||
new Location(82732, -183220, -9897, 60425),
|
||||
new Location(77975, -181902, -9897, 23116),
|
||||
new Location(81255, -182176, -9897, 53943),
|
||||
new Location(78796, -184218, -9897, 40593)
|
||||
};
|
||||
private static final Location[] Spawn_Victim_1 = new Location[]
|
||||
{
|
||||
new Location(87891, -173888, 0, 14559),
|
||||
new Location(87777, -172808, 0, 54130),
|
||||
new Location(88896, -174206, 0, 4641)
|
||||
};
|
||||
private static final Location[] Spawn_Victim_2 = new Location[]
|
||||
{
|
||||
new Location(88085, -174105, 0, 39106),
|
||||
new Location(88949, -174227, 0, 58094),
|
||||
new Location(89000, -172909, 0, 55350),
|
||||
new Location(87941, -173185, 0, 22119)
|
||||
};
|
||||
private static final Location[] Spawn_Victim_3 = new Location[]
|
||||
{
|
||||
new Location(88247, -174298, 0, 4884),
|
||||
new Location(88924, -173858, 0, 44289),
|
||||
new Location(88204, -172812, 0, 24052)
|
||||
};
|
||||
private static final Location[] Spawn_Tradjan = new Location[]
|
||||
{
|
||||
new Location(79785, -181954, -9897, 65516),
|
||||
new Location(81727, -184036, -9897, 63858),
|
||||
new Location(81909, -181006, -9897, 12875),
|
||||
new Location(79264, -180704, -9897, 53464),
|
||||
new Location(80769, -183944, -9897, 31310),
|
||||
new Location(79886, -183771, -9897, 53311),
|
||||
new Location(78706, -183267, -9897, 862),
|
||||
new Location(81947, -182190, -9897, 43213),
|
||||
new Location(83103, -181089, -9897, 30877),
|
||||
new Location(81847, -179971, -9897, 40880),
|
||||
new Location(81908, -183298, -9897, 6597),
|
||||
new Location(79227, -181739, -9897, 63462),
|
||||
new Location(79918, -183288, -9897, 31839),
|
||||
new Location(80720, -181130, -9897, 9352),
|
||||
new Location(80166, -179956, -9897, 28989),
|
||||
new Location(81156, -179891, -9897, 9000),
|
||||
new Location(80874, -182796, -9897, 51715),
|
||||
new Location(80205, -180998, -9897, 1193),
|
||||
new Location(77961, -182792, -9897, 16867),
|
||||
new Location(83190, -184199, -9897, 57438),
|
||||
new Location(82764, -182099, -9897, 36113),
|
||||
new Location(78890, -179873, -9897, 50574),
|
||||
new Location(77805, -180767, -9897, 20522),
|
||||
new Location(82806, -180142, -9897, 46858),
|
||||
new Location(82152, -184742, -9897, 26490),
|
||||
new Location(82732, -183220, -9897, 60425),
|
||||
new Location(77975, -181902, -9897, 23116),
|
||||
new Location(81255, -182176, -9897, 53943),
|
||||
new Location(78796, -184218, -9897, 40593)
|
||||
};
|
||||
private static final Location[] Spawn_Digestive = new Location[]
|
||||
{
|
||||
new Location(88114, -173387, -15980),
|
||||
new Location(88640, -173491, -15980),
|
||||
new Location(88546, -174051, -15981),
|
||||
new Location(87913, -173950, -15981)
|
||||
};
|
||||
// @formatter:off
|
||||
private static final int[][] Rnd_Spawn_Tail = new int[][]
|
||||
{
|
||||
{80966, -183780, -9896},
|
||||
{82949, -181947, -9899},
|
||||
{81688, -181059, -9895},
|
||||
{81208, -182095, -9895}
|
||||
};
|
||||
private static final int[][] Rnd_Spawn_Trasken = new int[][]
|
||||
{
|
||||
{82564, -180742, -9896},
|
||||
{82379, -183532, -9896},
|
||||
{79602, -183321, -9896},
|
||||
{79698, -180859, -9896},
|
||||
{81208, -182095, -9896}
|
||||
};
|
||||
// @formatter:on
|
||||
|
||||
public Trasken()
|
||||
{
|
||||
super();
|
||||
_zoneLair = ZoneManager.getInstance().getZoneById(ZONE_ID, L2NoSummonFriendZone.class);
|
||||
_zoneLair2 = ZoneManager.getInstance().getZoneById(ZONE_ID_HEART, L2NoSummonFriendZone.class);
|
||||
int[] creature = new int[]
|
||||
{
|
||||
TRASKEN,
|
||||
TIE,
|
||||
BIG_TIE,
|
||||
TAIL_TRASKEN,
|
||||
VICTIM_EARTWORMS_1,
|
||||
VICTIM_EARTWORMS_2,
|
||||
VICTIM_EARTWORMS_3,
|
||||
LAVRA_1,
|
||||
LAVRA_2,
|
||||
LAVRA_3,
|
||||
TRADJAN,
|
||||
HEART_ERTHWYRM
|
||||
};
|
||||
registerMobs(creature);
|
||||
addEnterZoneId(ZONE_ID);
|
||||
addExitZoneId(ZONE_ID);
|
||||
addEnterZoneId(ZONE_ID_HEART);
|
||||
addExitZoneId(ZONE_ID_HEART);
|
||||
init();
|
||||
if (DoorData.getInstance().getDoor(DOOR) != null)
|
||||
{
|
||||
DoorData.getInstance().getDoor(DOOR).openMe();
|
||||
}
|
||||
}
|
||||
|
||||
private void init()
|
||||
{
|
||||
int status = GrandBossManager.getInstance().getBossStatus(TRASKEN);
|
||||
final StatsSet info = GrandBossManager.getInstance().getStatsSet(TRASKEN);
|
||||
final Long respawnTime = info.getLong("respawn_time");
|
||||
if ((status == 3) && (respawnTime <= System.currentTimeMillis()))
|
||||
{
|
||||
GrandBossManager.getInstance().setBossStatus(TRASKEN, ALIVE);
|
||||
}
|
||||
else if (status == 3)
|
||||
{
|
||||
ThreadPoolManager.schedule(() -> GrandBossManager.getInstance().setBossStatus(TRASKEN, ALIVE), respawnTime - System.currentTimeMillis());
|
||||
}
|
||||
int size = _zoneLair.getPlayersInside().size();
|
||||
if ((size >= 14) && (size <= 28))
|
||||
{
|
||||
playersToEnter = 7;
|
||||
}
|
||||
else if ((size >= 28) && (size <= 56))
|
||||
{
|
||||
playersToEnter = 14;
|
||||
}
|
||||
else if ((size >= 56) && (size <= 102))
|
||||
{
|
||||
playersToEnter = 21;
|
||||
}
|
||||
else
|
||||
{
|
||||
playersToEnter = 1;
|
||||
}
|
||||
}
|
||||
|
||||
protected void Clean()
|
||||
{
|
||||
_statusZone = 0;
|
||||
if (_collapseTask != null)
|
||||
{
|
||||
_collapseTask.cancel(false);
|
||||
_collapseTask = null;
|
||||
}
|
||||
_zoneLair.getCharactersInside().forEach(mob ->
|
||||
{
|
||||
if (mob.isNpc())
|
||||
{
|
||||
mob.deleteMe();
|
||||
mob.setIsDead(true);
|
||||
}
|
||||
});
|
||||
_zoneLair2.getCharactersInside().forEach(mob ->
|
||||
{
|
||||
if (mob.isNpc())
|
||||
{
|
||||
mob.deleteMe();
|
||||
mob.setIsDead(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void Fail(final boolean clean)
|
||||
{
|
||||
if (clean)
|
||||
{
|
||||
Clean();
|
||||
}
|
||||
_zoneLair.oustAllPlayers();
|
||||
_zoneLair2.oustAllPlayers();
|
||||
GrandBossManager.getInstance().setBossStatus(TRASKEN, ALIVE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAttack(L2Npc npc, L2PcInstance attacker, int damage, boolean isSummon)
|
||||
{
|
||||
switch (npc.getId())
|
||||
{
|
||||
case TAIL_TRASKEN:
|
||||
{
|
||||
hp_tail = npc.getCurrentHp();
|
||||
break;
|
||||
}
|
||||
case TRASKEN:
|
||||
{
|
||||
if (npc.isCastingNow())
|
||||
{
|
||||
return super.onAttack(npc, attacker, damage, isSummon);
|
||||
}
|
||||
L2World.getInstance().forEachVisibleObjectInRange(npc, L2PcInstance.class, 250, cha ->
|
||||
{
|
||||
if (cha != null)
|
||||
{
|
||||
npc.setTarget(cha);
|
||||
}
|
||||
});
|
||||
if (getRandom(100) < 30)
|
||||
{
|
||||
final L2Npc doom = addSpawn(18998, attacker.getX() + 25, attacker.getY() + 25, attacker.getZ(), 0, false, 30, false);
|
||||
doom.setTarget(doom);
|
||||
doom.isCastingNow();
|
||||
doom.doCast(SKILL_1.getSkill());
|
||||
ThreadPoolManager.schedule(() -> doom.deleteMe(), 15000);
|
||||
}
|
||||
final double percent = ((npc.getCurrentHp() - damage) / npc.getMaxHp()) * 100.0;
|
||||
if ((percent <= 30) && (_statusZone == 4))
|
||||
{
|
||||
TraskenStay(npc);
|
||||
_statusZone = 5;
|
||||
}
|
||||
if ((percent <= 40) && (_statusZone == 3))
|
||||
{
|
||||
TraskenStay(npc);
|
||||
_statusZone = 4;
|
||||
}
|
||||
if (getRandom(100) < 50)
|
||||
{
|
||||
npc.doCast(SKILL_2.getSkill());
|
||||
}
|
||||
|
||||
if (getRandom(100) < 40)
|
||||
{
|
||||
npc.doCast(SKILL_3.getSkill());
|
||||
}
|
||||
|
||||
if (getRandom(100) < 25)
|
||||
{
|
||||
npc.doCast(SKILL_4.getSkill());
|
||||
}
|
||||
|
||||
if (getRandom(100) < 15)
|
||||
{
|
||||
npc.doCast(SKILL_5.getSkill());
|
||||
}
|
||||
hp_trasken = npc.getCurrentHp();
|
||||
break;
|
||||
}
|
||||
}
|
||||
return super.onAttack(npc, attacker, damage, isSummon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onSpawn(final L2Npc npc)
|
||||
{
|
||||
switch (npc.getId())
|
||||
{
|
||||
case TAIL_TRASKEN:
|
||||
{
|
||||
npc.setIsOverloaded(true);
|
||||
npc.setRandomWalking(true);
|
||||
npc.doCast(SKILL_TAIL.getSkill());
|
||||
break;
|
||||
}
|
||||
case TRASKEN:
|
||||
{
|
||||
npc.setIsOverloaded(true);
|
||||
npc.setRandomWalking(true);
|
||||
npc.setIsDead(false);
|
||||
break;
|
||||
}
|
||||
case TIE:
|
||||
case BIG_TIE:
|
||||
{
|
||||
L2World.getInstance().forEachVisibleObjectInRange(npc, L2PcInstance.class, 600, cha ->
|
||||
{
|
||||
npc.setTarget(cha);
|
||||
});
|
||||
npc.setIsOverloaded(true);
|
||||
npc.setRandomWalking(true);
|
||||
npc.getSpawn().setRespawnDelay(60);
|
||||
break;
|
||||
}
|
||||
case TRADJAN:
|
||||
{
|
||||
npc.getSpawn().setRespawnDelay(120);
|
||||
L2World.getInstance().forEachVisibleObjectInRange(npc, L2PcInstance.class, 3500, cha ->
|
||||
{
|
||||
npc.setTarget(cha);
|
||||
});
|
||||
break;
|
||||
}
|
||||
case LAVRA_1:
|
||||
case LAVRA_2:
|
||||
case LAVRA_3:
|
||||
{
|
||||
npc.getSpawn().setRespawnDelay(200);
|
||||
L2World.getInstance().forEachVisibleObjectInRange(npc, L2PcInstance.class, 3500, cha ->
|
||||
{
|
||||
npc.setTarget(cha);
|
||||
});
|
||||
break;
|
||||
}
|
||||
case VICTIM_EARTWORMS_1:
|
||||
case VICTIM_EARTWORMS_2:
|
||||
case VICTIM_EARTWORMS_3:
|
||||
{
|
||||
npc.getSpawn().setRespawnDelay(30);
|
||||
L2World.getInstance().forEachVisibleObjectInRange(npc, L2PcInstance.class, 1000, cha ->
|
||||
{
|
||||
npc.setTarget(cha);
|
||||
});
|
||||
break;
|
||||
}
|
||||
case DIGISTIVE:
|
||||
{
|
||||
npc.setIsOverloaded(true);
|
||||
npc.setRandomWalking(true);
|
||||
npc.getSpawn().setRespawnDelay(60);
|
||||
L2World.getInstance().forEachVisibleObjectInRange(npc, L2PcInstance.class, 1000, cha ->
|
||||
{
|
||||
npc.setTarget(cha);
|
||||
});
|
||||
break;
|
||||
}
|
||||
case HEART_ERTHWYRM:
|
||||
{
|
||||
npc.setIsOverloaded(true);
|
||||
npc.setRandomWalking(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return super.onSpawn(npc);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onSeeCreature(L2Npc npc, L2Character player, boolean isSummon)
|
||||
{
|
||||
if (npc.isDead() || (player == null))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
if ((npc.getId() == LAVRA_1) || (npc.getId() == LAVRA_2) || (npc.getId() == LAVRA_3) || (npc.getId() == TRADJAN))
|
||||
{
|
||||
addAttackPlayerDesire(npc, _zoneLair.getPlayersInside().get(getRandom(_zoneLair.getPlayersInside().size())));
|
||||
}
|
||||
else if ((npc.getId() == TIE) || (npc.getId() == BIG_TIE))
|
||||
{
|
||||
if (getRandom(100) < 60)
|
||||
{
|
||||
npc.setTarget(player);
|
||||
npc.doCast(SKILL_TIE_ROOT.getSkill());
|
||||
addAttackPlayerDesire(npc, (L2Playable) player);
|
||||
}
|
||||
else
|
||||
{
|
||||
npc.setTarget(player);
|
||||
npc.doCast(SKILL_TIE_CHAIN.getSkill());
|
||||
addAttackPlayerDesire(npc, (L2Playable) player);
|
||||
}
|
||||
}
|
||||
return super.onSeeCreature(npc, player, isSummon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(final String event, final L2Npc npc, final L2PcInstance player)
|
||||
{
|
||||
switch (event)
|
||||
{
|
||||
case "enterZone":
|
||||
{
|
||||
player.teleToLocation(ENTER_LOCATION);
|
||||
break;
|
||||
}
|
||||
case "exitZone":
|
||||
{
|
||||
player.teleToLocation(EXIT_LOCATION);
|
||||
break;
|
||||
}
|
||||
case "finish":
|
||||
{
|
||||
GrandBossManager.getInstance().setBossStatus(TRASKEN, DEAD);
|
||||
trasken.doDie(player);
|
||||
trasken.setIsDead(true);
|
||||
_zoneLair2.getPlayersInside().forEach(players -> players.teleToLocation(CENTER_LOCATION));
|
||||
_zoneLair2.getPlayersInside().forEach(p ->
|
||||
{
|
||||
playMovie(p, Movie.SC_EARTHWORM_ENDING);
|
||||
});
|
||||
final long respawnTime = 72 * 3600000;
|
||||
if (_collapseTask != null)
|
||||
{
|
||||
_collapseTask.cancel(true);
|
||||
_collapseTask = null;
|
||||
}
|
||||
_zoneLair.getCharactersInside().stream().filter(L2Character::isNpc).forEach(mob -> mob.deleteMe());
|
||||
_zoneLair.getCharactersInside().stream().filter(L2Object::isMonster).forEach(cha -> ((L2MonsterInstance) cha).getSpawn().stopRespawn());
|
||||
_zoneLair2.getCharactersInside().stream().filter(L2Character::isNpc).forEach(mob -> mob.deleteMe());
|
||||
_zoneLair2.getCharactersInside().stream().filter(L2Object::isMonster).forEach(cha -> ((L2MonsterInstance) cha).getSpawn().stopRespawn());
|
||||
ThreadPoolManager.schedule(() -> npc.decayMe(), 10000);
|
||||
ThreadPoolManager.schedule(new UnlockTrasken(), respawnTime);
|
||||
cancelQuestTimer("finish", npc, null);
|
||||
break;
|
||||
}
|
||||
case "spawn_rnd":
|
||||
{
|
||||
switch (npc.getId())
|
||||
{
|
||||
case TAIL_TRASKEN:
|
||||
{
|
||||
if (_statusZone == 2)
|
||||
{
|
||||
tie_trasken.doCast(SKILL_TAIL_2.getSkill());
|
||||
tie_trasken.getSpawn().stopRespawn();
|
||||
tie_trasken.decayMe();
|
||||
|
||||
final int[] spawn = Rnd_Spawn_Tail[Rnd.get(Rnd_Spawn_Tail.length)];
|
||||
if (SpawnTable.getInstance().getSpawns(TAIL_TRASKEN) == null)
|
||||
{
|
||||
ThreadPoolManager.schedule(() ->
|
||||
{
|
||||
tie_trasken = addSpawn(TAIL_TRASKEN, spawn[0], spawn[1], spawn[2], 0, false, 0, true);
|
||||
tie_trasken.setCurrentHp(hp_tail);
|
||||
}, 5000);
|
||||
}
|
||||
startQuestTimer("spawn_rnd", 30000, tie_trasken, null);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case TRASKEN:
|
||||
{
|
||||
if (_statusZone == 3)
|
||||
{
|
||||
trasken.doCast(SKILL_TRASKEN_FIRST.getSkill());
|
||||
trasken.getSpawn().stopRespawn();
|
||||
trasken.decayMe();
|
||||
|
||||
final int[] spawn1 = Rnd_Spawn_Trasken[Rnd.get(Rnd_Spawn_Trasken.length)];
|
||||
if (SpawnTable.getInstance().getSpawns(TRASKEN) == null)
|
||||
{
|
||||
ThreadPoolManager.schedule(() ->
|
||||
{
|
||||
trasken = addSpawn(TRASKEN, spawn1[0], spawn1[1], spawn1[2], 0, false, 0, true);
|
||||
trasken.doCast(SKILL_TRASKEN_UP.getSkill());
|
||||
trasken.setCurrentHp(hp_trasken);
|
||||
}, 10000);
|
||||
}
|
||||
startQuestTimer("spawn_rnd", 70000, trasken, null);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
|
||||
{
|
||||
switch (npc.getId())
|
||||
{
|
||||
case TIE:
|
||||
case BIG_TIE:
|
||||
{
|
||||
_killsTie.incrementAndGet();
|
||||
if ((_killsTie.get() == 27) && (_statusZone == 0))
|
||||
{
|
||||
_statusZone = 1;
|
||||
nextStage(_statusZone);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case TRADJAN:
|
||||
{
|
||||
_killsTradjan.incrementAndGet();
|
||||
if ((_killsTradjan.get() == 18) && (_statusZone == 1))
|
||||
{
|
||||
_statusZone = 2;
|
||||
nextStage(_statusZone);
|
||||
}
|
||||
npc.getSpawn().startRespawn();
|
||||
break;
|
||||
}
|
||||
case TAIL_TRASKEN:
|
||||
{
|
||||
_statusZone = 3;
|
||||
nextStage(_statusZone);
|
||||
break;
|
||||
}
|
||||
case HEART_ERTHWYRM:
|
||||
{
|
||||
_zoneLair.getPlayersInside().forEach(p -> p.broadcastPacket(new ExShowScreenMessage(NpcStringId.HEART_OF_EARTH_WYRM_HAS_BEEN_DESTROYED, 5, 4000, true)));
|
||||
_zoneLair2.getPlayersInside().forEach(p -> p.broadcastPacket(new ExShowScreenMessage(NpcStringId.HEART_OF_EARTH_WYRM_HAS_BEEN_DESTROYED, 5, 4000, true)));
|
||||
cancelQuestTimer("spawn_rnd", trasken, null);
|
||||
startQuestTimer("finish", 5000, npc, killer);
|
||||
break;
|
||||
}
|
||||
case LAVRA_1:
|
||||
case LAVRA_2:
|
||||
case LAVRA_3:
|
||||
{
|
||||
npc.getSpawn().startRespawn();
|
||||
break;
|
||||
}
|
||||
case VICTIM_EARTWORMS_1:
|
||||
case VICTIM_EARTWORMS_2:
|
||||
case VICTIM_EARTWORMS_3:
|
||||
{
|
||||
npc.getSpawn().startRespawn();
|
||||
break;
|
||||
}
|
||||
case DIGISTIVE:
|
||||
{
|
||||
npc.getSpawn().startRespawn();
|
||||
break;
|
||||
}
|
||||
}
|
||||
return super.onKill(npc, killer, isSummon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onEnterZone(final L2Character character, final L2ZoneType zone)
|
||||
{
|
||||
if ((zone.getId() == ZONE_ID) && character.isPlayer())
|
||||
{
|
||||
for (int info : eventTriggers)
|
||||
{
|
||||
character.broadcastPacket(new OnEventTrigger(info, true));
|
||||
}
|
||||
|
||||
if (_collapseTask != null)
|
||||
{
|
||||
_collapseTask.cancel(true);
|
||||
_collapseTask = null;
|
||||
}
|
||||
_statusZone = 0;
|
||||
nextStage(_statusZone);
|
||||
}
|
||||
|
||||
if ((zone.getId() == ZONE_ID_HEART) && character.isPlayer())
|
||||
{
|
||||
_zoneLair2.movePlayersTo(HEART_LOCATION);
|
||||
if (_collapseTask != null)
|
||||
{
|
||||
_collapseTask.cancel(true);
|
||||
_collapseTask = null;
|
||||
}
|
||||
final int time = 540000;
|
||||
zone.getPlayersInside().forEach(temp -> temp.sendPacket(new ExSendUIEvent(temp, false, false, 540, 0, NpcStringId.REMAINING_TIME)));
|
||||
_collapseTask = ThreadPoolManager.schedule(() -> Fail(true), time);
|
||||
}
|
||||
return super.onEnterZone(character, zone);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onExitZone(final L2Character character, final L2ZoneType zone)
|
||||
{
|
||||
if ((zone.getId() == ZONE_ID_HEART) && zone.getPlayersInside().isEmpty())
|
||||
{
|
||||
_collapseTask = ThreadPoolManager.schedule(() ->
|
||||
{
|
||||
Fail(true);
|
||||
for (int info : eventTriggers)
|
||||
{
|
||||
character.broadcastPacket(new OnEventTrigger(info, false));
|
||||
}
|
||||
}, 900000);
|
||||
}
|
||||
return super.onExitZone(character, zone);
|
||||
}
|
||||
|
||||
private void nextStage(int taskId)
|
||||
{
|
||||
switch (taskId)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
for (Location loc : Spawn_Tie)
|
||||
{
|
||||
addSpawn(TIE, loc, false, 0, true);
|
||||
}
|
||||
|
||||
for (Location loc : Spawn_Big_Tie)
|
||||
{
|
||||
addSpawn(BIG_TIE, loc, false, 0, true);
|
||||
}
|
||||
|
||||
addSpawn(HEART_ERTHWYRM, Spawn_Heart, false, 0, true);
|
||||
|
||||
for (Location loc : Spawn_Victim_1)
|
||||
{
|
||||
addSpawn(VICTIM_EARTWORMS_1, loc, false, 0, true);
|
||||
}
|
||||
|
||||
for (Location loc : Spawn_Victim_2)
|
||||
{
|
||||
addSpawn(VICTIM_EARTWORMS_2, loc, false, 0, true);
|
||||
}
|
||||
|
||||
for (Location loc : Spawn_Victim_3)
|
||||
{
|
||||
addSpawn(VICTIM_EARTWORMS_3, loc, false, 0, true);
|
||||
}
|
||||
|
||||
for (Location loc : Spawn_Digestive)
|
||||
{
|
||||
addSpawn(DIGISTIVE, loc, false, 0, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
for (Location loc : Spawn_Tradjan)
|
||||
{
|
||||
addSpawn(TRADJAN, loc, false, 0, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
tie_trasken = addSpawn(TAIL_TRASKEN, CENTER_LOCATION, false, 0, true);
|
||||
hp_tail = tie_trasken.getCurrentHp();
|
||||
startQuestTimer("spawn_rnd", 30000, tie_trasken, null);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
cancelQuestTimer("spawn_rnd", tie_trasken, null);
|
||||
|
||||
trasken = addSpawn(TRASKEN, CENTER_LOCATION, false, 0, true);
|
||||
trasken.doCast(SKILL_TRASKEN_UP.getSkill());
|
||||
hp_trasken = trasken.getCurrentHp();
|
||||
|
||||
startQuestTimer("spawn_rnd", 70000, trasken, null);
|
||||
for (Location loc : Spawn_Larva_1)
|
||||
{
|
||||
addSpawn(LAVRA_1, loc, false, 0, true);
|
||||
}
|
||||
|
||||
for (Location loc : Spawn_Larva_2)
|
||||
{
|
||||
addSpawn(LAVRA_2, loc, false, 0, true);
|
||||
}
|
||||
|
||||
for (Location loc : Spawn_Larva_3)
|
||||
{
|
||||
addSpawn(LAVRA_3, loc, false, 0, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void TraskenStay(L2Character character)
|
||||
{
|
||||
character.broadcastPacket(new ExShowScreenMessage(NpcStringId.THE_EARTH_WYRM_HAS_LOST_CONSCIOUSNESS, 5, 4600, true));
|
||||
character.doCast(SKILL_TRASKEN_BUFF.getSkill()); // 12 sec combo
|
||||
if (playersToEnter == _zoneLair2.getPlayersInside().size())
|
||||
{
|
||||
final BuffInfo traskenBuff = character.getEffectList().getBuffInfoBySkillId(SKILL_TRASKEN_BUFF.getSkillId());
|
||||
if (traskenBuff != null)
|
||||
{
|
||||
character.getEffectList().remove(true, traskenBuff, null);
|
||||
}
|
||||
}
|
||||
ThreadPoolManager.schedule(() ->
|
||||
{
|
||||
character.broadcastPacket(new ExShowScreenMessage(NpcStringId.YOU_VE_EXCEEDED_THE_MAXIMUM_NUMBER_OF_PERSONNEL, 5, 24000, true));
|
||||
character.doCast(SKILL_TRASKEN_SLEEP.getSkill());
|
||||
}, 4050);
|
||||
}
|
||||
|
||||
public boolean getTimeUnlock()
|
||||
{
|
||||
Calendar cal = Calendar.getInstance();
|
||||
if ((cal.get(Calendar.WEEK_OF_MONTH) == 1) || (cal.get(Calendar.WEEK_OF_MONTH) == 3))
|
||||
{
|
||||
switch (cal.get(Calendar.DAY_OF_WEEK))
|
||||
{
|
||||
case Calendar.FRIDAY:
|
||||
case Calendar.SATURDAY:
|
||||
case Calendar.SUNDAY:
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private class UnlockTrasken implements Runnable
|
||||
{
|
||||
public UnlockTrasken()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
GrandBossManager.getInstance().setBossStatus(TRASKEN, ALIVE);
|
||||
Broadcast.toAllOnlinePlayers(new Earthquake(CENTER_LOCATION.getX(), CENTER_LOCATION.getY(), CENTER_LOCATION.getZ(), CENTER_LOCATION.getHeading(), 10));
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new Trasken();
|
||||
}
|
||||
}
|
59
L2J_Mobius_3.0_Helios/dist/game/data/spawns/Schuttgart/EarthWyrmCave.xml
vendored
Normal file
59
L2J_Mobius_3.0_Helios/dist/game/data/spawns/Schuttgart/EarthWyrmCave.xml
vendored
Normal file
@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/spawns.xsd">
|
||||
<spawn name="EarthWyrmCave">
|
||||
<group>
|
||||
<!-- Belenora -->
|
||||
<npc id="33506" x="75254" y="-182400" z="-9888" heading="40960" />
|
||||
<!-- Dark Elf Soldier -->
|
||||
<npc id="33507" x="75210" y="-182546" z="-9896" heading="8192" />
|
||||
<npc id="33507" x="76280" y="-182298" z="-9888" heading="0" />
|
||||
<npc id="33507" x="75106" y="-182365" z="-9888" heading="8192" />
|
||||
<npc id="33507" x="75067" y="-182406" z="-9888" heading="8192" />
|
||||
<npc id="33507" x="75150" y="-182417" z="-9896" heading="8192" />
|
||||
<npc id="33507" x="75249" y="-182497" z="-9896" heading="8192" />
|
||||
<npc id="33507" x="75227" y="-182626" z="-9899" heading="8192" />
|
||||
<npc id="33507" x="75292" y="-182532" z="-9896" heading="8192" />
|
||||
<npc id="33507" x="75177" y="-182587" z="-9888" heading="8192" />
|
||||
<npc id="33507" x="75119" y="-182461" z="-9888" heading="8192" />
|
||||
<npc id="33507" x="75166" y="-182505" z="-9888" heading="8192" />
|
||||
<npc id="33507" x="76333" y="-182254" z="-9888" heading="0" />
|
||||
<npc id="33507" x="75259" y="-182579" z="-9896" heading="8192" />
|
||||
<npc id="33507" x="75199" y="-182458" z="-9896" heading="8192" />
|
||||
<npc id="33507" x="75133" y="-182552" z="-9864" heading="8192" />
|
||||
<npc id="33507" x="75032" y="-182453" z="-9888" heading="8192" />
|
||||
<!-- Alejandro -->
|
||||
<npc id="33502" x="75179" y="-182148" z="-9888" heading="32768" />
|
||||
<!-- Dwarf Soldier -->
|
||||
<npc id="33503" x="75067" y="-182208" z="-9896" heading="0" />
|
||||
<npc id="33503" x="75015" y="-182211" z="-9896" heading="0" />
|
||||
<npc id="33503" x="75067" y="-182148" z="-9896" heading="0" />
|
||||
<npc id="33503" x="75012" y="-182148" z="-9896" heading="0" />
|
||||
<npc id="33503" x="74955" y="-182145" z="-9896" heading="0" />
|
||||
<npc id="33503" x="74952" y="-182082" z="-9896" heading="0" />
|
||||
<npc id="33503" x="75015" y="-182082" z="-9896" heading="0" />
|
||||
<npc id="33503" x="74952" y="-182211" z="-9896" heading="0" />
|
||||
<npc id="33503" x="74949" y="-182019" z="-9880" heading="0" />
|
||||
<npc id="33503" x="75015" y="-182019" z="-9896" heading="0" />
|
||||
<npc id="33503" x="74952" y="-182269" z="-9896" heading="0" />
|
||||
<npc id="33503" x="75015" y="-182272" z="-9896" heading="0" />
|
||||
<npc id="33503" x="75067" y="-182272" z="-9896" heading="0" />
|
||||
<npc id="33503" x="75067" y="-182022" z="-9896" heading="0" />
|
||||
<npc id="33503" x="76277" y="-181919" z="-9896" heading="0" />
|
||||
<npc id="33503" x="76342" y="-181971" z="-9896" heading="0" />
|
||||
<npc id="33503" x="75067" y="-182085" z="-9896" heading="0" />
|
||||
<!-- Teleport Device -->
|
||||
<npc id="33513" x="75179" y="-181893" z="-9896" heading="0" />
|
||||
<!-- Wooden Medic -->
|
||||
<npc id="33505" x="75372" y="-181770" z="-9888" heading="24576" />
|
||||
<!-- Dwarf Soldier -->
|
||||
<npc id="33504" x="75372" y="-181644" z="-9888" heading="45056" />
|
||||
<npc id="33504" x="75459" y="-181612" z="-9896" heading="16384" />
|
||||
<npc id="33504" x="75287" y="-181685" z="-9896" heading="32768" />
|
||||
<npc id="33504" x="75205" y="-181755" z="-9888" heading="0" />
|
||||
<!-- Fernando -->
|
||||
<!--
|
||||
<npc id="33160" x="77154" y="-182196" z="-9888" heading="30708" />
|
||||
-->
|
||||
</group>
|
||||
</spawn>
|
||||
</list>
|
@ -4440,8 +4440,7 @@
|
||||
<height normal="135" />
|
||||
</collision>
|
||||
</npc>
|
||||
<npc id="29197" level="99" type="L2RaidBoss" name="Earth Wyrm Trasken" title="Hell's Gate">
|
||||
<!-- AUTO GENERATED NPC TODO: FIX IT -->
|
||||
<npc id="29197" level="99" type="L2GrandBoss" name="Earth Wyrm Trasken" title="Hell's Gate">
|
||||
<parameters>
|
||||
<skill name="skill01" id="14335" level="1" />
|
||||
<skill name="skill03" id="14336" level="1" />
|
||||
|
@ -181,6 +181,12 @@
|
||||
<node X="49357" Y="-28620" />
|
||||
<node X="47553" Y="-29161" />
|
||||
</zone>
|
||||
<zone name="Trasken_Zone" id="12108" type="NoSummonFriendZone" shape="Cylinder" minZ="-16000" maxZ="16000" rad="8000" >
|
||||
<node X="81955" Y="-181606" />
|
||||
</zone>
|
||||
<zone name="Heart_Trasken_Zone" id="12109" type="NoSummonFriendZone" shape="Cylinder" minZ="-16000" maxZ="16000" rad="2500" >
|
||||
<node X="88110" Y="-173795" />
|
||||
</zone>
|
||||
<zone name="Ramona_Room" id="210108" type="NoSummonFriendZone" shape="Cylinder" minZ="-10610" maxZ="-10050" rad="3000" >
|
||||
<node X="78023" Y="172262" />
|
||||
</zone>
|
||||
|
Loading…
Reference in New Issue
Block a user