Frame 1
var CPMStarContentSpotID = "3656Q70DDC6A8";
System.security.allowDomain("server.cpmstar.com");
adBox.loadMovie("http://server.cpmstar.com/adviewas2.swf?contentspotid=" + CPMStarContentSpotID);
function simpanData() {
adaData = true;
Cookies = SharedObject.getLocal("SD35x");
i = 1;
while (i <= simpanSemua.length) {
Cookies.data["xSDData" + i] = eval (simpanSemua[i]);
i++;
}
}
function loadData() {
Cookies = SharedObject.getLocal("SD35x");
i = 1;
while (i <= simpanSemua.length) {
_root[simpanSemua[i]] = Cookies.data["xSDData" + 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();
fscommand ("showmenu", false);
fscommand ("fullscreen", false);
fscommand ("allowscale", true);
Stage.showMenu = false;
this.onEnterFrame = function () {
persen = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
xpersen = persen + " %";
bar_mc.gotoAndStop(persen);
if (persen >= 100) {
gotoAndStop ("completed");
delete this.onEnterFrame;
}
};
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");
stop();
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 (206);
};
help_btn.onRelease = function () {
klik();
gotoAndStop (204);
};
team_btn.onRelease = function () {
klik();
gotoAndStop (205);
};
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 (207);
};
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=FL11129409", "_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
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)) || (xscore == undefined)) || (xlevel == undefined)) {
pilihanMode = "campaign";
gotoAndStop ("pilihLevel");
} else {
continue_mc._visible = true;
continue_mc.continue_btn.onRelease = function () {
if (((jenisMaping == undefined) || (xscore == undefined)) || (xlevel == undefined)) {
jenisMaping = 1;
xscore = 0;
adaData = undefined;
pilihanMode = "campaign";
gotoAndStop ("pilihLevel");
} else {
pilihanMode = "campaign";
gotoAndStop (207);
}
};
continue_mc.new_btn.onRelease = function () {
jenisMaping = 1;
xscore = 0;
adaData = undefined;
pilihanMode = "campaign";
gotoAndStop ("pilihLevel");
};
}
};
single_btn.onRelease = function () {
klik();
pilihanMode = "single";
gotoAndStop ("pilihLevel");
};
Frame 202
stop();
back_btn.onRollOver = (easy_btn.onRollOver = (normal_btn.onRollOver = (hard_btn.onRollOver = (extreme_btn.onRollOver = function () {
over();
}))));
back_btn.onRelease = function () {
klik();
gotoAndStop (201);
};
easy_btn.onRelease = function () {
klik();
xlevel = "easy";
if (pilihanMode == "campaign") {
jenisLand = 1;
jenisMaping = 1;
xscore = 0;
gotoAndStop (207);
} else {
gotoAndStop (203);
}
simpanData();
};
normal_btn.onRelease = function () {
klik();
xlevel = "normal";
if (pilihanMode == "campaign") {
jenisLand = 1;
jenisMaping = 1;
xscore = 0;
gotoAndStop (207);
} else {
gotoAndStop (203);
}
simpanData();
};
hard_btn.onRelease = function () {
klik();
xlevel = "hard";
if (pilihanMode == "campaign") {
jenisLand = 1;
jenisMaping = 1;
xscore = 0;
gotoAndStop (207);
} else {
gotoAndStop (203);
}
simpanData();
};
extreme_btn.onRelease = function () {
klik();
xlevel = "extreme";
if (pilihanMode == "campaign") {
jenisLand = 1;
jenisMaping = 1;
xscore = 0;
gotoAndStop (207);
} else {
gotoAndStop (203);
}
simpanData();
};
Frame 203
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 (207);
};
map2.onRelease = function () {
klik();
jenisMaping = 2;
gotoAndStop (207);
};
map3.onRelease = function () {
klik();
jenisMaping = 3;
gotoAndStop (207);
};
map4.onRelease = function () {
klik();
jenisMaping = 4;
gotoAndStop (207);
};
map5.onRelease = function () {
klik();
jenisMaping = 5;
gotoAndStop (207);
};
map6.onRelease = function () {
klik();
jenisMaping = 6;
gotoAndStop (207);
};
map7.onRelease = function () {
klik();
jenisMaping = 7;
gotoAndStop (207);
};
map8.onRelease = function () {
klik();
jenisMaping = 8;
gotoAndStop (207);
};
map9.onRelease = function () {
klik();
jenisMaping = 9;
gotoAndStop (207);
};
map10.onRelease = function () {
klik();
jenisMaping = 10;
gotoAndStop (207);
};
map11.onRelease = function () {
klik();
jenisMaping = 11;
gotoAndStop (207);
};
back_btn.onRelease = function () {
klik();
gotoAndStop (201);
};
Frame 204
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 205
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 206
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 207
function cekMapping() {
if (jenisMaping == 1) {
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 == 2) {
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 == 3) {
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 == 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 = [[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 == 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";
};
frame.box50_btn.onRollOver = function () {
over();
frame.select = "LASER HELICOPTER, LIVE: 1250, SPEED: 0.6, RANGE: 210, DAMAGE: 140";
};
frame.box51_btn.onRollOver = function () {
over();
frame.select = "TESLA HELICOPTER, LIVE: 1500, SPEED: 0.6, RANGE: 220, DAMAGE: 150";
};
frame.box52_btn.onRollOver = function () {
over();
frame.select = "TESLA TOWER, RANGE: 250, DAMAGE: 80";
};
frame.box53_btn.onRollOver = function () {
over();
frame.select = "MISSILE AIR STRIKE, LIVE: 1750, SPEED: 0.7, RANGE: 200, DAMAGE: 160";
};
frame.box54_btn.onRollOver = function () {
over();
frame.select = "SONIC AIR STRIKE, LIVE: 2000, SPEED: 0.7, RANGE: 220, DAMAGE: 170";
};
frame.box55_btn.onRollOver = function () {
over();
frame.select = "BLUE ION AIR STRIKE, LIVE: 2250, SPEED: 0.7, RANGE: 230, DAMAGE: 180";
};
frame.box56_btn.onRollOver = function () {
over();
frame.select = "RED ION TOWER, RANGE: 275, DAMAGE: 90";
};
frame.box57_btn.onRollOver = function () {
over();
frame.select = "BOMB JET, LIVE: 3000, SPEED: 0.9, RANGE: 230, DAMAGE: 200";
};
frame.box58_btn.onRollOver = function () {
over();
frame.select = "RED ION JET, LIVE: 4000, SPEED: 0.9, RANGE: 260, DAMAGE: 250";
};
frame.box59_btn.onRollOver = function () {
over();
frame.select = "ATOMIC JET, LIVE: 5000, SPEED: 0.9, RANGE: 310, DAMAGE: 300";
};
frame.box60_btn.onRollOver = function () {
over();
frame.select = "ATOMIC TOWER, RANGE: 300, DAMAGE: 100";
};
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);
};
}
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";
};
frame.box38_btn.onRollOver = function () {
over();
frame.select = "BOMB SHIP, LIVE: 550, SPEED: 0.35, RANGE: 80, DAMAGE: 80";
};
frame.box39_btn.onRollOver = function () {
over();
frame.select = "MISSILE SHIP, LIVE: 575, SPEED: 0.35, RANGE: 200, DAMAGE: 85";
};
frame.box40_btn.onRollOver = function () {
over();
frame.select = "LASER TOWER, RANGE: 210, DAMAGE: 60";
};
frame.box41_btn.onRollOver = function () {
over();
frame.select = "SNIPER DESTROYER, LIVE: 600, SPEED: 0.45, RANGE: 200, DAMAGE: 90";
};
frame.box42_btn.onRollOver = function () {
over();
frame.select = "DYNAMITE DESTROYER, LIVE: 625, SPEED: 0.45, RANGE: 100, DAMAGE: 95";
};
frame.box43_btn.onRollOver = function () {
over();
frame.select = "LASER DESTROYER, LIVE: 650, SPEED: 0.45, RANGE: 210, DAMAGE: 100";
};
frame.box44_btn.onRollOver = function () {
over();
frame.select = "SONIC TOWER, RANGE: 220, DAMAGE: 64";
};
frame.box45_btn.onRollOver = function () {
over();
frame.select = "SMOKE SUBMARINE, LIVE: 700, SPEED: 0.65, RANGE: 60, DAMAGE: 105";
};
frame.box46_btn.onRollOver = function () {
over();
frame.select = "SONIC SUBMARINE, LIVE: 750, SPEED: 0.65, RANGE: 230, DAMAGE: 110";
};
frame.box47_btn.onRollOver = function () {
over();
frame.select = "BLUE ION SUBMARINE, LIVE: 800, SPEED: 0.65, RANGE: 250, DAMAGE: 120";
};
frame.box48_btn.onRollOver = function () {
over();
frame.select = "BLUE ION TOWER, RANGE: 230, DAMAGE: 68";
};
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);
};
}
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";
};
frame.box26_btn.onRollOver = function () {
over();
frame.select = "GRANADE JEEP, LIVE: 225, SPEED: 0.35, RANGE: 150, DAMAGE: 43";
};
frame.box27_btn.onRollOver = function () {
over();
frame.select = "ELECTRIC JEEP, LIVE: 250, SPEED: 0.35, RANGE: 160, DAMAGE: 45";
};
frame.box28_btn.onRollOver = function () {
over();
frame.select = "GRANADE TOWER, RANGE: 180, DAMAGE: 28";
};
frame.box29_btn.onRollOver = function () {
over();
frame.select = "BOMB TRUCK, LIVE: 350, SPEED: 0.35, RANGE: 45, DAMAGE: 50";
};
frame.box30_btn.onRollOver = function () {
over();
frame.select = "SMOKE TRUCK, LIVE: 370, SPEED: 0.35, RANGE: 45, DAMAGE: 52";
};
frame.box31_btn.onRollOver = function () {
over();
frame.select = "SNIPER TRUCK, LIVE: 400, SPEED: 0.35, RANGE: 170, DAMAGE: 55";
};
frame.box32_btn.onRollOver = function () {
over();
frame.select = "BOMB TOWER, RANGE: 190, DAMAGE: 32";
};
frame.box33_btn.onRollOver = function () {
over();
frame.select = "DYNAMITE TANK, LIVE: 460, SPEED: 0.35, RANGE: 60, DAMAGE: 60";
};
frame.box34_btn.onRollOver = function () {
over();
frame.select = "MISSILE TANK, LIVE: 480, SPEED: 0.35, RANGE: 200, DAMAGE: 65";
};
frame.box35_btn.onRollOver = function () {
over();
frame.select = "LASER TANK, LIVE: 500, SPEED: 0.35, RANGE: 210, DAMAGE: 70";
};
frame.box36_btn.onRollOver = function () {
over();
frame.select = "MISSILE TOWER, RANGE: 200, DAMAGE: 36";
};
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);
};
}
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";
};
frame.box14_btn.onRollOver = function () {
over();
frame.select = "GRANADEMAN, LIVE: 50, SPEED: 0.35, RANGE: 140, DAMAGE: 16";
};
frame.box15_btn.onRollOver = function () {
over();
frame.select = "CANONMAN, LIVE: 55, SPEED: 0.25, RANGE: 120, DAMAGE: 18";
};
frame.box16_btn.onRollOver = function () {
over();
frame.select = "GUN TOWER, RANGE: 150, DAMAGE: 16";
};
frame.box17_btn.onRollOver = function () {
over();
frame.select = "BOMBERMAN, LIVE: 60, SPEED: 0.6, RANGE: 65, DAMAGE: 20";
};
frame.box18_btn.onRollOver = function () {
over();
frame.select = "DOUBLE BOMBERMEN, LIVE: 65, SPEED: 0.6, RANGE: 65, DAMAGE: 22";
};
frame.box19_btn.onRollOver = function () {
over();
frame.select = "TRIPLE BOMBERMEN, LIVE: 70, SPEED: 0.6, RANGE: 65, DAMAGE: 25";
};
frame.box20_btn.onRollOver = function () {
over();
frame.select = "CANON TOWER, RANGE: 160, DAMAGE: 20";
};
frame.box21_btn.onRollOver = function () {
over();
frame.select = "MOTO, LIVE: 85, SPEED: 0.5, RANGE: 65, DAMAGE: 28";
};
frame.box22_btn.onRollOver = function () {
over();
frame.select = "GUN MOTO, LIVE: 90, SPEED: 0.45, RANGE: 120, DAMAGE: 32";
};
frame.box23_btn.onRollOver = function () {
over();
frame.select = "BOMB MOTO, LIVE: 100, SPEED: 0.4, RANGE: 65, DAMAGE: 34";
};
frame.box24_btn.onRollOver = function () {
over();
frame.select = "ELECTRIC TOWER, RANGE: 170, DAMAGE: 24";
};
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);
};
}
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";
};
frame.box2_btn.onRollOver = function () {
over();
frame.select = "SPEEDY ARCHER, LIVE: 10, SPEED: 0.4, RANGE: 110, DAMAGE: 1.5";
};
frame.box3_btn.onRollOver = function () {
over();
frame.select = "FIRE ARCHER, LIVE: 12, SPEED: 0.3, RANGE: 100, DAMAGE: 2.5";
};
frame.box4_btn.onRollOver = function () {
over();
frame.select = "WATER TOWER, RANGE: 120, DAMAGE: 4";
};
frame.box5_btn.onRollOver = function () {
over();
frame.select = "SWORDMAN, LIVE: 24, SPEED: 0.2, RANGE: 55, DAMAGE: 3";
};
frame.box6_btn.onRollOver = function () {
over();
frame.select = "FIRE SWORDMAN, LIVE: 26, SPEED: 0.35, RANGE: 65, DAMAGE: 3.5";
};
frame.box7_btn.onRollOver = function () {
over();
frame.select = "ICE SWORDMAN, LIVE: 28, SPEED: 0.25, RANGE: 45, DAMAGE: 4";
};
frame.box8_btn.onRollOver = function () {
over();
frame.select = "ICE TOWER, RANGE: 130, DAMAGE: 8";
};
frame.box9_btn.onRollOver = function () {
over();
frame.select = "SWORD KNIGHT, LIVE: 35, SPEED: 0.4, RANGE: 40, DAMAGE: 4";
};
frame.box10_btn.onRollOver = function () {
over();
frame.select = "ROCK KNIGHT, LIVE: 38, SPEED: 0.5, RANGE: 60, DAMAGE: 4.5";
};
frame.box11_btn.onRollOver = function () {
over();
frame.select = "METEOR KNIGHT, LIVE: 40, SPEED: 0.45, RANGE: 80, DAMAGE: 5";
};
frame.box12_btn.onRollOver = function () {
over();
frame.select = "ROCK TOWER, RANGE: 140, DAMAGE: 12";
};
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);
};
}
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.4;
} else if (xlevel == "normal") {
panah.damage = panah.damage * 0.8;
} else if (xlevel == "hard") {
panah.damage = panah.damage * 1.2;
} else if (xlevel == "extreme") {
panah.damage = panah.damage * 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 == 3) || (jenisMaping == 4)) || (jenisMaping == 6)) {
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.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.6;
} else if (xlevel == "normal") {
chara.nyawa = chara.nyawa * 1;
} else if (xlevel == "hard") {
chara.nyawa = chara.nyawa * 1.4;
} else if (xlevel == "extreme") {
chara.nyawa = chara.nyawa * 1.8;
}
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 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);
_root["archer" + this.tujuan].nyawa = _root["archer" + this.tujuan].nyawa - this.damage;
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);
_root["archer" + this.tujuan].nyawa = _root["archer" + this.tujuan].nyawa - this.damage;
}
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 (209);
} else if (jenisMaen == "maen") {
if (pilihanMode == "campaign") {
jenisMaping++;
if (jenisMaping >= 12) {
jenisMaping = 0;
adaData = undefined;
gotoAndStop (211);
} else {
gotoAndStop ("menangGame");
}
simpanData();
} else {
gotoAndStop (211);
}
}
} else if (indi == "kalah") {
if (jenisMaen == "demo") {
gotoAndStop (210);
} else if (jenisMaen == "maen") {
gotoAndStop (212);
}
}
}
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.6;
} else if (xlevel == "normal") {
panah.damage = panah.damage * 1;
} else if (xlevel == "hard") {
panah.damage = panah.damage * 1.4;
} else if (xlevel == "extreme") {
panah.damage = panah.damage * 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 = 1;
while (i <= 60) {
frame[("box" + i) + "_btn"].enabled = false;
i++;
}
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 = 1;
while (i <= 60) {
frame[("box" + i) + "_btn"].enabled = true;
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();
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 208
prevFrame();
gotoAndStop;
Frame 209
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 210
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 211
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=FL11129409&name=" + wwnama) + "&score=") + xxscore) + "&key=", "_blank");
this.enabled = false;
klik();
};
wnama = "";
finalScore = "FINAL SCORE: " + xscore;
Selection.setFocus(wnama_mc);
Frame 212
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=FL11129409&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 1272 MovieClip [frame_mc] Frame 1
stop();
Symbol 1329 MovieClip Frame 1
stop();
Symbol 1349 MovieClip [text_mc2] Frame 35
stop();
removeMovieClip(this);
Symbol 1350 MovieClip [text_mc] Frame 35
stop();
removeMovieClip(this);
Symbol 1351 MovieClip [theMagic2] Frame 25
stop();
_root.mulaiWater();
removeMovieClip(this);
Symbol 1352 MovieClip [theMagic] Frame 25
stop();
_root.mulaiRock();
removeMovieClip(this);
Symbol 1651 MovieClip [trans_mc] Frame 1
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = "- Kill all Enemies";
Symbol 1651 MovieClip [trans_mc] Frame 2
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = ("Move " + _root.wnama) + " to the Arrow Sign";
Symbol 1651 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 1651 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 1651 MovieClip [trans_mc] Frame 5
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = "- Kill Granade";
Symbol 1651 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 1651 MovieClip [trans_mc] Frame 7
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = "Kill All Jeep";
Symbol 1651 MovieClip [trans_mc] Frame 8
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = "Kill All Enemies and Destroy All Tower";
Symbol 1651 MovieClip [trans_mc] Frame 9
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = (object = "Kill All Enemies and Destroy All Tower");
Symbol 1651 MovieClip [trans_mc] Frame 10
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = "Kill All Enemies";
Symbol 1651 MovieClip [trans_mc] Frame 11
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = ("Move " + _root.wnama) + " to the Arrow Sign";
Symbol 1651 MovieClip [trans_mc] Frame 12
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = ("Move " + _root.wnama) + " to the Arrow Sign";
Symbol 1651 MovieClip [trans_mc] Frame 13
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = ("Move " + _root.wnama) + " to the Arrow Sign";
Symbol 1651 MovieClip [trans_mc] Frame 14
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = "Kill All Enemies";
Symbol 1651 MovieClip [trans_mc] Frame 15
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = "Kill All Enemies";
Symbol 1651 MovieClip [trans_mc] Frame 16
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = "Kill All Enemies";
Symbol 1651 MovieClip [trans_mc] Frame 17
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = ("Move " + _root.wnama) + " to the Arrow Sign";
Symbol 1651 MovieClip [trans_mc] Frame 18
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = ("Move " + _root.wnama) + " to the Arrow Sign";
Symbol 1651 MovieClip [trans_mc] Frame 20
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = ("Move " + _root.wnama) + " to the Arrow Sign";
Symbol 1651 MovieClip [trans_mc] Frame 21
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = ("Move " + _root.wnama) + " to the Arrow Sign";
Symbol 1651 MovieClip [trans_mc] Frame 22
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = ("Move " + _root.wnama) + " to the Arrow Sign";
Symbol 1651 MovieClip [trans_mc] Frame 23
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = ("Move " + _root.wnama) + " to the Arrow Sign";
Symbol 1651 MovieClip [trans_mc] Frame 25
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = "Kill All Enemies";
Symbol 1651 MovieClip [trans_mc] Frame 26
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = "Kill All Enemies";
Symbol 1651 MovieClip [trans_mc] Frame 27
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = "Kill All Enemies";
Symbol 1651 MovieClip [trans_mc] Frame 28
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = "Kill All Enemies";
Symbol 1651 MovieClip [trans_mc] Frame 30
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = "Kill All Enemies";
Symbol 1651 MovieClip [trans_mc] Frame 31
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = "Kill All Enemies";
Symbol 1651 MovieClip [trans_mc] Frame 32
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = "Kill All Enemies and Destroy All Tower";
Symbol 1651 MovieClip [trans_mc] Frame 33
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = "Kill All Enemies";
Symbol 1651 MovieClip [trans_mc] Frame 34
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = "Kill All Enemies";
Symbol 1651 MovieClip [trans_mc] Frame 35
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = "Kill All Enemies";
Symbol 1651 MovieClip [trans_mc] Frame 36
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = "Kill All Enemies";
Symbol 1651 MovieClip [trans_mc] Frame 37
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = "Kill All Enemies";
Symbol 1651 MovieClip [trans_mc] Frame 38
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = "Kill All Enemies";
Symbol 1651 MovieClip [trans_mc] Frame 39
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
object = "Kill original Dark Anger";
Symbol 1651 MovieClip [trans_mc] Frame 90
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
Symbol 1651 MovieClip [trans_mc] Frame 91
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
Symbol 1651 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 1651 MovieClip [trans_mc] Frame 93
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
Symbol 1651 MovieClip [trans_mc] Frame 94
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
Symbol 1651 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 1651 MovieClip [trans_mc] Frame 96
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
Symbol 1651 MovieClip [trans_mc] Frame 97
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
Symbol 1651 MovieClip [trans_mc] Frame 98
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
Symbol 1651 MovieClip [trans_mc] Frame 99
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
Symbol 1651 MovieClip [trans_mc] Frame 100
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
Symbol 1651 MovieClip [trans_mc] Frame 101
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
Symbol 1651 MovieClip [trans_mc] Frame 102
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
Symbol 1651 MovieClip [trans_mc] Frame 103
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
Symbol 1651 MovieClip [trans_mc] Frame 104
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
Symbol 1651 MovieClip [trans_mc] Frame 105
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
Symbol 1651 MovieClip [trans_mc] Frame 106
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
Symbol 1651 MovieClip [trans_mc] Frame 107
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
Symbol 1651 MovieClip [trans_mc] Frame 108
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
Symbol 1651 MovieClip [trans_mc] Frame 109
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
Symbol 1651 MovieClip [trans_mc] Frame 110
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
Symbol 1651 MovieClip [trans_mc] Frame 111
stop();
wname = _root.wnama;
fail = ("- " + _root.wnama) + " dies";
Symbol 1755 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 1772 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 1793 MovieClip [msgBox_mc2] Frame 1
stop();
Symbol 1793 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 1799 MovieClip [splash_mc] Frame 15
stop();
removeMovieClip(this);
Symbol 1830 MovieClip Frame 1
stop();
Symbol 1848 MovieClip [command_mc] Frame 1
stop();
Symbol 1862 MovieClip [sword2_mc3] Frame 1
stop();
Symbol 1868 MovieClip [sword2_mc2] Frame 1
stop();
Symbol 1870 MovieClip [sword2_mc] Frame 1
stop();
Symbol 1884 MovieClip [horse2_mc] Frame 1
stop();
Symbol 1894 MovieClip [rifle2_mc] Frame 1
stop();
Symbol 1904 MovieClip [bomberman2_mc3] Frame 1
stop();
Symbol 1905 MovieClip [bomberman2_mc2] Frame 1
stop();
Symbol 1906 MovieClip [bomberman2_mc] Frame 1
stop();
Symbol 1920 MovieClip [motor2_mc] Frame 1
stop();
Symbol 1924 MovieClip [selam2_mc] Frame 1
stop();
Symbol 1928 MovieClip [destroyer2_mc] Frame 1
stop();
Symbol 1932 MovieClip [ship2_mc] Frame 1
stop();
Symbol 1936 MovieClip [jet2_mc] Frame 1
stop();
Symbol 1950 MovieClip [pesawat2_mc] Frame 1
stop();
Symbol 1962 MovieClip [heli2_mc] Frame 1
stop();
Symbol 1966 MovieClip [tank2_mc] Frame 1
stop();
Symbol 1969 MovieClip [truk2_mc] Frame 1
stop();
Symbol 1973 MovieClip [jip2_mc] Frame 1
stop();
Symbol 1975 MovieClip [archer2_mc] Frame 1
stop();
Symbol 1976 MovieClip Frame 20
removeMovieClip(this);
removeMovieClip(_parent);
removeMovieClip(_root._parent);
removeMovieClip(this._parent);
Symbol 1977 MovieClip [xmati2_mc3] Frame 1
stop();
Symbol 1978 MovieClip Frame 20
removeMovieClip(this);
removeMovieClip(_parent);
removeMovieClip(_root._parent);
removeMovieClip(this._parent);
Symbol 1979 MovieClip [mati2_mc3] Frame 1
stop();
Symbol 1980 MovieClip Frame 45
removeMovieClip(this);
removeMovieClip(_parent);
removeMovieClip(_root._parent);
removeMovieClip(this._parent);
Symbol 1981 MovieClip [xmati2_mc2] Frame 1
stop();
Symbol 1982 MovieClip Frame 45
removeMovieClip(this);
removeMovieClip(_parent);
removeMovieClip(_root._parent);
removeMovieClip(this._parent);
Symbol 1983 MovieClip [mati2_mc2] Frame 1
stop();
Symbol 1984 MovieClip Frame 45
removeMovieClip(this);
removeMovieClip(_parent);
removeMovieClip(_root._parent);
removeMovieClip(this._parent);
Symbol 1985 MovieClip [xmati2_mc1] Frame 1
stop();
Symbol 1986 MovieClip Frame 45
removeMovieClip(this);
removeMovieClip(_parent);
removeMovieClip(_root._parent);
removeMovieClip(this._parent);
Symbol 1987 MovieClip [mati2_mc1] Frame 1
stop();
Symbol 1990 MovieClip Frame 20
removeMovieClip(this);
removeMovieClip(_parent);
removeMovieClip(_root._parent);
removeMovieClip(this._parent);
Symbol 1991 MovieClip [xmati1_mc3] Frame 1
stop();
Symbol 1994 MovieClip Frame 20
removeMovieClip(this);
removeMovieClip(_parent);
removeMovieClip(_root._parent);
removeMovieClip(this._parent);
Symbol 1995 MovieClip [mati1_mc3] Frame 1
stop();
Symbol 1996 MovieClip Frame 40
removeMovieClip(this);
removeMovieClip(_parent);
removeMovieClip(_root._parent);
removeMovieClip(this._parent);
Symbol 1997 MovieClip [xmati1_mc2] Frame 1
stop();
Symbol 1998 MovieClip Frame 40
removeMovieClip(this);
removeMovieClip(_parent);
removeMovieClip(_root._parent);
removeMovieClip(this._parent);
Symbol 1999 MovieClip [mati1_mc2] Frame 1
stop();
Symbol 2000 MovieClip Frame 40
removeMovieClip(this);
removeMovieClip(_parent);
removeMovieClip(_root._parent);
removeMovieClip(this._parent);
Symbol 2001 MovieClip [xmati1_mc1] Frame 1
stop();
Symbol 2004 MovieClip Frame 15
removeMovieClip(this);
removeMovieClip(_parent);
removeMovieClip(_root._parent);
removeMovieClip(this._parent);
Symbol 2005 MovieClip [mati3_mc2] Frame 1
stop();
Symbol 2009 MovieClip Frame 15
removeMovieClip(this);
removeMovieClip(_parent);
removeMovieClip(_root._parent);
removeMovieClip(this._parent);
Symbol 2010 MovieClip [mati3_mc1] Frame 1
stop();
Symbol 2011 MovieClip Frame 15
removeMovieClip(this);
removeMovieClip(_parent);
removeMovieClip(_root._parent);
removeMovieClip(this._parent);
Symbol 2012 MovieClip [ymati2_mc] Frame 1
stop();
Symbol 2015 MovieClip Frame 40
removeMovieClip(this);
removeMovieClip(_parent);
removeMovieClip(_root._parent);
removeMovieClip(this._parent);
Symbol 2016 MovieClip [ymati1_mc] Frame 1
stop();
Symbol 2017 MovieClip Frame 40
removeMovieClip(this);
removeMovieClip(_parent);
removeMovieClip(_root._parent);
removeMovieClip(this._parent);
Symbol 2018 MovieClip [mati1_mc1] Frame 1
stop();
Symbol 2025 MovieClip [sword_mc3] Frame 1
stop();
Symbol 2029 MovieClip [sword_mc2] Frame 1
stop();
Symbol 2035 MovieClip [sword_mc] Frame 1
stop();
Symbol 2043 MovieClip [horse_mc] Frame 1
stop();
Symbol 2051 MovieClip [rifle_mc] Frame 1
stop();
Symbol 2060 MovieClip [bomberman_mc2] Frame 1
stop();
Symbol 2061 MovieClip [bomberman_mc3] Frame 1
stop();
Symbol 2062 MovieClip [bomberman_mc] Frame 1
stop();
Symbol 2075 MovieClip [motor_mc] Frame 1
stop();
Symbol 2078 MovieClip [destroyer_mc] Frame 1
stop();
Symbol 2081 MovieClip [selam_mc] Frame 1
stop();
Symbol 2084 MovieClip [ship_mc] Frame 1
stop();
Symbol 2087 MovieClip [jet_mc] Frame 1
stop();
Symbol 2100 MovieClip [pesawat_mc] Frame 1
stop();
Symbol 2113 MovieClip [heli_mc] Frame 1
stop();
Symbol 2116 MovieClip [tank_mc] Frame 1
stop();
Symbol 2119 MovieClip [truk_mc] Frame 1
stop();
Symbol 2132 MovieClip [jip_mc] Frame 1
stop();
Symbol 2140 MovieClip [archer_mc] Frame 1
stop();
Symbol 2148 MovieClip [air2_mc] Frame 15
removeMovieClip(this);
Symbol 2156 MovieClip [darah_mc] Frame 15
removeMovieClip(this);
Symbol 2158 MovieClip [water2_mc] Frame 1
gotoAndPlay(random(20) + 1);
Symbol 2158 MovieClip [water2_mc] Frame 100
removeMovieClip(this);
Symbol 2160 MovieClip [darah2_mc] Frame 1
gotoAndPlay(random(20) + 1);
Symbol 2160 MovieClip [darah2_mc] Frame 100
removeMovieClip(this);
Symbol 2161 MovieClip [api2_mc] Frame 1
gotoAndPlay(random(16) + 1);
Symbol 2161 MovieClip [api2_mc] Frame 35
removeMovieClip(this);
Symbol 2207 MovieClip [istana2_mc] Frame 1
stop();
Symbol 2207 MovieClip [istana2_mc] Frame 15
play();
Symbol 2207 MovieClip [istana2_mc] Frame 65
stop();
_root.sudahSelesai("menang");
Symbol 2239 MovieClip [istana1_mc] Frame 1
stop();
Symbol 2239 MovieClip [istana1_mc] Frame 15
play();
Symbol 2239 MovieClip [istana1_mc] Frame 65
stop();
_root.sudahSelesai("kalah");
Symbol 2283 MovieClip [ledak_mc] Frame 15
removeMovieClip(this);
Symbol 2288 MovieClip [kilat_mc] Frame 1
gotoAndPlay(random(15) + 1);
Symbol 2288 MovieClip [kilat_mc] Frame 22
stop();
removeMovieClip(this);
Symbol 2296 MovieClip [ledakion_mc2] Frame 15
removeMovieClip(this);
Symbol 2298 MovieClip [ledakion_mc] Frame 15
removeMovieClip(this);
Symbol 2300 MovieClip [ledakson_mc] Frame 30
removeMovieClip(this);
Symbol 2303 MovieClip [ledakion2] Frame 10
removeMovieClip(this);
Symbol 2305 MovieClip [ledakion] Frame 10
removeMovieClip(this);
Symbol 2307 MovieClip [ledakatom_mc] Frame 5
removeMovieClip(this);
Symbol 2322 MovieClip Frame 1
stop();
Symbol 2329 MovieClip [special_mc] Frame 1
stop();
Symbol 2338 MovieClip Frame 1
stop();
Symbol 2347 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 2433 MovieClip Frame 175
stop();
Symbol 2492 MovieClip Frame 175
stop();
Symbol 2501 MovieClip Frame 1
this.onPress = function () {
getURL ("http://www.belugerinstudios.com", "_blank");
};
Symbol 2501 MovieClip Frame 185
stop();
Symbol 2618 MovieClip Frame 1
stop();
Symbol 2626 MovieClip Frame 1
stop();
Symbol 2634 MovieClip Frame 1
stop();
Symbol 2642 MovieClip Frame 1
stop();
Symbol 2650 MovieClip Frame 1
stop();
Symbol 2659 MovieClip Frame 1
stop();
Symbol 2667 MovieClip Frame 1
stop();
Symbol 2674 MovieClip Frame 1
stop();
Symbol 2682 MovieClip Frame 1
stop();
Symbol 2690 MovieClip Frame 1
stop();
Symbol 2699 MovieClip Frame 1
stop();
Symbol 2754 MovieClip Frame 15
stop();
Symbol 2762 MovieClip Frame 17
stop();