Addition of Dwelling Of Spirits instance.

Contributed by Serenitty.
This commit is contained in:
MobiusDevelopment 2022-02-24 11:21:59 +00:00
parent c6117843d8
commit 17b287427d
58 changed files with 4129 additions and 3195 deletions

View File

@ -992,43 +992,43 @@
<item id="93290" count="1" /> Victory Pack
</items>
</reward>
-->
<reward id="9001" reward_id="9001" name="Clan Raid Attack" requiredCompletion="1">
Weekly mission. A reward is given for defeating 1 enemy together with your clan members in the Clan Arena.
<!-- Weekly mission. A reward is given for defeating 1 enemy together with your clan members in the Clan Arena. -->
<handler name="monster">
<param name="minLevel">40</param>
<param name="maxLevel">99</param>
</handler>
<items>
<item id="3031" count="150" /> Spirit Ore
<item id="94481" count="50" /> Clan XP
<item id="94269" count="3" /> Scroll: Boost Attack
<item id="3031" count="150" /> <!-- Spirit Ore -->
<item id="94481" count="50" /> <!-- Clan XP -->
<item id="94269" count="3" /> <!-- Scroll: Boost Attack -->
</items>
</reward>
<reward id="9002" reward_id="9002" name="Dwelling of Spirits" requiredCompletion="50">
Weekly mission. A reward is given for defeating monsters during a clan raid to the Dwelling of Spirits.
<!-- Weekly mission. A reward is given for defeating monsters during a clan raid to the Dwelling of Spirits. -->
<handler name="monster">
<param name="minLevel">76</param>
<param name="maxLevel">99</param>
</handler>
<items>
<item id="91831" count="5" /> Improved Water Attack Potion
<item id="91832" count="5" /> Improved Wind Attack Potion
<item id="91833" count="5" /> Improved Earth Attack Potion
<item id="91830" count="5" /> Improved Fire Attack Potion
<item id="91831" count="5" /> <!-- Improved Water Attack Potion -->
<item id="91832" count="5" /> <!-- Improved Wind Attack Potion -->
<item id="91833" count="5" /> <!-- Improved Earth Attack Potion -->
<item id="91830" count="5" /> <!-- Improved Fire Attack Potion -->
</items>
</reward>
<reward id="9003" reward_id="9003" name="Spirit Kings" requiredCompletion="1">
Weekly mission. A reward is given for defeating Ignis, Nebula, Procella or Petram during a clan raid to the Dwelling of Spirits.
<!-- Weekly mission. A reward is given for defeating Ignis, Nebula, Procella or Petram during a clan raid to the Dwelling of Spirits. -->
<handler name="monster">
<param name="minLevel">76</param>
<param name="maxLevel">99</param>
</handler>
<items>
<item id="91831" count="5" /> Improved Water Attack Potion
<item id="91832" count="5" /> Improved Wind Attack Potion
<item id="91833" count="5" /> Improved Earth Attack Potion
<item id="91830" count="5" /> Improved Fire Attack Potion
<item id="91831" count="5" /> <!-- Improved Water Attack Potion -->
<item id="91832" count="5" /> <!-- Improved Wind Attack Potion -->
<item id="91833" count="5" /> <!-- Improved Earth Attack Potion -->
<item id="91830" count="5" /> <!-- Improved Fire Attack Potion -->
</items>
</reward>
-->
</list>

View File

@ -0,0 +1,125 @@
<?xml version="1.0" encoding="UTF-8"?>
<instance id="214" maxWorlds="80" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
<time duration="30" empty="3000000" />
<removeBuffs type="ALL" />
<locations>
<enter type="FIXED">
<location x="-114343" y="-77747" z="-11442" />
</enter>
<exit type="ORIGIN" />
</locations>
<conditions>
<condition type="Party" />
<condition type="CommandChannel" />
<condition type="CommandChannelLeader" />
<condition type="GroupMin">
<param name="limit" value="1" />
</condition>
<condition type="GroupMax">
<param name="limit" value="100" />
</condition>
<condition type="Level">
<param name="min" value="76" />
<param name="max" value="90" />
</condition>
<condition type="Distance" />
<condition type="Reenter" />
</conditions>
<reenter apply="ON_FINISH">
<reset day="MONDAY" hour="6" minute="30" /> <!-- Retail is 1 day week Only -->
<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>
<spawnlist>
<group name="ExitPortal" spawnByDefault="false">
<npc id="15970" x="-114343" y="-77747" z="-11442" heading="46786" /> <!-- Exit Portal -->
<npc id="15971" x="-114343" y="-77747" z="-11442" heading="46786" /> <!-- Exit Portal -->
<npc id="15972" x="-114343" y="-77720" z="-11442" heading="46786" /> <!-- Exit Portal -->
<npc id="15973" x="-114343" y="-77733" z="-11442" heading="46786" /> <!-- Exit Portal -->
<npc id="15974" x="-114343" y="-77755" z="-11442" heading="46786" /> <!-- Exit Portal -->
</group>
<group name="sealstone" spawnByDefault="true">
<npc id="34178" x="-114324" y="-78273" z="-11433" heading="15825" /> <!-- Seal Stone -->
</group>
<group name="animael" spawnByDefault="false">
<npc id="34176" x="-114324" y="-78273" z="-11433" heading="15474" /> <!-- Animael -->
</group>
<group name="NormalMobs" spawnByDefault="false">
<npc id="22272" x="-114091" y="-77461" z="-11443" heading="16383" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114048" y="-77429" z="-11443" heading="6673" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114045" y="-77406" z="-11443" heading="24645" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-113837" y="-76943" z="-11443" heading="8327" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-113945" y="-76923" z="-11443" heading="30858" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114859" y="-76897" z="-11443" heading="58120" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114785" y="-76841" z="-11443" heading="55942" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114711" y="-76987" z="-11443" heading="61107" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114699" y="-77113" z="-11443" heading="16383" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114723" y="-77045" z="-11443" heading="57831" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114852" y="-78363" z="-11443" heading="657" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114984" y="-78475" z="-11443" heading="1141" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114916" y="-78442" z="-11443" heading="65129" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114841" y="-78428" z="-11443" heading="63813" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114938" y="-78411" z="-11443" heading="9120" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-113616" y="-78459" z="-11443" heading="30680" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-113622" y="-78398" z="-11443" heading="28616" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-113591" y="-78301" z="-11442" heading="37105" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-113604" y="-78239" z="-11443" heading="35386" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-113693" y="-78249" z="-11443" heading="29763" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-113568" y="-78336" z="-11442" heading="28986" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-113818" y="-78174" z="-11443" heading="55979" /> <!-- Corrupted Fairy -->
<npc id="22272" x="-114618" y="-77313" z="-11443" heading="22097" /> <!-- Corrupted Fairy -->
<npc id="22272" x="-113589" y="-78333" z="-11443" heading="30535" /> <!-- Corrupted Fairy -->
<npc id="22272" x="-114840" y="-78561" z="-11443" heading="32322" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-113933" y="-77703" z="-11443" heading="1785" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-113872" y="-77793" z="-11443" heading="60399" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114852" y="-77864" z="-11443" heading="13028" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114822" y="-77925" z="-11443" heading="17015" /> <!-- Corrupted Fairy -->
<npc id="22272" x="-114554" y="-78998" z="-11443" heading="8750" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114193" y="-78871" z="-11441" heading="32032" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114105" y="-79053" z="-11443" heading="2811" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114456" y="-79050" z="-11443" heading="30111" /> <!-- Corrupted Fairy -->
<npc id="22272" x="-113845" y="-78477" z="-11443" heading="62467" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114676" y="-78345" z="-11439" heading="30937" /> <!-- Corrupted Fairy -->
</group>
<group name="ruipwave_1" spawnByDefault="false">
<npc id="22273" x="-113945" y="-76923" z="-11443" heading="30858" /> <!-- Ruip portal container-->
<npc id="22273" x="-114840" y="-78561" z="-11443" heading="32322" /> <!-- Ruip portal container -->
<npc id="22273" x="-114852" y="-77864" z="-11443" heading="13028" /> <!-- Ruip portal container-->
<npc id="22273" x="-114676" y="-78345" z="-11439" heading="30937" /> <!-- Ruip portal container -->
<npc id="22273" x="-113845" y="-78477" z="-11443" heading="62467" /> <!-- Ruip portal container-->
<npc id="22273" x="-114676" y="-78345" z="-11439" heading="30937" /> <!-- Ruip portal container -->
<npc id="22273" x="-113568" y="-78336" z="-11442" heading="28986" /> <!-- Ruip portal container -->
<npc id="22273" x="-113872" y="-77793" z="-11443" heading="60399" /> <!-- Ruip portal container -->
<npc id="22273" x="-113589" y="-78333" z="-11443" heading="30535" /> <!-- Ruip portal container -->
<npc id="22273" x="-113818" y="-78174" z="-11443" heading="55979" /> <!-- Ruip portal container -->
</group>
<group name="ruipwave_2" spawnByDefault="false">
<npc id="22273" x="-113622" y="-78398" z="-11443" heading="28616" /> <!-- Ruip portal container-->
<npc id="22273" x="-113622" y="-78398" z="-11443" heading="28616" /> <!-- Ruip portal container -->
<npc id="22273" x="-114323" y="-78914" z="-11443" heading="13828" /> <!-- Ruip portal container -->
<npc id="22273" x="-114676" y="-78345" z="-11439" heading="30937" /> <!-- Ruip portal container -->
<npc id="22273" x="-114840" y="-78561" z="-11443" heading="32322" /> <!-- Ruip portal container -->
<npc id="22273" x="-114676" y="-78345" z="-11439" heading="30937" /> <!-- Ruip portal container -->
<npc id="22273" x="-114785" y="-76841" z="-11443" heading="55942" /> <!-- Ruip portal container -->
<npc id="22273" x="-114554" y="-78998" z="-11443" heading="8750" /> <!-- Ruip portal container -->
<npc id="22273" x="-114841" y="-78428" z="-11443" heading="63813" /> <!-- Ruip portal container -->
<npc id="22273" x="-114840" y="-78561" z="-11443" heading="32322" /> <!-- Ruip portal container -->
</group>
<group name="portalearth" spawnByDefault="false">
<npc id="15971" x="-113516" y="-77521" z="-11419" heading="8750" />
</group>
<group name="portalwind" spawnByDefault="false">
<npc id="15969" x="-114554" y="-78998" z="-11443" heading="8750" />
</group>
<group name="portalfire" spawnByDefault="false">
<npc id="15970" x="-114554" y="-78998" z="-11443" heading="8750" />
</group>
<group name="portalwater" spawnByDefault="false">
<npc id="15972" x="-114554" y="-78998" z="-11443" heading="8750" />
</group>
</spawnlist>
</instance>

View File

@ -1,38 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<instance id="195" maxWorlds="80" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
<time duration="120" empty="0" />
<removeBuffs type="ALL" />
<locations>
<enter type="FIXED">
<location x="202374" y="168153" z="-15485" />
</enter>
<exit type="ORIGIN" />
</locations>
<conditions>
<condition type="Party" />
<condition type="CommandChannel" />
<condition type="CommandChannelLeader" />
<condition type="GroupMin">
<param name="limit" value="18" /> <!-- The Kamael update -->
</condition>
<condition type="GroupMax">
<param name="limit" value="100" />
</condition>
<condition type="Level">
<param name="min" value="76" />
<param name="max" value="82" />
</condition>
<condition type="Distance" />
<condition type="Reenter" />
</conditions>
<reenter apply="ON_ENTER">
<reset day="WEDNESDAY" hour="6" minute="30" />
</reenter>
<spawnlist>
<group>
<npc id="29105" x="202350" y="169121" z="-15484" heading="48103" /> <!-- Ignis -->
<npc id="29109" x="202353" y="170347" z="-15484" heading="46786" /> <!-- Freya -->
<npc id="29110" x="202353" y="170347" z="-15484" heading="46786" /> <!-- Safe Zone -->
</group>
</spawnlist>
</instance>

View File

@ -1,36 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<instance id="198" maxWorlds="80" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
<time duration="120" empty="0" />
<removeBuffs type="ALL" />
<locations>
<enter type="FIXED">
<location x="222081" y="190538" z="-15485" />
</enter>
<exit type="ORIGIN" />
</locations>
<conditions>
<condition type="Party" />
<condition type="CommandChannel" />
<condition type="CommandChannelLeader" />
<condition type="GroupMin">
<param name="limit" value="18" /> <!-- The Kamael update -->
</condition>
<condition type="GroupMax">
<param name="limit" value="100" />
</condition>
<condition type="Level">
<param name="min" value="76" />
<param name="max" value="82" />
</condition>
<condition type="Distance" />
<condition type="Reenter" />
</conditions>
<reenter apply="ON_ENTER">
<reset day="WEDNESDAY" hour="6" minute="30" />
</reenter>
<spawnlist>
<group>
<npc id="29108" x="222063" y="191514" z="-15486" heading="50142" /> <!-- Petram -->
</group>
</spawnlist>
</instance>

View File

@ -1,31 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<instance id="197" maxWorlds="80" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
<time duration="120" empty="0" />
<removeBuffs type="ALL" />
<locations>
<enter type="FIXED">
<location x="212884" y="178847" z="-15485" />
</enter>
<exit type="ORIGIN" />
</locations>
<conditions>
<condition type="Party" />
<condition type="CommandChannel" />
<condition type="CommandChannelLeader" />
<condition type="GroupMin">
<param name="limit" value="18" /> <!-- The Kamael update -->
</condition>
<condition type="GroupMax">
<param name="limit" value="100" />
</condition>
<condition type="Level">
<param name="min" value="76" />
<param name="max" value="82" />
</condition>
<condition type="Distance" />
<condition type="Reenter" />
</conditions>
<reenter apply="ON_ENTER">
<reset day="WEDNESDAY" hour="6" minute="30" />
</reenter>
</instance>

View File

@ -1,36 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<instance id="196" maxWorlds="80" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
<time duration="120" empty="0" />
<removeBuffs type="ALL" />
<locations>
<enter type="FIXED">
<location x="222149" y="168087" z="-15485" />
</enter>
<exit type="ORIGIN" />
</locations>
<conditions>
<condition type="Party" />
<condition type="CommandChannel" />
<condition type="CommandChannelLeader" />
<condition type="GroupMin">
<param name="limit" value="18" /> <!-- The Kamael update -->
</condition>
<condition type="GroupMax">
<param name="limit" value="100" />
</condition>
<condition type="Level">
<param name="min" value="76" />
<param name="max" value="82" />
</condition>
<condition type="Distance" />
<condition type="Reenter" />
</conditions>
<reenter apply="ON_ENTER">
<reset day="WEDNESDAY" hour="6" minute="30" />
</reenter>
<spawnlist>
<group>
<npc id="29106" x="222127" y="169057" z="-15486" heading="48730" /> <!-- Nebula -->
</group>
</spawnlist>
</instance>

View File

@ -21,6 +21,7 @@ import java.util.StringTokenizer;
import org.l2jmobius.gameserver.data.sql.ClanTable;
import org.l2jmobius.gameserver.enums.UserInfoType;
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
import org.l2jmobius.gameserver.instancemanager.GlobalVariablesManager;
import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.clan.Clan;
@ -196,6 +197,26 @@ public class AdminPledge implements IAdminCommandHandler
}
break;
}
case "arena":
{
if (clan == null)
{
BuilderUtil.sendSysMessage(activeChar, "Target player has no clan!");
break;
}
try
{
final int stage = Integer.parseInt(param);
GlobalVariablesManager.getInstance().set(GlobalVariablesManager.MONSTER_ARENA_VARIABLE + clan.getId(), stage);
BuilderUtil.sendSysMessage(activeChar, "You set " + stage + " Monster Arena stage for clan " + clan.getName() + "");
}
catch (Exception e)
{
BuilderUtil.sendSysMessage(activeChar, "Usage: //pledge arena <number>");
}
break;
}
}
break;
}

View File

@ -0,0 +1,4 @@
<html><body>Animael:<br>
All done here?<br>
<Button ALIGN=LEFT ICON="TELEPORT" action="bypass -h Quest DwellingOfSpirits TELEPORT">ByeByeBye</Button>
</body></html>

View File

@ -10,30 +10,30 @@
</table>
<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td align=center>Expand the influence of your clan!</td>
<td align=center>In order to give every clan a chance to test their might a special venue was created. It s called the<font color="LEVEL"> Clan arena.</font></td>
</tr>
<tr>
<td height=10></td>
</tr>
<tr>
<td align=center>Create alliance and challenge the enemies!</td>
<td align=center>Gather a <font color="LEVEL">command channel</font> and go to the Clan Arena</td>
</tr>
<tr>
<td height=19></td>
</tr>
<tr>
<td align=center>
<button action="bypass -h Quest MonsterArena enter_monster_arena" value="Go to the Clan Arena" width="230" height="31" back="BranchSys3.icon2.ArmyTrainingBtn_down" fore="L2UI_CT1.OlympiadWnd_DF_Apply">
<button action="bypass -h Quest MonsterArena enter_monster_arena" value="Enter the Clan Arena" width="230" height="31" back="BranchSys3.icon2.ArmyTrainingBtn_down" fore="L2UI_CT1.OlympiadWnd_DF_Apply">
</td>
</tr>
<tr>
<td align=center>
<button action="bypass -h Quest MonsterArena 30202-02.htm" value="Learn about the Clan Arena" width="230" height="31" back="BranchSys3.icon2.ArmyTrainingInfo_down" fore="BranchSys3.icon2.ArmyTrainingInfo">
<button action="bypass -h Quest MonsterArena 30202-02.htm" value="Ask about the Clan Arena" width="230" height="31" back="BranchSys3.icon2.ArmyTrainingInfo_down" fore="BranchSys3.icon2.ArmyTrainingInfo">
</td>
</tr>
<tr>
<td align=center>
<button action="bypass -h npc_%objectId%_multisell 3020201" value="Exchange Item" width="230" height="31" back="L2UI_CT1.HtmlWnd_DF_Awake_Down" fore="L2UI_CT1.HtmlWnd_DF_Awake">
<button action="bypass -h Quest MonsterArena 34169-01.htm" value="Back" width="230" height="31" back="L2UI_CT1.HtmlWnd_DF_Awake_Down" fore="L2UI_CT1.HtmlWnd_DF_Awake">
</td>
</tr>
</table>

View File

@ -1,8 +1,18 @@
<html><body>Leo:<br>
Hello! We created special area in the Monster Arena for hard fights between characters in alliances. So go into battle for glory and power!<br>
To enter the Arena, members of one clan must form an <font color="LEVEL">alliance</font>, and clan leader must confirm leader's rights.<br>
Remember that you can go to Arena only for <font color="LEVEL">20 minutes</font>! Of course, you can extend residence time. Well spend this fee for various research than help us to improve Arena.<br>
Arena battles are held <font color="LEVEL">once a week</font>, the count is reset <font color="LEVEL">every Wednesday at 6:30 a.m</font>. Battle begins with <font color="LEVEL">Raid 20 Lv</font>. Level of available Raids grows gradually. Thanks to the progress' statistics higher level Raid will be available each week.<br>
The best thing is to have in alliance <font color="LEVEL">as many characters as possible</font>.<br>
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h Quest MonsterArena 30202-01.htm">Home</Button>
<html>
<body scroll="no">
<table border=0 cellpadding=0 cellspacing=0 width=292 height=358 background="L2UI_CH3.refinewnd_back_Pattern">
<tr>
<td valign="top" align="center">
<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td align=center width=185 height=185 background="BranchSys3.icon2.ArmyTrainingEmblem"></td>
</tr>
</table>
While at the Clan Arena a command channel created members of the same clan<br>
can respond to a challenge. You can stay inside for <font color="LEVEL">3 minutes.</font>,<br>
you can, however, extend you stay. Battles take place <font color="LEVEL">once a week,</font>
<font color="LEVEL">the counter</font>is reset <font color="LEVEL">every Wednesday</font>. the raid consist of 25 consecutive stages.<br>
Your progress is saved so you can start at the stage where you left off the week before.<br>
The stages will get significantly harder after you cleared the first 20..<br>
<button action="bypass -h Quest MonsterArena 34169-01.htm" value="Back" width="230" height="31" back="L2UI_CT1.HtmlWnd_DF_Awake_Down" fore="L2UI_CT1.HtmlWnd_DF_Awake">
</body></html>

View File

