Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### Eclipse Workspace Patch 1.0
- #P aCis
- diff --git aCis_data/data/html/default/29061.htm aCis_data/data/html/default/29061.htm
- new file mode 100644
- index 0000000..ab9388d
- --- /dev/null
- +++ aCis_data/data/html/default/29061.htm
- @@ -0,0 +1,3 @@
- +<html><body>Teleportation Cubic:<br>
- +<a action="bypass -h npc_%objectId%_Quest GrandBossTeleporter">Exit the Last Imperial Tomb</a><br>
- +</body></html>
- diff --git aCis_data/data/html/default/32011.htm aCis_data/data/html/default/32011.htm
- index 2341448..1c7c641 100644
- --- aCis_data/data/html/default/32011.htm
- +++ aCis_data/data/html/default/32011.htm
- @@ -1,7 +1,7 @@
- <html><body>
- I feel an invisible barrier... Some sort of Magic Force Field has been put in place...<br>
- ...? The guide of the Imperial mausoleum seems to have something to say.<br><br>
- -<a action="bypass -h npc_%objectId%_Quest FinalEmperialTomb">Enter the Magic Force Field</a><br>
- +<a action="bypass -h npc_%objectId%_Quest GrandBossTeleporter">Enter the Magic Force Field</a><br>
- <a action="bypass -h npc_%objectId%_Chat 1">Listen to Imperial Tomb Guide</a><br>
- <a action="bypass -h npc_%objectId%_Quest">Quest</a>
- </body></html>
- \ No newline at end of file
- diff --git aCis_data/data/html/script/teleport/GrandBossTeleporter/32011-01.htm aCis_data/data/html/script/teleport/GrandBossTeleporter/32011-01.htm
- new file mode 100644
- index 0000000..ef3f436
- --- /dev/null
- +++ aCis_data/data/html/script/teleport/GrandBossTeleporter/32011-01.htm
- @@ -0,0 +1,2 @@
- +<html><body>There is nothing beyond the Magic Force Field. Come back later.<br>(You may not enter because Frintezza is not inside the Imperial Tomb.)
- +</body></html>
- \ No newline at end of file
- diff --git aCis_data/data/html/script/teleport/GrandBossTeleporter/32011-02.htm aCis_data/data/html/script/teleport/GrandBossTeleporter/32011-02.htm
- new file mode 100644
- index 0000000..7904d4e
- --- /dev/null
- +++ aCis_data/data/html/script/teleport/GrandBossTeleporter/32011-02.htm
- @@ -0,0 +1,3 @@
- +<html><body>There is big battle beyond the Magic Force Field. Come back later.<br>
- +(You may not enter becouse someone is already in a battle with Frintezza.)
- +</body></html>
- \ No newline at end of file
- diff --git aCis_data/data/html/script/teleport/GrandBossTeleporter/32011-03.htm aCis_data/data/html/script/teleport/GrandBossTeleporter/32011-03.htm
- new file mode 100644
- index 0000000..2e5ec6f
- --- /dev/null
- +++ aCis_data/data/html/script/teleport/GrandBossTeleporter/32011-03.htm
- @@ -0,0 +1 @@
- +<html><body>No reaction. Contact must be initiated by the Command Channel Leader.</body></html>
- \ No newline at end of file
- diff --git aCis_data/data/html/script/teleport/GrandBossTeleporter/32011-04.htm aCis_data/data/html/script/teleport/GrandBossTeleporter/32011-04.htm
- new file mode 100644
- index 0000000..9fd5d88
- --- /dev/null
- +++ aCis_data/data/html/script/teleport/GrandBossTeleporter/32011-04.htm
- @@ -0,0 +1 @@
- +<html><body>Your command channel needs to have at least 2 parties and a maximum of 5.</body></html>
- \ No newline at end of file
- diff --git aCis_data/data/html/script/teleport/GrandBossTeleporter/32011-05.htm aCis_data/data/html/script/teleport/GrandBossTeleporter/32011-05.htm
- new file mode 100644
- index 0000000..1c29d9e
- --- /dev/null
- +++ aCis_data/data/html/script/teleport/GrandBossTeleporter/32011-05.htm
- @@ -0,0 +1 @@
- +<html><body>You dont have required item.</body></html>
- \ No newline at end of file
- diff --git aCis_data/data/xml/items/8100-8199.xml aCis_data/data/xml/items/8100-8199.xml
- index 79540e3..eafa3ac 100644
- --- aCis_data/data/xml/items/8100-8199.xml
- +++ aCis_data/data/xml/items/8100-8199.xml
- @@ -1566,6 +1566,7 @@
- <set name="material" val="GOLD" />
- <set name="weight" val="3" />
- <set name="is_stackable" val="true" />
- + <set name="handler" val="ItemSkills" />
- <set name="item_skill" val="2234-1" />
- </item>
- <item id="8193" type="EtcItem" name="Fisherman's Potion - Green">
- diff --git aCis_data/data/xml/items/8500-8599.xml aCis_data/data/xml/items/8500-8599.xml
- index 95d3e27..ae2dcf5 100644
- --- aCis_data/data/xml/items/8500-8599.xml
- +++ aCis_data/data/xml/items/8500-8599.xml
- @@ -549,6 +549,7 @@
- <set name="material" val="GOLD" />
- <set name="weight" val="3" />
- <set name="is_stackable" val="true" />
- + <set name="handler" val="ItemSkills" />
- <set name="item_skill" val="2276-1" />
- </item>
- <item id="8557" type="Armor" name="Blue Party Hat">
- diff --git aCis_data/data/xml/npcs/29000-29999.xml aCis_data/data/xml/npcs/29000-29999.xml
- index 40f963f..a8f62b3 100644
- --- aCis_data/data/xml/npcs/29000-29999.xml
- +++ aCis_data/data/xml/npcs/29000-29999.xml
- @@ -2317,7 +2317,7 @@
- </skills>
- </npc>
- <npc id="29045" name="Frintezza" title="">
- - <set name="level" val="90"/>
- + <set name="level" val="85"/>
- <set name="radius" val="45"/>
- <set name="height" val="42.7"/>
- <set name="rHand" val="0"/>
- @@ -2338,7 +2338,7 @@
- <set name="str" val="60"/>
- <set name="int" val="76"/>
- <set name="dex" val="73"/>
- - <set name="wit" val="70"/>
- + <set name="wit" val="30"/>
- <set name="con" val="57"/>
- <set name="men" val="80"/>
- <set name="corpseTime" val="7"/>
- @@ -2352,7 +2352,7 @@
- </skills>
- </npc>
- <npc id="29046" name="Scarlet van Halisha" title="">
- - <set name="level" val="85"/>
- + <set name="level" val="80"/>
- <set name="radius" val="45"/>
- <set name="height" val="90.7"/>
- <set name="rHand" val="8204"/>
- @@ -2387,7 +2387,7 @@
- </skills>
- </npc>
- <npc id="29047" name="Scarlet van Halisha" title="">
- - <set name="level" val="90"/>
- + <set name="level" val="85"/>
- <set name="radius" val="92"/>
- <set name="height" val="112.8"/>
- <set name="rHand" val="8222"/>
- diff --git aCis_data/data/xml/scripts.xml aCis_data/data/xml/scripts.xml
- index 3e38b21..e44c739 100644
- --- aCis_data/data/xml/scripts.xml
- +++ aCis_data/data/xml/scripts.xml
- @@ -366,7 +366,7 @@
- <script path="script.ai.boss.Benom"/>
- <script path="script.ai.boss.Core"/>
- <script path="script.ai.boss.DrChaos"/>
- -<!-- <script path="script.ai.boss.Frintezza"/> -->
- + <script path="script.ai.boss.Frintezza"/>
- <script path="script.ai.boss.Gordon"/>
- <!-- <script path="script.ai.boss.IceFairySirra"/> -->
- <script path="script.ai.boss.Orfen"/>
- diff --git aCis_data/data/xml/skills/5000-5099.xml aCis_data/data/xml/skills/5000-5099.xml
- index b958bd0..d268c96 100644
- --- aCis_data/data/xml/skills/5000-5099.xml
- +++ aCis_data/data/xml/skills/5000-5099.xml
- @@ -104,22 +104,25 @@
- <set name="target" val="SELF" />
- </skill>
- <skill id="5008" levels="5" name="Frintezza's Songs">
- - <table name="#aggroPoints"> 100 100 100 0 0 </table>
- + <table name="#aggroPoints"> 100 100 110 0 0 </table>
- <table name="#isDebuff"> false false false true true </table>
- <table name="#isMagic"> true false false true true </table>
- <table name="#power"> 3 0 0 10 10 </table>
- - <table name="#skillType"> HEAL_PERCENT DUMMY BUFF DEBUFF STUN </table>
- + <table name="#skillType"> HEAL_PERCENT BUFF BUFF DEBUFF STUN </table>
- <table name="#stackOrder"> 0 0 1 1 1 </table>
- <table name="#stackType"> none none ultimate_buff heal_effect_down stun </table>
- <table name="#attackAndSpeed"> 1 1 1.2 1 1 </table>
- - <table name="#time"> 0 0 5 5 5 </table>
- + <table name="#time"> 0 30 30 15 8 </table>
- <table name="#gainHp"> 1 1 1 0.5 1 </table>
- <table name="#lvlDepend"> 0 0 0 1 1 </table>
- - <table name="#effectname1"> Buff Buff Buff Buff Stun </table>
- - <table name="#effectname2"> Buff Buff Buff Buff Cancel </table>
- + <table name="#effectname1"> Buff Buff Buff Debuff DanceStun </table><!-- EffectDanceStun.java -->
- + <table name="#effectname2"> Buff Buff Buff Buff Stun </table>
- <table name="#effectPower"> 0 0 0 0 20 </table>
- - <table name="#effectType"> BUFF BUFF BUFF BUFF CANCEL </table>
- + <table name="#effectType"> BUFF BUFF BUFF DEBUFF STUN </table>
- + <table name="#effectRange"> 6000 6000 6000 -1 -1 </table>
- <table name="#maxNegated"> 0 0 0 0 10 </table>
- + <table name="#target"> SELF SELF SELF AURA AURA </table>
- + <table name="#skillRadius"> -1 -1 -1 8000 8000 </table>
- <set name="aggroPoints" val="#aggroPoints" />
- <set name="isDebuff" val="#isDebuff" />
- <set name="isMagic" val="#isMagic" />
- @@ -127,9 +130,11 @@
- <set name="magicLvl" val="85" />
- <set name="maxNegated" val="#maxNegated" />
- <set name="operateType" val="ACTIVE" />
- + <set name="effectRange" val="#effectRange" />
- <set name="power" val="#power" />
- <set name="skillType" val="#skillType" />
- - <set name="target" val="SELF" />
- + <set name="target" val="#target" />
- + <set name="skillRadius" val="#skillRadius" />
- <for>
- <effect name="#effectname1" time="#time" val="0" stackOrder="1" stackType="#stackType">
- <mul stat="pAtk" val="#attackAndSpeed" />
- @@ -139,7 +144,7 @@
- <add stat="runSpd" val="#attackAndSpeed" />
- <mul stat="gainHp" val="#gainHp" />
- </effect>
- - <effect name="#effectname2" noicon="1" val="0" effectPower="#effectPower" effectType="#effectType" />
- + <effect name="#effectname2" val="0" effectPower="#effectPower" effectType="#effectType" />
- </for>
- </skill>
- <skill id="5009" levels="1" name="Frintezza's Ghostly Fighter">
- @@ -170,6 +175,8 @@
- <skill id="5011" levels="1" name="Frintezza's Bomber Ghost">
- <set name="element" val="DARK" />
- <set name="hitTime" val="1000" />
- + <set name="coolTime" val="2000" />
- + <set name="isMagic" val="false" />
- <set name="isSuicideAttack" val="true" />
- <set name="magicLvl" val="85" />
- <set name="operateType" val="ACTIVE" />
- @@ -223,12 +230,14 @@
- <set name="target" val="FRONT_AREA" />
- </skill>
- <skill id="5015" levels="6" name="Frintezza's Daemon Charge">
- + <table name="#baseCritRate"> 10 12 12 10 12 12 </table>
- <table name="#coolTime"> 0 0 0 1500 1500 1500 </table>
- <table name="#radius"> 400 500 700 400 500 700 </table>
- <table name="#power"> 48761 52970 68074 48761 52970 68074 </table>
- - <set name="castRange" val="150" />
- + <set name="baseCritRate" val="#baseCritRate" />
- + <set name="castRange" val="250" />
- <set name="coolTime" val="#coolTime" />
- - <set name="effectRange" val="650" />
- + <set name="effectRange" val="925" />
- <set name="element" val="DARK" />
- <set name="flyRadius" val="#radius" />
- <set name="flyType" val="CHARGE" />
- @@ -239,6 +248,10 @@
- <set name="skillRadius" val="#radius" />
- <set name="skillType" val="PDAM" />
- <set name="target" val="FRONT_AREA" />
- + <set name="flyCourse" val="180" />
- + <for>
- + <effect self="1" name="Warp" val="0" noicon="1" />
- + </for>
- </skill>
- <skill id="5016" levels="1" name="Yoke of Scarlet">
- <set name="castRange" val="500" />
- @@ -254,7 +267,7 @@
- <set name="skillType" val="PARALYZE" />
- <set name="target" val="AREA" />
- <for>
- - <effect name="Paralyze" time="20" val="0" abnormal="floatroot" stackOrder="1" stackType="paralyze" />
- + <effect name="FloatStun" time="15" val="0" stackOrder="1" stackType="stun" abnormal="floatroot" effectPower="80" effectType="STUN" />
- </for>
- </skill>
- <skill id="5017" levels="1" name="Frintezza's Daemon Morph">
- @@ -278,6 +291,7 @@
- <set name="coolTime" val="1000" />
- <set name="element" val="DARK" />
- <set name="hitTime" val="7000" />
- + <set name="isMagic" val="false" />
- <set name="magicLvl" val="85" />
- <set name="operateType" val="ACTIVE" />
- <set name="power" val="#power" />
- diff --git aCis_data/data/xml/zones/BossZone.xml aCis_data/data/xml/zones/BossZone.xml
- index 8dddd01..e620733 100644
- --- aCis_data/data/xml/zones/BossZone.xml
- +++ aCis_data/data/xml/zones/BossZone.xml
- @@ -109,12 +109,10 @@
- <node x="26846" y="-8117"/>
- <node x="28231" y="-8163"/>
- </zone>
- - <zone id="110012" shape="NPoly" minZ="-5200" maxZ="-4680"><!-- Frintezza -->
- - <stat name="InvadeTime" val="1800000"/>
- - <node x="172031" y="-90127"/>
- - <node x="176428" y="-90089"/>
- - <node x="176428" y="-74051"/>
- - <node x="172057" y="-74108"/>
- + <zone id="110012" shape="Cuboid" minZ="-5150" maxZ="-4000"><!-- Frintezza -->
- + <stat name="InvadeTime" val="1800000" />
- + <node x="172176" y="-74106" />
- + <node x="176284" y="-90033" />
- </zone>
- <zone id="110013" shape="NPoly" minZ="-5136" maxZ="864"><!-- Ice Fairy 1 -->
- <stat name="InvadeTime" val="1800000"/>
- diff --git aCis_data/data/xml/zones/ScriptZone.xml aCis_data/data/xml/zones/ScriptZone.xml
- index e0dbb43..8962e1b 100644
- --- aCis_data/data/xml/zones/ScriptZone.xml
- +++ aCis_data/data/xml/zones/ScriptZone.xml
- @@ -22,4 +22,8 @@
- <node x="88759" y="-108195"/>
- <node x="88677" y="-108275"/>
- </zone>
- + <zone id="100004" shape="Cuboid" minZ="-5140" maxZ="-2319"> <!-- Frintezza.java# Frintezza's Concert Hall -->
- + <node x="172176" y="-86081" />
- + <node x="176284" y="-90033" />
- + </zone>
- </list>
- \ No newline at end of file
- diff --git aCis_game/java/net/sf/l2j/gameserver/handler/chathandlers/ChatAll.java aCis_game/java/net/sf/l2j/gameserver/handler/chathandlers/ChatAll.java
- index a707ce5..28c1129 100644
- --- aCis_game/java/net/sf/l2j/gameserver/handler/chathandlers/ChatAll.java
- +++ aCis_game/java/net/sf/l2j/gameserver/handler/chathandlers/ChatAll.java
- @@ -1,5 +1,6 @@
- package net.sf.l2j.gameserver.handler.chathandlers;
- +import net.sf.l2j.gameserver.data.xml.ScriptData;
- import net.sf.l2j.gameserver.enums.FloodProtector;
- import net.sf.l2j.gameserver.enums.SayType;
- import net.sf.l2j.gameserver.handler.IChatHandler;
- @@ -18,7 +19,14 @@
- {
- if (!player.getClient().performAction(FloodProtector.GLOBAL_CHAT))
- return;
- -
- +
- + if (player.isGM())
- + if (text.equalsIgnoreCase(".frintezza"))
- + {
- + ScriptData.getInstance().getQuest("Frintezza").startQuestTimer("start", null, null, 1000);
- + return;
- + }
- +
- final CreatureSay cs = new CreatureSay(player, type, text);
- for (Player knownPlayer : player.getKnownTypeInRadius(Player.class, 1250))
- knownPlayer.sendPacket(cs);
- diff --git aCis_game/java/net/sf/l2j/gameserver/model/actor/Npc.java aCis_game/java/net/sf/l2j/gameserver/model/actor/Npc.java
- index 23723ee..728cf87 100644
- --- aCis_game/java/net/sf/l2j/gameserver/model/actor/Npc.java
- +++ aCis_game/java/net/sf/l2j/gameserver/model/actor/Npc.java
- @@ -1486,4 +1486,15 @@
- {
- startRandomAnimationTimer();
- }
- + private boolean isFlying = false;
- + @Override
- + public boolean isFlying()
- + {
- + return isFlying;
- + }
- +
- + public void setIsFlying(boolean a)
- + {
- + isFlying = a;
- + }
- }
- \ No newline at end of file
- diff --git aCis_game/java/net/sf/l2j/gameserver/scripting/script/ai/boss/Frintezza.java aCis_game/java/net/sf/l2j/gameserver/scripting/script/ai/boss/Frintezza.java
- new file mode 100644
- index 0000000..472c122
- --- /dev/null
- +++ aCis_game/java/net/sf/l2j/gameserver/scripting/script/ai/boss/Frintezza.java
- @@ -0,0 +1,1167 @@
- +package net.sf.l2j.gameserver.scripting.script.ai.boss;
- +
- +import java.util.List;
- +import java.util.Map;
- +import java.util.concurrent.ConcurrentHashMap;
- +import java.util.concurrent.CopyOnWriteArrayList;
- +
- +import net.sf.l2j.commons.data.StatSet;
- +import net.sf.l2j.commons.math.MathUtil;
- +import net.sf.l2j.commons.random.Rnd;
- +
- +import net.sf.l2j.Config;
- +import net.sf.l2j.gameserver.data.manager.GrandBossManager;
- +import net.sf.l2j.gameserver.data.manager.ZoneManager;
- +import net.sf.l2j.gameserver.data.xml.DoorData;
- +import net.sf.l2j.gameserver.enums.SayType;
- +import net.sf.l2j.gameserver.enums.skills.FlyType;
- +import net.sf.l2j.gameserver.model.actor.Creature;
- +import net.sf.l2j.gameserver.model.actor.Npc;
- +import net.sf.l2j.gameserver.model.actor.Player;
- +import net.sf.l2j.gameserver.model.actor.instance.GrandBoss;
- +import net.sf.l2j.gameserver.model.actor.instance.Monster;
- +import net.sf.l2j.gameserver.model.holder.IntIntHolder;
- +import net.sf.l2j.gameserver.model.location.Location;
- +import net.sf.l2j.gameserver.model.zone.type.BossZone;
- +import net.sf.l2j.gameserver.model.zone.type.ScriptZone;
- +import net.sf.l2j.gameserver.network.SystemMessageId;
- +import net.sf.l2j.gameserver.network.serverpackets.AbstractNpcInfo.NpcInfo;
- +import net.sf.l2j.gameserver.network.serverpackets.CreatureSay;
- +import net.sf.l2j.gameserver.network.serverpackets.Earthquake;
- +import net.sf.l2j.gameserver.network.serverpackets.ExShowScreenMessage;
- +import net.sf.l2j.gameserver.network.serverpackets.ExShowScreenMessage.SMPOS;
- +import net.sf.l2j.gameserver.network.serverpackets.FlyToLocation;
- +import net.sf.l2j.gameserver.network.serverpackets.L2GameServerPacket;
- +import net.sf.l2j.gameserver.network.serverpackets.MagicSkillCanceled;
- +import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUse;
- +import net.sf.l2j.gameserver.network.serverpackets.NpcSay;
- +import net.sf.l2j.gameserver.network.serverpackets.SocialAction;
- +import net.sf.l2j.gameserver.network.serverpackets.SpecialCamera;
- +import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;
- +import net.sf.l2j.gameserver.network.serverpackets.ValidateLocation;
- +import net.sf.l2j.gameserver.scripting.script.ai.AttackableAIScript;
- +import net.sf.l2j.gameserver.skills.AbstractEffect;
- +import net.sf.l2j.gameserver.skills.L2Skill;
- +
- +public class Frintezza extends AttackableAIScript
- +{
- + private static final ScriptZone FRINTEZZA_LAIR = ZoneManager.getInstance().getZoneById(100004, ScriptZone.class);
- + private static final BossZone lastImperialTomp = ZoneManager.getInstance().getZoneById(110012, BossZone.class);
- +
- + public static final int FRINTEZZA = 29045;
- + private static final int SCARLET1 = 29046;
- + private static final int SCARLET2 = 29047;
- +
- + private static final int ALARM_DEVICE = 18328;
- + private static final int CHOIR_CAPTAIN = 18334;
- + private static final int CHOIR_PRAYER = 18339;
- +
- + // Frintezza Status Tracking :
- + public static final byte DORMANT = 0; // No one has entered yet. Entry is unlocked
- + public static final byte WAITING = 1; // Someone has entered, triggering a 35 minute window for additional people to enter before he unleashes his attack. Entry is unlocked
- + public static final byte FIGHTING = 2; // Frintezza is engaged in battle, annihilating his foes. Entry is locked
- + public static final byte DEAD = 3; // Frintezza has been killed. Entry is locked
- +
- + private Player _actualVictim; // Actual target of Scarlet.
- + private static long _lastAttackTime = 0;
- + private static int _killMobs = 0;
- +
- + private static GrandBoss scarlet, frintezza;
- +
- + private final List<Npc> _dummys = new CopyOnWriteArrayList<>();
- + private final List<Monster> demons = new CopyOnWriteArrayList<>();
- + private final Map<Monster, Integer> portraits = new ConcurrentHashMap<>();
- + private final List<Npc> _mobs = new CopyOnWriteArrayList<>();
- +
- + //features unconfirmed retail
- + // Cinematic initial and Alarm Device open doors
- + private static boolean not_confirmed = true;
- +
- + // Skills
- + private static final int DEWDROP_OF_DESTRUCTION_SKILL_ID = 2276;
- + private static final int BREAKING_ARROW_SKILL_ID = 2234;
- + private static final IntIntHolder Bomber_Ghost = new IntIntHolder(5011, 1);
- +
- + private L2Skill songEffect = null;
- + private static int[][] scarletSkills;
- +
- + // Items
- + //private static final int FRINTEZZA_SCROLL = 8073; // Frintezza's Magic Force Field Removal Scroll.
- + //http://legacy.lineage2.com/news/chronicle5_07.html
- + private static final int DEWDROP_OF_DESTRUCTION = 8556; // Dewdrop of Destruction
- + // Clicking the Dewdrop of Destruction will make the portrait disappear. It will disappear when one enters the Last Imperial Sepulcher.
- + private static final int BREAKING_ARROW = 8192; // Breaking Arrow
- + // Double-click the arrow to temporarily stop Frintezza's musical performance. This gets deleted when one enters the Tomb of the Last Emperor.
- +
- + protected static final int[][] PORTRAIT_GHOST =
- + {
- + {29048, 175833, -87165, -5126, 35048, 175833, -87165, -5100, 35048},
- + {29048, 172634, -87165, -5126, 57730, 172634, -87165, -5100, 57730},
- + {29049, 175876, -88713, -5126, 28205, 175876, -88713, -5100, 28205},
- + {29049, 172608, -88702, -5126, 64817, 172608, -88702, -5100, 64817}
- + };
- +
- + protected static final int[][] DUMMY_SPAWNS =
- + {
- + {29052, 174240, -89805, -5022, 16048},
- + {29052, 174232, -88020, -5110, 16384},
- + {29052, 172450, -87890, -5100, 16048},
- + {29052, 176012, -87890, -5100, 16048},
- + {29053, 174232, -88020, -5110, 16384}
- + };
- +
- + private static final int[][] ROOM1_SPAWN =
- + {
- + { 18328,172894,-76019,-5107,243 },
- + { 18328,174095,-77279,-5107,16216 },
- + { 18328,174111,-74833,-5107,49043 },
- + { 18328,175344,-76042,-5107,32847 },
- + { 18330,173489,-76227,-5134,63565 },
- + { 18330,173498,-75724,-5107,58498 },
- + { 18330,174365,-76745,-5107,22424 },
- + { 18330,174570,-75584,-5107,31968 },
- + { 18330,174613,-76179,-5107,31471 },
- + { 18332,173620,-75981,-5107,4588 },
- + { 18332,173630,-76340,-5107,62454 },
- + { 18332,173755,-75613,-5107,57892 },
- + { 18332,173823,-76688,-5107,2411 },
- + { 18332,174000,-75411,-5107,54718 },
- + { 18332,174487,-75555,-5107,33861 },
- + { 18332,174517,-76471,-5107,21893 },
- + { 18332,174576,-76122,-5107,31176 },
- + { 18332,174600,-75841,-5134,35927 }
- + };
- + // Hall Keeper Captain
- + private static final int[][] ROOM1_CAPTAIN =
- + {
- + { 18329,173481,-76043,-5107,61312 },
- + { 18329,173539,-75678,-5107,59524 },
- + { 18329,173584,-76386,-5107,3041 },
- + { 18329,173773,-75420,-5107,51115 },
- + { 18329,173777,-76650,-5107,12588 },
- + { 18329,174585,-76510,-5107,21704 },
- + { 18329,174623,-75571,-5107,40141 },
- + { 18329,174744,-76240,-5107,29202 },
- + { 18329,174769,-75895,-5107,29572 }
- + };
- + // Hall Keeper Suicidal Soldier
- + private static final int[][] ROOM1_SUICIDAL_SOLDIER =
- + {
- + { 18333,173861,-76011,-5107,383 },
- + { 18333,173872,-76461,-5107,8041 },
- + { 18333,173898,-75668,-5107,51856 },
- + { 18333,174422,-75689,-5107,42878 },
- + { 18333,174460,-76355,-5107,27311 },
- + { 18333,174483,-76041,-5107,30947 }
- + };
- + // Hall Keeper Guard
- + private static final int[][] ROOM1_GUARD =
- + {
- + { 18331,173515,-76184,-5107,6971 },
- + { 18331,173516,-75790,-5134,3142 },
- + { 18331,173696,-76675,-5107,6757 },
- + { 18331,173766,-75502,-5134,60827 },
- + { 18331,174473,-75321,-5107,37147 },
- + { 18331,174493,-76505,-5107,34503 },
- + { 18331,174568,-75654,-5134,41661 },
- + { 18331,174584,-76263,-5107,31729 }
- + };
- + // Dark Choir Player
- + private static final int[][] ROOM2_SPAWN =
- + {
- + { 18339,173892,-81592,-5123,50849 },
- + { 18339,173958,-81820,-5123,7459 },
- + { 18339,174128,-81805,-5150,21495 },
- + { 18339,174245,-81566,-5123,41760 }
- + };
- + private static final int[][] ROOM2_SPAWN2 =
- + {
- + { 18334,173264,-81529,-5072,1646 },
- + { 18334,173265,-81656,-5072,441 },
- + { 18334,173267,-81889,-5072,0 },
- + { 18334,173271,-82015,-5072,65382 },
- + { 18334,174867,-81655,-5073,32537 },
- + { 18334,174868,-81890,-5073,32768 },
- + { 18334,174869,-81485,-5073,32315 },
- + { 18334,174871,-82017,-5073,33007 },
- + { 18335,173074,-80817,-5107,8353 },
- + { 18335,173128,-82702,-5107,5345 },
- + { 18335,173181,-82544,-5107,65135 },
- + { 18335,173191,-80981,-5107,6947 },
- + { 18335,174859,-80889,-5134,24103 },
- + { 18335,174924,-82666,-5107,38710 },
- + { 18335,174947,-80733,-5107,22449 },
- + { 18335,175096,-82724,-5107,42205 },
- + { 18336,173435,-80512,-5107,65215 },
- + { 18336,173440,-82948,-5107,417 },
- + { 18336,173443,-83120,-5107,1094 },
- + { 18336,173463,-83064,-5107,286 },
- + { 18336,173465,-80453,-5107,174 },
- + { 18336,173465,-83006,-5107,2604 },
- + { 18336,173468,-82889,-5107,316 },
- + { 18336,173469,-80570,-5107,65353 },
- + { 18336,173469,-80628,-5107,166 },
- + { 18336,173492,-83121,-5107,394 },
- + { 18336,173493,-80683,-5107,0 },
- + { 18336,173497,-80510,-5134,417 },
- + { 18336,173499,-82947,-5107,0 },
- + { 18336,173521,-83063,-5107,316 },
- + { 18336,173523,-82889,-5107,128 },
- + { 18336,173524,-80627,-5134,65027 },
- + { 18336,173524,-83007,-5107,0 },
- + { 18336,173526,-80452,-5107,64735 },
- + { 18336,173527,-80569,-5134,65062 },
- + { 18336,174602,-83122,-5107,33104 },
- + { 18336,174604,-82949,-5107,33184 },
- + { 18336,174609,-80514,-5107,33234 },
- + { 18336,174609,-80684,-5107,32851 },
- + { 18336,174629,-80627,-5107,33346 },
- + { 18336,174632,-80570,-5107,32896 },
- + { 18336,174632,-83066,-5107,32768 },
- + { 18336,174635,-82893,-5107,33594 },
- + { 18336,174636,-80456,-5107,32065 },
- + { 18336,174639,-83008,-5107,33057 },
- + { 18336,174660,-80512,-5107,33057 },
- + { 18336,174661,-83121,-5107,32768 },
- + { 18336,174663,-82948,-5107,32768 },
- + { 18336,174664,-80685,-5107,32676 },
- + { 18336,174687,-83008,-5107,32520 },
- + { 18336,174691,-83066,-5107,32961 },
- + { 18336,174692,-80455,-5107,33202 },
- + { 18336,174692,-80571,-5107,32768 },
- + { 18336,174693,-80630,-5107,32994 },
- + { 18336,174693,-82889,-5107,32622 },
- + { 18337,172837,-82382,-5107,58363 },
- + { 18337,172867,-81123,-5107,64055 },
- + { 18337,172883,-82495,-5107,64764 },
- + { 18337,172916,-81033,-5107,7099 },
- + { 18337,172940,-82325,-5107,58998 },
- + { 18337,172946,-82435,-5107,58038 },
- + { 18337,172971,-81198,-5107,14768 },
- + { 18337,172992,-81091,-5107,9438 },
- + { 18337,173032,-82365,-5107,59041 },
- + { 18337,173064,-81125,-5107,5827 },
- + { 18337,175014,-81173,-5107,26398 },
- + { 18337,175061,-82374,-5107,43290 },
- + { 18337,175096,-81080,-5107,24719 },
- + { 18337,175169,-82453,-5107,37672 },
- + { 18337,175172,-80972,-5107,32315 },
- + { 18337,175174,-82328,-5107,41760 },
- + { 18337,175197,-81157,-5107,27617 },
- + { 18337,175245,-82547,-5107,40275 },
- + { 18337,175249,-81075,-5107,28435 },
- + { 18337,175292,-82432,-5107,42225 },
- + { 18338,173014,-82628,-5107,11874 },
- + { 18338,173033,-80920,-5107,10425 },
- + { 18338,173095,-82520,-5107,49152 },
- + { 18338,173115,-80986,-5107,9611 },
- + { 18338,173144,-80894,-5107,5345 },
- + { 18338,173147,-82602,-5107,51316 },
- + { 18338,174912,-80825,-5107,24270 },
- + { 18338,174935,-80899,-5107,18061 },
- + { 18338,175016,-82697,-5107,39533 },
- + { 18338,175041,-80834,-5107,25420 },
- + { 18338,175071,-82549,-5107,39163 },
- + { 18338,175154,-82619,-5107,36345 }
- + };
- +
- + public Frintezza()
- + {
- + super("ai/boss");
- +
- + StatSet info = GrandBossManager.getInstance().getStatSet(FRINTEZZA);
- + if (GrandBossManager.getInstance().getBossStatus(FRINTEZZA) == DEAD)
- + {
- + long temp = (info.getLong("respawn_time") - System.currentTimeMillis());
- + if (temp > 0)
- + startQuestTimer("frintezza_unlock", null, null, temp);
- + else
- + GrandBossManager.getInstance().setBossStatus(FRINTEZZA, DORMANT);
- + }
- + else if (GrandBossManager.getInstance().getBossStatus(FRINTEZZA) != DORMANT)
- + GrandBossManager.getInstance().setBossStatus(FRINTEZZA, DORMANT);
- + }
- +
- + @Override
- + protected void registerNpcs()
- + {
- + addAttackId(SCARLET1, SCARLET2, FRINTEZZA, 29048, 29049);
- + addSpawnId(FRINTEZZA, SCARLET1, SCARLET2, ALARM_DEVICE, CHOIR_CAPTAIN);
- + addKillId(SCARLET2, 29048, 29049, 29050, 29051, ALARM_DEVICE, 18329, 18330, 18331, 18332, 18333, CHOIR_CAPTAIN, 18335, 18336, 18337, 18338, CHOIR_PRAYER);
- + addSkillSeeId(29050, 29051);
- + addSpellFinishedId(FRINTEZZA, 29050, 29051);
- + addExitZoneId(100004);
- + }
- +
- + @Override
- + public String onSpawn(Npc npc)
- + {
- + switch(npc.getNpcId())
- + {
- + case ALARM_DEVICE:
- + case CHOIR_CAPTAIN:
- + if (not_confirmed)
- + lastImperialTomp.broadcastPacket(new NpcSay(npc.getObjectId(), SayType.SHOUT, npc.getNpcId() == ALARM_DEVICE ? "Intruders! Sound the alarm!" : "How dare you ruin the performance of the Dark Choir... Unforgivable!"));
- + npc.setIsImmobilized(true);
- + npc.disableCoreAi(true);
- + break;
- + case FRINTEZZA:
- + case SCARLET1:
- + case SCARLET2:
- + npc.disableCoreAi(true);
- + break;
- + }
- + return super.onSpawn(npc);
- + }
- +
- + @Override
- + public String onTimer(String event, Npc npc, Player player)
- + {
- + if (event.equalsIgnoreCase("start"))
- + {
- + broadcastPacket(new Earthquake(getKnownInside(), 45, 27, false));
- + clean(WAITING);
- + dropTimers();
- + startQuestTimer("beginning", null, null, 4000);
- + }
- + else if (event.equalsIgnoreCase("beginning")) //TODO: beginning
- + {
- + startQuestTimer("camera_00", null, null, 29000);
- + startQuestTimer("camera_01", null, null, 30000);
- + startQuestTimer("camera_02", null, null, 31000); //100
- + startQuestTimer("camera_03", null, null, 37500); //6500
- + startQuestTimer("camera_04", null, null, 38400); //900
- + startQuestTimer("camera_05", null, null, 42400); //4000 ex - cam5b
- + startQuestTimer("camera_06", null, null, 43750); //1350
- + startQuestTimer("camera_07", null, null, 51750); //7000
- + startQuestTimer("camera_08", null, null, 52150); //1000
- + startQuestTimer("camera_09", null, null, 54150); //2000
- + startQuestTimer("camera_10", null, null, 58650); //4500
- + startQuestTimer("camera_11", null, null, 59350); //700
- + startQuestTimer("camera_12", null, null, 60650); //1300 -15
- + startQuestTimer("camera_13", null, null, 62150); //1500 -16
- + startQuestTimer("camera_14", null, null, 69650); //7500 -17
- + startQuestTimer("camera_15", null, null, 79150); //9500 -16 //79350//200
- + startQuestTimer("camera_16", null, null, 81750); //2400 //81550 //81150
- + startQuestTimer("camera_17", null, null, 84150); //5000
- + startQuestTimer("camera_18", null, null, 84850); //6300 -85450 -throw_up
- + startQuestTimer("camera_19", null, null, 87650); //3500
- + startQuestTimer("camera_20", null, null, 89650); //2000
- + startQuestTimer("camera_21", null, null, 92650); //3000
- + startQuestTimer("camera_22", null, null, 94650); //2000
- + }
- + else if (event.equalsIgnoreCase("despawn"))
- + {
- + if (GrandBossManager.getInstance().getBossStatus(FRINTEZZA) == FIGHTING && (System.currentTimeMillis() - _lastAttackTime) >= 900000)
- + {
- + clean(DORMANT);
- + dropTimers();
- + }
- + }
- + else if (event.equalsIgnoreCase("camera_00")) //TODO: camera 00
- + {
- + for (int[] loc : DUMMY_SPAWNS)
- + {
- + Npc dummy = addSpawn(loc[0], loc[1], loc[2], loc[3], loc[4], false, 62650, false);
- + dummy.setIsImmobilized(true);
- + dummy.setIsParalyzed(true);
- + dummy.disableCoreAi(true);
- + _dummys.add(dummy);
- + }
- + _dummys.get(2).setIsFlying(true);
- + _dummys.get(3).setIsFlying(true);
- + _dummys.get(1).setCollisionHeight(600);
- + setPrepareRoom(true);
- + }
- + else if (event.equalsIgnoreCase("camera_01"))
- + {
- + GrandBossManager.getInstance().setBossStatus(FRINTEZZA, FIGHTING);
- + frintezza = (GrandBoss) addSpawn(FRINTEZZA, 174240, -89805, -5022, 16048, false, 0, false);
- + frintezza.setInvul(true);
- + frintezza.decayMe();
- + }
- + else if (event.equalsIgnoreCase("camera_02"))
- + {
- + for (int[] ghosts : PORTRAIT_GHOST)
- + {
- + Monster demon = (Monster) addSpawn(ghosts[0] + 2, ghosts[5], ghosts[6], ghosts[7], ghosts[8], false, 0, false);
- + demon.setIsImmobilized(true);
- + demon.disableAllSkills();
- + demons.add(demon);
- + }
- + frintezza.spawnMe();
- + _dummys.get(1).decayMe();
- + broadcastPacket(new NpcInfo(_dummys.get(1), null));
- + GrandBossManager.getInstance().addBoss(frintezza);
- + broadcastPacket(new SpecialCamera(_dummys.get(1).getObjectId(), 0, 75, -89, 0, 100, 0, 0, 1, 0), new SpecialCamera(_dummys.get(1).getObjectId(), 0, 75, -89, 0, 100, 0, 0, 1, 0), new ValidateLocation(frintezza), new SpecialCamera(_dummys.get(1).getObjectId(), 300, 90, -10, 6500, 7000, 0, 0, 1, 0));
- + }
- + else if (event.equalsIgnoreCase("camera_03"))
- + broadcastPacket(new SpecialCamera(_dummys.get(0).getObjectId(), 1800, 90, 8, 6500, 7000, 0, 0, 1, 0));
- + else if (event.equalsIgnoreCase("camera_04"))
- + broadcastPacket(new SpecialCamera(_dummys.get(0).getObjectId(), 140, 90, 10, 2500, 4500, 0, 0, 1, 0));
- + else if (event.equalsIgnoreCase("camera_05"))
- + broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 40, 75, -10, 0, 1000, 0, 0, 1, 0), new SpecialCamera(frintezza.getObjectId(), 40, 75, -10, 0, 12000, 0, 0, 1, 0));
- + else if (event.equalsIgnoreCase("camera_06"))
- + broadcastPacket(new SocialAction(frintezza, 2));
- + else if (event.equalsIgnoreCase("camera_07"))
- + {}//broadcastPacket(new SocialAction(demons.get(1), 1), new SocialAction(demons.get(3), 1)); // TODO: 1 y 3
- + else if (event.equalsIgnoreCase("camera_08"))
- + {
- + broadcastPacket(new SocialAction(demons.get(1), 1), new SocialAction(demons.get(3), 1), new SocialAction(demons.get(0), 1), new SocialAction(demons.get(2), 1));
- + _dummys.get(2).instantTeleportTo(172450, -87890, -5100, 0);
- + _dummys.get(3).instantTeleportTo(176012, -87890, -5100, 0);
- + boolean locX = getKnownInside().getX() < 174232;
- + broadcastPacket(new SpecialCamera(_dummys.get(locX ? 2 : 3).getObjectId(), 1000, locX ? 118 : 62, 0, 0, 1000, 0, 0, 1, 0), new SpecialCamera(_dummys.get(locX ? 2 : 3).getObjectId(), 1000, locX ? 118 : 62, 0, 0, 10000, 0, 0, 1, 0));
- + }
- + else if (event.equalsIgnoreCase("camera_09"))
- + broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 240, 90, 0, 0, 1000, 0, 0, 1, 0), new SpecialCamera(frintezza.getObjectId(), 240, 90, 25, 5500, 10000, 0, 0, 1, 0), new SocialAction(frintezza, 3));
- + else if (event.equalsIgnoreCase("camera_10"))
- + broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 100, 195, 35, 0, 10000, 0, 0, 1, 0));
- + else if (event.equalsIgnoreCase("camera_11"))
- + {
- + broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 100, 195, 35, 0, 10000, 0, 0, 1, 0));
- + if (not_confirmed)
- + playFrintezzaMelody();
- + }
- + else if (event.equalsIgnoreCase("camera_12"))
- + {
- + scarlet = (GrandBoss) addSpawn(SCARLET1, 174232, -88020, -5110, 16384, false, 0, true);
- + scarlet.setRightHandItemId(8204);
- + scarlet.decayMe();
- + broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 120, 180, 45, 1500, 10000, 0, 0, 1, 0));
- + if (!not_confirmed)
- + playFrintezzaMelody();
- + }
- + else if (event.equalsIgnoreCase("camera_13"))
- + broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 520, 135, 45, 8000, 10000, 0, 0, 1, 0));
- + else if (event.equalsIgnoreCase("camera_14"))
- + broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 1500, 110, 25, 10000, 13000, 0, 0, 1, 0));
- + else if (event.equalsIgnoreCase("camera_15"))
- + broadcastPacket(new SpecialCamera(_dummys.get(1).getObjectId(), 930, 160, -20, 0, 1000, 0, 0, 1, 0), new MagicSkillUse(_dummys.get(4), _dummys.get(4), 5004, 1, 5800, 0), new SpecialCamera(_dummys.get(1).getObjectId(), 600, 180, -25, 0, 10000, 0, 0, 1, 0));
- + else if (event.equalsIgnoreCase("camera_16"))
- + scarlet.spawnMe();
- + else if (event.equalsIgnoreCase("camera_17"))
- + broadcastPacket(new SocialAction(_dummys.get(4), 3), new SpecialCamera(_dummys.get(4).getObjectId(), 800, 180, 10, 1000, 10000, 0, 0, 1, 0));
- + else if (event.equalsIgnoreCase("camera_18")) // TODO: throw_up
- + throwUp(_dummys.get(4), 500, SystemMessage.getSystemMessage(SystemMessageId.YOU_FEEL_S1_EFFECT).addSkillName(5004, 1));
- + else if (event.equalsIgnoreCase("camera_19"))
- + broadcastPacket(new SpecialCamera(_dummys.get(4).getObjectId(), 300, 60, 8, 0, 10000, 0, 0, 1, 0));
- + else if (event.equalsIgnoreCase("camera_20"))
- + broadcastPacket(new SpecialCamera(scarlet.getObjectId(), 500, 90, 10, 1000, 5000, 0, 0, 1, 0), new SpecialCamera(scarlet.getObjectId(), 500, 90, 10, 3000, 5000, 0, 0, 1, 0));
- + else if (event.equalsIgnoreCase("camera_21"))
- + {
- + for (int i = 0; i < PORTRAIT_GHOST.length; i++)
- + {
- + Monster portrait = (Monster) addSpawn(PORTRAIT_GHOST[i][0], PORTRAIT_GHOST[i][1], PORTRAIT_GHOST[i][2], PORTRAIT_GHOST[i][3], PORTRAIT_GHOST[i][4], false, 0, false);
- + //portrait.setIsFlying(true);
- + portrait.setIsImmobilized(true);
- + portrait.disableCoreAi(true);
- + portraits.put(portrait, i);
- + }
- + if (!_dummys.isEmpty())
- + {
- + for (Npc n : _dummys)
- + deleteNpc(n);
- + _dummys.clear();
- + }
- + }
- + else if (event.equalsIgnoreCase("camera_22")) //TODO: camera_22
- + {
- + roomTasks();
- + setPrepareRoom(false);
- + frintezza.setInvul(false);
- + startQuestTimerAtFixedRate("spawn_minion", null, null, 20000);
- + }
- + else if (event.equalsIgnoreCase("spawn_minion")) //TODO: spawn_minion
- + {
- + if (frintezza != null && !frintezza.isDead() && !portraits.isEmpty())
- + {
- + if (!frintezza.isInvul())
- + for (int i : portraits.values())
- + {
- + if (demons.size() > 24)
- + break;
- + Monster demon = (Monster) addSpawn(PORTRAIT_GHOST[i][0] + 2, PORTRAIT_GHOST[i][5], PORTRAIT_GHOST[i][6], PORTRAIT_GHOST[i][7], PORTRAIT_GHOST[i][8], false, 0, false);
- + demon.setMinion(true);
- + demon.forceRunStance();
- + demons.add(demon);
- + demon.disableSkill(Bomber_Ghost.getSkill(), -1); // Bomb
- + startQuestTimer("action", demon, null, 200);
- + }
- + }
- + else
- + cancelQuestTimers("spawn_minion");
- + }
- + else if (event.equalsIgnoreCase("end_camera"))
- + npc.setInvul(false);
- + else if (event.equalsIgnoreCase("first_morph_01")) //TODO: first_morph
- + {
- + npc.stopSkillEffects(5008);
- + setPrepareRoom(true);
- + broadcastPacket(new SpecialCamera(npc.getObjectId(), 250, calcCameraAngle(npc), 12, 2000, 15000, 0, 0, 1, 0));
- + }
- + else if (event.equalsIgnoreCase("first_morph_02"))
- + {
- + broadcastPacket(new SocialAction(npc, 1));
- + npc.setRightHandItemId(7903);
- + }
- + else if (event.equalsIgnoreCase("first_morph_03"))
- + daemonMorph(npc, 1);
- + else if (event.equalsIgnoreCase("second_morph_01"))
- + {
- + setPrepareRoom(true);
- + broadcastPacket(new SocialAction(frintezza, 4));
- + }
- + else if (event.equalsIgnoreCase("second_morph_02"))
- + {
- + broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 250, 120, 15, 0, 1000, 0, 0, 1, 0), new SpecialCamera(frintezza.getObjectId(), 250, 120, 15, 0, 10000, 0, 0, 1, 0));
- + npc.setIsImmobilized(true);
- + }
- + else if (event.equalsIgnoreCase("second_morph_03"))
- + {
- + playFrintezzaMelody();
- + broadcastPacket(new SpecialCamera(npc.getObjectId(), 500, 70, 15, 3000, 10000, 0, 0, 1, 0));
- + }
- + else if (event.equalsIgnoreCase("second_morph_04"))
- + broadcastPacket(new SpecialCamera(npc.getObjectId(), 2500, 90, 12, 6000, 10000, 0, 0, 1, 0));
- + else if (event.equalsIgnoreCase("second_morph_05"))
- + broadcastPacket(new SpecialCamera(npc.getObjectId(), 250, calcCameraAngle(npc), 12, 0, 1000, 0, 0, 1, 0), new SpecialCamera(npc.getObjectId(), 250, calcCameraAngle(npc), 12, 0, 10000, 0, 0, 1, 0));
- + else if (event.equalsIgnoreCase("second_morph_06"))
- + {
- + npc.doDie(npc);
- + broadcastPacket(new SpecialCamera(npc.getObjectId(), 450, calcCameraAngle(npc), 14, 8000, 8000, 0, 0, 1, 0));
- + scarlet = null;
- + }
- + else if (event.equalsIgnoreCase("second_morph_07"))
- + deleteNpc(npc);
- + else if (event.equalsIgnoreCase("second_morph_08"))
- + {
- + scarlet = (GrandBoss) addSpawn(SCARLET2, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), false, 0, false);
- + broadcastPacket(new SpecialCamera(scarlet.getObjectId(), 450, calcCameraAngle(npc), 12, 500, 14000, 0, 0, 1, 0));
- + }
- + else if (event.equalsIgnoreCase("second_morph_09"))
- + daemonMorph(scarlet, 2);
- + else if (event.equalsIgnoreCase("start_room"))
- + setPrepareRoom(false);
- + else if (event.equalsIgnoreCase("die_01")) //TODO: die_01
- + npc.doDie(npc);
- + else if (event.equalsIgnoreCase("die_02"))
- + broadcastPacket(new SpecialCamera(npc.getObjectId(), 100, 120, 5, 0, 7000, 0, 0, 1, 0), new SpecialCamera(npc.getObjectId(), 100, 90, 5, 5000, 15000, 0, 0, 1, 0));
- + else if (event.equalsIgnoreCase("die_03"))
- + {
- + broadcastPacket(new SpecialCamera(npc.getObjectId(), 900, 90, 25, 7000, 10000, 0, 0, 1, 0));
- + addSpawn(29061, 174232, -88020, -5114, 16384, false, 900000, false);
- + startQuestTimer("remove_players", null, null, 900000);
- + }
- + else if (event.equalsIgnoreCase("die_04"))
- + {
- + cancelQuestTimers("spawn_minion");
- + clean(DEAD);
- + long respawnTime = (long) Config.SPAWN_INTERVAL_FRINTEZZA + Rnd.get(-Config.RANDOM_SPAWN_TIME_FRINTEZZA, Config.RANDOM_SPAWN_TIME_FRINTEZZA);
- + respawnTime *= 3600000;
- + startQuestTimer("frintezza_unlock", npc, null, respawnTime);
- + // also save the respawn time so that the info is maintained past reboots
- + StatSet info = GrandBossManager.getInstance().getStatSet(FRINTEZZA);
- + info.set("respawn_time", System.currentTimeMillis() + respawnTime);
- + GrandBossManager.getInstance().setStatSet(FRINTEZZA, info);
- + }
- + else if (event.equalsIgnoreCase("songs_play")) //TODO: play song
- + callSongAI();
- + else if (event.equalsIgnoreCase("skill_task")) //TODO: skill_task
- + {
- + if (npc.isInvul() || npc.getCast().isCastingNow() || npc.isDead() || frintezza.isInvul())
- + return super.onTimer(event, npc, player);
- +
- + final L2Skill skill = getRandomSkill();
- + int rnd = Rnd.get(10);
- +
- + if (_actualVictim == null || _actualVictim.isDead() || !npc.knows(_actualVictim) || npc.getScriptValue() != 1 && !npc.isMoving() || rnd == 0 && npc.isMoving())
- + _actualVictim = getRandomPlayer(npc);
- + if (_actualVictim == null)
- + return super.onTimer(event, npc, player);
- +
- + int range = skill.getCastRange();
- + if (_actualVictim.isMoving())
- + range = range * 80 / 100;
- + if (MathUtil.checkIfInRange((int) (range + npc.getCollisionRadius()), npc, _actualVictim, true))
- + {
- + npc.getAI().tryToIdle(); //.getAI().setIntention(CtrlIntention.IDLE);
- + npc.getAI().tryToCast(_actualVictim, skill); // npc.doCast(skill); npc.setTarget(_actualVictim);
- + npc.setScriptValue(0);
- + if (rnd < 0) // 90% he decides to reconsiders his new target.
- + _actualVictim = null;
- + }
- + else
- + {
- + npc.forceRunStance();
- + npc.setScriptValue(1);
- + npc.getAI().tryToMoveTo(new Location(_actualVictim.getX(), _actualVictim.getY(), _actualVictim.getZ()), null);//npc.getAI().setIntention(CtrlIntention.FOLLOW, _actualVictim, null);
- + }
- + }
- + else if (event.equalsIgnoreCase("songs_effect"))
- + {
- + if (scarlet == null || frintezza == null || scarlet.isDead() || scarlet.isInvul() || frintezza.isDead() || frintezza.isInvul() || songEffect == null)
- + return super.onTimer(event, npc, player);
- +
- + if (frintezza.getScriptValue() == 1)
- + frintezza.getCast().doCast(songEffect, songEffect.getLevel() < 4 ? getKnownInside() : scarlet, null);
- + else
- + cancelQuestTimers("songs_effect");
- + }
- + else if (event.equalsIgnoreCase("end_song")) // Stop effect song
- + npc.setScriptValue(3);
- + else if (event.equalsIgnoreCase("timeNextSong")) // BreakingArrow - time next song
- + npc.setScriptValue(0);
- + else if (event.equalsIgnoreCase("action"))
- + broadcastPacket(new SocialAction(npc, 1));
- + else if (event.equalsIgnoreCase("frintezza_unlock"))
- + GrandBossManager.getInstance().setBossStatus(FRINTEZZA, DORMANT);
- + else if (event.equalsIgnoreCase("waiting"))
- + {
- + startQuestTimer("close", npc, null, 2700);
- + startQuestTimer("beginning", null, null, 3000);//_LastImperialTomp.broadcastPacket(new Earthquake(174232, -88020, -5116, 45, 27));
- + for (Creature cha : lastImperialTomp.getKnownTypeInside(Player.class))
- + if (cha instanceof Player)
- + cha.broadcastPacket(new Earthquake(cha, 45, 27, false)); //174232, -88020, -5116, 45, 27));
- + }
- + else if (event.equalsIgnoreCase("room1_spawn"))
- + for (int[] loc : ROOM1_SPAWN)
- + _mobs.add(addSpawn(loc[0], loc[1], loc[2], loc[3], loc[4], false, 0, false));
- + else if (event.equalsIgnoreCase("room1_spawn2"))
- + for (int[] loc : ROOM1_CAPTAIN)
- + _mobs.add(addSpawn(loc[0], loc[1], loc[2], loc[3], loc[4], false, 0, false));
- + else if (event.equalsIgnoreCase("room1_spawn3"))
- + for (int[] loc : ROOM1_SUICIDAL_SOLDIER)
- + _mobs.add(addSpawn(loc[0], loc[1], loc[2], loc[3], loc[4], false, 0, false));
- + else if (event.equalsIgnoreCase("room1_spawn4"))
- + for (int[] loc : ROOM1_GUARD)
- + _mobs.add(addSpawn(loc[0], loc[1], loc[2], loc[3], loc[4], false, 0, false));
- + else if (event.equalsIgnoreCase("room2_spawn"))
- + for (int[] loc : ROOM2_SPAWN)
- + _mobs.add(addSpawn(loc[0], loc[1], loc[2], loc[3], loc[4], false, 0, false));
- + else if (event.equalsIgnoreCase("room2_spawn2"))
- + for (int[] loc : ROOM2_SPAWN2)
- + _mobs.add(addSpawn(loc[0], loc[1], loc[2], loc[3], loc[4], false, 0, false));
- + else if (event.equalsIgnoreCase("mobs_del"))
- + {
- + for (Npc mob : _mobs)
- + if (mob != null)
- + mob.deleteMe();
- + _mobs.clear();
- + }
- + else if (event.equalsIgnoreCase("clean"))
- + _killMobs = 0;
- + else if (event.equalsIgnoreCase("close"))
- + {
- + for (int i = 25150051; i <= 25150058; i++)
- + openCloseDoor(false, i);
- +
- + for (int i = 25150061; i <= 25150070; i++)
- + openCloseDoor(false, i);
- +
- + openCloseDoor(false, 25150042, 25150043, 25150045, 25150046);
- + }
- + else if (event.equalsIgnoreCase("enter"))
- + {
- + startQuestTimer("clean", null, null, 100);
- + startQuestTimer("close", null, null, 100);
- + startQuestTimer("room1_spawn", null, null, 4000);
- + startQuestTimer("room_final", null, null, 2100000); // 35min
- + }
- + else if (event.equalsIgnoreCase("room_final"))
- + {
- + lastImperialTomp.broadcastPacket(new CreatureSay(npc.getObjectId(), SayType.SHOUT, npc.getName(), "Exceeded his time limit, challenge failed!"));
- + startQuestTimer("remove_players", null, null, 0);
- +
- + cancelQuestTimers("waiting");
- + startQuestTimer("clean", null, null, 1000);
- + startQuestTimer("close", null, null, 1000);
- + startQuestTimer("mobs_del", null, null, 1000);
- +
- + GrandBossManager.getInstance().setBossStatus(Frintezza.FRINTEZZA, Frintezza.DORMANT);
- + }
- + else if (event.equalsIgnoreCase("remove_players"))
- + lastImperialTomp.oustAllPlayers();
- +
- + return super.onTimer(event, npc, player);
- + }
- +
- + private static void playFrintezzaMelody()
- + {
- + // frintezza.getCast().doCast(Frintezza_Melody.getSkill(), frintezza, null); // frintezza.getAI().tryToCast(frintezza, Frintezza_Melody.getSkill());
- + L2Skill skill = new IntIntHolder(5006, 1).getSkill(); // If tryToCast or doCast is used in the last acis, it looks like a speen run, Frintezza's casting stats are wrong?
- + broadcastPacket(new MagicSkillUse(frintezza, frintezza, skill.getId(), skill.getLevel(), skill.getHitTime(), skill.getReuseDelay()));
- + }
- +
- + private void callSongAI()
- + {
- + if (frintezza == null || frintezza.isDead() || frintezza.isInvul() || frintezza.getScriptValue() == 1)
- + return;
- + else if (frintezza.getScriptValue() == 0)
- + {
- + boolean isRequiem = getState() == 3 && scarlet != null && scarlet.getStatus().getHp() < scarlet.getStatus().getMaxHp() * 0.6 && 100 < Rnd.get(80);
- + // new song play
- + int rnd = Rnd.get(100);
- + for (FrintezzaSong song : FRINTEZZA_SONG_LIST)
- + {
- + int songLvl = song.skill.getSkill().getLevel();
- + if (rnd < song.chance || isRequiem && songLvl == 1)
- + {
- + L2Skill dummySkill = song.skill.getSkill();
- + songEffect = song.effectSkill.getSkill();
- + int hitTime = dummySkill.getHitTime();
- + broadcastPacket(new ExShowScreenMessage(1, -1, SMPOS.TOP_CENTER, false, 0, 0, 0, true, 4000, false, song.songName));
- + broadcastPacket(new MagicSkillUse(frintezza, frintezza, dummySkill.getId(), songLvl, hitTime, dummySkill.getReuseDelay()));
- + startQuestTimer("songs_effect", scarlet, null, 10000);
- + startQuestTimer("endSong", frintezza, null, hitTime);
- + startQuestTimer("timeNextSong", frintezza, null, hitTime + Rnd.get(10000, 15000)/*Rnd.get(30000, 120000)*/);
- + frintezza.setScriptValue(1);
- + return;
- + }
- + }
- + }
- + else if (frintezza.getScriptValue() == 2)
- + {
- + frintezza.setScriptValue(3);
- + startQuestTimer("timeNextSong", frintezza, null, Rnd.get(30000, 120000));
- + }
- + }
- +
- + @Override
- + public String onAttack(Npc npc, Creature attacker, int damage, L2Skill skill)
- + {
- + if (GrandBossManager.getInstance().getBossStatus(FRINTEZZA) != FIGHTING || npc.isInvul())
- + return null;
- +
- + if (!FRINTEZZA_LAIR.isInsideZone(attacker))
- + {
- + attacker.teleportTo(150037 + Rnd.get(500), -57720 + Rnd.get(500), -2976, 0);
- + return null;
- + }
- + if (npc.getNpcId() != FRINTEZZA && !FRINTEZZA_LAIR.isInsideZone(npc) || npc.getX() < 171932 || npc.getX() > 176532 || npc.getY() < -90320 || npc.getY() > -85720 || npc.getZ() < -5130)
- + {
- + npc.enableAllSkills();
- + npc.setIsImmobilized(false);
- + npc.teleportTo(174232, -88020, -5116, 0);
- + return null;
- + }
- +
- + switch (npc.getNpcId())
- + {
- + // When Dewdrop of Destruction is used on Portraits they suicide.
- + case 29048:
- + case 29049:
- + if (skill != null && (skill.getId() == DEWDROP_OF_DESTRUCTION_SKILL_ID))
- + if (attacker.getTarget() == npc)
- + npc.doDie(attacker);
- + break;
- + case 29050:
- + case 29051:
- + double hp = npc.getStatus().getHp();
- + double mm = npc.getStatus().getMaxHp() * 0.10;
- + if (hp >= mm && hp - damage > 0 && hp - damage < mm)
- + npc.enableSkill(Bomber_Ghost.getSkill());
- + break;
- + case FRINTEZZA:
- + if (skill != null && skill.getId() == BREAKING_ARROW_SKILL_ID)
- + {
- + npc.setScriptValue(2);
- + npc.abortAll(true);
- + npc.getAI().tryToIdle();
- + getKnownInside().stopSkillEffects(5008);
- + if (scarlet != null)
- + scarlet.stopSkillEffects(5008);
- + broadcastPacket(new MagicSkillCanceled(frintezza.getObjectId()));
- + }
- + npc.getStatus().setHp(npc.getStatus().getMaxHp(), true);
- + break;
- + case SCARLET1:
- + synchronized (this)
- + {
- + taskCameraMorph(getState(), npc);
- + break;
- + }
- + }
- + _lastAttackTime = System.currentTimeMillis();
- + return super.onAttack(npc, attacker, damage, skill);
- + }
- +
- + @Override
- + public String onSpellFinished(Npc npc, Player player, L2Skill skill)
- + {
- + if (skill.isSuicideAttack() && npc.getNpcId() != FRINTEZZA)
- + this.onKill(npc, null);
- + return super.onSpellFinished(npc, player, skill);
- + }
- +
- + @Override
- + public String onKill(Npc npc, Creature killer)
- + {
- + int StatusBoss = GrandBossManager.getInstance().getBossStatus(FRINTEZZA);
- + if (StatusBoss == FIGHTING)
- + {
- + if (npc.getNpcId() == SCARLET2)
- + taskCameraMorph(getState(), npc);
- + if (portraits.containsKey(npc))
- + portraits.remove(npc);
- + if (demons.contains(npc))
- + demons.remove(npc);
- + return null;
- + }
- + else if (StatusBoss == WAITING)
- + {
- + switch(npc.getNpcId())
- + {
- + case 18329:
- + case 18330:
- + case 18331:
- + case 18332:
- + case 18333:
- + if (Rnd.get(100) < 10)
- + killer.getInventory().addItem("Quest", DEWDROP_OF_DESTRUCTION, 1, null, null);
- + break;
- + case ALARM_DEVICE:
- + if (Rnd.get(100) < 33)
- + killer.getInventory().addItem("Quest", DEWDROP_OF_DESTRUCTION, 1, null, null);
- + _killMobs++;
- +
- + if (not_confirmed)
- + if (_killMobs <= 3 && Rnd.get(100) < _killMobs * 5) // 5% chance first alarm, 10% in the second alarm
- + for (int i = 25150051; i <= 25150058; i++)
- + openCloseDoor(true, i);
- + if (_killMobs == 1)
- + startQuestTimer("room1_spawn2", npc, null, 200);
- + if (_killMobs == 2)
- + startQuestTimer("room1_spawn3", npc, null, 200);
- + if (_killMobs == 3)
- + startQuestTimer("room1_spawn4", npc, null, 200);
- + if (_killMobs == 4)
- + {
- + for (int i = 25150051; i <= 25150058; i++)
- + openCloseDoor(true, i);
- + startQuestTimer("mobs_del", npc, null, 100);
- + startQuestTimer("room2_spawn", npc, null, 200);
- +
- + openCloseDoor(true, 25150042, 25150043); //, 25150045, 25150046
- + }
- + break;
- + case 18339:
- + if (_killMobs <= 6)
- + _killMobs++;
- + if (_killMobs == 6)
- + {
- + openCloseDoor(false, 25150042, 25150043, 25150045, 25150046);
- + for (int i = 25150061; i <= 25150070; i++)
- + openCloseDoor(true, i);
- +
- + startQuestTimer("room2_spawn2", npc, null, 1000);
- + }
- + break;
- + case 18334:
- + if (Rnd.get(100) < 33)
- + killer.getInventory().addItem("Quest", BREAKING_ARROW, 1, null, null); // Breaking Arrow
- + if (_killMobs <= 14)
- + _killMobs++;
- + if (_killMobs == 14)
- + {
- + startQuestTimer("mobs_del", npc, null, 100);
- +
- + openCloseDoor(true, 25150045, 25150046);
- + startQuestTimer("waiting", npc, null, Config.WAIT_TIME_FRINTEZZA * 3);
- + cancelQuestTimers("room_final");
- + startQuestTimer("clean", npc, null, 1000);
- + }
- + break;
- + }
- + return null;
- + }
- + return super.onKill(npc, killer);
- + }
- +
- + private static void openCloseDoor(boolean open, int... doorIds)
- + {
- + for (int doorId : doorIds)
- + if (open)
- + DoorData.getInstance().getDoor(doorId).openMe();
- + else
- + DoorData.getInstance().getDoor(doorId).closeMe();
- + }
- +
- + private static L2Skill getRandomSkill() //TODO: getRandomSkill()
- + {
- + int[][] FIRST_SCARLET_SKILLS =
- + {
- + { 5014, 1, 100}, // Frintezza's Daemon Attack 1
- + { 5015, 1, 5 }, // Frintezza's Daemon Charge 1
- + { 5015, 4, 5 }, // Frintezza's Daemon Charge 4
- + };
- + int[][] SECOND_SCARLET_SKILLS =
- + {
- + { 5014, 2, 100}, // Frintezza's Daemon Attack
- + { 5015, 2, 5 }, // Frintezza's Daemon Charge 2
- + { 5015, 5, 5 }, // Frintezza's Daemon Charge 5
- + { 5018, 1, 10 }, // Frintezza's Daemon Field 1
- + { 5016, 1, 10 }, // Yoke of Scarlet
- + };
- + int[][] THIRD_SCARLET_SKILLS =
- + {
- + { 5014, 3, 100}, // Frintezza's Daemon Attack
- + { 5015, 3, 5 }, // Frintezza's Daemon Charge 3
- + { 5015, 6, 5 }, // Frintezza's Daemon Charge 6
- + { 5018, 2, 10 }, // Frintezza's Daemon Field 2
- + { 5019, 1, 10 }, // Frintezza's Daemon Drain
- + { 5016, 1, 10 }, // Yoke of Scarlet
- + };
- + int skillLvl = getState();
- + if (skillLvl == 1)
- + scarletSkills = FIRST_SCARLET_SKILLS;
- + else if (skillLvl == 2)
- + scarletSkills = SECOND_SCARLET_SKILLS;
- + else if (skillLvl == 3)
- + scarletSkills = THIRD_SCARLET_SKILLS;
- +
- + int rnd = Rnd.get(100);
- + for (int i = scarletSkills.length; --i >= 0;)
- + {
- + int[] sk = scarletSkills[i];
- + int chance = sk[2];
- + if ((rnd -= chance) <= 0)
- + return new IntIntHolder(sk[0], sk[1]).getSkill();
- + }
- + return null;
- + }
- +
- + private static int calcCameraAngle(Creature npc)
- + {
- + final int heading = npc.getHeading();
- + return Math.abs((heading < 32768 ? 180 : 540) - (int)(heading / 182.044444444));
- + }
- +
- + private static void throwUp(Creature attacker, final double range, SystemMessage msg)
- + {
- + final int mx = attacker.getX(), my = attacker.getY();
- + for (Creature target : FRINTEZZA_LAIR.getKnownTypeInside(Creature.class))//.getCharactersInside())
- + {
- + if (target == attacker)
- + continue;
- + if (target instanceof Npc && ((Npc) target).getNpcId() >= 29045 && ((Npc) target).getNpcId() <= 29053)
- + continue;
- + double dx = target.getX() - mx;
- + double dy = target.getY() - my;
- + if (dx == 0 && dy == 0)
- + dx = dy = range / 2;
- + double aa = range / Math.sqrt(dx * dx + dy * dy);
- + if (aa > 1.0)
- + {
- + int x = mx + (int) (dx * aa);
- + int y = my + (int) (dy * aa);
- + int z = target.getZ();
- +
- + target.abortAll(true); //cha.abortAttack(); //cha.abortCast();
- + target.getAI().tryToIdle(); //target.getAI().setIntention(CtrlIntention.IDLE);
- +
- + target.broadcastPacket(new FlyToLocation(target, x, y, z, FlyType.THROW_UP));
- + target.setXYZ(x, y, z);
- + target.getPosition().setHeading(MathUtil.calculateHeadingFrom(x, y, mx, my));
- + target.broadcastPacket(new ValidateLocation(target));
- + if (msg != null)
- + target.sendPacket(msg);
- + if (target instanceof Player)
- + ((Player) target).standUp();
- + }
- + }
- + }
- +
- + private static class FrintezzaSong
- + {
- + public IntIntHolder skill;
- + public IntIntHolder effectSkill;
- + public String songName;
- + public int chance;
- +
- + public FrintezzaSong(IntIntHolder sk, IntIntHolder esk, String sn, int ch)
- + {
- + skill = sk;
- + effectSkill = esk;
- + songName = sn;
- + chance = ch;
- + }
- + }
- +
- + private final FrintezzaSong[] FRINTEZZA_SONG_LIST =
- + {
- + new FrintezzaSong(new IntIntHolder(5007, 1), new IntIntHolder(5008, 1), "Requiem of Hatred", 5),
- + new FrintezzaSong(new IntIntHolder(5007, 2), new IntIntHolder(5008, 2), "Rondo of Solitude", 50),
- + new FrintezzaSong(new IntIntHolder(5007, 3), new IntIntHolder(5008, 3), "Frenetic Toccata", 70),
- + new FrintezzaSong(new IntIntHolder(5007, 4), new IntIntHolder(5008, 4), "Fugue of Jubilation", 90),
- + new FrintezzaSong(new IntIntHolder(5007, 5), new IntIntHolder(5008, 5), "Hypnotic Mazurka", 100),
- + };
- +
- + private static void broadcastPacket(L2GameServerPacket... packets)
- + {
- + for (L2GameServerPacket packet : packets)
- + FRINTEZZA_LAIR.broadcastPacket(packet);
- + }
- +
- + private void daemonMorph(Npc npc, int stage)
- + {
- + npc.setCollisionHeight(stage == 1 ? 110 : 130);
- + broadcastPacket(new SocialAction(npc, stage == 1 ? 4 : 2));
- + final IntIntHolder Daemon_Morph = new IntIntHolder(5017, 1);
- + npc.getCast().doCast(Daemon_Morph.getSkill(), npc, null);
- + broadcastPacket(new NpcInfo(npc, null));
- + roomTasks();
- + }
- +
- + private void setPrepareRoom(boolean move)
- + {
- + for (Creature cha : FRINTEZZA_LAIR.getKnownTypeInside(Creature.class))
- + {
- + if (cha != null)
- + {
- + if (frintezza != cha || frintezza == null)
- + cha.setInvul(move);
- + if (move)
- + {
- + cha.getAI().tryToIdle();
- + cha.abortAll(true);
- + if (frintezza != null)
- + {
- + if (move)
- + cha.setInvul(true);
- + dropTimers();
- + frintezza.setScriptValue(1);
- + broadcastPacket(new MagicSkillCanceled(frintezza.getObjectId()));
- + }
- + }
- + if (!(cha instanceof GrandBoss))
- + {
- + if (move)
- + {
- + cha.disableAllSkills();
- + if (cha instanceof Monster)
- + cha.forceRunStance();//cha.setRunning(true);
- + }
- + else
- + cha.enableAllSkills();
- + cha.setIsImmobilized(move);
- + cha.setIsParalyzed(move);
- + }
- + }
- + }
- + }
- +
- + private void roomTasks()
- + {
- + _lastAttackTime = System.currentTimeMillis();
- + startQuestTimerAtFixedRate("songs_play", frintezza, null, 5000);
- + startQuestTimerAtFixedRate("skill_task", scarlet, null, 2500);
- + startQuestTimerAtFixedRate("spawn_minion", null, null, 20000);
- + startQuestTimer("despawn", scarlet, null, 60000);
- + frintezza.setScriptValue(0);
- + }
- +
- + private static void deleteNpc(Npc... npcs)
- + {
- + for (Npc npc : npcs)
- + {
- + if (npc != null)
- + npc.deleteMe();
- + npc = null;
- + }
- + }
- +
- + private void clean(int status)
- + {
- + if (!demons.isEmpty())
- + for (Npc mobs : demons)
- + deleteNpc(mobs);
- + if (!portraits.isEmpty())
- + for (Monster portrait : portraits.keySet())
- + deleteNpc(portrait);
- + deleteNpc(scarlet, frintezza);
- + demons.clear();
- + portraits.clear();
- + GrandBossManager.getInstance().setBossStatus(FRINTEZZA, status);
- +
- + _lastAttackTime = 0;
- + songEffect = null;
- + }
- +
- + private static int getState()
- + {
- + final IntIntHolder Daemon_Morph = new IntIntHolder(5017, 1);
- + if (scarlet != null)
- + {
- + if (scarlet.getNpcId() == SCARLET2)
- + return 3;
- + AbstractEffect[] effects = scarlet.getAllEffects();
- + if (effects.length != 0)
- + for (AbstractEffect e : effects)
- + if (e.getSkill() == Daemon_Morph.getSkill())
- + return 2;
- + return 1;
- + }
- + return 0;
- + }
- +
- + private void dropTimers()
- + {
- + cancelQuestTimers("despawn");
- + cancelQuestTimers("spawn_minion");
- + cancelQuestTimers("skill_task");
- + cancelQuestTimers("songs_play");
- + cancelQuestTimers("songs_effect");
- + cancelQuestTimers("end_song");
- + cancelQuestTimers("timeNextSong");
- + }
- +
- + private void taskCameraMorph(int state, Npc npc)
- + {
- + if (frintezza.isInvul())
- + return;
- + final double hpRatio = npc.getStatus().getHp() / npc.getStatus().getMaxHp();
- + if (state == 1 && hpRatio < 0.75)
- + {
- + setPrepareRoom(true);
- + startQuestTimer("first_morph_01", npc, null, 1100);
- + startQuestTimer("first_morph_02", npc, null, 4100);
- + startQuestTimer("first_morph_03", npc, null, 8100);
- + startQuestTimer("start_room", npc, null, 11100);
- + startQuestTimer("end_camera", frintezza, null, 14100);
- + }
- + else if (state == 2 && hpRatio < 0.5)
- + {
- + setPrepareRoom(true);
- + startQuestTimer("second_morph_01", npc, null, 2000);
- + startQuestTimer("second_morph_02", npc, null, 2100);
- + startQuestTimer("second_morph_03", frintezza, null, 6300);
- + startQuestTimer("second_morph_04", frintezza, null, 9300);
- + startQuestTimer("second_morph_05", npc, null, 12300);
- + startQuestTimer("second_morph_06", npc, null, 12800);
- + startQuestTimer("second_morph_07", npc, null, 19050);
- + startQuestTimer("second_morph_08", npc, null, 20000);
- + startQuestTimer("second_morph_09", npc, null, 28100);
- + startQuestTimer("start_room", npc, null, 34100);
- + startQuestTimer("end_camera", frintezza, null, 37100);
- + }
- + if (state == 3 && npc.getNpcId() == SCARLET2)
- + {
- + setPrepareRoom(true);
- + broadcastPacket(new SpecialCamera(npc.getObjectId(), 300, calcCameraAngle(npc) - 180, 5, 0, 7000, 0, 0, 1, 0), new SpecialCamera(npc.getObjectId(), 200, calcCameraAngle(npc), 85, 4000, 10000, 0, 0, 1, 0));
- + startQuestTimer("die_01", frintezza, null, 7400);
- + startQuestTimer("die_02", frintezza, null, 7500);
- + startQuestTimer("die_03", frintezza, null, 14500);
- + startQuestTimer("die_04", frintezza, null, 22500);
- + startQuestTimer("start_room", frintezza, null, 21500);
- + }
- + }
- +
- + private static Creature getKnownInside()
- + {
- + for (Creature ch : FRINTEZZA_LAIR.getKnownTypeInside(Creature.class))
- + if (ch instanceof Player)
- + return ch;
- + return null;
- + }
- +}
- \ No newline at end of file
- diff --git aCis_game/java/net/sf/l2j/gameserver/scripting/script/teleport/GrandBossTeleporter.java aCis_game/java/net/sf/l2j/gameserver/scripting/script/teleport/GrandBossTeleporter.java
- index cee8e32..c6de41b 100644
- --- aCis_game/java/net/sf/l2j/gameserver/scripting/script/teleport/GrandBossTeleporter.java
- +++ aCis_game/java/net/sf/l2j/gameserver/scripting/script/teleport/GrandBossTeleporter.java
- @@ -12,11 +12,14 @@
- import net.sf.l2j.gameserver.data.xml.ScriptData;
- import net.sf.l2j.gameserver.model.actor.Npc;
- import net.sf.l2j.gameserver.model.actor.Player;
- +import net.sf.l2j.gameserver.model.group.CommandChannel;
- +import net.sf.l2j.gameserver.model.group.Party;
- import net.sf.l2j.gameserver.model.location.Location;
- import net.sf.l2j.gameserver.model.zone.type.BossZone;
- import net.sf.l2j.gameserver.scripting.Quest;
- import net.sf.l2j.gameserver.scripting.script.ai.boss.Antharas;
- import net.sf.l2j.gameserver.scripting.script.ai.boss.Baium;
- +import net.sf.l2j.gameserver.scripting.script.ai.boss.Frintezza;
- import net.sf.l2j.gameserver.scripting.script.ai.boss.Sailren;
- import net.sf.l2j.gameserver.scripting.script.ai.boss.Valakas;
- @@ -47,6 +50,18 @@
- new Location(115488, 22096, -5168)
- };
- + private static final Location[] FRINTEZZA_IN =
- + {
- + new Location(174102, -76039, -5105),
- + new Location(173235, -76884, -5105),
- + new Location(175003, -76933, -5105),
- + new Location(174196, -76190, -5105),
- + new Location(174013, -76120, -5105),
- + new Location(173263, -75161, -5105)
- + };
- +
- + private static final Location FRINTEZZA_OUT = new Location(150037, -57720, -2976);
- +
- private static final Location SAILREN_IN = new Location(27333, -6835, -1970);
- private static final Location[] SAILREN_OUT =
- {
- @@ -62,7 +77,7 @@
- super(-1, "teleport");
- addFirstTalkId(29055, 31862);
- - addTalkId(13001, 29055, 31859, 31384, 31385, 31540, 31686, 31687, 31759, 31862, 32107, 32109);
- + addTalkId(13001, 29055, 31859, 31384, 31385, 31540, 31686, 31687, 31759, 31862, 32107, 32109, 32011, 29061);
- }
- @Override
- @@ -169,6 +184,10 @@
- htmltext = "13001-03.htm";
- }
- break;
- +
- + case 29061:
- + player.teleportTo(FRINTEZZA_OUT.getX() + Rnd.get(500), FRINTEZZA_OUT.getY() + Rnd.get(500), FRINTEZZA_OUT.getZ(), 0);
- + break;
- case 31859:
- player.teleportTo(79800 + Rnd.get(600), 151200 + Rnd.get(1100), -3534, 0);
- @@ -232,7 +251,88 @@
- case 31759:
- player.teleportTo(150037, -57720, -2976, 250);
- break;
- -
- +
- + case 32011:
- + status = GrandBossManager.getInstance().getBossStatus(Frintezza.FRINTEZZA);
- + if (status == Frintezza.DORMANT)
- + {
- + final BossZone tomb = ZoneManager.getInstance().getZoneById(110012, BossZone.class);
- + if (player.isGM())
- + {
- + ScriptData.getInstance().getQuest("Frintezza").startQuestTimer("enter", null, player, 1000);
- + GrandBossManager.getInstance().setBossStatus(Frintezza.FRINTEZZA, Frintezza.WAITING);
- + byte locCycle = 0;
- + final List<Player> party = player.getParty().getMembers();
- + if (player.getParty() != null)
- + {
- + for (Player member : party)
- + {
- + if (tomb != null)
- + {
- + tomb.allowPlayerEntry(member, 30);
- + member.teleportTo(FRINTEZZA_IN[locCycle], 100);
- + }
- + locCycle++;
- + if (locCycle >= 6)
- + locCycle = 1;
- + }
- + }
- + else
- + player.teleportTo(FRINTEZZA_IN[locCycle], 100);
- + break;
- + }
- + if ((!player.isInParty() || !player.getParty().isLeader(player)) || (player.getParty().getCommandChannel() == null) || (player.getParty().getCommandChannel().getLeader() != player))
- + htmltext = "32011-03.htm";
- + else if (player.getParty().getCommandChannel().getParties().size() < 2 || player.getParty().getCommandChannel().getParties().size() > 5)
- + htmltext = "32011-04.htm";
- + else
- + {
- + if (!player.destroyItemByItemId("Quest", 8073, 1, player, true))
- + return "32011-05.htm";
- +
- + byte locCycle = 0;
- + ScriptData.getInstance().getQuest("Frintezza").startQuestTimer("enter", null, player, 1000);
- + GrandBossManager.getInstance().setBossStatus(Frintezza.FRINTEZZA, Frintezza.WAITING);
- +
- + if (player.getParty() != null)
- + {
- + CommandChannel CommandChannel = player.getParty().getCommandChannel();
- + if (CommandChannel != null)
- + for (Party party : CommandChannel.getParties())
- + {
- + if (party == null)
- + continue;
- + for (Player member : party.getMembers())
- + {
- + if (member == null || member.getStatus().getLevel() < 74 || !MathUtil.checkIfInRange(700, npc, member, true))
- + continue;
- + if (CommandChannel.getMembersCount() > 45)
- + {
- + member.sendMessage("The number of challenges have been full, so can not enter.");
- + break;
- + }
- +
- + if (tomb != null)
- + {
- + tomb.allowPlayerEntry(member, 30);
- + member.teleportTo(FRINTEZZA_IN[locCycle], 100);
- + }
- + member.destroyItemByItemId(getName(), 8556, member.getInventory().getItemCount(8556, -1), null, true);
- + member.destroyItemByItemId(getName(), 8192, member.getInventory().getItemCount(8192, -1), null, true);
- + }
- + locCycle++;
- + if (locCycle >= 6)
- + locCycle = 1;
- + }
- + }
- + }
- + }
- + if (status == Frintezza.DEAD)
- + htmltext = "32011-01.htm";
- + else
- + htmltext = "32011-02.htm";
- + break;
- +
- case 32107:
- player.teleportTo(Rnd.get(SAILREN_OUT), 100);
- break;
- diff --git aCis_game/java/net/sf/l2j/gameserver/skills/effects/EffectDanceStun.java aCis_game/java/net/sf/l2j/gameserver/skills/effects/EffectDanceStun.java
- new file mode 100644
- index 0000000..8a6a80a
- --- /dev/null
- +++ aCis_game/java/net/sf/l2j/gameserver/skills/effects/EffectDanceStun.java
- @@ -0,0 +1,74 @@
- +/*
- + * 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 net.sf.l2j.gameserver.skills.effects;
- +
- +import net.sf.l2j.gameserver.enums.skills.AbnormalEffect;
- +import net.sf.l2j.gameserver.enums.skills.EffectType;
- +import net.sf.l2j.gameserver.model.actor.Creature;
- +import net.sf.l2j.gameserver.skills.AbstractEffect;
- +import net.sf.l2j.gameserver.skills.L2Skill;
- +
- +/**
- + * Copy from http://www.l2jserver.com/forum/viewtopic.php?f=69&t=13999
- + * @author KKnD
- + */
- +public class EffectDanceStun extends AbstractEffect
- +{
- + public EffectDanceStun(EffectTemplate template, L2Skill skill, Creature effected, Creature effector)
- + {
- + super(template, skill, effected, effector);
- + }
- +
- + @Override
- + public EffectType getEffectType()
- + {
- + return EffectType.STUN;
- + }
- +
- + /** Notify started */
- + @Override
- + public boolean onStart()
- + {
- + if (getEffected().isStunned() || getEffected().isImmobilized())
- + return false;
- + int e = getEffected().getAbnormalEffect();
- + if ((e & AbnormalEffect.FLOATING_ROOT.getMask()) != 0 || (e & AbnormalEffect.DANCE_STUNNED.getMask()) != 0)
- + return false;
- +
- + // Abort attack, cast and move.
- + getEffected().abortAll(false);
- +
- + getEffected().startAbnormalEffect(AbnormalEffect.DANCE_STUNNED);
- + getEffected().setIsImmobilized(true);
- + getEffected().disableAllSkills();
- + return true;
- + }
- +
- + /** Notify exited */
- + @Override
- + public void onExit()
- + {
- + getEffected().stopAbnormalEffect(AbnormalEffect.DANCE_STUNNED);
- + getEffected().setIsImmobilized(false);
- + getEffected().enableAllSkills();
- + }
- +
- + @Override
- + public boolean onActionTime()
- + {
- + // just stop this effect
- + return false;
- + }
- +}
- \ No newline at end of file
- diff --git aCis_game/java/net/sf/l2j/gameserver/skills/effects/EffectFloatStun.java aCis_game/java/net/sf/l2j/gameserver/skills/effects/EffectFloatStun.java
- new file mode 100644
- index 0000000..221b06e
- --- /dev/null
- +++ aCis_game/java/net/sf/l2j/gameserver/skills/effects/EffectFloatStun.java
- @@ -0,0 +1,59 @@
- +package net.sf.l2j.gameserver.skills.effects;
- +
- +import net.sf.l2j.gameserver.enums.skills.AbnormalEffect;
- +import net.sf.l2j.gameserver.enums.skills.EffectType;
- +import net.sf.l2j.gameserver.model.actor.Creature;
- +import net.sf.l2j.gameserver.skills.AbstractEffect;
- +import net.sf.l2j.gameserver.skills.L2Skill;
- +
- +/**
- + * Copy from EffectDanceStun.java
- + */
- +public class EffectFloatStun extends AbstractEffect
- +{
- + public EffectFloatStun(EffectTemplate template, L2Skill skill, Creature effected, Creature effector)
- + {
- + super(template, skill, effected, effector);
- + }
- +
- + @Override
- + public EffectType getEffectType()
- + {
- + return EffectType.STUN;
- + }
- +
- + @Override
- + public boolean onStart()
- + {
- + if (getEffected().isStunned() || getEffected().isImmobilized())
- + return false;
- + int e = getEffected().getAbnormalEffect();
- + if ((e & AbnormalEffect.FLOATING_ROOT.getMask()) != 0 || (e & AbnormalEffect.DANCE_STUNNED.getMask()) != 0)
- + return false;
- +
- + // Abort attack, cast and move.
- + getEffected().abortAll(false);
- +
- + getEffected().getAI().tryToIdle();
- +
- + getEffected().startAbnormalEffect(AbnormalEffect.FLOATING_ROOT);
- + getEffected().setIsImmobilized(true);
- + getEffected().disableAllSkills();
- + return true;
- + }
- +
- + @Override
- + public void onExit()
- + {
- + getEffected().stopAbnormalEffect(AbnormalEffect.FLOATING_ROOT);
- + getEffected().setIsImmobilized(false);
- + getEffected().enableAllSkills();
- + }
- +
- + @Override
- + public boolean onActionTime()
- + {
- + // just stop this effect
- + return false;
- + }
- +}
- \ No newline at end of file
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement