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=1511&subid=preloader", "_blank");
};
Instance of Symbol 13 MovieClip in Frame 1
on (release) {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1511&subid=preloader", "_blank");
}
Instance of Symbol 20 MovieClip in Frame 1
on (release) {
gameid = "FL090909";
getURL ("http://belugerinstudios.com/data/counter.php?gameid=" + gameid, "_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 13 MovieClip in Frame 11
on (release) {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1511&subid=preloader", "_blank");
}
Instance of Symbol 20 MovieClip in Frame 11
on (release) {
gameid = "FL090909";
getURL ("http://belugerinstudios.com/data/counter.php?gameid=" + gameid, "_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 backMenu() {
myMusic.stop();
myMusic = new Sound(musicy);
myMusic.attachSound("backMenu");
myMusic.start(0, 1);
myMusic.setVolume(volum1);
myMusic.onSoundComplete = function () {
backMenu();
};
}
function backNavy() {
myMusic.stop();
myMusic = new Sound(musicy);
myMusic.attachSound("backNavy");
myMusic.start(0, 1);
myMusic.setVolume(volum1);
myMusic.onSoundComplete = function () {
backNavy();
};
}
function backInfantry() {
myMusic.stop();
myMusic = new Sound(musicy);
myMusic.attachSound("backInfantry");
myMusic.start(0, 1);
myMusic.setVolume(volum1);
myMusic.onSoundComplete = function () {
backInfantry();
};
}
function backAirForce() {
myMusic.stop();
myMusic = new Sound(musicy);
myMusic.attachSound("backAirForce");
myMusic.start(0, 1);
myMusic.setVolume(volum1);
myMusic.onSoundComplete = function () {
backAirForce();
};
}
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 sound99() {
rand = random(2);
if (rand == 0) {
mySound = new Sound(soundy);
mySound.attachSound("sound99");
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 (182);
backMenu();
};
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=1511&subid=preloader", "_blank");
};
Frame 21
stop();
logo_mc.onRelease = function () {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1511&subid=preloader", "_blank");
};
Instance of Symbol 13 MovieClip in Frame 21
on (release) {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1511&subid=preloader", "_blank");
}
Frame 25
gotoAndStop ("gagalan");
Frame 27
gotoAndStop ("gagalan");
Frame 29
gotoAndStop ("gagalan");
Frame 31
play();
Instance of Symbol 2631 MovieClip in Frame 31
on (release) {
gameid = "FL090909";
getURL ("http://belugerinstudios.com/data/counter.php?gameid=" + gameid, "_blank");
}
Frame 181
stop();
gotoAndStop (392);
Frame 182
play();
Frame 391
stop();
gotoAndStop (31);
Frame 392
function cekGo(indi, indi2) {
tipeGame = "game";
jenisMaen = "game";
if (indi == "setup") {
kondisiLoad = "load";
gotoAndStop (419);
} else {
gotoAndStop (417);
}
}
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["aa2x" + i] = String("b2x" + i);
Cookies = SharedObject.getLocal(_root["aa2x" + i], "/");
Cookies.data["bb2x" + i] = eval (simpanSemua[i]);
Cookies.flush(10);
i++;
}
i = 0;
while (i <= simpanSemua2.length) {
_root["zz2x" + i] = String("v2x" + i);
Cookies = SharedObject.getLocal(_root["zz2x" + i], "/");
Cookies.data["vv2x" + i] = eval (simpanSemua2[i]);
Cookies.flush(10);
i++;
}
i = 1;
while (i <= 30) {
_root["a22x" + i] = String("d2x" + i);
Cookies = SharedObject.getLocal(_root["a22x" + i], "/");
Cookies.data["dd2x" + i] = zzslot[i];
Cookies.flush(10);
i++;
}
i = 1;
while (i <= bykJumlah) {
_root["a32x" + i] = String("e2x" + i);
Cookies = SharedObject.getLocal(_root["a32x" + i], "/");
Cookies.data["ee2x" + 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["a72x" + i] = String("i2x" + i);
Cookies = SharedObject.getLocal(_root["a72x" + i], "/");
Cookies.data["ii2x" + i] = _root["medals" + i];
Cookies.flush(10);
i++;
}
i = 1;
while (i <= 15) {
_root["a82x" + i] = String("j2x" + i);
Cookies = SharedObject.getLocal(_root["a82x" + i], "/");
Cookies.data["jj2x" + i] = levelSkill[i];
Cookies.flush(10);
i++;
}
i = 1;
while (i <= 21) {
_root["a92x" + i] = String("k2x" + i);
Cookies = SharedObject.getLocal(_root["a92x" + i], "/");
Cookies.data["kk2x" + i] = powerNegara[i];
Cookies.flush(10);
i++;
}
i = 1;
while (i <= 21) {
_root["a102x" + i] = String("l2x" + i);
Cookies = SharedObject.getLocal(_root["a102x" + i], "/");
Cookies.data["ll2x" + i] = milikNegara[i];
Cookies.flush(10);
i++;
}
i = 1;
while (i <= 7) {
_root["a112x" + i] = String("m2x" + i);
Cookies = SharedObject.getLocal(_root["a112x" + i], "/");
Cookies.data["mm2x" + i] = masihAda[i];
Cookies.flush(10);
i++;
}
i = 1;
while (i <= 21) {
_root["a122x" + i] = String("n2x" + i);
Cookies = SharedObject.getLocal(_root["a122x" + i], "/");
Cookies.data["nn2x" + i] = belumSerang[i];
Cookies.flush(10);
i++;
}
}
function loadData() {
i = 0;
while (i <= simpanSemua.length) {
_root["aa2x" + i] = String("b2x" + i);
Cookies = SharedObject.getLocal(_root["aa2x" + i], "/");
_root[simpanSemua[i]] = Cookies.data["bb2x" + i];
i++;
}
i = 0;
while (i <= simpanSemua2.length) {
_root["zz2x" + i] = String("v2x" + i);
Cookies = SharedObject.getLocal(_root["zz2x" + i], "/");
_root[simpanSemua2[i]] = Cookies.data["vv2x" + i];
i++;
}
i = 1;
while (i <= 30) {
_root["a22x" + i] = String("d2x" + i);
Cookies = SharedObject.getLocal(_root["a22x" + i], "/");
zzslot[i] = Cookies.data["dd2x" + i];
i++;
}
i = 1;
while (i <= bykJumlah) {
_root["a32x" + i] = String("e2x" + i);
Cookies = SharedObject.getLocal(_root["a32x" + i], "/");
myStr = new String(Cookies.data["ee2x" + 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["a72x" + i] = String("i2x" + i);
Cookies = SharedObject.getLocal(_root["a72x" + i], "/");
_root["medals" + i] = Cookies.data["ii2x" + i];
i++;
}
i = 1;
while (i <= 15) {
_root["a82x" + i] = String("j2x" + i);
Cookies = SharedObject.getLocal(_root["a82x" + i], "/");
levelSkill[i] = Cookies.data["jj2x" + i];
i++;
}
i = 1;
while (i <= 21) {
_root["a92x" + i] = String("k2x" + i);
Cookies = SharedObject.getLocal(_root["a92x" + i], "/");
powerNegara[i] = Cookies.data["kk2x" + i];
Cookies.flush(10);
i++;
}
i = 1;
while (i <= 21) {
_root["a102x" + i] = String("l2x" + i);
Cookies = SharedObject.getLocal(_root["a102x" + i], "/");
milikNegara[i] = Cookies.data["ll2x" + i];
Cookies.flush(10);
i++;
}
i = 1;
while (i <= 7) {
_root["a112x" + i] = String("m2x" + i);
Cookies = SharedObject.getLocal(_root["a112x" + i], "/");
masihAda[i] = Cookies.data["mm2x" + i];
Cookies.flush(10);
i++;
}
i = 1;
while (i <= 21) {
_root["a122x" + i] = String("n2x" + i);
Cookies = SharedObject.getLocal(_root["a122x" + i], "/");
belumSerang[i] = Cookies.data["nn2x" + i];
Cookies.flush(10);
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, 1, 1, 1, 1, 1, 1, 1, 1, 1);
} else {
daftarLevel = new Array("", 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 3, 5, 7, 9, 11, 13, 15, 1, 3, 7, 9, 11, 13, 15, 17, 1, 4, 7, 10, 13, 1, 4, 7, 10, 13, 16, 19, 1, 2, 3, 4, 5, 6, 7, 8, 9, 15, 17, 19, 21);
}
}
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("", "Gun", "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, 2.5, 3, 2, 2.5, 3, 3.5, 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, 700, 400, 400, 400, 200, 225, 250, 275, 300, 300, 350, 400, 350, 375, 400, 450, 250, 275, 300, 350, 375, 0, 0, 0, 0, 200, 350, 550, 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, 1000, 1500, 2500, 4000, 10000, 10000, 5000, 20000, 10000, 25000, 75000, 100000, 2500, 3000, 3500, 4000, 5000, 0, 0, 0, 0, 150000, 30000, 50000, 75000);
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, 25, 75, 150, 300, 500, 50, 60, 70, 150, 200, 300, 400, 15, 20, 30, 40, 45, 1000, 1500, 2000, 2500, 300, 600, 1500, 2000);
i = 1;
while (i <= 30) {
daftarExp[i] = daftarExp[i] * 5;
i++;
}
}
function ygDiSave() {
xexp = 150;
xlevel = 1;
money1 = 10000;
nyawaGame = 10;
tipeSulitCampaign = 2;
jenisCampaign = 1;
jenisMorale = "offence";
jenisAppear = "random";
tipeGameLife = "Limited";
slotUnlok = new Array();
i = 1;
while (i <= bykJumlah) {
slotUnlok[i] = 0;
i++;
}
slotUnlok[1] = 1;
slotUnlok[2] = 1;
slotUnlok[10] = 1;
slotUnlok[11] = 1;
slotUnlok[18] = 1;
slotUnlok[19] = 1;
slotUnlok[26] = 1;
slotUnlok[27] = 1;
zzslot = new Array();
i = 1;
while (i <= 30) {
zzslot[i] = 90;
i++;
}
zzslot[1] = 1;
zzslot[2] = 2;
zzslot[3] = 10;
zzslot[4] = 11;
zzslot[5] = 18;
zzslot[6] = 19;
zzslot[7] = 26;
zzslot[8] = 27;
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 = 35 + (5 * levelSkill[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;
}
}
function ygDiSavex() {
masihAda = new Array();
milikNegara = new Array();
pegangNegara = 1;
dayKe = 1;
attackPower = 25;
kiraNyerang = 0;
belumSerang = new Array();
i = 1;
while (i <= 21) {
belumSerang[i] = false;
i++;
}
sedangAwalSekali = undefined;
awalAttackBanget = undefined;
tutorialWorld = false;
pernahKalah = false;
i = 1;
while (i <= 7) {
masihAda[i] = true;
i++;
}
i = 1;
while (i <= 21) {
if (i <= 3) {
milikNegara[i] = 1;
} else if (i <= 6) {
milikNegara[i] = 2;
} else if (i <= 9) {
milikNegara[i] = 3;
} else if (i <= 12) {
milikNegara[i] = 4;
} else if (i <= 15) {
milikNegara[i] = 5;
} else if (i <= 18) {
milikNegara[i] = 6;
} else if (i <= 21) {
milikNegara[i] = 7;
}
i++;
}
milikNegara[4] = 4;
milikNegara[12] = 3;
milikNegara[18] = 7;
milikNegara[21] = 2;
milikNegara[15] = 6;
setWarna = new Array("", "0xFF0000", "0x59230D", "0x077050", "0xFFFF00", "0xFF2BD5", "0x00FF00", "0x9999FF");
namaWilayah = new Array("", "America", "Greenland", "Caribbean", "Mongol", "England", "West Europe", "East Europe", "North Europe", "Turkey", "Russia", "Latin", "Middle East", "China", "Japan", "India", "Indonesia", "Australia", "South Africa", "Centre Africa", "West Africa", "North Africa");
namaNegara = new Array("", "Alliance 1 (America, Canada, Caribbean, Greenland)", "Alliance 2 (England, West Europe, North Africa)", "Alliance 3 (North Europe, East Europe, Turkey, Middle East)", "Alliance 4 (Russia, Mongol, Latin)", "Alliance 5 (China, Japan)", "Alliance 6 (India, Indonesia, Australia)", "Alliance 7 (West Africa, Centre Africa, South Africa)");
powerNegara = new Array("", 15, 3, 7, 5, 8, 10, 7, 6, 7, 15, 5, 8, 15, 12, 5, 7, 8, 4, 3, 5, 6);
}
stop();
msgBox_mc._visible = false;
msgBox_mc2._visible = false;
cekBisaTombol(true);
simpanSemua = new Array("bgData2", "xlevel", "xexp", "money1", "jenisMorale", "jenisAppear", "nyawaGame", "tutorialWar", "tutorialSetup", "perfectSemua", "jenisCampaign", "menangTerus1", "menangTerus2", "menangTerus2", "setMenang", "tipeSulitCampaign", "tipeGameLife", "pegangNegara", "dayKe", "attackPower", "sedangAwalSekali", "awalAttackBanget", "tutorialWorld", "kiraNyerang");
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", "pernahKalah");
initAwal();
ygDiSave();
ygDiSavex();
i = 0;
while (i <= simpanSemua.length) {
_root["aa2x" + i] = String("b2x" + i);
Cookies = SharedObject.getLocal(_root["aa2x" + i], "/");
if (Cookies.data["bb2x" + i] != undefined) {
_root[simpanSemua[i]] = Cookies.data["bb2x" + i];
}
i++;
}
i = 0;
while (i <= simpanSemua2.length) {
_root["zz2x" + i] = String("v2x" + i);
Cookies = SharedObject.getLocal(_root["zz2x" + i], "/");
if (Cookies.data["vv2x" + i] != undefined) {
_root[simpanSemua2[i]] = Cookies.data["vv2x" + i];
}
i++;
}
i = 1;
while (i <= 57) {
_root["a72x" + i] = String("i2x" + i);
Cookies = SharedObject.getLocal(_root["a72x" + i], "/");
if (Cookies.data["ii2x" + i] != undefined) {
_root["medals" + i] = Cookies.data["ii2x" + i];
}
i++;
}
cekAneh();
single_btn._alpha = 50;
gembokx._visible = true;
bisaSingle = false;
bisaSingle = true;
single_btn._alpha = 100;
gembokx._visible = false;
zsedangTuju = undefined;
campaign_btn.onRelease = function () {
jenisMaenan = "campaign";
cekBisaTombol(false);
if (tipeSulitCampaign == undefined) {
tipeSulitCampaign = 2;
}
if (bgData2 == undefined) {
initAwal();
ygDiSave();
ygDiSavex();
cekGo();
i = 1;
while (i <= 30) {
_root["a22x" + i] = String("d2x" + i);
Cookies = SharedObject.getLocal(_root["a22x" + i], "/");
Cookies.data["dd2x" + i] = zzslot[i];
Cookies.flush(10);
i++;
}
i = 1;
while (i <= 15) {
_root["a82x" + i] = String("j2x" + i);
Cookies = SharedObject.getLocal(_root["a82x" + i], "/");
Cookies.data["jj2x" + i] = levelSkill[i];
Cookies.flush(10);
i++;
}
} else {
msgBox_mc._visible = true;
msgBox_mc.judul = "Continue Domination";
if (tipeSulitCampaign == 1) {
sulitCampaign = "Easy";
} else if (tipeSulitCampaign == 2) {
sulitCampaign = "Normal";
} else if (tipeSulitCampaign == 3) {
sulitCampaign = "Hard";
} else if (tipeSulitCampaign == 4) {
sulitCampaign = "Extreme";
}
msgBox_mc.isi = ((((((("Continue last previous world domination? (Alliance: " + pegangNegara) + ", Day: ") + dayKe) + ", Level: ") + xlevel) + ", Difficult: ") + sulitCampaign) + "), press no to start new domination.";
msgBox_mc.yes_btn.onRelease = function () {
cekLevelan();
loadData();
cekGo("setup", "load");
};
msgBox_mc.no_btn.onRelease = function () {
initAwal();
ygDiSave();
ygDiSavex();
bgData2 = undefined;
i = 0;
_root["aa2x" + i] = String("b2x" + i);
Cookies = SharedObject.getLocal(_root["aa2x" + i], "/");
Cookies.data["bb2x" + 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 (422);
} 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 (396);
};
options_btn.onRelease = function () {
gotoAndStop (394);
};
credits_btn.onRelease = function () {
gotoAndStop (415);
};
medals_btn.onRelease = function () {
dariMana = "main";
gotoAndStop (436);
};
statistic_btn.onRelease = function () {
dariMana = "main";
gotoAndStop (434);
};
achievements_btn.onRelease = function () {
dariMana = "main";
gotoAndStop (438);
};
logo_mc.onRelease = function () {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1511&subid=mainmenu", "_blank");
};
play_btn.onRelease = function () {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1511&subid=mainmenu", "_blank");
};
Instance of Symbol 13 MovieClip in Frame 392
on (release) {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1511&subid=mainmenu", "_blank");
}
Frame 393
stop();
_root.gotoAndStop(_root._currentframe - 1);
Frame 394
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 (392);
};
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 () {
bgData2 = undefined;
resetStatistik = undefined;
resetMedal = undefined;
initAwal();
ygDiSave();
ygDiSavex();
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 395
stop();
_root.gotoAndStop(_root._currentframe - 1);
Frame 396
stop();
back_btn.onRelease = function () {
gotoAndStop (392);
};
next_btn.onRelease = function () {
_root.gotoAndStop(_root._currentframe + 1);
};
Frame 397
stop();
back_btn.onRelease = function () {
gotoAndStop (392);
};
prev_btn.onRelease = function () {
_root.gotoAndStop(_root._currentframe - 1);
};
next_btn.onRelease = function () {
_root.gotoAndStop(_root._currentframe + 1);
};
Frame 412
stop();
back_btn.onRelease = function () {
gotoAndStop (392);
};
prev_btn.onRelease = function () {
_root.gotoAndStop(_root._currentframe - 1);
};
next_btn.onRelease = function () {
_root.gotoAndStop(_root._currentframe + 1);
};
Frame 413
stop();
back_btn.onRelease = function () {
gotoAndStop (392);
};
prev_btn.onRelease = function () {
_root.gotoAndStop(_root._currentframe - 1);
};
Frame 414
stop();
_root.gotoAndStop(_root._currentframe - 1);
Frame 415
stop();
back_btn.onRelease = function () {
removeMovieClip(infoBox);
gotoAndStop (392);
};
Frame 416
stop();
_root.gotoAndStop(_root._currentframe - 1);
Frame 417
function lanjutSajax() {
myStr = new String(tipeGameLife + " Game Life");
xJenis = myStr.toUpperCase();
unlimited_mc._visible = false;
cekBisaSementara(true);
}
function klikAliansi() {
myStr = new String(this);
pegangNegara = Number(myStr.substr(myStr.length - 1, 1));
i = 0;
while (i <= 51) {
daftarHarga[i] = daftarHarga[i] * 0.5;
i++;
}
jenisMaen = "mulai";
backMusic();
gotoAndStop (419);
}
function overAliansi() {
myStr = new String(this);
indi = myStr.substr(myStr.length - 1, 1);
msgBox_mc2._visible = true;
msgBox_mc2.judul = "Select your alliance";
powerx = 0;
i = 0;
while (i <= 21) {
if (milikNegara[i] == indi) {
powerx = powerx + powerNegara[i];
}
i++;
}
msgBox_mc2.isi = (namaNegara[indi] + "\n Military Power = ") + powerx;
this._alpha = 75;
}
function outAliansi() {
msgBox_mc2._visible = false;
this._alpha = 100;
}
function cekBisaSementara(indi) {
campaign1.enabled = indi;
campaign2.enabled = indi;
campaign3.enabled = indi;
}
stop();
unlimited_mc._visible = true;
msgBox_mc._visible = false;
msgBox_mc2._visible = false;
cekBisaSementara(false);
xJenis = "";
back_btn.onRelease = function () {
removeMovieClip(infoBox);
gotoAndStop (392);
};
tipeGameLife = "Unlimited";
jenisCampaign = 1;
nyawaGame = 1000;
lanjutSajax();
i = 1;
while (i <= 7) {
_root["aliansi" + i].onRelease = klikAliansi;
_root["aliansi" + i].onRollOver = overAliansi;
_root["aliansi" + i].onRollOut = outAliansi;
i++;
}
aliansi1.onEnterFrame = (aliansi2.onEnterFrame = (aliansi3.onEnterFrame = (aliansi4.onEnterFrame = (aliansi5.onEnterFrame = (aliansi6.onEnterFrame = (aliansi7.onEnterFrame = function () {
msgBox_mc2._x = _root._xmouse;
msgBox_mc2._y = _root._ymouse - 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 418
stop();
_root.gotoAndStop(_root._currentframe - 1);
Frame 419
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++;
}
}
i = 1;
while (i <= 21) {
dunia_mc["map" + i].enabled = indi;
dunia_mc["kota" + i].enabled = indi;
i++;
}
}
function cekPetaPilih() {
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 = "Extreme";
}
info_btn.onRelease = function () {
msgBox_mc2._visible = true;
if (jenisPerang == "darat") {
msgBox_mc2.infox = "Battlefield Effect of " + jenisArea[xbgGame];
} else {
msgBox_mc2.infox = "No Battlefield Effect";
}
cekBisaKlikSemua2(false);
if (jenisPerang == "darat") {
if (jenisPerang2 == "pantai") {
msgBox_mc2.judul = "Infantry and Air Force Battle";
msgBox_mc2.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_mc2.judul = "Infantry, Artillery & Air Force Battle";
msgBox_mc2.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_mc2.judul = "All Infantry Battle";
msgBox_mc2.isi = "(Land Battle) You can train all type of infantry troops and super parachute at the same time.";
} else if (tipeMaen2 == "artillery") {
msgBox_mc2.judul = "All Artillery Battle";
msgBox_mc2.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_mc2.judul = "All Navy Battle";
msgBox_mc2.isi = "(Sea/Naval Battle) You can train all type of navy troops and super speedboat at the same time.";
} else {
msgBox_mc2.judul = "Air Force and Navy Battle";
msgBox_mc2.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_mc2.judul = "All Air Force Battle";
msgBox_mc2.isi = "(Air Battle) You can train all type of air force troops and super helicopter at the same time.";
}
msgBox_mc2.no_btn.onRelease = function () {
cekBisaKlikSemua2(true);
msgBox_mc2._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;
msgBox_mc2._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");
cekPetaPilih();
cekKemana();
if ((xlevel == 1) && (kacauBanget == undefined)) {
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 (424);
} else if (jenisMaen == "game") {
gotoAndStop (430);
}
};
menu_btn.onRelease = function () {
removeMovieClip(infoBox);
menu_mc2._visible = true;
cekBisaKlikSemua2(false);
menu_mc2.quit_btn.onRelease = function () {
simpanData();
cekBisaKlikSemua2(true);
removeMovieClip(infoBox);
gotoAndStop (392);
};
menu_mc2.back_btn.onRelease = function () {
cekBisaKlikSemua2(true);
menu_mc2._visible = false;
};
};
jenisBack = xbgGame;
if (jenisPerang == "darat") {
if (jenisBack == 1) {
msgBox_mc2.xspeed1 = 1;
msgBox_mc2.xlive1 = 0.8;
msgBox_mc2.xdamage1 = 1;
msgBox_mc2.xrange1 = 1;
msgBox_mc2.xspeed2 = 1;
msgBox_mc2.xlive2 = 1;
msgBox_mc2.xdamage2 = 1.2;
msgBox_mc2.xrange2 = 1;
msgBox_mc2.xspeed3 = 1;
msgBox_mc2.xlive3 = 1;
msgBox_mc2.xdamage3 = 1.2;
msgBox_mc2.xrange3 = 1.2;
} else if (jenisBack == 2) {
msgBox_mc2.xspeed1 = 0.8;
msgBox_mc2.xlive1 = 1.2;
msgBox_mc2.xdamage1 = 1;
msgBox_mc2.xrange1 = 0.8;
msgBox_mc2.xspeed2 = 0.8;
msgBox_mc2.xlive2 = 1.2;
msgBox_mc2.xdamage2 = 0.8;
msgBox_mc2.xrange2 = 1.2;
msgBox_mc2.xspeed3 = 1;
msgBox_mc2.xlive3 = 1.2;
msgBox_mc2.xdamage3 = 1;
msgBox_mc2.xrange3 = 1;
} else if (jenisBack == 3) {
msgBox_mc2.xspeed1 = 1;
msgBox_mc2.xlive1 = 0.6;
msgBox_mc2.xdamage1 = 1;
msgBox_mc2.xrange1 = 1;
msgBox_mc2.xspeed2 = 1;
msgBox_mc2.xlive2 = 1;
msgBox_mc2.xdamage2 = 1.4;
msgBox_mc2.xrange2 = 1;
msgBox_mc2.xspeed3 = 1;
msgBox_mc2.xlive3 = 1;
msgBox_mc2.xdamage3 = 1.4;
msgBox_mc2.xrange3 = 1.4;
} else if (jenisBack == 4) {
msgBox_mc2.xspeed1 = 0.8;
msgBox_mc2.xlive1 = 1.4;
msgBox_mc2.xdamage1 = 1;
msgBox_mc2.xrange1 = 1;
msgBox_mc2.xspeed2 = 0.6;
msgBox_mc2.xlive2 = 1;
msgBox_mc2.xdamage2 = 0.8;
msgBox_mc2.xrange2 = 1;
msgBox_mc2.xspeed3 = 1;
msgBox_mc2.xlive3 = 1;
msgBox_mc2.xdamage3 = 0.8;
msgBox_mc2.xrange3 = 1;
} else if (jenisBack == 5) {
msgBox_mc2.xspeed1 = 1;
msgBox_mc2.xlive1 = 0.6;
msgBox_mc2.xdamage1 = 1;
msgBox_mc2.xrange1 = 1;
msgBox_mc2.xspeed2 = 1;
msgBox_mc2.xlive2 = 1;
msgBox_mc2.xdamage2 = 1.4;
msgBox_mc2.xrange2 = 1;
msgBox_mc2.xspeed3 = 1;
msgBox_mc2.xlive3 = 1;
msgBox_mc2.xdamage3 = 1.4;
msgBox_mc2.xrange3 = 1.4;
} else if (jenisBack == 6) {
msgBox_mc2.xspeed1 = 0.7;
msgBox_mc2.xlive1 = 1.5;
msgBox_mc2.xdamage1 = 1;
msgBox_mc2.xrange1 = 1;
msgBox_mc2.xspeed2 = 0.7;
msgBox_mc2.xlive2 = 1;
msgBox_mc2.xdamage2 = 0.7;
msgBox_mc2.xrange2 = 1;
msgBox_mc2.xspeed3 = 1;
msgBox_mc2.xlive3 = 1;
msgBox_mc2.xdamage3 = 0.7;
msgBox_mc2.xrange3 = 1;
} else if (jenisBack == 7) {
msgBox_mc2.xspeed1 = 1;
msgBox_mc2.xlive1 = 0.7;
msgBox_mc2.xdamage1 = 1;
msgBox_mc2.xrange1 = 1;
msgBox_mc2.xspeed2 = 1;
msgBox_mc2.xlive2 = 1;
msgBox_mc2.xdamage2 = 1.3;
msgBox_mc2.xrange2 = 1;
msgBox_mc2.xspeed3 = 1;
msgBox_mc2.xlive3 = 1;
msgBox_mc2.xdamage3 = 1.3;
msgBox_mc2.xrange3 = 1.3;
} else if (jenisBack == 8) {
msgBox_mc2.xspeed1 = 1.2;
msgBox_mc2.xlive1 = 0.5;
msgBox_mc2.xdamage1 = 1;
msgBox_mc2.xrange1 = 1;
msgBox_mc2.xspeed2 = 1;
msgBox_mc2.xlive2 = 1;
msgBox_mc2.xdamage2 = 1.6;
msgBox_mc2.xrange2 = 1;
msgBox_mc2.xspeed3 = 1;
msgBox_mc2.xlive3 = 1;
msgBox_mc2.xdamage3 = 1.6;
msgBox_mc2.xrange3 = 1.6;
} else if (jenisBack == 9) {
msgBox_mc2.xspeed1 = 0.8;
msgBox_mc2.xlive1 = 0.6;
msgBox_mc2.xdamage1 = 1;
msgBox_mc2.xrange1 = 1;
msgBox_mc2.xspeed2 = 1;
msgBox_mc2.xlive2 = 1;
msgBox_mc2.xdamage2 = 1.4;
msgBox_mc2.xrange2 = 1;
msgBox_mc2.xspeed3 = 1;
msgBox_mc2.xlive3 = 1;
msgBox_mc2.xdamage3 = 1.4;
msgBox_mc2.xrange3 = 1.4;
} else if (jenisBack == 10) {
msgBox_mc2.xspeed1 = 1;
msgBox_mc2.xlive1 = 0.8;
msgBox_mc2.xdamage1 = 1;
msgBox_mc2.xrange1 = 1;
msgBox_mc2.xspeed2 = 1;
msgBox_mc2.xlive2 = 1;
msgBox_mc2.xdamage2 = 1.2;
msgBox_mc2.xrange2 = 1;
msgBox_mc2.xspeed3 = 1;
msgBox_mc2.xlive3 = 1;
msgBox_mc2.xdamage3 = 1.2;
msgBox_mc2.xrange3 = 1.2;
}
} else {
msgBox_mc2.xspeed1 = 1;
msgBox_mc2.xlive1 = 1;
msgBox_mc2.xdamage1 = 1;
msgBox_mc2.xrange1 = 1;
msgBox_mc2.xspeed2 = 1;
msgBox_mc2.xlive2 = 1;
msgBox_mc2.xdamage2 = 1;
msgBox_mc2.xrange2 = 1;
msgBox_mc2.xspeed3 = 1;
msgBox_mc2.xlive3 = 1;
msgBox_mc2.xdamage3 = 1;
msgBox_mc2.xrange3 = 1;
}
function tutorialWorldSelesai(indi) {
i = 1;
while (i <= 21) {
dunia_mc["map" + i].enabled = indi;
dunia_mc["kota" + i].enabled = indi;
i++;
}
}
function munculanTombol() {
pilihan_mc._visible = true;
pilihan_mc.gotoAndStop(1);
pilihan_mc.cancel_btn._visible = false;
pilihan_mc.nama = namaWilayah[ambilPos];
pilihan_mc.uang = "Money: " + money1;
pilihan_mc.power = "Attack Power: " + attackPower;
}
function initAwal2() {
sedangDrag = false;
dunia_mc.speed = 15;
nama_mc._visible = false;
dunia_mc.onEnterFrame = function () {
if (sedangDrag == false) {
if (_root._xmouse <= 10) {
if (this._x < 10) {
this._x = this._x + this.speed;
}
}
if (_root._xmouse >= 790) {
if (this._x > -1250) {
this._x = this._x - this.speed;
}
}
if (_root._ymouse <= 10) {
if (this._y < 0) {
this._y = this._y + this.speed;
}
}
if (_root._ymouse >= 470) {
if (this._y > -860) {
this._y = this._y - this.speed;
}
}
}
};
_root.onMouseDown = function () {
sedangDrag = true;
startDrag (dunia_mc, false, 0, 0, -1250, -860);
};
_root.onMouseUp = function () {
sedangDrag = false;
stopDrag();
};
hubunganWilayah = new Array();
i = 1;
while (i <= 21) {
hubunganWilayah[i] = new Array();
i++;
}
hubunganWilayah[1][2] = 1;
hubunganWilayah[1][3] = 0;
hubunganWilayah[1][4] = 2;
hubunganWilayah[1][5] = 1;
hubunganWilayah[1][6] = 1;
hubunganWilayah[1][7] = 2;
hubunganWilayah[1][8] = 1;
hubunganWilayah[1][9] = 2;
hubunganWilayah[1][10] = 2;
hubunganWilayah[1][11] = 1;
hubunganWilayah[1][12] = 2;
hubunganWilayah[1][13] = 2;
hubunganWilayah[1][14] = 1;
hubunganWilayah[1][15] = 2;
hubunganWilayah[1][16] = 1;
hubunganWilayah[1][17] = 1;
hubunganWilayah[1][18] = 1;
hubunganWilayah[1][19] = 1;
hubunganWilayah[1][20] = 1;
hubunganWilayah[1][21] = 1;
hubunganWilayah[2][1] = 1;
hubunganWilayah[2][3] = 1;
hubunganWilayah[2][4] = 2;
hubunganWilayah[2][5] = 1;
hubunganWilayah[2][6] = 1;
hubunganWilayah[2][7] = 2;
hubunganWilayah[2][8] = 2;
hubunganWilayah[2][9] = 2;
hubunganWilayah[2][10] = 2;
hubunganWilayah[2][11] = 2;
hubunganWilayah[2][12] = 2;
hubunganWilayah[2][13] = 2;
hubunganWilayah[2][14] = 2;
hubunganWilayah[2][15] = 2;
hubunganWilayah[2][16] = 2;
hubunganWilayah[2][17] = 2;
hubunganWilayah[2][18] = 2;
hubunganWilayah[2][19] = 2;
hubunganWilayah[2][20] = 1;
hubunganWilayah[2][21] = 1;
hubunganWilayah[3][1] = 0;
hubunganWilayah[3][2] = 2;
hubunganWilayah[3][4] = 2;
hubunganWilayah[3][5] = 1;
hubunganWilayah[3][6] = 1;
hubunganWilayah[3][7] = 2;
hubunganWilayah[3][8] = 2;
hubunganWilayah[3][9] = 2;
hubunganWilayah[3][10] = 2;
hubunganWilayah[3][11] = 1;
hubunganWilayah[3][12] = 2;
hubunganWilayah[3][13] = 2;
hubunganWilayah[3][14] = 1;
hubunganWilayah[3][15] = 1;
hubunganWilayah[3][16] = 2;
hubunganWilayah[3][17] = 1;
hubunganWilayah[3][18] = 1;
hubunganWilayah[3][19] = 2;
hubunganWilayah[3][20] = 1;
hubunganWilayah[3][21] = 2;
hubunganWilayah[11][1] = 2;
hubunganWilayah[11][2] = 2;
hubunganWilayah[11][3] = 0;
hubunganWilayah[11][5] = 1;
hubunganWilayah[11][6] = 1;
hubunganWilayah[11][7] = 2;
hubunganWilayah[11][8] = 2;
hubunganWilayah[11][9] = 2;
hubunganWilayah[11][10] = 2;
hubunganWilayah[11][11] = 2;
hubunganWilayah[11][12] = 2;
hubunganWilayah[11][13] = 2;
hubunganWilayah[11][14] = 1;
hubunganWilayah[11][15] = 1;
hubunganWilayah[11][16] = 2;
hubunganWilayah[11][17] = 1;
hubunganWilayah[11][18] = 1;
hubunganWilayah[11][19] = 2;
hubunganWilayah[11][20] = 1;
hubunganWilayah[11][21] = 2;
hubunganWilayah[5][1] = 1;
hubunganWilayah[5][2] = 1;
hubunganWilayah[5][3] = 1;
hubunganWilayah[5][4] = 2;
hubunganWilayah[5][6] = 1;
hubunganWilayah[5][7] = 2;
hubunganWilayah[5][8] = 1;
hubunganWilayah[5][9] = 2;
hubunganWilayah[5][10] = 2;
hubunganWilayah[5][11] = 1;
hubunganWilayah[5][12] = 2;
hubunganWilayah[5][13] = 2;
hubunganWilayah[5][14] = 2;
hubunganWilayah[5][15] = 2;
hubunganWilayah[5][16] = 2;
hubunganWilayah[5][17] = 2;
hubunganWilayah[5][18] = 2;
hubunganWilayah[5][19] = 2;
hubunganWilayah[5][20] = 1;
hubunganWilayah[5][21] = 1;
hubunganWilayah[6][1] = 1;
hubunganWilayah[6][2] = 1;
hubunganWilayah[6][3] = 1;
hubunganWilayah[6][4] = 2;
hubunganWilayah[6][5] = 1;
hubunganWilayah[6][7] = 0;
hubunganWilayah[6][8] = 1;
hubunganWilayah[6][9] = 2;
hubunganWilayah[6][10] = 2;
hubunganWilayah[6][11] = 2;
hubunganWilayah[6][12] = 2;
hubunganWilayah[6][13] = 2;
hubunganWilayah[6][14] = 2;
hubunganWilayah[6][15] = 2;
hubunganWilayah[6][16] = 2;
hubunganWilayah[6][17] = 2;
hubunganWilayah[6][18] = 2;
hubunganWilayah[6][19] = 2;
hubunganWilayah[6][20] = 1;
hubunganWilayah[6][21] = 1;
hubunganWilayah[7][1] = 2;
hubunganWilayah[7][2] = 2;
hubunganWilayah[7][3] = 2;
hubunganWilayah[7][4] = 2;
hubunganWilayah[7][5] = 2;
hubunganWilayah[7][6] = 0;
hubunganWilayah[7][8] = 1;
hubunganWilayah[7][9] = 0;
hubunganWilayah[7][10] = 0;
hubunganWilayah[7][11] = 2;
hubunganWilayah[7][12] = 2;
hubunganWilayah[7][13] = 2;
hubunganWilayah[7][14] = 2;
hubunganWilayah[7][15] = 2;
hubunganWilayah[7][16] = 2;
hubunganWilayah[7][17] = 2;
hubunganWilayah[7][18] = 2;
hubunganWilayah[7][19] = 2;
hubunganWilayah[7][20] = 2;
hubunganWilayah[7][21] = 1;
hubunganWilayah[8][1] = 1;
hubunganWilayah[8][2] = 1;
hubunganWilayah[8][3] = 2;
hubunganWilayah[8][4] = 2;
hubunganWilayah[8][5] = 1;
hubunganWilayah[8][6] = 2;
hubunganWilayah[8][7] = 1;
hubunganWilayah[8][9] = 2;
hubunganWilayah[8][10] = 0;
hubunganWilayah[8][11] = 2;
hubunganWilayah[8][12] = 2;
hubunganWilayah[8][13] = 2;
hubunganWilayah[8][14] = 2;
hubunganWilayah[8][15] = 2;
hubunganWilayah[8][16] = 2;
hubunganWilayah[8][17] = 2;
hubunganWilayah[8][18] = 2;
hubunganWilayah[8][19] = 2;
hubunganWilayah[8][20] = 2;
hubunganWilayah[8][21] = 2;
hubunganWilayah[9][1] = 2;
hubunganWilayah[9][2] = 2;
hubunganWilayah[9][3] = 2;
hubunganWilayah[9][4] = 1;
hubunganWilayah[9][5] = 2;
hubunganWilayah[9][6] = 1;
hubunganWilayah[9][7] = 0;
hubunganWilayah[9][8] = 2;
hubunganWilayah[9][10] = 0;
hubunganWilayah[9][11] = 2;
hubunganWilayah[9][12] = 0;
hubunganWilayah[9][13] = 2;
hubunganWilayah[9][14] = 2;
hubunganWilayah[9][15] = 2;
hubunganWilayah[9][16] = 2;
hubunganWilayah[9][17] = 2;
hubunganWilayah[9][18] = 2;
hubunganWilayah[9][19] = 2;
hubunganWilayah[9][20] = 2;
hubunganWilayah[9][21] = 1;
hubunganWilayah[10][1] = 1;
hubunganWilayah[10][2] = 1;
hubunganWilayah[10][3] = 1;
hubunganWilayah[10][4] = 0;
hubunganWilayah[10][5] = 2;
hubunganWilayah[10][6] = 2;
hubunganWilayah[10][7] = 0;
hubunganWilayah[10][8] = 0;
hubunganWilayah[10][9] = 0;
hubunganWilayah[10][11] = 2;
hubunganWilayah[10][12] = 2;
hubunganWilayah[10][13] = 0;
hubunganWilayah[10][14] = 1;
hubunganWilayah[10][15] = 2;
hubunganWilayah[10][16] = 2;
hubunganWilayah[10][17] = 2;
hubunganWilayah[10][18] = 2;
hubunganWilayah[10][19] = 2;
hubunganWilayah[10][20] = 2;
hubunganWilayah[10][21] = 2;
hubunganWilayah[4][1] = 2;
hubunganWilayah[4][2] = 2;
hubunganWilayah[4][3] = 2;
hubunganWilayah[4][4] = 2;
hubunganWilayah[4][5] = 2;
hubunganWilayah[4][6] = 2;
hubunganWilayah[4][7] = 2;
hubunganWilayah[4][8] = 2;
hubunganWilayah[4][9] = 1;
hubunganWilayah[4][10] = 0;
hubunganWilayah[4][12] = 0;
hubunganWilayah[4][13] = 0;
hubunganWilayah[4][14] = 2;
hubunganWilayah[4][15] = 2;
hubunganWilayah[4][16] = 2;
hubunganWilayah[4][17] = 2;
hubunganWilayah[4][18] = 2;
hubunganWilayah[4][19] = 2;
hubunganWilayah[4][20] = 2;
hubunganWilayah[4][21] = 2;
hubunganWilayah[12][1] = 2;
hubunganWilayah[12][2] = 2;
hubunganWilayah[12][3] = 2;
hubunganWilayah[12][4] = 0;
hubunganWilayah[12][5] = 2;
hubunganWilayah[12][6] = 2;
hubunganWilayah[12][7] = 2;
hubunganWilayah[12][8] = 2;
hubunganWilayah[12][9] = 0;
hubunganWilayah[12][10] = 2;
hubunganWilayah[12][11] = 2;
hubunganWilayah[12][13] = 0;
hubunganWilayah[12][14] = 2;
hubunganWilayah[12][15] = 0;
hubunganWilayah[12][16] = 1;
hubunganWilayah[12][17] = 1;
hubunganWilayah[12][18] = 1;
hubunganWilayah[12][19] = 1;
hubunganWilayah[12][20] = 2;
hubunganWilayah[12][21] = 0;
hubunganWilayah[13][1] = 1;
hubunganWilayah[13][2] = 2;
hubunganWilayah[13][3] = 1;
hubunganWilayah[13][4] = 0;
hubunganWilayah[13][5] = 2;
hubunganWilayah[13][6] = 2;
hubunganWilayah[13][7] = 2;
hubunganWilayah[13][8] = 2;
hubunganWilayah[13][9] = 2;
hubunganWilayah[13][10] = 0;
hubunganWilayah[13][11] = 2;
hubunganWilayah[13][12] = 0;
hubunganWilayah[13][14] = 1;
hubunganWilayah[13][15] = 0;
hubunganWilayah[13][16] = 1;
hubunganWilayah[13][17] = 2;
hubunganWilayah[13][18] = 2;
hubunganWilayah[13][19] = 2;
hubunganWilayah[13][20] = 2;
hubunganWilayah[13][21] = 2;
hubunganWilayah[14][1] = 1;
hubunganWilayah[14][2] = 2;
hubunganWilayah[14][3] = 1;
hubunganWilayah[14][4] = 2;
hubunganWilayah[14][5] = 2;
hubunganWilayah[14][6] = 2;
hubunganWilayah[14][7] = 2;
hubunganWilayah[14][8] = 2;
hubunganWilayah[14][9] = 1;
hubunganWilayah[14][10] = 2;
hubunganWilayah[14][11] = 2;
hubunganWilayah[14][12] = 2;
hubunganWilayah[14][13] = 1;
hubunganWilayah[14][15] = 1;
hubunganWilayah[14][16] = 1;
hubunganWilayah[14][17] = 2;
hubunganWilayah[14][18] = 2;
hubunganWilayah[14][19] = 2;
hubunganWilayah[14][20] = 2;
hubunganWilayah[14][21] = 2;
hubunganWilayah[15][1] = 1;
hubunganWilayah[15][2] = 2;
hubunganWilayah[15][3] = 1;
hubunganWilayah[15][4] = 2;
hubunganWilayah[15][5] = 2;
hubunganWilayah[15][6] = 2;
hubunganWilayah[15][7] = 2;
hubunganWilayah[15][8] = 2;
hubunganWilayah[15][9] = 2;
hubunganWilayah[15][10] = 1;
hubunganWilayah[15][11] = 2;
hubunganWilayah[15][12] = 0;
hubunganWilayah[15][13] = 0;
hubunganWilayah[15][14] = 1;
hubunganWilayah[15][16] = 1;
hubunganWilayah[15][17] = 2;
hubunganWilayah[15][18] = 1;
hubunganWilayah[15][19] = 1;
hubunganWilayah[15][20] = 2;
hubunganWilayah[15][21] = 1;
hubunganWilayah[16][1] = 1;
hubunganWilayah[16][2] = 2;
hubunganWilayah[16][3] = 1;
hubunganWilayah[16][4] = 2;
hubunganWilayah[16][5] = 2;
hubunganWilayah[16][6] = 2;
hubunganWilayah[16][7] = 2;
hubunganWilayah[16][8] = 2;
hubunganWilayah[16][9] = 1;
hubunganWilayah[16][10] = 1;
hubunganWilayah[16][11] = 2;
hubunganWilayah[16][12] = 2;
hubunganWilayah[16][13] = 1;
hubunganWilayah[16][14] = 1;
hubunganWilayah[16][15] = 1;
hubunganWilayah[16][17] = 1;
hubunganWilayah[16][18] = 1;
hubunganWilayah[16][19] = 1;
hubunganWilayah[16][20] = 2;
hubunganWilayah[16][21] = 2;
hubunganWilayah[17][1] = 1;
hubunganWilayah[17][2] = 2;
hubunganWilayah[17][3] = 1;
hubunganWilayah[17][4] = 2;
hubunganWilayah[17][5] = 2;
hubunganWilayah[17][6] = 2;
hubunganWilayah[17][7] = 2;
hubunganWilayah[17][8] = 2;
hubunganWilayah[17][9] = 2;
hubunganWilayah[17][10] = 2;
hubunganWilayah[17][11] = 1;
hubunganWilayah[17][12] = 2;
hubunganWilayah[17][13] = 2;
hubunganWilayah[17][14] = 2;
hubunganWilayah[17][15] = 1;
hubunganWilayah[17][16] = 1;
hubunganWilayah[17][18] = 1;
hubunganWilayah[17][19] = 1;
hubunganWilayah[17][20] = 2;
hubunganWilayah[17][21] = 2;
hubunganWilayah[18][1] = 2;
hubunganWilayah[18][2] = 2;
hubunganWilayah[18][3] = 2;
hubunganWilayah[18][4] = 2;
hubunganWilayah[18][5] = 2;
hubunganWilayah[18][6] = 2;
hubunganWilayah[18][7] = 2;
hubunganWilayah[18][8] = 2;
hubunganWilayah[18][9] = 2;
hubunganWilayah[18][10] = 2;
hubunganWilayah[18][11] = 1;
hubunganWilayah[18][12] = 2;
hubunganWilayah[18][13] = 2;
hubunganWilayah[18][14] = 2;
hubunganWilayah[18][15] = 1;
hubunganWilayah[18][16] = 1;
hubunganWilayah[18][17] = 1;
hubunganWilayah[18][19] = 0;
hubunganWilayah[18][20] = 2;
hubunganWilayah[18][21] = 2;
hubunganWilayah[19][1] = 1;
hubunganWilayah[19][2] = 2;
hubunganWilayah[19][3] = 1;
hubunganWilayah[19][4] = 2;
hubunganWilayah[19][5] = 2;
hubunganWilayah[19][6] = 2;
hubunganWilayah[19][7] = 2;
hubunganWilayah[19][8] = 2;
hubunganWilayah[19][9] = 2;
hubunganWilayah[19][10] = 2;
hubunganWilayah[19][11] = 1;
hubunganWilayah[19][12] = 1;
hubunganWilayah[19][13] = 2;
hubunganWilayah[19][14] = 2;
hubunganWilayah[19][15] = 1;
hubunganWilayah[19][16] = 1;
hubunganWilayah[19][17] = 1;
hubunganWilayah[19][18] = 0;
hubunganWilayah[19][20] = 0;
hubunganWilayah[19][21] = 0;
hubunganWilayah[20][1] = 1;
hubunganWilayah[20][2] = 2;
hubunganWilayah[20][3] = 1;
hubunganWilayah[20][4] = 2;
hubunganWilayah[20][5] = 1;
hubunganWilayah[20][6] = 2;
hubunganWilayah[20][7] = 2;
hubunganWilayah[20][8] = 2;
hubunganWilayah[20][9] = 1;
hubunganWilayah[20][10] = 2;
hubunganWilayah[20][11] = 1;
hubunganWilayah[20][12] = 2;
hubunganWilayah[20][13] = 2;
hubunganWilayah[20][14] = 2;
hubunganWilayah[20][15] = 2;
hubunganWilayah[20][16] = 2;
hubunganWilayah[20][17] = 2;
hubunganWilayah[20][18] = 1;
hubunganWilayah[20][19] = 0;
hubunganWilayah[20][21] = 0;
hubunganWilayah[21][1] = 1;
hubunganWilayah[21][2] = 2;
hubunganWilayah[21][3] = 1;
hubunganWilayah[21][4] = 2;
hubunganWilayah[21][5] = 2;
hubunganWilayah[21][6] = 1;
hubunganWilayah[21][7] = 1;
hubunganWilayah[21][8] = 2;
hubunganWilayah[21][9] = 1;
hubunganWilayah[21][10] = 1;
hubunganWilayah[21][11] = 1;
hubunganWilayah[21][12] = 0;
hubunganWilayah[21][13] = 2;
hubunganWilayah[21][14] = 2;
hubunganWilayah[21][15] = 2;
hubunganWilayah[21][16] = 2;
hubunganWilayah[21][17] = 2;
hubunganWilayah[21][18] = 2;
hubunganWilayah[21][19] = 0;
hubunganWilayah[21][20] = 0;
dunia_mc._x = 0;
dunia_mc._y = 0;
}
function initUlang() {
sedangPilih = 0;
military_mc._visible = false;
pilihan_mc._visible = false;
infobox_mc._visible = false;
military_mc._visible = false;
save_mc._visible = false;
sedangAttack = false;
kiniNegara = pegangNegara;
sedangJalan = pegangNegara;
i = 1;
while (i <= 21) {
dunia_mc["map" + i].onRollOver = overMap;
dunia_mc["map" + i].onRollOut = outMap;
dunia_mc["map" + i].onRelease = klikMap;
dunia_mc["kota" + i].onRollOver = overKota;
dunia_mc["kota" + i].onRollOut = outKota;
dunia_mc["kota" + i].onRelease = klikKota;
i++;
}
}
function cekWarna2() {
i = 1;
while (i <= 21) {
if (menu_mc2.territory_mc._currentframe == 1) {
dunia_mc["map" + i]._alpha = 70;
} else {
dunia_mc["map" + i]._alpha = 0;
}
warna = new Color(dunia_mc["map" + i]);
if (milikNegara[i] == 1) {
warna.setRGB(setWarna[1]);
} else if (milikNegara[i] == 2) {
warna.setRGB(setWarna[2]);
milikNegara[i] = 2;
} else if (milikNegara[i] == 3) {
warna.setRGB(setWarna[3]);
milikNegara[i] = 3;
} else if (milikNegara[i] == 4) {
warna.setRGB(setWarna[4]);
milikNegara[i] = 4;
} else if (milikNegara[i] == 5) {
warna.setRGB(setWarna[5]);
milikNegara[i] = 5;
} else if (milikNegara[i] == 6) {
warna.setRGB(setWarna[6]);
milikNegara[i] = 6;
} else if (milikNegara[i] == 7) {
warna.setRGB(setWarna[7]);
milikNegara[i] = 7;
}
dunia_mc["map" + i].onRollOver = overMap;
dunia_mc["map" + i].onRollOut = outMap;
dunia_mc["map" + i].onRelease = klikMap;
dunia_mc["kota" + i].onRollOver = overKota;
dunia_mc["kota" + i].onRollOut = outKota;
dunia_mc["kota" + i].onRelease = klikKota;
if (pegangNegara == milikNegara[i]) {
dunia_mc["kota" + i].gotoAndStop(2);
} else {
dunia_mc["kota" + i].gotoAndStop(1);
}
i++;
}
}
function cekPosisiAwal() {
ambilPos = 0;
i = 1;
while (i <= 21) {
if (pegangNegara == milikNegara[i]) {
ambilPos = i;
i = 21;
}
i++;
}
if (ambilPos == 1) {
dunia_mc._x = -200;
dunia_mc._y = -200;
} else if (ambilPos == 2) {
dunia_mc._x = -600;
dunia_mc._y = -200;
} else if (ambilPos == 10) {
dunia_mc._x = -800;
dunia_mc._y = -300;
} else {
dunia_mc._x = dunia_mc._x - (dunia_mc["map" + ambilPos]._x - dunia_mc["map" + ambilPos]._width);
dunia_mc._y = dunia_mc._y - (dunia_mc["map" + ambilPos]._y - dunia_mc["map" + ambilPos]._height);
}
ambilPos2 = 0;
i = 1;
while (i <= 21) {
if (pegangNegara == milikNegara[i]) {
ambilPos2++;
}
i++;
}
if (ambilPos2 >= 21) {
gotoAndStop (440);
} else if (ambilPos2 == 0) {
gotoAndStop (442);
}
if (ambilPos2 >= 5) {
_root.medals34 = 1;
}
if (ambilPos2 >= 7) {
_root.medals35 = 1;
}
if (ambilPos2 >= 9) {
_root.medals36 = 1;
}
if (ambilPos2 >= 11) {
_root.medals37 = 1;
}
if (ambilPos2 >= 13) {
_root.medals38 = 1;
}
if (ambilPos2 >= 15) {
_root.medals39 = 1;
}
if (ambilPos2 >= 17) {
_root.medals44 = 1;
}
if (ambilPos2 >= 19) {
_root.medals45 = 1;
}
if (ambilPos2 >= 21) {
_root.medals46 = 1;
}
if (pernahKalah == false) {
if (ambilPos2 >= 5) {
_root.medals48 = 1;
}
if (ambilPos2 >= 8) {
_root.medals49 = 1;
}
if (ambilPos2 >= 11) {
_root.medals50 = 1;
}
if (ambilPos2 >= 14) {
_root.medals51 = 1;
}
if (ambilPos2 >= 17) {
_root.medals52 = 1;
}
if (ambilPos2 >= 21) {
_root.medals53 = 1;
}
}
_root.medals43 = 1;
_root.medals47 = 1;
}
function overMap() {
if (((!pilihan_mc.hitTest(_root._xmouse, _root._ymouse, true)) && (pilihan_mc._visible == true)) || (pilihan_mc._visible == false)) {
myStr = new String(this);
if (myStr.length == 21) {
indi = myStr.substr(myStr.length - 1, 1);
} else {
indi = myStr.substr(myStr.length - 2, 2);
}
sedangTuju = indi;
if (sedangAttack == true) {
if ((sedangTuju == sedangPilih) || (milikNegara[sedangTuju] == pegangNegara)) {
nama_mc.gotoAndStop(1);
nama_mc.nama = "Can't attack own area";
nama_mc.xpower = "Military Power = " + powerNegara[sedangTuju];
} else {
nama_mc.gotoAndStop(2);
nama_mc.nama = namaWilayah[sedangTuju];
if (hubunganWilayah[sedangPilih][sedangTuju] == 0) {
serangLewat = "land";
} else if (hubunganWilayah[sedangPilih][sedangTuju] == 1) {
serangLewat = "sea";
} else if (hubunganWilayah[sedangPilih][sedangTuju] == 2) {
serangLewat = "air";
}
if (serangLewat == "land") {
costx = 5;
} else if (serangLewat == "sea") {
costx = 7;
} else if (serangLewat == "air") {
costx = 10;
}
nama_mc.serang = ((((((((("Attacking the territory of " + namaWilayah[sedangTuju]) + " from ") + serangLewat) + ", You can decrease ") + Math.ceil(3 + (xlevel / 8))) + " point(s) of its millitary power, but you can't conquer the area unless its military power drop to 3 or lower, cost ") + costx) + " Attack Power (own = ") + attackPower) + ")";
nama_mc.xpower = "Military Power = " + powerNegara[sedangTuju];
}
} else {
nama_mc.gotoAndStop(1);
nama_mc.nama = "Teritory of " + namaWilayah[sedangTuju];
nama_mc.nama2 = namaNegara[milikNegara[sedangTuju]];
nama_mc.xpower = "Military Power = " + powerNegara[sedangTuju];
}
nama_mc._visible = true;
if (menu_mc2.territory_mc._currentframe == 1) {
this._alpha = 90;
} else {
this._alpha = 0;
}
}
}
function enterNama() {
if (_root._ymouse <= 200) {
nama_mc._y = _root._ymouse + 150;
} else {
nama_mc._y = _root._ymouse - 150;
}
if (_root._xmouse <= 100) {
nama_mc._x = _root._xmouse + 100;
} else if (_root._xmouse >= 700) {
nama_mc._x = _root._xmouse - 100;
} else {
nama_mc._x = _root._xmouse;
}
}
function outMap() {
myStr = new String(this);
if (myStr.length == 21) {
indi = myStr.substr(myStr.length - 1, 1);
} else {
indi = myStr.substr(myStr.length - 2, 2);
}
nama_mc._visible = false;
if (sedangPilih == indi) {
if (menu_mc2.territory_mc._currentframe == 1) {
this._alpha = 90;
} else {
this._alpha = 0;
}
} else if (menu_mc2.territory_mc._currentframe == 1) {
this._alpha = 70;
} else {
this._alpha = 0;
}
}
function klikMap() {
myStr = new String(this);
if (myStr.length == 21) {
xindi = myStr.substr(myStr.length - 1, 1);
} else {
xindi = myStr.substr(myStr.length - 2, 2);
}
sedangTuju = xindi;
i = 1;
while (i <= 21) {
dunia_mc["map" + i].enabled = true;
if (menu_mc2.territory_mc._currentframe == 1) {
dunia_mc["map" + i]._alpha = 70;
} else {
dunia_mc["map" + i]._alpha = 0;
}
i++;
}
if ((sedangPilih == xindi) || (pegangNegara != milikNegara[xindi])) {
if (sedangAttack == false) {
pilihan_mc._visible = false;
sedangPilih = 0;
military_mc._visible = false;
} else if (sedangPilih == xindi) {
pilihan_mc._visible = false;
sedangPilih = 0;
military_mc._visible = false;
}
} else {
sedangPilih = xindi;
if (menu_mc2.territory_mc._currentframe == 1) {
this._alpha = 90;
} else {
this._alpha = 0;
}
sedangAttack = false;
pilihan_mc._visible = true;
pilihan_mc.gotoAndStop(1);
pilihan_mc.cancel_btn._visible = false;
pilihan_mc.nama = namaWilayah[sedangPilih];
pilihan_mc.uang = "Money: " + money1;
pilihan_mc.power = "Attack Power: " + attackPower;
if (belumSerang[sedangPilih] == true) {
pilihan_mc.attack_btn._visible = false;
} else {
pilihan_mc.attack_btn._visible = true;
}
pilihan_mc.menu_btn.onRelease = function () {
sedangAttack = false;
pilihan_mc._visible = false;
sedangPilih = 0;
military_mc._visible = false;
removeMovieClip(infoBox);
menu_mc2._visible = true;
cekBisaKlikSemua2(false);
menu_mc2.quit_btn.onRelease = function () {
simpanData();
cekBisaKlikSemua2(true);
removeMovieClip(infoBox);
backMenu();
gotoAndStop (392);
};
menu_mc2.quit_btn2.onRelease = function () {
cekBisaKlikSemua2(true);
removeMovieClip(infoBox);
backMenu();
gotoAndStop (392);
};
menu_mc2.back_btn.onRelease = function () {
cekBisaKlikSemua2(true);
menu_mc2._visible = false;
};
menu_mc2.territory_mc.onRelease = function () {
if (menu_mc2.territory_mc._currentframe == 1) {
menu_mc2.territory_mc.gotoAndStop(2);
i = 1;
while (i <= 21) {
dunia_mc["map" + i]._alpha = 0;
i++;
}
} else {
menu_mc2.territory_mc.gotoAndStop(1);
i = 1;
while (i <= 21) {
dunia_mc["map" + i]._alpha = 70;
i++;
}
}
};
};
pilihan_mc.attack_btn.onRelease = function () {
if (awalAttackBanget == undefined) {
awalAttackBanget = false;
msgBox_mc._visible = true;
msgBox_mc.judul = "Attack";
msgBox_mc.isi = ((("Select the enemy area that you wish to attack!! Launching an attack requires attack power, your attack power will increase by " + (25 + Math.ceil(3 + (xlevel / 8)))) + " points on each turn. ") + " Your attack power = ") + attackPower;
msgBox_mc.no_btn.onRelease = function () {
msgBox_mc._visible = false;
};
}
sedangAttack = true;
pilihan_mc.gotoAndStop(2);
pilihan_mc.cancel_btn.onRelease = function () {
sedangAttack = false;
pilihan_mc._visible = false;
sedangPilih = 0;
military_mc._visible = false;
};
};
pilihan_mc.end_btn.onRelease = function () {
i = 1;
while (i <= 7) {
masihAda[i] = false;
i++;
}
i = 1;
while (i <= 7) {
j = 1;
while (j <= 21) {
if (milikNegara[j] == i) {
masihAda[i] = true;
}
j++;
}
i++;
}
adaNegaraKitaDiserang = false;
idPhase = setInterval(xendPhase, 100);
pilihan_mc._visible = false;
if ((25 + Math.ceil(3 + (xlevel / 8))) != undefined) {
attackPower = attackPower + (25 + Math.ceil(3 + (xlevel / 8)));
}
keNyerangan = new Array();
tipeNyerangan = new Array();
posNyerangan = new Array();
pegNyerangan = new Array();
kiraNyerang = 0;
};
pilihan_mc.upgrade_btn.onRelease = function () {
gotoAndStop (430);
};
pilihan_mc.military_btn.onRelease = function () {
pilihan_mc._visible = false;
military_mc._visible = true;
military_mc.xinfo = (("Upgrade your military power cost " + ((10000 * powerNegara[sedangPilih]) * powerNegara[sedangPilih])) + ". Your money: ") + money1;
military_mc.yes_btn.onRelease = function () {
if (money1 >= ((10000 * powerNegara[sedangPilih]) * powerNegara[sedangPilih])) {
if (((10000 * powerNegara[sedangPilih]) * powerNegara[sedangPilih]) != undefined) {
money1 = money1 - ((10000 * powerNegara[sedangPilih]) * powerNegara[sedangPilih]);
pilihan_mc._visible = true;
military_mc._visible = false;
powerNegara[sedangPilih]++;
pilihan_mc.uang = "Money " + money1;
}
} else {
military_mc.xinfo = (("Not Enough Money\nUpgrade your military power cost " + ((10000 * powerNegara[sedangPilih]) * powerNegara[sedangPilih])) + ". Your money: ") + money1;
}
};
military_mc.no_btn.onRelease = function () {
pilihan_mc._visible = true;
military_mc._visible = false;
pilihan_mc.uang = "Money " + money1;
};
};
pilihan_mc.save_btn.onRelease = function () {
save_mc._visible = true;
if (bgData2 == undefined) {
save_mc.load_btn.enabled = false;
save_mc.load_btn._alpha = 50;
} else {
save_mc.load_btn.enabled = true;
save_mc.load_btn._alpha = 100;
}
save_mc.save_btn.onRelease = function () {
bgData2 = "maen";
simpanData();
save_mc._visible = false;
};
save_mc.load_btn.onRelease = function () {
loadData();
save_mc._visible = false;
gotoAndStop (421);
};
save_mc.cancel_btn.onRelease = function () {
save_mc._visible = false;
};
};
}
if (sedangAttack == true) {
if ((sedangTuju == sedangPilih) || (milikNegara[sedangTuju] == pegangNegara)) {
} else if (attackPower >= costx) {
if (costx != undefined) {
attackPower = attackPower - costx;
}
zsedangPilih = sedangPilih;
zsedangTuju = sedangTuju;
sedangAttack = false;
belumSerang[sedangPilih] = true;
tipeYgDiserang = "territory";
berapaSerangan = 0;
cekSerangan("serang");
} else {
msgBox_mc._visible = true;
msgBox_mc.judul = "Can't attack";
msgBox_mc.isi = ("You cannot attack this area, not enough Attack Power, Attack Power will increase by " + (25 + Math.ceil(3 + (xlevel / 8)))) + " points on each turn, click the End Turn Button to end your turn and increase your attack power";
msgBox_mc.no_btn.onRelease = function () {
msgBox_mc._visible = false;
};
}
}
}
function overKota() {
if (((!pilihan_mc.hitTest(_root._xmouse, _root._ymouse, true)) && (pilihan_mc._visible == true)) || (pilihan_mc._visible == false)) {
myStr = new String(this);
if (myStr.length == 22) {
indi = myStr.substr(myStr.length - 1, 1);
} else {
indi = myStr.substr(myStr.length - 2, 2);
}
sedangTuju = indi;
if (sedangAttack == true) {
if ((sedangTuju == sedangPilih) || (milikNegara[sedangTuju] == pegangNegara)) {
nama_mc.gotoAndStop(1);
nama_mc.nama = "Can't attack own city";
nama_mc.xpower = "Military Power = " + powerNegara[sedangTuju];
} else {
nama_mc.gotoAndStop(2);
nama_mc.nama = namaWilayah[sedangTuju];
if (hubunganWilayah[sedangPilih][sedangTuju] == 0) {
serangLewat = "land";
} else if (hubunganWilayah[sedangPilih][sedangTuju] == 1) {
serangLewat = "sea";
} else if (hubunganWilayah[sedangPilih][sedangTuju] == 2) {
serangLewat = "air";
}
if (serangLewat == "land") {
costx = 10;
} else if (serangLewat == "sea") {
costx = 15;
} else if (serangLewat == "air") {
costx = 20;
}
nama_mc.serang = ((((((("Attacking the capital of " + namaWilayah[sedangTuju]) + " from ") + serangLewat) + " and land, attack this area twice in a row to succesfully conquer it, cost ") + costx) + " Attack Power (own = ") + attackPower) + ")";
nama_mc.xpower = "Military Power = " + powerNegara[sedangTuju];
}
} else {
nama_mc.gotoAndStop(1);
nama_mc.nama = "Capital of " + namaWilayah[sedangTuju];
nama_mc.nama2 = namaNegara[milikNegara[sedangTuju]];
nama_mc.xpower = "Military Power = " + powerNegara[sedangTuju];
}
nama_mc._visible = true;
}
}
function outKota() {
myStr = new String(this);
if (myStr.length == 22) {
indi = myStr.substr(myStr.length - 1, 1);
} else {
indi = myStr.substr(myStr.length - 2, 2);
}
nama_mc._visible = false;
}
function klikKota() {
myStr = new String(this);
if (myStr.length == 22) {
xindi = myStr.substr(myStr.length - 1, 1);
} else {
xindi = myStr.substr(myStr.length - 2, 2);
}
sedangTuju = xindi;
if ((sedangPilih == xindi) || (pegangNegara != milikNegara[xindi])) {
if (sedangAttack == false) {
pilihan_mc._visible = false;
sedangPilih = 0;
military_mc._visible = false;
} else if (sedangPilih == xindi) {
pilihan_mc._visible = false;
sedangPilih = 0;
military_mc._visible = false;
}
} else {
i = 1;
while (i <= 21) {
dunia_mc["map" + i].enabled = true;
if (menu_mc2.territory_mc._currentframe == 1) {
dunia_mc["map" + i]._alpha = 70;
} else {
dunia_mc["map" + i]._alpha = 0;
}
i++;
}
if ((sedangPilih == xindi) || (pegangNegara != milikNegara[xindi])) {
if (sedangAttack == false) {
pilihan_mc._visible = false;
sedangPilih = 0;
military_mc._visible = false;
} else if (sedangPilih == xindi) {
pilihan_mc._visible = false;
sedangPilih = 0;
military_mc._visible = false;
}
} else {
sedangPilih = xindi;
if (menu_mc2.territory_mc._currentframe == 1) {
this._alpha = 90;
} else {
this._alpha = 0;
}
sedangAttack = false;
pilihan_mc._visible = true;
pilihan_mc.gotoAndStop(1);
pilihan_mc.cancel_btn._visible = false;
pilihan_mc.nama = namaWilayah[sedangPilih];
pilihan_mc.uang = "Money: " + money1;
pilihan_mc.power = "Attack Power: " + attackPower;
if (belumSerang[sedangPilih] == true) {
pilihan_mc.attack_btn._visible = false;
} else {
pilihan_mc.attack_btn._visible = true;
}
pilihan_mc.menu_btn.onRelease = function () {
sedangAttack = false;
pilihan_mc._visible = false;
sedangPilih = 0;
military_mc._visible = false;
removeMovieClip(infoBox);
menu_mc2._visible = true;
cekBisaKlikSemua2(false);
menu_mc2.quit_btn.onRelease = function () {
simpanData();
cekBisaKlikSemua2(true);
removeMovieClip(infoBox);
backMenu();
gotoAndStop (392);
};
menu_mc2.quit_btn2.onRelease = function () {
cekBisaKlikSemua2(true);
removeMovieClip(infoBox);
backMenu();
gotoAndStop (392);
};
menu_mc2.back_btn.onRelease = function () {
cekBisaKlikSemua2(true);
menu_mc2._visible = false;
};
if (menu_mc2.territory_mc._currentframe == 1) {
menu_mc2.territory_mc.gotoAndStop(2);
i = 1;
while (i <= 21) {
dunia_mc["map" + i]._alpha = 0;
i++;
}
} else {
menu_mc2.territory_mc.gotoAndStop(1);
i = 1;
while (i <= 21) {
dunia_mc["map" + i]._alpha = 70;
i++;
}
}
};
pilihan_mc.attack_btn.onRelease = function () {
if (awalAttackBanget == undefined) {
awalAttackBanget = false;
msgBox_mc._visible = true;
msgBox_mc.judul = "Attack";
msgBox_mc.isi = ((("Select the enemy area that you wish to attack!! Launching an attack requires attack power, your attack power will increase by " + (25 + Math.ceil(25 + (xlevel / 10)))) + " points on each turn.") + " Your attack power = ") + attackPower;
msgBox_mc.no_btn.onRelease = function () {
msgBox_mc._visible = false;
};
}
sedangAttack = true;
pilihan_mc.gotoAndStop(2);
pilihan_mc.cancel_btn.onRelease = function () {
sedangAttack = false;
pilihan_mc.gotoAndStop(1);
};
};
pilihan_mc.end_btn.onRelease = function () {
i = 1;
while (i <= 7) {
masihAda[i] = false;
i++;
}
i = 1;
while (i <= 7) {
j = 1;
while (j <= 21) {
if (milikNegara[j] == i) {
masihAda[i] = true;
}
j++;
}
i++;
}
adaNegaraKitaDiserang = false;
idPhase = setInterval(xendPhase, 100);
pilihan_mc._visible = false;
if ((25 + Math.ceil(3 + (xlevel / 8))) != undefined) {
attackPower = attackPower + (25 + Math.ceil(3 + (xlevel / 8)));
}
keNyerangan = new Array();
tipeNyerangan = new Array();
posNyerangan = new Array();
pegNyerangan = new Array();
kiraNyerang = 0;
};
pilihan_mc.upgrade_btn.onRelease = function () {
gotoAndStop (430);
};
pilihan_mc.military_btn.onRelease = function () {
pilihan_mc._visible = false;
military_mc._visible = true;
military_mc.xinfo = (("Upgrade your military power cost " + ((10000 * powerNegara[sedangPilih]) * powerNegara[sedangPilih])) + ". Your money: ") + money1;
military_mc.yes_btn.onRelease = function () {
if (money1 >= ((10000 * powerNegara[sedangPilih]) * powerNegara[sedangPilih])) {
if (((10000 * powerNegara[sedangPilih]) * powerNegara[sedangPilih]) != undefined) {
money1 = money1 - ((10000 * powerNegara[sedangPilih]) * powerNegara[sedangPilih]);
pilihan_mc._visible = true;
military_mc._visible = false;
pilihan_mc.uang = "Money " + money1;
powerNegara[sedangPilih]++;
}
} else {
military_mc.xinfo = (("Not Enough Money\nUpgrade your military power cost " + ((10000 * powerNegara[sedangPilih]) * powerNegara[sedangPilih])) + ". Your money: ") + money1;
}
};
military_mc.no_btn.onRelease = function () {
pilihan_mc._visible = true;
military_mc._visible = false;
pilihan_mc.uang = "Money " + money1;
};
};
pilihan_mc.save_btn.onRelease = function () {
save_mc._visible = true;
if (bgData2 == undefined) {
save_mc.load_btn.enabled = false;
save_mc.load_btn._alpha = 50;
} else {
save_mc.load_btn.enabled = true;
save_mc.load_btn._alpha = 100;
}
save_mc.save_btn.onRelease = function () {
simpanData();
save_mc._visible = false;
};
save_mc.load_btn.onRelease = function () {
loadData();
save_mc._visible = false;
};
save_mc.cancel_btn.onRelease = function () {
save_mc._visible = false;
};
};
}
}
if (sedangAttack == true) {
if ((sedangTuju == sedangPilih) || (milikNegara[sedangTuju] == pegangNegara)) {
} else if (attackPower >= costx) {
if (costx != undefined) {
attackPower = attackPower - costx;
}
zsedangPilih = sedangPilih;
zsedangTuju = sedangTuju;
sedangAttack = false;
belumSerang[sedangPilih] = true;
tipeYgDiserang = "kota";
berapaSerangan = 1;
cekSerangan("serang");
} else {
msgBox_mc._visible = true;
msgBox_mc.judul = "Can't attack";
msgBox_mc.isi = ("You cannot attack this area, not enough Attack Power, Attack Power will increase by " + (25 + Math.ceil(3 + (xlevel / 8)))) + " points on each turn, click the End Turn Button to end your turn and increase your attack power";
msgBox_mc.no_btn.onRelease = function () {
msgBox_mc._visible = false;
};
}
}
}
function xendPhase() {
nama_mc._visible = false;
military_mc._visible = false;
pilihan_mc._visible = false;
i = 1;
while (i <= 21) {
delete dunia_mc["map" + i].onRollOver;
delete dunia_mc["map" + i].onRollOut;
delete dunia_mc["map" + i].onRelease;
delete dunia_mc["kota" + i].onRollOver;
delete dunia_mc["kota" + i].onRollOut;
delete dunia_mc["kota" + i].onRelease;
i++;
}
kiniNegara++;
adaSerang = true;
if (kiniNegara > 7) {
kiniNegara = 1;
if (kiniNegara == pegangNegara) {
dayKe++;
adaSerang = false;
clearInterval(idPhase);
di = 0;
while (di <= 21) {
belumSerang[di] = false;
di++;
}
if (adaNegaraKitaDiserang == true) {
zlawanMenyerang = keNyerangan[0];
zposisiDiserang = posNyerangan[0];
pegangNegara = pegNyerangan[0];
tipeYgDiserang = tipeNyerangan[0];
infobox_mc._visible = true;
pilihan_mc._visible = false;
if (hubunganWilayah[zsedangPilih][zsedangTuju] == 0) {
xjenisPeperangan = "land";
} else if (hubunganWilayah[zsedangPilih][zsedangTuju] == 1) {
xjenisPeperangan = "sea";
} else if (hubunganWilayah[zsedangPilih][zsedangTuju] == 2) {
xjenisPeperangan = "air";
}
if (tipeYgDiserang == "territory") {
infobox_mc.xinfo = (((("Your territory of " + namaWilayah[zposisiDiserang]) + " has been attacked by ") + namaNegara[zlawanMenyerang]) + " from ") + xjenisPeperangan;
} else {
infobox_mc.xinfo = (((("Your capital of " + namaWilayah[zposisiDiserang]) + " has been attacked by ") + namaNegara[zlawanMenyerang]) + " from ") + xjenisPeperangan;
}
jenisAmbilKota = namaWilayah[zposisiDiserang];
infobox_mc.fight_btn.onRelease = function () {
cekSerangan("tahan");
};
infobox_mc.retreat_btn.onRelease = function () {
if (tipeYgDiserang == "territory") {
powerNegara[zposisiDiserang] = powerNegara[zposisiDiserang] - Math.ceil(3 + (xlevel / 8));
if (powerNegara[zposisiDiserang] <= 3) {
milikNegara[zposisiDiserang] = zlawanMenyerang;
sementaraPower = powerNegara[zposisiDiserang];
powerNegara[zposisiDiserang] = Math.ceil((sementaraPower + powerNegara[zlawanMenyerang]) / 2);
}
if (powerNegara[zposisiDiserang] <= 1) {
powerNegara[zposisiDiserang] = 1;
}
} else {
milikNegara[zposisiDiserang] = zlawanMenyerang;
sementaraPower = powerNegara[zposisiDiserang];
powerNegara[zposisiDiserang] = Math.ceil((sementaraPower + powerNegara[zlawanMenyerang]) / 2);
}
initAwal2();
initUlang();
cekWarna2();
cekPosisiAwal();
kiraNyerang--;
cekSeranganLanjutan();
};
tutorialWorldSelesai(false);
} else {
initUlang();
}
if (tipeSulitCampaign == 1) {
randx = random(2);
} else if (tipeSulitCampaign == 2) {
randx = random(4);
} else if (tipeSulitCampaign == 3) {
randx = random(6);
} else if (tipeSulitCampaign == 4) {
randx = random(8);
}
if (randx >= 1) {
i = 1;
while (i <= 21) {
if (milikNegara[i] != pegangNegara) {
if (tipeSulitCampaign == 1) {
powerNegara[i] = powerNegara[i] + 1;
} else if (tipeSulitCampaign == 2) {
powerNegara[i] = powerNegara[i] + (random(3) + 2);
} else if (tipeSulitCampaign == 3) {
powerNegara[i] = powerNegara[i] + (random(6) + 4);
} else if (tipeSulitCampaign == 4) {
if (xlevel >= 30) {
powerNegara[i] = powerNegara[i] + (random(16) + 9);
} else {
powerNegara[i] = powerNegara[i] + (random(8) + 6);
}
}
}
i++;
}
}
}
} else if (kiniNegara == pegangNegara) {
dayKe++;
adaSerang = false;
clearInterval(idPhase);
di = 0;
while (di <= 21) {
belumSerang[di] = false;
di++;
}
if (adaNegaraKitaDiserang == true) {
zlawanMenyerang = keNyerangan[0];
zposisiDiserang = posNyerangan[0];
pegangNegara = pegNyerangan[0];
tipeYgDiserang = tipeNyerangan[0];
infobox_mc._visible = true;
pilihan_mc._visible = false;
if (hubunganWilayah[zsedangPilih][zsedangTuju] == 0) {
xjenisPeperangan = "land";
} else if (hubunganWilayah[zsedangPilih][zsedangTuju] == 1) {
xjenisPeperangan = "sea";
} else if (hubunganWilayah[zsedangPilih][zsedangTuju] == 2) {
xjenisPeperangan = "air";
}
if (tipeYgDiserang == "territory") {
infobox_mc.xinfo = (((("Your territory of " + namaWilayah[zposisiDiserang]) + " has been attacked by ") + namaNegara[zlawanMenyerang]) + " from ") + xjenisPeperangan;
} else {
infobox_mc.xinfo = (((("Your capital of " + namaWilayah[zposisiDiserang]) + " has been attacked by ") + namaNegara[zlawanMenyerang]) + " from ") + xjenisPeperangan;
}
jenisAmbilKota = namaWilayah[zposisiDiserang];
infobox_mc.fight_btn.onRelease = function () {
cekSerangan("tahan");
};
infobox_mc.retreat_btn.onRelease = function () {
if (tipeYgDiserang == "territory") {
powerNegara[zposisiDiserang] = powerNegara[zposisiDiserang] - Math.ceil(3 + (xlevel / 8));
if (powerNegara[zposisiDiserang] <= 3) {
milikNegara[zposisiDiserang] = zlawanMenyerang;
sementaraPower = powerNegara[zposisiDiserang];
powerNegara[zposisiDiserang] = Math.ceil((sementaraPower + powerNegara[zlawanMenyerang]) / 2);
}
if (powerNegara[zposisiDiserang] <= 1) {
powerNegara[zposisiDiserang] = 1;
}
} else {
milikNegara[zposisiDiserang] = zlawanMenyerang;
sementaraPower = powerNegara[zposisiDiserang];
powerNegara[zposisiDiserang] = Math.ceil((sementaraPower + powerNegara[zlawanMenyerang]) / 2);
}
initAwal2();
initUlang();
cekWarna2();
cekPosisiAwal();
kiraNyerang--;
cekSeranganLanjutan();
};
tutorialWorldSelesai(false);
} else {
initUlang();
}
if (tipeSulitCampaign == 1) {
randx = random(2);
} else if (tipeSulitCampaign == 2) {
randx = random(4);
} else if (tipeSulitCampaign == 3) {
randx = random(6);
} else if (tipeSulitCampaign == 4) {
randx = random(8);
}
if (randx >= 1) {
i = 1;
while (i <= 21) {
if (milikNegara[i] != pegangNegara) {
if (tipeSulitCampaign == 1) {
powerNegara[i] = powerNegara[i] + 1;
} else if (tipeSulitCampaign == 2) {
powerNegara[i] = powerNegara[i] + (random(3) + 2);
} else if (tipeSulitCampaign == 3) {
powerNegara[i] = powerNegara[i] + (random(6) + 4);
} else if (tipeSulitCampaign == 4) {
if (xlevel >= 30) {
powerNegara[i] = powerNegara[i] + (random(16) + 9);
} else {
powerNegara[i] = powerNegara[i] + (random(8) + 6);
}
}
}
i++;
}
}
}
if ((masihAda[kiniNegara] == true) && (adaSerang == true)) {
cekAIKomputer(kiniNegara);
}
}
function cekSerangan(ztipeSerang) {
tipeMaen2 = "";
if (hubunganWilayah[zsedangPilih][zsedangTuju] == 0) {
zzrand = random(6);
if (zzrand == 0) {
tipeMaen2 = "";
} else if (zzrand == 1) {
tipeMaen2 = "infantry";
} else if (zzrand == 2) {
tipeMaen2 = "artillery";
} else if (zzrand == 3) {
tipeMaen2 = "infanarti";
} else if (zzrand == 4) {
tipeMaen2 = "infanair";
} else {
tipeMaen2 = "artiair";
}
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = random(9) + 1;
} else if (hubunganWilayah[zsedangPilih][zsedangTuju] == 1) {
randx = random(4);
if ((randx == 1) && (ztipeSerang == "serang")) {
jenisPerang2 = "pantai";
jenisPerang = "darat";
xbgGame = random(2) + 10;
} else {
jenisPerang2 = "";
jenisPerang = "laut";
zzrand = random(3);
if (zzrand == 0) {
tipeMaen2 = "";
} else if (zzrand == 1) {
tipeMaen2 = "navy";
} else {
tipeMaen2 = "navyair";
}
xbgGame = random(3) + 1;
}
} else if (hubunganWilayah[zsedangPilih][zsedangTuju] == 2) {
tipeMaen2 = "";
jenisPerang = "udara";
jenisPerang2 = "";
xbgGame = random(7) + 1;
}
if (ztipeSerang == "tahan") {
powerJagoan = powerNegara[zposisiDiserang];
powerMusuh = powerNegara[zlawanMenyerang];
} else {
powerJagoan = powerNegara[zsedangPilih];
powerMusuh = powerNegara[zsedangTuju];
}
belumSerang[zsedangPilih] = true;
belumSerang[zsedangTuju] = true;
jenisBack = xbgGame;
jenisPeperangan = ztipeSerang;
Key.removeListener(myListener);
delete myListener.onKeyDown;
delete myListener.onKeyUp;
delete _root.onEnterFrame;
infobox_mc._visible = false;
gotoAndStop (424);
}
function cekAIKomputer(indi) {
z = 1;
while (z <= 21) {
if (indi == milikNegara[z]) {
if (tipeSulitCampaign == 1) {
zrandNyerang = random(5);
} else if (tipeSulitCampaign == 2) {
zrandNyerang = random(8);
} else if (tipeSulitCampaign == 3) {
zrandNyerang = random(12);
} else if (tipeSulitCampaign == 4) {
zrandNyerang = random(16);
}
if (zrandNyerang >= 4) {
ygDiserang = new Array();
xDiserang = 0;
i = 1;
while (i <= 21) {
if (milikNegara[i] != milikNegara[indi]) {
ygDiserang[xDiserang] = i;
xDiserang++;
}
i++;
}
lawanMenyerang = indi;
randDiserang = random(xDiserang);
posisiDiserang = ygDiserang[randDiserang];
if (milikNegara[posisiDiserang] == pegangNegara) {
if (kiraNyerang <= 5) {
zsedangPilih = lawanMenyerang;
zsedangTuju = pegangNegara;
adaNegaraKitaDiserang = true;
zposisiDiserang = posisiDiserang;
zlawanMenyerang = lawanMenyerang;
rand2 = random(4);
if (rand2 == 0) {
tipeYgDiserang = "territory";
} else {
tipeYgDiserang = "kota";
}
berapaSerangan = 0;
keNyerangan[kiraNyerang] = zlawanMenyerang;
posNyerangan[kiraNyerang] = zposisiDiserang;
pegNyerangan[kiraNyerang] = pegangNegara;
tipeNyerangan[kiraNyerang] = tipeYgDiserang;
kiraNyerang++;
}
} else {
if (powerNegara[lawanMenyerang] > powerNegara[posisiDiserang]) {
randMenang = random(8);
} else {
randMenang = random(4);
}
if (randMenang >= 3) {
milikNegara[posisiDiserang] = lawanMenyerang;
cekWarna2();
}
}
}
}
z++;
}
}
function cekSeranganLanjutan() {
if (kiraNyerang > 0) {
zsedangPilih = keNyerangan[kiraNyerang];
zsedangTuju = pegNyerangan[kiraNyerang];
adaNegaraKitaDiserang = true;
zposisiDiserang = posNyerangan[kiraNyerang];
zlawanMenyerang = keNyerangan[kiraNyerang];
tipeYgDiserang = tipeNyerangan[kiraNyerang];
berapaSerangan = 0;
if (pegangNegara == milikNegara[zposisiDiserang]) {
infobox_mc._visible = true;
pilihan_mc._visible = false;
if (hubunganWilayah[zsedangPilih][zsedangTuju] == 0) {
xjenisPeperangan = "land";
} else if (hubunganWilayah[zsedangPilih][zsedangTuju] == 0) {
xjenisPeperangan = "sea";
} else if (hubunganWilayah[zsedangPilih][zsedangTuju] == 0) {
xjenisPeperangan = "air";
}
if (tipeYgDiserang == "territory") {
infobox_mc.xinfo = (((("Your territory of " + namaWilayah[zposisiDiserang]) + " has been attacked by ") + namaNegara[zlawanMenyerang]) + " from ") + xjenisPeperangan;
} else {
infobox_mc.xinfo = (((("Your capital of " + namaWilayah[zposisiDiserang]) + " has been attacked by ") + namaNegara[zlawanMenyerang]) + " from ") + xjenisPeperangan;
}
jenisAmbilKota = namaWilayah[zposisiDiserang];
infobox_mc.fight_btn.onRelease = function () {
cekSerangan("tahan");
};
infobox_mc.retreat_btn.onRelease = function () {
if (tipeYgDiserang == "territory") {
powerNegara[zposisiDiserang] = powerNegara[zposisiDiserang] - Math.ceil(3 + (xlevel / 8));
if (powerNegara[zposisiDiserang] <= 3) {
milikNegara[zposisiDiserang] = zlawanMenyerang;
sementaraPower = powerNegara[zposisiDiserang];
powerNegara[zposisiDiserang] = Math.ceil((sementaraPower + powerNegara[zlawanMenyerang]) / 2);
}
if (powerNegara[zposisiDiserang] <= 1) {
powerNegara[zposisiDiserang] = 1;
}
} else {
milikNegara[zposisiDiserang] = zlawanMenyerang;
}
initAwal2();
initUlang();
cekWarna2();
cekPosisiAwal();
kiraNyerang--;
cekSeranganLanjutan();
};
tutorialWorldSelesai(false);
} else {
kiraNyerang--;
if (kiraNyerang <= 0) {
di = 0;
while (di <= 21) {
belumSerang[di] = false;
di++;
}
kiraNyerang = 0;
tutorialWorldSelesai(true);
} else {
cekSeranganLanjutan();
}
}
} else {
di = 0;
while (di <= 21) {
belumSerang[di] = false;
di++;
}
kiraNyerang = 0;
tutorialWorldSelesai(true);
}
}
stop();
berapaSerangan = 0;
initAwal2();
initUlang();
cekWarna2();
cekPosisiAwal();
if ((dayKe == 1) && (tutorialWorld == false)) {
tutorialWorldSelesai(false);
tutorial_mc._visible = true;
tutorial_mc.next_btn.onRelease = function () {
if (tutorial_mc._currentframe < 16) {
tutorial_mc.gotoAndStop(tutorial_mc._currentframe + 1);
} else {
tutorialWorld = true;
tutorialWorldSelesai(true);
tutorial_mc._visible = false;
pilihan_mc._visible = false;
}
};
tutorial_mc.quit_btn.onRelease = function () {
tutorialWorld = true;
tutorialWorldSelesai(true);
tutorial_mc._visible = false;
pilihan_mc._visible = false;
};
} else {
tutorialWorld = true;
tutorialWorldSelesai(true);
tutorial_mc._visible = false;
pilihan_mc._visible = false;
}
if (tutorialWorld == true) {
cekSeranganLanjutan();
}
nama_mc.onEnterFrame = enterNama;
Frame 420
stop();
_root.gotoAndStop(_root._currentframe - 1);
Frame 421
gotoAndStop (419);
Frame 422
function cekPilihMap() {
i = 1;
while (i <= 22) {
_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 (392);
};
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();
ygDiSavex();
tipeGame = "game";
tipeMaen2 = "";
jenisPerang2 = "";
if (zpilihanMap == 22) {
jenisPerang = "udara";
pilihanMap = 7;
} else if (zpilihanMap == 21) {
jenisPerang = "laut";
pilihanMap = 3;
} else if (zpilihanMap == 20) {
jenisPerang = "darat";
pilihanMap = 12;
} else if (zpilihanMap == 19) {
jenisPerang = "darat";
jenisPerang2 = "pantai";
tipeMaen2 = "infanair";
pilihanMap = 11;
} else if (zpilihanMap <= 10) {
pilihanMap = zpilihanMap;
jenisPerang = "darat";
randw = random(2);
if ((zpilihanMap == 3) || (zpilihanMap == 7)) {
tipeMaen2 = "infanarti";
}
if (zpilihanMap == 10) {
jenisPerang2 = "pantai";
} else if ((zpilihanMap == 2) || (zpilihanMap == 4)) {
if (zpilihanMap == 2) {
tipeMaen2 = "infantry";
} else {
tipeMaen2 = "infanair";
}
} else if ((zpilihanMap == 6) || (zpilihanMap == 8)) {
if (zpilihanMap == 6) {
tipeMaen2 = "artillery";
} else {
tipeMaen2 = "artiair";
}
}
} else if (zpilihanMap <= 12) {
pilihanMap = zpilihanMap - 10;
if (zpilihanMap == 11) {
tipeMaen2 = "navy";
} else {
tipeMaen2 = "navyair";
}
jenisPerang = "laut";
} else {
tipeMaen2 = "udara";
pilihanMap = zpilihanMap - 12;
jenisPerang = "udara";
}
jenisMorale = xjenisMorale;
jenisAppear = xjenisAppear;
gotoAndStop (424);
};
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", "Side Beach 2", "Death City", "Dark Sea", "Dark Cloud");
cekPilihMap();
Frame 423
stop();
_root.gotoAndStop(_root._currentframe - 1);
Frame 424
function majuMundur() {
jmlPasukan2--;
}
function majuMundur2() {
jmlPasukan--;
}
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["a72x" + i] = String("i2x" + i);
Cookies = SharedObject.getLocal(_root["a72x" + i], "/");
Cookies.data["ii2x" + i] = _root["medals" + i];
Cookies.flush(10);
i++;
}
frame.menu_btn.enabled = true;
cekFrame();
}
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 == "infanair") {
setAI1();
setAI3();
setAI5();
setAI6();
setAI7();
setAI8();
} else if (tipeMaen2 == "artiair") {
setAI2();
setAI3();
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";
if (jenisCampaign == 3) {
money2 = 5000 + ((xlevel - 1) * 15);
} else {
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 = 100;
} 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 = 100;
} 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 = 100;
} 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 = 100;
} 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 / 4);
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 = 25 + (5 * (levelSkill[1] - 1));
if (bykPasukan1 >= 100) {
bykPasukan1 = 100;
}
if (bykPasukan2 >= 100) {
bykPasukan2 = 100;
}
jmlPasukan = bykPasukan1;
jmlPasukan2 = bykPasukan2;
totPasukan = jmlPasukan;
totPasukan2 = jmlPasukan2;
jmlPas = jmlPasukan;
bykKeluar1 = 0;
bykKeluar2 = 0;
cekSurender = false;
if (jenisPerang == "laut") {
nyawaIstana1 = 8000 + (35000 * (levelSkill[2] - 1));
if (xlevel >= 31) {
nyawaIstana2 = 3885000 /* 0x3B47C8 */;
} else if ((xlevel >= 20) && (xlevel <= 30)) {
nyawaIstana2 = 4 * (2000 + ((xlevel - 1) * 20000));
} else if (xlevel >= 10) {
nyawaIstana2 = 3 * (2000 + ((xlevel - 1) * 15000));
} else {
nyawaIstana2 = 8000 + ((xlevel - 1) * 5000);
}
} else {
nyawaIstana1 = 10000 + (40000 * (levelSkill[2] - 1));
if (xlevel >= 31) {
nyawaIstana2 = 779000 /* 0x0BE2F8 */;
} else if ((xlevel >= 20) && (xlevel <= 30)) {
nyawaIstana2 = 4000 + ((xlevel - 1) * 20000);
} else if (xlevel >= 10) {
nyawaIstana2 = 4000 + ((xlevel - 1) * 15000);
} else {
nyawaIstana2 = 10000 + ((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;
}
}
if (jenisPerang == "laut") {
nyawaIstana1 = nyawaIstana1 * 50;
nyawaIstana2 = nyawaIstana2 * 50;
}
if (tipeYgDiserang == "kota") {
if (jenisPeperangan == "tahan") {
nyawaIstana1 = nyawaIstana1 * 2;
} else {
nyawaIstana2 = nyawaIstana2 * 2;
}
}
nyawaIstana1 = nyawaIstana1 * (powerJagoan / 3);
nyawaIstana2 = nyawaIstana2 * (powerMusuh / 3);
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 = 1000;
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.2;
naikHarga = 0.2;
} else if (jenisPerang == "udara") {
naikHarga2 = 0.5;
naikHarga = 0.5;
} else {
naikHarga2 = 1;
naikHarga = 1;
}
naikHarga2 = naikHarga2 / 2;
naikHarga = naikHarga / 2;
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 = 15000;
money2 = 15000;
} 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;
if (jenisBack == 20) {
jenisBack = 1;
}
} 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 = "pantai1";
} else {
tipeMaen = "darat";
}
} else if (jenisPerang == "laut") {
if (jenisMaenan == "single") {
back = attachMovie("backLaut" + pilihanMap, "back", dalamBack);
jenisBack = pilihanMap;
if (jenisBack == 21) {
jenisBack = 1;
}
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;
if (jenisBack == 22) {
jenisBack = 1;
}
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 = "";
if (jenisPerang == "darat") {
xdariKe = "land";
if (tipeMaen2 == "") {
tambahanInfo = "Land Battle)";
} else if (tipeMaen2 == "infantry") {
tambahanInfo = "All Infantry Battle)";
} else if (tipeMaen2 == "artillery") {
tambahanInfo = "All Artillery Battle)";
} else if (tipeMaen2 == "infanarti") {
tambahanInfo = "All Infantry and Artillery Battle)";
} else if (tipeMaen2 == "infanair") {
tambahanInfo = "All Infantry and Air Force Battle)";
} else if (tipeMaen2 == "artiair") {
tambahanInfo = "All Artillery and Air Force Battle)";
}
} else if (jenisPerang == "laut") {
xdariKe = "sea";
if (tipeMaen2 == "") {
tambahanInfo = "Sea Battle)";
} else if (tipeMaen2 == "navy") {
tambahanInfo = "All Navy Battle)";
} else if (tipeMaen2 == "navyair") {
tambahanInfo = "All Navy and Air Force Battle)";
}
} else if (jenisPerang == "udara") {
xdariKe = "air";
tambahanInfo = "Air Battle)";
}
if (jenisPeperangan == "tahan") {
frame.informasi_mc.informasi = (((jenisAmbilKota + " attacked from ") + xdariKe) + " (") + tambahanInfo;
} else {
frame.informasi_mc.informasi = (((namaWilayah[zsedangTuju] + " attacked from ") + xdariKe) + " (") + tambahanInfo;
}
if (jenisMaenan == "single") {
frame.informasi_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 if (tipeMaen2 == "artiair") {
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") {
if (tipeMaen2 == "navyair") {
tipeJenis = 3;
} else {
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!");
cekSurender = true;
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 == "infanair") {
frame.tipe2.enabled = false;
frame.tipe2._alpha = 50;
frame.tipe4.enabled = false;
frame.tipe4._alpha = 50;
} else if (tipeMaen2 == "artiair") {
frame.tipe1.enabled = false;
frame.tipe1._alpha = 50;
frame.tipe4.enabled = false;
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 if (tipeMaen2 == "navyair") {
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 {
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 == "navyair") {
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 == "infanarti") {
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 == "artiair") {
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 == "infanair") {
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 == "navyair") {
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 == "infanarti") {
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 == "artiair") {
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 == "infanair") {
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.sudahJadi2 == true) {
if (this.pilihJenis <= 9) {
setTot = 4;
posAwalX = 0;
} else if (this.pilihJenis <= 14) {
setTot = 2;
posAwalX = 1;
} else if (this.pilihJenis == 26) {
setTot = 3;
posAwalX = 1;
} else if (this.pilihJenis == 27) {
setTot = 2;
posAwalX = 1;
} else if (this.pilihJenis == 47) {
setTot = 4;
posAwalX = 0;
} else {
setTot = 1;
posAwalX = 0;
}
if (bykKeluar1 < (bykBuatChara - setTot)) {
this.sudahJadi = false;
frame.klik_mc._visible = false;
this.munculKe = this.panah;
buatJagoan(this.pilihJenis, this.munculKe);
this.sudahJadi2 = false;
this.play();
}
} 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();
chara.damage = chara.damage * 2;
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) {
indi.sudahJadi2 = 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;
if (indi.pilihJenis <= 33) {
frame.info_mc.gotoAndPlay(2);
frame.info_mc.informasi = "Turrets completed";
} else if (indi.pilihJenis <= 37) {
frame.info_mc.gotoAndPlay(2);
frame.info_mc.informasi = "Towers completed";
} else if (indi.pilihJenis <= 42) {
frame.info_mc.gotoAndPlay(2);
frame.info_mc.informasi = "Base Guards completed";
} else if (indi.pilihJenis <= 46) {
frame.info_mc.gotoAndPlay(2);
frame.info_mc.informasi = "Strike completed";
}
} else if (indi.pilihJenis == 47) {
buatAirCraft();
} else {
if (indi.pilihJenis <= 9) {
setTot = 4;
posAwalX = 0;
} else if (indi.pilihJenis <= 14) {
setTot = 2;
posAwalX = 1;
} else if (indi.pilihJenis == 26) {
setTot = 3;
posAwalX = 1;
} else if (indi.pilihJenis == 27) {
setTot = 2;
posAwalX = 1;
} else if (indi.pilihJenis == 47) {
setTot = 4;
posAwalX = 0;
} else {
setTot = 1;
posAwalX = 0;
}
indi.sudahJadi = false;
indi.klik_mc._visible = false;
indi.munculKe = indi.panah;
buatJagoan(indi.pilihJenis, indi.munculKe);
}
}
}
function buatAirCraft() {
if (sudahSelesai == false) {
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) {
if (sudahSelesai == 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;
if (jenisPeperangan == "tahan") {
cekLese("Your base destroyed, enemy destroyed your area!");
} else {
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;
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.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") || (tipeMaen2 == "infanarti")) || (tipeMaen2 == "artiair")) || (tipeMaen2 == "navyair")) {
if (jenisCampaign == 1) {
if (troopsKe1 >= 32) {
troopsKe1 = 20;
}
} else if (jenisCampaign == 2) {
if (troopsKe1 >= 26) {
troopsKe1 = 20;
}
} else if (jenisCampaign == 3) {
if (troopsKe1 >= 30) {
troopsKe1 = 20;
}
}
} else if (tipeMaen2 == "navy") {
if (jenisCampaign == 1) {
if (troopsKe1 >= 41) {
troopsKe1 = 20;
}
}
} else if (troopsKe1 >= 51) {
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") || (tipeMaen2 == "infanarti")) || (tipeMaen2 == "artiair")) || (tipeMaen2 == "navyair")) {
if (jenisCampaign == 1) {
if (troopsKe1 >= 32) {
troopsKe1 = 20;
}
} else if (jenisCampaign == 2) {
if (troopsKe1 >= 26) {
troopsKe1 = 20;
}
} else if (jenisCampaign == 3) {
if (troopsKe1 >= 30) {
troopsKe1 = 20;
}
}
} else if (tipeMaen2 == "navy") {
if (jenisCampaign == 1) {
if (troopsKe1 >= 41) {
troopsKe1 = 20;
}
}
} else if (troopsKe1 >= 51) {
troopsKe1 = 20;
}
}
} else {
money1 = money1 + daftarHarga[randJagoan];
}
} else {
frame.info_mc.gotoAndPlay(2);
frame.info_mc.informasi = "Can't create any unit, not enough unit.";
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.live = chara.live * 1.4;
chara.damage = chara.damage * 1.4;
} else if (xlevel <= 3) {
chara.speed = chara.speed * 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.live = chara.live * 1.8;
chara.damage = chara.damage * 1.8;
} else if (xlevel <= 9) {
chara.speed = chara.speed * 1.3;
chara.live = chara.live * 2;
chara.damage = chara.damage * 2;
} else if (xlevel <= 12) {
chara.speed = chara.speed * 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.live = chara.live * 2.4;
chara.damage = chara.damage * 2.4;
} else if (xlevel <= 18) {
chara.speed = chara.speed * 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.live = chara.live * 2.8;
chara.damage = chara.damage * 2.8;
} else if (xlevel <= 24) {
chara.speed = chara.speed * 1.7;
chara.live = chara.live * 3;
chara.damage = chara.damage * 3;
} else if (xlevel <= 27) {
chara.speed = chara.speed * 2.5;
chara.live = chara.live * 4;
chara.damage = chara.damage * 4;
} else if (xlevel < 30) {
chara.speed = chara.speed * 3;
chara.live = chara.live * 5;
chara.damage = chara.damage * 5;
} else if (xlevel <= 33) {
chara.speed = chara.speed * 3;
chara.live = chara.live * 5.5;
chara.damage = chara.damage * 6;
} else if (xlevel <= 36) {
chara.speed = chara.speed * 3;
chara.live = chara.live * 6;
chara.damage = chara.damage * 7;
} else if (xlevel <= 39) {
chara.speed = chara.speed * 3;
chara.live = chara.live * 8;
chara.damage = chara.damage * 9;
} else if (xlevel <= 42) {
chara.speed = chara.speed * 3.5;
chara.live = chara.live * 10;
chara.damage = chara.damage * 11;
} else if (xlevel == 43) {
chara.speed = chara.speed * 4;
chara.live = chara.live * 12;
chara.damage = chara.damage * 12;
} else if (xlevel == 44) {
chara.speed = chara.speed * 4;
chara.live = chara.live * 14;
chara.damage = chara.damage * 14;
} else if (xlevel == 45) {
chara.speed = chara.speed * 4;
chara.live = chara.live * 16;
chara.damage = chara.damage * 16;
} else {
chara.speed = chara.speed * 3.5;
chara.live = chara.live * 10;
chara.damage = chara.damage * 11;
}
} else if (tipeSulitCampaign == 3) {
if (xlevel == 1) {
chara.speed = chara.speed * 1;
chara.live = chara.live * 1;
chara.damage = chara.damage * 1;
} else if (xlevel <= 3) {
chara.speed = chara.speed * 1;
chara.live = chara.live * 1.2;
chara.damage = chara.damage * 1.2;
} else if (xlevel <= 6) {
chara.speed = chara.speed * 1;
chara.live = chara.live * 1.4;
chara.damage = chara.damage * 1.4;
} else if (xlevel <= 9) {
chara.speed = chara.speed * 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.live = chara.live * 1.8;
chara.damage = chara.damage * 1.8;
} else if (xlevel <= 15) {
chara.speed = chara.speed * 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.live = chara.live * 2;
chara.damage = chara.damage * 2;
} else if (xlevel <= 21) {
chara.speed = chara.speed * 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.live = chara.live * 2.5;
chara.damage = chara.damage * 3;
} else if (xlevel <= 27) {
chara.speed = chara.speed * 2.5;
chara.live = chara.live * 3;
chara.damage = chara.damage * 4;
} else if (xlevel < 30) {
chara.speed = chara.speed * 3;
chara.live = chara.live * 5;
chara.damage = chara.damage * 5;
} else if (xlevel <= 33) {
chara.speed = chara.speed * 3;
chara.live = chara.live * 5.5;
chara.damage = chara.damage * 6;
} else if (xlevel <= 36) {
chara.speed = chara.speed * 3;
chara.live = chara.live * 6;
chara.damage = chara.damage * 7;
} else if (xlevel <= 39) {
chara.speed = chara.speed * 3;
chara.live = chara.live * 8;
chara.damage = chara.damage * 9;
} else if (xlevel <= 42) {
chara.speed = chara.speed * 3.5;
chara.live = chara.live * 10;
chara.damage = chara.damage * 11;
} else if (xlevel == 43) {
chara.speed = chara.speed * 4;
chara.live = chara.live * 12;
chara.damage = chara.damage * 12;
} else if (xlevel == 44) {
chara.speed = chara.speed * 4;
chara.live = chara.live * 14;
chara.damage = chara.damage * 14;
} else if (xlevel == 45) {
chara.speed = chara.speed * 4;
chara.live = chara.live * 16;
chara.damage = chara.damage * 16;
} else {
chara.speed = chara.speed * 3.5;
chara.live = chara.live * 10;
chara.damage = chara.damage * 11;
}
} else if (tipeSulitCampaign == 2) {
if (xlevel == 1) {
chara.speed = chara.speed * 1;
chara.live = chara.live * 0.75;
chara.damage = chara.damage * 0.75;
} else if (xlevel <= 3) {
chara.speed = chara.speed * 1;
chara.live = chara.live * 0.9;
chara.damage = chara.damage * 0.9;
} else if (xlevel <= 6) {
chara.speed = chara.speed * 1;
chara.live = chara.live * 1;
chara.damage = chara.damage * 1;
} else if (xlevel <= 9) {
chara.speed = chara.speed * 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.live = chara.live * 1.4;
chara.damage = chara.damage * 1.4;
} else if (xlevel <= 15) {
chara.speed = chara.speed * 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.live = chara.live * 1.8;
chara.damage = chara.damage * 1.8;
} else if (xlevel <= 21) {
chara.speed = chara.speed * 1.4;
chara.live = chara.live * 2;
chara.damage = chara.damage * 2;
} else if (xlevel <= 24) {
chara.speed = chara.speed * 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.live = chara.live * 3;
chara.damage = chara.damage * 4;
} else if (xlevel < 30) {
chara.speed = chara.speed * 3;
chara.live = chara.live * 5;
chara.damage = chara.damage * 5;
} else if (xlevel <= 33) {
chara.speed = chara.speed * 3;
chara.live = chara.live * 5.5;
chara.damage = chara.damage * 6;
} else if (xlevel <= 36) {
chara.speed = chara.speed * 3;
chara.live = chara.live * 6;
chara.damage = chara.damage * 7;
} else if (xlevel <= 39) {
chara.speed = chara.speed * 3;
chara.live = chara.live * 8;
chara.damage = chara.damage * 9;
} else if (xlevel <= 42) {
chara.speed = chara.speed * 3.5;
chara.live = chara.live * 10;
chara.damage = chara.damage * 11;
} else if (xlevel == 43) {
chara.speed = chara.speed * 4;
chara.live = chara.live * 12;
chara.damage = chara.damage * 12;
} else if (xlevel == 44) {
chara.speed = chara.speed * 4;
chara.live = chara.live * 14;
chara.damage = chara.damage * 14;
} else if (xlevel == 45) {
chara.speed = chara.speed * 4;
chara.live = chara.live * 16;
chara.damage = chara.damage * 16;
} else {
chara.speed = chara.speed * 3.5;
chara.live = chara.live * 10;
chara.damage = chara.damage * 11;
}
} else if (xlevel == 1) {
chara.speed = chara.speed * 1;
chara.live = chara.live * 0.5;
chara.damage = chara.damage * 0.5;
} else if (xlevel <= 3) {
chara.speed = chara.speed * 1;
chara.live = chara.live * 0.6;
chara.damage = chara.damage * 0.6;
} else if (xlevel <= 6) {
chara.speed = chara.speed * 1;
chara.live = chara.live * 0.7;
chara.damage = chara.damage * 0.7;
} else if (xlevel <= 9) {
chara.speed = chara.speed * 1.1;
chara.live = chara.live * 1;
chara.damage = chara.damage * 1;
} else if (xlevel <= 12) {
chara.speed = chara.speed * 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.live = chara.live * 1.4;
chara.damage = chara.damage * 1.4;
} else if (xlevel <= 18) {
chara.speed = chara.speed * 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.live = chara.live * 2;
chara.damage = chara.damage * 2;
} else if (xlevel <= 24) {
chara.speed = chara.speed * 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.live = chara.live * 3;
chara.damage = chara.damage * 4;
} else if (xlevel < 30) {
chara.speed = chara.speed * 3;
chara.live = chara.live * 5;
chara.damage = chara.damage * 5;
} else if (xlevel <= 33) {
chara.speed = chara.speed * 3;
chara.live = chara.live * 5.5;
chara.damage = chara.damage * 6;
} else if (xlevel <= 36) {
chara.speed = chara.speed * 3;
chara.live = chara.live * 6;
chara.damage = chara.damage * 7;
} else if (xlevel <= 39) {
chara.speed = chara.speed * 3;
chara.live = chara.live * 8;
chara.damage = chara.damage * 9;
} else if (xlevel <= 42) {
chara.speed = chara.speed * 3.5;
chara.live = chara.live * 10;
chara.damage = chara.damage * 11;
} else if (xlevel == 43) {
chara.speed = chara.speed * 4;
chara.live = chara.live * 12;
chara.damage = chara.damage * 12;
} else if (xlevel == 44) {
chara.speed = chara.speed * 4;
chara.live = chara.live * 14;
chara.damage = chara.damage * 14;
} else if (xlevel == 45) {
chara.speed = chara.speed * 4;
chara.live = chara.live * 16;
chara.damage = chara.damage * 16;
} else {
chara.speed = chara.speed * 3.5;
chara.live = chara.live * 10;
chara.damage = chara.damage * 11;
}
if (xlevel <= 15) {
chara.range = chara.range * 1;
} else if (xlevel <= 30) {
chara.range = chara.range * 1.2;
} else if (xlevel <= 45) {
chara.range = chara.range * 1.3;
} else {
chara.range = chara.range * 1.4;
}
if ((chara.jenis >= 31) && (chara.jenis <= 42)) {
chara.range = chara.range * 0.5;
}
}
if ((jenisPerang == "laut") || (jenisPerang == "udara")) {
if (chara.jenis <= 25) {
chara.live = chara.live * 3;
chara.damage = chara.damage * 3;
} else {
chara.live = chara.live * 6;
chara.damage = chara.damage * 6;
}
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.25;
}
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 * 1.75;
chara.live = chara.live * 1.75;
}
}
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;
}
}
}
}
}
if (chara.tipe == "jagoan") {
if (jenisBack == 1) {
if (chara.jenis <= 9) {
chara.speed = chara.speed * 1;
chara.live = chara.live * 0.8;
chara.damage = chara.damage * 1;
chara.range = chara.range * 1;
} else if (chara.jenis <= 17) {
chara.speed = chara.speed * 1;
chara.live = chara.live * 1;
chara.damage = chara.damage * 1.2;
chara.range = chara.range * 1;
} else if (chara.jenis <= 25) {
chara.speed = chara.speed * 1;
chara.live = chara.live * 1;
chara.damage = chara.damage * 1.2;
chara.range = chara.range * 1.2;
}
} else if (jenisBack == 2) {
if (chara.jenis <= 9) {
chara.speed = chara.speed * 0.8;
chara.live = chara.live * 1.2;
chara.damage = chara.damage * 1;
chara.range = chara.range * 0.8;
} else if (chara.jenis <= 17) {
chara.speed = chara.speed * 0.8;
chara.live = chara.live * 1.2;
chara.damage = chara.damage * 0.8;
chara.range = chara.range * 1.2;
} else if (chara.jenis <= 25) {
chara.speed = chara.speed * 1;
chara.live = chara.live * 1.2;
chara.damage = chara.damage * 1;
chara.range = chara.range * 1;
}
} else if (jenisBack == 3) {
if (chara.jenis <= 9) {
chara.speed = chara.speed * 1;
chara.live = chara.live * 0.6;
chara.damage = chara.damage * 1;
chara.range = chara.range * 1;
} else if (chara.jenis <= 17) {
chara.speed = chara.speed * 1;
chara.live = chara.live * 1;
chara.damage = chara.damage * 1.4;
chara.range = chara.range * 1;
} else if (chara.jenis <= 25) {
chara.speed = chara.speed * 1;
chara.live = chara.live * 1;
chara.damage = chara.damage * 1.4;
chara.range = chara.range * 1.4;
}
} else if (jenisBack == 4) {
if (chara.jenis <= 9) {
chara.speed = chara.speed * 0.8;
chara.live = chara.live * 1.4;
chara.damage = chara.damage * 1;
chara.range = chara.range * 1;
} else if (chara.jenis <= 17) {
chara.speed = chara.speed * 0.6;
chara.live = chara.live * 1;
chara.damage = chara.damage * 0.8;
chara.range = chara.range * 1;
} else if (chara.jenis <= 25) {
chara.speed = chara.speed * 1;
chara.live = chara.live * 1;
chara.damage = chara.damage * 0.8;
chara.range = chara.range * 1;
}
} else if (jenisBack == 5) {
if (chara.jenis <= 9) {
chara.speed = chara.speed * 1;
chara.live = chara.live * 0.6;
chara.damage = chara.damage * 1;
chara.range = chara.range * 1;
} else if (chara.jenis <= 17) {
chara.speed = chara.speed * 1;
chara.live = chara.live * 1;
chara.damage = chara.damage * 1.4;
chara.range = chara.range * 1;
} else if (chara.jenis <= 25) {
chara.speed = chara.speed * 1;
chara.live = chara.live * 1;
chara.damage = chara.damage * 1.4;
chara.range = chara.range * 1.4;
}
} else if (jenisBack == 6) {
if (chara.jenis <= 9) {
chara.speed = chara.speed * 0.7;
chara.live = chara.live * 1.5;
chara.damage = chara.damage * 1;
chara.range = chara.range * 1;
} else if (chara.jenis <= 17) {
chara.speed = chara.speed * 0.7;
chara.live = chara.live * 1;
chara.damage = chara.damage * 0.7;
chara.range = chara.range * 1;
} else if (chara.jenis <= 25) {
chara.speed = chara.speed * 1;
chara.live = chara.live * 1;
chara.damage = chara.damage * 0.7;
chara.range = chara.range * 1;
}
} else if (jenisBack == 7) {
if (chara.jenis <= 9) {
chara.speed = chara.speed * 1;
chara.live = chara.live * 0.7;
chara.damage = chara.damage * 1;
chara.range = chara.range * 1;
} else if (chara.jenis <= 17) {
chara.speed = chara.speed * 1;
chara.live = chara.live * 1;
chara.damage = chara.damage * 1.3;
chara.range = chara.range * 1;
} else if (chara.jenis <= 25) {
chara.speed = chara.speed * 1;
chara.live = chara.live * 1;
chara.damage = chara.damage * 1.3;
chara.range = chara.range * 1.3;
}
} else if (jenisBack == 8) {
if (chara.jenis <= 9) {
chara.speed = chara.speed * 1.2;
chara.live = chara.live * 0.5;
chara.damage = chara.damage * 1;
chara.range = chara.range * 1;
} else if (chara.jenis <= 17) {
chara.speed = chara.speed * 1;
chara.live = chara.live * 1;
chara.damage = chara.damage * 1.6;
chara.range = chara.range * 1;
} else if (chara.jenis <= 25) {
chara.speed = chara.speed * 1;
chara.live = chara.live * 1;
chara.damage = chara.damage * 1.6;
chara.range = chara.range * 1.6;
}
} else if (jenisBack == 9) {
if (chara.jenis <= 9) {
chara.speed = chara.speed * 0.8;
chara.live = chara.live * 0.6;
chara.damage = chara.damage * 1;
chara.range = chara.range * 1;
} else if (chara.jenis <= 17) {
chara.speed = chara.speed * 1;
chara.live = chara.live * 1;
chara.damage = chara.damage * 1.4;
chara.range = chara.range * 1;
} else if (chara.jenis <= 25) {
chara.speed = chara.speed * 1;
chara.live = chara.live * 1;
chara.damage = chara.damage * 1.4;
chara.range = chara.range * 1.4;
}
} else if (chara.jenis <= 9) {
chara.speed = chara.speed * 1;
chara.live = chara.live * 0.8;
chara.damage = chara.damage * 1;
chara.range = chara.range * 1;
} else if (chara.jenis <= 17) {
chara.speed = chara.speed * 1;
chara.live = chara.live * 1;
chara.damage = chara.damage * 1.2;
chara.range = chara.range * 1;
} else if (chara.jenis <= 25) {
chara.speed = chara.speed * 1;
chara.live = chara.live * 1;
chara.damage = chara.damage * 1.2;
chara.range = chara.range * 1.2;
}
}
if (chara.tipe == "jagoan") {
if (jenisCampaign == 1) {
if (chara.jenis <= 9) {
chara.live = chara.live * 1.4;
chara.damage = chara.damage * 1.4;
} else if ((chara.jenis >= 18) && (chara.jenis <= 30)) {
chara.live = chara.live * 1.4;
chara.damage = chara.damage * 1.4;
}
} else if (jenisCampaign == 2) {
if ((chara.jenis >= 10) && (chara.jenis <= 17)) {
chara.live = chara.live * 1.4;
chara.damage = chara.damage * 1.4;
} else if (chara.jenis >= 31) {
chara.live = chara.live * 1.4;
chara.damage = chara.damage * 1.4;
}
} else if (jenisCampaign == 3) {
chara.live = chara.live * 1.3;
chara.damage = chara.damage * 1.3;
}
}
if ((randJagoan >= 31) && (randJagoan <= 42)) {
chara.range = chara.range * 0.5;
}
if ((randJagoan >= 26) && (randJagoan <= 30)) {
chara.live = chara.live * 0.25;
chara.damage = chara.damage * 2.75;
chara.speed = chara.speed * 0.7;
}
if (chara.jenis <= 9) {
if (chara.tipe == "jagoan") {
if (jenisCampaign == 2) {
chara.live = chara.live * 1.5;
chara.damage = chara.damage * 1.5;
}
}
}
if (chara.tipe == "musuh") {
if (tipeMaen2 == "navy") {
if ((randJagoan >= 26) && (randJagoan <= 30)) {
chara.damage = chara.damage * 2;
chara.live = chara.live * 2;
}
} else if (jenisPerang == "udara") {
if ((chara.jenis >= 18) && (chara.jenis <= 25)) {
chara.damage = chara.damage * 2;
chara.live = chara.live * 2;
}
}
}
if (tipeYgDiserang == "territory") {
if (chara.tipe == "jagoan") {
chara.live = chara.live * powerJagoan;
chara.damage = chara.damage * powerJagoan;
} else if (chara.tipe == "musuh") {
chara.live = chara.live * powerMusuh;
chara.damage = chara.damage * powerMusuh;
}
} else if (jenisPeperangan == "tahan") {
if (chara.tipe == "jagoan") {
chara.live = chara.live * (powerJagoan * 1.25);
chara.damage = chara.damage * (powerJagoan * 1.25);
} else if (chara.tipe == "musuh") {
chara.live = chara.live * powerMusuh;
chara.damage = chara.damage * powerMusuh;
}
} else if (chara.tipe == "musuh") {
if (berapaSerangan == 2) {
chara.live = chara.live * (powerMusuh * 2);
chara.damage = chara.damage * (powerMusuh * 2);
} else {
chara.live = chara.live * (powerMusuh * 1.25);
chara.damage = chara.damage * (powerMusuh * 1.25);
}
} else if (chara.tipe == "jagoan") {
chara.live = chara.live * powerJagoan;
chara.damage = chara.damage * powerJagoan;
}
if (chara.tipe == "musuh") {
chara.live = chara.live * 0.75;
chara.damage = chara.damage * 0.75;
}
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 < bykBuatChara2) {
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 < bykBuatChara2) {
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 < bykBuatChara2) {
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 < bykBuatChara2) {
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 < bykBuatChara2) {
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 < bykBuatChara2) {
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 < bykBuatChara2) {
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 < bykBuatChara2) {
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 < bykBuatChara2) {
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 < bykBuatChara2) {
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 < bykBuatChara2) {
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 < bykBuatChara2) {
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 < bykBuatChara2) {
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 < bykBuatChara2) {
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 < bykBuatChara2) {
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 < bykBuatChara2) {
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 < bykBuatChara2) {
buatMusuh(indi);
money2 = money2 - daftarHarga[17];
}
}
clearInterval(idPasukanx17);
idPasukanx17 = setInterval(qbuatMusuh17x, qdelay, 17);
}
}
function setAI1() {
if (xPause == false) {
if ((tipeMaen2 == "infantry") || (tipeMaen2 == "infanarti")) {
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 >= 3) {
cekWaktu(3);
idPasukanx3 = setInterval(qbuatMusuh3x, qdelay, 3);
}
if (xlevel >= 4) {
cekWaktu(4);
idPasukanx4 = setInterval(qbuatMusuh4x, qdelay, 4);
}
if (xlevel >= 5) {
cekWaktu(5);
idPasukanx5 = setInterval(qbuatMusuh5x, qdelay, 5);
}
if (xlevel >= 6) {
cekWaktu(6);
idPasukanx6 = setInterval(qbuatMusuh6x, qdelay, 6);
}
if (xlevel >= 7) {
cekWaktu(7);
idPasukanx7 = setInterval(qbuatMusuh7x, qdelay, 7);
}
if (xlevel >= 8) {
cekWaktu(8);
idPasukanx8 = setInterval(qbuatMusuh8x, qdelay, 8);
}
if (xlevel >= 9) {
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 <= 3) {
xslotUnlok1 = new Array("", 1, 2, 3, 4);
} else if (xlevel <= 4) {
xslotUnlok1 = new Array("", 1, 2, 3, 4, 5);
} else if (xlevel <= 5) {
xslotUnlok1 = new Array("", 1, 2, 3, 4, 5, 6);
} else if (xlevel <= 6) {
xslotUnlok1 = new Array("", 1, 2, 3, 4, 5, 6, 7);
} else if (xlevel <= 7) {
xslotUnlok1 = new Array("", 1, 2, 3, 4, 5, 6, 7, 8);
} else if (xlevel <= 8) {
xslotUnlok1 = new Array("", 1, 2, 3, 4, 5, 6, 7, 8, 9);
} else if (xlevel >= 9) {
if (xlevel == 9) {
xslotUnlok1 = new Array("", 2, 3, 4, 5, 6, 7, 8, 9);
} else if (xlevel == 10) {
xslotUnlok1 = new Array("", 3, 4, 5, 6, 7, 8, 9);
} else if (xlevel == 11) {
xslotUnlok1 = new Array("", 4, 5, 6, 7, 8, 9);
} else if (xlevel == 12) {
xslotUnlok1 = new Array("", 5, 6, 7, 8, 9);
} else if (xlevel == 13) {
xslotUnlok1 = new Array("", 6, 7, 8, 9);
} else {
xslotUnlok1 = new Array("", 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 < bykBuatChara2) {
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") || (tipeMaen2 == "infanarti")) || (tipeMaen2 == "infanair")) || (tipeMaen2 == "artiair")) {
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 >= 1) {
cekWaktu(10);
idPasukanx10 = setInterval(qbuatMusuh10x, qdelay, 10);
}
if (xlevel >= 1) {
cekWaktu(11);
idPasukanx11 = setInterval(qbuatMusuh11x, qdelay, 11);
}
if (xlevel >= 3) {
cekWaktu(12);
idPasukanx12 = setInterval(qbuatMusuh12x, qdelay, 12);
}
if (xlevel >= 4) {
cekWaktu(13);
idPasukanx13 = setInterval(qbuatMusuh13x, qdelay, 13);
}
if (xlevel >= 6) {
cekWaktu(14);
idPasukanx14 = setInterval(qbuatMusuh14x, qdelay, 14);
}
if (xlevel >= 8) {
cekWaktu(15);
idPasukanx15 = setInterval(qbuatMusuh15x, qdelay, 15);
}
if (xlevel >= 10) {
cekWaktu(16);
idPasukanx16 = setInterval(qbuatMusuh16x, qdelay, 16);
}
if (xlevel >= 12) {
cekWaktu(17);
idPasukanx17 = setInterval(qbuatMusuh17x, qdelay, 17);
}
}
} else {
ambilPasukan2 = new Array();
xslotUnlok2 = new Array();
if (xlevel <= 3) {
xslotUnlok2 = new Array("", 10, 11);
} else if (xlevel <= 4) {
xslotUnlok2 = new Array("", 10, 11, 12);
} else if (xlevel <= 5) {
xslotUnlok2 = new Array("", 10, 11, 12, 13);
} else if (xlevel <= 6) {
xslotUnlok2 = new Array("", 10, 11, 12, 13, 14);
} else if (xlevel <= 7) {
xslotUnlok2 = new Array("", 10, 11, 12, 13, 14, 15);
} else if (xlevel <= 8) {
xslotUnlok2 = new Array("", 10, 11, 12, 13, 14, 15, 16);
} else if (xlevel >= 9) {
if (xlevel <= 10) {
xslotUnlok2 = new Array("", 11, 12, 13, 14, 15, 16);
} else if (xlevel <= 12) {
xslotUnlok2 = new Array("", 12, 13, 14, 15, 16);
} else if (xlevel <= 14) {
xslotUnlok2 = new Array("", 13, 14, 15, 16);
} else if (xlevel <= 16) {
xslotUnlok2 = new Array("", 14, 15, 16);
} else {
xslotUnlok2 = new Array("", 15, 16);
}
}
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 < bykBuatChara2) {
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 < bykBuatChara2) {
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 < bykBuatChara2) {
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 < bykBuatChara2) {
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 < bykBuatChara2) {
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 < bykBuatChara2) {
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 < bykBuatChara2) {
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 < bykBuatChara2) {
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 < bykBuatChara2) {
buatMusuh(indi);
money2 = money2 - daftarHarga[25];
}
}
clearInterval(idPasukan38);
idPasukan38 = setInterval(qbuatMusuh38, qdelay, 25);
}
}
function setAI3() {
if (xPause == false) {
if ((((jenisPerang == "udara") || (tipeMaen2 == "infanair")) || (tipeMaen2 == "artiair")) || (tipeMaen2 == "navyair")) {
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 >= 1) {
cekWaktu(18);
idPasukan31 = setInterval(qbuatMusuh31, qdelay, 18);
}
if (xlevel >= 1) {
cekWaktu(19);
idPasukan32 = setInterval(qbuatMusuh32, qdelay, 19);
}
if (xlevel >= 5) {
cekWaktu(20);
idPasukan33 = setInterval(qbuatMusuh33, qdelay, 20);
}
if (xlevel >= 7) {
cekWaktu(21);
idPasukan34 = setInterval(qbuatMusuh34, qdelay, 21);
}
if (xlevel >= 9) {
cekWaktu(22);
idPasukan35 = setInterval(qbuatMusuh35, qdelay, 22);
}
if (xlevel >= 11) {
cekWaktu(23);
idPasukan36 = setInterval(qbuatMusuh36, qdelay, 23);
}
if (xlevel >= 13) {
cekWaktu(24);
idPasukan37 = setInterval(qbuatMusuh37, qdelay, 24);
}
if (xlevel >= 15) {
cekWaktu(25);
idPasukan38 = setInterval(qbuatMusuh38, qdelay, 25);
}
}
} else {
ambilPasukan3 = new Array();
xslotUnlok3 = new Array();
if (xlevel >= 1) {
if (xlevel <= 2) {
xslotUnlok3 = new Array("", 18, 19);
} else if (xlevel <= 3) {
xslotUnlok3 = new Array("", 18, 19, 20);
} else if (xlevel <= 4) {
xslotUnlok3 = new Array("", 18, 19, 20, 21);
} else if (xlevel <= 5) {
xslotUnlok3 = new Array("", 18, 19, 20, 21, 22);
} else if (xlevel <= 6) {
xslotUnlok3 = new Array("", 18, 19, 20, 21, 22, 23);
} else if (xlevel <= 7) {
xslotUnlok3 = new Array("", 18, 19, 20, 21, 22, 23, 24);
} else if (xlevel >= 8) {
if (xlevel <= 12) {
xslotUnlok3 = new Array("", 19, 20, 21, 22, 23, 24);
} else if (xlevel <= 14) {
xslotUnlok3 = new Array("", 20, 21, 22, 23, 24);
} else if (xlevel <= 16) {
xslotUnlok3 = new Array("", 21, 22, 23, 24);
} else if (xlevel <= 18) {
xslotUnlok3 = new Array("", 22, 23, 24);
} else {
xslotUnlok3 = new Array("", 23, 24);
}
}
}
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 < bykBuatChara2) {
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 < bykBuatChara2) {
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 < bykBuatChara2) {
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 < bykBuatChara2) {
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 < bykBuatChara2) {
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 < bykBuatChara2) {
buatMusuh(indi);
money2 = money2 - daftarHarga[30];
}
}
clearInterval(idPasukan30);
idPasukan30 = setInterval(qbuatMusuh30, qdelay, 30);
}
}
function setAI4() {
if (xPause == false) {
if ((tipeMaen2 == "navy") || (tipeMaen2 == "navyair")) {
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 >= 1) {
cekWaktu(26);
idPasukan26 = setInterval(qbuatMusuh26, qdelay, 26);
}
if (xlevel >= 1) {
cekWaktu(27);
idPasukan27 = setInterval(qbuatMusuh27, qdelay, 27);
}
if (xlevel >= 6) {
cekWaktu(28);
idPasukan28 = setInterval(qbuatMusuh28, qdelay, 28);
}
if (xlevel >= 9) {
cekWaktu(29);
idPasukan29 = setInterval(qbuatMusuh29, qdelay, 29);
}
if (xlevel >= 12) {
cekWaktu(30);
idPasukan30 = setInterval(qbuatMusuh30, qdelay, 30);
}
}
} else {
ambilPasukan4 = new Array();
xslotUnlok4 = new Array();
if (xlevel >= 1) {
if (xlevel <= 4) {
xslotUnlok4 = new Array("", 26, 27);
} else if (xlevel <= 8) {
xslotUnlok4 = new Array("", 26, 27, 28);
} else if (xlevel <= 12) {
xslotUnlok4 = new Array("", 26, 27, 28, 29);
} else if (xlevel >= 13) {
if (xlevel <= 16) {
xslotUnlok4 = new Array("", 27, 28, 29);
} else if (xlevel <= 20) {
xslotUnlok4 = new Array("", 28, 29);
} else {
xslotUnlok4 = new Array("", 29);
}
}
}
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 < bykBuatChara2) {
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 >= 5) {
if (xlevel <= 5) {
xslotUnlok5 = new Array("", 31);
} else if (xlevel <= 7) {
xslotUnlok5 = new Array("", 31, 32);
} else if (xlevel >= 8) {
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 >= 5) {
if (xlevel == 5) {
xslotUnlok8 = new Array("", 34);
} else if ((xlevel >= 5) && (xlevel <= 10)) {
xslotUnlok8 = new Array("", 34, 35);
} else if (xlevel == 11) {
xslotUnlok8 = new Array("", 34, 35, 36);
} else if (xlevel >= 12) {
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 if (jenisPerang == "laut") {
qdelay = qdelay + 2000;
} else {
qdelay = qdelay + 6000;
}
qdelay = Number(qdelay);
if (qdelay == undefined) {
qdelay = 0;
}
if (isNaN(qdelay) == true) {
qdelay = 0;
}
if (tipeSulitCampaign >= 3) {
if (xlevel <= 20) {
qdelay = qdelay - 3000;
}
}
if (tipeSulitCampaign >= 3) {
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 <= 8000) {
qdelay = 8000;
} 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 < bykBuatChara2) {
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._y >= 345) {
chara._y = 345;
}
}
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") || (tipeMaen2 == "infanarti")) || (tipeMaen2 == "artiair")) || (tipeMaen2 == "navyair")) {
if (jenisCampaign == 1) {
if (troopsKe2 >= 44) {
troopsKe2 = 32;
}
}
} else if (tipeMaen2 == "navy") {
if (jenisCampaign == 1) {
if (troopsKe2 >= 61) {
troopsKe2 = 41;
}
}
} else if (troopsKe2 >= 81) {
troopsKe2 = 51;
}
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") || (tipeMaen2 == "infanarti")) || (tipeMaen2 == "artiair")) || (tipeMaen2 == "navyair")) {
if (jenisCampaign == 1) {
if (troopsKe2 >= 44) {
troopsKe2 = 32;
}
}
} else if (tipeMaen2 == "navy") {
if (jenisCampaign == 1) {
if (troopsKe2 >= 61) {
troopsKe2 = 41;
}
}
} else if (troopsKe2 >= 81) {
troopsKe2 = 51;
}
}
} 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) {
if (this._x <= (_root["chara" + arrayMasuk[i]]._x + this.garak)) {
this.ztarget = arrayMasuk[i];
}
} else if (this._x <= (_root["chara" + arrayMasuk[i]]._x + this.garak)) {
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));
}
} 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) {
if (_root["chara" + i].live > 0) {
_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 + 250)) {
this._x = benteng1._x - 250;
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 - 50)) {
if (this.lewatSaja == false) {
if (this.live > 0) {
this.speed = 0;
this.gotoAndStop(2);
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) {
if (this._x <= (_root["chara" + arrayMasuk[i]]._x + this.garak)) {
this.ztarget = arrayMasuk[i];
}
} else if (this._x <= (_root["chara" + arrayMasuk[i]]._x + this.garak)) {
this.ztarget = arrayMasuk[i];
}
}
}
}
}
i++;
}
}
}
} 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) {
if (_root["chara" + i].live > 0) {
_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(3);
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;
if (indi.penjaga == true) {
granat.qtarget = _root["chara" + indi.ztarget];
granat.speed = 15;
granat.onEnterFrame = enterGranat2;
} else {
granat.onEnterFrame = enterGranat;
}
efekKe++;
if (efekKe >= 50) {
efekKe = 1;
}
indi.xdalamEfek++;
if (indi.xdalamEfek >= 4) {
indi.xdalamEfek = 1;
}
}
}
function enterGranat2() {
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 = enterGranat;
} else if (Math.sqrt((deltaX * deltaX) + (deltaY * deltaY)) > this.speed) {
this.speed = this.speed + 5;
this._y = this._y - (this.speed * Math.cos(angle * (Math.PI/180)));
this._x = this._x + (this.speed * Math.sin(angle * (Math.PI/180)));
} else 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 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;
} 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;
} 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 = enterMortar2;
}
efekKe++;
if (efekKe >= 50) {
efekKe = 1;
}
indi.xdalamEfek++;
if (indi.xdalamEfek >= 4) {
indi.xdalamEfek = 1;
}
}
}
function cekLaser(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") {
mortar = attachMovie("laser_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 {
mortar = attachMovie("laser_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;
} 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;
} 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 = enterMortar2;
}
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 <= 1) {
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(15);
} else {
bomb.batasBawah = ((indi._y + 100) + 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) {
if ((this.tipe == "jagoan") && (_root["chara" + arrayMasuk[i]].tipe == "musuh")) {
_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 ((this.tipe == "musuh") && (_root["chara" + arrayMasuk[i]].tipe == "jagoan")) {
_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) {
if ((this.tipe == "jagoan") && (_root["chara" + arrayMasuk[i]].tipe == "musuh")) {
_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 ((this.tipe == "musuh") && (_root["chara" + arrayMasuk[i]].tipe == "jagoan")) {
_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) {
if ((_root["chara" + indi.ztarget].benteng == true) && (tipeMaen == "pantai1")) {
_root["chara" + indi.ztarget].ztarget = undefined;
indi.jarak = 99999 /* 0x01869F */;
} else {
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, 19);
}
efekLangsung = false;
} else if (indi2 == 99) {
cekLaser(indi, indi.jenis);
}
} 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) {
if (_root["chara" + indi.ztarget].jenisPasukan == "craft") {
if (_root["chara" + indi.ztarget].jenis >= 15) {
_root["chara" + indi.ztarget].live = _root["chara" + indi.ztarget].live - (indi.damage * 0.25);
} else {
_root["chara" + indi.ztarget].live = _root["chara" + indi.ztarget].live - (indi.damage * 0.5);
}
} else {
_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) {
if (this._x >= (_root["chara" + arrayMasuk[i]]._x - this.garak)) {
this.ztarget = arrayMasuk[i];
}
} else if (this._x >= (_root["chara" + arrayMasuk[i]]._x - this.garak)) {
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));
}
} 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].benteng == 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 - 250)) {
if (this.live > 0) {
this._x = benteng2._x + 250;
jmlPasukan--;
cekHarga(this.jenis);
naekUang = Math.ceil(hargaKe * naikHarga);
if (isNaN(naekUang)) {
naekUang = 1000;
}
money1 = money1 + naekUang;
}
}
} else if (this._x <= (benteng1._x - 500)) {
if (this.live > 0) {
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 + 50)) {
if (this.lewatSaja == false) {
if (this.live > 0) {
this.speed = 0;
this.gotoAndStop(2);
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) {
if (this._x >= (_root["chara" + arrayMasuk[i]]._x - this.garak)) {
this.ztarget = arrayMasuk[i];
}
} else if (this._x >= (_root["chara" + arrayMasuk[i]]._x - this.garak)) {
this.ztarget = arrayMasuk[i];
}
}
}
}
}
i++;
}
}
}
}
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 = "Enemy 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 = "Your 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;
if (berapaSerangan >= 1) {
berapaSerangan++;
if (berapaSerangan == 3) {
win_mc.gotoAndStop(1);
} else if (berapaSerangan == 2) {
win_mc.gotoAndStop(2);
}
} else {
win_mc.gotoAndStop(1);
}
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 <= 5) {
selisihx = 5;
}
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) + ((1000 * (levelSkill[15] - 1)) + 500);
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();
if (jenisMaenan == "campaign") {
if (jenisCampaign == 1) {
if (xlevel >= 46) {
} else if (xlevel >= 16) {
}
} else if (jenisCampaign == 2) {
if (xlevel >= 46) {
} else if (xlevel >= 16) {
}
} else if (jenisCampaign == 3) {
if (xlevel >= 46) {
} else if (xlevel >= 16) {
}
}
if (xlevel > 2) {
i = 1;
while (i <= 58) {
_root["a72x" + i] = String("i2x" + i);
Cookies = SharedObject.getLocal(_root["a72x" + i], "/");
Cookies.data["ii2x" + 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;
}
}
selesaiCampen = false;
win_mc.play_btn.onRelease = function () {
clearSemua();
if (jenisMaenan == "campaign") {
if (selesaiCampen == true) {
_quality = "HIGH";
qualityGame = 1;
gotoAndStop (440);
} else {
if (jenisPeperangan == "serang") {
if (tipeYgDiserang == "territory") {
powerNegara[sedangTuju] = powerNegara[sedangTuju] - Math.ceil(3 + (xlevel / 8));
if (powerNegara[sedangTuju] <= 3) {
milikNegara[sedangTuju] = sedangJalan;
sementaraPower = powerNegara[sedangTuju];
powerNegara[sedangTuju] = Math.ceil((sementaraPower + powerNegara[sedangJalan]) / 2);
}
if (powerNegara[sedangTuju] <= 1) {
powerNegara[sedangTuju] = 1;
}
} else if (berapaSerangan == 3) {
milikNegara[sedangTuju] = sedangJalan;
sementaraPower = powerNegara[sedangTuju];
powerNegara[sedangTuju] = Math.ceil((sementaraPower + powerNegara[sedangJalan]) / 2);
berapaSerangan = 0;
}
}
kondisiLoad = "game";
jenisMaen = "game";
if (berapaSerangan == 2) {
_quality = "HIGH";
qualityGame = 1;
backMenu();
gotoAndStop (429);
} else {
kiraNyerang--;
_quality = "HIGH";
qualityGame = 1;
backMusic();
gotoAndStop (419);
}
}
} else {
_quality = "HIGH";
qualityGame = 1;
backMenu();
gotoAndStop (392);
}
};
}
}
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 <= 58) {
_root["a72x" + i] = String("i2x" + i);
Cookies = SharedObject.getLocal(_root["a72x" + i], "/");
Cookies.data["ii2x" + 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;
persenx = Math.ceil((frame_mc.base1 / totIstana1) * 100);
if (selisihx <= 5) {
selisihx = 5;
}
if (cekSurender == true) {
lose_mc.xmoney = Math.ceil(xlevel * 25) + (1500 * (levelSkill[14] - 1));
lose_mc.xexp = Math.ceil(50 * xlevel) + (500 * (levelSkill[15] - 1));
} else {
selisihx = unitMati1 - unitMati2;
if (selisihx <= 1) {
selisihx = 1;
}
lose_mc.xmoney = Math.ceil(xlevel * 50) + (1500 * (levelSkill[14] - 1));
lose_mc.xexp = Math.ceil(100 * xlevel) + (500 * (levelSkill[15] - 1));
}
if (tipeGameLife == "Unlimited") {
if (cekSurender == true) {
lose_mc.xmoney = 0;
lose_mc.xexp = 0;
}
}
money1 = money1 + Math.ceil(lose_mc.xmoney);
xexp = xexp + Math.ceil(lose_mc.xexp);
xlevel++;
perfectSemua = 0;
cekMedali1();
if (tipeGameLife == "Limited") {
nyawaGame--;
}
if (nyawaGame <= 0) {
}
selesaiCampen = false;
pernahKalah = true;
if (jenisMaenan == "campaign") {
i = 1;
while (i <= 6) {
_root["a72x" + i] = String("i2x" + i);
Cookies = SharedObject.getLocal(_root["a72x" + i], "/");
Cookies.data["ii2x" + 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;
}
lose_mc.play_btn.onRelease = function () {
clearSemua();
if (jenisMaenan == "campaign") {
if (nyawaGame <= 0) {
_quality = "HIGH";
qualityGame = 1;
gotoAndStop (442);
} else {
if (jenisPeperangan == "tahan") {
if (tipeYgDiserang == "territory") {
powerNegara[zposisiDiserang] = powerNegara[zposisiDiserang] - Math.ceil(3 + (xlevel / 8));
if (powerNegara[zposisiDiserang] <= 3) {
milikNegara[zposisiDiserang] = zlawanMenyerang;
sementaraPower = powerNegara[zposisiDiserang];
powerNegara[zposisiDiserang] = Math.ceil((sementaraPower + powerNegara[zlawanMenyerang]) / 2);
}
if (powerNegara[zposisiDiserang] <= 1) {
powerNegara[zposisiDiserang] = 1;
}
} else {
milikNegara[zposisiDiserang] = zlawanMenyerang;
sementaraPower = powerNegara[zposisiDiserang];
powerNegara[zposisiDiserang] = Math.ceil((sementaraPower + powerNegara[zlawanMenyerang]) / 2);
}
}
kondisiLoad = "game";
jenisMaen = "game";
backMusic();
kiraNyerang--;
_quality = "HIGH";
qualityGame = 1;
gotoAndStop (419);
}
} else {
_quality = "HIGH";
qualityGame = 1;
backMenu();
gotoAndStop (392);
}
};
}
}
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(idMajuMundur);
clearInterval(idMajuMundur2);
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);
removeMovieClip(aircraft);
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++;
}
}
} else if (indi == 3) {
if (back._x < 0) {
geserBerapa = back._x + 400;
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 (back._x > -800) {
geserBerapa = -400 - 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();
if (powerJagoan == undefined) {
powerJagoan = 20;
}
if (powerMusuh == undefined) {
powerMusuh = 10;
}
if (jenisMaenan == "single") {
if (tipeSulitSingle == 1) {
powerJagoan = 50;
powerMusuh = 10;
} else if (tipeSulitSingle == 2) {
powerJagoan = 30;
powerMusuh = 10;
} else if (tipeSulitSingle == 3) {
powerJagoan = 10;
powerMusuh = 10;
} else if (tipeSulitSingle == 4) {
powerJagoan = 10;
powerMusuh = 20;
}
}
if (jenisPerang == "darat") {
if (pilihanMap == 12) {
backMain();
} else {
backInfantry();
}
} else if (jenisPerang == "laut") {
backNavy();
} else if (jenisPerang == "udara") {
backAirForce();
}
if ((jenisMaenan == "single") && (tipeMaen2 == "")) {
semuaPasukan = 121;
} else if ((((tipeMaen2 == "artillery") || (tipeMaen2 == "infanarti")) || (tipeMaen2 == "artiair")) || (tipeMaen2 == "navyair")) {
if (jenisCampaign == 1) {
semuaPasukan = 44;
} else if (jenisCampaign == 2) {
semuaPasukan = 34;
} else if (jenisCampaign == 3) {
semuaPasukan = 38;
}
} else if (tipeMaen2 == "navy") {
if (jenisCampaign == 1) {
semuaPasukan = 61;
}
} else {
if (jenisCampaign == 1) {
semuaPasukan = 53;
} else if (jenisCampaign == 2) {
semuaPasukan = 49;
} else if (jenisCampaign == 3) {
semuaPasukan = 57;
}
semuaPasukan = 81;
}
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 = "Your Unit: " + jmlPasukan;
frame_mc.unit2 = "Enemy Unit: " + jmlPasukan2;
frame_mc.militari1 = "Military Power : " + powerJagoan;
frame_mc.militari2 = "Military Power : " + powerMusuh;
if (sudahSelesai == false) {
if (jmlPasukan <= 0) {
if (jenisPeperangan == "tahan") {
cekLese("Your Unit run out, enemy destroyed your area!");
} else {
cekLese("Your Unit run out, mission failed!");
}
cekLose();
} else if (jmlPasukan2 <= 0) {
cekLese("Enemy Unit run out, 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++;
}
}
}
if (jmlPasukan2 <= 3) {
if (delayMajuMundur == undefined) {
delayMajuMundur = true;
clearInterval(idMajuMundur);
idMajuMundur = setInterval(majuMundur, 10000);
}
}
if (jmlPasukan1 <= 3) {
if (delayMajuMundur2 == undefined) {
delayMajuMundur2 = true;
clearInterval(idMajuMundur2);
idMajuMundur2 = setInterval(majuMundur2, 10000);
}
}
}
};
delayMajuMundur = undefined;
delayMajuMundur2 = undefined;
init();
buatBack();
if (tipeGame == "game") {
buatFrame();
} else {
buatFrame2();
}
buatBenteng();
if ((jenisMaenan == "single") && (tipeMaen2 == "")) {
troopsKe1 = 20;
troopsKe2 = 71;
bykBuatChara = 50;
bykBuatChara2 = 50;
} else if ((((tipeMaen2 == "artillery") || (tipeMaen2 == "infanarti")) || (tipeMaen2 == "artiair")) || (tipeMaen2 == "navyair")) {
if (jenisCampaign == 1) {
bykBuatChara = 12;
bykBuatChara2 = 12;
troopsKe1 = 22;
troopsKe2 = 34;
} else if (jenisCampaign == 2) {
bykBuatChara = 6;
bykBuatChara2 = 8;
troopsKe1 = 20;
troopsKe2 = 26;
} else if (jenisCampaign == 3) {
bykBuatChara = 10;
bykBuatChara2 = 8;
troopsKe1 = 20;
troopsKe2 = 30;
}
} else if (tipeMaen2 == "navy") {
troopsKe1 = 20;
troopsKe2 = 41;
bykBuatChara = 20;
bykBuatChara2 = 20;
} else {
if (jenisCampaign == 1) {
bykBuatChara = 16;
bykBuatChara2 = 16;
troopsKe1 = 20;
troopsKe2 = 37;
} else if (jenisCampaign == 2) {
bykBuatChara = 12;
bykBuatChara2 = 16;
troopsKe1 = 20;
troopsKe2 = 33;
} else if (jenisCampaign == 3) {
bykBuatChara = 20;
bykBuatChara2 = 16;
troopsKe1 = 20;
troopsKe2 = 41;
}
troopsKe1 = 20;
troopsKe2 = 51;
bykBuatChara = 30;
bykBuatChara2 = 30;
}
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) || (Key.getCode() == 89)) {
moveCastle(0);
}
if (Key.getCode() == 67) {
moveCastle(2);
}
if (Key.getCode() == 88) {
moveCastle(3);
}
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 428
stop();
gotoAndStop(_root._currentframe - 1 +423);
Frame 429
zzrand = random(3);
if (zzrand == 0) {
tipeMaen2 = "";
} else if (zzrand == 1) {
tipeMaen2 = "infantry";
} else if (zzrand == 2) {
tipeMaen2 = "artillery";
}
jenisPerang = "darat";
jenisPerang2 = "";
xbgGame = 12;
jenisBack = xbgGame;
gotoAndStop (424);
Frame 430
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);
zzslot[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;
zzslot[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 <= 58) {
_root["a72x" + i] = String("i2x" + i);
Cookies = SharedObject.getLocal(_root["a72x" + i], "/");
Cookies.data["ii2x" + i] = _root["medals" + i];
Cookies.flush(10);
i++;
}
}
stop();
cekLevelan();
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));
if (jenisCampaign == 1) {
nyawaIstanax = 1 * (4000 + (35000 * (levelSkill[2] - 1)));
} else if (jenisCampaign == 2) {
nyawaIstanax = 1 * (6000 + (40000 * (levelSkill[2] - 1)));
} else if (jenisCampaign == 3) {
nyawaIstanax = 1 * (2000 + (30000 * (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;
}
skill_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 (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 = 1;
while (i <= 58) {
_root["a72x" + i] = String("i2x" + i);
Cookies = SharedObject.getLocal(_root["a72x" + i], "/");
Cookies.data["ii2x" + i] = _root["medals" + i];
Cookies.flush(10);
i++;
}
dariMana = "setup";
removeMovieClip(infoBox);
gotoAndStop (432);
} 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;
};
}
};
statistic_btn.onRelease = function () {
dariMana = "setup";
removeMovieClip(infoBox);
gotoAndStop (434);
};
achievements_btn.onRelease = function () {
bisaSemua();
dariMana = "setup";
i = 1;
while (i <= 58) {
_root["a72x" + i] = String("i2x" + i);
Cookies = SharedObject.getLocal(_root["a72x" + i], "/");
Cookies.data["ii2x" + i] = _root["medals" + i];
Cookies.flush(10);
i++;
}
removeMovieClip(infoBox);
gotoAndStop (438);
};
medals_btn.onRelease = function () {
bisaSemua();
dariMana = "setup";
i = 1;
while (i <= 58) {
_root["a72x" + i] = String("i2x" + i);
Cookies = SharedObject.getLocal(_root["a72x" + i], "/");
Cookies.data["ii2x" + i] = _root["medals" + i];
Cookies.flush(10);
i++;
}
removeMovieClip(infoBox);
gotoAndStop (436);
};
map_btn.onRelease = function () {
removeMovieClip(infoBox);
gotoAndStop (419);
};
i = 1;
while (i <= 30) {
_root["kotak" + i].gembok_mc._visible = false;
_root["kotak" + i].gotoAndStop(zzslot[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 < 13) {
tutorial_mc2.gotoAndStop(tutorial_mc2._currentframe + 1);
} else {
tutorialSetupSelesai();
tutorialSetup = true;
_root.medals2 = 1;
i = 1;
while (i <= 2) {
_root["a72x" + i] = String("i2x" + i);
Cookies = SharedObject.getLocal(_root["a72x" + i], "/");
Cookies.data["ii2x" + i] = _root["medals" + i];
Cookies.flush(10);
i++;
}
}
};
} else {
tutorialSetupSelesai();
}
bisaSemua();
Frame 431
stop();
_root.gotoAndStop(_root._currentframe - 1);
Frame 432
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] * levelSkill[indi])) && (xlevel >= skillLevel[indi])) {
if (levelSkill[indi] < skillMaxLevel[indi]) {
xexp = xexp - (skillExp[indi] * levelSkill[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] * levelSkill[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 (419);
};
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, 3, 5, 7, 9, 11, 2, 4, 6, 8, 10, 12, 14, 12, 14);
skillMaxLevel = new Array("", 16, 15, 3, 3, 16, 16, 4, 4, 4, 4, 4, 4, 4, 10, 10);
} else if (jenisCampaign == 2) {
skillLevel = new Array("", 1, 3, 5, 7, 9, 11, 2, 4, 6, 8, 10, 12, 14, 12, 14);
skillMaxLevel = new Array("", 16, 15, 3, 3, 18, 18, 4, 4, 4, 4, 4, 4, 4, 10, 10);
} else {
skillLevel = new Array("", 1, 3, 5, 7, 9, 11, 2, 4, 6, 8, 10, 12, 14, 12, 14);
skillMaxLevel = new Array("", 16, 15, 3, 3, 20, 20, 4, 4, 4, 4, 4, 4, 4, 10, 10);
}
cekSemuaLevel();
Frame 433
stop();
_root.gotoAndStop(_root._currentframe - 1);
Frame 434
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 (430);
};
msgBox_mc2.no_btn.onRelease = function () {
msgBox_mc2._visible = false;
};
};
back_btn.onRelease = function () {
if (dariMana == "setup") {
gotoAndStop (430);
} else if (dariMana == "main") {
gotoAndStop (392);
}
};
Frame 435
stop();
_root.gotoAndStop(_root._currentframe - 1);
Frame 436
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 (430);
} else if (dariMana == "main") {
gotoAndStop (392);
}
};
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 ", "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.", "Conquer 5 areas in world domination.", "Conquer 7 areas in world domination.", "Conquer 9 areas in world domination.", "Conquer 11 areas in world domination.", "Conquer 13 areas in world domination.", "Conquer 15 areas in world domination.", "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.", "Conquer 17 areas in world domination.", "Conquer 19 areas in world domination.", "Conquer 21 areas in world domination.", "Win all campaign modes with no losses.", "Conquer 5 areas in world domination with no losses.", "Conquer 8 areas in world domination with no losses.", "Conquer 11 areas in world domination with no losses.", "Conquer 14 areas in world domination with no losses.", "Conquer 17 areas in world domination with no losses.", "Conquer 21 areas in world domination with no losses.");
i = 1;
while (i <= 58) {
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 437
stop();
_root.gotoAndStop(_root._currentframe - 1);
Frame 438
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 (430);
} else if (dariMana == "main") {
gotoAndStop (392);
}
};
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", "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.", "Conquer 5 areas in world domination.", "Conquer 7 areas in world domination.", "Conquer 9 areas in world domination.", "Conquer 11 areas in world domination.", "Conquer 13 areas in world domination.", "Conquer 15 areas in world domination.", "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.", "Conquer 17 areas in world domination.", "Conquer 19 areas in world domination.", "Conquer 21 areas in world domination.", "Win all campaign modes with no losses.");
i = 1;
while (i <= 58) {
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 439
stop();
_root.gotoAndStop(_root._currentframe - 1);
Frame 440
function cekMedaliDapat() {
if (jenisCampaign == 1) {
campaignWin1 = 1;
}
if (jenisCampaign == 2) {
campaignWin2 = 1;
}
if (jenisCampaign == 3) {
campaignWin3 = 1;
}
if (((campaignWin1 == 1) && (campaignWin2 == 1)) && (campaignWin3 == 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) {
}
if (menangTerus2 == 1) {
}
if (menangTerus3 == 1) {
}
if (((_root.medals44 == 1) && (_root.medals45 == 1)) && (_root.medals46 == 1)) {
}
i = 1;
while (i <= 57) {
_root["a72x" + i] = String("i" + i);
Cookies = SharedObject.getLocal(_root["a72x" + i], "/");
Cookies.data["ii2x" + i] = _root["medals" + i];
Cookies.flush(10);
i++;
}
}
stop();
bgData2 = undefined;
xlevel = 1;
simpanData();
back_btn.onRelease = function () {
removeMovieClip(infoBox);
backMenu();
gotoAndStop (392);
simpanData();
};
logo_mc.onRelease = function () {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1511&subid=wingame", "_blank");
};
Frame 441
stop();
_root.gotoAndStop(_root._currentframe - 1);
Frame 442
stop();
bgData2 = undefined;
xlevel = 1;
simpanData();
back_btn.onRelease = function () {
simpanData();
removeMovieClip(infoBox);
backMenu();
gotoAndStop (392);
};
logo_mc.onRelease = function () {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1511&subid=losegame", "_blank");
};
Frame 443
stop();
_root.gotoAndStop(_root._currentframe - 1);
Symbol 7 MovieClip Frame 1
stop();
Symbol 19 Button
on (release) {
gameid = "FL090909";
getURL ("http://belugerinstudios.com/data/counter.php?gameid=" + gameid, "_blank");
}
Symbol 27 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Symbol 102 MovieClip Frame 40
stop();
Symbol 103 MovieClip Frame 1
stop();
Symbol 103 MovieClip Frame 2
stop();
_root.backLedak();
_root.backLedak();
Symbol 130 MovieClip Frame 1
stop();
Symbol 134 MovieClip Frame 1
stop();
Symbol 138 MovieClip Frame 1
stop();
Symbol 142 MovieClip Frame 1
stop();
Symbol 146 MovieClip Frame 1
stop();
Symbol 150 MovieClip Frame 1
stop();
Symbol 156 MovieClip Frame 1
stop();
Symbol 160 MovieClip Frame 1
stop();
Symbol 164 MovieClip Frame 1
stop();
Symbol 189 MovieClip Frame 1
stop();
Symbol 189 MovieClip Frame 2
play();
Symbol 190 MovieClip Frame 1
stop();
Symbol 218 MovieClip Frame 1
stop();
Symbol 218 MovieClip Frame 300
_root.cekComplete(this);
Symbol 222 MovieClip Frame 1
stop();
Symbol 222 MovieClip Frame 240
_root.cekComplete(this);
Symbol 225 MovieClip Frame 1
stop();
Symbol 225 MovieClip Frame 180
_root.cekComplete(this);
Symbol 229 MovieClip Frame 1
stop();
Symbol 229 MovieClip Frame 180
_root.cekComplete(this);
Symbol 232 MovieClip Frame 1
stop();
Symbol 232 MovieClip Frame 150
_root.cekComplete(this);
Symbol 241 MovieClip Frame 1
stop();
Symbol 241 MovieClip Frame 150
_root.cekComplete(this);
Symbol 244 MovieClip Frame 1
stop();
Symbol 244 MovieClip Frame 135
_root.cekComplete(this);
Symbol 249 MovieClip Frame 1
stop();
Symbol 249 MovieClip Frame 120
_root.cekComplete(this);
if (this.sudahJadi == true) {
this.stop();
} else {
this.play();
}
Symbol 252 MovieClip Frame 1
stop();
Symbol 252 MovieClip Frame 120
_root.cekComplete(this);
if (this.sudahJadi == true) {
this.stop();
} else {
this.play();
}
Symbol 281 MovieClip Frame 1
stop();
Symbol 281 MovieClip Frame 600
_root.cekComplete(this);
Symbol 302 MovieClip Frame 1
stop();
Symbol 302 MovieClip Frame 480
_root.cekComplete(this);
Symbol 318 MovieClip Frame 1
stop();
Symbol 318 MovieClip Frame 360
_root.cekComplete(this);
Symbol 324 MovieClip Frame 1
stop();
Symbol 324 MovieClip Frame 300
_root.cekComplete(this);
Symbol 327 MovieClip Frame 1
stop();
Symbol 327 MovieClip Frame 240
_root.cekComplete(this);
Symbol 335 MovieClip Frame 1
stop();
Symbol 335 MovieClip Frame 240
_root.cekComplete(this);
Symbol 339 MovieClip Frame 1
stop();
Symbol 339 MovieClip Frame 240
_root.cekComplete(this);
Symbol 342 MovieClip Frame 1
stop();
Symbol 342 MovieClip Frame 180
_root.cekComplete(this);
if (this.sudahJadi == true) {
this.stop();
} else {
this.play();
}
Symbol 353 MovieClip Frame 1
stop();
Symbol 353 MovieClip Frame 600
_root.cekComplete(this);
Symbol 356 MovieClip Frame 1
stop();
Symbol 356 MovieClip Frame 540
_root.cekComplete(this);
Symbol 359 MovieClip Frame 1
stop();
Symbol 359 MovieClip Frame 500
_root.cekComplete(this);
Symbol 362 MovieClip Frame 1
stop();
Symbol 362 MovieClip Frame 400
_root.cekComplete(this);
Symbol 365 MovieClip Frame 1
stop();
Symbol 365 MovieClip Frame 360
_root.cekComplete(this);
Symbol 369 MovieClip Frame 1
stop();
Symbol 369 MovieClip Frame 480
_root.cekComplete(this);
Symbol 373 MovieClip Frame 1
stop();
Symbol 373 MovieClip Frame 360
_root.cekComplete(this);
Symbol 376 MovieClip Frame 1
stop();
Symbol 376 MovieClip Frame 720
_root.cekComplete(this);
Symbol 384 MovieClip Frame 1
stop();
Symbol 384 MovieClip Frame 500
_root.cekComplete(this);
Symbol 387 MovieClip Frame 1
stop();
Symbol 387 MovieClip Frame 400
_root.cekComplete(this);
Symbol 391 MovieClip Frame 1
stop();
Symbol 391 MovieClip Frame 360
_root.cekComplete(this);
Symbol 394 MovieClip Frame 1
stop();
Symbol 394 MovieClip Frame 480
_root.cekComplete(this);
Symbol 397 MovieClip Frame 1
stop();
Symbol 397 MovieClip Frame 360
_root.cekComplete(this);
Symbol 403 MovieClip Frame 1
stop();
Symbol 403 MovieClip Frame 300
_root.cekComplete(this);
stop();
Symbol 406 MovieClip Frame 1
stop();
Symbol 406 MovieClip Frame 250
_root.cekComplete(this);
stop();
Symbol 409 MovieClip Frame 1
stop();
Symbol 409 MovieClip Frame 200
_root.cekComplete(this);
stop();
Symbol 424 MovieClip Frame 1
stop();
Symbol 424 MovieClip Frame 360
_root.cekComplete(this);
stop();
Symbol 427 MovieClip Frame 1
stop();
Symbol 427 MovieClip Frame 275
_root.cekComplete(this);
stop();
Symbol 430 MovieClip Frame 1
stop();
Symbol 430 MovieClip Frame 250
_root.cekComplete(this);
stop();
Symbol 441 MovieClip Frame 1
stop();
Symbol 441 MovieClip Frame 400
_root.cekComplete(this);
stop();
Symbol 449 MovieClip Frame 1
stop();
Symbol 449 MovieClip Frame 360
_root.cekComplete(this);
stop();
Symbol 452 MovieClip Frame 1
stop();
Symbol 452 MovieClip Frame 320
_root.cekComplete(this);
stop();
Symbol 454 MovieClip Frame 1
stop();
Symbol 454 MovieClip Frame 280
_root.cekComplete(this);
stop();
Symbol 457 MovieClip Frame 1
stop();
Symbol 457 MovieClip Frame 240
_root.cekComplete(this);
stop();
Symbol 460 MovieClip Frame 1
stop();
Symbol 460 MovieClip Frame 200
_root.cekComplete(this);
stop();
Symbol 467 MovieClip Frame 1
stop();
Symbol 467 MovieClip Frame 600
_root.cekComplete(this);
stop();
Symbol 470 MovieClip Frame 1
stop();
Symbol 470 MovieClip Frame 500
_root.cekComplete(this);
stop();
Symbol 473 MovieClip Frame 1
stop();
Symbol 473 MovieClip Frame 400
_root.cekComplete(this);
stop();
Symbol 476 MovieClip Frame 1
stop();
Symbol 476 MovieClip Frame 300
_root.cekComplete(this);
stop();
Symbol 484 MovieClip Frame 1
stop();
Symbol 484 MovieClip Frame 900
_root.cekComplete(this);
Symbol 488 MovieClip Frame 1
stop();
Symbol 488 MovieClip Frame 1200
_root.cekComplete(this);
Symbol 494 MovieClip Frame 1
stop();
Symbol 494 MovieClip Frame 1000
_root.cekComplete(this);
Symbol 501 MovieClip Frame 1
stop();
Symbol 501 MovieClip Frame 800
_root.cekComplete(this);
Instance of Symbol 193 MovieClip in Symbol 502 MovieClip [frame_mc] Frame 1
on (release) {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1511&subid=playing", "_blank");
}
Symbol 593 MovieClip Frame 27
_root.cekKena(_parent);
_root.sound5();
Symbol 593 MovieClip Frame 29
_root.cekKena(_parent);
_root.sound5();
Symbol 593 MovieClip Frame 31
_root.cekKena(_parent);
_root.sound5();
Symbol 593 MovieClip Frame 33
_root.cekKena(_parent, 99);
_root.sound99();
Symbol 603 MovieClip Frame 13
stop();
Symbol 617 MovieClip Frame 15
stop();
Symbol 619 MovieClip Frame 60
stop();
removeMovieClip(_parent);
Symbol 653 MovieClip Frame 1
_root.sound3();
Symbol 653 MovieClip Frame 15
stop();
Symbol 653 MovieClip Frame 40
play();
Symbol 653 MovieClip Frame 69
_parent.melayang = false;
_parent.gotoAndStop(1);
Symbol 654 MovieClip [troops47] Frame 1
stop();
Symbol 682 MovieClip Frame 29
_root.cekKena(_parent);
_root.sound1();
Symbol 689 MovieClip Frame 12
stop();
Symbol 701 MovieClip Frame 15
stop();
Symbol 703 MovieClip Frame 60
removeMovieClip(_parent);
Symbol 704 MovieClip [troops1] Frame 1
stop();
Symbol 719 MovieClip Frame 27
_root.cekKena(_parent);
_root.sound4();
Symbol 732 MovieClip Frame 25
_root.cekKena(_parent);
_root.sound4();
Symbol 732 MovieClip Frame 45
gotoAndPlay (20);
Symbol 737 MovieClip Frame 16
stop();
_parent.gotoAndStop(1);
Symbol 739 MovieClip Frame 90
stop();
removeMovieClip(_parent);
Symbol 740 MovieClip [troops2] Frame 1
stop();
Symbol 758 MovieClip Frame 27
_root.cekKena(_parent);
_root.sound5();
Symbol 766 MovieClip Frame 25
_root.cekKena(_parent);
_root.sound5();
Symbol 766 MovieClip Frame 45
gotoAndPlay (20);
Symbol 769 MovieClip Frame 20
stop();
_parent.gotoAndStop(1);
Symbol 771 MovieClip Frame 90
stop();
removeMovieClip(_parent);
Symbol 772 MovieClip [troops5] Frame 1
stop();
Symbol 788 MovieClip Frame 20
_root.cekKena(_parent);
_root.sound3();
Symbol 789 MovieClip [troops3] Frame 1
stop();
Symbol 810 MovieClip Frame 5
stop();
Symbol 812 MovieClip Frame 22
_root.cekKena(_parent, 7);
_root.sound7();
Symbol 813 MovieClip [troops7] Frame 1
stop();
Symbol 828 MovieClip Frame 22
_root.cekKena(_parent, 9);
_root.sound8();
Symbol 829 MovieClip [troops8] Frame 1
stop();
Symbol 853 MovieClip Frame 29
_root.cekKena(_parent);
_root.sound1();
Symbol 865 MovieClip Frame 60
removeMovieClip(_parent);
Symbol 875 MovieClip [xtroops1] Frame 1
stop();
Symbol 893 MovieClip Frame 20
_root.cekKena(_parent);
_root.sound3();
Symbol 895 MovieClip [xtroops3] Frame 1
stop();
Symbol 912 MovieClip Frame 27
_root.cekKena(_parent);
_root.sound4();
Symbol 933 MovieClip Frame 28
_root.cekKena(_parent);
_root.sound4();
Symbol 933 MovieClip Frame 40
gotoAndPlay (20);
Symbol 934 MovieClip Frame 25
stop();
_parent.gotoAndStop(1);
Symbol 936 MovieClip Frame 90
stop();
removeMovieClip(_parent);
Symbol 937 MovieClip [xtroops2] Frame 1
stop();
Symbol 957 MovieClip Frame 27
_root.cekKena(_parent);
_root.sound5();
Symbol 957 MovieClip Frame 29
_root.cekKena(_parent);
_root.sound5();
Symbol 957 MovieClip Frame 31
_root.cekKena(_parent);
_root.sound5();
Symbol 966 MovieClip Frame 25
_root.cekKena(_parent);
_root.sound5();
Symbol 966 MovieClip Frame 40
gotoAndPlay (20);
Symbol 967 MovieClip Frame 25
stop();
_parent.gotoAndStop(1);
Symbol 969 MovieClip Frame 90
stop();
removeMovieClip(_parent);
Symbol 970 MovieClip [xtroops5] Frame 1
stop();
Symbol 987 MovieClip Frame 22
_root.cekKena(_parent, 7);
_root.sound8();
Symbol 989 MovieClip [xtroops7] Frame 1
stop();
Symbol 1006 MovieClip Frame 22
_root.cekKena(_parent, 8);
_root.sound9();
Symbol 1008 MovieClip [xtroops8] Frame 1
stop();
Symbol 1011 MovieClip [btroops5] Frame 1
stop();
Symbol 1020 MovieClip Frame 3
stop();
Symbol 1021 MovieClip Frame 10
_root.cekKena(_parent, 7);
_root.sound7();
Symbol 1022 MovieClip [btroops7] Frame 1
stop();
Symbol 1027 MovieClip Frame 5
stop();
Symbol 1028 MovieClip Frame 10
_root.cekKena(_parent, 9);
_root.sound8();
Symbol 1029 MovieClip [btroops8] Frame 1
stop();
Symbol 1032 MovieClip [btroopsx5] Frame 1
stop();
Symbol 1036 MovieClip Frame 10
stop();
Symbol 1037 MovieClip Frame 22
_root.cekKena(_parent, 7);
_root.sound8();
Symbol 1038 MovieClip [btroopsx7] Frame 1
stop();
Symbol 1042 MovieClip Frame 10
stop();
Symbol 1043 MovieClip Frame 22
_root.cekKena(_parent, 8);
_root.sound9();
Symbol 1044 MovieClip [btroopsx8] Frame 1
stop();
Symbol 1074 MovieClip Frame 3
_root.cekKena(_parent);
_root.sound5();
Symbol 1074 MovieClip Frame 7
_root.cekKena(_parent);
_root.sound5();
Symbol 1074 MovieClip Frame 11
_root.cekKena(_parent);
_root.sound5();
Symbol 1074 MovieClip Frame 30
_root.cekKena(_parent, 1);
_root.sound1();
Symbol 1314 MovieClip [api_mc] Frame 130
removeMovieClip(this);
Symbol 1317 MovieClip Frame 60
removeMovieClip(_parent);
Symbol 1319 MovieClip [xtroops11] Frame 1
stop();
Symbol 1334 MovieClip Frame 3
_root.cekKena(_parent);
_root.sound6();
Symbol 1334 MovieClip Frame 13
_root.cekKena(_parent);
_root.sound6();
Symbol 1334 MovieClip Frame 23
_root.cekKena(_parent);
_root.sound6();
Symbol 1334 MovieClip Frame 30
_root.cekKena(_parent, 3);
_root.sound16();
Symbol 1334 MovieClip Frame 40
_root.cekKena(_parent, 1);
_root.sound1();
Symbol 1337 MovieClip Frame 60
removeMovieClip(_parent);
Symbol 1339 MovieClip [xtroops12] Frame 1
stop();
Symbol 1342 MovieClip Frame 27
_root.cekKena(_parent._parent);
_root.sound4();
Symbol 1344 MovieClip Frame 30
_root.cekKena(_parent, 1);
Symbol 1347 MovieClip Frame 60
removeMovieClip(_parent);
Symbol 1349 MovieClip [xtroops10] Frame 1
stop();
Symbol 1357 MovieClip Frame 3
_root.cekKena(_parent);
_root.sound6();
Symbol 1357 MovieClip Frame 7
_root.cekKena(_parent);
_root.sound6();
Symbol 1357 MovieClip Frame 11
_root.cekKena(_parent);
_root.sound6();
Symbol 1357 MovieClip Frame 30
_root.cekKena(_parent, 1);
_root.sound1();
Symbol 1358 MovieClip Frame 60
removeMovieClip(_parent);
Symbol 1360 MovieClip [troops11] Frame 1
stop();
Symbol 1368 MovieClip Frame 5
_root.cekKena(_parent);
_root.sound6();
Symbol 1368 MovieClip Frame 13
_root.cekKena(_parent);
_root.sound6();
Symbol 1368 MovieClip Frame 21
_root.cekKena(_parent);
_root.sound6();
Symbol 1368 MovieClip Frame 30
_root.cekKena(_parent, 3);
_root.sound16();
Symbol 1368 MovieClip Frame 40
_root.cekKena(_parent, 1);
_root.sound1();
Symbol 1370 MovieClip Frame 60
removeMovieClip(_parent);
Symbol 1372 MovieClip [troops12] Frame 1
stop();
Symbol 1375 MovieClip Frame 27
_root.cekKena(_parent._parent);
_root.sound4();
Symbol 1376 MovieClip Frame 30
_root.cekKena(_parent, 1);
_root.sound1();
Symbol 1378 MovieClip Frame 60
removeMovieClip(_parent);
Symbol 1380 MovieClip [troops10] Frame 1
stop();
Symbol 1457 MovieClip Frame 45
removeMovieClip(_parent);
Symbol 1474 MovieClip Frame 1
stop();
Symbol 1474 MovieClip Frame 2
stop();
_root.backLedak();
_root.backLedak();
Symbol 1483 MovieClip Frame 10
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1483 MovieClip Frame 16
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1483 MovieClip Frame 22
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1488 MovieClip Frame 120
removeMovieClip(this);
Symbol 1489 MovieClip Frame 80
stop();
Symbol 1512 MovieClip Frame 102
stop();
removeMovieClip(_parent);
Symbol 1513 MovieClip Frame 1
_root.boatHancur();
Symbol 1513 MovieClip Frame 20
gotoAndPlay(this._currentframe + random(30));
Symbol 1513 MovieClip Frame 70
_root.backWater();
Symbol 1513 MovieClip Frame 181
_root.backWater();
removeMovieClip(_parent);
Symbol 1514 MovieClip [troops26] Frame 1
stop();
Symbol 1515 MovieClip [xtroops26] Frame 1
stop();
Symbol 1520 MovieClip Frame 10
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1520 MovieClip Frame 12
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1520 MovieClip Frame 16
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1520 MovieClip Frame 18
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1520 MovieClip Frame 22
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1520 MovieClip Frame 24
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1524 MovieClip Frame 55
stop();
Symbol 1525 MovieClip Frame 1
_root.boatHancur();
Symbol 1525 MovieClip Frame 20
gotoAndPlay(this._currentframe + random(30));
Symbol 1525 MovieClip Frame 70
_root.backWater();
Symbol 1525 MovieClip Frame 181
_root.backWater();
removeMovieClip(_parent);
Symbol 1526 MovieClip [troops27] Frame 1
stop();
Symbol 1527 MovieClip [xtroops27] Frame 1
stop();
Symbol 1532 MovieClip [bomb_mc] Frame 1
stop();
Symbol 1532 MovieClip [bomb_mc] Frame 2
play();
Symbol 1532 MovieClip [bomb_mc] Frame 3
stop();
removeMovieClip(this);
Symbol 1536 MovieClip [xmortir_mc] Frame 1
stop();
Symbol 1536 MovieClip [xmortir_mc] Frame 2
play();
Symbol 1536 MovieClip [xmortir_mc] Frame 3
stop();
removeMovieClip(this);
Symbol 1542 MovieClip Frame 1
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1542 MovieClip Frame 6
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1542 MovieClip Frame 11
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1542 MovieClip Frame 16
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1542 MovieClip Frame 21
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1542 MovieClip Frame 26
_root.cekKena(_parent, 9);
_root.sound9();
Symbol 1542 MovieClip Frame 31
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1542 MovieClip Frame 35
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1542 MovieClip Frame 40
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1542 MovieClip Frame 45
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1542 MovieClip Frame 50
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1548 MovieClip Frame 1
_root.backJatuhCopter();
Symbol 1548 MovieClip Frame 80
removeMovieClip(_parent);
Symbol 1550 MovieClip [troops22] Frame 1
stop();
Symbol 1552 MovieClip [xtroops22] Frame 1
stop();
Symbol 1577 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 1586 MovieClip [win_mc] Frame 1
stop();
logo_mc.onRelease = function () {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1511&subid=wingame", "_blank");
};
Symbol 1586 MovieClip [win_mc] Frame 2
stop();
logo_mc.onRelease = function () {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1511&subid=wingame", "_blank");
};
Symbol 1598 MovieClip [lose_mc] Frame 1
stop();
logo_mc.onRelease = function () {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1511&subid=losegame", "_blank");
};
Symbol 1605 MovieClip [info_box2] Frame 1
stop();
Symbol 1606 MovieClip Frame 40
removeMovieClip(_parent);
Symbol 1627 MovieClip Frame 42
stop();
Symbol 1639 MovieClip Frame 5
stop();
Symbol 1640 MovieClip Frame 15
_root.cekKena(_parent, 7);
_root.sound7();
Symbol 1641 MovieClip Frame 60
removeMovieClip(_parent);
Symbol 1642 MovieClip [btroops10] Frame 1
stop();
Symbol 1645 MovieClip Frame 15
_root.cekKena(_parent, 1);
_root.sound5();
Symbol 1645 MovieClip Frame 17
_root.cekKena(_parent, 1);
_root.sound5();
Symbol 1645 MovieClip Frame 19
_root.cekKena(_parent, 1);
_root.sound5();
Symbol 1646 MovieClip Frame 60
removeMovieClip(_parent);
Symbol 1647 MovieClip [btroops9] Frame 1
stop();
Symbol 1673 MovieClip [tutorial_mc] Frame 1
stop();
Symbol 1678 MovieClip [semburAir] Frame 1
play();
Symbol 1678 MovieClip [semburAir] Frame 100
removeMovieClip(this);
Symbol 1683 MovieClip [mortir_mc2] Frame 1
stop();
Symbol 1683 MovieClip [mortir_mc2] Frame 2
stop();
Symbol 1714 MovieClip Frame 20
_root.cekKena(_parent);
Symbol 1715 MovieClip [btroops2] Frame 1
stop();
Symbol 1718 MovieClip Frame 22
_root.cekKena(_parent);
Symbol 1719 MovieClip [btroops3] Frame 1
stop();
Symbol 1722 MovieClip Frame 20
_root.cekKena(_parent);
Symbol 1723 MovieClip [btroopsx3] Frame 1
stop();
Symbol 1726 MovieClip Frame 15
_root.cekKena(_parent);
Symbol 1727 MovieClip [btroopsx2] Frame 1
stop();
Symbol 1729 MovieClip Frame 21
stop();
Symbol 1731 MovieClip [mortir_mc] Frame 1
stop();
Symbol 1731 MovieClip [mortir_mc] Frame 2
stop();
Symbol 1737 MovieClip [pistol_mc] Frame 5
removeMovieClip(this);
Symbol 1740 MovieClip [granat_mc] Frame 1
stop();
Symbol 1740 MovieClip [granat_mc] Frame 2
play();
Symbol 1740 MovieClip [granat_mc] Frame 3
stop();
removeMovieClip(this);
Symbol 1755 MovieClip Frame 5
_root.cekKena(_parent);
_root.sound5();
Symbol 1755 MovieClip Frame 8
_root.cekKena(_parent);
_root.sound5();
Symbol 1755 MovieClip Frame 11
_root.cekKena(_parent);
_root.sound5();
Symbol 1759 MovieClip Frame 5
_root.cekKena(_parent);
Symbol 1759 MovieClip Frame 85
removeMovieClip(_parent);
Symbol 1761 MovieClip [xtroops13] Frame 1
stop();
Symbol 1768 MovieClip Frame 10
_root.cekKena(_parent);
_root.sound6();
Symbol 1768 MovieClip Frame 12
_root.cekKena(_parent);
_root.sound6();
Symbol 1768 MovieClip Frame 14
_root.cekKena(_parent);
_root.sound6();
Symbol 1768 MovieClip Frame 25
_root.cekKena(_parent);
_root.sound5();
Symbol 1768 MovieClip Frame 27
_root.cekKena(_parent);
_root.sound5();
Symbol 1768 MovieClip Frame 29
_root.cekKena(_parent);
_root.sound5();
Symbol 1772 MovieClip Frame 80
removeMovieClip(_parent);
Symbol 1774 MovieClip [xtroops14] Frame 1
stop();
Symbol 1776 MovieClip [troops13] Frame 1
stop();
Symbol 1780 MovieClip Frame 10
_root.cekKena(_parent);
_root.sound6();
Symbol 1780 MovieClip Frame 12
_root.cekKena(_parent);
_root.sound6();
Symbol 1780 MovieClip Frame 14
_root.cekKena(_parent);
_root.sound6();
Symbol 1780 MovieClip Frame 25
_root.cekKena(_parent);
_root.sound5();
Symbol 1780 MovieClip Frame 27
_root.cekKena(_parent);
_root.sound5();
Symbol 1780 MovieClip Frame 29
_root.cekKena(_parent);
_root.sound5();
Symbol 1781 MovieClip Frame 80
removeMovieClip(_parent);
Symbol 1783 MovieClip [troops14] Frame 1
stop();
Symbol 1801 MovieClip Frame 10
_root.cekKena(_parent);
_root.sound6();
Symbol 1801 MovieClip Frame 18
_root.cekKena(_parent);
_root.sound6();
Symbol 1801 MovieClip Frame 26
_root.cekKena(_parent);
_root.sound6();
Symbol 1801 MovieClip Frame 40
_root.cekKena(_parent, 9);
_root.cekKena(_parent, 9);
_root.sound17();
Symbol 1808 MovieClip Frame 80
removeMovieClip(_parent);
Symbol 1810 MovieClip [troops17] Frame 1
stop();
Symbol 1813 MovieClip Frame 10
_root.cekKena(_parent);
_root.sound6();
Symbol 1813 MovieClip Frame 18
_root.cekKena(_parent);
_root.sound6();
Symbol 1813 MovieClip Frame 26
_root.cekKena(_parent);
_root.sound6();
Symbol 1813 MovieClip Frame 40
_root.cekKena(_parent, 9);
_root.cekKena(_parent, 9);
_root.sound17();
Symbol 1814 MovieClip Frame 80
removeMovieClip(_parent);
Symbol 1817 MovieClip [xtroops17] Frame 1
stop();
Symbol 1826 MovieClip Frame 15
_root.cekKena(_parent, 9);
_root.cekKena(_parent, 9);
_root.cekKena(_parent, 9);
_root.sound15();
Symbol 1831 MovieClip Frame 65
removeMovieClip(_parent);
Symbol 1832 MovieClip [troops16] Frame 1
stop();
Symbol 1833 MovieClip [xtroops16] Frame 1
stop();
Symbol 1848 MovieClip Frame 1
_root.backHeli();
Symbol 1853 MovieClip Frame 18
_root.cekKena(_parent._parent);
_root.sound5();
Symbol 1853 MovieClip Frame 20
_root.cekKena(_parent._parent);
_root.sound5();
Symbol 1860 MovieClip Frame 1
_root.backJatuh();
Symbol 1860 MovieClip Frame 80
removeMovieClip(_parent);
Symbol 1861 MovieClip [xtroops18] Frame 1
stop();
Symbol 1863 MovieClip Frame 1
_root.backHeli();
Symbol 1866 MovieClip Frame 16
_root.cekKena(_parent._parent);
_root.sound5();
Symbol 1866 MovieClip Frame 18
_root.cekKena(_parent._parent);
_root.sound5();
Symbol 1868 MovieClip [troops18] Frame 1
stop();
Symbol 1880 MovieClip Frame 1
_root.backHeli();
Symbol 1881 MovieClip Frame 5
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1881 MovieClip Frame 11
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1881 MovieClip Frame 16
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1881 MovieClip Frame 25
_root.cekKena(_parent, 9);
_root.sound9();
Symbol 1886 MovieClip Frame 1
_root.backJatuh();
Symbol 1886 MovieClip Frame 80
removeMovieClip(_parent);
Symbol 1887 MovieClip [troops19] Frame 1
stop();
Symbol 1888 MovieClip [xtroops19] Frame 1
stop();
Symbol 1899 MovieClip Frame 15
_root.cekKena(_parent, 3);
_root.sound16();
Symbol 1904 MovieClip Frame 75
removeMovieClip(_parent);
Symbol 1905 MovieClip [xtroops15] Frame 1
stop();
Symbol 1906 MovieClip [troops15] Frame 1
stop();
Symbol 1909 MovieClip [retak_mc] Frame 250
stop();
removeMovieClip(this);
Symbol 1912 MovieClip Frame 1
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1912 MovieClip Frame 10
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1912 MovieClip Frame 20
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1912 MovieClip Frame 30
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1912 MovieClip Frame 40
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1912 MovieClip Frame 50
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1917 MovieClip Frame 1
_root.backJatuhCopter();
Symbol 1917 MovieClip Frame 80
removeMovieClip(_parent);
Symbol 1919 MovieClip Frame 1
_root.backJatuhCopter();
Symbol 1919 MovieClip Frame 120
stop();
removeMovieClip(_parent);
Symbol 1920 MovieClip [xtroops20] Frame 1
stop();
Symbol 1922 MovieClip Frame 1
_root.backJatuhCopter();
Symbol 1922 MovieClip Frame 120
stop();
removeMovieClip(_parent);
Symbol 1923 MovieClip [troops20] Frame 1
stop();
Symbol 1926 MovieClip Frame 1
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1926 MovieClip Frame 6
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1926 MovieClip Frame 11
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1926 MovieClip Frame 16
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1926 MovieClip Frame 21
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1926 MovieClip Frame 26
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1926 MovieClip Frame 31
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1926 MovieClip Frame 36
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1926 MovieClip Frame 41
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1926 MovieClip Frame 46
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1932 MovieClip Frame 1
_root.backJatuhCopter();
Symbol 1932 MovieClip Frame 80
removeMovieClip(_parent);
Symbol 1935 MovieClip Frame 1
_root.backJatuhCopter();
Symbol 1935 MovieClip Frame 110
stop();
removeMovieClip(_parent);
Symbol 1936 MovieClip [troops21] Frame 1
stop();
Symbol 1939 MovieClip Frame 1
_root.backJatuhCopter();
Symbol 1939 MovieClip Frame 110
stop();
removeMovieClip(_parent);
Symbol 1940 MovieClip [xtroops21] Frame 1
stop();
Symbol 1941 MovieClip Frame 5
_root.cekKena(_parent);
_root.sound3();
Symbol 1941 MovieClip Frame 10
_root.cekKena(_parent);
_root.sound3();
Symbol 1941 MovieClip Frame 15
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1941 MovieClip Frame 17
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1941 MovieClip Frame 19
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1941 MovieClip Frame 21
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1941 MovieClip Frame 23
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1941 MovieClip Frame 25
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1941 MovieClip Frame 27
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1941 MovieClip Frame 29
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1941 MovieClip Frame 35
_root.cekKena(_parent);
_root.sound3();
Symbol 1941 MovieClip Frame 40
_root.cekKena(_parent);
_root.sound3();
Symbol 1947 MovieClip Frame 1
_root.backJatuhCopter();
Symbol 1947 MovieClip Frame 80
removeMovieClip(_parent);
Symbol 1949 MovieClip Frame 1
_root.backJatuhCopter();
Symbol 1949 MovieClip Frame 115
stop();
removeMovieClip(_parent);
Symbol 1950 MovieClip [troops23] Frame 1
stop();
Symbol 1952 MovieClip Frame 1
_root.backJatuhCopter();
Symbol 1952 MovieClip Frame 115
stop();
removeMovieClip(_parent);
Symbol 1953 MovieClip [xtroops23] Frame 1
stop();
Symbol 1955 MovieClip Frame 5
_root.cekKena(_parent);
_root.sound3();
Symbol 1955 MovieClip Frame 8
_root.cekKena(_parent);
_root.sound3();
Symbol 1955 MovieClip Frame 11
_root.cekKena(_parent);
_root.sound3();
Symbol 1955 MovieClip Frame 14
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1955 MovieClip Frame 16
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1955 MovieClip Frame 18
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1955 MovieClip Frame 20
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1955 MovieClip Frame 22
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1955 MovieClip Frame 24
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1955 MovieClip Frame 26
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1955 MovieClip Frame 28
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 1955 MovieClip Frame 30
_root.cekKena(_parent);
_root.sound3();
Symbol 1961 MovieClip Frame 80
removeMovieClip(_parent);
Symbol 1963 MovieClip Frame 110
stop();
removeMovieClip(_parent);
Symbol 1964 MovieClip [troops24] Frame 1
stop();
Symbol 1966 MovieClip Frame 110
stop();
removeMovieClip(_parent);
Symbol 1967 MovieClip [xtroops24] Frame 1
stop();
Symbol 1987 MovieClip Frame 25
_root.cekKena(_parent);
_root.sound6();
Symbol 1987 MovieClip Frame 45
_root.cekKena(_parent);
_root.sound6();
Symbol 1987 MovieClip Frame 64
_root.cekKena(_parent);
_root.sound6();
Symbol 1987 MovieClip Frame 70
gotoAndPlay (20);
Symbol 1990 MovieClip Frame 20
stop();
_parent.gotoAndStop(1);
Symbol 1992 MovieClip Frame 90
stop();
removeMovieClip(_parent);
Symbol 1993 MovieClip [troops6] Frame 1
stop();
Symbol 2005 MovieClip Frame 20
_root.cekKena(_parent);
_root.sound9();
Symbol 2006 MovieClip [troops9] Frame 1
stop();
Symbol 2020 MovieClip Frame 20
_root.cekKena(_parent);
_root.sound9();
Symbol 2022 MovieClip [xtroops9] Frame 1
stop();
Symbol 2038 MovieClip Frame 25
_root.cekKena(_parent);
_root.sound6();
Symbol 2038 MovieClip Frame 45
_root.cekKena(_parent);
_root.sound6();
Symbol 2038 MovieClip Frame 65
_root.cekKena(_parent);
_root.sound6();
Symbol 2038 MovieClip Frame 70
gotoAndPlay (20);
Symbol 2039 MovieClip Frame 20
stop();
_parent.gotoAndStop(1);
Symbol 2041 MovieClip Frame 90
stop();
removeMovieClip(_parent);
Symbol 2042 MovieClip [xtroops6] Frame 1
stop();
Symbol 2113 MovieClip Frame 40
removeMovieClip(_parent);
Symbol 2194 MovieClip Frame 45
removeMovieClip(_parent);
Symbol 2196 MovieClip Frame 45
stop();
Symbol 2200 MovieClip Frame 10
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2200 MovieClip Frame 14
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2200 MovieClip Frame 18
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2200 MovieClip Frame 22
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2200 MovieClip Frame 45
_root.cekKena(_parent, 9);
_root.sound9();
Symbol 2211 MovieClip Frame 59
stop();
Symbol 2215 MovieClip Frame 55
stop();
Symbol 2218 MovieClip Frame 1
_root.boatHancur();
Symbol 2218 MovieClip Frame 20
gotoAndPlay(this._currentframe + random(30));
Symbol 2218 MovieClip Frame 70
_root.backWater();
Symbol 2218 MovieClip Frame 181
_root.backWater();
removeMovieClip(_parent);
Symbol 2219 MovieClip [troops28] Frame 1
stop();
Symbol 2220 MovieClip [xtroops28] Frame 1
stop();
Symbol 2228 MovieClip Frame 15
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2228 MovieClip Frame 17
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2228 MovieClip Frame 19
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2228 MovieClip Frame 21
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2228 MovieClip Frame 23
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2228 MovieClip Frame 25
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2228 MovieClip Frame 27
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2228 MovieClip Frame 29
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2228 MovieClip Frame 31
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2228 MovieClip Frame 33
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2228 MovieClip Frame 35
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2228 MovieClip Frame 37
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2228 MovieClip Frame 50
_root.cekKena(_parent, 9);
_root.sound9();
Symbol 2228 MovieClip Frame 55
_root.cekKena(_parent, 9);
_root.sound9();
Symbol 2233 MovieClip Frame 80
stop();
Symbol 2236 MovieClip Frame 1
_root.boatHancur();
Symbol 2236 MovieClip Frame 20
gotoAndPlay(this._currentframe + random(30));
Symbol 2236 MovieClip Frame 70
_root.backWater();
Symbol 2236 MovieClip Frame 180
_root.backWater();
removeMovieClip(_parent);
Symbol 2237 MovieClip [troops29] Frame 1
stop();
Symbol 2238 MovieClip [xtroops29] Frame 1
stop();
Symbol 2242 MovieClip Frame 1
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2242 MovieClip Frame 3
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2242 MovieClip Frame 5
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2242 MovieClip Frame 7
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2242 MovieClip Frame 9
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2242 MovieClip Frame 11
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2242 MovieClip Frame 13
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2242 MovieClip Frame 15
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2242 MovieClip Frame 17
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2242 MovieClip Frame 19
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2242 MovieClip Frame 21
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2242 MovieClip Frame 23
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2242 MovieClip Frame 25
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2242 MovieClip Frame 27
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2242 MovieClip Frame 30
_root.cekKena(_parent, 9);
_root.sound9();
Symbol 2242 MovieClip Frame 40
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2242 MovieClip Frame 42
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2242 MovieClip Frame 44
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2242 MovieClip Frame 46
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2242 MovieClip Frame 48
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2242 MovieClip Frame 50
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2242 MovieClip Frame 52
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2242 MovieClip Frame 54
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2247 MovieClip Frame 90
stop();
Symbol 2250 MovieClip Frame 180
removeMovieClip(_parent);
Symbol 2251 MovieClip [troops30] Frame 1
stop();
Symbol 2252 MovieClip [xtroops30] Frame 1
stop();
Symbol 2265 MovieClip Frame 4
_root.cekKena(_parent);
_root.sound3();
Symbol 2265 MovieClip Frame 8
_root.cekKena(_parent, 9);
_root.sound9();
Symbol 2265 MovieClip Frame 12
_root.cekKena(_parent);
_root.sound3();
Symbol 2265 MovieClip Frame 15
_root.cekKena(_parent);
_root.sound3();
Symbol 2265 MovieClip Frame 20
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2265 MovieClip Frame 22
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2265 MovieClip Frame 24
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2265 MovieClip Frame 26
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2265 MovieClip Frame 28
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2265 MovieClip Frame 30
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2265 MovieClip Frame 32
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2265 MovieClip Frame 34
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2265 MovieClip Frame 37
_root.cekKena(_parent);
_root.sound3();
Symbol 2271 MovieClip Frame 80
removeMovieClip(_parent);
Symbol 2272 MovieClip [troops25] Frame 1
stop();
Symbol 2273 MovieClip [xtroops25] Frame 1
stop();
Symbol 2283 MovieClip [info_box3] Frame 1
stop();
Symbol 2304 MovieClip Frame 23
removeMovieClip(_parent);
Symbol 2305 MovieClip Frame 45
stop();
Symbol 2318 MovieClip [btroopsx9] Frame 1
stop();
Symbol 2322 MovieClip Frame 5
stop();
Symbol 2323 MovieClip Frame 15
_root.cekKena(_parent, 7);
_root.sound7();
Symbol 2324 MovieClip [btroopsx10] Frame 1
stop();
Symbol 2328 MovieClip Frame 5
stop();
Symbol 2329 MovieClip Frame 15
_root.cekKena(_parent, 9);
_root.sound9();
Symbol 2330 MovieClip Frame 60
removeMovieClip(_parent);
Symbol 2331 MovieClip [btroopsx11] Frame 1
stop();
Symbol 2333 MovieClip Frame 5
stop();
Symbol 2334 MovieClip Frame 15
_root.cekKena(_parent, 9);
_root.sound9();
Symbol 2335 MovieClip [btroops11] Frame 1
stop();
Symbol 2366 MovieClip Frame 31
_root.cekKena(_parent);
_root.sound8();
Symbol 2366 MovieClip Frame 60
gotoAndPlay (25);
Symbol 2368 MovieClip Frame 15
stop();
_parent.gotoAndStop(1);
Symbol 2369 MovieClip [troops4] Frame 1
stop();
Symbol 2397 MovieClip Frame 31
_root.cekKena(_parent);
_root.sound8();
Symbol 2397 MovieClip Frame 60
gotoAndPlay (25);
Symbol 2400 MovieClip Frame 15
stop();
_parent.gotoAndStop(1);
Symbol 2401 MovieClip [xtroops4] Frame 1
stop();
Symbol 2408 Button
on (press) {
gotoAndStop (1);
}
Symbol 2412 MovieClip Frame 1
stop();
Symbol 2429 MovieClip Frame 1
stop();
Symbol 2430 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 2453 MovieClip [tutorial_mc2] Frame 1
stop();
Symbol 2455 MovieClip Frame 21
stop();
Symbol 2456 MovieClip [misil1] Frame 1
stop();
Symbol 2456 MovieClip [misil1] Frame 2
stop();
Symbol 2458 MovieClip [misil2] Frame 1
stop();
Symbol 2458 MovieClip [misil2] Frame 2
stop();
Symbol 2460 MovieClip [misil3] Frame 1
stop();
Symbol 2460 MovieClip [misil3] Frame 2
stop();
Symbol 2462 MovieClip [misil4] Frame 1
stop();
Symbol 2462 MovieClip [misil4] Frame 2
stop();
Symbol 2496 MovieClip Frame 5
_root.cekKena(_parent);
_root.sound6();
Symbol 2496 MovieClip Frame 9
_root.cekKena(_parent);
_root.sound6();
Symbol 2496 MovieClip Frame 13
_root.cekKena(_parent);
_root.sound6();
Symbol 2496 MovieClip Frame 17
_root.cekKena(_parent);
_root.sound6();
Symbol 2496 MovieClip Frame 21
_root.cekKena(_parent);
_root.sound6();
Symbol 2496 MovieClip Frame 30
_root.cekKena(_parent, 9);
_root.cekKena(_parent, 9);
_root.sound17();
_root.sound17();
Symbol 2496 MovieClip Frame 35
_root.cekKena(_parent, 99);
_root.sound99();
Symbol 2502 MovieClip Frame 30
_root.cekKena(_parent, 9);
_root.cekKena(_parent, 9);
_root.sound17();
Symbol 2502 MovieClip Frame 75
stop();
removeMovieClip(_parent);
Symbol 2503 MovieClip [troops48] Frame 1
stop();
Symbol 2517 MovieClip Frame 6
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2517 MovieClip Frame 10
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2517 MovieClip Frame 15
_root.cekKena(_parent, 99);
_root.sound99();
Symbol 2520 MovieClip Frame 80
stop();
removeMovieClip(_parent);
Symbol 2521 MovieClip [troops49] Frame 1
stop();
Symbol 2537 MovieClip Frame 10
_root.cekKena(_parent, 1);
_root.sound6();
Symbol 2537 MovieClip Frame 15
_root.cekKena(_parent, 99);
_root.sound99();
Symbol 2541 MovieClip Frame 80
stop();
removeMovieClip(_parent);
Symbol 2543 MovieClip [troops50] Frame 1
stop();
Symbol 2547 MovieClip [info_box6] Frame 1
stop();
Symbol 2558 MovieClip Frame 60
removeMovieClip(_parent);
Symbol 2559 MovieClip [btroops12] Frame 1
stop();
Symbol 2563 MovieClip [btroops13] Frame 1
stop();
Symbol 2568 MovieClip Frame 60
removeMovieClip(_parent);
Symbol 2569 MovieClip [btroopsx12] Frame 1
stop();
Symbol 2574 MovieClip [btroopsx13] Frame 1
stop();
Symbol 2575 MovieClip Frame 10
_root.cekKena(_parent, 7);
_root.sound7();
Symbol 2576 MovieClip Frame 60
removeMovieClip(_parent);
Symbol 2577 MovieClip [btroops14] Frame 1
stop();
Symbol 2578 MovieClip Frame 7
_root.cekKena(_parent, 9);
_root.sound9();
Symbol 2579 MovieClip Frame 60
removeMovieClip(_parent);
Symbol 2580 MovieClip [btroops15] Frame 1
stop();
Symbol 2581 MovieClip [btroopsx14] Frame 1
stop();
Symbol 2582 MovieClip [btroopsx15] Frame 1
stop();
Symbol 2583 MovieClip Frame 1
play();
Symbol 2671 MovieClip Frame 1
stop();
Symbol 2671 MovieClip Frame 10
stop();
Symbol 2673 MovieClip Frame 1
this.link.onRelease = function () {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1511&subid=splash", "_blank");
};
Symbol 2673 MovieClip Frame 210
stop();
Symbol 2709 MovieClip Frame 1
stop();
Symbol 2710 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 2711 Button
on (release) {
gameid = "FL090909";
getURL ("http://belugerinstudios.com/data/counter.php?gameid=" + gameid, "_blank");
}
Symbol 2769 MovieClip Frame 1
this.onRelease = function () {
getURL ("http://www.bubblebox.com/", _blank);
};
Symbol 2797 MovieClip Frame 1
stop();
Symbol 2798 MovieClip Frame 1
stop();
Symbol 2799 MovieClip Frame 1
stop();
Symbol 2805 MovieClip Frame 1
stop();
Symbol 2806 MovieClip Frame 1
stop();
Symbol 2807 MovieClip Frame 1
stop();
Symbol 2808 MovieClip Frame 1
stop();
Symbol 2809 MovieClip Frame 1
stop();
Symbol 2810 MovieClip Frame 1
stop();
Symbol 2820 MovieClip Frame 1
stop();
Symbol 2823 MovieClip Frame 1
stop();
Symbol 2826 MovieClip Frame 1
stop();
Symbol 2829 MovieClip Frame 1
stop();
Symbol 2835 MovieClip Frame 1
stop();
Symbol 2838 MovieClip Frame 1
stop();
Symbol 2841 MovieClip Frame 1
stop();
Symbol 2844 MovieClip Frame 1
stop();
Symbol 2847 MovieClip Frame 1
stop();
Symbol 2850 MovieClip Frame 1
stop();
Symbol 2866 MovieClip Frame 1
stop();
Symbol 2869 MovieClip Frame 1
stop();
Symbol 2872 MovieClip Frame 1
stop();
Symbol 2875 MovieClip Frame 1
stop();
Symbol 2878 MovieClip Frame 1
stop();
Symbol 2881 MovieClip Frame 1
stop();
Symbol 2887 MovieClip Frame 1
stop();
Symbol 2890 MovieClip Frame 1
stop();
Symbol 2893 MovieClip Frame 1
stop();
Symbol 2927 MovieClip Frame 1
stop();
Symbol 2930 MovieClip Frame 1
stop();
Symbol 2933 MovieClip Frame 1
stop();
Symbol 2936 MovieClip Frame 1
stop();
Symbol 3022 MovieClip Frame 1
stop();
Symbol 3047 MovieClip Frame 1
stop();
Symbol 3083 Button
on (press) {
gotoAndStop (1);
}
Symbol 3092 MovieClip Frame 1
stop();
Symbol 3094 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 3106 MovieClip Frame 1
stop();
Instance of Symbol 193 MovieClip in Symbol 3140 MovieClip Frame 1
on (release) {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1511&subid=worldmap", "_blank");
}
Symbol 3168 MovieClip Frame 1
stop();
Symbol 3168 MovieClip Frame 3
if (_root.pegangNegara == 1) {
warnaKe = "red";
} else if (_root.pegangNegara == 2) {
warnaKe = "brown";
} else if (_root.pegangNegara == 3) {
warnaKe = "dark green";
} else if (_root.pegangNegara == 4) {
warnaKe = "yellow";
} else if (_root.pegangNegara == 5) {
warnaKe = "pink";
} else if (_root.pegangNegara == 6) {
warnaKe = "light green";
} else if (_root.pegangNegara == 7) {
warnaKe = "purple";
}
kata2 = ("First, click on your territory. Note: it is shown by the " + warnaKe) + " colored area in this tutorial";
Symbol 3168 MovieClip Frame 4
kata2 = ("This is your territory, displayed as the landmasses in " + warnaKe) + ", the Green Shield icon shows the location of your capital city";
Symbol 3168 MovieClip Frame 5
_root.munculanTombol();
Symbol 3261 MovieClip Frame 1
stop();
Symbol 3307 MovieClip Frame 1
stop();
Symbol 3311 MovieClip Frame 1
stop();
Symbol 3315 MovieClip Frame 1
stop();
Symbol 3319 MovieClip Frame 1
stop();
Symbol 3323 MovieClip Frame 1
stop();
Symbol 3327 MovieClip Frame 1
stop();
Symbol 3332 MovieClip Frame 1
stop();
Symbol 3336 MovieClip Frame 1
stop();
Symbol 3340 MovieClip Frame 1
stop();
Symbol 3344 MovieClip Frame 1
stop();
Symbol 3348 MovieClip Frame 1
stop();
Symbol 3352 MovieClip Frame 1
stop();
Symbol 3356 MovieClip Frame 1
stop();
Symbol 3360 MovieClip Frame 1
stop();
Symbol 3364 MovieClip Frame 1
stop();
Symbol 3368 MovieClip Frame 1
stop();
Symbol 3372 MovieClip Frame 1
stop();
Symbol 3376 MovieClip Frame 1
stop();
Symbol 3380 MovieClip Frame 1
stop();
Symbol 3384 MovieClip Frame 1
stop();
Symbol 3388 MovieClip Frame 1
stop();