@ -1,5 +1,14 @@
<html><body>Leo:<br>
To enter the Arena, members of one clan must form an alliance, and clan leader must make an entrance request.<br>
Alliance can not enter the Arena without an entrance request from it's leader.<br>
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h Quest MonsterArena 30202-01.htm">Home</Button>
<html>
<body scroll="no">
<table border=0 cellpadding=0 cellspacing=0 width=292 height=358 background="L2UI_CH3.refinewnd_back_Pattern">
<tr>
<td valign="top" align="center">
<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td align=center width=185 height=185 background="BranchSys3.icon2.ArmyTrainingEmblem"></td>
</tr>
</table>
The battle won't be easy, so there are certain conditions for participation.
You can join battle only as a member of a <font color="LEVEL">party-command channel.</font><br>
<button action="bypass -h Quest MonsterArena 34169-01.htm" value="Back" width="230" height="31" back="L2UI_CT1.HtmlWnd_DF_Awake_Down" fore="L2UI_CT1.HtmlWnd_DF_Awake">
</body></html>

View File

@ -0,0 +1,44 @@
<html>
<body scroll="no">
<table border=0 cellpadding=0 cellspacing=0 width=292 height=358 background="L2UI_CH3.refinewnd_back_Pattern">
<tr>
<td valign="top" align="center">
<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td align=center width=185 height=185 background="BranchSys3.icon2.ArmyTrainingEmblem"></td>
</tr>
</table>
<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td align=center>Nothing is impossible for a clan of friends!</td>
</tr>
<tr>
<td height=10></td>
</tr>
<tr>
<td align=center>Create a command channel and go for it!</td>
</tr>
<tr>
<td height=19></td>
</tr>
<tr>
<td align=center>
<button action="bypass -h Quest MonsterArena 30202-01.htm" value="Clan Arena" width="230" height="31" back="BranchSys3.icon2.ArmyTrainingInfo_down" fore="BranchSys3.icon2.ArmyTrainingInfo">
</td>
</tr>
<tr>
<td align=center>
<button action="bypass -h Quest MonsterArena 34169-04.htm" value="Frintezza Raid" width="230" height="31" back="BranchSys3.icon2.ArmyTrainingInfo_down" fore="BranchSys3.icon2.ArmyTrainingInfo">
</td>
</tr>
<tr>
<td align=center>
<button action="bypass -h Quest MonsterArena 34169-02.htm" value="Dwelling of Spirits" width="230" height="31" back="BranchSys3.icon2.ArmyTrainingInfo_down" fore="BranchSys3.icon2.ArmyTrainingInfo">
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>

View File

@ -0,0 +1,13 @@
<html>
<body scroll="no">
<table border=0 cellpadding=0 cellspacing=0 width=292 height=358 background="L2UI_CH3.refinewnd_back_Pattern">
<tr>
<td valign="top" align="center">
<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td align=center width=185 height=185 background="BranchSys3.icon2.ArmyTrainingEmblem"></td>
</tr>
</table>
<button action="bypass -h Quest DwellingOfSpirits ENTER" value="Dwelling of Spirits" width="230" height="31" back="BranchSys3.icon2.ArmyTrainingInfo_down" fore="BranchSys3.icon2.ArmyTrainingInfo">
<button action="bypass -h Quest MonsterArena 34169-01.htm" value="Back" width="230" height="31" back="L2UI_CT1.HtmlWnd_DF_Awake_Down" fore="L2UI_CT1.HtmlWnd_DF_Awake">
</body></html>

View File

@ -0,0 +1,16 @@
<html>
<body scroll="no">
<table border=0 cellpadding=0 cellspacing=0 width=292 height=358 background="L2UI_CH3.refinewnd_back_Pattern">
<tr>
<td valign="top" align="center">
<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td align=center width=185 height=185 background="BranchSys3.icon2.ArmyTrainingEmblem"></td>
</tr>
</table>
<font color="LEVEL">Punitive expedition againt Frintezza</font> is available for
command channels with <font color="LEVEL">10-40 warriors, all of whom have reached Lv 76.</font>,<br>
After the start of the expedition you will have<font color="LEVEL">60 minutes</font>to finish it.<br>
<font color="LEVEL">Every Wednesday and Saturday</font><br>
<button action="bypass -h Quest MonsterArena 34169-01.htm" value="Back" width="230" height="31" back="L2UI_CT1.HtmlWnd_DF_Awake_Down" fore="L2UI_CT1.HtmlWnd_DF_Awake">
</body></html>

View File

@ -0,0 +1,48 @@
<html>
<body scroll="no">
<table border=0 cellpadding=0 cellspacing=0 width=292 height=358 background="L2UI_CH3.refinewnd_back_Pattern">
<tr>
<td valign="top" align="center">
<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td align=center width=185 height=185 background="BranchSys3.icon2.ArmyTrainingEmblem"></td>
</tr>
</table>
<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td align=center>Join the punitive expedition against Frintezza,</font></td>
</tr>
<tr>
<td height=10></td>
</tr>
<tr>
<td align=center>the last prince of Elmoreden,</font></td>
</tr>
<tr>
<td height=10></td>
</tr>
<tr>
<td align=center>who chose to accept the power</font></td>
</tr>
<tr>
<td height=19></td>
</tr>
<tr>
<td align=center>
<button action="bypass -h Quest LastImperialTomb" value="Enter Frintezza Expedition" width="230" height="31" back="BranchSys3.icon2.ArmyTrainingBtn_down" fore="L2UI_CT1.OlympiadWnd_DF_Apply">
</td>
</tr>
<tr>
<td align=center>
<button action="bypass -h Quest MonsterArena 34169-03.htm" value="Briefing about Expedition Frintezza" width="230" height="31" back="BranchSys3.icon2.ArmyTrainingInfo_down" fore="BranchSys3.icon2.ArmyTrainingInfo">
</td>
</tr>
<tr>
<td align=center>
<button action="bypass -h Quest MonsterArena 34169-01.htm" value="Back" width="230" height="31" back="L2UI_CT1.HtmlWnd_DF_Awake_Down" fore="L2UI_CT1.HtmlWnd_DF_Awake">
</td>
</tr>
</table>
</td>
</tr>
</table>

View File

@ -20,11 +20,21 @@ import java.util.Collection;
import java.util.concurrent.ConcurrentHashMap;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.gameserver.data.xml.SkillData;
import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.instancemanager.GlobalVariablesManager;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.clan.Clan;
import org.l2jmobius.gameserver.model.clan.ClanMember;
import org.l2jmobius.gameserver.model.events.EventType;
import org.l2jmobius.gameserver.model.events.ListenerRegisterType;
import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
import org.l2jmobius.gameserver.model.events.annotations.RegisterType;
import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerClanLeft;
import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerLogin;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.skill.Skill;
import org.l2jmobius.gameserver.network.NpcStringId;
import org.l2jmobius.gameserver.network.serverpackets.ExSendUIEvent;
@ -32,12 +42,12 @@ import instances.AbstractInstance;
/**
* @author Mobius
* @URL https://l2wiki.com/classic/Clan_-_Clan_Arena
* @URL https://www.l2central.info/essence/articles/793.html?lang=en
*/
public class MonsterArena extends AbstractInstance
{
// NPCs
private static final int LEO = 30202;
private static final int KOLDRUT_JAY = 34169;
private static final int MACHINE = 30203;
private static final int SUPPLIES = 30204;
private static final int[] BOSSES =
@ -62,26 +72,33 @@ public class MonsterArena extends AbstractInstance
25811, // Satur
25812, // Kosnak
25813, // Garaki
// TODO: 21-25 bosses
// 25834, // Shadai
// 25835, // Tyrobait
// 25836, // Tier
// 25837, // Cherkia
// 25838, // Spicula
};
// Rewards
private static final int BATTLE_BOX_1 = 70917;
private static final int BATTLE_BOX_2 = 70918;
private static final int BATTLE_BOX_3 = 70919;
private static final int BATTLE_BOX_4 = 70920;
private static final int TICKET_L = 90945;
private static final int BATTLE_BOX_1 = 90913;
private static final int BATTLE_BOX_2 = 90913;
private static final int BATTLE_BOX_3 = 90914;
private static final int BATTLE_BOX_4 = 90914;
private static final int VALOR_BOX = 90915;
private static final int TICKET_M = 90946;
private static final int TICKET_H = 90947;
// Skill
private static final int CLAN_EXUBERANCE = 1867;
// Misc
private static final Collection<Player> REWARDED_PLAYERS = ConcurrentHashMap.newKeySet();
private static final String MONSTER_ARENA_VARIABLE = "MA_C";
private static final int TEMPLATE_ID = 192;
public MonsterArena()
{
super(TEMPLATE_ID);
addStartNpc(LEO, MACHINE, SUPPLIES);
addFirstTalkId(LEO, MACHINE, SUPPLIES);
addTalkId(LEO, MACHINE, SUPPLIES);
addStartNpc(KOLDRUT_JAY, MACHINE, SUPPLIES);
addFirstTalkId(KOLDRUT_JAY, MACHINE, SUPPLIES);
addTalkId(KOLDRUT_JAY, MACHINE, SUPPLIES);
addKillId(BOSSES);
addInstanceLeaveId(TEMPLATE_ID);
}
@ -91,6 +108,11 @@ public class MonsterArena extends AbstractInstance
{
switch (event)
{
case "34169.htm":
case "34169-01.htm":
case "34169-02.htm":
case "34169-03.htm":
case "34169-04.htm":
case "30202-01.htm":
case "30202-02.htm":
case "30202-03.htm":
@ -146,16 +168,16 @@ public class MonsterArena extends AbstractInstance
machine.setScriptValue(player.getClanId());
// Initialize progress if it does not exist.
if (GlobalVariablesManager.getInstance().getInt(MONSTER_ARENA_VARIABLE + machine.getScriptValue(), -1) == -1)
if (GlobalVariablesManager.getInstance().getInt(GlobalVariablesManager.MONSTER_ARENA_VARIABLE + machine.getScriptValue(), -1) == -1)
{
GlobalVariablesManager.getInstance().set(MONSTER_ARENA_VARIABLE + machine.getScriptValue(), 1);
GlobalVariablesManager.getInstance().set(GlobalVariablesManager.MONSTER_ARENA_VARIABLE + machine.getScriptValue(), 1);
}
// On max progress, set last four bosses.
final int progress = GlobalVariablesManager.getInstance().getInt(MONSTER_ARENA_VARIABLE + machine.getScriptValue());
if (progress > 17)
final int progress = GlobalVariablesManager.getInstance().getInt(GlobalVariablesManager.MONSTER_ARENA_VARIABLE + machine.getScriptValue());
if (progress > 17) // TODO: 22 for 25 total bosses.
{
GlobalVariablesManager.getInstance().set(MONSTER_ARENA_VARIABLE + machine.getScriptValue(), 17);
GlobalVariablesManager.getInstance().set(GlobalVariablesManager.MONSTER_ARENA_VARIABLE + machine.getScriptValue(), 17); // TODO: 22 for 25 total bosses.
}
startQuestTimer("machine_talk", 10000, machine, null);
@ -181,7 +203,7 @@ public class MonsterArena extends AbstractInstance
world.setStatus(1);
for (Player plr : world.getPlayers())
{
plr.sendPacket(new ExSendUIEvent(plr, false, false, 1200, 0, NpcStringId.TIME_LEFT));
plr.sendPacket(new ExSendUIEvent(plr, false, false, 1800, 0, NpcStringId.TIME_LEFT));
}
}
break;
@ -191,7 +213,7 @@ public class MonsterArena extends AbstractInstance
final Instance world = npc.getInstanceWorld();
if (world != null)
{
world.spawnGroup("boss_" + GlobalVariablesManager.getInstance().getInt(MONSTER_ARENA_VARIABLE + npc.getScriptValue()));
world.spawnGroup("boss_" + GlobalVariablesManager.getInstance().getInt(GlobalVariablesManager.MONSTER_ARENA_VARIABLE + npc.getScriptValue()));
}
break;
}
@ -210,7 +232,7 @@ public class MonsterArena extends AbstractInstance
// Mandatory reward.
final Npc machine = world.getNpc(MACHINE);
final int progress = GlobalVariablesManager.getInstance().getInt(MONSTER_ARENA_VARIABLE + machine.getScriptValue());
final int progress = GlobalVariablesManager.getInstance().getInt(GlobalVariablesManager.MONSTER_ARENA_VARIABLE + machine.getScriptValue());
if (progress > 16)
{
giveItems(player, BATTLE_BOX_4, 1);
@ -231,7 +253,7 @@ public class MonsterArena extends AbstractInstance
// Rare reward.
if (getRandom(100) < 1) // 1% chance.
{
giveItems(player, TICKET_L, 1);
giveItems(player, VALOR_BOX, 1);
}
else if (getRandom(100) < 1) // 1% chance.
{
@ -283,7 +305,7 @@ public class MonsterArena extends AbstractInstance
machine.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.HA_NOT_BAD);
// Save progress to global variables.
GlobalVariablesManager.getInstance().increaseInt(MONSTER_ARENA_VARIABLE + machine.getScriptValue(), 1);
GlobalVariablesManager.getInstance().increaseInt(GlobalVariablesManager.MONSTER_ARENA_VARIABLE + machine.getScriptValue(), 1);
// Spawn reward chests.
world.spawnGroup("supplies");
@ -312,6 +334,48 @@ public class MonsterArena extends AbstractInstance
return npc.getId() + "-01.htm";
}
@RegisterEvent(EventType.ON_PLAYER_LOGIN)
@RegisterType(ListenerRegisterType.GLOBAL_PLAYERS)
public void onPlayerLogin(OnPlayerLogin event)
{
final Player player = event.getPlayer();
if (player == null)
{
return;
}
final Clan clan = player.getClan();
if (clan == null)
{
// Should never happen.
final Skill knownSkill = player.getKnownSkill(CLAN_EXUBERANCE);
if (knownSkill != null)
{
player.removeSkill(knownSkill, true);
}
return;
}
final int stage = GlobalVariablesManager.getInstance().getInt(GlobalVariablesManager.MONSTER_ARENA_VARIABLE + clan.getId(), 0);
if (stage > 4)
{
player.addSkill(SkillData.getInstance().getSkill(CLAN_EXUBERANCE, stage / 5), false);
}
}
@RegisterEvent(EventType.ON_PLAYER_CLAN_LEFT)
@RegisterType(ListenerRegisterType.GLOBAL_PLAYERS)
public void onPlayerClanLeft(OnPlayerClanLeft event)
{
final ClanMember member = event.getClanMember();
if ((member == null) || !member.isOnline())
{
return;
}
member.getPlayer().removeSkill(CLAN_EXUBERANCE, true);
}
public static void main(String[] args)
{
new MonsterArena();

View File

@ -1,248 +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 instances.ResidenceOfKingIgnis;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.enums.SkillFinishType;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.holders.SkillHolder;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.skill.Skill;
import org.l2jmobius.gameserver.model.skill.SkillCaster;
import instances.AbstractInstance;
/**
* @author RobikBobik
* @NOTE: Retail like working - I get informations from wiki and youtube video.
* @TODO: Maybe rewrite code to modern style.
* @TODO: Check skill 50050 - working, but I dont know if is correct.
* @TODO: Ignis other skills - skills are implemented, but I dont know if is correct.
*/
public class ResidenceOfKingIgnis extends AbstractInstance
{
// NPCs
private static final int TARA = 34047;
private static final int FREYA = 29109;
private static final int IGNIS = 29105;
// Skills
private static final SkillHolder FIRE_RAG_1 = new SkillHolder(50050, 1);
private static final SkillHolder FIRE_RAG_2 = new SkillHolder(50050, 2);
private static final SkillHolder FIRE_RAG_3 = new SkillHolder(50050, 3);
private static final SkillHolder FIRE_RAG_4 = new SkillHolder(50050, 4);
private static final SkillHolder FIRE_RAG_5 = new SkillHolder(50050, 5);
private static final SkillHolder FIRE_RAG_6 = new SkillHolder(50050, 6);
private static final SkillHolder FIRE_RAG_7 = new SkillHolder(50050, 7);
private static final SkillHolder FIRE_RAG_8 = new SkillHolder(50050, 8);
private static final SkillHolder FIRE_RAG_9 = new SkillHolder(50050, 9);
private static final SkillHolder FIRE_RAG_10 = new SkillHolder(50050, 10);
private static final SkillHolder FREYA_SAFETY_ZONE = new SkillHolder(50052, 1); // Just for an effect
// Misc
private static final int TEMPLATE_ID = 195;
private static final Map<Player, Integer> _playerFireRage = new ConcurrentHashMap<>();
public ResidenceOfKingIgnis()
{
super(TEMPLATE_ID);
addStartNpc(TARA);
addTalkId(FREYA);
addKillId(IGNIS);
addAttackId(IGNIS);
addInstanceLeaveId(TEMPLATE_ID);
}
@Override
public String onAdvEvent(String event, Npc npc, Player player)
{
switch (event)
{
case "ENTER":
{
enterInstance(player, npc, TEMPLATE_ID);
_playerFireRage.put(player, 0);
break;
}
case "REMOVE_FIRE_RAGE":
{
if (player.isAffectedBySkill(FIRE_RAG_1))
{
final int playerFireRage = _playerFireRage.getOrDefault(player, 0);
if (playerFireRage < 5)
{
_playerFireRage.put(player, playerFireRage + 1);
player.stopSkillEffects(SkillFinishType.REMOVED, FIRE_RAG_1.getSkillId());
player.doCast(FREYA_SAFETY_ZONE.getSkill());
npc.broadcastSay(ChatType.NPC_SHOUT, "Bless with you. Lets finish fight!");
break;
}
npc.broadcastSay(ChatType.NPC_SHOUT, "You cannot use my power again.");
player.sendMessage("Freya: You cannot use my power again.");
break;
}
npc.broadcastSay(ChatType.NPC_SHOUT, "I help you only when you affected by Fire Rage skill.");
break;
}
case "CAST_FIRE_RAGE_1":
{
if (SkillCaster.checkUseConditions(npc, FIRE_RAG_1.getSkill()))
{
npc.doCast(FIRE_RAG_1.getSkill());
}
break;
}
case "CAST_FIRE_RAGE_2":
{
if (SkillCaster.checkUseConditions(npc, FIRE_RAG_2.getSkill()))
{
npc.doCast(FIRE_RAG_2.getSkill());
}
break;
}
case "CAST_FIRE_RAGE_3":
{
if (SkillCaster.checkUseConditions(npc, FIRE_RAG_3.getSkill()))
{
npc.doCast(FIRE_RAG_3.getSkill());
}
break;
}
case "CAST_FIRE_RAGE_4":
{
if (SkillCaster.checkUseConditions(npc, FIRE_RAG_4.getSkill()))
{
npc.doCast(FIRE_RAG_4.getSkill());
}
break;
}
case "CAST_FIRE_RAGE_5":
{
if (SkillCaster.checkUseConditions(npc, FIRE_RAG_5.getSkill()))
{
npc.doCast(FIRE_RAG_5.getSkill());
}
break;
}
case "CAST_FIRE_RAGE_6":
{
if (SkillCaster.checkUseConditions(npc, FIRE_RAG_6.getSkill()))
{
npc.doCast(FIRE_RAG_6.getSkill());
}
break;
}
case "CAST_FIRE_RAGE_7":
{
if (SkillCaster.checkUseConditions(npc, FIRE_RAG_7.getSkill()))
{
npc.doCast(FIRE_RAG_7.getSkill());
}
break;
}
case "CAST_FIRE_RAGE_8":
{
if (SkillCaster.checkUseConditions(npc, FIRE_RAG_8.getSkill()))
{
npc.doCast(FIRE_RAG_8.getSkill());
}
break;
}
case "CAST_FIRE_RAGE_9":
{
if (SkillCaster.checkUseConditions(npc, FIRE_RAG_9.getSkill()))
{
npc.doCast(FIRE_RAG_9.getSkill());
}
break;
}
case "CAST_FIRE_RAGE_10":
{
if (SkillCaster.checkUseConditions(npc, FIRE_RAG_10.getSkill()))
{
npc.doCast(FIRE_RAG_10.getSkill());
}
break;
}
}
return null;
}
@Override
public String onAttack(Npc npc, Player attacker, int damage, boolean isSummon, Skill skill)
{
if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.99)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.70)))
{
startQuestTimer("CAST_FIRE_RAGE_1", 1000, npc, null);
}
else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.70)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.50)))
{
startQuestTimer("CAST_FIRE_RAGE_2", 1000, npc, null);
}
else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.50)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.40)))
{
startQuestTimer("CAST_FIRE_RAGE_3", 1000, npc, null);
}
else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.40)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.25)))
{
startQuestTimer("CAST_FIRE_RAGE_4", 1000, npc, null);
}
else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.25)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.15)))
{
startQuestTimer("CAST_FIRE_RAGE_5", 1000, npc, null);
}
else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.15)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.10)))
{
startQuestTimer("CAST_FIRE_RAGE_6", 1000, npc, null);
}
else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.10)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.7)))
{
startQuestTimer("CAST_FIRE_RAGE_7", 1000, npc, null);
}
else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.7)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.5)))
{
startQuestTimer("CAST_FIRE_RAGE_8", 1000, npc, null);
}
else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.5)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.3)))
{
startQuestTimer("CAST_FIRE_RAGE_9", 1000, npc, null);
}
else if (npc.getCurrentHp() < (npc.getMaxHp() * 0.3))
{
startQuestTimer("CAST_FIRE_RAGE_10", 1000, npc, null);
}
return super.onAttack(npc, attacker, damage, isSummon, skill);
}
@Override
public String onKill(Npc npc, Player player, boolean isSummon)
{
final Instance world = npc.getInstanceWorld();
if (world != null)
{
world.finishInstance();
}
return super.onKill(npc, player, isSummon);
}
public static void main(String[] args)
{
new ResidenceOfKingIgnis();
}
}

