View difference between Paste ID: pJa3mSiK and SHeXayS5
SHOW: | | - or go back to the newest paste.
1
### Eclipse Workspace Patch 1.0
2
#P L2JNetwork_gameserver
3
Index: java/net/sf/l2j/Config.java
4
===================================================================
5
--- java/net/sf/l2j/Config.java	(revision 5)
6
+++ java/net/sf/l2j/Config.java	(working copy)
7
@@ -550,6 +550,11 @@
8
 	public static int SPAWN_INTERVAL_FRINTEZZA;
9
 	public static int RANDOM_SPAWN_TIME_FRINTEZZA;
10
 	public static int WAIT_TIME_FRINTEZZA;
11
+	public static boolean BYPASS_FRINTEZZA_PARTIES_CHECK;
12
+	public static int FRINTEZZA_MIN_PARTIES;
13
+	public static int FRINTEZZA_MAX_PARTIES;
14
+	public static int FRINTEZZA_TIME_CHALLENGE;
15
+	public static int DESPAWN_TIME_FRINTEZZA;
16
 	
17
 	public static int SPAWN_INTERVAL_ORFEN;
18
 	public static int RANDOM_SPAWN_TIME_ORFEN;
19
@@ -1528,6 +1533,11 @@
20
 			SPAWN_INTERVAL_FRINTEZZA = npcs.getProperty("FrintezzaSpawnInterval", 48);
21
 			RANDOM_SPAWN_TIME_FRINTEZZA = npcs.getProperty("FrintezzaRandomSpawn", 8);
22
 			WAIT_TIME_FRINTEZZA = npcs.getProperty("FrintezzaWaitTime", 1) * 60000;
23
+			BYPASS_FRINTEZZA_PARTIES_CHECK = npcs.getProperty("BypassPartiesCheck", true);
24
+			FRINTEZZA_MIN_PARTIES = npcs.getProperty("FrintezzaMinParties", 4);
25
+			FRINTEZZA_MAX_PARTIES = npcs.getProperty("FrintezzaMaxParties", 5);
26
+			DESPAWN_TIME_FRINTEZZA = npcs.getProperty("FrintezzaDespawnTime", 1) * 60000;
27
+			FRINTEZZA_TIME_CHALLENGE = npcs.getProperty("FrintezzaTimeChallenge", 1) * 60000;
28
 			
29
 			SPAWN_INTERVAL_ORFEN = npcs.getProperty("OrfenSpawnInterval", 48);
30
 			RANDOM_SPAWN_TIME_ORFEN = npcs.getProperty("OrfenRandomSpawn", 20);
31
Index: java/net/sf/l2j/gameserver/model/zone/type/L2BossZone.java
32
===================================================================
33
--- java/net/sf/l2j/gameserver/model/zone/type/L2BossZone.java	(revision 5)
34
+++ java/net/sf/l2j/gameserver/model/zone/type/L2BossZone.java	(working copy)
35
@@ -24,6 +24,7 @@
36
 import net.sf.l2j.gameserver.instancemanager.GrandBossManager;
37
 import net.sf.l2j.gameserver.model.actor.L2Attackable;
38
 import net.sf.l2j.gameserver.model.actor.L2Character;
39
+import net.sf.l2j.gameserver.model.actor.L2Npc;
40
 import net.sf.l2j.gameserver.model.actor.L2Playable;
41
 import net.sf.l2j.gameserver.model.actor.L2Summon;
42
 import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
43
@@ -287,6 +288,22 @@
44
 		_playerAllowed.clear();
45
 	}
46
 	
47
+	public void updateKnownList(L2Npc npc)
48
+	{
49
+		if (_characterList == null || _characterList.isEmpty())
50
+		{
51
+			return;
52
+		}
53
+		
54
+		for (L2Character character : _characterList)
55
+		{
56
+			if (character instanceof L2PcInstance)
57
+			{
58
+				npc.getStatus().addStatusListener(character);
59
+			}
60
+		}
61
+	}
62
+	
63
 	@Override
64
 	public void onDieInside(L2Character character)
