Addition of Krofin Nest instance.

Contributed by CostyKiller and nasseka.
This commit is contained in:
MobiusDevelopment
2021-07-08 15:34:56 +00:00
parent 004a35a793
commit d77e6a54ab
18 changed files with 1445 additions and 0 deletions

View File

@@ -18350,4 +18350,40 @@
<status showHp="false" />
<openStatus default="close" />
</door>
<door id="24250002" name="Rachiq_Habitat_S.rachiq_Door01" >
<nodes nodeZ="-7192">
<node x="151333" y="248716" />
<node x="151334" y="248741" />
<node x="150927" y="248740" />
<node x="150927" y="248714" />
</nodes>
<location x="151131" y="248728" z="-7189" />
<stats basePDef="644" baseMDef="518" baseHpMax="169710" />
<status showHp="false" />
<openStatus default="close" />
</door>
<door id="24250004" name="Rachiq_Habitat_S.rachiq_Door01" >
<nodes nodeZ="-7192">
<node x="142375" y="248859" />
<node x="142374" y="248886" />
<node x="141967" y="248885" />
<node x="141965" y="248857" />
</nodes>
<location x="142171" y="248872" z="-7189" />
<stats basePDef="644" baseMDef="518" baseHpMax="169710" />
<status showHp="false" />
<openStatus default="close" />
</door>
<door id="24250006" name="Rachiq_Habitat_S.rachiq_Door01" >
<nodes nodeZ="-7192">
<node x="151015" y="240587" />
<node x="151014" y="240614" />
<node x="150607" y="240613" />
<node x="150605" y="240585" />
</nodes>
<location x="150811" y="240600" z="-7189" />
<stats basePDef="644" baseMDef="518" baseHpMax="169710" />
<status showHp="false" />
<openStatus default="close" />
</door>
</list>

View File

@@ -3,4 +3,5 @@ Welcome! My name is Benusta. I help adventurers to travel to instance zones. I c
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest BaylorWarzone enterInstance">Fight Baylor</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest NightmareKamaloka enterInstance">Go to Nightmare Kamaloka</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest AshenShadowRevolutionaries enterInstance">Go to Ashen Shadow Revolutionaries</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest KrofinNest enterInstance">Krofin's Nest</Button>
</body></html>

View File

@@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Krofins Nest -->
<instance id="291" maxWorlds="100" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
<time duration="60" empty="1" />
<locations>
<enter type="FIXED">
<location x="124390" y="155333" z="-3713" heading="0" /> <!-- Krofin Nest -->
</enter>
<exit type="ORIGIN" />
</locations>
<conditions>
<condition type="Reenter" />
<condition type="Party" showMessageAndHtml="true">
<param name="html" value="condNoPartyLeader.html" />
</condition>
<condition type="PartyLeader" showMessageAndHtml="true">
<param name="html" value="condNoPartyLeader.html" />
</condition>
<condition type="GroupMin">
<param name="limit" value="2" />
</condition>
<condition type="GroupMax">
<param name="limit" value="7" />
</condition>
<condition type="Level">
<param name="min" value="105" />
</condition>
<condition type="Distance" />
</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="23220101">
<openStatus default="close" />
</door>
<door id="24250002">
<openStatus default="close" />
</door>
<door id="24250004">
<openStatus default="close" />
</door>
<door id="24250006">
<openStatus default="close" />
</door>
</doorlist>
<spawnlist>
<group name="FIRST_AREA" spawnByDefault="false">
<npc id="26398" x="123970" y="154547" z="-3664" heading="32542" /> <!-- Young Kropion -->
<npc id="26398" x="123906" y="154494" z="-3664" heading="32542" /> <!-- Young Kropion -->
<npc id="26398" x="124308" y="154585" z="-3664" heading="32542" /> <!-- Young Kropion -->
<npc id="26398" x="123833" y="154401" z="-3664" heading="32542" /> <!-- Young Kropion -->
<npc id="26396" x="124370" y="154268" z="-3666" heading="32542" /> <!-- Kropion -->
<npc id="26396" x="124131" y="154115" z="-3664" heading="32542" /> <!-- Kropion -->
<npc id="26396" x="124012" y="153981" z="-3664" heading="32542" /> <!-- Kropion -->
<npc id="26396" x="123682" y="154261" z="-3664" heading="32542" /> <!-- Kropion -->
<npc id="26398" x="124123" y="152724" z="-3667" heading="32542" /> <!-- Young Kropion -->
<npc id="26398" x="124200" y="153026" z="-3674" heading="32542" /> <!-- Young Kropion -->
<npc id="26398" x="124303" y="152969" z="-3670" heading="32542" /> <!-- Young Kropion -->
<npc id="26398" x="124399" y="152839" z="-3666" heading="32542" /> <!-- Young Kropion -->
<npc id="26396" x="124029" y="152515" z="-3670" heading="32542" /> <!-- Kropion -->
<npc id="26396" x="124268" y="152311" z="-3669" heading="32542" /> <!-- Kropion -->
</group>
<group name="SECOND_AREA" spawnByDefault="false">
<npc id="26396" x="150858" y="249727" z="-7112" heading="32542" /> <!-- Kropion -->
<npc id="26396" x="150598" y="249649" z="-7112" heading="32542" /> <!-- Kropion -->
<npc id="26396" x="151442" y="249603" z="-7112" heading="32542" /> <!-- Kropion -->
<npc id="26396" x="151294" y="249068" z="-7112" heading="32542" /> <!-- Kropion -->
</group>
<group name="THIRD_AREA" spawnByDefault="false">
<npc id="26395" x="142173" y="249603" z="-7112" heading="32542" /> <!-- Krotanion -->
<npc id="26397" x="141842" y="249717" z="-7112" heading="32542" /> <!-- Young Krotanion -->
<npc id="26397" x="141942" y="249900" z="-7112" heading="32542" /> <!-- Young Krotanion -->
<npc id="26397" x="142065" y="249808" z="-7112" heading="32542" /> <!-- Young Krotanion -->
<npc id="26397" x="142232" y="250114" z="-7101" heading="32542" /> <!-- Young Krotanion -->
<npc id="26397" x="142264" y="249813" z="-7112" heading="32542" /> <!-- Young Krotanion -->
<npc id="26397" x="142145" y="249693" z="-7112" heading="32542" /> <!-- Young Krotanion -->
<npc id="26397" x="142243" y="249603" z="-7112" heading="32542" /> <!-- Young Krotanion -->
<npc id="26397" x="142408" y="249281" z="-7112" heading="32542" /> <!-- Young Krotanion -->
</group>
<group name="FOURTH_AREA" spawnByDefault="false">
<npc id="26395" x="150536" y="241386" z="-7112" heading="32542" /> <!-- Krotanion -->
<npc id="26397" x="150470" y="241678" z="-7112" heading="32542" /> <!-- Young Krotanion -->
<npc id="26397" x="150720" y="241104" z="-7112" heading="32542" /> <!-- Young Krotanion -->
<npc id="26396" x="151089" y="241259" z="-7119" heading="32542" /> <!-- Kropion -->
</group>
<group name="KROPION_MINIONS" spawnByDefault="false">
<npc id="26398" x="151023" y="249494" z="-7095" heading="32542" /> <!-- Young Kropion -->
<npc id="26398" x="151023" y="249494" z="-7095" heading="32542" /> <!-- Young Kropion -->
<npc id="26398" x="151023" y="249494" z="-7095" heading="32542" /> <!-- Young Kropion -->
</group>
<group name="KROSHA_FIRST_FORM" spawnByDefault="false">
<npc id="26389" x="142395" y="240706" z="-6216" heading="32542" /> <!-- Queen Krosha First Form -->
</group>
<group name="KROSHA_FIRST_FORM_MINIONS" spawnByDefault="false">
<npc id="26393" x="142455" y="240523" z="-6224" heading="32542" /> <!-- Fragile Young Krotanion -->
<npc id="26394" x="142322" y="240618" z="-6224" heading="32542" /> <!-- Fragile Young Kropion -->
<npc id="26393" x="142273" y="240821" z="-6224" heading="32542" /> <!-- Fragile Young Krotanion -->
<npc id="26394" x="142398" y="240950" z="-6224" heading="32542" /> <!-- Fragile Young Kropion -->
<npc id="26393" x="142571" y="240895" z="-6224" heading="32542" /> <!-- Fragile Young Krotanion -->
<npc id="26394" x="142616" y="240616" z="-6224" heading="32542" /> <!-- Fragile Young Kropion -->
</group>
<group name="ENHANCED_MINIONS" spawnByDefault="false">
<npc id="26391" x="142124" y="240586" z="-6224" heading="6224" /> <!-- Enhanced Krotanion -->
<npc id="26392" x="142124" y="240586" z="-6224" heading="32542" /> <!-- Enhanced Kropion -->
<npc id="26392" x="142815" y="240935" z="-6209" heading="32542" /> <!-- Enhanced Kropion -->
</group>
<group name="KROSHA_FINAL_FORM" spawnByDefault="false">
<npc id="26390" x="142395" y="240706" z="-6216" heading="32542" /> <!-- Queen Krosha Final Form -->
</group>
<group name="KROSHA_FINAL_FORM_MINIONS" spawnByDefault="false">
<npc id="26391" x="142124" y="240586" z="-6224" heading="6224" /> <!-- Enhanced Krotanion -->
<npc id="26392" x="142124" y="240586" z="-6224" heading="32542" /> <!-- Enhanced Kropion -->
<npc id="26392" x="142815" y="240935" z="-6209" heading="32542" /> <!-- Enhanced Kropion -->
</group>
</spawnlist>
</instance>