View File

@ -1,229 +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 instances.ResidenceOfKingPetram;
import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.holders.SkillHolder;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.skill.Skill;
import instances.AbstractInstance;
/**
* @author RobikBobik, Mobius
* @NOTE: Retail like working
* @TODO: Rewrite code to modern style.
* @TODO: Petram Skills and minion skills
*/
public class ResidenceOfKingPetram extends AbstractInstance
{
// NPCs
private static final int TRITAN = 34049;
private static final int PETRAM = 29108;
private static final int PETRAM_PIECE = 29116;
private static final int PETRAM_FRAGMENT = 29117;
// Skills
private static final SkillHolder EARTH_ENERGY = new SkillHolder(50066, 1); // When spawn Minion.
private static final SkillHolder EARTH_FURY = new SkillHolder(50059, 1); // When change invul state.
private static final SkillHolder TEST = new SkillHolder(5712, 1); // TODO: This test skill is only for visual effect, but need to find correct skill ID.
// Misc
private static final int TEMPLATE_ID = 198;
public ResidenceOfKingPetram()
{
super(TEMPLATE_ID);
addStartNpc(TRITAN);
addKillId(PETRAM, PETRAM_PIECE, PETRAM_FRAGMENT);
addAttackId(PETRAM);
addInstanceLeaveId(TEMPLATE_ID);
}
@Override
public String onAdvEvent(String event, Npc npc, Player player)
{
switch (event)
{
case "ENTER":
{
enterInstance(player, npc, TEMPLATE_ID);
break;
}
case "SPAWN_MINION":
{
final Instance world = npc.getInstanceWorld();
if (world != null)
{
npc.doCast(EARTH_ENERGY.getSkill());
// Prevent to double or higher spawn when HP is between 68-70% + etc...
if (!world.getParameters().getBoolean("spawnedMinions", false))
{
world.getParameters().set("spawnedMinions", true);
final int stage = world.getParameters().getInt("stage", 0);
world.getParameters().set("stage", stage + 1);
world.setParameter("minion1", addSpawn(npc, PETRAM_PIECE, 221543, 191530, -15486, 1131, false, -1, true, npc.getInstanceId()));
world.setParameter("minion2", addSpawn(npc, PETRAM_FRAGMENT, 222069, 192019, -15486, 49364, false, -1, true, npc.getInstanceId()));
world.setParameter("minion3", addSpawn(npc, PETRAM_PIECE, 222595, 191479, -15486, 34013, false, -1, true, npc.getInstanceId()));
world.setParameter("minion4", addSpawn(npc, PETRAM_FRAGMENT, 222077, 191017, -15486, 16383, false, -1, true, npc.getInstanceId()));
npc.setInvul(true);
npc.broadcastSay(ChatType.NPC_SHOUT, "HaHa, fighters lets kill them. Now Im invul!!!");
}
startQuestTimer("SUPPORT_PETRAM", 3000, npc, null);
}
break;
}
case "UNSPAWN_MINION":
{
final Instance world = npc.getInstanceWorld();
if (world != null)
{
world.getParameters().set("spawnedMinions", false);
npc.setInvul(false);
npc.broadcastSay(ChatType.NPC_SHOUT, "Nooooo... Nooooo...");
}
break;
}
case "SUPPORT_PETRAM":
{
final Instance world = npc.getInstanceWorld();
if (world != null)
{
final Npc m1 = world.getParameters().getObject("minion1", Npc.class);
final Npc m2 = world.getParameters().getObject("minion2", Npc.class);
final Npc m3 = world.getParameters().getObject("minion3", Npc.class);
final Npc m4 = world.getParameters().getObject("minion4", Npc.class);
if (!m1.isDead())
{
m1.setTarget(world.getNpc(PETRAM));
m1.doCast(TEST.getSkill());
}
if (!m2.isDead())
{
m2.setTarget(world.getNpc(PETRAM));
m2.doCast(TEST.getSkill());
}
if (!m3.isDead())
{
m3.setTarget(world.getNpc(PETRAM));
m3.doCast(TEST.getSkill());
}
if (!m4.isDead())
{
m4.setTarget(world.getNpc(PETRAM));
m4.doCast(TEST.getSkill());
}
startQuestTimer("SUPPORT_PETRAM", 10100, npc, null); // NOTE: When find correct skill this number is reuse skill + 100
}
break;
}
case "EARTH_FURY":
{
final Instance world = npc.getInstanceWorld();
if (world != null)
{
npc.doCast(EARTH_FURY.getSkill());
}
break;
}
}
return null;
}
@Override
public String onAttack(Npc npc, Player attacker, int damage, boolean isSummon, Skill skill)
{
final Instance world = npc.getInstanceWorld();
if (world == null)
{
return null;
}
if (npc.getId() == PETRAM)
{
if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.70)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.68)))
{
startQuestTimer("EARTH_FURY", 1000, npc, null);
if (world.getParameters().getInt("stage", 0) == 0)
{
startQuestTimer("SPAWN_MINION", 1000, npc, null);
}
}
else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.40)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.38)))
{
startQuestTimer("EARTH_FURY", 1000, npc, null);
if (world.getParameters().getInt("stage", 0) == 1)
{
startQuestTimer("SPAWN_MINION", 1000, npc, null);
}
}
else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.20)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.18)))
{
startQuestTimer("EARTH_FURY", 1000, npc, null);
if (world.getParameters().getInt("stage", 0) == 2)
{
startQuestTimer("SPAWN_MINION", 1000, npc, null);
}
}
else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.10)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.08)))
{
startQuestTimer("EARTH_FURY", 1000, npc, null);
if (world.getParameters().getInt("stage", 0) == 3)
{
startQuestTimer("SPAWN_MINION", 1000, npc, null);
}
}
}
return super.onAttack(npc, attacker, damage, isSummon, skill);
}
@Override
public String onKill(Npc npc, Player player, boolean isSummon)
{
final Instance world = npc.getInstanceWorld();
if (world == null)
{
return null;
}
if (npc.getId() == PETRAM)
{
world.finishInstance();
}
else if ((world.getParameters().getObject("minion1", Npc.class).isDead()) && (world.getParameters().getObject("minion2", Npc.class).isDead()) && (world.getParameters().getObject("minion3", Npc.class).isDead()) && (world.getParameters().getObject("minion4", Npc.class).isDead()))
{
startQuestTimer("UNSPAWN_MINION", 3000, world.getNpc(PETRAM), null);
}
return super.onKill(npc, player, isSummon);
}
public static void main(String[] args)
{
new ResidenceOfKingPetram();
}
}

View File

@ -1,182 +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 instances.ResidenceOfKingProcella;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.holders.SkillHolder;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.skill.SkillCaster;
import instances.AbstractInstance;
/**
* @author RobikBobik, Mobius
* @NOTE: Retail like working
* @TODO: Rewrite code to modern style.
*/
public class ResidenceOfKingProcella extends AbstractInstance
{
// NPCs
private static final int WIRI = 34048;
private static final int PROCELLA = 29107;
private static final int PROCELLA_GUARDIAN_1 = 29112;
private static final int PROCELLA_GUARDIAN_2 = 29113;
private static final int PROCELLA_GUARDIAN_3 = 29114;
private static final int PROCELLA_STORM = 29115;
// Skills
private static final SkillHolder HURRICANE_SUMMON = new SkillHolder(50042, 1); // When spawn Minion
private static final int HURRICANE_BOLT = 50043;
private static final SkillHolder HURRICANE_BOLT_LV_1 = new SkillHolder(50043, 1); // When player in Radius + para
// Misc
private static final int TEMPLATE_ID = 197;
private static final int STORM_MAX_COUNT = 16; // TODO: Max is limit ?
public ResidenceOfKingProcella()
{
super(TEMPLATE_ID);
addStartNpc(WIRI);
addKillId(PROCELLA, PROCELLA_GUARDIAN_1, PROCELLA_GUARDIAN_2, PROCELLA_GUARDIAN_3);
addInstanceEnterId(TEMPLATE_ID);
}
@Override
public String onAdvEvent(String event, Npc npc, Player player)
{
switch (event)
{
case "ENTER":
{
enterInstance(player, npc, TEMPLATE_ID);
final Instance world = player.getInstanceWorld();
if (world != null)
{
final Npc procella = addSpawn(PROCELLA, 212862, 179828, -15489, 49151, false, 0, true, player.getInstanceId());
startQuestTimer("SPAWN_MINION", 300000 + getRandom(-15000, 15000), procella, player);
startQuestTimer("SPAWN_STORM", 5000, procella, player);
world.setParameter("stormCount", 0);
}
break;
}
case "SPAWN_MINION":
{
final Instance world = npc.getInstanceWorld();
if ((world != null) && (npc.getId() == PROCELLA))
{
world.setParameter("minion1", addSpawn(PROCELLA_GUARDIAN_1, 212663, 179421, -15486, 31011, true, 0, true, npc.getInstanceId()));
world.setParameter("minion2", addSpawn(PROCELLA_GUARDIAN_2, 213258, 179822, -15486, 12001, true, 0, true, npc.getInstanceId()));
world.setParameter("minion3", addSpawn(PROCELLA_GUARDIAN_3, 212558, 179974, -15486, 12311, true, 0, true, npc.getInstanceId()));
startQuestTimer("HIDE_PROCELLA", 1000, world.getNpc(PROCELLA), null);
}
break;
}
case "SPAWN_STORM":
{
final Instance world = npc.getInstanceWorld();
if ((world != null) && (world.getParameters().getInt("stormCount", 0) < STORM_MAX_COUNT))
{
world.getNpc(PROCELLA).doCast(HURRICANE_SUMMON.getSkill());
final Npc procellaStorm = addSpawn(PROCELLA_STORM, world.getNpc(PROCELLA).getX() + getRandom(-500, 500), world.getNpc(PROCELLA).getY() + getRandom(-500, 500), world.getNpc(PROCELLA).getZ(), 31011, true, 0, true, npc.getInstanceId());
procellaStorm.setRandomWalking(true);
world.getParameters().increaseInt("stormCount", 1);
startQuestTimer("SPAWN_STORM", 60000, world.getNpc(PROCELLA), null);
startQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC", 100, procellaStorm, player); // All time checking
}
break;
}
case "HIDE_PROCELLA":
{
final Instance world = npc.getInstanceWorld();
if (world != null)
{
if (world.getNpc(PROCELLA).isInvisible())
{
world.getNpc(PROCELLA).setInvisible(false);
}
else
{
world.getNpc(PROCELLA).setInvisible(true);
startQuestTimer("SPAWN_MINION", 300000 + getRandom(-15000, 15000), world.getNpc(PROCELLA), player);
}
}
break;
}
case "CHECK_CHAR_INSIDE_RADIUS_NPC":
{
final Instance world = npc.getInstanceWorld();
if (world != null)
{
final Player plr = world.getPlayers().stream().findAny().orElse(null);
if ((plr != null) && (plr.isInsideRadius3D(npc, 100)))
{
npc.abortAttack();
npc.abortCast();
npc.setTarget(plr);
if (plr.getAffectedSkillLevel(HURRICANE_BOLT) == 1)
{
npc.abortCast();
startQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC", 100, npc, player); // All time checking
}
else
{
if (SkillCaster.checkUseConditions(npc, HURRICANE_BOLT_LV_1.getSkill()))
{
npc.doCast(HURRICANE_BOLT_LV_1.getSkill());
}
}
startQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC", 100, npc, player); // All time checking
}
else
{
startQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC", 100, npc, player); // All time checking
}
}
break;
}
}
return null;
}
@Override
public String onKill(Npc npc, Player player, boolean isSummon)
{
final Instance world = npc.getInstanceWorld();
if (world == null)
{
return null;
}
if (npc.getId() == PROCELLA)
{
cancelQuestTimer("SPAWN_MINION", npc, player);
cancelQuestTimer("SPAWN_STORM", npc, player);
cancelQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC", npc, player);
world.finishInstance();
}
else if ((world.getParameters().getObject("minion1", Npc.class).isDead()) && (world.getParameters().getObject("minion2", Npc.class).isDead()) && (world.getParameters().getObject("minion3", Npc.class).isDead()))
{
startQuestTimer("HIDE_PROCELLA", 1000, world.getNpc(PROCELLA), null);
}
return super.onKill(npc, player, isSummon);
}
public static void main(String[] args)
{
new ResidenceOfKingProcella();
}
}

View File

@ -1,231 +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 instances.ResidenceOfQueenNebula;
import org.l2jmobius.gameserver.data.xml.SkillData;
import org.l2jmobius.gameserver.enums.SkillFinishType;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.holders.SkillHolder;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.skill.AbnormalVisualEffect;
import org.l2jmobius.gameserver.model.skill.Skill;
import org.l2jmobius.gameserver.model.skill.SkillCaster;
import instances.AbstractInstance;
/**
* @author RobikBobik
* @NOTE: Retail like working
* @TODO: Rewrite code to modern style.
* @TODO: The less Nebula's HP, the more damage she deals.
*/
public class ResidenceOfQueenNebula extends AbstractInstance
{
// NPCs
private static final int IRIS = 34046;
private static final int NEBULA = 29106;
private static final int WATER_SLIME = 29111;
// Skills
private static final int AQUA_RAGE = 50036;
private static final SkillHolder AQUA_RAGE_1 = new SkillHolder(AQUA_RAGE, 1);
private static final SkillHolder AQUA_RAGE_2 = new SkillHolder(AQUA_RAGE, 2);
private static final SkillHolder AQUA_RAGE_3 = new SkillHolder(AQUA_RAGE, 3);
private static final SkillHolder AQUA_RAGE_4 = new SkillHolder(AQUA_RAGE, 4);
private static final SkillHolder AQUA_RAGE_5 = new SkillHolder(AQUA_RAGE, 5);
private static final SkillHolder AQUA_SUMMON = new SkillHolder(50037, 1);
// Misc
private static final int TEMPLATE_ID = 196;
public ResidenceOfQueenNebula()
{
super(TEMPLATE_ID);
addStartNpc(IRIS);
addKillId(NEBULA, WATER_SLIME);
addAttackId(NEBULA);
addSpawnId(NEBULA);
addInstanceLeaveId(TEMPLATE_ID);
}
@Override
public String onAdvEvent(String event, Npc npc, Player player)
{
switch (event)
{
case "ENTER":
{
enterInstance(player, npc, TEMPLATE_ID);
break;
}
case "SPAWN_WATER_SLIME":
{
final Instance world = npc.getInstanceWorld();
if (world != null)
{
final Player plr = world.getPlayers().stream().findAny().get();
startQuestTimer("CAST_AQUA_RAGE", 60000 + getRandom(-15000, 15000), npc, plr);
if (npc.getId() == NEBULA)
{
npc.doCast(AQUA_SUMMON.getSkill());
for (int i = 0; i < getRandom(4, 6); i++)
{
addSpawn(npc, WATER_SLIME, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, -1, true, npc.getInstanceId());
startQuestTimer("SPAWN_WATER_SLIME", 300000, npc, null);
}
}
}
break;
}
case "PLAYER_PARA":
{
if (player.getAffectedSkillLevel(AQUA_RAGE) == 5)
{
player.getEffectList().startAbnormalVisualEffect(AbnormalVisualEffect.FROZEN_PILLAR);
player.setImmobilized(true);
startQuestTimer("PLAYER_UNPARA", 5000, npc, player);
}
break;
}
case "PLAYER_UNPARA":
{
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, AQUA_RAGE_5.getSkill());
player.getEffectList().stopAbnormalVisualEffect(AbnormalVisualEffect.FROZEN_PILLAR);
player.setImmobilized(false);
break;
}
case "CAST_AQUA_RAGE":
{
startQuestTimer("CAST_AQUA_RAGE", 5000, npc, player);
if ((player.isInsideRadius3D(npc, 1000)))
{
if (player.getAffectedSkillLevel(AQUA_RAGE) == 1)
{
if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_2.getSkill()))
{
npc.doCast(AQUA_RAGE_2.getSkill());
}
}
else if (player.getAffectedSkillLevel(AQUA_RAGE) == 2)
{
if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_3.getSkill()))
{
npc.doCast(AQUA_RAGE_3.getSkill());
}
}
else if (player.getAffectedSkillLevel(AQUA_RAGE) == 3)
{
if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_4.getSkill()))
{
npc.doCast(AQUA_RAGE_4.getSkill());
}
}
else if (player.getAffectedSkillLevel(AQUA_RAGE) == 4)
{
if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_5.getSkill()))
{
npc.doCast(AQUA_RAGE_5.getSkill());
startQuestTimer("PLAYER_PARA", 100, npc, player);
}
}
else if (player.getAffectedSkillLevel(AQUA_RAGE) == 5)
{
npc.abortCast();
}
else
{
if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_1.getSkill()))
{
npc.doCast(AQUA_RAGE_1.getSkill());
}
}
}
break;
}
}
return null;
}
@Override
public String onSpawn(Npc npc)
{
startQuestTimer("SPAWN_WATER_SLIME", 300000, npc, null);
return super.onSpawn(npc);
}
@Override
public String onKill(Npc npc, Player player, boolean isSummon)
{
switch (npc.getId())
{
case NEBULA:
{
cancelQuestTimer("CAST_AQUA_RAGE", npc, player);
cancelQuestTimer("SPAWN_WATER_SLIME", npc, player);
final Instance world = npc.getInstanceWorld();
if (world != null)
{
world.finishInstance();
}
break;
}
case WATER_SLIME:
{
if (player.getAffectedSkillLevel(AQUA_RAGE) == 1)
{
if (getRandom(100) < 50)
{
player.stopSkillEffects(AQUA_RAGE_1.getSkill());
}
}
else if (player.getAffectedSkillLevel(AQUA_RAGE) == 2)
{
if (getRandom(100) < 50)
{
player.stopSkillEffects(AQUA_RAGE_2.getSkill());
final Skill skill = SkillData.getInstance().getSkill(AQUA_RAGE, 1);
skill.applyEffects(player, player);
}
}
else if (player.getAffectedSkillLevel(AQUA_RAGE) == 3)
{
if (getRandom(100) < 50)
{
player.stopSkillEffects(AQUA_RAGE_3.getSkill());
final Skill skill = SkillData.getInstance().getSkill(AQUA_RAGE, 2);
skill.applyEffects(player, player);
}
}
else if (player.getAffectedSkillLevel(AQUA_RAGE) == 4)
{
if (getRandom(100) < 50)
{
player.stopSkillEffects(AQUA_RAGE_4.getSkill());
final Skill skill = SkillData.getInstance().getSkill(AQUA_RAGE, 3);
skill.applyEffects(player, player);
}
}
break;
}
}
return super.onKill(npc, player, isSummon);
}
public static void main(String[] args)
{
new ResidenceOfQueenNebula();
}
}

View File

@ -111,7 +111,7 @@
<sex>MALE</sex>
<acquire exp="0" sp="0" attributeExp="104000" />
<stats str="60" int="76" dex="73" wit="70" con="57" men="80">
<vitals hp="4456058.49802372" hpRegen="319.2293199" mp="4203.40091563113" mpRegen="3" />
<vitals hp="6456058.49802372" hpRegen="319.2293199" mp="4203.40091563113" mpRegen="3" />
<attack physical="680.441457140486" magical="127.33579646414" random="30" critical="4.75" accuracy="4.75" attackSpeed="250" type="SWORD" range="40" distance="80" width="120" />
<defence physical="208.284023668639" magical="95.9748607784026" />
<speed>
@ -198,7 +198,7 @@
<sex>MALE</sex>
<acquire exp="0" sp="0" attributeExp="104000" />
<stats str="60" int="76" dex="73" wit="70" con="57" men="80">
<vitals hp="4408646.64031621" hpRegen="319.2293199" mp="4203.40091563113" mpRegen="3" />
<vitals hp="8408646.64031621" hpRegen="319.2293199" mp="4203.40091563113" mpRegen="3" />
<attack physical="680.441457140486" magical="127.33579646414" random="30" critical="4.75" accuracy="4.75" attackSpeed="250" type="SWORD" range="40" distance="80" width="120" />
<defence physical="208.284023668639" magical="95.9748607784026" />
<speed>
@ -283,7 +283,7 @@
<sex>MALE</sex>
<acquire exp="0" sp="0" attributeExp="104000" />
<stats str="60" int="76" dex="73" wit="70" con="57" men="80">
<vitals hp="4233255.33596838" hpRegen="319.2293199" mp="4203.40091563113" mpRegen="3" />
<vitals hp="8233255.33596838" hpRegen="319.2293199" mp="4203.40091563113" mpRegen="3" />
<attack physical="680.441457140486" magical="127.33579646414" random="30" critical="4.75" accuracy="4.75" attackSpeed="250" type="SWORD" range="40" distance="80" width="120" />
<defence physical="208.284023668639" magical="95.9748607784026" />
<speed>
@ -368,7 +368,7 @@
<sex>MALE</sex>
<acquire exp="0" sp="0" attributeExp="104000" />
<stats str="60" int="76" dex="73" wit="70" con="57" men="80">
<vitals hp="2851877.47035573" hpRegen="319.2293199" mp="4203.40091563113" mpRegen="3" />
<vitals hp="8851877.47035573" hpRegen="319.2293199" mp="4203.40091563113" mpRegen="3" />
<attack physical="680.441457140486" magical="127.33579646414" random="30" critical="4.75" accuracy="4.75" attackSpeed="250" type="SWORD" range="40" distance="80" width="120" />
<defence physical="208.284023668639" magical="95.9748607784026" />
<speed>

