Frame 1
stop();
fscommand ("showmenu", false);
fscommand ("fullscreen", false);
fscommand ("showmenu", false);
Stage.showMenu = false;
this.onEnterFrame = function () {
persen = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
xpersen = persen + " %";
bar_mc.gotoAndStop(persen);
if (persen >= 100) {
delete this.onEnterFrame;
gotoAndStop ("complete");
}
};
logo_mc.onRelease = function () {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1226&subid=preloader", "_blank");
};
Instance of Symbol 23 MovieClip in Frame 1
on (release) {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1226&subid=preloader", "_blank");
}
Frame 10
stop();
_urlStart = _url.indexOf("://") + 3;
_urlEnd = _url.indexOf("/", _urlStart);
domain = _url.substring(_urlStart, _urlEnd);
LastDot = domain.lastIndexOf(".") - 1;
domEnd = domain.lastIndexOf(".", LastDot) + 1;
domain = domain.substring(domEnd, domain.length);
if (domain == "bubblebox.com") {
gotoAndStop ("xcomplete");
} else if (domain == "2games.com") {
gotoAndStop ("xcomplete");
} else {
gotoAndStop ("xcomplete");
}
Instance of Symbol 23 MovieClip in Frame 11
on (release) {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1226&subid=preloader", "_blank");
}
Frame 15
function backMusic() {
myMusic.stop();
myMusic = new Sound(musicy);
myMusic.attachSound("backMusic");
myMusic.start(0, 1);
myMusic.setVolume(volum1);
myMusic.onSoundComplete = function () {
backMusic();
};
}
function backMain() {
myMusic.stop();
myMusic = new Sound(musicy);
myMusic.attachSound("backMain");
myMusic.start(0, 1);
myMusic.setVolume(volum1);
myMusic.onSoundComplete = function () {
backMain();
};
}
function backWin() {
myMusic.stop();
myMusic = new Sound(musicy);
myMusic.attachSound("backWin");
myMusic.start(0, 1);
myMusic.setVolume(volum1);
}
function backLose() {
myMusic.stop();
myMusic = new Sound(musicy);
myMusic.attachSound("backLose");
myMusic.start(0, 1);
myMusic.setVolume(volum1);
}
function sound1() {
rand = random(3);
if (rand == 0) {
mySound = new Sound(soundy);
mySound.attachSound("sound1");
mySound.start(0, 1);
mySound.setVolume(volum2);
}
}
function sound3() {
rand = random(2);
if (rand == 0) {
mySound = new Sound(soundy);
mySound.attachSound("sound3");
mySound.start(0, 1);
mySound.setVolume(volum2);
}
}
function sound4() {
rand = random(3);
if (rand == 0) {
mySound = new Sound(soundy);
mySound.attachSound("sound4");
mySound.start(0, 1);
mySound.setVolume(volum2);
}
}
function sound5() {
rand = random(2);
if (rand == 0) {
mySound = new Sound(soundy);
mySound.attachSound("sound5");
mySound.start(0, 1);
mySound.setVolume(volum2);
}
}
function sound6() {
rand = random(2);
if (rand == 0) {
mySound = new Sound(soundy);
mySound.attachSound("sound6");
mySound.start(0, 1);
mySound.setVolume(volum2);
}
}
function sound7() {
rand = random(2);
if (rand == 0) {
mySound = new Sound(soundy);
mySound.attachSound("sound7");
mySound.start(0, 1);
mySound.setVolume(volum2);
}
}
function sound8() {
rand = random(2);
if (rand == 0) {
mySound = new Sound(soundy);
mySound.attachSound("sound8");
mySound.start(0, 1);
mySound.setVolume(volum2);
}
}
function sound9() {
rand = random(2);
if (rand == 0) {
mySound = new Sound(soundy);
mySound.attachSound("sound9");
mySound.start(0, 1);
mySound.setVolume(volum2);
}
}
function sound15() {
rand = random(2);
if (rand == 0) {
mySound = new Sound(soundy);
mySound.attachSound("sound15");
mySound.start(0, 1);
mySound.setVolume(volum2);
}
}
function sound16() {
rand = random(2);
if (rand == 0) {
mySound = new Sound(soundy);
mySound.attachSound("sound16");
mySound.start(0, 1);
mySound.setVolume(volum2);
}
}
function sound17() {
rand = random(2);
if (rand == 0) {
mySound = new Sound(soundy);
mySound.attachSound("sound17");
mySound.start(0, 1);
mySound.setVolume(volum2);
}
}
function backMati() {
xrand = random(4) + 1;
mySound = new Sound(soundy);
mySound.attachSound("backMati" + xrand);
mySound.start(0, 1);
mySound.setVolume(volum2);
}
function backLedak() {
xrand = random(4) + 1;
mySound = new Sound(soundy);
mySound.attachSound("backLedak" + xrand);
mySound.start(0, 1);
mySound.setVolume(volum2);
}
function backHeli() {
mySound = new Sound(soundy);
mySound.attachSound("backHeli");
mySound.start(0, 1);
mySound.setVolume(volum2);
}
function backHeli() {
mySound = new Sound(soundy);
mySound.attachSound("backHeli");
mySound.start(0, 1);
mySound.setVolume(volum2);
}
function backJatuh() {
xrand = random(2) + 1;
mySound = new Sound(soundy);
mySound.attachSound("backJatuh" + xrand);
mySound.start(0, 1);
mySound.setVolume(volum2);
}
function backCopter() {
mySound = new Sound(soundy);
mySound.attachSound("backCopter");
mySound.start(0, 1);
mySound.setVolume(volum2);
}
function backJatuhCopter() {
mySound = new Sound(soundy);
mySound.attachSound("backJatuhCopter");
mySound.start(0, 1);
mySound.setVolume(volum2);
}
function backAir() {
mySound = new Sound(soundy);
mySound.attachSound("backAir");
mySound.start(0, 1);
mySound.setVolume(volum2);
}
function backBoat() {
rand = random(3);
if (rand >= 1) {
mySound = new Sound(soundy);
mySound.attachSound("backBoat");
mySound.start(0, 1);
mySound.setVolume(volum2);
}
}
function boatHancur() {
mySound = new Sound(soundy);
mySound.attachSound("boatHancur");
mySound.start(0, 1);
mySound.setVolume(volum2);
}
function backWater() {
xrand = random(4) + 1;
mySound = new Sound(soundy);
mySound.attachSound("backAir" + xrand);
mySound.start(0, 1);
mySound.setVolume(volum2);
}
stop();
play_btn.onRelease = function () {
gotoAndStop (261);
};
soundy = attachMovie("soundw", "soundy", 5);
musicy = attachMovie("soundw", "musicy", 6);
soundy._x = -200;
soundy._y = -200;
musicy._x = -200;
musicy._y = -200;
volum1 = 75;
volum2 = 25;
perfectSemua = 0;
qualityGame = 1;
tipeSulitSingle = 1;
zpilihanMap = 1;
_quality = "HIGH";
logo_mc.onRelease = function () {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1226&subid=preloader", "_blank");
};
Frame 21
stop();
logo_mc.onRelease = function () {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1226&subid=preloader", "_blank");
};
Instance of Symbol 23 MovieClip in Frame 21
on (release) {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1226&subid=preloader", "_blank");
}
Frame 25
gotoAndStop ("gagalan");
Frame 27
gotoAndStop ("gagalan");
Frame 29
gotoAndStop ("gagalan");
Frame 31
play();
Frame 260
stop();
qualityGame = 1;
_quality = "HIGH";
gotoAndStop (471);
backMusic();
Frame 261
play();
Frame 470
stop();
gotoAndStop (31);
Frame 471
function cekGo(indi, indi2) {
tipeGame = "game";
jenisMaen = "game";
if (indi == "setup") {
kondisiLoad = "load";
gotoAndStop (498);
} else {
gotoAndStop (496);
}
}
function cekBisaTombol(indi) {
campaign_btn.enabled = indi;
single_btn.enabled = indi;
how_btn.enabled = indi;
options_btn.enabled = indi;
credits_btn.enabled = indi;
medals_btn.enabled = indi;
statistic_btn.enabled = indi;
achievements_btn.enabled = indi;
}
function simpanData() {
i = 0;
while (i <= simpanSemua.length) {
_root["aa" + i] = String("b" + i);
Cookies = SharedObject.getLocal(_root["aa" + i], "/");
Cookies.data["bb" + i] = eval (simpanSemua[i]);
Cookies.flush(10);
i++;
}
i = 0;
while (i <= simpanSemua2.length) {
_root["zz" + i] = String("v" + i);
Cookies = SharedObject.getLocal(_root["zz" + i], "/");
Cookies.data["vv" + i] = eval (simpanSemua2[i]);
Cookies.flush(10);
i++;
}
i = 1;
while (i <= 30) {
_root["a2" + i] = String("d" + i);
Cookies = SharedObject.getLocal(_root["a2" + i], "/");
Cookies.data["dd" + i] = slot[i];
Cookies.flush(10);
i++;
}
i = 1;
while (i <= bykJumlah) {
_root["a3" + i] = String("e" + i);
Cookies = SharedObject.getLocal(_root["a3" + i], "/");
Cookies.data["ee" + i] = (((String(levelSpeed[i]) + String(levelRange[i])) + String(levelLive[i])) + String(levelDamage[i])) + String(slotUnlok[i]);
Cookies.flush(10);
i++;
}
i = 1;
while (i <= 57) {
_root["a7" + i] = String("i" + i);
Cookies = SharedObject.getLocal(_root["a7" + i], "/");
Cookies.data["ii" + i] = _root["medals" + i];
Cookies.flush(10);
i++;
}
i = 1;
while (i <= 15) {
_root["a8" + i] = String("j" + i);
Cookies = SharedObject.getLocal(_root["a8" + i], "/");
Cookies.data["jj" + i] = levelSkill[i];
Cookies.flush(10);
i++;
}
}
function loadData() {
i = 0;
while (i <= simpanSemua.length) {
_root["aa" + i] = String("b" + i);
Cookies = SharedObject.getLocal(_root["aa" + i], "/");
_root[simpanSemua[i]] = Cookies.data["bb" + i];
i++;
}
i = 0;
while (i <= simpanSemua2.length) {
_root["zz" + i] = String("v" + i);
Cookies = SharedObject.getLocal(_root["zz" + i], "/");
_root[simpanSemua2[i]] = Cookies.data["vv" + i];
i++;
}
i = 1;
while (i <= 30) {
_root["a2" + i] = String("d" + i);
Cookies = SharedObject.getLocal(_root["a2" + i], "/");
slot[i] = Cookies.data["dd" + i];
i++;
}
i = 1;
while (i <= bykJumlah) {
_root["a3" + i] = String("e" + i);
Cookies = SharedObject.getLocal(_root["a3" + i], "/");
myStr = new String(Cookies.data["ee" + i]);
levelSpeed[i] = Number(myStr.substr(0, 1));
levelRange[i] = Number(myStr.substr(1, 1));
levelLive[i] = Number(myStr.substr(2, 1));
levelDamage[i] = Number(myStr.substr(3, 1));
slotUnlok[i] = Number(myStr.substr(4, 1));
i++;
}
i = 1;
while (i <= 57) {
_root["a7" + i] = String("i" + i);
Cookies = SharedObject.getLocal(_root["a7" + i], "/");
_root["medals" + i] = Cookies.data["ii" + i];
i++;
}
i = 1;
while (i <= 15) {
_root["a8" + i] = String("j" + i);
Cookies = SharedObject.getLocal(_root["a8" + i], "/");
levelSkill[i] = Cookies.data["jj" + i];
i++;
}
}
function cekLevelan() {
setMenang = false;
if ((campaignWin1 == 1) && (jenisCampaign == 1)) {
setMenang = true;
} else if ((campaignWin2 == 1) && (jenisCampaign == 2)) {
setMenang = true;
} else if ((campaignWin3 == 1) && (jenisCampaign == 3)) {
setMenang = true;
}
if (setMenang == true) {
daftarLevel = new Array("", 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1, 1, 1, 1);
} else {
daftarLevel = new Array("", 1, 1, 2, 3, 4, 5, 6, 7, 8, 1, 3, 5, 6, 9, 11, 13, 15, 6, 9, 13, 16, 18, 20, 22, 24, 7, 8, 13, 16, 19, 10, 11, 12, 15, 18, 25, 27, 3, 6, 9, 12, 15, 15, 18, 21, 24, 25, 27, 29, 31);
}
}
function initAwal() {
tipeJenis = 1;
banyakJenis = 9;
bykJumlah = 50;
tipeMaen2 = "";
daftarExp = new Array("", 0, 7, 10, 15, 20, 25, 30, 45, 60, 0, 35, 40, 50, 55, 75, 90, 120, 0, 150, 100, 125, 150, 175, 200, 250, 0, 150, 200, 250, 300, 100, 150, 200, 250, 300, 450, 500, 25, 30, 35, 40, 45, 75, 100, 125, 150, 200, 300, 400, 500);
daftarHarga = new Array("", 50, 100, 140, 160, 180, 200, 240, 540, 700, 150, 200, 250, 600, 750, 1000, 2000, 3000, 2000, 5000, 4000, 5000, 6000, 8000, 10000, 15000, 5000, 7500, 10000, 25000, 50000, 1500, 2000, 3000, 5000, 7500, 20000, 25000, 100, 150, 200, 250, 300, 5000, 10000, 15000, 20000, 75000, 150000, 250000, 500000);
cekLevelan();
daftarNama = new Array("", "Pistol", "Rifle", "Grenade", "Mortar", "Machine Gun", "Heavy Machine Gun", "Bazzoka", "Missile Launcher", "Rocket Launcher", "Troops Truck", "Gun Truck", "Heavy Truck", "Gun Stug", "Heavy Stug", "Launcher Tank", "Cannon Tank", "Heavy Tank", "Helicopter", "Gun Helicopter", "Air Craft", "Gun Air Craft", "Missile Air Craft", "Bomber Air Craft", "Bomber Air Plane", "Bomber Jet", "Light Boat", "Medium Boat", "Light Ship", "Medium Ship", "Destroyer", "Cannon Turret", "Bazzoka Turret", "Rocket Turret", "Rifle Guardhouse", "Gun Guardhouse", "Bazzoka Tower", "Rocket Tower", "Rifle Guard", "Grenade Guard", "Machine Gun Guard", "Bazzoka Guard", "Missile Guard", "Missile Shark", "Desert Thunder", "Heavy Arm", "Deadly Strike", "Super Parachute", "Super Tank", "Super Helicopter", "Super Speedboat");
daftarSpeed = new Array("", 2.25, 1.25, 2.5, 1, 1.25, 0.75, 0.75, 0.75, 0.5, 3.5, 3, 3.5, 2, 1.75, 1.5, 1, 0.75, 2, 3, 5.5, 6, 6.5, 7, 7.5, 8, 0.75, 0.7, 0.65, 0.6, 0.55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 1, 2, 3);
daftarRange = new Array("", 250, 275, 200, 350, 250, 300, 300, 400, 400, 275, 300, 300, 250, 300, 300, 400, 450, 450, 500, 600, 650, 250, 250, 250, 250, 250, 300, 350, 350, 300, 300, 350, 400, 350, 375, 400, 450, 250, 275, 300, 350, 375, 0, 0, 0, 0, 350, 350, 350, 500);
daftarLive = new Array("", 100, 125, 75, 100, 100, 125, 100, 75, 50, 400, 500, 550, 700, 750, 2500, 3500, 5500, 3000, 3500, 2000, 2500, 3000, 3500, 4500, 5000, 6500, 8000, 9000, 15000, 25000, 10000, 15000, 20000, 50000, 75000, 250000, 300000, 2500, 3000, 3500, 4000, 5000, 0, 0, 0, 0, 50000, 150000, 200000, 250000);
daftarDamage = new Array("", 15, 17, 20, 25, 30, 35, 40, 45, 50, 25, 35, 35, 30, 35, 150, 175, 200, 150, 300, 100, 125, 200, 250, 350, 400, 20, 30, 100, 150, 200, 50, 60, 70, 25, 50, 150, 200, 15, 20, 30, 40, 45, 500, 1000, 1500, 2000, 300, 500, 2000, 3000);
i = 1;
while (i <= 30) {
daftarExp[i] = daftarExp[i] * 2;
i++;
}
}
function ygDiSave() {
xexp = 40;
xlevel = 1;
money1 = 300;
nyawaGame = 10;
tipeSulitCampaign = 2;
jenisCampaign = 1;
jenisMorale = "offence";
jenisAppear = "random";
slotUnlok = new Array();
i = 1;
while (i <= bykJumlah) {
slotUnlok[i] = 0;
i++;
}
slotUnlok[1] = 1;
slotUnlok[2] = 1;
slotUnlok[10] = 1;
slot = new Array();
i = 1;
while (i <= 30) {
slot[i] = 90;
i++;
}
slot[1] = 1;
slot[2] = 2;
slot[3] = 10;
menangTerus1 = 0;
menangTerus2 = 0;
menangTerus3 = 0;
cekAneh();
levelSpeed = new Array();
levelRange = new Array();
levelLive = new Array();
levelDamage = new Array();
i = 1;
while (i <= bykJumlah) {
levelSpeed[i] = 1;
levelRange[i] = 1;
levelLive[i] = 1;
levelDamage[i] = 1;
i++;
}
tutorialWar = false;
tutorialSetup = false;
levelSkill = new Array();
i = 1;
while (i <= 15) {
levelSkill[i] = 1;
i++;
}
bykPasukan1 = 25 + (5 * (levelSkill[1] - 1));
}
function cekAneh() {
if (resetStatistik == undefined) {
infantry1 = 0;
artillery1 = 0;
airforce1 = 0;
navy1 = 0;
buildings1 = 0;
totWin1 = 0;
totLose1 = 0;
infantry2 = 0;
artillery2 = 0;
airforce2 = 0;
navy2 = 0;
buildings2 = 0;
totWin2 = 0;
totLose2 = 0;
menangSingle = 0;
menangSingle2 = 0;
menangSingle3 = 0;
campaignWin1 = 0;
campaignWin2 = 0;
campaignWin3 = 0;
resetStatistik = true;
} else if (infantry1 == undefined) {
infantry1 = 0;
artillery1 = 0;
airforce1 = 0;
navy1 = 0;
buildings1 = 0;
totWin1 = 0;
totLose1 = 0;
infantry2 = 0;
artillery2 = 0;
airforce2 = 0;
navy2 = 0;
buildings2 = 0;
totWin2 = 0;
totLose2 = 0;
menangSingle = 0;
menangSingle2 = 0;
menangSingle3 = 0;
campaignWin1 = 0;
campaignWin2 = 0;
campaignWin3 = 0;
resetStatistik = true;
}
if (resetMedal == undefined) {
i = 1;
while (i <= 57) {
_root["medals" + i] = 0;
i++;
}
perfectSemua = 0;
resetMedal = true;
}
}
stop();
msgBox_mc._visible = false;
msgBox_mc2._visible = false;
cekBisaTombol(true);
simpanSemua = new Array("bgData", "xlevel", "xexp", "money1", "jenisMorale", "jenisAppear", "nyawaGame", "tutorialWar", "tutorialSetup", "perfectSemua", "jenisCampaign", "menangTerus1", "menangTerus2", "menangTerus2", "setMenang", "tipeSulitCampaign");
simpanSemua2 = new Array("resetMedal", "resetStatistik", "infantry1", "artillery1", "airforce1", "navy1", "buildings1", "totWin1", "totLose1", "infantry2", "artillery2", "airforce2", "navy2", "buildings2", "totWin2", "totLose2", "menangSingle", "menangSingle2", "menangSingle3", "campaignWin1", "campaignWin2", "campaignWin3");
initAwal();
ygDiSave();
i = 0;
while (i <= simpanSemua.length) {
_root["aa" + i] = String("b" + i);
Cookies = SharedObject.getLocal(_root["aa" + i], "/");
if (Cookies.data["bb" + i] != undefined) {
_root[simpanSemua[i]] = Cookies.data["bb" + i];
}
i++;
}
i = 0;
while (i <= simpanSemua2.length) {
_root["zz" + i] = String("v" + i);
Cookies = SharedObject.getLocal(_root["zz" + i], "/");
if (Cookies.data["vv" + i] != undefined) {
_root[simpanSemua2[i]] = Cookies.data["vv" + i];
}
i++;
}
i = 1;
while (i <= 57) {
_root["a7" + i] = String("i" + i);
Cookies = SharedObject.getLocal(_root["a7" + i], "/");
if (Cookies.data["ii" + i] != undefined) {
_root["medals" + i] = Cookies.data["ii" + i];
}
i++;
}
cekAneh();
single_btn._alpha = 50;
gembokx._visible = true;
bisaSingle = false;
if (((campaignWin1 == 1) || (campaignWin2 == 1)) || (campaignWin3 == 1)) {
bisaSingle = true;
single_btn._alpha = 100;
gembokx._visible = false;
}
campaign_btn.onRelease = function () {
jenisMaenan = "campaign";
cekBisaTombol(false);
if (tipeSulitCampaign == undefined) {
tipeSulitCampaign = 2;
}
if (bgData == undefined) {
initAwal();
ygDiSave();
cekGo();
i = 1;
while (i <= 30) {
_root["a2" + i] = String("d" + i);
Cookies = SharedObject.getLocal(_root["a2" + i], "/");
Cookies.data["dd" + i] = slot[i];
Cookies.flush(10);
i++;
}
i = 1;
while (i <= 15) {
_root["a8" + i] = String("j" + i);
Cookies = SharedObject.getLocal(_root["a8" + i], "/");
Cookies.data["jj" + i] = levelSkill[i];
Cookies.flush(10);
i++;
}
} else {
msgBox_mc._visible = true;
msgBox_mc.judul = "Continue Campaign";
if (tipeSulitCampaign == 1) {
sulitCampaign = "Easy";
} else if (tipeSulitCampaign == 2) {
sulitCampaign = "Normal";
} else if (tipeSulitCampaign == 3) {
sulitCampaign = "Hard";
} else if (tipeSulitCampaign == 4) {
sulitCampaign = "Impossible";
}
msgBox_mc.isi = ((((("Continue last previous campaign? (campaign mode: " + jenisCampaign) + ", level: ") + xlevel) + ", difficult: ") + sulitCampaign) + "), press no to start new campaign.";
msgBox_mc.yes_btn.onRelease = function () {
cekLevelan();
loadData();
cekGo("setup", "load");
};
msgBox_mc.no_btn.onRelease = function () {
initAwal();
ygDiSave();
bgData = undefined;
i = 0;
_root["aa" + i] = String("b" + i);
Cookies = SharedObject.getLocal(_root["aa" + i], "/");
Cookies.data["bb" + i] = eval (simpanSemua[i]);
Cookies.flush(10);
cekGo();
};
msgBox_mc.cancel_btn.onRelease = function () {
cekBisaTombol(true);
msgBox_mc._visible = false;
};
}
};
single_btn.onRelease = function () {
if (bisaSingle == true) {
jenisMaenan = "single";
gotoAndStop (500);
} else {
cekBisaTombol(false);
msgBox_mc2._visible = true;
msgBox_mc2.judul = "Can't Play";
msgBox_mc2.isi = "You must complete campaign mode first before play single mode";
msgBox_mc2.no_btn.onRelease = function () {
cekBisaTombol(true);
msgBox_mc2._visible = false;
};
}
};
how_btn.onRelease = function () {
gotoAndStop (475);
};
options_btn.onRelease = function () {
gotoAndStop (473);
};
credits_btn.onRelease = function () {
gotoAndStop (494);
};
medals_btn.onRelease = function () {
dariMana = "main";
gotoAndStop (510);
};
statistic_btn.onRelease = function () {
dariMana = "main";
gotoAndStop (508);
};
achievements_btn.onRelease = function () {
dariMana = "main";
gotoAndStop (512);
};
logo_mc.onRelease = function () {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1226&subid=mainmenu", "_blank");
};
play_btn.onRelease = function () {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1226&subid=mainmenu", "_blank");
};
Instance of Symbol 23 MovieClip in Frame 471
on (release) {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1226&subid=mainmenu", "_blank");
}
Frame 472
stop();
_root.gotoAndStop(_root._currentframe - 1);
Frame 473
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();
msgBox_mc._visible = false;
msgBox_mc2._visible = false;
back_btn.onRelease = function () {
removeMovieClip(infoBox);
gotoAndStop (471);
};
clear_btn.onRelease = function () {
msgBox_mc._visible = true;
msgBox_mc.judul = "Clear All Data";
msgBox_mc.isi = "Are you sure want to clear all data, saved game, statistic, achievements and medals?";
msgBox_mc.yes_btn.onRelease = function () {
bgData = undefined;
resetStatistik = undefined;
resetMedal = undefined;
initAwal();
ygDiSave();
simpanData();
msgBox_mc._visible = false;
msgBox_mc2._visible = true;
msgBox_mc2.judul = "All Data Cleared";
msgBox_mc2.isi = "All data, statistic, saved game, achievements and medals cleared.";
msgBox_mc2.no_btn.onRelease = function () {
msgBox_mc2._visible = false;
};
};
msgBox_mc.no_btn.onRelease = function () {
msgBox_mc._visible = false;
};
};
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.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.indi_mc.onRelease = (bar2_mc.indi_mc.onReleaseOutside = function () {
over();
stopDrag();
});
cekSpeedQuality();
Frame 474
stop();
_root.gotoAndStop(_root._currentframe - 1);
Frame 475
stop();
back_btn.onRelease = function () {
gotoAndStop (471);
};
next_btn.onRelease = function () {
_root.gotoAndStop(_root._currentframe + 1);
};
Frame 476
stop();
back_btn.onRelease = function () {
gotoAndStop (471);
};
prev_btn.onRelease = function () {
_root.gotoAndStop(_root._currentframe - 1);
};
next_btn.onRelease = function () {
_root.gotoAndStop(_root._currentframe + 1);
};
Frame 491
stop();
back_btn.onRelease = function () {
gotoAndStop (471);
};
prev_btn.onRelease = function () {
_root.gotoAndStop(_root._currentframe - 1);
};
next_btn.onRelease = function () {
_root.gotoAndStop(_root._currentframe + 1);
};
Frame 492
stop();
back_btn.onRelease = function () {
gotoAndStop (471);
};
prev_btn.onRelease = function () {
_root.gotoAndStop(_root._currentframe - 1);
};
Frame 493
stop();
_root.gotoAndStop(_root._currentframe - 1);
Frame 494
stop();
back_btn.onRelease = function () {
removeMovieClip(infoBox);
gotoAndStop (471);
};
Frame 495
stop();
_root.gotoAndStop(_root._currentframe - 1);
Frame 496
function cekBisaSementara(indi) {
campaign1.enabled = indi;
campaign2.enabled = indi;
campaign3.enabled = indi;
}
stop();
cekBisaSementara(true);
msgBox_mc._visible = false;
back_btn.onRelease = function () {
removeMovieClip(infoBox);
gotoAndStop (471);
};
campaign1.onRelease = function () {
i = 1;
while (i <= bykJumlah) {
_root["a3" + i] = String("e" + i);
Cookies = SharedObject.getLocal(_root["a3" + i], "/");
Cookies.data["ee" + i] = (((String(levelSpeed[i]) + String(levelRange[i])) + String(levelLive[i])) + String(levelDamage[i])) + String(slotUnlok[i]);
Cookies.flush(10);
i++;
}
if (campaignWin1 == 1) {
cekBisaSementara(false);
msgBox_mc._visible = true;
msgBox_mc.judul = "Play again";
msgBox_mc.isi = "You have completed campaign mode 1, you can now unlock all troops and powered skill start by level 1";
msgBox_mc.no_btn.onRelease = function () {
nyawaGame = 10;
jenisCampaign = 1;
jenisMaen = "mulai";
gotoAndStop (498);
};
} else {
nyawaGame = 10;
jenisCampaign = 1;
jenisMaen = "mulai";
gotoAndStop (498);
}
};
campaign2.onRelease = function () {
i = 1;
while (i <= bykJumlah) {
_root["a3" + i] = String("e" + i);
Cookies = SharedObject.getLocal(_root["a3" + i], "/");
Cookies.data["ee" + i] = (((String(levelSpeed[i]) + String(levelRange[i])) + String(levelLive[i])) + String(levelDamage[i])) + String(slotUnlok[i]);
Cookies.flush(10);
i++;
}
if (campaignWin2 == 1) {
nyawaGame = 15;
cekBisaSementara(false);
msgBox_mc._visible = true;
msgBox_mc.judul = "Play again";
msgBox_mc.isi = "You have completed campaign mode 2, you can now unlock all troops and powered skill start by level 1";
msgBox_mc.no_btn.onRelease = function () {
jenisCampaign = 2;
jenisMaen = "mulai";
gotoAndStop (498);
};
} else {
nyawaGame = 15;
jenisCampaign = 2;
jenisMaen = "mulai";
gotoAndStop (498);
}
};
campaign3.onRelease = function () {
i = 1;
while (i <= bykJumlah) {
_root["a3" + i] = String("e" + i);
Cookies = SharedObject.getLocal(_root["a3" + i], "/");
Cookies.data["ee" + i] = (((String(levelSpeed[i]) + String(levelRange[i])) + String(levelLive[i])) + String(levelDamage[i])) + String(slotUnlok[i]);
Cookies.flush(10);
i++;
}
if (campaignWin3 == 1) {
nyawaGame = 20;
cekBisaSementara(false);
msgBox_mc._visible = true;
msgBox_mc.judul = "Play again";
msgBox_mc.isi = "You have completed campaign mode 3, you can now unlock all troops and powered skill start by level 1";
msgBox_mc.no_btn.onRelease = function () {
jenisCampaign = 3;
jenisMaen = "mulai";
gotoAndStop (498);
};
} else {
nyawaGame = 20;
jenisCampaign = 3;
jenisMaen = "mulai";
gotoAndStop (498);
}
};
campaign1.onRollOver = function () {
this._alpha = 70;
};
campaign2.onRollOver = function () {
this._alpha = 70;
};
campaign3.onRollOver = function () {
this._alpha = 70;
};
campaign1.onRollOut = function () {
this._alpha = 100;
};
campaign2.onRollOut = function () {
this._alpha = 100;
};
campaign3.onRollOut = function () {
this._alpha = 100;
};
if (tipeSulitCampaign == 1) {
easy_btn.gotoAndStop(2);
normal_btn.gotoAndStop(1);
hard_btn.gotoAndStop(1);
extreme_btn.gotoAndStop(1);
} else if (tipeSulitCampaign == 2) {
tipeSulitCampaign = 2;
easy_btn.gotoAndStop(1);
normal_btn.gotoAndStop(2);
hard_btn.gotoAndStop(1);
extreme_btn.gotoAndStop(1);
} else if (tipeSulitCampaign == 3) {
tipeSulitCampaign = 3;
easy_btn.gotoAndStop(1);
normal_btn.gotoAndStop(1);
hard_btn.gotoAndStop(2);
extreme_btn.gotoAndStop(1);
} else if (tipeSulitCampaign == 4) {
tipeSulitCampaign = 4;
easy_btn.gotoAndStop(1);
normal_btn.gotoAndStop(1);
hard_btn.gotoAndStop(1);
extreme_btn.gotoAndStop(2);
}
easy_btn.onRelease = function () {
tipeSulitCampaign = 1;
easy_btn.gotoAndStop(2);
normal_btn.gotoAndStop(1);
hard_btn.gotoAndStop(1);
extreme_btn.gotoAndStop(1);
};
normal_btn.onRelease = function () {
tipeSulitCampaign = 2;
easy_btn.gotoAndStop(1);
normal_btn.gotoAndStop(2);
hard_btn.gotoAndStop(1);
extreme_btn.gotoAndStop(1);
};
hard_btn.onRelease = function () {
tipeSulitCampaign = 3;
easy_btn.gotoAndStop(1);
normal_btn.gotoAndStop(1);
hard_btn.gotoAndStop(2);
extreme_btn.gotoAndStop(1);
};
extreme_btn.onRelease = function () {
tipeSulitCampaign = 4;
easy_btn.gotoAndStop(1);
normal_btn.gotoAndStop(1);
hard_btn.gotoAndStop(1);
extreme_btn.gotoAndStop(2);
};
Frame 497
stop();
_root.gotoAndStop(_root._currentframe - 1);
Frame 498
function cekKemana() {
if (jenisLihat == "map") {
tanda = "";
jmlPeta = 12;
world_mc._visible = true;
jenisMap._visible = false;
jenis_mc._visible = true;
if (jenisCampaign == 1) {
if (xlevel <= 6) {
world_mc.gotoAndStop(1);
} else if (xlevel <= 14) {
world_mc.gotoAndStop(2);
} else if (xlevel <= 18) {
world_mc.gotoAndStop(3);
} else if (xlevel <= 24) {
world_mc.gotoAndStop(4);
} else if (xlevel <= 30) {
world_mc.gotoAndStop(5);
} else if (xlevel <= 37) {
world_mc.gotoAndStop(6);
} else if (xlevel <= 45) {
world_mc.gotoAndStop(7);
}
i = 1;
while (i <= jmlPeta) {
_root.world_mc["peta" + i].gotoAndStop(1);
i++;
}
_root.world_mc.petax.gotoAndStop(1);
i = 1;
while (i <= 45) {
_root.world_mc["panah" + i]._visible = false;
_root.world_mc[("panah" + i) + "a"]._visible = false;
_root.world_mc[("panah" + i) + "b"]._visible = false;
_root.world_mc[("panah" + i) + "c"]._visible = false;
i++;
}
_root.world_mc["panah" + xlevel]._visible = true;
_root.world_mc[("panah" + xlevel) + "a"]._visible = true;
_root.world_mc[("panah" + xlevel) + "b"]._visible = true;
_root.world_mc[("panah" + xlevel) + "c"]._visible = true;
if (xlevel == 1) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta7.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(3);
} else if (xlevel == 2) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta7.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(3);
} else if (xlevel == 3) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta7.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(3);
_root.world_mc.peta9.gotoAndStop(3);
} else if (xlevel == 4) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta7.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta9.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(3);
} else if (xlevel == 5) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta7.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta9.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(2);
_root.world_mc.peta6.gotoAndStop(3);
_root.world_mc.peta10.gotoAndStop(3);
} else if (xlevel == 6) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta7.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta9.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(2);
_root.world_mc.peta6.gotoAndStop(2);
_root.world_mc.peta10.gotoAndStop(2);
_root.world_mc.peta8.gotoAndStop(3);
} else if (xlevel == 7) {
_root.world_mc.peta2.gotoAndStop(3);
} else if (xlevel == 8) {
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(3);
} else if (xlevel == 9) {
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(3);
_root.world_mc.peta5.gotoAndStop(3);
} else if (xlevel == 10) {
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(2);
_root.world_mc.peta6.gotoAndStop(3);
} else if (xlevel == 11) {
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(2);
_root.world_mc.peta6.gotoAndStop(2);
_root.world_mc.peta7.gotoAndStop(3);
} else if (xlevel == 12) {
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(2);
_root.world_mc.peta6.gotoAndStop(2);
_root.world_mc.peta7.gotoAndStop(2);
_root.world_mc.peta8.gotoAndStop(3);
} else if (xlevel == 13) {
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(2);
_root.world_mc.peta6.gotoAndStop(2);
_root.world_mc.peta7.gotoAndStop(2);
_root.world_mc.peta8.gotoAndStop(2);
_root.world_mc.peta9.gotoAndStop(3);
} else if (xlevel == 14) {
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(2);
_root.world_mc.peta6.gotoAndStop(2);
_root.world_mc.peta7.gotoAndStop(2);
_root.world_mc.peta8.gotoAndStop(2);
_root.world_mc.peta9.gotoAndStop(2);
_root.world_mc.peta10.gotoAndStop(3);
} else if (xlevel == 15) {
_root.world_mc.peta1.gotoAndStop(3);
} else if (xlevel == 16) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(3);
} else if (xlevel == 17) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(3);
_root.world_mc.peta4.gotoAndStop(3);
} else if (xlevel == 18) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(3);
} else if (xlevel == 19) {
_root.world_mc.peta1.gotoAndStop(3);
_root.world_mc.peta2.gotoAndStop(3);
} else if (xlevel == 20) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(3);
} else if (xlevel == 21) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(3);
} else if (xlevel == 22) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(3);
} else if (xlevel == 23) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(2);
_root.world_mc.peta6.gotoAndStop(3);
} else if (xlevel == 24) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(2);
_root.world_mc.peta6.gotoAndStop(2);
_root.world_mc.peta7.gotoAndStop(3);
_root.world_mc.peta8.gotoAndStop(3);
} else if (xlevel == 25) {
_root.world_mc.peta1.gotoAndStop(3);
} else if (xlevel == 26) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(3);
} else if (xlevel == 27) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(3);
} else if (xlevel == 28) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(3);
} else if (xlevel == 29) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(3);
} else if (xlevel == 30) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(2);
_root.world_mc.peta6.gotoAndStop(3);
} else if (xlevel == 31) {
_root.world_mc.peta1._visible = true;
_root.world_mc.peta2._visible = false;
_root.world_mc.peta3._visible = false;
_root.world_mc.peta4._visible = false;
_root.world_mc.peta5._visible = false;
_root.world_mc.peta6._visible = false;
_root.world_mc.peta7._visible = false;
} else if (xlevel == 32) {
_root.world_mc.peta1._visible = false;
_root.world_mc.peta2._visible = true;
_root.world_mc.peta3._visible = false;
_root.world_mc.peta4._visible = false;
_root.world_mc.peta5._visible = false;
_root.world_mc.peta6._visible = false;
_root.world_mc.peta7._visible = false;
} else if (xlevel == 33) {
_root.world_mc.peta1._visible = false;
_root.world_mc.peta2._visible = false;
_root.world_mc.peta3._visible = true;
_root.world_mc.peta4._visible = false;
_root.world_mc.peta5._visible = false;
_root.world_mc.peta6._visible = false;
_root.world_mc.peta7._visible = false;
} else if (xlevel == 34) {
_root.world_mc.peta1._visible = false;
_root.world_mc.peta2._visible = false;
_root.world_mc.peta3._visible = false;
_root.world_mc.peta4._visible = true;
_root.world_mc.peta5._visible = false;
_root.world_mc.peta6._visible = false;
_root.world_mc.peta7._visible = false;
} else if (xlevel == 35) {
_root.world_mc.peta1._visible = false;
_root.world_mc.peta2._visible = false;
_root.world_mc.peta3._visible = false;
_root.world_mc.peta4._visible = false;
_root.world_mc.peta5._visible = true;
_root.world_mc.peta6._visible = false;
_root.world_mc.peta7._visible = false;
} else if (xlevel == 36) {
_root.world_mc.peta1._visible = false;
_root.world_mc.peta2._visible = false;
_root.world_mc.peta3._visible = false;
_root.world_mc.peta4._visible = false;
_root.world_mc.peta5._visible = false;
_root.world_mc.peta6._visible = true;
_root.world_mc.peta7._visible = false;
} else if (xlevel == 37) {
_root.world_mc.peta1._visible = false;
_root.world_mc.peta2._visible = false;
_root.world_mc.peta3._visible = false;
_root.world_mc.peta4._visible = false;
_root.world_mc.peta5._visible = false;
_root.world_mc.peta6._visible = false;
_root.world_mc.peta7._visible = false;
_root.world_mc.petax.gotoAndStop(3);
} else if (xlevel == 38) {
_root.world_mc.peta1._visible = true;
_root.world_mc.peta2._visible = false;
_root.world_mc.peta3._visible = false;
_root.world_mc.peta4._visible = false;
_root.world_mc.peta5._visible = false;
_root.world_mc.peta6._visible = false;
_root.world_mc.peta7._visible = false;
_root.world_mc.peta8._visible = false;
} else if (xlevel == 39) {
_root.world_mc.peta1._visible = false;
_root.world_mc.peta2._visible = true;
_root.world_mc.peta3._visible = false;
_root.world_mc.peta4._visible = false;
_root.world_mc.peta5._visible = false;
_root.world_mc.peta6._visible = false;
_root.world_mc.peta7._visible = false;
_root.world_mc.peta8._visible = false;
} else if (xlevel == 40) {
_root.world_mc.peta1._visible = false;
_root.world_mc.peta2._visible = false;
_root.world_mc.peta3._visible = true;
_root.world_mc.peta4._visible = false;
_root.world_mc.peta5._visible = false;
_root.world_mc.peta6._visible = false;
_root.world_mc.peta7._visible = false;
_root.world_mc.peta8._visible = false;
} else if (xlevel == 41) {
_root.world_mc.peta1._visible = false;
_root.world_mc.peta2._visible = false;
_root.world_mc.peta3._visible = false;
_root.world_mc.peta4._visible = true;
_root.world_mc.peta5._visible = false;
_root.world_mc.peta6._visible = false;
_root.world_mc.peta7._visible = false;
_root.world_mc.peta8._visible = false;
} else if (xlevel == 42) {
_root.world_mc.peta1._visible = false;
_root.world_mc.peta2._visible = false;
_root.world_mc.peta3._visible = false;
_root.world_mc.peta4._visible = false;
_root.world_mc.peta5._visible = true;
_root.world_mc.peta6._visible = false;
_root.world_mc.peta7._visible = false;
_root.world_mc.peta8._visible = false;
} else if (xlevel == 43) {
_root.world_mc.peta1._visible = false;
_root.world_mc.peta2._visible = false;
_root.world_mc.peta3._visible = false;
_root.world_mc.peta4._visible = false;
_root.world_mc.peta5._visible = false;
_root.world_mc.peta6._visible = true;
_root.world_mc.peta7._visible = false;
_root.world_mc.peta8._visible = false;
} else if (xlevel == 44) {
_root.world_mc.peta1._visible = false;
_root.world_mc.peta2._visible = false;
_root.world_mc.peta3._visible = false;
_root.world_mc.peta4._visible = false;
_root.world_mc.peta5._visible = false;
_root.world_mc.peta6._visible = false;
_root.world_mc.peta7._visible = true;
_root.world_mc.peta8._visible = false;
} else if (xlevel == 45) {
_root.world_mc.peta1._visible = false;
_root.world_mc.peta2._visible = false;
_root.world_mc.peta3._visible = false;
_root.world_mc.peta4._visible = false;
_root.world_mc.peta5._visible = false;
_root.world_mc.peta6._visible = false;
_root.world_mc.peta7._visible = false;
_root.world_mc.peta8._visible = false;
_root.world_mc.petax.gotoAndStop(3);
}
} else if (jenisCampaign == 2) {
if (xlevel <= 12) {
world_mc.gotoAndStop(20);
} else if (xlevel <= 20) {
world_mc.gotoAndStop(21);
} else if (xlevel <= 30) {
world_mc.gotoAndStop(22);
} else if (xlevel <= 37) {
world_mc.gotoAndStop(23);
} else if (xlevel <= 45) {
world_mc.gotoAndStop(24);
}
i = 1;
while (i <= jmlPeta) {
_root.world_mc["peta" + i].gotoAndStop(1);
i++;
}
_root.world_mc.petax.gotoAndStop(1);
if (xlevel <= 12) {
_root.world_mc.peta11._visible = false;
}
i = 1;
while (i <= 45) {
_root.world_mc["panah" + i]._visible = false;
_root.world_mc[("panah" + i) + "a"]._visible = false;
_root.world_mc[("panah" + i) + "b"]._visible = false;
_root.world_mc[("panah" + i) + "c"]._visible = false;
i++;
}
_root.world_mc["panah" + xlevel]._visible = true;
_root.world_mc[("panah" + xlevel) + "a"]._visible = true;
_root.world_mc[("panah" + xlevel) + "b"]._visible = true;
_root.world_mc[("panah" + xlevel) + "c"]._visible = true;
if (xlevel == 1) {
_root.world_mc.peta1.gotoAndStop(3);
} else if (xlevel == 2) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(3);
} else if (xlevel == 3) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(3);
} else if (xlevel == 4) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(3);
} else if (xlevel == 5) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(3);
_root.world_mc.peta13.gotoAndStop(3);
} else if (xlevel == 6) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(2);
_root.world_mc.peta6.gotoAndStop(3);
_root.world_mc.peta13.gotoAndStop(2);
} else if (xlevel == 7) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(2);
_root.world_mc.peta6.gotoAndStop(2);
_root.world_mc.peta7.gotoAndStop(3);
_root.world_mc.peta13.gotoAndStop(2);
} else if (xlevel == 8) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(2);
_root.world_mc.peta6.gotoAndStop(2);
_root.world_mc.peta7.gotoAndStop(2);
_root.world_mc.peta8.gotoAndStop(3);
_root.world_mc.peta13.gotoAndStop(2);
} else if (xlevel == 9) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(2);
_root.world_mc.peta6.gotoAndStop(2);
_root.world_mc.peta7.gotoAndStop(2);
_root.world_mc.peta8.gotoAndStop(2);
_root.world_mc.peta9.gotoAndStop(3);
_root.world_mc.peta13.gotoAndStop(2);
} else if (xlevel == 10) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(2);
_root.world_mc.peta6.gotoAndStop(2);
_root.world_mc.peta7.gotoAndStop(2);
_root.world_mc.peta8.gotoAndStop(2);
_root.world_mc.peta9.gotoAndStop(2);
_root.world_mc.peta10.gotoAndStop(3);
_root.world_mc.peta13.gotoAndStop(2);
} else if (xlevel == 11) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(2);
_root.world_mc.peta6.gotoAndStop(2);
_root.world_mc.peta7.gotoAndStop(2);
_root.world_mc.peta8.gotoAndStop(2);
_root.world_mc.peta9.gotoAndStop(2);
_root.world_mc.peta10.gotoAndStop(2);
_root.world_mc.peta11.gotoAndStop(3);
_root.world_mc.peta11._visible = true;
_root.world_mc.peta13.gotoAndStop(2);
} else if (xlevel == 12) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(2);
_root.world_mc.peta6.gotoAndStop(2);
_root.world_mc.peta7.gotoAndStop(2);
_root.world_mc.peta8.gotoAndStop(2);
_root.world_mc.peta9.gotoAndStop(2);
_root.world_mc.peta10.gotoAndStop(2);
_root.world_mc.peta11.gotoAndStop(2);
_root.world_mc.peta12.gotoAndStop(3);
_root.world_mc.peta13.gotoAndStop(2);
} else if (xlevel == 13) {
_root.world_mc.peta1.gotoAndStop(3);
_root.world_mc.peta2.gotoAndStop(3);
} else if (xlevel == 14) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(3);
} else if (xlevel == 15) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(3);
} else if (xlevel == 16) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(3);
} else if (xlevel == 17) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(2);
_root.world_mc.peta6.gotoAndStop(3);
} else if (xlevel == 18) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(2);
_root.world_mc.peta6.gotoAndStop(2);
_root.world_mc.peta7.gotoAndStop(3);
} else if (xlevel == 19) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(2);
_root.world_mc.peta6.gotoAndStop(2);
_root.world_mc.peta7.gotoAndStop(2);
_root.world_mc.peta8.gotoAndStop(3);
} else if (xlevel == 20) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(2);
_root.world_mc.peta6.gotoAndStop(2);
_root.world_mc.peta7.gotoAndStop(2);
_root.world_mc.peta8.gotoAndStop(2);
_root.world_mc.peta9.gotoAndStop(3);
} else if (xlevel == 21) {
_root.world_mc.peta1.gotoAndStop(3);
} else if (xlevel == 22) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(3);
} else if (xlevel == 23) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(3);
} else if (xlevel == 24) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(3);
} else if (xlevel == 25) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(3);
} else if (xlevel == 26) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(2);
_root.world_mc.peta6.gotoAndStop(3);
} else if (xlevel == 27) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(2);
_root.world_mc.peta6.gotoAndStop(2);
_root.world_mc.peta7.gotoAndStop(3);
} else if (xlevel == 28) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(2);
_root.world_mc.peta6.gotoAndStop(2);
_root.world_mc.peta7.gotoAndStop(2);
_root.world_mc.peta8.gotoAndStop(3);
} else if (xlevel == 29) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(2);
_root.world_mc.peta6.gotoAndStop(2);
_root.world_mc.peta7.gotoAndStop(2);
_root.world_mc.peta8.gotoAndStop(2);
_root.world_mc.peta9.gotoAndStop(3);
_root.world_mc.peta10.gotoAndStop(3);
} else if (xlevel == 30) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(2);
_root.world_mc.peta6.gotoAndStop(2);
_root.world_mc.peta7.gotoAndStop(2);
_root.world_mc.peta8.gotoAndStop(2);
_root.world_mc.peta9.gotoAndStop(2);
_root.world_mc.peta10.gotoAndStop(2);
_root.world_mc.peta11.gotoAndStop(3);
} else if (xlevel == 31) {
_root.world_mc.peta1._visible = true;
_root.world_mc.peta2._visible = false;
_root.world_mc.peta3._visible = false;
_root.world_mc.peta4._visible = false;
_root.world_mc.peta5._visible = false;
_root.world_mc.peta6._visible = false;
_root.world_mc.peta7._visible = false;
} else if (xlevel == 32) {
_root.world_mc.peta1._visible = false;
_root.world_mc.peta2._visible = true;
_root.world_mc.peta3._visible = false;
_root.world_mc.peta4._visible = false;
_root.world_mc.peta5._visible = false;
_root.world_mc.peta6._visible = false;
_root.world_mc.peta7._visible = false;
} else if (xlevel == 33) {
_root.world_mc.peta1._visible = false;
_root.world_mc.peta2._visible = false;
_root.world_mc.peta3._visible = true;
_root.world_mc.peta4._visible = false;
_root.world_mc.peta5._visible = false;
_root.world_mc.peta6._visible = false;
_root.world_mc.peta7._visible = false;
} else if (xlevel == 34) {
_root.world_mc.peta1._visible = false;
_root.world_mc.peta2._visible = false;
_root.world_mc.peta3._visible = false;
_root.world_mc.peta4._visible = true;
_root.world_mc.peta5._visible = false;
_root.world_mc.peta6._visible = false;
_root.world_mc.peta7._visible = false;
} else if (xlevel == 35) {
_root.world_mc.peta1._visible = false;
_root.world_mc.peta2._visible = false;
_root.world_mc.peta3._visible = false;
_root.world_mc.peta4._visible = false;
_root.world_mc.peta5._visible = true;
_root.world_mc.peta6._visible = false;
_root.world_mc.peta7._visible = false;
} else if (xlevel == 36) {
_root.world_mc.peta1._visible = false;
_root.world_mc.peta2._visible = false;
_root.world_mc.peta3._visible = false;
_root.world_mc.peta4._visible = false;
_root.world_mc.peta5._visible = false;
_root.world_mc.peta6._visible = true;
_root.world_mc.peta7._visible = false;
} else if (xlevel == 37) {
_root.world_mc.peta1._visible = false;
_root.world_mc.peta2._visible = false;
_root.world_mc.peta3._visible = false;
_root.world_mc.peta4._visible = false;
_root.world_mc.peta5._visible = false;
_root.world_mc.peta6._visible = false;
_root.world_mc.peta7._visible = false;
_root.world_mc.petax.gotoAndStop(3);
} else if (xlevel == 38) {
_root.world_mc.peta1._visible = true;
_root.world_mc.peta2._visible = false;
_root.world_mc.peta3._visible = false;
_root.world_mc.peta4._visible = false;
_root.world_mc.peta5._visible = false;
_root.world_mc.peta6._visible = false;
_root.world_mc.peta7._visible = false;
_root.world_mc.peta8._visible = false;
} else if (xlevel == 39) {
_root.world_mc.peta1._visible = false;
_root.world_mc.peta2._visible = true;
_root.world_mc.peta3._visible = false;
_root.world_mc.peta4._visible = false;
_root.world_mc.peta5._visible = false;
_root.world_mc.peta6._visible = false;
_root.world_mc.peta7._visible = false;
_root.world_mc.peta8._visible = false;
} else if (xlevel == 40) {
_root.world_mc.peta1._visible = false;
_root.world_mc.peta2._visible = false;
_root.world_mc.peta3._visible = true;
_root.world_mc.peta4._visible = false;
_root.world_mc.peta5._visible = false;
_root.world_mc.peta6._visible = false;
_root.world_mc.peta7._visible = false;
_root.world_mc.peta8._visible = false;
} else if (xlevel == 41) {
_root.world_mc.peta1._visible = false;
_root.world_mc.peta2._visible = false;
_root.world_mc.peta3._visible = false;
_root.world_mc.peta4._visible = true;
_root.world_mc.peta5._visible = false;
_root.world_mc.peta6._visible = false;
_root.world_mc.peta7._visible = false;
_root.world_mc.peta8._visible = false;
} else if (xlevel == 42) {
_root.world_mc.peta1._visible = false;
_root.world_mc.peta2._visible = false;
_root.world_mc.peta3._visible = false;
_root.world_mc.peta4._visible = false;
_root.world_mc.peta5._visible = true;
_root.world_mc.peta6._visible = false;
_root.world_mc.peta7._visible = false;
_root.world_mc.peta8._visible = false;
} else if (xlevel == 43) {
_root.world_mc.peta1._visible = false;
_root.world_mc.peta2._visible = false;
_root.world_mc.peta3._visible = false;
_root.world_mc.peta4._visible = false;
_root.world_mc.peta5._visible = false;
_root.world_mc.peta6._visible = true;
_root.world_mc.peta7._visible = false;
_root.world_mc.peta8._visible = false;
} else if (xlevel == 44) {
_root.world_mc.peta1._visible = false;
_root.world_mc.peta2._visible = false;
_root.world_mc.peta3._visible = false;
_root.world_mc.peta4._visible = false;
_root.world_mc.peta5._visible = false;
_root.world_mc.peta6._visible = false;
_root.world_mc.peta7._visible = true;
_root.world_mc.peta8._visible = false;
} else if (xlevel == 45) {
_root.world_mc.peta1._visible = false;
_root.world_mc.peta2._visible = false;
_root.world_mc.peta3._visible = false;
_root.world_mc.peta4._visible = false;
_root.world_mc.peta5._visible = false;
_root.world_mc.peta6._visible = false;
_root.world_mc.peta7._visible = false;
_root.world_mc.peta8._visible = false;
_root.world_mc.petax.gotoAndStop(3);
}
} else if (jenisCampaign == 3) {
if (xlevel <= 13) {
world_mc.gotoAndStop(40);
} else if (xlevel <= 17) {
world_mc.gotoAndStop(41);
} else if (xlevel <= 30) {
world_mc.gotoAndStop(42);
} else if (xlevel <= 37) {
world_mc.gotoAndStop(43);
} else if (xlevel <= 45) {
world_mc.gotoAndStop(44);
}
i = 1;
while (i <= jmlPeta) {
_root.world_mc["peta" + i].gotoAndStop(1);
i++;
}
_root.world_mc.petax.gotoAndStop(1);
i = 1;
while (i <= 45) {
_root.world_mc["panah" + i]._visible = false;
_root.world_mc[("panah" + i) + "a"]._visible = false;
_root.world_mc[("panah" + i) + "b"]._visible = false;
_root.world_mc[("panah" + i) + "c"]._visible = false;
i++;
}
_root.world_mc["panah" + xlevel]._visible = true;
_root.world_mc[("panah" + xlevel) + "a"]._visible = true;
_root.world_mc[("panah" + xlevel) + "b"]._visible = true;
_root.world_mc[("panah" + xlevel) + "c"]._visible = true;
if (xlevel == 1) {
_root.world_mc.peta1.gotoAndStop(3);
} else if (xlevel == 2) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(3);
} else if (xlevel == 3) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(3);
} else if (xlevel == 4) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(3);
} else if (xlevel == 5) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(3);
} else if (xlevel == 6) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(2);
_root.world_mc.peta6.gotoAndStop(3);
} else if (xlevel == 7) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(2);
_root.world_mc.peta6.gotoAndStop(2);
_root.world_mc.peta7.gotoAndStop(3);
} else if (xlevel == 8) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(2);
_root.world_mc.peta6.gotoAndStop(2);
_root.world_mc.peta7.gotoAndStop(2);
_root.world_mc.peta8.gotoAndStop(3);
} else if (xlevel == 9) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(2);
_root.world_mc.peta6.gotoAndStop(2);
_root.world_mc.peta7.gotoAndStop(2);
_root.world_mc.peta8.gotoAndStop(2);
_root.world_mc.peta13.gotoAndStop(3);
} else if (xlevel == 10) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(2);
_root.world_mc.peta6.gotoAndStop(2);
_root.world_mc.peta7.gotoAndStop(2);
_root.world_mc.peta8.gotoAndStop(2);
_root.world_mc.peta9.gotoAndStop(3);
_root.world_mc.peta13.gotoAndStop(2);
} else if (xlevel == 11) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(2);
_root.world_mc.peta6.gotoAndStop(2);
_root.world_mc.peta7.gotoAndStop(2);
_root.world_mc.peta8.gotoAndStop(2);
_root.world_mc.peta9.gotoAndStop(2);
_root.world_mc.peta10.gotoAndStop(3);
_root.world_mc.peta13.gotoAndStop(2);
} else if (xlevel == 12) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(2);
_root.world_mc.peta6.gotoAndStop(2);
_root.world_mc.peta7.gotoAndStop(2);
_root.world_mc.peta8.gotoAndStop(2);
_root.world_mc.peta9.gotoAndStop(2);
_root.world_mc.peta10.gotoAndStop(2);
_root.world_mc.peta11.gotoAndStop(3);
_root.world_mc.peta13.gotoAndStop(2);
} else if (xlevel == 13) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(2);
_root.world_mc.peta6.gotoAndStop(2);
_root.world_mc.peta7.gotoAndStop(2);
_root.world_mc.peta8.gotoAndStop(2);
_root.world_mc.peta9.gotoAndStop(2);
_root.world_mc.peta10.gotoAndStop(2);
_root.world_mc.peta11.gotoAndStop(2);
_root.world_mc.peta12.gotoAndStop(3);
_root.world_mc.peta14.gotoAndStop(3);
_root.world_mc.peta13.gotoAndStop(2);
} else if (xlevel == 14) {
_root.world_mc.peta1.gotoAndStop(3);
} else if (xlevel == 15) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(3);
} else if (xlevel == 16) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(3);
} else if (xlevel == 17) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(3);
} else if (xlevel == 18) {
_root.world_mc.peta1.gotoAndStop(3);
} else if (xlevel == 19) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(3);
} else if (xlevel == 20) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(3);
} else if (xlevel == 21) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(3);
} else if (xlevel == 22) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(3);
} else if (xlevel == 23) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(2);
_root.world_mc.peta6.gotoAndStop(3);
} else if (xlevel == 24) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(2);
_root.world_mc.peta6.gotoAndStop(2);
_root.world_mc.peta7.gotoAndStop(3);
} else if (xlevel == 25) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(2);
_root.world_mc.peta6.gotoAndStop(2);
_root.world_mc.peta7.gotoAndStop(2);
_root.world_mc.peta8.gotoAndStop(3);
} else if (xlevel == 26) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(2);
_root.world_mc.peta6.gotoAndStop(2);
_root.world_mc.peta7.gotoAndStop(2);
_root.world_mc.peta8.gotoAndStop(2);
_root.world_mc.peta9.gotoAndStop(3);
} else if (xlevel == 27) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(2);
_root.world_mc.peta6.gotoAndStop(2);
_root.world_mc.peta7.gotoAndStop(2);
_root.world_mc.peta8.gotoAndStop(2);
_root.world_mc.peta9.gotoAndStop(2);
_root.world_mc.peta10.gotoAndStop(3);
_root.world_mc.peta14.gotoAndStop(3);
} else if (xlevel == 28) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(2);
_root.world_mc.peta6.gotoAndStop(2);
_root.world_mc.peta7.gotoAndStop(2);
_root.world_mc.peta8.gotoAndStop(2);
_root.world_mc.peta9.gotoAndStop(2);
_root.world_mc.peta10.gotoAndStop(2);
_root.world_mc.peta11.gotoAndStop(3);
_root.world_mc.peta14.gotoAndStop(2);
} else if (xlevel == 29) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(2);
_root.world_mc.peta6.gotoAndStop(2);
_root.world_mc.peta7.gotoAndStop(2);
_root.world_mc.peta8.gotoAndStop(2);
_root.world_mc.peta9.gotoAndStop(2);
_root.world_mc.peta10.gotoAndStop(2);
_root.world_mc.peta11.gotoAndStop(2);
_root.world_mc.peta12.gotoAndStop(3);
_root.world_mc.peta14.gotoAndStop(2);
} else if (xlevel == 30) {
_root.world_mc.peta1.gotoAndStop(2);
_root.world_mc.peta2.gotoAndStop(2);
_root.world_mc.peta3.gotoAndStop(2);
_root.world_mc.peta4.gotoAndStop(2);
_root.world_mc.peta5.gotoAndStop(2);
_root.world_mc.peta6.gotoAndStop(2);
_root.world_mc.peta7.gotoAndStop(2);
_root.world_mc.peta8.gotoAndStop(2);
_root.world_mc.peta9.gotoAndStop(2);
_root.world_mc.peta10.gotoAndStop(2);
_root.world_mc.peta11.gotoAndStop(2);
_root.world_mc.peta12.gotoAndStop(2);
_root.world_mc.peta13.gotoAndStop(3);
_root.world_mc.peta14.gotoAndStop(2);
} else if (xlevel == 31) {
_root.world_mc.peta1._visible = true;
_root.world_mc.peta2._visible = false;
_root.world_mc.peta3._visible = false;
_root.world_mc.peta4._visible = false;
_root.world_mc.peta5._visible = false;
_root.world_mc.peta6._visible = false;
_root.world_mc.peta7._visible = false;
} else if (xlevel == 32) {
_root.world_mc.peta1._visible = false;
_root.world_mc.peta2._visible = true;
_root.world_mc.peta3._visible = false;
_root.world_mc.peta4._visible = false;
_root.world_mc.peta5._visible = false;
_root.world_mc.peta6._visible = false;
_root.world_mc.peta7._visible = false;
} else if (xlevel == 33) {
_root.world_mc.peta1._visible = false;
_root.world_mc.peta2._visible = false;
_root.world_mc.peta3._visible = true;
_root.world_mc.peta4._visible = false;
_root.world_mc.peta5._visible = false;
_root.world_mc.peta6._visible = false;
_root.world_mc.peta7._visible = false;
} else if (xlevel == 34) {
_root.world_mc.peta1._visible = false;
_root.world_mc.peta2._visible = false;
_root.world_mc.peta3._visible = false;
_root.world_mc.peta4._visible = true;
_root.world_mc.peta5._visible = false;
_root.world_mc.peta6._visible = false;
_root.world_mc.peta7._visible = false;
} else if (xlevel == 35) {
_root.world_mc.peta1._visible = false;
_root.world_mc.peta2._visible = false;
_root.world_mc.peta3._visible = false;
_root.world_mc.peta4._visible = false;
_root.world_mc.peta5._visible = true;
_root.world_mc.peta6._visible = false;
_root.world_mc.peta7._visible = false;
} else if (xlevel == 36) {
_root.world_mc.peta1._visible = false;
_root.world_mc.peta2._visible = false;
_root.world_mc.peta3._visible = false;
_root.world_mc.peta4._visible = false;
_root.world_mc.peta5._visible = false;
_root.world_mc.peta6._visible = true;
_root.world_mc.peta7._visible = false;
} else if (xlevel == 37) {
_root.world_mc.peta1._visible = false;
_root.world_mc.peta2._visible = false;
_root.world_mc.peta3._visible = false;
_root.world_mc.peta4._visible = false;
_root.world_mc.peta5._visible = false;
_root.world_mc.peta6._visible = false;
_root.world_mc.peta7._visible = false;
_root.world_mc.petax.gotoAndStop(3);
} else if (xlevel == 38) {
_root.world_mc.peta1._visible = true;
_root.world_mc.peta2._visible = false;
_root.world_mc.peta3._visible = false;
_root.world_mc.peta4._visible = false;
_root.world_mc.peta5._visible = false;
_root.world_mc.peta6._visible = false;
_root.world_mc.peta7._visible = false;
_root.world_mc.peta8._visible = false;
} else if (xlevel == 39) {
_root.world_mc.peta1._visible = false;
_root.world_mc.peta2._visible = true;
_root.world_mc.peta3._visible = false;
_root.world_mc.peta4._visible = false;
_root.world_mc.peta5._visible = false;
_root.world_mc.peta6._visible = false;
_root.world_mc.peta7._visible = false;
_root.world_mc.peta8._visible = false;
} else if (xlevel == 40) {
_root.world_mc.peta1._visible = false;
_root.world_mc.peta2._visible = false;
_root.world_mc.peta3._visible = true;
_root.world_mc.peta4._visible = false;
_root.world_mc.peta5._visible = false;
_root.world_mc.peta6._visible = false;
_root.world_mc.peta7._visible = false;
_root.world_mc.peta8._visible = false;
} else if (xlevel == 41) {
_root.world_mc.peta1._visible = false;
_root.world_mc.peta2._visible = false;
_root.world_mc.peta3._visible = false;
_root.world_mc.peta4._visible = true;
_root.world_mc.peta5._visible = false;
_root.world_mc.peta6._visible = false;
_root.world_mc.peta7._visible = false;
_root.world_mc.peta8._visible = false;
} else if (xlevel == 42) {
_root.world_mc.peta1._visible = false;
_root.world_mc.peta2._visible = false;
_root.world_mc.peta3._visible = false;
_root.world_mc.peta4._visible = false;
_root.world_mc.peta5._visible = true;
_root.world_mc.peta6._visible = false;
_root.world_mc.peta7._visible = false;
_root.world_mc.peta8._visible = false;
} else if (xlevel == 43) {
_root.world_mc.peta1._visible = false;
_root.world_mc.peta2._visible = false;
_root.world_mc.peta3._visible = false;
_root.world_mc.peta4._visible = false;
_root.world_mc.peta5._visible = false;
_root.world_mc.peta6._visible = true;
_root.world_mc.peta7._visible = false;
_root.world_mc.peta8._visible = false;
} else if (xlevel == 44) {
_root.world_mc.peta1._visible = false;
_root.world_mc.peta2._visible = false;
_root.world_mc.peta3._visible = false;
_root.world_mc.peta4._visible = false;
_root.world_mc.peta5._visible = false;
_root.world_mc.peta6._visible = false;
_root.world_mc.peta7._visible = true;
_root.world_mc.peta8._visible = false;
} else if (xlevel == 45) {
_root.world_mc.peta1._visible = false;
_root.world_mc.peta2._visible = false;
_root.world_mc.peta3._visible = false;
_root.world_mc.peta4._visible = false;
_root.world_mc.peta5._visible = false;
_root.world_mc.peta6._visible = false;
_root.world_mc.peta7._visible = false;
_root.world_mc.peta8._visible = false;
_root.world_mc.petax.gotoAndStop(3);
}
}
} else {
world_mc._visible = false;
jenisMap._visible = true;
jenis_mc._visible = false;
if (jenisPerang == "darat") {
jenisMap.gotoAndStop(xbgGame);
if (xlevel == 1) {
tanda = ("Preview of first battle: \n" + jenisArea[jenisMap._currentframe]) + " (Land Battle)";
} else if (xlevel == 45) {
tanda = ("Preview of last battle: \n" + jenisArea[jenisMap._currentframe]) + " (Land Battle)";
} else {
tanda = ("Preview of next battle: \n" + jenisArea[jenisMap._currentframe]) + " (Land Battle)";
}
} else if (jenisPerang == "laut") {
jenisMap.gotoAndStop(xbgGame + 10);
if (xlevel == 1) {
tanda = ("Preview of first battle: \n" + jenisArea[jenisMap._currentframe]) + " (Sea Battle)";
} else if (xlevel == 45) {
tanda = ("Preview of last battle: \n" + jenisArea[jenisMap._currentframe]) + " (Sea Battle)";
} else {
tanda = ("Preview of next battle: \n" + jenisArea[jenisMap._currentframe]) + " (Sea Battle)";
}
} else if (jenisPerang == "udara") {
jenisMap.gotoAndStop(xbgGame + 12);
if (xlevel == 1) {
tanda = ("Preview of first battle: \n" + jenisArea[jenisMap._currentframe]) + " (Air Battle)";
} else if (xlevel == 45) {
tanda = ("Preview of last battle: \n" + jenisArea[jenisMap._currentframe]) + " (Air Battle)";
} else {
tanda = ("Preview of next battle: \n" + jenisArea[jenisMap._currentframe]) + " (Air Battle)";
}
}
}
i = 1;
while (i <= 4) {
_root["gembok_mc" + i]._visible = false;
_root["kotak" + i].onRollOver = overKotak;
_root["kotak" + i].onRollOut = outKotak;
i++;
}
jenisKotak = new Array("", "Infantry", "Artillery", "Air Force", "Navy");
if (jenisPerang == "darat") {
if (jenisPerang2 == "pantai") {
gembok_mc2._visible = true;
gembok_mc4._visible = true;
} else if (tipeMaen2 == "infantry") {
gembok_mc2._visible = true;
gembok_mc3._visible = true;
gembok_mc4._visible = true;
} else if (tipeMaen2 == "artillery") {
gembok_mc1._visible = true;
gembok_mc3._visible = true;
gembok_mc4._visible = true;
} else {
gembok_mc4._visible = true;
}
} else if (jenisPerang == "laut") {
if (tipeMaen2 == "navy") {
gembok_mc1._visible = true;
gembok_mc2._visible = true;
gembok_mc3._visible = true;
} else {
gembok_mc1._visible = true;
gembok_mc2._visible = true;
}
} else if (jenisPerang == "udara") {
gembok_mc1._visible = true;
gembok_mc2._visible = true;
gembok_mc4._visible = true;
}
}
function overKotak() {
myStr = new String(this);
indi = Number(myStr.substr(myStr.length - 1, 1));
area_mc._visible = true;
area_mc._x = this._x;
area_mc._y = this._y - 50;
if (_root["gembok_mc" + indi]._visible == true) {
area_mc.judul = jenisKotak[indi] + " Unavailable";
} else {
area_mc.judul = jenisKotak[indi] + " Available";
}
}
function outKotak() {
area_mc._visible = false;
}
function cekBisaKlikSemua2(indi) {
continue_btn.enabled = indi;
menu_btn.enabled = indi;
world_btn.enabled = indi;
preview_btn.enabled = indi;
info_btn.enabled = indi;
if (indi == true) {
_root.world_mc["panah" + xlevel]._visible = indi;
_root.world_mc["panah" + xlevel].gotoAndPlay(2);
_root.world_mc[("panah" + xlevel) + "a"].gotoAndPlay(2);
_root.world_mc[("panah" + xlevel) + "b"].gotoAndPlay(2);
_root.world_mc[("panah" + xlevel) + "c"].gotoAndPlay(2);
} else {
i = 1;
while (i <= 45) {
_root.world_mc["panah" + i]._visible = indi;
_root.world_mc[("panah" + i) + "a"]._visible = indi;
_root.world_mc[("panah" + i) + "b"]._visible = indi;
_root.world_mc[("panah" + i) + "c"]._visible = indi;
i++;
}
}
}
function cekPetaPilih() {
tipeMaen2 = "";
if (jenisCampaign == 1) {
if (xlevel == 1) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 1;
} else if (xlevel == 2) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 4;
} else if (xlevel == 3) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 6;
} else if (xlevel == 4) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 7;
} else if (xlevel == 5) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 2;
} else if (xlevel == 6) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 9;
} else if (xlevel == 7) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 9;
} else if (xlevel == 8) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 5;
} else if (xlevel == 9) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 3;
} else if (xlevel == 10) {
tipeMaen2 = "infantry";
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 8;
} else if (xlevel == 11) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 1;
} else if (xlevel == 12) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 3;
} else if (xlevel == 13) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 4;
} else if (xlevel == 14) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 6;
} else if (xlevel == 15) {
tipeMaen2 = "artillery";
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 8;
} else if (xlevel == 16) {
jenisPerang = "darat";
jenisPerang2 = "pantai";
xbgGame = 10;
} else if (xlevel == 17) {
jenisPerang = "laut";
jenisPerang2 = "";
xbgGame = 1;
} else if (xlevel == 18) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 1;
} else if (xlevel == 19) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 4;
} else if (xlevel == 20) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 6;
} else if (xlevel == 21) {
xbgGame = 1;
jenisPerang = "udara";
jenisPerang2 = "";
} else if (xlevel == 22) {
jenisPerang = "darat";
jenisPerang2 = "pantai";
xbgGame = 10;
} else if (xlevel == 23) {
tipeMaen2 = "navy";
jenisPerang = "laut";
jenisPerang2 = "";
xbgGame = 1;
} else if (xlevel == 24) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 2;
} else if (xlevel == 25) {
jenisPerang = "laut";
jenisPerang2 = "";
xbgGame = 2;
} else if (xlevel == 26) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 4;
} else if (xlevel == 27) {
jenisPerang = "darat";
jenisPerang2 = "pantai";
xbgGame = 10;
} else if (xlevel == 28) {
tipeMaen2 = "artillery";
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 8;
} else if (xlevel == 29) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 6;
} else if (xlevel == 30) {
xbgGame = 2;
jenisPerang = "udara";
jenisPerang2 = "";
} else if (xlevel == 31) {
jenisPerang = "laut";
jenisPerang2 = "";
xbgGame = 1;
} else if (xlevel == 32) {
tipeMaen2 = "navy";
jenisPerang = "laut";
jenisPerang2 = "";
xbgGame = 2;
} else if (xlevel == 33) {
xbgGame = 4;
jenisPerang = "udara";
jenisPerang2 = "";
} else if (xlevel == 34) {
jenisPerang = "darat";
jenisPerang2 = "pantai";
xbgGame = 10;
} else if (xlevel == 35) {
tipeMaen2 = "infantry";
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 8;
} else if (xlevel == 36) {
xbgGame = 3;
jenisPerang = "udara";
jenisPerang2 = "";
} else if (xlevel == 37) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 2;
} else if (xlevel == 38) {
jenisPerang = "laut";
jenisPerang2 = "";
xbgGame = 1;
} else if (xlevel == 39) {
tipeMaen2 = "navy";
jenisPerang = "laut";
jenisPerang2 = "";
xbgGame = 2;
} else if (xlevel == 40) {
xbgGame = 6;
jenisPerang = "udara";
jenisPerang2 = "";
} else if (xlevel == 41) {
jenisPerang = "darat";
jenisPerang2 = "pantai";
xbgGame = 10;
} else if (xlevel == 42) {
tipeMaen2 = "infantry";
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 4;
} else if (xlevel == 43) {
xbgGame = 5;
jenisPerang = "udara";
jenisPerang2 = "";
} else if (xlevel == 44) {
tipeMaen2 = "artillery";
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 2;
} else if (xlevel == 45) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 8;
}
} else if (jenisCampaign == 2) {
if (xlevel == 1) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 2;
} else if (xlevel == 2) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 4;
} else if (xlevel == 3) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 8;
} else if (xlevel == 4) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 2;
} else if (xlevel == 5) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 6;
} else if (xlevel == 6) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 2;
} else if (xlevel == 7) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 1;
} else if (xlevel == 8) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 4;
} else if (xlevel == 9) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 6;
} else if (xlevel == 10) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 2;
} else if (xlevel == 11) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 9;
} else if (xlevel == 12) {
tipeMaen2 = "navy";
jenisPerang = "laut";
jenisPerang2 = "";
xbgGame = 1;
} else if (xlevel == 13) {
jenisPerang = "darat";
jenisPerang2 = "pantai";
xbgGame = 10;
} else if (xlevel == 14) {
tipeMaen2 = "infantry";
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 2;
} else if (xlevel == 15) {
tipeMaen2 = "artillery";
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 3;
} else if (xlevel == 16) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 7;
} else if (xlevel == 17) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 5;
} else if (xlevel == 18) {
xbgGame = 3;
jenisPerang = "udara";
jenisPerang2 = "";
} else if (xlevel == 19) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 8;
} else if (xlevel == 20) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 2;
} else if (xlevel == 21) {
xbgGame = 1;
jenisPerang = "udara";
jenisPerang2 = "";
} else if (xlevel == 22) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 7;
} else if (xlevel == 23) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 3;
} else if (xlevel == 24) {
xbgGame = 5;
jenisPerang = "udara";
jenisPerang2 = "";
} else if (xlevel == 25) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 1;
} else if (xlevel == 26) {
jenisPerang = "laut";
jenisPerang2 = "";
xbgGame = 1;
} else if (xlevel == 27) {
tipeMaen2 = "artillery";
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 9;
} else if (xlevel == 28) {
tipeMaen2 = "navy";
jenisPerang = "laut";
jenisPerang2 = "";
xbgGame = 1;
} else if (xlevel == 28) {
xbgGame = 2;
jenisPerang = "udara";
jenisPerang2 = "";
} else if (xlevel == 29) {
tipeMaen2 = "navy";
jenisPerang = "laut";
jenisPerang2 = "";
xbgGame = 1;
} else if (xlevel == 30) {
jenisPerang = "laut";
jenisPerang2 = "";
xbgGame = 2;
} else if (xlevel == 31) {
tipeMaen2 = "navy";
jenisPerang = "laut";
jenisPerang2 = "";
xbgGame = 1;
} else if (xlevel == 32) {
jenisPerang = "laut";
jenisPerang2 = "";
xbgGame = 2;
} else if (xlevel == 33) {
xbgGame = 4;
jenisPerang = "udara";
jenisPerang2 = "";
} else if (xlevel == 34) {
jenisPerang = "darat";
jenisPerang2 = "pantai";
xbgGame = 10;
} else if (xlevel == 35) {
tipeMaen2 = "infantry";
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 2;
} else if (xlevel == 36) {
xbgGame = 3;
jenisPerang = "udara";
jenisPerang2 = "";
} else if (xlevel == 37) {
tipeMaen2 = "infantry";
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 3;
} else if (xlevel == 38) {
tipeMaen2 = "navy";
jenisPerang = "laut";
jenisPerang2 = "";
xbgGame = 2;
} else if (xlevel == 39) {
jenisPerang = "laut";
jenisPerang2 = "";
xbgGame = 1;
} else if (xlevel == 40) {
xbgGame = 6;
jenisPerang = "udara";
jenisPerang2 = "";
} else if (xlevel == 41) {
tipeMaen2 = "navy";
jenisPerang = "laut";
jenisPerang2 = "";
xbgGame = 1;
} else if (xlevel == 42) {
tipeMaen2 = "infantry";
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 9;
} else if (xlevel == 43) {
xbgGame = 1;
jenisPerang = "udara";
jenisPerang2 = "";
} else if (xlevel == 44) {
tipeMaen2 = "artillery";
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 4;
} else if (xlevel == 45) {
xbgGame = 5;
jenisPerang = "udara";
jenisPerang2 = "";
}
} else if (jenisCampaign == 3) {
if (xlevel == 1) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 3;
} else if (xlevel == 2) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 2;
} else if (xlevel == 3) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 4;
} else if (xlevel == 4) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 6;
} else if (xlevel == 5) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 8;
} else if (xlevel == 6) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 1;
} else if (xlevel == 7) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 2;
} else if (xlevel == 8) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 4;
} else if (xlevel == 9) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 3;
} else if (xlevel == 10) {
jenisPerang = "laut";
jenisPerang2 = "";
xbgGame = 1;
} else if (xlevel == 11) {
jenisPerang = "laut";
jenisPerang2 = "";
xbgGame = 1;
} else if (xlevel == 12) {
tipeMaen2 = "navy";
jenisPerang = "laut";
jenisPerang2 = "";
xbgGame = 2;
} else if (xlevel == 13) {
xbgGame = 2;
jenisPerang = "udara";
jenisPerang2 = "";
} else if (xlevel == 14) {
tipeMaen2 = "infantry";
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 4;
} else if (xlevel == 15) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 2;
} else if (xlevel == 16) {
tipeMaen2 = "artillery";
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 3;
} else if (xlevel == 17) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 7;
} else if (xlevel == 18) {
jenisPerang = "darat";
jenisPerang2 = "pantai";
xbgGame = 10;
} else if (xlevel == 19) {
tipeMaen2 = "artillery";
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 7;
} else if (xlevel == 20) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 1;
} else if (xlevel == 21) {
tipeMaen2 = "infantry";
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 3;
} else if (xlevel == 22) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 8;
} else if (xlevel == 23) {
xbgGame = 6;
jenisPerang = "udara";
jenisPerang2 = "";
} else if (xlevel == 24) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 4;
} else if (xlevel == 25) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 4;
} else if (xlevel == 26) {
tipeMaen2 = "artillery";
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 8;
} else if (xlevel == 27) {
tipeMaen2 = "artillery";
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 4;
} else if (xlevel == 28) {
xbgGame = 5;
jenisPerang = "udara";
jenisPerang2 = "";
} else if (xlevel == 29) {
jenisPerang = "laut";
jenisPerang2 = "";
xbgGame = 1;
} else if (xlevel == 30) {
tipeMaen2 = "navy";
jenisPerang = "laut";
jenisPerang2 = "";
xbgGame = 2;
} else if (xlevel == 31) {
tipeMaen2 = "navy";
jenisPerang = "laut";
jenisPerang2 = "";
xbgGame = 1;
} else if (xlevel == 32) {
jenisPerang = "laut";
jenisPerang2 = "";
xbgGame = 2;
} else if (xlevel == 33) {
xbgGame = 4;
jenisPerang = "udara";
jenisPerang2 = "";
} else if (xlevel == 34) {
xbgGame = 5;
jenisPerang = "udara";
jenisPerang2 = "";
} else if (xlevel == 35) {
tipeMaen2 = "artillery";
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 4;
} else if (xlevel == 36) {
xbgGame = 1;
jenisPerang = "udara";
jenisPerang2 = "";
} else if (xlevel == 37) {
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 2;
} else if (xlevel == 38) {
tipeMaen2 = "navy";
jenisPerang = "laut";
jenisPerang2 = "";
xbgGame = 2;
} else if (xlevel == 39) {
jenisPerang = "laut";
jenisPerang2 = "";
xbgGame = 1;
} else if (xlevel == 40) {
xbgGame = 6;
jenisPerang = "udara";
jenisPerang2 = "";
} else if (xlevel == 41) {
jenisPerang = "darat";
jenisPerang2 = "pantai";
xbgGame = 10;
} else if (xlevel == 42) {
tipeMaen2 = "infantry";
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 4;
} else if (xlevel == 43) {
xbgGame = 3;
jenisPerang = "udara";
jenisPerang2 = "";
} else if (xlevel == 44) {
xbgGame = 3;
jenisPerang = "udara";
jenisPerang2 = "";
} else if (xlevel == 45) {
tipeMaen2 = "artillery";
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 4;
}
}
}
stop();
if (tipeSulitCampaign == 1) {
sulitCampaign = "Easy";
} else if (tipeSulitCampaign == 2) {
sulitCampaign = "Normal";
} else if (tipeSulitCampaign == 3) {
sulitCampaign = "Hard";
} else if (tipeSulitCampaign == 4) {
sulitCampaign = "Impossible";
}
info_btn.onRelease = function () {
msgBox_mc._visible = true;
cekBisaKlikSemua2(false);
if (jenisPerang == "darat") {
if (jenisPerang2 == "pantai") {
msgBox_mc.judul = "Infantry and Air Force Battle";
msgBox_mc.isi = "(Land Battle, Beach) You can only train one troop every type of Infantry and Air Force, you are not allowed to train another same unit type before training finish.";
} else if (tipeMaen2 == "") {
msgBox_mc.judul = "Infantry, Artillery & Air Force Battle";
msgBox_mc.isi = "(Land Battle) You can only train one troop every type of Infantry, Artillery and Air Force, you are not allowed to train another same unit type before training finish.";
} else if (tipeMaen2 == "infantry") {
msgBox_mc.judul = "All Infantry Battle";
msgBox_mc.isi = "(Land Battle) You can train all type of infantry troops and super parachute at the same time.";
} else if (tipeMaen2 == "artillery") {
msgBox_mc.judul = "All Artillery Battle";
msgBox_mc.isi = "(Land Battle) You can train all type of artillery troops and super tank at the same time.";
}
} else if (jenisPerang == "laut") {
if (tipeMaen2 == "navy") {
msgBox_mc.judul = "All Navy Battle";
msgBox_mc.isi = "(Sea/Naval Battle) You can train all type of navy troops and super speedboat at the same time.";
} else {
msgBox_mc.judul = "Air Force and Navy Battle";
msgBox_mc.isi = "(Sea/Naval Battle) You can only train one troop every type of Air Force and Navy, you not are allowed to train another same unit type before training finish.";
}
} else if (jenisPerang == "udara") {
msgBox_mc.judul = "All Air Force Battle";
msgBox_mc.isi = "(Air Battle) You can train all type of air force troops and super helicopter at the same time.";
}
msgBox_mc.no_btn.onRelease = function () {
cekBisaKlikSemua2(true);
msgBox_mc._visible = false;
};
};
jenisLihat = "map";
xnyawaGame = nyawaGame;
xlevelx = xlevel;
menu_mc2._visible = false;
area_mc._visible = false;
jenisMap._visible = false;
world_mc._visible = true;
world_btn._visible = false;
preview_btn._visible = true;
jenisArea = new Array("", "Grasses", "Canyon", "Desert", "Forest", "Ground Field", "Rain Forest", "Shoreside Desert", "Plain Grass", "Beach", "Side Beach", "Blue Sea", "Deep Sea", "The Forest", "The Island", "The Jungle", "Sea and Cloud", "The Canyon", "Above The Sea");
cekPetaPilih();
cekKemana();
if ((xlevel == 1) && (kacauBanget == undefined)) {
kacauBanget = true;
cekBisaKlikSemua2(false);
msgBox_mc._visible = true;
msgBox_mc.judul = "Campaign Mode";
msgBox_mc.isi = "Welcome to the campaign, this is the world map, the blink area show your target attack, press continue button to start the battle.";
msgBox_mc.no_btn.onRelease = function () {
cekBisaKlikSemua2(true);
msgBox_mc._visible = false;
};
} else if ((xlevel == 31) && (kacauBanget2 == undefined)) {
kacauBanget2 = true;
cekBisaKlikSemua2(false);
msgBox_mc._visible = true;
msgBox_mc.judul = "Final Battle";
msgBox_mc.isi = "You are near to final battle, conquer the world to finish this campaign!!";
msgBox_mc.no_btn.onRelease = function () {
cekBisaKlikSemua2(true);
msgBox_mc._visible = false;
};
} else {
cekBisaKlikSemua2(true);
msgBox_mc._visible = false;
}
preview_btn.onRelease = function () {
world_btn._visible = true;
preview_btn._visible = false;
jenisLihat = "preview";
cekKemana();
};
world_btn.onRelease = function () {
world_btn._visible = false;
preview_btn._visible = true;
jenisLihat = "map";
cekKemana();
};
continue_btn.onRelease = function () {
if (jenisMaen == "mulai") {
gotoAndStop (502);
} else if (jenisMaen == "game") {
gotoAndStop (504);
}
};
menu_btn.onRelease = function () {
removeMovieClip(infoBox);
menu_mc2._visible = true;
cekBisaKlikSemua2(false);
menu_mc2.quit_btn.onRelease = function () {
simpanData();
cekBisaKlikSemua2(true);
removeMovieClip(infoBox);
gotoAndStop (471);
};
menu_mc2.back_btn.onRelease = function () {
cekBisaKlikSemua2(true);
menu_mc2._visible = false;
};
};
Frame 499
stop();
_root.gotoAndStop(_root._currentframe - 1);
Frame 500
function cekPilihMap() {
i = 1;
while (i <= 18) {
_root["tanda" + i]._visible = false;
_root["area" + i].onRelease = klikArea;
_root["area" + i].onRollOver = overArea;
_root["area" + i].onRollOut = (_root["area" + i].onReleaseOutside = outArea);
_root["area" + i]._alpha = 100;
i++;
}
_root["tanda" + zpilihanMap]._visible = true;
}
function klikArea() {
myStr = new String(this);
if (myStr.length == 13) {
indi = Number(myStr.substr(myStr.length - 1, 1));
} else {
indi = Number(myStr.substr(myStr.length - 2, 2));
}
zpilihanMap = indi;
cekPilihMap();
}
function overArea() {
myStr = new String(this);
if (myStr.length == 13) {
indi = Number(myStr.substr(myStr.length - 1, 1));
} else {
indi = Number(myStr.substr(myStr.length - 2, 2));
}
this._alpha = 50;
area_mc._visible = true;
area_mc._x = this._x;
area_mc._y = this._y - 60;
area_mc.judul = jenisArea[indi];
}
function outArea() {
this._alpha = 100;
area_mc._visible = false;
}
stop();
jenisMorale = "offence";
jenisAppear = "random";
back_btn.onRelease = function () {
gotoAndStop (471);
};
if (tipeSulitSingle == 1) {
easy_btn.gotoAndStop(2);
normal_btn.gotoAndStop(1);
hard_btn.gotoAndStop(1);
extreme_btn.gotoAndStop(1);
} else if (tipeSulitSingle == 2) {
tipeSulitSingle = 2;
easy_btn.gotoAndStop(1);
normal_btn.gotoAndStop(2);
hard_btn.gotoAndStop(1);
extreme_btn.gotoAndStop(1);
} else if (tipeSulitSingle == 3) {
tipeSulitSingle = 3;
easy_btn.gotoAndStop(1);
normal_btn.gotoAndStop(1);
hard_btn.gotoAndStop(2);
extreme_btn.gotoAndStop(1);
} else if (tipeSulitSingle == 4) {
tipeSulitSingle = 4;
easy_btn.gotoAndStop(1);
normal_btn.gotoAndStop(1);
hard_btn.gotoAndStop(1);
extreme_btn.gotoAndStop(2);
}
easy_btn.onRelease = function () {
tipeSulitSingle = 1;
easy_btn.gotoAndStop(2);
normal_btn.gotoAndStop(1);
hard_btn.gotoAndStop(1);
extreme_btn.gotoAndStop(1);
};
normal_btn.onRelease = function () {
tipeSulitSingle = 2;
easy_btn.gotoAndStop(1);
normal_btn.gotoAndStop(2);
hard_btn.gotoAndStop(1);
extreme_btn.gotoAndStop(1);
};
hard_btn.onRelease = function () {
tipeSulitSingle = 3;
easy_btn.gotoAndStop(1);
normal_btn.gotoAndStop(1);
hard_btn.gotoAndStop(2);
extreme_btn.gotoAndStop(1);
};
extreme_btn.onRelease = function () {
tipeSulitSingle = 4;
easy_btn.gotoAndStop(1);
normal_btn.gotoAndStop(1);
hard_btn.gotoAndStop(1);
extreme_btn.gotoAndStop(2);
};
play_btn.onRelease = function () {
initAwal();
ygDiSave();
tipeGame = "game";
tipeMaen2 = "";
jenisPerang2 = "";
if (zpilihanMap <= 10) {
pilihanMap = zpilihanMap;
jenisPerang = "darat";
if (zpilihanMap == 10) {
jenisPerang2 = "pantai";
} else if ((zpilihanMap == 2) || (zpilihanMap == 4)) {
tipeMaen2 = "infantry";
} else if ((zpilihanMap == 6) || (zpilihanMap == 8)) {
tipeMaen2 = "artillery";
}
} else if (zpilihanMap <= 12) {
pilihanMap = zpilihanMap - 10;
if (zpilihanMap == 11) {
tipeMaen2 = "navy";
}
jenisPerang = "laut";
} else {
tipeMaen2 = "udara";
pilihanMap = zpilihanMap - 12;
jenisPerang = "udara";
}
jenisMorale = xjenisMorale;
jenisAppear = xjenisAppear;
gotoAndStop (502);
};
if (jenisMorale == "offence") {
defense_btn.gotoAndStop(1);
offence_btn.gotoAndStop(2);
} else if (jenisMorale == "defense") {
defense_btn.gotoAndStop(2);
offence_btn.gotoAndStop(1);
}
if (jenisAppear == "random") {
random_btn.gotoAndStop(2);
manual_btn.gotoAndStop(1);
} else if (jenisAppear == "manual") {
random_btn.gotoAndStop(1);
manual_btn.gotoAndStop(2);
}
defense_btn.onRelease = function () {
xjenisMorale = "defense";
defense_btn.gotoAndStop(2);
offence_btn.gotoAndStop(1);
};
offence_btn.onRelease = function () {
xjenisMorale = "offence";
defense_btn.gotoAndStop(1);
offence_btn.gotoAndStop(2);
};
random_btn.onRelease = function () {
xjenisAppear = "random";
random_btn.gotoAndStop(2);
manual_btn.gotoAndStop(1);
};
manual_btn.onRelease = function () {
xjenisAppear = "manual";
random_btn.gotoAndStop(1);
manual_btn.gotoAndStop(2);
};
defense_btn.onRollOver = function () {
infoBox = attachMovie("info_box2", "info_box", 1000);
infoBox._x = this._x - 50;
infoBox._y = this._y - 75;
infoBox.judul = "Defense Morale";
infoBox.isi = "Forms a massive wall of troops but deploys after at least 12 units are in the center of the battlefield.";
};
offence_btn.onRollOver = function () {
infoBox = attachMovie("info_box2", "info_box", 1000);
infoBox._x = this._x - 50;
infoBox._y = this._y - 75;
infoBox.judul = "Offense Morale";
infoBox.isi = "Troops will attack aggressively.";
};
random_btn.onRollOver = function () {
infoBox = attachMovie("info_box2", "info_box", 1000);
infoBox._x = this._x - 50;
infoBox._y = this._y - 75;
infoBox.judul = "Random Appear";
infoBox.isi = "No formation is made, troops will appear in random locations.";
};
manual_btn.onRollOver = function () {
infoBox = attachMovie("info_box2", "info_box", 1000);
infoBox._x = this._x - 50;
infoBox._y = this._y - 75;
infoBox.judul = "Manual Appear";
infoBox.isi = "Troops will deploy in an arrow sign formation. Control by clicking (W, S) or (UP, DOWN) key.";
};
defense_btn.onRollOut = (defense_btn.onReleaseOutside = function () {
removeMovieClip(infoBox);
});
offence_btn.onRollOut = (offence_btn.onReleaseOutside = function () {
removeMovieClip(infoBox);
});
random_btn.onRollOut = (random_btn.onReleaseOutside = function () {
removeMovieClip(infoBox);
});
manual_btn.onRollOut = (manual_btn.onReleaseOutside = function () {
removeMovieClip(infoBox);
});
area_mc._visible = false;
jenisArea = new Array("", "Grasses", "Canyon", "Desert", "Forest", "Ground Field", "Rain Forest", "Shoreside Desert", "Plain Grass", "Beach", "Side Beach", "Blue Sea", "Deep Sea", "The Forest", "The Island", "The Jungle", "Sea and Cloud", "The Canyon", "Above The Sea");
cekPilihMap();
Frame 501
stop();
_root.gotoAndStop(_root._currentframe - 1);
Frame 502
function cekSelesaiTutor() {
removeMovieClip(tutorial_mc);
i = 1;
while (i <= 52) {
if (frame["frame" + i].sedangUnlok == false) {
frame["frame" + i].enabled = true;
}
i++;
}
i = 1;
while (i <= 9) {
frame["tipe" + i].enabled = true;
i++;
}
setAISemua();
tutorialWar = true;
_root.medals1 = 1;
i = 1;
while (i <= 2) {
_root["a7" + i] = String("i" + i);
Cookies = SharedObject.getLocal(_root["a7" + i], "/");
Cookies.data["ii" + i] = _root["medals" + i];
Cookies.flush(10);
i++;
}
frame.menu_btn.enabled = true;
}
function setAISemua() {
if (jenisPerang == "darat") {
if (tipeMaen == "pantai1") {
setAI1();
setAI3();
setAI5();
setAI6();
setAI7();
setAI8();
} else if (tipeMaen2 == "infanarti") {
setAI1();
setAI2();
setAI5();
setAI6();
setAI7();
setAI8();
} else if (tipeMaen2 == "infantry") {
setAI1();
setAI5();
setAI6();
setAI7();
setAI8();
} else if (tipeMaen2 == "artillery") {
setAI2();
setAI5();
setAI6();
setAI7();
setAI8();
} else {
setAI1();
setAI2();
setAI3();
setAI5();
setAI6();
setAI7();
setAI8();
}
} else if (jenisPerang == "laut") {
if (tipeMaen2 == "navy") {
setAI4();
} else {
setAI3();
setAI4();
}
} else if (jenisPerang == "udara") {
setAI3();
}
}
function enterPanah() {
if (xPause == false) {
if (panahAtas == true) {
if (jenisPerang == "laut") {
this._y = ((100 + (kePanah * 55)) + 25) - 60;
} else if (jenisPerang == "udara") {
this._y = ((100 + (kePanah * 65)) + 25) - 60;
} else {
this._y = ((225 + (kePanah * 35)) + 25) - 60;
}
} else if (panahBawah == true) {
if (jenisPerang == "laut") {
this._y = ((100 + (kePanah * 55)) + 25) - 60;
} else if (jenisPerang == "udara") {
this._y = ((100 + (kePanah * 65)) + 25) - 60;
} else {
this._y = ((225 + (kePanah * 35)) + 25) - 60;
}
}
}
}
function init() {
aiKomp = "easy";
money2 = 10000 + ((xlevel - 1) * 25);
if (tipeSulitCampaign == 4) {
money2 = money2 * 3;
} else if (tipeSulitCampaign == 3) {
money2 = money2 * 2;
} else if (tipeSulitCampaign == 2) {
money2 = money2 * 1;
} else if (tipeSulitCampaign == 1) {
money2 = money2 * 0.5;
}
naikBerapa = 110;
troopsKe = 0;
efekKe = 1;
dalamJagoan = 2000;
dalamBack = 99;
dalamRetak = 500;
if (jenisPerang == "laut") {
dalamBenteng1 = 990;
dalamBenteng2 = 991;
dalamPenjaga1 = 2751;
dalamPenjaga2 = 2851;
} else {
dalamBenteng1 = 35000;
dalamBenteng2 = 35001;
dalamPenjaga1 = 31101;
dalamPenjaga2 = 31201;
xdalamPenjaga1 = 38101;
xdalamPenjaga2 = 38201;
}
dalamAirCraft = 38150;
if (tipeSulitCampaign == 4) {
if (xlevel == 1) {
bykPasukan2 = 50;
} else if (xlevel <= 3) {
bykPasukan2 = 125;
} else if (xlevel <= 6) {
bykPasukan2 = 175;
} else if (xlevel <= 9) {
bykPasukan2 = 200;
} else if (xlevel <= 12) {
bykPasukan2 = 225;
} else if (xlevel <= 15) {
bykPasukan2 = 250;
} else if (xlevel <= 18) {
bykPasukan2 = 275;
} else if (xlevel <= 21) {
bykPasukan2 = 300;
} else if (xlevel <= 24) {
bykPasukan2 = 325;
} else if (xlevel <= 27) {
bykPasukan2 = 350;
} else if (xlevel >= 28) {
bykPasukan2 = 400;
}
} else if (tipeSulitCampaign == 3) {
if (xlevel == 1) {
bykPasukan2 = 50;
} else if (xlevel <= 3) {
bykPasukan2 = 100;
} else if (xlevel <= 6) {
bykPasukan2 = 150;
} else if (xlevel <= 9) {
bykPasukan2 = 175;
} else if (xlevel <= 12) {
bykPasukan2 = 200;
} else if (xlevel <= 15) {
bykPasukan2 = 225;
} else if (xlevel <= 18) {
bykPasukan2 = 250;
} else if (xlevel <= 21) {
bykPasukan2 = 275;
} else if (xlevel <= 24) {
bykPasukan2 = 300;
} else if (xlevel <= 27) {
bykPasukan2 = 350;
} else if (xlevel >= 28) {
bykPasukan2 = 400;
}
} else if (tipeSulitCampaign == 2) {
if (xlevel == 1) {
bykPasukan2 = 50;
} else if (xlevel <= 3) {
bykPasukan2 = 75;
} else if (xlevel <= 6) {
bykPasukan2 = 100;
} else if (xlevel <= 9) {
bykPasukan2 = 125;
} else if (xlevel <= 12) {
bykPasukan2 = 150;
} else if (xlevel <= 15) {
bykPasukan2 = 200;
} else if (xlevel <= 18) {
bykPasukan2 = 225;
} else if (xlevel <= 21) {
bykPasukan2 = 250;
} else if (xlevel <= 24) {
bykPasukan2 = 275;
} else if (xlevel <= 27) {
bykPasukan2 = 300;
} else if (xlevel >= 28) {
bykPasukan2 = 400;
}
} else if (xlevel == 1) {
bykPasukan2 = 50;
} else if (xlevel <= 3) {
bykPasukan2 = 75;
} else if (xlevel <= 6) {
bykPasukan2 = 100;
} else if (xlevel <= 9) {
bykPasukan2 = 125;
} else if (xlevel <= 12) {
bykPasukan2 = 150;
} else if (xlevel <= 15) {
bykPasukan2 = 175;
} else if (xlevel <= 18) {
bykPasukan2 = 200;
} else if (xlevel <= 21) {
bykPasukan2 = 225;
} else if (xlevel <= 24) {
bykPasukan2 = 250;
} else if (xlevel <= 27) {
bykPasukan2 = 300;
} else if (xlevel >= 28) {
bykPasukan2 = 400;
}
bykPasukan2 = Math.ceil(bykPasukan2 / 2);
dalamFrame = 45000;
dalamFrame2 = 45001;
dalamEfek = 36000;
dalamMisil = 36100;
dalamInfo = 47000;
dalamPanah = 47001;
dalamDrag = 47002;
dalamWin = 50002;
dalamLose = 50003;
dalamPecah = 15001;
dalamDeploy = 47009;
dalamMenu = 50004;
dalamTutorial = 50001;
dalamLese = 49000;
bykPasukan1 = 50 + (10 * (levelSkill[1] - 1));
jmlPasukan = bykPasukan1;
jmlPasukan2 = bykPasukan2;
totPasukan = jmlPasukan;
totPasukan2 = jmlPasukan2;
jmlPas = jmlPasukan;
bykKeluar1 = 0;
bykKeluar2 = 0;
if (jenisPerang == "laut") {
nyawaIstana1 = 3 * (3000 + (30000 * (levelSkill[2] - 1)));
if (xlevel >= 39) {
nyawaIstana2 = 8 * (2000 + ((xlevel - 1) * 35000));
} else if (xlevel >= 31) {
nyawaIstana2 = 7 * (2000 + ((xlevel - 1) * 25000));
} else if (xlevel >= 18) {
nyawaIstana2 = 6 * (2000 + ((xlevel - 1) * 15000));
} else {
nyawaIstana2 = 5 * (2000 + ((xlevel - 1) * 5000));
}
} else {
nyawaIstana1 = 3000 + (30000 * (levelSkill[2] - 1));
if (xlevel >= 39) {
nyawaIstana2 = 2000 + ((xlevel - 1) * 35000);
} else if (xlevel >= 31) {
nyawaIstana2 = 2000 + ((xlevel - 1) * 20000);
} else if (xlevel >= 18) {
nyawaIstana2 = 2000 + ((xlevel - 1) * 15000);
} else {
nyawaIstana2 = 2000 + ((xlevel - 1) * 5000);
}
}
if (jenisMaenan == "single") {
if (tipeSulitSingle == 1) {
nyawaIstana1 = nyawaIstana1 * 50;
nyawaIstana2 = nyawaIstana2 * 50;
} else if (tipeSulitSingle == 2) {
nyawaIstana1 = nyawaIstana1 * 100;
nyawaIstana2 = nyawaIstana2 * 100;
} else if (tipeSulitSingle == 3) {
nyawaIstana1 = nyawaIstana1 * 150;
nyawaIstana2 = nyawaIstana2 * 150;
} else if (tipeSulitSingle == 4) {
nyawaIstana1 = nyawaIstana1 * 200;
nyawaIstana2 = nyawaIstana2 * 200;
}
}
totIstana1 = nyawaIstana1;
totIstana2 = nyawaIstana2;
xjmlPasukan = jmlPasukan;
xjmlPasukan2 = jmlPasukan2;
tipeDrag = "strike";
jalanKanan = false;
jalanKiri = false;
panahAtas = false;
panahBawah = false;
sedangTekan = false;
sudahSelesai = false;
sedangPause = false;
sudahLese = false;
xPause = false;
kurangTambah = 10;
unitMati1 = 0;
unitMati2 = 0;
buildingsMati1 = 0;
buildingsMati2 = 0;
totDefense = 0;
munculArray = new Array();
arrayMasuk = new Array(10);
munculKe = 1;
if (jenisMaenan == "single") {
naikHarga2 = 6;
naikHarga = 6;
} else if (jenisPerang == "laut") {
naikHarga2 = 0.9;
naikHarga = 0.9;
} else if (jenisPerang == "udara") {
naikHarga2 = 1;
naikHarga = 1;
} else {
naikHarga2 = 1.1;
naikHarga = 1.1;
}
bunuhLawan = 0;
awalDrag = 1;
akhirDrag = 4;
i = 1;
while (i <= 9) {
_root["penjagaAda" + i] = false;
_root["xpenjagaAda" + i] = false;
i++;
}
if ((jenisMaenan == "single") || (tipeGame == "demo")) {
i = 1;
while (i <= bykJumlah) {
slotUnlok[i] = 1;
i++;
}
if (tipeSulitSingle == 1) {
xlevel = 5;
} else if (tipeSulitSingle == 2) {
xlevel = 10;
} else if (tipeSulitSingle == 3) {
xlevel = 15;
} else if (tipeSulitSingle == 4) {
xlevel = 20;
}
if (jenisPerang == "darat") {
money1 = 10000;
money2 = 10000;
} else if (jenisPerang == "laut") {
money1 = 30000;
money2 = 30000;
} else if (jenisPerang == "udara") {
money1 = 20000;
money2 = 20000;
}
bykPasukan1 = 1000;
bykPasukan2 = 1000;
jmlPasukan = bykPasukan1;
jmlPasukan2 = bykPasukan2;
totIstana1 = nyawaIstana1;
totIstana2 = nyawaIstana2;
xjmlPasukan = jmlPasukan;
xjmlPasukan2 = jmlPasukan2;
}
}
function buatBack() {
cekBackgrounds();
if (jenisPerang == "darat") {
if (jenisMaenan == "single") {
back = attachMovie("backDarat" + pilihanMap, "back", dalamBack);
jenisBack = pilihanMap;
} else {
back = attachMovie("backDarat" + bgGame, "back", dalamBack);
jenisBack = bgGame;
}
if (jenisBack <= 9) {
tipeMaen = "darat";
} else if (jenisBack == 10) {
tipeMaen = "pantai1";
} else if (jenisBack == 11) {
tipeMaen = "pantai2";
}
} else if (jenisPerang == "laut") {
if (jenisMaenan == "single") {
back = attachMovie("backLaut" + pilihanMap, "back", dalamBack);
jenisBack = pilihanMap;
tipeMaen = "laut";
adaBenteng1 = true;
adaBenteng2 = true;
} else {
back = attachMovie("backLaut" + bgGame, "back", dalamBack);
jenisBack = bgGame;
tipeMaen = "laut";
adaBenteng1 = true;
adaBenteng2 = true;
}
} else if (jenisPerang == "udara") {
if (jenisMaenan == "single") {
back = attachMovie("backUdara" + pilihanMap, "back", dalamBack);
jenisBack = pilihanMap;
tipeMaen = "udara";
adaBenteng1 = false;
adaBenteng2 = false;
} else {
back = attachMovie("backUdara" + bgGame, "back", dalamBack);
jenisBack = bgGame;
tipeMaen = "udara";
adaBenteng1 = false;
adaBenteng2 = false;
}
}
back._x = 0;
back._y = 100;
back._y = back._y - naikBerapa;
}
function cekBackgrounds() {
bgGame = xbgGame;
}
function buatDeploy() {
deploy = attachMovie("deploy_mc", "deploy_mc", dalamDeploy);
deploy._x = back._x + 670;
deploy._y = 355;
deploy._visible = false;
deploy.onRelease = function () {
totDefense = 15;
};
}
function buatFrame() {
frame = attachMovie("frame_mc", "frame_mc", dalamFrame);
frame._x = 400;
frame._y = 445;
frame.info_mc.informasi = "";
tipeJenis = 1;
i = 1;
while (i <= banyakJenis) {
frame["tipe" + i].onRelease = klikTipe;
frame["tipe" + i].onRollOver = overTipe;
frame["tipe" + i].onRollOut = (frame["tipe" + i].onReleaseOutside = outTipe);
frame["tipe" + i].gotoAndStop(1);
frame["tipe" + i].enabled = true;
i++;
}
frame.menu_btn.onRelease = cekPause;
frame["tipe" + tipeJenis].gotoAndStop(3);
frame["tipe" + tipeJenis].enabled = false;
frame.onEnterFrame = xenterFrame;
i = 1;
while (i <= bykJumlah) {
if (slotUnlok[i] == 1) {
frame["frame" + i].sedangUnlok = false;
} else {
frame["frame" + i].sedangUnlok = true;
}
i++;
}
if (tipeMaen == "darat") {
if (tipeMaen2 == "artillery") {
tipeJenis = 2;
} else {
tipeJenis = 1;
}
i = 1;
while (i <= banyakJenis) {
frame["tipe" + i].gotoAndStop(1);
frame["tipe" + i].enabled = true;
i++;
}
frame["tipe" + tipeJenis].gotoAndStop(3);
frame["tipe" + tipeJenis].enabled = false;
} else if (tipeMaen == "pantai1") {
tipeJenis = 1;
i = 1;
while (i <= banyakJenis) {
frame["tipe" + i].gotoAndStop(1);
frame["tipe" + i].enabled = true;
i++;
}
frame["tipe" + tipeJenis].gotoAndStop(3);
frame["tipe" + tipeJenis].enabled = false;
} else if (tipeMaen == "pantai2") {
tipeJenis = 1;
i = 1;
while (i <= banyakJenis) {
frame["tipe" + i].gotoAndStop(1);
frame["tipe" + i].enabled = true;
i++;
}
frame["tipe" + tipeJenis].gotoAndStop(3);
frame["tipe" + tipeJenis].enabled = false;
} else if (tipeMaen == "laut") {
tipeJenis = 4;
i = 1;
while (i <= banyakJenis) {
frame["tipe" + i].gotoAndStop(1);
frame["tipe" + i].enabled = true;
i++;
}
frame["tipe" + tipeJenis].gotoAndStop(3);
frame["tipe" + tipeJenis].enabled = false;
} else if (tipeMaen == "udara") {
tipeJenis = 3;
i = 1;
while (i <= banyakJenis) {
frame["tipe" + i].gotoAndStop(1);
frame["tipe" + i].enabled = true;
i++;
}
frame["tipe" + tipeJenis].gotoAndStop(3);
frame["tipe" + tipeJenis].enabled = false;
}
cekFrame();
}
function cekPause() {
if (xPause == false) {
xPause = true;
i = 0;
while (i <= semuaPasukan) {
if (_root["chara" + i].live > 0) {
_root["chara" + i].anim.stop();
if (_root["chara" + i]._currentframe == 1) {
if (_root["chara" + i].penjaga != true) {
_root["chara" + i].gotoAndStop(4);
}
}
}
i++;
}
i = 1;
while (i <= 9) {
frame["tipe" + i].enabled = false;
i++;
}
i = 0;
while (i <= semuaPasukan) {
frame["frame" + i].enabled = false;
if (frame["frame" + i]._currentframe > 1) {
frame["frame" + i].stop();
}
i++;
}
menu = attachMovie("menu_mc", "menu_mc", dalamMenu);
menu._x = 400;
menu._y = 200;
menu.back_btn.onRelease = function () {
cekPausex();
};
menu.surrender_btn.onRelease = function () {
sudahSelesai = false;
cekPausex();
cekLese("Mission aborted!");
cekLose();
benteng1.live = 0;
benteng1.bar_mc.bar._xscale = Math.ceil((benteng1.live / benteng1.totLive) * 100);
frame_mc.base1 = Math.ceil(benteng1.live);
frame_mc.base1 = 0;
i = 1;
while (i <= 9) {
_root["penjaga" + i].live = 0;
_root["penjaga" + i].xjatuh = true;
_root["penjaga" + i].wspeed = 10;
i++;
}
benteng1.bentengx.gotoAndStop(2);
benteng1.bar_mc.bar._xscale = 0;
};
} else if (xPause == true) {
cekPausex();
}
}
function cekPausex() {
removeMovieClip(menu);
xPause = false;
i = 0;
while (i <= semuaPasukan) {
if (_root["chara" + i].live > 0) {
_root["chara" + i].anim.play();
if (_root["chara" + i]._currentframe == 4) {
if (_root["chara" + i].penjaga != true) {
_root["chara" + i].gotoAndStop(1);
}
}
}
i++;
}
i = 1;
while (i <= 9) {
if (frame["tipe" + i]._alpha == 100) {
frame["tipe" + i].enabled = true;
}
i++;
}
i = 1;
while (i <= 52) {
frame["frame" + i].enabled = true;
if (frame["frame" + i]._currentframe > 1) {
if (frame["frame" + i].sudahJadi == true) {
} else {
frame["frame" + i].play();
}
}
i++;
}
}
function cekFrame() {
i = 1;
while (i <= bykJumlah) {
frame["frame" + i]._visible = false;
frame["gembok" + i]._visible = false;
frame["harga" + i] = "";
i++;
}
i = 1;
while (i <= bykJumlah) {
if (frame["frame" + i].sedangUnlok == true) {
if ((tipeJenis == 1) && (i <= 9)) {
cekBisa2();
} else if (((tipeJenis == 2) && (i >= 10)) && (i <= 17)) {
cekBisa2();
} else if (((tipeJenis == 3) && (i >= 18)) && (i <= 25)) {
cekBisa2();
} else if (((tipeJenis == 4) && (i >= 26)) && (i <= 30)) {
cekBisa2();
} else if (((tipeJenis == 5) && (i >= 31)) && (i <= 33)) {
cekBisa2();
} else if (((tipeJenis == 6) && (i >= 34)) && (i <= 37)) {
cekBisa2();
} else if (((tipeJenis == 7) && (i >= 38)) && (i <= 42)) {
cekBisa2();
} else if (((tipeJenis == 8) && (i >= 43)) && (i <= 46)) {
cekBisa2();
} else if (((tipeJenis == 9) && (i >= 47)) && (i <= 50)) {
cekBisa2();
}
} else if ((tipeJenis == 1) && (i <= 9)) {
cekBisa();
} else if (((tipeJenis == 2) && (i >= 10)) && (i <= 17)) {
cekBisa();
} else if (((tipeJenis == 3) && (i >= 18)) && (i <= 25)) {
cekBisa();
} else if (((tipeJenis == 4) && (i >= 26)) && (i <= 30)) {
cekBisa();
} else if (((tipeJenis == 5) && (i >= 31)) && (i <= 33)) {
cekBisa();
} else if (((tipeJenis == 6) && (i >= 34)) && (i <= 37)) {
cekBisa();
} else if (((tipeJenis == 7) && (i >= 38)) && (i <= 42)) {
cekBisa();
} else if (((tipeJenis == 8) && (i >= 43)) && (i <= 46)) {
cekBisa();
} else if (((tipeJenis == 9) && (i >= 47)) && (i <= 50)) {
if (i == 47) {
if ((jenisPerang == "darat") && (tipeMaen != "pantai1")) {
if (tipeMaen2 == "artillery") {
cekBisa2();
} else {
cekBisa();
}
} else if ((jenisPerang == "darat") && (tipeMaen2 == "infantry")) {
cekBisa();
} else {
cekBisa2();
}
} else if (i == 48) {
if (jenisPerang2 == "pantai") {
cekBisa2();
} else if ((jenisPerang == "darat") && (tipeMaen != "pantai1")) {
if (tipeMaen2 == "infantry") {
cekBisa2();
} else {
cekBisa();
}
} else if ((jenisPerang == "darat") && (tipeMaen2 == "artillery")) {
cekBisa();
} else {
cekBisa2();
}
} else if (i == 49) {
if ((jenisPerang == "laut") && (tipeMaen2 == "navy")) {
cekBisa2();
} else if ((jenisPerang == "darat") && (tipeMaen2 == "")) {
cekBisa();
} else if ((jenisPerang == "laut") && (tipeMaen2 == "")) {
cekBisa();
} else if (jenisPerang == "udara") {
cekBisa();
} else if (jenisPerang2 == "pantai") {
cekBisa();
} else {
cekBisa2();
}
} else if (i == 50) {
if (jenisPerang == "laut") {
cekBisa();
} else {
cekBisa2();
}
} else {
cekBisa();
}
}
i++;
}
if (tipeMaen == "darat") {
if (tipeMaen2 == "infanarti") {
frame.tipe3.enabled = false;
frame.tipe4.enabled = false;
frame.tipe3._alpha = 50;
frame.tipe4._alpha = 50;
} else if (tipeMaen2 == "infantry") {
frame.tipe2.enabled = false;
frame.tipe3.enabled = false;
frame.tipe4.enabled = false;
frame.tipe2._alpha = 50;
frame.tipe3._alpha = 50;
frame.tipe4._alpha = 50;
} else if (tipeMaen2 == "artillery") {
frame.tipe1.enabled = false;
frame.tipe3.enabled = false;
frame.tipe4.enabled = false;
frame.tipe1._alpha = 50;
frame.tipe3._alpha = 50;
frame.tipe4._alpha = 50;
} else {
frame.tipe4.enabled = false;
frame.tipe4._alpha = 50;
}
} else if (tipeMaen == "pantai1") {
frame.tipe2.enabled = false;
frame.tipe4.enabled = false;
frame.tipe5.enabled = false;
frame.tipe6.enabled = false;
frame.tipe7.enabled = false;
frame.tipe2._alpha = 50;
frame.tipe4._alpha = 50;
frame.tipe5._alpha = 50;
frame.tipe6._alpha = 50;
frame.tipe7._alpha = 50;
} else if (tipeMaen == "pantai2") {
frame.tipe2.enabled = false;
frame.tipe4.enabled = false;
frame.tipe5.enabled = false;
frame.tipe6.enabled = false;
frame.tipe7.enabled = false;
frame.tipe2._alpha = 50;
frame.tipe4._alpha = 50;
frame.tipe5._alpha = 50;
frame.tipe6._alpha = 50;
frame.tipe7._alpha = 50;
} else if (tipeMaen == "laut") {
if (tipeMaen2 == "navy") {
frame.tipe1.enabled = false;
frame.tipe2.enabled = false;
frame.tipe3.enabled = false;
frame.tipe5.enabled = false;
frame.tipe6.enabled = false;
frame.tipe7.enabled = false;
frame.tipe1._alpha = 50;
frame.tipe2._alpha = 50;
frame.tipe3._alpha = 50;
frame.tipe5._alpha = 50;
frame.tipe6._alpha = 50;
frame.tipe7._alpha = 50;
} else {
frame.tipe1.enabled = false;
frame.tipe2.enabled = false;
frame.tipe5.enabled = false;
frame.tipe6.enabled = false;
frame.tipe7.enabled = false;
frame.tipe1._alpha = 50;
frame.tipe2._alpha = 50;
frame.tipe5._alpha = 50;
frame.tipe6._alpha = 50;
frame.tipe7._alpha = 50;
}
} else if (tipeMaen == "udara") {
frame.tipe1.enabled = false;
frame.tipe2.enabled = false;
frame.tipe4.enabled = false;
frame.tipe5.enabled = false;
frame.tipe6.enabled = false;
frame.tipe7.enabled = false;
frame.tipe1._alpha = 50;
frame.tipe2._alpha = 50;
frame.tipe4._alpha = 50;
frame.tipe5._alpha = 50;
frame.tipe6._alpha = 50;
frame.tipe7._alpha = 50;
}
}
function cekHarga(zpilihJenis) {
if (zpilihJenis <= 9) {
hargaKe = Math.ceil(daftarHarga[zpilihJenis] / levelSkill[7]);
} else if (zpilihJenis <= 17) {
hargaKe = Math.ceil(daftarHarga[zpilihJenis] / levelSkill[8]);
} else if (zpilihJenis <= 25) {
hargaKe = Math.ceil(daftarHarga[zpilihJenis] / levelSkill[9]);
} else if (zpilihJenis <= 30) {
hargaKe = Math.ceil(daftarHarga[zpilihJenis] / levelSkill[10]);
} else if (zpilihJenis <= 37) {
hargaKe = Math.ceil(daftarHarga[zpilihJenis] / levelSkill[11]);
} else if (zpilihJenis <= 42) {
hargaKe = Math.ceil(daftarHarga[zpilihJenis] / levelSkill[12]);
} else if (zpilihJenis >= 43) {
hargaKe = Math.ceil(daftarHarga[zpilihJenis] / levelSkill[13]);
}
}
function cekBisa() {
if (slotUnlok[i] == 1) {
cekHarga(i);
frame["harga" + i] = hargaKe;
} else {
frame["harga" + i] = "";
}
frame["frame" + i].onRelease = klikFrame;
frame["frame" + i].onRollOver = overFrame;
frame["frame" + i].onRollOut = (frame["frame" + i].onReleaseOutside = outFrame);
frame["gembok" + i]._visible = false;
frame["frame" + i]._visible = true;
}
function cekBisa2() {
if (slotUnlok[i] == 1) {
cekHarga(i);
frame["harga" + i] = hargaKe;
} else {
frame["harga" + i] = "";
}
frame["gembok" + i]._visible = true;
frame["frame" + i]._visible = true;
}
function klikTipe(indi) {
if (indi != undefined) {
xindi = indi;
} else {
myStr = new String(this);
xindi = Number(myStr.substr(myStr.length - 1, 1));
}
tipeJenis = xindi;
i = 1;
while (i <= banyakJenis) {
frame["tipe" + i].gotoAndStop(1);
frame["tipe" + i].enabled = true;
i++;
}
frame["tipe" + tipeJenis].gotoAndStop(3);
frame["tipe" + tipeJenis].enabled = false;
cekFrame();
}
function overTipe() {
this.gotoAndStop(2);
}
function outTipe() {
this.gotoAndStop(1);
}
function buatFrame2() {
frame = attachMovie("frame_mc2", "frame_mc", dalamFrame2);
frame._x = 400;
frame._y = 445;
frame.onEnterFrame = xenterFrame;
}
function xenterFrame() {
if (xPause == false) {
this.money1 = money1;
this.money2 = money2;
this.xexp = xexp;
if (jenisMaenan == "single") {
this.xlevelx = "Single Mode";
} else {
this.xlevelx = "Level " + xlevel;
}
}
}
function xenterFrame2() {
if (xPause == false) {
this.money1 = money1;
this.money2 = money2;
}
}
function klikFrame() {
myStr = new String(this);
if (myStr.length == 24) {
xindi = Number(myStr.substr(myStr.length - 2, 2));
} else {
xindi = Number(myStr.substr(myStr.length - 1, 1));
}
if (xindi <= 9) {
xbykJumlah1 = 1;
xbykJumlah2 = 9;
} else if (xindi <= 17) {
xbykJumlah1 = 10;
xbykJumlah2 = 17;
} else if (xindi <= 25) {
xbykJumlah1 = 18;
xbykJumlah2 = 25;
} else if (xindi <= 30) {
xbykJumlah1 = 26;
xbykJumlah2 = 30;
} else if (xindi <= 33) {
xbykJumlah1 = 31;
xbykJumlah2 = 33;
} else if (xindi <= 37) {
xbykJumlah1 = 34;
xbykJumlah2 = 37;
} else if (xindi <= 42) {
xbykJumlah1 = 38;
xbykJumlah2 = 42;
} else if (xindi <= 46) {
xbykJumlah1 = 43;
xbykJumlah2 = 46;
} else if (xindi <= 50) {
xbykJumlah1 = 47;
xbykJumlah2 = 50;
}
if (xindi <= 9) {
zsetTot = 4;
} else if (xindi <= 14) {
zsetTot = 2;
} else if (xindi == 26) {
zsetTot = 3;
} else if (xindi == 27) {
zsetTot = 2;
} else if (xindi == 47) {
zsetTot = 4;
} else {
zsetTot = 1;
}
if (xjmlPasukan <= zsetTot) {
zsetTot = xjmlPasukan;
}
zsetTot = zsetTot - 1;
if (this._currentframe == 1) {
cekHarga(xindi);
if (money1 >= hargaKe) {
if ((xindi >= 31) && (xindi <= 46)) {
money1 = money1 - hargaKe;
this.gotoAndPlay(2);
if (jenisPerang == "udara") {
if (xindi >= 31) {
i = xbykJumlah1;
while (i <= xbykJumlah2) {
if (slotUnlok[i] == 1) {
frame["frame" + i].sedangUnlok = true;
frame["frame" + i].enabled = false;
frame["gembok" + i]._visible = true;
}
i++;
}
}
} else if (tipeMaen2 == "navy") {
if (xindi >= 31) {
i = xbykJumlah1;
while (i <= xbykJumlah2) {
if (slotUnlok[i] == 1) {
frame["frame" + i].sedangUnlok = true;
frame["frame" + i].enabled = false;
frame["gembok" + i]._visible = true;
}
i++;
}
}
} else if (tipeMaen2 == "infantry") {
if (xindi >= 31) {
i = xbykJumlah1;
while (i <= xbykJumlah2) {
if (slotUnlok[i] == 1) {
frame["frame" + i].sedangUnlok = true;
frame["frame" + i].enabled = false;
frame["gembok" + i]._visible = true;
}
i++;
}
}
} else if (tipeMaen2 == "artillery") {
if (xindi >= 31) {
i = xbykJumlah1;
while (i <= xbykJumlah2) {
if (slotUnlok[i] == 1) {
frame["frame" + i].sedangUnlok = true;
frame["frame" + i].enabled = false;
frame["gembok" + i]._visible = true;
}
i++;
}
}
} else {
i = xbykJumlah1;
while (i <= xbykJumlah2) {
if (slotUnlok[i] == 1) {
frame["frame" + i].sedangUnlok = true;
frame["frame" + i].enabled = false;
frame["gembok" + i]._visible = true;
}
i++;
}
}
this.enabled = true;
this.panah = kePanah;
frame["frame" + xindi].sedangUnlok = false;
frame["gembok" + xindi]._visible = false;
removeMovieClip(infoBox);
frame.info_mc.gotoAndStop(1);
frame.info_mc.informasi = "";
} else if (xjmlPasukan >= (zsetTot + 1)) {
if (bykKeluar1 < (bykBuatChara - zsetTot)) {
money1 = money1 - hargaKe;
this.gotoAndPlay(2);
if (jenisPerang == "udara") {
if (xindi >= 31) {
i = xbykJumlah1;
while (i <= xbykJumlah2) {
if (slotUnlok[i] == 1) {
frame["frame" + i].sedangUnlok = true;
frame["frame" + i].enabled = false;
frame["gembok" + i]._visible = true;
}
i++;
}
}
} else if (tipeMaen2 == "navy") {
if (xindi >= 31) {
i = xbykJumlah1;
while (i <= xbykJumlah2) {
if (slotUnlok[i] == 1) {
frame["frame" + i].sedangUnlok = true;
frame["frame" + i].enabled = false;
frame["gembok" + i]._visible = true;
}
i++;
}
}
} else if (tipeMaen2 == "infantry") {
if (xindi >= 31) {
i = xbykJumlah1;
while (i <= xbykJumlah2) {
if (slotUnlok[i] == 1) {
frame["frame" + i].sedangUnlok = true;
frame["frame" + i].enabled = false;
frame["gembok" + i]._visible = true;
}
i++;
}
}
} else if (tipeMaen2 == "artillery") {
if (xindi >= 31) {
i = xbykJumlah1;
while (i <= xbykJumlah2) {
if (slotUnlok[i] == 1) {
frame["frame" + i].sedangUnlok = true;
frame["frame" + i].enabled = false;
frame["gembok" + i]._visible = true;
}
i++;
}
}
} else {
i = xbykJumlah1;
while (i <= xbykJumlah2) {
if (slotUnlok[i] == 1) {
frame["frame" + i].sedangUnlok = true;
frame["frame" + i].enabled = false;
frame["gembok" + i]._visible = true;
}
i++;
}
}
this.enabled = true;
this.panah = kePanah;
frame["frame" + xindi].sedangUnlok = false;
frame["gembok" + xindi]._visible = false;
removeMovieClip(infoBox);
frame.info_mc.gotoAndStop(1);
frame.info_mc.informasi = "";
} else {
frame.info_mc.gotoAndPlay(2);
frame.info_mc.informasi = ("Can't create any unit, maximum " + bykBuatChara) + " units";
}
} else {
frame.info_mc.gotoAndPlay(2);
frame.info_mc.informasi = "Can't create any unit, not enough unit.";
}
} else {
frame.info_mc.gotoAndPlay(2);
frame.info_mc.informasi = "Can't create unit, not enough funds.";
}
} else if (this.sudahJadi == true) {
this.klik_mc._visible = false;
if (xindi == 38) {
jenisDrag = 2;
} else if (xindi == 39) {
jenisDrag = 3;
} else if (xindi == 40) {
jenisDrag = 5;
} else if (xindi == 41) {
jenisDrag = 7;
} else if (xindi == 42) {
jenisDrag = 8;
} else if (xindi == 31) {
jenisDrag = 9;
} else if (xindi == 32) {
jenisDrag = 10;
} else if (xindi == 33) {
jenisDrag = 11;
} else if (xindi == 34) {
jenisDrag = 12;
} else if (xindi == 35) {
jenisDrag = 13;
} else if (xindi == 36) {
jenisDrag = 14;
} else if (xindi == 37) {
jenisDrag = 15;
}
if (xindi <= 33) {
awalDrag = 5;
akhirDrag = 7;
} else if (xindi <= 37) {
awalDrag = 8;
akhirDrag = 9;
} else {
awalDrag = 1;
akhirDrag = 4;
}
if (xindi >= 43) {
drag = attachMovie("kekeran_mc", "zdrag_mc", dalamDrag);
if (xindi == 43) {
drag.tipeMisil = 1;
} else if (xindi == 44) {
drag.tipeMisil = 2;
} else if (xindi == 45) {
drag.tipeMisil = 3;
} else if (xindi == 46) {
drag.tipeMisil = 4;
}
drag.jenisMisil = xindi;
tipeDrag = "strike";
} else {
drag = attachMovie(("troops" + jenisDrag) + "x", "zdrag_mc", dalamDrag);
tipeDrag = "troops";
}
drag._x = -500;
drag._y = -500;
drag.jenisDrag = jenisDrag;
drag.indi = this;
startDrag (drag, true);
drag.onEnterFrame = enterDrag;
if (tipeDrag == "troops") {
i = awalDrag;
while (i <= akhirDrag) {
if (_root["penjagaAda" + i] == false) {
benteng1["tanda" + i]._visible = true;
}
i++;
}
}
} else if (tekanCtrl == true) {
cekHarga(xindi);
money1 = money1 + hargaKe;
this.gotoAndPlay(1);
i = xbykJumlah1;
while (i <= xbykJumlah2) {
if (slotUnlok[i] == 1) {
if ((i == 47) || (i == 48)) {
if ((jenisPerang == "darat") && (tipeMaen != "pantai1")) {
if (i == 47) {
if (tipeMaen2 != "artillery") {
frame["frame" + i].sedangUnlok = false;
frame["frame" + i].enabled = true;
frame["gembok" + i]._visible = false;
}
} else if (i == 48) {
if (tipeMaen2 != "infantry") {
frame["frame" + i].sedangUnlok = false;
frame["frame" + i].enabled = true;
frame["gembok" + i]._visible = false;
}
}
}
} else if (i == 50) {
if (jenisPerang == "laut") {
frame["frame" + i].sedangUnlok = false;
frame["frame" + i].enabled = true;
frame["gembok" + i]._visible = false;
}
} else if (i == 49) {
if (tipeMaen2 == "") {
frame["frame" + i].sedangUnlok = false;
frame["frame" + i].enabled = true;
frame["gembok" + i]._visible = false;
}
} else {
frame["frame" + i].sedangUnlok = false;
frame["frame" + i].enabled = true;
frame["gembok" + i]._visible = false;
}
}
i++;
}
}
}
function enterDrag() {
if (this._y >= 350) {
this._alpha = 50;
} else {
this._alpha = 100;
}
}
function cekMisilStrike(indi, indi2, posX, posY) {
bykMisil = 0;
if (indi2 == 43) {
bykMisil = 4;
} else if (indi2 == 44) {
bykMisil = 5;
} else if (indi2 == 45) {
bykMisil = 6;
} else if (indi2 == 46) {
bykMisil = 7;
}
i = 1;
while (i <= bykMisil) {
chara = attachMovie("misil" + indi, "misil_mc" + dalamMisil, dalamMisil);
chara._x = (posX - 2000) - random(i * 250);
chara._y = ((posY - 1250) - random(250)) - (i * 500);
chara.jenis = indi2;
cekCharaAtribut();
if (jenisPerang == "darat") {
chara._xscale = (chara._yscale = 60);
chara.speedPlus = 0.75;
} else {
chara._xscale = (chara._yscale = 40);
chara.speedPlus = 0.5;
}
chara.xtargetX = (((Math.abs(back._x) + posX) + 100) + random(100)) - 200;
chara.xtargetY = ((posY + 100) + random(40)) - 80;
x1 = chara._x - chara.xtargetX;
y1 = chara._y - chara.xtargetY;
sudut = 57.29578 * Math.atan(y1 / x1);
if (((sudut >= -90) && (sudut <= 90)) && (x1 >= 0)) {
chara._rotation = sudut + 180;
} else {
chara._rotation = sudut;
}
chara.onEnterFrame = enterMisil;
dalamMisil++;
if (dalamMisil > 36150) {
dalamMisil = 36100;
}
i++;
}
}
function enterMisil() {
this.aimX = back._x + this.xtargetX;
this.aimY = this.xtargetY;
deltaX = this._x - this.aimX;
deltaY = this._y - this.aimY;
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 {
this.gotoAndStop(2);
i = 1;
while (i <= arrayMasuk.length) {
if (_root["chara" + arrayMasuk[i]].indi.hitTest(this.radius)) {
if (_root["chara" + arrayMasuk[i]] != undefined) {
_root["chara" + arrayMasuk[i]].live = _root["chara" + arrayMasuk[i]].live - this.damage;
if (_root["chara" + arrayMasuk[i]].benteng1 == true) {
money1 = money1 + Math.ceil(this.damage / kurangTambah);
money2 = money2 + Math.ceil(this.damage / (kurangTambah * 2));
} else if (_root["chara" + arrayMasuk[i]].benteng2 == true) {
money2 = money2 + Math.ceil(this.damage / kurangTambah);
money1 = money1 + Math.ceil(this.damage / (kurangTambah * 2));
}
}
} else if (_root["chara" + arrayMasuk[i]].hitTest(this.radius)) {
if (_root["chara" + arrayMasuk[i]] != undefined) {
_root["chara" + arrayMasuk[i]].live = _root["chara" + arrayMasuk[i]].live - this.damage;
if (_root["chara" + arrayMasuk[i]].benteng1 == true) {
money1 = money1 + Math.ceil(this.damage / kurangTambah);
money2 = money2 + Math.ceil(this.damage / (kurangTambah * 2));
} else if (_root["chara" + arrayMasuk[i]].benteng2 == true) {
money2 = money2 + Math.ceil(this.damage / kurangTambah);
money1 = money1 + Math.ceil(this.damage / (kurangTambah * 2));
}
}
}
i++;
}
grand = new Array(3, 7, 9);
grandom = random(3);
cekEfek(this, grand[grandom], "gila");
cekEfek(this, grand[grandom], "gila");
removeMovieClip(this);
}
}
function overFrame() {
myStr = new String(this);
if (myStr.length == 24) {
zpilihJenis = myStr.substr(myStr.length - 2, 2);
} else {
zpilihJenis = myStr.substr(myStr.length - 1, 1);
}
this._alpha = 50;
infoBox = attachMovie("info_box", "info_box", dalamInfo);
if ((this.sudahJadi == true) || (this._currentframe > 1)) {
infoBox._alpha = 0;
} else {
infoBox._alpha = -200;
}
infoBox._x = _root._xmouse;
infoBox._y = _root._ymouse - 75;
infoBox.judul = daftarNama[zpilihJenis];
cekLevelKe(zpilihJenis);
liveNaik = Math.ceil(levelKe1 * daftarLive[zpilihJenis]);
rangeNaik = Math.ceil(levelKe2 * daftarRange[zpilihJenis]);
speedNaik = Math.ceil(levelKe3 * daftarSpeed[zpilihJenis]);
damageNaik = Math.ceil(levelKe4 * daftarDamage[zpilihJenis]);
if (this.sudahJadi == true) {
if ((zpilihJenis >= 43) && (zpilihJenis <= 46)) {
infoBox.isi = "Click on the select the target. Press CTRL and click anywhere to cancel.";
} else {
infoBox.isi = "Click and move to red sign. Press CTRL and click anywhere to cancel.";
}
} else if (this._currentframe == 1) {
infoBox.isi = (((((("Life: " + liveNaik) + ", Range: ") + rangeNaik) + ", Speed: ") + speedNaik) + ",\nDamage: ") + damageNaik;
} else {
infoBox.isi = "Press CTRL and click here to cancel.";
}
infoBox.onEnterFrame = enterInfo;
}
function outFrame() {
this._alpha = 100;
removeMovieClip(infoBox);
}
function enterInfo() {
if (xPause == false) {
this._x = _root._xmouse;
this._y = _root._ymouse - 75;
if (infoBox._x <= 75) {
infoBox._x = 75;
}
if (this._alpha <= 100) {
this._alpha = this._alpha + 10;
}
}
}
function cekComplete(indi) {
if (xPause == false) {
myStr = new String(indi);
if (myStr.length == 24) {
indi.pilihJenis = Number(myStr.substr(myStr.length - 2, 2));
} else {
indi.pilihJenis = Number(myStr.substr(myStr.length - 1, 1));
}
if (indi.pilihJenis <= 9) {
xbykJumlah1 = 1;
xbykJumlah2 = 9;
} else if (indi.pilihJenis <= 17) {
xbykJumlah1 = 10;
xbykJumlah2 = 17;
} else if (indi.pilihJenis <= 25) {
xbykJumlah1 = 18;
xbykJumlah2 = 25;
} else if (indi.pilihJenis <= 30) {
xbykJumlah1 = 26;
xbykJumlah2 = 30;
} else if (indi.pilihJenis <= 33) {
xbykJumlah1 = 31;
xbykJumlah2 = 33;
} else if (indi.pilihJenis <= 37) {
xbykJumlah1 = 34;
xbykJumlah2 = 37;
} else if (indi.pilihJenis <= 42) {
xbykJumlah1 = 38;
xbykJumlah2 = 42;
} else if (indi.pilihJenis <= 46) {
xbykJumlah1 = 43;
xbykJumlah2 = 46;
} else if (indi.pilihJenis <= 50) {
xbykJumlah1 = 47;
xbykJumlah2 = 50;
}
i = xbykJumlah1;
while (i <= xbykJumlah2) {
if (slotUnlok[i] == 1) {
if ((i == 47) || (i == 48)) {
if ((jenisPerang == "darat") && (tipeMaen != "pantai1")) {
if (i == 47) {
if (tipeMaen2 != "artillery") {
frame["frame" + i].sedangUnlok = false;
frame["frame" + i].enabled = true;
frame["gembok" + i]._visible = false;
}
} else if (i == 48) {
if (tipeMaen2 != "infantry") {
frame["frame" + i].sedangUnlok = false;
frame["frame" + i].enabled = true;
frame["gembok" + i]._visible = false;
}
}
}
} else if (i == 50) {
if (jenisPerang == "laut") {
frame["frame" + i].sedangUnlok = false;
frame["frame" + i].enabled = true;
frame["gembok" + i]._visible = false;
}
} else if (i == 49) {
if (tipeMaen2 == "") {
frame["frame" + i].sedangUnlok = false;
frame["frame" + i].enabled = true;
frame["gembok" + i]._visible = false;
}
} else {
frame["frame" + i].sedangUnlok = false;
frame["frame" + i].enabled = true;
frame["gembok" + i]._visible = false;
}
}
i++;
}
if ((indi.pilihJenis >= 31) && (indi.pilihJenis <= 46)) {
indi.sudahJadi = true;
} else if (indi.pilihJenis == 47) {
buatAirCraft();
} else {
indi.munculKe = indi.panah;
buatJagoan(indi.pilihJenis, indi.munculKe);
}
}
}
function buatAirCraft() {
aircraft = attachMovie("aircraft", "aircraft", dalamAirCraft);
aircraft._x = benteng1._x - 300;
aircraft._y = 50;
aircraft._xscale = (aircraft._yscale = 70);
aircraft.speed = 10;
aircraft.sekaliMuncul = false;
aircraft.onEnterFrame = enterAirCraft;
}
function enterAirCraft() {
this._x = this._x + this.speed;
if (this._x >= (benteng1._x + 650)) {
if (this.sekaliMuncul == false) {
buatJagoan(47, "", this._x, this._y);
this.sekaliMuncul = true;
}
}
if (this._x >= (benteng1._x + 2000)) {
removeMovieClip(this);
}
}
function enterIstana1() {
if (xPause == false) {
this.bar_mc.bar._xscale = Math.ceil((this.live / this.totLive) * 100);
frame_mc.base1 = Math.ceil(this.live);
if (frame_mc.base1 <= 0) {
frame_mc.base1 = 0;
}
if ((tipeMaen == "pantai1") || (jenisPerang == "udara")) {
this.live = totIstana1;
this.bar_mc.bar._xscale = Math.ceil((this.live / this.totLive) * 100);
frame_mc.base1 = "No Base";
this._visible = false;
} else if ((this.bar_mc.bar._xscale <= 0) || (frame_mc.base1 <= 0)) {
if (this.bentengx._currentframe == 1) {
this.bar_mc.bar._xscale = 0;
i = 1;
while (i <= 9) {
_root["penjaga" + i].live = 0;
_root["penjaga" + i].xjatuh = true;
_root["penjaga" + i].wspeed = 10;
i++;
}
}
this.bentengx.gotoAndStop(2);
this.bar_mc.bar._xscale = 0;
cekLese("Your base destroyed, mission failed!");
cekLose();
}
}
}
function enterIstana2() {
if (xPause == false) {
this.bar_mc.bar._xscale = Math.ceil((this.live / this.totLive) * 100);
frame_mc.base2 = Math.ceil(this.live);
if (frame_mc.base2 <= 0) {
frame_mc.base2 = 0;
}
if (jenisPerang == "udara") {
this.live = totIstana2;
this.bar_mc.bar._xscale = Math.ceil((this.live / this.totLive) * 100);
frame_mc.base2 = "No Base";
this._visible = false;
} else if ((this.bar_mc.bar._xscale <= 0) || (frame_mc.base2 <= 1)) {
if (this.bentengx._currentframe == 1) {
this.bar_mc.bar._xscale = 0;
i = 1;
while (i <= 9) {
_root["xpenjaga" + i].live = 0;
_root["xpenjaga" + i].xjatuh = true;
_root["xpenjaga" + i].wspeed = 10;
i++;
}
}
this.bentengx.gotoAndStop(2);
this.bar_mc.bar._xscale = 0;
cekLese("Enemy base destroyed, mission accomplished!");
cekWin();
}
}
}
function buatPenjaga1(indi, indi2) {
i = indi;
randJagoan = indi2;
if (randJagoan <= 8) {
chara = attachMovie("btroops" + randJagoan, "chara" + (1 + i), dalamPenjaga1 + (1 + i));
} else {
chara = attachMovie("btroops" + randJagoan, "chara" + (1 + i), xdalamPenjaga1 + (1 + i));
}
chara._xscale = (chara._yscale = 100);
if (i == 1) {
penjaga1 = chara;
chara._x = back._x + 90;
chara._y = back._y + 122;
} else if (i == 2) {
penjaga2 = chara;
chara._x = back._x + 120;
chara._y = back._y + 220;
} else if (i == 3) {
penjaga3 = chara;
chara._x = back._x + 170;
chara._y = back._y + 265;
} else if (i == 4) {
penjaga4 = chara;
chara._x = back._x + 230;
chara._y = back._y + 365;
} else if (i == 5) {
penjaga5 = chara;
chara._x = back._x + 60;
chara._y = back._y + 180;
} else if (i == 6) {
penjaga6 = chara;
chara._x = back._x + 90;
chara._y = back._y + 265;
} else if (i == 7) {
penjaga7 = chara;
chara._x = back._x + 130;
chara._y = back._y + 345;
} else if (i == 8) {
penjaga8 = chara;
chara._x = back._x + 300;
chara._y = back._y + 350;
} else if (i == 9) {
penjaga9 = chara;
chara._x = back._x + 375;
chara._y = back._y + 350;
}
if (i >= 5) {
chara.bangunan = true;
}
chara._x = chara._x - 15;
chara.penjaga = true;
chara.posTempat = i;
chara.jenis = randJagoan;
chara.jenis2 = indi2;
chara.tipe = "jagoan";
cekCharaAtribut();
chara.totLive = chara.live;
if (randJagoan == 3) {
if (i == 1) {
chara.range = chara.range * 2.5;
} else {
chara.range = chara.range * 2;
}
} else if (i == 1) {
chara.range = chara.range * 2;
} else {
chara.range = chara.range * 1.5;
}
chara.jenis = randJagoan;
chara.mati = false;
chara.xdalamEfek = 1;
chara.bar_mc._alpha = 0;
chara.onEnterFrame = enterBenteng;
chara.onRollOver = overChara;
chara.onRollOut = (chara.onReleaseOutside = outChara);
}
function buatPenjaga2(indi, indi2) {
if (indi2 == 31) {
xjenisDrag = 9;
} else if (indi2 == 32) {
xjenisDrag = 10;
} else if (indi2 == 33) {
xjenisDrag = 11;
} else if (indi2 == 34) {
xjenisDrag = 12;
} else if (indi2 == 35) {
xjenisDrag = 13;
} else if (indi2 == 36) {
xjenisDrag = 14;
} else if (indi2 == 37) {
xjenisDrag = 15;
} else if (indi2 == 38) {
xjenisDrag = 2;
} else if (indi2 == 39) {
xjenisDrag = 3;
} else if (indi2 == 40) {
xjenisDrag = 5;
} else if (indi2 == 41) {
xjenisDrag = 7;
} else if (indi2 == 42) {
xjenisDrag = 8;
}
i = indi;
randJagoan = xjenisDrag;
if (_root["chara" + String(10 + i)] == undefined) {
if (randJagoan <= 8) {
chara = attachMovie("btroopsx" + randJagoan, "chara" + String(10 + i), dalamPenjaga2 + (10 + i));
} else {
chara = attachMovie("btroopsx" + randJagoan, "chara" + String(10 + i), xdalamPenjaga2 + (10 + i));
}
chara._xscale = (chara._yscale = 100);
if (i == 1) {
xpenjaga1 = chara;
chara._x = back._x - 90;
chara._y = back._y + 122;
} else if (i == 2) {
xpenjaga2 = chara;
chara._x = back._x - 115;
chara._y = back._y + 220;
} else if (i == 3) {
xpenjaga3 = chara;
chara._x = back._x - 170;
chara._y = back._y + 265;
} else if (i == 4) {
xpenjaga4 = chara;
chara._x = back._x - 230;
chara._y = back._y + 365;
} else if (i == 5) {
xpenjaga5 = chara;
chara._x = back._x - 60;
chara._y = back._y + 180;
chara._x = chara._x - 50;
} else if (i == 6) {
xpenjaga6 = chara;
chara._x = back._x - 90;
chara._y = back._y + 265;
chara._x = chara._x - 50;
} else if (i == 7) {
xpenjaga7 = chara;
chara._x = back._x - 130;
chara._y = back._y + 345;
chara._x = chara._x - 50;
} else if (i == 8) {
xpenjaga8 = chara;
chara._x = back._x - 300;
chara._y = back._y + 350;
} else if (i == 9) {
xpenjaga9 = chara;
chara._x = back._x - 375;
chara._y = back._y + 350;
} else {
removeMovieClip(chara);
}
if (i >= 5) {
chara.bangunan = true;
}
chara._x = chara._x + 1600;
chara._x = chara._x + 15;
chara.penjaga = true;
chara.posTempat = i;
chara.jenis = randJagoan;
chara.jenis2 = indi2;
chara.tipe = "musuh";
cekCharaAtribut();
chara.live = chara.live * 1;
chara.totLive = chara.live;
chara.damage = chara.damage * 1;
if (randJagoan == 3) {
if (i == 1) {
chara.range = chara.range * 2.5;
} else {
chara.range = chara.range * 2;
}
} else if (i == 1) {
chara.range = chara.range * 2;
} else {
chara.range = chara.range * 1.5;
}
chara.jenis = randJagoan;
chara.mati = false;
chara.xdalamEfek = 1;
chara.bar_mc._alpha = 0;
chara.onEnterFrame = enterBenteng2;
chara.onRollOver = overChara;
chara.onRollOut = (chara.onReleaseOutside = outChara);
}
}
function buatBenteng() {
if (jenisPerang == "laut") {
benteng1 = attachMovie("induk1", "chara" + troopsKe, dalamBenteng1);
benteng1._x = 25;
benteng1._y = 350;
benteng1._x = benteng1._x + 230;
benteng1._y = benteng1._y - 50;
benteng1._y = benteng1._y - naikBerapa;
benteng1._xscale = (benteng1._yscale = 55);
} else {
benteng1 = attachMovie("benteng1", "chara" + troopsKe, dalamBenteng1);
benteng1._x = 25;
benteng1._y = 350;
benteng1._x = benteng1._x + 157;
benteng1._y = benteng1._y + 13;
benteng1._y = benteng1._y - naikBerapa;
benteng1._x = benteng1._x - 50;
benteng1._xscale = (benteng1._yscale = 75);
}
benteng1.tipe = "jagoan";
benteng1.live = nyawaIstana1;
benteng1.totLive = benteng1.live;
benteng1.benteng1 = true;
benteng1.benteng = true;
benteng1.zbenteng = true;
benteng1.onEnterFrame = enterIstana1;
if (tipeMaen == "pantai1") {
benteng1._visible = false;
}
troopsKe++;
if (troopsKe >= 50) {
troopsKe = 20;
}
i = 1;
while (i <= 9) {
if (_root["penjagaAda" + i] == false) {
benteng1["tanda" + i]._visible = false;
}
i++;
}
if (jenisPerang == "laut") {
benteng2 = attachMovie("induk2", "chara" + troopsKe, dalamBenteng2);
benteng2._x = 1575;
benteng2._y = 350;
benteng2._x = benteng2._x - 187;
benteng2._y = benteng2._y - 50;
benteng2._y = benteng2._y - naikBerapa;
benteng2._xscale = (benteng2._yscale = 55);
} else {
benteng2 = attachMovie("benteng2", "chara" + troopsKe, dalamBenteng2);
benteng2._x = 1575;
benteng2._y = 350;
benteng2._x = benteng2._x - 157;
benteng2._y = benteng2._y + 13;
benteng2._y = benteng2._y - naikBerapa;
benteng2._x = benteng2._x + 50;
benteng2._xscale = (benteng2._yscale = 75);
}
benteng2.tipe = "musuh";
benteng2.live = nyawaIstana2;
benteng2.totLive = benteng2.live;
benteng2.benteng2 = true;
benteng2.benteng = true;
benteng2.zbenteng = true;
benteng2.onEnterFrame = enterIstana2;
if (tipeMaen == "pantai2") {
benteng2._visible = false;
}
troopsKe++;
if (troopsKe >= 50) {
troopsKe = 20;
}
}
function enterBenteng() {
if (xPause == false) {
if (this.xjatuh == true) {
this._y = this._y + this.wspeed;
this.wspeed = this.wspeed + 2;
this._rotation++;
}
if (_root["chara" + this.ztarget] == undefined) {
i = 1;
while (i <= arrayMasuk.length) {
if (_root["chara" + arrayMasuk[i]].tipe == "musuh") {
if (_root["chara" + arrayMasuk[i]] != undefined) {
this.jarak = Math.sqrt(Math.pow(this._x - _root["chara" + arrayMasuk[i]]._x, 2) + Math.pow(this._y - _root["chara" + arrayMasuk[i]]._y, 2));
if (this.jarak <= this.range) {
if (this._x <= (_root["chara" + arrayMasuk[i]]._x + 100)) {
this.ztarget = arrayMasuk[i];
}
}
}
}
i++;
}
}
if ((((_root["chara" + this.ztarget] == undefined) || (_root["chara" + this.ztarget].live <= 0)) || (this.ztarget == undefined)) || (this._x > _root["chara" + this.ztarget])) {
this.ztarget = undefined;
this.jarak = 999999 /* 0x0F423F */;
} else {
this.jarak = Math.sqrt(Math.pow(this._x - _root["chara" + this.ztarget]._x, 2) + Math.pow(this._y - _root["chara" + this.ztarget]._y, 2));
}
if (this.live <= 0) {
if (this.mati == false) {
if (this.penjaga == true) {
_root["penjagaAda" + this.posTempat] = false;
}
cekHarga(this.jenis2);
naekUang = Math.ceil(hargaKe * naikHarga);
money2 = money2 + naekUang;
if (this.bangunan == true) {
buildingsMati2++;
buildings1++;
}
this.enabled = false;
delete this.onRollOver;
delete this.onRollOut;
delete this.onReleaseOutside;
delete this.onRelease;
if (this.jenisPasukan == "craft") {
cekPecah(this);
backLedak();
} else {
backMati();
}
this.mati = true;
this.gotoAndStop(3);
}
} else if (this.jarak <= this.range) {
this.gotoAndStop(2);
} else if (this._currentframe == 2) {
if (this.anim._currentframe == 1) {
this.gotoAndStop(1);
}
} else {
this.gotoAndStop(1);
}
this.bar_mc.bar._xscale = Math.ceil((this.live / this.totLive) * 100);
if (this.bar_mc.bar._xscale <= 0) {
this.bar_mc._visible = false;
}
}
}
function enterBenteng2() {
if (xPause == false) {
if (this.xjatuh == true) {
this._y = this._y + this.wspeed;
this.wspeed = this.wspeed + 2;
this._rotation++;
}
if (_root["chara" + this.ztarget] == undefined) {
i = 1;
while (i <= arrayMasuk.length) {
if (_root["chara" + arrayMasuk[i]].tipe == "jagoan") {
if (_root["chara" + arrayMasuk[i]] != undefined) {
this.jarak = Math.sqrt(Math.pow(this._x - _root["chara" + arrayMasuk[i]]._x, 2) + Math.pow(this._y - _root["chara" + arrayMasuk[i]]._y, 2));
if (this.jarak <= this.range) {
if (this._x >= (_root["chara" + arrayMasuk[i]]._x - 100)) {
this.ztarget = arrayMasuk[i];
}
}
}
}
i++;
}
}
if ((((_root["chara" + this.ztarget] == undefined) || (_root["chara" + this.ztarget].live <= 0)) || (this.ztarget == undefined)) || (this._x < _root["chara" + this.ztarget])) {
this.ztarget = undefined;
this.jarak = 999999 /* 0x0F423F */;
} else {
this.jarak = Math.sqrt(Math.pow(this._x - _root["chara" + this.ztarget]._x, 2) + Math.pow(this._y - _root["chara" + this.ztarget]._y, 2));
}
if (this.live <= 0) {
if (this.mati == false) {
if (this.penjaga == true) {
_root["xpenjagaAda" + this.posTempat] = false;
}
cekHarga(this.jenis2);
naekUang = Math.ceil(hargaKe * naikHarga2);
money1 = money1 + naekUang;
if (this.bangunan == true) {
buildingsMati1++;
buildings2++;
}
this.enabled = false;
delete this.onRollOver;
delete this.onRollOut;
delete this.onReleaseOutside;
delete this.onRelease;
if (this.jenisPasukan == "craft") {
cekPecah(this);
backLedak();
} else {
backMati();
}
this.mati = true;
this.gotoAndStop(3);
}
} else if (this.jarak <= this.range) {
this.gotoAndStop(2);
} else if (this._currentframe == 2) {
if (this.anim._currentframe == 1) {
this.gotoAndStop(1);
}
} else {
this.gotoAndStop(1);
}
this.bar_mc.bar._xscale = Math.ceil((this.live / this.totLive) * 100);
if (this.bar_mc.bar._xscale <= 0) {
this.bar_mc._visible = false;
}
}
}
function buatJagoan(xindi, windi, zposX, zposY) {
if (xPause == false) {
if (tipeGame == "demo") {
if (jenisPerang == "laut") {
arrayPasukan = new Array(27, 28, 29, 30, 31);
} else {
arrayPasukan = new Array(1, 2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 23, 24, 25);
}
if (jenisPerang == "laut") {
jenBattle = arrayPasukan.length;
} else if (jmlPasukan < (totPasukan * 0.5)) {
jenBattle = 22;
} else if (jmlPasukan < (totPasukan * 0.7)) {
jenBattle = 15;
} else if (jmlPasukan < (totPasukan * 0.9)) {
jenBattle = 12;
} else if (jmlPasukan < (totPasukan * 1)) {
jenBattle = 8;
}
rand = random(jenBattle);
randJagoan = arrayPasukan[rand];
rand = random(3);
if (rand == 0) {
} else if (rand == 1) {
}
} else {
randJagoan = xindi;
}
if (randJagoan <= 9) {
setTot = 4;
posAwalX = 0;
} else if (randJagoan <= 14) {
setTot = 2;
posAwalX = 1;
} else if (randJagoan == 26) {
setTot = 3;
posAwalX = 1;
} else if (randJagoan == 27) {
setTot = 2;
posAwalX = 1;
} else if (randJagoan == 47) {
setTot = 4;
posAwalX = 0;
} else {
setTot = 1;
posAwalX = 0;
}
z = 1;
while (z <= setTot) {
if (xjmlPasukan > 0) {
if (bykKeluar1 < bykBuatChara) {
if (_root["chara" + troopsKe1] == undefined) {
if ((randJagoan >= 18) && (randJagoan <= 25)) {
if (jenisPerang == "udara") {
if (jenisAppear == "manual") {
randPosisi = windi;
xdalamJagoan = dalamJagoan + (randPosisi * 500);
} else {
randPosisi = random(5);
xdalamJagoan = dalamJagoan + (randPosisi * 500);
}
} else {
randPosisi = 2;
xdalamJagoan = dalamJagoan + 2500;
}
} else if (jenisAppear == "manual") {
randPosisi = windi;
xdalamJagoan = dalamJagoan + (randPosisi * 500);
} else {
randPosisi = random(5);
xdalamJagoan = dalamJagoan + (randPosisi * 500);
}
chara = attachMovie("troops" + randJagoan, "chara" + troopsKe1, xdalamJagoan);
bykKeluar1++;
xjmlPasukan--;
if (randJagoan <= 9) {
chara.jenisPasukan = "orang";
chara._x = (back._x + ((375 + (randPosisi * 20)) / 2.3)) - random(100);
} else if (randJagoan >= 26) {
chara.jenisPasukan = "craft";
chara._x = back._x - 75;
} else if (randJagoan >= 18) {
chara.jenisPasukan = "craft";
chara._x = back._x - 150;
} else if (posAwalX >= 1) {
chara.jenisPasukan = "craft";
chara._x = ((back._x + ((175 + (randPosisi * 20)) / 2.3)) - random(100)) - (posAwalX * 160);
posAwalX++;
} else {
chara.jenisPasukan = "craft";
chara._x = (back._x + ((175 + (randPosisi * 20)) / 2.3)) - random(100);
}
if (randJagoan >= 26) {
chara._y = ((225 + (randPosisi * 65)) + 25) - 60;
} else if (randJagoan >= 20) {
if (jenisPerang == "udara") {
if (randJagoan >= 23) {
chara._y = 165;
} else {
chara._y = ((200 + (randPosisi * 65)) + 25) - 60;
}
} else {
chara._y = 165;
}
} else if (randJagoan >= 18) {
if (jenisPerang == "udara") {
chara._y = ((200 + (randPosisi * 65)) + 25) - 60;
} else {
rand = random(2);
if (rand == 0) {
chara._y = 200;
} else {
chara._y = 275;
}
}
} else {
chara._y = ((375 + (randPosisi * 30)) + 25) - 60;
}
chara._y = chara._y - naikBerapa;
chara.anim.gotoAndPlay(random(10) + 1);
if ((((randJagoan == 2) || (randJagoan == 4)) || (randJagoan == 5)) || (randJagoan == 6)) {
chara.tiarap = true;
chara.sedangTiarap = false;
}
chara.tipe = "jagoan";
chara.posisi = randPosisi;
chara.xdalamEfek = 1;
chara.ztarget = undefined;
chara.mati = false;
chara.anim.gotoAndPlay(random(10) + 1);
if (randJagoan == 26) {
chara._xscale = (chara._yscale = 20);
chara._y = chara._y + 4;
chara._x = chara._x - 0;
} else if (randJagoan == 27) {
chara._xscale = (chara._yscale = 25);
chara._y = chara._y - 0;
chara._x = chara._x - 75;
} else if (randJagoan == 28) {
chara._xscale = (chara._yscale = 35);
chara._y = chara._y - 4;
chara._x = chara._x - 100;
} else if (randJagoan == 29) {
chara._xscale = (chara._yscale = 35);
chara._y = chara._y - 8;
chara._x = chara._x - 125;
} else if (randJagoan == 30) {
chara._xscale = (chara._yscale = 40);
chara._y = chara._y - 12;
chara._x = chara._x - 150;
} else if (randJagoan >= 18) {
if (jenisPerang == "laut") {
chara._xscale = (chara._yscale = 12);
} else {
chara._xscale = (chara._yscale = 35);
}
} else {
chara._xscale = (chara._yscale = 50);
}
if (jenisPerang == "udara") {
chara._xscale = (chara._yscale = 20);
}
chara.bar_mc._alpha = 0;
chara.jenis = randJagoan;
if (randJagoan <= 9) {
chara.bykJumlah = 4;
} else if (randJagoan <= 14) {
chara.bykJumlah = 2;
} else {
chara.bykJumlah = 1;
}
cekCharaAtribut();
if ((randJagoan >= 18) && (randJagoan <= 25)) {
chara.speedY = chara.speed / 2;
if (jenisPerang == "laut") {
chara.batasBawah = ((chara._y + 100) + random(125)) - naikBerapa;
} else {
chara.batasBawah = ((chara._y + 250) + random(125)) - naikBerapa;
}
chara.terbang = true;
} else {
chara.terbang = false;
}
if ((randJagoan >= 20) && (randJagoan <= 25)) {
chara.lewatSaja = true;
} else if ((randJagoan >= 26) && (randJagoan <= 30)) {
chara.lewatSaja = true;
} else {
chara.lewatSaja = false;
}
if ((randJagoan >= 23) && (randJagoan <= 25)) {
chara.ngebom = true;
}
chara.naikKe = undefined;
if (jenisPerang == "laut") {
if (chara.terbang == true) {
chara._y = 160;
rand = random(2) + 1;
chara.naikKe = chara._y - (50 * rand);
}
}
chara.jetSki = false;
chara.jetSki2 = false;
if (tipeMaen == "pantai1") {
if (randJagoan <= 9) {
chara.lewatSaja = true;
chara.jetSki = true;
chara.jetSki2 = true;
chara.gotoAndStop(8);
}
}
if (chara.jetSki == true) {
chara._x = chara._x - 200;
if (chara.posisi == 0) {
chara.batasJet = 800;
} else if (chara.posisi == 1) {
chara.batasJet = 700;
} else if (chara.posisi == 2) {
chara.batasJet = 600;
} else if (chara.posisi == 3) {
chara.batasJet = 700;
} else if (chara.posisi == 4) {
chara.batasJet = 800;
}
}
if (xindi == 47) {
chara.lewatSaja = false;
chara.jatuh = ((270 + (randPosisi * 30)) + 25) - 60;
chara._x = (zposX - random(100)) + 50;
chara._y = (zposY + random(50)) + 25;
chara._xscale = (chara._yscale = 50);
chara.melayang = true;
chara.speedLayang = random(2) + 1;
chara.gotoAndStop(9);
chara.jenisPasukan = "orang";
backAir();
} else if (xindi == 48) {
chara.lewatSaja = false;
chara._y = ((300 + (randPosisi * 20)) + 25) - 60;
chara._x = back._x;
chara.jenisPasukan = "craft";
chara._xscale = (chara._yscale = 50);
} else if (xindi == 49) {
chara._x = back._x - 100;
chara._y = 165;
chara.speedY = chara.speed / 2;
chara.jenisPasukan = "craft";
if (jenisPerang == "udara") {
chara._xscale = (chara._yscale = 20);
}
if (jenisPerang == "laut") {
chara._xscale = (chara._yscale = 12);
} else {
chara._xscale = (chara._yscale = 35);
}
if (jenisPerang == "laut") {
chara.batasBawah = ((chara._y + 100) + random(125)) - naikBerapa;
} else {
chara.batasBawah = ((chara._y + 250) + random(125)) - naikBerapa;
}
chara.lewatSaja = false;
chara.terbang = true;
if (jenisPerang == "laut") {
if (chara.terbang == true) {
chara._y = 160;
rand = random(2) + 1;
chara.naikKe = chara._y - (50 * rand);
}
}
} else if (xindi == 50) {
chara.lewatSaja = false;
chara.terbang = false;
chara._y = ((225 + (randPosisi * 65)) + 25) - 60;
chara._x = back._x;
chara.jenisPasukan = "craft";
chara._xscale = (chara._yscale = 25);
chara._y = chara._y - naikBerapa;
}
if (jenisPerang == "laut") {
if (chara.terbang == false) {
if (chara._y >= 385) {
chara._y = 385;
}
}
}
chara.onRollOver = overChara;
chara.onRollOut = outChara;
chara.onReleaseOutside = outChara;
chara.onEnterFrame = enterJagoan;
troopsKe1++;
if ((jenisMaenan == "single") && (tipeMaen2 == "")) {
if (troopsKe1 >= 71) {
troopsKe1 = 20;
}
} else if (tipeMaen2 == "artillery") {
if (troopsKe1 >= 28) {
troopsKe1 = 20;
}
} else if (troopsKe1 >= 36) {
troopsKe1 = 20;
}
dalamJagoan = dalamJagoan + 6;
if (dalamJagoan >= 7000) {
dalamJagoan = 2000;
}
if ((randJagoan >= 18) && (randJagoan <= 21)) {
backCopter();
} else if ((randJagoan >= 22) && (randJagoan <= 25)) {
backAir();
} else if ((randJagoan >= 26) && (randJagoan <= 31)) {
backBoat();
}
} else {
frame.info_mc.gotoAndPlay(2);
frame.info_mc.informasi = ("Can't create any unit, maximum " + bykBuatChara) + " units";
cekHarga(randJagoan);
money1 = money1 + hargaKe;
troopsKe1++;
if ((jenisMaenan == "single") && (tipeMaen2 == "")) {
if (troopsKe1 >= 71) {
troopsKe1 = 20;
}
} else if (tipeMaen2 == "artillery") {
if (troopsKe1 >= 28) {
troopsKe1 = 20;
}
} else if (troopsKe1 >= 36) {
troopsKe1 = 20;
}
}
} else {
money1 = money1 + daftarHarga[randJagoan];
}
} else {
money1 = money1 + daftarHarga[randJagoan];
}
z++;
}
}
}
function overChara() {
if (xPause == false) {
this.bar_mc._alpha = 100;
}
}
function outChara() {
if (xPause == false) {
this.bar_mc._alpha = 0;
}
}
function cekLevelKe(indi) {
if (levelLive[indi] == 1) {
levelKe1 = 1;
} else if (levelLive[indi] == 2) {
levelKe1 = 1.2;
} else if (levelLive[indi] == 3) {
levelKe1 = 1.4;
}
if (levelRange[indi] == 1) {
levelKe2 = 1;
} else if (levelRange[indi] == 2) {
levelKe2 = 1.1;
} else if (levelRange[indi] == 3) {
levelKe2 = 1.2;
}
if (levelSpeed[indi] == 1) {
levelKe3 = 1;
} else if (levelSpeed[indi] == 2) {
levelKe3 = 1.4;
} else if (levelSpeed[indi] == 3) {
levelKe3 = 1.8;
}
if (levelDamage[indi] == 1) {
levelKe4 = 1;
} else if (levelDamage[indi] == 2) {
levelKe4 = 1.1;
} else if (levelDamage[indi] == 3) {
levelKe4 = 1.2;
}
}
function cekCharaAtribut() {
if (chara.tipe == "jagoan") {
cekLevelKe(chara.jenis);
if (chara.penjaga == true) {
if (chara.jenis == 2) {
asliKe = 38;
} else if (chara.jenis == 3) {
asliKe = 39;
} else if (chara.jenis == 5) {
asliKe = 40;
} else if (chara.jenis == 7) {
asliKe = 41;
} else if (chara.jenis == 8) {
asliKe = 42;
} else if (chara.jenis == 9) {
asliKe = 31;
} else if (chara.jenis == 10) {
asliKe = 32;
} else if (chara.jenis == 11) {
asliKe = 33;
} else if (chara.jenis == 12) {
asliKe = 34;
} else if (chara.jenis == 13) {
asliKe = 35;
} else if (chara.jenis == 14) {
asliKe = 36;
} else if (chara.jenis == 15) {
asliKe = 37;
}
liveNaik = Math.ceil(levelKe1 * daftarLive[asliKe]);
rangeNaik = Math.ceil(levelKe2 * daftarRange[asliKe]);
speedNaik = Math.ceil(levelKe3 * daftarSpeed[asliKe]);
damageNaik = Math.ceil(levelKe4 * daftarDamage[asliKe]);
} else {
liveNaik = Math.ceil(levelKe1 * daftarLive[chara.jenis]);
rangeNaik = Math.ceil(levelKe2 * daftarRange[chara.jenis]);
speedNaik = Math.ceil(levelKe3 * daftarSpeed[chara.jenis]);
damageNaik = Math.ceil(levelKe4 * daftarDamage[chara.jenis]);
}
chara.live = liveNaik * levelSkill[6];
if (levelSkill[4] == 3) {
chara.range = rangeNaik * 1.5;
} else if (levelSkill[4] == 2) {
chara.range = rangeNaik * 1.25;
} else {
chara.range = rangeNaik * 1;
}
if (levelSkill[3] == 3) {
chara.speed = speedNaik * 1.5;
} else if (levelSkill[3] == 2) {
chara.speed = speedNaik * 1.25;
} else {
chara.speed = speedNaik * 1;
}
chara.damage = damageNaik * levelSkill[5];
} else {
if (chara.penjaga == true) {
if (chara.jenis == 2) {
asliKe = 38;
} else if (chara.jenis == 3) {
asliKe = 39;
} else if (chara.jenis == 5) {
asliKe = 40;
} else if (chara.jenis == 7) {
asliKe = 41;
} else if (chara.jenis == 8) {
asliKe = 42;
} else if (chara.jenis == 9) {
asliKe = 31;
} else if (chara.jenis == 10) {
asliKe = 32;
} else if (chara.jenis == 11) {
asliKe = 33;
} else if (chara.jenis == 12) {
asliKe = 34;
} else if (chara.jenis == 13) {
asliKe = 35;
} else if (chara.jenis == 14) {
asliKe = 36;
} else if (chara.jenis == 15) {
asliKe = 37;
}
chara.live = daftarLive[asliKe];
chara.range = daftarRange[asliKe];
chara.speed = daftarSpeed[asliKe];
chara.damage = daftarDamage[asliKe];
} else {
chara.live = daftarLive[chara.jenis];
chara.range = daftarRange[chara.jenis];
chara.speed = daftarSpeed[chara.jenis];
chara.damage = daftarDamage[chara.jenis];
}
if (tipeSulitCampaign == 4) {
if (xlevel == 1) {
chara.speed = chara.speed * 1.2;
chara.range = chara.range * 1.2;
chara.live = chara.live * 1.4;
chara.damage = chara.damage * 1.4;
} else if (xlevel <= 3) {
chara.speed = chara.speed * 1.2;
chara.range = chara.range * 1.2;
chara.live = chara.live * 1.6;
chara.damage = chara.damage * 1.6;
} else if (xlevel <= 6) {
chara.speed = chara.speed * 1.2;
chara.range = chara.range * 1.2;
chara.live = chara.live * 1.8;
chara.damage = chara.damage * 1.8;
} else if (xlevel <= 9) {
chara.speed = chara.speed * 1.3;
chara.range = chara.range * 1.3;
chara.live = chara.live * 2;
chara.damage = chara.damage * 2;
} else if (xlevel <= 12) {
chara.speed = chara.speed * 1.25;
chara.range = chara.range * 1.25;
chara.live = chara.live * 2.2;
chara.damage = chara.damage * 2.2;
} else if (xlevel <= 15) {
chara.speed = chara.speed * 1.5;
chara.range = chara.range * 1.5;
chara.live = chara.live * 2.4;
chara.damage = chara.damage * 2.4;
} else if (xlevel <= 18) {
chara.speed = chara.speed * 1.2;
chara.range = chara.range * 1.2;
chara.live = chara.live * 2.6;
chara.damage = chara.damage * 2.6;
} else if (xlevel <= 21) {
chara.speed = chara.speed * 1.4;
chara.range = chara.range * 1.4;
chara.live = chara.live * 2.8;
chara.damage = chara.damage * 2.8;
} else if (xlevel <= 24) {
chara.speed = chara.speed * 1.7;
chara.range = chara.range * 1.7;
chara.live = chara.live * 3;
chara.damage = chara.damage * 3;
} else if (xlevel <= 27) {
chara.speed = chara.speed * 2.5;
chara.range = chara.range * 2.5;
chara.live = chara.live * 4;
chara.damage = chara.damage * 4;
} else if (xlevel < 30) {
chara.speed = chara.speed * 3;
chara.range = chara.range * 3;
chara.live = chara.live * 5;
chara.damage = chara.damage * 5;
} else if (xlevel <= 33) {
chara.speed = chara.speed * 3;
chara.range = chara.range * 3;
chara.live = chara.live * 5.5;
chara.damage = chara.damage * 6;
} else if (xlevel <= 36) {
chara.speed = chara.speed * 3;
chara.range = chara.range * 4;
chara.live = chara.live * 6;
chara.damage = chara.damage * 7;
} else if (xlevel <= 39) {
chara.speed = chara.speed * 3;
chara.range = chara.range * 4;
chara.live = chara.live * 8;
chara.damage = chara.damage * 9;
} else if (xlevel <= 42) {
chara.speed = chara.speed * 3.5;
chara.range = chara.range * 4.5;
chara.live = chara.live * 10;
chara.damage = chara.damage * 11;
} else if (xlevel == 43) {
chara.speed = chara.speed * 4;
chara.range = chara.range * 4;
chara.live = chara.live * 12;
chara.damage = chara.damage * 12;
} else if (xlevel == 44) {
chara.speed = chara.speed * 4;
chara.range = chara.range * 4;
chara.live = chara.live * 14;
chara.damage = chara.damage * 14;
} else if (xlevel == 45) {
chara.speed = chara.speed * 4;
chara.range = chara.range * 4;
chara.live = chara.live * 16;
chara.damage = chara.damage * 16;
} else {
chara.speed = chara.speed * 3.5;
chara.range = chara.range * 4.5;
chara.live = chara.live * 10;
chara.damage = chara.damage * 11;
}
} else if (tipeSulitCampaign == 3) {
if (xlevel == 1) {
chara.speed = chara.speed * 1;
chara.range = chara.range * 1;
chara.live = chara.live * 1;
chara.damage = chara.damage * 1;
} else if (xlevel <= 3) {
chara.speed = chara.speed * 1;
chara.range = chara.range * 1;
chara.live = chara.live * 1.2;
chara.damage = chara.damage * 1.2;
} else if (xlevel <= 6) {
chara.speed = chara.speed * 1;
chara.range = chara.range * 1;
chara.live = chara.live * 1.4;
chara.damage = chara.damage * 1.4;
} else if (xlevel <= 9) {
chara.speed = chara.speed * 1.1;
chara.range = chara.range * 1.1;
chara.live = chara.live * 1.6;
chara.damage = chara.damage * 1.6;
} else if (xlevel <= 12) {
chara.speed = chara.speed * 1.25;
chara.range = chara.range * 1.25;
chara.live = chara.live * 1.8;
chara.damage = chara.damage * 1.8;
} else if (xlevel <= 15) {
chara.speed = chara.speed * 1.5;
chara.range = chara.range * 1.5;
chara.live = chara.live * 1.9;
chara.damage = chara.damage * 1.9;
} else if (xlevel <= 18) {
chara.speed = chara.speed * 1.2;
chara.range = chara.range * 1.2;
chara.live = chara.live * 2;
chara.damage = chara.damage * 2;
} else if (xlevel <= 21) {
chara.speed = chara.speed * 1.4;
chara.range = chara.range * 1.4;
chara.live = chara.live * 2.3;
chara.damage = chara.damage * 2.3;
} else if (xlevel <= 24) {
chara.speed = chara.speed * 1.7;
chara.range = chara.range * 1.7;
chara.live = chara.live * 2.5;
chara.damage = chara.damage * 3;
} else if (xlevel <= 27) {
chara.speed = chara.speed * 2.5;
chara.range = chara.range * 2.5;
chara.live = chara.live * 3;
chara.damage = chara.damage * 4;
} else if (xlevel < 30) {
chara.speed = chara.speed * 3;
chara.range = chara.range * 3;
chara.live = chara.live * 5;
chara.damage = chara.damage * 5;
} else if (xlevel <= 33) {
chara.speed = chara.speed * 3;
chara.range = chara.range * 3;
chara.live = chara.live * 5.5;
chara.damage = chara.damage * 6;
} else if (xlevel <= 36) {
chara.speed = chara.speed * 3;
chara.range = chara.range * 4;
chara.live = chara.live * 6;
chara.damage = chara.damage * 7;
} else if (xlevel <= 39) {
chara.speed = chara.speed * 3;
chara.range = chara.range * 4;
chara.live = chara.live * 8;
chara.damage = chara.damage * 9;
} else if (xlevel <= 42) {
chara.speed = chara.speed * 3.5;
chara.range = chara.range * 4.5;
chara.live = chara.live * 10;
chara.damage = chara.damage * 11;
} else if (xlevel == 43) {
chara.speed = chara.speed * 4;
chara.range = chara.range * 4;
chara.live = chara.live * 12;
chara.damage = chara.damage * 12;
} else if (xlevel == 44) {
chara.speed = chara.speed * 4;
chara.range = chara.range * 4;
chara.live = chara.live * 14;
chara.damage = chara.damage * 14;
} else if (xlevel == 45) {
chara.speed = chara.speed * 4;
chara.range = chara.range * 4;
chara.live = chara.live * 16;
chara.damage = chara.damage * 16;
} else {
chara.speed = chara.speed * 3.5;
chara.range = chara.range * 4.5;
chara.live = chara.live * 10;
chara.damage = chara.damage * 11;
}
} else if (tipeSulitCampaign == 2) {
if (xlevel == 1) {
chara.speed = chara.speed * 1;
chara.range = chara.range * 1;
chara.live = chara.live * 0.75;
chara.damage = chara.damage * 0.75;
} else if (xlevel <= 3) {
chara.speed = chara.speed * 1;
chara.range = chara.range * 1;
chara.live = chara.live * 0.9;
chara.damage = chara.damage * 0.9;
} else if (xlevel <= 6) {
chara.speed = chara.speed * 1;
chara.range = chara.range * 1;
chara.live = chara.live * 1;
chara.damage = chara.damage * 1;
} else if (xlevel <= 9) {
chara.speed = chara.speed * 1.1;
chara.range = chara.range * 1.1;
chara.live = chara.live * 1.2;
chara.damage = chara.damage * 1.2;
} else if (xlevel <= 12) {
chara.speed = chara.speed * 1.25;
chara.range = chara.range * 1.25;
chara.live = chara.live * 1.4;
chara.damage = chara.damage * 1.4;
} else if (xlevel <= 15) {
chara.speed = chara.speed * 1.5;
chara.range = chara.range * 1.5;
chara.live = chara.live * 1.6;
chara.damage = chara.damage * 1.6;
} else if (xlevel <= 18) {
chara.speed = chara.speed * 1.2;
chara.range = chara.range * 1.2;
chara.live = chara.live * 1.8;
chara.damage = chara.damage * 1.8;
} else if (xlevel <= 21) {
chara.speed = chara.speed * 1.4;
chara.range = chara.range * 1.4;
chara.live = chara.live * 2;
chara.damage = chara.damage * 2;
} else if (xlevel <= 24) {
chara.speed = chara.speed * 1.7;
chara.range = chara.range * 1.7;
chara.live = chara.live * 2.5;
chara.damage = chara.damage * 2.5;
} else if (xlevel <= 27) {
chara.speed = chara.speed * 2.5;
chara.range = chara.range * 2.5;
chara.live = chara.live * 3;
chara.damage = chara.damage * 4;
} else if (xlevel < 30) {
chara.speed = chara.speed * 3;
chara.range = chara.range * 3;
chara.live = chara.live * 5;
chara.damage = chara.damage * 5;
} else if (xlevel <= 33) {
chara.speed = chara.speed * 3;
chara.range = chara.range * 3;
chara.live = chara.live * 5.5;
chara.damage = chara.damage * 6;
} else if (xlevel <= 36) {
chara.speed = chara.speed * 3;
chara.range = chara.range * 4;
chara.live = chara.live * 6;
chara.damage = chara.damage * 7;
} else if (xlevel <= 39) {
chara.speed = chara.speed * 3;
chara.range = chara.range * 4;
chara.live = chara.live * 8;
chara.damage = chara.damage * 9;
} else if (xlevel <= 42) {
chara.speed = chara.speed * 3.5;
chara.range = chara.range * 4.5;
chara.live = chara.live * 10;
chara.damage = chara.damage * 11;
} else if (xlevel == 43) {
chara.speed = chara.speed * 4;
chara.range = chara.range * 4;
chara.live = chara.live * 12;
chara.damage = chara.damage * 12;
} else if (xlevel == 44) {
chara.speed = chara.speed * 4;
chara.range = chara.range * 4;
chara.live = chara.live * 14;
chara.damage = chara.damage * 14;
} else if (xlevel == 45) {
chara.speed = chara.speed * 4;
chara.range = chara.range * 4;
chara.live = chara.live * 16;
chara.damage = chara.damage * 16;
} else {
chara.speed = chara.speed * 3.5;
chara.range = chara.range * 4.5;
chara.live = chara.live * 10;
chara.damage = chara.damage * 11;
}
} else if (xlevel == 1) {
chara.speed = chara.speed * 1;
chara.range = chara.range * 1;
chara.live = chara.live * 0.5;
chara.damage = chara.damage * 0.5;
} else if (xlevel <= 3) {
chara.speed = chara.speed * 1;
chara.range = chara.range * 1;
chara.live = chara.live * 0.6;
chara.damage = chara.damage * 0.6;
} else if (xlevel <= 6) {
chara.speed = chara.speed * 1;
chara.range = chara.range * 1;
chara.live = chara.live * 0.7;
chara.damage = chara.damage * 0.7;
} else if (xlevel <= 9) {
chara.speed = chara.speed * 1.1;
chara.range = chara.range * 1.1;
chara.live = chara.live * 1;
chara.damage = chara.damage * 1;
} else if (xlevel <= 12) {
chara.speed = chara.speed * 1.25;
chara.range = chara.range * 1.25;
chara.live = chara.live * 1.2;
chara.damage = chara.damage * 1.2;
} else if (xlevel <= 15) {
chara.speed = chara.speed * 1.5;
chara.range = chara.range * 1.5;
chara.live = chara.live * 1.4;
chara.damage = chara.damage * 1.4;
} else if (xlevel <= 18) {
chara.speed = chara.speed * 1.2;
chara.range = chara.range * 1.2;
chara.live = chara.live * 1.8;
chara.damage = chara.damage * 1.8;
} else if (xlevel <= 21) {
chara.speed = chara.speed * 1.4;
chara.range = chara.range * 1.4;
chara.live = chara.live * 2;
chara.damage = chara.damage * 2;
} else if (xlevel <= 24) {
chara.speed = chara.speed * 1.7;
chara.range = chara.range * 1.7;
chara.live = chara.live * 2.5;
chara.damage = chara.damage * 2.5;
} else if (xlevel <= 27) {
chara.speed = chara.speed * 2.5;
chara.range = chara.range * 2.5;
chara.live = chara.live * 3;
chara.damage = chara.damage * 4;
} else if (xlevel < 30) {
chara.speed = chara.speed * 3;
chara.range = chara.range * 3;
chara.live = chara.live * 5;
chara.damage = chara.damage * 5;
} else if (xlevel <= 33) {
chara.speed = chara.speed * 3;
chara.range = chara.range * 3;
chara.live = chara.live * 5.5;
chara.damage = chara.damage * 6;
} else if (xlevel <= 36) {
chara.speed = chara.speed * 3;
chara.range = chara.range * 4;
chara.live = chara.live * 6;
chara.damage = chara.damage * 7;
} else if (xlevel <= 39) {
chara.speed = chara.speed * 3;
chara.range = chara.range * 4;
chara.live = chara.live * 8;
chara.damage = chara.damage * 9;
} else if (xlevel <= 42) {
chara.speed = chara.speed * 3.5;
chara.range = chara.range * 4.5;
chara.live = chara.live * 10;
chara.damage = chara.damage * 11;
} else if (xlevel == 43) {
chara.speed = chara.speed * 4;
chara.range = chara.range * 4;
chara.live = chara.live * 12;
chara.damage = chara.damage * 12;
} else if (xlevel == 44) {
chara.speed = chara.speed * 4;
chara.range = chara.range * 4;
chara.live = chara.live * 14;
chara.damage = chara.damage * 14;
} else if (xlevel == 45) {
chara.speed = chara.speed * 4;
chara.range = chara.range * 4;
chara.live = chara.live * 16;
chara.damage = chara.damage * 16;
} else {
chara.speed = chara.speed * 3.5;
chara.range = chara.range * 4.5;
chara.live = chara.live * 10;
chara.damage = chara.damage * 11;
}
}
if ((jenisPerang == "laut") || (jenisPerang == "udara")) {
if (chara.jenis <= 25) {
chara.live = chara.live * 3;
}
chara.speed = chara.speed * 0.75;
}
if ((chara.jenis >= 18) && (chara.jenis <= 25)) {
if (chara.tipe == "jagoan") {
chara.damage = chara.damage * 1.5;
}
}
if ((chara.jenis >= 20) && (chara.jenis <= 30)) {
chara.range = chara.range * 1.75;
}
if (jenisCampaign == 1) {
if (chara.tipe == "musuh") {
chara.damage = chara.damage * 1;
chara.live = chara.live * 1;
}
} else if (jenisCampaign == 2) {
if (chara.tipe == "musuh") {
chara.damage = chara.damage * 1.5;
chara.live = chara.live * 1.5;
}
} else if (jenisCampaign == 3) {
if (chara.tipe == "musuh") {
chara.damage = chara.damage * 2;
chara.live = chara.live * 2;
}
}
if (chara.tipe == "musuh") {
if (xlevel >= 27) {
if (tipeSulitCampaign == 1) {
chara.damage = chara.damage * 0.75;
chara.live = chara.live * 0.75;
} else if (tipeSulitCampaign == 2) {
chara.damage = chara.damage * 1.2;
chara.live = chara.live * 1.2;
} else if (tipeSulitCampaign == 3) {
chara.damage = chara.damage * 1.4;
chara.live = chara.live * 1.4;
} else if (tipeSulitCampaign == 4) {
chara.damage = chara.damage * 1.6;
chara.live = chara.live * 1.6;
}
}
}
if ((chara.jenis >= 18) && (chara.jenis <= 25)) {
if (chara.tipe == "jagoan") {
if (jenisMaenan == "single") {
if (jenisPerang == "udara") {
if (((xjmlPasukan / totPasukan) * 100) <= 100) {
chara.damage = chara.damage * 100;
chara.live = chara.live * 100;
chara.range = chara.range * 1.5;
} else if (((xjmlPasukan / totPasukan) * 100) <= 80) {
chara.damage = chara.damage * 200;
chara.live = chara.live * 200;
chara.range = chara.range * 1.7;
} else if (((xjmlPasukan / totPasukan) * 100) <= 60) {
chara.damage = chara.damage * 300;
chara.live = chara.live * 300;
chara.range = chara.range * 1.9;
} else if (((xjmlPasukan / totPasukan) * 100) <= 40) {
chara.damage = chara.damage * 400;
chara.live = chara.live * 400;
chara.range = chara.range * 2.1;
} else if (((xjmlPasukan / totPasukan) * 100) <= 20) {
chara.damage = chara.damage * 500;
chara.live = chara.live * 500;
chara.range = chara.range * 2.3;
}
if (tipeSulitSingle == 1) {
chara.damage = chara.damage * 1;
chara.live = chara.live * 1;
} else if (tipeSulitSingle == 2) {
chara.damage = chara.damage * 2;
chara.live = chara.live * 2;
} else if (tipeSulitSingle == 3) {
chara.damage = chara.damage * 3;
chara.live = chara.live * 3;
} else if (tipeSulitSingle == 4) {
chara.damage = chara.damage * 4;
chara.live = chara.live * 4;
}
}
}
}
}
chara.speed = chara.speed * 1.2;
chara.damageAwal = chara.damage;
chara.naikDamage = 1;
if (chara.jetSki == true) {
chara.live = chara.live * 50;
}
chara.speedAsli = chara.speed;
chara.xlive = chara.live;
chara.totLive = chara.live;
}
function qbuatMusuh1x(indi) {
if (xPause == false) {
if (money2 >= daftarHarga[1]) {
if (bykKeluar2 < bykBuatChara) {
buatMusuh(indi);
money2 = money2 - daftarHarga[1];
}
}
clearInterval(idPasukanx1);
idPasukanx1 = setInterval(qbuatMusuh1x, qdelay, 1);
}
}
function qbuatMusuh2x(indi) {
if (xPause == false) {
if (money2 >= daftarHarga[2]) {
if (bykKeluar2 < bykBuatChara) {
buatMusuh(indi);
money2 = money2 - daftarHarga[2];
}
}
clearInterval(idPasukanx2);
idPasukanx2 = setInterval(qbuatMusuh2x, qdelay, 2);
}
}
function qbuatMusuh3x(indi) {
if (xPause == false) {
if (money2 >= daftarHarga[3]) {
if (bykKeluar2 < bykBuatChara) {
buatMusuh(indi);
money2 = money2 - daftarHarga[3];
}
}
clearInterval(idPasukanx3);
idPasukanx3 = setInterval(qbuatMusuh3x, qdelay, 3);
}
}
function qbuatMusuh4x(indi) {
if (xPause == false) {
if (money2 >= daftarHarga[4]) {
if (bykKeluar2 < bykBuatChara) {
buatMusuh(indi);
money2 = money2 - daftarHarga[4];
}
}
clearInterval(idPasukanx4);
idPasukanx4 = setInterval(qbuatMusuh4x, qdelay, 4);
}
}
function qbuatMusuh5x(indi) {
if (xPause == false) {
if (money2 >= daftarHarga[5]) {
if (bykKeluar2 < bykBuatChara) {
buatMusuh(indi);
money2 = money2 - daftarHarga[5];
}
}
clearInterval(idPasukanx5);
idPasukanx5 = setInterval(qbuatMusuh5x, qdelay, 5);
}
}
function qbuatMusuh6x(indi) {
if (xPause == false) {
if (money2 >= daftarHarga[6]) {
if (bykKeluar2 < bykBuatChara) {
buatMusuh(indi);
money2 = money2 - daftarHarga[6];
}
}
clearInterval(idPasukanx6);
idPasukanx6 = setInterval(qbuatMusuh6x, qdelay, 6);
}
}
function qbuatMusuh7x(indi) {
if (xPause == false) {
if (money2 >= daftarHarga[7]) {
if (bykKeluar2 < bykBuatChara) {
buatMusuh(indi);
money2 = money2 - daftarHarga[7];
}
}
clearInterval(idPasukanx7);
idPasukanx7 = setInterval(qbuatMusuh7x, qdelay, 7);
}
}
function qbuatMusuh8x(indi) {
if (xPause == false) {
if (money2 >= daftarHarga[8]) {
if (bykKeluar2 < bykBuatChara) {
buatMusuh(indi);
money2 = money2 - daftarHarga[8];
}
}
clearInterval(idPasukanx8);
idPasukanx8 = setInterval(qbuatMusuh8x, qdelay, 8);
}
}
function qbuatMusuh9x(indi) {
if (xPause == false) {
if (money2 >= daftarHarga[9]) {
if (bykKeluar2 < bykBuatChara) {
buatMusuh(indi);
money2 = money2 - daftarHarga[9];
}
}
clearInterval(idPasukanx9);
idPasukanx9 = setInterval(qbuatMusuh9x, qdelay, 9);
}
}
function qbuatMusuh10x(indi) {
if (xPause == false) {
if (money2 >= daftarHarga[10]) {
if (bykKeluar2 < bykBuatChara) {
buatMusuh(indi);
money2 = money2 - daftarHarga[10];
}
}
clearInterval(idPasukanx10);
idPasukanx10 = setInterval(qbuatMusuh10x, qdelay, 10);
}
}
function qbuatMusuh11x(indi) {
if (xPause == false) {
if (money2 >= daftarHarga[11]) {
if (bykKeluar2 < bykBuatChara) {
buatMusuh(indi);
money2 = money2 - daftarHarga[11];
}
}
clearInterval(idPasukanx11);
idPasukanx11 = setInterval(qbuatMusuh11x, qdelay, 11);
}
}
function qbuatMusuh12x(indi) {
if (xPause == false) {
if (money2 >= daftarHarga[12]) {
if (bykKeluar2 < bykBuatChara) {
buatMusuh(indi);
money2 = money2 - daftarHarga[12];
}
}
clearInterval(idPasukanx12);
idPasukanx12 = setInterval(qbuatMusuh12x, qdelay, 12);
}
}
function qbuatMusuh13x(indi) {
if (xPause == false) {
if (money2 >= daftarHarga[13]) {
if (bykKeluar2 < bykBuatChara) {
buatMusuh(indi);
money2 = money2 - daftarHarga[13];
}
}
clearInterval(idPasukanx13);
idPasukanx13 = setInterval(qbuatMusuh13x, qdelay, 13);
}
}
function qbuatMusuh14x(indi) {
if (xPause == false) {
if (money2 >= daftarHarga[14]) {
if (bykKeluar2 < bykBuatChara) {
buatMusuh(indi);
money2 = money2 - daftarHarga[14];
}
}
clearInterval(idPasukanx14);
idPasukanx14 = setInterval(qbuatMusuh14x, qdelay, 14);
}
}
function qbuatMusuh15x(indi) {
if (xPause == false) {
if (money2 >= daftarHarga[15]) {
if (bykKeluar2 < bykBuatChara) {
buatMusuh(indi);
money2 = money2 - daftarHarga[15];
}
}
clearInterval(idPasukanx15);
idPasukanx15 = setInterval(qbuatMusuh15x, qdelay, 15);
}
}
function qbuatMusuh16x(indi) {
if (xPause == false) {
if (money2 >= daftarHarga[16]) {
if (bykKeluar2 < bykBuatChara) {
buatMusuh(indi);
money2 = money2 - daftarHarga[16];
}
}
clearInterval(idPasukanx16);
idPasukanx16 = setInterval(qbuatMusuh16x, qdelay, 16);
}
}
function qbuatMusuh17x(indi) {
if (xPause == false) {
if (money2 >= daftarHarga[17]) {
if (bykKeluar2 < bykBuatChara) {
buatMusuh(indi);
money2 = money2 - daftarHarga[17];
}
}
clearInterval(idPasukanx17);
idPasukanx17 = setInterval(qbuatMusuh17x, qdelay, 17);
}
}
function setAI1() {
if (xPause == false) {
if (tipeMaen2 == "infantry") {
if (jenisMaenan == "single") {
cekWaktu(1);
idPasukanx1 = setInterval(qbuatMusuh1x, qdelay, 1);
cekWaktu(2);
idPasukanx2 = setInterval(qbuatMusuh2x, qdelay, 2);
cekWaktu(3);
idPasukanx3 = setInterval(qbuatMusuh3x, qdelay, 3);
cekWaktu(4);
idPasukanx4 = setInterval(qbuatMusuh4x, qdelay, 4);
cekWaktu(5);
idPasukanx5 = setInterval(qbuatMusuh5x, qdelay, 5);
cekWaktu(6);
idPasukanx6 = setInterval(qbuatMusuh6x, qdelay, 6);
cekWaktu(7);
idPasukanx7 = setInterval(qbuatMusuh7x, qdelay, 7);
cekWaktu(8);
idPasukanx8 = setInterval(qbuatMusuh8x, qdelay, 8);
cekWaktu(9);
idPasukanx9 = setInterval(qbuatMusuh9x, qdelay, 9);
} else {
if (xlevel >= 1) {
cekWaktu(1);
idPasukanx1 = setInterval(qbuatMusuh1x, qdelay, 1);
}
if (xlevel >= 1) {
cekWaktu(2);
idPasukanx2 = setInterval(qbuatMusuh2x, qdelay, 2);
}
if (xlevel >= 2) {
cekWaktu(3);
idPasukanx3 = setInterval(qbuatMusuh3x, qdelay, 3);
}
if (xlevel >= 3) {
cekWaktu(4);
idPasukanx4 = setInterval(qbuatMusuh4x, qdelay, 4);
}
if (xlevel >= 5) {
cekWaktu(5);
idPasukanx5 = setInterval(qbuatMusuh5x, qdelay, 5);
}
if (xlevel >= 5) {
cekWaktu(6);
idPasukanx6 = setInterval(qbuatMusuh6x, qdelay, 6);
}
if (xlevel >= 9) {
cekWaktu(7);
idPasukanx7 = setInterval(qbuatMusuh7x, qdelay, 7);
}
if (xlevel >= 11) {
cekWaktu(8);
idPasukanx8 = setInterval(qbuatMusuh8x, qdelay, 8);
}
if (xlevel >= 13) {
cekWaktu(9);
idPasukanx9 = setInterval(qbuatMusuh9x, qdelay, 9);
}
}
} else {
ambilPasukan1 = new Array();
xslotUnlok1 = new Array();
if (xlevel == 1) {
xslotUnlok1 = new Array("", 1, 2);
} else if (xlevel <= 2) {
xslotUnlok1 = new Array("", 1, 2, 3);
} else if (xlevel <= 4) {
xslotUnlok1 = new Array("", 1, 2, 3, 4);
} else if (xlevel <= 6) {
xslotUnlok1 = new Array("", 1, 2, 3, 4, 5);
} else if (xlevel <= 8) {
xslotUnlok1 = new Array("", 1, 2, 3, 4, 5, 6);
} else if (xlevel <= 10) {
xslotUnlok1 = new Array("", 1, 2, 3, 4, 5, 6, 7);
} else if (xlevel <= 12) {
xslotUnlok1 = new Array("", 1, 2, 3, 4, 5, 6, 7, 8);
} else if (xlevel >= 13) {
if (tipeSulitCampaign >= 2) {
if (xlevel <= 16) {
xslotUnlok1 = new Array("", 2, 3, 4, 5, 6, 7, 8, 9);
} else if (xlevel <= 19) {
xslotUnlok1 = new Array("", 3, 4, 5, 6, 7, 8, 9);
} else if (xlevel <= 21) {
xslotUnlok1 = new Array("", 4, 5, 6, 7, 8, 9);
} else if (xlevel <= 24) {
xslotUnlok1 = new Array("", 5, 6, 7, 8, 9);
} else if (xlevel <= 27) {
xslotUnlok1 = new Array("", 6, 7, 8, 9);
} else {
xslotUnlok1 = new Array("", 7, 8, 9);
}
} else {
xslotUnlok1 = new Array("", 1, 2, 3, 4, 5, 6, 7, 8, 9);
}
}
if (jenisMaenan == "single") {
xslotUnlok1 = new Array("", 1, 2, 3, 4, 5, 6, 7, 8, 9);
}
pasukanKe1 = 0;
i = 1;
while (i <= 9) {
if (daftarHarga[xslotUnlok1[i]] != "") {
if (money2 >= daftarHarga[xslotUnlok1[i]]) {
if (xslotUnlok1[i] != undefined) {
if (bykKeluar2 < bykBuatChara) {
ambilPasukan1[pasukanKe1] = xslotUnlok1[i];
pasukanKe1++;
}
}
}
}
i++;
}
if (pasukanKe1 > 0) {
rand = random(ambilPasukan1.length);
randJagoan1 = ambilPasukan1[rand];
money2 = money2 - daftarHarga[randJagoan1];
} else {
randJagoan1 = undefined;
}
cekWaktu(randJagoan1);
idPasukan1 = setInterval(qbuatMusuh1, qdelay, randJagoan1);
}
}
}
function setAI2() {
if (xPause == false) {
if (tipeMaen2 == "artillery") {
if (jenisMaenan == "single") {
cekWaktu(10);
idPasukanx10 = setInterval(qbuatMusuh10x, qdelay, 10);
cekWaktu(11);
idPasukanx11 = setInterval(qbuatMusuh11x, qdelay, 11);
cekWaktu(12);
idPasukanx12 = setInterval(qbuatMusuh12x, qdelay, 12);
cekWaktu(13);
idPasukanx13 = setInterval(qbuatMusuh13x, qdelay, 13);
cekWaktu(14);
idPasukanx14 = setInterval(qbuatMusuh14x, qdelay, 14);
cekWaktu(15);
idPasukanx15 = setInterval(qbuatMusuh15x, qdelay, 15);
cekWaktu(16);
idPasukanx16 = setInterval(qbuatMusuh16x, qdelay, 16);
cekWaktu(17);
idPasukanx17 = setInterval(qbuatMusuh17x, qdelay, 17);
} else {
if (xlevel >= 5) {
cekWaktu(10);
idPasukanx10 = setInterval(qbuatMusuh10x, qdelay, 10);
}
if (xlevel >= 7) {
cekWaktu(11);
idPasukanx11 = setInterval(qbuatMusuh11x, qdelay, 11);
}
if (xlevel >= 9) {
cekWaktu(12);
idPasukanx12 = setInterval(qbuatMusuh12x, qdelay, 12);
}
if (xlevel >= 11) {
cekWaktu(13);
idPasukanx13 = setInterval(qbuatMusuh13x, qdelay, 13);
}
if (xlevel >= 13) {
cekWaktu(14);
idPasukanx14 = setInterval(qbuatMusuh14x, qdelay, 14);
}
if (xlevel >= 15) {
cekWaktu(15);
idPasukanx15 = setInterval(qbuatMusuh15x, qdelay, 15);
}
if (xlevel >= 17) {
cekWaktu(16);
idPasukanx16 = setInterval(qbuatMusuh16x, qdelay, 16);
}
if (xlevel >= 19) {
cekWaktu(17);
idPasukanx17 = setInterval(qbuatMusuh17x, qdelay, 17);
}
}
} else {
ambilPasukan2 = new Array();
xslotUnlok2 = new Array();
if (xlevel <= 3) {
xslotUnlok2 = new Array("", 10);
} else if (xlevel <= 6) {
xslotUnlok2 = new Array("", 10, 11);
} else if (xlevel <= 9) {
xslotUnlok2 = new Array("", 10, 11, 12);
} else if (xlevel <= 12) {
xslotUnlok2 = new Array("", 10, 11, 12, 13);
} else if (xlevel <= 15) {
xslotUnlok2 = new Array("", 10, 11, 12, 13, 14);
} else if (xlevel <= 18) {
xslotUnlok2 = new Array("", 10, 11, 12, 13, 14, 15);
} else if (xlevel <= 21) {
xslotUnlok2 = new Array("", 10, 11, 12, 13, 14, 15, 16);
} else if (xlevel >= 22) {
if (tipeSulitCampaign >= 2) {
if (xlevel <= 25) {
xslotUnlok2 = new Array("", 11, 12, 13, 14, 15, 16, 17);
} else if (xlevel <= 28) {
xslotUnlok2 = new Array("", 12, 13, 14, 15, 16, 17);
} else if (xlevel <= 31) {
xslotUnlok2 = new Array("", 13, 14, 15, 16, 17);
} else if (xlevel <= 34) {
xslotUnlok2 = new Array("", 14, 15, 16, 17);
} else {
xslotUnlok2 = new Array("", 15, 16, 17);
}
} else {
xslotUnlok2 = new Array("", 10, 11, 12, 13, 14, 15, 16, 17);
}
}
if (jenisMaenan == "single") {
xslotUnlok2 = new Array("", 10, 11, 12, 13, 14, 15, 16, 17);
}
pasukanKe2 = 0;
i = 1;
while (i <= 9) {
if (daftarHarga[xslotUnlok2[i]] != "") {
if (money2 >= daftarHarga[xslotUnlok2[i]]) {
if (xslotUnlok2[i] != undefined) {
if (bykKeluar2 < bykBuatChara) {
ambilPasukan2[pasukanKe2] = xslotUnlok2[i];
pasukanKe2++;
}
}
}
}
i++;
}
if (pasukanKe2 > 0) {
rand = random(ambilPasukan2.length);
randJagoan2 = ambilPasukan2[rand];
money2 = money2 - daftarHarga[randJagoan2];
} else {
randJagoan2 = undefined;
}
cekWaktu(randJagoan2);
idPasukan2 = setInterval(qbuatMusuh2, qdelay, randJagoan2);
}
}
}
function qbuatMusuh31(indi) {
if (xPause == false) {
if (money2 >= daftarHarga[18]) {
if (bykKeluar2 < bykBuatChara) {
buatMusuh(indi);
money2 = money2 - daftarHarga[18];
}
}
clearInterval(idPasukan31);
idPasukan31 = setInterval(qbuatMusuh31, qdelay, 18);
}
}
function qbuatMusuh32(indi) {
if (xPause == false) {
if (money2 >= daftarHarga[19]) {
if (bykKeluar2 < bykBuatChara) {
buatMusuh(indi);
money2 = money2 - daftarHarga[19];
}
}
clearInterval(idPasukan32);
idPasukan32 = setInterval(qbuatMusuh32, qdelay, 19);
}
}
function qbuatMusuh33(indi) {
if (xPause == false) {
if (money2 >= daftarHarga[20]) {
if (bykKeluar2 < bykBuatChara) {
buatMusuh(indi);
money2 = money2 - daftarHarga[20];
}
}
clearInterval(idPasukan33);
idPasukan33 = setInterval(qbuatMusuh33, qdelay, 20);
}
}
function qbuatMusuh34(indi) {
if (xPause == false) {
if (money2 >= daftarHarga[21]) {
if (bykKeluar2 < bykBuatChara) {
buatMusuh(indi);
money2 = money2 - daftarHarga[21];
}
}
clearInterval(idPasukan34);
idPasukan34 = setInterval(qbuatMusuh34, qdelay, 21);
}
}
function qbuatMusuh35(indi) {
if (xPause == false) {
if (money2 >= daftarHarga[22]) {
if (bykKeluar2 < bykBuatChara) {
buatMusuh(indi);
money2 = money2 - daftarHarga[22];
}
}
clearInterval(idPasukan35);
idPasukan35 = setInterval(qbuatMusuh35, qdelay, 22);
}
}
function qbuatMusuh36(indi) {
if (xPause == false) {
if (money2 >= daftarHarga[23]) {
if (bykKeluar2 < bykBuatChara) {
buatMusuh(indi);
money2 = money2 - daftarHarga[23];
}
}
clearInterval(idPasukan36);
idPasukan36 = setInterval(qbuatMusuh36, qdelay, 23);
}
}
function qbuatMusuh37(indi) {
if (xPause == false) {
if (money2 >= daftarHarga[24]) {
if (bykKeluar2 < bykBuatChara) {
buatMusuh(indi);
money2 = money2 - daftarHarga[24];
}
}
clearInterval(idPasukan37);
idPasukan37 = setInterval(qbuatMusuh37, qdelay, 24);
}
}
function qbuatMusuh38(indi) {
if (xPause == false) {
if (money2 >= daftarHarga[25]) {
if (bykKeluar2 < bykBuatChara) {
buatMusuh(indi);
money2 = money2 - daftarHarga[25];
}
}
clearInterval(idPasukan38);
idPasukan38 = setInterval(qbuatMusuh38, qdelay, 25);
}
}
function setAI3() {
if (xPause == false) {
if (jenisPerang == "udara") {
if (jenisMaenan == "single") {
cekWaktu(18);
idPasukan31 = setInterval(qbuatMusuh31, qdelay, 18);
cekWaktu(19);
idPasukan32 = setInterval(qbuatMusuh32, qdelay, 19);
cekWaktu(20);
idPasukan33 = setInterval(qbuatMusuh33, qdelay, 20);
cekWaktu(21);
idPasukan34 = setInterval(qbuatMusuh34, qdelay, 21);
cekWaktu(22);
idPasukan35 = setInterval(qbuatMusuh35, qdelay, 22);
cekWaktu(23);
idPasukan36 = setInterval(qbuatMusuh36, qdelay, 23);
cekWaktu(24);
idPasukan37 = setInterval(qbuatMusuh37, qdelay, 24);
cekWaktu(25);
idPasukan38 = setInterval(qbuatMusuh38, qdelay, 25);
} else {
if (xlevel >= 13) {
cekWaktu(18);
idPasukan31 = setInterval(qbuatMusuh31, qdelay, 18);
}
if (xlevel >= 16) {
cekWaktu(19);
idPasukan32 = setInterval(qbuatMusuh32, qdelay, 19);
}
if (xlevel >= 18) {
cekWaktu(20);
idPasukan33 = setInterval(qbuatMusuh33, qdelay, 20);
}
if (xlevel >= 20) {
cekWaktu(21);
idPasukan34 = setInterval(qbuatMusuh34, qdelay, 21);
}
if (xlevel >= 22) {
cekWaktu(22);
idPasukan35 = setInterval(qbuatMusuh35, qdelay, 22);
}
if (xlevel >= 24) {
cekWaktu(23);
idPasukan36 = setInterval(qbuatMusuh36, qdelay, 23);
}
if (xlevel >= 26) {
cekWaktu(24);
idPasukan37 = setInterval(qbuatMusuh37, qdelay, 24);
}
if (xlevel >= 28) {
cekWaktu(25);
idPasukan38 = setInterval(qbuatMusuh38, qdelay, 25);
}
}
} else {
ambilPasukan3 = new Array();
xslotUnlok3 = new Array();
if (xlevel >= 14) {
if (xlevel == 14) {
xslotUnlok3 = new Array("", 18);
} else if (xlevel <= 16) {
xslotUnlok3 = new Array("", 18, 19);
} else if (xlevel <= 18) {
xslotUnlok3 = new Array("", 18, 19, 20);
} else if (xlevel <= 20) {
xslotUnlok3 = new Array("", 18, 19, 20, 21);
} else if (xlevel <= 22) {
xslotUnlok3 = new Array("", 18, 19, 20, 21, 22);
} else if (xlevel <= 24) {
xslotUnlok3 = new Array("", 18, 19, 20, 21, 22, 23);
} else if (xlevel <= 26) {
xslotUnlok3 = new Array("", 18, 19, 20, 21, 22, 23, 24);
} else if (xlevel >= 27) {
if (tipeSulitCampaign >= 2) {
if (xlevel <= 30) {
xslotUnlok3 = new Array("", 19, 20, 21, 22, 23, 24, 25);
} else if (xlevel <= 33) {
xslotUnlok3 = new Array("", 19, 21, 22, 23, 24, 25);
} else if (xlevel <= 36) {
xslotUnlok3 = new Array("", 19, 22, 23, 24, 25);
} else if (xlevel <= 39) {
xslotUnlok3 = new Array("", 19, 23, 24, 25);
} else {
xslotUnlok3 = new Array("", 19, 24, 25);
}
} else {
xslotUnlok3 = new Array("", 18, 19, 20, 21, 22, 23, 24, 25);
}
}
}
if (jenisMaenan == "single") {
xslotUnlok3 = new Array("", 18, 19, 20, 21, 22, 23, 24, 25);
}
pasukanKe3 = 0;
i = 1;
while (i <= 9) {
if (daftarHarga[xslotUnlok3[i]] != "") {
if (money2 >= daftarHarga[xslotUnlok3[i]]) {
if (xslotUnlok3[i] != undefined) {
if (bykKeluar2 < bykBuatChara) {
ambilPasukan3[pasukanKe3] = xslotUnlok3[i];
pasukanKe3++;
}
}
}
}
i++;
}
if (pasukanKe3 > 0) {
rand = random(ambilPasukan3.length);
randJagoan3 = ambilPasukan3[rand];
money2 = money2 - daftarHarga[randJagoan3];
} else {
randJagoan3 = undefined;
}
cekWaktu(randJagoan3);
idPasukan3 = setInterval(qbuatMusuh3, qdelay, randJagoan3);
}
}
}
function qbuatMusuh26(indi) {
if (xPause == false) {
if (money2 >= daftarHarga[26]) {
if (bykKeluar2 < bykBuatChara) {
buatMusuh(indi);
money2 = money2 - daftarHarga[26];
}
}
clearInterval(idPasukan26);
idPasukan26 = setInterval(qbuatMusuh26, qdelay, 26);
}
}
function qbuatMusuh27(indi) {
if (xPause == false) {
if (money2 >= daftarHarga[27]) {
if (bykKeluar2 < bykBuatChara) {
buatMusuh(indi);
money2 = money2 - daftarHarga[27];
}
}
clearInterval(idPasukan27);
idPasukan27 = setInterval(qbuatMusuh27, qdelay, 27);
}
}
function qbuatMusuh28(indi) {
if (xPause == false) {
if (money2 >= daftarHarga[28]) {
if (bykKeluar2 < bykBuatChara) {
buatMusuh(indi);
money2 = money2 - daftarHarga[28];
}
}
clearInterval(idPasukan28);
idPasukan28 = setInterval(qbuatMusuh28, qdelay, 28);
}
}
function qbuatMusuh29(indi) {
if (xPause == false) {
if (money2 >= daftarHarga[29]) {
if (bykKeluar2 < bykBuatChara) {
buatMusuh(indi);
money2 = money2 - daftarHarga[29];
}
}
clearInterval(idPasukan29);
idPasukan29 = setInterval(qbuatMusuh29, qdelay, 29);
}
}
function qbuatMusuh30(indi) {
if (xPause == false) {
if (money2 >= daftarHarga[30]) {
if (bykKeluar2 < bykBuatChara) {
buatMusuh(indi);
money2 = money2 - daftarHarga[30];
}
}
clearInterval(idPasukan30);
idPasukan30 = setInterval(qbuatMusuh30, qdelay, 30);
}
}
function setAI4() {
if (xPause == false) {
if (tipeMaen2 == "navy") {
if (jenisMaenan == "single") {
cekWaktu(26);
idPasukan26 = setInterval(qbuatMusuh26, qdelay, 26);
cekWaktu(27);
idPasukan27 = setInterval(qbuatMusuh27, qdelay, 27);
cekWaktu(28);
idPasukan28 = setInterval(qbuatMusuh28, qdelay, 28);
cekWaktu(29);
idPasukan29 = setInterval(qbuatMusuh29, qdelay, 29);
cekWaktu(30);
idPasukan30 = setInterval(qbuatMusuh30, qdelay, 30);
} else {
if (xlevel >= 9) {
cekWaktu(26);
idPasukan26 = setInterval(qbuatMusuh26, qdelay, 26);
}
if (xlevel >= 12) {
cekWaktu(27);
idPasukan27 = setInterval(qbuatMusuh27, qdelay, 27);
}
if (xlevel >= 15) {
cekWaktu(28);
idPasukan28 = setInterval(qbuatMusuh28, qdelay, 28);
}
if (xlevel >= 17) {
cekWaktu(29);
idPasukan29 = setInterval(qbuatMusuh29, qdelay, 29);
}
if (xlevel >= 19) {
cekWaktu(30);
idPasukan30 = setInterval(qbuatMusuh30, qdelay, 30);
}
}
} else {
ambilPasukan4 = new Array();
xslotUnlok4 = new Array();
if (xlevel >= 9) {
if (xlevel == 9) {
xslotUnlok4 = new Array("", 26);
} else if (xlevel <= 12) {
xslotUnlok4 = new Array("", 26, 27);
} else if (xlevel <= 15) {
xslotUnlok4 = new Array("", 26, 27, 28);
} else if (xlevel <= 18) {
xslotUnlok4 = new Array("", 26, 27, 28, 29);
} else if (xlevel >= 19) {
if (tipeSulitCampaign >= 2) {
if (xlevel <= 21) {
xslotUnlok4 = new Array("", 27, 28, 29, 30);
} else if (xlevel <= 24) {
xslotUnlok4 = new Array("", 28, 29, 30);
} else {
xslotUnlok4 = new Array("", 29, 30);
}
} else {
xslotUnlok4 = new Array("", 26, 27, 28, 29, 30);
}
}
}
if (jenisMaenan == "single") {
xslotUnlok4 = new Array("", 26, 27, 28, 29, 30);
}
pasukanKe4 = 0;
i = 1;
while (i <= 5) {
if (daftarHarga[xslotUnlok4[i]] != "") {
if (money2 >= daftarHarga[xslotUnlok4[i]]) {
if (xslotUnlok4[i] != undefined) {
if (bykKeluar2 < bykBuatChara) {
ambilPasukan4[pasukanKe4] = xslotUnlok4[i];
pasukanKe4++;
}
}
}
}
i++;
}
if (pasukanKe4 > 0) {
rand = random(ambilPasukan4.length);
randJagoan4 = ambilPasukan4[rand];
money2 = money2 - daftarHarga[randJagoan4];
} else {
randJagoan4 = undefined;
}
cekWaktu(randJagoan4x);
idPasukan4 = setInterval(qbuatMusuh4, qdelay, randJagoan4);
}
}
}
function setAI5() {
if (xPause == false) {
ambilPasukan5 = new Array();
xslotUnlok5 = new Array();
if (xlevel >= 10) {
if (xlevel == 10) {
xslotUnlok5 = new Array("", 31);
} else if (xlevel <= 12) {
xslotUnlok5 = new Array("", 31, 32);
} else if (xlevel >= 13) {
xslotUnlok5 = new Array("", 31, 32, 33);
}
}
if (jenisMaenan == "single") {
xslotUnlok5 = new Array("", 31, 32, 33);
}
pasukanKe5 = 0;
i = 1;
while (i <= 3) {
if (daftarHarga[xslotUnlok5[i]] != "") {
if (money2 >= daftarHarga[xslotUnlok5[i]]) {
if (xslotUnlok5[i] != undefined) {
ambilPasukan5[pasukanKe5] = xslotUnlok5[i];
pasukanKe5++;
}
}
}
i++;
}
arrrayPenjaga = new Array();
penjagaKe = 0;
i = 5;
while (i <= 7) {
if (_root["xpenjagaAda" + i] == false) {
arrrayPenjaga[penjagaKe] = i;
penjagaKe++;
}
i++;
}
if (penjagaKe > 0) {
rand = random(penjagaKe);
randJagoan5 = arrrayPenjaga[rand];
} else {
randJagoan5 = undefined;
}
if (pasukanKe5 > 0) {
rand = random(ambilPasukan5.length);
randJagoan5x = ambilPasukan5[rand];
money2 = money2 - daftarHarga[randJagoan5x];
} else {
randJagoan5x = undefined;
}
cekWaktu(randJagoan5x);
if (qdelay == undefined) {
qdelay = 5000;
}
idPasukan5 = setInterval(qbuatMusuh5, qdelay, randJagoan5, randJagoan5x);
}
}
function setAI7() {
if (xPause == false) {
ambilPasukan7 = new Array();
xslotUnlok7 = new Array();
if (xlevel >= 3) {
if (xlevel == 3) {
xslotUnlok7 = new Array("", 38);
} else if (xlevel <= 6) {
xslotUnlok7 = new Array("", 38, 39);
} else if (xlevel <= 9) {
xslotUnlok7 = new Array("", 38, 39, 40);
} else if (xlevel <= 12) {
xslotUnlok7 = new Array("", 38, 39, 40, 41);
} else if (xlevel >= 13) {
xslotUnlok7 = new Array("", 38, 39, 40, 41, 42);
}
}
if (jenisMaenan == "single") {
xslotUnlok7 = new Array("", 38, 39, 40, 41, 42);
}
pasukanKe7 = 0;
i = 1;
while (i <= 5) {
if (daftarHarga[xslotUnlok7[i]] != "") {
if (money2 >= daftarHarga[xslotUnlok7[i]]) {
if (xslotUnlok7[i] != undefined) {
ambilPasukan7[pasukanKe7] = xslotUnlok7[i];
pasukanKe7++;
}
}
}
i++;
}
arrrayPenjaga = new Array();
penjagaKe = 0;
i = 1;
while (i <= 4) {
if (_root["xpenjagaAda" + i] == false) {
arrrayPenjaga[penjagaKe] = i;
penjagaKe++;
}
i++;
}
if (penjagaKe > 0) {
rand = random(penjagaKe);
randJagoan7 = arrrayPenjaga[rand];
} else {
randJagoan7 = undefined;
}
if (pasukanKe7 > 0) {
rand = random(ambilPasukan7.length);
randJagoan7x = ambilPasukan7[rand];
money2 = money2 - daftarHarga[randJagoan7x];
} else {
randJagoan7x = undefined;
}
cekWaktu(randJagoan7x);
if (qdelay == undefined) {
qdelay = 5000;
}
idPasukan7 = setInterval(qbuatMusuh7, qdelay, randJagoan7, randJagoan7x);
}
}
function setAI8() {
if (xPause == false) {
ambilPasukan8 = new Array();
xslotUnlok8 = new Array();
if (xlevel >= 15) {
if (xlevel == 15) {
xslotUnlok8 = new Array("", 34);
} else if ((xlevel >= 16) && (xlevel <= 24)) {
xslotUnlok8 = new Array("", 34, 35);
} else if (xlevel == 25) {
xslotUnlok8 = new Array("", 34, 35, 36);
} else if (xlevel >= 26) {
xslotUnlok8 = new Array("", 34, 35, 36, 37);
}
}
if (jenisMaenan == "single") {
xslotUnlok8 = new Array("", 34, 35, 36, 37);
}
pasukanKe8 = 0;
i = 1;
while (i <= 4) {
if (daftarHarga[xslotUnlok8[i]] != "") {
if (money2 >= daftarHarga[xslotUnlok8[i]]) {
if (xslotUnlok8[i] != undefined) {
ambilPasukan8[pasukanKe8] = xslotUnlok8[i];
pasukanKe8++;
}
}
}
i++;
}
arrrayPenjaga = new Array();
penjagaKe = 0;
i = 8;
while (i <= 9) {
if (_root["xpenjagaAda" + i] == false) {
arrrayPenjaga[penjagaKe] = i;
penjagaKe++;
}
i++;
}
if (penjagaKe > 0) {
rand = random(penjagaKe);
randJagoan8 = arrrayPenjaga[rand];
} else {
randJagoan8 = undefined;
}
if (pasukanKe8 > 0) {
rand = random(ambilPasukan8.length);
randJagoan8x = ambilPasukan8[rand];
money2 = money2 - daftarHarga[randJagoan8x];
} else {
randJagoan8x = undefined;
}
cekWaktu(randJagoan8x);
if (qdelay == undefined) {
qdelay = 5000;
}
idPasukan8y = setInterval(qbuatMusuh8y, qdelay, randJagoan8, randJagoan8x);
}
}
function cekWaktu(indi) {
if (indi == 1) {
qdelay = 4000;
} else if (indi == 2) {
qdelay = 4000;
} else if (indi == 3) {
qdelay = 5000;
} else if (indi == 4) {
qdelay = "";
} else if (indi == 5) {
qdelay = 5000;
} else if (indi == 6) {
qdelay = 6000;
} else if (indi == 7) {
qdelay = 6000;
} else if (indi == 8) {
qdelay = 8000;
} else if (indi == 9) {
qdelay = 10000;
} else if (indi == 10) {
qdelay = 6000;
} else if (indi == 11) {
qdelay = 8000;
} else if (indi == 12) {
qdelay = 8000;
} else if (indi == 13) {
qdelay = 8000;
} else if (indi == 14) {
qdelay = 9000;
} else if (indi == 15) {
qdelay = 12000;
} else if (indi == 16) {
qdelay = 18000;
} else if (indi == 17) {
qdelay = 20000;
} else if (indi == 18) {
qdelay = 10000;
} else if (indi == 19) {
qdelay = 12000;
} else if (indi == 20) {
qdelay = 8000;
} else if (indi == 21) {
qdelay = 10000;
} else if (indi == 22) {
qdelay = 12000;
} else if (indi == 23) {
qdelay = 14000;
} else if (indi == 24) {
qdelay = 16000;
} else if (indi == 25) {
qdelay = 18000;
} else if (indi == 26) {
qdelay = 2000;
} else if (indi == 27) {
qdelay = 4000;
} else if (indi == 28) {
qdelay = 6000;
} else if (indi == 29) {
qdelay = 8000;
} else if (indi == 30) {
qdelay = 10000;
} else if (indi == 31) {
qdelay = 10000;
} else if (indi == 32) {
qdelay = 12000;
} else if (indi == 33) {
qdelay = 14000;
} else if (indi == 34) {
qdelay = 10000;
} else if (indi == 35) {
qdelay = 12000;
} else if (indi == 36) {
qdelay = 15000;
} else if (indi == 37) {
qdelay = 18000;
} else if (indi == 38) {
qdelay = 8000;
} else if (indi == 39) {
qdelay = 10000;
} else if (indi == 40) {
qdelay = 12000;
} else if (indi == 41) {
qdelay = 14000;
} else if (indi == 42) {
qdelay = 16000;
}
if (xlevel <= 3) {
qdelay = qdelay + 3500;
} else if (xlevel <= 6) {
qdelay = qdelay + 3000;
} else if (xlevel <= 9) {
qdelay = qdelay + 2500;
} else if (xlevel <= 12) {
qdelay = qdelay + 2000;
} else if (xlevel <= 15) {
qdelay = qdelay + 1500;
} else if (xlevel <= 18) {
qdelay = qdelay + 1000;
} else if (xlevel <= 21) {
qdelay = qdelay + 500;
} else if (xlevel <= 24) {
qdelay = qdelay + 0;
} else if (xlevel <= 27) {
qdelay = qdelay - 500;
} else if (xlevel >= 28) {
qdelay = qdelay - 1000;
}
if (jenisPerang == "udara") {
qdelay = qdelay + -1000;
} else {
qdelay = qdelay + 6000;
}
qdelay = Number(qdelay);
if (qdelay == undefined) {
qdelay = 0;
}
if (isNaN(qdelay) == true) {
qdelay = 0;
}
if (tipeSulitCampaign >= 2) {
if (xlevel <= 20) {
qdelay = qdelay - 3000;
}
}
if (tipeSulitCampaign >= 2) {
if (jenisPerang == "udara") {
if (qdelay <= 8000) {
qdelay = 8000;
} else if (qdelay >= 24000) {
qdelay = 24000;
}
} else if (qdelay <= 10000) {
qdelay = 10000;
} else if (qdelay >= 24000) {
qdelay = 24000;
}
} else if (jenisPerang == "udara") {
if (qdelay <= 10000) {
qdelay = 10000;
} else if (qdelay >= 24000) {
qdelay = 24000;
}
} else if (qdelay <= 12000) {
qdelay = 12000;
} else if (qdelay >= 24000) {
qdelay = 24000;
}
}
function qbuatMusuh1(indi) {
if (xPause == false) {
buatMusuh(indi);
clearInterval(idPasukan1);
setAI1();
}
}
function qbuatMusuh2(indi) {
if (xPause == false) {
buatMusuh(indi);
clearInterval(idPasukan2);
setAI2();
}
}
function qbuatMusuh3(indi) {
if (xPause == false) {
buatMusuh(indi);
clearInterval(idPasukan3);
setAI3();
}
}
function qbuatMusuh4(indi) {
if (xPause == false) {
buatMusuh(indi);
clearInterval(idPasukan4);
setAI4();
}
}
function qbuatMusuh5(indi, indi2) {
if (xPause == false) {
if ((indi != undefined) && (indi2 != undefined)) {
if (_root["xpenjagaAda" + indi] == false) {
_root["xpenjagaAda" + indi] = true;
buatPenjaga2(indi, indi2);
}
}
clearInterval(idPasukan5);
setAI5();
}
}
function qbuatMusuh7(indi, indi2) {
if (xPause == false) {
if ((indi != undefined) && (indi2 != undefined)) {
if (_root["xpenjagaAda" + indi] == false) {
_root["xpenjagaAda" + indi] = true;
buatPenjaga2(indi, indi2);
}
}
clearInterval(idPasukan7);
setAI7();
}
}
function qbuatMusuh8y(indi, indi2) {
if (xPause == false) {
if ((indi != undefined) && (indi2 != undefined)) {
if (_root["xpenjagaAda" + indi] == false) {
_root["xpenjagaAda" + indi] = true;
buatPenjaga2(indi, indi2);
}
}
clearInterval(idPasukan8y);
setAI8();
}
}
function buatMusuh(qrandJagoan) {
if (xPause == false) {
if (tipeGame == "demo") {
if (jenisPerang == "laut") {
arrayPasukan = new Array(27, 28, 29, 30, 31);
} else {
arrayPasukan = new Array(1, 2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 23, 24, 25);
}
if (jenisPerang == "laut") {
jenBattle = arrayPasukan.length;
} else if (jmlPasukan < (totPasukan * 0.5)) {
jenBattle = 22;
} else if (jmlPasukan < (totPasukan * 0.7)) {
jenBattle = 15;
} else if (jmlPasukan < (totPasukan * 0.9)) {
jenBattle = 12;
} else if (jmlPasukan < (totPasukan * 1)) {
jenBattle = 8;
}
rand = random(jenBattle);
randJagoan = arrayPasukan[rand];
} else {
randJagoan = qrandJagoan;
}
if (randJagoan != undefined) {
if (randJagoan <= 9) {
setTot = 4;
posAwalX = 0;
} else if (randJagoan <= 14) {
setTot = 2;
posAwalX = 1;
} else if (randJagoan == 26) {
setTot = 3;
posAwalX = 1;
} else if (randJagoan == 27) {
setTot = 2;
posAwalX = 1;
} else {
setTot = 1;
posAwalX = 0;
}
z = 1;
while (z <= setTot) {
if (xjmlPasukan2 > 0) {
if (bykKeluar2 < bykBuatChara) {
if (_root["chara" + troopsKe2] == undefined) {
if ((randJagoan >= 18) && (randJagoan <= 25)) {
if (jenisPerang == "udara") {
randPosisi = random(5);
xdalamJagoan = dalamJagoan + (randPosisi * 500);
} else {
randPosisi = 2;
xdalamJagoan = dalamJagoan + 2500;
}
} else {
randPosisi = random(5);
xdalamJagoan = dalamJagoan + (randPosisi * 500);
}
chara = attachMovie("xtroops" + randJagoan, "chara" + troopsKe2, xdalamJagoan);
bykKeluar2++;
xjmlPasukan2--;
if (randJagoan <= 9) {
chara.jenisPasukan = "orang";
chara._x = ((back._x + 1600) - ((375 + (randPosisi * 20)) / 2.3)) + random(100);
} else if (randJagoan >= 26) {
chara.jenisPasukan = "craft";
chara._x = (back._x + 1600) + 75;
} else if (randJagoan >= 18) {
chara.jenisPasukan = "craft";
chara._x = (back._x + 1600) + 150;
} else if (posAwalX >= 1) {
chara.jenisPasukan = "craft";
chara._x = (((back._x + 1600) - ((175 + (randPosisi * 20)) / 2.3)) + random(100)) + (posAwalX * 160);
posAwalX++;
} else {
chara.jenisPasukan = "craft";
chara._x = ((back._x + 1600) - ((175 + (randPosisi * 20)) / 2.3)) + random(100);
}
if (randJagoan >= 26) {
chara._y = ((225 + (randPosisi * 65)) + 25) - 60;
} else if (randJagoan >= 20) {
if (jenisPerang == "udara") {
if (randJagoan >= 23) {
chara._y = 165;
} else {
chara._y = ((200 + (randPosisi * 65)) + 25) - 60;
}
} else {
chara._y = 165;
}
} else if ((randJagoan >= 18) && (randJagoan <= 25)) {
if (jenisPerang == "udara") {
if (randJagoan >= 23) {
chara._y = 165;
} else {
chara._y = ((200 + (randPosisi * 65)) + 25) - 60;
}
} else {
rand = random(2);
if (rand == 0) {
chara._y = 200;
} else {
chara._y = 275;
}
}
} else {
chara._y = ((375 + (randPosisi * 30)) + 25) - 60;
}
chara._y = chara._y - naikBerapa;
chara.anim.gotoAndPlay(random(10) + 1);
if ((((randJagoan == 2) || (randJagoan == 4)) || (randJagoan == 5)) || (randJagoan == 6)) {
chara.tiarap = true;
chara.sedangTiarap = false;
}
chara.tipe = "musuh";
chara.posisi = randPosisi;
chara.xdalamEfek = 1;
chara.ztarget = undefined;
chara.mati = false;
chara.anim.gotoAndPlay(random(10) + 1);
if (randJagoan == 26) {
chara._xscale = (chara._yscale = 20);
chara._y = chara._y + 4;
chara._x = chara._x + 0;
} else if (randJagoan == 27) {
chara._xscale = (chara._yscale = 25);
chara._y = chara._y - 0;
chara._x = chara._x + 75;
} else if (randJagoan == 28) {
chara._xscale = (chara._yscale = 35);
chara._y = chara._y - 4;
chara._x = chara._x + 100;
} else if (randJagoan == 29) {
chara._xscale = (chara._yscale = 35);
chara._y = chara._y - 8;
chara._x = chara._x + 125;
} else if (randJagoan == 30) {
chara._xscale = (chara._yscale = 40);
chara._y = chara._y - 12;
chara._x = chara._x + 150;
} else if (randJagoan >= 18) {
if (jenisPerang == "laut") {
chara._xscale = (chara._yscale = 12);
} else {
chara._xscale = (chara._yscale = 35);
}
} else {
chara._xscale = (chara._yscale = 50);
}
if (jenisPerang == "udara") {
chara._xscale = (chara._yscale = 20);
}
chara.bar_mc._alpha = 0;
chara.jenis = randJagoan;
if (randJagoan <= 9) {
chara.bykJumlah = 4;
} else if (randJagoan <= 14) {
chara.bykJumlah = 2;
} else {
chara.bykJumlah = 1;
}
cekCharaAtribut();
if ((randJagoan >= 18) && (randJagoan <= 25)) {
chara.speedY = chara.speed / 2;
if (jenisPerang == "laut") {
chara.batasBawah = ((chara._y + 100) + random(125)) - naikBerapa;
} else {
chara.batasBawah = ((chara._y + 250) + random(125)) - naikBerapa;
}
chara.terbang = true;
} else {
chara.terbang = false;
}
if ((randJagoan >= 20) && (randJagoan <= 25)) {
chara.lewatSaja = true;
} else if ((randJagoan >= 26) && (randJagoan <= 30)) {
chara.lewatSaja = true;
} else {
chara.lewatSaja = false;
}
if ((randJagoan >= 23) && (randJagoan <= 25)) {
chara.ngebom = true;
}
chara.naikKe = undefined;
if (jenisPerang == "laut") {
if (chara.terbang == true) {
chara._y = 160;
rand = random(2) + 1;
chara.naikKe = chara._y - (50 * rand);
}
}
if (jenisPerang == "laut") {
if (chara.terbang == false) {
if (chara._y >= 385) {
chara._y = 385;
}
}
}
chara.onRollOver = overChara;
chara.onRollOut = outChara;
chara.onReleaseOutside = outChara;
chara.onEnterFrame = enterMusuh;
troopsKe2++;
if ((jenisMaenan == "single") && (tipeMaen2 == "")) {
if (troopsKe2 >= 121) {
troopsKe2 = 51;
}
} else if (tipeMaen2 == "artillery") {
if (troopsKe2 >= 36) {
troopsKe2 = 28;
}
} else if (troopsKe2 >= 53) {
troopsKe2 = 37;
}
dalamJagoan = dalamJagoan + 6;
if (dalamJagoan >= 7000) {
dalamJagoan = 2000;
}
if ((randJagoan >= 18) && (randJagoan <= 21)) {
backCopter();
} else if ((randJagoan >= 22) && (randJagoan <= 25)) {
backAir();
} else if ((randJagoan >= 26) && (randJagoan <= 31)) {
backBoat();
}
} else {
money2 = money2 + daftarHarga[randJagoan];
troopsKe2++;
if ((jenisMaenan == "single") && (tipeMaen2 == "")) {
if (troopsKe2 >= 121) {
troopsKe2 = 51;
}
} else if (tipeMaen2 == "artillery") {
if (troopsKe2 >= 36) {
troopsKe2 = 28;
}
} else if (troopsKe2 >= 53) {
troopsKe2 = 37;
}
}
} else {
money2 = money2 + daftarHarga[randJagoan];
}
}
z++;
}
}
}
}
function enterJagoan() {
if (xPause == false) {
if (sedangPause == false) {
if (this.jetSki == true) {
this.speed = 6;
} else if (this.jetSki2 == true) {
this.speed = this.speedAsli;
}
if (this._x >= _root["chara" + this.ztarget]._x) {
_root["chara" + this.ztarget] == undefined;
}
if (_root["chara" + this.ztarget] == undefined) {
i = 1;
while (i <= arrayMasuk.length) {
if (_root["chara" + arrayMasuk[i]].tipe == "musuh") {
if (_root["chara" + arrayMasuk[i]] != undefined) {
if (_root["chara" + arrayMasuk[i]]._visible == true) {
if (this.terbang == true) {
if (this.ngebom == true) {
this.jarak = Math.sqrt(Math.pow(this._x - _root["chara" + arrayMasuk[i]]._x, 2));
} else {
this.jarak = Math.sqrt(Math.pow(this._x - _root["chara" + arrayMasuk[i]]._x, 2) + Math.pow(this._y - _root["chara" + arrayMasuk[i]]._y, 2));
}
} else {
this.jarak = Math.sqrt(Math.pow(this._x - _root["chara" + arrayMasuk[i]]._x, 2));
}
if (this.terbang == true) {
this.garak = 0;
} else {
this.garak = 0;
}
if (this.jarak <= this.range) {
if (this.ngebom == true) {
this.ztarget = arrayMasuk[i];
} else if (this._x <= (_root["chara" + arrayMasuk[i]]._x + this.garak)) {
if ((this.posisi <= (_root["chara" + arrayMasuk[i]].posisi + 3)) && (this.posisi >= (_root["chara" + arrayMasuk[i]].posisi - 3))) {
this.ztarget = arrayMasuk[i];
}
}
}
}
}
}
i++;
}
}
if (this.terbang == true) {
this.garak = 0;
} else {
this.garak = 0;
}
if (this.ngebom != true) {
if ((((_root["chara" + this.ztarget] == undefined) || (_root["chara" + this.ztarget].live <= 0)) || (this._x <= (back._x + 100))) || (this._x > (_root["chara" + this.ztarget]._x - this.garak))) {
this.ztarget = undefined;
this.jarak = 99999 /* 0x01869F */;
} else if ((this._x <= back._x) || (this._x >= (back._x + 1600))) {
this.ztarget = undefined;
this.jarak = 99999 /* 0x01869F */;
} else if ((_root["chara" + this.ztarget]._x <= back._x) || (_root["chara" + this.ztarget]._x >= (back._x + 1600))) {
this.ztarget = undefined;
this.jarak = 99999 /* 0x01869F */;
} else if (this.terbang == true) {
this.jarak = Math.sqrt(Math.pow(this._x - _root["chara" + this.ztarget]._x, 2) + Math.pow(this._y - _root["chara" + this.ztarget]._y, 2));
} else {
this.jarak = Math.sqrt(Math.pow(this._x - _root["chara" + this.ztarget]._x, 2));
}
}
if (((_root["chara" + this.ztarget] == undefined) || (_root["chara" + this.ztarget]._visible == false)) || (_root["chara" + this.ztarget].live <= 0)) {
this.ztarget = undefined;
this.jarak = 99999 /* 0x01869F */;
}
if (this.jenisPasukan == "craft") {
i = 20;
while (i <= semuaPasukan) {
if (_root["chara" + i].jenisPasukan == "craft") {
if (_root["chara" + i] != this) {
if (this.hitTest(_root["chara" + i])) {
if (this.live > 0) {
if (_root["chara" + i].live > 0) {
if ((_root["chara" + i].kena != true) && (this.kena != true)) {
if (_root["chara" + i].tipe == "musuh") {
if (((_root["chara" + i].jenis >= 18) && (_root["chara" + i].jenis <= 30)) || ((_root["chara" + i].jenis >= 49) && (_root["chara" + i].jenis <= 50))) {
if (((this.jenis >= 18) && (this.jenis <= 30)) || ((this.jenis >= 49) && (this.jenis <= 50))) {
if (this.live < _root["chara" + i].live) {
_root["chara" + i].live = _root["chara" + i].live - this.live;
this.live = 0;
this.terbang = false;
this.ledakBanyak = true;
} else if (this.live > _root["chara" + i].live) {
this.live = this.live - _root["chara" + i].live;
_root["chara" + i].live = 0;
_root["chara" + i].terbang = false;
_root["chara" + i].ledakBanyak = true;
} else {
this.live = 0;
this.terbang = false;
this.ledakBanyak = true;
_root["chara" + i].live = 0;
_root["chara" + i].terbang = false;
_root["chara" + i].ledakBanyak = true;
}
}
}
}
}
}
}
}
}
}
i++;
}
}
if (this.live <= 0) {
if (this.mati == false) {
if (jenisPerang == "udara") {
this.live = 0;
this.terbang = false;
this.ledakBanyak = true;
}
if (this.jenis <= 9) {
infantry1++;
} else if (this.jenis <= 17) {
artillery1++;
} else if (this.jenis <= 25) {
airforce1++;
} else if (this.jenis <= 30) {
navy1++;
}
if (this.jenis <= 30) {
unitMati2++;
}
cekHarga(this.jenis);
naekUang = Math.ceil((hargaKe / this.bykJumlah) * naikHarga);
money2 = money2 + naekUang;
this.enabled = false;
delete this.onRollOver;
delete this.onRollOut;
delete this.onReleaseOutside;
delete this.onRelease;
if (this.jenisPasukan == "craft") {
cekPecah(this);
if (this.ledakBanyak == true) {
if (rand == 0) {
wefek = attachMovie("efek9", "xefek" + dalamEfek, dalamEfek);
} else {
wefek = attachMovie("efek7", "xefek" + dalamEfek, dalamEfek);
}
if (jenisPerang == "laut") {
wefek._xscale = (wefek._yscale = random(75) + 75);
} else if (jenisPerang == "udara") {
wefek._xscale = (wefek._yscale = random(150) + 125);
} else {
wefek._xscale = (wefek._yscale = random(200) + 200);
}
wefek._x = this._x;
wefek._y = this._y;
dalamEfek++;
if (dalamEfek > 36020) {
dalamEfek = 36000;
}
} else if (this.terbang == false) {
if (jenisPerang == "darat") {
rand = random(2);
retak = attachMovie("retak_mc", "retak_mc" + dalamRetak, dalamRetak);
retak._x = (this._x - 5) + random(10);
retak._y = (this._y - 5) + random(10);
retak._xscale = (retak._yscale = random(75) + 75);
dalamRetak++;
if (dalamRetak >= 520) {
dalamRetak = 500;
}
}
}
backLedak();
} else {
backMati();
}
bykKeluar1--;
jmlPasukan--;
this.mati = true;
if (this.jenisPasukan == "craft") {
if (this.ledakBanyak == true) {
this.gotoAndStop(5);
} else {
this.gotoAndStop(3);
}
} else if (this._currentframe == 5) {
this.gotoAndStop(7);
} else {
this.gotoAndStop(3);
}
}
if (this.terbang == true) {
this._y = this._y + this.speedY;
this._x = this._x + 3;
this.speedY = this.speedY + 0.5;
this._rotation = this._rotation + 0.5;
if (this._y >= this.batasBawah) {
i = 1;
while (i <= arrayMasuk.length) {
if (_root["chara" + arrayMasuk[i]].indi.hitTest(this)) {
if (_root["chara" + arrayMasuk[i]] != undefined) {
if (this.damage == undefined) {
this.damage = 100;
}
_root["chara" + arrayMasuk[i]].live = _root["chara" + arrayMasuk[i]].live - (this.damage * 5);
if (_root["chara" + arrayMasuk[i]].benteng1 == true) {
money1 = money1 + Math.ceil((this.damage * 5) / kurangTambah);
money2 = money2 + Math.ceil((this.damage * 10) / kurangTambah);
} else if (_root["chara" + arrayMasuk[i]].benteng2 == true) {
money2 = money2 + Math.ceil((this.damage * 5) / kurangTambah);
money1 = money1 + Math.ceil((this.damage * 10) / kurangTambah);
}
}
} else if (_root["chara" + arrayMasuk[i]].hitTest(this)) {
if (_root["chara" + arrayMasuk[i]] != undefined) {
if (this.damage == undefined) {
this.damage = 100;
}
_root["chara" + arrayMasuk[i]].live = _root["chara" + arrayMasuk[i]].live - (this.damage * 5);
if (_root["chara" + arrayMasuk[i]].benteng1 == true) {
money1 = money1 + Math.ceil((this.damage * 5) / kurangTambah);
money2 = money2 + Math.ceil((this.damage * 10) / kurangTambah);
} else if (_root["chara" + arrayMasuk[i]].benteng2 == true) {
money2 = money2 + Math.ceil((this.damage * 5) / kurangTambah);
money1 = money1 + Math.ceil((this.damage * 10) / kurangTambah);
}
}
}
i++;
}
this.terbang = false;
if (this.terbang == false) {
if (jenisPerang == "darat") {
retak = attachMovie("retak_mc", "retak_mc" + dalamRetak, dalamRetak);
retak._x = (this._x - 5) + random(10);
retak._y = (this._y - 5) + random(10);
retak._xscale = (retak._yscale = random(75) + 75);
dalamRetak++;
if (dalamRetak >= 520) {
dalamRetak = 500;
}
}
}
if ((jenisPerang == "laut") || (jenisKe2 == "laut")) {
wefek = attachMovie("semburAir", "xefek" + dalamEfek, dalamEfek);
wefek._xscale = (wefek._yscale = random(15) + 25);
wefek._x = this._x;
wefek._y = this._y;
dalamEfek++;
if (dalamEfek > 36020) {
dalamEfek = 36000;
}
backWater();
} else if (tipeMaen == "pantai1") {
if (this._x <= (benteng1._x + 600)) {
wefek = attachMovie("semburAir", "xefek" + dalamEfek, dalamEfek);
wefek._xscale = (wefek._yscale = random(25) + 50);
wefek._x = this._x;
wefek._y = this._y;
dalamEfek++;
if (dalamEfek > 36020) {
dalamEfek = 36000;
}
backWater();
}
}
backLedak();
}
} else if ((this.jenis >= 27) && (this.jenis <= 31)) {
this._x = this._x - 0.25;
}
if (((this.ledakBanyak == true) && (this.jenis >= 18)) && (this.jenis <= 25)) {
cekEfek(this, 8, "gila");
removeMovieClip(this);
} else if ((this.ledakBanyak == true) && ((this.jenis >= 49) && (this.jenis <= 50))) {
cekEfek(this, 8, "gila");
removeMovieClip(this);
}
if (this.jetSki == true) {
wefek = attachMovie("semburAir", "xefek" + dalamEfek, dalamEfek);
wefek._xscale = (wefek._yscale = random(15) + 25);
wefek._x = this._x;
wefek._y = this._y;
dalamEfek++;
if (dalamEfek > 36020) {
dalamEfek = 36000;
}
backWater();
removeMovieClip(this);
}
} else if (this.jarak <= this.range) {
if (this.lewatSaja == true) {
if (((_root["chara" + this.ztarget].terbang == true) && (this.ngebom == true)) && (jenisPerang != "udara")) {
this.ztarget = undefined;
this.jarak = 99999 /* 0x01869F */;
if (this.jetSki == true) {
if (this._x >= (back._x + this.batasJet)) {
this.gotoAndStop(1);
this.jetSki = false;
this.lewatSaja = false;
} else {
this.gotoAndStop(8);
}
} else {
this.gotoAndStop(1);
}
} else if (this.jetSki == true) {
if (this._x >= (back._x + this.batasJet)) {
this.gotoAndStop(1);
this.jetSki = false;
this.lewatSaja = false;
} else {
this.gotoAndStop(8);
}
} else {
this.gotoAndStop(2);
}
this._x = this._x + this.speed;
if (this.naikKe != undefined) {
if (this._y >= this.naikKe) {
this._y = this._y - 0.25;
}
}
} else if (this.melayang == true) {
this._y = this._y + this.speedLayang;
if (this._y >= this.jatuh) {
if (this.sekaliLayang == undefined) {
this.sekaliLayang = true;
this.speedLayang = 0;
this.anim.gotoAndPlay("mendarat");
}
}
} else if (this.tiarap == true) {
if (this.sedangTiarap == false) {
this.gotoAndStop(5);
this.delayq = 0;
this.sedangTiarap = true;
}
} else {
this.gotoAndStop(2);
}
} else if ((this.lewatSaja == true) && (this.tipe <= 27)) {
if (this.jetSki == true) {
if (this._x >= (back._x + this.batasJet)) {
this.gotoAndStop(1);
this.jetSki = false;
this.lewatSaja = false;
} else {
this.gotoAndStop(8);
}
} else {
this.gotoAndStop(1);
}
this._x = this._x + this.speed;
if (this.naikKe != undefined) {
if (this._y >= this.naikKe) {
this._y = this._y - 0.25;
}
}
} else if (this._currentframe == 2) {
if (this.anim._currentframe == 1) {
this.kena = false;
this.gotoAndStop(1);
this._x = this._x + this.speed;
}
} else if (this._currentframe == 5) {
this.delayq++;
if (this.delayq >= 100) {
this.delayq = 0;
this.sedangTiarap = false;
this.gotoAndStop(6);
}
} else if (this.melayang == true) {
this._y = this._y + this.speedLayang;
if (this._y >= this.jatuh) {
if (this.sekaliLayang == undefined) {
this.sekaliLayang = true;
this.speedLayang = 0;
this.anim.gotoAndPlay("mendarat");
}
}
} else if ((this._currentframe == 1) || (this._currentframe == 4)) {
bisaLewat = true;
if (this.jenisPasukan == "craft") {
i = 1;
while (i <= arrayMasuk.length) {
if (_root["chara" + arrayMasuk[i]].jenisPasukan == "craft") {
if (_root["chara" + arrayMasuk[i]] != this) {
if (_root["chara" + arrayMasuk[i]].posisi == this.posisi) {
if (this.indi.hitTest(_root["chara" + arrayMasuk[i]])) {
if (_root["chara" + arrayMasuk[i]].live > 0) {
if ((_root["chara" + arrayMasuk[i]].kena != true) && (this.kena != true)) {
if (_root["chara" + arrayMasuk[i]]._x >= (benteng1._x + 300)) {
if ((this.jenis <= 17) || (this.jenis == 48)) {
_root["chara" + arrayMasuk[i]].kena = false;
this.kena = false;
this.charaKena = _root["chara" + arrayMasuk[i]];
this.sementara = true;
bisaLewat = false;
}
}
}
}
}
}
}
}
i++;
}
}
if (bisaLewat == true) {
if (this.sementara == true) {
if (this._x <= (this.charaKena._x - 300)) {
this.sementara = false;
this.kena = false;
this.gotoAndStop(1);
this._x = this._x + this.speed;
if (this.naikKe != undefined) {
if (this._y >= this.naikKe) {
this._y = this._y - 0.25;
}
}
} else {
this.gotoAndStop(4);
}
} else {
this.sementara = false;
this.kena = false;
this.gotoAndStop(1);
this._x = this._x + this.speed;
if (this.naikKe != undefined) {
if (this._y >= this.naikKe) {
this._y = this._y - 0.25;
}
}
}
} else {
this.gotoAndStop(4);
}
}
if (this.terbang == true) {
if ((((this.jenis == 18) || (this.jenis == 19)) || (this.jenis == 49)) && (jenisPerang != "udara")) {
if (this._x >= (benteng2._x - 150)) {
if (this.live > 0) {
if (this.lewatSaja == false) {
this.speed = 0;
this.gotoAndStop(2);
totDefense = 0;
}
}
} else if ((((jenisMorale == "defense") && (this._x >= (benteng2._x - 800))) && (this.sekaliDefense == undefined)) && (this.kacauSaja == undefined)) {
if (this.live > 0) {
if (this.lewatSaja == false) {
this.kacauSaja = true;
this.sekaliDefense = true;
totDefense++;
this.speed = 0;
}
}
} else if (jenisMorale == "defense") {
if (this.sekaliDefense == true) {
if (this._currentframe == 1) {
this.gotoAndStop(4);
deploy._visible = true;
}
}
if (totDefense >= 12) {
if (this.live > 0) {
i = 0;
while (i <= semuaPasukan) {
if (_root["chara" + i].sekaliDefense == true) {
_root["chara" + i].sekaliDefense = false;
_root["chara" + i].speed = daftarSpeed[_root["chara" + i].jenis];
_root["chara" + i].gotoAndStop(2);
} else {
_root["chara" + i].sekaliDefense = undefined;
}
i++;
}
totDefense = 0;
deploy._visible = false;
}
}
}
} else if (this._x >= (benteng2._x + 1000)) {
this._x = benteng1._x - 1000;
jmlPasukan2--;
xjmlPasukan2--;
cekHarga(this.jenis);
naekUang = Math.ceil(hargaKe * naikHarga);
if (isNaN(naekUang)) {
naekUang = 1000;
}
money2 = money2 + naekUang;
}
} else if (this._x >= (benteng2._x + 500)) {
this._x = benteng1._x - 500;
jmlPasukan2--;
xjmlPasukan2--;
cekHarga(this.jenis);
naekUang = Math.ceil(hargaKe * naikHarga);
if (isNaN(naekUang)) {
naekUang = 1000;
}
money2 = money2 + naekUang;
} else if (this._x >= (benteng2._x - 150)) {
if (this.lewatSaja == false) {
if (this.live > 0) {
this.speed = 0;
this.gotoAndStop(2);
}
}
} else if ((((jenisMorale == "defense") && (this._x >= (benteng2._x - 800))) && (this.sekaliDefense == undefined)) && (this.kacauSaja == undefined)) {
if (this.live > 0) {
if (this.lewatSaja == false) {
this.kacauSaja = true;
this.sekaliDefense = true;
totDefense++;
this.speed = 0;
}
}
} else if (jenisMorale == "defense") {
if (this.sekaliDefense == true) {
if (this._currentframe == 1) {
this.gotoAndStop(4);
deploy._visible = true;
}
}
if (totDefense >= 12) {
if (this.live > 0) {
i = 0;
while (i <= semuaPasukan) {
if (_root["chara" + i].sekaliDefense == true) {
_root["chara" + i].sekaliDefense = false;
_root["chara" + i].speed = daftarSpeed[_root["chara" + i].jenis];
_root["chara" + i].gotoAndStop(2);
} else {
_root["chara" + i].sekaliDefense = undefined;
}
i++;
}
totDefense = 0;
deploy._visible = false;
}
}
}
if ((jenisPerang == "udara") || (jenisPerang == "laut")) {
if ((((this.jenis >= 18) && (this.jenis <= 25)) || (this.jenis == 49)) || (this.jenis == 50)) {
this.bar_mc._xscale = 150;
this.bar_mc._yscale = 500;
}
}
this.bar_mc.bar._xscale = Math.ceil((this.live / this.totLive) * 100);
if (this.bar_mc.bar._xscale <= 0) {
this.bar_mc._visible = false;
}
}
}
}
function cekEfek(indi, indi2, indi3) {
if (xPause == false) {
randx = random(2);
if (indi3 == "gila") {
randx = 1;
}
if (randx == 1) {
if ((indi != undefined) && (indi2 != undefined)) {
if ((((indi2 == 8) || (indi2 == 22)) || (indi2 == 29)) || (indi2 == 48)) {
rand = random(2);
if (rand == 0) {
wefek = attachMovie("efek9", "xefek" + dalamEfek, dalamEfek);
} else {
wefek = attachMovie("efek11", "xefek" + dalamEfek, dalamEfek);
}
wefek._xscale = (wefek._yscale = random(50) + 50);
if (indi.jenis > 10) {
wefek._x = (indi._x - 20) + random(10);
wefek._y = (indi._y - 20) + random(10);
} else {
wefek._x = indi._x;
wefek._y = indi._y;
}
dalamEfek++;
if (dalamEfek > 36020) {
dalamEfek = 36000;
}
backLedak();
} else if (indi2 == 3) {
rand = random(2);
if (indi._y >= 250) {
if (indi.hitTest(benteng1.indi) || (indi.hitTest(benteng2.indi))) {
wefek = attachMovie("efek3", "xefek" + dalamEfek, dalamEfek);
} else {
zrand = random(2);
if (zrand == 0) {
wefek = attachMovie("efek3x", "xefek" + dalamEfek, dalamEfek);
} else {
wefek = attachMovie("efek11", "xefek" + dalamEfek, dalamEfek);
}
}
} else {
wefek = attachMovie("efek3", "xefek" + dalamEfek, dalamEfek);
}
wefek._xscale = (wefek._yscale = random(50) + 50);
wefek._x = indi._x;
wefek._y = indi._y - 20;
dalamEfek++;
if (dalamEfek > 36020) {
dalamEfek = 36000;
}
backLedak();
} else if (indi2 == 7) {
rand = random(2);
if (rand == 0) {
wefek = attachMovie("efek7", "xefek" + dalamEfek, dalamEfek);
} else {
wefek = attachMovie("efek11", "xefek" + dalamEfek, dalamEfek);
}
wefek._xscale = (wefek._yscale = random(50) + 50);
wefek._x = indi._x;
wefek._y = indi._y;
dalamEfek++;
if (dalamEfek > 36020) {
dalamEfek = 36000;
}
backLedak();
} else if ((((indi2 >= 15) && (indi2 <= 17)) || (indi2 == 19)) || (indi2 == 9)) {
rand = random(2);
if (rand == 0) {
wefek = attachMovie("efek9", "xefek" + dalamEfek, dalamEfek);
} else {
wefek = attachMovie("efek11", "xefek" + dalamEfek, dalamEfek);
}
wefek._xscale = (wefek._yscale = random(75) + 75);
if (indi.jenis > 10) {
wefek._x = (indi._x - 20) + random(10);
wefek._y = (indi._y - 20) + random(10);
} else {
wefek._x = indi._x;
wefek._y = indi._y;
}
dalamEfek++;
if (dalamEfek > 36020) {
dalamEfek = 36000;
}
backLedak();
} else {
rand = random(2);
if (rand == 0) {
wefek = attachMovie("efek9", "xefek" + dalamEfek, dalamEfek);
} else {
wefek = attachMovie("efek11", "xefek" + dalamEfek, dalamEfek);
}
wefek._xscale = (wefek._yscale = random(50) + 50);
if (indi.jenis > 10) {
wefek._x = (indi._x - 20) + random(10);
wefek._y = (indi._y - 20) + random(10);
} else {
wefek._x = indi._x;
wefek._y = indi._y;
}
dalamEfek++;
if (dalamEfek > 36020) {
dalamEfek = 36000;
}
backLedak();
}
if (jenisPerang == "laut") {
backAir();
wefek = attachMovie("efek10", "xefek" + dalamEfek, dalamEfek);
wefek._xscale = (wefek._yscale = random(50) + 50);
wefek._x = indi._x;
wefek._y = indi._y - 20;
dalamEfek++;
if (dalamEfek > 36020) {
dalamEfek = 36000;
}
backLedak();
}
if (indi3 == "gila") {
wefek._xscale = (wefek._yscale = random(100) + 100);
}
if (((((indi2 >= 7) && (indi2 <= 9)) || ((indi2 >= 15) && (indi2 <= 17))) || (indi2 == 19)) || (indi2 == 24)) {
if (indi._y >= 250) {
if (jenisPerang == "darat") {
if (tipeMaen == "pantai1") {
if (this._x >= (benteng1._x + 700)) {
retak = attachMovie("retak_mc", "retak_mc" + dalamRetak, dalamRetak);
retak._x = (indi._x - 5) + random(10);
retak._y = (indi._y - 5) + random(10);
retak._xscale = (retak._yscale = random(75) + 75);
dalamRetak++;
if (dalamRetak >= 520) {
dalamRetak = 500;
}
}
} else {
retak = attachMovie("retak_mc", "retak_mc" + dalamRetak, dalamRetak);
retak._x = (indi._x - 5) + random(10);
retak._y = (indi._y - 5) + random(10);
retak._xscale = (retak._yscale = random(75) + 75);
dalamRetak++;
if (dalamRetak >= 520) {
dalamRetak = 500;
}
}
}
}
backLedak();
}
}
}
}
}
function cekLauncher(indi) {
if (xPause == false) {
if (indi.penjaga == true) {
dalamKe = dalamEfek;
dalamEfek++;
if (dalamEfek > 36020) {
dalamEfek = 36000;
}
} else {
dalamKe = indi.getDepth() + indi.xdalamEfek;
}
granat = attachMovie("granat_mc", "efek" + efekKe, dalamKe);
if (indi.tipe == "musuh") {
granat._x = indi._x - 30;
} else {
granat._x = indi._x + 30;
}
if (indi2 == "craft") {
if (indi.jenis == 15) {
granat._y = indi._y - 100;
} else {
granat._y = indi._y - 60;
}
} else {
granat._y = indi._y - 40;
}
granat.jenis = indi.jenis;
granat._xscale = (granat._yscale = 30);
granat.indi = indi;
granat.damage = indi.damage;
granat.xtipe = 3;
if (indi.tipe == "musuh") {
if (indi2 == "craft") {
granat.speedX = (-random(7)) - 16;
} else {
granat.speedX = (-random(12)) - 23;
}
} else if (indi2 == "craft") {
granat.speedX = random(7) + 16;
} else {
granat.speedX = random(12) + 23;
}
granat.speedY = random(9) + 9;
granat.speedX = granat.speedX * 0.75;
granat.speedY = granat.speedY * 1;
if (_root["chara" + granat.indi.ztarget] != undefined) {
if (_root["chara" + granat.indi.ztarget].terbang == true) {
granat.bawah = (350 + random(100)) - naikBerapa;
} else {
granat.bawah = _root["chara" + granat.indi.ztarget]._y - random(10);
}
} else {
i = 1;
while (i <= arrayMasuk.length) {
if (_root["chara" + arrayMasuk[i]] != this) {
if (_root["chara" + arrayMasuk[i]] != undefined) {
if (_root["chara" + arrayMasuk[i]].terbang == true) {
granat.bawah = (350 + random(100)) - naikBerapa;
} else {
granat.bawah = _root["chara" + arrayMasuk[i]]._y - random(10);
}
}
}
i++;
}
}
if (_root["chara" + granat.indi.ztarget].terbang == true) {
granat.xdelay = 1;
} else {
granat.xdelay = random(5) + 5;
}
granat.terbang = indi.terbang;
granat.jatuh = false;
granat.turun = 1.5;
granat.onEnterFrame = enterGranat;
efekKe++;
if (efekKe >= 50) {
efekKe = 1;
}
indi.xdalamEfek++;
if (indi.xdalamEfek >= 4) {
indi.xdalamEfek = 1;
}
}
}
function cekGranat(indi, indi2, indi3, indi4) {
if (xPause == false) {
if (indi.penjaga == true) {
dalamKe = dalamEfek;
dalamEfek++;
if (dalamEfek > 36020) {
dalamEfek = 36000;
}
} else {
dalamKe = indi.getDepth() + indi.xdalamEfek;
}
granat = attachMovie("granat_mc", "efek" + efekKe, dalamKe);
if (indi.jenis == 18) {
if (indi.tipe == "musuh") {
granat._x = indi._x - 90;
} else {
granat._x = indi._x;
}
} else if (indi3 != undefined) {
if (indi.tipe == "musuh") {
granat._x = indi._x - indi3;
} else {
granat._x = indi._x + indi3;
}
} else {
granat._x = indi._x;
}
if (indi2 == "craft") {
if (indi.jenis == 15) {
granat._y = indi._y - 100;
} else {
granat._y = indi._y - 60;
}
} else {
granat._y = indi._y - 40;
}
granat.jenis = indi.jenis;
granat._xscale = (granat._yscale = 25);
granat.indi = indi;
granat.damage = indi.damage;
granat.xtipe = 3;
if (indi.tipe == "musuh") {
if (indi2 == "craft") {
if (indi.jenis == 15) {
granat.speedX = (-random(8)) - 18;
} else {
granat.speedX = (-random(7)) - 16;
}
} else if (indi.penjaga == true) {
granat.speedX = (-random(5)) - 14;
} else {
granat.speedX = (-random(7)) - 12;
}
} else if (indi2 == "craft") {
if (indi.jenis == 15) {
granat.speedX = random(8) + 18;
} else {
granat.speedX = random(7) + 16;
}
} else if (indi.penjaga == true) {
granat.speedX = random(5) + 14;
} else {
granat.speedX = random(7) + 12;
}
granat.speedY = random(9) + 9;
if (_root["chara" + granat.indi.ztarget] != undefined) {
if (_root["chara" + granat.indi.ztarget].terbang == true) {
granat.bawah = (350 + random(100)) - naikBerapa;
} else {
granat.bawah = _root["chara" + granat.indi.ztarget]._y - random(10);
}
} else {
i = 1;
while (i <= arrayMasuk.length) {
if (_root["chara" + arrayMasuk[i]] != this) {
if (_root["chara" + arrayMasuk[i]] != undefined) {
if (_root["chara" + arrayMasuk[i]].terbang == true) {
granat.bawah = (350 + random(100)) - naikBerapa;
} else {
granat.bawah = _root["chara" + arrayMasuk[i]]._y - random(10);
}
}
}
i++;
}
}
if (_root["chara" + granat.indi.ztarget].terbang == true) {
granat.xdelay = 1;
} else {
granat.xdelay = random(5) + 5;
}
granat.terbang = indi.terbang;
granat.jatuh = false;
granat.turun = 1.5;
granat.onEnterFrame = enterGranat;
efekKe++;
if (efekKe >= 50) {
efekKe = 1;
}
indi.xdalamEfek++;
if (indi.xdalamEfek >= 4) {
indi.xdalamEfek = 1;
}
}
}
function enterGranat() {
if (xPause == false) {
if (this.jatuh == false) {
this._x = this._x + this.speedX;
this._y = this._y - this.speedY;
this.speedY = this.speedY - this.turun;
this._rotation = this._rotation + this.speedY;
} else {
this._rotation = this._rotation + this.speedY;
this.xdelay--;
if (this.xdelay <= 0) {
this.gotoAndStop(2);
i = 1;
while (i <= arrayMasuk.length) {
if (_root["chara" + arrayMasuk[i]].indi.hitTest(this.radius)) {
if (_root["chara" + arrayMasuk[i]] != undefined) {
_root["chara" + arrayMasuk[i]].live = _root["chara" + arrayMasuk[i]].live - this.damage;
if (_root["chara" + arrayMasuk[i]].benteng1 == true) {
money1 = money1 + Math.ceil(this.damage / kurangTambah);
money2 = money2 + Math.ceil(this.damage / (kurangTambah * 2));
} else if (_root["chara" + arrayMasuk[i]].benteng2 == true) {
money2 = money2 + Math.ceil(this.damage / kurangTambah);
money1 = money1 + Math.ceil(this.damage / (kurangTambah * 2));
}
}
} else if (_root["chara" + arrayMasuk[i]].hitTest(this.radius)) {
if (_root["chara" + arrayMasuk[i]] != undefined) {
_root["chara" + arrayMasuk[i]].live = _root["chara" + arrayMasuk[i]].live - this.damage;
if (_root["chara" + arrayMasuk[i]].benteng1 == true) {
money1 = money1 + Math.ceil(this.damage / kurangTambah);
money2 = money2 + Math.ceil(this.damage / (kurangTambah * 2));
} else if (_root["chara" + arrayMasuk[i]].benteng2 == true) {
money2 = money2 + Math.ceil(this.damage / kurangTambah);
money1 = money1 + Math.ceil(this.damage / (kurangTambah * 2));
}
}
}
i++;
}
cekEfek(this, this.xtipe, this.ytipe);
removeMovieClip(this);
}
}
if (this._y >= this.bawah) {
if (this.speedY <= 0) {
if (this.jatuh == false) {
if (jenisPerang == "laut") {
cekEfek(this, this.xtipe, this.ytipe);
removeMovieClip(this);
} else {
this.jatuh = true;
}
}
}
}
if (_root["chara" + this.indi.ztarget].benteng == true) {
if (this.hitTest(_root["chara" + this.indi.ztarget].indi)) {
_root["chara" + this.indi.ztarget].live = _root["chara" + this.indi.ztarget].live - this.damage;
if (_root["chara" + this.indi.ztarget].benteng1 == true) {
money1 = money1 + Math.ceil(this.damage / kurangTambah);
money2 = money2 + Math.ceil(this.damage / (kurangTambah * 2));
} else if (_root["chara" + this.indi.ztarget].benteng2 == true) {
money2 = money2 + Math.ceil(this.damage / kurangTambah);
money1 = money1 + Math.ceil(this.damage / (kurangTambah * 2));
}
cekEfek(this, this.xtipe, this.ytipe);
removeMovieClip(this);
}
} else if (this.hitTest(_root["chara" + this.indi.ztarget])) {
_root["chara" + this.indi.ztarget].live = _root["chara" + this.indi.ztarget].live - this.damage;
if (_root["chara" + this.indi.ztarget].benteng1 == true) {
money1 = money1 + Math.ceil(this.damage / kurangTambah);
money2 = money2 + Math.ceil(this.damage / (kurangTambah * 2));
} else if (_root["chara" + this.indi.ztarget].benteng2 == true) {
money2 = money2 + Math.ceil(this.damage / kurangTambah);
money1 = money1 + Math.ceil(this.damage / (kurangTambah * 2));
}
cekEfek(this, this.xtipe, this.ytipe);
removeMovieClip(this);
}
}
}
function cekMortir(indi, indi2) {
if (xPause == false) {
if (indi.penjaga == true) {
dalamKe = dalamEfek;
dalamEfek++;
if (dalamEfek > 36020) {
dalamEfek = 36000;
}
} else {
dalamKe = indi.getDepth() + indi.xdalamEfek;
}
if (indi.tipe == "musuh") {
if (indi2 == 7) {
mortar = attachMovie("xmortir_mc", "efek" + efekKe, dalamKe);
} else if ((((indi2 >= 15) && (indi2 <= 17)) || (indi2 == 9)) || (indi2 == 48)) {
mortar = attachMovie("mortir_mc2", "efek" + efekKe, dalamKe);
} else {
mortar = attachMovie("mortir_mc", "efek" + efekKe, dalamKe);
}
if (indi2 == 16) {
mortar._x = indi._x - 200;
mortar._y = indi._y - 53;
} else if (indi2 == 17) {
mortar._x = indi._x - 150;
mortar._y = indi._y - 43;
} else if (indi2 == 19) {
mortar._x = indi._x - 40;
mortar._y = indi._y - 10;
} else if (indi2 == 29) {
mortar._x = indi._x;
mortar._y = indi._y - 10;
} else {
mortar._x = indi._x - 30;
mortar._y = indi._y - 30;
}
} else {
if (indi2 == 7) {
mortar = attachMovie("xmortir_mc", "efek" + efekKe, dalamKe);
} else if ((((indi2 >= 15) && (indi2 <= 17)) || (indi2 == 9)) || (indi2 == 48)) {
mortar = attachMovie("mortir_mc2", "efek" + efekKe, dalamKe);
} else {
mortar = attachMovie("mortir_mc", "efek" + efekKe, dalamKe);
}
if (indi2 == 16) {
mortar._x = indi._x + 200;
mortar._y = indi._y - 53;
} else if (indi2 == 17) {
mortar._x = indi._x + 150;
mortar._y = indi._y - 43;
} else if (indi2 == 19) {
mortar._x = indi._x + 30;
mortar._y = indi._y - 10;
} else if (indi2 == 29) {
mortar._x = indi._x;
mortar._y = indi._y - 10;
} else {
mortar._x = indi._x + 30;
mortar._y = indi._y - 30;
}
}
if (indi2 == 8) {
mortar.xkena = true;
} else {
mortar.xkena = true;
}
mortar.jenis = indi.jenis;
mortar._xscale = (mortar._yscale = 30);
mortar.indi = indi;
mortar.damage = indi.damage;
mortar.terbang = indi.terbang;
if (indi2 == undefined) {
mortar.xtipe = indi.jenis;
} else {
mortar.xtipe = indi2;
}
if ((((indi2 >= 15) && (indi2 <= 17)) || (indi2 == 9)) || (indi2 == 48)) {
mortar.ytipe = "gede";
} else {
mortar.ytipe = "kecil";
}
if (indi.tipe == "musuh") {
mortar.tipe = "musuh";
if (indi2 == 7) {
mortar.speed = 15;
} else if ((((indi2 >= 15) && (indi2 <= 17)) || (indi2 == 9)) || (indi2 == 48)) {
mortar.speed = 25;
} else {
mortar.speed = 20;
}
if ((((indi2 >= 15) && (indi2 <= 17)) || (indi2 == 9)) || (indi2 == 48)) {
mortar.jarak = ((mortar._x - indi.range) - 40) + random(20);
} else {
mortar.jarak = ((mortar._x - indi.range) - 40) + random(20);
}
} else {
mortar.tipe = "jagoan";
if (indi2 == 7) {
mortar.speed = 15;
} else if ((((indi2 >= 15) && (indi2 <= 17)) || (indi2 == 9)) || (indi2 == 48)) {
mortar.speed = 25;
} else {
mortar.speed = 20;
}
if ((((indi2 >= 15) && (indi2 <= 17)) || (indi2 == 9)) || (indi2 == 48)) {
mortar.jarak = ((mortar._x + indi.range) + 40) - random(20);
} else {
mortar.jarak = ((mortar._x + indi.range) + 40) - random(20);
}
}
if (indi.tipe == "musuh") {
if ((indi._x <= (_root["chara" + indi.ztarget]._x + 200)) || (_root["chara" + indi.ztarget] == undefined)) {
if (indi2 >= 18) {
tengahX = indi._x - indi.range;
tengahY = (indi._y + 200) + random(100);
} else {
tengahX = indi._x - indi.range;
tengahY = indi._y - 30;
}
indi.ztarget = undefined;
} else {
tengahX = _root["chara" + indi.ztarget]._x;
tengahY = _root["chara" + indi.ztarget]._y - 30;
}
} else if (indi.tipe == "jagoan") {
if ((indi._x >= (_root["chara" + indi.ztarget]._x - 200)) || (_root["chara" + indi.ztarget] == undefined)) {
if (indi2 >= 18) {
tengahX = indi._x + indi.range;
tengahY = (indi._y + 200) + random(100);
} else {
tengahX = indi._x + indi.range;
tengahY = indi._y - 30;
}
indi.ztarget = undefined;
} else {
tengahX = _root["chara" + indi.ztarget]._x;
tengahY = _root["chara" + indi.ztarget]._y - 30;
}
}
mortar.qtarget = _root["chara" + indi.ztarget];
x1 = mortar._x - tengahX;
y1 = mortar._y - tengahY;
sudut = 57.29578 * Math.atan(y1 / x1);
if (((sudut >= -90) && (sudut <= 90)) && (x1 >= 0)) {
mortar._rotation = sudut + 180;
} else {
mortar._rotation = sudut;
}
if (((indi2 >= 15) && (indi2 <= 17)) || (indi2 == 48)) {
if (indi.tipe == "musuh") {
mortar._rotation = 180;
} else {
mortar._rotation = 0;
}
}
if (indi.penjaga == true) {
if (indi.tipe == "jagoan") {
indi.anim.tangan._rotation = mortar._rotation;
if (indi.anim.tangan._rotation < 0) {
mortar._x = mortar._x + 25;
mortar._y = mortar._y - indi.anim.tangan._rotation;
} else if (indi.anim.tangan._rotation > 0) {
mortar._x = mortar._x + 25;
mortar._y = mortar._y + indi.anim.tangan._rotation;
} else {
mortar._x = mortar._x + 25;
}
} else {
indi.anim.tangan._rotation = -mortar._rotation;
mortar._y = mortar._y + 15;
mortar._y = mortar._y - (indi.anim.tangan._rotation / 25);
mortar._x = mortar._x - 50;
}
}
if (indi2 == 48) {
mortar._x = mortar._x + 30;
mortar._y = mortar._y - 30;
}
if ((mortar.jenis == 8) | (mortar.jenis == 37)) {
if (mortar.qtarget == undefined) {
mortar.onEnterFrame = enterMortar;
} else {
mortar.onEnterFrame = enterMortar2;
}
} else {
mortar.onEnterFrame = enterMortar;
}
efekKe++;
if (efekKe >= 50) {
efekKe = 1;
}
indi.xdalamEfek++;
if (indi.xdalamEfek >= 4) {
indi.xdalamEfek = 1;
}
}
}
function enterMortar2() {
this.aimX = this.qtarget._x;
this.aimY = this.qtarget._y;
deltaX = this._x - this.aimX;
deltaY = this._y - this.aimY;
angle = (-Math.atan2(deltaX, deltaY)) / (Math.PI/180);
if (this.qtarget == undefined) {
this.onEnterFrame = enterMortar;
} else if (Math.sqrt((deltaX * deltaX) + (deltaY * deltaY)) > this.speed) {
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.tipe == "musuh") {
this.gotoAndStop(2);
i = 1;
while (i <= arrayMasuk.length) {
if (_root["chara" + arrayMasuk[i]].indi.hitTest(this.radius)) {
if (_root["chara" + arrayMasuk[i]] != undefined) {
_root["chara" + arrayMasuk[i]].live = _root["chara" + arrayMasuk[i]].live - this.damage;
if (_root["chara" + arrayMasuk[i]].benteng1 == true) {
money1 = money1 + Math.ceil(this.damage / kurangTambah);
money2 = money2 + Math.ceil(this.damage / (kurangTambah * 2));
} else if (_root["chara" + arrayMasuk[i]].benteng2 == true) {
money2 = money2 + Math.ceil(this.damage / kurangTambah);
money1 = money1 + Math.ceil(this.damage / (kurangTambah * 2));
}
}
} else if (_root["chara" + arrayMasuk[i]].hitTest(this.radius)) {
if (_root["chara" + arrayMasuk[i]] != undefined) {
_root["chara" + arrayMasuk[i]].live = _root["chara" + arrayMasuk[i]].live - this.damage;
if (_root["chara" + arrayMasuk[i]].benteng1 == true) {
money1 = money1 + Math.ceil(this.damage / kurangTambah);
money2 = money2 + Math.ceil(this.damage / (kurangTambah * 2));
} else if (_root["chara" + arrayMasuk[i]].benteng2 == true) {
money2 = money2 + Math.ceil(this.damage / kurangTambah);
money1 = money1 + Math.ceil(this.damage / (kurangTambah * 2));
}
}
}
i++;
}
cekEfek(this, this.xtipe, this.ytipe);
removeMovieClip(this);
} else {
this.gotoAndStop(2);
i = 1;
while (i <= arrayMasuk.length) {
if (_root["chara" + arrayMasuk[i]].indi.hitTest(this.radius)) {
if (_root["chara" + arrayMasuk[i]] != undefined) {
_root["chara" + arrayMasuk[i]].live = _root["chara" + arrayMasuk[i]].live - this.damage;
if (_root["chara" + arrayMasuk[i]].benteng1 == true) {
money1 = money1 + Math.ceil(this.damage / kurangTambah);
money2 = money2 + Math.ceil(this.damage / (kurangTambah * 2));
} else if (_root["chara" + arrayMasuk[i]].benteng2 == true) {
money2 = money2 + Math.ceil(this.damage / kurangTambah);
money1 = money1 + Math.ceil(this.damage / (kurangTambah * 2));
}
}
} else if (_root["chara" + arrayMasuk[i]].hitTest(this.radius)) {
if (_root["chara" + arrayMasuk[i]] != undefined) {
_root["chara" + arrayMasuk[i]].live = _root["chara" + arrayMasuk[i]].live - this.damage;
if (_root["chara" + arrayMasuk[i]].benteng1 == true) {
money1 = money1 + Math.ceil(this.damage / kurangTambah);
money2 = money2 + Math.ceil(this.damage / (kurangTambah * 2));
} else if (_root["chara" + arrayMasuk[i]].benteng2 == true) {
money2 = money2 + Math.ceil(this.damage / kurangTambah);
money1 = money1 + Math.ceil(this.damage / (kurangTambah * 2));
}
}
}
i++;
}
cekEfek(this, this.xtipe, this.ytipe);
removeMovieClip(this);
}
}
function enterMortar() {
if (xPause == false) {
if (this.tipe == "musuh") {
this._x = this._x + (this.speed * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speed * Math.sin((-this._rotation) * 0.017453));
this.speed = this.speed + 1;
if (this._x <= this.jarak) {
this.gotoAndStop(2);
i = 1;
while (i <= arrayMasuk.length) {
if (_root["chara" + arrayMasuk[i]].indi.hitTest(this.radius)) {
if (_root["chara" + arrayMasuk[i]] != undefined) {
_root["chara" + arrayMasuk[i]].live = _root["chara" + arrayMasuk[i]].live - this.damage;
if (_root["chara" + arrayMasuk[i]].benteng1 == true) {
money1 = money1 + Math.ceil(this.damage / kurangTambah);
money2 = money2 + Math.ceil(this.damage / (kurangTambah * 2));
} else if (_root["chara" + arrayMasuk[i]].benteng2 == true) {
money2 = money2 + Math.ceil(this.damage / kurangTambah);
money1 = money1 + Math.ceil(this.damage / (kurangTambah * 2));
}
}
} else if (_root["chara" + arrayMasuk[i]].hitTest(this.radius)) {
if (_root["chara" + arrayMasuk[i]] != undefined) {
_root["chara" + arrayMasuk[i]].live = _root["chara" + arrayMasuk[i]].live - this.damage;
if (_root["chara" + arrayMasuk[i]].benteng1 == true) {
money1 = money1 + Math.ceil(this.damage / kurangTambah);
money2 = money2 + Math.ceil(this.damage / (kurangTambah * 2));
} else if (_root["chara" + arrayMasuk[i]].benteng2 == true) {
money2 = money2 + Math.ceil(this.damage / kurangTambah);
money1 = money1 + Math.ceil(this.damage / (kurangTambah * 2));
}
}
}
i++;
}
cekEfek(this, this.xtipe, this.ytipe);
removeMovieClip(this);
} else if (_root["chara" + this.indi.ztarget] != undefined) {
if (_root["chara" + this.indi.ztarget].benteng == true) {
if (this.hitTest(_root["chara" + this.indi.ztarget].indi) && (this.xkena == true)) {
this.gotoAndStop(2);
_root["chara" + this.indi.ztarget].live = _root["chara" + this.indi.ztarget].live - this.damage;
if (_root["chara" + this.indi.ztarget].benteng1 == true) {
money1 = money1 + Math.ceil(this.damage / kurangTambah);
money2 = money2 + Math.ceil(this.damage / (kurangTambah * 2));
} else if (_root["chara" + this.indi.ztarget].benteng2 == true) {
money2 = money2 + Math.ceil(this.damage / kurangTambah);
money1 = money1 + Math.ceil(this.damage / (kurangTambah * 2));
}
cekEfek(this, this.xtipe, this.ytipe);
removeMovieClip(this);
}
} else if (this.hitTest(_root["chara" + this.indi.ztarget]) && (this.xkena == true)) {
this.gotoAndStop(2);
_root["chara" + this.indi.ztarget].live = _root["chara" + this.indi.ztarget].live - this.damage;
if (_root["chara" + this.indi.ztarget].benteng1 == true) {
money1 = money1 + Math.ceil(this.damage / kurangTambah);
money2 = money2 + Math.ceil(this.damage / (kurangTambah * 2));
} else if (_root["chara" + this.indi.ztarget].benteng2 == true) {
money2 = money2 + Math.ceil(this.damage / kurangTambah);
money1 = money1 + Math.ceil(this.damage / (kurangTambah * 2));
}
cekEfek(this, this.xtipe, this.ytipe);
removeMovieClip(this);
}
}
} else if (this.tipe == "jagoan") {
this._x = this._x + (this.speed * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speed * Math.sin((-this._rotation) * 0.017453));
this.speed = this.speed + 1;
if (this._x >= this.jarak) {
this.gotoAndStop(2);
i = 1;
while (i <= arrayMasuk.length) {
if (_root["chara" + arrayMasuk[i]].indi.hitTest(this.radius)) {
if (_root["chara" + arrayMasuk[i]] != undefined) {
_root["chara" + arrayMasuk[i]].live = _root["chara" + arrayMasuk[i]].live - this.damage;
if (_root["chara" + arrayMasuk[i]].benteng1 == true) {
money1 = money1 + Math.ceil(this.damage / kurangTambah);
money2 = money2 + Math.ceil(this.damage / (kurangTambah * 2));
} else if (_root["chara" + arrayMasuk[i]].benteng2 == true) {
money2 = money2 + Math.ceil(this.damage / kurangTambah);
money1 = money1 + Math.ceil(this.damage / (kurangTambah * 2));
}
}
} else if (_root["chara" + arrayMasuk[i]].hitTest(this.radius)) {
if (_root["chara" + arrayMasuk[i]] != undefined) {
_root["chara" + arrayMasuk[i]].live = _root["chara" + arrayMasuk[i]].live - this.damage;
if (_root["chara" + arrayMasuk[i]].benteng1 == true) {
money1 = money1 + Math.ceil(this.damage / kurangTambah);
money2 = money2 + Math.ceil(this.damage / (kurangTambah * 2));
} else if (_root["chara" + arrayMasuk[i]].benteng2 == true) {
money2 = money2 + Math.ceil(this.damage / kurangTambah);
money1 = money1 + Math.ceil(this.damage / (kurangTambah * 2));
}
}
}
i++;
}
cekEfek(this, this.xtipe, this.ytipe);
removeMovieClip(this);
} else if (_root["chara" + this.indi.ztarget] != undefined) {
if (_root["chara" + this.indi.ztarget].benteng == true) {
if (this.hitTest(_root["chara" + this.indi.ztarget].indi) && (this.xkena == true)) {
this.gotoAndStop(2);
_root["chara" + this.indi.ztarget].live = _root["chara" + this.indi.ztarget].live - this.damage;
if (_root["chara" + this.indi.ztarget].benteng1 == true) {
money1 = money1 + Math.ceil(this.damage / kurangTambah);
money2 = money2 + Math.ceil(this.damage / (kurangTambah * 2));
} else if (_root["chara" + this.indi.ztarget].benteng2 == true) {
money2 = money2 + Math.ceil(this.damage / kurangTambah);
money1 = money1 + Math.ceil(this.damage / (kurangTambah * 2));
}
cekEfek(this, this.xtipe, this.ytipe);
removeMovieClip(this);
}
} else if (this.hitTest(_root["chara" + this.indi.ztarget]) && (this.xkena == true)) {
this.gotoAndStop(2);
if (_root["chara" + this.indi.ztarget].benteng1 == true) {
money1 = money1 + Math.ceil(this.damage / kurangTambah);
money2 = money2 + Math.ceil(this.damage / (kurangTambah * 2));
} else if (_root["chara" + this.indi.ztarget].benteng2 == true) {
money2 = money2 + Math.ceil(this.damage / kurangTambah);
money1 = money1 + Math.ceil(this.damage / (kurangTambah * 2));
}
_root["chara" + this.indi.ztarget].live = _root["chara" + this.indi.ztarget].live - this.damage;
cekEfek(this, this.xtipe, this.ytipe);
removeMovieClip(this);
}
}
}
if ((((this._y >= 1000) || (this._y <= -1000)) || (this._x >= 2000)) || (this._x <= -2000)) {
removeMovieClip(this);
}
}
}
function cekPistol(indi) {
if (xPause == false) {
rand = random(3);
if (rand == 0) {
if (indi.penjaga == true) {
dalamKe = dalamEfek;
dalamEfek++;
if (dalamEfek > 36020) {
dalamEfek = 36000;
}
} else {
dalamKe = indi.getDepth() + indi.xdalamEfek;
}
pistol = attachMovie("pistol_mc", "efek" + efekKe, dalamKe);
pistol._x = indi._x + 15;
pistol._y = indi._y - 30;
pistol._xscale = (pistol._yscale = 100);
pistol.indi = indi;
if (indi.tipe == "musuh") {
pistol.speedX = (-random(5)) - 15;
} else {
pistol.speedX = random(5) + 15;
}
pistol.speedY = random(7) + 7;
pistol.xdelay = random(10) + 10;
pistol.jatuh = false;
pistol.turun = 1.5;
tengahX = _root["chara" + pistol.indi.ztarget]._x;
tengahY = _root["chara" + pistol.indi.ztarget]._y - 30;
x1 = pistol._x - tengahX;
y1 = pistol._y - tengahY;
sudut = 57.29578 * Math.atan(y1 / x1);
if (((sudut >= -90) && (sudut <= 90)) && (x1 >= 0)) {
pistol._rotation = sudut + 180;
} else {
pistol._rotation = sudut;
}
pistol.jenis = indi.jenis;
pistol.terbang = indi.terbang;
pistol.xtipe = 1;
cekEfek(pistol, pistol.tipe);
efekKe++;
if (efekKe >= 50) {
efekKe = 1;
}
}
indi.xdalamEfek++;
if (indi.xdalamEfek >= 4) {
indi.xdalamEfek = 1;
}
}
}
function cekBomb(indi) {
if (xPause == false) {
i = 1;
while (i <= 2) {
bomb = attachMovie("bomb_mc", "xefek" + dalamEfek, dalamEfek);
bomb._xscale = (bomb._yscale = 35);
bomb._x = (indi._x - 20) + random(40);
bomb._y = (indi._y - 10) + random(30);
bomb.tipe = indi.tipe;
bomb.speed = random(4) + 0.5;
bomb.speedBawah = 0.5;
bomb.damage = indi.damage;
bomb.xtipe = 29;
if ((jenisPerang == "laut") || (jenisPerang == "udara")) {
bomb.batasBawah = ((indi._y + 100) + random(300)) - naikBerapa;
} else {
bomb.batasBawah = ((indi._y + 200) + random(300)) - naikBerapa;
}
bomb.onEnterFrame = enterBomb;
dalamEfek++;
if (dalamEfek > 36020) {
dalamEfek = 36000;
}
i++;
}
}
}
function enterBomb() {
if (xPause == false) {
if (this.tipe == "musuh") {
this._x = this._x - 3;
this._rotation = this._rotation - 3;
} else {
this._x = this._x + 3;
this._rotation = this._rotation + 3;
}
this._y = this._y + this.speed;
this.speed = this.speed + this.speedBawah;
if (this._y >= this.batasBawah) {
this.gotoAndStop(2);
i = 1;
while (i <= arrayMasuk.length) {
if (_root["chara" + arrayMasuk[i]].indi.hitTest(this.radius)) {
if (_root["chara" + arrayMasuk[i]] != undefined) {
if (_root["chara" + arrayMasuk[i]] != this) {
_root["chara" + arrayMasuk[i]].live = _root["chara" + arrayMasuk[i]].live - this.damage;
if (_root["chara" + arrayMasuk[i]].benteng1 == true) {
money1 = money1 + Math.ceil(this.damage / kurangTambah);
money2 = money2 + Math.ceil(this.damage / (kurangTambah * 2));
} else if (_root["chara" + arrayMasuk[i]].benteng2 == true) {
money2 = money2 + Math.ceil(this.damage / kurangTambah);
money1 = money1 + Math.ceil(this.damage / (kurangTambah * 2));
}
}
}
} else if (_root["chara" + arrayMasuk[i]].hitTest(this.radius)) {
if (_root["chara" + arrayMasuk[i]] != undefined) {
if (_root["chara" + arrayMasuk[i]] != this) {
_root["chara" + arrayMasuk[i]].live = _root["chara" + arrayMasuk[i]].live - this.damage;
if (_root["chara" + arrayMasuk[i]].benteng1 == true) {
money1 = money1 + Math.ceil(this.damage / kurangTambah);
money2 = money2 + Math.ceil(this.damage / (kurangTambah * 2));
} else if (_root["chara" + arrayMasuk[i]].benteng2 == true) {
money2 = money2 + Math.ceil(this.damage / kurangTambah);
money1 = money1 + Math.ceil(this.damage / (kurangTambah * 2));
}
}
}
}
i++;
}
cekEfek(this, this.xtipe, this.ytipe);
removeMovieClip(this);
}
}
}
function cekKena(indi, indi2, indi3, indi4) {
if (xPause == false) {
bisaTembak = true;
if (indi2 != undefined) {
if (indi2 == 1) {
if (indi.jenis != 15) {
randx = random(3);
if (randx == 0) {
cekPistol(indi);
}
}
efekLangsung = true;
} else if (indi2 == 3) {
cekGranat(indi, "craft", indi3, indi4);
efekLangsung = false;
} else if ((indi2 >= 7) && (indi2 <= 9)) {
if (indi.jenis == 10) {
cekMortir(indi, 7);
} else {
cekMortir(indi, indi.jenis);
}
efekLangsung = false;
}
} else if (indi.jenis == 3) {
cekGranat(indi);
efekLangsung = false;
} else if (indi.jenis == 4) {
cekLauncher(indi);
efekLangsung = false;
} else if (indi.jenis == 5) {
efekLangsung = true;
} else if ((indi.jenis >= 7) && (indi.jenis <= 9)) {
cekMortir(indi, indi.jenis);
efekLangsung = false;
} else if ((indi.jenis >= 10) && (indi.jenis <= 14)) {
randx = random(3);
if (randx == 0) {
cekPistol(indi);
}
efekLangsung = true;
} else if (indi.jenis == 17) {
efekLangsung = true;
} else if (indi.jenis == 18) {
randx = random(3);
if (randx == 0) {
cekPistol(indi);
efekLangsung = true;
}
} else if (indi.jenis == 23) {
cekBomb(indi);
efekLangsung = false;
} else if (indi.jenis == 24) {
cekBomb(indi);
efekLangsung = false;
} else if (indi.jenis == 25) {
cekBomb(indi);
efekLangsung = false;
} else {
randx = random(3);
if (randx == 0) {
cekPistol(indi);
}
efekLangsung = true;
}
if (efekLangsung == true) {
_root["chara" + indi.ztarget].live = _root["chara" + indi.ztarget].live - (indi.damage * 2);
if (_root["chara" + indi.ztarget].benteng1 == true) {
money1 = money1 + Math.ceil((indi.damage * 2) / kurangTambah);
money2 = money2 + Math.ceil((indi.damage * 1) / kurangTambah);
} else if (_root["chara" + indi.ztarget].benteng2 == true) {
money2 = money2 + Math.ceil((indi.damage * 2) / kurangTambah);
money1 = money1 + Math.ceil((indi.damage * 1) / kurangTambah);
}
}
if (indi.tipe == "jagoan") {
naekUang = Math.ceil(indi.damage / 4);
money2 = money2 + naekUang;
} else if (indi.tipe == "musuh") {
naekUang = Math.ceil(indi.damage / 4);
money1 = money1 + naekUang;
}
}
}
function enterMusuh() {
if (xPause == false) {
if (sedangPause == false) {
if (this._x <= _root["chara" + this.ztarget]._x) {
_root["chara" + this.ztarget] == undefined;
}
if (_root["chara" + this.ztarget] == undefined) {
i = 1;
while (i <= arrayMasuk.length) {
if (_root["chara" + arrayMasuk[i]].tipe == "jagoan") {
if (_root["chara" + arrayMasuk[i]] != undefined) {
if (_root["chara" + arrayMasuk[i]]._visible == true) {
if (this.terbang == true) {
if (this.ngebom == true) {
this.jarak = Math.sqrt(Math.pow(this._x - _root["chara" + arrayMasuk[i]]._x, 2));
} else {
this.jarak = Math.sqrt(Math.pow(this._x - _root["chara" + arrayMasuk[i]]._x, 2) + Math.pow(this._y - _root["chara" + arrayMasuk[i]]._y, 2));
}
} else {
this.jarak = Math.sqrt(Math.pow(this._x - _root["chara" + arrayMasuk[i]]._x, 2));
}
if (this.terbang == true) {
this.garak = 0;
} else {
this.garak = 0;
}
if (this.jarak <= this.range) {
if (this.ngebom == true) {
this.ztarget = arrayMasuk[i];
} else if (this._x >= (_root["chara" + arrayMasuk[i]]._x - this.garak)) {
if ((this.posisi <= (_root["chara" + arrayMasuk[i]].posisi + 3)) && (this.posisi >= (_root["chara" + arrayMasuk[i]].posisi - 3))) {
this.ztarget = arrayMasuk[i];
}
}
}
}
}
}
i++;
}
}
if (this.terbang == true) {
this.garak = 0;
} else {
this.garak = 0;
}
if (this.ngebom != true) {
if ((((_root["chara" + this.ztarget] == undefined) || (_root["chara" + this.ztarget].live <= 0)) || (this._x >= ((back._x + 1600) - 100))) || (this._x < (_root["chara" + this.ztarget]._x + this.garak))) {
this.ztarget = undefined;
this.jarak = 99999 /* 0x01869F */;
} else if ((this._x <= back._x) || (this._x >= (back._x + 1600))) {
this.ztarget = undefined;
this.jarak = 99999 /* 0x01869F */;
} else if ((_root["chara" + this.ztarget]._x <= back._x) || (_root["chara" + this.ztarget]._x >= (back._x + 1600))) {
this.ztarget = undefined;
this.jarak = 99999 /* 0x01869F */;
} else if (this.terbang == true) {
this.jarak = Math.sqrt(Math.pow(this._x - _root["chara" + this.ztarget]._x, 2) + Math.pow(this._y - _root["chara" + this.ztarget]._y, 2));
} else {
this.jarak = Math.sqrt(Math.pow(this._x - _root["chara" + this.ztarget]._x, 2));
}
}
if (((_root["chara" + this.ztarget] == undefined) || (_root["chara" + this.ztarget]._visible == false)) || (_root["chara" + this.ztarget].live <= 0)) {
this.ztarget = undefined;
this.jarak = 99999 /* 0x01869F */;
}
if (tipeMaen == "pantai1") {
if (_root["chara" + this.ztarget].benteng1 == true) {
this.ztarget = undefined;
this.jarak = 99999 /* 0x01869F */;
}
}
if (this.live <= 0) {
if (this.mati == false) {
if (jenisPerang == "udara") {
this.live = 0;
this.terbang = false;
this.ledakBanyak = true;
}
if (this.jenis <= 9) {
infantry2++;
} else if (this.jenis <= 17) {
artillery2++;
} else if (this.jenis <= 25) {
airforce2++;
} else if (this.jenis <= 30) {
navy2++;
}
if (this.jenis <= 30) {
unitMati1++;
}
bunuhLawan++;
cekHarga(this.jenis);
naekUang = Math.ceil((hargaKe / this.bykJumlah) * naikHarga2);
money1 = money1 + naekUang;
this.enabled = false;
delete this.onRollOver;
delete this.onRollOut;
delete this.onReleaseOutside;
delete this.onRelease;
if (this.jenisPasukan == "craft") {
cekPecah(this);
if (this.ledakBanyak == true) {
rand = random(2);
if (rand == 0) {
wefek = attachMovie("efek9", "xefek" + dalamEfek, dalamEfek);
} else {
wefek = attachMovie("efek7", "xefek" + dalamEfek, dalamEfek);
}
if (jenisPerang == "laut") {
wefek._xscale = (wefek._yscale = random(75) + 75);
} else if (jenisPerang == "udara") {
wefek._xscale = (wefek._yscale = random(150) + 125);
} else {
wefek._xscale = (wefek._yscale = random(200) + 200);
}
wefek._x = this._x;
wefek._y = this._y;
dalamEfek++;
if (dalamEfek > 36020) {
dalamEfek = 36000;
}
} else if (this.terbang == false) {
if (jenisPerang == "darat") {
retak = attachMovie("retak_mc", "retak_mc" + dalamRetak, dalamRetak);
retak._x = (this._x - 5) + random(10);
retak._y = (this._y - 5) + random(10);
retak._xscale = (retak._yscale = random(75) + 75);
dalamRetak++;
if (dalamRetak >= 520) {
dalamRetak = 500;
}
}
}
backLedak();
} else {
backMati();
}
bykKeluar2--;
jmlPasukan2--;
this.mati = true;
if (this.jenisPasukan == "craft") {
if (this.ledakBanyak == true) {
this.gotoAndStop(5);
} else {
this.gotoAndStop(3);
}
} else if (this._currentframe == 5) {
this.gotoAndStop(7);
} else {
this.gotoAndStop(3);
}
}
if (this.terbang == true) {
this._y = this._y + this.speedY;
this._x = this._x - 3;
this.speedY = this.speedY + 0.5;
this._rotation = this._rotation - 0.5;
if (this._y >= this.batasBawah) {
i = 1;
while (i <= arrayMasuk.length) {
if (_root["chara" + arrayMasuk[i]].indi.hitTest(this)) {
if (_root["chara" + arrayMasuk[i]] != undefined) {
if (this.damage == undefined) {
this.damage = 100;
}
_root["chara" + arrayMasuk[i]].live = _root["chara" + arrayMasuk[i]].live - (this.damage * 5);
if (_root["chara" + arrayMasuk[i]].benteng1 == true) {
money1 = money1 + Math.ceil((this.damage * 5) / kurangTambah);
} else if (_root["chara" + arrayMasuk[i]].benteng2 == true) {
money2 = money2 + Math.ceil((this.damage * 10) / kurangTambah);
}
}
} else if (_root["chara" + arrayMasuk[i]].hitTest(this)) {
if (_root["chara" + arrayMasuk[i]] != undefined) {
if (this.damage == undefined) {
this.damage = 100;
}
_root["chara" + arrayMasuk[i]].live = _root["chara" + arrayMasuk[i]].live - (this.damage * 5);
if (_root["chara" + arrayMasuk[i]].benteng1 == true) {
money1 = money1 + Math.ceil((this.damage * 10) / kurangTambah);
} else if (_root["chara" + arrayMasuk[i]].benteng2 == true) {
money2 = money2 + Math.ceil((this.damage * 5) / kurangTambah);
}
}
}
i++;
}
this.terbang = false;
if (this.terbang == false) {
if (jenisPerang == "darat") {
retak = attachMovie("retak_mc", "retak_mc" + dalamRetak, dalamRetak);
retak._x = (this._x - 5) + random(10);
retak._y = (this._y - 5) + random(10);
retak._xscale = (retak._yscale = random(75) + 75);
dalamRetak++;
if (dalamRetak >= 520) {
dalamRetak = 500;
}
}
}
if ((jenisPerang == "laut") || (jenisKe2 == "laut")) {
wefek = attachMovie("semburAir", "xefek" + dalamEfek, dalamEfek);
wefek._xscale = (wefek._yscale = random(15) + 25);
wefek._x = this._x;
wefek._y = this._y;
dalamEfek++;
if (dalamEfek > 36020) {
dalamEfek = 36000;
}
backWater();
} else if (tipeMaen == "pantai1") {
if (this._x <= (benteng1._x + 600)) {
wefek = attachMovie("semburAir", "xefek" + dalamEfek, dalamEfek);
wefek._xscale = (wefek._yscale = random(25) + 50);
wefek._x = this._x;
wefek._y = this._y;
dalamEfek++;
if (dalamEfek > 36020) {
dalamEfek = 36000;
}
backWater();
}
}
backLedak();
}
} else if ((this.jenis >= 27) && (this.jenis <= 31)) {
this._x = this._x + 0.25;
}
if (((this.ledakBanyak == true) && (this.jenis >= 18)) && (this.jenis <= 25)) {
cekEfek(this, 8, "gila");
removeMovieClip(this);
}
} else if (this.jarak <= this.range) {
if (this.lewatSaja == true) {
if (((_root["chara" + this.ztarget].terbang == true) && (this.ngebom == true)) && (jenisPerang != "udara")) {
this.ztarget = undefined;
this.jarak = 99999 /* 0x01869F */;
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
this._x = this._x - this.speed;
if (this.naikKe != undefined) {
if (this._y >= this.naikKe) {
this._y = this._y - 0.25;
}
}
} else if (this.tiarap == true) {
if (this.sedangTiarap == false) {
this.gotoAndStop(5);
this.delayq = 0;
this.sedangTiarap = true;
}
} else {
this.gotoAndStop(2);
}
} else if ((this.lewatSaja == true) && (this.tipe <= 27)) {
this.gotoAndStop(1);
this._x = this._x - this.speed;
if (this.naikKe != undefined) {
if (this._y >= this.naikKe) {
this._y = this._y - 0.25;
}
}
} else if (this._currentframe == 2) {
if (this.anim._currentframe == 1) {
this.kena = false;
this.gotoAndStop(1);
this._x = this._x - this.speed;
}
} else if (this._currentframe == 5) {
this.delayq++;
if (this.delayq >= 100) {
this.delayq = 0;
this.sedangTiarap = false;
this.gotoAndStop(6);
}
} else if ((this._currentframe == 1) || (this._currentframe == 4)) {
bisaLewat = true;
if (this.jenisPasukan == "craft") {
i = 1;
while (i <= arrayMasuk.length) {
if (_root["chara" + arrayMasuk[i]].jenisPasukan == "craft") {
if (_root["chara" + arrayMasuk[i]] != this) {
if (_root["chara" + arrayMasuk[i]].posisi == this.posisi) {
if (this.indi.hitTest(_root["chara" + arrayMasuk[i]])) {
if (_root["chara" + arrayMasuk[i]].live > 0) {
if ((_root["chara" + arrayMasuk[i]].kena != true) && (this.kena != true)) {
if (_root["chara" + arrayMasuk[i]]._x <= (benteng2._x - 300)) {
if ((this.jenis <= 17) || (this.jenis == 48)) {
_root["chara" + arrayMasuk[i]].kena = false;
this.kena = false;
this.charaKena = _root["chara" + arrayMasuk[i]];
this.sementara = true;
bisaLewat = false;
}
}
}
}
}
}
}
}
i++;
}
}
if (bisaLewat == true) {
if (this.sementara == true) {
if (this._x <= (this.charaKena._x - 300)) {
this.sementara = false;
this.kena = false;
this.gotoAndStop(1);
this._x = this._x - this.speed;
if (this.naikKe != undefined) {
if (this._y >= this.naikKe) {
this._y = this._y - 0.25;
}
}
} else {
this.gotoAndStop(4);
}
} else {
this.sementara = false;
this.kena = false;
this.gotoAndStop(1);
this._x = this._x - this.speed;
if (this.naikKe != undefined) {
if (this._y >= this.naikKe) {
this._y = this._y - 0.25;
}
}
}
} else {
this.gotoAndStop(4);
}
}
if (this.terbang == true) {
if (((((this.jenis == 18) || (this.jenis == 19)) || (this.jenis == 49)) && (tipeMaen != "pantai1")) && (jenisPerang != "udara")) {
if (this._x <= (benteng1._x + 150)) {
if (this.live > 0) {
this.speed = 0;
this.gotoAndStop(2);
}
}
} else if (this._x <= (benteng1._x - 1000)) {
this._x = benteng2._x + 1000;
jmlPasukan--;
cekHarga(this.jenis);
naekUang = Math.ceil(hargaKe * naikHarga);
if (isNaN(naekUang)) {
naekUang = 1000;
}
money1 = money1 + naekUang;
}
} else if (this._x <= (benteng1._x - 500)) {
this._x = benteng2._x + 500;
jmlPasukan--;
cekHarga(this.jenis);
naekUang = Math.ceil(hargaKe * naikHarga);
if (isNaN(naekUang)) {
naekUang = 1000;
}
money1 = money1 + naekUang;
} else if (tipeMaen == "pantai1") {
if (this._x <= (benteng1._x + 800)) {
if (this.live > 0) {
this.speed = 0;
if (this.jarak <= this.range) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(4);
}
if (this.sekaliKacau == undefined) {
cekHarga(this.jenis);
naekUang = Math.ceil((hargaKe / this.bykJumlah) * naikHarga2);
money1 = money1 + (naekUang * 5);
this.sekaliKacau = true;
}
}
}
} else if (this._x <= (benteng1._x + 150)) {
if (this.lewatSaja == false) {
if (this.live > 0) {
this.speed = 0;
this.gotoAndStop(2);
}
}
}
if ((jenisPerang == "udara") || (jenisPerang == "laut")) {
if ((((this.jenis >= 18) && (this.jenis <= 25)) || (this.jenis == 49)) || (this.jenis == 50)) {
this.bar_mc._xscale = 150;
this.bar_mc._yscale = 500;
}
}
this.bar_mc.bar._xscale = Math.ceil((this.live / this.totLive) * 100);
if (this.bar_mc.bar._xscale <= 0) {
this.bar_mc._visible = false;
}
}
}
}
function cekPecah(indi) {
if (xPause == false) {
if (indi.jenis == 15) {
randBanyak = random(2) + 4;
} else if ((indi.jenis >= 13) && (indi.jenis <= 14)) {
randBanyak = random(2) + 3;
} else {
randBanyak = random(2) + 2;
}
w = 1;
while (w <= randBanyak) {
randPecah = random(5) + 1;
pecah = attachMovie("pecah" + randPecah, "pecah" + dalamPecah, dalamPecah);
pecah._x = (indi._x - 10) + random(20);
pecah._y = (indi._y - 10) + random(20);
pecah._rotation = random(360);
if (jenisPerang == "laut") {
pecah._xscale = (pecah._xscale = random(25) + 10);
} else {
pecah._xscale = (pecah._xscale = random(40) + 20);
}
if ((jenisPerang == "laut") || (jenisPerang == "udara")) {
pecah.speedX = random(7) - 4;
pecah.speedY = random(7) + 4;
} else {
pecah.speedX = random(10) - 5;
pecah.speedY = random(10) + 5;
}
pecah.turun = 1;
pecah.xdelay = random(45) + 45;
pecah.jatuh = false;
if ((indi.jenis >= 18) && (indi.jenis <= 26)) {
pecah.bawah = (350 + random(120)) - naikBerapa;
} else {
pecah.bawah = (indi._y - 30) + random(60);
}
if ((jenisPerang == "laut") || (jenisPerang == "udara")) {
pecah.bawah = (indi._y + 30) + random(60);
}
pecah.onEnterFrame = enterPecah;
dalamPecah++;
if (dalamPecah > 15050) {
dalamPecah = 15001;
}
w++;
}
}
}
function enterPecah() {
if (xPause == false) {
if (this.jatuh == false) {
this.play();
this._x = this._x - this.speedX;
this._y = this._y - this.speedY;
this.speedY = this.speedY - this.turun;
this._rotation = this._rotation + this.speedY;
} else {
this.xdelay--;
if (this.xdelay <= 0) {
this._alpha = this._alpha - 10;
if (this._alpha <= 0) {
removeMovieClip(this);
}
}
}
if (this._y >= this.bawah) {
if (this.speedY <= 0) {
if (this.jatuh == false) {
this.jatuh = true;
dalamBaru = this.getDepth() - 14000;
this.swapDepths(dalamBaru);
this.stop();
if (tipeMaen == "pantai1") {
if (this._x <= (benteng1._x + 600)) {
removeMovieClip(this);
}
}
if ((jenisPerang == "laut") || (jenisPerang == "udara")) {
removeMovieClip(this);
}
}
}
}
}
}
function cekLese(indi) {
if (sudahLese == false) {
sudahLese = true;
lese = attachMovie("anim_lese", "anim_lese", dalamLese);
lese._x = 400;
lese._y = 200;
lese.info_mc.gotoAndPlay(2);
lese.info_mc.informasi = indi;
}
}
function cekWin() {
if (xPause == false) {
if (sudahSelesai == false) {
removeMovieClip(infoBox);
i = 1;
while (i <= 52) {
if (frame["frame" + i].sedangUnlok == false) {
frame["frame" + i].enabled = false;
}
i++;
}
i = 1;
while (i <= 9) {
frame["tipe" + i].enabled = false;
i++;
}
frame_mc.unit2 = "Red Unit: 0";
frame.menu_btn.enabled = false;
totWin1++;
totLose2++;
cekLedakSemua("musuh");
sudahSelesai = true;
clearSemua2();
idDelay1 = setInterval(selesaiGame, 4000);
}
}
}
function cekLose() {
if (xPause == false) {
if (sudahSelesai == false) {
removeMovieClip(infoBox);
i = 1;
while (i <= 52) {
if (frame["frame" + i].sedangUnlok == false) {
frame["frame" + i].enabled = false;
}
i++;
}
i = 1;
while (i <= 9) {
frame["tipe" + i].enabled = false;
i++;
}
frame_mc.unit1 = "Green Unit: 0";
frame.menu_btn.enabled = false;
totWin2++;
totLose1++;
cekLedakSemua("jagoan");
sudahSelesai = true;
clearSemua2();
idDelay2 = setInterval(selesaiGame2, 4000);
}
}
}
function cekLedakSemua(indi) {
i = 0;
while (i <= semuaPasukan) {
if (_root["chara" + i].tipe == indi) {
if (_root["chara" + i].live > 0) {
_root["chara" + i].live = 0;
}
}
i++;
}
}
function selesaiGame() {
if (xPause == false) {
frame_mc._visible = false;
backWin();
clearInterval(idDelay1);
sedangPause = true;
win_mc = attachMovie("win_mc", "win_mc", dalamWin);
win_mc._x = 400;
win_mc._y = 240;
win_mc.unit1 = unitMati1;
win_mc.unit2 = unitMati2;
win_mc.buildings1 = buildingsMati1;
win_mc.buildings2 = buildingsMati2;
if ((tipeMaen == "pantai1") || (jenisPerang == "udara")) {
persenx = 100;
win_mc.base = persenx + " %";
} else {
persenx = Math.ceil((frame_mc.base1 / totIstana1) * 100);
win_mc.base = persenx + " %";
}
selisihx = unitMati1 - unitMati2;
if (selisihx <= 1) {
selisihx = 1;
}
tambahMoney = 0;
i = 0;
while (i <= semuaPasukan) {
if (_root["chara" + i].live > 0) {
if (_root["chara" + i].tipe == "jagoan") {
if (_root["chara" + i].jenis != undefined) {
if (_root["chara" + i].live > 0) {
_root["chara" + i].gotoAndStop(4);
_root["chara" + i].anim.stop();
}
tambahMoney = tambahMoney + daftarHarga[_root["chara" + i].jenis];
}
}
}
i++;
}
win_mc.xmoney = Math.ceil((tambahMoney / 5) + (xlevel * 50)) + (2500 * (levelSkill[14] - 1));
win_mc.xexp = Math.ceil(((selisihx + persenx) * xlevel) / 2) + (500 * (levelSkill[15] - 1));
if (persenx == 100) {
perfectSemua++;
if (perfectSemua >= 15) {
_root.medals17 = 1;
_root.medals18 = 1;
_root.medals19 = 1;
} else if (perfectSemua >= 10) {
_root.medals17 = 1;
_root.medals18 = 1;
} else if (perfectSemua >= 5) {
_root.medals17 = 1;
}
} else {
perfectSemua = 0;
}
if (win_mc.xexp >= 4000) {
_root.medals7 = 1;
_root.medals8 = 1;
_root.medals9 = 1;
} else if (win_mc.xexp >= 2000) {
_root.medals7 = 1;
_root.medals8 = 1;
} else if (win_mc.xexp >= 1000) {
_root.medals7 = 1;
}
money1 = money1 + win_mc.xmoney;
xexp = xexp + win_mc.xexp;
xlevel++;
cekMedali1();
bgData = "maen";
if (jenisMaenan == "campaign") {
if (jenisCampaign == 1) {
if (xlevel >= 46) {
_root.medals37 = 1;
} else if (xlevel >= 16) {
_root.medals34 = 1;
}
} else if (jenisCampaign == 2) {
if (xlevel >= 46) {
_root.medals38 = 1;
} else if (xlevel >= 16) {
_root.medals35 = 1;
}
} else if (jenisCampaign == 3) {
if (xlevel >= 46) {
_root.medals39 = 1;
} else if (xlevel >= 16) {
_root.medals36 = 1;
}
}
i = 0;
while (i <= simpanSemua.length) {
_root["aa" + i] = String("b" + i);
Cookies = SharedObject.getLocal(_root["aa" + i], "/");
Cookies.data["bb" + i] = eval (simpanSemua[i]);
Cookies.flush(10);
i++;
}
i = 0;
while (i <= simpanSemua2.length) {
_root["zz" + i] = String("v" + i);
Cookies = SharedObject.getLocal(_root["zz" + i], "/");
Cookies.data["vv" + i] = eval (simpanSemua2[i]);
Cookies.flush(10);
i++;
}
if (xlevel > 2) {
i = 1;
while (i <= 47) {
_root["a7" + i] = String("i" + i);
Cookies = SharedObject.getLocal(_root["a7" + i], "/");
Cookies.data["ii" + i] = _root["medals" + i];
Cookies.flush(10);
i++;
}
}
} else {
if (tipeSulitSingle == 1) {
menangSingle++;
} else if (tipeSulitSingle == 2) {
menangSingle2++;
} else if (tipeSulitSingle == 3) {
menangSingle3++;
}
if ((menangSingle3 >= 15) && (tipeSulitSingle == 3)) {
_root.medals42 = 1;
} else if ((menangSingle2 >= 10) && (tipeSulitSingle == 2)) {
_root.medals41 = 1;
} else if ((menangSingle >= 5) && (tipeSulitSingle == 1)) {
_root.medals40 = 1;
}
i = 0;
while (i <= simpanSemua2.length) {
_root["zz" + i] = String("v" + i);
Cookies = SharedObject.getLocal(_root["zz" + i], "/");
Cookies.data["vv" + i] = eval (simpanSemua2[i]);
Cookies.flush(10);
i++;
}
}
selesaiCampen = false;
if (xlevel >= 46) {
cekMedaliDapat();
selesaiCampen = true;
bgData = undefined;
xlevel = 1;
i = 0;
while (i <= simpanSemua.length) {
_root["aa" + i] = String("b" + i);
Cookies = SharedObject.getLocal(_root["aa" + i], "/");
Cookies.data["bb" + i] = eval (simpanSemua[i]);
Cookies.flush(10);
i++;
}
i = 0;
while (i <= simpanSemua2.length) {
_root["zz" + i] = String("v" + i);
Cookies = SharedObject.getLocal(_root["zz" + i], "/");
Cookies.data["vv" + i] = eval (simpanSemua2[i]);
Cookies.flush(10);
i++;
}
i = 1;
while (i <= 47) {
_root["a7" + i] = String("i" + i);
Cookies = SharedObject.getLocal(_root["a7" + i], "/");
Cookies.data["ii" + i] = _root["medals" + i];
Cookies.flush(10);
i++;
}
}
win_mc.play_btn.onRelease = function () {
clearSemua();
if (jenisMaenan == "campaign") {
if (selesaiCampen == true) {
gotoAndStop (514);
} else {
kondisiLoad = "game";
jenisMaen = "game";
backMusic();
gotoAndStop (498);
}
} else {
backMusic();
gotoAndStop (471);
}
};
}
}
function cekMedaliDapat() {
if (jenisCampaign == 1) {
campaignWin1 = 1;
}
if (jenisCampaign == 2) {
campaignWin2 = 1;
}
if (jenisCampaign == 3) {
campaignWin3 = 1;
}
if (((campaignWin1 == 1) && (campaignWin2 == 1)) && (campaignWin3 == 1)) {
_root.medals43 = 1;
}
if (jenisCampaign == 1) {
if (nyawaGame == 10) {
menangTerus1 = 1;
}
} else if (jenisCampaign == 2) {
if (nyawaGame == 15) {
menangTerus2 = 1;
}
} else if (jenisCampaign == 3) {
if (nyawaGame == 20) {
menangTerus3 = 1;
}
}
if (menangTerus1 == 1) {
_root.medals44 = 1;
}
if (menangTerus2 == 1) {
_root.medals45 = 1;
}
if (menangTerus3 == 1) {
_root.medals46 = 1;
}
if (((_root.medals44 == 1) && (_root.medals45 == 1)) && (_root.medals46 == 1)) {
_root.medals47 = 1;
}
i = 1;
while (i <= 47) {
_root["a7" + i] = String("i" + i);
Cookies = SharedObject.getLocal(_root["a7" + i], "/");
Cookies.data["ii" + i] = _root["medals" + i];
Cookies.flush(10);
i++;
}
}
function selesaiGame2() {
if (xPause == false) {
frame_mc._visible = false;
backLose();
clearInterval(idDelay2);
sedangPause = true;
i = 0;
while (i <= semuaPasukan) {
if (_root["chara" + i].live > 0) {
_root["chara" + i].gotoAndStop(4);
_root["chara" + i].anim.stop();
}
i++;
}
lose_mc = attachMovie("lose_mc", "lose_mc", dalamLose);
lose_mc._x = 400;
lose_mc._y = 240;
lose_mc.unit1 = unitMati1;
lose_mc.unit2 = unitMati2;
lose_mc.buildings1 = buildingsMati1;
lose_mc.buildings2 = buildingsMati2;
if ((tipeMaen == "pantai1") || (jenisPerang == "udara")) {
lose_mc.base = "100 %";
} else {
lose_mc.base = frame_mc.base1;
}
selisihx = unitMati1 - unitMati2;
if (selisihx <= 5) {
selisihx = 5;
}
lose_mc.xmoney = Math.ceil(xlevel * 150);
lose_mc.xexp = Math.ceil(xlevel * 125);
money1 = money1 + Math.ceil(lose_mc.xmoney);
xexp = xexp + Math.ceil(lose_mc.xexp);
perfectSemua = 0;
cekMedali1();
nyawaGame--;
if (nyawaGame <= 0) {
bgData = undefined;
} else {
bgData = "maen";
}
selesaiCampen = false;
if (jenisMaenan == "campaign") {
i = 0;
while (i <= simpanSemua.length) {
_root["aa" + i] = String("b" + i);
Cookies = SharedObject.getLocal(_root["aa" + i], "/");
Cookies.data["bb" + i] = eval (simpanSemua[i]);
Cookies.flush(10);
i++;
}
i = 0;
while (i <= simpanSemua2.length) {
_root["zz" + i] = String("v" + i);
Cookies = SharedObject.getLocal(_root["zz" + i], "/");
Cookies.data["vv" + i] = eval (simpanSemua2[i]);
Cookies.flush(10);
i++;
}
i = 1;
while (i <= 6) {
_root["a7" + i] = String("i" + i);
Cookies = SharedObject.getLocal(_root["a7" + i], "/");
Cookies.data["ii" + i] = _root["medals" + i];
Cookies.flush(10);
i++;
}
} else {
if (tipeSulitSingle == 1) {
menangSingle = 0;
} else if (tipeSulitSingle == 2) {
menangSingle2 = 0;
} else if (tipeSulitSingle == 3) {
menangSingle3 = 0;
}
i = 0;
while (i <= simpanSemua.length) {
_root["zz" + i] = String("v" + i);
Cookies = SharedObject.getLocal(_root["zz" + i], "/");
Cookies.data["vv" + i] = eval (simpanSemua[i]);
Cookies.flush(10);
i++;
}
i = 0;
while (i <= simpanSemua2.length) {
_root["zz" + i] = String("v" + i);
Cookies = SharedObject.getLocal(_root["zz" + i], "/");
Cookies.data["vv" + i] = eval (simpanSemua2[i]);
Cookies.flush(10);
i++;
}
}
lose_mc.play_btn.onRelease = function () {
clearSemua();
if (jenisMaenan == "campaign") {
if (nyawaGame <= 0) {
gotoAndStop (516);
} else {
kondisiLoad = "game";
jenisMaen = "game";
backMusic();
gotoAndStop (498);
}
} else {
backMusic();
gotoAndStop (471);
}
};
}
}
function cekMedali1() {
if (bunuhLawan >= 150) {
_root.medals3 = 1;
_root.medals4 = 1;
_root.medals5 = 1;
_root.medals6 = 1;
} else if (bunuhLawan >= 100) {
_root.medals3 = 1;
_root.medals4 = 1;
_root.medals5 = 1;
} else if (bunuhLawan >= 75) {
_root.medals3 = 1;
_root.medals4 = 1;
} else if (bunuhLawan >= 50) {
_root.medals3 = 1;
}
}
function clearSemua2() {
delete _root.onEnterFrame;
clearInterval(idTest);
clearInterval(idTest2);
clearInterval(idPasukan1);
clearInterval(idPasukan2);
clearInterval(idPasukan3);
clearInterval(idPasukan4);
clearInterval(idPasukan5);
clearInterval(idPasukan6);
clearInterval(idPasukan7);
clearInterval(idPasukan8);
clearInterval(idPasukan9);
clearInterval(idPasukan26);
clearInterval(idPasukan27);
clearInterval(idPasukan28);
clearInterval(idPasukan29);
clearInterval(idPasukan30);
clearInterval(idPasukan31);
clearInterval(idPasukan32);
clearInterval(idPasukan33);
clearInterval(idPasukan34);
clearInterval(idPasukan35);
clearInterval(idPasukan36);
clearInterval(idPasukan37);
clearInterval(idPasukan38);
clearInterval(idPasukan39);
clearInterval(idPasukanx1);
clearInterval(idPasukanx2);
clearInterval(idPasukanx3);
clearInterval(idPasukanx4);
clearInterval(idPasukanx5);
clearInterval(idPasukanx6);
clearInterval(idPasukanx7);
clearInterval(idPasukanx8);
clearInterval(idPasukanx9);
clearInterval(idPasukanx10);
clearInterval(idPasukanx11);
clearInterval(idPasukanx12);
clearInterval(idPasukanx13);
clearInterval(idPasukanx14);
clearInterval(idPasukanx15);
clearInterval(idPasukanx16);
clearInterval(idPasukanx17);
clearInterval(idPasukan8y);
delete _root.onMouseMove;
delete myListener.onKeyDown;
delete myListener.onKeyUp;
removeListener(myListener);
removeMovieClip(panah_mc);
removeMovieClip(deploy_mc);
removeMovieClip(zdrag_mc);
}
function clearSemua() {
clearInterval(idDelay1);
clearInterval(idDelay2);
removeMovieClip(back);
removeMovieClip(benteng1);
removeMovieClip(benteng2);
removeMovieClip(frame_mc);
removeMovieClip(lose_mc);
removeMovieClip(win_mc);
removeMovieClip(info_box);
removeMovieClip(zdrag_mc);
removeMovieClip(anim_lese);
i = 0;
while (i <= semuaPasukan) {
removeMovieClip(_root["chara" + i]);
i++;
}
i = 15001;
while (i <= 15050) {
removeMovieClip(_root["pecah" + i]);
i++;
}
i = 1;
while (i <= 50) {
removeMovieClip(_root["efek" + i]);
i++;
}
i = 36000;
while (i <= 36020) {
removeMovieClip(_root["xefek" + i]);
i++;
}
i = 500;
while (i <= 520) {
removeMovieClip(_root["retak_mc" + i]);
i++;
}
}
function moveCastle(indi) {
if (indi == 0) {
if (back._x < 0) {
geserBerapa = back._x;
back._x = back._x - geserBerapa;
deploy_mc._x = deploy_mc._x - geserBerapa;
aircraft._x = aircraft._x - geserBerapa;
i = 1;
while (i <= arrayMasuk.length) {
if (_root["chara" + arrayMasuk[i]] != undefined) {
_root["chara" + arrayMasuk[i]]._x = _root["chara" + arrayMasuk[i]]._x - geserBerapa;
}
i++;
}
i = 15001;
while (i <= 15050) {
if (_root["pecah" + i] != undefined) {
_root["pecah" + i]._x = _root["pecah" + i]._x - geserBerapa;
}
i++;
}
i = 1;
while (i <= 50) {
if (_root["efek" + i] != undefined) {
_root["efek" + i]._x = _root["efek" + i]._x - geserBerapa;
}
i++;
}
i = 36000;
while (i <= 36020) {
if (_root["xefek" + i] != undefined) {
_root["xefek" + i]._x = _root["xefek" + i]._x - geserBerapa;
}
i++;
}
i = 500;
while (i <= 520) {
if (_root["retak_mc" + i] != undefined) {
_root["retak_mc" + i]._x = _root["retak_mc" + i]._x - geserBerapa;
}
i++;
}
i = 1;
while (i <= 7) {
_root["misil_mc" + i]._x = _root["misil_mc" + i]._x - geserBerapa;
i++;
}
}
} else if (indi == 2) {
if (back._x > -800) {
geserBerapa = -800 - back._x;
back._x = back._x + geserBerapa;
deploy_mc._x = deploy_mc._x + geserBerapa;
aircraft._x = aircraft._x + geserBerapa;
i = 1;
while (i <= arrayMasuk.length) {
if (_root["chara" + arrayMasuk[i]] != undefined) {
_root["chara" + arrayMasuk[i]]._x = _root["chara" + arrayMasuk[i]]._x + geserBerapa;
}
i++;
}
i = 15001;
while (i <= 15050) {
if (_root["pecah" + i] != undefined) {
_root["pecah" + i]._x = _root["pecah" + i]._x + geserBerapa;
}
i++;
}
i = 1;
while (i <= 50) {
if (_root["efek" + i] != undefined) {
_root["efek" + i]._x = _root["efek" + i]._x + geserBerapa;
}
i++;
}
i = 36000;
while (i <= 36020) {
if (_root["xefek" + i] != undefined) {
_root["xefek" + i]._x = _root["xefek" + i]._x + geserBerapa;
}
i++;
}
i = 500;
while (i <= 520) {
if (_root["retak_mc" + i] != undefined) {
_root["retak_mc" + i]._x = _root["retak_mc" + i]._x + geserBerapa;
}
i++;
}
i = 1;
while (i <= 7) {
_root["misil_mc" + i]._x = _root["misil_mc" + i]._x + geserBerapa;
i++;
}
}
}
}
stop();
backMain();
if ((jenisMaenan == "single") && (tipeMaen2 == "")) {
semuaPasukan = 121;
} else if (tipeMaen2 == "artillery") {
semuaPasukan = 36;
} else {
semuaPasukan = 53;
}
if (jenisMaenan == "single") {
nyawaGame = 0;
}
_root.onEnterFrame = function () {
if (xPause == false) {
arrayMasuk = new Array();
masukKe = 1;
i = 0;
while (i <= semuaPasukan) {
if ((_root["chara" + i] != undefined) || (_root["chara" + i].live > 0)) {
arrayMasuk[masukKe] = i;
masukKe++;
}
i++;
}
money1 = Math.ceil(money1);
money2 = Math.ceil(money2);
if (jmlPasukan <= 0) {
jmlPasukan = 0;
}
if (jmlPasukan2 <= 0) {
jmlPasukan2 = 0;
}
frame_mc.unit1 = "Green Unit: " + jmlPasukan;
frame_mc.unit2 = "Red Unit: " + jmlPasukan2;
if (sudahSelesai == false) {
if (jmlPasukan <= 0) {
cekLese("Your unit eliminated, mission failed!");
cekLose();
} else if (jmlPasukan2 <= 0) {
cekLese("Enemy unit eliminated, mission accomplished!");
cekWin();
}
}
if (jalanKanan == true) {
if (back._x > -788) {
back._x = back._x - 12;
deploy_mc._x = deploy_mc._x - 12;
aircraft._x = aircraft._x - 12;
i = 1;
while (i <= arrayMasuk.length) {
if (_root["chara" + arrayMasuk[i]] != undefined) {
_root["chara" + arrayMasuk[i]]._x = _root["chara" + arrayMasuk[i]]._x - 12;
}
i++;
}
i = 15001;
while (i <= 15050) {
if (_root["pecah" + i] != undefined) {
_root["pecah" + i]._x = _root["pecah" + i]._x - 12;
}
i++;
}
i = 1;
while (i <= 50) {
if (_root["efek" + i] != undefined) {
_root["efek" + i]._x = _root["efek" + i]._x - 12;
}
i++;
}
i = 36000;
while (i <= 36020) {
if (_root["xefek" + i] != undefined) {
_root["xefek" + i]._x = _root["xefek" + i]._x - 12;
}
i++;
}
i = 500;
while (i <= 520) {
if (_root["retak_mc" + i] != undefined) {
_root["retak_mc" + i]._x = _root["retak_mc" + i]._x - 12;
}
i++;
}
i = 1;
while (i <= 7) {
_root["misil_mc" + i]._x = _root["misil_mc" + i]._x - 12;
i++;
}
}
}
if (jalanKiri == true) {
if (back._x < -12) {
back._x = back._x + 12;
deploy_mc._x = deploy_mc._x + 12;
aircraft._x = aircraft._x + 12;
i = 1;
while (i <= arrayMasuk.length) {
if (_root["chara" + arrayMasuk[i]] != undefined) {
_root["chara" + arrayMasuk[i]]._x = _root["chara" + arrayMasuk[i]]._x + 12;
}
i++;
}
i = 15001;
while (i <= 15050) {
if (_root["pecah" + i] != undefined) {
_root["pecah" + i]._x = _root["pecah" + i]._x + 12;
}
i++;
}
i = 1;
while (i <= 50) {
if (_root["efek" + i] != undefined) {
_root["efek" + i]._x = _root["efek" + i]._x + 12;
}
i++;
}
i = 36000;
while (i <= 36020) {
if (_root["xefek" + i] != undefined) {
_root["xefek" + i]._x = _root["xefek" + i]._x + 12;
}
i++;
}
i = 500;
while (i <= 520) {
if (_root["retak_mc" + i] != undefined) {
_root["retak_mc" + i]._x = _root["retak_mc" + i]._x + 12;
}
i++;
}
i = 1;
while (i <= 7) {
_root["misil_mc" + i]._x = _root["misil_mc" + i]._x + 12;
i++;
}
}
}
}
};
init();
buatBack();
if (tipeGame == "game") {
buatFrame();
} else {
buatFrame2();
}
buatBenteng();
if ((jenisMaenan == "single") && (tipeMaen2 == "")) {
troopsKe1 = 20;
troopsKe2 = 71;
bykBuatChara = 50;
} else if (tipeMaen2 == "artillery") {
troopsKe1 = 20;
troopsKe2 = 28;
bykBuatChara = 8;
} else {
troopsKe1 = 20;
troopsKe2 = 37;
bykBuatChara = 16;
}
if (tipeGame == "demo") {
buatJagoan();
idTest = setInterval(buatJagoan, 6000);
buatMusuh();
idTest2 = setInterval(buatMusuh, 6000);
} else if ((tutorialWar == true) || (jenisMaenan == "single")) {
setAISemua();
} else {
tutorial = attachMovie("tutorial_mc", "tutorial_mc", dalamTutorial);
tutorial._x = 400;
tutorial._y = 240;
tutorial.next_btn.onRelease = function () {
if (tutorial_mc._currentframe < 6) {
tutorial_mc.gotoAndStop(tutorial_mc._currentframe + 1);
} else {
cekSelesaiTutor();
}
};
i = 1;
while (i <= 52) {
if (frame["frame" + i].sedangUnlok == false) {
frame["frame" + i].enabled = false;
}
i++;
}
i = 1;
while (i <= 9) {
frame["tipe" + i].enabled = false;
i++;
}
frame.menu_btn.enabled = false;
}
if (jenisMorale == "defense") {
buatDeploy();
}
if (jenisAppear == "manual") {
kePanah = 1;
panah = attachMovie("panah_mc", "panah_mc", dalamPanah);
panah._x = 50;
if (jenisPerang == "laut") {
panah._y = ((100 + (kePanah * 55)) + 25) - 60;
} else if (jenisPerang == "udara") {
panah._y = ((100 + (kePanah * 65)) + 25) - 60;
} else {
panah._y = ((225 + (kePanah * 35)) + 25) - 60;
}
panah.onEnterFrame = enterPanah;
}
_root.onMouseDown = function () {
if (xPause == false) {
if (tekanCtrl == true) {
drag.indi.klik_mc._visible = true;
j = 1;
while (j <= 9) {
benteng1["tanda" + j]._visible = false;
j++;
}
stopDrag();
removeMovieClip(drag);
} else if (tipeDrag == "troops") {
if (drag._alpha >= 60) {
i = awalDrag;
while (i <= akhirDrag) {
if (drag.hitTest(benteng1["tanda" + i])) {
if (benteng1["tanda" + i]._visible == true) {
buatPenjaga1(i, drag.jenisDrag);
benteng1["tanda" + i]._visible = false;
_root["penjagaAda" + i] = true;
drag.indi.gotoAndStop(1);
drag.indi.sudahJadi = false;
stopDrag();
removeMovieClip(drag);
j = 1;
while (j <= 9) {
benteng1["tanda" + j]._visible = false;
j++;
}
i = 4;
}
}
i++;
}
}
} else if (tipeDrag == "strike") {
if (drag._alpha >= 60) {
cekMisilStrike(drag.tipeMisil, drag.jenisMisil, _root._xmouse, _root._ymouse);
drag.indi.gotoAndStop(1);
drag.indi.sudahJadi = false;
stopDrag();
removeMovieClip(drag);
}
}
}
};
_root.onMouseMove = function () {
if (xPause == false) {
if (this._xmouse <= 30) {
jalanKiri = true;
} else if (this._xmouse >= 770) {
jalanKanan = true;
} else if (sedangTekan == false) {
jalanKiri = false;
jalanKanan = false;
}
}
};
myListener = new Object();
myListener.onKeyDown = function () {
if (Key.getCode() == 90) {
moveCastle(0);
}
if (Key.getCode() == 67) {
moveCastle(2);
}
if (Key.getCode() == 49) {
sedangTekan = true;
if (frame.tipe1.enabled == true) {
klikTipe(1);
}
}
if (Key.getCode() == 50) {
sedangTekan = true;
if (frame.tipe2.enabled == true) {
klikTipe(2);
}
}
if (Key.getCode() == 51) {
sedangTekan = true;
if (frame.tipe3.enabled == true) {
klikTipe(3);
}
}
if (Key.getCode() == 52) {
sedangTekan = true;
if (frame.tipe4.enabled == true) {
klikTipe(4);
}
}
if (Key.getCode() == 53) {
sedangTekan = true;
if (frame.tipe7.enabled == true) {
klikTipe(7);
}
}
if (Key.getCode() == 54) {
sedangTekan = true;
if (frame.tipe5.enabled == true) {
klikTipe(5);
}
}
if (Key.getCode() == 55) {
sedangTekan = true;
if (frame.tipe6.enabled == true) {
klikTipe(6);
}
}
if (Key.getCode() == 56) {
sedangTekan = true;
if (frame.tipe8.enabled == true) {
klikTipe(8);
}
}
if (Key.getCode() == 57) {
sedangTekan = true;
if (frame.tipe9.enabled == true) {
klikTipe(9);
}
}
if (Key.getCode() == 80) {
if (tutorialWar == true) {
sedangTekan = true;
cekPause();
}
}
if (Key.getCode() == 17) {
sedangTekan = true;
tekanCtrl = true;
}
if (Key.getCode() == 32) {
sedangTekan = true;
tekanSpaceBar = true;
}
if ((Key.getCode() == 87) || (Key.getCode() == 38)) {
sedangTekan = true;
panahAtas = true;
kePanah--;
if (kePanah < 1) {
kePanah = 4;
}
}
if ((Key.getCode() == 83) || (Key.getCode() == 40)) {
sedangTekan = true;
panahBawah = true;
kePanah++;
if (kePanah > 4) {
kePanah = 1;
}
}
if ((Key.getCode() == 39) || (Key.getCode() == 68)) {
sedangTekan = true;
jalanKanan = true;
}
if ((Key.getCode() == 37) || (Key.getCode() == 65)) {
sedangTekan = true;
jalanKiri = true;
}
};
myListener.onKeyUp = function () {
if (Key.getCode() == 49) {
sedangTekan = false;
}
if (Key.getCode() == 50) {
sedangTekan = false;
}
if (Key.getCode() == 51) {
sedangTekan = false;
}
if (Key.getCode() == 52) {
sedangTekan = false;
}
if (Key.getCode() == 53) {
sedangTekan = false;
}
if (Key.getCode() == 54) {
sedangTekan = false;
}
if (Key.getCode() == 55) {
sedangTekan = false;
}
if (Key.getCode() == 56) {
sedangTekan = false;
}
if (Key.getCode() == 57) {
sedangTekan = false;
}
if (Key.getCode() == 80) {
sedangTekan = false;
}
if (Key.getCode() == 17) {
sedangTekan = false;
tekanCtrl = false;
}
if (Key.getCode() == 32) {
sedangTekan = false;
tekanSpaceBar = false;
}
if ((Key.getCode() == 87) || (Key.getCode() == 38)) {
sedangTekan = false;
panahAtas = false;
}
if ((Key.getCode() == 83) || (Key.getCode() == 40)) {
sedangTekan = false;
panahBawah = false;
}
if ((Key.getCode() == 39) || (Key.getCode() == 68)) {
sedangTekan = false;
jalanKanan = false;
}
if ((Key.getCode() == 37) || (Key.getCode() == 65)) {
sedangTekan = false;
jalanKiri = false;
}
};
Key.addListener(myListener);
Frame 503
stop();
gotoAndStop(_root._currentframe - 1 +501);
Frame 504
function tutorialSetupSelesai() {
removeMovieClip(tutorial_mc2);
i = 1;
while (i <= 9) {
_root["tipe" + i].enabled = true;
_root["frame" + i].enabled = true;
i++;
}
i = 1;
while (i <= 30) {
if (_root["kotak" + i]._currentframe != 90) {
_root["kotak" + i].enabled = true;
}
i++;
}
skill_btn.enabled = true;
statistic_btn.enabled = true;
achievements_btn.enabled = true;
medals_btn.enabled = true;
menu_btn.enabled = true;
continue_btn.enabled = true;
defense_btn.enabled = true;
offence_btn.enabled = true;
random_btn.enabled = true;
manual_btn.enabled = true;
map_btn.enabled = true;
cekBisa();
}
function cekBisa() {
i = 1;
while (i <= 9) {
_root["tipe" + i].onRelease = klikTipe;
_root["tipe" + i].onRollOver = overTipe;
_root["tipe" + i].onRollOut = outTipe;
_root["tipe" + i].onReleaseOutside = outTipe;
_root["tipe" + i].enabled = true;
_root["tipe" + i].gotoAndStop(1);
_root["frame" + i]._visible = false;
i++;
}
_root["tipe" + pilihJenis].gotoAndStop(3);
_root["tipe" + pilihJenis].enabled = false;
if (pilihJenis == 1) {
i = 1;
while (i <= 9) {
_root["frame" + i]._visible = true;
_root["frame" + i].gotoAndStop(i);
if (slotUnlok[i] == 0) {
_root["frame" + i].gembok_mc._visible = true;
} else {
_root["frame" + i].gembok_mc._visible = false;
}
_root["frame" + i].onRelease = klikFrame;
_root["frame" + i].onRollOver = overFrame;
_root["frame" + i].onRollOut = outFrame;
_root["frame" + i].onReleaseOutside = outFrame;
i++;
}
} else if (pilihJenis == 2) {
i = 10;
while (i <= 17) {
_root["frame" + (i - 9)]._visible = true;
_root["frame" + (i - 9)].gotoAndStop(i);
if (slotUnlok[i] == 0) {
_root["frame" + (i - 9)].gembok_mc._visible = true;
} else {
_root["frame" + (i - 9)].gembok_mc._visible = false;
}
_root["frame" + (i - 9)].onRelease = klikFrame;
_root["frame" + (i - 9)].onRollOver = overFrame;
_root["frame" + (i - 9)].onRollOut = outFrame;
_root["frame" + (i - 9)].onReleaseOutside = outFrame;
i++;
}
} else if (pilihJenis == 3) {
i = 18;
while (i <= 25) {
_root["frame" + (i - 17)]._visible = true;
_root["frame" + (i - 17)].gotoAndStop(i);
if (slotUnlok[i] == 0) {
_root["frame" + (i - 17)].gembok_mc._visible = true;
} else {
_root["frame" + (i - 17)].gembok_mc._visible = false;
}
_root["frame" + (i - 17)].onRelease = klikFrame;
_root["frame" + (i - 17)].onRollOver = overFrame;
_root["frame" + (i - 17)].onRollOut = outFrame;
_root["frame" + (i - 17)].onReleaseOutside = outFrame;
i++;
}
} else if (pilihJenis == 4) {
i = 26;
while (i <= 30) {
_root["frame" + (i - 25)]._visible = true;
_root["frame" + (i - 25)].gotoAndStop(i);
if (slotUnlok[i] == 0) {
_root["frame" + (i - 25)].gembok_mc._visible = true;
} else {
_root["frame" + (i - 25)].gembok_mc._visible = false;
}
_root["frame" + (i - 25)].onRelease = klikFrame;
_root["frame" + (i - 25)].onRollOver = overFrame;
_root["frame" + (i - 25)].onRollOut = outFrame;
_root["frame" + (i - 25)].onReleaseOutside = outFrame;
i++;
}
} else if (pilihJenis == 5) {
i = 31;
while (i <= 33) {
_root["frame" + (i - 30)]._visible = true;
_root["frame" + (i - 30)].gotoAndStop(i);
if (slotUnlok[i] == 0) {
_root["frame" + (i - 30)].gembok_mc._visible = true;
} else {
_root["frame" + (i - 30)].gembok_mc._visible = false;
}
_root["frame" + (i - 30)].onRelease = klikFrame;
_root["frame" + (i - 30)].onRollOver = overFrame;
_root["frame" + (i - 30)].onRollOut = outFrame;
_root["frame" + (i - 30)].onReleaseOutside = outFrame;
i++;
}
} else if (pilihJenis == 6) {
i = 34;
while (i <= 37) {
_root["frame" + (i - 33)]._visible = true;
_root["frame" + (i - 33)].gotoAndStop(i);
if (slotUnlok[i] == 0) {
_root["frame" + (i - 33)].gembok_mc._visible = true;
} else {
_root["frame" + (i - 33)].gembok_mc._visible = false;
}
_root["frame" + (i - 33)].onRelease = klikFrame;
_root["frame" + (i - 33)].onRollOver = overFrame;
_root["frame" + (i - 33)].onRollOut = outFrame;
_root["frame" + (i - 33)].onReleaseOutside = outFrame;
i++;
}
} else if (pilihJenis == 7) {
i = 38;
while (i <= 42) {
_root["frame" + (i - 37)]._visible = true;
_root["frame" + (i - 37)].gotoAndStop(i);
if (slotUnlok[i] == 0) {
_root["frame" + (i - 37)].gembok_mc._visible = true;
} else {
_root["frame" + (i - 37)].gembok_mc._visible = false;
}
_root["frame" + (i - 37)].onRelease = klikFrame;
_root["frame" + (i - 37)].onRollOver = overFrame;
_root["frame" + (i - 37)].onRollOut = outFrame;
_root["frame" + (i - 37)].onReleaseOutside = outFrame;
i++;
}
} else if (pilihJenis == 8) {
i = 43;
while (i <= 46) {
_root["frame" + (i - 42)]._visible = true;
_root["frame" + (i - 42)].gotoAndStop(i);
if (slotUnlok[i] == 0) {
_root["frame" + (i - 42)].gembok_mc._visible = true;
} else {
_root["frame" + (i - 42)].gembok_mc._visible = false;
}
_root["frame" + (i - 42)].onRelease = klikFrame;
_root["frame" + (i - 42)].onRollOver = overFrame;
_root["frame" + (i - 42)].onRollOut = outFrame;
_root["frame" + (i - 42)].onReleaseOutside = outFrame;
i++;
}
} else if (pilihJenis == 9) {
i = 47;
while (i <= 50) {
_root["frame" + (i - 46)]._visible = true;
_root["frame" + (i - 46)].gotoAndStop(i);
if (slotUnlok[i] == 0) {
_root["frame" + (i - 46)].gembok_mc._visible = true;
} else {
_root["frame" + (i - 46)].gembok_mc._visible = false;
}
_root["frame" + (i - 46)].onRelease = klikFrame;
_root["frame" + (i - 46)].onRollOver = overFrame;
_root["frame" + (i - 46)].onRollOut = outFrame;
_root["frame" + (i - 46)].onReleaseOutside = outFrame;
i++;
}
}
i = 1;
while (i <= 30) {
if (_root["kotak" + i]._currentframe == 90) {
_root["kotak" + i].enabled = false;
} else {
_root["kotak" + i].enabled = true;
}
i++;
}
}
function klikFrame() {
removeMovieClip(infoBox);
if (this.gembok_mc._visible == true) {
if (xexp >= daftarExp[this._currentframe]) {
if (xlevel >= daftarLevel[this._currentframe]) {
adaSlotGak = false;
j = 1;
while (j <= 30) {
if (_root["kotak" + j]._currentframe == 90) {
adaSlotGak = true;
xexp = xexp - daftarExp[this._currentframe];
slotUnlok[this._currentframe] = 1;
this.gembok_mc._visible = false;
_root["kotak" + j].gotoAndStop(this._currentframe);
slot[j] = this._currentframe;
cekUnlok();
j = 31;
}
j++;
}
if (adaSlotGak == false) {
msgBox_mc._visible = true;
msgBox_mc.judul = "Can't Buy";
msgBox_mc.isi = "Slots are full, you must sell other unit first before buy this unit.";
msgBox_mc.no_btn.onRelease = function () {
msgBox_mc._visible = false;
};
}
} else {
msgBox_mc._visible = true;
msgBox_mc.judul = "Can't Buy";
msgBox_mc.isi = "Not enough Game Level, should be buy on level " + daftarLevel[this._currentframe];
msgBox_mc.no_btn.onRelease = function () {
msgBox_mc._visible = false;
};
}
} else {
msgBox_mc._visible = true;
msgBox_mc.judul = "Can't Buy";
msgBox_mc.isi = "Not enough Exp Point, sell other unit to gain more exp.";
msgBox_mc.no_btn.onRelease = function () {
msgBox_mc._visible = false;
};
}
} else {
cekBisaKlikSemua(false);
msgBox_mc2._visible = true;
msgBox_mc2.judul = "Selling Unit";
msgBox_mc2.isi = "Are you sure want to sell this unit?";
indix = this;
msgBox_mc2.yes_btn.onRelease = function () {
j = 1;
while (j <= 30) {
if (_root["kotak" + j]._currentframe == indix._currentframe) {
xexp = xexp + Math.ceil(daftarExp[indix._currentframe] / 4);
slotUnlok[indix._currentframe] = 1;
indix.gembok_mc._visible = true;
_root["kotak" + j].gotoAndStop(90);
levelLive[j] = 1;
levelRange[j] = 1;
levelSpeed[j] = 1;
levelDamage[j] = 1;
slot[j] = 90;
cekUnlok();
j = 31;
cekBisaKlikSemua(true);
msgBox_mc2._visible = false;
}
j++;
}
};
msgBox_mc2.no_btn.onRelease = function () {
cekBisaKlikSemua(true);
msgBox_mc2._visible = false;
};
}
}
function cekUnlok() {
i = 1;
while (i <= bykJumlah) {
slotUnlok[i] = 0;
i++;
}
j = 1;
while (j <= 30) {
if (_root["kotak" + j]._currentframe != 90) {
slotUnlok[_root["kotak" + j]._currentframe] = 1;
}
j++;
}
i = 1;
while (i <= 30) {
if (_root["kotak" + i]._currentframe == 90) {
_root["kotak" + i].enabled = false;
} else {
_root["kotak" + i].enabled = true;
}
i++;
}
}
function klikTipe() {
myStr = new String(this);
pilihJenis = Number(myStr.substr(myStr.length - 1, 1));
cekBisa();
}
function overTipe() {
this.gotoAndStop(2);
}
function outTipe() {
this.gotoAndStop(1);
}
function klikUpgrade() {
myStr = new String(this);
indiX = Number(myStr.substr(myStr.length - 1, 1));
if (xexp >= bykExp) {
xexp = xexp - bykExp;
if (indiX == 1) {
levelLive[pilihKotak]++;
} else if (indiX == 2) {
levelRange[pilihKotak]++;
} else if (indiX == 3) {
levelSpeed[pilihKotak]++;
} else if (indiX == 4) {
levelDamage[pilihKotak]++;
}
cekUpgrade();
}
removeMovieClip(infoBox4);
}
function overUpgrade() {
myStr = new String(this);
indiX = Number(myStr.substr(myStr.length - 1, 1));
infoBox4 = attachMovie("info_box3", "info_box4", 1000);
infoBox4._x = this._x + 400;
infoBox4._y = this._y + 175;
infoBox4.judul = namaUpgrade[indiX];
if ((pilihKotak >= 38) && (pilihKotak <= 42)) {
bykExp = (pilihKotak - 35) * nilaiUpgrade[indiX];
} else if ((pilihKotak >= 31) && (pilihKotak <= 37)) {
bykExp = (pilihKotak - 27) * nilaiUpgrade[indiX];
} else {
bykExp = pilihKotak * nilaiUpgrade[indiX];
}
if (indiX == 1) {
if (levelLive[pilihKotak] == 1) {
xlevelKe = 1.2;
} else if (levelLive[pilihKotak] == 2) {
xlevelKe = 1.4;
}
upTo = Math.ceil(xlevelKe * daftarLive[pilihKotak]);
} else if (indiX == 2) {
if (levelRange[pilihKotak] == 1) {
xlevelKe = 1.1;
} else if (levelRange[pilihKotak] == 2) {
xlevelKe = 1.2;
}
upTo = Math.ceil(xlevelKe * daftarRange[pilihKotak]);
} else if (indiX == 3) {
if (levelSpeed[pilihKotak] == 1) {
xlevelKe = 1.4;
} else if (levelSpeed[pilihKotak] == 2) {
xlevelKe = 1.8;
}
upTo = xlevelKe * daftarSpeed[pilihKotak];
} else if (indiX == 4) {
if (levelDamage[pilihKotak] == 1) {
xlevelKe = 1.1;
} else if (levelDamage[pilihKotak] == 2) {
xlevelKe = 1.2;
}
upTo = Math.ceil(xlevelKe * daftarDamage[pilihKotak]);
}
infoBox4.isi = ((("Need " + bykExp) + " exp for upgrade.\nUp to ") + upTo) + " pts";
}
function outUpgrade() {
removeMovieClip(infoBox4);
}
function cekBisaKlikSemua(indi) {
i = 1;
while (i <= 30) {
if (_root["kotak" + i]._currentframe != 90) {
_root["kotak" + i].enabled = indi;
}
i++;
}
i = 1;
while (i <= 9) {
_root["tipe" + i].enabled = indi;
i++;
}
i = 1;
while (i <= 9) {
_root["frame" + i].enabled = indi;
i++;
}
}
function klikKotak() {
pilihKotak = this._currentframe;
upgrade._visible = true;
cekUpgrade();
upgrade.judul = daftarNama[zpilihJenis];
upgrade.gambar.gotoAndStop(zpilihJenis);
cekBisaKlikSemua(false);
upgrade.close_btn.onRelease = function () {
cekBisaKlikSemua(true);
upgrade._visible = false;
};
removeMovieClip(infoBox3);
}
function cekUpgrade() {
i = 1;
while (i <= 4) {
upgrade["upgrade" + i].onRelease = klikUpgrade;
upgrade["upgrade" + i].onRollOver = overUpgrade;
upgrade["upgrade" + i].onRollOut = outUpgrade;
upgrade["upgrade" + i].onReleaseOutside = outUpgrade;
if (i == 1) {
if (levelLive[pilihKotak] == 1) {
levelKe = 1;
} else if (levelLive[pilihKotak] == 2) {
levelKe = 1.2;
} else if (levelLive[pilihKotak] == 3) {
levelKe = 1.4;
}
upgrade.nilai1 = Math.ceil(levelKe * daftarLive[pilihKotak]);
upgrade.level1 = "Level " + levelLive[pilihKotak];
if ((levelLive[pilihKotak] >= 3) || (daftarLive[pilihKotak] == 0)) {
upgrade["upgrade" + i].enabled = false;
upgrade["upgrade" + i]._alpha = 50;
} else {
upgrade["upgrade" + i].enabled = true;
upgrade["upgrade" + i]._alpha = 100;
}
} else if (i == 2) {
if (levelRange[pilihKotak] == 1) {
levelKe = 1;
} else if (levelRange[pilihKotak] == 2) {
levelKe = 1.1;
} else if (levelRange[pilihKotak] == 3) {
levelKe = 1.2;
}
upgrade.nilai2 = Math.ceil(levelKe * daftarRange[pilihKotak]);
upgrade.level2 = "Level " + levelRange[pilihKotak];
if ((levelRange[pilihKotak] >= 3) || (daftarRange[pilihKotak] == 0)) {
upgrade["upgrade" + i].enabled = false;
upgrade["upgrade" + i]._alpha = 50;
} else {
upgrade["upgrade" + i].enabled = true;
upgrade["upgrade" + i]._alpha = 100;
}
} else if (i == 3) {
if (levelSpeed[pilihKotak] == 1) {
levelKe = 1;
} else if (levelSpeed[pilihKotak] == 2) {
levelKe = 1.4;
} else if (levelSpeed[pilihKotak] == 3) {
levelKe = 1.8;
}
upgrade.nilai3 = levelKe * daftarSpeed[pilihKotak];
upgrade.level3 = "Level " + levelSpeed[pilihKotak];
if ((levelSpeed[pilihKotak] >= 3) || (daftarSpeed[pilihKotak] == 0)) {
upgrade["upgrade" + i].enabled = false;
upgrade["upgrade" + i]._alpha = 50;
} else {
upgrade["upgrade" + i].enabled = true;
upgrade["upgrade" + i]._alpha = 100;
}
} else if (i == 4) {
if (levelDamage[pilihKotak] == 1) {
levelKe = 1;
} else if (levelDamage[pilihKotak] == 2) {
levelKe = 1.1;
} else if (levelDamage[pilihKotak] == 3) {
levelKe = 1.2;
}
upgrade.nilai4 = Math.ceil(levelKe * daftarDamage[pilihKotak]);
upgrade.level4 = "Level " + levelDamage[pilihKotak];
if ((levelDamage[pilihKotak] >= 3) || (daftarDamage[pilihKotak] == 0)) {
upgrade["upgrade" + i].enabled = false;
upgrade["upgrade" + i]._alpha = 50;
} else {
upgrade["upgrade" + i].enabled = true;
upgrade["upgrade" + i]._alpha = 100;
}
}
namaUpgrade = new Array("", "Life Upgrade", "Range Upgrade", "Speed Upgrade", "Damage Upgrade");
nilaiUpgrade = new Array("", 4, 3, 2, 5);
i++;
}
}
function overKotak() {
if (this._currentframe != 90) {
myStr2 = new String(this);
if (myStr2.length == 14) {
zpilihJenis2 = Number(myStr2.substr(myStr2.length - 1, 1));
} else {
zpilihJenis2 = Number(myStr2.substr(myStr2.length - 2, 2));
}
zpilihJenis = this._currentframe;
infoBox3 = attachMovie("info_box3", "info_box", 1000);
if (((zpilihJenis2 == 1) || (zpilihJenis2 == 11)) || (zpilihJenis2 == 21)) {
infoBox3._x = this._x + 50;
infoBox3._y = this._y - 75;
} else {
infoBox3._x = this._x;
infoBox3._y = this._y - 75;
}
infoBox3.judul = daftarNama[zpilihJenis];
if (((((levelLive[zpilihJenis] >= 3) || (daftarLive[zpilihJenis] == 0)) && ((levelRange[zpilihJenis] >= 3) || (daftarRange[zpilihJenis] == 0))) && ((levelSpeed[zpilihJenis] >= 3) || (daftarSpeed[zpilihJenis] == 0))) && ((levelDamage[zpilihJenis] >= 3) || (daftarDamage[zpilihJenis] == 0))) {
infoBox3.gotoAndStop(2);
infoBox3.isi = "This unit is full upgrades.";
} else {
infoBox3.gotoAndStop(1);
if ((pilihKotak >= 31) && (pilihKotak <= 42)) {
infoBox3.isi = "Click Here for Upgrade life, range and damage.";
} else {
infoBox3.isi = "Click Here for Upgrade life, range, speed and damage.";
}
}
} else {
removeMovieClip(infoBox3);
}
}
function outKotak() {
removeMovieClip(infoBox3);
}
function overFrame() {
zpilihJenis = this._currentframe;
infoBox = attachMovie("info_box2", "info_box", 1000);
infoBox._x = this._x;
infoBox._y = this._y + 100;
infoBox.judul = daftarNama[zpilihJenis];
if (zpilihJenis <= 9) {
hargaKe = Math.ceil(daftarHarga[zpilihJenis] / levelSkill[7]);
} else if (zpilihJenis <= 17) {
hargaKe = Math.ceil(daftarHarga[zpilihJenis] / levelSkill[8]);
} else if (zpilihJenis <= 25) {
hargaKe = Math.ceil(daftarHarga[zpilihJenis] / levelSkill[9]);
} else if (zpilihJenis <= 30) {
hargaKe = Math.ceil(daftarHarga[zpilihJenis] / levelSkill[10]);
} else if (zpilihJenis <= 37) {
hargaKe = Math.ceil(daftarHarga[zpilihJenis] / levelSkill[11]);
} else if (zpilihJenis <= 42) {
hargaKe = Math.ceil(daftarHarga[zpilihJenis] / levelSkill[12]);
} else if (zpilihJenis >= 43) {
hargaKe = Math.ceil(daftarHarga[zpilihJenis] / levelSkill[13]);
}
if (slotUnlok[zpilihJenis] == 0) {
infoBox.isi = ((((((((((((("Life: " + daftarLive[zpilihJenis]) + ", Range: ") + daftarRange[zpilihJenis]) + ", Speed: ") + daftarSpeed[zpilihJenis]) + ", Damage: ") + daftarDamage[zpilihJenis]) + ", Price: ") + hargaKe) + "\n\nNeed ") + daftarExp[zpilihJenis]) + " exp and level ") + daftarLevel[zpilihJenis]) + " to buy";
} else {
infoBox.isi = ((((((((((("Life: " + daftarLive[zpilihJenis]) + ", Range: ") + daftarRange[zpilihJenis]) + ", Speed: ") + daftarSpeed[zpilihJenis]) + ", Damage: ") + daftarDamage[zpilihJenis]) + ", Price: ") + hargaKe) + "\n\nClick here to sell, +") + Math.ceil(daftarExp[zpilihJenis] / 4)) + " exp";
}
}
function outFrame() {
removeMovieClip(infoBox);
}
function bisaSemua() {
bisaInfan = 0;
i = 1;
while (i <= 9) {
if (slotUnlok[i] == 1) {
bisaInfan++;
}
i++;
}
if (bisaInfan >= 9) {
_root.medals10 = 1;
}
bisaArti = 0;
i = 10;
while (i <= 17) {
if (slotUnlok[i] == 1) {
bisaArti++;
}
i++;
}
if (bisaArti >= 8) {
_root.medals11 = 1;
}
bisaAir = 0;
i = 18;
while (i <= 25) {
if (slotUnlok[i] == 1) {
bisaAir++;
}
i++;
}
if (bisaAir >= 8) {
_root.medals12 = 1;
}
bisaNavy = 0;
i = 26;
while (i <= 30) {
if (slotUnlok[i] == 1) {
bisaNavy++;
}
i++;
}
if (bisaNavy >= 5) {
_root.medals13 = 1;
}
bisaSemuaChara1 = 0;
bisaSemuaChara2 = 0;
bisaSemuaChara3 = 0;
i = 1;
while (i <= 30) {
if (slotUnlok[i] == 1) {
if ((((levelLive[i] >= 1) && (levelRange[i] >= 1)) && (levelSpeed[i] >= 1)) && (levelDamage[i] >= 1)) {
bisaSemuaChara1++;
}
if ((((levelLive[i] >= 2) && (levelRange[i] >= 2)) && (levelSpeed[i] >= 2)) && (levelDamage[i] >= 2)) {
bisaSemuaChara2++;
}
if ((((levelLive[i] >= 3) && (levelRange[i] >= 3)) && (levelSpeed[i] >= 3)) && (levelDamage[i] >= 3)) {
bisaSemuaChara3++;
}
}
i++;
}
if (bisaSemuaChara3 >= 30) {
_root.medals14 = 1;
_root.medals15 = 1;
_root.medals16 = 1;
} else if (bisaSemuaChara2 >= 30) {
_root.medals14 = 1;
_root.medals15 = 1;
} else if (bisaSemuaChara1 >= 30) {
_root.medals14 = 1;
}
i = 1;
while (i <= 47) {
_root["a7" + i] = String("i" + i);
Cookies = SharedObject.getLocal(_root["a7" + i], "/");
Cookies.data["ii" + i] = _root["medals" + i];
Cookies.flush(10);
i++;
}
}
stop();
cekLevelan();
bgData = "maen";
musik.stop();
upgrade._visible = false;
msgBox_mc._visible = false;
msgBox_mc2._visible = false;
menu_mc2._visible = false;
xlevelx = xlevel;
bykPasukan1 = 50 + (10 * (levelSkill[1] - 1));
nyawaIstanax = 3000 + (25000 * (levelSkill[2] - 1));
if (jenisMorale == "offence") {
defense_btn.gotoAndStop(1);
offence_btn.gotoAndStop(2);
} else if (jenisMorale == "defense") {
defense_btn.gotoAndStop(2);
offence_btn.gotoAndStop(1);
}
if (jenisAppear == "random") {
random_btn.gotoAndStop(2);
manual_btn.gotoAndStop(1);
} else if (jenisAppear == "manual") {
random_btn.gotoAndStop(1);
manual_btn.gotoAndStop(2);
}
defense_btn.onRelease = function () {
jenisMorale = "defense";
defense_btn.gotoAndStop(2);
offence_btn.gotoAndStop(1);
};
offence_btn.onRelease = function () {
jenisMorale = "offence";
defense_btn.gotoAndStop(1);
offence_btn.gotoAndStop(2);
};
random_btn.onRelease = function () {
jenisAppear = "random";
random_btn.gotoAndStop(2);
manual_btn.gotoAndStop(1);
};
manual_btn.onRelease = function () {
jenisAppear = "manual";
random_btn.gotoAndStop(1);
manual_btn.gotoAndStop(2);
};
defense_btn.onRollOver = function () {
infoBox = attachMovie("info_box2", "info_box", 1000);
infoBox._x = this._x - 50;
infoBox._y = this._y - 75;
infoBox.judul = "Defense Morale";
infoBox.isi = "Forms a massive wall of troops but deploys after at least 12 units are in the center of the battlefield.";
};
offence_btn.onRollOver = function () {
infoBox = attachMovie("info_box2", "info_box", 1000);
infoBox._x = this._x - 50;
infoBox._y = this._y - 75;
infoBox.judul = "Offense Morale";
infoBox.isi = "Troops will attack aggressively.";
};
random_btn.onRollOver = function () {
infoBox = attachMovie("info_box2", "info_box", 1000);
infoBox._x = this._x - 50;
infoBox._y = this._y - 75;
infoBox.judul = "Random Appear";
infoBox.isi = "No formation is made, troops will appear in random locations.";
};
manual_btn.onRollOver = function () {
infoBox = attachMovie("info_box2", "info_box", 1000);
infoBox._x = this._x - 50;
infoBox._y = this._y - 75;
infoBox.judul = "Manual Appear";
infoBox.isi = "Troops will deploy in an arrow sign formation. Control by clicking (W, S) or (UP, DOWN) key.";
};
defense_btn.onRollOut = (defense_btn.onReleaseOutside = function () {
removeMovieClip(infoBox);
});
offence_btn.onRollOut = (offence_btn.onReleaseOutside = function () {
removeMovieClip(infoBox);
});
random_btn.onRollOut = (random_btn.onReleaseOutside = function () {
removeMovieClip(infoBox);
});
manual_btn.onRollOut = (manual_btn.onReleaseOutside = function () {
removeMovieClip(infoBox);
});
if (xexp >= 10000) {
_root.medals23 = 1;
_root.medals24 = 1;
_root.medals25 = 1;
_root.medals26 = 1;
} else if (xexp >= 7500) {
_root.medals23 = 1;
_root.medals24 = 1;
_root.medals25 = 1;
} else if (xexp >= 5000) {
_root.medals23 = 1;
_root.medals24 = 1;
} else if (xexp >= 2500) {
_root.medals23 = 1;
}
if (money1 >= 1000000) {
_root.medals27 = 1;
_root.medals28 = 1;
_root.medals29 = 1;
_root.medals30 = 1;
} else if (money1 >= 750000) {
_root.medals27 = 1;
_root.medals28 = 1;
_root.medals29 = 1;
} else if (money1 >= 500000) {
_root.medals27 = 1;
_root.medals28 = 1;
} else if (money1 >= 250000) {
_root.medals27 = 1;
}
continue_btn.onRelease = function () {
removeMovieClip(tutorial);
cekUnlok();
adaIsi = 0;
adaInfan = 0;
adaNavy = 0;
adaAir = 0;
j = 1;
while (j <= 30) {
if (_root["kotak" + j]._currentframe != 90) {
adaIsi++;
}
if ((_root["kotak" + j]._currentframe >= 1) && (_root["kotak" + j]._currentframe <= 9)) {
adaInfan++;
}
if ((_root["kotak" + j]._currentframe >= 18) && (_root["kotak" + j]._currentframe <= 25)) {
adaAir++;
}
if ((_root["kotak" + j]._currentframe >= 26) && (_root["kotak" + j]._currentframe <= 30)) {
adaNavy++;
}
j++;
}
if (adaIsi > 0) {
if ((adaNavy == 0) && (jenisPerang == "laut")) {
msgBox_mc._visible = true;
msgBox_mc.judul = "Can't Continue";
msgBox_mc.isi = "You must place at least one type of navy troops on the slot. We are in the sea battle.";
msgBox_mc.no_btn.onRelease = function () {
msgBox_mc._visible = false;
};
} else if ((adaAir == 0) && (jenisPerang == "udara")) {
msgBox_mc._visible = true;
msgBox_mc.judul = "Can't Continue";
msgBox_mc.isi = "You must place at least one type of air force troops on the slot. We are in the air battle.";
msgBox_mc.no_btn.onRelease = function () {
msgBox_mc._visible = false;
};
} else if ((adaInfan == 0) && (jenisPerang == "darat")) {
msgBox_mc._visible = true;
msgBox_mc.judul = "Can't Continue";
msgBox_mc.isi = "You must place at least one type of infantry troops on the slot. We are in the land battle.";
msgBox_mc.no_btn.onRelease = function () {
msgBox_mc._visible = false;
};
} else {
if (adaIsi >= 30) {
_root.medals20 = 1;
_root.medals21 = 1;
_root.medals22 = 1;
} else if (adaIsi >= 20) {
_root.medals20 = 1;
_root.medals21 = 1;
} else if (adaIsi >= 10) {
_root.medals20 = 1;
}
i = 0;
while (i <= simpanSemua.length) {
_root["aa" + i] = String("b" + i);
Cookies = SharedObject.getLocal(_root["aa" + i], "/");
Cookies.data["bb" + i] = eval (simpanSemua[i]);
Cookies.flush(10);
i++;
}
i = 1;
while (i <= bykJumlah) {
_root["a3" + i] = String("e" + i);
Cookies = SharedObject.getLocal(_root["a3" + i], "/");
Cookies.data["ee" + i] = (((String(levelSpeed[i]) + String(levelRange[i])) + String(levelLive[i])) + String(levelDamage[i])) + String(slotUnlok[i]);
Cookies.flush(10);
i++;
}
i = 1;
while (i <= 30) {
_root["a2" + i] = String("d" + i);
Cookies = SharedObject.getLocal(_root["a2" + i], "/");
Cookies.data["dd" + i] = slot[i];
Cookies.flush(10);
i++;
}
i = 1;
while (i <= 15) {
_root["a8" + i] = String("j" + i);
Cookies = SharedObject.getLocal(_root["a8" + i], "/");
Cookies.data["jj" + i] = levelSkill[i];
Cookies.flush(10);
i++;
}
removeMovieClip(infoBox);
gotoAndStop (502);
}
} else {
msgBox_mc._visible = true;
msgBox_mc.judul = "Can't Continue";
msgBox_mc.isi = "You must place at least one type of troops or buildings on the slot.";
msgBox_mc.no_btn.onRelease = function () {
msgBox_mc._visible = false;
};
}
};
skill_btn.onRelease = function () {
dariMana = "setup";
removeMovieClip(infoBox);
gotoAndStop (506);
};
statistic_btn.onRelease = function () {
dariMana = "setup";
removeMovieClip(infoBox);
gotoAndStop (508);
};
achievements_btn.onRelease = function () {
bisaSemua();
dariMana = "setup";
i = 1;
while (i <= 47) {
_root["a7" + i] = String("i" + i);
Cookies = SharedObject.getLocal(_root["a7" + i], "/");
Cookies.data["ii" + i] = _root["medals" + i];
Cookies.flush(10);
i++;
}
removeMovieClip(infoBox);
gotoAndStop (512);
};
medals_btn.onRelease = function () {
bisaSemua();
dariMana = "setup";
i = 1;
while (i <= 47) {
_root["a7" + i] = String("i" + i);
Cookies = SharedObject.getLocal(_root["a7" + i], "/");
Cookies.data["ii" + i] = _root["medals" + i];
Cookies.flush(10);
i++;
}
removeMovieClip(infoBox);
gotoAndStop (510);
};
map_btn.onRelease = function () {
removeMovieClip(infoBox);
gotoAndStop (498);
};
i = 1;
while (i <= 30) {
_root["kotak" + i].gembok_mc._visible = false;
_root["kotak" + i].gotoAndStop(slot[i]);
_root["kotak" + i].onRelease = klikKotak;
_root["kotak" + i].onRollOver = overKotak;
_root["kotak" + i].onRollOut = (_root["kotak" + i].onReleaseOutside = outKotak);
i++;
}
pilihJenis = 1;
cekBisa();
if (tutorialSetup == false) {
i = 1;
while (i <= 9) {
_root["tipe" + i].enabled = false;
_root["frame" + i].enabled = false;
i++;
}
i = 1;
while (i <= 30) {
if (_root["kotak" + i].gembok_mc._visible == false) {
_root["kotak" + i].enabled = false;
}
i++;
}
skill_btn.enabled = false;
statistic_btn.enabled = false;
achievements_btn.enabled = false;
medals_btn.enabled = false;
menu_btn.enabled = false;
continue_btn.enabled = false;
defense_btn.enabled = false;
offence_btn.enabled = false;
random_btn.enabled = false;
manual_btn.enabled = false;
map_btn.enabled = false;
tutorial = attachMovie("tutorial_mc2", "tutorial_mc2", 9);
tutorial._x = 400;
tutorial._y = 240;
tutorial.next_btn.onRelease = function () {
if (tutorial_mc2._currentframe < 14) {
tutorial_mc2.gotoAndStop(tutorial_mc2._currentframe + 1);
} else {
tutorialSetupSelesai();
tutorialSetup = true;
_root.medals2 = 1;
i = 1;
while (i <= 2) {
_root["a7" + i] = String("i" + i);
Cookies = SharedObject.getLocal(_root["a7" + i], "/");
Cookies.data["ii" + i] = _root["medals" + i];
Cookies.flush(10);
i++;
}
}
};
} else {
tutorialSetupSelesai();
}
bisaSemua();
Frame 505
stop();
_root.gotoAndStop(_root._currentframe - 1);
Frame 506
function cekSemuaLevel() {
i = 1;
while (i <= 15) {
_root["kotak" + i].onRelease = klikKotak;
_root["kotak" + i].onRollOver = overKotak;
_root["kotak" + i].onRollOut = outKotak;
_root["kotak" + i].onReleaseOutside = outKotak;
_root["xlevel" + i] = "Skill Level " + levelSkill[i];
if (levelSkill[i] >= skillMaxLevel[i]) {
_root["kotak" + i]._alpha = 50;
} else {
_root["kotak" + i]._alpha = 100;
}
i++;
}
}
function klikKotak() {
cekKlikSkill(true);
removeMovieClip(infoBox);
myStr = new String(this);
if (myStr.length == 14) {
indi = Number(myStr.substr(myStr.length - 1, 1));
} else {
indi = Number(myStr.substr(myStr.length - 2, 2));
}
if ((xexp >= skillExp[indi]) && (xlevel >= skillLevel[indi])) {
if (levelSkill[indi] < skillMaxLevel[indi]) {
xexp = xexp - skillExp[indi];
levelSkill[indi]++;
cekSemuaLevel();
} else {
cekKlikSkill(false);
msgBox_mc._visible = true;
msgBox_mc.judul = "Can't Upgrade";
msgBox_mc.isi = "It's full powered skill level.";
msgBox_mc.no_btn.onRelease = function () {
cekKlikSkill(true);
msgBox_mc._visible = false;
};
}
} else {
cekKlikSkill(false);
msgBox_mc._visible = true;
msgBox_mc.judul = "Can't Upgrade";
msgBox_mc.isi = "Not enough exp point or game level.";
msgBox_mc.no_btn.onRelease = function () {
cekKlikSkill(true);
msgBox_mc._visible = false;
};
}
}
function overKotak() {
myStr = new String(this);
if (myStr.length == 14) {
indi = Number(myStr.substr(myStr.length - 1, 1));
} else {
indi = Number(myStr.substr(myStr.length - 2, 2));
}
infoBox = attachMovie("info_box2", "info_box", 1000);
infoBox._x = this._x;
infoBox._y = this._y - 100;
if (indi <= 5) {
infoBox._y = this._y + 125;
}
infoBox.judul = skillJudul[indi];
if (levelSkill[indi] >= skillMaxLevel[indi]) {
infoBox.isi = ((skillIsi[indi] + "\nFull powered skill\nMaximum upgrade: ") + skillMaxLevel[indi]) + " levels";
infoBox.gotoAndStop(2);
} else {
infoBox.isi = ((((((((skillIsi[indi] + "\nNeed ") + skillExp[indi]) + " exp and game level ") + skillLevel[indi]) + " to upgrade\nMax level: ") + skillMaxLevel[indi]) + "\nMaximum upgrade: ") + skillMaxLevel) + " levels";
infoBox.gotoAndStop(1);
}
}
function outKotak() {
removeMovieClip(infoBox);
}
function cekKlikSkill(indi) {
i = 1;
while (i <= 15) {
_root["kotak" + i].enabled = indi;
i++;
}
}
stop();
cekKlikSkill(true);
msgBox_mc._visible = false;
back_btn.onRelease = function () {
levelSkilled1 = 0;
levelSkilled2 = 0;
levelSkilled3 = 0;
i = 1;
while (i <= 15) {
if (levelSkill[i] >= skillMaxLevel[i]) {
levelSkilled3++;
}
if (levelSkill[i] >= 3) {
levelSkilled2++;
}
if (levelSkill[i] >= 2) {
levelSkilled1++;
}
i++;
}
if (levelSkilled3 >= 15) {
_root.medals33 = 1;
_root.medals32 = 1;
_root.medals31 = 1;
} else if (levelSkilled2 >= 15) {
_root.medals32 = 1;
_root.medals31 = 1;
} else if (levelSkilled1 >= 15) {
_root.medals31 = 1;
}
removeMovieClip(infoBox);
gotoAndStop (504);
};
skillJudul = new Array("", "Unit Boost", "Base Boost", "Speed Boost", "Range Boost", "Damage Boost", "Life Boost", "Low Cost Infantry", "Low Cost Artillery", "Low Cost Air Force", "Low Cost Navy", "Low Cost Turret and Tower", "Low Cost Base Guard", "Low Cost Strike and Special", "Increase Money", "Increase Exp");
skillIsi = new Array("", "Increase Total Unit", "Increase Base Life", "Increase All Unit's Speed", "Increase All Unit's Range", "Increase All Unit's Damage", "Increase All Unit's Life", "Decrease All Infantry Unit's cost", "Decrease All Artillery Unit's cost", "Decrease All Air Force Unit's cost", "Decrease All Navy Unit's cost", "Decrease All Building's cost", "Decrease All Base Guard's cost", "Decrease All Strike's cost", "Increase Money Gained", "Increase Exp Gained");
setMenang = false;
if ((campaignWin1 == 1) && (jenisCampaign == 1)) {
setMenang = true;
} else if ((campaignWin2 == 1) && (jenisCampaign == 2)) {
setMenang = true;
} else if ((campaignWin3 == 1) && (jenisCampaign == 3)) {
setMenang = true;
}
if (setMenang == false) {
skillExp = new Array("", 50, 75, 500, 1000, 1500, 2000, 500, 1000, 1500, 2000, 2500, 1000, 3500, 1500, 2500);
} else if (_root.medals43 == 1) {
skillExp = new Array("", 50, 75, 500, 1000, 1500, 2000, 500, 1000, 1500, 2000, 2500, 1000, 3500, 250, 500);
} else {
skillExp = new Array("", 50, 75, 500, 1000, 1500, 2000, 500, 1000, 1500, 2000, 2500, 1000, 3500, 500, 1000);
}
if (setMenang == true) {
skillLevel = new Array("", 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
skillMaxLevel = new Array("", 25, 30, 3, 3, 25, 25, 4, 4, 4, 4, 4, 4, 4, 14, 14);
} else if (jenisCampaign == 1) {
skillLevel = new Array("", 1, 2, 8, 9, 10, 11, 10, 11, 12, 13, 14, 15, 16, 10, 11);
skillMaxLevel = new Array("", 15, 20, 3, 3, 10, 10, 4, 4, 4, 4, 4, 4, 4, 10, 10);
} else if (jenisCampaign == 2) {
skillLevel = new Array("", 1, 2, 8, 9, 10, 11, 10, 11, 12, 13, 14, 15, 16, 10, 11);
skillMaxLevel = new Array("", 15, 20, 3, 3, 16, 16, 4, 4, 4, 4, 4, 4, 4, 10, 10);
} else {
skillLevel = new Array("", 1, 2, 8, 9, 10, 11, 10, 11, 12, 13, 14, 15, 16, 10, 11);
skillMaxLevel = new Array("", 15, 20, 3, 3, 18, 18, 4, 4, 4, 4, 4, 4, 4, 10, 10);
}
cekSemuaLevel();
Frame 507
stop();
_root.gotoAndStop(_root._currentframe - 1);
Frame 508
stop();
msgBox_mc2._visible = false;
reset_btn.onRelease = function () {
msgBox_mc2._visible = true;
msgBox_mc2.judul = "Reset All Time Statistic";
msgBox_mc2.isi = "Are you sure want to reset all time statistic?";
indix = this;
msgBox_mc2.yes_btn.onRelease = function () {
infantry1 = 0;
artillery1 = 0;
airforce1 = 0;
navy1 = 0;
buildings1 = 0;
totWin1 = 0;
totLose1 = 0;
infantry2 = 0;
artillery2 = 0;
airforce2 = 0;
navy2 = 0;
buildings2 = 0;
totWin2 = 0;
totLose2 = 0;
resetStatistik = undefined;
simpanData();
gotoAndStop (504);
};
msgBox_mc2.no_btn.onRelease = function () {
msgBox_mc2._visible = false;
};
};
back_btn.onRelease = function () {
if (dariMana == "setup") {
gotoAndStop (504);
} else if (dariMana == "main") {
gotoAndStop (471);
}
};
Frame 509
stop();
_root.gotoAndStop(_root._currentframe - 1);
Frame 510
function overBox() {
myStr = new String(this);
if (myStr.length == 16) {
indi = Number(myStr.substr(myStr.length - 1, 1));
} else {
indi = Number(myStr.substr(myStr.length - 2, 2));
}
infoBox = attachMovie("info_box6", "info_box", 1000);
infoBox._x = this._x;
infoBox._y = this._y - 100;
if (infoBox._x <= 150) {
infoBox._x = 150;
}
if (infoBox._x >= 650) {
infoBox._x = 650;
}
if (infoBox._y <= 75) {
infoBox._y = 75;
}
if (this._currentframe == 1) {
infoBox.gotoAndStop(1);
infoBox.isi = judulAchieve[indi] + " (Locked)";
} else {
infoBox.gotoAndStop(2);
infoBox.isi = "Award for: " + judulAchieve[indi];
}
}
function outBox() {
removeMovieClip(infoBox);
}
stop();
back_btn.onRelease = function () {
removeMovieClip(infoBox);
if (dariMana == "setup") {
gotoAndStop (504);
} else if (dariMana == "main") {
gotoAndStop (471);
}
};
judulAchieve = new Array("", "Complete war tutorial.", "Complete setup tutorial.", "Kill more than 100 troops in 1 level.", "Kill more than 200 troops in 1 level.100", "Kill more than 300 troops in 1 level.100", "Kill more than 400 troops in 1 level.100", "Gain more than 1000 exp in 1 level.", "Gain more than 2000 exp in 1 level.", "Gain more than 4000 exp in 1 level.", "Activates all infantry characters.", "Activates all artillery characters.", "Activates all air force characters.", "Activates all navy characters.", "Activates all characters (infantry, artillery, air force and navy)", "Upgrade all characters to level 2.", "Upgrade all characters to level 3.", "Kept base 100% in 5 battles in a row.", "Kept base 100% in 10 battles in a row.", "Kept base 100% in 15 battles in a row.", "Filled 10 slots in setup.", "Filled 20 slots in setup.", "Filled 30 slots in setup.", "Gained 2500 exp.", "Gained 5000 exp.", "Gained 7500 exp.", "Gained 10000 exp.", "Collected 250000 money points.", "Collected 500000 money points.", "Collected 750000 money points.", "Collected 1000000 money points.", "Advances all powered skill to level 1.", "Advances all powered skill to level 2.", "Advances all powered skill to maximum level.", "Win 15 levels in campaign mode 1.", "Win 15 levels in campaign mode 2.", "Win 15 levels in campaign mode 3.", "Win all levels in campaign mode 1.", "Win all levels in campaign mode 2.", "Win all levels in campaign mode 3.", "Win single mode, easy level, 5 times in a row.", "Win single mode, normal level, 10 times in a row.", "Win single mode, hard level, 15 times in a row.", "Win all campaign modes.", "Win campaign mode 1 with no losses.", "Win campaign mode 2 with no losses.", "Win campaign mode 3 with no losses.", "Win all campaign modes with no losses.");
i = 1;
while (i <= 47) {
if (_root["medals" + i] == true) {
_root["xmedals" + i].gotoAndStop(2);
_root["bintang" + i].gotoAndStop(2);
_root["xmedals" + i]._alpha = 100;
_root["bintang" + i]._alpha = 100;
} else {
_root["xmedals" + i].gotoAndStop(1);
_root["bintang" + i].gotoAndStop(1);
_root["xmedals" + i]._alpha = 75;
_root["bintang" + i]._alpha = 75;
}
_root["xmedals" + i].onRollOver = overBox;
_root["xmedals" + i].onRollOut = outBox;
_root["bintang" + i].onRollOver = overBox;
_root["bintang" + i].onRollOut = outBox;
i++;
}
Frame 511
stop();
_root.gotoAndStop(_root._currentframe - 1);
Frame 512
function overBox() {
myStr = new String(this);
if (myStr.length == 16) {
indi = Number(myStr.substr(myStr.length - 1, 1));
} else {
indi = Number(myStr.substr(myStr.length - 2, 2));
}
infoBox = attachMovie("info_box6", "info_box", 1000);
infoBox._x = this._x;
infoBox._y = this._y - 100;
if (infoBox._x <= 150) {
infoBox._x = 150;
}
if (infoBox._x >= 650) {
infoBox._x = 650;
}
if (infoBox._y <= 75) {
infoBox._y = 75;
}
if (this._currentframe == 1) {
infoBox.gotoAndStop(1);
infoBox.isi = judulAchieve[indi] + " (Locked)";
} else {
infoBox.gotoAndStop(2);
infoBox.isi = "Award for: " + judulAchieve[indi];
}
}
function outBox() {
removeMovieClip(infoBox);
}
stop();
back_btn.onRelease = function () {
removeMovieClip(infoBox);
if (dariMana == "setup") {
gotoAndStop (504);
} else if (dariMana == "main") {
gotoAndStop (471);
}
};
judulAchieve = new Array("", "Complete war tutorial.", "Complete setup tutorial.", "Kill more than 50 troops in 1 level.", "Kill more than 75 troops in 1 level", "Kill more than 100 troops in 1 level", "Kill more than 150 troops in 1 level", "Gain more than 1000 exp in 1 level.", "Gain more than 2000 exp in 1 level.", "Gain more than 4000 exp in 1 level.", "Activates all infantry characters.", "Activates all artillery characters.", "Activates all air force characters.", "Activates all navy characters.", "Activates all infantry, artillery, air force & navy.", "Upgrade all troops to level 2.", "Upgrade all troops to level 3.", "Kept base 100% in 5 battles in a row.", "Kept base 100% in 10 battles in a row.", "Kept base 100% in 15 battles in a row.", "Filled 10 slots in setup.", "Filled 20 slots in setup.", "Filled 30 slots in setup.", "Collected 2500 exp.", "Collected 5000 exp.", "Collected 7500 exp.", "Collected 10000 exp.", "Collected 250000 money points.", "Collected 500000 money points.", "Collected 750000 money points.", "Collected 1000000 money points.", "Advances all powered skill to level 2.", "Advances all powered skill to level 3.", "Advances all powered skill to maximum level.", "Won 15 levels in campaign mode 1.", "Won 15 levels in campaign mode 2.", "Won 15 levels in campaign mode 3.", "Won all levels in campaign mode 1.", "Won all levels in campaign mode 2.", "Won all levels in campaign mode 3.", "Won single mode, 5 times in a row.", "Won single mode, 10 times in a row.", "Won single mode, 15 times in a row.", "Won all campaign modes.", "Won campaign mode 1 with no losses.", "Won campaign mode 2 with no losses.", "Won campaign mode 3 with no losses.", "Won all campaign modes with no losses.");
i = 1;
while (i <= 47) {
if (_root["medals" + i] == true) {
_root["xmedals" + i].gotoAndStop(2);
_root["bintang" + i].gotoAndStop(2);
_root["xmedals" + i]._alpha = 100;
_root["bintang" + i]._alpha = 100;
} else {
_root["xmedals" + i].gotoAndStop(1);
_root["bintang" + i].gotoAndStop(1);
_root["xmedals" + i]._alpha = 75;
_root["bintang" + i]._alpha = 75;
}
_root["xmedals" + i].onRollOver = overBox;
_root["xmedals" + i].onRollOut = outBox;
_root["bintang" + i].onRollOver = overBox;
_root["bintang" + i].onRollOut = outBox;
i++;
}
Frame 513
stop();
_root.gotoAndStop(_root._currentframe - 1);
Frame 514
function cekMedaliDapat() {
if (jenisCampaign == 1) {
campaignWin1 = 1;
}
if (jenisCampaign == 2) {
campaignWin2 = 1;
}
if (jenisCampaign == 3) {
campaignWin3 = 1;
}
if (((campaignWin1 == 1) && (campaignWin2 == 1)) && (campaignWin3 == 1)) {
_root.medals43 = 1;
}
if (jenisCampaign == 1) {
if (nyawaGame == 10) {
menangTerus1 = 1;
}
} else if (jenisCampaign == 2) {
if (nyawaGame == 15) {
menangTerus2 = 1;
}
} else if (jenisCampaign == 3) {
if (nyawaGame == 20) {
menangTerus3 = 1;
}
}
if (menangTerus1 == 1) {
_root.medals44 = 1;
}
if (menangTerus2 == 1) {
_root.medals45 = 1;
}
if (menangTerus3 == 1) {
_root.medals46 = 1;
}
if (((_root.medals44 == 1) && (_root.medals45 == 1)) && (_root.medals46 == 1)) {
_root.medals47 = 1;
}
i = 1;
while (i <= 57) {
_root["a7" + i] = String("i" + i);
Cookies = SharedObject.getLocal(_root["a7" + i], "/");
Cookies.data["ii" + i] = _root["medals" + i];
Cookies.flush(10);
i++;
}
}
stop();
bgData = undefined;
xlevel = 1;
simpanData();
back_btn.onRelease = function () {
removeMovieClip(infoBox);
backMusic();
gotoAndStop (471);
simpanData();
};
cekMedaliDapat();
logo_mc.onRelease = function () {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1226&subid=wingame", "_blank");
};
Frame 515
stop();
_root.gotoAndStop(_root._currentframe - 1);
Frame 516
stop();
bgData = undefined;
xlevel = 1;
simpanData();
back_btn.onRelease = function () {
simpanData();
removeMovieClip(infoBox);
backMusic();
gotoAndStop (471);
};
logo_mc.onRelease = function () {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1226&subid=losegame", "_blank");
};
Frame 517
stop();
_root.gotoAndStop(_root._currentframe - 1);
Symbol 14 MovieClip Frame 1
stop();
Symbol 42 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Symbol 117 MovieClip Frame 40
stop();
Symbol 118 MovieClip Frame 1
stop();
Symbol 118 MovieClip Frame 2
stop();
_root.backLedak();
_root.backLedak();
Symbol 141 MovieClip Frame 1
stop();
Symbol 145 MovieClip Frame 1
stop();
Symbol 149 MovieClip Frame 1
stop();
Symbol 153 MovieClip Frame 1
stop();
Symbol 157 MovieClip Frame 1
stop();
Symbol 161 MovieClip Frame 1
stop();
Symbol 166 MovieClip Frame 1
stop();
Symbol 170 MovieClip Frame 1
stop();
Symbol 174 MovieClip Frame 1
stop();
Symbol 197 MovieClip Frame 1
stop();
Symbol 197 MovieClip Frame 2
play();
Symbol 200 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
this.onRelease = function () {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1226&subid=playing", "_blank");
};
Symbol 223 MovieClip Frame 1
stop();
Symbol 223 MovieClip Frame 300
_root.cekComplete(this);
Symbol 227 MovieClip Frame 1
stop();
Symbol 227 MovieClip Frame 240
_root.cekComplete(this);
Symbol 230 MovieClip Frame 1
stop();
Symbol 230 MovieClip Frame 180
_root.cekComplete(this);
Symbol 234 MovieClip Frame 1
stop();
Symbol 234 MovieClip Frame 180
_root.cekComplete(this);
Symbol 237 MovieClip Frame 1
stop();
Symbol 237 MovieClip Frame 150
_root.cekComplete(this);
Symbol 246 MovieClip Frame 1
stop();
Symbol 246 MovieClip Frame 150
_root.cekComplete(this);
Symbol 249 MovieClip Frame 1
stop();
Symbol 249 MovieClip Frame 135
_root.cekComplete(this);
Symbol 252 MovieClip Frame 1
stop();
Symbol 252 MovieClip Frame 120
_root.cekComplete(this);
Symbol 255 MovieClip Frame 1
stop();
Symbol 255 MovieClip Frame 120
_root.cekComplete(this);
Symbol 284 MovieClip Frame 1
stop();
Symbol 284 MovieClip Frame 600
_root.cekComplete(this);
Symbol 305 MovieClip Frame 1
stop();
Symbol 305 MovieClip Frame 480
_root.cekComplete(this);
Symbol 321 MovieClip Frame 1
stop();
Symbol 321 MovieClip Frame 360
_root.cekComplete(this);
Symbol 327 MovieClip Frame 1
stop();
Symbol 327 MovieClip Frame 300
_root.cekComplete(this);
Symbol 330 MovieClip Frame 1
stop();
Symbol 330 MovieClip Frame 240
_root.cekComplete(this);
Symbol 338 MovieClip Frame 1
stop();
Symbol 338 MovieClip Frame 240
_root.cekComplete(this);
Symbol 342 MovieClip Frame 1
stop();
Symbol 342 MovieClip Frame 240
_root.cekComplete(this);
Symbol 345 MovieClip Frame 1
stop();
Symbol 345 MovieClip Frame 180
_root.cekComplete(this);
Symbol 356 MovieClip Frame 1
stop();
Symbol 356 MovieClip Frame 600
_root.cekComplete(this);
Symbol 359 MovieClip Frame 1
stop();
Symbol 359 MovieClip Frame 540
_root.cekComplete(this);
Symbol 362 MovieClip Frame 1
stop();
Symbol 362 MovieClip Frame 500
_root.cekComplete(this);
Symbol 365 MovieClip Frame 1
stop();
Symbol 365 MovieClip Frame 400
_root.cekComplete(this);
Symbol 368 MovieClip Frame 1
stop();
Symbol 368 MovieClip Frame 360
_root.cekComplete(this);
Symbol 372 MovieClip Frame 1
stop();
Symbol 372 MovieClip Frame 480
_root.cekComplete(this);
Symbol 376 MovieClip Frame 1
stop();
Symbol 376 MovieClip Frame 360
_root.cekComplete(this);
Symbol 379 MovieClip Frame 1
stop();
Symbol 379 MovieClip Frame 720
_root.cekComplete(this);
Symbol 387 MovieClip Frame 1
stop();
Symbol 387 MovieClip Frame 500
_root.cekComplete(this);
Symbol 390 MovieClip Frame 1
stop();
Symbol 390 MovieClip Frame 400
_root.cekComplete(this);
Symbol 394 MovieClip Frame 1
stop();
Symbol 394 MovieClip Frame 360
_root.cekComplete(this);
Symbol 397 MovieClip Frame 1
stop();
Symbol 397 MovieClip Frame 480
_root.cekComplete(this);
Symbol 400 MovieClip Frame 1
stop();
Symbol 400 MovieClip Frame 360
_root.cekComplete(this);
Symbol 408 MovieClip Frame 1
stop();
Symbol 408 MovieClip Frame 300
_root.cekComplete(this);
stop();
Symbol 411 MovieClip Frame 1
stop();
Symbol 411 MovieClip Frame 250
_root.cekComplete(this);
stop();
Symbol 414 MovieClip Frame 1
stop();
Symbol 414 MovieClip Frame 200
_root.cekComplete(this);
stop();
Symbol 429 MovieClip Frame 1
stop();
Symbol 429 MovieClip Frame 360
_root.cekComplete(this);
stop();
Symbol 432 MovieClip Frame 1
stop();
Symbol 432 MovieClip Frame 275
_root.cekComplete(this);
stop();
Symbol 435 MovieClip Frame 1
stop();
Symbol 435 MovieClip Frame 250
_root.cekComplete(this);
stop();
Symbol 446 MovieClip Frame 1
stop();
Symbol 446 MovieClip Frame 400
_root.cekComplete(this);
stop();
Symbol 453 MovieClip Frame 1
stop();
Symbol 453 MovieClip Frame 360
_root.cekComplete(this);
stop();
Symbol 456 MovieClip Frame 1
stop();
Symbol 456 MovieClip Frame 320
_root.cekComplete(this);
stop();
Symbol 458 MovieClip Frame 1
stop();
Symbol 458 MovieClip Frame 280
_root.cekComplete(this);
stop();
Symbol 461 MovieClip Frame 1
stop();
Symbol 461 MovieClip Frame 240
_root.cekComplete(this);
stop();
Symbol 464 MovieClip Frame 1
stop();
Symbol 464 MovieClip Frame 200
_root.cekComplete(this);
stop();
Symbol 471 MovieClip Frame 1
stop();
Symbol 471 MovieClip Frame 600
_root.cekComplete(this);
stop();
Symbol 474 MovieClip Frame 1
stop();
Symbol 474 MovieClip Frame 500
_root.cekComplete(this);
stop();
Symbol 477 MovieClip Frame 1
stop();
Symbol 477 MovieClip Frame 400
_root.cekComplete(this);
stop();
Symbol 480 MovieClip Frame 1
stop();
Symbol 480 MovieClip Frame 300
_root.cekComplete(this);
stop();
Symbol 488 MovieClip Frame 1
stop();
Symbol 488 MovieClip Frame 900
_root.cekComplete(this);
Symbol 491 MovieClip Frame 1
stop();
Symbol 491 MovieClip Frame 1200
_root.cekComplete(this);
Symbol 497 MovieClip Frame 1
stop();
Symbol 497 MovieClip Frame 1000
_root.cekComplete(this);
Symbol 504 MovieClip Frame 1
stop();
Symbol 504 MovieClip Frame 800
_root.cekComplete(this);
Symbol 596 MovieClip Frame 27
_root.cekKena(_parent);
_root.sound5();
Symbol 596 MovieClip Frame 29
_root.cekKena(_parent);
_root.sound5();
Symbol 596 MovieClip Frame 31
_root.cekKena(_parent);
_root.sound5();
Symbol 606 MovieClip Frame 13
stop();
Symbol 620 MovieClip Frame 15
stop();
Symbol 622 MovieClip Frame 60
stop();
removeMovieClip(_parent);
Symbol 656 MovieClip Frame 1
_root.sound3();
Symbol 656 MovieClip Frame 15
stop();
Symbol 656 MovieClip Frame 40
play();
Symbol 656 MovieClip Frame 69
_parent.melayang = false;
_parent.gotoAndStop(1);
Symbol 657 MovieClip [troops47] Frame 1
stop();
Symbol 673 MovieClip Frame 29
_root.cekKena(_parent);
_root.sound1();
Symbol 680 MovieClip Frame 12
stop();
Symbol 692 MovieClip Frame 15
stop();
Symbol 694 MovieClip Frame 60
removeMovieClip(_parent);
Symbol 695 MovieClip [troops1] Frame 1
stop();
Symbol 710 MovieClip Frame 27
_root.cekKena(_parent);
_root.sound4();
Symbol 723 MovieClip Frame 25
_root.cekKena(_parent);
_root.sound4();
Symbol 723 MovieClip Frame 45
gotoAndPlay (20);
Symbol 728 MovieClip Frame 16
stop();
_parent.gotoAndStop(1);
Symbol 730 MovieClip Frame 90
stop();
removeMovieClip(_parent);
Symbol 731 MovieClip [troops2] Frame 1
stop();
Symbol 749 MovieClip Frame 27
_root.cekKena(_parent);
_root.sound5();
Symbol 757 MovieClip Frame 25
_root.cekKena(_parent);
_root.sound5();
Symbol 757 MovieClip Frame 45
gotoAndPlay (20);
Symbol 760 MovieClip Frame 20
stop();
_parent.gotoAndStop(1);
Symbol 762 MovieClip Frame 90
stop();
removeMovieClip(_parent);
Symbol 763 MovieClip [troops5] Frame 1
stop();
Symbol 779 MovieClip Frame 20
_root.cekKena(_parent);
_root.sound3();
Symbol 780 MovieClip [troops3] Frame 1
stop();
Symbol 801 MovieClip Frame 5
stop();
Symbol 803 MovieClip Frame 22
_root.cekKena(_parent, 7);
_root.sound7();
Symbol 804 MovieClip [troops7] Frame 1
stop();
Symbol 819 MovieClip Frame 22
_root.cekKena(_parent, 9);
_root.sound8();
Symbol 820 MovieClip [troops8] Frame 1
stop();
Symbol 844 MovieClip Frame 29
_root.cekKena(_parent);
_root.sound1();
Symbol 856 MovieClip Frame 60
removeMovieClip(_parent);
Symbol 866 MovieClip [xtroops1] Frame 1
stop();
Symbol 884 MovieClip Frame 20
_root.cekKena(_parent);
_root.sound3();
Symbol 886 MovieClip [xtroops3] Frame 1
stop();
Symbol 903 MovieClip Frame 27
_root.cekKena(_parent);
_root.sound4();
Symbol 924 MovieClip Frame 28
_root.cekKena(_parent);
_root.sound4();
Symbol 924 MovieClip Frame 40
gotoAndPlay (20);
Symbol 925 MovieClip Frame 25
stop();
_parent.gotoAndStop(1);
Symbol 927 MovieClip Frame 90
stop();
removeMovieClip(_parent);
Symbol 928 MovieClip [xtroops2] Frame 1
stop();
Symbol 948 MovieClip Frame 27
_root.cekKena(_parent);
_root.sound5();
Symbol 948 MovieClip Frame 29
_root.cekKena(_parent);
_root.sound5();
Symbol 948 MovieClip Frame 31
_root.cekKena(_parent);
_root.sound5();
Symbol 957 MovieClip Frame 25
_root.cekKena(_parent);
_root.sound5();
Symbol 957 MovieClip Frame 40
gotoAndPlay (20);
Symbol 958 MovieClip Frame 25
stop();
_parent.gotoAndStop(1);
Symbol 960 MovieClip Frame 90
stop();
removeMovieClip(_parent);
Symbol 961 MovieClip [xtroops5] Frame 1
stop();
Symbol 978 MovieClip Frame 22
_root.cekKena(_parent, 7);
_root.sound8();
Symbol 980 MovieClip [xtroops7] Frame 1
stop();
Symbol 997 MovieClip Frame 22
_root.cekKena(_parent, 8);
_root.sound9();
Symbol 999 MovieClip [xtroops8] Frame 1
stop();
Symbol 1002 MovieClip [btroops5] Frame 1
stop();
Symbol 1011 MovieClip Frame 3
stop();
Symbol 1012 MovieClip Frame 10
_root.cekKena(_parent, 7);
_root.sound7();
Symbol 1013 MovieClip [btroops7] Frame 1
stop();
Symbol 1018 MovieClip Frame 5
stop();
Symbol 1019 MovieClip Frame 10
_root.cekKena(_parent, 9);
_root.sound8();
Symbol 1020 MovieClip [btroops8] Frame 1
stop();
Symbol 1023 MovieClip [btroopsx5] Frame 1
stop();
Symbol 1027 MovieClip Frame 10
stop();
Symbol 1028 MovieClip Frame 22
_root.cekKena(_parent, 7);
_root.sound8();
Symbol 1029 MovieClip [btroopsx7] Frame 1
stop();
Symbol 1033 MovieClip Frame 10
stop();
Symbol 1034 MovieClip Frame 22
_root.cekKena(_parent, 8);
_root.sound9();
Symbol 1035 MovieClip [btroopsx8] Frame 1
stop();
Symbol 1065 MovieClip Frame 3
_root.cekKena(_parent);
_root.sound5();
Symbol 1065 MovieClip Frame 7
_root.cekKena(_parent);
_root.sound5();
Symbol 1065 MovieClip Frame 11
_root.cekKena(_parent);
_root.sound5();
Symbol 1065 MovieClip Frame 30
_root.cekKena(_parent, 1);
_root.sound1();
Symbol 1305 MovieClip [api_mc] Frame 130
removeMovieClip(this);
Symbol 1308 MovieClip Frame 60
removeMovieClip(_parent);
Symbol 1310 MovieClip [xtroops11] Frame 1
stop();
Symbol 1325 MovieClip Frame 3
_root.cekKena(_parent);
_root.sound6();
Symbol 1325 MovieClip Frame 13
_root.cekKena(_parent);
_root.sound6();
Symbol 1325 MovieClip Frame 23
_root.cekKena(_parent);
_root.sound6();
Symbol 1325 MovieClip Frame 30
_root.cekKena(_parent, 3);
_root.sound16();
Symbol 1325 MovieClip Frame 40
_root.cekKena(_parent, 1);
_root.sound1();
Symbol 1328 MovieClip Frame 60
removeMovieClip(_parent);
Symbol 1330 MovieClip [xtroops12] Frame 1
stop();
Symbol 1333 MovieClip Frame 27
_root.cekKena(_parent._parent);
_root.sound4();
Symbol 1335 MovieClip Frame 30
_root.cekKena(_parent, 1);
Symbol 1338 MovieClip Frame 60
removeMovieClip(_parent);
Symbol 1340 MovieClip [xtroops10] Frame 1
stop();
Symbol 1348 MovieClip Frame 3
_root.cekKena(_parent);
_root.sound6();
Symbol 1348 MovieClip Frame 7
_root.cekKena(_parent);
_root.sound6();
Symbol 1348 MovieClip Frame 11
_root.cekKena(_parent);
_root.sound6();
Symbol 1348 MovieClip Frame 30
_root.cekKena(_parent, 1);
_root.sound1();
Symbol 1349 MovieClip Frame 60
removeMovieClip(_parent);
Symbol 1351 MovieClip [troops11] Frame 1
stop();
Symbol 1359 MovieClip Frame 5
_root.cekKena(_parent);
_root.sound6();
Symbol 1359 MovieClip Frame 13
_root.cekKena(_parent);
_root.sound6();
Symbol 1359 MovieClip Frame 21
_root.cekKena(_parent);
_root.sound6();
Symbol 1359 MovieClip Frame 30
_root.cekKena(_parent, 3);
_root.sound16();
Symbol 1359 MovieClip Frame 40
_root.cekKena(_parent, 1);
_root.sound1();
Symbol 1361 MovieClip Frame 60
removeMovieClip(_parent);
Symbol 1363 MovieClip [troops12] Frame 1
stop();
Symbol 1366 MovieClip Frame 27
_root.cekKena(_parent._parent);
_root.sound4();
Symbol 1367 MovieClip Frame 30
_root.cekKena(_parent, 1);
_root.sound1();
Symbol 1369 MovieClip Frame 60
removeMovieClip(_parent);
Symbol 1371 MovieClip [troops10] Frame 1
stop();
Symbol 1448 MovieClip Frame 45
removeMovieClip(_parent);
Symbol 1465 MovieClip Frame 1
stop();
Symbol 1465 MovieClip Frame 2
stop();
_root.backLedak();
_root.backLedak();
Symbol 1474 MovieClip Frame 10
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1474 MovieClip Frame 16
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1474 MovieClip Frame 22
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1479 MovieClip Frame 120
removeMovieClip(this);
Symbol 1480 MovieClip Frame 80
stop();
Symbol 1503 MovieClip Frame 102
stop();
removeMovieClip(_parent);
Symbol 1504 MovieClip Frame 1
_root.boatHancur();
Symbol 1504 MovieClip Frame 20
gotoAndPlay(this._currentframe + random(30));
Symbol 1504 MovieClip Frame 70
_root.backWater();
Symbol 1504 MovieClip Frame 181
_root.backWater();
removeMovieClip(_parent);
Symbol 1505 MovieClip [troops26] Frame 1
stop();
Symbol 1506 MovieClip [xtroops26] Frame 1
stop();
Symbol 1511 MovieClip Frame 10
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1511 MovieClip Frame 12
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1511 MovieClip Frame 16
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1511 MovieClip Frame 18
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1511 MovieClip Frame 22
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1511 MovieClip Frame 24
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1515 MovieClip Frame 55
stop();
Symbol 1516 MovieClip Frame 1
_root.boatHancur();
Symbol 1516 MovieClip Frame 20
gotoAndPlay(this._currentframe + random(30));
Symbol 1516 MovieClip Frame 70
_root.backWater();
Symbol 1516 MovieClip Frame 181
_root.backWater();
removeMovieClip(_parent);
Symbol 1517 MovieClip [troops27] Frame 1
stop();
Symbol 1518 MovieClip [xtroops27] Frame 1
stop();
Symbol 1523 MovieClip [bomb_mc] Frame 1
stop();
Symbol 1523 MovieClip [bomb_mc] Frame 2
play();
Symbol 1523 MovieClip [bomb_mc] Frame 3
stop();
removeMovieClip(this);
Symbol 1527 MovieClip [xmortir_mc] Frame 1
stop();
Symbol 1527 MovieClip [xmortir_mc] Frame 2
play();
Symbol 1527 MovieClip [xmortir_mc] Frame 3
stop();
removeMovieClip(this);
Symbol 1533 MovieClip Frame 1
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1533 MovieClip Frame 6
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1533 MovieClip Frame 11
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1533 MovieClip Frame 16
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1533 MovieClip Frame 21
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1533 MovieClip Frame 26
_root.cekKena(_parent, 9);
_root.sound9();
Symbol 1533 MovieClip Frame 31
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1533 MovieClip Frame 35
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1533 MovieClip Frame 40
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1533 MovieClip Frame 45
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1533 MovieClip Frame 50
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1539 MovieClip Frame 1
_root.backJatuhCopter();
Symbol 1539 MovieClip Frame 80
removeMovieClip(_parent);
Symbol 1541 MovieClip [troops22] Frame 1
stop();
Symbol 1543 MovieClip [xtroops22] Frame 1
stop();
Symbol 1568 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
this.onRelease = function () {
getURL ("http://www.bubblebox.com/", "_blank");
};
Symbol 1569 MovieClip [win_mc] Frame 1
stop();
logo_mc.onRelease = function () {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1226&subid=wingame", "_blank");
};
Symbol 1581 MovieClip [lose_mc] Frame 1
stop();
logo_mc.onRelease = function () {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1226&subid=losegame", "_blank");
};
Symbol 1588 MovieClip [info_box2] Frame 1
stop();
Symbol 1589 MovieClip Frame 40
removeMovieClip(_parent);
Symbol 1610 MovieClip Frame 42
stop();
Symbol 1622 MovieClip Frame 5
stop();
Symbol 1623 MovieClip Frame 15
_root.cekKena(_parent, 7);
_root.sound7();
Symbol 1624 MovieClip Frame 60
removeMovieClip(_parent);
Symbol 1625 MovieClip [btroops10] Frame 1
stop();
Symbol 1628 MovieClip Frame 15
_root.cekKena(_parent, 1);
_root.sound5();
Symbol 1628 MovieClip Frame 17
_root.cekKena(_parent, 1);
_root.sound5();
Symbol 1628 MovieClip Frame 19
_root.cekKena(_parent, 1);
_root.sound5();
Symbol 1629 MovieClip Frame 60
removeMovieClip(_parent);
Symbol 1630 MovieClip [btroops9] Frame 1
stop();
Symbol 1656 MovieClip [tutorial_mc] Frame 1
stop();
Symbol 1661 MovieClip [semburAir] Frame 1
play();
Symbol 1661 MovieClip [semburAir] Frame 100
removeMovieClip(this);
Symbol 1692 MovieClip Frame 20
_root.cekKena(_parent);
Symbol 1693 MovieClip [btroops2] Frame 1
stop();
Symbol 1696 MovieClip Frame 22
_root.cekKena(_parent);
Symbol 1697 MovieClip [btroops3] Frame 1
stop();
Symbol 1700 MovieClip Frame 20
_root.cekKena(_parent);
Symbol 1701 MovieClip [btroopsx3] Frame 1
stop();
Symbol 1704 MovieClip Frame 15
_root.cekKena(_parent);
Symbol 1705 MovieClip [btroopsx2] Frame 1
stop();
Symbol 1707 MovieClip Frame 21
stop();
Symbol 1710 MovieClip [mortir_mc] Frame 1
stop();
Symbol 1710 MovieClip [mortir_mc] Frame 2
stop();
Symbol 1716 MovieClip [pistol_mc] Frame 5
removeMovieClip(this);
Symbol 1719 MovieClip [granat_mc] Frame 1
stop();
Symbol 1719 MovieClip [granat_mc] Frame 2
play();
Symbol 1719 MovieClip [granat_mc] Frame 3
stop();
removeMovieClip(this);
Symbol 1734 MovieClip Frame 5
_root.cekKena(_parent);
_root.sound5();
Symbol 1734 MovieClip Frame 8
_root.cekKena(_parent);
_root.sound5();
Symbol 1734 MovieClip Frame 11
_root.cekKena(_parent);
_root.sound5();
Symbol 1738 MovieClip Frame 5
_root.cekKena(_parent);
Symbol 1738 MovieClip Frame 85
removeMovieClip(_parent);
Symbol 1740 MovieClip [xtroops13] Frame 1
stop();
Symbol 1747 MovieClip Frame 10
_root.cekKena(_parent);
_root.sound6();
Symbol 1747 MovieClip Frame 12
_root.cekKena(_parent);
_root.sound6();
Symbol 1747 MovieClip Frame 14
_root.cekKena(_parent);
_root.sound6();
Symbol 1747 MovieClip Frame 25
_root.cekKena(_parent);
_root.sound5();
Symbol 1747 MovieClip Frame 27
_root.cekKena(_parent);
_root.sound5();
Symbol 1747 MovieClip Frame 29
_root.cekKena(_parent);
_root.sound5();
Symbol 1751 MovieClip Frame 80
removeMovieClip(_parent);
Symbol 1753 MovieClip [xtroops14] Frame 1
stop();
Symbol 1755 MovieClip [troops13] Frame 1
stop();
Symbol 1759 MovieClip Frame 10
_root.cekKena(_parent);
_root.sound6();
Symbol 1759 MovieClip Frame 12
_root.cekKena(_parent);
_root.sound6();
Symbol 1759 MovieClip Frame 14
_root.cekKena(_parent);
_root.sound6();
Symbol 1759 MovieClip Frame 25
_root.cekKena(_parent);
_root.sound5();
Symbol 1759 MovieClip Frame 27
_root.cekKena(_parent);
_root.sound5();
Symbol 1759 MovieClip Frame 29
_root.cekKena(_parent);
_root.sound5();
Symbol 1760 MovieClip Frame 80
removeMovieClip(_parent);
Symbol 1762 MovieClip [troops14] Frame 1
stop();
Symbol 1779 MovieClip Frame 10
_root.cekKena(_parent);
_root.sound6();
Symbol 1779 MovieClip Frame 18
_root.cekKena(_parent);
_root.sound6();
Symbol 1779 MovieClip Frame 26
_root.cekKena(_parent);
_root.sound6();
Symbol 1779 MovieClip Frame 40
_root.cekKena(_parent, 9);
_root.cekKena(_parent, 9);
_root.sound17();
Symbol 1786 MovieClip Frame 80
removeMovieClip(_parent);
Symbol 1788 MovieClip [troops17] Frame 1
stop();
Symbol 1791 MovieClip Frame 10
_root.cekKena(_parent);
_root.sound6();
Symbol 1791 MovieClip Frame 18
_root.cekKena(_parent);
_root.sound6();
Symbol 1791 MovieClip Frame 26
_root.cekKena(_parent);
_root.sound6();
Symbol 1791 MovieClip Frame 40
_root.cekKena(_parent, 9);
_root.cekKena(_parent, 9);
_root.sound17();
Symbol 1792 MovieClip Frame 80
removeMovieClip(_parent);
Symbol 1795 MovieClip [xtroops17] Frame 1
stop();
Symbol 1797 MovieClip [mortir_mc2] Frame 1
stop();
Symbol 1797 MovieClip [mortir_mc2] Frame 2
stop();
Symbol 1806 MovieClip Frame 15
_root.cekKena(_parent, 9);
_root.cekKena(_parent, 9);
_root.cekKena(_parent, 9);
_root.sound15();
Symbol 1811 MovieClip Frame 65
removeMovieClip(_parent);
Symbol 1812 MovieClip [troops16] Frame 1
stop();
Symbol 1813 MovieClip [xtroops16] Frame 1
stop();
Symbol 1828 MovieClip Frame 1
_root.backHeli();
Symbol 1833 MovieClip Frame 18
_root.cekKena(_parent._parent);
_root.sound5();
Symbol 1833 MovieClip Frame 20
_root.cekKena(_parent._parent);
_root.sound5();
Symbol 1840 MovieClip Frame 1
_root.backJatuh();
Symbol 1840 MovieClip Frame 80
removeMovieClip(_parent);
Symbol 1841 MovieClip [xtroops18] Frame 1
stop();
Symbol 1843 MovieClip Frame 1
_root.backHeli();
Symbol 1846 MovieClip Frame 16
_root.cekKena(_parent._parent);
_root.sound5();
Symbol 1846 MovieClip Frame 18
_root.cekKena(_parent._parent);
_root.sound5();
Symbol 1848 MovieClip [troops18] Frame 1
stop();
Symbol 1860 MovieClip Frame 1
_root.backHeli();
Symbol 1861 MovieClip Frame 5
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1861 MovieClip Frame 11
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1861 MovieClip Frame 16
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1861 MovieClip Frame 25
_root.cekKena(_parent, 9);
_root.sound9();
Symbol 1866 MovieClip Frame 1
_root.backJatuh();
Symbol 1866 MovieClip Frame 80
removeMovieClip(_parent);
Symbol 1867 MovieClip [troops19] Frame 1
stop();
Symbol 1868 MovieClip [xtroops19] Frame 1
stop();
Symbol 1879 MovieClip Frame 15
_root.cekKena(_parent, 3);
_root.sound16();
Symbol 1884 MovieClip Frame 75
removeMovieClip(_parent);
Symbol 1885 MovieClip [xtroops15] Frame 1
stop();
Symbol 1886 MovieClip [troops15] Frame 1
stop();
Symbol 1889 MovieClip [retak_mc] Frame 250
stop();
removeMovieClip(this);
Symbol 1892 MovieClip Frame 1
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1892 MovieClip Frame 10
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1892 MovieClip Frame 20
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1892 MovieClip Frame 30
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1892 MovieClip Frame 40
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1892 MovieClip Frame 50
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1897 MovieClip Frame 1
_root.backJatuhCopter();
Symbol 1897 MovieClip Frame 80
removeMovieClip(_parent);
Symbol 1899 MovieClip Frame 1
_root.backJatuhCopter();
Symbol 1899 MovieClip Frame 120
stop();
removeMovieClip(_parent);
Symbol 1900 MovieClip [xtroops20] Frame 1
stop();
Symbol 1902 MovieClip Frame 1
_root.backJatuhCopter();
Symbol 1902 MovieClip Frame 120
stop();
removeMovieClip(_parent);
Symbol 1903 MovieClip [troops20] Frame 1
stop();
Symbol 1906 MovieClip Frame 1
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1906 MovieClip Frame 6
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1906 MovieClip Frame 11
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1906 MovieClip Frame 16
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1906 MovieClip Frame 21
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1906 MovieClip Frame 26
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1906 MovieClip Frame 31
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1906 MovieClip Frame 36
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1906 MovieClip Frame 41
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1906 MovieClip Frame 46
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1912 MovieClip Frame 1
_root.backJatuhCopter();
Symbol 1912 MovieClip Frame 80
removeMovieClip(_parent);
Symbol 1915 MovieClip Frame 1
_root.backJatuhCopter();
Symbol 1915 MovieClip Frame 110
stop();
removeMovieClip(_parent);
Symbol 1916 MovieClip [troops21] Frame 1
stop();
Symbol 1918 MovieClip Frame 1
_root.backJatuhCopter();
Symbol 1918 MovieClip Frame 110
stop();
removeMovieClip(_parent);
Symbol 1919 MovieClip [xtroops21] Frame 1
stop();
Symbol 1921 MovieClip Frame 5
_root.cekKena(_parent);
_root.sound3();
Symbol 1927 MovieClip Frame 1
_root.backJatuhCopter();
Symbol 1927 MovieClip Frame 80
removeMovieClip(_parent);
Symbol 1929 MovieClip Frame 1
_root.backJatuhCopter();
Symbol 1929 MovieClip Frame 115
stop();
removeMovieClip(_parent);
Symbol 1930 MovieClip [troops23] Frame 1
stop();
Symbol 1932 MovieClip Frame 1
_root.backJatuhCopter();
Symbol 1932 MovieClip Frame 115
stop();
removeMovieClip(_parent);
Symbol 1933 MovieClip [xtroops23] Frame 1
stop();
Symbol 1936 MovieClip Frame 5
_root.cekKena(_parent);
_root.sound3();
Symbol 1942 MovieClip Frame 80
removeMovieClip(_parent);
Symbol 1944 MovieClip Frame 110
stop();
removeMovieClip(_parent);
Symbol 1945 MovieClip [troops24] Frame 1
stop();
Symbol 1947 MovieClip Frame 110
stop();
removeMovieClip(_parent);
Symbol 1948 MovieClip [xtroops24] Frame 1
stop();
Symbol 1968 MovieClip Frame 25
_root.cekKena(_parent);
_root.sound6();
Symbol 1968 MovieClip Frame 45
_root.cekKena(_parent);
_root.sound6();
Symbol 1968 MovieClip Frame 64
_root.cekKena(_parent);
_root.sound6();
Symbol 1968 MovieClip Frame 70
gotoAndPlay (20);
Symbol 1971 MovieClip Frame 20
stop();
_parent.gotoAndStop(1);
Symbol 1973 MovieClip Frame 90
stop();
removeMovieClip(_parent);
Symbol 1974 MovieClip [troops6] Frame 1
stop();
Symbol 1986 MovieClip Frame 20
_root.cekKena(_parent);
_root.sound9();
Symbol 1987 MovieClip [troops9] Frame 1
stop();
Symbol 2001 MovieClip Frame 20
_root.cekKena(_parent);
_root.sound9();
Symbol 2003 MovieClip [xtroops9] Frame 1
stop();
Symbol 2019 MovieClip Frame 25
_root.cekKena(_parent);
_root.sound6();
Symbol 2019 MovieClip Frame 45
_root.cekKena(_parent);
_root.sound6();
Symbol 2019 MovieClip Frame 65
_root.cekKena(_parent);
_root.sound6();
Symbol 2019 MovieClip Frame 70
gotoAndPlay (20);
Symbol 2020 MovieClip Frame 20
stop();
_parent.gotoAndStop(1);
Symbol 2022 MovieClip Frame 90
stop();
removeMovieClip(_parent);
Symbol 2023 MovieClip [xtroops6] Frame 1
stop();
Symbol 2094 MovieClip Frame 40
removeMovieClip(_parent);
Symbol 2175 MovieClip Frame 45
removeMovieClip(_parent);
Symbol 2177 MovieClip Frame 45
stop();
Symbol 2181 MovieClip Frame 10
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2181 MovieClip Frame 14
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2181 MovieClip Frame 18
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2181 MovieClip Frame 22
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2181 MovieClip Frame 45
_root.cekKena(_parent, 9);
_root.sound9();
Symbol 2192 MovieClip Frame 59
stop();
Symbol 2196 MovieClip Frame 55
stop();
Symbol 2199 MovieClip Frame 1
_root.boatHancur();
Symbol 2199 MovieClip Frame 20
gotoAndPlay(this._currentframe + random(30));
Symbol 2199 MovieClip Frame 70
_root.backWater();
Symbol 2199 MovieClip Frame 181
_root.backWater();
removeMovieClip(_parent);
Symbol 2200 MovieClip [troops28] Frame 1
stop();
Symbol 2201 MovieClip [xtroops28] Frame 1
stop();
Symbol 2209 MovieClip Frame 15
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2209 MovieClip Frame 17
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2209 MovieClip Frame 19
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2209 MovieClip Frame 21
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2209 MovieClip Frame 23
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2209 MovieClip Frame 25
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2209 MovieClip Frame 27
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2209 MovieClip Frame 29
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2209 MovieClip Frame 31
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2209 MovieClip Frame 33
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2209 MovieClip Frame 35
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2209 MovieClip Frame 37
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2209 MovieClip Frame 50
_root.cekKena(_parent, 9);
_root.sound9();
Symbol 2209 MovieClip Frame 55
_root.cekKena(_parent, 9);
_root.sound9();
Symbol 2214 MovieClip Frame 80
stop();
Symbol 2217 MovieClip Frame 1
_root.boatHancur();
Symbol 2217 MovieClip Frame 20
gotoAndPlay(this._currentframe + random(30));
Symbol 2217 MovieClip Frame 70
_root.backWater();
Symbol 2217 MovieClip Frame 180
_root.backWater();
removeMovieClip(_parent);
Symbol 2218 MovieClip [troops29] Frame 1
stop();
Symbol 2219 MovieClip [xtroops29] Frame 1
stop();
Symbol 2223 MovieClip Frame 1
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2223 MovieClip Frame 3
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2223 MovieClip Frame 5
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2223 MovieClip Frame 7
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2223 MovieClip Frame 9
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2223 MovieClip Frame 11
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2223 MovieClip Frame 13
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2223 MovieClip Frame 15
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2223 MovieClip Frame 17
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2223 MovieClip Frame 19
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2223 MovieClip Frame 21
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2223 MovieClip Frame 23
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2223 MovieClip Frame 25
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2223 MovieClip Frame 27
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2223 MovieClip Frame 30
_root.cekKena(_parent, 9);
_root.sound9();
Symbol 2223 MovieClip Frame 40
_root.cekKena(_parent, 9);
_root.sound9();
Symbol 2223 MovieClip Frame 50
_root.cekKena(_parent, 9);
_root.sound9();
Symbol 2228 MovieClip Frame 90
stop();
Symbol 2231 MovieClip Frame 180
removeMovieClip(_parent);
Symbol 2232 MovieClip [troops30] Frame 1
stop();
Symbol 2233 MovieClip [xtroops30] Frame 1
stop();
Symbol 2245 MovieClip Frame 4
_root.cekKena(_parent);
_root.sound3();
Symbol 2245 MovieClip Frame 8
_root.cekKena(_parent, 9);
_root.sound9();
Symbol 2245 MovieClip Frame 12
_root.cekKena(_parent);
_root.sound3();
Symbol 2251 MovieClip Frame 80
removeMovieClip(_parent);
Symbol 2252 MovieClip [troops25] Frame 1
stop();
Symbol 2253 MovieClip [xtroops25] Frame 1
stop();
Symbol 2263 MovieClip [info_box3] Frame 1
stop();
Symbol 2284 MovieClip Frame 23
removeMovieClip(_parent);
Symbol 2285 MovieClip Frame 45
stop();
Symbol 2297 MovieClip [btroopsx9] Frame 1
stop();
Symbol 2301 MovieClip Frame 5
stop();
Symbol 2302 MovieClip Frame 15
_root.cekKena(_parent, 7);
_root.sound7();
Symbol 2303 MovieClip [btroopsx10] Frame 1
stop();
Symbol 2307 MovieClip Frame 5
stop();
Symbol 2308 MovieClip Frame 15
_root.cekKena(_parent, 9);
_root.sound9();
Symbol 2309 MovieClip Frame 60
removeMovieClip(_parent);
Symbol 2310 MovieClip [btroopsx11] Frame 1
stop();
Symbol 2312 MovieClip Frame 5
stop();
Symbol 2313 MovieClip Frame 15
_root.cekKena(_parent, 9);
_root.sound9();
Symbol 2314 MovieClip [btroops11] Frame 1
stop();
Symbol 2345 MovieClip Frame 31
_root.cekKena(_parent);
_root.sound8();
Symbol 2345 MovieClip Frame 60
gotoAndPlay (25);
Symbol 2347 MovieClip Frame 15
stop();
_parent.gotoAndStop(1);
Symbol 2348 MovieClip [troops4] Frame 1
stop();
Symbol 2376 MovieClip Frame 31
_root.cekKena(_parent);
_root.sound8();
Symbol 2376 MovieClip Frame 60
gotoAndPlay (25);
Symbol 2379 MovieClip Frame 15
stop();
_parent.gotoAndStop(1);
Symbol 2380 MovieClip [xtroops4] Frame 1
stop();
Symbol 2387 Button
on (press) {
gotoAndStop (1);
}
Symbol 2391 MovieClip Frame 1
stop();
Symbol 2408 MovieClip Frame 1
stop();
Symbol 2409 MovieClip [menu_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.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.indi_mc.onRelease = (bar2_mc.indi_mc.onReleaseOutside = function () {
over();
stopDrag();
});
cekSpeedQuality();
Symbol 2434 MovieClip [tutorial_mc2] Frame 1
stop();
Symbol 2436 MovieClip Frame 21
stop();
Symbol 2437 MovieClip [misil1] Frame 1
stop();
Symbol 2437 MovieClip [misil1] Frame 2
stop();
Symbol 2439 MovieClip [misil2] Frame 1
stop();
Symbol 2439 MovieClip [misil2] Frame 2
stop();
Symbol 2441 MovieClip [misil3] Frame 1
stop();
Symbol 2441 MovieClip [misil3] Frame 2
stop();
Symbol 2443 MovieClip [misil4] Frame 1
stop();
Symbol 2443 MovieClip [misil4] Frame 2
stop();
Symbol 2462 MovieClip Frame 5
_root.cekKena(_parent);
_root.sound6();
Symbol 2462 MovieClip Frame 9
_root.cekKena(_parent);
_root.sound6();
Symbol 2462 MovieClip Frame 13
_root.cekKena(_parent);
_root.sound6();
Symbol 2462 MovieClip Frame 17
_root.cekKena(_parent);
_root.sound6();
Symbol 2462 MovieClip Frame 21
_root.cekKena(_parent);
_root.sound6();
Symbol 2462 MovieClip Frame 30
_root.cekKena(_parent, 9);
_root.cekKena(_parent, 9);
_root.sound17();
_root.sound17();
Symbol 2468 MovieClip Frame 30
_root.cekKena(_parent, 9);
_root.cekKena(_parent, 9);
_root.sound17();
Symbol 2468 MovieClip Frame 75
stop();
removeMovieClip(_parent);
Symbol 2469 MovieClip [troops48] Frame 1
stop();
Symbol 2486 MovieClip Frame 6
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2486 MovieClip Frame 10
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2490 MovieClip Frame 80
stop();
removeMovieClip(_parent);
Symbol 2491 MovieClip [troops49] Frame 1
stop();
Symbol 2507 MovieClip Frame 10
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2511 MovieClip Frame 80
stop();
removeMovieClip(_parent);
Symbol 2513 MovieClip [troops50] Frame 1
stop();
Symbol 2517 MovieClip [info_box6] Frame 1
stop();
Symbol 2528 MovieClip Frame 60
removeMovieClip(_parent);
Symbol 2529 MovieClip [btroops12] Frame 1
stop();
Symbol 2533 MovieClip [btroops13] Frame 1
stop();
Symbol 2538 MovieClip Frame 60
removeMovieClip(_parent);
Symbol 2539 MovieClip [btroopsx12] Frame 1
stop();
Symbol 2544 MovieClip [btroopsx13] Frame 1
stop();
Symbol 2545 MovieClip Frame 10
_root.cekKena(_parent, 7);
_root.sound7();
Symbol 2546 MovieClip Frame 60
removeMovieClip(_parent);
Symbol 2547 MovieClip [btroops14] Frame 1
stop();
Symbol 2548 MovieClip Frame 7
_root.cekKena(_parent, 9);
_root.sound9();
Symbol 2549 MovieClip Frame 60
removeMovieClip(_parent);
Symbol 2550 MovieClip [btroops15] Frame 1
stop();
Symbol 2551 MovieClip [btroopsx14] Frame 1
stop();
Symbol 2552 MovieClip [btroopsx15] Frame 1
stop();
Symbol 2553 MovieClip Frame 1
play();
Symbol 2603 MovieClip Frame 107
stop();
Symbol 2637 MovieClip Frame 1
stop();
Symbol 2637 MovieClip Frame 10
stop();
Symbol 2639 MovieClip Frame 1
this.link.onRelease = function () {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1226&subid=splash", "_blank");
};
Symbol 2639 MovieClip Frame 210
stop();
Symbol 2683 MovieClip Frame 1
stop();
Symbol 2684 MovieClip Frame 1
this.onRollOver = function () {
this.logo_ro.gotoAndStop(2);
};
this.onRollOut = function () {
this.logo_ro.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.logo_ro.gotoAndStop(1);
};
Symbol 2712 Button
on (press) {
gotoAndStop (473);
}
Symbol 2734 MovieClip Frame 1
this.onRelease = function () {
getURL ("http://www.bubblebox.com/", _blank);
};
Symbol 2761 MovieClip Frame 1
stop();
Symbol 2762 MovieClip Frame 1
stop();
Symbol 2763 MovieClip Frame 1
stop();
Symbol 2769 MovieClip Frame 1
stop();
Symbol 2770 MovieClip Frame 1
stop();
Symbol 2771 MovieClip Frame 1
stop();
Symbol 2772 MovieClip Frame 1
stop();
Symbol 2773 MovieClip Frame 1
stop();
Symbol 2774 MovieClip Frame 1
stop();
Symbol 2784 MovieClip Frame 1
stop();
Symbol 2787 MovieClip Frame 1
stop();
Symbol 2790 MovieClip Frame 1
stop();
Symbol 2793 MovieClip Frame 1
stop();
Symbol 2799 MovieClip Frame 1
stop();
Symbol 2802 MovieClip Frame 1
stop();
Symbol 2805 MovieClip Frame 1
stop();
Symbol 2808 MovieClip Frame 1
stop();
Symbol 2811 MovieClip Frame 1
stop();
Symbol 2814 MovieClip Frame 1
stop();
Symbol 2830 MovieClip Frame 1
stop();
Symbol 2833 MovieClip Frame 1
stop();
Symbol 2836 MovieClip Frame 1
stop();
Symbol 2839 MovieClip Frame 1
stop();
Symbol 2842 MovieClip Frame 1
stop();
Symbol 2845 MovieClip Frame 1
stop();
Symbol 2851 MovieClip Frame 1
stop();
Symbol 2854 MovieClip Frame 1
stop();
Symbol 2857 MovieClip Frame 1
stop();
Symbol 2906 MovieClip Frame 1
stop();
Symbol 2909 MovieClip Frame 1
stop();
Symbol 2912 MovieClip Frame 1
stop();
Symbol 2913 MovieClip Frame 1
stop();
Symbol 2920 MovieClip Frame 1
stop();
Symbol 2924 MovieClip Frame 1
stop();
Symbol 2928 MovieClip Frame 1
stop();
Symbol 2931 MovieClip Frame 1
stop();
Symbol 2937 MovieClip Frame 1
stop();
Symbol 2940 MovieClip Frame 1
stop();
Symbol 2944 MovieClip Frame 1
stop();
Symbol 2948 MovieClip Frame 1
stop();
Symbol 2952 MovieClip Frame 1
stop();
Symbol 2957 MovieClip Frame 1
stop();
Symbol 2966 MovieClip Frame 1
stop();
Symbol 2970 MovieClip Frame 1
stop();
Symbol 2974 MovieClip Frame 1
stop();
Symbol 2978 MovieClip Frame 1
stop();
Symbol 2982 MovieClip Frame 1
stop();
Symbol 2986 MovieClip Frame 1
stop();
Symbol 2991 MovieClip Frame 1
stop();
Symbol 2996 MovieClip Frame 1
stop();
Symbol 3000 MovieClip Frame 1
stop();
Symbol 3009 MovieClip Frame 1
stop();
Symbol 3014 MovieClip Frame 1
stop();
Symbol 3018 MovieClip Frame 1
stop();
Symbol 3022 MovieClip Frame 1
stop();
Symbol 3026 MovieClip Frame 1
stop();
Symbol 3032 MovieClip Frame 1
stop();
Symbol 3037 MovieClip Frame 1
stop();
Symbol 3042 MovieClip Frame 1
stop();
Symbol 3046 MovieClip Frame 1
stop();
Symbol 3050 MovieClip Frame 1
stop();
Symbol 3054 MovieClip Frame 1
stop();
Symbol 3058 MovieClip Frame 1
stop();
Symbol 3062 MovieClip Frame 1
stop();
Symbol 3068 MovieClip Frame 1
stop();
Symbol 3072 MovieClip Frame 1
stop();
Symbol 3076 MovieClip Frame 1
stop();
Symbol 3081 MovieClip Frame 1
stop();
Symbol 3085 MovieClip Frame 1
stop();
Symbol 3089 MovieClip Frame 1
stop();
Symbol 3098 MovieClip Frame 1
stop();
Symbol 3102 MovieClip Frame 1
stop();
Symbol 3107 MovieClip Frame 1
stop();
Symbol 3113 MovieClip Frame 1
stop();
Symbol 3118 MovieClip Frame 1
stop();
Symbol 3122 MovieClip Frame 1
stop();
Symbol 3126 MovieClip Frame 1
stop();
Symbol 3131 MovieClip Frame 1
stop();
Symbol 3136 MovieClip Frame 1
stop();
Symbol 3141 MovieClip Frame 1
stop();
Symbol 3145 MovieClip Frame 1
stop();
Symbol 3149 MovieClip Frame 1
stop();
Symbol 3153 MovieClip Frame 1
stop();
Symbol 3158 MovieClip Frame 1
stop();
Symbol 3163 MovieClip Frame 1
stop();
Symbol 3169 MovieClip Frame 1
stop();
Symbol 3173 MovieClip Frame 1
stop();
Symbol 3177 MovieClip Frame 1
stop();
Symbol 3181 MovieClip Frame 1
stop();
Symbol 3185 MovieClip Frame 1
stop();
Symbol 3189 MovieClip Frame 1
stop();
Symbol 3194 MovieClip Frame 1
stop();
Symbol 3198 MovieClip Frame 1
stop();
Symbol 3202 MovieClip Frame 1
stop();
Symbol 3209 MovieClip Frame 1
stop();
Symbol 3213 MovieClip Frame 1
stop();
Symbol 3217 MovieClip Frame 1
stop();
Symbol 3221 MovieClip Frame 1
stop();
Symbol 3225 MovieClip Frame 1
stop();
Symbol 3229 MovieClip Frame 1
stop();
Symbol 3233 MovieClip Frame 1
stop();
Symbol 3237 MovieClip Frame 1
stop();
Symbol 3241 MovieClip Frame 1
stop();
Symbol 3245 MovieClip Frame 1
stop();
Symbol 3248 MovieClip Frame 1
stop();
Symbol 3255 MovieClip Frame 1
stop();
Symbol 3262 MovieClip Frame 1
stop();
Symbol 3273 MovieClip Frame 1
stop();
Symbol 3277 MovieClip Frame 1
stop();
Symbol 3281 MovieClip Frame 1
stop();
Symbol 3286 MovieClip Frame 1
stop();
Symbol 3290 MovieClip Frame 1
stop();
Symbol 3295 MovieClip Frame 1
stop();
Symbol 3299 MovieClip Frame 1
stop();
Symbol 3304 MovieClip Frame 1
stop();
Symbol 3308 MovieClip Frame 1
stop();
Symbol 3312 MovieClip Frame 1
stop();
Symbol 3316 MovieClip Frame 1
stop();
Symbol 3321 MovieClip Frame 1
stop();
Symbol 3325 MovieClip Frame 1
stop();
Symbol 3340 MovieClip Frame 1
stop();
Symbol 3344 MovieClip Frame 1
stop();
Symbol 3359 MovieClip Frame 1
stop();
Symbol 3367 MovieClip Frame 1
stop();
Symbol 3380 MovieClip Frame 1
stop();
Symbol 3385 MovieClip Frame 1
stop();
Symbol 3390 MovieClip Frame 1
stop();
Symbol 3395 MovieClip Frame 1
stop();
Symbol 3400 MovieClip Frame 1
stop();
Symbol 3405 MovieClip Frame 1
stop();
Symbol 3409 MovieClip Frame 1
stop();
Symbol 3416 MovieClip Frame 1
stop();
Symbol 3423 MovieClip Frame 1
stop();
Symbol 3424 MovieClip Frame 1
stop();
Symbol 3452 MovieClip Frame 1
stop();
Symbol 3452 MovieClip Frame 600
_root.cekComplete(this);
Symbol 3460 Button
on (press) {
gotoAndStop (1);
}
Symbol 3464 MovieClip 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.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.indi_mc.onRelease = (bar2_mc.indi_mc.onReleaseOutside = function () {
over();
stopDrag();
});
cekSpeedQuality();
Symbol 3477 MovieClip Frame 1
stop();
Symbol 3564 MovieClip Frame 1
stop();
Symbol 3610 MovieClip Frame 1
stop();
Symbol 3614 MovieClip Frame 1
stop();
Symbol 3618 MovieClip Frame 1
stop();
Symbol 3622 MovieClip Frame 1
stop();
Symbol 3626 MovieClip Frame 1
stop();
Symbol 3630 MovieClip Frame 1
stop();
Symbol 3635 MovieClip Frame 1
stop();
Symbol 3639 MovieClip Frame 1
stop();
Symbol 3643 MovieClip Frame 1
stop();
Symbol 3647 MovieClip Frame 1
stop();
Symbol 3651 MovieClip Frame 1
stop();
Symbol 3655 MovieClip Frame 1
stop();
Symbol 3659 MovieClip Frame 1
stop();
Symbol 3663 MovieClip Frame 1
stop();
Symbol 3667 MovieClip Frame 1
stop();
Symbol 3671 MovieClip Frame 1
stop();
Symbol 3675 MovieClip Frame 1
stop();
Symbol 3679 MovieClip Frame 1
stop();
Symbol 3683 MovieClip Frame 1
stop();
Symbol 3687 MovieClip Frame 1
stop();
Symbol 3690 MovieClip Frame 1
stop();