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