View File

@ -332,7 +332,7 @@
<value level="4">4</value>
<value level="5">5</value>
</abnormalLevel>
<abnormalTime>-1</abnormalTime>
<abnormalTime>30</abnormalTime>
<activateRate>100</activateRate>
<abnormalType>FREEZING</abnormalType>
<isDebuff>true</isDebuff>

View File

@ -0,0 +1,79 @@
<?xml version="1.0" encoding="UTF-8"?>
<list enabled="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/zones.xsd">
<zone name="dwelling_portal_earth" type="TeleportZone" shape="Cylinder" minZ="-11518" maxZ="-11218" rad="100">
<stat name="oustX" val="222086" />
<stat name="oustY" val="190539" />
<stat name="oustZ" val="-15488" />
<stat name="default_enabled" val="false" />
<stat name="instanceId" val="214" />
<stat name="targetClass" val="Player" />
<stat name="affectedLvlMin" val="75" />
<node X="-113465" Y="-77520" />
</zone>
<zone name="dwelling_portal_wind" type="TeleportZone" shape="Cylinder" minZ="-11518" maxZ="-11218" rad="100">
<stat name="oustX" val="222151" />
<stat name="oustY" val="168077" />
<stat name="oustZ" val="-15488" />
<stat name="default_enabled" val="false" />
<stat name="instanceId" val="214" />
<stat name="targetClass" val="Player" />
<stat name="affectedLvlMin" val="75" />
<node X="-115115" Y="-79080" />
</zone>
<zone name="dwelling_portal_water" type="TeleportZone" shape="Cylinder" minZ="-11518" maxZ="-11218" rad="100">
<stat name="oustX" val="212886" />
<stat name="oustY" val="178829" />
<stat name="oustZ" val="-15488" />
<stat name="instanceId" val="214" />
<stat name="default_enabled" val="true" /> <!--Bug!! causes a problem with the others portal (no idea) -->
<stat name="targetClass" val="Player" />
<stat name="affectedLvlMin" val="75" />
<node X="-113529" Y="-79077" />
</zone>
<zone name="dwelling_portal_fire" type="TeleportZone" shape="Cylinder" minZ="-11518" maxZ="-11218" rad="100">
<stat name="oustX" val="202376" />
<stat name="oustY" val="168141" />
<stat name="oustZ" val="-15488" />
<stat name="default_enabled" val="false" />
<stat name="instanceId" val="214" />
<stat name="targetClass" val="Player" />
<stat name="affectedLvlMin" val="75" />
<node X="-115202" Y="-77519" />
</zone>
<zone name="return_portal_petram" type="TeleportZone" shape="Cylinder" minZ="-15688" maxZ="-15218" rad="100">
<stat name="oustX" val="-114323" />
<stat name="oustY" val="-78292" />
<stat name="oustZ" val="-11433" />
<stat name="instanceId" val="214" />
<stat name="targetClass" val="Player" />
<stat name="affectedLvlMin" val="75" />
<node X="222061" Y="192921" />
</zone>
<zone name="return_portal_nebula" type="TeleportZone" shape="Cylinder" minZ="-15688" maxZ="-15218" rad="100">
<stat name="oustX" val="-114323" />
<stat name="oustY" val="-78292" />
<stat name="oustZ" val="-11433" />
<stat name="instanceId" val="214" />
<stat name="targetClass" val="Player" />
<stat name="affectedLvlMin" val="75" />
<node X="222127" Y="170488" />
</zone>
<zone name="return_portal_procella" type="TeleportZone" shape="Cylinder" minZ="-15688" maxZ="-15218" rad="100">
<stat name="oustX" val="-114323" />
<stat name="oustY" val="-78292" />
<stat name="oustZ" val="-11433" />
<stat name="instanceId" val="214" />
<stat name="targetClass" val="Player" />
<stat name="affectedLvlMin" val="75" />
<node X="212855" Y="181242" />
</zone>
<zone name="return_portal_ignis" type="TeleportZone" shape="Cylinder" minZ="-15688" maxZ="-15218" rad="100">
<stat name="oustX" val="-114323" />
<stat name="oustY" val="-78292" />
<stat name="oustZ" val="-11433" />
<stat name="instanceId" val="214" />
<stat name="targetClass" val="Player" />
<stat name="affectedLvlMin" val="75" />
<node X="202349" Y="170533" />
</zone>
</list>

View File

@ -104,6 +104,7 @@ public class DailyTaskManager
if (Calendar.getInstance().get(Calendar.DAY_OF_WEEK) == Calendar.WEDNESDAY)
{
clanLeaderApply();
resetMonsterArenaWeekly();
resetTimedHuntingZonesWeekly();
resetVitalityWeekly();
}
@ -233,6 +234,14 @@ public class DailyTaskManager
LOGGER.info("Vitality resetted");
}
private void resetMonsterArenaWeekly()
{
for (Clan clan : ClanTable.getInstance().getClans())
{
GlobalVariablesManager.getInstance().remove(GlobalVariablesManager.MONSTER_ARENA_VARIABLE + clan.getId());
}
}
private void resetClanBonus()
{
ClanTable.getInstance().getClans().forEach(Clan::resetClanBonus);

View File

@ -43,6 +43,7 @@ public class GlobalVariablesManager extends AbstractVariables
// Public variable names
public static final String DAILY_TASK_RESET = "DAILY_TASK_RESET";
public static final String MONSTER_ARENA_VARIABLE = "MA_C";
protected GlobalVariablesManager()
{

View File

@ -963,43 +963,43 @@
<item id="93290" count="1" /> Victory Pack
</items>
</reward>
-->
<reward id="9001" reward_id="9001" name="Clan Raid Attack" requiredCompletion="1">
Weekly mission. A reward is given for defeating 1 enemy together with your clan members in the Clan Arena.
<!-- Weekly mission. A reward is given for defeating 1 enemy together with your clan members in the Clan Arena. -->
<handler name="monster">
<param name="minLevel">40</param>
<param name="maxLevel">99</param>
</handler>
<items>
<item id="3031" count="150" /> Spirit Ore
<item id="94481" count="50" /> Clan XP
<item id="94269" count="3" /> Scroll: Boost Attack
<item id="3031" count="150" /> <!-- Spirit Ore -->
<item id="94481" count="50" /> <!-- Clan XP -->
<item id="94269" count="3" /> <!-- Scroll: Boost Attack -->
</items>
</reward>
<reward id="9002" reward_id="9002" name="Dwelling of Spirits" requiredCompletion="50">
Weekly mission. A reward is given for defeating monsters during a clan raid to the Dwelling of Spirits.
<!-- Weekly mission. A reward is given for defeating monsters during a clan raid to the Dwelling of Spirits. -->
<handler name="monster">
<param name="minLevel">76</param>
<param name="maxLevel">99</param>
</handler>
<items>
<item id="91831" count="5" /> Improved Water Attack Potion
<item id="91832" count="5" /> Improved Wind Attack Potion
<item id="91833" count="5" /> Improved Earth Attack Potion
<item id="91830" count="5" /> Improved Fire Attack Potion
<item id="91831" count="5" /> <!-- Improved Water Attack Potion -->
<item id="91832" count="5" /> <!-- Improved Wind Attack Potion -->
<item id="91833" count="5" /> <!-- Improved Earth Attack Potion -->
<item id="91830" count="5" /> <!-- Improved Fire Attack Potion -->
</items>
</reward>
<reward id="9003" reward_id="9003" name="Spirit Kings" requiredCompletion="1">
Weekly mission. A reward is given for defeating Ignis, Nebula, Procella or Petram during a clan raid to the Dwelling of Spirits.
<!-- Weekly mission. A reward is given for defeating Ignis, Nebula, Procella or Petram during a clan raid to the Dwelling of Spirits. -->
<handler name="monster">
<param name="minLevel">76</param>
<param name="maxLevel">99</param>
</handler>
<items>
<item id="91831" count="5" /> Improved Water Attack Potion
<item id="91832" count="5" /> Improved Wind Attack Potion
<item id="91833" count="5" /> Improved Earth Attack Potion
<item id="91830" count="5" /> Improved Fire Attack Potion
<item id="91831" count="5" /> <!-- Improved Water Attack Potion -->
<item id="91832" count="5" /> <!-- Improved Wind Attack Potion -->
<item id="91833" count="5" /> <!-- Improved Earth Attack Potion -->
<item id="91830" count="5" /> <!-- Improved Fire Attack Potion -->
</items>
</reward>
-->
</list>

View File

@ -0,0 +1,125 @@
<?xml version="1.0" encoding="UTF-8"?>
<instance id="214" maxWorlds="80" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
<time duration="30" empty="3000000" />
<removeBuffs type="ALL" />
<locations>
<enter type="FIXED">
<location x="-114343" y="-77747" z="-11442" />
</enter>
<exit type="ORIGIN" />
</locations>
<conditions>
<condition type="Party" />
<condition type="CommandChannel" />
<condition type="CommandChannelLeader" />
<condition type="GroupMin">
<param name="limit" value="1" />
</condition>
<condition type="GroupMax">
<param name="limit" value="100" />
</condition>
<condition type="Level">
<param name="min" value="76" />
<param name="max" value="90" />
</condition>
<condition type="Distance" />
<condition type="Reenter" />
</conditions>
<reenter apply="ON_FINISH">
<reset day="MONDAY" hour="6" minute="30" /> <!-- Retail is 1 day week Only -->
<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>
<spawnlist>
<group name="ExitPortal" spawnByDefault="false">
<npc id="15970" x="-114343" y="-77747" z="-11442" heading="46786" /> <!-- Exit Portal -->
<npc id="15971" x="-114343" y="-77747" z="-11442" heading="46786" /> <!-- Exit Portal -->
<npc id="15972" x="-114343" y="-77720" z="-11442" heading="46786" /> <!-- Exit Portal -->
<npc id="15973" x="-114343" y="-77733" z="-11442" heading="46786" /> <!-- Exit Portal -->
<npc id="15974" x="-114343" y="-77755" z="-11442" heading="46786" /> <!-- Exit Portal -->
</group>
<group name="sealstone" spawnByDefault="true">
<npc id="34178" x="-114324" y="-78273" z="-11433" heading="15825" /> <!-- Seal Stone -->
</group>
<group name="animael" spawnByDefault="false">
<npc id="34176" x="-114324" y="-78273" z="-11433" heading="15474" /> <!-- Animael -->
</group>
<group name="NormalMobs" spawnByDefault="false">
<npc id="22272" x="-114091" y="-77461" z="-11443" heading="16383" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114048" y="-77429" z="-11443" heading="6673" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114045" y="-77406" z="-11443" heading="24645" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-113837" y="-76943" z="-11443" heading="8327" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-113945" y="-76923" z="-11443" heading="30858" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114859" y="-76897" z="-11443" heading="58120" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114785" y="-76841" z="-11443" heading="55942" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114711" y="-76987" z="-11443" heading="61107" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114699" y="-77113" z="-11443" heading="16383" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114723" y="-77045" z="-11443" heading="57831" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114852" y="-78363" z="-11443" heading="657" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114984" y="-78475" z="-11443" heading="1141" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114916" y="-78442" z="-11443" heading="65129" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114841" y="-78428" z="-11443" heading="63813" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114938" y="-78411" z="-11443" heading="9120" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-113616" y="-78459" z="-11443" heading="30680" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-113622" y="-78398" z="-11443" heading="28616" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-113591" y="-78301" z="-11442" heading="37105" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-113604" y="-78239" z="-11443" heading="35386" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-113693" y="-78249" z="-11443" heading="29763" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-113568" y="-78336" z="-11442" heading="28986" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-113818" y="-78174" z="-11443" heading="55979" /> <!-- Corrupted Fairy -->
<npc id="22272" x="-114618" y="-77313" z="-11443" heading="22097" /> <!-- Corrupted Fairy -->
<npc id="22272" x="-113589" y="-78333" z="-11443" heading="30535" /> <!-- Corrupted Fairy -->
<npc id="22272" x="-114840" y="-78561" z="-11443" heading="32322" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-113933" y="-77703" z="-11443" heading="1785" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-113872" y="-77793" z="-11443" heading="60399" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114852" y="-77864" z="-11443" heading="13028" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114822" y="-77925" z="-11443" heading="17015" /> <!-- Corrupted Fairy -->
<npc id="22272" x="-114554" y="-78998" z="-11443" heading="8750" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114193" y="-78871" z="-11441" heading="32032" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114105" y="-79053" z="-11443" heading="2811" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114456" y="-79050" z="-11443" heading="30111" /> <!-- Corrupted Fairy -->
<npc id="22272" x="-113845" y="-78477" z="-11443" heading="62467" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114676" y="-78345" z="-11439" heading="30937" /> <!-- Corrupted Fairy -->
</group>
<group name="ruipwave_1" spawnByDefault="false">
<npc id="22273" x="-113945" y="-76923" z="-11443" heading="30858" /> <!-- Ruip portal container-->
<npc id="22273" x="-114840" y="-78561" z="-11443" heading="32322" /> <!-- Ruip portal container -->
<npc id="22273" x="-114852" y="-77864" z="-11443" heading="13028" /> <!-- Ruip portal container-->
<npc id="22273" x="-114676" y="-78345" z="-11439" heading="30937" /> <!-- Ruip portal container -->
<npc id="22273" x="-113845" y="-78477" z="-11443" heading="62467" /> <!-- Ruip portal container-->
<npc id="22273" x="-114676" y="-78345" z="-11439" heading="30937" /> <!-- Ruip portal container -->
<npc id="22273" x="-113568" y="-78336" z="-11442" heading="28986" /> <!-- Ruip portal container -->
<npc id="22273" x="-113872" y="-77793" z="-11443" heading="60399" /> <!-- Ruip portal container -->
<npc id="22273" x="-113589" y="-78333" z="-11443" heading="30535" /> <!-- Ruip portal container -->
<npc id="22273" x="-113818" y="-78174" z="-11443" heading="55979" /> <!-- Ruip portal container -->
</group>
<group name="ruipwave_2" spawnByDefault="false">
<npc id="22273" x="-113622" y="-78398" z="-11443" heading="28616" /> <!-- Ruip portal container-->
<npc id="22273" x="-113622" y="-78398" z="-11443" heading="28616" /> <!-- Ruip portal container -->
<npc id="22273" x="-114323" y="-78914" z="-11443" heading="13828" /> <!-- Ruip portal container -->
<npc id="22273" x="-114676" y="-78345" z="-11439" heading="30937" /> <!-- Ruip portal container -->
<npc id="22273" x="-114840" y="-78561" z="-11443" heading="32322" /> <!-- Ruip portal container -->
<npc id="22273" x="-114676" y="-78345" z="-11439" heading="30937" /> <!-- Ruip portal container -->
<npc id="22273" x="-114785" y="-76841" z="-11443" heading="55942" /> <!-- Ruip portal container -->
<npc id="22273" x="-114554" y="-78998" z="-11443" heading="8750" /> <!-- Ruip portal container -->
<npc id="22273" x="-114841" y="-78428" z="-11443" heading="63813" /> <!-- Ruip portal container -->
<npc id="22273" x="-114840" y="-78561" z="-11443" heading="32322" /> <!-- Ruip portal container -->
</group>
<group name="portalearth" spawnByDefault="false">
<npc id="15971" x="-113516" y="-77521" z="-11419" heading="8750" />
</group>
<group name="portalwind" spawnByDefault="false">
<npc id="15969" x="-114554" y="-78998" z="-11443" heading="8750" />
</group>
<group name="portalfire" spawnByDefault="false">
<npc id="15970" x="-114554" y="-78998" z="-11443" heading="8750" />
</group>
<group name="portalwater" spawnByDefault="false">
<npc id="15972" x="-114554" y="-78998" z="-11443" heading="8750" />
</group>
</spawnlist>
</instance>

View File

@ -1,38 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<instance id="195" maxWorlds="80" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
<time duration="120" empty="0" />
<removeBuffs type="ALL" />
<locations>
<enter type="FIXED">
<location x="202374" y="168153" z="-15485" />
</enter>
<exit type="ORIGIN" />
</locations>
<conditions>
<condition type="Party" />
<condition type="CommandChannel" />
<condition type="CommandChannelLeader" />
<condition type="GroupMin">
<param name="limit" value="18" /> <!-- The Kamael update -->
</condition>
<condition type="GroupMax">
<param name="limit" value="100" />
</condition>
<condition type="Level">
<param name="min" value="76" />
<param name="max" value="82" />
</condition>
<condition type="Distance" />
<condition type="Reenter" />
</conditions>
<reenter apply="ON_ENTER">
<reset day="WEDNESDAY" hour="6" minute="30" />
</reenter>
<spawnlist>
<group>
<npc id="29105" x="202350" y="169121" z="-15484" heading="48103" /> <!-- Ignis -->
<npc id="29109" x="202353" y="170347" z="-15484" heading="46786" /> <!-- Freya -->
<npc id="29110" x="202353" y="170347" z="-15484" heading="46786" /> <!-- Safe Zone -->
</group>
</spawnlist>
</instance>

View File

@ -1,36 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<instance id="198" maxWorlds="80" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
<time duration="120" empty="0" />
<removeBuffs type="ALL" />
<locations>
<enter type="FIXED">
<location x="222081" y="190538" z="-15485" />
</enter>
<exit type="ORIGIN" />
</locations>
<conditions>
<condition type="Party" />
<condition type="CommandChannel" />
<condition type="CommandChannelLeader" />
<condition type="GroupMin">
<param name="limit" value="18" /> <!-- The Kamael update -->
</condition>
<condition type="GroupMax">
<param name="limit" value="100" />
</condition>
<condition type="Level">
<param name="min" value="76" />
<param name="max" value="82" />
</condition>
<condition type="Distance" />
<condition type="Reenter" />
</conditions>
<reenter apply="ON_ENTER">
<reset day="WEDNESDAY" hour="6" minute="30" />
</reenter>
<spawnlist>
<group>
<npc id="29108" x="222063" y="191514" z="-15486" heading="50142" /> <!-- Petram -->
</group>
</spawnlist>
</instance>

View File

@ -1,31 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<instance id="197" maxWorlds="80" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
<time duration="120" empty="0" />
<removeBuffs type="ALL" />
<locations>
<enter type="FIXED">
<location x="212884" y="178847" z="-15485" />
</enter>
<exit type="ORIGIN" />
</locations>
<conditions>
<condition type="Party" />
<condition type="CommandChannel" />
<condition type="CommandChannelLeader" />
<condition type="GroupMin">
<param name="limit" value="18" /> <!-- The Kamael update -->
</condition>
<condition type="GroupMax">
<param name="limit" value="100" />
</condition>
<condition type="Level">
<param name="min" value="76" />
<param name="max" value="82" />
</condition>
<condition type="Distance" />
<condition type="Reenter" />
</conditions>
<reenter apply="ON_ENTER">
<reset day="WEDNESDAY" hour="6" minute="30" />
</reenter>
</instance>

View File

@ -1,36 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<instance id="196" maxWorlds="80" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
<time duration="120" empty="0" />
<removeBuffs type="ALL" />
<locations>
<enter type="FIXED">
<location x="222149" y="168087" z="-15485" />
</enter>
<exit type="ORIGIN" />
</locations>
<conditions>
<condition type="Party" />
<condition type="CommandChannel" />
<condition type="CommandChannelLeader" />
<condition type="GroupMin">
<param name="limit" value="18" /> <!-- The Kamael update -->
</condition>
<condition type="GroupMax">
<param name="limit" value="100" />
</condition>
<condition type="Level">
<param name="min" value="76" />
<param name="max" value="82" />
</condition>
<condition type="Distance" />
<condition type="Reenter" />
</conditions>
<reenter apply="ON_ENTER">
<reset day="WEDNESDAY" hour="6" minute="30" />
</reenter>
<spawnlist>
<group>
<npc id="29106" x="222127" y="169057" z="-15486" heading="48730" /> <!-- Nebula -->
</group>
</spawnlist>
</instance>

View File

@ -0,0 +1,4 @@
<html><body>Animael:<br>
All done here?<br>
<Button ALIGN=LEFT ICON="TELEPORT" action="bypass -h Quest DwellingOfSpirits TELEPORT">ByeByeBye</Button>
</body></html>

View File

@ -8,6 +8,6 @@
<td align=center width=185 height=185 background="BranchSys3.icon2.ArmyTrainingEmblem"></td>
</tr>
</table>
-.- <font color="LEVEL">NO AVAILABLE -.-</font><br>
<button action="bypass -h Quest DwellingOfSpirits ENTER" value="Dwelling of Spirits" width="230" height="31" back="BranchSys3.icon2.ArmyTrainingInfo_down" fore="BranchSys3.icon2.ArmyTrainingInfo">
<button action="bypass -h Quest MonsterArena 34169-01.htm" value="Back" width="230" height="31" back="L2UI_CT1.HtmlWnd_DF_Awake_Down" fore="L2UI_CT1.HtmlWnd_DF_Awake">
</body></html>

View File

@ -1,248 +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 instances.ResidenceOfKingIgnis;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.enums.SkillFinishType;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.holders.SkillHolder;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.skill.Skill;
import org.l2jmobius.gameserver.model.skill.SkillCaster;
import instances.AbstractInstance;
/**
* @author RobikBobik
* @NOTE: Retail like working - I get informations from wiki and youtube video.
* @TODO: Maybe rewrite code to modern style.
* @TODO: Check skill 50050 - working, but I dont know if is correct.
* @TODO: Ignis other skills - skills are implemented, but I dont know if is correct.
*/
public class ResidenceOfKingIgnis extends AbstractInstance
{
// NPCs
private static final int TARA = 34047;
private static final int FREYA = 29109;
private static final int IGNIS = 29105;
// Skills
private static final SkillHolder FIRE_RAG_1 = new SkillHolder(50050, 1);
private static final SkillHolder FIRE_RAG_2 = new SkillHolder(50050, 2);
private static final SkillHolder FIRE_RAG_3 = new SkillHolder(50050, 3);
private static final SkillHolder FIRE_RAG_4 = new SkillHolder(50050, 4);
private static final SkillHolder FIRE_RAG_5 = new SkillHolder(50050, 5);
private static final SkillHolder FIRE_RAG_6 = new SkillHolder(50050, 6);
private static final SkillHolder FIRE_RAG_7 = new SkillHolder(50050, 7);
private static final SkillHolder FIRE_RAG_8 = new SkillHolder(50050, 8);
private static final SkillHolder FIRE_RAG_9 = new SkillHolder(50050, 9);
private static final SkillHolder FIRE_RAG_10 = new SkillHolder(50050, 10);
private static final SkillHolder FREYA_SAFETY_ZONE = new SkillHolder(50052, 1); // Just for an effect
// Misc
private static final int TEMPLATE_ID = 195;
private static final Map<Player, Integer> _playerFireRage = new ConcurrentHashMap<>();
public ResidenceOfKingIgnis()
{
super(TEMPLATE_ID);
addStartNpc(TARA);
addTalkId(FREYA);
addKillId(IGNIS);
addAttackId(IGNIS);
addInstanceLeaveId(TEMPLATE_ID);
}
@Override
public String onAdvEvent(String event, Npc npc, Player player)
{
switch (event)
{
case "ENTER":
{
enterInstance(player, npc, TEMPLATE_ID);
_playerFireRage.put(player, 0);
break;
}
case "REMOVE_FIRE_RAGE":
{
if (player.isAffectedBySkill(FIRE_RAG_1))
{
final int playerFireRage = _playerFireRage.getOrDefault(player, 0);
if (playerFireRage < 5)
{
_playerFireRage.put(player, playerFireRage + 1);
player.stopSkillEffects(SkillFinishType.REMOVED, FIRE_RAG_1.getSkillId());
player.doCast(FREYA_SAFETY_ZONE.getSkill());
npc.broadcastSay(ChatType.NPC_SHOUT, "Bless with you. Lets finish fight!");
break;
}
npc.broadcastSay(ChatType.NPC_SHOUT, "You cannot use my power again.");
player.sendMessage("Freya: You cannot use my power again.");
break;
}
npc.broadcastSay(ChatType.NPC_SHOUT, "I help you only when you affected by Fire Rage skill.");
break;
}
case "CAST_FIRE_RAGE_1":
{
if (SkillCaster.checkUseConditions(npc, FIRE_RAG_1.getSkill()))
{
npc.doCast(FIRE_RAG_1.getSkill());
}
break;
}
case "CAST_FIRE_RAGE_2":
{
if (SkillCaster.checkUseConditions(npc, FIRE_RAG_2.getSkill()))
{
npc.doCast(FIRE_RAG_2.getSkill());
}
break;
}
case "CAST_FIRE_RAGE_3":
{
if (SkillCaster.checkUseConditions(npc, FIRE_RAG_3.getSkill()))
{
npc.doCast(FIRE_RAG_3.getSkill());
}
break;
}
case "CAST_FIRE_RAGE_4":
{
if (SkillCaster.checkUseConditions(npc, FIRE_RAG_4.getSkill()))
{
npc.doCast(FIRE_RAG_4.getSkill());
}
break;
}
case "CAST_FIRE_RAGE_5":
{
if (SkillCaster.checkUseConditions(npc, FIRE_RAG_5.getSkill()))
{
npc.doCast(FIRE_RAG_5.getSkill());
}
break;
}
case "CAST_FIRE_RAGE_6":
{
if (SkillCaster.checkUseConditions(npc, FIRE_RAG_6.getSkill()))
{
npc.doCast(FIRE_RAG_6.getSkill());
}
break;
}
case "CAST_FIRE_RAGE_7":
{
if (SkillCaster.checkUseConditions(npc, FIRE_RAG_7.getSkill()))
{
npc.doCast(FIRE_RAG_7.getSkill());
}
break;
}
case "CAST_FIRE_RAGE_8":
{
if (SkillCaster.checkUseConditions(npc, FIRE_RAG_8.getSkill()))
{
npc.doCast(FIRE_RAG_8.getSkill());
}
break;
}
case "CAST_FIRE_RAGE_9":
{
if (SkillCaster.checkUseConditions(npc, FIRE_RAG_9.getSkill()))
{
npc.doCast(FIRE_RAG_9.getSkill());
}
break;
}
case "CAST_FIRE_RAGE_10":
{
if (SkillCaster.checkUseConditions(npc, FIRE_RAG_10.getSkill()))
{
npc.doCast(FIRE_RAG_10.getSkill());
}
break;
}
}
return null;
}
@Override
public String onAttack(Npc npc, Player attacker, int damage, boolean isSummon, Skill skill)
{
if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.99)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.70)))
{
startQuestTimer("CAST_FIRE_RAGE_1", 1000, npc, null);
}
else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.70)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.50)))
{
startQuestTimer("CAST_FIRE_RAGE_2", 1000, npc, null);
}
else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.50)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.40)))
{
startQuestTimer("CAST_FIRE_RAGE_3", 1000, npc, null);
}
else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.40)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.25)))
{
startQuestTimer("CAST_FIRE_RAGE_4", 1000, npc, null);
}
else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.25)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.15)))
{
startQuestTimer("CAST_FIRE_RAGE_5", 1000, npc, null);
}
else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.15)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.10)))
{
startQuestTimer("CAST_FIRE_RAGE_6", 1000, npc, null);
}
else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.10)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.7)))
{
startQuestTimer("CAST_FIRE_RAGE_7", 1000, npc, null);
}
else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.7)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.5)))
{
startQuestTimer("CAST_FIRE_RAGE_8", 1000, npc, null);
}
else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.5)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.3)))
{
startQuestTimer("CAST_FIRE_RAGE_9", 1000, npc, null);
}
else if (npc.getCurrentHp() < (npc.getMaxHp() * 0.3))
{
startQuestTimer("CAST_FIRE_RAGE_10", 1000, npc, null);
}
return super.onAttack(npc, attacker, damage, isSummon, skill);
}
@Override
public String onKill(Npc npc, Player player, boolean isSummon)
{
final Instance world = npc.getInstanceWorld();
if (world != null)
{
world.finishInstance();
}
return super.onKill(npc, player, isSummon);
}
public static void main(String[] args)
{
new ResidenceOfKingIgnis();
}
}

