Frame 1
play();
Frame 2
stop();
Stage.showMenu = false;
fscommand ("showmenu", false);
logo_mc.gotoAndStop(1);
this.onEnterFrame = function () {
persen = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
logo_mc.persen = persen + "%";
logo_mc.from = ((_root.getBytesLoaded() + " B/") + _root.getBytesTotal()) + " B";
logo_mc.loaderbar.gotoAndStop(persen);
if (persen >= 100) {
logo_mc.persen = "";
logo_mc.from = "";
logo_mc.gotoAndStop(2);
delete this.onEnterFrame;
logo_mc.loaderbar.gotoAndStop("completed");
}
};
Instance of Symbol 3 MovieClip in Frame 2
on (release) {
getURL ("http://www.maxgames.com", "_blank");
}
Frame 4
stop();
Stage.showMenu = false;
fscommand ("showmenu", false);
logo_mc.gotoAndStop(1);
this.onEnterFrame = function () {
persen = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
logo_mc.persen = persen + "%";
logo_mc.from = ((_root.getBytesLoaded() + " B/") + _root.getBytesTotal()) + " B";
logo_mc.loader._xscale = persen;
if (persen >= 100) {
logo_mc.persen = "";
logo_mc.from = "";
logo_mc.gotoAndStop(2);
delete this.onEnterFrame;
logo_mc.loaderbar.gotoAndStop("completed");
}
};
Frame 6
stop();
Frame 10
function ygDiSave() {
namaData = "Empty";
keLevel = 1;
}
function simpanData(dataKe) {
i = 0;
while (i <= simpanSemua.length) {
_root["dadatSimp" + i] = simpanSemua[i] + dataKe;
Cookies = SharedObject.getLocal(_root["dadatSimp" + i], "/");
Cookies.data["dasoData" + i] = eval (simpanSemua[i]);
Cookies.flush();
i++;
}
}
function loadData(dataKe) {
i = 0;
while (i <= simpanSemua.length) {
_root["dadatSimp" + i] = simpanSemua[i] + dataKe;
Cookies = SharedObject.getLocal(_root["dadatSimp" + i], "/");
_root[simpanSemua[i]] = Cookies.data["dasoData" + i];
i++;
}
}
function xloadData(dataKe) {
i = 0;
while (i <= simpanSemua.length) {
_root["dadatSimp" + i] = simpanSemua[i] + dataKe;
Cookies = SharedObject.getLocal(_root["dadatSimp" + i], "/");
_root["c" + simpanSemua[i]] = Cookies.data["dasoData" + i];
i++;
}
}
function backMenu() {
myMusic.stop();
myMusic = new Sound(music);
myMusic.attachSound("backMenu");
myMusic.setVolume(volum1);
myMusic.start(0, 1);
myMusic.onSoundComplete = function () {
backMenu();
};
}
function backPerang() {
myMusic.stop();
myMusic = new Sound(music);
myMusic.attachSound("backPerang");
myMusic.setVolume(volum1);
myMusic.start(0, 1);
myMusic.onSoundComplete = function () {
backPerang();
};
}
function backStory() {
myMusic.stop();
myMusic = new Sound(music);
myMusic.attachSound("backStory");
myMusic.setVolume(volum1);
myMusic.start(0, 1);
myMusic.onSoundComplete = function () {
backStory();
};
}
function over() {
mySound = new Sound(sound);
mySound.attachSound("over");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function klik() {
mySound = new Sound(sound);
mySound.attachSound("klik");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backApi() {
mySound = new Sound(sound);
mySound.attachSound("backApi");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backApi2() {
mySound = new Sound(sound);
mySound.attachSound("backApi2");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backDarah1() {
mySound = new Sound(sound);
mySound.attachSound("backDarah1");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backDarah2() {
mySound = new Sound(sound);
mySound.attachSound("backDarah2");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backKapak() {
mySound = new Sound(sound);
mySound.attachSound("backKapak");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backTombak() {
mySound = new Sound(sound);
mySound.attachSound("backTombak");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backCambuk() {
mySound = new Sound(sound);
mySound.attachSound("backCambuk");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backGada() {
mySound = new Sound(sound);
mySound.attachSound("backGada");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backPisau() {
mySound = new Sound(sound);
mySound.attachSound("backPisau");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backMati() {
rand = random(4) + 1;
mySound = new Sound(sound);
mySound.attachSound("backMati" + rand);
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backPanah() {
mySound = new Sound(sound);
mySound.attachSound("backPanah");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backBatu() {
mySound = new Sound(sound);
mySound.attachSound("backBatu");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backPedang() {
mySound = new Sound(sound);
mySound.attachSound("backPedang");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backSihir() {
mySound = new Sound(sound);
mySound.attachSound("backSihir");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backSihirKena() {
mySound = new Sound(sound);
mySound.attachSound("backSihirKena");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backLedak3() {
mySound = new Sound(sound);
mySound.attachSound("backLedak3");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backEmas() {
mySound = new Sound(sound);
mySound.attachSound("backEmas");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backJatuh() {
mySound = new Sound(sound);
mySound.attachSound("backJatuh");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backKabut() {
mySound = new Sound(sound);
mySound.attachSound("backKabut");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backSembur() {
mySound = new Sound(sound);
mySound.attachSound("backSembur");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backLedak2() {
mySound = new Sound(sound);
mySound.attachSound("backLedak2");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backLoncatApi() {
mySound = new Sound(sound);
mySound.attachSound("backLoncatApi");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backBatuJatuh() {
mySound = new Sound(sound);
mySound.attachSound("backBatuJatuh");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backBatuLoncat() {
mySound = new Sound(sound);
mySound.attachSound("backBatuLoncat");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backMineLoncat() {
mySound = new Sound(sound);
mySound.attachSound("backMineLoncat");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backMagic() {
mySound = new Sound(sound);
mySound.attachSound("backMagic");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backSaljuLoncat() {
mySound = new Sound(sound);
mySound.attachSound("backSaljuLoncat");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backSaljuLoncat2() {
mySound = new Sound(sound);
mySound.attachSound("backSaljuLoncat2");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backCakar() {
mySound = new Sound(sound);
mySound.attachSound("backCakar");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backKeris() {
mySound = new Sound(sound);
mySound.attachSound("backKeris");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backMine() {
mySound = new Sound(sound);
mySound.attachSound("backMine");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backGolokHitam() {
mySound = new Sound(sound);
mySound.attachSound("backGolokHitam");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backEsJatuh() {
mySound = new Sound(sound);
mySound.attachSound("backEsJatuh");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backEsLoncat() {
mySound = new Sound(sound);
mySound.attachSound("backEsLoncat");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backEsBeku() {
mySound = new Sound(sound);
mySound.attachSound("backEsBeku");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backMisil() {
mySound = new Sound(sound);
mySound.attachSound("backMisil");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backPanahDeja() {
mySound = new Sound(sound);
mySound.attachSound("backPanahDeja");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backLaser() {
mySound = new Sound(sound);
mySound.attachSound("backLaser");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backAngin() {
mySound = new Sound(sound);
mySound.attachSound("backAngin");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backSedot() {
mySound = new Sound(sound);
mySound.attachSound("backSedot");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backListrik() {
mySound = new Sound(sound);
mySound.attachSound("backListrik");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backThunder() {
mySound = new Sound(sound);
mySound.attachSound("backThunder");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backEnd() {
mySound = new Sound(sound);
mySound.attachSound("backEnd");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
xsound = attachMovie("sound_mc", "sound", 4);
xmusic = attachMovie("sound_mc", "music", 5);
volum1 = 100;
volum2 = 50;
speedGame = 1;
qualityGame = 1;
awalSekali = true;
xtotZone = new Array("", 3, 4, 5, 6, 7, 8, 9, 10, 11, 2);
ygDiSave();
simpanSemua = new Array("namaData", "keLevel", "tipeLevel");
play();
Frame 265
stop();
backMenu();
gotoAndStop ("awal");
Frame 266
function cekAwal() {
muncul_mc.start_btn.onRollOver = (muncul_mc.credits_btn.onRollOver = (muncul_mc.options_btn.onRollOver = (muncul_mc.help_btn.onRollOver = (muncul_mc.play_btn.onRollOver = function () {
over();
}))));
muncul_mc.start_btn.onRelease = function () {
klik();
gotoAndStop ("new");
};
muncul_mc.credits_btn.onRelease = function () {
klik();
removeMovieClip(menu_mc);
gotoAndStop ("credits");
};
muncul_mc.options_btn.onRelease = function () {
klik();
removeMovieClip(menu_mc);
gotoAndStop ("options");
};
muncul_mc.help_btn.onRelease = function () {
klik();
removeMovieClip(menu_mc);
gotoAndStop ("help");
};
muncul_mc.play_btn.onRelease = function () {
klik();
getURL ("http://www.maxgames.com", "_blank");
};
}
stop();
if (awalSekali == true) {
awalSekali = false;
logo_mc.gotoAndPlay(1);
muncul_mc.gotoAndPlay(1);
} else {
logo_mc.gotoAndStop(1);
muncul_mc.gotoAndStop(71);
}
Instance of Symbol 3 MovieClip in Frame 266
on (release) {
getURL ("http://www.maxgames.com", "_blank");
}
Frame 275
function cekSpeedQuality() {
i = 1;
while (i <= 3) {
this["speed" + i].angka = i;
this["quality" + i].angka = i;
this["speed" + i].gotoAndStop(1);
this["quality" + i].gotoAndStop(1);
this["speed" + i].onRelease = klikSpeed;
this["quality" + i].onRelease = klikQuality;
this["speed" + i].onRollOver = function () {
over();
};
this["quality" + i].onRollOver = function () {
over();
};
i++;
}
this["speed" + _root.speedGame].gotoAndStop(2);
this["quality" + _root.qualityGame].gotoAndStop(2);
}
function klikSpeed() {
klik();
indi = new String(this);
_root.speedGame = Number(indi.substr(indi.length - 1, 1));
cekSpeedQuality();
}
function klikQuality() {
klik();
indi = new String(this);
_root.qualityGame = Number(indi.substr(indi.length - 1, 1));
if (_root.qualityGame == 1) {
_quality = "HIGH";
} else if (_root.qualityGame == 2) {
_quality = "MEDIUM";
} else if (_root.qualityGame == 3) {
_quality = "LOW";
}
cekSpeedQuality();
}
stop();
back_btn.onRollOver = (character_btn.onRollOver = function () {
over();
});
back_btn.onRelease = function () {
klik();
gotoAndStop ("awal");
};
character_btn.onRelease = function () {
klik();
gotoAndStop ("character");
};
bar1_mc.bar_mc._x = Math.ceil((_root.volum1 / 0.434782608695652) - 115);
bar1_mc.bar_mc.onEnterFrame = function () {
_root.volum1 = int(0.434782608695652 * (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.onRelease = (bar1_mc.indi_mc.onReleaseOutside = function () {
over();
stopDrag();
});
bar2_mc.bar_mc._x = Math.ceil((_root.volum2 / 0.434782608695652) - 115);
bar2_mc.bar_mc.onEnterFrame = function () {
_root.volum2 = int(0.434782608695652 * (this._x + 115));
_root.volum3 = int(0.434782608695652 * (this._x + 115));
_root.mySound.setVolume(_root.volum2);
_root.mySound2.setVolume(_root.volum3);
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.onRelease = (bar2_mc.indi_mc.onReleaseOutside = function () {
over();
stopDrag();
});
cekSpeedQuality();
Frame 285
function cekHelp() {
help_mc.gotoAndStop(pilihHelp);
}
stop();
pilihHelp = 1;
back_btn.onRollOver = (next_btn.onRollOver = (prev_btn.onRollOver = function () {
over();
}));
back_btn.onRelease = function () {
klik();
gotoAndStop ("awal");
};
next_btn.onRelease = function () {
klik();
if (pilihHelp < 3) {
pilihHelp++;
}
cekHelp();
};
prev_btn.onRelease = function () {
klik();
if (pilihHelp > 1) {
pilihHelp--;
}
cekHelp();
};
Frame 295
stop();
back_btn.onRollOver = function () {
over();
};
back_btn.onRelease = function () {
klik();
gotoAndStop ("awal");
};
Frame 305
function cekChara() {
profile_mc.gotoAndStop(pilihChara);
xname = weaponKe[pilihChara];
cost = costKe[pilihChara];
live = liveKe[pilihChara];
speed = speedKe[pilihChara];
damage = damageKe[pilihChara];
range = rangeKe[pilihChara];
}
stop();
weaponKe = new Array("", "Knife", "Sword", "Whip", "Axe", "Cudgel", "Catapult", "Arrow", "Spear", "Fire Arrow", "Witch", "Bird's Spear", "Dragon's Flame", "Monkey's Magic", "Bird's Fire Arrow", "Eagle's Fire Ball", "White Snow", "Crocodile", "Kris Dagger", "Giant Dagger", "Pierce Arrow", "Ice Spear", "Super Laser", "Cyclone Magic", "Sucking Demon", "Dark Phoenix", "Rock Devil", "Rock Rain", "Random Mine", "Iceberg Rain", "Missiles", "Laser Beam", "Explotion", "Thunder Bolt", "Shield Destroyer");
costKe = new Array("", 100, 250, 400, 600, 1000, 200, 550, 950, 1400, 2400, 800, 2000, 5200, 1600, 4800, 5800, 7500, 8000, 12000, 15000, 18000, 20000, 22500, 30000, 50000, 60000, 2500, 5000, 9000, 10000, 12500, 15000, 25000, 250000);
liveKe = new Array("", 700, 900, 1200, 1500, 1800, 1000, 1200, 1400, 1800, 2000, 1500, 2000, 2750, 1250, 2250, 4000, 5000, 5750, 6000, 6500, 10000, 15000, 22500, 25000, 45000, 35000, 0, 0, 0, 0, 0, 0, 0, 0);
speedKe = new Array("", 3, 3.5, 4, 4.5, 5, 2, 2.5, 3, 3.5, 4, 4.5, 5, 3.5, 3, 5.5, 4.5, 4.5, 5, 3, 5, 2.5, 6, 3, 3.5, 3, 5, "1-4", 0, "1-4", 10, "5-10", 0, 0, 0);
damageKe = new Array("", 3.5, 5, 7.5, 10, 15, 4, 6, 8, 10, 12, 10, 12.5, 22.5, 15, 25, 35, 50, 55, 60, 75, 30, 90, 120, 200, 400, 350, 25, 50, 0, 750, 75, 800, 2000, 100);
rangeKe = new Array("", 30, 50, 75, 40, 35, 300, 325, 350, 375, 400, 50, 175, 325, 450, 500, 550, 45, 50, 300, 550, 300, 500, 250, 400, 450, 500, 0, 0, 0, 0, 800, 0, 0, 0);
informasiKe = new Array("", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "");
pilihChara = 1;
max = 26;
cekChara();
back_btn.onRollOver = (next_btn.onRollOver = (prev_btn.onRollOver = function () {
over();
}));
back_btn.onRelease = function () {
klik();
gotoAndStop ("options");
};
next_btn.onRelease = function () {
klik();
pilihChara++;
if (pilihChara > max) {
pilihChara = 1;
}
cekChara();
};
prev_btn.onRelease = function () {
klik();
pilihChara--;
if (pilihChara < 1) {
pilihChara = max;
}
cekChara();
};
Frame 315
stop();
if (awalSekali == true) {
awalSekali = false;
logo_mc.gotoAndPlay(1);
muncul_mc.gotoAndPlay(1);
} else {
logo_mc.gotoAndStop(52);
muncul_mc.gotoAndStop(122);
}
back_btn.onRollOver = (character_btn.onRollOver = (new_btn.onRollOver = (load_btn.onRollOver = (demo_btn.onRollOver = function () {
over();
}))));
back_btn.onRelease = function () {
klik();
gotoAndStop ("awal");
};
new_btn.onRelease = function () {
klik();
petamaKali = true;
keLevel = 1;
tipePlay = "play";
removeMovieClip(area_mc);
removeMovieClip(menu_mc);
gotoAndStop ("level");
};
load_btn.onRelease = function () {
klik();
tipePlay = "play";
xjenisData = "load";
gotoAndStop ("load");
};
demo_btn.onRelease = function () {
klik();
petamaKali = true;
rand = random(4) + 5;
tipeLevel = "easy";
keLevel = rand;
keZone = 1;
totZone = xtotZone[keLevel];
tipePlay = "demo";
removeMovieClip(area_mc);
removeMovieClip(menu_mc);
gotoAndStop (381);
};
Frame 325
stop();
if (awalSekali == true) {
awalSekali = false;
logo_mc.gotoAndPlay(1);
muncul_mc.gotoAndPlay(1);
} else {
logo_mc.gotoAndStop(52);
muncul_mc.gotoAndStop(122);
}
back_btn.onRollOver = (easy_btn.onRollOver = (normal_btn.onRollOver = (hard_btn.onRollOver = (extreme_btn.onRollOver = function () {
over();
}))));
back_btn.onRelease = function () {
klik();
gotoAndStop ("new");
};
easy_btn.onRelease = function () {
klik();
petamaKali = true;
keLevel = 1;
tipeLevel = "easy";
tipePlay = "play";
removeMovieClip(area_mc);
removeMovieClip(menu_mc);
gotoAndStop ("intro");
};
normal_btn.onRelease = function () {
klik();
petamaKali = true;
keLevel = 1;
tipeLevel = "normal";
tipePlay = "play";
removeMovieClip(area_mc);
removeMovieClip(menu_mc);
gotoAndStop ("intro");
};
hard_btn.onRelease = function () {
klik();
petamaKali = true;
keLevel = 1;
tipeLevel = "hard";
tipePlay = "play";
removeMovieClip(area_mc);
removeMovieClip(menu_mc);
gotoAndStop ("intro");
};
extreme_btn.onRelease = function () {
klik();
petamaKali = true;
keLevel = 1;
tipeLevel = "extreme";
tipePlay = "play";
removeMovieClip(area_mc);
removeMovieClip(menu_mc);
gotoAndStop ("intro");
};
Frame 335
function aturSaja() {
gotoAndStop (266);
}
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 (cnamaData != undefined) {
this.gotoAndStop(3);
} else {
this.gotoAndStop(2);
}
}
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.cancel_btn.onRollOver = (msgBox_mc.ok_btn.onRollOver = function () {
over();
});
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 (keLevel != undefined) {
gotoAndStop ("xmap");
}
}
}
stop();
outData2();
initData();
if (xjenisData == "save") {
saveload.gotoAndStop(2);
jenis_mc.gotoAndStop(1);
quit_btn.onRollOver = function () {
over();
};
quit_btn.onRelease = function () {
klik();
gotoAndStop ("xmap");
};
} else if (xjenisData == "load") {
saveload.gotoAndStop(1);
jenis_mc.gotoAndStop(2);
quit_btn.onRollOver = function () {
over();
};
quit_btn.onRelease = function () {
klik();
gotoAndStop ("new");
};
}
Frame 345
function lanjutSaja() {
backMenu();
gotoAndStop (351);
}
stop();
backStory();
skip_btn.onRollOver = function () {
over();
};
skip_btn.onRelease = function () {
klik();
backMenu();
gotoAndStop (351);
};
Frame 351
stop();
if (tipeLevel == undefined) {
tipeLevel = "normal";
}
if (keLevel == 10) {
final = "FINAL BATTLE";
} else {
final = "";
}
level = "LEVEL: " + keLevel;
zone = "TOTAL ZONES: " + xtotZone[keLevel];
raja_mc._x = _root["level" + keLevel]._x;
raja_mc._y = _root["level" + keLevel]._y - 25;
start_btn.onRollOver = (save_btn.onRollOver = (quit_btn.onRollOver = function () {
over();
}));
start_btn.onRelease = function () {
klik();
keZone = 1;
totZone = xtotZone[keLevel];
gotoAndStop (381);
};
save_btn.onRelease = function () {
klik();
xjenisData = "save";
gotoAndStop ("save");
};
quit_btn.onRelease = function () {
klik();
gotoAndStop (266);
};
Frame 355
function aturSaja() {
gotoAndStop (266);
}
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 (cnamaData != undefined) {
this.gotoAndStop(3);
} else {
this.gotoAndStop(2);
}
}
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.cancel_btn.onRollOver = (msgBox_mc.ok_btn.onRollOver = function () {
over();
});
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 (keLevel != undefined) {
gotoAndStop ("xmap");
}
}
}
stop();
outData2();
initData();
if (xjenisData == "save") {
saveload.gotoAndStop(2);
jenis_mc.gotoAndStop(1);
quit_btn.onRollOver = function () {
over();
};
quit_btn.onRelease = function () {
klik();
gotoAndStop ("xmap");
};
} 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);
};
}
Frame 381
function initInfo() {
weaponKe = new Array("", "Knife", "Sword", "Whip", "Axe", "Cudgel", "Catapult", "Arrow", "Spear", "Fire Arrow", "Witch", "Bird's Spear", "Dragon's Flame", "Monkey's Magic", "Bird's Fire Arrow", "Eagle's Fire Ball", "White Snow", "Crocodile", "Kris Dagger", "Giant Dagger", "Pierce Arrow", "Ice Spear", "Super Laser", "Cyclone Magic", "Sucking Demon", "Dark Phoenix", "Rock Devil", "Rock Rain", "Random Mine", "Iceberg Rain", "Missiles", "Laser Beam", "Explotion", "Thunder Bolt", "Shield Destroyer");
costKe = new Array("", 100, 250, 400, 600, 1000, 200, 550, 950, 1400, 2400, 800, 2000, 5200, 1600, 4800, 5800, 7500, 8000, 12000, 15000, 18000, 20000, 22500, 30000, 50000, 60000, 2500, 5000, 9000, 10000, 12500, 15000, 25000, 250000);
liveKe = new Array("", 700, 900, 1200, 1500, 1800, 1000, 1200, 1400, 1800, 2000, 1500, 2000, 2750, 1250, 2250, 4000, 5000, 5750, 6000, 6500, 10000, 15000, 22500, 25000, 45000, 35000, 0, 0, 0, 0, 0, 0, 0, 0);
speedKe = new Array("", 3, 3.5, 4, 4.5, 5, 2, 2.5, 3, 3.5, 4, 4.5, 5, 3.5, 3, 5.5, 4.5, 4.5, 5, 3, 5, 2.5, 6, 3, 3.5, 3, 5, "1-4", 0, "1-4", 10, "5-10", 0, 0, 0);
damageKe = new Array("", 3.5, 5, 7.5, 10, 15, 4, 6, 8, 10, 12, 10, 12.5, 22.5, 15, 25, 35, 50, 55, 60, 75, 30, 90, 120, 200, 400, 350, 25, 50, 0, 750, 75, 800, 2000, 100);
rangeKe = new Array("", 30, 50, 75, 40, 35, 300, 325, 350, 375, 400, 50, 175, 325, 450, 500, 550, 45, 50, 300, 550, 300, 500, 250, 400, 450, 500, 0, 0, 0, 0, 800, 0, 0, 0);
informasiKe = new Array("", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "");
}
function sudahAkhir() {
msgBox.ok_btn.onRelease = function () {
cekPauseSemua(false);
petamaKali = false;
sedangPause = false;
buatNaik();
dindi = 1;
if (frame_mc["gembok" + dindi]._visible == false) {
frame_mc["kotak" + dindi].gotoAndStop(2);
kotakSekarang = dindi;
cekKotak();
cekBox();
}
removeMovieClip(msgBox_mc);
};
}
function cekKalah() {
sedangPause = true;
cekPauseSemua(true);
clearInterval(idMusuh);
delete myListener.onKeyDown;
removeListener(myListener);
posLedak = 0;
xnyawa1.gotoAndStop(1);
idLedak1 = setInterval(xmeledak, 250);
i = 500;
while (i <= 560) {
if (_root["chara" + i].tipe == 1) {
if (_root["chara" + i].nyawa > 0) {
if (_root["chara" + i].terbang == true) {
_root["chara" + i].gotoAndStop(3);
_root["chara" + i].anim.gotoAndPlay(20);
} else {
_root["chara" + i].gotoAndStop(3);
_root["chara" + i].anim.play;
}
}
}
i++;
}
}
function cekMenang() {
sedangPause = true;
cekPauseSemua(true);
clearInterval(idMusuh);
delete myListener.onKeyDown;
removeListener(myListener);
posLedak = 0;
xnyawa2.gotoAndStop(1);
idLedak2 = setInterval(xmeledak2, 250);
i = 500;
while (i <= 560) {
if (_root["chara" + i].tipe == 2) {
if (_root["chara" + i].nyawa > 0) {
if (_root["chara" + i].terbang == true) {
_root["chara" + i].gotoAndStop(3);
_root["chara" + i].anim.gotoAndPlay(20);
} else {
_root["chara" + i].gotoAndStop(3);
_root["chara" + i].anim.play;
}
}
}
i++;
}
if (keZone == totZone) {
berapa = 5;
istana_mc.anim.gotoAndPlay(2);
i = 500;
while (i <= 509) {
_root["chara" + i].speedX = -(random(6) + 6);
rand = random(2);
if (rand == 0) {
_root["chara" + i].speedY = random(3) + 3;
} else {
_root["chara" + i].speedY = -(random(3) + 3);
}
_root["chara" + i].onEnterFrame = enterLoncat;
i++;
}
} else {
berapa = 11;
}
}
function enterLoncat() {
if (sedangPause == false) {
this._x = this._x + this.speedX;
this._y = this._y + this.speedY;
this.speedY = this.speedY + 0.5;
this._rotation = this._rotation + (this.speedY * 2);
if (this._y > 465) {
this._y = 465;
this._rotation = -180;
cekKabut(this);
cekDarah(this);
cekDarah2(this);
cekDarah3(this);
delete this.onEnterFrame;
}
}
}
function xmeledak() {
backLedak2();
frame_mc.xnyawa1._alpha = frame_mc.xnyawa1._alpha - 10;
if (posLedak > 11) {
clearInterval(idLedak1);
clearSemua();
backMenu();
if (tipePlay == "demo") {
gotoAndStop (266);
} else {
gotoAndStop (383);
}
} else {
ledak = attachMovie("meledak", "meledak" + ledakKe, ledakKe);
ledak._x = random(10);
ledak._y = 50 * posLedak;
}
ledak._xscale = (ledak._yscale = random(50) + 150);
posLedak++;
}
function xmeledak2() {
backLedak2();
frame_mc.xnyawa2._alpha = frame_mc.xnyawa2._alpha - 10;
if (posLedak > berapa) {
clearInterval(idLedak2);
sudahGeser = true;
keZone++;
if (keZone > totZone) {
clearSemua();
keLevel++;
if (keLevel > akhirGame) {
backMenu();
if (tipePlay == "demo") {
gotoAndStop (266);
} else {
gotoAndStop (384);
}
} else {
backMenu();
if (tipePlay == "demo") {
gotoAndStop (266);
} else {
gotoAndStop (382);
}
}
} else if (keZone == totZone) {
akhirZone = true;
cekGeser2();
} else {
cekGeser();
}
} else if (keZone == totZone) {
ledak = attachMovie("meledak", "meledak" + ledakKe, ledakKe);
ledak._x = ((istana_mc._x - 125) + random(50)) - 25;
ledak._y = (istana_mc._y + random(50)) - 25;
ledak._xscale = (ledak._yscale = random(250) + 450);
} else {
ledak = attachMovie("meledak", "meledak" + ledakKe, ledakKe);
ledak._x = 780 + random(10);
ledak._y = 50 * posLedak;
ledak._xscale = (ledak._yscale = random(50) + 150);
}
posLedak++;
}
function cekGeser2() {
dalamArea = areaKe + keZone;
if ((((((keZone == 1) || (keZone == 3)) || (keZone == 5)) || (keZone == 7)) || (keZone == 9)) || (keZone == 11)) {
xarea2 = attachMovie(("area_mc" + keLevel) + "1", "area_mc" + keZone, dalamArea);
} else {
xarea2 = attachMovie(("area_mc" + keLevel) + "2", "area_mc" + keZone, dalamArea);
}
xarea2._x = 790;
xarea2._y = 300;
xarea2.onEnterFrame = enterArea2;
buatPasukanIstana();
istana = attachMovie("istana_mc", "istana_mc", dalamArea + 1);
istana._x = 1600;
istana._y = 340;
istana.onEnterFrame = enterIstana;
}
function cekGeser() {
dalamArea = areaKe + keZone;
if ((((((keZone == 1) || (keZone == 3)) || (keZone == 5)) || (keZone == 7)) || (keZone == 9)) || (keZone == 11)) {
xarea2 = attachMovie(("area_mc" + keLevel) + "1", "area_mc" + keZone, dalamArea);
} else {
xarea2 = attachMovie(("area_mc" + keLevel) + "2", "area_mc" + keZone, dalamArea);
}
xarea2._x = 790;
xarea2._y = 300;
xarea2.onEnterFrame = enterArea2;
}
function enterIstana() {
this._x = this._x - 10;
i = 500;
while (i <= 509) {
_root["chara" + i]._x = _root["chara" + i]._x - 10;
i++;
}
if (this._x < 790) {
this._x = 790;
delete this.onEnterFrame;
}
}
function enterArea2() {
this._x = this._x - 10;
if (this._x <= 0) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
function enterArea() {
if (sudahGeser == true) {
i = 510;
while (i <= 560) {
_root["chara" + i]._x = _root["chara" + i]._x - 10;
i++;
}
i = 300;
while (i <= 400) {
_root["darah" + i]._x = _root["darah" + i]._x - 10;
i++;
}
i = 1000;
while (i <= 1100) {
_root["panah" + i]._x = _root["panah" + i]._x - 10;
i++;
}
i = 1500;
while (i <= 1800) {
_root["darah" + i]._x = _root["darah" + i]._x - 10;
i++;
}
i = 5000;
while (i <= 5100) {
_root["darah" + i]._x = _root["darah" + i]._x - 10;
i++;
}
i = 3000;
while (i <= 3100) {
_root["bonus" + i]._x = _root["bonus" + i]._x - 10;
i++;
}
this._x = this._x - 10;
if (this._x <= -800) {
delete this.onEnterFrame;
cekPauseSemua(false);
cekLanjutLevel();
}
}
}
function cekLanjutLevel() {
init2();
buatArea();
buatNaik();
listen();
frame_mc.xnyawa1._alpha = 100;
frame_mc.xnyawa2._alpha = 100;
cekKotak();
cekBox();
if (keLevel == 1) {
tambahMusuh = 2;
} else if (keLevel == 2) {
tambahMusuh = 2;
} else if (keLevel == 3) {
tambahMusuh = 3;
} else if (keLevel == 4) {
tambahMusuh = 3;
} else if (keLevel == 5) {
tambahMusuh = 4;
} else if (keLevel == 6) {
tambahMusuh = 4;
} else if (keLevel == 7) {
tambahMusuh = 5;
} else if (keLevel == 8) {
tambahMusuh = 5;
} else if (keLevel == 9) {
tambahMusuh = 6;
} else if (keLevel == 10) {
tambahMusuh = 1;
}
if (tipePlay == "demo") {
tambahMusuh = 3;
}
i = 1;
while (i <= tambahMusuh) {
xcekKeluar(i);
i++;
}
}
function buatFrame() {
frame = attachMovie("frame_mc", "frame_mc", frameKe);
frame._x = -215;
frame._y = 55;
if (keLevel == 10) {
frame_mc.final_mc.gotoAndStop(1);
} else {
frame_mc.final_mc.gotoAndStop(2);
}
if (tipeLevel == "easy") {
frame_mc.tipeLevel = "Easy";
} else if (tipeLevel == "normal") {
frame_mc.tipeLevel = "Normal";
} else if (tipeLevel == "hard") {
frame_mc.tipeLevel = "Hard";
} else if (tipeLevel == "extreme") {
frame_mc.tipeLevel = "Extreme";
}
}
function buatArea() {
i = 1;
while (i <= 12) {
delete _root["area_mc" + i].onEnterFrame;
removeMovieClip(_root["area_mc" + i]);
i++;
}
dalamArea = areaKe + keZone;
if ((((((keZone == 1) || (keZone == 3)) || (keZone == 5)) || (keZone == 7)) || (keZone == 9)) || (keZone == 11)) {
area = attachMovie(("area_mc" + keLevel) + "1", "area_mc" + keZone, dalamArea);
} else {
area = attachMovie(("area_mc" + keLevel) + "2", "area_mc" + keZone, dalamArea);
}
area._x = 0;
area._y = 300;
area.onEnterFrame = enterArea;
}
function buatNaik() {
naik = attachMovie("naik_mc", "naik_mc", naikKe);
naik._x = -500;
naik._y = -500;
}
function buatNaik2() {
naik = attachMovie("naik_mc2", "naik_mc2", naikKe + 1);
naik._x = -500;
naik._y = -500;
frame = attachMovie("demo_mc", "frame_mc", frameKe);
frame._x = -215;
frame._y = 55;
}
function buatPasukanIstana() {
if (keLevel == 10) {
banyakPas = 1;
} else {
banyakPas = 4;
}
i = 1;
while (i <= banyakPas) {
if (keLevel == 1) {
randJenis4 = 7;
} else if (keLevel == 2) {
randJenis4 = 8;
} else if (keLevel == 3) {
randJenis4 = 9;
} else if (keLevel == 4) {
randJenis4 = 10;
} else if (keLevel == 5) {
randJenis4 = 14;
} else if (keLevel == 6) {
randJenis4 = 15;
} else if (keLevel == 7) {
randJenis4 = 16;
} else if (keLevel == 8) {
randJenis4 = 19;
} else if (keLevel == 9) {
randJenis4 = 20;
} else if (keLevel == 10) {
randJenis4 = 25;
}
if (randJenis4 == 1) {
chara = attachMovie("knife_mc3", "chara" + charaKe2, charaKe2);
} else if (randJenis4 == 2) {
chara = attachMovie("sword_mc3", "chara" + charaKe2, charaKe2);
} else if (randJenis4 == 3) {
chara = attachMovie("whip_mc3", "chara" + charaKe2, charaKe2);
} else if (randJenis4 == 4) {
chara = attachMovie("axe_mc3", "chara" + charaKe2, charaKe2);
} else if (randJenis4 == 5) {
chara = attachMovie("cudgel_mc3", "chara" + charaKe2, charaKe2);
} else if (randJenis4 == 6) {
chara = attachMovie("catapult_mc3", "chara" + charaKe2, charaKe2);
} else if (randJenis4 == 7) {
chara = attachMovie("arrow_mc3", "chara" + charaKe2, charaKe2);
} else if (randJenis4 == 8) {
chara = attachMovie("spear_mc3", "chara" + charaKe2, charaKe2);
} else if (randJenis4 == 9) {
chara = attachMovie("fire_mc3", "chara" + charaKe2, charaKe2);
} else if (randJenis4 == 10) {
chara = attachMovie("witch_mc3", "chara" + charaKe2, charaKe2);
} else if (randJenis4 == 11) {
chara = attachMovie("aspear_mc2", "chara" + charaKe2, charaKe2);
chara.terbang = true;
} else if (randJenis4 == 12) {
chara = attachMovie("naga_mc2", "chara" + charaKe2, charaKe2);
chara.terbang = true;
} else if (randJenis4 == 13) {
chara = attachMovie("monyet_mc2", "chara" + charaKe2, charaKe2);
chara.terbang = true;
} else if (randJenis4 == 14) {
chara = attachMovie("bird_mc3", "chara" + charaKe2, charaKe2);
chara.terbang = true;
} else if (randJenis4 == 15) {
chara = attachMovie("eagle_mc3", "chara" + charaKe2, charaKe2);
chara.terbang = true;
} else if (randJenis4 == 16) {
chara = attachMovie("white_mc2", "chara" + charaKe2, charaKe2);
chara.terbang = true;
} else if (randJenis4 == 17) {
chara = attachMovie("crocodile_mc2", "chara" + charaKe2, charaKe2);
} else if (randJenis4 == 18) {
chara = attachMovie("hayam_mc2", "chara" + charaKe2, charaKe2);
chara.terbang = true;
} else if (randJenis4 == 19) {
chara = attachMovie("detro_mc2", "chara" + charaKe2, charaKe2);
chara.terbang = true;
} else if (randJenis4 == 20) {
chara = attachMovie("deja_mc3", "chara" + charaKe2, charaKe2);
chara.terbang = true;
} else if (randJenis4 == 21) {
chara = attachMovie("lawatar_mc2", "chara" + charaKe2, charaKe2);
} else if (randJenis4 == 22) {
chara = attachMovie("super_mc2", "chara" + charaKe2, charaKe2);
chara.terbang = true;
} else if (randJenis4 == 23) {
chara = attachMovie("demoni_mc2", "chara" + charaKe2, charaKe2);
} else if (randJenis4 == 24) {
chara = attachMovie("iblis_mc2", "chara" + charaKe2, charaKe2);
chara.terbang = true;
} else if (randJenis4 == 25) {
chara = attachMovie("dark_mc2", "chara" + charaKe2, charaKe2);
}
chara.terbang = true;
chara.rot = true;
if (rangeKe[randJenis4] >= 300) {
chara.tipeTembak = 2;
} else {
chara.tipeTembak = 1;
}
if (randJenis4 == 23) {
chara.tipeTembak = 2;
chara.demoni = true;
}
chara.range = rangeKe[randJenis4] * 1.25;
if (tipeLevel == "easy") {
if (keLevel == 10) {
chara.nyawa = (liveKe[randJenis4] * 10) * 0.5;
} else {
chara.nyawa = (liveKe[randJenis4] * (keLevel + 3)) * 0.5;
}
} else if (tipeLevel == "normal") {
if (keLevel == 10) {
chara.nyawa = liveKe[randJenis4] * 10;
} else {
chara.nyawa = liveKe[randJenis4] * (keLevel + 3);
}
} else if (tipeLevel == "hard") {
if (keLevel == 10) {
chara.nyawa = (liveKe[randJenis4] * 10) * 1.25;
} else {
chara.nyawa = (liveKe[randJenis4] * (keLevel + 3)) * 1.25;
}
} else if (tipeLevel == "extreme") {
if (keLevel == 10) {
chara.nyawa = (liveKe[randJenis4] * 10) * 1.75;
} else {
chara.nyawa = (liveKe[randJenis4] * (keLevel + 3)) * 1.75;
}
}
chara.damage = damageKe[randJenis4];
chara.speed = 0;
chara.speedY = random(5) + 22;
chara.speedX = random(4) + 6;
chara.speedTurun = 10;
chara.mati = false;
chara.xtipe = randJenis4;
chara.tipe = 2;
if (randJenis4 == 25) {
chara._xscale = (chara._yscale = 75);
} else {
chara._xscale = (chara._yscale = 90);
}
if (i == 1) {
if (randJenis4 == 25) {
chara._x = 1475;
chara._y = 325;
} else {
chara._x = 1545;
chara._y = 225;
}
} else if (i == 2) {
chara._x = 1475;
chara._y = 250;
} else if (i == 3) {
chara._x = 1475;
chara._y = 325;
} else if (i == 4) {
chara._x = 1535;
chara._y = 375;
}
chara._y = chara._y + 15;
chara.onEnterFrame = enterChara2;
charaKe2++;
if (charaKe2 >= 609) {
charaKe2 = 500;
}
i++;
}
}
function init2() {
sedangPause = false;
sudahGeser = false;
masukWar2 = new Array();
if ((keLevel == 1) && (keZone == 1)) {
masukWar1 = new Array(1, 6, 11);
} else if ((keLevel == 1) && (keZone == 2)) {
masukWar1 = new Array(1, 2, 6, 11);
} else if ((keLevel == 1) && (keZone == 3)) {
masukWar1 = new Array(1, 2, 6, 7, 11);
} else if ((keLevel == 2) && (keZone == 1)) {
masukWar1 = new Array(1, 2, 6, 7, 11);
} else if ((keLevel == 2) && (keZone == 2)) {
masukWar1 = new Array(1, 2, 3, 6, 7, 11);
} else if ((keLevel == 2) && (keZone == 3)) {
masukWar1 = new Array(1, 2, 3, 6, 7, 8, 11);
} else if ((keLevel == 2) && (keZone == 4)) {
masukWar1 = new Array(1, 2, 3, 6, 7, 8, 11, 14);
} else if ((keLevel == 3) && (keZone == 1)) {
masukWar1 = new Array(1, 2, 3, 6, 7, 8, 11, 14);
} else if ((keLevel == 3) && (keZone == 2)) {
masukWar1 = new Array(1, 2, 3, 4, 6, 7, 8, 11, 14);
} else if ((keLevel == 3) && (keZone == 3)) {
masukWar1 = new Array(1, 2, 3, 4, 6, 7, 8, 9, 11, 14);
} else if ((keLevel == 3) && (keZone == 4)) {
masukWar1 = new Array(1, 2, 3, 4, 6, 7, 8, 9, 11, 12, 14);
} else if ((keLevel == 3) && (keZone == 5)) {
masukWar1 = new Array(1, 2, 3, 4, 6, 7, 8, 9, 11, 12, 14, 15);
} else if ((keLevel == 4) && (keZone == 1)) {
masukWar1 = new Array(1, 2, 3, 4, 6, 7, 8, 9, 11, 12, 14, 15);
} else if ((keLevel == 4) && (keZone == 2)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 14, 15);
} else if ((keLevel == 4) && (keZone == 3)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15);
} else if ((keLevel == 4) && (keZone == 4)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
} else if ((keLevel == 4) && (keZone == 5)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16);
} else if ((keLevel == 4) && (keZone == 6)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17);
} else if ((keLevel == 5) && (keZone == 1)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17);
} else if ((keLevel == 5) && (keZone == 2)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18);
} else if ((keLevel == 5) && (keZone == 3)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18);
} else if ((keLevel == 5) && (keZone == 4)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 27);
} else if ((keLevel == 5) && (keZone == 5)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 27);
} else if ((keLevel == 5) && (keZone == 6)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 27, 28);
} else if ((keLevel == 5) && (keZone == 7)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 27, 28);
} else if ((keLevel == 6) && (keZone == 1)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 27, 28);
} else if ((keLevel == 6) && (keZone == 2)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 27, 28);
} else if ((keLevel == 6) && (keZone == 3)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 27, 28, 29);
} else if ((keLevel == 6) && (keZone == 4)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 27, 28, 29);
} else if ((keLevel == 6) && (keZone == 5)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 27, 28, 29);
} else if ((keLevel == 6) && (keZone == 6)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 27, 28, 29);
} else if ((keLevel == 6) && (keZone == 7)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 27, 28, 29, 30);
} else if ((keLevel == 6) && (keZone == 8)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 27, 28, 29, 30);
} else if ((keLevel == 7) && (keZone == 1)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 27, 28, 29, 30);
} else if ((keLevel == 7) && (keZone == 2)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 27, 28, 29, 30);
} else if ((keLevel == 7) && (keZone == 3)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 27, 28, 29, 30, 31);
} else if ((keLevel == 7) && (keZone == 4)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 27, 28, 29, 30, 31);
} else if ((keLevel == 7) && (keZone == 5)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 27, 28, 29, 30, 31);
} else if ((keLevel == 7) && (keZone == 6)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 27, 28, 29, 30, 31);
} else if ((keLevel == 7) && (keZone == 7)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 27, 28, 29, 30, 31, 32);
} else if ((keLevel == 7) && (keZone == 8)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 27, 28, 29, 30, 31, 32);
} else if ((keLevel == 7) && (keZone == 9)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 27, 28, 29, 30, 31, 32);
} else if ((keLevel == 8) && (keZone == 1)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 27, 28, 29, 30, 31, 32);
} else if ((keLevel == 8) && (keZone == 2)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 27, 28, 29, 30, 31, 32);
} else if ((keLevel == 8) && (keZone == 3)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 27, 28, 29, 30, 31, 32, 33);
} else if ((keLevel == 8) && (keZone == 4)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 27, 28, 29, 30, 31, 32, 33);
} else if ((keLevel == 8) && (keZone == 5)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 27, 28, 29, 30, 31, 32, 33);
} else if ((keLevel == 8) && (keZone == 6)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 27, 28, 29, 30, 31, 32, 33);
} else if ((keLevel == 8) && (keZone == 7)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 27, 28, 29, 30, 31, 32, 33, 34);
} else if ((keLevel == 8) && (keZone == 8)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 27, 28, 29, 30, 31, 32, 33, 34);
} else if ((keLevel == 8) && (keZone == 9)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 27, 28, 29, 30, 31, 32, 33, 34);
} else if ((keLevel == 8) && (keZone == 10)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 27, 28, 29, 30, 31, 32, 33, 34);
} else if ((keLevel == 9) && (keZone == 1)) {
masukWar1 = new Array(1, 2, 6, 11);
} else if ((keLevel == 9) && (keZone == 2)) {
masukWar1 = new Array(1, 2, 3, 6, 7, 11, 14);
} else if ((keLevel == 9) && (keZone == 3)) {
masukWar1 = new Array(1, 2, 3, 4, 6, 7, 8, 11, 12, 14);
} else if ((keLevel == 9) && (keZone == 4)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14);
} else if ((keLevel == 9) && (keZone == 5)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 27);
} else if ((keLevel == 9) && (keZone == 6)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 27, 28);
} else if ((keLevel == 9) && (keZone == 7)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 27, 28, 29);
} else if ((keLevel == 9) && (keZone == 8)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 27, 28, 29, 30);
} else if ((keLevel == 9) && (keZone == 9)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 27, 28, 29, 30, 31, 32);
} else if ((keLevel == 9) && (keZone == 10)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 27, 28, 29, 30, 31, 32, 33, 34);
} else if ((keLevel == 9) && (keZone == 11)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 27, 28, 29, 30, 31, 32, 33, 34);
} else if ((keLevel == 10) && (keZone == 1)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 27, 28, 29, 30, 31, 32, 33, 34);
} else if ((keLevel == 10) && (keZone == 2)) {
masukWar1 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 27, 28, 29, 30, 31, 32, 33, 34);
}
masukWar2 = masukWar1;
if (keZone >= 2) {
money2 = money2 + (500 * keZone);
}
if (keLevel == 1) {
incNaik = 1.2;
incNaik2 = 1.4;
incNaik3 = 1.3;
xincNaik = 0.8;
xincNaik2 = 1;
xincNaik3 = 0.9;
mundurMusuh = 0.5;
} else if (keLevel == 2) {
incNaik = 1.2;
incNaik2 = 1.4;
incNaik3 = 1.3;
xincNaik = 0.9;
xincNaik2 = 1.1;
xincNaik3 = 1;
mundurMusuh = 0.6;
} else if (keLevel == 3) {
incNaik = 1.2;
incNaik2 = 1.4;
incNaik3 = 1.3;
xincNaik = 1;
xincNaik2 = 1.2;
xincNaik3 = 1.1;
mundurMusuh = 0.7;
} else if (keLevel == 4) {
incNaik = 1.2;
incNaik2 = 1.4;
incNaik3 = 1.3;
xincNaik = 1.1;
xincNaik2 = 1.3;
xincNaik3 = 1.2;
mundurMusuh = 0.8;
} else if (keLevel == 5) {
incNaik = 1.2;
incNaik2 = 1.4;
incNaik3 = 1.3;
xincNaik = 1.2;
xincNaik2 = 1.4;
xincNaik3 = 1.3;
mundurMusuh = 0.9;
} else if (keLevel == 6) {
incNaik = 1.2;
incNaik2 = 1.4;
incNaik3 = 1.3;
xincNaik = 1.3;
xincNaik2 = 1.5;
xincNaik3 = 1.4;
mundurMusuh = 1;
} else if (keLevel == 7) {
incNaik = 1.6;
incNaik2 = 1.8;
incNaik3 = 1.7;
xincNaik = 1.4;
xincNaik2 = 1.6;
xincNaik3 = 1.5;
mundurMusuh = 1.1;
} else if (keLevel == 8) {
incNaik = 1.2;
incNaik2 = 1.4;
incNaik3 = 1.3;
xincNaik = 1.5;
xincNaik2 = 1.7;
xincNaik3 = 1.6;
mundurMusuh = 1.2;
} else if (keLevel == 9) {
incNaik = 1.2;
incNaik2 = 1.4;
incNaik3 = 1.3;
xincNaik = 1.6;
xincNaik2 = 1.8;
xincNaik3 = 1.7;
mundurMusuh = 1.3;
} else if (keLevel == 10) {
incNaik = 1.2;
incNaik2 = 1.4;
incNaik3 = 1.3;
xincNaik = 1.6;
xincNaik2 = 1.8;
xincNaik3 = 1.7;
mundurMusuh = 1.4;
}
if (keLevel == 1) {
nyawa2 = 40;
} else if (keLevel == 2) {
nyawa2 = 50;
} else if (keLevel == 3) {
nyawa2 = 60;
} else if (keLevel == 4) {
nyawa2 = 70;
} else if (keLevel == 5) {
nyawa2 = 80;
} else if (keLevel == 6) {
nyawa2 = 90;
} else if (keLevel == 7) {
nyawa2 = 100;
} else if (keLevel == 8) {
nyawa2 = 110;
} else if (keLevel == 9) {
nyawa2 = 120;
} else if (keLevel == 10) {
nyawa2 = 130;
}
if (keLevel <= 6) {
nyawa2 = nyawa2 + Math.ceil((nyawa2 * keLevel) / 2);
} else if (keLevel <= 9) {
nyawa2 = nyawa2 + Math.ceil((nyawa2 * keLevel) / 4);
} else if (keLevel == 10) {
nyawa2 = nyawa2 + Math.ceil(nyawa2 * keLevel);
}
if (tipePlay == "demo") {
money1 = 7500;
money2 = 2500;
incNaik = 1.4;
incNaik2 = 1.6;
incNaik3 = 1.5;
xincNaik = 1.2;
xincNaik2 = 1.4;
xincNaik3 = 1.3;
mundurMusuh = 0.5;
}
if (keLevel <= 8) {
nyawa2 = nyawa2 + Math.ceil((nyawa2 * keZone) / 2);
} else {
nyawa2 = nyawa2 + Math.ceil((nyawa2 * keZone) / 4);
}
wnyawa1 = nyawa1;
wnyawa2 = nyawa2;
totNyawa2 = nyawa2;
}
function init() {
charaKe = 510;
charaKe2 = 500;
panahKe = 1000;
darahKe = 1500;
darahKe2 = 300;
bonusKe = 3000;
ledakKe = 4000;
mineKe = 5000;
frameKe = 10000;
pauseKe = 20000;
msgBoxKe = 30000;
areaKe = 100;
naikKe = 200;
sedangPause = false;
sudahGeser = false;
totWar = 28;
totWar2 = 28;
totWarx = 34;
naikJauh = 17.5;
naikJauh2 = 16;
soldierKe = 0;
pilihSoldier = new Array();
kotakSekarang = 1;
soldierAmbil = 0;
gaAdaSisa = true;
initInfo();
if (tipePlay == "demo") {
petamaKali = false;
buatNaik2();
} else {
buatFrame();
}
i = 1;
while (i <= totWar) {
frame_mc.xbox_mc["jml" + i] = 0;
frame_mc.xbox_mc["xjml" + i]._alpha = 0;
frame_mc.xbox_mc["box" + i]._alpha = 0;
frame_mc.xbox_mc["naik" + i]._alpha = 0;
frame_mc.xbox_mc["box" + i].gotoAndStop(1);
frame_mc.xbox_mc["box" + i].enabled = false;
i++;
}
if (keLevel == 1) {
nyawa1 = 160;
nyawa2 = 50;
} else if (keLevel == 2) {
nyawa1 = 150;
nyawa2 = 60;
} else if (keLevel == 3) {
nyawa1 = 140;
nyawa2 = 70;
} else if (keLevel == 4) {
nyawa1 = 130;
nyawa2 = 80;
} else if (keLevel == 5) {
nyawa1 = 120;
nyawa2 = 90;
} else if (keLevel == 6) {
nyawa1 = 110;
nyawa2 = 100;
} else if (keLevel == 7) {
nyawa1 = 100;
nyawa2 = 110;
} else if (keLevel == 8) {
nyawa1 = 90;
nyawa2 = 120;
} else if (keLevel == 9) {
nyawa1 = 110;
nyawa2 = 130;
} else if (keLevel == 10) {
nyawa1 = 120;
nyawa2 = 140;
}
if (keLevel <= 6) {
nyawa1 = nyawa1 + Math.ceil((nyawa1 * keLevel) / 2);
nyawa2 = nyawa2 + Math.ceil((nyawa2 * keLevel) / 2);
} else if (keLevel <= 8) {
nyawa1 = nyawa1 + Math.ceil((nyawa1 * keLevel) * 2);
nyawa2 = nyawa2 + Math.ceil((nyawa2 * keLevel) / 1.5);
} else if (keLevel <= 9) {
nyawa1 = nyawa1 + Math.ceil((nyawa1 * keLevel) * 2);
nyawa2 = nyawa2 + Math.ceil((nyawa2 * keLevel) / 5);
} else {
nyawa1 = nyawa1 + Math.ceil((nyawa1 * keLevel) * 2);
nyawa2 = nyawa2 + Math.ceil((nyawa2 * keLevel) * 2);
}
if (tipePlay == "demo") {
money1 = 7500;
money2 = 2500;
incNaik = 1.4;
incNaik2 = 1.6;
incNaik3 = 1.5;
xincNaik = 1.2;
xincNaik2 = 1.4;
xincNaik3 = 1.3;
mundurMusuh = 0.5;
}
wnyawa1 = nyawa1;
wnyawa2 = nyawa2;
totNyawa1 = nyawa1;
totNyawa2 = nyawa2;
buatArea();
if (keLevel > 1) {
buatNaik();
}
listen();
cekKotak();
cekBox();
buatArea2();
dindi = 1;
if (frame_mc["gembok" + dindi]._visible == false) {
frame_mc["kotak" + dindi].gotoAndStop(2);
kotakSekarang = dindi;
cekKotak();
cekBox();
}
}
function buatArea2() {
xarea2 = attachMovie("area" + keLevel, "area" + keLevel, dalamArea - 2);
xarea2._x = 400;
xarea2._y = 350;
}
function cekKotak() {
i = 1;
while (i <= 4) {
frame_mc["kotak" + i].gotoAndStop(1);
frame_mc["kotak" + i].onRelease = klikKotak;
frame_mc["kotak" + i].onRollOver = overKotak;
frame_mc["kotak" + i].onRollOut = outKotak;
frame_mc["kotak" + i].enabled = true;
i++;
}
frame_mc["kotak" + kotakSekarang].gotoAndStop(2);
frame_mc["kotak" + kotakSekarang].enabled = false;
}
function klikKotak() {
myStr = new String(this);
indi = Number(myStr.substr(myStr.length - 1, 1));
this.gotoAndStop(2);
kotakSekarang = indi;
cekKotak();
cekBox();
}
function overKotak() {
this.gotoAndStop(3);
}
function outKotak() {
this.gotoAndStop(1);
}
function cekBox() {
i = 1;
while (i <= totWarx) {
frame_mc.xbox_mc["xjml" + i]._alpha = 0;
frame_mc.xbox_mc["box" + i]._alpha = 0;
frame_mc.xbox_mc["naik" + i]._alpha = 0;
frame_mc.xbox_mc["box" + i].gotoAndStop(1);
frame_mc.xbox_mc["box" + i].enabled = false;
delete frame_mc.xbox_mc["box" + i].onRelease;
delete frame_mc.xbox_mc["box" + i].onRollOver;
delete frame_mc.xbox_mc["box" + i].onRollOut;
i++;
}
i = 1;
while (i <= totWarx) {
if (((((kotakSekarang == 1) && (i <= 10)) || (((kotakSekarang == 2) && (i >= 11)) && (i <= 16))) || (((kotakSekarang == 3) && (i >= 17)) && (i <= 26))) || (((kotakSekarang == 4) && (i >= 27)) && (i <= 36))) {
frame_mc.xbox_mc["xjml" + i]._alpha = 100;
frame_mc.xbox_mc["box" + i]._alpha = 100;
frame_mc.xbox_mc["naik" + i]._alpha = 50;
frame_mc.xbox_mc["box" + i].gotoAndStop(3);
frame_mc.xbox_mc["box" + i].enabled = false;
delete frame_mc.xbox_mc["box" + i].onRelease;
delete frame_mc.xbox_mc["box" + i].onRollOver;
delete frame_mc.xbox_mc["box" + i].onRollOut;
}
i++;
}
xi = 0;
while (xi <= (masukWar1.length - 1)) {
i = masukWar1[xi];
if (((((kotakSekarang == 1) && (i <= 10)) || (((kotakSekarang == 2) && (i >= 11)) && (i <= 16))) || (((kotakSekarang == 3) && (i >= 17)) && (i <= 26))) || (((kotakSekarang == 4) && (i >= 27)) && (i <= 36))) {
frame_mc.xbox_mc["xjml" + i]._alpha = 100;
frame_mc.xbox_mc["box" + i]._alpha = 100;
frame_mc.xbox_mc["naik" + i]._alpha = 50;
frame_mc.xbox_mc["box" + i].gotoAndStop(1);
frame_mc.xbox_mc["box" + i].enabled = true;
frame_mc.xbox_mc["box" + i].onRelease = klikBox;
frame_mc.xbox_mc["box" + i].onRollOver = overBox;
frame_mc.xbox_mc["box" + i].onRollOut = outBox;
}
xi++;
}
i = 1;
while (i <= 4) {
frame["kotak" + i].enabled = false;
frame["kotak" + i]._alpha = 50;
frame["gembok" + i]._visible = true;
i++;
}
xi = 0;
while (xi <= (masukWar1.length - 1)) {
i = masukWar1[xi];
if (i <= 10) {
if (kotakSekarang == 1) {
frame.kotak1.enabled = false;
frame.kotak1._alpha = 100;
frame.gembok1._visible = false;
} else {
frame.kotak1.enabled = true;
frame.kotak1._alpha = 100;
frame.gembok1._visible = false;
}
} else if (i <= 16) {
if (kotakSekarang == 2) {
frame.kotak2.enabled = false;
frame.kotak2._alpha = 100;
frame.gembok2._visible = false;
} else {
frame.kotak2.enabled = true;
frame.kotak2._alpha = 100;
frame.gembok2._visible = false;
}
} else if (i <= 26) {
if (kotakSekarang == 3) {
frame.kotak3.enabled = false;
frame.kotak3._alpha = 100;
frame.gembok3._visible = false;
} else {
frame.kotak3.enabled = true;
frame.kotak3._alpha = 100;
frame.gembok3._visible = false;
}
} else if (i <= 36) {
if (kotakSekarang == 4) {
frame.kotak4.enabled = false;
frame.kotak4._alpha = 100;
frame.gembok4._visible = false;
} else {
frame.kotak4.enabled = true;
frame.kotak4._alpha = 100;
frame.gembok4._visible = false;
}
}
xi++;
}
cekInfo(false);
}
function klikBox() {
myStr = new String(this);
if (myStr.length == 29) {
indi = Number(myStr.substr(myStr.length - 1, 1));
} else {
indi = Number(myStr.substr(myStr.length - 2, 2));
}
if (money1 >= costKe[indi]) {
money1 = money1 - costKe[indi];
if (indi >= 27) {
if (indi == 27) {
magicBatu(1, indi);
} else if (indi == 28) {
magicRanjau(1, indi);
} else if (indi == 29) {
magicEs(1, indi);
} else if (indi == 30) {
magicMisil(1, indi);
} else if (indi == 31) {
magicLaser(1, indi);
} else if (indi == 32) {
magicLedak(1, indi);
} else if (indi == 33) {
magicPetir(1, indi);
} else if (indi == 34) {
magicShield(1, indi);
}
} else {
pilihSoldier[soldierKe] = indi;
jmlSisanya = 0;
i = 1;
while (i <= totWar) {
jmlSisanya = jmlSisanya + frame_mc.xbox_mc["jml" + i];
i++;
}
if (jmlSisanya > 0) {
gaAdaSisa = false;
} else {
gaAdaSisa = true;
}
if (gaAdaSisa == true) {
gaAdaSisa = false;
cekMuncul(indi);
}
frame_mc.xbox_mc["jml" + indi]++;
soldierKe++;
}
} else {
frame_mc.informasi = "Not Enough Funds";
}
}
function cekMuncul(indi) {
frame_mc.xbox_mc["naik" + indi].gotoAndStop(2);
frame_mc.xbox_mc["naik" + indi].jenis = indi;
}
function jagoanDelay(indi) {
jagoanMuncul(indi);
clearInterval(idJagoan);
}
function overBox() {
this.gotoAndStop(2);
myStr = new String(this);
if (myStr.length == 29) {
indi = Number(myStr.substr(myStr.length - 1, 1));
} else {
indi = Number(myStr.substr(myStr.length - 2, 2));
}
cekInfo(true, indi);
}
function outBox() {
this.gotoAndStop(1);
cekInfo(false);
}
function cekInfo(indi, indi2) {
if (indi == false) {
frame_mc.weapon = "Weapon Name";
frame_mc.cost = "$0";
frame_mc.live = 0;
frame_mc.speed = 0;
frame_mc.damage = 0;
frame_mc.range = 0;
frame_mc.informasi = "";
} else {
frame_mc.weapon = weaponKe[indi2];
frame_mc.cost = "$" + costKe[indi2];
frame_mc.live = liveKe[indi2];
frame_mc.speed = speedKe[indi2];
frame_mc.damage = damageKe[indi2];
frame_mc.range = rangeKe[indi2];
frame_mc.informasi = informasiKe[indi2];
}
}
function cekKeluar() {
ambilJenis = new Array();
ambilKe = 0;
ambilJenis2 = new Array();
ambilKe2 = 0;
jmlJagoan = 0;
i = 500;
while (i <= 560) {
if (_root["chara" + i].tipe == 1) {
if (_root["chara" + i].nyawa > 0) {
if ((_root["chara" + i]._x > 50) && (_root["chara" + i]._x < 750)) {
jmlJagoan++;
}
}
}
i++;
}
if (levelGame == "normal") {
si = 0;
while (si <= (masukWar2.length - 1)) {
if (money2 >= costKe[masukWar2[si]]) {
ambilJenis[ambilKe] = masukWar2[si];
ambilKe++;
}
si++;
}
} else if (levelGame == "hard") {
si = masukWar2.length - 1;
while (si >= 0) {
if (ambilKe <= 12) {
if (money2 >= costKe[masukWar2[si]]) {
if (((masukWar2[si] >= 27) && (masukWar2[si] <= 33)) && (jmlJagoan >= 5)) {
ambilJenis2[ambilKe2] = masukWar2[si];
ambilKe2++;
} else if (masukWar2[si] <= 26) {
ambilJenis[ambilKe] = masukWar2[si];
ambilKe++;
}
}
}
si--;
}
} else if (levelGame == "impossible") {
si = masukWar2.length - 1;
while (si >= 0) {
if (ambilKe <= 6) {
if (money2 >= costKe[masukWar2[si]]) {
if (((masukWar2[si] >= 27) && (masukWar2[si] <= 33)) && (jmlJagoan >= 5)) {
ambilJenis2[ambilKe2] = masukWar2[si];
ambilKe2++;
} else if (masukWar2[si] <= 26) {
ambilJenis[ambilKe] = masukWar2[si];
ambilKe++;
}
}
}
si--;
}
}
if (ambilKe > 0) {
randw = random(3);
if ((randw == 0) && (ambilKe2 > 0)) {
randx = random(ambilJenis2.length);
randJenis3 = ambilJenis2[randx];
money2 = money2 - costKe[randJenis3];
} else {
randx = random(ambilJenis.length);
randJenis3 = ambilJenis[randx];
money2 = money2 - costKe[randJenis3];
}
}
if (randJenis3 <= 5) {
setDelay = 1;
} else if (randJenis3 <= 10) {
setDelay = 2;
} else if (randJenis3 <= 13) {
setDelay = 1;
} else if (randJenis3 <= 16) {
setDelay = 2;
} else if (randJenis3 <= 27) {
setDelay = 2;
} else if (randJenis3 <= 38) {
setDelay = 1;
} else {
setDelay = 2;
}
}
function xcekKeluar(indi) {
ambilJenis = new Array();
ambilKe = 0;
si = masukWar2.length - 1;
while (si >= 0) {
if (ambilKe <= 8) {
if (masukWar2[si] <= 26) {
ambilJenis[ambilKe] = masukWar2[si];
ambilKe++;
}
}
si--;
}
randx = random(ambilJenis.length);
randJenis3 = ambilJenis[randx];
musuhMuncul(indi);
}
function musuhMuncul(indi) {
if (sedangPause == false) {
if ((keLevel == 10) && (keZone == 2)) {
rand = random(3);
if (rand >= 1) {
randJenis3 = 26;
} else {
ambilKe = 0;
}
}
if (ambilKe > 0) {
if (randJenis3 >= 27) {
if (randJenis3 == 27) {
magicBatu(2, randJenis3);
} else if (randJenis3 == 28) {
magicRanjau(2, randJenis3);
} else if (randJenis3 == 29) {
magicEs(2, randJenis3);
} else if (randJenis3 == 30) {
magicMisil(2, randJenis3);
} else if (randJenis3 == 31) {
magicLaser(2, randJenis3);
} else if (randJenis3 == 32) {
magicLedak(2, randJenis3);
} else if (randJenis3 == 33) {
magicPetir(2, randJenis3);
} else if (randJenis3 == 34) {
magicShield(2, randJenis3);
}
} else {
if (randJenis3 == 1) {
chara = attachMovie("knife_mc2", "chara" + charaKe, charaKe);
} else if (randJenis3 == 2) {
chara = attachMovie("sword_mc2", "chara" + charaKe, charaKe);
} else if (randJenis3 == 3) {
chara = attachMovie("whip_mc2", "chara" + charaKe, charaKe);
} else if (randJenis3 == 4) {
chara = attachMovie("axe_mc2", "chara" + charaKe, charaKe);
} else if (randJenis3 == 5) {
chara = attachMovie("cudgel_mc2", "chara" + charaKe, charaKe);
} else if (randJenis3 == 6) {
chara = attachMovie("catapult_mc2", "chara" + charaKe, charaKe);
} else if (randJenis3 == 7) {
chara = attachMovie("arrow_mc2", "chara" + charaKe, charaKe);
} else if (randJenis3 == 8) {
chara = attachMovie("spear_mc2", "chara" + charaKe, charaKe);
} else if (randJenis3 == 9) {
chara = attachMovie("fire_mc2", "chara" + charaKe, charaKe);
} else if (randJenis3 == 10) {
chara = attachMovie("witch_mc2", "chara" + charaKe, charaKe);
} else if (randJenis3 == 11) {
chara = attachMovie("aspear_mc2", "chara" + charaKe, charaKe);
chara.terbang = true;
chara._rotation = -60;
} else if (randJenis3 == 12) {
chara = attachMovie("naga_mc2", "chara" + charaKe, charaKe);
chara.terbang = true;
chara._rotation = -60;
} else if (randJenis3 == 13) {
chara = attachMovie("monyet_mc2", "chara" + charaKe, charaKe);
chara.terbang = true;
chara._rotation = -60;
} else if (randJenis3 == 14) {
chara = attachMovie("bird_mc2", "chara" + charaKe, charaKe);
chara.terbang = true;
chara._rotation = -60;
} else if (randJenis3 == 15) {
chara = attachMovie("eagle_mc2", "chara" + charaKe, charaKe);
chara.terbang = true;
chara._rotation = -60;
} else if (randJenis3 == 16) {
chara = attachMovie("white_mc2", "chara" + charaKe, charaKe);
chara.terbang = true;
chara._rotation = -60;
} else if (randJenis3 == 17) {
chara = attachMovie("crocodile_mc2", "chara" + charaKe, charaKe);
} else if (randJenis3 == 18) {
chara = attachMovie("hayam_mc2", "chara" + charaKe, charaKe);
chara.terbang = true;
chara._rotation = -60;
} else if (randJenis3 == 19) {
chara = attachMovie("detro_mc2", "chara" + charaKe, charaKe);
} else if (randJenis3 == 20) {
chara = attachMovie("deja_mc2", "chara" + charaKe, charaKe);
chara.terbang = true;
chara._rotation = -60;
} else if (randJenis3 == 21) {
chara = attachMovie("lawatar_mc2", "chara" + charaKe, charaKe);
} else if (randJenis3 == 22) {
chara = attachMovie("super_mc2", "chara" + charaKe, charaKe);
chara.terbang = true;
chara._rotation = -90;
} else if (randJenis3 == 23) {
chara = attachMovie("demoni_mc2", "chara" + charaKe, charaKe);
} else if (randJenis3 == 24) {
chara = attachMovie("iblis_mc2", "chara" + charaKe, charaKe);
chara.terbang = true;
} else if (randJenis3 == 26) {
chara = attachMovie("rock_mc2", "chara" + charaKe, charaKe);
}
if (chara.terbang != true) {
chara.terbang = false;
}
if (rangeKe[randJenis3] >= 300) {
chara.tipeTembak = 2;
} else {
chara.tipeTembak = 1;
}
if (randJenis3 == 23) {
chara.tipeTembak = 2;
chara.demoni = true;
}
chara.range = rangeKe[randJenis3];
if (tipeLevel == "easy") {
chara.nyawa = (liveKe[randJenis3] * mundurMusuh) * 0.5;
} else if (tipeLevel == "normal") {
chara.nyawa = liveKe[randJenis3] * mundurMusuh;
} else if (tipeLevel == "hard") {
chara.nyawa = (liveKe[randJenis3] * mundurMusuh) * 1.25;
} else if (tipeLevel == "extreme") {
chara.nyawa = (liveKe[randJenis3] * mundurMusuh) * 1.75;
}
chara.damage = damageKe[randJenis3];
chara.speed = speedKe[randJenis3];
chara.speedY = random(5) + 22;
chara.speedX = random(4) + 6;
chara.speedTurun = 10;
chara.mati = false;
chara.xtipe = randJenis3;
chara.tipe = 2;
if (chara.terbang == true) {
if (indi != undefined) {
chara._x = 850 + (50 * indi);
} else {
chara._x = 850 + random(50);
}
chara._y = 270;
} else {
if (indi != undefined) {
chara._x = 850 + (50 * indi);
} else {
chara._x = 850 + random(50);
}
if (chara.tipeTembak == 2) {
chara._y = 490;
} else {
chara._y = 465;
}
}
chara.onEnterFrame = enterChara2;
charaKe++;
if (charaKe >= 560) {
charaKe = 510;
}
}
}
}
}
function cekKeluar2() {
ambilJenis = new Array();
ambilKe = 0;
ambilJenis2 = new Array();
ambilKe2 = 0;
jmlMusuh = 0;
i = 500;
while (i <= 560) {
if (_root["chara" + i].tipe == 2) {
if (_root["chara" + i].nyawa > 0) {
if ((_root["chara" + i]._x > 50) && (_root["chara" + i]._x < 750)) {
jmlMusuh++;
}
}
}
i++;
}
if (levelGame == "normal") {
si = 0;
while (si <= (masukWar1.length - 1)) {
if (money1 >= costKe[masukWar1[si]]) {
ambilJenis[ambilKe] = masukWar1[si];
ambilKe++;
}
si++;
}
} else if (levelGame == "hard") {
si = masukWar1.length - 1;
while (si >= 0) {
if (ambilKe <= 12) {
if (money1 >= costKe[masukWar1[si]]) {
if (((masukWar2[si] >= 27) && (masukWar2[si] <= 33)) && (jmlMusuh >= 5)) {
ambilJenis2[ambilKe2] = masukWar1[si];
ambilKe2++;
} else if (masukWar1[si] <= 26) {
ambilJenis[ambilKe] = masukWar1[si];
ambilKe++;
}
}
}
si--;
}
} else if (levelGame == "impossible") {
si = masukWar1.length - 1;
while (si >= 0) {
if (ambilKe <= 6) {
if (money1 >= costKe[masukWar1[si]]) {
if (((masukWar2[si] >= 27) && (masukWar2[si] <= 33)) && (jmlMusuh >= 5)) {
ambilJenis2[ambilKe2] = masukWar1[si];
ambilKe2++;
} else if (masukWar1[si] <= 26) {
ambilJenis[ambilKe] = masukWar1[si];
ambilKe++;
}
}
}
si--;
}
}
if (ambilKe > 0) {
randw = random(3);
if ((randw == 0) && (ambilKe2 > 0)) {
randx = random(ambilJenis2.length);
randJenis2 = ambilJenis2[randx];
money1 = money1 - costKe[randJenis2];
} else {
randx = random(ambilJenis.length);
randJenis2 = ambilJenis[randx];
money1 = money1 - costKe[randJenis2];
}
}
if (randJenis2 <= 5) {
setDelay2 = 1;
} else if (randJenis2 <= 10) {
setDelay2 = 2;
} else if (randJenis2 <= 13) {
setDelay2 = 1;
} else if (randJenis2 <= 16) {
setDelay2 = 2;
} else if (randJenis2 <= 27) {
setDelay2 = 2;
} else if (randJenis2 <= 38) {
setDelay2 = 1;
} else {
setDelay2 = 2;
}
}
function jagoanMuncul2() {
if (randJenis2 >= 27) {
if (randJenis2 == 27) {
magicBatu(1, randJenis2);
} else if (randJenis2 == 28) {
magicRanjau(1, randJenis2);
} else if (randJenis2 == 29) {
magicEs(1, randJenis2);
} else if (randJenis2 == 30) {
magicMisil(1, randJenis2);
} else if (randJenis2 == 31) {
magicLaser(1, randJenis2);
} else if (randJenis2 == 32) {
magicLedak(1, randJenis2);
} else if (randJenis2 == 33) {
magicPetir(1, randJenis2);
} else if (randJenis2 == 34) {
magicShield(1, randJenis2);
}
} else {
if (randJenis2 == 1) {
chara = attachMovie("knife_mc", "chara" + charaKe, charaKe);
} else if (randJenis2 == 2) {
chara = attachMovie("sword_mc", "chara" + charaKe, charaKe);
} else if (randJenis2 == 3) {
chara = attachMovie("whip_mc", "chara" + charaKe, charaKe);
} else if (randJenis2 == 4) {
chara = attachMovie("axe_mc", "chara" + charaKe, charaKe);
} else if (randJenis2 == 5) {
chara = attachMovie("cudgel_mc", "chara" + charaKe, charaKe);
} else if (randJenis2 == 6) {
chara = attachMovie("catapult_mc", "chara" + charaKe, charaKe);
} else if (randJenis2 == 7) {
chara = attachMovie("arrow_mc", "chara" + charaKe, charaKe);
} else if (randJenis2 == 8) {
chara = attachMovie("spear_mc", "chara" + charaKe, charaKe);
} else if (randJenis2 == 9) {
chara = attachMovie("fire_mc", "chara" + charaKe, charaKe);
} else if (randJenis2 == 10) {
chara = attachMovie("witch_mc", "chara" + charaKe, charaKe);
} else if (randJenis2 == 11) {
chara = attachMovie("aspear_mc", "chara" + charaKe, charaKe);
chara.terbang = true;
chara._rotation = 60;
} else if (randJenis2 == 12) {
chara = attachMovie("naga_mc", "chara" + charaKe, charaKe);
chara.terbang = true;
chara._rotation = 60;
} else if (randJenis2 == 13) {
chara = attachMovie("monyet_mc", "chara" + charaKe, charaKe);
chara.terbang = true;
chara._rotation = 60;
} else if (randJenis2 == 14) {
chara = attachMovie("bird_mc", "chara" + charaKe, charaKe);
chara.terbang = true;
chara._rotation = 60;
} else if (randJenis2 == 15) {
chara = attachMovie("eagle_mc", "chara" + charaKe, charaKe);
chara.terbang = true;
chara._rotation = 60;
} else if (randJenis2 == 16) {
chara = attachMovie("white_mc", "chara" + charaKe, charaKe);
chara.terbang = true;
chara._rotation = 60;
} else if (randJenis2 == 17) {
chara = attachMovie("crocodile_mc", "chara" + charaKe, charaKe);
} else if (randJenis2 == 18) {
chara = attachMovie("hayam_mc", "chara" + charaKe, charaKe);
chara.terbang = true;
chara._rotation = 60;
} else if (randJenis2 == 19) {
chara = attachMovie("detro_mc", "chara" + charaKe, charaKe);
} else if (randJenis2 == 20) {
chara = attachMovie("deja_mc", "chara" + charaKe, charaKe);
chara.terbang = true;
chara._rotation = 60;
} else if (randJenis2 == 21) {
chara = attachMovie("lawatar_mc", "chara" + charaKe, charaKe);
} else if (randJenis2 == 22) {
chara = attachMovie("super_mc", "chara" + charaKe, charaKe);
chara.terbang = true;
chara._rotation = 90;
} else if (randJenis2 == 23) {
chara = attachMovie("demoni_mc", "chara" + charaKe, charaKe);
} else if (randJenis2 == 24) {
chara = attachMovie("iblis_mc", "chara" + charaKe, charaKe);
chara.terbang = true;
}
if (chara.terbang != true) {
chara.terbang = false;
}
if (rangeKe[randJenis2] >= 300) {
chara.tipeTembak = 2;
} else {
chara.tipeTembak = 1;
}
if (randJenis2 == 23) {
chara.tipeTembak = 2;
chara.demoni = true;
}
chara.range = rangeKe[randJenis2];
chara.nyawa = liveKe[randJenis2];
chara.damage = damageKe[randJenis2];
chara.speed = speedKe[randJenis2];
chara.speedY = random(5) + 22;
chara.speedX = random(4) + 6;
chara.speedTurun = 10;
chara.mati = false;
chara.xtipe = randJenis2;
chara.tipe = 1;
if (chara.terbang == true) {
chara._x = -25 - random(25);
chara._y = 270;
} else {
chara._x = -25 - random(25);
if (chara.tipeTembak == 2) {
chara._y = 490;
} else {
chara._y = 465;
}
}
chara.onEnterFrame = enterChara;
charaKe++;
soldierAmbil++;
if (charaKe >= 560) {
charaKe = 510;
}
}
}
function jagoanMuncul() {
randJenis = pilihSoldier[soldierAmbil];
if (randJenis == 1) {
chara = attachMovie("knife_mc", "chara" + charaKe, charaKe);
} else if (randJenis == 2) {
chara = attachMovie("sword_mc", "chara" + charaKe, charaKe);
} else if (randJenis == 3) {
chara = attachMovie("whip_mc", "chara" + charaKe, charaKe);
} else if (randJenis == 4) {
chara = attachMovie("axe_mc", "chara" + charaKe, charaKe);
} else if (randJenis == 5) {
chara = attachMovie("cudgel_mc", "chara" + charaKe, charaKe);
} else if (randJenis == 6) {
chara = attachMovie("catapult_mc", "chara" + charaKe, charaKe);
} else if (randJenis == 7) {
chara = attachMovie("arrow_mc", "chara" + charaKe, charaKe);
} else if (randJenis == 8) {
chara = attachMovie("spear_mc", "chara" + charaKe, charaKe);
} else if (randJenis == 9) {
chara = attachMovie("fire_mc", "chara" + charaKe, charaKe);
} else if (randJenis == 10) {
chara = attachMovie("witch_mc", "chara" + charaKe, charaKe);
} else if (randJenis == 11) {
chara = attachMovie("aspear_mc", "chara" + charaKe, charaKe);
chara.terbang = true;
chara._rotation = 60;
} else if (randJenis == 12) {
chara = attachMovie("naga_mc", "chara" + charaKe, charaKe);
chara.terbang = true;
chara._rotation = 60;
} else if (randJenis == 13) {
chara = attachMovie("monyet_mc", "chara" + charaKe, charaKe);
chara.terbang = true;
chara._rotation = 60;
} else if (randJenis == 14) {
chara = attachMovie("bird_mc", "chara" + charaKe, charaKe);
chara.terbang = true;
chara._rotation = 60;
} else if (randJenis == 15) {
chara = attachMovie("eagle_mc", "chara" + charaKe, charaKe);
chara.terbang = true;
chara._rotation = 60;
} else if (randJenis == 16) {
chara = attachMovie("white_mc", "chara" + charaKe, charaKe);
chara.terbang = true;
chara._rotation = 60;
} else if (randJenis == 17) {
chara = attachMovie("crocodile_mc", "chara" + charaKe, charaKe);
} else if (randJenis == 18) {
chara = attachMovie("hayam_mc", "chara" + charaKe, charaKe);
chara.terbang = true;
chara._rotation = 60;
} else if (randJenis == 19) {
chara = attachMovie("detro_mc", "chara" + charaKe, charaKe);
} else if (randJenis == 20) {
chara = attachMovie("deja_mc", "chara" + charaKe, charaKe);
chara.terbang = true;
chara._rotation = 60;
} else if (randJenis == 21) {
chara = attachMovie("lawatar_mc", "chara" + charaKe, charaKe);
} else if (randJenis == 22) {
chara = attachMovie("super_mc", "chara" + charaKe, charaKe);
chara.terbang = true;
chara._rotation = 90;
} else if (randJenis == 23) {
chara = attachMovie("demoni_mc", "chara" + charaKe, charaKe);
} else if (randJenis == 24) {
chara = attachMovie("iblis_mc", "chara" + charaKe, charaKe);
chara.terbang = true;
}
if (chara.terbang != true) {
chara.terbang = false;
}
if (rangeKe[randJenis] >= 300) {
chara.tipeTembak = 2;
} else {
chara.tipeTembak = 1;
}
if (randJenis == 23) {
chara.tipeTembak = 2;
chara.demoni = true;
}
chara.range = rangeKe[randJenis];
chara.nyawa = liveKe[randJenis];
chara.damage = damageKe[randJenis];
chara.speed = speedKe[randJenis];
chara.speedY = random(5) + 22;
chara.speedX = random(4) + 6;
chara.speedTurun = 10;
chara.mati = false;
chara.xtipe = randJenis;
chara.tipe = 1;
if (chara.terbang == true) {
chara._x = -25 - random(25);
chara._y = 270;
} else {
chara._x = -25 - random(25);
if (chara.tipeTembak == 2) {
chara._y = 490;
} else {
chara._y = 465;
}
}
chara.onEnterFrame = enterChara;
charaKe++;
soldierAmbil++;
frame_mc.xbox_mc["jml" + randJenis]--;
if (pilihSoldier[soldierAmbil] != undefined) {
cekMuncul(pilihSoldier[soldierAmbil]);
}
if (charaKe >= 560) {
charaKe = 510;
}
}
function enterChara() {
if (sedangPause == false) {
if (this.nyawa > 0) {
if (this.beku != true) {
adaJarak = false;
this.diserang = -1;
i = 500;
while (i <= 560) {
if (_root["chara" + i].tipe == 2) {
if (_root["chara" + i]._x > this._x) {
this.jarak = Math.sqrt(Math.pow(this._x - _root["chara" + i]._x, 2) + Math.pow(this._y - _root["chara" + i]._y, 2));
if (this.jarak <= this.range) {
if (_root["chara" + i].beku != true) {
this.diserang = i;
adaJarak = true;
i = 560;
}
}
}
}
i++;
}
if (((adaJarak == false) || (_root["chara" + this.diserang].nyawa <= 0)) || (this._x > _root["chara" + this.diserang]._x)) {
if (this.terbang == true) {
if (this._rotation < 60) {
this._rotation = this._rotation + 15;
}
} else {
this._rotation = 0;
}
this.gotoAndStop(1);
this._x = this._x + this.speed;
if (akhirZone == true) {
batasx = 650;
} else {
batasx = 850;
}
if (this._x >= batasx) {
backLedak3();
nyawa2 = nyawa2 - this.damage;
if (this.xtipe >= 17) {
if (this.terbang == true) {
money1 = money1 + Math.ceil(costKe[this.xtipe]);
} else {
money1 = money1 + Math.ceil(costKe[this.xtipe]);
}
} else if (this.terbang == true) {
money1 = money1 + Math.ceil((costKe[this.xtipe] * incNaik3) * 0.5);
} else {
money1 = money1 + Math.ceil((costKe[this.xtipe] * incNaik3) * 1.25);
}
money2 = money2 + Math.ceil(costKe[this.xtipe] * xincNaik2);
if (batasx == 650) {
ledak = attachMovie("meledak", "meledak" + ledakKe, ledakKe);
ledak._x = this._x;
ledak._y = this._y;
ledak._xscale = (ledak._yscale = random(100) + 200);
}
removeMovieClip(this);
}
} else {
if ((this.terbang == true) && (this.rot == undefined)) {
if (this.tipeTembak == 2) {
adaAngle = false;
if ((_root["chara" + this.diserang].terbang == false) || (_root["chara" + this.diserang].rot == true)) {
tengahX = _root["chara" + this.diserang]._x;
tengahY = _root["chara" + this.diserang]._y;
x1 = this._x - tengahX;
y1 = this._y - tengahY;
sudut = 57.29578 * Math.atan(y1 / x1);
if (((sudut >= -90) && (sudut <= 90)) && (x1 >= 0)) {
this._rotation = sudut + 180;
} else {
this._rotation = sudut;
}
adaAngle = true;
}
if (adaAngle == false) {
this._rotation = 0;
} else if (this._rotation <= -90) {
this._rotation = -90;
}
} else if (this._rotation > 0) {
this._rotation = this._rotation - 15;
} else {
this._rotation = 0;
}
} else {
adaAngle = false;
if ((this.tipeTembak == 2) || (this.rot == true)) {
if (this.demoni != true) {
if (_root["chara" + this.diserang].terbang == true) {
tengahX = _root["chara" + this.diserang]._x;
tengahY = _root["chara" + this.diserang]._y;
x1 = this._x - tengahX;
y1 = this._y - tengahY;
sudut = 57.29578 * Math.atan(y1 / x1);
if (((sudut >= -90) && (sudut <= 90)) && (x1 >= 0)) {
this._rotation = sudut + 180;
} else {
this._rotation = sudut;
}
adaAngle = true;
}
}
}
if (adaAngle == false) {
this._rotation = 0;
} else if (this._rotation <= -90) {
this._rotation = -90;
}
}
this.gotoAndStop(2);
if (this.tipeTembak == 1) {
_root["chara" + this.diserang].nyawa = _root["chara" + this.diserang].nyawa - this.damage;
}
}
} else {
this.anim.stop();
if (this.terbang == true) {
this._y = this._y + this.speedTurun;
this.speedTurun = this.speedTurun + 2;
if (this._y >= 465) {
this._y = 465;
this._rotation = 0;
cekEsLoncat(this);
cekKabut(this);
this.terbang = false;
}
}
if (this._x <= -200) {
removeMovieClip(this);
}
}
} else {
if (this.beku == true) {
this.balok_mc.gotoAndStop(2);
}
if (this.terbang == true) {
if (this._rotation > 0) {
this._rotation = this._rotation - 15;
}
} else {
this._rotation = 0;
}
if (this.mati == false) {
this.mati = true;
if (this.xtipe >= 17) {
if (this.terbang == true) {
money2 = money2 + Math.ceil(costKe[this.xtipe]);
} else {
money2 = money2 + Math.ceil(costKe[this.xtipe]);
}
} else if (this.terbang == true) {
money2 = money2 + Math.ceil((costKe[this.xtipe] * xincNaik) * 0.5);
} else {
money2 = money2 + Math.ceil((costKe[this.xtipe] * xincNaik) * 1.25);
}
}
this.gotoAndStop(3);
if (this.beku == true) {
this.anim.play();
}
if (this.kenaCakar == true) {
this.anim.stop();
tengahX = this._x - this.speedX;
tengahY = this._y - this.speedY;
x1 = this._x - tengahX;
y1 = this._y - tengahY;
sudut = 57.29578 * Math.atan(y1 / x1);
this._rotation = sudut - 90;
this._y = this._y - this.speedY;
this.speedY = this.speedY - 1;
this._x = this._x - this.speedX;
if (this._y >= 510) {
this.anim.gotoAndPlay(35);
this._y = 530;
this._rotation = 0;
cekKabut(this);
cekDarah(this);
cekDarah2(this);
cekDarah3(this);
delete this.onEnterFrame;
}
}
if (this.terbang == true) {
this._y = this._y + this.speedTurun;
this._x = this._x - 2.5;
this.speedTurun = this.speedTurun + 2;
if (this._y >= 465) {
this._y = 465;
this._rotation = 0;
this.anim.gotoAndStop(20);
cekKabut(this);
cekDarah(this);
cekDarah2(this);
cekDarah3(this);
delete this.onEnterFrame;
}
}
if (this._x <= -200) {
removeMovieClip(this);
}
}
}
}
function enterChara2() {
if (sedangPause == false) {
if (this.nyawa > 0) {
if (this.beku != true) {
adaJarak = false;
this.diserang = -1;
i = 500;
while (i <= 560) {
if (_root["chara" + i].tipe == 1) {
if (_root["chara" + i]._x < this._x) {
this.jarak = Math.sqrt(Math.pow(this._x - _root["chara" + i]._x, 2) + Math.pow(this._y - _root["chara" + i]._y, 2));
if (this.jarak <= this.range) {
if (_root["chara" + i].beku != true) {
this.diserang = i;
adaJarak = true;
i = 560;
}
}
}
}
i++;
}
if (((adaJarak == false) || (_root["chara" + this.diserang].nyawa <= 0)) || (this._x < _root["chara" + this.diserang]._x)) {
if ((this.terbang == true) && (this.rot == undefined)) {
if (this._rotation > -60) {
this._rotation = this._rotation - 15;
}
} else {
this._rotation = 0;
}
this.gotoAndStop(1);
this._x = this._x - this.speed;
if (this._x <= -50) {
backLedak3();
nyawa1 = nyawa1 - this.damage;
money1 = money1 + Math.ceil(costKe[this.xtipe] * incNaik2);
if (this.xtipe >= 17) {
if (this.terbang == true) {
money2 = money2 + Math.ceil(costKe[this.xtipe]);
} else {
money2 = money2 + Math.ceil(costKe[this.xtipe]);
}
} else if (this.terbang == true) {
money2 = money2 + Math.ceil((costKe[this.xtipe] * xincNaik3) * 0.5);
} else {
money2 = money2 + Math.ceil((costKe[this.xtipe] * xincNaik3) * 1.25);
}
removeMovieClip(this);
}
} else {
if ((this.terbang == true) && (this.rot == undefined)) {
if (this.tipeTembak == 2) {
adaAngle = false;
if ((_root["chara" + this.diserang].terbang == false) || (_root["chara" + this.diserang].rot == true)) {
tengahX = _root["chara" + this.diserang]._x;
tengahY = _root["chara" + this.diserang]._y;
x1 = this._x - tengahX;
y1 = this._y - tengahY;
sudut = 57.29578 * Math.atan(y1 / x1);
if (((sudut >= -90) && (sudut <= 90)) && (x1 >= 0)) {
this._rotation = sudut;
} else {
this._rotation = sudut + 180;
}
adaAngle = true;
}
if (adaAngle == false) {
this._rotation = 0;
} else if (this._rotation >= 90) {
this._rotation = 90;
}
} else if (this._rotation < 0) {
this._rotation = this._rotation + 15;
} else {
this._rotation = 0;
}
} else {
adaAngle = false;
if ((this.tipeTembak == 2) || (this.rot == true)) {
if (this.demoni != true) {
if (_root["chara" + this.diserang].terbang == true) {
tengahX = _root["chara" + this.diserang]._x;
tengahY = _root["chara" + this.diserang]._y;
x1 = this._x - tengahX;
y1 = this._y - tengahY;
sudut = 57.29578 * Math.atan(y1 / x1);
if (((sudut >= -90) && (sudut <= 90)) && (x1 >= 0)) {
this._rotation = sudut;
} else {
this._rotation = sudut + 180;
}
adaAngle = true;
}
}
}
if (adaAngle == false) {
this._rotation = 0;
} else if (this._rotation >= 90) {
this._rotation = 90;
}
}
this.gotoAndStop(2);
if (this.tipeTembak == 1) {
_root["chara" + this.diserang].nyawa = _root["chara" + this.diserang].nyawa - this.damage;
}
}
} else {
this.anim.stop();
if (this.terbang == true) {
this._y = this._y + this.speedTurun;
this.speedTurun = this.speedTurun + 2;
if (this._y >= 465) {
this._y = 465;
this._rotation = 0;
cekEsLoncat(this);
cekKabut(this);
this.terbang = false;
}
}
if (this._x <= -200) {
removeMovieClip(this);
}
}
} else {
if (this.beku == true) {
this.balok_mc.gotoAndStop(2);
}
if ((this.terbang == true) && (this.rot == undefined)) {
if (this._rotation < 0) {
this._rotation = this._rotation + 15;
}
} else {
this._rotation = 0;
}
if (this.mati == false) {
this.mati = true;
if (this.xtipe >= 17) {
if (this.terbang == true) {
money1 = money1 + Math.ceil(costKe[this.xtipe]);
} else {
money1 = money1 + Math.ceil(costKe[this.xtipe]);
}
cekBonus(this, Math.ceil(costKe[this.xtipe]));
} else if (this.terbang == true) {
money1 = money1 + Math.ceil((costKe[this.xtipe] * incNaik) * 0.75);
cekBonus(this, Math.ceil((costKe[this.xtipe] * incNaik) * 0.5));
} else {
money1 = money1 + Math.ceil((costKe[this.xtipe] * incNaik) * 1.25);
cekBonus(this, Math.ceil((costKe[this.xtipe] * incNaik) * 1.25));
}
}
this.gotoAndStop(3);
if (this.beku == true) {
this.anim.play();
}
if (this.kenaCakar == true) {
this.anim.stop();
tengahX = this._x + this.speedX;
tengahY = this._y - this.speedY;
x1 = this._x - tengahX;
y1 = this._y - tengahY;
sudut = 57.29578 * Math.atan(y1 / x1);
this._rotation = sudut + 90;
this._y = this._y - this.speedY;
this.speedY = this.speedY - 1;
this._x = this._x + this.speedX;
if (this._y >= 510) {
this.anim.gotoAndPlay(35);
this._y = 530;
this._rotation = 0;
cekKabut(this);
cekDarah(this);
cekDarah2(this);
cekDarah3(this);
delete this.onEnterFrame;
}
}
if ((this.terbang == true) && (this.rot == undefined)) {
this._y = this._y + this.speedTurun;
this._x = this._x + 2.5;
this.speedTurun = this.speedTurun + 2;
if (this._y >= 465) {
this._y = 465;
this._rotation = 0;
this.anim.gotoAndStop(20);
cekKabut(this);
cekDarah(this);
cekDarah2(this);
cekDarah3(this);
delete this.onEnterFrame;
}
} else if (this.terbang == true) {
this._y = this._y + this.speedTurun;
this._x = this._x - 2.5;
this.speedTurun = this.speedTurun + 2;
if (this._y >= 485) {
this._y = 485;
this._rotation = 0;
this.anim.gotoAndStop(20);
cekKabut(this);
cekDarah(this);
cekDarah2(this);
cekDarah3(this);
delete this.onEnterFrame;
}
}
if (this._x <= -200) {
removeMovieClip(this);
}
}
}
}
function cekBonus(indi, angka) {
backEmas();
bonus = attachMovie("bonus_mc", "bonus" + bonusKe, bonusKe);
bonus._x = indi._x;
bonus._y = indi._y;
bonus._alpha = 1;
bonus.angka = "+" + angka;
bonus.speed = random(4) + 12;
bonus.speed2 = 10;
bonus.onEnterFrame = enterBonus;
bonusKe++;
if (bonusKe > 3100) {
bonusKe = 3000;
}
}
function enterBonus() {
if (sedangPause == false) {
if (this.speed <= 0) {
this.speed = 0;
}
this._y = this._y - this.speed;
this.speed--;
this._alpha = this._alpha + this.speed2;
if (this._alpha > 300) {
this._alpha = 300;
this.speed2 = -this.speed2;
} else if (this._alpha <= 0) {
removeMovieClip(this);
}
}
}
function cekPanah(indi) {
backPanah();
if (indi.tipe == 1) {
panah = attachMovie("panah_mc1", "panah" + panahKe, panahKe);
} else if (indi.tipe == 2) {
panah = attachMovie("panah_mc2", "panah" + panahKe, panahKe);
}
if (indi._rotation != 0) {
if (indi.terbang == true) {
if (indi.tipe == 1) {
panah._x = ((indi._x + (indi._rotation / 6)) + random(5)) - 10;
} else {
panah._x = ((indi._x + (indi._rotation / 12)) + random(5)) - 10;
}
} else {
panah._x = ((indi._x + (indi._rotation / 3)) + random(5)) - 10;
}
} else {
panah._x = (indi._x + random(5)) - 10;
}
if (indi.terbang == true) {
panah._y = ((indi._y + 10) + random(5)) - 10;
} else {
panah._y = ((indi._y - 15) + random(5)) - 10;
}
panah._xscale = (panah._yscale = 50);
panah._rotation = indi._rotation;
panah.speed = 15;
panah.kena = false;
panah.tipe = indi.tipe;
panah.damage = indi.damage;
panah.terbang = indi.terbang;
if (indi.tipe == 1) {
panah.onEnterFrame = enterPanah;
} else if (indi.tipe == 2) {
panah.onEnterFrame = enterPanah2;
}
panahKe++;
if (panahKe >= 1100) {
panahKe = 1000;
}
}
function cekPanahx(indi) {
backPanah();
if (indi.tipe == 1) {
panah = attachMovie("panah_mc1", "panah" + panahKe, panahKe);
} else if (indi.tipe == 2) {
panah = attachMovie("panah_mc2", "panah" + panahKe, panahKe);
}
if (indi._rotation != 0) {
if (indi.terbang == true) {
if (indi.tipe == 1) {
panah._x = ((indi._x + (indi._rotation / 6)) + random(5)) - 10;
} else {
panah._x = ((indi._x + (indi._rotation / 12)) + random(5)) - 10;
}
} else {
panah._x = ((indi._x + (indi._rotation / 3)) + random(5)) - 10;
}
} else {
panah._x = (indi._x + random(5)) - 10;
}
panah._y = ((indi._y - 15) + random(5)) - 10;
panah._xscale = (panah._yscale = 50);
panah._rotation = indi._rotation;
panah.speed = 15;
panah.speedY = 5;
panah.kena = false;
panah.tipe = indi.tipe;
panah.damage = indi.damage;
panah.terbang = indi.terbang;
if (_root["chara" + indi.diserang].terbang == true) {
panah.onEnterFrame = enterPanah2;
} else {
panah.onEnterFrame = enterPanah2x;
}
panahKe++;
if (panahKe >= 1100) {
panahKe = 1000;
}
}
function cekPanahApi(indi) {
backPanah();
backApi();
if (indi.tipe == 1) {
panah = attachMovie("api_mc1", "panah" + panahKe, panahKe);
} else if (indi.tipe == 2) {
panah = attachMovie("api_mc2", "panah" + panahKe, panahKe);
}
if (indi._rotation != 0) {
if (indi.terbang == true) {
if (indi.tipe == 1) {
panah._x = ((indi._x + (indi._rotation / 6)) + random(5)) - 10;
} else {
panah._x = (((indi._x + 20) + (indi._rotation / 6)) + random(5)) - 10;
}
} else {
panah._x = ((indi._x + (indi._rotation / 3)) + random(5)) - 10;
}
} else {
panah._x = (indi._x + random(5)) - 10;
}
if (indi.terbang == true) {
panah._y = ((indi._y + 10) + random(5)) - 10;
} else {
panah._y = ((indi._y - 15) + random(5)) - 10;
}
panah._xscale = (panah._yscale = 50);
panah._rotation = indi._rotation;
panah.speed = 15;
panah.kena = false;
panah.tipe = indi.tipe;
panah.damage = indi.damage;
panah.terbang = indi.terbang;
if (indi.tipe == 1) {
panah.onEnterFrame = enterPanahApi;
} else if (indi.tipe == 2) {
panah.onEnterFrame = enterPanahApi2;
}
panahKe++;
if (panahKe >= 1100) {
panahKe = 1000;
}
}
function cekPanahDeja(indi) {
backPanahDeja();
if (indi.tipe == 1) {
panah = attachMovie("panah_deja", "panah" + panahKe, panahKe);
} else if (indi.tipe == 2) {
panah = attachMovie("panah_deja2", "panah" + panahKe, panahKe);
}
if (indi._rotation != 0) {
if (indi.terbang == true) {
if (indi.tipe == 1) {
panah._x = ((indi._x + (indi._rotation / 6)) + random(5)) - 10;
} else {
panah._x = (((indi._x + 20) + (indi._rotation / 6)) + random(5)) - 10;
}
} else {
panah._x = ((indi._x + (indi._rotation / 3)) + random(5)) - 10;
}
} else {
panah._x = (indi._x + random(5)) - 10;
}
if (indi.terbang == true) {
panah._y = ((indi._y + 10) + random(5)) - 10;
} else {
panah._y = ((indi._y - 15) + random(5)) - 10;
}
panah._xscale = (panah._yscale = 50);
panah._rotation = indi._rotation;
panah.speed = 30;
panah.kena = false;
panah.tipe = indi.tipe;
panah.damage = indi.damage;
panah.terbang = indi.terbang;
panah.kenax = false;
panah.onEnterFrame = enterPanahDeja;
panahKe++;
if (panahKe >= 1100) {
panahKe = 1000;
}
}
function cekPanahApix(indi) {
backPanah();
backApi();
if (indi.tipe == 1) {
panah = attachMovie("api_mc1", "panah" + panahKe, panahKe);
} else if (indi.tipe == 2) {
panah = attachMovie("api_mc2", "panah" + panahKe, panahKe);
}
if (indi._rotation != 0) {
if (indi.terbang == true) {
if (indi.tipe == 1) {
panah._x = ((indi._x + (indi._rotation / 6)) + random(5)) - 10;
} else {
panah._x = (((indi._x + 20) + (indi._rotation / 6)) + random(5)) - 10;
}
} else {
panah._x = ((indi._x + (indi._rotation / 3)) + random(5)) - 10;
}
} else {
panah._x = (indi._x + random(5)) - 10;
}
if (indi.terbang == true) {
panah._y = ((indi._y + 10) + random(5)) - 10;
} else {
panah._y = ((indi._y - 15) + random(5)) - 10;
}
panah._xscale = (panah._yscale = 50);
panah._rotation = indi._rotation;
panah.speed = 15;
panah.speedY = 5;
panah.kena = false;
panah.tipe = indi.tipe;
panah.damage = indi.damage;
panah.terbang = indi.terbang;
if (_root["chara" + indi.diserang].terbang == true) {
panah.onEnterFrame = enterPanahApi2;
} else {
panah.onEnterFrame = enterPanahApi2x;
}
panahKe++;
if (panahKe >= 1100) {
panahKe = 1000;
}
}
function cekBatu(indi) {
backBatu();
if (indi.tipe == 1) {
panah = attachMovie("batu_mc1", "panah" + panahKe, panahKe);
} else if (indi.tipe == 2) {
panah = attachMovie("batu_mc2", "panah" + panahKe, panahKe);
}
if (indi._rotation != 0) {
if (indi.terbang == true) {
if (indi.tipe == 1) {
panah._x = ((indi._x + (indi._rotation / 6)) + random(5)) - 10;
} else {
panah._x = ((indi._x + (indi._rotation / 12)) + random(5)) - 10;
}
} else {
panah._x = ((indi._x + (indi._rotation / 3)) + random(5)) - 10;
}
} else {
panah._x = (indi._x + random(5)) - 10;
}
if (indi.terbang == true) {
panah._y = ((indi._y + 10) + random(5)) - 10;
} else {
panah._y = ((indi._y - 15) + random(5)) - 10;
}
panah._xscale = (panah._yscale = 50);
panah._rotation = indi._rotation;
panah.speed = 15;
panah.kena = false;
panah.tipe = indi.tipe;
panah.damage = indi.damage;
panah.terbang = indi.terbang;
if (indi.tipe == 1) {
panah.onEnterFrame = enterPanah;
} else if (indi.tipe == 2) {
panah.onEnterFrame = enterPanah2;
}
panahKe++;
if (panahKe >= 1100) {
panahKe = 1000;
}
}
function cekSihir(indi) {
backSihir();
if (indi.tipe == 1) {
panah = attachMovie("sihir1", "panah" + panahKe, panahKe);
} else if (indi.tipe == 2) {
panah = attachMovie("sihir2", "panah" + panahKe, panahKe);
}
if (indi._rotation != 0) {
if (indi.terbang == true) {
if (indi.tipe == 1) {
panah._x = ((indi._x + (indi._rotation / 6)) + random(5)) - 10;
} else {
panah._x = ((indi._x + (indi._rotation / 12)) + random(5)) - 10;
}
} else {
panah._x = ((indi._x + (indi._rotation / 3)) + random(5)) - 10;
}
} else {
panah._x = (indi._x + random(5)) - 10;
}
if (indi.terbang == true) {
panah._y = ((indi._y + 10) + random(5)) - 10;
} else {
panah._y = ((indi._y - 15) + random(5)) - 10;
}
panah._xscale = (panah._yscale = 50);
panah._rotation = indi._rotation;
panah.speed = 15;
panah.kena = false;
panah.tipe = indi.tipe;
panah.damage = indi.damage;
panah.terbang = indi.terbang;
if (indi.tipe == 1) {
panah.onEnterFrame = enterSihir;
} else if (indi.tipe == 2) {
panah.onEnterFrame = enterSihir2;
}
panahKe++;
if (panahKe >= 1100) {
panahKe = 1000;
}
}
function cekSihirx(indi) {
backSihir();
if (indi.tipe == 1) {
panah = attachMovie("sihir1", "panah" + panahKe, panahKe);
} else if (indi.tipe == 2) {
panah = attachMovie("sihir2", "panah" + panahKe, panahKe);
}
if (indi._rotation != 0) {
if (indi.terbang == true) {
if (indi.tipe == 1) {
panah._x = ((indi._x + (indi._rotation / 6)) + random(5)) - 10;
} else {
panah._x = ((indi._x + (indi._rotation / 12)) + random(5)) - 10;
}
} else {
panah._x = ((indi._x + (indi._rotation / 3)) + random(5)) - 10;
}
} else {
panah._x = (indi._x + random(5)) - 10;
}
if (indi.terbang == true) {
panah._y = ((indi._y + 10) + random(5)) - 10;
} else {
panah._y = ((indi._y - 15) + random(5)) - 10;
}
panah._xscale = (panah._yscale = 50);
panah._rotation = indi._rotation;
panah.speed = 15;
panah.speedY = 5;
panah.kena = false;
panah.tipe = indi.tipe;
panah.damage = indi.damage;
panah.terbang = indi.terbang;
if (_root["chara" + indi.diserang].terbang == true) {
panah.onEnterFrame = enterSihir2;
} else {
panah.onEnterFrame = enterSihir2x;
}
panahKe++;
if (panahKe >= 1100) {
panahKe = 1000;
}
}
function cekTombak(indi) {
backTombak();
if (indi.tipe == 1) {
panah = attachMovie("tombak_mc1", "panah" + panahKe, panahKe);
} else if (indi.tipe == 2) {
panah = attachMovie("tombak_mc2", "panah" + panahKe, panahKe);
}
if (indi._rotation != 0) {
if (indi.terbang == true) {
if (indi.tipe == 1) {
panah._x = ((indi._x + (indi._rotation / 6)) + random(5)) - 10;
} else {
panah._x = ((indi._x + (indi._rotation / 12)) + random(5)) - 10;
}
} else {
panah._x = ((indi._x + (indi._rotation / 1.5)) + random(5)) - 10;
}
} else if (indi.tipe == 1) {
panah._x = ((indi._x + 50) + random(5)) - 10;
} else if (indi.tipe == 2) {
panah._x = ((indi._x - 50) + random(5)) - 10;
}
if (indi.terbang == true) {
panah._y = ((indi._y + 10) + random(5)) - 10;
} else {
panah._y = ((indi._y - 15) + random(5)) - 10;
}
panah._xscale = (panah._yscale = 50);
panah._rotation = indi._rotation;
panah.speed = 15;
panah.kena = false;
panah.tipe = indi.tipe;
panah.damage = indi.damage;
panah.tipe = indi.tipe;
panah.terbang = indi.terbang;
if (indi.tipe == 1) {
panah.onEnterFrame = enterPanah;
} else if (indi.tipe == 2) {
panah.onEnterFrame = enterPanah2;
}
panahKe++;
if (panahKe >= 1100) {
panahKe = 1000;
}
}
function cekTombakx(indi) {
backTombak();
if (indi.tipe == 1) {
panah = attachMovie("tombak_mc1", "panah" + panahKe, panahKe);
} else if (indi.tipe == 2) {
panah = attachMovie("tombak_mc2", "panah" + panahKe, panahKe);
}
if (indi._rotation != 0) {
if (indi.terbang == true) {
if (indi.tipe == 1) {
panah._x = ((indi._x + (indi._rotation / 6)) + random(5)) - 10;
} else {
panah._x = ((indi._x + (indi._rotation / 12)) + random(5)) - 10;
}
} else {
panah._x = ((indi._x + (indi._rotation / 1.5)) + random(5)) - 10;
}
} else if (indi.tipe == 1) {
panah._x = ((indi._x + 50) + random(5)) - 10;
} else if (indi.tipe == 2) {
panah._x = ((indi._x - 50) + random(5)) - 10;
}
panah._y = ((indi._y - 15) + random(5)) - 10;
panah._xscale = (panah._yscale = 50);
panah._rotation = indi._rotation;
panah.speed = 15;
panah.speedY = 5;
panah.kena = false;
panah.tipe = indi.tipe;
panah.damage = indi.damage;
panah.terbang = indi.terbang;
if (_root["chara" + indi.diserang].terbang == true) {
panah.onEnterFrame = enterPanah2;
} else {
panah.onEnterFrame = enterPanah2x;
}
panahKe++;
if (panahKe >= 1100) {
panahKe = 1000;
}
}
function cekBolaApi(indi) {
backPanah();
backApi();
if (indi.tipe == 1) {
panah = attachMovie("bola_mc1", "panah" + panahKe, panahKe);
} else if (indi.tipe == 2) {
panah = attachMovie("bola_mc2", "panah" + panahKe, panahKe);
}
if (indi._rotation != 0) {
if (indi.terbang == true) {
if (indi.tipe == 1) {
panah._x = (((indi._x + 20) + (indi._rotation / 6)) + random(5)) - 10;
} else {
panah._x = (((indi._x + 20) + (indi._rotation / 6)) + random(5)) - 10;
}
} else {
panah._x = (((indi._x + 20) + (indi._rotation / 3)) + random(5)) - 10;
}
} else {
panah._x = ((indi._x + 20) + random(5)) - 10;
}
if (indi.terbang == true) {
panah._y = ((indi._y - 10) + random(5)) - 10;
} else {
panah._y = ((indi._y - 15) + random(5)) - 10;
}
panah._xscale = (panah._yscale = 100);
panah._rotation = indi._rotation;
panah.speed = 15;
panah.kena = false;
panah.tipe = indi.tipe;
panah.damage = indi.damage;
panah.terbang = indi.terbang;
if (indi.tipe == 1) {
panah.onEnterFrame = enterBolaApi;
} else if (indi.tipe == 2) {
panah.onEnterFrame = enterBolaApi2;
}
panahKe++;
if (panahKe >= 1100) {
panahKe = 1000;
}
}
function cekBolaApix(indi) {
backPanah();
backApi();
if (indi.tipe == 1) {
panah = attachMovie("bola_mc1", "panah" + panahKe, panahKe);
} else if (indi.tipe == 2) {
panah = attachMovie("bola_mc2", "panah" + panahKe, panahKe);
}
if (indi._rotation != 0) {
if (indi.terbang == true) {
if (indi.tipe == 1) {
panah._x = (((indi._x + 20) + (indi._rotation / 6)) + random(5)) - 10;
} else {
panah._x = (((indi._x + 20) + (indi._rotation / 6)) + random(5)) - 10;
}
} else {
panah._x = (((indi._x + 20) + (indi._rotation / 3)) + random(5)) - 10;
}
} else {
panah._x = ((indi._x + 20) + random(5)) - 10;
}
if (indi.terbang == true) {
panah._y = ((indi._y - 10) + random(5)) - 10;
} else {
panah._y = ((indi._y - 15) + random(5)) - 10;
}
panah._xscale = (panah._yscale = 100);
panah._rotation = indi._rotation;
panah.speed = 15;
panah.speedY = 5;
panah.kena = false;
panah.tipe = indi.tipe;
panah.damage = indi.damage;
panah.terbang = indi.terbang;
if (_root["chara" + indi.diserang].terbang == true) {
panah.onEnterFrame = enterBolaApi2;
} else {
panah.onEnterFrame = enterBolaApi2x;
}
panahKe++;
if (panahKe >= 1100) {
panahKe = 1000;
}
}
function enterPanah() {
if (sedangPause == false) {
if (this.kena == false) {
if (this.tipe == 1) {
this._x = this._x + (this.speed * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speed * Math.sin((-this._rotation) * 0.017453));
} else {
this._x = this._x + (this.speed * Math.cos(((-this._rotation) + 180) * 0.017453));
this._y = this._y - (this.speed * Math.sin(((-this._rotation) + 180) * 0.017453));
}
this.speed = this.speed + 2.5;
i = 500;
while (i <= 560) {
if (this.hitTest(_root["chara" + i])) {
if (_root["chara" + i].nyawa > 0) {
if (_root["chara" + i].tipe != this.tipe) {
if (this._currentframe == 1) {
if (this._rotation == 0) {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh);
} else if (this.terbang == true) {
if (_root["chara" + i].terbang == false) {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - ((this.damage * naikJauh) * 1.25);
} else {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh);
}
} else if (this.terbang == false) {
if (_root["chara" + i].terbang == true) {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh2);
} else {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh);
}
}
}
cekDarah(this);
this.gotoAndStop(2);
this.kena = true;
}
}
}
i++;
}
if (this._y >= 600) {
removeMovieClip(this);
} else if (this._y <= -100) {
removeMovieClip(this);
} else if (this._x >= 900) {
removeMovieClip(this);
} else if (this._x <= -100) {
removeMovieClip(this);
}
}
}
}
function enterPanah2() {
if (sedangPause == false) {
if (this.kena == false) {
if (this.tipe == 1) {
this._x = this._x + (this.speed * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speed * Math.sin((-this._rotation) * 0.017453));
} else {
this._x = this._x + (this.speed * Math.cos(((-this._rotation) + 180) * 0.017453));
this._y = this._y - (this.speed * Math.sin(((-this._rotation) + 180) * 0.017453));
}
this.speed = this.speed + 2.5;
i = 500;
while (i <= 560) {
if (this.hitTest(_root["chara" + i])) {
if (_root["chara" + i].nyawa > 0) {
if (_root["chara" + i].tipe != this.tipe) {
if (this._currentframe == 1) {
if (this._rotation == 0) {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh);
} else if (this.terbang == true) {
if (_root["chara" + i].terbang == false) {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - ((this.damage * naikJauh) * 1.25);
} else {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh);
}
} else if (this.terbang == false) {
if (_root["chara" + i].terbang == true) {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh2);
} else {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh);
}
}
}
cekDarah(this);
this.gotoAndStop(2);
this.kena = true;
}
}
}
i++;
}
if (this._y >= 600) {
removeMovieClip(this);
} else if (this._y <= -100) {
removeMovieClip(this);
} else if (this._x >= 900) {
removeMovieClip(this);
} else if (this._x <= -100) {
removeMovieClip(this);
}
}
}
}
function enterPanah2x() {
if (sedangPause == false) {
if (this.kena == false) {
tengahX = this._x - this.speed;
tengahY = this._y + this.speedY;
x1 = this._x - tengahX;
y1 = this._y - tengahY;
sudut = 57.29578 * Math.atan(y1 / x1);
this._rotation = sudut;
this._x = this._x - this.speed;
this._y = this._y + this.speedY;
this.speed = this.speed + 2;
this.speedY = this.speedY + 1.5;
i = 500;
while (i <= 560) {
if (this.hitTest(_root["chara" + i])) {
if (_root["chara" + i].nyawa > 0) {
if (_root["chara" + i].tipe != this.tipe) {
if (this._currentframe == 1) {
if (this._rotation == 0) {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh);
} else if (this.terbang == true) {
if (_root["chara" + i].terbang == false) {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - ((this.damage * naikJauh) * 1.25);
} else {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh);
}
} else if (this.terbang == false) {
if (_root["chara" + i].terbang == true) {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh2);
} else {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh);
}
}
}
cekDarah(this);
this.gotoAndStop(2);
this.kena = true;
}
}
}
i++;
}
if (this._y >= 600) {
removeMovieClip(this);
} else if (this._y <= -100) {
removeMovieClip(this);
} else if (this._x >= 900) {
removeMovieClip(this);
} else if (this._x <= -100) {
removeMovieClip(this);
}
}
}
}
function enterPanahDeja() {
if (sedangPause == false) {
if (this.tipe == 1) {
this._x = this._x + (this.speed * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speed * Math.sin((-this._rotation) * 0.017453));
} else {
this._x = this._x + (this.speed * Math.cos(((-this._rotation) + 180) * 0.017453));
this._y = this._y - (this.speed * Math.sin(((-this._rotation) + 180) * 0.017453));
}
this.speed = this.speed + 1.5;
i = 500;
while (i <= 560) {
if (this.hitTest(_root["chara" + i])) {
if (_root["chara" + i].nyawa > 0) {
if (_root["chara" + i].tipe != this.tipe) {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - ((this.damage * naikJauh) / 2);
if (_root["chara" + i].kenax != true) {
_root["chara" + i].kenax = true;
backLedak2();
cekDarah(this);
cekHitam(this);
ledakan = attachMovie("meledak", "meledak" + darahKe, darahKe);
ledakan._x = this._x;
ledakan._y = this._y;
ledakan._xscale = (ledakan._yscale = random(150) + 150);
darahKe++;
if (darahKe >= 1800) {
darahKe = 1500;
}
} else if (this.kenax != true) {
this.kenax = true;
backLedak2();
cekDarah(this);
cekHitam(this);
ledakan = attachMovie("meledak", "meledak" + darahKe, darahKe);
ledakan._x = this._x;
ledakan._y = this._y;
ledakan._xscale = (ledakan._yscale = random(150) + 150);
darahKe++;
if (darahKe >= 1800) {
darahKe = 1500;
}
}
}
}
}
i++;
}
if (this._y >= 600) {
removeMovieClip(this);
} else if (this._y <= -100) {
removeMovieClip(this);
} else if (this._x >= 900) {
removeMovieClip(this);
} else if (this._x <= -100) {
removeMovieClip(this);
}
}
}
function enterPanahApi() {
if (sedangPause == false) {
if (this.kena == false) {
if (this.tipe == 1) {
this._x = this._x + (this.speed * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speed * Math.sin((-this._rotation) * 0.017453));
} else {
this._x = this._x + (this.speed * Math.cos(((-this._rotation) + 180) * 0.017453));
this._y = this._y - (this.speed * Math.sin(((-this._rotation) + 180) * 0.017453));
}
this.speed = this.speed + 2.5;
i = 500;
while (i <= 560) {
if (this.hitTest(_root["chara" + i])) {
if (_root["chara" + i].nyawa > 0) {
if (_root["chara" + i].tipe != this.tipe) {
if (this._currentframe == 1) {
if (this._rotation == 0) {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh);
} else if (this.terbang == true) {
if (_root["chara" + i].terbang == false) {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - ((this.damage * naikJauh) * 1.25);
} else {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh);
}
} else if (this.terbang == false) {
if (_root["chara" + i].terbang == true) {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh2);
} else {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh);
}
}
}
if (_root["chara" + i].terbang == true) {
cekLoncatApi2(_root["chara" + i]);
} else {
cekApi(this);
}
removeMovieClip(this);
this.kena = true;
}
}
}
i++;
}
if (this._y >= 600) {
removeMovieClip(this);
} else if (this._y <= -100) {
removeMovieClip(this);
} else if (this._x >= 900) {
removeMovieClip(this);
} else if (this._x <= -100) {
removeMovieClip(this);
}
}
}
}
function enterPanahApi2() {
if (sedangPause == false) {
if (this.kena == false) {
if (this.tipe == 1) {
this._x = this._x + (this.speed * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speed * Math.sin((-this._rotation) * 0.017453));
} else {
this._x = this._x + (this.speed * Math.cos(((-this._rotation) + 180) * 0.017453));
this._y = this._y - (this.speed * Math.sin(((-this._rotation) + 180) * 0.017453));
}
this.speed = this.speed + 2.5;
i = 500;
while (i <= 560) {
if (this.hitTest(_root["chara" + i])) {
if (_root["chara" + i].nyawa > 0) {
if (_root["chara" + i].tipe != this.tipe) {
if (this._currentframe == 1) {
if (this._rotation == 0) {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh);
} else if (this.terbang == true) {
if (_root["chara" + i].terbang == false) {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - ((this.damage * naikJauh) * 1.25);
} else {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh);
}
} else if (this.terbang == false) {
if (_root["chara" + i].terbang == true) {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh2);
} else {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh);
}
}
}
if (_root["chara" + i].terbang == true) {
cekLoncatApi2(_root["chara" + i]);
} else {
cekApi(this);
}
removeMovieClip(this);
this.kena = true;
}
}
}
i++;
}
if (this._y >= 600) {
removeMovieClip(this);
} else if (this._y <= -100) {
removeMovieClip(this);
} else if (this._x >= 900) {
removeMovieClip(this);
} else if (this._x <= -100) {
removeMovieClip(this);
}
}
}
}
function enterPanahApi2x() {
if (sedangPause == false) {
if (this.kena == false) {
tengahX = this._x - this.speed;
tengahY = this._y + this.speedY;
x1 = this._x - tengahX;
y1 = this._y - tengahY;
sudut = 57.29578 * Math.atan(y1 / x1);
this._rotation = sudut;
this._x = this._x - this.speed;
this._y = this._y + this.speedY;
this.speed = this.speed + 2;
this.speedY = this.speedY + 1;
i = 500;
while (i <= 560) {
if (this.hitTest(_root["chara" + i])) {
if (_root["chara" + i].nyawa > 0) {
if (_root["chara" + i].tipe != this.tipe) {
if (this._currentframe == 1) {
if (this._rotation == 0) {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh);
} else if (this.terbang == true) {
if (_root["chara" + i].terbang == false) {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - ((this.damage * naikJauh) * 1.25);
} else {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh);
}
} else if (this.terbang == false) {
if (_root["chara" + i].terbang == true) {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh2);
} else {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh);
}
}
}
cekLoncatApi2(_root["chara" + i]);
cekDarah(this);
this.gotoAndStop(2);
this.kena = true;
}
}
}
i++;
}
if (this._y >= 600) {
removeMovieClip(this);
} else if (this._y <= -100) {
removeMovieClip(this);
} else if (this._x >= 900) {
removeMovieClip(this);
} else if (this._x <= -100) {
removeMovieClip(this);
}
}
}
}
function enterSihir() {
if (sedangPause == false) {
if (this.kena == false) {
if (this.tipe == 1) {
this._x = this._x + (this.speed * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speed * Math.sin((-this._rotation) * 0.017453));
} else {
this._x = this._x + (this.speed * Math.cos(((-this._rotation) + 180) * 0.017453));
this._y = this._y - (this.speed * Math.sin(((-this._rotation) + 180) * 0.017453));
}
this.speed = this.speed + 2.5;
i = 500;
while (i <= 560) {
if (this.anim.indi.hitTest(_root["chara" + i])) {
if (_root["chara" + i].nyawa > 0) {
if (_root["chara" + i].tipe != this.tipe) {
if (this._currentframe == 1) {
if (this._rotation == 0) {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh);
} else if (this.terbang == true) {
if (_root["chara" + i].terbang == false) {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - ((this.damage * naikJauh) * 1.25);
} else {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh);
}
} else if (this.terbang == false) {
if (_root["chara" + i].terbang == true) {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh2);
} else {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh);
}
}
}
cekDarah(this);
xcekSihir(this);
removeMovieClip(this);
this.kena = true;
}
}
}
i++;
}
if (this._y >= 600) {
removeMovieClip(this);
} else if (this._y <= -100) {
removeMovieClip(this);
} else if (this._x >= 900) {
removeMovieClip(this);
} else if (this._x <= -100) {
removeMovieClip(this);
}
}
}
}
function enterSihir2() {
if (sedangPause == false) {
if (this.kena == false) {
if (this.tipe == 1) {
this._x = this._x + (this.speed * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speed * Math.sin((-this._rotation) * 0.017453));
} else {
this._x = this._x + (this.speed * Math.cos(((-this._rotation) + 180) * 0.017453));
this._y = this._y - (this.speed * Math.sin(((-this._rotation) + 180) * 0.017453));
}
this.speed = this.speed + 2.5;
i = 500;
while (i <= 560) {
if (this.anim.indi.hitTest(_root["chara" + i])) {
if (_root["chara" + i].nyawa > 0) {
if (_root["chara" + i].tipe != this.tipe) {
if (this._currentframe == 1) {
if (this._rotation == 0) {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh);
} else if (this.terbang == true) {
if (_root["chara" + i].terbang == false) {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - ((this.damage * naikJauh) * 1.25);
} else {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh);
}
} else if (this.terbang == false) {
if (_root["chara" + i].terbang == true) {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh2);
} else {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh);
}
}
}
cekDarah(this);
xcekSihir(this);
removeMovieClip(this);
this.kena = true;
}
}
}
i++;
}
if (this._y >= 600) {
removeMovieClip(this);
} else if (this._y <= -100) {
removeMovieClip(this);
} else if (this._x >= 900) {
removeMovieClip(this);
} else if (this._x <= -100) {
removeMovieClip(this);
}
}
}
}
function enterSihir2x() {
if (sedangPause == false) {
if (this.kena == false) {
tengahX = this._x - this.speed;
tengahY = this._y + this.speedY;
x1 = this._x - tengahX;
y1 = this._y - tengahY;
sudut = 57.29578 * Math.atan(y1 / x1);
this._rotation = sudut;
this._x = this._x - this.speed;
this._y = this._y + this.speedY;
this.speed = this.speed + 2;
this.speedY = this.speedY + 1;
i = 500;
while (i <= 560) {
if (this.hitTest(_root["chara" + i])) {
if (_root["chara" + i].nyawa > 0) {
if (_root["chara" + i].tipe != this.tipe) {
if (this._currentframe == 1) {
if (this._rotation == 0) {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh);
} else if (this.terbang == true) {
if (_root["chara" + i].terbang == false) {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - ((this.damage * naikJauh) * 1.25);
} else {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh);
}
} else if (this.terbang == false) {
if (_root["chara" + i].terbang == true) {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh2);
} else {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh);
}
}
}
cekDarah(this);
xcekSihir(this);
removeMovieClip(this);
this.kena = true;
}
}
}
i++;
}
if (this._y >= 600) {
removeMovieClip(this);
} else if (this._y <= -100) {
removeMovieClip(this);
} else if (this._x >= 900) {
removeMovieClip(this);
} else if (this._x <= -100) {
removeMovieClip(this);
}
}
}
}
function enterBolaApi() {
if (sedangPause == false) {
if (this.kena == false) {
if (this.tipe == 1) {
this._x = this._x + (this.speed * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speed * Math.sin((-this._rotation) * 0.017453));
} else {
this._x = this._x + (this.speed * Math.cos(((-this._rotation) + 180) * 0.017453));
this._y = this._y - (this.speed * Math.sin(((-this._rotation) + 180) * 0.017453));
}
this.speed = this.speed + 2.5;
i = 500;
while (i <= 560) {
if (this.indi.hitTest(_root["chara" + i])) {
if (_root["chara" + i].nyawa > 0) {
if (_root["chara" + i].tipe != this.tipe) {
if (this._currentframe == 1) {
if (this._rotation == 0) {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh);
} else if (this.terbang == true) {
if (_root["chara" + i].terbang == false) {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - ((this.damage * naikJauh) * 1.25);
} else {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh);
}
} else if (this.terbang == false) {
if (_root["chara" + i].terbang == true) {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh2);
} else {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh);
}
}
}
if (_root["chara" + i].terbang == true) {
cekLoncatApi2(_root["chara" + i]);
} else {
cekLoncatApi(_root["chara" + i]);
}
this.gotoAndStop(2);
this.kena = true;
}
}
}
i++;
}
if (this._y >= 600) {
removeMovieClip(this);
} else if (this._y <= -100) {
removeMovieClip(this);
} else if (this._x >= 900) {
removeMovieClip(this);
} else if (this._x <= -100) {
removeMovieClip(this);
}
}
}
}
function enterBolaApi2() {
if (sedangPause == false) {
if (this.kena == false) {
if (this.tipe == 1) {
this._x = this._x + (this.speed * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speed * Math.sin((-this._rotation) * 0.017453));
} else {
this._x = this._x + (this.speed * Math.cos(((-this._rotation) + 180) * 0.017453));
this._y = this._y - (this.speed * Math.sin(((-this._rotation) + 180) * 0.017453));
}
this.speed = this.speed + 2.5;
i = 500;
while (i <= 560) {
if (this.indi.hitTest(_root["chara" + i])) {
if (_root["chara" + i].nyawa > 0) {
if (_root["chara" + i].tipe != this.tipe) {
if (this._currentframe == 1) {
if (this._rotation == 0) {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh);
} else if (this.terbang == true) {
if (_root["chara" + i].terbang == false) {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - ((this.damage * naikJauh) * 1.25);
} else {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh);
}
} else if (this.terbang == false) {
if (_root["chara" + i].terbang == true) {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh2);
} else {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh);
}
}
}
if (_root["chara" + i].terbang == true) {
cekLoncatApi2(_root["chara" + i]);
} else {
cekLoncatApi(_root["chara" + i]);
}
this.gotoAndStop(2);
this.kena = true;
}
}
}
i++;
}
if (this._y >= 600) {
removeMovieClip(this);
} else if (this._y <= -100) {
removeMovieClip(this);
} else if (this._x >= 900) {
removeMovieClip(this);
} else if (this._x <= -100) {
removeMovieClip(this);
}
}
}
}
function enterBolaApi2x() {
if (sedangPause == false) {
if (this.kena == false) {
tengahX = this._x - this.speed;
tengahY = this._y + this.speedY;
x1 = this._x - tengahX;
y1 = this._y - tengahY;
sudut = 57.29578 * Math.atan(y1 / x1);
this._rotation = sudut;
this._x = this._x - this.speed;
this._y = this._y + this.speedY;
this.speed = this.speed + 2;
this.speedY = this.speedY + 1;
i = 500;
while (i <= 560) {
if (this.hitTest(_root["chara" + i])) {
if (_root["chara" + i].nyawa > 0) {
if (_root["chara" + i].tipe != this.tipe) {
if (this._currentframe == 1) {
if (this._rotation == 0) {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh);
} else if (this.terbang == true) {
if (_root["chara" + i].terbang == false) {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - ((this.damage * naikJauh) * 1.25);
} else {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh);
}
} else if (this.terbang == false) {
if (_root["chara" + i].terbang == true) {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh2);
} else {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh);
}
}
}
if (_root["chara" + i].terbang == true) {
cekLoncatApi2(_root["chara" + i]);
} else {
cekLoncatApi(_root["chara" + i]);
}
this.gotoAndStop(2);
this.kena = true;
}
}
}
i++;
}
if (this._y >= 600) {
removeMovieClip(this);
} else if (this._y <= -100) {
removeMovieClip(this);
} else if (this._x >= 900) {
removeMovieClip(this);
} else if (this._x <= -100) {
removeMovieClip(this);
}
}
}
}
function cekApi(indi) {
backApi();
rand = random(100);
if (rand <= 30) {
backApi2();
}
wi = 1;
while (wi <= 2) {
darah = attachMovie("bakar_mc", "darah" + darahKe, darahKe);
darah._x = ((indi._x + 30) + random(60)) - 120;
darah._y = ((indi._y - 5) + random(7)) - 15;
darah._xscale = (darah._yscale = random(50) + 50);
darahKe++;
if (darahKe >= 1800) {
darahKe = 1500;
}
i = 500;
while (i <= 560) {
if (darah.hitTest(_root["chara" + i])) {
if (_root["chara" + i].tipe != indi.tipe) {
darahxx = _root["chara" + i].attachMovie("bakar_mc2", "darahx1", 1);
darahxx._x = random(40) - 20;
darahxx._y = random(40) - 20;
darahxx._rotation = random(360);
darahxx._xscale = (darahxx._yscale = random(50) + 25);
}
}
i++;
}
wi++;
}
}
function xcekSihir(indi) {
backSihirKena();
darah = attachMovie("sihir_mcx", "darah" + darahKe, darahKe);
darah._x = indi._x;
darah._y = indi._y + 45;
darah._xscale = (darah._yscale = random(25) + 20);
darahKe++;
if (darahKe >= 1800) {
darahKe = 1500;
}
}
function cekDarah(indi) {
backDarah1();
wi = 1;
while (wi <= 5) {
darah = attachMovie("darah_mc", "darah" + darahKe, darahKe);
darah._x = ((indi._x + 30) + random(15)) - 30;
darah._y = (indi._y + random(15)) - 30;
darah._rotation = random(360);
darahKe++;
if (darahKe >= 1800) {
darahKe = 1500;
}
wi++;
}
}
function cekDarah2(indi) {
backMati();
wi = 1;
while (wi <= 2) {
darah = attachMovie("darah_mc2", "darah" + darahKe2, darahKe2);
if (indi.tipe == 1) {
darah._x = ((indi._x - 50) + random(15)) - 30;
darah._y = ((indi._y + 60) + random(15)) - 30;
} else if (indi.tipe == 2) {
darah._x = ((indi._x + 50) + random(15)) - 30;
darah._y = ((indi._y + 60) + random(15)) - 30;
}
darah._xscale = (darah._yscale = 50);
darahKe2++;
if (darahKe2 >= 400) {
darahKe2 = 300;
}
wi++;
}
}
function cekDarah3(indi) {
backDarah2();
wi = 1;
while (wi <= 10) {
darah = attachMovie("darah_mc3", "darah" + darahKe, darahKe);
if (indi.tipe == 1) {
darah._x = ((indi._x + 50) + random(15)) - 30;
darah._y = (indi._y + random(15)) - 30;
} else if (indi.tipe == 2) {
darah._x = ((indi._x - 50) + random(15)) - 30;
darah._y = (indi._y + random(15)) - 30;
}
darah._xscale = (darah._yscale = 100 + random(100));
darah._rotation = random(360);
darahKe++;
if (darahKe >= 1800) {
darahKe = 1500;
}
wi++;
}
}
function cekKabut(indi) {
backKabut();
wi = 1;
while (wi <= 2) {
darah = attachMovie("kabut_mc", "darah" + darahKe, darahKe);
if (indi.tipe == 1) {
darah._x = (indi._x + random(15)) - 30;
darah._y = ((indi._y + 30) + random(15)) - 30;
} else {
darah._x = ((indi._x + 30) + random(15)) - 30;
darah._y = ((indi._y + 30) + random(15)) - 30;
}
darah._alpha = random(25) + 75;
darahKe++;
if (darahKe >= 1800) {
darahKe = 1500;
}
wi++;
}
}
function cekSembur(indi) {
backApi2();
backSembur();
if (indi.tipe == 1) {
darah = attachMovie("sembur_mc", "darah" + darahKe, darahKe);
darah._x = ((indi._x + 30) + random(15)) - 30;
darah._y = ((indi._y - 10) + random(15)) - 30;
} else {
darah = attachMovie("sembur_mc2", "darah" + darahKe, darahKe);
darah._x = ((indi._x + 30) + random(15)) - 30;
darah._y = ((indi._y - 10) + random(15)) - 30;
}
darah._xscale = (darah._yscale = 80);
darah._alpha = random(25) + 75;
i = 500;
while (i <= 560) {
if (darah.hitTest(_root["chara" + i])) {
if (_root["chara" + i].tipe != indi.tipe) {
zi = 1;
while (zi <= 2) {
darahxx = _root["chara" + i].attachMovie("bakar_mc2", "darahx" + zi, zi);
darahxx._x = random(40) - 20;
darahxx._y = random(40) - 20;
darahxx._rotation = random(360);
darahxx._xscale = (darahxx._yscale = random(50) + 25);
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (indi.damage / 2.5);
zi++;
}
}
}
i++;
}
darahKe++;
if (darahKe >= 1800) {
darahKe = 1500;
}
}
function cekLoncatApi(indi) {
backApi2();
backLoncatApi();
darahxx = indi.attachMovie("bakar_mc2", "darahx" + darahKe, darahKe);
darahxx._x = 0;
darahxx._y = 0;
darahxx._xscale = (wdarah._yscale = random(50) + 25);
darahKe++;
if (darahKe >= 1800) {
darahKe = 1500;
}
fi = 1;
while (fi <= 1) {
randX = random(2);
if (randX == 0) {
wdarah = attachMovie("bola_mc3", "darah" + darahKe, darahKe);
} else {
wdarah = attachMovie("bola_mc4", "darah" + darahKe, darahKe);
}
wdarah._x = (indi._x + random(15)) - 30;
wdarah._y = (indi._y + random(15)) - 30;
wdarah._alpha = random(25) + 75;
wdarah._xscale = (wdarah._yscale = random(30) + 30);
if (randX == 0) {
wdarah.speedX = random(5) + 5;
} else {
wdarah.speedX = -(random(5) + 5);
}
wdarah.speedY = random(10) + 10;
wdarah.grafi = 1;
wdarah.onEnterFrame = enterLuncurApi;
darahKe++;
if (darahKe >= 1800) {
darahKe = 1500;
}
fi++;
}
}
function cekLoncatApi2(indi) {
backApi2();
backLoncatApi();
darahxx = indi.attachMovie("bakar_mc2", "darahx" + darahKe, darahKe);
darahxx._x = 0;
darahxx._y = 0;
darahxx._xscale = (wdarah._yscale = random(50) + 25);
darahKe++;
if (darahKe >= 1800) {
darahKe = 1500;
}
fi = 1;
while (fi <= 1) {
randX = random(2);
if (randX == 0) {
wdarah = attachMovie("bola_mc3", "darah" + darahKe, darahKe);
} else {
wdarah = attachMovie("bola_mc4", "darah" + darahKe, darahKe);
}
wdarah._x = (indi._x + random(15)) - 30;
wdarah._y = (indi._y + random(15)) - 30;
wdarah._alpha = random(25) + 75;
wdarah._xscale = (wdarah._yscale = random(30) + 30);
if (randX == 0) {
wdarah.speedX = random(5) + 5;
} else {
wdarah.speedX = -(random(5) + 5);
}
rand = random(2);
if (rand == 0) {
wdarah.speedY = random(10) + 10;
wdarah.grafi = 1;
} else {
wdarah.speedY = -(random(10) + 10);
wdarah.grafi = 1;
}
wdarah.onEnterFrame = enterLuncurApi;
darahKe++;
if (darahKe >= 1800) {
darahKe = 1500;
}
fi++;
}
}
function enterLuncurApi() {
if (sedangPause == false) {
tengahX = this._x + this.speedX;
tengahY = this._y - this.speedY;
x1 = this._x - tengahX;
y1 = this._y - tengahY;
sudut = 57.29578 * Math.atan(y1 / x1);
this._rotation = sudut;
this._x = this._x + this.speedX;
this._y = this._y - this.speedY;
this.speedY = this.speedY - this.grafi;
if (this.speedY <= 0) {
if (this._y >= 465) {
this._y = 465;
darahxx = attachMovie("bakar_mc3", "darahx" + darahKe, darahKe);
darahxx._x = this._x;
darahxx._y = this._y;
darahxx._xscale = (darahxx._yscale = random(50) + 25);
darahKe++;
if (darahKe >= 1800) {
darahKe = 1500;
}
removeMovieClip(this);
}
}
}
}
function cekBatuJatuh(indi) {
backBatuJatuh();
backMagic();
magic = attachMovie("magic_mc", "darah" + darahKe, darahKe);
magic._x = indi._x;
magic._y = indi._y;
darahKe++;
if (darahKe >= 1800) {
darahKe = 1500;
}
zi = 1;
while (zi <= 3) {
_root["rand" + zi] = random(50) + 50;
zi++;
}
zi = 1;
while (zi <= 3) {
batu = attachMovie("batu_mc", "darah" + darahKe, darahKe);
batu._x = (indi._x + random(15)) - 30;
batu._y = (indi._y + random(15)) - 30;
batu.tipe = indi.tipe;
batu.speed = random(6) + 5;
batu._xscale = (batu._yscale = _root["rand" + zi]);
batu.onEnterFrame = enterBatuNaik;
darahKe++;
if (darahKe >= 1800) {
darahKe = 1500;
}
zi++;
}
zi = 1;
while (zi <= 3) {
batu = attachMovie("batu_mc", "darah" + darahKe, darahKe);
if (indi.tipe == 1) {
batu._x = (_root["chara" + indi.diserang]._x + random(300)) - 150;
} else {
batu._x = (_root["chara" + indi.diserang]._x + random(300)) - 150;
}
batu._y = -50 + random(50);
batu._xscale = (batu._yscale = _root["rand" + zi]);
batu._rotation = 360;
batu.tipe = indi.tipe;
batu.damage = indi.damage;
batu.speed = random(4) + 1;
batu.onEnterFrame = enterBatu;
darahKe++;
if (darahKe >= 1800) {
darahKe = 1500;
}
zi++;
}
}
function enterBatuNaik() {
if (sedangPause == false) {
this._y = this._y - this.speed;
this.speed = this.speed + 2;
if (this._y <= 0) {
removeMovieClip(this);
}
}
}
function enterBatu() {
if (sedangPause == false) {
this._y = this._y + this.speed;
this.speed = this.speed + 0.5;
this._rotation = this._rotation + 10;
ci = 500;
while (ci <= 560) {
if (this.hitTest(_root["chara" + ci])) {
if (_root["chara" + ci].tipe != this.tipe) {
cekDarah(_root["chara" + ci]);
if (_root["chara" + ci].terbang == true) {
_root["chara" + ci].nyawa = _root["chara" + ci].nyawa - (this.damage * naikJauh);
} else {
_root["chara" + ci].nyawa = _root["chara" + ci].nyawa - (this.damage * naikJauh2);
}
cekBatuLoncat(this);
removeMovieClip(this);
}
}
ci++;
}
if (this._y >= 510) {
removeMovieClip(this);
}
}
}
function cekBatuLoncat(indi) {
backBatuLoncat();
fi = 1;
while (fi <= 2) {
randX = random(2);
wdarah = attachMovie("batu_mc", "darah" + darahKe, darahKe);
wdarah._x = (indi._x + random(15)) - 30;
wdarah._y = (indi._y + random(15)) - 30;
wdarah._rotation = random(360);
wdarah._xscale = (wdarah._yscale = random(25) + 25);
if (randX == 0) {
wdarah.speedX = random(4) + 4;
} else {
wdarah.speedX = -(random(4) + 4);
}
rand = random(2);
if (rand == 0) {
wdarah.speedY = random(7) + 7;
wdarah.grafi = 1;
} else {
wdarah.speedY = -(random(7) + 7);
wdarah.grafi = 1;
}
wdarah.onEnterFrame = enterLuncurBatu;
darahKe++;
if (darahKe >= 1800) {
darahKe = 1500;
}
fi++;
}
}
function cekEsLoncat(indi) {
erand = random(3);
if (erand == 0) {
backEsLoncat();
}
fi = 1;
while (fi <= 6) {
randX = random(2);
wdarah = attachMovie("es_mc", "darah" + darahKe, darahKe);
wdarah._x = (indi._x + random(15)) - 30;
wdarah._y = (indi._y + random(15)) - 30;
wdarah._rotation = random(360);
wdarah._xscale = (wdarah._yscale = random(15) + 15);
if (randX == 0) {
wdarah.speedX = random(4) + 4;
} else {
wdarah.speedX = -(random(4) + 4);
}
rand = random(2);
if (rand == 0) {
wdarah.speedY = random(7) + 7;
wdarah.grafi = 1;
} else {
wdarah.speedY = -(random(7) + 7);
wdarah.grafi = 1;
}
wdarah.onEnterFrame = enterLuncurBatu;
darahKe++;
if (darahKe >= 1800) {
darahKe = 1500;
}
fi++;
}
}
function cekMineLoncat(indi) {
backMineLoncat();
fi = 1;
while (fi <= 4) {
randX = random(2);
if (indi.tipe == 1) {
wdarah = attachMovie("mine_mc", "darah" + darahKe, darahKe);
} else {
wdarah = attachMovie("mine_mc2", "darah" + darahKe, darahKe);
}
wdarah._x = (indi._x + random(15)) - 30;
wdarah._y = (indi._y + random(15)) - 30;
wdarah._rotation = random(360);
wdarah._xscale = (wdarah._yscale = random(25) + 25);
if (randX == 0) {
wdarah.speedX = random(4) + 4;
} else {
wdarah.speedX = -(random(4) + 4);
}
rand = random(2);
if (rand == 0) {
wdarah.speedY = random(7) + 7;
wdarah.grafi = 1;
} else {
wdarah.speedY = -(random(7) + 7);
wdarah.grafi = 1;
}
wdarah.onEnterFrame = enterLuncurBatu;
darahKe++;
if (darahKe >= 1800) {
darahKe = 1500;
}
fi++;
}
}
function enterLuncurBatu() {
if (sedangPause == false) {
tengahX = this._x + this.speedX;
tengahY = this._y - this.speedY;
x1 = this._x - tengahX;
y1 = this._y - tengahY;
sudut = 57.29578 * Math.atan(y1 / x1);
this._rotation = sudut;
this._x = this._x + this.speedX;
this._y = this._y - this.speedY;
this.speedY = this.speedY - this.grafi;
if (this.speedY <= 0) {
if (this._y >= 465) {
removeMovieClip(this);
}
}
}
}
function cekSalju(indi) {
backMagic();
i = 1;
while (i <= 3) {
salju = attachMovie("salju_mc", "darah" + darahKe, darahKe);
salju._x = indi._x;
salju._y = indi._y;
salju.damage = indi.damage;
salju.speed = random(6) + 2;
salju.speedPlus = random(3) + 0.5;
salju.speedScale = 10;
salju.tujuan = 1;
salju._xscale = (salju._yscale = 1);
ci = 500;
while (ci <= 560) {
if (_root["chara" + ci].tipe != indi.tipe) {
if (_root["chara" + ci].nyawa > 0) {
salju.xtarget = _root["chara" + ci];
ci = 560;
}
}
ci++;
}
salju.tujuX = 0.333333333333333;
salju.tujuY = 0.666666666666667;
salju.awalX = salju.xtarget._x;
salju.awalY = salju.xtarget._y;
salju.onEnterFrame = enterSalju;
darahKe++;
if (darahKe >= 1800) {
darahKe = 1500;
}
i++;
}
}
function cekSalju2x(indi) {
backMagic();
i = 1;
while (i <= 3) {
salju = attachMovie("salju_mc2", "darah" + darahKe, darahKe);
salju._x = indi._x - 100;
salju._y = indi._y;
salju.damage = indi.damage;
salju.speed = random(6) + 2;
salju.speedPlus = random(3) + 0.5;
salju.speedScale = 10;
salju.tujuan = 1;
salju._xscale = (salju._yscale = 1);
ci = 500;
while (ci <= 560) {
if (_root["chara" + ci].tipe != indi.tipe) {
if (_root["chara" + ci].nyawa > 0) {
salju.xtarget = _root["chara" + ci];
ci = 560;
}
}
ci++;
}
salju.tujuX = 0.333333333333333;
salju.tujuY = 0.666666666666667;
salju.awalX = salju.xtarget._x;
salju.awalY = salju.xtarget._y;
salju.onEnterFrame = enterSalju2;
darahKe++;
if (darahKe >= 1800) {
darahKe = 1500;
}
i++;
}
}
function enterSalju() {
if (sedangPause == false) {
this._xscale = this._xscale + this.speedScale;
this._yscale = this._yscale + this.speedScale;
if (this._xscale >= 100) {
this.speedScale = 0;
this.aimX = this.xtarget._x;
this.aimY = this.xtarget._y;
deltaX = (this._x - this.aimX) * this.tujuX;
deltaY = (this._y - this.aimY) * this.tujuY;
angle = (-Math.atan2(deltaX, deltaY)) / (Math.PI/180);
if (Math.sqrt((deltaX * deltaX) + (deltaY * deltaY)) > this.speed) {
this.speed = this.speed + this.speedPlus;
this._y = this._y - (this.speed * Math.cos(angle * (Math.PI/180)));
this._x = this._x + (this.speed * Math.sin(angle * (Math.PI/180)));
} else if (this.tujuan == 1) {
this.tujuX = 0.666666666666667;
this.tujuY = 0.75;
this.tujuan++;
} else if (this.tujuan == 2) {
this.tujuX = 0.75;
this.tujuY = 0.8;
this.tujuan++;
} else if (this.tujuan == 3) {
this.tujuX = 0.8;
this.tujuY = 0.833333333333333;
this.tujuan++;
} else if (this.tujuan == 4) {
this.tujuX = 1;
this.tujuY = 1;
this.tujuan++;
} else {
cekDarah(this.xtarget);
if (this.xtarget.terbang == true) {
this.xtarget.nyawa = this.xtarget.nyawa - (this.damage * naikJauh);
} else {
this.xtarget.nyawa = this.xtarget.nyawa - (this.damage * naikJauh2);
}
cekSaljuLoncat(this);
removeMovieClip(this);
}
}
}
}
function enterSalju2() {
if (sedangPause == false) {
this._xscale = this._xscale + this.speedScale;
this._yscale = this._yscale + this.speedScale;
if (this._xscale >= 100) {
this.speedScale = 0;
this.aimX = this.xtarget._x;
this.aimY = this.xtarget._y;
deltaX = (this._x - this.aimX) * this.tujuX;
deltaY = (this._y - this.aimY) * this.tujuY;
angle = (-Math.atan2(deltaX, deltaY)) / (Math.PI/180);
if (Math.sqrt((deltaX * deltaX) + (deltaY * deltaY)) > this.speed) {
this.speed = this.speed + this.speedPlus;
this._y = this._y - (this.speed * Math.cos(angle * (Math.PI/180)));
this._x = this._x + (this.speed * Math.sin(angle * (Math.PI/180)));
} else if (this.tujuan == 1) {
this.tujuX = 0.666666666666667;
this.tujuY = 0.75;
this.tujuan++;
} else if (this.tujuan == 2) {
this.tujuX = 0.75;
this.tujuY = 0.8;
this.tujuan++;
} else if (this.tujuan == 3) {
this.tujuX = 0.8;
this.tujuY = 0.833333333333333;
this.tujuan++;
} else if (this.tujuan == 4) {
this.tujuX = 1;
this.tujuY = 1;
this.tujuan++;
} else {
cekDarah(this.xtarget);
if (this.xtarget.terbang == true) {
this.xtarget.nyawa = this.xtarget.nyawa - (this.damage * naikJauh);
} else {
this.xtarget.nyawa = this.xtarget.nyawa - (this.damage * naikJauh2);
}
cekHitam(this);
removeMovieClip(this);
}
}
}
}
function cekSaljuLoncat(indi) {
backSaljuLoncat();
backSaljuLoncat2();
fi = 1;
while (fi <= 1) {
salju = attachMovie("salju_ledak", "darah" + darahKe, darahKe);
salju._x = (indi._x + random(15)) - 30;
salju._y = (indi._y + random(15)) - 30;
salju._rotation = random(360);
darahKe++;
if (darahKe >= 1800) {
darahKe = 1500;
}
fi++;
}
fi = 1;
while (fi <= 1) {
randX = random(2);
wdarah = attachMovie("salju_mc", "darah" + darahKe, darahKe);
wdarah._x = (indi._x + random(15)) - 30;
wdarah._y = (indi._y + random(15)) - 30;
wdarah._rotation = random(360);
wdarah._xscale = (wdarah._yscale = random(25) + 25);
if (randX == 0) {
wdarah.speedX = random(3) + 3;
} else {
wdarah.speedX = -(random(3) + 3);
}
rand = random(2);
if (rand == 0) {
wdarah.speedY = random(5) + 5;
wdarah.grafi = 1;
} else {
wdarah.speedY = -(random(5) + 5);
wdarah.grafi = 1;
}
wdarah.onEnterFrame = enterLuncurBatu;
darahKe++;
if (darahKe >= 1800) {
darahKe = 1500;
}
fi++;
}
}
function cekHitam(indi) {
backCakar();
_root["chara" + indi.diserang].kenaCakar = true;
i = 1;
while (i <= 4) {
hitam = attachMovie("hitam_mc", "darah" + darahKe, darahKe);
if (indi.tipe == 1) {
hitam._x = ((indi._x + 20) + random(15)) - 30;
hitam._y = (indi._y + random(15)) - 30;
} else {
hitam._x = ((indi._x - 20) + random(15)) - 30;
hitam._y = (indi._y + random(15)) - 30;
}
hitam._rotation = random(360);
darahKe++;
if (darahKe >= 1800) {
darahKe = 1500;
}
i++;
}
}
function cekGolokHitam(indi) {
backGolokHitam();
if (indi.tipe == 1) {
panah = attachMovie("golok_mc", "panah" + darahKe, darahKe);
} else if (indi.tipe == 2) {
panah = attachMovie("golok_mc2", "panah" + darahKe, darahKe);
}
panah._rotation = indi._rotation;
if (indi._rotation != 0) {
if (indi.terbang == true) {
if (indi.tipe == 1) {
panah._x = (((indi._x + 50) + (indi._rotation / 6)) + random(5)) - 10;
} else {
panah._x = (((indi._x + 50) + (indi._rotation / 6)) + random(5)) - 10;
}
} else {
panah._x = (((indi._x + 50) + (indi._rotation / 3)) + random(5)) - 10;
}
} else {
panah._x = ((indi._x + 50) + random(5)) - 10;
}
if (indi.terbang == true) {
panah._y = ((indi._y - 10) + random(5)) - 10;
} else {
panah._y = ((indi._y - 15) + random(5)) - 10;
}
panah.tipe = indi.tipe;
panah.damage = indi.damage;
panah.terbang = indi.terbang;
panah.onEnterFrame = enterGolok;
darahKe++;
if (darahKe >= 1800) {
darahKe = 1500;
}
}
function enterGolok() {
if (sedangPause == false) {
if (sedangPause == false) {
i = 500;
while (i <= 560) {
if (this.hitTest(_root["chara" + i])) {
if (_root["chara" + i].nyawa > 0) {
if (_root["chara" + i].tipe != this.tipe) {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - this.damage;
}
}
}
i++;
}
if (this._y >= 510) {
removeMovieClip(this);
}
}
}
}
function cekLedakGolok(indi1, indi2) {
backLedak2();
ledakan = indi1.attachMovie("meledak", "meledak" + indi2, indi2);
ledakan._x = indi2 * 50;
ledakan._y = 0;
ledakan._xscale = (ledakan._yscale = random(100) + 100);
}
function cekLedakGolokx(indi1, indi2) {
backLedak2();
ledakan = indi1.attachMovie("meledak", "meledak" + indi2, indi2);
ledakan._x = -(indi2 * 50);
ledakan._y = 0;
ledakan._xscale = (ledakan._yscale = random(100) + 100);
}
function magicBatu(indi1, indi2) {
backBatuJatuh();
zi = 1;
while (zi <= 15) {
batu = attachMovie("batu_mc", "darah" + darahKe, darahKe);
batu._x = 50 + random(700);
batu._y = -100 - random(50);
batu._xscale = (batu._yscale = random(75) + 50);
batu._rotation = 360;
batu.tipe = indi1;
batu.damage = damageKe[indi2];
batu.speed = random(4) + 1;
batu.onEnterFrame = enterBatu;
darahKe++;
if (darahKe >= 1800) {
darahKe = 1500;
}
zi++;
}
}
function magicRanjau(indi1, indi2) {
backMine();
zi = 1;
while (zi <= 7) {
if (indi1 == 1) {
batu = attachMovie("mine_mc", "darah" + mineKe, mineKe);
} else {
batu = attachMovie("mine_mc2", "darah" + mineKe, mineKe);
}
batu._x = 50 + random(700);
rand = random(2);
if (rand == 0) {
batu._y = 200 + random(100);
} else {
batu._y = 400 + random(100);
}
batu._xscale = (batu._yscale = random(50) + 50);
batu._rotation = 360;
batu._alpha = -100 + random(100);
batu.tipe = indi1;
if (indi1 == 1) {
batu.speed = 5;
} else {
batu.speed = -5;
}
batu.damage = damageKe[indi2];
batu.onEnterFrame = enterRanjau;
mineKe++;
if (mineKe >= 5100) {
mineKe = 5000;
}
zi++;
}
}
function enterRanjau() {
if (sedangPause == false) {
if (this._alpha < 100) {
this._alpha = this._alpha + 5;
} else {
this._x = this._x + this.speed;
ci = 500;
while (ci <= 560) {
if (this.hitTest(_root["chara" + ci])) {
if (_root["chara" + ci].tipe != this.tipe) {
cekDarah(_root["chara" + ci]);
if (_root["chara" + ci].terbang == true) {
_root["chara" + ci].nyawa = _root["chara" + ci].nyawa - (this.damage * naikJauh);
} else {
_root["chara" + ci].nyawa = _root["chara" + ci].nyawa - (this.damage * naikJauh2);
}
cekMineLoncat(this);
removeMovieClip(this);
}
}
ci++;
}
if (this._x >= 900) {
removeMovieClip(this);
} else if (this._x <= -100) {
removeMovieClip(this);
}
}
}
}
function magicEs(indi1, indi2) {
backEsJatuh();
zi = 1;
while (zi <= 9) {
batu = attachMovie("es_mc", "darah" + darahKe, darahKe);
batu._x = 50 + random(700);
batu._y = -100 - random(50);
batu._xscale = (batu._yscale = random(25) + 25);
batu.tipe = indi1;
batu.damage = damageKe[indi2];
batu.speed = random(4) + 1;
batu.onEnterFrame = enterEs;
darahKe++;
if (darahKe >= 1800) {
darahKe = 1500;
}
zi++;
}
}
function magicMisil(indi1, indi2) {
xi = 0;
while (xi <= 14) {
misil = attachMovie("misil_mc", "darah" + darahKe, darahKe);
misil.tipe = indi1;
if (misil.tipe == 1) {
misil._x = -100;
misil._y = -100;
} else {
misil._x = 900;
misil._y = -100;
}
misil.xdelay = xi * 15;
ci = 500;
while (ci <= 560) {
if (_root["chara" + ci].tipe != indi1) {
if (_root["chara" + ci].tandain != true) {
if (_root["chara" + ci].nyawa > 0) {
_root["chara" + ci].tandain = true;
misil.wtarget = _root["chara" + ci];
misil.targetX = _root["chara" + ci]._x;
misil.targetY = _root["chara" + ci]._y;
deltaX = misil._x - misil.targetX;
deltaY = misil._y - misil.targetY;
angle = (-Math.atan2(deltaX, deltaY)) / (Math.PI/180);
misil._rotation = angle;
ci = 560;
}
}
}
ci++;
}
misil.awal = 0;
misil.damage = damageKe[indi2];
misil.speed = speedKe[indi2] * 2;
misil.kena = false;
if (misil.targetX == undefined) {
removeMovieClip(misil);
} else {
misil.onEnterFrame = enterMisil;
}
darahKe++;
if (darahKe >= 1800) {
darahKe = 1500;
}
xi++;
}
}
function magicLaser(indi1, indi2) {
backLaser();
batu = attachMovie("laser_mc2", "darah" + darahKe, darahKe);
if (indi1 == 1) {
batu._x = 0;
} else {
batu._x = 800;
}
batu._y = 250;
batu._xscale = (batu._yscale = 100);
batu.tipe = indi1;
batu.damage = damageKe[indi2];
batu.speed = random(5) + 5;
if (indi1 == 1) {
batu.onEnterFrame = enterLaser1;
} else {
batu.onEnterFrame = enterLaser2;
}
darahKe++;
if (darahKe >= 1800) {
darahKe = 1500;
}
}
function magicLedak(indi1, indi2) {
xi = 0;
while (xi <= 9) {
ci = 500;
while (ci <= 560) {
if (_root["chara" + ci].tipe != indi1) {
if (_root["chara" + ci].nyawa > 0) {
if (_root["chara" + ci].tandain != true) {
_root["chara" + ci].tandain = true;
cekLedakDahsyat(_root["chara" + ci]);
_root["chara" + ci].nyawa = _root["chara" + ci].nyawa - ((damageKe[indi2] * naikJauh) / 1.5);
}
}
}
ci++;
}
xi++;
}
}
function magicPetir(indi1, indi2) {
backThunder();
petirx = attachMovie("petir_mc", "darah" + darahKe, darahKe);
petirx._x = 400;
petirx._y = 250;
petirx.tipe = indi1;
petirx.damage = damageKe[indi2];
darahKe++;
if (darahKe >= 1800) {
darahKe = 1500;
}
}
function cekMatiSemua(indi) {
i = 500;
while (i <= 560) {
if (_root["chara" + i].nyawa > 0) {
if (_root["chara" + i].tipe != indi.tipe) {
ledak = attachMovie("ledakx", "darah" + darahKe, darahKe);
ledak._x = _root["chara" + i]._x;
ledak._y = _root["chara" + i]._y;
ledak._xscale = (ledak._yscale = random(75) + 75);
darahKe++;
if (darahKe >= 1800) {
darahKe = 1500;
}
if (_root["chara" + i].rot == true) {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - 1000;
} else {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (3000 * naikJauh);
}
backListrik();
}
}
i++;
}
}
function magicShield(indi1, indi2) {
if (indi1 == 1) {
nyawa2 = nyawa2 - 100;
xi = 1;
while (xi <= 4) {
backLedak2();
ledak = attachMovie("ledakx", "darah" + darahKe, xi + 10000);
ledak._x = 540 + (xi * 50);
ledak._y = 110;
ledak._xscale = (ledak._yscale = random(75) + 75);
darahKe++;
if (darahKe >= 1800) {
darahKe = 1500;
}
xi++;
}
}
}
function enterLaser1() {
if (sedangPause == false) {
this._x = this._x + this.speed;
this.speed = this.speed + 3.5;
this._rotation = this._rotation + this.speed;
i = 500;
while (i <= 560) {
if (this.hitTest(_root["chara" + i])) {
if (_root["chara" + i].nyawa > 0) {
if (_root["chara" + i].tipe != this.tipe) {
if (_root["chara" + i].kenax != true) {
_root["chara" + i].kenax = true;
ledakan = attachMovie("ledakx", "meledak" + darahKe, darahKe);
ledakan._x = _root["chara" + i]._x;
ledakan._y = _root["chara" + i]._y;
ledakan._xscale = (ledakan._yscale = random(50) + 100);
darahKe++;
if (darahKe >= 1800) {
darahKe = 1500;
}
backLedak2();
cekDarah(_root["chara" + i]);
cekHitam(_root["chara" + i]);
}
_root["chara" + i].nyawa = _root["chara" + i].nyawa - ((this.damage * naikJauh) / 2);
}
}
}
i++;
}
if (this._x >= 900) {
removeMovieClip(this);
}
}
}
function enterLaser2() {
if (sedangPause == false) {
this._x = this._x - this.speed;
this.speed = this.speed + 3.5;
this._rotation = this._rotation + this.speed;
i = 500;
while (i <= 560) {
if (this.hitTest(_root["chara" + i])) {
if (_root["chara" + i].nyawa > 0) {
if (_root["chara" + i].tipe != this.tipe) {
if (_root["chara" + i].kenax != true) {
_root["chara" + i].kenax = true;
ledakan = attachMovie("ledakx", "meledak" + darahKe, darahKe);
ledakan._x = _root["chara" + i]._x;
ledakan._y = _root["chara" + i]._y;
ledakan._xscale = (ledakan._yscale = random(50) + 100);
darahKe++;
if (darahKe >= 1800) {
darahKe = 1500;
}
backLedak2();
cekDarah(_root["chara" + i]);
cekHitam(_root["chara" + i]);
}
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh);
}
}
}
i++;
}
if (this._x <= -100) {
removeMovieClip(this);
}
}
}
function enterMisil() {
if (sedangPause == false) {
this.awal++;
if (this.awal == this.xdelay) {
backMisil();
}
if (this.awal >= this.xdelay) {
if (this.kena == false) {
this.aimX = this.wtarget._x;
this.aimY = this.wtarget._y;
deltaX = this._x - this.aimX;
deltaY = this._y - this.aimY;
angle = (-Math.atan2(deltaX, deltaY)) / (Math.PI/180);
this._rotation = angle;
if (Math.sqrt((deltaX * deltaX) + (deltaY * deltaY)) > this.speed) {
this.speed = this.speed + 0.5;
this._y = this._y - (this.speed * Math.cos(angle * (Math.PI/180)));
this._x = this._x + (this.speed * Math.sin(angle * (Math.PI/180)));
} else {
cekLedakDahsyat(this);
this.wtarget.nyawa = this.wtarget.nyawa - (this.damage * naikJauh);
removeMovieClip(this);
}
if (this._y >= 550) {
removeMovieClip(this);
}
}
}
}
}
function cekLedakDahsyat(indix) {
backLedak2();
ledak = attachMovie("ledakx", "darah" + darahKe, darahKe);
ledak._x = indix._x;
ledak._y = indix._y;
ledak._xscale = (ledak._yscale = random(75) + 75);
darahKe++;
if (darahKe >= 1800) {
darahKe = 1500;
}
}
function enterEs() {
if (sedangPause == false) {
this._y = this._y + this.speed;
this.speed = this.speed + 0.5;
ci = 500;
while (ci <= 560) {
if (this.hitTest(_root["chara" + ci])) {
if (_root["chara" + ci].rot != true) {
if (_root["chara" + ci].tipe != this.tipe) {
cekDarah(_root["chara" + ci]);
if (_root["chara" + ci].terbang == true) {
_root["chara" + ci].nyawa = _root["chara" + ci].nyawa - (this.damage * naikJauh);
} else {
_root["chara" + ci].nyawa = _root["chara" + ci].nyawa - (this.damage * naikJauh2);
}
cekEsLoncat(this);
cekBeku(_root["chara" + ci]);
removeMovieClip(this);
}
}
}
ci++;
}
if (this._y >= 600) {
removeMovieClip(this);
}
}
}
function cekBeku(indi) {
backEsBeku();
indi.beku = true;
indi.speed = 0;
indi.gotoAndStop(1);
indi.anim.stop();
esBeku = indi.attachMovie("balok_mc", "balok_mc", 9);
esBeku._x = 0;
esBeku._y = -25;
}
function cekLawatarEs(indi) {
backEsJatuh();
if (indi.tipe == 1) {
panah = attachMovie("es_mc1", "panah" + panahKe, panahKe);
} else if (indi.tipe == 2) {
panah = attachMovie("es_mc2", "panah" + panahKe, panahKe);
}
if (indi._rotation != 0) {
if (indi.terbang == true) {
if (indi.tipe == 1) {
panah._x = (((indi._x + 20) + (indi._rotation / 6)) + random(5)) - 10;
} else {
panah._x = (((indi._x + 20) + (indi._rotation / 6)) + random(5)) - 10;
}
} else {
panah._x = (((indi._x + 20) + (indi._rotation / 3)) + random(5)) - 10;
}
} else {
panah._x = ((indi._x + 20) + random(5)) - 10;
}
if (indi.terbang == true) {
panah._y = ((indi._y - 10) + random(5)) - 10;
} else {
panah._y = ((indi._y - 15) + random(5)) - 10;
}
panah._xscale = (panah._yscale = 100);
panah._rotation = indi._rotation;
panah.speed = 15;
panah.kena = false;
panah.tipe = indi.tipe;
panah.damage = indi.damage;
panah.terbang = indi.terbang;
panah.onEnterFrame = enterEs2;
panahKe++;
if (panahKe >= 1100) {
panahKe = 1000;
}
}
function enterEs2() {
if (sedangPause == false) {
if (this.kena == false) {
if (this.tipe == 1) {
this._x = this._x + (this.speed * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speed * Math.sin((-this._rotation) * 0.017453));
} else {
this._x = this._x + (this.speed * Math.cos(((-this._rotation) + 180) * 0.017453));
this._y = this._y - (this.speed * Math.sin(((-this._rotation) + 180) * 0.017453));
}
this.speed = this.speed + 2.5;
i = 500;
while (i <= 560) {
if (this.hitTest(_root["chara" + i])) {
if (_root["chara" + i].nyawa > 0) {
if (_root["chara" + i].rot != true) {
if (_root["chara" + i].tipe != this.tipe) {
if (this._rotation == 0) {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh);
} else if (this.terbang == true) {
if (_root["chara" + i].terbang == false) {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - ((this.damage * naikJauh) * 1.25);
} else {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh);
}
} else if (this.terbang == false) {
if (_root["chara" + i].terbang == true) {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh2);
} else {
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * naikJauh);
}
}
cekEsLoncat(this);
cekBeku(_root["chara" + i]);
removeMovieClip(this);
this.kena = true;
}
}
}
}
i++;
}
if (this._y >= 600) {
removeMovieClip(this);
} else if (this._y <= -100) {
removeMovieClip(this);
} else if (this._x >= 900) {
removeMovieClip(this);
} else if (this._x <= -100) {
removeMovieClip(this);
}
}
}
}
function cekLaser(indi) {
backLaser();
if (indi.tipe == 1) {
laser = attachMovie("laser_mc", "darah" + darahKe, darahKe);
} else {
laser = attachMovie("laser_mc3", "darah" + darahKe, darahKe);
}
laser.tipe = indi.tipe;
if (laser.tipe == 1) {
laser._x = indi._x + 25;
} else {
laser._x = indi._x - 25;
}
laser._y = indi._y - 25;
laser.speed = 15;
laser.damage = indi.damage;
laser._rotation = indi._rotation;
laser.onEnterFrame = enterLaser;
darahKe++;
if (darahKe >= 1800) {
darahKe = 1500;
}
}
function enterLaser() {
if (sedangPause == false) {
this.speed = this.speed + 2.5;
if (this.tipe == 1) {
this._x = this._x + (this.speed * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speed * Math.sin((-this._rotation) * 0.017453));
} else {
this._x = this._x + (this.speed * Math.cos(((-this._rotation) + 180) * 0.017453));
this._y = this._y - (this.speed * Math.sin(((-this._rotation) + 180) * 0.017453));
}
i = 500;
while (i <= 560) {
if (this.hitTest(_root["chara" + i])) {
if (_root["chara" + i].nyawa > 0) {
if (_root["chara" + i].tipe != this.tipe) {
if (_root["chara" + i].kenax != true) {
_root["chara" + i].kenax = true;
ledakan = attachMovie("ledakx", "meledak" + darahKe, darahKe);
ledakan._x = _root["chara" + i]._x;
ledakan._y = _root["chara" + i]._y;
ledakan._xscale = (ledakan._yscale = random(50) + 100);
darahKe++;
if (darahKe >= 1800) {
darahKe = 1500;
}
backLedak2();
cekDarah(_root["chara" + i]);
cekHitam(_root["chara" + i]);
} else if (this.kenax != true) {
this.kenax = true;
ledakan = attachMovie("ledakx", "meledak" + darahKe, darahKe);
ledakan._x = _root["chara" + i]._x;
ledakan._y = _root["chara" + i]._y;
ledakan._xscale = (ledakan._yscale = random(50) + 100);
darahKe++;
if (darahKe >= 1800) {
darahKe = 1500;
}
backLedak2();
cekDarah(_root["chara" + i]);
cekHitam(_root["chara" + i]);
}
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (this.damage * 5);
}
}
}
i++;
}
}
}
function cekAngin(indi) {
backAngin();
batu = attachMovie("pusar_mc", "darah" + darahKe, darahKe);
if (indi.tipe == 1) {
batu._x = indi._x + 5;
} else {
batu._x = indi._x - 5;
}
batu._y = indi._y + 10;
batu._xscale = (batu._yscale = 125);
batu._alpha = 0;
batu.tipe = indi.tipe;
batu.damage = indi.damage;
batu.speed = random(2) + 1;
if (batu.tipe == 1) {
batu.onEnterFrame = enterPusar1;
} else {
batu.onEnterFrame = enterPusar2;
}
darahKe++;
if (darahKe >= 1800) {
darahKe = 1500;
}
cekKabut(batu);
}
function enterPusar1() {
if (sedangPause == false) {
this._x = this._x + this.speed;
this.speed = this.speed + 0.5;
this._alpha = this._alpha + 10;
this._xscale = this._xscale + 1.5;
this._yscale = this._yscale + 1.5;
i = 500;
while (i <= 560) {
if (this.hitTest(_root["chara" + i])) {
if (_root["chara" + i].nyawa > 0) {
if (_root["chara" + i].tipe != this.tipe) {
if (_root["chara" + i].kenax != true) {
_root["chara" + i].kenax = true;
rand = random(2);
if (rand == 1) {
_root["chara" + i].speedX = random(4) + 6;
} else {
_root["chara" + i].speedX = -(random(4) + 6);
}
_root["chara" + i].kenaCakar = true;
ledakan = attachMovie("ledakx", "meledak" + darahKe, darahKe);
ledakan._x = _root["chara" + i]._x;
ledakan._y = _root["chara" + i]._y;
ledakan._xscale = (ledakan._yscale = random(50) + 100);
darahKe++;
if (darahKe >= 1800) {
darahKe = 1500;
}
backLedak2();
cekDarah(_root["chara" + i]);
cekHitam(_root["chara" + i]);
} else if (this.kenax != true) {
this.kenax = true;
ledakan = attachMovie("ledakx", "meledak" + darahKe, darahKe);
ledakan._x = _root["chara" + i]._x;
ledakan._y = _root["chara" + i]._y;
ledakan._xscale = (ledakan._yscale = random(50) + 100);
darahKe++;
if (darahKe >= 1800) {
darahKe = 1500;
}
cekKabut(this);
}
_root["chara" + i].nyawa = _root["chara" + i].nyawa - ((this.damage * naikJauh) / 2);
}
}
}
i++;
}
if (this._x >= 900) {
removeMovieClip(this);
}
}
}
function enterPusar2() {
if (sedangPause == false) {
this._x = this._x - this.speed;
this.speed = this.speed + 0.5;
this._alpha = this._alpha + 10;
this._xscale = this._xscale + 1.5;
this._yscale = this._yscale + 1.5;
i = 500;
while (i <= 560) {
if (this.hitTest(_root["chara" + i])) {
if (_root["chara" + i].nyawa > 0) {
if (_root["chara" + i].tipe != this.tipe) {
if (_root["chara" + i].kenax != true) {
_root["chara" + i].kenax = true;
rand = random(2);
if (rand == 1) {
_root["chara" + i].speedX = random(4) + 6;
} else {
_root["chara" + i].speedX = -(random(4) + 6);
}
_root["chara" + i].kenaCakar = true;
ledakan = attachMovie("ledakx", "meledak" + darahKe, darahKe);
ledakan._x = _root["chara" + i]._x;
ledakan._y = _root["chara" + i]._y;
ledakan._xscale = (ledakan._yscale = random(50) + 100);
darahKe++;
if (darahKe >= 1800) {
darahKe = 1500;
}
backLedak2();
cekDarah(_root["chara" + i]);
cekHitam(_root["chara" + i]);
} else if (this.kenax != true) {
this.kenax = true;
ledakan = attachMovie("ledakx", "meledak" + darahKe, darahKe);
ledakan._x = _root["chara" + i]._x;
ledakan._y = _root["chara" + i]._y;
ledakan._xscale = (ledakan._yscale = random(50) + 100);
darahKe++;
if (darahKe >= 1800) {
darahKe = 1500;
}
cekKabut(this);
}
_root["chara" + i].nyawa = _root["chara" + i].nyawa - ((this.damage * naikJauh) / 2);
}
}
}
i++;
}
if (this._x <= -100) {
removeMovieClip(this);
}
}
}
function cekSedot(indi) {
backSedot();
masukSedot = 0;
hitam = attachMovie("salju_mc2", "darah" + darahKe, darahKe);
hitam._x = indi._x;
hitam._y = indi._y;
hitam.speedScale = 25;
hitam._xscale = (hitam._yscale = 0);
hitam.onEnterFrame = enterHitam;
darahKe++;
if (darahKe >= 1800) {
darahKe = 1500;
}
i = 500;
while (i <= 560) {
if (_root["chara" + i].tipe != indi.tipe) {
if (_root["chara" + i].rot != true) {
if (_root["chara" + i].nyawa > 0) {
xjarak = Math.sqrt(Math.pow(indi._x - _root["chara" + i]._x, 2) + Math.pow(indi._y - _root["chara" + i]._y, 2));
if (xjarak <= indi.range) {
if (masukSedot <= 2) {
_root["chara" + i].gdelay = 0;
_root["chara" + i].speed = 1;
_root["chara" + i].speedPlus = 2;
_root["chara" + i].tuju = indi;
_root["chara" + i].onEnterFrame = enterSedot;
masukSedot++;
}
}
}
} else {
hitam = attachMovie("salju_mc2", "darah" + darahKe, darahKe);
hitam._x = _root["chara" + i]._x;
hitam._y = _root["chara" + i]._y;
hitam.speedScale = 25;
hitam._xscale = (hitam._yscale = 100);
hitam.gdelay = 0;
hitam.speed = 1;
hitam.speedPlus = 2;
hitam.tuju = indi;
hitam.onEnterFrame = enterHitam2;
darahKe++;
if (darahKe >= 1800) {
darahKe = 1500;
}
_root["chara" + i].nyawa = _root["chara" + i].nyawa - 1000;
}
}
i++;
}
}
function enterHitam() {
this._xscale = this._xscale + this.speedScale;
this._yscale = this._yscale + this.speedScale;
if (this._xscale >= 150) {
this._alpha = this._alpha - 10;
if (this._alpha <= 0) {
removeMovieClip(this);
}
}
}
function enterHitam2() {
this.aimX = this.tuju._x;
this.aimY = this.tuju._y;
deltaX = this._x - this.aimX;
deltaY = this._y - this.aimY;
angle = (-Math.atan2(deltaX, deltaY)) / (Math.PI/180);
this._rotation = angle;
if (Math.sqrt((deltaX * deltaX) + (deltaY * deltaY)) > this.speed) {
this.speed = this.speed + this.speedPlus;
this._y = this._y - (this.speed * Math.cos(angle * (Math.PI/180)));
this._x = this._x + (this.speed * Math.sin(angle * (Math.PI/180)));
} else {
removeMovieClip(this);
}
}
function enterSedot() {
this.gdelay++;
if (this.gdelay >= 2) {
hitam = attachMovie("hitam_mc", "darah" + darahKe, darahKe);
hitam._x = this._x;
hitam._y = this._y;
hitam._rotation = this._rotation;
darahKe++;
if (darahKe >= 1800) {
darahKe = 1500;
}
this.gdelay = 0;
}
this._xscale = this._xscale - 2.5;
this._yscale = this._yscale - 2.5;
if (this._xscale <= 10) {
this._xscale = 10;
}
if (this._yscale <= 10) {
this._yscale = 10;
}
this.aimX = this.tuju._x;
this.aimY = this.tuju._y;
deltaX = this._x - this.aimX;
deltaY = this._y - this.aimY;
angle = (-Math.atan2(deltaX, deltaY)) / (Math.PI/180);
this._rotation = angle;
if (Math.sqrt((deltaX * deltaX) + (deltaY * deltaY)) > this.speed) {
this.speed = this.speed + this.speedPlus;
this._y = this._y - (this.speed * Math.cos(angle * (Math.PI/180)));
this._x = this._x + (this.speed * Math.sin(angle * (Math.PI/180)));
} else {
money2 = money2 + Math.ceil(costKe[this.xtipe] * xincNaik2);
removeMovieClip(this);
}
}
function cekSemburDark(indi) {
backApi2();
backSembur();
backSemburDark();
darah = attachMovie("sembur_mc2x", "darah" + darahKe, darahKe);
darah._x = ((indi._x + 30) + random(15)) - 30;
darah._y = ((indi._y - 10) + random(15)) - 30;
darah._xscale = (darah._yscale = 150);
darah._alpha = 100;
i = 500;
while (i <= 560) {
if (darah.hitTest(_root["chara" + i])) {
if (_root["chara" + i].tipe != indi.tipe) {
zi = 1;
while (zi <= 2) {
darahxx = _root["chara" + i].attachMovie("bakar_mc2", "darahx" + zi, zi);
darahxx._x = random(40) - 20;
darahxx._y = random(40) - 20;
darahxx._rotation = random(360);
darahxx._xscale = (darahxx._yscale = random(50) + 25);
_root["chara" + i].nyawa = _root["chara" + i].nyawa - (indi.damage * naikJauh);
zi++;
}
}
}
i++;
}
darahKe++;
if (darahKe >= 1800) {
darahKe = 1500;
}
}
function cekSihirMacam(indi) {
rand = random(5);
if (rand == 0) {
cekLawatarEs(indi);
} else if (rand == 1) {
cekLaser(indi);
} else if (rand == 2) {
cekAngin(indi);
} else if (rand == 3) {
cekSedot(indi);
} else if (rand == 4) {
cekSemburDark(indi);
} else {
cekSalju2x(indi);
}
}
function cekPause() {
if (sedangPause == false) {
xpause = attachMovie("pause_mc", "pause_mc", pauseKe);
sedangPause = true;
cekPauseSemua(true);
laguKini = myMusic.position / 1000;
myMusic.stop();
} else {
removeMovieClip(pause_mc);
sedangPause = false;
cekPauseSemua(false);
myMusic.start(laguKini, 1);
myMusic.onSoundComplete = function () {
backPerang();
};
}
}
function cekPauseSemua(indi) {
if (indi == true) {
i = 1;
while (i <= 34) {
frame_mc.xbox_mc["box" + i].enabled = false;
frame_mc.xbox_mc["naik" + i].stop();
i++;
}
i = 1;
while (i <= 4) {
frame_mc["kotak" + i].enabled = false;
i++;
}
znaik.stop();
naik_mc.stop();
naik_mc2.stop();
i = 300;
while (i <= 400) {
_root["darah" + i].stop();
i++;
}
i = 500;
while (i <= 560) {
_root["chara" + i].anim.stop();
i++;
}
i = 1000;
while (i <= 1100) {
_root["panah" + i].anim.stop();
i++;
}
i = 1500;
while (i <= 1800) {
_root["darah" + i].stop();
i++;
}
i = 5000;
while (i <= 5100) {
_root["darah" + i].stop();
i++;
}
i = 3000;
while (i <= 3100) {
_root["bonus" + i].keping.stop();
i++;
}
} else {
i = 1;
while (i <= 34) {
frame_mc.xbox_mc["box" + i].enabled = true;
if (frame_mc.xbox_mc["naik" + i]._currentframe >= 2) {
frame_mc.xbox_mc["naik" + i].play();
}
i++;
}
i = 1;
while (i <= 4) {
if (frame_mc["gembok" + i]._visible == false) {
frame_mc["kotak" + i].enabled = true;
}
i++;
}
znaik.play();
naik_mc.play();
naik_mc2.play();
i = 300;
while (i <= 400) {
_root["darah" + i].play();
i++;
}
i = 500;
while (i <= 560) {
_root["chara" + i].anim.play();
i++;
}
i = 1000;
while (i <= 1100) {
_root["panah" + i].anim.play();
i++;
}
i = 1500;
while (i <= 1800) {
_root["darah" + i].play();
i++;
}
i = 5000;
while (i <= 5100) {
_root["darah" + i].play();
i++;
}
i = 3000;
while (i <= 3100) {
_root["bonus" + i].keping.play();
i++;
}
}
}
function clearSemua() {
clearInterval(idMusuh);
clearInterval(idLedak1);
clearInterval(idLedak2);
delete _root.onEnterFrame;
delete _root.onMouseDown;
delete myListener.onKeyDown;
removeListener(myListener);
removeMovieClip(pause_mc);
removeMovieClip(frame_mc);
removeMovieClip(istana_mc);
removeMovieClip(naik_mc);
removeMovieClip(naik_mc2);
i = 1;
while (i <= 12) {
delete _root["area_mc" + i].onEnterFrame;
removeMovieClip(_root["area_mc" + i]);
i++;
}
removeMovieClip(_root["area" + keLevel]);
removeMovieClip(_root[("area" + keLevel) - 1]);
removeMovieClip(_root[("area" + keLevel) + 1]);
i = 300;
while (i <= 400) {
removeMovieClip(_root["darah" + i]);
i++;
}
i = 401;
while (i <= 450) {
removeMovieClip(_root["chara" + i]);
i++;
}
i = 500;
while (i <= 560) {
removeMovieClip(_root["chara" + i]);
i++;
}
i = 1000;
while (i <= 1100) {
removeMovieClip(_root["panah" + i]);
i++;
}
i = 1500;
while (i <= 1800) {
removeMovieClip(_root["darah" + i]);
i++;
}
i = 5000;
while (i <= 5100) {
removeMovieClip(_root["darah" + i]);
i++;
}
i = 3000;
while (i <= 3100) {
removeMovieClip(_root["bonus" + i]);
i++;
}
i = 4000;
while (i <= 4100) {
removeMovieClip(_root["ledak" + i]);
i++;
}
}
function listen() {
myListener = new Object();
myListener.onKeyDown = function () {
if (Key.getCode() == 80) {
if (petamaKali == false) {
cekPause();
}
}
if (Key.getCode() == 81) {
if (petamaKali == false) {
if (sedangPause == true) {
clearSemua();
backMenu();
gotoAndStop ("awal");
}
}
}
if (Key.getCode() == 49) {
if (petamaKali == false) {
if (sedangPause == false) {
indi = 1;
if (frame_mc["gembok" + indi]._visible == false) {
frame_mc["kotak" + indi].gotoAndStop(2);
kotakSekarang = indi;
cekKotak();
cekBox();
}
}
}
}
if (Key.getCode() == 50) {
if (petamaKali == false) {
if (sedangPause == false) {
indi = 2;
if (frame_mc["gembok" + indi]._visible == false) {
frame_mc["kotak" + indi].gotoAndStop(2);
kotakSekarang = indi;
cekKotak();
cekBox();
}
}
}
}
if (Key.getCode() == 51) {
if (petamaKali == false) {
if (sedangPause == false) {
indi = 3;
if (frame_mc["gembok" + indi]._visible == false) {
frame_mc["kotak" + indi].gotoAndStop(2);
kotakSekarang = indi;
cekKotak();
cekBox();
}
}
}
}
if (Key.getCode() == 52) {
if (petamaKali == false) {
if (sedangPause == false) {
indi = 4;
if (frame_mc["gembok" + indi]._visible == false) {
frame_mc["kotak" + indi].gotoAndStop(2);
kotakSekarang = indi;
cekKotak();
cekBox();
}
}
}
}
};
Key.addListener(myListener);
}
stop();
if (tipeLevel == undefined) {
tipeLevel = "normal";
}
akhirZone = false;
akhirGame = 10;
if (keLevel <= 3) {
levelGame = "normal";
} else if (keLevel <= 7) {
levelGame = "hard";
} else if (keLevel <= 10) {
levelGame = "impossible";
}
if (keLevel == 1) {
money1 = 1200;
money2 = 400;
} else if (keLevel == 2) {
money1 = 1100;
money2 = 500;
} else if (keLevel == 3) {
money1 = 1000;
money2 = 600;
} else if (keLevel == 4) {
money1 = 900;
money2 = 700;
} else if (keLevel == 5) {
money1 = 800;
money2 = 800;
} else if (keLevel == 6) {
money1 = 700;
money2 = 900;
} else if (keLevel == 7) {
money1 = 800;
money2 = 800;
} else if (keLevel == 8) {
money1 = 1000;
money2 = 1000;
} else if (keLevel == 9) {
money1 = 1200;
money2 = 1200;
} else if (keLevel == 10) {
money1 = 1400;
money2 = 1400;
}
backPerang();
init2();
init();
if (keLevel == 1) {
petamaKali = true;
cekPauseSemua(true);
sedangPause = true;
msgBox = attachMovie("msgBox_mc", "msgBox_mc", msgBoxKe);
msgBox._x = 400;
msgBox._y = 300;
msgBox.ok_btn.onRelease = function () {
if (msgBox_mc._currentframe < 6) {
msgBox_mc.gotoAndStop(msgBox_mc._currentframe + 1);
}
};
} else {
petamaKali = false;
}
_root.onMouseDown = function () {
if ((tipePlay == "demo") && (sedangPause == false)) {
clearSemua();
backMenu();
gotoAndStop ("awal");
}
};
_root.onEnterFrame = function () {
if ((sedangPause == false) || (petamaKali == true)) {
if (isNaN(money1)) {
money1 = 0;
} else if (money1 == undefined) {
money1 = 0;
} else if (money1 <= 0) {
money1 = 0;
}
frame_mc.xmoney = "$" + money1;
nyawa1 = Math.ceil(nyawa1);
nyawa2 = Math.ceil(nyawa2);
wnyawa1 = Math.ceil(wnyawa1);
wnyawa2 = Math.ceil(wnyawa2);
if (nyawa1 < wnyawa1) {
wnyawa1--;
} else {
wnyawa1 = nyawa1;
}
if (nyawa2 < wnyawa2) {
wnyawa2--;
} else {
wnyawa2 = nyawa2;
}
if (nyawa1 <= 0) {
nyawa1 = 0;
}
if (nyawa2 <= 0) {
nyawa2 = 0;
}
if (wnyawa1 <= 0) {
wnyawa1 = 0;
}
if (wnyawa2 <= 0) {
wnyawa2 = 0;
}
frame_mc.shield1 = (Math.ceil(wnyawa1) + "/") + totNyawa1;
frame_mc.shield2 = (Math.ceil(wnyawa2) + "/") + totNyawa2;
frame_mc.xnyawa1.gotoAndStop(Math.ceil((wnyawa1 / totNyawa1) * 100));
frame_mc.xnyawa2.gotoAndStop(Math.ceil((wnyawa2 / totNyawa2) * 100));
frame_mc.level = "Level " + keLevel;
frame_mc.zone = (("Zone " + keZone) + "/") + totZone;
if (wnyawa1 <= 0) {
frame_mc.xnyawa1.gotoAndStop(1);
cekKalah();
} else if (wnyawa2 <= 0) {
frame_mc.xnyawa2.gotoAndStop(1);
cekMenang();
}
}
};
Frame 382
stop();
backEnd();
go_btn.onRollOver = function () {
over();
};
go_btn.onRelease = function () {
klik();
gotoAndStop (351);
};
tips2 = "You should buy stronger Warriors at higher prices, one Strong Warrior is more powerful than 2 Weak Warriors at the same price. Don't spend your money to create a Weak Warrior, collect your money to create a Strong Warrior.";
tips3 = "When you enter the last Zone at all levels, you will fight against Guards of the Enemy's castle, watch out for the Guards, they have more power than Normal Warriors, create Long Range Warriors or Air Warriors to kill them, Destroy Enemy castles to clear the last Zone to win the level, and go to the next Level.";
tips4 = "You should buy Strong Warriors at higher prices, one Strong Warrior is more powerful than 2 Weak Warriors at the same price. Don't spend your money to create 2 Weak Warriors, collect your money to create 1 Strong Warrior.";
tips5 = "Air Warriors are stronger than Land Warriors, but they may lose your money. When Land Warriors damage the Enemy's shield, you will get more money than if Air Warriors damage the Enemy's shield.";
tips6 = "Don't create just Air Warriors or Land Warriors too often, create Air and Land Warriors by rotating them. The stabilization of Land and Air Warriors is the Key to creating a balance for your attack and defense.";
tips7 = "When Land Warriors Attack the Air Warriors by Long Range Attack, the Damage will be reduced because of the influence of Gravity. Conversely, when Air Warriors Attack the Land Warriors by Long Range Attack, the Damage will be increased because of the acceleration of Gravity. On the other hand, when Air Warriors attack Air Warriors, the Damage will be normal, so if the Enemy casts a Long Range Attack, use Long Range Air Warriors to kill them.";
tips8 = "You are near to the Final Battle, don't forget to use your Lethal Magic to kill the the strong enemies and always check on the Super Warrior and Lethal Magic button for new Warriors and Magic.";
tips9 = "In the final battle, you must be careful of the guards in the Enemy's Castle, good luck Warrior.";
tips10 = "Welcome to the Final Battle..";
tips = _root["tips" + keLevel];
Instance of Symbol 3 MovieClip in Frame 382
on (release) {
getURL ("http://www.maxgames.com", "_blank");
}
Frame 383
stop();
quit_btn.onRollOver = function () {
over();
};
quit_btn.onRelease = function () {
klik();
gotoAndStop ("awal");
};
tips0 = "You should buy stronger Warriors at higher prices, one strong Warrior is more powerful than 2 weak Warriors at the same price. Don't spend your money to create a weak Warrior, collect your money to create a strong Warrior.";
tips1 = "When you enter the last Zone at all levels, you will fight against Guards of the Enemy's castle, watch out for the Guards, they have more power than normal Warriors, create Long Range Warriors or Air Warriors to kill them, destroy Enemy castles to clear the last Zone to win the Level, and go to the next Level.";
tips2 = "You should buy Strong Warriors at higher prices, one Strong Warrior is more powerful than 2 Weak Warriors at the same price. Don't spend your money to create 2 Weak Warriors, collect your money to create 1 Strong Warrior.";
tips3 = "Air Warriors are stronger than Land Warriors, but they may lose your money. When Land Warriors damage the Enemy's shield, you will get more money than if Air Warriors damage the Enemy's shield.";
tips4 = "Don't create just Air Warriors or Land Warriors too often, create Air and Land Warriors by rotating them. The stabilization of Land and Air Warriors is the Key to creating a balance for your Attack and Defense.";
tips5 = "When Land Warriors Attack the Air Warriors by long range Attack, the Damage will be reduced because of the influence of Gravity. Conversely, when Air Warriors attack the Land Warriors by long range Attack, the Damage will be increased because of the acceleration of Gravity. On the other hand, when Air Warriors Attack Air Warriors, the damage will be normal, so if the Enemy casts a long range Attack, use long range Air Warriors to kill them.";
tips = _root["tips" + random(6)];
Instance of Symbol 3 MovieClip in Frame 383
on (release) {
getURL ("http://www.maxgames.com", "_blank");
}
Frame 384
stop();
backEnd();
quit_btn.onRollOver = function () {
over();
};
quit_btn.onRelease = function () {
klik();
gotoAndStop (266);
};
Instance of Symbol 3 MovieClip in Frame 384
on (release) {
getURL ("http://www.maxgames.com", "_blank");
}
Symbol 16 Button
on (release) {
_root.gotoAndStop("game");
}
Symbol 17 MovieClip Frame 1
stop();
Symbol 17 MovieClip Frame 105
stop();
Symbol 28 MovieClip [logo_mc] Frame 1
stop();
Symbol 70 MovieClip Frame 9
_root.cekBolaApix(_parent);
Symbol 78 MovieClip Frame 1
_root.backJatuh();
Symbol 78 MovieClip Frame 11
stop();
Symbol 78 MovieClip Frame 20
play();
Symbol 78 MovieClip Frame 90
removeMovieClip(_parent);
Symbol 79 MovieClip [eagle_mc3] Frame 1
stop();
Symbol 95 MovieClip Frame 10
_root.cekPanahApix(_parent);
Symbol 108 MovieClip Frame 1
_root.backJatuh();
Symbol 108 MovieClip Frame 11
stop();
Symbol 108 MovieClip Frame 20
play();
Symbol 108 MovieClip Frame 90
removeMovieClip(_parent);
Symbol 109 MovieClip [bird_mc3] Frame 1
stop();
Symbol 111 MovieClip [naik_mc2] Frame 1
stop();
_root.cekKeluar2();
if (_root.setDelay2 == 1) {
gotoAndStop (2);
} else if (_root.setDelay2 == 2) {
gotoAndStop (70);
}
Symbol 111 MovieClip [naik_mc2] Frame 2
play();
Symbol 111 MovieClip [naik_mc2] Frame 55
_root.jagoanMuncul2();
gotoAndStop (1);
Symbol 111 MovieClip [naik_mc2] Frame 70
play();
Symbol 111 MovieClip [naik_mc2] Frame 134
_root.jagoanMuncul2();
gotoAndStop (1);
Symbol 121 MovieClip Frame 1
stop();
Symbol 161 MovieClip Frame 10
_root.cekSihirMacam(_parent);
Symbol 162 MovieClip Frame 15
_root.cekDarah2(_parent);
Symbol 162 MovieClip Frame 45
removeMovieClip(_parent);
Symbol 163 MovieClip [rock_mc2] Frame 1
stop();
Symbol 184 MovieClip [sembur_mc2x] Frame 11
removeMovieClip(this);
Symbol 192 MovieClip Frame 10
rand = random(3);
if (rand == 1) {
_root.cekSemburDark(_parent);
} else {
_root.cekSalju2x(_parent);
}
Symbol 193 MovieClip Frame 1
_root.backJatuh();
Symbol 193 MovieClip Frame 11
stop();
Symbol 193 MovieClip Frame 20
play();
Symbol 193 MovieClip Frame 90
removeMovieClip(_parent);
Symbol 194 MovieClip [dark_mc2] Frame 1
stop();
Symbol 199 MovieClip [laser_mc3] Frame 10
removeMovieClip(this);
Symbol 239 MovieClip [petir_mc] Frame 17
_root.cekMatiSemua(this);
Symbol 239 MovieClip [petir_mc] Frame 49
removeMovieClip(this);
Symbol 259 MovieClip Frame 7
_root.cekSedot(_parent);
Symbol 260 MovieClip Frame 1
_root.backJatuh();
Symbol 260 MovieClip Frame 20
play();
Symbol 260 MovieClip Frame 30
removeMovieClip(_parent);
Symbol 261 MovieClip [iblis_mc2] Frame 1
stop();
Symbol 262 MovieClip [iblis_mc] Frame 1
stop();
Symbol 301 MovieClip Frame 7
_root.cekAngin(_parent);
Symbol 302 MovieClip Frame 11
removeMovieClip(_parent);
Symbol 303 MovieClip [demoni_mc2] Frame 1
stop();
Symbol 304 MovieClip [demoni_mc] Frame 1
stop();
Symbol 314 MovieClip [laser_mc] Frame 10
removeMovieClip(this);
Symbol 321 MovieClip Frame 7
_root.cekLaser(_parent);
Symbol 322 MovieClip Frame 1
_root.backJatuh();
Symbol 322 MovieClip Frame 11
stop();
Symbol 322 MovieClip Frame 20
play();
Symbol 322 MovieClip Frame 90
removeMovieClip(_parent);
Symbol 323 MovieClip [super_mc2] Frame 1
stop();
Symbol 324 MovieClip [super_mc] Frame 1
stop();
Symbol 349 MovieClip Frame 9
_root.cekLawatarEs(_parent);
Symbol 350 MovieClip Frame 45
removeMovieClip(_parent);
Symbol 351 MovieClip [lawatar_mc2] Frame 1
stop();
Symbol 352 MovieClip [lawatar_mc] Frame 1
stop();
Symbol 429 MovieClip Frame 9
_root.cekPanahDeja(_parent);
Symbol 431 MovieClip Frame 1
_root.backJatuh();
Symbol 431 MovieClip Frame 11
stop();
Symbol 431 MovieClip Frame 20
play();
Symbol 431 MovieClip Frame 90
removeMovieClip(_parent);
Symbol 432 MovieClip [deja_mc2] Frame 1
stop();
Symbol 433 MovieClip [deja_mc] Frame 1
stop();
Symbol 452 MovieClip [ledakx] Frame 19
removeMovieClip(this);
Symbol 471 MovieClip Frame 3
_root.cekEsLoncat(_parent._parent);
Symbol 471 MovieClip Frame 15
removeMovieClip(_parent);
Symbol 472 MovieClip [balok_mc] Frame 1
stop();
Symbol 486 MovieClip [golok_mc2] Frame 1
_root.cekLedakGolokx(this, 1);
Symbol 486 MovieClip [golok_mc2] Frame 4
_root.cekLedakGolokx(this, 2);
Symbol 486 MovieClip [golok_mc2] Frame 7
_root.cekLedakGolokx(this, 3);
Symbol 486 MovieClip [golok_mc2] Frame 10
_root.cekLedakGolokx(this, 4);
Symbol 486 MovieClip [golok_mc2] Frame 14
removeMovieClip(this);
Symbol 497 MovieClip [golok_mc] Frame 1
_root.cekLedakGolok(this, 1);
Symbol 497 MovieClip [golok_mc] Frame 4
_root.cekLedakGolok(this, 2);
Symbol 497 MovieClip [golok_mc] Frame 7
_root.cekLedakGolok(this, 3);
Symbol 497 MovieClip [golok_mc] Frame 10
_root.cekLedakGolok(this, 4);
Symbol 497 MovieClip [golok_mc] Frame 14
removeMovieClip(this);
Symbol 515 MovieClip Frame 7
_root.cekGolokHitam(_parent);
Symbol 516 MovieClip Frame 10
_root.cekDarah2(_parent);
Symbol 516 MovieClip Frame 15
_root.cekDarah2(_parent);
Symbol 516 MovieClip Frame 20
_root.cekDarah2(_parent);
Symbol 516 MovieClip Frame 45
removeMovieClip(_parent);
Symbol 517 MovieClip [detro_mc2] Frame 1
stop();
Symbol 518 MovieClip [detro_mc] Frame 1
stop();
Symbol 556 MovieClip Frame 9
_root.cekDarah(_parent);
_root.cekHitam(_parent);
_root.backKeris();
Symbol 557 MovieClip Frame 1
_root.backJatuh();
Symbol 557 MovieClip Frame 11
stop();
Symbol 557 MovieClip Frame 20
play();
Symbol 557 MovieClip Frame 90
removeMovieClip(_parent);
Symbol 558 MovieClip [hayam_mc] Frame 1
stop();
Symbol 559 MovieClip [hayam_mc2] Frame 1
stop();
Symbol 580 MovieClip [hitam_mc] Frame 1
gotoAndPlay(random(14) + 1);
Symbol 580 MovieClip [hitam_mc] Frame 25
removeMovieClip(this);
Symbol 600 MovieClip Frame 2
_root.cekDarah(_parent);
_root.cekHitam(_parent);
_root.backCakar();
Symbol 615 MovieClip Frame 15
_root.cekDarah2(_parent);
Symbol 615 MovieClip Frame 45
removeMovieClip(_parent);
Symbol 616 MovieClip [crocodile_mc2] Frame 1
stop();
Symbol 617 MovieClip [crocodile_mc] Frame 1
stop();
Symbol 642 MovieClip [msgBox_mc] Frame 1
stop();
Symbol 642 MovieClip [msgBox_mc] Frame 6
_root.sudahAkhir();
Symbol 655 MovieClip [darah_mc3] Frame 15
removeMovieClip(this);
Symbol 672 MovieClip Frame 9
_root.cekSihirx(_parent);
Symbol 674 MovieClip Frame 15
removeMovieClip(_parent);
Symbol 675 MovieClip [witch_mc3] Frame 1
stop();
Symbol 680 MovieClip Frame 9
_root.cekSihir(_parent);
Symbol 681 MovieClip [witch_mc2] Frame 1
stop();
Symbol 682 MovieClip [witch_mc] Frame 1
stop();
Symbol 730 MovieClip Frame 9
_root.cekSalju(_parent);
Symbol 737 MovieClip Frame 1
_root.backJatuh();
Symbol 737 MovieClip Frame 11
stop();
Symbol 737 MovieClip Frame 20
play();
Symbol 737 MovieClip Frame 90
removeMovieClip(_parent);
Symbol 738 MovieClip [white_mc2] Frame 1
stop();
Symbol 739 MovieClip [white_mc] Frame 1
stop();
Symbol 770 MovieClip Frame 9
_root.cekDarah(_parent);
_root.backCambuk();
Symbol 770 MovieClip Frame 17
rand = random(3);
if (rand == 1) {
gotoAndPlay (40);
} else {
gotoAndPlay (1);
}
Symbol 770 MovieClip Frame 47
_root.cekDarah(_parent);
_root.cekDarah3(_parent);
_root.backCambuk();
Symbol 770 MovieClip Frame 56
rand = random(3);
if (rand == 1) {
gotoAndPlay (40);
} else {
gotoAndPlay (1);
}
Symbol 777 MovieClip Frame 13
_root.cekDarah2(_parent);
Symbol 777 MovieClip Frame 45
removeMovieClip(_parent);
Symbol 778 MovieClip [whip_mc2] Frame 1
stop();
Symbol 779 MovieClip [whip_mc] Frame 1
stop();
Symbol 794 MovieClip Frame 10
removeMovieClip(_parent);
Symbol 795 MovieClip [tombak_mc2] Frame 1
stop();
Symbol 796 MovieClip [tombak_mc1] Frame 1
stop();
Symbol 820 MovieClip Frame 9
_root.cekDarah(_parent);
_root.backPedang();
Symbol 820 MovieClip Frame 19
rand = random(3);
if (rand == 1) {
gotoAndPlay (40);
} else {
gotoAndPlay (1);
}
Symbol 820 MovieClip Frame 54
_root.cekDarah(_parent);
_root.cekDarah3(_parent);
_root.backPedang();
Symbol 820 MovieClip Frame 60
rand = random(3);
if (rand == 1) {
gotoAndPlay (40);
} else {
gotoAndPlay (1);
}
Symbol 821 MovieClip Frame 15
_root.cekDarah2(_parent);
Symbol 821 MovieClip Frame 45
removeMovieClip(_parent);
Symbol 822 MovieClip [sword_mc2] Frame 1
stop();
Symbol 823 MovieClip [sword_mc] Frame 1
stop();
Symbol 839 MovieClip Frame 9
_root.cekTombakx(_parent);
Symbol 841 MovieClip Frame 15
_root.cekDarah2(_parent);
Symbol 841 MovieClip Frame 45
removeMovieClip(_parent);
Symbol 842 MovieClip [spear_mc3] Frame 1
stop();
Symbol 848 MovieClip Frame 9
_root.cekTombak(_parent);
Symbol 849 MovieClip [spear_mc2] Frame 1
stop();
Symbol 850 MovieClip [spear_mc] Frame 1
stop();
Symbol 876 MovieClip [sihir_mcx] Frame 18
removeMovieClip(this);
Symbol 877 MovieClip [sembur_mc2] Frame 21
removeMovieClip(this);
Symbol 888 MovieClip [sembur_mc] Frame 21
removeMovieClip(this);
Symbol 902 MovieClip [salju_ledak] Frame 11
removeMovieClip(this);
Symbol 937 MovieClip Frame 1
stop();
Symbol 954 MovieClip [pause_mc] Frame 1
function cekSpeedQuality() {
i = 1;
while (i <= 3) {
this["speed" + i].angka = i;
this["quality" + i].angka = i;
this["speed" + i].gotoAndStop(1);
this["quality" + i].gotoAndStop(1);
this["speed" + i].onRelease = klikSpeed;
this["quality" + i].onRelease = klikQuality;
this["speed" + i].onRollOver = function () {
over();
};
this["quality" + i].onRollOver = function () {
over();
};
i++;
}
this["speed" + _root.speedGame].gotoAndStop(2);
this["quality" + _root.qualityGame].gotoAndStop(2);
}
function klikSpeed() {
klik();
indi = new String(this);
_root.speedGame = Number(indi.substr(indi.length - 1, 1));
cekSpeedQuality();
}
function klikQuality() {
klik();
indi = new String(this);
_root.qualityGame = Number(indi.substr(indi.length - 1, 1));
if (_root.qualityGame == 1) {
_quality = "HIGH";
} else if (_root.qualityGame == 2) {
_quality = "MEDIUM";
} else if (_root.qualityGame == 3) {
_quality = "LOW";
}
cekSpeedQuality();
}
stop();
bar1_mc.bar_mc._x = Math.ceil((_root.volum1 / 0.434782608695652) - 115);
bar1_mc.bar_mc.onEnterFrame = function () {
_root.volum1 = int(0.434782608695652 * (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.onRelease = (bar1_mc.indi_mc.onReleaseOutside = function () {
over();
stopDrag();
});
bar2_mc.bar_mc._x = Math.ceil((_root.volum2 / 0.434782608695652) - 115);
bar2_mc.bar_mc.onEnterFrame = function () {
_root.volum2 = int(0.434782608695652 * (this._x + 115));
_root.volum3 = int(0.434782608695652 * (this._x + 115));
_root.mySound.setVolume(_root.volum2);
_root.mySound2.setVolume(_root.volum3);
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.onRelease = (bar2_mc.indi_mc.onReleaseOutside = function () {
over();
stopDrag();
});
cekSpeedQuality();
Instance of Symbol 3 MovieClip in Symbol 954 MovieClip [pause_mc] Frame 1
on (release) {
getURL ("http://www.maxgames.com", "_blank");
}
Symbol 956 MovieClip Frame 10
removeMovieClip(_parent);
Symbol 957 MovieClip [panah_mc2] Frame 1
stop();
Symbol 958 MovieClip [panah_mc1] Frame 1
stop();
Symbol 969 MovieClip [naik_mc] Frame 1
stop();
_root.cekKeluar();
if (_root.setDelay == 1) {
gotoAndStop (2);
} else if (_root.setDelay == 2) {
gotoAndStop (70);
}
Symbol 969 MovieClip [naik_mc] Frame 2
play();
Symbol 969 MovieClip [naik_mc] Frame 50
_root.musuhMuncul();
gotoAndStop (1);
Symbol 969 MovieClip [naik_mc] Frame 70
play();
Symbol 969 MovieClip [naik_mc] Frame 139
_root.musuhMuncul();
gotoAndStop (1);
Symbol 987 MovieClip Frame 9
_root.cekSembur(_parent);
Symbol 994 MovieClip Frame 1
_root.backJatuh();
Symbol 994 MovieClip Frame 11
stop();
Symbol 994 MovieClip Frame 20
play();
Symbol 994 MovieClip Frame 90
removeMovieClip(_parent);
Symbol 995 MovieClip [naga_mc2] Frame 1
stop();
Symbol 996 MovieClip [naga_mc] Frame 1
stop();
Symbol 1042 MovieClip Frame 9
_root.cekBatuJatuh(_parent);
Symbol 1050 MovieClip Frame 1
_root.backJatuh();
Symbol 1050 MovieClip Frame 11
stop();
Symbol 1050 MovieClip Frame 20
play();
Symbol 1050 MovieClip Frame 90
removeMovieClip(_parent);
Symbol 1051 MovieClip [monyet_mc2] Frame 1
stop();
Symbol 1052 MovieClip [monyet_mc] Frame 1
stop();
Symbol 1072 MovieClip Frame 71
stop();
_root.cekAwal();
Symbol 1090 MovieClip [meledak_mc] Frame 16
stop();
removeMovieClip(_parent);
Symbol 1130 MovieClip [magic_mc] Frame 20
removeMovieClip(this);
Symbol 1148 MovieClip Frame 9
_root.cekDarah(_parent);
_root.backPisau();
Symbol 1148 MovieClip Frame 21
rand = random(3);
if (rand == 1) {
gotoAndPlay (40);
} else {
gotoAndPlay (1);
}
Symbol 1148 MovieClip Frame 52
_root.cekDarah(_parent);
_root.cekDarah3(_parent);
_root.backPisau();
Symbol 1148 MovieClip Frame 64
rand = random(3);
if (rand == 1) {
gotoAndPlay (40);
} else {
gotoAndPlay (1);
}
Symbol 1149 MovieClip Frame 15
_root.cekDarah2(_parent);
Symbol 1149 MovieClip Frame 45
removeMovieClip(_parent);
Symbol 1150 MovieClip [knife_mc2] Frame 1
stop();
Symbol 1151 MovieClip [knife_mc] Frame 1
stop();
Symbol 1168 MovieClip [kabut_mc] Frame 17
removeMovieClip(this);
Symbol 1194 MovieClip Frame 1
stop();
Symbol 1194 MovieClip Frame 50
stop();
Symbol 1211 MovieClip Frame 1
stop();
Instance of Symbol 3 MovieClip in Symbol 1211 MovieClip Frame 2
on (release) {
getURL ("http://www.maxgames.com", "_blank");
}
Symbol 1224 MovieClip Frame 1
stop();
Symbol 1227 MovieClip Frame 1
stop();
Symbol 1227 MovieClip Frame 2
play();
Symbol 1227 MovieClip Frame 65
_root.jagoanDelay(this.jenis);
Symbol 1228 MovieClip Frame 1
stop();
Symbol 1228 MovieClip Frame 2
play();
Symbol 1228 MovieClip Frame 50
_root.jagoanDelay(this.jenis);
Symbol 1232 MovieClip Frame 1
stop();
Symbol 1234 MovieClip Frame 1
stop();
Symbol 1236 MovieClip Frame 1
stop();
Symbol 1237 MovieClip Frame 1
stop();
Symbol 1239 MovieClip Frame 1
stop();
Symbol 1241 MovieClip Frame 1
stop();
Symbol 1243 MovieClip Frame 1
stop();
Symbol 1246 MovieClip Frame 1
stop();
Symbol 1253 MovieClip Frame 1
stop();
Symbol 1255 MovieClip Frame 1
stop();
Symbol 1256 MovieClip Frame 1
stop();
Symbol 1257 MovieClip Frame 1
stop();
Symbol 1259 MovieClip Frame 1
stop();
Symbol 1261 MovieClip Frame 1
stop();
Symbol 1263 MovieClip Frame 1
stop();
Symbol 1266 MovieClip Frame 1
stop();
Symbol 1269 MovieClip Frame 1
stop();
Symbol 1271 MovieClip Frame 1
stop();
Symbol 1273 MovieClip Frame 1
stop();
Symbol 1276 MovieClip Frame 1
stop();
Symbol 1280 MovieClip Frame 1
stop();
Symbol 1283 MovieClip Frame 1
stop();
Symbol 1295 MovieClip Frame 1
stop();
Symbol 1304 MovieClip Frame 1
stop();
Symbol 1305 MovieClip Frame 1
stop();
Symbol 1307 MovieClip Frame 1
stop();
Symbol 1310 MovieClip Frame 1
stop();
Symbol 1313 MovieClip Frame 1
stop();
Symbol 1316 MovieClip Frame 1
stop();
Symbol 1319 MovieClip Frame 1
stop();
Symbol 1321 MovieClip Frame 1
stop();
Symbol 1323 MovieClip Frame 1
stop();
Symbol 1325 MovieClip Frame 1
stop();
Symbol 1358 MovieClip Frame 9
_root.cekPanahApix(_parent);
Symbol 1360 MovieClip Frame 11
_root.cekDarah2(_parent);
Symbol 1360 MovieClip Frame 45
removeMovieClip(_parent);
Symbol 1361 MovieClip [fire_mc3] Frame 1
stop();
Symbol 1371 MovieClip Frame 9
_root.cekPanahApi(_parent);
Symbol 1372 MovieClip [fire_mc2] Frame 1
stop();
Symbol 1373 MovieClip [fire_mc] Frame 1
stop();
Symbol 1374 MovieClip Frame 9
_root.cekBolaApi(_parent);
Symbol 1375 MovieClip [eagle_mc2] Frame 1
stop();
Symbol 1376 MovieClip [eagle_mc] Frame 1
stop();
Symbol 1379 MovieClip [darah_mc2] Frame 180
removeMovieClip(this);
Symbol 1380 MovieClip [darah_mc] Frame 15
removeMovieClip(this);
Symbol 1394 MovieClip Frame 7
_root.cekDarah(_parent);
_root.backGada();
Symbol 1394 MovieClip Frame 17
rand = random(3);
if (rand == 1) {
gotoAndPlay (40);
} else {
gotoAndPlay (1);
}
Symbol 1394 MovieClip Frame 54
_root.cekDarah(_parent);
_root.cekDarah3(_parent);
_root.backGada();
Symbol 1394 MovieClip Frame 65
rand = random(3);
if (rand == 1) {
gotoAndPlay (40);
} else {
gotoAndPlay (1);
}
Symbol 1395 MovieClip Frame 17
_root.cekDarah2(_parent);
Symbol 1395 MovieClip Frame 45
removeMovieClip(_parent);
Symbol 1396 MovieClip [cudgel_mc2] Frame 1
stop();
Symbol 1397 MovieClip [cudgel_mc] Frame 1
stop();
Symbol 1523 MovieClip Frame 1
stop();
Symbol 1530 MovieClip Frame 9
_root.cekBatu(_parent);
Symbol 1531 MovieClip Frame 15
_root.cekDarah2(_parent);
Symbol 1531 MovieClip Frame 45
removeMovieClip(_parent);
Symbol 1532 MovieClip [catapult_mc2] Frame 1
stop();
Symbol 1533 MovieClip [catapult_mc] Frame 1
stop();
Symbol 1601 MovieClip [bola_mc2] Frame 1
stop();
Symbol 1601 MovieClip [bola_mc2] Frame 2
removeMovieClip(this);
Symbol 1602 MovieClip [bola_mc1] Frame 1
stop();
Symbol 1602 MovieClip [bola_mc1] Frame 2
removeMovieClip(this);
Symbol 1627 MovieClip Frame 10
_root.cekPanahApi(_parent);
Symbol 1628 MovieClip [bird_mc2] Frame 1
stop();
Symbol 1629 MovieClip [bird_mc] Frame 1
stop();
Symbol 1633 MovieClip [belugerin_mc] Frame 1
play();
Symbol 1633 MovieClip [belugerin_mc] Frame 150
stop();
_root.backMenu();
_root.play();
Symbol 1637 MovieClip Frame 10
removeMovieClip(_parent);
Symbol 1638 MovieClip [batu_mc2] Frame 1
stop();
Symbol 1639 MovieClip [batu_mc1] Frame 1
stop();
Symbol 1658 MovieClip [bakar_mc3] Frame 10
removeMovieClip(this);
Symbol 1665 MovieClip [bakar_mc2] Frame 16
removeMovieClip(this);
Symbol 1666 MovieClip [bakar_mc] Frame 2
gotoAndPlay(random(30) + 1);
Symbol 1666 MovieClip [bakar_mc] Frame 45
removeMovieClip(this);
Symbol 1672 MovieClip Frame 7
_root.cekDarah(_parent);
_root.backKapak();
Symbol 1672 MovieClip Frame 14
rand = random(3);
if (rand == 1) {
gotoAndPlay (40);
} else {
gotoAndPlay (1);
}
Symbol 1672 MovieClip Frame 56
_root.cekDarah(_parent);
_root.cekDarah3(_parent);
_root.backKapak();
Symbol 1672 MovieClip Frame 65
rand = random(3);
if (rand == 1) {
gotoAndPlay (40);
} else {
gotoAndPlay (1);
}
Symbol 1673 MovieClip Frame 15
_root.cekDarah2(_parent);
Symbol 1673 MovieClip Frame 45
removeMovieClip(_parent);
Symbol 1674 MovieClip [axe_mc2] Frame 1
stop();
Symbol 1675 MovieClip [axe_mc] Frame 1
stop();
Symbol 1703 MovieClip Frame 9
_root.cekDarah(_parent);
_root.backTombak();
Symbol 1710 MovieClip Frame 1
_root.backJatuh();
Symbol 1710 MovieClip Frame 11
stop();
Symbol 1710 MovieClip Frame 20
play();
Symbol 1710 MovieClip Frame 90
removeMovieClip(_parent);
Symbol 1711 MovieClip [aspear_mc2] Frame 1
stop();
Symbol 1712 MovieClip [aspear_mc] Frame 1
stop();
Symbol 1721 MovieClip Frame 7
_root.cekPanahx(_parent);
Symbol 1722 MovieClip Frame 11
_root.cekDarah2(_parent);
Symbol 1722 MovieClip Frame 45
removeMovieClip(_parent);
Symbol 1723 MovieClip [arrow_mc3] Frame 1
stop();
Symbol 1729 MovieClip Frame 7
_root.cekPanah(_parent);
Symbol 1730 MovieClip [arrow_mc2] Frame 1
stop();
Symbol 1731 MovieClip [arrow_mc] Frame 1
stop();
Symbol 1755 MovieClip Frame 10
removeMovieClip(_parent);
Symbol 1756 MovieClip [api_mc2] Frame 1
stop();
Symbol 1757 MovieClip [api_mc1] Frame 1
stop();
Symbol 1819 Button
on (release) {
getURL ("http://www.maxgames.com", "_blank");
}
Symbol 1820 MovieClip Frame 19
stop();
Symbol 1827 MovieClip Frame 60
stop();
Symbol 1841 MovieClip Frame 14
stop();
Symbol 1847 MovieClip Frame 1
stop();
Symbol 1912 MovieClip Frame 1
stop();
Symbol 1917 MovieClip Frame 475
stop();
_root.lanjutSaja();