View File

@@ -0,0 +1,269 @@
/*
* 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 instances.KrofinNest;
import org.l2jmobius.commons.util.CommonUtil;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.holders.ItemHolder;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.network.NpcStringId;
import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
import instances.AbstractInstance;
/**
* @author CostyKiller, NasSeKa
* @URL https://www.youtube.com/watch?v=UCI2lnm-Bc0
*/
public class KrofinNest extends AbstractInstance
{
// NPC
private static final int BENUSTA = 34542;
// Item
private static final ItemHolder BENUSTAS_REWARD_BOX = new ItemHolder(81151, 1);
// Misc
private static final int TEMPLATE_ID = 291; // Krofin Nest
private static final int DOOR1 = 23220101;
private static final int DOOR2 = 24250002;
private static final int DOOR3 = 24250004;
private static final int DOOR4 = 24250006;
private static final int[] FIRST_AREA =
{
26396,
26398
};
private static final int[] SECOND_AREA =
{
26396,
26398
};
private static final int[] THIRD_AREA =
{
26395,
26397
};
private static final int[] FOURTH_AREA =
{
26395,
26396,
26397,
26398
};
private static final int KROSHA_FIRST_FORM = 26389;
private static final int KROSHA_FINAL_FORM = 26390;
private static final int KROPION = 26396;
private static final int[] KROSHA_FIRST_FORM_MINIONS =
{
26393,
26394
};
private static final int[] ENHANCED_MINIONS =
{
26391,
26392
};
public KrofinNest()
{
super(TEMPLATE_ID);
addStartNpc(BENUSTA);
addTalkId(BENUSTA);
addAttackId(FIRST_AREA);
addAttackId(SECOND_AREA);
addAttackId(THIRD_AREA);
addAttackId(FOURTH_AREA);
addAttackId(KROSHA_FIRST_FORM);
addAttackId(KROSHA_FINAL_FORM);
addKillId(KROSHA_FIRST_FORM_MINIONS);
addKillId(ENHANCED_MINIONS);
addKillId(KROSHA_FINAL_FORM);
}
@Override
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
{
switch (event)
{
case "enterInstance":
{
enterInstance(player, npc, TEMPLATE_ID);
if (player.getInstanceWorld() != null)
{
startQuestTimer("check_status", 1000, null, player);
}
return null;
}
case "check_status":
{
final Instance world = player.getInstanceWorld();
if (!isInInstance(world))
{
return null;
}
switch (world.getStatus())
{
case 0:
{
world.setStatus(1);
world.spawnGroup("FIRST_AREA");
startQuestTimer("check_status", 10000, null, player);
break;
}
case 1:
{
if (world.getAliveNpcs(FIRST_AREA).isEmpty())
{
showOnScreenMsg(world, NpcStringId.THE_WATER_ENERGY_IS_NO_LONGER_ACTIVE_THE_WAY_IS_CLEAR, ExShowScreenMessage.TOP_CENTER, 10000, true);
world.setStatus(2);
world.getDoor(DOOR1).openMe();
world.spawnGroup("SECOND_AREA");
}
startQuestTimer("check_status", 1000, null, player);
break;
}
case 2:
{
if (world.getAliveNpcs(SECOND_AREA).isEmpty())
{
showOnScreenMsg(world, NpcStringId.THE_WATER_ENERGY_IS_NO_LONGER_ACTIVE_THE_WAY_IS_CLEAR, ExShowScreenMessage.TOP_CENTER, 10000, true);
world.setStatus(3);
world.getDoor(DOOR2).openMe();
world.spawnGroup("THIRD_AREA");
}
startQuestTimer("check_status", 10000, null, player);
break;
}
case 3:
{
if (world.getAliveNpcs(THIRD_AREA).isEmpty())
{
showOnScreenMsg(world, NpcStringId.THE_WATER_ENERGY_IS_NO_LONGER_ACTIVE_THE_WAY_IS_CLEAR, ExShowScreenMessage.TOP_CENTER, 10000, true);
world.setStatus(4);
world.getDoor(DOOR3).openMe();
world.spawnGroup("FOURTH_AREA");
}
startQuestTimer("check_status", 10000, null, player);
break;
}
case 4:
{
if (world.getAliveNpcs(FOURTH_AREA).isEmpty())
{
showOnScreenMsg(world, NpcStringId.THE_WATER_ENERGY_IS_NO_LONGER_ACTIVE_THE_WAY_IS_CLEAR, ExShowScreenMessage.TOP_CENTER, 10000, true);
world.setStatus(5);
world.getDoor(DOOR4).openMe();
world.spawnGroup("KROSHA_FIRST_FORM");
}
startQuestTimer("check_status", 10000, null, player);
break;
}
}
return null;
}
}
return super.onAdvEvent(event, npc, player);
}
@Override
public String onAttack(Npc npc, PlayerInstance attacker, int damage, boolean isSummon)
{
final Instance world = attacker.getInstanceWorld();
if (isInInstance(world))
{
final boolean KROPION_MINIONS_SPAWNED = world.getParameters().getBoolean("KROPION_MINIONS_SPAWNED", false);
final boolean KROSHA_FIRST_FORM_MINIONS_SPAWNED = world.getParameters().getBoolean("KROSHA_FIRST_FORM_MINIONS_SPAWNED", false);
final boolean KROSHA_FINAL_FORM_MINIONS_SPAWNED = world.getParameters().getBoolean("KROSHA_FINAL_FORM_MINIONS_SPAWNED", false);
if ((world.getStatus() == 2) && (npc.getId() == KROPION))
{
if (!KROPION_MINIONS_SPAWNED)
{
world.getParameters().set("KROPION_MINIONS_SPAWNED", true);
world.spawnGroup("KROPION_MINIONS");
}
}
else if (world.getStatus() == 5)
{
if ((npc.getId() == KROSHA_FIRST_FORM) && !KROSHA_FIRST_FORM_MINIONS_SPAWNED)
{
world.getParameters().set("KROSHA_FIRST_FORM_MINIONS_SPAWNED", true);
world.spawnGroup("KROSHA_FIRST_FORM_MINIONS");
}
else if ((npc.getId() == KROSHA_FINAL_FORM) && !KROSHA_FINAL_FORM_MINIONS_SPAWNED)
{
world.getParameters().set("KROSHA_FINAL_FORM_MINIONS_SPAWNED", true);
world.spawnGroup("KROSHA_FINAL_FORM_MINIONS");
}
}
}
return super.onAttack(npc, attacker, damage, isSummon);
}
@Override
public String onKill(Npc npc, PlayerInstance killer, boolean isPet)
{
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
final boolean KROSHA_FIRST_FORM_MINIONS_SPAWNED_TWICE = world.getParameters().getBoolean("KROSHA_FIRST_FORM_MINIONS_SPAWNED_TWICE", false);
if (world.getStatus() == 5)
{
if (CommonUtil.contains(KROSHA_FIRST_FORM_MINIONS, npc.getId()))
{
if (world.getAliveNpcs(KROSHA_FIRST_FORM_MINIONS).isEmpty() && !KROSHA_FIRST_FORM_MINIONS_SPAWNED_TWICE)
{
world.getParameters().set("KROSHA_FIRST_FORM_MINIONS_SPAWNED_TWICE", true);
world.spawnGroup("KROSHA_FIRST_FORM_MINIONS");
}
else if (world.getAliveNpcs(KROSHA_FIRST_FORM_MINIONS).isEmpty() && KROSHA_FIRST_FORM_MINIONS_SPAWNED_TWICE)
{
world.despawnGroup("KROSHA_FIRST_FORM");
showOnScreenMsg(world, NpcStringId.QUEEN_KROSHA_HAS_DISAPPEARED, ExShowScreenMessage.TOP_CENTER, 7000, true);
world.spawnGroup("ENHANCED_MINIONS");
}
}
else if (CommonUtil.contains(ENHANCED_MINIONS, npc.getId()))
{
if ((world.getAliveNpcs(ENHANCED_MINIONS).isEmpty()))
{
world.spawnGroup("KROSHA_FINAL_FORM");
showOnScreenMsg(world, NpcStringId.QUEEN_KROSHA_HAS_RETURNED_MORE_POWERFUL_THAN_EVER, ExShowScreenMessage.TOP_CENTER, 7000, true);
}
}
else if (npc.getId() == KROSHA_FINAL_FORM)
{
for (PlayerInstance member : world.getPlayers())
{
giveItems(member, BENUSTAS_REWARD_BOX);
}
showOnScreenMsg(world, NpcStringId.THE_WATER_POWER_PROTECTING_QUEEN_KROSHA_HAS_DISAPPEARED, ExShowScreenMessage.TOP_CENTER, 7000, true);
world.finishInstance();
}
else
{
world.setReenterTime();
}
}
}
return super.onKill(npc, killer, isPet);
}
public static void main(String[] args)
{
new KrofinNest();
}
}

