warc222

aCis 382 Interlude Frintezza I adapted warc222

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