View File

@ -1,229 +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 instances.ResidenceOfKingPetram;
import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.holders.SkillHolder;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.skill.Skill;
import instances.AbstractInstance;
/**
* @author RobikBobik, Mobius
* @NOTE: Retail like working
* @TODO: Rewrite code to modern style.
* @TODO: Petram Skills and minion skills
*/
public class ResidenceOfKingPetram extends AbstractInstance
{
// NPCs
private static final int TRITAN = 34049;
private static final int PETRAM = 29108;
private static final int PETRAM_PIECE = 29116;
private static final int PETRAM_FRAGMENT = 29117;
// Skills
private static final SkillHolder EARTH_ENERGY = new SkillHolder(50066, 1); // When spawn Minion.
private static final SkillHolder EARTH_FURY = new SkillHolder(50059, 1); // When change invul state.
private static final SkillHolder TEST = new SkillHolder(5712, 1); // TODO: This test skill is only for visual effect, but need to find correct skill ID.
// Misc
private static final int TEMPLATE_ID = 198;
public ResidenceOfKingPetram()
{
super(TEMPLATE_ID);
addStartNpc(TRITAN);
addKillId(PETRAM, PETRAM_PIECE, PETRAM_FRAGMENT);
addAttackId(PETRAM);
addInstanceLeaveId(TEMPLATE_ID);
}
@Override
public String onAdvEvent(String event, Npc npc, Player player)
{
switch (event)
{
case "ENTER":
{
enterInstance(player, npc, TEMPLATE_ID);
break;
}
case "SPAWN_MINION":
{
final Instance world = npc.getInstanceWorld();
if (world != null)
{
npc.doCast(EARTH_ENERGY.getSkill());
// Prevent to double or higher spawn when HP is between 68-70% + etc...
if (!world.getParameters().getBoolean("spawnedMinions", false))
{
world.getParameters().set("spawnedMinions", true);
final int stage = world.getParameters().getInt("stage", 0);
world.getParameters().set("stage", stage + 1);
world.setParameter("minion1", addSpawn(npc, PETRAM_PIECE, 221543, 191530, -15486, 1131, false, -1, true, npc.getInstanceId()));
world.setParameter("minion2", addSpawn(npc, PETRAM_FRAGMENT, 222069, 192019, -15486, 49364, false, -1, true, npc.getInstanceId()));
world.setParameter("minion3", addSpawn(npc, PETRAM_PIECE, 222595, 191479, -15486, 34013, false, -1, true, npc.getInstanceId()));
world.setParameter("minion4", addSpawn(npc, PETRAM_FRAGMENT, 222077, 191017, -15486, 16383, false, -1, true, npc.getInstanceId()));
npc.setInvul(true);
npc.broadcastSay(ChatType.NPC_SHOUT, "HaHa, fighters lets kill them. Now Im invul!!!");
}
startQuestTimer("SUPPORT_PETRAM", 3000, npc, null);
}
break;
}
case "UNSPAWN_MINION":
{
final Instance world = npc.getInstanceWorld();
if (world != null)
{
world.getParameters().set("spawnedMinions", false);
npc.setInvul(false);
npc.broadcastSay(ChatType.NPC_SHOUT, "Nooooo... Nooooo...");
}
break;
}
case "SUPPORT_PETRAM":
{
final Instance world = npc.getInstanceWorld();
if (world != null)
{
final Npc m1 = world.getParameters().getObject("minion1", Npc.class);
final Npc m2 = world.getParameters().getObject("minion2", Npc.class);
final Npc m3 = world.getParameters().getObject("minion3", Npc.class);
final Npc m4 = world.getParameters().getObject("minion4", Npc.class);
if (!m1.isDead())
{
m1.setTarget(world.getNpc(PETRAM));
m1.doCast(TEST.getSkill());
}
if (!m2.isDead())
{
m2.setTarget(world.getNpc(PETRAM));
m2.doCast(TEST.getSkill());
}
if (!m3.isDead())
{
m3.setTarget(world.getNpc(PETRAM));
m3.doCast(TEST.getSkill());
}
if (!m4.isDead())
{
m4.setTarget(world.getNpc(PETRAM));
m4.doCast(TEST.getSkill());
}
startQuestTimer("SUPPORT_PETRAM", 10100, npc, null); // NOTE: When find correct skill this number is reuse skill + 100
}
break;
}
case "EARTH_FURY":
{
final Instance world = npc.getInstanceWorld();
if (world != null)
{
npc.doCast(EARTH_FURY.getSkill());
}
break;
}
}
return null;
}
@Override
public String onAttack(Npc npc, Player attacker, int damage, boolean isSummon, Skill skill)
{
final Instance world = npc.getInstanceWorld();
if (world == null)
{
return null;
}
if (npc.getId() == PETRAM)
{
if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.70)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.68)))
{
startQuestTimer("EARTH_FURY", 1000, npc, null);
if (world.getParameters().getInt("stage", 0) == 0)
{
startQuestTimer("SPAWN_MINION", 1000, npc, null);
}
}
else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.40)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.38)))
{
startQuestTimer("EARTH_FURY", 1000, npc, null);
if (world.getParameters().getInt("stage", 0) == 1)
{
startQuestTimer("SPAWN_MINION", 1000, npc, null);
}
}
else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.20)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.18)))
{
startQuestTimer("EARTH_FURY", 1000, npc, null);
if (world.getParameters().getInt("stage", 0) == 2)
{
startQuestTimer("SPAWN_MINION", 1000, npc, null);
}
}
else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.10)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.08)))
{
startQuestTimer("EARTH_FURY", 1000, npc, null);
if (world.getParameters().getInt("stage", 0) == 3)
{
startQuestTimer("SPAWN_MINION", 1000, npc, null);
}
}
}
return super.onAttack(npc, attacker, damage, isSummon, skill);
}
@Override
public String onKill(Npc npc, Player player, boolean isSummon)
{
final Instance world = npc.getInstanceWorld();
if (world == null)
{
return null;
}
if (npc.getId() == PETRAM)
{
world.finishInstance();
}
else if ((world.getParameters().getObject("minion1", Npc.class).isDead()) && (world.getParameters().getObject("minion2", Npc.class).isDead()) && (world.getParameters().getObject("minion3", Npc.class).isDead()) && (world.getParameters().getObject("minion4", Npc.class).isDead()))
{
startQuestTimer("UNSPAWN_MINION", 3000, world.getNpc(PETRAM), null);
}
return super.onKill(npc, player, isSummon);
}
public static void main(String[] args)
{
new ResidenceOfKingPetram();
}
}

View File

@ -1,182 +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 instances.ResidenceOfKingProcella;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.holders.SkillHolder;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.skill.SkillCaster;
import instances.AbstractInstance;
/**
* @author RobikBobik, Mobius
* @NOTE: Retail like working
* @TODO: Rewrite code to modern style.
*/
public class ResidenceOfKingProcella extends AbstractInstance
{
// NPCs
private static final int WIRI = 34048;
private static final int PROCELLA = 29107;
private static final int PROCELLA_GUARDIAN_1 = 29112;
private static final int PROCELLA_GUARDIAN_2 = 29113;
private static final int PROCELLA_GUARDIAN_3 = 29114;
private static final int PROCELLA_STORM = 29115;
// Skills
private static final SkillHolder HURRICANE_SUMMON = new SkillHolder(50042, 1); // When spawn Minion
private static final int HURRICANE_BOLT = 50043;
private static final SkillHolder HURRICANE_BOLT_LV_1 = new SkillHolder(50043, 1); // When player in Radius + para
// Misc
private static final int TEMPLATE_ID = 197;
private static final int STORM_MAX_COUNT = 16; // TODO: Max is limit ?
public ResidenceOfKingProcella()
{
super(TEMPLATE_ID);
addStartNpc(WIRI);
addKillId(PROCELLA, PROCELLA_GUARDIAN_1, PROCELLA_GUARDIAN_2, PROCELLA_GUARDIAN_3);
addInstanceEnterId(TEMPLATE_ID);
}
@Override
public String onAdvEvent(String event, Npc npc, Player player)
{
switch (event)
{
case "ENTER":
{
enterInstance(player, npc, TEMPLATE_ID);
final Instance world = player.getInstanceWorld();
if (world != null)
{
final Npc procella = addSpawn(PROCELLA, 212862, 179828, -15489, 49151, false, 0, true, player.getInstanceId());
startQuestTimer("SPAWN_MINION", 300000 + getRandom(-15000, 15000), procella, player);
startQuestTimer("SPAWN_STORM", 5000, procella, player);
world.setParameter("stormCount", 0);
}
break;
}
case "SPAWN_MINION":
{
final Instance world = npc.getInstanceWorld();
if ((world != null) && (npc.getId() == PROCELLA))
{
world.setParameter("minion1", addSpawn(PROCELLA_GUARDIAN_1, 212663, 179421, -15486, 31011, true, 0, true, npc.getInstanceId()));
world.setParameter("minion2", addSpawn(PROCELLA_GUARDIAN_2, 213258, 179822, -15486, 12001, true, 0, true, npc.getInstanceId()));
world.setParameter("minion3", addSpawn(PROCELLA_GUARDIAN_3, 212558, 179974, -15486, 12311, true, 0, true, npc.getInstanceId()));
startQuestTimer("HIDE_PROCELLA", 1000, world.getNpc(PROCELLA), null);
}
break;
}
case "SPAWN_STORM":
{
final Instance world = npc.getInstanceWorld();
if ((world != null) && (world.getParameters().getInt("stormCount", 0) < STORM_MAX_COUNT))
{
world.getNpc(PROCELLA).doCast(HURRICANE_SUMMON.getSkill());
final Npc procellaStorm = addSpawn(PROCELLA_STORM, world.getNpc(PROCELLA).getX() + getRandom(-500, 500), world.getNpc(PROCELLA).getY() + getRandom(-500, 500), world.getNpc(PROCELLA).getZ(), 31011, true, 0, true, npc.getInstanceId());
procellaStorm.setRandomWalking(true);
world.getParameters().increaseInt("stormCount", 1);
startQuestTimer("SPAWN_STORM", 60000, world.getNpc(PROCELLA), null);
startQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC", 100, procellaStorm, player); // All time checking
}
break;
}
case "HIDE_PROCELLA":
{
final Instance world = npc.getInstanceWorld();
if (world != null)
{
if (world.getNpc(PROCELLA).isInvisible())
{
world.getNpc(PROCELLA).setInvisible(false);
}
else
{
world.getNpc(PROCELLA).setInvisible(true);
startQuestTimer("SPAWN_MINION", 300000 + getRandom(-15000, 15000), world.getNpc(PROCELLA), player);
}
}
break;
}
case "CHECK_CHAR_INSIDE_RADIUS_NPC":
{
final Instance world = npc.getInstanceWorld();
if (world != null)
{
final Player plr = world.getPlayers().stream().findAny().orElse(null);
if ((plr != null) && (plr.isInsideRadius3D(npc, 100)))
{
npc.abortAttack();
npc.abortCast();
npc.setTarget(plr);
if (plr.getAffectedSkillLevel(HURRICANE_BOLT) == 1)
{
npc.abortCast();
startQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC", 100, npc, player); // All time checking
}
else
{
if (SkillCaster.checkUseConditions(npc, HURRICANE_BOLT_LV_1.getSkill()))
{
npc.doCast(HURRICANE_BOLT_LV_1.getSkill());
}
}
startQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC", 100, npc, player); // All time checking
}
else
{
startQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC", 100, npc, player); // All time checking
}
}
break;
}
}
return null;
}
@Override
public String onKill(Npc npc, Player player, boolean isSummon)
{
final Instance world = npc.getInstanceWorld();
if (world == null)
{
return null;
}
if (npc.getId() == PROCELLA)
{
cancelQuestTimer("SPAWN_MINION", npc, player);
cancelQuestTimer("SPAWN_STORM", npc, player);
cancelQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC", npc, player);
world.finishInstance();
}
else if ((world.getParameters().getObject("minion1", Npc.class).isDead()) && (world.getParameters().getObject("minion2", Npc.class).isDead()) && (world.getParameters().getObject("minion3", Npc.class).isDead()))
{
startQuestTimer("HIDE_PROCELLA", 1000, world.getNpc(PROCELLA), null);
}
return super.onKill(npc, player, isSummon);
}
public static void main(String[] args)
{
new ResidenceOfKingProcella();
}
}

