Frame 1
var CPMStarContentSpotID = "2366Q3D0BFD8A";
System.security.allowDomain("server.cpmstar.com");
adBox.loadMovie("http://server.cpmstar.com/adviewas2.swf?contentspotid=" + CPMStarContentSpotID);
function initData() {
i = 1;
while (i <= 3) {
_root["landDeploy" + i] = 0;
_root["seaDeploy" + i] = 0;
_root["airDeploy" + i] = 0;
_root["landKilled" + i] = 0;
_root["infantryKilled" + i] = 0;
_root["artilleryKilled" + i] = 0;
_root["turretKilled" + i] = 0;
_root["seaKilled" + i] = 0;
_root["airKilled" + i] = 0;
_root["winBattle" + i] = 0;
_root["loseBattle" + i] = 0;
_root["scoreReach" + i] = 0;
i++;
}
winTheGame = 0;
i = 1;
while (i <= 8) {
_root["dapatMedal" + i] = false;
i++;
}
unitYes = false;
buildingYes = false;
naturalYes = false;
kunciGembok2 = true;
kunciGembok3 = true;
i = 1;
while (i <= 25) {
_root["scoreUnlimited" + i] = 0;
i++;
}
}
function initAwal() {
i = 1;
while (i <= 25) {
_root["penguasaArea" + i] = 0;
i++;
}
hari = 1;
score = 0;
upgradePoint = 5;
pilihKerajaan = 0;
berapaMenang = 0;
pilihMode = 1;
_root.landDeploy = 0;
_root.seaDeploy = 0;
_root.airDeploy = 0;
_root.landKilled = 0;
_root.seaKilled = 0;
_root.airKilled = 0;
_root.winBattle = 0;
_root.loseBattle = 0;
_root.scoreReach = 0;
i = 1;
while (i <= 6) {
j = 1;
while (j <= 4) {
_root[("lifeLevel" + i) + j] = 1;
_root[("damageLevel" + i) + j] = 1;
_root[("speedLevel" + i) + j] = 1;
_root[("reloadLevel" + i) + j] = 1;
_root[("armorLevel" + i) + j] = 1;
_root[("formasiSet" + i) + j] = 1;
j++;
}
i++;
}
quantitiyLevel = 1;
recoveryLevel = 1;
awalUnlocked = false;
}
function simpanData() {
Cookies = SharedObject.getLocal("xmwdata");
i = 1;
while (i <= simpanSemua.length) {
Cookies.data["xmwsoData2" + i] = eval (simpanSemua[i]);
i++;
}
i = 1;
while (i <= 6) {
j = 1;
while (j <= 4) {
Cookies.data[("xmwsoLife" + i) + j] = _root[("lifeLevel" + i) + j];
Cookies.data[("xmwsoDamage" + i) + j] = _root[("damageLevel" + i) + j];
Cookies.data[("xmwsoSpeed" + i) + j] = _root[("speedLevel" + i) + j];
Cookies.data[("xmwsoReload" + i) + j] = _root[("reloadLevel" + i) + j];
Cookies.data[("xmwsoArmor" + i) + j] = _root[("armorLevel" + i) + j];
Cookies.data[("xmwsoFormasiSet" + i) + j] = _root[("formasiSet" + i) + j];
j++;
}
i++;
}
i = 1;
while (i <= 25) {
Cookies.data["xpenguasaArea" + i] = _root["penguasaArea" + i];
i++;
}
i = 1;
while (i <= 3) {
Cookies.data["xlandDeploy" + i] = _root["landDeploy" + i];
Cookies.data["xseaDeploy" + i] = _root["seaDeploy" + i];
Cookies.data["xairDeploy" + i] = _root["airDeploy" + i];
Cookies.data["xlandKilled" + i] = _root["landKilled" + i];
Cookies.data["xseaKilled" + i] = _root["seaKilled" + i];
Cookies.data["xairKilled" + i] = _root["airKilled" + i];
Cookies.data["xwinBattle" + i] = _root["winBattle" + i];
Cookies.data["xloseBattle" + i] = _root["loseBattle" + i];
Cookies.data["xscoreReach" + i] = _root["scoreReach" + i];
i++;
}
i = 1;
while (i <= 8) {
Cookies.data["xdapatMedal" + i] = _root["dapatMedal" + i];
i++;
}
}
function simpanScoreUnlimited() {
Cookies = SharedObject.getLocal("xmwdata");
i = 1;
while (i <= 25) {
Cookies.data["xscoreUnlimited" + i] = _root["scoreUnlimited" + i];
i++;
}
}
function loadScoreUnlimited() {
Cookies = SharedObject.getLocal("xmwdata");
i = 1;
while (i <= 25) {
if (Cookies.data["xscoreUnlimited" + i] == undefined) {
_root["scoreUnlimited" + i] = 0;
} else {
_root["scoreUnlimited" + i] = Cookies.data["xscoreUnlimited" + i];
}
i++;
}
}
function loadData() {
Cookies = SharedObject.getLocal("xmwdata");
i = 1;
while (i <= simpanSemua.length) {
_root[simpanSemua[i]] = Cookies.data["xmwsoData2" + i];
i++;
}
i = 1;
while (i <= 6) {
j = 1;
while (j <= 4) {
_root[("lifeLevel" + i) + j] = Cookies.data[("xmwsoLife" + i) + j];
_root[("damageLevel" + i) + j] = Cookies.data[("xmwsoDamage" + i) + j];
_root[("speedLevel" + i) + j] = Cookies.data[("xmwsoSpeed" + i) + j];
_root[("reloadLevel" + i) + j] = Cookies.data[("xmwsoReload" + i) + j];
_root[("armorLevel" + i) + j] = Cookies.data[("xmwsoArmor" + i) + j];
_root[("formasiSet" + i) + j] = Cookies.data[("xmwsoFormasiSet" + i) + j];
j++;
}
i++;
}
i = 1;
while (i <= 25) {
_root["penguasaArea" + i] = Cookies.data["xpenguasaArea" + i];
i++;
}
i = 1;
while (i <= 3) {
_root["landDeploy" + i] = Cookies.data["xlandDeploy" + i];
_root["seaDeploy" + i] = Cookies.data["xseaDeploy" + i];
_root["airDeploy" + i] = Cookies.data["xairDeploy" + i];
_root["landKilled" + i] = Cookies.data["xlandKilled" + i];
_root["seaKilled" + i] = Cookies.data["xseaKilled" + i];
_root["airKilled" + i] = Cookies.data["xairKilled" + i];
_root["winBattle" + i] = Cookies.data["xwinBattle" + i];
_root["loseBattle" + i] = Cookies.data["xloseBattle" + i];
_root["scoreReach" + i] = Cookies.data["xscoreReach" + i];
i++;
}
i = 1;
while (i <= 8) {
_root["dapatMedal" + i] = Cookies.data["xdapatMedal" + i];
i++;
}
}
function backMain() {
myMusic.stop();
myMusic = new Sound(zmusik);
myMusic.attachSound("backMain");
myMusic.start(0, 1);
myMusic.setVolume(volume1);
myMusic.onSoundComplete = function () {
backMain();
};
}
function backMenu() {
myMusic.stop();
myMusic = new Sound(zmusik);
myMusic.attachSound("backMenu");
myMusic.start(0, 1);
myMusic.setVolume(volume1);
myMusic.onSoundComplete = function () {
backMenu();
};
}
function backGun() {
mySound = new Sound(zsound);
mySound.attachSound("backGun");
mySound.start(0, 1);
mySound.setVolume(volume2);
}
function backGunx() {
mySound = new Sound(zsound);
mySound.attachSound("backGun2");
mySound.start(0, 1);
mySound.setVolume(volume2);
mySound.onSoundComplete = function () {
if (sudahLepas == false) {
backGunx();
} else {
mySound.stop();
}
};
}
function backGun2() {
mySound = new Sound(zsound);
mySound.attachSound("backGun2");
mySound.start(0, 1);
mySound.setVolume(volume2);
}
function backGun3() {
mySound = new Sound(zsound);
mySound.attachSound("backGun3");
mySound.start(0, 1);
mySound.setVolume(volume2);
}
function backCanon() {
mySound = new Sound(zsound);
mySound.attachSound("backCanon");
mySound.start(0, 1);
mySound.setVolume(volume2);
}
function backMortir() {
mySound = new Sound(zsound);
mySound.attachSound("backMortir");
mySound.start(0, 1);
mySound.setVolume(volume2);
}
function backMortir2() {
mySound = new Sound(zsound);
mySound.attachSound("backMortir2");
mySound.start(0, 1);
mySound.setVolume(volume2);
}
function backBazoka() {
mySound = new Sound(zsound);
mySound.attachSound("backBazoka");
mySound.start(0, 1);
mySound.setVolume(volume2);
}
function backLedak() {
rand = random(4) + 1;
mySound = new Sound(zsound);
mySound.attachSound("backLedak" + rand);
mySound.start(0, 1);
mySound.setVolume(volume2);
}
function backLedak4() {
mySound = new Sound(zsound);
mySound.attachSound("backLedak4");
mySound.start(0, 1);
mySound.setVolume(volume2);
}
function backMati() {
rand = random(4) + 1;
mySound = new Sound(zsound);
mySound.attachSound("backMati" + rand);
mySound.start(0, 1);
mySound.setVolume(volume2);
}
function backPesawat() {
xrand = random(3);
if (xrand == 1) {
mySound = new Sound(zsound);
mySound.attachSound("backPesawat");
mySound.start(0, 1);
mySound.setVolume(volume2);
}
}
function backSonic() {
mySound = new Sound(zsound);
mySound.attachSound("backSonic");
mySound.start(0, 1);
mySound.setVolume(volume2);
}
function backLaser() {
mySound = new Sound(zsound);
mySound.attachSound("backLaser");
mySound.start(0, 1);
mySound.setVolume(volume2);
}
stop();
fscommand ("showmenu", false);
fscommand ("fullscreen", false);
fscommand ("allowscale", true);
Stage.showMenu = false;
play_btn.enabled = false;
this.onEnterFrame = function () {
persen = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
zpersen = persen + " %";
bar_mc.gotoAndStop(persen);
if (persen >= 100) {
gotoAndStop ("completed");
delete this.onEnterFrame;
}
};
musik = attachMovie("xsound", "zmusik", 2);
sound = attachMovie("xsound", "zsound", 3);
qualityGame = 1;
_quality = "HIGH";
volume1 = 100;
volume2 = 50;
_root.gameID = "1817";
sudahLepas = true;
simpanSemua = new Array("", "hari", "score", "upgradePoint", "quantitiyLevel", "recoveryLevel", "awalUnlocked", "pilihKerajaan", "berapaMenang", "landDeploy", "seaDeploy", "airDeploy", "landKilled", "seaKilled", "airKilled", "winBattle", "loseBattle", "scoreReach", "unitYes", "buildingYes", "naturalYes", "pilihMode", "winTheGame", "kunciGembok2", "kunciGembok3");
loadData();
if (hari == undefined) {
initAwal();
initData();
simpanData();
}
Instance of Symbol 28 MovieClip in Frame 1
on (release) {
getURL ("http://www.belugerinstudios.com/", "_blank");
}
Instance of Symbol 35 MovieClip "logo_mc" in Frame 1
on (release) {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1817&subid=preloader", "_blank");
}
Frame 101
stop();
xplay_btn.enabled = true;
xplay_btn.onRelease = function () {
_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") {
xplay_btn.enabled = false;
gotoAndPlay ("ready");
} else {
xplay_btn.enabled = false;
gotoAndPlay ("ready");
}
removeMovieClip(adBox);
};
Frame 102
backMenu();
Frame 211
_root.backLedak4();
retak_mc.gotoAndStop(random(3) + 1);
Frame 220
_root.backLedak4();
retak_mc2.gotoAndStop(random(3) + 1);
Frame 230
_root.backLedak4();
retak_mc3.gotoAndStop(random(3) + 1);
Frame 240
_root.backLedak4();
retak_mc4.gotoAndStop(random(3) + 1);
retak_mc5.gotoAndStop(random(3) + 1);
Frame 250
_root.backLedak4();
retak_mc6.gotoAndStop(random(3) + 1);
Frame 320
stop();
gotoAndStop (422);
Frame 405
stop();
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1817&subid=sitelocked", "_self");
Frame 406
prevFrame();
gotoAndStop;
Frame 422
play();
Frame 651
gotoAndStop (652);
Frame 652
play();
Instance of Symbol 1689 MovieClip in Frame 652
on (release) {
getURL ("http://www.belugerinstudios.com/", "_blank");
}
Frame 821
stop();
gotoAndStop (822);
Frame 822
stop();
if ((hari >= 2) && (hari != undefined)) {
continue_btn._alpha = 100;
continue_btn.enabled = true;
} else {
continue_btn.enabled = false;
continue_btn._alpha = 90;
initAwal();
}
play_btn.onRelease = function () {
awalTutorial1 = true;
awalTutorial2 = true;
awalTutorial3 = true;
gotoAndPlay (829);
};
continue_btn.onRelease = function () {
loadData();
awalTutorial1 = false;
awalTutorial2 = false;
awalTutorial3 = false;
gotoAndPlay (841);
};
help_btn.onRelease = function () {
asalMula = "mainmenu";
gotoAndPlay (823);
};
statistic_btn.onRelease = function () {
asalMula = "mainmenu";
gotoAndPlay (825);
};
option_btn.onRelease = function () {
asalMula = "mainmenu";
gotoAndPlay (826);
};
credit_btn.onRelease = function () {
asalMula = "mainmenu";
gotoAndPlay (828);
};
medal_btn.onRelease = function () {
asalMula = "mainmenu";
gotoAndPlay (827);
};
more_btn.onRelease = function () {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1817&subid=playmoregames", "_blank");
};
Instance of Symbol 28 MovieClip in Frame 822
on (release) {
getURL ("http://www.belugerinstudios.com/", "_blank");
}
Instance of Symbol 35 MovieClip "logo_mc" in Frame 822
on (release) {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1817&subid=mainmenu", "_blank");
}
Frame 823
stop();
close_btn.onRelease = function () {
if (asalMula == "mainmenu") {
gotoAndStop (822);
} else if (asalMula == "map") {
gotoAndStop (841);
}
};
next_btn.onRelease = function () {
nextFrame();
gotoAndStop;
};
Frame 824
stop();
close_btn.onRelease = function () {
if (asalMula == "mainmenu") {
gotoAndStop (822);
} else if (asalMula == "map") {
gotoAndStop (841);
}
};
prev_btn.onRelease = function () {
prevFrame();
gotoAndStop;
};
Frame 825
stop();
close_btn.onRelease = function () {
if (asalMula == "mainmenu") {
gotoAndStop (822);
} else if (asalMula == "map") {
gotoAndStop (841);
}
};
Frame 826
function xcekUnit() {
if (unitYes == true) {
yes1.gotoAndStop(2);
no1.gotoAndStop(1);
} else if (unitYes == false) {
yes1.gotoAndStop(1);
no1.gotoAndStop(2);
}
}
function xcekBuilding() {
if (buildingYes == true) {
yes2.gotoAndStop(2);
no2.gotoAndStop(1);
} else if (buildingYes == false) {
yes2.gotoAndStop(1);
no2.gotoAndStop(2);
}
}
function xcekNatural() {
if (naturalYes == true) {
yes3.gotoAndStop(2);
no3.gotoAndStop(1);
} else if (naturalYes == false) {
yes3.gotoAndStop(1);
no3.gotoAndStop(2);
}
}
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_mc4._visible = false;
close_btn.onRelease = function () {
if (asalMula == "mainmenu") {
gotoAndStop (822);
} else if (asalMula == "map") {
gotoAndStop (841);
}
simpanData();
};
clear_btn.onRelease = function () {
msgBox_mc4._visible = true;
msgBox_mc4.no_btn.onRelease = function () {
msgBox_mc4._visible = false;
};
msgBox_mc4.yes_btn.onRelease = function () {
initAwal();
initData();
simpanData();
if (asalMula == "mainmenu") {
gotoAndStop (822);
} else if (asalMula == "map") {
gotoAndStop (841);
}
};
};
xcekUnit();
xcekBuilding();
xcekNatural();
yes1.onRelease = function () {
unitYes = true;
xcekUnit();
};
yes2.onRelease = function () {
buildingYes = true;
xcekBuilding();
};
yes3.onRelease = function () {
naturalYes = true;
xcekNatural();
};
no1.onRelease = function () {
unitYes = false;
xcekUnit();
};
no2.onRelease = function () {
buildingYes = false;
xcekBuilding();
};
no3.onRelease = function () {
naturalYes = false;
xcekNatural();
};
bar1_mc.bar_mc._x = Math.ceil((_root.volume1 / 0.434782608695652) - 115);
bar1_mc.bar_mc.onEnterFrame = function () {
_root.volume1 = int(0.434782608695652 * (this._x + 115));
_root.myMusic.setVolume(_root.volume1);
bar1_mc.persen1 = _root.volume1 + " %";
};
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.volume2 / 0.434782608695652) - 115);
bar2_mc.bar_mc.onEnterFrame = function () {
_root.volume2 = int(0.434782608695652 * (this._x + 115));
_root.volum3 = int(0.434782608695652 * (this._x + 115));
_root.mySound.setVolume(_root.volume2);
_root.mySound2.setVolume(_root.volum3);
bar2_mc.persen2 = _root.volume2 + " %";
};
bar2_mc.indi_mc.onPress = function () {
klik();
backGunx();
sudahLepas = false;
startDrag (bar2_mc.bar_mc, true, -115, 0, 115, 0);
};
bar2_mc.indi_mc.onRelease = (bar2_mc.indi_mc.onReleaseOutside = function () {
over();
sudahLepas = true;
stopDrag();
});
cekSpeedQuality();
Frame 827
function overMedal() {
frame_mc._visible = true;
myStr = new String(this);
xindi = myStr.substr(myStr.length - 1, 1);
if (_root["dapatMedal" + xindi] == false) {
frame_mc.penjelasan = medalList[xindi] + "\n\nMedal Locked";
} else {
frame_mc.penjelasan = medalList[xindi] + "\n\nMedal Unlocked";
}
}
function outMedal() {
frame_mc._visible = false;
}
stop();
frame_mc._visible = false;
medalList = new Array("", "Kill Infantry Unit 1000 times", "Destroy Air Force Unit 500 times", "Destroy Artillery Unit 500 times", "Destroy Navy Unit 500 times", "Lose the Battle 100 times", "Win the Battle 100 times", "Destroy Turret 200 times", "Complete The Whole Game 50 times");
close_btn.onRelease = function () {
delete _root.onEnterFrame;
if (asalMula == "mainmenu") {
gotoAndStop (822);
} else if (asalMula == "map") {
gotoAndStop (841);
}
};
i = 1;
while (i <= 8) {
if (_root["dapatMedal" + i] == false) {
_root["medal" + i].gotoAndStop(2);
} else {
_root["medal" + i].gotoAndStop(1);
}
_root["medal" + i].onRollOver = overMedal;
_root["medal" + i].onRollOut = outMedal;
i++;
}
_root.onEnterFrame = function () {
if ((_root._xmouse >= 160) && (_root._xmouse <= 640)) {
frame_mc._x = _root._xmouse;
}
frame_mc._y = _root._ymouse - 70;
};
Frame 828
stop();
close_btn.onRelease = function () {
gotoAndStop (822);
};
Instance of Symbol 28 MovieClip in Frame 828
on (release) {
getURL ("http://www.belugerinstudios.com/", "_blank");
}
Frame 829
stop();
skip_btn.onRelease = function () {
gotoAndPlay (839);
delete _root.onMouseDown;
};
_root.onMouseDown = function () {
nextFrame();
gotoAndStop;
};
Frame 838
stop();
gotoAndPlay (839);
delete _root.onMouseDown;
Frame 839
stop();
xunlimited_btn.enabled = false;
xsingle_btn.enabled = false;
msgBox_mc1._visible = false;
msgBox_mc2._visible = false;
msgBox_mc3._visible = false;
msgBox_mc4._visible = false;
pilihKerajaan = 0;
kingdom1.gotoAndStop(1);
kingdom2.gotoAndStop(1);
kingdom3.gotoAndStop(1);
if (kunciGembok2 == true) {
unlimited_btn.enabled = false;
gembok2._visible = true;
} else {
unlimited_btn.enabled = true;
gembok2._visible = false;
}
if (kunciGembok3 == true) {
single_btn.enabled = false;
gembok3._visible = true;
} else {
single_btn.enabled = true;
gembok3._visible = false;
}
kingdomDeskripsi = new Array("", "Artemedia, from Earth, is the most technologically advanced force. They have the Laser Man and Sonic Tank Troops with advanced weapons. Sonic Tanks have deadly long-range attacks. Stealth Aircraft are so sophisticated they can disappear and not be detected by the opponent. Missile Destroyers are mega-missiles with long firing distances. Artemedia's units can cause the most damage of any nation.", "Orbelugs, from Pluto, is the most mysterious nation. They have harnessed the supernatural power to brainwash their opponents into soldiers. They have magic potions that can make their troops faster than any normal human. They have a Zombie army and Toxin tanks that can brainwash their opponents. Zhotnapalm can destroy opponents in an instant. Ghost Destroyer ships can mysteriously disappear. Orbelugs' units have more speed and power regeneration abilities than the other nations.", "Harmatos, from Mars, has the most ferocious and fearless fighting force. Their army is made up of very strong and scary Bomberman troops. Their Zedeadstator tanks and Zmash Destroyer ships are the strongest of all the nations. They also have kamikaze planes that crash themselves into opponents. Harmatos' units have the most hit points of all the nations.");
kingdom1.onRelease = function () {
pilihKerajaan = 1;
kingdom1.gotoAndStop(2);
kingdom2.gotoAndStop(1);
kingdom3.gotoAndStop(1);
msgBox_mc1._visible = false;
};
kingdom2.onRelease = function () {
pilihKerajaan = 2;
kingdom1.gotoAndStop(1);
kingdom2.gotoAndStop(2);
kingdom3.gotoAndStop(1);
msgBox_mc1._visible = false;
};
kingdom3.onRelease = function () {
pilihKerajaan = 3;
kingdom1.gotoAndStop(1);
kingdom2.gotoAndStop(1);
kingdom3.gotoAndStop(2);
msgBox_mc1._visible = false;
};
kingdom1.onRollOver = function () {
if (msgBox_mc2._visible == false) {
msgBox_mc1._visible = true;
i = 1;
while (i <= 5) {
msgBox_mc1["unit" + i].gotoAndStop(1);
i++;
}
msgBox_mc1.penjelasan = kingdomDeskripsi[1];
}
};
kingdom2.onRollOver = function () {
if (msgBox_mc2._visible == false) {
msgBox_mc1._visible = true;
i = 1;
while (i <= 5) {
msgBox_mc1["unit" + i].gotoAndStop(2);
i++;
}
msgBox_mc1.penjelasan = kingdomDeskripsi[2];
}
};
kingdom3.onRollOver = function () {
if (msgBox_mc2._visible == false) {
msgBox_mc1._visible = true;
i = 1;
while (i <= 5) {
msgBox_mc1["unit" + i].gotoAndStop(3);
i++;
}
msgBox_mc1.penjelasan = kingdomDeskripsi[3];
}
};
kingdom1.onRollOut = function () {
msgBox_mc1._visible = false;
};
kingdom2.onRollOut = function () {
msgBox_mc1._visible = false;
};
kingdom3.onRollOut = function () {
msgBox_mc1._visible = false;
};
_root.onEnterFrame = function () {
if ((_root._xmouse >= 160) && (_root._xmouse <= 640)) {
msgBox_mc1._x = _root._xmouse;
}
msgBox_mc1._y = _root._ymouse - 120;
};
campaign_btn.onRelease = function () {
if (pilihKerajaan != 0) {
xpilihKerajaan = pilihKerajaan;
kingdom1.enabled = false;
kingdom2.enabled = false;
kingdom3.enabled = false;
unlimited_btn.enabled = false;
campaign_btn.enabled = false;
back_btn.enabled = false;
msgBox_mc2._visible = true;
msgBox_mc2.penjelasan = "Campaign Mode: There are 25 levels. Every 5 levels you can choose a difficulty level. When you have finished all 25 levels, the game is over and the results of all the battles will be displayed. The game autosaves after each completed battle, play this mode?";
msgBox_mc2.yes_btn.onRelease = function () {
initAwal();
pilihMode = 1;
pilihKerajaan = xpilihKerajaan;
simpanData();
gotoAndStop (841);
};
msgBox_mc2.no_btn.onRelease = function () {
kingdom1.enabled = true;
kingdom2.enabled = true;
kingdom3.enabled = true;
unlimited_btn.enabled = true;
campaign_btn.enabled = true;
back_btn.enabled = true;
msgBox_mc2._visible = false;
};
} else {
msgBox_mc4._visible = true;
msgBox_mc4.onRelease = function () {
msgBox_mc4._visible = false;
};
}
};
unlimited_btn.onRelease = function () {
if (pilihKerajaan != 0) {
xpilihKerajaan = pilihKerajaan;
kingdom1.enabled = false;
kingdom2.enabled = false;
kingdom3.enabled = false;
unlimited_btn.enabled = false;
campaign_btn.enabled = false;
back_btn.enabled = false;
msgBox_mc2._visible = true;
msgBox_mc2.penjelasan = "Unlimited Mode: There is no end to this mode and no end result will be displayed. You keep playing until you lose. The upgrade system is available in this mode, play this mode?";
msgBox_mc2.yes_btn.onRelease = function () {
initAwal();
pilihMode = 2;
pilihKerajaan = xpilihKerajaan;
loadScoreUnlimited();
gotoAndStop (841);
};
msgBox_mc2.no_btn.onRelease = function () {
kingdom1.enabled = true;
kingdom2.enabled = true;
kingdom3.enabled = true;
unlimited_btn.enabled = true;
campaign_btn.enabled = true;
back_btn.enabled = true;
msgBox_mc2._visible = false;
};
} else {
msgBox_mc4._visible = true;
msgBox_mc4.onRelease = function () {
msgBox_mc4._visible = false;
};
}
};
single_btn.onRelease = function () {
if (pilihKerajaan != 0) {
xpilihKerajaan = pilihKerajaan;
kingdom1.enabled = false;
kingdom2.enabled = false;
kingdom3.enabled = false;
unlimited_btn.enabled = false;
campaign_btn.enabled = false;
back_btn.enabled = false;
msgBox_mc2._visible = true;
msgBox_mc2.penjelasan = "Single Mode: Choose your opponent. Specify the battlefield landscape, the strength, number, and level of opponents. There is no upgrading in this mode, play this mode?";
msgBox_mc2.yes_btn.onRelease = function () {
initAwal();
pilihMode = 3;
pilihKerajaan = xpilihKerajaan;
pilihSulit = 1;
pilihEnemy = 1;
pilihMap = 1;
xpilihUnit = 1;
hari = 1;
gotoAndStop (840);
};
msgBox_mc2.no_btn.onRelease = function () {
kingdom1.enabled = true;
kingdom2.enabled = true;
kingdom3.enabled = true;
unlimited_btn.enabled = true;
campaign_btn.enabled = true;
back_btn.enabled = true;
msgBox_mc2._visible = false;
};
} else {
msgBox_mc4._visible = true;
msgBox_mc4.onRelease = function () {
msgBox_mc4._visible = false;
};
}
};
back_btn.onRelease = function () {
gotoAndStop (822);
};
Frame 840
function cekPilih() {
i = 1;
while (i <= 3) {
_root["logo" + i].gotoAndStop(1);
_root["logo" + i].onRelease = klikLogo;
i++;
}
i = 1;
while (i <= 5) {
_root["sulit" + i].gotoAndStop(1);
_root["sulit" + i].onRelease = klikSulit;
i++;
}
i = 1;
while (i <= 2) {
_root["enemy" + i].gotoAndStop(1);
_root["enemy" + i].onRelease = klikEnemy;
i++;
}
i = 1;
while (i <= 25) {
_root["map" + i].gotoAndStop(1);
_root["map" + i].onRelease = klikMap;
_root["map" + i].onRollOver = overMap;
_root["map" + i].onRollOut = outMap;
i++;
}
i = 1;
while (i <= 10) {
_root["unit" + i].gotoAndStop(1);
_root["unit" + i].onRelease = klikUnit;
i++;
}
_root["logo" + pilihKerajaan].gotoAndStop(2);
_root["sulit" + pilihSulit].gotoAndStop(2);
_root["enemy" + pilihEnemy].gotoAndStop(2);
_root["map" + pilihMap].gotoAndStop(2);
_root["unit" + xpilihUnit].gotoAndStop(2);
}
function overMap() {
myStr = new String(this);
if (myStr.length == 12) {
zindi = myStr.substr(myStr.length - 1, 1);
} else {
zindi = myStr.substr(myStr.length - 2, 2);
}
back_mc.gotoAndStop(zindi);
}
function outMap() {
back_mc.gotoAndStop(pilihMap);
}
function klikLogo() {
myStr = new String(this);
indi = myStr.substr(myStr.length - 1, 1);
pilihKerajaan = indi;
cekPilih();
}
function klikSulit() {
myStr = new String(this);
indi = myStr.substr(myStr.length - 1, 1);
pilihSulit = indi;
cekPilih();
}
function klikEnemy() {
myStr = new String(this);
indi = myStr.substr(myStr.length - 1, 1);
pilihEnemy = indi;
cekPilih();
}
function klikMap() {
myStr = new String(this);
if (myStr.length == 12) {
indi = myStr.substr(myStr.length - 1, 1);
} else {
indi = myStr.substr(myStr.length - 2, 2);
}
pilihMap = indi;
cekPilih();
}
function klikUnit() {
myStr = new String(this);
if (myStr.length == 13) {
indi = myStr.substr(myStr.length - 1, 1);
} else {
indi = myStr.substr(myStr.length - 2, 2);
}
xpilihUnit = indi;
cekPilih();
}
stop();
sulitMap = new Array();
zjenisMusuh = new Array();
back_btn.onRelease = function () {
gotoAndStop (839);
};
start_btn.onRelease = function () {
hari = 1;
pilihPeta = pilihMap;
sulitMap[pilihPeta] = pilihSulit;
zjenisMusuh[pilihPeta] = 0;
medanJenis = new Array("", "sea2", "sea1", "sea2", "air", "sea1", "land", "infanarti", "infanarti", "infanarti", "sea1", "land", "infanarti", "infanarti", "land", "sea2", "air", "land", "infanarti", "sea2", "sea1", "infanarti", "infanarti", "sea2", "air", "air");
tipePerang = medanJenis[pilihPeta];
i = 1;
while (i <= 6) {
j = 1;
while (j <= 4) {
_root[("lifeLevel" + i) + j] = xpilihUnit;
_root[("damageLevel" + i) + j] = xpilihUnit;
_root[("speedLevel" + i) + j] = xpilihUnit;
_root[("reloadLevel" + i) + j] = xpilihUnit;
_root[("armorLevel" + i) + j] = xpilihUnit;
_root[("formasiSet" + i) + j] = xpilihUnit;
j++;
}
i++;
}
i = 1;
while (i <= 3) {
_root["yangMain" + i] = false;
i++;
}
if (pilihEnemy == 2) {
i = 1;
while (i <= 3) {
_root["yangMain" + i] = true;
i++;
}
zjenisMusuh[pilihPeta] = 0;
} else if (pilihEnemy == 1) {
_root["yangMain" + pilihKerajaan] = true;
if (pilihKerajaan == 1) {
_root.yangMain2 = true;
zjenisMusuh[pilihPeta] = 2;
} else if (pilihKerajaan == 2) {
_root.yangMain3 = true;
zjenisMusuh[pilihPeta] = 3;
} else if (pilihKerajaan == 3) {
_root.yangMain1 = true;
zjenisMusuh[pilihPeta] = 1;
}
}
berapaMenang = 0;
i = 1;
while (i <= 25) {
_root["penguasaArea" + i] = 0;
i++;
}
i = 1;
while (i <= 6) {
j = 1;
while (j <= 4) {
_root[("formasiSet" + i) + j] = 1;
j++;
}
i++;
}
quantitiyLevel = xpilihUnit;
recoveryLevel = xpilihUnit;
gotoAndStop (843);
};
cekPilih();
Frame 841
function cekSudahUnit() {
awalUnlocked = true;
unit_mc._visible = false;
}
function klikMap() {
frame_mc._visible = false;
myStr = new String(this);
if (myStr.length == 12) {
indi = myStr.substr(myStr.length - 1, 1);
} else if (myStr.length == 13) {
indi = myStr.substr(myStr.length - 2, 2);
}
if (_root["penguasaArea" + indi] == 0) {
pilihPeta = indi;
tipePerang = medanJenis[indi];
gotoAndStop (842);
}
}
function overMap() {
frame_mc._visible = true;
myStr = new String(this);
if (myStr.length == 12) {
indi = myStr.substr(myStr.length - 1, 1);
} else if (myStr.length == 13) {
indi = myStr.substr(myStr.length - 2, 2);
}
if (_root["penguasaArea" + indi] == 0) {
if (pilihMode == 2) {
frame_mc.gotoAndStop(3);
frame_mc.bestScore = "Best Score: " + _root["scoreUnlimited" + indi];
} else {
frame_mc.gotoAndStop(1);
}
frame_mc.nama = "Map: " + indi;
if (sulitMap[indi] == 1) {
frame_mc.sulit = "Difficulty: *";
} else if (sulitMap[indi] == 2) {
frame_mc.sulit = "Difficulty: **";
} else if (sulitMap[indi] == 3) {
frame_mc.sulit = "Difficulty: ***";
} else if (sulitMap[indi] == 4) {
frame_mc.sulit = "Difficulty: ****";
} else if (sulitMap[indi] == 5) {
frame_mc.sulit = "Difficulty: *****";
}
frame_mc.medan = "Landscape: " + medanMap[indi];
if (medanJenis[indi] == "infantry") {
frame_mc.unit = "Unit Available: Infantry Only";
} else if (medanJenis[indi] == "infanarti") {
frame_mc.unit = "Unit Available: Infantry & Artillery";
} else if (medanJenis[indi] == "artilery") {
frame_mc.unit = "Unit Available: Artillery Only";
} else if (medanJenis[indi] == "land") {
frame_mc.unit = "Unit Available: Infantry, Artillery & Air Force";
} else if (medanJenis[indi] == "navy") {
frame_mc.unit = "Unit Available: Navy Only";
} else if (medanJenis[indi] == "sea1") {
frame_mc.unit = "Unit Available: Navy and Air Force";
} else if (medanJenis[indi] == "sea2") {
frame_mc.unit = "Unit Available: Navy, Infantry & Artillery";
} else if (medanJenis[indi] == "air") {
frame_mc.unit = "Unit Available: Air Foce Only";
}
if (zjenisMusuh[indi] == 1) {
frame_mc.musuh = "Enemy: Artemedia";
} else if (zjenisMusuh[indi] == 2) {
frame_mc.musuh = "Enemy: Orbelugs";
} else if (zjenisMusuh[indi] == 3) {
frame_mc.musuh = "Enemy: Harmatos";
} else if (pilihKerajaan == 1) {
frame_mc.musuh = "Enemy: Harmatos and Orbelugs";
} else if (pilihKerajaan == 2) {
frame_mc.musuh = "Enemy: Harmatos and Artemedia";
} else if (pilihKerajaan == 3) {
frame_mc.musuh = "Enemy: Orbelugs and Artemedia";
}
} else {
frame_mc.gotoAndStop(2);
frame_mc.nama = "Map: " + indi;
if (sulitMap[indi] == 1) {
frame_mc.sulit = "Difficulty: *";
} else if (sulitMap[indi] == 2) {
frame_mc.sulit = "Difficulty: **";
} else if (sulitMap[indi] == 3) {
frame_mc.sulit = "Difficulty: ***";
} else if (sulitMap[indi] == 4) {
frame_mc.sulit = "Difficulty: ****";
} else if (sulitMap[indi] == 5) {
frame_mc.sulit = "Difficulty: *****";
}
frame_mc.medan = "Landscape: " + medanMap[indi];
if (_root["penguasaArea" + indi] == 1) {
frame_mc.xpemenang = "Occupied by Artemedia";
} else if (_root["penguasaArea" + indi] == 2) {
frame_mc.xpemenang = "Occupied by Orbelugs";
} else if (_root["penguasaArea" + indi] == 3) {
frame_mc.xpemenang = "Occupied by Harmatos";
}
}
}
function outMap() {
frame_mc._visible = false;
}
function xenterFrame() {
if ((_root._xmouse >= 125) && (_root._xmouse <= 675)) {
frame_mc._x = _root._xmouse;
}
if (_root._ymouse <= 200) {
frame_mc._y = _root._ymouse + 200;
} else {
frame_mc._y = _root._ymouse;
}
}
stop();
if (pilihMode == 2) {
hari = 1;
}
if (awalTutorial1 == true) {
awalTutorial1 = false;
tutorial_mc._visible = true;
if (pilihKerajaan == 1) {
tutorial_mc.penjelasan = "Welcome to Bluegreen Planet, Artemedia Commander! It is time to start a massive war. Which of the five areas will you conquer first? Each area has different landscapes and troop types to choose from.";
} else if (pilihKerajaan == 2) {
tutorial_mc.penjelasan = "Welcome to Bluegreen Planet, Orbelugs Commander! It is time to start a massive war. Which of the five areas will you conquer first? Each area has different landscapes and troop types to choose from.";
} else if (pilihKerajaan == 3) {
tutorial_mc.penjelasan = "Welcome to Bluegreen Planet, Harmatos Commander! It is time to start a massive war. Which of the five areas will you conquer first? Each area has different landscapes and troop types to choose from.";
}
tutorial_mc.ok_btn.onRelease = function () {
tutorial_mc._visible = false;
};
} else {
tutorial_mc._visible = false;
}
zday = "Day: " + hari;
logo_mc.gotoAndStop(pilihKerajaan);
logo_mc2.gotoAndStop(pilihKerajaan);
frame_mc._visible = false;
msgBox_mc4._visible = false;
frame_mc.onEnterFrame = xenterFrame;
medanMap = new Array("", "Land & Sea", "Sea & Air", "Land & Sea", "Air", "Sea & Air", "Land & Air", "Land", "Land", "Land", "Sea & Air", "Land & Air", "Land", "Land", "Land & Air", "Land & Sea", "Air", "Land & Air", "Land", "Land & Sea", "Sea & Air", "Land", "Beach", "Land & Sea", "Air", "Air");
medanJenis = new Array("", "sea2", "sea1", "sea2", "air", "sea1", "land", "infanarti", "infanarti", "infanarti", "sea1", "land", "infanarti", "infanarti", "land", "sea2", "air", "land", "infanarti", "sea2", "sea1", "infanarti", "infanarti", "sea2", "air", "air");
if (pilihKerajaan == 1) {
sulitMap = new Array("", 1, 5, 2, 3, 3, 3, 3, 4, 2, 1, 2, 4, 2, 1, 5, 4, 1, 2, 5, 3, 1, 4, 5, 4, 5);
zjenisMusuh = new Array("", 2, 3, 3, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 2, 3, 3, 3, 3, 2, 2, 2, 3, 3, 2, 2, 3);
} else if (pilihKerajaan == 2) {
sulitMap = new Array("", 2, 4, 2, 1, 4, 5, 4, 5, 4, 5, 1, 3, 1, 2, 5, 1, 3, 2, 3, 3, 3, 5, 4, 2, 1);
zjenisMusuh = new Array("", 1, 3, 3, 1, 3, 3, 3, 3, 1, 1, 1, 3, 3, 1, 3, 1, 1, 3, 1, 3, 1, 1, 3, 1, 1, 3);
} else if (pilihKerajaan == 3) {
sulitMap = new Array("", 2, 3, 1, 3, 4, 2, 5, 1, 5, 5, 3, 1, 5, 4, 3, 3, 2, 4, 2, 1, 4, 5, 2, 1, 4);
zjenisMusuh = new Array("", 2, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 2, 1, 2, 2, 2, 2, 2, 1, 1, 1, 2, 2, 1, 1, 2);
}
berapaMenang = 0;
i = 1;
while (i <= 25) {
if (_root["penguasaArea" + i] > 0) {
if (pilihMode == 1) {
berapaMenang++;
}
}
if (pilihMode == 2) {
berapaMenang++;
_root["penguasaArea" + i] = 0;
}
if (_root["penguasaArea" + i] == 0) {
_root["map" + i].gotoAndStop(1);
} else if (_root["penguasaArea" + i] == 1) {
_root["map" + i].gotoAndStop(2);
} else if (_root["penguasaArea" + i] == 2) {
_root["map" + i].gotoAndStop(3);
} else if (_root["penguasaArea" + i] == 3) {
_root["map" + i].gotoAndStop(4);
}
i++;
}
if (awalUnlocked == false) {
if (berapaMenang == 5) {
awalUnlocked = true;
unit_mc._visible = true;
unit_mc.gotoAndStop(1);
} else if (berapaMenang == 10) {
awalUnlocked = true;
unit_mc._visible = true;
unit_mc.gotoAndStop(10);
} else if (berapaMenang == 15) {
awalUnlocked = true;
unit_mc._visible = true;
unit_mc.gotoAndStop(20);
} else {
awalUnlocked = false;
unit_mc._visible = false;
}
} else {
unit_mc._visible = false;
}
i = 1;
while (i <= 25) {
_root["map" + i].onRelease = klikMap;
_root["map" + i].onRollOver = overMap;
_root["map" + i].onRollOut = outMap;
_root["map" + i]._visible = true;
if (berapaMenang <= 4) {
if (sulitMap[i] > 1) {
_root["map" + i]._visible = false;
}
} else if (berapaMenang <= 9) {
if (sulitMap[i] > 2) {
_root["map" + i]._visible = false;
}
} else if (berapaMenang <= 14) {
if (sulitMap[i] > 3) {
_root["map" + i]._visible = false;
}
} else if (berapaMenang <= 19) {
if (sulitMap[i] > 4) {
_root["map" + i]._visible = false;
}
} else {
if (sulitMap[i] > 5) {
_root["map" + i]._visible = false;
}
if (pilihMode == 1) {
zjenisMusuh[i] = 0;
} else if (pilihMode == 2) {
if (sulitMap[i] == 5) {
zjenisMusuh[i] = 0;
}
}
}
i++;
}
help_btn.onRelease = function () {
gotoAndPlay (823);
asalMula = "map";
};
statistic_btn.onRelease = function () {
gotoAndPlay (825);
asalMula = "map";
};
options_btn.onRelease = function () {
gotoAndPlay (826);
asalMula = "map";
};
medal_btn.onRelease = function () {
gotoAndPlay (827);
asalMula = "map";
};
quit_btn.onRelease = function () {
msgBox_mc4._visible = true;
if (pilihMode == 2) {
msgBox_mc4.penjelasan = "Are you sure want to quit and leave the battle? The game's progress will be lost and you can only start a new game. However, the best score of each level will be saved.";
} else {
msgBox_mc4.penjelasan = "Are you sure want to quit and leave the battle? The game's progress will be saved automatically (only available on day 2 or later).";
}
msgBox_mc4.yes_btn.onRelease = function () {
if (pilihMode == 1) {
simpanData();
} else if (pilihMode == 2) {
loadData();
}
gotoAndStop (822);
};
msgBox_mc4.no_btn.onRelease = function () {
msgBox_mc4._visible = false;
};
};
more_btn.onRelease = function () {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1817&subid=playmoregames", "_blank");
};
Frame 842
function klikUpgrade() {
myStr = new String(this);
indi = Number(myStr.substr(myStr.length - 1, 1));
pilihUpgrade = indi;
cekUnitUpgrade();
}
function cekUnitUpgrade() {
i = 1;
while (i <= 6) {
_root["upgrade" + i].onRelease = klikUpgrade;
_root["upgrade" + i].gotoAndStop(1);
i++;
}
i = 1;
while (i <= 5) {
if (pilihUpgrade >= 5) {
_root["xupgrade" + i]._visible = false;
} else {
_root["xupgrade" + i]._visible = true;
}
i++;
}
_root["upgrade" + pilihUpgrade].gotoAndStop(2);
i = 1;
while (i <= 4) {
_root["unit" + i].onRelease = klikUnit;
_root["unit" + i].namaUnit = _root[("jenisNama" + String(pilihUpgrade)) + String(i)];
i++;
}
if (pilihUpgrade >= 5) {
namaUpgrade = _root["unit" + pilihJenis].namaUnit + " - No Upgrades";
} else {
namaUpgrade = _root["unit" + pilihJenis].namaUnit + " - Upgrades";
}
namaFormation = _root["unit" + pilihJenis].namaUnit + " - Default Formations";
namaWeapon = _root["unit" + pilihJenis].namaUnit + " - Weapons";
if (pilihUpgrade == 1) {
pejelasan_weapon = penjelasanWeapon[pilihJenis];
} else if (pilihUpgrade == 2) {
pejelasan_weapon = penjelasanWeapon[pilihJenis + 4];
} else if (pilihUpgrade == 3) {
pejelasan_weapon = penjelasanWeapon[pilihJenis + 8];
} else if (pilihUpgrade == 4) {
pejelasan_weapon = penjelasanWeapon[pilihJenis + 12];
} else if (pilihUpgrade == 5) {
pejelasan_weapon = penjelasanWeapon[pilihJenis + 16];
} else if (pilihUpgrade == 6) {
pejelasan_weapon = penjelasanWeapon[pilihJenis + 20];
}
point_upgrade = "Upgrade Points: " + upgradePoint;
_root["unit" + pilihJenis].gotoAndStop(2);
if (pilihKerajaan == 1) {
if (pilihUpgrade == 1) {
gambar_mc.gotoAndStop(pilihJenis);
} else if (pilihUpgrade == 2) {
gambar_mc.gotoAndStop(pilihJenis + 4);
} else if (pilihUpgrade == 3) {
gambar_mc.gotoAndStop(pilihJenis + 8);
} else if (pilihUpgrade == 4) {
gambar_mc.gotoAndStop(pilihJenis + 12);
} else if (pilihUpgrade == 5) {
gambar_mc.gotoAndStop(pilihJenis + 16);
} else if (pilihUpgrade == 6) {
gambar_mc.gotoAndStop(pilihJenis + 69);
}
} else if (pilihKerajaan == 2) {
if (pilihUpgrade == 1) {
gambar_mc.gotoAndStop(pilihJenis + 20);
} else if (pilihUpgrade == 2) {
gambar_mc.gotoAndStop((pilihJenis + 4) + 20);
} else if (pilihUpgrade == 3) {
gambar_mc.gotoAndStop((pilihJenis + 8) + 20);
} else if (pilihUpgrade == 4) {
gambar_mc.gotoAndStop((pilihJenis + 12) + 20);
} else if (pilihUpgrade == 5) {
gambar_mc.gotoAndStop((pilihJenis + 16) + 20);
} else if (pilihUpgrade == 6) {
gambar_mc.gotoAndStop(pilihJenis + 69);
}
} else if (pilihKerajaan == 3) {
if (pilihUpgrade == 1) {
gambar_mc.gotoAndStop(pilihJenis + 40);
} else if (pilihUpgrade == 2) {
gambar_mc.gotoAndStop((pilihJenis + 4) + 40);
} else if (pilihUpgrade == 3) {
gambar_mc.gotoAndStop((pilihJenis + 8) + 40);
} else if (pilihUpgrade == 4) {
gambar_mc.gotoAndStop((pilihJenis + 12) + 40);
} else if (pilihUpgrade == 5) {
gambar_mc.gotoAndStop((pilihJenis + 16) + 40);
} else if (pilihUpgrade == 6) {
gambar_mc.gotoAndStop(pilihJenis + 69);
}
}
xlifeLevel = "Level " + _root[("lifeLevel" + pilihUpgrade) + pilihJenis];
xdamageLevel = "Level " + _root[("damageLevel" + pilihUpgrade) + pilihJenis];
xspeedLevel = "Level " + _root[("speedLevel" + pilihUpgrade) + pilihJenis];
xreloadLevel = "Level " + _root[("reloadLevel" + pilihUpgrade) + pilihJenis];
xarmorLevel = "Level " + _root[("armorLevel" + pilihUpgrade) + pilihJenis];
xquantitiyLevel = "Level " + quantitiyLevel;
xrecoveryLevel = "Level " + recoveryLevel;
if (pilihUpgrade == 1) {
formasi.gotoAndStop(1);
formasi.atur.gotoAndStop(_root[("formasiSet" + pilihUpgrade) + pilihJenis]);
} else if (pilihUpgrade <= 4) {
formasi.gotoAndStop(2);
formasi.atur.gotoAndStop(_root[("formasiSet" + pilihUpgrade) + pilihJenis]);
}
if (pilihUpgrade <= 4) {
if (pilihJenis == 4) {
formasi.gotoAndStop(3);
formasi.atur.gotoAndStop(_root[("formasiSet" + pilihUpgrade) + pilihJenis]);
}
change_btn._visible = true;
arah_mc._visible = true;
namaFormation = _root["unit" + pilihJenis].namaUnit + " - Default Formations";
} else {
formasi.gotoAndStop(4);
change_btn._visible = false;
arah_mc._visible = false;
namaFormation = _root["unit" + pilihJenis].namaUnit + " - No Formations";
}
i = 1;
while (i <= 4) {
_root["gembok" + i]._visible = false;
_root["unit" + i].enabled = true;
i++;
}
if (sulitMap[pilihPeta] == 1) {
i = 2;
while (i <= 4) {
_root["gembok" + i]._visible = true;
_root["unit" + i].enabled = false;
i++;
}
} else if (sulitMap[pilihPeta] == 2) {
i = 3;
while (i <= 4) {
_root["gembok" + i]._visible = true;
_root["unit" + i].enabled = false;
i++;
}
} else if (sulitMap[pilihPeta] == 3) {
i = 4;
while (i <= 4) {
_root["gembok" + i]._visible = true;
_root["unit" + i].enabled = false;
i++;
}
} else {
i = 2;
while (i <= 4) {
_root["gembok" + i]._visible = false;
_root["unit" + i].enabled = true;
i++;
}
}
}
function klikUnit() {
myStr = new String(this);
indi = Number(myStr.substr(myStr.length - 1, 1));
i = 1;
while (i <= 4) {
_root["unit" + i].onRelease = klikUnit;
_root["unit" + i].gotoAndStop(1);
i++;
}
pilihJenis = indi;
_root["unit" + pilihJenis].gotoAndStop(2);
cekUnitUpgrade();
}
stop();
if (awalTutorial2 == true) {
awalTutorial2 = false;
xtutorial_mc._visible = true;
xtutorial_mc.penjelasan = "Here is where you upgrade your troops. There are four force types in addition to tower defense and special attacks. Each army has five upgradeable attributes: Life, Damage, Speed, Reload, and Armor. Each army has a default formation. The most important upgrade is the power supply: it is the main source for unleashing your units, building tower defenses, and launching special attacks.";
xtutorial_mc.ok_btn.onRelease = function () {
xtutorial_mc._visible = false;
};
} else {
xtutorial_mc._visible = false;
}
start_btn.onRelease = function () {
if (pilihMode == 1) {
simpanData();
}
gotoAndStop (843);
};
map_btn.onRelease = function () {
gotoAndStop (841);
};
indiUpgrade = 1;
formasi_mc._visible = false;
info_mc._visible = false;
pilihUpgrade = 1;
pilihJenis = 1;
if (pilihKerajaan == 1) {
penjelasanWeapon = new Array("", "Rifle Man has burst weapon type, the damage will be weak againts artillery and base, but accurate to attack infantry unit.", "Mortar Man has explosive weapon type, the damage will be good againts artillery and base.", "Rocket Man has explosive weapon type, the damage will be good againts artillery and base.", "Laser Man has long range explosive weapon type, the damage will be good againts all units and buildings.", "Combat Tank has explosive weapon type, the damage will be good againts artillery and base.", "Panzer has burst weapon type, the damage will be weak againts artillery and base, but accurate to attack infantry unit.", "Rocket Tank has explosive weapon type, the damage will be good againts artillery and base.", "Sonic Tank has long range sonic weapon type, the damage will be good againts all units and buildings.", "Combat Jet has burst weapon type, the damage will be weak againts artillery and base, but accurate to attack infantry unit.", "Rocket Jet has explosive weapon type, the damage will be good againts artillery and base.", "Bomber Jet has explosive weapon type, the damage will be good againts artillery and base, this unit will attack to the ground unit.", "Stealth has explosive weapon type, the damage will be good againts artillery and base, this unit can't be detection when move.", "Jetski has burst weapon type, the damage will be weak againts artillery and base, but accurate to attack infantry unit.", "Sailing Ship has burst weapon type, the damage will be weak againts artillery and base, but accurate to attack infantry unit.", "Rocket Ship has explosive weapon type, the damage will be good againts artillery and base.", "Destroyer has very explosive weapon type, the damage will be good againts all units and buildings.", "Gun Tower has burst weapon type, the damage will be weak againts artillery and base, but accurate to attack infantry unit.", "Bomb Tower has explosive weapon type, the damage will be good againts artillery and base.", "Rocket Tower has explosive weapon type, the damage will be good againts artillery and base.", "Misisle Tower has explosive weapon type, the damage will be good againts artillery and base, this tower will attack enemy with locking the target.", "Missile Strike has explosive weapon type, the damage will be good againts artillery and base.", "Bombs Attack has explosive weapon type, the damage will be good againts artillery and base.", "Rockets Rain has explosive weapon type, the damage will be good againts artillery and base.", "Atomic Bomb has extremely explosive weapon type, the damage will be good againts all units and buildings.");
} else if (pilihKerajaan == 2) {
penjelasanWeapon = new Array("", "Rifle Man has burst weapon type, the damage will be weak againts artillery and base, but accurate to attack infantry unit.", "Mortar Man has explosive weapon type, the damage will be good againts artillery and base.", "Rocket Man has explosive weapon type, the damage will be good againts artillery and base.", "Zombie has infected weapon type, this unit will infect any enemies and cause it brainwashed and attack own nations.", "Combat Tank has explosive weapon type, the damage will be good againts artillery and base.", "Panzer has burst weapon type, the damage will be weak againts artillery and base, but accurate to attack infantry unit.", "Rocket Tank has explosive weapon type, the damage will be good againts artillery and base.", "Toxin Tank has infected weapon type, this unit will infect any enemies and cause it brainwashed and attack own nations.", "Combat Jet has burst weapon type, the damage will be weak againts artillery and base, but accurate to attack infantry unit.", "Rocket Jet has explosive weapon type, the damage will be good againts artillery and base.", "Bomber Jet has explosive weapon type, the damage will be good againts artillery and base, this unit will attack to the ground unit.", "Zhotnapalm has very explosive weapon type, the damage will be good againts artillery and base, this unit will attack to the ground unit.", "Jetski has burst weapon type, the damage will be weak againts artillery and base, but accurate to attack infantry unit.", "Sailing Ship has burst weapon type, the damage will be weak againts artillery and base, but accurate to attack infantry unit.", "Rocket Ship has explosive weapon type, the damage will be good againts artillery and base.", "Ghostroyer has very explosive weapon type, the damage will be good againts all units and buildings, this unit can't be detection when move.", "Gun Tower has burst weapon type, the damage will be weak againts artillery and base, but accurate to attack infantry unit.", "Bomb Tower has explosive weapon type, the damage will be good againts artillery and base.", "Rocket Tower has explosive weapon type, the damage will be good againts artillery and base.", "Toxin Tower has infected weapon type, this unit will infect any enemies and cause it brainwashed and attack own nations.", "Missile Strike has explosive weapon type, the damage will be good againts artillery and base.", "Bombs Attack has explosive weapon type, the damage will be good againts artillery and base.", "Rockets Rain has explosive weapon type, the damage will be good againts artillery and base.", "Atomic Bomb has extremely explosive weapon type, the damage will be good againts all units and buildings.");
} else if (pilihKerajaan == 3) {
penjelasanWeapon = new Array("", "Rifle Man has burst weapon type, the damage will be weak againts artillery and base, but accurate to attack infantry unit.", "Mortar Man has explosive weapon type, the damage will be good againts artillery and base.", "Rocket Man has explosive weapon type, the damage will be good againts artillery and base.", "Bomber Man has very explosive weapon type, this unit will self destruction in order to kill enemy in certain areas.", "Combat Tank has explosive weapon type, the damage will be good againts artillery and base.", "Panzer has burst weapon type, the damage will be weak againts artillery and base, but accurate to attack infantry unit.", "Rocket Tank has explosive weapon type, the damage will be good againts artillery and base.", "Zedeadstator has extremely explosive weapon type, the damage will be good againts all type of units and buildings", "Combat Jet has burst weapon type, the damage will be weak againts artillery and base, but accurate to attack infantry unit.", "Rocket Jet has explosive weapon type, the damage will be good againts artillery and base.", "Bomber Jet has explosive weapon type, the damage will be good againts artillery and base, this unit will attack to the ground unit.", "Kamikaze has very explosive weapon type, this unit will self destruction in order to kill enemy in certain areas.", "Jetski has burst weapon type, the damage will be weak againts artillery and base, but accurate to attack infantry unit.", "Sailing Ship has burst weapon type, the damage will be weak againts artillery and base, but accurate to attack infantry unit.", "Rocket Ship has explosive weapon type, the damage will be good againts artillery and base.", "Zmashtroyer has very explosive weapon type, the damage will be good againts all units and buildings, this unit can't be detection when move.", "Gun Tower has burst weapon type, the damage will be weak againts artillery and base, but accurate to attack infantry unit.", "Bomb Tower has explosive weapon type, the damage will be good againts artillery and base.", "Rocket Tower has explosive weapon type, the damage will be good againts artillery and base.", "Flash Tower has extremely explosive weapon type, the damage will be good againts all units and buildings.", "Missile Strike has explosive weapon type, the damage will be good againts artillery and base.", "Bombs Attack has explosive weapon type, the damage will be good againts artillery and base.", "Rockets Rain has explosive weapon type, the damage will be good againts artillery and base.", "Atomic Bomb has extremely explosive weapon type, the damage will be good againts all units and buildings.");
}
if (pilihKerajaan == 1) {
namaKerajaan = "Artemedia - Upgrade & Formation Settings";
} else if (pilihKerajaan == 2) {
namaKerajaan = "Orbelugs - Upgrade & Formation Settings";
} else if (pilihKerajaan == 3) {
namaKerajaan = "Harmatos - Upgrade & Formation Settings";
}
jenisNama11 = "RIFLE MAN";
jenisNama12 = "MORTAR MAN";
jenisNama13 = "ROCKET MAN";
if (pilihKerajaan == 1) {
jenisNama14 = "LASER MAN";
} else if (pilihKerajaan == 2) {
jenisNama14 = "ZOMBIE";
} else if (pilihKerajaan == 3) {
jenisNama14 = "BOMBER MAN";
}
jenisNama21 = "COMBAT TANK";
jenisNama22 = "PANZER";
jenisNama23 = "ROCKET TANK";
if (pilihKerajaan == 1) {
jenisNama24 = "SONIC TANK";
} else if (pilihKerajaan == 2) {
jenisNama24 = "TOXIN TANK";
} else if (pilihKerajaan == 3) {
jenisNama24 = "ZEDEADSTATOR";
}
jenisNama31 = "COMBAT JET";
jenisNama32 = "ROCKET JET";
jenisNama33 = "BOMBER JET";
if (pilihKerajaan == 1) {
jenisNama34 = "STEALTH";
} else if (pilihKerajaan == 2) {
jenisNama34 = "ZHOTNAPALM";
} else if (pilihKerajaan == 3) {
jenisNama34 = "KAMIKAZE";
}
jenisNama41 = "JETSKI";
jenisNama42 = "SAILING SHIP";
jenisNama43 = "ROCKET SHIP";
if (pilihKerajaan == 1) {
jenisNama44 = "DESTROYER";
} else if (pilihKerajaan == 2) {
jenisNama44 = "GHOSTROYER";
} else if (pilihKerajaan == 3) {
jenisNama44 = "ZMASHTROYER";
}
jenisNama51 = "GUN TOWER";
jenisNama52 = "BOMB TOWER";
jenisNama53 = "ROCKET TOWER";
if (pilihKerajaan == 1) {
jenisNama54 = "MISSILE TOWER";
} else if (pilihKerajaan == 2) {
jenisNama54 = "TOXIN TOWER";
} else if (pilihKerajaan == 3) {
jenisNama54 = "FLASH TOWER";
}
jenisNama61 = "MISSILE STRIKE";
jenisNama62 = "BOMBS ATTACK";
jenisNama63 = "ROCKETS RAIN";
jenisNama64 = "ATOMIC BOMB";
cekUnitUpgrade();
info_mc.onEnterFrame = function () {
info_mc._x = _root._xmouse;
info_mc._y = _root._ymouse;
if (indiUpgrade == 6) {
info_mc.nama = "POWER QUANTITY";
} else if (indiUpgrade == 7) {
info_mc.nama = "POWER RECOVERY";
} else {
info_mc.nama = _root["unit" + pilihJenis].namaUnit;
}
if (indiUpgrade == 1) {
if (_root[("lifeLevel" + pilihUpgrade) + pilihJenis] == 10) {
info_mc.xinfo = "LIFE HAS MAXIMUM UPGRADE";
} else {
info_mc.xinfo = ((("UPGRADE LIFE TO LEVEL " + (_root[("lifeLevel" + pilihUpgrade) + pilihJenis] + 1)) + " NEED ") + _root[("lifeLevel" + pilihUpgrade) + pilihJenis]) + " POINT";
}
} else if (indiUpgrade == 2) {
if (_root[("damageLevel" + pilihUpgrade) + pilihJenis] == 10) {
info_mc.xinfo = "UPGRADE HAS MAXIMUM UPGRADE";
} else {
info_mc.xinfo = ((("UPGRADE DAMAGE TO LEVEL " + (_root[("damageLevel" + pilihUpgrade) + pilihJenis] + 1)) + " NEED ") + _root[("damageLevel" + pilihUpgrade) + pilihJenis]) + " POINT";
}
} else if (indiUpgrade == 3) {
if (_root[("speedLevel" + pilihUpgrade) + pilihJenis] == 10) {
info_mc.xinfo = "SPEED HAS MAXIMUM UPGRADE";
} else {
info_mc.xinfo = ((("UPGRADE SPEED TO LEVEL " + (_root[("speedLevel" + pilihUpgrade) + pilihJenis] + 1)) + " NEED ") + _root[("speedLevel" + pilihUpgrade) + pilihJenis]) + " POINT";
}
} else if (indiUpgrade == 4) {
if (_root[("reloadLevel" + pilihUpgrade) + pilihJenis] == 10) {
info_mc.xinfo = "RELOAD HAS MAXIMUM UPGRADE";
} else {
info_mc.xinfo = ((("UPGRADE RELOAD TO LEVEL " + (_root[("reloadLevel" + pilihUpgrade) + pilihJenis] + 1)) + " NEED ") + _root[("reloadLevel" + pilihUpgrade) + pilihJenis]) + " POINT";
}
} else if (indiUpgrade == 5) {
if (_root[("armorLevel" + pilihUpgrade) + pilihJenis] == 10) {
info_mc.xinfo = "ARMOR HAS MAXIMUM UPGRADE";
} else {
info_mc.xinfo = ((("UPGRADE ARMOR TO LEVEL " + (_root[("armorLevel" + pilihUpgrade) + pilihJenis] + 1)) + " NEED ") + _root[("armorLevel" + pilihUpgrade) + pilihJenis]) + " POINT";
}
} else if (indiUpgrade == 6) {
if (quantitiyLevel == 10) {
info_mc.xinfo = "POWER QUANTITY HAS MAXIMUM UPGRADE";
} else {
info_mc.xinfo = ((("UPGRADE POWER QUANTITY TO LEVEL " + (quantitiyLevel + 1)) + " NEED ") + (2 * quantitiyLevel)) + " POINTS";
}
} else if (indiUpgrade == 7) {
if (recoveryLevel == 10) {
info_mc.xinfo = "POWER RECOVERY HAS MAXIMUM UPGRADE";
} else {
info_mc.xinfo = ((("UPGRADE POWER RECOVERY TO LEVEL " + (recoveryLevel + 1)) + " NEED ") + (2 * recoveryLevel)) + " POINTS";
}
}
info_mc.upgrade = "UPGRADE POINT: " + upgradePoint;
};
xupgrade1.onRollOver = (xupgrade2.onRollOver = (xupgrade3.onRollOver = (xupgrade4.onRollOver = (xupgrade5.onRollOver = (xupgrade6.onRollOver = (xupgrade7.onRollOver = function () {
myStr = new String(this);
indiUpgrade = Number(myStr.substr(myStr.length - 1, 1));
info_mc._visible = true;
}))))));
xupgrade1.onRollOut = (xupgrade2.onRollOut = (xupgrade3.onRollOut = (xupgrade4.onRollOut = (xupgrade5.onRollOut = (xupgrade6.onRollOut = (xupgrade7.onRollOut = function () {
info_mc._visible = false;
}))))));
xupgrade1.onRelease = function () {
if ((upgradePoint >= _root[("lifeLevel" + pilihUpgrade) + pilihJenis]) && (_root[("lifeLevel" + pilihUpgrade) + pilihJenis] <= 9)) {
upgradePoint = upgradePoint - _root[("lifeLevel" + pilihUpgrade) + pilihJenis];
_root[("lifeLevel" + pilihUpgrade) + pilihJenis]++;
cekUnitUpgrade();
}
};
xupgrade2.onRelease = function () {
if ((upgradePoint >= _root[("damageLevel" + pilihUpgrade) + pilihJenis]) && (_root[("damageLevel" + pilihUpgrade) + pilihJenis] <= 9)) {
upgradePoint = upgradePoint - _root[("damageLevel" + pilihUpgrade) + pilihJenis];
_root[("damageLevel" + pilihUpgrade) + pilihJenis]++;
cekUnitUpgrade();
}
};
xupgrade3.onRelease = function () {
if ((upgradePoint >= _root[("speedLevel" + pilihUpgrade) + pilihJenis]) && (_root[("speedLevel" + pilihUpgrade) + pilihJenis] <= 9)) {
upgradePoint = upgradePoint - _root[("speedLevel" + pilihUpgrade) + pilihJenis];
_root[("speedLevel" + pilihUpgrade) + pilihJenis]++;
cekUnitUpgrade();
}
};
xupgrade4.onRelease = function () {
if ((upgradePoint >= _root[("reloadLevel" + pilihUpgrade) + pilihJenis]) && (_root[("reloadLevel" + pilihUpgrade) + pilihJenis] <= 9)) {
upgradePoint = upgradePoint - _root[("reloadLevel" + pilihUpgrade) + pilihJenis];
_root[("reloadLevel" + pilihUpgrade) + pilihJenis]++;
cekUnitUpgrade();
}
};
xupgrade5.onRelease = function () {
if ((upgradePoint >= _root[("armorLevel" + pilihUpgrade) + pilihJenis]) && (_root[("armorLevel" + pilihUpgrade) + pilihJenis] <= 9)) {
upgradePoint = upgradePoint - _root[("armorLevel" + pilihUpgrade) + pilihJenis];
_root[("armorLevel" + pilihUpgrade) + pilihJenis]++;
cekUnitUpgrade();
}
};
xupgrade6.onRelease = function () {
if ((upgradePoint >= (2 * quantitiyLevel)) && (quantitiyLevel <= 9)) {
upgradePoint = upgradePoint - (2 * quantitiyLevel);
quantitiyLevel++;
cekUnitUpgrade();
}
};
xupgrade7.onRelease = function () {
if ((upgradePoint >= (2 * recoveryLevel)) && (recoveryLevel <= 9)) {
upgradePoint = upgradePoint - (2 * recoveryLevel);
recoveryLevel++;
cekUnitUpgrade();
}
};
change_btn.onRelease = function () {
if (pilihUpgrade == 1) {
if (pilihJenis != 4) {
_root[("formasiSet" + pilihUpgrade) + pilihJenis]++;
if (_root[("formasiSet" + pilihUpgrade) + pilihJenis] >= 8) {
_root[("formasiSet" + pilihUpgrade) + pilihJenis] = 1;
}
formasi.atur.gotoAndStop(_root[("formasiSet" + pilihUpgrade) + pilihJenis]);
}
} else if (pilihUpgrade <= 4) {
if (pilihJenis != 4) {
_root[("formasiSet" + pilihUpgrade) + pilihJenis]++;
if (_root[("formasiSet" + pilihUpgrade) + pilihJenis] >= 5) {
_root[("formasiSet" + pilihUpgrade) + pilihJenis] = 1;
}
formasi.atur.gotoAndStop(_root[("formasiSet" + pilihUpgrade) + pilihJenis]);
}
}
if (pilihUpgrade <= 4) {
if (pilihJenis == 4) {
_root[("formasiSet" + pilihUpgrade) + pilihJenis]++;
if (_root[("formasiSet" + pilihUpgrade) + pilihJenis] >= 4) {
_root[("formasiSet" + pilihUpgrade) + pilihJenis] = 1;
}
formasi.atur.gotoAndStop(_root[("formasiSet" + pilihUpgrade) + pilihJenis]);
}
}
};
Frame 843
function cekBisa() {
unitInfantry = false;
unitArtilery = false;
unitAir = false;
unitSea = false;
if (tipePerang == "infantry") {
unitInfantry = true;
tipeBase = "bawah";
} else if (tipePerang == "infanarti") {
unitInfantry = true;
unitArtilery = true;
tipeBase = "bawah";
} else if (tipePerang == "artilery") {
unitArtilery = true;
tipeBase = "bawah";
} else if (tipePerang == "land") {
unitInfantry = true;
unitArtilery = true;
unitAir = true;
tipeBase = "semua";
} else if (tipePerang == "navy") {
unitSea = true;
tipeBase = "bawah";
} else if (tipePerang == "sea1") {
unitSea = true;
unitAir = true;
tipeBase = "semua";
} else if (tipePerang == "sea2") {
unitInfantry = true;
unitArtilery = true;
unitSea = true;
tipeBase = "semua";
} else if (tipePerang == "air") {
unitAir = true;
tipeBase = "semua";
}
}
function munculSiapa(indi) {
if (sulitMap[pilihPeta] == 1) {
delayMusuh = 1.1;
} else if (sulitMap[pilihPeta] == 2) {
delayMusuh = 0.9;
} else if (sulitMap[pilihPeta] == 3) {
delayMusuh = 0.7;
} else if (sulitMap[pilihPeta] == 4) {
delayMusuh = 0.5;
} else {
delayMusuh = 0.3;
}
if (indi == 1) {
clearInterval(idUnitDarat1);
clearInterval(idUnitUdara1);
clearInterval(idUnitLaut1);
if ((yangMain1 == true) && (pilihKerajaan != 1)) {
if (yangMain1 == true) {
randPilih = 0;
yangDipilih = new Array();
if (unitInfantry == true) {
yangDipilih[randPilih] = 1;
randPilih++;
}
if (unitArtilery == true) {
yangDipilih[randPilih] = 2;
randPilih++;
}
if (unitAir == true) {
yangDipilih[randPilih] = 3;
randPilih++;
}
if (unitSea == true) {
yangDipilih[randPilih] = 4;
randPilih++;
}
zrandPilih = random(randPilih);
tipeUnitPilih = yangDipilih[zrandPilih];
if ((prioritasSerang == "udara") && (unitAir == true)) {
idUnitUdara1 = setInterval(munculUnit1, 15000 * delayMusuh, "udara");
} else if (prioritasSerang == "darat") {
randPilih = 0;
yangDipilih = new Array();
if (unitInfantry == true) {
yangDipilih[randPilih] = 1;
randPilih++;
}
if (unitArtilery == true) {
yangDipilih[randPilih] = 2;
randPilih++;
}
if (unitSea == true) {
yangDipilih[randPilih] = 3;
randPilih++;
}
zrandPilih = random(randPilih);
tipeUnitPilih = yangDipilih[zrandPilih];
if (tipeUnitPilih == 1) {
idUnitDarat1 = setInterval(munculUnit1, 7500 * delayMusuh, "darat");
} else if (tipeUnitPilih == 2) {
idUnitDarat1 = setInterval(munculUnit1, 15000 * delayMusuh, "artileri");
} else if (tipeUnitPilih == 3) {
idUnitLaut1 = setInterval(munculUnit1, 10000 * delayMusuh, "laut");
}
} else if (tipeUnitPilih == 1) {
idUnitDarat1 = setInterval(munculUnit1, 7500 * delayMusuh, "darat");
} else if (tipeUnitPilih == 2) {
idUnitDarat1 = setInterval(munculUnit1, 15000 * delayMusuh, "artileri");
} else if (tipeUnitPilih == 3) {
idUnitUdara1 = setInterval(munculUnit1, 15000 * delayMusuh, "udara");
} else if (tipeUnitPilih == 4) {
idUnitLaut1 = setInterval(munculUnit1, 10000 * delayMusuh, "laut");
}
}
}
} else if (indi == 2) {
clearInterval(idUnitDarat2);
clearInterval(idUnitUdara2);
clearInterval(idUnitLaut2);
if ((yangMain2 == true) && (pilihKerajaan != 2)) {
randPilih = 0;
yangDipilih = new Array();
if (unitInfantry == true) {
yangDipilih[randPilih] = 1;
randPilih++;
}
if (unitArtilery == true) {
yangDipilih[randPilih] = 2;
randPilih++;
}
if (unitAir == true) {
yangDipilih[randPilih] = 3;
randPilih++;
}
if (unitSea == true) {
yangDipilih[randPilih] = 4;
randPilih++;
}
zrandPilih = random(randPilih);
tipeUnitPilih = yangDipilih[zrandPilih];
if ((prioritasSerang == "udara") && (unitAir == true)) {
idUnitUdara2 = setInterval(munculUnit2, 15000 * delayMusuh, "udara");
} else if (prioritasSerang == "darat") {
randPilih = 0;
yangDipilih = new Array();
if (unitInfantry == true) {
yangDipilih[randPilih] = 1;
randPilih++;
}
if (unitArtilery == true) {
yangDipilih[randPilih] = 2;
randPilih++;
}
if (unitSea == true) {
yangDipilih[randPilih] = 3;
randPilih++;
}
zrandPilih = random(randPilih);
tipeUnitPilih = yangDipilih[zrandPilih];
if (tipeUnitPilih == 1) {
idUnitDarat2 = setInterval(munculUnit2, 7500 * delayMusuh, "darat");
} else if (tipeUnitPilih == 2) {
idUnitDarat2 = setInterval(munculUnit2, 15000 * delayMusuh, "artileri");
} else if (tipeUnitPilih == 3) {
idUnitLaut2 = setInterval(munculUnit2, 10000 * delayMusuh, "laut");
}
} else if (tipeUnitPilih == 1) {
idUnitDarat2 = setInterval(munculUnit2, 7500 * delayMusuh, "darat");
} else if (tipeUnitPilih == 2) {
idUnitDarat2 = setInterval(munculUnit2, 15000 * delayMusuh, "artileri");
} else if (tipeUnitPilih == 3) {
idUnitUdara2 = setInterval(munculUnit2, 15000 * delayMusuh, "udara");
} else if (tipeUnitPilih == 4) {
idUnitLaut2 = setInterval(munculUnit2, 10000 * delayMusuh, "laut");
}
}
} else if (indi == 3) {
clearInterval(idUnitDarat3);
clearInterval(idUnitUdara3);
clearInterval(idUnitLaut3);
if ((yangMain3 == true) && (pilihKerajaan != 3)) {
randPilih = 0;
yangDipilih = new Array();
if (unitInfantry == true) {
yangDipilih[randPilih] = 1;
randPilih++;
}
if (unitArtilery == true) {
yangDipilih[randPilih] = 2;
randPilih++;
}
if (unitAir == true) {
yangDipilih[randPilih] = 3;
randPilih++;
}
if (unitSea == true) {
yangDipilih[randPilih] = 4;
randPilih++;
}
zrandPilih = random(randPilih);
tipeUnitPilih = yangDipilih[zrandPilih];
if ((prioritasSerang == "udara") && (unitAir == true)) {
idUnitUdara3 = setInterval(munculUnit3, 20000 * delayMusuh, "udara");
} else if (prioritasSerang == "darat") {
randPilih = 0;
yangDipilih = new Array();
if (unitInfantry == true) {
yangDipilih[randPilih] = 1;
randPilih++;
}
if (unitArtilery == true) {
yangDipilih[randPilih] = 2;
randPilih++;
}
if (unitSea == true) {
yangDipilih[randPilih] = 3;
randPilih++;
}
zrandPilih = random(randPilih);
tipeUnitPilih = yangDipilih[zrandPilih];
if (tipeUnitPilih == 1) {
idUnitDarat3 = setInterval(munculUnit3, 7500 * delayMusuh, "darat");
} else if (tipeUnitPilih == 2) {
idUnitDarat3 = setInterval(munculUnit3, 15000 * delayMusuh, "artileri");
} else if (tipeUnitPilih == 3) {
idUnitLaut3 = setInterval(munculUnit3, 10000 * delayMusuh, "laut");
}
} else if (tipeUnitPilih == 1) {
idUnitDarat3 = setInterval(munculUnit3, 7500 * delayMusuh, "darat");
} else if (tipeUnitPilih == 2) {
idUnitDarat3 = setInterval(munculUnit3, 15000 * delayMusuh, "artileri");
} else if (tipeUnitPilih == 3) {
idUnitUdara3 = setInterval(munculUnit3, 15000 * delayMusuh, "udara");
} else if (tipeUnitPilih == 4) {
idUnitLaut3 = setInterval(munculUnit3, 10000 * delayMusuh, "laut");
}
}
}
}
function init() {
xback = attachMovie("back" + pilihPeta, "back_mc", 1);
xback.gotoAndStop(pilihMap);
xback._x = 0;
xback._y = 0;
xback._xscale = 105;
xback.cacheAsBitmap;
xback.onEnterFrame = enterBack;
tentaraAwal = 3000;
tentaraAwal2 = 3171;
banyakTentara = 3000;
banyakTentara2 = 3171;
zbanyakTentara = 3000;
totalUnit = 3150;
totalUnit2 = 3250;
bykKotak = 80000 /* 0x013880 */;
curHalang = 0;
curSemak = 0;
curTuret = 0;
maxTuret = 20;
maxHalang = 25;
maxSemak = 25;
bykLedak = 90000 /* 0x015F90 */;
bykSemak = 1000;
banyakPeluru = 70000 /* 0x011170 */;
dalamMisile = 90901 /* 0x016315 */;
klikMouse = 2;
zgold = 20000;
zday = 1;
jenisUnitPilih = 1;
zunit1 = 1000;
zunit2 = 1000;
zunit3 = 1000;
siapaMenang = 0;
jumlahPetarung = 0;
prioritasSerang = "";
xpersen = 0;
scoreAwalSekali = 0;
awalUnlocked = false;
sedangSasar = false;
sedangBuatTower = false;
sedangPause = false;
if (pilihKerajaan == 1) {
if (zjenisMusuh[pilihPeta] == 2) {
yangMain1 = true;
yangMain2 = true;
yangMain3 = false;
} else if (zjenisMusuh[pilihPeta] == 3) {
yangMain1 = true;
yangMain2 = false;
yangMain3 = true;
} else {
yangMain1 = true;
yangMain2 = true;
yangMain3 = true;
}
} else if (pilihKerajaan == 2) {
if (zjenisMusuh[pilihPeta] == 1) {
yangMain1 = true;
yangMain2 = true;
yangMain3 = false;
} else if (zjenisMusuh[pilihPeta] == 3) {
yangMain1 = false;
yangMain2 = true;
yangMain3 = true;
} else {
yangMain1 = true;
yangMain2 = true;
yangMain3 = true;
}
} else if (pilihKerajaan == 3) {
if (zjenisMusuh[pilihPeta] == 1) {
yangMain1 = true;
yangMain2 = false;
yangMain3 = true;
} else if (zjenisMusuh[pilihPeta] == 2) {
yangMain1 = false;
yangMain2 = true;
yangMain3 = true;
} else {
yangMain1 = true;
yangMain2 = true;
yangMain3 = true;
}
}
i = 1;
while (i <= 3) {
if (_root["yangMain" + i] == true) {
jumlahPetarung++;
}
i++;
}
if (jumlahPetarung == 2) {
musuhSiapa = 2;
} else {
musuhSiapa = 3;
}
xjumlahPetarung = jumlahPetarung;
if (pilihKerajaan == 1) {
kerajaan1 = "jagoan";
kerajaan2 = "musuh";
kerajaan3 = "musuh";
} else if (pilihKerajaan == 2) {
kerajaan1 = "musuh";
kerajaan2 = "jagoan";
kerajaan3 = "musuh";
} else if (pilihKerajaan == 3) {
kerajaan1 = "musuh";
kerajaan2 = "musuh";
kerajaan3 = "jagoan";
}
if (yangMain1 == true) {
if (pilihKerajaan == 1) {
xpowerKini1 = 100 + (quantitiyLevel * 10);
xpowerMax1 = 100 + (quantitiyLevel * 10);
} else if (sulitMap[pilihPeta] == 1) {
xpowerKini1 = 100;
xpowerMax1 = 100;
} else if (sulitMap[pilihPeta] == 2) {
xpowerKini1 = 125;
xpowerMax1 = 125;
} else if (sulitMap[pilihPeta] == 3) {
xpowerKini1 = 150;
xpowerMax1 = 150;
} else if (sulitMap[pilihPeta] == 4) {
xpowerKini1 = 175;
xpowerMax1 = 175;
} else {
xpowerKini1 = 200;
xpowerMax1 = 200;
}
} else {
xpowerKini1 = 0;
xpowerMax1 = 0;
}
if (yangMain2 == true) {
if (pilihKerajaan == 2) {
xpowerKini2 = 100 + (quantitiyLevel * 10);
xpowerMax2 = 100 + (quantitiyLevel * 10);
} else if (sulitMap[pilihPeta] == 1) {
xpowerKini2 = 100;
xpowerMax2 = 100;
} else if (sulitMap[pilihPeta] == 2) {
xpowerKini2 = 125;
xpowerMax2 = 125;
} else if (sulitMap[pilihPeta] == 3) {
xpowerKini2 = 150;
xpowerMax2 = 150;
} else if (sulitMap[pilihPeta] == 4) {
xpowerKini2 = 175;
xpowerMax2 = 175;
} else {
xpowerKini2 = 200;
xpowerMax2 = 200;
}
} else {
xpowerKini2 = 0;
xpowerMax2 = 0;
}
if (yangMain3 == true) {
if (pilihKerajaan == 3) {
xpowerKini3 = 100 + (quantitiyLevel * 10);
xpowerMax3 = 100 + (quantitiyLevel * 10);
} else if (sulitMap[pilihPeta] == 1) {
xpowerKini3 = 100;
xpowerMax3 = 100;
} else if (sulitMap[pilihPeta] == 2) {
xpowerKini3 = 125;
xpowerMax3 = 125;
} else if (sulitMap[pilihPeta] == 3) {
xpowerKini3 = 150;
xpowerMax3 = 150;
} else if (sulitMap[pilihPeta] == 4) {
xpowerKini3 = 175;
xpowerMax3 = 175;
} else {
xpowerKini3 = 200;
xpowerMax3 = 200;
}
} else {
xpowerKini3 = 0;
xpowerMax3 = 0;
}
jumlahUnit1 = 0;
jumlahUnit2 = 0;
jumlahUnit3 = 0;
jenisMain = "real";
sudahSelesai = false;
namaUnit1 = new Array("", "Gun Troop", "Mortar Troop", "Rocket Troop", "Laser Troop");
namaUnit2 = new Array("", "Gun Troop", "Mortar Troop", "Rocket Troop", "Zombie Troop");
namaUnit3 = new Array("", "Gun Troop", "Mortar Troop", "Rocket Troop", "Bomber Troop");
i = 1;
while (i <= 3) {
_root["baseAtas" + i] = 0;
_root["baseBawah" + i] = 0;
i++;
}
}
function pilihUnit(indi) {
if (indi == 1) {
geserBerapa = 0;
} else if (indi == 2) {
geserBerapa = 400;
} else if (indi == 3) {
geserBerapa = 800;
}
back_mc._x = back_mc._x - geserBerapa;
i = 1;
while (i <= 39) {
j = 2;
while (j <= 9) {
_root[("kotak" + i) + j]._x = _root[("kotak" + i) + j]._x - geserBerapa;
j++;
}
i++;
}
i = 3000;
while (i <= totalUnit2) {
_root["tentara" + i]._x = _root["tentara" + i]._x - geserBerapa;
i++;
}
i = 90000 /* 0x015F90 */;
while (i <= 90005) {
_root["ledak_mc" + i]._x = _root["ledak_mc" + i]._x - geserBerapa;
_root["toxin_mc" + i]._x = _root["toxin_mc" + i]._x - geserBerapa;
i++;
}
i = 1000;
while (i <= 1500) {
_root["halang" + i]._x = _root["halang" + i]._x - geserBerapa;
i++;
}
i = 70000 /* 0x011170 */;
while (i <= 70050) {
_root["peluru" + i]._x = _root["peluru" + i]._x - geserBerapa;
i++;
}
i = 70000 /* 0x011170 */;
while (i <= 70050) {
_root["bomb" + i]._x = _root["bomb" + i]._x - geserBerapa;
i++;
}
i = 90901 /* 0x016315 */;
while (i <= 90991) {
_root["misile" + i]._x = _root["misile" + i]._x - geserBerapa;
_root["misile" + i].targetX = _root["misile" + i].targetX - geserBerapa;
i++;
}
}
function pilihUnit2(indi) {
if (indi == 1) {
geserBerapa = back_mc._x + 5;
} else if (indi == 2) {
geserBerapa = back_mc._x + 400;
} else if (indi == 3) {
geserBerapa = (back_mc._x + 800) - 5;
}
back_mc._x = back_mc._x - geserBerapa;
i = 1;
while (i <= 39) {
j = 2;
while (j <= 9) {
_root[("kotak" + i) + j]._x = _root[("kotak" + i) + j]._x - geserBerapa;
j++;
}
i++;
}
i = 3000;
while (i <= totalUnit2) {
_root["tentara" + i]._x = _root["tentara" + i]._x - geserBerapa;
i++;
}
i = 90000 /* 0x015F90 */;
while (i <= 90005) {
_root["ledak_mc" + i]._x = _root["ledak_mc" + i]._x - geserBerapa;
_root["toxin_mc" + i]._x = _root["toxin_mc" + i]._x - geserBerapa;
i++;
}
i = 1000;
while (i <= bykSemak) {
_root["halang" + i]._x = _root["halang" + i]._x - geserBerapa;
i++;
}
i = 70000 /* 0x011170 */;
while (i <= 70050) {
_root["peluru" + i]._x = _root["peluru" + i]._x - geserBerapa;
i++;
}
i = 70000 /* 0x011170 */;
while (i <= 70050) {
_root["bomb" + i]._x = _root["bomb" + i]._x - geserBerapa;
i++;
}
i = 90901 /* 0x016315 */;
while (i <= 90991) {
_root["misile" + i]._x = _root["misile" + i]._x - geserBerapa;
_root["misile" + i].targetX = _root["misile" + i].targetX - geserBerapa;
i++;
}
}
function enterBack() {
if (sedangPause == false) {
this._x = this._x + pindahUnit;
}
}
function overUnit() {
tooltip._visible = true;
myStr = new String(this);
if (myStr.length == 22) {
ambilUnit = Number(myStr.substr(myStr.length - 1, 1));
} else {
ambilUnit = Number(myStr.substr(myStr.length - 2, 2));
}
if (jenisUnitPilih == 1) {
xambilUnit = ambilUnit;
} else if (jenisUnitPilih == 2) {
xambilUnit = ambilUnit + 4;
} else if (jenisUnitPilih == 3) {
xambilUnit = ambilUnit + 8;
} else if (jenisUnitPilih == 4) {
xambilUnit = ambilUnit + 12;
} else if (jenisUnitPilih == 5) {
xambilUnit = ambilUnit + 16;
} else if (jenisUnitPilih == 6) {
xambilUnit = ambilUnit + 20;
}
cekPowerKurang2(xambilUnit);
jenisNama11 = "RIFLE MAN";
jenisNama12 = "MORTAR MAN";
jenisNama13 = "ROCKET MAN";
if (pilihKerajaan == 1) {
jenisNama14 = "LASER MAN";
} else if (pilihKerajaan == 2) {
jenisNama14 = "ZOMBIE";
} else if (pilihKerajaan == 3) {
jenisNama14 = "BOMBER MAN";
}
jenisNama21 = "COMBAT TANK";
jenisNama22 = "PANZER";
jenisNama23 = "ROCKET TANK";
if (pilihKerajaan == 1) {
jenisNama24 = "SONIC TANK";
} else if (pilihKerajaan == 2) {
jenisNama24 = "TOXIN TANK";
} else if (pilihKerajaan == 3) {
jenisNama24 = "ZEDEADSTATOR";
}
jenisNama31 = "COMBAT JET";
jenisNama32 = "ROCKET JET";
jenisNama33 = "BOMBER JET";
if (pilihKerajaan == 1) {
jenisNama34 = "STEALTH";
} else if (pilihKerajaan == 2) {
jenisNama34 = "ZHOTNAPALM";
} else if (pilihKerajaan == 3) {
jenisNama34 = "KAMIKAZE";
}
jenisNama41 = "JETSKI";
jenisNama42 = "SAILING SHIP";
jenisNama43 = "ROCKET SHIP";
if (pilihKerajaan == 1) {
jenisNama44 = "DESTROYER";
} else if (pilihKerajaan == 2) {
jenisNama44 = "GHOSTROYER";
} else if (pilihKerajaan == 3) {
jenisNama44 = "ZMASHTROYER";
}
jenisNama51 = "GUN TOWER";
jenisNama52 = "BOMB TOWER";
jenisNama53 = "ROCKET TOWER";
if (pilihKerajaan == 1) {
jenisNama54 = "MISSILE TOWER";
} else if (pilihKerajaan == 2) {
jenisNama54 = "TOXIN TOWER";
} else if (pilihKerajaan == 3) {
jenisNama54 = "FLASH TOWER";
}
jenisNama61 = "MISSILE STRIKE";
jenisNama62 = "BOMBS ATTACK";
jenisNama63 = "ROCKETS RAIN";
jenisNama64 = "ATOMIC BOMB";
tooltip.nama = ("Need " + zberkurangPower) + " Power";
tooltip.unit = _root[("jenisNama" + jenisUnitPilih) + ambilUnit];
}
function overFormasi() {
myStr = new String(this);
if (myStr.length == 25) {
ambilUnit = Number(myStr.substr(myStr.length - 1, 1));
} else {
ambilUnit = Number(myStr.substr(myStr.length - 2, 2));
}
jenisNama11 = "RIFLE MAN";
jenisNama12 = "MORTAR MAN";
jenisNama13 = "ROCKET MAN";
if (pilihKerajaan == 1) {
jenisNama14 = "LASER MAN";
} else if (pilihKerajaan == 2) {
jenisNama14 = "ZOMBIE";
} else if (pilihKerajaan == 3) {
jenisNama14 = "BOMBER MAN";
}
jenisNama21 = "COMBAT TANK";
jenisNama22 = "PANZER";
jenisNama23 = "ROCKET TANK";
if (pilihKerajaan == 1) {
jenisNama24 = "SONIC TANK";
} else if (pilihKerajaan == 2) {
jenisNama24 = "TOXIN TANK";
} else if (pilihKerajaan == 3) {
jenisNama24 = "ZEDEADSTATOR";
}
jenisNama31 = "COMBAT JET";
jenisNama32 = "ROCKET JET";
jenisNama33 = "BOMBER JET";
if (pilihKerajaan == 1) {
jenisNama34 = "STEALTH";
} else if (pilihKerajaan == 2) {
jenisNama34 = "ZHOTNAPALM";
} else if (pilihKerajaan == 3) {
jenisNama34 = "KAMIKAZE";
}
jenisNama41 = "JETSKI";
jenisNama42 = "SAILING SHIP";
jenisNama43 = "ROCKET SHIP";
if (pilihKerajaan == 1) {
jenisNama44 = "DESTROYER";
} else if (pilihKerajaan == 2) {
jenisNama44 = "GHOSTROYER";
} else if (pilihKerajaan == 3) {
jenisNama44 = "ZMASHTROYER";
}
jenisNama51 = "GUN TOWER";
jenisNama52 = "BOMB TOWER";
jenisNama53 = "ROCKET TOWER";
if (pilihKerajaan == 1) {
jenisNama54 = "MISSILE TOWER";
} else if (pilihKerajaan == 2) {
jenisNama54 = "TOXIN TOWER";
} else if (pilihKerajaan == 3) {
jenisNama54 = "FLASH TOWER";
}
tooltip._visible = true;
tooltip.nama = "Set Formation";
tooltip.unit = _root[("jenisNama" + jenisUnitPilih) + ambilUnit];
}
function outFormasi() {
tooltip._visible = false;
}
function outUnit() {
tooltip._visible = false;
}
function enterUnit() {
if (sedangPause == false) {
tooltip._x = _root._xmouse;
tooltip._y = _root._ymouse - 50;
}
}
function buatFrame() {
frame = attachMovie("frame_mc", "frame_mc", 100000);
frame._x = 2;
frame._y = 400;
frame.onEnterFrame = xenterFrame;
frame.jenisInfo = 1;
frame.info1.gotoAndStop(2);
frame.info2.gotoAndStop(1);
frame.info3.gotoAndStop(1);
frame.info1.onRelease = function () {
frame.jenisInfo = 1;
frame.info1.gotoAndStop(2);
frame.info2.gotoAndStop(1);
frame.info3.gotoAndStop(1);
};
frame.info2.onRelease = function () {
frame.jenisInfo = 2;
frame.info1.gotoAndStop(1);
frame.info2.gotoAndStop(2);
frame.info3.gotoAndStop(1);
};
frame.info3.onRelease = function () {
frame.jenisInfo = 3;
frame.info1.gotoAndStop(1);
frame.info2.gotoAndStop(1);
frame.info3.gotoAndStop(2);
};
i = 1;
while (i <= 15) {
frame["antrian" + i].gotoAndStop(100);
frame["antrian" + i].onRelease = klikAntrian;
frame["antrian" + i].onRollOver = overAntrian;
frame["antrian" + i].onRollOut = outAntrian;
frame["antrian" + i].onEnterFrame = enterAntrian;
frame["formasi" + i].onRelease = klikFormasi;
frame["formasi" + i].onRollOver = overFormasi;
frame["formasi" + i].onRollOut = outFormasi;
i++;
}
frame.cancel_mc.onRelease = klikCancel;
formasiAda = false;
antrianKini = 0;
formasiAntrian = new Array();
i = 1;
while (i <= 4) {
frame["unit" + i].onRelease = klikUnit;
frame["unit" + i].onRollOver = overUnit;
frame["unit" + i].onRollOut = outUnit;
frame["unit" + i].onEnterFrame = enterUnit;
i++;
}
tooltip = attachMovie("tooltip", "tooltip", 100014);
tooltip._visible = false;
tooltip._x = _root._xmouse;
tooltip._y = _root._ymouse;
zformasi1 = attachMovie("formasi_mc1", "formasi_mc1", 100015);
zformasi2 = attachMovie("formasi_mc2", "formasi_mc2", 100016);
zformasi1._x = _root._xmouse;
zformasi2._x = _root._xmouse;
zformasi1._y = _root._ymouse;
zformasi2._y = _root._ymouse;
zformasi1._visible = false;
zformasi2._visible = false;
i = 1;
while (i <= 6) {
frame.jenis1.enabled = true;
frame["jenis" + i].onRelease = klikJenis;
frame["jenis" + i].gotoAndStop(1);
i++;
}
if (unitInfantry == false) {
frame.jenis1.enabled = false;
frame.jenis1._alpha = 25;
}
if (unitArtilery == false) {
frame.jenis2.enabled = false;
frame.jenis2._alpha = 25;
}
if (unitAir == false) {
frame.jenis3.enabled = false;
frame.jenis3._alpha = 25;
}
if (unitSea == false) {
frame.jenis4.enabled = false;
frame.jenis4._alpha = 25;
}
i = 1;
while (i <= 6) {
if (frame["jenis" + i].enabled == true) {
jenisUnitPilih = i;
i = 6;
}
i++;
}
i = 2;
while (i <= 4) {
frame["silang" + i]._visible = false;
i++;
}
if (sulitMap[pilihPeta] == 1) {
i = 2;
while (i <= 4) {
frame["unit" + i].enabled = false;
frame["unit" + i]._alpha = 25;
frame["silang" + i]._visible = true;
i++;
}
} else if (sulitMap[pilihPeta] == 2) {
i = 3;
while (i <= 4) {
frame["unit" + i].enabled = false;
frame["unit" + i]._alpha = 25;
frame["silang" + i]._visible = true;
i++;
}
} else if (sulitMap[pilihPeta] == 3) {
i = 4;
while (i <= 4) {
frame["unit" + i].enabled = false;
frame["unit" + i]._alpha = 25;
frame["silang" + i]._visible = true;
i++;
}
}
pilihJenis(jenisUnitPilih);
frame["jenis" + jenisUnitPilih].gotoAndStop(2);
if (recoveryLevel == 1) {
regenMin = 1;
} else if (recoveryLevel == 2) {
regenMin = 0.95;
} else if (recoveryLevel == 3) {
regenMin = 0.9;
} else if (recoveryLevel == 4) {
regenMin = 0.85;
} else if (recoveryLevel == 5) {
regenMin = 0.8;
} else if (recoveryLevel == 6) {
regenMin = 0.75;
} else if (recoveryLevel == 7) {
regenMin = 0.7;
} else if (recoveryLevel == 8) {
regenMin = 0.65;
} else if (recoveryLevel == 9) {
regenMin = 0.6;
} else if (recoveryLevel == 10) {
regenMin = 0.5;
}
if (pilihKerajaan == 1) {
idRegenPower1 = setInterval(regenPower1, 300 * regenMin);
if (sulitMap[pilihPeta] == 1) {
idRegenPower2 = setInterval(regenPower2, 300);
idRegenPower3 = setInterval(regenPower3, 300);
} else if (sulitMap[pilihPeta] == 2) {
idRegenPower2 = setInterval(regenPower2, 275);
idRegenPower3 = setInterval(regenPower3, 275);
} else if (sulitMap[pilihPeta] == 3) {
idRegenPower2 = setInterval(regenPower2, 225);
idRegenPower3 = setInterval(regenPower3, 225);
} else if (sulitMap[pilihPeta] == 4) {
idRegenPower2 = setInterval(regenPower2, 175);
idRegenPower3 = setInterval(regenPower3, 175);
} else {
idRegenPower2 = setInterval(regenPower2, 150);
idRegenPower3 = setInterval(regenPower3, 150);
}
} else if (pilihKerajaan == 2) {
idRegenPower2 = setInterval(regenPower2, 300 * regenMin);
if (sulitMap[pilihPeta] == 1) {
idRegenPower1 = setInterval(regenPower1, 300);
idRegenPower3 = setInterval(regenPower3, 300);
} else if (sulitMap[pilihPeta] == 2) {
idRegenPower1 = setInterval(regenPower1, 275);
idRegenPower3 = setInterval(regenPower3, 275);
} else if (sulitMap[pilihPeta] == 3) {
idRegenPower1 = setInterval(regenPower1, 225);
idRegenPower3 = setInterval(regenPower3, 225);
} else if (sulitMap[pilihPeta] == 4) {
idRegenPower1 = setInterval(regenPower1, 175);
idRegenPower3 = setInterval(regenPower3, 175);
} else {
idRegenPower1 = setInterval(regenPower1, 150);
idRegenPower3 = setInterval(regenPower3, 150);
}
} else if (pilihKerajaan == 3) {
idRegenPower3 = setInterval(regenPower3, 300 * regenMin);
if (sulitMap[pilihPeta] == 1) {
idRegenPower1 = setInterval(regenPower1, 300);
idRegenPower2 = setInterval(regenPower2, 300);
} else if (sulitMap[pilihPeta] == 2) {
idRegenPower1 = setInterval(regenPower1, 275);
idRegenPower2 = setInterval(regenPower2, 275);
} else if (sulitMap[pilihPeta] == 3) {
idRegenPower1 = setInterval(regenPower1, 225);
idRegenPower2 = setInterval(regenPower2, 225);
} else if (sulitMap[pilihPeta] == 4) {
idRegenPower1 = setInterval(regenPower1, 175);
idRegenPower2 = setInterval(regenPower2, 175);
} else {
idRegenPower1 = setInterval(regenPower1, 150);
idRegenPower2 = setInterval(regenPower2, 150);
}
}
frame_mc.option_btn.onRelease = function () {
if (sedangPause == false) {
sedangPause = true;
cekPause(true);
} else if (sedangPause == true) {
sedangPause = false;
cekPause(false);
}
};
frame_mc.surrender_btn.onRelease = function () {
this.enabled = false;
_root["banyakBase" + pilihKerajaan] = _root["maxBase" + pilihKerajaan];
if (_root["banyakBase" + pilihKerajaan] >= _root["maxBase" + pilihKerajaan]) {
_root["sudahKalah" + pilihKerajaan] = true;
cekBerakhir();
}
};
frame_mc.silang5._visible = false;
frame_mc.jenis5.enabled = true;
if (((tipePerang == "air") || (tipePerang == "navy")) || (tipePerang == "sea1")) {
frame_mc.silang5._visible = true;
frame_mc.jenis5.enabled = false;
}
}
function cekPause(indi) {
if (indi == true) {
i = 2000;
while (i <= 4000) {
_root["tentara" + i].xindi.stop();
i++;
}
xpause = attachMovie("pause_mc", "pause_mc", 190999);
xpause._x = 400;
xpause._y = 250;
xpause.ok_btn.onRelease = function () {
sedangPause = false;
cekPause(false);
removeMovieClip(pause_mc);
};
xpause.quit_btn.onRelease = function () {
if (pilihMode == 1) {
simpanData();
}
clearSemua();
backMenu();
if (pilihMode == 3) {
loadData();
gotoAndStop (822);
} else {
gotoAndStop (841);
}
};
} else if (indi == false) {
i = 2000;
while (i <= 4000) {
_root["tentara" + i].xindi.play();
i++;
}
removeMovieClip(pause_mc);
}
}
function regenPower1() {
if (sedangPause == false) {
if (yangMain1 == true) {
if (pilihKerajaan == 1) {
xpowerKini1 = xpowerKini1 + 0.5;
if (xpowerKini1 >= xpowerMax1) {
xpowerKini1 = xpowerMax1;
}
} else {
xpowerKini1 = xpowerKini1 + 0.5;
if (xpowerKini1 >= xpowerMax1) {
xpowerKini1 = xpowerMax1;
}
}
}
}
}
function regenPower2() {
if (sedangPause == false) {
if (yangMain2 == true) {
if (pilihKerajaan == 2) {
xpowerKini2 = xpowerKini2 + 0.75;
if (xpowerKini2 >= xpowerMax2) {
xpowerKini2 = xpowerMax2;
}
} else {
xpowerKini2 = xpowerKini2 + 0.75;
if (xpowerKini2 >= xpowerMax2) {
xpowerKini2 = xpowerMax2;
}
}
}
}
}
function regenPower3() {
if (sedangPause == false) {
if (yangMain3 == true) {
if (pilihKerajaan == 3) {
xpowerKini3 = xpowerKini3 + 0.5;
if (xpowerKini3 >= xpowerMax3) {
xpowerKini3 = xpowerMax3;
}
} else {
xpowerKini3 = xpowerKini3 + 0.5;
if (xpowerKini3 >= xpowerMax3) {
xpowerKini3 = xpowerMax3;
}
}
}
}
}
function klikJenis() {
if (sedangPause == false) {
myStr = new String(this);
jenisUnitPilih = Number(myStr.substr(myStr.length - 1, 1));
pilihJenis(jenisUnitPilih);
}
}
function pilihJenis(indi) {
i = 1;
while (i <= 6) {
frame["jenis" + i].onRelease = klikJenis;
frame["jenis" + i].gotoAndStop(1);
i++;
}
i = 1;
while (i <= 4) {
if (pilihKerajaan == 1) {
frame["unit" + i].gotoAndStop(String(indi));
} else if (pilihKerajaan == 2) {
frame["unit" + i].gotoAndStop(String(indi + 9));
} else if (pilihKerajaan == 3) {
frame["unit" + i].gotoAndStop(String(indi + 19));
}
i++;
}
frame["jenis" + indi].gotoAndStop(2);
i = 2;
while (i <= 4) {
frame["silang" + i]._visible = false;
i++;
}
if (sulitMap[pilihPeta] == 1) {
i = 2;
while (i <= 4) {
frame["unit" + i].enabled = false;
frame["unit" + i]._alpha = 25;
frame["silang" + i]._visible = true;
i++;
}
} else if (sulitMap[pilihPeta] == 2) {
i = 3;
while (i <= 4) {
frame["unit" + i].enabled = false;
frame["unit" + i]._alpha = 25;
frame["silang" + i]._visible = true;
i++;
}
} else if (sulitMap[pilihPeta] == 3) {
i = 4;
while (i <= 4) {
frame["unit" + i].enabled = false;
frame["unit" + i]._alpha = 25;
frame["silang" + i]._visible = true;
i++;
}
}
if (indi == 1) {
i = 1;
while (i <= 4) {
frame["formasi" + i].gotoAndStop(1);
frame["formasi" + i].jenis.gotoAndStop(_root[("formasiSet" + indi) + i]);
i++;
}
} else if (indi <= 4) {
i = 1;
while (i <= 4) {
frame["formasi" + i].gotoAndStop(2);
frame["formasi" + i].jenis.gotoAndStop(_root[("formasiSet" + indi) + i]);
i++;
}
} else {
i = 1;
while (i <= 4) {
frame["formasi" + i].gotoAndStop(3);
i++;
}
}
}
function xenterFrame() {
if (sedangPause == false) {
this.xgold = zgold;
this.xday = zday;
if (this.jenisInfo == 1) {
this.artemedia = "Artemedia Base";
this.orbelugs = "Orbelugs Base";
this.harmatos = "Harmatos Base";
this.xjenis1 = _root.maxBase1 - _root.banyakBase1;
this.xjenis2 = _root.maxBase2 - _root.banyakBase2;
this.xjenis3 = _root.maxBase3 - _root.banyakBase3;
} else if (this.jenisInfo == 2) {
this.artemedia = "Artemedia Power";
this.orbelugs = "Orbelugs Power";
this.harmatos = "Harmatos Power";
this.xjenis1 = Math.ceil(xpowerKini1);
this.xjenis2 = Math.ceil(xpowerKini2);
this.xjenis3 = Math.ceil(xpowerKini3);
} else if (this.jenisInfo == 3) {
this.artemedia = "Artemedia Unit";
this.orbelugs = "Orbelugs Unit";
this.harmatos = "Harmatos Unit";
this.xjenis1 = jumlahUnit1;
this.xjenis2 = jumlahUnit2;
this.xjenis3 = jumlahUnit3;
}
this.persenx = Math.ceil((_root["xpowerKini" + pilihKerajaan] / _root["xpowerMax" + pilihKerajaan]) * 100);
this.bar_mc.bar._xscale = this.persenx;
if (_root["xpowerKini" + pilihKerajaan] == _root["xpowerMax" + pilihKerajaan]) {
this.bar_mc.gotoAndStop(2);
} else {
this.bar_mc.gotoAndStop(1);
}
this.xscore = score;
this.xday = hari;
if (this.antrian1._currentframe == 100) {
this.persentase = "";
this.bar_mcx._visible = false;
} else {
this.persentase = xpersen + "%";
this.bar_mcx._visible = true;
}
this.zpersentase = (("Power: " + Math.ceil(_root["xpowerKini" + pilihKerajaan])) + "/") + Math.ceil(_root["xpowerMax" + pilihKerajaan]);
}
}
function overAntrian() {
if (this._currentframe != 100) {
myStr = new String(this);
if (myStr.length == 25) {
wambilUnit = Number(myStr.substr(myStr.length - 1, 1));
} else {
wambilUnit = Number(myStr.substr(myStr.length - 2, 2));
}
tambahanUnit = (pilihKerajaan - 1) * 20;
if (this._currentframe == (4 + tambahanUnit)) {
zformasi2.jenis.gotoAndStop(formasiAntrian[wambilUnit - 1]);
zformasi1._visible = false;
zformasi2._visible = true;
} else if (this._currentframe >= (5 + tambahanUnit)) {
zformasi1.gotoAndStop(2);
zformasi1.jenis.gotoAndStop(formasiAntrian[wambilUnit - 1]);
zformasi1._visible = true;
zformasi2._visible = false;
} else {
zformasi1.gotoAndStop(1);
zformasi1.jenis.gotoAndStop(formasiAntrian[wambilUnit - 1]);
zformasi1._visible = true;
zformasi2._visible = false;
}
}
}
function outAntrian() {
zformasi1._visible = false;
zformasi2._visible = false;
}
function enterAntrian() {
if (sedangPause == false) {
zformasi1._x = _root._xmouse;
zformasi2._x = _root._xmouse;
zformasi1._y = _root._ymouse - 55;
zformasi2._y = _root._ymouse - 55;
}
}
function klikFormasi() {
if (sedangPause == false) {
tooltip._visible = false;
if (formasiAda == false) {
formasiAda = true;
myStr = new String(this);
if (myStr.length == 25) {
yambilUnit = Number(myStr.substr(myStr.length - 1, 1));
} else {
yambilUnit = Number(myStr.substr(myStr.length - 2, 2));
}
if (yambilUnit == 4) {
formasi = attachMovie("formasi2x", "formasi", 100005);
} else if ((jenisUnitPilih >= 2) && (jenisUnitPilih <= 4)) {
formasi = attachMovie("formasi3x", "formasi", 100005);
} else {
formasi = attachMovie("formasi1x", "formasi", 100005);
}
formasi._x = 425;
formasi._y = _root._ymouse - 40;
formasi.x_btn.onRelease = function () {
formasiAda = false;
yambilUnit = 0;
zambilUnit = 0;
removeMovieClip(formasi);
};
if (pilihKerajaan == 1) {
formasi.setFormasi = "Select formation for " + namaUnit1[yambilUnit];
} else if (pilihKerajaan == 2) {
formasi.setFormasi = "Select formation for " + namaUnit2[yambilUnit];
} else if (pilihKerajaan == 3) {
formasi.setFormasi = "Select formation for " + namaUnit3[yambilUnit];
}
i = 1;
while (i <= 7) {
formasi["atur" + i].gotoAndStop(i);
formasi["atur" + i].onRelease = klikAtur;
i++;
}
} else {
formasiAda = false;
yambilUnit = 0;
zambilUnit = 0;
removeMovieClip(formasi);
}
}
}
function klikAtur() {
if (sedangPause == false) {
myStr = new String(this);
if (myStr.length == 21) {
zambilUnit = Number(myStr.substr(myStr.length - 1, 1));
} else {
zambilUnit = Number(myStr.substr(myStr.length - 2, 2));
}
frame["formasi" + yambilUnit].jenis.gotoAndStop(zambilUnit);
_root[("formasiSet" + jenisUnitPilih) + yambilUnit] = zambilUnit;
formasiAda = false;
yambilUnit = 0;
zambilUnit = 0;
removeMovieClip(formasi);
}
}
function klikAntrian() {
if (sedangPause == false) {
if (this._currentframe != 100) {
zformasi1._visible = false;
zformasi2._visible = false;
myStr = new String(this);
if (myStr.length == 25) {
xambilUnit = Number(myStr.substr(myStr.length - 1, 1));
} else {
xambilUnit = Number(myStr.substr(myStr.length - 2, 2));
}
if (pilihKerajaan == 1) {
cekPowerKurang3(frame["antrian" + xambilUnit]._currentframe, pilihKerajaan);
} else if (pilihKerajaan == 2) {
cekPowerKurang3(frame["antrian" + xambilUnit]._currentframe - 20, pilihKerajaan);
} else {
cekPowerKurang3(frame["antrian" + xambilUnit]._currentframe - 40, pilihKerajaan);
}
gi = xambilUnit + 1;
while (gi <= 16) {
if (gi == 11) {
frame["antrian" + (gi - 1)].gotoAndStop(100);
} else {
frame["antrian" + (gi - 1)].gotoAndStop(frame["antrian" + gi]._currentframe);
}
gi++;
}
formasiAntrian.splice(xambilUnit - 1, 1);
antrianKini--;
if (antrianKini <= 0) {
if (pilihKerajaan == 1) {
antrianKini = 0;
clearInterval(idUnitDarat1);
clearInterval(idUnitUdara1);
clearInterval(idUnitLaut1);
} else if (pilihKerajaan == 2) {
antrianKini = 0;
clearInterval(idUnitDarat2);
clearInterval(idUnitUdara2);
clearInterval(idUnitLaut2);
} else if (pilihKerajaan == 3) {
antrianKini = 0;
clearInterval(idUnitDarat3);
clearInterval(idUnitUdara3);
clearInterval(idUnitLaut3);
}
}
if (xambilUnit == 1) {
cekKeluarLanjut();
}
}
}
}
function klikCancel() {
if (sedangPause == false) {
gi = 0;
while (gi <= 16) {
frame["antrian" + (gi - 1)].gotoAndStop(100);
gi++;
}
formasiAntrian = new Array();
antrianKini = 0;
if (pilihKerajaan == 1) {
clearInterval(idUnitDarat1);
clearInterval(idUnitUdara1);
} else if (pilihKerajaan == 2) {
clearInterval(idUnitDarat2);
clearInterval(idUnitUdara2);
} else if (pilihKerajaan == 3) {
clearInterval(idUnitDarat3);
clearInterval(idUnitUdara3);
}
}
}
function enterXTarget() {
if (sedangPause == false) {
this._x = _root._xmouse;
this._y = _root._ymouse;
}
}
function enterXTarget2() {
if (sedangPause == false) {
this._x = _root._xmouse - 20;
this._y = _root._ymouse + 20;
}
}
function enterMisile() {
if (sedangPause == false) {
this.targetX = this.targetX + pindahUnit;
this.aimX = this.targetX;
this.aimY = this.targetY;
deltaX = this._x - this.aimX;
deltaY = this._y - this.aimY;
angle = (-Math.atan2(deltaX, deltaY)) / (Math.PI/180);
this._rotation = angle;
if (Math.sqrt((deltaX * deltaX) + (deltaY * deltaY)) > this.speed) {
this.speed = this.speed + 0.5;
this._y = this._y - (this.speed * Math.cos(angle * (Math.PI/180)));
this._x = this._x + ((this.speed * Math.sin(angle * (Math.PI/180))) + pindahUnit);
} else {
ledak = attachMovie("ledak_mc7", "ledak_mc" + bykLedak, bykLedak);
ledak._x = this._x;
ledak._y = this._y;
ledak._xscale = (ledak._yscale = 60);
ledak.jenisLedak = "biasa";
ledak.zdelay = false;
bykLedak++;
if (bykLedak >= 90005) {
bykLedak = 90000 /* 0x015F90 */;
}
removeMovieClip(this);
}
}
}
function enterMisile2() {
if (sedangPause == false) {
this.targetX = this.targetX + pindahUnit;
this.aimX = this.targetX;
this.aimY = this.targetY;
deltaX = this._x - this.aimX;
deltaY = this._y - this.aimY;
angle = (-Math.atan2(deltaX, deltaY)) / (Math.PI/180);
this._rotation = angle;
if (Math.sqrt((deltaX * deltaX) + (deltaY * deltaY)) > this.speed) {
this.speed = this.speed + 0.5;
this._y = this._y - (this.speed * Math.cos(angle * (Math.PI/180)));
this._x = this._x + ((this.speed * Math.sin(angle * (Math.PI/180))) + pindahUnit);
} else {
ledak = attachMovie("ledak_mc7", "ledak_mc" + bykLedak, bykLedak);
ledak._x = this._x;
ledak._y = this._y;
ledak._xscale = (ledak._yscale = 100);
ledak.jenisLedak = "megamisil";
ledak.zdelay = false;
bykLedak++;
if (bykLedak >= 90005) {
bykLedak = 90000 /* 0x015F90 */;
}
removeMovieClip(this);
}
}
}
function enterBombe() {
if (sedangPause == false) {
this.targetX = this.targetX + pindahUnit;
this.aimX = this.targetX;
this.aimY = this.targetY;
deltaX = this._x - this.aimX;
deltaY = this._y - this.aimY;
angle = (-Math.atan2(deltaX, deltaY)) / (Math.PI/180);
this._rotation = angle;
if (Math.sqrt((deltaX * deltaX) + (deltaY * deltaY)) > this.speed) {
this.speed = this.speed + 0.1;
this._y = this._y - (this.speed * Math.cos(angle * (Math.PI/180)));
this._x = this._x + ((this.speed * Math.sin(angle * (Math.PI/180))) + pindahUnit);
} else {
ledak = attachMovie("ledak_mc7", "ledak_mc" + bykLedak, bykLedak);
ledak._x = this._x;
ledak._y = this._y;
ledak._xscale = (ledak._yscale = 150);
ledak.jenisLedak = "mortir2x";
ledak.zdelay = false;
bykLedak++;
if (bykLedak >= 90005) {
bykLedak = 90000 /* 0x015F90 */;
}
removeMovieClip(this);
}
}
}
function enterMisile3() {
if (sedangPause == false) {
this.targetX = this.targetX + pindahUnit;
this.aimX = this.targetX;
this.aimY = this.targetY;
deltaX = this._x - this.aimX;
deltaY = this._y - this.aimY;
angle = (-Math.atan2(deltaX, deltaY)) / (Math.PI/180);
this._rotation = angle;
if (Math.sqrt((deltaX * deltaX) + (deltaY * deltaY)) > this.speed) {
this.speed = this.speed + 0.1;
this._y = this._y - (this.speed * Math.cos(angle * (Math.PI/180)));
this._x = this._x + ((this.speed * Math.sin(angle * (Math.PI/180))) + pindahUnit);
} else {
ledak = attachMovie("ledak_mc7", "ledak_mc" + bykLedak, bykLedak);
ledak._x = this._x;
ledak._y = this._y;
ledak._xscale = (ledak._yscale = 400);
ledak.jenisLedak = "megamisil3";
ledak.zdelay = false;
bykLedak++;
if (bykLedak >= 90005) {
bykLedak = 90000 /* 0x015F90 */;
}
removeMovieClip(this);
}
}
}
function klikKotak() {
if (this._alpha != 0) {
if (towerAmbil != undefined) {
myStr = new String(this);
if (myStr.length == 15) {
j = myStr.substr(myStr.length - 1, 1);
i = myStr.substr(myStr.length - 2, 1);
} else if (myStr.length == 16) {
j = myStr.substr(myStr.length - 1, 1);
i = myStr.substr(myStr.length - 3, 2);
}
_root[("kotak" + i) + j].isiTower = true;
zturet = attachMovie(towerAmbil.nama, "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
zturet._x = this._x + 10;
if (j >= 6) {
zturet._y = this._y + 25;
} else {
zturet._y = this._y + 25;
}
zturet.posisiI = i;
zturet.posisiJ = j;
zturet._xscale = (zturet._yscale = 80);
zturet.jenis = pilihKerajaan;
zturet.rupa = "turet";
if (pilihKerajaan == 1) {
zturet.speed = 1;
} else if (pilihKerajaan == 2) {
if (musuhSiapa == 2) {
if (yangMain1 == false) {
zturet.speed = 1;
} else if (yangMain3 == false) {
zturet.speed = -1;
}
} else if (i <= 19) {
zturet.speed = -1;
zturet._xscale = -80;
zturet._x = zturet._x + 10;
} else {
zturet.speed = 1;
zturet._xscale = 80;
}
} else if (pilihKerajaan == 3) {
zturet.speed = -1;
}
if (towerAmbil.xjenis == 1) {
zturet.live = 10000 + random(1000);
zturet.armor = 20 + random(5);
zturet.damage = 15 + random(5);
zturet.range = 3;
} else if (towerAmbil.xjenis == 2) {
zturet.live = 15000 + random(1500);
zturet.armor = 20 + random(5);
zturet.damage = 25 + random(5);
if (zturet.speed == -1) {
zturet.range = 5;
} else {
zturet.range = 4;
}
} else if (towerAmbil.xjenis == 3) {
zturet.live = 25000 + random(2500);
zturet.armor = 20 + random(5);
zturet.damage = 35 + random(5);
if (zturet.speed == -1) {
zturet.range = 7;
} else {
zturet.range = 6;
}
} else if (towerAmbil.xjenis == 4) {
zturet.live = 50000 + random(5000);
zturet.armor = 20 + random(5);
zturet.damage = 45 + random(5);
if (zturet.speed == -1) {
zturet.range = 8;
} else {
zturet.range = 7;
}
}
zturet.totalLive = zturet.live;
zturet.maxLive = zturet.live;
zturet.lahan = "darat";
zturet.tipe = "turet";
zturet.perisai = "orang";
if (towerAmbil.xjenis == 1) {
zturet.tipeSerangan = "normal";
} else if (towerAmbil.xjenis == 2) {
zturet.tipeSerangan = "mortir";
} else if (towerAmbil.xjenis == 3) {
zturet.tipeSerangan = "bazoka";
} else if (towerAmbil.xjenis == 4) {
zturet.tipeSerangan = "destroyer";
}
zturet.ztarget = false;
zturet.ztarget2 = false;
zturet.xtarget = false;
zturet.barisKe = i;
zturet.jenisTipe = 50;
zturet.posisiX = undefined;
zturet.posisiY = undefined;
zturet.diSemak = false;
zturet.mati = false;
zturet.onEnterFrame = enterTentara;
zturet.onRollOver = overTentara;
zturet.onRollOut = outTentara;
zturet.nyawa_mc._visible = false;
banyakTentara2++;
if (banyakTentara2 >= totalUnit2) {
banyakTentara2 = tentaraAwal2 + 25;
}
zbanyakTentara++;
curTuret++;
if (zbanyakTentara >= totalUnit) {
zbanyakTentara = tentaraAwal + 25;
}
sedangBuatTower = false;
cekAreaKotak(false);
removeMovieClip(towerAmbil);
}
}
}
function cekAreaKotak(indi) {
if (tipeBase == "semua") {
batasBaseAtas = 6;
batasBaseBawah = 9;
} else if (tipeBase == "bawah") {
batasBaseAtas = 4;
batasBaseBawah = 7;
}
adaDuaCabang = false;
if (pilihKerajaan == 1) {
batasIAtas = 2;
batasIBawah = 4;
} else if (pilihKerajaan == 2) {
if (musuhSiapa == 2) {
if (yangMain1 == false) {
batasIAtas = 2;
batasIBawah = 4;
} else if (yangMain3 == false) {
batasIAtas = 36;
batasIBawah = 38;
}
} else {
batasIAtas = 17;
batasIBawah = 19;
batasIAtas2 = 22;
batasIBawah2 = 24;
adaDuaCabang = true;
}
} else if (pilihKerajaan == 3) {
batasIAtas = 36;
batasIBawah = 38;
}
i = batasIAtas;
while (i <= batasIBawah) {
j = batasBaseAtas;
while (j <= batasBaseBawah) {
kotak = _root[("kotak" + i) + j];
kotak._x = _root[("kotak" + i) + j]._x;
kotak._y = _root[("kotak" + i) + j]._y;
kotak.bykIsi = 0;
kotak.kotakIsi = 0;
kotak.jenisIsi = "";
kotak.adaSemak = false;
if (indi == true) {
if (kotak.isiTower == false) {
kotak._alpha = 100;
kotak.onRollOver = overKotak;
kotak.onRollOut = outKotak;
kotak.onRelease = klikKotak;
} else {
kotak._alpha = 0;
delete kotak.onRollOver;
delete kotak.onRollOut;
delete kotak.onRelease;
}
} else {
kotak._alpha = 0;
delete kotak.onRollOver;
delete kotak.onRollOut;
delete kotak.onRelease;
}
j++;
}
i++;
}
if (adaDuaCabang == true) {
i = batasIAtas2;
while (i <= batasIBawah2) {
j = batasBaseAtas;
while (j <= batasBaseBawah) {
kotak = _root[("kotak" + i) + j];
kotak._x = _root[("kotak" + i) + j]._x;
kotak._y = _root[("kotak" + i) + j]._y;
kotak.bykIsi = 0;
kotak.kotakIsi = 0;
kotak.jenisIsi = "";
kotak.adaSemak = false;
if (indi == true) {
if (kotak.isiTower == false) {
kotak._alpha = 100;
kotak.onRollOver = overKotak;
kotak.onRollOut = outKotak;
kotak.onRelease = klikKotak;
} else {
kotak._alpha = 0;
delete kotak.onRollOver;
delete kotak.onRollOut;
delete kotak.onRelease;
}
} else {
kotak._alpha = 0;
delete kotak.onRollOver;
delete kotak.onRollOut;
delete kotak.onRelease;
}
j++;
}
i++;
}
}
}
function klikUnit() {
if (sedangPause == false) {
if (jenisUnitPilih == 5) {
if (sedangBuatTower == false) {
myStr = new String(this);
if (myStr.length == 22) {
ambilUnit = Number(myStr.substr(myStr.length - 1, 1));
} else {
ambilUnit = Number(myStr.substr(myStr.length - 2, 2));
}
ambilKeUnit = ambilUnit + ((jenisUnitPilih - 1) * 4);
cekPowerKurang(ambilKeUnit, pilihKerajaan);
if (bisaKeluarUnit == true) {
sedangBuatTower = true;
if (ambilUnit == 1) {
towerAmbil = attachMovie("tentara_mc17" + pilihKerajaan, "towerAmbil", 90900);
towerAmbil.nama = "tentara_mc17" + pilihKerajaan;
} else if (ambilUnit == 2) {
towerAmbil = attachMovie("tentara_mc18" + pilihKerajaan, "towerAmbil", 90900);
towerAmbil.nama = "tentara_mc18" + pilihKerajaan;
} else if (ambilUnit == 3) {
towerAmbil = attachMovie("tentara_mc19" + pilihKerajaan, "towerAmbil", 90900);
towerAmbil.nama = "tentara_mc19" + pilihKerajaan;
} else if (ambilUnit == 4) {
towerAmbil = attachMovie("tentara_mc20" + pilihKerajaan, "towerAmbil", 90900);
towerAmbil.nama = "tentara_mc20" + pilihKerajaan;
}
towerAmbil._xscale = (towerAmbil._yscale = 80);
towerAmbil.jenis = ambilKeUnit;
towerAmbil.xjenis = ambilUnit;
towerAmbil._x = -500;
towerAmbil._y = -500;
towerAmbil.onEnterFrame = enterXTarget2;
cekAreaKotak(true);
}
}
} else if (jenisUnitPilih == 6) {
if (sedangSasar == false) {
myStr = new String(this);
if (myStr.length == 22) {
ambilUnit = Number(myStr.substr(myStr.length - 1, 1));
} else {
ambilUnit = Number(myStr.substr(myStr.length - 2, 2));
}
ambilKeUnit = ambilUnit + ((jenisUnitPilih - 1) * 4);
cekPowerKurang(ambilKeUnit, pilihKerajaan);
if (bisaKeluarUnit == true) {
sedangSasar = true;
xxtarget = attachMovie("xtarget", "xxtarget", 90900);
xxtarget.jenis = ambilKeUnit;
xxtarget._x = -500;
xxtarget._y = -500;
xxtarget.onEnterFrame = enterXTarget;
}
}
} else if (antrianKini < 10) {
myStr = new String(this);
if (myStr.length == 22) {
ambilUnit = Number(myStr.substr(myStr.length - 1, 1));
} else {
ambilUnit = Number(myStr.substr(myStr.length - 2, 2));
}
ambilKeUnit = ambilUnit + ((jenisUnitPilih - 1) * 4);
cekPowerKurang(ambilKeUnit, pilihKerajaan);
tambahanUnit = (pilihKerajaan - 1) * 20;
if (bisaKeluarUnit == true) {
antrianKini++;
if (jenisUnitPilih == 1) {
frame["antrian" + antrianKini].gotoAndStop(ambilUnit + tambahanUnit);
} else if (jenisUnitPilih == 2) {
frame["antrian" + antrianKini].gotoAndStop((ambilUnit + 4) + tambahanUnit);
} else if (jenisUnitPilih == 3) {
frame["antrian" + antrianKini].gotoAndStop((ambilUnit + 8) + tambahanUnit);
} else if (jenisUnitPilih == 4) {
frame["antrian" + antrianKini].gotoAndStop((ambilUnit + 12) + tambahanUnit);
}
formasiAntrian[antrianKini - 1] = frame["formasi" + ambilUnit].jenis._currentframe;
if (antrianKini == 1) {
cekKeluarLanjut();
}
}
}
}
}
function cekKeluarLanjut() {
if (sedangPause == false) {
xpersen = 0;
if (xpersen == 0) {
frame_mc.bar_mcx.gotoAndStop(1);
} else {
frame_mc.bar_mcx.gotoAndStop(xpersen);
}
if (pilihKerajaan == 1) {
clearInterval(idUnitDarat1);
clearInterval(idUnitUdara1);
clearInterval(idUnitLaut1);
} else if (pilihKerajaan == 2) {
clearInterval(idUnitDarat2);
clearInterval(idUnitUdara2);
clearInterval(idUnitLaut2);
} else if (pilihKerajaan == 3) {
clearInterval(idUnitDarat3);
clearInterval(idUnitUdara3);
clearInterval(idUnitLaut3);
}
if (pilihKerajaan == 1) {
if (frame.antrian1._currentframe <= 4) {
xperubahanReload = _root["reloadLevel1" + frame.antrian1._currentframe];
} else if (frame.antrian1._currentframe <= 8) {
xperubahanReload = _root["reloadLevel2" + (frame.antrian1._currentframe - 4)];
} else if (frame.antrian1._currentframe <= 12) {
xperubahanReload = _root["reloadLevel3" + (frame.antrian1._currentframe - 8)];
} else if (frame.antrian1._currentframe <= 16) {
xperubahanReload = _root["speedLevel4" + (frame.antrian1._currentframe - 12)];
} else if (frame.antrian1._currentframe <= 20) {
xperubahanReload = _root["reloadLevel5" + (frame.antrian1._currentframe - 16)];
}
} else if (pilihKerajaan == 2) {
if (frame.antrian1._currentframe <= 24) {
xperubahanReload = _root["reloadLevel1" + (frame.antrian1._currentframe - 20)];
} else if (frame.antrian1._currentframe <= 28) {
xperubahanReload = _root["reloadLevel2" + ((frame.antrian1._currentframe - 4) - 20)];
} else if (frame.antrian1._currentframe <= 32) {
xperubahanReload = _root["reloadLevel3" + ((frame.antrian1._currentframe - 8) - 20)];
} else if (frame.antrian1._currentframe <= 36) {
xperubahanReload = _root["speedLevel4" + ((frame.antrian1._currentframe - 12) - 20)];
} else if (frame.antrian1._currentframe <= 40) {
xperubahanReload = _root["reloadLevel5" + ((frame.antrian1._currentframe - 16) - 20)];
}
} else if (pilihKerajaan == 3) {
if (frame.antrian1._currentframe <= 44) {
xperubahanReload = _root["reloadLevel1" + (frame.antrian1._currentframe - 40)];
} else if (frame.antrian1._currentframe <= 48) {
xperubahanReload = _root["reloadLevel2" + ((frame.antrian1._currentframe - 4) - 40)];
} else if (frame.antrian1._currentframe <= 52) {
xperubahanReload = _root["reloadLevel3" + ((frame.antrian1._currentframe - 8) - 40)];
} else if (frame.antrian1._currentframe <= 56) {
xperubahanReload = _root["speedLevel4" + ((frame.antrian1._currentframe - 12) - 40)];
} else if (frame.antrian1._currentframe <= 60) {
xperubahanReload = _root["reloadLevel5" + ((frame.antrian1._currentframe - 16) - 40)];
}
}
if (xperubahanReload == 1) {
perubahanReload = 0.6;
} else if (xperubahanReload == 2) {
perubahanReload = 0.55;
} else if (xperubahanReload == 3) {
perubahanReload = 0.5;
} else if (xperubahanReload == 4) {
perubahanReload = 0.45;
} else if (xperubahanReload == 5) {
perubahanReload = 0.4;
} else if (xperubahanReload == 6) {
perubahanReload = 0.35;
} else if (xperubahanReload == 7) {
perubahanReload = 0.3;
} else if (xperubahanReload == 8) {
perubahanReload = 0.25;
} else if (xperubahanReload == 9) {
perubahanReload = 0.2;
} else {
perubahanReload = 0.15;
}
if (antrianKini != 0) {
clearInterval(idPersen);
if (pilihKerajaan == 1) {
if (frame.antrian1._currentframe <= 4) {
idPersen = setInterval(cekPersen, 750 * perubahanReload);
idUnitDarat1 = setInterval(munculUnit1, 7500 * perubahanReload, frame.antrian1._currentframe, formasiAntrian[0], "darat");
_root["landDeploy" + pilihKerajaan] = _root["landDeploy" + pilihKerajaan] + 8;
} else if (frame.antrian1._currentframe <= 8) {
idPersen = setInterval(cekPersen, 1500 * perubahanReload);
idUnitDarat1 = setInterval(munculUnit1, 15000 * perubahanReload, frame.antrian1._currentframe, formasiAntrian[0], "artileri");
_root["landDeploy" + pilihKerajaan] = _root["landDeploy" + pilihKerajaan] + 4;
} else if (frame.antrian1._currentframe <= 12) {
idPersen = setInterval(cekPersen, 1500 * perubahanReload);
idUnitUdara1 = setInterval(munculUnit1, 15000 * perubahanReload, frame.antrian1._currentframe, formasiAntrian[0], "udara");
_root["airDeploy" + pilihKerajaan] = _root["airDeploy" + pilihKerajaan] + 4;
} else {
idPersen = setInterval(cekPersen, 1000 * perubahanReload);
idUnitLaut1 = setInterval(munculUnit1, 10000 * perubahanReload, frame.antrian1._currentframe, formasiAntrian[0], "laut");
_root["seaDeploy" + pilihKerajaan] = _root["seaDeploy" + pilihKerajaan] + 4;
_root.seaDeploy++;
}
} else if (pilihKerajaan == 2) {
if (frame.antrian1._currentframe <= 24) {
idPersen = setInterval(cekPersen, 750 * perubahanReload);
idUnitDarat2 = setInterval(munculUnit2, 7500 * perubahanReload, frame.antrian1._currentframe - 20, formasiAntrian[0], "darat");
_root["landDeploy" + pilihKerajaan] = _root["landDeploy" + pilihKerajaan] + 8;
} else if (frame.antrian1._currentframe <= 28) {
idPersen = setInterval(cekPersen, 1500 * perubahanReload);
idUnitDarat2 = setInterval(munculUnit2, 15000 * perubahanReload, frame.antrian1._currentframe - 20, formasiAntrian[0], "artileri");
_root["landDeploy" + pilihKerajaan] = _root["landDeploy" + pilihKerajaan] + 4;
} else if (frame.antrian1._currentframe <= 32) {
idPersen = setInterval(cekPersen, 1500 * perubahanReload);
idUnitUdara2 = setInterval(munculUnit2, 15000 * perubahanReload, frame.antrian1._currentframe - 20, formasiAntrian[0], "udara");
_root["airDeploy" + pilihKerajaan] = _root["airDeploy" + pilihKerajaan] + 4;
} else {
idPersen = setInterval(cekPersen, 1000 * perubahanReload);
idUnitLaut2 = setInterval(munculUnit2, 10000 * perubahanReload, frame.antrian1._currentframe - 20, formasiAntrian[0], "laut");
_root["seaDeploy" + pilihKerajaan] = _root["seaDeploy" + pilihKerajaan] + 4;
}
} else if (pilihKerajaan == 3) {
if (frame.antrian1._currentframe <= 44) {
idPersen = setInterval(cekPersen, 750 * perubahanReload);
idUnitDarat3 = setInterval(munculUnit3, 7500 * perubahanReload, frame.antrian1._currentframe - 40, formasiAntrian[0], "darat");
_root["landDeploy" + pilihKerajaan] = _root["landDeploy" + pilihKerajaan] + 8;
} else if (frame.antrian1._currentframe <= 48) {
idPersen = setInterval(cekPersen, 1500 * perubahanReload);
idUnitDarat3 = setInterval(munculUnit3, 15000 * perubahanReload, frame.antrian1._currentframe - 40, formasiAntrian[0], "artileri");
_root["landDeploy" + pilihKerajaan] = _root["landDeploy" + pilihKerajaan] + 4;
} else if (frame.antrian1._currentframe <= 52) {
idPersen = setInterval(cekPersen, 1500 * perubahanReload);
idUnitUdara3 = setInterval(munculUnit3, 15000 * perubahanReload, frame.antrian1._currentframe - 40, formasiAntrian[0], "udara");
_root["airDeploy" + pilihKerajaan] = _root["airDeploy" + pilihKerajaan] + 4;
} else {
idPersen = setInterval(cekPersen, 1000 * perubahanReload);
idUnitLaut3 = setInterval(munculUnit3, 10000 * perubahanReload, frame.antrian1._currentframe - 40, formasiAntrian[0], "laut");
_root["seaDeploy" + pilihKerajaan] = _root["seaDeploy" + pilihKerajaan] + 4;
}
}
}
}
}
function cekPersen() {
if (sedangPause == false) {
xpersen = xpersen + 10;
if (xpersen == 0) {
frame_mc.bar_mcx.gotoAndStop(100);
} else {
frame_mc.bar_mcx.gotoAndStop(xpersen);
}
if (xpersen >= 100) {
xpersen = 0;
if (xpersen == 0) {
frame_mc.bar_mcx.gotoAndStop(1);
} else {
frame_mc.bar_mcx.gotoAndStop(xpersen);
}
clearInterval(idPersen);
}
}
}
function pindahAntrian(indi) {
if (sedangPause == false) {
if (indi == 1) {
if (pilihKerajaan == 1) {
if (antrianSekali == false) {
if (antrianKini > 0) {
antrianSekali = true;
gi = 2;
while (gi <= 11) {
if (gi == 11) {
frame["antrian" + (gi - 1)].gotoAndStop(100);
} else {
frame["antrian" + (gi - 1)].gotoAndStop(frame["antrian" + gi]._currentframe);
}
gi++;
}
antrianKini--;
if (antrianKini <= 0) {
antrianKini = 0;
}
formasiAntrian.shift();
cekKeluarLanjut();
}
}
}
} else if (indi == 2) {
if (pilihKerajaan == 2) {
if (antrianSekali == false) {
if (antrianKini > 0) {
antrianSekali = true;
gi = 2;
while (gi <= 11) {
if (gi == 11) {
frame["antrian" + (gi - 1)].gotoAndStop(100);
} else {
frame["antrian" + (gi - 1)].gotoAndStop(frame["antrian" + gi]._currentframe);
}
gi++;
}
antrianKini--;
if (antrianKini <= 0) {
antrianKini = 0;
}
formasiAntrian.shift();
cekKeluarLanjut();
}
}
}
} else if (indi == 3) {
if (pilihKerajaan == 3) {
if (antrianSekali == false) {
if (antrianKini > 0) {
antrianSekali = true;
gi = 2;
while (gi <= 11) {
if (gi == 11) {
frame["antrian" + (gi - 1)].gotoAndStop(100);
} else {
frame["antrian" + (gi - 1)].gotoAndStop(frame["antrian" + gi]._currentframe);
}
gi++;
}
antrianKini--;
if (antrianKini <= 0) {
antrianKini = 0;
}
formasiAntrian.shift();
cekKeluarLanjut();
}
}
}
}
}
}
function buatKotak() {
i = 1;
while (i <= 39) {
j = 2;
while (j <= 9) {
kotak = attachMovie("kotak_mc", ("kotak" + i) + j, bykKotak);
kotak._x = (i - 1) * 40;
kotak._y = (j - 1) * 40;
kotak.bykIsi = 0;
kotak.kotakIsi = 0;
kotak.isiTower = false;
kotak.jenisIsi = "";
kotak.adaSemak = false;
kotak._alpha = 0;
kotak.onEnterFrame = enterKotak;
bykKotak++;
j++;
}
i++;
}
}
function overKotak() {
this.gotoAndStop(2);
}
function outKotak() {
this.gotoAndStop(1);
}
function buatHalang() {
if (tipeBase == "semua") {
batasTuretAtas = 6;
} else if (tipeBase == "atas") {
batasTuretAtas = 6;
} else if (tipeBase == "bawah") {
batasTuretAtas = 3;
}
if (tipePerang == "sea1") {
batasTuretAtas = 3;
}
i = 1;
while (i <= 39) {
j = 2;
while (j <= 9) {
if (((j >= batasTuretAtas) && (i >= 4)) && (i <= 36)) {
if ((i <= 16) || (i >= 23)) {
if (curHalang < maxHalang) {
randX = random(15);
if (pilihPeta <= 5) {
randHalang = random(2) + 6;
} else if (((((pilihPeta == 8) || (pilihPeta == 9)) || (pilihPeta == 12)) || (pilihPeta == 14)) || (pilihPeta == 18)) {
randHalang = random(3) + 8;
} else {
randHalang = random(5) + 1;
}
if (randX <= 1) {
halang = attachMovie("halang_mc" + randHalang, "halang" + bykSemak, ((j + 0.5) * 1000) + zbanyakTentara);
halang._x = (i - 1) * 40;
halang._y = ((j - 1) * 40) - 10;
halang._xscale = (halang._yscale = random(20) + 90);
randPos = random(2);
if (randPos == 0) {
halang._xscale = -100;
} else {
halang._xscale = 100;
}
halang.nyawa = 2;
halang.onEnterFrame = enterHalang;
curHalang++;
zbanyakTentara++;
bykSemak++;
if (zbanyakTentara >= totalUnit) {
zbanyakTentara = tentaraAwal;
}
if (bykSemak >= 1500) {
bykSemak = 1000;
}
}
}
}
}
j++;
}
i++;
}
}
function buatSemak() {
if (tipeBase == "semua") {
batasTuretAtas = 6;
} else if (tipeBase == "atas") {
batasTuretAtas = 6;
} else if (tipeBase == "bawah") {
batasTuretAtas = 3;
}
i = 1;
while (i <= 39) {
j = 2;
while (j <= 9) {
if (((j >= batasTuretAtas) && (i >= 4)) && (i <= 36)) {
if ((i <= 16) || (i >= 23)) {
if (curSemak < maxSemak) {
randX = random(12);
randSemak = random(4) + 1;
if (randX <= 1) {
halang = attachMovie("semak_mc" + randSemak, "halang" + bykSemak, bykSemak);
halang._x = (i - 1) * 40;
halang._y = ((j - 1) * 40) + 10;
halang._xscale = (halang._yscale = random(20) + 90);
randPos = random(2);
if (randPos == 0) {
halang._xscale = -100;
} else {
halang._xscale = 100;
}
halang.nyawa = 2;
halang.onEnterFrame = enterHalang;
curSemak++;
bykSemak++;
if (bykSemak >= 1500) {
bykSemak = 1000;
}
}
}
}
}
j++;
}
i++;
}
}
function buatTuret() {
if (tipeBase == "semua") {
batasTuretAtas = 6;
batasTuretBawah = 9;
} else if (tipeBase == "atas") {
batasTuretAtas = 2;
batasTuretBawah = 5;
} else if (tipeBase == "bawah") {
batasTuretAtas = 4;
batasTuretBawah = 7;
}
i = 1;
while (i <= 39) {
j = batasTuretAtas;
while (j <= batasTuretBawah) {
if ((i >= 7) && (i <= 33)) {
if ((i <= 14) || (i >= 25)) {
randX = random(18);
randHalang = random(4) + 1;
if (curTuret < maxTuret) {
if (randX <= 1) {
zturet = attachMovie("turet_mc", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
zturet._x = 0 + (i * 40);
if (j >= 6) {
zturet._y = (0 + (j * 40)) - 10;
} else {
zturet._y = (0 + (j * 40)) - 10;
}
zturet.jenis = 4;
zturet.rupa = "turet";
zturet.speed = 0;
zturet.live = 25000 + random(2500);
zturet.totalLive = zturet.live;
zturet.armor = 15 + random(15);
zturet.damage = 20 + random(20);
zturet.range = 4;
zturet.maxLive = zturet.live;
zturet.lahan = "darat";
zturet.tipe = "turet";
zturet.perisai = "orang";
zturet.tipeSerangan = "normal";
zturet.ztarget = false;
zturet.ztarget2 = false;
zturet.xtarget = false;
zturet.barisKe = i;
base.jenisTipe = 50;
zturet.posisiX = undefined;
zturet.posisiY = undefined;
zturet.diSemak = false;
zturet.mati = false;
zturet.onEnterFrame = enterTentara;
zturet.onRollOver = overTentara;
zturet.onRollOut = outTentara;
zturet.nyawa_mc._visible = false;
banyakTentara2++;
if (banyakTentara2 >= totalUnit2) {
banyakTentara2 = tentaraAwal2 + 25;
}
zbanyakTentara++;
curTuret++;
if (zbanyakTentara >= totalUnit) {
zbanyakTentara = tentaraAwal + 25;
}
}
}
}
}
j++;
}
i++;
}
}
function buatBase() {
i = 1;
while (i <= 3) {
_root["maxBase" + i] = 0;
i++;
}
if (tipeBase == "semua") {
batasBaseAtas = 2;
batasBaseBawah = 9;
} else if (tipeBase == "atas") {
batasBaseAtas = 2;
batasBaseBawah = 5;
} else if (tipeBase == "bawah") {
batasBaseAtas = 4;
batasBaseBawah = 7;
}
i = 1;
while (i <= 39) {
j = batasBaseAtas;
while (j <= batasBaseBawah) {
if ((((i == 1) || (i == 19)) || (i == 20)) || (i == 39)) {
adaBaseKah = false;
if (i == 1) {
if (pilihKerajaan == 1) {
if (yangMain1 == true) {
if (tipePerang == "infanarti") {
base = attachMovie("base_mc1c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else if (tipePerang == "navy") {
base = attachMovie("base_mc1", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else if (tipePerang == "air") {
base = attachMovie("base_mc1b", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else if (tipePerang == "land") {
if (j <= 5) {
base = attachMovie("base_mc1b", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else {
base = attachMovie("base_mc1c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
} else if (tipePerang == "sea1") {
if (j <= 5) {
base = attachMovie("base_mc1b", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else {
base = attachMovie("base_mc1", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
} else if (tipePerang == "sea2") {
if (j <= 5) {
base = attachMovie("base_mc1c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else {
base = attachMovie("base_mc1", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
} else {
base = attachMovie("base_mc1c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
_root.maxBase1++;
base._x = (0 + (i * 40)) - 25;
base.jenis = 1;
base.milik = 1;
if (j >= 6) {
base.live = 400000 + random(4000);
} else {
base.live = 600000 + random(6000);
}
adaBaseKah = true;
if (tipeBase == "semua") {
if (j <= 5) {
_root.baseAtas1++;
base.posisiXY = "atas";
} else {
_root.baseBawah1++;
base.posisiXY = "bawah";
}
} else {
_root.baseBawah1++;
base.posisiXY = "bawah";
}
base.posisiUrut = j;
_root["xxbase" + j] = 1;
}
} else if (pilihKerajaan == 2) {
if (yangMain1 == false) {
if (tipePerang == "infanarti") {
base = attachMovie("base_mc2c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else if (tipePerang == "navy") {
base = attachMovie("base_mc2", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else if (tipePerang == "air") {
base = attachMovie("base_mc2b", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else if (tipePerang == "land") {
if (j <= 5) {
base = attachMovie("base_mc2b", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else {
base = attachMovie("base_mc2c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
} else if (tipePerang == "sea1") {
if (j <= 5) {
base = attachMovie("base_mc2b", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else {
base = attachMovie("base_mc2", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
} else if (tipePerang == "sea2") {
if (j <= 5) {
base = attachMovie("base_mc2c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else {
base = attachMovie("base_mc2", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
} else {
base = attachMovie("base_mc2c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
_root.maxBase2++;
base._x = (0 + (i * 40)) - 15;
base.jenis = 2;
base.milik = 2;
if (j >= 6) {
base.live = 400000 + random(4000);
} else {
base.live = 600000 + random(6000);
}
adaBaseKah = true;
if (tipeBase == "semua") {
if (j <= 5) {
_root.baseAtas2++;
base.posisiXY = "atas";
} else {
_root.baseBawah2++;
base.posisiXY = "bawah";
}
} else {
_root.baseBawah2++;
base.posisiXY = "bawah";
}
base.posisiUrut = j;
_root["xxbase" + j] = 1;
} else if (yangMain1 == true) {
if (tipePerang == "infanarti") {
base = attachMovie("base_mc1c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else if (tipePerang == "navy") {
base = attachMovie("base_mc1", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else if (tipePerang == "air") {
base = attachMovie("base_mc1b", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else if (tipePerang == "land") {
if (j <= 5) {
base = attachMovie("base_mc1b", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else {
base = attachMovie("base_mc1c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
} else if (tipePerang == "sea1") {
if (j <= 5) {
base = attachMovie("base_mc1b", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else {
base = attachMovie("base_mc1", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
} else if (tipePerang == "sea2") {
if (j <= 5) {
base = attachMovie("base_mc1c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else {
base = attachMovie("base_mc1", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
} else {
base = attachMovie("base_mc1c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
_root.maxBase1++;
base._x = (0 + (i * 40)) - 25;
base.jenis = 1;
base.milik = 1;
if (j >= 6) {
base.live = 400000 + random(4000);
} else {
base.live = 600000 + random(6000);
}
adaBaseKah = true;
if (tipeBase == "semua") {
if (j <= 5) {
_root.baseAtas1++;
base.posisiXY = "atas";
} else {
_root.baseBawah1++;
base.posisiXY = "bawah";
}
} else {
_root.baseBawah1++;
base.posisiXY = "bawah";
}
}
} else if (pilihKerajaan == 3) {
if (yangMain1 == false) {
if (tipePerang == "infanarti") {
base = attachMovie("base_mc2c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else if (tipePerang == "navy") {
base = attachMovie("base_mc2", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else if (tipePerang == "air") {
base = attachMovie("base_mc2b", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else if (tipePerang == "land") {
if (j <= 5) {
base = attachMovie("base_mc2b", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else {
base = attachMovie("base_mc2c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
} else if (tipePerang == "sea1") {
if (j <= 5) {
base = attachMovie("base_mc2b", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else {
base = attachMovie("base_mc2", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
} else if (tipePerang == "sea2") {
if (j <= 5) {
base = attachMovie("base_mc2c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else {
base = attachMovie("base_mc2", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
} else {
base = attachMovie("base_mc2c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
_root.maxBase2++;
base._x = (0 + (i * 40)) - 15;
base.jenis = 2;
base.milik = 2;
if (j >= 6) {
base.live = 400000 + random(4000);
} else {
base.live = 600000 + random(6000);
}
adaBaseKah = true;
if (tipeBase == "semua") {
if (j <= 5) {
_root.baseAtas2++;
base.posisiXY = "atas";
} else {
_root.baseBawah2++;
base.posisiXY = "bawah";
}
} else {
_root.baseBawah2++;
base.posisiXY = "bawah";
}
} else if (yangMain1 == true) {
if (tipePerang == "infanarti") {
base = attachMovie("base_mc1c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else if (tipePerang == "navy") {
base = attachMovie("base_mc1", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else if (tipePerang == "air") {
base = attachMovie("base_mc1b", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else if (tipePerang == "land") {
if (j <= 5) {
base = attachMovie("base_mc1b", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else {
base = attachMovie("base_mc1c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
} else if (tipePerang == "sea1") {
if (j <= 5) {
base = attachMovie("base_mc1b", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else {
base = attachMovie("base_mc1", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
} else if (tipePerang == "sea2") {
if (j <= 5) {
base = attachMovie("base_mc1c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else {
base = attachMovie("base_mc1", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
} else {
base = attachMovie("base_mc1c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
_root.maxBase1++;
base._x = (0 + (i * 40)) - 25;
base.jenis = 1;
base.milik = 1;
if (j >= 6) {
base.live = 400000 + random(4000);
} else {
base.live = 600000 + random(6000);
}
adaBaseKah = true;
if (tipeBase == "semua") {
if (j <= 5) {
_root.baseAtas1++;
base.posisiXY = "atas";
} else {
_root.baseBawah1++;
base.posisiXY = "bawah";
}
} else {
_root.baseBawah1++;
base.posisiXY = "bawah";
}
}
}
} else if ((i == 19) || (i == 20)) {
if (pilihKerajaan == 2) {
if (musuhSiapa == 3) {
if (yangMain2 == true) {
if (tipePerang == "infanarti") {
base = attachMovie("base_mc2c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else if (tipePerang == "navy") {
base = attachMovie("base_mc2", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else if (tipePerang == "air") {
base = attachMovie("base_mc2b", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else if (tipePerang == "land") {
if (j <= 5) {
base = attachMovie("base_mc2b", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else {
base = attachMovie("base_mc2c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
} else if (tipePerang == "sea1") {
if (j <= 5) {
base = attachMovie("base_mc2b", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else {
base = attachMovie("base_mc2", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
} else if (tipePerang == "sea2") {
if (j <= 5) {
base = attachMovie("base_mc2c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else {
base = attachMovie("base_mc2", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
} else {
base = attachMovie("base_mc2c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
_root.maxBase2++;
base._x = (0 + (i * 40)) + 10;
base.jenis = 2;
base.milik = 2;
if (j >= 6) {
base.live = 400000 + random(4000);
} else {
base.live = 600000 + random(6000);
}
adaBaseKah = true;
if (tipeBase == "semua") {
if (j <= 5) {
_root.baseAtas2++;
base.posisiXY = "atas";
} else {
_root.baseBawah2++;
base.posisiXY = "bawah";
}
} else {
_root.baseBawah2++;
base.posisiXY = "bawah";
}
base.posisiUrut = j;
_root["xxbase" + j] = 1;
}
}
} else if (musuhSiapa == 3) {
if (yangMain2 == true) {
if (tipePerang == "infanarti") {
base = attachMovie("base_mc2c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else if (tipePerang == "navy") {
base = attachMovie("base_mc2", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else if (tipePerang == "air") {
base = attachMovie("base_mc2b", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else if (tipePerang == "land") {
if (j <= 5) {
base = attachMovie("base_mc2b", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else {
base = attachMovie("base_mc2c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
} else if (tipePerang == "sea1") {
if (j <= 5) {
base = attachMovie("base_mc2b", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else {
base = attachMovie("base_mc2", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
} else if (tipePerang == "sea2") {
if (j <= 5) {
base = attachMovie("base_mc2c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else {
base = attachMovie("base_mc2", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
} else {
base = attachMovie("base_mc2c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
_root.maxBase2++;
base._x = (0 + (i * 40)) + 10;
base.jenis = 2;
base.milik = 2;
if (j >= 6) {
base.live = 400000 + random(4000);
} else {
base.live = 600000 + random(6000);
}
adaBaseKah = true;
if (tipeBase == "semua") {
if (j <= 5) {
_root.baseAtas2++;
base.posisiXY = "atas";
} else {
_root.baseBawah2++;
base.posisiXY = "bawah";
}
} else {
_root.baseBawah2++;
base.posisiXY = "bawah";
}
base.posisiUrut = j;
_root["xxbase" + j] = 1;
}
}
} else if (i == 39) {
if (pilihKerajaan == 1) {
if (yangMain2 == true) {
if (musuhSiapa == 2) {
if (tipePerang == "infanarti") {
base = attachMovie("base_mc2c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else if (tipePerang == "navy") {
base = attachMovie("base_mc2", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else if (tipePerang == "air") {
base = attachMovie("base_mc2b", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else if (tipePerang == "land") {
if (j <= 5) {
base = attachMovie("base_mc2b", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else {
base = attachMovie("base_mc2c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
} else if (tipePerang == "sea1") {
if (j <= 5) {
base = attachMovie("base_mc2b", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else {
base = attachMovie("base_mc2", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
} else if (tipePerang == "sea2") {
if (j <= 5) {
base = attachMovie("base_mc2c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else {
base = attachMovie("base_mc2", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
} else {
base = attachMovie("base_mc2c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
_root.maxBase2++;
base._x = 0 + (i * 40);
base.jenis = 2;
base.milik = 2;
if (j >= 6) {
base.live = 400000 + random(4000);
} else {
base.live = 600000 + random(6000);
}
adaBaseKah = true;
if (tipeBase == "semua") {
if (j <= 5) {
_root.baseAtas2++;
base.posisiXY = "atas";
} else {
_root.baseBawah2++;
base.posisiXY = "bawah";
}
} else {
_root.baseBawah2++;
base.posisiXY = "bawah";
}
} else {
if (tipePerang == "infanarti") {
base = attachMovie("base_mc3c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else if (tipePerang == "navy") {
base = attachMovie("base_mc3", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else if (tipePerang == "air") {
base = attachMovie("base_mc3b", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else if (tipePerang == "land") {
if (j <= 5) {
base = attachMovie("base_mc3b", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else {
base = attachMovie("base_mc3c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
} else if (tipePerang == "sea1") {
if (j <= 5) {
base = attachMovie("base_mc3b", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else {
base = attachMovie("base_mc3", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
} else if (tipePerang == "sea2") {
if (j <= 5) {
base = attachMovie("base_mc3c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else {
base = attachMovie("base_mc3", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
} else {
base = attachMovie("base_mc3c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
_root.maxBase3++;
base._x = 0 + (i * 40);
base.jenis = 3;
base.milik = 3;
if (j >= 6) {
base.live = 400000 + random(4000);
} else {
base.live = 600000 + random(6000);
}
adaBaseKah = true;
if (tipeBase == "semua") {
if (j <= 5) {
_root.baseAtas3++;
base.posisiXY = "atas";
} else {
_root.baseBawah3++;
base.posisiXY = "bawah";
}
} else {
_root.baseBawah3++;
base.posisiXY = "bawah";
}
}
} else if (yangMain3 == true) {
if (tipePerang == "infanarti") {
base = attachMovie("base_mc3c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else if (tipePerang == "navy") {
base = attachMovie("base_mc3", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else if (tipePerang == "air") {
base = attachMovie("base_mc3b", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else if (tipePerang == "land") {
if (j <= 5) {
base = attachMovie("base_mc3b", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else {
base = attachMovie("base_mc3c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
} else if (tipePerang == "sea1") {
if (j <= 5) {
base = attachMovie("base_mc3b", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else {
base = attachMovie("base_mc3", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
} else if (tipePerang == "sea2") {
if (j <= 5) {
base = attachMovie("base_mc3c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else {
base = attachMovie("base_mc3", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
} else {
base = attachMovie("base_mc3c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
_root.maxBase3++;
base._x = 0 + (i * 40);
base.jenis = 3;
base.milik = 3;
if (j >= 6) {
base.live = 400000 + random(4000);
} else {
base.live = 600000 + random(6000);
}
adaBaseKah = true;
if (tipeBase == "semua") {
if (j <= 5) {
_root.baseAtas3++;
base.posisiXY = "atas";
} else {
_root.baseBawah3++;
base.posisiXY = "bawah";
}
} else {
_root.baseBawah3++;
base.posisiXY = "bawah";
}
}
} else if (pilihKerajaan == 2) {
if (yangMain3 == true) {
if (tipePerang == "infanarti") {
base = attachMovie("base_mc3c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else if (tipePerang == "navy") {
base = attachMovie("base_mc3", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else if (tipePerang == "air") {
base = attachMovie("base_mc3b", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else if (tipePerang == "land") {
if (j <= 5) {
base = attachMovie("base_mc3b", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else {
base = attachMovie("base_mc3c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
} else if (tipePerang == "sea1") {
if (j <= 5) {
base = attachMovie("base_mc3b", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else {
base = attachMovie("base_mc3", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
} else if (tipePerang == "sea2") {
if (j <= 5) {
base = attachMovie("base_mc3c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else {
base = attachMovie("base_mc3", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
} else {
base = attachMovie("base_mc3c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
_root.maxBase3++;
base._x = 0 + (i * 40);
base.jenis = 3;
base.milik = 3;
if (j >= 6) {
base.live = 400000 + random(4000);
} else {
base.live = 600000 + random(6000);
}
adaBaseKah = true;
if (tipeBase == "semua") {
if (j <= 5) {
_root.baseAtas3++;
base.posisiXY = "atas";
} else {
_root.baseBawah3++;
base.posisiXY = "bawah";
}
} else {
_root.baseBawah3++;
base.posisiXY = "bawah";
}
} else if (yangMain3 == false) {
if (tipePerang == "infanarti") {
base = attachMovie("base_mc2c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else if (tipePerang == "navy") {
base = attachMovie("base_mc2", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else if (tipePerang == "air") {
base = attachMovie("base_mc2b", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else if (tipePerang == "land") {
if (j <= 5) {
base = attachMovie("base_mc2b", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else {
base = attachMovie("base_mc2c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
} else if (tipePerang == "sea1") {
if (j <= 5) {
base = attachMovie("base_mc2b", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else {
base = attachMovie("base_mc2", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
} else if (tipePerang == "sea2") {
if (j <= 5) {
base = attachMovie("base_mc2c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else {
base = attachMovie("base_mc2", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
} else {
base = attachMovie("base_mc2c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
_root.maxBase2++;
base._x = 0 + (i * 40);
base.jenis = 2;
base.milik = 2;
if (j >= 6) {
base.live = 400000 + random(4000);
} else {
base.live = 600000 + random(6000);
}
adaBaseKah = true;
if (tipeBase == "semua") {
if (j <= 5) {
_root.baseAtas2++;
base.posisiXY = "atas";
} else {
_root.baseBawah2++;
base.posisiXY = "bawah";
}
} else {
_root.baseBawah2++;
base.posisiXY = "bawah";
}
}
} else if (pilihKerajaan == 3) {
if (tipePerang == "infanarti") {
base = attachMovie("base_mc3c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else if (tipePerang == "navy") {
base = attachMovie("base_mc3", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else if (tipePerang == "air") {
base = attachMovie("base_mc3b", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else if (tipePerang == "land") {
if (j <= 5) {
base = attachMovie("base_mc3b", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else {
base = attachMovie("base_mc3c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
} else if (tipePerang == "sea1") {
if (j <= 5) {
base = attachMovie("base_mc3b", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else {
base = attachMovie("base_mc3", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
} else if (tipePerang == "sea2") {
if (j <= 5) {
base = attachMovie("base_mc3c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
} else {
base = attachMovie("base_mc3", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
} else {
base = attachMovie("base_mc3c", "tentara" + banyakTentara2, ((j + 0.25) * 1000) + zbanyakTentara);
}
_root.maxBase3++;
base._x = 0 + (i * 40);
base.jenis = 3;
base.milik = 3;
if (j >= 6) {
base.live = 400000 + random(4000);
} else {
base.live = 600000 + random(6000);
}
adaBaseKah = true;
if (tipeBase == "semua") {
if (j <= 5) {
_root.baseAtas3++;
base.posisiXY = "atas";
} else {
_root.baseBawah3++;
base.posisiXY = "bawah";
}
} else {
_root.baseBawah3++;
base.posisiXY = "bawah";
}
base.posisiUrut = j;
_root["xxbase" + j] = 1;
}
}
if (adaBaseKah == true) {
if (j >= 6) {
base._y = (0 + (j * 40)) - 10;
} else {
base._y = (0 + (j * 40)) - 10;
}
if (sulitMap[pilihPeta] == 1) {
base.live = base.live * 0.0075;
} else if (sulitMap[pilihPeta] == 2) {
base.live = base.live * 0.05;
} else if (sulitMap[pilihPeta] == 3) {
base.live = base.live * 0.15;
} else if (sulitMap[pilihPeta] == 4) {
base.live = base.live * 0.25;
} else if (sulitMap[pilihPeta] == 5) {
base.live = base.live * 0.45;
}
if (base.jenis == 3) {
perubahanLive = 1.25;
} else {
perubahanLive = 1;
}
base.live = base.live * perubahanLive;
base.speed = 0;
base.totalLive = base.live;
base.armor = 15 + random(15);
base.damage = 0;
base.lahan = "darat";
base.tipe = "base";
base.perisai = "besi";
base.tipeSerangan = "normal";
base.ztarget = false;
base.ztarget2 = false;
base.xtarget = false;
base.barisKe = i;
base.jenisTipe = 25;
base.posisiX = undefined;
base.posisiY = undefined;
base.diSemak = false;
base.mati = false;
base.onEnterFrame = enterTentara;
base.onRollOver = overTentara;
base.onRollOut = outTentara;
base.nyawa_mc._visible = false;
zbanyakTentara++;
curTuret++;
banyakTentara2++;
if (zbanyakTentara >= totalUnit) {
zbanyakTentara = tentaraAwal + 25;
}
if (banyakTentara2 >= totalUnit2) {
banyakTentara2 = tentaraAwal2 + 25;
}
}
}
j++;
}
i++;
}
i = 1;
while (i <= 3) {
_root["banyakBase" + i] = 0;
if (_root["yangMain" + i] == true) {
_root["sudahKalah" + i] = false;
} else {
_root["sudahKalah" + i] = true;
}
i++;
}
}
function enterKotak() {
if (sedangPause == false) {
this._x = this._x + pindahUnit;
}
}
function enterHalang() {
if (sedangPause == false) {
this._x = this._x + pindahUnit;
k = 90000 /* 0x015F90 */;
while (k <= 90005) {
if (_root["ledak_mc" + k] != undefined) {
if (_root["ledak_mc" + k].hitTest(this)) {
if (_root["ledak_mc" + k].zdelay == false) {
_root["ledak_mc" + k].zdelay = true;
this.nyawa--;
if (this.nyawa == 1) {
this.gotoAndStop(2);
} else if (this.nyawa <= 0) {
removeMovieClip(this);
}
}
}
}
k++;
}
}
}
function munculUnit1(wwindi, qqindi, zzindi) {
if (sedangPause == false) {
munculSiapa(1);
if ((jenisMain != "demo") && (pilihKerajaan == 1)) {
indi = zzindi;
bisaKeluarUnit = true;
} else {
indi = wwindi;
cekAI(1, indi);
}
if (jumlahUnit1 <= 100) {
if ((_root.sudahKalah1 == false) && (bisaKeluarUnit == true)) {
if ((jenisMain != "demo") && (pilihKerajaan == 1)) {
yindiy = wwindi;
}
xindix = 1;
if ((indi == "darat") || (indi == "laut")) {
if (tipePerang == "sea2") {
if (indi == "darat") {
awalI = 9;
akhirI = 6;
zpenambahan = 0;
} else if (indi == "laut") {
awalI = 5;
akhirI = 2;
zpenambahan = 0;
}
} else {
awalI = 9;
akhirI = 6;
zpenambahan = 0;
}
} else if ((indi == "udara") || (indi == "artileri")) {
if (indi == "artileri") {
awalI = 9;
akhirI = 6;
zpenambahan = 0;
} else if (indi == "udara") {
awalI = 5;
akhirI = 2;
zpenambahan = 100000 /* 0x0186A0 */;
}
}
if (tipeBase == "bawah") {
awalI = 7;
akhirI = 4;
}
if ((((yindiy == 4) || (yindiy == 8)) || (yindiy == 12)) || (yindiy == 16)) {
specialUnit = true;
} else {
specialUnit = false;
}
jmlUnitMax = 8;
if (jmlUnitMax >= 8) {
jmlUnitMax = 8;
}
antrianSekali = false;
adaMunculTentara1 = false;
if ((indi == "darat") && (specialUnit == false)) {
if ((jenisMain != "demo") && (pilihKerajaan == 1)) {
if (kerajaan1 == "musuh") {
setAIFormasi(1);
jenisFormasi = formasiAI;
} else if (kerajaan1 == "jagoan") {
jenisFormasi = qqindi;
}
} else if (((_root["maxBase" + pilihKerajaan] - _root["banyakBase" + pilihKerajaan]) <= 2) && ((_root["maxBase" + pilihKerajaan] - _root["banyakBase" + pilihKerajaan]) >= 1)) {
if (tipeBase == "bawah") {
if (_root.xxbase4 == 1) {
jenisFormasi = 2;
} else if (_root.xxbase5 == 1) {
jenisFormasi = 3;
} else if (_root.xxbase6 == 1) {
jenisFormasi = 3;
} else if (_root.xxbase7 == 1) {
jenisFormasi = 4;
}
} else if (_root.xxbase6 == 1) {
jenisFormasi = 2;
} else if (_root.xxbase7 == 1) {
jenisFormasi = 3;
} else if (_root.xxbase8 == 1) {
jenisFormasi = 3;
} else if (_root.xxbase9 == 1) {
jenisFormasi = 4;
}
} else {
jenisFormasi = random(7) + 1;
}
if (jenisFormasi == 1) {
i = awalI;
while (i >= akhirI) {
j = 0;
while (j <= 1) {
if (jmlUnitMax > 0) {
jmlUnitMax--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua1(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
j++;
}
i--;
}
} else if (jenisFormasi == 2) {
i = awalI - 2;
while (i >= akhirI) {
j = 0;
while (j <= 3) {
if (jmlUnitMax > 0) {
jmlUnitMax--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua1(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
j++;
}
i--;
}
} else if (jenisFormasi == 3) {
i = awalI - 1;
while (i >= (akhirI + 1)) {
j = 0;
while (j <= 3) {
if (jmlUnitMax > 0) {
jmlUnitMax--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua1(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
j++;
}
i--;
}
} else if (jenisFormasi == 4) {
i = awalI;
while (i >= (akhirI + 2)) {
j = 0;
while (j <= 3) {
if (jmlUnitMax > 0) {
jmlUnitMax--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua1(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
j++;
}
i--;
}
} else if (jenisFormasi == 5) {
j = 0;
while (j <= 2) {
if (j == 2) {
tandaAwal = 0;
tandaAkhir = 0;
} else {
tandaAwal = 1;
tandaAkhir = 1;
}
i = awalI - tandaAwal;
while (i >= (akhirI + tandaAkhir)) {
if (jmlUnitMax > 0) {
jmlUnitMax--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua1(tentara, "tiga");
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
i--;
}
j++;
}
} else if (jenisFormasi == 6) {
j = 0;
while (j <= 2) {
if (j == 1) {
tandaAwal = 0;
tandaAkhir = 0;
} else {
tandaAwal = 1;
tandaAkhir = 1;
}
i = awalI - tandaAwal;
while (i >= (akhirI + tandaAkhir)) {
if (jmlUnitMax > 0) {
jmlUnitMax--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua1(tentara, "tiga");
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
i--;
}
j++;
}
} else if (jenisFormasi == 7) {
j = 0;
while (j <= 2) {
if (j == 0) {
tandaAwal = 0;
tandaAkhir = 0;
} else {
tandaAwal = 1;
tandaAkhir = 1;
}
i = awalI - tandaAwal;
while (i >= (akhirI + tandaAkhir)) {
if (jmlUnitMax > 0) {
jmlUnitMax--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua1(tentara, "tiga");
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
i--;
}
j++;
}
}
} else if ((((indi == "udara") || (indi == "artileri")) || (indi == "laut")) && (specialUnit == false)) {
if ((jenisMain != "demo") && (pilihKerajaan == 1)) {
if (kerajaan1 == "musuh") {
setAIFormasi(1);
jenisFormasi = formasiAI;
} else if (kerajaan1 == "jagoan") {
jenisFormasi = qqindi;
}
} else if (((_root["maxBase" + pilihKerajaan] - _root["banyakBase" + pilihKerajaan]) <= 2) && ((_root["maxBase" + pilihKerajaan] - _root["banyakBase" + pilihKerajaan]) >= 1)) {
if (indi == "udara") {
if (_root.xxbase2 == 1) {
jenisFormasi = 2;
} else if (_root.xxbase3 == 1) {
jenisFormasi = 3;
} else if (_root.xxbase4 == 1) {
jenisFormasi = 3;
} else if (_root.xxbase5 == 1) {
jenisFormasi = 4;
}
} else if (tipeBase == "bawah") {
if (_root.xxbase4 == 1) {
jenisFormasi = 2;
} else if (_root.xxbase5 == 1) {
jenisFormasi = 3;
} else if (_root.xxbase6 == 1) {
jenisFormasi = 3;
} else if (_root.xxbase7 == 1) {
jenisFormasi = 4;
}
} else if (_root.xxbase6 == 1) {
jenisFormasi = 2;
} else if (_root.xxbase7 == 1) {
jenisFormasi = 3;
} else if (_root.xxbase8 == 1) {
jenisFormasi = 3;
} else if (_root.xxbase9 == 1) {
jenisFormasi = 4;
}
} else {
jenisFormasi = random(4) + 1;
}
if (jenisFormasi == 1) {
if (tipePerang == "air") {
i = awalI;
while (i >= akhirI) {
j = 0;
while (j <= 0) {
if (jmlUnitMax > 0) {
jmlUnitMax--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua1(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
j++;
}
i--;
}
i = awalI + 4;
while (i >= (akhirI + 4)) {
j = 0;
while (j <= 0) {
if (jmlUnitMax > 0) {
jmlUnitMax--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua1(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
j++;
}
i--;
}
} else {
i = awalI;
while (i >= akhirI) {
j = 0;
while (j <= 0) {
if (jmlUnitMax > 0) {
jmlUnitMax--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua1(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
j++;
}
i--;
}
}
} else if (jenisFormasi == 2) {
if (tipePerang == "air") {
i = awalI - 2;
while (i >= akhirI) {
j = 0;
while (j <= 1) {
if (jmlUnitMax > 0) {
jmlUnitMax--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua1(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
j++;
}
i--;
}
i = (awalI - 2) + 4;
while (i >= (akhirI + 4)) {
j = 0;
while (j <= 1) {
if (jmlUnitMax > 0) {
jmlUnitMax--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua1(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
j++;
}
i--;
}
} else {
i = awalI - 2;
while (i >= akhirI) {
j = 0;
while (j <= 1) {
if (jmlUnitMax > 0) {
jmlUnitMax--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua1(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
j++;
}
i--;
}
}
} else if (jenisFormasi == 3) {
if (tipePerang == "air") {
i = awalI - 1;
while (i >= (akhirI + 1)) {
j = 0;
while (j <= 1) {
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua1(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
j++;
}
i--;
}
i = (awalI - 1) + 4;
while (i >= ((akhirI + 1) + 4)) {
j = 0;
while (j <= 1) {
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua1(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
j++;
}
i--;
}
} else {
i = awalI - 1;
while (i >= (akhirI + 1)) {
j = 0;
while (j <= 1) {
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua1(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
j++;
}
i--;
}
}
} else if (jenisFormasi == 4) {
if (tipePerang == "air") {
i = awalI;
while (i >= (akhirI + 2)) {
j = 0;
while (j <= 1) {
if (jmlUnitMax > 0) {
jmlUnitMax--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua1(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
j++;
}
i--;
}
i = awalI + 4;
while (i >= ((akhirI + 2) + 4)) {
j = 0;
while (j <= 1) {
if (jmlUnitMax > 0) {
jmlUnitMax--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua1(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
j++;
}
i--;
}
} else {
i = awalI;
while (i >= (akhirI + 2)) {
j = 0;
while (j <= 1) {
if (jmlUnitMax > 0) {
jmlUnitMax--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua1(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
j++;
}
i--;
}
}
}
} else if (specialUnit == true) {
if ((jenisMain != "demo") && (pilihKerajaan == 1)) {
if (kerajaan1 == "musuh") {
setAIFormasi(1);
jenisFormasi = formasiAI;
} else if (kerajaan1 == "jagoan") {
jenisFormasi = qqindi;
}
} else if (((_root["maxBase" + pilihKerajaan] - _root["banyakBase" + pilihKerajaan]) <= 2) && ((_root["maxBase" + pilihKerajaan] - _root["banyakBase" + pilihKerajaan]) >= 1)) {
if (indi == "udara") {
if (_root.xxbase2 == 1) {
jenisFormasi = 2;
} else if (_root.xxbase3 == 1) {
jenisFormasi = 3;
} else if (_root.xxbase4 == 1) {
jenisFormasi = 3;
} else if (_root.xxbase5 == 1) {
jenisFormasi = 4;
}
} else if (tipeBase == "bawah") {
if (_root.xxbase4 == 1) {
jenisFormasi = 1;
} else if (_root.xxbase5 == 1) {
jenisFormasi = 2;
} else if (_root.xxbase6 == 1) {
jenisFormasi = 2;
} else if (_root.xxbase7 == 1) {
jenisFormasi = 3;
}
} else if (_root.xxbase6 == 1) {
jenisFormasi = 1;
} else if (_root.xxbase7 == 1) {
jenisFormasi = 2;
} else if (_root.xxbase8 == 1) {
jenisFormasi = 2;
} else if (_root.xxbase9 == 1) {
jenisFormasi = 3;
}
} else {
jenisFormasi = random(3) + 1;
}
if (tipePerang == "sea2") {
if (indi == "laut") {
batasBawah = 2;
batasAtas = 3;
} else {
batasBawah = 6;
batasAtas = 7;
}
} else if (indi == "udara") {
batasBawah = 2;
batasAtas = 3;
} else {
batasBawah = 6;
batasAtas = 7;
}
if (tipeBase == "bawah") {
batasBawah = 4;
batasAtas = 5;
}
if (jenisFormasi == 1) {
if (tipePerang == "air") {
i = batasAtas;
while (i >= batasBawah) {
j = 0;
while (j <= 0) {
if (jmlUnitMax > 0) {
jmlUnitMax--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua1(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
j++;
}
i--;
}
i = batasAtas + 4;
while (i >= (batasBawah + 4)) {
j = 0;
while (j <= 0) {
if (jmlUnitMax > 0) {
jmlUnitMax--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua1(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
j++;
}
i--;
}
} else {
i = batasAtas;
while (i >= batasBawah) {
j = 0;
while (j <= 0) {
if (jmlUnitMax > 0) {
jmlUnitMax--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua1(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
j++;
}
i--;
}
}
} else if (jenisFormasi == 2) {
if (tipePerang == "air") {
i = batasAtas + 1;
while (i >= (batasBawah + 1)) {
j = 0;
while (j <= 0) {
if (jmlUnitMax > 0) {
jmlUnitMax--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua1(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
j++;
}
i--;
}
i = (batasAtas + 1) + 4;
while (i >= ((batasBawah + 1) + 4)) {
j = 0;
while (j <= 0) {
if (jmlUnitMax > 0) {
jmlUnitMax--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua1(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
j++;
}
i--;
}
} else {
i = batasAtas + 1;
while (i >= (batasBawah + 1)) {
j = 0;
while (j <= 0) {
if (jmlUnitMax > 0) {
jmlUnitMax--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua1(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
j++;
}
i--;
}
}
} else if (jenisFormasi == 3) {
if (tipePerang == "air") {
i = batasAtas + 2;
while (i >= (batasBawah + 2)) {
j = 0;
while (j <= 0) {
if (jmlUnitMax > 0) {
jmlUnitMax--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua1(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
j++;
}
i--;
}
i = (batasAtas + 2) + 4;
while (i >= ((batasBawah + 2) + 4)) {
j = 0;
while (j <= 0) {
if (jmlUnitMax > 0) {
jmlUnitMax--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua1(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
j++;
}
i--;
}
} else {
i = batasAtas + 2;
while (i >= (batasBawah + 2)) {
j = 0;
while (j <= 0) {
if (jmlUnitMax > 0) {
jmlUnitMax--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua1(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
j++;
}
i--;
}
}
}
}
} else if (pilihKerajaan == 1) {
cekPowerKurang3(frame.antrian1._currentframe, pilihKerajaan);
antrianSekali = false;
pindahAntrian(1);
}
} else if (pilihKerajaan == 1) {
cekPowerKurang3(frame.antrian1._currentframe, pilihKerajaan);
antrianSekali = false;
pindahAntrian(1);
}
}
if (adaMunculTentara1 == false) {
if (pilihKerajaan == 1) {
cekPowerKurang3(frame.antrian1._currentframe, pilihKerajaan);
antrianSekali = false;
pindahAntrian(1);
}
}
}
function munculUnit2(wwindi, qqindi, zzindi) {
if (sedangPause == false) {
munculSiapa(2);
if (pilihKerajaan == 2) {
indi = zzindi;
bisaKeluarUnit = true;
} else {
indi = wwindi;
cekAI(2, indi);
}
if (jumlahUnit2 <= 100) {
if ((_root.sudahKalah2 == false) && (bisaKeluarUnit == true)) {
if (pilihKerajaan == 2) {
yindiy = wwindi;
}
xindix = 2;
if ((indi == "darat") || (indi == "laut")) {
if (tipePerang == "sea2") {
if (indi == "darat") {
awalI = 9;
akhirI = 6;
zpenambahan = 0;
jumlahanUnit = 1;
k = 0;
j = 0;
} else if (indi == "laut") {
awalI = 5;
akhirI = 2;
zpenambahan = 0;
jumlahanUnit = 0;
k = 0;
j = 0;
}
} else {
awalI = 9;
akhirI = 6;
zpenambahan = 0;
jumlahanUnit = 1;
k = 0;
j = 0;
}
} else if ((indi == "udara") || (indi == "artileri")) {
if (indi == "artileri") {
awalI = 9;
akhirI = 6;
zpenambahan = 0;
jumlahanUnit = 1;
k = 0;
j = 0;
} else if (indi == "udara") {
awalI = 5;
akhirI = 2;
zpenambahan = 100000 /* 0x0186A0 */;
jumlahanUnit = 0;
k = 0;
j = 0;
}
}
if ((((yindiy == 4) || (yindiy == 8)) || (yindiy == 12)) || (yindiy == 16)) {
specialUnit = true;
} else {
specialUnit = false;
}
jmlUnitMax2 = 16;
if (jmlUnitMax2 >= 16) {
jmlUnitMax2 = 16;
}
if (musuhSiapa == 2) {
adaKaKi = 0;
} else {
adaKaKi = 1;
}
if (tipeBase == "bawah") {
awalI = 7;
akhirI = 4;
}
antrianSekali = false;
adaMunculTentara2 = false;
if ((indi == "darat") && (specialUnit == false)) {
if (pilihKerajaan == 2) {
jenisFormasi2 = qqindi;
} else if (((_root["maxBase" + pilihKerajaan] - _root["banyakBase" + pilihKerajaan]) <= 2) && ((_root["maxBase" + pilihKerajaan] - _root["banyakBase" + pilihKerajaan]) >= 1)) {
if (tipeBase == "bawah") {
if (_root.xxbase4 == 1) {
jenisFormasi2 = 2;
} else if (_root.xxbase5 == 1) {
jenisFormasi2 = 3;
} else if (_root.xxbase6 == 1) {
jenisFormasi2 = 3;
} else if (_root.xxbase7 == 1) {
jenisFormasi2 = 4;
}
} else if (_root.xxbase6 == 1) {
jenisFormasi2 = 2;
} else if (_root.xxbase7 == 1) {
jenisFormasi2 = 3;
} else if (_root.xxbase8 == 1) {
jenisFormasi2 = 3;
} else if (_root.xxbase9 == 1) {
jenisFormasi2 = 4;
}
} else {
jenisFormasi2 = random(7) + 1;
}
if (jenisFormasi2 == 1) {
i = awalI;
while (i >= akhirI) {
jj = 0;
while (jj <= adaKaKi) {
k = 0;
while (k <= jumlahanUnit) {
if (jmlUnitMax2 > 0) {
jmlUnitMax2--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua2(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
k++;
}
jj++;
}
i--;
}
} else if (jenisFormasi2 == 2) {
i = awalI - 2;
while (i >= akhirI) {
j = 0;
while (j <= 3) {
jj = 0;
while (jj <= adaKaKi) {
if (jmlUnitMax2 > 0) {
jmlUnitMax2--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua2(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
jj++;
}
j++;
}
i--;
}
} else if (jenisFormasi2 == 3) {
i = awalI - 1;
while (i >= (akhirI + 1)) {
j = 0;
while (j <= 3) {
jj = 0;
while (jj <= adaKaKi) {
if (jmlUnitMax2 > 0) {
jmlUnitMax2--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua2(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
jj++;
}
j++;
}
i--;
}
} else if (jenisFormasi2 == 4) {
i = awalI;
while (i >= (akhirI + 2)) {
j = 0;
while (j <= 3) {
jj = 0;
while (jj <= adaKaKi) {
if (jmlUnitMax2 > 0) {
jmlUnitMax2--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua2(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
jj++;
}
j++;
}
i--;
}
} else if (jenisFormasi2 == 5) {
j = 0;
while (j <= 2) {
if (j == 2) {
tandaAwal = 0;
tandaAkhir = 0;
} else {
tandaAwal = 1;
tandaAkhir = 1;
}
i = awalI - tandaAwal;
while (i >= (akhirI + tandaAkhir)) {
jj = 0;
while (jj <= adaKaKi) {
if (jmlUnitMax2 > 0) {
jmlUnitMax2--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua2(tentara, "tiga");
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
jj++;
}
i--;
}
j++;
}
} else if (jenisFormasi2 == 6) {
j = 0;
while (j <= 2) {
if (j == 1) {
tandaAwal = 0;
tandaAkhir = 0;
} else {
tandaAwal = 1;
tandaAkhir = 1;
}
i = awalI - tandaAwal;
while (i >= (akhirI + tandaAkhir)) {
jj = 0;
while (jj <= adaKaKi) {
if (jmlUnitMax2 > 0) {
jmlUnitMax2--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua2(tentara, "tiga");
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
jj++;
}
i--;
}
j++;
}
} else if (jenisFormasi2 == 7) {
j = 0;
while (j <= 2) {
if (j == 0) {
tandaAwal = 0;
tandaAkhir = 0;
} else {
tandaAwal = 1;
tandaAkhir = 1;
}
i = awalI - tandaAwal;
while (i >= (akhirI + tandaAkhir)) {
jj = 0;
while (jj <= adaKaKi) {
if (jmlUnitMax2 > 0) {
jmlUnitMax2--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua2(tentara, "tiga");
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
jj++;
}
i--;
}
j++;
}
}
} else if ((((indi == "udara") || (indi == "artileri")) || (indi == "laut")) && (specialUnit == false)) {
if (pilihKerajaan == 2) {
jenisFormasi2 = qqindi;
} else if (((_root["maxBase" + pilihKerajaan] - _root["banyakBase" + pilihKerajaan]) <= 2) && ((_root["maxBase" + pilihKerajaan] - _root["banyakBase" + pilihKerajaan]) >= 1)) {
if (indi == "udara") {
if (_root.xxbase2 == 1) {
jenisFormasi2 = 2;
} else if (_root.xxbase3 == 1) {
jenisFormasi2 = 3;
} else if (_root.xxbase4 == 1) {
jenisFormasi2 = 3;
} else if (_root.xxbase5 == 1) {
jenisFormasi2 = 4;
}
} else if (tipeBase == "bawah") {
if (_root.xxbase4 == 1) {
jenisFormasi2 = 2;
} else if (_root.xxbase5 == 1) {
jenisFormasi2 = 3;
} else if (_root.xxbase6 == 1) {
jenisFormasi2 = 3;
} else if (_root.xxbase7 == 1) {
jenisFormasi2 = 4;
}
} else if (_root.xxbase6 == 1) {
jenisFormasi2 = 2;
} else if (_root.xxbase7 == 1) {
jenisFormasi2 = 3;
} else if (_root.xxbase8 == 1) {
jenisFormasi2 = 3;
} else if (_root.xxbase9 == 1) {
jenisFormasi2 = 4;
}
} else {
jenisFormasi2 = random(4) + 1;
}
if (jenisFormasi2 == 1) {
if (tipePerang == "air") {
i = awalI;
while (i >= akhirI) {
j = 0;
while (j <= 0) {
jj = 0;
while (jj <= adaKaKi) {
if (jmlUnitMax2 > 0) {
jmlUnitMax2--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua2(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
jj++;
}
j++;
}
i--;
}
i = awalI + 4;
while (i >= (akhirI + 4)) {
j = 0;
while (j <= 0) {
jj = 0;
while (jj <= adaKaKi) {
if (jmlUnitMax2 > 0) {
jmlUnitMax2--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua2(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
jj++;
}
j++;
}
i--;
}
} else {
i = awalI;
while (i >= akhirI) {
j = 0;
while (j <= 0) {
jj = 0;
while (jj <= adaKaKi) {
if (jmlUnitMax2 > 0) {
jmlUnitMax2--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua2(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
jj++;
}
j++;
}
i--;
}
}
} else if (jenisFormasi2 == 2) {
if (tipePerang == "air") {
i = awalI - 2;
while (i >= akhirI) {
j = 0;
while (j <= 1) {
jj = 0;
while (jj <= adaKaKi) {
if (jmlUnitMax2 > 0) {
jmlUnitMax2--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua2(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
jj++;
}
j++;
}
i--;
}
i = (awalI - 2) + 4;
while (i >= (akhirI + 4)) {
j = 0;
while (j <= 1) {
jj = 0;
while (jj <= adaKaKi) {
if (jmlUnitMax2 > 0) {
jmlUnitMax2--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua2(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
jj++;
}
j++;
}
i--;
}
} else {
i = awalI - 2;
while (i >= akhirI) {
j = 0;
while (j <= 1) {
jj = 0;
while (jj <= adaKaKi) {
if (jmlUnitMax2 > 0) {
jmlUnitMax2--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua2(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
jj++;
}
j++;
}
i--;
}
}
} else if (jenisFormasi2 == 3) {
if (tipePerang == "air") {
i = (awalI - 1) + 4;
while (i >= ((akhirI + 1) + 4)) {
j = 0;
while (j <= 1) {
jj = 0;
while (jj <= adaKaKi) {
if (jmlUnitMax2 > 0) {
jmlUnitMax2--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua2(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
jj++;
}
j++;
}
i--;
}
i = awalI - 1;
while (i >= (akhirI + 1)) {
j = 0;
while (j <= 1) {
jj = 0;
while (jj <= adaKaKi) {
if (jmlUnitMax2 > 0) {
jmlUnitMax2--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua2(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
jj++;
}
j++;
}
i--;
}
} else {
i = awalI - 1;
while (i >= (akhirI + 1)) {
j = 0;
while (j <= 1) {
jj = 0;
while (jj <= adaKaKi) {
if (jmlUnitMax2 > 0) {
jmlUnitMax2--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua2(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
jj++;
}
j++;
}
i--;
}
}
} else if (jenisFormasi2 == 4) {
if (tipePerang == "air") {
i = awalI + 4;
while (i >= ((akhirI + 2) + 4)) {
j = 0;
while (j <= 1) {
jj = 0;
while (jj <= adaKaKi) {
if (jmlUnitMax2 > 0) {
jmlUnitMax2--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua2(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
jj++;
}
j++;
}
i--;
}
i = awalI;
while (i >= (akhirI + 2)) {
j = 0;
while (j <= 1) {
jj = 0;
while (jj <= adaKaKi) {
if (jmlUnitMax2 > 0) {
jmlUnitMax2--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua2(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
jj++;
}
j++;
}
i--;
}
} else {
i = awalI;
while (i >= (akhirI + 2)) {
j = 0;
while (j <= 1) {
jj = 0;
while (jj <= adaKaKi) {
if (jmlUnitMax2 > 0) {
jmlUnitMax2--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua2(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
jj++;
}
j++;
}
i--;
}
}
}
} else if (specialUnit == true) {
if (tipePerang == "sea2") {
if (indi == "laut") {
batasBawah = 2;
batasAtas = 3;
} else {
batasBawah = 6;
batasAtas = 7;
}
} else if (indi == "udara") {
batasBawah = 2;
batasAtas = 3;
} else {
batasBawah = 6;
batasAtas = 7;
}
if (tipeBase == "bawah") {
batasBawah = 4;
batasAtas = 5;
}
if (pilihKerajaan == 2) {
jenisFormasi2 = qqindi;
} else if (((_root["maxBase" + pilihKerajaan] - _root["banyakBase" + pilihKerajaan]) <= 2) && ((_root["maxBase" + pilihKerajaan] - _root["banyakBase" + pilihKerajaan]) >= 1)) {
if (indi == "udara") {
if (_root.xxbase2 == 1) {
jenisFormasi2 = 2;
} else if (_root.xxbase3 == 1) {
jenisFormasi2 = 3;
} else if (_root.xxbase4 == 1) {
jenisFormasi2 = 3;
} else if (_root.xxbase5 == 1) {
jenisFormasi2 = 4;
}
} else if (tipeBase == "bawah") {
if (_root.xxbase4 == 1) {
jenisFormasi2 = 1;
} else if (_root.xxbase5 == 1) {
jenisFormasi2 = 2;
} else if (_root.xxbase6 == 1) {
jenisFormasi2 = 2;
} else if (_root.xxbase7 == 1) {
jenisFormasi2 = 3;
}
} else if (_root.xxbase6 == 1) {
jenisFormasi2 = 1;
} else if (_root.xxbase7 == 1) {
jenisFormasi2 = 2;
} else if (_root.xxbase8 == 1) {
jenisFormasi2 = 2;
} else if (_root.xxbase9 == 1) {
jenisFormasi2 = 3;
}
} else {
jenisFormasi2 = random(3) + 1;
}
if (jenisFormasi2 == 1) {
if (tipePerang == "air") {
i = batasAtas + 4;
while (i >= (batasBawah + 4)) {
j = 1;
while (j <= 1) {
jj = 0;
while (jj <= adaKaKi) {
if (jmlUnitMax2 > 0) {
jmlUnitMax2--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua2(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
jj++;
}
j++;
}
i--;
}
i = batasAtas;
while (i >= batasBawah) {
j = 1;
while (j <= 1) {
jj = 0;
while (jj <= adaKaKi) {
if (jmlUnitMax2 > 0) {
jmlUnitMax2--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua2(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
jj++;
}
j++;
}
i--;
}
} else {
i = batasAtas;
while (i >= batasBawah) {
j = 1;
while (j <= 1) {
jj = 0;
while (jj <= adaKaKi) {
if (jmlUnitMax2 > 0) {
jmlUnitMax2--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua2(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
jj++;
}
j++;
}
i--;
}
}
} else if (jenisFormasi2 == 2) {
if (tipePerang == "air") {
i = (batasAtas + 1) + 4;
while (i >= ((batasBawah + 1) + 4)) {
j = 1;
while (j <= 1) {
jj = 0;
while (jj <= adaKaKi) {
if (jmlUnitMax2 > 0) {
jmlUnitMax2--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua2(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
jj++;
}
j++;
}
i--;
}
i = batasAtas + 1;
while (i >= (batasBawah + 1)) {
j = 1;
while (j <= 1) {
jj = 0;
while (jj <= adaKaKi) {
if (jmlUnitMax2 > 0) {
jmlUnitMax2--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua2(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
jj++;
}
j++;
}
i--;
}
} else {
i = batasAtas + 1;
while (i >= (batasBawah + 1)) {
j = 1;
while (j <= 1) {
jj = 0;
while (jj <= adaKaKi) {
if (jmlUnitMax2 > 0) {
jmlUnitMax2--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua2(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
jj++;
}
j++;
}
i--;
}
}
} else if (jenisFormasi2 == 3) {
if (tipePerang == "air") {
i = (batasAtas + 2) + 4;
while (i >= ((batasBawah + 2) + 4)) {
j = 1;
while (j <= 1) {
jj = 0;
while (jj <= adaKaKi) {
if (jmlUnitMax2 > 0) {
jmlUnitMax2--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua2(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
jj++;
}
j++;
}
i--;
}
i = batasAtas + 2;
while (i >= (batasBawah + 2)) {
j = 1;
while (j <= 1) {
jj = 0;
while (jj <= adaKaKi) {
if (jmlUnitMax2 > 0) {
jmlUnitMax2--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua2(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
jj++;
}
j++;
}
i--;
}
} else {
i = batasAtas + 2;
while (i >= (batasBawah + 2)) {
j = 1;
while (j <= 1) {
jj = 0;
while (jj <= adaKaKi) {
if (jmlUnitMax2 > 0) {
jmlUnitMax2--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua2(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
jj++;
}
j++;
}
i--;
}
}
}
}
} else if (pilihKerajaan == 2) {
cekPowerKurang3(frame.antrian1._currentframe - 20, pilihKerajaan);
antrianSekali = false;
pindahAntrian(2);
}
} else if (pilihKerajaan == 2) {
cekPowerKurang3(frame.antrian1._currentframe - 20, pilihKerajaan);
antrianSekali = false;
pindahAntrian(2);
}
}
if (adaMunculTentara2 == false) {
if (pilihKerajaan == 2) {
cekPowerKurang3(frame.antrian1._currentframe - 20, pilihKerajaan);
antrianSekali = false;
pindahAntrian(2);
}
}
}
function munculUnit3(wwindi, qqindi, zzindi) {
if (sedangPause == false) {
munculSiapa(3);
if (pilihKerajaan == 3) {
indi = zzindi;
bisaKeluarUnit = true;
} else {
indi = wwindi;
cekAI(3, indi);
}
if (jumlahUnit3 <= 100) {
if ((_root.sudahKalah3 == false) && (bisaKeluarUnit == true)) {
if (pilihKerajaan == 3) {
yindiy = wwindi;
}
xindix = 3;
if ((indi == "darat") || (indi == "laut")) {
if (tipePerang == "sea2") {
if (indi == "darat") {
awalI = 9;
akhirI = 6;
zpenambahan = 0;
jumlahanUnit = 1;
k = 0;
j = 0;
} else if (indi == "laut") {
awalI = 5;
akhirI = 2;
zpenambahan = 0;
jumlahanUnit = 0;
k = 0;
j = 0;
}
} else {
awalI = 9;
akhirI = 6;
zpenambahan = 0;
jumlahanUnit = 1;
k = 0;
j = 0;
}
} else if ((indi == "udara") || (indi == "artileri")) {
if (indi == "artileri") {
awalI = 9;
akhirI = 6;
zpenambahan = 0;
jumlahanUnit = 1;
k = 0;
j = 0;
} else if (indi == "udara") {
awalI = 5;
akhirI = 2;
zpenambahan = 100000 /* 0x0186A0 */;
jumlahanUnit = 0;
k = 0;
j = 0;
}
}
if ((((yindiy == 4) || (yindiy == 8)) || (yindiy == 12)) || (yindiy == 16)) {
specialUnit = true;
} else {
specialUnit = false;
}
jmlUnitMax3 = 8;
if (jmlUnitMax3 >= 8) {
jmlUnitMax3 = 8;
}
if (tipeBase == "bawah") {
awalI = 7;
akhirI = 4;
}
antrianSekali = false;
adaMunculTentara3 = false;
if ((indi == "darat") && (specialUnit == false)) {
if (pilihKerajaan == 3) {
jenisFormasi3 = qqindi;
} else if (((_root["maxBase" + pilihKerajaan] - _root["banyakBase" + pilihKerajaan]) <= 2) && ((_root["maxBase" + pilihKerajaan] - _root["banyakBase" + pilihKerajaan]) >= 1)) {
if (tipeBase == "bawah") {
if (_root.xxbase4 == 1) {
jenisFormasi3 = 2;
} else if (_root.xxbase5 == 1) {
jenisFormasi3 = 3;
} else if (_root.xxbase6 == 1) {
jenisFormasi3 = 3;
} else if (_root.xxbase7 == 1) {
jenisFormasi3 = 4;
}
} else if (_root.xxbase6 == 1) {
jenisFormasi3 = 2;
} else if (_root.xxbase7 == 1) {
jenisFormasi3 = 3;
} else if (_root.xxbase8 == 1) {
jenisFormasi3 = 3;
} else if (_root.xxbase9 == 1) {
jenisFormasi3 = 4;
}
} else {
jenisFormasi3 = random(7) + 1;
}
if (jenisFormasi3 == 1) {
i = awalI;
while (i >= akhirI) {
j = 0;
while (j <= 1) {
if (jmlUnitMax3 > 0) {
jmlUnitMax3--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua3(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
j++;
}
i--;
}
} else if (jenisFormasi3 == 2) {
i = awalI - 2;
while (i >= akhirI) {
j = 0;
while (j <= 3) {
if (jmlUnitMax3 > 0) {
jmlUnitMax3--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua3(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
j++;
}
i--;
}
} else if (jenisFormasi3 == 3) {
i = awalI - 1;
while (i >= (akhirI + 1)) {
j = 0;
while (j <= 3) {
if (jmlUnitMax3 > 0) {
jmlUnitMax3--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua3(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
j++;
}
i--;
}
} else if (jenisFormasi3 == 4) {
i = awalI;
while (i >= (akhirI + 2)) {
j = 0;
while (j <= 3) {
if (jmlUnitMax3 > 0) {
jmlUnitMax3--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua3(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
j++;
}
i--;
}
} else if (jenisFormasi3 == 5) {
j = 0;
while (j <= 2) {
if (j == 2) {
tandaAwal = 0;
tandaAkhir = 0;
} else {
tandaAwal = 1;
tandaAkhir = 1;
}
i = awalI - tandaAwal;
while (i >= (akhirI + tandaAkhir)) {
if (jmlUnitMax3 > 0) {
jmlUnitMax3--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua3(tentara, "tiga");
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
i--;
}
j++;
}
} else if (jenisFormasi3 == 6) {
j = 0;
while (j <= 2) {
if (j == 1) {
tandaAwal = 0;
tandaAkhir = 0;
} else {
tandaAwal = 1;
tandaAkhir = 1;
}
i = awalI - tandaAwal;
while (i >= (akhirI + tandaAkhir)) {
if (jmlUnitMax3 > 0) {
jmlUnitMax3--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua3(tentara, "tiga");
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
i--;
}
j++;
}
} else if (jenisFormasi3 == 7) {
j = 0;
while (j <= 2) {
if (j == 0) {
tandaAwal = 0;
tandaAkhir = 0;
} else {
tandaAwal = 1;
tandaAkhir = 1;
}
i = awalI - tandaAwal;
while (i >= (akhirI + tandaAkhir)) {
if (jmlUnitMax3 > 0) {
jmlUnitMax3--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua3(tentara, "tiga");
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
i--;
}
j++;
}
}
} else if ((((indi == "udara") || (indi == "artileri")) || (indi == "laut")) && (specialUnit == false)) {
if (pilihKerajaan == 3) {
jenisFormasi3 = qqindi;
} else if (((_root["maxBase" + pilihKerajaan] - _root["banyakBase" + pilihKerajaan]) <= 2) && ((_root["maxBase" + pilihKerajaan] - _root["banyakBase" + pilihKerajaan]) >= 1)) {
if (indi == "udara") {
if (_root.xxbase2 == 1) {
jenisFormasi3 = 2;
} else if (_root.xxbase3 == 1) {
jenisFormasi3 = 3;
} else if (_root.xxbase4 == 1) {
jenisFormasi3 = 3;
} else if (_root.xxbase5 == 1) {
jenisFormasi3 = 4;
}
} else if (tipeBase == "bawah") {
if (_root.xxbase4 == 1) {
jenisFormasi3 = 2;
} else if (_root.xxbase5 == 1) {
jenisFormasi3 = 3;
} else if (_root.xxbase6 == 1) {
jenisFormasi3 = 3;
} else if (_root.xxbase7 == 1) {
jenisFormasi3 = 4;
}
} else if (_root.xxbase6 == 1) {
jenisFormasi3 = 2;
} else if (_root.xxbase7 == 1) {
jenisFormasi3 = 3;
} else if (_root.xxbase8 == 1) {
jenisFormasi3 = 3;
} else if (_root.xxbase9 == 1) {
jenisFormasi3 = 4;
}
} else {
jenisFormasi3 = random(4) + 1;
}
if (jenisFormasi3 == 1) {
if (tipePerang == "air") {
i = awalI + 4;
while (i >= (akhirI + 4)) {
j = 0;
while (j <= 0) {
if (jmlUnitMax3 > 0) {
jmlUnitMax3--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua3(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
j++;
}
i--;
}
i = awalI;
while (i >= akhirI) {
j = 0;
while (j <= 0) {
if (jmlUnitMax3 > 0) {
jmlUnitMax3--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua3(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
j++;
}
i--;
}
} else {
i = awalI;
while (i >= akhirI) {
j = 0;
while (j <= 0) {
if (jmlUnitMax3 > 0) {
jmlUnitMax3--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua3(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
j++;
}
i--;
}
}
} else if (jenisFormasi3 == 2) {
if (tipePerang == "air") {
i = (awalI - 2) + 4;
while (i >= (akhirI + 4)) {
j = 0;
while (j <= 1) {
if (jmlUnitMax3 > 0) {
jmlUnitMax3--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua3(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
j++;
}
i--;
}
i = awalI - 2;
while (i >= akhirI) {
j = 0;
while (j <= 1) {
if (jmlUnitMax3 > 0) {
jmlUnitMax3--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua3(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
j++;
}
i--;
}
} else {
i = awalI - 2;
while (i >= akhirI) {
j = 0;
while (j <= 1) {
if (jmlUnitMax3 > 0) {
jmlUnitMax3--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua3(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
j++;
}
i--;
}
}
} else if (jenisFormasi3 == 3) {
if (tipePerang == "air") {
i = (awalI - 1) + 4;
while (i >= ((akhirI + 1) + 4)) {
j = 0;
while (j <= 1) {
if (jmlUnitMax3 > 0) {
jmlUnitMax3--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua3(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
j++;
}
i--;
}
i = awalI - 1;
while (i >= (akhirI + 1)) {
j = 0;
while (j <= 1) {
if (jmlUnitMax3 > 0) {
jmlUnitMax3--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua3(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
j++;
}
i--;
}
} else {
i = awalI - 1;
while (i >= (akhirI + 1)) {
j = 0;
while (j <= 1) {
if (jmlUnitMax3 > 0) {
jmlUnitMax3--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua3(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
j++;
}
i--;
}
}
} else if (jenisFormasi3 == 4) {
if (tipePerang == "air") {
i = awalI + 4;
while (i >= ((akhirI + 2) + 4)) {
j = 0;
while (j <= 1) {
if (jmlUnitMax3 > 0) {
jmlUnitMax3--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua3(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
j++;
}
i--;
}
i = awalI;
while (i >= (akhirI + 2)) {
j = 0;
while (j <= 1) {
if (jmlUnitMax3 > 0) {
jmlUnitMax3--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua3(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
j++;
}
i--;
}
} else {
i = awalI;
while (i >= (akhirI + 2)) {
j = 0;
while (j <= 1) {
if (jmlUnitMax3 > 0) {
jmlUnitMax3--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua3(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
j++;
}
i--;
}
}
}
} else if (specialUnit == true) {
if (tipePerang == "sea2") {
if (indi == "laut") {
batasBawah = 2;
batasAtas = 3;
} else {
batasBawah = 6;
batasAtas = 7;
}
} else if (indi == "udara") {
batasBawah = 2;
batasAtas = 3;
} else {
batasBawah = 6;
batasAtas = 7;
}
if (tipeBase == "bawah") {
batasBawah = 4;
batasAtas = 5;
}
if (pilihKerajaan == 3) {
jenisFormasi3 = qqindi;
} else if (((_root["maxBase" + pilihKerajaan] - _root["banyakBase" + pilihKerajaan]) <= 2) && ((_root["maxBase" + pilihKerajaan] - _root["banyakBase" + pilihKerajaan]) >= 1)) {
if (indi == "udara") {
if (_root.xxbase2 == 1) {
jenisFormasi3 = 2;
} else if (_root.xxbase3 == 1) {
jenisFormasi3 = 3;
} else if (_root.xxbase4 == 1) {
jenisFormasi3 = 3;
} else if (_root.xxbase5 == 1) {
jenisFormasi3 = 4;
}
} else if (tipeBase == "bawah") {
if (_root.xxbase4 == 1) {
jenisFormasi3 = 1;
} else if (_root.xxbase5 == 1) {
jenisFormasi3 = 2;
} else if (_root.xxbase6 == 1) {
jenisFormasi3 = 2;
} else if (_root.xxbase7 == 1) {
jenisFormasi3 = 3;
}
} else if (_root.xxbase6 == 1) {
jenisFormasi3 = 1;
} else if (_root.xxbase7 == 1) {
jenisFormasi3 = 2;
} else if (_root.xxbase8 == 1) {
jenisFormasi3 = 2;
} else if (_root.xxbase9 == 1) {
jenisFormasi3 = 3;
}
} else {
jenisFormasi3 = random(3) + 1;
}
if (jenisFormasi3 == 1) {
if (tipePerang == "air") {
i = batasAtas + 4;
while (i >= (batasBawah + 4)) {
j = 0;
while (j <= 0) {
if (jmlUnitMax3 > 0) {
jmlUnitMax3--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua3(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
j++;
}
i--;
}
i = batasAtas;
while (i >= batasBawah) {
j = 0;
while (j <= 0) {
if (jmlUnitMax3 > 0) {
jmlUnitMax3--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua3(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
j++;
}
i--;
}
} else {
i = batasAtas;
while (i >= batasBawah) {
j = 0;
while (j <= 0) {
if (jmlUnitMax3 > 0) {
jmlUnitMax3--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua3(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
j++;
}
i--;
}
}
} else if (jenisFormasi3 == 2) {
if (tipePerang == "air") {
i = (batasAtas + 1) + 4;
while (i >= ((batasBawah + 1) + 4)) {
j = 0;
while (j <= 0) {
if (jmlUnitMax3 > 0) {
jmlUnitMax3--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua3(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
j++;
}
i--;
}
i = batasAtas + 1;
while (i >= (batasBawah + 1)) {
j = 0;
while (j <= 0) {
if (jmlUnitMax3 > 0) {
jmlUnitMax3--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua3(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
j++;
}
i--;
}
} else {
i = batasAtas + 1;
while (i >= (batasBawah + 1)) {
j = 0;
while (j <= 0) {
if (jmlUnitMax3 > 0) {
jmlUnitMax3--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua3(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
j++;
}
i--;
}
}
} else if (jenisFormasi3 == 3) {
if (tipePerang == "air") {
i = (batasAtas + 2) + 4;
while (i >= ((batasBawah + 2) + 4)) {
j = 0;
while (j <= 0) {
if (jmlUnitMax3 > 0) {
jmlUnitMax3--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua3(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
j++;
}
i--;
}
i = batasAtas + 2;
while (i >= (batasBawah + 2)) {
j = 0;
while (j <= 0) {
if (jmlUnitMax3 > 0) {
jmlUnitMax3--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua3(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
j++;
}
i--;
}
} else {
i = batasAtas + 2;
while (i >= (batasBawah + 2)) {
j = 0;
while (j <= 0) {
if (jmlUnitMax3 > 0) {
jmlUnitMax3--;
if (_root["tentara" + banyakTentara] == undefined) {
tentara = attachMovie(("tentara_mc" + yindiy) + xindix, "tentara" + banyakTentara, ((i * 1000) + zbanyakTentara) + zpenambahan);
tentara.cacheAsBitmap;
buatSemua3(tentara);
} else {
banyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
}
}
j++;
}
i--;
}
}
}
}
} else if (pilihKerajaan == 3) {
cekPowerKurang3(frame.antrian1._currentframe - 40, pilihKerajaan);
antrianSekali = false;
pindahAntrian(3);
}
} else if (pilihKerajaan == 3) {
cekPowerKurang3(frame.antrian1._currentframe - 40, pilihKerajaan);
antrianSekali = false;
pindahAntrian(3);
}
}
if (adaMunculTentara3 == false) {
if (pilihKerajaan == 3) {
cekPowerKurang3(frame.antrian1._currentframe - 40, pilihKerajaan);
antrianSekali = false;
pindahAntrian(3);
}
}
}
function cekAI(xindi, indi) {
bisaKeluarUnit = false;
if (sulitMap[pilihPeta] == 1) {
randPintar = random(100);
} else if (sulitMap[pilihPeta] == 2) {
randPintar = random(80);
} else if (sulitMap[pilihPeta] == 3) {
randPintar = random(60);
} else if (sulitMap[pilihPeta] == 4) {
randPintar = random(40);
} else {
randPintar = random(20);
}
if (randPintar <= 35) {
bisaNabung = false;
if (sulitMap[pilihPeta] >= 4) {
if (_root["xpowerKini" + xindi] < 100) {
bisaNabung = true;
}
}
if (bisaNabung == false) {
if (sulitMap[pilihPeta] == 1) {
batasBawah = 1;
} else if (sulitMap[pilihPeta] == 2) {
batasBawah = 2;
} else if (sulitMap[pilihPeta] == 3) {
batasBawah = 3;
} else {
batasBawah = 4;
}
if (indi == "darat") {
i = batasBawah;
while (i >= 1) {
cekPowerKurang2(i);
if (_root["xpowerKini" + xindi] >= zberkurangPower) {
_root["xpowerKini" + xindi] = _root["xpowerKini" + xindi] - zberkurangPower;
yindiy = i;
i = 1;
bisaKeluarUnit = true;
}
i--;
}
} else if (indi == "artileri") {
i = batasBawah + 4;
while (i >= 5) {
cekPowerKurang2(i);
if (_root["xpowerKini" + xindi] >= zberkurangPower) {
_root["xpowerKini" + xindi] = _root["xpowerKini" + xindi] - zberkurangPower;
yindiy = i;
i = 5;
bisaKeluarUnit = true;
}
i--;
}
} else if (indi == "udara") {
if (tipePerang == "air") {
i = batasBawah + 8;
while (i >= 9) {
if (i != 11) {
if (xindi == 2) {
if (i != 12) {
cekPowerKurang2(i);
if (_root["xpowerKini" + xindi] >= zberkurangPower) {
_root["xpowerKini" + xindi] = _root["xpowerKini" + xindi] - zberkurangPower;
yindiy = i;
i = 9;
bisaKeluarUnit = true;
}
}
} else {
cekPowerKurang2(i);
if (_root["xpowerKini" + xindi] >= zberkurangPower) {
_root["xpowerKini" + xindi] = _root["xpowerKini" + xindi] - zberkurangPower;
yindiy = i;
i = 9;
bisaKeluarUnit = true;
}
}
}
i--;
}
} else {
i = batasBawah + 8;
while (i >= 9) {
if (xindi == 2) {
if (prioritasSerang == "udara") {
if ((i != 11) && (i != 12)) {
cekPowerKurang2(i);
if (_root["xpowerKini" + xindi] >= zberkurangPower) {
_root["xpowerKini" + xindi] = _root["xpowerKini" + xindi] - zberkurangPower;
yindiy = i;
i = 9;
bisaKeluarUnit = true;
}
}
} else {
cekPowerKurang2(i);
if (_root["xpowerKini" + xindi] >= zberkurangPower) {
_root["xpowerKini" + xindi] = _root["xpowerKini" + xindi] - zberkurangPower;
yindiy = i;
i = 9;
bisaKeluarUnit = true;
}
}
} else if (prioritasSerang == "udara") {
if (i != 12) {
cekPowerKurang2(i);
if (_root["xpowerKini" + xindi] >= zberkurangPower) {
_root["xpowerKini" + xindi] = _root["xpowerKini" + xindi] - zberkurangPower;
yindiy = i;
i = 9;
bisaKeluarUnit = true;
}
}
} else {
cekPowerKurang2(i);
if (_root["xpowerKini" + xindi] >= zberkurangPower) {
_root["xpowerKini" + xindi] = _root["xpowerKini" + xindi] - zberkurangPower;
yindiy = i;
i = 9;
bisaKeluarUnit = true;
}
}
i--;
}
}
} else if (indi == "laut") {
i = batasBawah + 12;
while (i >= 13) {
cekPowerKurang2(i);
if (_root["xpowerKini" + xindi] >= zberkurangPower) {
_root["xpowerKini" + xindi] = _root["xpowerKini" + xindi] - zberkurangPower;
yindiy = i;
i = 13;
bisaKeluarUnit = true;
}
i--;
}
}
}
} else {
if (sulitMap[pilihPeta] == 1) {
batasBawah = 1;
} else if (sulitMap[pilihPeta] == 2) {
batasBawah = 2;
} else if (sulitMap[pilihPeta] == 3) {
batasBawah = 3;
} else {
batasBawah = 4;
}
if (indi == "darat") {
i = 1;
while (i <= batasBawah) {
cekPowerKurang2(i);
if (_root["xpowerKini" + xindi] >= zberkurangPower) {
_root["xpowerKini" + xindi] = _root["xpowerKini" + xindi] - zberkurangPower;
yindiy = i;
i = 4;
bisaKeluarUnit = true;
}
i++;
}
} else if (indi == "artileri") {
i = 5;
while (i <= (batasBawah + 4)) {
cekPowerKurang2(i);
if (_root["xpowerKini" + xindi] >= zberkurangPower) {
_root["xpowerKini" + xindi] = _root["xpowerKini" + xindi] - zberkurangPower;
yindiy = i;
i = 8;
bisaKeluarUnit = true;
}
i++;
}
} else if (indi == "udara") {
if (tipePerang == "air") {
i = 9;
while (i <= (batasBawah + 8)) {
if (i != 11) {
if (xindi == 2) {
if (i != 12) {
cekPowerKurang2(i);
if (_root["xpowerKini" + xindi] >= zberkurangPower) {
_root["xpowerKini" + xindi] = _root["xpowerKini" + xindi] - zberkurangPower;
yindiy = i;
i = 12;
bisaKeluarUnit = true;
}
}
} else {
cekPowerKurang2(i);
if (_root["xpowerKini" + xindi] >= zberkurangPower) {
_root["xpowerKini" + xindi] = _root["xpowerKini" + xindi] - zberkurangPower;
yindiy = i;
i = 12;
bisaKeluarUnit = true;
}
}
}
i++;
}
} else {
i = 9;
while (i <= (batasBawah + 8)) {
cekPowerKurang2(i);
if (_root["xpowerKini" + xindi] >= zberkurangPower) {
_root["xpowerKini" + xindi] = _root["xpowerKini" + xindi] - zberkurangPower;
yindiy = i;
i = 12;
bisaKeluarUnit = true;
}
i++;
}
}
} else if (indi == "laut") {
i = 13;
while (i <= (batasBawah + 12)) {
cekPowerKurang2(i);
if (_root["xpowerKini" + xindi] >= zberkurangPower) {
_root["xpowerKini" + xindi] = _root["xpowerKini" + xindi] - zberkurangPower;
yindiy = i;
i = 16;
bisaKeluarUnit = true;
}
i++;
}
}
}
}
function cekPowerKurang(yindiy, zyindi) {
xpowerUnit = new Array("", 15, 25, 30, 45, 50, 60, 70, 95, 45, 60, 55, 75, 35, 40, 70, 80, 30, 40, 50, 75, 80, 100, 120, 140);
if (yindiy == 1) {
berkurangPower = xpowerUnit[yindiy];
} else if (yindiy == 2) {
berkurangPower = xpowerUnit[yindiy];
} else if (yindiy == 3) {
berkurangPower = xpowerUnit[yindiy];
} else if (yindiy == 4) {
berkurangPower = xpowerUnit[yindiy];
} else if (yindiy == 5) {
berkurangPower = xpowerUnit[yindiy];
} else if (yindiy == 6) {
berkurangPower = xpowerUnit[yindiy];
} else if (yindiy == 7) {
berkurangPower = xpowerUnit[yindiy];
} else if (yindiy == 8) {
berkurangPower = xpowerUnit[yindiy];
} else if (yindiy == 9) {
berkurangPower = xpowerUnit[yindiy];
} else if (yindiy == 10) {
berkurangPower = xpowerUnit[yindiy];
} else if (yindiy == 11) {
berkurangPower = xpowerUnit[yindiy];
} else if (yindiy == 12) {
berkurangPower = xpowerUnit[yindiy];
} else if (yindiy == 13) {
berkurangPower = xpowerUnit[yindiy];
} else if (yindiy == 14) {
berkurangPower = xpowerUnit[yindiy];
} else if (yindiy == 15) {
berkurangPower = xpowerUnit[yindiy];
} else if (yindiy == 16) {
berkurangPower = xpowerUnit[yindiy];
} else if (yindiy == 17) {
berkurangPower = xpowerUnit[yindiy];
} else if (yindiy == 18) {
berkurangPower = xpowerUnit[yindiy];
} else if (yindiy == 19) {
berkurangPower = xpowerUnit[yindiy];
} else if (yindiy == 20) {
berkurangPower = xpowerUnit[yindiy];
} else if (yindiy == 21) {
berkurangPower = xpowerUnit[yindiy];
} else if (yindiy == 22) {
berkurangPower = xpowerUnit[yindiy];
} else if (yindiy == 23) {
berkurangPower = xpowerUnit[yindiy];
} else if (yindiy == 24) {
berkurangPower = xpowerUnit[yindiy];
}
if (_root["kerajaan" + zyindi] == "jagoan") {
bisaKeluarUnit = false;
if (_root["xpowerKini" + zyindi] >= berkurangPower) {
_root["xpowerKini" + zyindi] = _root["xpowerKini" + zyindi] - berkurangPower;
bisaKeluarUnit = true;
}
} else {
_root["xpowerKini" + zyindi] = _root["xpowerKini" + zyindi] - berkurangPower;
}
}
function cekPowerKurang2(zindiz) {
xpowerUnit = new Array("", 15, 25, 30, 45, 50, 60, 70, 95, 45, 60, 55, 75, 35, 40, 70, 80, 30, 40, 50, 75, 80, 100, 120, 140);
if (zindiz == 1) {
zberkurangPower = xpowerUnit[zindiz];
} else if (zindiz == 2) {
zberkurangPower = xpowerUnit[zindiz];
} else if (zindiz == 3) {
zberkurangPower = xpowerUnit[zindiz];
} else if (zindiz == 4) {
zberkurangPower = xpowerUnit[zindiz];
} else if (zindiz == 5) {
zberkurangPower = xpowerUnit[zindiz];
} else if (zindiz == 6) {
zberkurangPower = xpowerUnit[zindiz];
} else if (zindiz == 7) {
zberkurangPower = xpowerUnit[zindiz];
} else if (zindiz == 8) {
zberkurangPower = xpowerUnit[zindiz];
} else if (zindiz == 9) {
zberkurangPower = xpowerUnit[zindiz];
} else if (zindiz == 10) {
zberkurangPower = xpowerUnit[zindiz];
} else if (zindiz == 11) {
zberkurangPower = xpowerUnit[zindiz];
} else if (zindiz == 12) {
zberkurangPower = xpowerUnit[zindiz];
} else if (zindiz == 13) {
zberkurangPower = xpowerUnit[zindiz];
} else if (zindiz == 14) {
zberkurangPower = xpowerUnit[zindiz];
} else if (zindiz == 15) {
zberkurangPower = xpowerUnit[zindiz];
} else if (zindiz == 16) {
zberkurangPower = xpowerUnit[zindiz];
} else if (zindiz == 17) {
zberkurangPower = xpowerUnit[zindiz];
} else if (zindiz == 18) {
zberkurangPower = xpowerUnit[zindiz];
} else if (zindiz == 19) {
zberkurangPower = xpowerUnit[zindiz];
} else if (zindiz == 20) {
zberkurangPower = xpowerUnit[zindiz];
} else if (zindiz == 21) {
zberkurangPower = xpowerUnit[zindiz];
} else if (zindiz == 22) {
zberkurangPower = xpowerUnit[zindiz];
} else if (zindiz == 23) {
zberkurangPower = xpowerUnit[zindiz];
} else if (zindiz == 24) {
zberkurangPower = xpowerUnit[zindiz];
}
}
function cekPowerKurang3(zindiz, zyindi) {
xpowerUnit = new Array("", 15, 25, 30, 45, 50, 60, 70, 95, 45, 60, 55, 75, 35, 40, 70, 80, 30, 40, 50, 75, 80, 100, 120, 140);
if (zindiz == 1) {
zberkurangPower = xpowerUnit[zindiz];
} else if (zindiz == 2) {
zberkurangPower = xpowerUnit[zindiz];
} else if (zindiz == 3) {
zberkurangPower = xpowerUnit[zindiz];
} else if (zindiz == 4) {
zberkurangPower = xpowerUnit[zindiz];
} else if (zindiz == 5) {
zberkurangPower = xpowerUnit[zindiz];
} else if (zindiz == 6) {
zberkurangPower = xpowerUnit[zindiz];
} else if (zindiz == 7) {
zberkurangPower = xpowerUnit[zindiz];
} else if (zindiz == 8) {
zberkurangPower = xpowerUnit[zindiz];
} else if (zindiz == 9) {
zberkurangPower = xpowerUnit[zindiz];
} else if (zindiz == 10) {
zberkurangPower = xpowerUnit[zindiz];
} else if (zindiz == 11) {
zberkurangPower = xpowerUnit[zindiz];
} else if (zindiz == 12) {
zberkurangPower = xpowerUnit[zindiz];
} else if (zindiz == 13) {
zberkurangPower = xpowerUnit[zindiz];
} else if (zindiz == 14) {
zberkurangPower = xpowerUnit[zindiz];
} else if (zindiz == 15) {
zberkurangPower = xpowerUnit[zindiz];
} else if (zindiz == 16) {
zberkurangPower = xpowerUnit[zindiz];
} else if (zindiz == 17) {
zberkurangPower = xpowerUnit[zindiz];
} else if (zindiz == 18) {
zberkurangPower = xpowerUnit[zindiz];
} else if (zindiz == 19) {
zberkurangPower = xpowerUnit[zindiz];
} else if (zindiz == 20) {
zberkurangPower = xpowerUnit[zindiz];
} else if (zindiz == 21) {
zberkurangPower = xpowerUnit[zindiz];
} else if (zindiz == 22) {
zberkurangPower = xpowerUnit[zindiz];
} else if (zindiz == 23) {
zberkurangPower = xpowerUnit[zindiz];
} else if (zindiz == 24) {
zberkurangPower = xpowerUnit[zindiz];
}
_root["xpowerKini" + zyindi] = _root["xpowerKini" + zyindi] + Math.ceil(zberkurangPower * 0.9);
if (_root["xpowerKini" + zyindi] >= _root["xpowerMax" + zyindi]) {
_root["xpowerKini" + zyindi] = _root["xpowerMax" + zyindi];
}
}
function perubahanDasar(indi, indi2) {
if (indi != pilihKerajaan) {
if (sulitMap[pilihPeta] == 1) {
perubahanLive = 0.25;
} else if (sulitMap[pilihPeta] == 2) {
perubahanLive = 1;
} else if (sulitMap[pilihPeta] == 3) {
perubahanLive = 2.5;
} else if (sulitMap[pilihPeta] == 4) {
perubahanLive = 3.5;
} else {
perubahanLive = 4;
}
if (sulitMap[pilihPeta] == 1) {
perubahanDamage = 0.5;
} else if (sulitMap[pilihPeta] == 2) {
perubahanDamage = 2;
} else if (sulitMap[pilihPeta] == 3) {
perubahanDamage = 3.5;
} else if (sulitMap[pilihPeta] == 4) {
perubahanDamage = 4;
} else {
perubahanDamage = 4.5;
}
if (sulitMap[pilihPeta] == 1) {
perubahanSpeed = 1;
} else if (sulitMap[pilihPeta] == 2) {
perubahanSpeed = 1.25;
} else if (sulitMap[pilihPeta] == 3) {
perubahanSpeed = 1.5;
} else if (sulitMap[pilihPeta] == 4) {
perubahanSpeed = 1.75;
} else {
perubahanSpeed = 2;
}
if (sulitMap[pilihPeta] == 1) {
perubahanArmor = 1;
} else if (sulitMap[pilihPeta] == 2) {
perubahanArmor = 2.5;
} else if (sulitMap[pilihPeta] == 3) {
perubahanArmor = 5;
} else if (sulitMap[pilihPeta] == 4) {
perubahanArmor = 7.5;
} else {
perubahanArmor = 10;
}
perubahanLive = perubahanLive * 0.25;
perubahanDamage = perubahanDamage * 1.5;
perubahanSpeed = perubahanSpeed * 1.25;
} else {
if (indi2 <= 4) {
perubahanLive = _root["lifeLevel1" + indi2] / 1.5;
} else if (indi2 <= 8) {
perubahanLive = _root["lifeLevel2" + (indi2 - 4)] / 1.5;
} else if (indi2 <= 12) {
perubahanLive = _root["lifeLevel3" + (indi2 - 8)] / 1.5;
} else if (indi2 <= 16) {
perubahanLive = _root["lifeLevel4" + (indi2 - 12)] / 1.5;
} else if (indi2 <= 20) {
perubahanLive = _root["lifeLevel5" + (indi2 - 16)] / 1.5;
}
if (indi2 <= 4) {
perubahanDamage = _root["damageLevel1" + indi2] / 1.5;
} else if (indi2 <= 8) {
perubahanDamage = _root["damageLevel2" + (indi2 - 4)] / 1.5;
} else if (indi2 <= 12) {
perubahanDamage = _root["damageLevel3" + (indi2 - 8)] / 1.5;
} else if (indi2 <= 16) {
perubahanDamage = _root["damageLevel4" + (indi2 - 12)] / 1.5;
} else if (indi2 <= 20) {
perubahanDamage = _root["damageLevel5" + (indi2 - 16)] / 1.5;
}
if (indi2 <= 4) {
xperubahanSpeed = _root["speedLevel1" + indi2];
} else if (indi2 <= 8) {
xperubahanSpeed = _root["speedLevel2" + (indi2 - 4)];
} else if (indi2 <= 12) {
xperubahanSpeed = _root["speedLevel3" + (indi2 - 8)];
} else if (indi2 <= 16) {
xperubahanSpeed = _root["speedLevel4" + (indi2 - 12)];
} else if (indi2 <= 20) {
xperubahanSpeed = _root["speedLevel5" + (indi2 - 16)];
}
if (xperubahanSpeed == 1) {
perubahanSpeed = 1;
} else if (xperubahanSpeed == 2) {
perubahanSpeed = 1.2;
} else if (xperubahanSpeed == 3) {
perubahanSpeed = 1.3;
} else if (xperubahanSpeed == 4) {
perubahanSpeed = 1.4;
} else if (xperubahanSpeed == 5) {
perubahanSpeed = 1.5;
} else if (xperubahanSpeed == 6) {
perubahanSpeed = 1.6;
} else if (xperubahanSpeed == 7) {
perubahanSpeed = 1.7;
} else if (xperubahanSpeed == 8) {
perubahanSpeed = 1.8;
} else if (xperubahanSpeed == 9) {
perubahanSpeed = 1.9;
} else if (xperubahanSpeed == 10) {
perubahanSpeed = 2.5;
}
if (indi2 <= 4) {
xperubahanArmor = _root["armorLevel1" + indi2];
} else if (indi2 <= 8) {
xperubahanArmor = _root["armorLevel2" + (indi2 - 4)];
} else if (indi2 <= 12) {
xperubahanArmor = _root["armorLevel3" + (indi2 - 8)];
} else if (indi2 <= 16) {
xperubahanArmor = _root["armorLevel4" + (indi2 - 12)];
} else if (indi2 <= 20) {
xperubahanArmor = _root["armorLevel5" + (indi2 - 16)];
}
if (xperubahanArmor == 1) {
perubahanArmor = 1;
} else if (xperubahanArmor == 2) {
perubahanArmor = 2;
} else if (xperubahanArmor == 3) {
perubahanArmor = 3;
} else if (xperubahanArmor == 4) {
perubahanArmor = 4;
} else if (xperubahanArmor == 5) {
perubahanArmor = 5;
} else if (xperubahanArmor == 6) {
perubahanArmor = 6;
} else if (xperubahanArmor == 7) {
perubahanArmor = 7;
} else if (xperubahanArmor == 8) {
perubahanArmor = 8;
} else if (xperubahanArmor == 9) {
perubahanArmor = 9;
} else if (xperubahanArmor == 10) {
perubahanArmor = 10;
}
perubahanLive = perubahanLive * 1.25;
perubahanDamage = perubahanDamage * 3.25;
perubahanSpeed = perubahanSpeed * 1.25;
}
if (indi == 1) {
perubahanDamage = perubahanDamage * 1.75;
perubahanLive = perubahanLive * 0.75;
} else if (indi == 2) {
if ((indi2 <= 8) || (indi2 >= 13)) {
perubahanSpeed = perubahanSpeed * 1.25;
}
perubahanDamage = perubahanDamage * 0.5;
perubahanLive = perubahanLive * 1;
} else if (indi == 3) {
perubahanDamage = perubahanDamage * 1.25;
perubahanLive = perubahanLive * 1.5;
}
}
function buatSemua1(xindi) {
jumlahUnit1++;
pindahAntrian(1);
xindi._x = ((-60 + back_mc._x) - random(10)) - (j * 40);
if (i <= 2) {
if (yindiy == 10) {
xindi._y = (0 + (i * 40)) - 15;
} else {
xindi._y = (0 + (i * 40)) - 15;
}
} else {
xindi._y = (0 + (i * 40)) - 15;
}
adaMunculTentara1 = true;
xindi.indi = banyakTentara;
xindi.jenis = 1;
xindi.ztarget = false;
xindi.ztarget2 = false;
xindi.xtarget = false;
xindi.barisKe = i;
xindi.posisiX = undefined;
xindi.posisiY = undefined;
xindi.diSemak = false;
xindi.tipe = "pasukan";
xindi.jenisUnitnya = yindiy;
xindi.targetKena = 1;
if (yindiy <= 4) {
xindi.perisai = "orang";
} else {
xindi.perisai = "besi";
}
if (yindiy == 1) {
xindi.tipeSerangan = "normal";
} else if (yindiy == 2) {
xindi.tipeSerangan = "mortir";
} else if (yindiy == 3) {
xindi.tipeSerangan = "bazoka";
} else if (yindiy == 4) {
xindi.tipeSerangan = "laser";
} else if (yindiy == 5) {
xindi.tipeSerangan = "canontank";
} else if (yindiy == 6) {
xindi.tipeSerangan = "normal";
} else if (yindiy == 7) {
xindi.tipeSerangan = "mortir";
} else if (yindiy == 8) {
xindi.tipeSerangan = "sonic";
} else if (yindiy == 9) {
xindi.tipeSerangan = "normal";
_root.backPesawat();
} else if (yindiy == 10) {
xindi.tipeSerangan = "bazoka";
_root.backPesawat();
} else if (yindiy == 11) {
xindi.tipeSerangan = "airbomb";
_root.backPesawat();
} else if (yindiy == 12) {
xindi.tipeSerangan = "bazoka";
xindi.stealth = true;
xindi.sedangHilang = true;
xindi._alpha = 25;
_root.backPesawat();
} else if (yindiy == 13) {
xindi.tipeSerangan = "normal";
} else if (yindiy == 14) {
xindi.tipeSerangan = "normal";
} else if (yindiy == 15) {
xindi.tipeSerangan = "mortir";
} else if (yindiy == 16) {
xindi.tipeSerangan = "destroyer";
}
if (tipePerang == "sea2") {
xindi.posMuncul = "bawah";
} else if (tipePerang == "air") {
xindi.posMuncul = "atas";
} else if (tipeBase == "bawah") {
if (i <= 3) {
xindi.posMuncul = "atas";
} else {
xindi.posMuncul = "bawah";
}
} else if (i <= 5) {
xindi.posMuncul = "atas";
} else {
xindi.posMuncul = "bawah";
}
if (xindi.posMuncul == "atas") {
if (yindiy == 9) {
xindi.live = 7500 + random(750);
} else if (yindiy == 10) {
xindi.live = 10000 + random(1000);
} else if ((yindiy == 11) || (yindiy == 12)) {
xindi.live = 12500 + random(1250);
}
xindi.armor = 10 + random(2);
if (yindiy == 9) {
xindi.damage = 1200 + random(120);
} else {
xindi.damage = 300 + random(30);
}
xindi.lahan = "udara";
if ((yindiy == 9) || (yindiy == 10)) {
xindi.speed = 3;
} else if (yindiy == 12) {
xindi.speed = 3.5;
} else {
xindi.speed = 2;
}
if (tipePerang == "air") {
xindi.batasManufer = xindi._y;
xindi.keArah = 0;
if (i == 2) {
xindi.batasManufer = xindi._y + 40;
xindi.keArah = 1;
} else if (i == 3) {
xindi.batasManufer = xindi._y - 40;
xindi.keArah = -1;
} else if (i == 4) {
xindi.batasManufer = xindi._y + 40;
xindi.keArah = 1;
} else if (i == 5) {
xindi.batasManufer = xindi._y - 40;
xindi.keArah = -1;
}
if (i == 6) {
xindi.batasManufer = xindi._y + 40;
xindi.keArah = 1;
} else if (i == 7) {
xindi.batasManufer = xindi._y - 40;
xindi.keArah = -1;
} else if (i == 8) {
xindi.batasManufer = xindi._y + 40;
xindi.keArah = 1;
} else if (i == 9) {
xindi.batasManufer = xindi._y - 40;
xindi.keArah = -1;
}
} else if (i == 2) {
xindi.batasManufer = xindi._y + 40;
xindi.keArah = 1;
} else if (i == 3) {
xindi.batasManufer = xindi._y - 40;
xindi.keArah = -1;
} else if (i == 4) {
xindi.batasManufer = xindi._y + 40;
xindi.keArah = 1;
} else if (i == 5) {
xindi.batasManufer = xindi._y - 40;
xindi.keArah = -1;
} else {
xindi.batasManufer = xindi._y;
xindi.keArah = 0;
}
} else {
if (xindi.tipeSerangan == "normal") {
if (yindiy == 6) {
xindi.live = 25000 + random(2500);
} else if ((yindiy == 13) || (yindiy == 14)) {
xindi.live = 5000 + random(500);
} else {
xindi.live = 500 + random(50);
}
} else if (xindi.tipeSerangan == "mortir") {
if (yindiy == 7) {
xindi.live = 15000 + random(1500);
} else if (yindiy == 15) {
xindi.live = 10000 + random(1000);
} else {
xindi.live = 250 + random(25);
}
} else if (xindi.tipeSerangan == "bazoka") {
xindi.live = 400 + random(40);
} else if (xindi.tipeSerangan == "laser") {
xindi.live = 750 + random(75);
} else if (xindi.tipeSerangan == "canontank") {
xindi.live = 20000 + random(2000);
} else if (xindi.tipeSerangan == "sonic") {
xindi.live = 25000 + random(2500);
} else if (xindi.tipeSerangan == "destroyer") {
xindi.live = 30000 + random(3000);
}
xindi.armor = 10 + random(2);
if (yindiy == 6) {
xindi.damage = 300 + random(30);
} else if ((yindiy == 13) || (yindiy == 14)) {
xindi.damage = 400 + random(40);
} else {
xindi.damage = 40 + random(4);
}
xindi.lahan = "darat";
if (xindi.tipeSerangan == "normal") {
if (yindiy == 6) {
xindi.speed = 0.3;
} else {
xindi.speed = 1.25;
}
} else if (xindi.tipeSerangan == "mortir") {
xindi.speed = 0.5;
} else if (xindi.tipeSerangan == "bazoka") {
xindi.speed = 0.4;
} else if (xindi.tipeSerangan == "laser") {
xindi.speed = 0.3;
xindi.targetKena = random(2) + 1;
} else if (xindi.tipeSerangan == "canontank") {
xindi.speed = 0.3;
} else if (xindi.tipeSerangan == "sonic") {
xindi.speed = 0.5;
} else if (xindi.tipeSerangan == "destroyer") {
xindi.speed = 0.3;
}
}
xindi.speed = xindi.speed * 1.25;
xindi.nyawaToxin = 3;
xindi.targetKena = random(3) + 2;
perubahanDasar(1, yindiy);
xindi.live = xindi.live * perubahanLive;
xindi.damage = xindi.damage * perubahanDamage;
xindi.speed = xindi.speed * perubahanSpeed;
xindi.armor = xindi.armor * perubahanArmor;
xindi.maxLive = xindi.live;
xindi.totalLive = xindi.live;
xindi.moveManuver = 1.5;
xindi.zdelay = 100;
xindi.jenisTipe = yindiy;
if (xindi.tipeSerangan == "mortir") {
xindi.range = 4;
} else if (xindi.tipeSerangan == "bazoka") {
if ((yindiy == 10) | (yindiy == 12)) {
xindi.range = 8;
} else {
xindi.range = 5 + random(2);
}
} else if (xindi.tipeSerangan == "laser") {
xindi.range = 6;
} else if (xindi.tipeSerangan == "sonic") {
xindi.range = 8;
} else if (xindi.tipeSerangan == "airbomb") {
xindi.range = 4;
} else if (xindi.tipeSerangan == "canontank") {
xindi.range = 4;
} else if (xindi.tipeSerangan == "destroyer") {
xindi.range = 8;
} else {
xindi.range = 3;
}
xindi.mati = false;
xindi.batasRemove = 1650;
xindi.onEnterFrame = enterTentara;
xindi.onRollOver = overTentara;
xindi.onRollOut = outTentara;
xindi.nyawa_mc._visible = false;
banyakTentara++;
zbanyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
if (zbanyakTentara >= totalUnit) {
zbanyakTentara = tentaraAwal;
}
}
function buatSemua2(xindi) {
jumlahUnit2++;
pindahAntrian(2);
xindi.barisKe = i;
if (pilihKerajaan == 1) {
if (musuhSiapa == 2) {
xindi._xscale = -100;
xindi._x = ((1710 + xback._x) + random(10)) - (j * 40);
} else if (jj == 0) {
xindi._xscale = -100;
if (i <= 5) {
xindi._x = (((780 + xback._x) + random(10)) - (j * 30)) - (k * 25);
} else {
xindi._x = (((780 + xback._x) + random(10)) - (j * 30)) - (k * 25);
}
} else {
xindi._xscale = 100;
if (i <= 5) {
xindi._x = (((850 + xback._x) + random(10)) - (j * 30)) - (k * 25);
} else if (jenisFormasi2 == 1) {
xindi._x = (((840 + xback._x) + random(10)) - (j * 30)) - (k * 25);
} else {
xindi._x = (((880 + xback._x) + random(10)) - (j * 30)) - (k * 25);
}
}
} else if (pilihKerajaan == 2) {
if (yangMain1 == false) {
jj = 1;
xindi._xscale = 100;
xindi._x = ((-210 + back_mc._x) - random(10)) - (j * 40);
} else if (yangMain3 == false) {
jj = 0;
xindi._xscale = -100;
if (i <= 5) {
xindi._x = (((1710 + xback._x) + random(10)) - (j * 30)) - (k * 25);
} else {
xindi._x = (((1710 + xback._x) + random(10)) - (j * 30)) - (k * 25);
}
} else if (jj == 0) {
xindi._xscale = -100;
if (i <= 5) {
xindi._x = (((780 + xback._x) + random(10)) - (j * 30)) - (k * 25);
} else {
xindi._x = (((780 + xback._x) + random(10)) - (j * 30)) - (k * 25);
}
} else {
xindi._xscale = 100;
if (i <= 5) {
xindi._x = (((850 + xback._x) + random(10)) - (j * 30)) - (k * 25);
} else if (jenisFormasi2 == 1) {
xindi._x = (((840 + xback._x) + random(10)) - (j * 30)) - (k * 25);
} else {
xindi._x = (((880 + xback._x) + random(10)) - (j * 30)) - (k * 25);
}
}
} else if (pilihKerajaan == 3) {
if (yangMain1 == false) {
jj = 1;
xindi._xscale = 100;
xindi._x = ((-60 + back_mc._x) - random(10)) - (j * 40);
} else if (jj == 0) {
xindi._xscale = -100;
if (i <= 5) {
xindi._x = (((780 + xback._x) + random(10)) - (j * 30)) - (k * 25);
} else {
xindi._x = (((780 + xback._x) + random(10)) - (j * 30)) - (k * 25);
}
} else {
xindi._xscale = 100;
if (i <= 5) {
xindi._x = (((850 + xback._x) + random(10)) - (j * 30)) - (k * 25);
} else if (jenisFormasi2 == 1) {
xindi._x = (((840 + xback._x) + random(10)) - (j * 30)) - (k * 25);
} else {
xindi._x = (((880 + xback._x) + random(10)) - (j * 30)) - (k * 25);
}
}
}
if (i <= 2) {
if (yindiy == 10) {
xindi._y = (0 + (i * 40)) - 15;
} else {
xindi._y = (0 + (i * 40)) - 15;
}
} else {
xindi._y = (0 + (i * 40)) - 15;
}
adaMunculTentara2 = true;
xindi.indi = banyakTentara;
xindi.jenis = 2;
xindi.ztarget = false;
xindi.ztarget2 = false;
xindi.xtarget = false;
xindi.posisiX = undefined;
xindi.posisiY = undefined;
xindi.diSemak = false;
xindi.tipe = "pasukan";
xindi.jenisUnitnya = yindiy;
if (yindiy <= 4) {
xindi.perisai = "orang";
} else {
xindi.perisai = "besi";
}
if (yindiy == 1) {
xindi.tipeSerangan = "normal";
} else if (yindiy == 2) {
xindi.tipeSerangan = "mortir";
} else if (yindiy == 3) {
xindi.tipeSerangan = "bazoka";
} else if (yindiy == 4) {
xindi.tipeSerangan = "zombie";
} else if (yindiy == 5) {
xindi.tipeSerangan = "canontank";
} else if (yindiy == 6) {
xindi.tipeSerangan = "normal";
} else if (yindiy == 7) {
xindi.tipeSerangan = "mortir";
} else if (yindiy == 8) {
xindi.tipeSerangan = "toxin";
} else if (yindiy == 9) {
xindi.tipeSerangan = "normal";
_root.backPesawat();
} else if (yindiy == 10) {
xindi.tipeSerangan = "bazoka";
_root.backPesawat();
} else if ((yindiy == 11) || (yindiy == 12)) {
xindi.tipeSerangan = "airbomb";
_root.backPesawat();
} else if (yindiy == 13) {
xindi.tipeSerangan = "normal";
} else if (yindiy == 14) {
xindi.tipeSerangan = "normal";
} else if (yindiy == 15) {
xindi.tipeSerangan = "mortir";
} else if (yindiy == 16) {
xindi.stealth = true;
xindi.sedangHilang = true;
xindi.tipeSerangan = "zhot";
xindi._alpha = 25;
}
if (tipePerang == "sea2") {
xindi.posMuncul = "bawah";
} else if (tipePerang == "air") {
xindi.posMuncul = "atas";
} else if (tipeBase == "bawah") {
if (i <= 3) {
xindi.posMuncul = "atas";
} else {
xindi.posMuncul = "bawah";
}
} else if (i <= 5) {
xindi.posMuncul = "atas";
} else {
xindi.posMuncul = "bawah";
}
if (xindi.posMuncul == "atas") {
if (yindiy == 9) {
xindi.live = 7500 + random(750);
} else if (yindiy == 10) {
xindi.live = 10000 + random(1000);
} else if ((yindiy == 11) || (yindiy == 12)) {
xindi.live = 12500 + random(1250);
}
xindi.armor = 10 + random(2);
if (yindiy == 9) {
xindi.damage = 1200 + random(120);
} else {
xindi.damage = 300 + random(30);
}
xindi.lahan = "udara";
if (jj == 0) {
if ((yindiy == 9) || (yindiy == 10)) {
xindi.speed = -3;
} else if (yindiy == 12) {
xindi.speed = -2;
} else {
xindi.speed = -2;
}
} else if ((yindiy == 9) || (yindiy == 10)) {
xindi.speed = 3;
} else if (yindiy == 12) {
xindi.speed = 2;
} else {
xindi.speed = 2;
}
if (jj == 0) {
if (tipePerang == "air") {
xindi.batasManufer = xindi._y;
xindi.keArah = 0;
if (i == 2) {
xindi.batasManufer = xindi._y + 40;
xindi.keArah = 1;
} else if (i == 3) {
xindi.batasManufer = xindi._y - 40;
xindi.keArah = -1;
} else if (i == 4) {
xindi.batasManufer = xindi._y + 40;
xindi.keArah = 1;
} else if (i == 5) {
xindi.batasManufer = xindi._y - 40;
xindi.keArah = -1;
}
if (i == 6) {
xindi.batasManufer = xindi._y + 40;
xindi.keArah = 1;
} else if (i == 7) {
xindi.batasManufer = xindi._y - 40;
xindi.keArah = -1;
} else if (i == 8) {
xindi.batasManufer = xindi._y + 40;
xindi.keArah = 1;
} else if (i == 9) {
xindi.batasManufer = xindi._y - 40;
xindi.keArah = -1;
}
} else if (i == 2) {
xindi.batasManufer = xindi._y + 40;
xindi.keArah = 1;
} else if (i == 3) {
xindi.batasManufer = xindi._y - 40;
xindi.keArah = -1;
} else if (i == 4) {
xindi.batasManufer = xindi._y + 40;
xindi.keArah = 1;
} else if (i == 5) {
xindi.batasManufer = xindi._y - 40;
xindi.keArah = -1;
} else {
xindi.batasManufer = xindi._y;
xindi.keArah = 0;
}
} else if (tipePerang == "air") {
xindi.batasManufer = xindi._y;
xindi.keArah = 0;
if (i == 2) {
xindi.batasManufer = xindi._y + 40;
xindi.keArah = 1;
} else if (i == 3) {
xindi.batasManufer = xindi._y - 40;
xindi.keArah = -1;
} else if (i == 4) {
xindi.batasManufer = xindi._y + 40;
xindi.keArah = 1;
} else if (i == 5) {
xindi.batasManufer = xindi._y - 40;
xindi.keArah = -1;
}
if (i == 6) {
xindi.batasManufer = xindi._y + 40;
xindi.keArah = 1;
} else if (i == 7) {
xindi.batasManufer = xindi._y - 40;
xindi.keArah = -1;
} else if (i == 8) {
xindi.batasManufer = xindi._y + 40;
xindi.keArah = 1;
} else if (i == 9) {
xindi.batasManufer = xindi._y - 40;
xindi.keArah = -1;
}
} else if (i == 2) {
xindi.batasManufer = xindi._y + 40;
xindi.keArah = 1;
} else if (i == 3) {
xindi.batasManufer = xindi._y - 40;
xindi.keArah = -1;
} else if (i == 4) {
xindi.batasManufer = xindi._y + 40;
xindi.keArah = 1;
} else if (i == 5) {
xindi.batasManufer = xindi._y - 40;
xindi.keArah = -1;
} else {
xindi.batasManufer = xindi._y;
xindi.keArah = 0;
}
} else {
if (xindi.tipeSerangan == "normal") {
if (yindiy == 6) {
xindi.live = 25000 + random(2500);
} else if ((yindiy == 13) || (yindiy == 14)) {
xindi.live = 5000 + random(500);
} else {
xindi.live = 500 + random(50);
}
} else if (xindi.tipeSerangan == "mortir") {
if (yindiy == 7) {
xindi.live = 15000 + random(1500);
} else if (yindiy == 15) {
xindi.live = 10000 + random(1000);
} else {
xindi.live = 250 + random(25);
}
} else if (xindi.tipeSerangan == "bazoka") {
xindi.live = 400 + random(40);
} else if (xindi.tipeSerangan == "zombie") {
xindi.live = 2000 + random(200);
} else if (xindi.tipeSerangan == "canontank") {
xindi.live = 20000 + random(2000);
} else if (xindi.tipeSerangan == "toxin") {
xindi.live = 25000 + random(2500);
} else if (xindi.tipeSerangan == "zhot") {
xindi.live = 25000 + random(2500);
}
xindi.armor = 10 + random(2);
if (yindiy == 6) {
xindi.damage = 300 + random(30);
} else if ((yindiy == 13) || (yindiy == 14)) {
xindi.damage = 400 + random(40);
} else {
xindi.damage = 40 + random(4);
}
xindi.lahan = "darat";
xindi.targetKena = 1;
if (jj == 0) {
if (xindi.tipeSerangan == "normal") {
if (yindiy == 6) {
xindi.speed = -0.3;
} else {
xindi.speed = -1.25;
}
} else if (xindi.tipeSerangan == "mortir") {
xindi.speed = -0.5;
} else if (xindi.tipeSerangan == "bazoka") {
xindi.speed = -0.4;
} else if (xindi.tipeSerangan == "zombie") {
xindi.speed = -0.6;
xindi.targetKena = random(3) + 2;
} else if (xindi.tipeSerangan == "canontank") {
xindi.speed = -0.3;
} else if (xindi.tipeSerangan == "toxin") {
xindi.speed = -0.2;
} else if (xindi.tipeSerangan == "zhot") {
xindi.speed = -0.3;
}
} else if (xindi.tipeSerangan == "normal") {
if (yindiy == 6) {
xindi.speed = 0.3;
} else {
xindi.speed = 1.25;
}
} else if (xindi.tipeSerangan == "mortir") {
xindi.speed = 0.5;
} else if (xindi.tipeSerangan == "bazoka") {
xindi.speed = 0.4;
} else if (xindi.tipeSerangan == "zombie") {
xindi.speed = 0.6;
xindi.targetKena = random(3) + 2;
} else if (xindi.tipeSerangan == "canontank") {
xindi.speed = 0.3;
} else if (xindi.tipeSerangan == "toxin") {
xindi.speed = 0.2;
} else if (xindi.tipeSerangan == "zhot") {
xindi.speed = 0.3;
}
}
xindi.speed = xindi.speed * 1.25;
xindi.nyawaToxin = 3;
perubahanDasar(2, yindiy);
xindi.live = xindi.live * perubahanLive;
xindi.damage = xindi.damage * perubahanDamage;
xindi.speed = xindi.speed * perubahanSpeed;
xindi.armor = xindi.armor * perubahanArmor;
xindi.maxLive = xindi.live;
xindi.totalLive = xindi.live;
xindi.moveManuver = 1.5;
xindi.zdelay = 100;
xindi.jenisTipe = yindiy;
if (xindi.tipeSerangan == "zombie") {
xindi.range = 0;
} else if (xindi.tipeSerangan == "mortir") {
if (jj == 0) {
xindi.range = 4;
} else {
xindi.range = 4;
}
} else if (xindi.tipeSerangan == "bazoka") {
if (yindiy == 10) {
xindi.range = 8;
} else {
xindi.range = 5 + random(2);
}
} else if (xindi.tipeSerangan == "toxin") {
xindi.range = 4 + random(2);
} else if (xindi.tipeSerangan == "airbomb") {
xindi.range = 4;
} else if (xindi.tipeSerangan == "canontank") {
xindi.range = 4;
} else if (xindi.tipeSerangan == "zhot") {
xindi.range = 8;
} else {
xindi.range = 3;
}
xindi.mati = false;
xindi.batasRemove = -50;
xindi.onEnterFrame = enterTentara;
xindi.onRollOver = overTentara;
xindi.onRollOut = outTentara;
xindi.nyawa_mc._visible = false;
banyakTentara++;
zbanyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
if (zbanyakTentara >= totalUnit) {
zbanyakTentara = tentaraAwal;
}
}
function buatSemua3(xindi) {
jumlahUnit3++;
pindahAntrian(3);
xindi._xscale = -100;
xindi._x = ((1710 + xback._x) + random(10)) - (j * 40);
if (i <= 2) {
if (yindiy == 10) {
xindi._y = (0 + (i * 40)) - 15;
} else {
xindi._y = (0 + (i * 40)) - 15;
}
} else {
xindi._y = (0 + (i * 40)) - 15;
}
adaMunculTentara3 = true;
xindi.indi = banyakTentara;
xindi.jenis = 3;
xindi.ztarget = false;
xindi.ztarget2 = false;
xindi.xtarget = false;
xindi.barisKe = i;
xindi.posisiX = undefined;
xindi.posisiY = undefined;
xindi.diSemak = false;
xindi.targetKena = 1;
xindi.tipe = "pasukan";
xindi.jenisUnitnya = yindiy;
if (yindiy <= 4) {
xindi.perisai = "orang";
} else {
xindi.perisai = "besi";
}
if (yindiy == 1) {
xindi.tipeSerangan = "normal";
} else if (yindiy == 2) {
xindi.tipeSerangan = "mortir";
} else if (yindiy == 3) {
xindi.tipeSerangan = "bazoka";
} else if (yindiy == 4) {
xindi.tipeSerangan = "bomberman";
} else if (yindiy == 5) {
xindi.tipeSerangan = "canontank";
} else if (yindiy == 6) {
xindi.tipeSerangan = "normal";
} else if (yindiy == 7) {
xindi.tipeSerangan = "mortir";
} else if (yindiy == 8) {
xindi.tipeSerangan = "tator";
} else if (yindiy == 9) {
xindi.tipeSerangan = "normal";
_root.backPesawat();
} else if (yindiy == 10) {
xindi.tipeSerangan = "bazoka";
_root.backPesawat();
} else if (yindiy == 11) {
xindi.tipeSerangan = "airbomb";
_root.backPesawat();
} else if (yindiy == 12) {
xindi.tipeSerangan = "kamikaze";
cekTarget(xindi);
xindi.zztargetSerang = ztargetSerang;
_root.backPesawat();
} else if (yindiy == 13) {
xindi.tipeSerangan = "normal";
} else if (yindiy == 14) {
xindi.tipeSerangan = "normal";
} else if (yindiy == 15) {
xindi.tipeSerangan = "mortir";
} else if (yindiy == 16) {
xindi.tipeSerangan = "zmash";
}
if (tipePerang == "sea2") {
xindi.posMuncul = "bawah";
} else if (tipePerang == "air") {
xindi.posMuncul = "atas";
} else if (tipeBase == "bawah") {
if (i <= 3) {
xindi.posMuncul = "atas";
} else {
xindi.posMuncul = "bawah";
}
} else if (i <= 5) {
xindi.posMuncul = "atas";
} else {
xindi.posMuncul = "bawah";
}
if (xindi.posMuncul == "atas") {
if (yindiy == 9) {
xindi.live = 7500 + random(750);
} else if (yindiy == 10) {
xindi.live = 10000 + random(1000);
} else if ((yindiy == 11) || (yindiy == 12)) {
xindi.live = 12500 + random(1250);
}
xindi.armor = 10 + random(2);
if (yindiy == 9) {
xindi.damage = 1200 + random(120);
} else {
xindi.damage = 300 + random(30);
}
xindi.lahan = "udara";
if ((yindiy == 9) || (yindiy == 10)) {
xindi.speed = -3;
} else if (yindiy == 12) {
xindi.speed = 4;
} else {
xindi.speed = -2;
}
if (tipePerang == "air") {
xindi.batasManufer = xindi._y;
xindi.keArah = 0;
if (i == 2) {
xindi.batasManufer = xindi._y + 40;
xindi.keArah = 1;
} else if (i == 3) {
xindi.batasManufer = xindi._y - 40;
xindi.keArah = -1;
} else if (i == 4) {
xindi.batasManufer = xindi._y + 40;
xindi.keArah = 1;
} else if (i == 5) {
xindi.batasManufer = xindi._y - 40;
xindi.keArah = -1;
} else {
xindi.batasManufer = xindi._y;
xindi.keArah = 0;
}
if (i == 6) {
xindi.batasManufer = xindi._y + 40;
xindi.keArah = 1;
} else if (i == 7) {
xindi.batasManufer = xindi._y - 40;
xindi.keArah = -1;
} else if (i == 8) {
xindi.batasManufer = xindi._y + 40;
xindi.keArah = 1;
} else if (i == 9) {
xindi.batasManufer = xindi._y - 40;
xindi.keArah = -1;
}
} else if (i == 2) {
xindi.batasManufer = xindi._y + 40;
xindi.keArah = 1;
} else if (i == 3) {
xindi.batasManufer = xindi._y - 40;
xindi.keArah = -1;
} else if (i == 4) {
xindi.batasManufer = xindi._y + 40;
xindi.keArah = 1;
} else if (i == 5) {
xindi.batasManufer = xindi._y - 40;
xindi.keArah = -1;
} else {
xindi.batasManufer = xindi._y;
xindi.keArah = 0;
}
} else {
if (xindi.tipeSerangan == "normal") {
if (yindiy == 6) {
xindi.live = 25000 + random(2500);
} else if ((yindiy == 13) || (yindiy == 14)) {
xindi.live = 5000 + random(500);
} else {
xindi.live = 500 + random(50);
}
} else if (xindi.tipeSerangan == "mortir") {
if (yindiy == 7) {
xindi.live = 15000 + random(1500);
} else if (yindiy == 15) {
xindi.live = 10000 + random(1000);
} else {
xindi.live = 250 + random(25);
}
} else if (xindi.tipeSerangan == "bazoka") {
xindi.live = 400 + random(40);
} else if (xindi.tipeSerangan == "bomberman") {
xindi.live = 750 + random(75);
} else if (xindi.tipeSerangan == "canontank") {
xindi.live = 20000 + random(2000);
} else if (xindi.tipeSerangan == "tator") {
xindi.live = 50000 + random(5000);
} else if (xindi.tipeSerangan == "zmash") {
xindi.live = 75000 + random(7500);
}
xindi.armor = 10 + random(2);
if (yindiy == 6) {
xindi.damage = 300 + random(30);
} else if ((yindiy == 13) || (yindiy == 14)) {
xindi.damage = 400 + random(40);
} else {
xindi.damage = 40 + random(4);
}
xindi.lahan = "darat";
if (xindi.tipeSerangan == "normal") {
if (yindiy == 6) {
xindi.speed = -0.3;
} else {
xindi.speed = -1.25;
}
} else if (xindi.tipeSerangan == "mortir") {
xindi.speed = -0.5;
} else if (xindi.tipeSerangan == "bazoka") {
xindi.speed = -0.4;
} else if (xindi.tipeSerangan == "bomberman") {
xindi.speed = -0.6;
xindi.targetKena = random(3) + 2;
} else if (xindi.tipeSerangan == "canontank") {
xindi.speed = -0.3;
} else if (xindi.tipeSerangan == "tator") {
xindi.speed = -0.2;
} else if (xindi.tipeSerangan == "zmash") {
xindi.speed = -0.2;
}
}
xindi.speed = xindi.speed * 1.25;
xindi.nyawaToxin = 3;
xindi.targetKena = random(3) + 2;
perubahanDasar(3, yindiy);
xindi.live = xindi.live * perubahanLive;
xindi.damage = xindi.damage * perubahanDamage;
xindi.speed = xindi.speed * perubahanSpeed;
xindi.armor = xindi.armor * perubahanArmor;
xindi.maxLive = xindi.live;
xindi.totalLive = xindi.live;
xindi.moveManuver = 1.5;
xindi.zdelay = 100;
xindi.jenisTipe = yindiy;
if (xindi.tipeSerangan == "bomberman") {
if (xindi.speed < 0) {
xindi.range = 1;
} else {
xindi.range = 2;
}
} else if (xindi.tipeSerangan == "mortir") {
xindi.range = 4;
} else if (xindi.tipeSerangan == "bazoka") {
if (yindiy == 10) {
xindi.range = 8;
} else {
xindi.range = 5 + random(2);
}
} else if (xindi.tipeSerangan == "airbomb") {
xindi.range = 4;
} else if (xindi.tipeSerangan == "canontank") {
xindi.range = 4;
} else if (xindi.tipeSerangan == "tator") {
xindi.range = 6;
} else if (xindi.tipeSerangan == "zmash") {
xindi.range = 8;
} else {
xindi.range = 3;
}
xindi.mati = false;
xindi.batasRemove = -50;
xindi.onEnterFrame = enterTentara;
xindi.onRollOver = overTentara;
xindi.onRollOut = outTentara;
xindi.nyawa_mc._visible = false;
banyakTentara++;
zbanyakTentara++;
if (banyakTentara >= totalUnit) {
banyakTentara = tentaraAwal;
}
if (zbanyakTentara >= totalUnit) {
zbanyakTentara = tentaraAwal;
}
}
function cekTarget(qindi) {
keRand = 0;
masukRand = new Array();
qzzi = 3000;
while (qzzi <= totalUnit2) {
if (_root["tentara" + qzzi].jenis != 3) {
if (_root["tentara" + qzzi] != undefined) {
if (_root["tentara" + qzzi].mati == false) {
if (_root["tentara" + qzzi].live >= 200000) {
masukRand[keRand] = qzzi;
keRand++;
}
}
}
}
qzzi++;
}
if (keRand == 0) {
qzzi = 3000;
while (qzzi <= totalUnit2) {
if (_root["tentara" + qzzi].jenis != 3) {
if (_root["tentara" + qzzi] != undefined) {
if (_root["tentara" + qzzi].mati == false) {
if (_root["tentara" + qzzi].live >= 100000) {
masukRand[keRand] = qzzi;
keRand++;
}
}
}
}
qzzi++;
}
}
if (keRand == 0) {
qzzi = 3000;
while (qzzi <= totalUnit2) {
if (_root["tentara" + qzzi].jenis != 3) {
if (_root["tentara" + qzzi] != undefined) {
if (_root["tentara" + qzzi].mati == false) {
if (_root["tentara" + qzzi].live >= 50000) {
masukRand[keRand] = qzzi;
keRand++;
}
}
}
}
qzzi++;
}
}
if (keRand == 0) {
qzzi = 3000;
while (qzzi <= totalUnit2) {
if (_root["tentara" + qzzi].jenis != 3) {
if (_root["tentara" + qzzi] != undefined) {
if (_root["tentara" + qzzi].mati == false) {
if (_root["tentara" + qzzi].live >= 10000) {
masukRand[keRand] = qzzi;
keRand++;
}
}
}
}
qzzi++;
}
}
if (keRand == 0) {
qzzi = 3000;
while (qzzi <= totalUnit2) {
if (_root["tentara" + qzzi].jenis != 3) {
if (_root["tentara" + qzzi] != undefined) {
if (_root["tentara" + qzzi].mati == false) {
masukRand[keRand] = qzzi;
keRand++;
}
}
}
qzzi++;
}
}
wrandom = random(keRand);
ztargetSerang = masukRand[wrandom];
}
function overTentara() {
if ((this.tipe == "base") || (this.rupa == "turet")) {
if (buildingYes == false) {
this.nyawa_mc._visible = true;
} else {
this.nyawa_mc._visible = true;
}
} else if (unitYes == false) {
this.nyawa_mc._visible = true;
} else {
this.nyawa_mc._visible = true;
}
}
function outTentara() {
if (this.tipe == "base") {
if (buildingYes == false) {
this.nyawa_mc._visible = false;
} else {
this.nyawa_mc._visible = true;
}
} else if (unitYes == false) {
this.nyawa_mc._visible = false;
} else {
this.nyawa_mc._visible = true;
}
}
function enterTentara() {
if (sedangPause == false) {
if ((this.tipe == "base") || (this.rupa == "turet")) {
if (buildingYes == true) {
this.nyawa_mc._visible = true;
}
} else if (unitYes == true) {
this.nyawa_mc._visible = true;
}
this.nyawa_mc.bar._xscale = Math.ceil((this.live / this.totalLive) * 100);
if (this.nyawa_mc.bar._xscale <= 0) {
this.nyawa_mc.bar._xscale = 0;
}
if (this.stealth == true) {
if (this._currentframe == 2) {
this.sedangHilang = false;
} else if (this._currentframe == 1) {
this.sedangHilang = true;
} else {
this.sedangHilang = false;
}
} else {
this.sedangHilang = false;
}
if (this.sedangHilang == true) {
this._alpha = 25;
} else {
this._alpha = 100;
}
if (sudahSelesai == true) {
if (this.keArah == undefined) {
this.speed = 0;
this.xindi.stop();
}
}
if (this.ztarget != undefined) {
if ((this.ztarget.mati == true) || (this.ztarget == undefined)) {
this.xtarget = false;
}
} else if (this.lahan == "darat") {
this.xtarget = false;
}
if (this.ztarget.jenis == this.jenis) {
this.xtarget = false;
}
if (this.ztarget2 != undefined) {
if ((this.ztarget2.mati == true) || (this.ztarget2 == undefined)) {
this.xtarget = false;
}
} else if (this.lahan == "darat") {
this.xtarget = false;
}
if (this.ztarget2.jenis == this.jenis) {
this.xtarget = false;
}
if (this.ztarget.sedangHilang == true) {
this.xtarget = false;
}
if (this.ztarget2.sedangHilang == true) {
this.xtarget = false;
}
if (this.tipeSerangan == "kamikaze") {
if (_root["tentara" + this.zztargetSerang]._x == undefined) {
cekTarget(this);
this.zztargetSerang = ztargetSerang;
}
this.aimX = _root["tentara" + this.zztargetSerang]._x;
this.aimY = _root["tentara" + this.zztargetSerang]._y;
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 + 0.1;
this._y = this._y - (this.speed * Math.cos(angle * (Math.PI/180)));
this._x = this._x + ((this.speed * Math.sin(angle * (Math.PI/180))) + pindahUnit);
} else {
ledak = attachMovie("ledak_mc7", "ledak_mc" + bykLedak, bykLedak);
ledak._x = this._x;
ledak._y = this._y - 20;
ledak._xscale = (ledak._yscale = 200);
ledak.jenisLedak = "kamikaze";
ledak.zdelay = false;
bykLedak++;
if (bykLedak >= 90005) {
bykLedak = 90000 /* 0x015F90 */;
}
this.ztarget.live = this.ztarget.live - 20000;
removeMovieClip(this);
}
} else {
if (this.live <= 0) {
if (this.rupa == "turet") {
_root[("kotak" + this.posisiI) + this.posisiJ].isiTower = false;
}
if (this.milik != pilihKerajaan) {
if (this.jenisTipe != undefined) {
score = score + (this.jenisTipe * 10);
scoreAwalSekali = scoreAwalSekali + (this.jenisTipe * 10);
_root["scoreReach" + pilihKerajaan] = _root["scoreReach" + pilihKerajaan] + (this.jenisTipe * 10);
_root.scoreReach = _root.scoreReach + (this.jenisTipe * 10);
}
}
if (this.tipe == "base") {
if (this.posisiXY == "atas") {
_root["baseAtas" + this.milik]--;
if ((_root["baseAtas" + this.milik] <= 0) && (this.milik == pilihKerajaan)) {
prioritasSerang = "darat";
}
}
if (this.posisiXY == "bawah") {
_root["baseBawah" + this.milik]--;
if ((_root["baseBawah" + this.milik] <= 0) && (this.milik == pilihKerajaan)) {
prioritasSerang = "udara";
}
}
if (this.milik == pilihKerajaan) {
_root["xxbase" + this.posisiUrut] = 0;
}
if (this.perisai == "besi") {
ledak = attachMovie("ledak_mc8", "ledak_mc" + bykLedak, bykLedak);
ledak._x = this._x + 5;
ledak._y = this._y - 20;
ledak._xscale = (ledak._yscale = 20);
ledak.jenisLedak = "bomb";
ledak.zdelay = false;
bykLedak++;
if (bykLedak >= 90005) {
bykLedak = 90000 /* 0x015F90 */;
}
}
_root["banyakBase" + this.milik]++;
if (_root["banyakBase" + this.milik] >= _root["maxBase" + this.milik]) {
if (this.milik == pilihKerajaan) {
prioritasSerang = "";
}
_root["sudahKalah" + this.milik] = true;
cekBerakhir();
}
} else {
if (this.jenis != pilihKerajaan) {
if (this.tipe == "turet") {
_root["turretKilled" + pilihKerajaan]++;
if (_root["turretKilled" + pilihKerajaan] >= 200) {
_root.dapatMedal7 = true;
}
} else {
if (this.jenisUnitnya <= 8) {
_root["landKilled" + pilihKerajaan]++;
_root.landKilled++;
} else if (this.jenisUnitnya <= 12) {
_root["airKilled" + pilihKerajaan]++;
_root.airKilled++;
} else if (this.jenisUnitnya <= 16) {
_root["seaKilled" + pilihKerajaan]++;
_root.seaKilled++;
}
if (this.jenisUnitnya <= 4) {
_root["infantryKilled" + pilihKerajaan]++;
} else if (this.jenisUnitnya <= 8) {
_root["artilleryKilled" + pilihKerajaan]++;
}
if (_root["infantryKilled" + pilihKerajaan] >= 1000) {
_root.dapatMedal1 = true;
}
if (_root["airKilled" + pilihKerajaan] >= 500) {
_root.dapatMedal2 = true;
}
if (_root["artilleryKilled" + pilihKerajaan] >= 500) {
_root.dapatMedal3 = true;
}
if (_root["seaKilled" + pilihKerajaan] >= 500) {
_root.dapatMedal4 = true;
}
}
}
_root["jumlahUnit" + this.jenis]--;
if (this.perisai == "besi") {
ledak = attachMovie("ledak_mc8", "ledak_mc" + bykLedak, bykLedak);
ledak._x = this._x - 5;
ledak._y = this._y - 20;
ledak._xscale = (ledak._yscale = 30);
ledak.jenisLedak = "bomb";
ledak.zdelay = false;
bykLedak++;
if (bykLedak >= 90005) {
bykLedak = 90000 /* 0x015F90 */;
}
}
}
this.nyawa_mc.bar._xscale = 0;
k = this.posisiX;
l = this.posisiY;
_root[("kotak" + k) + l].kotakIsi = 0;
this.mati = true;
this.xtarget = false;
this.gotoAndStop(3);
this.yspeed = 0.5;
this.qspeed = this.speed;
this.meledak = random(4);
this.letakJatuh = 200 + random(125);
delete this.onEnterFrame;
this.onEnterFrame = enterTentara2;
this.onRollOver = overTentara;
this.onRollOut = outTentara;
this.nyawa_mc._visible = false;
} else if (this.xtarget == false) {
if (this.tipeSerangan == "sonic") {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
if ((this.tipe == "turet") || (this.tipe == "base")) {
this._x = this._x + pindahUnit;
} else {
this._x = this._x + (this.speed + pindahUnit);
}
} else {
this.bisaTerus = false;
if (((this.ztarget != undefined) && (this.ztarget.live <= 0)) && (this.ztarget != false)) {
if (this.milik != pilihKerajaan) {
if (this.ztarget.jenisTipe != undefined) {
score = score + (this.ztarget.jenisTipe * 10);
scoreAwalSekali = scoreAwalSekali + (this.ztarget.jenisTipe * 10);
_root["scoreReach" + pilihKerajaan] = _root["scoreReach" + pilihKerajaan] + (this.ztarget.jenisTipe * 10);
_root.scoreReach = _root.scoreReach + (this.ztarget.jenisTipe * 10);
}
}
this._x = this._x + pindahUnit;
this.bisaTerus = true;
if (this.ztarget.mati == false) {
if (this.ztarget.rupa == "turet") {
_root[("kotak" + this.ztarget.posisiI) + this.ztarget.posisiJ].isiTower = false;
}
if (this.ztarget.tipe == "base") {
if (this.ztarget.posisiXY == "atas") {
_root["baseAtas" + this.ztarget.milik]--;
if ((_root["baseAtas" + this.ztarget.milik] <= 0) && (this.ztarget.milik == pilihKerajaan)) {
prioritasSerang = "darat";
}
}
if (this.ztarget.posisiXY == "bawah") {
_root["baseBawah" + this.ztarget.milik]--;
if ((_root["baseBawah" + this.ztarget.milik] <= 0) && (this.ztarget.milik == pilihKerajaan)) {
prioritasSerang = "udara";
}
}
if (this.ztarget.milik == pilihKerajaan) {
_root["xxbase" + this.ztarget.posisiUrut] = 0;
}
if (this.ztarget.perisai == "besi") {
ledak = attachMovie("ledak_mc8", "ledak_mc" + bykLedak, bykLedak);
ledak._x = this.ztarget._x + 5;
ledak._y = this.ztarget._y - 20;
ledak._xscale = (ledak._yscale = 20);
ledak.jenisLedak = "megamisil";
ledak.zdelay = false;
bykLedak++;
if (bykLedak >= 90005) {
bykLedak = 90000 /* 0x015F90 */;
}
}
_root["banyakBase" + this.ztarget.milik]++;
if (_root["banyakBase" + this.ztarget.milik] >= _root["maxBase" + this.ztarget.milik]) {
if (this.milik == pilihKerajaan) {
prioritasSerang = "";
}
_root["sudahKalah" + this.ztarget.milik] = true;
cekBerakhir();
}
} else {
if (this.ztarget.jenis != pilihKerajaan) {
if (this.ztarget.tipe == "turet") {
_root["turretKilled" + pilihKerajaan]++;
if (_root["turretKilled" + pilihKerajaan] >= 200) {
_root.dapatMedal7 = true;
}
} else {
if (this.ztarget.jenisUnitnya <= 8) {
_root["landKilled" + pilihKerajaan]++;
_root.landKilled++;
} else if (this.ztarget.jenisUnitnya <= 12) {
_root["airKilled" + pilihKerajaan]++;
_root.airKilled++;
} else if (this.ztarget.jenisUnitnya <= 16) {
_root["seaKilled" + pilihKerajaan]++;
_root.seaKilled++;
}
if (this.ztarget.jenisUnitnya <= 4) {
_root["infantryKilled" + pilihKerajaan]++;
} else if (this.ztarget.jenisUnitnya <= 8) {
_root["artilleryKilled" + pilihKerajaan]++;
}
if (_root["infantryKilled" + pilihKerajaan] >= 1000) {
_root.dapatMedal1 = true;
}
if (_root["airKilled" + pilihKerajaan] >= 500) {
_root.dapatMedal2 = true;
}
if (_root["artilleryKilled" + pilihKerajaan] >= 500) {
_root.dapatMedal3 = true;
}
if (_root["seaKilled" + pilihKerajaan] >= 500) {
_root.dapatMedal4 = true;
}
}
}
_root["jumlahUnit" + this.ztarget.jenis]--;
if (this.ztarget.perisai == "besi") {
ledak = attachMovie("ledak_mc8", "ledak_mc" + bykLedak, bykLedak);
ledak._x = this.ztarget._x - 5;
ledak._y = this.ztarget._y - 20;
ledak._xscale = (ledak._yscale = 30);
ledak.jenisLedak = "megamisil";
ledak.zdelay = false;
bykLedak++;
if (bykLedak >= 90005) {
bykLedak = 90000 /* 0x015F90 */;
}
}
}
this.ztarget.nyawa_mc.bar._xscale = 0;
k = this.ztarget.posisiX;
l = this.ztarget.posisiY;
_root[("kotak" + k) + l].kotakIsi = 0;
this.ztarget.mati = true;
this.xtarget = false;
this.ztarget.gotoAndStop(3);
this.ztarget.yspeed = 0.5;
this.ztarget.qspeed = this.ztarget.speed;
this.ztarget.meledak = random(2);
this.ztarget.letakJatuh = 200 + random(125);
delete this.ztarget.onEnterFrame;
this.ztarget.onEnterFrame = enterTentara2;
this.ztarget.onRollOver = overTentara;
this.ztarget.onRollOut = outTentara;
this.ztarget.nyawa_mc._visible = false;
} else {
this.xtarget = false;
}
}
if (((this.ztarget2 != undefined) && (this.ztarget2.live <= 0)) && (this.ztarget2 != false)) {
if (this.milik != pilihKerajaan) {
if (this.ztarget2.jenisTipe != undefined) {
score = score + (this.ztarget2.jenisTipe * 10);
scoreAwalSekali = scoreAwalSekali + (this.ztarget2.jenisTipe * 10);
_root["scoreReach" + pilihKerajaan] = _root["scoreReach" + pilihKerajaan] + (this.ztarget2.jenisTipe * 10);
_root.scoreReach = _root.scoreReach + (this.ztarget2.jenisTipe * 10);
}
}
this._x = this._x + pindahUnit;
this.bisaTerus = true;
if (this.ztarget2.mati == false) {
if (this.ztarget2.rupa == "turet") {
_root[("kotak" + this.ztarget2.posisiI) + this.ztarget2.posisiJ].isiTower = false;
}
if (this.ztarget2.tipe == "base") {
if (this.ztarget2.posisiXY == "atas") {
_root["baseAtas" + this.ztarget2.milik]--;
if ((_root["baseAtas" + this.ztarget2.milik] <= 0) && (this.ztarget2.milik == pilihKerajaan)) {
prioritasSerang = "darat";
}
}
if (this.ztarget2.posisiXY == "bawah") {
_root["baseBawah" + this.ztarget2.milik]--;
if ((_root["baseBawah" + this.ztarget2.milik] <= 0) && (this.ztarget2.milik == pilihKerajaan)) {
prioritasSerang = "udara";
}
}
if (this.ztarget2.milik == pilihKerajaan) {
_root["xxbase" + this.ztarget2.posisiUrut] = 0;
}
if (this.ztarget2.perisai == "besi") {
ledak = attachMovie("ledak_mc8", "ledak_mc" + bykLedak, bykLedak);
ledak._x = this.ztarget2._x + 5;
ledak._y = this.ztarget2._y - 20;
ledak._xscale = (ledak._yscale = 20);
ledak.jenisLedak = "megamisil";
ledak.zdelay = false;
bykLedak++;
if (bykLedak >= 90005) {
bykLedak = 90000 /* 0x015F90 */;
}
}
_root["banyakBase" + this.ztarget2.milik]++;
if (_root["banyakBase" + this.ztarget2.milik] >= _root["maxBase" + this.ztarget2.milik]) {
if (this.milik == pilihKerajaan) {
prioritasSerang = "";
}
_root["sudahKalah" + this.ztarget2.milik] = true;
cekBerakhir();
}
} else {
if (this.ztarget2.jenis != pilihKerajaan) {
if (this.ztarget2.tipe == "turet") {
_root["turretKilled" + pilihKerajaan]++;
if (_root["turretKilled" + pilihKerajaan] >= 200) {
_root.dapatMedal7 = true;
}
} else {
if (this.ztarget2.jenisUnitnya <= 8) {
_root["landKilled" + pilihKerajaan]++;
_root.landKilled++;
} else if (this.ztarget2.jenisUnitnya <= 12) {
_root["airKilled" + pilihKerajaan]++;
_root.airKilled++;
} else if (this.ztarget2.jenisUnitnya <= 16) {
_root["seaKilled" + pilihKerajaan]++;
_root.seaKilled++;
}
if (this.ztarget2.jenisUnitnya <= 4) {
_root["infantryKilled" + pilihKerajaan]++;
} else if (this.ztarget2.jenisUnitnya <= 8) {
_root["artilleryKilled" + pilihKerajaan]++;
}
if (_root["infantryKilled" + pilihKerajaan] >= 1000) {
_root.dapatMedal1 = true;
}
if (_root["airKilled" + pilihKerajaan] >= 500) {
_root.dapatMedal2 = true;
}
if (_root["artilleryKilled" + pilihKerajaan] >= 500) {
_root.dapatMedal3 = true;
}
if (_root["seaKilled" + pilihKerajaan] >= 500) {
_root.dapatMedal4 = true;
}
}
}
_root["jumlahUnit" + this.ztarget2.jenis]--;
if (this.ztarget2.perisai == "besi") {
ledak = attachMovie("ledak_mc8", "ledak_mc" + bykLedak, bykLedak);
ledak._x = this.ztarget2._x - 5;
ledak._y = this.ztarget2._y - 20;
ledak._xscale = (ledak._yscale = 30);
ledak.jenisLedak = "megamisil";
ledak.zdelay = false;
bykLedak++;
if (bykLedak >= 90005) {
bykLedak = 90000 /* 0x015F90 */;
}
}
}
this.ztarget2.nyawa_mc.bar._xscale = 0;
k = this.ztarget2.posisiX;
l = this.ztarget2.posisiY;
_root[("kotak" + k) + l].kotakIsi = 0;
this.ztarget2.mati = true;
this.xtarget = false;
this.ztarget2.gotoAndStop(3);
this.ztarget2.yspeed = 0.5;
this.ztarget2.qspeed = this.ztarget2.speed;
this.ztarget2.meledak = random(2);
this.ztarget2.letakJatuh = 200 + random(125);
delete this.ztarget2.onEnterFrame;
this.ztarget2.onEnterFrame = enterTentara2;
this.ztarget2.onRollOver = overTentara;
this.ztarget2.onRollOut = outTentara;
this.ztarget.nyawa_mc._visible = false;
} else {
this.xtarget = false;
}
}
if ((this.live > 0) && (this.bisaTerus == false)) {
if (this.lahan == "darat") {
this._x = this._x + pindahUnit;
} else if (this.lahan == "udara") {
if ((this.tipe == "turet") || (this.tipe == "base")) {
this._x = this._x + pindahUnit;
} else {
this._x = this._x + (this.speed + pindahUnit);
}
}
this.moveManuver = 1.5;
this.gotoAndStop(2);
if (this.ztarget != undefined) {
if (this.tipe != "base") {
if (this.tipeSerangan == "normal") {
this.kenaBerapa = this.damage - this.ztarget.armor;
if (this.kenaBerapa <= 1) {
this.kenaBerapa = 1;
}
if ((this.tipe == "turet") || (this.tipe == "base")) {
if ((this.xindi._currentframe >= 20) && (this.xindi._currentframe <= 25)) {
if (this.ztarget.perisai == "besi") {
this.ztarget.live = this.ztarget.live - (this.kenaBerapa * 0.05);
} else {
this.ztarget.live = this.ztarget.live - this.kenaBerapa;
}
}
} else if (this.lahan == "darat") {
if ((this.xindi._currentframe >= 35) && (this.xindi._currentframe <= 39)) {
if (this.ztarget.perisai == "besi") {
this.ztarget.live = this.ztarget.live - (this.kenaBerapa * 0.05);
} else {
this.ztarget.live = this.ztarget.live - this.kenaBerapa;
}
}
} else if (this.lahan == "udara") {
if ((this.xindi._currentframe >= 5) && (this.xindi._currentframe <= 19)) {
if (this.ztarget.perisai == "besi") {
this.ztarget.live = this.ztarget.live - (this.kenaBerapa * 0.05);
} else {
this.ztarget.live = this.ztarget.live - this.kenaBerapa;
}
}
}
}
}
}
if (this.ztarget2 != undefined) {
if (this.tipe != "base") {
if (this.tipeSerangan == "normal") {
this.kenaBerapa = this.damage - this.ztarget2.armor;
if (this.kenaBerapa <= 1) {
this.kenaBerapa = 1;
}
if ((this.tipe == "turet") || (this.tipe == "base")) {
if ((this.xindi._currentframe >= 20) && (this.xindi._currentframe <= 25)) {
if (this.ztarget.perisai == "besi") {
this.ztarget.live = this.ztarget.live - (this.kenaBerapa * 0.05);
} else {
this.ztarget2.live = this.ztarget2.live - this.kenaBerapa;
}
}
} else if (this.lahan == "darat") {
if ((this.xindi._currentframe >= 35) && (this.xindi._currentframe <= 39)) {
if (this.ztarget.perisai == "besi") {
this.ztarget.live = this.ztarget.live - (this.kenaBerapa * 0.05);
} else {
this.ztarget2.live = this.ztarget2.live - this.kenaBerapa;
}
}
} else if (this.lahan == "udara") {
if ((this.xindi._currentframe >= 5) && (this.xindi._currentframe <= 9)) {
if (this.ztarget.perisai == "besi") {
this.ztarget.live = this.ztarget.live - (this.kenaBerapa * 0.05);
} else {
this.ztarget2.live = this.ztarget2.live - this.kenaBerapa;
}
}
}
}
}
}
}
}
this.zdelay--;
if ((this.keArah == 1) && (this.zdelay <= 0)) {
if (this._y < this.batasManufer) {
this._y = this._y + this.moveManuver;
} else {
this._y = this.batasManufer;
this.moveManuver = 1.5;
this.keArah = -1;
this.zdelay = 75;
this.batasManufer = this._y - 40;
}
}
if ((this.keArah == -1) && (this.zdelay <= 0)) {
if (this._y > this.batasManufer) {
this._y = this._y - this.moveManuver;
} else {
this._y = this.batasManufer;
this.moveManuver = 1.5;
this.keArah = 1;
this.zdelay = 75;
this.batasManufer = this._y + 40;
}
}
if (this.mati == false) {
if ((this.speed > 0) && (this._x >= (back_mc._x + 1650))) {
_root["jumlahUnit" + this.jenis]--;
cekTambahPower(this);
removeMovieClip(this);
} else if ((this.speed < 0) && (this._x <= (back_mc._x - 50))) {
_root["jumlahUnit" + this.jenis]--;
cekTambahPower(this);
removeMovieClip(this);
}
}
}
}
}
function cekTambahPower(indi) {
cekPowerKurang2(indi.jenisUnitnya);
if (indi.jenisUnitnya <= 3) {
powerBerkurangnya = 8;
} else if (indi.jenisUnitnya == 4) {
powerBerkurangnya = 2;
} else if (indi.jenisUnitnya <= 7) {
powerBerkurangnya = 4;
} else if (indi.jenisUnitnya == 8) {
powerBerkurangnya = 2;
} else if (indi.jenisUnitnya <= 11) {
powerBerkurangnya = 4;
} else if (indi.jenisUnitnya == 12) {
powerBerkurangnya = 2;
} else if (indi.jenisUnitnya <= 15) {
powerBerkurangnya = 4;
} else if (indi.jenisUnitnya == 16) {
powerBerkurangnya = 2;
}
_root["xpowerKini" + indi.jenis] = _root["xpowerKini" + indi.jenis] + ((zberkurangPower * (indi.live / indi.totalLive)) / powerBerkurangnya);
if (_root["xpowerKini" + indi.jenis] >= _root["xpowerMax" + indi.jenis]) {
_root["xpowerKini" + indi.jenis] = _root["xpowerMax" + indi.jenis];
}
}
function enterTentara2() {
if (sedangPause == false) {
this.gotoAndStop(3);
if (this.lahan == "darat") {
this._x = this._x + pindahUnit;
} else if (this.lahan == "udara") {
if (this.meledak == 1) {
if (tipePerang == "air") {
ledak = attachMovie("ledak_mc8", "ledak_mc" + bykLedak, bykLedak);
} else {
ledak = attachMovie("ledak_mc6", "ledak_mc" + bykLedak, bykLedak);
}
ledak._x = this._x - 20;
ledak._y = this._y - 20;
ledak._xscale = (ledak._yscale = 100);
ledak.zdelay = false;
bykLedak++;
if (bykLedak >= 90005) {
bykLedak = 90000 /* 0x015F90 */;
}
removeMovieClip(this);
} else {
if (this.speed > 0) {
this.qspeed = this.qspeed + 0.1;
} else if (this.speed < 0) {
this.qspeed = this.qspeed - 0.1;
}
this.yspeed = this.yspeed + 0.1;
this._x = this._x + (this.qspeed + pindahUnit);
this._y = this._y + this.yspeed;
if (this._y >= this.letakJatuh) {
if (tipePerang == "air") {
ledak = attachMovie("ledak_mc8", "ledak_mc" + bykLedak, bykLedak);
} else {
ledak = attachMovie("ledak_mc6", "ledak_mc" + bykLedak, bykLedak);
}
ledak._x = this._x - 20;
ledak._y = this._y - 20;
ledak._xscale = (ledak._yscale = 100);
ledak.zdelay = false;
bykLedak++;
if (bykLedak >= 90005) {
bykLedak = 90000 /* 0x015F90 */;
}
removeMovieClip(this);
}
}
}
if (this.mati == false) {
if ((this.speed > 0) && (this._x >= (back_mc._x + 1650))) {
this._x = (-50 + xback._x) - random(20);
} else if ((this.speed < 0) && (this._x <= (back_mc._x - 100))) {
this._x = (1650 + xback._x) + random(20);
}
}
}
}
function cekPasukanMati(indi) {
removeMovieClip(indi);
}
function cekMortir(indi) {
mortir = attachMovie("mortir_mc", "peluru" + banyakPeluru, banyakPeluru);
if (indi.speed > 0) {
mortir._x = indi._x + 15;
mortir._y = indi._y - 15;
mortir.speedX = 11 - random(4);
} else if (indi.speed < 0) {
mortir._x = indi._x - 15;
mortir._y = indi._y - 15;
mortir.speedX = -11 + random(4);
}
mortir.keluar = "orang";
mortir.speedY = -9;
mortir.batasBawah = indi._y - 10;
mortir.onEnterFrame = enterMortir;
banyakPeluru++;
if (banyakPeluru >= 70050) {
banyakPeluru = 70000 /* 0x011170 */;
}
}
function cekMortir2(indi) {
mortir = attachMovie("mortir_mc", "peluru" + banyakPeluru, banyakPeluru);
if (indi.speed > 0) {
mortir._x = indi._x + 15;
mortir._y = indi._y - 15;
mortir.speedX = 11 - random(4);
} else if (indi.speed < 0) {
mortir._x = indi._x - 15;
mortir._y = indi._y - 15;
mortir.speedX = -11 + random(4);
}
mortir.keluar = "orang";
mortir.speedY = -9;
mortir.batasBawah = indi._y - 10;
mortir.onEnterFrame = enterMortir3;
banyakPeluru++;
if (banyakPeluru >= 70050) {
banyakPeluru = 70000 /* 0x011170 */;
}
}
function cekBazoka(indi) {
bazoka = attachMovie("bazoka_mc", "peluru" + banyakPeluru, banyakPeluru);
if (indi.speed > 0) {
bazoka._x = indi._x + 15;
bazoka._y = indi._y - 18;
bazoka.speedX = 12 - random(4);
bazoka.batasKanan = (indi.ztarget._x + 15) - random(25);
} else if (indi.speed < 0) {
bazoka._x = indi._x - 15;
bazoka._y = indi._y - 18;
bazoka.speedX = -12 + random(4);
bazoka.batasKiri = (indi.ztarget._x + 15) - random(25);
}
bazoka.onEnterFrame = enterBazoka;
banyakPeluru++;
if (banyakPeluru >= 70050) {
banyakPeluru = 70000 /* 0x011170 */;
}
}
function cekBazokaNgejar(indi) {
bazoka = attachMovie("bazoka_mc", "peluru" + banyakPeluru, banyakPeluru);
if (indi.speed > 0) {
bazoka._x = indi._x + 15;
bazoka._y = indi._y - 18;
bazoka.speedX = 1;
bazoka.batasKanan = (indi.ztarget._x + 15) - random(25);
} else if (indi.speed < 0) {
bazoka._x = indi._x - 15;
bazoka._y = indi._y - 18;
bazoka.speedX = -1;
bazoka.batasKiri = (indi.ztarget._x + 15) - random(25);
}
bazoka._xscale = (bazoka._yscale = 150);
bazoka.speedPlus = 2;
bazoka.ztarget = indi.ztarget;
bazoka.onEnterFrame = enterBazokaNgejar;
banyakPeluru++;
if (banyakPeluru >= 70050) {
banyakPeluru = 70000 /* 0x011170 */;
}
}
function enterBazokaNgejar() {
this.aimX = this.ztarget._x;
this.aimY = this.ztarget._y;
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.speedX) {
this.speedX = this.speedX + this.speedPlus;
this._y = this._y - (this.speedX * Math.cos(angle * (Math.PI/180)));
this._x = this._x + ((this.speedX * Math.sin(angle * (Math.PI/180))) + pindahUnit);
} else {
ledak = attachMovie("ledak_mc7", "ledak_mc" + bykLedak, bykLedak);
ledak._x = this._x;
ledak._y = this._y - 20;
ledak._xscale = (ledak._yscale = 200);
ledak.jenisLedak = "megamisil";
ledak.zdelay = false;
bykLedak++;
if (bykLedak >= 90005) {
bykLedak = 90000 /* 0x015F90 */;
}
this.ztarget.live = this.ztarget.live - 10000;
removeMovieClip(this);
}
}
function munculLauncher(indi, indi2) {
mortir = attachMovie("mortir_mc", "peluru" + banyakPeluru, banyakPeluru);
if (indi.speed > 0) {
mortir._x = (indi._x + 15) + (5 * (indi2 - 1));
mortir._y = indi._y - 15;
mortir.speedX = 11 - random(4);
} else if (indi.speed < 0) {
mortir._x = indi._x - 15;
mortir._y = indi._y - 15;
mortir.speedX = -11 + random(4);
}
mortir.keluar = "tank";
mortir.speedY = -10 + (indi2 - 1);
mortir.batasBawah = indi._y - 10;
mortir.onEnterFrame = enterMortir;
banyakPeluru++;
if (banyakPeluru >= 70050) {
banyakPeluru = 70000 /* 0x011170 */;
}
}
function cekLaser(indi) {
sinar = attachMovie("sinar_mc", "peluru" + banyakPeluru, banyakPeluru);
if (indi.speed > 0) {
sinar._x = indi._x + 20;
sinar._y = indi._y - 12;
sinar._xscale = 100;
} else if (indi.speed < 0) {
sinar._x = indi._x - 20;
sinar._y = indi._y - 12;
sinar._xscale = -100;
}
sinar.kecuali = indi;
sinar.jenisLedak = "laser";
sinar.onEnterFrame = enterSinar;
banyakPeluru++;
if (banyakPeluru >= 70050) {
banyakPeluru = 70000 /* 0x011170 */;
}
}
function cekZombie(indi) {
if (indi.ztarget.tipe != "base") {
if (indi.ztarget.tipe == "turet") {
cekBerubah(indi.ztarget);
indi.ztarget = undefined;
indi.xtarget = false;
removeMovieClip(indi);
} else {
indi.ztarget.kenaZombie = 0;
cekBerubah(indi.ztarget);
indi.ztarget = undefined;
indi.xtarget = false;
}
} else {
indi.ztarget.live = 0;
indi.ztarget = undefined;
indi.xtarget = false;
}
}
function cekBomberman(indi) {
ledak = attachMovie("ledak_mc6", "ledak_mc" + bykLedak, bykLedak);
ledak._x = indi._x - 50;
ledak._y = indi._y - 10;
indi._x = indi._x - 50;
ledak._xscale = (ledak._yscale = 200);
ledak.jenisLedak = "bomberman";
ledak.zdelay = false;
bykLedak++;
if (bykLedak >= 90005) {
bykLedak = 90000 /* 0x015F90 */;
}
}
function cekBerubah(zzindi) {
zzindi.nyawaToxin = zzindi.nyawaToxin - 2;
if (zzindi.nyawaToxin <= 0) {
zzindi.jenis = 2;
zzindi.ztarget = false;
zzindi.ztarget2 = false;
zzindi.xtarget = false;
zzindi.posisiX = undefined;
zzindi.posisiY = undefined;
zzindi.diSemak = false;
zzindi.live = zzindi.maxLive * 2;
zzindi.totalLive = zzindi.live;
zzindi.speed = (-zzindi.speed) * 2;
if (zzindi.tipe != "turet") {
if (zzindi._xscale == 100) {
zzindi._xscale = -100;
} else if (zzindi._xscale == -100) {
zzindi._xscale = 100;
}
}
}
}
function cekCanon(indi) {
ledak = attachMovie("ledak_mc", "ledak_mc" + bykLedak, bykLedak);
if (indi.speed > 0) {
ledak._x = (indi.ztarget._x + 25) - random(50);
ledak._y = (indi._y + random(30)) - 15;
} else if (indi.speed < 0) {
ledak._x = (indi.ztarget._x + 25) - random(50);
ledak._y = (indi._y + random(30)) - 15;
}
ledak.jenisLedak = "canon";
ledak.zdelay = false;
bykLedak++;
if (bykLedak >= 90005) {
bykLedak = 90000 /* 0x015F90 */;
}
}
function enterSinar() {
if (sedangPause == false) {
this._x = this._x + pindahUnit;
i = 3000;
while (i <= totalUnit2) {
if (_root["tentara" + i] != undefined) {
if (this.hitTest(_root["tentara" + i])) {
if (this.jenisLedak == "laser") {
if (_root["tentara" + i] != this.kecuali) {
_root["tentara" + i].live = _root["tentara" + i].live - 50;
}
}
}
}
i++;
}
}
}
function cekLedakLaser(indi) {
ledak = attachMovie("ledak_mc2", "ledak_mc" + bykLedak, bykLedak);
ledak._x = indi._x + 300;
ledak._y = indi._y;
ledak.jenisLedak = "mortir";
ledak.zdelay = false;
bykLedak++;
if (bykLedak >= 90005) {
bykLedak = 90000 /* 0x015F90 */;
}
}
function cekSonic(indi) {
sonic = attachMovie("sonic", "peluru" + banyakPeluru, banyakPeluru);
sonic._alpha = 100;
if (indi.speed > 0) {
sonic._x = indi._x + 100;
sonic._y = indi._y;
sonic.speedX = 5;
sonic._xscale = 100;
} else if (indi.speed < 0) {
sonic._x = indi._x - 100;
sonic._y = indi._y;
sonic.speedX = -5;
sonic._xscale = -100;
}
sonic.waktuKini = 0;
sonic.kecuali = indi;
sonic.batasWaktu = 80 + random(8);
sonic.jenisLedak = "sonic";
sonic.onEnterFrame = enterSonic;
banyakPeluru++;
if (banyakPeluru >= 70050) {
banyakPeluru = 70000 /* 0x011170 */;
}
}
function munculToxin(indi, indi2) {
mortir = attachMovie("mortir_mc2", "peluru" + banyakPeluru, banyakPeluru);
if (indi.speed > 0) {
mortir._x = (indi._x + 15) + (5 * (indi2 - 1));
mortir._y = (indi._y - 10) + random(15);
mortir.speedX = 11 - random(4);
} else if (indi.speed < 0) {
mortir._x = indi._x - 15;
mortir._y = (indi._y - 10) + random(15);
mortir.speedX = -11 + random(4);
}
mortir.keluar = "tank";
mortir.kecuali = indi;
mortir.speedY = -10 + (indi2 - 1);
mortir.batasBawah = indi._y - 5;
mortir.onEnterFrame = enterMortir2;
banyakPeluru++;
if (banyakPeluru >= 70050) {
banyakPeluru = 70000 /* 0x011170 */;
}
}
function munculMegaMisil(indi) {
mortir = attachMovie("mortir_mc3", "peluru" + banyakPeluru, banyakPeluru);
if (indi.speed > 0) {
mortir._x = indi._x + 15;
mortir._y = indi._y - 25;
mortir.speedX = 13 - random(4);
} else if (indi.speed < 0) {
mortir._x = indi._x - 15;
mortir._y = indi._y - 25;
mortir.speedX = -13 + random(4);
}
mortir.keluar = "megamisil";
mortir.speedY = -9;
mortir.batasBawah = indi._y - 10;
mortir.onEnterFrame = enterMortir;
banyakPeluru++;
if (banyakPeluru >= 70050) {
banyakPeluru = 70000 /* 0x011170 */;
}
}
function cekPesawatBomb(indi) {
bomb = attachMovie("bomb_mc", "bomb" + banyakPeluru, banyakPeluru);
if (indi.speed > 0) {
bomb._x = indi._x - 2;
bomb._y = indi._y + 7;
bomb.speedX = 2;
bomb.speedY = 1;
bomb.batasBawah = (indi._y + 160) - random(40);
} else if (indi.speed < 0) {
bomb._x = indi._x + 2;
bomb._y = indi._y + 7;
bomb.speedX = -2;
bomb.speedY = 1;
bomb.batasBawah = (indi._y + 160) - random(40);
}
bomb.yangSerang = indi.jenis;
bomb.onEnterFrame = enterBomb;
banyakPeluru++;
if (banyakPeluru >= 70050) {
banyakPeluru = 70000 /* 0x011170 */;
}
}
function cekNapalm(indi) {
bomb = attachMovie("napalm_mc", "bomb" + banyakPeluru, banyakPeluru);
if (indi.speed > 0) {
bomb._x = indi._x + 20;
bomb._y = indi._y + 7;
bomb.speedX = 2;
bomb.speedY = 1;
bomb.batasBawah = (indi._y + 160) - random(40);
} else if (indi.speed < 0) {
bomb._x = indi._x - 20;
bomb._y = indi._y + 7;
bomb.speedX = -2;
bomb.speedY = 1;
bomb.batasBawah = (indi._y + 160) - random(40);
}
bomb.yangSerang = indi.jenis;
bomb.onEnterFrame = enterBomb2;
banyakPeluru++;
if (banyakPeluru >= 70050) {
banyakPeluru = 70000 /* 0x011170 */;
}
}
function enterBomb() {
if (sedangPause == false) {
this._x = this._x + (this.speedX + pindahUnit);
this._y = this._y + this.speedY;
this._rotation = this._rotation + 0.5;
this.speedY++;
if (this._y > this.batasBawah) {
ledak = attachMovie("ledak_mc", "ledak_mc" + bykLedak, bykLedak);
ledak._x = this._x;
ledak._y = this._y - 20;
ledak.yangSerang = this.yangSerang;
ledak._xscale = (ledak._yscale = 200);
ledak.jenisLedak = "bomb";
ledak.zdelay = false;
bykLedak++;
if (bykLedak >= 90005) {
bykLedak = 90000 /* 0x015F90 */;
}
removeMovieClip(this);
}
}
}
function enterBomb2() {
if (sedangPause == false) {
this._x = this._x + (this.speedX + pindahUnit);
this._y = this._y + this.speedY;
this._rotation = this._rotation + 0.5;
this.speedY++;
if (this._y > this.batasBawah) {
ledak = attachMovie("ledak_mc7", "ledak_mc" + bykLedak, bykLedak);
ledak._x = this._x;
ledak._y = this._y - 20;
ledak.yangSerang = this.yangSerang;
ledak._xscale = (ledak._yscale = 150);
ledak.jenisLedak = "bomb";
ledak.zdelay = false;
bykLedak++;
if (bykLedak >= 90005) {
bykLedak = 90000 /* 0x015F90 */;
}
removeMovieClip(this);
}
}
}
function enterSonic() {
if (sedangPause == false) {
this._x = this._x + pindahUnit;
if (this.waktuKini < this.batasWaktu) {
this.waktuKini = this.waktuKini + 1;
this._x = this._x + this.speedX;
i = 3000;
while (i <= totalUnit2) {
if (_root["tentara" + i] != undefined) {
if (this.hitTest(_root["tentara" + i])) {
if (this.jenisLedak == "sonic") {
if (_root["tentara" + i] != this.kecuali) {
_root["tentara" + i].live = _root["tentara" + i].live - 1000;
}
}
}
}
i++;
}
} else {
removeMovieClip(this);
}
}
}
function enterMortir() {
if (sedangPause == false) {
this._x = this._x + (this.speedX + pindahUnit);
this._y = this._y + this.speedY;
this.speedY++;
if (this._y > this.batasBawah) {
if (this._y >= this.letakJatuh) {
if (this.keluar == "megamisil") {
ledak = attachMovie("ledak_mc7", "ledak_mc" + bykLedak, bykLedak);
} else {
ledak = attachMovie("ledak_mc2", "ledak_mc" + bykLedak, bykLedak);
}
ledak._x = this._x;
ledak._y = this._y - 20;
ledak._xscale = (ledak._yscale = 125);
if (this.keluar == "orang") {
ledak.jenisLedak = "mortir";
} else if (this.keluar == "tank") {
ledak.jenisLedak = "mortir2";
} else if (this.keluar == "megamisil") {
ledak.jenisLedak = "megamisil";
}
ledak.zdelay = false;
bykLedak++;
if (bykLedak >= 90005) {
bykLedak = 90000 /* 0x015F90 */;
}
removeMovieClip(this);
}
}
}
}
function enterMortir2() {
if (sedangPause == false) {
this._x = this._x + (this.speedX + pindahUnit);
this._y = this._y + this.speedY;
this.speedY++;
if (this._y > this.batasBawah) {
if (this._y >= this.letakJatuh) {
i = 3000;
while (i <= totalUnit2) {
if (_root["tentara" + i] != undefined) {
if (this.hitTest(_root["tentara" + i])) {
if (_root["tentara" + i].jenis != 2) {
if (_root["tentara" + i].tipe != base) {
cekBerubah(_root["tentara" + i]);
} else {
_root["tentara" + i].live = 0;
}
}
}
}
i++;
}
ledak = attachMovie("ledak_mc5", "toxin_mc" + bykLedak, bykLedak);
ledak._x = this._x;
ledak._y = this._y - 20;
ledak._xscale = (ledak._yscale = 250);
ledak.zdelay = false;
bykLedak++;
if (bykLedak >= 90005) {
bykLedak = 90000 /* 0x015F90 */;
}
removeMovieClip(this);
}
}
}
}
function enterMortir3() {
if (sedangPause == false) {
this._x = this._x + (this.speedX + pindahUnit);
this._y = this._y + this.speedY;
this.speedY++;
if (this._y > this.batasBawah) {
if (this._y >= this.letakJatuh) {
if (this.keluar == "megamisil") {
ledak = attachMovie("ledak_mc7", "ledak_mc" + bykLedak, bykLedak);
} else {
ledak = attachMovie("ledak_mc2", "ledak_mc" + bykLedak, bykLedak);
}
ledak._x = this._x;
ledak._y = this._y - 20;
ledak._xscale = (ledak._yscale = 200);
ledak.jenisLedak = "mortir2";
ledak.zdelay = false;
bykLedak++;
if (bykLedak >= 90005) {
bykLedak = 90000 /* 0x015F90 */;
}
removeMovieClip(this);
}
}
}
}
function enterBazoka() {
if (sedangPause == false) {
this._x = this._x + (this.speedX + pindahUnit);
if (this.speedX > 0) {
this.speedX = this.speedX + 2;
if (this._x > this.batasKanan) {
ledak = attachMovie("ledak_mc3", "ledak_mc" + bykLedak, bykLedak);
ledak._x = this._x;
ledak._y = this._y - 20;
ledak._xscale = (ledak._yscale = 125);
ledak.jenisLedak = "mortir";
ledak.zdelay = false;
bykLedak++;
if (bykLedak >= 90005) {
bykLedak = 90000 /* 0x015F90 */;
}
removeMovieClip(this);
}
} else if (this.speedX < 0) {
this.speedX = this.speedX - 2;
if (this._x < this.batasKiri) {
ledak = attachMovie("ledak_mc3", "ledak_mc" + bykLedak, bykLedak);
ledak._x = this._x;
ledak._y = this._y - 20;
ledak._xscale = (ledak._yscale = 125);
ledak.jenisLedak = "mortir";
ledak.zdelay = false;
bykLedak++;
if (bykLedak >= 90005) {
bykLedak = 90000 /* 0x015F90 */;
}
removeMovieClip(this);
}
}
}
}
function cekKeluarMisile(indi, indi2) {
misil = attachMovie("misil_mc", "peluru" + banyakPeluru, banyakPeluru);
if (indi.speed > 0) {
if (indi2 != undefined) {
misil._x = indi._x + 25;
misil._y = indi._y + (5 * indi2);
} else {
misil._x = indi._x + 25;
misil._y = indi._y - 25;
}
misil._xscale = 100;
} else if (indi.speed < 0) {
if (indi2 != undefined) {
misil._x = indi._x - 25;
misil._y = indi._y + (5 * indi2);
} else {
misil._x = indi._x - 25;
misil._y = indi._y - 25;
}
misil._xscale = -100;
}
misil.ztarget = indi.ztarget;
if (indi.speed > 0) {
if (indi._x < indi.ztarget._x) {
misil.speedX = 12;
misil.speedPlus = 1;
misil.onEnterFrame = enterMisil;
} else {
misil.speedX = 12;
misil.jenis = indi.jenis;
misil.onEnterFrame = enterMisil2;
}
} else if (indi.speed < 0) {
if (indi._x > indi.ztarget._x) {
misil.speedX = 12;
misil.speedPlus = 1;
misil.onEnterFrame = enterMisil;
} else {
misil.speedX = -12;
misil.jenis = indi.jenis;
misil.onEnterFrame = enterMisil2;
}
}
banyakPeluru++;
if (banyakPeluru >= 70050) {
banyakPeluru = 70000 /* 0x011170 */;
}
}
function enterMisil() {
if (sedangPause == false) {
this.aimX = this.ztarget._x;
this.aimY = this.ztarget._y;
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.speedX) {
this.speedX = this.speedX + this.speedPlus;
this._y = this._y - (this.speedX * Math.cos(angle * (Math.PI/180)));
this._x = this._x + ((this.speedX * Math.sin(angle * (Math.PI/180))) + pindahUnit);
} else {
ledak = attachMovie("ledak_mc", "ledak_mc" + bykLedak, bykLedak);
ledak._x = this._x;
ledak._y = this._y - 20;
ledak._xscale = (ledak._yscale = 200);
ledak.jenisLedak = "mortir";
ledak.zdelay = false;
bykLedak++;
if (bykLedak >= 90005) {
bykLedak = 90000 /* 0x015F90 */;
}
this.ztarget.live = this.ztarget.live - 10000;
removeMovieClip(this);
}
}
}
function enterMisil2() {
if (sedangPause == false) {
this._x = this._x + (this.speedX + pindahUnit);
this._y--;
if (this.speedX > 0) {
this.speedX = this.speedX + 2;
i = 3000;
while (i <= totalUnit2) {
if (this.hitTest(_root["tentara" + i])) {
if (_root["tentara" + i].jenis != this.jenis) {
ledak = attachMovie("ledak_mc", "ledak_mc" + bykLedak, bykLedak);
ledak._x = this._x;
ledak._y = this._y - 20;
ledak._xscale = (ledak._yscale = 200);
ledak.jenisLedak = "mortir";
ledak.zdelay = false;
bykLedak++;
if (bykLedak >= 90005) {
bykLedak = 90000 /* 0x015F90 */;
}
_root["tentara" + i].live = _root["tentara" + i].live - 10000;
removeMovieClip(this);
}
}
i++;
}
} else if (this.speedX < 0) {
this.speedX = this.speedX - 2;
i = 3000;
while (i <= totalUnit2) {
if (this.hitTest(_root["tentara" + i])) {
if (_root["tentara" + i].jenis != this.jenis) {
ledak = attachMovie("ledak_mc", "ledak_mc" + bykLedak, bykLedak);
ledak._x = this._x;
ledak._y = this._y - 20;
ledak._xscale = (ledak._yscale = 200);
ledak.jenisLedak = "mortir";
ledak.zdelay = false;
bykLedak++;
if (bykLedak >= 90005) {
bykLedak = 90000 /* 0x015F90 */;
}
_root["tentara" + i].live = _root["tentara" + i].live - 10000;
removeMovieClip(this);
}
}
i++;
}
}
}
}
function cekMunculDestroyer(indi) {
i = 1;
while (i <= 3) {
rocket = attachMovie("rocket_mc", "peluru" + banyakPeluru, banyakPeluru);
if (indi.speed > 0) {
rocket._x = indi._x + (i * 10);
rocket._y = indi._y - 40;
} else if (indi.speed < 0) {
rocket._x = indi._x + (i * 10);
rocket._y = indi._y - 40;
}
rocket.speedY = 1;
rocket.keBerapa = i;
rocket.batasAtas = -200;
rocket.batasBawah = indi.ztarget._y - 20;
rocket.naikTerus = 1;
rocket.ztarget = indi.ztarget;
rocket.onEnterFrame = enterRocket;
banyakPeluru++;
if (banyakPeluru >= 70050) {
banyakPeluru = 70000 /* 0x011170 */;
}
i++;
}
}
function cekMunculDestroyer2(indi) {
i = 1;
while (i <= 1) {
rocket = attachMovie("rocket_mc", "peluru" + banyakPeluru, banyakPeluru);
if (indi.speed > 0) {
rocket._x = indi._x + (i * 10);
rocket._y = indi._y - 40;
} else if (indi.speed < 0) {
rocket._x = indi._x + (i * 10);
rocket._y = indi._y - 40;
}
rocket.speedY = 1;
rocket.keBerapa = i;
rocket.batasAtas = -200;
rocket.batasBawah = indi.ztarget._y - 20;
rocket.naikTerus = 1;
rocket.ztarget = indi.ztarget;
rocket.onEnterFrame = enterRocket;
banyakPeluru++;
if (banyakPeluru >= 70050) {
banyakPeluru = 70000 /* 0x011170 */;
}
i++;
}
}
function enterRocket() {
if (sedangPause == false) {
this._y = this._y - (this.speedY + pindahUnit);
this.speedY = this.speedY + this.naikTerus;
if (this._y < this.batasAtas) {
this.speedY = 2;
this.naikTerus = 1;
this._y = this.batasAtas;
this._x = this.ztarget._x + (this.keBerapa * 10);
this.speedY = -this.speedY;
this.naikTerus = -this.naikTerus;
}
if ((this._y >= this.batasBawah) && (this.speedY < 0)) {
ledak = attachMovie("ledak_mc6", "ledak_mc" + bykLedak, bykLedak);
ledak._x = this._x;
ledak._y = this._y - 20;
ledak._xscale = (ledak._yscale = 200);
ledak.jenisLedak = "megamisil";
ledak.zdelay = false;
bykLedak++;
if (bykLedak >= 90005) {
bykLedak = 90000 /* 0x015F90 */;
}
this.ztarget.live = this.ztarget.live - 10000;
removeMovieClip(this);
}
}
}
function cekMunculZhot(indi, indi2) {
zhot = attachMovie("zhot_mc", "peluru" + banyakPeluru, banyakPeluru);
if (indi.speed > 0) {
zhot._x = (indi._x + 15) + (indi2 * 2);
zhot._y = (indi._y - 15) - (indi2 * 10);
zhot.speedX = 15 - random(5);
zhot._xscale = 100;
} else if (indi.speed < 0) {
zhot._x = (indi._x - 15) - (indi2 * 2);
zhot._y = (indi._y - 15) - (indi2 * 10);
zhot.speedX = -15 + random(5);
zhot._xscale = -100;
}
zhot.keluar = "megamisil";
zhot.speedY = -12;
zhot.batasBawah = indi._y - 10;
zhot.onEnterFrame = enterZhot;
banyakPeluru++;
if (banyakPeluru >= 70050) {
banyakPeluru = 70000 /* 0x011170 */;
}
}
function enterZhot() {
if (sedangPause == false) {
this._x = this._x + (this.speedX + pindahUnit);
this._y = this._y + this.speedY;
this.speedY++;
if (this._xscale == 100) {
this._rotation = this._rotation + 3.5;
} else {
this._rotation = this._rotation - 3.5;
}
if (this._y > this.batasBawah) {
if (this._y >= this.letakJatuh) {
if (this.keluar == "megamisil") {
ledak = attachMovie("ledak_mc7", "ledak_mc" + bykLedak, bykLedak);
} else {
ledak = attachMovie("ledak_mc2", "ledak_mc" + bykLedak, bykLedak);
}
ledak._x = this._x;
ledak._y = this._y - 20;
ledak._xscale = (ledak._yscale = 200);
if (this.keluar == "orang") {
ledak.jenisLedak = "mortir";
} else if (this.keluar == "tank") {
ledak.jenisLedak = "mortir2";
} else if (this.keluar == "megamisil") {
ledak.jenisLedak = "megamisil";
}
ledak.zdelay = false;
bykLedak++;
if (bykLedak >= 90005) {
bykLedak = 90000 /* 0x015F90 */;
}
removeMovieClip(this);
}
}
}
}
function cekMunculZmash(indi) {
zmash = attachMovie("zmash_mc", "peluru" + banyakPeluru, banyakPeluru);
if (indi.speed > 0) {
zmash._x = indi._x + 15;
zmash._y = indi._y - 15;
zmash.speedX = 16 - random(7);
zmash._xscale = 100;
} else if (indi.speed < 0) {
zmash._x = indi._x - 15;
zmash._y = indi._y - 15;
zmash.speedX = -16 + random(7);
zmash._xscale = -100;
}
zmash.keluar = "megamisil2";
zmash.speedY = -12;
zmash.batasBawah = indi._y - 10;
zmash.onEnterFrame = enterZmash;
banyakPeluru++;
if (banyakPeluru >= 70050) {
banyakPeluru = 70000 /* 0x011170 */;
}
}
function enterZmash() {
if (sedangPause == false) {
this._x = this._x + (this.speedX + pindahUnit);
this._y = this._y + this.speedY;
this.speedY++;
if (this._xscale == 100) {
this._rotation = this._rotation + 3.5;
} else {
this._rotation = this._rotation - 3.5;
}
if (this._y > this.batasBawah) {
if (this._y >= this.letakJatuh) {
if (this.keluar == "megamisil2") {
ledak = attachMovie("ledak_mc7", "ledak_mc" + bykLedak, bykLedak);
} else {
ledak = attachMovie("ledak_mc2", "ledak_mc" + bykLedak, bykLedak);
}
ledak._x = this._x;
ledak._y = this._y - 20;
ledak._xscale = (ledak._yscale = 200);
if (this.keluar == "orang") {
ledak.jenisLedak = "mortir";
} else if (this.keluar == "tank") {
ledak.jenisLedak = "mortir2";
} else if (this.keluar == "megamisil2") {
ledak.jenisLedak = "megamisil2";
}
ledak.zdelay = false;
bykLedak++;
if (bykLedak >= 90005) {
bykLedak = 90000 /* 0x015F90 */;
}
removeMovieClip(this);
}
}
}
}
function cekBerakhir() {
if (sudahSelesai == false) {
xjumlahPetarung = jumlahPetarung;
i = 1;
while (i <= 3) {
if (_root["sudahKalah" + i] == true) {
xjumlahPetarung--;
}
i++;
}
if (xjumlahPetarung <= 1) {
i = 1;
while (i <= 3) {
if (_root["sudahKalah" + i] == false) {
siapaMenang = i;
i = 3;
}
i++;
}
selesaiGame();
}
}
}
function selesaiGame() {
clearInterval(idUnitDarat1);
clearInterval(idUnitUdara1);
clearInterval(idUnitLaut1);
clearInterval(idUnitDarat2);
clearInterval(idUnitUdara2);
clearInterval(idUnitLaut2);
clearInterval(idUnitDarat3);
clearInterval(idUnitUdara3);
clearInterval(idUnitLaut3);
sudahSelesai = true;
idFrame = setInterval(munculFrame, 1000);
}
function munculFrame() {
clearInterval(idFrame);
_root["penguasaArea" + pilihPeta] = siapaMenang;
hasil = attachMovie("hasil_mc", "hasil_mc", 700009);
hasil._x = 400;
hasil._y = 250;
hasil.kerajaan_mc.gotoAndStop(siapaMenang);
zxberapaMenang = 0;
i = 1;
while (i <= 25) {
if (_root["penguasaArea" + i] > 0) {
zxberapaMenang++;
}
i++;
}
hasil.continue_btn.onRelease = function () {
hari = hari + 1;
if (siapaMenang == pilihKerajaan) {
_root["winBattle" + pilihKerajaan]++;
_root.winBattle++;
if (_root["winBattle" + pilihKerajaan] >= 100) {
_root.dapatMedal6 = true;
}
if (pilihMode == 2) {
upgradePoint = upgradePoint + 10;
} else {
upgradePoint = upgradePoint + Math.ceil(hari * 7);
}
} else {
_root["loseBattle" + pilihKerajaan]++;
_root.loseBattle++;
if (_root["loseBattle" + pilihKerajaan] >= 100) {
_root.dapatMedal5 = true;
}
if (pilihMode == 2) {
upgradePoint = upgradePoint + 5;
} else {
upgradePoint = upgradePoint + Math.ceil(hari * 3.5);
}
}
if (pilihMode == 2) {
if (scoreAwalSekali >= _root["scoreUnlimited" + pilihPeta]) {
_root["scoreUnlimited" + pilihPeta] = scoreAwalSekali;
}
simpanScoreUnlimited();
}
backMenu();
if (zxberapaMenang >= 25) {
if (pilihMode == 3) {
clearSemua();
loadData();
gotoAndStop (822);
} else if (pilihMode == 2) {
clearSemua();
gotoAndStop (841);
} else {
clearSemua();
gotoAndStop (844);
}
} else {
if (pilihMode == 1) {
simpanData();
}
if (pilihMode == 3) {
clearSemua();
loadData();
gotoAndStop (822);
} else if (pilihMode == 2) {
clearSemua();
gotoAndStop (841);
} else {
clearSemua();
gotoAndStop (841);
}
}
};
}
function clearSemua() {
removeListener(myListener);
delete myListener.onKeyDown;
delete _root.onEnterFrame;
clearInterval(idFrame);
clearInterval(idRegenPower1);
clearInterval(idRegenPower2);
clearInterval(idRegenPower3);
removeMovieClip(back_mc);
removeMovieClip(frame_mc);
removeMovieClip(formasi_mc1);
removeMovieClip(formasi_mc2);
removeMovieClip(formasi);
removeMovieClip(hasil_mc);
removeMovieClip(xtarget);
removeMovieClip(pause_mc);
removeMovieClip(xxtarget);
removeMovieClip(towerAmbil);
removeMovieClip(tutorial_mc);
i = 1;
while (i <= 39) {
j = 2;
while (j <= 9) {
removeMovieClip(_root[("kotak" + i) + j]);
j++;
}
i++;
}
i = 1000;
while (i <= bykSemak) {
removeMovieClip(_root["halang" + i]);
i++;
}
i = 2000;
while (i <= 4000) {
removeMovieClip(_root["tentara" + i]);
i++;
}
i = 90000 /* 0x015F90 */;
while (i <= 90005) {
removeMovieClip(_root["ledak_mc" + i]);
i++;
}
i = 90000 /* 0x015F90 */;
while (i <= 90005) {
removeMovieClip(_root["toxin_mc" + i]);
i++;
}
i = 70000 /* 0x011170 */;
while (i <= 70050) {
removeMovieClip(_root["peluru" + i]);
i++;
}
i = 70000 /* 0x011170 */;
while (i <= 70050) {
removeMovieClip(_root["bomb" + i]);
i++;
}
i = 90901 /* 0x016315 */;
while (i <= 90991) {
removeMovieClip(_root["misile" + i]);
i++;
}
}
stop();
backMain();
cekBisa();
init();
buatKotak();
if (((((tipePerang == "infantry") || (tipePerang == "sea2")) || (tipePerang == "infanarti")) || (tipePerang == "artilery")) || (tipePerang == "land")) {
if (naturalYes == true) {
buatHalang();
buatSemak();
}
if (sulitMap[pilihPeta] >= 3) {
buatTuret();
}
}
buatBase();
if (jenisMain != "demo") {
buatFrame();
}
if (pilihKerajaan == 1) {
pilihUnit(pilihKerajaan);
} else if (pilihKerajaan == 2) {
if (jumlahPetarung == 2) {
if (yangMain1 == false) {
pilihUnit(1);
} else if (yangMain3 == false) {
pilihUnit(3);
}
} else {
pilihUnit(pilihKerajaan);
}
} else if (pilihKerajaan == 3) {
pilihUnit(pilihKerajaan);
}
if (awalTutorial3 == true) {
awalTutorial3 = false;
xtutorial = attachMovie("tutorial_mc", "tutorial_mc", 100999);
xtutorial._x = 400;
xtutorial._y = 200;
i = 1;
while (i <= 4) {
_root["bisaDiklik" + i] = false;
if (frame["unit" + i].enabled == true) {
_root["bisaDiklik" + i] = true;
frame["unit" + i].enabled = false;
}
i++;
}
tutorial_mc.ok_btn.onRelease = function () {
if ((jenisMain == "demo") || (pilihKerajaan != 1)) {
munculSiapa(1);
}
munculSiapa(2);
munculSiapa(3);
i = 1;
while (i <= 4) {
if (_root["bisaDiklik" + i] == true) {
frame["unit" + i].enabled = true;
}
i++;
}
removeMovieClip(tutorial_mc);
};
} else {
if ((jenisMain == "demo") || (pilihKerajaan != 1)) {
munculSiapa(1);
}
munculSiapa(2);
munculSiapa(3);
}
_root.onMouseUp = function () {
klikMouse = 2;
};
_root.onMouseDown = function () {
if (sedangPause == false) {
klikMouse = 4;
if (pindahUnit == 0) {
if (_root._ymouse <= 400) {
if (xxtarget != undefined) {
if (xxtarget.jenis == 21) {
misile = attachMovie("misile", "misile" + dalamMisile, dalamMisile);
if (back_mc._x < -400) {
misile._x = (_root._xmouse - 500) - random(200);
misile._y = (_root._ymouse - 750) - random(200);
} else {
misile._x = (_root._xmouse + 500) + random(200);
misile._y = (_root._ymouse - 750) - random(200);
}
misile.targetX = xxtarget._x + 10;
misile.targetY = xxtarget._y + 10;
misile.speed = 1;
misile.onEnterFrame = enterMisile;
dalamMisile++;
if (dalamMisile >= 90991) {
dalamMisile = 90901 /* 0x016315 */;
}
removeMovieClip(xxtarget);
sedangSasar = false;
} else if (xxtarget.jenis == 22) {
i = 1;
while (i <= 3) {
misile = attachMovie("bomb", "misile" + dalamMisile, dalamMisile);
misile._x = (_root._xmouse - 100) + random(200);
misile._y = (_root._ymouse - 750) - random(200);
misile.targetX = xxtarget._x + 10;
misile.targetY = xxtarget._y + 10;
misile.speed = 0.01;
misile.onEnterFrame = enterBombe;
dalamMisile++;
if (dalamMisile >= 90991) {
dalamMisile = 90901 /* 0x016315 */;
}
i++;
}
removeMovieClip(xxtarget);
sedangSasar = false;
} else if (xxtarget.jenis == 23) {
i = 1;
while (i <= 3) {
misile = attachMovie("misile", "misile" + dalamMisile, dalamMisile);
if (back_mc._x < -400) {
misile._x = (_root._xmouse - 500) - random(200);
} else {
misile._x = (_root._xmouse + 500) + random(200);
}
misile._y = (_root._ymouse - 750) - (100 * i);
misile.targetX = xxtarget._x + 10;
misile.targetY = xxtarget._y + 10;
misile.speed = 1 + random(2);
misile.onEnterFrame = enterMisile2;
dalamMisile++;
if (dalamMisile >= 90991) {
dalamMisile = 90901 /* 0x016315 */;
}
i++;
}
removeMovieClip(xxtarget);
sedangSasar = false;
} else if (xxtarget.jenis == 24) {
misile = attachMovie("bomb", "misile" + dalamMisile, dalamMisile);
misile._x = (_root._xmouse - 100) + random(200);
misile._y = (_root._ymouse - 750) - random(200);
misile.targetX = xxtarget._x + 10;
misile.targetY = xxtarget._y + 10;
misile.speed = 0.1;
misile.onEnterFrame = enterMisile3;
dalamMisile++;
if (dalamMisile >= 90991) {
dalamMisile = 90901 /* 0x016315 */;
}
removeMovieClip(xxtarget);
sedangSasar = false;
}
}
}
}
}
};
_root.onEnterFrame = function () {
if (sedangPause == false) {
pindahUnit = 0;
if ((_root._xmouse >= 750) && (_root._ymouse <= 400)) {
if (back_mc._x > -790) {
pindahUnit = -5 * klikMouse;
}
} else if ((_root._xmouse <= 50) && (_root._ymouse <= 350)) {
if (back_mc._x < -10) {
pindahUnit = 5 * klikMouse;
}
}
i = 1;
while (i <= 39) {
j = 2;
while (j <= 9) {
_root[("kotak" + i) + j].kotakIsi = 0;
_root[("kotak" + i) + j].jenisIsi = "";
j++;
}
i++;
}
i = 3000;
while (i <= totalUnit2) {
if (_root["tentara" + i] != undefined) {
if (_root["tentara" + i].mati == false) {
if (_root["tentara" + i].jenis == 1) {
_root["tentara" + i].posisiX = 1 + Math.round((_root["tentara" + i]._x - back_mc._x) / 40);
} else {
_root["tentara" + i].posisiX = Math.round((_root["tentara" + i]._x - back_mc._x) / 40);
}
_root["tentara" + i].posisiY = Math.round(_root["tentara" + i]._y / 40);
k = _root["tentara" + i].posisiX;
l = _root["tentara" + i].posisiY;
if (_root["tentara" + i].speed > 0) {
_root[("kotak" + (k + 1)) + l].kotakIsi = 0;
_root[("kotak" + (k + 1)) + l].jenisIsi = "";
} else if (_root["tentara" + i].speed < 0) {
_root[("kotak" + (k - 1)) + l].kotakIsi = 0;
_root[("kotak" + (k - 1)) + l].jenisIsi = "";
}
_root[("kotak" + k) + l].kotakIsi = i;
_root[("kotak" + k) + l].jenisIsi = _root["tentara" + i];
}
}
i++;
}
i = 3000;
while (i <= totalUnit2) {
if (_root["tentara" + i].lahan != "udara") {
_root["tentara" + i].xtarget = false;
}
i++;
}
i = 3000;
while (i <= totalUnit2) {
if (_root["tentara" + i] != undefined) {
if (_root["tentara" + i].mati == false) {
if (_root["tentara" + i].jenis == 1) {
if (_root[("kotak" + k) + l].kotakIsi != 0) {
if (_root["tentara" + i].tipeSerangan == "airbomb") {
if (_root[("kotak" + _root["tentara" + i].posisiX) + (_root["tentara" + i].posisiY + _root["tentara" + i].range)].jenisIsi.jenis != 1) {
if (_root[("kotak" + _root["tentara" + i].posisiX) + (_root["tentara" + i].posisiY + _root["tentara" + i].range)].kotakIsi != 0) {
_root["tentara" + i].ztarget = _root[("kotak" + _root["tentara" + i].posisiX) + (_root["tentara" + i].posisiY + _root["tentara" + i].range)].jenisIsi;
_root["tentara" + i].xtarget = true;
}
}
} else {
if (_root[("kotak" + ((_root["tentara" + i].posisiX + _root["tentara" + i].range) - 3)) + _root["tentara" + i].posisiY].jenisIsi.jenis != 1) {
if (_root[("kotak" + ((_root["tentara" + i].posisiX + _root["tentara" + i].range) - 3)) + _root["tentara" + i].posisiY].kotakIsi != 0) {
_root["tentara" + i].ztarget = _root[("kotak" + ((_root["tentara" + i].posisiX + _root["tentara" + i].range) - 1)) + _root["tentara" + i].posisiY].jenisIsi;
if (_root["tentara" + i].ztarget.mati == false) {
_root["tentara" + i].xtarget = true;
}
}
}
if (_root[("kotak" + ((_root["tentara" + i].posisiX + _root["tentara" + i].range) - 2)) + _root["tentara" + i].posisiY].jenisIsi.jenis != 1) {
if (_root[("kotak" + ((_root["tentara" + i].posisiX + _root["tentara" + i].range) - 2)) + _root["tentara" + i].posisiY].kotakIsi != 0) {
_root["tentara" + i].ztarget = _root[("kotak" + ((_root["tentara" + i].posisiX + _root["tentara" + i].range) - 1)) + _root["tentara" + i].posisiY].jenisIsi;
if (_root["tentara" + i].ztarget.mati == false) {
_root["tentara" + i].xtarget = true;
}
}
}
if (_root[("kotak" + ((_root["tentara" + i].posisiX + _root["tentara" + i].range) - 1)) + _root["tentara" + i].posisiY].jenisIsi.jenis != 1) {
if (_root[("kotak" + ((_root["tentara" + i].posisiX + _root["tentara" + i].range) - 1)) + _root["tentara" + i].posisiY].kotakIsi != 0) {
_root["tentara" + i].ztarget = _root[("kotak" + ((_root["tentara" + i].posisiX + _root["tentara" + i].range) - 1)) + _root["tentara" + i].posisiY].jenisIsi;
if (_root["tentara" + i].ztarget.mati == false) {
_root["tentara" + i].xtarget = true;
}
}
}
if (_root[("kotak" + (_root["tentara" + i].posisiX + _root["tentara" + i].range)) + _root["tentara" + i].posisiY].jenisIsi.jenis != 1) {
if (_root[("kotak" + (_root["tentara" + i].posisiX + _root["tentara" + i].range)) + _root["tentara" + i].posisiY].kotakIsi != 0) {
_root["tentara" + i].ztarget = _root[("kotak" + (_root["tentara" + i].posisiX + _root["tentara" + i].range)) + _root["tentara" + i].posisiY].jenisIsi;
if (_root["tentara" + i].ztarget.mati == false) {
_root["tentara" + i].xtarget = true;
}
}
}
}
}
} else if (_root["tentara" + i].jenis == 2) {
if (_root[("kotak" + k) + l].kotakIsi != 0) {
if (_root["tentara" + i].tipeSerangan == "airbomb") {
if (_root[("kotak" + _root["tentara" + i].posisiX) + (_root["tentara" + i].posisiY + _root["tentara" + i].range)].jenisIsi.jenis != 2) {
if (_root[("kotak" + _root["tentara" + i].posisiX) + (_root["tentara" + i].posisiY + _root["tentara" + i].range)].kotakIsi != 0) {
_root["tentara" + i].ztarget = _root[("kotak" + _root["tentara" + i].posisiX) + (_root["tentara" + i].posisiY + _root["tentara" + i].range)].jenisIsi;
_root["tentara" + i].xtarget = true;
}
}
} else {
if (_root["tentara" + i].speed < 0) {
if (_root[("kotak" + ((_root["tentara" + i].posisiX - _root["tentara" + i].range) + 3)) + _root["tentara" + i].posisiY].jenisIsi.jenis != 2) {
if (_root[("kotak" + ((_root["tentara" + i].posisiX - _root["tentara" + i].range) + 3)) + _root["tentara" + i].posisiY].kotakIsi != 0) {
_root["tentara" + i].ztarget = _root[("kotak" + (_root["tentara" + i].posisiX - _root["tentara" + i].range)) + _root["tentara" + i].posisiY].jenisIsi;
if (_root["tentara" + i].ztarget.mati == false) {
_root["tentara" + i].xtarget = true;
}
}
}
if (_root[("kotak" + ((_root["tentara" + i].posisiX - _root["tentara" + i].range) + 2)) + _root["tentara" + i].posisiY].jenisIsi.jenis != 2) {
if (_root[("kotak" + ((_root["tentara" + i].posisiX - _root["tentara" + i].range) + 2)) + _root["tentara" + i].posisiY].kotakIsi != 0) {
_root["tentara" + i].ztarget = _root[("kotak" + (_root["tentara" + i].posisiX - _root["tentara" + i].range)) + _root["tentara" + i].posisiY].jenisIsi;
if (_root["tentara" + i].ztarget.mati == false) {
_root["tentara" + i].xtarget = true;
}
}
}
if (_root[("kotak" + ((_root["tentara" + i].posisiX - _root["tentara" + i].range) + 1)) + _root["tentara" + i].posisiY].jenisIsi.jenis != 2) {
if (_root[("kotak" + ((_root["tentara" + i].posisiX - _root["tentara" + i].range) + 1)) + _root["tentara" + i].posisiY].kotakIsi != 0) {
_root["tentara" + i].ztarget = _root[("kotak" + (_root["tentara" + i].posisiX - _root["tentara" + i].range)) + _root["tentara" + i].posisiY].jenisIsi;
if (_root["tentara" + i].ztarget.mati == false) {
_root["tentara" + i].xtarget = true;
}
}
}
if (_root[("kotak" + (_root["tentara" + i].posisiX - _root["tentara" + i].range)) + _root["tentara" + i].posisiY].jenisIsi.jenis != 2) {
if (_root[("kotak" + (_root["tentara" + i].posisiX - _root["tentara" + i].range)) + _root["tentara" + i].posisiY].kotakIsi != 0) {
_root["tentara" + i].ztarget = _root[("kotak" + (_root["tentara" + i].posisiX - _root["tentara" + i].range)) + _root["tentara" + i].posisiY].jenisIsi;
if (_root["tentara" + i].ztarget.mati == false) {
_root["tentara" + i].xtarget = true;
}
}
}
}
if (_root["tentara" + i].speed > 0) {
if (_root[("kotak" + ((_root["tentara" + i].posisiX + _root["tentara" + i].range) - 3)) + _root["tentara" + i].posisiY].jenisIsi.jenis != 2) {
if (_root[("kotak" + ((_root["tentara" + i].posisiX + _root["tentara" + i].range) - 3)) + _root["tentara" + i].posisiY].kotakIsi != 0) {
_root["tentara" + i].ztarget = _root[("kotak" + ((_root["tentara" + i].posisiX + _root["tentara" + i].range) - 2)) + _root["tentara" + i].posisiY].jenisIsi;
if (_root["tentara" + i].ztarget.mati == false) {
_root["tentara" + i].xtarget = true;
}
}
}
if (_root[("kotak" + ((_root["tentara" + i].posisiX + _root["tentara" + i].range) - 2)) + _root["tentara" + i].posisiY].jenisIsi.jenis != 2) {
if (_root[("kotak" + ((_root["tentara" + i].posisiX + _root["tentara" + i].range) - 2)) + _root["tentara" + i].posisiY].kotakIsi != 0) {
_root["tentara" + i].ztarget = _root[("kotak" + ((_root["tentara" + i].posisiX + _root["tentara" + i].range) - 2)) + _root["tentara" + i].posisiY].jenisIsi;
if (_root["tentara" + i].ztarget.mati == false) {
_root["tentara" + i].xtarget = true;
}
}
}
if (_root[("kotak" + ((_root["tentara" + i].posisiX + _root["tentara" + i].range) - 1)) + _root["tentara" + i].posisiY].jenisIsi.jenis != 2) {
if (_root[("kotak" + ((_root["tentara" + i].posisiX + _root["tentara" + i].range) - 1)) + _root["tentara" + i].posisiY].kotakIsi != 0) {
_root["tentara" + i].ztarget = _root[("kotak" + ((_root["tentara" + i].posisiX + _root["tentara" + i].range) - 1)) + _root["tentara" + i].posisiY].jenisIsi;
if (_root["tentara" + i].ztarget.mati == false) {
_root["tentara" + i].xtarget = true;
}
}
}
if (_root[("kotak" + (_root["tentara" + i].posisiX + _root["tentara" + i].range)) + _root["tentara" + i].posisiY].jenisIsi.jenis != 2) {
if (_root[("kotak" + (_root["tentara" + i].posisiX + _root["tentara" + i].range)) + _root["tentara" + i].posisiY].kotakIsi != 0) {
_root["tentara" + i].ztarget = _root[("kotak" + (_root["tentara" + i].posisiX + _root["tentara" + i].range)) + _root["tentara" + i].posisiY].jenisIsi;
if (_root["tentara" + i].ztarget.mati == false) {
_root["tentara" + i].xtarget = true;
}
}
}
}
if (_root["tentara" + i].speed == 0) {
if (_root[("kotak" + (_root["tentara" + i].posisiX + _root["tentara" + i].range)) + _root["tentara" + i].posisiY].jenisIsi.jenis != 2) {
if (_root[("kotak" + (_root["tentara" + i].posisiX + _root["tentara" + i].range)) + _root["tentara" + i].posisiY].kotakIsi != 0) {
_root["tentara" + i].ztarget = _root[("kotak" + (_root["tentara" + i].posisiX + _root["tentara" + i].range)) + _root["tentara" + i].posisiY].jenisIsi;
if (_root["tentara" + i].ztarget.mati == false) {
_root["tentara" + i].xtarget = true;
}
}
}
if (_root[("kotak" + (_root["tentara" + i].posisiX - _root["tentara" + i].range)) + _root["tentara" + i].posisiY].jenisIsi.jenis != 2) {
if (_root[("kotak" + (_root["tentara" + i].posisiX - _root["tentara" + i].range)) + _root["tentara" + i].posisiY].kotakIsi != 0) {
_root["tentara" + i].ztarget = _root[("kotak" + (_root["tentara" + i].posisiX - _root["tentara" + i].range)) + _root["tentara" + i].posisiY].jenisIsi;
if (_root["tentara" + i].ztarget.mati == false) {
_root["tentara" + i].xtarget = true;
}
}
}
if (_root[("kotak" + _root["tentara" + i].posisiX) + (_root["tentara" + i].posisiY + 1)].jenisIsi.jenis != 2) {
if (_root[("kotak" + _root["tentara" + i].posisiX) + (_root["tentara" + i].posisiY + 1)].kotakIsi != 0) {
_root["tentara" + i].ztarget = _root[("kotak" + _root["tentara" + i].posisiX) + (_root["tentara" + i].posisiY + 1)].jenisIsi;
if (_root["tentara" + i].ztarget2.mati == false) {
_root["tentara" + i].xtarget = true;
}
}
}
if (_root[("kotak" + _root["tentara" + i].posisiX) + _root["tentara" + i].posisiY].jenisIsi.jenis != 2) {
if (_root[("kotak" + _root["tentara" + i].posisiX) + _root["tentara" + i].posisiY].kotakIsi != 0) {
_root["tentara" + i].ztarget2 = _root[("kotak" + _root["tentara" + i].posisiX) + _root["tentara" + i].posisiY].jenisIsi;
if (_root["tentara" + i].ztarget2.mati == false) {
_root["tentara" + i].xtarget = true;
}
}
}
}
}
}
} else if (_root["tentara" + i].jenis == 3) {
if (_root[("kotak" + k) + l].kotakIsi != 0) {
if (_root["tentara" + i].tipeSerangan == "airbomb") {
if (_root[("kotak" + _root["tentara" + i].posisiX) + (_root["tentara" + i].posisiY + _root["tentara" + i].range)].jenisIsi.jenis != 3) {
if (_root[("kotak" + _root["tentara" + i].posisiX) + (_root["tentara" + i].posisiY + _root["tentara" + i].range)].kotakIsi != 0) {
_root["tentara" + i].ztarget = _root[("kotak" + _root["tentara" + i].posisiX) + (_root["tentara" + i].posisiY + _root["tentara" + i].range)].jenisIsi;
_root["tentara" + i].xtarget = true;
}
}
} else {
if (_root[("kotak" + ((_root["tentara" + i].posisiX - _root["tentara" + i].range) + 3)) + _root["tentara" + i].posisiY].jenisIsi.jenis != 3) {
if (_root[("kotak" + ((_root["tentara" + i].posisiX - _root["tentara" + i].range) + 3)) + _root["tentara" + i].posisiY].kotakIsi != 0) {
_root["tentara" + i].ztarget = _root[("kotak" + ((_root["tentara" + i].posisiX - _root["tentara" + i].range) + 1)) + _root["tentara" + i].posisiY].jenisIsi;
if (_root["tentara" + i].ztarget.mati == false) {
_root["tentara" + i].xtarget = true;
}
}
}
if (_root[("kotak" + ((_root["tentara" + i].posisiX - _root["tentara" + i].range) + 2)) + _root["tentara" + i].posisiY].jenisIsi.jenis != 3) {
if (_root[("kotak" + ((_root["tentara" + i].posisiX - _root["tentara" + i].range) + 2)) + _root["tentara" + i].posisiY].kotakIsi != 0) {
_root["tentara" + i].ztarget = _root[("kotak" + ((_root["tentara" + i].posisiX - _root["tentara" + i].range) + 1)) + _root["tentara" + i].posisiY].jenisIsi;
if (_root["tentara" + i].ztarget.mati == false) {
_root["tentara" + i].xtarget = true;
}
}
}
if (_root[("kotak" + ((_root["tentara" + i].posisiX - _root["tentara" + i].range) + 1)) + _root["tentara" + i].posisiY].jenisIsi.jenis != 3) {
if (_root[("kotak" + ((_root["tentara" + i].posisiX - _root["tentara" + i].range) + 1)) + _root["tentara" + i].posisiY].kotakIsi != 0) {
_root["tentara" + i].ztarget = _root[("kotak" + ((_root["tentara" + i].posisiX - _root["tentara" + i].range) + 2)) + _root["tentara" + i].posisiY].jenisIsi;
if (_root["tentara" + i].ztarget.mati == false) {
_root["tentara" + i].xtarget = true;
}
}
}
if (_root[("kotak" + (_root["tentara" + i].posisiX - _root["tentara" + i].range)) + _root["tentara" + i].posisiY].jenisIsi.jenis != 3) {
if (_root[("kotak" + (_root["tentara" + i].posisiX - _root["tentara" + i].range)) + _root["tentara" + i].posisiY].kotakIsi != 0) {
_root["tentara" + i].ztarget = _root[("kotak" + (_root["tentara" + i].posisiX - _root["tentara" + i].range)) + _root["tentara" + i].posisiY].jenisIsi;
if (_root["tentara" + i].ztarget.mati == false) {
_root["tentara" + i].xtarget = true;
}
}
}
}
}
} else if (_root["tentara" + i].jenis == 4) {
if (_root[("kotak" + k) + l].kotakIsi != 0) {
if (_root[("kotak" + (_root["tentara" + i].posisiX + 2)) + _root["tentara" + i].posisiY].jenisIsi.jenis != 4) {
if (_root[("kotak" + (_root["tentara" + i].posisiX + 2)) + _root["tentara" + i].posisiY].kotakIsi != 0) {
_root["tentara" + i].ztarget2 = _root[("kotak" + (_root["tentara" + i].posisiX + 2)) + _root["tentara" + i].posisiY].jenisIsi;
_root["tentara" + i].xtarget = true;
}
}
if (_root[("kotak" + (_root["tentara" + i].posisiX - 2)) + _root["tentara" + i].posisiY].jenisIsi.jenis != 4) {
if (_root[("kotak" + (_root["tentara" + i].posisiX - 2)) + _root["tentara" + i].posisiY].kotakIsi != 0) {
_root["tentara" + i].ztarget = _root[("kotak" + (_root["tentara" + i].posisiX - 2)) + _root["tentara" + i].posisiY].jenisIsi;
_root["tentara" + i].xtarget = true;
}
}
if (_root[("kotak" + (_root["tentara" + i].posisiX + 1)) + _root["tentara" + i].posisiY].jenisIsi.jenis != 4) {
if (_root[("kotak" + (_root["tentara" + i].posisiX + 1)) + _root["tentara" + i].posisiY].kotakIsi != 0) {
_root["tentara" + i].ztarget2 = _root[("kotak" + (_root["tentara" + i].posisiX + 1)) + _root["tentara" + i].posisiY].jenisIsi;
_root["tentara" + i].xtarget = true;
}
}
if (_root[("kotak" + (_root["tentara" + i].posisiX - 1)) + _root["tentara" + i].posisiY].jenisIsi.jenis != 4) {
if (_root[("kotak" + (_root["tentara" + i].posisiX - 1)) + _root["tentara" + i].posisiY].kotakIsi != 0) {
_root["tentara" + i].ztarget = _root[("kotak" + (_root["tentara" + i].posisiX - 1)) + _root["tentara" + i].posisiY].jenisIsi;
_root["tentara" + i].xtarget = true;
}
}
if (_root[("kotak" + _root["tentara" + i].posisiX) + (_root["tentara" + i].posisiY - 1)].jenisIsi.jenis != 4) {
if (_root[("kotak" + _root["tentara" + i].posisiX) + (_root["tentara" + i].posisiY - 1)].kotakIsi != 0) {
_root["tentara" + i].ztarget2 = _root[("kotak" + _root["tentara" + i].posisiX) + (_root["tentara" + i].posisiY - 1)].jenisIsi;
_root["tentara" + i].xtarget = true;
}
}
if (_root[("kotak" + _root["tentara" + i].posisiX) + (_root["tentara" + i].posisiY + 1)].jenisIsi.jenis != 4) {
if (_root[("kotak" + _root["tentara" + i].posisiX) + (_root["tentara" + i].posisiY + 1)].kotakIsi != 0) {
_root["tentara" + i].ztarget = _root[("kotak" + _root["tentara" + i].posisiX) + (_root["tentara" + i].posisiY + 1)].jenisIsi;
_root["tentara" + i].xtarget = true;
}
}
if (_root[("kotak" + _root["tentara" + i].posisiX) + _root["tentara" + i].posisiY].jenisIsi.jenis != 4) {
if (_root[("kotak" + _root["tentara" + i].posisiX) + _root["tentara" + i].posisiY].kotakIsi != 0) {
_root["tentara" + i].ztarget2 = _root[("kotak" + _root["tentara" + i].posisiX) + _root["tentara" + i].posisiY].jenisIsi;
_root["tentara" + i].xtarget = true;
}
}
}
}
}
}
i++;
}
i = 3000;
while (i <= totalUnit2) {
if (_root["tentara" + i] != undefined) {
j = 90000 /* 0x015F90 */;
while (j <= 90005) {
if (_root["ledak_mc" + j] != undefined) {
if (_root["ledak_mc" + j].hitTest(_root["tentara" + i])) {
if (_root["ledak_mc" + j].jenisLedak == "biasa") {
_root["tentara" + i].live = _root["tentara" + i].live - 80;
} else if (_root["ledak_mc" + j].jenisLedak == "mortir") {
_root["tentara" + i].live = _root["tentara" + i].live - 150;
} else if (_root["ledak_mc" + j].jenisLedak == "mortir2") {
_root["tentara" + i].live = _root["tentara" + i].live - 200;
} else if (_root["ledak_mc" + j].jenisLedak == "mortir2x") {
_root["tentara" + i].live = _root["tentara" + i].live - 125;
} else if (_root["ledak_mc" + j].jenisLedak == "megamisil") {
_root["tentara" + i].live = _root["tentara" + i].live - 250;
} else if (_root["ledak_mc" + j].jenisLedak == "megamisil2") {
_root["tentara" + i].live = _root["tentara" + i].live - 750;
} else if (_root["ledak_mc" + j].jenisLedak == "megamisil3") {
_root["tentara" + i].live = _root["tentara" + i].live - 1000;
} else if (_root["ledak_mc" + j].jenisLedak == "bazoka") {
_root["tentara" + i].live = _root["tentara" + i].live - 250;
} else if (_root["ledak_mc" + j].jenisLedak == "canon") {
_root["tentara" + i].live = _root["tentara" + i].live - 350;
} else if (_root["ledak_mc" + j].jenisLedak == "bomb") {
if (_root["ledak_mc" + j].yangSerang != _root["tentara" + i].jenis) {
_root["tentara" + i].live = _root["tentara" + i].live - 400;
}
} else if (_root["ledak_mc" + j].jenisLedak == "bomberman") {
_root["tentara" + i].live = _root["tentara" + i].live - 5000;
} else if (_root["ledak_mc" + j].jenisLedak == "kamikaze") {
_root["tentara" + i].live = _root["tentara" + i].live - 1000;
} else {
_root["tentara" + i].live = _root["tentara" + i].live - 250;
}
}
}
j++;
}
}
i++;
}
i = 90000 /* 0x015F90 */;
while (i <= 90005) {
if (_root["ledak_mc" + i] != undefined) {
_root["ledak_mc" + i]._x = _root["ledak_mc" + i]._x + pindahUnit;
}
if (_root["toxin_mc" + i] != undefined) {
_root["toxin_mc" + i]._x = _root["toxin_mc" + i]._x + pindahUnit;
}
i++;
}
}
};
myListener = new Object();
myListener.onKeyDown = function () {
if (Key.getCode() == 80) {
if (sedangPause == false) {
sedangPause = true;
cekPause(true);
} else if (sedangPause == true) {
sedangPause = false;
cekPause(false);
}
}
if (Key.getCode() == 81) {
pilihUnit2(1);
}
if (Key.getCode() == 87) {
pilihUnit2(2);
}
if (Key.getCode() == 69) {
pilihUnit2(3);
}
if (Key.getCode() == 49) {
if (frame.jenis1.enabled == true) {
jenisUnitPilih = 1;
pilihJenis(jenisUnitPilih);
}
}
if (Key.getCode() == 50) {
if (frame.jenis2.enabled == true) {
jenisUnitPilih = 2;
pilihJenis(jenisUnitPilih);
}
}
if (Key.getCode() == 51) {
if (frame.jenis3.enabled == true) {
jenisUnitPilih = 3;
pilihJenis(jenisUnitPilih);
}
}
if (Key.getCode() == 52) {
if (frame.jenis4.enabled == true) {
jenisUnitPilih = 4;
pilihJenis(jenisUnitPilih);
}
}
if (Key.getCode() == 53) {
if (frame.jenis5.enabled == true) {
jenisUnitPilih = 5;
pilihJenis(jenisUnitPilih);
}
}
if (Key.getCode() == 54) {
if (frame.jenis6.enabled == true) {
jenisUnitPilih = 6;
pilihJenis(jenisUnitPilih);
}
}
};
Key.addListener(myListener);
Frame 844
stop();
_root.xlandDeploy = _root["landDeploy" + pilihKerajaan];
_root.xseaDeploy = _root["seaDeploy" + pilihKerajaan];
_root.xairDeploy = _root["airDeploy" + pilihKerajaan];
_root.xlandKilled = _root["landKilled" + pilihKerajaan];
_root.xseaKilled = _root["seaKilled" + pilihKerajaan];
_root.xairKilled = _root["airKilled" + pilihKerajaan];
_root.xwinBattle = _root["winBattle" + pilihKerajaan];
_root.xloseBattle = _root["loseBattle" + pilihKerajaan];
_root.xscoreReach = _root["scoreReach" + pilihKerajaan];
winTheGame++;
if (winTheGame >= 50) {
_root.dapatMedal8 = true;
}
kerajaan_mc.gotoAndStop(pilihKerajaan);
close_btn.onRelease = function () {
gotoAndStop (822);
};
berapaKita = 0;
i = 1;
while (i <= 25) {
if (_root["penguasaArea" + i] == pilihKerajaan) {
berapaKita++;
}
i++;
}
xkingdom1 = 0;
xkingdom2 = 0;
xkingdom3 = 0;
i = 1;
while (i <= 25) {
if (_root["penguasaArea" + i] == 1) {
xkingdom1++;
} else if (_root["penguasaArea" + i] == 2) {
xkingdom2++;
} else if (_root["penguasaArea" + i] == 3) {
xkingdom3++;
}
i++;
}
if (berapaKita == 25) {
hasilnya = "Incredible! You have successfully won all areas in this battle. You are the ruler of the Blue-Green Planet. Continue on your valiant journey: there are still the Unlimited and Single modes to be played!";
xgrade = "A+";
} else if (berapaKita >= 20) {
hasilnya = "You are great! Although you did not control all areas in this battle, you have successfully dominated the Blue-Green Planet. Come back and conquer the entire area to prove your nation's dominance.";
xgrade = "A";
} else if (berapaKita >= 15) {
hasilnya = "You managed to get the most area compared to the other nations, but your opponents will not leave you alone in this scenario. They will certainly try to counter-attck. Come back and fight to eradicate the planet of your opponents.";
xgrade = "B";
} else if (berapaKita >= 10) {
hasilnya = "You are not good enough in combat and your territory is less than half the area of your opponent. You have lost. But do not give up! Stay and fight back in a more intense battle.";
xgrade = "C";
} else if (berapaKita >= 5) {
hasilnya = "You have been defeated by your opponents. Will you leave your opponents in power and surrender to them? Or will you come back and fight to prove your worth?";
xgrade = "D";
} else {
hasilnya = "You have been defeated by your opponents. Will you leave your opponents in power and surrender to them? Or will you come back and fight to prove your worth?";
xgrade = "E";
}
more_btn.onRelease = function () {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1817&subid=playmoregames", "_blank");
};
kunciGembok2 = false;
kunciGembok3 = false;
hari = 1;
simpanData();
_root.score = xscoreReach;
Instance of Symbol 35 MovieClip "logo_mc" in Frame 844
on (release) {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1817&subid=endgame", "_blank");
}
Symbol 21 MovieClip Frame 1
stop();
Symbol 27 Button
on (release) {
gameid = "FL090909";
getURL ("http://belugerinstudios.com/data/counter.php?gameid=" + gameid, "_blank");
}
Symbol 35 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Instance of Symbol 32 MovieClip in Symbol 35 MovieClip Frame 1
on (release) {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1817&subid=battlescreen", "_blank");
}
Symbol 88 MovieClip Frame 1
stop();
Symbol 98 MovieClip Frame 60
stop();
Symbol 119 MovieClip Frame 40
stop();
removeMovieClip(this);
Symbol 216 MovieClip [base_mc1] Frame 1
stop();
Symbol 216 MovieClip [base_mc1] Frame 3
play();
Symbol 216 MovieClip [base_mc1] Frame 30
stop();
removeMovieClip(this);
Symbol 219 MovieClip [base_mc2] Frame 1
stop();
Symbol 219 MovieClip [base_mc2] Frame 3
play();
Symbol 219 MovieClip [base_mc2] Frame 30
stop();
removeMovieClip(this);
Symbol 222 MovieClip [base_mc3] Frame 1
stop();
Symbol 222 MovieClip [base_mc3] Frame 3
play();
Symbol 222 MovieClip [base_mc3] Frame 30
stop();
removeMovieClip(this);
Symbol 235 MovieClip Frame 1
stop();
Symbol 241 MovieClip Frame 1
stop();
Symbol 242 MovieClip [formasi_mc1] Frame 1
stop();
Symbol 247 MovieClip Frame 1
stop();
Symbol 248 MovieClip [formasi_mc2] Frame 1
stop();
Symbol 264 MovieClip Frame 1
stop();
Symbol 279 MovieClip Frame 1
stop();
Symbol 314 MovieClip Frame 1
stop();
Symbol 347 MovieClip Frame 1
stop();
Symbol 380 MovieClip Frame 1
stop();
Symbol 413 MovieClip Frame 1
stop();
Symbol 417 MovieClip Frame 1
stop();
Symbol 418 MovieClip Frame 1
stop();
Symbol 419 MovieClip Frame 1
stop();
Symbol 420 MovieClip Frame 1
stop();
Symbol 421 MovieClip Frame 1
stop();
Symbol 422 MovieClip Frame 1
stop();
Symbol 423 MovieClip Frame 1
stop();
Symbol 424 MovieClip Frame 1
stop();
Symbol 426 MovieClip Frame 1
stop();
Symbol 427 MovieClip Frame 1
stop();
Symbol 429 MovieClip Frame 1
stop();
Symbol 430 MovieClip Frame 1
stop();
Symbol 431 MovieClip Frame 1
stop();
Symbol 432 MovieClip Frame 1
stop();
Symbol 433 MovieClip Frame 1
stop();
Symbol 434 MovieClip Frame 1
stop();
Symbol 435 MovieClip Frame 1
stop();
Symbol 436 MovieClip Frame 1
stop();
Symbol 437 MovieClip Frame 1
stop();
Symbol 439 MovieClip Frame 1
stop();
Symbol 440 MovieClip Frame 1
stop();
Symbol 441 MovieClip Frame 1
stop();
Symbol 444 MovieClip Frame 1
stop();
Symbol 446 MovieClip Frame 1
stop();
Symbol 447 MovieClip Frame 1
stop();
Symbol 448 MovieClip Frame 1
stop();
Symbol 450 MovieClip Frame 1
stop();
Symbol 452 MovieClip Frame 1
stop();
Symbol 453 MovieClip Frame 1
stop();
Symbol 454 MovieClip Frame 1
stop();
Symbol 456 MovieClip Frame 1
stop();
Symbol 457 MovieClip Frame 1
stop();
Symbol 458 MovieClip Frame 1
stop();
Symbol 459 MovieClip Frame 1
stop();
Symbol 460 MovieClip Frame 1
stop();
Symbol 462 MovieClip Frame 1
stop();
Symbol 463 MovieClip Frame 1
stop();
Symbol 464 MovieClip Frame 1
stop();
Symbol 467 MovieClip Frame 1
stop();
Symbol 468 MovieClip Frame 1
stop();
Symbol 469 MovieClip Frame 1
stop();
Symbol 470 MovieClip Frame 1
stop();
Symbol 472 MovieClip Frame 1
stop();
Symbol 474 MovieClip Frame 1
stop();
Symbol 475 MovieClip Frame 1
stop();
Symbol 489 MovieClip Frame 1
stop();
Symbol 491 MovieClip Frame 1
stop();
Symbol 493 MovieClip Frame 1
stop();
Symbol 495 MovieClip Frame 1
stop();
Symbol 497 MovieClip Frame 1
stop();
Symbol 499 MovieClip Frame 1
stop();
Symbol 502 MovieClip Frame 1
stop();
Symbol 504 MovieClip Frame 1
stop();
Symbol 506 MovieClip Frame 1
stop();
Symbol 513 MovieClip Frame 1
stop();
Instance of Symbol 35 MovieClip "logo_mc" in Symbol 514 MovieClip [frame_mc] Frame 1
on (release) {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1817&subid=playing", "_blank");
}
Symbol 517 MovieClip [halang_mc1] Frame 1
stop();
Symbol 519 MovieClip [halang_mc2] Frame 1
stop();
Symbol 522 MovieClip [halang_mc3] Frame 1
stop();
Symbol 525 MovieClip [halang_mc4] Frame 1
stop();
Symbol 528 MovieClip [halang_mc5] Frame 1
stop();
Symbol 530 MovieClip [kotak_mc] Frame 1
stop();
Symbol 543 MovieClip [ledak_mc] Frame 31
stop();
removeMovieClip(this);
Symbol 544 MovieClip [ledak_mc2] Frame 5
_root.backLedak();
Symbol 544 MovieClip [ledak_mc2] Frame 31
stop();
removeMovieClip(this);
Symbol 557 MovieClip [ledak_mc3] Frame 5
_root.backLedak();
Symbol 557 MovieClip [ledak_mc3] Frame 30
stop();
removeMovieClip(this);
Symbol 558 MovieClip [ledak_mc4] Frame 5
_root.backLedak();
Symbol 558 MovieClip [ledak_mc4] Frame 30
stop();
removeMovieClip(this);
Symbol 579 MovieClip [sinar_mc] Frame 3
_root.cekLedakLaser(this);
Symbol 579 MovieClip [sinar_mc] Frame 15
removeMovieClip(this);
Symbol 597 MovieClip Frame 6
_root.backGun();
Symbol 606 MovieClip Frame 90
removeMovieClip(_parent);
Symbol 607 MovieClip [tentara_mc11] Frame 1
stop();
Symbol 607 MovieClip [tentara_mc11] Frame 3
_root.backMati();
Symbol 623 MovieClip Frame 6
_root.backGun();
Symbol 632 MovieClip Frame 90
removeMovieClip(_parent);
Symbol 633 MovieClip [tentara_mc12] Frame 1
stop();
Symbol 633 MovieClip [tentara_mc12] Frame 3
_root.backMati();
Symbol 649 MovieClip Frame 6
_root.backGun();
Symbol 658 MovieClip Frame 90
removeMovieClip(_parent);
Symbol 659 MovieClip [tentara_mc13] Frame 1
stop();
Symbol 659 MovieClip [tentara_mc13] Frame 3
_root.backMati();
Symbol 675 MovieClip Frame 16
_root.cekMortir(_parent);
_root.backMortir();
Symbol 684 MovieClip Frame 90
removeMovieClip(_parent);
Symbol 685 MovieClip [tentara_mc21] Frame 1
stop();
Symbol 685 MovieClip [tentara_mc21] Frame 3
_root.backMati();
Symbol 701 MovieClip Frame 16
_root.cekMortir(_parent);
_root.backMortir();
Symbol 710 MovieClip Frame 90
removeMovieClip(_parent);
Symbol 711 MovieClip [tentara_mc22] Frame 1
stop();
Symbol 711 MovieClip [tentara_mc22] Frame 3
_root.backMati();
Symbol 727 MovieClip Frame 16
_root.cekMortir(_parent);
_root.backMortir();
Symbol 736 MovieClip Frame 90
removeMovieClip(_parent);
Symbol 737 MovieClip [tentara_mc23] Frame 1
stop();
Symbol 737 MovieClip [tentara_mc23] Frame 3
_root.backMati();
Symbol 753 MovieClip Frame 7
_root.cekBazoka(_parent);
_root.backBazoka();
Symbol 762 MovieClip Frame 90
removeMovieClip(_parent);
Symbol 763 MovieClip [tentara_mc31] Frame 1
stop();
Symbol 763 MovieClip [tentara_mc31] Frame 3
_root.backMati();
Symbol 780 MovieClip Frame 7
_root.cekBazoka(_parent);
_root.backBazoka();
Symbol 790 MovieClip Frame 90
removeMovieClip(_parent);
Symbol 791 MovieClip [tentara_mc32] Frame 1
stop();
Symbol 791 MovieClip [tentara_mc32] Frame 3
_root.backMati();
Symbol 808 MovieClip Frame 7
_root.cekBazoka(_parent);
_root.backBazoka();
Symbol 818 MovieClip Frame 90
removeMovieClip(_parent);
Symbol 819 MovieClip [tentara_mc33] Frame 1
stop();
Symbol 819 MovieClip [tentara_mc33] Frame 3
_root.backMati();
Symbol 836 MovieClip Frame 10
_root.cekLaser(_parent);
_root.backLaser();
Symbol 845 MovieClip Frame 90
removeMovieClip(_parent);
Symbol 846 MovieClip [tentara_mc41] Frame 1
stop();
Symbol 846 MovieClip [tentara_mc41] Frame 3
_root.backMati();
Symbol 862 MovieClip Frame 20
_root.cekZombie(_parent);
Symbol 873 MovieClip Frame 90
removeMovieClip(_parent);
Symbol 874 MovieClip [tentara_mc42] Frame 1
stop();
Symbol 890 MovieClip Frame 1
_root.cekBomberman(_parent);
Symbol 890 MovieClip Frame 60
stop();
_root.cekPasukanMati(_parent);
Symbol 891 MovieClip Frame 1
_root.cekBomberman(_parent);
Symbol 891 MovieClip Frame 25
removeMovieClip(_parent);
Symbol 892 MovieClip [tentara_mc43] Frame 1
stop();
Symbol 903 MovieClip Frame 1
_root.cekCanon(_parent);
_root.backCanon();
Symbol 906 MovieClip Frame 10
removeMovieClip(_parent);
Symbol 907 MovieClip [tentara_mc51] Frame 1
stop();
Symbol 917 MovieClip Frame 1
_root.cekCanon(_parent);
_root.backCanon();
Symbol 918 MovieClip Frame 10
removeMovieClip(_parent);
Symbol 919 MovieClip [tentara_mc52] Frame 1
stop();
Symbol 929 MovieClip Frame 1
_root.cekCanon(_parent);
_root.backCanon();
Symbol 930 MovieClip Frame 10
removeMovieClip(_parent);
Symbol 931 MovieClip [tentara_mc53] Frame 1
stop();
Symbol 941 MovieClip Frame 5
_root.backGun2();
Symbol 942 MovieClip Frame 10
removeMovieClip(_parent);
Symbol 943 MovieClip [tentara_mc61] Frame 1
stop();
Symbol 953 MovieClip Frame 5
_root.backGun2();
Symbol 954 MovieClip Frame 10
removeMovieClip(_parent);
Symbol 955 MovieClip [tentara_mc62] Frame 1
stop();
Symbol 965 MovieClip Frame 5
_root.backGun2();
Symbol 966 MovieClip Frame 10
removeMovieClip(_parent);
Symbol 967 MovieClip [tentara_mc63] Frame 1
stop();
Symbol 977 MovieClip Frame 1
_root.munculLauncher(_parent, 1);
_root.backMortir();
Symbol 977 MovieClip Frame 5
_root.munculLauncher(_parent, 2);
Symbol 977 MovieClip Frame 10
_root.munculLauncher(_parent, 3);
Symbol 978 MovieClip Frame 10
removeMovieClip(_parent);
Symbol 979 MovieClip [tentara_mc71] Frame 1
stop();
Symbol 988 MovieClip Frame 1
_root.munculLauncher(_parent, 1);
_root.backMortir();
Symbol 988 MovieClip Frame 5
_root.munculLauncher(_parent, 2);
Symbol 988 MovieClip Frame 10
_root.munculLauncher(_parent, 3);
Symbol 989 MovieClip Frame 10
removeMovieClip(_parent);
Symbol 990 MovieClip [tentara_mc72] Frame 1
stop();
Symbol 1000 MovieClip Frame 1
_root.munculLauncher(_parent, 1);
_root.backMortir();
Symbol 1000 MovieClip Frame 5
_root.munculLauncher(_parent, 2);
Symbol 1000 MovieClip Frame 10
_root.munculLauncher(_parent, 3);
Symbol 1001 MovieClip Frame 10
removeMovieClip(_parent);
Symbol 1002 MovieClip [tentara_mc73] Frame 1
stop();
Symbol 1017 MovieClip Frame 1
_root.backGun3();
Symbol 1019 MovieClip Frame 49
removeMovieClip(_parent);
Symbol 1020 MovieClip [turet_mc] Frame 1
stop();
Symbol 1020 MovieClip [turet_mc] Frame 3
stop();
Symbol 1030 MovieClip Frame 20
_root.cekSonic(_parent);
_root.backSonic();
Symbol 1031 MovieClip Frame 10
removeMovieClip(_parent);
Symbol 1032 MovieClip [tentara_mc81] Frame 1
stop();
Symbol 1042 MovieClip Frame 15
_root.munculToxin(_parent, 1);
_root.backMortir2();
Symbol 1042 MovieClip Frame 20
_root.munculToxin(_parent, 1);
_root.backMortir2();
Symbol 1042 MovieClip Frame 25
_root.munculToxin(_parent, 2);
_root.backMortir2();
Symbol 1043 MovieClip Frame 10
removeMovieClip(_parent);
Symbol 1044 MovieClip [tentara_mc82] Frame 1
stop();
Symbol 1052 MovieClip Frame 1
_root.munculMegaMisil(_parent);
_root.backBazoka();
_root.backBazoka();
Symbol 1053 MovieClip Frame 10
removeMovieClip(_parent);
Symbol 1054 MovieClip [tentara_mc83] Frame 1
stop();
Symbol 1059 MovieClip [mortir_mc2] Frame 1
stop();
Symbol 1059 MovieClip [mortir_mc2] Frame 10
stop();
removeMovieClip(this);
Symbol 1072 MovieClip [ledak_mc5] Frame 5
_root.backLedak();
Symbol 1072 MovieClip [ledak_mc5] Frame 30
stop();
removeMovieClip(this);
Symbol 1073 MovieClip [mortir_mc3] Frame 1
stop();
Symbol 1073 MovieClip [mortir_mc3] Frame 10
stop();
removeMovieClip(this);
Symbol 1086 MovieClip [ledak_mc6] Frame 5
_root.backLedak();
Symbol 1086 MovieClip [ledak_mc6] Frame 30
stop();
removeMovieClip(this);
Symbol 1090 MovieClip Frame 6
_root.cekPesawatBomb(_parent);
Symbol 1092 MovieClip [tentara_mc111] Frame 1
stop();
Symbol 1096 MovieClip Frame 6
_root.cekPesawatBomb(_parent);
Symbol 1098 MovieClip [tentara_mc112] Frame 1
stop();
Symbol 1102 MovieClip Frame 6
_root.cekPesawatBomb(_parent);
Symbol 1104 MovieClip [tentara_mc113] Frame 1
stop();
Symbol 1114 MovieClip Frame 5
_root.backGun2();
Symbol 1116 MovieClip [tentara_mc91] Frame 1
stop();
Symbol 1124 MovieClip Frame 5
_root.backGun2();
Symbol 1126 MovieClip [tentara_mc92] Frame 1
stop();
Symbol 1134 MovieClip Frame 5
_root.backGun2();
Symbol 1136 MovieClip [tentara_mc93] Frame 1
stop();
Symbol 1144 MovieClip Frame 10
_root.cekKeluarMisile(_parent);
_root.backBazoka();
Symbol 1146 MovieClip [tentara_mc101] Frame 1
stop();
Symbol 1153 MovieClip Frame 10
_root.cekKeluarMisile(_parent);
_root.backBazoka();
Symbol 1155 MovieClip [tentara_mc102] Frame 1
stop();
Symbol 1163 MovieClip Frame 10
_root.cekKeluarMisile(_parent);
_root.backBazoka();
Symbol 1165 MovieClip [tentara_mc103] Frame 1
stop();
Symbol 1174 MovieClip Frame 6
_root.cekKeluarMisile(_parent, 1);
_root.backBazoka();
Symbol 1174 MovieClip Frame 8
_root.cekKeluarMisile(_parent, 2);
_root.backBazoka();
Symbol 1174 MovieClip Frame 10
_root.cekKeluarMisile(_parent, 1);
_root.backBazoka();
Symbol 1174 MovieClip Frame 12
_root.cekKeluarMisile(_parent, 2);
_root.backBazoka();
Symbol 1174 MovieClip Frame 14
_root.cekKeluarMisile(_parent, 1);
_root.backBazoka();
Symbol 1176 MovieClip [tentara_mc121] Frame 1
stop();
Symbol 1186 MovieClip Frame 3
_root.cekNapalm(_parent);
Symbol 1186 MovieClip Frame 5
_root.cekNapalm(_parent);
Symbol 1188 MovieClip [tentara_mc122] Frame 1
stop();
Symbol 1192 MovieClip [tentara_mc123] Frame 1
stop();
Symbol 1210 MovieClip Frame 6
_root.backGun();
Symbol 1211 MovieClip Frame 10
removeMovieClip(_parent);
Symbol 1212 MovieClip [tentara_mc131] Frame 1
stop();
Symbol 1228 MovieClip Frame 6
_root.backGun();
Symbol 1229 MovieClip Frame 10
removeMovieClip(_parent);
Symbol 1230 MovieClip [tentara_mc132] Frame 1
stop();
Symbol 1246 MovieClip Frame 6
_root.backGun();
Symbol 1247 MovieClip Frame 10
removeMovieClip(_parent);
Symbol 1248 MovieClip [tentara_mc133] Frame 1
stop();
Symbol 1264 MovieClip Frame 6
_root.backGun2();
Symbol 1265 MovieClip Frame 10
removeMovieClip(_parent);
Symbol 1266 MovieClip [tentara_mc141] Frame 1
stop();
Symbol 1282 MovieClip Frame 6
_root.backGun2();
Symbol 1283 MovieClip Frame 10
removeMovieClip(_parent);
Symbol 1284 MovieClip [tentara_mc142] Frame 1
stop();
Symbol 1300 MovieClip Frame 6
_root.backGun2();
Symbol 1301 MovieClip Frame 10
removeMovieClip(_parent);
Symbol 1302 MovieClip [tentara_mc143] Frame 1
stop();
Symbol 1318 MovieClip Frame 5
_root.cekMortir2(_parent);
_root.backMortir();
Symbol 1319 MovieClip Frame 10
removeMovieClip(_parent);
Symbol 1320 MovieClip [tentara_mc151] Frame 1
stop();
Symbol 1336 MovieClip Frame 5
_root.cekMortir2(_parent);
_root.backMortir();
Symbol 1337 MovieClip Frame 10
removeMovieClip(_parent);
Symbol 1338 MovieClip [tentara_mc152] Frame 1
stop();
Symbol 1354 MovieClip Frame 5
_root.cekMortir2(_parent);
_root.backMortir();
Symbol 1355 MovieClip Frame 10
removeMovieClip(_parent);
Symbol 1356 MovieClip [tentara_mc153] Frame 1
stop();
Symbol 1372 MovieClip Frame 25
_root.backBazoka();
Symbol 1372 MovieClip Frame 40
_root.cekMunculDestroyer(_parent);
Symbol 1373 MovieClip Frame 10
removeMovieClip(_parent);
Symbol 1374 MovieClip [tentara_mc161] Frame 1
stop();
Symbol 1390 MovieClip Frame 5
_root.cekMunculZhot(_parent, 1);
_root.backMortir();
Symbol 1390 MovieClip Frame 10
_root.cekMunculZhot(_parent, 2);
_root.backMortir();
Symbol 1390 MovieClip Frame 15
_root.cekMunculZhot(_parent, 3);
_root.backMortir();
Symbol 1391 MovieClip Frame 10
removeMovieClip(_parent);
Symbol 1392 MovieClip [tentara_mc162] Frame 1
stop();
Symbol 1409 MovieClip Frame 5
_root.cekMunculZmash(_parent);
_root.backBazoka();
Symbol 1410 MovieClip Frame 10
removeMovieClip(_parent);
Symbol 1411 MovieClip [tentara_mc163] Frame 1
stop();
Symbol 1428 MovieClip Frame 1
stop();
Instance of Symbol 35 MovieClip "logo_mc" in Symbol 1434 MovieClip [hasil_mc] Frame 1
on (release) {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1817&subid=playing", "_blank");
}
Symbol 1449 MovieClip Frame 1
_root.backGun();
Symbol 1450 MovieClip [tentara_mc171] Frame 1
stop();
Symbol 1459 MovieClip Frame 1
_root.backGun();
Symbol 1460 MovieClip [tentara_mc172] Frame 1
stop();
Symbol 1470 MovieClip Frame 1
_root.backGun();
Symbol 1471 MovieClip [tentara_mc173] Frame 1
stop();
Symbol 1479 MovieClip Frame 6
_root.cekMortir(_parent);
_root.backMortir();
Symbol 1480 MovieClip [tentara_mc181] Frame 1
stop();
Symbol 1489 MovieClip Frame 6
_root.cekMortir(_parent);
_root.backMortir();
Symbol 1490 MovieClip [tentara_mc182] Frame 1
stop();
Symbol 1500 MovieClip Frame 6
_root.cekMortir(_parent);
_root.backMortir();
Symbol 1501 MovieClip [tentara_mc183] Frame 1
stop();
Symbol 1509 MovieClip Frame 5
_root.cekBazoka(_parent);
_root.backBazoka();
Symbol 1510 MovieClip [tentara_mc191] Frame 1
stop();
Symbol 1519 MovieClip Frame 5
_root.cekBazoka(_parent);
_root.backBazoka();
Symbol 1520 MovieClip [tentara_mc192] Frame 1
stop();
Symbol 1530 MovieClip Frame 5
_root.cekBazoka(_parent);
_root.backBazoka();
Symbol 1531 MovieClip [tentara_mc193] Frame 1
stop();
Symbol 1540 MovieClip Frame 6
_root.cekBazokaNgejar(_parent);
_root.backBazoka();
Symbol 1541 MovieClip [tentara_mc201] Frame 1
stop();
Symbol 1550 MovieClip Frame 1
_root.munculToxin(_parent, 2);
_root.backMortir2();
Symbol 1550 MovieClip Frame 6
_root.munculToxin(_parent, 2);
Symbol 1550 MovieClip Frame 11
_root.munculToxin(_parent, 2);
Symbol 1550 MovieClip Frame 16
_root.munculToxin(_parent, 2);
Symbol 1551 MovieClip [tentara_mc202] Frame 1
stop();
Symbol 1560 MovieClip Frame 1
_root.cekMunculDestroyer2(_parent);
Symbol 1560 MovieClip Frame 6
_root.cekMunculDestroyer2(_parent);
_root.backBazoka();
Symbol 1561 MovieClip [tentara_mc203] Frame 1
stop();
Symbol 1564 MovieClip [halang_mc6] Frame 1
stop();
Symbol 1567 MovieClip [halang_mc7] Frame 1
stop();
Symbol 1570 MovieClip [halang_mc8] Frame 1
stop();
Symbol 1573 MovieClip [halang_mc9] Frame 1
stop();
Symbol 1576 MovieClip [halang_mc10] Frame 1
stop();
Symbol 1584 MovieClip [ledak_mc7] Frame 5
_root.backLedak();
Symbol 1584 MovieClip [ledak_mc7] Frame 30
stop();
removeMovieClip(this);
Symbol 1611 MovieClip Frame 20
stop();
Symbol 1612 MovieClip [ledak_mc8] Frame 5
_root.backLedak();
Symbol 1612 MovieClip [ledak_mc8] Frame 20
stop();
removeMovieClip(this);
Symbol 1619 MovieClip [pause_mc] Frame 1
stop();
Symbol 1624 MovieClip [tutorial_mc] Frame 1
stop();
Symbol 1632 MovieClip [base_mc1b] Frame 1
stop();
Symbol 1632 MovieClip [base_mc1b] Frame 3
play();
Symbol 1632 MovieClip [base_mc1b] Frame 30
stop();
removeMovieClip(this);
Symbol 1635 MovieClip [base_mc2b] Frame 1
stop();
Symbol 1635 MovieClip [base_mc2b] Frame 3
play();
Symbol 1635 MovieClip [base_mc2b] Frame 30
stop();
removeMovieClip(this);
Symbol 1638 MovieClip [base_mc3b] Frame 1
stop();
Symbol 1638 MovieClip [base_mc3b] Frame 3
play();
Symbol 1638 MovieClip [base_mc3b] Frame 30
stop();
removeMovieClip(this);
Symbol 1641 MovieClip [base_mc1c] Frame 1
stop();
Symbol 1641 MovieClip [base_mc1c] Frame 3
play();
Symbol 1641 MovieClip [base_mc1c] Frame 30
stop();
removeMovieClip(this);
Symbol 1644 MovieClip [base_mc2c] Frame 1
stop();
Symbol 1644 MovieClip [base_mc2c] Frame 3
play();
Symbol 1644 MovieClip [base_mc2c] Frame 30
stop();
removeMovieClip(this);
Symbol 1647 MovieClip [base_mc3c] Frame 1
stop();
Symbol 1647 MovieClip [base_mc3c] Frame 3
play();
Symbol 1647 MovieClip [base_mc3c] Frame 30
stop();
removeMovieClip(this);
Symbol 1685 MovieClip Frame 1
stop();
Symbol 1685 MovieClip Frame 10
stop();
Symbol 1687 MovieClip Frame 1
this.link.onRelease = function () {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1817&subid=splash", "_blank");
};
Symbol 1687 MovieClip Frame 210
stop();
Symbol 1784 MovieClip Frame 1
stop();
Symbol 1786 MovieClip Frame 1
stop();
Symbol 1788 MovieClip Frame 1
stop();
Symbol 1791 MovieClip Frame 1
stop();
Symbol 1794 MovieClip Frame 1
stop();
Symbol 1811 MovieClip Frame 1
stop();
Symbol 1831 MovieClip Frame 1
stop();
Symbol 1834 MovieClip Frame 1
stop();
Symbol 1837 MovieClip Frame 1
stop();
Symbol 1840 MovieClip Frame 1
stop();
Symbol 1843 MovieClip Frame 1
stop();
Symbol 1846 MovieClip Frame 1
stop();
Symbol 1849 MovieClip Frame 1
stop();
Symbol 1852 MovieClip Frame 1
stop();
Symbol 1924 MovieClip Frame 1
stop();
Symbol 1930 MovieClip Frame 1
stop();
Symbol 1936 MovieClip Frame 1
stop();
Symbol 1939 MovieClip Frame 1
stop();
Symbol 1941 MovieClip Frame 1
stop();
Symbol 1942 MovieClip Frame 1
stop();
Symbol 1943 MovieClip Frame 1
stop();
Symbol 1947 MovieClip Frame 1
stop();
Symbol 1948 MovieClip Frame 1
stop();
Symbol 1950 MovieClip Frame 1
stop();
Symbol 1952 MovieClip Frame 1
stop();
Symbol 1954 MovieClip Frame 1
stop();
Symbol 1959 MovieClip Frame 1
stop();
Symbol 1963 MovieClip Frame 1
stop();
Symbol 1966 MovieClip Frame 1
stop();
Symbol 1970 MovieClip Frame 1
stop();
Symbol 1973 MovieClip Frame 1
stop();
Symbol 2031 MovieClip Frame 1
stop();
Symbol 2040 MovieClip Frame 1
stop();
Symbol 2045 MovieClip Frame 1
stop();
Symbol 2062 MovieClip Frame 1
stop();
Symbol 2077 MovieClip Frame 1
stop();
Symbol 2078 MovieClip Frame 1
stop();
Symbol 2082 MovieClip Frame 1
stop();
Symbol 2097 MovieClip Frame 1
stop();
ok_btn.onRelease = function () {
nextFrame();
gotoAndStop;
};
if (_root.pilihKerajaan == 1) {
gambar_mc.gotoAndStop(2);
} else if (_root.pilihKerajaan == 2) {
gambar_mc.gotoAndStop(22);
} else if (_root.pilihKerajaan == 3) {
gambar_mc.gotoAndStop(42);
}
Symbol 2097 MovieClip Frame 2
stop();
ok_btn.onRelease = function () {
nextFrame();
gotoAndStop;
};
if (_root.pilihKerajaan == 1) {
gambar_mc.gotoAndStop(6);
} else if (_root.pilihKerajaan == 2) {
gambar_mc.gotoAndStop(26);
} else if (_root.pilihKerajaan == 3) {
gambar_mc.gotoAndStop(46);
}
Symbol 2097 MovieClip Frame 3
stop();
ok_btn.onRelease = function () {
nextFrame();
gotoAndStop;
};
if (_root.pilihKerajaan == 1) {
gambar_mc.gotoAndStop(10);
} else if (_root.pilihKerajaan == 2) {
gambar_mc.gotoAndStop(30);
} else if (_root.pilihKerajaan == 3) {
gambar_mc.gotoAndStop(50);
}
Symbol 2097 MovieClip Frame 4
stop();
ok_btn.onRelease = function () {
_root.cekSudahUnit();
};
if (_root.pilihKerajaan == 1) {
gambar_mc.gotoAndStop(14);
} else if (_root.pilihKerajaan == 2) {
gambar_mc.gotoAndStop(34);
} else if (_root.pilihKerajaan == 3) {
gambar_mc.gotoAndStop(54);
}
Symbol 2097 MovieClip Frame 10
stop();
ok_btn.onRelease = function () {
nextFrame();
gotoAndStop;
};
if (_root.pilihKerajaan == 1) {
gambar_mc.gotoAndStop(3);
} else if (_root.pilihKerajaan == 2) {
gambar_mc.gotoAndStop(23);
} else if (_root.pilihKerajaan == 3) {
gambar_mc.gotoAndStop(43);
}
Symbol 2097 MovieClip Frame 11
stop();
ok_btn.onRelease = function () {
nextFrame();
gotoAndStop;
};
if (_root.pilihKerajaan == 1) {
gambar_mc.gotoAndStop(7);
} else if (_root.pilihKerajaan == 2) {
gambar_mc.gotoAndStop(27);
} else if (_root.pilihKerajaan == 3) {
gambar_mc.gotoAndStop(47);
}
Symbol 2097 MovieClip Frame 12
stop();
ok_btn.onRelease = function () {
nextFrame();
gotoAndStop;
};
if (_root.pilihKerajaan == 1) {
gambar_mc.gotoAndStop(11);
} else if (_root.pilihKerajaan == 2) {
gambar_mc.gotoAndStop(31);
} else if (_root.pilihKerajaan == 3) {
gambar_mc.gotoAndStop(51);
}
Symbol 2097 MovieClip Frame 13
stop();
ok_btn.onRelease = function () {
_root.cekSudahUnit();
};
if (_root.pilihKerajaan == 1) {
gambar_mc.gotoAndStop(15);
} else if (_root.pilihKerajaan == 2) {
gambar_mc.gotoAndStop(35);
} else if (_root.pilihKerajaan == 3) {
gambar_mc.gotoAndStop(55);
}
Symbol 2097 MovieClip Frame 20
stop();
ok_btn.onRelease = function () {
nextFrame();
gotoAndStop;
};
if (_root.pilihKerajaan == 1) {
gambar_mc.gotoAndStop(4);
infantry = "LASER MAN";
} else if (_root.pilihKerajaan == 2) {
gambar_mc.gotoAndStop(24);
infantry = "ZOMBIE";
} else if (_root.pilihKerajaan == 3) {
gambar_mc.gotoAndStop(44);
infantry = "BOMBER MAN";
}
Symbol 2097 MovieClip Frame 21
stop();
ok_btn.onRelease = function () {
nextFrame();
gotoAndStop;
};
if (_root.pilihKerajaan == 1) {
gambar_mc.gotoAndStop(8);
artillery = "SONIC TANK";
} else if (_root.pilihKerajaan == 2) {
gambar_mc.gotoAndStop(28);
artillery = "TOXIN TANK";
} else if (_root.pilihKerajaan == 3) {
gambar_mc.gotoAndStop(48);
artillery = "ZEDEADSTATOR";
}
Symbol 2097 MovieClip Frame 22
stop();
ok_btn.onRelease = function () {
nextFrame();
gotoAndStop;
};
if (_root.pilihKerajaan == 1) {
gambar_mc.gotoAndStop(12);
airforce = "STEALTH";
} else if (_root.pilihKerajaan == 2) {
gambar_mc.gotoAndStop(32);
airforce = "ZHOTNAPALM";
} else if (_root.pilihKerajaan == 3) {
gambar_mc.gotoAndStop(52);
airforce = "KAMIKAZE";
}
Symbol 2097 MovieClip Frame 23
stop();
ok_btn.onRelease = function () {
_root.cekSudahUnit();
};
if (_root.pilihKerajaan == 1) {
gambar_mc.gotoAndStop(16);
navy = "DESTROYER";
} else if (_root.pilihKerajaan == 2) {
gambar_mc.gotoAndStop(36);
navy = "GHOSTROYER";
} else if (_root.pilihKerajaan == 3) {
gambar_mc.gotoAndStop(56);
navy = "ZMASHTROYER";
}
Symbol 2099 MovieClip Frame 1
stop();
Symbol 2103 MovieClip Frame 1
stop();
Symbol 2134 MovieClip Frame 1
stop();
Symbol 2137 MovieClip Frame 1
stop();
Symbol 2139 MovieClip Frame 1
stop();
Symbol 2141 MovieClip Frame 1
stop();
Symbol 2143 MovieClip Frame 1
stop();
Symbol 2145 MovieClip Frame 1
stop();
Symbol 2147 MovieClip Frame 1
stop();
Symbol 2151 MovieClip Frame 1
stop();
Symbol 2162 MovieClip Frame 1
stop();
Symbol 2172 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Symbol 2179 MovieClip Frame 1
stop();
Symbol 2182 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Symbol 2185 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Symbol 2188 MovieClip Frame 1
function rhex(num) {
str = "";
j = 0;
while (j <= 3) {
str = str + (hex_chr.charAt(MathbitAND(num >> ((j * 8) + 4), 15)) + hex_chr.charAt(MathbitAND(num >> (j * 8), 15)));
j++;
}
return(str);
}
function str2blks_MD5(str) {
nblk = ((str.length + 8) >> 6) + 1;
blks = new Array(nblk * 16);
i = 0;
while (i < (nblk * 16)) {
blks[i] = 0;
i++;
}
i = 0;
while (i < str.length) {
blks[i >> 2] = blks[i >> 2] | (str.charCodeAt(i) << ((i % 4) * 8));
i++;
}
blks[i >> 2] = blks[i >> 2] | (128 << ((i % 4) * 8));
blks[(nblk * 16) - 2] = str.length * 8;
return(blks);
}
function addme(x, y) {
var _local1 = MathbitAND(x, 65535) + MathbitAND(y, 65535);
var _local2 = ((x >> 16) + (y >> 16)) + (_local1 >> 16);
return((_local2 << 16) | MathbitAND(_local1, 65535));
}
function rol(num, cnt) {
return((num << cnt) | (num >>> (32 - cnt)));
}
function cmn(q, a, b, x, s, t) {
return(addme(rol(addme(addme(a, q), addme(x, t)), s), b));
}
function ff(a, b, c, d, x, s, t) {
return(cmn(MathbitAND(b, c) | MathbitAND(~b, d), a, b, x, s, t));
}
function gg(a, b, c, d, x, s, t) {
return(cmn(MathbitAND(b, d) | MathbitAND(c, ~d), a, b, x, s, t));
}
function hh(a, b, c, d, x, s, t) {
return(cmn((b ^ c) ^ d, a, b, x, s, t));
}
function ii(a, b, c, d, x, s, t) {
return(cmn(c ^ (b | (~d)), a, b, x, s, t));
}
MathbitAND = function (a, b) {
if ((a < 0) && (b < 0)) {
var _local3 = (a & 1) & (b & 1);
var _local4 = (a >>> 1) & (b >>> 1);
return((_local4 << 1) | _local3);
}
return(a & b);
};
var hex_chr = "0123456789abcdef";
String.prototype.MD5 = function () {
var _local2 = this;
x = str2blks_MD5(_local2);
a = 1732584193 /* 0x67452301 */;
b = -271733879;
c = -1732584194;
d = 271733878 /* 0x10325476 */;
i = 0;
while (i < x.length) {
olda = a;
oldb = b;
oldc = c;
oldd = d;
a = ff(a, b, c, d, x[i + 0], 7, -680876936);
d = ff(d, a, b, c, x[i + 1], 12, -389564586);
c = ff(c, d, a, b, x[i + 2], 17, 606105819);
b = ff(b, c, d, a, x[i + 3], 22, -1044525330);
a = ff(a, b, c, d, x[i + 4], 7, -176418897);
d = ff(d, a, b, c, x[i + 5], 12, 1200080426);
c = ff(c, d, a, b, x[i + 6], 17, -1473231341);
b = ff(b, c, d, a, x[i + 7], 22, -45705983);
a = ff(a, b, c, d, x[i + 8], 7, 1770035416);
d = ff(d, a, b, c, x[i + 9], 12, -1958414417);
c = ff(c, d, a, b, x[i + 10], 17, -42063);
b = ff(b, c, d, a, x[i + 11], 22, -1990404162);
a = ff(a, b, c, d, x[i + 12], 7, 1804603682);
d = ff(d, a, b, c, x[i + 13], 12, -40341101);
c = ff(c, d, a, b, x[i + 14], 17, -1502002290);
b = ff(b, c, d, a, x[i + 15], 22, 1236535329);
a = gg(a, b, c, d, x[i + 1], 5, -165796510);
d = gg(d, a, b, c, x[i + 6], 9, -1069501632);
c = gg(c, d, a, b, x[i + 11], 14, 643717713);
b = gg(b, c, d, a, x[i + 0], 20, -373897302);
a = gg(a, b, c, d, x[i + 5], 5, -701558691);
d = gg(d, a, b, c, x[i + 10], 9, 38016083);
c = gg(c, d, a, b, x[i + 15], 14, -660478335);
b = gg(b, c, d, a, x[i + 4], 20, -405537848);
a = gg(a, b, c, d, x[i + 9], 5, 568446438);
d = gg(d, a, b, c, x[i + 14], 9, -1019803690);
c = gg(c, d, a, b, x[i + 3], 14, -187363961);
b = gg(b, c, d, a, x[i + 8], 20, 1163531501);
a = gg(a, b, c, d, x[i + 13], 5, -1444681467);
d = gg(d, a, b, c, x[i + 2], 9, -51403784);
c = gg(c, d, a, b, x[i + 7], 14, 1735328473);
b = gg(b, c, d, a, x[i + 12], 20, -1926607734);
a = hh(a, b, c, d, x[i + 5], 4, -378558);
d = hh(d, a, b, c, x[i + 8], 11, -2022574463);
c = hh(c, d, a, b, x[i + 11], 16, 1839030562);
b = hh(b, c, d, a, x[i + 14], 23, -35309556);
a = hh(a, b, c, d, x[i + 1], 4, -1530992060);
d = hh(d, a, b, c, x[i + 4], 11, 1272893353);
c = hh(c, d, a, b, x[i + 7], 16, -155497632);
b = hh(b, c, d, a, x[i + 10], 23, -1094730640);
a = hh(a, b, c, d, x[i + 13], 4, 681279174);
d = hh(d, a, b, c, x[i + 0], 11, -358537222);
c = hh(c, d, a, b, x[i + 3], 16, -722521979);
b = hh(b, c, d, a, x[i + 6], 23, 76029189);
a = hh(a, b, c, d, x[i + 9], 4, -640364487);
d = hh(d, a, b, c, x[i + 12], 11, -421815835);
c = hh(c, d, a, b, x[i + 15], 16, 530742520);
b = hh(b, c, d, a, x[i + 2], 23, -995338651);
a = ii(a, b, c, d, x[i + 0], 6, -198630844);
d = ii(d, a, b, c, x[i + 7], 10, 1126891415);
c = ii(c, d, a, b, x[i + 14], 15, -1416354905);
b = ii(b, c, d, a, x[i + 5], 21, -57434055);
a = ii(a, b, c, d, x[i + 12], 6, 1700485571);
d = ii(d, a, b, c, x[i + 3], 10, -1894986606);
c = ii(c, d, a, b, x[i + 10], 15, -1051523);
b = ii(b, c, d, a, x[i + 1], 21, -2054922799);
a = ii(a, b, c, d, x[i + 8], 6, 1873313359);
d = ii(d, a, b, c, x[i + 15], 10, -30611744);
c = ii(c, d, a, b, x[i + 6], 15, -1560198380);
b = ii(b, c, d, a, x[i + 13], 21, 1309151649);
a = ii(a, b, c, d, x[i + 4], 6, -145523070);
d = ii(d, a, b, c, x[i + 11], 10, -1120210379);
c = ii(c, d, a, b, x[i + 2], 15, 718787259);
b = ii(b, c, d, a, x[i + 9], 21, -343485551);
a = addme(a, olda);
b = addme(b, oldb);
c = addme(c, oldc);
d = addme(d, oldd);
i = i + 16;
}
return(((rhex(a) + rhex(b)) + rhex(c)) + rhex(d));
};
stop();
this.bubbleboxGameID = _root.gameID;
scoreMc = this;
sendBubbleBoxScore = function (gameID) {
userData = new LoadVars();
var _local4 = (((bubbleboxGameID + "_") + _root.score) + "_") + _root.bubblebox_name;
trace(_root.score);
trace(_root.bubblebox_name);
var _local5 = (((((((((bubbleboxGameID + "_") + "4234232143214421") + "_") + _root.score) + "_") + "2537625476251") + "_") + _root.bubblebox_name) + "_") + "desleutelistessa";
var _local3 = _local5.MD5();
userData.datastring = _local4;
userData.hashstring = _local3;
var _local2 = new LoadVars();
_local2.onLoad = function (success) {
if (success) {
scoreMc.gotoAndStop("success");
} else {
scoreMc.gotoAndStop("tryagain");
}
};
userData.sendAndLoad("http://www.bubblebox.com/scripts/insertscore2008.php", _local2, "POST");
};
this.send_btn.onRelease = function () {
if ((_root.bubblebox_name != "YOUR NAME") && (_root.bubblebox_name.length > 0)) {
sendBubbleBoxScore(this._parent.bubbleboxGameID);
this._parent.gotoAndStop("saving");
}
};
Selection.setFocus("instertname");
Symbol 2188 MovieClip Frame 2
stop();
Symbol 2188 MovieClip Frame 3
this.bubblebox_view_score.onRelease = function () {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1817&subid=highscores&action=viewscores", "_blank");
};
Symbol 2188 MovieClip Frame 4
this.try_again.onRelease = function () {
this._parent.gotoAndStop(1);
};