View File

@@ -0,0 +1,4 @@
<html><body>Benusta:<br>
Aren't you in a party? But you are not the party leader.<br>
(Only the party leader can request to enter.)
</body></html>

View File

@@ -454,4 +454,48 @@
<node X="-161807" Y="72486" />
<node X="-162587" Y="85862" />
</zone>
<zone name="tp_krofin1" type="TeleportZone" shape="NPoly" minZ="-10400" maxZ="10000">
<stat name="oustX" val="151072" />
<stat name="oustY" val="250180" />
<stat name="oustZ" val="-7095" />
<stat name="instanceId" val="291" />
<stat name="targetClass" val="PlayerInstance" />
<node X="123222" Y="152541" />
<node X="123230" Y="153134" />
<node X="123205" Y="152889" />
<node X="122786" Y="152618" />
</zone>
<zone name="tp_krofin2" type="TeleportZone" shape="NPoly" minZ="-10400" maxZ="10000">
<stat name="oustX" val="142111" />
<stat name="oustY" val="250187" />
<stat name="oustZ" val="-7103" />
<stat name="instanceId" val="291" />
<stat name="targetClass" val="PlayerInstance" />
<node X="150442" Y="247979" />
<node X="149762" Y="248090" />
<node X="149625" Y="247505" />
<node X="149986" Y="247532" />
</zone>
<zone name="tp_krofin3" type="TeleportZone" shape="NPoly" minZ="-10400" maxZ="10000">
<stat name="oustX" val="150780" />
<stat name="oustY" val="242301" />
<stat name="oustZ" val="-7121" />
<stat name="instanceId" val="291" />
<stat name="targetClass" val="PlayerInstance" />
<node X="141289" Y="247972" />
<node X="141112" Y="248335" />
<node X="140742" Y="247920" />
<node X="140919" Y="247768" />
</zone>
<zone name="tp_krofin_boss" type="TeleportZone" shape="NPoly" minZ="-10400" maxZ="10000">
<stat name="oustX" val="142265" />
<stat name="oustY" val="241841" />
<stat name="oustZ" val="-6192" />
<stat name="instanceId" val="291" />
<stat name="targetClass" val="PlayerInstance" />
<node X="150112" Y="239750" />
<node X="149776" Y="240109" />
<node X="149758" Y="239301" />
<node X="149490" Y="238955" />
</zone>
</list>

View File

@@ -18350,4 +18350,40 @@
<status showHp="false" />
<openStatus default="close" />
</door>
<door id="24250002" name="Rachiq_Habitat_S.rachiq_Door01" >
<nodes nodeZ="-7192">
<node x="151333" y="248716" />
<node x="151334" y="248741" />
<node x="150927" y="248740" />
<node x="150927" y="248714" />
</nodes>
<location x="151131" y="248728" z="-7189" />
<stats basePDef="644" baseMDef="518" baseHpMax="169710" />
<status showHp="false" />
<openStatus default="close" />
</door>
<door id="24250004" name="Rachiq_Habitat_S.rachiq_Door01" >
<nodes nodeZ="-7192">
<node x="142375" y="248859" />
<node x="142374" y="248886" />
<node x="141967" y="248885" />
<node x="141965" y="248857" />
</nodes>
<location x="142171" y="248872" z="-7189" />
<stats basePDef="644" baseMDef="518" baseHpMax="169710" />
<status showHp="false" />
<openStatus default="close" />
</door>
<door id="24250006" name="Rachiq_Habitat_S.rachiq_Door01" >
<nodes nodeZ="-7192">
<node x="151015" y="240587" />
<node x="151014" y="240614" />
<node x="150607" y="240613" />
<node x="150605" y="240585" />
</nodes>
<location x="150811" y="240600" z="-7189" />
<stats basePDef="644" baseMDef="518" baseHpMax="169710" />
<status showHp="false" />
<openStatus default="close" />
</door>
</list>

View File

@@ -3,5 +3,6 @@ Welcome! My name is Benusta. I help adventurers to travel to instance zones. I c
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest BaylorWarzone enterInstance">Fight Baylor</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest NightmareKamaloka enterInstance">Go to Nightmare Kamaloka</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest AshenShadowRevolutionaries enterInstance">Go to Ashen Shadow Revolutionaries</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest KrofinNest enterInstance">Krofin's Nest</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SpiritForest enterInstance">Spirit Forest</Button>
</body></html>

View File