View File

@ -1,231 +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 instances.ResidenceOfQueenNebula;
import org.l2jmobius.gameserver.data.xml.SkillData;
import org.l2jmobius.gameserver.enums.SkillFinishType;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.holders.SkillHolder;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.skill.AbnormalVisualEffect;
import org.l2jmobius.gameserver.model.skill.Skill;
import org.l2jmobius.gameserver.model.skill.SkillCaster;
import instances.AbstractInstance;
/**
* @author RobikBobik
* @NOTE: Retail like working
* @TODO: Rewrite code to modern style.
* @TODO: The less Nebula's HP, the more damage she deals.
*/
public class ResidenceOfQueenNebula extends AbstractInstance
{
// NPCs
private static final int IRIS = 34046;
private static final int NEBULA = 29106;
private static final int WATER_SLIME = 29111;
// Skills
private static final int AQUA_RAGE = 50036;
private static final SkillHolder AQUA_RAGE_1 = new SkillHolder(AQUA_RAGE, 1);
private static final SkillHolder AQUA_RAGE_2 = new SkillHolder(AQUA_RAGE, 2);
private static final SkillHolder AQUA_RAGE_3 = new SkillHolder(AQUA_RAGE, 3);
private static final SkillHolder AQUA_RAGE_4 = new SkillHolder(AQUA_RAGE, 4);
private static final SkillHolder AQUA_RAGE_5 = new SkillHolder(AQUA_RAGE, 5);
private static final SkillHolder AQUA_SUMMON = new SkillHolder(50037, 1);
// Misc
private static final int TEMPLATE_ID = 196;
public ResidenceOfQueenNebula()
{
super(TEMPLATE_ID);
addStartNpc(IRIS);
addKillId(NEBULA, WATER_SLIME);
addAttackId(NEBULA);
addSpawnId(NEBULA);
addInstanceLeaveId(TEMPLATE_ID);
}
@Override
public String onAdvEvent(String event, Npc npc, Player player)
{
switch (event)
{
case "ENTER":
{
enterInstance(player, npc, TEMPLATE_ID);
break;
}
case "SPAWN_WATER_SLIME":
{
final Instance world = npc.getInstanceWorld();
if (world != null)
{
final Player plr = world.getPlayers().stream().findAny().get();
startQuestTimer("CAST_AQUA_RAGE", 60000 + getRandom(-15000, 15000), npc, plr);
if (npc.getId() == NEBULA)
{
npc.doCast(AQUA_SUMMON.getSkill());
for (int i = 0; i < getRandom(4, 6); i++)
{
addSpawn(npc, WATER_SLIME, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, -1, true, npc.getInstanceId());
startQuestTimer("SPAWN_WATER_SLIME", 300000, npc, null);
}
}
}
break;
}
case "PLAYER_PARA":
{
if (player.getAffectedSkillLevel(AQUA_RAGE) == 5)
{
player.getEffectList().startAbnormalVisualEffect(AbnormalVisualEffect.FROZEN_PILLAR);
player.setImmobilized(true);
startQuestTimer("PLAYER_UNPARA", 5000, npc, player);
}
break;
}
case "PLAYER_UNPARA":
{
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, AQUA_RAGE_5.getSkill());
player.getEffectList().stopAbnormalVisualEffect(AbnormalVisualEffect.FROZEN_PILLAR);
player.setImmobilized(false);
break;
}
case "CAST_AQUA_RAGE":
{
startQuestTimer("CAST_AQUA_RAGE", 5000, npc, player);
if ((player.isInsideRadius3D(npc, 1000)))
{
if (player.getAffectedSkillLevel(AQUA_RAGE) == 1)
{
if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_2.getSkill()))
{
npc.doCast(AQUA_RAGE_2.getSkill());
}
}
else if (player.getAffectedSkillLevel(AQUA_RAGE) == 2)
{
if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_3.getSkill()))
{
npc.doCast(AQUA_RAGE_3.getSkill());
}
}
else if (player.getAffectedSkillLevel(AQUA_RAGE) == 3)
{
if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_4.getSkill()))
{
npc.doCast(AQUA_RAGE_4.getSkill());
}
}
else if (player.getAffectedSkillLevel(AQUA_RAGE) == 4)
{
if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_5.getSkill()))
{
npc.doCast(AQUA_RAGE_5.getSkill());
startQuestTimer("PLAYER_PARA", 100, npc, player);
}
}
else if (player.getAffectedSkillLevel(AQUA_RAGE) == 5)
{
npc.abortCast();
}
else
{
if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_1.getSkill()))
{
npc.doCast(AQUA_RAGE_1.getSkill());
}
}
}
break;
}
}
return null;
}
@Override
public String onSpawn(Npc npc)
{
startQuestTimer("SPAWN_WATER_SLIME", 300000, npc, null);
return super.onSpawn(npc);
}
@Override
public String onKill(Npc npc, Player player, boolean isSummon)
{
switch (npc.getId())
{
case NEBULA:
{
cancelQuestTimer("CAST_AQUA_RAGE", npc, player);
cancelQuestTimer("SPAWN_WATER_SLIME", npc, player);
final Instance world = npc.getInstanceWorld();
if (world != null)
{
world.finishInstance();
}
break;
}
case WATER_SLIME:
{
if (player.getAffectedSkillLevel(AQUA_RAGE) == 1)
{
if (getRandom(100) < 50)
{
player.stopSkillEffects(AQUA_RAGE_1.getSkill());
}
}
else if (player.getAffectedSkillLevel(AQUA_RAGE) == 2)
{
if (getRandom(100) < 50)
{
player.stopSkillEffects(AQUA_RAGE_2.getSkill());
final Skill skill = SkillData.getInstance().getSkill(AQUA_RAGE, 1);
skill.applyEffects(player, player);
}
}
else if (player.getAffectedSkillLevel(AQUA_RAGE) == 3)
{
if (getRandom(100) < 50)
{
player.stopSkillEffects(AQUA_RAGE_3.getSkill());
final Skill skill = SkillData.getInstance().getSkill(AQUA_RAGE, 2);
skill.applyEffects(player, player);
}
}
else if (player.getAffectedSkillLevel(AQUA_RAGE) == 4)
{
if (getRandom(100) < 50)
{
player.stopSkillEffects(AQUA_RAGE_4.getSkill());
final Skill skill = SkillData.getInstance().getSkill(AQUA_RAGE, 3);
skill.applyEffects(player, player);
}
}
break;
}
}
return super.onKill(npc, player, isSummon);
}
public static void main(String[] args)
{
new ResidenceOfQueenNebula();
}
}

View File

@ -111,7 +111,7 @@
<sex>MALE</sex>
<acquire exp="0" sp="0" attributeExp="104000" />
<stats str="60" int="76" dex="73" wit="70" con="57" men="80">
<vitals hp="4456058.49802372" hpRegen="319.2293199" mp="4203.40091563113" mpRegen="3" />
<vitals hp="6456058.49802372" hpRegen="319.2293199" mp="4203.40091563113" mpRegen="3" />
<attack physical="680.441457140486" magical="127.33579646414" random="30" critical="4.75" accuracy="4.75" attackSpeed="250" type="SWORD" range="40" distance="80" width="120" />
<defence physical="208.284023668639" magical="95.9748607784026" />
<speed>
@ -198,7 +198,7 @@
<sex>MALE</sex>
<acquire exp="0" sp="0" attributeExp="104000" />
<stats str="60" int="76" dex="73" wit="70" con="57" men="80">
<vitals hp="4408646.64031621" hpRegen="319.2293199" mp="4203.40091563113" mpRegen="3" />
<vitals hp="8408646.64031621" hpRegen="319.2293199" mp="4203.40091563113" mpRegen="3" />
<attack physical="680.441457140486" magical="127.33579646414" random="30" critical="4.75" accuracy="4.75" attackSpeed="250" type="SWORD" range="40" distance="80" width="120" />
<defence physical="208.284023668639" magical="95.9748607784026" />
<speed>
@ -283,7 +283,7 @@
<sex>MALE</sex>
<acquire exp="0" sp="0" attributeExp="104000" />
<stats str="60" int="76" dex="73" wit="70" con="57" men="80">
<vitals hp="4233255.33596838" hpRegen="319.2293199" mp="4203.40091563113" mpRegen="3" />
<vitals hp="8233255.33596838" hpRegen="319.2293199" mp="4203.40091563113" mpRegen="3" />
<attack physical="680.441457140486" magical="127.33579646414" random="30" critical="4.75" accuracy="4.75" attackSpeed="250" type="SWORD" range="40" distance="80" width="120" />
<defence physical="208.284023668639" magical="95.9748607784026" />
<speed>
@ -368,7 +368,7 @@
<sex>MALE</sex>
<acquire exp="0" sp="0" attributeExp="104000" />
<stats str="60" int="76" dex="73" wit="70" con="57" men="80">
<vitals hp="2851877.47035573" hpRegen="319.2293199" mp="4203.40091563113" mpRegen="3" />
<vitals hp="8851877.47035573" hpRegen="319.2293199" mp="4203.40091563113" mpRegen="3" />
<attack physical="680.441457140486" magical="127.33579646414" random="30" critical="4.75" accuracy="4.75" attackSpeed="250" type="SWORD" range="40" distance="80" width="120" />
<defence physical="208.284023668639" magical="95.9748607784026" />
<speed>

View File

@ -332,7 +332,7 @@
<value level="4">4</value>
<value level="5">5</value>
</abnormalLevel>
<abnormalTime>-1</abnormalTime>
<abnormalTime>30</abnormalTime>
<activateRate>100</activateRate>
<abnormalType>FREEZING</abnormalType>
<isDebuff>true</isDebuff>

View File

@ -1,5 +1,81 @@
<?xml version="1.0" encoding="UTF-8"?>
<list enabled="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/zones.xsd">
<zone name="dwelling_portal_earth" type="TeleportZone" shape="Cylinder" minZ="-11518" maxZ="-11218" rad="100">
<stat name="oustX" val="222086" />
<stat name="oustY" val="190539" />
<stat name="oustZ" val="-15488" />
<stat name="default_enabled" val="false" />
<stat name="instanceId" val="214" />
<stat name="targetClass" val="Player" />
<stat name="affectedLvlMin" val="75" />
<node X="-113465" Y="-77520" />
</zone>
<zone name="dwelling_portal_wind" type="TeleportZone" shape="Cylinder" minZ="-11518" maxZ="-11218" rad="100">
<stat name="oustX" val="222151" />
<stat name="oustY" val="168077" />
<stat name="oustZ" val="-15488" />
<stat name="default_enabled" val="false" />
<stat name="instanceId" val="214" />
<stat name="targetClass" val="Player" />
<stat name="affectedLvlMin" val="75" />
<node X="-115115" Y="-79080" />
</zone>
<zone name="dwelling_portal_water" type="TeleportZone" shape="Cylinder" minZ="-11518" maxZ="-11218" rad="100">
<stat name="oustX" val="212886" />
<stat name="oustY" val="178829" />
<stat name="oustZ" val="-15488" />
<stat name="instanceId" val="214" />
<stat name="default_enabled" val="true" /> <!--Bug!! causes a problem with the others portal (no idea) -->
<stat name="targetClass" val="Player" />
<stat name="affectedLvlMin" val="75" />
<node X="-113529" Y="-79077" />
</zone>
<zone name="dwelling_portal_fire" type="TeleportZone" shape="Cylinder" minZ="-11518" maxZ="-11218" rad="100">
<stat name="oustX" val="202376" />
<stat name="oustY" val="168141" />
<stat name="oustZ" val="-15488" />
<stat name="default_enabled" val="false" />
<stat name="instanceId" val="214" />
<stat name="targetClass" val="Player" />
<stat name="affectedLvlMin" val="75" />
<node X="-115202" Y="-77519" />
</zone>
<zone name="return_portal_petram" type="TeleportZone" shape="Cylinder" minZ="-15688" maxZ="-15218" rad="100">
<stat name="oustX" val="-114323" />
<stat name="oustY" val="-78292" />
<stat name="oustZ" val="-11433" />
<stat name="instanceId" val="214" />
<stat name="targetClass" val="Player" />
<stat name="affectedLvlMin" val="75" />
<node X="222061" Y="192921" />
</zone>
<zone name="return_portal_nebula" type="TeleportZone" shape="Cylinder" minZ="-15688" maxZ="-15218" rad="100">
<stat name="oustX" val="-114323" />
<stat name="oustY" val="-78292" />
<stat name="oustZ" val="-11433" />
<stat name="instanceId" val="214" />
<stat name="targetClass" val="Player" />
<stat name="affectedLvlMin" val="75" />
<node X="222127" Y="170488" />
</zone>
<zone name="return_portal_procella" type="TeleportZone" shape="Cylinder" minZ="-15688" maxZ="-15218" rad="100">
<stat name="oustX" val="-114323" />
<stat name="oustY" val="-78292" />
<stat name="oustZ" val="-11433" />
<stat name="instanceId" val="214" />
<stat name="targetClass" val="Player" />
<stat name="affectedLvlMin" val="75" />
<node X="212855" Y="181242" />
</zone>
<zone name="return_portal_ignis" type="TeleportZone" shape="Cylinder" minZ="-15688" maxZ="-15218" rad="100">
<stat name="oustX" val="-114323" />
<stat name="oustY" val="-78292" />
<stat name="oustZ" val="-11433" />
<stat name="instanceId" val="214" />
<stat name="targetClass" val="Player" />
<stat name="affectedLvlMin" val="75" />
<node X="202349" Y="170533" />
</zone>
<zone name="hellbound_tp_1" type="TeleportZone" shape="Cylinder" minZ="-3600" maxZ="-3300" rad="200">
<stat name="oustX" val="6736" />
<stat name="oustY" val="251024" />

View File

@ -963,43 +963,43 @@
<item id="93290" count="1" /> Victory Pack
</items>
</reward>
-->
<reward id="9001" reward_id="9001" name="Clan Raid Attack" requiredCompletion="1">
Weekly mission. A reward is given for defeating 1 enemy together with your clan members in the Clan Arena.
<!-- Weekly mission. A reward is given for defeating 1 enemy together with your clan members in the Clan Arena. -->
<handler name="monster">
<param name="minLevel">40</param>
<param name="maxLevel">99</param>
</handler>
<items>
<item id="3031" count="150" /> Spirit Ore
<item id="94481" count="50" /> Clan XP
<item id="94269" count="3" /> Scroll: Boost Attack
<item id="3031" count="150" /> <!-- Spirit Ore -->
<item id="94481" count="50" /> <!-- Clan XP -->
<item id="94269" count="3" /> <!-- Scroll: Boost Attack -->
</items>
</reward>
<reward id="9002" reward_id="9002" name="Dwelling of Spirits" requiredCompletion="50">
Weekly mission. A reward is given for defeating monsters during a clan raid to the Dwelling of Spirits.
<!-- Weekly mission. A reward is given for defeating monsters during a clan raid to the Dwelling of Spirits. -->
<handler name="monster">
<param name="minLevel">76</param>
<param name="maxLevel">99</param>
</handler>
<items>
<item id="91831" count="5" /> Improved Water Attack Potion
<item id="91832" count="5" /> Improved Wind Attack Potion
<item id="91833" count="5" /> Improved Earth Attack Potion
<item id="91830" count="5" /> Improved Fire Attack Potion
<item id="91831" count="5" /> <!-- Improved Water Attack Potion -->
<item id="91832" count="5" /> <!-- Improved Wind Attack Potion -->
<item id="91833" count="5" /> <!-- Improved Earth Attack Potion -->
<item id="91830" count="5" /> <!-- Improved Fire Attack Potion -->
</items>
</reward>
<reward id="9003" reward_id="9003" name="Spirit Kings" requiredCompletion="1">
Weekly mission. A reward is given for defeating Ignis, Nebula, Procella or Petram during a clan raid to the Dwelling of Spirits.
<!-- Weekly mission. A reward is given for defeating Ignis, Nebula, Procella or Petram during a clan raid to the Dwelling of Spirits. -->
<handler name="monster">
<param name="minLevel">76</param>
<param name="maxLevel">99</param>
</handler>
<items>
<item id="91831" count="5" /> Improved Water Attack Potion
<item id="91832" count="5" /> Improved Wind Attack Potion
<item id="91833" count="5" /> Improved Earth Attack Potion
<item id="91830" count="5" /> Improved Fire Attack Potion
<item id="91831" count="5" /> <!-- Improved Water Attack Potion -->
<item id="91832" count="5" /> <!-- Improved Wind Attack Potion -->
<item id="91833" count="5" /> <!-- Improved Earth Attack Potion -->
<item id="91830" count="5" /> <!-- Improved Fire Attack Potion -->
</items>
</reward>
-->
</list>

View File

@ -0,0 +1,125 @@
<?xml version="1.0" encoding="UTF-8"?>
<instance id="214" maxWorlds="80" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
<time duration="30" empty="3000000" />
<removeBuffs type="ALL" />
<locations>
<enter type="FIXED">
<location x="-114343" y="-77747" z="-11442" />
</enter>
<exit type="ORIGIN" />
</locations>
<conditions>
<condition type="Party" />
<condition type="CommandChannel" />
<condition type="CommandChannelLeader" />
<condition type="GroupMin">
<param name="limit" value="1" />
</condition>
<condition type="GroupMax">
<param name="limit" value="100" />
</condition>
<condition type="Level">
<param name="min" value="76" />
<param name="max" value="90" />
</condition>
<condition type="Distance" />
<condition type="Reenter" />
</conditions>
<reenter apply="ON_FINISH">
<reset day="MONDAY" hour="6" minute="30" /> <!-- Retail is 1 day week Only -->
<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>
<spawnlist>
<group name="ExitPortal" spawnByDefault="false">
<npc id="15970" x="-114343" y="-77747" z="-11442" heading="46786" /> <!-- Exit Portal -->
<npc id="15971" x="-114343" y="-77747" z="-11442" heading="46786" /> <!-- Exit Portal -->
<npc id="15972" x="-114343" y="-77720" z="-11442" heading="46786" /> <!-- Exit Portal -->
<npc id="15973" x="-114343" y="-77733" z="-11442" heading="46786" /> <!-- Exit Portal -->
<npc id="15974" x="-114343" y="-77755" z="-11442" heading="46786" /> <!-- Exit Portal -->
</group>
<group name="sealstone" spawnByDefault="true">
<npc id="34178" x="-114324" y="-78273" z="-11433" heading="15825" /> <!-- Seal Stone -->
</group>
<group name="animael" spawnByDefault="false">
<npc id="34176" x="-114324" y="-78273" z="-11433" heading="15474" /> <!-- Animael -->
</group>
<group name="NormalMobs" spawnByDefault="false">
<npc id="22272" x="-114091" y="-77461" z="-11443" heading="16383" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114048" y="-77429" z="-11443" heading="6673" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114045" y="-77406" z="-11443" heading="24645" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-113837" y="-76943" z="-11443" heading="8327" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-113945" y="-76923" z="-11443" heading="30858" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114859" y="-76897" z="-11443" heading="58120" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114785" y="-76841" z="-11443" heading="55942" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114711" y="-76987" z="-11443" heading="61107" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114699" y="-77113" z="-11443" heading="16383" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114723" y="-77045" z="-11443" heading="57831" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114852" y="-78363" z="-11443" heading="657" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114984" y="-78475" z="-11443" heading="1141" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114916" y="-78442" z="-11443" heading="65129" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114841" y="-78428" z="-11443" heading="63813" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114938" y="-78411" z="-11443" heading="9120" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-113616" y="-78459" z="-11443" heading="30680" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-113622" y="-78398" z="-11443" heading="28616" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-113591" y="-78301" z="-11442" heading="37105" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-113604" y="-78239" z="-11443" heading="35386" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-113693" y="-78249" z="-11443" heading="29763" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-113568" y="-78336" z="-11442" heading="28986" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-113818" y="-78174" z="-11443" heading="55979" /> <!-- Corrupted Fairy -->
<npc id="22272" x="-114618" y="-77313" z="-11443" heading="22097" /> <!-- Corrupted Fairy -->
<npc id="22272" x="-113589" y="-78333" z="-11443" heading="30535" /> <!-- Corrupted Fairy -->
<npc id="22272" x="-114840" y="-78561" z="-11443" heading="32322" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-113933" y="-77703" z="-11443" heading="1785" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-113872" y="-77793" z="-11443" heading="60399" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114852" y="-77864" z="-11443" heading="13028" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114822" y="-77925" z="-11443" heading="17015" /> <!-- Corrupted Fairy -->
<npc id="22272" x="-114554" y="-78998" z="-11443" heading="8750" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114193" y="-78871" z="-11441" heading="32032" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114105" y="-79053" z="-11443" heading="2811" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114456" y="-79050" z="-11443" heading="30111" /> <!-- Corrupted Fairy -->
<npc id="22272" x="-113845" y="-78477" z="-11443" heading="62467" /> <!-- Corrupted Fairy -->
<npc id="22271" x="-114676" y="-78345" z="-11439" heading="30937" /> <!-- Corrupted Fairy -->
</group>
<group name="ruipwave_1" spawnByDefault="false">
<npc id="22273" x="-113945" y="-76923" z="-11443" heading="30858" /> <!-- Ruip portal container-->
<npc id="22273" x="-114840" y="-78561" z="-11443" heading="32322" /> <!-- Ruip portal container -->
<npc id="22273" x="-114852" y="-77864" z="-11443" heading="13028" /> <!-- Ruip portal container-->
<npc id="22273" x="-114676" y="-78345" z="-11439" heading="30937" /> <!-- Ruip portal container -->
<npc id="22273" x="-113845" y="-78477" z="-11443" heading="62467" /> <!-- Ruip portal container-->
<npc id="22273" x="-114676" y="-78345" z="-11439" heading="30937" /> <!-- Ruip portal container -->
<npc id="22273" x="-113568" y="-78336" z="-11442" heading="28986" /> <!-- Ruip portal container -->
<npc id="22273" x="-113872" y="-77793" z="-11443" heading="60399" /> <!-- Ruip portal container -->
<npc id="22273" x="-113589" y="-78333" z="-11443" heading="30535" /> <!-- Ruip portal container -->
<npc id="22273" x="-113818" y="-78174" z="-11443" heading="55979" /> <!-- Ruip portal container -->
</group>
<group name="ruipwave_2" spawnByDefault="false">
<npc id="22273" x="-113622" y="-78398" z="-11443" heading="28616" /> <!-- Ruip portal container-->
<npc id="22273" x="-113622" y="-78398" z="-11443" heading="28616" /> <!-- Ruip portal container -->
<npc id="22273" x="-114323" y="-78914" z="-11443" heading="13828" /> <!-- Ruip portal container -->
<npc id="22273" x="-114676" y="-78345" z="-11439" heading="30937" /> <!-- Ruip portal container -->
<npc id="22273" x="-114840" y="-78561" z="-11443" heading="32322" /> <!-- Ruip portal container -->
<npc id="22273" x="-114676" y="-78345" z="-11439" heading="30937" /> <!-- Ruip portal container -->
<npc id="22273" x="-114785" y="-76841" z="-11443" heading="55942" /> <!-- Ruip portal container -->
<npc id="22273" x="-114554" y="-78998" z="-11443" heading="8750" /> <!-- Ruip portal container -->
<npc id="22273" x="-114841" y="-78428" z="-11443" heading="63813" /> <!-- Ruip portal container -->
<npc id="22273" x="-114840" y="-78561" z="-11443" heading="32322" /> <!-- Ruip portal container -->
</group>
<group name="portalearth" spawnByDefault="false">
<npc id="15971" x="-113516" y="-77521" z="-11419" heading="8750" />
</group>
<group name="portalwind" spawnByDefault="false">
<npc id="15969" x="-114554" y="-78998" z="-11443" heading="8750" />
</group>
<group name="portalfire" spawnByDefault="false">
<npc id="15970" x="-114554" y="-78998" z="-11443" heading="8750" />
</group>
<group name="portalwater" spawnByDefault="false">
<npc id="15972" x="-114554" y="-78998" z="-11443" heading="8750" />
</group>
</spawnlist>
</instance>