65
 	{
66
Index: java/net/sf/l2j/gameserver/scripting/scripts/ai/individual/Frintezza.java
67
===================================================================
68
--- java/net/sf/l2j/gameserver/scripting/scripts/ai/individual/Frintezza.java	(nonexistent)
69
+++ java/net/sf/l2j/gameserver/scripting/scripts/ai/individual/Frintezza.java	(working copy)
70
@@ -0,0 +1,2401 @@
71
+/*
72
+ * This program is free software: you can redistribute it and/or modify it under
73
+ * the terms of the GNU General Public License as published by the Free Software
74
+ * Foundation, either version 3 of the License, or (at your option) any later
75
+ * version.
76
+ *
77
+ * This program is distributed in the hope that it will be useful, but WITHOUT
78
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
79
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
80
+ * details.
81
+ *
82
+ * You should have received a copy of the GNU General Public License along with
83
+ * this program. If not, see <http://www.gnu.org/licenses/>.
84
+ */
85
+package net.sf.l2j.gameserver.scripting.scripts.ai.individual;
86
+
87
+import java.util.List;
88
+import java.util.concurrent.CopyOnWriteArrayList;
89
+
90
+import net.sf.l2j.Config;
91
+import net.sf.l2j.commons.random.Rnd;
92
+import net.sf.l2j.gameserver.ai.CtrlIntention;
93
+import net.sf.l2j.gameserver.datatables.DoorTable;
94
+import net.sf.l2j.gameserver.datatables.SkillTable;
95
+import net.sf.l2j.gameserver.instancemanager.GrandBossManager;
96
+import net.sf.l2j.gameserver.instancemanager.ZoneManager;
97
+import net.sf.l2j.gameserver.model.L2CommandChannel;
98
+import net.sf.l2j.gameserver.model.L2Party;
99
+import net.sf.l2j.gameserver.model.L2Skill;
100
+import net.sf.l2j.gameserver.model.actor.L2Attackable;
101
+import net.sf.l2j.gameserver.model.actor.L2Character;
102
+import net.sf.l2j.gameserver.model.actor.L2Npc;
103
+import net.sf.l2j.gameserver.model.actor.instance.L2GrandBossInstance;
104
+import net.sf.l2j.gameserver.model.actor.instance.L2MonsterInstance;
105
+import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
106
+import net.sf.l2j.gameserver.model.zone.type.L2BossZone;
107
+import net.sf.l2j.gameserver.network.SystemMessageId;
108
+import net.sf.l2j.gameserver.network.clientpackets.Say2;
109
+import net.sf.l2j.gameserver.network.serverpackets.AbstractNpcInfo.NpcInfo;
110
+import net.sf.l2j.gameserver.network.serverpackets.CreatureSay;
111
+import net.sf.l2j.gameserver.network.serverpackets.Earthquake;
112
+import net.sf.l2j.gameserver.network.serverpackets.ExShowScreenMessage;
113
+import net.sf.l2j.gameserver.network.serverpackets.MagicSkillCanceld;
114
+import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUse;
115
+import net.sf.l2j.gameserver.network.serverpackets.NpcSay;
116
+import net.sf.l2j.gameserver.network.serverpackets.PlaySound;
117
+import net.sf.l2j.gameserver.network.serverpackets.SocialAction;
118
+import net.sf.l2j.gameserver.network.serverpackets.SpecialCamera;
119
+import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;
120
+import net.sf.l2j.gameserver.scripting.scripts.ai.AbstractNpcAI;
121
+import net.sf.l2j.gameserver.skills.AbnormalEffect;
122
+import net.sf.l2j.gameserver.templates.StatsSet;
123
+
124
+/**
125
+ * @Addapted Reborn12, Dandilo, Leonardo Holanda
126
+ */
127
+public class Frintezza extends AbstractNpcAI
128
+{
129
+	// Zone
130
+	private static final L2BossZone FRINTEZZA_LAIR = ZoneManager.getInstance().getZoneById(110011, L2BossZone.class);
131
+	
132
+	// Boss, Npcs and Minios
133
+	private static final int HALL_ALARM_DEVICE = 18328;
134
+	private static final int HALL_KEEPER_CAPTAIN = 18329;
135
+	private static final int HALL_KEEPER_WIZARD = 18330;
136
+	private static final int HALL_KEEPER_GUARD = 18331;
137
+	private static final int HALL_KEEPER_PATROL = 18332;
138
+	private static final int HALL_KEEPER_SUICIDAL_SOLDIER = 18333;
139
+	private static final int DARK_CHOIR_CAPTAIN = 18334;
140
+	private static final int DARK_CHOIR_PRIMA_DONNA = 18335;
141
+	private static final int DARK_CHOIR_LANCER = 18336;
142
+	private static final int DARK_CHOIR_ARCHER = 18337;
143
+	private static final int DARK_CHOIR_WITCH_DOCTOR = 18338;
144
+	private static final int DARK_CHOIR_PLAYER = 18339;
145
+	private static final int FRINTEZZA = 29045;
146
+	private static final int SCARLET1 = 29046;
147
+	private static final int SCARLET2 = 29047;
148
+	private static final int EVIL_SPIRIT = 29048;
149
+	private static final int EVIL_SPIRIT2 = 29049;
150
+	private static final int BREATH_OF_HALISHA = 29050;
151
+	private static final int BREATH_OF_HALISHA2 = 29051;
152
+	private static final int FOLLOWER_DUMMY = 29052;
153
+	private static final int FOLLOWER_DUMMY2 = 29053;
154
+	private static final int CUBE = 29061;
155
+	private static final int GUIDE = 32011;
156
+	
157
+	// Skills
158
+	private static final int FRINTEZZA_SONGS = 5008;
159
+	private static final int BOMBER_GHOST = 5011;
160
+	private static final int DAEMON_CHARGE = 5015;
161
+	private static final int YOKE_OF_SCARLET = 5016;
162
+	private static final int DAEMON_MORPH = 5017;
163
+	private static final int DAEMON_FIELD = 5018;
164
+	private static final int DAEMON_DRAIN = 5019;
165
+	
166
+	// Item
167
+	private static final int SCROLL = 8073;
168
+	
169
+	// Misc
170
+	private static final int MIN_LEVEL = 74;
171
+	
172
+	// Frintezza Status Tracking :
173
+	private static final byte DORMANT = 0; // Frintezza is spawned and no one has entered yet. Entry is unlocked
174
+	private static final byte WAITING = 1; // Frintezza is spawend and someone has entered, triggering a 30 minute window for additional people to enter
175
+	private static final byte FIGHTING = 2; // Frintezza is engaged in battle, annihilating his foes. Entry is locked
176
+	private static final byte DEAD = 3; // Frintezza has been killed. Entry is locked
177
+	
178
+	// Variables
179
+	private static long _LastAction = 0;
180
+	private static int _Angle, _Heading, _LocCycle, _Bomber, _CheckDie, _OnCheck, _OnSong, _Abnormal, _OnMorph = 0;
181
+	private static int _Scarlet_x, _Scarlet_y, _Scarlet_z, _Scarlet_h = 0;
182
+	private static int _SecondMorph, _ThirdMorph = 0;
183
+	private static int _KillHallAlarmDevice, _KillDarkChoirPlayer, _KillDarkChoirCaptain = 0;
184
+	private L2GrandBossInstance frintezza, weakScarlet, strongScarlet, activeScarlet;
185
+	private L2MonsterInstance demon1, demon2, demon3, demon4, portrait1, portrait2, portrait3, portrait4;
186
+	private L2Npc _frintezzaDummy, _overheadDummy, _portraitDummy1, _portraitDummy3, _scarletDummy;
187
+	private static List<L2PcInstance> _PlayersInside = new CopyOnWriteArrayList<>();
188
+	private static List<L2Npc> _Room1Mobs = new CopyOnWriteArrayList<>();
189
+	private static List<L2Npc> _Room2Mobs = new CopyOnWriteArrayList<>();
190
+	private static List<L2Attackable> Minions = new CopyOnWriteArrayList<>();
191
+	
192
+	private static final int[][] INVADE_LOC =
193
+	{
194
+		{
195
+			174102,
196
+			-76039,
197
+			-5105
198
+		},
199
+		{
200
+			173235,
201
+			-76884,
202
+			-5105
203
+		},
204
+		{
205
+			175003,
206
+			-76933,
207
+			-5105
208
+		},
209
+		{
210
+			174196,
211
+			-76190,
212
+			-5105
213
+		},
214
+		{
215
+			174013,
216
+			-76120,
217
+			-5105
218
+		},
219
+		{
220
+			173263,
221
+			-75161,
222
+			-5105
223
+		}
224
+	};
225
+	
226
+	private static final int[][] SKILLS =
227
+	{
228
+		{
229
+			DAEMON_CHARGE,
230
+			1,
231
+			5000
232
+		},
233
+		{
234
+			DAEMON_CHARGE,
235
+			4,
236
+			5000
237
+		},
238
+		{
239
+			DAEMON_CHARGE,
240
+			2,
241
+			5000
242
+		},
243
+		{
244
+			DAEMON_CHARGE,
245
+			5,
246
+			5000
247
+		},
248
+		{
249
+			DAEMON_FIELD,
250
+			1,
251
+			10000
252
+		},
253
+		{
254
+			YOKE_OF_SCARLET,
255
+			1,
256
+			5000
257
+		},
258
+		{
259
+			DAEMON_CHARGE,
260
+			3,
261
+			5000
262
+		},
263
+		{
264
+			DAEMON_CHARGE,
265
+			6,
266
+			5000
267
+		},
268
+		{
269
+			DAEMON_FIELD,
270
+			2,
271
+			10000
272
+		},
273
+		{
274
+			DAEMON_DRAIN,
275
+			1,
276
+			10000
277
+		},
278
+		{
279
+			YOKE_OF_SCARLET,
280
+			1,
281
+			5000
282
+		}
283
+	};
284
+	
285
+	private static final int[][] MOBS_LOC =
286
+	{
287
+		{
288
+			HALL_ALARM_DEVICE,
289
+			172894,
290
+			-76019,
291
+			-5107,
292
+			243
293
+		},
294
+		{
295
+			HALL_ALARM_DEVICE,
296
+			174095,
297
+			-77279,
298
+			-5107,
299
+			16216
300
+		},
301
+		{
302
+			HALL_ALARM_DEVICE,
303
+			174111,
304
+			-74833,
305
+			-5107,
306
+			49043
307
+		},
308
+		{
309
+			HALL_ALARM_DEVICE,
310
+			175344,
311
+			-76042,
312
+			-5107,
313
+			32847
314
+		},
315
+		{
316
+			HALL_KEEPER_WIZARD,
317
+			173489,
318
+			-76227,
319
+			-5134,
320
+			63565
321
+		},
322
+		{
323
+			HALL_KEEPER_WIZARD,
324
+			173498,
325
+			-75724,
326
+			-5107,
327
+			58498
328
+		},
329
+		{
330
+			HALL_KEEPER_WIZARD,
331
+			174365,
332
+			-76745,
333
+			-5107,
334
+			22424
335
+		},
336
+		{
337
+			HALL_KEEPER_WIZARD,
338
+			174570,
339
+			-75584,
340
+			-5107,
341
+			31968
342
+		},
343
+		{
344
+			HALL_KEEPER_WIZARD,
345
+			174613,
346
+			-76179,
347
+			-5107,
348
+			31471
349
+		},
350
+		{
351
+			HALL_KEEPER_PATROL,
352
+			173620,
353
+			-75981,
354
+			-5107,
355
+			4588
356
+		},
357
+		{
358
+			HALL_KEEPER_PATROL,
359
+			173630,
360
+			-76340,
361
+			-5107,
362
+			62454
363
+		},
364
+		{
365
+			HALL_KEEPER_PATROL,
366
+			173755,
367
+			-75613,
368
+			-5107,
369
+			57892
370
+		},
371
+		{
372
+			HALL_KEEPER_PATROL,
373
+			173823,
374
+			-76688,
375
+			-5107,
376
+			2411
377
+		},
378
+		{
379
+			HALL_KEEPER_PATROL,
380
+			174000,
381
+			-75411,
382
+			-5107,
383
+			54718
384
+		},
385
+		{
386
+			HALL_KEEPER_PATROL,
387
+			174487,
388
+			-75555,
389
+			-5107,
390
+			33861
391
+		},
392
+		{
393
+			HALL_KEEPER_PATROL,
394
+			174517,
395
+			-76471,
396
+			-5107,
397
+			21893
398
+		},
399
+		{
400
+			HALL_KEEPER_PATROL,
401
+			174576,
402
+			-76122,
403
+			-5107,
404
+			31176
405
+		},
406
+		{
407
+			HALL_KEEPER_PATROL,
408
+			174600,
409
+			-75841,
410
+			-5134,
411
+			35927
412
+		},
413
+		{
414
+			HALL_KEEPER_CAPTAIN,
415
+			173481,
416
+			-76043,
417
+			-5107,
418
+			61312
419
+		},
420
+		{
421
+			HALL_KEEPER_CAPTAIN,
422
+			173539,
423
+			-75678,
424
+			-5107,
425
+			59524
426
+		},
427
+		{
428
+			HALL_KEEPER_CAPTAIN,
429
+			173584,
430
+			-76386,
431
+			-5107,
432
+			3041
433
+		},
434
+		{
435
+			HALL_KEEPER_CAPTAIN,
436
+			173773,
437
+			-75420,
438
+			-5107,
439
+			51115
440
+		},
441
+		{
442
+			HALL_KEEPER_CAPTAIN,
443
+			173777,
444
+			-76650,
445
+			-5107,
446
+			12588
447
+		},
448
+		{
449
+			HALL_KEEPER_CAPTAIN,
450
+			174585,
451
+			-76510,
452
+			-5107,
453
+			21704
454
+		},
455
+		{
456
+			HALL_KEEPER_CAPTAIN,
457
+			174623,
458
+			-75571,
459
+			-5107,
460
+			40141
461
+		},
462
+		{
463
+			HALL_KEEPER_CAPTAIN,
464
+			174744,
465
+			-76240,
466
+			-5107,
467
+			29202
468
+		},
469
+		{
470
+			HALL_KEEPER_CAPTAIN,
471
+			174769,
472
+			-75895,
473
+			-5107,
474
+			29572
475
+		},
476
+		{
477
+			HALL_KEEPER_SUICIDAL_SOLDIER,
478
+			173861,
479
+			-76011,
480
+			-5107,
481
+			383
482
+		},
483
+		{
484
+			HALL_KEEPER_SUICIDAL_SOLDIER,
485
+			173872,
486
+			-76461,
487
+			-5107,
488
+			8041
489
+		},
490
+		{
491
+			HALL_KEEPER_SUICIDAL_SOLDIER,
492
+			173898,
493
+			-75668,
494
+			-5107,
495
+			51856
496
+		},
497
+		{
498
+			HALL_KEEPER_SUICIDAL_SOLDIER,
499
+			174422,
500
+			-75689,
501
+			-5107,
502
+			42878
503
+		},
504
+		{
505
+			HALL_KEEPER_SUICIDAL_SOLDIER,
506
+			174460,
507
+			-76355,
508
+			-5107,
509
+			27311
510
+		},
511
+		{
512
+			HALL_KEEPER_SUICIDAL_SOLDIER,
513
+			174483,
514
+			-76041,
515
+			-5107,
516
+			30947
517
+		},
518
+		{
519
+			HALL_KEEPER_GUARD,
520
+			173515,
521
+			-76184,
522
+			-5107,
523
+			6971
524
+		},
525
+		{
526
+			HALL_KEEPER_GUARD,
527
+			173516,
528
+			-75790,
529
+			-5134,
530
+			3142
531
+		},
532
+		{
533
+			HALL_KEEPER_GUARD,
534
+			173696,
535
+			-76675,
536
+			-5107,
537
+			6757
538
+		},
539
+		{
540
+			HALL_KEEPER_GUARD,
541
+			173766,
542
+			-75502,
543
+			-5134,
544
+			60827
545
+		},
546
+		{
547
+			HALL_KEEPER_GUARD,
548
+			174473,
549
+			-75321,
550
+			-5107,
551
+			37147
552
+		},
553
+		{
554
+			HALL_KEEPER_GUARD,
555
+			174493,
556
+			-76505,
557
+			-5107,
558
+			34503
559
+		},
560
+		{
561
+			HALL_KEEPER_GUARD,
562
+			174568,
563
+			-75654,
564
+			-5134,
565
+			41661
566
+		},
567
+		{
568
+			HALL_KEEPER_GUARD,
569
+			174584,
570
+			-76263,
571
+			-5107,
572
+			31729
573
+		},
574
+		{
575
+			DARK_CHOIR_PLAYER,
576
+			173892,
577
+			-81592,
578
+			-5123,
579
+			50849
580
+		},
581
+		{
582
+			DARK_CHOIR_PLAYER,
583
+			173958,
584
+			-81820,
585
+			-5123,
586
+			7459
587
+		},
588
+		{
589
+			DARK_CHOIR_PLAYER,
590
+			174128,
591
+			-81805,
592
+			-5150,
593
+			21495
594
+		},
595
+		{
596
+			DARK_CHOIR_PLAYER,
597
+			174245,
598
+			-81566,
599
+			-5123,
600
+			41760
601
+		},
602
+		{
603
+			DARK_CHOIR_CAPTAIN,
604
+			173264,
605
+			-81529,
606
+			-5072,
607
+			1646
608
+		},
609
+		{
610
+			DARK_CHOIR_CAPTAIN,
611
+			173265,
612
+			-81656,
613
+			-5072,
614
+			441
615
+		},
616
+		{
617
+			DARK_CHOIR_CAPTAIN,
618
+			173267,
619
+			-81889,
620
+			-5072,
621
+			0
622
+		},
623
+		{
624
+			DARK_CHOIR_CAPTAIN,
625
+			173271,
626
+			-82015,
627
+			-5072,
628
+			65382
629
+		},
630
+		{
631
+			DARK_CHOIR_CAPTAIN,
632
+			174867,
633
+			-81655,
634
+			-5073,
635
+			32537
636
+		},
637
+		{
638
+			DARK_CHOIR_CAPTAIN,
639
+			174868,
640
+			-81890,
641
+			-5073,
642
+			32768
643
+		},
644
+		{
645
+			DARK_CHOIR_CAPTAIN,
646
+			174869,
647
+			-81485,
648
+			-5073,
649
+			32315
650
+		},
651
+		{
652
+			DARK_CHOIR_CAPTAIN,
653
+			174871,
654
+			-82017,
655
+			-5073,
656
+			33007
657
+		},
658
+		{
659
+			DARK_CHOIR_PRIMA_DONNA,
660
+			173074,
661
+			-80817,
662
+			-5107,
663
+			8353
664
+		},
665
+		{
666
+			DARK_CHOIR_PRIMA_DONNA,
667
+			173128,
668
+			-82702,
669
+			-5107,
670
+			5345
671
+		},
672
+		{
673
+			DARK_CHOIR_PRIMA_DONNA,
674
+			173181,
675
+			-82544,
676
+			-5107,
677
+			65135
678
+		},
679
+		{
680
+			DARK_CHOIR_PRIMA_DONNA,
681
+			173191,
682
+			-80981,
683
+			-5107,
684
+			6947
685
+		},
686
+		{
687
+			DARK_CHOIR_PRIMA_DONNA,
688
+			174859,
689
+			-80889,
690
+			-5134,
691
+			24103
692
+		},
693
+		{
694
+			DARK_CHOIR_PRIMA_DONNA,
695
+			174924,
696
+			-82666,
697
+			-5107,
698
+			38710
699
+		},
700
+		{
701
+			DARK_CHOIR_PRIMA_DONNA,
702
+			174947,
703
+			-80733,
704
+			-5107,
705
+			22449
706
+		},
707
+		{
708
+			DARK_CHOIR_PRIMA_DONNA,
709
+			175096,
710
+			-82724,
711
+			-5107,
712
+			42205
713
+		},
714
+		{
715
+			DARK_CHOIR_LANCER,
716
+			173435,
717
+			-80512,
718
+			-5107,
719
+			65215
720
+		},
721
+		{
722
+			DARK_CHOIR_LANCER,
723
+			173440,
724
+			-82948,
725
+			-5107,
726
+			417
727
+		},
728
+		{
729
+			DARK_CHOIR_LANCER,
730
+			173443,
731
+			-83120,
732
+			-5107,
733
+			1094
734
+		},
735
+		{
736
+			DARK_CHOIR_LANCER,
737
+			173463,
738
+			-83064,
739
+			-5107,
740
+			286
741
+		},
742
+		{
743
+			DARK_CHOIR_LANCER,
744
+			173465,
745
+			-80453,
746
+			-5107,
747
+			174
748
+		},
749
+		{
750
+			DARK_CHOIR_LANCER,
751
+			173465,
752
+			-83006,
753
+			-5107,
754
+			2604
755
+		},
756
+		{
757
+			DARK_CHOIR_LANCER,
758
+			173468,
759
+			-82889,
760
+			-5107,
761
+			316
762
+		},
763
+		{
764
+			DARK_CHOIR_LANCER,
765
+			173469,
766
+			-80570,
767
+			-5107,
768
+			65353
769
+		},
770
+		{
771
+			DARK_CHOIR_LANCER,
772
+			173469,
773
+			-80628,
774
+			-5107,
775
+			166
776
+		},
777
+		{
778
+			DARK_CHOIR_LANCER,
779
+			173492,
780
+			-83121,
781
+			-5107,
782
+			394
783
+		},
784
+		{
785
+			DARK_CHOIR_LANCER,
786
+			173493,
787
+			-80683,
788
+			-5107,
789
+			0
790
+		},
791
+		{
792
+			DARK_CHOIR_LANCER,
793
+			173497,
794
+			-80510,
795
+			-5134,
796
+			417
797
+		},
798
+		{
799
+			DARK_CHOIR_LANCER,
800
+			173499,
801
+			-82947,
802
+			-5107,
803
+			0
804
+		},
805
+		{
806
+			DARK_CHOIR_LANCER,
807
+			173521,
808
+			-83063,
809
+			-5107,
810
+			316
811
+		},
812
+		{
813
+			DARK_CHOIR_LANCER,
814
+			173523,
815
+			-82889,
816
+			-5107,
817
+			128
818
+		},
819
+		{
820
+			DARK_CHOIR_LANCER,
821
+			173524,
822
+			-80627,
823
+			-5134,
824
+			65027
825
+		},
826
+		{
827
+			DARK_CHOIR_LANCER,
828
+			173524,
829
+			-83007,
830
+			-5107,
831
+			0
832
+		},
833
+		{
834
+			DARK_CHOIR_LANCER,
835
+			173526,
836
+			-80452,
837
+			-5107,
838
+			64735
839
+		},
840
+		{
841
+			DARK_CHOIR_LANCER,
842
+			173527,
843
+			-80569,
844
+			-5134,
845
+			65062
846
+		},
847
+		{
848
+			DARK_CHOIR_LANCER,
849
+			174602,
850
+			-83122,
851
+			-5107,
852
+			33104
853
+		},
854
+		{
855
+			DARK_CHOIR_LANCER,
856
+			174604,
857
+			-82949,
858
+			-5107,
859
+			33184
860
+		},
861
+		{
862
+			DARK_CHOIR_LANCER,
863
+			174609,
864
+			-80514,
865
+			-5107,
866
+			33234
867
+		},
868
+		{
869
+			DARK_CHOIR_LANCER,
870
+			174609,
871
+			-80684,
872
+			-5107,
873
+			32851
874
+		},
875
+		{
876
+			DARK_CHOIR_LANCER,
877
+			174629,
878
+			-80627,
879
+			-5107,
880
+			33346
881
+		},
882
+		{
883
+			DARK_CHOIR_LANCER,
884
+			174632,
885
+			-80570,
886
+			-5107,
887
+			32896
888
+		},
889
+		{
890
+			DARK_CHOIR_LANCER,
891
+			174632,
892
+			-83066,
893
+			-5107,
894
+			32768
895
+		},
896
+		{
897
+			DARK_CHOIR_LANCER,
898
+			174635,
899
+			-82893,
900
+			-5107,
901
+			33594
902
+		},
903
+		{
904
+			DARK_CHOIR_LANCER,
905
+			174636,
906
+			-80456,
907
+			-5107,
908
+			32065
909
+		},
910
+		{
911
+			DARK_CHOIR_LANCER,
912
+			174639,
913
+			-83008,
914
+			-5107,
915
+			33057
916
+		},
917
+		{
918
+			DARK_CHOIR_LANCER,
919
+			174660,
920
+			-80512,
921
+			-5107,
922
+			33057
923
+		},
924
+		{
925
+			DARK_CHOIR_LANCER,
926
+			174661,
927
+			-83121,
928
+			-5107,
929
+			32768
930
+		},
931
+		{
932
+			DARK_CHOIR_LANCER,
933
+			174663,
934
+			-82948,
935
+			-5107,
936
+			32768
937
+		},
938
+		{
939
+			DARK_CHOIR_LANCER,
940
+			174664,
941
+			-80685,
942
+			-5107,
943
+			32676
944
+		},
945
+		{
946
+			DARK_CHOIR_LANCER,
947
+			174687,
948
+			-83008,
949
+			-5107,
950
+			32520
951
+		},
952
+		{
953
+			DARK_CHOIR_LANCER,
954
+			174691,
955
+			-83066,
956
+			-5107,
957
+			32961
958
+		},
959
+		{
960
+			DARK_CHOIR_LANCER,
961
+			174692,
962
+			-80455,
963
+			-5107,
964
+			33202
965
+		},
966
+		{
967
+			DARK_CHOIR_LANCER,
968
+			174692,
969
+			-80571,
970
+			-5107,
971
+			32768
972
+		},
973
+		{
974
+			DARK_CHOIR_LANCER,
975
+			174693,
976
+			-80630,
977
+			-5107,
978
+			32994
979
+		},
980
+		{
981
+			DARK_CHOIR_LANCER,
982
+			174693,
983
+			-82889,
984
+			-5107,
985
+			32622
986
+		},
987
+		{
988
+			DARK_CHOIR_ARCHER,
989
+			172837,
990
+			-82382,
991
+			-5107,
992
+			58363
993
+		},
994
+		{
995
+			DARK_CHOIR_ARCHER,
996
+			172867,
997
+			-81123,
998
+			-5107,
999
+			64055
1000
+		},
1001
+		{
1002
+			DARK_CHOIR_ARCHER,
1003
+			172883,
1004
+			-82495,
1005
+			-5107,
1006
+			64764
1007
+		},
1008
+		{
1009
+			DARK_CHOIR_ARCHER,
1010
+			172916,
1011
+			-81033,
1012
+			-5107,
1013
+			7099
1014
+		},
1015
+		{
1016
+			DARK_CHOIR_ARCHER,
1017
+			172940,
1018
+			-82325,
1019
+			-5107,
1020
+			58998
1021
+		},
1022
+		{
1023
+			DARK_CHOIR_ARCHER,
1024
+			172946,
1025
+			-82435,
1026
+			-5107,
1027
+			58038
1028
+		},
1029
+		{
1030
+			DARK_CHOIR_ARCHER,
1031
+			172971,
1032
+			-81198,
1033
+			-5107,
1034
+			14768
1035
+		},
1036
+		{
1037
+			DARK_CHOIR_ARCHER,
1038
+			172992,
1039
+			-81091,
1040
+			-5107,
1041
+			9438
1042
+		},
1043
+		{
1044
+			DARK_CHOIR_ARCHER,
1045
+			173032,
1046
+			-82365,
1047
+			-5107,
1048
+			59041
1049
+		},
1050
+		{
1051
+			DARK_CHOIR_ARCHER,
1052
+			173064,
1053
+			-81125,
1054
+			-5107,
1055
+			5827
1056
+		},
1057
+		{
1058
+			DARK_CHOIR_ARCHER,
1059
+			175014,
1060
+			-81173,
1061
+			-5107,
1062
+			26398
1063
+		},
1064
+		{
1065
+			DARK_CHOIR_ARCHER,
1066
+			175061,
1067
+			-82374,
1068
+			-5107,
1069
+			43290
1070
+		},
1071
+		{
1072
+			DARK_CHOIR_ARCHER,
1073
+			175096,
1074
+			-81080,
1075
+			-5107,
1076
+			24719
1077
+		},
1078
+		{
1079
+			DARK_CHOIR_ARCHER,
1080
+			175169,
1081
+			-82453,
1082
+			-5107,
1083
+			37672
1084
+		},
1085
+		{
1086
+			DARK_CHOIR_ARCHER,
1087
+			175172,
1088
+			-80972,
1089
+			-5107,
1090
+			32315
1091
+		},
1092
+		{
1093
+			DARK_CHOIR_ARCHER,
1094
+			175174,
1095
+			-82328,
1096
+			-5107,
1097
+			41760
1098
+		},
1099
+		{
1100
+			DARK_CHOIR_ARCHER,
1101
+			175197,
1102
+			-81157,
1103
+			-5107,
1104
+			27617
1105
+		},
1106
+		{
1107
+			DARK_CHOIR_ARCHER,
1108
+			175245,
1109
+			-82547,
1110
+			-5107,
1111
+			40275
1112
+		},
1113
+		{
1114
+			DARK_CHOIR_ARCHER,
1115
+			175249,
1116
+			-81075,
1117
+			-5107,
1118
+			28435
1119
+		},
1120
+		{
1121
+			DARK_CHOIR_ARCHER,
1122
+			175292,
1123
+			-82432,
1124
+			-5107,
1125
+			42225
1126
+		},
1127
+		{
1128
+			DARK_CHOIR_WITCH_DOCTOR,
1129
+			173014,
1130
+			-82628,
1131
+			-5107,
1132
+			11874
1133
+		},
1134
+		{
1135
+			DARK_CHOIR_WITCH_DOCTOR,
1136
+			173033,
1137
+			-80920,
1138
+			-5107,
1139
+			10425
1140
+		},
1141
+		{
1142
+			DARK_CHOIR_WITCH_DOCTOR,
1143
+			173095,
1144
+			-82520,
1145
+			-5107,
1146
+			49152
1147
+		},
1148
+		{
1149
+			DARK_CHOIR_WITCH_DOCTOR,
1150
+			173115,
1151
+			-80986,
1152
+			-5107,
1153
+			9611
1154
+		},
1155
+		{
1156
+			DARK_CHOIR_WITCH_DOCTOR,
1157
+			173144,
1158
+			-80894,
1159
+			-5107,
1160
+			5345
1161
+		},
1162
+		{
1163
+			DARK_CHOIR_WITCH_DOCTOR,
1164
+			173147,
1165
+			-82602,
1166
+			-5107,
1167
+			51316
1168
+		},
1169
+		{
1170
+			DARK_CHOIR_WITCH_DOCTOR,
1171
+			174912,
1172
+			-80825,
1173
+			-5107,
1174
+			24270
1175
+		},
1176
+		{
1177
+			DARK_CHOIR_WITCH_DOCTOR,
1178
+			174935,
1179
+			-80899,
1180
+			-5107,
1181
+			18061
1182
+		},
1183
+		{
1184
+			DARK_CHOIR_WITCH_DOCTOR,
1185
+			175016,
1186
+			-82697,
1187
+			-5107,
1188
+			39533
1189
+		},
1190
+		{
1191
+			DARK_CHOIR_WITCH_DOCTOR,
1192
+			175041,
1193
+			-80834,
1194
+			-5107,
1195
+			25420
1196
+		},
1197
+		{
1198
+			DARK_CHOIR_WITCH_DOCTOR,
1199
+			175071,
1200
+			-82549,
1201
+			-5107,
1202
+			39163
1203
+		},
1204
+		{
1205
+			DARK_CHOIR_WITCH_DOCTOR,
1206
+			175154,
1207
+			-82619,
1208
+			-5107,
1209
+			36345
1210
+		}
1211
+	};
1212
+	
1213
+	// Boss: Frintezza
1214
+	public Frintezza()
1215
+	{
1216
+		super("ai/individual");
1217
+		addStartNpc(GUIDE, CUBE);
1218
+		addTalkId(GUIDE, CUBE);
1219
+		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);
1220
+		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);
1221
+		
1222
+		StatsSet info = GrandBossManager.getInstance().getStatsSet(FRINTEZZA);
1223
+		int status = GrandBossManager.getInstance().getBossStatus(FRINTEZZA);
1224
+		if (status == DEAD)
1225
+		{
1226
+			long temp = (info.getLong("respawn_time") - System.currentTimeMillis());
1227
+			if (temp > 0)
1228
+				startQuestTimer("frintezza_unlock", temp, null, null, false);
1229
+			else
1230
+				GrandBossManager.getInstance().setBossStatus(FRINTEZZA, DORMANT);
1231
+		}
1232
+		else if (status != DORMANT)
1233
+			GrandBossManager.getInstance().setBossStatus(FRINTEZZA, DORMANT);
1234
+		
1235
+		// tempfix for messed door cords
1236
+		for (int i = 0; i < 8; i++)
1237
+			DoorTable.getInstance().getDoor(25150051 + i);
1238
+	}
1239
+	
1240
+	@Override
1241
+	public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
1242
+	{
1243
+		long temp = 0;
1244
+		
1245
+		switch (event)
1246
+		{
1247
+			case "waiting":
1248
+				startQuestTimer("close", 27000, npc, null, false);
1249
+				startQuestTimer("camera_1", 30000, npc, null, false);
1250
+				FRINTEZZA_LAIR.broadcastPacket(new Earthquake(174232, -88020, -5116, 45, 27));
1251
+				break;
1252
+			
1253
+			case "room1_spawn":
1254
+				CreatureSay cs = new CreatureSay(0, Say2.SHOUT, "Hall Alarm Device", "Intruders! Sound the alarm!");
1255
+				FRINTEZZA_LAIR.broadcastPacket(cs);
1256
+				for (int i = 0; i <= 17; i++)
1257
+				{
1258
+					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);
1259
+					_Room1Mobs.add(mob);
1260
+				}
1261
+				break;
1262
+			
1263
+			case "room1_spawn2":
1264
+				for (int i = 18; i <= 26; i++)
1265
+				{
1266
+					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);
1267
+					_Room1Mobs.add(mob);
1268
+				}
1269
+				break;
1270
+			
1271
+			case "room1_spawn3":
1272
+				for (int i = 27; i <= 32; i++)
1273
+				{
1274
+					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);
1275
+					_Room1Mobs.add(mob);
1276
+				}
1277
+				break;
1278
+			
1279
+			case "room1_spawn4":
1280
+				for (int i = 33; i <= 40; i++)
1281
+				{
1282
+					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);
1283
+					_Room1Mobs.add(mob);
1284
+				}
1285
+				break;
1286
+			
1287
+			case "room2_spawn":
1288
+				for (int i = 41; i <= 44; i++)
1289
+				{
1290
+					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);
1291
+					_Room2Mobs.add(mob);
1292
+				}
1293
+				break;
1294
+			
1295
+			case "room2_spawn2":
1296
+				for (int i = 45; i <= 131; i++)
1297
+				{
1298
+					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);
1299
+					_Room2Mobs.add(mob);
1300
+				}
1301
+				break;
1302
+			
1303
+			case "room1_del":
1304
+				for (L2Npc mob : _Room1Mobs)
1305
+				{
1306
+					if (mob != null)
1307
+						mob.deleteMe();
1308
+				}
1309
+				_Room1Mobs.clear();
1310
+				break;
1311
+			
1312
+			case "room2_del":
1313
+				for (L2Npc mob : _Room2Mobs)
1314
+				{
1315
+					if (mob != null)
1316
+						mob.deleteMe();
1317
+				}
1318
+				_Room2Mobs.clear();
1319
+				break;
1320
+			
1321
+			case "room3_del":
1322
+				if (demon1 != null)
1323
+					demon1.deleteMe();
1324
+				if (demon2 != null)
1325
+					demon2.deleteMe();
1326
+				if (demon3 != null)
1327
+					demon3.deleteMe();
1328
+				if (demon4 != null)
1329
+					demon4.deleteMe();
1330
+				if (portrait1 != null)
1331
+					portrait1.deleteMe();
1332
+				if (portrait2 != null)
1333
+					portrait2.deleteMe();
1334
+				if (portrait3 != null)
1335
+					portrait3.deleteMe();
1336
+				if (portrait4 != null)
1337
+					portrait4.deleteMe();
1338
+				if (frintezza != null)
1339
+					frintezza.deleteMe();
1340
+				if (weakScarlet != null)
1341
+					weakScarlet.deleteMe();
1342
+				if (strongScarlet != null)
1343
+					strongScarlet.deleteMe();
1344
+				
1345
+				demon1 = null;
1346
+				demon2 = null;
1347
+				demon3 = null;
1348
+				demon4 = null;
1349
+				portrait1 = null;
1350
+				portrait2 = null;
1351
+				portrait3 = null;
1352
+				portrait4 = null;
1353
+				frintezza = null;
1354
+				weakScarlet = null;
1355
+				strongScarlet = null;
1356
+				activeScarlet = null;
1357
+				break;
1358
+			
1359
+			case "clean":
1360
+				_LastAction = 0;
1361
+				_LocCycle = 0;
1362
+				_CheckDie = 0;
1363
+				_OnCheck = 0;
1364
+				_Abnormal = 0;
1365
+				_OnMorph = 0;
1366
+				_SecondMorph = 0;
1367
+				_ThirdMorph = 0;
1368
+				_KillHallAlarmDevice = 0;
1369
+				_KillDarkChoirPlayer = 0;
1370
+				_KillDarkChoirCaptain = 0;
1371
+				_PlayersInside.clear();
1372
+				break;
1373
+			
1374
+			case "close":
1375
+				for (int i = 25150051; i <= 25150058; i++)
1376
+					DoorTable.getInstance().getDoor(i).closeMe();
1377
+				for (int i = 25150061; i <= 25150070; i++)
1378
+					DoorTable.getInstance().getDoor(i).closeMe();
1379
+				
1380
+				DoorTable.getInstance().getDoor(25150042).closeMe();
1381
+				DoorTable.getInstance().getDoor(25150043).closeMe();
1382
+				DoorTable.getInstance().getDoor(25150045).closeMe();
1383
+				DoorTable.getInstance().getDoor(25150046).closeMe();
1384
+				break;
1385
+			
1386
+			case "loc_check":
1387
+				switch (GrandBossManager.getInstance().getBossStatus(FRINTEZZA))
1388
+				{
1389
+					case FIGHTING:
1390
+						if (!FRINTEZZA_LAIR.isInsideZone(npc))
1391
+							npc.teleToLocation(174232, -88020, -5116, 0);
1392
+						if (npc.getX() < 171932 || npc.getX() > 176532 || npc.getY() < -90320 || npc.getY() > -85720 || npc.getZ() < -5130)
1393
+							npc.teleToLocation(174232, -88020, -5116, 0);
1394
+						break;
1395
+				}
1396
+				break;
1397
+			
1398
+			case "camera_1":
1399
+				GrandBossManager.getInstance().setBossStatus(FRINTEZZA, FIGHTING);
1400
+				_frintezzaDummy = addSpawn(FOLLOWER_DUMMY, 174240, -89805, -5022, 16048, false, 0, false);
1401
+				_frintezzaDummy.setIsInvul(true);
1402
+				_frintezzaDummy.setIsImmobilized(true);
1403
+				_overheadDummy = addSpawn(FOLLOWER_DUMMY, 174232, -88020, -5110, 16384, false, 0, false);
1404
+				_overheadDummy.setIsInvul(true);
1405
+				_overheadDummy.setIsImmobilized(true);
1406
+				_overheadDummy.setCollisionHeight(600);
1407
+				FRINTEZZA_LAIR.broadcastPacket(new NpcInfo(_overheadDummy, null));
1408
+				_portraitDummy1 = addSpawn(FOLLOWER_DUMMY, 172450, -87890, -5100, 16048, false, 0, false);
1409
+				_portraitDummy1.setIsImmobilized(true);
1410
+				_portraitDummy1.setIsInvul(true);
1411
+				_portraitDummy3 = addSpawn(FOLLOWER_DUMMY, 176012, -87890, -5100, 16048, false, 0, false);
1412
+				_portraitDummy3.setIsImmobilized(true);
1413
+				_portraitDummy3.setIsInvul(true);
1414
+				_scarletDummy = addSpawn(FOLLOWER_DUMMY2, 174232, -88020, -5110, 16384, false, 0, false);
1415
+				_scarletDummy.setIsInvul(true);
1416
+				_scarletDummy.setIsImmobilized(true);
1417
+				startQuestTimer("stop_pc", 0, npc, null, false);
1418
+				startQuestTimer("camera_2", 1000, _overheadDummy, null, false);
1419
+				break;
1420
+			
1421
+			case "camera_2":
1422
+				FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(_overheadDummy.getObjectId(), 0, 75, -89, 0, 100, 0, 0, 1, 0));
1423
+				startQuestTimer("camera_2b", 0, _overheadDummy, null, false);
1424
+				break;
1425
+			
1426
+			case "camera_2b":
1427
+				FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(_overheadDummy.getObjectId(), 0, 75, -89, 0, 100, 0, 0, 1, 0));
1428
+				startQuestTimer("camera_3", 0, _overheadDummy, null, false);
1429
+				break;
1430
+			
1431
+			case "camera_3":
1432
+				FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(_overheadDummy.getObjectId(), 300, 90, -10, 6500, 7000, 0, 0, 1, 0));
1433
+				frintezza = (L2GrandBossInstance) addSpawn(FRINTEZZA, 174240, -89805, -5022, 16048, false, 0, false);
1434
+				GrandBossManager.getInstance().addBoss(frintezza);
1435
+				frintezza.setIsImmobilized(true);
1436
+				frintezza.setIsInvul(true);
1437
+				frintezza.disableAllSkills();
1438
+				FRINTEZZA_LAIR.updateKnownList(frintezza);
1439
+				demon2 = (L2MonsterInstance) addSpawn(29051, 175876, -88713, -5100, 28205, false, 0, false);
1440
+				demon2.setIsImmobilized(true);
1441
+				demon2.disableAllSkills();
1442
+				FRINTEZZA_LAIR.updateKnownList(demon2);
1443
+				demon3 = (L2MonsterInstance) addSpawn(29051, 172608, -88702, -5100, 64817, false, 0, false);
1444
+				demon3.setIsImmobilized(true);
1445
+				demon3.disableAllSkills();
1446
+				FRINTEZZA_LAIR.updateKnownList(demon3);
1447
+				demon1 = (L2MonsterInstance) addSpawn(29050, 175833, -87165, -5100, 35048, false, 0, false);
1448
+				demon1.setIsImmobilized(true);
1449
+				demon1.disableAllSkills();
1450
+				FRINTEZZA_LAIR.updateKnownList(demon1);
1451
+				demon4 = (L2MonsterInstance) addSpawn(29050, 172634, -87165, -5100, 57730, false, 0, false);
1452
+				demon4.setIsImmobilized(true);
1453
+				demon4.disableAllSkills();
1454
+				FRINTEZZA_LAIR.updateKnownList(demon4);
1455
+				startQuestTimer("camera_4", 6500, _overheadDummy, null, false);
1456
+				break;
1457
+			
1458
+			case "camera_4":
1459
+				FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(_frintezzaDummy.getObjectId(), 1800, 90, 8, 6500, 7000, 0, 0, 1, 0));
1460
+				startQuestTimer("camera_5", 900, _frintezzaDummy, null, false);
1461
+				break;
1462
+			
1463
+			case "camera_5":
1464
+				FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(_frintezzaDummy.getObjectId(), 140, 90, 10, 2500, 4500, 0, 0, 1, 0));
1465
+				startQuestTimer("camera_5b", 4000, _frintezzaDummy, null, false);
1466
+				break;
1467
+			
1468
+			case "camera_5b":
1469
+				FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 40, 75, -10, 0, 1000, 0, 0, 1, 0));
1470
+				startQuestTimer("camera_6", 0, frintezza, null, false);
1471
+				break;
1472
+			
1473
+			case "camera_6":
1474
+				FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 40, 75, -10, 0, 12000, 0, 0, 1, 0));
1475
+				startQuestTimer("camera_7", 1350, frintezza, null, false);
1476
+				break;
1477
+			
1478
+			case "camera_7":
1479
+				FRINTEZZA_LAIR.broadcastPacket(new SocialAction(frintezza, 2));
1480
+				startQuestTimer("camera_8", 7000, frintezza, null, false);
1481
+				break;
1482
+			
1483
+			case "camera_8":
1484
+				startQuestTimer("camera_9", 1000, frintezza, null, false);
1485
+				_frintezzaDummy.deleteMe();
1486
+				_frintezzaDummy = null;
1487
+				break;
1488
+			
1489
+			case "camera_9":
1490
+				FRINTEZZA_LAIR.broadcastPacket(new SocialAction(demon2, 1));
1491
+				FRINTEZZA_LAIR.broadcastPacket(new SocialAction(demon3, 1));
1492
+				startQuestTimer("camera_9b", 400, frintezza, null, false);
1493
+				break;
1494
+			
1495
+			case "camera_9b":
1496
+				FRINTEZZA_LAIR.broadcastPacket(new SocialAction(demon1, 1));
1497
+				FRINTEZZA_LAIR.broadcastPacket(new SocialAction(demon4, 1));
1498
+				for (L2Character pc : FRINTEZZA_LAIR.getCharactersInside())
1499
+				{
1500
+					if (pc instanceof L2PcInstance)
1501
+						if (pc.getX() < 174232)
1502
+							pc.broadcastPacket(new SpecialCamera(_portraitDummy1.getObjectId(), 1000, 118, 0, 0, 1000, 0, 0, 1, 0));
1503
+						else
1504
+							pc.broadcastPacket(new SpecialCamera(_portraitDummy3.getObjectId(), 1000, 62, 0, 0, 1000, 0, 0, 1, 0));
1505
+				}
1506
+				startQuestTimer("camera_9c", 0, frintezza, null, false);
1507
+				break;
1508
+			
1509
+			case "camera_9c":
1510
+				for (L2Character pc : FRINTEZZA_LAIR.getCharactersInside())
1511
+				{
1512
+					if (pc instanceof L2PcInstance)
1513
+						if (pc.getX() < 174232)
1514
+							pc.broadcastPacket(new SpecialCamera(_portraitDummy1.getObjectId(), 1000, 118, 0, 0, 10000, 0, 0, 1, 0));
1515
+						else
1516
+							pc.broadcastPacket(new SpecialCamera(_portraitDummy3.getObjectId(), 1000, 62, 0, 0, 10000, 0, 0, 1, 0));
1517
+				}
1518
+				startQuestTimer("camera_10", 2000, frintezza, null, false);
1519
+				break;
1520
+			
1521
+			case "camera_10":
1522
+				FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 240, 90, 0, 0, 1000, 0, 0, 1, 0));
1523
+				startQuestTimer("camera_11", 0, frintezza, null, false);
1524
+				break;
1525
+			
1526
+			case "camera_11":
1527
+				FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 240, 90, 25, 5500, 10000, 0, 0, 1, 0));
1528
+				FRINTEZZA_LAIR.broadcastPacket(new SocialAction(frintezza, 3));
1529
+				_portraitDummy1.deleteMe();
1530
+				_portraitDummy3.deleteMe();
1531
+				_portraitDummy1 = null;
1532
+				_portraitDummy3 = null;
1533
+				startQuestTimer("camera_12", 4500, frintezza, null, false);
1534
+				break;
1535
+			
1536
+			case "camera_12":
1537
+				FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 100, 195, 35, 0, 10000, 0, 0, 1, 0));
1538
+				startQuestTimer("camera_13", 700, frintezza, null, false);
1539
+				break;
1540
+			
1541
+			case "camera_13":
1542
+				FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 100, 195, 35, 0, 10000, 0, 0, 1, 0));
1543
+				startQuestTimer("camera_14", 1300, frintezza, null, false);
1544
+				break;
1545
+			
1546
+			case "camera_14":
1547
+				FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 120, 180, 45, 1500, 10000, 0, 0, 1, 0));
1548
+				FRINTEZZA_LAIR.broadcastPacket(new MagicSkillUse(frintezza, frintezza, 5006, 1, 34000, 0));
1549
+				FRINTEZZA_LAIR.broadcastPacket(new ExShowScreenMessage(1, 0, 2, false, 1, 0, 0, false, 5000, true, "Mournful Chorale Prelude"));
1550
+				startQuestTimer("camera_16", 1500, frintezza, null, false);
1551
+				break;
1552
+			
1553
+			case "camera_16":
1554
+				FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 520, 135, 45, 8000, 10000, 0, 0, 1, 0));
1555
+				startQuestTimer("camera_17", 7500, frintezza, null, false);
1556
+				break;
1557
+			
1558
+			case "camera_17":
1559
+				FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 1500, 110, 25, 10000, 13000, 0, 0, 1, 0));
1560
+				startQuestTimer("camera_18", 9500, frintezza, null, false);
1561
+				break;
1562
+			
1563
+			case "camera_18":
1564
+				FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(_overheadDummy.getObjectId(), 930, 160, -20, 0, 1000, 0, 0, 1, 0));
1565
+				startQuestTimer("camera_18b", 0, _overheadDummy, null, false);
1566
+				break;
1567
+			
1568
+			case "camera_18b":
1569
+				FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(_overheadDummy.getObjectId(), 600, 180, -25, 0, 10000, 0, 0, 1, 0));
1570
+				FRINTEZZA_LAIR.broadcastPacket(new MagicSkillUse(_scarletDummy, _overheadDummy, 5004, 1, 5800, 0));
1571
+				weakScarlet = (L2GrandBossInstance) addSpawn(29046, 174232, -88020, -5110, 16384, false, 0, true);
1572
+				weakScarlet.setIsInvul(true);
1573
+				weakScarlet.setIsImmobilized(true);
1574
+				weakScarlet.disableAllSkills();
1575
+				FRINTEZZA_LAIR.updateKnownList(weakScarlet);
1576
+				activeScarlet = weakScarlet;
1577
+				startQuestTimer("camera_19", 2400, _scarletDummy, null, false);
1578
+				startQuestTimer("camera_19b", 5000, _scarletDummy, null, false);
1579
+				break;
1580
+			
1581
+			case "camera_19":
1582
+				weakScarlet.teleToLocation(174232, -88020, -5110, 0);
1583
+				break;
1584
+			
1585
+			case "camera_19b":
1586
+				FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(_scarletDummy.getObjectId(), 800, 180, 10, 1000, 10000, 0, 0, 1, 0));
1587
+				startQuestTimer("camera_20", 2100, _scarletDummy, null, false);
1588
+				break;
1589
+			
1590
+			case "camera_20":
1591
+				FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(weakScarlet.getObjectId(), 300, 60, 8, 0, 10000, 0, 0, 1, 0));
1592
+				startQuestTimer("camera_21", 2000, weakScarlet, null, false);
1593
+				break;
1594
+			
1595
+			case "camera_21":
1596
+				FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(weakScarlet.getObjectId(), 500, 90, 10, 3000, 5000, 0, 0, 1, 0));
1597
+				startQuestTimer("camera_22", 3000, weakScarlet, null, false);
1598
+				break;
1599
+			
1600
+			case "camera_22":
1601
+				portrait2 = (L2MonsterInstance) addSpawn(29049, 175876, -88713, -5000, 28205, false, 0, false);
1602
+				portrait2.setIsImmobilized(true);
1603
+				portrait2.disableAllSkills();
1604
+				FRINTEZZA_LAIR.updateKnownList(portrait2);
1605
+				portrait3 = (L2MonsterInstance) addSpawn(29049, 172608, -88702, -5000, 64817, false, 0, false);
1606
+				portrait3.setIsImmobilized(true);
1607
+				portrait3.disableAllSkills();
1608
+				FRINTEZZA_LAIR.updateKnownList(portrait3);
1609
+				portrait1 = (L2MonsterInstance) addSpawn(29048, 175833, -87165, -5000, 35048, false, 0, false);
1610
+				portrait1.setIsImmobilized(true);
1611
+				portrait1.disableAllSkills();
1612
+				FRINTEZZA_LAIR.updateKnownList(portrait1);
1613
+				portrait4 = (L2MonsterInstance) addSpawn(29048, 172634, -87165, -5000, 57730, false, 0, false);
1614
+				portrait4.setIsImmobilized(true);
1615
+				portrait4.disableAllSkills();
1616
+				FRINTEZZA_LAIR.updateKnownList(portrait4);
1617
+				_overheadDummy.deleteMe();
1618
+				_scarletDummy.deleteMe();
1619
+				_overheadDummy = null;
1620
+				_scarletDummy = null;
1621
+				startQuestTimer("camera_23", 2000, weakScarlet, null, false);
1622
+				startQuestTimer("start_pc", 2000, weakScarlet, null, false);
1623
+				startQuestTimer("loc_check", 60000, weakScarlet, null, true);
1624
+				startQuestTimer("songs_play", 10000 + Rnd.get(10000), frintezza, null, false);
1625
+				startQuestTimer("skill01", 10000 + Rnd.get(10000), weakScarlet, null, false);
1626
+				break;
1627
+			
1628
+			case "camera_23":
1629
+				demon1.setIsImmobilized(false);
1630
+				demon2.setIsImmobilized(false);
1631
+				demon3.setIsImmobilized(false);
1632
+				demon4.setIsImmobilized(false);
1633
+				demon1.enableAllSkills();
1634
+				demon2.enableAllSkills();
1635
+				demon3.enableAllSkills();
1636
+				demon4.enableAllSkills();
1637
+				portrait1.setIsImmobilized(false);
1638
+				portrait2.setIsImmobilized(false);
1639
+				portrait3.setIsImmobilized(false);
1640
+				portrait4.setIsImmobilized(false);
1641
+				portrait1.enableAllSkills();
1642
+				portrait2.enableAllSkills();
1643
+				portrait3.enableAllSkills();
1644
+				portrait4.enableAllSkills();
1645
+				weakScarlet.setIsInvul(false);
1646
+				weakScarlet.setIsImmobilized(false);
1647
+				weakScarlet.enableAllSkills();
1648
+				weakScarlet.setRunning();
1649
+				startQuestTimer("spawn_minion", 20000, portrait1, null, false);
1650
+				startQuestTimer("spawn_minion", 20000, portrait2, null, false);
1651
+				startQuestTimer("spawn_minion", 20000, portrait3, null, false);
1652
+				startQuestTimer("spawn_minion", 20000, portrait4, null, false);
1653
+				break;
1654
+			
1655
+			case "stop_pc":
1656
+				for (L2Character cha : FRINTEZZA_LAIR.getCharactersInside())
1657
+				{
1658
+					cha.abortAttack();
1659
+					cha.abortCast();
1660
+					cha.disableAllSkills();
1661
+					cha.setTarget(null);
1662
+					cha.stopMove(null);
1663
+					cha.setIsImmobilized(true);
1664
+					cha.getAI().setIntention(CtrlIntention.IDLE);
1665
+				}
1666
+				break;
1667
+			
1668
+			case "stop_npc":
1669
+				_Heading = npc.getHeading();
1670
+				if (_Heading < 32768)
1671
+					_Angle = Math.abs(180 - (int) (_Heading / 182.044444444));
1672
+				else
1673
+					_Angle = Math.abs(540 - (int) (_Heading / 182.044444444));
1674
+				break;
1675
+			
1676
+			case "start_pc":
1677
+				for (L2Character cha : FRINTEZZA_LAIR.getCharactersInside())
1678
+				{
1679
+					if (cha != frintezza)
1680
+					{
1681
+						cha.enableAllSkills();
1682
+						cha.setIsImmobilized(false);
1683
+					}
1684
+				}
1685
+				break;
1686
+			
1687
+			case "start_npc":
1688
+				npc.setRunning();
1689
+				npc.setIsInvul(false);
1690
+				break;
1691
+			
1692
+			case "morph_end":
1693
+				_OnMorph = 0;
1694
+				break;
1695
+			
1696
+			case "morph_01":
1697
+				FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(weakScarlet.getObjectId(), 250, _Angle, 12, 2000, 15000, 0, 0, 1, 0));
1698
+				startQuestTimer("morph_02", 3000, weakScarlet, null, false);
1699
+				break;
1700
+			
1701
+			case "morph_02":
1702
+				FRINTEZZA_LAIR.broadcastPacket(new SocialAction(weakScarlet, 1));
1703
+				frintezza.setRHandId(7903); // fake weapon
1704
+				startQuestTimer("morph_03", 4000, weakScarlet, null, false);
1705
+				break;
1706
+			
1707
+			case "morph_03":
1708
+				startQuestTimer("morph_04", 1500, weakScarlet, null, false);
1709
+				break;
1710
+			
1711
+			case "morph_04":
1712
+				FRINTEZZA_LAIR.broadcastPacket(new SocialAction(weakScarlet, 4));
1713
+				L2Skill skill = SkillTable.getInstance().getInfo(DAEMON_MORPH, 1);
1714
+				if (skill != null)
1715
+					skill.getEffects(weakScarlet, weakScarlet);
1716
+				
1717
+				startQuestTimer("morph_end", 6000, weakScarlet, null, false);
1718
+				startQuestTimer("start_pc", 3000, weakScarlet, null, false);
1719
+				startQuestTimer("start_npc", 3000, weakScarlet, null, false);
1720
+				startQuestTimer("songs_play", 10000 + Rnd.get(10000), frintezza, null, false);
1721
+				startQuestTimer("skill02", 10000 + Rnd.get(10000), weakScarlet, null, false);
1722
+				break;
1723
+			
1724
+			case "morph_05a":
1725
+				FRINTEZZA_LAIR.broadcastPacket(new SocialAction(frintezza, 4));
1726
+				break;
1727
+			
1728
+			case "morph_05":
1729
+				FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 250, 120, 15, 0, 1000, 0, 0, 1, 0));
1730
+				startQuestTimer("morph_06", 0, frintezza, null, false);
1731
+				break;
1732
+			
1733
+			case "morph_06":
1734
+				FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 250, 120, 15, 0, 10000, 0, 0, 1, 0));
1735
+				cancelQuestTimers("loc_check");
1736
+				_Scarlet_x = weakScarlet.getX();
1737
+				_Scarlet_y = weakScarlet.getY();
1738
+				_Scarlet_z = weakScarlet.getZ();
1739
+				_Scarlet_h = weakScarlet.getHeading();
1740
+				weakScarlet.deleteMe();
1741
+				weakScarlet = null;
1742
+				activeScarlet = null;
1743
+				weakScarlet = (L2GrandBossInstance) addSpawn(29046, _Scarlet_x, _Scarlet_y, _Scarlet_z, _Scarlet_h, false, 0, false);
1744
+				weakScarlet.setIsInvul(true);
1745
+				weakScarlet.setIsImmobilized(true);
1746
+				weakScarlet.disableAllSkills();
1747
+				weakScarlet.setRHandId(7903);
1748
+				FRINTEZZA_LAIR.updateKnownList(weakScarlet);
1749
+				startQuestTimer("morph_07", 7000, frintezza, null, false);
1750
+				break;
1751
+			
1752
+			case "morph_07":
1753
+				FRINTEZZA_LAIR.broadcastPacket(new MagicSkillUse(frintezza, frintezza, 5006, 1, 34000, 0));
1754
+				FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 500, 70, 15, 3000, 10000, 0, 0, 1, 0));
1755
+				startQuestTimer("morph_08", 3000, frintezza, null, false);
1756
+				break;
1757
+			
1758
+			case "morph_08":
1759
+				FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 2500, 90, 12, 6000, 10000, 0, 0, 1, 0));
1760
+				startQuestTimer("morph_09", 3000, frintezza, null, false);
1761
+				break;
1762
+			
1763
+			case "morph_09":
1764
+				FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(weakScarlet.getObjectId(), 250, _Angle, 12, 0, 1000, 0, 0, 1, 0));
1765
+				startQuestTimer("morph_10", 0, weakScarlet, null, false);
1766
+				break;
1767
+			
1768
+			case "morph_10":
1769
+				FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(weakScarlet.getObjectId(), 250, _Angle, 12, 0, 10000, 0, 0, 1, 0));
1770
+				startQuestTimer("morph_11", 500, weakScarlet, null, false);
1771
+				break;
1772
+			
1773
+			case "morph_11":
1774
+				weakScarlet.doDie(weakScarlet);
1775
+				FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(weakScarlet.getObjectId(), 450, _Angle, 14, 8000, 8000, 0, 0, 1, 0));
1776
+				startQuestTimer("morph_12", 6250, weakScarlet, null, false);
1777
+				startQuestTimer("morph_13", 7200, weakScarlet, null, false);
1778
+				break;
1779
+			
1780
+			case "morph_12":
1781
+				weakScarlet.deleteMe();
1782
+				weakScarlet = null;
1783
+				break;
1784
+			
1785
+			case "morph_13":
1786
+				strongScarlet = (L2GrandBossInstance) addSpawn(SCARLET2, _Scarlet_x, _Scarlet_y, _Scarlet_z, _Scarlet_h, false, 0, false);
1787
+				strongScarlet.setIsInvul(true);
1788
+				strongScarlet.setIsImmobilized(true);
1789
+				strongScarlet.disableAllSkills();
1790
+				FRINTEZZA_LAIR.updateKnownList(strongScarlet);
1791
+				activeScarlet = strongScarlet;
1792
+				FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(strongScarlet.getObjectId(), 450, _Angle, 12, 500, 14000, 0, 0, 1, 0));
1793
+				startQuestTimer("morph_14", 3000, strongScarlet, null, false);
1794
+				startQuestTimer("loc_check", 60000, strongScarlet, null, true);
1795
+				break;
1796
+			
1797
+			case "morph_14":
1798
+				startQuestTimer("morph_15", 5100, strongScarlet, null, false);
1799
+				break;
1800
+			
1801
+			case "morph_15":
1802
+				FRINTEZZA_LAIR.broadcastPacket(new SocialAction(strongScarlet, 2));
1803
+				L2Skill skill1 = SkillTable.getInstance().getInfo(DAEMON_MORPH, 1);
1804
+				if (skill1 != null)
1805
+					skill1.getEffects(strongScarlet, strongScarlet);
1806
+				
1807
+				startQuestTimer("morph_end", 9000, strongScarlet, null, false);
1808
+				startQuestTimer("start_pc", 6000, strongScarlet, null, false);
1809
+				startQuestTimer("start_npc", 6000, strongScarlet, null, false);
1810
+				startQuestTimer("songs_play", 10000 + Rnd.get(10000), frintezza, null, false);
1811
+				startQuestTimer("skill03", 10000 + Rnd.get(10000), strongScarlet, null, false);
1812
+				break;
1813
+			
1814
+			case "morph_16":
1815
+				FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(strongScarlet.getObjectId(), 300, _Angle - 180, 5, 0, 7000, 0, 0, 1, 0));
1816
+				startQuestTimer("morph_17", 0, strongScarlet, null, false);
1817
+				break;
1818
+			
1819
+			case "morph_17":
1820
+				FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(strongScarlet.getObjectId(), 200, _Angle, 85, 4000, 10000, 0, 0, 1, 0));
1821
+				startQuestTimer("morph_17b", 7400, frintezza, null, false);
1822
+				startQuestTimer("morph_18", 7500, frintezza, null, false);
1823
+				break;
1824
+			
1825
+			case "morph_17b":
1826
+				frintezza.doDie(frintezza);
1827
+				break;
1828
+			
1829
+			case "morph_18":
1830
+				FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 100, 120, 5, 0, 7000, 0, 0, 1, 0));
1831
+				startQuestTimer("morph_19", 0, frintezza, null, false);
1832
+				break;
1833
+			
1834
+			case "morph_19":
1835
+				FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 100, 90, 5, 5000, 15000, 0, 0, 1, 0));
1836
+				startQuestTimer("morph_20", 7000, frintezza, null, false);
1837
+				startQuestTimer("spawn_cubes", 7000, frintezza, null, false);
1838
+				break;
1839
+			
1840
+			case "morph_20":
1841
+				FRINTEZZA_LAIR.broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 900, 90, 25, 7000, 10000, 0, 0, 1, 0));
1842
+				FRINTEZZA_LAIR.broadcastPacket(new MagicSkillUse(frintezza, frintezza, FRINTEZZA_SONGS, 2, 32000, 0));
1843
+				FRINTEZZA_LAIR.broadcastPacket(new ExShowScreenMessage(1, 0, 2, false, 1, 0, 0, false, 5000, true, "Frenetic Toccata"));
1844
+				startQuestTimer("start_pc", 7000, frintezza, null, false);
1845
+				break;
1846
+			
1847
+			case "songs_play":
1848
+				if (frintezza != null && !frintezza.isDead() && _OnMorph == 0)
1849
+				{
1850
+					_OnSong = Rnd.get(1, 5);
1851
+					if (_OnSong == 1 && _ThirdMorph == 1 && strongScarlet.getCurrentHp() < strongScarlet.getMaxHp() * 0.6 && Rnd.get(100) < 80)
1852
+					{
1853
+						FRINTEZZA_LAIR.broadcastPacket(new MagicSkillUse(frintezza, frintezza, 5007, 1, 32000, 0));
1854
+						startQuestTimer("songs_effect", 5000, frintezza, null, false);
1855
+						startQuestTimer("songs_play", 32000 + Rnd.get(10000), frintezza, null, false);
1856
+					}
1857
+					else if (_OnSong == 2 || _OnSong == 3)
1858
+					{
1859
+						FRINTEZZA_LAIR.broadcastPacket(new MagicSkillUse(frintezza, frintezza, 5007, _OnSong, 32000, 0));
1860
+						startQuestTimer("songs_effect", 5000, frintezza, null, false);
1861
+						startQuestTimer("songs_play", 32000 + Rnd.get(10000), frintezza, null, false);
1862
+					}
1863
+					else if (_OnSong == 4 && _SecondMorph == 1)
1864
+					{
1865
+						FRINTEZZA_LAIR.broadcastPacket(new MagicSkillUse(frintezza, frintezza, 5007, 4, 31000, 0));
1866
+						startQuestTimer("songs_effect", 5000, frintezza, null, false);
1867
+						startQuestTimer("songs_play", 31000 + Rnd.get(10000), frintezza, null, false);
1868
+					}
1869
+					else if (_OnSong == 5 && _ThirdMorph == 1 && _Abnormal == 0)
1870
+					{
1871
+						_Abnormal = 1;
1872
+						FRINTEZZA_LAIR.broadcastPacket(new MagicSkillUse(frintezza, frintezza, 5007, 5, 35000, 0));
1873
+						startQuestTimer("songs_effect", 5000, frintezza, null, false);
1874
+						startQuestTimer("songs_play", 35000 + Rnd.get(10000), frintezza, null, false);
1875
+					}
1876
+					else
1877
+						startQuestTimer("songs_play", 5000 + Rnd.get(5000), frintezza, null, false);
1878
+				}
1879
+				break;
1880
+			
1881
+			case "songs_effect":
1882
+				L2Skill skill2 = SkillTable.getInstance().getInfo(FRINTEZZA_SONGS, _OnSong);
1883
+				if (skill2 == null)
1884
+					return null;
1885
+				
1886
+				switch (_OnSong)
1887
+				{
1888
+					case 1:
1889
+					case 2:
1890
+					case 3:
1891
+						if (frintezza != null && !frintezza.isDead() && activeScarlet != null && !activeScarlet.isDead())
1892
+							skill2.getEffects(frintezza, activeScarlet);
1893
+						break;
1894
+						
1895
+					case 4:
1896
+						for (L2Character cha : FRINTEZZA_LAIR.getCharactersInside())
1897
+						{
1898
+							if (cha instanceof L2PcInstance && Rnd.get(100) < 80)
1899
+							{
1900
+								skill2.getEffects(frintezza, cha);
1901
+								cha.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_FEEL_S1_EFFECT).addSkillName(FRINTEZZA_SONGS, 4));
1902
+							}
1903
+						}
1904
+						break;
1905
+						
1906
+					case 5:
1907
+						for (L2Character cha : FRINTEZZA_LAIR.getCharactersInside())
1908
+						{
1909
+							if (cha instanceof L2PcInstance && Rnd.get(100) < 70)
1910
+							{
1911
+								cha.abortAttack();
1912
+								cha.abortCast();
1913
+								cha.disableAllSkills();
1914
+								cha.stopMove(null);
1915
+								cha.setIsParalyzed(true);
1916
+								cha.setIsImmobilized(true);
1917
+								cha.getAI().setIntention(CtrlIntention.IDLE);
1918
+								skill2.getEffects(frintezza, cha);
1919
+								cha.startAbnormalEffect(AbnormalEffect.DANCE_STUNNED);
1920
+								cha.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_FEEL_S1_EFFECT).addSkillName(FRINTEZZA_SONGS, 5));
1921
+							}
1922
+						}
1923
+						startQuestTimer("stop_effect", 25000, frintezza, null, false);
1924
+						break;
1925
+				}
1926
+				break;
1927
+			
1928
+			case "stop_effect":
1929
+				for (L2Character cha : FRINTEZZA_LAIR.getCharactersInside())
1930
+				{
1931
+					if (cha instanceof L2PcInstance)
1932
+					{
1933
+						cha.stopAbnormalEffect(AbnormalEffect.DANCE_STUNNED);
1934
+						cha.stopAbnormalEffect(AbnormalEffect.FLOATING_ROOT);
1935
+						cha.enableAllSkills();
1936
+						cha.setIsImmobilized(false);
1937
+						cha.setIsParalyzed(false);
1938
+					}
1939
+				}
1940
+				_Abnormal = 0;
1941
+				break;
1942
+			
1943
+			case "attack_stop":
1944
+				cancelQuestTimers("skill01");
1945
+				cancelQuestTimers("skill02");
1946
+				cancelQuestTimers("skill03");
1947
+				cancelQuestTimers("songs_play");
1948
+				cancelQuestTimers("songs_effect");
1949
+				
1950
+				if (frintezza != null)
1951
+					FRINTEZZA_LAIR.broadcastPacket(new MagicSkillCanceld(frintezza.getObjectId()));
1952
+				break;
1953
+			
1954
+			case "check_hp":
1955
+				if (npc.isDead())
1956
+				{
1957
+					_OnMorph = 1;
1958
+					FRINTEZZA_LAIR.broadcastPacket(new PlaySound(1, "BS01_D", 1, npc.getObjectId(), npc.getX(), npc.getY(), npc.getZ()));
1959
+					
1960
+					startQuestTimer("attack_stop", 0, frintezza, null, false);
1961
+					startQuestTimer("stop_pc", 0, npc, null, false);
1962
+					startQuestTimer("stop_npc", 0, npc, null, false);
1963
+					startQuestTimer("morph_16", 0, npc, null, false);
1964
+				}
1965
+				else
1966
+				{
1967
+					_CheckDie = _CheckDie + 10;
1968
+					if (_CheckDie < 3000)
1969
+						startQuestTimer("check_hp", 10, npc, null, false);
1970
+					else
1971
+					{
1972
+						_OnCheck = 0;
1973
+						_CheckDie = 0;
1974
+					}
1975
+				}
1976
+				break;
1977
+			
1978
+			case "skill01":
1979
+				if (weakScarlet != null && !weakScarlet.isDead() && _SecondMorph == 0 && _ThirdMorph == 0 && _OnMorph == 0)
1980
+				{
1981
+					int i = Rnd.get(0, 1);
1982
+					L2Skill skill3 = SkillTable.getInstance().getInfo(SKILLS[i][0], SKILLS[i][1]);
1983
+					if (skill3 != null)
1984
+					{
1985
+						weakScarlet.stopMove(null);
1986
+						weakScarlet.setIsCastingNow(true);
1987
+						weakScarlet.doCast(skill3);
1988
+					}
1989
+					startQuestTimer("skill01", SKILLS[i][2] + 5000 + Rnd.get(10000), npc, null, false);
1990
+				}
1991
+				break;
1992
+			
1993
+			case "skill02":
1994
+				if (weakScarlet != null && !weakScarlet.isDead() && _SecondMorph == 1 && _ThirdMorph == 0 && _OnMorph == 0)
1995
+				{
1996
+					int i = 0;
1997
+					if (_Abnormal == 0)
1998
+						i = Rnd.get(2, 5);
1999
+					else
2000
+						i = Rnd.get(2, 4);
2001
+					
2002
+					L2Skill skill4 = SkillTable.getInstance().getInfo(SKILLS[i][0], SKILLS[i][1]);
2003
+					if (skill4 != null)
2004
+					{
2005
+						weakScarlet.stopMove(null);
2006
+						weakScarlet.setIsCastingNow(true);
2007
+						weakScarlet.doCast(skill4);
2008
+					}
2009
+					startQuestTimer("skill02", SKILLS[i][2] + 5000 + Rnd.get(10000), npc, null, false);
2010
+					
2011
+					if (i == 5)
2012
+					{
2013
+						_Abnormal = 1;
2014
+						startQuestTimer("float_effect", 4000, weakScarlet, null, false);
2015
+					}
2016
+				}
2017
+				break;
2018
+			
2019
+			case "skill03":
2020
+				if (strongScarlet != null && !strongScarlet.isDead() && _SecondMorph == 1 && _ThirdMorph == 1 && _OnMorph == 0)
2021
+				{
2022
+					int i = 0;
2023
+					if (_Abnormal == 0)
2024
+						i = Rnd.get(6, 10);
2025
+					else
2026
+						i = Rnd.get(6, 9);
2027
+					
2028
+					L2Skill skill5 = SkillTable.getInstance().getInfo(SKILLS[i][0], SKILLS[i][1]);
2029
+					if (skill5 != null)
2030
+					{
2031
+						strongScarlet.stopMove(null);
2032
+						strongScarlet.setIsCastingNow(true);
2033
+						strongScarlet.doCast(skill5);
2034
+					}
2035
+					startQuestTimer("skill03", SKILLS[i][2] + 5000 + Rnd.get(10000), npc, null, false);
2036
+					
2037
+					if (i == 10)
2038
+					{
2039
+						_Abnormal = 1;
2040
+						startQuestTimer("float_effect", 3000, npc, null, false);
2041
+					}
2042
+				}
2043
+				break;
2044
+			
2045
+			case "float_effect":
2046
+				if (npc.isCastingNow())
2047
+				{
2048
+					startQuestTimer("float_effect", 500, npc, null, false);
2049
+				}
2050
+				else
2051
+				{
2052
+					for (L2Character cha : FRINTEZZA_LAIR.getCharactersInside())
2053
+					{
2054
+						if (cha instanceof L2PcInstance)
2055
+						{
2056
+							if (cha.getFirstEffect(YOKE_OF_SCARLET) != null)
2057
+							{
2058
+								cha.abortAttack();
2059
+								cha.abortCast();
2060
+								cha.disableAllSkills();
2061
+								cha.stopMove(null);
2062
+								cha.setIsParalyzed(true);
2063
+								cha.setIsImmobilized(true);
2064
+								cha.getAI().setIntention(CtrlIntention.IDLE);
2065
+								cha.startAbnormalEffect(AbnormalEffect.FLOATING_ROOT);
2066
+							}
2067
+						}
2068
+					}
2069
+					startQuestTimer("stop_effect", 25000, npc, null, false);
2070
+				}
2071
+				break;
2072
+			
2073
+			case "action":
2074
+				FRINTEZZA_LAIR.broadcastPacket(new SocialAction(npc, 1));
2075
+				break;
2076
+			
2077
+			case "bomber":
2078
+				_Bomber = 0;
2079
+				break;
2080
+			
2081
+			case "room_final":
2082
+				FRINTEZZA_LAIR.broadcastPacket(new NpcSay(npc.getObjectId(), 1, npc.getNpcId(), "Exceeded his time limit, challenge failed!"));
2083
+				FRINTEZZA_LAIR.oustAllPlayers();
2084
+				cancelQuestTimers("waiting");
2085
+				cancelQuestTimers("frintezza_despawn");
2086
+				startQuestTimer("clean", 1000, npc, null, false);
2087
+				startQuestTimer("close", 1000, npc, null, false);
2088
+				startQuestTimer("room1_del", 1000, npc, null, false);
2089
+				startQuestTimer("room2_del", 1000, npc, null, false);
2090
+				GrandBossManager.getInstance().setBossStatus(FRINTEZZA, DORMANT);
2091
+				break;
2092
+			
2093
+			case "frintezza_despawn":
2094
+				temp = (System.currentTimeMillis() - _LastAction);
2095
+				if (temp > Config.DESPAWN_TIME_FRINTEZZA)
2096
+				{
2097
+					FRINTEZZA_LAIR.oustAllPlayers();
2098
+					cancelQuestTimers("waiting");
2099
+					cancelQuestTimers("loc_check");
2100
+					cancelQuestTimers("room_final");
2101
+					cancelQuestTimers("spawn_minion");
2102
+					startQuestTimer("clean", 1000, npc, null, false);
2103
+					startQuestTimer("close", 1000, npc, null, false);
2104
+					startQuestTimer("attack_stop", 1000, npc, null, false);
2105
+					startQuestTimer("room1_del", 1000, npc, null, false);
2106
+					startQuestTimer("room2_del", 1000, npc, null, false);
2107
+					startQuestTimer("room3_del", 1000, npc, null, false);
2108
+					startQuestTimer("minions_despawn", 1000, npc, null, false);
2109
+					GrandBossManager.getInstance().setBossStatus(FRINTEZZA, DORMANT);
2110
+					cancelQuestTimers("frintezza_despawn");
2111
+				}
2112
+				break;
2113
+			
2114
+			case "minions_despawn":
2115
+				for (int i = 0; i < Minions.size(); i++)
2116
+				{
2117
+					if (Minions.get(i) != null)
2118
+					{
2119
+						L2Attackable mob = Minions.get(i);
2120
+						if (mob != null)
2121
+							mob.decayMe();
2122
+					}
2123
+				}
2124
+				Minions.clear();
2125
+				break;
2126
+			
2127
+			case "spawn_minion":
2128
+				if (npc != null && !npc.isDead() && frintezza != null && !frintezza.isDead())
2129
+				{
2130
+					L2Npc mob = addSpawn(npc.getNpcId() + 2, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), false, 0, false);
2131
+					((L2Attackable) mob).setIsRaidMinion(true);
2132
+					Minions.add((L2Attackable) mob);
2133
+					startQuestTimer("action", 200, mob, null, false);
2134
+					startQuestTimer("spawn_minion", 18000, npc, null, false);
2135
+				}
2136
+				break;
2137
+			
2138
+			case "spawn_cubes":
2139
+				addSpawn(CUBE, 174232, -88020, -5114, 16384, false, 900000, false);
2140
+				break;
2141
+			
2142
+			case "frintezza_unlock":
2143
+				GrandBossManager.getInstance().setBossStatus(FRINTEZZA, DORMANT);
2144
+				break;
2145
+			
2146
+			case "remove_players":
2147
+				FRINTEZZA_LAIR.oustAllPlayers();
2148
+				break;
2149
+		}
2150
+		return super.onAdvEvent(event, npc, player);
2151
+	}
2152
+	
2153
+	@Override
2154
+	public String onTalk(L2Npc npc, L2PcInstance player)
2155
+	{
2156
+		String htmltext = "";
2157
+		switch (npc.getNpcId())
2158
+		{
2159
+			case CUBE:
2160
+				player.teleToLocation(150037 + Rnd.get(500), -57720 + Rnd.get(500), -2976, 0);
2161
+				break;
2162
+		}
2163
+		
2164
+		switch (GrandBossManager.getInstance().getBossStatus(FRINTEZZA))
2165
+		{
2166
+			case DEAD:
2167
+				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>";
2168
+				break;
2169
+			
2170
+			case DORMANT:
2171
+				boolean party_check_success = true;
2172
+				
2173
+				if (!player.isGM()) // GMs can enter without a party.
2174
+				{
2175
+					if ((!player.isInParty() || !player.getParty().isLeader(player)) || (player.getParty().getCommandChannel() == null) || (player.getParty().getCommandChannel().getChannelLeader() != player))
2176
+					{
2177
+						htmltext = "<html><body>No reaction. Contact must be initiated by the Command Channel Leader.</body></html>";
2178
+						party_check_success = false;
2179
+					}
2180
+					else if (player.getParty().getCommandChannel().getPartys().size() < Config.FRINTEZZA_MIN_PARTIES || player.getParty().getCommandChannel().getPartys().size() > Config.FRINTEZZA_MAX_PARTIES)
2181
+					{
2182
+						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>";
2183
+						party_check_success = false;
2184
+					}
2185
+				}
2186
+				
2187
+				if (!Config.BYPASS_FRINTEZZA_PARTIES_CHECK)
2188
+				{
2189
+					if ((!player.isInParty() || !player.getParty().isLeader(player)) || (player.getParty().getCommandChannel() == null) || (player.getParty().getCommandChannel().getChannelLeader() != player))
2190
+					{
2191
+						htmltext = "<html><body>No reaction. Contact must be initiated by the Command Channel Leader.</body></html>";
2192
+						party_check_success = false;
2193
+					}
2194
+					else if (player.getParty().getCommandChannel().getPartys().size() < Config.FRINTEZZA_MIN_PARTIES || player.getParty().getCommandChannel().getPartys().size() > Config.FRINTEZZA_MAX_PARTIES)
2195
+					{
2196
+						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>";
2197
+						party_check_success = false;
2198
+					}				
2199
+				}
2200
+				
2201
+				if (party_check_success)
2202
+				{
2203
+					if (player.getInventory().getItemByItemId(SCROLL) == null)
2204
+					{
2205
+						htmltext = "<html><body>You dont have required item.</body></html>";
2206
+					}
2207
+					else
2208
+					{
2209
+						player.destroyItemByItemId("Quest", SCROLL, 1, player, true);
2210
+						GrandBossManager.getInstance().setBossStatus(FRINTEZZA, WAITING);
2211
+						startQuestTimer("close", 0, npc, null, false);
2212
+						startQuestTimer("room1_spawn", 5000, npc, null, false);
2213
+						startQuestTimer("room_final", 2100000, null, null, false);
2214
+						startQuestTimer("frintezza_despawn", 60000, null, null, true);
2215
+						_LastAction = System.currentTimeMillis();
2216
+						
2217
+						if (Config.BYPASS_FRINTEZZA_PARTIES_CHECK)
2218
+						{
2219
+							if (player.getParty() != null)
2220
+							{
2221
+								L2CommandChannel CC = player.getParty().getCommandChannel();
2222
+								
2223
+								if (CC != null)
2224
+								{ // teleport all parties into CC reb12
2225
+									
2226
+									for (L2Party party : CC.getPartys())
2227
+									{
2228
+										if (party == null)
2229
+											continue;
2230
+										
2231
+										synchronized (_PlayersInside)
2232
+										{
2233
+											for (L2PcInstance member : party.getPartyMembers())
2234
+											{
2235
+												if (member == null || member.getLevel() < MIN_LEVEL)
2236
+													continue;
2237
+												if (!member.isInsideRadius(npc, 700, false, false))
2238
+													continue;
2239
+												if (_PlayersInside.size() > 45)
2240
+												{
2241
+													member.sendMessage("The number of challenges have been full, so can not enter.");
2242
+													break;
2243
+												}
2244
+												_PlayersInside.add(member);
2245
+												FRINTEZZA_LAIR.allowPlayerEntry(member, 300);
2246
+												member.teleToLocation(INVADE_LOC[_LocCycle][0] + Rnd.get(50), INVADE_LOC[_LocCycle][1] + Rnd.get(50), INVADE_LOC[_LocCycle][2], 0);
2247
+											}
2248
+											if (_PlayersInside.size() > 45)
2249
+												break;
2250
+										}
2251
+										_LocCycle++;
2252
+										if (_LocCycle >= 6)
2253
+											_LocCycle = 1;
2254
+									}
2255
+								}
2256
+								else
2257
+								{ // teleport just actual party reb12
2258
+									
2259
+									L2Party party = player.getParty();
2260
+									
2261
+									for (L2PcInstance member : party.getPartyMembers())
2262
+									{
2263
+										if (member == null || member.getLevel() < MIN_LEVEL)
2264
+											continue;
2265
+										if (!member.isInsideRadius(npc, 700, false, false))
2266
+											continue;
2267
+										
2268
+										synchronized (_PlayersInside)
2269
+										{
2270
+											if (_PlayersInside.size() > 45)
2271
+											{
2272
+												member.sendMessage("The number of challenges have been full, so can not enter.");
2273
+												break;
2274
+											}
2275
+											_PlayersInside.add(member);
2276
+										}
2277
+										
2278
+										FRINTEZZA_LAIR.allowPlayerEntry(member, 300);
2279
+										member.teleToLocation(INVADE_LOC[_LocCycle][0] + Rnd.get(50), INVADE_LOC[_LocCycle][1] + Rnd.get(50), INVADE_LOC[_LocCycle][2], 0);
2280
+									}
2281
+									_LocCycle++;
2282
+									if (_LocCycle >= 6)
2283
+										_LocCycle = 1;
2284
+								}
2285
+							}
2286
+							else
2287
+							{ // teleport just player reb12
2288
+								if (player.isInsideRadius(npc, 700, false, false))
2289
+								{
2290
+									synchronized (_PlayersInside)
2291
+									{
2292
+										_PlayersInside.add(player);
2293
+									}
2294
+									player.teleToLocation(INVADE_LOC[_LocCycle][0] + Rnd.get(50), INVADE_LOC[_LocCycle][1] + Rnd.get(50), INVADE_LOC[_LocCycle][2], 0);
2295
+								}
2296
+							}
2297
+						}
2298
+						else
2299
+						{
2300
+							L2CommandChannel CC = player.getParty().getCommandChannel();
2301
+							for (L2Party party : CC.getPartys())
2302
+							{
2303
+								if (party == null)
2304
+									continue;
2305
+								
2306
+								synchronized (_PlayersInside)
2307
+								{
2308
+									for (L2PcInstance member : party.getPartyMembers())
2309
+									{
2310
+										if (member == null || member.getLevel() < MIN_LEVEL)
2311
+											continue;
2312
+										if (!member.isInsideRadius(npc, 700, false, false))
2313
+											continue;
2314
+										if (_PlayersInside.size() > 45)
2315
+										{
2316
+											member.sendMessage("The number of challenges have been full, so can not enter.");
2317
+											break;
2318
+										}
2319
+										_PlayersInside.add(member);
2320
+										FRINTEZZA_LAIR.allowPlayerEntry(member, 300);
2321
+										member.teleToLocation(INVADE_LOC[_LocCycle][0] + Rnd.get(50), INVADE_LOC[_LocCycle][1] + Rnd.get(50), INVADE_LOC[_LocCycle][2], 0);
2322
+									}
2323
+									if (_PlayersInside.size() > 45)
2324
+										break;
2325
+								}
2326
+								_LocCycle++;
2327
+								if (_LocCycle >= 6)
2328
+									_LocCycle = 1;
2329
+							}
2330
+						}
2331
+					}
2332
+				}
2333
+				else
2334
+					htmltext = "<html><body>Someone else is already inside the Magic Force Field. Try again later.</body></html>";
2335
+				break;
2336
+		}
2337
+		
2338
+		return htmltext;
2339
+	}
2340
+	
2341
+	@Override
2342
+	public String onAttack(L2Npc npc, L2PcInstance attacker, int damage, boolean isPet)
2343
+	{
2344
+		_LastAction = System.currentTimeMillis();
2345
+		int status = GrandBossManager.getInstance().getBossStatus(FRINTEZZA);
2346
+		
2347
+		switch (npc.getNpcId())
2348
+		{
2349
+			case FRINTEZZA:
2350
+				npc.setCurrentHpMp(npc.getMaxHp(), 0);
2351
+				break;
2352
+			
2353
+			case SCARLET1:
2354
+				if (_SecondMorph == 0 && _ThirdMorph == 0 && _OnMorph == 0 && npc.getCurrentHp() < npc.getMaxHp() * 0.75 && status == FIGHTING)
2355
+				{
2356
+					startQuestTimer("attack_stop", 0, frintezza, null, false);
2357
+					_SecondMorph = 1;
2358
+					_OnMorph = 1;
2359
+					startQuestTimer("stop_pc", 1000, npc, null, false);
2360
+					startQuestTimer("stop_npc", 1000, npc, null, false);
2361
+					startQuestTimer("morph_01", 1100, npc, null, false);
2362
+				}
2363
+				else if (_SecondMorph == 1 && _ThirdMorph == 0 && _OnMorph == 0 && npc.getCurrentHp() < npc.getMaxHp() * 0.5 && status == FIGHTING)
2364
+				{
2365
+					startQuestTimer("attack_stop", 0, frintezza, null, false);
2366
+					_ThirdMorph = 1;
2367
+					_OnMorph = 1;
2368
+					startQuestTimer("stop_pc", 2000, npc, null, false);
2369
+					startQuestTimer("stop_npc", 2000, npc, null, false);
2370
+					startQuestTimer("morph_05a", 2000, npc, null, false);
2371
+					startQuestTimer("morph_05", 2100, npc, null, false);
2372
+				}
2373
+				break;
2374
+			
2375
+			case SCARLET2:
2376
+				if (_SecondMorph == 1 && _ThirdMorph == 1 && _OnCheck == 0 && damage >= npc.getCurrentHp() && GrandBossManager.getInstance().getBossStatus(FRINTEZZA) == FIGHTING)
2377
+					_OnCheck = 1;
2378
+					startQuestTimer("check_hp", 0, npc, null, false);	
2379
+				break;
2380
+			
2381
+			case BREATH_OF_HALISHA:
2382
+			case BREATH_OF_HALISHA2:
2383
+				if (_Bomber == 0)
2384
+				{
2385
+					if (npc.getCurrentHp() < npc.getMaxHp() * 0.1)
2386
+					{
2387
+						if (Rnd.get(100) < 30)
2388
+						{
2389
+							_Bomber = 1;
2390
+							startQuestTimer("bomber", 3000, npc, null, false);					
2391
+							L2Skill skill2 = SkillTable.getInstance().getInfo(BOMBER_GHOST, 1);
2392
+							if (skill2 != null)
2393
+							{
2394
+								npc.doCast(skill2);
2395
+							}
2396
+						}
2397
+					}
2398
+				}
2399
+				break;
2400
+		}
2401
+		return super.onAttack(npc, attacker, damage, isPet);
2402
+	}
2403
+	
2404
+	@Override
2405
+	public String onKill(L2Npc npc, L2PcInstance killer, boolean isPet)
2406
+	{
2407
+		switch (npc.getNpcId())
2408
+		{
2409
+			case SCARLET2:
2410
+				FRINTEZZA_LAIR.broadcastPacket(new PlaySound(1, "BS01_D", 1, npc.getObjectId(), npc.getX(), npc.getY(), npc.getZ()));
2411
+				startQuestTimer("stop_pc", 0, null, null, false);
2412
+				startQuestTimer("stop_npc", 0, npc, null, false);
2413
+				startQuestTimer("morph_16", 0, npc, null, false);
2414
+				GrandBossManager.getInstance().setBossStatus(FRINTEZZA, DEAD);
2415
+				long respawnTime = (long) Config.SPAWN_INTERVAL_FRINTEZZA + Rnd.get(-Config.RANDOM_SPAWN_TIME_FRINTEZZA, Config.RANDOM_SPAWN_TIME_FRINTEZZA);
2416
+				respawnTime *= 3600000;
2417
+				cancelQuestTimers("spawn_minion");
2418
+				cancelQuestTimers("frintezza_despawn");
2419
+				startQuestTimer("close", 0, null, null, false);
2420
+				startQuestTimer("rooms_del", 0, npc, null, false);
2421
+				startQuestTimer("minions_despawn", 0, null, null, false);
2422
+				startQuestTimer("remove_players", 900000, null, null, false);
2423
+				startQuestTimer("frintezza_unlock", respawnTime, null, null, false);
2424
+				StatsSet info = GrandBossManager.getInstance().getStatsSet(FRINTEZZA);
2425
+				info.set("respawn_time", System.currentTimeMillis() + respawnTime);
2426
+				GrandBossManager.getInstance().setStatsSet(FRINTEZZA, info);
2427
+				break;
2428
+			
2429
+			case HALL_ALARM_DEVICE:
2430
+				_KillHallAlarmDevice++;
2431
+				if (_KillHallAlarmDevice == 3) // open walls reb12
2432
+				{
2433
+					for (int i = 25150051; i <= 25150058; i++)
2434
+						DoorTable.getInstance().getDoor(i).openMe();
2435
+				}
2436
+				else if (_KillHallAlarmDevice == 4)
2437
+				{
2438
+					startQuestTimer("room1_del", 100, npc, null, false);
2439
+					startQuestTimer("room2_spawn", 100, npc, null, false);
2440
+					DoorTable.getInstance().getDoor(25150042).openMe();
2441
+					DoorTable.getInstance().getDoor(25150043).openMe();
2442
+				}
2443
+				break;
2444
+			
2445
+			case DARK_CHOIR_PLAYER:
2446
+				_KillDarkChoirPlayer++;
2447
+				if (_KillDarkChoirPlayer == 2)
2448
+				{
2449
+					DoorTable.getInstance().getDoor(25150042).closeMe();
2450
+					DoorTable.getInstance().getDoor(25150043).closeMe();
2451
+					for (int i = 25150061; i <= 25150070; i++)
2452
+						DoorTable.getInstance().getDoor(i).openMe();
2453
+					startQuestTimer("room2_spawn2", 1000, npc, null, false);
2454
+				}
2455
+				break;
2456
+			
2457
+			case DARK_CHOIR_CAPTAIN:
2458
+				_KillDarkChoirCaptain++;
2459
+				if (_KillDarkChoirCaptain == 8)
2460
+				{
2461
+					startQuestTimer("room2_del", 100, npc, null, false);
2462
+					DoorTable.getInstance().getDoor(25150045).openMe();
2463
+					DoorTable.getInstance().getDoor(25150046).openMe();
2464
+					startQuestTimer("waiting", Config.WAIT_TIME_FRINTEZZA, npc, null, false);
2465
+					cancelQuestTimers("room_final");
2466
+				}
2467
+				break;
2468
+		}
2469
+		return super.onKill(npc, killer, isPet);
2470
+	}
2471
+}
2472
\ No newline at end of file
2473
Index: config/npcs.properties
2474
===================================================================
2475
--- config/npcs.properties	(revision 5)
2476
+++ config/npcs.properties	(working copy)
2477
@@ -194,6 +194,22 @@
2478
 # Delay of appearance time of Frintezza. Value is minute.