@@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Krofins Nest -->
<instance id="291" maxWorlds="100" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
<time duration="60" empty="1" />
<locations>
<enter type="FIXED">
<location x="124390" y="155333" z="-3713" heading="0" /> <!-- Krofin Nest -->
</enter>
<exit type="ORIGIN" />
</locations>
<conditions>
<condition type="Reenter" />
<condition type="Party" showMessageAndHtml="true">
<param name="html" value="condNoPartyLeader.html" />
</condition>
<condition type="PartyLeader" showMessageAndHtml="true">
<param name="html" value="condNoPartyLeader.html" />
</condition>
<condition type="GroupMin">
<param name="limit" value="2" />
</condition>
<condition type="GroupMax">
<param name="limit" value="7" />
</condition>
<condition type="Level">
<param name="min" value="105" />
</condition>
<condition type="Distance" />
</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="23220101">
<openStatus default="close" />
</door>
<door id="24250002">
<openStatus default="close" />
</door>
<door id="24250004">
<openStatus default="close" />
</door>
<door id="24250006">
<openStatus default="close" />
</door>
</doorlist>
<spawnlist>
<group name="FIRST_AREA" spawnByDefault="false">
<npc id="26398" x="123970" y="154547" z="-3664" heading="32542" /> <!-- Young Kropion -->
<npc id="26398" x="123906" y="154494" z="-3664" heading="32542" /> <!-- Young Kropion -->
<npc id="26398" x="124308" y="154585" z="-3664" heading="32542" /> <!-- Young Kropion -->
<npc id="26398" x="123833" y="154401" z="-3664" heading="32542" /> <!-- Young Kropion -->
<npc id="26396" x="124370" y="154268" z="-3666" heading="32542" /> <!-- Kropion -->
<npc id="26396" x="124131" y="154115" z="-3664" heading="32542" /> <!-- Kropion -->
<npc id="26396" x="124012" y="153981" z="-3664" heading="32542" /> <!-- Kropion -->
<npc id="26396" x="123682" y="154261" z="-3664" heading="32542" /> <!-- Kropion -->
<npc id="26398" x="124123" y="152724" z="-3667" heading="32542" /> <!-- Young Kropion -->
<npc id="26398" x="124200" y="153026" z="-3674" heading="32542" /> <!-- Young Kropion -->
<npc id="26398" x="124303" y="152969" z="-3670" heading="32542" /> <!-- Young Kropion -->
<npc id="26398" x="124399" y="152839" z="-3666" heading="32542" /> <!-- Young Kropion -->
<npc id="26396" x="124029" y="152515" z="-3670" heading="32542" /> <!-- Kropion -->
<npc id="26396" x="124268" y="152311" z="-3669" heading="32542" /> <!-- Kropion -->
</group>
<group name="SECOND_AREA" spawnByDefault="false">
<npc id="26396" x="150858" y="249727" z="-7112" heading="32542" /> <!-- Kropion -->
<npc id="26396" x="150598" y="249649" z="-7112" heading="32542" /> <!-- Kropion -->
<npc id="26396" x="151442" y="249603" z="-7112" heading="32542" /> <!-- Kropion -->
<npc id="26396" x="151294" y="249068" z="-7112" heading="32542" /> <!-- Kropion -->
</group>
<group name="THIRD_AREA" spawnByDefault="false">
<npc id="26395" x="142173" y="249603" z="-7112" heading="32542" /> <!-- Krotanion -->
<npc id="26397" x="141842" y="249717" z="-7112" heading="32542" /> <!-- Young Krotanion -->
<npc id="26397" x="141942" y="249900" z="-7112" heading="32542" /> <!-- Young Krotanion -->
<npc id="26397" x="142065" y="249808" z="-7112" heading="32542" /> <!-- Young Krotanion -->
<npc id="26397" x="142232" y="250114" z="-7101" heading="32542" /> <!-- Young Krotanion -->
<npc id="26397" x="142264" y="249813" z="-7112" heading="32542" /> <!-- Young Krotanion -->
<npc id="26397" x="142145" y="249693" z="-7112" heading="32542" /> <!-- Young Krotanion -->
<npc id="26397" x="142243" y="249603" z="-7112" heading="32542" /> <!-- Young Krotanion -->
<npc id="26397" x="142408" y="249281" z="-7112" heading="32542" /> <!-- Young Krotanion -->
</group>
<group name="FOURTH_AREA" spawnByDefault="false">
<npc id="26395" x="150536" y="241386" z="-7112" heading="32542" /> <!-- Krotanion -->
<npc id="26397" x="150470" y="241678" z="-7112" heading="32542" /> <!-- Young Krotanion -->
<npc id="26397" x="150720" y="241104" z="-7112" heading="32542" /> <!-- Young Krotanion -->
<npc id="26396" x="151089" y="241259" z="-7119" heading="32542" /> <!-- Kropion -->
</group>
<group name="KROPION_MINIONS" spawnByDefault="false">
<npc id="26398" x="151023" y="249494" z="-7095" heading="32542" /> <!-- Young Kropion -->
<npc id="26398" x="151023" y="249494" z="-7095" heading="32542" /> <!-- Young Kropion -->
<npc id="26398" x="151023" y="249494" z="-7095" heading="32542" /> <!-- Young Kropion -->
</group>
<group name="KROSHA_FIRST_FORM" spawnByDefault="false">
<npc id="26389" x="142395" y="240706" z="-6216" heading="32542" /> <!-- Queen Krosha First Form -->
</group>
<group name="KROSHA_FIRST_FORM_MINIONS" spawnByDefault="false">
<npc id="26393" x="142455" y="240523" z="-6224" heading="32542" /> <!-- Fragile Young Krotanion -->
<npc id="26394" x="142322" y="240618" z="-6224" heading="32542" /> <!-- Fragile Young Kropion -->
<npc id="26393" x="142273" y="240821" z="-6224" heading="32542" /> <!-- Fragile Young Krotanion -->
<npc id="26394" x="142398" y="240950" z="-6224" heading="32542" /> <!-- Fragile Young Kropion -->
<npc id="26393" x="142571" y="240895" z="-6224" heading="32542" /> <!-- Fragile Young Krotanion -->
<npc id="26394" x="142616" y="240616" z="-6224" heading="32542" /> <!-- Fragile Young Kropion -->
</group>
<group name="ENHANCED_MINIONS" spawnByDefault="false">
<npc id="26391" x="142124" y="240586" z="-6224" heading="6224" /> <!-- Enhanced Krotanion -->
<npc id="26392" x="142124" y="240586" z="-6224" heading="32542" /> <!-- Enhanced Kropion -->
<npc id="26392" x="142815" y="240935" z="-6209" heading="32542" /> <!-- Enhanced Kropion -->
</group>
<group name="KROSHA_FINAL_FORM" spawnByDefault="false">
<npc id="26390" x="142395" y="240706" z="-6216" heading="32542" /> <!-- Queen Krosha Final Form -->
</group>
<group name="KROSHA_FINAL_FORM_MINIONS" spawnByDefault="false">
<npc id="26391" x="142124" y="240586" z="-6224" heading="6224" /> <!-- Enhanced Krotanion -->
<npc id="26392" x="142124" y="240586" z="-6224" heading="32542" /> <!-- Enhanced Kropion -->
<npc id="26392" x="142815" y="240935" z="-6209" heading="32542" /> <!-- Enhanced Kropion -->
</group>
</spawnlist>
</instance>

View File

