Kamaloka.java 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842
  1. /*
  2. * Copyright (C) 2004-2013 L2J DataPack
  3. *
  4. * This file is part of L2J DataPack.
  5. *
  6. * L2J DataPack is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * L2J DataPack is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. package instances.Kamaloka;
  20. import java.util.ArrayList;
  21. import java.util.Arrays;
  22. import java.util.Calendar;
  23. import java.util.List;
  24. import java.util.Map;
  25. import java.util.logging.Level;
  26. import com.l2jserver.gameserver.datatables.SkillTable;
  27. import com.l2jserver.gameserver.instancemanager.InstanceManager;
  28. import com.l2jserver.gameserver.model.L2Party;
  29. import com.l2jserver.gameserver.model.L2Spawn;
  30. import com.l2jserver.gameserver.model.L2World;
  31. import com.l2jserver.gameserver.model.Location;
  32. import com.l2jserver.gameserver.model.actor.L2Character;
  33. import com.l2jserver.gameserver.model.actor.L2Npc;
  34. import com.l2jserver.gameserver.model.actor.instance.L2MonsterInstance;
  35. import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
  36. import com.l2jserver.gameserver.model.effects.L2Effect;
  37. import com.l2jserver.gameserver.model.entity.Instance;
  38. import com.l2jserver.gameserver.model.instancezone.InstanceWorld;
  39. import com.l2jserver.gameserver.model.quest.Quest;
  40. import com.l2jserver.gameserver.model.skills.L2Skill;
  41. import com.l2jserver.gameserver.network.SystemMessageId;
  42. import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
  43. public class Kamaloka extends Quest
  44. {
  45. /*
  46. * Reset time for all kamaloka Default: 6:30AM on server time
  47. */
  48. private static final int RESET_HOUR = 6;
  49. private static final int RESET_MIN = 30;
  50. /*
  51. * Time after which instance without players will be destroyed Default: 5 minutes
  52. */
  53. private static final int EMPTY_DESTROY_TIME = 5;
  54. /*
  55. * Time to destroy instance (and eject players away) after boss defeat Default: 5 minutes
  56. */
  57. private static final int EXIT_TIME = 5;
  58. /*
  59. * Maximum level difference between players level and kamaloka level Default: 5
  60. */
  61. private static final int MAX_LEVEL_DIFFERENCE = 5;
  62. /*
  63. * If true shaman in the first room will have same npcId as other mobs, making radar useless Default: true (but not retail like)
  64. */
  65. private static final boolean STEALTH_SHAMAN = true;
  66. /*
  67. * Hardcoded instance ids for kamaloka
  68. */
  69. private static final int[] INSTANCE_IDS =
  70. {
  71. 57,
  72. 58,
  73. 73,
  74. 60,
  75. 61,
  76. 74,
  77. 63,
  78. 64,
  79. 75,
  80. 66,
  81. 67,
  82. 76,
  83. 69,
  84. 70,
  85. 77,
  86. 72,
  87. 78,
  88. 79,
  89. 134
  90. };
  91. /*
  92. * Level of the kamaloka
  93. */
  94. private static final int[] LEVEL =
  95. {
  96. 23,
  97. 26,
  98. 29,
  99. 33,
  100. 36,
  101. 39,
  102. 43,
  103. 46,
  104. 49,
  105. 53,
  106. 56,
  107. 59,
  108. 63,
  109. 66,
  110. 69,
  111. 73,
  112. 78,
  113. 81,
  114. 83
  115. };
  116. /*
  117. * Duration of the instance, minutes
  118. */
  119. private static final int[] DURATION =
  120. {
  121. 30,
  122. 30,
  123. 45,
  124. 30,
  125. 30,
  126. 45,
  127. 30,
  128. 30,
  129. 45,
  130. 30,
  131. 30,
  132. 45,
  133. 30,
  134. 30,
  135. 45,
  136. 30,
  137. 45,
  138. 45,
  139. 45
  140. };
  141. /*
  142. * Maximum party size for the instance
  143. */
  144. private static final int[] MAX_PARTY_SIZE =
  145. {
  146. 6,
  147. 6,
  148. 9,
  149. 6,
  150. 6,
  151. 9,
  152. 6,
  153. 6,
  154. 9,
  155. 6,
  156. 6,
  157. 9,
  158. 6,
  159. 6,
  160. 9,
  161. 6,
  162. 9,
  163. 9,
  164. 9
  165. };
  166. /*
  167. * List of buffs NOT removed on enter from player and pet On retail only newbie guide buffs not removed CAUTION: array must be sorted in ascension order !
  168. */
  169. private static final int[] BUFFS_WHITELIST =
  170. {
  171. 5627,
  172. 5628,
  173. 5629,
  174. 5630,
  175. 5631,
  176. 5632,
  177. 5633,
  178. 5634,
  179. 5635,
  180. 5636,
  181. 5637,
  182. 5950
  183. };
  184. /*
  185. * Teleport points into instances x, y, z
  186. */
  187. private static final Location[] TELEPORTS =
  188. {
  189. new Location(-88429, -220629, -7903),
  190. new Location(-82464, -219532, -7899),
  191. new Location(-10700, -174882, -10936), // -76280, -185540, -10936
  192. new Location(-89683, -213573, -8106),
  193. new Location(-81413, -213568, -8104),
  194. new Location(-10700, -174882, -10936), // -76280, -174905, -10936
  195. new Location(-89759, -206143, -8120),
  196. new Location(-81415, -206078, -8107),
  197. new Location(-10700, -174882, -10936),
  198. new Location(-56999, -219856, -8117),
  199. new Location(-48794, -220261, -8075),
  200. new Location(-10700, -174882, -10936),
  201. new Location(-56940, -212939, -8072),
  202. new Location(-55566, -206139, -8120),
  203. new Location(-10700, -174882, -10936),
  204. new Location(-49805, -206139, -8117),
  205. new Location(-10700, -174882, -10936),
  206. new Location(-10700, -174882, -10936),
  207. new Location(22003, -174886, -10900),
  208. };
  209. /*
  210. * Respawn delay for the mobs in the first room, seconds Default: 25
  211. */
  212. private static final int FIRST_ROOM_RESPAWN_DELAY = 25;
  213. /*
  214. * First room information, null if room not spawned Skill is casted on the boss when shaman is defeated and mobs respawn stopped Default: 5699 (decrease pdef) shaman npcId, minions npcId, skillId, skillLvl
  215. */
  216. private static final int[][] FIRST_ROOM =
  217. {
  218. null,
  219. null,
  220. {
  221. 22485,
  222. 22486,
  223. 5699,
  224. 1
  225. },
  226. null,
  227. null,
  228. {
  229. 22488,
  230. 22489,
  231. 5699,
  232. 2
  233. },
  234. null,
  235. null,
  236. {
  237. 22491,
  238. 22492,
  239. 5699,
  240. 3
  241. },
  242. null,
  243. null,
  244. {
  245. 22494,
  246. 22495,
  247. 5699,
  248. 4
  249. },
  250. null,
  251. null,
  252. {
  253. 22497,
  254. 22498,
  255. 5699,
  256. 5
  257. },
  258. null,
  259. {
  260. 22500,
  261. 22501,
  262. 5699,
  263. 6
  264. },
  265. {
  266. 22503,
  267. 22504,
  268. 5699,
  269. 7
  270. },
  271. {
  272. 25706,
  273. 25707,
  274. 5699,
  275. 7
  276. }
  277. };
  278. /*
  279. * First room spawns, null if room not spawned x, y, z
  280. */
  281. private static final int[][][] FIRST_ROOM_SPAWNS =
  282. {
  283. null,
  284. null,
  285. {
  286. {
  287. -12381,
  288. -174973,
  289. -10955
  290. },
  291. {
  292. -12413,
  293. -174905,
  294. -10955
  295. },
  296. {
  297. -12377,
  298. -174838,
  299. -10953
  300. },
  301. {
  302. -12316,
  303. -174903,
  304. -10953
  305. },
  306. {
  307. -12326,
  308. -174786,
  309. -10953
  310. },
  311. {
  312. -12330,
  313. -175024,
  314. -10953
  315. },
  316. {
  317. -12211,
  318. -174900,
  319. -10955
  320. },
  321. {
  322. -12238,
  323. -174849,
  324. -10953
  325. },
  326. {
  327. -12233,
  328. -174954,
  329. -10953
  330. }
  331. },
  332. null,
  333. null,
  334. {
  335. {
  336. -12381,
  337. -174973,
  338. -10955
  339. },
  340. {
  341. -12413,
  342. -174905,
  343. -10955
  344. },
  345. {
  346. -12377,
  347. -174838,
  348. -10953
  349. },
  350. {
  351. -12316,
  352. -174903,
  353. -10953
  354. },
  355. {
  356. -12326,
  357. -174786,
  358. -10953
  359. },
  360. {
  361. -12330,
  362. -175024,
  363. -10953
  364. },
  365. {
  366. -12211,
  367. -174900,
  368. -10955
  369. },
  370. {
  371. -12238,
  372. -174849,
  373. -10953
  374. },
  375. {
  376. -12233,
  377. -174954,
  378. -10953
  379. }
  380. },
  381. null,
  382. null,
  383. {
  384. {
  385. -12381,
  386. -174973,
  387. -10955
  388. },
  389. {
  390. -12413,
  391. -174905,
  392. -10955
  393. },
  394. {
  395. -12377,
  396. -174838,
  397. -10953
  398. },
  399. {
  400. -12316,
  401. -174903,
  402. -10953
  403. },
  404. {
  405. -12326,
  406. -174786,
  407. -10953
  408. },
  409. {
  410. -12330,
  411. -175024,
  412. -10953
  413. },
  414. {
  415. -12211,
  416. -174900,
  417. -10955
  418. },
  419. {
  420. -12238,
  421. -174849,
  422. -10953
  423. },
  424. {
  425. -12233,
  426. -174954,
  427. -10953
  428. }
  429. },
  430. null,
  431. null,
  432. {
  433. {
  434. -12381,
  435. -174973,
  436. -10955
  437. },
  438. {
  439. -12413,
  440. -174905,
  441. -10955
  442. },
  443. {
  444. -12377,
  445. -174838,
  446. -10953
  447. },
  448. {
  449. -12316,
  450. -174903,
  451. -10953
  452. },
  453. {
  454. -12326,
  455. -174786,
  456. -10953
  457. },
  458. {
  459. -12330,
  460. -175024,
  461. -10953
  462. },
  463. {
  464. -12211,
  465. -174900,
  466. -10955
  467. },
  468. {
  469. -12238,
  470. -174849,
  471. -10953
  472. },
  473. {
  474. -12233,
  475. -174954,
  476. -10953
  477. }
  478. },
  479. null,
  480. null,
  481. {
  482. {
  483. -12381,
  484. -174973,
  485. -10955
  486. },
  487. {
  488. -12413,
  489. -174905,
  490. -10955
  491. },
  492. {
  493. -12377,
  494. -174838,
  495. -10953
  496. },
  497. {
  498. -12316,
  499. -174903,
  500. -10953
  501. },
  502. {
  503. -12326,
  504. -174786,
  505. -10953
  506. },
  507. {
  508. -12330,
  509. -175024,
  510. -10953
  511. },
  512. {
  513. -12211,
  514. -174900,
  515. -10955
  516. },
  517. {
  518. -12238,
  519. -174849,
  520. -10953
  521. },
  522. {
  523. -12233,
  524. -174954,
  525. -10953
  526. }
  527. },
  528. null,
  529. {
  530. {
  531. -12381,
  532. -174973,
  533. -10955
  534. },
  535. {
  536. -12413,
  537. -174905,
  538. -10955
  539. },
  540. {
  541. -12377,
  542. -174838,
  543. -10953
  544. },
  545. {
  546. -12316,
  547. -174903,
  548. -10953
  549. },
  550. {
  551. -12326,
  552. -174786,
  553. -10953
  554. },
  555. {
  556. -12330,
  557. -175024,
  558. -10953
  559. },
  560. {
  561. -12211,
  562. -174900,
  563. -10955
  564. },
  565. {
  566. -12238,
  567. -174849,
  568. -10953
  569. },
  570. {
  571. -12233,
  572. -174954,
  573. -10953
  574. }
  575. },
  576. {
  577. {
  578. -12381,
  579. -174973,
  580. -10955
  581. },
  582. {
  583. -12413,
  584. -174905,
  585. -10955
  586. },
  587. {
  588. -12377,
  589. -174838,
  590. -10953
  591. },
  592. {
  593. -12316,
  594. -174903,
  595. -10953
  596. },
  597. {
  598. -12326,
  599. -174786,
  600. -10953
  601. },
  602. {
  603. -12330,
  604. -175024,
  605. -10953
  606. },
  607. {
  608. -12211,
  609. -174900,
  610. -10955
  611. },
  612. {
  613. -12238,
  614. -174849,
  615. -10953
  616. },
  617. {
  618. -12233,
  619. -174954,
  620. -10953
  621. }
  622. },
  623. {
  624. {
  625. 20409,
  626. -174827,
  627. -10912
  628. },
  629. {
  630. 20409,
  631. -174947,
  632. -10912
  633. },
  634. {
  635. 20494,
  636. -174887,
  637. -10912
  638. },
  639. {
  640. 20494,
  641. -174767,
  642. -10912
  643. },
  644. {
  645. 20614,
  646. -174887,
  647. -10912
  648. },
  649. {
  650. 20579,
  651. -174827,
  652. -10912
  653. },
  654. {
  655. 20579,
  656. -174947,
  657. -10912
  658. },
  659. {
  660. 20494,
  661. -175007,
  662. -10912
  663. },
  664. {
  665. 20374,
  666. -174887,
  667. -10912
  668. }
  669. }
  670. };
  671. /*
  672. * Second room information, null if room not spawned Skill is casted on the boss when all mobs are defeated Default: 5700 (decrease mdef) npcId, skillId, skillLvl
  673. */
  674. private static final int[][] SECOND_ROOM =
  675. {
  676. null,
  677. null,
  678. {
  679. 22487,
  680. 5700,
  681. 1
  682. },
  683. null,
  684. null,
  685. {
  686. 22490,
  687. 5700,
  688. 2
  689. },
  690. null,
  691. null,
  692. {
  693. 22493,
  694. 5700,
  695. 3
  696. },
  697. null,
  698. null,
  699. {
  700. 22496,
  701. 5700,
  702. 4
  703. },
  704. null,
  705. null,
  706. {
  707. 22499,
  708. 5700,
  709. 5
  710. },
  711. null,
  712. {
  713. 22502,
  714. 5700,
  715. 6
  716. },
  717. {
  718. 22505,
  719. 5700,
  720. 7
  721. },
  722. {
  723. 25708,
  724. 5700,
  725. 7
  726. }
  727. };
  728. /*
  729. * Spawns for second room, null if room not spawned x, y, z
  730. */
  731. private static final int[][][] SECOND_ROOM_SPAWNS =
  732. {
  733. null,
  734. null,
  735. {
  736. {
  737. -14547,
  738. -174901,
  739. -10690
  740. },
  741. {
  742. -14543,
  743. -175030,
  744. -10690
  745. },
  746. {
  747. -14668,
  748. -174900,
  749. -10690
  750. },
  751. {
  752. -14538,
  753. -174774,
  754. -10690
  755. },
  756. {
  757. -14410,
  758. -174904,
  759. -10690
  760. }
  761. },
  762. null,
  763. null,
  764. {
  765. {
  766. -14547,
  767. -174901,
  768. -10690
  769. },
  770. {
  771. -14543,
  772. -175030,
  773. -10690
  774. },
  775. {
  776. -14668,
  777. -174900,
  778. -10690
  779. },
  780. {
  781. -14538,
  782. -174774,
  783. -10690
  784. },
  785. {
  786. -14410,
  787. -174904,
  788. -10690
  789. }
  790. },
  791. null,
  792. null,
  793. {
  794. {
  795. -14547,
  796. -174901,
  797. -10690
  798. },
  799. {
  800. -14543,
  801. -175030,
  802. -10690
  803. },
  804. {
  805. -14668,
  806. -174900,
  807. -10690
  808. },
  809. {
  810. -14538,
  811. -174774,
  812. -10690
  813. },
  814. {
  815. -14410,
  816. -174904,
  817. -10690
  818. }
  819. },
  820. null,
  821. null,
  822. {
  823. {
  824. -14547,
  825. -174901,
  826. -10690
  827. },
  828. {
  829. -14543,
  830. -175030,
  831. -10690
  832. },
  833. {
  834. -14668,
  835. -174900,
  836. -10690
  837. },
  838. {
  839. -14538,
  840. -174774,
  841. -10690
  842. },
  843. {
  844. -14410,
  845. -174904,
  846. -10690
  847. }
  848. },
  849. null,
  850. null,
  851. {
  852. {
  853. -14547,
  854. -174901,
  855. -10690
  856. },
  857. {
  858. -14543,
  859. -175030,
  860. -10690
  861. },
  862. {
  863. -14668,
  864. -174900,
  865. -10690
  866. },
  867. {
  868. -14538,
  869. -174774,
  870. -10690
  871. },
  872. {
  873. -14410,
  874. -174904,
  875. -10690
  876. }
  877. },
  878. null,
  879. {
  880. {
  881. -14547,
  882. -174901,
  883. -10690
  884. },
  885. {
  886. -14543,
  887. -175030,
  888. -10690
  889. },
  890. {
  891. -14668,
  892. -174900,
  893. -10690
  894. },
  895. {
  896. -14538,
  897. -174774,
  898. -10690
  899. },
  900. {
  901. -14410,
  902. -174904,
  903. -10690
  904. }
  905. },
  906. {
  907. {
  908. -14547,
  909. -174901,
  910. -10690
  911. },
  912. {
  913. -14543,
  914. -175030,
  915. -10690
  916. },
  917. {
  918. -14668,
  919. -174900,
  920. -10690
  921. },
  922. {
  923. -14538,
  924. -174774,
  925. -10690
  926. },
  927. {
  928. -14410,
  929. -174904,
  930. -10690
  931. }
  932. },
  933. {
  934. {
  935. 18175,
  936. -174991,
  937. -10653
  938. },
  939. {
  940. 18070,
  941. -174890,
  942. -10655
  943. },
  944. {
  945. 18157,
  946. -174886,
  947. -10655
  948. },
  949. {
  950. 18249,
  951. -174885,
  952. -10653
  953. },
  954. {
  955. 18144,
  956. -174821,
  957. -10648
  958. }
  959. }
  960. };
  961. // miniboss info
  962. // skill is casted on the boss when miniboss is defeated
  963. // npcId, x, y, z, skill id, skill level
  964. /*
  965. * Miniboss information, null if miniboss not spawned Skill is casted on the boss when miniboss is defeated Default: 5701 (decrease patk) npcId, x, y, z, skillId, skillLvl
  966. */
  967. private static final int[][] MINIBOSS =
  968. {
  969. null,
  970. null,
  971. {
  972. 25616,
  973. -16874,
  974. -174900,
  975. -10427,
  976. 5701,
  977. 1
  978. },
  979. null,
  980. null,
  981. {
  982. 25617,
  983. -16874,
  984. -174900,
  985. -10427,
  986. 5701,
  987. 2
  988. },
  989. null,
  990. null,
  991. {
  992. 25618,
  993. -16874,
  994. -174900,
  995. -10427,
  996. 5701,
  997. 3
  998. },
  999. null,
  1000. null,
  1001. {
  1002. 25619,
  1003. -16874,
  1004. -174900,
  1005. -10427,
  1006. 5701,
  1007. 4
  1008. },
  1009. null,
  1010. null,
  1011. {
  1012. 25620,
  1013. -16874,
  1014. -174900,
  1015. -10427,
  1016. 5701,
  1017. 5
  1018. },
  1019. null,
  1020. {
  1021. 25621,
  1022. -16874,
  1023. -174900,
  1024. -10427,
  1025. 5701,
  1026. 6
  1027. },
  1028. {
  1029. 25622,
  1030. -16874,
  1031. -174900,
  1032. -10427,
  1033. 5701,
  1034. 7
  1035. },
  1036. {
  1037. 25709,
  1038. 15828,
  1039. -174885,
  1040. -10384,
  1041. 5701,
  1042. 7
  1043. }
  1044. };
  1045. /*
  1046. * Bosses of the kamaloka Instance ends when boss is defeated npcId, x, y, z
  1047. */
  1048. private static final int[][] BOSS =
  1049. {
  1050. {
  1051. 18554,
  1052. -88998,
  1053. -220077,
  1054. -7892
  1055. },
  1056. {
  1057. 18555,
  1058. -81891,
  1059. -220078,
  1060. -7893
  1061. },
  1062. {
  1063. 29129,
  1064. -20659,
  1065. -174903,
  1066. -9983
  1067. },
  1068. {
  1069. 18558,
  1070. -89183,
  1071. -213564,
  1072. -8100
  1073. },
  1074. {
  1075. 18559,
  1076. -81937,
  1077. -213566,
  1078. -8100
  1079. },
  1080. {
  1081. 29132,
  1082. -20659,
  1083. -174903,
  1084. -9983
  1085. },
  1086. {
  1087. 18562,
  1088. -89054,
  1089. -206144,
  1090. -8115
  1091. },
  1092. {
  1093. 18564,
  1094. -81937,
  1095. -206077,
  1096. -8100
  1097. },
  1098. {
  1099. 29135,
  1100. -20659,
  1101. -174903,
  1102. -9983
  1103. },
  1104. {
  1105. 18566,
  1106. -56281,
  1107. -219859,
  1108. -8115
  1109. },
  1110. {
  1111. 18568,
  1112. -49336,
  1113. -220260,
  1114. -8068
  1115. },
  1116. {
  1117. 29138,
  1118. -20659,
  1119. -174903,
  1120. -9983
  1121. },
  1122. {
  1123. 18571,
  1124. -56415,
  1125. -212939,
  1126. -8068
  1127. },
  1128. {
  1129. 18573,
  1130. -56281,
  1131. -206140,
  1132. -8115
  1133. },
  1134. {
  1135. 29141,
  1136. -20659,
  1137. -174903,
  1138. -9983
  1139. },
  1140. {
  1141. 18577,
  1142. -49084,
  1143. -206140,
  1144. -8115
  1145. },
  1146. {
  1147. 29144,
  1148. -20659,
  1149. -174903,
  1150. -9983
  1151. },
  1152. {
  1153. 29147,
  1154. -20659,
  1155. -174903,
  1156. -9983
  1157. },
  1158. {
  1159. 25710,
  1160. 12047,
  1161. -174887,
  1162. -9944
  1163. }
  1164. };
  1165. /*
  1166. * Escape telepoters spawns, null if not spawned x, y, z
  1167. */
  1168. private static final int[][] TELEPORTERS =
  1169. {
  1170. null,
  1171. null,
  1172. {
  1173. -10865,
  1174. -174905,
  1175. -10944
  1176. },
  1177. null,
  1178. null,
  1179. {
  1180. -10865,
  1181. -174905,
  1182. -10944
  1183. },
  1184. null,
  1185. null,
  1186. {
  1187. -10865,
  1188. -174905,
  1189. -10944
  1190. },
  1191. null,
  1192. null,
  1193. {
  1194. -10865,
  1195. -174905,
  1196. -10944
  1197. },
  1198. null,
  1199. null,
  1200. {
  1201. -10865,
  1202. -174905,
  1203. -10944
  1204. },
  1205. null,
  1206. {
  1207. -10865,
  1208. -174905,
  1209. -10944
  1210. },
  1211. {
  1212. -10865,
  1213. -174905,
  1214. -10944
  1215. },
  1216. {
  1217. 21837,
  1218. -174885,
  1219. -10904
  1220. }
  1221. };
  1222. /*
  1223. * Escape teleporter npcId
  1224. */
  1225. private static final int TELEPORTER = 32496;
  1226. /** Kamaloka captains (start npc's) npcIds. */
  1227. private static final int[] CAPTAINS =
  1228. {
  1229. 30332,
  1230. 30071,
  1231. 30916,
  1232. 30196,
  1233. 31981,
  1234. 31340
  1235. };
  1236. protected class KamaWorld extends InstanceWorld
  1237. {
  1238. public int index; // 0-18 index of the kama type in arrays
  1239. public int shaman = 0; // objectId of the shaman
  1240. public List<L2Spawn> firstRoom; // list of the spawns in the first room (excluding shaman)
  1241. public List<Integer> secondRoom;// list of objectIds mobs in the second room
  1242. public int miniBoss = 0; // objectId of the miniboss
  1243. public L2Npc boss = null; // boss
  1244. }
  1245. /**
  1246. * Check if party with player as leader allowed to enter
  1247. * @param player party leader
  1248. * @param index (0-18) index of the kamaloka in arrays
  1249. * @return true if party allowed to enter
  1250. */
  1251. private static final boolean checkConditions(L2PcInstance player, int index)
  1252. {
  1253. final L2Party party = player.getParty();
  1254. // player must be in party
  1255. if (party == null)
  1256. {
  1257. player.sendPacket(SystemMessageId.NOT_IN_PARTY_CANT_ENTER);
  1258. return false;
  1259. }
  1260. // ...and be party leader
  1261. if (party.getLeader() != player)
  1262. {
  1263. player.sendPacket(SystemMessageId.ONLY_PARTY_LEADER_CAN_ENTER);
  1264. return false;
  1265. }
  1266. // party must not exceed max size for selected instance
  1267. if (party.getMemberCount() > MAX_PARTY_SIZE[index])
  1268. {
  1269. player.sendPacket(SystemMessageId.PARTY_EXCEEDED_THE_LIMIT_CANT_ENTER);
  1270. return false;
  1271. }
  1272. // get level of the instance
  1273. final int level = LEVEL[index];
  1274. // and client name
  1275. final String instanceName = InstanceManager.getInstance().getInstanceIdName(INSTANCE_IDS[index]);
  1276. Map<Integer, Long> instanceTimes;
  1277. // for each party member
  1278. for (L2PcInstance partyMember : party.getMembers())
  1279. {
  1280. // player level must be in range
  1281. if (Math.abs(partyMember.getLevel() - level) > MAX_LEVEL_DIFFERENCE)
  1282. {
  1283. SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.C1_LEVEL_REQUIREMENT_NOT_SUFFICIENT);
  1284. sm.addPcName(partyMember);
  1285. player.sendPacket(sm);
  1286. return false;
  1287. }
  1288. // player must be near party leader
  1289. if (!partyMember.isInsideRadius(player, 1000, true, true))
  1290. {
  1291. SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.C1_IS_IN_LOCATION_THAT_CANNOT_BE_ENTERED);
  1292. sm.addPcName(partyMember);
  1293. player.sendPacket(sm);
  1294. return false;
  1295. }
  1296. // get instances reenter times for player
  1297. instanceTimes = InstanceManager.getInstance().getAllInstanceTimes(partyMember.getObjectId());
  1298. if (instanceTimes != null)
  1299. {
  1300. for (int id : instanceTimes.keySet())
  1301. {
  1302. // find instance with same name (kamaloka or labyrinth)
  1303. // TODO: Zoey76: Don't use instance name, use other system.
  1304. if (!instanceName.equals(InstanceManager.getInstance().getInstanceIdName(id)))
  1305. {
  1306. continue;
  1307. }
  1308. // if found instance still can't be reentered - exit
  1309. if (System.currentTimeMillis() < instanceTimes.get(id))
  1310. {
  1311. SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.C1_MAY_NOT_REENTER_YET);
  1312. sm.addPcName(partyMember);
  1313. player.sendPacket(sm);
  1314. return false;
  1315. }
  1316. }
  1317. }
  1318. }
  1319. return true;
  1320. }
  1321. /**
  1322. * Removing all buffs from player and pet except BUFFS_WHITELIST
  1323. * @param ch player
  1324. */
  1325. private static final void removeBuffs(L2Character ch)
  1326. {
  1327. for (L2Effect e : ch.getAllEffects())
  1328. {
  1329. if (e == null)
  1330. {
  1331. continue;
  1332. }
  1333. L2Skill skill = e.getSkill();
  1334. if (skill.isDebuff() || skill.isStayAfterDeath())
  1335. {
  1336. continue;
  1337. }
  1338. if (Arrays.binarySearch(BUFFS_WHITELIST, skill.getId()) >= 0)
  1339. {
  1340. continue;
  1341. }
  1342. e.exit();
  1343. }
  1344. if (ch.getSummon() != null)
  1345. {
  1346. for (L2Effect e : ch.getSummon().getAllEffects())
  1347. {
  1348. if (e == null)
  1349. {
  1350. continue;
  1351. }
  1352. L2Skill skill = e.getSkill();
  1353. if (skill.isDebuff() || skill.isStayAfterDeath())
  1354. {
  1355. continue;
  1356. }
  1357. if (Arrays.binarySearch(BUFFS_WHITELIST, skill.getId()) >= 0)
  1358. {
  1359. continue;
  1360. }
  1361. e.exit();
  1362. }
  1363. }
  1364. }
  1365. /**
  1366. * Handling enter of the players into kamaloka
  1367. * @param player party leader
  1368. * @param index (0-18) kamaloka index in arrays
  1369. */
  1370. private final synchronized void enterInstance(L2PcInstance player, int index)
  1371. {
  1372. int templateId;
  1373. try
  1374. {
  1375. templateId = INSTANCE_IDS[index];
  1376. }
  1377. catch (ArrayIndexOutOfBoundsException e)
  1378. {
  1379. throw e;
  1380. }
  1381. // check for existing instances for this player
  1382. InstanceWorld world = InstanceManager.getInstance().getPlayerWorld(player);
  1383. // player already in the instance
  1384. if (world != null)
  1385. {
  1386. // but not in kamaloka
  1387. if (!(world instanceof KamaWorld) || (world.getTemplateId() != templateId))
  1388. {
  1389. player.sendPacket(SystemMessageId.ALREADY_ENTERED_ANOTHER_INSTANCE_CANT_ENTER);
  1390. return;
  1391. }
  1392. // check for level difference again on reenter
  1393. if (Math.abs(player.getLevel() - LEVEL[((KamaWorld) world).index]) > MAX_LEVEL_DIFFERENCE)
  1394. {
  1395. SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.C1_LEVEL_REQUIREMENT_NOT_SUFFICIENT);
  1396. sm.addPcName(player);
  1397. player.sendPacket(sm);
  1398. return;
  1399. }
  1400. // check what instance still exist
  1401. Instance inst = InstanceManager.getInstance().getInstance(world.getInstanceId());
  1402. if (inst != null)
  1403. {
  1404. removeBuffs(player);
  1405. teleportPlayer(player, TELEPORTS[index], world.getInstanceId());
  1406. }
  1407. return;
  1408. }
  1409. // Creating new kamaloka instance
  1410. if (!checkConditions(player, index))
  1411. {
  1412. return;
  1413. }
  1414. // Creating dynamic instance without template
  1415. final int instanceId = InstanceManager.getInstance().createDynamicInstance(null);
  1416. final Instance inst = InstanceManager.getInstance().getInstance(instanceId);
  1417. // set name for the kamaloka
  1418. inst.setName(InstanceManager.getInstance().getInstanceIdName(templateId));
  1419. // set return location
  1420. inst.setSpawnLoc(new Location(player));
  1421. // disable summon friend into instance
  1422. inst.setAllowSummon(false);
  1423. // set duration and empty destroy time
  1424. inst.setDuration(DURATION[index] * 60000);
  1425. inst.setEmptyDestroyTime(EMPTY_DESTROY_TIME * 60000);
  1426. // Creating new instanceWorld, using our instanceId and templateId
  1427. world = new KamaWorld();
  1428. world.setInstanceId(instanceId);
  1429. world.setTemplateId(templateId);
  1430. // set index for easy access to the arrays
  1431. ((KamaWorld) world).index = index;
  1432. InstanceManager.getInstance().addWorld(world);
  1433. world.setStatus(0);
  1434. // spawn npcs
  1435. spawnKama((KamaWorld) world);
  1436. // and finally teleport party into instance
  1437. final L2Party party = player.getParty();
  1438. for (L2PcInstance partyMember : party.getMembers())
  1439. {
  1440. world.addAllowed(partyMember.getObjectId());
  1441. removeBuffs(partyMember);
  1442. teleportPlayer(partyMember, TELEPORTS[index], instanceId);
  1443. }
  1444. return;
  1445. }
  1446. /**
  1447. * Called on instance finish and handles reenter time for instance
  1448. * @param world instanceWorld
  1449. */
  1450. private static final void finishInstance(InstanceWorld world)
  1451. {
  1452. if (world instanceof KamaWorld)
  1453. {
  1454. Calendar reenter = Calendar.getInstance();
  1455. reenter.set(Calendar.MINUTE, RESET_MIN);
  1456. // if time is >= RESET_HOUR - roll to the next day
  1457. if (reenter.get(Calendar.HOUR_OF_DAY) >= RESET_HOUR)
  1458. {
  1459. reenter.add(Calendar.DATE, 1);
  1460. }
  1461. reenter.set(Calendar.HOUR_OF_DAY, RESET_HOUR);
  1462. SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.INSTANT_ZONE_S1_RESTRICTED);
  1463. sm.addInstanceName(world.getTemplateId());
  1464. // set instance reenter time for all allowed players
  1465. for (int objectId : world.getAllowed())
  1466. {
  1467. L2PcInstance obj = L2World.getInstance().getPlayer(objectId);
  1468. if ((obj != null) && obj.isOnline())
  1469. {
  1470. InstanceManager.getInstance().setInstanceTime(objectId, world.getTemplateId(), reenter.getTimeInMillis());
  1471. obj.sendPacket(sm);
  1472. }
  1473. }
  1474. // destroy instance after EXIT_TIME
  1475. Instance inst = InstanceManager.getInstance().getInstance(world.getInstanceId());
  1476. inst.setDuration(EXIT_TIME * 60000);
  1477. inst.setEmptyDestroyTime(0);
  1478. }
  1479. }
  1480. /**
  1481. * Spawn all NPCs in kamaloka
  1482. * @param world instanceWorld
  1483. */
  1484. @SuppressWarnings("all")
  1485. private final void spawnKama(KamaWorld world)
  1486. {
  1487. int[] npcs;
  1488. int[][] spawns;
  1489. L2Npc npc;
  1490. final int index = world.index;
  1491. // first room
  1492. npcs = FIRST_ROOM[index];
  1493. spawns = FIRST_ROOM_SPAWNS[index];
  1494. if (npcs != null)
  1495. {
  1496. world.firstRoom = new ArrayList<L2Spawn>(spawns.length - 1);
  1497. int shaman = getRandom(spawns.length); // random position for shaman
  1498. for (int i = 0; i < spawns.length; i++)
  1499. {
  1500. if (i == shaman)
  1501. {
  1502. // stealth shaman use same npcId as other mobs
  1503. npc = addSpawn(STEALTH_SHAMAN ? npcs[1] : npcs[0], spawns[i][0], spawns[i][1], spawns[i][2], 0, false, 0, false, world.getInstanceId());
  1504. world.shaman = npc.getObjectId();
  1505. }
  1506. else
  1507. {
  1508. npc = addSpawn(npcs[1], spawns[i][0], spawns[i][1], spawns[i][2], 0, false, 0, false, world.getInstanceId());
  1509. L2Spawn spawn = npc.getSpawn();
  1510. spawn.setRespawnDelay(FIRST_ROOM_RESPAWN_DELAY);
  1511. spawn.setAmount(1);
  1512. spawn.startRespawn();
  1513. world.firstRoom.add(spawn); // store mobs spawns
  1514. }
  1515. npc.setIsNoRndWalk(true);
  1516. }
  1517. }
  1518. // second room
  1519. npcs = SECOND_ROOM[index];
  1520. spawns = SECOND_ROOM_SPAWNS[index];
  1521. if (npcs != null)
  1522. {
  1523. world.secondRoom = new ArrayList<Integer>(spawns.length);
  1524. for (int[] spawn : spawns)
  1525. {
  1526. npc = addSpawn(npcs[0], spawn[0], spawn[1], spawn[2], 0, false, 0, false, world.getInstanceId());
  1527. npc.setIsNoRndWalk(true);
  1528. world.secondRoom.add(npc.getObjectId());
  1529. }
  1530. }
  1531. // miniboss
  1532. if (MINIBOSS[index] != null)
  1533. {
  1534. npc = addSpawn(MINIBOSS[index][0], MINIBOSS[index][1], MINIBOSS[index][2], MINIBOSS[index][3], 0, false, 0, false, world.getInstanceId());
  1535. npc.setIsNoRndWalk(true);
  1536. world.miniBoss = npc.getObjectId();
  1537. }
  1538. // escape teleporter
  1539. if (TELEPORTERS[index] != null)
  1540. {
  1541. addSpawn(TELEPORTER, TELEPORTERS[index][0], TELEPORTERS[index][1], TELEPORTERS[index][2], 0, false, 0, false, world.getInstanceId());
  1542. }
  1543. // boss
  1544. npc = addSpawn(BOSS[index][0], BOSS[index][1], BOSS[index][2], BOSS[index][3], 0, false, 0, false, world.getInstanceId());
  1545. ((L2MonsterInstance) npc).setOnKillDelay(100);
  1546. world.boss = npc;
  1547. }
  1548. /**
  1549. * Handles only player's enter, single parameter - integer kamaloka index
  1550. */
  1551. @Override
  1552. public final String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
  1553. {
  1554. if (npc == null)
  1555. {
  1556. return "";
  1557. }
  1558. try
  1559. {
  1560. enterInstance(player, Integer.parseInt(event));
  1561. }
  1562. catch (Exception e)
  1563. {
  1564. _log.log(Level.WARNING, "", e);
  1565. }
  1566. return "";
  1567. }
  1568. /**
  1569. * Talk with captains and using of the escape teleporter
  1570. */
  1571. @Override
  1572. public final String onTalk(L2Npc npc, L2PcInstance player)
  1573. {
  1574. final int npcId = npc.getNpcId();
  1575. if (npcId == TELEPORTER)
  1576. {
  1577. final L2Party party = player.getParty();
  1578. // only party leader can talk with escape teleporter
  1579. if ((party != null) && party.isLeader(player))
  1580. {
  1581. final InstanceWorld world = InstanceManager.getInstance().getWorld(npc.getInstanceId());
  1582. if (world instanceof KamaWorld)
  1583. {
  1584. // party members must be in the instance
  1585. if (world.isAllowed(player.getObjectId()))
  1586. {
  1587. Instance inst = InstanceManager.getInstance().getInstance(world.getInstanceId());
  1588. // teleports entire party away
  1589. for (L2PcInstance partyMember : party.getMembers())
  1590. {
  1591. if ((partyMember != null) && (partyMember.getInstanceId() == world.getInstanceId()))
  1592. {
  1593. teleportPlayer(partyMember, inst.getSpawnLoc(), 0);
  1594. }
  1595. }
  1596. }
  1597. }
  1598. }
  1599. }
  1600. else
  1601. {
  1602. return npcId + ".htm";
  1603. }
  1604. return "";
  1605. }
  1606. /**
  1607. * Only escape teleporters first talk handled
  1608. */
  1609. @Override
  1610. public final String onFirstTalk(L2Npc npc, L2PcInstance player)
  1611. {
  1612. if (npc.getNpcId() == TELEPORTER)
  1613. {
  1614. if (player.isInParty() && player.getParty().isLeader(player))
  1615. {
  1616. return "32496.htm";
  1617. }
  1618. return "32496-no.htm";
  1619. }
  1620. return "";
  1621. }
  1622. @Override
  1623. public final String onKill(L2Npc npc, L2PcInstance player, boolean isSummon)
  1624. {
  1625. final InstanceWorld tmpWorld = InstanceManager.getInstance().getWorld(npc.getInstanceId());
  1626. if (tmpWorld instanceof KamaWorld)
  1627. {
  1628. final KamaWorld world = (KamaWorld) tmpWorld;
  1629. final int objectId = npc.getObjectId();
  1630. // first room was spawned ?
  1631. if (world.firstRoom != null)
  1632. {
  1633. // is shaman killed ?
  1634. if ((world.shaman != 0) && (world.shaman == objectId))
  1635. {
  1636. world.shaman = 0;
  1637. // stop respawn of the minions
  1638. for (L2Spawn spawn : world.firstRoom)
  1639. {
  1640. if (spawn != null)
  1641. {
  1642. spawn.stopRespawn();
  1643. }
  1644. }
  1645. world.firstRoom.clear();
  1646. world.firstRoom = null;
  1647. if (world.boss != null)
  1648. {
  1649. final int skillId = FIRST_ROOM[world.index][2];
  1650. final int skillLvl = FIRST_ROOM[world.index][3];
  1651. if ((skillId != 0) && (skillLvl != 0))
  1652. {
  1653. final L2Skill skill = SkillTable.getInstance().getInfo(skillId, skillLvl);
  1654. if (skill != null)
  1655. {
  1656. skill.getEffects(world.boss, world.boss);
  1657. }
  1658. }
  1659. }
  1660. return super.onKill(npc, player, isSummon);
  1661. }
  1662. }
  1663. // second room was spawned ?
  1664. if (world.secondRoom != null)
  1665. {
  1666. boolean all = true;
  1667. // check for all mobs in the second room
  1668. for (int i = 0; i < world.secondRoom.size(); i++)
  1669. {
  1670. // found killed now mob
  1671. if (world.secondRoom.get(i) == objectId)
  1672. {
  1673. world.secondRoom.set(i, 0);
  1674. }
  1675. else if (world.secondRoom.get(i) != 0)
  1676. {
  1677. all = false;
  1678. }
  1679. }
  1680. // all mobs killed ?
  1681. if (all)
  1682. {
  1683. world.secondRoom.clear();
  1684. world.secondRoom = null;
  1685. if (world.boss != null)
  1686. {
  1687. final int skillId = SECOND_ROOM[world.index][1];
  1688. final int skillLvl = SECOND_ROOM[world.index][2];
  1689. if ((skillId != 0) && (skillLvl != 0))
  1690. {
  1691. final L2Skill skill = SkillTable.getInstance().getInfo(skillId, skillLvl);
  1692. if (skill != null)
  1693. {
  1694. skill.getEffects(world.boss, world.boss);
  1695. }
  1696. }
  1697. }
  1698. return super.onKill(npc, player, isSummon);
  1699. }
  1700. }
  1701. // miniboss spawned ?
  1702. if ((world.miniBoss != 0) && (world.miniBoss == objectId))
  1703. {
  1704. world.miniBoss = 0;
  1705. if (world.boss != null)
  1706. {
  1707. final int skillId = MINIBOSS[world.index][4];
  1708. final int skillLvl = MINIBOSS[world.index][5];
  1709. if ((skillId != 0) && (skillLvl != 0))
  1710. {
  1711. final L2Skill skill = SkillTable.getInstance().getInfo(skillId, skillLvl);
  1712. if (skill != null)
  1713. {
  1714. skill.getEffects(world.boss, world.boss);
  1715. }
  1716. }
  1717. }
  1718. return super.onKill(npc, player, isSummon);
  1719. }
  1720. // boss was killed, finish instance
  1721. if ((world.boss != null) && (world.boss == npc))
  1722. {
  1723. world.boss = null;
  1724. finishInstance(world);
  1725. }
  1726. }
  1727. return super.onKill(npc, player, isSummon);
  1728. }
  1729. public Kamaloka(int questId, String name, String descr)
  1730. {
  1731. super(questId, name, descr);
  1732. addFirstTalkId(TELEPORTER);
  1733. addTalkId(TELEPORTER);
  1734. for (int cap : CAPTAINS)
  1735. {
  1736. addStartNpc(cap);
  1737. addTalkId(cap);
  1738. }
  1739. for (int[] mob : FIRST_ROOM)
  1740. {
  1741. if (mob != null)
  1742. {
  1743. if (STEALTH_SHAMAN)
  1744. {
  1745. addKillId(mob[1]);
  1746. }
  1747. else
  1748. {
  1749. addKillId(mob[0]);
  1750. }
  1751. }
  1752. }
  1753. for (int[] mob : SECOND_ROOM)
  1754. {
  1755. if (mob != null)
  1756. {
  1757. addKillId(mob[0]);
  1758. }
  1759. }
  1760. for (int[] mob : MINIBOSS)
  1761. {
  1762. if (mob != null)
  1763. {
  1764. addKillId(mob[0]);
  1765. }
  1766. }
  1767. for (int[] mob : BOSS)
  1768. {
  1769. addKillId(mob[0]);
  1770. }
  1771. }
  1772. public static void main(String[] args)
  1773. {
  1774. new Kamaloka(-1, Kamaloka.class.getSimpleName(), "instances");
  1775. }
  1776. }