STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
228091
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2561 · P5121

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/87447696?noj=FRM87447696-4DC" width="1" height="1"></div>

Dark War Chapter 1.swf

This is the info page for
Flash #55020

(Click the ID number above for more basic data on this flash file.)


ActionScript [AS1/AS2]
Combined Code
movieClip 56 sound_mc { } movieClip 69 it10 { frame 18 { removeMovieClip(this); } } movieClip 81 it9 { frame 33 { removeMovieClip(this); } } movieClip 95 it8 { frame 18 { removeMovieClip(this); } } movieClip 121 fx4 { frame 20 { removeMovieClip(this); } } movieClip 136 it6 { frame 24 { removeMovieClip(this); } } movieClip 151 it5 { frame 20 { removeMovieClip(this); } } movieClip 166 it7 { frame 20 { removeMovieClip(this); } } movieClip 193 it3 { frame 22 { removeMovieClip(this); } } movieClip 206 it2 { frame 18 { removeMovieClip(this); } } movieClip 207 it1 { frame 19 { removeMovieClip(this); } } movieClip 218 { frame 22 { removeMovieClip(this); } } movieClip 221 fx12 { frame 17 { removeMovieClip(this); } } movieClip 232 fx15 { frame 25 { removeMovieClip(this); } } movieClip 249 fx11 { frame 15 { removeMovieClip(this); } } movieClip 268 fx13 { frame 20 { removeMovieClip(this); } } movieClip 287 fx14 { frame 20 { removeMovieClip(this); } } movieClip 306 fx16 { frame 11 { removeMovieClip(this); } } movieClip 309 fx10 { frame 20 { removeMovieClip(this); } } movieClip 326 fx9 { frame 20 { removeMovieClip(this); } } movieClip 344 fx8 { frame 16 { removeMovieClip(this); } } movieClip 363 fx6 { frame 15 { removeMovieClip(this); } } movieClip 390 fx3 { frame 25 { removeMovieClip(this); } } movieClip 401 fx2 { frame 20 { removeMovieClip(this); } } movieClip 406 fx1 { frame 14 { removeMovieClip(this); } } movieClip 409 arrow_mc { } movieClip 411 { } movieClip 412 all_mc { } movieClip 413 meteor_mc { } movieClip 421 darah_mc { frame 15 { removeMovieClip(this); } } movieClip 423 { } movieClip 425 { } movieClip 427 { } movieClip 429 { } movieClip 431 { } movieClip 433 { } movieClip 435 { } movieClip 437 { } movieClip 439 { } movieClip 441 { } movieClip 443 { } movieClip 445 { } movieClip 447 { } movieClip 449 { } movieClip 451 { } movieClip 453 { } movieClip 455 { } movieClip 456 api_mc2 { frame 38 { removeMovieClip(this); } } movieClip 470 { } movieClip 473 { } movieClip 476 { } movieClip 479 { } movieClip 480 { frame 1 { stop(); } } movieClip 496 { } movieClip 499 { frame 1 { stop(); } } movieClip 502 { } movieClip 504 { } movieClip 506 { } movieClip 508 { } movieClip 509 msgBox_mc2 { } movieClip 512 { } movieClip 514 { } movieClip 516 { } movieClip 517 { } movieClip 519 { } movieClip 521 { } movieClip 523 { } movieClip 524 { } movieClip 546 { } movieClip 548 { } movieClip 549 { } movieClip 557 options_mc { frame 1 { stop(); } frame 2 { stop(); bar1_mc.bar_mc._x = Math.ceil(_root.volum1 / 0.4347826086956522 - 115); bar1_mc.bar_mc.onEnterFrame = function () { _root.volum1 = int(0.4347826086956522 * (this._x + 115)); _root.myMusic.setVolume(_root.volum1); bar1_mc.persen1 = _root.volum1 + ' %'; }; bar1_mc.indi_mc.onPress = function () { _root.klik(); startDrag(bar1_mc.bar_mc, true, -115, 0, 115, 0); }; bar1_mc.bar_mc.onRollOver = function () { _root.over(); }; bar1_mc.indi_mc.onReleaseOutside = function () { _root.over(); stopDrag(); }; bar1_mc.indi_mc.onRelease = bar1_mc.indi_mc.onReleaseOutside; bar2_mc.bar_mc._x = Math.ceil(_root.volum2 / 0.4347826086956522 - 115); bar2_mc.bar_mc.onEnterFrame = function () { _root.volum2 = int(0.4347826086956522 * (this._x + 115)); _root.mySound.setVolume(_root.volum2); bar2_mc.persen2 = _root.volum2 + ' %'; }; bar2_mc.indi_mc.onPress = function () { _root.klik(); startDrag(bar2_mc.bar_mc, true, -115, 0, 115, 0); }; bar2_mc.bar_mc.onRollOver = function () { _root.over(); }; bar2_mc.indi_mc.onReleaseOutside = function () { _root.over(); stopDrag(); }; bar2_mc.indi_mc.onRelease = bar2_mc.indi_mc.onReleaseOutside; bar3_mc.bar_mc._x = Math.ceil(_root.volum3 / 0.4347826086956522 - 115); bar3_mc.bar_mc.onEnterFrame = function () { _root.volum3 = int(0.4347826086956522 * (this._x + 115)); if (_root.volum3 >= 50) { } else {} bar2_mc.persen3 = _root.volum3 + ' %'; }; bar3_mc.indi_mc.onPress = function () { _root.klik(); startDrag(bar3_mc.bar_mc, true, -115, 0, 115, 0); }; bar3_mc.bar_mc.onRollOver = function () { _root.over(); }; bar3_mc.indi_mc.onReleaseOutside = function () { _root.over(); stopDrag(); }; bar3_mc.indi_mc.onRelease = bar3_mc.indi_mc.onReleaseOutside; } frame 3 { stop(); } frame 4 { stop(); } } movieClip 559 msgBox_mc { } movieClip 562 semak_mc3 { } movieClip 565 pohon_mc3 { } movieClip 568 rumah_mc3 { } movieClip 571 pagar_mc4 { } movieClip 573 pagar_mc3 { } movieClip 576 pagar_mc { } movieClip 585 { } movieClip 588 rumput_mc3 { frame 1 { stop(); } } movieClip 593 rumput_mc2 { frame 1 { stop(); } } movieClip 599 rumput_mc { frame 1 { stop(); } } movieClip 605 air_mc { frame 1 { stop(); } } movieClip 612 jalan2_mc { frame 1 { stop(); } } movieClip 618 jalan_mc { frame 1 { stop(); } } movieClip 624 { } movieClip 629 { } movieClip 640 { frame 22 { stop(); } } movieClip 641 { frame 1 { stop(); } } movieClip 643 { } movieClip 649 { } movieClip 654 { } movieClip 665 { frame 22 { stop(); } } movieClip 666 { frame 1 { stop(); } } movieClip 672 { } movieClip 678 { } movieClip 691 { frame 22 { stop(); } } movieClip 692 { frame 1 { stop(); } } movieClip 698 { } movieClip 704 { } movieClip 714 { frame 22 { stop(); } } movieClip 715 { frame 1 { stop(); } } movieClip 722 { } movieClip 728 { } movieClip 740 { frame 22 { stop(); } } movieClip 741 { frame 1 { stop(); } } movieClip 752 { frame 22 { stop(); } } movieClip 753 { frame 1 { stop(); } } movieClip 765 { frame 22 { stop(); } } movieClip 766 { frame 1 { stop(); } } movieClip 776 { frame 22 { stop(); } } movieClip 777 { frame 1 { stop(); } } movieClip 778 faith_mc { frame 1 { stop(); } } movieClip 785 { } movieClip 791 { } movieClip 803 { frame 21 { stop(); } } movieClip 815 { } movieClip 816 { frame 1 { stop(); } } movieClip 823 { } movieClip 829 { } movieClip 841 { frame 21 { stop(); } } movieClip 853 { } movieClip 854 { frame 1 { stop(); } } movieClip 861 { } movieClip 867 { } movieClip 880 { frame 21 { stop(); } } movieClip 893 { } movieClip 894 { frame 1 { stop(); } } movieClip 901 { } movieClip 907 { } movieClip 919 { frame 21 { stop(); } } movieClip 931 { } movieClip 932 { frame 1 { stop(); } } movieClip 938 { } movieClip 944 { } movieClip 956 { frame 21 { stop(); } } movieClip 968 { } movieClip 969 { frame 1 { stop(); } } movieClip 981 { frame 21 { stop(); } } movieClip 987 { } movieClip 988 { frame 1 { stop(); } } movieClip 1000 { frame 21 { stop(); } } movieClip 1006 { } movieClip 1007 { frame 1 { stop(); } } movieClip 1019 { frame 21 { stop(); } } movieClip 1025 { } movieClip 1026 { frame 1 { stop(); } } movieClip 1027 osihir_mc { frame 1 { stop(); } } movieClip 1034 { } movieClip 1040 { } movieClip 1051 { frame 19 { stop(); } } movieClip 1052 { frame 1 { stop(); } } movieClip 1059 { } movieClip 1065 { } movieClip 1076 { frame 19 { stop(); } } movieClip 1077 { frame 1 { stop(); } } movieClip 1083 { } movieClip 1089 { } movieClip 1101 { frame 19 { stop(); } } movieClip 1102 { frame 1 { stop(); } } movieClip 1109 { } movieClip 1115 { } movieClip 1126 { frame 19 { stop(); } } movieClip 1127 { frame 1 { stop(); } } movieClip 1133 { } movieClip 1139 { } movieClip 1150 { frame 19 { stop(); } } movieClip 1151 { frame 1 { stop(); } } movieClip 1156 { } movieClip 1162 { } movieClip 1172 { frame 19 { stop(); } } movieClip 1173 { frame 1 { stop(); } } movieClip 1179 { } movieClip 1185 { } movieClip 1195 { frame 19 { stop(); } } movieClip 1196 { frame 1 { stop(); } } movieClip 1201 { } movieClip 1207 { } movieClip 1216 { frame 19 { stop(); } } movieClip 1217 { frame 1 { stop(); } } movieClip 1218 detro_mc { frame 1 { stop(); } } movieClip 1225 { } movieClip 1231 { } movieClip 1242 { frame 19 { stop(); } } movieClip 1254 { } movieClip 1255 { frame 1 { stop(); } } movieClip 1262 { } movieClip 1268 { } movieClip 1278 { frame 19 { stop(); } } movieClip 1290 { } movieClip 1291 { frame 1 { stop(); } } movieClip 1298 { } movieClip 1304 { } movieClip 1315 { frame 19 { stop(); } } movieClip 1328 { } movieClip 1329 { frame 1 { stop(); } } movieClip 1336 { } movieClip 1342 { } movieClip 1353 { frame 19 { stop(); } } movieClip 1365 { } movieClip 1366 { frame 1 { stop(); } } movieClip 1372 { } movieClip 1378 { } movieClip 1389 { frame 19 { stop(); } } movieClip 1401 { } movieClip 1402 { frame 1 { stop(); } } movieClip 1413 { frame 19 { stop(); } } movieClip 1419 { } movieClip 1420 { frame 1 { stop(); } } movieClip 1430 { frame 19 { stop(); } } movieClip 1436 { } movieClip 1437 { frame 1 { stop(); } } movieClip 1445 { frame 19 { stop(); } } movieClip 1451 { } movieClip 1452 { frame 1 { stop(); } } movieClip 1453 odarat_mc { frame 1 { stop(); } } movieClip 1460 { } movieClip 1465 { } movieClip 1475 { frame 19 { stop(); } } movieClip 1476 { frame 1 { stop(); } } movieClip 1483 { } movieClip 1488 { } movieClip 1497 { frame 19 { stop(); } } movieClip 1498 { frame 1 { stop(); } } movieClip 1505 { } movieClip 1510 { } movieClip 1520 { frame 19 { stop(); } } movieClip 1521 { frame 1 { stop(); } } movieClip 1528 { } movieClip 1533 { } movieClip 1543 { frame 19 { stop(); } } movieClip 1544 { frame 1 { stop(); } } movieClip 1550 { } movieClip 1555 { } movieClip 1564 { frame 19 { stop(); } } movieClip 1565 { frame 1 { stop(); } } movieClip 1574 { frame 19 { stop(); } } movieClip 1575 { frame 1 { stop(); } } movieClip 1584 { frame 19 { stop(); } } movieClip 1585 { frame 1 { stop(); } } movieClip 1594 { frame 19 { stop(); } } movieClip 1595 { frame 1 { stop(); } } movieClip 1596 guild_mc { frame 1 { stop(); } } movieClip 1602 { } movieClip 1603 white_diem { } movieClip 1609 { } movieClip 1610 hawk_diem { } movieClip 1615 { } movieClip 1616 panther_diem { } movieClip 1617 faith_diem { } movieClip 1625 { } movieClip 1626 devy_diem { } movieClip 1634 { } movieClip 1637 { } movieClip 1647 { frame 22 { stop(); gotoAndStop(_parent); } } movieClip 1648 { frame 1 { stop(); } } movieClip 1655 { } movieClip 1658 { } movieClip 1667 { frame 22 { stop(); gotoAndStop(_parent); } } movieClip 1668 { frame 1 { stop(); } } movieClip 1675 { } movieClip 1680 { } movieClip 1691 { frame 22 { stop(); gotoAndStop(_parent); } } movieClip 1692 { frame 1 { stop(); } } movieClip 1697 { } movieClip 1708 { frame 22 { stop(); gotoAndStop(_parent); } } movieClip 1709 { frame 1 { stop(); } } movieClip 1715 { } movieClip 1720 { } movieClip 1730 { frame 22 { stop(); gotoAndStop(_parent); } } movieClip 1731 { frame 1 { stop(); } } movieClip 1740 { frame 22 { stop(); gotoAndStop(_parent); } } movieClip 1741 { frame 1 { stop(); } } movieClip 1750 { frame 22 { stop(); gotoAndStop(_parent); } } movieClip 1751 { frame 1 { stop(); } } movieClip 1760 { frame 22 { stop(); gotoAndStop(_parent); } } movieClip 1761 { frame 1 { stop(); } } movieClip 1762 devy_mc { frame 1 { stop(); } } movieClip 1771 { } movieClip 1778 { } movieClip 1788 { frame 20 { stop(); } } movieClip 1789 { frame 1 { stop(); } } movieClip 1798 { } movieClip 1805 { } movieClip 1816 { frame 20 { stop(); } } movieClip 1817 { frame 1 { stop(); } } movieClip 1825 { } movieClip 1832 { } movieClip 1843 { frame 20 { stop(); } } movieClip 1844 { frame 1 { stop(); } } movieClip 1853 { } movieClip 1860 { } movieClip 1871 { frame 20 { stop(); } } movieClip 1872 { frame 1 { stop(); } } movieClip 1879 { } movieClip 1885 { } movieClip 1896 { frame 20 { stop(); } } movieClip 1897 { frame 1 { stop(); } } movieClip 1898 { frame 1 { stop(); } } movieClip 1899 { frame 1 { stop(); } } movieClip 1909 { frame 20 { stop(); } } movieClip 1910 { frame 1 { stop(); } } movieClip 1911 brunhill_mc { frame 1 { stop(); } } movieClip 1918 { } movieClip 1923 { } movieClip 1936 { frame 22 { stop(); _parent.gotoAndStop(1); } } movieClip 1949 { frame 20 { stop(); _parent.gotoAndStop(1); } } movieClip 1964 { frame 25 { stop(); _parent.gotoAndStop(1); } } movieClip 1972 { frame 1 { stop(); } } movieClip 1977 { } movieClip 1984 { frame 22 { stop(); _parent.gotoAndStop(1); } } movieClip 1985 { frame 1 { stop(); } } movieClip 1992 { } movieClip 1998 { } movieClip 2009 { frame 22 { stop(); _parent.gotoAndStop(1); } } movieClip 2023 { frame 20 { stop(); _parent.gotoAndStop(1); } } movieClip 2033 { frame 23 { stop(); _parent.gotoAndStop(1); } } movieClip 2046 { frame 1 { stop(); } } movieClip 2047 { frame 19 { stop(); _parent.gotoAndStop(1); } } movieClip 2048 { frame 1 { stop(); } } movieClip 2055 { } movieClip 2062 { } movieClip 2076 { frame 22 { stop(); _parent.gotoAndStop(1); } } movieClip 2093 { frame 20 { stop(); _parent.gotoAndStop(1); } } movieClip 2108 { frame 25 { stop(); _parent.gotoAndStop(1); } } movieClip 2114 { frame 1 { stop(); } } movieClip 2132 { frame 1 { stop(); } } movieClip 2133 { frame 22 { stop(); _parent.gotoAndStop(1); } } movieClip 2134 { frame 1 { stop(); } } movieClip 2143 { } movieClip 2149 { } movieClip 2163 { frame 22 { stop(); _parent.gotoAndStop(1); } } movieClip 2179 { frame 20 { stop(); _parent.gotoAndStop(1); } } movieClip 2195 { frame 25 { stop(); _parent.gotoAndStop(1); } } movieClip 2208 { frame 1 { stop(); } } movieClip 2209 { frame 19 { stop(); _parent.gotoAndStop(1); } } movieClip 2210 { frame 1 { stop(); } } movieClip 2218 { } movieClip 2224 { } movieClip 2237 { frame 22 { stop(); _parent.gotoAndStop(1); } } movieClip 2253 { frame 20 { stop(); _parent.gotoAndStop(1); } } movieClip 2271 { frame 25 { stop(); _parent.gotoAndStop(1); } } movieClip 2284 { frame 22 { stop(); _parent.gotoAndStop(1); } } movieClip 2285 { frame 1 { stop(); } } movieClip 2298 { frame 22 { stop(); _parent.gotoAndStop(1); } } movieClip 2309 { frame 20 { stop(); _parent.gotoAndStop(1); } } movieClip 2318 { frame 24 { stop(); _parent.gotoAndStop(1); } } movieClip 2327 { frame 19 { stop(); _parent.gotoAndStop(1); } } movieClip 2328 { frame 1 { stop(); } } movieClip 2341 { frame 22 { stop(); _parent.gotoAndStop(1); } } movieClip 2354 { frame 20 { stop(); _parent.gotoAndStop(1); } } movieClip 2370 { frame 25 { stop(); _parent.gotoAndStop(1); } } movieClip 2377 { frame 1 { stop(); } } movieClip 2385 { frame 22 { stop(); _parent.gotoAndStop(1); } } movieClip 2386 { frame 1 { stop(); } } movieClip 2396 { frame 22 { stop(); _parent.gotoAndStop(1); } } movieClip 2408 { frame 20 { stop(); _parent.gotoAndStop(1); } } movieClip 2417 { frame 24 { stop(); _parent.gotoAndStop(1); } } movieClip 2427 { frame 1 { stop(); } } movieClip 2430 { frame 19 { stop(); _parent.gotoAndStop(1); } } movieClip 2431 { frame 1 { stop(); } } movieClip 2432 david_mc { frame 1 { stop(); } } movieClip 2439 { } movieClip 2450 { } movieClip 2453 actions_mc { frame 1 { stop(); } } movieClip 2460 angka_mc { frame 50 { stop(); removeMovieClip(this); } } movieClip 2483 msgBox_mc3 { frame 1 { stop(); } } movieClip 2487 info_mc2 { } movieClip 2490 info_mc { frame 1 { stop(); } frame 10 { stop(); attack = _root.namaSerangan; } frame 20 { gotoAndStop(1); } } movieClip 2492 master_mc { frame 15 { stop(); } } movieClip 2494 strike_mc { frame 15 { stop(); } } movieClip 2496 poison_mc { frame 10 { stop(); } } movieClip 2499 uncontrol_mc { frame 15 { stop(); } } movieClip 2501 slow_mc { frame 15 { stop(); } } movieClip 2514 failed_mc { frame 1 { stop(); } } movieClip 2532 { frame 1 { stop(); } } movieClip 2533 { } movieClip 2536 { } movieClip 2543 { frame 1 { stop(); } } movieClip 2544 completed_mc { frame 1 { stop(); } } movieClip 2567 objective_mc { frame 1 { stop(); } frame 2 { stop(); } frame 3 { stop(); } frame 4 { stop(); } frame 5 { stop(); } frame 6 { stop(); } frame 7 { stop(); } frame 8 { stop(); } frame 9 { stop(); } frame 10 { stop(); } frame 11 { stop(); } frame 12 { stop(); } frame 13 { stop(); } frame 14 { stop(); } frame 15 { stop(); } frame 16 { stop(); } frame 17 { stop(); } frame 18 { stop(); } frame 20 { stop(); } } movieClip 2569 trans_mc2 { frame 1 { stop(); } frame 60 { _root.aturSaja(); } frame 70 { stop(); } } movieClip 2570 trans_mc { frame 1 { stop(); } frame 7 { _root.aturSaja(); } frame 13 { stop(); } } movieClip 2573 flame_mc2 { frame 7 { removeMovieClip(this); } } movieClip 2578 { frame 1 { stop(); } } movieClip 2581 { } movieClip 2584 { } movieClip 2586 { } movieClip 2588 { } movieClip 2589 { } movieClip 2592 { } movieClip 2598 { } movieClip 2599 { frame 1 { stop(); } } movieClip 2608 { } movieClip 2619 { frame 1 { stop(); } } movieClip 2715 { } movieClip 2721 { } movieClip 2723 { frame 1 { stop(); } } movieClip 2731 { } movieClip 2734 { } movieClip 2736 { } movieClip 2738 { } movieClip 2739 status_mc { frame 1 { function overBox() { _root.over(); this.gotoAndStop(2); } function outBox() { this.gotoAndStop(1); } function klikBox() { _root.klik(); myStr = new String(this); _root.lihatChara = 'jagoan'; _root.indiPilih = Number(myStr.substr(myStr.length - 5, 1)); gotoAndStop('detail'); } stop(); quit_btn.onRollOver = function () { _root.over(); }; quit_btn.onRelease = function () { _root.klik(); removeMovieClip(_root.status_mc); _root.xcekKemana(); }; i = 1; while (i <= 11) { if (i <= _root.bykKarakter) { this['chara' + i].gotoAndStop(1); this['chara' + i].pala_mc.gotoAndStop(_root.jenisChara[i - 1]); this['chara' + i].race_mc.gotoAndStop(_root.jenisRace[i - 1] + 1); this['chara' + i].element_mc.gotoAndStop(_root.elementJagoan[i - 1] + 1); this['chara' + i].exp = 'Exp ' + _root.expJagoan[i - 1] + '/' + _root.maxJagoan[i - 1]; this['chara' + i].level = 'Level ' + _root.levelJagoan[i - 1]; this['chara' + i].live = 'Live ' + _root.liveJagoan[i - 1] + '/' + _root.totLiveJagoan[i - 1]; this['chara' + i].nama = _root.namaJagoan[i - 1]; this['chara' + i].box.onRollOver = overBox; this['chara' + i].box.onRollOut = outBox; this['chara' + i].box.onRelease = klikBox; } else { this['chara' + i].gotoAndStop(2); } ++i; } } frame 2 { function ubahSemua(i) { if (_root.lihatChara == 'jagoan') { stun_mc._visible = false; poison_mc._visible = false; uncontrol_mc._visible = false; slow_mc._visible = false; if (_root.stunJagoan[i - 1] == true) { stun_mc._visible = true; } if (_root.poisonJagoan[i - 1] == true) { poison_mc._visible = true; } if (_root.uncontrolJagoan[i - 1] == true) { uncontrol_mc._visible = true; } if (_root.slowJagoan[i - 1] == true) { slow_mc._visible = true; } full_mc.gotoAndStop(_root.jenisChara[i - 1]); race_mc.gotoAndStop(_root.jenisRace[i - 1] + 1); element_mc.gotoAndStop(_root.elementJagoan[i - 1] + 1); nama = _root.namaJagoan[i - 1]; xelement = 'Element: ' + _root.element[_root.elementJagoan[i - 1]]; place = 'Birthplace: ' + _root.jagoanPlace[i - 1]; if (_root.agePlace[i - 1] == 0) { age = 'Age: ' + _root.agePlace[i - 1]; } else { age = 'Age: ' + _root.agePlace[i - 1] + ' Years Old'; } race = 'Race: ' + _root.theRace[_root.jenisRace[i - 1]]; rank = 'Rank: ' + _root.rankJagoan[i - 1]; scala1 = (_root.liveJagoan[i - 1] / _root.totLiveJagoan[i - 1]) * 100; scala2 = (_root.auraJagoan[i - 1] / _root.totAuraJagoan[i - 1]) * 100; darah_mc.zbar._xscale = scala1; aura_mc.zbar._xscale = scala2; exp = 'Exp ' + _root.expJagoan[i - 1] + '/' + _root.maxJagoan[i - 1]; level = 'Level ' + _root.levelJagoan[i - 1]; live = 'Live ' + _root.liveJagoan[i - 1] + '/' + _root.totLiveJagoan[i - 1]; attack = 'Attack ' + _root.attackJagoan[i - 1]; defense = 'Defense ' + _root.defenseJagoan[i - 1]; aura = 'Aura ' + _root.auraJagoan[i - 1] + '/' + _root.totAuraJagoan[i - 1]; range = 'Range ' + _root.serangJagoan[i - 1]; xmove = 'Move ' + _root.xrangeJagoan[i - 1]; accuracy = 'Accuracy ' + _root.accuracyJagoan[i - 1] + ' %'; speed = 'Speed ' + _root.speedJagoan[i - 1]; z = 1; while (z <= 10) { abil = _root.jenisAbility[_root.abilityJagoan[i - 1][z]]; if (abil == undefined) { this['xicon' + z]._visible = false; if (z == 10) { this['ability' + z] = z + '.' + _root.jenisAbility[0]; } else { this['ability' + z] = z + '. ' + _root.jenisAbility[0]; } } else { if (abil == 'Empty') { this['xicon' + z]._visible = false; } else { this['xicon' + z]._visible = true; this['xicon' + z].gotoAndStop(_root.abilityJagoan[i - 1][z]); } if (z == 10) { this['ability' + z] = z + '.' + abil; } else { this['ability' + z] = z + '. ' + abil; } } ++z; } z = 1; while (z <= 5) { abil = _root.jenisItem[_root.itemJagoan[i - 1][z]]; if (abil == undefined) { this['yicon' + z]._visible = false; this['item' + z] = z + '. ' + _root.jenisItem[0]; } else { this['yicon' + z]._visible = true; this['yicon' + z].gotoAndStop(100 + _root.itemJagoan[i - 1][z]); if (abil == 'Empty') { this['yicon' + z]._visible = false; this['item' + z] = z + '. ' + abil; } else { this['item' + z] = z + '. ' + abil + ' (x' + _root.punyaItem[_root.itemJagoan[i - 1][z]] + ')'; } } ++z; } weapon = _root.jenisWeapon[_root.jagoanWeapon[i - 1]]; if (weapon == 'Empty') { this.zicon._visible = false; } else { this.zicon._visible = true; this.zicon.gotoAndStop(200 + _root.jagoanWeapon[i - 1]); } } else { if (_root.lihatChara == 'musuh') { stun_mc._visible = false; poison_mc._visible = false; uncontrol_mc._visible = false; slow_mc._visible = false; if (_root.stunMusuh[i - 1] == true) { stun_mc._visible = true; } if (_root.poisonMusuh[i - 1] == true) { poison_mc._visible = true; } if (_root.uncontrolMusuh[i - 1] == true) { uncontrol_mc._visible = true; } if (_root.slowMusuh[i - 1] == true) { slow_mc._visible = true; } full_mc.gotoAndStop(_root.jenisMusuh[i - 1]); race_mc.gotoAndStop(_root.xjenisRace[i - 1] + 1); element_mc.gotoAndStop(_root.elementMusuh[i - 1] + 1); nama = _root.namaMusuh[i - 1]; xelement = 'Element: ' + _root.element[_root.elementMusuh[i - 1]]; place = 'Birthplace: ' + _root.musuhPlace[i - 1]; if (_root.xagePlace[i - 1] == 0) { age = 'Age: ' + _root.xagePlace[i - 1]; } else { age = 'Age: ' + _root.xagePlace[i - 1] + ' Years Old'; } race = 'Race: ' + _root.theRace[_root.xjenisRace[i - 1]]; rank = 'Rank: ' + _root.rankMusuh[i - 1]; scala1 = (_root.liveMusuh[i - 1] / _root.totLiveMusuh[i - 1]) * 100; scala2 = (_root.auraMusuh[i - 1] / _root.totAuraMusuh[i - 1]) * 100; darah_mc.zbar._xscale = scala1; aura_mc.zbar._xscale = scala2; exp = 'Exp ' + _root.expMusuh[i - 1] + '/' + _root.maxMusuh[i - 1]; level = 'Level ' + _root.levelMusuh[i - 1]; live = 'Live ' + _root.liveMusuh[i - 1] + '/' + _root.totLiveMusuh[i - 1]; attack = 'Attack ' + _root.attackMusuh[i - 1]; defense = 'Defense ' + _root.defenseMusuh[i - 1]; aura = 'Aura ' + _root.auraMusuh[i - 1] + '/' + _root.totAuraMusuh[i - 1]; range = 'Range ' + _root.serangMusuh[i - 1]; xmove = 'Move ' + _root.rangeMusuh[i - 1]; accuracy = 'Accuracy ' + _root.accuracyMusuh[i - 1] + ' %'; speed = 'Speed ' + _root.speedMusuh[i - 1]; z = 1; while (z <= 10) { abil = _root.jenisAbility[_root.abilityMusuh[i - 1][z]]; if (abil == undefined) { this['xicon' + z]._visible = false; if (z == 10) { this['ability' + z] = z + '.' + _root.jenisAbility[0]; } else { this['ability' + z] = z + '. ' + _root.jenisAbility[0]; } } else { if (abil == 'Empty') { this['xicon' + z]._visible = false; } else { this['xicon' + z]._visible = true; this['xicon' + z].gotoAndStop(_root.abilityMusuh[i - 1][z]); } if (z == 10) { this['ability' + z] = z + '.' + abil; } else { this['ability' + z] = z + '. ' + abil; } } ++z; } z = 1; while (z <= 5) { abil = _root.jenisItem[_root.itemMusuh[i - 1][z]]; if (abil == undefined) { this['yicon' + z]._visible = false; this['item' + z] = z + '. ' + _root.jenisItem[0]; } else { this['yicon' + z]._visible = true; this['yicon' + z].gotoAndStop(100 + _root.itemMusuh[i - 1][z]); if (abil == 'Empty') { this['yicon' + z]._visible = false; this['item' + z] = z + '. ' + abil; } else { this['item' + z] = z + '. ' + abil + ' (x' + _root.xpunyaItem[i - 1][_root.itemMusuh[i - 1][z]] + ')'; } } ++z; } weapon = _root.musuhWeapon[i - 1]; if (weapon == 'Empty') { this.zicon._visible = false; } else { z = 0; while (z <= _root.jenisWeapon.length) { if (_root.jenisWeapon[z] == _root.musuhWeapon[i - 1]) { this.zicon._visible = true; this.zicon.gotoAndStop(200 + z); } ++z; } } } } } function klikSpell() { _root.klik(); xmyStr = new String(this); if (xmyStr.length == 26) { xindi = Number(xmyStr.substr(xmyStr.length - 1, 1)); } else { xindi = Number(xmyStr.substr(xmyStr.length - 2, 2)); } _root.munculChangeSpell(xindi, _root.indiPilih); back_btn.enabled = false; } function klikItem() { _root.klik(); xmyStr = new String(this); if (xmyStr.length == 26) { xindi = Number(xmyStr.substr(xmyStr.length - 1, 1)); } else { xindi = Number(xmyStr.substr(xmyStr.length - 2, 2)); } _root.munculChangeItem(xindi, _root.indiPilih); back_btn.enabled = false; } function klikWeapon() { _root.klik(); _root.munculChangeWeapon(_root.indiPilih); back_btn.enabled = false; } function overChange() { _root.over(); myStr = new String(this); if (myStr.length == 26) { _root.pilihAbil = Number(myStr.substr(myStr.length - 1, 1)); } else { _root.pilihAbil = Number(myStr.substr(myStr.length - 2, 2)); } jedaInfo2 = 0; adaJedaInfo = true; info2.nama = ''; info2.informasi = ''; jenisOver = 'attack'; } function overChange2() { _root.over(); myStr = new String(this); _root.pilihAbil = Number(myStr.substr(myStr.length - 1, 1)); jedaInfo2 = 0; adaJedaInfo = true; info2.nama = ''; info2.informasi = ''; jenisOver = 'item'; } function overChange3() { _root.over(); myStr = new String(this); _root.pilihAbil = Number(myStr.substr(myStr.length - 1, 1)); jedaInfo2 = 0; adaJedaInfo = true; info2.nama = ''; info2.informasi = ''; jenisOver = 'weapon'; } function outChange() { adaJedaInfo = false; info2.nama = ''; info2.informasi = ''; info2._visible = false; info2._alpha = 0; } function enterInfo2() { if (adaJedaInfo == true) { ++jedaInfo2; if (jedaInfo2 >= 10) { info2._visible = true; if (info2._alpha <= 100) { info2._alpha += 30; } } } else { info2._visible = false; } if (_root._ymouse >= 500) { info2._x = _root._xmouse - 500; info2._y = _root._ymouse - 400; } else { info2._x = _root._xmouse - 500; info2._y = _root._ymouse - 300; } if (jenisOver == 'attack') { info2.nama = _root.jenisAbility[_root.abilityJagoan[_root.indiPilih - 1][_root.pilihAbil]]; xinfo = _root.infoAbility[_root.abilityJagoan[_root.indiPilih - 1][_root.pilihAbil]]; info2.informasi = 'Element ' + _root.element[_root.elementAbility[_root.abilityJagoan[_root.indiPilih - 1][_root.pilihAbil]]] + ' \n Need ' + _root.auraAbility[_root.abilityJagoan[_root.indiPilih - 1][_root.pilihAbil]] + ' Aura \n\n ' + xinfo; if (xinfo == '' || xinfo == undefined) { info2.nama = 'Empty'; info2.informasi = 'Empty'; } } else { if (jenisOver == 'item') { info2.nama = _root.jenisItem[_root.itemJagoan[_root.indiPilih - 1][_root.pilihAbil]]; info2.informasi = _root.infoItem[_root.itemJagoan[_root.indiPilih - 1][_root.pilihAbil]]; if (info2.nama == '' || info2.nama == undefined) { info2.nama = 'Empty'; info2.informasi = 'Empty'; } } else { if (jenisOver == 'weapon') { info2.nama = _root.jenisWeapon[_root.jagoanWeapon[_root.indiPilih - 1]]; info2.informasi = _root.infoWeapon[_root.jagoanWeapon[_root.indiPilih - 1]]; if (info2.nama == '' || info2.nama == undefined) { info2.nama = 'Empty'; info2.informasi = 'Empty'; } } } } } stop(); if (_root.jenisLihat == 'peta') { empty_btn._visible = true; fill_btn._visible = true; } else { empty_btn._visible = false; fill_btn._visible = false; } back_btn.onRollOver = function () { _root.over(); }; back_btn.onRelease = function () { _root.klik(); if (_root.jenisLihat == 'peta') { gotoAndStop('kotak'); } else { if (_root.jenisLihat == 'main') { _root.bisaTombolAction(true); _root.deleteMusuh2(false); _root.xpause = false; removeMovieClip(_root.status_mc); } } }; empty_btn.onRollOver = function () { _root.over(); }; empty_btn.onRelease = function () { _root.klik(); z = 2; while (z <= 10) { _root.abilityJagoan[_root.indiPilih - 1][z] = 0; ++z; } z = 1; while (z <= 5) { _root.itemJagoan[_root.indiPilih - 1][z] = 0; ++z; } _root.status_mc.ubahSemua(_root.indiPilih); }; fill_btn.onRollOver = function () { _root.over(); }; fill_btn.onRelease = function () { _root.klik(); z = 2; while (z <= 10) { _root.abilityJagoan[_root.indiPilih - 1][z] = 0; ++z; } z = 1; while (z <= 5) { _root.itemJagoan[_root.indiPilih - 1][z] = 0; ++z; } _root.arrayAbil = new Array(); _root.AbilKe = 0; w = 2; while (w <= _root.jenisAbility.length - 1) { if (_root.punyaAbility[w] == 1) { _root.arrayAbil[_root.AbilKe] = w; ++_root.AbilKe; } ++w; } _root.abilJago = 2; w = 0; while (w <= _root.AbilKe - 1) { if (w <= 9) { _root.abilityJagoan[_root.indiPilih - 1][_root.abilJago] = _root.arrayAbil[w]; ++_root.abilJago; } ++w; } _root.arrayItem = new Array(); _root.ItemKe = 0; w = 1; while (w <= _root.jenisItem.length - 1) { if (_root.punyaItem[w] >= 1) { _root.arrayItem[_root.ItemKe] = w; ++_root.ItemKe; } ++w; } _root.itemJago = 1; w = 0; while (w <= _root.ItemKe - 1) { if (w <= 4) { _root.itemJagoan[_root.indiPilih - 1][_root.itemJago] = _root.arrayItem[w]; ++_root.itemJago; } ++w; } _root.status_mc.ubahSemua(_root.indiPilih); }; ubahSemua(_root.indiPilih); if (_root.jenisLihat == 'peta') { i = 1; while (i <= 10) { this['xchange' + i]._visible = true; this['xchange' + i].onRelease = klikSpell; this['xchange' + i].onRollOver = overChange; this['xchange' + i].onRollOut = outChange; this['xchange' + i].onReleaseOutside = outChange; ++i; } i = 1; while (i <= 5) { this['ychange' + i]._visible = true; this['ychange' + i].onRelease = klikItem; this['ychange' + i].onRollOver = overChange2; this['ychange' + i].onRollOut = outChange; this['ychange' + i].onReleaseOutside = outChange; ++i; } this.zchange1._visible = true; this.zchange1.onRelease = klikWeapon; this.zchange1.onRollOver = overChange3; this.zchange1.onRollOut = outChange; this['zchange' + i].onReleaseOutside = outChange; } else { i = 1; while (i <= 10) { this['xchange' + i]._visible = false; ++i; } i = 1; while (i <= 5) { this['ychange' + i]._visible = false; ++i; } this.zchange1._visible = false; } info2 = attachMovie('info_mc2', 'info_mc2', _root.dalamInfo2); info2._x = -500; info2._y = -500; info2._visible = false; info2.onEnterFrame = enterInfo2; } } movieClip 2743 change_mc { } movieClip 2756 fx7 { frame 12 { removeMovieClip(this); } } movieClip 2757 api_mc { frame 1 { gotoAndPlay(random(50) + 1); } } movieClip 2760 batu_mc5 { } movieClip 2763 batu_mc4 { } movieClip 2766 batu_mc3 { } movieClip 2769 batu_mc2 { } movieClip 2820 ballon_mc { frame 1 { stop(); } frame 5 { _root.mulaiLevel(); } frame 10 { stop(); } frame 14 { _root.mulaiLevel(); } frame 16 { stop(); } frame 17 { _root.zlanjutGame(); } frame 27 { _root.mulaiLevel(); } frame 36 { _root.mulaiLevel(); } frame 48 { _root.mulaiLevel(); } frame 57 { _root.mulaiLevel(); } frame 68 { _root.selesaiLevel(); } frame 73 { _root.mulaiLevel(); } frame 82 { _root.selesaiLevel2(); } } movieClip 2823 pohon_mc2 { } movieClip 2827 rumah_mc2 { } movieClip 2829 pagar_mc2 { } movieClip 2832 semak_mc { } movieClip 2835 danau_mc { } movieClip 2848 it4 { frame 32 { removeMovieClip(this); } } movieClip 2867 fx5 { frame 12 { removeMovieClip(this); } } movieClip 2868 stun_mc { frame 15 { stop(); } } movieClip 2870 semak_mc2 { } movieClip 2873 batu_mc { } movieClip 2876 kaktus_mc2 { } movieClip 2879 kaktus_mc { } movieClip 2882 kaktus_mc3 { } movieClip 2885 pohon_mc { } movieClip 2888 rumah_mc { } frame 1 { function wwinitAwal() { totChara = 4; jenisMaen = 'tanding'; lewatSini = false; elementJagoan = new Array(3, 3, 3, 1, 3); jenisRace = new Array(0, 0, 0, 4, 5); element = new Array('Water', 'Fire', 'Air', 'Earth', 'Neutral'); theRace = new Array('Human', 'Mage', 'Bird', 'Fish', 'Ogre', 'Human'); kuatElement = new Array(1, 2, 3, 0); lemahElement = new Array(3, 0, 1, 2); jenisChara = new Array(1, 2, 7, 8, 10); jenisWeapon = new Array('Empty', 'Lunar Sword', 'White Knife', 'Soldier Sword', 'Black Rose', 'Magasutra Axe', 'Fire Devil Spear', 'Eagle Arrow', 'Big Cudgel', 'Magic Stick', 'Giant Dagger', 'Elite Whip Chain'); elementWeapon = new Array('', 4, 4, 4, 1, 4, 1, 2, 4, 1, 4, 4); infoWeapon = new Array('', 'Lunar Blade is passed from generation to generation between great generals of Lunar Kingdom. Attack +25%, move = 5, range = 2, accuracy = 90%.', 'Nimble Sword, the finest of all sword, is able to kill a full-grown tiger by one slash. Attack +15%, move = 4, range = 1, accuracy = 95%.', 'Common Guard Sword, a standard weapon of Lunar state guards. Attack +20%, move = 4, range = 1, accuracy = 80%.', 'Black Rose, posses mysterious magical powers and is passed down from the late King Rock Devil wife to Devy Carla. Attack +25%, move = 5, range = 6, accuracy = 85%.', 'Furtive Axe originated from the people of Lunar, posses immense powers. Attack +45%, move = 4, range = 1, accuracy = 80%. ', 'Spear of Hades, lengthy and travels faster than the speed of wind. Attack +35%, move = 4, range = 2, accuracy = 85%.', 'Arrow of Eaglefire, standard weapon used by Eaglefire guards. Attack +40%, move = 7, range = 6, accuracy = 95%.', 'Big cudgel, a standart cudgel weapon used by Ground Ogre. Attack +15%, move = 4, range = 1, accuracy = 80%.', 'Magical stick, a standard stick weapon used by Witch Ogre. Attack +10%, move = 3, range = 4, accuracy = 85%.', 'Giant weapon used by Detro Stone. Attack +40%, move = 5, range = 1, accuracy = 95%.', 'Elite Whip Chain, a chain weapon used by Guild Made. Attack +35%, move = 6, range = 3, accuracy = 99%.'); jagoanPlace = new Array('Bizan, Lunar', 'Bizan, Lunar', 'Cacte, Lunar', 'Ork, Ogrezantium', 'Caesar City, Lonthar'); agePlace = new Array(25, 23, 26, 20, 31); rankJagoan = new Array('Commander of Lunar', 'David Adjutant', 'Lunar Soldier', 'Ogrezantium Princess', 'Commander of Lonthar'); element = new Array('Water', 'Fire', 'Air', 'Earth', 'Neutral'); jenisAbility = new Array('Empty', 'Normal', 'Poison', 'Stun', 'Double Attack', 'Smash', 'Burn', 'Flame', 'Strike', 'Uncontrol', 'Meteor', 'All Attack', 'Aura Blast', 'Slow', 'Ice Belt', 'Master Attack', 'Flood', 'Earthquake'); elementAbility = new Array('', 4, 3, 1, 4, 2, 1, 1, 4, 1, 3, 4, 4, 2, 0, 4, 0, 3); auraAbility = new Array('', 0, 20, 15, 40, 25, 10, 15, 25, 25, 35, 45, 15, 15, 65, 55, 25, 120); hargaAbility = new Array('', 0, 1000, 1000, 2000, 1500, 1000, 1500, 1500, 2500, 2000, 3000, 2000, 1500, 2500, 4000, 1000, 5000); infoAbility = new Array('', 'Ordinary attack, no harmful effect to the enemy.', 'Poisonous attack on the enemy, enemy that get the poison will reduce by each turn, for three turn.', 'To freeze the enemy, enemy cannot walk, for three turn.', 'Double attack, hit the enemy twice in a row at the same time.', 'To push the enemy one step back, can be used to throw the enemy into the ravine.', 'Flamethrow, suitable for those with fire element, damage increase by 25%.', 'Flamethrow, like a whirlpool, suitable for those with fire element, damage increase by 50%', 'Very damaging attack, but not accurate, increase damage by 150%, but reduce accuracy by 50%.', 'To disoriented the enemy, he will attack his own troops, for three turn.', 'A meteorite attack from the sky that can kill thousand of enemies at once, suitable for high range attack.', 'An all out attack to all enemy disregarding the distance, but damage is reduce by 50% and accuracy is reduce by 50%.', 'A hit that can reduce the enemy’s Aura by 50%.', 'To reduce the enemy’s cruising capability only to one step, for three turn.', 'To attack the enemy and reduce his attack and defense by 20% (only within that particular battle)', 'Very destructive and accurate attack, damage increase by 100%, accuracy increase by 20%.', 'Aquatic Incantation summons floods, suitable for water elements, damage increase by 50%', 'Quakes cracks terrain, cracked terrains are accessible only to Earth elements'); jenisItem = new Array('Empty', 'Health+', 'Aura+', 'Anti dote', 'Break', 'Aware', 'Fast', 'Ice Shield', 'Double Turn', 'Health++', 'Aura++', 'Live'); elementItem = new Array('', 4, 4, 3, 1, 4, 2, 0, 4, 4, 4, 4); hargaItem = new Array('', 150, 200, 150, 150, 200, 200, 10000, 7500, 1000, 1500, '-'); infoItem = new Array('', 'To increase Health for a single character, Health +100', 'To increase Aura for a single character, Aura +50', 'To remove poison effect on a single character', 'To remove stun effect on a single character', 'To remove uncontrol effect on a single character', 'To remove slow motion effect on a single character', 'Protection for a single character, attack and defense increase by 20% (only within that particular battle)', 'Able to perform two times in a row', 'To increase Health for a single character, Health +200', 'To increase Aura for a single character, Aura +100', 'The character who posses this item will automatically resurrect when dead and the character\'s level increase by 1 pts, this item can not use when character is still alive'); abilityJagoan = new Array(); itemJagoan = new Array(); i = 0; while (i <= totChara) { abilityJagoan[i] = new Array(); itemJagoan[i] = new Array(); j = 1; while (j <= 10) { abilityJagoan[i][j] = 0; ++j; } j = 1; while (j <= 5) { itemJagoan[i][j] = 0; ++j; } ++i; } } function cekAbility(indi) { if (indi == 0) { namaJagoan[indi] = 'David Strong Heart'; if (jagoanWeapon[indi] == 1) { incAttack[indi] = 2.5; rangeJagoan[indi] = 5; serangJagoan[indi] = 2; accuracyJagoan[indi] = 90; speedJagoan[indi] = 5; } else { if (jagoanWeapon[indi] == 5) { incAttack[indi] = 4; rangeJagoan[indi] = 4; serangJagoan[indi] = 1; accuracyJagoan[indi] = 80; speedJagoan[indi] = 3; } else { if (jagoanWeapon[indi] == 6) { incAttack[indi] = 3.5; rangeJagoan[indi] = 4; serangJagoan[indi] = 2; accuracyJagoan[indi] = 85; speedJagoan[indi] = 3.5; } else { if (jagoanWeapon[indi] == 7) { incAttack[indi] = 3; rangeJagoan[indi] = 7; serangJagoan[indi] = 6; accuracyJagoan[indi] = 95; speedJagoan[indi] = 6; } } } } incLive[indi] = 2.5; incDefense[indi] = 3; incAura[indi] = 2.5; } else { if (indi == 1) { namaJagoan[indi] = 'Faith Hanger'; incLive[indi] = 3.5; incAttack[indi] = 3; incDefense[indi] = 3.5; incAura[indi] = 1.5; rangeJagoan[indi] = 4; serangJagoan[indi] = 1; accuracyJagoan[indi] = 95; speedJagoan[indi] = 4; } else { if (indi == 2) { namaJagoan[indi] = 'Brunhill'; incLive[indi] = 3; incAttack[indi] = 2.5; incDefense[indi] = 2.5; incAura[indi] = 1.5; rangeJagoan[indi] = 4; serangJagoan[indi] = 1; accuracyJagoan[indi] = 80; speedJagoan[indi] = 3; } else { if (indi == 3) { namaJagoan[indi] = 'Devy Carla'; incLive[indi] = 3; incAttack[indi] = 2.5; incDefense[indi] = 2.5; incAura[indi] = 4.5; rangeJagoan[indi] = 5; serangJagoan[indi] = 6; accuracyJagoan[indi] = 85; speedJagoan[indi] = 5; } else { if (indi == 4) { namaJagoan[indi] = 'Guild Made'; incLive[indi] = 4.5; incAttack[indi] = 4.5; incDefense[indi] = 5; incAura[indi] = 4.5; rangeJagoan[indi] = 6; serangJagoan[indi] = 3; accuracyJagoan[indi] = 99; speedJagoan[indi] = 5; } } } } } xrangeJagoan[indi] = rangeJagoan[indi]; k = 0; while (k <= totChara) { liveJagoan[k] = Math.ceil(levelJagoan[k] * incLive[k] * 25); totLiveJagoan[k] = liveJagoan[k]; attackJagoan[k] = Math.ceil(levelJagoan[k] * incAttack[k] * 10); defenseJagoan[k] = Math.ceil(levelJagoan[k] * incDefense[k] * 5); auraJagoan[k] = Math.ceil(levelJagoan[k] * incAura[k] * 10); totAuraJagoan[k] = auraJagoan[k]; maxJagoan[k] = levelJagoan[k] * 500; ++k; } } function cekAbility2(indi) { if (indi == 1) { namaJagoan[indi] = 'Devy Carla'; incLive[indi] = 3; incAttack[indi] = 2.5; incDefense[indi] = 2.5; incAura[indi] = 4.5; rangeJagoan[indi] = 5; serangJagoan[indi] = 6; accuracyJagoan[indi] = 85; speedJagoan[indi] = 5; } k = 0; while (k <= totChara) { liveJagoan[k] = Math.ceil(levelJagoan[k] * incLive[k] * 25); totLiveJagoan[k] = liveJagoan[k]; attackJagoan[k] = Math.ceil(levelJagoan[k] * incAttack[k] * 10); defenseJagoan[k] = Math.ceil(levelJagoan[k] * incDefense[k] * 5); auraJagoan[k] = Math.ceil(levelJagoan[k] * incAura[k] * 10); totAuraJagoan[k] = auraJagoan[k]; maxJagoan[k] = levelJagoan[k] * 500; ++k; } } function ygDiSave() { namaData = 'Empty'; bykKarakter = 2; mapKe = 1; totalMoney = 500; totalTurn = 0; totalKilled = 0; naikLevel = 1; bisaTrain = true; levelJagoan = new Array(3, 2, 5, 9, 11); expJagoan = new Array(50, 50, 50, 50, 50); punyaAbility = new Array('', 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); punyaItem = new Array('', 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0); punyaWeapon = new Array('', 1, 0, 0, 0, 0, 0, 0); jagoanWeapon = new Array(1, 2, 3, 4, 11); abilityJagoan[0][1] = 1; abilityJagoan[0][2] = 3; abilityJagoan[0][3] = 4; abilityJagoan[1][1] = 1; abilityJagoan[1][2] = 2; abilityJagoan[1][3] = 5; abilityJagoan[2][1] = 1; abilityJagoan[2][2] = 2; abilityJagoan[3][1] = 1; abilityJagoan[3][2] = 2; abilityJagoan[3][3] = 3; abilityJagoan[3][4] = 9; abilityJagoan[3][5] = 13; abilityJagoan[3][6] = 14; abilityJagoan[4][1] = 1; abilityJagoan[4][2] = 2; abilityJagoan[4][3] = 3; abilityJagoan[4][4] = 8; abilityJagoan[4][5] = 14; abilityJagoan[4][6] = 15; itemJagoan[0][1] = 1; itemJagoan[1][1] = 2; } function simpanData(dataKe) { i = 0; while (i <= simpanSemua.length) { _root['ddatSimp' + i] = simpanSemua[i] + dataKe; Cookies = SharedObject.getLocal(_root['ddatSimp' + i], '/'); Cookies.data['dsoData' + i] = eval(simpanSemua[i]); Cookies.flush(); ++i; } i = 0; while (i <= totChara) { _root['ddatSimp1' + i] = String('levelJagoan' + i) + dataKe; Cookies = SharedObject.getLocal(_root['ddatSimp1' + i], '/'); Cookies.data['dsoData1' + i] = levelJagoan[i]; Cookies.flush(); ++i; } i = 0; while (i <= totChara) { _root['ddatSimp2' + i] = String('expJagoan' + i) + dataKe; Cookies = SharedObject.getLocal(_root['ddatSimp2' + i], '/'); Cookies.data['dsoData2' + i] = expJagoan[i]; Cookies.flush(); ++i; } i = 0; while (i <= jenisAbility.length) { _root['ddatSimp3' + i] = String('punyaAbility' + i) + dataKe; Cookies = SharedObject.getLocal(_root['ddatSimp3' + i], '/'); Cookies.data['dsoData3' + i] = punyaAbility[i]; Cookies.flush(); ++i; } i = 0; while (i <= jenisItem.length) { _root['ddatSimp4' + i] = String('punyaItem' + i) + dataKe; Cookies = SharedObject.getLocal(_root['ddatSimp4' + i], '/'); Cookies.data['dsoData4' + i] = punyaItem[i]; Cookies.flush(); ++i; } i = 0; while (i <= totChara) { j = 1; while (j <= 10) { _root['ddatSimp5' + i] = String('abilityJagoan' + i + j) + dataKe; Cookies = SharedObject.getLocal(_root['ddatSimp5' + i], '/'); Cookies.data['dsoData5' + i] = abilityJagoan[i][j]; Cookies.flush(); ++j; } j = 1; while (j <= 5) { _root['ddatSimp6' + i] = String('itemJagoan' + i + j) + dataKe; Cookies = SharedObject.getLocal(_root['ddatSimp6' + i], '/'); Cookies.data['dsoData6' + i] = itemJagoan[i][j]; Cookies.flush(); ++j; } ++i; } i = 0; while (i <= jenisWeapon.length) { _root['ddatSimp7' + i] = String('punyaWeapon' + i) + dataKe; Cookies = SharedObject.getLocal(_root['ddatSimp7' + i], '/'); Cookies.data['dsoData7' + i] = punyaWeapon[i]; Cookies.flush(); ++i; } i = 0; while (i <= totChara) { _root['ddatSimp8' + i] = String('jagoanWeapon' + i) + dataKe; Cookies = SharedObject.getLocal(_root['ddatSimp8' + i], '/'); Cookies.data['dsoData8' + i] = jagoanWeapon[i]; Cookies.flush(); ++i; } } function loadData(dataKe) { i = 0; while (i <= simpanSemua.length) { _root['ddatSimp' + i] = simpanSemua[i] + dataKe; Cookies = SharedObject.getLocal(_root['ddatSimp' + i], '/'); _root[simpanSemua[i]] = Cookies.data['dsoData' + i]; ++i; } i = 0; while (i <= totChara) { _root['ddatSimp1' + i] = String('levelJagoan' + i) + dataKe; Cookies = SharedObject.getLocal(_root['ddatSimp1' + i], '/'); levelJagoan[i] = Cookies.data['dsoData1' + i]; ++i; } i = 0; while (i <= totChara) { _root['ddatSimp2' + i] = String('expJagoan' + i) + dataKe; Cookies = SharedObject.getLocal(_root['ddatSimp2' + i], '/'); expJagoan[i] = Cookies.data['dsoData2' + i]; ++i; } i = 0; while (i <= jenisAbility.length) { _root['ddatSimp3' + i] = String('punyaAbility' + i) + dataKe; Cookies = SharedObject.getLocal(_root['ddatSimp3' + i], '/'); punyaAbility[i] = Cookies.data['dsoData3' + i]; ++i; } i = 0; while (i <= jenisItem.length) { _root['ddatSimp4' + i] = String('punyaItem' + i) + dataKe; Cookies = SharedObject.getLocal(_root['ddatSimp4' + i], '/'); punyaItem[i] = Cookies.data['dsoData4' + i]; ++i; } i = 0; while (i <= totChara) { j = 1; while (j <= 10) { _root['ddatSimp5' + i] = String('abilityJagoan' + i + j) + dataKe; Cookies = SharedObject.getLocal(_root['ddatSimp5' + i], '/'); abilityJagoan[i][j] = Cookies.data['dsoData5' + i]; ++j; } j = 1; while (j <= 5) { _root['ddatSimp6' + i] = String('itemJagoan' + i + j) + dataKe; Cookies = SharedObject.getLocal(_root['ddatSimp6' + i], '/'); itemJagoan[i][j] = Cookies.data['dsoData6' + i]; ++j; } ++i; } i = 0; while (i <= jenisWeapon.length) { _root['ddatSimp7' + i] = String('punyaWeapon' + i) + dataKe; Cookies = SharedObject.getLocal(_root['ddatSimp7' + i], '/'); punyaWeapon[i] = Cookies.data['dsoData7' + i]; ++i; } i = 0; while (i <= totChara) { _root['ddatSimp8' + i] = String('jagoanWeapon' + i) + dataKe; Cookies = SharedObject.getLocal(_root['ddatSimp8' + i], '/'); jagoanWeapon[i] = Cookies.data['dsoData8' + i]; ++i; } } function xloadData(dataKe) { i = 0; while (i <= simpanSemua.length) { _root['ddatSimp' + i] = simpanSemua[i] + dataKe; Cookies = SharedObject.getLocal(_root['ddatSimp' + i], '/'); _root['c' + simpanSemua[i]] = Cookies.data['dsoData' + i]; ++i; } } function tombolAtas() { box_mc.shop_btn.enabled = true; box_mc.status_btn.enabled = true; box_mc.options_btn.enabled = true; box_mc.battle_btn.enabled = true; if (bisaTrain == true) { box_mc.train_btn.enabled = true; box_mc.train_btn._alpha = 100; } else { box_mc.train_btn.enabled = false; box_mc.train_btn._alpha = 50; } box_mc.options_btn.enabled = true; box_mc.save_btn.enabled = true; cacte_btn.enabled = false; magre_btn.enabled = false; box_mc.shop_btn.onRollOver = function () { over(); }; box_mc.shop_btn.onRelease = function () { klik(); if (mapKe == 9) { gotoAndStop(3934); } else { if (mapKe <= 4) { gotoAndStop(3794); } else { if (mapKe >= 12) { gotoAndStop(3934); } else { gotoAndStop(3864); } } } }; box_mc.status_btn.onRollOver = function () { over(); }; box_mc.status_btn.onRelease = function () { klik(); gotoAndStop(3945); }; box_mc.train_btn.onRollOver = function () { over(); }; box_mc.train_btn.onRelease = function () { klik(); bisaTrain = false; this.enabled = false; jenisMaen = 'training'; gotoAndStop(3935); }; box_mc.save_btn.onRollOver = function () { over(); }; box_mc.save_btn.onRelease = function () { klik(); xjenisData = 'save'; gotoAndStop(994); }; box_mc.options_btn.onRollOver = function () { over(); }; box_mc.options_btn.onRelease = function () { klik(); _root.cekOptions('map'); }; box_mc.battle_btn.onRollOver = function () { over(); }; box_mc.battle_btn.onRelease = function () { klik(); jenisMaen = 'tanding'; gotoAndStop(3935); }; if (mapKe < 5) { cacte_btn.enabled = true; cacte_btn.onRollOver = function () { over(); }; cacte_btn.onRelease = function () { klik(); this.enabled = false; box_mc.shop_btn.enabled = false; box_mc.status_btn.enabled = false; box_mc.train_btn.enabled = false; box_mc.options_btn.enabled = false; box_mc.save_btn.enabled = false; jenisMaen = 'tanding'; if (mapKe == 2) { gotoAndPlay('dua'); } else { if (mapKe == 3) { gotoAndPlay('dua2'); } else { if (mapKe == 4) { gotoAndPlay('dua4'); } } } }; } else { if (mapKe <= 9 && lewatSini != true) { magre_btn.enabled = true; magre_btn.onRollOver = function () { over(); }; magre_btn.onRelease = function () { klik(); this.enabled = false; box_mc.shop_btn.enabled = false; box_mc.status_btn.enabled = false; box_mc.train_btn.enabled = false; box_mc.options_btn.enabled = false; box_mc.save_btn.enabled = false; jenisMaen = 'tanding'; if (mapKe == 5) { gotoAndPlay('dua6'); } else { if (mapKe == 6) { gotoAndPlay('dua8'); } else { if (mapKe == 7) { gotoAndPlay('dua10'); } else { if (mapKe == 8) { gotoAndPlay('dua12'); } else { if (mapKe == 9) { gotoAndPlay('dua14'); } } } } } }; } else { valley_btn.enabled = true; valley_btn.onRollOver = function () { over(); }; valley_btn.onRelease = function () { klik(); this.enabled = false; box_mc.shop_btn.enabled = false; box_mc.status_btn.enabled = false; box_mc.train_btn.enabled = false; box_mc.options_btn.enabled = false; box_mc.save_btn.enabled = false; if (mapKe == 9) { gotoAndPlay('dua16'); } else { if (mapKe == 10) { gotoAndPlay('dua18'); } else { if (mapKe == 11) { gotoAndPlay('dua20'); } else { if (mapKe == 12) { gotoAndPlay('dua22'); } } } } }; } } if (mapKe >= 12) { lone_btn.enabled = false; magre_btn.enabled = false; cacte_btn.enabled = false; valley_btn.enabled = false; } } function xcekKemana() { if (mapKe == 2) { gotoAndStop('xsatu'); } else { if (mapKe == 3) { gotoAndStop('dua1'); } else { if (mapKe == 4) { gotoAndStop('dua3'); } else { if (mapKe == 5) { gotoAndStop('dua5'); } else { if (mapKe == 6) { gotoAndStop('dua7'); } else { if (mapKe == 7) { gotoAndStop('dua9'); } else { if (mapKe == 8) { gotoAndStop('dua11'); } else { if (mapKe <= 9 && lewatSini != true) { gotoAndStop('dua13'); } else { if (mapKe <= 9 && lewatSini == true) { gotoAndStop('dua15'); } else { if (mapKe == 10) { gotoAndStop('dua17'); } else { if (mapKe == 11) { gotoAndStop('dua19'); } else { if (mapKe >= 12) { gotoAndStop('dua21'); } } } } } } } } } } } } } function initDalam() { panjang = 19; lebar = 19; dalam1 = 10; dalam2 = panjang * 3 * lebar + dalam1 + 100; dalamObjective = panjang * 6 * lebar + dalam1 + 1200; dalamCompleted = panjang * 6 * lebar + dalam1 + 1200; dalamStatus = panjang * 6 * lebar + dalam1 + 1300; dalamMsgBox = panjang * 6 * lebar + dalam1 + 1000; dalamMsgBox3 = panjang * 6 * lebar + dalam1 + 900; dalamInfo = panjang * 6 * lebar + dalam1 + 800; dalamActions = panjang * 6 * lebar + dalam1 + 500; dalamInfo2 = panjang * 6 * lebar + dalam1 + 1100; dalamOptions = panjang * 6 * lebar + dalam1 + 2000; dalamAngka1 = panjang * 6 * lebar + dalam1 + 600; dalamAngka2 = panjang * 6 * lebar + dalam1 + 650; dalamAngka3 = panjang * 6 * lebar + dalam1 + 700; dalamAngka4 = panjang * 6 * lebar + dalam1 + 750; dalamMeteor = panjang * 6 * lebar + dalam1 + 550; dalamStun = 1; dalamPoison = 2; dalamUncontrol = 3; dalamSlow = 4; dalamDarah = 10; } function cekOptions(indi) { xpause = true; options = attachMovie('options_mc', 'options_mc', dalamOptions); if (indi == 'map') { options.gotoAndStop(3); } else { options.gotoAndStop(1); } options._x = 400; options._y = 300; options.objective_btn.onRollOver = function () { over(); }; options.objective_btn.onRelease = function () { klik(); removeMovieClip(options_mc); objective = attachMovie('objective_mc', 'objective_mc', dalamObjective); objective._x = -50; objective._y = -50; if (jenisMaen == 'training') { objective.gotoAndStop(20); } else { objective.gotoAndStop(mapKe); } _root.onMouseDown = function () { xpause = false; removeMovieClip(objective); delete _root.onMouseDown; }; }; options.options_btn.onRollOver = function () { over(); }; options.options_btn.onRelease = function () { klik(); options.gotoAndStop(2); options.back_btn.onRelease = function () { xpause = false; removeMovieClip(options_mc); }; }; options.quit_btn.onRollOver = function () { over(); }; options.quit_btn.onRelease = function () { klik(); options.gotoAndStop(4); options.yes_btn.onRollOver = function () { over(); }; options.yes_btn.onRelease = function () { klik(); xpause = false; removeMovieClip(options_mc); delete _root.onMouseDown; clearSemua(); gotoAndStop(206); }; options.no_btn.onRollOver = function () { over(); }; options.no_btn.onRelease = function () { klik(); xpause = false; removeMovieClip(options_mc); }; }; options.back_btn.onRollOver = function () { over(); }; options.back_btn.onRelease = function () { klik(); xpause = false; removeMovieClip(options_mc); }; options.more_btn.onRollOver = function () { over(); }; options.more_btn.onRelease = function () { klik(); getURL('http://www.armorgames.com', '_blank'); }; options.gaming_btn.onRollOver = function () { over(); }; options.gaming_btn.onRelease = function () { klik(); getURL('http://www.armorblog.com', '_blank'); }; } function over() { mySound = new Sound(sound_mc); mySound.attachSound('over'); mySound.start(0, 1); mySound.setVolume(volum2); } function klik() { mySound = new Sound(sound_mc); mySound.attachSound('klik'); mySound.start(0, 1); mySound.setVolume(volum2); } function backLangkah() { mySound = new Sound(sound_mc); mySound.attachSound('backLangkah'); mySound.start(0, 99); mySound.setVolume(volum2); } function backJalan() { mySound = new Sound(sound_mc); mySound.attachSound('backJalan'); mySound.start(0, 1); mySound.setVolume(volum2); } function backPedang() { mySound = new Sound(sound_mc); mySound.attachSound('backPedang'); mySound.start(0, 1); mySound.setVolume(volum2); } function backPisau() { mySound = new Sound(sound_mc); mySound.attachSound('backPisau'); mySound.start(0, 1); mySound.setVolume(volum2); } function backGada() { mySound = new Sound(sound_mc); mySound.attachSound('backGada'); mySound.start(0, 1); mySound.setVolume(volum2); } function backSihir() { mySound = new Sound(sound_mc); mySound.attachSound('backSihir'); mySound.start(0, 1); mySound.setVolume(volum2); } function backPedang2() { mySound = new Sound(sound_mc); mySound.attachSound('backPedang2'); mySound.start(0, 1); mySound.setVolume(volum2); } function backMawar() { mySound = new Sound(sound_mc); mySound.attachSound('backMawar'); mySound.start(0, 1); } function backKapak() { mySound = new Sound(sound_mc); mySound.attachSound('backKapak'); mySound.start(0, 1); mySound.setVolume(volum2); } function backTombak() { mySound = new Sound(sound_mc); mySound.attachSound('backTombak'); mySound.start(0, 1); mySound.setVolume(volum2); } function backPanah() { mySound = new Sound(sound_mc); mySound.attachSound('backPanah'); mySound.start(0, 1); mySound.setVolume(volum2); } function backGolok() { mySound = new Sound(sound_mc); mySound.attachSound('backGolok'); mySound.start(0, 1); mySound.setVolume(volum2); } function backCambuk() { mySound = new Sound(sound_mc); mySound.attachSound('backCambuk'); mySound.start(0, 1); mySound.setVolume(volum2); } function backLive() { mySound = new Sound(sound_mc); mySound.attachSound('backLive'); mySound.start(0, 1); mySound.setVolume(volum2); } function backBreak() { mySound = new Sound(sound_mc); mySound.attachSound('backBreak'); mySound.start(0, 1); mySound.setVolume(volum2); } function backIce() { mySound = new Sound(sound_mc); mySound.attachSound('backIce'); mySound.start(0, 1); mySound.setVolume(volum2); } function backAntidote() { mySound = new Sound(sound_mc); mySound.attachSound('backAntidote'); mySound.start(0, 1); mySound.setVolume(volum2); } function backFast() { mySound = new Sound(sound_mc); mySound.attachSound('backFast'); mySound.start(0, 1); mySound.setVolume(volum2); } function backAware() { mySound = new Sound(sound_mc); mySound.attachSound('backAware'); mySound.start(0, 1); mySound.setVolume(volum2); } function backAura() { mySound = new Sound(sound_mc); mySound.attachSound('backAura'); mySound.start(0, 1); mySound.setVolume(volum2); } function backDouble() { mySound = new Sound(sound_mc); mySound.attachSound('backDouble'); mySound.start(0, 1); mySound.setVolume(volum2); } function backHealth() { mySound = new Sound(sound_mc); mySound.attachSound('backHealth'); mySound.start(0, 1); mySound.setVolume(volum2); } function backPoison() { mySound = new Sound(sound_mc); mySound.attachSound('backPoison'); mySound.start(0, 1); mySound.setVolume(volum2); } function backStun() { mySound = new Sound(sound_mc); mySound.attachSound('backStun'); mySound.start(0, 1); mySound.setVolume(volum2); } function backDoubleAttack() { mySound = new Sound(sound_mc); mySound.attachSound('backDoubleAttack'); mySound.start(0, 1); mySound.setVolume(volum2); } function backSmash() { mySound = new Sound(sound_mc); mySound.attachSound('backSmash'); mySound.start(0, 1); mySound.setVolume(volum2); } function backBurn() { mySound = new Sound(sound_mc); mySound.attachSound('backBurn'); mySound.start(0, 1); mySound.setVolume(volum2); } function backFlame() { mySound = new Sound(sound_mc); mySound.attachSound('backFlame'); mySound.start(0, 1); mySound.setVolume(volum2); } function backStrike() { mySound = new Sound(sound_mc); mySound.attachSound('backStrike'); mySound.start(0, 1); mySound.setVolume(volum2); } function backUncontrol() { mySound = new Sound(sound_mc); mySound.attachSound('backUncontrol'); mySound.start(0, 1); mySound.setVolume(volum2); } function backMeteor() { mySound = new Sound(sound_mc); mySound.attachSound('backMeteor'); mySound.start(0, 1); mySound.setVolume(volum2); } function backAllAttack() { mySound = new Sound(sound_mc); mySound.attachSound('backAllAttack'); mySound.start(0, 1); mySound.setVolume(volum2); } function backAuraBlast() { mySound = new Sound(sound_mc); mySound.attachSound('backAuraBlast'); mySound.start(0, 1); mySound.setVolume(volum2); } function backSlow() { mySound = new Sound(sound_mc); mySound.attachSound('backSlow'); mySound.start(0, 1); mySound.setVolume(volum2); } function backIceBelt() { mySound = new Sound(sound_mc); mySound.attachSound('backIceBelt'); mySound.start(0, 1); } function backMasterAttack() { mySound = new Sound(sound_mc); mySound.attachSound('backMasterAttack'); mySound.start(0, 1); mySound.setVolume(volum2); } function backFlood() { mySound = new Sound(sound_mc); mySound.attachSound('backFlood'); mySound.start(0, 1); mySound.setVolume(volum2); } function backFight() { mySound = new Sound(sound_mc); mySound.attachSound('backFight'); mySound.start(0, 1); mySound.setVolume(volum2); } function backMenang() { mySound = new Sound(sound_mc); mySound.attachSound('backMenang'); mySound.start(0, 1); mySound.setVolume(volum2); } function backWeapon() { mySound = new Sound(sound_mc); mySound.attachSound('backWeapon'); mySound.start(0, 1); mySound.setVolume(volum2); } function backOgreMati() { mySound = new Sound(sound_mc); mySound.attachSound('backOgreMati'); mySound.start(0, 1); mySound.setVolume(volum2); } function backOgreKena() { mySound = new Sound(sound_mc); mySound.attachSound('backOgreKena'); mySound.start(0, 1); mySound.setVolume(volum2); } function backOrangMati() { mySound = new Sound(sound_mc); mySound.attachSound('backOrangMati'); mySound.start(0, 1); mySound.setVolume(volum2); } function backOrangKena() { mySound = new Sound(sound_mc); mySound.attachSound('backOrangKena'); mySound.start(0, 1); mySound.setVolume(volum2); } function backAplaus() { mySound = new Sound(sound_mc); mySound.attachSound('backAplaus'); mySound.start(0, 1); mySound.setVolume(volum2); } function cekMusic(indi) { clearInterval(idMusic1); clearInterval(idMusic2); ygNaik = indi; i = 1; while (i <= 7) { if (i == ygNaik) { _root['xvolum' + i] = 0; } else { _root['xvolum' + i] = volum1; } ++i; } idMusic1 = setInterval(musikNaik, 200); idMusic2 = setInterval(musikTurun, 200); } function musicStory() { myMusic.stop(); myMusic = new Sound(music_mc); myMusic.attachSound('musicStory'); myMusic.start(0, 1); myMusic.setVolume(volum1); myMusic.onSoundComplete = function () { musicStory(); }; } function musicPeta() { myMusic.stop(); myMusic = new Sound(music_mc); myMusic.attachSound('musicPeta'); myMusic.start(0, 1); myMusic.setVolume(volum1); myMusic.onSoundComplete = function () { musicPeta(); }; } function musicIstana() { myMusic.stop(); myMusic = new Sound(music_mc); myMusic.attachSound('musicIstana'); myMusic.start(0, 1); myMusic.setVolume(volum1); myMusic.onSoundComplete = function () { musicIstana(); }; } function musicCombat1() { myMusic.stop(); myMusic = new Sound(music_mc); myMusic.attachSound('musicCombat1'); myMusic.start(0, 1); myMusic.setVolume(volum1); myMusic.onSoundComplete = function () { musicCombat1(); }; } function musicCombat2() { myMusic.stop(); myMusic = new Sound(music_mc); myMusic.attachSound('musicCombat2'); myMusic.start(0, 1); myMusic.setVolume(volum1); myMusic.onSoundComplete = function () { musicCombat2(); }; } function musicPedesaan() { myMusic.stop(); myMusic = new Sound(music_mc); myMusic.attachSound('musicPedesaan'); myMusic.start(0, 1); myMusic.setVolume(volum1); myMusic.onSoundComplete = function () { musicPedesaan(); }; } function musicHoror() { myMusic.stop(); myMusic = new Sound(music_mc); myMusic.attachSound('musicHoror'); myMusic.start(0, 1); myMusic.setVolume(volum1); myMusic.onSoundComplete = function () { musicHoror(); }; } Stage.showMenu = false; _quality = 'High'; fscommand('fullscreen', false); fscommand('showmenu', false); fscommand('alowscale', true); trans = attachMovie('trans_mc', 'trans_mc', 8); trans2 = attachMovie('trans_mc2', 'trans_mc2', 9); musik = attachMovie('sound_mc', 'music_mc', 7); sound = attachMovie('sound_mc', 'sound_mc', 6); speedGame = 'NORMAL'; trans._x = -50; trans._y = -50; trans2._x = -50; trans2._y = -50; wwinitAwal(); ygDiSave(); volum1 = 75; volum2 = 100; simpanSemua = new Array('namaData', 'bykKarakter', 'mapKe', 'totalMoney', 'totalTurn', 'totalKilled', 'bisaTrain', 'lewatSini', 'naikLevel'); } frame 1 { stop(); this.onEnterFrame = function () { sedang = _root.getBytesLoaded(); total = _root.getBytesTotal(); xpersen = Math.floor((sedang / total) * 100); persen = xpersen + ' %'; qbar_mc.gotoAndStop(xpersen); if (sedang == total) { delete this.onEnterFrame; gotoAndStop('completed'); } }; } movieClip 2891 { } movieClip 2894 { frame 1 { stop(); } } movieClip 2896 { } instance of movieClip 2896 { onClipEvent (release) { getURL('http://www.armorgames.com', '_blank'); } } movieClip 2898 { } frame 10 { function aturSaja() { gotoAndStop(26); } stop(); start_btn.onRollOver = function () { over(); }; start_btn.onRelease = function () { klik(); trans_mc.gotoAndPlay(2); }; } frame 26 { play(); } frame 40 { stop(); } movieClip 2908 { } movieClip 2913 { } movieClip 2914 { frame 126 { stop(); _root.nextFrame(); } } instance of movieClip 2914 { onClipEvent (enterFrame) { this.onPress = function () { getURL('http://www.armorgames.com', '_blank'); }; } } frame 41 { play(); } frame 65 { gotoAndStop(66); } frame 66 { play(); } movieClip 2916 { } frame 205 { function aturSaja() { gotoAndStop(206); } stop(); trans_mc.gotoAndPlay(2); } frame 206 { function enabledAll(indi) { new_btn.enabled = indi; load_btn.enabled = indi; options_btn.enabled = indi; help_btn.enabled = indi; credits_btn.enabled = indi; more_btn.enabled = indi; gaming_btn.enabled = indi; } function aturSaja() { if (jenis == 'new') { gotoAndStop(995); } else { if (jenis == 'help') { gotoAndStop(964); } else { if (jenis == 'load') { gotoAndStop(994); } else { if (jenis == 'options') { gotoAndStop(208); } else { if (jenis == 'credits') { gotoAndStop(209); } else { if (jenis == 'langsung') { gotoAndStop(2636); } } } } } } } stop(); msgBox_mc5._visible = false; msgBox_mc5.gotoAndStop(1); msgBox_mc5.xscroll.gotoAndStop(1); history_btn.onRollOver = function () { over(); }; history_btn.onRelease = function () { klik(); gotoAndStop('history'); }; new_btn.onRollOver = function () { over(); }; new_btn.onRelease = function () { enabledAll(false); myListener = new Object(); myListener.onKeyDown = function () { if (Key.getCode() == 83) { jenis = 'langsung'; delete _root.onMouseDown; delete myListener.onKeyDown; removeListener(myListener); trans_mc.gotoAndPlay(2); } }; Key.addListener(myListener); klik(); msgBox_mc5._visible = true; msgBox_mc5.gotoAndPlay(1); msgBox_mc5.xscroll.gotoAndPlay(1); msgBox_mc5.info = 'Press OK Button to start new game with the story, Press S to start new game without the story (skip story), press Cancel Button to back to main menu.'; msgBox_mc5.ok_btn.onRollOver = function () { over(); }; msgBox_mc5.ok_btn.onRelease = function () { klik(); wwinitAwal(); ygDiSave(); trans_mc.gotoAndPlay(2); jenis = 'new'; }; msgBox_mc5.cancel_btn.onRollOver = function () { over(); }; msgBox_mc5.cancel_btn.onRelease = function () { klik(); delete myListener.onKeyDown; removeListener(myListener); msgBox_mc5._visible = false; msgBox_mc5.gotoAndStop(1); enabledAll(true); }; }; load_btn.onRollOver = function () { over(); }; load_btn.onRelease = function () { klik(); wwinitAwal(); ygDiSave(); trans_mc.gotoAndPlay(2); xjenisData = 'load'; jenis = 'load'; }; options_btn.onRollOver = function () { over(); }; options_btn.onRelease = function () { klik(); trans_mc.gotoAndPlay(2); jenis = 'options'; }; help_btn.onRollOver = function () { over(); }; help_btn.onRelease = function () { klik(); trans_mc.gotoAndPlay(2); jenis = 'help'; }; credits_btn.onRollOver = function () { over(); }; credits_btn.onRelease = function () { klik(); trans_mc.gotoAndPlay(2); jenis = 'credits'; }; more_btn.onRollOver = function () { over(); }; more_btn.onRelease = function () { klik(); getURL('http://www.armorgames.com', '_blank'); }; gaming_btn.onRollOver = function () { over(); }; gaming_btn.onRelease = function () { klik(); getURL('http://www.armorblog.com', '_blank'); }; } instance of movieClip 2896 { onClipEvent (release) { getURL('http://www.armorgames.com', '_blank'); } } movieClip 2954 { frame 12 { stop(); } } movieClip 2959 { frame 10 { stop(); } } frame 207 { stop(); quit_btn.onRollOver = function () { over(); }; quit_btn.onRelease = function () { klik(); gotoAndStop('xmenu'); }; } frame 208 { function aturSaja() { if (jenis == 'credits') { gotoAndStop(209); } else { if (jenis == 'back') { gotoAndStop(206); } } } function cekSpeed() { if (speedGame == 'SLOW') { speed1.gotoAndStop(3); speed2.gotoAndStop(1); speed3.gotoAndStop(1); } else { if (speedGame == 'NORMAL') { speed1.gotoAndStop(1); speed2.gotoAndStop(3); speed3.gotoAndStop(1); } else { if (speedGame == 'FAST') { speed1.gotoAndStop(1); speed2.gotoAndStop(1); speed3.gotoAndStop(3); } } } } stop(); back_btn.onRollOver = function () { over(); }; back_btn.onRelease = function () { klik(); trans_mc.gotoAndPlay(2); jenis = 'back'; }; bar1_mc.bar_mc._x = Math.ceil(_root.volum1 / 0.4347826086956522 - 115); bar1_mc.bar_mc.onEnterFrame = function () { _root.volum1 = int(0.4347826086956522 * (this._x + 115)); _root.myMusic.setVolume(_root.volum1); bar1_mc.persen1 = _root.volum1 + ' %'; }; bar1_mc.indi_mc.onPress = function () { klik(); startDrag(bar1_mc.bar_mc, true, -115, 0, 115, 0); }; bar1_mc.bar_mc.onRollOver = function () { over(); }; bar1_mc.indi_mc.onReleaseOutside = function () { over(); stopDrag(); }; bar1_mc.indi_mc.onRelease = bar1_mc.indi_mc.onReleaseOutside; bar2_mc.bar_mc._x = Math.ceil(_root.volum2 / 0.4347826086956522 - 115); bar2_mc.bar_mc.onEnterFrame = function () { _root.volum2 = int(0.4347826086956522 * (this._x + 115)); _root.mySound.setVolume(_root.volum2); bar2_mc.persen2 = _root.volum2 + ' %'; }; bar2_mc.indi_mc.onPress = function () { klik(); startDrag(bar2_mc.bar_mc, true, -115, 0, 115, 0); }; bar2_mc.bar_mc.onRollOver = function () { over(); }; bar2_mc.indi_mc.onReleaseOutside = function () { over(); stopDrag(); }; bar2_mc.indi_mc.onRelease = bar2_mc.indi_mc.onReleaseOutside; bar3_mc.bar_mc._x = Math.ceil(_root.volum3 / 0.4347826086956522 - 115); bar3_mc.bar_mc.onEnterFrame = function () { _root.volum3 = int(0.4347826086956522 * (this._x + 115)); if (_root.volum3 >= 50) { } else {} bar2_mc.persen3 = _root.volum3 + ' %'; }; bar3_mc.indi_mc.onPress = function () { klik(); startDrag(bar3_mc.bar_mc, true, -115, 0, 115, 0); }; bar3_mc.bar_mc.onRollOver = function () { over(); }; bar3_mc.indi_mc.onReleaseOutside = function () { over(); stopDrag(); }; bar3_mc.indi_mc.onRelease = bar3_mc.indi_mc.onReleaseOutside; speed1.xdata = 'SLOW'; speed2.xdata = 'NORMAL'; speed3.xdata = 'FAST'; cekSpeed(); speed1.onRollOver = function () { over(); }; speed1.onRelease = function () { klik(); speedGame = 'SLOW'; cekSpeed(); }; speed2.onRollOver = function () { over(); }; speed2.onRelease = function () { klik(); speedGame = 'NORMAL'; cekSpeed(); }; speed3.onRollOver = function () { over(); }; speed3.onRelease = function () { klik(); speedGame = 'FAST'; cekSpeed(); }; } movieClip 2974 { frame 1 { stop(); } } frame 209 { function aturSaja() { gotoAndPlay(206); } play(); quit_btn.onRollOver = function () { over(); }; quit_btn.onRelease = function () { klik(); trans_mc.gotoAndPlay(2); }; } movieClip 2979 { instance of movieClip 2896 { onClipEvent (release) { getURL('http://www.armorgames.com', '_blank'); } } } movieClip 2982 { } frame 963 { gotoAndPlay('credit'); } frame 964 { function aturSaja() { gotoAndStop(206); } stop(); quit_btn.onRollOver = function () { over(); }; quit_btn.onRelease = function () { klik(); removeMovieClip(info_mc2); trans_mc.gotoAndPlay(2); }; next_btn.onRollOver = function () { over(); }; next_btn.onRelease = function () { klik(); _root.gotoAndStop(_root._currentframe + 1); }; } frame 965 { prev_btn.onRollOver = function () { over(); }; prev_btn.onRelease = function () { klik(); _root.gotoAndStop(_root._currentframe - 1); }; } frame 970 { next_btn.onRollOver = function () { over(); }; prev_btn.onRollOver = function () { over(); }; next_btn.onRelease = function () { klik(); _root.gotoAndStop(_root._currentframe + 1); }; prev_btn.onRelease = function () { klik(); _root.gotoAndStop(_root._currentframe - 1); }; } frame 971 { function aturSaja() { gotoAndStop(206); } function overItem() { over(); myStr = new String(this); if (myStr.length == 14) { pilihAbil = Number(myStr.substr(myStr.length - 1, 1)); } else { if (myStr.length == 15) { pilihAbil = Number(myStr.substr(myStr.length - 2, 2)); } else { if (myStr.length == 16) { pilihAbil = Number(myStr.substr(myStr.length - 1, 3)); } } } jedaInfo2 = 0; adaJedaInfo = true; info2.nama = ''; info2.informasi = ''; jenisOver = 'attack'; } function outItem() { adaJedaInfo = false; info2.nama = ''; info2.informasi = ''; info2._visible = false; info2._alpha = 0; } function enterInfo2() { if (adaJedaInfo == true) { ++jedaInfo2; if (jedaInfo2 >= 10) { info2._visible = true; if (info2._alpha <= 100) { info2._alpha += 30; } } } else { info2._visible = false; } info2._x = _root._xmouse + 130; info2._y = _root._ymouse; indi = pilihAbil; if (jenisOver == 'attack') { info2.nama = jenisAbility[indi]; info2.informasi = infoAbility[indi]; } else { if (jenisOver == 'item') { info2.nama = jenisItem[indi]; info2.informasi = infoItem[indi]; } } } stop(); quit_btn.onRollOver = function () { over(); }; next_btn.onRollOver = function () { over(); }; prev_btn.onRollOver = function () { over(); }; quit_btn.onRelease = function () { klik(); removeMovieClip(info_mc2); trans_mc.gotoAndPlay(2); }; next_btn.onRelease = function () { klik(); gotoAndStop('item'); }; prev_btn.onRelease = function () { klik(); _root.gotoAndStop(_root._currentframe - 1); }; i = 2; while (i <= 17) { _root['no' + i] = i - 1 + '.'; _root['nama' + i] = jenisAbility[i]; _root['element' + i] = element[elementAbility[i]]; _root['price' + i] = hargaAbility[i]; _root['aura' + i] = auraAbility[i]; _root['tanya' + i].onRollOver = overItem; _root['tanya' + i].onRollOut = outItem; _root['tanya' + i].onReleaseOutside = outItem; _root['tanya' + i]._visible = true; _root['icon' + i]._visible = true; _root['icon' + i].gotoAndStop(i); ++i; } info2 = attachMovie('info_mc2', 'info_mc2', dalamInfo2); info2._x = -500; info2._y = -500; info2._visible = false; info2.onEnterFrame = enterInfo2; } frame 972 { function aturSaja() { gotoAndStop(206); } function overItem() { over(); myStr = new String(this); if (myStr.length == 14) { pilihAbil = Number(myStr.substr(myStr.length - 1, 1)); } else { if (myStr.length == 15) { pilihAbil = Number(myStr.substr(myStr.length - 2, 2)); } else { if (myStr.length == 16) { pilihAbil = Number(myStr.substr(myStr.length - 1, 3)); } } } jedaInfo2 = 0; adaJedaInfo = true; info2.nama = ''; info2.informasi = ''; jenisOver = 'item'; } function outItem() { adaJedaInfo = false; info2.nama = ''; info2.informasi = ''; info2._visible = false; info2._alpha = 0; } function enterInfo2() { if (adaJedaInfo == true) { ++jedaInfo2; if (jedaInfo2 >= 10) { info2._visible = true; if (info2._alpha <= 100) { info2._alpha += 30; } } } else { info2._visible = false; } info2._x = _root._xmouse + 130; info2._y = _root._ymouse; indi = pilihAbil; if (jenisOver == 'attack') { info2.nama = jenisAbility[indi]; info2.informasi = infoAbility[indi]; } else { if (jenisOver == 'item') { info2.nama = jenisItem[indi]; info2.informasi = infoItem[indi]; } } } stop(); quit_btn.onRollOver = function () { over(); }; next_btn.onRollOver = function () { over(); }; prev_btn.onRollOver = function () { over(); }; quit_btn.onRelease = function () { klik(); removeMovieClip(info_mc2); trans_mc.gotoAndPlay(2); }; next_btn.onRelease = function () { klik(); gotoAndStop('weapon'); }; prev_btn.onRelease = function () { klik(); gotoAndStop('spell'); }; i = 1; while (i <= 16) { if (jenisItem[i] != undefined) { _root['no' + i] = i + '.'; _root['nama' + i] = jenisItem[i]; _root['element' + i] = element[elementItem[i]]; _root['price' + i] = hargaItem[i]; _root['aura' + i] = '-'; _root['tanya' + i].onRollOver = overItem; _root['tanya' + i].onRollOut = outItem; _root['tanya' + i].onReleaseOutside = outItem; _root['tanya' + i]._visible = true; _root['icon' + i]._visible = true; _root['icon' + i].gotoAndStop(i + 100); } else { _root['no' + i] = ''; _root['nama' + i] = ''; _root['element' + i] = ''; _root['price' + i] = ''; _root['aura' + i] = ''; _root['tanya' + i]._visible = false; _root['icon' + i]._visible = false; } ++i; } info2 = attachMovie('info_mc2', 'info_mc2', dalamInfo2); info2._x = -500; info2._y = -500; info2._visible = false; info2.onEnterFrame = enterInfo2; } frame 973 { function aturSaja() { gotoAndStop(206); } function overWeapon() { over(); myStr = new String(this); if (myStr.length == 14) { pilihAbil = Number(myStr.substr(myStr.length - 1, 1)); } else { if (myStr.length == 15) { pilihAbil = Number(myStr.substr(myStr.length - 2, 2)); } else { if (myStr.length == 16) { pilihAbil = Number(myStr.substr(myStr.length - 1, 3)); } } } jedaInfo2 = 0; adaJedaInfo = true; info2.nama = ''; info2.informasi = ''; jenisOver = 'weapon'; } function outWeapon() { adaJedaInfo = false; info2.nama = ''; info2.informasi = ''; info2._visible = false; info2._alpha = 0; } function enterInfo2() { if (adaJedaInfo == true) { ++jedaInfo2; if (jedaInfo2 >= 10) { info2._visible = true; if (info2._alpha <= 100) { info2._alpha += 30; } } } else { info2._visible = false; } info2._x = _root._xmouse + 130; info2._y = _root._ymouse; indi = pilihAbil; if (jenisOver == 'attack') { info2.nama = jenisAbility[indi]; info2.informasi = infoAbility[indi]; } else { if (jenisOver == 'item') { info2.nama = jenisItem[indi]; info2.informasi = infoItem[indi]; } else { if (jenisOver == 'weapon') { info2.nama = jenisWeapon[indi]; info2.informasi = infoWeapon[indi]; } } } } stop(); quit_btn.onRollOver = function () { over(); }; next_btn.onRollOver = function () { over(); }; prev_btn.onRollOver = function () { over(); }; quit_btn.onRelease = function () { klik(); removeMovieClip(info_mc2); trans_mc.gotoAndPlay(2); }; next_btn.onRelease = function () { klik(); _root.gotoAndStop(_root._currentframe + 1); }; prev_btn.onRelease = function () { klik(); gotoAndStop('item'); }; i = 1; while (i <= 16) { if (jenisWeapon[i] != undefined) { _root['no' + i] = i + '.'; _root['nama' + i] = jenisWeapon[i]; _root['element' + i] = element[elementWeapon[i]]; _root['price' + i] = '-'; _root['aura' + i] = '-'; _root['tanya' + i].onRollOver = overWeapon; _root['tanya' + i].onRollOut = outWeapon; _root['tanya' + i].onReleaseOutside = outWeapon; _root['tanya' + i]._visible = true; _root['icon' + i]._visible = true; _root['icon' + i].gotoAndStop(i + 200); } else { _root['no' + i] = ''; _root['nama' + i] = ''; _root['element' + i] = ''; _root['price' + i] = ''; _root['aura' + i] = ''; _root['tanya' + i]._visible = false; _root['icon' + i]._visible = false; } ++i; } info2 = attachMovie('info_mc2', 'info_mc2', dalamInfo2); info2._x = -500; info2._y = -500; info2._visible = false; info2.onEnterFrame = enterInfo2; } frame 974 { next_btn.onRollOver = function () { over(); }; prev_btn.onRollOver = function () { over(); }; next_btn.onRelease = function () { klik(); _root.gotoAndStop(_root._currentframe + 1); }; prev_btn.onRelease = function () { klik(); _root.gotoAndStop(_root._currentframe - 1); }; } frame 994 { function aturSaja() { gotoAndStop(206); } function initData() { msgBox_mc._visible = false; wi = 0; while (wi <= 9) { xloadData(wi); if (cnamaData == undefined) { cnamaData = 'Empty'; } _root['data' + wi].data = cnamaData; _root['data' + wi].onRollOver = overData; _root['data' + wi].onRollOut = outData; _root['data' + wi].onRelease = klikData; ++wi; } } function overData() { over(); kata = new String(this); indi = Number(kata.substr(kata.length - 1, 1)); xloadData(indi); cekData(); if (vmapKe == '-') { this.gotoAndStop(2); } else { this.gotoAndStop(3); } } function cekData() { if (cmapKe == undefined) { vmapKe = '-'; } else { vmapKe = cmapKe; } if (cbykKarakter == undefined) { vbykKarakter = '-'; } else { vbykKarakter = cbykKarakter; } if (ctotalMoney == undefined) { vtotalMoney = '-'; } else { vtotalMoney = '$' + ctotalMoney; } if (ctotalTurn == undefined) { vtotalTurn = '-'; } else { vtotalTurn = ctotalTurn; } if (ctotalKilled == undefined) { vtotalKilled = '-'; } else { vtotalKilled = ctotalKilled; } } function outData() { this.gotoAndStop(1); vmapKe = '-'; vbykKarakter = '-'; vtotalMoney = '-'; vtotalTurn = '-'; vtotalKilled = '-'; } function outData2() { vmapKe = '-'; vbykKarakter = '-'; vtotalMoney = '-'; vtotalTurn = '-'; vtotalKilled = '-'; } function klikData() { klik(); kata = new String(this); zindi = kata.substr(kata.length - 1, 1); this.gotoAndStop(1); if (xjenisData == 'save') { wi = 0; while (wi <= 9) { delete _root['data' + wi].onRollOver; delete _root['data' + wi].onRollOut; delete _root['data' + wi].onRelease; ++wi; } msgBox_mc._visible = true; msgBox_mc.dataName = _root['data' + zindi].data; Selection.setFocus(msgBox_mc.nama); msgBox_mc.ok_btn.onRollOver = function () { over(); }; msgBox_mc.cancel_btn.onRollOver = msgBox_mc.ok_btn.onRollOver; msgBox_mc.cancel_btn.onRelease = function () { klik(); initData(); }; msgBox_mc.ok_btn.onRelease = function () { klik(); namaData = msgBox_mc.dataName; simpanData(zindi); initData(); xloadData(zindi); cekData(); }; } else { if (xjenisData == 'load') { loadData(zindi); if (mapKe != undefined) { wi = 0; while (wi <= 9) { delete _root['data' + wi].onRollOver; delete _root['data' + wi].onRollOut; delete _root['data' + wi].onRelease; ++wi; } if (mapKe == 2) { sudahKePeta = true; gotoAndStop('xsatu'); } else { if (mapKe == 3) { sudahKePeta = true; gotoAndStop('dua1'); } else { if (mapKe == 4) { sudahKePeta = true; gotoAndStop('dua3'); } else { if (mapKe == 5) { sudahKePeta = true; gotoAndStop('dua5'); } else { if (mapKe == 6) { sudahKePeta = true; gotoAndStop('dua7'); } else { if (mapKe == 7) { sudahKePeta = true; gotoAndStop('dua9'); } else { if (mapKe == 8) { sudahKePeta = true; gotoAndStop('dua11'); } else { if (mapKe == 9 && lewatSini != true) { sudahKePeta = true; gotoAndStop('dua13'); } else { if (mapKe == 9 && lewatSini == true) { sudahKePeta = true; gotoAndStop('dua15'); } else { if (mapKe == 10) { sudahKePeta = true; gotoAndStop('dua17'); } else { if (mapKe == 11) { sudahKePeta = true; gotoAndStop('dua19'); } else { if (mapKe >= 12) { sudahKePeta = true; gotoAndStop('dua21'); } } } } } } } } } } } } if (mapKe >= 12) { musicIstana(); } else { musicPeta(); } } } } } stop(); outData2(); initData(); if (xjenisData == 'save') { saveload.gotoAndStop(2); jenis_mc.gotoAndStop(1); quit_btn.onRollOver = function () { over(); }; quit_btn.onRelease = function () { if (mapKe == 2) { sudahKePeta = false; gotoAndStop('xsatu'); } else { if (mapKe == 3) { sudahKePeta = true; gotoAndStop('dua1'); } else { if (mapKe == 4) { sudahKePeta = true; gotoAndStop('dua3'); } else { if (mapKe == 5) { sudahKePeta = true; gotoAndStop('dua5'); } else { if (mapKe == 6) { sudahKePeta = true; gotoAndStop('dua7'); } else { if (mapKe == 7) { sudahKePeta = true; gotoAndStop('dua9'); } else { if (mapKe == 8) { sudahKePeta = true; gotoAndStop('dua11'); } else { if (mapKe == 9 && lewatSini != true) { sudahKePeta = true; gotoAndStop('dua13'); } else { if (mapKe == 9 && lewatSini == true) { sudahKePeta = true; gotoAndStop('dua15'); } else { if (mapKe == 10) { sudahKePeta = true; gotoAndStop('dua17'); } else { if (mapKe == 11) { sudahKePeta = true; gotoAndStop('dua19'); } else { if (mapKe >= 12) { sudahKePeta = false; gotoAndStop('dua21'); } } } } } } } } } } } } }; } else { if (xjenisData == 'load') { saveload.gotoAndStop(1); jenis_mc.gotoAndStop(2); quit_btn.onRollOver = function () { over(); }; quit_btn.onRelease = function () { klik(); trans_mc.gotoAndPlay(2); }; } } } movieClip 3348 { frame 1 { stop(); } } movieClip 3351 { frame 1 { stop(); } } movieClip 3368 { } frame 995 { function aturSaja() { if (jenis == 'langsung') { gotoAndStop(2636); } else { _root.gotoAndStop(_root._currentframe + 1); } } stop(); musicStory(); _root.onMouseDown = function () { delete _root.onMouseDown; trans_mc.gotoAndPlay(2); }; } frame 996 { _root.onMouseDown = function () { delete _root.onMouseDown; trans_mc.gotoAndPlay(2); }; } movieClip 3391 { } frame 997 { _root.onMouseDown = function () { delete _root.onMouseDown; trans_mc.gotoAndPlay(2); }; } frame 998 { _root.onMouseDown = function () { delete _root.onMouseDown; trans_mc.gotoAndPlay(2); }; } frame 999 { function aturSaja() { if (jenis == 'langsung') { gotoAndStop(2636); } else { gotoAndStop(1006); } } _root.onMouseDown = function () { trans_mc.gotoAndPlay(2); delete _root.onMouseDown; }; } frame 1006 { stop(); musicHoror(); _root.onMouseDown = function () { _root.gotoAndStop(_root._currentframe + 1); delete _root.onMouseDown; }; } movieClip 3430 { frame 20 { removeMovieClip(this); } } movieClip 3431 { } movieClip 3432 { } frame 1007 { ogr.gotoAndPlay(1); play(); backTombak(); } movieClip 3440 { } movieClip 3454 { frame 24 { stop(); } } movieClip 3464 { frame 10 { gotoAndPlay(1); } frame 15 { stop(); } } frame 1015 { backFlame(); } movieClip 3465 { frame 38 { stop(); } } movieClip 3466 { } frame 1025 { stop(); _root.onMouseDown = function () { _root.gotoAndStop(_root._currentframe + 1); delete _root.onMouseDown; }; } frame 1026 { ogr.gotoAndPlay(1); play(); backTombak(); } frame 1034 { backFlame(); } movieClip 3469 { frame 12 { gotoAndPlay(1); } frame 15 { stop(); } } frame 1044 { stop(); _root.onMouseDown = function () { _root.gotoAndStop(_root._currentframe + 1); delete _root.onMouseDown; }; } frame 1045 { ogr.gotoAndPlay(1); play(); backTombak(); } movieClip 3481 { frame 10 { gotoAndPlay(1); } frame 15 { stop(); } } frame 1053 { backFlame(); } frame 1063 { stop(); _root.onMouseDown = function () { _root.gotoAndStop(_root._currentframe + 1); delete _root.onMouseDown; }; } frame 1064 { ogr.gotoAndPlay(1); play(); backTombak(); } movieClip 3493 { frame 10 { gotoAndPlay(1); } frame 15 { stop(); } } frame 1072 { backFlame(); } frame 1082 { stop(); _root.onMouseDown = function () { _root.gotoAndStop(_root._currentframe + 1); delete _root.onMouseDown; }; } frame 1083 { ogr.gotoAndPlay(1); play(); backTombak(); } movieClip 3507 { frame 10 { gotoAndPlay(1); } frame 15 { stop(); } } frame 1091 { backFlame(); } frame 1101 { stop(); _root.onMouseDown = function () { _root.gotoAndStop(_root._currentframe + 1); delete _root.onMouseDown; }; } frame 1102 { ogr.gotoAndPlay(1); play(); backTombak(); } movieClip 3510 { } movieClip 3511 { frame 15 { stop(); } frame 20 { stop(); } } frame 1110 { stop(); _root.onMouseDown = function () { _root.gotoAndStop(_root._currentframe + 1); delete _root.onMouseDown; }; } frame 1111 { ogr.gotoAndPlay(1); play(); backTombak(); } movieClip 3519 { } movieClip 3523 { } movieClip 3524 { frame 15 { stop(); } frame 20 { stop(); } } frame 1120 { stop(); _root.onMouseDown = function () { _root.gotoAndStop(_root._currentframe + 1); delete _root.onMouseDown; }; } frame 1121 { ogr.gotoAndPlay(1); play(); backTombak(); } movieClip 3527 { } movieClip 3528 { frame 15 { stop(); } frame 20 { stop(); } } frame 1130 { stop(); _root.onMouseDown = function () { _root.gotoAndStop(_root._currentframe + 1); delete _root.onMouseDown; }; } frame 1131 { ogr.gotoAndPlay(1); play(); backTombak(); } movieClip 3536 { } movieClip 3541 { } movieClip 3542 { } movieClip 3543 { frame 15 { stop(); } frame 20 { stop(); } } frame 1140 { stop(); _root.onMouseDown = function () { _root.gotoAndStop(_root._currentframe + 1); delete _root.onMouseDown; }; } frame 1141 { ogr.gotoAndPlay(1); play(); backTombak(); } movieClip 3552 { } movieClip 3557 { } movieClip 3558 { frame 15 { stop(); } frame 20 { stop(); } } movieClip 3567 { } movieClip 3569 { } movieClip 3570 { frame 15 { stop(); } frame 20 { stop(); } } movieClip 3577 { } movieClip 3582 { } movieClip 3583 { frame 15 { stop(); } } movieClip 3590 { } movieClip 3596 { } movieClip 3597 { frame 15 { stop(); } } frame 1159 { stop(); _root.onMouseDown = function () { _root.gotoAndStop(_root._currentframe + 1); }; } movieClip 3604 { } movieClip 3607 { } movieClip 3608 { frame 15 { stop(); } } movieClip 3610 { frame 10 { gotoAndPlay(1); } frame 15 { stop(); } } movieClip 3611 { frame 10 { gotoAndPlay(1); } frame 15 { stop(); } } movieClip 3613 { frame 10 { gotoAndPlay(1); } frame 15 { stop(); } } movieClip 3614 { frame 10 { gotoAndPlay(1); } frame 15 { stop(); } } frame 1160 { musicCombat1(); backAplaus(); ogr.gotoAndPlay(1); xdark.gotoAndStop(15); xdetro.gotoAndStop(15); xdemon.gotoAndStop(15); xflash.gotoAndStop(15); xlewatair.gotoAndStop(15); i = 1; while (i <= 6) { _root['darat' + i].gotoAndStop(20); _root['laut' + i].gotoAndStop(20); _root['sihir' + i].gotoAndStop(20); _root['udara' + i].gotoAndStop(20); _root['garuda' + i].gotoAndStop(20); _root['hiu' + i].gotoAndStop(20); _root['monyet' + i].gotoAndStop(20); _root['naga' + i].gotoAndStop(20); _root['tengkorak' + i].gotoAndStop(20); ++i; } } movieClip 3616 { frame 11 { stop(); } } frame 1161 { ogr.gotoAndPlay(1); xdark.gotoAndPlay(1); xdetro.gotoAndPlay(1); xdemon.gotoAndPlay(1); xflash.gotoAndPlay(1); xlewatair.gotoAndPlay(1); i = 1; while (i <= 6) { _root['darat' + i].gotoAndStop(15); _root['laut' + i].gotoAndStop(15); _root['sihir' + i].gotoAndStop(15); _root['udara' + i].gotoAndStop(15); _root['garuda' + i].gotoAndStop(15); _root['hiu' + i].gotoAndStop(15); _root['monyet' + i].gotoAndStop(15); _root['naga' + i].gotoAndStop(15); _root['tengkorak' + i].gotoAndStop(15); ++i; } } movieClip 3618 { frame 9 { stop(); } } frame 1162 { xdetro.gotoAndStop(15); } frame 1163 { xdemon.gotoAndStop(15); } frame 1164 { xflash.gotoAndStop(15); } frame 1165 { xlewatair.gotoAndStop(15); } frame 1166 { xdark.gotoAndStop(15); } frame 1168 { function aturSaja() { if (jenis == 'langsung') { gotoAndStop(2636); } else { gotoAndStop(1206); } } stop(); _root.onMouseDown = function () { delete _root.onMouseDown; trans_mc.gotoAndPlay(2); }; } frame 1206 { stop(); musicPeta(); _root.onMouseDown = function () { _root.gotoAndStop(_root._currentframe + 1); delete _root.onMouseDown; }; } movieClip 3629 { } movieClip 3631 { } movieClip 3633 { } movieClip 3635 { } movieClip 3637 { } movieClip 3639 { } movieClip 3641 { } movieClip 3643 { } movieClip 3645 { } movieClip 3647 { } movieClip 3649 { } movieClip 3651 { } movieClip 3653 { } movieClip 3655 { } movieClip 3673 { } movieClip 3678 { } movieClip 3681 { } movieClip 3684 { } movieClip 3687 { } movieClip 3690 { } movieClip 3693 { } frame 1207 { play(); } frame 1215 { stop(); _root.onMouseDown = function () { _root.gotoAndStop(_root._currentframe + 1); delete _root.onMouseDown; }; } frame 1216 { play(); } frame 1225 { stop(); _root.onMouseDown = function () { _root.gotoAndStop(_root._currentframe + 1); delete _root.onMouseDown; }; } frame 1226 { play(); } frame 1235 { stop(); _root.onMouseDown = function () { _root.gotoAndStop(_root._currentframe + 1); delete _root.onMouseDown; }; } frame 1236 { play(); } frame 1245 { stop(); _root.onMouseDown = function () { _root.gotoAndStop(_root._currentframe + 1); delete _root.onMouseDown; }; } frame 1246 { play(); } frame 1255 { stop(); _root.onMouseDown = function () { _root.gotoAndStop(_root._currentframe + 1); delete _root.onMouseDown; }; } frame 1256 { play(); } frame 1266 { stop(); _root.onMouseDown = function () { _root.gotoAndStop(_root._currentframe + 1); delete _root.onMouseDown; }; } frame 1267 { stop(); musicHoror(); _root.onMouseDown = function () { _root.gotoAndStop(_root._currentframe + 1); delete _root.onMouseDown; }; } frame 1268 { play(); backPedang2(); } frame 1275 { backPedang2(); } frame 1283 { backPedang2(); } frame 1291 { backPedang2(); } frame 1300 { backPedang2(); } frame 1310 { stop(); _root.onMouseDown = function () { _root.gotoAndStop(_root._currentframe + 1); delete _root.onMouseDown; }; } frame 1311 { play(); backStrike(); } frame 1320 { backStrike(); } frame 1330 { backStrike(); } frame 1340 { backStrike(); } frame 1350 { backStrike(); } frame 1360 { backFlame(); } movieClip 3704 { frame 20 { stop(); } } frame 1385 { function aturSaja() { if (jenis == 'langsung') { gotoAndStop(2636); } else { gotoAndStop(1386); } } stop(); trans_mc.gotoAndPlay(2); } frame 1386 { function aturSaja() { if (jenis == 'langsung') { gotoAndStop(2636); } else { gotoAndStop('xserang1'); } } stop(); _root.onMouseDown = function () { delete _root.onMouseDown; trans_mc.gotoAndPlay(2); }; } frame 1400 { play(); backAuraBlast(); musicCombat2(); } frame 1480 { backGada(); } movieClip 3710 { } movieClip 3717 { } movieClip 3722 { } frame 1490 { backGada(); } frame 1500 { backGada(); } frame 1510 { backGada(); } frame 1520 { backGada(); } frame 1530 { backGada(); } frame 1540 { backGada(); } frame 1550 { backGada(); } frame 1575 { backFlame(); } movieClip 3725 { } frame 1580 { backFlame(); } frame 1585 { backFlame(); } frame 1590 { backFlame(); } frame 1595 { backFlame(); } frame 1600 { backFlame(); } frame 1605 { backFlame(); } frame 1610 { backFlame(); } frame 1620 { function aturSaja() { if (jenis == 'langsung') { gotoAndStop(2636); } else { gotoAndStop(1646); } } stop(); trans_mc.gotoAndPlay(2); } frame 1646 { function aturSaja() { if (jenis == 'langsung') { gotoAndStop(2636); } else { gotoAndStop('xserang2'); } } _root.onMouseDown = function () { delete _root.onMouseDown; trans_mc.gotoAndPlay(2); }; } frame 1660 { play(); } movieClip 3738 { } movieClip 3746 { } frame 1740 { backTombak(); } movieClip 3754 { } movieClip 3768 { } frame 1750 { backTombak(); } frame 1760 { backTombak(); } frame 1770 { backTombak(); } frame 1780 { backTombak(); } frame 1790 { backTombak(); } frame 1800 { backTombak(); } frame 1810 { backTombak(); } movieClip 3769 { } movieClip 3771 { } frame 1835 { backFlame(); } frame 1840 { backFlame(); } frame 1845 { backFlame(); } frame 1850 { backFlame(); } frame 1855 { backFlame(); } frame 1860 { backFlame(); } frame 1865 { backFlame(); } frame 1871 { backFlame(); } frame 1875 { backBurn(); } movieClip 3772 { } frame 1890 { function aturSaja() { if (jenis == 'langsung') { gotoAndStop(2636); } else { gotoAndStop(1906); } } stop(); trans_mc.gotoAndPlay(2); } frame 1906 { function aturSaja() { if (jenis == 'langsung') { gotoAndStop(2636); } else { gotoAndStop('xserang3'); } } stop(); _root.onMouseDown = function () { delete _root.onMouseDown; trans_mc.gotoAndPlay(2); }; } frame 1920 { play(); } movieClip 3784 { frame 1 { stop(); } } movieClip 3787 { } frame 2000 { backPanah(); } movieClip 3798 { } movieClip 3804 { frame 1 { stop(); } } movieClip 3809 { } movieClip 3817 { frame 1 { stop(); } } movieClip 3818 { } frame 2010 { backPanah(); } frame 2020 { backPanah(); } frame 2030 { backPanah(); } frame 2040 { backPanah(); } frame 2050 { backPanah(); } frame 2060 { backPanah(); } frame 2070 { backPanah(); } frame 2095 { backFlame(); } frame 2100 { backFlame(); } frame 2105 { backFlame(); } frame 2110 { backFlame(); } frame 2115 { backFlame(); } frame 2120 { backFlame(); } frame 2125 { backFlame(); } frame 2131 { backFlame(); } frame 2135 { backBurn(); } movieClip 3821 { } frame 2150 { function aturSaja() { if (jenis == 'langsung') { gotoAndStop(2636); } else { gotoAndStop(2166); } } stop(); trans_mc.gotoAndPlay(2); } frame 2166 { play(); } frame 2205 { musicCombat1(); } frame 2345 { gotoAndStop(2346); } frame 2346 { play(); } frame 2445 { function aturSaja() { if (jenis == 'langsung') { gotoAndStop(2636); } else { gotoAndStop('mulaimap'); } } stop(); trans_mc.gotoAndPlay(2); } frame 2450 { stop(); _root.onMouseDown = function () { _root.gotoAndStop(_root._currentframe + 1); }; } movieClip 3834 { } movieClip 3846 { } movieClip 3865 { } movieClip 3880 { } frame 2470 { function aturSaja() { if (jenis == 'langsung') { gotoAndStop(2636); } else { gotoAndStop(3416); } } stop(); _root.onMouseDown = function () { delete _root.onMouseDown; trans_mc.gotoAndPlay(2); }; } frame 2636 { stop(); musicPeta(); box_mc._visible = false; xclick._visible = false; msgBox_mc4.info = 'This is the main map, click on destination to proceed to the chosen city.'; msgBox_mc4.gotoAndPlay(1); msgBox_mc4.ok_btn.onRollOver = function () { over(); }; msgBox_mc4.ok_btn.onRelease = function () { klik(); xclick._visible = true; msgBox_mc4._visible = false; lone_btn.onRollOver = function () { over(); }; lone_btn.onRelease = function () { klik(); this.enabled = false; gotoAndPlay('satu'); }; }; } movieClip 3890 { frame 1 { stop(); } } movieClip 3909 { frame 1 { stop(); } } movieClip 3910 { } movieClip 3913 { frame 10 { stop(); } } movieClip 3916 { } frame 2665 { function aturSaja() { gotoAndStop(3654); } stop(); trans_mc.gotoAndPlay(2); } frame 2666 { stop(); box_mc._visible = true; if (sudahKePeta == true) { sudahKePeta = false; msgBox_mc4._visible = true; msgBox_mc4.gotoAndPlay(1); msgBox_mc4.info = 'From now on, you can purchase items in the market, view your troops status, and to train for combat (train only for 1 time, each mission) all in the North West screen.'; box_mc.shop_btn.enabled = false; box_mc.status_btn.enabled = false; box_mc.train_btn.enabled = false; box_mc.save_btn.enabled = false; box_mc.options_btn.enabled = false; } else { msgBox_mc4._visible = false; tombolAtas(); } msgBox_mc4.ok_btn.onRollOver = function () { over(); }; msgBox_mc4.ok_btn.onRelease = function () { klik(); msgBox_mc4._visible = false; tombolAtas(); }; } frame 2675 { function zmulaiSerang() { gotoAndStop(3935); } stop(); } movieClip 3917 { frame 10 { _root.backFight(); } frame 35 { stop(); _root.zmulaiSerang(); } } frame 2676 { stop(); tombolAtas(); box_mc.shop_btn.enabled = false; box_mc.shop_btn._alpha = 50; } frame 2685 { function zmulaiSerang() { gotoAndStop(3935); } stop(); } frame 2686 { stop(); tombolAtas(); box_mc.shop_btn.enabled = false; box_mc.shop_btn._alpha = 50; } frame 2697 { function aturSaja() { gotoAndStop(3744); } stop(); trans_mc.gotoAndPlay(2); } frame 2698 { stop(); tombolAtas(); } frame 2705 { function zmulaiSerang() { gotoAndStop(3935); } stop(); } frame 2706 { stop(); tombolAtas(); box_mc.shop_btn.enabled = false; box_mc.shop_btn._alpha = 50; } frame 2712 { function zmulaiSerang() { gotoAndStop(3935); } stop(); } frame 2713 { stop(); tombolAtas(); box_mc.shop_btn.enabled = false; box_mc.shop_btn._alpha = 50; } frame 2720 { function zmulaiSerang() { gotoAndStop(3935); } stop(); } frame 2721 { stop(); tombolAtas(); box_mc.shop_btn.enabled = false; box_mc.shop_btn._alpha = 50; } frame 2729 { function zmulaiSerang() { gotoAndStop(3935); } stop(); } frame 2730 { stop(); tombolAtas(); box_mc.shop_btn.enabled = false; box_mc.shop_btn._alpha = 50; } frame 2738 { function aturSaja() { gotoAndStop(2816); } lewatSini = true; trans_mc.gotoAndPlay(2); } frame 2739 { stop(); box_mc.shop_btn.enabled = true; box_mc.shop_btn._alpha = 100; tombolAtas(); } frame 2749 { function zmulaiSerang() { gotoAndStop(3935); } stop(); jenisMaen = 'tanding'; } frame 2750 { stop(); tombolAtas(); box_mc.shop_btn.enabled = false; box_mc.shop_btn._alpha = 50; } frame 2760 { function zmulaiSerang() { gotoAndStop(3935); } stop(); jenisMaen = 'tanding'; } movieClip 3918 { frame 10 { _root.backOrangMati(); } frame 35 { stop(); _root.zmulaiSerang(); } } frame 2761 { stop(); tombolAtas(); box_mc.shop_btn.enabled = false; box_mc.shop_btn._alpha = 50; } frame 2774 { function aturSaja() { gotoAndStop(3946); } stop(); jenisMaen = 'tanding'; trans_mc.gotoAndPlay(2); } frame 2775 { stop(); bisaTrain = false; box_mc._visible = true; box_mc.gotoAndStop(2); if (mapKe >= 13) { sudahKePeta = false; } if (sudahKePeta == true) { sudahKePeta = false; msgBox_mc4._visible = true; msgBox_mc4.gotoAndPlay(1); msgBox_mc4.info = 'From now on, you can play off battle by clicking Battle Button, you got reward 100000 of money for prepare to the battle, the enemy\'s level is harder than before you play, please try it.'; box_mc.shop_btn.enabled = false; box_mc.status_btn.enabled = false; box_mc.train_btn.enabled = false; box_mc.save_btn.enabled = false; box_mc.options_btn.enabled = false; box_mc.battle_btn.enabled = false; } else { msgBox_mc4._visible = false; tombolAtas(); } msgBox_mc4.ok_btn.onRollOver = function () { over(); }; msgBox_mc4.ok_btn.onRelease = function () { klik(); msgBox_mc4._visible = false; tombolAtas(); }; } frame 2786 { function aturSaja() { if (jenis == 'langsung') { gotoAndStop('dua13'); } } stop(); musicStory(); _root.onMouseDown = function () { jenis = 'dialog'; _root.gotoAndStop(_root._currentframe + 1); }; myListener = new Object(); myListener.onKeyDown = function () { if (Key.getCode() == 83) { delete _root.onMouseDown; delete myListener.onKeyDown; removeListener(myListener); trans_mc.gotoAndPlay(2); jenis = 'langsung'; } }; Key.addListener(myListener); } movieClip 3922 { } frame 2798 { function aturSaja() { gotoAndStop('dua13'); } delete _root.onMouseDown; delete myListener.onKeyDown; removeListener(myListener); trans_mc.gotoAndPlay(2); } frame 2816 { function aturSaja() { if (jenis == 'langsung') { gotoAndPlay('dua15'); } } play(); jenis = 'dialog'; musicPedesaan(); myListener = new Object(); myListener.onKeyDown = function () { if (Key.getCode() == 83) { delete _root.onMouseDown; delete myListener.onKeyDown; removeListener(myListener); trans_mc.gotoAndPlay(2); jenis = 'langsung'; } }; Key.addListener(myListener); } movieClip 3949 { } movieClip 3953 { } movieClip 3957 { } frame 2995 { stop(); _root.onMouseDown = function () { _root.gotoAndStop(_root._currentframe + 1); }; } frame 2998 { function aturSaja() { if (jenis == 'langsung') { gotoAndStop('dua15'); } else { gotoAndStop('magre2'); } } delete _root.onMouseDown; trans_mc.gotoAndPlay(2); } frame 3010 { play(); } movieClip 3970 { } movieClip 3976 { } frame 3020 { stop(); musicStory(); _root.onMouseDown = function () { _root.gotoAndStop(_root._currentframe + 1); }; } frame 3030 { function aturSaja() { if (jenis == 'langsung') { gotoAndStop('dua15'); } else { gotoAndStop(3141); } } delete _root.onMouseDown; trans_mc2.gotoAndPlay(2); } frame 3040 { stop(); _root.onMouseDown = function () { _root.gotoAndStop(_root._currentframe + 1); }; } frame 3045 { function aturSaja() { if (jenis == 'langsung') { gotoAndStop('dua15'); } else { gotoAndStop('magre4'); } } delete _root.onMouseDown; trans_mc.gotoAndPlay(2); } frame 3058 { stop(); musicPedesaan(); _root.onMouseDown = function () { _root.gotoAndStop(_root._currentframe + 1); }; } frame 3059 { function aturSaja() { if (jenis == 'langsung') { gotoAndStop('dua15'); } else { gotoAndStop('magre5'); } } delete _root.onMouseDown; trans_mc.gotoAndPlay(2); } frame 3061 { stop(); _root.onMouseDown = function () { _root.gotoAndStop(_root._currentframe + 1); }; } frame 3062 { function aturSaja() { if (jenis == 'langsung') { gotoAndStop('dua15'); } else { gotoAndStop('magre6'); } } delete _root.onMouseDown; trans_mc.gotoAndPlay(2); } frame 3068 { stop(); _root.onMouseDown = function () { _root.gotoAndStop(_root._currentframe + 1); }; } frame 3076 { function aturSaja() { gotoAndStop('dua15'); } musicPeta(); delete _root.onMouseDown; delete myListener.onKeyDown; removeListener(myListener); trans_mc.gotoAndPlay(2); } frame 3101 { function aturSaja() { if (jenis == 'langsung') { gotoAndStop('dua19'); } } stop(); musicPedesaan(); _root.onMouseDown = function () { jenis = 'dialog'; _root.gotoAndStop(_root._currentframe + 1); }; myListener = new Object(); myListener.onKeyDown = function () { if (Key.getCode() == 83) { delete _root.onMouseDown; delete myListener.onKeyDown; removeListener(myListener); trans_mc.gotoAndPlay(2); jenis = 'langsung'; } }; Key.addListener(myListener); } frame 3107 { function aturSaja() { gotoAndStop('dua19'); } delete _root.onMouseDown; delete myListener.onKeyDown; removeListener(myListener); trans_mc.gotoAndPlay(2); } frame 3141 { stop(); musicHoror(); _root.onMouseDown = function () { _root.gotoAndStop(_root._currentframe + 1); }; } movieClip 4034 { } movieClip 4041 { } frame 3158 { delete _root.onMouseDown; play(); } movieClip 4076 { frame 5 { stop(); } } frame 3170 { backStun(); } frame 3172 { stop(); _root.onMouseDown = function () { _root.gotoAndStop(_root._currentframe + 1); }; } frame 3174 { function aturSaja() { if (jenis == 'langsung') { gotoAndStop('dua15'); } else { gotoAndStop(3186); } } delete _root.onMouseDown; trans_mc.gotoAndPlay(2); } frame 3186 { play(); musicPeta(); } frame 3255 { backMasterAttack(); } movieClip 4087 { frame 15 { stop(); removeMovieClip(this); } } movieClip 4095 { } frame 3306 { backSmash(); musicCombat1(); } frame 3315 { backBreak(); } frame 3350 { stop(); _root.onMouseDown = function () { _root.gotoAndStop(_root._currentframe + 1); }; } frame 3355 { delete _root.onMouseDown; play(); } frame 3415 { function aturSaja() { if (jenis == 'langsung') { gotoAndStop('dua15'); } else { gotoAndStop('magre3'); } } stop(); musicStory(); delete _root.onMouseDown; trans_mc2.gotoAndPlay(2); } frame 3416 { function aturSaja() { if (jenis == 'langsung') { gotoAndStop(2636); } else { gotoAndStop('xking'); } } stop(); _root.onMouseDown = function () { delete _root.onMouseDown; trans_mc.gotoAndPlay(2); }; } frame 3425 { play(); musicIstana(); } movieClip 4128 { } frame 3444 { stop(); _root.onMouseDown = function () { _root.gotoAndStop(_root._currentframe + 1); }; } frame 3445 { delete _root.onMouseDown; play(); backLangkah(); } frame 3455 { stop(); mySound.stop(); _root.onMouseDown = function () { _root.gotoAndStop(_root._currentframe + 1); }; } frame 3456 { delete _root.onMouseDown; play(); backLangkah(); } movieClip 4142 { } frame 3484 { mySound.stop(); } frame 3529 { backLangkah(); } frame 3558 { mySound.stop(); } frame 3559 { backLangkah(); } frame 3573 { mySound.stop(); } frame 3574 { stop(); _root.onMouseDown = function () { _root.gotoAndStop(_root._currentframe + 1); }; } frame 3591 { function aturSaja() { if (jenis == 'langsung') { gotoAndStop(2636); } else { gotoAndStop(3615); } } delete _root.onMouseDown; trans_mc.gotoAndPlay(2); } frame 3615 { function aturSaja() { if (jenis == 'langsung') { gotoAndStop(2636); } else { gotoAndStop('xjalan'); } } stop(); _root.onMouseDown = function () { delete _root.onMouseDown; trans_mc.gotoAndPlay(2); }; } frame 3624 { stop(); musicPedesaan(); _root.onMouseDown = function () { _root.gotoAndStop(_root._currentframe + 1); }; } frame 3628 { function aturSaja() { if (jenis == 'langsung') { gotoAndStop(2636); } else { gotoAndStop(2636); } } delete _root.onMouseDown; delete myListener.onKeyDown; removeListener(myListener); trans_mc.gotoAndPlay(2); } frame 3654 { function aturSaja() { if (jenis == 'langsung') { gotoAndStop(3935); } } stop(); musicIstana(); _root.onMouseDown = function () { jenis = 'dialog'; _root.gotoAndStop(_root._currentframe + 1); }; myListener = new Object(); myListener.onKeyDown = function () { if (Key.getCode() == 83) { delete _root.onMouseDown; delete myListener.onKeyDown; removeListener(myListener); trans_mc.gotoAndPlay(2); jenis = 'langsung'; } }; Key.addListener(myListener); } movieClip 4176 { } movieClip 4182 { } frame 3660 { delete _root.onMouseDown; play(); backLangkah(); } frame 3683 { stop(); mySound.stop(); musicHoror(); _root.onMouseDown = function () { _root.gotoAndStop(_root._currentframe + 1); }; } frame 3688 { function aturSaja() { gotoAndStop(3935); } delete _root.onMouseDown; delete myListener.onKeyDown; removeListener(myListener); trans_mc.gotoAndPlay(2); } frame 3693 { function aturSaja() { if (jenis == 'langsung') { gotoAndStop('xsatu'); } } stop(); musicIstana(); _root.onMouseDown = function () { jenis = 'dialog'; _root.gotoAndStop(_root._currentframe + 1); }; myListener = new Object(); myListener.onKeyDown = function () { if (Key.getCode() == 83) { delete _root.onMouseDown; delete myListener.onKeyDown; removeListener(myListener); trans_mc.gotoAndPlay(2); jenis = 'langsung'; } }; Key.addListener(myListener); } frame 3697 { function aturSaja() { gotoAndStop('xsatu'); } delete _root.onMouseDown; delete myListener.onKeyDown; removeListener(myListener); trans_mc.gotoAndPlay(2); } frame 3744 { function aturSaja() { if (jenis == 'langsung') { gotoAndStop(3935); } } stop(); musicStory(); _root.onMouseDown = function () { jenis = 'dialog'; _root.gotoAndStop(_root._currentframe + 1); }; myListener = new Object(); myListener.onKeyDown = function () { if (Key.getCode() == 83) { delete _root.onMouseDown; delete myListener.onKeyDown; removeListener(myListener); trans_mc.gotoAndPlay(2); jenis = 'langsung'; } }; Key.addListener(myListener); } movieClip 4207 { } movieClip 4212 { } frame 3749 { stop(); musicHoror(); _root.onMouseDown = function () { _root.gotoAndStop(_root._currentframe + 1); }; } frame 3751 { function aturSaja() { gotoAndStop(3935); } delete _root.onMouseDown; delete myListener.onKeyDown; removeListener(myListener); trans_mc.gotoAndPlay(2); } frame 3763 { function aturSaja() { if (jenis == 'langsung') { gotoAndStop('dua5'); } } stop(); musicPedesaan(); _root.onMouseDown = function () { jenis = 'dialog'; _root.gotoAndStop(_root._currentframe + 1); }; myListener = new Object(); myListener.onKeyDown = function () { if (Key.getCode() == 83) { delete _root.onMouseDown; delete myListener.onKeyDown; removeListener(myListener); trans_mc.gotoAndPlay(2); jenis = 'langsung'; } }; Key.addListener(myListener); } frame 3775 { function aturSaja() { gotoAndStop('dua5'); } delete _root.onMouseDown; delete myListener.onKeyDown; removeListener(myListener); trans_mc.gotoAndPlay(2); } frame 3794 { play(); backLangkah(); } movieClip 4243 { } frame 3838 { stop(); jalan.stop(); mySound.stop(); _root.onMouseDown = function () { delete this.onMouseDown; _root.gotoAndStop(_root._currentframe + 1); }; } frame 3839 { function cekJenis() { totMoney = 'Total Money: ' + totalMoney; if (jenisShop == 1) { item_mc.gotoAndStop(2); item_mc.enabled = false; spell_mc.gotoAndStop(1); spell_mc.enabled = true; i = 1; while (i <= 9) { if (namaItem[i] != undefined) { _root['nama' + i] = jenisItem[namaItem[i]]; _root['element' + i] = element[elementItem[namaItem[i]]]; _root['price' + i] = hargaItem[namaItem[i]]; _root['owned' + i] = punyaItem[namaItem[i]]; _root['xicon' + i]._visible = true; _root['xicon' + i].gotoAndStop(100 + namaItem[i]); _root['buy' + i]._visible = true; _root['sell' + i]._visible = true; _root['tanya' + i]._visible = true; _root['sell' + i]._alpha = 100; _root['sell' + i].enabled = true; _root['buy' + i]._alpha = 100; _root['buy' + i].enabled = true; _root['buy' + i].onRelease = klikBuyItem; _root['buy' + i].onRollOver = overItem; _root['buy' + i].onRollOut = outItem; _root['sell' + i].onRelease = klikSellItem; _root['sell' + i].onRollOver = overItem; _root['sell' + i].onRollOut = outItem; _root['tanya' + i].onRollOver = overTanya; _root['tanya' + i].onRollOut = outTanya; _root['tanya' + i].onReleaseOutside = outTanya; } else { _root['nama' + i] = ''; _root['element' + i] = ''; _root['price' + i] = ''; _root['owned' + i] = ''; _root['buy' + i]._visible = false; _root['sell' + i]._visible = false; _root['tanya' + i]._visible = false; _root['xicon' + i]._visible = false; } ++i; } } else { if (jenisShop == 2) { spell_mc.gotoAndStop(2); spell_mc.enabled = false; item_mc.gotoAndStop(1); item_mc.enabled = true; i = 1; while (i <= 9) { if (namaSpell[i] != undefined) { _root['nama' + i] = jenisAbility[namaSpell[i]]; _root['element' + i] = element[elementAbility[namaSpell[i]]]; _root['price' + i] = hargaAbility[namaSpell[i]]; _root['xicon' + i]._visible = true; _root['xicon' + i].gotoAndStop(namaSpell[i]); _root['buy' + i]._visible = true; _root['tanya' + i]._visible = true; _root['sell' + i]._visible = true; if (punyaAbility[namaSpell[i]] == 1) { _root['owned' + i] = 'Yes'; _root['buy' + i]._alpha = 50; _root['buy' + i].enabled = false; } else { _root['owned' + i] = 'No'; _root['buy' + i].onRelease = klikBuySpell; _root['buy' + i].onRollOver = overItem; _root['buy' + i].onRollOut = outItem; } _root['tanya' + i].onRollOver = overTanya; _root['tanya' + i].onRollOut = outTanya; _root['tanya' + i].onReleaseOutside = outTanya; _root['sell' + i]._alpha = 50; _root['sell' + i].enabled = false; } else { _root['nama' + i] = ''; _root['element' + i] = ''; _root['price' + i] = ''; _root['owned' + i] = ''; _root['buy' + i]._visible = false; _root['sell' + i]._visible = false; _root['tanya' + i]._visible = false; _root['xicon' + i]._visible = false; } ++i; } } } } function klikBuySpell() { klik(); myStr = new String(this); if (myStr.length == 12) { indi = Number(myStr.substr(myStr.length - 1, 1)); } else { indi = Number(myStr.substr(myStr.length - 2, 2)); } if (totalMoney >= _root['price' + indi]) { totalMoney -= _root['price' + indi]; ++punyaAbility[namaSpell[indi]]; infor = 'SHOP KEEPER GIRL: THANKS TO BUY'; cekJenis(); } else { infor = 'SHOP KEEPER GIRL: SORRY, NOT ENOUGH FUNDS'; } } function klikBuyItem() { klik(); myStr = new String(this); if (myStr.length == 12) { indi = Number(myStr.substr(myStr.length - 1, 1)); } else { indi = Number(myStr.substr(myStr.length - 2, 2)); } if (totalMoney >= _root['price' + indi]) { totalMoney -= _root['price' + indi]; ++punyaItem[namaItem[indi]]; infor = 'SHOP KEEPER GIRL: THANKS TO BUY'; cekJenis(); } else { infor = 'SHOP KEEPER GIRL: SORRY, NOT ENOUGH FUNDS'; } } function klikSellItem() { klik(); myStr = new String(this); if (myStr.length == 13) { indi = Number(myStr.substr(myStr.length - 1, 1)); } else { indi = Number(myStr.substr(myStr.length - 2, 2)); } if (punyaItem[namaItem[indi]] > 0) { totalMoney += Math.ceil(_root['price' + indi] / 2); --punyaItem[namaItem[indi]]; infor = 'SHOP KEEPER GIRL: THANKS TO SELL'; cekJenis(); } else { infor = 'SHOP KEEPER GIRL: SORRY, NOT MORE ITEMS'; } } function overItem() { over(); this.gotoAndStop(2); } function outItem() { this.gotoAndStop(1); } function overTanya() { over(); myStr = new String(this); if (myStr.length == 14) { pilihAbil = Number(myStr.substr(myStr.length - 1, 1)); } else { if (myStr.length == 15) { pilihAbil = Number(myStr.substr(myStr.length - 2, 2)); } else { if (myStr.length == 16) { pilihAbil = Number(myStr.substr(myStr.length - 1, 3)); } } } jedaInfo2 = 0; adaJedaInfo = true; info2.nama = ''; info2.informasi = ''; if (jenisShop == 1) { jenisOver = 'item'; } else { if (jenisShop == 2) { jenisOver = 'attack'; } } } function outTanya() { adaJedaInfo = false; info2.nama = ''; info2.informasi = ''; info2._visible = false; info2._alpha = 0; } function enterInfo2() { if (adaJedaInfo == true) { ++jedaInfo2; if (jedaInfo2 >= 10) { info2._visible = true; if (info2._alpha <= 100) { info2._alpha += 30; } } } else { info2._visible = false; } info2._x = _root._xmouse - 100; info2._y = _root._ymouse; indi = pilihAbil; if (jenisOver == 'attack') { info2.nama = jenisAbility[namaSpell[indi]]; xinfo = infoAbility[namaSpell[indi]]; info2.informasi = 'Element ' + element[elementAbility[namaSpell[indi]]] + ' \n Need ' + auraAbility[namaSpell[indi]] + ' Aura \n\n ' + xinfo; } else { if (jenisOver == 'item') { info2.nama = jenisItem[namaItem[indi]]; info2.informasi = infoItem[namaItem[indi]]; } } } stop(); quit_btn.onRollOver = function () { over(); }; quit_btn.onRelease = function () { klik(); xcekKemana(); }; if (mapKe == 2) { namaItem = new Array('', 1, 2, 3, 4, 5); namaSpell = new Array('', 6, 7, 8, 9, 10); } else { if (mapKe == 5) { namaItem = new Array('', 1, 2, 3, 4, 5, 6); namaSpell = new Array('', 6, 7, 8, 9, 10, 11, 12, 13, 14); } else { if (mapKe >= 12) { namaItem = new Array('', 3, 4, 5, 6, 7, 8, 9, 10); namaSpell = new Array('', 9, 10, 11, 12, 13, 14, 15, 16); } else { namaItem = new Array('', 7, 8, 9, 10); namaSpell = new Array('', 15, 16); } } } spell_mc.onRelease = function () { klik(); jenisShop = 2; cekJenis(); }; spell_mc.onRollOver = function () { over(); this.gotoAndStop(3); }; spell_mc.onRollOut = function () { this.gotoAndStop(1); }; item_mc.onRelease = function () { klik(); jenisShop = 1; cekJenis(); }; item_mc.onRollOver = function () { over(); this.gotoAndStop(3); }; item_mc.onRollOut = function () { this.gotoAndStop(1); }; jenisShop = 1; cekJenis(); infor = ''; info2 = attachMovie('info_mc2', 'info_mc2', dalamInfo2); info2._x = -500; info2._y = -500; info2._visible = false; info2.onEnterFrame = enterInfo2; } movieClip 4249 { frame 1 { stop(); } } movieClip 4251 { frame 1 { stop(); } } movieClip 4253 { frame 1 { stop(); } } movieClip 4255 { frame 1 { stop(); } } frame 3864 { play(); backLangkah(); } frame 3908 { stop(); jalan.stop(); mySound.stop(); _root.onMouseDown = function () { delete this.onMouseDown; _root.gotoAndStop(_root._currentframe + 1); }; } frame 3909 { function cekJenis() { totMoney = 'Total Money: ' + totalMoney; if (jenisShop == 1) { item_mc.gotoAndStop(2); item_mc.enabled = false; spell_mc.gotoAndStop(1); spell_mc.enabled = true; i = 1; while (i <= 9) { if (namaItem[i] != undefined) { _root['nama' + i] = jenisItem[namaItem[i]]; _root['element' + i] = element[elementItem[namaItem[i]]]; _root['price' + i] = hargaItem[namaItem[i]]; _root['owned' + i] = punyaItem[namaItem[i]]; _root['xicon' + i]._visible = true; _root['xicon' + i].gotoAndStop(100 + namaItem[i]); _root['buy' + i]._visible = true; _root['sell' + i]._visible = true; _root['tanya' + i]._visible = true; _root['sell' + i]._alpha = 100; _root['sell' + i].enabled = true; _root['buy' + i]._alpha = 100; _root['buy' + i].enabled = true; _root['buy' + i].onRelease = klikBuyItem; _root['buy' + i].onRollOver = overItem; _root['buy' + i].onRollOut = outItem; _root['sell' + i].onRelease = klikSellItem; _root['sell' + i].onRollOver = overItem; _root['sell' + i].onRollOut = outItem; _root['tanya' + i].onRollOver = overTanya; _root['tanya' + i].onRollOut = outTanya; _root['tanya' + i].onReleaseOutside = outTanya; } else { _root['nama' + i] = ''; _root['element' + i] = ''; _root['price' + i] = ''; _root['owned' + i] = ''; _root['buy' + i]._visible = false; _root['sell' + i]._visible = false; _root['tanya' + i]._visible = false; _root['xicon' + i]._visible = false; } ++i; } } else { if (jenisShop == 2) { spell_mc.gotoAndStop(2); spell_mc.enabled = false; item_mc.gotoAndStop(1); item_mc.enabled = true; i = 1; while (i <= 9) { if (namaSpell[i] != undefined) { _root['nama' + i] = jenisAbility[namaSpell[i]]; _root['element' + i] = element[elementAbility[namaSpell[i]]]; _root['price' + i] = hargaAbility[namaSpell[i]]; _root['xicon' + i]._visible = true; _root['xicon' + i].gotoAndStop(namaSpell[i]); _root['buy' + i]._visible = true; _root['tanya' + i]._visible = true; _root['sell' + i]._visible = true; if (punyaAbility[namaSpell[i]] == 1) { _root['owned' + i] = 'Yes'; _root['buy' + i]._alpha = 50; _root['buy' + i].enabled = false; } else { _root['owned' + i] = 'No'; _root['buy' + i].onRelease = klikBuySpell; _root['buy' + i].onRollOver = overItem; _root['buy' + i].onRollOut = outItem; } _root['tanya' + i].onRollOver = overTanya; _root['tanya' + i].onRollOut = outTanya; _root['tanya' + i].onReleaseOutside = outTanya; _root['sell' + i]._alpha = 50; _root['sell' + i].enabled = false; } else { _root['nama' + i] = ''; _root['element' + i] = ''; _root['price' + i] = ''; _root['owned' + i] = ''; _root['buy' + i]._visible = false; _root['sell' + i]._visible = false; _root['tanya' + i]._visible = false; _root['xicon' + i]._visible = false; } ++i; } } } } function klikBuySpell() { klik(); myStr = new String(this); if (myStr.length == 12) { indi = Number(myStr.substr(myStr.length - 1, 1)); } else { indi = Number(myStr.substr(myStr.length - 2, 2)); } if (totalMoney >= _root['price' + indi]) { totalMoney -= _root['price' + indi]; ++punyaAbility[namaSpell[indi]]; infor = 'SHOP KEEPER GIRL: THANKS TO BUY'; cekJenis(); } else { infor = 'SHOP KEEPER GIRL: SORRY, NOT ENOUGH FUNDS'; } } function klikBuyItem() { klik(); myStr = new String(this); if (myStr.length == 12) { indi = Number(myStr.substr(myStr.length - 1, 1)); } else { indi = Number(myStr.substr(myStr.length - 2, 2)); } if (totalMoney >= _root['price' + indi]) { totalMoney -= _root['price' + indi]; ++punyaItem[namaItem[indi]]; infor = 'SHOP KEEPER GIRL: THANKS TO BUY'; cekJenis(); } else { infor = 'SHOP KEEPER GIRL: SORRY, NOT ENOUGH FUNDS'; } } function klikSellItem() { klik(); myStr = new String(this); if (myStr.length == 13) { indi = Number(myStr.substr(myStr.length - 1, 1)); } else { indi = Number(myStr.substr(myStr.length - 2, 2)); } if (punyaItem[namaItem[indi]] > 0) { totalMoney += Math.ceil(_root['price' + indi] / 2); --punyaItem[namaItem[indi]]; infor = 'SHOP KEEPER GIRL: THANKS TO SELL'; cekJenis(); } else { infor = 'SHOP KEEPER GIRL: SORRY, NOT MORE ITEMS'; } } function overItem() { over(); this.gotoAndStop(2); } function outItem() { this.gotoAndStop(1); } function overTanya() { over(); myStr = new String(this); if (myStr.length == 14) { pilihAbil = Number(myStr.substr(myStr.length - 1, 1)); } else { if (myStr.length == 15) { pilihAbil = Number(myStr.substr(myStr.length - 2, 2)); } else { if (myStr.length == 16) { pilihAbil = Number(myStr.substr(myStr.length - 1, 3)); } } } jedaInfo2 = 0; adaJedaInfo = true; info2.nama = ''; info2.informasi = ''; if (jenisShop == 1) { jenisOver = 'item'; } else { if (jenisShop == 2) { jenisOver = 'attack'; } } } function outTanya() { adaJedaInfo = false; info2.nama = ''; info2.informasi = ''; info2._visible = false; info2._alpha = 0; } function enterInfo2() { if (adaJedaInfo == true) { ++jedaInfo2; if (jedaInfo2 >= 10) { info2._visible = true; if (info2._alpha <= 100) { info2._alpha += 30; } } } else { info2._visible = false; } info2._x = _root._xmouse - 100; info2._y = _root._ymouse; indi = pilihAbil; if (jenisOver == 'attack') { info2.nama = jenisAbility[namaSpell[indi]]; xinfo = infoAbility[namaSpell[indi]]; info2.informasi = 'Element ' + element[elementAbility[namaSpell[indi]]] + ' \n Need ' + auraAbility[namaSpell[indi]] + ' Aura \n\n ' + xinfo; } else { if (jenisOver == 'item') { info2.nama = jenisItem[namaItem[indi]]; info2.informasi = infoItem[namaItem[indi]]; } } } stop(); quit_btn.onRollOver = function () { over(); }; quit_btn.onRelease = function () { klik(); xcekKemana(); }; if (mapKe == 2) { namaItem = new Array('', 1, 2, 3, 4, 5); namaSpell = new Array('', 6, 7, 8, 9, 10); } else { if (mapKe == 5) { namaItem = new Array('', 1, 2, 3, 4, 5, 6); namaSpell = new Array('', 6, 7, 8, 9, 10, 11, 12, 13, 14); } else { if (mapKe >= 12) { namaItem = new Array('', 3, 4, 5, 6, 7, 8, 9, 10); namaSpell = new Array('', 9, 10, 11, 12, 13, 14, 15, 16); } else { namaItem = new Array('', 7, 8, 9, 10); namaSpell = new Array('', 15, 16); } } } spell_mc.onRelease = function () { klik(); jenisShop = 2; cekJenis(); }; spell_mc.onRollOver = function () { over(); this.gotoAndStop(3); }; spell_mc.onRollOut = function () { this.gotoAndStop(1); }; item_mc.onRelease = function () { klik(); jenisShop = 1; cekJenis(); }; item_mc.onRollOver = function () { over(); this.gotoAndStop(3); }; item_mc.onRollOut = function () { this.gotoAndStop(1); }; jenisShop = 1; cekJenis(); infor = ''; info2 = attachMovie('info_mc2', 'info_mc2', dalamInfo2); info2._x = -500; info2._y = -500; info2._visible = false; info2.onEnterFrame = enterInfo2; } frame 3934 { function cekJenis() { totMoney = 'Total Money: ' + totalMoney; if (jenisShop == 1) { item_mc.gotoAndStop(2); item_mc.enabled = false; spell_mc.gotoAndStop(1); spell_mc.enabled = true; i = 1; while (i <= 9) { if (namaItem[i] != undefined) { _root['nama' + i] = jenisItem[namaItem[i]]; _root['element' + i] = element[elementItem[namaItem[i]]]; _root['price' + i] = hargaItem[namaItem[i]]; _root['owned' + i] = punyaItem[namaItem[i]]; _root['xicon' + i]._visible = true; _root['xicon' + i].gotoAndStop(100 + namaItem[i]); _root['buy' + i]._visible = true; _root['sell' + i]._visible = true; _root['tanya' + i]._visible = true; _root['sell' + i]._alpha = 100; _root['sell' + i].enabled = true; _root['buy' + i]._alpha = 100; _root['buy' + i].enabled = true; _root['buy' + i].onRelease = klikBuyItem; _root['buy' + i].onRollOver = overItem; _root['buy' + i].onRollOut = outItem; _root['sell' + i].onRelease = klikSellItem; _root['sell' + i].onRollOver = overItem; _root['sell' + i].onRollOut = outItem; _root['tanya' + i].onRollOver = overTanya; _root['tanya' + i].onRollOut = outTanya; _root['tanya' + i].onReleaseOutside = outTanya; } else { _root['nama' + i] = ''; _root['element' + i] = ''; _root['price' + i] = ''; _root['owned' + i] = ''; _root['buy' + i]._visible = false; _root['sell' + i]._visible = false; _root['tanya' + i]._visible = false; _root['xicon' + i]._visible = false; } ++i; } } else { if (jenisShop == 2) { spell_mc.gotoAndStop(2); spell_mc.enabled = false; item_mc.gotoAndStop(1); item_mc.enabled = true; i = 1; while (i <= 9) { if (namaSpell[i] != undefined) { _root['nama' + i] = jenisAbility[namaSpell[i]]; _root['element' + i] = element[elementAbility[namaSpell[i]]]; _root['price' + i] = hargaAbility[namaSpell[i]]; _root['xicon' + i]._visible = true; _root['xicon' + i].gotoAndStop(namaSpell[i]); _root['buy' + i]._visible = true; _root['tanya' + i]._visible = true; _root['sell' + i]._visible = true; if (punyaAbility[namaSpell[i]] == 1) { _root['owned' + i] = 'Yes'; _root['buy' + i]._alpha = 50; _root['buy' + i].enabled = false; } else { _root['owned' + i] = 'No'; _root['buy' + i].onRelease = klikBuySpell; _root['buy' + i].onRollOver = overItem; _root['buy' + i].onRollOut = outItem; } _root['tanya' + i].onRollOver = overTanya; _root['tanya' + i].onRollOut = outTanya; _root['tanya' + i].onReleaseOutside = outTanya; _root['sell' + i]._alpha = 50; _root['sell' + i].enabled = false; } else { _root['nama' + i] = ''; _root['element' + i] = ''; _root['price' + i] = ''; _root['owned' + i] = ''; _root['buy' + i]._visible = false; _root['sell' + i]._visible = false; _root['tanya' + i]._visible = false; _root['xicon' + i]._visible = false; } ++i; } } } } function klikBuySpell() { klik(); myStr = new String(this); if (myStr.length == 12) { indi = Number(myStr.substr(myStr.length - 1, 1)); } else { indi = Number(myStr.substr(myStr.length - 2, 2)); } if (totalMoney >= _root['price' + indi]) { totalMoney -= _root['price' + indi]; ++punyaAbility[namaSpell[indi]]; infor = 'SHOP KEEPER GIRL: THANKS TO BUY'; cekJenis(); } else { infor = 'SHOP KEEPER GIRL: SORRY, NOT ENOUGH FUNDS'; } } function klikBuyItem() { klik(); myStr = new String(this); if (myStr.length == 12) { indi = Number(myStr.substr(myStr.length - 1, 1)); } else { indi = Number(myStr.substr(myStr.length - 2, 2)); } if (totalMoney >= _root['price' + indi]) { totalMoney -= _root['price' + indi]; ++punyaItem[namaItem[indi]]; infor = 'SHOP KEEPER GIRL: THANKS TO BUY'; cekJenis(); } else { infor = 'SHOP KEEPER GIRL: SORRY, NOT ENOUGH FUNDS'; } } function klikSellItem() { klik(); myStr = new String(this); if (myStr.length == 13) { indi = Number(myStr.substr(myStr.length - 1, 1)); } else { indi = Number(myStr.substr(myStr.length - 2, 2)); } if (punyaItem[namaItem[indi]] > 0) { totalMoney += Math.ceil(_root['price' + indi] / 2); --punyaItem[namaItem[indi]]; infor = 'SHOP KEEPER GIRL: THANKS TO SELL'; cekJenis(); } else { infor = 'SHOP KEEPER GIRL: SORRY, NOT MORE ITEMS'; } } function overItem() { over(); this.gotoAndStop(2); } function outItem() { this.gotoAndStop(1); } function overTanya() { over(); myStr = new String(this); if (myStr.length == 14) { pilihAbil = Number(myStr.substr(myStr.length - 1, 1)); } else { if (myStr.length == 15) { pilihAbil = Number(myStr.substr(myStr.length - 2, 2)); } else { if (myStr.length == 16) { pilihAbil = Number(myStr.substr(myStr.length - 1, 3)); } } } jedaInfo2 = 0; adaJedaInfo = true; info2.nama = ''; info2.informasi = ''; if (jenisShop == 1) { jenisOver = 'item'; } else { if (jenisShop == 2) { jenisOver = 'attack'; } } } function outTanya() { adaJedaInfo = false; info2.nama = ''; info2.informasi = ''; info2._visible = false; info2._alpha = 0; } function enterInfo2() { if (adaJedaInfo == true) { ++jedaInfo2; if (jedaInfo2 >= 10) { info2._visible = true; if (info2._alpha <= 100) { info2._alpha += 30; } } } else { info2._visible = false; } info2._x = _root._xmouse - 100; info2._y = _root._ymouse; indi = pilihAbil; if (jenisOver == 'attack') { info2.nama = jenisAbility[namaSpell[indi]]; xinfo = infoAbility[namaSpell[indi]]; info2.informasi = 'Element ' + element[elementAbility[namaSpell[indi]]] + ' \n Need ' + auraAbility[namaSpell[indi]] + ' Aura \n\n ' + xinfo; } else { if (jenisOver == 'item') { info2.nama = jenisItem[namaItem[indi]]; info2.informasi = infoItem[namaItem[indi]]; } } } stop(); quit_btn.onRollOver = function () { over(); }; quit_btn.onRelease = function () { klik(); xcekKemana(); }; if (mapKe == 2) { namaItem = new Array('', 1, 2, 3, 4, 5); namaSpell = new Array('', 6, 7, 8, 9, 10); } else { if (mapKe == 5) { namaItem = new Array('', 1, 2, 3, 4, 5, 6); namaSpell = new Array('', 6, 7, 8, 9, 10, 11, 12, 13, 14); } else { if (mapKe >= 12) { namaItem = new Array('', 3, 4, 5, 6, 7, 8, 9, 10); namaSpell = new Array('', 9, 10, 11, 12, 13, 14, 15, 16); } else { namaItem = new Array('', 7, 8, 9, 10); namaSpell = new Array('', 15, 16); } } } spell_mc.onRelease = function () { klik(); jenisShop = 2; cekJenis(); }; spell_mc.onRollOver = function () { over(); this.gotoAndStop(3); }; spell_mc.onRollOut = function () { this.gotoAndStop(1); }; item_mc.onRelease = function () { klik(); jenisShop = 1; cekJenis(); }; item_mc.onRollOver = function () { over(); this.gotoAndStop(3); }; item_mc.onRollOut = function () { this.gotoAndStop(1); }; jenisShop = 1; cekJenis(); infor = ''; info2 = attachMovie('info_mc2', 'info_mc2', dalamInfo2); info2._x = -500; info2._y = -500; info2._visible = false; info2.onEnterFrame = enterInfo2; } frame 3935 { function xcekMaping1() { mapping = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]; } frame 3935 { function xcekMaping2() { if (mapKe == 12) { mapping = [[1, -3, 1, -5, -5, -5, -5, 1, 1, 1, 1, 1, -3, -5, -5, -5, -5, 1, 1, 1], [1, 1, 1, -5, -5, -5, -5, -3, 1, 1, 17, 1, 1, -5, -5, -5, -5, 1, 1, -3], [1, 1, 1, -5, -5, -5, -5, 1, 1, 1, 1, 1, 1, -5, -5, -5, -5, 1, 1, 1], [1, 4, 1, -5, -5, -5, -5, 1, 4, 1, 4, 1, 4, -5, -5, -5, -5, 1, 4, 1], [1, 1, 1, -5, -5, -5, -5, 1, 1, 1, 1, 1, 1, -5, -5, -5, -5, 1, 1, 1], [1, 5, 1, -5, -5, -5, -5, 1, 5, 1, 5, 1, 5, -5, -5, -5, -5, 1, 5, 1], [1, 1, 1, -5, -5, -5, -5, 1, 1, 1, 1, 1, 1, -5, -5, -5, -5, 1, 1, 1], [1, 1, 1, -5, -5, -5, -5, 1, 1, 1, 1, 1, 1, -5, -5, -5, -5, 1, -3, 1], [1, 1, 1, -5, -5, -5, -5, 1, 1, 1, 1, 1, 1, -5, -5, -5, -5, 1, 1, 1], [-5, -5, -5, -5, -5, -5, -5, -8, -8, -8, -8, -8, -8, -5, -5, -5, -5, -5, -5, -5], [-5, -5, -5, -5, -5, -5, -5, -8, -8, -8, -8, -8, -8, -5, -5, -5, -5, -5, -5, -5], [-5, -5, -5, -5, -5, -5, -5, -8, -8, -8, -8, -8, -8, -5, -5, -5, -5, -5, -5, -5], [1, 1, 1, -5, -5, -5, -5, 1, 1, 1, 1, 1, 1, -5, -5, -5, -5, -3, 1, 1], [1, 1, 1, -5, -5, -5, -5, 1, 1, 1, 1, 1, 1, -5, -5, -5, -5, 1, 1, 1], [1, -3, 1, -5, -5, -5, -5, 1, 1, 1, 1, 1, 1, -5, -5, -5, -5, 1, 1, 1], [1, 1, 1, -5, -5, -5, -5, 1, 1, 1, 1, 1, 1, -5, -5, -5, -5, 1, 1, -3], [1, 1, 1, -5, -5, -5, -5, 1, 1, 1, 1, 1, 1, -5, -5, -5, -5, 1, 1, 1], [-3, 1, 1, -5, -5, -5, -5, 1, 2, 3, 15, 18, 16, -5, -5, -5, -5, 1, 1, 1], [1, 1, -3, -5, -5, -5, -5, 1, 1, 1, 1, 1, 1, -5, -5, -5, -5, -3, 1, 1], [1, 1, 1, -5, -5, -5, -5, 1, 1, 1, 1, 1, 1, -5, -5, -5, -5, 1, 1, -3]]; } else { if (mapKe == 13) { mapping = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 17, 1, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 10, 1, 1, 1, 1, 1, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -3, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, -3, 1, 1, 1, 14, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [-8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, 1, 1, 1, 14, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, -3, 1, 1, 1, 1, 1, 14, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, -3, 1, 1, 1, 1, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -6, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, -6, 1, 1, 1, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 3, 1, 15, 1, 16, 1, 18], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]; } else { if (mapKe == 14) { mapping = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 17, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 5, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 1, 4, 1, 1, 5, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 5, 1, 1, 4, 1, 1, 1, 18, 1, 1, 1, 1, 1, 1, 1, 5, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 15, 1, 16, 1, 1, 1, 4, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 1, 4, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]; } else { if (mapKe == 15) { mapping = [[13, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, -6, -6, 1, 1, 5, 1, 1, 1, 17, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -6, -6, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -6, -6, 1, 1, 5, 1, 1, 1, 1], [1, 1, -6, -6, 1, 1, 1, 1, 4, 1, 1, 1, -6, -6, 1, 1, 1, 1, 1, 1], [1, 1, 1, -6, -6, 1, 1, 1, 1, 1, 1, 1, 1, -6, -6, 1, 1, 5, 1, 1], [1, 1, 1, 1, -6, -6, 1, 1, 1, 1, 4, 1, 1, 1, -6, -6, 1, 1, 1, 1], [1, 1, 1, 1, 1, -6, -6, 1, 1, 1, 1, 1, 1, 1, 1, -6, -6, 1, 1, 1], [1, 1, 1, 1, 1, 1, -6, -6, 1, 1, 1, 1, 4, 1, 1, 1, -6, -6, 1, 1], [1, 1, 1, 1, 1, 1, 1, -6, -6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, -6, -6, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1], [-6, -6, 1, 1, 1, 1, 1, 1, 1, -6, -6, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, -6, -6, 1, 1, 1, 1, 1, 1, 1, -6, -6, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, -6, -6, 1, 1, 1, 1, 1, 1, 1, -6, -6, 1, 1, 1, 1, 1, 1, 1], [2, 1, 1, -6, -6, 1, 1, 1, 1, 1, 1, 1, -6, -6, 1, 1, 1, 1, 1, 1], [1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -6, -6, 1, 1, 1, 1, 1], [1, 1, 18, 1, 1, 1, -6, -6, 1, 1, 1, 1, 1, 1, -6, -6, 1, 1, 1, 1], [1, 1, 1, 16, 1, 1, 1, -6, -6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 15, 1, 1, 1, -6, -6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13]]; } else { if (mapKe == 16) { mapping = [[0, 0, 0, 0, 13, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0], [0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0], [0, -2, 0, 0, 1, 17, 1, 1, 1, 5, 5, 1, 1, 1, 4, 4, 0, -2, 0, 0], [0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0], [13, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -6, -6, -6, -6, -6], [1, 1, 1, 1, 1, -6, -3, -6, -3, 1, 1, -6, -6, -6, -6, -6, -6, -6, -6, -6], [-6, -3, -6, -3, -6, -3, 1, 1, 1, 1, 1, 1, 1, 1, -6, -6, -6, 5, 1, 1], [1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1], [5, 1, 1, 1, 1, 1, -6, -6, -6, -6, -6, -6, -6, -6, 1, -3, -6, -6, -3, 1], [1, 1, -6, -6, -6, 1, -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, 1, 1, -3, 1], [1, -6, -6, 1, -6, -6, -6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 5, 1], [1, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -3, -6, -3, 1, -6, -6, -3, 1], [1, 1, 1, -6, -6, -6, -6, -6, -6, 1, 1, 1, 1, 1, -3, -6, -3, 4, 1, 1], [1, -6, -6, -6, -6, -6, -6, -6, -6, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1], [4, 5, 1, 1, -6, -6, -6, 1, 1, 1, 1, -6, -6, -6, -6, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -6, -6, -6, -6, -6, -6, -6, 1], [1, 1, 1, 1, -3, -6, -3, -6, 1, 18, 1, 1, 1, -6, -6, -6, -6, -6, 1, 1], [1, -3, -6, -3, -6, 1, 1, 1, 16, 1, 15, -6, -6, -6, -6, -6, -6, -6, -6, 1], [1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1]]; } else { if (mapKe == 17) { mapping = [[-8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8], [-8, 5, -8, 1, -8, 1, -8, 1, -8, 5, -8, 1, -8, 1, -8, 1, -8, 1, -8, -8], [-8, -8, 1, -8, 1, -8, 1, -8, 1, -8, 1, -8, 1, -8, 1, -8, 1, -8, 1, -8], [-8, 1, -8, 3, -8, 5, -8, 1, -8, 1, -8, 1, -8, 5, -8, 1, -8, 15, -8, -8], [-8, -8, 1, -8, 1, -8, 1, -8, 1, -8, 1, -8, 1, -8, 1, -8, 1, -8, 1, -8], [-8, 1, -8, 1, -8, 1, -8, 1, -8, 1, -8, 1, -8, 1, -8, 1, -8, 1, -8, -8], [-8, -8, 1, -8, 1, -8, 1, -8, 1, -8, 1, -8, 5, -8, 1, -8, 1, -8, 1, -8], [-8, 1, -8, 1, -8, 5, -8, 1, -8, 1, -8, 1, -8, 1, -8, 1, -8, 5, -8, -8], [-8, -8, 1, -8, 1, -8, 1, -8, 1, -8, 1, -8, 1, -8, 1, -8, 1, -8, 1, -8], [-8, 5, -8, 1, -8, 1, -8, 1, -8, 18, -8, 1, -8, 1, -8, 1, -8, 5, -8, -8], [-8, -8, 1, -8, 1, -8, 1, -8, 1, -8, 1, -8, 1, -8, 1, -8, 1, -8, 1, -8], [-8, 1, -8, 1, -8, 1, -8, 1, -8, 1, -8, 1, -8, 5, -8, 1, -8, 1, -8, -8], [-8, -8, 1, -8, 1, -8, 1, -8, 1, -8, 1, -8, 1, -8, 1, -8, 1, -8, 1, -8], [-8, 1, -8, 5, -8, 1, -8, 1, -8, 1, -8, 1, -8, 1, -8, 1, -8, 5, -8, -8], [-8, -8, 1, -8, 1, -8, 1, -8, 1, -8, 1, -8, 1, -8, 1, -8, 1, -8, 5, -8], [-8, 1, -8, 1, -8, 5, -8, 1, -8, 1, -8, 1, -8, 1, -8, 1, -8, 1, -8, -8], [-8, -8, 1, -8, 16, -8, 1, -8, 1, -8, 5, -8, 1, -8, 1, -8, 2, -8, 1, -8], [-8, 1, -8, 1, -8, 1, -8, 1, -8, 1, -8, 1, -8, 5, -8, 1, -8, 1, -8, -8], [-8, -8, 1, -8, 1, -8, 1, -8, 5, -8, 1, -8, 1, -8, 1, -8, 1, -8, 1, -8], [-8, -8, -8, 1, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8]]; } else { if (mapKe == 18) { mapping = [[13, 13, 13, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [13, 13, 13, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [13, 13, 13, 1, 1, 1, 1, 1, 17, 17, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [9, 0, 9, 0, 9, 0, 9, 0, 1, 1, 9, 0, 9, 0, 9, 0, 9, 0, 9, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 4, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 9, 0, 9, 0, 9, 0, 9, 0, 9, 0, 9, 0, 9, 0, 9, 0, 9, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 4, 1, 5, 1, 4, 1, 5, 1, 4, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [9, 0, 9, 0, 9, 0, 9, 0, 1, 1, 9, 0, 9, 0, 9, 0, 9, 0, 9, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 4, 1, 5, 1, 4, 1, 5, 1, 4, 1, 5, 1, 4, 1, 5, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 9, 0, 9, 0, 9, 0, 9, 0, 9, 0, 9, 0, 9, 0, 9, 0, 9, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 5, 1, 4, 1, 5, 1, 16, 3, 2, 15, 18, 1, 4, 1, 5, 1, 4, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]; } } } } } } } } } frame 3935 { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { function initMulai() { if (mapKe == 6 || mapKe == 15 || mapKe == 16 || mapKe == 18) { adaApiKehidupan = true; } else { adaApiKehidupan = false; } initAwal(); initKotak(); initChara(); initMsgBox2(); xcekMaping1(); xcekMaping2(); buatKotak(); if (jenisMaen == 'training') { initObjective(); } else { cekDialog(); } if (mapKe == 11 && jenisMaen != 'training') { i = 1; while (i <= 11) { if (abilityJagoan[0][i] == 3 || abilityJagoan[0][i] == 9) { abilityJagoan[0][i] = 0; } if (abilityMusuh[0][i] == 3 || abilityMusuh[0][i] == 9) { abilityMusuh[0][i] = 0; } ++i; } } if (mapKe == 3 || mapKe == 7 || mapKe == 10) { musicCombat2(); } else { musicCombat1(); } _quality = 'High'; } function saveChara() { xlevelJagoan = new Array(); xexpJagoan = new Array(); i = 0; while (i <= totChara) { xlevelJagoan[i] = levelJagoan[i]; xexpJagoan[i] = expJagoan[i]; ++i; } } function initAwal() { namaJagoan = new Array(); incLive = new Array(); incAttack = new Array(); incDefense = new Array(); incAura = new Array(); liveJagoan = new Array(); totLiveJagoan = new Array(); attackJagoan = new Array(); defenseJagoan = new Array(); auraJagoan = new Array(); totAuraJagoan = new Array(); maxJagoan = new Array(); accuracyJagoan = new Array(); speedJagoan = new Array(); rangeJagoan = new Array(); xrangeJagoan = new Array(); serangJagoan = new Array(); posJagoanI = new Array(); posJagoanJ = new Array(); undoJagoanI = new Array(); undoJagoanJ = new Array(); undoPosJagoan = new Array(); posMusuhI = new Array(); posMusuhJ = new Array(); moveJagoan = new Array(); actionJagoan = new Array(); jagoanType = new Array(); masihAktif = new Array(); musuhAktif = new Array(); moveMusuh = new Array(); actionMusuh = new Array(); poisonJagoan = new Array(); stunJagoan = new Array(); slowJagoan = new Array(); uncontrolJagoan = new Array(); poisonKeJagoan = new Array(); stunKeJagoan = new Array(); uncontrolKeJagoan = new Array(); slowKeJagoan = new Array(); attackDefenseIncJagoan = new Array(); dalamMusuh = new Array(); wwjenisMusuh = new Array(); turn = 1; money = 0; killed = 0; masihMain = true; } function initKotak() { panjang = 19; lebar = 19; if (mapKe == 1) { posAwalX = 450; posAwalY = 0; } else { if (mapKe == 2) { if (jenisMaen == 'training') { posAwalX = 450; posAwalY = -50; } else { posAwalX = 300; posAwalY = 0; } } else { if (mapKe == 3) { if (jenisMaen == 'training') { posAwalX = 400; posAwalY = 0; } else { posAwalX = 600; posAwalY = -100; } } else { if (mapKe == 4) { if (jenisMaen == 'training') { posAwalX = 650; posAwalY = -100; } else { posAwalX = 700; posAwalY = -100; } } else { if (mapKe == 5) { if (jenisMaen == 'training') { posAwalX = 650; posAwalY = -100; } else { posAwalX = 400; posAwalY = -100; } } else { if (mapKe == 6) { if (jenisMaen == 'training') { posAwalX = 650; posAwalY = -100; } else { posAwalX = 350; posAwalY = -200; } } else { if (mapKe == 7) { if (jenisMaen == 'training') { posAwalX = 650; posAwalY = -100; } else { posAwalX = 700; posAwalY = -100; } } else { if (mapKe == 8) { if (jenisMaen == 'training') { posAwalX = 650; posAwalY = -100; } else { posAwalX = 300; posAwalY = -100; } } else { if (mapKe == 9) { if (jenisMaen == 'training') { posAwalX = 650; posAwalY = -100; } else { posAwalX = 250; posAwalY = 100; } } else { if (mapKe == 10) { if (jenisMaen == 'training') { posAwalX = 650; posAwalY = -100; } else { posAwalX = 300; posAwalY = 0; } } else { if (mapKe == 11) { if (jenisMaen == 'training') { posAwalX = 650; posAwalY = -100; } else { posAwalX = 700; posAwalY = -100; } } else { if (mapKe == 15) { posAwalX = 800; posAwalY = -100; } else { if (mapKe >= 12) { posAwalX = 500; posAwalY = -100; } } } } } } } } } } } } } speedKotak = 15; pStage = 800; lStage = 600; pKotak = 90; lKotak = 80; lScroll = 25; bAwal = 0; bKotak = 40; scalaKotak = 145; scalaObyek = 17; posArrowJ = 9999; posArrowI = 9999; sudahHabis = 3; keKedip = 1; initDalam(); charaJagoan = 0; charaMusuh = 0; jalanKe = 0; jalanKomp = 0; increaseSpeed = 1; xpause = true; bisaKlik = true; sudahBallon = false; namaCharaJagoan = new Array(); namaCharaMusuh = new Array(); info = attachMovie('info_mc', 'info_mc', dalamInfo); info._x = 0; info._y = -35; info2 = attachMovie('info_mc2', 'info_mc2', dalamInfo2); info2._x = -500; info2._y = -500; info2._visible = false; info2.onEnterFrame = enterInfo2; } function initChara() { rangeMusuh = new Array(); xrangeMusuh = new Array(); serangMusuh = new Array(); xincLive = new Array(); xincAttack = new Array(); xincDefense = new Array(); xincAura = new Array(); namaMusuh = new Array(); liveMusuh = new Array(); totLiveMusuh = new Array(); attackMusuh = new Array(); defenseMusuh = new Array(); accuracyMusuh = new Array(); speedMusuh = new Array(); auraMusuh = new Array(); totAuraMusuh = new Array(); expMusuh = new Array(); maxMusuh = new Array(); poisonMusuh = new Array(); stunMusuh = new Array(); uncontrolMusuh = new Array(); slowMusuh = new Array(); stunKeMusuh = new Array(); poisonKeMusuh = new Array(); uncontrolKeMusuh = new Array(); slowKeMusuh = new Array(); attackDefenseIncMusuh = new Array(); musuhWeapon = new Array(); xmusuhWeapon = new Array(); jenisMusuh = new Array(); elementMusuh = new Array(); abilityMusuh = new Array(); xjenisRace = new Array(); itemMusuh = new Array(); xpunyaItem = new Array(); posMunculBaruI = new Array(); posMunculBaruJ = new Array(); posMunculBaru = 0; tipeAI = new Array(); if (mapKe != 1) break; pemimpin = -99; diriJagoan = new Array(2, 2); diriMusuh = new Array(6, 6, 6, 6); levelMusuh = new Array(3, 3, 2, 2); musuhPlace = new Array('Hell', 'Hell', 'Hell', 'Hell'); xagePlace = new Array(110, 110, 100, 100); rankMusuh = new Array('Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier'); i = 0; while (i <= diriMusuh.length) { abilityMusuh[i] = new Array(); itemMusuh[i] = new Array(); xpunyaItem[i] = new Array(); j = 1; while (j <= 10) { abilityMusuh[i][j] = 0; ++j; } j = 1; while (j <= 5) { itemMusuh[i][j] = 0; ++j; } j = 0; while (j <= jenisItem.length) { xpunyaItem[i][j] = 0; ++j; } ++i; } itemMusuh[0][1] = 1; itemMusuh[1][1] = 1; itemMusuh[2][1] = 1; itemMusuh[3][1] = 1; itemMusuh[0][2] = 2; itemMusuh[1][2] = 2; itemMusuh[2][2] = 2; itemMusuh[3][2] = 2; abilityMusuh[0][1] = 1; abilityMusuh[1][1] = 1; abilityMusuh[2][1] = 1; abilityMusuh[3][1] = 1; abilityMusuh[0][2] = 4; abilityMusuh[1][2] = 6; abilityMusuh[2][2] = 7; abilityMusuh[3][2] = 8; bykMusuh = diriMusuh.length; cekPunya(); if (mapKe != 2) break; pemimpin = -99; if (jenisMaen == 'training') { diriJagoan = new Array(); diriMusuh = new Array(); levelMusuh = new Array(); musuhPlace = new Array(); xagePlace = new Array(); rankMusuh = new Array(); diriJagoan[0] = 2; diriMusuh[0] = 6; i = 0; while (i <= diriMusuh.length) { abilityMusuh[i] = new Array(); itemMusuh[i] = new Array(); xpunyaItem[i] = new Array(); j = 1; while (j <= 10) { abilityMusuh[i][j] = 0; ++j; } j = 1; while (j <= 5) { itemMusuh[i][j] = 0; ++j; } j = 0; while (j <= jenisItem.length) { xpunyaItem[i][j] = 0; ++j; } ++i; } levelMusuh[0] = levelJagoan[1]; musuhPlace[0] = jagoanPlace[1]; xagePlace[0] = agePlace[1]; rankMusuh[0] = rankJagoan[1]; expMusuh[0] = expJagoan[1]; z = 0; while (z <= abilityJagoan[1].length) { abilityMusuh[0][z] = abilityJagoan[1][z]; ++z; } z = 0; while (z <= itemJagoan[1].length) { itemMusuh[0][z] = itemJagoan[1][z]; xpunyaItem[0][z] = punyaItem[z]; ++z; } bykMusuh = diriMusuh.length; } else { pemimpin = 1; diriJagoan = new Array(6, 6); diriMusuh = new Array(2, 2, 2, 2, 2, 2); levelMusuh = new Array(3, 4, 3, 3, 3, 3); musuhPlace = new Array('Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell'); rankMusuh = new Array('Ogrezantium Soldier', 'Commander', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier'); xagePlace = new Array(110, 120, 110, 110, 110, 110); i = 0; while (i <= diriMusuh.length) { abilityMusuh[i] = new Array(); itemMusuh[i] = new Array(); xpunyaItem[i] = new Array(); j = 1; while (j <= 10) { abilityMusuh[i][j] = 0; ++j; } j = 1; while (j <= 5) { itemMusuh[i][j] = 0; ++j; } j = 0; while (j <= jenisItem.length) { xpunyaItem[i][j] = 0; ++j; } ++i; } itemMusuh[0][1] = 1; itemMusuh[1][1] = 1; itemMusuh[2][1] = 1; itemMusuh[3][1] = 1; itemMusuh[4][1] = 1; itemMusuh[5][1] = 1; itemMusuh[0][2] = 2; itemMusuh[1][2] = 2; itemMusuh[2][2] = 2; itemMusuh[3][2] = 2; itemMusuh[4][2] = 2; itemMusuh[5][2] = 2; itemMusuh[0][3] = 3; itemMusuh[1][3] = 4; itemMusuh[2][3] = 3; itemMusuh[3][3] = 4; itemMusuh[4][3] = 3; itemMusuh[5][3] = 4; abilityMusuh[0][1] = 1; abilityMusuh[0][2] = 5; abilityMusuh[0][3] = 2; abilityMusuh[1][1] = 1; abilityMusuh[1][2] = 5; abilityMusuh[1][3] = 8; abilityMusuh[1][4] = 4; abilityMusuh[1][5] = 2; abilityMusuh[2][1] = 1; abilityMusuh[2][2] = 5; abilityMusuh[2][3] = 8; abilityMusuh[3][1] = 1; abilityMusuh[3][2] = 5; abilityMusuh[3][3] = 4; abilityMusuh[4][1] = 1; abilityMusuh[4][2] = 5; abilityMusuh[4][3] = 3; abilityMusuh[5][1] = 1; abilityMusuh[5][2] = 5; abilityMusuh[5][3] = 7; bykMusuh = diriMusuh.length; } cekPunya(); if (mapKe != 3) break; pemimpin = -99; if (jenisMaen == 'training') { diriJagoan = new Array(); diriMusuh = new Array(); levelMusuh = new Array(); musuhPlace = new Array(); xagePlace = new Array(); rankMusuh = new Array(); diriJagoan[0] = 6; diriMusuh[0] = 2; i = 0; while (i <= diriMusuh.length) { abilityMusuh[i] = new Array(); itemMusuh[i] = new Array(); xpunyaItem[i] = new Array(); j = 1; while (j <= 10) { abilityMusuh[i][j] = 0; ++j; } j = 1; while (j <= 5) { itemMusuh[i][j] = 0; ++j; } j = 0; while (j <= jenisItem.length) { xpunyaItem[i][j] = 0; ++j; } ++i; } levelMusuh[0] = levelJagoan[1]; musuhPlace[0] = jagoanPlace[1]; xagePlace[0] = agePlace[1]; rankMusuh[0] = rankJagoan[1]; expMusuh[0] = expJagoan[1]; z = 0; while (z <= abilityJagoan[1].length) { abilityMusuh[0][z] = abilityJagoan[1][z]; ++z; } z = 0; while (z <= itemJagoan[1].length) { itemMusuh[0][z] = itemJagoan[1][z]; xpunyaItem[0][z] = punyaItem[z]; ++z; } bykMusuh = diriMusuh.length; } else { diriJagoan = new Array(2, 2); diriMusuh = new Array(6, 6, 6, 6, 6, 6, 6, 6, 6, 6); levelMusuh = new Array(3, 4, 3, 3, 3, 3, 3, 4, 3, 3); musuhPlace = new Array('Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell'); xagePlace = new Array(110, 120, 110, 110, 110, 110, 110, 120, 110, 110); rankMusuh = new Array('Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier'); i = 0; while (i <= diriMusuh.length) { abilityMusuh[i] = new Array(); itemMusuh[i] = new Array(); xpunyaItem[i] = new Array(); j = 1; while (j <= 10) { abilityMusuh[i][j] = 0; ++j; } j = 1; while (j <= 5) { itemMusuh[i][j] = 0; ++j; } j = 0; while (j <= jenisItem.length) { xpunyaItem[i][j] = 0; ++j; } ++i; } itemMusuh[0][1] = 1; itemMusuh[1][1] = 1; itemMusuh[2][1] = 1; itemMusuh[3][1] = 1; itemMusuh[4][1] = 1; itemMusuh[5][1] = 1; itemMusuh[6][1] = 1; itemMusuh[7][1] = 1; itemMusuh[8][1] = 1; itemMusuh[9][1] = 1; itemMusuh[10][1] = 1; itemMusuh[11][1] = 1; itemMusuh[12][1] = 1; itemMusuh[13][1] = 1; itemMusuh[14][1] = 1; itemMusuh[15][1] = 1; itemMusuh[0][2] = 2; itemMusuh[1][2] = 2; itemMusuh[2][2] = 2; itemMusuh[3][2] = 2; itemMusuh[4][2] = 2; itemMusuh[5][2] = 2; itemMusuh[6][2] = 2; itemMusuh[7][2] = 2; itemMusuh[8][2] = 2; itemMusuh[9][2] = 2; itemMusuh[10][2] = 2; itemMusuh[11][2] = 2; itemMusuh[12][2] = 2; itemMusuh[13][2] = 2; itemMusuh[14][2] = 2; itemMusuh[15][2] = 2; itemMusuh[0][3] = 3; itemMusuh[1][3] = 4; itemMusuh[2][3] = 3; itemMusuh[3][3] = 4; itemMusuh[4][3] = 3; itemMusuh[5][3] = 4; itemMusuh[6][3] = 3; itemMusuh[7][3] = 4; itemMusuh[8][3] = 3; itemMusuh[9][3] = 4; itemMusuh[10][3] = 3; itemMusuh[11][3] = 4; itemMusuh[12][3] = 3; itemMusuh[13][3] = 4; itemMusuh[14][3] = 3; itemMusuh[15][3] = 4; abilityMusuh[0][1] = 1; abilityMusuh[0][2] = 5; abilityMusuh[1][1] = 1; abilityMusuh[1][2] = 5; abilityMusuh[1][3] = 8; abilityMusuh[1][4] = 4; abilityMusuh[1][5] = 9; abilityMusuh[2][1] = 1; abilityMusuh[2][2] = 5; abilityMusuh[2][3] = 8; abilityMusuh[3][1] = 1; abilityMusuh[3][2] = 7; abilityMusuh[4][1] = 1; abilityMusuh[4][2] = 5; abilityMusuh[4][3] = 3; abilityMusuh[5][1] = 1; abilityMusuh[5][2] = 9; abilityMusuh[6][1] = 1; abilityMusuh[6][2] = 5; abilityMusuh[6][3] = 2; abilityMusuh[7][1] = 1; abilityMusuh[7][2] = 5; abilityMusuh[7][3] = 8; abilityMusuh[7][4] = 4; abilityMusuh[7][5] = 2; abilityMusuh[8][1] = 1; abilityMusuh[8][2] = 6; abilityMusuh[9][1] = 1; abilityMusuh[9][2] = 5; abilityMusuh[9][3] = 4; abilityMusuh[10][1] = 1; abilityMusuh[10][2] = 3; abilityMusuh[11][1] = 1; abilityMusuh[11][2] = 5; abilityMusuh[11][3] = 7; abilityMusuh[12][1] = 1; abilityMusuh[12][2] = 5; abilityMusuh[12][3] = 8; abilityMusuh[12][4] = 4; abilityMusuh[12][5] = 2; abilityMusuh[13][1] = 1; abilityMusuh[13][2] = 5; abilityMusuh[13][3] = 8; abilityMusuh[13][4] = 4; abilityMusuh[13][5] = 2; abilityMusuh[14][1] = 1; abilityMusuh[14][2] = 5; abilityMusuh[14][3] = 8; abilityMusuh[14][4] = 4; abilityMusuh[14][5] = 2; abilityMusuh[15][1] = 1; abilityMusuh[15][2] = 5; abilityMusuh[15][3] = 8; abilityMusuh[15][4] = 4; abilityMusuh[15][5] = 2; bykMusuh = diriMusuh.length; } cekPunya(); if (mapKe != 4) break; pemimpin = -99; if (jenisMaen == 'training') { diriJagoan = new Array(); diriMusuh = new Array(); levelMusuh = new Array(); musuhPlace = new Array(); xagePlace = new Array(); diriJagoan[0] = 2; diriMusuh[0] = 6; i = 0; while (i <= diriMusuh.length) { abilityMusuh[i] = new Array(); itemMusuh[i] = new Array(); xpunyaItem[i] = new Array(); j = 1; while (j <= 10) { abilityMusuh[i][j] = 0; ++j; } j = 1; while (j <= 5) { itemMusuh[i][j] = 0; ++j; } j = 0; while (j <= jenisItem.length) { xpunyaItem[i][j] = 0; ++j; } ++i; } levelMusuh[0] = levelJagoan[1]; musuhPlace[0] = jagoanPlace[1]; xagePlace[0] = agePlace[1]; rankMusuh[0] = rankJagoan[1]; expMusuh[0] = expJagoan[1]; z = 0; while (z <= abilityJagoan[1].length) { abilityMusuh[0][z] = abilityJagoan[1][z]; ++z; } z = 0; while (z <= itemJagoan[1].length) { itemMusuh[0][z] = itemJagoan[1][z]; xpunyaItem[0][z] = punyaItem[z]; ++z; } bykMusuh = diriMusuh.length; } else { diriJagoan = new Array(6, 6); diriMusuh = new Array(4, 4, 8, 2, 8, 2); levelMusuh = new Array(5, 5, 4, 4, 5, 5); musuhPlace = new Array('Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell'); xagePlace = new Array(110, 120, 110, 110, 110, 110); rankMusuh = new Array('Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier'); i = 0; while (i <= diriMusuh.length) { abilityMusuh[i] = new Array(); itemMusuh[i] = new Array(); xpunyaItem[i] = new Array(); j = 1; while (j <= 10) { abilityMusuh[i][j] = 0; ++j; } j = 1; while (j <= 5) { itemMusuh[i][j] = 0; ++j; } j = 0; while (j <= jenisItem.length) { xpunyaItem[i][j] = 0; ++j; } ++i; } itemMusuh[0][1] = 1; itemMusuh[1][1] = 1; itemMusuh[2][1] = 1; itemMusuh[3][1] = 1; itemMusuh[4][1] = 1; itemMusuh[5][1] = 1; itemMusuh[0][2] = 2; itemMusuh[1][2] = 2; itemMusuh[2][2] = 2; itemMusuh[3][2] = 2; itemMusuh[4][2] = 2; itemMusuh[5][2] = 2; itemMusuh[0][3] = 3; itemMusuh[1][3] = 4; itemMusuh[2][3] = 3; itemMusuh[3][3] = 4; itemMusuh[4][3] = 3; itemMusuh[5][3] = 4; abilityMusuh[0][1] = 1; abilityMusuh[0][2] = 10; abilityMusuh[1][1] = 1; abilityMusuh[1][2] = 3; abilityMusuh[1][3] = 8; abilityMusuh[1][4] = 10; abilityMusuh[1][5] = 2; abilityMusuh[2][1] = 1; abilityMusuh[2][2] = 10; abilityMusuh[3][1] = 1; abilityMusuh[3][2] = 9; abilityMusuh[4][1] = 1; abilityMusuh[4][2] = 3; abilityMusuh[4][3] = 9; abilityMusuh[5][1] = 1; abilityMusuh[5][2] = 10; bykMusuh = diriMusuh.length; } cekPunya(); if (mapKe != 5) break; pemimpin = -99; if (jenisMaen == 'training') { diriJagoan = new Array(); diriMusuh = new Array(8, 8); levelMusuh = new Array(); musuhPlace = new Array(); xagePlace = new Array(); rankMusuh = new Array(); i = 0; while (i <= diriMusuh.length) { abilityMusuh[i] = new Array(); itemMusuh[i] = new Array(); xpunyaItem[i] = new Array(); j = 1; while (j <= 10) { abilityMusuh[i][j] = 0; ++j; } j = 1; while (j <= 5) { itemMusuh[i][j] = 0; ++j; } j = 0; while (j <= jenisItem.length) { xpunyaItem[i][j] = 0; ++j; } ++i; } diriJagoan[0] = 4; i = 0; while (i <= 1) { levelMusuh[i] = levelJagoan[i + 1]; musuhPlace[i] = jagoanPlace[i + 1]; xagePlace[i] = agePlace[i + 1]; rankMusuh[i] = rankJagoan[i + 1]; expMusuh[i] = expJagoan[i + 1]; z = 0; while (z <= abilityJagoan[i + 1].length) { abilityMusuh[i][z] = abilityJagoan[i + 1][z]; ++z; } z = 0; while (z <= itemJagoan[i + 1].length) { itemMusuh[i][z] = itemJagoan[i + 1][z]; xpunyaItem[i][z] = punyaItem[z]; ++z; } ++i; } bykMusuh = diriMusuh.length; } else { diriJagoan = new Array(2, 2, 2); diriMusuh = new Array(6, 6, 6, 6, 6, 6, 6, 6, 6); levelMusuh = new Array(6, 6, 6, 6, 6, 7, 6, 6, 6, 8); musuhPlace = new Array('Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell'); xagePlace = new Array(110, 110, 110, 110, 100, 100, 100, 100, 120); rankMusuh = new Array('Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier'); i = 0; while (i <= diriMusuh.length) { abilityMusuh[i] = new Array(); itemMusuh[i] = new Array(); xpunyaItem[i] = new Array(); j = 1; while (j <= 10) { abilityMusuh[i][j] = 0; ++j; } j = 1; while (j <= 5) { itemMusuh[i][j] = 0; ++j; } j = 0; while (j <= jenisItem.length) { xpunyaItem[i][j] = 0; ++j; } ++i; } itemMusuh[0][1] = 1; itemMusuh[1][1] = 1; itemMusuh[2][1] = 1; itemMusuh[3][1] = 1; itemMusuh[4][1] = 1; itemMusuh[5][1] = 1; itemMusuh[6][1] = 1; itemMusuh[7][1] = 1; itemMusuh[8][1] = 1; itemMusuh[0][2] = 2; itemMusuh[1][2] = 2; itemMusuh[2][2] = 2; itemMusuh[3][2] = 2; itemMusuh[4][2] = 2; itemMusuh[5][2] = 2; itemMusuh[6][2] = 2; itemMusuh[7][2] = 2; itemMusuh[8][2] = 2; itemMusuh[0][3] = 3; itemMusuh[1][3] = 4; itemMusuh[2][3] = 3; itemMusuh[3][3] = 4; itemMusuh[4][3] = 3; itemMusuh[5][3] = 4; itemMusuh[6][3] = 3; itemMusuh[7][3] = 4; itemMusuh[8][3] = 3; itemMusuh[0][4] = 5; itemMusuh[1][4] = 5; itemMusuh[2][4] = 6; itemMusuh[3][4] = 6; itemMusuh[4][4] = 5; itemMusuh[5][4] = 5; itemMusuh[6][4] = 6; itemMusuh[7][4] = 6; itemMusuh[8][4] = 5; abilityMusuh[0][1] = 1; abilityMusuh[0][2] = 11; abilityMusuh[1][1] = 1; abilityMusuh[1][2] = 5; abilityMusuh[1][3] = 8; abilityMusuh[1][4] = 9; abilityMusuh[1][5] = 2; abilityMusuh[2][1] = 1; abilityMusuh[2][2] = 5; abilityMusuh[2][3] = 8; abilityMusuh[2][4] = 4; abilityMusuh[2][5] = 9; abilityMusuh[3][1] = 1; abilityMusuh[3][2] = 5; abilityMusuh[3][3] = 8; abilityMusuh[3][4] = 10; abilityMusuh[3][5] = 2; abilityMusuh[4][1] = 1; abilityMusuh[4][2] = 9; abilityMusuh[4][3] = 8; abilityMusuh[4][4] = 4; abilityMusuh[4][5] = 2; abilityMusuh[5][1] = 1; abilityMusuh[5][2] = 11; abilityMusuh[6][1] = 1; abilityMusuh[6][2] = 10; abilityMusuh[6][3] = 8; abilityMusuh[6][4] = 9; abilityMusuh[6][5] = 2; abilityMusuh[7][1] = 1; abilityMusuh[7][2] = 5; abilityMusuh[7][3] = 10; abilityMusuh[7][4] = 4; abilityMusuh[7][5] = 2; abilityMusuh[8][1] = 1; abilityMusuh[8][2] = 5; abilityMusuh[8][3] = 9; abilityMusuh[8][4] = 10; abilityMusuh[8][5] = 2; bykMusuh = diriMusuh.length; } cekPunya(); if (mapKe == 6) { pemimpin = -99; if (jenisMaen == 'training') { diriJagoan = new Array(); diriMusuh = new Array(6, 6); levelMusuh = new Array(); musuhPlace = new Array(); xagePlace = new Array(); rankMusuh = new Array(); i = 0; while (i <= diriMusuh.length) { abilityMusuh[i] = new Array(); itemMusuh[i] = new Array(); xpunyaItem[i] = new Array(); j = 1; while (j <= 10) { abilityMusuh[i][j] = 0; ++j; } j = 1; while (j <= 5) { itemMusuh[i][j] = 0; ++j; } j = 0; while (j <= jenisItem.length) { xpunyaItem[i][j] = 0; ++j; } ++i; } diriJagoan[0] = 2; i = 0; while (i <= 1) { levelMusuh[i] = levelJagoan[i + 1]; musuhPlace[i] = jagoanPlace[i + 1]; xagePlace[i] = agePlace[i + 1]; rankMusuh[i] = rankJagoan[i + 1]; expMusuh[i] = expJagoan[i + 1]; z = 0; while (z <= abilityJagoan[i + 1].length) { abilityMusuh[i][z] = abilityJagoan[i + 1][z]; ++z; } z = 0; while (z <= itemJagoan[i + 1].length) { itemMusuh[i][z] = itemJagoan[i + 1][z]; xpunyaItem[i][z] = punyaItem[z]; ++z; } ++i; } bykMusuh = diriMusuh.length; } else { diriJagoan = new Array(1, 1, 1); diriMusuh = new Array(6, 6, 6, 6, 6, 6, 2, 2); levelMusuh = new Array(1, 1, 7, 7, 7, 7, 1, 1); musuhPlace = new Array('Dark Hell', 'Dark Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Dark Hell', 'Dark Hell'); xagePlace = new Array(0, 0, 0, 0, 0, 0, 0, 0); rankMusuh = new Array('Ogrezantium Soldier', 'Ogrezantium Soldier', 'No Rank', 'No Rank', 'No Rank', 'No Rank', 'Ogrezantium Soldier', 'Ogrezantium Soldier'); i = 0; while (i <= diriMusuh.length) { abilityMusuh[i] = new Array(); itemMusuh[i] = new Array(); xpunyaItem[i] = new Array(); j = 1; while (j <= 10) { abilityMusuh[i][j] = 0; ++j; } j = 1; while (j <= 5) { itemMusuh[i][j] = 0; ++j; } j = 0; while (j <= jenisItem.length) { xpunyaItem[i][j] = 0; ++j; } ++i; } itemMusuh[0][1] = 1; itemMusuh[1][1] = 1; itemMusuh[6][1] = 1; itemMusuh[7][1] = 1; itemMusuh[0][2] = 2; itemMusuh[1][2] = 2; itemMusuh[6][2] = 2; itemMusuh[7][2] = 2; itemMusuh[0][3] = 4; itemMusuh[1][3] = 3; itemMusuh[6][3] = 4; itemMusuh[7][3] = 3; itemMusuh[0][4] = 6; itemMusuh[1][4] = 5; itemMusuh[6][4] = 6; itemMusuh[7][4] = 5; abilityMusuh[0][1] = 1; abilityMusuh[0][2] = 9; abilityMusuh[0][3] = 10; abilityMusuh[0][4] = 11; abilityMusuh[0][5] = 12; abilityMusuh[1][1] = 1; abilityMusuh[1][2] = 10; abilityMusuh[1][3] = 11; abilityMusuh[1][4] = 12; abilityMusuh[1][5] = 13; abilityMusuh[6][1] = 1; abilityMusuh[6][2] = 12; abilityMusuh[7][1] = 1; abilityMusuh[7][2] = 13; bykMusuh = diriMusuh.length; } cekPunya(); } else { if (mapKe == 7) { pemimpin = -99; if (jenisMaen == 'training') { diriJagoan = new Array(); diriMusuh = new Array(6, 6); levelMusuh = new Array(); musuhPlace = new Array(); xagePlace = new Array(); rankMusuh = new Array(); i = 0; while (i <= diriMusuh.length) { abilityMusuh[i] = new Array(); itemMusuh[i] = new Array(); xpunyaItem[i] = new Array(); j = 1; while (j <= 10) { abilityMusuh[i][j] = 0; ++j; } j = 1; while (j <= 5) { itemMusuh[i][j] = 0; ++j; } j = 0; while (j <= jenisItem.length) { xpunyaItem[i][j] = 0; ++j; } ++i; } diriJagoan[0] = 2; i = 0; while (i <= 1) { levelMusuh[i] = levelJagoan[i + 1]; musuhPlace[i] = jagoanPlace[i + 1]; xagePlace[i] = agePlace[i + 1]; rankMusuh[i] = rankJagoan[i + 1]; expMusuh[i] = expJagoan[i + 1]; z = 0; while (z <= abilityJagoan[i + 1].length) { abilityMusuh[i][z] = abilityJagoan[i + 1][z]; ++z; } z = 0; while (z <= itemJagoan[i + 1].length) { itemMusuh[i][z] = itemJagoan[i + 1][z]; xpunyaItem[i][z] = punyaItem[z]; ++z; } ++i; } bykMusuh = diriMusuh.length; } else { diriJagoan = new Array(2, 2, 2); diriMusuh = new Array(6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6); levelMusuh = new Array(7, 8, 7, 7, 7, 7, 7, 9, 7, 7, 7, 7, 7, 7, 7, 7); musuhPlace = new Array('Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell'); xagePlace = new Array(110, 120, 110, 110, 110, 110, 110, 120, 110, 110, 110, 110, 120, 120, 120, 120); rankMusuh = new Array('Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier'); i = 0; while (i <= diriMusuh.length) { abilityMusuh[i] = new Array(); itemMusuh[i] = new Array(); xpunyaItem[i] = new Array(); j = 1; while (j <= 10) { abilityMusuh[i][j] = 0; ++j; } j = 1; while (j <= 5) { itemMusuh[i][j] = 0; ++j; } j = 0; while (j <= jenisItem.length) { xpunyaItem[i][j] = 0; ++j; } ++i; } itemMusuh[0][1] = 1; itemMusuh[1][1] = 1; itemMusuh[2][1] = 1; itemMusuh[3][1] = 1; itemMusuh[4][1] = 1; itemMusuh[5][1] = 1; itemMusuh[6][1] = 1; itemMusuh[7][1] = 1; itemMusuh[8][1] = 1; itemMusuh[9][1] = 1; itemMusuh[10][1] = 1; itemMusuh[11][1] = 1; itemMusuh[12][1] = 1; itemMusuh[13][1] = 1; itemMusuh[14][1] = 1; itemMusuh[15][1] = 1; itemMusuh[0][2] = 2; itemMusuh[1][2] = 2; itemMusuh[2][2] = 2; itemMusuh[3][2] = 2; itemMusuh[4][2] = 2; itemMusuh[5][2] = 2; itemMusuh[6][2] = 2; itemMusuh[7][2] = 2; itemMusuh[8][2] = 2; itemMusuh[9][2] = 2; itemMusuh[10][2] = 2; itemMusuh[11][2] = 2; itemMusuh[12][2] = 2; itemMusuh[13][2] = 2; itemMusuh[14][2] = 2; itemMusuh[15][2] = 2; itemMusuh[0][3] = 3; itemMusuh[1][3] = 4; itemMusuh[2][3] = 3; itemMusuh[3][3] = 4; itemMusuh[4][3] = 3; itemMusuh[5][3] = 4; itemMusuh[6][3] = 3; itemMusuh[7][3] = 4; itemMusuh[8][3] = 3; itemMusuh[9][3] = 4; itemMusuh[10][3] = 3; itemMusuh[11][3] = 4; itemMusuh[12][3] = 3; itemMusuh[13][3] = 4; itemMusuh[14][3] = 3; itemMusuh[15][3] = 4; itemMusuh[0][4] = 5; itemMusuh[1][4] = 6; itemMusuh[2][4] = 5; itemMusuh[3][4] = 6; itemMusuh[4][4] = 5; itemMusuh[5][4] = 6; itemMusuh[6][4] = 5; itemMusuh[7][4] = 6; itemMusuh[8][4] = 5; itemMusuh[9][4] = 6; itemMusuh[10][4] = 5; itemMusuh[11][4] = 6; itemMusuh[12][4] = 5; itemMusuh[13][4] = 6; itemMusuh[14][4] = 5; itemMusuh[15][4] = 6; abilityMusuh[0][1] = 1; abilityMusuh[0][2] = 2; abilityMusuh[0][3] = 3; abilityMusuh[1][1] = 1; abilityMusuh[1][2] = 4; abilityMusuh[1][3] = 5; abilityMusuh[1][4] = 6; abilityMusuh[1][5] = 7; abilityMusuh[2][1] = 1; abilityMusuh[2][2] = 8; abilityMusuh[2][3] = 9; abilityMusuh[3][1] = 1; abilityMusuh[3][2] = 10; abilityMusuh[3][3] = 11; abilityMusuh[4][1] = 1; abilityMusuh[4][2] = 12; abilityMusuh[4][3] = 13; abilityMusuh[5][1] = 1; abilityMusuh[5][2] = 2; abilityMusuh[5][3] = 3; abilityMusuh[6][1] = 1; abilityMusuh[6][2] = 4; abilityMusuh[6][3] = 5; abilityMusuh[7][1] = 1; abilityMusuh[7][2] = 6; abilityMusuh[7][3] = 7; abilityMusuh[7][4] = 8; abilityMusuh[7][5] = 9; abilityMusuh[8][1] = 1; abilityMusuh[8][2] = 10; abilityMusuh[8][3] = 11; abilityMusuh[9][1] = 1; abilityMusuh[9][2] = 12; abilityMusuh[9][3] = 13; abilityMusuh[10][1] = 1; abilityMusuh[10][2] = 2; abilityMusuh[10][3] = 3; abilityMusuh[11][1] = 1; abilityMusuh[11][2] = 4; abilityMusuh[11][3] = 5; abilityMusuh[12][1] = 1; abilityMusuh[12][2] = 6; abilityMusuh[12][3] = 7; abilityMusuh[12][4] = 8; abilityMusuh[12][5] = 9; abilityMusuh[13][1] = 1; abilityMusuh[13][2] = 10; abilityMusuh[13][3] = 11; abilityMusuh[13][4] = 12; abilityMusuh[13][5] = 13; abilityMusuh[14][1] = 1; abilityMusuh[14][2] = 2; abilityMusuh[14][3] = 3; abilityMusuh[14][4] = 4; abilityMusuh[14][5] = 5; abilityMusuh[15][1] = 1; abilityMusuh[15][2] = 6; abilityMusuh[15][3] = 7; abilityMusuh[15][4] = 8; abilityMusuh[15][5] = 9; bykMusuh = diriMusuh.length; } cekPunya(); } else { if (mapKe == 8) { pemimpin = -99; if (jenisMaen == 'training') { diriJagoan = new Array(); diriMusuh = new Array(6, 6); levelMusuh = new Array(); musuhPlace = new Array(); xagePlace = new Array(); rankMusuh = new Array(); i = 0; while (i <= diriMusuh.length) { abilityMusuh[i] = new Array(); itemMusuh[i] = new Array(); xpunyaItem[i] = new Array(); j = 1; while (j <= 10) { abilityMusuh[i][j] = 0; ++j; } j = 1; while (j <= 5) { itemMusuh[i][j] = 0; ++j; } j = 0; while (j <= jenisItem.length) { xpunyaItem[i][j] = 0; ++j; } ++i; } diriJagoan[0] = 2; i = 0; while (i <= 1) { levelMusuh[i] = levelJagoan[i + 1]; musuhPlace[i] = jagoanPlace[i + 1]; xagePlace[i] = agePlace[i + 1]; rankMusuh[i] = rankJagoan[i + 1]; expMusuh[i] = expJagoan[i + 1]; z = 0; while (z <= abilityJagoan[i + 1].length) { abilityMusuh[i][z] = abilityJagoan[i + 1][z]; ++z; } z = 0; while (z <= itemJagoan[i + 1].length) { itemMusuh[i][z] = itemJagoan[i + 1][z]; xpunyaItem[i][z] = punyaItem[z]; ++z; } ++i; } bykMusuh = diriMusuh.length; } else { diriJagoan = new Array(8, 8, 8, 2); diriMusuh = new Array(6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6); levelMusuh = new Array(7, 8, 7, 7, 7, 7, 7, 9, 7, 7, 7, 7); musuhPlace = new Array('Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell'); xagePlace = new Array(110, 120, 110, 110, 110, 110, 110, 120, 110, 110, 110, 110); rankMusuh = new Array('Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier'); i = 0; while (i <= diriMusuh.length) { abilityMusuh[i] = new Array(); itemMusuh[i] = new Array(); xpunyaItem[i] = new Array(); j = 1; while (j <= 10) { abilityMusuh[i][j] = 0; ++j; } j = 1; while (j <= 5) { itemMusuh[i][j] = 0; ++j; } j = 0; while (j <= jenisItem.length) { xpunyaItem[i][j] = 0; ++j; } ++i; } itemMusuh[0][1] = 9; itemMusuh[1][1] = 9; itemMusuh[2][1] = 1; itemMusuh[3][1] = 9; itemMusuh[4][1] = 1; itemMusuh[5][1] = 9; itemMusuh[6][1] = 1; itemMusuh[7][1] = 9; itemMusuh[8][1] = 9; itemMusuh[9][1] = 1; itemMusuh[10][1] = 9; itemMusuh[11][1] = 1; itemMusuh[0][2] = 10; itemMusuh[1][2] = 2; itemMusuh[2][2] = 10; itemMusuh[3][2] = 2; itemMusuh[4][2] = 10; itemMusuh[5][2] = 2; itemMusuh[6][2] = 10; itemMusuh[7][2] = 10; itemMusuh[8][2] = 2; itemMusuh[9][2] = 2; itemMusuh[10][2] = 10; itemMusuh[11][2] = 2; itemMusuh[0][3] = 3; itemMusuh[1][3] = 4; itemMusuh[2][3] = 3; itemMusuh[3][3] = 4; itemMusuh[4][3] = 3; itemMusuh[5][3] = 4; itemMusuh[6][3] = 3; itemMusuh[7][3] = 4; itemMusuh[8][3] = 3; itemMusuh[9][3] = 4; itemMusuh[10][3] = 3; itemMusuh[11][3] = 4; itemMusuh[0][4] = 5; itemMusuh[1][4] = 6; itemMusuh[2][4] = 5; itemMusuh[3][4] = 6; itemMusuh[4][4] = 5; itemMusuh[5][4] = 6; itemMusuh[6][4] = 5; itemMusuh[7][4] = 6; itemMusuh[8][4] = 5; itemMusuh[9][4] = 6; itemMusuh[10][4] = 5; itemMusuh[11][4] = 6; abilityMusuh[0][1] = 1; abilityMusuh[0][2] = 2; abilityMusuh[0][3] = 3; abilityMusuh[1][1] = 1; abilityMusuh[1][2] = 4; abilityMusuh[1][3] = 5; abilityMusuh[1][4] = 6; abilityMusuh[1][5] = 7; abilityMusuh[2][1] = 1; abilityMusuh[2][2] = 8; abilityMusuh[2][3] = 9; abilityMusuh[3][1] = 1; abilityMusuh[3][2] = 10; abilityMusuh[3][3] = 11; abilityMusuh[4][1] = 1; abilityMusuh[4][2] = 12; abilityMusuh[4][3] = 13; abilityMusuh[5][1] = 1; abilityMusuh[5][2] = 2; abilityMusuh[5][3] = 3; abilityMusuh[6][1] = 1; abilityMusuh[6][2] = 4; abilityMusuh[6][3] = 5; abilityMusuh[7][1] = 1; abilityMusuh[7][2] = 6; abilityMusuh[7][3] = 7; abilityMusuh[7][4] = 8; abilityMusuh[7][5] = 9; abilityMusuh[8][1] = 1; abilityMusuh[8][2] = 10; abilityMusuh[8][3] = 11; abilityMusuh[9][1] = 1; abilityMusuh[9][2] = 12; abilityMusuh[9][3] = 13; abilityMusuh[10][1] = 1; abilityMusuh[10][2] = 2; abilityMusuh[10][3] = 3; abilityMusuh[11][1] = 1; abilityMusuh[11][2] = 4; abilityMusuh[11][3] = 5; bykMusuh = diriMusuh.length; } cekPunya(); } else { if (mapKe == 9) { pemimpin = -99; if (jenisMaen == 'training') { diriJagoan = new Array(4, '', '', 4); diriMusuh = new Array(8, 8); levelMusuh = new Array(); musuhPlace = new Array(); xagePlace = new Array(); rankMusuh = new Array(); i = 0; while (i <= diriMusuh.length) { abilityMusuh[i] = new Array(); itemMusuh[i] = new Array(); xpunyaItem[i] = new Array(); j = 1; while (j <= 10) { abilityMusuh[i][j] = 0; ++j; } j = 1; while (j <= 5) { itemMusuh[i][j] = 0; ++j; } j = 0; while (j <= jenisItem.length) { xpunyaItem[i][j] = 0; ++j; } ++i; } i = 0; while (i <= 1) { levelMusuh[i] = levelJagoan[i + 1]; musuhPlace[i] = jagoanPlace[i + 1]; xagePlace[i] = agePlace[i + 1]; rankMusuh[i] = rankJagoan[i + 1]; expMusuh[i] = expJagoan[i + 1]; z = 0; while (z <= abilityJagoan[i + 1].length) { abilityMusuh[i][z] = abilityJagoan[i + 1][z]; ++z; } z = 0; while (z <= itemJagoan[i + 1].length) { itemMusuh[i][z] = itemJagoan[i + 1][z]; xpunyaItem[i][z] = punyaItem[z]; ++z; } ++i; } bykMusuh = diriMusuh.length; } else { diriJagoan = new Array(6, 6, 6, 6); diriMusuh = new Array(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2); levelMusuh = new Array(7, 8, 7, 7, 7, 7, 7, 9, 7, 7, 7, 7); musuhPlace = new Array('Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell'); xagePlace = new Array(110, 120, 110, 110, 110, 110, 110, 120, 110, 110, 110, 110); rankMusuh = new Array('Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier'); i = 0; while (i <= diriMusuh.length) { abilityMusuh[i] = new Array(); itemMusuh[i] = new Array(); xpunyaItem[i] = new Array(); j = 1; while (j <= 10) { abilityMusuh[i][j] = 0; ++j; } j = 1; while (j <= 5) { itemMusuh[i][j] = 0; ++j; } j = 0; while (j <= jenisItem.length) { xpunyaItem[i][j] = 0; ++j; } ++i; } itemMusuh[0][1] = 9; itemMusuh[1][1] = 1; itemMusuh[2][1] = 1; itemMusuh[3][1] = 9; itemMusuh[4][1] = 1; itemMusuh[5][1] = 1; itemMusuh[6][1] = 9; itemMusuh[7][1] = 1; itemMusuh[8][1] = 1; itemMusuh[9][1] = 9; itemMusuh[10][1] = 1; itemMusuh[11][1] = 9; itemMusuh[0][2] = 10; itemMusuh[1][2] = 2; itemMusuh[2][2] = 10; itemMusuh[3][2] = 2; itemMusuh[4][2] = 10; itemMusuh[5][2] = 2; itemMusuh[6][2] = 10; itemMusuh[7][2] = 2; itemMusuh[8][2] = 10; itemMusuh[9][2] = 2; itemMusuh[10][2] = 2; itemMusuh[11][2] = 10; itemMusuh[0][3] = 3; itemMusuh[1][3] = 4; itemMusuh[2][3] = 3; itemMusuh[3][3] = 4; itemMusuh[4][3] = 3; itemMusuh[5][3] = 4; itemMusuh[6][3] = 3; itemMusuh[7][3] = 4; itemMusuh[8][3] = 3; itemMusuh[9][3] = 4; itemMusuh[10][3] = 3; itemMusuh[11][3] = 4; itemMusuh[0][4] = 5; itemMusuh[1][4] = 6; itemMusuh[2][4] = 5; itemMusuh[3][4] = 6; itemMusuh[4][4] = 5; itemMusuh[5][4] = 6; itemMusuh[6][4] = 5; itemMusuh[7][4] = 6; itemMusuh[8][4] = 5; itemMusuh[9][4] = 6; itemMusuh[10][4] = 5; itemMusuh[11][4] = 6; abilityMusuh[0][1] = 1; abilityMusuh[0][2] = 2; abilityMusuh[0][3] = 3; abilityMusuh[1][1] = 1; abilityMusuh[1][2] = 4; abilityMusuh[1][3] = 5; abilityMusuh[1][4] = 6; abilityMusuh[1][5] = 7; abilityMusuh[2][1] = 1; abilityMusuh[2][2] = 8; abilityMusuh[2][3] = 9; abilityMusuh[3][1] = 1; abilityMusuh[3][2] = 10; abilityMusuh[3][3] = 11; abilityMusuh[4][1] = 1; abilityMusuh[4][2] = 12; abilityMusuh[4][3] = 13; abilityMusuh[5][1] = 1; abilityMusuh[5][2] = 2; abilityMusuh[5][3] = 3; abilityMusuh[6][1] = 1; abilityMusuh[6][2] = 4; abilityMusuh[6][3] = 5; abilityMusuh[7][1] = 1; abilityMusuh[7][2] = 6; abilityMusuh[7][3] = 7; abilityMusuh[7][4] = 8; abilityMusuh[7][5] = 9; abilityMusuh[8][1] = 1; abilityMusuh[8][2] = 10; abilityMusuh[8][3] = 11; abilityMusuh[9][1] = 1; abilityMusuh[9][2] = 12; abilityMusuh[9][3] = 13; abilityMusuh[10][1] = 1; abilityMusuh[10][2] = 2; abilityMusuh[10][3] = 3; abilityMusuh[11][1] = 1; abilityMusuh[11][2] = 4; abilityMusuh[11][3] = 5; bykMusuh = diriMusuh.length; } cekPunya(); } else { if (mapKe == 10) { pemimpin = -99; if (jenisMaen == 'training') { diriJagoan = new Array(2, '', '', 2); diriMusuh = new Array(6, 6); levelMusuh = new Array(); musuhPlace = new Array(); xagePlace = new Array(); rankMusuh = new Array(); i = 0; while (i <= diriMusuh.length) { abilityMusuh[i] = new Array(); itemMusuh[i] = new Array(); xpunyaItem[i] = new Array(); j = 1; while (j <= 10) { abilityMusuh[i][j] = 0; ++j; } j = 1; while (j <= 5) { itemMusuh[i][j] = 0; ++j; } j = 0; while (j <= jenisItem.length) { xpunyaItem[i][j] = 0; ++j; } ++i; } i = 0; while (i <= 1) { levelMusuh[i] = levelJagoan[i + 1]; musuhPlace[i] = jagoanPlace[i + 1]; xagePlace[i] = agePlace[i + 1]; rankMusuh[i] = rankJagoan[i + 1]; expMusuh[i] = expJagoan[i + 1]; z = 0; while (z <= abilityJagoan[i + 1].length) { abilityMusuh[i][z] = abilityJagoan[i + 1][z]; ++z; } z = 0; while (z <= itemJagoan[i + 1].length) { itemMusuh[i][z] = itemJagoan[i + 1][z]; xpunyaItem[i][z] = punyaItem[z]; ++z; } ++i; } bykMusuh = diriMusuh.length; } else { pemimpin = 15; diriJagoan = new Array(6, 6, 6, 6); diriMusuh = new Array(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2); levelMusuh = new Array(9, 9, 9, 8, 8, 9, 8, 8, 8, 9, 9, 9, 8, 9, 9, 10); musuhPlace = new Array('Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell'); xagePlace = new Array(110, 120, 110, 110, 110, 110, 110, 120, 110, 110, 110, 110, 110, 120, 110, 200); rankMusuh = new Array('Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ground Commander of Ogrezantium'); i = 0; while (i <= diriMusuh.length) { abilityMusuh[i] = new Array(); itemMusuh[i] = new Array(); xpunyaItem[i] = new Array(); j = 1; while (j <= 10) { abilityMusuh[i][j] = 0; ++j; } j = 1; while (j <= 5) { itemMusuh[i][j] = 0; ++j; } j = 0; while (j <= jenisItem.length) { xpunyaItem[i][j] = 0; ++j; } ++i; } i = 0; while (i <= 15) { itemMusuh[i][1] = 9; itemMusuh[i][2] = 10; itemMusuh[i][3] = random(2) + 3; itemMusuh[i][4] = random(2) + 5; itemMusuh[i][5] = 7; ++i; } itemMusuh[15][1] = 9; itemMusuh[15][2] = 10; itemMusuh[15][3] = 3; itemMusuh[15][4] = 5; itemMusuh[15][5] = 7; abilityMusuh[0][1] = 1; abilityMusuh[0][2] = 2; abilityMusuh[0][3] = 3; abilityMusuh[1][1] = 1; abilityMusuh[1][2] = 4; abilityMusuh[1][3] = 5; abilityMusuh[1][4] = 6; abilityMusuh[1][5] = 7; abilityMusuh[2][1] = 1; abilityMusuh[2][2] = 8; abilityMusuh[2][3] = 9; abilityMusuh[3][1] = 1; abilityMusuh[3][2] = 10; abilityMusuh[3][3] = 11; abilityMusuh[4][1] = 1; abilityMusuh[4][2] = 12; abilityMusuh[4][3] = 13; abilityMusuh[5][1] = 1; abilityMusuh[5][2] = 2; abilityMusuh[5][3] = 3; abilityMusuh[6][1] = 1; abilityMusuh[6][2] = 4; abilityMusuh[6][3] = 5; abilityMusuh[7][1] = 1; abilityMusuh[7][2] = 6; abilityMusuh[7][3] = 7; abilityMusuh[7][4] = 8; abilityMusuh[7][5] = 9; abilityMusuh[8][1] = 1; abilityMusuh[8][2] = 10; abilityMusuh[8][3] = 11; abilityMusuh[9][1] = 1; abilityMusuh[9][2] = 12; abilityMusuh[9][3] = 13; abilityMusuh[10][1] = 1; abilityMusuh[10][2] = 2; abilityMusuh[10][3] = 3; abilityMusuh[11][1] = 1; abilityMusuh[11][2] = 4; abilityMusuh[11][3] = 5; abilityMusuh[12][1] = 1; abilityMusuh[12][2] = 2; abilityMusuh[12][3] = 3; abilityMusuh[13][1] = 1; abilityMusuh[13][2] = 4; abilityMusuh[13][3] = 5; abilityMusuh[13][4] = 6; abilityMusuh[14][1] = 1; abilityMusuh[14][2] = 7; abilityMusuh[15][1] = 1; abilityMusuh[15][2] = 15; bykMusuh = diriMusuh.length; } cekPunya(); } else { if (mapKe == 11) { if (jenisMaen == 'training') { diriJagoan = new Array(2, '', '', 2); diriMusuh = new Array(6, 6); levelMusuh = new Array(); musuhPlace = new Array(); xagePlace = new Array(); rankMusuh = new Array(); i = 0; while (i <= diriMusuh.length) { abilityMusuh[i] = new Array(); itemMusuh[i] = new Array(); xpunyaItem[i] = new Array(); j = 1; while (j <= 10) { abilityMusuh[i][j] = 0; ++j; } j = 1; while (j <= 5) { itemMusuh[i][j] = 0; ++j; } j = 0; while (j <= jenisItem.length) { xpunyaItem[i][j] = 0; ++j; } ++i; } i = 0; while (i <= 1) { levelMusuh[i] = levelJagoan[i + 1]; musuhPlace[i] = jagoanPlace[i + 1]; xagePlace[i] = agePlace[i + 1]; rankMusuh[i] = rankJagoan[i + 1]; expMusuh[i] = expJagoan[i + 1]; z = 0; while (z <= abilityJagoan[i + 1].length) { abilityMusuh[i][z] = abilityJagoan[i + 1][z]; ++z; } z = 0; while (z <= itemJagoan[i + 1].length) { itemMusuh[i][z] = itemJagoan[i + 1][z]; xpunyaItem[i][z] = punyaItem[z]; ++z; } ++i; } bykMusuh = diriMusuh.length; } else { diriJagoan = new Array(1); diriMusuh = new Array(1); levelMusuh = new Array(); musuhPlace = new Array(); xagePlace = new Array(); rankMusuh = new Array(); diriJagoan[0] = 3; diriMusuh[0] = 7; levelMusuh[0] = 11; musuhPlace[0] = 'Caesar City, Lonthar'; xagePlace[0] = 31; rankMusuh[0] = 'Commander of Lonthar'; i = 0; while (i <= diriMusuh.length) { abilityMusuh[i] = new Array(); itemMusuh[i] = new Array(); xpunyaItem[i] = new Array(); j = 1; while (j <= 10) { abilityMusuh[i][j] = 0; ++j; } j = 1; while (j <= 5) { itemMusuh[i][j] = 0; ++j; } j = 0; while (j <= jenisItem.length) { xpunyaItem[i][j] = 0; ++j; } ++i; } itemMusuh[0][1] = 11; itemMusuh[0][2] = 9; itemMusuh[0][3] = 10; itemMusuh[0][4] = 3; itemMusuh[0][5] = 7; abilityMusuh[0][1] = 1; abilityMusuh[0][2] = 2; abilityMusuh[0][3] = 3; abilityMusuh[0][4] = 4; abilityMusuh[0][5] = 8; abilityMusuh[0][6] = 9; abilityMusuh[0][7] = 12; abilityMusuh[0][8] = 13; abilityMusuh[0][9] = 14; abilityMusuh[0][10] = 15; bykMusuh = diriMusuh.length; } cekPunya(); } else { if (mapKe == 12) { pemimpin = -99; diriJagoan = new Array(2, 2, 2, 2, 2); diriMusuh = new Array(6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6); levelMusuh = new Array(10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10); musuhPlace = new Array('Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell'); xagePlace = new Array(110, 110, 200, 110, 110, 110, 110, 120, 110, 110, 110); rankMusuh = new Array('Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ground Commander of Ogrezantium', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier'); i = 0; while (i <= diriMusuh.length) { abilityMusuh[i] = new Array(); itemMusuh[i] = new Array(); xpunyaItem[i] = new Array(); j = 1; while (j <= 10) { abilityMusuh[i][j] = 0; ++j; } j = 1; while (j <= 5) { itemMusuh[i][j] = 0; ++j; } j = 0; while (j <= jenisItem.length) { xpunyaItem[i][j] = 0; ++j; } ++i; } i = 0; while (i <= diriMusuh.length) { itemMusuh[i][1] = 9; itemMusuh[i][2] = 10; itemMusuh[i][3] = random(2) + 3; itemMusuh[i][4] = random(2) + 5; rand = random(2); if (rand == 0) { itemMusuh[i][5] = 7; } else { itemMusuh[i][5] = 11; } ++i; } i = 0; while (i <= diriMusuh.length) { abilityMusuh[i][1] = 1; abilityMusuh[i][2] = random(2) + 2; abilityMusuh[i][3] = random(2) + 4; abilityMusuh[i][4] = random(2) + 6; abilityMusuh[i][5] = random(2) + 8; abilityMusuh[i][6] = random(2) + 10; abilityMusuh[i][7] = random(2) + 12; abilityMusuh[i][8] = 14; abilityMusuh[i][9] = 15; abilityMusuh[i][10] = 16; levelMusuh[i] += naikLevel; ++i; } bykMusuh = diriMusuh.length; cekPunya(); } else { if (mapKe == 13) { pemimpin = -99; diriJagoan = new Array(2, 2, 2, 2, 2); diriMusuh = new Array(6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6); levelMusuh = new Array(10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10); musuhPlace = new Array('Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell'); xagePlace = new Array(210, 110, 100, 110, 110, 110, 110, 120, 110, 110, 110, 110, 110, 120, 110, 110, 110); rankMusuh = new Array('Ground Commander of Ogrezantium', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier'); i = 0; while (i <= diriMusuh.length) { abilityMusuh[i] = new Array(); itemMusuh[i] = new Array(); xpunyaItem[i] = new Array(); j = 1; while (j <= 10) { abilityMusuh[i][j] = 0; ++j; } j = 1; while (j <= 5) { itemMusuh[i][j] = 0; ++j; } j = 0; while (j <= jenisItem.length) { xpunyaItem[i][j] = 0; ++j; } ++i; } i = 0; while (i <= diriMusuh.length) { itemMusuh[i][1] = 9; itemMusuh[i][2] = 10; itemMusuh[i][3] = random(2) + 3; itemMusuh[i][4] = random(2) + 5; rand = random(2); if (rand == 0) { itemMusuh[i][5] = 7; } else { itemMusuh[i][5] = 11; } ++i; } i = 0; while (i <= diriMusuh.length) { abilityMusuh[i][1] = 1; abilityMusuh[i][2] = random(2) + 2; abilityMusuh[i][3] = random(2) + 4; abilityMusuh[i][4] = random(2) + 6; abilityMusuh[i][5] = random(2) + 8; abilityMusuh[i][6] = random(2) + 10; abilityMusuh[i][7] = random(2) + 12; abilityMusuh[i][8] = 14; abilityMusuh[i][9] = 15; abilityMusuh[i][10] = 16; levelMusuh[i] += naikLevel; ++i; } bykMusuh = diriMusuh.length; cekPunya(); } else { if (mapKe == 14) { pemimpin = -99; diriJagoan = new Array(2, 2, 6, 6, 6); diriMusuh = new Array(5, 5, 6, 5, 4, 6, 4, 3, 3, 7, 7, 2, 8, 2, 8, 1, 1); levelMusuh = new Array(10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10); musuhPlace = new Array('Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell'); xagePlace = new Array(210, 110, 100, 110, 110, 110, 110, 120, 110, 110, 110, 110, 110, 120, 110, 110, 110); rankMusuh = new Array('Ground Commander of Ogrezantium', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier'); i = 0; while (i <= diriMusuh.length) { abilityMusuh[i] = new Array(); itemMusuh[i] = new Array(); xpunyaItem[i] = new Array(); j = 1; while (j <= 10) { abilityMusuh[i][j] = 0; ++j; } j = 1; while (j <= 5) { itemMusuh[i][j] = 0; ++j; } j = 0; while (j <= jenisItem.length) { xpunyaItem[i][j] = 0; ++j; } ++i; } i = 0; while (i <= diriMusuh.length) { itemMusuh[i][1] = 9; itemMusuh[i][2] = 10; itemMusuh[i][3] = random(2) + 3; itemMusuh[i][4] = random(2) + 5; rand = random(2); if (rand == 0) { itemMusuh[i][5] = 7; } else { itemMusuh[i][5] = 11; } ++i; } i = 0; while (i <= diriMusuh.length) { abilityMusuh[i][1] = 1; abilityMusuh[i][2] = random(2) + 2; abilityMusuh[i][3] = random(2) + 4; abilityMusuh[i][4] = random(2) + 6; abilityMusuh[i][5] = random(2) + 8; abilityMusuh[i][6] = random(2) + 10; abilityMusuh[i][7] = random(2) + 12; abilityMusuh[i][8] = 14; abilityMusuh[i][9] = 15; abilityMusuh[i][10] = 16; levelMusuh[i] += naikLevel; ++i; } bykMusuh = diriMusuh.length; cekPunya(); } else { if (mapKe == 15) { pemimpin = -99; diriJagoan = new Array(3, 3, 3, 3, 3); diriMusuh = new Array(7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7); levelMusuh = new Array(10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10); musuhPlace = new Array('Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell'); xagePlace = new Array(0, 110, 100, 110, 0, 200, 110, 120, 110, 110, 0); rankMusuh = new Array('No Rank', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'No Rank', 'Ground Commander of Ogrezantium', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'No Rank'); i = 0; while (i <= diriMusuh.length) { abilityMusuh[i] = new Array(); itemMusuh[i] = new Array(); xpunyaItem[i] = new Array(); j = 1; while (j <= 10) { abilityMusuh[i][j] = 0; ++j; } j = 1; while (j <= 5) { itemMusuh[i][j] = 0; ++j; } j = 0; while (j <= jenisItem.length) { xpunyaItem[i][j] = 0; ++j; } ++i; } i = 0; while (i <= diriMusuh.length) { if (i != 0 && i != 4 && i != 10) { itemMusuh[i][1] = 9; itemMusuh[i][2] = 10; itemMusuh[i][3] = random(2) + 3; itemMusuh[i][4] = random(2) + 5; rand = random(2); if (rand == 0) { itemMusuh[i][5] = 7; } else { itemMusuh[i][5] = 11; } } ++i; } i = 0; while (i <= diriMusuh.length) { if (i != 0 && i != 4 && i != 10) { abilityMusuh[i][1] = 1; abilityMusuh[i][2] = random(2) + 2; abilityMusuh[i][3] = random(2) + 4; abilityMusuh[i][4] = random(2) + 6; abilityMusuh[i][5] = random(2) + 8; abilityMusuh[i][6] = random(2) + 10; abilityMusuh[i][7] = random(2) + 12; abilityMusuh[i][8] = 14; abilityMusuh[i][9] = 15; abilityMusuh[i][10] = 16; levelMusuh[i] += naikLevel; } ++i; } bykMusuh = diriMusuh.length; cekPunya(); } else { if (mapKe == 16) { pemimpin = -99; diriJagoan = new Array(2, 2, 2, 2, 2); diriMusuh = new Array(6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6); levelMusuh = new Array(10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10); musuhPlace = new Array('Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell'); xagePlace = new Array(0, 0, 200, 110, 120, 110, 110, 110, 110, 110, 120, 110, 110, 110, 110, 120, 120, 120, 120); rankMusuh = new Array('No Rank', 'No Rank', 'Ground Commander of Ogrezantium', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier'); i = 0; while (i <= diriMusuh.length) { abilityMusuh[i] = new Array(); itemMusuh[i] = new Array(); xpunyaItem[i] = new Array(); j = 1; while (j <= 10) { abilityMusuh[i][j] = 0; ++j; } j = 1; while (j <= 5) { itemMusuh[i][j] = 0; ++j; } j = 0; while (j <= jenisItem.length) { xpunyaItem[i][j] = 0; ++j; } ++i; } i = 0; while (i <= diriMusuh.length) { if (i != 0 && i != 1) { itemMusuh[i][1] = 9; itemMusuh[i][2] = 10; itemMusuh[i][3] = random(2) + 3; itemMusuh[i][4] = random(2) + 5; rand = random(2); if (rand == 0) { itemMusuh[i][5] = 7; } else { itemMusuh[i][5] = 11; } } ++i; } i = 0; while (i <= diriMusuh.length) { if (i != 0 && i != 1) { abilityMusuh[i][1] = 1; abilityMusuh[i][2] = random(2) + 2; abilityMusuh[i][3] = random(2) + 4; abilityMusuh[i][4] = random(2) + 6; abilityMusuh[i][5] = random(2) + 8; abilityMusuh[i][6] = random(2) + 10; abilityMusuh[i][7] = random(2) + 12; abilityMusuh[i][8] = 14; abilityMusuh[i][9] = 15; abilityMusuh[i][10] = 16; levelMusuh[i] += naikLevel; } ++i; } bykMusuh = diriMusuh.length; cekPunya(); } else { if (mapKe == 17) { pemimpin = -99; diriJagoan = new Array(2, 2, 2, 2, 2); diriMusuh = new Array(6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6); levelMusuh = new Array(10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10); musuhPlace = new Array('Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell'); xagePlace = new Array(0, 0, 200, 110, 120, 110, 110, 110, 110, 110, 120, 110, 110, 110, 110, 120, 120); rankMusuh = new Array('No Rank', 'No Rank', 'Ground Commander of Ogrezantium', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier'); i = 0; while (i <= diriMusuh.length) { abilityMusuh[i] = new Array(); itemMusuh[i] = new Array(); xpunyaItem[i] = new Array(); j = 1; while (j <= 10) { abilityMusuh[i][j] = 0; ++j; } j = 1; while (j <= 5) { itemMusuh[i][j] = 0; ++j; } j = 0; while (j <= jenisItem.length) { xpunyaItem[i][j] = 0; ++j; } ++i; } i = 0; while (i <= diriMusuh.length) { itemMusuh[i][1] = 9; itemMusuh[i][2] = 10; itemMusuh[i][3] = random(2) + 3; itemMusuh[i][4] = random(2) + 5; ++i; } i = 0; while (i <= diriMusuh.length) { abilityMusuh[i][1] = 1; abilityMusuh[i][2] = 5; levelMusuh[i] += naikLevel; ++i; } bykMusuh = diriMusuh.length; cekPunya(); } else { if (mapKe == 18) { pemimpin = -99; diriJagoan = new Array(2, 2, 2, 2, 2); diriMusuh = new Array(6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6); levelMusuh = new Array(10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10); musuhPlace = new Array('Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell', 'Hell'); xagePlace = new Array(110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110); rankMusuh = new Array('Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier', 'Ogrezantium Soldier'); i = 0; while (i <= diriMusuh.length) { abilityMusuh[i] = new Array(); itemMusuh[i] = new Array(); xpunyaItem[i] = new Array(); j = 1; while (j <= 10) { abilityMusuh[i][j] = 0; ++j; } j = 1; while (j <= 5) { itemMusuh[i][j] = 0; ++j; } j = 0; while (j <= jenisItem.length) { xpunyaItem[i][j] = 0; ++j; } ++i; } i = 9; while (i <= diriMusuh.length) { itemMusuh[i][1] = 9; itemMusuh[i][2] = 10; itemMusuh[i][3] = random(2) + 3; itemMusuh[i][4] = random(2) + 5; rand = random(2); if (rand == 0) { itemMusuh[i][5] = 7; } else { itemMusuh[i][5] = 11; } ++i; } i = 9; while (i <= diriMusuh.length) { abilityMusuh[i][1] = 1; abilityMusuh[i][2] = random(2) + 2; abilityMusuh[i][3] = random(2) + 4; abilityMusuh[i][4] = random(2) + 6; abilityMusuh[i][5] = random(2) + 8; abilityMusuh[i][6] = random(2) + 10; abilityMusuh[i][7] = random(2) + 12; abilityMusuh[i][8] = 14; abilityMusuh[i][9] = 15; abilityMusuh[i][10] = 16; levelMusuh[i] += naikLevel; ++i; } bykMusuh = diriMusuh.length; cekPunya(); } } } } } } } } } } } } } } } } } } } function cekPunya() { if (jenisMaen != 'training') { i = 0; while (i <= diriMusuh.length) { j = 1; while (j <= 5) { if (mapKe == 11) { if (itemMusuh[i][j] == 1 || itemMusuh[i][j] == 9) { xpunyaItem[i][itemMusuh[i][j]] = 4 + random(2); } else { if (itemMusuh[i][j] == 2 || itemMusuh[i][j] == 10) { xpunyaItem[i][itemMusuh[i][j]] = 3 + random(2); } else { if (itemMusuh[i][j] == 2 || itemMusuh[i][j] == 11) { xpunyaItem[i][itemMusuh[i][j]] = 1; } else { xpunyaItem[i][itemMusuh[i][j]] = 2; } } } } else { if (itemMusuh[i][j] == 1 || itemMusuh[i][j] == 9) { xpunyaItem[i][itemMusuh[i][j]] = 3 + random(2); } else { if (itemMusuh[i][j] == 2 || itemMusuh[i][j] == 10) { xpunyaItem[i][itemMusuh[i][j]] = 2 + random(2); } else { xpunyaItem[i][itemMusuh[i][j]] = 1 + random(2); } } } ++j; } ++i; } } } function initMsgBox2() { msgBox2 = attachMovie('msgBox_mc2', 'msgBox_mc2', dalamMsgBox); msgBox2.onEnterFrame = enterMsgBox; msgBox2._x = _root._xmouse; msgBox2._y = _root._ymouse; msgBox2._visible = false; } function initObjective() { objective = attachMovie('objective_mc', 'objective_mc', dalamObjective); objective._x = -50; objective._y = -50; if (jenisMaen == 'training') { objective.gotoAndStop(20); } else { objective.gotoAndStop(mapKe); } xpause = true; _root.onMouseDown = function () { xpause = false; removeMovieClip(objective); delete _root.onMouseDown; deleteMusuh(false); setBisa(1, true); giliranJagoan(jalanKe); }; } function cekDialog() { xpause = false; deleteMusuh(true); setBisa(3, false); if (mapKe == 1 || mapKe == 2 || mapKe == 5 || mapKe == 6 || mapKe == 8 || mapKe == 9 || mapKe == 10) { delete _root.onMouseDown; ballon = attachMovie('ballon_mc', 'ballon_mc', dalamObjective); ballon._x = 0; ballon._y = 50; ballon.gotoAndStop('map' + mapKe); _root.onMouseDown = function () { ballon.gotoAndStop(ballon._currentframe + 1); }; } else { initObjective(); } } function mulaiLevel() { removeMovieClip(ballon_mc); delete _root.onMouseDown; initObjective(); } function giliranJagoan(indi) { if (masihMain == true) { if (bykMusuh <= 0) { cekLanjutLevel(); } else { if (uncontrolJagoan[indi] == true) { k = 0; while (k <= charaJagoan - 1) { namaChara = namaCharaJagoan[k]; _root[namaChara].klik_mc.enabled = false; ++k; } current = indi; xcurrent = indi; adaSerang = false; adaAksi = false; xdiSerangJ = undefined; xdiSerangI = undefined; charaAction('', indi); if (adaSerang == true && actionJagoan[indi] == false) { adaAksi = true; charaAction('muncul', indi); xj = xdiSerangJ; xi = xdiSerangI; ubahDalam('xj', 'xi', 'dalam'); namaBaru = 'rumput_mc' + dalam; tipeSerangan = 1; pilihanAbil = elementAbility[tipeSerangan]; if (tipeSerangan == undefined || xdiSerangJ == undefined) { adaAksi = false; } else { cekSoundFX(indi); actionJagoan[indi] = true; adaAksi = true; klikKotak2(_root[namaBaru], 'jagoan', indi); } } else { if (moveJagoan[indi] == false && actionJagoan[indi] == false) { adaAksi = true; areamove = 'yes'; xpathFinding('jagoan'); jagoanAI(indi); xxStart = posJagoanI[indi]; yyStart = posJagoanJ[indi]; mapping[posJagoanJ[charaKe]][posJagoanI[charaKe]] = 0; if (posJagoanI[charaKe] != undefined) { moveJagoan[indi] = true; xxLast = posJagoanI[charaKe]; yyLast = posJagoanJ[charaKe]; mapping[posJagoanJ[indi]][posJagoanI[indi]] = 1; mapping[posJagoanJ[charaKe]][posJagoanI[charaKe]] = 0; areamove = 'no'; xpathFinding('jagoan'); if (xpos != 0) { moveJagoan[indi] = true; enabledMove(false); } else { adaAksi = true; mapping[posJagoanJ[indi]][posJagoanI[indi]] = 0; mapping[posJagoanJ[charaKe]][posJagoanI[charaKe]] = 1; xresetMove(); deleteMove(); bisaKlik = false; i = 0; while (i <= charaJagoan - 1) { setBisa3(3, true, i); ++i; } cekGiliran(); moveJagoan[indi] = true; actionJagoan[indi] = true; masihAktif[indi] = false; } } else { xresetMove(); deleteMove(); adaAksi = false; } } } if (posJagoanI[charaKe] == undefined) { bisaKlik = false; i = 0; while (i <= charaJagoan - 1) { setBisa3(3, true, i); ++i; } cekGiliran(); moveJagoan[indi] = true; actionJagoan[indi] = true; masihAktif[indi] = false; } else { if (adaAksi == false) { if (moveJagoan[indi] == true && actionJagoan[indi] == false) { moveJagoan[indi] = true; actionJagoan[indi] = true; masihAktif[indi] = false; gerakSemua = false; xgiliranJagoan(); if (gerakSemua == false) { bisaKlik = false; i = 0; while (i <= charaJagoan - 1) { setBisa3(3, true, i); ++i; } cekGiliran(); } } moveJagoan[indi] = true; actionJagoan[indi] = true; masihAktif[indi] = false; } } } else { if (jagoanType[indi] == 'musuh') { current = indi; xcurrent = indi; adaSerang = false; adaAksi = false; xdiSerangJ = undefined; xdiSerangI = undefined; charaAction2('', indi); if (adaSerang == true && actionJagoan[indi] == false) { adaAksi = true; charaAction2('muncul', indi); xj = xdiSerangJ; xi = xdiSerangI; ubahDalam('xj', 'xi', 'dalam'); namaBaru = 'rumput_mc' + dalam; bykAda = 0; angka = new Array(); i = 1; while (i <= abilityJagoan[indi].length) { if (abilityJagoan[indi][i] > 1) { angka[bykAda] = i; ++bykAda; } ++i; } acak = random(angka.length); acak2 = angka[acak]; angka[acak] = null; angka.sort(); angka.pop(); ambilAbil = acak2; yyindi = abilityJagoan[indi][ambilAbil]; tipeSerangan = abilityJagoan[indi][ambilAbil]; if (auraJagoan[indi] < auraAbility[tipeSerangan]) { tipeSerangan = 1; } pilihanAbil = elementAbility[tipeSerangan]; if (tipeSerangan == undefined || xdiSerangJ == undefined) { adaAksi = false; } else { if (tipeSerangan != 1) { namaSerangan = jenisAbility[abilityJagoan[indi][ambilAbil]]; info_mc.gotoAndPlay('xmulai'); } actionJagoan[indi] = true; adaAksi = true; klikKotak2(_root[namaBaru], 'jagoan', indi); } } else { if (moveJagoan[indi] == false) { adaAksi = false; charaKe = 0; deketDavid = false; i = posJagoanI[charaKe] - 1; while (i <= posJagoanI[charaKe] + 1) { j = posJagoanJ[charaKe] - 1; while (j <= posJagoanJ[charaKe] + 1) { if (i == posJagoanI[indi] && j == posJagoanJ[indi]) { deketDavid = true; } ++j; } ++i; } if (deketDavid == false) { moveJagoan[indi] = true; mapping[posJagoanJ[charaKe]][posJagoanI[charaKe]] = 0; adaAksi = true; areamove = 'yes'; xpathFinding('jagoan'); xxStart = posJagoanI[indi]; yyStart = posJagoanJ[indi]; xxLast = posJagoanI[charaKe]; yyLast = posJagoanJ[charaKe]; mapping[posJagoanJ[indi]][posJagoanI[indi]] = 1; mapping[posJagoanJ[charaKe]][posJagoanI[charaKe]] = 0; areamove = 'no'; xpathFinding('jagoan'); setBisa(3, false); if (xpos != 0) { enabledMove(false); } else { mapping[posJagoanJ[indi]][posJagoanI[indi]] = 0; mapping[posJagoanJ[charaKe]][posJagoanI[charaKe]] = 1; } } else { adaAksi = false; } } } if (adaAksi == false) { moveJagoan[indi] = true; actionJagoan[indi] = true; masihAktif[indi] = false; xresetMove(); deleteMove(); bisaKlik = false; i = 0; while (i <= charaJagoan - 1) { setBisa3(3, true, i); ++i; } cekGiliran(); } } else { k = 0; while (k <= charaJagoan - 1) { if (masihAktif[k] == true) { namaChara = namaCharaJagoan[k]; _root[namaChara].klik_mc.enabled = true; } ++k; } current = indi; actions = attachMovie('actions_mc', 'actions_mc', dalamActions); actions._x = _root[namaCharaJagoan[indi]]._x; actions._y = _root[namaCharaJagoan[indi]]._y; actions.gotoAndStop(1); k = 1; while (k <= 3) { actions['xmc' + k]._visible = false; ++k; } setKlik(indi); } } } } } function setBisa(indi1, indi2) { if (indi1 != '') { actions.gotoAndStop(indi1); k = 1; while (k <= 3) { actions['xmc' + k]._visible = false; ++k; } } k = 0; while (k <= charaJagoan - 1) { if (masihAktif[k] == true) { namaChara = namaCharaJagoan[k]; _root[namaChara].enabled = indi2; if (indi2 == false) { delete _root[namaChara].klik_mc.onRollOver; delete _root[namaChara].klik_mc.onRollOut; delete _root[namaChara].klik_mc.onReleaseOutside; delete _root[namaChara].klik_mc.onRelease; } else { if (indi2 == true) { _root[namaChara].klik_mc.onRollOver = overChara; _root[namaChara].klik_mc.onRollOut = outChara; _root[namaChara].klik_mc.onReleaseOutside = outChara; _root[namaChara].klik_mc.onRelease = klikChara; } } setKlik(k); } ++k; } } function setBisa2(indi1, indi2, indi3) { actions.gotoAndStop(indi1); k = 1; while (k <= 3) { actions['xmc' + k]._visible = false; ++k; } namaChara = namaCharaJagoan[indi3]; _root[namaChara].enabled = indi2; if (indi2 == false) { delete _root[namaChara].klik_mc.onRollOver; delete _root[namaChara].klik_mc.onRollOut; delete _root[namaChara].klik_mc.onReleaseOutside; delete _root[namaChara].klik_mc.onRelease; } else { if (indi2 == true) { _root[namaChara].klik_mc.onRollOver = overChara; _root[namaChara].klik_mc.onRollOut = outChara; _root[namaChara].klik_mc.onReleaseOutside = outChara; _root[namaChara].klik_mc.onRelease = klikChara; } } } function setBisa3(indi1, indi2, indi3) { actions.gotoAndStop(indi1); k = 1; while (k <= 3) { actions['xmc' + k]._visible = false; ++k; } namaChara = namaCharaJagoan[indi3]; _root[namaChara].enabled = indi2; if (indi2 == false) { delete _root[namaChara].klik_mc.onRollOver; delete _root[namaChara].klik_mc.onRollOut; delete _root[namaChara].klik_mc.onReleaseOutside; } else { if (indi2 == true) { _root[namaChara].klik_mc.onRollOver = overChara; _root[namaChara].klik_mc.onRollOut = outChara; _root[namaChara].klik_mc.onReleaseOutside = outChara; } } } function setBisa4(indi1, indi2, indi3) { namaChara = namaCharaJagoan[indi3]; _root[namaChara].enabled = indi2; if (indi2 == false) { delete _root[namaChara].klik_mc.onRollOver; delete _root[namaChara].klik_mc.onRollOut; delete _root[namaChara].klik_mc.onReleaseOutside; delete _root[namaChara].klik_mc.onRelease; } else { if (indi2 == true) { _root[namaChara].klik_mc.onRollOver = overChara; _root[namaChara].klik_mc.onRollOut = outChara; _root[namaChara].klik_mc.onReleaseOutside = outChara; _root[namaChara].klik_mc.onRelease = klikChara; } } } function setBisa5(indi1, indi2, indi3) { namaChara = namaCharaMusuh[indi3]; _root[namaChara].enabled = indi2; if (indi2 == false) { delete _root[namaChara].klik_mc.onRollOver; delete _root[namaChara].klik_mc.onRollOut; delete _root[namaChara].klik_mc.onReleaseOutside; delete _root[namaChara].klik_mc.onRelease; } else { if (indi2 == true) { _root[namaChara].klik_mc.onRollOver = overChara; _root[namaChara].klik_mc.onRollOut = outChara; _root[namaChara].klik_mc.onReleaseOutside = outChara; _root[namaChara].klik_mc.onRelease = klikChara; } } } function setKlik(indi) { if (indi == current) { if (moveJagoan[indi] == false) { actions.move_btn.enabled = true; actions.move_btn._alpha = 100; actions.move_btn.onRollOver = function () { over(); }; actions.move_btn.onRelease = charaMove; actions.tanda = 'move'; } else { actions.move_btn.enabled = true; actions.move_btn._alpha = 100; actions.move_btn.onRollOver = function () { over(); }; actions.move_btn.onRelease = charaUndo; actions.tanda = 'undo'; } if (actionJagoan[indi] == false) { actions.attack_btn.enabled = true; actions.attack_btn._alpha = 100; actions.xmc2._visible = false; actions.item_btn.enabled = true; actions.item_btn._alpha = 100; actions.xmc3._visible = false; actions.attack_btn.onRollOver = function () { over(); }; actions.item_btn.onRollOver = function () { over(); }; actions.attack_btn.onRelease = pilihAttack; actions.item_btn.onRelease = pilihItem; } else { actions.attack_btn.enabled = false; actions.attack_btn._alpha = 25; actions.xmc2._visible = true; actions.item_btn.enabled = false; actions.item_btn._alpha = 25; actions.xmc3._visible = true; } actions.wait_btn.onRollOver = function () { over(); }; actions.wait_btn.onRelease = charaWait; } } function charaUndo() { if (mapping[undoJagoanJ[current]][undoJagoanI[current]] == 1) { mapping[posJagoanJ[current]][posJagoanI[current]] = 1; posJagoanJ[current] = undoJagoanJ[current]; posJagoanI[current] = undoJagoanI[current]; mapping[posJagoanJ[current]][posJagoanI[current]] = 0; tj = posJagoanJ[current]; ti = posJagoanI[current]; ubahDalam('tj', 'ti', 'dalam'); namaBaru = 'rumput_mc' + dalam; ambilDalam = panjang * lebar * 3 + _root[namaBaru].getDepth() + 100; _root[namaCharaJagoan[current]].swapDepths(ambilDalam); _root[namaCharaJagoan[current]]._x = _root[namaBaru]._x + 50; _root[namaCharaJagoan[current]]._y = _root[namaBaru]._y - 20; _root[namaCharaJagoan[current]].gotoAndStop(undoPosJagoan[current]); setBisa(3, false); bisaTombolAction(false); idUndo = setInterval(xundo, 250); } else { actions.tanda = 'can\'t'; } } function xundo() { clearInterval(idUndo); moveJagoan[current] = false; deleteMusuh(false); setBisa(1, true); bisaTombolAction(true); giliranJagoan(current); } function charaWait() { undoPosJagoan[current] = _root[namaCharaJagoan[current]]._currentframe; actionJagoan[current] = true; moveJagoan[current] = true; setBisa2(3, false, current); masihAktif[current] = false; gerakSemua = false; xgiliranJagoan(); if (gerakSemua == false) { bisaKlik = false; i = 0; while (i <= charaJagoan - 1) { setBisa3(3, true, i); ++i; } cekGiliran(); } } function giliranMusuh(indi) { deleteMusuh(true); if (xrangeMusuh[indi] > 0) { adaAksi = false; adaStun = true; adaPoison = true; masihHidup = true; if (stunMusuh[indi] == false) { adaStun = false; } if (poisonMusuh[indi] == false) { adaPoison = false; } if (adaPoison == true) { elementSerang = 3; elementDiserang = elementMusuh[indi]; if (elementDiserang == kuatElement[elementSerang]) { increseSerang = 1.25; } else { if (elementDiserang == lemahElement[elementSerang]) { increseSerang = 0.75; } else { increseSerang = 1; } } berkurang = Math.floor(increseSerang * liveMusuh[indi] / 4); if (berkurang <= 0) { berkurang = random(6) + 5; } liveMusuh[indi] -= berkurang; posX = _root[namaCharaMusuh[indi]]._x; posY = _root[namaCharaMusuh[indi]]._y; cekAngka5(posX, posY, berkurang, indi); if (liveMusuh[indi] <= 0) { --jalanKomp; masihHidup = false; cekMati(_root[namaCharaMusuh[indi]], indi, 'komp'); } } if (adaStun == false && masihHidup == true) { adaItem = false; dipilih = undefined; if (xpunyaItem[indi][7] >= 1) { dipilih = 7; namaSerangan = jenisItem[itemMusuh[indi][dipilih]]; adaItem = true; } if (auraMusuh[indi] <= totAuraMusuh[indi] / 2) { if (xpunyaItem[indi][10] >= 1) { dipilih = 10; namaSerangan = jenisItem[itemMusuh[indi][dipilih]]; adaItem = true; } } if (liveMusuh[indi] <= totLiveMusuh[indi] / 2) { if (xpunyaItem[indi][9] >= 1) { dipilih = 9; namaSerangan = jenisItem[itemMusuh[indi][dipilih]]; adaItem = true; } } if (auraMusuh[indi] <= totAuraMusuh[indi] / 2) { if (xpunyaItem[indi][2] >= 1) { dipilih = 2; namaSerangan = jenisItem[itemMusuh[indi][dipilih]]; adaItem = true; } } if (liveMusuh[indi] <= totLiveMusuh[indi] / 2) { if (xpunyaItem[indi][1] >= 1) { dipilih = 1; namaSerangan = jenisItem[itemMusuh[indi][dipilih]]; adaItem = true; } } if (stunMusuh[indi] == true) { if (xpunyaItem[indi][4] >= 1) { dipilih = 4; namaSerangan = jenisItem[itemMusuh[indi][dipilih]]; adaItem = true; } } if (uncontrolMusuh[indi] == true) { if (xpunyaItem[indi][5] >= 1) { dipilih = 5; namaSerangan = jenisItem[itemMusuh[indi][dipilih]]; adaItem = true; } } if (slowMusuh[indi] == true) { if (xpunyaItem[indi][6] >= 1) { dipilih = 6; namaSerangan = jenisItem[itemMusuh[indi][dipilih]]; adaItem = true; } } if (poisonMusuh[indi] == true) { if (xpunyaItem[indi][3] >= 1) { dipilih = 3; namaSerangan = jenisItem[itemMusuh[indi][dipilih]]; adaItem = true; } } bisaItem = false; yy = 1; while (yy <= 5) { if (itemMusuh[indi][yy] == dipilih) { bisaItem = true; } ++yy; } if (xpunyaItem[indi][dipilih] <= 0) { adaItem = false; } if (dipilih == undefined) { adaItem = false; } if (bisaItem == false) { adaItem = false; } if (adaItem == true && actionMusuh[indi] == false) { musuhItem(indi); xcurrentPath = 0; xPath = new Array(); yPath = new Array(); xPath[xcurrentPath] = posMusuhJ[indi]; yPath[xcurrentPath] = posMusuhI[indi]; adaAksi = true; actionMusuh[indi] = true; tipeItem = undefined; yy = 1; while (yy <= 5) { if (itemMusuh[indi][yy] == dipilih) { tipeItem = itemMusuh[indi][yy]; if (jenisMaen == 'training') { --punyaItem[tipeItem]; if (punyaItem[tipeItem] <= 0) { punyaItem[tipeItem] = 0; } } --xpunyaItem[indi][dipilih]; if (xpunyaItem[indi][dipilih] <= 0) { xpunyaItem[indi][dipilih] = 0; } namaSerangan = jenisItem[tipeItem]; info_mc.gotoAndPlay('xmulai'); yy = 5; } ++yy; } xnamaChara = namaCharaMusuh[indi]; zobyek = namaCharaMusuh[indi]; ygNyerang = xnamaChara; ygDiserang = zobyek; cekPosisi2('item'); enabledMove(false); deleteMusuh(true); } else { rand = 0; if (rand < 50) { bykAda = 0; angka = new Array(); i = 1; while (i <= abilityMusuh[indi].length) { if (abilityMusuh[indi][i] > 1) { angka[bykAda] = i; ++bykAda; } ++i; } acak = random(angka.length); acak2 = angka[acak]; angka[acak] = null; angka.sort(); angka.pop(); ambilAbil = acak2; tipeSerangan = abilityMusuh[indi][ambilAbil]; if (auraMusuh[indi] < auraAbility[tipeSerangan]) { tipeSerangan = 1; } if (tipeSerangan == undefined) { tipeSerangan = 1; } } else { tipeSerangan = 1; } } if (tipeSerangan == 11 && actionMusuh[indi] == false) { namaSerangan = jenisAbility[abilityMusuh[indi][ambilAbil]]; info_mc.gotoAndPlay('xmulai'); xcurrent = indi; current = indi; adaAksi = true; auraMusuh[indi] -= auraAbility[tipeSerangan]; actionMusuh[indi] = true; ambilAllJ = new Array(); ambilAllI = new Array(); ambilAll = 0; k = 0; while (k <= charaJagoan - 1) { if (posJagoanI[k] != undefined && posJagoanJ[k] != undefined) { ambilAllJ[ambilAll] = posJagoanJ[k]; ambilAllI[ambilAll] = posJagoanI[k]; ++ambilAll; } ++k; } xi = 0; while (xi <= ambilAll - 1) { all = attachMovie('all_mc', 'all_mc' + xi, dalamMeteor + xi); zj = ambilAllJ[xi]; zi = ambilAllI[xi]; ubahDalam('zj', 'zi', 'dalam'); namaBaru = 'rumput_mc' + dalam; all._yscale = random(50) + 50; all._xscale = all._yscale; all._rotation = random(360); all._x = _root[namaCharaMusuh[indi]]._x; all._y = _root[namaCharaMusuh[indi]]._y; all.posJ = zj; all.posI = zi; all.kenaBawah = namaBaru; all.speed = 5; all.ke = xi; all.onEnterFrame = enterAll2; ++xi; } enabledMove(false); deleteMusuh(true); } else { musuhAction('', indi); if (adaSerang == true && actionMusuh[indi] == false) { musuhAction('muncul', indi); xj = xdiSerangJ; xi = xdiSerangI; ubahDalam('xj', 'xi', 'dalam'); namaBaru = 'rumput_mc' + dalam; if (uncontrolMusuh[xcurrent] == true) { cekSoundFX(xcurrent); tipeSerangan = 1; } pilihanAbil = elementAbility[tipeSerangan]; if (tipeSerangan == undefined) { adaAksi = false; } else { if (tipeSerangan != 1) { auraMusuh[indi] -= auraAbility[tipeSerangan]; namaSerangan = jenisAbility[abilityMusuh[indi][ambilAbil]]; info_mc.gotoAndPlay('xmulai'); } adaAksi = true; klikKotak2(_root[namaBaru], 'komp', indi); } } else { if (moveMusuh[indi] == false && actionMusuh[indi] == false) { musuhMove(indi); adaAksi = true; } } } } } else { adaAksi = false; } if (adaAksi == false) { if (moveMusuh[indi] == false && actionMusuh[indi] == true && tipeAI[indi] == 2) { musuhMove(indi, 'jauh'); adaAksi = true; } else { moveMusuh[indi] = false; actionMusuh[indi] = false; musuhAktif[indi] = false; lanjutKomp(); } } } function musuhMove(indi, indi2) { xcurrent = indi; areamove = 'yes'; xpathFinding('komp'); if (indi2 == 'jauh') { kompAI3(); xxLast = charaKeI; yyLast = charaKeJ; } else { kompAI(); } musuhAktif[xcurrent] = false; mapping[posMusuhJ[xcurrent]][posMusuhI[xcurrent]] = 1; if (indi2 == 'jauh') { mapping[yyLast][xxLast] = 0; } xxStart = posMusuhI[xcurrent]; yyStart = posMusuhJ[xcurrent]; if (indi2 != 'jauh') { if (uncontrolMusuh[xcurrent] == false) { xxLast = posJagoanI[charaKe]; yyLast = posJagoanJ[charaKe]; } else { xxLast = posMusuhI[charaKe]; yyLast = posMusuhJ[charaKe]; } mapping[yyLast][xxLast] = 0; } areamove = 'no'; xpathFinding('komp'); if (xpos != 0) { moveMusuh[xcurrent] = true; enabledMove(false); } else { mapping[posMusuhJ[xcurrent]][posMusuhI[xcurrent]] = 0; mapping[yyLast][xxLast] = 1; } } function musuhAction(indi, indi2) { current = indi2; xcurrent = current; adaSerang = false; xdiSerangI = undefined; xdiSerangJ = undefined; xx = 0; if (uncontrolMusuh[xcurrent] == false) { if (serangMusuh[xcurrent] == 1) { i = posMusuhI[current] - serangMusuh[current]; while (i <= posMusuhI[current] + serangMusuh[current]) { j = posMusuhJ[current] - serangMusuh[current]; while (j <= posMusuhJ[current] + serangMusuh[current]) { if (i != posMusuhI[current] || j != posMusuhJ[current]) { if (indi == 'muncul') { adaOrang = false; l = 0; while (l <= charaMusuh - 1) { if (i == posMusuhI[l] && j == posMusuhJ[l]) { adaOrang = true; l = charaMusuh; } ++l; } if (adaOrang == false) { cekAction(j, i, 2, 'komp'); } } k = 0; while (k <= charaJagoan - 1) { if (i == posJagoanI[k] && j == posJagoanJ[k]) { obyek = namaCharaJagoan[k]; if (_root[obyek].hidup == true) { adaSerang = true; xdiSerangI = i; xdiSerangJ = j; k = charaJagoan + 1; } } ++k; } } ++j; } ++i; } } else { i = posMusuhI[xcurrent] - serangMusuh[xcurrent]; while (i <= posMusuhI[xcurrent]) { j = posMusuhJ[xcurrent] - xx; while (j <= posMusuhJ[xcurrent] + xx) { if (posMusuhI[xcurrent] == i && posMusuhJ[xcurrent] == j) { } else { if (indi == 'muncul') { adaOrang = false; l = 0; while (l <= charaMusuh - 1) { if (i == posMusuhI[l] && j == posMusuhJ[l]) { adaOrang = true; l = charaMusuh; } ++l; } if (adaOrang == false) { cekAction(j, i, 2, 'komp'); } } k = 0; while (k <= charaJagoan - 1) { if (i == posJagoanI[k] && j == posJagoanJ[k]) { obyek = namaCharaJagoan[k]; if (_root[obyek].hidup == true) { adaSerang = true; xdiSerangI = i; xdiSerangJ = j; k = charaJagoan + 1; } } ++k; } } ++j; } ++xx; ++i; } xx = serangMusuh[xcurrent]; i = posMusuhI[xcurrent]; while (i <= posMusuhI[xcurrent] + serangMusuh[xcurrent]) { j = posMusuhJ[xcurrent] - xx; while (j <= posMusuhJ[xcurrent] + xx) { if (posMusuhI[xcurrent] == i && posMusuhJ[xcurrent] == j) { } else { if (indi == 'muncul') { adaOrang = false; l = 0; while (l <= charaMusuh - 1) { if (i == posMusuhI[l] && j == posMusuhJ[l]) { adaOrang = true; l = charaMusuh; } ++l; } if (adaOrang == false) { cekAction(j, i, 2, 'komp'); } } k = 0; while (k <= charaJagoan - 1) { if (i == posJagoanI[k] && j == posJagoanJ[k]) { obyek = namaCharaJagoan[k]; if (_root[obyek].hidup == true) { adaSerang = true; xdiSerangI = i; xdiSerangJ = j; k = charaJagoan + 1; } } ++k; } } ++j; } --xx; ++i; } } } else { if (serangMusuh[xcurrent] == 1) { i = posMusuhI[current] - serangMusuh[current]; while (i <= posMusuhI[current] + serangMusuh[current]) { j = posMusuhJ[current] - serangMusuh[current]; while (j <= posMusuhJ[current] + serangMusuh[current]) { if (i != posMusuhI[current] || j != posMusuhJ[current]) { if (indi == 'muncul') { adaOrang = false; l = 0; while (l <= charaJagoan - 1) { if (i == posJagoanI[l] && j == posJagoanJ[l]) { adaOrang = true; l = charaJagoan; } ++l; } if (adaOrang == false) { cekAction(j, i, 2, 'komp'); } } k = 0; while (k <= charaMusuh - 1) { if (i == posMusuhI[k] && j == posMusuhJ[k]) { if (k != xcurrent) { obyek = namaCharaMusuh[k]; if (_root[obyek].hidup == true) { adaSerang = true; xdiSerangI = i; xdiSerangJ = j; k = charaMusuh + 1; } } } ++k; } } ++j; } ++i; } } else { i = posMusuhI[xcurrent] - serangMusuh[xcurrent]; while (i <= posMusuhI[xcurrent]) { j = posMusuhJ[xcurrent] - xx; while (j <= posMusuhJ[xcurrent] + xx) { if (posMusuhI[xcurrent] == i && posMusuhJ[xcurrent] == j) { } else { if (indi == 'muncul') { adaOrang = false; l = 0; while (l <= charaJagoan - 1) { if (i == posJagoanI[l] && j == posJagoanJ[l]) { adaOrang = true; l = charaJagoan; } ++l; } if (adaOrang == false) { cekAction(j, i, 2, 'komp'); } } k = 0; while (k <= charaMusuh - 1) { if (i == posMusuhI[k] && j == posMusuhJ[k]) { if (k != xcurrent) { obyek = namaCharaMusuh[k]; if (_root[obyek].hidup == true) { adaSerang = true; xdiSerangI = i; xdiSerangJ = j; k = charaMusuh + 1; } } } ++k; } } ++j; } ++xx; ++i; } xx = serangMusuh[xcurrent]; i = posMusuhI[xcurrent]; while (i <= posMusuhI[xcurrent] + serangMusuh[xcurrent]) { j = posMusuhJ[xcurrent] - xx; while (j <= posMusuhJ[xcurrent] + xx) { if (posMusuhI[xcurrent] == i && posMusuhJ[xcurrent] == j) { } else { if (indi == 'muncul') { adaOrang = false; l = 0; while (l <= charaJagoan - 1) { if (i == posJagoanI[l] && j == posJagoanJ[l]) { adaOrang = true; l = charaJagoan; } ++l; } if (adaOrang == false) { cekAction(j, i, 2, 'komp'); } } k = 0; while (k <= charaMusuh - 1) { if (i == posMusuhI[k] && j == posMusuhJ[k]) { if (k != xcurrent) { obyek = namaCharaMusuh[k]; if (_root[obyek].hidup == true) { adaSerang = true; xdiSerangI = i; xdiSerangJ = j; k = charaMusuh + 1; } } } ++k; } } ++j; } --xx; ++i; } } } } function charaMove() { deleteMusuh(true); setBisa(2, false); areamove = 'yes'; xpathFinding('jagoan'); actions.cancel_btn.onRollOver = function () { over(); }; actions.cancel_btn.onRelease = function () { klik(); deleteMusuh(false); setBisa(1, true); deleteMove(); xresetMove(); setKlik(current); }; } function pilihAttack() { setBisa(3, false); deleteMusuh(true); msgBox3 = attachMovie('msgBox_mc3', 'msgBox_mc3', dalamMsgBox3); msgBox3._x = 400; msgBox3._y = 300; msgBox3.gotoAndStop(1); msgBox3.choose = 'CHOOSE TYPE OF ATTACK (AURA = ' + auraJagoan[current] + ')'; i = 1; while (i <= 10) { msgBox3['attack' + i] = jenisAbility[abilityJagoan[current][i]]; kosong = jenisAbility[abilityJagoan[current][i]]; if (kosong == 'Empty') { msgBox3['attack_btn' + i].enabled = false; } else { msgBox3['attack_btn' + i].enabled = true; msgBox3['attack_btn' + i].onRelease = klikAttack; msgBox3['attack_btn' + i].onRollOver = overAttack; msgBox3['attack_btn' + i].onRollOut = outAttack; msgBox3['attack_btn' + i].onReleaseOutside = outAttack; } ++i; } msgBox3.quit_btn.onRollOver = function () { over(); }; msgBox3.quit_btn.onRelease = function () { klik(); removeMovieClip(msgBox_mc3); setBisa(1, true); deleteMove(); xresetMove(); deleteMusuh(false); setKlik(current); }; } function pilihItem() { setBisa(3, false); deleteMusuh(true); msgBox3 = attachMovie('msgBox_mc3', 'msgBox_mc3', dalamMsgBox3); msgBox3._x = 400; msgBox3._y = 300; msgBox3.gotoAndStop(2); msgBox3.choose = 'CHOOSE TYPE OF ITEM'; i = 1; while (i <= 5) { msgBox3['item' + i] = jenisItem[itemJagoan[current][i]] + ' (x' + punyaItem[itemJagoan[current][i]] + ')'; kosong = jenisItem[itemJagoan[current][i]]; if (kosong == 'Empty') { msgBox3['item' + i] = kosong; msgBox3['item_btn' + i].enabled = false; } else { if (itemJagoan[current][i] == 11) { delete msgBox3['item_btn' + i].onRelease; msgBox3['item_btn' + i].onRollOver = overItem; msgBox3['item_btn' + i].onRollOut = outItem; msgBox3['item_btn' + i].onReleaseOutside = outItem; } else { msgBox3['item_btn' + i].enabled = true; msgBox3['item_btn' + i].onRelease = klikItem; msgBox3['item_btn' + i].onRollOver = overItem; msgBox3['item_btn' + i].onRollOut = outItem; msgBox3['item_btn' + i].onReleaseOutside = outItem; } } ++i; } msgBox3.quit_btn.onRollOver = function () { over(); }; msgBox3.quit_btn.onRelease = function () { klik(); removeMovieClip(msgBox_mc3); setBisa(1, true); deleteMove(); xresetMove(); deleteMusuh(false); setKlik(current); }; } function overAttack() { over(); jedaInfo2 = 0; adaJedaInfo = true; info2.nama = ''; info2.informasi = ''; jenisOver = 'attack'; pilihAbil = this; } function outAttack() { adaJedaInfo = false; info2.nama = ''; info2.informasi = ''; info2._visible = false; info2._alpha = 0; } function overItem() { over(); jedaInfo2 = 0; adaJedaInfo = true; info2.nama = ''; info2.informasi = ''; jenisOver = 'item'; pilihAbil = this; } function outItem() { adaJedaInfo = false; info2.nama = ''; info2.informasi = ''; info2._visible = false; info2._alpha = 0; } function enterInfo2() { if (adaJedaInfo == true) { ++jedaInfo2; if (jedaInfo2 >= 10) { info2._visible = true; if (info2._alpha <= 100) { info2._alpha += 30; } } } else { info2._visible = false; } info2._x = _root._xmouse - 100; info2._y = _root._ymouse; myStr = new String(pilihAbil); if (jenisOver == 'attack') { if (myStr.length == 30) { indi = Number(myStr.substr(myStr.length - 1, 1)); } else { indi = Number(myStr.substr(myStr.length - 2, 2)); } xinfo = infoAbility[abilityJagoan[current][indi]]; yindi = abilityJagoan[current][indi]; info2.nama = msgBox3['attack' + indi]; info2.informasi = 'Element ' + element[elementAbility[yindi]] + ' \n Need ' + auraAbility[yindi] + ' Aura \n\n ' + xinfo; } else { if (jenisOver == 'item') { indi = Number(myStr.substr(myStr.length - 1, 1)); xinfo = infoItem[itemJagoan[current][indi]]; yindi = itemJagoan[current][indi]; info2.nama = jenisItem[itemJagoan[current][indi]]; info2.informasi = 'Element ' + element[elementItem[yindi]] + '\n\n ' + xinfo; } } } function enterAll() { tj = this.posJ; ti = this.posI; ubahDalam('tj', 'ti', 'dalam'); namaBaru = 'rumput_mc' + dalam; aimX = _root[namaBaru]._x + 50; aimY = _root[namaBaru]._y - 20; deltaX = this._x - aimX; deltaY = this._y - aimY; angle = -Math.atan2(deltaX, deltaY) / 0.0174532925199433; if (Math.sqrt(deltaX * deltaX + deltaY * deltaY) > this.speed) { this.speed += 0.1; this._y -= this.speed * Math.cos(angle * 0.0174532925199433); this._x += this.speed * Math.sin(angle * 0.0174532925199433); } else { xnamaChara = namaCharaJagoan[current]; zztujuJ = this.posJ; zztujuI = this.posI; zobyek = undefined; zk = 0; while (zk <= charaMusuh - 1) { if (zztujuI == posMusuhI[zk] && zztujuJ == posMusuhJ[zk]) { zobyek = namaCharaMusuh[zk]; } ++zk; } ygNyerang = xnamaChara; ygDiserang = zobyek; indiNyerang = _root[ygNyerang].ke; indiDiserang = _root[ygDiserang].ke; if (indiNyerang != undefined && indiDiserang != undefined) { cekKurangJagoan(ygNyerang, ygDiserang, this.ke); } --ambilAll; removeMovieClip(this); } if (ambilAll <= 0) { delete this.onEnterFrame; bertambahExp = random(11) + 10; expJagoan[indiNyerang] += bertambahExp; if (expJagoan[indiNyerang] >= maxJagoan[indiNyerang]) { ++levelJagoan[indiNyerang]; totLiveJagoan[indiNyerang] = Math.ceil(levelJagoan[indiNyerang] * incLive[indiNyerang] * 25); attackJagoan[indiNyerang] = Math.ceil(levelJagoan[indiNyerang] * incAttack[indiNyerang] * 10); defenseJagoan[indiNyerang] = Math.ceil(levelJagoan[indiNyerang] * incDefense[indiNyerang] * 5); totAuraJagoan[indiNyerang] = Math.ceil(levelJagoan[indiNyerang] * incAura[indiNyerang] * 10); expJagoan[indiNyerang] = 0; maxJagoan[indiNyerang] = levelJagoan[indiNyerang] * 500; delay3(this.ke); } else { delay4(this.ke); } delay1(); } } function enterAll2() { tj = this.posJ; ti = this.posI; ubahDalam('tj', 'ti', 'dalam'); namaBaru = 'rumput_mc' + dalam; aimX = _root[namaBaru]._x + 50; aimY = _root[namaBaru]._y - 20; deltaX = this._x - aimX; deltaY = this._y - aimY; angle = -Math.atan2(deltaX, deltaY) / 0.0174532925199433; if (Math.sqrt(deltaX * deltaX + deltaY * deltaY) > this.speed) { this.speed += 0.1; this._y -= this.speed * Math.cos(angle * 0.0174532925199433); this._x += this.speed * Math.sin(angle * 0.0174532925199433); } else { xnamaChara = namaCharaMusuh[xcurrent]; zztujuJ = this.posJ; zztujuI = this.posI; zobyek = undefined; zk = 0; while (zk <= charaJagoan - 1) { if (zztujuI == posJagoanI[zk] && zztujuJ == posJagoanJ[zk]) { zobyek = namaCharaJagoan[zk]; } ++zk; } ygNyerang = xnamaChara; ygDiserang = zobyek; indiNyerang = _root[ygNyerang].ke; indiDiserang = _root[ygDiserang].ke; if (indiNyerang != undefined && indiDiserang != undefined) { cekKurangMusuh(ygNyerang, ygDiserang, this.ke); } --ambilAll; removeMovieClip(this); } if (ambilAll <= 0) { delete this.onEnterFrame; bertambahExp = random(11) + 10; expMusuh[indiNyerang] += bertambahExp; if (expMusuh[indiNyerang] >= maxMusuh[indiNyerang]) { ++levelMusuh[indiNyerang]; totLiveMusuh[indiNyerang] = Math.ceil(levelMusuh[indiNyerang] * xincLive[indiNyerang] * 25); attackMusuh[indiNyerang] = Math.ceil(levelMusuh[indiNyerang] * xincAttack[indiNyerang] * 10); defenseMusuh[indiNyerang] = Math.ceil(levelMusuh[indiNyerang] * xincDefense[indiNyerang] * 5); totAuraMusuh[indiNyerang] = Math.ceil(levelMusuh[indiNyerang] * xincAura[indiNyerang] * 10); expMusuh[indiNyerang] = 0; maxMusuh[indiNyerang] = levelMusuh[indiNyerang] * 500; delay3(this.ke); } else { delay4(this.ke); } delay2(); } } function klikAttack() { klik(); if (auraJagoan[current] >= auraAbility[yindi]) { info2._visible = false; myStr = new String(this); if (myStr.length == 30) { indi = Number(myStr.substr(myStr.length - 1, 1)); } else { indi = Number(myStr.substr(myStr.length - 2, 2)); } tipeSerangan = abilityJagoan[current][indi]; pilihanAbil = elementAbility[abilityJagoan[current][indi]]; yyindi = abilityJagoan[current][indi]; namaSerangan = msgBox3['attack' + indi]; if (namaSerangan != 'Normal') { info_mc.gotoAndPlay('xmulai'); } deleteMusuh(false); adaJedaInfo = false; removeMovieClip(msgBox_mc3); if (tipeSerangan == 11) { auraJagoan[current] -= auraAbility[yyindi]; actions._visible = false; actionJagoan[current] = true; ambilAllJ = new Array(); ambilAllI = new Array(); ambilAll = 0; k = 0; while (k <= charaMusuh - 1) { if (posMusuhI[k] != undefined && posMusuhJ[k] != undefined) { ambilAllJ[ambilAll] = posMusuhJ[k]; ambilAllI[ambilAll] = posMusuhI[k]; ++ambilAll; } ++k; } xi = 0; while (xi <= ambilAll - 1) { all = attachMovie('all_mc', 'all_mc' + xi, dalamMeteor + xi); zj = ambilAllJ[xi]; zi = ambilAllI[xi]; ubahDalam('zj', 'zi', 'dalam'); namaBaru = 'rumput_mc' + dalam; all._yscale = random(50) + 50; all._xscale = all._yscale; all._rotation = random(360); all._x = _root[namaCharaJagoan[current]]._x; all._y = _root[namaCharaJagoan[current]]._y; all.posJ = zj; all.posI = zi; all.kenaBawah = namaBaru; all.speed = 5; all.ke = xi; all.onEnterFrame = enterAll; ++xi; } enabledMove(false); deleteMusuh(true); } else { charaAction(); } } else { msgBox3.choose = 'NOT ENOUGH AURA (AURA = ' + auraJagoan[current] + ')'; } } function klikItem() { klik(); myStr = new String(this); zzindi = Number(myStr.substr(myStr.length - 1, 1)); tipeItem = itemJagoan[current][zzindi]; if (punyaItem[itemJagoan[current][zzindi]] >= 1) { info2._visible = false; namaSerangan = jenisItem[itemJagoan[current][zzindi]]; info_mc.gotoAndPlay('xmulai'); deleteMusuh(false); adaJedaInfo = false; removeMovieClip(msgBox_mc3); charaItem(); } else { msgBox3.choose = 'NOT ENOUGH ITEM'; } } function cekItem(j, i, indi, indi2) { xj = j; xi = i; ubahDalam('xj', 'xi', 'dalam'); namaBaru = 'rumput_mc' + dalam; _root[namaBaru].enabled = true; _root[namaBaru].gotoAndStop(indi); myColor = new Color(_root[namaBaru].warna_mc); myColor.setRGB('0xA7FF91'); if (indi2 != 'komp') { _root[namaBaru].onRelease = klikKotak3; _root[namaBaru].onRollOver = overKotak3; _root[namaBaru].onRollOut = outKotak3; _root[namaBaru].onReleaseOutside = outKotak3; } } function klikKotak3(indi, indi2, indi3) { klik(); k = 0; while (k <= charaJagoan - 1) { obyek = namaCharaJagoan[k]; if (_root[obyek].hidup == true) { _root[obyek].itemKlik = false; } ++k; } setBisa(3, false); adaJedaMsgBox2 = false; if (indi != undefined) { this = indi; } tujuan = this; kata = new String(this); tujuJ = Number(kata.substr(kata.length - 4, 2)); tujuI = Number(kata.substr(kata.length - 2, 2)); xcurrentPath = 0; xPath = new Array(); yPath = new Array(); xPath[xcurrentPath] = tujuJ; yPath[xcurrentPath] = tujuI; if (indi2 != 'komp') { actions._visible = false; actionJagoan[current] = true; xnamaChara = undefined; zobyek = undefined; xnamaChara = namaCharaJagoan[current]; k = 0; while (k <= charaJagoan - 1) { if (tujuI == posJagoanI[k] && tujuJ == posJagoanJ[k]) { zobyek = namaCharaJagoan[k]; indiDiserang = k; k = charaJagoan - 1; } ++k; } ygNyerang = xnamaChara; ygDiserang = zobyek; indiNyerang = _root[ygNyerang].ke; cekPosisi('item'); enabledMove(false); deleteMusuh(true); } else { current = indi3; actionMusuh[indi3] = true; xnamaChara = undefined; zobyek = undefined; xnamaChara = namaCharaMusuh[indi3]; k = 0; while (k <= charaJagoan - 1) { if (tujuI == posJagoanI[k] && tujuJ == posJagoanJ[k]) { zobyek = namaCharaJagoan[k]; } ++k; } ygNyerang = xnamaChara; ygDiserang = zobyek; cekPosisi2('serang'); } } function klikJagoan() { klik(); this = this._parent; if (this.itemKlik == true) { vj = posJagoanJ[this.ke]; vi = posJagoanI[this.ke]; ubahDalam('vj', 'vi', 'dalam'); namaBaru = 'rumput_mc' + dalam; klikKotak3(_root[namaBaru]); } } function overKotak3(indi) { over(); if (indi != undefined) { this = indi; } myColor = new Color(this.warna_mc); myColor.setRGB('0x166F00'); } function outKotak3(indi) { if (indi != undefined) { this = indi; } myColor = new Color(this.warna_mc); myColor.setRGB('0xA7FF91'); } function charaItem() { setBisa(2, false); i = posJagoanI[current] - 1; while (i <= posJagoanI[current] + 1) { j = posJagoanJ[current] - 1; while (j <= posJagoanJ[current] + 1) { adaOrang = false; l = 0; while (l <= charaMusuh - 1) { if (i == posMusuhI[l] && j == posMusuhJ[l]) { adaOrang = true; l = charaMusuh; } ++l; } if (adaOrang == false) { cekItem(j, i, 2); } k = 0; while (k <= charaJagoan - 1) { if (i == posJagoanI[k] && j == posJagoanJ[k]) { obyek = namaCharaJagoan[k]; if (_root[obyek].hidup == true) { _root[obyek].klik_mc.enabled = true; _root[obyek].itemKlik = true; _root[obyek].klik_mc.onRelease = klikJagoan; _root[obyek].klik_mc.onRollOver = overChara; _root[obyek].klik_mc.onRollOut = outChara; _root[obyek].klik_mc.onReleaseOutside = outChara; } } ++k; } ++j; } ++i; } actions.cancel_btn.onRollOver = function () { over(); }; actions.cancel_btn.onRelease = function () { klik(); k = 0; while (k <= charaJagoan - 1) { obyek = namaCharaJagoan[k]; if (_root[obyek].hidup == true) { _root[obyek].itemKlik = false; } ++k; } if (info_mc._currentframe > 3) { info_mc.gotoAndPlay('xselesai'); } else { info_mc.gotoAndStop(1); } setBisa(1, true); deleteMove(); xresetMove(); setKlik(current); }; } function musuhItem(current) { setBisa(3, false); i = posMusuhI[current] - 1; while (i <= posMusuhI[current] + 1) { j = posMusuhJ[current] - 1; while (j <= posMusuhJ[current] + 1) { adaOrang = false; l = 0; while (l <= charaJagoan - 1) { if (i == posJagoanI[l] && j == posJagoanJ[l]) { adaOrang = true; l = charaJagoan; } ++l; } if (adaOrang == false) { cekItem(j, i, 2, 'komp'); } ++j; } ++i; } } function setMuncul(indi) { k = 0; while (k <= charaMusuh - 1) { obyek = namaCharaMusuh[k]; _root[obyek].darah_mc._visible = indi; _root[obyek].aura_mc._visible = indi; scala1 = (liveMusuh[k] / totLiveMusuh[k]) * 100; scala2 = (auraMusuh[k] / totAuraMusuh[k]) * 100; _root[obyek].darah_mc.zbar._xscale = scala1; _root[obyek].aura_mc.zbar._xscale = scala2; ++k; } } function charaAction2(indi) { xx = 0; if (serangJagoan[current] == 1) { i = posJagoanI[current] - serangJagoan[current]; while (i <= posJagoanI[current] + serangJagoan[current]) { j = posJagoanJ[current] - serangJagoan[current]; while (j <= posJagoanJ[current] + serangJagoan[current]) { if (i != posJagoanI[current] || j != posJagoanJ[current]) { if (indi == 'muncul') { adaOrang = false; l = 0; while (l <= charaJagoan - 1) { if (i == posJagoanI[l] && j == posJagoanJ[l]) { adaOrang = true; l = charaJagoan; } ++l; } if (adaOrang == false) { cekAction(j, i, 2, 'komp'); } } k = 0; while (k <= charaMusuh - 1) { if (i == posMusuhI[k] && j == posMusuhJ[k]) { if (k != current) { obyek = namaCharaMusuh[k]; if (_root[obyek].hidup == true) { adaSerang = true; xdiSerangI = i; xdiSerangJ = j; k = charaMusuh + 1; } } } ++k; } } ++j; } ++i; } } else { i = posJagoanI[xcurrent] - serangJagoan[xcurrent]; while (i <= posJagoanI[xcurrent]) { j = posJagoanJ[xcurrent] - xx; while (j <= posJagoanJ[xcurrent] + xx) { if (posJagoanI[xcurrent] == i && posJagoanJ[xcurrent] == j) { } else { if (indi == 'muncul') { adaOrang = false; l = 0; while (l <= charaJagoan - 1) { if (i == posJagoanI[l] && j == posJagoanJ[l]) { adaOrang = true; l = charaJagoan; } ++l; } if (adaOrang == false) { cekAction(j, i, 2, 'komp'); } } k = 0; while (k <= charaMusuh - 1) { if (i == posMusuhI[k] && j == posMusuhJ[k]) { if (k != xcurrent) { obyek = namaCharaMusuh[k]; if (_root[obyek].hidup == true) { adaSerang = true; xdiSerangI = i; xdiSerangJ = j; k = charaMusuh + 1; } } } ++k; } } ++j; } ++xx; ++i; } xx = serangJagoan[xcurrent]; i = posJagoanI[xcurrent]; while (i <= posJagoanI[xcurrent] + serangJagoan[xcurrent]) { j = posJagoanJ[xcurrent] - xx; while (j <= posJagoanJ[xcurrent] + xx) { if (posJagoanI[xcurrent] == i && posJagoanJ[xcurrent] == j) { } else { if (indi == 'muncul') { adaOrang = false; l = 0; while (l <= charaJagoan - 1) { if (i == posJagoanI[l] && j == posJagoanJ[l]) { adaOrang = true; l = charaJagoan; } ++l; } if (adaOrang == false) { cekAction(j, i, 2, 'komp'); } } k = 0; while (k <= charaMusuh - 1) { if (i == posMusuhI[k] && j == posMusuhJ[k]) { if (k != xcurrent) { obyek = namaCharaMusuh[k]; if (_root[obyek].hidup == true) { adaSerang = true; xdiSerangI = i; xdiSerangJ = j; k = charaMusuh + 1; } } } ++k; } } ++j; } --xx; ++i; } } } function charaAction(indi) { if (uncontrolJagoan[current] == false) { setBisa(2, false); setMuncul(true); } xx = 0; if (uncontrolJagoan[current] == false) { if (serangJagoan[current] == 1) { i = posJagoanI[current] - serangJagoan[current]; while (i <= posJagoanI[current] + serangJagoan[current]) { j = posJagoanJ[current] - serangJagoan[current]; while (j <= posJagoanJ[current] + serangJagoan[current]) { adaOrang = false; l = 0; while (l <= charaJagoan - 1) { if (i == posJagoanI[l] && j == posJagoanJ[l]) { adaOrang = true; l = charaJagoan; } ++l; } if (adaOrang == false) { cekAction(j, i, 2); } k = 0; while (k <= charaMusuh - 1) { if (i == posMusuhI[k] && j == posMusuhJ[k]) { obyek = namaCharaMusuh[k]; if (_root[obyek].hidup == true) { _root[obyek].klik_mc.onRelease = klikMusuh; } } ++k; } ++j; } ++i; } } else { i = posJagoanI[current] - serangJagoan[current]; while (i <= posJagoanI[current]) { j = posJagoanJ[current] - xx; while (j <= posJagoanJ[current] + xx) { if (posJagoanI[current] == i && posJagoanJ[current] == j) { } else { adaOrang = false; l = 0; while (l <= charaJagoan - 1) { if (i == posJagoanI[l] && j == posJagoanJ[l]) { adaOrang = true; l = charaJagoan; } ++l; } if (adaOrang == false) { cekAction(j, i, 2); } k = 0; while (k <= charaMusuh - 1) { if (i == posMusuhI[k] && j == posMusuhJ[k]) { obyek = namaCharaMusuh[k]; if (_root[obyek].hidup == true) { _root[obyek].klik_mc.onRelease = klikMusuh; } } ++k; } } ++j; } ++xx; ++i; } xx = serangJagoan[current]; i = posJagoanI[current]; while (i <= posJagoanI[current] + serangJagoan[current]) { j = posJagoanJ[current] - xx; while (j <= posJagoanJ[current] + xx) { if (posJagoanI[current] == i && posJagoanJ[current] == j) { } else { adaOrang = false; l = 0; while (l <= charaJagoan - 1) { if (i == posJagoanI[l] && j == posJagoanJ[l]) { adaOrang = true; l = charaJagoan; } ++l; } if (adaOrang == false) { cekAction(j, i, 2); } k = 0; while (k <= charaMusuh - 1) { if (i == posMusuhI[k] && j == posMusuhJ[k]) { obyek = namaCharaMusuh[k]; if (_root[obyek].hidup == true) { _root[obyek].klik_mc.onRelease = klikMusuh; } } ++k; } } ++j; } --xx; ++i; } } actions.cancel_btn.onRelease = function () { over(); }; actions.cancel_btn.onRelease = function () { klik(); if (info_mc._currentframe > 3) { info_mc.gotoAndPlay('xselesai'); } else { info_mc.gotoAndStop(1); } setBisa(1, true); deleteMove(); xresetMove(); setKlik(current); setMuncul(false); }; } else { if (serangJagoan[current] == 1) { i = posJagoanI[current] - serangJagoan[current]; while (i <= posJagoanI[current] + serangJagoan[current]) { j = posJagoanJ[current] - serangJagoan[current]; while (j <= posJagoanJ[current] + serangJagoan[current]) { if (i != posJagoanI[current] || j != posJagoanJ[current]) { if (indi == 'muncul') { adaOrang = false; l = 0; while (l <= charaMusuh - 1) { if (i == posMusuhI[l] && j == posMusuhJ[l]) { adaOrang = true; l = charaMusuh; } ++l; } if (adaOrang == false) { cekAction(j, i, 2, 'komp'); } } k = 0; while (k <= charaJagoan - 1) { if (i == posJagoanI[k] && j == posJagoanJ[k]) { if (k != current) { obyek = namaCharaJagoan[k]; if (_root[obyek].hidup == true) { adaSerang = true; xdiSerangI = i; xdiSerangJ = j; k = charaJagoan + 1; } } } ++k; } } ++j; } ++i; } } else { i = posJagoanI[xcurrent] - serangJagoan[xcurrent]; while (i <= posJagoanI[xcurrent]) { j = posJagoanJ[xcurrent] - xx; while (j <= posJagoanJ[xcurrent] + xx) { if (posJagoanI[xcurrent] == i && posJagoanJ[xcurrent] == j) { } else { if (indi == 'muncul') { adaOrang = false; l = 0; while (l <= charaMusuh - 1) { if (i == posMusuhI[l] && j == posMusuhJ[l]) { adaOrang = true; l = charaMusuh; } ++l; } if (adaOrang == false) { cekAction(j, i, 2, 'komp'); } } k = 0; while (k <= charaJagoan - 1) { if (i == posJagoanI[k] && j == posJagoanJ[k]) { if (k != xcurrent) { obyek = namaCharaJagoan[k]; if (_root[obyek].hidup == true) { adaSerang = true; xdiSerangI = i; xdiSerangJ = j; k = charaJagoan + 1; } } } ++k; } } ++j; } ++xx; ++i; } xx = serangJagoan[xcurrent]; i = posJagoanI[xcurrent]; while (i <= posJagoanI[xcurrent] + serangJagoan[xcurrent]) { j = posJagoanJ[xcurrent] - xx; while (j <= posJagoanJ[xcurrent] + xx) { if (posJagoanI[xcurrent] == i && posJagoanJ[xcurrent] == j) { } else { if (indi == 'muncul') { adaOrang = false; l = 0; while (l <= charaMusuh - 1) { if (i == posMusuhI[l] && j == posMusuhJ[l]) { adaOrang = true; l = charaMusuh; } ++l; } if (adaOrang == false) { cekAction(j, i, 2, 'komp'); } } k = 0; while (k <= charaJagoan - 1) { if (i == posJagoanI[k] && j == posJagoanJ[k]) { if (k != xcurrent) { obyek = namaCharaJagoan[k]; if (_root[obyek].hidup == true) { adaSerang = true; xdiSerangI = i; xdiSerangJ = j; k = charaJagoan + 1; } } } ++k; } } ++j; } --xx; ++i; } } } } function cekMove(j, i, indi, indi2) { ei = 0; while (ei <= charaJagoan - 1) { if (_root[namaCharaJagoan[ei]].hidup == true) { mapping[posJagoanJ[ei]][posJagoanI[ei]] = 0; } ++ei; } ei = 0; while (ei <= charaMusuh - 1) { if (_root[namaCharaMusuh[ei]].hidup == true) { mapping[posMusuhJ[ei]][posMusuhI[ei]] = 0; } ++ei; } xj = j; xi = i; if (mapping[xj][xi] == 1) { ubahDalam('xj', 'xi', 'dalam'); namaBaru = 'rumput_mc' + dalam; _root[namaBaru].enabled = true; _root[namaBaru].gotoAndStop(indi); myColor = new Color(_root[namaBaru].warna_mc); myColor.setRGB('0x9293FE'); if (indi2 != 'komp') { _root[namaBaru].onRelease = klikKotak; _root[namaBaru].onRollOver = overKotak; _root[namaBaru].onRollOut = outKotak; _root[namaBaru].onReleaseOutside = outKotak; } } } function jagoanAI(indi) { jarakYg = new Array(); ambilKeJ = new Array(); ambilKeI = new Array(); ambil = new Array(); xchara = new Array(); jarakKe = 0; charaKe = undefined; k = 0; while (k <= charaJagoan - 1) { if (_root[namaCharaJagoan[k]].hidup == true) { if (k != indi) { jarakYg[jarakKe] = Math.sqrt(Math.pow(posJagoanI[k] - posJagoanI[indi], 2) + Math.pow(posJagoanJ[k] - posJagoanJ[indi], 2)); xchara[jarakKe] = k; ambil[jarakKe] = jarakKe; ++jarakKe; } } ++k; } i = 0; while (i <= jarakKe - 1) { j = i + 1; while (j <= jarakKe - 1) { if (jarakYg[i] > jarakYg[j]) { xtemp = jarakYg[i]; jarakYg[i] = jarakYg[j]; jarakYg[j] = xtemp; ytemp = i; ambil[i] = ambil[j]; ambil[j] = ytemp; } ++j; } ++i; } xambil = ambil[0]; charaKe = xchara[xambil]; } function kompAI() { jarakYg = new Array(); ambilKeJ = new Array(); ambilKeI = new Array(); ambil = new Array(); xchara = new Array(); jarakKe = 0; charaKe = 0; if (uncontrolMusuh[xcurrent] == false) { k = 0; while (k <= charaJagoan - 1) { if (_root[namaCharaJagoan[k]].hidup == true) { jarakYg[jarakKe] = Math.sqrt(Math.pow(posJagoanI[k] - posMusuhI[xcurrent], 2) + Math.pow(posJagoanJ[k] - posMusuhJ[xcurrent], 2)); xchara[jarakKe] = k; ambil[jarakKe] = jarakKe; ++jarakKe; } ++k; } } else { k = 0; while (k <= charaMusuh - 1) { if (_root[namaCharaMusuh[k]].hidup == true) { if (k != xcurrent) { jarakYg[jarakKe] = Math.sqrt(Math.pow(posMusuhI[k] - posMusuhI[xcurrent], 2) + Math.pow(posMusuhJ[k] - posMusuhJ[xcurrent], 2)); xchara[jarakKe] = k; ambil[jarakKe] = jarakKe; ++jarakKe; } } ++k; } } i = 0; while (i <= jarakKe - 1) { j = i + 1; while (j <= jarakKe - 1) { if (jarakYg[i] > jarakYg[j]) { xtemp = jarakYg[i]; jarakYg[i] = jarakYg[j]; jarakYg[j] = xtemp; ytemp = i; ambil[i] = ambil[j]; ambil[j] = ytemp; } ++j; } ++i; } xambil = ambil[0]; charaKe = xchara[xambil]; } function kompAI3() { jarakYg = new Array(); ambilKeJ = new Array(); ambilKeI = new Array(); ambil = new Array(); xcharaI = new Array(); xcharaJ = new Array(); jarakKe = 0; charaKeI = 0; charaKeJ = 0; i = posMusuhI[xcurrent] - xrangeMusuh[xcurrent]; while (i <= posMusuhI[xcurrent] + xrangeMusuh[xcurrent]) { j = posMusuhJ[xcurrent] - xrangeMusuh[xcurrent]; while (j <= posMusuhJ[xcurrent] + xrangeMusuh[xcurrent]) { if (j != posMusuhJ[xcurrent] && i != posMusuhI[xcurrent]) { ubahDalam('j', 'i', 'dalam'); namaBaru = 'rumput_mc' + dalam; if (_root[namaBaru]._currentframe > 1 && mapping[j][i] == 1) { jarakYg[jarakKe] = Math.sqrt(Math.pow(posJagoanI[indiDiserang] - i, 2) + Math.pow(posJagoanJ[indiDiserang] - j, 2)); xcharaI[jarakKe] = i; xcharaJ[jarakKe] = j; ambil[jarakKe] = jarakKe; ++jarakKe; } } ++j; } ++i; } i = 0; while (i <= jarakKe - 1) { j = i + 1; while (j <= jarakKe - 1) { if (jarakYg[i] < jarakYg[j]) { xtemp = jarakYg[i]; jarakYg[i] = jarakYg[j]; jarakYg[j] = xtemp; ytemp = i; ambil[i] = ambil[j]; ambil[j] = ytemp; } ++j; } ++i; } xambil = ambil[0]; charaKeI = xcharaI[xambil]; charaKeJ = xcharaJ[xambil]; } function cekAction(j, i, indi, indi2) { xj = j; xi = i; ubahDalam('xj', 'xi', 'dalam'); namaBaru = 'rumput_mc' + dalam; _root[namaBaru].enabled = true; _root[namaBaru].gotoAndStop(indi); myColor = new Color(_root[namaBaru].warna_mc); myColor.setRGB('0xFEABAB'); if (indi2 != 'komp') { _root[namaBaru].onRelease = klikKotak2; _root[namaBaru].onRollOver = overKotak2; _root[namaBaru].onRollOut = outKotak2; _root[namaBaru].onReleaseOutside = outKotak2; } } function klikKotak(indi, indi2) { klik(); adaJedaMsgBox2 = false; deleteMusuh(false); if (indi != undefined) { this = indi; } if (indi2 == 'komp') { musuhAktif[xcurrent] = false; kata = new String(this); tujuJ = Number(kata.substr(kata.length - 4, 2)); tujuI = Number(kata.substr(kata.length - 2, 2)); mapping[posMusuhJ[xcurrent]][posMusuhI[xcurrent]] = 1; mapping[tujuJ][tujuI] = 0; xxStart = posMusuhI[xcurrent]; yyStart = posMusuhJ[xcurrent]; xxLast = tujuI; yyLast = tujuJ; areamove = 'no'; xpathFinding('komp'); if (xpos != 0) { moveMusuh[xcurrent] = true; enabledMove(false); } else { mapping[posMusuhJ[xcurrent]][posMusuhI[xcurrent]] = 0; mapping[tujuJ][tujuI] = 1; } } else { kata = new String(this); tujuJ = Number(kata.substr(kata.length - 4, 2)); tujuI = Number(kata.substr(kata.length - 2, 2)); mapping[posJagoanJ[current]][posJagoanI[current]] = 1; mapping[tujuJ][tujuI] = 0; xxStart = posJagoanI[current]; yyStart = posJagoanJ[current]; xxLast = tujuI; yyLast = tujuJ; areamove = 'no'; xpathFinding('jagoan'); if (xpos != 0) { actions._visible = false; moveJagoan[current] = true; enabledMove(false); } else { mapping[posJagoanJ[current]][posJagoanI[current]] = 0; mapping[tujuJ][tujuI] = 1; } } } function enterMeteor() { this._y += this.speed; this.speed += 0.1; if (this.hitTest(_root[this.kenaBawah])) { xnamaChara = namaCharaJagoan[current]; zztujuJ = this.posJ; zztujuI = this.posI; zobyek = undefined; zk = 0; while (zk <= charaMusuh - 1) { if (zztujuI == posMusuhI[zk] && zztujuJ == posMusuhJ[zk]) { zobyek = namaCharaMusuh[zk]; } ++zk; } ygNyerang = xnamaChara; ygDiserang = zobyek; indiNyerang = _root[ygNyerang].ke; indiDiserang = _root[ygDiserang].ke; if (indiNyerang != undefined && indiDiserang != undefined) { cekKurangJagoan(ygNyerang, ygDiserang, this.ke); } --ambilMeteor; removeMovieClip(this); } if (ambilMeteor <= 0) { delete this.onEnterFrame; bertambahExp = random(11) + 10; expJagoan[indiNyerang] += bertambahExp; if (expJagoan[indiNyerang] >= maxJagoan[indiNyerang]) { ++levelJagoan[indiNyerang]; totLiveJagoan[indiNyerang] = Math.ceil(levelJagoan[indiNyerang] * incLive[indiNyerang] * 25); attackJagoan[indiNyerang] = Math.ceil(levelJagoan[indiNyerang] * incAttack[indiNyerang] * 10); defenseJagoan[indiNyerang] = Math.ceil(levelJagoan[indiNyerang] * incDefense[indiNyerang] * 5); totAuraJagoan[indiNyerang] = Math.ceil(levelJagoan[indiNyerang] * incAura[indiNyerang] * 10); expJagoan[indiNyerang] = 0; maxJagoan[indiNyerang] = levelJagoan[indiNyerang] * 500; delay3(this.ke); } else { delay4(this.ke); } delay1(); } } function enterMeteor2() { this._y += this.speed; this.speed += 0.1; if (this.hitTest(_root[this.kenaBawah])) { xnamaChara = namaCharaMusuh[current]; zztujuJ = this.posJ; zztujuI = this.posI; zobyek = undefined; zk = 0; while (zk <= charaJagoan - 1) { if (zztujuI == posJagoanI[zk] && zztujuJ == posJagoanJ[zk]) { zobyek = namaCharaJagoan[zk]; } ++zk; } ygNyerang = xnamaChara; ygDiserang = zobyek; indiNyerang = _root[ygNyerang].ke; indiDiserang = _root[ygDiserang].ke; if (indiNyerang != undefined && indiDiserang != undefined) { cekKurangMusuh(ygNyerang, ygDiserang, this.ke); } --ambilMeteor; removeMovieClip(this); } if (ambilMeteor <= 0) { _root[namaCharaMusuh[indiNyerang]].enabled = true; delete this.onEnterFrame; bertambahExp = random(11) + 10; expMusuh[indiNyerang] += bertambahExp; if (expMusuh[indiNyerang] >= maxMusuh[indiNyerang]) { ++levelMusuh[indiNyerang]; totLiveMusuh[indiNyerang] = Math.ceil(levelMusuh[indiNyerang] * xincLive[indiNyerang] * 25); attackMusuh[indiNyerang] = Math.ceil(levelMusuh[indiNyerang] * xincAttack[indiNyerang] * 10); defenseMusuh[indiNyerang] = Math.ceil(levelMusuh[indiNyerang] * xincDefense[indiNyerang] * 5); totAuraMusuh[indiNyerang] = Math.ceil(levelMusuh[indiNyerang] * xincAura[indiNyerang] * 10); expMusuh[indiNyerang] = 0; maxMusuh[indiNyerang] = levelMusuh[indiNyerang] * 500; delay3(this.ke); } else { delay4(this.ke); } delay2(); } } function klikKotak2(indi, indi2, indi3) { klik(); adaJedaMsgBox2 = false; if (indi != undefined) { this = indi; } tujuan = this; kata = new String(this); tujuJ = Number(kata.substr(kata.length - 4, 2)); tujuI = Number(kata.substr(kata.length - 2, 2)); xcurrentPath = 0; xPath = new Array(); yPath = new Array(); xPath[xcurrentPath] = tujuJ; yPath[xcurrentPath] = tujuI; if (indi2 != 'komp') { if (uncontrolJagoan[current] == false) { auraJagoan[current] -= auraAbility[yyindi]; actions._visible = false; actionJagoan[current] = true; if (tipeSerangan == 10) { xi = 0; while (xi <= ambilMeteor - 1) { meteor = attachMovie('meteor_mc', 'meteor_mc' + xi, dalamMeteor + xi); zj = ambilMeteorJ[xi]; zi = ambilMeteorI[xi]; ubahDalam('zj', 'zi', 'dalam'); namaBaru = 'rumput_mc' + dalam; meteor._yscale = random(50) + 75; meteor._xscale = meteor._yscale; meteor._rotation = random(360); meteor._x = _root[namaBaru]._x + 40; meteor._y = -10 - random(100); meteor.posJ = zj; meteor.posI = zi; meteor.kenaBawah = namaBaru; meteor.speed = random(21) + 5; meteor.ke = xi; meteor.onEnterFrame = enterMeteor; ++xi; } } else { xnamaChara = undefined; zobyek = undefined; xnamaChara = namaCharaJagoan[current]; k = 0; while (k <= charaMusuh - 1) { if (tujuI == posMusuhI[k] && tujuJ == posMusuhJ[k]) { zobyek = namaCharaMusuh[k]; indiDiserang = k; k = charaMusuh - 1; } ++k; } ygNyerang = xnamaChara; ygDiserang = zobyek; indiNyerang = _root[ygNyerang].ke; cekPosisi('serang'); } enabledMove(false); deleteMusuh(true); } else { actions._visible = false; actionJagoan[current] = true; xnamaChara = undefined; zobyek = undefined; xnamaChara = namaCharaJagoan[current]; k = 0; while (k <= charaJagoan - 1) { if (tujuI == posJagoanI[k] && tujuJ == posJagoanJ[k]) { zobyek = namaCharaJagoan[k]; indiDiserang = k; k = charaJagoan - 1; } ++k; } ygNyerang = xnamaChara; ygDiserang = zobyek; indiNyerang = _root[ygNyerang].ke; cekPosisi4('serang'); } } else { if (uncontrolMusuh[xcurrent] == false) { if (tipeSerangan == 10) { _root[namaCharaMusuh[xcurrent]].enabled = false; actionMusuh[xcurrent] = true; ambilMeteorJ = new Array(); ambilMeteorI = new Array(); ambilMeteor = 0; kata = new String(this); ztujuJ = Number(kata.substr(kata.length - 4, 2)); ztujuI = Number(kata.substr(kata.length - 2, 2)); zrange = 1; i = ztujuI - zrange; while (i <= ztujuI + zrange) { j = ztujuJ - zrange; while (j <= ztujuJ + zrange) { ubahDalam('j', 'i', 'dalam'); namaBaru = 'rumput_mc' + dalam; if (_root[namaBaru]._currentframe == 2) { myColor = new Color(_root[namaBaru].warna_mc); myColor.setRGB('0x6C0202'); ambilMeteorJ[ambilMeteor] = j; ambilMeteorI[ambilMeteor] = i; ++ambilMeteor; } ++j; } ++i; } xi = 0; while (xi <= ambilMeteor - 1) { meteor = attachMovie('meteor_mc', 'meteor_mc' + xi, dalamMeteor + xi); zj = ambilMeteorJ[xi]; zi = ambilMeteorI[xi]; ubahDalam('zj', 'zi', 'dalam'); namaBaru = 'rumput_mc' + dalam; meteor._yscale = random(50) + 75; meteor._xscale = meteor._yscale; meteor._rotation = random(360); meteor._x = _root[namaBaru]._x + 40; meteor._y = -10 - random(100); meteor.posJ = zj; meteor.posI = zi; meteor.kenaBawah = namaBaru; meteor.speed = random(21) + 5; meteor.ke = xi; meteor.onEnterFrame = enterMeteor2; ++xi; } } else { current = indi3; actionMusuh[indi3] = true; xnamaChara = undefined; zobyek = undefined; xnamaChara = namaCharaMusuh[indi3]; k = 0; while (k <= charaJagoan - 1) { if (tujuI == posJagoanI[k] && tujuJ == posJagoanJ[k]) { zobyek = namaCharaJagoan[k]; } ++k; } ygNyerang = xnamaChara; ygDiserang = zobyek; cekPosisi2('serang'); } } else { current = indi3; actionMusuh[indi3] = true; xnamaChara = undefined; zobyek = undefined; xnamaChara = namaCharaMusuh[indi3]; k = 0; while (k <= charaMusuh - 1) { if (tujuI == posMusuhI[k] && tujuJ == posMusuhJ[k]) { zobyek = namaCharaMusuh[k]; } ++k; } ygNyerang = xnamaChara; ygDiserang = zobyek; cekPosisi3('serang'); } } } function deleteMusuh(indi) { msgBox2._visible = false; k = 0; while (k <= charaMusuh - 1) { xobyek = namaCharaMusuh[k]; if (indi == true) { delete _root[xobyek].klik_mc.onRelease; delete _root[xobyek].klik_mc.onRollOver; delete _root[xobyek].klik_mc.onRollOut; delete _root[xobyek].klik_mc.onReleaseOutside; } else { if (indi == false) { _root[xobyek].klik_mc.onRollOver = overChara; _root[xobyek].klik_mc.onRollOut = outChara; _root[xobyek].klik_mc.onReleaseOutside = outChara; _root[xobyek].klik_mc.onRelease = klikChara2; } } ++k; } } function deleteMusuh2(indi) { msgBox2._visible = false; k = 0; while (k <= charaMusuh - 1) { xobyek = namaCharaMusuh[k]; xobyek.enabled = indi; ++k; } } function overKotak() { over(); myColor = new Color(this.warna_mc); myColor.setRGB('0x01016D'); } function outKotak() { myColor = new Color(this.warna_mc); myColor.setRGB('0x9293FE'); } function overKotak2(indi) { over(); if (indi != undefined) { this = indi; } ambilMeteorJ = new Array(); ambilMeteorI = new Array(); ambilMeteor = 0; if (tipeSerangan == 10) { kata = new String(this); ztujuJ = Number(kata.substr(kata.length - 4, 2)); ztujuI = Number(kata.substr(kata.length - 2, 2)); zrange = 1; i = ztujuI - zrange; while (i <= ztujuI + zrange) { j = ztujuJ - zrange; while (j <= ztujuJ + zrange) { ubahDalam('j', 'i', 'dalam'); namaBaru = 'rumput_mc' + dalam; myColor2 = new Color(_root[namaBaru].warna_mc); if (_root[namaBaru]._currentframe == 2) { if (myColor2.getRGB() == '0xFEABAB') { myColor = new Color(_root[namaBaru].warna_mc); myColor.setRGB('0x6C0202'); ambilMeteorJ[ambilMeteor] = j; ambilMeteorI[ambilMeteor] = i; ++ambilMeteor; } } ++j; } ++i; } } else { myColor = new Color(this.warna_mc); myColor.setRGB('0x6C0202'); } } function outKotak2(indi) { if (indi != undefined) { this = indi; } if (tipeSerangan == 10) { kata = new String(this); ztujuJ = Number(kata.substr(kata.length - 4, 2)); ztujuI = Number(kata.substr(kata.length - 2, 2)); zrange = 1; i = ztujuI - zrange; while (i <= ztujuI + zrange) { j = ztujuJ - zrange; while (j <= ztujuJ + zrange) { ubahDalam('j', 'i', 'dalam'); namaBaru = 'rumput_mc' + dalam; myColor2 = new Color(_root[namaBaru].warna_mc); if (myColor2.getRGB() == '0x6C0202') { myColor = new Color(_root[namaBaru].warna_mc); myColor.setRGB('0xFEABAB'); } ++j; } ++i; } } else { myColor = new Color(this.warna_mc); myColor.setRGB('0xFEABAB'); } } function xresetMove() { i = 0; while (i <= panjang) { j = 0; while (j <= lebar) { ubahDalam('j', 'i', 'dalam'); namaBaru = 'rumput_mc' + dalam; _root[namaBaru].gotoAndStop(1); ++j; } ++i; } } function enabledMove(indi) { i = 0; while (i <= panjang) { j = 0; while (j <= lebar) { ubahDalam('j', 'i', 'dalam'); namaBaru = 'rumput_mc' + dalam; _root[namaBaru].enabled = indi; ++j; } ++i; } } function deleteMove() { i = 0; while (i <= panjang) { j = 0; while (j <= lebar) { ubahDalam('j', 'i', 'dalam'); namaBaru = 'rumput_mc' + dalam; delete _root[namaBaru].onRelease; delete _root[namaBaru].onRollOver; delete _root[namaBaru].onRollOut; delete _root[namaBaru].onReleaseOutside; ++j; } ++i; } } function enterMsgBox() { if (adaJedaMsgBox2 == true) { ++jedaMsgBox2; if (jedaMsgBox2 >= 10) { this._visible = true; if (this._alpha <= 100) { this._alpha += 30; } } } else { this._visible = false; } if (_root._xmouse > 400) { this._x = _root._xmouse - 200; this._y = _root._ymouse; } else { this._x = _root._xmouse + 50; this._y = _root._ymouse; } } function buatKotak() { wwjurang = new Array(); i = 0; while (i <= panjang) { wwjurang[i] = new Array(); j = 0; while (j <= lebar) { wwjurang[j][i] = 0; ++j; } ++i; } kk = 0; while (kk <= panjang * 2) { j = 0; i = kk; while (i >= 0) { ubahDalam('j', 'i', 'dalam'); namaBaru = 'rumput_mc' + dalam; namaBaru2 = 'obyek_mc' + dalam; if (mapping[j][i] != undefined) { if (mapping[j][i] == -1) { rumput = attachMovie('air_mc', namaBaru, dalam1); mapping[j][i] = 1; } else { if (mapping[j][i] == -4) { rumput = attachMovie('rumput_mc', namaBaru, dalam1); mapping[j][i] = 1; } else { if (mapping[j][i] == -5) { rumput = attachMovie('jalan_mc', namaBaru, dalam1); mapping[j][i] = 1; } else { if (mapping[j][i] == -8) { rumput = attachMovie('jalan_mc', namaBaru, dalam1); rumput._visible = false; mapping[j][i] = 0; wwjurang[j][i] = 1; } else { if (mapping[j][i] == 8) { rumput = attachMovie('jalan2_mc', namaBaru, dalam1); mapping[j][i] = 1; } else { if (mapKe == 1 || mapKe == 2 && jenisMaen == 'training') { if (mapping[j][i] == 2 || mapping[j][i] == 3 || mapping[j][i] == 5) { rumput = attachMovie('jalan_mc', namaBaru, dalam1); } else { if (mapping[j][i] == -3) { rumput = attachMovie('rumput_mc', namaBaru, dalam1); } else { rumput = attachMovie('rumput_mc2', namaBaru, dalam1); } } } else { if (mapKe == 4 && jenisMaen != 'training') { if (mapping[j][i] == 2 || mapping[j][i] == 3) { rumput = attachMovie('jalan2_mc', namaBaru, dalam1); } else { rumput = attachMovie('rumput_mc3', namaBaru, dalam1); } } else { if (mapKe == 5) { if (jenisMaen == 'training') { if (mapping[j][i] == 2 || mapping[j][i] == 3 || mapping[j][i] == 16) { rumput = attachMovie('jalan2_mc', namaBaru, dalam1); } else { rumput = attachMovie('rumput_mc3', namaBaru, dalam1); } } else { rumput = attachMovie('rumput_mc3', namaBaru, dalam1); } } else { if (mapKe >= 7) { rumput = attachMovie('rumput_mc3', namaBaru, dalam1); } else { rumput = attachMovie('rumput_mc2', namaBaru, dalam1); } } } } } } } } } if (i == 0 && j == panjang) { batasKanan = 'rumput_mc' + dalam; } else { if (i == panjang && j == 0) { batasKiri = 'rumput_mc' + dalam; } else { if (i == 0 && j == 0) { batasBawah = 'rumput_mc' + dalam; } else { if (i == panjang && j == panjang) { batasAtas = 'rumput_mc' + dalam; } } } } posX = i * bKotak; posY = j * bKotak; rumput._x = posAwalX + (posX - posY); rumput._y = posAwalY + (posX + posY) / 2; rumput._xscale = scalaKotak; rumput._yscale = scalaKotak; cekObyek(j, i, dalam2); dalam1 += 2; dalam2 += 2; } ++j; --i; } ++kk; } charaJagoan = diriJagoan.length; charaMusuh = diriMusuh.length; } function cekObyek(indiJ, indiI, dalam2) { if (mapping[indiJ][indiI] == 2) { charaJagoan = 0; obyek = attachMovie('david_mc', namaBaru2, dalam2); obyek.jenis = 'jagoan'; obyek.zjenis = 1; obyek.yspeedChara = 5; cekAbility(charaJagoan); obyek.speedChara = speedJagoan[charaJagoan]; poisonJagoan[charaJagoan] = false; stunJagoan[charaJagoan] = false; uncontrolJagoan[charaJagoan] = false; slowJagoan[charaJagoan] = false; poisonKeJagoan[charaJagoan] = 3; uncontrolKeJagoan[charaJagoan] = 3; stunKeJagoan[charaJagoan] = 3; slowKeJagoan[charaJagoan] = 3; attackDefenseIncJagoan[charaJagoan] = 1; initObyek(indiJ, indiI); } else { if (mapping[indiJ][indiI] == 3) { obyek = attachMovie('faith_mc', namaBaru2, dalam2); if (jenisMaen == 'training') { charaMusuh = 0; obyek.jenis = 'musuh'; obyek.zjenis = 2; obyek.speedChara = 4; obyek.yspeedChara = 5; tipeAI[charaMusuh] = 1; namaMusuh[charaMusuh] = 'Faith Hanger'; xincLive[charaMusuh] = 3.5; xincAttack[charaMusuh] = 3; xincDefense[charaMusuh] = 3.5; xincAura[charaMusuh] = 1.5; rangeMusuh[charaMusuh] = 4; xrangeMusuh[charaMusuh] = 4; serangMusuh[charaMusuh] = 1; accuracyMusuh[charaMusuh] = 95; elementMusuh[charaMusuh] = 3; jenisMusuh[charaMusuh] = 2; speedMusuh[charaMusuh] = obyek.speedChara; musuhWeapon[charaMusuh] = 'White Knife'; xmusuhWeapon[charaMusuh] = 2; xjenisRace[charaMusuh] = 0; poisonMusuh[charaMusuh] = false; stunMusuh[charaMusuh] = false; uncontrolMusuh[charaMusuh] = false; slowMusuh[charaMusuh] = false; poisonKeMusuh[charaMusuh] = 3; uncontrolKeMusuh[charaMusuh] = 3; stunKeMusuh[charaMusuh] = 3; slowKeMusuh[charaMusuh] = 3; attackDefenseIncMusuh[charaMusuh] = 1; } else { charaJagoan = 1; obyek.jenis = 'jagoan'; obyek.zjenis = 2; obyek.speedChara = 4; obyek.yspeedChara = 5; cekAbility(charaJagoan); obyek.speedChara = speedJagoan[charaJagoan]; poisonJagoan[charaJagoan] = false; stunJagoan[charaJagoan] = false; uncontrolJagoan[charaJagoan] = false; slowJagoan[charaJagoan] = false; poisonKeJagoan[charaJagoan] = 3; uncontrolKeJagoan[charaJagoan] = 3; stunKeJagoan[charaJagoan] = 3; slowKeJagoan[charaJagoan] = 3; attackDefenseIncJagoan[charaJagoan] = 1; } initObyek(indiJ, indiI); } else { if (mapping[indiJ][indiI] == 4) { dalamMusuh[charaMusuh] = dalam2; wwjenisMusuh[charaMusuh] = mapping[indiJ][indiI]; posMunculBaruI[charaMusuh] = indiI; posMunculBaruJ[charaMusuh] = indiJ; ++posMunculBaru; obyek = attachMovie('odarat_mc', namaBaru2, dalam2); obyek.jenis = 'musuh'; obyek.zjenis = 3; obyek.speedChara = 2.5; obyek.yspeedChara = 5; tipeAI[charaMusuh] = 1; namaMusuh[charaMusuh] = 'Ground Ogre'; xincLive[charaMusuh] = 1.5; xincAttack[charaMusuh] = 2; xincDefense[charaMusuh] = 2; xincAura[charaMusuh] = 1.5; rangeMusuh[charaMusuh] = 4; xrangeMusuh[charaMusuh] = 4; serangMusuh[charaMusuh] = 1; accuracyMusuh[charaMusuh] = 75; elementMusuh[charaMusuh] = 3; jenisMusuh[charaMusuh] = 3; speedMusuh[charaMusuh] = obyek.speedChara; musuhWeapon[charaMusuh] = 'Big Cudgel'; xmusuhWeapon[charaMusuh] = 8; xjenisRace[charaMusuh] = 4; poisonMusuh[charaMusuh] = false; stunMusuh[charaMusuh] = false; uncontrolMusuh[charaMusuh] = false; slowMusuh[charaMusuh] = false; poisonKeMusuh[charaMusuh] = 3; uncontrolKeMusuh[charaMusuh] = 3; stunKeMusuh[charaMusuh] = 3; slowKeMusuh[charaMusuh] = 3; attackDefenseIncMusuh[charaMusuh] = 1; initObyek(indiJ, indiI); } else { if (mapping[indiJ][indiI] == 5) { dalamMusuh[charaMusuh] = dalam2; wwjenisMusuh[charaMusuh] = mapping[indiJ][indiI]; posMunculBaruI[charaMusuh] = indiI; posMunculBaruJ[charaMusuh] = indiJ; ++posMunculBaru; obyek = attachMovie('osihir_mc', namaBaru2, dalam2); obyek.jenis = 'musuh'; obyek.zjenis = 4; obyek.speedChara = 2; obyek.yspeedChara = 5; tipeAI[charaMusuh] = 2; namaMusuh[charaMusuh] = 'Witch Ogre'; xincLive[charaMusuh] = 1.5; xincAttack[charaMusuh] = 1.75; xincDefense[charaMusuh] = 1.5; xincAura[charaMusuh] = 2; rangeMusuh[charaMusuh] = 3; xrangeMusuh[charaMusuh] = 3; serangMusuh[charaMusuh] = 4; accuracyMusuh[charaMusuh] = 70; elementMusuh[charaMusuh] = 1; jenisMusuh[charaMusuh] = 4; speedMusuh[charaMusuh] = obyek.speedChara; musuhWeapon[charaMusuh] = 'Magic Stick'; xmusuhWeapon[charaMusuh] = 9; xjenisRace[charaMusuh] = 4; poisonMusuh[charaMusuh] = false; stunMusuh[charaMusuh] = false; uncontrolMusuh[charaMusuh] = false; slowMusuh[charaMusuh] = false; poisonKeMusuh[charaMusuh] = 3; uncontrolKeMusuh[charaMusuh] = 3; stunKeMusuh[charaMusuh] = 3; slowKeMusuh[charaMusuh] = 3; attackDefenseIncMusuh[charaMusuh] = 1; initObyek(indiJ, indiI); } else { if (mapping[indiJ][indiI] == 6) { obyek = attachMovie('odarat_mc', namaBaru2, dalam2); obyek.jenis = 'musuh'; obyek.speedChara = 3; obyek.yspeedChara = 5; tipeAI[charaMusuh] = 1; namaMusuh[charaMusuh] = 'Jombler'; rankMusuh[charaMusuh] = 'Ground Ogre Commander'; obyek.zjenis = 5; xincLive[charaMusuh] = 2; xincAttack[charaMusuh] = 2.5; xincDefense[charaMusuh] = 2.5; xincAura[charaMusuh] = 2; rangeMusuh[charaMusuh] = 5; xrangeMusuh[charaMusuh] = 5; serangMusuh[charaMusuh] = 2; accuracyMusuh[charaMusuh] = 90; elementMusuh[charaMusuh] = 3; jenisMusuh[charaMusuh] = 5; speedMusuh[charaMusuh] = obyek.speedChara; musuhWeapon[charaMusuh] = 'Big Cudgel'; xmusuhWeapon[charaMusuh] = 8; xjenisRace[charaMusuh] = 4; poisonMusuh[charaMusuh] = false; stunMusuh[charaMusuh] = false; uncontrolMusuh[charaMusuh] = false; slowMusuh[charaMusuh] = false; poisonKeMusuh[charaMusuh] = 3; uncontrolKeMusuh[charaMusuh] = 3; stunKeMusuh[charaMusuh] = 3; slowKeMusuh[charaMusuh] = 3; attackDefenseIncMusuh[charaMusuh] = 1; initObyek(indiJ, indiI); obyek._xscale = scalaObyek + 5; obyek._yscale = scalaObyek + 5; } else { if (mapping[indiJ][indiI] == -2) { obyek = attachMovie('rumah_mc', namaBaru2, dalam2); obyek._x = rumput._x + 50; obyek._y = rumput._y - 20; mapping[indiJ][indiI] = 0; } else { if (mapping[indiJ][indiI] == -3) { rand = random(2); rand = 0; if (rand == 0) { obyek = attachMovie('pohon_mc', namaBaru2, dalam2); } else { obyek = attachMovie('pohon_mc2', namaBaru2, dalam2); } obyek._yscale = 80 + random(41); obyek._xscale = obyek._yscale; obyek._x = rumput._x + 50; obyek._y = rumput._y - 20; mapping[indiJ][indiI] = 0; } else { if (mapping[indiJ][indiI] == -6) { rand = random(2); rand = 0; if (rand == 0) { obyek = attachMovie('semak_mc', namaBaru2, dalam2); } else { obyek = attachMovie('semak_mc2', namaBaru2, dalam2); } obyek._yscale = 90 + random(21); obyek._xscale = obyek._yscale; obyek._x = rumput._x + 50; obyek._y = rumput._y - 20; mapping[indiJ][indiI] = 0; } else { if (mapping[indiJ][indiI] == -7) { obyek = attachMovie('danau_mc', namaBaru2, dalam2); obyek._x = rumput._x + 50; obyek._y = rumput._y - 20; mapping[indiJ][indiI] = 0; } else { if (mapping[indiJ][indiI] == -9) { obyek = attachMovie('arrow_mc', namaBaru2, dalam2); obyek._x = rumput._x + 50; obyek._y = rumput._y - 20; posArrowJ = indiJ; posArrowI = indiI; mapping[indiJ][indiI] = 1; } else { if (mapping[indiJ][indiI] == 7) { obyek = attachMovie('pagar_mc', namaBaru2, dalam2); obyek._x = rumput._x + 50; obyek._y = rumput._y - 20; mapping[indiJ][indiI] = 0; } else { if (mapping[indiJ][indiI] == 9) { obyek = attachMovie('pagar_mc2', namaBaru2, dalam2); obyek._x = rumput._x + 50; obyek._y = rumput._y - 20; mapping[indiJ][indiI] = 0; } else { if (mapping[indiJ][indiI] == 10) { rand = random(3); if (rand == 0) { obyek = attachMovie('kaktus_mc', namaBaru2, dalam2); } else { if (rand == 1) { obyek = attachMovie('kaktus_mc2', namaBaru2, dalam2); } else { if (rand == 2) { obyek = attachMovie('kaktus_mc3', namaBaru2, dalam2); } } } obyek._yscale = 80 + random(41); obyek._xscale = obyek._yscale; obyek._x = rumput._x + 50; obyek._y = rumput._y - 20; mapping[indiJ][indiI] = 0; } else { if (mapping[indiJ][indiI] == 11) { obyek = attachMovie('rumah_mc2', namaBaru2, dalam2); obyek._x = rumput._x + 50; obyek._y = rumput._y - 20; mapping[indiJ][indiI] = 0; } else { if (mapping[indiJ][indiI] == 12) { obyek = attachMovie('rumah_mc3', namaBaru2, dalam2); obyek._x = rumput._x + 50; obyek._y = rumput._y - 20; mapping[indiJ][indiI] = 0; } else { if (mapping[indiJ][indiI] == 13) { dalamMusuh[charaMusuh] = dalam2; wwjenisMusuh[charaMusuh] = mapping[indiJ][indiI]; posMunculBaruI[charaMusuh] = indiI; posMunculBaruJ[charaMusuh] = indiJ; ++posMunculBaru; obyek = attachMovie('api_mc', namaBaru2, dalam2); obyek.jenis = 'musuh'; obyek.ajenis = 'api'; obyek.zjenis = 6; obyek.speedChara = 3; obyek.yspeedChara = 5; tipeAI[charaMusuh] = 1; namaMusuh[charaMusuh] = 'Fire Live'; xincLive[charaMusuh] = 4; xincAttack[charaMusuh] = 0; xincDefense[charaMusuh] = 3; if (mapKe == 17) { xincAura[charaMusuh] = 10; rangeMusuh[charaMusuh] = 1; xrangeMusuh[charaMusuh] = 1; serangMusuh[charaMusuh] = 4; } else { xincAura[charaMusuh] = 0; rangeMusuh[charaMusuh] = 0; xrangeMusuh[charaMusuh] = 0; serangMusuh[charaMusuh] = 0; } accuracyMusuh[charaMusuh] = 0; elementMusuh[charaMusuh] = 1; jenisMusuh[charaMusuh] = 6; speedMusuh[charaMusuh] = obyek.speedChara; musuhWeapon[charaMusuh] = 'Empty'; xjenisRace[charaMusuh] = 4; poisonMusuh[charaMusuh] = false; stunMusuh[charaMusuh] = false; uncontrolMusuh[charaMusuh] = false; slowMusuh[charaMusuh] = false; poisonKeMusuh[charaMusuh] = 3; uncontrolKeMusuh[charaMusuh] = 3; stunKeMusuh[charaMusuh] = 3; slowKeMusuh[charaMusuh] = 3; attackDefenseIncMusuh[charaMusuh] = 1; initObyek(indiJ, indiI); } else { if (mapping[indiJ][indiI] == 14) { rand = random(5); if (rand == 0) { obyek = attachMovie('batu_mc', namaBaru2, dalam2); } else { if (rand == 1) { obyek = attachMovie('batu_mc2', namaBaru2, dalam2); } else { if (rand == 2) { obyek = attachMovie('batu_mc3', namaBaru2, dalam2); } else { if (rand == 3) { obyek = attachMovie('batu_mc4', namaBaru2, dalam2); } else { if (rand == 4) { obyek = attachMovie('batu_mc5', namaBaru2, dalam2); } } } } } obyek._yscale = 50 + random(11); obyek._xscale = obyek._yscale; obyek._x = rumput._x + 50; obyek._y = rumput._y - 20; mapping[indiJ][indiI] = 0; } else { if (mapping[indiJ][indiI] == 15) { charaJagoan = 3; obyek = attachMovie('devy_mc', namaBaru2, dalam2); if (mapKe == 8) { jagoanType[charaJagoan] = 'musuh'; } obyek.jenis = 'jagoan'; obyek.zjenis = 8; obyek.yspeedChara = 6; cekAbility(charaJagoan); obyek.speedChara = speedJagoan[charaJagoan]; poisonJagoan[charaJagoan] = false; stunJagoan[charaJagoan] = false; uncontrolJagoan[charaJagoan] = false; slowJagoan[charaJagoan] = false; poisonKeJagoan[charaJagoan] = 3; uncontrolKeJagoan[charaJagoan] = 3; stunKeJagoan[charaJagoan] = 3; slowKeJagoan[charaJagoan] = 3; attackDefenseIncJagoan[charaJagoan] = 1; initObyek(indiJ, indiI); } else { if (mapping[indiJ][indiI] == 16) { obyek = attachMovie('brunhill_mc', namaBaru2, dalam2); if (jenisMaen == 'training') { charaMusuh = 1; obyek.jenis = 'musuh'; obyek.zjenis = 7; obyek.speedChara = 4; obyek.yspeedChara = 5; tipeAI[charaMusuh] = 1; namaMusuh[charaMusuh] = 'Brunhill'; xincLive[charaMusuh] = 3; xincAttack[charaMusuh] = 2.5; xincDefense[charaMusuh] = 2.5; xincAura[charaMusuh] = 1.5; rangeMusuh[charaMusuh] = 4; xrangeMusuh[charaMusuh] = 4; serangMusuh[charaMusuh] = 1; accuracyMusuh[charaMusuh] = 80; elementMusuh[charaMusuh] = 3; jenisMusuh[charaMusuh] = 7; speedMusuh[charaMusuh] = obyek.speedChara; musuhWeapon[charaMusuh] = 'Soldier Sword'; xmusuhWeapon[charaMusuh] = 3; xjenisRace[charaMusuh] = 0; poisonMusuh[charaMusuh] = false; stunMusuh[charaMusuh] = false; uncontrolMusuh[charaMusuh] = false; slowMusuh[charaMusuh] = false; poisonKeMusuh[charaMusuh] = 3; uncontrolKeMusuh[charaMusuh] = 3; stunKeMusuh[charaMusuh] = 3; slowKeMusuh[charaMusuh] = 3; attackDefenseIncMusuh[charaMusuh] = 1; } else { charaJagoan = 2; obyek.jenis = 'jagoan'; obyek.zjenis = 7; obyek.yspeedChara = 6; cekAbility(charaJagoan); obyek.speedChara = speedJagoan[charaJagoan]; poisonJagoan[charaJagoan] = false; stunJagoan[charaJagoan] = false; uncontrolJagoan[charaJagoan] = false; slowJagoan[charaJagoan] = false; poisonKeJagoan[charaJagoan] = 3; uncontrolKeJagoan[charaJagoan] = 3; stunKeJagoan[charaJagoan] = 3; slowKeJagoan[charaJagoan] = 3; attackDefenseIncJagoan[charaJagoan] = 1; } initObyek(indiJ, indiI); } else { if (mapping[indiJ][indiI] == 17) { dalamMusuh[charaMusuh] = dalam2; wwjenisMusuh[charaMusuh] = mapping[indiJ][indiI]; posMunculBaruI[charaMusuh] = indiI; posMunculBaruJ[charaMusuh] = indiJ; ++posMunculBaru; obyek = attachMovie('detro_mc', namaBaru2, dalam2); obyek.jenis = 'musuh'; obyek.zjenis = 9; obyek.speedChara = 4; obyek.yspeedChara = 5; tipeAI[charaMusuh] = 1; namaMusuh[charaMusuh] = 'Detro Stone'; xincLive[charaMusuh] = 5; xincAttack[charaMusuh] = 5; xincDefense[charaMusuh] = 4; xincAura[charaMusuh] = 3; rangeMusuh[charaMusuh] = 5; xrangeMusuh[charaMusuh] = 5; serangMusuh[charaMusuh] = 1; accuracyMusuh[charaMusuh] = 95; elementMusuh[charaMusuh] = 3; jenisMusuh[charaMusuh] = 9; speedMusuh[charaMusuh] = obyek.speedChara; musuhWeapon[charaMusuh] = 'Giant Dagger'; xmusuhWeapon[charaMusuh] = 10; xjenisRace[charaMusuh] = 4; poisonMusuh[charaMusuh] = false; stunMusuh[charaMusuh] = false; uncontrolMusuh[charaMusuh] = false; slowMusuh[charaMusuh] = false; poisonKeMusuh[charaMusuh] = 3; uncontrolKeMusuh[charaMusuh] = 3; stunKeMusuh[charaMusuh] = 3; slowKeMusuh[charaMusuh] = 3; attackDefenseIncMusuh[charaMusuh] = 1; initObyek(indiJ, indiI); obyek._xscale = scalaObyek + 1.5; obyek._yscale = scalaObyek + 1.5; } else { if (mapping[indiJ][indiI] == 18) { if (mapKe >= 12) { obyek = attachMovie('guild_mc', namaBaru2, dalam2); charaJagoan = 4; obyek.jenis = 'jagoan'; obyek.zjenis = 10; obyek.yspeedChara = 5; cekAbility(charaJagoan); obyek.speedChara = speedJagoan[charaJagoan]; poisonJagoan[charaJagoan] = false; stunJagoan[charaJagoan] = false; uncontrolJagoan[charaJagoan] = false; slowJagoan[charaJagoan] = false; poisonKeJagoan[charaJagoan] = 3; uncontrolKeJagoan[charaJagoan] = 3; stunKeJagoan[charaJagoan] = 3; slowKeJagoan[charaJagoan] = 3; attackDefenseIncJagoan[charaJagoan] = 1; initObyek(indiJ, indiI); } else { dalamMusuh[charaMusuh] = dalam2; wwjenisMusuh[charaMusuh] = mapping[indiJ][indiI]; posMunculBaruI[charaMusuh] = indiI; posMunculBaruJ[charaMusuh] = indiJ; ++posMunculBaru; obyek = attachMovie('guild_mc', namaBaru2, dalam2); obyek.jenis = 'musuh'; obyek.zjenis = 10; obyek.speedChara = 7; obyek.yspeedChara = 5; tipeAI[charaMusuh] = 2; namaMusuh[charaMusuh] = 'Guild Made'; xincLive[charaMusuh] = 4.5; xincAttack[charaMusuh] = 4.5; xincDefense[charaMusuh] = 5; xincAura[charaMusuh] = 4.5; rangeMusuh[charaMusuh] = 6; xrangeMusuh[charaMusuh] = 6; serangMusuh[charaMusuh] = 3; accuracyMusuh[charaMusuh] = 99; elementMusuh[charaMusuh] = 3; jenisMusuh[charaMusuh] = 10; speedMusuh[charaMusuh] = obyek.speedChara; musuhWeapon[charaMusuh] = 'Elite Whip Chain'; xmusuhWeapon[charaMusuh] = 11; xjenisRace[charaMusuh] = 5; poisonMusuh[charaMusuh] = false; stunMusuh[charaMusuh] = false; uncontrolMusuh[charaMusuh] = false; slowMusuh[charaMusuh] = false; poisonKeMusuh[charaMusuh] = 3; uncontrolKeMusuh[charaMusuh] = 3; stunKeMusuh[charaMusuh] = 3; slowKeMusuh[charaMusuh] = 3; attackDefenseIncMusuh[charaMusuh] = 1; initObyek(indiJ, indiI); } } else { if (mapping[indiJ][indiI] == 19) { obyek = attachMovie('pagar_mc3', namaBaru2, dalam2); obyek._x = rumput._x + 50; obyek._y = rumput._y - 20; mapping[indiJ][indiI] = 0; } else { if (mapping[indiJ][indiI] == 20) { obyek = attachMovie('devy_diem', namaBaru2, dalam2); obyek._x = rumput._x + 50; obyek._y = rumput._y - 20; obyek._xscale = scalaObyek; obyek._yscale = scalaObyek; mapping[indiJ][indiI] = 0; } else { if (mapping[indiJ][indiI] == 21) { obyek = attachMovie('faith_diem', namaBaru2, dalam2); obyek._x = rumput._x + 50; obyek._y = rumput._y - 20; obyek._xscale = scalaObyek; obyek._yscale = scalaObyek; mapping[indiJ][indiI] = 0; } else { if (mapping[indiJ][indiI] == 22) { obyek = attachMovie('panther_diem', namaBaru2, dalam2); obyek._x = rumput._x + 50; obyek._y = rumput._y - 20; obyek._xscale = scalaObyek; obyek._yscale = scalaObyek; mapping[indiJ][indiI] = 0; } else { if (mapping[indiJ][indiI] == 23) { obyek = attachMovie('white_diem', namaBaru2, dalam2); obyek._x = rumput._x + 50; obyek._y = rumput._y - 20; obyek._xscale = scalaObyek; obyek._yscale = scalaObyek; mapping[indiJ][indiI] = 0; } else { if (mapping[indiJ][indiI] == 24) { obyek = attachMovie('hawk_diem', namaBaru2, dalam2); obyek._x = rumput._x + 50; obyek._y = rumput._y - 20; obyek._xscale = scalaObyek; obyek._yscale = scalaObyek; mapping[indiJ][indiI] = 0; } else { if (mapping[indiJ][indiI] == 25) { obyek = attachMovie('pagar_mc4', namaBaru2, dalam2); obyek._x = rumput._x + 50; obyek._y = rumput._y - 20; mapping[indiJ][indiI] = 0; } else { if (mapping[indiJ][indiI] == 26) { obyek = attachMovie('pohon_mc3', namaBaru2, dalam2); obyek._x = rumput._x + 50; obyek._y = rumput._y - 20; mapping[indiJ][indiI] = 0; } else { if (mapping[indiJ][indiI] == 27) { obyek = attachMovie('semak_mc3', namaBaru2, dalam2); obyek._x = rumput._x + 50; obyek._y = rumput._y - 20; mapping[indiJ][indiI] = 0; } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } function cekObyek2(xj, xi, dalam2, zcharaMusuh2) { indiJ = xj; indiI = xi; zcharaMusuh = zcharaMusuh2; ubahDalam('indiJ', 'indiI', 'dalam'); namaBaru = 'rumput_mc' + dalam; namaBaru2 = 'obyek_mc' + dalam; if (mapping[indiJ][indiI] == 4) { dalamMusuh[zcharaMusuh] = dalam2; wwjenisMusuh[zcharaMusuh] = mapping[indiJ][indiI]; posMunculBaruI[zcharaMusuh] = indiI; posMunculBaruJ[zcharaMusuh] = indiJ; ++posMunculBaru; obyek = attachMovie('odarat_mc', namaBaru2, dalam2); obyek.jenis = 'musuh'; obyek.speedChara = 2.5; obyek.yspeedChara = 5; obyek.zjenis = 3; namaMusuh[zcharaMusuh] = 'Ground Ogre'; xincLive[zcharaMusuh] = 1.5; xincAttack[zcharaMusuh] = 2; xincDefense[zcharaMusuh] = 2; xincAura[zcharaMusuh] = 1.5; rangeMusuh[zcharaMusuh] = 4; xrangeMusuh[zcharaMusuh] = 4; serangMusuh[zcharaMusuh] = 1; accuracyMusuh[zcharaMusuh] = 75; elementMusuh[zcharaMusuh] = 3; jenisMusuh[zcharaMusuh] = 3; speedMusuh[zcharaMusuh] = obyek.speedChara; musuhWeapon[zcharaMusuh] = 'Big Cudgel'; xjenisRace[zcharaMusuh] = 4; poisonMusuh[zcharaMusuh] = false; stunMusuh[zcharaMusuh] = false; uncontrolMusuh[zcharaMusuh] = false; slowMusuh[zcharaMusuh] = false; poisonKeMusuh[zcharaMusuh] = 3; uncontrolKeMusuh[zcharaMusuh] = 3; stunKeMusuh[zcharaMusuh] = 3; slowKeMusuh[zcharaMusuh] = 3; attackDefenseIncMusuh[zcharaMusuh] = 1; initObyek2(indiJ, indiI); } else { if (mapping[indiJ][indiI] == 5) { dalamMusuh[zcharaMusuh] = dalam2; wwjenisMusuh[zcharaMusuh] = mapping[indiJ][indiI]; posMunculBaruI[zcharaMusuh] = indiI; posMunculBaruJ[zcharaMusuh] = indiJ; ++posMunculBaru; obyek = attachMovie('osihir_mc', namaBaru2, dalam2); obyek.jenis = 'musuh'; obyek.speedChara = 2; obyek.yspeedChara = 5; obyek.zjenis = 4; namaMusuh[zcharaMusuh] = 'Witch Ogre'; xincLive[zcharaMusuh] = 1.5; xincAttack[zcharaMusuh] = 1.75; xincDefense[zcharaMusuh] = 1.5; xincAura[zcharaMusuh] = 2; rangeMusuh[zcharaMusuh] = 3; xrangeMusuh[zcharaMusuh] = 3; serangMusuh[zcharaMusuh] = 4; accuracyMusuh[zcharaMusuh] = 70; elementMusuh[zcharaMusuh] = 1; jenisMusuh[zcharaMusuh] = 4; speedMusuh[zcharaMusuh] = obyek.speedChara; musuhWeapon[zcharaMusuh] = 'Magic Stick'; xjenisRace[zcharaMusuh] = 4; poisonMusuh[zcharaMusuh] = false; stunMusuh[zcharaMusuh] = false; uncontrolMusuh[zcharaMusuh] = false; slowMusuh[zcharaMusuh] = false; poisonKeMusuh[zcharaMusuh] = 3; uncontrolKeMusuh[zcharaMusuh] = 3; stunKeMusuh[zcharaMusuh] = 3; slowKeMusuh[zcharaMusuh] = 3; attackDefenseIncMusuh[zcharaMusuh] = 1; initObyek2(indiJ, indiI); } } } function initObyek(indiJ, indiI) { obyek._x = rumput._x + 50; obyek._y = rumput._y - 20; obyek._xscale = scalaObyek; obyek._yscale = scalaObyek; if (speedGame == 'SLOW') { obyek.speedChara *= 1; } else { if (speedGame == 'NORMAL') { obyek.speedChara *= 2; } else { if (speedGame == 'FAST') { obyek.speedChara *= 4; } } } if (obyek.jenis == 'jagoan') { obyek.indi = charaJagoan; obyek.pala = obyek.zjenis; obyek.ke = charaJagoan; obyek.hidup = true; posJagoanJ[charaJagoan] = indiJ; posJagoanI[charaJagoan] = indiI; undoJagoanJ[charaJagoan] = indiJ; undoJagoanI[charaJagoan] = indiI; namaCharaJagoan[charaJagoan] = namaBaru2; obyek.gotoAndStop(diriJagoan[charaJagoan]); obyek.klik_mc.onRollOver = overChara; obyek.klik_mc.onRollOut = outChara; obyek.klik_mc.onReleaseOutside = outChara; obyek.klik_mc.onRelease = klikChara; obyek.darah_mc._visible = false; obyek.aura_mc._visible = false; undoPosJagoan[charaJagoan] = obyek._currentframe; } else { if (obyek.jenis == 'musuh') { obyek.indi = charaMusuh; obyek.pala = obyek.zjenis; obyek.ke = charaMusuh; obyek.hidup = true; posMusuhJ[charaMusuh] = indiJ; posMusuhI[charaMusuh] = indiI; namaCharaMusuh[charaMusuh] = namaBaru2; obyek.gotoAndStop(diriMusuh[charaMusuh]); if (adaApiKehidupan == true) { obyek.anim.gotoAndStop(4); } obyek.klik_mc.onRollOver = overChara; obyek.klik_mc.onRollOut = outChara; obyek.klik_mc.onReleaseOutside = outChara; obyek.klik_mc.onRelease = klikChara2; obyek.darah_mc._visible = false; obyek.aura_mc._visible = false; ++charaMusuh; } } k = 0; while (k <= diriJagoan.length) { liveJagoan[k] = Math.ceil(levelJagoan[k] * incLive[k] * 25); totLiveJagoan[k] = liveJagoan[k]; attackJagoan[k] = Math.ceil(levelJagoan[k] * incAttack[k] * 10); defenseJagoan[k] = Math.ceil(levelJagoan[k] * incDefense[k] * 5); auraJagoan[k] = Math.ceil(levelJagoan[k] * incAura[k] * 10); totAuraJagoan[k] = auraJagoan[k]; moveJagoan[k] = false; actionJagoan[k] = false; masihAktif[k] = true; maxJagoan[k] = levelJagoan[k] * 500; ++k; } k = 0; while (k <= diriMusuh.length) { liveMusuh[k] = Math.ceil(levelMusuh[k] * xincLive[k] * 25); totLiveMusuh[k] = liveMusuh[k]; attackMusuh[k] = Math.ceil(levelMusuh[k] * xincAttack[k] * 10); defenseMusuh[k] = Math.ceil(levelMusuh[k] * xincDefense[k] * 5); auraMusuh[k] = Math.ceil(levelMusuh[k] * xincAura[k] * 10); totAuraMusuh[k] = auraMusuh[k]; moveMusuh[k] = false; actionMusuh[k] = false; musuhAktif[k] = true; if (jenisMaen != 'training') { expMusuh[k] = levelMusuh[k] * 25; } maxMusuh[k] = levelMusuh[k] * 500; ++k; } mapping[indiJ][indiI] = 0; } function initObyek2(indiJ, indiI) { obyek._x = _root[namaBaru]._x + 50; obyek._y = _root[namaBaru]._y - 20; obyek._xscale = scalaObyek; obyek._yscale = scalaObyek; obyek.indi = zcharaMusuh; obyek.pala = obyek.zjenis; obyek.ke = zcharaMusuh; obyek.hidup = true; posMusuhJ[zcharaMusuh] = indiJ; posMusuhI[zcharaMusuh] = indiI; namazcharaMusuh[zcharaMusuh] = namaBaru2; obyek.gotoAndStop(diriMusuh[zcharaMusuh]); obyek.klik_mc.onRollOver = overChara; obyek.klik_mc.onRollOut = outChara; obyek.klik_mc.onReleaseOutside = outChara; obyek.klik_mc.onRelease = klikChara2; obyek.darah_mc._visible = false; obyek.aura_mc._visible = false; k = zcharaMusuh; liveMusuh[k] = Math.ceil(levelMusuh[k] * xincLive[k] * 25); totLiveMusuh[k] = liveMusuh[k]; attackMusuh[k] = Math.ceil(levelMusuh[k] * xincAttack[k] * 10); defenseMusuh[k] = Math.ceil(levelMusuh[k] * xincDefense[k] * 5); auraMusuh[k] = Math.ceil(levelMusuh[k] * xincAura[k] * 10); totAuraMusuh[k] = auraMusuh[k]; moveMusuh[k] = false; actionMusuh[k] = false; musuhAktif[k] = true; if (jenisMaen != 'training') { expMusuh[k] = levelMusuh[k] * 25; } maxMusuh[k] = levelMusuh[k] * 500; mapping[indiJ][indiI] = 0; } function klikChara() { klik(); this = this._parent; jalanKe = this.ke; if (jagoanType[jalanKe] != 'musuh') { lihatStatus = false; if (actions._x == _root[namaCharaJagoan[jalanKe]]._x && actions._y == _root[namaCharaJagoan[jalanKe]]._y) { if (bisaKlik == true) { deleteMusuh2(true); adaJedaInfo = false; adaJedaMsgBox2 = false; lihatStatus = true; xpause = true; jenisLihat = 'main'; lihatChara = 'jagoan'; indiPilih = jalanKe + 1; xstatus = attachMovie('status_mc', 'status_mc', dalamStatus); xstatus._x = 400; xstatus._y = 300; xstatus.gotoAndStop(2); } } giliranJagoan(jalanKe); if (lihatStatus == true) { bisaTombolAction(false); } } } function bisaTombolAction(indi) { actions.cancel_btn.enabled = indi; actions.wait_btn.enabled = indi; actions.move_btn.enabled = indi; actions.undo_btn.enabled = indi; if (actionJagoan[current] == false) { actions.attack_btn.enabled = indi; actions.item_btn.enabled = indi; } i = 0; while (i <= charaJagoan - 1) { if (masihAktif[i] == true) { _root[namaCharaJagoan[i]].enabled = indi; } ++i; } } function klikChara2() { klik(); this = this._parent; if (bisaKlik == true) { indiPilih = this.ke + 1; deleteMusuh2(true); bisaTombolAction(false); adaJedaInfo = false; adaJedaMsgBox2 = false; lihatStatus = true; xpause = true; jenisLihat = 'main'; lihatChara = 'musuh'; xstatus = attachMovie('status_mc', 'status_mc', dalamStatus); xstatus._x = 400; xstatus._y = 300; xstatus.gotoAndStop(2); } } function klikMusuh() { klik(); this = this._parent; delete this.onRelease; vj = posMusuhJ[this.indi]; vi = posMusuhI[this.indi]; ubahDalam('vj', 'vi', 'dalam'); namaBaru = 'rumput_mc' + dalam; klikKotak2(_root[namaBaru]); } function overChara() { over(); this = this._parent; adaJedaMsgBox2 = true; jedaMsgBox2 = 0; msgBox2._visible = false; msgBox2._alpha = 0; if (this.jenis == 'jagoan') { msgBox2.nama = namaJagoan[this.indi]; msgBox2.element = 'Element ' + element[elementJagoan[this.indi]]; msgBox2.level = 'Level ' + levelJagoan[this.indi]; msgBox2.live = 'Live ' + liveJagoan[this.indi] + '/' + totLiveJagoan[this.indi]; msgBox2.attack = 'Attack ' + attackJagoan[this.indi]; msgBox2.defense = 'Defense ' + defenseJagoan[this.indi]; msgBox2.aura = 'Aura ' + auraJagoan[this.indi] + '/' + totAuraJagoan[this.indi]; msgBox2.experiance = 'Exp ' + expJagoan[this.indi] + '/' + maxJagoan[this.indi]; msgBox2.element_mc.gotoAndStop(elementJagoan[this.indi] + 1); vj = posJagoanJ[this.ke]; vi = posJagoanI[this.ke]; obyek = msgBox2; scala1 = (liveJagoan[this.indi] / totLiveJagoan[this.indi]) * 100; scala2 = (auraJagoan[this.indi] / totAuraJagoan[this.indi]) * 100; obyek.darah_mc.zbar._xscale = scala1; obyek.aura_mc.zbar._xscale = scala2; ubahDalam('vj', 'vi', 'dalam'); namaBaru = 'rumput_mc' + dalam; overKotak3(_root[namaBaru]); msgBox2.pala_mc.gotoAndStop(_root.jenisChara[this.indi]); } else { if (this.jenis == 'musuh') { msgBox2.nama = namaMusuh[this.indi]; msgBox2.element = 'Element ' + element[elementMusuh[this.indi]]; msgBox2.level = 'Level ' + levelMusuh[this.indi]; msgBox2.live = 'Live ' + liveMusuh[this.indi] + '/' + totLiveMusuh[this.indi]; msgBox2.attack = 'Attack ' + attackMusuh[this.indi]; msgBox2.defense = 'Defense ' + defenseMusuh[this.indi]; msgBox2.aura = 'Aura ' + auraMusuh[this.indi] + '/' + totAuraMusuh[this.indi]; msgBox2.experiance = 'Exp ' + expMusuh[this.indi] + '/' + maxMusuh[this.indi]; msgBox2.element_mc.gotoAndStop(elementMusuh[this.indi] + 1); obyek = msgBox2; scala1 = (liveMusuh[this.indi] / totLiveMusuh[this.indi]) * 100; scala2 = (auraMusuh[this.indi] / totAuraMusuh[this.indi]) * 100; obyek.darah_mc.zbar._xscale = scala1; obyek.aura_mc.zbar._xscale = scala2; vj = posMusuhJ[this.indi]; vi = posMusuhI[this.indi]; ubahDalam('vj', 'vi', 'dalam'); namaBaru = 'rumput_mc' + dalam; overKotak2(_root[namaBaru]); msgBox2.pala_mc.gotoAndStop(this.zjenis); } } } function outChara() { this = this._parent; adaJedaMsgBox2 = false; jedaMsgBox2 = 0; msgBox2._visible = false; msgBox2._alpha = 0; if (this.jenis == 'musuh') { vj = posMusuhJ[this.indi]; vi = posMusuhI[this.indi]; ubahDalam('vj', 'vi', 'dalam'); namaBaru = 'rumput_mc' + dalam; outKotak2(_root[namaBaru]); } else { vj = posJagoanJ[this.ke]; vi = posJagoanI[this.ke]; ubahDalam('vj', 'vi', 'dalam'); namaBaru = 'rumput_mc' + dalam; outKotak3(_root[namaBaru]); } } function geserKotak(indi) { i = 0; while (i <= panjang) { j = 0; while (j <= lebar) { ubahDalam('j', 'i', 'dalam'); namaBaru = 'rumput_mc' + dalam; namaBaru2 = 'obyek_mc' + dalam; namaBaru3 = 'xobyek_mc' + dalam; if (indi == 'kiri') { _root[namaBaru]._x -= speedKotak; _root[namaBaru2]._x -= speedKotak; } if (indi == 'kanan') { _root[namaBaru]._x += speedKotak; _root[namaBaru2]._x += speedKotak; } if (indi == 'atas') { _root[namaBaru]._y -= speedKotak; _root[namaBaru2]._y -= speedKotak; } if (indi == 'bawah') { _root[namaBaru]._y += speedKotak; _root[namaBaru2]._y += speedKotak; } ++j; } ++i; } if (indi == 'kiri') { actions._x -= speedKotak; wi = dalamAngka1; while (wi <= dalamAngka1 + 100) { if (_root['angka_mc' + wi] != undefined) { _root['angka_mc' + wi]._x -= speedKotak; } ++wi; } wi = dalamAngka2; while (wi <= dalamAngka2 + 100) { if (_root['angka_mc2' + wi] != undefined) { _root['angka_mc2' + wi]._x -= speedKotak; } ++wi; } wi = dalamAngka3; while (wi <= dalamAngka3 + 100) { if (_root['angka_mc3' + wi] != undefined) { _root['angka_mc3' + wi]._x -= speedKotak; } ++wi; } wi = dalamAngka4; while (wi <= dalamAngka4 + 100) { if (_root['angka_mc4' + wi] != undefined) { _root['angka_mc4' + wi]._x -= speedKotak; } ++wi; } xxi = 0; while (xxi <= 16) { _root['meteor_mc' + xxi]._x -= speedKotak; ++xxi; } xxi = 0; while (xxi <= charaMusuh) { _root['all_mc' + xxi]._x -= speedKotak; ++xxi; } i = 0; while (i <= 100) { _root['kedip_mc' + i]._x -= speedKotak; ++i; } } if (indi == 'kanan') { actions._x += speedKotak; wi = dalamAngka1; while (wi <= dalamAngka1 + 100) { if (_root['angka_mc' + wi] != undefined) { _root['angka_mc' + wi]._x += speedKotak; } ++wi; } wi = dalamAngka2; while (wi <= dalamAngka2 + 100) { if (_root['angka_mc2' + wi] != undefined) { _root['angka_mc2' + wi]._x += speedKotak; } ++wi; } wi = dalamAngka3; while (wi <= dalamAngka3 + 100) { if (_root['angka_mc3' + wi] != undefined) { _root['angka_mc3' + wi]._x += speedKotak; } ++wi; } wi = dalamAngka4; while (wi <= dalamAngka4 + 100) { if (_root['angka_mc4' + wi] != undefined) { _root['angka_mc4' + wi]._x += speedKotak; } ++wi; } xxi = 0; while (xxi <= 16) { _root['meteor_mc' + xxi]._x += speedKotak; ++xxi; } xxi = 0; while (xxi <= charaMusuh) { _root['all_mc' + xxi]._x += speedKotak; ++xxi; } i = 0; while (i <= 100) { _root['kedip_mc' + i]._x += speedKotak; ++i; } } if (indi == 'atas') { actions._y -= speedKotak; wi = dalamAngka1; while (wi <= dalamAngka1 + 100) { if (_root['angka_mc' + wi] != undefined) { _root['angka_mc' + wi]._y -= speedKotak; } ++wi; } wi = dalamAngka2; while (wi <= dalamAngka2 + 100) { if (_root['angka_mc2' + wi] != undefined) { _root['angka_mc2' + wi]._y -= speedKotak; } ++wi; } wi = dalamAngka3; while (wi <= dalamAngka3 + 100) { if (_root['angka_mc3' + wi] != undefined) { _root['angka_mc3' + wi]._y -= speedKotak; } ++wi; } wi = dalamAngka4; while (wi <= dalamAngka4 + 100) { if (_root['angka_mc4' + wi] != undefined) { _root['angka_mc4' + wi]._y -= speedKotak; } ++wi; } xxi = 0; while (xxi <= 16) { _root['meteor_mc' + xxi]._y -= speedKotak; ++xxi; } xxi = 0; while (xxi <= charaMusuh) { _root['all_mc' + xxi]._y -= speedKotak; ++xxi; } i = 0; while (i <= 100) { _root['kedip_mc' + i]._y -= speedKotak; ++i; } } if (indi == 'bawah') { actions._y += speedKotak; wi = dalamAngka1; while (wi <= dalamAngka1 + 100) { if (_root['angka_mc' + wi] != undefined) { _root['angka_mc' + wi]._y += speedKotak; } ++wi; } wi = dalamAngka2; while (wi <= dalamAngka2 + 100) { if (_root['angka_mc2' + wi] != undefined) { _root['angka_mc2' + wi]._y += speedKotak; } ++wi; } wi = dalamAngka3; while (wi <= dalamAngka3 + 100) { if (_root['angka_mc3' + wi] != undefined) { _root['angka_mc3' + wi]._y += speedKotak; } ++wi; } wi = dalamAngka4; while (wi <= dalamAngka4 + 100) { if (_root['angka_mc4' + wi] != undefined) { _root['angka_mc4' + wi]._y += speedKotak; } ++wi; } xxi = 0; while (xxi <= 16) { _root['meteor_mc' + xxi]._y += speedKotak; ++xxi; } xxi = 0; while (xxi <= charaMusuh) { _root['all_mc' + xxi]._y += speedKotak; ++xxi; } i = 0; while (i <= 100) { _root['kedip_mc' + i]._y += speedKotak; ++i; } } } function ubahDalam(j, i, dalam) { if (_root[j] < 10 && _root[i] < 10) { _root[dalam] = '0' + String(_root[j]) + '0' + String(_root[i]); } else { if (_root[j] < 10 && _root[i] >= 10) { _root[dalam] = '0' + String(_root[j]) + String(_root[i]); } else { if (_root[j] >= 10 && _root[i] < 10) { _root[dalam] = String(_root[j]) + '0' + String(_root[i]); } else { _root[dalam] = String(_root[j]) + String(_root[i]); } } } } function xpathFinding(indi) { initFirst(indi); initMap(); initPathFinding(); pathFinding(indi); } function initFirst(indi) { xlength = 19; xwidth = 19; path = (xlength + 1) * (xwidth + 1); depth = 0; speedMove = 25; if (areamove == 'yes') { if (indi == 'komp') { xStart = posMusuhJ[xcurrent]; yStart = posMusuhI[xcurrent]; if (slowMusuh[xcurrent] == false) { xLast = xStart + xrangeMusuh[xcurrent]; yLast = yStart + xrangeMusuh[xcurrent]; } else { xLast = xStart + 1; yLast = yStart + 1; } } else { xStart = posJagoanJ[current]; yStart = posJagoanI[current]; if (slowJagoan[current] == false) { xLast = xStart + xrangeJagoan[current]; yLast = yStart + xrangeJagoan[current]; } else { xLast = xStart + 1; yLast = yStart + 1; } } } else { xStart = yyStart; yStart = xxStart; xLast = yyLast; yLast = xxLast; } } function pathFinding(indi) { currentPath = 0; xpos = 0; i = 0; while (i <= path) { a = aa; aa = 0; getValue(); ++i; } if (areamove == 'yes') { if (indi == 'komp') { i = posMusuhI[xcurrent] - xrangeMusuh[xcurrent]; while (i <= posMusuhI[xcurrent] + xrangeMusuh[xcurrent]) { j = posMusuhJ[xcurrent] - xrangeMusuh[xcurrent]; while (j <= posMusuhJ[xcurrent] + xrangeMusuh[xcurrent]) { if (posMusuhI[xcurrent] == i && posMusuhJ[xcurrent] == j) { } else { if (mapValue[j][i] <= xrangeMusuh[xcurrent]) { if (mapValue[j][i] == xrangeMusuh[xcurrent] - 1) { tujuJ = j; tujuI = i; } cekMove(j, i, 2, 'komp'); } } ++j; } ++i; } } else { i = posJagoanI[current] - xrangeJagoan[current]; while (i <= posJagoanI[current] + xrangeJagoan[current]) { j = posJagoanJ[current] - xrangeJagoan[current]; while (j <= posJagoanJ[current] + xrangeJagoan[current]) { if (posJagoanI[current] == i && posJagoanJ[current] == j) { } else { if (mapValue[j][i] <= xrangeJagoan[current]) { cekMove(j, i, 2); } } ++j; } ++i; } } } else { getPath(); runPath(indi); } } function initPathFinding() { ax = new Array(); ay = new Array(); xPath = new Array(); yPath = new Array(); i = 0; while (i < path) { ax[i] = path; ay[i] = path; xPath[i] = path; yPath[i] = path; ++i; } xx = new Array(); yy = new Array(); i = 0; while (i < path) { xx[i] = new Array(); yy[i] = new Array(); j = 0; while (j < xlength) { xx[i][j] = path; yy[i][j] = path; ++j; } ++i; } ax[0] = xStart; ay[0] = yStart; xx[0][0] = xStart; yy[0][0] = yStart; aa = 0; } function initMap() { mapValue = new Array(); i = 0; while (i <= xwidth) { mapValue[i] = new Array(); j = 0; while (j <= xlength) { mapValue[j][i] = 0; ++j; } ++i; } i = 0; while (i <= panjang) { j = 0; while (j <= panjang) { if (wwjurang[j][i] == 1) { mapping[j][i] = 0; } ++j; } ++i; } if (areamove == 'yes') { i = 0; while (i <= charaJagoan - 1) { if (_root[namaCharaJagoan[i]].hidup == true) { mapping[posJagoanJ[i]][posJagoanI[i]] = 0; } ++i; } i = 0; while (i <= charaMusuh - 1) { if (_root[namaCharaMusuh[i]].hidup == true) { mapping[posMusuhJ[i]][posMusuhI[i]] = 0; } ++i; } } i = 0; while (i <= xwidth) { j = 0; while (j <= xlength) { if (xLast == j && yLast == i) { mapValue[j][i] = path * 1; } else { mapValue[j][i] = path * mapping[j][i]; } ++j; } ++i; } } function getValue() { k = 0; while (k <= a) { ax[i] = xx[i][k]; ay[i] = yy[i][k]; if (mapValue[ax[i] - 1][ay[i] - 1] > i + 1) { getValue1(ax[i] - 1, ay[i] - 1); } if (mapValue[ax[i]][ay[i] - 1] > i + 1) { getValue1(ax[i], ay[i] - 1); } if (mapValue[ax[i] + 1][ay[i] - 1] > i + 1) { getValue1(ax[i] + 1, ay[i] - 1); } if (mapValue[ax[i] - 1][ay[i]] > i + 1) { getValue1(ax[i] - 1, ay[i]); } if (mapValue[ax[i] + 1][ay[i]] > i + 1) { getValue1(ax[i] + 1, ay[i]); } if (mapValue[ax[i] - 1][ay[i] + 1] > i + 1) { getValue1(ax[i] - 1, ay[i] + 1); } if (mapValue[ax[i]][ay[i] + 1] > i + 1) { getValue1(ax[i], ay[i] + 1); } if (mapValue[ax[i] + 1][ay[i] + 1] > i + 1) { getValue1(ax[i] + 1, ay[i] + 1); } ++k; } } function getValue1(xxx, yyy) { mapValue[xxx][yyy] = i + 1; xx[i + 1][aa] = xxx; yy[i + 1][aa] = yyy; ++aa; if (xxx == xLast & yyy == yLast) { xpos = 1; k = a; i = path; } } function getPath() { if (xpos == 1) { ii = mapValue[xLast][yLast] - 1; i = ii; while (i >= 0) { minimValue = mapValue[xLast][yLast]; ax[i] = xLast; ay[i] = yLast; xPath[i] = xLast; yPath[i] = yLast; if (mapValue[ax[i]][ay[i] + 1] < minimValue && mapValue[ax[i]][ay[i] + 1] != 0 && mapValue[ax[i]][ay[i] + 1] != undefined) { minimValue = mapValue[ax[i]][ay[i] + 1]; xLast = ax[i]; yLast = ay[i] + 1; } if (mapValue[ax[i] + 1][ay[i]] < minimValue && mapValue[ax[i] + 1][ay[i]] != 0 && mapValue[ax[i] + 1][ay[i]] != undefined) { minimValue = mapValue[ax[i] + 1][ay[i]]; xLast = ax[i] + 1; yLast = ay[i]; } if (mapValue[ax[i]][ay[i] - 1] < minimValue && mapValue[ax[i]][ay[i] - 1] != 0 && mapValue[ax[i]][ay[i] - 1] != undefined) { minimValue = mapValue[ax[i]][ay[i] - 1]; xLast = ax[i]; yLast = ay[i] - 1; } if (mapValue[ax[i] - 1][ay[i]] < minimValue && mapValue[ax[i] - 1][ay[i]] != 0 && mapValue[ax[i] - 1][ay[i]] != undefined) { minimValue = mapValue[ax[i] - 1][ay[i]]; xLast = ax[i] - 1; yLast = ay[i]; } if (mapValue[ax[i] - 1][ay[i] - 1] < minimValue && mapValue[ax[i] - 1][ay[i] - 1] != 0 && mapValue[ax[i] - 1][ay[i] - 1] != undefined) { minimValue = mapValue[ax[i] - 1][ay[i] - 1]; xLast -= 1; yLast -= 1; } if (mapValue[ax[i] + 1][ay[i] - 1] < minimValue && mapValue[ax[i] + 1][ay[i] - 1] != 0 && mapValue[ax[i] + 1][ay[i] - 1] != undefined) { minimValue = mapValue[ax[i] + 1][ay[i] - 1]; xLast = ax[i] + 1; yLast = ay[i] - 1; } if (mapValue[ax[i] - 1][ay[i] + 1] < minimValue && mapValue[ax[i] - 1][ay[i] + 1] != 0 && mapValue[ax[i] - 1][ay[i] + 1] != undefined) { minimValue = mapValue[ax[i] - 1][ay[i] + 1]; xLast = ax[i] - 1; yLast = ay[i] + 1; } if (mapValue[ax[i] + 1][ay[i] + 1] < minimValue && mapValue[ax[i] + 1][ay[i] + 1] != 0 && mapValue[ax[i] + 1][ay[i] + 1] != undefined) { minimValue = mapValue[ax[i] + 1][ay[i] + 1]; xLast = ax[i] + 1; yLast = ay[i] + 1; } --i; } } } function runPath(indi) { xcurrentPath = 0; increaseSpeed = 1; tipeAnim = 'jalan'; if (indi == 'komp') { if (xpos == 0) { delete _root[xnamaChara].onEnterFrame; lanjutKomp(); } else { current = xcurrent; xnamaChara = namaCharaMusuh[current]; cekPosisi2(); i = 0; while (i <= ii) { tj = xPath[i]; ti = yPath[i]; ubahDalam('tj', 'ti', 'dalam'); namaBaru = 'rumput_mc' + dalam; if (_root[namaBaru]._currentframe == 2 && _root[namaBaru]._visible == true) { _root[namaBaru].gotoAndStop(3); } else { ii = i - 1; mapping[xPath[ii]][yPath[ii]] = 0; } ++i; } if (jenisMaen == 'training' || mapKe == 11) { backLangkah(); } else { backJalan(); } _root[xnamaChara].onEnterFrame = enterMusuh; } } else { if (xpos == 0) { delete _root[xnamaChara].onEnterFrame; } else { xnamaChara = namaCharaJagoan[current]; cekPosisi(); i = 0; while (i <= ii) { tj = xPath[i]; ti = yPath[i]; ubahDalam('tj', 'ti', 'dalam'); namaBaru = 'rumput_mc' + dalam; if (_root[namaBaru]._currentframe == 2 && _root[namaBaru]._visible == true) { _root[namaBaru].gotoAndStop(3); } else { ii = i - 1; mapping[xPath[ii]][yPath[ii]] = 0; } ++i; } backLangkah(); _root[xnamaChara].onEnterFrame = enterChara; } } } function cekPosisi(indi) { tipeAnim = 'normal'; if (indi == 'serang') { if (tipeSerangan == 5) { increaseSpeed = 10; } else { increaseSpeed = 1; } tipeAnim = 'serang'; } if (indi == 'item') { if (xPath[xcurrentPath] == posJagoanJ[current]) { if (yPath[xcurrentPath] <= Number(posJagoanI[current] - 1)) { _root[xnamaChara].gotoAndStop(8); } else { if (yPath[xcurrentPath] >= Number(posJagoanI[current] + 1)) { _root[xnamaChara].gotoAndStop(4); } } } else { if (yPath[xcurrentPath] == posJagoanI[current]) { if (xPath[xcurrentPath] <= Number(posJagoanJ[current] - 1)) { _root[xnamaChara].gotoAndStop(2); } else { if (xPath[xcurrentPath] >= Number(posJagoanJ[current] + 1)) { _root[xnamaChara].gotoAndStop(6); } } } else { if (xPath[xcurrentPath] <= Number(posJagoanJ[current] - 1)) { if (yPath[xcurrentPath] <= Number(posJagoanI[current] - 1)) { _root[xnamaChara].gotoAndStop(1); } else { if (yPath[xcurrentPath] >= Number(posJagoanI[current] + 1)) { _root[xnamaChara].gotoAndStop(3); } } } else { if (xPath[xcurrentPath] >= Number(posJagoanJ[current] + 1)) { if (yPath[xcurrentPath] <= Number(posJagoanI[current] - 1)) { _root[xnamaChara].gotoAndStop(7); } else { if (yPath[xcurrentPath] >= Number(posJagoanI[current] + 1)) { _root[xnamaChara].gotoAndStop(5); } } } } } } if (ygNyerang != undefined && ygDiserang != undefined) { indiNyerang = _root[ygNyerang].ke; indiDiserang = _root[ygDiserang].ke; efek = _root[namaCharaJagoan[indiDiserang]].attachMovie('it' + tipeItem, 'fx_mc', dalamDarah + 10); if (tipeItem == 2 || tipeItem == 10) { efek._x = random(10) - 20; efek._y = 250; } else { efek._x = random(10) - 20; efek._y = random(10) - 20; } efek._yscale = random(350) + 700; efek._xscale = efek._yscale; if (tipeItem == 1) { backHealth(); bertambah = 'HEALTH +100'; liveJagoan[indiDiserang] += 100; if (liveJagoan[indiDiserang] >= totLiveJagoan[indiDiserang]) { liveJagoan[indiDiserang] = totLiveJagoan[indiDiserang]; } } else { if (tipeItem == 2) { backAura(); bertambah = 'AURA +50'; auraJagoan[indiDiserang] += 50; if (auraJagoan[indiDiserang] >= totAuraJagoan[indiDiserang]) { auraJagoan[indiDiserang] = totAuraJagoan[indiDiserang]; } } else { if (tipeItem == 3) { backAntidote(); bertambah = 'POISON REMOVED'; poisonKeJagoan[indiDiserang] = 3; poisonJagoan[indiDiserang] = false; removeMovieClip(_root[namaCharaJagoan[indiDiserang]].poison_mc); } else { if (tipeItem == 4) { backBreak(); bertambah = 'STUN REMOVED'; stunKeJagoan[indiDiserang] = 3; stunJagoan[indiDiserang] = false; removeMovieClip(_root[namaCharaJagoan[indiDiserang]].stun_mc); setBisa2(3, true, indiDiserang); masihAktif[indiDiserang] = true; } else { if (tipeItem == 5) { backAware(); bertambah = 'UNCONTROL REMOVED'; uncontrolKeJagoan[indiDiserang] = 3; uncontrolJagoan[indiDiserang] = false; removeMovieClip(_root[namaCharaJagoan[indiDiserang]].uncontrol_mc); } else { if (tipeItem == 6) { backFast(); bertambah = 'SLOW REMOVED'; slowKeJagoan[indiDiserang] = 3; slowJagoan[indiDiserang] = false; removeMovieClip(_root[namaCharaJagoan[indiDiserang]].slow_mc); xrangeJagoan[indiDiserang] = rangeJagoan[indiDiserang]; } else { if (tipeItem == 7) { backIce(); bertambah = 'ICE SHIELD'; attackDefenseIncJagoan[indiDiserang] *= 1.2; attackJagoan[indiDiserang] = Math.ceil(attackJagoan[indiDiserang] * attackDefenseIncJagoan[indiDiserang]); defenseJagoan[indiDiserang] = Math.ceil(defenseJagoan[indiDiserang] * attackDefenseIncJagoan[indiDiserang]); } else { if (tipeItem == 8) { backDouble(); bertambah = 'DOUBLE TURN'; moveJagoan[indiDiserang] = false; actionJagoan[indiDiserang] = false; masihAktif[indiDiserang] = true; } else { if (tipeItem == 9) { backHealth(); backHealth(); bertambah = 'HEALTH +200'; liveJagoan[indiDiserang] += 200; if (liveJagoan[indiDiserang] >= totLiveJagoan[indiDiserang]) { liveJagoan[indiDiserang] = totLiveJagoan[indiDiserang]; } } else { if (tipeItem == 10) { backAura(); backAura(); bertambah = 'AURA +100'; auraJagoan[indiDiserang] += 100; if (auraJagoan[indiDiserang] >= totAuraJagoan[indiDiserang]) { auraJagoan[indiDiserang] = totAuraJagoan[indiDiserang]; } } } } } } } } } } } --punyaItem[itemJagoan[current][zzindi]]; if (punyaItem[itemJagoan[current][zzindi]] <= 0) { punyaItem[itemJagoan[current][zzindi]] = 0; } if (jenisMaen == 'training') { --xpunyaItem[0][zzindi]; --xpunyaItem[1][zzindi]; if (xpunyaItem[0][zzindi] <= 0) { xpunyaItem[0][zzindi] = 0; } if (xpunyaItem[1][zzindi] <= 0) { xpunyaItem[1][zzindi] = 0; } } posX = _root[ygDiserang]._x; posY = _root[ygDiserang]._y; cekAngka2(posX, posY, bertambah); idDelay1 = setInterval(delay1, 1000); } else { bertambah = 'Miss'; --punyaItem[itemJagoan[current][zzindi]]; if (punyaItem[itemJagoan[current][zzindi]] <= 0) { punyaItem[itemJagoan[current][zzindi]] = 0; } if (jenisMaen == 'training') { --xpunyaItem[0][zzindi]; --xpunyaItem[1][zzindi]; if (xpunyaItem[0][zzindi] <= 0) { xpunyaItem[0][zzindi] = 0; } if (xpunyaItem[1][zzindi] <= 0) { xpunyaItem[1][zzindi] = 0; } } posX = _root[ygNyerang]._x; posY = _root[ygNyerang]._y; cekAngka2(posX, posY, bertambah); idDelay1 = setInterval(delay1, 1000); } } else { if (tipeAnim == 'serang') { if (xPath[xcurrentPath] == posJagoanJ[current]) { if (yPath[xcurrentPath] <= Number(posJagoanI[current] - 1)) { currentPath = 0; xPath = new Array(); yPath = new Array(); xPath[currentPath] = posMusuhJ[_root[ygDiserang].ke]; yPath[currentPath] = posMusuhI[_root[ygDiserang].ke] - 1; _root[xnamaChara].gotoAndStop(8); } else { if (yPath[xcurrentPath] >= Number(posJagoanI[current] + 1)) { currentPath = 0; xPath = new Array(); yPath = new Array(); xPath[currentPath] = posMusuhJ[_root[ygDiserang].ke]; yPath[currentPath] = posMusuhI[_root[ygDiserang].ke] + 1; _root[xnamaChara].gotoAndStop(4); } } } else { if (yPath[xcurrentPath] == posJagoanI[current]) { if (xPath[xcurrentPath] <= Number(posJagoanJ[current] - 1)) { currentPath = 0; xPath = new Array(); yPath = new Array(); xPath[currentPath] = posMusuhJ[_root[ygDiserang].ke] - 1; yPath[currentPath] = posMusuhI[_root[ygDiserang].ke]; _root[xnamaChara].gotoAndStop(2); } else { if (xPath[xcurrentPath] >= Number(posJagoanJ[current] + 1)) { currentPath = 0; xPath = new Array(); yPath = new Array(); xPath[currentPath] = posMusuhJ[_root[ygDiserang].ke] + 1; yPath[currentPath] = posMusuhI[_root[ygDiserang].ke]; _root[xnamaChara].gotoAndStop(6); } } } else { if (xPath[xcurrentPath] <= Number(posJagoanJ[current] - 1)) { if (yPath[xcurrentPath] <= Number(posJagoanI[current] - 1)) { currentPath = 0; xPath = new Array(); yPath = new Array(); xPath[currentPath] = posMusuhJ[_root[ygDiserang].ke] - 1; yPath[currentPath] = posMusuhI[_root[ygDiserang].ke] - 1; _root[xnamaChara].gotoAndStop(1); } else { if (yPath[xcurrentPath] >= Number(posJagoanI[current] + 1)) { currentPath = 0; xPath = new Array(); yPath = new Array(); xPath[currentPath] = posMusuhJ[_root[ygDiserang].ke] - 1; yPath[currentPath] = posMusuhI[_root[ygDiserang].ke] + 1; _root[xnamaChara].gotoAndStop(3); } } } else { if (xPath[xcurrentPath] >= Number(posJagoanJ[current] + 1)) { if (yPath[xcurrentPath] <= Number(posJagoanI[current] - 1)) { currentPath = 0; xPath = new Array(); yPath = new Array(); xPath[currentPath] = posMusuhJ[_root[ygDiserang].ke] + 1; yPath[currentPath] = posMusuhI[_root[ygDiserang].ke] - 1; _root[xnamaChara].gotoAndStop(7); } else { if (yPath[xcurrentPath] >= Number(posJagoanI[current] + 1)) { currentPath = 0; xPath = new Array(); yPath = new Array(); xPath[currentPath] = posMusuhJ[_root[ygDiserang].ke] + 1; yPath[currentPath] = posMusuhI[_root[ygDiserang].ke] + 1; _root[xnamaChara].gotoAndStop(5); } } } } } } } else { if (xPath[xcurrentPath] == posJagoanJ[current]) { if (yPath[xcurrentPath] == Number(posJagoanI[current] - 1)) { _root[xnamaChara].gotoAndStop(8); } else { if (yPath[xcurrentPath] == Number(posJagoanI[current] + 1)) { _root[xnamaChara].gotoAndStop(4); } } } else { if (yPath[xcurrentPath] == posJagoanI[current]) { if (xPath[xcurrentPath] == Number(posJagoanJ[current] - 1)) { _root[xnamaChara].gotoAndStop(2); } else { if (xPath[xcurrentPath] == Number(posJagoanJ[current] + 1)) { _root[xnamaChara].gotoAndStop(6); } } } else { if (xPath[xcurrentPath] == Number(posJagoanJ[current] - 1)) { if (yPath[xcurrentPath] == Number(posJagoanI[current] - 1)) { _root[xnamaChara].gotoAndStop(1); } else { if (yPath[xcurrentPath] == Number(posJagoanI[current] + 1)) { _root[xnamaChara].gotoAndStop(3); } } } else { if (xPath[xcurrentPath] == Number(posJagoanJ[current] + 1)) { if (yPath[xcurrentPath] == Number(posJagoanI[current] - 1)) { _root[xnamaChara].gotoAndStop(7); } else { if (yPath[xcurrentPath] == Number(posJagoanI[current] + 1)) { _root[xnamaChara].gotoAndStop(5); } } } } } } } if (indi == 'serang') { if (ygNyerang != undefined && ygDiserang != undefined) { if (tipeSerangan == 5) { masukJurang = false; if (mapping[xPath[currentPath]][yPath[currentPath]] == 1 || wwjurang[xPath[currentPath]][yPath[currentPath]] == 1) { if (wwjurang[xPath[currentPath]][yPath[currentPath]] == 1) { masukJurang = true; } else { masukJurang = false; } mapping[posMusuhJ[_root[ygDiserang].ke]][posMusuhI[_root[ygDiserang].ke]] = 1; posMusuhJ[_root[ygDiserang].ke] = xPath[currentPath]; posMusuhI[_root[ygDiserang].ke] = yPath[currentPath]; mapping[xPath[currentPath]][yPath[currentPath]] = 0; _root[ygDiserang].onEnterFrame = enterMusuh; } } else { keGoyang = 1; idGoyang = setInterval(goyang, 10, _root[namaCharaMusuh[indiDiserang]]); } cekKurangJagoan(ygNyerang, ygDiserang); if (tipeSerangan == 4) { if (liveMusuh[indiDiserang] > 0) { idDelay5 = setInterval(delay5, 2500); } else { idDelay1 = setInterval(delay1, 2500); } } else { idDelay1 = setInterval(delay1, 2500); } } else { bertambah = 'Miss'; posX = tujuan._x + 50; posY = tujuan._y - 20; cekAngka2(posX, posY, bertambah); delay1(); } if (indiNyerang == 0) { if (jagoanWeapon[indiNyerang] == 1) { _root[xnamaChara].anim.gotoAndStop(3); } else { if (jagoanWeapon[indiNyerang] == 5) { _root[xnamaChara].anim.gotoAndStop(4); } else { if (jagoanWeapon[indiNyerang] == 6) { _root[xnamaChara].anim.gotoAndStop(5); } else { if (jagoanWeapon[indiNyerang] == 7) { _root[xnamaChara].anim.gotoAndStop(6); } } } } } else { _root[xnamaChara].anim.gotoAndStop(3); } } else { _root[xnamaChara].anim.gotoAndStop(2); } } } function cekPosisi3() { if (xPath[xcurrentPath] == posMusuhJ[current]) { if (yPath[xcurrentPath] <= Number(posMusuhI[current] - 1)) { _root[xnamaChara].gotoAndStop(8); } else { if (yPath[xcurrentPath] >= Number(posMusuhI[current] + 1)) { _root[xnamaChara].gotoAndStop(4); } } } else { if (yPath[xcurrentPath] == posMusuhI[current]) { if (xPath[xcurrentPath] <= Number(posMusuhJ[current] - 1)) { _root[xnamaChara].gotoAndStop(2); } else { if (xPath[xcurrentPath] >= Number(posMusuhJ[current] + 1)) { _root[xnamaChara].gotoAndStop(6); } } } else { if (xPath[xcurrentPath] <= Number(posMusuhJ[current] - 1)) { if (yPath[xcurrentPath] <= Number(posMusuhI[current] - 1)) { _root[xnamaChara].gotoAndStop(1); } else { if (yPath[xcurrentPath] >= Number(posMusuhI[current] + 1)) { _root[xnamaChara].gotoAndStop(3); } } } else { if (xPath[xcurrentPath] >= Number(posMusuhJ[current] + 1)) { if (yPath[xcurrentPath] <= Number(posMusuhI[current] - 1)) { _root[xnamaChara].gotoAndStop(7); } else { if (yPath[xcurrentPath] >= Number(posMusuhI[current] + 1)) { _root[xnamaChara].gotoAndStop(5); } } } } } } _root[xnamaChara].anim.gotoAndStop(3); cekKurangMusuh2(ygNyerang, ygDiserang); idDelay2 = setInterval(delay2, 2500, current); vvj = posJagoanJ[indiDiserang]; vvi = posJagoanI[indiDiserang]; ubahDalam('vvj', 'vvi', 'dalam'); namaBaru = 'rumput_mc' + dalam; myColor = new Color(_root[namaBaru].warna_mc); myColor.setRGB('0x6C0202'); _root[namaBaru].enabled = false; delete _root[namaBaru].onRollOver; delete _root[namaBaru].onRollOut; delete _root[namaBaru].onReleaseOutside; delete _root[namaBaru].onRelease; } function cekKurangMusuh2(ygNyerang, ygDiserang) { randAccuracy = random(100); indiNyerang = _root[ygNyerang].ke; indiDiserang = _root[ygDiserang].ke; increseSerang = 1; if (randAccuracy <= accuracyMusuh[indiNyerang]) { efek = _root[namaCharaMusuh[indiDiserang]].attachMovie('fx' + tipeSerangan, 'fx_mc', dalamDarah + 10); efek._x = random(10) - 20; efek._y = random(10) - 20; efek._yscale = random(350) + 700; efek._xscale = efek._yscale; i = 0; while (i <= 5) { darah = _root[namaCharaMusuh[indiDiserang]].attachMovie('darah_mc', 'darah_mc' + i, dalamDarah + i); darah._yscale = random(350) + 700; darah._xscale = darah._yscale; darah._rotation = random(360); darah._x = random(10) - 20; darah._y = random(10) - 20; ++i; } elementSerang = elementMusuh[indiNyerang]; elementDiserang = elementMusuh[indiDiserang]; if (elementDiserang == kuatElement[elementSerang]) { increseSerang *= 1.25; } else { if (elementDiserang == lemahElement[elementSerang]) { increseSerang *= 0.75; } else { increseSerang *= 1; } } elementSerang = pilihanAbil; if (elementSerang == 4) { elementSerang = elementMusuh[indiNyerang]; } elementDiserang = elementMusuh[indiDiserang]; if (elementDiserang == kuatElement[elementSerang]) { increseSerang *= 1.25; } else { if (elementDiserang == lemahElement[elementSerang]) { increseSerang *= 0.75; } else { increseSerang *= 1; } } if (elementMusuh[indiNyerang] == elementSerang) { increseSerang *= 1; } berkurang = Math.ceil(attackMusuh[indiNyerang] * increseSerang - defenseMusuh[indiDiserang]); if (berkurang <= 0) { berkurang = random(6) + 5; } liveMusuh[indiDiserang] -= berkurang; if (liveMusuh[indiDiserang] <= 0) { bertambahExp = Math.ceil(maxMusuh[indiDiserang] / levelMusuh[indiNyerang] / 2) + random(10); } else { bertambahExp = Math.ceil(maxMusuh[indiDiserang] / levelMusuh[indiNyerang] / 4) + random(10); } expMusuh[indiNyerang] += bertambahExp; posX = _root[ygDiserang]._x; posY = _root[ygDiserang]._y; cekAngka(posX, posY, berkurang); if (expMusuh[indiNyerang] >= maxMusuh[indiNyerang]) { ++levelMusuh[indiNyerang]; totLiveMusuh[indiNyerang] = Math.ceil(levelMusuh[indiNyerang] * xincLive[indiNyerang] * 25); attackMusuh[indiNyerang] = Math.ceil(levelMusuh[indiNyerang] * xincAttack[indiNyerang] * 10); defenseMusuh[indiNyerang] = Math.ceil(levelMusuh[indiNyerang] * xincDefense[indiNyerang] * 5); totAuraMusuh[indiNyerang] = Math.ceil(levelMusuh[indiNyerang] * xincAura[indiNyerang] * 10); expMusuh[indiNyerang] = 0; maxMusuh[indiNyerang] = levelMusuh[indiNyerang] * 500; idDelay3 = setInterval(delay3, 1000); } else { idDelay4 = setInterval(delay4, 1000); } if (liveMusuh[indiDiserang] <= 0) { cekMati(_root[ygDiserang], indiDiserang, 'komp'); } } else { posX = _root[ygDiserang]._x; posY = _root[ygDiserang]._y; cekAngka2(posX, posY, 'Miss'); bertambahExp = 10; expMusuh[indiNyerang] += bertambahExp; if (expMusuh[indiNyerang] >= maxMusuh[indiNyerang]) { ++levelMusuh[indiNyerang]; totLiveMusuh[indiNyerang] = Math.ceil(levelMusuh[indiNyerang] * xincLive[indiNyerang] * 25); attackMusuh[indiNyerang] = Math.ceil(levelMusuh[indiNyerang] * xincAttack[indiNyerang] * 10); defenseMusuh[indiNyerang] = Math.ceil(levelMusuh[indiNyerang] * xincDefense[indiNyerang] * 5); totAuraMusuh[indiNyerang] = Math.ceil(levelMusuh[indiNyerang] * xincAura[indiNyerang] * 10); expMusuh[indiNyerang] = 0; maxMusuh[indiNyerang] = levelMusuh[indiNyerang] * 500; idDelay3 = setInterval(delay3, 1000); } else { idDelay4 = setInterval(delay4, 1000); } } } function cekPosisi4() { if (xPath[xcurrentPath] == posJagoanJ[current]) { if (yPath[xcurrentPath] <= Number(posJagoanI[current] - 1)) { _root[xnamaChara].gotoAndStop(8); } else { if (yPath[xcurrentPath] >= Number(posJagoanI[current] + 1)) { _root[xnamaChara].gotoAndStop(4); } } } else { if (yPath[xcurrentPath] == posJagoanI[current]) { if (xPath[xcurrentPath] <= Number(posJagoanJ[current] - 1)) { _root[xnamaChara].gotoAndStop(2); } else { if (xPath[xcurrentPath] >= Number(posJagoanJ[current] + 1)) { _root[xnamaChara].gotoAndStop(6); } } } else { if (xPath[xcurrentPath] <= Number(posJagoanJ[current] - 1)) { if (yPath[xcurrentPath] <= Number(posJagoanI[current] - 1)) { _root[xnamaChara].gotoAndStop(1); } else { if (yPath[xcurrentPath] >= Number(posJagoanI[current] + 1)) { _root[xnamaChara].gotoAndStop(3); } } } else { if (xPath[xcurrentPath] >= Number(posJagoanJ[current] + 1)) { if (yPath[xcurrentPath] <= Number(posJagoanI[current] - 1)) { _root[xnamaChara].gotoAndStop(7); } else { if (yPath[xcurrentPath] >= Number(posJagoanI[current] + 1)) { _root[xnamaChara].gotoAndStop(5); } } } } } } if (indiNyerang == 0) { if (jagoanWeapon[indiNyerang] == 1) { _root[xnamaChara].anim.gotoAndStop(3); } else { if (jagoanWeapon[indiNyerang] == 5) { _root[xnamaChara].anim.gotoAndStop(4); } else { if (jagoanWeapon[indiNyerang] == 6) { _root[xnamaChara].anim.gotoAndStop(5); } else { if (jagoanWeapon[indiNyerang] == 7) { _root[xnamaChara].anim.gotoAndStop(6); } } } } } else { _root[xnamaChara].anim.gotoAndStop(3); } cekKurangJagoan3(ygNyerang, ygDiserang); idDelay1 = setInterval(delay1, 2500, current); vvj = posJagoanJ[indiDiserang]; vvi = posJagoanI[indiDiserang]; ubahDalam('vvj', 'vvi', 'dalam'); namaBaru = 'rumput_mc' + dalam; myColor = new Color(_root[namaBaru].warna_mc); myColor.setRGB('0x6C0202'); _root[namaBaru].enabled = false; delete _root[namaBaru].onRollOver; delete _root[namaBaru].onRollOut; delete _root[namaBaru].onReleaseOutside; delete _root[namaBaru].onRelease; } function cekKurangJagoan3(ygNyerang, ygDiserang) { randAccuracy = random(100); indiNyerang = _root[ygNyerang].ke; indiDiserang = _root[ygDiserang].ke; increseSerang = 1; if (randAccuracy <= accuracyJagoan[indiNyerang]) { efek = _root[namaCharaJagoan[indiDiserang]].attachMovie('fx' + tipeSerangan, 'fx_mc', dalamDarah + 10); efek._x = random(10) - 20; efek._y = random(10) - 20; efek._yscale = random(350) + 700; efek._xscale = efek._yscale; i = 0; while (i <= 5) { darah = _root[namaCharaJagoan[indiDiserang]].attachMovie('darah_mc', 'darah_mc' + i, dalamDarah + i); darah._yscale = random(350) + 700; darah._xscale = darah._yscale; darah._rotation = random(360); darah._x = random(10) - 20; darah._y = random(10) - 20; ++i; } elementSerang = elementJagoan[indiNyerang]; elementDiserang = elementJagoan[indiDiserang]; if (elementDiserang == kuatElement[elementSerang]) { increseSerang *= 1.25; } else { if (elementDiserang == lemahElement[elementSerang]) { increseSerang *= 0.75; } else { increseSerang *= 1; } } elementSerang = pilihanAbil; if (elementSerang == 4) { elementSerang = elementJagoan[indiNyerang]; } elementDiserang = elementJagoan[indiDiserang]; if (elementDiserang == kuatElement[elementSerang]) { increseSerang *= 1.25; } else { if (elementDiserang == lemahElement[elementSerang]) { increseSerang *= 0.75; } else { increseSerang *= 1; } } if (elementJagoan[indiNyerang] == elementSerang) { increseSerang *= 1; } berkurang = Math.ceil(attackJagoan[indiNyerang] * increseSerang - defenseJagoan[indiDiserang]); if (berkurang <= 0) { berkurang = random(6) + 5; } liveJagoan[indiDiserang] -= berkurang; if (liveJagoan[indiDiserang] <= 0) { bertambahExp = Math.ceil(maxJagoan[indiDiserang] / levelJagoan[indiNyerang] / 2) + random(10); } else { bertambahExp = Math.ceil(maxJagoan[indiDiserang] / levelJagoan[indiNyerang] / 4) + random(10); } expJagoan[indiNyerang] += bertambahExp; posX = _root[ygDiserang]._x; posY = _root[ygDiserang]._y; cekAngka(posX, posY, berkurang); if (expJagoan[indiNyerang] >= maxJagoan[indiNyerang]) { ++levelJagoan[indiNyerang]; totLiveJagoan[indiNyerang] = Math.ceil(levelJagoan[indiNyerang] * incLive[indiNyerang] * 25); attackJagoan[indiNyerang] = Math.ceil(levelJagoan[indiNyerang] * incAttack[indiNyerang] * 10); defenseJagoan[indiNyerang] = Math.ceil(levelJagoan[indiNyerang] * incDefense[indiNyerang] * 5); totAuraJagoan[indiNyerang] = Math.ceil(levelJagoan[indiNyerang] * incAura[indiNyerang] * 10); expJagoan[indiNyerang] = 0; maxJagoan[indiNyerang] = levelJagoan[indiNyerang] * 500; idDelay3 = setInterval(delay3, 1000); } else { idDelay4 = setInterval(delay4, 1000); } if (liveJagoan[indiDiserang] <= 0) { cekMati(_root[ygDiserang], indiDiserang, 'jagoan'); } } else { posX = _root[ygDiserang]._x; posY = _root[ygDiserang]._y; cekAngka2(posX, posY, 'Miss'); bertambahExp = 10; expJagoan[indiNyerang] += bertambahExp; if (expJagoan[indiNyerang] >= maxJagoan[indiNyerang]) { ++levelJagoan[indiNyerang]; totLiveJagoan[indiNyerang] = Math.ceil(levelJagoan[indiNyerang] * incLive[indiNyerang] * 25); attackJagoan[indiNyerang] = Math.ceil(levelJagoan[indiNyerang] * incAttack[indiNyerang] * 10); defenseJagoan[indiNyerang] = Math.ceil(levelJagoan[indiNyerang] * incDefense[indiNyerang] * 5); totAuraJagoan[indiNyerang] = Math.ceil(levelJagoan[indiNyerang] * incAura[indiNyerang] * 10); expJagoan[indiNyerang] = 0; maxJagoan[indiNyerang] = levelJagoan[indiNyerang] * 500; idDelay3 = setInterval(delay3, 1000); } else { idDelay4 = setInterval(delay4, 1000); } } } function goyang(indi) { if (keGoyang == 1) { ++keGoyang; indi._x += 10; } else { if (keGoyang == 2) { ++keGoyang; indi._y += 10; } else { if (keGoyang == 3) { ++keGoyang; indi._x -= 20; } else { if (keGoyang == 4) { ++keGoyang; indi._y -= 20; } else { if (keGoyang == 5) { ++keGoyang; indi._x += 10; } else { if (keGoyang == 6) { ++keGoyang; indi._y += 10; clearInterval(idGoyang); } } } } } } } function delay5() { clearInterval(idDelay5); _root[xnamaChara].anim.gotoAndStop(1); if (indiNyerang == 0) { if (jagoanWeapon[indiNyerang] == 1) { _root[xnamaChara].anim.gotoAndStop(3); } else { if (jagoanWeapon[indiNyerang] == 5) { _root[xnamaChara].anim.gotoAndStop(4); } else { if (jagoanWeapon[indiNyerang] == 6) { _root[xnamaChara].anim.gotoAndStop(5); } else { if (jagoanWeapon[indiNyerang] == 7) { _root[xnamaChara].anim.gotoAndStop(6); } } } } } else { _root[xnamaChara].anim.gotoAndStop(3); } cekKurangJagoan(ygNyerang, ygDiserang); idDelay1 = setInterval(delay1, 2500); } function delay6() { clearInterval(idDelay6); _root[xnamaChara].anim.gotoAndStop(1); _root[xnamaChara].anim.gotoAndStop(3); cekKurangMusuh(ygNyerang, ygDiserang); idDelay2 = setInterval(delay2, 2500, current); } function cekPosisi2(indi) { tipeAnim = 'normal'; if (indi == 'serang') { if (tipeSerangan == 5) { increaseSpeed = 10; } else { increaseSpeed = 1; } tipeAnim = 'serang'; } if (indi == 'item') { if (ygNyerang != undefined && ygDiserang != undefined && tipeItem != undefined) { indiNyerang = _root[ygNyerang].ke; indiDiserang = _root[ygDiserang].ke; vvj = posMusuhJ[indiDiserang]; vvi = posMusuhI[indiDiserang]; ubahDalam('vvj', 'vvi', 'dalam'); namaBaru = 'rumput_mc' + dalam; myColor = new Color(_root[namaBaru].warna_mc); myColor.setRGB('0x6C0202'); _root[namaBaru].enabled = false; delete _root[namaBaru].onRollOver; delete _root[namaBaru].onRollOut; delete _root[namaBaru].onReleaseOutside; delete _root[namaBaru].onRelease; efek = _root[namaCharaMusuh[indiDiserang]].attachMovie('it' + tipeItem, 'fx_mc', dalamDarah + 10); if (tipeItem == 2 || tipeItem == 10) { efek._x = random(10) - 20; efek._y = 250; } else { efek._x = random(10) - 20; efek._y = random(10) - 20; } efek._yscale = random(350) + 700; efek._xscale = efek._yscale; if (tipeItem == 1) { backHealth(); bertambah = 'HEALTH +100'; liveMusuh[indiDiserang] += 100; if (liveMusuh[indiDiserang] >= totLiveMusuh[indiDiserang]) { liveMusuh[indiDiserang] = totLiveMusuh[indiDiserang]; } } else { if (tipeItem == 2) { backAura(); bertambah = 'AURA +50'; auraMusuh[indiDiserang] += 50; if (auraMusuh[indiDiserang] >= totAuraMusuh[indiDiserang]) { auraMusuh[indiDiserang] = totAuraMusuh[indiDiserang]; } } else { if (tipeItem == 3) { backAntidote(); bertambah = 'POISON REMOVED'; poisonKeMusuh[indiDiserang] = 3; poisonMusuh[indiDiserang] = false; removeMovieClip(_root[namaCharaMusuh[indiDiserang]].poison_mc); } else { if (tipeItem == 4) { backBreak(); bertambah = 'STUN REMOVED'; stunKeMusuh[indiDiserang] = 3; stunMusuh[indiDiserang] = false; removeMovieClip(_root[namaCharaMusuh[indiDiserang]].stun_mc); setBisa2(3, true, indiDiserang); masihAktif[indiDiserang] = true; } else { if (tipeItem == 5) { backAware(); bertambah = 'UNCONTROL REMOVED'; uncontrolKeMusuh[indiDiserang] = 3; uncontrolMusuh[indiDiserang] = false; removeMovieClip(_root[namaCharaMusuh[indiDiserang]].uncontrol_mc); } else { if (tipeItem == 6) { backFast(); bertambah = 'SLOW REMOVED'; slowKeMusuh[indiDiserang] = 3; slowMusuh[indiDiserang] = false; removeMovieClip(_root[namaCharaMusuh[indiDiserang]].slow_mc); xrangeMusuh[indiDiserang] = rangeMusuh[indiDiserang]; } else { if (tipeItem == 7) { backIce(); bertambah = 'ICE SHIELD'; attackDefenseIncMusuh[indiDiserang] *= 1.2; attackMusuh[indiDiserang] = Math.ceil(attackMusuh[indiDiserang] * attackDefenseIncMusuh[indiDiserang]); defenseMusuh[indiDiserang] = Math.ceil(defenseMusuh[indiDiserang] * attackDefenseIncMusuh[indiDiserang]); } else { if (tipeItem == 8) { backDouble(); bertambah = 'DOUBLE TURN'; moveMusuh[indiDiserang] = false; actionMusuh[indiDiserang] = false; musuhAktif[indiDiserang] = true; } else { if (tipeItem == 9) { backHealth(); backHealth(); bertambah = 'HEALTH +200'; liveMusuh[indiDiserang] += 200; if (liveMusuh[indiDiserang] >= totLiveMusuh[indiDiserang]) { liveMusuh[indiDiserang] = totLiveMusuh[indiDiserang]; } } else { if (tipeItem == 10) { backAura(); backAura(); bertambah = 'AURA +100'; auraMusuh[indiDiserang] += 100; if (auraMusuh[indiDiserang] >= totAuraMusuh[indiDiserang]) { auraMusuh[indiDiserang] = totAuraMusuh[indiDiserang]; } } } } } } } } } } } posX = _root[ygDiserang]._x; posY = _root[ygDiserang]._y; cekAngka2(posX, posY, bertambah); idDelay2 = setInterval(delay2, 2000); } _root[xnamaChara].anim.gotoAndStop(2); } else { if (tipeAnim == 'serang') { current = xcurrent; if (xPath[xcurrentPath] == posMusuhJ[current]) { if (yPath[xcurrentPath] <= Number(posMusuhI[current] - 1)) { currentPath = 0; xPath = new Array(); yPath = new Array(); xPath[currentPath] = posJagoanJ[_root[ygDiserang].ke]; yPath[currentPath] = posJagoanI[_root[ygDiserang].ke] - 1; _root[xnamaChara].gotoAndStop(8); } else { if (yPath[xcurrentPath] >= Number(posMusuhI[current] + 1)) { currentPath = 0; xPath = new Array(); yPath = new Array(); xPath[currentPath] = posJagoanJ[_root[ygDiserang].ke]; yPath[currentPath] = posJagoanI[_root[ygDiserang].ke] + 1; _root[xnamaChara].gotoAndStop(4); } } } else { if (yPath[xcurrentPath] == posMusuhI[current]) { if (xPath[xcurrentPath] <= Number(posMusuhJ[current] - 1)) { currentPath = 0; xPath = new Array(); yPath = new Array(); xPath[currentPath] = posJagoanJ[_root[ygDiserang].ke] - 1; yPath[currentPath] = posJagoanI[_root[ygDiserang].ke]; _root[xnamaChara].gotoAndStop(2); } else { if (xPath[xcurrentPath] >= Number(posMusuhJ[current] + 1)) { currentPath = 0; xPath = new Array(); yPath = new Array(); xPath[currentPath] = posJagoanJ[_root[ygDiserang].ke] + 1; yPath[currentPath] = posJagoanI[_root[ygDiserang].ke]; _root[xnamaChara].gotoAndStop(6); } } } else { if (xPath[xcurrentPath] <= Number(posMusuhJ[current] - 1)) { if (yPath[xcurrentPath] <= Number(posMusuhI[current] - 1)) { currentPath = 0; xPath = new Array(); yPath = new Array(); xPath[currentPath] = posJagoanJ[_root[ygDiserang].ke] - 1; yPath[currentPath] = posJagoanI[_root[ygDiserang].ke] - 1; _root[xnamaChara].gotoAndStop(1); } else { if (yPath[xcurrentPath] >= Number(posMusuhI[current] + 1)) { currentPath = 0; xPath = new Array(); yPath = new Array(); xPath[currentPath] = posJagoanJ[_root[ygDiserang].ke] - 1; yPath[currentPath] = posJagoanI[_root[ygDiserang].ke] + 1; _root[xnamaChara].gotoAndStop(3); } } } else { if (xPath[xcurrentPath] >= Number(posMusuhJ[current] + 1)) { if (yPath[xcurrentPath] <= Number(posMusuhI[current] - 1)) { currentPath = 0; xPath = new Array(); yPath = new Array(); xPath[currentPath] = posJagoanJ[_root[ygDiserang].ke] + 1; yPath[currentPath] = posJagoanI[_root[ygDiserang].ke] - 1; _root[xnamaChara].gotoAndStop(7); } else { if (yPath[xcurrentPath] >= Number(posMusuhI[current] + 1)) { currentPath = 0; xPath = new Array(); yPath = new Array(); xPath[currentPath] = posJagoanJ[_root[ygDiserang].ke] + 1; yPath[currentPath] = posJagoanI[_root[ygDiserang].ke] + 1; _root[xnamaChara].gotoAndStop(5); } } } } } } } else { if (indi == 'serang') { if (xPath[xcurrentPath] == posMusuhJ[current]) { if (yPath[xcurrentPath] <= Number(posMusuhI[current] - 1)) { _root[xnamaChara].gotoAndStop(8); } else { if (yPath[xcurrentPath] >= Number(posMusuhI[current] + 1)) { _root[xnamaChara].gotoAndStop(4); } } } else { if (yPath[xcurrentPath] == posMusuhI[current]) { if (xPath[xcurrentPath] <= Number(posMusuhJ[current] - 1)) { _root[xnamaChara].gotoAndStop(2); } else { if (xPath[xcurrentPath] >= Number(posMusuhJ[current] + 1)) { _root[xnamaChara].gotoAndStop(6); } } } else { if (xPath[xcurrentPath] <= Number(posMusuhJ[current] - 1)) { if (yPath[xcurrentPath] <= Number(posMusuhI[current] - 1)) { _root[xnamaChara].gotoAndStop(1); } else { if (yPath[xcurrentPath] >= Number(posMusuhI[current] + 1)) { _root[xnamaChara].gotoAndStop(3); } } } else { if (xPath[xcurrentPath] >= Number(posMusuhJ[current] + 1)) { if (yPath[xcurrentPath] <= Number(posMusuhI[current] - 1)) { _root[xnamaChara].gotoAndStop(7); } else { if (yPath[xcurrentPath] >= Number(posMusuhI[current] + 1)) { _root[xnamaChara].gotoAndStop(5); } } } } } } } else { if (xPath[xcurrentPath] == posMusuhJ[current]) { if (yPath[xcurrentPath] == Number(posMusuhI[current] - 1)) { _root[xnamaChara].gotoAndStop(8); } else { if (yPath[xcurrentPath] == Number(posMusuhI[current] + 1)) { _root[xnamaChara].gotoAndStop(4); } } } else { if (yPath[xcurrentPath] == posMusuhI[current]) { if (xPath[xcurrentPath] == Number(posMusuhJ[current] - 1)) { _root[xnamaChara].gotoAndStop(2); } else { if (xPath[xcurrentPath] == Number(posMusuhJ[current] + 1)) { _root[xnamaChara].gotoAndStop(6); } } } else { if (xPath[xcurrentPath] == Number(posMusuhJ[current] - 1)) { if (yPath[xcurrentPath] == Number(posMusuhI[current] - 1)) { _root[xnamaChara].gotoAndStop(1); } else { if (yPath[xcurrentPath] == Number(posMusuhI[current] + 1)) { _root[xnamaChara].gotoAndStop(3); } } } else { if (xPath[xcurrentPath] == Number(posMusuhJ[current] + 1)) { if (yPath[xcurrentPath] == Number(posMusuhI[current] - 1)) { _root[xnamaChara].gotoAndStop(7); } else { if (yPath[xcurrentPath] == Number(posMusuhI[current] + 1)) { _root[xnamaChara].gotoAndStop(5); } } } } } } } } } if (indi == 'serang') { if (ygNyerang != undefined && ygDiserang != undefined) { indiNyerang = _root[ygNyerang].ke; indiDiserang = _root[ygDiserang].ke; if (tipeSerangan == 5) { masukJurang = false; if (mapping[xPath[currentPath]][yPath[currentPath]] == 1 || wwjurang[xPath[currentPath]][yPath[currentPath]] == 1) { if (wwjurang[xPath[currentPath]][yPath[currentPath]] == 1) { masukJurang = true; } else { masukJurang = false; } mapping[posJagoanJ[_root[ygDiserang].ke]][posJagoanI[_root[ygDiserang].ke]] = 1; posJagoanJ[_root[ygDiserang].ke] = xPath[currentPath]; posJagoanI[_root[ygDiserang].ke] = yPath[currentPath]; mapping[xPath[currentPath]][yPath[currentPath]] = 0; _root[ygDiserang].onEnterFrame = enterChara; } } else { keGoyang = 1; idGoyang = setInterval(goyang, 10, _root[namaCharaJagoan[indiDiserang]]); } cekKurangMusuh(ygNyerang, ygDiserang); if (tipeSerangan == 4) { if (liveJagoan[indiDiserang] > 0) { idDelay6 = setInterval(delay6, 2500, current); } else { idDelay2 = setInterval(delay2, 2500, current); } } else { idDelay2 = setInterval(delay2, 2500, current); } vvj = posJagoanJ[indiDiserang]; vvi = posJagoanI[indiDiserang]; ubahDalam('vvj', 'vvi', 'dalam'); namaBaru = 'rumput_mc' + dalam; myColor = new Color(_root[namaBaru].warna_mc); myColor.setRGB('0x6C0202'); _root[namaBaru].enabled = false; delete _root[namaBaru].onRollOver; delete _root[namaBaru].onRollOut; delete _root[namaBaru].onReleaseOutside; delete _root[namaBaru].onRelease; } else { delay2(current); } _root[xnamaChara].anim.gotoAndStop(3); } else { _root[xnamaChara].anim.gotoAndStop(2); } } function delay1() { clearInterval(idDelay1); if (info_mc._currentframe > 3) { info_mc.gotoAndPlay('xselesai'); } else { info_mc.gotoAndStop(1); } _root[xnamaChara].anim.gotoAndStop(1); if (jagoanType[current] != 'musuh') { giliranJagoan(current); xresetMove(); deleteMove(); setBisa(1, true); deleteMusuh(false); setMuncul(false); if (moveJagoan[current] == true && actionJagoan[current] == true) { if (bykMusuh <= 0) { cekLanjutLevel(); } else { charaWait(); } } } else { giliranJagoan(current); } } function delay2() { clearInterval(idDelay2); if (info_mc._currentframe > 3) { info_mc.gotoAndPlay('xselesai'); } else { info_mc.gotoAndStop(1); } _root[xnamaChara].anim.gotoAndStop(1); current = xcurrent; giliranMusuh(current); } function cekKedip(zindi, zelement) { indi = _root[zindi]; dalam2 = indi.getDepth() + 1; namaBaru2 = 'kedip_mc' + keKedip; ++keKedip; if (keKedip >= 100) { keKedip = 1; } wwpos = indi._currentframe; if (indi.zjenis == 1) { wwobyek = attachMovie('david_mc', namaBaru2, dalam2); } else { if (indi.zjenis == 2) { wwobyek = attachMovie('faith_mc', namaBaru2, dalam2); } else { if (indi.zjenis == 3) { wwobyek = attachMovie('odarat_mc', namaBaru2, dalam2); } else { if (indi.zjenis == 4) { wwobyek = attachMovie('osihir_mc', namaBaru2, dalam2); } else { if (indi.zjenis == 5) { wwobyek = attachMovie('odarat_mc', namaBaru2, dalam2); } else { if (indi.zjenis == 6) { wwobyek = attachMovie('api_mc', namaBaru2, dalam2); } else { if (indi.zjenis == 7) { wwobyek = attachMovie('brunhill_mc', namaBaru2, dalam2); } else { if (indi.zjenis == 8) { wwobyek = attachMovie('devy_mc', namaBaru2, dalam2); } else { if (indi.zjenis == 9) { wwobyek = attachMovie('detro_mc', namaBaru2, dalam2); } else { if (indi.zjenis == 10) { wwobyek = attachMovie('guild_mc', namaBaru2, dalam2); } } } } } } } } } } wwobyek._x = indi._x; wwobyek._y = indi._y; wwobyek._xscale = indi._xscale; wwobyek._yscale = indi._yscale; wwobyek.gotoAndStop(wwpos); wwobyek.pos = 0; wwmyColor = new Color(wwobyek); if (zelement == 0) { wwmyColor.setRGB('0x759DF9'); } else { if (zelement == 1) { wwmyColor.setRGB('0xFF6F6F'); } else { if (zelement == 2) { wwmyColor.setRGB('0xFFF06F'); } else { if (zelement == 3) { wwmyColor.setRGB('0x6FFF8B'); } } } } wwobyek._alpha = 90; wwobyek.onEnterFrame = enterWW; } function enterWW() { this.pos += 1; if (this.pos == 1) { this._visible = false; } else { if (this.pos == 3) { this._visible = true; } else { if (this.pos == 5) { this._visible = false; } else { if (this.pos == 7) { this._visible = true; } else { if (this.pos == 8) { this._visible = false; } else { if (this.pos == 9) { this._visible = true; } else { if (this.pos == 10) { this._visible = false; } else { if (this.pos == 11) { this._visible = true; } else { if (this.pos == 12) { delete this.onEnterFrame; removeMovieClip(this); } } } } } } } } } } function cekSoundFX(indiNyerang) { if (tipeSerangan == 2) { backPoison(); } else { if (tipeSerangan == 3) { backStun(); } else { if (tipeSerangan == 4) { backDoubleAttack(); } else { if (tipeSerangan == 5) { backSmash(); } else { if (tipeSerangan == 6) { backBurn(); } else { if (tipeSerangan == 7) { backFlame(); } else { if (tipeSerangan == 8) { backStrike(); } else { if (tipeSerangan == 9) { backUncontrol(); } else { if (tipeSerangan == 10) { backMeteor(); } else { if (tipeSerangan == 11) { backAllAttack(); } else { if (tipeSerangan == 12) { backAuraBlast(); } else { if (tipeSerangan == 13) { backSlow(); } else { if (tipeSerangan == 14) { backIceBelt(); } else { if (tipeSerangan == 15) { backMasterAttack(); } else { if (tipeSerangan == 16) { backFlood(); } } } } } } } } } } } } } } } if (jagoanWeapon[indiNyerang] == 1) { backPedang(); } else { if (jagoanWeapon[indiNyerang] == 2) { backPisau(); } else { if (jagoanWeapon[indiNyerang] == 3) { backPedang2(); } else { if (jagoanWeapon[indiNyerang] == 4) { backMawar(); } else { if (jagoanWeapon[indiNyerang] == 5) { backKapak(); } else { if (jagoanWeapon[indiNyerang] == 6) { backTombak(); } else { if (jagoanWeapon[indiNyerang] == 7) { backPanah(); } else { if (jagoanWeapon[indiNyerang] == 8) { backGada(); } else { if (jagoanWeapon[indiNyerang] == 9) { backSihir(); } else { if (jagoanWeapon[indiNyerang] == 10) { backGolok(); } else { if (jagoanWeapon[indiNyerang] == 11) { backCambuk(); } } } } } } } } } } } if (jenisMaen == 'training' || mapKe == 11) { backOrangKena(); } else { backOgreKena(); } } function cekSoundFX2(indiNyerang) { if (tipeSerangan == 2) { backPoison(); } else { if (tipeSerangan == 3) { backStun(); } else { if (tipeSerangan == 4) { backDoubleAttack(); } else { if (tipeSerangan == 5) { backSmash(); } else { if (tipeSerangan == 6) { backBurn(); } else { if (tipeSerangan == 7) { backFlame(); } else { if (tipeSerangan == 8) { backStrike(); } else { if (tipeSerangan == 9) { backUncontrol(); } else { if (tipeSerangan == 10) { backMeteor(); } else { if (tipeSerangan == 11) { backAllAttack(); } else { if (tipeSerangan == 12) { backAuraBlast(); } else { if (tipeSerangan == 13) { backSlow(); } else { if (tipeSerangan == 14) { backIceBelt(); } else { if (tipeSerangan == 15) { backMasterAttack(); } else { if (tipeSerangan == 16) { backFlood(); } } } } } } } } } } } } } } } if (xmusuhWeapon[indiNyerang] == 1) { backPedang(); } else { if (xmusuh[indiNyerang] == 2) { backPisau(); } else { if (xmusuhWeapon[indiNyerang] == 3) { backPedang2(); } else { if (xmusuhWeapon[indiNyerang] == 4) { backMawar(); } else { if (xmusuhWeapon[indiNyerang] == 5) { backKapak(); } else { if (xmusuhWeapon[indiNyerang] == 6) { backTombak(); } else { if (xmusuhWeapon[indiNyerang] == 7) { backPanah(); } else { if (xmusuhWeapon[indiNyerang] == 8) { backGada(); } else { if (xmusuhWeapon[indiNyerang] == 9) { backSihir(); } else { if (xmusuhWeapon[indiNyerang] == 10) { backGolok(); } else { if (xmusuhWeapon[indiNyerang] == 11) { backCambuk(); } } } } } } } } } } } if (indiDiserang == 3) { } else { backOrangKena(); } } function cekKurangJagoan(ygNyerang, ygDiserang, bykAngka) { cekSoundFX(indiNyerang); if (tipeSerangan == 8 || tipeSerangan == 11) { randAccuracy = random(150); } else { if (tipeSerangan == 15) { randAccuracy = random(80); } else { randAccuracy = random(100); } } if (tipeSerangan == 10 || tipeSerangan == 11) { tipeSerangan2 = 'rame'; } else { tipeSerangan2 = 'orang'; } increseSerang = 1; if (randAccuracy <= accuracyJagoan[indiNyerang]) { efek = _root[namaCharaMusuh[indiDiserang]].attachMovie('fx' + tipeSerangan, 'fx_mc', dalamDarah + 10); efek._x = random(10) - 20; efek._y = random(10) - 20; efek._yscale = random(350) + 700; efek._xscale = efek._yscale; i = 0; while (i <= 5) { darah = _root[namaCharaMusuh[indiDiserang]].attachMovie('darah_mc', 'darah_mc' + i, dalamDarah + i); darah._yscale = random(350) + 700; darah._xscale = darah._yscale; darah._rotation = random(360); darah._x = random(10) - 20; darah._y = random(10) - 20; myColor = new Color(darah); myColor.setRGB('0x000000'); ++i; } if (tipeSerangan == 2) { poisonMusuh[indiDiserang] = true; poisonKeMusuh[indiDiserang] = 3; poison = _root[namaCharaMusuh[indiDiserang]].attachMovie('poison_mc', 'poison_mc', dalamPoison); poison._xscale = 300; poison._yscale = 300; poison._alpha = 50; poison._x = 0; poison._y = 0; } else { if (tipeSerangan == 3) { stunMusuh[indiDiserang] = true; stunKeMusuh[indiDiserang] = 3; stun = _root[namaCharaMusuh[indiDiserang]].attachMovie('stun_mc', 'stun_mc', dalamStun); stun._xscale = 600; stun._yscale = 600; stun._alpha = 80; stun._x = 0; stun._y = 0; } else { if (tipeSerangan == 6) { api2 = _root[namaCharaMusuh[indiDiserang]].attachMovie('api_mc2', 'api_mc2', dalamDarah + 6); api2._yscale = 100; api2._xscale = 100; api2._x = 0; api2._y = 180; increseSerang *= 1.25; } else { if (tipeSerangan == 7) { flame2 = _root[namaCharaMusuh[indiDiserang]].attachMovie('flame_mc2', 'flame_mc2', dalamDarah + 6); flame2._yscale = 2000; flame2._xscale = 2000; flame2._x = 0; flame2._y = 100; increseSerang *= 1.5; } else { if (tipeSerangan == 8) { strike = _root[namaCharaMusuh[indiDiserang]].attachMovie('strike_mc', 'strike_mc', dalamDarah + 6); strike._yscale = 600; strike._xscale = 600; strike._x = 0; strike._y = 0; increseSerang *= 2.5; } else { if (tipeSerangan == 9) { uncontrolMusuh[indiDiserang] = true; uncontrolKeMusuh[indiDiserang] = 3; uncontrol = _root[namaCharaMusuh[indiDiserang]].attachMovie('uncontrol_mc', 'uncontrol_mc', dalamUncontrol); uncontrol._xscale = 500; uncontrol._yscale = 500; uncontrol._alpha = 90; uncontrol._x = 0; uncontrol._y = 0; } else { if (tipeSerangan == 11) { increseSerang *= 0.5; } else { if (tipeSerangan == 12) { berkurang2 = Math.ceil(auraMusuh[indiDiserang] * 0.5); berkurang3 = 'AURA -' + berkurang2; auraMusuh[indiDiserang] -= berkurang2; posX = _root[ygDiserang]._x; posY = _root[ygDiserang]._y - 25; cekAngka2(posX, posY, berkurang3, 2); } else { if (tipeSerangan == 13) { slowMusuh[indiDiserang] = true; slowKeMusuh[indiDiserang] = 3; slow = _root[namaCharaMusuh[indiDiserang]].attachMovie('slow_mc', 'slow_mc', dalamSlow); slow._xscale = 600; slow._yscale = 600; slow._alpha = 80; slow._x = 0; slow._y = 0; xrangeMusuh[indiDiserang] = 1; } else { if (tipeSerangan == 14) { attackDefenseIncMusuh[indiDiserang] *= 0.8; attackMusuh[indiDiserang] = Math.ceil(attackMusuh[indiDiserang] * attackDefenseIncMusuh[indiDiserang]); defenseMusuh[indiDiserang] = Math.ceil(defenseMusuh[indiDiserang] * attackDefenseIncMusuh[indiDiserang]); } else { if (tipeSerangan == 15) { master = _root[namaCharaMusuh[indiDiserang]].attachMovie('master_mc', 'master_mc', dalamDarah + 6); master._yscale = 600; master._xscale = 600; master._x = 0; master._y = 0; increseSerang *= 2; } else { if (tipeSerangan == 16) { flood = _root[namaCharaMusuh[indiDiserang]].attachMovie('flood_mc', 'flood_mc', dalamDarah + 6); flood._yscale = 600; flood._xscale = 600; flood._x = 0; flood._y = 0; increseSerang *= 1.5; } } } } } } } } } } } } elementSerang = elementJagoan[indiNyerang]; elementDiserang = elementMusuh[indiDiserang]; if (elementDiserang == kuatElement[elementSerang]) { increseSerang *= 1.25; } else { if (elementDiserang == lemahElement[elementSerang]) { increseSerang *= 0.75; } else { increseSerang *= 1; } } elementSerang = pilihanAbil; if (elementSerang == 4) { elementSerang = elementJagoan[indiNyerang]; pilihanAbil = elementSerang; } elementDiserang = elementMusuh[indiDiserang]; if (elementDiserang == kuatElement[elementSerang]) { increseSerang *= 1.25; } else { if (elementDiserang == lemahElement[elementSerang]) { increseSerang *= 0.75; } else { increseSerang *= 1; } } if (elementJagoan[indiNyerang] == elementSerang) { increseSerang *= 1; } berkurang = Math.ceil(attackJagoan[indiNyerang] * increseSerang - defenseMusuh[indiDiserang]); if (berkurang <= 0) { berkurang = random(6) + 5; } liveMusuh[indiDiserang] -= berkurang; if (liveMusuh[indiDiserang] <= 0) { bertambahExp = Math.ceil(maxMusuh[indiDiserang] / levelJagoan[indiNyerang] / 2) + random(10); } else { bertambahExp = Math.ceil(maxMusuh[indiDiserang] / levelJagoan[indiNyerang] / 4) + random(10); } posX = _root[ygDiserang]._x; posY = _root[ygDiserang]._y; cekAngka(posX, posY, berkurang, bykAngka); if (tipeSerangan2 == 'orang') { expJagoan[indiNyerang] += bertambahExp; if (expJagoan[indiNyerang] >= maxJagoan[indiNyerang]) { ++levelJagoan[indiNyerang]; totLiveJagoan[indiNyerang] = Math.ceil(levelJagoan[indiNyerang] * incLive[indiNyerang] * 25); attackJagoan[indiNyerang] = Math.ceil(levelJagoan[indiNyerang] * incAttack[indiNyerang] * 10); defenseJagoan[indiNyerang] = Math.ceil(levelJagoan[indiNyerang] * incDefense[indiNyerang] * 5); totAuraJagoan[indiNyerang] = Math.ceil(levelJagoan[indiNyerang] * incAura[indiNyerang] * 10); expJagoan[indiNyerang] = 0; maxJagoan[indiNyerang] = levelJagoan[indiNyerang] * 500; idDelay3 = setInterval(delay3, 1000, bykAngka); } else { idDelay4 = setInterval(delay4, 1000, bykAngka); } } if (liveMusuh[indiDiserang] <= 0) { cekMati(_root[ygDiserang], indiDiserang, 'komp'); } } else { posX = _root[ygDiserang]._x; posY = _root[ygDiserang]._y; cekAngka2(posX, posY, 'Miss', bykAngka); bertambahExp = random(11) + 10; if (tipeSerangan2 == 'orang') { expJagoan[indiNyerang] += bertambahExp; if (expJagoan[indiNyerang] >= maxJagoan[indiNyerang]) { ++levelJagoan[indiNyerang]; totLiveJagoan[indiNyerang] = Math.ceil(levelJagoan[indiNyerang] * incLive[indiNyerang] * 25); attackJagoan[indiNyerang] = Math.ceil(levelJagoan[indiNyerang] * incAttack[indiNyerang] * 10); defenseJagoan[indiNyerang] = Math.ceil(levelJagoan[indiNyerang] * incDefense[indiNyerang] * 5); totAuraJagoan[indiNyerang] = Math.ceil(levelJagoan[indiNyerang] * incAura[indiNyerang] * 10); expJagoan[indiNyerang] = 0; maxJagoan[indiNyerang] = levelJagoan[indiNyerang] * 500; idDelay3 = setInterval(delay3, 1000, bykAngka); } else { idDelay4 = setInterval(delay4, 1000, bykAngka); } } } obyek = namaCharaMusuh[indiDiserang]; scala1 = (liveMusuh[indiDiserang] / totLiveMusuh[indiDiserang]) * 100; scala2 = (auraMusuh[indiDiserang] / totAuraMusuh[indiDiserang]) * 100; _root[obyek].darah_mc.zbar._xscale = scala1; _root[obyek].aura_mc.zbar._xscale = scala2; cekKedip(namaCharaMusuh[indiDiserang], pilihanAbil); } function cekKurangMusuh(ygNyerang, ygDiserang, bykAngka) { cekSoundFX2(indiNyerang); if (tipeSerangan == 8 || tipeSerangan == 11) { randAccuracy = random(150); } else { if (tipeSerangan == 15) { randAcurracy = random(80); } else { randAccuracy = random(100); } } if (tipeSerangan == 10 || tipeSerangan == 11) { tipeSerangan2 = 'rame'; } else { tipeSerangan2 = 'orang'; } indiNyerang = _root[ygNyerang].ke; indiDiserang = _root[ygDiserang].ke; increseSerang = 1; if (randAccuracy <= accuracyMusuh[indiNyerang]) { efek = _root[namaCharaJagoan[indiDiserang]].attachMovie('fx' + tipeSerangan, 'fx_mc', dalamDarah + 10); efek._x = random(10) - 20; efek._y = random(10) - 20; efek._yscale = random(350) + 700; efek._xscale = efek._yscale; i = 0; while (i <= 5) { darah = _root[namaCharaJagoan[indiDiserang]].attachMovie('darah_mc', 'darah_mc' + i, dalamDarah + i); darah._yscale = random(350) + 700; darah._xscale = darah._yscale; darah._rotation = random(360); darah._x = random(10) - 20; darah._y = random(10) - 20; ++i; } if (tipeSerangan == 2) { poisonJagoan[indiDiserang] = true; poisonKeJagoan[indiDiserang] = 3; poison = _root[namaCharaJagoan[indiDiserang]].attachMovie('poison_mc', 'poison_mc', dalamPoison); poison._xscale = 300; poison._yscale = 300; poison._alpha = 50; poison._x = 0; poison._y = 0; } else { if (tipeSerangan == 3) { stunJagoan[indiDiserang] = true; stunKeJagoan[indiDiserang] = 3; stun = _root[namaCharaJagoan[indiDiserang]].attachMovie('stun_mc', 'stun_mc', dalamStun); stun._xscale = 600; stun._yscale = 600; stun._alpha = 80; stun._x = 0; stun._y = 0; } else { if (tipeSerangan == 6) { api2 = _root[namaCharaJagoan[indiDiserang]].attachMovie('api_mc2', 'api_mc2', dalamDarah + 6); api2._yscale = 100; api2._xscale = 100; api2._x = 0; api2._y = 180; increseSerang *= 1.25; } else { if (tipeSerangan == 7) { flame2 = _root[namaCharaJagoan[indiDiserang]].attachMovie('flame_mc2', 'flame_mc2', dalamDarah + 6); flame2._yscale = 2000; flame2._xscale = 2000; flame2._x = 0; flame2._y = 100; increseSerang *= 1.5; } else { if (tipeSerangan == 8) { strike = _root[namaCharaJagoan[indiDiserang]].attachMovie('strike_mc', 'strike_mc', dalamDarah + 6); strike._yscale = 600; strike._xscale = 600; strike._x = 0; strike._y = 0; increseSerang *= 2.5; } else { if (tipeSerangan == 9) { uncontrolJagoan[indiDiserang] = true; uncontrolKeJagoan[indiDiserang] = 3; uncontrol = _root[namaCharaJagoan[indiDiserang]].attachMovie('uncontrol_mc', 'uncontrol_mc', dalamUncontrol); uncontrol._xscale = 500; uncontrol._yscale = 500; uncontrol._alpha = 90; uncontrol._x = 0; uncontrol._y = 0; } else { if (tipeSerangan == 11) { increseSerang *= 0.5; } else { if (tipeSerangan == 12) { berkurang2 = Math.ceil(auraJagoan[indiDiserang] * 0.5); berkurang3 = 'AURA -' + berkurang2; auraJagoan[indiDiserang] -= berkurang2; posX = _root[ygDiserang]._x; posY = _root[ygDiserang]._y - 25; cekAngka2(posX, posY, berkurang3, 2); } else { if (tipeSerangan == 13) { slowJagoan[indiDiserang] = true; slowKeJagoan[indiDiserang] = 3; slow = _root[namaCharaJagoan[indiDiserang]].attachMovie('slow_mc', 'slow_mc', dalamSlow); slow._xscale = 600; slow._yscale = 600; slow._alpha = 80; slow._x = 0; slow._y = 0; xrangeJagoan[indiDiserang] = 1; } else { if (tipeSerangan == 14) { attackDefenseIncJagoan[indiDiserang] *= 0.8; attackJagoan[indiDiserang] = Math.ceil(attackJagoan[indiDiserang] * attackDefenseIncJagoan[indiDiserang]); defenseJagoan[indiDiserang] = Math.ceil(defenseJagoan[indiDiserang] * attackDefenseIncJagoan[indiDiserang]); } else { if (tipeSerangan == 15) { master = _root[namaCharaJagoan[indiDiserang]].attachMovie('master_mc', 'master_mc', dalamDarah + 6); master._yscale = 600; master._xscale = 600; master._x = 0; master._y = 0; increseSerang *= 2; } else { if (tipeSerangan == 16) { flood = _root[namaCharaJagoan[indiDiserang]].attachMovie('flood_mc', 'flood_mc', dalamDarah + 6); flood._yscale = 600; flood._xscale = 600; flood._x = 0; flood._y = 0; increseSerang *= 1.5; } } } } } } } } } } } } elementSerang = elementMusuh[indiNyerang]; elementDiserang = elementJagoan[indiDiserang]; if (elementDiserang == kuatElement[elementSerang]) { increseSerang *= 1.25; } else { if (elementDiserang == lemahElement[elementSerang]) { increseSerang *= 0.75; } else { increseSerang *= 1; } } elementSerang = pilihanAbil; if (elementSerang == 4) { elementSerang = elementMusuh[indiNyerang]; pilihanAbil = elementSerang; } elementDiserang = elementJagoan[indiDiserang]; if (elementDiserang == kuatElement[elementSerang]) { increseSerang *= 1.25; } else { if (elementDiserang == lemahElement[elementSerang]) { increseSerang *= 0.75; } else { increseSerang *= 1; } } if (elementMusuh[indiNyerang] == elementSerang) { increseSerang *= 1; } berkurang = Math.ceil(attackMusuh[indiNyerang] * increseSerang - defenseJagoan[indiDiserang]); if (berkurang <= 0) { berkurang = random(6) + 5; } liveJagoan[indiDiserang] -= berkurang; if (liveJagoan[indiDiserang] <= 0) { bertambahExp = Math.ceil(maxJagoan[indiDiserang] / levelMusuh[indiNyerang] / 2) + random(10); } else { bertambahExp = Math.ceil(maxJagoan[indiDiserang] / levelMusuh[indiNyerang] / 4) + random(10); } posX = _root[ygDiserang]._x; posY = _root[ygDiserang]._y; cekAngka(posX, posY, berkurang, bykAngka); if (tipeSerangan2 == 'orang') { expMusuh[indiNyerang] += bertambahExp; if (expMusuh[indiNyerang] >= maxMusuh[indiNyerang]) { ++levelMusuh[indiNyerang]; totLiveMusuh[indiNyerang] = Math.ceil(levelMusuh[indiNyerang] * xincLive[indiNyerang] * 25); attackMusuh[indiNyerang] = Math.ceil(levelMusuh[indiNyerang] * xincAttack[indiNyerang] * 10); defenseMusuh[indiNyerang] = Math.ceil(levelMusuh[indiNyerang] * xincDefense[indiNyerang] * 5); totAuraMusuh[indiNyerang] = Math.ceil(levelMusuh[indiNyerang] * xincAura[indiNyerang] * 10); expMusuh[indiNyerang] = 0; maxMusuh[indiNyerang] = levelMusuh[indiNyerang] * 500; idDelay3 = setInterval(delay3, 1000, bykAngka); } else { idDelay4 = setInterval(delay4, 1000, bykAngka); } } if (liveJagoan[indiDiserang] <= 0) { cekMati(_root[ygDiserang], indiDiserang, 'jagoan'); } } else { posX = _root[ygDiserang]._x; posY = _root[ygDiserang]._y; cekAngka2(posX, posY, 'Miss', bykAngka); bertambahExp = random(11) + 10; if (tipeSerangan2 == 'orang') { expMusuh[indiNyerang] += bertambahExp; if (expMusuh[indiNyerang] >= maxMusuh[indiNyerang]) { ++levelMusuh[indiNyerang]; totLiveMusuh[indiNyerang] = Math.ceil(levelMusuh[indiNyerang] * xincLive[indiNyerang] * 25); attackMusuh[indiNyerang] = Math.ceil(levelMusuh[indiNyerang] * xincAttack[indiNyerang] * 10); defenseMusuh[indiNyerang] = Math.ceil(levelMusuh[indiNyerang] * xincDefense[indiNyerang] * 5); totAuraMusuh[indiNyerang] = Math.ceil(levelMusuh[indiNyerang] * xincAura[indiNyerang] * 10); expMusuh[indiNyerang] = 0; maxMusuh[indiNyerang] = levelMusuh[indiNyerang] * 500; idDelay3 = setInterval(delay3, 1000, bykAngka); } else { idDelay4 = setInterval(delay4, 1000, bykAngka); } } } cekKedip(namaCharaJagoan[indiDiserang], pilihanAbil); } function delay3(indi) { clearInterval(idDelay3); posX = _root[ygNyerang]._x; posY = _root[ygNyerang]._y; cekAngka2(posX, posY, 'Level Up', indi); } function delay4(indi) { clearInterval(idDelay4); posX = _root[ygNyerang]._x; posY = _root[ygNyerang]._y; cekAngka3(posX, posY, bertambahExp, indi); } function cekAngka(xx, yy, zangka, xangka) { if (xangka == undefined) { xangka = 1; } qqdalam = dalamAngka1 + xangka; xangka = attachMovie('angka_mc', 'angka_mc' + qqdalam, qqdalam); xangka._x = xx; xangka._y = yy; xangka.yangka = '-' + zangka; } function cekAngka2(xx, yy, zangka, xangka) { if (xangka == undefined) { xangka = 1; } wwdalam = dalamAngka2 + xangka; xangka = attachMovie('angka_mc', 'angka_mc2' + wwdalam, wwdalam); xangka._x = xx; xangka._y = yy - 25; xangka.yangka = zangka; } function cekAngka3(xx, yy, zangka, xangka) { if (xangka == undefined) { xangka = 1; } ssdalam = dalamAngka3 + xangka; xangka = attachMovie('angka_mc', 'angka_mc3' + ssdalam, ssdalam); xangka._x = xx; xangka._y = yy - 25; xangka.yangka = 'EXP +' + zangka; } function cekAngka5(xx, yy, zangka, xangka) { if (xangka == undefined) { xangka = 1; } zzdalam = dalamAngka4 + xangka; xangka = attachMovie('angka_mc', 'angka_mc4' + zzdalam, zzdalam); xangka._x = xx; xangka._y = yy; xangka.yangka = '-' + zangka; } function cekMati(indi, indi2, indi3, indi4) { if (indi.hidup == true) { indi.hidup = false; indi.adaLive = false; if (indi3 == 'komp') { if (jenisMaen == 'training' || mapKe == 11) { backOrangMati(); } else { backOgreMati(); } if (adaApiKehidupan == true && jenisMaen != 'training' && indi.ajenis != 'api') { masihNyala = false; i = 0; while (i <= charaMusuh - 1) { if (accuracyMusuh[i] == 0) { if (posMusuhJ[i] != 999) { masihNyala = true; } } ++i; } if (masihNyala == false) { ++killed; --bykMusuh; liveMusuh[indi2] = 0; mapping[posMusuhJ[indi2]][posMusuhI[indi2]] = 1; posMusuhJ[indi2] = 999; posMusuhI[indi2] = 999; if (indi2 == pemimpin) { cekLanjutLevel(); } } else { indi.hidup = true; k = indi2; ++levelMusuh[k]; liveMusuh[k] = Math.ceil(levelMusuh[k] * xincLive[k] * 25); totLiveMusuh[k] = liveMusuh[k]; attackMusuh[k] = Math.ceil(levelMusuh[k] * xincAttack[k] * 10); defenseMusuh[k] = Math.ceil(levelMusuh[k] * xincDefense[k] * 5); auraMusuh[k] = Math.ceil(levelMusuh[k] * xincAura[k] * 10); totAuraMusuh[k] = auraMusuh[k]; moveMusuh[k] = false; actionMusuh[k] = false; masihAktif[k] = true; maxMusuh[k] = levelMusuh[k] * 500; } } else { i = 1; while (i <= 5) { if (itemMusuh[indi2][i] == 11) { if (xpunyaItem[indi2][itemMusuh[indi2][i]] >= 1) { --xpunyaItem[indi2][itemMusuh[indi2][i]]; indi.adaLive = true; } } ++i; } if (indi.adaLive == true && indi4 != 'jurang') { indi.hidup = true; k = indi2; ++levelMusuh[k]; liveMusuh[k] = Math.ceil(levelMusuh[k] * xincLive[k] * 25); totLiveMusuh[k] = liveMusuh[k]; attackMusuh[k] = Math.ceil(levelMusuh[k] * xincAttack[k] * 10); defenseMusuh[k] = Math.ceil(levelMusuh[k] * xincDefense[k] * 5); auraMusuh[k] = Math.ceil(levelMusuh[k] * xincAura[k] * 10); totAuraMusuh[k] = auraMusuh[k]; moveMusuh[k] = false; actionMusuh[k] = false; masihAktif[k] = true; maxMusuh[k] = levelMusuh[k] * 500; } else { indi.adaLive = false; ++killed; --bykMusuh; liveMusuh[indi2] = 0; mapping[posMusuhJ[indi2]][posMusuhI[indi2]] = 1; posMusuhJ[indi2] = 999; posMusuhI[indi2] = 999; if (indi2 == pemimpin) { cekLanjutLevel(); } } } } else { if (indi == 3) { } else { backOrangMati(); } i = 1; while (i <= 5) { if (itemJagoan[indi2][i] == 11) { if (punyaItem[11] >= 1) { --punyaItem[11]; indi.adaLive = true; } } ++i; } if (indi.adaLive == true && indi4 != 'jurang') { indi.hidup = true; k = indi2; ++levelJagoan[k]; liveJagoan[k] = Math.ceil(levelJagoan[k] * incLive[k] * 25); totLiveJagoan[k] = liveJagoan[k]; attackJagoan[k] = Math.ceil(levelJagoan[k] * incAttack[k] * 10); defenseJagoan[k] = Math.ceil(levelJagoan[k] * incDefense[k] * 5); auraJagoan[k] = Math.ceil(levelJagoan[k] * incAura[k] * 10); totAuraJagoan[k] = auraJagoan[k]; moveJagoan[k] = false; actionJagoan[k] = false; masihAktif[k] = true; maxJagoan[k] = levelJagoan[k] * 500; } else { indi.adaLive = false; liveJagoan[indi2] = 0; mapping[posJagoanJ[indi2]][posJagoanI[indi2]] = 1; posJagoanJ[indi2] = 999; posJagoanI[indi2] = 999; } } if (indi4 == 'jurang') { if (indi3 == 'komp') { liveMusuh[indi2] = 0; } else { liveJagoan[indi2] = 0; } turunKebawah = true; } else { turunKebawah = false; } if (indi3 == 'komp') { indi.xindi2 = -99; } else { indi.xindi2 = indi2; } if (mapKe == 10 && indi2 == pemimpin) { } else { indi.onEnterFrame = enterIndi; } } } function enterIndi() { if (turunKebawah == true) { this._y += this.yspeedChara; ++this.yspeedChara; this._alpha -= 2.5; } else { this._alpha -= 10; } if (this._alpha <= -50) { if (this.xindi2 == -99 && adaApiKehidupan == true && jenisMaen != 'training' && this.ajenis != 'api') { masihNyala = false; i = 0; while (i <= charaMusuh - 1) { if (accuracyMusuh[i] == 0) { if (posMusuhJ[i] != 999) { masihNyala = true; } } ++i; } if (masihNyala == false) { removeMovieClip(this); } else { delete this.onEnterFrame; this.onEnterFrame = enterIndi2; } } else { if (this.adaLive == true) { delete this.onEnterFrame; this.onEnterFrame = enterIndi2; } else { if (jenisMaen == 'training') { if (mapKe >= 9) { if (this.xindi2 == 0 || this.xindi2 == 3) { if (mapKe <= 11) { cekKalahLevel(); } } } else { if (this.xindi2 == 0) { if (mapKe <= 11) { cekKalahLevel(); } } } } else { if (this.xindi2 != -99) { if (mapKe <= 11) { cekKalahLevel(); } } } if (mapKe >= 12) { wwbykJagoan = 5; i = 0; while (i <= charaJagoan - 1) { if (liveJagoan[i] == undefined || isNaN(liveJagoan[i])) { } else { if (liveJagoan[i] <= 0) { --wwbykJagoan; } } ++i; } if (wwbykJagoan <= 0) { cekKalahLevel(); } } removeMovieClip(this); } } } } function enterIndi2() { this._alpha += 10; if (this._alpha >= 100) { backLive(); posX = this._x; posY = this._y; cekAngka2(posX, posY, 'Live Back', 99); delete this.onEnterFrame; } } function enterChara() { tj = xPath[currentPath]; ti = yPath[currentPath]; ubahDalam('tj', 'ti', 'dalam'); namaBaru = 'rumput_mc' + dalam; ambilDalam = panjang * lebar * 3 + _root[namaBaru].getDepth() + 100; ambilDalam2 = _root[namaBaru].getDepth() + 1; this.swapDepths(ambilDalam); aimX = _root[namaBaru]._x + 50; aimY = _root[namaBaru]._y - 20; deltaX = this._x - aimX; deltaY = this._y - aimY; angle = -Math.atan2(deltaX, deltaY) / 0.0174532925199433; if (Math.sqrt(deltaX * deltaX + deltaY * deltaY) > this.speedChara * increaseSpeed) { increaseSpeed -= 0.5; if (increaseSpeed <= 1) { increaseSpeed = 1; } this._y -= this.speedChara * increaseSpeed * Math.cos(angle * 0.0174532925199433); this._x += this.speedChara * increaseSpeed * Math.sin(angle * 0.0174532925199433); } else { if (tipeAnim == 'serang') { if (masukJurang == true) { this._x = aimX; this._y = aimY; this.swapDepths(ambilDalam2); delete this.onEnterFrame; cekMati(this, this.ke, 'jagoan', 'jurang'); } else { this._x = aimX; this._y = aimY; this.swapDepths(ambilDalam); delete this.onEnterFrame; } } else { this._x = aimX; this._y = aimY; ++currentPath; posJagoanJ[current] = xPath[currentPath - 1]; posJagoanI[current] = yPath[currentPath - 1]; ++xcurrentPath; cekPosisi(); this.swapDepths(ambilDalam); if (currentPath > ii) { mySound.stop(); posJagoanJ[current] = xPath[currentPath - 1]; posJagoanI[current] = yPath[currentPath - 1]; _root[xnamaChara].anim.gotoAndStop(1); delete this.onEnterFrame; if (posJagoanJ[current] == posArrowJ && posJagoanI[current] == posArrowI) { cekLanjutLevel(); } else { if (uncontrolJagoan[current] == true || jagoanType[current] == 'musuh') { xresetMove(); deleteMove(); j = posJagoanJ[current]; i = posJagoanI[current]; giliranJagoan(current); } else { giliranJagoan(current); xresetMove(); deleteMove(); setBisa(1, true); j = posJagoanJ[current]; i = posJagoanI[current]; if (moveJagoan[current] == true && actionJagoan[current] == true) { charaWait(); } } } } } } } function enterMusuh() { tj = xPath[currentPath]; ti = yPath[currentPath]; ubahDalam('tj', 'ti', 'dalam'); namaBaru = 'rumput_mc' + dalam; ambilDalam = panjang * lebar * 3 + _root[namaBaru].getDepth() + 100; ambilDalam2 = _root[namaBaru].getDepth() + 1; this.swapDepths(ambilDalam); aimX = _root[namaBaru]._x + 50; aimY = _root[namaBaru]._y - 20; deltaX = this._x - aimX; deltaY = this._y - aimY; angle = -Math.atan2(deltaX, deltaY) / 0.0174532925199433; if (Math.sqrt(deltaX * deltaX + deltaY * deltaY) > this.speedChara * increaseSpeed) { increaseSpeed -= 0.5; if (increaseSpeed <= 1) { increaseSpeed = 1; } this._y -= this.speedChara * increaseSpeed * Math.cos(angle * 0.0174532925199433); this._x += this.speedChara * increaseSpeed * Math.sin(angle * 0.0174532925199433); } else { if (tipeAnim == 'serang') { if (masukJurang == true) { this._x = aimX; this._y = aimY; this.swapDepths(ambilDalam2); delete this.onEnterFrame; cekMati(this, this.ke, 'komp', 'jurang'); } else { this._x = aimX; this._y = aimY; this.swapDepths(ambilDalam); delete this.onEnterFrame; } } else { this._x = aimX; this._y = aimY; ++currentPath; posMusuhJ[current] = xPath[currentPath - 1]; posMusuhI[current] = yPath[currentPath - 1]; ++xcurrentPath; cekPosisi2(); this.swapDepths(ambilDalam); if (currentPath > ii) { mySound.stop(); posMusuhJ[current] = xPath[currentPath - 1]; posMusuhI[current] = yPath[currentPath - 1]; _root[xnamaChara].anim.gotoAndStop(1); delete this.onEnterFrame; giliranMusuh(current); } } } } function zlanjutGame() { delete _root.onMouseDown; removeMovieClip(ballon_mc); } function cekMunculLagi() { if (bykMusuh <= 2) { if (jenisMaen != 'training') { --sudahHabis; i = 0; while (i <= charaMusuh) { if (_root[namaCharaMusuh[i]].hidup != true) { mappJ = posMunculBaruJ[i]; mappI = posMunculBaruI[i]; if (mapping[mappJ][mappI] == 1) { ++bykMusuh; mapping[mappJ][mappI] = wwjenisMusuh[i]; cekObyek2(mappJ, mappI, dalamMusuh[i], i); } } ++i; } delete _root.onMouseDown; ballon = attachMovie('ballon_mc', 'ballon_mc', dalamObjective); ballon._x = 0; ballon._y = 50; ballon.gotoAndStop('map' + mapKe); _root.onMouseDown = function () { ballon.gotoAndStop(ballon._currentframe + 1); }; } } } function lanjutKomp() { if (masihMain == true) { xresetMove(); deleteMove(); ++jalanKomp; if (jalanKomp >= bykMusuh) { deleteMusuh(false); zmasihMenang = true; if (mapKe <= 11) { i = 0; while (i <= charaJagoan - 1) { if (liveJagoan[i] == undefined || isNaN(liveJagoan[i])) { } else { if (liveJagoan[i] <= 0) { zmasihMenang = false; } } ++i; } } else { wwbykJagoan = 5; i = 0; while (i <= charaJagoan - 1) { if (liveJagoan[i] == undefined || isNaN(liveJagoan[i])) { } else { if (liveJagoan[i] <= 0) { --wwbykJagoan; } } ++i; } if (wwbykJagoan <= 0) { zmasihMenang = false; } } if (zmasihMenang == false) { cekKalahLevel(); } else { if (mapKe == 4) { if (sudahHabis >= 1) { cekMunculLagi(); } } bisaKlik = true; i = 0; while (i <= charaJagoan - 1) { if (_root[namaCharaJagoan[i]].hidup == true) { mapping[posJagoanJ[i]][posJagoanI[i]] = 0; } moveJagoan[i] = false; actionJagoan[i] = false; masihAktif[i] = true; undoJagoanJ[i] = posJagoanJ[i]; undoJagoanI[i] = posJagoanI[i]; if (poisonJagoan[i] == true && _root[namaCharaJagoan[i]].hidup == true) { elementSerang = 3; elementDiserang = elementJagoan[i]; if (elementDiserang == kuatElement[elementSerang]) { increseSerang = 1.25; } else { if (elementDiserang == lemahElement[elementSerang]) { increseSerang = 0.75; } else { increseSerang = 1; } } berkurang = Math.floor(increseSerang * liveJagoan[i] / 4); if (berkurang <= 0) { berkurang = random(6) + 5; } liveJagoan[i] -= berkurang; posX = _root[namaCharaJagoan[i]]._x; posY = _root[namaCharaJagoan[i]]._y; cekAngka5(posX, posY, berkurang, i); if (liveJagoan[i] <= 0) { cekMati(_root[namaCharaJagoan[i]], i, 'jagoan'); } } if (stunJagoan[i] == true) { --stunKeJagoan[i]; if (stunKeJagoan[i] == 0) { stunKeJagoan[i] = 3; stunJagoan[i] = false; removeMovieClip(_root[namaCharaJagoan[i]].stun_mc); } } if (poisonJagoan[i] == true) { --poisonKeJagoan[i]; if (poisonKeJagoan[i] == 0) { poisonKeJagoan[i] = 3; poisonJagoan[i] = false; removeMovieClip(_root[namaCharaJagoan[i]].poison_mc); } } if (uncontrolJagoan[i] == true) { --uncontrolKeJagoan[i]; if (uncontrolKeJagoan[i] <= 0) { uncontrolKeJagoan[i] = 3; uncontrolJagoan[i] = false; removeMovieClip(_root[namaCharaJagoan[i]].uncontrol_mc); } } if (slowJagoan[i] == true) { --slowKeJagoan[i]; if (slowKeJagoan[i] == 0) { slowKeJagoan[i] = 3; slowJagoan[i] = false; removeMovieClip(_root[namaCharaJagoan[i]].slow_mc); xrangeJagoan[i] = rangeJagoan[i]; } } ++i; } i = 0; while (i <= charaMusuh - 1) { if (_root[namaCharaMusuh[i]].hidup == true) { mapping[posMusuhJ[i]][posMusuhI[i]] = 0; } moveMusuh[i] = false; actionMusuh[i] = false; musuhAktif[i] = true; if (stunMusuh[i] == true) { --stunKeMusuh[i]; if (stunKeMusuh[i] == 0) { stunKeMusuh[i] = 3; stunMusuh[i] = false; removeMovieClip(_root[namaCharaMusuh[i]].stun_mc); } } if (poisonMusuh[i] == true) { --poisonKeMusuh[i]; if (poisonKeMusuh[i] == 0) { poisonKeMusuh[i] = 3; poisonMusuh[i] = false; removeMovieClip(_root[namaCharaMusuh[i]].poison_mc); } } if (uncontrolMusuh[i] == true) { --uncontrolKeMusuh[i]; if (uncontrolKeMusuh[i] == 0) { uncontrolKeMusuh[i] = 3; uncontrolMusuh[i] = false; removeMovieClip(_root[namaCharaMusuh[i]].uncontrol_mc); } } if (slowMusuh[i] == true) { --slowKeMusuh[i]; if (slowKeMusuh[i] == 0) { slowKeMusuh[i] = 3; slowMusuh[i] = false; removeMovieClip(_root[namaCharaMusuh[i]].slow_mc); xrangeMusuh[i] = rangeMusuh[i]; } } ++i; } ++turn; jalanKomp = 0; jalanKe = 0; gerakSemua = false; xgiliranJagoan(); i = 0; while (i <= charaJagoan - 1) { if (uncontrolJagoan[i] == true || stunJagoan[i] == true) { setBisa4('', false, i); } else { setBisa4('', true, i); } ++i; } if (gerakSemua == false) { bisaKlik = false; i = 0; while (i <= charaJagoan - 1) { if (uncontrolJagoan[i] == true || stunJagoan[i] == true) { setBisa3(3, false, i); } else { setBisa3(3, true, i); } ++i; } cekGiliran(); } else { deleteMusuh(false); } } } else { cekGiliran(); } } } function xgiliranJagoan() { if (bykMusuh <= 0) { cekLanjutLevel(); } else { i = 0; while (i <= charaJagoan - 1) { if (stunJagoan[i] == true && masihAktif[i] == true) { setBisa2(3, false, i); masihAktif[i] = false; } ++i; } i = 0; while (i <= charaJagoan - 1) { if (masihAktif[i] == true && _root[namaCharaJagoan[i]].hidup == true) { if (stunJagoan[i] == false) { adaGerakan = true; gerakSemua = true; giliranJagoan(i); i = charaJagoan + 1; } else { setBisa2(3, false, i); masihAktif[i] = false; i = charaJagoan + 1; } } ++i; } } } function cekGiliran() { if (bykMusuh <= 0) { cekLanjutLevel(); } else { z = 0; while (z <= charaMusuh - 1) { xnamaChara = namaCharaMusuh[z]; if (musuhAktif[z] == true && _root[xnamaChara].hidup == true) { giliranMusuh(z); z = charaMusuh + 1; } ++z; } } } function selesaiLevel() { delete _root.onMouseDown; masihMain = true; cekLanjutLevel(); } function selesaiLevel2() { delete _root.onMouseDown; indi = _root[namaCharaMusuh[pemimpin]]; indi.onEnterFrame = xenterIndi; } function xenterIndi() { this._alpha -= 10; if (this._alpha <= -50) { masihMain = true; cekLanjutLevel(); removeMovieClip(this); } } function cekLanjutLevel() { if (masihMain == true) { masihMain = false; z = 0; while (z <= charaJagoan - 1) { setBisa4('', false, z); ++z; } z = 0; while (z <= charaMusuh - 1) { setBisa5('', false, z); ++z; } bisaTombolAction(false); if (jenisMaen == 'training') { cekTrain(); } else { if ((mapKe == 9 || mapKe == 10) && sudahBallon == false) { sudahBallon = true; delete _root.onMouseDown; ballon = attachMovie('ballon_mc', 'ballon_mc', dalamCompleted); ballon._x = 0; ballon._y = 50; ballon.gotoAndStop('map' + mapKe + 'a'); _root.onMouseDown = function () { ballon.gotoAndStop(ballon._currentframe + 1); }; } else { myMusic.stop(); backMenang(); xpause = true; setBisa(3, false); completed = attachMovie('completed_mc', 'completed_mc', dalamCompleted); completed._x = -50; completed._y = -50; i = 0; while (i <= charaJagoan - 1) { liveJagoan[i] = totLiveJagoan[i]; auraJagoan[i] = totAuraJagoan[i]; ++i; } if (mapKe >= 12) { money += 10 * Math.ceil(30000 / turn) + Math.ceil(5000 * (1 / mapKe)); } else { money += Math.ceil(30000 / turn) + Math.ceil(5000 * (1 / mapKe)); } totalTurn += turn; totalMoney += money; totalKilled += killed; completed.turn = 'TURN: ' + turn; completed.money = 'MONEY GAINED: ' + money; completed.killed = 'KILLED: ' + killed; completed.totalTurn = 'TOTAL TURN: ' + totalTurn; completed.totalMoney = 'TOTAL MONEY: ' + totalMoney; completed.totalKilled = 'TOTAL KILLED: ' + totalKilled; _root.onMouseDown = function () { delete _root.onMouseDown; completed.gotoAndStop(2); pasItem('completed_mc'); itemShow = false; if (mapKe == 1) { tambahanItem = new Array('', 1, 2, 3); banyakTambahan = new Array('', 2, 2, 1); } else { if (mapKe == 2) { tambahanItem = new Array('', 3, 4); banyakTambahan = new Array('', 1, 1); } else { if (mapKe == 3) { tambahanItem = new Array('', 5, 6); banyakTambahan = new Array('', 2, 2); } else { if (mapKe == 4) { tambahanItem = new Array('', 3, 4, 5, 6); banyakTambahan = new Array('', 1, 1, 1, 1); } else { if (mapKe == 5) { punyaWeapon[5] = 1; itemShow = true; tambahanItem = new Array('', 1, 2, 3, 4); banyakTambahan = new Array('', 1, 2, 1, 2); } else { if (mapKe == 6) { punyaWeapon[6] = 1; itemShow = true; tambahanItem = new Array('', 1, 2, 3, 4, 5); banyakTambahan = new Array('', 2, 2, 2, 2, 2); } else { if (mapKe == 7) { tambahanItem = new Array('', 1, 2, 3, 4, 5, 6); banyakTambahan = new Array('', 2, 2, 2, 2, 3, 3); } else { if (mapKe == 8) { tambahanItem = new Array('', 1, 2, 3, 4, 5, 6, 7); banyakTambahan = new Array('', 1, 2, 1, 2, 2, 2, 1); } else { if (mapKe == 9) { itemShow = true; punyaWeapon[7] = 1; tambahanItem = new Array('', 1, 2, 3, 4, 5, 6, 7, 8, 9, 10); banyakTambahan = new Array('', 1, 2, 1, 2, 2, 2, 1, 1, 1, 1); } else { if (mapKe == 10) { tambahanItem = new Array('', 11); banyakTambahan = new Array('', 1); } else { tambahanItem = new Array(); banyakTambahan = new Array(); } } } } } } } } } } i = 1; while (i <= 10) { if (tambahanItem[i] != undefined) { completed_mc['slot' + i].xnama = jenisItem[tambahanItem[i]]; completed_mc['slot' + i].xjumlah = 'x' + banyakTambahan[i]; completed_mc['slot' + i].onRelease = klikCompleted; completed_mc['slot' + i].onRollOver = overCompleted; completed_mc['slot' + i].onRollOut = outCompleted; completed_mc['slot' + i].onReleaseOutside = outCompleted; } else { completed_mc['slot' + i].xnama = ''; completed_mc['slot' + i].xjumlah = ''; } ++i; } completed.next_btn.onRollOver = function () { over(); }; completed.next_btn.onRelease = function () { klik(); if (itemShow == true) { backWeapon(); completed.gotoAndStop(3); if (mapKe == 5) { completed.weapon.gotoAndStop(1); } else { if (mapKe == 6) { completed.weapon.gotoAndStop(2); } else { if (mapKe == 9) { completed.weapon.gotoAndStop(3); } } } itemShow = false; } else { removeMovieClip(completed_mc); bisaTrain = true; if (mapKe < 4) { bykKarakter = 2; } else { if (mapKe < 8) { bykKarakter = 3; } else { if (mapKe >= 11) { bykKarakter = 5; } else { bykKarakter = 4; } } } if (mapKe == 1) { sudahKePeta = true; clearSemua(); gotoAndStop('lone2'); ++mapKe; } else { if (mapKe == 2) { musicPeta(); sudahKePeta = true; clearSemua(); gotoAndStop('dua1'); ++mapKe; } else { if (mapKe == 3) { musicPeta(); sudahKePeta = true; clearSemua(); gotoAndStop('dua3'); ++mapKe; } else { if (mapKe == 4) { sudahKePeta = true; clearSemua(); gotoAndStop('cacte2'); ++mapKe; } else { if (mapKe == 5) { musicPeta(); sudahKePeta = true; clearSemua(); gotoAndStop('dua7'); ++mapKe; } else { if (mapKe == 6) { musicPeta(); sudahKePeta = true; clearSemua(); gotoAndStop('dua9'); ++mapKe; } else { if (mapKe == 7) { musicPeta(); sudahKePeta = true; clearSemua(); gotoAndStop('dua11'); ++mapKe; } else { if (mapKe == 8) { sudahKePeta = true; clearSemua(); gotoAndStop(2786); ++mapKe; } else { if (mapKe == 9) { musicPeta(); sudahKePeta = true; clearSemua(); gotoAndStop('dua17'); ++mapKe; } else { if (mapKe == 10) { sudahKePeta = true; clearSemua(); gotoAndStop(3101); ++mapKe; } else { if (mapKe == 11) { sudahKePeta = true; clearSemua(); gotoAndStop('ksatria2'); ++mapKe; totalMoney += 100000; } else { if (mapKe >= 12) { musicIstana(); if (mapKe >= 18) { clearSemua(); gotoAndStop(5361); } else { if (mapKe == 12 || mapKe == 14 || mapKe == 16) { ++naikLevel; } sudahKePeta = false; clearSemua(); gotoAndStop('dua21'); ++mapKe; } } } } } } } } } } } } } } }; }; } } } else {} } function cekTrain() { musicPeta(); if (mapKe < 5) { keMusuh = 0; } else { keMusuh = 1; } j = 0; while (j <= charaJagoan - 1) { liveJagoan[j] = totLiveJagoan[j]; auraJagoan[j] = totAuraJagoan[j]; ++j; } i = 0; while (i <= keMusuh) { levelJagoan[i + 1] = levelMusuh[i]; expJagoan[i + 1] = expMusuh[i]; liveJagoan[i + 1] = Math.ceil(levelMusuh[i] * xincLive[i] * 25); totLiveJagoan[i + 1] = liveJagoan[i + 1]; attackJagoan[i + 1] = Math.ceil(levelMusuh[i] * xincAttack[i] * 10); defenseJagoan[i + 1] = Math.ceil(levelMusuh[i] * xincDefense[i] * 5); auraJagoan[i + 1] = Math.ceil(levelMusuh[i] * xincAura[i] * 10); totAuraJagoan[i + 1] = auraJagoan[i + 1]; maxJagoan[i + 1] = levelMusuh[i] * 500; rangeJagoan[i + 1] = rangeMusuh[i]; xrangeJagoan[i + 1] = xrangeMusuh[i]; serangJagoan[i + 1] = serangMusuh[i]; accuracyJagoan[i + 1] = accuracyMusuh[i]; speedJagoan[i + 1] = speedMusuh[i]; namaJagoan[i + 1] = namaJagoan[i]; ++i; } sudahKePeta = false; clearSemua(); if (mapKe == 2) { gotoAndStop('xsatu'); } else { if (mapKe == 3) { gotoAndStop('dua1'); } else { if (mapKe == 4) { gotoAndStop('dua3'); } else { if (mapKe == 5) { gotoAndStop('dua5'); } else { if (mapKe == 6) { gotoAndStop('dua7'); } else { if (mapKe == 7) { gotoAndStop('dua9'); } else { if (mapKe == 8) { gotoAndStop('dua11'); } else { if (mapKe == 9 && lewatSini != true) { gotoAndStop('dua13'); } else { if (mapKe == 9 && lewatSini == true) { gotoAndStop('dua15'); } else { if (mapKe == 10) { gotoAndStop('dua17'); } else { if (mapKe == 11) { gotoAndStop('dua19'); } } } } } } } } } } } } function cekKalahLevel() { masihMain = false; z = 0; while (z <= charaJagoan - 1) { setBisa4('', false, z); ++z; } z = 0; while (z <= charaMusuh - 1) { setBisa5('', false, z); ++z; } bisaTombolAction(false); if (jenisMaen == 'training') { cekTrain(); } else { xpause = true; setBisa(3, false); failed = attachMovie('failed_mc', 'failed_mc', dalamCompleted); failed._x = -50; failed._y = -50; i = 0; while (i <= charaJagoan - 1) { liveJagoan[i] = totLiveJagoan[i]; auraJagoan[i] = totAuraJagoan[i]; ++i; } money += 0; totalTurn += turn; totalMoney += money; totalKilled += killed; failed.turn = 'TURN: ' + turn; failed.money = 'MONEY GAINED: ' + money; failed.killed = 'KILLED: ' + killed; failed.totalTurn = 'TOTAL TURN: ' + totalTurn; failed.totalMoney = 'TOTAL MONEY: ' + totalMoney; failed.totalKilled = 'TOTAL KILLED: ' + totalKilled; failed.more_btn.onRollOver = function () { over(); }; failed.more_btn.onRelease = function () { klik(); getURL('http://www.armorgames.com', '_blank'); }; failed.gaming_btn.onRollOver = function () { over(); }; failed.gaming_btn.onRelease = function () { klik(); getURL('http://www.armorblog.com', '_blank'); }; failed.quit_btn.onRollOver = function () { over(); }; failed.quit_btn.onRelease = function () { klik(); delete _root.onMouseDown; removeMovieClip(failed_mc); clearSemua(); gotoAndStop(206); }; failed.replay_btn.onRollOver = function () { over(); }; failed.replay_btn.onRelease = function () { klik(); delete _root.onMouseDown; removeMovieClip(failed_mc); clearSemua(); cekReplay(); }; } } function cekReplay() { i = 0; while (i <= totChara) { levelJagoan[i] = xlevelJagoan[i]; expJagoan[i] = xexpJagoan[i]; ++i; } initMulai(); } function klikCompleted() { klik(); this._visible = false; myStr = new String(this); if (myStr.length == 26) { indi = Number(myStr.substr(myStr.length - 1, 1)); } else { indi = Number(myStr.substr(myStr.length - 2, 2)); } punyaItem[tambahanItem[indi]] += banyakTambahan[indi]; pasItem('completed_mc'); } function overCompleted() { over(); this.gotoAndStop(2); } function outCompleted() { this.gotoAndStop(1); } function pasItem(indi) { i = 1; while (i <= 50) { if (punyaItem[i] > 0 && punyaItem[i] != undefined) { _root[indi].slot_mc['slot' + i].xnama = jenisItem[i]; _root[indi].slot_mc['slot' + i].xjumlah = 'x' + punyaItem[i]; } else { _root[indi].slot_mc['slot' + i].xnama = ''; _root[indi].slot_mc['slot' + i].xjumlah = ''; } ++i; } } function clearSemua() { adaJedaInfo = false; adaJedaMsgBox2 = false; mySound.stop(); delete myListener2.onKeyDown; removeListener(myListener2); clearInterval(idDelay1); clearInterval(idDelay2); removeMovieClip(ballon_mc); removeMovieClip(msgBox_mc2); removeMovieClip(actions_mc); removeMovieClip(angka_mc); removeMovieClip(angka_mc2); removeMovieClip(angka_mc3); removeMovieClip(info_mc); removeMovieClip(info_mc2); wi = dalamAngka1; while (wi <= dalamAngka1 + 100) { removeMovieClip(_root['angka_mc' + wi]); ++wi; } wi = dalamAngka2; while (wi <= dalamAngka2 + 100) { removeMovieClip(_root['angka_mc2' + wi]); ++wi; } wi = dalamAngka3; while (wi <= dalamAngka3 + 100) { removeMovieClip(_root['angka_mc3' + wi]); ++wi; } wi = dalamAngka4; while (wi <= dalamAngka4 + 100) { removeMovieClip(_root['angka_mc4' + wi]); ++wi; } i = 0; while (i <= panjang) { j = 0; while (j <= lebar) { ubahDalam('j', 'i', 'dalam'); namaBaru = 'rumput_mc' + dalam; namaBaru2 = 'obyek_mc' + dalam; removeMovieClip(_root[namaBaru]); removeMovieClip(_root[namaBaru2]); ++j; } ++i; } } stop(); saveChara(); initMulai(); _root.onEnterFrame = function () { if (xpause == false) { if (_root._xmouse < lScroll) { if (_root[batasKanan]._x < bAwal + pKotak) { geserKotak('kanan'); } } if (_root._xmouse > pStage - lScroll) { if (_root[batasKiri]._x > pStage - pKotak * 2) { geserKotak('kiri'); } } if (_root._ymouse < lScroll) { if (_root[batasBawah]._y < bAwal + lKotak * 1.5) { geserKotak('bawah'); } } if (_root._ymouse > lStage - lScroll) { if (_root[batasAtas]._y > lStage - lKotak) { geserKotak('atas'); } } } }; myListener2 = new Object(); myListener2.onKeyDown = function () { if (Key.getCode() == 80) { if (xpause == false) { cekOptions(); } } }; Key.addListener(myListener2); } frame 3945 { function munculChangeItem(indi1, indi2) { xitem = indi1; xchara = indi2; xchange = attachMovie('change_mc', 'change_mc', dalamStatus + 1); xchange._x = 400; xchange._y = 300; xchange.cancel_btn.onRollOver = function () { over(); }; xchange.cancel_btn.onRelease = function () { klik(); removeMovieClip(change_mc); _root.status_mc.back_btn.enabled = true; }; xchange.empty_btn.onRollOver = function () { over(); }; xchange.empty_btn.onRelease = function () { klik(); itemJagoan[xchara - 1][xitem] = 0; removeMovieClip(change_mc); _root.status_mc.ubahSemua(indiPilih); _root.status_mc.back_btn.enabled = true; }; i = 1; while (i <= 50) { if (_root.punyaItem[i] > 0 && _root.punyaItem[i] != undefined) { abil = _root.jenisItem[i]; adaSama = false; j = 1; while (j <= 5) { if (abil == _root.jenisItem[_root.itemJagoan[xchara - 1][j]]) { adaSama = true; } ++j; } if (adaSama == false) { change_mc['slot' + i].xnama = jenisItem[i]; change_mc['slot' + i].xjumlah = 'x' + punyaItem[i]; change_mc['slot' + i].onRelease = klikSlot; change_mc['slot' + i].onRollOver = overSlot; change_mc['slot' + i].onRollOut = outSlot; } else { change_mc['slot' + i].xnama = ''; change_mc['slot' + i].xjumlah = ''; } } else { change_mc['slot' + i].xnama = ''; change_mc['slot' + i].xjumlah = ''; } ++i; } } function klikSlot() { klik(); myStr = new String(this); if (myStr.length == 23) { indi = Number(myStr.substr(myStr.length - 1, 1)); } else { indi = Number(myStr.substr(myStr.length - 2, 2)); } itemJagoan[xchara - 1][xitem] = indi; removeMovieClip(change_mc); _root.status_mc.ubahSemua(indiPilih); _root.status_mc.back_btn.enabled = true; } function overSlot() { over(); this.gotoAndStop(2); } function outSlot() { this.gotoAndStop(1); } function munculChangeSpell(indi1, indi2) { xability = indi1; xchara = indi2; xchange = attachMovie('change_mc', 'change_mc', dalamStatus + 1); xchange._x = 400; xchange._y = 300; xchange.cancel_btn.onRollOver = function () { over(); }; xchange.cancel_btn.onRelease = function () { klik(); removeMovieClip(change_mc); _root.status_mc.back_btn.enabled = true; }; xchange.empty_btn.onRollOver = function () { over(); }; xchange.empty_btn.onRelease = function () { klik(); abilityJagoan[xchara - 1][xability] = 0; removeMovieClip(change_mc); _root.status_mc.ubahSemua(indiPilih); _root.status_mc.back_btn.enabled = true; }; i = 1; while (i <= 50) { if (_root.punyaAbility[i] > 0 && _root.punyaAbility[i] != undefined) { abil = _root.jenisAbility[i]; adaSama = false; j = 1; while (j <= 10) { if (abil == _root.jenisAbility[_root.abilityJagoan[xchara - 1][j]]) { adaSama = true; } ++j; } if (adaSama == false) { change_mc['slot' + i].xnama = jenisAbility[i]; change_mc['slot' + i].xjumlah = ''; change_mc['slot' + i].onRelease = klikSlot2; change_mc['slot' + i].onRollOver = overSlot2; change_mc['slot' + i].onRollOut = outSlot2; } else { change_mc['slot' + i].xnama = ''; change_mc['slot' + i].xjumlah = ''; } } else { change_mc['slot' + i].xnama = ''; change_mc['slot' + i].xjumlah = ''; } ++i; } } function klikSlot2() { klik(); myStr = new String(this); if (myStr.length == 23) { indi = Number(myStr.substr(myStr.length - 1, 1)); } else { indi = Number(myStr.substr(myStr.length - 2, 2)); } abilityJagoan[xchara - 1][xability] = indi; removeMovieClip(change_mc); _root.status_mc.ubahSemua(indiPilih); _root.status_mc.back_btn.enabled = true; } function overSlot2() { over(); this.gotoAndStop(2); } function outSlot2() { this.gotoAndStop(1); } function munculChangeWeapon(indi2) { xchara = indi2; xchange = attachMovie('change_mc', 'change_mc', dalamStatus + 1); xchange._x = 400; xchange._y = 300; xchange.cancel_btn.onRollOver = function () { over(); }; xchange.cancel_btn.onRelease = function () { klik(); removeMovieClip(change_mc); _root.status_mc.back_btn.enabled = true; }; xchange.empty_btn.enabled = false; i = 1; while (i <= 50) { if (_root.punyaWeapon[i] > 0 && _root.punyaWeapon[i] != undefined) { abil = i; adaSama = false; if (abil == _root.jagoanWeapon[xchara - 1]) { adaSama = true; } if (xchara - 1 != 0) { adaSama = true; } if (adaSama == false) { change_mc['slot' + i].xnama = jenisWeapon[i]; change_mc['slot' + i].xjumlah = ''; change_mc['slot' + i].onRelease = klikSlot3; change_mc['slot' + i].onRollOver = overSlot3; change_mc['slot' + i].onRollOut = outSlot3; } else { change_mc['slot' + i].xnama = ''; change_mc['slot' + i].xjumlah = ''; } } else { change_mc['slot' + i].xnama = ''; change_mc['slot' + i].xjumlah = ''; } ++i; } } function klikSlot3() { klik(); myStr = new String(this); if (myStr.length == 23) { indi = Number(myStr.substr(myStr.length - 1, 1)); } else { indi = Number(myStr.substr(myStr.length - 2, 2)); } _root.jagoanWeapon[xchara - 1] = indi; _root.cekAbility(0); removeMovieClip(change_mc); _root.status_mc.ubahSemua(indiPilih); _root.status_mc.back_btn.enabled = true; } function overSlot3() { over(); this.gotoAndStop(2); } function outSlot3() { this.gotoAndStop(1); } stop(); initDalam(); liveJagoan = new Array(); totLiveJagoan = new Array(); attackJagoan = new Array(); defenseJagoan = new Array(); auraJagoan = new Array(); totAuraJagoan = new Array(); maxJagoan = new Array(); namaJagoan = new Array(); incLive = new Array(); incAttack = new Array(); incDefense = new Array(); incAura = new Array(); rangeJagoan = new Array(); xrangeJagoan = new Array(); serangJagoan = new Array(); accuracyJagoan = new Array(); speedJagoan = new Array(); i = 0; while (i <= totChara) { poisonJagoan[i] = false; stunJagoan[i] = false; uncontrolJagoan[i] = false; slowJagoan[i] = false; cekAbility(i); ++i; } jenisLihat = 'peta'; xstatus = attachMovie('status_mc', 'status_mc', dalamStatus); xstatus._x = 400; xstatus._y = 300; } frame 3946 { function aturSaja() { if (jenis == 'langsung') { gotoAndStop(3935); } } stop(); musicIstana(); _root.onMouseDown = function () { jenis = 'dialog'; _root.gotoAndStop(_root._currentframe + 1); }; myListener = new Object(); myListener.onKeyDown = function () { if (Key.getCode() == 83) { delete _root.onMouseDown; delete myListener.onKeyDown; removeListener(myListener); trans_mc.gotoAndPlay(2); jenis = 'langsung'; } }; Key.addListener(myListener); } frame 3983 { musicHoror(); } frame 3987 { function aturSaja() { gotoAndStop(3935); } stop(); delete _root.onMouseDown; delete myListener.onKeyDown; removeListener(myListener); trans_mc.gotoAndPlay(2); } frame 3995 { function aturSaja() { if (jenis == 'langsung') { gotoAndPlay(4126); } } play(); jenis = 'dialog'; musicCombat1(); myListener = new Object(); myListener.onKeyDown = function () { if (Key.getCode() == 83) { delete _root.onMouseDown; delete myListener.onKeyDown; removeListener(myListener); trans_mc.gotoAndPlay(2); jenis = 'langsung'; } }; Key.addListener(myListener); } movieClip 4459 { } movieClip 4462 { frame 10 { stop(); } } frame 4060 { backPedang(); } movieClip 4466 { frame 11 { stop(); } } movieClip 4476 { } frame 4091 { stop(); _root.onMouseDown = function () { _root.gotoAndStop(_root._currentframe + 1); }; } frame 4096 { delete _root.onMouseDown; play(); } frame 4101 { stop(); _root.onMouseDown = function () { _root.gotoAndStop(_root._currentframe + 1); }; } frame 4104 { function aturSaja() { gotoAndStop(4126); } stop(); delete _root.onMouseDown; delete myListener.onKeyDown; removeListener(myListener); trans_mc.gotoAndPlay(2); } frame 4126 { function aturSaja() { if (jenis == 'langsung') { gotoAndStop('ending'); } } stop(); musicIstana(); _root.onMouseDown = function () { jenis = 'dialog'; _root.gotoAndStop(_root._currentframe + 1); }; myListener = new Object(); myListener.onKeyDown = function () { if (Key.getCode() == 83) { delete _root.onMouseDown; delete myListener.onKeyDown; removeListener(myListener); trans_mc.gotoAndPlay(2); jenis = 'langsung'; } }; Key.addListener(myListener); } frame 4175 { delete _root.onMouseDown; delete myListener.onKeyDown; removeListener(myListener); play(); musicCombat1(); } frame 4275 { stop(); _root.onMouseDown = function () { delete _root.onMouseDown; _root.gotoAndStop(_root._currentframe + 1); }; } frame 4276 { play(); } movieClip 4570 { frame 10 { stop(); } } frame 4286 { stop(); gotoAndPlay(4306); } frame 4306 { function aturSaja() { musicIstana(); sudahKePeta = true; gotoAndPlay('dua21'); } play(); musicStory(); quit_btn.onRollOver = function () { over(); }; quit_btn.onRelease = function () { klik(); trans_mc.gotoAndPlay(2); }; } frame 5360 { function aturSaja() { musicIstana(); sudahKePeta = true; gotoAndStop('dua21'); } stop(); trans_mc.gotoAndPlay(2); } frame 5361 { play(); } frame 5540 { function aturSaja() { gotoAndStop(206); } stop(); _root.onMouseDown = function () { delete _root.onMouseDown; trans_mc.gotoAndPlay(2); }; } movieClip 4585 { }




http://swfchan.com/12/55020/info.shtml
Created: 20/4 -2019 23:53:21 Last modified: 20/4 -2019 23:53:21 Server time: 04/05 -2024 17:57:02