@@ -0,0 +1,269 @@
/*
* 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 instances.KrofinNest;
import org.l2jmobius.commons.util.CommonUtil;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.holders.ItemHolder;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.network.NpcStringId;
import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
import instances.AbstractInstance;
/**
* @author CostyKiller, NasSeKa
* @URL https://www.youtube.com/watch?v=UCI2lnm-Bc0
*/
public class KrofinNest extends AbstractInstance
{
// NPC
private static final int BENUSTA = 34542;
// Item
private static final ItemHolder BENUSTAS_REWARD_BOX = new ItemHolder(81151, 1);
// Misc
private static final int TEMPLATE_ID = 291; // Krofin Nest
private static final int DOOR1 = 23220101;
private static final int DOOR2 = 24250002;
private static final int DOOR3 = 24250004;
private static final int DOOR4 = 24250006;
private static final int[] FIRST_AREA =
{
26396,
26398
};
private static final int[] SECOND_AREA =
{
26396,
26398
};
private static final int[] THIRD_AREA =
{
26395,
26397
};
private static final int[] FOURTH_AREA =
{
26395,
26396,
26397,
26398
};
private static final int KROSHA_FIRST_FORM = 26389;
private static final int KROSHA_FINAL_FORM = 26390;
private static final int KROPION = 26396;
private static final int[] KROSHA_FIRST_FORM_MINIONS =
{
26393,
26394
};
private static final int[] ENHANCED_MINIONS =
{
26391,
26392
};
public KrofinNest()
{
super(TEMPLATE_ID);
addStartNpc(BENUSTA);
addTalkId(BENUSTA);
addAttackId(FIRST_AREA);
addAttackId(SECOND_AREA);
addAttackId(THIRD_AREA);
addAttackId(FOURTH_AREA);
addAttackId(KROSHA_FIRST_FORM);
addAttackId(KROSHA_FINAL_FORM);
addKillId(KROSHA_FIRST_FORM_MINIONS);
addKillId(ENHANCED_MINIONS);
addKillId(KROSHA_FINAL_FORM);
}
@Override
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
{
switch (event)
{
case "enterInstance":
{
enterInstance(player, npc, TEMPLATE_ID);
if (player.getInstanceWorld() != null)
{
startQuestTimer("check_status", 1000, null, player);
}
return null;
}
case "check_status":
{
final Instance world = player.getInstanceWorld();
if (!isInInstance(world))
{
return null;
}
switch (world.getStatus())
{
case 0:
{
world.setStatus(1);
world.spawnGroup("FIRST_AREA");
startQuestTimer("check_status", 10000, null, player);
break;
}
case 1:
{
if (world.getAliveNpcs(FIRST_AREA).isEmpty())
{
showOnScreenMsg(world, NpcStringId.THE_WATER_ENERGY_IS_NO_LONGER_ACTIVE_THE_WAY_IS_CLEAR, ExShowScreenMessage.TOP_CENTER, 10000, true);
world.setStatus(2);
world.getDoor(DOOR1).openMe();
world.spawnGroup("SECOND_AREA");
}
startQuestTimer("check_status", 1000, null, player);
break;
}
case 2:
{
if (world.getAliveNpcs(SECOND_AREA).isEmpty())
{
showOnScreenMsg(world, NpcStringId.THE_WATER_ENERGY_IS_NO_LONGER_ACTIVE_THE_WAY_IS_CLEAR, ExShowScreenMessage.TOP_CENTER, 10000, true);
world.setStatus(3);
world.getDoor(DOOR2).openMe();
world.spawnGroup("THIRD_AREA");
}
startQuestTimer("check_status", 10000, null, player);
break;
}
case 3:
{
if (world.getAliveNpcs(THIRD_AREA).isEmpty())
{
showOnScreenMsg(world, NpcStringId.THE_WATER_ENERGY_IS_NO_LONGER_ACTIVE_THE_WAY_IS_CLEAR, ExShowScreenMessage.TOP_CENTER, 10000, true);
world.setStatus(4);
world.getDoor(DOOR3).openMe();
world.spawnGroup("FOURTH_AREA");
}
startQuestTimer("check_status", 10000, null, player);
break;
}
case 4:
{
if (world.getAliveNpcs(FOURTH_AREA).isEmpty())
{
showOnScreenMsg(world, NpcStringId.THE_WATER_ENERGY_IS_NO_LONGER_ACTIVE_THE_WAY_IS_CLEAR, ExShowScreenMessage.TOP_CENTER, 10000, true);
world.setStatus(5);
world.getDoor(DOOR4).openMe();
world.spawnGroup("KROSHA_FIRST_FORM");
}
startQuestTimer("check_status", 10000, null, player);
break;
}
}
return null;
}
}
return super.onAdvEvent(event, npc, player);
}
@Override
public String onAttack(Npc npc, PlayerInstance attacker, int damage, boolean isSummon)
{
final Instance world = attacker.getInstanceWorld();
if (isInInstance(world))
{
final boolean KROPION_MINIONS_SPAWNED = world.getParameters().getBoolean("KROPION_MINIONS_SPAWNED", false);
final boolean KROSHA_FIRST_FORM_MINIONS_SPAWNED = world.getParameters().getBoolean("KROSHA_FIRST_FORM_MINIONS_SPAWNED", false);
final boolean KROSHA_FINAL_FORM_MINIONS_SPAWNED = world.getParameters().getBoolean("KROSHA_FINAL_FORM_MINIONS_SPAWNED", false);
if ((world.getStatus() == 2) && (npc.getId() == KROPION))
{
if (!KROPION_MINIONS_SPAWNED)
{
world.getParameters().set("KROPION_MINIONS_SPAWNED", true);
world.spawnGroup("KROPION_MINIONS");
}
}
else if (world.getStatus() == 5)
{
if ((npc.getId() == KROSHA_FIRST_FORM) && !KROSHA_FIRST_FORM_MINIONS_SPAWNED)
{
world.getParameters().set("KROSHA_FIRST_FORM_MINIONS_SPAWNED", true);
world.spawnGroup("KROSHA_FIRST_FORM_MINIONS");
}
else if ((npc.getId() == KROSHA_FINAL_FORM) && !KROSHA_FINAL_FORM_MINIONS_SPAWNED)
{
world.getParameters().set("KROSHA_FINAL_FORM_MINIONS_SPAWNED", true);
world.spawnGroup("KROSHA_FINAL_FORM_MINIONS");
}
}
}
return super.onAttack(npc, attacker, damage, isSummon);
}
@Override
public String onKill(Npc npc, PlayerInstance killer, boolean isPet)
{
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
final boolean KROSHA_FIRST_FORM_MINIONS_SPAWNED_TWICE = world.getParameters().getBoolean("KROSHA_FIRST_FORM_MINIONS_SPAWNED_TWICE", false);
if (world.getStatus() == 5)
{
if (CommonUtil.contains(KROSHA_FIRST_FORM_MINIONS, npc.getId()))
{
if (world.getAliveNpcs(KROSHA_FIRST_FORM_MINIONS).isEmpty() && !KROSHA_FIRST_FORM_MINIONS_SPAWNED_TWICE)
{
world.getParameters().set("KROSHA_FIRST_FORM_MINIONS_SPAWNED_TWICE", true);
world.spawnGroup("KROSHA_FIRST_FORM_MINIONS");
}
else if (world.getAliveNpcs(KROSHA_FIRST_FORM_MINIONS).isEmpty() && KROSHA_FIRST_FORM_MINIONS_SPAWNED_TWICE)
{
world.despawnGroup("KROSHA_FIRST_FORM");
showOnScreenMsg(world, NpcStringId.QUEEN_KROSHA_HAS_DISAPPEARED, ExShowScreenMessage.TOP_CENTER, 7000, true);
world.spawnGroup("ENHANCED_MINIONS");
}
}
else if (CommonUtil.contains(ENHANCED_MINIONS, npc.getId()))
{
if ((world.getAliveNpcs(ENHANCED_MINIONS).isEmpty()))
{
world.spawnGroup("KROSHA_FINAL_FORM");
showOnScreenMsg(world, NpcStringId.QUEEN_KROSHA_HAS_RETURNED_MORE_POWERFUL_THAN_EVER, ExShowScreenMessage.TOP_CENTER, 7000, true);
}
}
else if (npc.getId() == KROSHA_FINAL_FORM)
{
for (PlayerInstance member : world.getPlayers())
{
giveItems(member, BENUSTAS_REWARD_BOX);
}
showOnScreenMsg(world, NpcStringId.THE_WATER_POWER_PROTECTING_QUEEN_KROSHA_HAS_DISAPPEARED, ExShowScreenMessage.TOP_CENTER, 7000, true);
world.finishInstance();
}
else
{
world.setReenterTime();
}
}
}
return super.onKill(npc, killer, isPet);
}
public static void main(String[] args)
{
new KrofinNest();
}
}

View File

@@ -0,0 +1,4 @@
<html><body>Benusta:<br>
Aren't you in a party? But you are not the party leader.<br>
(Only the party leader can request to enter.)
</body></html>

View File

@@ -454,4 +454,48 @@
<node X="-161807" Y="72486" />
<node X="-162587" Y="85862" />
</zone>
<zone name="tp_krofin1" type="TeleportZone" shape="NPoly" minZ="-10400" maxZ="10000">
<stat name="oustX" val="151072" />
<stat name="oustY" val="250180" />
<stat name="oustZ" val="-7095" />
<stat name="instanceId" val="291" />
<stat name="targetClass" val="PlayerInstance" />
<node X="123222" Y="152541" />
<node X="123230" Y="153134" />
<node X="123205" Y="152889" />
<node X="122786" Y="152618" />
</zone>
<zone name="tp_krofin2" type="TeleportZone" shape="NPoly" minZ="-10400" maxZ="10000">
<stat name="oustX" val="142111" />
<stat name="oustY" val="250187" />
<stat name="oustZ" val="-7103" />
<stat name="instanceId" val="291" />
<stat name="targetClass" val="PlayerInstance" />
<node X="150442" Y="247979" />
<node X="149762" Y="248090" />
<node X="149625" Y="247505" />
<node X="149986" Y="247532" />
</zone>
<zone name="tp_krofin3" type="TeleportZone" shape="NPoly" minZ="-10400" maxZ="10000">
<stat name="oustX" val="150780" />
<stat name="oustY" val="242301" />
<stat name="oustZ" val="-7121" />
<stat name="instanceId" val="291" />
<stat name="targetClass" val="PlayerInstance" />
<node X="141289" Y="247972" />
<node X="141112" Y="248335" />
<node X="140742" Y="247920" />
<node X="140919" Y="247768" />
</zone>
<zone name="tp_krofin_boss" type="TeleportZone" shape="NPoly" minZ="-10400" maxZ="10000">
<stat name="oustX" val="142265" />
<stat name="oustY" val="241841" />
<stat name="oustZ" val="-6192" />
<stat name="instanceId" val="291" />
<stat name="targetClass" val="PlayerInstance" />
<node X="150112" Y="239750" />
<node X="149776" Y="240109" />
<node X="149758" Y="239301" />
<node X="149490" Y="238955" />
</zone>
</list>

View File

@@ -18350,4 +18350,40 @@
<status showHp="false" />
<openStatus default="close" />
</door>
<door id="24250002" name="Rachiq_Habitat_S.rachiq_Door01" >
<nodes nodeZ="-7192">
<node x="151333" y="248716" />
<node x="151334" y="248741" />
<node x="150927" y="248740" />
<node x="150927" y="248714" />
</nodes>
<location x="151131" y="248728" z="-7189" />
<stats basePDef="644" baseMDef="518" baseHpMax="169710" />
<status showHp="false" />
<openStatus default="close" />
</door>
<door id="24250004" name="Rachiq_Habitat_S.rachiq_Door01" >
<nodes nodeZ="-7192">
<node x="142375" y="248859" />
<node x="142374" y="248886" />
<node x="141967" y="248885" />
<node x="141965" y="248857" />
</nodes>
<location x="142171" y="248872" z="-7189" />
<stats basePDef="644" baseMDef="518" baseHpMax="169710" />
<status showHp="false" />
<openStatus default="close" />
</door>
<door id="24250006" name="Rachiq_Habitat_S.rachiq_Door01" >
<nodes nodeZ="-7192">
<node x="151015" y="240587" />
<node x="151014" y="240614" />
<node x="150607" y="240613" />
<node x="150605" y="240585" />
</nodes>
<location x="150811" y="240600" z="-7189" />
<stats basePDef="644" baseMDef="518" baseHpMax="169710" />
<status showHp="false" />
<openStatus default="close" />
</door>
</list>

View File

@@ -3,5 +3,6 @@ Welcome! My name is Benusta. I help adventurers to travel to instance zones. I c
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest BaylorWarzone enterInstance">Fight Baylor</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest NightmareKamaloka enterInstance">Go to Nightmare Kamaloka</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest AshenShadowRevolutionaries enterInstance">Go to Ashen Shadow Revolutionaries</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest KrofinNest enterInstance">Krofin's Nest</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SpiritForest enterInstance">Spirit Forest</Button>
</body></html>

View File

