BossForever

[aCis] Frintezza

Jan 26th, 2017
700
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 63.59 KB | None | 0 0
  1. /*
  2.  * This program is free software: you can redistribute it and/or modify it under
  3.  * the terms of the GNU General Public License as published by the Free Software
  4.  * Foundation, either version 3 of the License, or (at your option) any later
  5.  * version.
  6.  *
  7.  * This program is distributed in the hope that it will be useful, but WITHOUT
  8.  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  9.  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  10.  * details.
  11.  *
  12.  * You should have received a copy of the GNU General Public License along with
  13.  * this program. If not, see <http://www.gnu.org/licenses/>.
  14.  */
  15. package net.sf.l2j.gameserver.scripting.scripts.ai.individual;
  16.  
  17. import java.util.List;
  18. import java.util.concurrent.CopyOnWriteArrayList;
  19.  
  20. import net.sf.l2j.commons.random.Rnd;
  21.  
  22. import net.sf.l2j.Config;
  23. import net.sf.l2j.gameserver.ai.CtrlIntention;
  24. import net.sf.l2j.gameserver.datatables.DoorTable;
  25. import net.sf.l2j.gameserver.datatables.SkillTable;
  26. import net.sf.l2j.gameserver.instancemanager.GrandBossManager;
  27. import net.sf.l2j.gameserver.instancemanager.ZoneManager;
  28. import net.sf.l2j.gameserver.model.L2Skill;
  29. import net.sf.l2j.gameserver.model.actor.L2Attackable;
  30. import net.sf.l2j.gameserver.model.actor.L2Character;
  31. import net.sf.l2j.gameserver.model.actor.L2Npc;
  32. import net.sf.l2j.gameserver.model.actor.instance.L2GrandBossInstance;
  33. import net.sf.l2j.gameserver.model.actor.instance.L2MonsterInstance;
  34. import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
  35. import net.sf.l2j.gameserver.model.group.CommandChannel;
  36. import net.sf.l2j.gameserver.model.group.Party;
  37. import net.sf.l2j.gameserver.model.zone.type.L2BossZone;
  38. import net.sf.l2j.gameserver.network.SystemMessageId;
  39. import net.sf.l2j.gameserver.network.clientpackets.Say2;
  40. import net.sf.l2j.gameserver.network.serverpackets.AbstractNpcInfo.NpcInfo;
  41. import net.sf.l2j.gameserver.network.serverpackets.CreatureSay;
  42. import net.sf.l2j.gameserver.network.serverpackets.Earthquake;
  43. import net.sf.l2j.gameserver.network.serverpackets.ExShowScreenMessage;
  44. import net.sf.l2j.gameserver.network.serverpackets.MagicSkillCanceld;
  45. import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUse;
  46. import net.sf.l2j.gameserver.network.serverpackets.NpcSay;
  47. import net.sf.l2j.gameserver.network.serverpackets.PlaySound;
  48. import net.sf.l2j.gameserver.network.serverpackets.SocialAction;
  49. import net.sf.l2j.gameserver.network.serverpackets.SpecialCamera;
  50. import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;
  51. import net.sf.l2j.gameserver.scripting.scripts.ai.L2AttackableAIScript;
  52. import net.sf.l2j.gameserver.skills.AbnormalEffect;
  53. import net.sf.l2j.gameserver.templates.StatsSet;
  54.  
  55. /**
  56.  * @Addapted Reborn12, Dandilo, Leonardo Holanda (BossForever)
  57.  */
  58. public class Frintezza extends L2AttackableAIScript
  59. {
  60.     // Zone
  61.     private static final L2BossZone FRINTEZZA_LAIR = ZoneManager.getInstance().getZoneById(110011, L2BossZone.class);
  62.    
  63.     // Boss, Npcs and Minios
  64.     private static final int HALL_ALARM_DEVICE = 18328;
  65.     private static final int HALL_KEEPER_CAPTAIN = 18329;
  66.     private static final int HALL_KEEPER_WIZARD = 18330;
  67.     private static final int HALL_KEEPER_GUARD = 18331;
  68.     private static final int HALL_KEEPER_PATROL = 18332;
  69.     private static final int HALL_KEEPER_SUICIDAL_SOLDIER = 18333;
  70.     private static final int DARK_CHOIR_CAPTAIN = 18334;
  71.     private static final int DARK_CHOIR_PRIMA_DONNA = 18335;
  72.     private static final int DARK_CHOIR_LANCER = 18336;
  73.     private static final int DARK_CHOIR_ARCHER = 18337;
  74.     private static final int DARK_CHOIR_WITCH_DOCTOR = 18338;
  75.     private static final int DARK_CHOIR_PLAYER = 18339;
  76.     private static final int FRINTEZZA = 29045;
  77.     private static final int SCARLET1 = 29046;
  78.     private static final int SCARLET2 = 29047;
  79.     private static final int EVIL_SPIRIT = 29048;
  80.     private static final int EVIL_SPIRIT2 = 29049;
  81.     private static final int BREATH_OF_HALISHA = 29050;
  82.     private static final int BREATH_OF_HALISHA2 = 29051;
  83.     private static final int FOLLOWER_DUMMY = 29052;
  84.     private static final int FOLLOWER_DUMMY2 = 29053;
  85.     private static final int CUBE = 29061;
  86.     private static final int GUIDE = 32011;
  87.    
  88.     // Skills
  89.     private static final int FRINTEZZA_SONGS = 5008;
  90.     private static final int BOMBER_GHOST = 5011;
  91.     private static final int DAEMON_CHARGE = 5015;
  92.     private static final int YOKE_OF_SCARLET = 5016;
  93.     private static final int DAEMON_MORPH = 5017;
  94.     private static final int DAEMON_FIELD = 5018;
  95.     private static final int DAEMON_DRAIN = 5019;
  96.    
  97.     // Item
  98.     private static final int SCROLL = 8073;
  99.    
  100.     // Misc
  101.     private static final int MIN_LEVEL = 74;
  102.    
  103.     // Frintezza Status Tracking :
  104.     private static final byte DORMANT = 0; // Frintezza is spawned and no one has entered yet. Entry is unlocked
  105.     private static final byte WAITING = 1; // Frintezza is spawend and someone has entered, triggering a 30 minute window for additional people to enter
  106.     private static final byte FIGHTING = 2; // Frintezza is engaged in battle, annihilating his foes. Entry is locked
  107.     private static final byte DEAD = 3; // Frintezza has been killed. Entry is locked
  108.    
  109.     // Variables
  110. // Boss: Frintezza
  111.     public Frintezza()
  112.     {
  113.         super("ai/individual");
  114.         setQuestTimerShared();
  115.         registerNpcs();
  116.         addStartNpc(GUIDE, CUBE);
  117.         addTalkId(GUIDE, CUBE);
  118.         addAttackId(SCARLET1, SCARLET2, FRINTEZZA, HALL_ALARM_DEVICE, HALL_KEEPER_CAPTAIN, HALL_KEEPER_WIZARD, HALL_KEEPER_GUARD, HALL_KEEPER_PATROL, HALL_KEEPER_SUICIDAL_SOLDIER, DARK_CHOIR_CAPTAIN, DARK_CHOIR_PRIMA_DONNA, DARK_CHOIR_LANCER, DARK_CHOIR_ARCHER, DARK_CHOIR_WITCH_DOCTOR, DARK_CHOIR_PLAYER, EVIL_SPIRIT, EVIL_SPIRIT2, BREATH_OF_HALISHA, BREATH_OF_HALISHA2);
  119.         addKillId(SCARLET1, SCARLET2, FRINTEZZA, HALL_ALARM_DEVICE, HALL_KEEPER_CAPTAIN, HALL_KEEPER_WIZARD, HALL_KEEPER_GUARD, HALL_KEEPER_PATROL, HALL_KEEPER_SUICIDAL_SOLDIER, DARK_CHOIR_CAPTAIN, DARK_CHOIR_PRIMA_DONNA, DARK_CHOIR_LANCER, DARK_CHOIR_ARCHER, DARK_CHOIR_WITCH_DOCTOR, DARK_CHOIR_PLAYER, EVIL_SPIRIT, EVIL_SPIRIT2, BREATH_OF_HALISHA, BREATH_OF_HALISHA2);
  120.        
  121.         StatsSet info = GrandBossManager.getInstance().getStatsSet(FRINTEZZA);
  122.         int status = GrandBossManager.getInstance().getBossStatus(FRINTEZZA);
  123.         if (status == DEAD)
  124.         {
  125.             long temp = (info.getLong("respawn_time") - System.currentTimeMillis());
  126.             if (temp > 0)
  127.                 startQuestTimer("frintezza_unlock", temp, null, null, false);
  128.             else
  129.                 GrandBossManager.getInstance().setBossStatus(FRINTEZZA, DORMANT);
  130.         }
  131.         else if (status != DORMANT)
  132.             GrandBossManager.getInstance().setBossStatus(FRINTEZZA, DORMANT);
  133.        
  134.         // tempfix for messed door cords
  135.         for (int i = 0; i < 8; i++)
  136.             DoorTable.getInstance().getDoor(25150051 + i);
  137.     }
  138.    
  139.     @Override
  140.     public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
  141.     {
  142.         long temp = 0;
  143.        
  144.         switch (event)
  145.         {
  146.             case "waiting":
  147.                 startQuestTimer("close", 27000, npc, null, false);
  148.                 startQuestTimer("camera_1", 30000, npc, null, false);
  149.                 FRINTEZZA_LAIR.broadcastPacket(new Earthquake(174232, -88020, -5116, 45, 27));
  150.                 break;
  151.            
  152.             case "room1_spawn":
  153.                 CreatureSay cs = new CreatureSay(0, Say2.SHOUT, "Hall Alarm Device", "Intruders! Sound the alarm!");
  154.                 FRINTEZZA_LAIR.broadcastPacket(cs);
  155.                 for (int i = 0; i <= 17; i++)
  156.                 {
  157.                     L2Npc mob = addSpawn(MOBS_LOC[i][0], MOBS_LOC[i][1], MOBS_LOC[i][2], MOBS_LOC[i][3], MOBS_LOC[i][4], false, 0, false);
  158.                     _Room1Mobs.add(mob);
  159.                 }
  160.                 break;
  161.            
  162.             case "room1_spawn2":
  163.                 for (int i = 18; i <= 26; i++)
  164.                 {
  165.                     L2Npc mob = addSpawn(MOBS_LOC[i][0], MOBS_LOC[i][1], MOBS_LOC[i][2], MOBS_LOC[i][3], MOBS_LOC[i][4], false, 0, false);
  166.                     _Room1Mobs.add(mob);
  167.                 }
  168.                 break;
  169.            
  170.             case "room1_spawn3":
  171.                 for (int i = 27; i <= 32; i++)
  172.                 {
  173.                     L2Npc mob = addSpawn(MOBS_LOC[i][0], MOBS_LOC[i][1], MOBS_LOC[i][2], MOBS_LOC[i][3], MOBS_LOC[i][4], false, 0, false);
  174.                     _Room1Mobs.add(mob);
  175.                 }
  176.                 break;
  177.            
  178.             case "room1_spawn4":
  179.                 for (int i = 33; i <= 40; i++)
  180.                 {
  181.                     L2Npc mob = addSpawn(MOBS_LOC[i][0], MOBS_LOC[i][1], MOBS_LOC[i][2], MOBS_LOC[i][3], MOBS_LOC[i][4], false, 0, false);
  182.                     _Room1Mobs.add(mob);
  183.                 }
  184.                 break;
  185.            
  186.             case "room2_spawn":
  187.                 for (int i = 41; i <= 44; i++)
  188.                 {
  189.                     L2Npc mob = addSpawn(MOBS_LOC[i][0], MOBS_LOC[i][1], MOBS_LOC[i][2], MOBS_LOC[i][3], MOBS_LOC[i][4], false, 0, false);
  190.                     _Room2Mobs.add(mob);
  191.                 }
  192.                 break;
  193.            
  194.             case "room2_spawn2":
  195.                 for (int i = 45; i <= 131; i++)
  196.                 {
  197.                     L2Npc mob = addSpawn(MOBS_LOC[i][0], MOBS_LOC[i][1], MOBS_LOC[i][2], MOBS_LOC[i][3], MOBS_LOC[i][4], false, 0, false);
  198.                     _Room2Mobs.add(mob);
  199.                 }
  200.                 break;
  201.            
  202.             case "room1_del":
  203.                 for (L2Npc mob : _Room1Mobs)
  204.                 {
  205.                     if (mob != null)
  206.                         mob.deleteMe();
  207.                 }
  208.                 _Room1Mobs.clear();
  209.                 break;
  210.            
  211.             case "room2_del":
  212.                 for (L2Npc mob : _Room2Mobs)
  213.                 {
  214.                     if (mob != null)
  215.                         mob.deleteMe();
  216.                 }
  217.                 _Room2Mobs.clear();
  218.                 break;
  219.            
  220.             case "room3_del":
  221.                 if (demon1 != null)
  222.                     demon1.deleteMe();
  223.                 if (demon2 != null)
  224.                     demon2.deleteMe();
  225.                 if (demon3 != null)
  226.                     demon3.deleteMe();
  227.                 if (demon4 != null)
  228.                     demon4.deleteMe();
  229.                 if (portrait1 != null)
  230.                     portrait1.deleteMe();
  231.                 if (portrait2 != null)
  232.                     portrait2.deleteMe();
  233.                 if (portrait3 != null)
  234.                     portrait3.deleteMe();
  235.                 if (portrait4 != null)
  236.                     portrait4.deleteMe();
  237.                 if (frintezza != null)
  238.                     frintezza.deleteMe();
  239.                 if (weakScarlet != null)
  240.                     weakScarlet.deleteMe();
  241.                 if (strongScarlet != null)
  242.                     strongScarlet.deleteMe();
  243.                
  244.                 demon1 = null;
  245.                 demon2 = null;
  246.                 demon3 = null;
  247.                 demon4 = null;
  248.                 portrait1 = null;
  249.                 portrait2 = null;
  250.                 portrait3 = null;
  251.                 portrait4 = null;
  252.                 frintezza = null;
  253.                 weakScarlet = null;
  254.                 strongScarlet = null;
  255.                 activeScarlet = null;
  256.                 break;
  257.            
  258.             case "clean":
  259.                 _LastAction = 0;
  260.                 _LocCycle = 0;
  261.                 _CheckDie = 0;
  262.                 _OnCheck = 0;
  263.                 _Abnormal = 0;
  264.                 _OnMorph = 0;
  265.                 _SecondMorph = 0;
  266.                 _ThirdMorph = 0;
  267.                 _KillHallAlarmDevice = 0;
  268.                 _KillDarkChoirPlayer = 0;
  269.                 _KillDarkChoirCaptain = 0;
  270.                 _PlayersInside.clear();
  271.                 break;
  272.            
  273.             case "close":
  274.                 for (int i = 25150051; i <= 25150058; i++)
  275.                     DoorTable.getInstance().getDoor(i).closeMe();
  276.                 for (int i = 25150061; i <= 25150070; i++)
  277.                     DoorTable.getInstance().getDoor(i).closeMe();
  278.                
  279.                 DoorTable.getInstance().getDoor(25150042).closeMe();
  280.                 DoorTable.getInstance().getDoor(25150043).closeMe();
  281.                 DoorTable.getInstance().getDoor(25150045).closeMe();
  282.                 DoorTable.getInstance().getDoor(25150046).closeMe();
  283.                 break;
  284.            
  285.             case "loc_check":
  286.                 switch (GrandBossManager.getInstance().getBossStatus(FRINTEZZA))
  287.                 {
  288.                     case FIGHTING:
  289.                         if (!FRINTEZZA_LAIR.isInsideZone(npc))
  290.                             npc.teleToLocation(174232, -88020, -5116, 0);
  291.                         if (npc.getX() < 171932 || npc.getX() > 176532 || npc.getY() < -90320 || npc.getY() > -85720 || npc.getZ() < -5130)
  292.                             npc.teleToLocation(174232, -88020, -5116, 0);
  293.                         break;
  294.                 }
  295.                 break;
  296.            
  297.             case "camera_1":
  298.                 GrandBossManager.getInstance().setBossStatus(FRINTEZZA, FIGHTING);
  299.                 _frintezzaDummy = addSpawn(FOLLOWER_DUMMY, 174240, -89805, -5022, 16048, false, 0, false);
  300.                 _frintezzaDummy.setIsInvul(true);
  301.                 _frintezzaDummy.setIsImmobilized(true);
  302.                 _overheadDummy = addSpawn(FOLLOWER_DUMMY, 174232, -88020, -5110, 16384, false, 0, false);
  303.                 _overheadDummy.setIsInvul(true);
  304.                 _overheadDummy.setIsImmobilized(true);
  305.                 _overheadDummy.setCollisionHeight(600);
  306.                 FRINTEZZA_LAIR.broadcastPacket(new NpcInfo(_overheadDummy, null));
  307.                 _portraitDummy1 = addSpawn(FOLLOWER_DUMMY, 172450, -87890, -5100, 16048, false, 0, false);
  308.                 _portraitDummy1.setIsImmobilized(true);
  309.                 _portraitDummy1.setIsInvul(true);
  310.                 _portraitDummy3 = addSpawn(FOLLOWER_DUMMY, 176012, -87890, -5100, 16048, false, 0, false);
  311.                 _portraitDummy3.setIsImmobilized(true);
  312.                 _portraitDummy3.setIsInvul(true);
  313.                 _scarletDummy = addSpawn(FOLLOWER_DUMMY2, 174232, -88020, -5110, 16384, false, 0, false);
  314.                 _scarletDummy.setIsInvul(true);
  315.                 _scarletDummy.setIsImmobilized(true);
  316.                 startQuestTimer("stop_pc", 0, npc, null, false);
  317.                 startQuestTimer("camera_2", 1000, _overheadDummy, null, false);
  318.                 break;
  319.            
  320.             case "camera_2":
  321.                 FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(_overheadDummy.getObjectId(), 0, 75, -89, 0, 100, 0, 0, 1, 0));
  322.                 startQuestTimer("camera_2b", 0, _overheadDummy, null, false);
  323.                 break;
  324.            
  325.             case "camera_2b":
  326.                 FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(_overheadDummy.getObjectId(), 0, 75, -89, 0, 100, 0, 0, 1, 0));
  327.                 startQuestTimer("camera_3", 0, _overheadDummy, null, false);
  328.                 break;
  329.            
  330.             case "camera_3":
  331.                 FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(_overheadDummy.getObjectId(), 300, 90, -10, 6500, 7000, 0, 0, 1, 0));
  332.                 frintezza = (L2GrandBossInstance) addSpawn(FRINTEZZA, 174240, -89805, -5022, 16048, false, 0, false);
  333.                 GrandBossManager.getInstance().addBoss(frintezza);
  334.                 frintezza.setIsImmobilized(true);
  335.                 frintezza.setIsInvul(true);
  336.                 frintezza.disableAllSkills();
  337.                 FRINTEZZA_LAIR.updateKnownList(frintezza);
  338.                 demon2 = (L2MonsterInstance) addSpawn(29051, 175876, -88713, -5100, 28205, false, 0, false);
  339.                 demon2.setIsImmobilized(true);
  340.                 demon2.disableAllSkills();
  341.                 FRINTEZZA_LAIR.updateKnownList(demon2);
  342.                 demon3 = (L2MonsterInstance) addSpawn(29051, 172608, -88702, -5100, 64817, false, 0, false);
  343.                 demon3.setIsImmobilized(true);
  344.                 demon3.disableAllSkills();
  345.                 FRINTEZZA_LAIR.updateKnownList(demon3);
  346.                 demon1 = (L2MonsterInstance) addSpawn(29050, 175833, -87165, -5100, 35048, false, 0, false);
  347.                 demon1.setIsImmobilized(true);
  348.                 demon1.disableAllSkills();
  349.                 FRINTEZZA_LAIR.updateKnownList(demon1);
  350.                 demon4 = (L2MonsterInstance) addSpawn(29050, 172634, -87165, -5100, 57730, false, 0, false);
  351.                 demon4.setIsImmobilized(true);
  352.                 demon4.disableAllSkills();
  353.                 FRINTEZZA_LAIR.updateKnownList(demon4);
  354.                 startQuestTimer("camera_4", 6500, _overheadDummy, null, false);
  355.                 break;
  356.            
  357.             case "camera_4":
  358.                 FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(_frintezzaDummy.getObjectId(), 1800, 90, 8, 6500, 7000, 0, 0, 1, 0));
  359.                 startQuestTimer("camera_5", 900, _frintezzaDummy, null, false);
  360.                 break;
  361.            
  362.             case "camera_5":
  363.                 FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(_frintezzaDummy.getObjectId(), 140, 90, 10, 2500, 4500, 0, 0, 1, 0));
  364.                 startQuestTimer("camera_5b", 4000, _frintezzaDummy, null, false);
  365.                 break;
  366.            
  367.             case "camera_5b":
  368.                 FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 40, 75, -10, 0, 1000, 0, 0, 1, 0));
  369.                 startQuestTimer("camera_6", 0, frintezza, null, false);
  370.                 break;
  371.            
  372.             case "camera_6":
  373.                 FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 40, 75, -10, 0, 12000, 0, 0, 1, 0));
  374.                 startQuestTimer("camera_7", 1350, frintezza, null, false);
  375.                 break;
  376.            
  377.             case "camera_7":
  378.                 FRINTEZZA_LAIR.broadcastPacket(new SocialAction(frintezza, 2));
  379.                 startQuestTimer("camera_8", 7000, frintezza, null, false);
  380.                 break;
  381.            
  382.             case "camera_8":
  383.                 startQuestTimer("camera_9", 1000, frintezza, null, false);
  384.                 _frintezzaDummy.deleteMe();
  385.                 _frintezzaDummy = null;
  386.                 break;
  387.            
  388.             case "camera_9":
  389.                 FRINTEZZA_LAIR.broadcastPacket(new SocialAction(demon2, 1));
  390.                 FRINTEZZA_LAIR.broadcastPacket(new SocialAction(demon3, 1));
  391.                 startQuestTimer("camera_9b", 400, frintezza, null, false);
  392.                 break;
  393.            
  394.             case "camera_9b":
  395.                 FRINTEZZA_LAIR.broadcastPacket(new SocialAction(demon1, 1));
  396.                 FRINTEZZA_LAIR.broadcastPacket(new SocialAction(demon4, 1));
  397.                 for (L2Character pc : FRINTEZZA_LAIR.getCharactersInside())
  398.                 {
  399.                     if (pc instanceof L2PcInstance)
  400.                         if (pc.getX() < 174232)
  401.                             pc.broadcastPacket(new SpecialCamera(_portraitDummy1.getObjectId(), 1000, 118, 0, 0, 1000, 0, 0, 1, 0));
  402.                         else
  403.                             pc.broadcastPacket(new SpecialCamera(_portraitDummy3.getObjectId(), 1000, 62, 0, 0, 1000, 0, 0, 1, 0));
  404.                 }
  405.                 startQuestTimer("camera_9c", 0, frintezza, null, false);
  406.                 break;
  407.            
  408.             case "camera_9c":
  409.                 for (L2Character pc : FRINTEZZA_LAIR.getCharactersInside())
  410.                 {
  411.                     if (pc instanceof L2PcInstance)
  412.                         if (pc.getX() < 174232)
  413.                             pc.broadcastPacket(new SpecialCamera(_portraitDummy1.getObjectId(), 1000, 118, 0, 0, 10000, 0, 0, 1, 0));
  414.                         else
  415.                             pc.broadcastPacket(new SpecialCamera(_portraitDummy3.getObjectId(), 1000, 62, 0, 0, 10000, 0, 0, 1, 0));
  416.                 }
  417.                 startQuestTimer("camera_10", 2000, frintezza, null, false);
  418.                 break;
  419.            
  420.             case "camera_10":
  421.                 FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 240, 90, 0, 0, 1000, 0, 0, 1, 0));
  422.                 startQuestTimer("camera_11", 0, frintezza, null, false);
  423.                 break;
  424.            
  425.             case "camera_11":
  426.                 FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 240, 90, 25, 5500, 10000, 0, 0, 1, 0));
  427.                 FRINTEZZA_LAIR.broadcastPacket(new SocialAction(frintezza, 3));
  428.                 _portraitDummy1.deleteMe();
  429.                 _portraitDummy3.deleteMe();
  430.                 _portraitDummy1 = null;
  431.                 _portraitDummy3 = null;
  432.                 startQuestTimer("camera_12", 4500, frintezza, null, false);
  433.                 break;
  434.            
  435.             case "camera_12":
  436.                 FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 100, 195, 35, 0, 10000, 0, 0, 1, 0));
  437.                 startQuestTimer("camera_13", 700, frintezza, null, false);
  438.                 break;
  439.            
  440.             case "camera_13":
  441.                 FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 100, 195, 35, 0, 10000, 0, 0, 1, 0));
  442.                 startQuestTimer("camera_14", 1300, frintezza, null, false);
  443.                 break;
  444.            
  445.             case "camera_14":
  446.                 FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 120, 180, 45, 1500, 10000, 0, 0, 1, 0));
  447.                 FRINTEZZA_LAIR.broadcastPacket(new MagicSkillUse(frintezza, frintezza, 5006, 1, 34000, 0));
  448.                 FRINTEZZA_LAIR.broadcastPacket(new ExShowScreenMessage(1, 0, 2, false, 1, 0, 0, false, 5000, true, "Mournful Chorale Prelude"));
  449.                 startQuestTimer("camera_16", 1500, frintezza, null, false);
  450.                 break;
  451.            
  452.             case "camera_16":
  453.                 FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 520, 135, 45, 8000, 10000, 0, 0, 1, 0));
  454.                 startQuestTimer("camera_17", 7500, frintezza, null, false);
  455.                 break;
  456.            
  457.             case "camera_17":
  458.                 FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 1500, 110, 25, 10000, 13000, 0, 0, 1, 0));
  459.                 startQuestTimer("camera_18", 9500, frintezza, null, false);
  460.                 break;
  461.            
  462.             case "camera_18":
  463.                 FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(_overheadDummy.getObjectId(), 930, 160, -20, 0, 1000, 0, 0, 1, 0));
  464.                 startQuestTimer("camera_18b", 0, _overheadDummy, null, false);
  465.                 break;
  466.            
  467.             case "camera_18b":
  468.                 FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(_overheadDummy.getObjectId(), 600, 180, -25, 0, 10000, 0, 0, 1, 0));
  469.                 FRINTEZZA_LAIR.broadcastPacket(new MagicSkillUse(_scarletDummy, _overheadDummy, 5004, 1, 5800, 0));
  470.                 weakScarlet = (L2GrandBossInstance) addSpawn(29046, 174232, -88020, -5110, 16384, false, 0, true);
  471.                 weakScarlet.setIsInvul(true);
  472.                 weakScarlet.setIsImmobilized(true);
  473.                 weakScarlet.disableAllSkills();
  474.                 FRINTEZZA_LAIR.updateKnownList(weakScarlet);
  475.                 activeScarlet = weakScarlet;
  476.                 startQuestTimer("camera_19", 2400, _scarletDummy, null, false);
  477.                 startQuestTimer("camera_19b", 5000, _scarletDummy, null, false);
  478.                 break;
  479.            
  480.             case "camera_19":
  481.                 weakScarlet.teleToLocation(174232, -88020, -5110, 0);
  482.                 break;
  483.            
  484.             case "camera_19b":
  485.                 FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(_scarletDummy.getObjectId(), 800, 180, 10, 1000, 10000, 0, 0, 1, 0));
  486.                 startQuestTimer("camera_20", 2100, _scarletDummy, null, false);
  487.                 break;
  488.            
  489.             case "camera_20":
  490.                 FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(weakScarlet.getObjectId(), 300, 60, 8, 0, 10000, 0, 0, 1, 0));
  491.                 startQuestTimer("camera_21", 2000, weakScarlet, null, false);
  492.                 break;
  493.            
  494.             case "camera_21":
  495.                 FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(weakScarlet.getObjectId(), 500, 90, 10, 3000, 5000, 0, 0, 1, 0));
  496.                 startQuestTimer("camera_22", 3000, weakScarlet, null, false);
  497.                 break;
  498.            
  499.             case "camera_22":
  500.                 portrait2 = (L2MonsterInstance) addSpawn(29049, 175876, -88713, -5000, 28205, false, 0, false);
  501.                 portrait2.setIsImmobilized(true);
  502.                 portrait2.disableAllSkills();
  503.                 FRINTEZZA_LAIR.updateKnownList(portrait2);
  504.                 portrait3 = (L2MonsterInstance) addSpawn(29049, 172608, -88702, -5000, 64817, false, 0, false);
  505.                 portrait3.setIsImmobilized(true);
  506.                 portrait3.disableAllSkills();
  507.                 FRINTEZZA_LAIR.updateKnownList(portrait3);
  508.                 portrait1 = (L2MonsterInstance) addSpawn(29048, 175833, -87165, -5000, 35048, false, 0, false);
  509.                 portrait1.setIsImmobilized(true);
  510.                 portrait1.disableAllSkills();
  511.                 FRINTEZZA_LAIR.updateKnownList(portrait1);
  512.                 portrait4 = (L2MonsterInstance) addSpawn(29048, 172634, -87165, -5000, 57730, false, 0, false);
  513.                 portrait4.setIsImmobilized(true);
  514.                 portrait4.disableAllSkills();
  515.                 FRINTEZZA_LAIR.updateKnownList(portrait4);
  516.                 _overheadDummy.deleteMe();
  517.                 _scarletDummy.deleteMe();
  518.                 _overheadDummy = null;
  519.                 _scarletDummy = null;
  520.                 startQuestTimer("camera_23", 2000, weakScarlet, null, false);
  521.                 startQuestTimer("start_pc", 2000, weakScarlet, null, false);
  522.                 startQuestTimer("loc_check", 60000, weakScarlet, null, true);
  523.                 startQuestTimer("songs_play", 10000 + Rnd.get(10000), frintezza, null, false);
  524.                 startQuestTimer("skill01", 10000 + Rnd.get(10000), weakScarlet, null, false);
  525.                 break;
  526.            
  527.             case "camera_23":
  528.                 demon1.setIsImmobilized(false);
  529.                 demon2.setIsImmobilized(false);
  530.                 demon3.setIsImmobilized(false);
  531.                 demon4.setIsImmobilized(false);
  532.                 demon1.enableAllSkills();
  533.                 demon2.enableAllSkills();
  534.                 demon3.enableAllSkills();
  535.                 demon4.enableAllSkills();
  536.                 portrait1.setIsImmobilized(false);
  537.                 portrait2.setIsImmobilized(false);
  538.                 portrait3.setIsImmobilized(false);
  539.                 portrait4.setIsImmobilized(false);
  540.                 portrait1.enableAllSkills();
  541.                 portrait2.enableAllSkills();
  542.                 portrait3.enableAllSkills();
  543.                 portrait4.enableAllSkills();
  544.                 weakScarlet.setIsInvul(false);
  545.                 weakScarlet.setIsImmobilized(false);
  546.                 weakScarlet.enableAllSkills();
  547.                 weakScarlet.setRunning();
  548.                 startQuestTimer("spawn_minion", 20000, portrait1, null, false);
  549.                 startQuestTimer("spawn_minion", 20000, portrait2, null, false);
  550.                 startQuestTimer("spawn_minion", 20000, portrait3, null, false);
  551.                 startQuestTimer("spawn_minion", 20000, portrait4, null, false);
  552.                 break;
  553.            
  554.             case "stop_pc":
  555.                 for (L2Character cha : FRINTEZZA_LAIR.getCharactersInside())
  556.                 {
  557.                     cha.abortAttack();
  558.                     cha.abortCast();
  559.                     cha.disableAllSkills();
  560.                     cha.setTarget(null);
  561.                     cha.stopMove(null);
  562.                     cha.setIsImmobilized(true);
  563.                     cha.getAI().setIntention(CtrlIntention.IDLE);
  564.                 }
  565.                 break;
  566.            
  567.             case "stop_npc":
  568.                 _Heading = npc.getHeading();
  569.                 if (_Heading < 32768)
  570.                     _Angle = Math.abs(180 - (int) (_Heading / 182.044444444));
  571.                 else
  572.                     _Angle = Math.abs(540 - (int) (_Heading / 182.044444444));
  573.                 break;
  574.            
  575.             case "start_pc":
  576.                 for (L2Character cha : FRINTEZZA_LAIR.getCharactersInside())
  577.                 {
  578.                     if (cha != frintezza)
  579.                     {
  580.                         cha.enableAllSkills();
  581.                         cha.setIsImmobilized(false);
  582.                     }
  583.                 }
  584.                 break;
  585.            
  586.             case "start_npc":
  587.                 npc.setRunning();
  588.                 npc.setIsInvul(false);
  589.                 break;
  590.            
  591.             case "morph_end":
  592.                 _OnMorph = 0;
  593.                 break;
  594.            
  595.             case "morph_01":
  596.                 FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(weakScarlet.getObjectId(), 250, _Angle, 12, 2000, 15000, 0, 0, 1, 0));
  597.                 startQuestTimer("morph_02", 3000, weakScarlet, null, false);
  598.                 break;
  599.            
  600.             case "morph_02":
  601.                 FRINTEZZA_LAIR.broadcastPacket(new SocialAction(weakScarlet, 1));
  602.                 frintezza.setRHandId(7903); // fake weapon
  603.                 startQuestTimer("morph_03", 4000, weakScarlet, null, false);
  604.                 break;
  605.            
  606.             case "morph_03":
  607.                 startQuestTimer("morph_04", 1500, weakScarlet, null, false);
  608.                 break;
  609.            
  610.             case "morph_04":
  611.                 FRINTEZZA_LAIR.broadcastPacket(new SocialAction(weakScarlet, 4));
  612.                 L2Skill skill = SkillTable.getInstance().getInfo(DAEMON_MORPH, 1);
  613.                 if (skill != null)
  614.                     skill.getEffects(weakScarlet, weakScarlet);
  615.                
  616.                 startQuestTimer("morph_end", 6000, weakScarlet, null, false);
  617.                 startQuestTimer("start_pc", 3000, weakScarlet, null, false);
  618.                 startQuestTimer("start_npc", 3000, weakScarlet, null, false);
  619.                 startQuestTimer("songs_play", 10000 + Rnd.get(10000), frintezza, null, false);
  620.                 startQuestTimer("skill02", 10000 + Rnd.get(10000), weakScarlet, null, false);
  621.                 break;
  622.            
  623.             case "morph_05a":
  624.                 FRINTEZZA_LAIR.broadcastPacket(new SocialAction(frintezza, 4));
  625.                 break;
  626.            
  627.             case "morph_05":
  628.                 FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 250, 120, 15, 0, 1000, 0, 0, 1, 0));
  629.                 startQuestTimer("morph_06", 0, frintezza, null, false);
  630.                 break;
  631.            
  632.             case "morph_06":
  633.                 FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 250, 120, 15, 0, 10000, 0, 0, 1, 0));
  634.                 cancelQuestTimers("loc_check");
  635.                 _Scarlet_x = weakScarlet.getX();
  636.                 _Scarlet_y = weakScarlet.getY();
  637.                 _Scarlet_z = weakScarlet.getZ();
  638.                 _Scarlet_h = weakScarlet.getHeading();
  639.                 weakScarlet.deleteMe();
  640.                 weakScarlet = null;
  641.                 activeScarlet = null;
  642.                 weakScarlet = (L2GrandBossInstance) addSpawn(29046, _Scarlet_x, _Scarlet_y, _Scarlet_z, _Scarlet_h, false, 0, false);
  643.                 weakScarlet.setIsInvul(true);
  644.                 weakScarlet.setIsImmobilized(true);
  645.                 weakScarlet.disableAllSkills();
  646.                 weakScarlet.setRHandId(7903);
  647.                 FRINTEZZA_LAIR.updateKnownList(weakScarlet);
  648.                 startQuestTimer("morph_07", 7000, frintezza, null, false);
  649.                 break;
  650.            
  651.             case "morph_07":
  652.                 FRINTEZZA_LAIR.broadcastPacket(new MagicSkillUse(frintezza, frintezza, 5006, 1, 34000, 0));
  653.                 FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 500, 70, 15, 3000, 10000, 0, 0, 1, 0));
  654.                 startQuestTimer("morph_08", 3000, frintezza, null, false);
  655.                 break;
  656.            
  657.             case "morph_08":
  658.                 FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 2500, 90, 12, 6000, 10000, 0, 0, 1, 0));
  659.                 startQuestTimer("morph_09", 3000, frintezza, null, false);
  660.                 break;
  661.            
  662.             case "morph_09":
  663.                 FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(weakScarlet.getObjectId(), 250, _Angle, 12, 0, 1000, 0, 0, 1, 0));
  664.                 startQuestTimer("morph_10", 0, weakScarlet, null, false);
  665.                 break;
  666.            
  667.             case "morph_10":
  668.                 FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(weakScarlet.getObjectId(), 250, _Angle, 12, 0, 10000, 0, 0, 1, 0));
  669.                 startQuestTimer("morph_11", 500, weakScarlet, null, false);
  670.                 break;
  671.            
  672.             case "morph_11":
  673.                 weakScarlet.doDie(weakScarlet);
  674.                 FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(weakScarlet.getObjectId(), 450, _Angle, 14, 8000, 8000, 0, 0, 1, 0));
  675.                 startQuestTimer("morph_12", 6250, weakScarlet, null, false);
  676.                 startQuestTimer("morph_13", 7200, weakScarlet, null, false);
  677.                 break;
  678.            
  679.             case "morph_12":
  680.                 weakScarlet.deleteMe();
  681.                 weakScarlet = null;
  682.                 break;
  683.            
  684.             case "morph_13":
  685.                 strongScarlet = (L2GrandBossInstance) addSpawn(SCARLET2, _Scarlet_x, _Scarlet_y, _Scarlet_z, _Scarlet_h, false, 0, false);
  686.                 strongScarlet.setIsInvul(true);
  687.                 strongScarlet.setIsImmobilized(true);
  688.                 strongScarlet.disableAllSkills();
  689.                 FRINTEZZA_LAIR.updateKnownList(strongScarlet);
  690.                 activeScarlet = strongScarlet;
  691.                 FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(strongScarlet.getObjectId(), 450, _Angle, 12, 500, 14000, 0, 0, 1, 0));
  692.                 startQuestTimer("morph_14", 3000, strongScarlet, null, false);
  693.                 startQuestTimer("loc_check", 60000, strongScarlet, null, true);
  694.                 break;
  695.            
  696.             case "morph_14":
  697.                 startQuestTimer("morph_15", 5100, strongScarlet, null, false);
  698.                 break;
  699.            
  700.             case "morph_15":
  701.                 FRINTEZZA_LAIR.broadcastPacket(new SocialAction(strongScarlet, 2));
  702.                 L2Skill skill1 = SkillTable.getInstance().getInfo(DAEMON_MORPH, 1);
  703.                 if (skill1 != null)
  704.                     skill1.getEffects(strongScarlet, strongScarlet);
  705.                
  706.                 startQuestTimer("morph_end", 9000, strongScarlet, null, false);
  707.                 startQuestTimer("start_pc", 6000, strongScarlet, null, false);
  708.                 startQuestTimer("start_npc", 6000, strongScarlet, null, false);
  709.                 startQuestTimer("songs_play", 10000 + Rnd.get(10000), frintezza, null, false);
  710.                 startQuestTimer("skill03", 10000 + Rnd.get(10000), strongScarlet, null, false);
  711.                 break;
  712.            
  713.             case "morph_16":
  714.                 FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(strongScarlet.getObjectId(), 300, _Angle - 180, 5, 0, 7000, 0, 0, 1, 0));
  715.                 startQuestTimer("morph_17", 0, strongScarlet, null, false);
  716.                 break;
  717.            
  718.             case "morph_17":
  719.                 FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(strongScarlet.getObjectId(), 200, _Angle, 85, 4000, 10000, 0, 0, 1, 0));
  720.                 startQuestTimer("morph_17b", 7400, frintezza, null, false);
  721.                 startQuestTimer("morph_18", 7500, frintezza, null, false);
  722.                 break;
  723.            
  724.             case "morph_17b":
  725.                 frintezza.doDie(frintezza);
  726.                 break;
  727.            
  728.             case "morph_18":
  729.                 FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 100, 120, 5, 0, 7000, 0, 0, 1, 0));
  730.                 startQuestTimer("morph_19", 0, frintezza, null, false);
  731.                 break;
  732.            
  733.             case "morph_19":
  734.                 FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 100, 90, 5, 5000, 15000, 0, 0, 1, 0));
  735.                 startQuestTimer("morph_20", 7000, frintezza, null, false);
  736.                 startQuestTimer("spawn_cubes", 7000, frintezza, null, false);
  737.                 break;
  738.            
  739.             case "morph_20":
  740.                 FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 900, 90, 25, 7000, 10000, 0, 0, 1, 0));
  741.                 FRINTEZZA_LAIR.broadcastPacket(new MagicSkillUse(frintezza, frintezza, FRINTEZZA_SONGS, 2, 32000, 0));
  742.                 FRINTEZZA_LAIR.broadcastPacket(new ExShowScreenMessage(1, 0, 2, false, 1, 0, 0, false, 5000, true, "Frenetic Toccata"));
  743.                 startQuestTimer("start_pc", 7000, frintezza, null, false);
  744.                 break;
  745.            
  746.             case "songs_play":
  747.                 if (frintezza != null && !frintezza.isDead() && _OnMorph == 0)
  748.                 {
  749.                     _OnSong = Rnd.get(1, 5);
  750.                     if (_OnSong == 1 && _ThirdMorph == 1 && strongScarlet.getCurrentHp() < strongScarlet.getMaxHp() * 0.6 && Rnd.get(100) < 80)
  751.                     {
  752.                         FRINTEZZA_LAIR.broadcastPacket(new MagicSkillUse(frintezza, frintezza, 5007, 1, 32000, 0));
  753.                         startQuestTimer("songs_effect", 5000, frintezza, null, false);
  754.                         startQuestTimer("songs_play", 32000 + Rnd.get(10000), frintezza, null, false);
  755.                     }
  756.                     else if (_OnSong == 2 || _OnSong == 3)
  757.                     {
  758.                         FRINTEZZA_LAIR.broadcastPacket(new MagicSkillUse(frintezza, frintezza, 5007, _OnSong, 32000, 0));
  759.                         startQuestTimer("songs_effect", 5000, frintezza, null, false);
  760.                         startQuestTimer("songs_play", 32000 + Rnd.get(10000), frintezza, null, false);
  761.                     }
  762.                     else if (_OnSong == 4 && _SecondMorph == 1)
  763.                     {
  764.                         FRINTEZZA_LAIR.broadcastPacket(new MagicSkillUse(frintezza, frintezza, 5007, 4, 31000, 0));
  765.                         startQuestTimer("songs_effect", 5000, frintezza, null, false);
  766.                         startQuestTimer("songs_play", 31000 + Rnd.get(10000), frintezza, null, false);
  767.                     }
  768.                     else if (_OnSong == 5 && _ThirdMorph == 1 && _Abnormal == 0)
  769.                     {
  770.                         _Abnormal = 1;
  771.                         FRINTEZZA_LAIR.broadcastPacket(new MagicSkillUse(frintezza, frintezza, 5007, 5, 35000, 0));
  772.                         startQuestTimer("songs_effect", 5000, frintezza, null, false);
  773.                         startQuestTimer("songs_play", 35000 + Rnd.get(10000), frintezza, null, false);
  774.                     }
  775.                     else
  776.                         startQuestTimer("songs_play", 5000 + Rnd.get(5000), frintezza, null, false);
  777.                 }
  778.                 break;
  779.            
  780.             case "songs_effect":
  781.                 L2Skill skill2 = SkillTable.getInstance().getInfo(FRINTEZZA_SONGS, _OnSong);
  782.                 if (skill2 == null)
  783.                     return null;
  784.                
  785.                 if (_OnSong == 1 || _OnSong == 2 || _OnSong == 3)
  786.                 {
  787.                     if (frintezza != null && !frintezza.isDead() && activeScarlet != null && !activeScarlet.isDead())
  788.                         skill2.getEffects(frintezza, activeScarlet);
  789.                 }
  790.                 else if (_OnSong == 4)
  791.                 {
  792.                     for (L2Character cha : FRINTEZZA_LAIR.getCharactersInside())
  793.                     {
  794.                         if (cha instanceof L2PcInstance && Rnd.get(100) < 80)
  795.                         {
  796.                             skill2.getEffects(frintezza, cha);
  797.                             cha.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_FEEL_S1_EFFECT).addSkillName(FRINTEZZA_SONGS, 4));
  798.                         }
  799.                     }
  800.                 }
  801.                 else if (_OnSong == 5)
  802.                 {
  803.                     for (L2Character cha : FRINTEZZA_LAIR.getCharactersInside())
  804.                     {
  805.                         if (cha instanceof L2PcInstance && Rnd.get(100) < 70)
  806.                         {
  807.                             cha.abortAttack();
  808.                             cha.abortCast();
  809.                             cha.disableAllSkills();
  810.                             cha.stopMove(null);
  811.                             cha.setIsParalyzed(true);
  812.                             cha.setIsImmobilized(true);
  813.                             cha.getAI().setIntention(CtrlIntention.IDLE);
  814.                             skill2.getEffects(frintezza, cha);
  815.                             cha.startAbnormalEffect(AbnormalEffect.DANCE_STUNNED);
  816.                             cha.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_FEEL_S1_EFFECT).addSkillName(FRINTEZZA_SONGS, 5));
  817.                         }
  818.                     }
  819.                     startQuestTimer("stop_effect", 25000, frintezza, null, false);
  820.                 }
  821.                 break;
  822.            
  823.             case "stop_effect":
  824.                 for (L2Character cha : FRINTEZZA_LAIR.getCharactersInside())
  825.                 {
  826.                     if (cha instanceof L2PcInstance)
  827.                     {
  828.                         cha.stopAbnormalEffect(AbnormalEffect.DANCE_STUNNED);
  829.                         cha.stopAbnormalEffect(AbnormalEffect.FLOATING_ROOT);
  830.                         cha.enableAllSkills();
  831.                         cha.setIsImmobilized(false);
  832.                         cha.setIsParalyzed(false);
  833.                     }
  834.                 }
  835.                 _Abnormal = 0;
  836.                 break;
  837.            
  838.             case "attack_stop":
  839.                 cancelQuestTimers("skill01");
  840.                 cancelQuestTimers("skill02");
  841.                 cancelQuestTimers("skill03");
  842.                 cancelQuestTimers("songs_play");
  843.                 cancelQuestTimers("songs_effect");
  844.                
  845.                 if (frintezza != null)
  846.                     FRINTEZZA_LAIR.broadcastPacket(new MagicSkillCanceld(frintezza.getObjectId()));
  847.                 break;
  848.            
  849.             case "check_hp":
  850.                 if (npc.isDead())
  851.                 {
  852.                     _OnMorph = 1;
  853.                     FRINTEZZA_LAIR.broadcastPacket(new PlaySound(1, "BS01_D", 1, npc.getObjectId(), npc.getX(), npc.getY(), npc.getZ()));
  854.                    
  855.                     startQuestTimer("attack_stop", 0, frintezza, null, false);
  856.                     startQuestTimer("stop_pc", 0, npc, null, false);
  857.                     startQuestTimer("stop_npc", 0, npc, null, false);
  858.                     startQuestTimer("morph_16", 0, npc, null, false);
  859.                 }
  860.                 else
  861.                 {
  862.                     _CheckDie = _CheckDie + 10;
  863.                     if (_CheckDie < 3000)
  864.                         startQuestTimer("check_hp", 10, npc, null, false);
  865.                     else
  866.                     {
  867.                         _OnCheck = 0;
  868.                         _CheckDie = 0;
  869.                     }
  870.                 }
  871.                 break;
  872.            
  873.             case "skill01":
  874.                 if (weakScarlet != null && !weakScarlet.isDead() && _SecondMorph == 0 && _ThirdMorph == 0 && _OnMorph == 0)
  875.                 {
  876.                     int i = Rnd.get(0, 1);
  877.                     L2Skill skill3 = SkillTable.getInstance().getInfo(SKILLS[i][0], SKILLS[i][1]);
  878.                     if (skill3 != null)
  879.                     {
  880.                         weakScarlet.stopMove(null);
  881.                         weakScarlet.setIsCastingNow(true);
  882.                         weakScarlet.doCast(skill3);
  883.                     }
  884.                     startQuestTimer("skill01", SKILLS[i][2] + 5000 + Rnd.get(10000), npc, null, false);
  885.                 }
  886.                 break;
  887.            
  888.             case "skill02":
  889.                 if (weakScarlet != null && !weakScarlet.isDead() && _SecondMorph == 1 && _ThirdMorph == 0 && _OnMorph == 0)
  890.                 {
  891.                     int i = 0;
  892.                     if (_Abnormal == 0)
  893.                         i = Rnd.get(2, 5);
  894.                     else
  895.                         i = Rnd.get(2, 4);
  896.                    
  897.                     L2Skill skill4 = SkillTable.getInstance().getInfo(SKILLS[i][0], SKILLS[i][1]);
  898.                     if (skill4 != null)
  899.                     {
  900.                         weakScarlet.stopMove(null);
  901.                         weakScarlet.setIsCastingNow(true);
  902.                         weakScarlet.doCast(skill4);
  903.                     }
  904.                     startQuestTimer("skill02", SKILLS[i][2] + 5000 + Rnd.get(10000), npc, null, false);
  905.                    
  906.                     if (i == 5)
  907.                     {
  908.                         _Abnormal = 1;
  909.                         startQuestTimer("float_effect", 4000, weakScarlet, null, false);
  910.                     }
  911.                 }
  912.                 break;
  913.            
  914.             case "skill03":
  915.                 if (strongScarlet != null && !strongScarlet.isDead() && _SecondMorph == 1 && _ThirdMorph == 1 && _OnMorph == 0)
  916.                 {
  917.                     int i = 0;
  918.                     if (_Abnormal == 0)
  919.                         i = Rnd.get(6, 10);
  920.                     else
  921.                         i = Rnd.get(6, 9);
  922.                    
  923.                     L2Skill skill5 = SkillTable.getInstance().getInfo(SKILLS[i][0], SKILLS[i][1]);
  924.                     if (skill5 != null)
  925.                     {
  926.                         strongScarlet.stopMove(null);
  927.                         strongScarlet.setIsCastingNow(true);
  928.                         strongScarlet.doCast(skill5);
  929.                     }
  930.                     startQuestTimer("skill03", SKILLS[i][2] + 5000 + Rnd.get(10000), npc, null, false);
  931.                    
  932.                     if (i == 10)
  933.                     {
  934.                         _Abnormal = 1;
  935.                         startQuestTimer("float_effect", 3000, npc, null, false);
  936.                     }
  937.                 }
  938.                 break;
  939.            
  940.             case "float_effect":
  941.                 if (npc.isCastingNow())
  942.                 {
  943.                     startQuestTimer("float_effect", 500, npc, null, false);
  944.                 }
  945.                 else
  946.                 {
  947.                     for (L2Character cha : FRINTEZZA_LAIR.getCharactersInside())
  948.                     {
  949.                         if (cha instanceof L2PcInstance)
  950.                         {
  951.                             if (cha.getFirstEffect(YOKE_OF_SCARLET) != null)
  952.                             {
  953.                                 cha.abortAttack();
  954.                                 cha.abortCast();
  955.                                 cha.disableAllSkills();
  956.                                 cha.stopMove(null);
  957.                                 cha.setIsParalyzed(true);
  958.                                 cha.setIsImmobilized(true);
  959.                                 cha.getAI().setIntention(CtrlIntention.IDLE);
  960.                                 cha.startAbnormalEffect(AbnormalEffect.FLOATING_ROOT);
  961.                             }
  962.                         }
  963.                     }
  964.                     startQuestTimer("stop_effect", 25000, npc, null, false);
  965.                 }
  966.                 break;
  967.            
  968.             case "action":
  969.                 FRINTEZZA_LAIR.broadcastPacket(new SocialAction(npc, 1));
  970.                 break;
  971.            
  972.             case "bomber":
  973.                 _Bomber = 0;
  974.                 break;
  975.            
  976.             case "room_final":
  977.                 FRINTEZZA_LAIR.broadcastPacket(new NpcSay(npc.getObjectId(), 1, npc.getNpcId(), "Exceeded his time limit, challenge failed!"));
  978.                 FRINTEZZA_LAIR.oustAllPlayers();
  979.                 cancelQuestTimers("waiting");
  980.                 cancelQuestTimers("frintezza_despawn");
  981.                 startQuestTimer("clean", 1000, npc, null, false);
  982.                 startQuestTimer("close", 1000, npc, null, false);
  983.                 startQuestTimer("room1_del", 1000, npc, null, false);
  984.                 startQuestTimer("room2_del", 1000, npc, null, false);
  985.                 GrandBossManager.getInstance().setBossStatus(FRINTEZZA, DORMANT);
  986.                 break;
  987.            
  988.             case "frintezza_despawn":
  989.                 temp = (System.currentTimeMillis() - _LastAction);
  990.                 if (temp > Config.DESPAWN_TIME_FRINTEZZA)
  991.                 {
  992.                     FRINTEZZA_LAIR.oustAllPlayers();
  993.                     cancelQuestTimers("waiting");
  994.                     cancelQuestTimers("loc_check");
  995.                     cancelQuestTimers("room_final");
  996.                     cancelQuestTimers("spawn_minion");
  997.                     startQuestTimer("clean", 1000, npc, null, false);
  998.                     startQuestTimer("close", 1000, npc, null, false);
  999.                     startQuestTimer("attack_stop", 1000, npc, null, false);
  1000.                     startQuestTimer("room1_del", 1000, npc, null, false);
  1001.                     startQuestTimer("room2_del", 1000, npc, null, false);
  1002.                     startQuestTimer("room3_del", 1000, npc, null, false);
  1003.                     startQuestTimer("minions_despawn", 1000, npc, null, false);
  1004.                     GrandBossManager.getInstance().setBossStatus(FRINTEZZA, DORMANT);
  1005.                     cancelQuestTimers("frintezza_despawn");
  1006.                 }
  1007.                 break;
  1008.            
  1009.             case "minions_despawn":
  1010.                 for (int i = 0; i < Minions.size(); i++)
  1011.                 {
  1012.                     if (Minions.get(i) != null)
  1013.                     {
  1014.                         L2Attackable mob = Minions.get(i);
  1015.                         if (mob != null)
  1016.                             mob.decayMe();
  1017.                     }
  1018.                 }
  1019.                 Minions.clear();
  1020.                 break;
  1021.            
  1022.             case "spawn_minion":
  1023.                 if (npc != null && !npc.isDead() && frintezza != null && !frintezza.isDead())
  1024.                 {
  1025.                     L2Npc mob = addSpawn(npc.getNpcId() + 2, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), false, 0, false);
  1026.                     ((L2Attackable) mob).setIsRaidMinion(true);
  1027.                     Minions.add((L2Attackable) mob);
  1028.                     startQuestTimer("action", 200, mob, null, false);
  1029.                     startQuestTimer("spawn_minion", 18000, npc, null, false);
  1030.                 }
  1031.                 break;
  1032.            
  1033.             case "spawn_cubes":
  1034.                 addSpawn(CUBE, 174232, -88020, -5114, 16384, false, 900000, false);
  1035.                 break;
  1036.            
  1037.             case "frintezza_unlock":
  1038.                 GrandBossManager.getInstance().setBossStatus(FRINTEZZA, DORMANT);
  1039.                 break;
  1040.            
  1041.             case "remove_players":
  1042.                 FRINTEZZA_LAIR.oustAllPlayers();
  1043.                 break;
  1044.         }
  1045.         return super.onAdvEvent(event, npc, player);
  1046.     }
  1047.    
  1048.     @Override
  1049.     public String onTalk(L2Npc npc, L2PcInstance player)
  1050.     {
  1051.         String htmltext = "";
  1052.         switch (npc.getNpcId())
  1053.         {
  1054.             case CUBE:
  1055.                 player.teleToLocation(150037 + Rnd.get(500), -57720 + Rnd.get(500), -2976, 0);
  1056.                 break;
  1057.         }
  1058.        
  1059.         switch (GrandBossManager.getInstance().getBossStatus(FRINTEZZA))
  1060.         {
  1061.             case DEAD:
  1062.                 htmltext = "<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>";
  1063.                 break;
  1064.            
  1065.             case DORMANT:
  1066.                 boolean party_check_success = true;
  1067.                
  1068.                 if (!player.isGM()) // GMs can enter without a party.
  1069.                 {
  1070.                     if ((!player.isInParty() || !player.getParty().isLeader(player)) || (player.getParty().getCommandChannel() == null) || (player.getParty().getCommandChannel().getLeader() != player))
  1071.                     {
  1072.                         htmltext = "<html><body>No reaction. Contact must be initiated by the Command Channel Leader.</body></html>";
  1073.                         party_check_success = false;
  1074.                     }
  1075.                     else if (player.getParty().getCommandChannel().getParties().size() < Config.FRINTEZZA_MIN_PARTIES || player.getParty().getCommandChannel().getParties().size() > Config.FRINTEZZA_MAX_PARTIES)
  1076.                     {
  1077.                         htmltext = "<html><body>Your command channel needs to have at least " + Config.FRINTEZZA_MIN_PARTIES + " parties and a maximum of " + Config.FRINTEZZA_MAX_PARTIES + ".</body></html>";
  1078.                         party_check_success = false;
  1079.                     }
  1080.                 }
  1081.                
  1082.                 if (!Config.BYPASS_FRINTEZZA_PARTIES_CHECK)
  1083.                 {
  1084.                     if ((!player.isInParty() || !player.getParty().isLeader(player)) || (player.getParty().getCommandChannel() == null) || (player.getParty().getCommandChannel().getLeader() != player))
  1085.                     {
  1086.                         htmltext = "<html><body>No reaction. Contact must be initiated by the Command Channel Leader.</body></html>";
  1087.                         party_check_success = false;
  1088.                     }
  1089.                     else if (player.getParty().getCommandChannel().getParties().size() < Config.FRINTEZZA_MIN_PARTIES || player.getParty().getCommandChannel().getParties().size() > Config.FRINTEZZA_MAX_PARTIES)
  1090.                     {
  1091.                         htmltext = "<html><body>Your command channel needs to have at least " + Config.FRINTEZZA_MIN_PARTIES + " parties and a maximum of " + Config.FRINTEZZA_MAX_PARTIES + ".</body></html>";
  1092.                         party_check_success = false;
  1093.                     }              
  1094.                 }
  1095.                
  1096.                 if (party_check_success)
  1097.                 {
  1098.                     if (player.getInventory().getItemByItemId(SCROLL) == null)
  1099.                     {
  1100.                         htmltext = "<html><body>You dont have required item.</body></html>";
  1101.                     }
  1102.                     else
  1103.                     {
  1104.                         player.destroyItemByItemId("Quest", SCROLL, 1, player, true);
  1105.                         GrandBossManager.getInstance().setBossStatus(FRINTEZZA, WAITING);
  1106.                         startQuestTimer("close", 0, npc, null, false);
  1107.                         startQuestTimer("room1_spawn", 5000, npc, null, false);
  1108.                         startQuestTimer("room_final", 2100000, null, null, false);
  1109.                         startQuestTimer("frintezza_despawn", 60000, null, null, true);
  1110.                         _LastAction = System.currentTimeMillis();
  1111.                        
  1112.                         if (Config.BYPASS_FRINTEZZA_PARTIES_CHECK)
  1113.                         {
  1114.                             if (player.getParty() != null)
  1115.                             {
  1116.                                 CommandChannel CC = player.getParty().getCommandChannel();
  1117.                                
  1118.                                 if (CC != null)
  1119.                                 { // teleport all parties into CC reb12
  1120.                                    
  1121.                                     for (Party party : CC.getParties())
  1122.                                     {
  1123.                                         if (party == null)
  1124.                                             continue;
  1125.                                        
  1126.                                         synchronized (_PlayersInside)
  1127.                                         {
  1128.                                             for (L2PcInstance member : party.getMembers())
  1129.                                             {
  1130.                                                 if (member == null || member.getLevel() < MIN_LEVEL)
  1131.                                                     continue;
  1132.                                                 if (!member.isInsideRadius(npc, 700, false, false))
  1133.                                                     continue;
  1134.                                                 if (_PlayersInside.size() > 45)
  1135.                                                 {
  1136.                                                     member.sendMessage("The number of challenges have been full, so can not enter.");
  1137.                                                     break;
  1138.                                                 }
  1139.                                                 _PlayersInside.add(member);
  1140.                                                 FRINTEZZA_LAIR.allowPlayerEntry(member, 300);
  1141.                                                 member.teleToLocation(INVADE_LOC[_LocCycle][0] + Rnd.get(50), INVADE_LOC[_LocCycle][1] + Rnd.get(50), INVADE_LOC[_LocCycle][2], 0);
  1142.                                             }
  1143.                                             if (_PlayersInside.size() > 45)
  1144.                                                 break;
  1145.                                         }
  1146.                                         _LocCycle++;
  1147.                                         if (_LocCycle >= 6)
  1148.                                             _LocCycle = 1;
  1149.                                     }
  1150.                                 }
  1151.                                 else
  1152.                                 { // teleport just actual party reb12
  1153.                                    
  1154.                                     Party party = player.getParty();
  1155.                                    
  1156.                                     for (L2PcInstance member : party.getMembers())
  1157.                                     {
  1158.                                         if (member == null || member.getLevel() < MIN_LEVEL)
  1159.                                             continue;
  1160.                                         if (!member.isInsideRadius(npc, 700, false, false))
  1161.                                             continue;
  1162.                                        
  1163.                                         synchronized (_PlayersInside)
  1164.                                         {
  1165.                                             if (_PlayersInside.size() > 45)
  1166.                                             {
  1167.                                                 member.sendMessage("The number of challenges have been full, so can not enter.");
  1168.                                                 break;
  1169.                                             }
  1170.                                             _PlayersInside.add(member);
  1171.                                         }
  1172.                                        
  1173.                                         FRINTEZZA_LAIR.allowPlayerEntry(member, 300);
  1174.                                         member.teleToLocation(INVADE_LOC[_LocCycle][0] + Rnd.get(50), INVADE_LOC[_LocCycle][1] + Rnd.get(50), INVADE_LOC[_LocCycle][2], 0);
  1175.                                     }
  1176.                                     _LocCycle++;
  1177.                                     if (_LocCycle >= 6)
  1178.                                         _LocCycle = 1;
  1179.                                 }
  1180.                             }
  1181.                             else
  1182.                             { // teleport just player reb12
  1183.                                 if (player.isInsideRadius(npc, 700, false, false))
  1184.                                 {
  1185.                                     synchronized (_PlayersInside)
  1186.                                     {
  1187.                                         _PlayersInside.add(player);
  1188.                                     }
  1189.                                     player.teleToLocation(INVADE_LOC[_LocCycle][0] + Rnd.get(50), INVADE_LOC[_LocCycle][1] + Rnd.get(50), INVADE_LOC[_LocCycle][2], 0);
  1190.                                 }
  1191.                             }
  1192.                         }
  1193.                         else
  1194.                         {
  1195.                             CommandChannel CC = player.getParty().getCommandChannel();
  1196.                             for (Party party : CC.getParties())
  1197.                             {
  1198.                                 if (party == null)
  1199.                                     continue;
  1200.                                
  1201.                                 synchronized (_PlayersInside)
  1202.                                 {
  1203.                                     for (L2PcInstance member : party.getMembers())
  1204.                                     {
  1205.                                         if (member == null || member.getLevel() < MIN_LEVEL)
  1206.                                             continue;
  1207.                                         if (!member.isInsideRadius(npc, 700, false, false))
  1208.                                             continue;
  1209.                                         if (_PlayersInside.size() > 45)
  1210.                                         {
  1211.                                             member.sendMessage("The number of challenges have been full, so can not enter.");
  1212.                                             break;
  1213.                                         }
  1214.                                         _PlayersInside.add(member);
  1215.                                         FRINTEZZA_LAIR.allowPlayerEntry(member, 300);
  1216.                                         member.teleToLocation(INVADE_LOC[_LocCycle][0] + Rnd.get(50), INVADE_LOC[_LocCycle][1] + Rnd.get(50), INVADE_LOC[_LocCycle][2], 0);
  1217.                                     }
  1218.                                     if (_PlayersInside.size() > 45)
  1219.                                         break;
  1220.                                 }
  1221.                                 _LocCycle++;
  1222.                                 if (_LocCycle >= 6)
  1223.                                     _LocCycle = 1;
  1224.                             }
  1225.                         }
  1226.                     }
  1227.                 }
  1228.                 else
  1229.                     htmltext = "<html><body>Someone else is already inside the Magic Force Field. Try again later.</body></html>";
  1230.                 break;
  1231.         }
  1232.        
  1233.         return htmltext;
  1234.     }
  1235.    
  1236.     @Override
  1237.     public String onAttack(L2Npc npc, L2PcInstance attacker, int damage, boolean isPet, L2Skill skill)
  1238.     {
  1239.         _LastAction = System.currentTimeMillis();
  1240.         int status = GrandBossManager.getInstance().getBossStatus(FRINTEZZA);
  1241.        
  1242.         switch (npc.getNpcId())
  1243.         {
  1244.             case FRINTEZZA:
  1245.                 npc.setCurrentHpMp(npc.getMaxHp(), 0);
  1246.                 break;
  1247.            
  1248.             case SCARLET1:
  1249.                 if (_SecondMorph == 0 && _ThirdMorph == 0 && _OnMorph == 0 && npc.getCurrentHp() < npc.getMaxHp() * 0.75 && status == FIGHTING)
  1250.                 {
  1251.                     startQuestTimer("attack_stop", 0, frintezza, null, false);
  1252.                     _SecondMorph = 1;
  1253.                     _OnMorph = 1;
  1254.                     startQuestTimer("stop_pc", 1000, npc, null, false);
  1255.                     startQuestTimer("stop_npc", 1000, npc, null, false);
  1256.                     startQuestTimer("morph_01", 1100, npc, null, false);
  1257.                 }
  1258.                 else if (_SecondMorph == 1 && _ThirdMorph == 0 && _OnMorph == 0 && npc.getCurrentHp() < npc.getMaxHp() * 0.5 && status == FIGHTING)
  1259.                 {
  1260.                     startQuestTimer("attack_stop", 0, frintezza, null, false);
  1261.                     _ThirdMorph = 1;
  1262.                     _OnMorph = 1;
  1263.                     startQuestTimer("stop_pc", 2000, npc, null, false);
  1264.                     startQuestTimer("stop_npc", 2000, npc, null, false);
  1265.                     startQuestTimer("morph_05a", 2000, npc, null, false);
  1266.                     startQuestTimer("morph_05", 2100, npc, null, false);
  1267.                 }
  1268.                 break;
  1269.            
  1270.             case SCARLET2:
  1271.                 if (_SecondMorph == 1 && _ThirdMorph == 1 && _OnCheck == 0 && damage >= npc.getCurrentHp() && GrandBossManager.getInstance().getBossStatus(FRINTEZZA) == FIGHTING)
  1272.                     _OnCheck = 1;
  1273.                     startQuestTimer("check_hp", 0, npc, null, false);  
  1274.                 break;
  1275.            
  1276.             case BREATH_OF_HALISHA:
  1277.             case BREATH_OF_HALISHA2:
  1278.                 if (_Bomber == 0)
  1279.                 {
  1280.                     if (npc.getCurrentHp() < npc.getMaxHp() * 0.1)
  1281.                     {
  1282.                         if (Rnd.get(100) < 30)
  1283.                         {
  1284.                             _Bomber = 1;
  1285.                             startQuestTimer("bomber", 3000, npc, null, false);                 
  1286.                             L2Skill skill2 = SkillTable.getInstance().getInfo(BOMBER_GHOST, 1);
  1287.                             if (skill2 != null)
  1288.                             {
  1289.                                 npc.doCast(skill2);
  1290.                             }
  1291.                         }
  1292.                     }
  1293.                 }
  1294.                 break;
  1295.         }
  1296.         return super.onAttack(npc, attacker, damage, isPet, skill);
  1297.     }
  1298.    
  1299.     @Override
  1300.     public String onKill(L2Npc npc, L2PcInstance killer, boolean isPet)
  1301.     {
  1302.         switch (npc.getNpcId())
  1303.         {
  1304.             case SCARLET2:
  1305.                 FRINTEZZA_LAIR.broadcastPacket(new PlaySound(1, "BS01_D", 1, npc.getObjectId(), npc.getX(), npc.getY(), npc.getZ()));
  1306.                 startQuestTimer("stop_pc", 0, null, null, false);
  1307.                 startQuestTimer("stop_npc", 0, npc, null, false);
  1308.                 startQuestTimer("morph_16", 0, npc, null, false);
  1309.                 GrandBossManager.getInstance().setBossStatus(FRINTEZZA, DEAD);
  1310.                 long respawnTime = (long) Config.SPAWN_INTERVAL_FRINTEZZA + Rnd.get(-Config.RANDOM_SPAWN_TIME_FRINTEZZA, Config.RANDOM_SPAWN_TIME_FRINTEZZA);
  1311.                 respawnTime *= 3600000;
  1312.                 cancelQuestTimers("spawn_minion");
  1313.                 cancelQuestTimers("frintezza_despawn");
  1314.                 startQuestTimer("close", 0, null, null, false);
  1315.                 startQuestTimer("rooms_del", 0, npc, null, false);
  1316.                 startQuestTimer("minions_despawn", 0, null, null, false);
  1317.                 startQuestTimer("remove_players", 900000, null, null, false);
  1318.                 startQuestTimer("frintezza_unlock", respawnTime, null, null, false);
  1319.                 StatsSet info = GrandBossManager.getInstance().getStatsSet(FRINTEZZA);
  1320.                 info.set("respawn_time", System.currentTimeMillis() + respawnTime);
  1321.                 GrandBossManager.getInstance().setStatsSet(FRINTEZZA, info);
  1322.                 break;
  1323.            
  1324.             case HALL_ALARM_DEVICE:
  1325.                 _KillHallAlarmDevice++;
  1326.                 if (_KillHallAlarmDevice == 3) // open walls reb12
  1327.                 {
  1328.                     for (int i = 25150051; i <= 25150058; i++)
  1329.                         DoorTable.getInstance().getDoor(i).openMe();
  1330.                 }
  1331.                 else if (_KillHallAlarmDevice == 4)
  1332.                 {
  1333.                     startQuestTimer("room1_del", 100, npc, null, false);
  1334.                     startQuestTimer("room2_spawn", 100, npc, null, false);
  1335.                     DoorTable.getInstance().getDoor(25150042).openMe();
  1336.                     DoorTable.getInstance().getDoor(25150043).openMe();
  1337.                 }
  1338.                 break;
  1339.            
  1340.             case DARK_CHOIR_PLAYER:
  1341.                 _KillDarkChoirPlayer++;
  1342.                 if (_KillDarkChoirPlayer == 2)
  1343.                 {
  1344.                     DoorTable.getInstance().getDoor(25150042).closeMe();
  1345.                     DoorTable.getInstance().getDoor(25150043).closeMe();
  1346.                     for (int i = 25150061; i <= 25150070; i++)
  1347.                         DoorTable.getInstance().getDoor(i).openMe();
  1348.                     startQuestTimer("room2_spawn2", 1000, npc, null, false);
  1349.                 }
  1350.                 break;
  1351.            
  1352.             case DARK_CHOIR_CAPTAIN:
  1353.                 _KillDarkChoirCaptain++;
  1354.                 if (_KillDarkChoirCaptain == 8)
  1355.                 {
  1356.                     startQuestTimer("room2_del", 100, npc, null, false);
  1357.                     DoorTable.getInstance().getDoor(25150045).openMe();
  1358.                     DoorTable.getInstance().getDoor(25150046).openMe();
  1359.                     startQuestTimer("waiting", Config.WAIT_TIME_FRINTEZZA, npc, null, false);
  1360.                     cancelQuestTimers("room_final");
  1361.                 }
  1362.                 break;
  1363.         }
  1364.         return super.onKill(npc, killer, isPet);
  1365.     }
  1366. }
Advertisement
Add Comment
Please, Sign In to add comment