Frame 1
stop();
fscommand ("showmenu", false);
fscommand ("fullscreen", false);
fscommand ("allowscale", true);
Stage.showMenu = false;
mochi.as2.MochiAd.showPreGameAd({id:"09b102e31be2ff0f", res:"800x600"});
Frame 2
function initAwal() {
i = 1;
while (i <= 60) {
_root["sudahUpgrade" + i] = false;
_root["levelUpgrade" + i] = 1;
i++;
}
_root.sudahUpgrade1 = true;
_root.sudahUpgrade2 = true;
_root.sudahUpgrade4 = true;
_root.sudahUpgrade5 = true;
_root.sudahUpgrade6 = true;
_root.sudahUpgrade8 = true;
_root.sudahUpgrade9 = true;
_root.sudahUpgrade10 = true;
_root.sudahUpgrade12 = true;
_root.sudahUpgrade13 = true;
_root.sudahUpgrade14 = true;
_root.sudahUpgrade16 = true;
_root.sudahUpgrade17 = true;
_root.sudahUpgrade18 = true;
_root.sudahUpgrade20 = true;
_root.sudahUpgrade21 = true;
_root.sudahUpgrade22 = true;
_root.sudahUpgrade24 = true;
_root.sudahUpgrade25 = true;
_root.sudahUpgrade29 = true;
_root.sudahUpgrade33 = true;
_root.sudahUpgrade37 = true;
_root.sudahUpgrade41 = true;
_root.sudahUpgrade45 = true;
_root.sudahUpgrade49 = true;
_root.sudahUpgrade53 = true;
_root.sudahUpgrade57 = true;
nilaiUpgrades = 10000;
}
function initAwal2() {
i = 1;
while (i <= 60) {
_root["sudahUpgrade" + i] = true;
_root["levelUpgrade" + i] = 1;
i++;
}
nilaiUpgrades = 0;
}
function simpanData() {
adaData = true;
Cookies = SharedObject.getLocal("SD7x");
i = 1;
while (i <= 6) {
Cookies.data["xSD7Data" + i] = eval (simpanSemua[i]);
i++;
}
i = 1;
while (i <= 60) {
Cookies.data["xSD7Upgrade" + i] = _root["sudahUpgrade" + i];
Cookies.data["xSD7Level" + i] = _root["levelUpgrade" + i];
i++;
}
Cookies.flush();
}
function loadData() {
Cookies = SharedObject.getLocal("SD7x");
i = 1;
while (i <= 6) {
_root[simpanSemua[i]] = Cookies.data["xSD7Data" + i];
i++;
}
i = 1;
while (i <= 60) {
_root["sudahUpgrade" + i] = Cookies.data["xSD7Upgrade" + i];
_root["levelUpgrade" + i] = Cookies.data["xSD7Level" + i];
i++;
}
}
function backMain() {
myMusic.stop();
myMusic = new Sound(xmusic);
myMusic.attachSound("backMain");
myMusic.start(0, 999);
myMusic.setVolume(volum1);
}
function backMenu() {
myMusic.stop();
myMusic = new Sound(xmusic);
myMusic.attachSound("backMenu");
myMusic.start(0, 999);
myMusic.setVolume(volum1);
}
function backPanah() {
mySound = new Sound(xsound);
mySound.attachSound("backPanah");
mySound.start(0, 1);
mySound.setVolume(volum2);
}
function backBangun() {
mySound = new Sound(xsound);
mySound.attachSound("backBangun");
mySound.start(0, 1);
mySound.setVolume(volum2);
}
function backPanah2() {
mySound = new Sound(xsound);
mySound.attachSound("backPanah2");
mySound.start(0, 1);
mySound.setVolume(volum2);
}
function backApi() {
mySound = new Sound(xsound);
mySound.attachSound("backApi");
mySound.start(0, 1);
mySound.setVolume(volum2);
}
function backBatu() {
mySound = new Sound(xsound);
mySound.attachSound("backBatu");
mySound.start(0, 1);
mySound.setVolume(volum2);
}
function backSalju() {
mySound = new Sound(xsound);
mySound.attachSound("backSalju");
mySound.start(0, 1);
mySound.setVolume(volum2);
}
function backAir() {
mySound = new Sound(xsound);
mySound.attachSound("backAir");
mySound.start(0, 1);
mySound.setVolume(volum2);
}
function backPedang() {
mySound = new Sound(xsound);
mySound.attachSound("backPedang");
mySound.start(0, 1);
mySound.setVolume(volum2);
}
function backPedang2() {
mySound = new Sound(xsound);
mySound.attachSound("backPedang2");
mySound.start(0, 1);
mySound.setVolume(volum2);
}
function backMati() {
rand = random(5) + 1;
mySound = new Sound(xsound);
mySound.attachSound("backMati" + rand);
mySound.start(0, 1);
mySound.setVolume(volum2);
}
function backKuda() {
mySound = new Sound(xsound);
mySound.attachSound("backKuda");
mySound.start(0, 1);
mySound.setVolume(volum2);
}
function backGun() {
rand = random(5) + 1;
mySound = new Sound(xsound);
mySound.attachSound("backGun" + rand);
mySound.start(0, 1);
mySound.setVolume(volum2);
}
function backGranat() {
mySound = new Sound(xsound);
mySound.attachSound("backGranat");
mySound.start(0, 1);
mySound.setVolume(volum2);
}
function backCanon() {
rand = random(3) + 1;
mySound = new Sound(xsound);
mySound.attachSound("backCanon" + rand);
mySound.start(0, 1);
mySound.setVolume(volum2);
}
function backLedak() {
rand = random(7) + 1;
mySound = new Sound(xsound);
mySound.attachSound("backLedak" + rand);
mySound.start(0, 1);
mySound.setVolume(volum2);
}
function backBomb() {
mySound = new Sound(xsound);
mySound.attachSound("backBomb");
mySound.start(0, 1);
mySound.setVolume(volum2);
}
function backBomb2() {
mySound = new Sound(xsound);
mySound.attachSound("backBomb2");
mySound.start(0, 1);
mySound.setVolume(volum2);
}
function backMisil() {
rand = random(2) + 1;
mySound = new Sound(xsound);
mySound.attachSound("backMisil" + rand);
mySound.start(0, 1);
mySound.setVolume(volum2);
}
function backLaser() {
mySound = new Sound(xsound);
mySound.attachSound("backLaser");
mySound.start(0, 1);
mySound.setVolume(volum2);
}
function backListrik() {
mySound = new Sound(xsound);
mySound.attachSound("backListrik");
mySound.start(0, 1);
mySound.setVolume(volum2);
}
function backSonic() {
mySound = new Sound(xsound);
mySound.attachSound("backSonic");
mySound.start(0, 1);
mySound.setVolume(volum2);
}
function backIon1() {
mySound = new Sound(xsound);
mySound.attachSound("backIon1");
mySound.start(0, 1);
mySound.setVolume(volum2);
}
function backIon2() {
mySound = new Sound(xsound);
mySound.attachSound("backIon2");
mySound.start(0, 1);
mySound.setVolume(volum2);
}
function backDarah() {
rand = random(6);
if (rand == 3) {
mySound = new Sound(xsound);
mySound.attachSound("backDarah");
mySound.start(0, 1);
mySound.setVolume(volum2);
} else if (rand <= 2) {
mySound = new Sound(xsound);
mySound.attachSound("backDarah2");
mySound.start(0, 1);
mySound.setVolume(volum2);
}
}
function over() {
mySound = new Sound(xsound);
mySound.attachSound("over");
mySound.start(0, 1);
mySound.setVolume(volum2);
}
function klik() {
mySound = new Sound(xsound);
mySound.attachSound("klik");
mySound.start(0, 1);
mySound.setVolume(volum2);
}
stop();
attachMovie("sound", "xmusic", 0);
attachMovie("sound", "xsound", 1);
xmusic._x = -100;
xmusic._y = -100;
xsound._x = -100;
xsound._y = -100;
volum1 = 100;
volum2 = 70;
delaytime = 60;
_quality = "BEST";
jenisQua = 3;
jenisLand = 1;
adaEfek = true;
simpanSemua = new Array("", "adaData", "xscore", "jenisMaping", "xlevel", "nilaiUpgrades");
loadData();
if (adaData == undefined) {
initAwal();
simpanData();
}
gotoAndStop ("completed");
Frame 10
stop();
enter_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 == "belugerinstudios.com") {
this.enabled = false;
gotoAndPlay (16);
} else {
this.enabled = false;
gotoAndPlay (16);
}
};
Frame 11
prevFrame();
gotoAndStop;
Frame 16
play();
Frame 199
stop();
backMenu();
gotoAndStop (200);
Frame 200
stop();
start_btn.onRollOver = (options_btn.onRollOver = (help_btn.onRollOver = (team_btn.onRollOver = (more_btn.onRollOver = (demo_btn.onRollOver = (scores_btn.onRollOver = (strategy1_btn.onRollOver = (strategy2_btn.onRollOver = (strategy3_btn.onRollOver = (strategy4_btn.onRollOver = (strategy5_btn.onRollOver = (strategy6_btn.onRollOver = function () {
over();
}))))))))))));
start_btn.onRelease = function () {
klik();
jenisMaen = "maen";
if (((((((((delaytime < 10) || (delaytime == "")) || (delaytime == " ")) || (delaytime == " ")) || (delaytime == " ")) || (delaytime > 180)) || (isNaN(delaytime))) || (delaytime == null)) || (delaytime == undefined)) {
delaytime = 60;
}
gotoAndStop ("pilihMode");
};
options_btn.onRelease = function () {
klik();
gotoAndStop (208);
};
help_btn.onRelease = function () {
klik();
gotoAndStop (206);
};
team_btn.onRelease = function () {
klik();
gotoAndStop (207);
};
demo_btn.onRelease = function () {
klik();
rand = random(4);
jenisMaen = "demo";
if (rand == 0) {
xlevel = "easy";
} else if (rand == 1) {
xlevel = "normal";
} else if (rand == 2) {
xlevel = "hard";
} else if (rand == 3) {
xlevel = "extreme";
}
jenisLand = random(3) + 1;
jenisMaping = random(11) + 1;
gotoAndStop (209);
};
more_btn.onRelease = function () {
klik();
getURL ("http://www.belugerinstudios.com/", "_blank");
};
scores_btn.onRelease = function () {
klik();
getURL ("http://www.belugerinstudios.com/index.php?act=highscore&val=FL11121771", "_blank");
};
strategy1_btn.onRelease = function () {
klik();
getURL ("http://www.belugerinstudios.com/index.php?act=playgame&val=FL080117", "_blank");
};
strategy2_btn.onRelease = function () {
klik();
getURL ("http://www.belugerinstudios.com/index.php?act=playgame&val=FL080115", "_blank");
};
strategy3_btn.onRelease = function () {
klik();
getURL ("http://www.belugerinstudios.com/index.php?act=playgame&val=FL080114", "_blank");
};
strategy4_btn.onRelease = function () {
klik();
getURL ("http://www.belugerinstudios.com/index.php?act=playgame&val=FL080113", "_blank");
};
strategy5_btn.onRelease = function () {
klik();
getURL ("http://www.belugerinstudios.com/index.php?act=playgame&val=FL080112", "_blank");
};
strategy6_btn.onRelease = function () {
klik();
getURL ("http://www.belugerinstudios.com/index.php?act=playgame&val=FL10113903", "_blank");
};
Frame 201
prevFrame();
gotoAndStop;
Frame 202
stop();
penjelasan = "";
back_btn.onRollOver = function () {
over();
};
campaign_btn.onRollOver = function () {
over();
penjelasan = "Play all 11 maps continuously, the game progress and scores each maps will auto saved.";
};
single_btn.onRollOver = function () {
over();
penjelasan = "Select one of 11 maps and play it to get quick scores.";
};
campaign_btn.onRollOut = (single_btn.onRollOut = function () {
penjelasan = "";
});
back_btn.onRelease = function () {
klik();
gotoAndStop (200);
};
continue_mc._visible = false;
campaign_btn.onRelease = function () {
klik();
loadData();
if (((adaData == undefined) || (jenisMaping == undefined)) || (jenisMaping == 1)) {
initAwal();
simpanData();
pilihanMode = "campaign";
gotoAndStop ("pilihLevel");
} else {
continue_mc._visible = true;
continue_mc.continue_btn.onRelease = function () {
loadData();
pilihanMode = "campaign";
gotoAndStop (211);
};
continue_mc.new_btn.onRelease = function () {
jenisMaping = 1;
xscore = 0;
adaData = undefined;
initAwal();
simpanData();
pilihanMode = "campaign";
gotoAndStop ("pilihLevel");
};
}
};
single_btn.onRelease = function () {
klik();
initAwal2();
pilihanMode = "single";
gotoAndStop ("pilihLevel");
};
Frame 203
stop();
back_btn.onRollOver = (easy_btn.onRollOver = (normal_btn.onRollOver = (hard_btn.onRollOver = (extreme_btn.onRollOver = function () {
over();
}))));
back_btn.onRelease = function () {
klik();
gotoAndStop (202);
};
easy_btn.onRelease = function () {
klik();
xlevel = "easy";
if (pilihanMode == "campaign") {
jenisLand = 1;
jenisMaping = 1;
xscore = 0;
simpanData();
gotoAndStop ("delayNew");
} else {
gotoAndStop ("delayNew");
}
};
normal_btn.onRelease = function () {
klik();
xlevel = "normal";
if (pilihanMode == "campaign") {
jenisLand = 1;
jenisMaping = 1;
xscore = 0;
simpanData();
gotoAndStop ("delayNew");
} else {
gotoAndStop ("delayNew");
}
};
hard_btn.onRelease = function () {
klik();
xlevel = "hard";
if (pilihanMode == "campaign") {
jenisLand = 1;
jenisMaping = 1;
xscore = 0;
simpanData();
gotoAndStop ("delayNew");
} else {
gotoAndStop ("delayNew");
}
};
extreme_btn.onRelease = function () {
klik();
xlevel = "extreme";
if (pilihanMode == "campaign") {
jenisLand = 1;
jenisMaping = 1;
xscore = 0;
simpanData();
gotoAndStop ("delayNew");
} else {
gotoAndStop ("delayNew");
}
};
Frame 204
stop();
delaytime = 60;
play_btn.onRelease = function () {
if (((((((((delaytime < 10) || (delaytime == "")) || (delaytime == " ")) || (delaytime == " ")) || (delaytime == " ")) || (delaytime > 180)) || (isNaN(delaytime))) || (delaytime == null)) || (delaytime == undefined)) {
delaytime = 60;
}
if (pilihanMode == "campaign") {
gotoAndStop (211);
} else {
gotoAndStop (205);
}
};
Frame 205
function cekLand() {
option1.gotoAndStop(1);
option2.gotoAndStop(1);
option3.gotoAndStop(1);
if (jenisLand == 1) {
option1.gotoAndStop(2);
} else if (jenisLand == 2) {
option2.gotoAndStop(2);
} else if (jenisLand == 3) {
option3.gotoAndStop(2);
}
i = 1;
while (i <= 11) {
_root["map" + i].gotoAndStop(jenisLand);
i++;
}
}
stop();
jenisLand = 1;
kemyStr = new String(xlevel);
kebesar = kemyStr.toUpperCase();
kelevel = "LEVEL: " + kebesar;
cekLand();
option1.onRelease = function () {
klik();
jenisLand = 1;
cekLand();
};
option2.onRelease = function () {
klik();
jenisLand = 2;
cekLand();
};
option3.onRelease = function () {
klik();
jenisLand = 3;
cekLand();
};
map1.onRollOver = (map2.onRollOver = (map3.onRollOver = (map4.onRollOver = (map5.onRollOver = (map6.onRollOver = (map7.onRollOver = (map8.onRollOver = (map9.onRollOver = (map10.onRollOver = (map11.onRollOver = function () {
over();
this._alpha = 75;
}))))))))));
back_btn.onRollOver = (option1.onRollOver = (option2.onRollOver = (option3.onRollOver = function () {
over();
})));
map1.onRollOut = (map2.onRollOut = (map3.onRollOut = (map4.onRollOut = (map5.onRollOut = (map6.onRollOut = (map7.onRollOut = (map8.onRollOut = (map9.onRollOut = (map10.onRollOut = (map11.onRollOut = function () {
this._alpha = 100;
}))))))))));
map1.onRelease = function () {
klik();
jenisMaping = 1;
gotoAndStop (209);
};
map2.onRelease = function () {
klik();
jenisMaping = 2;
gotoAndStop (209);
};
map3.onRelease = function () {
klik();
jenisMaping = 3;
gotoAndStop (209);
};
map4.onRelease = function () {
klik();
jenisMaping = 4;
gotoAndStop (209);
};
map5.onRelease = function () {
klik();
jenisMaping = 5;
gotoAndStop (209);
};
map6.onRelease = function () {
klik();
jenisMaping = 6;
gotoAndStop (209);
};
map7.onRelease = function () {
klik();
jenisMaping = 7;
gotoAndStop (209);
};
map8.onRelease = function () {
klik();
jenisMaping = 8;
gotoAndStop (209);
};
map9.onRelease = function () {
klik();
jenisMaping = 9;
gotoAndStop (209);
};
map10.onRelease = function () {
klik();
jenisMaping = 10;
gotoAndStop (209);
};
map11.onRelease = function () {
klik();
jenisMaping = 11;
gotoAndStop (209);
};
back_btn.onRelease = function () {
klik();
gotoAndStop (202);
};
Frame 206
stop();
back_btn.onRollOver = (easy_btn.onRollOver = (normal_btn.onRollOver = (hard_btn.onRollOver = (extreme_btn.onRollOver = function () {
over();
}))));
back_btn.onRelease = function () {
klik();
gotoAndStop (200);
};
Frame 207
stop();
back_btn.onRollOver = (easy_btn.onRollOver = (normal_btn.onRollOver = (hard_btn.onRollOver = (extreme_btn.onRollOver = function () {
over();
}))));
back_btn.onRelease = function () {
klik();
gotoAndStop (200);
};
Frame 208
function cekQua() {
option1.gotoAndStop(1);
option2.gotoAndStop(1);
option3.gotoAndStop(1);
if (jenisQua == 1) {
option1.gotoAndStop(2);
} else if (jenisQua == 2) {
option2.gotoAndStop(2);
} else if (jenisQua == 3) {
option3.gotoAndStop(2);
}
}
function cekEfek() {
option4.gotoAndStop(1);
option5.gotoAndStop(1);
if (adaEfek == true) {
option4.gotoAndStop(2);
} else {
option5.gotoAndStop(2);
}
}
function defaultMusic() {
i = 0;
while (i <= 6) {
_root["pmusik" + i].gotoAndStop(1);
i++;
}
}
stop();
cekQua();
cekEfek();
option1.onRelease = function () {
klik();
_quality = "LOW";
jenisQua = 1;
cekQua();
};
option2.onRelease = function () {
klik();
_quality = "MEDIUM";
jenisQua = 2;
cekQua();
};
option3.onRelease = function () {
klik();
_quality = "BEST";
jenisQua = 3;
cekQua();
};
option4.onRelease = function () {
klik();
adaEfek = true;
cekEfek();
};
option5.onRelease = function () {
klik();
adaEfek = false;
cekEfek();
};
default_btn.onRelease = function () {
klik();
_root.volum1 = 100;
_root.volum2 = 75;
bar1_mc.bar_mc._x = Math.ceil((_root.volum1 / 0.434782608695652) - 115);
bar2_mc.bar_mc._x = Math.ceil((_root.volum2 / 0.434782608695652) - 115);
delaytime = 60;
_quality = "BEST";
jenisQua = 3;
adaEfek = true;
cekQua();
cekEfek();
};
back_btn.onRollOver = (option1.onRollOver = (option2.onRollOver = (option3.onRollOver = (option4.onRollOver = (option5.onRollOver = (default_btn.onRollOver = function () {
over();
}))))));
back_btn.onRelease = function () {
klik();
if (((((((((delaytime < 10) || (delaytime == "")) || (delaytime == " ")) || (delaytime == " ")) || (delaytime == " ")) || (delaytime > 180)) || (isNaN(delaytime))) || (delaytime == null)) || (delaytime == undefined)) {
delaytime = 60;
}
gotoAndStop (200);
};
bar1_mc.bar_mc._x = Math.ceil((_root.volum1 / 0.434782608695652) - 115);
bar1_mc.bar_mc.onEnterFrame = function () {
_root.volum1 = int(0.434782608695652 * (this._x + 115));
_root.myMusic.setVolume(_root.volum1);
_root.myMusic2.setVolume(_root.volum1);
_root.myMusic3.setVolume(_root.volum1);
bar1_mc.persen1 = _root.volum1 + " %";
};
bar1_mc.indi_mc.onPress = function () {
klik();
startDrag (bar1_mc.bar_mc, true, -115, 0, 115, 0);
};
bar1_mc.bar_mc.onRollOver = function () {
over();
};
bar1_mc.indi_mc.onRelease = (bar1_mc.indi_mc.onReleaseOutside = function () {
over();
stopDrag();
});
bar2_mc.bar_mc._x = Math.ceil((_root.volum2 / 0.434782608695652) - 115);
bar2_mc.bar_mc.onEnterFrame = function () {
_root.volum2 = int(0.434782608695652 * (this._x + 115));
_root.mySound.setVolume(_root.volum2);
bar2_mc.persen2 = _root.volum2 + " %";
};
bar2_mc.indi_mc.onPress = function () {
klik();
startDrag (bar2_mc.bar_mc, true, -115, 0, 115, 0);
};
bar2_mc.bar_mc.onRollOver = function () {
over();
};
bar2_mc.indi_mc.onRelease = (bar2_mc.indi_mc.onReleaseOutside = function () {
over();
stopDrag();
});
bar3_mc.bar_mc._x = Math.ceil((_root.volum3 / 0.434782608695652) - 115);
bar3_mc.bar_mc.onEnterFrame = function () {
_root.volum3 = int(0.434782608695652 * (this._x + 115));
if (_root.volum3 >= 75) {
_root.kecepatanGame = "fast";
} else if ((_root.volum3 <= 75) && (_root.volum3 >= 25)) {
_root.kecepatanGame = "normal";
} else {
_root.kecepatanGame = "slow";
}
bar2_mc.persen3 = _root.volum3 + " %";
};
bar3_mc.indi_mc.onPress = function () {
klik();
startDrag (bar3_mc.bar_mc, true, -115, 0, 115, 0);
};
bar3_mc.bar_mc.onRollOver = function () {
over();
};
bar3_mc.indi_mc.onRelease = (bar3_mc.indi_mc.onReleaseOutside = function () {
over();
stopDrag();
});
if (mainMusik == 0) {
defaultMusic();
pmusik0.gotoAndStop(2);
} else if (mainMusik == 1) {
defaultMusic();
pmusik1.gotoAndStop(2);
} else if (mainMusik == 2) {
defaultMusic();
pmusik2.gotoAndStop(2);
} else if (mainMusik == 3) {
defaultMusic();
pmusik3.gotoAndStop(2);
} else if (mainMusik == 4) {
defaultMusic();
pmusik4.gotoAndStop(2);
} else if (mainMusik == 5) {
defaultMusic();
pmusik5.gotoAndStop(2);
} else if (mainMusik == 6) {
defaultMusic();
pmusik6.gotoAndStop(2);
}
pmusik0.onRollOver = (pmusik1.onRollOver = (pmusik2.onRollOver = (pmusik3.onRollOver = (pmusik4.onRollOver = (pmusik5.onRollOver = (pmusik6.onRollOver = function () {
over();
}))))));
pmusik0.onRelease = function () {
klik();
defaultMusic();
this.gotoAndStop(2);
backMain();
};
pmusik1.onRelease = function () {
klik();
defaultMusic();
this.gotoAndStop(2);
backRumput();
};
pmusik2.onRelease = function () {
klik();
defaultMusic();
this.gotoAndStop(2);
backPlay();
};
pmusik3.onRelease = function () {
klik();
defaultMusic();
this.gotoAndStop(2);
backSalju();
};
pmusik4.onRelease = function () {
klik();
defaultMusic();
this.gotoAndStop(2);
backSea();
};
pmusik5.onRelease = function () {
klik();
defaultMusic();
this.gotoAndStop(2);
backFinal();
};
pmusik6.onRelease = function () {
klik();
defaultMusic();
this.gotoAndStop(2);
backMap();
};
Frame 209
function cekMapping() {
if (jenisMaping == 1) {
mapping = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 16, 16, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 5, 5, 5, 14, 16, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 5, 9, 5, 15, 15, 16, 16, 16, 16, 16, 16, 16, 1, 1, 1], [1, 1, 1, 5, 5, 5, 12, 16, 15, 15, 15, 15, 15, 15, 16, 16, 1, 1, 1], [1, 1, 1, 6, 3, 6, 7, 8, 6, 1, 1, 1, 1, 15, 16, 16, 1, 1, 1], [1, 1, 1, 1, 0, 1, 7, 8, 8, 8, 8, 8, 1, 15, 16, 16, 1, 1, 1], [1, 1, 1, 1, 0, 1, 7, 7, 7, 7, 7, 8, 1, 15, 16, 16, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 7, 8, 4, 15, 15, 13, 1, 1, 1], [1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 7, 8, 8, 8, 8, 8, 8, 8, 8], [1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 7, 7, 7, 11, 8, 8, 8, 8, 8], [1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 4, 5, 10, 5, 5, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 2, 5, 5, 5, 5, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 5, 5, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]];
} else if (jenisMaping == 2) {
mapping = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 8, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 8, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 8, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 5, 5, 5, 5, 5, 8, 8, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 5, 5, 9, 5, 5, 8, 8, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 5, 5, 5, 5, 5, 8, 8, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 5, 5, 14, 5, 5, 8, 8, 12, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 5, 6, 3, 6, 5, 6, 8, 7, 8, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 8, 8, 7, 8, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 8, 8, 7, 8, 8, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 8, 8, 7, 8, 8, 8, 1, 1], [1, 1, 1, 1, 1, 1, 5, 4, 2, 4, 5, 4, 8, 7, 8, 8, 8, 1, 1], [1, 1, 1, 1, 1, 1, 5, 5, 13, 5, 5, 8, 8, 11, 8, 8, 8, 1, 1], [1, 1, 1, 1, 1, 1, 5, 5, 5, 5, 5, 1, 1, 1, 8, 8, 8, 1, 1], [1, 1, 1, 1, 1, 1, 5, 10, 5, 5, 5, 1, 1, 1, 1, 8, 8, 1, 1], [1, 1, 1, 1, 1, 1, 1, 5, 5, 5, 5, 1, 1, 1, 1, 8, 8, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 8, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 8, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 8, 1, 1]];
} else if (jenisMaping == 3) {
mapping = [[1, 0, 0, 1, 15, 15, 1, 1, 1, 7, 7, 7, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 1, 15, 15, 1, 1, 1, 7, 7, 7, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 15, 15, 1, 1, 1, 7, 7, 7, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 15, 15, 0, 0, 5, 7, 7, 7, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 16, 16, 9, 5, 5, 7, 7, 7, 1, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 16, 16, 5, 5, 5, 8, 8, 7, 1, 1, 0, 0, 0, 0, 0], [0, 0, 1, 1, 16, 14, 6, 3, 6, 12, 8, 7, 7, 1, 1, 0, 0, 0, 0], [0, 0, 1, 1, 16, 15, 1, 0, 1, 7, 8, 8, 8, 8, 8, 1, 0, 0, 0], [0, 0, 1, 1, 16, 15, 1, 0, 1, 7, 7, 7, 7, 7, 8, 1, 1, 0, 0], [0, 0, 1, 1, 16, 15, 1, 0, 1, 1, 1, 1, 1, 7, 8, 7, 1, 1, 0], [0, 0, 1, 1, 16, 15, 1, 0, 0, 0, 0, 0, 1, 7, 8, 7, 7, 1, 1], [0, 0, 1, 1, 16, 15, 1, 1, 1, 1, 1, 0, 1, 7, 8, 7, 7, 1, 1], [0, 0, 1, 1, 16, 15, 15, 15, 15, 15, 1, 0, 1, 7, 8, 7, 1, 1, 0], [0, 0, 1, 1, 16, 16, 16, 16, 16, 15, 1, 0, 1, 7, 8, 7, 1, 0, 0], [0, 0, 1, 1, 1, 1, 1, 1, 16, 13, 4, 2, 4, 11, 8, 7, 1, 0, 0], [0, 0, 1, 1, 1, 1, 1, 1, 16, 16, 5, 5, 5, 8, 8, 7, 1, 0, 0], [0, 0, 0, 0, 0, 0, 1, 1, 15, 15, 10, 5, 5, 7, 7, 7, 1, 0, 0], [0, 0, 0, 0, 0, 0, 1, 1, 15, 15, 5, 5, 5, 7, 7, 7, 0, 1, 0], [0, 0, 0, 0, 0, 0, 1, 1, 15, 15, 1, 1, 1, 7, 7, 7, 0, 0, 1]];
} else if (jenisMaping == 4) {
mapping = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 5, 1, 1, 1, 1, 1], [5, 5, 9, 5, 3, 0, 0, 0, 0, 0, 0, -2, 4, 5, 1, 1, 1, 1, 1], [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8], [7, 7, 7, 7, 14, 12, 7, 7, 7, 7, 7, 7, 7, 11, 13, 7, 7, 7, 7], [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8], [1, 1, 1, 1, 1, 6, 5, 5, 5, 5, 5, 5, 5, 5, 10, 5, 5, 5, 1], [1, 1, 1, 1, 1, 6, -3, 0, 0, 0, 0, 0, 0, 2, 5, 5, 5, 5, 1], [1, 1, 1, 1, 1, 1, 1, 6, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]];
} else if (jenisMaping == 5) {
mapping = [[0, 0, 1, 1, 1, 15, 16, 15, 5, 5, 5, 8, 8, 7, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 15, 16, 15, 5, 5, 5, 8, 8, 7, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 15, 16, 15, 5, 5, 5, 8, 8, 7, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 15, 16, 15, 9, 5, 5, 8, 8, 7, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 15, 16, 16, 5, 5, 5, 8, 8, 7, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 15, 16, 14, 6, 3, 6, 12, 8, 7, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 15, 16, 15, 1, 0, 1, 7, 8, 7, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 15, 16, 15, 1, 0, 1, 7, 8, 7, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 15, 16, 15, 1, 0, 1, 7, 8, 7, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 15, 16, 15, 1, 0, 1, 7, 8, 7, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 15, 16, 15, 1, 0, 1, 7, 8, 7, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 15, 16, 15, 1, 0, 1, 7, 8, 7, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 15, 16, 15, 1, 0, 1, 7, 8, 7, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 15, 16, 13, 4, 2, 4, 11, 8, 7, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 15, 16, 16, 5, 5, 5, 8, 8, 7, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 15, 16, 16, 10, 5, 5, 8, 8, 7, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 15, 16, 16, 5, 5, 5, 8, 8, 7, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 15, 16, 16, 5, 5, 5, 8, 8, 7, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 15, 16, 16, 5, 5, 5, 8, 8, 7, 1, 1, 1, 1, 1]];
} else if (jenisMaping == 6) {
mapping = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 6, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 3, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 5, 5, 5, 8, 8, 8, 8, 1, 0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 5, 9, 5, 12, 7, 7, 7, 1, 0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 5, 5, 5, 8, 8, 8, 7, 1, 0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 14, -3, 0, 8, 7, 1, 0, 1, 4, 5, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 8, 7, 1, 0, 0, -2, 4, 5, 1, 1, 1], [1, 1, 1, 1, 1, 1, 6, 0, 8, 7, 1, 1, 1, 0, 13, 5, 1, 1, 1], [1, 1, 1, 1, 1, 1, 6, 0, 8, 7, 8, 8, 8, 8, 8, 8, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 8, 7, 7, 11, 8, 8, 8, 8, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 8, 8, 8, 8, 5, 10, 5, 5, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 5, 5, 5, 5, 5, 5, 5, 5, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 2, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 5, 5, 5, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]];
} else if (jenisMaping == 7) {
mapping = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 5, 5, 5, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 1, 1, 1], [1, 1, 1, 5, 9, 5, 12, 7, 7, 7, 7, 7, 7, 7, 7, 8, 1, 1, 1], [1, 1, 1, 5, 5, 5, 6, 8, 8, 8, 8, 8, 8, 8, 7, 8, 1, 1, 1], [1, 1, 1, 5, 3, 6, 5, 1, 1, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 14, 15, 15, 15, 15, 15, 15, 13, 5, 5, 5, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 4, 10, 5, 5, 1, 1], [1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 5, 5, 5, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]];
} else if (jenisMaping == 8) {
mapping = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 9, 5, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 5, 5, 5, 8, 8, 8, 8, 8, 8, 8, 8, 8, 1, 1, 1, 1, 1, 1], [1, 5, 3, 5, 12, 7, 7, 7, 7, 7, 7, 7, 8, 1, 1, 1, 1, 1, 1], [1, 14, 0, 0, 8, 8, 8, 8, 8, 8, 8, 7, 8, 1, 1, 1, 1, 1, 1], [1, 15, 1, 0, 1, 1, 6, 1, 1, 1, 8, 7, 8, 8, 8, 8, 8, 8, 1], [1, 15, 1, 0, 1, 1, 1, 1, 6, 1, 8, 7, 7, 7, 7, 7, 7, 8, 1], [1, 15, 1, 0, 0, 0, 1, 1, 1, 1, 8, 8, 8, 8, 8, 8, 7, 8, 1], [1, 15, 16, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 7, 8, 1], [1, 15, 15, 6, 1, 0, 0, 0, 1, 1, 1, 4, 1, 1, 1, 8, 7, 8, 1], [1, 16, 15, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 8, 7, 8, 1], [1, 16, 15, 1, 6, 1, 1, 0, 0, 0, 1, 1, 1, 4, 1, 8, 7, 8, 1], [1, 16, 15, 16, 16, 16, 16, 1, 1, 0, 1, 1, 1, 1, 1, 8, 7, 8, 1], [1, 16, 15, 15, 15, 15, 16, 4, 1, 0, 0, 0, 0, 1, 1, 8, 7, 8, 1], [1, 1, 1, 1, 1, 15, 16, 1, 1, 1, 1, 1, 0, 1, 1, 8, 7, 8, 1], [1, 1, 1, 1, 1, 15, 16, 1, 1, 1, 4, 1, 0, 0, 0, 1, 11, 1, 1], [1, 1, 1, 1, 1, 15, 16, 16, 16, 16, 16, 16, 16, 16, 0, 1, 5, 5, 5], [1, 1, 1, 1, 1, 15, 15, 15, 15, 15, 15, 15, 15, 13, 0, 2, 5, 10, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 5]];
} else if (jenisMaping == 9) {
mapping = [[1, 1, 1, 1, -3, 1, 1, 1, 8, 12, 8, 14, 9, 5, 3, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 8, 7, 8, 15, 5, 5, 0, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 8, 7, 8, 15, 5, 5, 0, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 8, 7, 8, 15, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 8, 7, 8, 15, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 8, 7, 8, 15, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 0, 6, 1, 1, 8, 7, 8, 15, 1, 4, 0, 1, 1, 1, 1], [1, 1, 1, 1, 0, 6, 1, 1, 8, 7, 8, 15, 1, 4, 0, 1, 1, 1, 1], [1, 1, 1, 1, 0, 6, 1, 1, 8, 7, 8, 15, 1, 4, 0, 1, 1, 1, 1], [1, 1, 1, 1, 0, 6, 1, 1, 8, 7, 8, 15, 1, 4, 0, 1, 1, 1, 1], [1, 1, 1, 1, 0, 6, 1, 1, 8, 7, 8, 15, 1, 4, 0, 1, 1, 1, 1], [1, 1, 1, 1, 0, 6, 1, 1, 8, 7, 8, 15, 1, 4, 0, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 8, 7, 8, 15, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 8, 7, 8, 15, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 8, 7, 8, 15, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 8, 7, 8, 15, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 2, 10, 5, 5, 8, 7, 8, 15, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 5, 5, 5, 5, 8, 7, 8, 15, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 5, 5, 5, 5, 8, 11, 8, 13, 1, 1, -2, 1, 1, 1, 1]];
} else if (jenisMaping == 10) {
mapping = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 8, 8, 8, 8, 8, 8, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 5, 5, 5, 12, 7, 7, 7, 7, 8, 8, 8, 8, 1, 1, 1], [1, 1, 1, 1, 5, 9, 5, 8, 8, 8, 8, 7, 7, 7, 7, 8, 1, 1, 1], [1, 1, 1, 1, 5, 5, 5, 1, 1, 1, 8, 8, 8, 8, 7, 8, 1, 1, 1], [1, 1, 1, 1, 1, 3, 0, 0, 0, 1, 1, 1, 1, 8, 7, 8, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 8, 7, 8, 1, 1, 1], [1, 1, 1, 1, 1, 14, 1, 1, 0, 1, 1, 1, 1, 8, 7, 8, 1, 1, 1], [1, 1, 1, 1, 1, 15, 15, 1, 0, 1, 15, 15, 15, 8, 7, 8, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 13, 8, 7, 8, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 2, 10, 5, 5, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 5, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 5, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]];
} else if (jenisMaping == 11) {
mapping = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 16, 16, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 5, 5, 5, 14, 16, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 5, 9, 5, 15, 15, 16, 16, 16, 16, 16, 16, 16, 1, 1, 1], [1, 1, 1, 5, 5, 5, 12, 16, 15, 15, 15, 15, 15, 15, 16, 16, 1, 1, 1], [1, 1, 1, 1, 3, 1, 7, 8, 4, 4, 4, 4, 4, 15, 16, 16, 1, 1, 1], [1, 1, 1, 1, 0, 1, 7, 8, 8, 8, 8, 8, 4, 15, 16, 16, 1, 1, 1], [1, 1, 1, 1, 0, 1, 7, 7, 7, 7, 7, 8, 4, 15, 16, 16, 1, 1, 1], [1, 1, 1, 1, 0, 1, 4, 4, 4, 4, 7, 8, 4, 15, 15, 13, 1, 1, 1], [1, 1, 1, 1, 0, 0, 0, 0, 4, 4, 7, 8, 1, 8, 8, 8, 8, 8, 8], [1, 1, 1, 1, 1, 1, 4, 0, 4, 4, -2, 1, 11, 5, 8, 8, 8, 8, 8], [1, 1, 1, 1, 1, 1, 4, 0, 4, 4, 4, 4, 4, 5, 10, 5, 5, 1, 1], [1, 1, 1, 1, 1, 1, 4, 0, 0, 0, -2, 1, 2, 5, 5, 5, 5, 1, 1], [1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 5, 5, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]];
}
}
function mulaiSaja() {
ambilKe = mapKe / 2;
myKata = new String(ambilKe);
adaKoma = false;
i = 0;
while (i <= myKata.length) {
if (myKata.substr(i, 1) == ".") {
adaKoma = true;
}
i++;
}
ztampak = new Array();
i = 0;
while (i <= 20) {
ztampak[i] = 0;
i++;
}
winit();
winit3();
winit5();
dataMusuh();
dataMusuh2();
dataMusuh3();
banyakMusuh = jenisPlayer.length - 1;
cekKekuatan();
buatKotak();
if ((mapKe == 26) || (mapKe == 25)) {
if (mapKe == 25) {
i = 1;
while (i <= jenisPlayer.length) {
_root["musuh" + i].enabled = false;
i++;
}
i = 3;
while (i <= 7) {
_root["musuh" + i]._visible = false;
i++;
}
} else if (mapKe == 26) {
i = 3;
while (i <= 11) {
_root["musuh" + i]._visible = false;
_root["musuh" + i].enabled = false;
i++;
}
}
zkalah = attachMovie("kalah_mc", "kalah_mc", 800009);
zkalah._x = 10;
zkalah._y = 10;
xmulai();
cekDialog();
} else {
munculTrans();
}
showData();
cekUbah2();
sudahNembak = false;
sudahJalan = false;
sudahChange = false;
sudahItems = false;
sudahMagic = false;
serangBalik = false;
gerakKanan = false;
gerakKiri = false;
gerakBawah = false;
gerakAtas = false;
buatTower = false;
buatTower2 = false;
zharga = new Array(0, 100, 150, 200, 500, 300, 325, 350, 1000, 450, 500, 550, 1500, 750, 800, 850, 2000, 1000, 1250, 1500, 2500, 2000, 2500, 3000, 5000, 4000, 4500, 5000, 6000, 7500, 8000, 9000, 11000, 10000, 12500, 15000, 20000, 15000, 17500, 20000, 22500, 25000, 27500, 30000, 32500, 35000, 37500, 40000, 45000, 50000, 55000, 60000, 75000, 80000, 85000, 90000, 125000, 170000, 200000, 250000, 150000);
namaMedan = new Array("", "CLASSIC", "STRAIGHT", "ZIGZAG", "CROSS", "NEAR", "REVERSE", "BORDER", "LONG ZIGZAG", "LONG CROSS", "NO TOWER, NO WORRY", "TOWER DEFENSE");
idSementara = setInterval(sai, 2000);
frame = attachMovie("frame_mc", "frame_mc", 900000);
special = attachMovie("special_mc", "special_mc", 900001);
frame.uang = zuang;
frame.namaArea = "AREA: " + namaMedan[jenisMaping];
special.scores = "SCORES: " + xscore;
frame.delay = "NEW: " + awalDelay;
if (jenisMaping == 4) {
special._x = 650;
special._y = 10;
} else {
special._x = 10;
special._y = 10;
}
special.onRollOver = function () {
over();
this.gotoAndStop(2);
};
special.onRollOut = function () {
this.gotoAndStop(1);
};
special.onRelease = theSpecialOne;
special._visible = false;
judulSpecial = new Array("", "ARROW RAIN", "SWORD BLAST", "METEOR RAIN", "GUN BLAST", "BOMB STRIKE", "GRANADE RAIN", "ELECTRIC SMASH", "SMOKE RAIN", "DYNAMITE BLAST", "MISILE LAUNCHER", "LASER BEAM", "SONIC SPLASH", "TESLA CANON", "BLUE RED ION", "ATOMIC BOMB");
kedelay = awalDelay;
idWaktu = setInterval(kurangWaktu, 1000);
frame._x = 0;
frame._y = 514;
buatFrame();
if (jenisMaen == "demo") {
frame.gotoAndStop(10);
idSementara2 = setInterval(sai2, 2000);
}
if (xlevel == "easy") {
jenisLevel = 1;
} else if (xlevel == "normal") {
jenisLevel = 2;
} else if (xlevel == "hard") {
jenisLevel = 4;
} else if (xlevel == "extreme") {
jenisLevel = 8;
}
zxmyStr2 = new String(xlevel);
frame.zxlevel = zxmyStr2.toUpperCase();
}
function sai() {
if (xpaused == false) {
clearInterval(idSementara);
if (jenisMaen == "maen") {
special._visible = true;
}
musuhSpecial = true;
special.info = judulSpecial[pasukanKe + 1];
special.menu_mc.gotoAndStop(pasukanKe + 1);
idAI = setInterval(kompAI, 100);
}
}
function sai2() {
if (xpaused == false) {
clearInterval(idSementara2);
jagoanSpecial = true;
idAI2 = setInterval(kompAI2, 100);
}
}
function kurangWaktu() {
if (xpaused == false) {
kedelay--;
if (kedelay <= 0) {
if (pasukanKe == 0) {
clearInterval(idWaktu);
i = 5;
while (i <= 8) {
frame[("box" + i) + "_btn"]._visible = true;
frame["harga" + i] = zharga[i];
i++;
}
zuang = zuang + 2500;
zuang2 = zuang2 + 2500;
buatTower = false;
buatTower2 = false;
pasukanKe++;
kedelay = awalDelay;
idWaktu = setInterval(kurangWaktu, 1000);
} else if (pasukanKe == 1) {
clearInterval(idWaktu);
i = 9;
while (i <= 12) {
frame[("box" + i) + "_btn"]._visible = true;
frame["harga" + i] = zharga[i];
i++;
}
zuang = zuang + 5000;
zuang2 = zuang2 + 5000;
buatTower = false;
buatTower2 = false;
pasukanKe++;
kedelay = awalDelay;
idWaktu = setInterval(kurangWaktu, 1000);
} else if (pasukanKe == 2) {
clearInterval(idWaktu);
i = 9;
while (i <= 12) {
frame[("box" + i) + "_btn"]._visible = true;
frame["harga" + i] = zharga[i];
i++;
}
zuang = zuang + 7500;
zuang2 = zuang2 + 7500;
buatTower = false;
buatTower2 = false;
pasukanKe++;
frame.next_mc._visible = true;
frame.next_mc.onRelease = nextPage;
frame.next_mc.onRollOver = function () {
over();
this.gotoAndStop(2);
};
frame.next_mc.onRollOut = function () {
this.gotoAndStop(1);
};
kedelay = awalDelay;
idWaktu = setInterval(kurangWaktu, 1000);
} else if (pasukanKe == 3) {
clearInterval(idWaktu);
zuang = zuang + 10000;
zuang2 = zuang2 + 10000;
buatTower = false;
buatTower2 = false;
pasukanKe++;
i = 13;
while (i <= 24) {
frame[("box" + i) + "_btn"]._visible = false;
frame["harga" + i] = "";
i++;
}
i = 13;
while (i <= 20) {
frame[("box" + i) + "_btn"]._visible = true;
frame["harga" + i] = zharga[i];
i++;
}
kedelay = awalDelay;
idWaktu = setInterval(kurangWaktu, 1000);
} else if (pasukanKe == 4) {
clearInterval(idWaktu);
zuang = zuang + 15000;
zuang2 = zuang2 + 15000;
buatTower = false;
buatTower2 = false;
pasukanKe++;
i = 13;
while (i <= 24) {
frame[("box" + i) + "_btn"]._visible = false;
frame["harga" + i] = "";
i++;
}
i = 13;
while (i <= 24) {
frame[("box" + i) + "_btn"]._visible = true;
frame["harga" + i] = zharga[i];
i++;
}
kedelay = awalDelay;
idWaktu = setInterval(kurangWaktu, 1000);
} else if (pasukanKe == 5) {
clearInterval(idWaktu);
zuang = zuang + 25000;
zuang2 = zuang2 + 25000;
buatTower = false;
buatTower2 = false;
pasukanKe++;
i = 25;
while (i <= 36) {
frame[("box" + i) + "_btn"]._visible = false;
frame["harga" + i] = "";
i++;
}
i = 25;
while (i <= 28) {
frame[("box" + i) + "_btn"]._visible = true;
frame["harga" + i] = zharga[i];
i++;
}
frame.next_mc._visible = true;
if (frame._currentframe == 1) {
frame.next_mc.onRelease = nextPage;
} else {
frame.next_mc.onRelease = nextPage2;
}
frame.next_mc.onRollOver = function () {
over();
this.gotoAndStop(2);
};
frame.next_mc.onRollOut = function () {
this.gotoAndStop(1);
};
kedelay = awalDelay;
idWaktu = setInterval(kurangWaktu, 1000);
} else if (pasukanKe == 6) {
clearInterval(idWaktu);
zuang = zuang + 50000;
zuang2 = zuang2 + 50000;
buatTower = false;
buatTower2 = false;
pasukanKe++;
i = 25;
while (i <= 36) {
frame[("box" + i) + "_btn"]._visible = false;
frame["harga" + i] = "";
i++;
}
i = 25;
while (i <= 32) {
frame[("box" + i) + "_btn"]._visible = true;
frame["harga" + i] = zharga[i];
i++;
}
kedelay = awalDelay;
idWaktu = setInterval(kurangWaktu, 1000);
} else if (pasukanKe == 7) {
clearInterval(idWaktu);
zuang = zuang + 75000;
zuang2 = zuang2 + 75000;
buatTower = false;
buatTower2 = false;
pasukanKe++;
i = 25;
while (i <= 36) {
frame[("box" + i) + "_btn"]._visible = false;
frame["harga" + i] = "";
i++;
}
i = 25;
while (i <= 36) {
frame[("box" + i) + "_btn"]._visible = true;
frame["harga" + i] = zharga[i];
i++;
}
kedelay = awalDelay;
idWaktu = setInterval(kurangWaktu, 1000);
} else if (pasukanKe == 8) {
clearInterval(idWaktu);
zuang = zuang + 125000;
zuang2 = zuang2 + 125000;
buatTower = false;
buatTower2 = false;
pasukanKe++;
i = 37;
while (i <= 48) {
frame[("box" + i) + "_btn"]._visible = false;
frame["harga" + i] = "";
i++;
}
i = 37;
while (i <= 40) {
frame[("box" + i) + "_btn"]._visible = true;
frame["harga" + i] = zharga[i];
i++;
}
frame.next_mc._visible = true;
if (frame._currentframe == 1) {
frame.next_mc.onRelease = nextPage;
} else if (frame._currentframe == 2) {
frame.next_mc.onRelease = nextPage2;
} else {
frame.next_mc.onRelease = nextPage3;
}
frame.next_mc.onRollOver = function () {
over();
this.gotoAndStop(2);
};
frame.next_mc.onRollOut = function () {
this.gotoAndStop(1);
};
kedelay = awalDelay;
idWaktu = setInterval(kurangWaktu, 1000);
} else if (pasukanKe == 9) {
clearInterval(idWaktu);
zuang = zuang + 150000;
zuang2 = zuang2 + 150000;
buatTower = false;
buatTower2 = false;
pasukanKe++;
i = 37;
while (i <= 48) {
frame[("box" + i) + "_btn"]._visible = false;
frame["harga" + i] = "";
i++;
}
i = 37;
while (i <= 44) {
frame[("box" + i) + "_btn"]._visible = true;
frame["harga" + i] = zharga[i];
i++;
}
kedelay = awalDelay;
idWaktu = setInterval(kurangWaktu, 1000);
} else if (pasukanKe == 10) {
clearInterval(idWaktu);
zuang = zuang + 200000;
zuang2 = zuang2 + 200000;
buatTower = false;
buatTower2 = false;
pasukanKe++;
i = 37;
while (i <= 48) {
frame[("box" + i) + "_btn"]._visible = false;
frame["harga" + i] = "";
i++;
}
i = 37;
while (i <= 48) {
frame[("box" + i) + "_btn"]._visible = true;
frame["harga" + i] = zharga[i];
i++;
}
kedelay = awalDelay;
idWaktu = setInterval(kurangWaktu, 1000);
} else if (pasukanKe == 11) {
clearInterval(idWaktu);
zuang = zuang + 500000;
zuang2 = zuang2 + 500000;
buatTower = false;
buatTower2 = false;
pasukanKe++;
i = 49;
while (i <= 60) {
frame[("box" + i) + "_btn"]._visible = false;
frame["harga" + i] = "";
i++;
}
i = 49;
while (i <= 52) {
frame[("box" + i) + "_btn"]._visible = true;
frame["harga" + i] = zharga[i];
i++;
}
frame.next_mc._visible = true;
if (frame._currentframe == 1) {
frame.next_mc.onRelease = nextPage;
} else if (frame._currentframe == 2) {
frame.next_mc.onRelease = nextPage2;
} else if (frame._currentframe == 3) {
frame.next_mc.onRelease = nextPage3;
} else {
frame.next_mc.onRelease = nextPage4;
}
frame.next_mc.onRollOver = function () {
over();
this.gotoAndStop(2);
};
frame.next_mc.onRollOut = function () {
this.gotoAndStop(1);
};
kedelay = awalDelay;
idWaktu = setInterval(kurangWaktu, 1000);
} else if (pasukanKe == 12) {
clearInterval(idWaktu);
zuang = zuang + 750000;
zuang2 = zuang2 + 750000;
buatTower = false;
buatTower2 = false;
pasukanKe++;
i = 49;
while (i <= 60) {
frame[("box" + i) + "_btn"]._visible = false;
frame["harga" + i] = "";
i++;
}
i = 49;
while (i <= 56) {
frame[("box" + i) + "_btn"]._visible = true;
frame["harga" + i] = zharga[i];
i++;
}
kedelay = awalDelay;
idWaktu = setInterval(kurangWaktu, 1000);
} else if (pasukanKe == 13) {
clearInterval(idWaktu);
zuang = zuang + 1000000;
zuang2 = zuang2 + 1000000;
buatTower = false;
buatTower2 = false;
pasukanKe++;
i = 49;
while (i <= 60) {
frame[("box" + i) + "_btn"]._visible = false;
frame["harga" + i] = "";
i++;
}
i = 49;
while (i <= 60) {
frame[("box" + i) + "_btn"]._visible = true;
frame["harga" + i] = zharga[i];
i++;
}
}
if (xlevel == "easy") {
zuang = zuang * 1.25;
zuang2 = zuang2 * 0.75;
} else if (xlevel == "normal") {
zuang = zuang * 1;
zuang2 = zuang2 * 1;
} else if (xlevel == "hard") {
zuang = zuang * 1;
zuang2 = zuang2 * 1;
} else if (xlevel == "extreme") {
zuang = zuang * 0.75;
zuang2 = zuang2 * 1.25;
}
if (((jenisMaping == 3) || (jenisMaping == 5)) || (jenisMaping == 6)) {
zuang = zuang * 1.5;
zuang2 = zuang2 * 1.5;
} else if (jenisMaping == 4) {
zuang = zuang * 2;
zuang2 = zuang2 * 2;
}
zuang = Math.ceil(zuang);
zuang2 = Math.ceil(zuang2);
special.enabled = true;
special.info = judulSpecial[pasukanKe + 1];
special.menu_mc.gotoAndStop(pasukanKe + 1);
special.gotoAndStop(1);
musuhSpecial = true;
jagoanSpecial = true;
}
frame.uang = zuang;
if (pasukanKe >= 14) {
frame.delay = "NO MORE NEW";
} else {
frame.delay = "NEW: " + kedelay;
}
}
}
function nextPage4() {
klik();
delete this.onRelease;
delete this.onRollOver;
delete this.onRollOut;
frame.gotoAndStop(5);
frame.next_mc._visible = false;
i = 1;
while (i <= 60) {
frame[("box" + i) + "_btn"]._visible = false;
frame["harga" + i] = "";
i++;
}
if (pasukanKe == 12) {
i = 49;
while (i <= 52) {
frame[("box" + i) + "_btn"]._visible = true;
frame["harga" + i] = zharga[i];
i++;
}
} else if (pasukanKe == 13) {
i = 49;
while (i <= 56) {
frame[("box" + i) + "_btn"]._visible = true;
frame["harga" + i] = zharga[i];
i++;
}
} else if (pasukanKe == 14) {
i = 49;
while (i <= 60) {
frame[("box" + i) + "_btn"]._visible = true;
frame["harga" + i] = zharga[i];
i++;
}
} else if (pasukanKe >= 15) {
i = 49;
while (i <= 60) {
frame[("box" + i) + "_btn"]._visible = true;
frame["harga" + i] = zharga[i];
i++;
}
}
frame_mc.prev_mc.gotoAndStop(1);
frame_mc.next_mc.gotoAndStop(1);
frame.prev_mc.onRollOver = function () {
over();
frame_mc.prev_mc.gotoAndStop(2);
};
frame.prev_mc.onRollOut = function () {
frame_mc.prev_mc.gotoAndStop(1);
};
frame.prev_mc.onRelease = function () {
klik();
i = 37;
while (i <= 48) {
frame[("box" + i) + "_btn"]._visible = true;
frame["harga" + i] = zharga[i];
i++;
}
nextPage3();
};
frame.box49_btn.onRollOver = function () {
over();
frame.select = "SNIPER HELICOPTER, LIVE: 1000, SPEED: 0.6, RANGE: 200, DAMAGE: 130" + _root.element49;
};
frame.box50_btn.onRollOver = function () {
over();
frame.select = "LASER HELICOPTER, LIVE: 1250, SPEED: 0.6, RANGE: 210, DAMAGE: 140" + _root.element50;
};
frame.box51_btn.onRollOver = function () {
over();
frame.select = "TESLA HELICOPTER, LIVE: 1500, SPEED: 0.6, RANGE: 220, DAMAGE: 150" + _root.element51;
};
frame.box52_btn.onRollOver = function () {
over();
frame.select = "TESLA TOWER, RANGE: 250, DAMAGE: 80" + _root.element52;
};
frame.box53_btn.onRollOver = function () {
over();
frame.select = "MISSILE AIR STRIKE, LIVE: 1750, SPEED: 0.7, RANGE: 200, DAMAGE: 160" + _root.element53;
};
frame.box54_btn.onRollOver = function () {
over();
frame.select = "SONIC AIR STRIKE, LIVE: 2000, SPEED: 0.7, RANGE: 220, DAMAGE: 170" + _root.element54;
};
frame.box55_btn.onRollOver = function () {
over();
frame.select = "BLUE ION AIR STRIKE, LIVE: 2250, SPEED: 0.7, RANGE: 230, DAMAGE: 180" + _root.element55;
};
frame.box56_btn.onRollOver = function () {
over();
frame.select = "RED ION TOWER, RANGE: 275, DAMAGE: 90" + _root.element56;
};
frame.box57_btn.onRollOver = function () {
over();
frame.select = "BOMB JET, LIVE: 3000, SPEED: 0.9, RANGE: 230, DAMAGE: 200" + _root.element57;
};
frame.box58_btn.onRollOver = function () {
over();
frame.select = "RED ION JET, LIVE: 4000, SPEED: 0.9, RANGE: 260, DAMAGE: 250" + _root.element58;
};
frame.box59_btn.onRollOver = function () {
over();
frame.select = "ATOMIC JET, LIVE: 5000, SPEED: 0.9, RANGE: 310, DAMAGE: 300" + _root.element59;
};
frame.box60_btn.onRollOver = function () {
over();
frame.select = "ATOMIC TOWER, RANGE: 300, DAMAGE: 100" + _root.element60;
};
frame.box49_btn.onRollOut = (frame.box50_btn.onRollOut = (frame.box51_btn.onRollOut = (frame.box52_btn.onRollOut = (frame.box53_btn.onRollOut = (frame.box54_btn.onRollOut = (frame.box55_btn.onRollOut = (frame.box56_btn.onRollOut = (frame.box57_btn.onRollOut = (frame.box58_btn.onRollOut = (frame.box59_btn.onRollOut = (frame.box60_btn.onRollOut = function () {
frame.select = "SELECT SOLDIER TO TRAIN OR TOWER TO BUILD:";
})))))))))));
frame.box49_btn.onRelease = function () {
balikTower();
removeMovieClip(tower_mc);
if (xjmlPasukan1 >= 40) {
frame.select = "CAN'T TRAIN. TOO MANY SOLDIERS";
} else if (zuang >= zharga[49]) {
zuang = zuang - zharga[49];
munculChara(49);
frame.uang = zuang;
frame.select = "SNIPER HELICOPTER ADDED";
} else {
frame.select = "CAN'T TRAIN. NOT ENOUGH MONEY";
}
};
frame.box50_btn.onRelease = function () {
balikTower();
removeMovieClip(tower_mc);
if (xjmlPasukan1 >= 40) {
frame.select = "CAN'T TRAIN. TOO MANY SOLDIERS";
} else if (zuang >= zharga[50]) {
zuang = zuang - zharga[50];
munculChara(50);
frame.uang = zuang;
frame.select = "LASER HELICOPTER ADDED";
} else {
frame.select = "CAN'T TRAIN. NOT ENOUGH MONEY";
}
};
frame.box51_btn.onRelease = function () {
balikTower();
removeMovieClip(tower_mc);
if (xjmlPasukan1 >= 40) {
frame.select = "CAN'T TRAIN. TOO MANY SOLDIERS";
} else if (zuang >= zharga[51]) {
zuang = zuang - zharga[51];
munculChara(51);
frame.uang = zuang;
frame.select = "TESLA HELICOPTER ADDED";
} else {
frame.select = "CAN'T TRAIN. NOT ENOUGH MONEY";
}
};
frame.box53_btn.onRelease = function () {
balikTower();
removeMovieClip(tower_mc);
if (xjmlPasukan1 >= 40) {
frame.select = "CAN'T TRAIN. TOO MANY SOLDIERS";
} else if (zuang >= zharga[53]) {
zuang = zuang - zharga[53];
munculChara(53);
frame.uang = zuang;
frame.select = "MISSILE AIR STRIKE ADDED";
} else {
frame.select = "CAN'T TRAIN. NOT ENOUGH MONEY";
}
};
frame.box54_btn.onRelease = function () {
balikTower();
removeMovieClip(tower_mc);
if (xjmlPasukan1 >= 40) {
frame.select = "CAN'T TRAIN. TOO MANY SOLDIERS";
} else if (zuang >= zharga[54]) {
zuang = zuang - zharga[54];
munculChara(54);
frame.uang = zuang;
frame.select = "SONIC AIR STRIKE ADDED";
} else {
frame.select = "CAN'T TRAIN. NOT ENOUGH MONEY";
}
};
frame.box55_btn.onRelease = function () {
balikTower();
removeMovieClip(tower_mc);
if (xjmlPasukan1 >= 40) {
frame.select = "CAN'T TRAIN. TOO MANY SOLDIERS";
} else if (zuang >= zharga[55]) {
zuang = zuang - zharga[55];
munculChara(55);
frame.uang = zuang;
frame.select = "BLUE ION AIR STRIKE, ADDED";
} else {
frame.select = "CAN'T TRAIN. NOT ENOUGH MONEY";
}
};
frame.box57_btn.onRelease = function () {
balikTower();
removeMovieClip(tower_mc);
if (xjmlPasukan1 >= 40) {
frame.select = "CAN'T TRAIN. TOO MANY SOLDIERS";
} else if (zuang >= zharga[57]) {
zuang = zuang - zharga[57];
munculChara(57);
frame.uang = zuang;
frame.select = "BOMB JET ADDED";
} else {
frame.select = "CAN'T TRAIN. NOT ENOUGH MONEY";
}
};
frame.box58_btn.onRelease = function () {
balikTower();
removeMovieClip(tower_mc);
if (xjmlPasukan1 >= 40) {
frame.select = "CAN'T TRAIN. TOO MANY SOLDIERS";
} else if (zuang >= zharga[58]) {
zuang = zuang - zharga[58];
munculChara(58);
frame.uang = zuang;
frame.select = "RED ION JET ADDED";
} else {
frame.select = "CAN'T TRAIN. NOT ENOUGH MONEY";
}
};
frame.box59_btn.onRelease = function () {
balikTower();
removeMovieClip(tower_mc);
if (xjmlPasukan1 >= 40) {
frame.select = "CAN'T TRAIN. TOO MANY SOLDIERS";
} else if (zuang >= zharga[59]) {
zuang = zuang - zharga[59];
munculChara(59);
frame.uang = zuang;
frame.select = "ATOMIC JET ADDED";
} else {
frame.select = "CAN'T TRAIN. NOT ENOUGH MONEY";
}
};
frame.box52_btn.onRelease = function () {
zambilKe = 52;
zbuatTower(zambilKe);
};
frame.box56_btn.onRelease = function () {
zambilKe = 56;
zbuatTower(zambilKe);
};
frame.box60_btn.onRelease = function () {
zambilKe = 60;
zbuatTower(zambilKe);
};
i = 1;
while (i <= 60) {
if (_root["sudahUpgrade" + i] == true) {
frame[("box" + i) + "_btn"].enabled = true;
frame[("box" + i) + "_btn"]._alpha = 100;
frame["xharga" + i]._alpha = 100;
} else {
frame[("box" + i) + "_btn"].enabled = false;
frame[("box" + i) + "_btn"]._alpha = 0;
frame["xharga" + i]._alpha = 0;
}
i++;
}
}
function nextPage3() {
klik();
delete this.onRelease;
delete this.onRollOver;
delete this.onRollOut;
frame.gotoAndStop(4);
frame.next_mc._visible = false;
i = 1;
while (i <= 48) {
frame[("box" + i) + "_btn"]._visible = false;
frame["harga" + i] = "";
i++;
}
if (pasukanKe == 9) {
i = 37;
while (i <= 40) {
frame[("box" + i) + "_btn"]._visible = true;
frame["harga" + i] = zharga[i];
i++;
}
} else if (pasukanKe == 10) {
i = 37;
while (i <= 44) {
frame[("box" + i) + "_btn"]._visible = true;
frame["harga" + i] = zharga[i];
i++;
}
} else if (pasukanKe == 11) {
i = 37;
while (i <= 48) {
frame[("box" + i) + "_btn"]._visible = true;
frame["harga" + i] = zharga[i];
i++;
}
} else if (pasukanKe >= 12) {
i = 37;
while (i <= 48) {
frame[("box" + i) + "_btn"]._visible = true;
frame["harga" + i] = zharga[i];
i++;
}
frame.next_mc._visible = true;
frame.next_mc.onRelease = nextPage4;
frame.next_mc.onRollOver = function () {
over();
this.gotoAndStop(2);
};
frame.next_mc.onRollOut = function () {
this.gotoAndStop(1);
};
}
frame_mc.prev_mc.gotoAndStop(1);
frame_mc.next_mc.gotoAndStop(1);
frame.prev_mc.onRollOver = function () {
over();
frame_mc.prev_mc.gotoAndStop(2);
};
frame.prev_mc.onRollOut = function () {
frame_mc.prev_mc.gotoAndStop(1);
};
frame.prev_mc.onRelease = function () {
klik();
i = 25;
while (i <= 36) {
frame[("box" + i) + "_btn"]._visible = true;
frame["harga" + i] = zharga[i];
i++;
}
nextPage2();
};
frame.box37_btn.onRollOver = function () {
over();
frame.select = "GUN SHIP, LIVE: 525, SPEED: 0.35, RANGE: 120, DAMAGE: 75" + _root.element37;
};
frame.box38_btn.onRollOver = function () {
over();
frame.select = "BOMB SHIP, LIVE: 550, SPEED: 0.35, RANGE: 80, DAMAGE: 80" + _root.element38;
};
frame.box39_btn.onRollOver = function () {
over();
frame.select = "MISSILE SHIP, LIVE: 575, SPEED: 0.35, RANGE: 200, DAMAGE: 85" + _root.element39;
};
frame.box40_btn.onRollOver = function () {
over();
frame.select = "LASER TOWER, RANGE: 210, DAMAGE: 60" + _root.element40;
};
frame.box41_btn.onRollOver = function () {
over();
frame.select = "SNIPER DESTROYER, LIVE: 600, SPEED: 0.45, RANGE: 200, DAMAGE: 90" + _root.element41;
};
frame.box42_btn.onRollOver = function () {
over();
frame.select = "DYNAMITE DESTROYER, LIVE: 625, SPEED: 0.45, RANGE: 100, DAMAGE: 95" + _root.element42;
};
frame.box43_btn.onRollOver = function () {
over();
frame.select = "LASER DESTROYER, LIVE: 650, SPEED: 0.45, RANGE: 210, DAMAGE: 100" + _root.element43;
};
frame.box44_btn.onRollOver = function () {
over();
frame.select = "SONIC TOWER, RANGE: 220, DAMAGE: 64" + _root.element44;
};
frame.box45_btn.onRollOver = function () {
over();
frame.select = "SMOKE SUBMARINE, LIVE: 700, SPEED: 0.65, RANGE: 60, DAMAGE: 105" + _root.element45;
};
frame.box46_btn.onRollOver = function () {
over();
frame.select = "SONIC SUBMARINE, LIVE: 750, SPEED: 0.65, RANGE: 230, DAMAGE: 110" + _root.element46;
};
frame.box47_btn.onRollOver = function () {
over();
frame.select = "BLUE ION SUBMARINE, LIVE: 800, SPEED: 0.65, RANGE: 250, DAMAGE: 120" + _root.element47;
};
frame.box48_btn.onRollOver = function () {
over();
frame.select = "BLUE ION TOWER, RANGE: 230, DAMAGE: 68" + _root.element48;
};
frame.box37_btn.onRollOut = (frame.box38_btn.onRollOut = (frame.box39_btn.onRollOut = (frame.box40_btn.onRollOut = (frame.box41_btn.onRollOut = (frame.box42_btn.onRollOut = (frame.box43_btn.onRollOut = (frame.box44_btn.onRollOut = (frame.box45_btn.onRollOut = (frame.box46_btn.onRollOut = (frame.box47_btn.onRollOut = (frame.box48_btn.onRollOut = function () {
frame.select = "SELECT SOLDIER TO TRAIN OR TOWER TO BUILD:";
})))))))))));
frame.box37_btn.onRelease = function () {
balikTower();
removeMovieClip(tower_mc);
if (xjmlPasukan1 >= 40) {
frame.select = "CAN'T TRAIN. TOO MANY SOLDIERS";
} else if (zuang >= zharga[37]) {
zuang = zuang - zharga[37];
munculChara(37);
frame.uang = zuang;
frame.select = "GUN SHIP ADDED";
} else {
frame.select = "CAN'T TRAIN. NOT ENOUGH MONEY";
}
};
frame.box38_btn.onRelease = function () {
balikTower();
removeMovieClip(tower_mc);
if (xjmlPasukan1 >= 40) {
frame.select = "CAN'T TRAIN. TOO MANY SOLDIERS";
} else if (zuang >= zharga[38]) {
zuang = zuang - zharga[38];
munculChara(38);
frame.uang = zuang;
frame.select = "BOMB SHIP ADDED";
} else {
frame.select = "CAN'T TRAIN. NOT ENOUGH MONEY";
}
};
frame.box39_btn.onRelease = function () {
balikTower();
removeMovieClip(tower_mc);
if (xjmlPasukan1 >= 40) {
frame.select = "CAN'T TRAIN. TOO MANY SOLDIERS";
} else if (zuang >= zharga[39]) {
zuang = zuang - zharga[39];
munculChara(39);
frame.uang = zuang;
frame.select = "MISSILE SHIP ADDED";
} else {
frame.select = "CAN'T TRAIN. NOT ENOUGH MONEY";
}
};
frame.box41_btn.onRelease = function () {
balikTower();
removeMovieClip(tower_mc);
if (xjmlPasukan1 >= 40) {
frame.select = "CAN'T TRAIN. TOO MANY SOLDIERS";
} else if (zuang >= zharga[41]) {
zuang = zuang - zharga[41];
munculChara(41);
frame.uang = zuang;
frame.select = "SNIPER DESTROYER ADDED";
} else {
frame.select = "CAN'T TRAIN. NOT ENOUGH MONEY";
}
};
frame.box42_btn.onRelease = function () {
balikTower();
removeMovieClip(tower_mc);
if (xjmlPasukan1 >= 40) {
frame.select = "CAN'T TRAIN. TOO MANY SOLDIERS";
} else if (zuang >= zharga[42]) {
zuang = zuang - zharga[42];
munculChara(42);
frame.uang = zuang;
frame.select = "DYNAMITE DESTROYER ADDED";
} else {
frame.select = "CAN'T TRAIN. NOT ENOUGH MONEY";
}
};
frame.box43_btn.onRelease = function () {
balikTower();
removeMovieClip(tower_mc);
if (xjmlPasukan1 >= 40) {
frame.select = "CAN'T TRAIN. TOO MANY SOLDIERS";
} else if (zuang >= zharga[43]) {
zuang = zuang - zharga[43];
munculChara(43);
frame.uang = zuang;
frame.select = "LASER DESTROYER, ADDED";
} else {
frame.select = "CAN'T TRAIN. NOT ENOUGH MONEY";
}
};
frame.box45_btn.onRelease = function () {
balikTower();
removeMovieClip(tower_mc);
if (xjmlPasukan1 >= 40) {
frame.select = "CAN'T TRAIN. TOO MANY SOLDIERS";
} else if (zuang >= zharga[45]) {
zuang = zuang - zharga[45];
munculChara(45);
frame.uang = zuang;
frame.select = "SMOKE SUBMARINE ADDED";
} else {
frame.select = "CAN'T TRAIN. NOT ENOUGH MONEY";
}
};
frame.box46_btn.onRelease = function () {
balikTower();
removeMovieClip(tower_mc);
if (xjmlPasukan1 >= 40) {
frame.select = "CAN'T TRAIN. TOO MANY SOLDIERS";
} else if (zuang >= zharga[46]) {
zuang = zuang - zharga[46];
munculChara(46);
frame.uang = zuang;
frame.select = "SONIC SUBMARINE ADDED";
} else {
frame.select = "CAN'T TRAIN. NOT ENOUGH MONEY";
}
};
frame.box47_btn.onRelease = function () {
balikTower();
removeMovieClip(tower_mc);
if (xjmlPasukan1 >= 40) {
frame.select = "CAN'T TRAIN. TOO MANY SOLDIERS";
} else if (zuang >= zharga[47]) {
zuang = zuang - zharga[47];
munculChara(47);
frame.uang = zuang;
frame.select = "BLUE ION SUBMARINE ADDED";
} else {
frame.select = "CAN'T TRAIN. NOT ENOUGH MONEY";
}
};
frame.box40_btn.onRelease = function () {
zambilKe = 40;
zbuatTower(zambilKe);
};
frame.box44_btn.onRelease = function () {
zambilKe = 44;
zbuatTower(zambilKe);
};
frame.box48_btn.onRelease = function () {
zambilKe = 48;
zbuatTower(zambilKe);
};
i = 1;
while (i <= 60) {
if (_root["sudahUpgrade" + i] == true) {
frame[("box" + i) + "_btn"].enabled = true;
frame[("box" + i) + "_btn"]._alpha = 100;
frame["xharga" + i]._alpha = 100;
} else {
frame[("box" + i) + "_btn"].enabled = false;
frame[("box" + i) + "_btn"]._alpha = 0;
frame["xharga" + i]._alpha = 0;
}
i++;
}
}
function nextPage2() {
klik();
delete this.onRelease;
delete this.onRollOver;
delete this.onRollOut;
frame.gotoAndStop(3);
frame.next_mc._visible = false;
i = 1;
while (i <= 24) {
frame[("box" + i) + "_btn"]._visible = false;
frame["harga" + i] = "";
i++;
}
i = 25;
while (i <= 36) {
frame[("box" + i) + "_btn"]._visible = false;
frame["harga" + i] = "";
i++;
}
if (pasukanKe == 6) {
i = 25;
while (i <= 28) {
frame[("box" + i) + "_btn"]._visible = true;
frame["harga" + i] = zharga[i];
i++;
}
} else if (pasukanKe == 7) {
i = 25;
while (i <= 32) {
frame[("box" + i) + "_btn"]._visible = true;
frame["harga" + i] = zharga[i];
i++;
}
} else if (pasukanKe == 8) {
i = 25;
while (i <= 36) {
frame[("box" + i) + "_btn"]._visible = true;
frame["harga" + i] = zharga[i];
i++;
}
} else if (pasukanKe >= 9) {
i = 25;
while (i <= 36) {
frame[("box" + i) + "_btn"]._visible = true;
frame["harga" + i] = zharga[i];
i++;
}
frame.next_mc._visible = true;
frame.next_mc.onRelease = nextPage3;
frame.next_mc.onRollOver = function () {
over();
this.gotoAndStop(2);
};
frame.next_mc.onRollOut = function () {
this.gotoAndStop(1);
};
}
frame_mc.prev_mc.gotoAndStop(1);
frame_mc.next_mc.gotoAndStop(1);
frame.prev_mc.onRollOver = function () {
over();
frame_mc.prev_mc.gotoAndStop(2);
};
frame.prev_mc.onRollOut = function () {
frame_mc.prev_mc.gotoAndStop(1);
};
frame.prev_mc.onRelease = function () {
klik();
i = 13;
while (i <= 24) {
frame[("box" + i) + "_btn"]._visible = true;
frame["harga" + i] = zharga[i];
i++;
}
nextPage();
};
frame.box25_btn.onRollOver = function () {
over();
frame.select = "GUN JEEP, LIVE: 200, SPEED: 0.35, RANGE: 120, DAMAGE: 40" + _root.element25;
};
frame.box26_btn.onRollOver = function () {
over();
frame.select = "GRANADE JEEP, LIVE: 225, SPEED: 0.35, RANGE: 150, DAMAGE: 43" + _root.element26;
};
frame.box27_btn.onRollOver = function () {
over();
frame.select = "ELECTRIC JEEP, LIVE: 250, SPEED: 0.35, RANGE: 160, DAMAGE: 45" + _root.element27;
};
frame.box28_btn.onRollOver = function () {
over();
frame.select = "GRANADE TOWER, RANGE: 180, DAMAGE: 28" + _root.element28;
};
frame.box29_btn.onRollOver = function () {
over();
frame.select = "BOMB TRUCK, LIVE: 350, SPEED: 0.35, RANGE: 45, DAMAGE: 50" + _root.element29;
};
frame.box30_btn.onRollOver = function () {
over();
frame.select = "SMOKE TRUCK, LIVE: 370, SPEED: 0.35, RANGE: 45, DAMAGE: 52" + _root.element30;
};
frame.box31_btn.onRollOver = function () {
over();
frame.select = "SNIPER TRUCK, LIVE: 400, SPEED: 0.35, RANGE: 170, DAMAGE: 55" + _root.element31;
};
frame.box32_btn.onRollOver = function () {
over();
frame.select = "BOMB TOWER, RANGE: 190, DAMAGE: 32" + _root.element32;
};
frame.box33_btn.onRollOver = function () {
over();
frame.select = "DYNAMITE TANK, LIVE: 460, SPEED: 0.35, RANGE: 60, DAMAGE: 60" + _root.element33;
};
frame.box34_btn.onRollOver = function () {
over();
frame.select = "MISSILE TANK, LIVE: 480, SPEED: 0.35, RANGE: 200, DAMAGE: 65" + _root.element34;
};
frame.box35_btn.onRollOver = function () {
over();
frame.select = "LASER TANK, LIVE: 500, SPEED: 0.35, RANGE: 210, DAMAGE: 70" + _root.element35;
};
frame.box36_btn.onRollOver = function () {
over();
frame.select = "MISSILE TOWER, RANGE: 200, DAMAGE: 36" + _root.element36;
};
frame.box25_btn.onRollOut = (frame.box26_btn.onRollOut = (frame.box27_btn.onRollOut = (frame.box28_btn.onRollOut = (frame.box29_btn.onRollOut = (frame.box30_btn.onRollOut = (frame.box31_btn.onRollOut = (frame.box32_btn.onRollOut = (frame.box33_btn.onRollOut = (frame.box34_btn.onRollOut = (frame.box35_btn.onRollOut = (frame.box36_btn.onRollOut = function () {
frame.select = "SELECT SOLDIER TO TRAIN OR TOWER TO BUILD:";
})))))))))));
frame.box25_btn.onRelease = function () {
balikTower();
removeMovieClip(tower_mc);
if (xjmlPasukan1 >= 40) {
frame.select = "CAN'T TRAIN. TOO MANY SOLDIERS";
} else if (zuang >= zharga[25]) {
zuang = zuang - zharga[25];
munculChara(25);
frame.uang = zuang;
frame.select = "GUN JEEP ADDED";
} else {
frame.select = "CAN'T TRAIN. NOT ENOUGH MONEY";
}
};
frame.box26_btn.onRelease = function () {
balikTower();
removeMovieClip(tower_mc);
if (xjmlPasukan1 >= 40) {
frame.select = "CAN'T TRAIN. TOO MANY SOLDIERS";
} else if (zuang >= zharga[26]) {
zuang = zuang - zharga[26];
munculChara(26);
frame.uang = zuang;
frame.select = "GRANADE JEEP ADDED";
} else {
frame.select = "CAN'T TRAIN. NOT ENOUGH MONEY";
}
};
frame.box27_btn.onRelease = function () {
balikTower();
removeMovieClip(tower_mc);
if (xjmlPasukan1 >= 40) {
frame.select = "CAN'T TRAIN. TOO MANY SOLDIERS";
} else if (zuang >= zharga[27]) {
zuang = zuang - zharga[27];
munculChara(27);
frame.uang = zuang;
frame.select = "ELECTRIC JEEP ADDED";
} else {
frame.select = "CAN'T TRAIN. NOT ENOUGH MONEY";
}
};
frame.box29_btn.onRelease = function () {
balikTower();
removeMovieClip(tower_mc);
if (xjmlPasukan1 >= 40) {
frame.select = "CAN'T TRAIN. TOO MANY SOLDIERS";
} else if (zuang >= zharga[29]) {
zuang = zuang - zharga[29];
munculChara(29);
frame.uang = zuang;
frame.select = "BOMB TRUCK ADDED";
} else {
frame.select = "CAN'T TRAIN. NOT ENOUGH MONEY";
}
};
frame.box30_btn.onRelease = function () {
balikTower();
removeMovieClip(tower_mc);
if (xjmlPasukan1 >= 40) {
frame.select = "CAN'T TRAIN. TOO MANY SOLDIERS";
} else if (zuang >= zharga[30]) {
zuang = zuang - zharga[30];
munculChara(30);
frame.uang = zuang;
frame.select = "SMOKE TRUCK ADDED";
} else {
frame.select = "CAN'T TRAIN. NOT ENOUGH MONEY";
}
};
frame.box31_btn.onRelease = function () {
balikTower();
removeMovieClip(tower_mc);
if (xjmlPasukan1 >= 40) {
frame.select = "CAN'T TRAIN. TOO MANY SOLDIERS";
} else if (zuang >= zharga[31]) {
zuang = zuang - zharga[31];
munculChara(31);
frame.uang = zuang;
frame.select = "SNIPER TRUCK, ADDED";
} else {
frame.select = "CAN'T TRAIN. NOT ENOUGH MONEY";
}
};
frame.box33_btn.onRelease = function () {
balikTower();
removeMovieClip(tower_mc);
if (xjmlPasukan1 >= 40) {
frame.select = "CAN'T TRAIN. TOO MANY SOLDIERS";
} else if (zuang >= zharga[33]) {
zuang = zuang - zharga[33];
munculChara(33);
frame.uang = zuang;
frame.select = "DYNAMITE TANK ADDED";
} else {
frame.select = "CAN'T TRAIN. NOT ENOUGH MONEY";
}
};
frame.box34_btn.onRelease = function () {
balikTower();
removeMovieClip(tower_mc);
if (xjmlPasukan1 >= 40) {
frame.select = "CAN'T TRAIN. TOO MANY SOLDIERS";
} else if (zuang >= zharga[34]) {
zuang = zuang - zharga[34];
munculChara(34);
frame.uang = zuang;
frame.select = "MISSILE TANK ADDED";
} else {
frame.select = "CAN'T TRAIN. NOT ENOUGH MONEY";
}
};
frame.box35_btn.onRelease = function () {
balikTower();
removeMovieClip(tower_mc);
if (xjmlPasukan1 >= 40) {
frame.select = "CAN'T TRAIN. TOO MANY SOLDIERS";
} else if (zuang >= zharga[35]) {
zuang = zuang - zharga[35];
munculChara(35);
frame.uang = zuang;
frame.select = "LASER TANK ADDED";
} else {
frame.select = "CAN'T TRAIN. NOT ENOUGH MONEY";
}
};
frame.box28_btn.onRelease = function () {
zambilKe = 28;
zbuatTower(zambilKe);
};
frame.box32_btn.onRelease = function () {
zambilKe = 32;
zbuatTower(zambilKe);
};
frame.box36_btn.onRelease = function () {
zambilKe = 36;
zbuatTower(zambilKe);
};
i = 1;
while (i <= 60) {
if (_root["sudahUpgrade" + i] == true) {
frame[("box" + i) + "_btn"].enabled = true;
frame[("box" + i) + "_btn"]._alpha = 100;
frame["xharga" + i]._alpha = 100;
} else {
frame[("box" + i) + "_btn"].enabled = false;
frame[("box" + i) + "_btn"]._alpha = 0;
frame["xharga" + i]._alpha = 0;
}
i++;
}
}
function nextPage() {
klik();
delete this.onRelease;
delete this.onRollOver;
delete this.onRollOut;
frame.gotoAndStop(2);
frame.next_mc._visible = false;
i = 1;
while (i <= 12) {
frame[("box" + i) + "_btn"]._visible = false;
frame["harga" + i] = "";
i++;
}
i = 13;
while (i <= 24) {
frame[("box" + i) + "_btn"]._visible = false;
frame["harga" + i] = "";
i++;
}
if (pasukanKe == 3) {
i = 13;
while (i <= 16) {
frame[("box" + i) + "_btn"]._visible = true;
frame["harga" + i] = zharga[i];
i++;
}
} else if (pasukanKe == 4) {
i = 13;
while (i <= 20) {
frame[("box" + i) + "_btn"]._visible = true;
frame["harga" + i] = zharga[i];
i++;
}
} else if (pasukanKe == 5) {
i = 13;
while (i <= 24) {
frame[("box" + i) + "_btn"]._visible = true;
frame["harga" + i] = zharga[i];
i++;
}
} else if (pasukanKe >= 6) {
i = 13;
while (i <= 24) {
frame[("box" + i) + "_btn"]._visible = true;
frame["harga" + i] = zharga[i];
i++;
}
frame.next_mc._visible = true;
frame.next_mc.onRelease = nextPage2;
frame.next_mc.onRollOver = function () {
over();
this.gotoAndStop(2);
};
frame.next_mc.onRollOut = function () {
this.gotoAndStop(1);
};
}
frame_mc.prev_mc.gotoAndStop(1);
frame_mc.next_mc.gotoAndStop(1);
frame.prev_mc.onRollOver = function () {
over();
frame_mc.prev_mc.gotoAndStop(2);
};
frame.prev_mc.onRollOut = function () {
frame_mc.prev_mc.gotoAndStop(1);
};
frame.prev_mc.onRelease = function () {
klik();
i = 1;
while (i <= 12) {
frame[("box" + i) + "_btn"]._visible = true;
frame["harga" + i] = zharga[i];
i++;
}
buatFrame();
};
frame.box13_btn.onRollOver = function () {
over();
frame.select = "RIFLEMAN, LIVE: 45, SPEED: 0.3, RANGE: 130, DAMAGE: 14" + _root.element13;
};
frame.box14_btn.onRollOver = function () {
over();
frame.select = "GRANADEMAN, LIVE: 50, SPEED: 0.35, RANGE: 140, DAMAGE: 16" + _root.element14;
};
frame.box15_btn.onRollOver = function () {
over();
frame.select = "CANONMAN, LIVE: 55, SPEED: 0.25, RANGE: 120, DAMAGE: 18" + _root.element15;
};
frame.box16_btn.onRollOver = function () {
over();
frame.select = "GUN TOWER, RANGE: 150, DAMAGE: 16" + _root.element16;
};
frame.box17_btn.onRollOver = function () {
over();
frame.select = "BOMBERMAN, LIVE: 60, SPEED: 0.6, RANGE: 65, DAMAGE: 20" + _root.element17;
};
frame.box18_btn.onRollOver = function () {
over();
frame.select = "DOUBLE BOMBERMEN, LIVE: 65, SPEED: 0.6, RANGE: 65, DAMAGE: 22" + _root.element18;
};
frame.box19_btn.onRollOver = function () {
over();
frame.select = "TRIPLE BOMBERMEN, LIVE: 70, SPEED: 0.6, RANGE: 65, DAMAGE: 25" + _root.element19;
};
frame.box20_btn.onRollOver = function () {
over();
frame.select = "CANON TOWER, RANGE: 160, DAMAGE: 20" + _root.element20;
};
frame.box21_btn.onRollOver = function () {
over();
frame.select = "MOTO, LIVE: 85, SPEED: 0.5, RANGE: 65, DAMAGE: 28" + _root.element21;
};
frame.box22_btn.onRollOver = function () {
over();
frame.select = "GUN MOTO, LIVE: 90, SPEED: 0.45, RANGE: 120, DAMAGE: 32" + _root.element22;
};
frame.box23_btn.onRollOver = function () {
over();
frame.select = "BOMB MOTO, LIVE: 100, SPEED: 0.4, RANGE: 65, DAMAGE: 34" + _root.element23;
};
frame.box24_btn.onRollOver = function () {
over();
frame.select = "ELECTRIC TOWER, RANGE: 170, DAMAGE: 24" + _root.element24;
};
frame.box13_btn.onRollOut = (frame.box14_btn.onRollOut = (frame.box15_btn.onRollOut = (frame.box16_btn.onRollOut = (frame.box17_btn.onRollOut = (frame.box18_btn.onRollOut = (frame.box19_btn.onRollOut = (frame.box20_btn.onRollOut = (frame.box21_btn.onRollOut = (frame.box22_btn.onRollOut = (frame.box23_btn.onRollOut = (frame.box24_btn.onRollOut = function () {
frame.select = "SELECT SOLDIER TO TRAIN OR TOWER TO BUILD:";
})))))))))));
frame.box13_btn.onRelease = function () {
balikTower();
removeMovieClip(tower_mc);
if (xjmlPasukan1 >= 40) {
frame.select = "CAN'T TRAIN. TOO MANY SOLDIERS";
} else if (zuang >= zharga[13]) {
zuang = zuang - zharga[13];
munculChara(13);
frame.uang = zuang;
frame.select = "RIFLEMAN ADDED";
} else {
frame.select = "CAN'T TRAIN. NOT ENOUGH MONEY";
}
};
frame.box14_btn.onRelease = function () {
balikTower();
removeMovieClip(tower_mc);
if (xjmlPasukan1 >= 40) {
frame.select = "CAN'T TRAIN. TOO MANY SOLDIERS";
} else if (zuang >= zharga[14]) {
zuang = zuang - zharga[14];
munculChara(14);
frame.uang = zuang;
frame.select = "GRANADEMAN ADDED";
} else {
frame.select = "CAN'T TRAIN. NOT ENOUGH MONEY";
}
};
frame.box15_btn.onRelease = function () {
balikTower();
removeMovieClip(tower_mc);
if (xjmlPasukan1 >= 40) {
frame.select = "CAN'T TRAIN. TOO MANY SOLDIERS";
} else if (zuang >= zharga[15]) {
zuang = zuang - zharga[15];
munculChara(15);
frame.uang = zuang;
frame.select = "CANONMAN ADDED";
} else {
frame.select = "CAN'T TRAIN. NOT ENOUGH MONEY";
}
};
frame.box17_btn.onRelease = function () {
balikTower();
removeMovieClip(tower_mc);
if (xjmlPasukan1 >= 40) {
frame.select = "CAN'T TRAIN. TOO MANY SOLDIERS";
} else if (zuang >= zharga[17]) {
zuang = zuang - zharga[17];
munculChara(17);
frame.uang = zuang;
frame.select = "BOMBERMAN ADDED";
} else {
frame.select = "CAN'T TRAIN. NOT ENOUGH MONEY";
}
};
frame.box18_btn.onRelease = function () {
balikTower();
removeMovieClip(tower_mc);
if (xjmlPasukan1 >= 40) {
frame.select = "CAN'T TRAIN. TOO MANY SOLDIERS";
} else if (zuang >= zharga[18]) {
zuang = zuang - zharga[18];
munculChara(18);
frame.uang = zuang;
frame.select = "DOUBLE BOMBERMEN ADDED";
} else {
frame.select = "CAN'T TRAIN. NOT ENOUGH MONEY";
}
};
frame.box19_btn.onRelease = function () {
balikTower();
removeMovieClip(tower_mc);
if (xjmlPasukan1 >= 40) {
frame.select = "CAN'T TRAIN. TOO MANY SOLDIERS";
} else if (zuang >= zharga[19]) {
zuang = zuang - zharga[19];
munculChara(19);
frame.uang = zuang;
frame.select = "TRIPLE BOMBERMEN ADDED";
} else {
frame.select = "CAN'T TRAIN. NOT ENOUGH MONEY";
}
};
frame.box21_btn.onRelease = function () {
balikTower();
removeMovieClip(tower_mc);
if (xjmlPasukan1 >= 40) {
frame.select = "CAN'T TRAIN. TOO MANY SOLDIERS";
} else if (zuang >= zharga[21]) {
zuang = zuang - zharga[21];
munculChara(21);
frame.uang = zuang;
frame.select = "MOTO ADDED";
} else {
frame.select = "CAN'T TRAIN. NOT ENOUGH MONEY";
}
};
frame.box22_btn.onRelease = function () {
balikTower();
removeMovieClip(tower_mc);
if (xjmlPasukan1 >= 40) {
frame.select = "CAN'T TRAIN. TOO MANY SOLDIERS";
} else if (zuang >= zharga[22]) {
zuang = zuang - zharga[22];
munculChara(22);
frame.uang = zuang;
frame.select = "GUN MOTO ADDED";
} else {
frame.select = "CAN'T TRAIN. NOT ENOUGH MONEY";
}
};
frame.box23_btn.onRelease = function () {
balikTower();
removeMovieClip(tower_mc);
if (xjmlPasukan1 >= 40) {
frame.select = "CAN'T TRAIN. TOO MANY SOLDIERS";
} else if (zuang >= zharga[23]) {
zuang = zuang - zharga[23];
munculChara(23);
frame.uang = zuang;
frame.select = "BOMB MOTO ADDED";
} else {
frame.select = "CAN'T TRAIN. NOT ENOUGH MONEY";
}
};
frame.box16_btn.onRelease = function () {
zambilKe = 16;
zbuatTower(zambilKe);
};
frame.box20_btn.onRelease = function () {
zambilKe = 20;
zbuatTower(zambilKe);
};
frame.box24_btn.onRelease = function () {
zambilKe = 24;
zbuatTower(zambilKe);
};
i = 1;
while (i <= 60) {
if (_root["sudahUpgrade" + i] == true) {
frame[("box" + i) + "_btn"].enabled = true;
frame[("box" + i) + "_btn"]._alpha = 100;
frame["xharga" + i]._alpha = 100;
} else {
frame[("box" + i) + "_btn"].enabled = false;
frame[("box" + i) + "_btn"]._alpha = 0;
frame["xharga" + i]._alpha = 0;
}
i++;
}
}
function buatFrame() {
frame.gotoAndStop(1);
frame.next_mc._visible = false;
i = 1;
while (i <= 12) {
frame[("box" + i) + "_btn"]._visible = false;
frame["harga" + i] = "";
i++;
}
if (pasukanKe == 0) {
i = 1;
while (i <= 4) {
frame[("box" + i) + "_btn"]._visible = true;
frame["harga" + i] = zharga[i];
i++;
}
} else if (pasukanKe == 1) {
i = 1;
while (i <= 8) {
frame[("box" + i) + "_btn"]._visible = true;
frame["harga" + i] = zharga[i];
i++;
}
} else if (pasukanKe == 2) {
i = 1;
while (i <= 12) {
frame[("box" + i) + "_btn"]._visible = true;
frame["harga" + i] = zharga[i];
i++;
}
} else if (pasukanKe >= 3) {
i = 1;
while (i <= 12) {
frame[("box" + i) + "_btn"]._visible = true;
frame["harga" + i] = zharga[i];
i++;
}
frame.next_mc._visible = true;
frame.next_mc.onRelease = nextPage;
frame.next_mc.onRollOver = function () {
over();
this.gotoAndStop(2);
};
frame.next_mc.onRollOut = function () {
this.gotoAndStop(1);
};
}
frame_mc.prev_mc.gotoAndStop(1);
frame_mc.next_mc.gotoAndStop(1);
frame.select = "SELECT SOLDIER TO TRAIN OR TOWER TO BUILD:";
frame.box1_btn.onRollOver = function () {
over();
frame.select = "ARCHER, LIVE: 8, SPEED: 0.25, RANGE: 105, DAMAGE: 1" + _root.element1;
};
frame.box2_btn.onRollOver = function () {
over();
frame.select = "SPEEDY ARCHER, LIVE: 10, SPEED: 0.4, RANGE: 110, DAMAGE: 1.5" + _root.element2;
};
frame.box3_btn.onRollOver = function () {
over();
frame.select = "FIRE ARCHER, LIVE: 12, SPEED: 0.3, RANGE: 100, DAMAGE: 2.5" + _root.element3;
};
frame.box4_btn.onRollOver = function () {
over();
frame.select = "WATER TOWER, RANGE: 120, DAMAGE: 4" + _root.element4;
};
frame.box5_btn.onRollOver = function () {
over();
frame.select = "SWORDMAN, LIVE: 24, SPEED: 0.2, RANGE: 55, DAMAGE: 3" + _root.element5;
};
frame.box6_btn.onRollOver = function () {
over();
frame.select = "FIRE SWORDMAN, LIVE: 26, SPEED: 0.35, RANGE: 65, DAMAGE: 3.5" + _root.element6;
};
frame.box7_btn.onRollOver = function () {
over();
frame.select = "ICE SWORDMAN, LIVE: 28, SPEED: 0.25, RANGE: 45, DAMAGE: 4" + _root.element7;
};
frame.box8_btn.onRollOver = function () {
over();
frame.select = "ICE TOWER, RANGE: 130, DAMAGE: 8" + _root.element8;
};
frame.box9_btn.onRollOver = function () {
over();
frame.select = "SWORD KNIGHT, LIVE: 35, SPEED: 0.4, RANGE: 40, DAMAGE: 4" + _root.element9;
};
frame.box10_btn.onRollOver = function () {
over();
frame.select = "ROCK KNIGHT, LIVE: 38, SPEED: 0.5, RANGE: 60, DAMAGE: 4.5" + _root.element10;
};
frame.box11_btn.onRollOver = function () {
over();
frame.select = "METEOR KNIGHT, LIVE: 40, SPEED: 0.45, RANGE: 80, DAMAGE: 5" + _root.element11;
};
frame.box12_btn.onRollOver = function () {
over();
frame.select = "ROCK TOWER, RANGE: 140, DAMAGE: 12" + _root.element12;
};
frame.box1_btn.onRollOut = (frame.box2_btn.onRollOut = (frame.box3_btn.onRollOut = (frame.box4_btn.onRollOut = (frame.box5_btn.onRollOut = (frame.box6_btn.onRollOut = (frame.box7_btn.onRollOut = (frame.box8_btn.onRollOut = (frame.box9_btn.onRollOut = (frame.box10_btn.onRollOut = (frame.box11_btn.onRollOut = (frame.box12_btn.onRollOut = function () {
frame.select = "SELECT SOLDIER TO TRAIN OR TOWER TO BUILD:";
})))))))))));
frame.box1_btn.onRelease = function () {
balikTower();
removeMovieClip(tower_mc);
if (xjmlPasukan1 >= 40) {
frame.select = "CAN'T TRAIN. TOO MANY SOLDIERS";
} else if (zuang >= zharga[1]) {
zuang = zuang - zharga[1];
munculChara(1);
frame.uang = zuang;
frame.select = "ARCHER ADDED";
} else {
frame.select = "CAN'T TRAIN. NOT ENOUGH MONEY";
}
};
frame.box2_btn.onRelease = function () {
balikTower();
removeMovieClip(tower_mc);
if (xjmlPasukan1 >= 40) {
frame.select = "CAN'T TRAIN. TOO MANY SOLDIERS";
} else if (zuang >= zharga[2]) {
zuang = zuang - zharga[2];
munculChara(2);
frame.uang = zuang;
frame.select = "SPEEDY ARCHER ADDED";
} else {
frame.select = "CAN'T TRAIN. NOT ENOUGH MONEY";
}
};
frame.box3_btn.onRelease = function () {
balikTower();
removeMovieClip(tower_mc);
if (xjmlPasukan1 >= 40) {
frame.select = "CAN'T TRAIN. TOO MANY SOLDIERS";
} else if (zuang >= zharga[3]) {
zuang = zuang - zharga[3];
munculChara(3);
frame.uang = zuang;
frame.select = "FIRE ARCHER ADDED";
} else {
frame.select = "CAN'T TRAIN. NOT ENOUGH MONEY";
}
};
frame.box5_btn.onRelease = function () {
balikTower();
removeMovieClip(tower_mc);
if (xjmlPasukan1 >= 40) {
frame.select = "CAN'T TRAIN. TOO MANY SOLDIERS";
} else if (zuang >= zharga[5]) {
zuang = zuang - zharga[5];
munculChara(5);
frame.uang = zuang;
frame.select = "SWORDMAN ADDED";
} else {
frame.select = "CAN'T TRAIN. NOT ENOUGH MONEY";
}
};
frame.box6_btn.onRelease = function () {
balikTower();
removeMovieClip(tower_mc);
if (xjmlPasukan1 >= 40) {
frame.select = "CAN'T TRAIN. TOO MANY SOLDIERS";
} else if (zuang >= zharga[6]) {
zuang = zuang - zharga[6];
munculChara(6);
frame.uang = zuang;
frame.select = "FIRE SWORDMAN ADDED";
} else {
frame.select = "CAN'T TRAIN. NOT ENOUGH MONEY";
}
};
frame.box7_btn.onRelease = function () {
balikTower();
removeMovieClip(tower_mc);
if (xjmlPasukan1 >= 40) {
frame.select = "CAN'T TRAIN. TOO MANY SOLDIERS";
} else if (zuang >= zharga[7]) {
zuang = zuang - zharga[7];
munculChara(7);
frame.uang = zuang;
frame.select = "ICE SWORDMAN ADDED";
} else {
frame.select = "CAN'T TRAIN. NOT ENOUGH MONEY";
}
};
frame.box9_btn.onRelease = function () {
balikTower();
removeMovieClip(tower_mc);
if (xjmlPasukan1 >= 40) {
frame.select = "CAN'T TRAIN. TOO MANY SOLDIERS";
} else if (zuang >= zharga[9]) {
zuang = zuang - zharga[9];
munculChara(9);
frame.uang = zuang;
frame.select = "SWORD KNIGHT ADDED";
} else {
frame.select = "CAN'T TRAIN. NOT ENOUGH MONEY";
}
};
frame.box10_btn.onRelease = function () {
balikTower();
removeMovieClip(tower_mc);
if (xjmlPasukan1 >= 40) {
frame.select = "CAN'T TRAIN. TOO MANY SOLDIERS";
} else if (zuang >= zharga[10]) {
zuang = zuang - zharga[10];
munculChara(10);
frame.uang = zuang;
frame.select = "ROCK KNIGHT ADDED";
} else {
frame.select = "CAN'T TRAIN. NOT ENOUGH MONEY";
}
};
frame.box11_btn.onRelease = function () {
balikTower();
removeMovieClip(tower_mc);
if (xjmlPasukan1 >= 40) {
frame.select = "CAN'T TRAIN. TOO MANY SOLDIERS";
} else if (zuang >= zharga[11]) {
zuang = zuang - zharga[11];
munculChara(11);
frame.uang = zuang;
frame.select = "METEOR KNIGHT ADDED";
} else {
frame.select = "CAN'T TRAIN. NOT ENOUGH MONEY";
}
};
frame.box4_btn.onRelease = function () {
zambilKe = 4;
zbuatTower(zambilKe);
};
frame.box8_btn.onRelease = function () {
zambilKe = 8;
zbuatTower(zambilKe);
};
frame.box12_btn.onRelease = function () {
zambilKe = 12;
zbuatTower(zambilKe);
};
i = 1;
while (i <= 60) {
if (_root["sudahUpgrade" + i] == true) {
frame[("box" + i) + "_btn"].enabled = true;
frame[("box" + i) + "_btn"]._alpha = 100;
frame["xharga" + i]._alpha = 100;
} else {
frame[("box" + i) + "_btn"].enabled = false;
frame[("box" + i) + "_btn"]._alpha = 0;
frame["xharga" + i]._alpha = 0;
}
i++;
}
}
function zbuatTower(qindi) {
if (tower_mc == undefined) {
if (zuang >= zharga[qindi]) {
klik();
if (qindi == 4) {
tower = attachMovie("tower1_mc", "tower_mc", 990000);
} else if (qindi == 8) {
tower = attachMovie("tower2_mc", "tower_mc", 990000);
} else if (qindi == 12) {
tower = attachMovie("tower3_mc", "tower_mc", 990000);
} else if (qindi == 16) {
tower = attachMovie("tower4_mc", "tower_mc", 990000);
} else if (qindi == 20) {
tower = attachMovie("tower5_mc", "tower_mc", 990000);
} else if (qindi == 24) {
tower = attachMovie("tower6_mc", "tower_mc", 990000);
} else if (qindi == 28) {
tower = attachMovie("tower7_mc", "tower_mc", 990000);
} else if (qindi == 32) {
tower = attachMovie("tower8_mc", "tower_mc", 990000);
} else if (qindi == 36) {
tower = attachMovie("tower9_mc", "tower_mc", 990000);
} else if (qindi == 40) {
tower = attachMovie("tower10_mc", "tower_mc", 990000);
} else if (qindi == 44) {
tower = attachMovie("tower11_mc", "tower_mc", 990000);
} else if (qindi == 48) {
tower = attachMovie("tower12_mc", "tower_mc", 990000);
} else if (qindi == 52) {
tower = attachMovie("tower13_mc", "tower_mc", 990000);
} else if (qindi == 56) {
tower = attachMovie("tower14_mc", "tower_mc", 990000);
} else if (qindi == 60) {
tower = attachMovie("tower15_mc", "tower_mc", 990000);
}
tower._xscale = 120;
tower._yscale = 120;
tower._x = -500;
tower._y = -500;
startDrag (tower, true);
i = 0;
while (i <= panjang) {
j = 0;
while (j <= lebar) {
if (mapping[j][i] == 4) {
ubahDalam("j", "i", "dalam");
namaBaru = "rumput_mc" + dalam;
namaBaru2 = "pohon_mc" + dalam;
bisaKlikGak = false;
if (_root[namaBaru2].jenis == "pohon") {
_root[namaBaru2]._visible = false;
_root[namaBaru].gotoAndStop(2);
bisaKlikGak = true;
} else if (_root[namaBaru2].jenisSen != qindi) {
_root[namaBaru2]._visible = false;
_root[namaBaru].gotoAndStop(2);
bisaKlikGak = true;
}
if (bisaKlikGak == true) {
_root[namaBaru].onRollOver = function () {
over();
};
_root[namaBaru].onRelease = function () {
backBangun();
delete _root[namaBaru].onRelease;
removeMovieClip(tower_mc);
myStr = new String(this);
indiJ = Number(myStr.substr(myStr.length - 4, 2));
indiI = Number(myStr.substr(myStr.length - 2, 2));
ubahDalam("indiJ", "indiI", "dalam2");
namaBaru2 = "pohon_mc" + dalam2;
xnama = "pohon_mc" + dalam2;
xdalam = _root["pohon_mc" + dalam2].getDepth();
posX = this._x + 50;
posY = this._y;
if (qindi == 4) {
towerBaru = attachMovie("tower1_mc", xnama, xdalam);
} else if (qindi == 8) {
towerBaru = attachMovie("tower2_mc", xnama, xdalam);
} else if (qindi == 12) {
towerBaru = attachMovie("tower3_mc", xnama, xdalam);
} else if (qindi == 16) {
towerBaru = attachMovie("tower4_mc", xnama, xdalam);
} else if (qindi == 20) {
towerBaru = attachMovie("tower5_mc", xnama, xdalam);
} else if (qindi == 24) {
towerBaru = attachMovie("tower6_mc", xnama, xdalam);
} else if (qindi == 28) {
towerBaru = attachMovie("tower7_mc", xnama, xdalam);
} else if (qindi == 32) {
towerBaru = attachMovie("tower8_mc", xnama, xdalam);
} else if (qindi == 36) {
towerBaru = attachMovie("tower9_mc", xnama, xdalam);
} else if (qindi == 40) {
towerBaru = attachMovie("tower10_mc", xnama, xdalam);
} else if (qindi == 44) {
towerBaru = attachMovie("tower11_mc", xnama, xdalam);
} else if (qindi == 48) {
towerBaru = attachMovie("tower12_mc", xnama, xdalam);
} else if (qindi == 52) {
towerBaru = attachMovie("tower13_mc", xnama, xdalam);
} else if (qindi == 56) {
towerBaru = attachMovie("tower14_mc", xnama, xdalam);
} else if (qindi == 60) {
towerBaru = attachMovie("tower15_mc", xnama, xdalam);
}
towerBaru._x = posX;
towerBaru._y = posY;
towerBaru._xscale = 200;
towerBaru._yscale = 200;
if (qindi == 4) {
towerBaru.jarak = 120;
towerBaru.awal = 30;
towerBaru.delay = 30;
frame.select = "WATER TOWER ADDED";
} else if (qindi == 8) {
towerBaru.jarak = 130;
towerBaru.awal = 25;
towerBaru.delay = 25;
frame.select = "ICE TOWER ADDED";
} else if (qindi == 12) {
towerBaru.jarak = 140;
towerBaru.awal = 25;
towerBaru.delay = 25;
frame.select = "ROCK TOWER ADDED";
} else if (qindi == 16) {
towerBaru.jarak = 150;
towerBaru.awal = 25;
towerBaru.delay = 25;
frame.select = "GUN TOWER ADDED";
} else if (qindi == 20) {
towerBaru.jarak = 160;
towerBaru.awal = 25;
towerBaru.delay = 25;
frame.select = "CANON TOWER ADDED";
} else if (qindi == 24) {
towerBaru.jarak = 170;
towerBaru.awal = 25;
towerBaru.delay = 25;
frame.select = "ELECTRIC TOWER ADDED";
} else if (qindi == 28) {
towerBaru.jarak = 180;
towerBaru.awal = 25;
towerBaru.delay = 25;
frame.select = "GRANADE TOWER ADDED";
} else if (qindi == 32) {
towerBaru.jarak = 190;
towerBaru.awal = 25;
towerBaru.delay = 25;
frame.select = "BOMB TOWER ADDED";
} else if (qindi == 36) {
towerBaru.jarak = 200;
towerBaru.awal = 20;
towerBaru.delay = 20;
frame.select = "MISSILE TOWER ADDED";
} else if (qindi == 40) {
towerBaru.jarak = 210;
towerBaru.awal = 25;
towerBaru.delay = 25;
frame.select = "LASER TOWER ADDED";
} else if (qindi == 44) {
towerBaru.jarak = 220;
towerBaru.awal = 20;
towerBaru.delay = 20;
frame.select = "SONIC TOWER ADDED";
} else if (qindi == 48) {
towerBaru.jarak = 230;
towerBaru.awal = 15;
towerBaru.delay = 15;
frame.select = "BLUE ION TOWER ADDED";
} else if (qindi == 52) {
towerBaru.jarak = 250;
towerBaru.awal = 15;
towerBaru.delay = 15;
frame.select = "TESLA TOWER ADDED";
} else if (qindi == 56) {
towerBaru.jarak = 275;
towerBaru.awal = 15;
towerBaru.delay = 15;
frame.select = "RED ION TOWER ADDED";
} else if (qindi == 60) {
towerBaru.jarak = 300;
towerBaru.awal = 15;
towerBaru.delay = 15;
frame.select = "ATOMIC TOWER ADDED";
}
towerBaru.jenisSen = qindi;
towerBaru.jenis = "tower";
towerBaru.onEnterFrame = enterTower;
balikTower();
zuang = zuang - zharga[qindi];
frame.uang = zuang;
};
}
}
j++;
}
i++;
}
} else {
frame.select = "CAN'T BUILD. NOT ENOUGH MONEY";
balikTower();
removeMovieClip(tower_mc);
}
} else {
balikTower();
removeMovieClip(tower_mc);
}
}
function balikTower() {
i = 0;
while (i <= panjang) {
j = 0;
while (j <= lebar) {
ubahDalam("j", "i", "dalam");
namaBaru = "rumput_mc" + dalam;
namaBaru2 = "pohon_mc" + dalam;
_root[namaBaru].gotoAndStop(1);
delete _root[namaBaru].onRelease;
delete _root[namaBaru].onRollOver;
if ((mapping[j][i] == 1) || (mapping[j][i] == 4)) {
if ((_root[namaBaru2].jenis == "pohon") && (mapping[j][i] == 4)) {
_root[namaBaru2]._visible = true;
} else if ((_root[namaBaru2].jenis == "tower") && (mapping[j][i] == 4)) {
_root[namaBaru2]._visible = true;
}
} else if (((mapping[j][i] != 6) && (mapping[j][i] != 9)) && (mapping[j][i] != 10)) {
_root[namaBaru2]._visible = false;
}
j++;
}
i++;
}
}
function enterTower() {
if (xpaused == false) {
xdiSerang1 = musuhKe[ygSerang1];
this.awal++;
if ((xdiSerang1 != undefined) && (xdiSerang1 != null)) {
if (_root["archer" + xdiSerang1] != null) {
if (_root["archer" + xdiSerang1].masihHidup == true) {
this.xJarak = Math.sqrt(Math.pow(this._x - _root["archer" + xdiSerang1]._x, 2) + Math.pow(this._y - _root["archer" + xdiSerang1]._y, 2));
} else {
this.xJarak = 999;
}
} else {
this.xJarak = 999;
}
if (this.xJarak > this.jarak) {
xdiSerang1 = arrayMusuh[random(arrayMusuh.length)];
if (_root["archer" + xdiSerang1] != null) {
if (_root["archer" + xdiSerang1].masihHidup == true) {
this.xJarak = Math.sqrt(Math.pow(this._x - _root["archer" + xdiSerang1]._x, 2) + Math.pow(this._y - _root["archer" + xdiSerang1]._y, 2));
} else {
this.xJarak = 999;
}
} else {
this.xJarak = 999;
}
}
if (this.xJarak <= this.jarak) {
if (this.awal >= this.delay) {
this.awal = 0;
if (this.jenisSen == 4) {
panah = attachMovie("water_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 6;
panah.damage = 4;
backAir();
} else if (this.jenisSen == 8) {
panah = attachMovie("es_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 4;
panah.damage = 8;
backSalju();
} else if (this.jenisSen == 12) {
panah = attachMovie("batu_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 4;
panah.damage = 12;
backBatu();
} else if (this.jenisSen == 16) {
panah = attachMovie("gun_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 12;
panah.damage = 16;
backGun();
} else if (this.jenisSen == 20) {
panah = attachMovie("canon_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 8;
panah.damage = 20;
backCanon();
} else if (this.jenisSen == 24) {
panah = attachMovie("listrik_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 16;
panah.damage = 24;
backListrik();
} else if (this.jenisSen == 28) {
panah = attachMovie("granat_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 12;
panah.damage = 28;
backGranat();
} else if (this.jenisSen == 32) {
panah = attachMovie("bomb_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 14;
panah.damage = 32;
backBomb();
} else if (this.jenisSen == 36) {
panah = attachMovie("misil_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 20;
panah.damage = 36;
backMisil();
} else if (this.jenisSen == 40) {
panah = attachMovie("laser_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 25;
panah.damage = 60;
backLaser();
} else if (this.jenisSen == 44) {
panah = attachMovie("sonic_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 28;
panah.damage = 64;
backSonic();
} else if (this.jenisSen == 48) {
panah = attachMovie("ion_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 20;
panah.damage = 68;
backIon1();
} else if (this.jenisSen == 52) {
panah = attachMovie("tesla_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 20;
panah.damage = 80;
backListrik();
} else if (this.jenisSen == 56) {
panah = attachMovie("ion2_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 20;
panah.damage = 90;
backIon2();
} else if (this.jenisSen == 60) {
panah = attachMovie("atom_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 20;
panah.damage = 100;
backBomb2();
}
panah.damage = panah.damage * 0.5;
panah.jenisPasukan = "tower";
panah.jenisSen = this.jenisSen;
panah._x = this._x + 15;
panah._y = this._y + 15;
panah._xscale = 20;
panah._yscale = 20;
panah.xtujuX = _root["archer" + xdiSerang1]._x + 15;
panah.xtujuY = _root["archer" + xdiSerang1]._y + random(31);
panah.tujuan = xdiSerang1;
x1 = panah.xtujuX - panah._x;
y1 = panah.xtujuY - panah._y;
sudutPel = 57.2957795130823 * Math.atan(y1 / x1);
if (((sudutPel >= -90) && (sudutPel <= 90)) && (x1 >= 0)) {
rot = sudutPel;
} else {
rot = sudutPel - 180;
}
panah._rotation = (rot + random(21)) - 10;
panah.onEnterFrame = enterPanah;
panahKe++;
if (panahKe >= 121000) {
panahKe = 120000 /* 0x01D4C0 */;
}
}
}
}
}
}
function ambilDekat1(qindi) {
wjarakYg = new Array();
wambilKeJ = new Array();
wambilKeI = new Array();
wjarakKe = 0;
wambil = new Array();
i = ygSerang1 - 5;
while (i <= (pasKe + 5)) {
pasukan = _root["archer" + i];
if ((pasukan != undefined) && (pasukan != null)) {
if ((pasukan.jenis == 2) && (pasukan.masihHidup == true)) {
wjarakYg[wjarakKe] = Math.sqrt(Math.pow(pasukan._x - qindi._x, 2) + Math.pow(pasukan._y - qindi._y, 2));
wambil[wjarakKe] = i;
wjarakKe++;
}
}
i++;
}
i = 0;
while (i <= (wjarakKe - 1)) {
j = i + 1;
while (j <= (wjarakKe - 1)) {
if (wjarakYg[i] > wjarakYg[j]) {
wxtemp = wjarakYg[i];
wjarakYg[i] = wjarakYg[j];
wjarakYg[j] = wxtemp;
wytemp = i;
wambil[i] = wambil[j];
wambil[j] = wytemp;
}
j++;
}
i++;
}
temenKe1 = wambil[0];
}
function ambilDekat2(qindi) {
wjarakYg = new Array();
wambilKeJ = new Array();
wambilKeI = new Array();
wjarakKe = 0;
wambil = new Array();
i = ygSerang2 - 5;
while (i <= (pasKe + 5)) {
pasukan = _root["archer" + i];
if ((pasukan != undefined) && (pasukan != null)) {
if ((pasukan.jenis == 1) && (pasukan.masihHidup == true)) {
wjarakYg[wjarakKe] = Math.sqrt(Math.pow(pasukan._x - qindi._x, 2) + Math.pow(pasukan._y - qindi._y, 2));
wambil[wjarakKe] = i;
wjarakKe++;
}
}
i++;
}
i = 0;
while (i <= (wjarakKe - 1)) {
j = i + 1;
while (j <= (wjarakKe - 1)) {
if (wjarakYg[i] > wjarakYg[j]) {
wxtemp = wjarakYg[i];
wjarakYg[i] = wjarakYg[j];
wjarakYg[j] = wxtemp;
wytemp = i;
wambil[i] = wambil[j];
wambil[j] = wytemp;
}
j++;
}
i++;
}
temenKe2 = wambil[0];
}
function enterTower2() {
if (xpaused == false) {
xdiSerang2 = jagoanKe[ygSerang2];
this.awal++;
if ((xdiSerang2 != undefined) && (xdiSerang2 != null)) {
if (_root["archer" + xdiSerang2] != null) {
if (_root["archer" + xdiSerang2].masihHidup == true) {
this.xJarak = Math.sqrt(Math.pow(this._x - _root["archer" + xdiSerang2]._x, 2) + Math.pow(this._y - _root["archer" + xdiSerang2]._y, 2));
} else {
this.xJarak = 999;
}
} else {
this.xJarak = 999;
}
if (this.xJarak > this.jarak) {
xdiSerang2 = arrayJagoan[random(arrayJagoan.length)];
if (_root["archer" + xdiSerang2] != null) {
if (_root["archer" + xdiSerang2].masihHidup == true) {
this.xJarak = Math.sqrt(Math.pow(this._x - _root["archer" + xdiSerang2]._x, 2) + Math.pow(this._y - _root["archer" + xdiSerang2]._y, 2));
} else {
this.xJarak = 999;
}
} else {
this.xJarak = 999;
}
}
if (this.xJarak <= this.jarak) {
if (this.awal >= this.delay) {
this.awal = 0;
if (this.jenisSen == 4) {
panah = attachMovie("water_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 6;
panah.damage = 4;
backAir();
} else if (this.jenisSen == 8) {
panah = attachMovie("es_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 4;
panah.damage = 8;
backSalju();
} else if (this.jenisSen == 12) {
panah = attachMovie("batu_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 4;
panah.damage = 12;
backBatu();
} else if (this.jenisSen == 16) {
panah = attachMovie("gun_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 12;
panah.damage = 16;
backGun();
} else if (this.jenisSen == 20) {
panah = attachMovie("canon_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 8;
panah.damage = 20;
backCanon();
} else if (this.jenisSen == 24) {
panah = attachMovie("listrik_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 16;
panah.damage = 24;
backListrik();
} else if (this.jenisSen == 28) {
panah = attachMovie("granat_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 12;
panah.damage = 28;
backGranat();
} else if (this.jenisSen == 32) {
panah = attachMovie("bomb_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 14;
panah.damage = 32;
backBomb();
} else if (this.jenisSen == 36) {
panah = attachMovie("misil_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 20;
panah.damage = 36;
backMisil();
} else if (this.jenisSen == 40) {
panah = attachMovie("laser_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 25;
panah.damage = 60;
backLaser();
} else if (this.jenisSen == 44) {
panah = attachMovie("sonic_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 28;
panah.damage = 64;
backSonic();
} else if (this.jenisSen == 48) {
panah = attachMovie("ion_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 20;
panah.damage = 68;
backIon1();
} else if (this.jenisSen == 52) {
panah = attachMovie("tesla_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 20;
panah.damage = 80;
backListrik();
} else if (this.jenisSen == 56) {
panah = attachMovie("ion2_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 20;
panah.damage = 90;
backIon2();
} else if (this.jenisSen == 60) {
panah = attachMovie("atom_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 20;
panah.damage = 100;
backBomb2();
}
if (xlevel == "easy") {
panah.damage = panah.damage * 0.2;
panah.speed = panah.speed * 0.8;
} else if (xlevel == "normal") {
panah.damage = panah.damage * 0.3;
panah.speed = panah.speed * 1;
} else if (xlevel == "hard") {
panah.damage = panah.damage * 1.2;
panah.speed = panah.speed * 1.2;
} else if (xlevel == "extreme") {
panah.damage = panah.damage * 1.6;
panah.speed = panah.speed * 1.6;
}
panah.damage = panah.damage * 0.5;
panah.jenisPasukan = "tower";
panah.jenisSen = this.jenisSen;
panah._x = this._x + 15;
panah._y = this._y + 15;
panah._xscale = 20;
panah._yscale = 20;
panah.xtujuX = _root["archer" + xdiSerang2]._x + 15;
panah.xtujuY = _root["archer" + xdiSerang2]._y + random(31);
panah.tujuan = xdiSerang2;
x1 = panah.xtujuX - panah._x;
y1 = panah.xtujuY - panah._y;
sudutPel = 57.2957795130823 * Math.atan(y1 / x1);
if (((sudutPel >= -90) && (sudutPel <= 90)) && (x1 >= 0)) {
rot = sudutPel;
} else {
rot = sudutPel - 180;
}
panah._rotation = (rot + random(21)) - 10;
panah.onEnterFrame = enterPanah2;
panahKe++;
if (panahKe >= 121000) {
panahKe = 120000 /* 0x01D4C0 */;
}
}
}
}
}
}
function kompAI() {
if ((xlevel == "hard") || (xlevel == "extreme")) {
wrandom = random(10);
if (jmlPasukan1 > (25 + wrandom)) {
if (musuhSpecial == true) {
musuhSpecial = false;
theSpecialTwo();
}
}
if (xlevel == "extreme") {
if (kedelay <= (5 + wrandom)) {
if (musuhSpecial == true) {
musuhSpecial = false;
theSpecialTwo();
}
}
}
}
if (xpaused == false) {
if (xjmlPasukan2 < 40) {
if (pasukanKe == 1) {
if (buatTower == false) {
buatTower = true;
qbuatTower(8);
}
xadaUang = false;
rand = random(6);
if (rand == 0) {
if (zuang2 >= zharga[3]) {
xadaUang = true;
zuang2 = zuang2 - zharga[3];
munculMusuh(3);
}
} else if (rand == 1) {
if (zuang2 >= zharga[2]) {
xadaUang = true;
zuang2 = zuang2 - zharga[2];
munculMusuh(2);
}
} else if (rand == 2) {
if (zuang2 >= zharga[1]) {
xadaUang = true;
zuang2 = zuang2 - zharga[1];
munculMusuh(1);
}
} else if (rand == 3) {
if (zuang2 >= zharga[5]) {
xadaUang = true;
zuang2 = zuang2 - zharga[5];
munculMusuh(5);
}
} else if (rand == 4) {
if (zuang2 >= zharga[6]) {
xadaUang = true;
zuang2 = zuang2 - zharga[6];
munculMusuh(6);
}
} else if (rand == 5) {
if (zuang2 >= zharga[7]) {
xadaUang = true;
zuang2 = zuang2 - zharga[7];
munculMusuh(7);
}
}
if (xadaUang == false) {
if (zuang2 >= zharga[7]) {
zuang2 = zuang2 - zharga[7];
munculMusuh(7);
} else if (zuang2 >= zharga[6]) {
zuang2 = zuang2 - zharga[6];
munculMusuh(6);
} else if (zuang2 >= zharga[5]) {
zuang2 = zuang2 - zharga[5];
munculMusuh(5);
} else if (zuang2 >= zharga[3]) {
zuang2 = zuang2 - zharga[3];
munculMusuh(3);
} else if (zuang2 >= zharga[2]) {
zuang2 = zuang2 - zharga[2];
munculMusuh(2);
} else if (zuang2 >= zharga[1]) {
zuang2 = zuang2 - zharga[1];
munculMusuh(1);
}
}
} else if (pasukanKe == 2) {
if (buatTower == false) {
buatTower = true;
qbuatTower(12);
}
xadaUang = false;
rand = random(6);
if (rand == 0) {
if (zuang2 >= zharga[5]) {
xadaUang = true;
zuang2 = zuang2 - zharga[5];
munculMusuh(5);
}
} else if (rand == 1) {
if (zuang2 >= zharga[6]) {
xadaUang = true;
zuang2 = zuang2 - zharga[6];
munculMusuh(6);
}
} else if (rand == 2) {
if (zuang2 >= zharga[7]) {
xadaUang = true;
zuang2 = zuang2 - zharga[7];
munculMusuh(7);
}
} else if (rand == 3) {
if (zuang2 >= zharga[9]) {
xadaUang = true;
zuang2 = zuang2 - zharga[9];
munculMusuh(9);
}
} else if (rand == 4) {
if (zuang2 >= zharga[10]) {
xadaUang = true;
zuang2 = zuang2 - zharga[10];
munculMusuh(10);
}
} else if (rand == 5) {
if (zuang2 >= zharga[11]) {
xadaUang = true;
zuang2 = zuang2 - zharga[11];
munculMusuh(11);
}
}
if (xadaUang == false) {
if (zuang2 >= zharga[11]) {
zuang2 = zuang2 - zharga[11];
munculMusuh(11);
} else if (zuang2 >= zharga[10]) {
zuang2 = zuang2 - zharga[10];
munculMusuh(10);
} else if (zuang2 >= zharga[9]) {
zuang2 = zuang2 - zharga[9];
munculMusuh(9);
} else if (zuang2 >= zharga[7]) {
zuang2 = zuang2 - zharga[7];
munculMusuh(7);
} else if (zuang2 >= zharga[6]) {
zuang2 = zuang2 - zharga[6];
munculMusuh(6);
} else if (zuang2 >= zharga[5]) {
zuang2 = zuang2 - zharga[5];
munculMusuh(5);
}
}
} else if (pasukanKe == 3) {
if (buatTower == false) {
buatTower = true;
qbuatTower(16);
}
xadaUang = false;
rand = random(6);
if (rand == 0) {
if (zuang2 >= zharga[9]) {
xadaUang = true;
zuang2 = zuang2 - zharga[9];
munculMusuh(9);
}
} else if (rand == 1) {
if (zuang2 >= zharga[10]) {
xadaUang = true;
zuang2 = zuang2 - zharga[10];
munculMusuh(10);
}
} else if (rand == 2) {
if (zuang2 >= zharga[11]) {
xadaUang = true;
zuang2 = zuang2 - zharga[11];
munculMusuh(11);
}
} else if (rand == 3) {
if (zuang2 >= zharga[13]) {
xadaUang = true;
zuang2 = zuang2 - zharga[13];
munculMusuh(13);
}
} else if (rand == 4) {
if (zuang2 >= zharga[14]) {
xadaUang = true;
zuang2 = zuang2 - zharga[14];
munculMusuh(14);
}
} else if (rand == 5) {
if (zuang2 >= zharga[15]) {
xadaUang = true;
zuang2 = zuang2 - zharga[15];
munculMusuh(15);
}
}
if (xadaUang == false) {
if (zuang2 >= zharga[15]) {
zuang2 = zuang2 - zharga[15];
munculMusuh(15);
} else if (zuang2 >= zharga[14]) {
zuang2 = zuang2 - zharga[14];
munculMusuh(14);
} else if (zuang2 >= zharga[13]) {
zuang2 = zuang2 - zharga[13];
munculMusuh(13);
} else if (zuang2 >= zharga[11]) {
zuang2 = zuang2 - zharga[11];
munculMusuh(11);
} else if (zuang2 >= zharga[10]) {
zuang2 = zuang2 - zharga[10];
munculMusuh(10);
} else if (zuang2 >= zharga[9]) {
zuang2 = zuang2 - zharga[9];
munculMusuh(9);
}
}
} else if (pasukanKe == 4) {
if (buatTower == false) {
buatTower = true;
qbuatTower(20);
}
xadaUang = false;
rand = random(6);
if (rand == 0) {
if (zuang2 >= zharga[13]) {
xadaUang = true;
zuang2 = zuang2 - zharga[13];
munculMusuh(13);
}
} else if (rand == 1) {
if (zuang2 >= zharga[14]) {
xadaUang = true;
zuang2 = zuang2 - zharga[14];
munculMusuh(14);
}
} else if (rand == 2) {
if (zuang2 >= zharga[15]) {
xadaUang = true;
zuang2 = zuang2 - zharga[15];
munculMusuh(15);
}
} else if (rand == 3) {
if (zuang2 >= zharga[17]) {
xadaUang = true;
zuang2 = zuang2 - zharga[17];
munculMusuh(17);
}
} else if (rand == 4) {
if (zuang2 >= zharga[18]) {
xadaUang = true;
zuang2 = zuang2 - zharga[18];
munculMusuh(18);
}
} else if (rand == 5) {
if (zuang2 >= zharga[19]) {
xadaUang = true;
zuang2 = zuang2 - zharga[19];
munculMusuh(19);
}
}
if (xadaUang == false) {
if (zuang2 >= zharga[19]) {
zuang2 = zuang2 - zharga[19];
munculMusuh(19);
} else if (zuang2 >= zharga[18]) {
zuang2 = zuang2 - zharga[18];
munculMusuh(18);
} else if (zuang2 >= zharga[17]) {
zuang2 = zuang2 - zharga[17];
munculMusuh(17);
} else if (zuang2 >= zharga[15]) {
zuang2 = zuang2 - zharga[15];
munculMusuh(15);
} else if (zuang2 >= zharga[14]) {
zuang2 = zuang2 - zharga[14];
munculMusuh(14);
} else if (zuang2 >= zharga[13]) {
zuang2 = zuang2 - zharga[13];
munculMusuh(13);
}
}
} else if (pasukanKe == 5) {
if (buatTower == false) {
buatTower = true;
qbuatTower(24);
}
xadaUang = false;
rand = random(6);
if (rand == 0) {
if (zuang2 >= zharga[17]) {
xadaUang = true;
zuang2 = zuang2 - zharga[17];
munculMusuh(17);
}
} else if (rand == 1) {
if (zuang2 >= zharga[18]) {
xadaUang = true;
zuang2 = zuang2 - zharga[18];
munculMusuh(18);
}
} else if (rand == 2) {
if (zuang2 >= zharga[19]) {
xadaUang = true;
zuang2 = zuang2 - zharga[19];
munculMusuh(19);
}
} else if (rand == 3) {
if (zuang2 >= zharga[21]) {
xadaUang = true;
zuang2 = zuang2 - zharga[21];
munculMusuh(21);
}
} else if (rand == 4) {
if (zuang2 >= zharga[22]) {
xadaUang = true;
zuang2 = zuang2 - zharga[22];
munculMusuh(22);
}
} else if (rand == 5) {
if (zuang2 >= zharga[23]) {
xadaUang = true;
zuang2 = zuang2 - zharga[23];
munculMusuh(23);
}
}
if (xadaUang == false) {
if (zuang2 >= zharga[23]) {
zuang2 = zuang2 - zharga[23];
munculMusuh(23);
} else if (zuang2 >= zharga[22]) {
zuang2 = zuang2 - zharga[22];
munculMusuh(22);
} else if (zuang2 >= zharga[21]) {
zuang2 = zuang2 - zharga[21];
munculMusuh(21);
} else if (zuang2 >= zharga[19]) {
zuang2 = zuang2 - zharga[19];
munculMusuh(19);
} else if (zuang2 >= zharga[18]) {
zuang2 = zuang2 - zharga[18];
munculMusuh(18);
} else if (zuang2 >= zharga[17]) {
zuang2 = zuang2 - zharga[17];
munculMusuh(17);
}
}
} else if (pasukanKe == 6) {
if (buatTower == false) {
buatTower = true;
qbuatTower(28);
}
xadaUang = false;
rand = random(6);
if (rand == 0) {
if (zuang2 >= zharga[21]) {
xadaUang = true;
zuang2 = zuang2 - zharga[21];
munculMusuh(21);
}
} else if (rand == 1) {
if (zuang2 >= zharga[22]) {
xadaUang = true;
zuang2 = zuang2 - zharga[22];
munculMusuh(22);
}
} else if (rand == 2) {
if (zuang2 >= zharga[23]) {
xadaUang = true;
zuang2 = zuang2 - zharga[23];
munculMusuh(23);
}
} else if (rand == 3) {
if (zuang2 >= zharga[25]) {
xadaUang = true;
zuang2 = zuang2 - zharga[25];
munculMusuh(25);
}
} else if (rand == 4) {
if (zuang2 >= zharga[26]) {
xadaUang = true;
zuang2 = zuang2 - zharga[26];
munculMusuh(26);
}
} else if (rand == 5) {
if (zuang2 >= zharga[27]) {
xadaUang = true;
zuang2 = zuang2 - zharga[27];
munculMusuh(27);
}
}
if (xadaUang == false) {
if (zuang2 >= zharga[27]) {
zuang2 = zuang2 - zharga[27];
munculMusuh(27);
} else if (zuang2 >= zharga[26]) {
zuang2 = zuang2 - zharga[26];
munculMusuh(26);
} else if (zuang2 >= zharga[25]) {
zuang2 = zuang2 - zharga[25];
munculMusuh(25);
} else if (zuang2 >= zharga[23]) {
zuang2 = zuang2 - zharga[23];
munculMusuh(23);
} else if (zuang2 >= zharga[22]) {
zuang2 = zuang2 - zharga[22];
munculMusuh(22);
} else if (zuang2 >= zharga[21]) {
zuang2 = zuang2 - zharga[21];
munculMusuh(21);
}
}
} else if (pasukanKe == 7) {
if (buatTower == false) {
buatTower = true;
qbuatTower(32);
}
xadaUang = false;
rand = random(6);
if (rand == 0) {
if (zuang2 >= zharga[25]) {
xadaUang = true;
zuang2 = zuang2 - zharga[25];
munculMusuh(25);
}
} else if (rand == 1) {
if (zuang2 >= zharga[26]) {
xadaUang = true;
zuang2 = zuang2 - zharga[26];
munculMusuh(26);
}
} else if (rand == 2) {
if (zuang2 >= zharga[27]) {
xadaUang = true;
zuang2 = zuang2 - zharga[27];
munculMusuh(27);
}
} else if (rand == 3) {
if (zuang2 >= zharga[29]) {
xadaUang = true;
zuang2 = zuang2 - zharga[29];
munculMusuh(29);
}
} else if (rand == 4) {
if (zuang2 >= zharga[30]) {
xadaUang = true;
zuang2 = zuang2 - zharga[30];
munculMusuh(30);
}
} else if (rand == 5) {
if (zuang2 >= zharga[31]) {
xadaUang = true;
zuang2 = zuang2 - zharga[31];
munculMusuh(31);
}
}
if (xadaUang == false) {
if (zuang2 >= zharga[31]) {
zuang2 = zuang2 - zharga[31];
munculMusuh(31);
} else if (zuang2 >= zharga[30]) {
zuang2 = zuang2 - zharga[30];
munculMusuh(30);
} else if (zuang2 >= zharga[29]) {
zuang2 = zuang2 - zharga[29];
munculMusuh(29);
} else if (zuang2 >= zharga[27]) {
zuang2 = zuang2 - zharga[27];
munculMusuh(27);
} else if (zuang2 >= zharga[26]) {
zuang2 = zuang2 - zharga[26];
munculMusuh(26);
} else if (zuang2 >= zharga[25]) {
zuang2 = zuang2 - zharga[25];
munculMusuh(25);
}
}
} else if (pasukanKe == 8) {
if (buatTower == false) {
buatTower = true;
qbuatTower(36);
}
xadaUang = false;
rand = random(6);
if (rand == 0) {
if (zuang2 >= zharga[29]) {
xadaUang = true;
zuang2 = zuang2 - zharga[29];
munculMusuh(29);
}
} else if (rand == 1) {
if (zuang2 >= zharga[30]) {
xadaUang = true;
zuang2 = zuang2 - zharga[30];
munculMusuh(30);
}
} else if (rand == 2) {
if (zuang2 >= zharga[31]) {
xadaUang = true;
zuang2 = zuang2 - zharga[31];
munculMusuh(31);
}
} else if (rand == 3) {
if (zuang2 >= zharga[33]) {
xadaUang = true;
zuang2 = zuang2 - zharga[33];
munculMusuh(33);
}
} else if (rand == 4) {
if (zuang2 >= zharga[34]) {
xadaUang = true;
zuang2 = zuang2 - zharga[34];
munculMusuh(34);
}
} else if (rand == 5) {
if (zuang2 >= zharga[35]) {
xadaUang = true;
zuang2 = zuang2 - zharga[35];
munculMusuh(35);
}
}
if (xadaUang == false) {
if (zuang2 >= zharga[35]) {
zuang2 = zuang2 - zharga[35];
munculMusuh(35);
} else if (zuang2 >= zharga[34]) {
zuang2 = zuang2 - zharga[34];
munculMusuh(34);
} else if (zuang2 >= zharga[33]) {
zuang2 = zuang2 - zharga[33];
munculMusuh(33);
} else if (zuang2 >= zharga[31]) {
zuang2 = zuang2 - zharga[31];
munculMusuh(31);
} else if (zuang2 >= zharga[30]) {
zuang2 = zuang2 - zharga[30];
munculMusuh(30);
} else if (zuang2 >= zharga[29]) {
zuang2 = zuang2 - zharga[29];
munculMusuh(29);
}
}
} else if (pasukanKe == 9) {
if (buatTower == false) {
buatTower = true;
qbuatTower(40);
}
xadaUang = false;
rand = random(6);
if (rand == 0) {
if (zuang2 >= zharga[33]) {
xadaUang = true;
zuang2 = zuang2 - zharga[33];
munculMusuh(33);
}
} else if (rand == 1) {
if (zuang2 >= zharga[34]) {
xadaUang = true;
zuang2 = zuang2 - zharga[34];
munculMusuh(34);
}
} else if (rand == 2) {
if (zuang2 >= zharga[35]) {
xadaUang = true;
zuang2 = zuang2 - zharga[35];
munculMusuh(35);
}
} else if (rand == 3) {
if (zuang2 >= zharga[37]) {
xadaUang = true;
zuang2 = zuang2 - zharga[37];
munculMusuh(37);
}
} else if (rand == 4) {
if (zuang2 >= zharga[38]) {
xadaUang = true;
zuang2 = zuang2 - zharga[38];
munculMusuh(38);
}
} else if (rand == 5) {
if (zuang2 >= zharga[39]) {
xadaUang = true;
zuang2 = zuang2 - zharga[39];
munculMusuh(39);
}
}
if (xadaUang == false) {
if (zuang2 >= zharga[39]) {
zuang2 = zuang2 - zharga[39];
munculMusuh(39);
} else if (zuang2 >= zharga[38]) {
zuang2 = zuang2 - zharga[38];
munculMusuh(38);
} else if (zuang2 >= zharga[37]) {
zuang2 = zuang2 - zharga[37];
munculMusuh(37);
} else if (zuang2 >= zharga[35]) {
zuang2 = zuang2 - zharga[35];
munculMusuh(35);
} else if (zuang2 >= zharga[34]) {
zuang2 = zuang2 - zharga[34];
munculMusuh(34);
} else if (zuang2 >= zharga[33]) {
zuang2 = zuang2 - zharga[33];
munculMusuh(33);
}
}
} else if (pasukanKe == 10) {
if (buatTower == false) {
buatTower = true;
qbuatTower(44);
}
xadaUang = false;
drand = random(2);
if (drand == 0) {
rand = random(3);
if (rand == 0) {
if (zuang2 >= zharga[35]) {
xadaUang = true;
zuang2 = zuang2 - zharga[35];
munculMusuh(35);
}
} else if (rand == 1) {
if (zuang2 >= zharga[34]) {
xadaUang = true;
zuang2 = zuang2 - zharga[34];
munculMusuh(34);
}
} else if (rand == 2) {
if (zuang2 >= zharga[33]) {
xadaUang = true;
zuang2 = zuang2 - zharga[33];
munculMusuh(33);
}
}
} else {
rand = random(6);
if (rand == 0) {
if (zuang2 >= zharga[37]) {
xadaUang = true;
zuang2 = zuang2 - zharga[37];
munculMusuh(37);
}
} else if (rand == 1) {
if (zuang2 >= zharga[38]) {
xadaUang = true;
zuang2 = zuang2 - zharga[38];
munculMusuh(38);
}
} else if (rand == 2) {
if (zuang2 >= zharga[39]) {
xadaUang = true;
zuang2 = zuang2 - zharga[39];
munculMusuh(39);
}
} else if (rand == 3) {
if (zuang2 >= zharga[41]) {
xadaUang = true;
zuang2 = zuang2 - zharga[41];
munculMusuh(41);
}
} else if (rand == 4) {
if (zuang2 >= zharga[42]) {
xadaUang = true;
zuang2 = zuang2 - zharga[42];
munculMusuh(42);
}
} else if (rand == 5) {
if (zuang2 >= zharga[43]) {
xadaUang = true;
zuang2 = zuang2 - zharga[43];
munculMusuh(43);
}
}
}
if (xadaUang == false) {
if (zuang2 >= zharga[43]) {
zuang2 = zuang2 - zharga[43];
munculMusuh(43);
} else if (zuang2 >= zharga[42]) {
zuang2 = zuang2 - zharga[42];
munculMusuh(42);
} else if (zuang2 >= zharga[41]) {
zuang2 = zuang2 - zharga[41];
munculMusuh(41);
} else if (zuang2 >= zharga[39]) {
zuang2 = zuang2 - zharga[39];
munculMusuh(39);
} else if (zuang2 >= zharga[38]) {
zuang2 = zuang2 - zharga[38];
munculMusuh(38);
} else if (zuang2 >= zharga[37]) {
zuang2 = zuang2 - zharga[37];
munculMusuh(37);
}
}
} else if (pasukanKe == 11) {
if (buatTower == false) {
buatTower = true;
qbuatTower(48);
}
xadaUang = false;
drand = random(2);
if (drand == 0) {
rand = random(3);
if (rand == 0) {
if (zuang2 >= zharga[35]) {
xadaUang = true;
zuang2 = zuang2 - zharga[35];
munculMusuh(35);
}
} else if (rand == 1) {
if (zuang2 >= zharga[34]) {
xadaUang = true;
zuang2 = zuang2 - zharga[34];
munculMusuh(34);
}
} else if (rand == 2) {
if (zuang2 >= zharga[33]) {
xadaUang = true;
zuang2 = zuang2 - zharga[33];
munculMusuh(34);
}
}
} else {
rand = random(6);
if (rand == 0) {
if (zuang2 >= zharga[41]) {
xadaUang = true;
zuang2 = zuang2 - zharga[41];
munculMusuh(41);
}
} else if (rand == 1) {
if (zuang2 >= zharga[42]) {
xadaUang = true;
zuang2 = zuang2 - zharga[42];
munculMusuh(42);
}
} else if (rand == 2) {
if (zuang2 >= zharga[43]) {
xadaUang = true;
zuang2 = zuang2 - zharga[43];
munculMusuh(43);
}
} else if (rand == 3) {
if (zuang2 >= zharga[45]) {
xadaUang = true;
zuang2 = zuang2 - zharga[45];
munculMusuh(45);
}
} else if (rand == 4) {
if (zuang2 >= zharga[46]) {
xadaUang = true;
zuang2 = zuang2 - zharga[46];
munculMusuh(46);
}
} else if (rand == 5) {
if (zuang2 >= zharga[47]) {
xadaUang = true;
zuang2 = zuang2 - zharga[47];
munculMusuh(47);
}
}
}
if (xadaUang == false) {
if (zuang2 >= zharga[47]) {
zuang2 = zuang2 - zharga[47];
munculMusuh(47);
} else if (zuang2 >= zharga[46]) {
zuang2 = zuang2 - zharga[46];
munculMusuh(46);
} else if (zuang2 >= zharga[45]) {
zuang2 = zuang2 - zharga[45];
munculMusuh(45);
} else if (zuang2 >= zharga[43]) {
zuang2 = zuang2 - zharga[43];
munculMusuh(43);
} else if (zuang2 >= zharga[42]) {
zuang2 = zuang2 - zharga[42];
munculMusuh(42);
} else if (zuang2 >= zharga[41]) {
zuang2 = zuang2 - zharga[41];
munculMusuh(41);
}
}
} else if (pasukanKe == 12) {
if (buatTower == false) {
buatTower = true;
qbuatTower(52);
}
xadaUang = false;
drand = random(3);
if (drand == 0) {
rand = random(3);
if (rand == 0) {
if (zuang2 >= zharga[35]) {
xadaUang = true;
zuang2 = zuang2 - zharga[35];
munculMusuh(35);
}
} else if (rand == 1) {
if (zuang2 >= zharga[34]) {
xadaUang = true;
zuang2 = zuang2 - zharga[34];
munculMusuh(34);
}
} else if (rand == 2) {
if (zuang2 >= zharga[33]) {
xadaUang = true;
zuang2 = zuang2 - zharga[33];
munculMusuh(34);
}
}
} else if (drand == 1) {
rand = random(3);
if (rand == 0) {
if (zuang2 >= zharga[45]) {
xadaUang = true;
zuang2 = zuang2 - zharga[45];
munculMusuh(45);
}
} else if (rand == 1) {
if (zuang2 >= zharga[46]) {
xadaUang = true;
zuang2 = zuang2 - zharga[46];
munculMusuh(46);
}
} else if (rand == 2) {
if (zuang2 >= zharga[47]) {
xadaUang = true;
zuang2 = zuang2 - zharga[47];
munculMusuh(47);
}
}
} else {
rand = random(3);
if (rand == 0) {
if (zuang2 >= zharga[49]) {
xadaUang = true;
zuang2 = zuang2 - zharga[49];
munculMusuh(49);
}
} else if (rand == 1) {
if (zuang2 >= zharga[50]) {
xadaUang = true;
zuang2 = zuang2 - zharga[50];
munculMusuh(50);
}
} else if (rand == 2) {
if (zuang2 >= zharga[51]) {
xadaUang = true;
zuang2 = zuang2 - zharga[51];
munculMusuh(51);
}
}
}
if (xadaUang == false) {
if (zuang2 >= zharga[51]) {
zuang2 = zuang2 - zharga[51];
munculMusuh(51);
} else if (zuang2 >= zharga[50]) {
zuang2 = zuang2 - zharga[50];
munculMusuh(50);
} else if (zuang2 >= zharga[49]) {
zuang2 = zuang2 - zharga[49];
munculMusuh(49);
} else if (zuang2 >= zharga[47]) {
zuang2 = zuang2 - zharga[47];
munculMusuh(47);
} else if (zuang2 >= zharga[46]) {
zuang2 = zuang2 - zharga[46];
munculMusuh(46);
} else if (zuang2 >= zharga[45]) {
zuang2 = zuang2 - zharga[45];
munculMusuh(45);
}
}
} else if (pasukanKe == 13) {
if (buatTower == false) {
buatTower = true;
qbuatTower(56);
}
xadaUang = false;
drand = random(3);
if (drand == 0) {
rand = random(3);
if (rand == 0) {
if (zuang2 >= zharga[35]) {
xadaUang = true;
zuang2 = zuang2 - zharga[35];
munculMusuh(35);
}
} else if (rand == 1) {
if (zuang2 >= zharga[34]) {
xadaUang = true;
zuang2 = zuang2 - zharga[34];
munculMusuh(34);
}
} else if (rand == 2) {
if (zuang2 >= zharga[33]) {
xadaUang = true;
zuang2 = zuang2 - zharga[33];
munculMusuh(34);
}
}
} else if (drand == 1) {
rand = random(3);
if (rand == 0) {
if (zuang2 >= zharga[45]) {
xadaUang = true;
zuang2 = zuang2 - zharga[45];
munculMusuh(45);
}
} else if (rand == 1) {
if (zuang2 >= zharga[46]) {
xadaUang = true;
zuang2 = zuang2 - zharga[46];
munculMusuh(46);
}
} else if (rand == 2) {
if (zuang2 >= zharga[47]) {
xadaUang = true;
zuang2 = zuang2 - zharga[47];
munculMusuh(47);
}
}
} else {
rand = random(3);
if (rand == 0) {
if (zuang2 >= zharga[53]) {
xadaUang = true;
zuang2 = zuang2 - zharga[53];
munculMusuh(53);
}
} else if (rand == 1) {
if (zuang2 >= zharga[54]) {
xadaUang = true;
zuang2 = zuang2 - zharga[54];
munculMusuh(54);
}
} else if (rand == 2) {
if (zuang2 >= zharga[55]) {
xadaUang = true;
zuang2 = zuang2 - zharga[55];
munculMusuh(55);
}
}
}
if (xadaUang == false) {
if (zuang2 >= zharga[55]) {
zuang2 = zuang2 - zharga[55];
munculMusuh(55);
} else if (zuang2 >= zharga[54]) {
zuang2 = zuang2 - zharga[54];
munculMusuh(54);
} else if (zuang2 >= zharga[53]) {
zuang2 = zuang2 - zharga[53];
munculMusuh(53);
} else if (zuang2 >= zharga[51]) {
zuang2 = zuang2 - zharga[51];
munculMusuh(51);
} else if (zuang2 >= zharga[50]) {
zuang2 = zuang2 - zharga[50];
munculMusuh(50);
} else if (zuang2 >= zharga[49]) {
zuang2 = zuang2 - zharga[49];
munculMusuh(49);
}
}
} else if (pasukanKe == 14) {
if (buatTower == false) {
buatTower = true;
qbuatTower(60);
}
xadaUang = false;
drand = random(3);
if (drand == 0) {
rand = random(3);
if (rand == 0) {
if (zuang2 >= zharga[35]) {
xadaUang = true;
zuang2 = zuang2 - zharga[35];
munculMusuh(35);
}
} else if (rand == 1) {
if (zuang2 >= zharga[34]) {
xadaUang = true;
zuang2 = zuang2 - zharga[34];
munculMusuh(34);
}
} else if (rand == 2) {
if (zuang2 >= zharga[33]) {
xadaUang = true;
zuang2 = zuang2 - zharga[33];
munculMusuh(34);
}
}
} else if (drand == 1) {
rand = random(3);
if (rand == 0) {
if (zuang2 >= zharga[45]) {
xadaUang = true;
zuang2 = zuang2 - zharga[45];
munculMusuh(45);
}
} else if (rand == 1) {
if (zuang2 >= zharga[46]) {
xadaUang = true;
zuang2 = zuang2 - zharga[46];
munculMusuh(46);
}
} else if (rand == 2) {
if (zuang2 >= zharga[47]) {
xadaUang = true;
zuang2 = zuang2 - zharga[47];
munculMusuh(47);
}
}
} else {
rand = random(3);
if (rand == 0) {
if (zuang2 >= zharga[57]) {
xadaUang = true;
zuang2 = zuang2 - zharga[57];
munculMusuh(57);
}
} else if (rand == 1) {
if (zuang2 >= zharga[58]) {
xadaUang = true;
zuang2 = zuang2 - zharga[58];
munculMusuh(58);
}
} else if (rand == 2) {
if (zuang2 >= zharga[59]) {
xadaUang = true;
zuang2 = zuang2 - zharga[59];
munculMusuh(59);
}
}
}
if (xadaUang == false) {
if (zuang2 >= zharga[59]) {
zuang2 = zuang2 - zharga[59];
munculMusuh(59);
} else if (zuang2 >= zharga[58]) {
zuang2 = zuang2 - zharga[58];
munculMusuh(58);
} else if (zuang2 >= zharga[57]) {
zuang2 = zuang2 - zharga[57];
munculMusuh(57);
} else if (zuang2 >= zharga[55]) {
zuang2 = zuang2 - zharga[55];
munculMusuh(55);
} else if (zuang2 >= zharga[54]) {
zuang2 = zuang2 - zharga[54];
munculMusuh(54);
} else if (zuang2 >= zharga[53]) {
zuang2 = zuang2 - zharga[53];
munculMusuh(53);
}
}
} else if (pasukanKe == 0) {
xadaUang = false;
rand = random(3);
if (rand == 0) {
if (zuang2 >= zharga[3]) {
xadaUang = true;
zuang2 = zuang2 - zharga[3];
munculMusuh(3);
}
} else if (rand == 1) {
if (zuang2 >= zharga[2]) {
xadaUang = true;
zuang2 = zuang2 - zharga[2];
munculMusuh(2);
}
} else if (rand == 2) {
if (zuang2 >= zharga[1]) {
xadaUang = true;
zuang2 = zuang2 - zharga[1];
munculMusuh(1);
}
}
if (xadaUang == false) {
if (zuang2 >= zharga[3]) {
zuang2 = zuang2 - zharga[3];
munculMusuh(3);
} else if (zuang2 >= zharga[2]) {
zuang2 = zuang2 - zharga[2];
munculMusuh(2);
} else if (zuang2 >= zharga[1]) {
zuang2 = zuang2 - zharga[1];
munculMusuh(1);
}
}
if (buatTower == false) {
buatTower = true;
qbuatTower(4);
}
}
}
}
}
function qbuatTower(qindi) {
i = 0;
while (i <= panjang) {
j = 0;
while (j <= lebar) {
if (mapping[j][i] == 6) {
if (zuang2 >= zharga[qindi]) {
ubahDalam("j", "i", "dalam2");
xnama = "pohon_mc" + dalam2;
xdalam = _root["pohon_mc" + dalam2].getDepth();
if (qindi == 4) {
posX = _root["pohon_mc" + dalam2]._x + 40;
posY = _root["pohon_mc" + dalam2]._y + 40;
} else {
posX = _root["pohon_mc" + dalam2]._x;
posY = _root["pohon_mc" + dalam2]._y;
}
if (qindi == 4) {
towerBaru = attachMovie("tower1_mc", xnama, xdalam);
} else if (qindi == 8) {
towerBaru = attachMovie("tower2_mc", xnama, xdalam);
} else if (qindi == 12) {
towerBaru = attachMovie("tower3_mc", xnama, xdalam);
} else if (qindi == 16) {
towerBaru = attachMovie("tower4_mc", xnama, xdalam);
} else if (qindi == 20) {
towerBaru = attachMovie("tower5_mc", xnama, xdalam);
} else if (qindi == 24) {
towerBaru = attachMovie("tower6_mc", xnama, xdalam);
} else if (qindi == 28) {
towerBaru = attachMovie("tower7_mc", xnama, xdalam);
} else if (qindi == 32) {
towerBaru = attachMovie("tower8_mc", xnama, xdalam);
} else if (qindi == 36) {
towerBaru = attachMovie("tower9_mc", xnama, xdalam);
} else if (qindi == 40) {
towerBaru = attachMovie("tower10_mc", xnama, xdalam);
} else if (qindi == 44) {
towerBaru = attachMovie("tower11_mc", xnama, xdalam);
} else if (qindi == 48) {
towerBaru = attachMovie("tower12_mc", xnama, xdalam);
} else if (qindi == 52) {
towerBaru = attachMovie("tower13_mc", xnama, xdalam);
} else if (qindi == 56) {
towerBaru = attachMovie("tower14_mc", xnama, xdalam);
} else if (qindi == 60) {
towerBaru = attachMovie("tower15_mc", xnama, xdalam);
}
towerBaru._x = posX;
towerBaru._y = posY;
towerBaru._xscale = 200;
towerBaru._yscale = 200;
if (qindi == 4) {
towerBaru.jarak = 120;
towerBaru.awal = 30;
towerBaru.delay = 30;
} else if (qindi == 8) {
towerBaru.jarak = 130;
towerBaru.awal = 25;
towerBaru.delay = 25;
} else if (qindi == 12) {
towerBaru.jarak = 140;
towerBaru.awal = 25;
towerBaru.delay = 25;
} else if (qindi == 16) {
towerBaru.jarak = 150;
towerBaru.awal = 25;
towerBaru.delay = 25;
} else if (qindi == 20) {
towerBaru.jarak = 160;
towerBaru.awal = 25;
towerBaru.delay = 25;
} else if (qindi == 24) {
towerBaru.jarak = 170;
towerBaru.awal = 25;
towerBaru.delay = 25;
} else if (qindi == 28) {
towerBaru.jarak = 180;
towerBaru.awal = 25;
towerBaru.delay = 25;
} else if (qindi == 32) {
towerBaru.jarak = 190;
towerBaru.awal = 25;
towerBaru.delay = 25;
} else if (qindi == 36) {
towerBaru.jarak = 200;
towerBaru.awal = 20;
towerBaru.delay = 20;
} else if (qindi == 40) {
towerBaru.jarak = 210;
towerBaru.awal = 25;
towerBaru.delay = 25;
} else if (qindi == 44) {
towerBaru.jarak = 220;
towerBaru.awal = 20;
towerBaru.delay = 20;
} else if (qindi == 48) {
towerBaru.jarak = 230;
towerBaru.awal = 15;
towerBaru.delay = 15;
} else if (qindi == 52) {
towerBaru.jarak = 250;
towerBaru.awal = 15;
towerBaru.delay = 15;
} else if (qindi == 56) {
towerBaru.jarak = 275;
towerBaru.awal = 15;
towerBaru.delay = 15;
} else if (qindi == 60) {
towerBaru.jarak = 300;
towerBaru.awal = 15;
towerBaru.delay = 15;
}
towerBaru.jenisSen = qindi;
towerBaru.jenis = "tower";
towerBaru.onEnterFrame = enterTower2;
zuang2 = zuang2 - zharga[qindi];
}
}
j++;
}
i++;
}
}
function kompAI2() {
if (xpaused == false) {
if (xjmlPasukan1 < 40) {
if (pasukanKe == 1) {
if (buatTower2 == false) {
buatTower2 = true;
qbuatTower22(8);
}
xadaUang2 = false;
rand = random(6);
if (rand == 0) {
if (zuang >= zharga[3]) {
xadaUang2 = true;
zuang = zuang - zharga[3];
munculChara(3);
}
} else if (rand == 1) {
if (zuang >= zharga[2]) {
xadaUang2 = true;
zuang = zuang - zharga[2];
munculChara(2);
}
} else if (rand == 2) {
if (zuang >= zharga[1]) {
xadaUang2 = true;
zuang = zuang - zharga[1];
munculChara(1);
}
} else if (rand == 3) {
if (zuang >= zharga[5]) {
xadaUang2 = true;
zuang = zuang - zharga[5];
munculChara(5);
}
} else if (rand == 4) {
if (zuang >= zharga[6]) {
xadaUang2 = true;
zuang = zuang - zharga[6];
munculChara(6);
}
} else if (rand == 5) {
if (zuang >= zharga[7]) {
xadaUang2 = true;
zuang = zuang - zharga[7];
munculChara(7);
}
}
if (xadaUang2 == false) {
if (zuang >= zharga[7]) {
zuang = zuang - zharga[7];
munculChara(7);
} else if (zuang >= zharga[6]) {
zuang = zuang - zharga[6];
munculChara(6);
} else if (zuang >= zharga[5]) {
zuang = zuang - zharga[5];
munculChara(5);
} else if (zuang >= zharga[3]) {
zuang = zuang - zharga[3];
munculChara(3);
} else if (zuang >= zharga[2]) {
zuang = zuang - zharga[2];
munculChara(2);
} else if (zuang >= zharga[1]) {
zuang = zuang - zharga[1];
munculChara(1);
}
}
} else if (pasukanKe == 2) {
if (buatTower2 == false) {
buatTower2 = true;
qbuatTower22(12);
}
xadaUang2 = false;
rand = random(6);
if (rand == 0) {
if (zuang >= zharga[5]) {
xadaUang2 = true;
zuang = zuang - zharga[5];
munculChara(5);
}
} else if (rand == 1) {
if (zuang >= zharga[6]) {
xadaUang2 = true;
zuang = zuang - zharga[6];
munculChara(6);
}
} else if (rand == 2) {
if (zuang >= zharga[7]) {
xadaUang2 = true;
zuang = zuang - zharga[7];
munculChara(7);
}
} else if (rand == 3) {
if (zuang >= zharga[9]) {
xadaUang2 = true;
zuang = zuang - zharga[9];
munculChara(9);
}
} else if (rand == 4) {
if (zuang >= zharga[10]) {
xadaUang2 = true;
zuang = zuang - zharga[10];
munculChara(10);
}
} else if (rand == 5) {
if (zuang >= zharga[11]) {
xadaUang2 = true;
zuang = zuang - zharga[11];
munculChara(11);
}
}
if (xadaUang2 == false) {
if (zuang >= zharga[11]) {
zuang = zuang - zharga[11];
munculChara(11);
} else if (zuang >= zharga[10]) {
zuang = zuang - zharga[10];
munculChara(10);
} else if (zuang >= zharga[9]) {
zuang = zuang - zharga[9];
munculChara(9);
} else if (zuang >= zharga[7]) {
zuang = zuang - zharga[7];
munculChara(7);
} else if (zuang >= zharga[6]) {
zuang = zuang - zharga[6];
munculChara(6);
} else if (zuang >= zharga[5]) {
zuang = zuang - zharga[5];
munculChara(5);
}
}
} else if (pasukanKe == 3) {
if (buatTower2 == false) {
buatTower2 = true;
qbuatTower22(16);
}
xadaUang2 = false;
rand = random(6);
if (rand == 0) {
if (zuang >= zharga[9]) {
xadaUang2 = true;
zuang = zuang - zharga[9];
munculChara(9);
}
} else if (rand == 1) {
if (zuang >= zharga[10]) {
xadaUang2 = true;
zuang = zuang - zharga[10];
munculChara(10);
}
} else if (rand == 2) {
if (zuang >= zharga[11]) {
xadaUang2 = true;
zuang = zuang - zharga[11];
munculChara(11);
}
} else if (rand == 3) {
if (zuang >= zharga[13]) {
xadaUang2 = true;
zuang = zuang - zharga[13];
munculChara(13);
}
} else if (rand == 4) {
if (zuang >= zharga[14]) {
xadaUang2 = true;
zuang = zuang - zharga[14];
munculChara(14);
}
} else if (rand == 5) {
if (zuang >= zharga[15]) {
xadaUang2 = true;
zuang = zuang - zharga[15];
munculChara(15);
}
}
if (xadaUang2 == false) {
if (zuang >= zharga[15]) {
zuang = zuang - zharga[15];
munculChara(15);
} else if (zuang >= zharga[14]) {
zuang = zuang - zharga[14];
munculChara(14);
} else if (zuang >= zharga[13]) {
zuang = zuang - zharga[13];
munculChara(13);
} else if (zuang >= zharga[11]) {
zuang = zuang - zharga[11];
munculChara(11);
} else if (zuang >= zharga[10]) {
zuang = zuang - zharga[10];
munculChara(10);
} else if (zuang >= zharga[9]) {
zuang = zuang - zharga[9];
munculChara(9);
}
}
} else if (pasukanKe == 4) {
if (buatTower2 == false) {
buatTower2 = true;
qbuatTower22(20);
}
xadaUang2 = false;
rand = random(6);
if (rand == 0) {
if (zuang >= zharga[13]) {
xadaUang2 = true;
zuang = zuang - zharga[13];
munculChara(13);
}
} else if (rand == 1) {
if (zuang >= zharga[14]) {
xadaUang2 = true;
zuang = zuang - zharga[14];
munculChara(14);
}
} else if (rand == 2) {
if (zuang >= zharga[15]) {
xadaUang2 = true;
zuang = zuang - zharga[15];
munculChara(15);
}
} else if (rand == 3) {
if (zuang >= zharga[17]) {
xadaUang2 = true;
zuang = zuang - zharga[17];
munculChara(17);
}
} else if (rand == 4) {
if (zuang >= zharga[18]) {
xadaUang2 = true;
zuang = zuang - zharga[18];
munculChara(18);
}
} else if (rand == 5) {
if (zuang >= zharga[19]) {
xadaUang2 = true;
zuang = zuang - zharga[19];
munculChara(19);
}
}
if (xadaUang2 == false) {
if (zuang >= zharga[19]) {
zuang = zuang - zharga[19];
munculChara(19);
} else if (zuang >= zharga[18]) {
zuang = zuang - zharga[18];
munculChara(18);
} else if (zuang >= zharga[17]) {
zuang = zuang - zharga[17];
munculChara(17);
} else if (zuang >= zharga[15]) {
zuang = zuang - zharga[15];
munculChara(15);
} else if (zuang >= zharga[14]) {
zuang = zuang - zharga[14];
munculChara(14);
} else if (zuang >= zharga[13]) {
zuang = zuang - zharga[13];
munculChara(13);
}
}
} else if (pasukanKe == 5) {
if (buatTower2 == false) {
buatTower2 = true;
qbuatTower22(24);
}
xadaUang2 = false;
rand = random(6);
if (rand == 0) {
if (zuang >= zharga[17]) {
xadaUang2 = true;
zuang = zuang - zharga[17];
munculChara(17);
}
} else if (rand == 1) {
if (zuang >= zharga[18]) {
xadaUang2 = true;
zuang = zuang - zharga[18];
munculChara(18);
}
} else if (rand == 2) {
if (zuang >= zharga[19]) {
xadaUang2 = true;
zuang = zuang - zharga[19];
munculChara(19);
}
} else if (rand == 3) {
if (zuang >= zharga[21]) {
xadaUang2 = true;
zuang = zuang - zharga[21];
munculChara(21);
}
} else if (rand == 4) {
if (zuang >= zharga[22]) {
xadaUang2 = true;
zuang = zuang - zharga[22];
munculChara(22);
}
} else if (rand == 5) {
if (zuang >= zharga[23]) {
xadaUang2 = true;
zuang = zuang - zharga[23];
munculChara(23);
}
}
if (xadaUang2 == false) {
if (zuang >= zharga[23]) {
zuang = zuang - zharga[23];
munculChara(23);
} else if (zuang >= zharga[22]) {
zuang = zuang - zharga[22];
munculChara(22);
} else if (zuang >= zharga[21]) {
zuang = zuang - zharga[21];
munculChara(21);
} else if (zuang >= zharga[19]) {
zuang = zuang - zharga[19];
munculChara(19);
} else if (zuang >= zharga[18]) {
zuang = zuang - zharga[18];
munculChara(18);
} else if (zuang >= zharga[17]) {
zuang = zuang - zharga[17];
munculChara(17);
}
}
} else if (pasukanKe == 6) {
if (buatTower2 == false) {
buatTower2 = true;
qbuatTower22(28);
}
xadaUang2 = false;
rand = random(6);
if (rand == 0) {
if (zuang >= zharga[21]) {
xadaUang2 = true;
zuang = zuang - zharga[21];
munculChara(21);
}
} else if (rand == 1) {
if (zuang >= zharga[22]) {
xadaUang2 = true;
zuang = zuang - zharga[22];
munculChara(22);
}
} else if (rand == 2) {
if (zuang >= zharga[23]) {
xadaUang2 = true;
zuang = zuang - zharga[23];
munculChara(23);
}
} else if (rand == 3) {
if (zuang >= zharga[25]) {
xadaUang2 = true;
zuang = zuang - zharga[25];
munculChara(25);
}
} else if (rand == 4) {
if (zuang >= zharga[26]) {
xadaUang2 = true;
zuang = zuang - zharga[26];
munculChara(26);
}
} else if (rand == 5) {
if (zuang >= zharga[27]) {
xadaUang2 = true;
zuang = zuang - zharga[27];
munculChara(27);
}
}
if (xadaUang2 == false) {
if (zuang >= zharga[27]) {
zuang = zuang - zharga[27];
munculChara(27);
} else if (zuang >= zharga[26]) {
zuang = zuang - zharga[26];
munculChara(26);
} else if (zuang >= zharga[25]) {
zuang = zuang - zharga[25];
munculChara(25);
} else if (zuang >= zharga[23]) {
zuang = zuang - zharga[23];
munculChara(23);
} else if (zuang >= zharga[22]) {
zuang = zuang - zharga[22];
munculChara(22);
} else if (zuang >= zharga[21]) {
zuang = zuang - zharga[21];
munculChara(21);
}
}
} else if (pasukanKe == 7) {
if (buatTower2 == false) {
buatTower2 = true;
qbuatTower22(32);
}
xadaUang2 = false;
rand = random(6);
if (rand == 0) {
if (zuang >= zharga[25]) {
xadaUang2 = true;
zuang = zuang - zharga[25];
munculChara(25);
}
} else if (rand == 1) {
if (zuang >= zharga[26]) {
xadaUang2 = true;
zuang = zuang - zharga[26];
munculChara(26);
}
} else if (rand == 2) {
if (zuang >= zharga[27]) {
xadaUang2 = true;
zuang = zuang - zharga[27];
munculChara(27);
}
} else if (rand == 3) {
if (zuang >= zharga[29]) {
xadaUang2 = true;
zuang = zuang - zharga[29];
munculChara(29);
}
} else if (rand == 4) {
if (zuang >= zharga[30]) {
xadaUang2 = true;
zuang = zuang - zharga[30];
munculChara(30);
}
} else if (rand == 5) {
if (zuang >= zharga[31]) {
xadaUang2 = true;
zuang = zuang - zharga[31];
munculChara(31);
}
}
if (xadaUang2 == false) {
if (zuang >= zharga[31]) {
zuang = zuang - zharga[31];
munculChara(31);
} else if (zuang >= zharga[30]) {
zuang = zuang - zharga[30];
munculChara(30);
} else if (zuang >= zharga[29]) {
zuang = zuang - zharga[29];
munculChara(29);
} else if (zuang >= zharga[27]) {
zuang = zuang - zharga[27];
munculChara(27);
} else if (zuang >= zharga[26]) {
zuang = zuang - zharga[26];
munculChara(26);
} else if (zuang >= zharga[25]) {
zuang = zuang - zharga[25];
munculChara(25);
}
}
} else if (pasukanKe == 8) {
if (buatTower2 == false) {
buatTower2 = true;
qbuatTower22(36);
}
xadaUang2 = false;
rand = random(6);
if (rand == 0) {
if (zuang >= zharga[29]) {
xadaUang2 = true;
zuang = zuang - zharga[29];
munculChara(29);
}
} else if (rand == 1) {
if (zuang >= zharga[30]) {
xadaUang2 = true;
zuang = zuang - zharga[30];
munculChara(30);
}
} else if (rand == 2) {
if (zuang >= zharga[31]) {
xadaUang2 = true;
zuang = zuang - zharga[31];
munculChara(31);
}
} else if (rand == 3) {
if (zuang >= zharga[33]) {
xadaUang2 = true;
zuang = zuang - zharga[33];
munculChara(33);
}
} else if (rand == 4) {
if (zuang >= zharga[34]) {
xadaUang2 = true;
zuang = zuang - zharga[34];
munculChara(34);
}
} else if (rand == 5) {
if (zuang >= zharga[35]) {
xadaUang2 = true;
zuang = zuang - zharga[35];
munculChara(35);
}
}
if (xadaUang2 == false) {
if (zuang >= zharga[35]) {
zuang = zuang - zharga[35];
munculChara(35);
} else if (zuang >= zharga[34]) {
zuang = zuang - zharga[34];
munculChara(34);
} else if (zuang >= zharga[33]) {
zuang = zuang - zharga[33];
munculChara(33);
} else if (zuang >= zharga[31]) {
zuang = zuang - zharga[31];
munculChara(31);
} else if (zuang >= zharga[30]) {
zuang = zuang - zharga[30];
munculChara(30);
} else if (zuang >= zharga[29]) {
zuang = zuang - zharga[29];
munculChara(29);
}
}
} else if (pasukanKe == 9) {
if (buatTower2 == false) {
buatTower2 = true;
qbuatTower22(40);
}
xadaUang2 = false;
rand = random(6);
if (rand == 0) {
if (zuang >= zharga[33]) {
xadaUang2 = true;
zuang = zuang - zharga[33];
munculChara(33);
}
} else if (rand == 1) {
if (zuang >= zharga[34]) {
xadaUang2 = true;
zuang = zuang - zharga[34];
munculChara(34);
}
} else if (rand == 2) {
if (zuang >= zharga[35]) {
xadaUang2 = true;
zuang = zuang - zharga[35];
munculChara(35);
}
} else if (rand == 3) {
if (zuang >= zharga[37]) {
xadaUang2 = true;
zuang = zuang - zharga[37];
munculChara(37);
}
} else if (rand == 4) {
if (zuang >= zharga[38]) {
xadaUang2 = true;
zuang = zuang - zharga[38];
munculChara(38);
}
} else if (rand == 5) {
if (zuang >= zharga[39]) {
xadaUang2 = true;
zuang = zuang - zharga[39];
munculChara(39);
}
}
if (xadaUang2 == false) {
if (zuang >= zharga[39]) {
zuang = zuang - zharga[39];
munculChara(39);
} else if (zuang >= zharga[38]) {
zuang = zuang - zharga[38];
munculChara(38);
} else if (zuang >= zharga[37]) {
zuang = zuang - zharga[37];
munculChara(37);
} else if (zuang >= zharga[35]) {
zuang = zuang - zharga[35];
munculChara(35);
} else if (zuang >= zharga[34]) {
zuang = zuang - zharga[34];
munculChara(34);
} else if (zuang >= zharga[33]) {
zuang = zuang - zharga[33];
munculChara(33);
}
}
} else if (pasukanKe == 10) {
if (buatTower2 == false) {
buatTower2 = true;
qbuatTower22(44);
}
xadaUang2 = false;
drand = random(2);
if (drand == 0) {
rand = random(3);
if (rand == 0) {
if (zuang >= zharga[35]) {
xadaUang2 = true;
zuang = zuang - zharga[35];
munculChara(35);
}
} else if (rand == 1) {
if (zuang >= zharga[34]) {
xadaUang2 = true;
zuang = zuang - zharga[34];
munculChara(34);
}
} else if (rand == 2) {
if (zuang >= zharga[33]) {
xadaUang2 = true;
zuang = zuang - zharga[33];
munculChara(33);
}
}
} else {
rand = random(6);
if (rand == 0) {
if (zuang >= zharga[37]) {
xadaUang2 = true;
zuang = zuang - zharga[37];
munculChara(37);
}
} else if (rand == 1) {
if (zuang >= zharga[38]) {
xadaUang2 = true;
zuang = zuang - zharga[38];
munculChara(38);
}
} else if (rand == 2) {
if (zuang >= zharga[39]) {
xadaUang2 = true;
zuang = zuang - zharga[39];
munculChara(39);
}
} else if (rand == 3) {
if (zuang >= zharga[41]) {
xadaUang2 = true;
zuang = zuang - zharga[41];
munculChara(41);
}
} else if (rand == 4) {
if (zuang >= zharga[42]) {
xadaUang2 = true;
zuang = zuang - zharga[42];
munculChara(42);
}
} else if (rand == 5) {
if (zuang >= zharga[43]) {
xadaUang2 = true;
zuang = zuang - zharga[43];
munculChara(43);
}
}
}
if (xadaUang2 == false) {
if (zuang >= zharga[43]) {
zuang = zuang - zharga[43];
munculChara(43);
} else if (zuang >= zharga[42]) {
zuang = zuang - zharga[42];
munculChara(42);
} else if (zuang >= zharga[41]) {
zuang = zuang - zharga[41];
munculChara(41);
} else if (zuang >= zharga[39]) {
zuang = zuang - zharga[39];
munculChara(39);
} else if (zuang >= zharga[38]) {
zuang = zuang - zharga[38];
munculChara(38);
} else if (zuang >= zharga[37]) {
zuang = zuang - zharga[37];
munculChara(37);
}
}
} else if (pasukanKe == 11) {
if (buatTower2 == false) {
buatTower2 = true;
qbuatTower22(48);
}
xadaUang2 = false;
drand = random(2);
if (drand == 0) {
rand = random(3);
if (rand == 0) {
if (zuang >= zharga[35]) {
xadaUang2 = true;
zuang = zuang - zharga[35];
munculChara(35);
}
} else if (rand == 1) {
if (zuang >= zharga[34]) {
xadaUang2 = true;
zuang = zuang - zharga[34];
munculChara(34);
}
} else if (rand == 2) {
if (zuang >= zharga[33]) {
xadaUang2 = true;
zuang = zuang - zharga[33];
munculChara(34);
}
}
} else {
rand = random(6);
if (rand == 0) {
if (zuang >= zharga[41]) {
xadaUang2 = true;
zuang = zuang - zharga[41];
munculChara(41);
}
} else if (rand == 1) {
if (zuang >= zharga[42]) {
xadaUang2 = true;
zuang = zuang - zharga[42];
munculChara(42);
}
} else if (rand == 2) {
if (zuang >= zharga[43]) {
xadaUang2 = true;
zuang = zuang - zharga[43];
munculChara(43);
}
} else if (rand == 3) {
if (zuang >= zharga[45]) {
xadaUang2 = true;
zuang = zuang - zharga[45];
munculChara(45);
}
} else if (rand == 4) {
if (zuang >= zharga[46]) {
xadaUang2 = true;
zuang = zuang - zharga[46];
munculChara(46);
}
} else if (rand == 5) {
if (zuang >= zharga[47]) {
xadaUang2 = true;
zuang = zuang - zharga[47];
munculChara(47);
}
}
}
if (xadaUang2 == false) {
if (zuang >= zharga[47]) {
zuang = zuang - zharga[47];
munculChara(47);
} else if (zuang >= zharga[46]) {
zuang = zuang - zharga[46];
munculChara(46);
} else if (zuang >= zharga[45]) {
zuang = zuang - zharga[45];
munculChara(45);
} else if (zuang >= zharga[43]) {
zuang = zuang - zharga[43];
munculChara(43);
} else if (zuang >= zharga[42]) {
zuang = zuang - zharga[42];
munculChara(42);
} else if (zuang >= zharga[41]) {
zuang = zuang - zharga[41];
munculChara(41);
}
}
} else if (pasukanKe == 12) {
if (buatTower2 == false) {
buatTower2 = true;
qbuatTower22(52);
}
xadaUang2 = false;
drand = random(3);
if (drand == 0) {
rand = random(3);
if (rand == 0) {
if (zuang >= zharga[35]) {
xadaUang2 = true;
zuang = zuang - zharga[35];
munculChara(35);
}
} else if (rand == 1) {
if (zuang >= zharga[34]) {
xadaUang2 = true;
zuang = zuang - zharga[34];
munculChara(34);
}
} else if (rand == 2) {
if (zuang >= zharga[33]) {
xadaUang2 = true;
zuang = zuang - zharga[33];
munculChara(34);
}
}
} else if (drand == 1) {
rand = random(3);
if (rand == 0) {
if (zuang >= zharga[45]) {
xadaUang2 = true;
zuang = zuang - zharga[45];
munculChara(45);
}
} else if (rand == 1) {
if (zuang >= zharga[46]) {
xadaUang2 = true;
zuang = zuang - zharga[46];
munculChara(46);
}
} else if (rand == 2) {
if (zuang >= zharga[47]) {
xadaUang2 = true;
zuang = zuang - zharga[47];
munculChara(47);
}
}
} else {
rand = random(3);
if (rand == 0) {
if (zuang >= zharga[49]) {
xadaUang2 = true;
zuang = zuang - zharga[49];
munculChara(49);
}
} else if (rand == 1) {
if (zuang >= zharga[50]) {
xadaUang2 = true;
zuang = zuang - zharga[50];
munculChara(50);
}
} else if (rand == 2) {
if (zuang >= zharga[51]) {
xadaUang2 = true;
zuang = zuang - zharga[51];
munculChara(51);
}
}
}
if (xadaUang2 == false) {
if (zuang >= zharga[51]) {
zuang = zuang - zharga[51];
munculChara(51);
} else if (zuang >= zharga[50]) {
zuang = zuang - zharga[50];
munculChara(50);
} else if (zuang >= zharga[49]) {
zuang = zuang - zharga[49];
munculChara(49);
} else if (zuang >= zharga[47]) {
zuang = zuang - zharga[47];
munculChara(47);
} else if (zuang >= zharga[46]) {
zuang = zuang - zharga[46];
munculChara(46);
} else if (zuang >= zharga[45]) {
zuang = zuang - zharga[45];
munculChara(45);
}
}
} else if (pasukanKe == 13) {
if (buatTower2 == false) {
buatTower2 = true;
qbuatTower22(56);
}
xadaUang2 = false;
drand = random(3);
if (drand == 0) {
rand = random(3);
if (rand == 0) {
if (zuang >= zharga[35]) {
xadaUang2 = true;
zuang = zuang - zharga[35];
munculChara(35);
}
} else if (rand == 1) {
if (zuang >= zharga[34]) {
xadaUang2 = true;
zuang = zuang - zharga[34];
munculChara(34);
}
} else if (rand == 2) {
if (zuang >= zharga[33]) {
xadaUang2 = true;
zuang = zuang - zharga[33];
munculChara(34);
}
}
} else if (drand == 1) {
rand = random(3);
if (rand == 0) {
if (zuang >= zharga[45]) {
xadaUang2 = true;
zuang = zuang - zharga[45];
munculChara(45);
}
} else if (rand == 1) {
if (zuang >= zharga[46]) {
xadaUang2 = true;
zuang = zuang - zharga[46];
munculChara(46);
}
} else if (rand == 2) {
if (zuang >= zharga[47]) {
xadaUang2 = true;
zuang = zuang - zharga[47];
munculChara(47);
}
}
} else {
rand = random(3);
if (rand == 0) {
if (zuang >= zharga[53]) {
xadaUang2 = true;
zuang = zuang - zharga[53];
munculChara(53);
}
} else if (rand == 1) {
if (zuang >= zharga[54]) {
xadaUang2 = true;
zuang = zuang - zharga[54];
munculChara(54);
}
} else if (rand == 2) {
if (zuang >= zharga[55]) {
xadaUang2 = true;
zuang = zuang - zharga[55];
munculChara(55);
}
}
}
if (xadaUang2 == false) {
if (zuang >= zharga[55]) {
zuang = zuang - zharga[55];
munculChara(55);
} else if (zuang >= zharga[54]) {
zuang = zuang - zharga[54];
munculChara(54);
} else if (zuang >= zharga[53]) {
zuang = zuang - zharga[53];
munculChara(53);
} else if (zuang >= zharga[51]) {
zuang = zuang - zharga[51];
munculChara(51);
} else if (zuang >= zharga[50]) {
zuang = zuang - zharga[50];
munculChara(50);
} else if (zuang >= zharga[49]) {
zuang = zuang - zharga[49];
munculChara(49);
}
}
} else if (pasukanKe == 14) {
if (buatTower2 == false) {
buatTower2 = true;
qbuatTower22(60);
}
xadaUang2 = false;
drand = random(3);
if (drand == 0) {
rand = random(3);
if (rand == 0) {
if (zuang >= zharga[35]) {
xadaUang2 = true;
zuang = zuang - zharga[35];
munculChara(35);
}
} else if (rand == 1) {
if (zuang >= zharga[34]) {
xadaUang2 = true;
zuang = zuang - zharga[34];
munculChara(34);
}
} else if (rand == 2) {
if (zuang >= zharga[33]) {
xadaUang2 = true;
zuang = zuang - zharga[33];
munculChara(34);
}
}
} else if (drand == 1) {
rand = random(3);
if (rand == 0) {
if (zuang >= zharga[45]) {
xadaUang2 = true;
zuang = zuang - zharga[45];
munculChara(45);
}
} else if (rand == 1) {
if (zuang >= zharga[46]) {
xadaUang2 = true;
zuang = zuang - zharga[46];
munculChara(46);
}
} else if (rand == 2) {
if (zuang >= zharga[47]) {
xadaUang2 = true;
zuang = zuang - zharga[47];
munculChara(47);
}
}
} else {
rand = random(3);
if (rand == 0) {
if (zuang >= zharga[57]) {
xadaUang2 = true;
zuang = zuang - zharga[57];
munculChara(57);
}
} else if (rand == 1) {
if (zuang >= zharga[58]) {
xadaUang2 = true;
zuang = zuang - zharga[58];
munculChara(58);
}
} else if (rand == 2) {
if (zuang >= zharga[59]) {
xadaUang2 = true;
zuang = zuang - zharga[59];
munculChara(59);
}
}
}
if (xadaUang2 == false) {
if (zuang >= zharga[59]) {
zuang = zuang - zharga[59];
munculChara(59);
} else if (zuang >= zharga[58]) {
zuang = zuang - zharga[58];
munculChara(58);
} else if (zuang >= zharga[57]) {
zuang = zuang - zharga[57];
munculChara(57);
} else if (zuang >= zharga[55]) {
zuang = zuang - zharga[55];
munculChara(55);
} else if (zuang >= zharga[54]) {
zuang = zuang - zharga[54];
munculChara(54);
} else if (zuang >= zharga[53]) {
zuang = zuang - zharga[53];
munculChara(53);
}
}
} else if (pasukanKe == 0) {
xadaUang2 = false;
rand = random(3);
if (rand == 0) {
if (zuang >= zharga[3]) {
xadaUang2 = true;
zuang = zuang - zharga[3];
munculChara(3);
}
} else if (rand == 1) {
if (zuang >= zharga[2]) {
xadaUang2 = true;
zuang = zuang - zharga[2];
munculChara(2);
}
} else if (rand == 2) {
if (zuang >= zharga[1]) {
xadaUang2 = true;
zuang = zuang - zharga[1];
munculChara(1);
}
}
if (xadaUang2 == false) {
if (zuang >= zharga[3]) {
zuang = zuang - zharga[3];
munculChara(3);
} else if (zuang >= zharga[2]) {
zuang = zuang - zharga[2];
munculChara(2);
} else if (zuang >= zharga[1]) {
zuang = zuang - zharga[1];
munculChara(1);
}
}
if (buatTower2 == false) {
buatTower2 = true;
qbuatTower22(4);
}
}
}
}
}
function qbuatTower22(qindi) {
i = 0;
while (i <= panjang) {
j = 0;
while (j <= lebar) {
if (mapping[j][i] == 4) {
if (zuang >= zharga[qindi]) {
ubahDalam("j", "i", "dalam2");
xnama = "pohon_mc" + dalam2;
xdalam = _root["pohon_mc" + dalam2].getDepth();
if (qindi == 4) {
posX = _root["pohon_mc" + dalam2]._x + 40;
posY = _root["pohon_mc" + dalam2]._y + 40;
} else {
posX = _root["pohon_mc" + dalam2]._x;
posY = _root["pohon_mc" + dalam2]._y;
}
if (qindi == 4) {
towerBaru = attachMovie("tower1_mc", xnama, xdalam);
} else if (qindi == 8) {
towerBaru = attachMovie("tower2_mc", xnama, xdalam);
} else if (qindi == 12) {
towerBaru = attachMovie("tower3_mc", xnama, xdalam);
} else if (qindi == 16) {
towerBaru = attachMovie("tower4_mc", xnama, xdalam);
} else if (qindi == 20) {
towerBaru = attachMovie("tower5_mc", xnama, xdalam);
} else if (qindi == 24) {
towerBaru = attachMovie("tower6_mc", xnama, xdalam);
} else if (qindi == 28) {
towerBaru = attachMovie("tower7_mc", xnama, xdalam);
} else if (qindi == 32) {
towerBaru = attachMovie("tower8_mc", xnama, xdalam);
} else if (qindi == 36) {
towerBaru = attachMovie("tower9_mc", xnama, xdalam);
} else if (qindi == 40) {
towerBaru = attachMovie("tower10_mc", xnama, xdalam);
} else if (qindi == 44) {
towerBaru = attachMovie("tower11_mc", xnama, xdalam);
} else if (qindi == 48) {
towerBaru = attachMovie("tower12_mc", xnama, xdalam);
} else if (qindi == 52) {
towerBaru = attachMovie("tower13_mc", xnama, xdalam);
} else if (qindi == 56) {
towerBaru = attachMovie("tower14_mc", xnama, xdalam);
} else if (qindi == 60) {
towerBaru = attachMovie("tower15_mc", xnama, xdalam);
}
towerBaru._x = posX;
towerBaru._y = posY;
towerBaru._xscale = 200;
towerBaru._yscale = 200;
if (qindi == 4) {
towerBaru.jarak = 120;
towerBaru.awal = 30;
towerBaru.delay = 30;
} else if (qindi == 8) {
towerBaru.jarak = 130;
towerBaru.awal = 25;
towerBaru.delay = 25;
} else if (qindi == 12) {
towerBaru.jarak = 140;
towerBaru.awal = 25;
towerBaru.delay = 25;
} else if (qindi == 16) {
towerBaru.jarak = 150;
towerBaru.awal = 25;
towerBaru.delay = 25;
} else if (qindi == 20) {
towerBaru.jarak = 160;
towerBaru.awal = 25;
towerBaru.delay = 25;
} else if (qindi == 24) {
towerBaru.jarak = 170;
towerBaru.awal = 25;
towerBaru.delay = 25;
} else if (qindi == 28) {
towerBaru.jarak = 180;
towerBaru.awal = 25;
towerBaru.delay = 25;
} else if (qindi == 32) {
towerBaru.jarak = 190;
towerBaru.awal = 25;
towerBaru.delay = 25;
} else if (qindi == 36) {
towerBaru.jarak = 200;
towerBaru.awal = 20;
towerBaru.delay = 20;
} else if (qindi == 40) {
towerBaru.jarak = 210;
towerBaru.awal = 25;
towerBaru.delay = 25;
} else if (qindi == 44) {
towerBaru.jarak = 220;
towerBaru.awal = 20;
towerBaru.delay = 20;
} else if (qindi == 48) {
towerBaru.jarak = 230;
towerBaru.awal = 15;
towerBaru.delay = 15;
} else if (qindi == 52) {
towerBaru.jarak = 250;
towerBaru.awal = 15;
towerBaru.delay = 15;
} else if (qindi == 56) {
towerBaru.jarak = 275;
towerBaru.awal = 15;
towerBaru.delay = 15;
} else if (qindi == 60) {
towerBaru.jarak = 300;
towerBaru.awal = 15;
towerBaru.delay = 15;
}
towerBaru.jenisSen = qindi;
towerBaru.jenis = "tower";
towerBaru.onEnterFrame = enterTower;
zuang = zuang - zharga[qindi];
frame.uang = zuang;
}
}
j++;
}
i++;
}
}
function winit() {
dalam1 = 2;
pasKe = 1;
pasKe2 = 1;
panjang = 18;
lebar = 18;
serpihKe = 110000 /* 0x01ADB0 */;
panahKe = 120000 /* 0x01D4C0 */;
darahKe = 130000 /* 0x01FBD0 */;
meledakKe = 190000 /* 0x02E630 */;
asapKe = 200000 /* 0x030D40 */;
jmlPasukan1 = 0;
jmlPasukan2 = 0;
xjmlPasukan1 = 0;
xjmlPasukan2 = 0;
if (pilihanMode != "campaign") {
xscore = 0;
}
darahAwal2 = (panjang * lebar) + 100;
darah2Ke = darahAwal2;
batasDarah2 = (panjang * lebar) + 500;
musuhKe = new Array();
nextMusuh = 0;
jagoanKe = new Array();
nextJagoan = 0;
turnKe = 0;
kill = 0;
turn = 1;
awalDelay = delaytime;
speedPeluru = 15;
ygSerang1 = 0;
ygSerang2 = 0;
pasukanKe = 0;
dalam2 = (panjang * lebar) + 1000;
posAwalX = 50;
if (xlevel == "easy") {
istana1 = 5000;
istana2 = 5000;
} else if (xlevel == "normal") {
istana1 = 10000;
istana2 = 10000;
} else if (xlevel == "hard") {
istana1 = 15000;
istana2 = 15000;
} else if (xlevel == "extreme") {
istana1 = 20000;
istana2 = 20000;
}
maxIstana1 = istana1;
maxIstana2 = istana2;
posAwalY = -100;
posAkhirJ = -1;
posAkhirI = -1;
if (mapKe <= 17) {
health = totHealth;
ammo = totAmmo;
magic = totMagic;
}
i = 1;
while (i <= 2) {
if (jenisCom[i] == 2) {
jenisCom[i] = 1;
}
i++;
}
i = 1;
while (i <= 2) {
jenisSerang[i] = 0;
i++;
}
arrayMusuh = new Array();
arrayJagoan = new Array();
sudahNembak = false;
sudahJalan = false;
sudahChange = false;
sudahItems = false;
sudahMagic = false;
serangBalik = false;
gerakKanan = false;
gerakKiri = false;
gerakBawah = false;
gerakAtas = false;
sekaliKalah = false;
xselesai = true;
posIChara = new Array();
posJChara = new Array();
posDinding = new Array();
posMunculI = new Array();
posMunculJ = new Array();
barJagoan = new Array();
barKe1 = 0;
currentBar1 = 0;
barMusuh = new Array();
barKe2 = 0;
currentBar2 = 0;
i = 0;
while (i <= panjang) {
posDinding[i] = new Array();
j = 0;
while (j <= lebar) {
posDinding[j][i] = 0;
j++;
}
i++;
}
if (((jenisMaping == 3) || (jenisMaping == 5)) || (jenisMaping == 6)) {
zuang = 3000;
zuang2 = 3000;
} else if (jenisMaping == 4) {
zuang = 4000;
zuang2 = 4000;
} else {
zuang = 2500;
zuang2 = 2500;
}
cekMapping();
}
function buatKotak() {
posEmasJ = -9;
posEmasI = -9;
sisaEmas = 0;
sudahEmas = true;
i = 0;
while (i <= panjang) {
j = 0;
while (j <= lebar) {
adaMusuh[j][i] = 0;
ubahDalam("j", "i", "dalam");
namaBaru = "rumput_mc" + dalam;
namaBaru2 = "pohon_mc" + dalam;
if (mapping[j][i] == 7) {
mapping[j][i] = 0;
rumput = attachMovie("laut_mc", namaBaru, dalam1);
} else if (((mapping[j][i] == 8) || (mapping[j][i] == 11)) || (mapping[j][i] == 12)) {
rumput = attachMovie("laut_mc", namaBaru, dalam1);
} else if (mapping[j][i] == 15) {
mapping[j][i] = 0;
rumput = attachMovie("jalan_mc", namaBaru, dalam1);
} else if (((mapping[j][i] == 16) || (mapping[j][i] == 13)) || (mapping[j][i] == 14)) {
rumput = attachMovie("jalan_mc", namaBaru, dalam1);
} else if (rand >= 1) {
if (jenisLand == 1) {
rumput = attachMovie("rumput5_mc", namaBaru, dalam1);
} else if (jenisLand == 2) {
rumput = attachMovie("tanah2_mc", namaBaru, dalam1);
} else if (jenisLand == 3) {
rumput = attachMovie("es0_mc", namaBaru, dalam1);
}
} else if (jenisLand == 1) {
rumput = attachMovie("rumput2_mc", namaBaru, dalam1);
} else if (jenisLand == 2) {
rumput = attachMovie("tanah4_mc", namaBaru, dalam1);
} else if (jenisLand == 3) {
rumput = attachMovie("es0_mc", namaBaru, dalam1);
}
posX = i * 50;
posY = j * 50;
rumput._x = posAwalX + ((300 + posX) - posY);
rumput._y = posAwalY + (-100 + ((posX + posY) / 2));
rumput._xscale = 165;
rumput._yscale = 165;
rand = random(2);
if (rand == 0) {
if (jenisLand == 1) {
dinding = attachMovie("pohon3_mc", namaBaru2, dalam2);
} else if (jenisLand == 2) {
dinding = attachMovie("batu3_mc", namaBaru2, dalam2);
} else if (jenisLand == 3) {
dinding = attachMovie("es3_mc", namaBaru2, dalam2);
}
} else if (rand == 1) {
if (jenisLand == 1) {
dinding = attachMovie("pohon4_mc", namaBaru2, dalam2);
} else if (jenisLand == 2) {
dinding = attachMovie("batu4_mc", namaBaru2, dalam2);
} else if (jenisLand == 3) {
dinding = attachMovie("es5_mc", namaBaru2, dalam2);
}
}
if (((mapping[j][i] == 1) || (mapping[j][i] == 4)) || (mapping[j][i] == 6)) {
dinding._visible = true;
} else if (mapping[j][i] == 8) {
mapping[j][i] = 1;
dinding._visible = false;
} else {
dinding._visible = false;
}
if (mapping[j][i] == 4) {
dinding.jenis = "pohon";
} else if (mapping[j][i] == 5) {
mapping[j][i] = 1;
} else if (mapping[j][i] == 2) {
mapping[j][i] = 0;
posMunculJ[1] = j;
posMunculI[1] = i;
} else if (mapping[j][i] == -2) {
mapping[j][i] = 0;
posMunculJ[7] = j;
posMunculI[7] = i;
} else if (mapping[j][i] == 3) {
mapping[j][i] = 0;
posMunculJ[2] = j;
posMunculI[2] = i;
} else if (mapping[j][i] == -3) {
mapping[j][i] = 0;
posMunculJ[8] = j;
posMunculI[8] = i;
} else if (mapping[j][i] == 11) {
mapping[j][i] = 0;
posMunculJ[3] = j;
posMunculI[3] = i;
} else if (mapping[j][i] == 12) {
mapping[j][i] = 0;
posMunculJ[4] = j;
posMunculI[4] = i;
} else if (mapping[j][i] == 13) {
mapping[j][i] = 0;
posMunculJ[5] = j;
posMunculI[5] = i;
} else if (mapping[j][i] == 14) {
mapping[j][i] = 0;
posMunculJ[6] = j;
posMunculI[6] = i;
} else if (mapping[j][i] == 9) {
dinding = attachMovie("istana2_mc", namaBaru2, dalam2);
dinding._visible = true;
namaIstana1 = namaBaru2;
dinding.gotoAndStop(10);
} else if (mapping[j][i] == 10) {
dinding = attachMovie("istana1_mc", namaBaru2, dalam2);
dinding._visible = true;
namaIstana2 = namaBaru2;
dinding.gotoAndStop(10);
}
if (mapping[j][i] == 10) {
dinding._x = rumput._x;
dinding._y = rumput._y + 40;
} else if (mapping[j][i] == 9) {
dinding._x = rumput._x + 10;
dinding._y = rumput._y - 55;
} else {
dinding._x = rumput._x + 10;
dinding._y = rumput._y - 55;
}
_root[namaIstana1].nyawa = Math.ceil(istana1);
_root[namaIstana2].nyawa = Math.ceil(istana2);
dinding._xscale = 145;
dinding._yscale = 145;
posDinding[j][i] = dalam2;
dalam1++;
dalam2 = dalam2 + 300;
j++;
}
i++;
}
}
function munculChara(zjenis) {
klik();
frame.uang = zuang;
if ((zjenis >= 49) && (zjenis <= 60)) {
j = posMunculJ[5];
i = posMunculI[5];
} else if ((zjenis >= 37) && (zjenis <= 48)) {
j = posMunculJ[3];
i = posMunculI[3];
} else {
j = posMunculJ[1];
i = posMunculI[1];
}
ubahDalam("j", "i", "dalam");
namaBaru = "pohon_mc" + dalam;
getDalam = _root[namaBaru].getDepth();
if (zjenis == 5) {
chara = attachMovie("sword_mc", "archer" + pasKe, getDalam + pasKe2);
} else if (zjenis == 6) {
chara = attachMovie("sword_mc2", "archer" + pasKe, getDalam + pasKe2);
} else if (zjenis == 7) {
chara = attachMovie("sword_mc3", "archer" + pasKe, getDalam + pasKe2);
} else if (((zjenis == 9) || (zjenis == 10)) || (zjenis == 11)) {
chara = attachMovie("horse_mc", "archer" + pasKe, getDalam + pasKe2);
} else if (((zjenis == 13) || (zjenis == 14)) || (zjenis == 15)) {
chara = attachMovie("rifle_mc", "archer" + pasKe, getDalam + pasKe2);
} else if (zjenis == 17) {
chara = attachMovie("bomberman_mc", "archer" + pasKe, getDalam + pasKe2);
} else if (zjenis == 18) {
chara = attachMovie("bomberman_mc2", "archer" + pasKe, getDalam + pasKe2);
} else if (zjenis == 19) {
chara = attachMovie("bomberman_mc3", "archer" + pasKe, getDalam + pasKe2);
} else if (((zjenis == 21) || (zjenis == 22)) || (zjenis == 23)) {
chara = attachMovie("motor_mc", "archer" + pasKe, getDalam + pasKe2);
} else if (((zjenis == 25) || (zjenis == 26)) || (zjenis == 27)) {
chara = attachMovie("jip_mc", "archer" + pasKe, getDalam + pasKe2);
} else if (((zjenis == 29) || (zjenis == 30)) || (zjenis == 31)) {
chara = attachMovie("truk_mc", "archer" + pasKe, getDalam + pasKe2);
} else if (((zjenis == 33) || (zjenis == 34)) || (zjenis == 35)) {
chara = attachMovie("tank_mc", "archer" + pasKe, getDalam + pasKe2);
} else if (((zjenis == 37) || (zjenis == 38)) || (zjenis == 39)) {
chara = attachMovie("ship_mc", "archer" + pasKe, getDalam + pasKe2);
} else if (((zjenis == 41) || (zjenis == 42)) || (zjenis == 43)) {
chara = attachMovie("destroyer_mc", "archer" + pasKe, getDalam + pasKe2);
} else if (((zjenis == 45) || (zjenis == 46)) || (zjenis == 47)) {
chara = attachMovie("selam_mc", "archer" + pasKe, getDalam + pasKe2);
} else if (((zjenis == 49) || (zjenis == 50)) || (zjenis == 51)) {
chara = attachMovie("heli_mc", "archer" + pasKe, getDalam + pasKe2);
} else if (((zjenis == 53) || (zjenis == 54)) || (zjenis == 55)) {
chara = attachMovie("pesawat_mc", "archer" + pasKe, getDalam + pasKe2);
} else if (((zjenis == 57) || (zjenis == 58)) || (zjenis == 59)) {
chara = attachMovie("jet_mc", "archer" + pasKe, getDalam + pasKe2);
} else {
chara = attachMovie("archer_mc", "archer" + pasKe, getDalam + pasKe2);
}
if ((zjenis >= 49) && (zjenis <= 60)) {
chara.awalX = random(41) - 10;
chara.awalY = random(41) - 10;
} else if ((zjenis >= 37) && (zjenis <= 48)) {
chara.awalX = random(41) + 30;
chara.awalY = random(41) + 30;
} else {
chara.awalX = random(41) + 10;
chara.awalY = random(41) + 10;
}
chara._x = _root[namaBaru]._x + chara.awalX;
chara._y = _root[namaBaru]._y + chara.awalY;
chara._xscale = 65;
chara._yscale = 65;
if ((((((jenisMaping == 1) || (jenisMaping == 3)) || (jenisMaping == 4)) || (jenisMaping == 6)) || (jenisMaping == 7)) || (jenisMaping == 11)) {
chara.gotoAndStop(2);
} else {
chara.gotoAndStop(1);
}
chara.foot.stop();
chara.foot1.stop();
chara.foot2.stop();
chara.foot3.stop();
chara.masihHidup = false;
chara.jenisSen = zjenis;
if (chara.jenisSen == 1) {
chara.nyawa = 8;
chara.jarak = 105;
chara.awal = 20;
chara.delay = 20;
chara.espeed = 0.25;
} else if (chara.jenisSen == 2) {
chara.nyawa = 10;
chara.jarak = 110;
chara.awal = 28;
chara.delay = 28;
chara.espeed = 0.4;
} else if (chara.jenisSen == 3) {
chara.nyawa = 12;
chara.jarak = 100;
chara.awal = 24;
chara.delay = 24;
chara.espeed = 0.3;
} else if (chara.jenisSen == 5) {
chara.nyawa = 24;
chara.jarak = 55;
chara.awal = 8;
chara.delay = 8;
chara.espeed = 0.2;
} else if (chara.jenisSen == 6) {
chara.nyawa = 26;
chara.jarak = 65;
chara.awal = 10;
chara.delay = 10;
chara.espeed = 0.35;
} else if (chara.jenisSen == 7) {
chara.nyawa = 28;
chara.jarak = 45;
chara.awal = 12;
chara.delay = 12;
chara.espeed = 0.25;
} else if (chara.jenisSen == 9) {
chara.nyawa = 35;
chara.jarak = 40;
chara.awal = 10;
chara.delay = 10;
chara.espeed = 0.4;
} else if (chara.jenisSen == 10) {
chara.nyawa = 38;
chara.jarak = 60;
chara.awal = 15;
chara.delay = 15;
chara.espeed = 0.5;
} else if (chara.jenisSen == 11) {
chara.nyawa = 40;
chara.jarak = 80;
chara.awal = 20;
chara.delay = 20;
chara.espeed = 0.45;
} else if (chara.jenisSen == 13) {
chara.nyawa = 45;
chara.jarak = 130;
chara.awal = 30;
chara.delay = 30;
chara.espeed = 0.3;
} else if (chara.jenisSen == 14) {
chara.nyawa = 50;
chara.jarak = 140;
chara.awal = 25;
chara.delay = 25;
chara.espeed = 0.35;
} else if (chara.jenisSen == 15) {
chara.nyawa = 55;
chara.jarak = 120;
chara.awal = 20;
chara.delay = 20;
chara.espeed = 0.25;
} else if (chara.jenisSen == 17) {
chara.nyawa = 60;
chara.jarak = 65;
chara.awal = 15;
chara.delay = 15;
chara.espeed = 0.6;
} else if (chara.jenisSen == 18) {
chara.nyawa = 65;
chara.jarak = 65;
chara.awal = 15;
chara.delay = 15;
chara.espeed = 0.6;
} else if (chara.jenisSen == 19) {
chara.nyawa = 70;
chara.jarak = 65;
chara.awal = 15;
chara.delay = 15;
chara.espeed = 0.6;
} else if (chara.jenisSen == 21) {
chara.nyawa = 85;
chara.jarak = 65;
chara.awal = 15;
chara.delay = 15;
chara.espeed = 0.5;
} else if (chara.jenisSen == 22) {
chara.nyawa = 90;
chara.jarak = 120;
chara.awal = 120;
chara.delay = 25;
chara.espeed = 0.5;
} else if (chara.jenisSen == 23) {
chara.nyawa = 100;
chara.jarak = 65;
chara.awal = 20;
chara.delay = 20;
chara.espeed = 0.4;
} else if (chara.jenisSen == 25) {
chara.nyawa = 200;
chara.jarak = 120;
chara.awal = 20;
chara.delay = 20;
chara.espeed = 0.35;
} else if (chara.jenisSen == 26) {
chara.nyawa = 225;
chara.jarak = 150;
chara.awal = 25;
chara.delay = 25;
chara.espeed = 0.35;
} else if (chara.jenisSen == 27) {
chara.nyawa = 250;
chara.jarak = 160;
chara.awal = 15;
chara.delay = 15;
chara.espeed = 0.35;
} else if (chara.jenisSen == 29) {
chara.nyawa = 350;
chara.jarak = 45;
chara.awal = 10;
chara.delay = 10;
chara.espeed = 0.35;
} else if (chara.jenisSen == 30) {
chara.nyawa = 370;
chara.jarak = 45;
chara.awal = 10;
chara.delay = 10;
chara.espeed = 0.35;
} else if (chara.jenisSen == 31) {
chara.nyawa = 400;
chara.jarak = 170;
chara.awal = 25;
chara.delay = 25;
chara.espeed = 0.35;
} else if (chara.jenisSen == 33) {
chara.nyawa = 460;
chara.jarak = 60;
chara.awal = 20;
chara.delay = 20;
chara.espeed = 0.35;
} else if (chara.jenisSen == 34) {
chara.nyawa = 480;
chara.jarak = 200;
chara.awal = 25;
chara.delay = 25;
chara.espeed = 0.35;
} else if (chara.jenisSen == 35) {
chara.nyawa = 500;
chara.jarak = 210;
chara.awal = 15;
chara.delay = 15;
chara.espeed = 0.35;
} else if (chara.jenisSen == 37) {
chara.nyawa = 525;
chara.jarak = 120;
chara.awal = 20;
chara.delay = 20;
chara.espeed = 0.35;
} else if (chara.jenisSen == 38) {
chara.nyawa = 550;
chara.jarak = 80;
chara.awal = 15;
chara.delay = 15;
chara.espeed = 0.35;
} else if (chara.jenisSen == 39) {
chara.nyawa = 575;
chara.jarak = 200;
chara.awal = 20;
chara.delay = 20;
chara.espeed = 0.35;
} else if (chara.jenisSen == 41) {
chara.nyawa = 600;
chara.jarak = 200;
chara.awal = 20;
chara.delay = 20;
chara.espeed = 0.45;
} else if (chara.jenisSen == 42) {
chara.nyawa = 625;
chara.jarak = 100;
chara.awal = 15;
chara.delay = 15;
chara.espeed = 0.45;
} else if (chara.jenisSen == 43) {
chara.nyawa = 650;
chara.jarak = 210;
chara.awal = 20;
chara.delay = 20;
chara.espeed = 0.45;
} else if (chara.jenisSen == 45) {
chara.nyawa = 700;
chara.jarak = 60;
chara.awal = 15;
chara.delay = 15;
chara.espeed = 0.65;
} else if (chara.jenisSen == 46) {
chara.nyawa = 750;
chara.jarak = 230;
chara.awal = 20;
chara.delay = 20;
chara.espeed = 0.65;
} else if (chara.jenisSen == 47) {
chara.nyawa = 800;
chara.jarak = 250;
chara.awal = 15;
chara.delay = 15;
chara.espeed = 0.65;
} else if (chara.jenisSen == 49) {
chara.nyawa = 1000;
chara.jarak = 200;
chara.awal = 10;
chara.delay = 10;
chara.espeed = 0.6;
} else if (chara.jenisSen == 50) {
chara.nyawa = 1250;
chara.jarak = 210;
chara.awal = 10;
chara.delay = 10;
chara.espeed = 0.6;
} else if (chara.jenisSen == 51) {
chara.nyawa = 1500;
chara.jarak = 220;
chara.awal = 10;
chara.delay = 10;
chara.espeed = 0.6;
} else if (chara.jenisSen == 53) {
chara.nyawa = 1750;
chara.jarak = 200;
chara.awal = 10;
chara.delay = 10;
chara.espeed = 0.7;
} else if (chara.jenisSen == 54) {
chara.nyawa = 2000;
chara.jarak = 220;
chara.awal = 10;
chara.delay = 10;
chara.espeed = 0.7;
} else if (chara.jenisSen == 55) {
chara.nyawa = 2250;
chara.jarak = 230;
chara.awal = 10;
chara.delay = 10;
chara.espeed = 0.7;
} else if (chara.jenisSen == 57) {
chara.nyawa = 3000;
chara.jarak = 230;
chara.awal = 10;
chara.delay = 10;
chara.espeed = 0.9;
} else if (chara.jenisSen == 58) {
chara.nyawa = 4000;
chara.jarak = 260;
chara.awal = 10;
chara.delay = 10;
chara.espeed = 0.9;
} else if (chara.jenisSen == 59) {
chara.nyawa = 5000;
chara.jarak = 310;
chara.awal = 10;
chara.delay = 10;
chara.espeed = 0.9;
}
chara.espeed = chara.espeed * 2;
chara.jenis = 1;
chara.ke = pasKe2;
chara.ke2 = pasKe;
chara.posJ = j;
chara.posI = i;
chara.awalBar = 0;
chara.akhirBar = 300;
chara.speedBar = 24;
chara.finish = false;
chara.muncul.bar._xscale = 0;
chara.onEnterFrame = enterChara2;
jagoanKe[nextJagoan] = pasKe;
barJagoan[barKe1] = pasKe;
arrayJagoan.push(pasKe);
nextJagoan++;
pasKe++;
pasKe2++;
barKe1++;
xjmlPasukan1++;
if (pasKe2 >= 200) {
pasKe2 = 1;
}
}
function enterChara2() {
if (xpaused == false) {
if (this.ke2 == barJagoan[currentBar1]) {
this.awalBar = this.awalBar + this.speedBar;
this.muncul.bar._xscale = 100 * (this.awalBar / this.akhirBar);
if (this.awalBar >= this.akhirBar) {
jmlPasukan1++;
delete this.onEnterFrame;
currentBar1++;
this.awalBar = this.akhirBar;
this.muncul._visible = false;
this.masihHidup = true;
this.onEnterFrame = enterChara;
}
}
}
}
function enterChara3() {
if (xpaused == false) {
if (this.ke2 == barMusuh[currentBar2]) {
this.awalBar = this.awalBar + this.speedBar;
this.muncul.bar._xscale = 100 * (this.awalBar / this.akhirBar);
if (this.awalBar >= this.akhirBar) {
jmlPasukan2++;
delete this.onEnterFrame;
currentBar2++;
this.awalBar = this.akhirBar;
this.muncul._visible = false;
this.masihHidup = true;
this.onEnterFrame = enterChara;
}
}
}
}
function munculMusuh(zjenis) {
if ((zjenis >= 49) && (zjenis <= 60)) {
j = posMunculJ[6];
i = posMunculI[6];
} else if ((zjenis >= 37) && (zjenis <= 48)) {
j = posMunculJ[4];
i = posMunculI[4];
} else {
j = posMunculJ[2];
i = posMunculI[2];
}
ubahDalam("j", "i", "dalam");
namaBaru = "pohon_mc" + dalam;
getDalam = _root[namaBaru].getDepth();
if (zjenis == 5) {
chara = attachMovie("sword2_mc", "archer" + pasKe, getDalam + pasKe2);
} else if (zjenis == 6) {
chara = attachMovie("sword2_mc2", "archer" + pasKe, getDalam + pasKe2);
} else if (zjenis == 7) {
chara = attachMovie("sword2_mc3", "archer" + pasKe, getDalam + pasKe2);
} else if (((zjenis == 9) || (zjenis == 10)) || (zjenis == 11)) {
chara = attachMovie("horse2_mc", "archer" + pasKe, getDalam + pasKe2);
} else if (((zjenis == 13) || (zjenis == 14)) || (zjenis == 15)) {
chara = attachMovie("rifle2_mc", "archer" + pasKe, getDalam + pasKe2);
} else if (zjenis == 17) {
chara = attachMovie("bomberman2_mc", "archer" + pasKe, getDalam + pasKe2);
} else if (zjenis == 18) {
chara = attachMovie("bomberman2_mc2", "archer" + pasKe, getDalam + pasKe2);
} else if (zjenis == 19) {
chara = attachMovie("bomberman2_mc3", "archer" + pasKe, getDalam + pasKe2);
} else if (((zjenis == 21) || (zjenis == 22)) || (zjenis == 23)) {
chara = attachMovie("motor2_mc", "archer" + pasKe, getDalam + pasKe2);
} else if (((zjenis == 25) || (zjenis == 26)) || (zjenis == 27)) {
chara = attachMovie("jip2_mc", "archer" + pasKe, getDalam + pasKe2);
} else if (((zjenis == 29) || (zjenis == 30)) || (zjenis == 31)) {
chara = attachMovie("truk2_mc", "archer" + pasKe, getDalam + pasKe2);
} else if (((zjenis == 33) || (zjenis == 34)) || (zjenis == 35)) {
chara = attachMovie("tank2_mc", "archer" + pasKe, getDalam + pasKe2);
} else if (((zjenis == 37) || (zjenis == 38)) || (zjenis == 39)) {
chara = attachMovie("ship2_mc", "archer" + pasKe, getDalam + pasKe2);
} else if (((zjenis == 41) || (zjenis == 42)) || (zjenis == 43)) {
chara = attachMovie("destroyer2_mc", "archer" + pasKe, getDalam + pasKe2);
} else if (((zjenis == 45) || (zjenis == 46)) || (zjenis == 47)) {
chara = attachMovie("selam2_mc", "archer" + pasKe, getDalam + pasKe2);
} else if (((zjenis == 49) || (zjenis == 50)) || (zjenis == 51)) {
chara = attachMovie("heli2_mc", "archer" + pasKe, getDalam + pasKe2);
} else if (((zjenis == 53) || (zjenis == 54)) || (zjenis == 55)) {
chara = attachMovie("pesawat2_mc", "archer" + pasKe, getDalam + pasKe2);
} else if (((zjenis == 57) || (zjenis == 58)) || (zjenis == 59)) {
chara = attachMovie("jet2_mc", "archer" + pasKe, getDalam + pasKe2);
} else {
chara = attachMovie("archer2_mc", "archer" + pasKe, getDalam + pasKe2);
}
if ((zjenis >= 49) && (zjenis <= 60)) {
chara.awalX = random(41) - 10;
chara.awalY = random(41) - 10;
} else if ((zjenis >= 37) && (zjenis <= 48)) {
chara.awalX = random(41) + 30;
chara.awalY = random(41) + 30;
} else {
chara.awalX = random(41) + 10;
chara.awalY = random(41) + 10;
}
chara._x = _root[namaBaru]._x + chara.awalX;
chara._y = _root[namaBaru]._y + chara.awalY;
chara._xscale = 65;
chara._yscale = 65;
if ((jenisMaping == 4) || (jenisMaping == 6)) {
chara.gotoAndStop(4);
} else {
chara.gotoAndStop(3);
}
chara.foot.stop();
chara.foot1.stop();
chara.foot2.stop();
chara.foot3.stop();
chara.masihHidup = false;
chara.jenisSen = zjenis;
if (chara.jenisSen == 1) {
chara.nyawa = 8;
chara.jarak = 105;
chara.awal = 20;
chara.delay = 20;
chara.espeed = 0.25;
} else if (chara.jenisSen == 2) {
chara.nyawa = 10;
chara.jarak = 110;
chara.awal = 28;
chara.delay = 28;
chara.espeed = 0.4;
} else if (chara.jenisSen == 3) {
chara.nyawa = 12;
chara.jarak = 100;
chara.awal = 24;
chara.delay = 24;
chara.espeed = 0.3;
} else if (chara.jenisSen == 5) {
chara.nyawa = 24;
chara.jarak = 55;
chara.awal = 8;
chara.delay = 8;
chara.espeed = 0.2;
} else if (chara.jenisSen == 6) {
chara.nyawa = 26;
chara.jarak = 65;
chara.awal = 10;
chara.delay = 10;
chara.espeed = 0.35;
} else if (chara.jenisSen == 7) {
chara.nyawa = 28;
chara.jarak = 45;
chara.awal = 12;
chara.delay = 12;
chara.espeed = 0.25;
} else if (chara.jenisSen == 9) {
chara.nyawa = 35;
chara.jarak = 40;
chara.awal = 10;
chara.delay = 10;
chara.espeed = 0.4;
} else if (chara.jenisSen == 10) {
chara.nyawa = 38;
chara.jarak = 60;
chara.awal = 15;
chara.delay = 15;
chara.espeed = 0.5;
} else if (chara.jenisSen == 11) {
chara.nyawa = 40;
chara.jarak = 80;
chara.awal = 20;
chara.delay = 20;
chara.espeed = 0.45;
} else if (chara.jenisSen == 13) {
chara.nyawa = 45;
chara.jarak = 130;
chara.awal = 30;
chara.delay = 30;
chara.espeed = 0.3;
} else if (chara.jenisSen == 14) {
chara.nyawa = 50;
chara.jarak = 140;
chara.awal = 25;
chara.delay = 25;
chara.espeed = 0.35;
} else if (chara.jenisSen == 15) {
chara.nyawa = 55;
chara.jarak = 120;
chara.awal = 20;
chara.delay = 20;
chara.espeed = 0.25;
} else if (chara.jenisSen == 17) {
chara.nyawa = 60;
chara.jarak = 65;
chara.awal = 15;
chara.delay = 15;
chara.espeed = 0.6;
} else if (chara.jenisSen == 18) {
chara.nyawa = 65;
chara.jarak = 65;
chara.awal = 15;
chara.delay = 15;
chara.espeed = 0.6;
} else if (chara.jenisSen == 19) {
chara.nyawa = 70;
chara.jarak = 65;
chara.awal = 15;
chara.delay = 15;
chara.espeed = 0.6;
} else if (chara.jenisSen == 21) {
chara.nyawa = 85;
chara.jarak = 65;
chara.awal = 15;
chara.delay = 15;
chara.espeed = 0.5;
} else if (chara.jenisSen == 22) {
chara.nyawa = 90;
chara.jarak = 120;
chara.awal = 120;
chara.delay = 25;
chara.espeed = 0.5;
} else if (chara.jenisSen == 23) {
chara.nyawa = 100;
chara.jarak = 65;
chara.awal = 20;
chara.delay = 20;
chara.espeed = 0.4;
} else if (chara.jenisSen == 25) {
chara.nyawa = 200;
chara.jarak = 120;
chara.awal = 20;
chara.delay = 20;
chara.espeed = 0.35;
} else if (chara.jenisSen == 26) {
chara.nyawa = 225;
chara.jarak = 150;
chara.awal = 25;
chara.delay = 25;
chara.espeed = 0.35;
} else if (chara.jenisSen == 27) {
chara.nyawa = 250;
chara.jarak = 160;
chara.awal = 15;
chara.delay = 15;
chara.espeed = 0.35;
} else if (chara.jenisSen == 29) {
chara.nyawa = 350;
chara.jarak = 45;
chara.awal = 10;
chara.delay = 10;
chara.espeed = 0.35;
} else if (chara.jenisSen == 30) {
chara.nyawa = 370;
chara.jarak = 45;
chara.awal = 10;
chara.delay = 10;
chara.espeed = 0.35;
} else if (chara.jenisSen == 31) {
chara.nyawa = 400;
chara.jarak = 170;
chara.awal = 25;
chara.delay = 25;
chara.espeed = 0.35;
} else if (chara.jenisSen == 33) {
chara.nyawa = 460;
chara.jarak = 60;
chara.awal = 20;
chara.delay = 20;
chara.espeed = 0.35;
} else if (chara.jenisSen == 34) {
chara.nyawa = 480;
chara.jarak = 200;
chara.awal = 25;
chara.delay = 25;
chara.espeed = 0.35;
} else if (chara.jenisSen == 35) {
chara.nyawa = 500;
chara.jarak = 210;
chara.awal = 15;
chara.delay = 15;
chara.espeed = 0.35;
} else if (chara.jenisSen == 37) {
chara.nyawa = 525;
chara.jarak = 120;
chara.awal = 20;
chara.delay = 20;
chara.espeed = 0.35;
} else if (chara.jenisSen == 38) {
chara.nyawa = 550;
chara.jarak = 80;
chara.awal = 15;
chara.delay = 15;
chara.espeed = 0.35;
} else if (chara.jenisSen == 39) {
chara.nyawa = 575;
chara.jarak = 200;
chara.awal = 20;
chara.delay = 20;
chara.espeed = 0.35;
} else if (chara.jenisSen == 41) {
chara.nyawa = 600;
chara.jarak = 200;
chara.awal = 20;
chara.delay = 20;
chara.espeed = 0.45;
} else if (chara.jenisSen == 42) {
chara.nyawa = 625;
chara.jarak = 100;
chara.awal = 15;
chara.delay = 15;
chara.espeed = 0.45;
} else if (chara.jenisSen == 43) {
chara.nyawa = 650;
chara.jarak = 210;
chara.awal = 20;
chara.delay = 20;
chara.espeed = 0.45;
} else if (chara.jenisSen == 45) {
chara.nyawa = 700;
chara.jarak = 60;
chara.awal = 15;
chara.delay = 15;
chara.espeed = 0.65;
} else if (chara.jenisSen == 46) {
chara.nyawa = 750;
chara.jarak = 230;
chara.awal = 20;
chara.delay = 20;
chara.espeed = 0.65;
} else if (chara.jenisSen == 47) {
chara.nyawa = 800;
chara.jarak = 250;
chara.awal = 15;
chara.delay = 15;
chara.espeed = 0.65;
} else if (chara.jenisSen == 49) {
chara.nyawa = 1000;
chara.jarak = 200;
chara.awal = 10;
chara.delay = 10;
chara.espeed = 0.6;
} else if (chara.jenisSen == 50) {
chara.nyawa = 1250;
chara.jarak = 210;
chara.awal = 10;
chara.delay = 10;
chara.espeed = 0.6;
} else if (chara.jenisSen == 51) {
chara.nyawa = 1500;
chara.jarak = 220;
chara.awal = 10;
chara.delay = 10;
chara.espeed = 0.6;
} else if (chara.jenisSen == 53) {
chara.nyawa = 1750;
chara.jarak = 200;
chara.awal = 10;
chara.delay = 10;
chara.espeed = 0.7;
} else if (chara.jenisSen == 54) {
chara.nyawa = 2000;
chara.jarak = 220;
chara.awal = 10;
chara.delay = 10;
chara.espeed = 0.7;
} else if (chara.jenisSen == 55) {
chara.nyawa = 2250;
chara.jarak = 230;
chara.awal = 10;
chara.delay = 10;
chara.espeed = 0.7;
} else if (chara.jenisSen == 57) {
chara.nyawa = 3000;
chara.jarak = 230;
chara.awal = 10;
chara.delay = 10;
chara.espeed = 0.9;
} else if (chara.jenisSen == 58) {
chara.nyawa = 4000;
chara.jarak = 260;
chara.awal = 10;
chara.delay = 10;
chara.espeed = 0.9;
} else if (chara.jenisSen == 59) {
chara.nyawa = 5000;
chara.jarak = 310;
chara.awal = 10;
chara.delay = 10;
chara.espeed = 0.9;
}
if (xlevel == "easy") {
chara.nyawa = chara.nyawa * 0.3;
chara.espeed = chara.espeed * 0.8;
} else if (xlevel == "normal") {
chara.nyawa = chara.nyawa * 0.5;
chara.espeed = chara.espeed * 1;
} else if (xlevel == "hard") {
chara.nyawa = chara.nyawa * 1.4;
chara.espeed = chara.espeed * 1.4;
} else if (xlevel == "extreme") {
chara.nyawa = chara.nyawa * 1.8;
chara.espeed = chara.espeed * 1.8;
}
chara.espeed = chara.espeed * 2;
if (pilihanMode == "campaign") {
if (jenisMaping == 1) {
chara.nyawa = chara.nyawa * 0.5;
} else if (jenisMaping == 2) {
chara.nyawa = chara.nyawa * 0.6;
} else if (jenisMaping == 3) {
chara.nyawa = chara.nyawa * 0.6;
} else if (jenisMaping == 4) {
chara.nyawa = chara.nyawa * 0.7;
} else if (jenisMaping == 5) {
chara.nyawa = chara.nyawa * 0.7;
} else if (jenisMaping == 6) {
chara.nyawa = chara.nyawa * 0.8;
} else if (jenisMaping == 7) {
chara.nyawa = chara.nyawa * 0.8;
} else if (jenisMaping == 8) {
chara.nyawa = chara.nyawa * 0.9;
} else if (jenisMaping == 9) {
chara.nyawa = chara.nyawa * 0.9;
} else if (jenisMaping == 10) {
chara.nyawa = chara.nyawa * 1;
} else if (jenisMaping == 11) {
chara.nyawa = chara.nyawa * 1;
}
}
chara.jenis = 2;
chara.ke = pasKe2;
chara.ke2 = pasKe;
chara.posJ = j;
chara.posI = i;
chara.awalBar = 0;
chara.akhirBar = 300;
if (xlevel == "easy") {
chara.speedBar = 20;
} else if (xlevel == "normal") {
chara.speedBar = 24;
} else if (xlevel == "hard") {
chara.speedBar = 28;
} else if (xlevel == "extreme") {
chara.speedBar = 32;
}
chara.finish = false;
chara.muncul.bar._xscale = 0;
chara.onEnterFrame = enterChara3;
musuhKe[nextMusuh] = pasKe;
barMusuh[barKe2] = pasKe;
arrayMusuh.push(pasKe);
nextMusuh++;
pasKe++;
pasKe2++;
barKe2++;
xjmlPasukan2++;
if (pasKe2 >= 200) {
pasKe2 = 1;
}
}
function enterAsap() {
if (xpaused == false) {
this._y = this._y - (this.speed / 1.5);
rand = random(2);
if (rand == 0) {
this._x = this._x - 0.5;
} else {
this._x = this._x + 0.5;
}
this._alpha = this._alpha - (random(4) + 1);
if (this._alpha <= 0) {
removeMovieClip(this);
}
}
}
function enterSerpih() {
if (xpaused == false) {
this._y = this._y - this.speed;
if (this.rand == 0) {
this._x = this._x - this.speedY;
} else {
this._x = this._x + this.speedY;
}
this._rotation = this._rotation + 5;
this.speed--;
if (this.speed <= -10) {
removeMovieClip(this);
}
}
}
function cekResistensi(indi, indi2) {
resistensi = 1;
if (elementUnit[indi] == 1) {
resistensi = resistensi1[elementUnit[indi2]];
} else if (elementUnit[indi] == 2) {
resistensi = resistensi2[elementUnit[indi2]];
} else if (elementUnit[indi] == 3) {
resistensi = resistensi3[elementUnit[indi2]];
} else if (elementUnit[indi] == 4) {
resistensi = resistensi4[elementUnit[indi2]];
} else if (elementUnit[indi] == 5) {
resistensi = resistensi5[elementUnit[indi2]];
} else if (elementUnit[indi] == 6) {
resistensi = resistensi6[elementUnit[indi2]];
} else if (elementUnit[indi] == 7) {
resistensi = resistensi7[elementUnit[indi2]];
}
}
function enterPanah() {
if (xpaused == false) {
x1 = this.xtujuX - this._x;
y1 = this.xtujuY - this._y;
sudutPel = 57.2957795130823 * Math.atan(y1 / x1);
if (((sudutPel >= -90) && (sudutPel <= 90)) && (x1 >= 0)) {
rot = sudutPel;
} else {
rot = sudutPel - 180;
}
if (Math.sqrt((x1 * x1) + (y1 * y1)) > speedPeluru) {
if (this.jenisSen == 11) {
this.speed = this.speed + 0.5;
}
if (this.jenisSen == 14) {
this._rotation = this._rotation + 2;
}
this._x = this._x + (this.speed * Math.cos((-rot) * 0.017453));
this._y = this._y - (this.speed * Math.sin((-rot) * 0.017453));
} else {
if (((this.jenisSen == 10) || (this.jenisSen == 11)) || (this.jenisSen == 12)) {
if (adaEfek == true) {
i = 0;
while (i <= 5) {
rand = 11;
serpih = attachMovie("serpih" + rand, "serpih_mc" + meledakKe, meledakKe);
serpih._x = this._x;
serpih._y = this._y;
serpih._xscale = random(5) + 3;
serpih._yscale = serpih._xscale;
serpih._rotation = random(360);
serpih.speed = random(10) + 5;
serpih.rand = random(2);
serpih.speedY = random(5) + 2;
serpih.onEnterFrame = enterSerpih;
meledakKe++;
if (meledakKe >= 192000) {
meledakKe = 190000 /* 0x02E630 */;
}
i++;
}
}
} else if ((this.jenisSen == 30) || (this.jenisSen == 45)) {
if (adaEfek == true) {
i = 0;
while (i <= 3) {
rand = random(2);
if (rand == 1) {
asap = attachMovie("asap2_mc", "asap_mc" + asapKe, asapKe);
} else {
asap = attachMovie("asap_mc", "asap_mc" + asapKe, asapKe);
}
asap._x = (this._x + random(20)) - 10;
asap._y = (this._y + random(20)) - 10;
asap._xscale = random(25) + 25;
asap._yscale = asap._xscale;
asap._rotation = random(360);
asap.speed = random(15) + 1;
asap.onEnterFrame = enterAsap;
asapKe++;
if (asapKe >= 201000) {
asapKe = 200000 /* 0x030D40 */;
}
i++;
}
}
} else if ((((((this.jenisSen == 34) || (this.jenisSen == 35)) || (this.jenisSen == 36)) || (this.jenisSen == 39)) || (this.jenisSen == 43)) || (this.jenisSen == 40)) {
if (adaEfek == true) {
i = 0;
while (i <= 3) {
asap = attachMovie("kilat_mc", "asap_mc" + asapKe, asapKe);
asap._x = (this._x + random(20)) - 10;
asap._y = (this._y + random(20)) - 10;
asap._xscale = random(50) + 25;
asap._yscale = asap._xscale;
asap._rotation = random(360);
asap.speed = random(3) + 10;
asapKe++;
if (asapKe >= 201000) {
asapKe = 200000 /* 0x030D40 */;
}
i++;
}
}
} else if (((this.jenisSen == 44) || (this.jenisSen == 46)) || (this.jenisSen == 54)) {
if (adaEfek == true) {
asap = attachMovie("ledakson_mc", "asap_mc" + asapKe, asapKe);
asap._x = (this._x + random(20)) - 10;
asap._y = (this._y + random(20)) - 10;
asap._xscale = random(50) + 25;
asap._yscale = asap._xscale;
asap._rotation = random(360);
asap.speed = random(3) + 10;
asapKe++;
if (asapKe >= 201000) {
asapKe = 200000 /* 0x030D40 */;
}
}
} else if (((this.jenisSen == 47) || (this.jenisSen == 48)) || (this.jenisSen == 55)) {
if (adaEfek == true) {
asap = attachMovie("ledakion", "asap_mc" + asapKe, asapKe);
asap._x = (this._x + random(20)) - 10;
asap._y = (this._y + random(20)) - 10;
asap._xscale = random(50) + 25;
asap._yscale = asap._xscale;
asap.speed = random(3) + 10;
asapKe++;
if (asapKe >= 201000) {
asapKe = 200000 /* 0x030D40 */;
}
}
} else if ((this.jenisSen == 56) || (this.jenisSen == 58)) {
if (adaEfek == true) {
asap = attachMovie("ledakion2", "asap_mc" + asapKe, asapKe);
asap._x = (this._x + random(20)) - 10;
asap._y = (this._y + random(20)) - 10;
asap._xscale = random(50) + 25;
asap._yscale = asap._xscale;
asap.speed = random(3) + 10;
asapKe++;
if (asapKe >= 201000) {
asapKe = 200000 /* 0x030D40 */;
}
}
} else if ((this.jenisSen == 59) || (this.jenisSen == 60)) {
if (adaEfek == true) {
ledakan = attachMovie("ledakatom_mc", "meledak_mc" + meledakKe, meledakKe);
ledakan._xscale = random(20) + 20;
ledakan._yscale = ledakan._xscale;
ledakan._x = (this._x + random(21)) - 10;
ledakan._y = (this._y + random(21)) - 10;
meledakKe++;
if (meledakKe >= 192000) {
meledakKe = 190000 /* 0x02E630 */;
}
}
if (_root["archer" + this.tujuan].jenisSen <= 24) {
if (adaEfek == true) {
if (this.finish == false) {
i = 0;
while (i <= 2) {
ynamaDarah = "ydarah" + darah2Ke;
ydarah = attachMovie("darah2_mc", ynamaDarah, darah2Ke);
ydarah._x = ((this._x + 25) + random(11)) - 20;
ydarah._y = ((this._y + 25) + random(11)) - 20;
ydarah._rotation = random(360);
ydarah._xscale = random(25) + 25;
ydarah._yscale = ydarah._xscale;
darah2Ke++;
if (darah2Ke >= batasDarah2) {
darah2Ke = darahAwal2;
}
i++;
}
}
}
} else if (adaEfek == true) {
i = 0;
while (i <= 10) {
rand = random(10) + 1;
serpih = attachMovie("serpih" + rand, "serpih_mc" + meledakKe, meledakKe);
serpih._x = this._x;
serpih._y = this._y;
serpih._xscale = random(5) + 3;
serpih._yscale = serpih._xscale;
serpih._rotation = random(360);
serpih.speed = random(10) + 5;
serpih.rand = random(2);
serpih.speedY = random(5) + 2;
serpih.onEnterFrame = enterSerpih;
meledakKe++;
if (meledakKe >= 192000) {
meledakKe = 190000 /* 0x02E630 */;
}
i++;
}
}
}
if (this.finish == true) {
istana1 = istana1 - this.damage;
zuang = zuang + Math.floor(this.damage);
frame.uang = zuang;
xscore = xscore + Math.ceil(this.damage * jenisLevel);
special.scores = "SCORES: " + xscore;
if (musuhSpecial == true) {
musuhSpecial = false;
theSpecialTwo();
}
if (istana1 <= 0) {
i = 0;
while (i <= 5) {
if (adaEfek == true) {
ledakan = attachMovie("meledak_mc", "meledak_mc" + meledakKe, meledakKe);
ledakan._xscale = random(250) + 250;
ledakan._yscale = ledakan._xscale;
ledakan._x = ((this._x + 35) + random(40)) - 20;
ledakan._y = (this._y + random(40)) - 20;
meledakKe++;
if (meledakKe >= 192000) {
meledakKe = 190000 /* 0x02E630 */;
}
}
i++;
}
i = 0;
while (i <= 15) {
if (adaEfek == true) {
rand = random(10) + 1;
serpih = attachMovie("serpih" + rand, "serpih_mc" + meledakKe, meledakKe);
serpih._x = this._x;
serpih._y = this._y;
serpih._xscale = random(5) + 3;
serpih._yscale = serpih._xscale;
serpih._rotation = random(360);
serpih.speed = random(10) + 5;
serpih.rand = random(2);
serpih.speedY = random(5) + 2;
serpih.onEnterFrame = enterSerpih;
meledakKe++;
if (meledakKe >= 192000) {
meledakKe = 190000 /* 0x02E630 */;
}
}
i++;
}
if (xselesai == true) {
xselesai = false;
_root[namaIstana1].gotoAndPlay(15);
}
} else {
_root[namaIstana1].gotoAndStop(Math.floor(10 * (istana1 / maxIstana1)));
_root[namaIstana1].bar.bar_mc._xscale = 100 * (istana1 / maxIstana1);
rand = random(5);
if (rand == 1) {
if (istana1 <= 10000) {
if (adaEfek == true) {
asap = attachMovie("asap_mc", "asap_mc" + asapKe, asapKe);
asap._x = this._x;
asap._y = this._y;
asap._xscale = random(25) + 25;
asap._yscale = asap._xscale;
asap._rotation = random(360);
asap.speed = random(3) + 10;
asap.onEnterFrame = enterAsap;
asapKe++;
if (asapKe >= 201000) {
asapKe = 200000 /* 0x030D40 */;
}
if (istana1 <= 5000) {
asap = attachMovie("asap2_mc", "asap_mc" + asapKe, asapKe);
asap._x = (this._x + random(20)) - 10;
asap._y = (this._y + random(20)) - 10;
asap._xscale = random(25) + 25;
asap._yscale = asap._xscale;
asap._rotation = random(360);
asap.speed = random(3) + 10;
asap.onEnterFrame = enterAsap;
asapKe++;
if (asapKe >= 201000) {
asapKe = 200000 /* 0x030D40 */;
}
}
}
}
if (adaEfek == true) {
i = 0;
while (i <= 3) {
rand = random(10) + 1;
serpih = attachMovie("serpih" + rand, "serpih_mc" + serpihKe, serpihKe);
serpih._x = this._x;
serpih._y = this._y;
serpih._xscale = random(5) + 3;
serpih._yscale = serpih._xscale;
serpih._rotation = random(360);
serpih.speed = random(10) + 5;
serpih.rand = random(2);
serpih.speedY = random(5) + 2;
serpih.onEnterFrame = enterSerpih;
serpihKe++;
if (serpihKe >= 111000) {
serpihKe = 110000 /* 0x01ADB0 */;
}
i++;
}
if (((this.jenisSen == 3) || (this.jenisSen == 6)) || (this.jenisSen == 11)) {
bykApi = random(6) + 3;
i = 0;
while (i <= bykApi) {
ynamaDarah = "ydarah" + darahKe;
ydarah = attachMovie("api2_mc", ynamaDarah, darahKe);
ydarah._x = (this._x + random(11)) - 20;
ydarah._y = (this._y + random(11)) - 20;
ydarah._xscale = random(13) + 5;
ydarah._yscale = ydarah._xscale;
darahKe++;
if (darahKe >= 130000) {
derahKe = 131000 /* 0x01FFB8 */;
}
i++;
}
}
if ((this.jenisSen == 4) || (this.jenisSen == 7)) {
bykApi = random(6) + 3;
i = 0;
while (i <= bykApi) {
ynamaDarah = "ydarah" + darahKe;
ydarah = attachMovie("air2_mc", ynamaDarah, darahKe);
ydarah._x = (this._x + random(11)) - 20;
ydarah._y = (this._y + random(11)) - 20;
ydarah._xscale = random(25) + 25;
ydarah._yscale = ydarah._xscale;
darahKe++;
if (darahKe >= 130000) {
derahKe = 131000 /* 0x01FFB8 */;
}
i++;
}
}
if (this.jenisSen == 1) {
bykApi = random(6) + 3;
ynamaDarah = "ydarah" + darahKe;
ydarah = attachMovie("xpanah_mc", ynamaDarah, darahKe);
ydarah._x = this._x;
ydarah._y = this._y;
ydarah._rotation = this._rotation;
ydarah._xscale = this._xscale;
ydarah._yscale = ydarah._xscale;
darahKe++;
if (darahKe >= 130000) {
derahKe = 131000 /* 0x01FFB8 */;
}
}
}
if (this.jenisSen >= 13) {
backLedak();
if (adaEfek == true) {
i = 0;
while (i <= 3) {
ledakan = attachMovie("meledak_mc", "meledak_mc" + meledakKe, meledakKe);
ledakan._xscale = random(75) + 50;
ledakan._yscale = ledakan._xscale;
ledakan._x = (this._x + random(10)) - 5;
ledakan._y = (this._y + random(10)) - 5;
meledakKe++;
if (meledakKe >= 192000) {
meledakKe = 190000 /* 0x02E630 */;
}
i++;
}
i = 0;
while (i <= 10) {
rand = 12;
serpih = attachMovie("serpih" + rand, "serpih_mc" + meledakKe, meledakKe);
serpih._x = this._x;
serpih._y = this._y;
serpih._xscale = random(5) + 3;
serpih._yscale = serpih._xscale;
serpih._rotation = random(360);
serpih.speed = random(10) + 5;
serpih.rand = random(2);
serpih.speedY = random(5) + 2;
serpih.onEnterFrame = enterSerpih;
meledakKe++;
if (meledakKe >= 192000) {
meledakKe = 190000 /* 0x02E630 */;
}
i++;
}
}
}
if (adaEfek == true) {
if (((((((((((((((this.jenisSen == 15) || (this.jenisSen == 17)) || (this.jenisSen == 18)) || (this.jenisSen == 19)) || (this.jenisSen == 20)) || (this.jenisSen == 23)) || (this.jenisSen == 24)) || (this.jenisSen == 26)) || (this.jenisSen == 28)) || (this.jenisSen == 29)) || (this.jenisSen == 30)) || (this.jenisSen == 32)) || (this.jenisSen == 33)) || (this.jenisSen == 34)) || (this.jenisSen == 36)) {
i = 0;
while (i <= 3) {
ledakan = attachMovie("ledak_mc", "meledak_mc" + meledakKe, meledakKe);
ledakan._xscale = random(50) + 25;
ledakan._yscale = ledakan._xscale;
ledakan._x = (this._x + random(10)) - 5;
ledakan._y = (this._y + random(10)) - 5;
meledakKe++;
if (meledakKe >= 192000) {
meledakKe = 190000 /* 0x02E630 */;
}
i++;
}
}
}
}
}
} else {
if (_root["archer" + this.tujuan].jenisSen <= 24) {
if (adaEfek == true) {
namaDarah = "darah" + darahKe;
xdarah = attachMovie("darah_mc", namaDarah, darahKe);
xdarah._x = (this._x + random(16)) - 7;
xdarah._y = (this._y + random(16)) - 7;
xdarah._rotation = random(360);
xdarah._xscale = random(50) + 50;
xdarah._yscale = xdarah._xscale;
darahKe++;
if (darahKe >= 130000) {
derahKe = 131000 /* 0x01FFB8 */;
}
}
backDarah();
}
if (adaEfek == true) {
if (((this.jenisSen == 3) || (this.jenisSen == 6)) || (this.jenisSen == 11)) {
bykApi = random(6) + 3;
i = 0;
while (i <= bykApi) {
ynamaDarah = "ydarah" + darahKe;
ydarah = attachMovie("api2_mc", ynamaDarah, darahKe);
ydarah._x = (this._x + random(11)) - 20;
ydarah._y = (this._y + random(11)) - 20;
ydarah._xscale = random(9) + 3;
ydarah._yscale = ydarah._xscale;
darahKe++;
if (darahKe >= 130000) {
derahKe = 131000 /* 0x01FFB8 */;
}
i++;
}
} else if (((this.jenisSen == 4) || (this.jenisSen == 7)) || (this.jenisSen == 8)) {
bykApi = random(6) + 3;
i = 0;
while (i <= bykApi) {
ynamaDarah = "ydarah" + darahKe;
ydarah = attachMovie("air2_mc", ynamaDarah, darahKe);
ydarah._x = (this._x + random(11)) - 20;
ydarah._y = (this._y + random(11)) - 20;
ydarah._xscale = random(25) + 25;
ydarah._yscale = ydarah._xscale;
darahKe++;
if (darahKe >= 130000) {
derahKe = 131000 /* 0x01FFB8 */;
}
i++;
}
}
}
if (this.jenisSen >= 13) {
backLedak();
if (adaEfek == true) {
i = 0;
while (i <= 3) {
ledakan = attachMovie("meledak_mc", "meledak_mc" + meledakKe, meledakKe);
ledakan._xscale = random(50) + 25;
ledakan._yscale = ledakan._xscale;
ledakan._x = (this._x + random(10)) - 5;
ledakan._y = (this._y + random(10)) - 5;
meledakKe++;
if (meledakKe >= 192000) {
meledakKe = 190000 /* 0x02E630 */;
}
i++;
}
i = 0;
while (i <= 10) {
rand = 12;
serpih = attachMovie("serpih" + rand, "serpih_mc" + meledakKe, meledakKe);
serpih._x = this._x;
serpih._y = this._y;
serpih._xscale = random(5) + 3;
serpih._yscale = serpih._xscale;
serpih._rotation = random(360);
serpih.speed = random(10) + 5;
serpih.rand = random(2);
serpih.speedY = random(5) + 2;
serpih.onEnterFrame = enterSerpih;
meledakKe++;
if (meledakKe >= 192000) {
meledakKe = 190000 /* 0x02E630 */;
}
i++;
}
}
}
if (adaEfek == true) {
if (((((((((((((((this.jenisSen == 15) || (this.jenisSen == 17)) || (this.jenisSen == 18)) || (this.jenisSen == 19)) || (this.jenisSen == 20)) || (this.jenisSen == 23)) || (this.jenisSen == 24)) || (this.jenisSen == 26)) || (this.jenisSen == 28)) || (this.jenisSen == 29)) || (this.jenisSen == 30)) || (this.jenisSen == 32)) || (this.jenisSen == 33)) || (this.jenisSen == 34)) || (this.jenisSen == 36)) {
i = 0;
while (i <= 3) {
ledakan = attachMovie("ledak_mc", "meledak_mc" + meledakKe, meledakKe);
ledakan._xscale = random(50) + 25;
ledakan._yscale = ledakan._xscale;
ledakan._x = (this._x + random(10)) - 5;
ledakan._y = (this._y + random(10)) - 5;
meledakKe++;
if (meledakKe >= 192000) {
meledakKe = 190000 /* 0x02E630 */;
}
i++;
}
}
if (((((((((((this.jenisSen == 24) || (this.jenisSen == 27)) || (this.jenisSen == 35)) || (this.jenisSen == 36)) || (this.jenisSen == 39)) || (this.jenisSen == 40)) || (this.jenisSen == 42)) || (this.jenisSen == 43)) || (this.jenisSen == 50)) || (this.jenisSen == 53)) || (this.jenisSen == 57)) {
i = 0;
while (i <= 2) {
ledakan = attachMovie("lis_mc", "meledak_mc" + meledakKe, meledakKe);
ledakan._xscale = random(50) + 50;
ledakan._yscale = ledakan._xscale;
ledakan._x = (this._x + random(21)) - 10;
ledakan._y = (this._y + random(21)) - 10;
meledakKe++;
if (meledakKe >= 192000) {
meledakKe = 190000 /* 0x02E630 */;
}
i++;
}
}
if ((this.jenisSen == 51) || (this.jenisSen == 52)) {
i = 0;
while (i <= 2) {
ledakan = attachMovie("listesla_mc", "meledak_mc" + meledakKe, meledakKe);
ledakan._xscale = random(50) + 50;
ledakan._yscale = ledakan._xscale;
ledakan._x = (this._x + random(21)) - 10;
ledakan._y = (this._y + random(21)) - 10;
meledakKe++;
if (meledakKe >= 192000) {
meledakKe = 190000 /* 0x02E630 */;
}
i++;
}
}
}
if (_root["archer" + this.tujuan].masihHidup == true) {
_root["archer" + this.tujuan]._rotation = _root["archer" + this.tujuan]._rotation + (random(11) - 5);
cekResistensi(this.jenisSen, _root["archer" + this.tujuan].jenisSen);
_root["archer" + this.tujuan].nyawa = _root["archer" + this.tujuan].nyawa - (this.damage * resistensi);
xscore = xscore + Math.ceil(_root["archer" + this.tujuan].jenisSen * jenisLevel);
special.scores = "SCORES: " + xscore;
}
if ((_root["archer" + this.tujuan].nyawa <= 0) && (_root["archer" + this.tujuan].masihHidup == true)) {
zi = 0;
while (zi <= arrayMusuh.length) {
if (_root["archer" + this.tujuan].ke2 == arrayMusuh[zi]) {
arrayMusuh.splice(zi, 1);
zi = arrayMusuh.length + 1;
}
zi++;
}
if (this.jenisPasukan == "tower") {
zuang = zuang + Math.floor(zharga[_root["archer" + this.tujuan].jenisSen] * 1.5);
} else {
zuang = zuang + Math.floor(zharga[_root["archer" + this.tujuan].jenisSen] * 0.8);
}
frame.uang = zuang;
if (_root["archer" + this.tujuan].jenisSen <= 24) {
if ((_root["archer" + this.tujuan].jenisSen >= 9) && (_root["archer" + this.tujuan].jenisSen <= 11)) {
backKuda();
} else {
backMati();
}
if (adaEfek == true) {
i = 0;
while (i <= 5) {
ynamaDarah = "ydarah" + darah2Ke;
ydarah = attachMovie("darah2_mc", ynamaDarah, darah2Ke);
ydarah._x = ((this._x + 25) + random(11)) - 20;
ydarah._y = ((this._y + 25) + random(11)) - 20;
ydarah._rotation = random(360);
ydarah._xscale = random(50) + 50;
ydarah._yscale = ydarah._xscale;
darah2Ke++;
if (darah2Ke >= batasDarah2) {
darah2Ke = darahAwal2;
}
i++;
}
}
} else if (adaEfek == true) {
i = 0;
while (i <= 10) {
rand = random(2);
if (rand == 1) {
asap = attachMovie("asap2_mc", "asap_mc" + asapKe, asapKe);
} else {
asap = attachMovie("asap_mc", "asap_mc" + asapKe, asapKe);
}
asap._x = (this._x + random(20)) - 10;
asap._y = (this._y + random(20)) - 10;
asap._xscale = random(25) + 25;
asap._yscale = asap._xscale;
asap._rotation = random(360);
asap.speed = random(15) + 1;
asap.onEnterFrame = enterAsap;
asapKe++;
if (asapKe >= 201000) {
asapKe = 200000 /* 0x030D40 */;
}
i++;
}
}
_root["archer" + this.tujuan].masihHidup = false;
delete _root["archer" + this.tujuan].onEnterFrame;
namaKe = _root["mati" + this.tujuan];
dalamKe = _root["archer" + this.tujuan].getDepth();
goKe = _root["archer" + this.tujuan]._currentframe;
xKe = _root["archer" + this.tujuan]._x;
yKe = _root["archer" + this.tujuan]._y;
xrand = random(3);
if (_root["archer" + this.tujuan].jenisSen <= 3) {
if (xrand == 0) {
mati = attachMovie("mati2_mc1", namaKe, dalamKe);
} else if (xrand == 1) {
mati = attachMovie("mati2_mc2", namaKe, dalamKe);
} else {
mati = attachMovie("mati2_mc3", namaKe, dalamKe);
}
} else if (_root["archer" + this.tujuan].jenisSen <= 7) {
if (xrand == 0) {
mati = attachMovie("xmati2_mc1", namaKe, dalamKe);
} else if (xrand == 1) {
mati = attachMovie("xmati2_mc2", namaKe, dalamKe);
} else {
mati = attachMovie("xmati2_mc3", namaKe, dalamKe);
}
} else if (_root["archer" + this.tujuan].jenisSen <= 11) {
mati = attachMovie("mati3_mc2", namaKe, dalamKe);
} else if (_root["archer" + this.tujuan].jenisSen <= 15) {
mati = attachMovie("ymati2_mc", namaKe, dalamKe);
} else {
_root["archer" + this.tujuan]._visible = false;
removeMovieClip(_root["archer" + this.tujuan]);
if (adaEfek == true) {
ledakan = attachMovie("meledak_mc", "meledak_mc" + meledakKe, meledakKe);
ledakan._xscale = random(150) + 100;
ledakan._yscale = ledakan._xscale;
ledakan._x = (this._x + random(10)) - 5;
ledakan._y = (this._y + random(10)) - 5;
meledakKe++;
if (meledakKe >= 192000) {
meledakKe = 190000 /* 0x02E630 */;
}
}
mati = attachMovie("ymati2_mc", namaKe, dalamKe);
mati._visible = false;
}
if (mati != undefined) {
mati._xscale = 65;
mati._yscale = 65;
mati._x = xKe;
mati._y = yKe;
mati.gotoAndStop(goKe);
mati._rotation = mati._rotation + (random(20) - 10);
}
ygSerang1++;
jmlPasukan2--;
xjmlPasukan2--;
if (((this.jenisSen == 4) || (this.jenisSen == 7)) || (this.jenisSen == 8)) {
if (adaEfek == true) {
i = 0;
while (i <= 5) {
ynamaDarah = "ydarah" + darah2Ke;
ydarah = attachMovie("water2_mc", ynamaDarah, darah2Ke);
ydarah._x = ((this._x + 25) + random(11)) - 20;
ydarah._y = ((this._y + 25) + random(11)) - 20;
ydarah._rotation = random(360);
ydarah._xscale = random(75) + 50;
ydarah._yscale = ydarah._xscale;
darah2Ke++;
if (darah2Ke >= batasDarah2) {
darah2Ke = darahAwal2;
}
i++;
}
}
}
if (this.jenisSen >= 13) {
backLedak();
if (adaEfek == true) {
i = 0;
while (i <= 3) {
ledakan = attachMovie("meledak_mc", "meledak_mc" + meledakKe, meledakKe);
ledakan._xscale = random(75) + 50;
ledakan._yscale = ledakan._xscale;
ledakan._x = (this._x + random(10)) - 5;
ledakan._y = (this._y + random(10)) - 5;
meledakKe++;
if (meledakKe >= 192000) {
meledakKe = 190000 /* 0x02E630 */;
}
i++;
}
i = 0;
while (i <= 10) {
rand = 12;
serpih = attachMovie("serpih" + rand, "serpih_mc" + meledakKe, meledakKe);
serpih._x = this._x;
serpih._y = this._y;
serpih._xscale = random(5) + 3;
serpih._yscale = serpih._xscale;
serpih._rotation = random(360);
serpih.speed = random(10) + 5;
serpih.rand = random(2);
serpih.speedY = random(5) + 2;
serpih.onEnterFrame = enterSerpih;
meledakKe++;
if (meledakKe >= 192000) {
meledakKe = 190000 /* 0x02E630 */;
}
i++;
}
}
}
if (adaEfek == true) {
if (((((((((((((((this.jenisSen == 15) || (this.jenisSen == 17)) || (this.jenisSen == 18)) || (this.jenisSen == 19)) || (this.jenisSen == 20)) || (this.jenisSen == 23)) || (this.jenisSen == 24)) || (this.jenisSen == 26)) || (this.jenisSen == 28)) || (this.jenisSen == 29)) || (this.jenisSen == 30)) || (this.jenisSen == 32)) || (this.jenisSen == 33)) || (this.jenisSen == 34)) || (this.jenisSen == 36)) {
i = 0;
while (i <= 3) {
ledakan = attachMovie("ledak_mc", "meledak_mc" + meledakKe, meledakKe);
ledakan._xscale = random(50) + 25;
ledakan._yscale = ledakan._xscale;
ledakan._x = (this._x + random(10)) - 5;
ledakan._y = (this._y + random(10)) - 5;
meledakKe++;
if (meledakKe >= 192000) {
meledakKe = 190000 /* 0x02E630 */;
}
i++;
}
}
if (((((((((((this.jenisSen == 24) || (this.jenisSen == 27)) || (this.jenisSen == 35)) || (this.jenisSen == 36)) || (this.jenisSen == 39)) || (this.jenisSen == 40)) || (this.jenisSen == 42)) || (this.jenisSen == 43)) || (this.jenisSen == 50)) || (this.jenisSen == 53)) || (this.jenisSen == 57)) {
i = 0;
while (i <= 2) {
ledakan = attachMovie("lis_mc", "meledak_mc" + meledakKe, meledakKe);
ledakan._xscale = random(50) + 50;
ledakan._yscale = ledakan._xscale;
ledakan._x = (this._x + random(21)) - 10;
ledakan._y = (this._y + random(21)) - 10;
meledakKe++;
if (meledakKe >= 192000) {
meledakKe = 190000 /* 0x02E630 */;
}
i++;
}
}
if (((this.jenisSen == 47) || (this.jenisSen == 48)) || (this.jenisSen == 55)) {
asap = attachMovie("ledakion_mc", "asap_mc" + asapKe, asapKe);
asap._x = (this._x + random(20)) - 10;
asap._y = (this._y + random(20)) - 10;
asap._xscale = random(50) + 25;
asap._yscale = asap._xscale;
asap.speed = random(3) + 10;
asapKe++;
if (asapKe >= 201000) {
asapKe = 200000 /* 0x030D40 */;
}
}
if ((this.jenisSen == 56) || (this.jenisSen == 58)) {
asap = attachMovie("ledakion_mc2", "asap_mc" + asapKe, asapKe);
asap._x = (this._x + random(20)) - 10;
asap._y = (this._y + random(20)) - 10;
asap._xscale = random(50) + 25;
asap._yscale = asap._xscale;
asap.speed = random(3) + 10;
asapKe++;
if (asapKe >= 201000) {
asapKe = 200000 /* 0x030D40 */;
}
}
if ((this.jenisSen == 51) || (this.jenisSen == 52)) {
i = 0;
while (i <= 2) {
ledakan = attachMovie("listesla_mc", "meledak_mc" + meledakKe, meledakKe);
ledakan._xscale = random(50) + 50;
ledakan._yscale = ledakan._xscale;
ledakan._x = (this._x + random(21)) - 10;
ledakan._y = (this._y + random(21)) - 10;
meledakKe++;
if (meledakKe >= 192000) {
meledakKe = 190000 /* 0x02E630 */;
}
i++;
}
}
if ((this.jenisSen == 59) || (this.jenisSen == 60)) {
ledakan = attachMovie("ledakatom_mc", "meledak_mc" + meledakKe, meledakKe);
ledakan._xscale = random(50) + 50;
ledakan._yscale = ledakan._xscale;
ledakan._x = (this._x + random(21)) - 10;
ledakan._y = (this._y + random(21)) - 10;
meledakKe++;
if (meledakKe >= 192000) {
meledakKe = 190000 /* 0x02E630 */;
}
}
}
}
}
_root[namaIstana1].nyawa = Math.ceil(istana1);
_root[namaIstana2].nyawa = Math.ceil(istana2);
removeMovieClip(this);
}
}
}
function enterPanah2() {
if (xpaused == false) {
x1 = this.xtujuX - this._x;
y1 = this.xtujuY - this._y;
sudutPel = 57.2957795130823 * Math.atan(y1 / x1);
if (((sudutPel >= -90) && (sudutPel <= 90)) && (x1 >= 0)) {
rot = sudutPel;
} else {
rot = sudutPel - 180;
}
if (Math.sqrt((x1 * x1) + (y1 * y1)) > speedPeluru) {
if (this.jenisSen == 11) {
this.speed = this.speed + 0.5;
}
if (this.jenisSen == 14) {
this._rotation = this._rotation + 2;
}
this._x = this._x + (this.speed * Math.cos((-rot) * 0.017453));
this._y = this._y - (this.speed * Math.sin((-rot) * 0.017453));
} else {
if (((this.jenisSen == 10) || (this.jenisSen == 11)) || (this.jenisSen == 12)) {
if (adaEfek == true) {
i = 0;
while (i <= 10) {
rand = 11;
serpih = attachMovie("serpih" + rand, "serpih_mc" + meledakKe, meledakKe);
serpih._x = this._x;
serpih._y = this._y;
serpih._xscale = random(5) + 3;
serpih._yscale = serpih._xscale;
serpih._rotation = random(360);
serpih.speed = random(10) + 5;
serpih.rand = random(2);
serpih.speedY = random(5) + 2;
serpih.onEnterFrame = enterSerpih;
meledakKe++;
if (meledakKe >= 192000) {
meledakKe = 190000 /* 0x02E630 */;
}
i++;
}
}
} else if ((this.jenisSen == 30) || (this.jenisSen == 45)) {
if (adaEfek == true) {
i = 0;
while (i <= 3) {
rand = random(2);
if (rand == 1) {
asap = attachMovie("asap2_mc", "asap_mc" + asapKe, asapKe);
} else {
asap = attachMovie("asap_mc", "asap_mc" + asapKe, asapKe);
}
asap._x = (this._x + random(20)) - 10;
asap._y = (this._y + random(20)) - 10;
asap._xscale = random(25) + 25;
asap._yscale = asap._xscale;
asap._rotation = random(360);
asap.speed = random(15) + 1;
asap.onEnterFrame = enterAsap;
asapKe++;
if (asapKe >= 201000) {
asapKe = 200000 /* 0x030D40 */;
}
i++;
}
}
} else if ((((((this.jenisSen == 34) || (this.jenisSen == 35)) || (this.jenisSen == 36)) || (this.jenisSen == 39)) || (this.jenisSen == 43)) || (this.jenisSen == 40)) {
if (adaEfek == true) {
i = 0;
while (i <= 3) {
asap = attachMovie("kilat_mc", "asap_mc" + asapKe, asapKe);
asap._x = (this._x + random(20)) - 10;
asap._y = (this._y + random(20)) - 10;
asap._xscale = random(50) + 25;
asap._yscale = asap._xscale;
asap._rotation = random(360);
asap.speed = random(3) + 10;
asapKe++;
if (asapKe >= 201000) {
asapKe = 200000 /* 0x030D40 */;
}
i++;
}
}
} else if (((this.jenisSen == 44) || (this.jenisSen == 46)) || (this.jenisSen == 54)) {
if (adaEfek == true) {
asap = attachMovie("ledakson_mc", "asap_mc" + asapKe, asapKe);
asap._x = (this._x + random(20)) - 10;
asap._y = (this._y + random(20)) - 10;
asap._xscale = random(50) + 25;
asap._yscale = asap._xscale;
asap._rotation = random(360);
asap.speed = random(3) + 10;
asapKe++;
if (asapKe >= 201000) {
asapKe = 200000 /* 0x030D40 */;
}
}
} else if (((this.jenisSen == 47) || (this.jenisSen == 48)) || (this.jenisSen == 55)) {
if (adaEfek == true) {
asap = attachMovie("ledakion", "asap_mc" + asapKe, asapKe);
asap._x = (this._x + random(20)) - 10;
asap._y = (this._y + random(20)) - 10;
asap._xscale = random(50) + 25;
asap._yscale = asap._xscale;
asap.speed = random(3) + 10;
asapKe++;
if (asapKe >= 201000) {
asapKe = 200000 /* 0x030D40 */;
}
}
} else if ((this.jenisSen == 56) || (this.jenisSen == 58)) {
if (adaEfek == true) {
asap = attachMovie("ledakion2", "asap_mc" + asapKe, asapKe);
asap._x = (this._x + random(20)) - 10;
asap._y = (this._y + random(20)) - 10;
asap._xscale = random(50) + 25;
asap._yscale = asap._xscale;
asap.speed = random(3) + 10;
asapKe++;
if (asapKe >= 201000) {
asapKe = 200000 /* 0x030D40 */;
}
}
} else if ((this.jenisSen == 59) || (this.jenisSen == 60)) {
if (adaEfek == true) {
ledakan = attachMovie("ledakatom_mc", "meledak_mc" + meledakKe, meledakKe);
ledakan._xscale = random(50) + 50;
ledakan._yscale = ledakan._xscale;
ledakan._x = (this._x + random(21)) - 10;
ledakan._y = (this._y + random(21)) - 10;
meledakKe++;
if (meledakKe >= 192000) {
meledakKe = 190000 /* 0x02E630 */;
}
}
}
if (_root["archer" + this.tujuan].jenisSen <= 24) {
if (this.finish == false) {
if (adaEfek == true) {
i = 0;
while (i <= 2) {
ynamaDarah = "ydarah" + darah2Ke;
ydarah = attachMovie("darah2_mc", ynamaDarah, darah2Ke);
ydarah._x = (this._x + random(11)) - 20;
ydarah._y = (this._y + random(11)) - 20;
ydarah._rotation = random(360);
ydarah._xscale = random(25) + 25;
ydarah._yscale = ydarah._xscale;
darah2Ke++;
if (darah2Ke >= batasDarah2) {
darah2Ke = darahAwal2;
}
i++;
}
}
}
} else if (adaEfek == true) {
i = 0;
while (i <= 10) {
rand = random(10) + 1;
serpih = attachMovie("serpih" + rand, "serpih_mc" + meledakKe, meledakKe);
serpih._x = this._x;
serpih._y = this._y;
serpih._xscale = random(5) + 3;
serpih._yscale = serpih._xscale;
serpih._rotation = random(360);
serpih.speed = random(10) + 5;
serpih.rand = random(2);
serpih.speedY = random(5) + 2;
serpih.onEnterFrame = enterSerpih;
meledakKe++;
if (meledakKe >= 192000) {
meledakKe = 190000 /* 0x02E630 */;
}
i++;
}
}
if (this.finish == true) {
istana2 = istana2 - this.damage;
zuang2 = zuang2 + Math.floor(this.damage);
if (jenisMaen == "demo") {
if (jagoanSpecial == true) {
jagoanSpecial = false;
theSpecialOne();
}
}
if (istana2 <= 0) {
i = 0;
while (i <= 5) {
if (adaEfek == true) {
ledakan = attachMovie("meledak_mc", "meledak_mc" + meledakKe, meledakKe);
ledakan._xscale = random(250) + 250;
ledakan._yscale = ledakan._xscale;
ledakan._x = ((this._x - 50) + random(40)) - 20;
ledakan._y = ((this._y - 50) + random(40)) - 20;
meledakKe++;
if (meledakKe >= 192000) {
meledakKe = 190000 /* 0x02E630 */;
}
}
i++;
}
i = 0;
while (i <= 25) {
if (adaEfek == true) {
rand = random(10) + 1;
serpih = attachMovie("serpih" + rand, "serpih_mc" + meledakKe, meledakKe);
serpih._x = this._x;
serpih._y = this._y;
serpih._xscale = random(5) + 3;
serpih._yscale = serpih._xscale;
serpih._rotation = random(360);
serpih.speed = random(10) + 5;
serpih.rand = random(2);
serpih.speedY = random(5) + 2;
serpih.onEnterFrame = enterSerpih;
meledakKe++;
if (meledakKe >= 192000) {
meledakKe = 190000 /* 0x02E630 */;
}
}
i++;
}
if (xselesai == true) {
xselesai = false;
_root[namaIstana2].gotoAndPlay(15);
}
} else {
_root[namaIstana2].gotoAndStop(Math.floor(10 * (istana2 / maxIstana2)));
_root[namaIstana2].bar.bar_mc._xscale = 100 * (istana2 / maxIstana2);
if (adaEfek == true) {
rand = random(5);
if (rand == 1) {
if (istana2 <= 10000) {
asap = attachMovie("asap_mc", "asap_mc" + asapKe, asapKe);
asap._x = this._x;
asap._y = this._y;
asap._xscale = random(25) + 25;
asap._yscale = asap._xscale;
asap._rotation = random(360);
asap.speed = random(3) + 10;
asap.onEnterFrame = enterAsap;
asapKe++;
if (asapKe >= 201000) {
asapKe = 200000 /* 0x030D40 */;
}
if (istana2 <= 5000) {
asap = attachMovie("asap2_mc", "asap_mc" + asapKe, asapKe);
asap._x = (this._x + random(20)) - 10;
asap._y = (this._y + random(20)) - 10;
asap._xscale = random(25) + 25;
asap._yscale = asap._xscale;
asap._rotation = random(360);
asap.speed = random(3) + 10;
asap.onEnterFrame = enterAsap;
asapKe++;
if (asapKe >= 201000) {
asapKe = 200000 /* 0x030D40 */;
}
}
}
i = 0;
while (i <= 3) {
rand = random(10) + 1;
serpih = attachMovie("serpih" + rand, "serpih_mc" + serpihKe, serpihKe);
serpih._x = this._x;
serpih._y = this._y;
serpih._xscale = random(5) + 3;
serpih._yscale = serpih._xscale;
serpih._rotation = random(360);
serpih.speed = random(10) + 5;
serpih.rand = random(2);
serpih.speedY = random(5) + 2;
serpih.onEnterFrame = enterSerpih;
serpihKe++;
if (serpihKe >= 111000) {
serpihKe = 110000 /* 0x01ADB0 */;
}
i++;
}
if (((this.jenisSen == 3) || (this.jenisSen == 6)) || (this.jenisSen == 11)) {
bykApi = random(6) + 3;
i = 0;
while (i <= bykApi) {
ynamaDarah = "ydarah" + darahKe;
ydarah = attachMovie("api2_mc", ynamaDarah, darahKe);
ydarah._x = (this._x + random(11)) - 20;
ydarah._y = (this._y + random(11)) - 20;
ydarah._xscale = random(13) + 5;
ydarah._yscale = ydarah._xscale;
darahKe++;
if (darahKe >= 130000) {
derahKe = 131000 /* 0x01FFB8 */;
}
i++;
}
}
if (((this.jenisSen == 4) || (this.jenisSen == 7)) || (this.jenisSen == 8)) {
bykApi = random(6) + 3;
i = 0;
while (i <= bykApi) {
ynamaDarah = "ydarah" + darahKe;
ydarah = attachMovie("air2_mc", ynamaDarah, darahKe);
ydarah._x = (this._x + random(11)) - 20;
ydarah._y = (this._y + random(11)) - 20;
ydarah._xscale = random(25) + 25;
ydarah._yscale = ydarah._xscale;
darahKe++;
if (darahKe >= 130000) {
derahKe = 131000 /* 0x01FFB8 */;
}
i++;
}
}
if (this.jenisSen == 1) {
bykApi = random(6) + 3;
ynamaDarah = "ydarah" + darahKe;
ydarah = attachMovie("xpanah_mc", ynamaDarah, darahKe);
ydarah._x = this._x;
ydarah._y = this._y;
ydarah._rotation = this._rotation;
ydarah._xscale = this._xscale;
ydarah._yscale = ydarah._xscale;
darahKe++;
if (darahKe >= 130000) {
derahKe = 131000 /* 0x01FFB8 */;
}
}
if (this.jenisSen >= 13) {
backLedak();
i = 0;
while (i <= 3) {
ledakan = attachMovie("meledak_mc", "meledak_mc" + meledakKe, meledakKe);
ledakan._xscale = random(75) + 50;
ledakan._yscale = ledakan._xscale;
ledakan._x = (this._x + random(10)) - 5;
ledakan._y = (this._y + random(10)) - 5;
meledakKe++;
if (meledakKe >= 192000) {
meledakKe = 190000 /* 0x02E630 */;
}
i++;
}
i = 0;
while (i <= 10) {
rand = 12;
serpih = attachMovie("serpih" + rand, "serpih_mc" + meledakKe, meledakKe);
serpih._x = this._x;
serpih._y = this._y;
serpih._xscale = random(5) + 3;
serpih._yscale = serpih._xscale;
serpih._rotation = random(360);
serpih.speed = random(10) + 5;
serpih.rand = random(2);
serpih.speedY = random(5) + 2;
serpih.onEnterFrame = enterSerpih;
meledakKe++;
if (meledakKe >= 192000) {
meledakKe = 190000 /* 0x02E630 */;
}
i++;
}
}
}
if (((((((((((((((this.jenisSen == 15) || (this.jenisSen == 17)) || (this.jenisSen == 18)) || (this.jenisSen == 19)) || (this.jenisSen == 20)) || (this.jenisSen == 23)) || (this.jenisSen == 24)) || (this.jenisSen == 26)) || (this.jenisSen == 28)) || (this.jenisSen == 29)) || (this.jenisSen == 30)) || (this.jenisSen == 32)) || (this.jenisSen == 33)) || (this.jenisSen == 34)) || (this.jenisSen == 36)) {
i = 0;
while (i <= 3) {
ledakan = attachMovie("ledak_mc", "meledak_mc" + meledakKe, meledakKe);
ledakan._xscale = random(50) + 25;
ledakan._yscale = ledakan._xscale;
ledakan._x = (this._x + random(10)) - 5;
ledakan._y = (this._y + random(10)) - 5;
meledakKe++;
if (meledakKe >= 192000) {
meledakKe = 190000 /* 0x02E630 */;
}
i++;
}
}
}
}
} else {
if (_root["archer" + this.tujuan].jenisSen <= 24) {
if (adaEfek == true) {
namaDarah = "darah" + darahKe;
xdarah = attachMovie("darah_mc", namaDarah, darahKe);
xdarah._x = (this._x + random(16)) - 7;
xdarah._y = (this._y + random(16)) - 7;
xdarah._rotation = random(360);
xdarah._xscale = random(50) + 50;
xdarah._yscale = xdarah._xscale;
darahKe++;
if (darahKe >= 130000) {
derahKe = 131000 /* 0x01FFB8 */;
}
}
backDarah();
}
if (((this.jenisSen == 3) || (this.jenisSen == 6)) || (this.jenisSen == 11)) {
backApi();
if (adaEfek == true) {
bykApi = random(6) + 3;
i = 0;
while (i <= bykApi) {
ynamaDarah = "ydarah" + darahKe;
ydarah = attachMovie("api2_mc", ynamaDarah, darahKe);
ydarah._x = (this._x + random(21)) - 10;
ydarah._y = (this._y + random(21)) - 10;
ydarah._xscale = random(9) + 3;
ydarah._yscale = ydarah._xscale;
darahKe++;
if (darahKe >= 130000) {
derahKe = 131000 /* 0x01FFB8 */;
}
i++;
}
}
} else if (((this.jenisSen == 4) || (this.jenisSen == 7)) || (this.jenisSen == 8)) {
if (adaEfek == true) {
bykApi = random(6) + 3;
i = 0;
while (i <= bykApi) {
ynamaDarah = "ydarah" + darahKe;
ydarah = attachMovie("air2_mc", ynamaDarah, darahKe);
ydarah._x = (this._x + random(21)) - 10;
ydarah._y = (this._y + random(21)) - 10;
ydarah._xscale = random(25) + 25;
ydarah._yscale = ydarah._xscale;
darahKe++;
if (darahKe >= 130000) {
derahKe = 131000 /* 0x01FFB8 */;
}
i++;
}
}
}
if (this.jenisSen >= 13) {
backLedak();
if (adaEfek == true) {
i = 0;
while (i <= 3) {
ledakan = attachMovie("meledak_mc", "meledak_mc" + meledakKe, meledakKe);
ledakan._xscale = random(50) + 25;
ledakan._yscale = ledakan._xscale;
ledakan._x = (this._x + random(10)) - 5;
ledakan._y = (this._y + random(10)) - 5;
meledakKe++;
if (meledakKe >= 192000) {
meledakKe = 190000 /* 0x02E630 */;
}
i++;
}
i = 0;
while (i <= 10) {
rand = 12;
serpih = attachMovie("serpih" + rand, "serpih_mc" + meledakKe, meledakKe);
serpih._x = this._x;
serpih._y = this._y;
serpih._xscale = random(5) + 3;
serpih._yscale = serpih._xscale;
serpih._rotation = random(360);
serpih.speed = random(10) + 5;
serpih.rand = random(2);
serpih.speedY = random(5) + 2;
serpih.onEnterFrame = enterSerpih;
meledakKe++;
if (meledakKe >= 192000) {
meledakKe = 190000 /* 0x02E630 */;
}
i++;
}
}
}
if (adaEfek == true) {
if (((((((((((((((this.jenisSen == 15) || (this.jenisSen == 17)) || (this.jenisSen == 18)) || (this.jenisSen == 19)) || (this.jenisSen == 20)) || (this.jenisSen == 23)) || (this.jenisSen == 24)) || (this.jenisSen == 26)) || (this.jenisSen == 28)) || (this.jenisSen == 29)) || (this.jenisSen == 30)) || (this.jenisSen == 32)) || (this.jenisSen == 33)) || (this.jenisSen == 34)) || (this.jenisSen == 36)) {
i = 0;
while (i <= 3) {
ledakan = attachMovie("ledak_mc", "meledak_mc" + meledakKe, meledakKe);
ledakan._xscale = random(50) + 25;
ledakan._yscale = ledakan._xscale;
ledakan._x = (this._x + random(10)) - 5;
ledakan._y = (this._y + random(10)) - 5;
meledakKe++;
if (meledakKe >= 192000) {
meledakKe = 190000 /* 0x02E630 */;
}
i++;
}
}
if (((((((((((this.jenisSen == 24) || (this.jenisSen == 27)) || (this.jenisSen == 35)) || (this.jenisSen == 36)) || (this.jenisSen == 39)) || (this.jenisSen == 40)) || (this.jenisSen == 42)) || (this.jenisSen == 43)) || (this.jenisSen == 50)) || (this.jenisSen == 53)) || (this.jenisSen == 57)) {
i = 0;
while (i <= 2) {
ledakan = attachMovie("lis_mc", "meledak_mc" + meledakKe, meledakKe);
ledakan._xscale = random(50) + 50;
ledakan._yscale = ledakan._xscale;
ledakan._x = (this._x + random(21)) - 10;
ledakan._y = (this._y + random(21)) - 10;
meledakKe++;
if (meledakKe >= 192000) {
meledakKe = 190000 /* 0x02E630 */;
}
i++;
}
}
if ((this.jenisSen == 51) || (this.jenisSen == 52)) {
i = 0;
while (i <= 2) {
ledakan = attachMovie("listesla_mc", "meledak_mc" + meledakKe, meledakKe);
ledakan._xscale = random(50) + 50;
ledakan._yscale = ledakan._xscale;
ledakan._x = (this._x + random(21)) - 10;
ledakan._y = (this._y + random(21)) - 10;
meledakKe++;
if (meledakKe >= 192000) {
meledakKe = 190000 /* 0x02E630 */;
}
i++;
}
}
}
if (_root["archer" + this.tujuan].masihHidup == true) {
_root["archer" + this.tujuan]._rotation = _root["archer" + this.tujuan]._rotation + (random(11) - 5);
cekResistensi(this.jenisSen, _root["archer" + this.tujuan].jenisSen);
_root["archer" + this.tujuan].nyawa = _root["archer" + this.tujuan].nyawa - (this.damage * resistensi);
}
if ((_root["archer" + this.tujuan].nyawa <= 0) && (_root["archer" + this.tujuan].masihHidup == true)) {
zi = 0;
while (zi <= arrayJagoan.length) {
if (_root["archer" + this.tujuan].ke2 == arrayJagoan[zi]) {
arrayJagoan.splice(zi, 1);
zi = arrayJagoan.length + 1;
}
zi++;
}
if (this.jenisPasukan == "tower") {
if (xlevel == "easy") {
zuang2 = zuang2 + Math.floor(zharga[_root["archer" + this.tujuan].jenisSen] * 1);
} else if (xlevel == "normal") {
zuang2 = zuang2 + Math.floor(zharga[_root["archer" + this.tujuan].jenisSen] * 1.5);
} else if (xlevel == "hard") {
zuang2 = zuang2 + Math.floor(zharga[_root["archer" + this.tujuan].jenisSen] * 2);
} else if (xlevel == "extreme") {
zuang2 = zuang2 + Math.floor(zharga[_root["archer" + this.tujuan].jenisSen] * 2.5);
}
} else if (xlevel == "easy") {
zuang2 = zuang2 + Math.floor(zharga[_root["archer" + this.tujuan].jenisSen] * 1);
} else if (xlevel == "normal") {
zuang2 = zuang2 + Math.floor(zharga[_root["archer" + this.tujuan].jenisSen] * 0.8);
} else if (xlevel == "hard") {
zuang2 = zuang2 + Math.floor(zharga[_root["archer" + this.tujuan].jenisSen] * 1);
} else if (xlevel == "extreme") {
zuang2 = zuang2 + Math.floor(zharga[_root["archer" + this.tujuan].jenisSen] * 1);
}
if (_root["archer" + this.tujuan].jenisSen <= 24) {
if ((_root["archer" + this.tujuan].jenisSen >= 9) && (_root["archer" + this.tujuan].jenisSen <= 11)) {
backKuda();
} else {
backMati();
}
if (adaEfek == true) {
i = 0;
while (i <= 5) {
ynamaDarah = "ydarah" + darah2Ke;
ydarah = attachMovie("darah2_mc", ynamaDarah, darah2Ke);
ydarah._x = (this._x + random(21)) + 10;
ydarah._y = (this._y + random(21)) + 10;
ydarah._rotation = random(360);
ydarah._xscale = random(50) + 50;
ydarah._yscale = ydarah._xscale;
darah2Ke++;
if (darah2Ke >= batasDarah2) {
darah2Ke = darahAwal2;
}
i++;
}
}
} else if (adaEfek == true) {
i = 0;
while (i <= 10) {
rand = random(2);
if (rand == 1) {
asap = attachMovie("asap2_mc", "asap_mc" + asapKe, asapKe);
} else {
asap = attachMovie("asap_mc", "asap_mc" + asapKe, asapKe);
}
asap._x = (this._x + random(20)) - 10;
asap._y = (this._y + random(20)) - 10;
asap._xscale = random(25) + 25;
asap._yscale = asap._xscale;
asap._rotation = random(360);
asap.speed = random(15) + 1;
asap.onEnterFrame = enterAsap;
asapKe++;
if (asapKe >= 201000) {
asapKe = 200000 /* 0x030D40 */;
}
i++;
}
}
_root["archer" + this.tujuan].masihHidup = false;
delete _root["archer" + this.tujuan].onEnterFrame;
namaKe = _root["mati" + this.tujuan];
dalamKe = _root["archer" + this.tujuan].getDepth();
goKe = _root["archer" + this.tujuan]._currentframe;
xKe = _root["archer" + this.tujuan]._x;
yKe = _root["archer" + this.tujuan]._y;
xrand = random(3);
if (_root["archer" + this.tujuan].jenisSen <= 3) {
if (xrand == 0) {
mati = attachMovie("mati1_mc1", namaKe, dalamKe);
} else if (xrand == 1) {
mati = attachMovie("mati1_mc2", namaKe, dalamKe);
} else {
mati = attachMovie("mati1_mc3", namaKe, dalamKe);
}
} else if (_root["archer" + this.tujuan].jenisSen <= 7) {
if (xrand == 0) {
mati = attachMovie("xmati1_mc1", namaKe, dalamKe);
} else if (xrand == 1) {
mati = attachMovie("xmati1_mc2", namaKe, dalamKe);
} else {
mati = attachMovie("xmati1_mc3", namaKe, dalamKe);
}
} else if (_root["archer" + this.tujuan].jenisSen <= 11) {
mati = attachMovie("mati3_mc1", namaKe, dalamKe);
} else if (_root["archer" + this.tujuan].jenisSen <= 15) {
mati = attachMovie("ymati1_mc", namaKe, dalamKe);
} else {
_root["archer" + this.tujuan]._visible = false;
removeMovieClip(_root["archer" + this.tujuan]);
if (adaEfek == true) {
ledakan = attachMovie("meledak_mc", "meledak_mc" + meledakKe, meledakKe);
ledakan._xscale = random(150) + 100;
ledakan._yscale = ledakan._xscale;
ledakan._x = (this._x + random(10)) - 5;
ledakan._y = (this._y + random(10)) - 5;
meledakKe++;
if (meledakKe >= 192000) {
meledakKe = 190000 /* 0x02E630 */;
}
}
mati = attachMovie("ymati1_mc", namaKe, dalamKe);
mati._visible = false;
}
if (mati != undefined) {
mati._xscale = 65;
mati._yscale = 65;
mati._x = xKe;
mati._y = yKe;
mati.gotoAndStop(goKe);
}
mati._rotation = mati._rotation + (random(20) - 10);
ygSerang2++;
jmlPasukan1--;
xjmlPasukan1--;
if (adaEfek == true) {
if (((this.jenisSen == 4) || (this.jenisSen == 7)) || (this.jenisSen == 8)) {
i = 0;
while (i <= 5) {
ynamaDarah = "ydarah" + darah2Ke;
ydarah = attachMovie("water2_mc", ynamaDarah, darah2Ke);
ydarah._x = ((this._x + 25) + random(11)) - 20;
ydarah._y = ((this._y + 25) + random(11)) - 20;
ydarah._rotation = random(360);
ydarah._xscale = random(75) + 50;
ydarah._yscale = ydarah._xscale;
darah2Ke++;
if (darah2Ke >= batasDarah2) {
darah2Ke = darahAwal2;
}
i++;
}
}
}
if (this.jenisSen >= 13) {
backLedak();
if (adaEfek == true) {
i = 0;
while (i <= 3) {
ledakan = attachMovie("meledak_mc", "meledak_mc" + meledakKe, meledakKe);
ledakan._xscale = random(75) + 50;
ledakan._yscale = ledakan._xscale;
ledakan._x = (this._x + random(10)) - 5;
ledakan._y = (this._y + random(10)) - 5;
meledakKe++;
if (meledakKe >= 192000) {
meledakKe = 190000 /* 0x02E630 */;
}
i++;
}
i = 0;
while (i <= 10) {
rand = 12;
serpih = attachMovie("serpih" + rand, "serpih_mc" + meledakKe, meledakKe);
serpih._x = this._x;
serpih._y = this._y;
serpih._xscale = random(5) + 3;
serpih._yscale = serpih._xscale;
serpih._rotation = random(360);
serpih.speed = random(10) + 5;
serpih.rand = random(2);
serpih.speedY = random(5) + 2;
serpih.onEnterFrame = enterSerpih;
meledakKe++;
if (meledakKe >= 192000) {
meledakKe = 190000 /* 0x02E630 */;
}
i++;
}
}
}
if (adaEfek == true) {
if (((((((((((((((this.jenisSen == 15) || (this.jenisSen == 17)) || (this.jenisSen == 18)) || (this.jenisSen == 19)) || (this.jenisSen == 20)) || (this.jenisSen == 23)) || (this.jenisSen == 24)) || (this.jenisSen == 26)) || (this.jenisSen == 28)) || (this.jenisSen == 29)) || (this.jenisSen == 30)) || (this.jenisSen == 32)) || (this.jenisSen == 33)) || (this.jenisSen == 34)) || (this.jenisSen == 36)) {
i = 0;
while (i <= 3) {
ledakan = attachMovie("ledak_mc", "meledak_mc" + meledakKe, meledakKe);
ledakan._xscale = random(50) + 25;
ledakan._yscale = ledakan._xscale;
ledakan._x = (this._x + random(10)) - 5;
ledakan._y = (this._y + random(10)) - 5;
meledakKe++;
if (meledakKe >= 192000) {
meledakKe = 190000 /* 0x02E630 */;
}
i++;
}
}
if (((((((((((this.jenisSen == 24) || (this.jenisSen == 27)) || (this.jenisSen == 35)) || (this.jenisSen == 36)) || (this.jenisSen == 39)) || (this.jenisSen == 40)) || (this.jenisSen == 42)) || (this.jenisSen == 43)) || (this.jenisSen == 50)) || (this.jenisSen == 53)) || (this.jenisSen == 57)) {
i = 0;
while (i <= 2) {
ledakan = attachMovie("lis_mc", "meledak_mc" + meledakKe, meledakKe);
ledakan._xscale = random(50) + 50;
ledakan._yscale = ledakan._xscale;
ledakan._x = (this._x + random(21)) - 10;
ledakan._y = (this._y + random(21)) - 10;
meledakKe++;
if (meledakKe >= 192000) {
meledakKe = 190000 /* 0x02E630 */;
}
i++;
}
}
if (((this.jenisSen == 47) || (this.jenisSen == 48)) || (this.jenisSen == 55)) {
asap = attachMovie("ledakion_mc", "asap_mc" + asapKe, asapKe);
asap._x = (this._x + random(20)) - 10;
asap._y = (this._y + random(20)) - 10;
asap._xscale = random(50) + 25;
asap._yscale = asap._xscale;
asap.speed = random(3) + 10;
asapKe++;
if (asapKe >= 201000) {
asapKe = 200000 /* 0x030D40 */;
}
}
if ((this.jenisSen == 56) || (this.jenisSen == 58)) {
asap = attachMovie("ledakion_mc2", "asap_mc" + asapKe, asapKe);
asap._x = (this._x + random(20)) - 10;
asap._y = (this._y + random(20)) - 10;
asap._xscale = random(50) + 25;
asap._yscale = asap._xscale;
asap.speed = random(3) + 10;
asapKe++;
if (asapKe >= 201000) {
asapKe = 200000 /* 0x030D40 */;
}
}
if ((this.jenisSen == 51) || (this.jenisSen == 52)) {
i = 0;
while (i <= 2) {
ledakan = attachMovie("listesla_mc", "meledak_mc" + meledakKe, meledakKe);
ledakan._xscale = random(50) + 50;
ledakan._yscale = ledakan._xscale;
ledakan._x = (this._x + random(21)) - 10;
ledakan._y = (this._y + random(21)) - 10;
meledakKe++;
if (meledakKe >= 192000) {
meledakKe = 190000 /* 0x02E630 */;
}
i++;
}
}
if ((this.jenisSen == 59) || (this.jenisSen == 60)) {
ledakan = attachMovie("ledakatom_mc", "meledak_mc" + meledakKe, meledakKe);
ledakan._xscale = random(50) + 50;
ledakan._yscale = ledakan._xscale;
ledakan._x = (this._x + random(21)) - 10;
ledakan._y = (this._y + random(21)) - 10;
meledakKe++;
if (meledakKe >= 192000) {
meledakKe = 190000 /* 0x02E630 */;
}
}
}
}
}
_root[namaIstana1].nyawa = Math.ceil(istana1);
_root[namaIstana2].nyawa = Math.ceil(istana2);
removeMovieClip(this);
}
}
}
function sudahSelesai(indi) {
clearSemua();
if (indi == "menang") {
if (jenisMaen == "demo") {
gotoAndStop (213);
} else if (jenisMaen == "maen") {
if (pilihanMode == "campaign") {
jenisMaping++;
nilaiUpgrades = nilaiUpgrades + Math.ceil(500 * jenisMaping);
if (jenisMaping >= 12) {
jenisMaping = 0;
adaData = undefined;
simpanData();
gotoAndStop (215);
} else {
simpanData();
gotoAndStop ("menangGame");
}
} else {
gotoAndStop (215);
}
}
} else if (indi == "kalah") {
if (jenisMaen == "demo") {
gotoAndStop (214);
} else if (jenisMaen == "maen") {
gotoAndStop (216);
}
}
}
function enterChara() {
if (xpaused == false) {
if (this.jenis == 1) {
if ((this.posI == posMunculI[2]) && (this.posJ == posMunculJ[2])) {
this.finish == true;
}
if (this.finish == true) {
diSerang1 = _root[namaIstana2];
} else {
trand = random(2);
if (trand == 1) {
diSerang1 = musuhKe[ygSerang1];
} else {
diSerang1 = arrayMusuh[random(arrayMusuh.length)];
}
}
if (_root["archer" + diSerang1] != null) {
if (_root["archer" + diSerang1].masihHidup == true) {
this.xJarak = Math.sqrt(Math.pow(this._x - _root["archer" + diSerang1]._x, 2) + Math.pow(this._y - _root["archer" + diSerang1]._y, 2));
} else {
this.xJarak = 999;
}
} else {
this.xJarak = 999;
}
if (this.finish == true) {
this.xJarak = 1;
}
this.awal++;
if (this.xJarak <= this.jarak) {
this.gerakKanan = false;
this.gerakAtas = false;
this.foot.stop();
if (this.awal >= this.delay) {
this._rotation = 0;
this.awal = 0;
if (this.jenisSen == 1) {
panah = attachMovie("panah_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 7.5;
panah.damage = 1;
backPanah();
} else if (this.jenisSen == 2) {
panah = attachMovie("panah3_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 10;
panah.damage = 1.5;
backPanah2();
} else if (this.jenisSen == 3) {
panah = attachMovie("panah2_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 5;
panah.damage = 2.5;
backApi();
} else if (this.jenisSen == 5) {
panah = attachMovie("pedang_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 5;
panah.damage = 3;
panah._visible = false;
backPedang();
} else if (this.jenisSen == 6) {
panah = attachMovie("pedang_mc2", "panah_mc" + panahKe, panahKe);
panah.speed = 3;
panah.damage = 3.5;
backApi();
backPedang();
backPedang2();
} else if (this.jenisSen == 7) {
panah = attachMovie("pedang_mc3", "panah_mc" + panahKe, panahKe);
panah.speed = 4;
panah.damage = 4;
backPedang2();
} else if (this.jenisSen == 9) {
panah = attachMovie("pedang_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 4;
panah.damage = 4;
panah._visible = false;
backPedang();
} else if (this.jenisSen == 10) {
panah = attachMovie("batu_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 8;
panah.damage = 4.5;
backBatu();
backPedang();
backPedang2();
} else if (this.jenisSen == 11) {
panah = attachMovie("meteor_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 2;
panah.damage = 5;
backBatu();
backApi();
backPedang();
backPedang2();
} else if (this.jenisSen == 13) {
panah = attachMovie("gun_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 12;
panah.damage = 14;
backGun();
} else if (this.jenisSen == 14) {
panah = attachMovie("granat_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 6;
panah.damage = 16;
backGranat();
} else if (this.jenisSen == 15) {
panah = attachMovie("canon_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 8;
panah.damage = 18;
backCanon();
} else if (this.jenisSen == 17) {
panah = attachMovie("panah_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 20;
panah.damage = 20;
panah._visible = false;
backBomb2();
} else if (this.jenisSen == 18) {
panah = attachMovie("panah_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 20;
panah.damage = 22;
panah._visible = false;
backBomb2();
} else if (this.jenisSen == 19) {
panah = attachMovie("panah_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 20;
panah.damage = 25;
panah._visible = false;
backBomb2();
} else if (this.jenisSen == 21) {
panah = attachMovie("panah_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 20;
panah.damage = 28;
panah._visible = false;
backBomb2();
} else if (this.jenisSen == 22) {
panah = attachMovie("gun_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 12;
panah.damage = 32;
backGun();
} else if (this.jenisSen == 23) {
panah = attachMovie("bomb_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 10;
panah.damage = 34;
backBomb();
} else if (this.jenisSen == 25) {
panah = attachMovie("gun_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 12;
panah.damage = 40;
backGun();
} else if (this.jenisSen == 26) {
panah = attachMovie("granat_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 8;
panah.damage = 43;
backGranat();
} else if (this.jenisSen == 27) {
panah = attachMovie("listrik_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 16;
panah.damage = 45;
backListrik();
} else if (this.jenisSen == 29) {
panah = attachMovie("bomb_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 10;
panah.damage = 50;
backBomb();
} else if (this.jenisSen == 30) {
panah = attachMovie("granat2_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 6;
panah.damage = 52;
backGranat();
} else if (this.jenisSen == 31) {
panah = attachMovie("gun2_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 25;
panah.damage = 52;
} else if (this.jenisSen == 33) {
panah = attachMovie("panah_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 20;
panah.damage = 60;
panah._visible = false;
backBomb2();
} else if (this.jenisSen == 34) {
panah = attachMovie("misil_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 27;
panah.damage = 65;
backMisil();
} else if (this.jenisSen == 35) {
panah = attachMovie("laser_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 30;
panah.damage = 70;
backLaser();
} else if (this.jenisSen == 37) {
panah = attachMovie("gun_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 12;
panah.damage = 75;
backGun();
} else if (this.jenisSen == 38) {
panah = attachMovie("bomb_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 6;
panah.damage = 80;
backBomb();
} else if (this.jenisSen == 39) {
panah = attachMovie("misil_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 27;
panah.damage = 85;
backMisil();
} else if (this.jenisSen == 41) {
panah = attachMovie("gun2_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 25;
panah.damage = 90;
} else if (this.jenisSen == 42) {
panah = attachMovie("panah_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 20;
panah.damage = 95;
panah._visible = false;
backBomb2();
} else if (this.jenisSen == 43) {
panah = attachMovie("laser_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 30;
panah.damage = 100;
backLaser();
} else if (this.jenisSen == 45) {
panah = attachMovie("granat_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 8;
panah.damage = 105;
backGranat();
} else if (this.jenisSen == 46) {
panah = attachMovie("sonic_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 30;
panah.damage = 110;
backSonic();
} else if (this.jenisSen == 47) {
panah = attachMovie("ion_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 20;
panah.damage = 120;
backIon1();
} else if (this.jenisSen == 49) {
panah = attachMovie("gun2_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 25;
panah.damage = 130;
} else if (this.jenisSen == 50) {
panah = attachMovie("laser_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 30;
panah.damage = 140;
backLaser();
} else if (this.jenisSen == 51) {
panah = attachMovie("tesla_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 30;
panah.damage = 150;
backListrik();
} else if (this.jenisSen == 53) {
panah = attachMovie("misil_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 27;
panah.damage = 160;
backMisil();
} else if (this.jenisSen == 54) {
panah = attachMovie("sonic_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 30;
panah.damage = 170;
backSonic();
} else if (this.jenisSen == 55) {
panah = attachMovie("ion_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 20;
panah.damage = 180;
backIon1();
} else if (this.jenisSen == 57) {
panah = attachMovie("bomb_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 6;
panah.damage = 200;
backBomb();
} else if (this.jenisSen == 58) {
panah = attachMovie("ion2_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 20;
panah.damage = 250;
backIon2();
} else if (this.jenisSen == 59) {
panah = attachMovie("atom_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 10;
panah.damage = 300;
backBomb2();
}
panah.speed = panah.speed * 0.75;
if (this.finish == true) {
panah.finish = true;
}
panah.jenisPasukan = "orang";
panah.jenisSen = this.jenisSen;
panah._x = this._x + 15;
panah._y = this._y + 15;
if (this.jenisSen == 11) {
panah._xscale = 8;
panah._yscale = 8;
} else {
panah._xscale = 10;
panah._yscale = 10;
}
if (this.finish == true) {
panah.xtujuX = ((_root[namaIstana1]._x + 50) + random(30)) - 15;
panah.xtujuY = ((_root[namaIstana1]._y + 50) + random(30)) - 15;
} else {
panah.xtujuX = _root["archer" + diSerang1]._x + 15;
panah.xtujuY = _root["archer" + diSerang1]._y + random(31);
}
panah.tujuan = diSerang1;
x1 = panah.xtujuX - panah._x;
y1 = panah.xtujuY - panah._y;
sudutPel = 57.2957795130823 * Math.atan(y1 / x1);
if (((sudutPel >= -90) && (sudutPel <= 90)) && (x1 >= 0)) {
rot = sudutPel;
} else {
rot = sudutPel - 180;
}
panah._rotation = (rot + random(21)) - 10;
panah.onEnterFrame = enterPanah;
panahKe++;
if (panahKe >= 121000) {
panahKe = 120000 /* 0x01D4C0 */;
}
}
} else {
keJ = this.posJ - 1;
keI = this.posI;
ubahDalam("keJ", "keI", "dalam2");
namaBaru2 = "pohon_mc" + dalam2;
if (mapping[keJ][keI] == 0) {
this.gotoAndStop(1);
this.foot.play();
this.foot1.play();
this.foot2.play();
this.foot3.play();
this.gerakKanan = true;
} else {
this.gerakKanan = false;
}
keJ = this.posJ;
keI = this.posI - 1;
ubahDalam("keJ", "keI", "dalam2");
namaBaru2 = "pohon_mc" + dalam2;
if (mapping[keJ][keI] == 0) {
this.gotoAndStop(2);
this.foot.play();
this.foot1.play();
this.foot2.play();
this.foot3.play();
this.gerakAtas = true;
} else {
this.gerakAtas = false;
}
if ((this.jenisSen >= 49) && (this.jenisSen <= 60)) {
if ((this.posI == posMunculI[6]) && (this.posJ == posMunculJ[6])) {
this.finish = true;
}
} else if ((this.jenisSen >= 37) && (this.jenisSen <= 48)) {
if ((this.posI == posMunculI[4]) && (this.posJ == posMunculJ[4])) {
this.finish = true;
}
} else if ((this.posI == posMunculI[2]) && (this.posJ == posMunculJ[2])) {
this.finish = true;
}
if ((this.posI == posMunculI[8]) && (this.posJ == posMunculJ[8])) {
this.finish = true;
}
}
} else {
if (this.finish == true) {
diSerang2 = _root[namaIstana1];
} else {
trand = random(2);
if (trand == 1) {
diSerang2 = jagoanKe[ygSerang2];
} else {
diSerang2 = arrayJagoan[random(arrayJagoan.length)];
}
}
if (_root["archer" + diSerang2] != null) {
if (_root["archer" + diSerang2].masihHidup == true) {
this.xJarak = Math.sqrt(Math.pow(this._x - _root["archer" + diSerang2]._x, 2) + Math.pow(this._y - _root["archer" + diSerang2]._y, 2));
} else {
this.xJarak = 999;
}
} else {
this.xJarak = 999;
}
if (this.finish == true) {
this.xJarak = 1;
}
this.awal++;
if (this.xJarak <= this.jarak) {
this.gerakKiri = false;
this.gerakBawah = false;
this.foot.stop();
if (this.awal >= this.delay) {
this._rotation = 0;
this.awal = 0;
if (this.jenisSen == 1) {
panah = attachMovie("panah_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 7.5;
panah.damage = 1;
backPanah();
} else if (this.jenisSen == 2) {
panah = attachMovie("panah3_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 10;
panah.damage = 1.5;
backPanah2();
} else if (this.jenisSen == 3) {
panah = attachMovie("panah2_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 5;
panah.damage = 2.5;
backApi();
} else if (this.jenisSen == 5) {
panah = attachMovie("pedang_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 5;
panah.damage = 3;
panah._visible = false;
backPedang();
} else if (this.jenisSen == 6) {
panah = attachMovie("pedang_mc2", "panah_mc" + panahKe, panahKe);
panah.speed = 3;
panah.damage = 3.5;
backApi();
backPedang();
backPedang2();
} else if (this.jenisSen == 7) {
panah = attachMovie("pedang_mc3", "panah_mc" + panahKe, panahKe);
panah.speed = 4;
panah.damage = 4;
backPedang2();
} else if (this.jenisSen == 9) {
panah = attachMovie("pedang_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 4;
panah.damage = 4;
backPedang();
panah._visible = false;
backPedang();
} else if (this.jenisSen == 10) {
panah = attachMovie("batu_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 8;
panah.damage = 4.5;
backBatu();
backPedang();
backPedang2();
} else if (this.jenisSen == 11) {
panah = attachMovie("meteor_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 2;
panah.damage = 5;
backBatu();
backApi();
backPedang();
backPedang2();
} else if (this.jenisSen == 13) {
panah = attachMovie("gun_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 12;
panah.damage = 14;
backGun();
} else if (this.jenisSen == 14) {
panah = attachMovie("granat_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 6;
panah.damage = 16;
backGranat();
} else if (this.jenisSen == 15) {
panah = attachMovie("canon_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 8;
panah.damage = 18;
backCanon();
} else if (this.jenisSen == 17) {
panah = attachMovie("panah_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 20;
panah.damage = 20;
panah._visible = false;
backBomb2();
} else if (this.jenisSen == 18) {
panah = attachMovie("panah_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 20;
panah.damage = 22;
panah._visible = false;
backBomb2();
} else if (this.jenisSen == 19) {
panah = attachMovie("panah_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 20;
panah.damage = 25;
panah._visible = false;
backBomb2();
} else if (this.jenisSen == 21) {
panah = attachMovie("panah_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 20;
panah.damage = 28;
panah._visible = false;
backBomb2();
} else if (this.jenisSen == 22) {
panah = attachMovie("gun_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 12;
panah.damage = 32;
backGun();
} else if (this.jenisSen == 23) {
panah = attachMovie("bomb_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 10;
panah.damage = 34;
backBomb();
} else if (this.jenisSen == 25) {
panah = attachMovie("gun_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 12;
panah.damage = 40;
backGun();
} else if (this.jenisSen == 26) {
panah = attachMovie("granat_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 8;
panah.damage = 43;
backGranat();
} else if (this.jenisSen == 27) {
panah = attachMovie("listrik_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 16;
panah.damage = 45;
backListrik();
} else if (this.jenisSen == 29) {
panah = attachMovie("bomb_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 10;
panah.damage = 50;
backBomb();
} else if (this.jenisSen == 30) {
panah = attachMovie("granat2_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 6;
panah.damage = 52;
backGranat();
} else if (this.jenisSen == 31) {
panah = attachMovie("gun2_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 25;
panah.damage = 52;
} else if (this.jenisSen == 33) {
panah = attachMovie("panah_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 20;
panah.damage = 60;
panah._visible = false;
backBomb2();
} else if (this.jenisSen == 34) {
panah = attachMovie("misil_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 27;
panah.damage = 65;
backMisil();
} else if (this.jenisSen == 35) {
panah = attachMovie("laser_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 30;
panah.damage = 70;
backLaser();
} else if (this.jenisSen == 37) {
panah = attachMovie("gun_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 12;
panah.damage = 75;
backGun();
} else if (this.jenisSen == 38) {
panah = attachMovie("bomb_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 6;
panah.damage = 80;
backBomb();
} else if (this.jenisSen == 39) {
panah = attachMovie("misil_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 27;
panah.damage = 85;
backMisil();
} else if (this.jenisSen == 41) {
panah = attachMovie("gun2_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 25;
panah.damage = 90;
} else if (this.jenisSen == 42) {
panah = attachMovie("panah_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 20;
panah.damage = 95;
panah._visible = false;
backBomb2();
} else if (this.jenisSen == 43) {
panah = attachMovie("laser_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 30;
panah.damage = 100;
backLaser();
} else if (this.jenisSen == 45) {
panah = attachMovie("granat_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 8;
panah.damage = 105;
backGranat();
} else if (this.jenisSen == 46) {
panah = attachMovie("sonic_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 30;
panah.damage = 110;
backSonic();
} else if (this.jenisSen == 47) {
panah = attachMovie("ion_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 20;
panah.damage = 120;
backIon1();
} else if (this.jenisSen == 49) {
panah = attachMovie("gun2_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 25;
panah.damage = 130;
} else if (this.jenisSen == 50) {
panah = attachMovie("laser_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 30;
panah.damage = 140;
backLaser();
} else if (this.jenisSen == 51) {
panah = attachMovie("tesla_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 30;
panah.damage = 150;
backListrik();
} else if (this.jenisSen == 53) {
panah = attachMovie("misil_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 27;
panah.damage = 160;
backMisil();
} else if (this.jenisSen == 54) {
panah = attachMovie("sonic_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 30;
panah.damage = 170;
backSonic();
} else if (this.jenisSen == 55) {
panah = attachMovie("ion_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 20;
panah.damage = 180;
backIon1();
} else if (this.jenisSen == 57) {
panah = attachMovie("bomb_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 6;
panah.damage = 200;
backBomb();
} else if (this.jenisSen == 58) {
panah = attachMovie("ion2_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 20;
panah.damage = 250;
backIon2();
} else if (this.jenisSen == 59) {
panah = attachMovie("atom_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 10;
panah.damage = 300;
backBomb2();
}
panah.speed = panah.speed * 0.75;
if (this.finish == true) {
panah.finish = true;
}
panah.jenisPasukan = "orang";
panah.jenisSen = this.jenisSen;
panah._x = this._x + 15;
panah._y = this._y + 15;
if (this.jenisSen == 11) {
panah._xscale = 8;
panah._yscale = 8;
} else {
panah._xscale = 10;
panah._yscale = 10;
}
if (this.finish == true) {
panah.xtujuX = ((_root[namaIstana2]._x + 100) + random(30)) - 15;
panah.xtujuY = (_root[namaIstana2]._y + random(30)) - 15;
} else {
panah.xtujuX = _root["archer" + diSerang2]._x + 15;
panah.xtujuY = _root["archer" + diSerang2]._y + random(31);
}
panah.tujuan = diSerang2;
x1 = panah.xtujuX - panah._x;
y1 = panah.xtujuY - panah._y;
sudutPel = 57.2957795130823 * Math.atan(y1 / x1);
if (((sudutPel >= -90) && (sudutPel <= 90)) && (x1 >= 0)) {
rot = sudutPel;
} else {
rot = sudutPel - 180;
}
panah._rotation = (rot + random(21)) - 10;
panah.onEnterFrame = enterPanah2;
panahKe++;
if (panahKe >= 121000) {
panahKe = 120000 /* 0x01D4C0 */;
}
}
} else {
keJ = this.posJ + 1;
keI = this.posI;
ubahDalam("keJ", "keI", "dalam2");
namaBaru2 = "pohon_mc" + dalam2;
if (mapping[keJ][keI] == 0) {
this.gotoAndStop(3);
this.foot.play();
this.foot1.play();
this.foot2.play();
this.foot3.play();
this.gerakKiri = true;
} else {
this.gerakKiri = false;
}
keJ = this.posJ;
keI = this.posI + 1;
ubahDalam("keJ", "keI", "dalam2");
namaBaru2 = "pohon_mc" + dalam2;
if (mapping[keJ][keI] == 0) {
this.gotoAndStop(4);
this.foot.play();
this.foot1.play();
this.foot2.play();
this.foot3.play();
this.gerakBawah = true;
} else {
this.gerakBawah = false;
}
if ((this.jenisSen >= 49) && (this.jenisSen <= 60)) {
if ((this.posI == posMunculI[5]) && (this.posJ == posMunculJ[5])) {
this.finish = true;
}
} else if ((this.jenisSen >= 37) && (this.jenisSen <= 48)) {
if ((this.posI == posMunculI[3]) && (this.posJ == posMunculJ[3])) {
this.finish = true;
}
} else if ((this.posI == posMunculI[1]) && (this.posJ == posMunculJ[1])) {
this.finish = true;
}
if ((this.posI == posMunculI[7]) && (this.posJ == posMunculJ[7])) {
this.finish = true;
}
}
}
if (this.gerakKanan == true) {
this._x = this._x + (2 * this.espeed);
this._y = this._y - (1 * this.espeed);
if ((this._x >= (_root[namaBaru2]._x + this.awalX)) && (this._y <= (_root[namaBaru2]._y + this.awalY))) {
kedalaman = _root[namaBaru2].getDepth() + this.ke;
this.swapDepths(kedalaman);
this.posJ--;
}
} else if (this.gerakAtas == true) {
this._x = this._x - (2 * this.espeed);
this._y = this._y - (1 * this.espeed);
if ((this._x <= (_root[namaBaru2]._x + this.awalX)) && (this._y <= (_root[namaBaru2]._y + this.awalY))) {
kedalaman = _root[namaBaru2].getDepth() + this.ke;
this.swapDepths(kedalaman);
this.posI--;
}
} else if (this.gerakKiri == true) {
this._x = this._x - (2 * this.espeed);
this._y = this._y + (1 * this.espeed);
if ((this._x <= (_root[namaBaru2]._x + this.awalX)) && (this._y >= (_root[namaBaru2]._y + this.awalY))) {
kedalaman = _root[namaBaru2].getDepth() + this.ke;
this.swapDepths(kedalaman);
this.posJ++;
}
} else if (this.gerakBawah == true) {
this._x = this._x + (2 * this.espeed);
this._y = this._y + (1 * this.espeed);
if ((this._x >= (_root[namaBaru2]._x + this.awalX)) && (this._y >= (_root[namaBaru2]._y + this.awalY))) {
kedalaman = _root[namaBaru2].getDepth() + this.ke;
this.swapDepths(kedalaman);
this.posI++;
}
} else {
if ((istana1 > 0) && (istana2 > 0)) {
if (this.jenis == 1) {
if ((this.jenisSen >= 49) && (this.jenisSen <= 60)) {
if ((this.posI == posMunculI[6]) && (this.posJ == posMunculJ[6])) {
this.finish = true;
}
if ((this.posI == posMunculI[2]) && (this.posJ == posMunculJ[2])) {
this.finish = true;
}
} else if ((this.jenisSen >= 37) && (this.jenisSen <= 48)) {
if ((this.posI == posMunculI[4]) && (this.posJ == posMunculJ[4])) {
this.finish = true;
}
} else if ((this.posI == posMunculI[2]) && (this.posJ == posMunculJ[2])) {
this.finish = true;
}
if ((this.posI == posMunculI[8]) && (this.posJ == posMunculJ[8])) {
this.finish = true;
}
} else if (this.jenis == 2) {
if ((this.jenisSen >= 49) && (this.jenisSen <= 60)) {
if ((this.posI == posMunculI[5]) && (this.posJ == posMunculJ[5])) {
this.finish = true;
}
if ((this.posI == posMunculI[1]) && (this.posJ == posMunculJ[1])) {
this.finish = true;
}
} else if ((this.jenisSen >= 37) && (this.jenisSen <= 48)) {
if ((this.posI == posMunculI[3]) && (this.posJ == posMunculJ[3])) {
this.finish = true;
}
} else if ((this.posI == posMunculI[1]) && (this.posJ == posMunculJ[1])) {
this.finish = true;
}
if ((this.posI == posMunculI[7]) && (this.posJ == posMunculJ[7])) {
this.finish = true;
}
}
} else {
this.finish = false;
}
this.foot.stop();
}
this.muncul._visible = false;
}
}
function theSpecialOne() {
if (xpaused == false) {
if (jmlPasukan2 > 0) {
klik();
if (jenisMaen == "maen") {
this.gotoAndStop(3);
this.info = "SPECIAL USED";
this.enabled = false;
}
masukKena = new Array();
keKena = 0;
zi = 0;
while (zi <= arrayMusuh.length) {
if (jmlPasukan2 <= 5) {
xrand = 6;
} else if (jmlPasukan2 <= 15) {
xrand = 7;
} else if (jmlPasukan2 <= 25) {
xrand = 8;
} else if (jmlPasukan2 <= 35) {
xrand = 9;
} else {
xrand = 10;
}
rand = random(xrand);
if (rand <= 5) {
masukKena[keKena] = arrayMusuh[zi];
keKena++;
}
zi++;
}
jenisSen = pasukanKe + 1;
i = 0;
while (i <= masukKena.length) {
randKena = random(2) + 1;
j = 0;
while (j <= randKena) {
if (_root["archer" + masukKena[i]].masihHidup == true) {
if (jenisSen == 1) {
panah = attachMovie("panah_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 10;
panah.damage = 1.5;
panah.jenisSen = 1;
backPanah();
} else if (jenisSen == 2) {
panah = attachMovie("pedang_mc3", "panah_mc" + panahKe, panahKe);
panah.speed = 12;
panah.damage = 3;
panah.jenisSen = 7;
backPedang();
} else if (jenisSen == 3) {
panah = attachMovie("meteor_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 20;
panah.damage = 5;
panah.jenisSen = 11;
backBatu();
} else if (jenisSen == 4) {
panah = attachMovie("gun_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 15;
panah.damage = 10;
panah.jenisSen = 13;
backGun();
} else if (jenisSen == 5) {
panah = attachMovie("bomb_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 12;
panah.damage = 15;
panah.jenisSen = 23;
backBomb();
} else if (jenisSen == 6) {
panah = attachMovie("granat_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 10;
panah.damage = 20;
panah.jenisSen = 26;
backGranat();
} else if (jenisSen == 7) {
panah = attachMovie("listrik_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 15;
panah.damage = 25;
panah.jenisSen = 24;
backListrik();
} else if (jenisSen == 8) {
panah = attachMovie("granat2_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 10;
panah.damage = 35;
panah.jenisSen = 30;
backGranat();
} else if (jenisSen == 9) {
panah = attachMovie("dinamit_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 15;
panah.damage = 50;
panah.jenisSen = 33;
backBomb2();
} else if (jenisSen == 10) {
panah = attachMovie("misil_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 25;
panah.damage = 65;
panah.jenisSen = 34;
backMisil();
} else if (jenisSen == 11) {
panah = attachMovie("laser_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 25;
panah.damage = 80;
panah.jenisSen = 43;
backLaser();
} else if (jenisSen == 12) {
panah = attachMovie("sonic_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 25;
panah.damage = 100;
panah.jenisSen = 46;
backSonic();
} else if (jenisSen == 13) {
panah = attachMovie("tesla_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 25;
panah.damage = 125;
panah.jenisSen = 51;
backListrik();
} else if (jenisSen == 14) {
rand = random(2);
if (rand == 1) {
panah = attachMovie("ion_mc", "panah_mc" + panahKe, panahKe);
panah.jenisSen = 55;
backIon1();
} else {
panah = attachMovie("ion2_mc", "panah_mc" + panahKe, panahKe);
panah.jenisSen = 58;
backIon2();
}
panah.speed = 20;
panah.damage = 150;
} else if (jenisSen == 15) {
panah = attachMovie("atom_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 10;
panah.damage = 200;
panah.jenisSen = 59;
backBomb2();
}
panah.speed = panah.speed * 0.75;
panah.damage = panah.damage * 0.75;
panah.jenisPasukan = "tower";
if (((((((((jenisSen == 1) || (jenisSen == 3)) || (jenisSen == 5)) || (jenisSen == 6)) || (jenisSen == 8)) || (jenisSen == 9)) || (jenisSen == 12)) || (jenisSen == 14)) || (jenisSen == 15)) {
panah._x = (_root["archer" + masukKena[i]]._x + random(100)) - 50;
panah._y = random(100) - 200;
} else {
panah._x = (_root[namaIstana2]._x + random(30)) - 15;
panah._y = (_root[namaIstana2]._y + random(30)) - 15;
}
if ((((jenisSen == 9) || (jenisSen == 13)) || (jenisSen == 14)) || (jenisSen == 15)) {
panah._xscale = 20;
panah._yscale = 20;
} else {
panah._xscale = 10;
panah._yscale = 10;
}
panah.xtujuX = _root["archer" + masukKena[i]]._x + 15;
panah.xtujuY = _root["archer" + masukKena[i]]._y + random(31);
panah.tujuan = masukKena[i];
x1 = panah.xtujuX - panah._x;
y1 = panah.xtujuY - panah._y;
sudutPel = 57.2957795130823 * Math.atan(y1 / x1);
if (((sudutPel >= -90) && (sudutPel <= 90)) && (x1 >= 0)) {
rot = sudutPel;
} else {
rot = sudutPel - 180;
}
panah._rotation = (rot + random(21)) - 10;
panah.onEnterFrame = enterPanah;
panahKe++;
if (panahKe >= 121000) {
panahKe = 120000 /* 0x01D4C0 */;
}
}
j++;
}
i++;
}
}
}
}
function theSpecialTwo() {
if (xpaused == false) {
if (jmlPasukan1 > 0) {
masukKena2 = new Array();
keKena2 = 0;
zi = 0;
while (zi <= arrayJagoan.length) {
if (jmlPasukan1 <= 5) {
xrand = 6;
} else if (jmlPasukan1 <= 15) {
xrand = 7;
} else if (jmlPasukan1 <= 25) {
xrand = 8;
} else if (jmlPasukan1 <= 35) {
xrand = 9;
} else {
xrand = 10;
}
rand = random(xrand);
if (rand <= 5) {
masukKena2[keKena2] = arrayJagoan[zi];
keKena2++;
}
zi++;
}
jenisSen2 = pasukanKe + 1;
i = 0;
while (i <= masukKena2.length) {
randKena = random(2) + 1;
j = 0;
while (j <= randKena) {
if (_root["archer" + masukKena2[i]].masihHidup == true) {
if (jenisSen2 == 1) {
panah = attachMovie("panah_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 10;
panah.damage = 1.5;
panah.jenisSen = 1;
backPanah();
} else if (jenisSen2 == 2) {
panah = attachMovie("pedang_mc3", "panah_mc" + panahKe, panahKe);
panah.speed = 12;
panah.damage = 3;
panah.jenisSen = 7;
backPedang();
} else if (jenisSen2 == 3) {
panah = attachMovie("meteor_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 20;
panah.damage = 5;
panah.jenisSen = 11;
backBatu();
} else if (jenisSen2 == 4) {
panah = attachMovie("gun_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 15;
panah.damage = 10;
panah.jenisSen = 13;
backGun();
} else if (jenisSen2 == 5) {
panah = attachMovie("bomb_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 12;
panah.damage = 15;
panah.jenisSen = 23;
backBomb();
} else if (jenisSen2 == 6) {
panah = attachMovie("granat_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 10;
panah.damage = 20;
panah.jenisSen = 26;
backGranat();
} else if (jenisSen2 == 7) {
panah = attachMovie("listrik_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 15;
panah.damage = 25;
panah.jenisSen = 24;
backListrik();
} else if (jenisSen2 == 8) {
panah = attachMovie("granat2_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 10;
panah.damage = 35;
panah.jenisSen = 30;
backGranat();
} else if (jenisSen2 == 9) {
panah = attachMovie("dinamit_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 15;
panah.damage = 50;
panah.jenisSen = 33;
backBomb2();
} else if (jenisSen2 == 10) {
panah = attachMovie("misil_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 25;
panah.damage = 65;
panah.jenisSen = 34;
backMisil();
} else if (jenisSen2 == 11) {
panah = attachMovie("laser_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 25;
panah.damage = 80;
panah.jenisSen = 43;
backLaser();
} else if (jenisSen2 == 12) {
panah = attachMovie("sonic_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 25;
panah.damage = 100;
panah.jenisSen = 46;
backSonic();
} else if (jenisSen2 == 13) {
panah = attachMovie("tesla_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 25;
panah.damage = 125;
panah.jenisSen = 51;
backListrik();
} else if (jenisSen2 == 14) {
rand = random(2);
if (rand == 1) {
panah = attachMovie("ion_mc", "panah_mc" + panahKe, panahKe);
panah.jenisSen = 55;
backIon1();
} else {
panah = attachMovie("ion2_mc", "panah_mc" + panahKe, panahKe);
panah.jenisSen = 58;
backIon2();
}
panah.speed = 20;
panah.damage = 150;
} else if (jenisSen2 == 15) {
panah = attachMovie("atom_mc", "panah_mc" + panahKe, panahKe);
panah.speed = 10;
panah.damage = 200;
panah.jenisSen = 59;
backBomb2();
}
if (xlevel == "easy") {
panah.damage = panah.damage * 0.3;
panah.speed = panah.speed * 0.3;
} else if (xlevel == "normal") {
panah.damage = panah.damage * 0.4;
panah.speed = panah.speed * 1;
} else if (xlevel == "hard") {
panah.damage = panah.damage * 1.4;
panah.speed = panah.speed * 1.4;
} else if (xlevel == "extreme") {
panah.damage = panah.damage * 1.8;
panah.speed = panah.speed * 1.8;
}
panah.speed = panah.speed * 0.75;
panah.damage = panah.damage * 2.5;
panah.jenisPasukan = "tower";
if (((((((((jenisSen2 == 1) || (jenisSen2 == 3)) || (jenisSen2 == 5)) || (jenisSen2 == 6)) || (jenisSen2 == 8)) || (jenisSen2 == 9)) || (jenisSen2 == 12)) || (jenisSen2 == 14)) || (jenisSen2 == 15)) {
panah._x = (_root["archer" + masukKena2[i]]._x + random(100)) - 50;
panah._y = random(100) - 200;
} else {
panah._x = (_root[namaIstana1]._x + random(30)) - 15;
panah._y = (_root[namaIstana1]._y + random(30)) - 15;
}
if ((((jenisSen2 == 9) || (jenisSen2 == 13)) || (jenisSen2 == 14)) || (jenisSen2 == 15)) {
panah._xscale = 20;
panah._yscale = 20;
} else {
panah._xscale = 10;
panah._yscale = 10;
}
panah.xtujuX = _root["archer" + masukKena2[i]]._x + 15;
panah.xtujuY = _root["archer" + masukKena2[i]]._y + random(31);
panah.tujuan = masukKena2[i];
x1 = panah.xtujuX - panah._x;
y1 = panah.xtujuY - panah._y;
sudutPel = 57.2957795130823 * Math.atan(y1 / x1);
if (((sudutPel >= -90) && (sudutPel <= 90)) && (x1 >= 0)) {
rot = sudutPel;
} else {
rot = sudutPel - 180;
}
panah._rotation = (rot + random(21)) - 10;
panah.onEnterFrame = enterPanah2;
panahKe++;
if (panahKe >= 121000) {
panahKe = 120000 /* 0x01D4C0 */;
}
}
j++;
}
i++;
}
}
}
}
function cekPause() {
if (xpaused == false) {
xpause_mc = attachMovie("pause_mc", "pause_mc", 999000);
i = 0;
while (i <= pasKe) {
_root["archer" + i].foot.stop();
i++;
}
frame.prev_mc.enabled = false;
frame.next_mc.enabled = false;
if (special.enabled == true) {
tandaSpecial = true;
special.enabled = false;
} else {
tandaSpecial = false;
}
xpaused = true;
} else {
removeMovieClip(pause_mc);
i = 0;
while (i <= pasKe) {
_root["archer" + i].foot.play();
i++;
}
frame.prev_mc.enabled = true;
frame.next_mc.enabled = true;
if (tandaSpecial == true) {
special.enabled = true;
}
xpaused = false;
}
}
function clearSemua() {
delete myListener.onKeyDown;
removeListener(myListener);
clearInterval(idSerang4);
clearInterval(idSerang3);
clearInterval(idKlik);
clearInterval(idMove);
clearInterval(idBalik2);
clearInterval(idBalik);
clearInterval(idDelay);
clearInterval(xidBalik);
clearInterval(idMove);
clearInterval(idTurn2);
clearInterval(idSementara);
clearInterval(idSementara2);
clearInterval(idWaktu);
clearInterval(idAI);
clearInterval(idAI2);
dalam2 = (panjang * lebar) + 1000;
i = 0;
while (i <= panjang) {
j = 0;
while (j <= lebar) {
ubahDalam("j", "i", "dalam");
namaBaru = "rumput_mc" + dalam;
namaBaru2 = "pohon_mc" + dalam;
removeMovieClip(_root[namaBaru]);
removeMovieClip(_root[namaBaru2]);
dalam2++;
j++;
}
i++;
}
i = 0;
while (i <= 20) {
removeMovieClip(_root["text_mc" + i]);
removeMovieClip(_root["rock_mc" + i]);
removeMovieClip(_root["water_mc" + i]);
i++;
}
i = 110000 /* 0x01ADB0 */;
while (i <= 112000) {
removeMovieClip(_root["panah_mc" + i]);
i++;
}
i = 120000 /* 0x01D4C0 */;
while (i <= 122000) {
removeMovieClip(_root["panah_mc" + i]);
i++;
}
i = 130000 /* 0x01FBD0 */;
while (i <= 132000) {
removeMovieClip(_root["ydarah" + i]);
i++;
}
i = 130000 /* 0x01FBD0 */;
while (i <= 132000) {
removeMovieClip(_root["darah" + i]);
i++;
}
i = darahAwal2;
while (i <= darah2Ke) {
removeMovieClip(_root["ydarah" + i]);
i++;
}
i = darahAwal2;
while (i <= darah2Ke) {
removeMovieClip(_root["darah" + i]);
i++;
}
i = 190000 /* 0x02E630 */;
while (i <= 192000) {
removeMovieClip(_root["serpih_mc" + i]);
i++;
}
i = 110000 /* 0x01ADB0 */;
while (i <= 112000) {
removeMovieClip(_root["serpih_mc" + i]);
i++;
}
i = 200000 /* 0x030D40 */;
while (i <= 202000) {
removeMovieClip(_root["asap_mc" + i]);
i++;
}
i = 0;
while (i <= arrayJagoan.length) {
removeMovieClip(_root["archer" + i]);
i++;
}
i = 0;
while (i <= arrayMusuh.length) {
removeMovieClip(_root["archer" + i]);
i++;
}
i = 0;
while (i <= (pasKe + 10)) {
removeMovieClip(_root["archer" + i]);
i++;
}
removeMovieClip(text_mc);
removeMovieClip(box_mc);
removeMovieClip(trans_mc);
removeMovieClip(trans2_mc);
removeMovieClip(trans3_mc);
removeMovieClip(frame_mc);
removeMovieClip(info_mc);
removeMovieClip(penunjuk_mc);
removeMovieClip(jagoan);
removeMovieClip(bintang_mc);
removeMovieClip(panah_mc);
removeMovieClip(msg);
removeMovieClip(emas_mc);
removeMovieClip(ggtext_mc);
removeMovieClip(theMagic);
removeMovieClip(kalah_mc);
removeMovieClip(map_mc);
removeMovieClip(comm1);
removeMovieClip(comm2);
removeMovieClip(frame);
removeMovieClip(special_mc);
removeMovieClip(tower_mc);
removeMovieClip(pause_mc);
}
function ubahDalam(j, i, dalam) {
if ((_root[j] < 10) && (_root[i] < 10)) {
_root[dalam] = (("0" + String(_root[j])) + "0") + String(_root[i]);
} else if ((_root[j] < 10) && (_root[i] >= 10)) {
_root[dalam] = ("0" + String(_root[j])) + String(_root[i]);
} else if ((_root[j] >= 10) && (_root[i] < 10)) {
_root[dalam] = (String(_root[j]) + "0") + String(_root[i]);
} else {
_root[dalam] = String(_root[j]) + String(_root[i]);
}
}
stop();
resistensi1 = new Array("", 1, 2, 3, 0.5, 0.66, 4, 0.33);
resistensi2 = new Array("", 0.5, 1, 4, 0.25, 0.33, 3, 2);
resistensi3 = new Array("", 0.33, 0.25, 1, 4, 5, 2, 0.84);
resistensi4 = new Array("", 2, 4, 0.25, 1, 2, 0.33, 0.66);
resistensi5 = new Array("", 1.5, 3, 0.2, 0.5, 1, 0.25, 4);
resistensi6 = new Array("", 0.25, 0.33, 0.5, 3, 4, 1, 0.2);
resistensi7 = new Array("", 3, 0.5, 1.2, 1.5, 0.25, 5, 1);
elementNama = new Array("", "SOIL", "WATER", "FIRE", "WIND", "WOOD", "METAL", "WAVE");
elementUnit = new Array("", 5, 6, 3, 2, 5, 3, 2, 2, 4, 5, 1, 1, 6, 6, 6, 6, 7, 7, 7, 7, 4, 4, 4, 7, 6, 3, 7, 6, 3, 1, 6, 6, 3, 4, 7, 4, 6, 3, 4, 7, 6, 3, 7, 7, 3, 7, 1, 1, 3, 7, 7, 7, 4, 7, 1, 1, 3, 1, 3, 3);
i = 1;
while (i <= 60) {
_root["element" + i] = ", ELEMENT: " + elementNama[elementUnit[i]];
i++;
}
backMain();
mulaiSaja();
jalanPintas = false;
xpaused = false;
myListener = new Object();
myListener.onKeyDown = function () {
if ((Key.getCode() == 32) || (Key.getCode() == 80)) {
cekPause();
}
if (Key.getCode() == 81) {
if (xpaused == true) {
backMenu();
clearSemua();
gotoAndStop (200);
}
}
};
Key.addListener(myListener);
Frame 210
stop();
gotoAndStop (211);
Frame 211
function cekUpgrades() {
upgradePoints = "Upgrade Points: " + nilaiUpgrades;
i = 1;
while (i <= 60) {
if (_root["sudahUpgrade" + i] == true) {
_root[("box" + i) + "_btn"]._alpha = 100;
} else {
_root[("box" + i) + "_btn"]._alpha = 25;
}
_root[("box" + i) + "_btn"].onRelease = klikBox;
_root[("box" + i) + "_btn"].onRollOver = overBox;
_root[("box" + i) + "_btn"].onRollOut = outBox;
i++;
}
}
function klikBox() {
myStr = new String(this);
if (myStr.length == 16) {
indi = myStr.substr(myStr.length - 5, 1);
} else {
indi = myStr.substr(myStr.length - 6, 2);
}
if (_root["sudahUpgrade" + indi] == false) {
if (nilaiUpgrades >= hargaUnlock[indi]) {
nilaiUpgrades = nilaiUpgrades - hargaUnlock[indi];
_root["sudahUpgrade" + indi] = true;
}
} else {
informasi = "This unit is already unlocked";
}
cekUpgrades();
}
function overBox() {
myStr = new String(this);
if (myStr.length == 16) {
indi = myStr.substr(myStr.length - 5, 1);
} else {
indi = myStr.substr(myStr.length - 6, 2);
}
if (_root["sudahUpgrade" + indi] == false) {
informasi = ("Click to unlock this unit, need " + hargaUnlock[indi]) + " Points";
} else {
informasi = "This unit is already unlocked";
}
}
function outBox() {
informasi = "";
}
stop();
continue_btn.onRelease = function () {
gotoAndStop (209);
};
levelLanjut = "Level " + jenisMaping;
hargaUnlock = new Array("", 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700, 750, 800, 850, 900, 950, 1000, 1050, 1100, 1150, 1200, 1250, 1300, 1350, 1400, 1450, 1500, 1550, 1600, 1650, 1700, 1750, 1800, 1850, 1900, 1950, 2000, 2050, 2100, 2150, 2200, 2250, 2300, 2350, 2400, 2450, 2500, 2550, 2600, 2650, 2700, 2750, 2800, 2850, 2900, 2950, 3000, 3100);
cekUpgrades();
Frame 213
stop();
backMenu();
back_btn.onRollOver = (easy_btn.onRollOver = (normal_btn.onRollOver = (hard_btn.onRollOver = (extreme_btn.onRollOver = function () {
over();
}))));
back_btn.onRelease = function () {
klik();
gotoAndStop (200);
};
Frame 214
stop();
backMenu();
back_btn.onRollOver = (easy_btn.onRollOver = (normal_btn.onRollOver = (hard_btn.onRollOver = (extreme_btn.onRollOver = function () {
over();
}))));
back_btn.onRelease = function () {
klik();
gotoAndStop (200);
};
Frame 215
stop();
backMenu();
back_btn.onRollOver = (easy_btn.onRollOver = (normal_btn.onRollOver = (hard_btn.onRollOver = (extreme_btn.onRollOver = (submit_btn.onRollOver = function () {
over();
})))));
back_btn.onRelease = function () {
klik();
gotoAndStop (200);
};
submit_btn.onRelease = function () {
wwnama = wnama_mc.text;
xxscore = xscore;
getURL (((("http://www.belugerinstudios.com/action.php?act=submitscore&game=FL11121771&name=" + wwnama) + "&score=") + xxscore) + "&key=", "_blank");
this.enabled = false;
klik();
};
wnama = "";
finalScore = "FINAL SCORE: " + xscore;
Selection.setFocus(wnama_mc);
Frame 216
stop();
backMenu();
back_btn.onRollOver = (easy_btn.onRollOver = (normal_btn.onRollOver = (hard_btn.onRollOver = (extreme_btn.onRollOver = (submit_btn.onRollOver = function () {
over();
})))));
back_btn.onRelease = function () {
klik();
gotoAndStop (200);
};
submit_btn.onRelease = function () {
wwnama = wnama_mc.text;
xxscore = xscore;
getURL (((("http://www.belugerinstudios.com/action.php?act=submitscore&game=FL11121771&name=" + wwnama) + "&score=") + xxscore) + "&key=", "_blank");
this.enabled = false;
klik();
};
wnama = "";
finalScore = "FINAL SCORE: " + xscore;
Selection.setFocus(wnama_mc);
Symbol 60 MovieClip [listesla_mc] Frame 3
stop();
removeMovieClip(this);
Symbol 61 MovieClip [lis_mc] Frame 6
stop();
removeMovieClip(this);
Symbol 87 MovieClip [bintang_mc] Frame 15
stop();
removeMovieClip(this);
Symbol 88 MovieClip Frame 10
stop();
Symbol 90 MovieClip Frame 10
stop();
Symbol 93 MovieClip Frame 6
stop();
Symbol 94 MovieClip Frame 16
stop();
_root.peluruMuncul("musuh");
Symbol 95 MovieClip Frame 15
stop();
_root.peluruMuncul("musuh");
Symbol 96 MovieClip Frame 16
stop();
removeMovieClip(_parent);
Symbol 97 MovieClip Frame 16
stop();
removeMovieClip(_parent);
Symbol 107 MovieClip Frame 10
stop();
Symbol 108 MovieClip Frame 10
stop();
Symbol 109 MovieClip Frame 16
stop();
_root.peluruMuncul("jagoan");
Symbol 110 MovieClip Frame 15
stop();
_root.peluruMuncul("jagoan");
Symbol 111 MovieClip Frame 10
stop();
Symbol 112 MovieClip Frame 10
stop();
Symbol 120 MovieClip Frame 10
stop();
Symbol 121 MovieClip Frame 10
stop();
Symbol 122 MovieClip Frame 16
stop();
_root.peluruMuncul("jagoan");
Symbol 123 MovieClip Frame 15
stop();
_root.peluruMuncul("jagoan");
Symbol 124 MovieClip Frame 10
stop();
Symbol 125 MovieClip Frame 10
stop();
Symbol 144 MovieClip Frame 10
stop();
Symbol 146 MovieClip Frame 10
stop();
Symbol 147 MovieClip Frame 16
stop();
_root.peluruMuncul("musuh");
Symbol 149 MovieClip Frame 15
stop();
_root.peluruMuncul("musuh");
Symbol 150 MovieClip Frame 16
stop();
removeMovieClip(_parent);
Symbol 151 MovieClip Frame 16
stop();
removeMovieClip(_parent);
Symbol 157 MovieClip [penunjuk_mc] Frame 1
stop();
Symbol 178 MovieClip Frame 15
stop();
Symbol 180 MovieClip Frame 15
stop();
Symbol 184 MovieClip Frame 30
stop();
_root.peluruMuncul("musuh");
Symbol 185 MovieClip Frame 30
stop();
_root.peluruMuncul("musuh");
Symbol 186 MovieClip Frame 30
stop();
removeMovieClip(_parent);
Symbol 187 MovieClip Frame 30
stop();
removeMovieClip(_parent);
Symbol 194 MovieClip Frame 10
stop();
Symbol 195 MovieClip Frame 10
stop();
Symbol 196 MovieClip Frame 5
stop();
_root.peluruMuncul("jagoan");
Symbol 197 MovieClip Frame 5
stop();
_root.peluruMuncul("jagoan");
Symbol 198 MovieClip Frame 10
stop();
removeMovieClip(this);
Symbol 199 MovieClip Frame 10
stop();
removeMovieClip(this);
Symbol 207 MovieClip Frame 10
stop();
Symbol 209 MovieClip Frame 10
stop();
Symbol 211 MovieClip Frame 5
stop();
_root.peluruMuncul("musuh");
Symbol 212 MovieClip Frame 5
stop();
_root.peluruMuncul("musuh");
Symbol 214 MovieClip Frame 25
stop();
removeMovieClip(_parent);
Symbol 216 MovieClip Frame 25
stop();
removeMovieClip(_parent);
Symbol 223 MovieClip Frame 10
stop();
Symbol 225 MovieClip Frame 10
stop();
Symbol 227 MovieClip Frame 5
stop();
_root.peluruMuncul("musuh");
Symbol 229 MovieClip Frame 5
stop();
_root.peluruMuncul("musuh");
Symbol 230 MovieClip Frame 25
stop();
removeMovieClip(_parent);
Symbol 231 MovieClip Frame 25
stop();
removeMovieClip(_parent);
Symbol 235 MovieClip Frame 15
stop();
Symbol 236 MovieClip Frame 5
stop();
_root.peluruMuncul("musuh");
Symbol 268 MovieClip [meledak_mc] Frame 15
stop();
removeMovieClip(this);
Symbol 269 MovieClip Frame 15
stop();
removeMovieClip(_parent);
Symbol 273 MovieClip Frame 15
stop();
Symbol 274 MovieClip Frame 5
stop();
_root.peluruMuncul("musuh");
Symbol 275 MovieClip Frame 15
stop();
removeMovieClip(_parent);
Symbol 279 MovieClip Frame 15
stop();
Symbol 280 MovieClip Frame 5
stop();
_root.peluruMuncul("musuh");
Symbol 281 MovieClip Frame 15
stop();
removeMovieClip(_parent);
Symbol 285 MovieClip Frame 15
stop();
Symbol 286 MovieClip Frame 5
stop();
_root.peluruMuncul("musuh");
Symbol 287 MovieClip Frame 15
stop();
removeMovieClip(_parent);
Symbol 291 MovieClip Frame 15
stop();
Symbol 292 MovieClip Frame 5
stop();
_root.peluruMuncul("musuh");
Symbol 293 MovieClip Frame 15
stop();
removeMovieClip(_parent);
Symbol 297 MovieClip Frame 15
stop();
Symbol 298 MovieClip Frame 5
stop();
_root.peluruMuncul("musuh");
Symbol 299 MovieClip Frame 15
stop();
removeMovieClip(_parent);
Symbol 303 MovieClip Frame 15
stop();
Symbol 304 MovieClip Frame 5
stop();
_root.peluruMuncul("musuh");
Symbol 305 MovieClip Frame 15
stop();
removeMovieClip(_parent);
Symbol 309 MovieClip Frame 15
stop();
Symbol 310 MovieClip Frame 5
stop();
_root.peluruMuncul("musuh");
Symbol 311 MovieClip Frame 15
stop();
removeMovieClip(_parent);
Symbol 315 MovieClip Frame 15
stop();
Symbol 316 MovieClip Frame 5
stop();
_root.peluruMuncul("musuh");
Symbol 317 MovieClip Frame 15
stop();
removeMovieClip(_parent);
Symbol 321 MovieClip Frame 15
stop();
Symbol 322 MovieClip Frame 5
stop();
_root.peluruMuncul("musuh");
Symbol 323 MovieClip Frame 15
stop();
removeMovieClip(_parent);
Symbol 327 MovieClip Frame 15
stop();
Symbol 328 MovieClip Frame 5
stop();
_root.peluruMuncul("musuh");
Symbol 329 MovieClip Frame 15
stop();
removeMovieClip(_parent);
Symbol 333 MovieClip Frame 15
stop();
Symbol 334 MovieClip Frame 5
stop();
_root.peluruMuncul("musuh");
Symbol 335 MovieClip Frame 15
stop();
removeMovieClip(_parent);
Symbol 343 MovieClip Frame 15
stop();
Symbol 344 MovieClip Frame 15
stop();
Symbol 345 MovieClip Frame 5
stop();
_root.peluruMuncul("musuh");
Symbol 346 MovieClip Frame 5
stop();
_root.peluruMuncul("musuh");
Symbol 347 MovieClip Frame 15
stop();
removeMovieClip(_parent);
Symbol 348 MovieClip Frame 15
stop();
removeMovieClip(_parent);
Symbol 356 MovieClip Frame 15
stop();
Symbol 357 MovieClip Frame 15
stop();
Symbol 358 MovieClip Frame 5
stop();
_root.peluruMuncul("jagoan");
Symbol 359 MovieClip Frame 5
stop();
_root.peluruMuncul("jagoan");
Symbol 360 MovieClip Frame 15
stop();
removeMovieClip(_parent);
Symbol 361 MovieClip Frame 15
stop();
removeMovieClip(_parent);
Symbol 367 MovieClip Frame 15
stop();
Symbol 368 MovieClip Frame 15
stop();
Symbol 369 MovieClip Frame 5
stop();
_root.peluruMuncul("jagoan");
Symbol 370 MovieClip Frame 5
stop();
_root.peluruMuncul("jagoan");
Symbol 371 MovieClip Frame 15
stop();
removeMovieClip(_parent);
Symbol 372 MovieClip Frame 15
stop();
removeMovieClip(_parent);
Symbol 377 MovieClip Frame 5
stop();
_root.peluruMuncul("musuh");
Symbol 378 MovieClip Frame 5
stop();
_root.peluruMuncul("musuh");
Symbol 385 MovieClip Frame 10
stop();
Symbol 386 MovieClip Frame 10
stop();
Symbol 387 MovieClip Frame 5
stop();
_root.peluruMuncul("musuh");
Symbol 388 MovieClip Frame 5
stop();
_root.peluruMuncul("musuh");
Symbol 389 MovieClip Frame 15
stop();
removeMovieClip(_parent);
Symbol 390 MovieClip Frame 15
stop();
removeMovieClip(_parent);
Symbol 406 MovieClip Frame 15
stop();
Symbol 407 MovieClip Frame 15
stop();
Symbol 408 MovieClip Frame 5
stop();
_root.peluruMuncul("musuh");
Symbol 409 MovieClip Frame 5
stop();
_root.peluruMuncul("musuh");
Symbol 410 MovieClip Frame 15
stop();
removeMovieClip(_parent);
Symbol 411 MovieClip Frame 15
stop();
removeMovieClip(_parent);
Symbol 429 MovieClip Frame 15
stop();
Symbol 431 MovieClip Frame 15
stop();
Symbol 433 MovieClip Frame 5
stop();
_root.peluruMuncul("musuh");
Symbol 435 MovieClip Frame 5
stop();
_root.peluruMuncul("musuh");
Symbol 437 MovieClip Frame 15
stop();
removeMovieClip(_parent);
Symbol 439 MovieClip Frame 15
stop();
removeMovieClip(_parent);
Symbol 461 MovieClip Frame 6
stop();
Symbol 468 MovieClip Frame 6
stop();
Symbol 475 MovieClip Frame 6
stop();
_root.peluruMuncul("musuh");
Symbol 482 MovieClip Frame 6
stop();
_root.peluruMuncul("musuh");
Symbol 489 MovieClip Frame 15
stop();
_parent._visible = true;
removeMovieClip(_parent);
Symbol 496 MovieClip Frame 15
stop();
_parent._visible = true;
removeMovieClip(_parent);
Symbol 532 MovieClip Frame 6
stop();
_root.peluruMuncul("musuh");
Symbol 539 MovieClip Frame 6
stop();
_root.peluruMuncul("musuh");
Symbol 546 MovieClip Frame 15
stop();
removeMovieClip(_parent);
Symbol 553 MovieClip Frame 15
stop();
removeMovieClip(_parent);
Symbol 571 MovieClip Frame 15
stop();
Symbol 573 MovieClip Frame 15
stop();
Symbol 574 MovieClip Frame 15
stop();
_root.peluruMuncul("musuh");
Symbol 575 MovieClip Frame 15
stop();
_root.peluruMuncul("musuh");
Symbol 576 MovieClip Frame 15
stop();
removeMovieClip(_parent);
Symbol 577 MovieClip Frame 15
stop();
removeMovieClip(_parent);
Symbol 593 MovieClip Frame 10
stop();
Symbol 594 MovieClip Frame 10
stop();
Symbol 599 MovieClip Frame 1
_root.backPanah();
Symbol 599 MovieClip Frame 15
stop();
_root.peluruMuncul("musuh");
Symbol 604 MovieClip Frame 1
_root.backPanah();
Symbol 604 MovieClip Frame 15
stop();
_root.peluruMuncul("musuh");
Symbol 605 MovieClip Frame 15
stop();
removeMovieClip(_parent);
Symbol 606 MovieClip Frame 15
stop();
removeMovieClip(_parent);
Symbol 612 MovieClip Frame 10
stop();
Symbol 614 MovieClip Frame 10
stop();
Symbol 618 MovieClip Frame 10
stop();
Symbol 622 MovieClip Frame 15
stop();
_root.peluruMuncul("musuh");
Symbol 625 MovieClip Frame 15
stop();
_root.peluruMuncul("musuh");
Symbol 627 MovieClip Frame 10
stop();
_parent._visible = true;
removeMovieClip(_parent);
Symbol 628 MovieClip Frame 10
stop();
_parent._visible = true;
removeMovieClip(_parent);
Symbol 629 MovieClip Frame 10
stop();
_parent._visible = true;
removeMovieClip(_parent);
Symbol 636 MovieClip Frame 1
stop();
Symbol 640 MovieClip Frame 1
stop();
Symbol 648 MovieClip Frame 10
stop();
Symbol 649 MovieClip Frame 10
stop();
Symbol 650 MovieClip Frame 1
_root.backMagic();
Symbol 650 MovieClip Frame 15
stop();
_root.peluruMuncul("musuh");
Symbol 651 MovieClip Frame 1
_root.backPanah();
Symbol 651 MovieClip Frame 15
stop();
_root.peluruMuncul("musuh");
Symbol 652 MovieClip Frame 10
stop();
Symbol 653 MovieClip Frame 10
stop();
Symbol 673 MovieClip Frame 10
stop();
Symbol 674 MovieClip Frame 10
stop();
Symbol 675 MovieClip Frame 1
_root.backMagic();
Symbol 675 MovieClip Frame 15
stop();
_root.peluruMuncul("jagoan");
Symbol 676 MovieClip Frame 1
_root.backPanah();
Symbol 676 MovieClip Frame 15
stop();
_root.peluruMuncul("jagoan");
Symbol 678 MovieClip Frame 10
stop();
Symbol 679 MovieClip Frame 10
stop();
Symbol 694 MovieClip Frame 10
stop();
Symbol 695 MovieClip Frame 10
stop();
Symbol 696 MovieClip Frame 1
_root.backMagic();
Symbol 696 MovieClip Frame 15
stop();
_root.peluruMuncul("jagoan");
Symbol 697 MovieClip Frame 1
_root.backPanah();
Symbol 697 MovieClip Frame 15
stop();
_root.peluruMuncul("jagoan");
Symbol 698 MovieClip Frame 10
stop();
Symbol 699 MovieClip Frame 10
stop();
Symbol 716 MovieClip Frame 10
stop();
Symbol 718 MovieClip Frame 10
stop();
Symbol 722 MovieClip Frame 1
_root.backPanah();
Symbol 722 MovieClip Frame 15
stop();
_root.peluruMuncul("jagoan");
Symbol 725 MovieClip Frame 1
_root.backPanah();
Symbol 725 MovieClip Frame 15
stop();
_root.peluruMuncul("jagoan");
Symbol 727 MovieClip Frame 10
stop();
Symbol 728 MovieClip Frame 10
stop();
Symbol 738 MovieClip Frame 10
stop();
Symbol 739 MovieClip Frame 10
stop();
Symbol 744 MovieClip Frame 1
_root.backPanah();
Symbol 744 MovieClip Frame 15
stop();
_root.peluruMuncul("jagoan");
Symbol 748 MovieClip Frame 1
_root.backPanah();
Symbol 748 MovieClip Frame 15
stop();
_root.peluruMuncul("jagoan");
Symbol 750 MovieClip Frame 10
stop();
Symbol 751 MovieClip Frame 10
stop();
Symbol 797 MovieClip [rumput8_mc] Frame 1
stop();
Symbol 800 MovieClip [rumput3_mc] Frame 1
stop();
Symbol 803 MovieClip [rumput2_mc] Frame 1
stop();
Symbol 807 MovieClip [rumput5_mc] Frame 1
stop();
Symbol 811 MovieClip [rumput4_mc] Frame 1
stop();
Symbol 814 MovieClip [jembatan_mc] Frame 1
stop();
Symbol 816 MovieClip [laut3_mc] Frame 1
stop();
Symbol 818 MovieClip [laut2_mc] Frame 1
stop();
Symbol 821 MovieClip [jalan_mc] Frame 1
stop();
Symbol 824 MovieClip [laut_mc] Frame 1
stop();
Symbol 828 MovieClip [es8_mc] Frame 1
stop();
Symbol 831 MovieClip [tanah7_mc] Frame 1
stop();
Symbol 834 MovieClip [rumput7_mc] Frame 1
stop();
Symbol 837 MovieClip [es9_mc] Frame 1
stop();
Symbol 840 MovieClip [tanah6_mc] Frame 1
stop();
Symbol 843 MovieClip [rumput6_mc] Frame 1
stop();
Symbol 856 MovieClip [es0_mc] Frame 1
stop();
Symbol 859 MovieClip [air5_mc] Frame 1
stop();
Symbol 862 MovieClip [air3_mc] Frame 1
stop();
Symbol 865 MovieClip [air1_mc] Frame 1
stop();
Symbol 868 MovieClip [es2_mc] Frame 1
stop();
Symbol 871 MovieClip [es1_mc] Frame 1
stop();
Symbol 874 MovieClip [tanah3_mc] Frame 1
stop();
Symbol 877 MovieClip [tanah4_mc] Frame 1
stop();
Symbol 880 MovieClip [hell_mc] Frame 1
stop();
Symbol 883 MovieClip [tanah2_mc] Frame 1
stop();
Symbol 886 MovieClip [dark_mc] Frame 1
stop();
Symbol 889 MovieClip [rumput_mc] Frame 1
stop();
Symbol 900 MovieClip Frame 1
stop();
Symbol 930 MovieClip [box1_mc] Frame 1
stop();
Symbol 931 MovieClip [mot_mc] Frame 1
play();
Symbol 931 MovieClip [mot_mc] Frame 15
stop();
Symbol 932 MovieClip [bom_mc] Frame 1
play();
Symbol 932 MovieClip [bom_mc] Frame 15
stop();
Symbol 939 MovieClip [xpanah_mc] Frame 15
removeMovieClip(this);
Symbol 955 MovieClip Frame 1
stop();
Symbol 1081 MovieClip Frame 1
this.onPress = function () {
getURL ("http://www.belugerinstudios.com/", "_blank");
};
Symbol 1095 MovieClip Frame 1
stop();
Symbol 1278 MovieClip [frame_mc] Frame 1
stop();
Symbol 1335 MovieClip Frame 1
stop();
Symbol 1355 MovieClip [text_mc2] Frame 35
stop();
removeMovieClip(this);
Symbol 1356 MovieClip [text_mc] Frame 35
stop();
removeMovieClip(this);
Symbol 1357 MovieClip [theMagic2] Frame 25
stop();
_root.mulaiWater();
removeMovieClip(this);
Symbol 1358 MovieClip [theMagic] Frame 25
stop();
_root.mulaiRock();
removeMovieClip(this);
Symbol 1657 MovieClip [trans_mc] Frame 1
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = "- Kill all Enemies";
Symbol 1657 MovieClip [trans_mc] Frame 2
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = ("Move " + _root.wnama) + " to the Arrow Sign";
Symbol 1657 MovieClip [trans_mc] Frame 3
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = ((("Step 1 : Move " + _root.wnama) + " to the Gold\nStep 2 : Move ") + _root.wnama) + " to the Arrow Sign\n(must be in sequence)";
Symbol 1657 MovieClip [trans_mc] Frame 4
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = ((("Step 1 : Move " + _root.wnama) + " to the Gold\nStep 2 : Move ") + _root.wnama) + " to the Arrow Sign\n(must be in sequence)";
Symbol 1657 MovieClip [trans_mc] Frame 5
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = "- Kill Granade";
Symbol 1657 MovieClip [trans_mc] Frame 6
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = ("Kill All Enemies and move " + _root.wnama) + " to arrow sign";
Symbol 1657 MovieClip [trans_mc] Frame 7
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = "Kill All Jeep";
Symbol 1657 MovieClip [trans_mc] Frame 8
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = "Kill All Enemies and Destroy All Tower";
Symbol 1657 MovieClip [trans_mc] Frame 9
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = (object = "Kill All Enemies and Destroy All Tower");
Symbol 1657 MovieClip [trans_mc] Frame 10
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = "Kill All Enemies";
Symbol 1657 MovieClip [trans_mc] Frame 11
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = ("Move " + _root.wnama) + " to the Arrow Sign";
Symbol 1657 MovieClip [trans_mc] Frame 12
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = ("Move " + _root.wnama) + " to the Arrow Sign";
Symbol 1657 MovieClip [trans_mc] Frame 13
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = ("Move " + _root.wnama) + " to the Arrow Sign";
Symbol 1657 MovieClip [trans_mc] Frame 14
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = "Kill All Enemies";
Symbol 1657 MovieClip [trans_mc] Frame 15
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = "Kill All Enemies";
Symbol 1657 MovieClip [trans_mc] Frame 16
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = "Kill All Enemies";
Symbol 1657 MovieClip [trans_mc] Frame 17
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = ("Move " + _root.wnama) + " to the Arrow Sign";
Symbol 1657 MovieClip [trans_mc] Frame 18
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = ("Move " + _root.wnama) + " to the Arrow Sign";
Symbol 1657 MovieClip [trans_mc] Frame 20
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = ("Move " + _root.wnama) + " to the Arrow Sign";
Symbol 1657 MovieClip [trans_mc] Frame 21
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = ("Move " + _root.wnama) + " to the Arrow Sign";
Symbol 1657 MovieClip [trans_mc] Frame 22
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = ("Move " + _root.wnama) + " to the Arrow Sign";
Symbol 1657 MovieClip [trans_mc] Frame 23
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = ("Move " + _root.wnama) + " to the Arrow Sign";
Symbol 1657 MovieClip [trans_mc] Frame 25
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = "Kill All Enemies";
Symbol 1657 MovieClip [trans_mc] Frame 26
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = "Kill All Enemies";
Symbol 1657 MovieClip [trans_mc] Frame 27
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = "Kill All Enemies";
Symbol 1657 MovieClip [trans_mc] Frame 28
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = "Kill All Enemies";
Symbol 1657 MovieClip [trans_mc] Frame 30
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = "Kill All Enemies";
Symbol 1657 MovieClip [trans_mc] Frame 31
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = "Kill All Enemies";
Symbol 1657 MovieClip [trans_mc] Frame 32
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = "Kill All Enemies and Destroy All Tower";
Symbol 1657 MovieClip [trans_mc] Frame 33
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = "Kill All Enemies";
Symbol 1657 MovieClip [trans_mc] Frame 34
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = "Kill All Enemies";
Symbol 1657 MovieClip [trans_mc] Frame 35
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = "Kill All Enemies";
Symbol 1657 MovieClip [trans_mc] Frame 36
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = "Kill All Enemies";
Symbol 1657 MovieClip [trans_mc] Frame 37
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = "Kill All Enemies";
Symbol 1657 MovieClip [trans_mc] Frame 38
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = "Kill All Enemies";
Symbol 1657 MovieClip [trans_mc] Frame 39
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = "Kill original Dark Anger";
Symbol 1657 MovieClip [trans_mc] Frame 90
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
Symbol 1657 MovieClip [trans_mc] Frame 91
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
Symbol 1657 MovieClip [trans_mc] Frame 92
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = ("- Kill all Enemies, or\n- Move " + _root.wnama) + " to the Arrow Sign.";
Symbol 1657 MovieClip [trans_mc] Frame 93
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
Symbol 1657 MovieClip [trans_mc] Frame 94
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
Symbol 1657 MovieClip [trans_mc] Frame 95
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = ("- Destroy all Trucks, or\n- Move " + _root.wnama) + " to the Arrow Sign.";
Symbol 1657 MovieClip [trans_mc] Frame 96
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
Symbol 1657 MovieClip [trans_mc] Frame 97
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
Symbol 1657 MovieClip [trans_mc] Frame 98
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
Symbol 1657 MovieClip [trans_mc] Frame 99
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
Symbol 1657 MovieClip [trans_mc] Frame 100
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
Symbol 1657 MovieClip [trans_mc] Frame 101
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
Symbol 1657 MovieClip [trans_mc] Frame 102
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
Symbol 1657 MovieClip [trans_mc] Frame 103
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
Symbol 1657 MovieClip [trans_mc] Frame 104
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
Symbol 1657 MovieClip [trans_mc] Frame 105
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
Symbol 1657 MovieClip [trans_mc] Frame 106
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
Symbol 1657 MovieClip [trans_mc] Frame 107
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
Symbol 1657 MovieClip [trans_mc] Frame 108
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
Symbol 1657 MovieClip [trans_mc] Frame 109
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
Symbol 1657 MovieClip [trans_mc] Frame 110
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
Symbol 1657 MovieClip [trans_mc] Frame 111
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
Symbol 1761 MovieClip [msgBox_mc4] Frame 1
stop();
bar1_mc.bar_mc._x = Math.ceil((_root.volum1 / 0.434782608695652) - 115);
bar1_mc.bar_mc.onEnterFrame = function () {
_root.volum1 = int(0.434782608695652 * (this._x + 115));
_root.myMusic.setVolume(_root.volum1);
_root.myMusic2.setVolume(_root.volum1);
_root.myMusic3.setVolume(_root.volum1);
bar1_mc.persen1 = _root.volum1 + " %";
};
bar1_mc.indi_mc.onPress = function () {
_root.klik();
startDrag (bar1_mc.bar_mc, true, -115, 0, 115, 0);
};
bar1_mc.bar_mc.onRollOver = function () {
_root.over();
};
bar1_mc.indi_mc.onRelease = (bar1_mc.indi_mc.onReleaseOutside = function () {
_root.over();
stopDrag();
});
bar2_mc.bar_mc._x = Math.ceil((_root.volum2 / 0.434782608695652) - 115);
bar2_mc.bar_mc.onEnterFrame = function () {
_root.volum2 = int(0.434782608695652 * (this._x + 115));
_root.mySound.setVolume(_root.volum2);
bar2_mc.persen2 = _root.volum2 + " %";
};
bar2_mc.indi_mc.onPress = function () {
_root.klik();
startDrag (bar2_mc.bar_mc, true, -115, 0, 115, 0);
};
bar2_mc.bar_mc.onRollOver = function () {
_root.over();
};
bar2_mc.indi_mc.onRelease = (bar2_mc.indi_mc.onReleaseOutside = function () {
_root.over();
stopDrag();
});
bar3_mc.bar_mc._x = Math.ceil((_root.volum3 / 0.434782608695652) - 115);
bar3_mc.bar_mc.onEnterFrame = function () {
_root.volum3 = int(0.434782608695652 * (this._x + 115));
if (_root.volum3 >= 50) {
}
bar2_mc.persen3 = _root.volum3 + " %";
};
bar3_mc.indi_mc.onPress = function () {
_root.klik();
startDrag (bar3_mc.bar_mc, true, -115, 0, 115, 0);
};
bar3_mc.bar_mc.onRollOver = function () {
_root.over();
};
bar3_mc.indi_mc.onRelease = (bar3_mc.indi_mc.onReleaseOutside = function () {
_root.over();
stopDrag();
});
Symbol 1778 MovieClip [msgBox_mc3] Frame 1
stop();
bar1_mc.bar_mc._x = Math.ceil((_root.volum1 / 0.434782608695652) - 115);
bar1_mc.bar_mc.onEnterFrame = function () {
_root.volum1 = int(0.434782608695652 * (this._x + 115));
_root.myMusic.setVolume(_root.volum1);
_root.myMusic2.setVolume(_root.volum1);
_root.myMusic3.setVolume(_root.volum1);
bar1_mc.persen1 = _root.volum1 + " %";
};
bar1_mc.indi_mc.onPress = function () {
_root.klik();
startDrag (bar1_mc.bar_mc, true, -115, 0, 115, 0);
};
bar1_mc.bar_mc.onRollOver = function () {
_root.over();
};
bar1_mc.indi_mc.onRelease = (bar1_mc.indi_mc.onReleaseOutside = function () {
_root.over();
stopDrag();
});
bar2_mc.bar_mc._x = Math.ceil((_root.volum2 / 0.434782608695652) - 115);
bar2_mc.bar_mc.onEnterFrame = function () {
_root.volum2 = int(0.434782608695652 * (this._x + 115));
_root.mySound.setVolume(_root.volum2);
bar2_mc.persen2 = _root.volum2 + " %";
};
bar2_mc.indi_mc.onPress = function () {
_root.klik();
startDrag (bar2_mc.bar_mc, true, -115, 0, 115, 0);
};
bar2_mc.bar_mc.onRollOver = function () {
_root.over();
};
bar2_mc.indi_mc.onRelease = (bar2_mc.indi_mc.onReleaseOutside = function () {
_root.over();
stopDrag();
});
bar3_mc.bar_mc._x = Math.ceil((_root.volum3 / 0.434782608695652) - 115);
bar3_mc.bar_mc.onEnterFrame = function () {
_root.volum3 = int(0.434782608695652 * (this._x + 115));
if (_root.volum3 >= 75) {
_root.kecepatanGame = "fast";
} else if ((_root.volum3 <= 75) && (_root.volum3 >= 25)) {
_root.kecepatanGame = "normal";
} else {
_root.kecepatanGame = "slow";
}
bar2_mc.persen3 = _root.volum3 + " %";
};
bar3_mc.indi_mc.onPress = function () {
klik();
startDrag (bar3_mc.bar_mc, true, -115, 0, 115, 0);
};
bar3_mc.bar_mc.onRollOver = function () {
over();
};
bar3_mc.indi_mc.onRelease = (bar3_mc.indi_mc.onReleaseOutside = function () {
over();
stopDrag();
});
Symbol 1799 MovieClip [msgBox_mc2] Frame 1
stop();
Symbol 1799 MovieClip [msgBox_mc2] Frame 2
stop();
bar1_mc.bar_mc._x = Math.ceil((_root.volum1 / 0.434782608695652) - 115);
bar1_mc.bar_mc.onEnterFrame = function () {
_root.volum1 = int(0.434782608695652 * (this._x + 115));
_root.myMusic.setVolume(_root.volum1);
_root.myMusic2.setVolume(_root.volum1);
_root.myMusic3.setVolume(_root.volum1);
bar1_mc.persen1 = _root.volum1 + " %";
};
bar1_mc.indi_mc.onPress = function () {
_root.klik();
startDrag (bar1_mc.bar_mc, true, -115, 0, 115, 0);
};
bar1_mc.bar_mc.onRollOver = function () {
_root.over();
};
bar1_mc.indi_mc.onRelease = (bar1_mc.indi_mc.onReleaseOutside = function () {
_root.klik();
stopDrag();
});
bar2_mc.bar_mc._x = Math.ceil((_root.volum2 / 0.434782608695652) - 115);
bar2_mc.bar_mc.onEnterFrame = function () {
_root.volum2 = int(0.434782608695652 * (this._x + 115));
_root.mySound.setVolume(_root.volum2);
bar2_mc.persen2 = _root.volum2 + " %";
};
bar2_mc.indi_mc.onPress = function () {
_root.klik();
startDrag (bar2_mc.bar_mc, true, -115, 0, 115, 0);
};
bar2_mc.bar_mc.onRollOver = function () {
_root.over();
};
bar2_mc.indi_mc.onRelease = (bar2_mc.indi_mc.onReleaseOutside = function () {
_root.klik();
stopDrag();
});
bar3_mc.bar_mc._x = Math.ceil((_root.volum3 / 0.434782608695652) - 115);
bar3_mc.bar_mc.onEnterFrame = function () {
_root.volum3 = int(0.434782608695652 * (this._x + 115));
if (_root.volum3 >= 50) {
}
bar2_mc.persen3 = _root.volum3 + " %";
};
bar3_mc.indi_mc.onPress = function () {
_root.klik();
startDrag (bar3_mc.bar_mc, true, -115, 0, 115, 0);
};
bar3_mc.bar_mc.onRollOver = function () {
_root.over();
};
bar3_mc.indi_mc.onRelease = (bar3_mc.indi_mc.onReleaseOutside = function () {
_root.klik();
stopDrag();
});
Symbol 1805 MovieClip [splash_mc] Frame 15
stop();
removeMovieClip(this);
Symbol 1836 MovieClip Frame 1
stop();
Symbol 1854 MovieClip [command_mc] Frame 1
stop();
Symbol 1868 MovieClip [sword2_mc3] Frame 1
stop();
Symbol 1874 MovieClip [sword2_mc2] Frame 1
stop();
Symbol 1876 MovieClip [sword2_mc] Frame 1
stop();
Symbol 1890 MovieClip [horse2_mc] Frame 1
stop();
Symbol 1900 MovieClip [rifle2_mc] Frame 1
stop();
Symbol 1910 MovieClip [bomberman2_mc3] Frame 1
stop();
Symbol 1911 MovieClip [bomberman2_mc2] Frame 1
stop();
Symbol 1912 MovieClip [bomberman2_mc] Frame 1
stop();
Symbol 1926 MovieClip [motor2_mc] Frame 1
stop();
Symbol 1930 MovieClip [selam2_mc] Frame 1
stop();
Symbol 1934 MovieClip [destroyer2_mc] Frame 1
stop();
Symbol 1938 MovieClip [ship2_mc] Frame 1
stop();
Symbol 1942 MovieClip [jet2_mc] Frame 1
stop();
Symbol 1956 MovieClip [pesawat2_mc] Frame 1
stop();
Symbol 1968 MovieClip [heli2_mc] Frame 1
stop();
Symbol 1972 MovieClip [tank2_mc] Frame 1
stop();
Symbol 1975 MovieClip [truk2_mc] Frame 1
stop();
Symbol 1979 MovieClip [jip2_mc] Frame 1
stop();
Symbol 1981 MovieClip [archer2_mc] Frame 1
stop();
Symbol 1982 MovieClip Frame 20
removeMovieClip(this);
removeMovieClip(_parent);
removeMovieClip(_root._parent);
removeMovieClip(this._parent);
Symbol 1983 MovieClip [xmati2_mc3] Frame 1
stop();
Symbol 1984 MovieClip Frame 20
removeMovieClip(this);
removeMovieClip(_parent);
removeMovieClip(_root._parent);
removeMovieClip(this._parent);
Symbol 1985 MovieClip [mati2_mc3] Frame 1
stop();
Symbol 1986 MovieClip Frame 45
removeMovieClip(this);
removeMovieClip(_parent);
removeMovieClip(_root._parent);
removeMovieClip(this._parent);
Symbol 1987 MovieClip [xmati2_mc2] Frame 1
stop();
Symbol 1988 MovieClip Frame 45
removeMovieClip(this);
removeMovieClip(_parent);
removeMovieClip(_root._parent);
removeMovieClip(this._parent);
Symbol 1989 MovieClip [mati2_mc2] Frame 1
stop();
Symbol 1990 MovieClip Frame 45
removeMovieClip(this);
removeMovieClip(_parent);
removeMovieClip(_root._parent);
removeMovieClip(this._parent);
Symbol 1991 MovieClip [xmati2_mc1] Frame 1
stop();
Symbol 1992 MovieClip Frame 45
removeMovieClip(this);
removeMovieClip(_parent);
removeMovieClip(_root._parent);
removeMovieClip(this._parent);
Symbol 1993 MovieClip [mati2_mc1] Frame 1
stop();
Symbol 1996 MovieClip Frame 20
removeMovieClip(this);
removeMovieClip(_parent);
removeMovieClip(_root._parent);
removeMovieClip(this._parent);
Symbol 1997 MovieClip [xmati1_mc3] Frame 1
stop();
Symbol 2000 MovieClip Frame 20
removeMovieClip(this);
removeMovieClip(_parent);
removeMovieClip(_root._parent);
removeMovieClip(this._parent);
Symbol 2001 MovieClip [mati1_mc3] Frame 1
stop();
Symbol 2002 MovieClip Frame 40
removeMovieClip(this);
removeMovieClip(_parent);
removeMovieClip(_root._parent);
removeMovieClip(this._parent);
Symbol 2003 MovieClip [xmati1_mc2] Frame 1
stop();
Symbol 2004 MovieClip Frame 40
removeMovieClip(this);
removeMovieClip(_parent);
removeMovieClip(_root._parent);
removeMovieClip(this._parent);
Symbol 2005 MovieClip [mati1_mc2] Frame 1
stop();
Symbol 2006 MovieClip Frame 40
removeMovieClip(this);
removeMovieClip(_parent);
removeMovieClip(_root._parent);
removeMovieClip(this._parent);
Symbol 2007 MovieClip [xmati1_mc1] Frame 1
stop();
Symbol 2010 MovieClip Frame 15
removeMovieClip(this);
removeMovieClip(_parent);
removeMovieClip(_root._parent);
removeMovieClip(this._parent);
Symbol 2011 MovieClip [mati3_mc2] Frame 1
stop();
Symbol 2015 MovieClip Frame 15
removeMovieClip(this);
removeMovieClip(_parent);
removeMovieClip(_root._parent);
removeMovieClip(this._parent);
Symbol 2016 MovieClip [mati3_mc1] Frame 1
stop();
Symbol 2017 MovieClip Frame 15
removeMovieClip(this);
removeMovieClip(_parent);
removeMovieClip(_root._parent);
removeMovieClip(this._parent);
Symbol 2018 MovieClip [ymati2_mc] Frame 1
stop();
Symbol 2021 MovieClip Frame 40
removeMovieClip(this);
removeMovieClip(_parent);
removeMovieClip(_root._parent);
removeMovieClip(this._parent);
Symbol 2022 MovieClip [ymati1_mc] Frame 1
stop();
Symbol 2023 MovieClip Frame 40
removeMovieClip(this);
removeMovieClip(_parent);
removeMovieClip(_root._parent);
removeMovieClip(this._parent);
Symbol 2024 MovieClip [mati1_mc1] Frame 1
stop();
Symbol 2031 MovieClip [sword_mc3] Frame 1
stop();
Symbol 2035 MovieClip [sword_mc2] Frame 1
stop();
Symbol 2041 MovieClip [sword_mc] Frame 1
stop();
Symbol 2049 MovieClip [horse_mc] Frame 1
stop();
Symbol 2057 MovieClip [rifle_mc] Frame 1
stop();
Symbol 2066 MovieClip [bomberman_mc2] Frame 1
stop();
Symbol 2067 MovieClip [bomberman_mc3] Frame 1
stop();
Symbol 2068 MovieClip [bomberman_mc] Frame 1
stop();
Symbol 2081 MovieClip [motor_mc] Frame 1
stop();
Symbol 2084 MovieClip [destroyer_mc] Frame 1
stop();
Symbol 2087 MovieClip [selam_mc] Frame 1
stop();
Symbol 2090 MovieClip [ship_mc] Frame 1
stop();
Symbol 2093 MovieClip [jet_mc] Frame 1
stop();
Symbol 2106 MovieClip [pesawat_mc] Frame 1
stop();
Symbol 2119 MovieClip [heli_mc] Frame 1
stop();
Symbol 2122 MovieClip [tank_mc] Frame 1
stop();
Symbol 2125 MovieClip [truk_mc] Frame 1
stop();
Symbol 2138 MovieClip [jip_mc] Frame 1
stop();
Symbol 2146 MovieClip [archer_mc] Frame 1
stop();
Symbol 2154 MovieClip [air2_mc] Frame 15
removeMovieClip(this);
Symbol 2162 MovieClip [darah_mc] Frame 15
removeMovieClip(this);
Symbol 2164 MovieClip [water2_mc] Frame 1
gotoAndPlay(random(20) + 1);
Symbol 2164 MovieClip [water2_mc] Frame 100
removeMovieClip(this);
Symbol 2166 MovieClip [darah2_mc] Frame 1
gotoAndPlay(random(20) + 1);
Symbol 2166 MovieClip [darah2_mc] Frame 100
removeMovieClip(this);
Symbol 2167 MovieClip [api2_mc] Frame 1
gotoAndPlay(random(16) + 1);
Symbol 2167 MovieClip [api2_mc] Frame 35
removeMovieClip(this);
Symbol 2213 MovieClip [istana2_mc] Frame 1
stop();
Symbol 2213 MovieClip [istana2_mc] Frame 15
play();
Symbol 2213 MovieClip [istana2_mc] Frame 65
stop();
_root.sudahSelesai("menang");
Symbol 2245 MovieClip [istana1_mc] Frame 1
stop();
Symbol 2245 MovieClip [istana1_mc] Frame 15
play();
Symbol 2245 MovieClip [istana1_mc] Frame 65
stop();
_root.sudahSelesai("kalah");
Symbol 2289 MovieClip [ledak_mc] Frame 15
removeMovieClip(this);
Symbol 2294 MovieClip [kilat_mc] Frame 1
gotoAndPlay(random(15) + 1);
Symbol 2294 MovieClip [kilat_mc] Frame 22
stop();
removeMovieClip(this);
Symbol 2302 MovieClip [ledakion_mc2] Frame 15
removeMovieClip(this);
Symbol 2304 MovieClip [ledakion_mc] Frame 15
removeMovieClip(this);
Symbol 2306 MovieClip [ledakson_mc] Frame 30
removeMovieClip(this);
Symbol 2309 MovieClip [ledakion2] Frame 10
removeMovieClip(this);
Symbol 2311 MovieClip [ledakion] Frame 10
removeMovieClip(this);
Symbol 2313 MovieClip [ledakatom_mc] Frame 5
removeMovieClip(this);
Symbol 2328 MovieClip Frame 1
stop();
Symbol 2335 MovieClip [special_mc] Frame 1
stop();
Symbol 2344 MovieClip Frame 1
stop();
Symbol 2353 MovieClip [pause_mc] Frame 1
function cekQua() {
option1.gotoAndStop(1);
option2.gotoAndStop(1);
option3.gotoAndStop(1);
if (_root.jenisQua == 1) {
option1.gotoAndStop(2);
} else if (_root.jenisQua == 2) {
option2.gotoAndStop(2);
} else if (_root.jenisQua == 3) {
option3.gotoAndStop(2);
}
}
function cekEfek() {
option4.gotoAndStop(1);
option5.gotoAndStop(1);
if (_root.adaEfek == true) {
option4.gotoAndStop(2);
} else {
option5.gotoAndStop(2);
}
}
function defaultMusic() {
i = 0;
while (i <= 6) {
_root["pmusik" + i].gotoAndStop(1);
i++;
}
}
stop();
cekQua();
cekEfek();
option1.onRelease = function () {
_root.klik();
_quality = "LOW";
_root.jenisQua = 1;
cekQua();
};
option2.onRelease = function () {
_root.klik();
_quality = "MEDIUM";
_root.jenisQua = 2;
cekQua();
};
option3.onRelease = function () {
_root.klik();
_quality = "BEST";
_root.jenisQua = 3;
cekQua();
};
option4.onRelease = function () {
_root.klik();
_root.adaEfek = true;
cekEfek();
};
option5.onRelease = function () {
_root.klik();
_root.adaEfek = false;
cekEfek();
};
default_btn.onRelease = function () {
_root.klik();
_root.volum1 = 100;
_root.volum2 = 75;
bar1_mc.bar_mc._x = Math.ceil((_root.volum1 / 0.434782608695652) - 115);
bar2_mc.bar_mc._x = Math.ceil((_root.volum2 / 0.434782608695652) - 115);
_quality = "BEST";
_root.jenisQua = 3;
_root.adaEfek = true;
cekQua();
cekEfek();
};
option1.onRollOver = (option2.onRollOver = (option3.onRollOver = (option4.onRollOver = (option5.onRollOver = (default_btn.onRollOver = function () {
_root.over();
})))));
bar1_mc.bar_mc._x = Math.ceil((_root.volum1 / 0.434782608695652) - 115);
bar1_mc.bar_mc.onEnterFrame = function () {
_root.volum1 = int(0.434782608695652 * (this._x + 115));
_root.myMusic.setVolume(_root.volum1);
_root.myMusic2.setVolume(_root.volum1);
_root.myMusic3.setVolume(_root.volum1);
bar1_mc.persen1 = _root.volum1 + " %";
};
bar1_mc.indi_mc.onPress = function () {
_root.klik();
startDrag (bar1_mc.bar_mc, true, -115, 0, 115, 0);
};
bar1_mc.bar_mc.onRollOver = function () {
_root.over();
};
bar1_mc.indi_mc.onRelease = (bar1_mc.indi_mc.onReleaseOutside = function () {
_root.over();
stopDrag();
});
bar2_mc.bar_mc._x = Math.ceil((_root.volum2 / 0.434782608695652) - 115);
bar2_mc.bar_mc.onEnterFrame = function () {
_root.volum2 = int(0.434782608695652 * (this._x + 115));
_root.mySound.setVolume(_root.volum2);
bar2_mc.persen2 = _root.volum2 + " %";
};
bar2_mc.indi_mc.onPress = function () {
_root.klik();
startDrag (bar2_mc.bar_mc, true, -115, 0, 115, 0);
};
bar2_mc.bar_mc.onRollOver = function () {
_root.over();
};
bar2_mc.indi_mc.onRelease = (bar2_mc.indi_mc.onReleaseOutside = function () {
_root.over();
stopDrag();
});
bar3_mc.bar_mc._x = Math.ceil((_root.volum3 / 0.434782608695652) - 115);
bar3_mc.bar_mc.onEnterFrame = function () {
_root.volum3 = int(0.434782608695652 * (this._x + 115));
if (_root.volum3 >= 75) {
_root.kecepatanGame = "fast";
} else if ((_root.volum3 <= 75) && (_root.volum3 >= 25)) {
_root.kecepatanGame = "normal";
} else {
_root.kecepatanGame = "slow";
}
bar2_mc.persen3 = _root.volum3 + " %";
};
bar3_mc.indi_mc.onPress = function () {
_root.klik();
startDrag (bar3_mc.bar_mc, true, -115, 0, 115, 0);
};
bar3_mc.bar_mc.onRollOver = function () {
_root.over();
};
bar3_mc.indi_mc.onRelease = (bar3_mc.indi_mc.onReleaseOutside = function () {
_root.over();
stopDrag();
});
if (mainMusik == 0) {
defaultMusic();
pmusik0.gotoAndStop(2);
} else if (mainMusik == 1) {
defaultMusic();
pmusik1.gotoAndStop(2);
} else if (mainMusik == 2) {
defaultMusic();
pmusik2.gotoAndStop(2);
} else if (mainMusik == 3) {
defaultMusic();
pmusik3.gotoAndStop(2);
} else if (mainMusik == 4) {
defaultMusic();
pmusik4.gotoAndStop(2);
} else if (mainMusik == 5) {
defaultMusic();
pmusik5.gotoAndStop(2);
} else if (mainMusik == 6) {
defaultMusic();
pmusik6.gotoAndStop(2);
}
pmusik0.onRollOver = (pmusik1.onRollOver = (pmusik2.onRollOver = (pmusik3.onRollOver = (pmusik4.onRollOver = (pmusik5.onRollOver = (pmusik6.onRollOver = function () {
over();
}))))));
pmusik0.onRelease = function () {
klik();
defaultMusic();
this.gotoAndStop(2);
backMain();
};
pmusik1.onRelease = function () {
klik();
defaultMusic();
this.gotoAndStop(2);
backRumput();
};
pmusik2.onRelease = function () {
klik();
defaultMusic();
this.gotoAndStop(2);
backPlay();
};
pmusik3.onRelease = function () {
klik();
defaultMusic();
this.gotoAndStop(2);
backSalju();
};
pmusik4.onRelease = function () {
klik();
defaultMusic();
this.gotoAndStop(2);
backSea();
};
pmusik5.onRelease = function () {
klik();
defaultMusic();
this.gotoAndStop(2);
backFinal();
};
pmusik6.onRelease = function () {
klik();
defaultMusic();
this.gotoAndStop(2);
backMap();
};
Symbol 2786 MovieClip [__Packages.mochi.as2.MochiAd] Frame 0
class mochi.as2.MochiAd
{
function MochiAd () {
}
static function getVersion() {
return(mochi.as2.MochiServices.getVersion());
}
static function showPreGameAd(options) {
var _local27 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}, ad_progress:function (percent) {
}};
options = _parseOptions(options, _local27);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def") {
options.ad_started();
options.ad_finished();
return(undefined);
}
var clip = options.clip;
var _local24 = 11000;
var _local19 = options.ad_timeout;
if (options.skip) {
_local19 = 0;
}
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local15 = _getRes(options);
var _local5 = _local15[0];
var _local14 = _local15[1];
mc._x = _local5 * 0.5;
mc._y = _local14 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local5 * -0.5;
chk._y = _local14 * -0.5;
var _local7 = chk.createEmptyMovieClip("_mochiad_bar", 4);
if (options.no_progress_bar) {
_local7._visible = false;
delete options.no_progress_bar;
} else {
_local7._x = 10;
_local7._y = _local14 - 20;
}
var _local23 = options.color;
delete options.color;
var _local21 = options.background;
delete options.background;
var _local25 = options.outline;
delete options.outline;
var _local6 = _local7.createEmptyMovieClip("_outline", 1);
_local6.beginFill(_local21);
_local6.moveTo(0, 0);
_local6.lineTo(_local5 - 20, 0);
_local6.lineTo(_local5 - 20, 10);
_local6.lineTo(0, 10);
_local6.lineTo(0, 0);
_local6.endFill();
var _local4 = _local7.createEmptyMovieClip("_inside", 2);
_local4.beginFill(_local23);
_local4.moveTo(0, 0);
_local4.lineTo(_local5 - 20, 0);
_local4.lineTo(_local5 - 20, 10);
_local4.lineTo(0, 10);
_local4.lineTo(0, 0);
_local4.endFill();
_local4._xscale = 0;
var _local8 = _local7.createEmptyMovieClip("_outline", 3);
_local8.lineStyle(0, _local25, 100);
_local8.moveTo(0, 0);
_local8.lineTo(_local5 - 20, 0);
_local8.lineTo(_local5 - 20, 10);
_local8.lineTo(0, 10);
_local8.lineTo(0, 0);
chk.ad_msec = _local24;
chk.ad_timeout = _local19;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
mochi.as2.MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
var sendHostProgress = false;
mc.lc.sendHostLoadProgress = function (lc_name) {
sendHostProgress = true;
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
mc.lc.rpc = function (callbackID, arg) {
mochi.as2.MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local10 = this._parent._parent;
var _local3 = _local10;
while ((!_local3.getBytesTotal()) && (_local3)) {
_local3 = _local3._parent;
}
if (!_local3) {
_local3 = _root;
}
var _local13 = this._parent._mochiad_ctr;
var _local7 = getTimer() - this.started;
var _local5 = false;
var _local6 = _local3.getBytesTotal();
var _local9 = _local3.getBytesLoaded();
var _local4 = (100 * _local9) / _local6;
var _local12 = (100 * _local7) / chk.ad_msec;
var _local11 = this._mochiad_bar._inside;
var _local15 = Math.min(100, Math.min(_local4 || 0, _local12));
_local15 = Math.max(this.last_pcnt, _local15);
this.last_pcnt = _local15;
_local11._xscale = _local15;
options.ad_progress(_local15);
if (sendHostProgress) {
mochi.as2.MochiAd.containerNotify(clip, {id:"hostLoadPcnt", pcnt:_local4}, clip._mochiad._containerLCName);
if (_local4 == 100) {
sendHostProgress = false;
}
}
if (!chk.showing) {
var _local8 = _local13.getBytesTotal();
if ((_local8 > 0) || (typeof(_local8) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if ((_local7 > chk.ad_timeout) && (_local4 == 100)) {
options.ad_failed();
_local5 = true;
}
}
if (_local7 > chk.ad_msec) {
_local5 = true;
}
if (((_local6 > 0) && (_local9 >= _local6)) && (_local5)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showClickAwayAd(options) {
var _local10 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function () {
}, ad_finished:function () {
}, ad_loaded:function (width, height) {
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local10);
var clip = options.clip;
var _local9 = options.ad_timeout;
delete options.ad_timeout;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var _local3 = clip._mochiad;
_local3.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local11 = _local5[0];
var _local8 = _local5[1];
_local3._x = _local11 * 0.5;
_local3._y = _local8 * 0.5;
var chk = _local3.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_timeout = _local9;
chk.started = getTimer();
chk.showing = false;
_local3.lc.adLoaded = options.ad_loaded;
_local3.lc.adSkipped = options.ad_skipped;
_local3.lc.rpc = function (callbackID, arg) {
mochi.as2.MochiAd.rpc(clip, callbackID, arg);
};
_local3.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
var _local21 = false;
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
_local2 = true;
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local2) {
delete this.onEnterFrame;
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
mochi.as2.MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
mc.lc.rpc = function (callbackID, arg) {
mochi.as2.MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showPreloaderAd(options) {
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
showPreGameAd(options);
}
static function showTimedAd(options) {
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
showInterLevelAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function load(options) {
var _local12 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local12);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local6 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local6._mochiad_loaded) {
return(null);
}
var _local11 = options.depth;
delete options.depth;
var mc = _local6.createEmptyMovieClip("_mochiad", _local11);
var _local10 = _getRes(options);
options.res = (_local10[0] + "x") + _local10[1];
options.server = options.server + options.id;
delete options.id;
_local6._mochiad_loaded = true;
if (_local6._url.indexOf("http") != 0) {
trace("[MochiAd] NOTE: Security Sandbox Violation errors below are normal");
}
var _local4 = mc.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local9 = _local4.server;
delete _local4.server;
var _local13 = _allowDomains(_local9);
mc.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
mochi.as2.MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new Object();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = mc;
_local5.name = _local8;
_local5.hostname = _local13;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
mc.lc = _local5;
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
_local4.lc = _local8;
_local4.st = getTimer();
if (!options.skip) {
_local4.loadMovie(_local9 + ".swf", "POST");
}
return(mc);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
containerNotify(clip, {id:"unload"}, clip._mochiad._containerLCName);
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
if (_local4.id == "test") {
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
}
return(_local4);
}
static function rpc(clip, callbackID, arg) {
switch (arg.id) {
case "setValue" :
setValue(clip, arg.objectName, arg.value);
break;
case "getValue" :
var _local4 = getValue(clip, arg.objectName);
containerRpcResult(clip, callbackID, _local4, clip._mochiad._containerLCName);
break;
case "runMethod" :
var _local3 = runMethod(clip, arg.method, arg.args);
containerRpcResult(clip, callbackID, _local3, clip._mochiad._containerLCName);
break;
default :
trace("[mochiads rpc] unknown rpc id: " + arg.id);
}
}
static function setValue(base, objectName, value) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
base[_local2[_local1]] = value;
}
static function getValue(base, objectName) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
return(base[_local2[_local1]]);
}
static function runMethod(base, methodName, argsArray) {
var _local2 = methodName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
if (typeof(base[_local2[_local1]]) == "function") {
return(base[_local2[_local1]].apply(base, argsArray));
}
return(undefined);
}
static function containerNotify(clip, args, lcName) {
var _local1 = clip._mochiad._mochiad_ctr.ad.app;
if (_local1.notify) {
_local1.notify(args);
} else {
new LocalConnection().send(lcName, "notify", args);
}
}
static function containerRpcResult(clip, callbackID, val, lcName) {
var _local1 = clip._mochiad._mochiad_ctr.ad.app;
if (_local1.rpcResult) {
_local1.rpcResult(callbackID, val);
} else {
new LocalConnection().send(lcName, "rpcResult", callbackID, val);
}
}
}
Symbol 2787 MovieClip [__Packages.mochi.as2.MochiEventDispatcher] Frame 0
class mochi.as2.MochiEventDispatcher
{
var eventTable;
function MochiEventDispatcher () {
eventTable = {};
}
function buildDelegate(thisObject, thatObject) {
var _local2 = {thisObject:thisObject, thatObject:thatObject};
if (thatObject != undefined) {
var funct = ((typeof(thatObject) == "string") ? (thisObject[thatObject]) : (thatObject));
_local2.delegate = function (args) {
funct.call(thisObject, args);
};
} else {
_local2.delegate = thisObject;
}
return(_local2);
}
function compareDelegate(d_A, d_B) {
if ((d_A.thisObject != d_B.thisObject) || (d_A.thatObject != d_B.thatObject)) {
return(false);
}
return(true);
}
function addEventListener(event, thisObject, thatObject) {
removeEventListener(event, thisObject, thatObject);
eventTable[event].push(buildDelegate(thisObject, thatObject));
}
function removeEventListener(event, thisObject, thatObject) {
var _local3 = buildDelegate(thisObject, thatObject);
if (eventTable[event] == undefined) {
eventTable[event] = [];
return(undefined);
}
for (var _local4 in eventTable[event]) {
if (!compareDelegate(eventTable[event][_local4], _local3)) {
continue;
}
eventTable[event].splice(Number(_local4), 1);
}
}
function triggerEvent(event, args) {
if (eventTable[event] == undefined) {
return(undefined);
}
for (var _local4 in eventTable[event]) {
eventTable[event][_local4].delegate(args);
}
}
}
Symbol 2788 MovieClip [__Packages.mochi.as2.MochiServices] Frame 0
class mochi.as2.MochiServices
{
static var _id, _container, _clip, _sendChannelName, __get__comChannelName, onError, _listenChannel, _sendChannel;
function MochiServices () {
}
static function get id() {
return(_id);
}
static function get clip() {
return(_container);
}
static function get childClip() {
return(_clip);
}
static function getVersion() {
return("3.9.4 as2");
}
static function allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function get isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function set comChannelName(val) {
if (val != undefined) {
if (val.length > 3) {
_sendChannelName = val + "_fromgame";
initComChannels();
}
}
//return(__get__comChannelName());
}
static function get connected() {
return(_connected);
}
static function connect(id, clip, onError) {
if (onError != undefined) {
mochi.as2.MochiServices.onError = onError;
} else if (mochi.as2.MochiServices.onError == undefined) {
mochi.as2.MochiServices.onError = function (errorCode) {
trace(errorCode);
};
}
warnID(id, false);
if ((!_connected) && (_clip == undefined)) {
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
}
}
static function disconnect() {
if (_connected || (_connecting)) {
_connecting = (_connected = false);
flush(true);
if (_clip != undefined) {
_clip.removeMovieClip();
delete _clip;
}
_listenChannel.close();
}
}
static function init(id, clip) {
_id = id;
if (clip != undefined) {
_container = clip;
} else {
_container = _root;
}
loadCommunicator(id, _container);
}
static function loadCommunicator(id, clip) {
var _local6 = "_mochiservices_com_" + id;
var _local5 = new MovieClipLoader();
var _local3 = {};
if (_clip != null) {
return(_clip);
}
if (!isNetworkAvailable) {
onError("NotConnected");
return(null);
}
if (urlOptions().servURL) {
_servURL = urlOptions().servURL;
}
var _local4 = _servURL + _services;
if (urlOptions().servicesURL) {
_local4 = urlOptions().servicesURL;
}
allowDomains(_local4);
_clip = clip.createEmptyMovieClip(_local6, 10336, false);
_listenChannelName = _listenChannelName + ((Math.floor(new Date().getTime()) + "_") + Math.floor(Math.random() * 99999));
listen();
if (_local3.waitInterval != null) {
clearInterval(_local3.waitInterval);
}
_local3.onLoadError = loadError;
_local3.onLoadStart = function (target_mc) {
this.isLoading = true;
};
_local3.onLoadComplete = function (target_mc) {
target_mc.MochiServices = mochi.as2.MochiServices;
};
_local3.startTime = getTimer();
_local3.wait = function () {
if ((getTimer() - this.startTime) > 10000) {
if (!this.isLoading) {
mochi.as2.MochiServices.disconnect();
mochi.as2.MochiServices.onError("IOError");
}
clearInterval(this.waitInterval);
}
};
_local3.waitInterval = setInterval(_local3, "wait", 1000);
_local5.addListener(_local3);
_local5.loadClip((((((_local4 + "?listenLC=") + _listenChannelName) + "&mochiad_options=") + escape(_root.mochiad_options)) + "&api_version=") + getVersion(), _clip);
_sendChannel = new LocalConnection();
_sendChannel._queue = [];
return(_clip);
}
static function loadError(target_mc, errorCode, httpStatus) {
trace("MochiServices could not load.");
disconnect();
onError(errorCode);
}
static function onStatus(infoObject) {
if (!(infoObject.level === "error")) {
} else {
_connected = false;
_listenChannel.connect(_listenChannelName);
}
}
static function listen() {
_listenChannel = new LocalConnection();
_listenChannel.handshake = function (args) {
mochi.as2.MochiServices.__set__comChannelName(args.newChannel);
};
_listenChannel.allowDomain = function (d) {
return(true);
};
_listenChannel.allowInsecureDomain = _listenChannel.allowDomain;
_listenChannel._nextcallbackID = 0;
_listenChannel._callbacks = {};
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
static function initComChannels() {
if (!_connected) {
_sendChannel.onStatus = function (infoObject) {
mochi.as2.MochiServices.onStatus(infoObject);
};
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, version:getVersion()});
_listenChannel.onStatus = function (infoObject) {
mochi.as2.MochiServices.onStatus(infoObject);
};
_listenChannel.onReceive = function (pkg) {
var _local5 = pkg.callbackID;
var _local4 = this._callbacks[_local5];
if (!_local4) {
return(undefined);
}
var _local2 = _local4.callbackMethod;
var _local3 = _local4.callbackObject;
if (_local3 && (typeof(_local2) == "string")) {
_local2 = _local3[_local2];
}
if (_local2 != undefined) {
_local2.apply(_local3, pkg.args);
}
delete this._callbacks[_local5];
};
_listenChannel.onEvent = function (pkg) {
switch (pkg.target) {
case "services" :
mochi.as2.MochiServices.triggerEvent(pkg.event, pkg.args);
break;
case "events" :
mochi.as2.MochiEvents.triggerEvent(pkg.event, pkg.args);
break;
case "coins" :
mochi.as2.MochiCoins.triggerEvent(pkg.event, pkg.args);
break;
case "social" :
mochi.as2.MochiSocial.triggerEvent(pkg.event, pkg.args);
}
};
_listenChannel.onError = function () {
mochi.as2.MochiServices.onError("IOError");
};
trace("[SERVICES_API] connected!");
_connecting = false;
_connected = true;
while (_sendChannel._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _sendChannel._queue.shift());
}
}
}
static function flush(error) {
var _local1;
var _local2;
while (_sendChannel._queue.length > 0) {
_local1 = _sendChannel._queue.shift();
if (_local1.callbackID != null) {
_local2 = _listenChannel._callbacks[_local1.callbackID];
}
delete _listenChannel._callbacks[_local1.callbackID];
if (error) {
handleError(_local1.args, _local2.callbackObject, _local2.callbackMethod);
}
}
}
static function handleError(args, callbackObject, callbackMethod) {
if (args != null) {
if (args.onError != null) {
args.onError("NotConnected");
}
if ((args.options != null) && (args.options.onError != null)) {
args.options.onError("NotConnected");
}
}
if (callbackMethod != null) {
args = {};
args.error = true;
args.errorCode = "NotConnected";
if ((callbackObject != null) && (typeof(callbackMethod) == "string")) {
callbackObject[callbackMethod](args);
} else if (callbackMethod != null) {
callbackMethod.apply(args);
}
}
}
static function send(methodName, args, callbackObject, callbackMethod) {
if (_connected) {
_sendChannel.send(_sendChannelName, "onReceive", {methodName:methodName, args:args, callbackID:_listenChannel._nextcallbackID});
} else {
if ((_clip == undefined) || (!_connecting)) {
trace("Error: MochiServices not connected. Please call MochiServices.connect(). Function: " + methodName);
handleError(args, callbackObject, callbackMethod);
flush(true);
return(undefined);
}
_sendChannel._queue.push({methodName:methodName, args:args, callbackID:_listenChannel._nextcallbackID});
}
_listenChannel._callbacks[_listenChannel._nextcallbackID] = {callbackObject:callbackObject, callbackMethod:callbackMethod};
_listenChannel._nextcallbackID++;
}
static function urlOptions() {
var _local5 = {};
var _local6;
if (_root._url.indexOf("mochiad_options") != -1) {
var _local2 = (_root._url.indexOf("mochiad_options") + "mochiad_options".length) + 1;
_local6 = _root._url.substr(_local2, _root._url.length);
} else if (_root.mochiad_options) {
_local6 = _root.mochiad_options;
}
if (_local6) {
var _local4 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2].split("=");
_local5[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
return(_local5);
}
static function warnID(bid, leaderboard) {
bid = bid.toLowerCase();
if (bid.length != 16) {
trace(("WARNING: " + (leaderboard ? "board" : "game")) + " ID is not the appropriate length");
return(undefined);
}
if (bid == "1e113c7239048b3f") {
if (leaderboard) {
trace("WARNING: Using testing board ID");
} else {
trace("WARNING: Using testing board ID as game ID");
}
return(undefined);
}
if (bid == "84993a1de4031cd8") {
if (leaderboard) {
trace("WARNING: Using testing game ID as board ID");
} else {
trace("WARNING: Using testing game ID");
}
return(undefined);
}
var _local1 = 0;
while (_local1 < bid.length) {
switch (bid.charAt(_local1)) {
case "0" :
case "1" :
case "2" :
case "3" :
case "4" :
case "5" :
case "6" :
case "7" :
case "8" :
case "9" :
case "a" :
case "b" :
case "c" :
case "d" :
case "e" :
case "f" :
break;
default :
trace("WARNING: Board ID contains illegal characters: " + bid);
return(undefined);
}
_local1++;
}
}
static function addLinkEvent(url, burl, btn, onClick) {
var timeout = 1500;
var t0 = getTimer();
var _local2 = new Object();
_local2.mav = getVersion();
_local2.swfv = btn.getSWFVersion() || 6;
_local2.swfurl = btn._url;
_local2.fv = System.capabilities.version;
_local2.os = System.capabilities.os;
_local2.lang = System.capabilities.language;
_local2.scres = (System.capabilities.screenResolutionX + "x") + System.capabilities.screenResolutionY;
var s = "?";
var _local3 = 0;
for (var _local6 in _local2) {
if (_local3 != 0) {
s = s + "&";
}
_local3++;
s = ((s + _local6) + "=") + escape(_local2[_local6]);
}
if (!(netupAttempted || (_connected))) {
var ping = btn.createEmptyMovieClip("ping", 777);
var _local7 = btn.createEmptyMovieClip("nettest", 778);
netupAttempted = true;
ping.loadMovie("http://link.mochiads.com/linkping.swf?t=" + getTimer());
_local7.onEnterFrame = function () {
if ((ping._totalframes > 0) && (ping._totalframes == ping._framesloaded)) {
delete this.onEnterFrame;
} else if ((getTimer() - t0) > timeout) {
delete this.onEnterFrame;
mochi.as2.MochiServices.netup = false;
}
};
}
var _local4 = btn.createEmptyMovieClip("clk", 1001);
_local4._alpha = 0;
_local4.beginFill(1044735);
_local4.moveTo(0, 0);
_local4.lineTo(0, btn._height);
_local4.lineTo(btn._width, btn._height);
_local4.lineTo(btn._width, 0);
_local4.lineTo(0, 0);
_local4.endFill();
_local4.onRelease = function () {
if (mochi.as2.MochiServices.netup) {
getURL (url + s, "_blank");
} else {
getURL (burl, "_blank");
}
if (onClick != undefined) {
onClick();
}
};
}
static function setContainer(clip) {
}
static function stayOnTop(clip) {
}
static function addEventListener(eventType, thisObject, thatObject) {
_dispatcher.addEventListener(eventType, thisObject, thatObject);
}
static function triggerEvent(eventType, args) {
_dispatcher.triggerEvent(eventType, args);
}
static function removeEventListener(eventType, thisObject, thatObject) {
_dispatcher.removeEventListener(eventType, thisObject, thatObject);
}
static var CONNECTED = "onConnected";
static var _servURL = "http://www.mochiads.com/static/lib/services/";
static var _services = "services.swf";
static var _mochiLC = "MochiLC.swf";
static var _listenChannelName = "__ms_";
static var _connecting = false;
static var _connected = false;
static var netup = true;
static var netupAttempted = false;
static var _dispatcher = new mochi.as2.MochiEventDispatcher();
}
Symbol 2789 MovieClip [__Packages.mochi.as2.MochiEvents] Frame 0
class mochi.as2.MochiEvents
{
function MochiEvents () {
}
static function getVersion() {
return(mochi.as2.MochiServices.getVersion());
}
static function getAchievements(properties) {
mochi.as2.MochiServices.send("events_getAchievements", properties);
}
static function unlockAchievement(properties) {
mochi.as2.MochiServices.send("events_unlockAchievement", properties);
}
static function startSession(achievementID) {
mochi.as2.MochiServices.send("events_beginSession", {achievementID:achievementID}, null, null);
}
static function showAwards(options) {
mochi.as2.MochiServices.send("events_showAwards", options, null, null);
}
static function setNotifications(style) {
mochi.as2.MochiServices.send("events_setNotifications", style, null, null);
}
static function addEventListener(eventType, thisObject, thatObject) {
_dispatcher.addEventListener(eventType, thisObject, thatObject);
}
static function triggerEvent(eventType, args) {
_dispatcher.triggerEvent(eventType, args);
}
static function removeEventListener(eventType, thisObject, thatObject) {
_dispatcher.removeEventListener(eventType, thisObject, thatObject);
}
static function startPlay(tag) {
if (tag == undefined) {
tag = "gameplay";
}
mochi.as2.MochiServices.send("events_setRoundID", {tag:String(tag)}, null, null);
}
static function endPlay() {
mochi.as2.MochiServices.send("events_clearRoundID", null, null, null);
}
static function trackEvent(tag, value) {
mochi.as2.MochiServices.send("events_trackEvent", {tag:tag, value:value}, null, null);
}
static var ACHIEVEMENTS_OWNED = "AchievementOwned";
static var ACHIEVEMENT_NEW = "AchievementReceived";
static var GAME_ACHIEVEMENTS = "GameAchievements";
static var ERROR = "Error";
static var IO_ERROR = "IOError";
static var IO_PENDING = "IOPending";
static var ALIGN_TOP_LEFT = "ALIGN_TL";
static var ALIGN_TOP = "ALIGN_T";
static var ALIGN_TOP_RIGHT = "ALIGN_TR";
static var ALIGN_LEFT = "ALIGN_L";
static var ALIGN_CENTER = "ALIGN_C";
static var ALIGN_RIGHT = "ALIGN_R";
static var ALIGN_BOTTOM_LEFT = "ALIGN_BL";
static var ALIGN_BOTTOM = "ALIGN_B";
static var ALIGN_BOTTOM_RIGHT = "ALIGN_BR";
static var FORMAT_SHORT = "ShortForm";
static var FORMAT_LONG = "LongForm";
static var FORMAT_NONE = "NoForm";
static var _dispatcher = new mochi.as2.MochiEventDispatcher();
}
Symbol 2790 MovieClip [__Packages.mochi.as2.MochiCoins] Frame 0
class mochi.as2.MochiCoins
{
function MochiCoins () {
}
static function getVersion() {
return(mochi.as2.MochiServices.getVersion());
}
static function showStore(options) {
mochi.as2.MochiServices.send("coins_showStore", {options:options}, null, null);
}
static function showItem(options) {
if ((options == undefined) || (typeof(options.item) != "string")) {
trace("ERROR: showItem call must pass an Object with an item key");
return(undefined);
}
mochi.as2.MochiServices.send("coins_showItem", {options:options}, null, null);
}
static function showVideo(options) {
if ((options == undefined) || (typeof(options.item) != "string")) {
trace("ERROR: showVideo call must pass an Object with an item key");
return(undefined);
}
mochi.as2.MochiServices.send("coins_showVideo", {options:options}, null, null);
}
static function getStoreItems() {
mochi.as2.MochiServices.send("coins_getStoreItems");
}
static function requestFunding(properties) {
mochi.as2.MochiServices.send("social_requestFunding", properties);
}
static function addEventListener(eventType, delegate) {
_dispatcher.addEventListener(eventType, delegate);
}
static function triggerEvent(eventType, args) {
_dispatcher.triggerEvent(eventType, args);
}
static function removeEventListener(eventType, delegate) {
_dispatcher.removeEventListener(eventType, delegate);
}
static var STORE_SHOW = "StoreShow";
static var STORE_HIDE = "StoreHide";
static var ITEM_OWNED = "ItemOwned";
static var ITEM_NEW = "ItemNew";
static var STORE_ITEMS = "StoreItems";
static var ERROR = "Error";
static var IO_ERROR = "IOError";
static var NO_USER = "NoUser";
static var _dispatcher = new mochi.as2.MochiEventDispatcher();
}
Symbol 2791 MovieClip [__Packages.mochi.as2.MochiSocial] Frame 0
class mochi.as2.MochiSocial
{
function MochiSocial () {
}
static function getVersion() {
return(mochi.as2.MochiServices.getVersion());
}
static function showLoginWidget(options) {
mochi.as2.MochiServices.setContainer();
mochi.as2.MochiServices.stayOnTop();
mochi.as2.MochiServices.send("social_showLoginWidget", {options:options});
}
static function hideLoginWidget() {
mochi.as2.MochiServices.send("social_hideLoginWidget");
}
static function requestLogin(properties) {
mochi.as2.MochiServices.send("social_requestLogin", properties);
}
static function getFriendsList(properties) {
mochi.as2.MochiServices.send("social_getFriendsList", properties);
}
static function showProfile(options) {
mochi.as2.MochiServices.setContainer();
mochi.as2.MochiServices.stayOnTop();
mochi.as2.MochiServices.send("social_showProfile", options);
}
static function postToStream(properties) {
mochi.as2.MochiServices.send("social_postToStream", properties);
}
static function inviteFriends(properties) {
mochi.as2.MochiServices.send("social_inviteFriends", properties);
}
static function requestFan(properties) {
mochi.as2.MochiServices.send("social_requestFan", properties);
}
static function saveUserProperties(properties) {
mochi.as2.MochiServices.send("social_saveUserProperties", properties);
}
static function addEventListener(eventType, delegate) {
_dispatcher.addEventListener(eventType, delegate);
}
static function triggerEvent(eventType, args) {
_dispatcher.triggerEvent(eventType, args);
}
static function removeEventListener(eventType, delegate) {
_dispatcher.removeEventListener(eventType, delegate);
}
static var LOGGED_IN = "LoggedIn";
static var LOGGED_OUT = "LoggedOut";
static var LOGIN_SHOW = "LoginShow";
static var LOGIN_HIDE = "LoginHide";
static var LOGIN_SHOWN = "LoginShown";
static var PROFILE_SHOW = "ProfileShow";
static var PROFILE_HIDE = "ProfileHide";
static var PROPERTIES_SAVED = "PropertySaved";
static var WIDGET_LOADED = "WidgetLoaded";
static var FRIEND_LIST = "FriendsList";
static var PROFILE_DATA = "ProfileData";
static var GAMEPLAY_DATA = "GameplayData";
static var ACTION_CANCELED = "onCancel";
static var ACTION_COMPLETE = "onComplete";
static var USER_INFO = "UserInfo";
static var ERROR = "Error";
static var IO_ERROR = "IOError";
static var NO_USER = "NoUser";
static var PROPERTIES_SIZE = "PropertiesSize";
static var _dispatcher = new mochi.as2.MochiEventDispatcher();
}
Symbol 2435 MovieClip Frame 175
stop();
Symbol 2494 MovieClip Frame 175
stop();
Symbol 2503 MovieClip Frame 1
this.onPress = function () {
getURL ("http://www.belugerinstudios.com", "_blank");
};
Symbol 2503 MovieClip Frame 185
stop();
Symbol 2625 MovieClip Frame 1
stop();
Symbol 2633 MovieClip Frame 1
stop();
Symbol 2641 MovieClip Frame 1
stop();
Symbol 2649 MovieClip Frame 1
stop();
Symbol 2657 MovieClip Frame 1
stop();
Symbol 2666 MovieClip Frame 1
stop();
Symbol 2674 MovieClip Frame 1
stop();
Symbol 2681 MovieClip Frame 1
stop();
Symbol 2689 MovieClip Frame 1
stop();
Symbol 2697 MovieClip Frame 1
stop();
Symbol 2706 MovieClip Frame 1
stop();
Symbol 2767 MovieClip Frame 15
stop();
Symbol 2775 MovieClip Frame 17
stop();