2479
 FrintezzaWaitTime = 1
2480
 
2481
+# Delay of desappear time of Frintezza when inactive. Value is minute.
2482
+# Default : 15
2483
+FrintezzaDespawnTime = 5
2484
+
2485
+# Time to enter in the last room. Value is minute
2486
+# Default : 35
2487
+FrintezzaTimeChallenge = 5
2488
+
2489
+# Check Party
2490
+BypassPartiesCheck = True
2491
+
2492
+# Min and Max Party in Frintezza 
2493
+# Default Min = 4 | Max = 5
2494
+FrintezzaMinParties = 4
2495
+FrintezzaMaxParties = 5
2496
+
2497
 # ------------------------------------------------------------
2498
 # Orfen
2499
 # ------------------------------------------------------------
2500
2501
BossZone.xml
2502
    <zone id="110011" type="BossZone" shape="Cuboid" minZ="-5140" maxZ="-4000"><!-- Frintezza Boss -->
2503
        <stat name="InvadeTime" val="1800000" />
2504
        <node X="172176" Y="-74106" />
2505
        <node X="176284" Y="-90033" />
2506
    </zone>
2507
2508
--- aCis_datapack/data/html/default/32011.htm
2509
+++ aCis_datapack/data/html/default/32011.htm
2510
@@ -1,7 +1,7 @@
2511
 <html><body>
2512
 I feel an invisible barrier... Some sort of Magic Force Field has been put in place...<br>
2513
 ...? The guide of the Imperial mausoleum seems to have something to say.<br><br>
2514
-<a action="bypass -h npc_%objectId%_Quest FinalEmperialTomb">Enter the Magic Force Field</a><br>
2515
+<a action="bypass -h npc_%objectId%_Quest Frintezza">Enter the Magic Force Field</a><br>
2516
 <a action="bypass -h npc_%objectId%_Chat 1">Listen to Imperial Tomb Guide</a><br>
2517
 <a action="bypass -h npc_%objectId%_Quest">Quest</a>
2518
 </body></html>