View File

@ -1,38 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<instance id="195" maxWorlds="80" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
<time duration="120" empty="0" />
<removeBuffs type="ALL" />
<locations>
<enter type="FIXED">
<location x="202374" y="168153" z="-15485" />
</enter>
<exit type="ORIGIN" />
</locations>
<conditions>
<condition type="Party" />
<condition type="CommandChannel" />
<condition type="CommandChannelLeader" />
<condition type="GroupMin">
<param name="limit" value="18" /> <!-- The Kamael update -->
</condition>
<condition type="GroupMax">
<param name="limit" value="100" />
</condition>
<condition type="Level">
<param name="min" value="76" />
<param name="max" value="82" />
</condition>
<condition type="Distance" />
<condition type="Reenter" />
</conditions>
<reenter apply="ON_ENTER">
<reset day="WEDNESDAY" hour="6" minute="30" />
</reenter>
<spawnlist>
<group>
<npc id="29105" x="202350" y="169121" z="-15484" heading="48103" /> <!-- Ignis -->
<npc id="29109" x="202353" y="170347" z="-15484" heading="46786" /> <!-- Freya -->
<npc id="29110" x="202353" y="170347" z="-15484" heading="46786" /> <!-- Safe Zone -->
</group>
</spawnlist>
</instance>

View File

@ -1,36 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<instance id="198" maxWorlds="80" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
<time duration="120" empty="0" />
<removeBuffs type="ALL" />
<locations>
<enter type="FIXED">
<location x="222081" y="190538" z="-15485" />
</enter>
<exit type="ORIGIN" />
</locations>
<conditions>
<condition type="Party" />
<condition type="CommandChannel" />
<condition type="CommandChannelLeader" />
<condition type="GroupMin">
<param name="limit" value="18" /> <!-- The Kamael update -->
</condition>
<condition type="GroupMax">
<param name="limit" value="100" />
</condition>
<condition type="Level">
<param name="min" value="76" />
<param name="max" value="82" />
</condition>
<condition type="Distance" />
<condition type="Reenter" />
</conditions>
<reenter apply="ON_ENTER">
<reset day="WEDNESDAY" hour="6" minute="30" />
</reenter>
<spawnlist>
<group>
<npc id="29108" x="222063" y="191514" z="-15486" heading="50142" /> <!-- Petram -->
</group>
</spawnlist>
</instance>

View File

@ -1,31 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<instance id="197" maxWorlds="80" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
<time duration="120" empty="0" />
<removeBuffs type="ALL" />
<locations>
<enter type="FIXED">
<location x="212884" y="178847" z="-15485" />
</enter>
<exit type="ORIGIN" />
</locations>
<conditions>
<condition type="Party" />
<condition type="CommandChannel" />
<condition type="CommandChannelLeader" />
<condition type="GroupMin">
<param name="limit" value="18" /> <!-- The Kamael update -->
</condition>
<condition type="GroupMax">
<param name="limit" value="100" />
</condition>
<condition type="Level">
<param name="min" value="76" />
<param name="max" value="82" />
</condition>
<condition type="Distance" />
<condition type="Reenter" />
</conditions>
<reenter apply="ON_ENTER">
<reset day="WEDNESDAY" hour="6" minute="30" />
</reenter>
</instance>

View File

@ -1,36 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<instance id="196" maxWorlds="80" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
<time duration="120" empty="0" />
<removeBuffs type="ALL" />
<locations>
<enter type="FIXED">
<location x="222149" y="168087" z="-15485" />
</enter>
<exit type="ORIGIN" />
</locations>
<conditions>
<condition type="Party" />
<condition type="CommandChannel" />
<condition type="CommandChannelLeader" />
<condition type="GroupMin">
<param name="limit" value="18" /> <!-- The Kamael update -->
</condition>
<condition type="GroupMax">
<param name="limit" value="100" />
</condition>
<condition type="Level">
<param name="min" value="76" />
<param name="max" value="82" />
</condition>
<condition type="Distance" />
<condition type="Reenter" />
</conditions>
<reenter apply="ON_ENTER">
<reset day="WEDNESDAY" hour="6" minute="30" />
</reenter>
<spawnlist>
<group>
<npc id="29106" x="222127" y="169057" z="-15486" heading="48730" /> <!-- Nebula -->
</group>
</spawnlist>
</instance>

View File

@ -0,0 +1,4 @@
<html><body>Animael:<br>
All done here?<br>
<Button ALIGN=LEFT ICON="TELEPORT" action="bypass -h Quest DwellingOfSpirits TELEPORT">ByeByeBye</Button>
</body></html>

View File

@ -8,6 +8,6 @@
<td align=center width=185 height=185 background="BranchSys3.icon2.ArmyTrainingEmblem"></td>
</tr>
</table>
-.- <font color="LEVEL">NO AVAILABLE -.-</font><br>
<button action="bypass -h Quest DwellingOfSpirits ENTER" value="Dwelling of Spirits" width="230" height="31" back="BranchSys3.icon2.ArmyTrainingInfo_down" fore="BranchSys3.icon2.ArmyTrainingInfo">
<button action="bypass -h Quest MonsterArena 34169-01.htm" value="Back" width="230" height="31" back="L2UI_CT1.HtmlWnd_DF_Awake_Down" fore="L2UI_CT1.HtmlWnd_DF_Awake">
</body></html>

View File

@ -1,248 +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 instances.ResidenceOfKingIgnis;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.enums.SkillFinishType;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.holders.SkillHolder;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.skill.Skill;
import org.l2jmobius.gameserver.model.skill.SkillCaster;
import instances.AbstractInstance;
/**
* @author RobikBobik
* @NOTE: Retail like working - I get informations from wiki and youtube video.
* @TODO: Maybe rewrite code to modern style.
* @TODO: Check skill 50050 - working, but I dont know if is correct.
* @TODO: Ignis other skills - skills are implemented, but I dont know if is correct.
*/
public class ResidenceOfKingIgnis extends AbstractInstance
{
// NPCs
private static final int TARA = 34047;
private static final int FREYA = 29109;
private static final int IGNIS = 29105;
// Skills
private static final SkillHolder FIRE_RAG_1 = new SkillHolder(50050, 1);
private static final SkillHolder FIRE_RAG_2 = new SkillHolder(50050, 2);
private static final SkillHolder FIRE_RAG_3 = new SkillHolder(50050, 3);
private static final SkillHolder FIRE_RAG_4 = new SkillHolder(50050, 4);
private static final SkillHolder FIRE_RAG_5 = new SkillHolder(50050, 5);
private static final SkillHolder FIRE_RAG_6 = new SkillHolder(50050, 6);
private static final SkillHolder FIRE_RAG_7 = new SkillHolder(50050, 7);
private static final SkillHolder FIRE_RAG_8 = new SkillHolder(50050, 8);
private static final SkillHolder FIRE_RAG_9 = new SkillHolder(50050, 9);
private static final SkillHolder FIRE_RAG_10 = new SkillHolder(50050, 10);
private static final SkillHolder FREYA_SAFETY_ZONE = new SkillHolder(50052, 1); // Just for an effect
// Misc
private static final int TEMPLATE_ID = 195;
private static final Map<Player, Integer> _playerFireRage = new ConcurrentHashMap<>();
public ResidenceOfKingIgnis()
{
super(TEMPLATE_ID);
addStartNpc(TARA);
addTalkId(FREYA);
addKillId(IGNIS);
addAttackId(IGNIS);
addInstanceLeaveId(TEMPLATE_ID);
}
@Override
public String onAdvEvent(String event, Npc npc, Player player)
{
switch (event)
{
case "ENTER":
{
enterInstance(player, npc, TEMPLATE_ID);
_playerFireRage.put(player, 0);
break;
}
case "REMOVE_FIRE_RAGE":
{
if (player.isAffectedBySkill(FIRE_RAG_1))
{
final int playerFireRage = _playerFireRage.getOrDefault(player, 0);
if (playerFireRage < 5)
{
_playerFireRage.put(player, playerFireRage + 1);
player.stopSkillEffects(SkillFinishType.REMOVED, FIRE_RAG_1.getSkillId());
player.doCast(FREYA_SAFETY_ZONE.getSkill());
npc.broadcastSay(ChatType.NPC_SHOUT, "Bless with you. Lets finish fight!");
break;
}
npc.broadcastSay(ChatType.NPC_SHOUT, "You cannot use my power again.");
player.sendMessage("Freya: You cannot use my power again.");
break;
}
npc.broadcastSay(ChatType.NPC_SHOUT, "I help you only when you affected by Fire Rage skill.");
break;
}
case "CAST_FIRE_RAGE_1":
{
if (SkillCaster.checkUseConditions(npc, FIRE_RAG_1.getSkill()))
{
npc.doCast(FIRE_RAG_1.getSkill());
}
break;
}
case "CAST_FIRE_RAGE_2":
{
if (SkillCaster.checkUseConditions(npc, FIRE_RAG_2.getSkill()))
{
npc.doCast(FIRE_RAG_2.getSkill());
}
break;
}
case "CAST_FIRE_RAGE_3":
{
if (SkillCaster.checkUseConditions(npc, FIRE_RAG_3.getSkill()))
{
npc.doCast(FIRE_RAG_3.getSkill());
}
break;
}
case "CAST_FIRE_RAGE_4":
{
if (SkillCaster.checkUseConditions(npc, FIRE_RAG_4.getSkill()))
{
npc.doCast(FIRE_RAG_4.getSkill());
}
break;
}
case "CAST_FIRE_RAGE_5":
{
if (SkillCaster.checkUseConditions(npc, FIRE_RAG_5.getSkill()))
{
npc.doCast(FIRE_RAG_5.getSkill());
}
break;
}
case "CAST_FIRE_RAGE_6":
{
if (SkillCaster.checkUseConditions(npc, FIRE_RAG_6.getSkill()))
{
npc.doCast(FIRE_RAG_6.getSkill());
}
break;
}
case "CAST_FIRE_RAGE_7":
{
if (SkillCaster.checkUseConditions(npc, FIRE_RAG_7.getSkill()))
{
npc.doCast(FIRE_RAG_7.getSkill());
}
break;
}
case "CAST_FIRE_RAGE_8":
{
if (SkillCaster.checkUseConditions(npc, FIRE_RAG_8.getSkill()))
{
npc.doCast(FIRE_RAG_8.getSkill());
}
break;
}
case "CAST_FIRE_RAGE_9":
{
if (SkillCaster.checkUseConditions(npc, FIRE_RAG_9.getSkill()))
{
npc.doCast(FIRE_RAG_9.getSkill());
}
break;
}
case "CAST_FIRE_RAGE_10":
{
if (SkillCaster.checkUseConditions(npc, FIRE_RAG_10.getSkill()))
{
npc.doCast(FIRE_RAG_10.getSkill());
}
break;
}
}
return null;
}
@Override
public String onAttack(Npc npc, Player attacker, int damage, boolean isSummon, Skill skill)
{
if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.99)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.70)))
{
startQuestTimer("CAST_FIRE_RAGE_1", 1000, npc, null);
}
else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.70)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.50)))
{
startQuestTimer("CAST_FIRE_RAGE_2", 1000, npc, null);
}
else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.50)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.40)))
{
startQuestTimer("CAST_FIRE_RAGE_3", 1000, npc, null);
}
else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.40)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.25)))
{
startQuestTimer("CAST_FIRE_RAGE_4", 1000, npc, null);
}
else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.25)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.15)))
{
startQuestTimer("CAST_FIRE_RAGE_5", 1000, npc, null);
}
else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.15)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.10)))
{
startQuestTimer("CAST_FIRE_RAGE_6", 1000, npc, null);
}
else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.10)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.7)))
{
startQuestTimer("CAST_FIRE_RAGE_7", 1000, npc, null);
}
else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.7)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.5)))
{
startQuestTimer("CAST_FIRE_RAGE_8", 1000, npc, null);
}
else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.5)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.3)))
{
startQuestTimer("CAST_FIRE_RAGE_9", 1000, npc, null);
}
else if (npc.getCurrentHp() < (npc.getMaxHp() * 0.3))
{
startQuestTimer("CAST_FIRE_RAGE_10", 1000, npc, null);
}
return super.onAttack(npc, attacker, damage, isSummon, skill);
}
@Override
public String onKill(Npc npc, Player player, boolean isSummon)
{
final Instance world = npc.getInstanceWorld();
if (world != null)
{
world.finishInstance();
}
return super.onKill(npc, player, isSummon);
}
public static void main(String[] args)
{
new ResidenceOfKingIgnis();
}
}

View File

@ -1,229 +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 instances.ResidenceOfKingPetram;
import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.holders.SkillHolder;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.skill.Skill;
import instances.AbstractInstance;
/**
* @author RobikBobik, Mobius
* @NOTE: Retail like working
* @TODO: Rewrite code to modern style.
* @TODO: Petram Skills and minion skills
*/
public class ResidenceOfKingPetram extends AbstractInstance
{
// NPCs
private static final int TRITAN = 34049;
private static final int PETRAM = 29108;
private static final int PETRAM_PIECE = 29116;
private static final int PETRAM_FRAGMENT = 29117;
// Skills
private static final SkillHolder EARTH_ENERGY = new SkillHolder(50066, 1); // When spawn Minion.
private static final SkillHolder EARTH_FURY = new SkillHolder(50059, 1); // When change invul state.
private static final SkillHolder TEST = new SkillHolder(5712, 1); // TODO: This test skill is only for visual effect, but need to find correct skill ID.
// Misc
private static final int TEMPLATE_ID = 198;
public ResidenceOfKingPetram()
{
super(TEMPLATE_ID);
addStartNpc(TRITAN);
addKillId(PETRAM, PETRAM_PIECE, PETRAM_FRAGMENT);
addAttackId(PETRAM);
addInstanceLeaveId(TEMPLATE_ID);
}
@Override
public String onAdvEvent(String event, Npc npc, Player player)
{
switch (event)
{
case "ENTER":
{
enterInstance(player, npc, TEMPLATE_ID);
break;
}
case "SPAWN_MINION":
{
final Instance world = npc.getInstanceWorld();
if (world != null)
{
npc.doCast(EARTH_ENERGY.getSkill());
// Prevent to double or higher spawn when HP is between 68-70% + etc...
if (!world.getParameters().getBoolean("spawnedMinions", false))
{
world.getParameters().set("spawnedMinions", true);
final int stage = world.getParameters().getInt("stage", 0);
world.getParameters().set("stage", stage + 1);
world.setParameter("minion1", addSpawn(npc, PETRAM_PIECE, 221543, 191530, -15486, 1131, false, -1, true, npc.getInstanceId()));
world.setParameter("minion2", addSpawn(npc, PETRAM_FRAGMENT, 222069, 192019, -15486, 49364, false, -1, true, npc.getInstanceId()));
world.setParameter("minion3", addSpawn(npc, PETRAM_PIECE, 222595, 191479, -15486, 34013, false, -1, true, npc.getInstanceId()));
world.setParameter("minion4", addSpawn(npc, PETRAM_FRAGMENT, 222077, 191017, -15486, 16383, false, -1, true, npc.getInstanceId()));
npc.setInvul(true);
npc.broadcastSay(ChatType.NPC_SHOUT, "HaHa, fighters lets kill them. Now Im invul!!!");
}
startQuestTimer("SUPPORT_PETRAM", 3000, npc, null);
}
break;
}
case "UNSPAWN_MINION":
{
final Instance world = npc.getInstanceWorld();
if (world != null)
{
world.getParameters().set("spawnedMinions", false);
npc.setInvul(false);
npc.broadcastSay(ChatType.NPC_SHOUT, "Nooooo... Nooooo...");
}
break;
}
case "SUPPORT_PETRAM":
{
final Instance world = npc.getInstanceWorld();
if (world != null)
{
final Npc m1 = world.getParameters().getObject("minion1", Npc.class);
final Npc m2 = world.getParameters().getObject("minion2", Npc.class);
final Npc m3 = world.getParameters().getObject("minion3", Npc.class);
final Npc m4 = world.getParameters().getObject("minion4", Npc.class);
if (!m1.isDead())
{
m1.setTarget(world.getNpc(PETRAM));
m1.doCast(TEST.getSkill());
}
if (!m2.isDead())
{
m2.setTarget(world.getNpc(PETRAM));
m2.doCast(TEST.getSkill());
}
if (!m3.isDead())
{
m3.setTarget(world.getNpc(PETRAM));
m3.doCast(TEST.getSkill());
}
if (!m4.isDead())
{
m4.setTarget(world.getNpc(PETRAM));
m4.doCast(TEST.getSkill());
}
startQuestTimer("SUPPORT_PETRAM", 10100, npc, null); // NOTE: When find correct skill this number is reuse skill + 100
}
break;
}
case "EARTH_FURY":
{
final Instance world = npc.getInstanceWorld();
if (world != null)
{
npc.doCast(EARTH_FURY.getSkill());
}
break;
}
}
return null;
}
@Override
public String onAttack(Npc npc, Player attacker, int damage, boolean isSummon, Skill skill)
{
final Instance world = npc.getInstanceWorld();
if (world == null)
{
return null;
}
if (npc.getId() == PETRAM)
{
if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.70)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.68)))
{
startQuestTimer("EARTH_FURY", 1000, npc, null);
if (world.getParameters().getInt("stage", 0) == 0)
{
startQuestTimer("SPAWN_MINION", 1000, npc, null);
}
}
else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.40)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.38)))
{
startQuestTimer("EARTH_FURY", 1000, npc, null);
if (world.getParameters().getInt("stage", 0) == 1)
{
startQuestTimer("SPAWN_MINION", 1000, npc, null);
}
}
else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.20)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.18)))
{
startQuestTimer("EARTH_FURY", 1000, npc, null);
if (world.getParameters().getInt("stage", 0) == 2)
{
startQuestTimer("SPAWN_MINION", 1000, npc, null);
}
}
else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.10)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.08)))
{
startQuestTimer("EARTH_FURY", 1000, npc, null);
if (world.getParameters().getInt("stage", 0) == 3)
{
startQuestTimer("SPAWN_MINION", 1000, npc, null);
}
}
}
return super.onAttack(npc, attacker, damage, isSummon, skill);
}
@Override
public String onKill(Npc npc, Player player, boolean isSummon)
{
final Instance world = npc.getInstanceWorld();
if (world == null)
{
return null;
}
if (npc.getId() == PETRAM)
{
world.finishInstance();
}
else if ((world.getParameters().getObject("minion1", Npc.class).isDead()) && (world.getParameters().getObject("minion2", Npc.class).isDead()) && (world.getParameters().getObject("minion3", Npc.class).isDead()) && (world.getParameters().getObject("minion4", Npc.class).isDead()))
{
startQuestTimer("UNSPAWN_MINION", 3000, world.getNpc(PETRAM), null);
}
return super.onKill(npc, player, isSummon);
}
public static void main(String[] args)
{
new ResidenceOfKingPetram();
}
}