@@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Krofins Nest -->
<instance id="291" maxWorlds="100" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
<time duration="60" empty="1" />
<locations>
<enter type="FIXED">
<location x="124390" y="155333" z="-3713" heading="0" /> <!-- Krofin Nest -->
</enter>
<exit type="ORIGIN" />
</locations>
<conditions>
<condition type="Reenter" />
<condition type="Party" showMessageAndHtml="true">
<param name="html" value="condNoPartyLeader.html" />
</condition>
<condition type="PartyLeader" showMessageAndHtml="true">
<param name="html" value="condNoPartyLeader.html" />
</condition>
<condition type="GroupMin">
<param name="limit" value="2" />
</condition>
<condition type="GroupMax">
<param name="limit" value="7" />
</condition>
<condition type="Level">
<param name="min" value="105" />
</condition>
<condition type="Distance" />
</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="23220101">
<openStatus default="close" />
</door>
<door id="24250002">
<openStatus default="close" />
</door>
<door id="24250004">
<openStatus default="close" />
</door>
<door id="24250006">
<openStatus default="close" />
</door>
</doorlist>
<spawnlist>
<group name="FIRST_AREA" spawnByDefault="false">
<npc id="26398" x="123970" y="154547" z="-3664" heading="32542" /> <!-- Young Kropion -->
<npc id="26398" x="123906" y="154494" z="-3664" heading="32542" /> <!-- Young Kropion -->
<npc id="26398" x="124308" y="154585" z="-3664" heading="32542" /> <!-- Young Kropion -->
<npc id="26398" x="123833" y="154401" z="-3664" heading="32542" /> <!-- Young Kropion -->
<npc id="26396" x="124370" y="154268" z="-3666" heading="32542" /> <!-- Kropion -->
<npc id="26396" x="124131" y="154115" z="-3664" heading="32542" /> <!-- Kropion -->
<npc id="26396" x="124012" y="153981" z="-3664" heading="32542" /> <!-- Kropion -->
<npc id="26396" x="123682" y="154261" z="-3664" heading="32542" /> <!-- Kropion -->
<npc id="26398" x="124123" y="152724" z="-3667" heading="32542" /> <!-- Young Kropion -->
<npc id="26398" x="124200" y="153026" z="-3674" heading="32542" /> <!-- Young Kropion -->
<npc id="26398" x="124303" y="152969" z="-3670" heading="32542" /> <!-- Young Kropion -->
<npc id="26398" x="124399" y="152839" z="-3666" heading="32542" /> <!-- Young Kropion -->
<npc id="26396" x="124029" y="152515" z="-3670" heading="32542" /> <!-- Kropion -->
<npc id="26396" x="124268" y="152311" z="-3669" heading="32542" /> <!-- Kropion -->
</group>
<group name="SECOND_AREA" spawnByDefault="false">
<npc id="26396" x="150858" y="249727" z="-7112" heading="32542" /> <!-- Kropion -->
<npc id="26396" x="150598" y="249649" z="-7112" heading="32542" /> <!-- Kropion -->
<npc id="26396" x="151442" y="249603" z="-7112" heading="32542" /> <!-- Kropion -->
<npc id="26396" x="151294" y="249068" z="-7112" heading="32542" /> <!-- Kropion -->
</group>
<group name="THIRD_AREA" spawnByDefault="false">
<npc id="26395" x="142173" y="249603" z="-7112" heading="32542" /> <!-- Krotanion -->
<npc id="26397" x="141842" y="249717" z="-7112" heading="32542" /> <!-- Young Krotanion -->
<npc id="26397" x="141942" y="249900" z="-7112" heading="32542" /> <!-- Young Krotanion -->
<npc id="26397" x="142065" y="249808" z="-7112" heading="32542" /> <!-- Young Krotanion -->
<npc id="26397" x="142232" y="250114" z="-7101" heading="32542" /> <!-- Young Krotanion -->
<npc id="26397" x="142264" y="249813" z="-7112" heading="32542" /> <!-- Young Krotanion -->
<npc id="26397" x="142145" y="249693" z="-7112" heading="32542" /> <!-- Young Krotanion -->
<npc id="26397" x="142243" y="249603" z="-7112" heading="32542" /> <!-- Young Krotanion -->
<npc id="26397" x="142408" y="249281" z="-7112" heading="32542" /> <!-- Young Krotanion -->
</group>
<group name="FOURTH_AREA" spawnByDefault="false">
<npc id="26395" x="150536" y="241386" z="-7112" heading="32542" /> <!-- Krotanion -->
<npc id="26397" x="150470" y="241678" z="-7112" heading="32542" /> <!-- Young Krotanion -->
<npc id="26397" x="150720" y="241104" z="-7112" heading="32542" /> <!-- Young Krotanion -->
<npc id="26396" x="151089" y="241259" z="-7119" heading="32542" /> <!-- Kropion -->
</group>
<group name="KROPION_MINIONS" spawnByDefault="false">
<npc id="26398" x="151023" y="249494" z="-7095" heading="32542" /> <!-- Young Kropion -->
<npc id="26398" x="151023" y="249494" z="-7095" heading="32542" /> <!-- Young Kropion -->
<npc id="26398" x="151023" y="249494" z="-7095" heading="32542" /> <!-- Young Kropion -->
</group>
<group name="KROSHA_FIRST_FORM" spawnByDefault="false">
<npc id="26389" x="142395" y="240706" z="-6216" heading="32542" /> <!-- Queen Krosha First Form -->
</group>
<group name="KROSHA_FIRST_FORM_MINIONS" spawnByDefault="false">
<npc id="26393" x="142455" y="240523" z="-6224" heading="32542" /> <!-- Fragile Young Krotanion -->
<npc id="26394" x="142322" y="240618" z="-6224" heading="32542" /> <!-- Fragile Young Kropion -->
<npc id="26393" x="142273" y="240821" z="-6224" heading="32542" /> <!-- Fragile Young Krotanion -->
<npc id="26394" x="142398" y="240950" z="-6224" heading="32542" /> <!-- Fragile Young Kropion -->
<npc id="26393" x="142571" y="240895" z="-6224" heading="32542" /> <!-- Fragile Young Krotanion -->
<npc id="26394" x="142616" y="240616" z="-6224" heading="32542" /> <!-- Fragile Young Kropion -->
</group>
<group name="ENHANCED_MINIONS" spawnByDefault="false">
<npc id="26391" x="142124" y="240586" z="-6224" heading="6224" /> <!-- Enhanced Krotanion -->
<npc id="26392" x="142124" y="240586" z="-6224" heading="32542" /> <!-- Enhanced Kropion -->
<npc id="26392" x="142815" y="240935" z="-6209" heading="32542" /> <!-- Enhanced Kropion -->
</group>
<group name="KROSHA_FINAL_FORM" spawnByDefault="false">
<npc id="26390" x="142395" y="240706" z="-6216" heading="32542" /> <!-- Queen Krosha Final Form -->
</group>
<group name="KROSHA_FINAL_FORM_MINIONS" spawnByDefault="false">
<npc id="26391" x="142124" y="240586" z="-6224" heading="6224" /> <!-- Enhanced Krotanion -->
<npc id="26392" x="142124" y="240586" z="-6224" heading="32542" /> <!-- Enhanced Kropion -->
<npc id="26392" x="142815" y="240935" z="-6209" heading="32542" /> <!-- Enhanced Kropion -->
</group>
</spawnlist>
</instance>

View File