View File

@ -1,182 +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 instances.ResidenceOfKingProcella;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.holders.SkillHolder;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.skill.SkillCaster;
import instances.AbstractInstance;
/**
* @author RobikBobik, Mobius
* @NOTE: Retail like working
* @TODO: Rewrite code to modern style.
*/
public class ResidenceOfKingProcella extends AbstractInstance
{
// NPCs
private static final int WIRI = 34048;
private static final int PROCELLA = 29107;
private static final int PROCELLA_GUARDIAN_1 = 29112;
private static final int PROCELLA_GUARDIAN_2 = 29113;
private static final int PROCELLA_GUARDIAN_3 = 29114;
private static final int PROCELLA_STORM = 29115;
// Skills
private static final SkillHolder HURRICANE_SUMMON = new SkillHolder(50042, 1); // When spawn Minion
private static final int HURRICANE_BOLT = 50043;
private static final SkillHolder HURRICANE_BOLT_LV_1 = new SkillHolder(50043, 1); // When player in Radius + para
// Misc
private static final int TEMPLATE_ID = 197;
private static final int STORM_MAX_COUNT = 16; // TODO: Max is limit ?
public ResidenceOfKingProcella()
{
super(TEMPLATE_ID);
addStartNpc(WIRI);
addKillId(PROCELLA, PROCELLA_GUARDIAN_1, PROCELLA_GUARDIAN_2, PROCELLA_GUARDIAN_3);
addInstanceEnterId(TEMPLATE_ID);
}
@Override
public String onAdvEvent(String event, Npc npc, Player player)
{
switch (event)
{
case "ENTER":
{
enterInstance(player, npc, TEMPLATE_ID);
final Instance world = player.getInstanceWorld();
if (world != null)
{
final Npc procella = addSpawn(PROCELLA, 212862, 179828, -15489, 49151, false, 0, true, player.getInstanceId());
startQuestTimer("SPAWN_MINION", 300000 + getRandom(-15000, 15000), procella, player);
startQuestTimer("SPAWN_STORM", 5000, procella, player);
world.setParameter("stormCount", 0);
}
break;
}
case "SPAWN_MINION":
{
final Instance world = npc.getInstanceWorld();
if ((world != null) && (npc.getId() == PROCELLA))
{
world.setParameter("minion1", addSpawn(PROCELLA_GUARDIAN_1, 212663, 179421, -15486, 31011, true, 0, true, npc.getInstanceId()));
world.setParameter("minion2", addSpawn(PROCELLA_GUARDIAN_2, 213258, 179822, -15486, 12001, true, 0, true, npc.getInstanceId()));
world.setParameter("minion3", addSpawn(PROCELLA_GUARDIAN_3, 212558, 179974, -15486, 12311, true, 0, true, npc.getInstanceId()));
startQuestTimer("HIDE_PROCELLA", 1000, world.getNpc(PROCELLA), null);
}
break;
}
case "SPAWN_STORM":
{
final Instance world = npc.getInstanceWorld();
if ((world != null) && (world.getParameters().getInt("stormCount", 0) < STORM_MAX_COUNT))
{
world.getNpc(PROCELLA).doCast(HURRICANE_SUMMON.getSkill());
final Npc procellaStorm = addSpawn(PROCELLA_STORM, world.getNpc(PROCELLA).getX() + getRandom(-500, 500), world.getNpc(PROCELLA).getY() + getRandom(-500, 500), world.getNpc(PROCELLA).getZ(), 31011, true, 0, true, npc.getInstanceId());
procellaStorm.setRandomWalking(true);
world.getParameters().increaseInt("stormCount", 1);
startQuestTimer("SPAWN_STORM", 60000, world.getNpc(PROCELLA), null);
startQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC", 100, procellaStorm, player); // All time checking
}
break;
}
case "HIDE_PROCELLA":
{
final Instance world = npc.getInstanceWorld();
if (world != null)
{
if (world.getNpc(PROCELLA).isInvisible())
{
world.getNpc(PROCELLA).setInvisible(false);
}
else
{
world.getNpc(PROCELLA).setInvisible(true);
startQuestTimer("SPAWN_MINION", 300000 + getRandom(-15000, 15000), world.getNpc(PROCELLA), player);
}
}
break;
}
case "CHECK_CHAR_INSIDE_RADIUS_NPC":
{
final Instance world = npc.getInstanceWorld();
if (world != null)
{
final Player plr = world.getPlayers().stream().findAny().orElse(null);
if ((plr != null) && (plr.isInsideRadius3D(npc, 100)))
{
npc.abortAttack();
npc.abortCast();
npc.setTarget(plr);
if (plr.getAffectedSkillLevel(HURRICANE_BOLT) == 1)
{
npc.abortCast();
startQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC", 100, npc, player); // All time checking
}
else
{
if (SkillCaster.checkUseConditions(npc, HURRICANE_BOLT_LV_1.getSkill()))
{
npc.doCast(HURRICANE_BOLT_LV_1.getSkill());
}
}
startQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC", 100, npc, player); // All time checking
}
else
{
startQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC", 100, npc, player); // All time checking
}
}
break;
}
}
return null;
}
@Override
public String onKill(Npc npc, Player player, boolean isSummon)
{
final Instance world = npc.getInstanceWorld();
if (world == null)
{
return null;
}
if (npc.getId() == PROCELLA)
{
cancelQuestTimer("SPAWN_MINION", npc, player);
cancelQuestTimer("SPAWN_STORM", npc, player);
cancelQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC", npc, player);
world.finishInstance();
}
else if ((world.getParameters().getObject("minion1", Npc.class).isDead()) && (world.getParameters().getObject("minion2", Npc.class).isDead()) && (world.getParameters().getObject("minion3", Npc.class).isDead()))
{
startQuestTimer("HIDE_PROCELLA", 1000, world.getNpc(PROCELLA), null);
}
return super.onKill(npc, player, isSummon);
}
public static void main(String[] args)
{
new ResidenceOfKingProcella();
}
}

View File

@ -1,231 +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 instances.ResidenceOfQueenNebula;
import org.l2jmobius.gameserver.data.xml.SkillData;
import org.l2jmobius.gameserver.enums.SkillFinishType;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.holders.SkillHolder;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.skill.AbnormalVisualEffect;
import org.l2jmobius.gameserver.model.skill.Skill;
import org.l2jmobius.gameserver.model.skill.SkillCaster;
import instances.AbstractInstance;
/**
* @author RobikBobik
* @NOTE: Retail like working
* @TODO: Rewrite code to modern style.
* @TODO: The less Nebula's HP, the more damage she deals.
*/
public class ResidenceOfQueenNebula extends AbstractInstance
{
// NPCs
private static final int IRIS = 34046;
private static final int NEBULA = 29106;
private static final int WATER_SLIME = 29111;
// Skills
private static final int AQUA_RAGE = 50036;
private static final SkillHolder AQUA_RAGE_1 = new SkillHolder(AQUA_RAGE, 1);
private static final SkillHolder AQUA_RAGE_2 = new SkillHolder(AQUA_RAGE, 2);
private static final SkillHolder AQUA_RAGE_3 = new SkillHolder(AQUA_RAGE, 3);
private static final SkillHolder AQUA_RAGE_4 = new SkillHolder(AQUA_RAGE, 4);
private static final SkillHolder AQUA_RAGE_5 = new SkillHolder(AQUA_RAGE, 5);
private static final SkillHolder AQUA_SUMMON = new SkillHolder(50037, 1);
// Misc
private static final int TEMPLATE_ID = 196;
public ResidenceOfQueenNebula()
{
super(TEMPLATE_ID);
addStartNpc(IRIS);
addKillId(NEBULA, WATER_SLIME);
addAttackId(NEBULA);
addSpawnId(NEBULA);
addInstanceLeaveId(TEMPLATE_ID);
}
@Override
public String onAdvEvent(String event, Npc npc, Player player)
{
switch (event)
{
case "ENTER":
{
enterInstance(player, npc, TEMPLATE_ID);
break;
}
case "SPAWN_WATER_SLIME":
{
final Instance world = npc.getInstanceWorld();
if (world != null)
{
final Player plr = world.getPlayers().stream().findAny().get();
startQuestTimer("CAST_AQUA_RAGE", 60000 + getRandom(-15000, 15000), npc, plr);
if (npc.getId() == NEBULA)
{
npc.doCast(AQUA_SUMMON.getSkill());
for (int i = 0; i < getRandom(4, 6); i++)
{
addSpawn(npc, WATER_SLIME, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, -1, true, npc.getInstanceId());
startQuestTimer("SPAWN_WATER_SLIME", 300000, npc, null);
}
}
}
break;
}
case "PLAYER_PARA":
{
if (player.getAffectedSkillLevel(AQUA_RAGE) == 5)
{
player.getEffectList().startAbnormalVisualEffect(AbnormalVisualEffect.FROZEN_PILLAR);
player.setImmobilized(true);
startQuestTimer("PLAYER_UNPARA", 5000, npc, player);
}
break;
}
case "PLAYER_UNPARA":
{
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, AQUA_RAGE_5.getSkill());
player.getEffectList().stopAbnormalVisualEffect(AbnormalVisualEffect.FROZEN_PILLAR);
player.setImmobilized(false);
break;
}
case "CAST_AQUA_RAGE":
{
startQuestTimer("CAST_AQUA_RAGE", 5000, npc, player);
if ((player.isInsideRadius3D(npc, 1000)))
{
if (player.getAffectedSkillLevel(AQUA_RAGE) == 1)
{
if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_2.getSkill()))
{
npc.doCast(AQUA_RAGE_2.getSkill());
}
}
else if (player.getAffectedSkillLevel(AQUA_RAGE) == 2)
{
if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_3.getSkill()))
{
npc.doCast(AQUA_RAGE_3.getSkill());
}
}
else if (player.getAffectedSkillLevel(AQUA_RAGE) == 3)
{
if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_4.getSkill()))
{
npc.doCast(AQUA_RAGE_4.getSkill());
}
}
else if (player.getAffectedSkillLevel(AQUA_RAGE) == 4)
{
if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_5.getSkill()))
{
npc.doCast(AQUA_RAGE_5.getSkill());
startQuestTimer("PLAYER_PARA", 100, npc, player);
}
}
else if (player.getAffectedSkillLevel(AQUA_RAGE) == 5)
{
npc.abortCast();
}
else
{
if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_1.getSkill()))
{
npc.doCast(AQUA_RAGE_1.getSkill());
}
}
}
break;
}
}
return null;
}
@Override
public String onSpawn(Npc npc)
{
startQuestTimer("SPAWN_WATER_SLIME", 300000, npc, null);
return super.onSpawn(npc);
}
@Override
public String onKill(Npc npc, Player player, boolean isSummon)
{
switch (npc.getId())
{
case NEBULA:
{
cancelQuestTimer("CAST_AQUA_RAGE", npc, player);
cancelQuestTimer("SPAWN_WATER_SLIME", npc, player);
final Instance world = npc.getInstanceWorld();
if (world != null)
{
world.finishInstance();
}
break;
}
case WATER_SLIME:
{
if (player.getAffectedSkillLevel(AQUA_RAGE) == 1)
{
if (getRandom(100) < 50)
{
player.stopSkillEffects(AQUA_RAGE_1.getSkill());
}
}
else if (player.getAffectedSkillLevel(AQUA_RAGE) == 2)
{
if (getRandom(100) < 50)
{
player.stopSkillEffects(AQUA_RAGE_2.getSkill());
final Skill skill = SkillData.getInstance().getSkill(AQUA_RAGE, 1);
skill.applyEffects(player, player);
}
}
else if (player.getAffectedSkillLevel(AQUA_RAGE) == 3)
{
if (getRandom(100) < 50)
{
player.stopSkillEffects(AQUA_RAGE_3.getSkill());
final Skill skill = SkillData.getInstance().getSkill(AQUA_RAGE, 2);
skill.applyEffects(player, player);
}
}
else if (player.getAffectedSkillLevel(AQUA_RAGE) == 4)
{
if (getRandom(100) < 50)
{
player.stopSkillEffects(AQUA_RAGE_4.getSkill());
final Skill skill = SkillData.getInstance().getSkill(AQUA_RAGE, 3);
skill.applyEffects(player, player);
}
}
break;
}
}
return super.onKill(npc, player, isSummon);
}
public static void main(String[] args)
{
new ResidenceOfQueenNebula();
}
}

View File

@ -111,7 +111,7 @@
<sex>MALE</sex>
<acquire exp="0" sp="0" attributeExp="104000" />
<stats str="60" int="76" dex="73" wit="70" con="57" men="80">
<vitals hp="4456058.49802372" hpRegen="319.2293199" mp="4203.40091563113" mpRegen="3" />
<vitals hp="6456058.49802372" hpRegen="319.2293199" mp="4203.40091563113" mpRegen="3" />
<attack physical="680.441457140486" magical="127.33579646414" random="30" critical="4.75" accuracy="4.75" attackSpeed="250" type="SWORD" range="40" distance="80" width="120" />
<defence physical="208.284023668639" magical="95.9748607784026" />
<speed>
@ -198,7 +198,7 @@
<sex>MALE</sex>
<acquire exp="0" sp="0" attributeExp="104000" />
<stats str="60" int="76" dex="73" wit="70" con="57" men="80">
<vitals hp="4408646.64031621" hpRegen="319.2293199" mp="4203.40091563113" mpRegen="3" />
<vitals hp="8408646.64031621" hpRegen="319.2293199" mp="4203.40091563113" mpRegen="3" />
<attack physical="680.441457140486" magical="127.33579646414" random="30" critical="4.75" accuracy="4.75" attackSpeed="250" type="SWORD" range="40" distance="80" width="120" />
<defence physical="208.284023668639" magical="95.9748607784026" />
<speed>
@ -283,7 +283,7 @@
<sex>MALE</sex>
<acquire exp="0" sp="0" attributeExp="104000" />
<stats str="60" int="76" dex="73" wit="70" con="57" men="80">
<vitals hp="4233255.33596838" hpRegen="319.2293199" mp="4203.40091563113" mpRegen="3" />
<vitals hp="8233255.33596838" hpRegen="319.2293199" mp="4203.40091563113" mpRegen="3" />
<attack physical="680.441457140486" magical="127.33579646414" random="30" critical="4.75" accuracy="4.75" attackSpeed="250" type="SWORD" range="40" distance="80" width="120" />
<defence physical="208.284023668639" magical="95.9748607784026" />
<speed>
@ -368,7 +368,7 @@
<sex>MALE</sex>
<acquire exp="0" sp="0" attributeExp="104000" />
<stats str="60" int="76" dex="73" wit="70" con="57" men="80">
<vitals hp="2851877.47035573" hpRegen="319.2293199" mp="4203.40091563113" mpRegen="3" />
<vitals hp="8851877.47035573" hpRegen="319.2293199" mp="4203.40091563113" mpRegen="3" />
<attack physical="680.441457140486" magical="127.33579646414" random="30" critical="4.75" accuracy="4.75" attackSpeed="250" type="SWORD" range="40" distance="80" width="120" />
<defence physical="208.284023668639" magical="95.9748607784026" />
<speed>

View File

@ -332,7 +332,7 @@
<value level="4">4</value>
<value level="5">5</value>
</abnormalLevel>
<abnormalTime>-1</abnormalTime>
<abnormalTime>30</abnormalTime>
<activateRate>100</activateRate>
<abnormalType>FREEZING</abnormalType>
<isDebuff>true</isDebuff>

View File

@ -1,5 +1,81 @@
<?xml version="1.0" encoding="UTF-8"?>
<list enabled="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/zones.xsd">
<zone name="dwelling_portal_earth" type="TeleportZone" shape="Cylinder" minZ="-11518" maxZ="-11218" rad="100">
<stat name="oustX" val="222086" />
<stat name="oustY" val="190539" />
<stat name="oustZ" val="-15488" />
<stat name="default_enabled" val="false" />
<stat name="instanceId" val="214" />
<stat name="targetClass" val="Player" />
<stat name="affectedLvlMin" val="75" />
<node X="-113465" Y="-77520" />
</zone>
<zone name="dwelling_portal_wind" type="TeleportZone" shape="Cylinder" minZ="-11518" maxZ="-11218" rad="100">
<stat name="oustX" val="222151" />
<stat name="oustY" val="168077" />
<stat name="oustZ" val="-15488" />
<stat name="default_enabled" val="false" />
<stat name="instanceId" val="214" />
<stat name="targetClass" val="Player" />
<stat name="affectedLvlMin" val="75" />
<node X="-115115" Y="-79080" />
</zone>
<zone name="dwelling_portal_water" type="TeleportZone" shape="Cylinder" minZ="-11518" maxZ="-11218" rad="100">
<stat name="oustX" val="212886" />
<stat name="oustY" val="178829" />
<stat name="oustZ" val="-15488" />
<stat name="instanceId" val="214" />
<stat name="default_enabled" val="true" /> <!--Bug!! causes a problem with the others portal (no idea) -->
<stat name="targetClass" val="Player" />
<stat name="affectedLvlMin" val="75" />
<node X="-113529" Y="-79077" />
</zone>
<zone name="dwelling_portal_fire" type="TeleportZone" shape="Cylinder" minZ="-11518" maxZ="-11218" rad="100">
<stat name="oustX" val="202376" />
<stat name="oustY" val="168141" />
<stat name="oustZ" val="-15488" />
<stat name="default_enabled" val="false" />
<stat name="instanceId" val="214" />
<stat name="targetClass" val="Player" />
<stat name="affectedLvlMin" val="75" />
<node X="-115202" Y="-77519" />
</zone>
<zone name="return_portal_petram" type="TeleportZone" shape="Cylinder" minZ="-15688" maxZ="-15218" rad="100">
<stat name="oustX" val="-114323" />
<stat name="oustY" val="-78292" />
<stat name="oustZ" val="-11433" />
<stat name="instanceId" val="214" />
<stat name="targetClass" val="Player" />
<stat name="affectedLvlMin" val="75" />
<node X="222061" Y="192921" />
</zone>
<zone name="return_portal_nebula" type="TeleportZone" shape="Cylinder" minZ="-15688" maxZ="-15218" rad="100">
<stat name="oustX" val="-114323" />
<stat name="oustY" val="-78292" />
<stat name="oustZ" val="-11433" />
<stat name="instanceId" val="214" />
<stat name="targetClass" val="Player" />
<stat name="affectedLvlMin" val="75" />
<node X="222127" Y="170488" />
</zone>
<zone name="return_portal_procella" type="TeleportZone" shape="Cylinder" minZ="-15688" maxZ="-15218" rad="100">
<stat name="oustX" val="-114323" />
<stat name="oustY" val="-78292" />
<stat name="oustZ" val="-11433" />
<stat name="instanceId" val="214" />
<stat name="targetClass" val="Player" />
<stat name="affectedLvlMin" val="75" />
<node X="212855" Y="181242" />
</zone>
<zone name="return_portal_ignis" type="TeleportZone" shape="Cylinder" minZ="-15688" maxZ="-15218" rad="100">
<stat name="oustX" val="-114323" />
<stat name="oustY" val="-78292" />
<stat name="oustZ" val="-11433" />
<stat name="instanceId" val="214" />
<stat name="targetClass" val="Player" />
<stat name="affectedLvlMin" val="75" />
<node X="202349" Y="170533" />
</zone>
<zone name="hellbound_tp_1" type="TeleportZone" shape="Cylinder" minZ="-3600" maxZ="-3300" rad="200">
<stat name="oustX" val="6736" />
<stat name="oustY" val="251024" />