@@ -0,0 +1,280 @@
/*
* 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 instances.KrofinNest;
import org.l2jmobius.commons.util.Chronos;
import org.l2jmobius.commons.util.CommonUtil;
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.holders.ItemHolder;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.network.NpcStringId;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
import instances.AbstractInstance;
/**
* @author CostyKiller, NasSeKa
* @URL https://www.youtube.com/watch?v=UCI2lnm-Bc0
*/
public class KrofinNest extends AbstractInstance
{
// NPC
private static final int BENUSTA = 34542;
// Item
private static final ItemHolder BENUSTAS_REWARD_BOX = new ItemHolder(81151, 1);
// Misc
private static final int TEMPLATE_ID = 291; // Krofin Nest
private static final int DOOR1 = 23220101;
private static final int DOOR2 = 24250002;
private static final int DOOR3 = 24250004;
private static final int DOOR4 = 24250006;
private static final int[] FIRST_AREA =
{
26396,
26398
};
private static final int[] SECOND_AREA =
{
26396,
26398
};
private static final int[] THIRD_AREA =
{
26395,
26397
};
private static final int[] FOURTH_AREA =
{
26395,
26396,
26397,
26398
};
private static final int KROSHA_FIRST_FORM = 26389;
private static final int KROSHA_FINAL_FORM = 26390;
private static final int KROPION = 26396;
private static final int[] KROSHA_FIRST_FORM_MINIONS =
{
26393,
26394
};
private static final int[] ENHANCED_MINIONS =
{
26391,
26392
};
public KrofinNest()
{
super(TEMPLATE_ID);
addStartNpc(BENUSTA);
addTalkId(BENUSTA);
addAttackId(FIRST_AREA);
addAttackId(SECOND_AREA);
addAttackId(THIRD_AREA);
addAttackId(FOURTH_AREA);
addAttackId(KROSHA_FIRST_FORM);
addAttackId(KROSHA_FINAL_FORM);
addKillId(KROSHA_FIRST_FORM_MINIONS);
addKillId(ENHANCED_MINIONS);
addKillId(KROSHA_FINAL_FORM);
}
@Override
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
{
switch (event)
{
case "enterInstance":
{
// Cannot enter if player finished another instance.
if ((Chronos.currentTimeMillis() < InstanceManager.getInstance().getInstanceTime(player, 315)))
{
player.sendPacket(new SystemMessage(SystemMessageId.SINCE_C1_ENTERED_ANOTHER_INSTANCE_ZONE_THEREFORE_YOU_CANNOT_ENTER_THIS_DUNGEON).addString(player.getName()));
return null;
}
enterInstance(player, npc, TEMPLATE_ID);
if (player.getInstanceWorld() != null)
{
startQuestTimer("check_status", 1000, null, player);
}
return null;
}
case "check_status":
{
final Instance world = player.getInstanceWorld();
if (!isInInstance(world))
{
return null;
}
switch (world.getStatus())
{
case 0:
{
world.setStatus(1);
world.spawnGroup("FIRST_AREA");
startQuestTimer("check_status", 10000, null, player);
break;
}
case 1:
{
if (world.getAliveNpcs(FIRST_AREA).isEmpty())
{
showOnScreenMsg(world, NpcStringId.THE_WATER_ENERGY_IS_NO_LONGER_ACTIVE_THE_WAY_IS_CLEAR, ExShowScreenMessage.TOP_CENTER, 10000, true);
world.setStatus(2);
world.getDoor(DOOR1).openMe();
world.spawnGroup("SECOND_AREA");
}
startQuestTimer("check_status", 1000, null, player);
break;
}
case 2:
{
if (world.getAliveNpcs(SECOND_AREA).isEmpty())
{
showOnScreenMsg(world, NpcStringId.THE_WATER_ENERGY_IS_NO_LONGER_ACTIVE_THE_WAY_IS_CLEAR, ExShowScreenMessage.TOP_CENTER, 10000, true);
world.setStatus(3);
world.getDoor(DOOR2).openMe();
world.spawnGroup("THIRD_AREA");
}
startQuestTimer("check_status", 10000, null, player);
break;
}
case 3:
{
if (world.getAliveNpcs(THIRD_AREA).isEmpty())
{
showOnScreenMsg(world, NpcStringId.THE_WATER_ENERGY_IS_NO_LONGER_ACTIVE_THE_WAY_IS_CLEAR, ExShowScreenMessage.TOP_CENTER, 10000, true);
world.setStatus(4);
world.getDoor(DOOR3).openMe();
world.spawnGroup("FOURTH_AREA");
}
startQuestTimer("check_status", 10000, null, player);
break;
}
case 4:
{
if (world.getAliveNpcs(FOURTH_AREA).isEmpty())
{
showOnScreenMsg(world, NpcStringId.THE_WATER_ENERGY_IS_NO_LONGER_ACTIVE_THE_WAY_IS_CLEAR, ExShowScreenMessage.TOP_CENTER, 10000, true);
world.setStatus(5);
world.getDoor(DOOR4).openMe();
world.spawnGroup("KROSHA_FIRST_FORM");
}
startQuestTimer("check_status", 10000, null, player);
break;
}
}
return null;
}
}
return super.onAdvEvent(event, npc, player);
}
@Override
public String onAttack(Npc npc, PlayerInstance attacker, int damage, boolean isSummon)
{
final Instance world = attacker.getInstanceWorld();
if (isInInstance(world))
{
final boolean KROPION_MINIONS_SPAWNED = world.getParameters().getBoolean("KROPION_MINIONS_SPAWNED", false);
final boolean KROSHA_FIRST_FORM_MINIONS_SPAWNED = world.getParameters().getBoolean("KROSHA_FIRST_FORM_MINIONS_SPAWNED", false);
final boolean KROSHA_FINAL_FORM_MINIONS_SPAWNED = world.getParameters().getBoolean("KROSHA_FINAL_FORM_MINIONS_SPAWNED", false);
if ((world.getStatus() == 2) && (npc.getId() == KROPION))
{
if (!KROPION_MINIONS_SPAWNED)
{
world.getParameters().set("KROPION_MINIONS_SPAWNED", true);
world.spawnGroup("KROPION_MINIONS");
}
}
else if (world.getStatus() == 5)
{
if ((npc.getId() == KROSHA_FIRST_FORM) && !KROSHA_FIRST_FORM_MINIONS_SPAWNED)
{
world.getParameters().set("KROSHA_FIRST_FORM_MINIONS_SPAWNED", true);
world.spawnGroup("KROSHA_FIRST_FORM_MINIONS");
}
else if ((npc.getId() == KROSHA_FINAL_FORM) && !KROSHA_FINAL_FORM_MINIONS_SPAWNED)
{
world.getParameters().set("KROSHA_FINAL_FORM_MINIONS_SPAWNED", true);
world.spawnGroup("KROSHA_FINAL_FORM_MINIONS");
}
}
}
return super.onAttack(npc, attacker, damage, isSummon);
}
@Override
public String onKill(Npc npc, PlayerInstance killer, boolean isPet)
{
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
final boolean KROSHA_FIRST_FORM_MINIONS_SPAWNED_TWICE = world.getParameters().getBoolean("KROSHA_FIRST_FORM_MINIONS_SPAWNED_TWICE", false);
if (world.getStatus() == 5)
{
if (CommonUtil.contains(KROSHA_FIRST_FORM_MINIONS, npc.getId()))
{
if (world.getAliveNpcs(KROSHA_FIRST_FORM_MINIONS).isEmpty() && !KROSHA_FIRST_FORM_MINIONS_SPAWNED_TWICE)
{
world.getParameters().set("KROSHA_FIRST_FORM_MINIONS_SPAWNED_TWICE", true);
world.spawnGroup("KROSHA_FIRST_FORM_MINIONS");
}
else if (world.getAliveNpcs(KROSHA_FIRST_FORM_MINIONS).isEmpty() && KROSHA_FIRST_FORM_MINIONS_SPAWNED_TWICE)
{
world.despawnGroup("KROSHA_FIRST_FORM");
showOnScreenMsg(world, NpcStringId.QUEEN_KROSHA_HAS_DISAPPEARED, ExShowScreenMessage.TOP_CENTER, 7000, true);
world.spawnGroup("ENHANCED_MINIONS");
}
}
else if (CommonUtil.contains(ENHANCED_MINIONS, npc.getId()))
{
if ((world.getAliveNpcs(ENHANCED_MINIONS).isEmpty()))
{
world.spawnGroup("KROSHA_FINAL_FORM");
showOnScreenMsg(world, NpcStringId.QUEEN_KROSHA_HAS_RETURNED_MORE_POWERFUL_THAN_EVER, ExShowScreenMessage.TOP_CENTER, 7000, true);
}
}
else if (npc.getId() == KROSHA_FINAL_FORM)
{
for (PlayerInstance member : world.getPlayers())
{
giveItems(member, BENUSTAS_REWARD_BOX);
}
showOnScreenMsg(world, NpcStringId.THE_WATER_POWER_PROTECTING_QUEEN_KROSHA_HAS_DISAPPEARED, ExShowScreenMessage.TOP_CENTER, 7000, true);
world.finishInstance();
}
else
{
world.setReenterTime();
}
}
}
return super.onKill(npc, killer, isPet);
}
public static void main(String[] args)
{
new KrofinNest();
}
}

View File

@@ -0,0 +1,4 @@
<html><body>Benusta:<br>
Aren't you in a party? But you are not the party leader.<br>
(Only the party leader can request to enter.)
</body></html>

View File

@@ -454,4 +454,48 @@
<node X="-161807" Y="72486" />
<node X="-162587" Y="85862" />
</zone>
<zone name="tp_krofin1" type="TeleportZone" shape="NPoly" minZ="-10400" maxZ="10000">
<stat name="oustX" val="151072" />
<stat name="oustY" val="250180" />
<stat name="oustZ" val="-7095" />
<stat name="instanceId" val="291" />
<stat name="targetClass" val="PlayerInstance" />
<node X="123222" Y="152541" />
<node X="123230" Y="153134" />
<node X="123205" Y="152889" />
<node X="122786" Y="152618" />
</zone>
<zone name="tp_krofin2" type="TeleportZone" shape="NPoly" minZ="-10400" maxZ="10000">
<stat name="oustX" val="142111" />
<stat name="oustY" val="250187" />
<stat name="oustZ" val="-7103" />
<stat name="instanceId" val="291" />
<stat name="targetClass" val="PlayerInstance" />
<node X="150442" Y="247979" />
<node X="149762" Y="248090" />
<node X="149625" Y="247505" />
<node X="149986" Y="247532" />
</zone>
<zone name="tp_krofin3" type="TeleportZone" shape="NPoly" minZ="-10400" maxZ="10000">
<stat name="oustX" val="150780" />
<stat name="oustY" val="242301" />
<stat name="oustZ" val="-7121" />
<stat name="instanceId" val="291" />
<stat name="targetClass" val="PlayerInstance" />
<node X="141289" Y="247972" />
<node X="141112" Y="248335" />
<node X="140742" Y="247920" />
<node X="140919" Y="247768" />
</zone>
<zone name="tp_krofin_boss" type="TeleportZone" shape="NPoly" minZ="-10400" maxZ="10000">
<stat name="oustX" val="142265" />
<stat name="oustY" val="241841" />
<stat name="oustZ" val="-6192" />
<stat name="instanceId" val="291" />
<stat name="targetClass" val="PlayerInstance" />
<node X="150112" Y="239750" />
<node X="149776" Y="240109" />
<node X="149758" Y="239301" />
<node X="149490" Y="238955" />
</zone>
</list>