Frame 1
function openLink(obj, item) {
getURL ("http://www.box10.com/sniper-games.html", _blank);
}
stop();
var my_cm = new ContextMenu();
my_cm.hideBuiltInItems();
my_cm.customItems.push(new ContextMenuItem("Play more games by BOX10", openLink, true));
this.menu = my_cm;
stop();
stop();
Frame 2
stop();
Frame 5
function playMusic(nama) {
BagMusic = new Sound();
BagMusic.attachSound(nama);
BagMusic.start(0, 100);
BagMusic.setVolume(backgroundVolume);
}
function fxStart(nama) {
fxSound = new Sound();
fxSound.attachSound(nama);
fxSound.start(0, 1);
fxSound.setVolume(fxVolume);
}
function soundBackground(nama) {
soundB = new Sound();
soundB.attachSound(nama);
soundB.start(0, 100);
soundB.setVolume(backgroundVolume);
}
backgroundVolume = 60;
fxVolume = 80;
mute = false;
soundMenu = false;
_root.mySound = new Sound();
_root.mySound.setVolume(80);
stop();
var saveFile = SharedObject.getLocal("agent10");
if (saveFile.data.indexNama == undefined) {
saveFile.data.indexNama = true;
saveFile.data.noPlay = 10;
saveFile.data.player1 = "CPU";
saveFile.data.score1 = 20000;
saveFile.data.player2 = "CPU";
saveFile.data.score2 = 18000;
saveFile.data.player3 = "CPU";
saveFile.data.score3 = 16000;
saveFile.data.player4 = "CPU";
saveFile.data.score4 = 14000;
saveFile.data.player5 = "CPU";
saveFile.data.score5 = 12000;
saveFile.data.player6 = "CPU";
saveFile.data.score6 = 10000;
saveFile.data.player7 = "CPU";
saveFile.data.score7 = 8000;
saveFile.data.player8 = "CPU";
saveFile.data.score8 = 6000;
saveFile.data.player9 = "CPU";
saveFile.data.score9 = 4000;
saveFile.data.player10 = "CPU";
saveFile.data.score10 = 2000;
}
stop();
jenisSenjata = "awp1";
jenisScope = "zoom1";
Have_awp1 = true;
Have_awp2 = false;
Have_awp3 = false;
Have_awp4 = false;
Have_awp5 = false;
Have_zoom1 = true;
Have_zoom2 = false;
Have_zoom3 = false;
Have_balance = false;
balance = false;
zoom = 1;
ammo1 = 8;
ammo2 = 0;
money = 500;
function sitelock(urls_allowed) {
lock = true;
domain_parts = _url.split("://");
real_domain = domain_parts[1].split("/");
domain.text = real_domain[0];
for (x in urls_allowed) {
if (urls_allowed[x] == real_domain[0]) {
lock = false;
}
}
if (lock) {
_global.SiteLock = true;
} else {
_global.SiteLock = false;
}
}
urls_allowed = ["www.box10.com"];
_global.SiteLock = false;
sitelock(urls_allowed);
Frame 6
function newGame() {
saveFile.data.profile = nama_txt.text;
if (saveFile.data.profile == "") {
saveFile.data.profile = "B10";
}
jenisSenjata = "awp1";
jenisScope = "scope1";
jenisPeluru = "pendek";
Have_awp1 = true;
Have_awp2 = false;
Have_awp3 = false;
Have_awp4 = false;
Have_awp5 = false;
Have_zoom1 = true;
Have_zoom2 = false;
Have_zoom3 = false;
Have_balance = false;
balance = false;
Level = 1;
zoom = 1;
headshoot = 0;
miss = 0;
ammo1 = 6;
ammo2 = 0;
money = 500;
TotalEarn = 0;
score = 0;
_root.gotoAndStop("briefing");
saveGame();
}
function traceData() {
trace(saveFile.data.profile);
trace(saveFile.data.jenisSenjata);
trace(saveFile.data.jenisScope);
trace(saveFile.data.balance);
trace(saveFile.data.zoom);
trace(saveFile.data.ammo1);
trace(saveFile.data.ammo2);
trace(saveFile.data.money);
trace(saveFile.data.Have_awp1);
trace(saveFile.data.Have_awp2);
trace(saveFile.data.Have_awp3);
trace(saveFile.data.Have_awp4);
trace(saveFile.data.Have_awp5);
trace(saveFile.data.Have_zoom1);
trace(saveFile.data.Have_zoom2);
trace(saveFile.data.Have_zoom3);
trace(saveFile.data.Have_balance);
}
function loadgame() {
nama_txt.text = saveFile.data.profile;
jenisSenjata = saveFile.data.jenisSenjata;
jenisScope = saveFile.data.jenisScope;
jenisPeluru = saveFile.data.jenisPeluru;
balance = saveFile.data.balance;
ammo1 = saveFile.data.ammo1;
ammo2 = saveFile.data.ammo2;
money = saveFile.data.money;
Have_awp1 = saveFile.data.Have_awp1;
Have_awp2 = saveFile.data.Have_awp2;
Have_awp3 = saveFile.data.Have_awp3;
Have_awp4 = saveFile.data.Have_awp4;
Have_awp5 = saveFile.data.Have_awp5;
Have_zoom1 = saveFile.data.Have_zoom1;
Have_zoom2 = saveFile.data.Have_zoom2;
Have_zoom3 = saveFile.data.Have_zoom3;
Have_balance = saveFile.data.Have_balance;
Level = saveFile.data.Level;
headshoot = saveFile.data.headshoot;
miss = saveFile.data.miss;
score = saveFile.data.score;
TotalEarn = saveFile.data.totalEarn;
}
function saveGame() {
saveFile.data.jenisSenjata = jenisSenjata;
saveFile.data.jenisScope = jenisScope;
saveFile.data.jenisPeluru = jenisPeluru;
saveFile.data.balance = balance;
saveFile.data.ammo1 = ammo1;
saveFile.data.ammo2 = ammo2;
saveFile.data.money = money;
saveFile.data.Have_awp1 = Have_awp1;
saveFile.data.Have_awp2 = Have_awp2;
saveFile.data.Have_awp3 = Have_awp3;
saveFile.data.Have_awp4 = Have_awp4;
saveFile.data.Have_awp5 = Have_awp5;
saveFile.data.Have_zoom1 = Have_zoom1;
saveFile.data.Have_zoom2 = Have_zoom2;
saveFile.data.Have_zoom3 = Have_zoom3;
saveFile.data.Have_balance = Have_balance;
saveFile.data.Level = Level;
saveFile.data.headshoot = headshoot;
saveFile.data.miss = miss;
saveFile.data.totalEarn = TotalEarn;
saveFile.data.score = score;
trace("save ok ");
}
function loadGame() {
if (saveFile.data.profile == undefined) {
trace("no save");
} else {
loadgame();
_root.gotoAndStop("briefing");
}
}
var saveFile = SharedObject.getLocal("agent10");
play_btn.onRollOver = function () {
_root.fxStart("btnOver");
};
play_btn.onPress = function () {
_root.fxStart("btnPress");
};
continue_btn.onRollOver = function () {
_root.fxStart("btnOver");
};
continue_btn.onPress = function () {
_root.fxStart("btnPress");
};
Frame 7
function startGame() {
switch (Level) {
case 1 :
if ((jenisSenjata != "") && (jenisScope != "")) {
if (ammo1 > 0) {
gotoAndStop ("listLevel");
return;
}
trace("ammo empty");
info_pop._visible = true;
info_pop.info_txt.text = "Out of ammo";
} else {
trace("equip some weapon");
info_pop._visible = true;
info_pop.info_txt.text = "Check requirements";
}
case 2 :
if ((jenisSenjata != "") && (jenisScope != "")) {
if (ammo1 > 0) {
gotoAndStop ("listLevel");
return;
}
trace("ammo empty");
info_pop._visible = true;
info_pop.info_txt.text = "Out of ammo";
} else {
trace("equip some weapon");
info_pop._visible = true;
info_pop.info_txt.text = "Check requirements";
}
case 3 :
if ((jenisSenjata != "") && (jenisScope != "")) {
if (ammo1 > 0) {
gotoAndStop ("listLevel");
return;
}
trace("ammo empty");
info_pop._visible = true;
info_pop.info_txt.text = "Out of ammo";
} else {
trace("equip some weapon");
info_pop._visible = true;
info_pop.info_txt.text = "Check requirements";
}
case 4 :
if ((jenisSenjata != "") && (jenisScope != "")) {
if (ammo1 > 0) {
gotoAndStop ("listLevel");
return;
}
trace("ammo empty");
info_pop._visible = true;
info_pop.info_txt.text = "Out of ammo";
} else {
trace("equip some weapon");
info_pop._visible = true;
info_pop.info_txt.text = "Check requirements";
}
return;
case 5 :
if ((jenisSenjata != "") && (jenisScope != "")) {
if (ammo1 > 0) {
gotoAndStop ("listLevel");
return;
}
trace("ammo empty");
info_pop._visible = true;
info_pop.info_txt.text = "Out of ammo";
} else {
trace("equip some weapon");
info_pop._visible = true;
info_pop.info_txt.text = "Check requirements";
}
case 6 :
if ((jenisSenjata != "") && (jenisScope != "")) {
if (ammo1 > 0) {
gotoAndStop ("listLevel");
return;
}
trace("ammo empty");
info_pop._visible = true;
info_pop.info_txt.text = "Out of ammo";
} else {
trace("equip some weapon");
info_pop._visible = true;
info_pop.info_txt.text = "Check requirements";
}
case 7 :
if ((jenisSenjata != "") && (jenisScope != "")) {
if (ammo1 > 0) {
gotoAndStop ("listLevel");
return;
}
trace("ammo empty");
info_pop._visible = true;
info_pop.info_txt.text = "Out of ammo";
} else {
trace("equip some weapon");
info_pop._visible = true;
info_pop.info_txt.text = "Check requirements";
}
case 8 :
if ((jenisSenjata != "") && (jenisScope != "")) {
if (ammo1 > 0) {
gotoAndStop ("listLevel");
return;
}
trace("ammo empty");
info_pop._visible = true;
info_pop.info_txt.text = "Out of ammo";
} else {
trace("equip some weapon");
info_pop._visible = true;
info_pop.info_txt.text = "Check requirements";
}
case 9 :
if ((jenisSenjata != "") && (jenisScope != "")) {
if (ammo1 > 0) {
gotoAndStop ("listLevel");
return;
}
trace("ammo empty");
info_pop._visible = true;
info_pop.info_txt.text = "Out of ammo";
} else {
trace("equip some weapon");
info_pop._visible = true;
info_pop.info_txt.text = "Check requirements";
}
}
}
info_pop._visible = false;
function showPop(info) {
trace_pop.gotoAndPlay(2);
trace_pop.trace_txt.text = info;
}
function showInf(info) {
info_pop._visible = true;
info_pop.info_txt.text = info;
e_btn.gotoAndStop(2);
}
function showMoneymin(total) {
moneyMin.gotoAndPlay(2);
moneyMin.box.money_txt.text = total;
}
function checkMoney() {
money_txt.text = money;
if (money > 3000) {
if (Have_awp1) {
Lockawp_1.gotoAndStop(2);
} else {
Lockawp_1.gotoAndStop(1);
}
if (Have_zoom1) {
lockZoom_1.gotoAndStop(2);
} else {
lockZoom_1.gotoAndStop(1);
}
} else {
Lockawp_1.gotoAndStop(2);
lockZoom_1.gotoAndStop(2);
}
if ((money >= 3500) && (!_global.SiteLock)) {
if (Have_zoom3) {
lockZoom_3.gotoAndStop(2);
} else {
lockZoom_3.gotoAndStop(1);
}
} else {
lockZoom_3.gotoAndStop(2);
}
if (money > 5500) {
if (Have_awp2) {
Lockawp_2.gotoAndStop(2);
} else {
Lockawp_2.gotoAndStop(1);
}
if (Have_balance) {
LockBalance.gotoAndStop(2);
} else {
LockBalance.gotoAndStop(1);
}
} else {
Lockawp_2.gotoAndStop(2);
LockBalance.gotoAndStop(2);
}
if (money > 9500) {
if (Have_awp3) {
Lockawp_3.gotoAndStop(2);
} else {
Lockawp_3.gotoAndStop(1);
}
} else {
Lockawp_3.gotoAndStop(2);
}
if (money > 14500) {
if (Have_awp4) {
Lockawp_4.gotoAndStop(2);
} else {
Lockawp_4.gotoAndStop(1);
}
} else {
Lockawp_4.gotoAndStop(2);
}
if (_global.SiteLock) {
lck_5.gotoAndStop(1);
awp5_buy.enabled = false;
lck_6.gotoAndStop(1);
zoom3_buy.enabled = false;
} else {
lck_5.gotoAndStop(2);
awp5_buy.enabled = true;
lck_6.gotoAndStop(2);
zoom3_buy.enabled = true;
}
if ((money > 20000) && (!_global.SiteLock)) {
if (Have_awp5) {
Lockawp_5.gotoAndStop(2);
} else {
Lockawp_5.gotoAndStop(1);
}
} else {
Lockawp_5.gotoAndStop(2);
}
if (money > 2500) {
if (Have_zoom2) {
lockZoom_2.gotoAndStop(2);
} else {
lockZoom_2.gotoAndStop(1);
}
} else {
lockZoom_2.gotoAndStop(2);
}
}
info_pop._visible = false;
oj = 0;
while (oj < 6) {
_root[("awp" + oj) + "_mc"]._visible = false;
oj++;
}
zoom1_mc._visible = false;
zoom2_mc._visible = false;
zoom3_mc._visible = false;
balance_mc._visible = false;
ammo1_qty = 1;
ammo2_qty = 1;
awp1_buy.onPress = function () {
if ((money >= 3000) && (!Have_awp1)) {
_root.fxStart("money");
money = money - 3000;
showMoneymin(3000);
Have_awp1 = true;
showPop("purchase");
showInf("Remember to equip your new purchase !");
} else if ((money >= 3000) && (Have_awp1)) {
} else {
showPop("not enough money");
}
checkMoney();
};
awp2_buy.onPress = function () {
if ((money >= 5500) && (!Have_awp2)) {
_root.fxStart("money");
money = money - 5500;
showMoneymin(5500);
Have_awp2 = true;
showPop("purchase");
showInf("Remember to equip your new purchase !");
} else if ((money >= 5500) && (Have_awp2)) {
} else {
showPop("not enough money");
}
checkMoney();
};
awp3_buy.onPress = function () {
if ((money >= 9500) && (!Have_awp3)) {
_root.fxStart("money");
money = money - 9500;
showMoneymin(9500);
Have_awp3 = true;
showPop("purchase");
showInf("Remember to equip your new purchase !");
} else if ((money >= 9500) && (Have_awp3)) {
} else {
showPop("not enough money");
}
checkMoney();
};
awp4_buy.onPress = function () {
if ((money >= 14500) && (!Have_awp4)) {
_root.fxStart("money");
money = money - 14500;
showMoneymin(14500);
Have_awp4 = true;
showPop("purchase");
showInf("Remember to equip your new purchase !");
} else if ((money >= 14500) && (Have_awp4)) {
} else {
showPop("not enough money");
}
checkMoney();
};
awp5_buy.onPress = function () {
if ((money >= 20000) && (!Have_awp5)) {
_root.fxStart("money");
money = money - 20000;
showMoneymin(20000);
Have_awp5 = true;
showPop("purchase");
showInf("Remember to equip your new purchase !");
} else if ((money >= 20000) && (Have_awp5)) {
} else {
showPop("not enough money");
}
checkMoney();
};
zoom1_buy.onPress = function () {
if ((money >= 1100) && (!Have_zoom1)) {
_root.fxStart("money");
money = money - 1100;
showMoneymin(1100);
Have_zoom1 = true;
showPop("purchase");
showInf("Remember to equip your new purchase !");
} else if ((money >= 1100) && (Have_zoom1)) {
} else {
showPop("not enough money");
}
checkMoney();
};
zoom2_buy.onPress = function () {
if ((money >= 2500) && (!Have_zoom2)) {
_root.fxStart("money");
money = money - 2500;
showMoneymin(2500);
Have_zoom2 = true;
showPop("purchase");
showInf("Remember to equip your new purchase !");
} else if ((money >= 1100) && (Have_zoom2)) {
} else {
showPop("not enough money");
}
checkMoney();
};
zoom3_buy.onPress = function () {
if ((money >= 3500) && (!Have_zoom3)) {
_root.fxStart("money");
money = money - 3500;
showMoneymin(3500);
Have_zoom3 = true;
showPop("purchase");
showInf("Remember to equip your new purchase !");
} else if ((money >= 3500) && (Have_zoom3)) {
} else {
showPop("not enough money");
}
checkMoney();
};
balance_buy.onPress = function () {
if ((money >= 5500) && (!Have_balance)) {
_root.fxStart("money");
money = money - 5500;
showMoneymin(5500);
Have_balance = true;
showPop("purchase");
showInf("Remember to equip your new purchase !");
} else if ((money >= 5500) && (Have_balance)) {
} else {
showPop("not enough money");
}
checkMoney();
};
ammo1_buy.onPress = function () {
totalPrice = 100 * ammo1_qty;
if (money >= totalPrice) {
money = money - totalPrice;
showMoneymin(totalPrice);
ammo1 = ammo1 + ammo1_qty;
ammo1_qty = 1;
showPop("purchase");
} else {
ammo1_qty = 1;
showPop("not enough money");
}
checkMoney();
};
checkMoney();
Instance of Symbol 810 MovieClip "awp1_mc" in Frame 7
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 813 MovieClip "awp2_mc" in Frame 7
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 818 MovieClip "awp3_mc" in Frame 7
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 822 MovieClip "awp4_mc" in Frame 7
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 826 MovieClip "awp5_mc" in Frame 7
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 831 MovieClip "zoom1_mc" in Frame 7
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 835 MovieClip "zoom2_mc" in Frame 7
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 840 MovieClip "zoom3_mc" in Frame 7
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 843 MovieClip "balance_mc" in Frame 7
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 854 MovieClip "info_pop" in Frame 7
onClipEvent (load) {
_visible = false;
}
Frame 8
function startGame() {
switch (Level) {
case 1 :
if ((jenisSenjata != "") && (jenisScope != "")) {
if (ammo1 > 0) {
gotoAndStop ("listLevel");
return;
}
trace("ammo empty");
info_pop._visible = true;
info_pop.info_txt.text = "Out of ammo";
} else {
trace("equip some weapon");
info_pop._visible = true;
info_pop.info_txt.text = "Check requirements";
}
case 2 :
if ((jenisSenjata != "") && (jenisScope != "")) {
if (ammo1 > 0) {
gotoAndStop ("listLevel");
return;
}
trace("ammo empty");
info_pop._visible = true;
info_pop.info_txt.text = "Out of ammo";
} else {
trace("equip some weapon");
info_pop._visible = true;
info_pop.info_txt.text = "Check requirements";
}
case 3 :
if ((jenisSenjata != "") && (jenisScope != "")) {
if (ammo1 > 0) {
gotoAndStop ("listLevel");
return;
}
trace("ammo empty");
info_pop._visible = true;
info_pop.info_txt.text = "Out of ammo";
} else {
trace("equip some weapon");
info_pop._visible = true;
info_pop.info_txt.text = "Check requirements";
}
case 4 :
if ((jenisSenjata != "") && (jenisScope != "")) {
if (ammo1 > 0) {
gotoAndStop ("listLevel");
return;
}
trace("ammo empty");
info_pop._visible = true;
info_pop.info_txt.text = "Out of ammo";
} else {
trace("equip some weapon");
info_pop._visible = true;
info_pop.info_txt.text = "Check requirements";
}
return;
case 5 :
if ((jenisSenjata != "") && (jenisScope != "")) {
if (ammo1 > 0) {
gotoAndStop ("listLevel");
return;
}
trace("ammo empty");
info_pop._visible = true;
info_pop.info_txt.text = "Out of ammo";
} else {
trace("equip some weapon");
info_pop._visible = true;
info_pop.info_txt.text = "Check requirements";
}
case 6 :
if ((jenisSenjata != "") && (jenisScope != "")) {
if (ammo1 > 0) {
gotoAndStop ("listLevel");
return;
}
trace("ammo empty");
info_pop._visible = true;
info_pop.info_txt.text = "Out of ammo";
} else {
trace("equip some weapon");
info_pop._visible = true;
info_pop.info_txt.text = "Check requirements";
}
case 7 :
if ((jenisSenjata != "") && (jenisScope != "")) {
if (ammo1 > 0) {
gotoAndStop ("listLevel");
return;
}
trace("ammo empty");
info_pop._visible = true;
info_pop.info_txt.text = "Out of ammo";
} else {
trace("equip some weapon");
info_pop._visible = true;
info_pop.info_txt.text = "Check requirements";
}
case 8 :
if ((jenisSenjata != "") && (jenisScope != "")) {
if (ammo1 > 0) {
gotoAndStop ("listLevel");
return;
}
trace("ammo empty");
info_pop._visible = true;
info_pop.info_txt.text = "Out of ammo";
} else {
trace("equip some weapon");
info_pop._visible = true;
info_pop.info_txt.text = "Check requirements";
}
case 9 :
if ((jenisSenjata != "") && (jenisScope != "")) {
if (ammo1 > 0) {
gotoAndStop ("listLevel");
return;
}
trace("ammo empty");
info_pop._visible = true;
info_pop.info_txt.text = "Out of ammo";
} else {
trace("equip some weapon");
info_pop._visible = true;
info_pop.info_txt.text = "Check requirements";
}
}
}
info_pop._visible = false;
function showInfo() {
pop_info.gun.gotoAndStop(jenisSenjata);
pop_info.scope.gotoAndStop(jenisScope);
pop_info.bullet.gotoAndStop(jenisPeluru);
if (balance) {
pop_info.balance.gotoAndStop(2);
} else {
pop_info.balance.gotoAndStop(1);
}
}
function equipAwp(no) {
if (_root["Have_awp" + no]) {
jenisSenjata = "awp" + no;
showInfo();
}
}
function equipZoom(no) {
if (_root["Have_zoom" + no]) {
jenisScope = "scope" + no;
showInfo();
}
}
showInfo();
oj = 0;
while (oj < 6) {
_root[("awp" + oj) + "_mc"]._visible = false;
oj++;
}
zoom1_mc._visible = false;
zoom2_mc._visible = false;
zoom3_mc._visible = false;
balance_mc._visible = false;
money_txt.text = money;
i = 1;
while (i < 6) {
traceAwp = _root["Have_awp" + i];
if (traceAwp) {
_root["awpLock_" + i].gotoAndStop(1);
_root[("awp" + i) + "_equip"].enabled = true;
} else {
_root["awpLock_" + i].gotoAndStop(2);
_root[("awp" + i) + "_equip"].enabled = false;
}
i++;
}
a = 1;
while (a < 4) {
traceZoom = _root["Have_zoom" + a];
if (traceZoom) {
_root["zoomLock_" + a].gotoAndStop(1);
_root[("zoom" + a) + "_btn"].enabled = true;
} else {
_root["zoomLock_" + a].gotoAndStop(2);
_root[("zoom" + a) + "_btn"].enabled = false;
}
a++;
}
if (Have_balance) {
balanceLock.gotoAndStop(1);
balance_btn.enabled = true;
} else {
balanceLock.gotoAndStop(2);
balance_btn.enabled = false;
}
if (ammo1 > 0) {
ammoLock_1.gotoAndStop(1);
ammo1_equip.enabled = true;
} else {
ammoLock_1.gotoAndStop(2);
ammo1_equip.enabled = false;
}
if (ammo2 > 0) {
ammoLock_2.gotoAndStop(1);
ammo2_equip.enabled = true;
} else {
ammoLock_2.gotoAndStop(2);
ammo2_equip.enabled = true;
}
ammo1_txt.text = ammo1;
ammo2_txt.text = ammo2;
ia = 1;
while (ia < 6) {
awpBtnno = _root[("awp" + ia) + "_yes"].no;
awpBtn = _root[("awp" + ia) + "_yes"].yes;
awpBtn.number = ia;
awpBtn.onPress = function () {
equipAwp(this.number);
};
ia++;
}
ib = 1;
while (ib < 4) {
zoomBtn = _root[("zoom" + ib) + "_yes"].yes;
zoomBtn.number = ib;
zoomBtn.onPress = function () {
equipZoom(this.number);
showInfo();
};
ib++;
}
balance_yes.yes.onPress = function () {
balance = true;
showInfo();
};
balance_yes.no.onPress = function () {
balance = false;
showInfo();
};
Instance of Symbol 889 MovieClip "awp1_yes" in Frame 8
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 889 MovieClip "awp2_yes" in Frame 8
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 889 MovieClip "awp3_yes" in Frame 8
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 889 MovieClip "awp4_yes" in Frame 8
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 889 MovieClip "awp5_yes" in Frame 8
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 889 MovieClip "zoom1_yes" in Frame 8
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 889 MovieClip "zoom2_yes" in Frame 8
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 889 MovieClip "zoom3_yes" in Frame 8
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 889 MovieClip "balance_yes" in Frame 8
onClipEvent (load) {
_visible = false;
}
Frame 9
function startGame() {
if ((ammo1 <= 0) && (money <= 50)) {
_root.gotoAndStop("gameover");
}
i = 0;
while (i <= 20) {
tampung = _root.createEmptyMovieClip("tampung" + i, 300 + i);
_root["orang" + i] = tampung;
_root["orang" + i].removeMovieClip();
i++;
}
switch (Level) {
case 1 :
if ((jenisSenjata != "") && (jenisScope != "")) {
if (ammo1 > 0) {
gotoAndStop ("listLevel");
break;
}
trace("ammo empty");
info_pop._visible = true;
info_pop.info_txt.text = "Out of ammo";
} else {
trace("equip some weapon");
info_pop._visible = true;
info_pop.info_txt.text = "Check requirements";
}
case 2 :
if ((jenisSenjata != "") && (jenisScope != "")) {
if (ammo1 > 0) {
gotoAndStop ("listLevel");
break;
}
trace("ammo empty");
info_pop._visible = true;
info_pop.info_txt.text = "Out of ammo";
} else {
trace("equip some weapon");
info_pop._visible = true;
info_pop.info_txt.text = "Check requirements";
}
case 3 :
if ((jenisSenjata != "") && (jenisScope != "")) {
if (ammo1 > 0) {
gotoAndStop ("listLevel");
break;
}
trace("ammo empty");
info_pop._visible = true;
info_pop.info_txt.text = "Out of ammo";
} else {
trace("equip some weapon");
info_pop._visible = true;
info_pop.info_txt.text = "Check requirements";
}
case 4 :
if ((jenisSenjata != "") && (jenisScope != "")) {
if (ammo1 > 0) {
gotoAndStop ("listLevel");
break;
}
trace("ammo empty");
info_pop._visible = true;
info_pop.info_txt.text = "Out of ammo";
} else {
trace("equip some weapon");
info_pop._visible = true;
info_pop.info_txt.text = "Check requirements";
}
break;
case 5 :
if ((jenisSenjata != "") && (jenisScope != "")) {
if (ammo1 > 0) {
gotoAndStop ("listLevel");
break;
}
trace("ammo empty");
info_pop._visible = true;
info_pop.info_txt.text = "Out of ammo";
} else {
trace("equip some weapon");
info_pop._visible = true;
info_pop.info_txt.text = "Check requirements";
}
case 6 :
if ((jenisSenjata != "") && (jenisScope != "")) {
if (ammo1 > 0) {
gotoAndStop ("listLevel");
break;
}
trace("ammo empty");
info_pop._visible = true;
info_pop.info_txt.text = "Out of ammo";
} else {
trace("equip some weapon");
info_pop._visible = true;
info_pop.info_txt.text = "Check requirements";
}
case 7 :
if ((jenisSenjata != "") && (jenisScope != "")) {
if (ammo1 > 0) {
gotoAndStop ("listLevel");
break;
}
trace("ammo empty");
info_pop._visible = true;
info_pop.info_txt.text = "Out of ammo";
} else {
trace("equip some weapon");
info_pop._visible = true;
info_pop.info_txt.text = "Check requirements";
}
case 8 :
if ((jenisSenjata != "") && (jenisScope != "")) {
if (ammo1 > 0) {
gotoAndStop ("listLevel");
break;
}
trace("ammo empty");
info_pop._visible = true;
info_pop.info_txt.text = "Out of ammo";
} else {
trace("equip some weapon");
info_pop._visible = true;
info_pop.info_txt.text = "Check requirements";
}
case 9 :
if ((jenisSenjata != "") && (jenisScope != "")) {
if (ammo1 > 0) {
gotoAndStop ("listLevel");
break;
}
trace("ammo empty");
info_pop._visible = true;
info_pop.info_txt.text = "Out of ammo";
} else {
trace("equip some weapon");
info_pop._visible = true;
info_pop.info_txt.text = "Check requirements";
}
}
}
info_pop._visible = false;
profile_txt.text = "Agent " + saveFile.data.profile;
trace(_root.soundMenu);
if (!_root.soundMenu) {
_root.playMusic("menuSound");
_root.soundMenu = true;
}
trace(TotalEarn);
Frame 10
level_txt.text = Level;
_root.BagMusic.stop();
_root.soundMenu = false;
Frame 12
deep_mc.removeMovieClip();
Mouse.show();
_root.boxLogo.removeMovieClip();
ammo_empty.removeMovieClip();
deep.removeMovieClip();
pagar.removeMovieClip();
rumah1.removeMovieClip();
object10.removeMovieClip();
_root.soundB.stop();
_root.BagMusic.stop();
_root.fxSound.stop();
_root.soundB.stop();
_root.BagMusic.stop();
Frame 13
Mouse.show();
_root.boxLogo.removeMovieClip();
ammo_empty.removeMovieClip();
deep.removeMovieClip();
pagar.removeMovieClip();
rumah1.removeMovieClip();
object10.removeMovieClip();
_root.fxSound.stop();
_root.soundB.stop();
_root.BagMusic.stop();
Frame 15
function setLevel() {
switch (Level) {
case 1 :
_root.attachMovie("mission1_mc", "movie", 50, {_x:427, _y:198});
movie.mulai = true;
movie.orang1.stop();
movie.orang1.posisi = "walk";
movie.orang1.mati = false;
movie.orang2.stop();
movie.orang2.posisi = "walk";
movie.orang2.mati = false;
movie.orang3.stop();
movie.orang3.posisi = "walk";
movie.orang3.mati = false;
movie.orang4.stop();
movie.orang4.posisi = "walk";
movie.orang4.mati = false;
movie.orang5.stop();
movie.orang5.posisi = "target";
movie.orang5.mati = false;
movie.mobil1.stop();
movie.mobil1.body.orang1.mati = false;
movie.mobil1.body.orang2.mati = false;
movie.mobil2.stop();
movie.mobil2.body.orang1.mati = false;
movie.mobil2.body.orang2.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
movie.orang1.play();
movie.orang2.play();
movie.orang3.play();
movie.orang4.play();
movie.orang5.play();
movie.mobil1.play();
movie.mobil2.play();
this.mulai = false;
}
Orang1 = movie.orang1;
Orang2 = movie.orang2;
Orang3 = movie.orang3;
Orang4 = movie.orang4;
Orang5 = movie.orang5;
Orang6 = movie.mobil1.body.orang1;
Orang7 = movie.mobil2.body.orang1;
Orang8 = movie.mobil2.body.orang2;
traceB = _root.movie.bullet1;
if (Orang1.body.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.posisi = "headshoot";
Orang1.stop();
Orang1.body.gotoAndPlay(Orang1.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang1.body.bodysensor.hitTest(traceB.sensor)) {
Orang1.posisi = "run";
Orang1.body.gotoAndPlay(Orang1.posisi);
traceB.removeMovieClip();
}
if (Orang2.body.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.posisi = "headshoot";
Orang2.stop();
Orang2.body.gotoAndPlay(Orang2.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang2.body.bodysensor.hitTest(traceB.sensor)) {
Orang2.posisi = "run";
Orang2.body.gotoAndPlay(Orang2.posisi);
traceB.removeMovieClip();
}
if (Orang3.body.sensor.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.posisi = "headshoot";
Orang3.stop();
Orang3.body.gotoAndPlay(Orang3.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang3.body.bodysensor.hitTest(traceB.sensor)) {
Orang3.posisi = "run";
Orang3.body.gotoAndPlay(Orang3.posisi);
traceB.removeMovieClip();
}
if (Orang4.body.sensor.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.posisi = "headshoot";
Orang4.stop();
Orang4.body.gotoAndPlay(Orang4.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
if (Orang4.body.bodysensor.hitTest(traceB.sensor)) {
Orang4.posisi = "run";
Orang4.body.gotoAndPlay(Orang4.posisi);
traceB.removeMovieClip();
}
if (Orang5.body.sensor.hitTest(traceB.sensor) && (!Orang5.mati)) {
Orang5.posisi = "headshoot";
Orang5.stop();
Orang5.body.gotoAndPlay(Orang5.posisi);
lvl4_win = true;
traceB.removeMovieClip();
Orang5.mati = true;
}
if (Orang5.body.bodysensor.hitTest(traceB.sensor)) {
Orang5.posisi = "run";
Orang5.body.gotoAndPlay(Orang5.posisi);
traceB.removeMovieClip();
}
if (Orang6.hitTest(traceB.sensor) && (!Orang6.mati)) {
Orang6.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang6.mati = true;
}
if (Orang7.hitTest(traceB.sensor) && (!Orang7.mati)) {
Orang7.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang7.mati = true;
}
if (Orang8.hitTest(traceB.sensor) && (!Orang8.mati)) {
Orang8.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang8.mati = true;
}
};
break;
case 2 :
_root.attachMovie("mission2_mc", "movie", 50, {_x:349.15, _y:226});
movie.mulai = true;
movie.orang1.stop();
movie.orang1.posisi = "walk";
movie.orang1.mati = false;
movie.orang2.stop();
movie.orang2.posisi = "target";
movie.orang2.mati = false;
movie.orang3.stop();
movie.orang3.posisi = "walk";
movie.orang3.mati = false;
movie.orang4.stop();
movie.orang4.posisi = "target";
movie.orang4.mati = false;
movie.orang11.stop();
movie.orang11.mati = false;
movie.orang12.stop();
movie.orang12.mati = false;
movie.orang13.stop();
movie.orang13.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
movie.orang1.play();
movie.orang2.play();
movie.orang3.play();
movie.orang4.play();
movie.orang11.play();
movie.orang12.play();
movie.orang13.play();
this.mulai = false;
}
Orang1 = movie.orang1;
Orang2 = movie.orang2;
Orang3 = movie.orang3;
Orang4 = movie.orang4;
Orang11 = movie.orang11;
Orang12 = movie.orang12;
Orang13 = movie.orang13;
traceB = _root.movie.bullet1;
if (Orang11.sensor.hitTest(traceB.sensor) && (!Orang11.mati)) {
Orang11.gotoAndPlay("headshoot");
lvl4_win = true;
traceB.removeMovieClip();
Orang11.mati = true;
}
if (Orang12.sensor.hitTest(traceB.sensor) && (!Orang12.mati)) {
Orang12.gotoAndPlay("headshoot");
lvl4_lose = true;
traceB.removeMovieClip();
Orang12.mati = true;
}
if (Orang13.sensor.hitTest(traceB.sensor) && (!Orang13.mati)) {
Orang13.gotoAndPlay("headshoot");
lvl4_lose = true;
traceB.removeMovieClip();
Orang13.mati = true;
}
if (Orang1.body.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.posisi = "headshoot";
Orang1.stop();
Orang1.body.gotoAndPlay(Orang1.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang1.body.bodysensor.hitTest(traceB.sensor)) {
Orang1.posisi = "run";
Orang1.body.gotoAndPlay(Orang1.posisi);
traceB.removeMovieClip();
}
if (Orang2.body.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.posisi = "headshoot";
Orang2.stop();
Orang2.body.gotoAndPlay(Orang2.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang2.body.bodysensor.hitTest(traceB.sensor)) {
Orang2.posisi = "run";
Orang2.body.gotoAndPlay(Orang2.posisi);
traceB.removeMovieClip();
}
if (Orang3.body.sensor.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.posisi = "headshoot";
Orang3.stop();
Orang3.body.gotoAndPlay(Orang3.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang3.body.bodysensor.hitTest(traceB.sensor)) {
Orang3.posisi = "run";
Orang3.body.gotoAndPlay(Orang3.posisi);
traceB.removeMovieClip();
}
if (Orang4.body.sensor.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.posisi = "headshoot";
Orang4.stop();
Orang4.body.gotoAndPlay(Orang4.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
if (Orang4.body.bodysensor.hitTest(traceB.sensor)) {
Orang4.posisi = "run";
Orang4.body.gotoAndPlay(Orang4.posisi);
traceB.removeMovieClip();
}
};
break;
case 3 :
_root.attachMovie("mission3_mc", "movie", 50, {_x:119, _y:213});
movie.mulai = true;
movie.orang1.stop();
movie.orang1.posisi = "walk";
movie.orang1.mati = false;
movie.orang2.stop();
movie.orang2.posisi = "walk";
movie.orang2.mati = false;
movie.orang3.stop();
movie.orang3.posisi = "walk";
movie.orang3.mati = false;
movie.orang4.stop();
movie.orang4.posisi = "walk";
movie.orang4.mati = false;
movie.orang5.stop();
movie.orang5.posisi = "target";
movie.orang5.mati = false;
movie.mobil1.stop();
movie.mobil1.body.orang1.mati = false;
movie.mobil1.body.orang2.mati = false;
movie.mobil2.stop();
movie.mobil2.body.orang1.mati = false;
movie.mobil2.body.orang2.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
movie.orang1.play();
movie.orang2.play();
movie.orang3.play();
movie.orang4.play();
movie.orang5.play();
movie.mobil1.play();
movie.mobil2.play();
this.mulai = false;
}
Orang1 = movie.orang1;
Orang2 = movie.orang2;
Orang3 = movie.orang3;
Orang4 = movie.orang4;
Orang5 = movie.orang5;
Orang6 = movie.mobil1.body.orang1;
Orang9 = movie.mobil1.body.orang2;
Orang7 = movie.mobil2.body.orang1;
Orang8 = movie.mobil2.body.orang2;
traceB = _root.movie.bullet1;
if (Orang1.body.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.posisi = "headshoot";
Orang1.stop();
Orang1.body.gotoAndPlay(Orang1.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang1.body.bodysensor.hitTest(traceB.sensor)) {
Orang1.posisi = "run";
Orang1.body.gotoAndPlay(Orang1.posisi);
traceB.removeMovieClip();
}
if (Orang2.body.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.posisi = "headshoot";
Orang2.stop();
Orang2.body.gotoAndPlay(Orang2.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang2.body.bodysensor.hitTest(traceB.sensor)) {
Orang2.posisi = "run";
Orang2.body.gotoAndPlay(Orang2.posisi);
traceB.removeMovieClip();
}
if (Orang3.body.sensor.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.posisi = "headshoot";
Orang3.stop();
Orang3.body.gotoAndPlay(Orang3.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang3.body.bodysensor.hitTest(traceB.sensor)) {
Orang3.posisi = "run";
Orang3.body.gotoAndPlay(Orang3.posisi);
traceB.removeMovieClip();
}
if (Orang4.body.sensor.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.posisi = "headshoot";
Orang4.stop();
Orang4.body.gotoAndPlay(Orang4.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
if (Orang4.body.bodysensor.hitTest(traceB.sensor)) {
Orang4.posisi = "run";
Orang4.body.gotoAndPlay(Orang4.posisi);
traceB.removeMovieClip();
}
if (Orang5.body.sensor.hitTest(traceB.sensor) && (!Orang5.mati)) {
Orang5.posisi = "headshoottarget";
Orang5.stop();
Orang5.body.gotoAndPlay(Orang5.posisi);
lvl4_win = true;
traceB.removeMovieClip();
Orang5.mati = true;
}
if (Orang5.body.bodysensor.hitTest(traceB.sensor)) {
Orang5.posisi = "run";
Orang5.body.gotoAndPlay(Orang5.posisi);
traceB.removeMovieClip();
}
if (Orang6.hitTest(traceB.sensor) && (!Orang6.mati)) {
Orang6.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang6.mati = true;
}
if (Orang7.hitTest(traceB.sensor) && (!Orang7.mati)) {
Orang7.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang7.mati = true;
}
if (Orang8.hitTest(traceB.sensor) && (!Orang8.mati)) {
Orang8.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang8.mati = true;
}
if (Orang9.hitTest(traceB.sensor) && (!Orang9.mati)) {
Orang9.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang9.mati = true;
}
};
break;
case 4 :
_root.attachMovie("mission4_mc", "movie", 50, {_x:415, _y:240});
movie.mulai = true;
object10.stop;
object10.body.mati = false;
object11.stop;
object11.body.mati = false;
object12.stop;
object12.body.mati = false;
object13.stop;
object13.body.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
object10.play();
object11.play();
object12.play();
object13.play();
}
Orang1 = movie.object10.body.orang1;
Orang2 = movie.object11.body.orang1;
Orang3 = movie.object12.body.orang1;
Orang4 = movie.object13.body.orang1;
traceB = _root.movie.bullet1;
if (Orang1.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang2.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang3.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang4.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.gotoAndPlay(2);
lvl4_win = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
};
break;
case 5 :
_root.attachMovie("mission5_mc", "movie", 50, {_x:424, _y:280});
movie.mulai = true;
movie.orang1.stop();
movie.orang1.posisi = "walk";
movie.orang1.mati = false;
movie.orang2.stop();
movie.orang2.posisi = "walk";
movie.orang2.mati = false;
movie.orang3.stop();
movie.orang3.posisi = "walk";
movie.orang3.mati = false;
movie.orang4.stop();
movie.orang4.posisi = "walk";
movie.orang4.mati = false;
movie.orang5.stop();
movie.orang5.posisi = "target";
movie.orang5.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
movie.orang1.play();
movie.orang2.play();
movie.orang3.play();
movie.orang4.play();
movie.orang5.play();
movie.mobil1.play();
movie.mobil2.play();
this.mulai = false;
}
Orang1 = movie.orang1;
Orang2 = movie.orang2;
Orang3 = movie.orang3;
Orang4 = movie.orang4;
Orang5 = movie.orang5;
traceB = _root.movie.bullet1;
if (Orang1.body.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.posisi = "headshoot";
Orang1.stop();
Orang1.body.gotoAndPlay(Orang1.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang1.body.bodysensor.hitTest(traceB.sensor)) {
Orang1.posisi = "run";
Orang1.body.gotoAndPlay(Orang1.posisi);
traceB.removeMovieClip();
}
if (Orang2.body.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.posisi = "headshoot";
Orang2.stop();
Orang2.body.gotoAndPlay(Orang2.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang2.body.bodysensor.hitTest(traceB.sensor)) {
Orang2.posisi = "run";
Orang2.body.gotoAndPlay(Orang2.posisi);
traceB.removeMovieClip();
}
if (Orang3.body.sensor.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.posisi = "headshoot";
Orang3.stop();
Orang3.body.gotoAndPlay(Orang3.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang3.body.bodysensor.hitTest(traceB.sensor)) {
Orang3.posisi = "run";
Orang3.body.gotoAndPlay(Orang3.posisi);
traceB.removeMovieClip();
}
if (Orang4.body.sensor.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.posisi = "headshoot";
Orang4.stop();
Orang4.body.gotoAndPlay(Orang4.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
if (Orang4.body.bodysensor.hitTest(traceB.sensor)) {
Orang4.posisi = "run";
Orang4.body.gotoAndPlay(Orang4.posisi);
traceB.removeMovieClip();
}
if (Orang5.body.sensor.hitTest(traceB.sensor) && (!Orang5.mati)) {
Orang5.posisi = "headshoot";
Orang5.stop();
Orang5.body.gotoAndPlay(Orang5.posisi);
lvl4_win = true;
traceB.removeMovieClip();
Orang5.mati = true;
}
if (Orang5.body.bodysensor.hitTest(traceB.sensor)) {
Orang5.posisi = "run";
Orang5.body.gotoAndPlay(Orang5.posisi);
traceB.removeMovieClip();
}
};
break;
case 6 :
_root.attachMovie("mission6_mc", "movie", 50, {_x:356, _y:224});
movie.mulai = true;
movie.orang1.stop();
movie.orang1.posisi = "walk";
movie.orang1.mati = false;
movie.orang2.stop();
movie.orang2.posisi = "walk";
movie.orang2.mati = false;
movie.orang3.stop();
movie.orang3.posisi = "walk";
movie.orang3.mati = false;
movie.object1.stop();
movie.object1.body.orang1.mati = false;
movie.object2.stop();
movie.object2.body.orang1.mati = false;
movie.object3.stop();
movie.object3.body.orang1.mati = false;
movie.object4.stop();
movie.object4.body.orang1.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
movie.orang1.play();
movie.orang2.play();
movie.orang3.play();
movie.object1.play();
movie.object2.play();
movie.object3.play();
movie.object4.play();
this.mulai = false;
}
Orang1 = movie.orang1;
Orang2 = movie.orang2;
Orang3 = movie.orang3;
Orang4 = movie.object1.body.orang1;
Orang5 = movie.object2.body.orang1;
Orang6 = movie.object3.body.orang1;
Orang7 = movie.object4.body.orang1;
traceB = _root.movie.bullet1;
if (Orang1.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.gotoAndPlay("headshoot");
lvl4_win = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang2.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.gotoAndPlay("headshoot");
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang3.sensor.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.gotoAndPlay("headshoot");
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang4.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
if (Orang5.hitTest(traceB.sensor) && (!Orang5.mati)) {
Orang5.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang5.mati = true;
}
if (Orang6.hitTest(traceB.sensor) && (!Orang6.mati)) {
Orang6.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang6.mati = true;
}
if (Orang7.hitTest(traceB.sensor) && (!Orang7.mati)) {
Orang7.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang7.mati = true;
}
};
break;
case 8 :
_root.attachMovie("mission8_mc", "movie", 50, {_x:261, _y:172});
movie.mulai = true;
movie.mobil1.stop();
movie.mobil1.body.orang1.mati = false;
movie.mobil1.body.orang2.mati = false;
movie.mobil2.stop();
movie.mobil2.body.orang1.mati = false;
movie.mobil2.body.orang2.mati = false;
movie.mobil3.stop();
movie.mobil3.body.orang1.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
movie.mobil1.play();
movie.mobil2.play();
movie.mobil3.play();
this.mulai = false;
}
Orang1 = movie.mobil1.body.orang1;
Orang2 = movie.mobil1.body.orang2;
Orang3 = movie.mobil2.body.orang1;
Orang4 = movie.mobil2.body.orang2;
Orang5 = movie.mobil3.body.orang1;
traceB = _root.movie.bullet1;
if (Orang1.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang2.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang3.sensor.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang4.sensor.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
if (Orang5.sensor.hitTest(traceB.sensor) && (!Orang5.mati)) {
Orang5.gotoAndPlay(2);
lvl4_win = true;
traceB.removeMovieClip();
Orang5.mati = true;
}
};
break;
case 9 :
_root.attachMovie("mission9_mc", "movie", 50, {_x:287, _y:285});
movie.mulai = true;
movie.orang1.stop();
movie.orang1.posisi = "walk";
movie.orang1.mati = false;
movie.orang2.stop();
movie.onEnterFrame = function () {
if (this.mulai) {
movie.orang1.play();
movie.orang2.play();
}
Orang1 = movie.orang1;
Orang2 = movie.orang2;
traceB = _root.movie.bullet1;
if (Orang1.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.gotoAndPlay("headshoot");
lvl4_win = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang2.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.gotoAndPlay("headshoot");
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
};
}
_root.attachMovie("boxLogo", "boxLogo", 520, {_x:545, _y:25});
movie.attachMovie("aim", "aim", 500, {_x:350, _y:450});
movie.aim._width = movie.aim._width * 1.2;
movie.aim._height = movie.aim._height * 1.2;
_root.attachMovie("info", "info", 510, {_x:70.85, _y:453.7});
}
function showText() {
_root.attachMovie("textShow", "textShow", 530, {_x:6, _y:3});
}
function showSummary(earn, bonus, faiuler) {
boxLogo.removeMovieClip();
textShow.removeMovieClip();
Mouse.show();
clearInterval(intID);
_root.fxSound.stop;
_root.BagMusic.stop;
_root.soundB.stop;
inGame = false;
movie.removeMovieClip();
info.removeMovieClip();
_root.attachMovie("summary_mc", "summary", 800, {_x:322.3, _y:235.7});
summary.lvl_txt.text = Level;
summary.earn_txt.text = earn;
bns = 250 * bonus;
flr = 0;
summary.bonus_txt.text = bns;
summary.faiuler_txt.text = flr;
totalEarn = (earn + bns) - flr;
summary.total_txt.text = totalEarn;
summary.money = summary.money + totalEarn;
money = money + totalEarn;
TotalEarn = TotalEarn + totalEarn;
summary.ok_btn.onPress = function () {
summary.removeMovieClip();
boxLogo.removeMovieClip();
if (Level < 9) {
_root.gotoAndStop("levelOK");
} else {
headshoot = headshoot + 1;
_root.gotoAndStop("finishGame");
}
};
}
function finishWOI() {
switch (Level) {
case 1 :
price = 2600;
break;
case 2 :
price = 2850;
break;
case 3 :
price = 3200;
break;
case 4 :
price = 3550;
break;
case 5 :
price = 4100;
break;
case 6 :
price = 4350;
break;
case 7 :
price = 4900;
break;
case 8 :
price = 5300;
break;
case 9 :
price = 5500;
}
showSummary(price, 1);
delayDie = 0;
deleteFrame();
}
function kalahWOI() {
delayDie = 0;
showSummary2(0, 0, 1);
}
function showSummary2(earn, bonus, faiuler) {
boxLogo.removeMovieClip();
textShow.removeMovieClip();
inGame = false;
clearInterval(intID);
_root.movie.removeMovieClip();
info.removeMovieClip();
_root.fxSound.stop;
_root.BagMusic.stop;
_root.soundB.stop;
_root.attachMovie("summary_mc", "summary", 800, {_x:322.3, _y:235.7});
Mouse.show();
summary.lvl_txt.text = Level;
summary.earn_txt.text = earn;
bns = 250 * bonus;
flr = -(250 * faiuler);
summary.bonus_txt.text = bns;
summary.faiuler_txt.text = flr;
totalEarn = (earn + bns) - flr;
summary.total_txt.text = -totalEarn;
summary.money = summary.money + totalEarn;
trace(totalEarn);
money = money - totalEarn;
TotalEarn = TotalEarn + totalEarn;
summary.ok_btn.onPress = function () {
summary.removeMovieClip();
boxLogo.removeMovieClip();
_root.gotoAndStop("levelNO");
};
}
function cekDie() {
if (lvl4_win) {
delayDie = delayDie + 0.1;
if (delayDie >= 4) {
_root.fxSound.stop;
_root.BagMusic.stop;
_root.soundB.stop;
complete_snd.gotoAndPlay(2);
finishWOI();
delayDie = 0;
lvl4_win = false;
}
}
if (lvl4_lose) {
delayDie = delayDie + 0.1;
if (delayDie >= 4) {
failed_snd.gotoAndPlay(2);
kalahWOI();
delayDie = 0;
lvl4_lose = false;
}
}
}
function setSenjata() {
if (jenisPeluru == "pendek") {
info.ammo.text = ammo1;
}
switch (jenisSenjata) {
case "awp1" :
accuracy = 0.05;
break;
case "awp2" :
accuracy = 0.05;
break;
case "awp3" :
accuracy = 0.06;
break;
case "awp4" :
accuracy = 0.07;
break;
case "awp5" :
accuracy = 0.08;
}
trace(jenisScope);
switch (jenisScope) {
case "scope1" :
movie.aim.scope.gotoAndStop(1);
zoom = 1;
return;
case "scope2" :
movie.aim.scope.gotoAndStop(2);
zoom = 2;
return;
case "scope3" :
movie.aim.scope.gotoAndStop(3);
zoom = 3;
}
}
function startGame() {
onMouseDown = shot;
setSenjata();
}
function checkPeluru() {
if (jenisPeluru == "pendek") {
if (ammo1 < 1) {
_root.attachMovie("ammo_empty", "ammo_empty", 550, {_x:320, _y:250});
delayCek = delayCek + 0.1;
if (delayCek >= 10) {
delayCek = 0;
_root.failed_snd.gotoAndPlay(2);
kalahWOI();
}
}
} else if (jenisPeluru == "panjang") {
if (ammo2 < 1) {
trace("ammo2 empty");
}
}
}
function shot() {
if (shotok && (inGame)) {
if ((jenisPeluru == "pendek") & (ammo1 > 0)) {
ammo1 = ammo1 - 1;
info.ammo.text = ammo1;
shootOut();
} else if ((jenisPeluru == "panjang") & (ammo2 > 0)) {
ammo2 = ammo2 - 1;
info.ammo.text = ammo2;
shootOut();
}
}
}
function shootOut() {
if (noBullet >= 5) {
noBullet = 0;
}
noBullet = noBullet + 1;
_root.gun.gotoAndPlay(jenisSenjata);
movie.aim.gotoAndPlay(jenisSenjata);
tracex = movie.aim._x;
tracey = movie.aim._y;
tampung = _root.movie.attachMovie("bullet_hole", "bullet1", 100 + noBullet, {_x:tracex, _y:tracey});
tampung.dly = 3;
tampung.onEnterFrame = function () {
if (this.dly > 0) {
this.dly = this.dly - 0.3;
}
if (this.dly <= 1) {
this.removeMovieClip();
}
};
shotok = false;
}
function aimBrain() {
checkPeluru();
if ((zoom == 2) && (checkZoom)) {
movie.aim._width = movie.aim._width * 1.1;
movie.aim._height = movie.aim._height * 1.1;
checkZoom = false;
} else if ((zoom == 3) && (checkZoom)) {
movie.aim._width = movie.aim._width * 1.3;
movie.aim._height = movie.aim._height * 1.3;
checkZoom = false;
}
if (!otherObject) {
delayOB = delayOB + 0.1;
if (delayOB > 1) {
delayOB = 0;
otherObject = true;
}
}
shakeDelay = shakeDelay + 0.01;
if ((shakeDelay > 1) or (shakeDelay > 0.2)) {
shake = true;
if (numberRandom == 2) {
bug1 = bug1 + 1.4;
bug2 = bug2 + 1.4;
} else if (numberRandom == 1) {
bug1 = bug1 - 1.4;
bug2 = bug2 - 1.4;
}
}
if (shakeDelay > 1.5) {
shakeDelay = 0;
shake = false;
bug1 = 0;
bug2 = 0;
}
if (shake) {
numberRandom = random(4);
}
Mouse.hide();
var _local1 = accuracy;
if (balance) {
bug1 = bug1 / 2;
bug2 = bug2 / 2;
}
movie.aim._x = movie.aim._x + (((movie._xmouse - movie.aim._x) + bug1) * _local1);
movie.aim._y = movie.aim._y + (((movie._ymouse - movie.aim._y) + bug2) * _local1);
}
function mainLoop() {
if (inGame) {
aimBrain();
cekDie();
}
}
_root.soundBackground("citySound");
_root.playMusic("backGround");
setLevel();
shotok = true;
noBullet = 0;
zooming = false;
bug1 = 0;
bug2 = 0;
shake = false;
shakeDelay = 0;
numberRandom = 0;
checkZoom = true;
delayOB = 0;
startGame();
delayDie = 0;
inGame = true;
otherObject = true;
missObject = 0;
lvl4_win = false;
lvl4_lose = false;
delayCek = 0;
checkZoom = true;
intID = setInterval(mainLoop, 30);
Frame 16
function setLevel() {
switch (Level) {
case 1 :
_root.attachMovie("mission1_mc", "movie", 50, {_x:427, _y:198});
movie.mulai = true;
movie.orang1.stop();
movie.orang1.posisi = "walk";
movie.orang1.mati = false;
movie.orang2.stop();
movie.orang2.posisi = "walk";
movie.orang2.mati = false;
movie.orang3.stop();
movie.orang3.posisi = "walk";
movie.orang3.mati = false;
movie.orang4.stop();
movie.orang4.posisi = "walk";
movie.orang4.mati = false;
movie.orang5.stop();
movie.orang5.posisi = "target";
movie.orang5.mati = false;
movie.mobil1.stop();
movie.mobil1.body.orang1.mati = false;
movie.mobil1.body.orang2.mati = false;
movie.mobil2.stop();
movie.mobil2.body.orang1.mati = false;
movie.mobil2.body.orang2.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
movie.orang1.play();
movie.orang2.play();
movie.orang3.play();
movie.orang4.play();
movie.orang5.play();
movie.mobil1.play();
movie.mobil2.play();
this.mulai = false;
}
Orang1 = movie.orang1;
Orang2 = movie.orang2;
Orang3 = movie.orang3;
Orang4 = movie.orang4;
Orang5 = movie.orang5;
Orang6 = movie.mobil1.body.orang1;
Orang7 = movie.mobil2.body.orang1;
Orang8 = movie.mobil2.body.orang2;
traceB = _root.movie.bullet1;
if (Orang1.body.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.posisi = "headshoot";
Orang1.stop();
Orang1.body.gotoAndPlay(Orang1.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang1.body.bodysensor.hitTest(traceB.sensor)) {
Orang1.posisi = "run";
Orang1.body.gotoAndPlay(Orang1.posisi);
traceB.removeMovieClip();
}
if (Orang2.body.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.posisi = "headshoot";
Orang2.stop();
Orang2.body.gotoAndPlay(Orang2.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang2.body.bodysensor.hitTest(traceB.sensor)) {
Orang2.posisi = "run";
Orang2.body.gotoAndPlay(Orang2.posisi);
traceB.removeMovieClip();
}
if (Orang3.body.sensor.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.posisi = "headshoot";
Orang3.stop();
Orang3.body.gotoAndPlay(Orang3.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang3.body.bodysensor.hitTest(traceB.sensor)) {
Orang3.posisi = "run";
Orang3.body.gotoAndPlay(Orang3.posisi);
traceB.removeMovieClip();
}
if (Orang4.body.sensor.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.posisi = "headshoot";
Orang4.stop();
Orang4.body.gotoAndPlay(Orang4.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
if (Orang4.body.bodysensor.hitTest(traceB.sensor)) {
Orang4.posisi = "run";
Orang4.body.gotoAndPlay(Orang4.posisi);
traceB.removeMovieClip();
}
if (Orang5.body.sensor.hitTest(traceB.sensor) && (!Orang5.mati)) {
Orang5.posisi = "headshoot";
Orang5.stop();
Orang5.body.gotoAndPlay(Orang5.posisi);
lvl4_win = true;
traceB.removeMovieClip();
Orang5.mati = true;
}
if (Orang5.body.bodysensor.hitTest(traceB.sensor)) {
Orang5.posisi = "run";
Orang5.body.gotoAndPlay(Orang5.posisi);
traceB.removeMovieClip();
}
if (Orang6.hitTest(traceB.sensor) && (!Orang6.mati)) {
Orang6.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang6.mati = true;
}
if (Orang7.hitTest(traceB.sensor) && (!Orang7.mati)) {
Orang7.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang7.mati = true;
}
if (Orang8.hitTest(traceB.sensor) && (!Orang8.mati)) {
Orang8.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang8.mati = true;
}
};
break;
case 2 :
_root.attachMovie("mission2_mc", "movie", 50, {_x:349.15, _y:226});
movie.mulai = true;
movie.orang1.stop();
movie.orang1.posisi = "walk";
movie.orang1.mati = false;
movie.orang2.stop();
movie.orang2.posisi = "target";
movie.orang2.mati = false;
movie.orang3.stop();
movie.orang3.posisi = "walk";
movie.orang3.mati = false;
movie.orang4.stop();
movie.orang4.posisi = "target";
movie.orang4.mati = false;
movie.orang11.stop();
movie.orang11.mati = false;
movie.orang12.stop();
movie.orang12.mati = false;
movie.orang13.stop();
movie.orang13.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
movie.orang1.play();
movie.orang2.play();
movie.orang3.play();
movie.orang4.play();
movie.orang11.play();
movie.orang12.play();
movie.orang13.play();
this.mulai = false;
}
Orang1 = movie.orang1;
Orang2 = movie.orang2;
Orang3 = movie.orang3;
Orang4 = movie.orang4;
Orang11 = movie.orang11;
Orang12 = movie.orang12;
Orang13 = movie.orang13;
traceB = _root.movie.bullet1;
if (Orang11.sensor.hitTest(traceB.sensor) && (!Orang11.mati)) {
Orang11.gotoAndPlay("headshoot");
lvl4_win = true;
traceB.removeMovieClip();
Orang11.mati = true;
}
if (Orang12.sensor.hitTest(traceB.sensor) && (!Orang12.mati)) {
Orang12.gotoAndPlay("headshoot");
lvl4_lose = true;
traceB.removeMovieClip();
Orang12.mati = true;
}
if (Orang13.sensor.hitTest(traceB.sensor) && (!Orang13.mati)) {
Orang13.gotoAndPlay("headshoot");
lvl4_lose = true;
traceB.removeMovieClip();
Orang13.mati = true;
}
if (Orang1.body.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.posisi = "headshoot";
Orang1.stop();
Orang1.body.gotoAndPlay(Orang1.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang1.body.bodysensor.hitTest(traceB.sensor)) {
Orang1.posisi = "run";
Orang1.body.gotoAndPlay(Orang1.posisi);
traceB.removeMovieClip();
}
if (Orang2.body.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.posisi = "headshoot";
Orang2.stop();
Orang2.body.gotoAndPlay(Orang2.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang2.body.bodysensor.hitTest(traceB.sensor)) {
Orang2.posisi = "run";
Orang2.body.gotoAndPlay(Orang2.posisi);
traceB.removeMovieClip();
}
if (Orang3.body.sensor.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.posisi = "headshoot";
Orang3.stop();
Orang3.body.gotoAndPlay(Orang3.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang3.body.bodysensor.hitTest(traceB.sensor)) {
Orang3.posisi = "run";
Orang3.body.gotoAndPlay(Orang3.posisi);
traceB.removeMovieClip();
}
if (Orang4.body.sensor.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.posisi = "headshoot";
Orang4.stop();
Orang4.body.gotoAndPlay(Orang4.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
if (Orang4.body.bodysensor.hitTest(traceB.sensor)) {
Orang4.posisi = "run";
Orang4.body.gotoAndPlay(Orang4.posisi);
traceB.removeMovieClip();
}
};
break;
case 3 :
_root.attachMovie("mission3_mc", "movie", 50, {_x:119, _y:213});
movie.mulai = true;
movie.orang1.stop();
movie.orang1.posisi = "walk";
movie.orang1.mati = false;
movie.orang2.stop();
movie.orang2.posisi = "walk";
movie.orang2.mati = false;
movie.orang3.stop();
movie.orang3.posisi = "walk";
movie.orang3.mati = false;
movie.orang4.stop();
movie.orang4.posisi = "walk";
movie.orang4.mati = false;
movie.orang5.stop();
movie.orang5.posisi = "target";
movie.orang5.mati = false;
movie.mobil1.stop();
movie.mobil1.body.orang1.mati = false;
movie.mobil1.body.orang2.mati = false;
movie.mobil2.stop();
movie.mobil2.body.orang1.mati = false;
movie.mobil2.body.orang2.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
movie.orang1.play();
movie.orang2.play();
movie.orang3.play();
movie.orang4.play();
movie.orang5.play();
movie.mobil1.play();
movie.mobil2.play();
this.mulai = false;
}
Orang1 = movie.orang1;
Orang2 = movie.orang2;
Orang3 = movie.orang3;
Orang4 = movie.orang4;
Orang5 = movie.orang5;
Orang6 = movie.mobil1.body.orang1;
Orang9 = movie.mobil1.body.orang2;
Orang7 = movie.mobil2.body.orang1;
Orang8 = movie.mobil2.body.orang2;
traceB = _root.movie.bullet1;
if (Orang1.body.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.posisi = "headshoot";
Orang1.stop();
Orang1.body.gotoAndPlay(Orang1.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang1.body.bodysensor.hitTest(traceB.sensor)) {
Orang1.posisi = "run";
Orang1.body.gotoAndPlay(Orang1.posisi);
traceB.removeMovieClip();
}
if (Orang2.body.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.posisi = "headshoot";
Orang2.stop();
Orang2.body.gotoAndPlay(Orang2.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang2.body.bodysensor.hitTest(traceB.sensor)) {
Orang2.posisi = "run";
Orang2.body.gotoAndPlay(Orang2.posisi);
traceB.removeMovieClip();
}
if (Orang3.body.sensor.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.posisi = "headshoot";
Orang3.stop();
Orang3.body.gotoAndPlay(Orang3.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang3.body.bodysensor.hitTest(traceB.sensor)) {
Orang3.posisi = "run";
Orang3.body.gotoAndPlay(Orang3.posisi);
traceB.removeMovieClip();
}
if (Orang4.body.sensor.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.posisi = "headshoot";
Orang4.stop();
Orang4.body.gotoAndPlay(Orang4.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
if (Orang4.body.bodysensor.hitTest(traceB.sensor)) {
Orang4.posisi = "run";
Orang4.body.gotoAndPlay(Orang4.posisi);
traceB.removeMovieClip();
}
if (Orang5.body.sensor.hitTest(traceB.sensor) && (!Orang5.mati)) {
Orang5.posisi = "headshoottarget";
Orang5.stop();
Orang5.body.gotoAndPlay(Orang5.posisi);
lvl4_win = true;
traceB.removeMovieClip();
Orang5.mati = true;
}
if (Orang5.body.bodysensor.hitTest(traceB.sensor)) {
Orang5.posisi = "run";
Orang5.body.gotoAndPlay(Orang5.posisi);
traceB.removeMovieClip();
}
if (Orang6.hitTest(traceB.sensor) && (!Orang6.mati)) {
Orang6.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang6.mati = true;
}
if (Orang7.hitTest(traceB.sensor) && (!Orang7.mati)) {
Orang7.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang7.mati = true;
}
if (Orang8.hitTest(traceB.sensor) && (!Orang8.mati)) {
Orang8.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang8.mati = true;
}
if (Orang9.hitTest(traceB.sensor) && (!Orang9.mati)) {
Orang9.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang9.mati = true;
}
};
break;
case 4 :
_root.attachMovie("mission4_mc", "movie", 50, {_x:415, _y:240});
movie.mulai = true;
object10.stop;
object10.body.mati = false;
object11.stop;
object11.body.mati = false;
object12.stop;
object12.body.mati = false;
object13.stop;
object13.body.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
object10.play();
object11.play();
object12.play();
object13.play();
}
Orang1 = movie.object10.body.orang1;
Orang2 = movie.object11.body.orang1;
Orang3 = movie.object12.body.orang1;
Orang4 = movie.object13.body.orang1;
traceB = _root.movie.bullet1;
if (Orang1.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang2.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang3.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang4.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.gotoAndPlay(2);
lvl4_win = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
};
break;
case 5 :
_root.attachMovie("mission5_mc", "movie", 50, {_x:424, _y:280});
movie.mulai = true;
movie.orang1.stop();
movie.orang1.posisi = "walk";
movie.orang1.mati = false;
movie.orang2.stop();
movie.orang2.posisi = "walk";
movie.orang2.mati = false;
movie.orang3.stop();
movie.orang3.posisi = "walk";
movie.orang3.mati = false;
movie.orang4.stop();
movie.orang4.posisi = "walk";
movie.orang4.mati = false;
movie.orang5.stop();
movie.orang5.posisi = "target";
movie.orang5.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
movie.orang1.play();
movie.orang2.play();
movie.orang3.play();
movie.orang4.play();
movie.orang5.play();
movie.mobil1.play();
movie.mobil2.play();
this.mulai = false;
}
Orang1 = movie.orang1;
Orang2 = movie.orang2;
Orang3 = movie.orang3;
Orang4 = movie.orang4;
Orang5 = movie.orang5;
traceB = _root.movie.bullet1;
if (Orang1.body.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.posisi = "headshoot";
Orang1.stop();
Orang1.body.gotoAndPlay(Orang1.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang1.body.bodysensor.hitTest(traceB.sensor)) {
Orang1.posisi = "run";
Orang1.body.gotoAndPlay(Orang1.posisi);
traceB.removeMovieClip();
}
if (Orang2.body.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.posisi = "headshoot";
Orang2.stop();
Orang2.body.gotoAndPlay(Orang2.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang2.body.bodysensor.hitTest(traceB.sensor)) {
Orang2.posisi = "run";
Orang2.body.gotoAndPlay(Orang2.posisi);
traceB.removeMovieClip();
}
if (Orang3.body.sensor.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.posisi = "headshoot";
Orang3.stop();
Orang3.body.gotoAndPlay(Orang3.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang3.body.bodysensor.hitTest(traceB.sensor)) {
Orang3.posisi = "run";
Orang3.body.gotoAndPlay(Orang3.posisi);
traceB.removeMovieClip();
}
if (Orang4.body.sensor.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.posisi = "headshoot";
Orang4.stop();
Orang4.body.gotoAndPlay(Orang4.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
if (Orang4.body.bodysensor.hitTest(traceB.sensor)) {
Orang4.posisi = "run";
Orang4.body.gotoAndPlay(Orang4.posisi);
traceB.removeMovieClip();
}
if (Orang5.body.sensor.hitTest(traceB.sensor) && (!Orang5.mati)) {
Orang5.posisi = "headshoot";
Orang5.stop();
Orang5.body.gotoAndPlay(Orang5.posisi);
lvl4_win = true;
traceB.removeMovieClip();
Orang5.mati = true;
}
if (Orang5.body.bodysensor.hitTest(traceB.sensor)) {
Orang5.posisi = "run";
Orang5.body.gotoAndPlay(Orang5.posisi);
traceB.removeMovieClip();
}
};
break;
case 6 :
_root.attachMovie("mission6_mc", "movie", 50, {_x:356, _y:224});
movie.mulai = true;
movie.orang1.stop();
movie.orang1.posisi = "walk";
movie.orang1.mati = false;
movie.orang2.stop();
movie.orang2.posisi = "walk";
movie.orang2.mati = false;
movie.orang3.stop();
movie.orang3.posisi = "walk";
movie.orang3.mati = false;
movie.object1.stop();
movie.object1.body.orang1.mati = false;
movie.object2.stop();
movie.object2.body.orang1.mati = false;
movie.object3.stop();
movie.object3.body.orang1.mati = false;
movie.object4.stop();
movie.object4.body.orang1.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
movie.orang1.play();
movie.orang2.play();
movie.orang3.play();
movie.object1.play();
movie.object2.play();
movie.object3.play();
movie.object4.play();
this.mulai = false;
}
Orang1 = movie.orang1;
Orang2 = movie.orang2;
Orang3 = movie.orang3;
Orang4 = movie.object1.body.orang1;
Orang5 = movie.object2.body.orang1;
Orang6 = movie.object3.body.orang1;
Orang7 = movie.object4.body.orang1;
traceB = _root.movie.bullet1;
if (Orang1.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.gotoAndPlay("headshoot");
lvl4_win = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang2.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.gotoAndPlay("headshoot");
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang3.sensor.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.gotoAndPlay("headshoot");
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang4.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
if (Orang5.hitTest(traceB.sensor) && (!Orang5.mati)) {
Orang5.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang5.mati = true;
}
if (Orang6.hitTest(traceB.sensor) && (!Orang6.mati)) {
Orang6.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang6.mati = true;
}
if (Orang7.hitTest(traceB.sensor) && (!Orang7.mati)) {
Orang7.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang7.mati = true;
}
};
break;
case 8 :
_root.attachMovie("mission8_mc", "movie", 50, {_x:261, _y:172});
movie.mulai = true;
movie.mobil1.stop();
movie.mobil1.body.orang1.mati = false;
movie.mobil1.body.orang2.mati = false;
movie.mobil2.stop();
movie.mobil2.body.orang1.mati = false;
movie.mobil2.body.orang2.mati = false;
movie.mobil3.stop();
movie.mobil3.body.orang1.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
movie.mobil1.play();
movie.mobil2.play();
movie.mobil3.play();
this.mulai = false;
}
Orang1 = movie.mobil1.body.orang1;
Orang2 = movie.mobil1.body.orang2;
Orang3 = movie.mobil2.body.orang1;
Orang4 = movie.mobil2.body.orang2;
Orang5 = movie.mobil3.body.orang1;
traceB = _root.movie.bullet1;
if (Orang1.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang2.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang3.sensor.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang4.sensor.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
if (Orang5.sensor.hitTest(traceB.sensor) && (!Orang5.mati)) {
Orang5.gotoAndPlay(2);
lvl4_win = true;
traceB.removeMovieClip();
Orang5.mati = true;
}
};
break;
case 9 :
_root.attachMovie("mission9_mc", "movie", 50, {_x:287, _y:285});
movie.mulai = true;
movie.orang1.stop();
movie.orang1.posisi = "walk";
movie.orang1.mati = false;
movie.orang2.stop();
movie.onEnterFrame = function () {
if (this.mulai) {
movie.orang1.play();
movie.orang2.play();
}
Orang1 = movie.orang1;
Orang2 = movie.orang2;
traceB = _root.movie.bullet1;
if (Orang1.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.gotoAndPlay("headshoot");
lvl4_win = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang2.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.gotoAndPlay("headshoot");
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
};
}
_root.attachMovie("boxLogo", "boxLogo", 520, {_x:545, _y:25});
movie.attachMovie("aim", "aim", 500, {_x:350, _y:450});
movie.aim._width = movie.aim._width * 1.2;
movie.aim._height = movie.aim._height * 1.2;
_root.attachMovie("info", "info", 510, {_x:70.85, _y:453.7});
}
function showText() {
_root.attachMovie("textShow", "textShow", 530, {_x:6, _y:3});
}
function showSummary(earn, bonus, faiuler) {
boxLogo.removeMovieClip();
textShow.removeMovieClip();
Mouse.show();
clearInterval(intID);
_root.fxSound.stop;
_root.BagMusic.stop;
_root.soundB.stop;
inGame = false;
movie.removeMovieClip();
info.removeMovieClip();
_root.attachMovie("summary_mc", "summary", 800, {_x:322.3, _y:235.7});
summary.lvl_txt.text = Level;
summary.earn_txt.text = earn;
bns = 250 * bonus;
flr = 0;
summary.bonus_txt.text = bns;
summary.faiuler_txt.text = flr;
totalEarn = (earn + bns) - flr;
summary.total_txt.text = totalEarn;
summary.money = summary.money + totalEarn;
money = money + totalEarn;
TotalEarn = TotalEarn + totalEarn;
summary.ok_btn.onPress = function () {
summary.removeMovieClip();
boxLogo.removeMovieClip();
if (Level < 9) {
_root.gotoAndStop("levelOK");
} else {
headshoot = headshoot + 1;
_root.gotoAndStop("finishGame");
}
};
}
function finishWOI() {
switch (Level) {
case 1 :
price = 2600;
break;
case 2 :
price = 2850;
break;
case 3 :
price = 3200;
break;
case 4 :
price = 3550;
break;
case 5 :
price = 4100;
break;
case 6 :
price = 4350;
break;
case 7 :
price = 4900;
break;
case 8 :
price = 5300;
break;
case 9 :
price = 5500;
}
showSummary(price, 1);
delayDie = 0;
deleteFrame();
}
function kalahWOI() {
delayDie = 0;
showSummary2(0, 0, 1);
}
function showSummary2(earn, bonus, faiuler) {
boxLogo.removeMovieClip();
textShow.removeMovieClip();
inGame = false;
clearInterval(intID);
_root.movie.removeMovieClip();
info.removeMovieClip();
_root.fxSound.stop;
_root.BagMusic.stop;
_root.soundB.stop;
_root.attachMovie("summary_mc", "summary", 800, {_x:322.3, _y:235.7});
Mouse.show();
summary.lvl_txt.text = Level;
summary.earn_txt.text = earn;
bns = 250 * bonus;
flr = -(250 * faiuler);
summary.bonus_txt.text = bns;
summary.faiuler_txt.text = flr;
totalEarn = (earn + bns) - flr;
summary.total_txt.text = -totalEarn;
summary.money = summary.money + totalEarn;
trace(totalEarn);
money = money - totalEarn;
TotalEarn = TotalEarn + totalEarn;
summary.ok_btn.onPress = function () {
summary.removeMovieClip();
boxLogo.removeMovieClip();
_root.gotoAndStop("levelNO");
};
}
function cekDie() {
if (lvl4_win) {
delayDie = delayDie + 0.1;
if (delayDie >= 4) {
_root.fxSound.stop;
_root.BagMusic.stop;
_root.soundB.stop;
complete_snd.gotoAndPlay(2);
finishWOI();
delayDie = 0;
lvl4_win = false;
}
}
if (lvl4_lose) {
delayDie = delayDie + 0.1;
if (delayDie >= 4) {
failed_snd.gotoAndPlay(2);
kalahWOI();
delayDie = 0;
lvl4_lose = false;
}
}
}
function setSenjata() {
if (jenisPeluru == "pendek") {
info.ammo.text = ammo1;
}
switch (jenisSenjata) {
case "awp1" :
accuracy = 0.05;
break;
case "awp2" :
accuracy = 0.05;
break;
case "awp3" :
accuracy = 0.06;
break;
case "awp4" :
accuracy = 0.07;
break;
case "awp5" :
accuracy = 0.08;
}
trace(jenisScope);
switch (jenisScope) {
case "scope1" :
movie.aim.scope.gotoAndStop(1);
zoom = 1;
return;
case "scope2" :
movie.aim.scope.gotoAndStop(2);
zoom = 2;
return;
case "scope3" :
movie.aim.scope.gotoAndStop(3);
zoom = 3;
}
}
function startGame() {
onMouseDown = shot;
setSenjata();
}
function checkPeluru() {
if (jenisPeluru == "pendek") {
if (ammo1 < 1) {
_root.attachMovie("ammo_empty", "ammo_empty", 550, {_x:320, _y:250});
delayCek = delayCek + 0.1;
if (delayCek >= 10) {
delayCek = 0;
_root.failed_snd.gotoAndPlay(2);
kalahWOI();
}
}
} else if (jenisPeluru == "panjang") {
if (ammo2 < 1) {
trace("ammo2 empty");
}
}
}
function shot() {
if (shotok && (inGame)) {
if ((jenisPeluru == "pendek") & (ammo1 > 0)) {
ammo1 = ammo1 - 1;
info.ammo.text = ammo1;
shootOut();
} else if ((jenisPeluru == "panjang") & (ammo2 > 0)) {
ammo2 = ammo2 - 1;
info.ammo.text = ammo2;
shootOut();
}
}
}
function shootOut() {
if (noBullet >= 5) {
noBullet = 0;
}
noBullet = noBullet + 1;
_root.gun.gotoAndPlay(jenisSenjata);
movie.aim.gotoAndPlay(jenisSenjata);
tracex = movie.aim._x;
tracey = movie.aim._y;
tampung = _root.movie.attachMovie("bullet_hole", "bullet1", 100 + noBullet, {_x:tracex, _y:tracey});
tampung.dly = 3;
tampung.onEnterFrame = function () {
if (this.dly > 0) {
this.dly = this.dly - 0.3;
}
if (this.dly <= 1) {
this.removeMovieClip();
}
};
shotok = false;
}
function aimBrain() {
checkPeluru();
if ((zoom == 2) && (checkZoom)) {
movie.aim._width = movie.aim._width * 1.1;
movie.aim._height = movie.aim._height * 1.1;
checkZoom = false;
} else if ((zoom == 3) && (checkZoom)) {
movie.aim._width = movie.aim._width * 1.3;
movie.aim._height = movie.aim._height * 1.3;
checkZoom = false;
}
if (!otherObject) {
delayOB = delayOB + 0.1;
if (delayOB > 1) {
delayOB = 0;
otherObject = true;
}
}
shakeDelay = shakeDelay + 0.01;
if ((shakeDelay > 1) or (shakeDelay > 0.2)) {
shake = true;
if (numberRandom == 2) {
bug1 = bug1 + 1.4;
bug2 = bug2 + 1.4;
} else if (numberRandom == 1) {
bug1 = bug1 - 1.4;
bug2 = bug2 - 1.4;
}
}
if (shakeDelay > 1.5) {
shakeDelay = 0;
shake = false;
bug1 = 0;
bug2 = 0;
}
if (shake) {
numberRandom = random(4);
}
Mouse.hide();
var _local1 = accuracy;
if (balance) {
bug1 = bug1 / 2;
bug2 = bug2 / 2;
}
movie.aim._x = movie.aim._x + (((movie._xmouse - movie.aim._x) + bug1) * _local1);
movie.aim._y = movie.aim._y + (((movie._ymouse - movie.aim._y) + bug2) * _local1);
}
function mainLoop() {
if (inGame) {
aimBrain();
cekDie();
}
}
_root.playMusic("backGround");
_root.soundBackground("garden");
setLevel();
shotok = true;
noBullet = 0;
zooming = false;
bug1 = 0;
bug2 = 0;
shake = false;
shakeDelay = 0;
numberRandom = 0;
checkZoom = true;
delayOB = 0;
startGame();
delayDie = 0;
inGame = true;
otherObject = true;
missObject = 0;
lvl4_win = false;
lvl4_lose = false;
delayCek = 0;
checkZoom = true;
intID = setInterval(mainLoop, 30);
Frame 17
function setLevel() {
switch (Level) {
case 1 :
_root.attachMovie("mission1_mc", "movie", 50, {_x:427, _y:198});
movie.mulai = true;
movie.orang1.stop();
movie.orang1.posisi = "walk";
movie.orang1.mati = false;
movie.orang2.stop();
movie.orang2.posisi = "walk";
movie.orang2.mati = false;
movie.orang3.stop();
movie.orang3.posisi = "walk";
movie.orang3.mati = false;
movie.orang4.stop();
movie.orang4.posisi = "walk";
movie.orang4.mati = false;
movie.orang5.stop();
movie.orang5.posisi = "target";
movie.orang5.mati = false;
movie.mobil1.stop();
movie.mobil1.body.orang1.mati = false;
movie.mobil1.body.orang2.mati = false;
movie.mobil2.stop();
movie.mobil2.body.orang1.mati = false;
movie.mobil2.body.orang2.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
movie.orang1.play();
movie.orang2.play();
movie.orang3.play();
movie.orang4.play();
movie.orang5.play();
movie.mobil1.play();
movie.mobil2.play();
this.mulai = false;
}
Orang1 = movie.orang1;
Orang2 = movie.orang2;
Orang3 = movie.orang3;
Orang4 = movie.orang4;
Orang5 = movie.orang5;
Orang6 = movie.mobil1.body.orang1;
Orang7 = movie.mobil2.body.orang1;
Orang8 = movie.mobil2.body.orang2;
traceB = _root.movie.bullet1;
if (Orang1.body.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.posisi = "headshoot";
Orang1.stop();
Orang1.body.gotoAndPlay(Orang1.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang1.body.bodysensor.hitTest(traceB.sensor)) {
Orang1.posisi = "run";
Orang1.body.gotoAndPlay(Orang1.posisi);
traceB.removeMovieClip();
}
if (Orang2.body.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.posisi = "headshoot";
Orang2.stop();
Orang2.body.gotoAndPlay(Orang2.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang2.body.bodysensor.hitTest(traceB.sensor)) {
Orang2.posisi = "run";
Orang2.body.gotoAndPlay(Orang2.posisi);
traceB.removeMovieClip();
}
if (Orang3.body.sensor.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.posisi = "headshoot";
Orang3.stop();
Orang3.body.gotoAndPlay(Orang3.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang3.body.bodysensor.hitTest(traceB.sensor)) {
Orang3.posisi = "run";
Orang3.body.gotoAndPlay(Orang3.posisi);
traceB.removeMovieClip();
}
if (Orang4.body.sensor.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.posisi = "headshoot";
Orang4.stop();
Orang4.body.gotoAndPlay(Orang4.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
if (Orang4.body.bodysensor.hitTest(traceB.sensor)) {
Orang4.posisi = "run";
Orang4.body.gotoAndPlay(Orang4.posisi);
traceB.removeMovieClip();
}
if (Orang5.body.sensor.hitTest(traceB.sensor) && (!Orang5.mati)) {
Orang5.posisi = "headshoot";
Orang5.stop();
Orang5.body.gotoAndPlay(Orang5.posisi);
lvl4_win = true;
traceB.removeMovieClip();
Orang5.mati = true;
}
if (Orang5.body.bodysensor.hitTest(traceB.sensor)) {
Orang5.posisi = "run";
Orang5.body.gotoAndPlay(Orang5.posisi);
traceB.removeMovieClip();
}
if (Orang6.hitTest(traceB.sensor) && (!Orang6.mati)) {
Orang6.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang6.mati = true;
}
if (Orang7.hitTest(traceB.sensor) && (!Orang7.mati)) {
Orang7.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang7.mati = true;
}
if (Orang8.hitTest(traceB.sensor) && (!Orang8.mati)) {
Orang8.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang8.mati = true;
}
};
break;
case 2 :
_root.attachMovie("mission2_mc", "movie", 50, {_x:349.15, _y:226});
movie.mulai = true;
movie.orang1.stop();
movie.orang1.posisi = "walk";
movie.orang1.mati = false;
movie.orang2.stop();
movie.orang2.posisi = "target";
movie.orang2.mati = false;
movie.orang3.stop();
movie.orang3.posisi = "walk";
movie.orang3.mati = false;
movie.orang4.stop();
movie.orang4.posisi = "target";
movie.orang4.mati = false;
movie.orang11.stop();
movie.orang11.mati = false;
movie.orang12.stop();
movie.orang12.mati = false;
movie.orang13.stop();
movie.orang13.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
movie.orang1.play();
movie.orang2.play();
movie.orang3.play();
movie.orang4.play();
movie.orang11.play();
movie.orang12.play();
movie.orang13.play();
this.mulai = false;
}
Orang1 = movie.orang1;
Orang2 = movie.orang2;
Orang3 = movie.orang3;
Orang4 = movie.orang4;
Orang11 = movie.orang11;
Orang12 = movie.orang12;
Orang13 = movie.orang13;
traceB = _root.movie.bullet1;
if (Orang11.sensor.hitTest(traceB.sensor) && (!Orang11.mati)) {
Orang11.gotoAndPlay("headshoot");
lvl4_win = true;
traceB.removeMovieClip();
Orang11.mati = true;
}
if (Orang12.sensor.hitTest(traceB.sensor) && (!Orang12.mati)) {
Orang12.gotoAndPlay("headshoot");
lvl4_lose = true;
traceB.removeMovieClip();
Orang12.mati = true;
}
if (Orang13.sensor.hitTest(traceB.sensor) && (!Orang13.mati)) {
Orang13.gotoAndPlay("headshoot");
lvl4_lose = true;
traceB.removeMovieClip();
Orang13.mati = true;
}
if (Orang1.body.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.posisi = "headshoot";
Orang1.stop();
Orang1.body.gotoAndPlay(Orang1.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang1.body.bodysensor.hitTest(traceB.sensor)) {
Orang1.posisi = "run";
Orang1.body.gotoAndPlay(Orang1.posisi);
traceB.removeMovieClip();
}
if (Orang2.body.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.posisi = "headshoot";
Orang2.stop();
Orang2.body.gotoAndPlay(Orang2.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang2.body.bodysensor.hitTest(traceB.sensor)) {
Orang2.posisi = "run";
Orang2.body.gotoAndPlay(Orang2.posisi);
traceB.removeMovieClip();
}
if (Orang3.body.sensor.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.posisi = "headshoot";
Orang3.stop();
Orang3.body.gotoAndPlay(Orang3.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang3.body.bodysensor.hitTest(traceB.sensor)) {
Orang3.posisi = "run";
Orang3.body.gotoAndPlay(Orang3.posisi);
traceB.removeMovieClip();
}
if (Orang4.body.sensor.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.posisi = "headshoot";
Orang4.stop();
Orang4.body.gotoAndPlay(Orang4.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
if (Orang4.body.bodysensor.hitTest(traceB.sensor)) {
Orang4.posisi = "run";
Orang4.body.gotoAndPlay(Orang4.posisi);
traceB.removeMovieClip();
}
};
break;
case 3 :
_root.attachMovie("mission3_mc", "movie", 50, {_x:119, _y:213});
movie.mulai = true;
movie.orang1.stop();
movie.orang1.posisi = "walk";
movie.orang1.mati = false;
movie.orang2.stop();
movie.orang2.posisi = "walk";
movie.orang2.mati = false;
movie.orang3.stop();
movie.orang3.posisi = "walk";
movie.orang3.mati = false;
movie.orang4.stop();
movie.orang4.posisi = "walk";
movie.orang4.mati = false;
movie.orang5.stop();
movie.orang5.posisi = "target";
movie.orang5.mati = false;
movie.mobil1.stop();
movie.mobil1.body.orang1.mati = false;
movie.mobil1.body.orang2.mati = false;
movie.mobil2.stop();
movie.mobil2.body.orang1.mati = false;
movie.mobil2.body.orang2.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
movie.orang1.play();
movie.orang2.play();
movie.orang3.play();
movie.orang4.play();
movie.orang5.play();
movie.mobil1.play();
movie.mobil2.play();
this.mulai = false;
}
Orang1 = movie.orang1;
Orang2 = movie.orang2;
Orang3 = movie.orang3;
Orang4 = movie.orang4;
Orang5 = movie.orang5;
Orang6 = movie.mobil1.body.orang1;
Orang9 = movie.mobil1.body.orang2;
Orang7 = movie.mobil2.body.orang1;
Orang8 = movie.mobil2.body.orang2;
traceB = _root.movie.bullet1;
if (Orang1.body.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.posisi = "headshoot";
Orang1.stop();
Orang1.body.gotoAndPlay(Orang1.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang1.body.bodysensor.hitTest(traceB.sensor)) {
Orang1.posisi = "run";
Orang1.body.gotoAndPlay(Orang1.posisi);
traceB.removeMovieClip();
}
if (Orang2.body.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.posisi = "headshoot";
Orang2.stop();
Orang2.body.gotoAndPlay(Orang2.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang2.body.bodysensor.hitTest(traceB.sensor)) {
Orang2.posisi = "run";
Orang2.body.gotoAndPlay(Orang2.posisi);
traceB.removeMovieClip();
}
if (Orang3.body.sensor.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.posisi = "headshoot";
Orang3.stop();
Orang3.body.gotoAndPlay(Orang3.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang3.body.bodysensor.hitTest(traceB.sensor)) {
Orang3.posisi = "run";
Orang3.body.gotoAndPlay(Orang3.posisi);
traceB.removeMovieClip();
}
if (Orang4.body.sensor.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.posisi = "headshoot";
Orang4.stop();
Orang4.body.gotoAndPlay(Orang4.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
if (Orang4.body.bodysensor.hitTest(traceB.sensor)) {
Orang4.posisi = "run";
Orang4.body.gotoAndPlay(Orang4.posisi);
traceB.removeMovieClip();
}
if (Orang5.body.sensor.hitTest(traceB.sensor) && (!Orang5.mati)) {
Orang5.posisi = "headshoottarget";
Orang5.stop();
Orang5.body.gotoAndPlay(Orang5.posisi);
lvl4_win = true;
traceB.removeMovieClip();
Orang5.mati = true;
}
if (Orang5.body.bodysensor.hitTest(traceB.sensor)) {
Orang5.posisi = "run";
Orang5.body.gotoAndPlay(Orang5.posisi);
traceB.removeMovieClip();
}
if (Orang6.hitTest(traceB.sensor) && (!Orang6.mati)) {
Orang6.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang6.mati = true;
}
if (Orang7.hitTest(traceB.sensor) && (!Orang7.mati)) {
Orang7.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang7.mati = true;
}
if (Orang8.hitTest(traceB.sensor) && (!Orang8.mati)) {
Orang8.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang8.mati = true;
}
if (Orang9.hitTest(traceB.sensor) && (!Orang9.mati)) {
Orang9.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang9.mati = true;
}
};
break;
case 4 :
_root.attachMovie("mission4_mc", "movie", 50, {_x:415, _y:240});
movie.mulai = true;
object10.stop;
object10.body.mati = false;
object11.stop;
object11.body.mati = false;
object12.stop;
object12.body.mati = false;
object13.stop;
object13.body.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
object10.play();
object11.play();
object12.play();
object13.play();
}
Orang1 = movie.object10.body.orang1;
Orang2 = movie.object11.body.orang1;
Orang3 = movie.object12.body.orang1;
Orang4 = movie.object13.body.orang1;
traceB = _root.movie.bullet1;
if (Orang1.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang2.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang3.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang4.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.gotoAndPlay(2);
lvl4_win = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
};
break;
case 5 :
_root.attachMovie("mission5_mc", "movie", 50, {_x:424, _y:280});
movie.mulai = true;
movie.orang1.stop();
movie.orang1.posisi = "walk";
movie.orang1.mati = false;
movie.orang2.stop();
movie.orang2.posisi = "walk";
movie.orang2.mati = false;
movie.orang3.stop();
movie.orang3.posisi = "walk";
movie.orang3.mati = false;
movie.orang4.stop();
movie.orang4.posisi = "walk";
movie.orang4.mati = false;
movie.orang5.stop();
movie.orang5.posisi = "target";
movie.orang5.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
movie.orang1.play();
movie.orang2.play();
movie.orang3.play();
movie.orang4.play();
movie.orang5.play();
movie.mobil1.play();
movie.mobil2.play();
this.mulai = false;
}
Orang1 = movie.orang1;
Orang2 = movie.orang2;
Orang3 = movie.orang3;
Orang4 = movie.orang4;
Orang5 = movie.orang5;
traceB = _root.movie.bullet1;
if (Orang1.body.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.posisi = "headshoot";
Orang1.stop();
Orang1.body.gotoAndPlay(Orang1.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang1.body.bodysensor.hitTest(traceB.sensor)) {
Orang1.posisi = "run";
Orang1.body.gotoAndPlay(Orang1.posisi);
traceB.removeMovieClip();
}
if (Orang2.body.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.posisi = "headshoot";
Orang2.stop();
Orang2.body.gotoAndPlay(Orang2.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang2.body.bodysensor.hitTest(traceB.sensor)) {
Orang2.posisi = "run";
Orang2.body.gotoAndPlay(Orang2.posisi);
traceB.removeMovieClip();
}
if (Orang3.body.sensor.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.posisi = "headshoot";
Orang3.stop();
Orang3.body.gotoAndPlay(Orang3.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang3.body.bodysensor.hitTest(traceB.sensor)) {
Orang3.posisi = "run";
Orang3.body.gotoAndPlay(Orang3.posisi);
traceB.removeMovieClip();
}
if (Orang4.body.sensor.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.posisi = "headshoot";
Orang4.stop();
Orang4.body.gotoAndPlay(Orang4.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
if (Orang4.body.bodysensor.hitTest(traceB.sensor)) {
Orang4.posisi = "run";
Orang4.body.gotoAndPlay(Orang4.posisi);
traceB.removeMovieClip();
}
if (Orang5.body.sensor.hitTest(traceB.sensor) && (!Orang5.mati)) {
Orang5.posisi = "headshoot";
Orang5.stop();
Orang5.body.gotoAndPlay(Orang5.posisi);
lvl4_win = true;
traceB.removeMovieClip();
Orang5.mati = true;
}
if (Orang5.body.bodysensor.hitTest(traceB.sensor)) {
Orang5.posisi = "run";
Orang5.body.gotoAndPlay(Orang5.posisi);
traceB.removeMovieClip();
}
};
break;
case 6 :
_root.attachMovie("mission6_mc", "movie", 50, {_x:356, _y:224});
movie.mulai = true;
movie.orang1.stop();
movie.orang1.posisi = "walk";
movie.orang1.mati = false;
movie.orang2.stop();
movie.orang2.posisi = "walk";
movie.orang2.mati = false;
movie.orang3.stop();
movie.orang3.posisi = "walk";
movie.orang3.mati = false;
movie.object1.stop();
movie.object1.body.orang1.mati = false;
movie.object2.stop();
movie.object2.body.orang1.mati = false;
movie.object3.stop();
movie.object3.body.orang1.mati = false;
movie.object4.stop();
movie.object4.body.orang1.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
movie.orang1.play();
movie.orang2.play();
movie.orang3.play();
movie.object1.play();
movie.object2.play();
movie.object3.play();
movie.object4.play();
this.mulai = false;
}
Orang1 = movie.orang1;
Orang2 = movie.orang2;
Orang3 = movie.orang3;
Orang4 = movie.object1.body.orang1;
Orang5 = movie.object2.body.orang1;
Orang6 = movie.object3.body.orang1;
Orang7 = movie.object4.body.orang1;
traceB = _root.movie.bullet1;
if (Orang1.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.gotoAndPlay("headshoot");
lvl4_win = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang2.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.gotoAndPlay("headshoot");
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang3.sensor.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.gotoAndPlay("headshoot");
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang4.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
if (Orang5.hitTest(traceB.sensor) && (!Orang5.mati)) {
Orang5.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang5.mati = true;
}
if (Orang6.hitTest(traceB.sensor) && (!Orang6.mati)) {
Orang6.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang6.mati = true;
}
if (Orang7.hitTest(traceB.sensor) && (!Orang7.mati)) {
Orang7.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang7.mati = true;
}
};
break;
case 8 :
_root.attachMovie("mission8_mc", "movie", 50, {_x:261, _y:172});
movie.mulai = true;
movie.mobil1.stop();
movie.mobil1.body.orang1.mati = false;
movie.mobil1.body.orang2.mati = false;
movie.mobil2.stop();
movie.mobil2.body.orang1.mati = false;
movie.mobil2.body.orang2.mati = false;
movie.mobil3.stop();
movie.mobil3.body.orang1.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
movie.mobil1.play();
movie.mobil2.play();
movie.mobil3.play();
this.mulai = false;
}
Orang1 = movie.mobil1.body.orang1;
Orang2 = movie.mobil1.body.orang2;
Orang3 = movie.mobil2.body.orang1;
Orang4 = movie.mobil2.body.orang2;
Orang5 = movie.mobil3.body.orang1;
traceB = _root.movie.bullet1;
if (Orang1.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang2.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang3.sensor.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang4.sensor.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
if (Orang5.sensor.hitTest(traceB.sensor) && (!Orang5.mati)) {
Orang5.gotoAndPlay(2);
lvl4_win = true;
traceB.removeMovieClip();
Orang5.mati = true;
}
};
break;
case 9 :
_root.attachMovie("mission9_mc", "movie", 50, {_x:287, _y:285});
movie.mulai = true;
movie.orang1.stop();
movie.orang1.posisi = "walk";
movie.orang1.mati = false;
movie.orang2.stop();
movie.onEnterFrame = function () {
if (this.mulai) {
movie.orang1.play();
movie.orang2.play();
}
Orang1 = movie.orang1;
Orang2 = movie.orang2;
traceB = _root.movie.bullet1;
if (Orang1.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.gotoAndPlay("headshoot");
lvl4_win = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang2.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.gotoAndPlay("headshoot");
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
};
}
_root.attachMovie("boxLogo", "boxLogo", 520, {_x:545, _y:25});
movie.attachMovie("aim", "aim", 500, {_x:350, _y:450});
movie.aim._width = movie.aim._width * 1.2;
movie.aim._height = movie.aim._height * 1.2;
_root.attachMovie("info", "info", 510, {_x:70.85, _y:453.7});
}
function showText() {
_root.attachMovie("textShow", "textShow", 530, {_x:6, _y:3});
}
function showSummary(earn, bonus, faiuler) {
boxLogo.removeMovieClip();
textShow.removeMovieClip();
Mouse.show();
clearInterval(intID);
_root.fxSound.stop;
_root.BagMusic.stop;
_root.soundB.stop;
inGame = false;
movie.removeMovieClip();
info.removeMovieClip();
_root.attachMovie("summary_mc", "summary", 800, {_x:322.3, _y:235.7});
summary.lvl_txt.text = Level;
summary.earn_txt.text = earn;
bns = 250 * bonus;
flr = 0;
summary.bonus_txt.text = bns;
summary.faiuler_txt.text = flr;
totalEarn = (earn + bns) - flr;
summary.total_txt.text = totalEarn;
summary.money = summary.money + totalEarn;
money = money + totalEarn;
TotalEarn = TotalEarn + totalEarn;
summary.ok_btn.onPress = function () {
summary.removeMovieClip();
boxLogo.removeMovieClip();
if (Level < 9) {
_root.gotoAndStop("levelOK");
} else {
headshoot = headshoot + 1;
_root.gotoAndStop("finishGame");
}
};
}
function finishWOI() {
switch (Level) {
case 1 :
price = 2600;
break;
case 2 :
price = 2850;
break;
case 3 :
price = 3200;
break;
case 4 :
price = 3550;
break;
case 5 :
price = 4100;
break;
case 6 :
price = 4350;
break;
case 7 :
price = 4900;
break;
case 8 :
price = 5300;
break;
case 9 :
price = 5500;
}
showSummary(price, 1);
delayDie = 0;
deleteFrame();
}
function kalahWOI() {
delayDie = 0;
showSummary2(0, 0, 1);
}
function showSummary2(earn, bonus, faiuler) {
boxLogo.removeMovieClip();
textShow.removeMovieClip();
inGame = false;
clearInterval(intID);
_root.movie.removeMovieClip();
info.removeMovieClip();
_root.fxSound.stop;
_root.BagMusic.stop;
_root.soundB.stop;
_root.attachMovie("summary_mc", "summary", 800, {_x:322.3, _y:235.7});
Mouse.show();
summary.lvl_txt.text = Level;
summary.earn_txt.text = earn;
bns = 250 * bonus;
flr = -(250 * faiuler);
summary.bonus_txt.text = bns;
summary.faiuler_txt.text = flr;
totalEarn = (earn + bns) - flr;
summary.total_txt.text = -totalEarn;
summary.money = summary.money + totalEarn;
trace(totalEarn);
money = money - totalEarn;
TotalEarn = TotalEarn + totalEarn;
summary.ok_btn.onPress = function () {
summary.removeMovieClip();
boxLogo.removeMovieClip();
_root.gotoAndStop("levelNO");
};
}
function cekDie() {
if (lvl4_win) {
delayDie = delayDie + 0.1;
if (delayDie >= 4) {
_root.fxSound.stop;
_root.BagMusic.stop;
_root.soundB.stop;
complete_snd.gotoAndPlay(2);
finishWOI();
delayDie = 0;
lvl4_win = false;
}
}
if (lvl4_lose) {
delayDie = delayDie + 0.1;
if (delayDie >= 4) {
failed_snd.gotoAndPlay(2);
kalahWOI();
delayDie = 0;
lvl4_lose = false;
}
}
}
function setSenjata() {
if (jenisPeluru == "pendek") {
info.ammo.text = ammo1;
}
switch (jenisSenjata) {
case "awp1" :
accuracy = 0.05;
break;
case "awp2" :
accuracy = 0.05;
break;
case "awp3" :
accuracy = 0.06;
break;
case "awp4" :
accuracy = 0.07;
break;
case "awp5" :
accuracy = 0.08;
}
trace(jenisScope);
switch (jenisScope) {
case "scope1" :
movie.aim.scope.gotoAndStop(1);
zoom = 1;
return;
case "scope2" :
movie.aim.scope.gotoAndStop(2);
zoom = 2;
return;
case "scope3" :
movie.aim.scope.gotoAndStop(3);
zoom = 3;
}
}
function startGame() {
onMouseDown = shot;
setSenjata();
}
function checkPeluru() {
if (jenisPeluru == "pendek") {
if (ammo1 < 1) {
_root.attachMovie("ammo_empty", "ammo_empty", 550, {_x:320, _y:250});
delayCek = delayCek + 0.1;
if (delayCek >= 10) {
delayCek = 0;
_root.failed_snd.gotoAndPlay(2);
kalahWOI();
}
}
} else if (jenisPeluru == "panjang") {
if (ammo2 < 1) {
trace("ammo2 empty");
}
}
}
function shot() {
if (shotok && (inGame)) {
if ((jenisPeluru == "pendek") & (ammo1 > 0)) {
ammo1 = ammo1 - 1;
info.ammo.text = ammo1;
shootOut();
} else if ((jenisPeluru == "panjang") & (ammo2 > 0)) {
ammo2 = ammo2 - 1;
info.ammo.text = ammo2;
shootOut();
}
}
}
function shootOut() {
if (noBullet >= 5) {
noBullet = 0;
}
noBullet = noBullet + 1;
_root.gun.gotoAndPlay(jenisSenjata);
movie.aim.gotoAndPlay(jenisSenjata);
tracex = movie.aim._x;
tracey = movie.aim._y;
tampung = _root.movie.attachMovie("bullet_hole", "bullet1", 100 + noBullet, {_x:tracex, _y:tracey});
tampung.dly = 3;
tampung.onEnterFrame = function () {
if (this.dly > 0) {
this.dly = this.dly - 0.3;
}
if (this.dly <= 1) {
this.removeMovieClip();
}
};
shotok = false;
}
function aimBrain() {
checkPeluru();
if ((zoom == 2) && (checkZoom)) {
movie.aim._width = movie.aim._width * 1.1;
movie.aim._height = movie.aim._height * 1.1;
checkZoom = false;
} else if ((zoom == 3) && (checkZoom)) {
movie.aim._width = movie.aim._width * 1.3;
movie.aim._height = movie.aim._height * 1.3;
checkZoom = false;
}
if (!otherObject) {
delayOB = delayOB + 0.1;
if (delayOB > 1) {
delayOB = 0;
otherObject = true;
}
}
shakeDelay = shakeDelay + 0.01;
if ((shakeDelay > 1) or (shakeDelay > 0.2)) {
shake = true;
if (numberRandom == 2) {
bug1 = bug1 + 1.4;
bug2 = bug2 + 1.4;
} else if (numberRandom == 1) {
bug1 = bug1 - 1.4;
bug2 = bug2 - 1.4;
}
}
if (shakeDelay > 1.5) {
shakeDelay = 0;
shake = false;
bug1 = 0;
bug2 = 0;
}
if (shake) {
numberRandom = random(4);
}
Mouse.hide();
var _local1 = accuracy;
if (balance) {
bug1 = bug1 / 2;
bug2 = bug2 / 2;
}
movie.aim._x = movie.aim._x + (((movie._xmouse - movie.aim._x) + bug1) * _local1);
movie.aim._y = movie.aim._y + (((movie._ymouse - movie.aim._y) + bug2) * _local1);
}
function mainLoop() {
if (inGame) {
aimBrain();
cekDie();
}
}
_root.playMusic("backGround");
_root.soundBackground("citySound");
setLevel();
shotok = true;
noBullet = 0;
zooming = false;
bug1 = 0;
bug2 = 0;
shake = false;
shakeDelay = 0;
numberRandom = 0;
checkZoom = true;
delayOB = 0;
startGame();
delayDie = 0;
inGame = true;
otherObject = true;
missObject = 0;
lvl4_win = false;
lvl4_lose = false;
delayCek = 0;
checkZoom = true;
intID = setInterval(mainLoop, 30);
Frame 18
function setLevel() {
switch (Level) {
case 1 :
_root.attachMovie("mission1_mc", "movie", 50, {_x:427, _y:198});
movie.mulai = true;
movie.orang1.stop();
movie.orang1.posisi = "walk";
movie.orang1.mati = false;
movie.orang2.stop();
movie.orang2.posisi = "walk";
movie.orang2.mati = false;
movie.orang3.stop();
movie.orang3.posisi = "walk";
movie.orang3.mati = false;
movie.orang4.stop();
movie.orang4.posisi = "walk";
movie.orang4.mati = false;
movie.orang5.stop();
movie.orang5.posisi = "target";
movie.orang5.mati = false;
movie.mobil1.stop();
movie.mobil1.body.orang1.mati = false;
movie.mobil1.body.orang2.mati = false;
movie.mobil2.stop();
movie.mobil2.body.orang1.mati = false;
movie.mobil2.body.orang2.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
movie.orang1.play();
movie.orang2.play();
movie.orang3.play();
movie.orang4.play();
movie.orang5.play();
movie.mobil1.play();
movie.mobil2.play();
this.mulai = false;
}
Orang1 = movie.orang1;
Orang2 = movie.orang2;
Orang3 = movie.orang3;
Orang4 = movie.orang4;
Orang5 = movie.orang5;
Orang6 = movie.mobil1.body.orang1;
Orang7 = movie.mobil2.body.orang1;
Orang8 = movie.mobil2.body.orang2;
traceB = _root.movie.bullet1;
if (Orang1.body.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.posisi = "headshoot";
Orang1.stop();
Orang1.body.gotoAndPlay(Orang1.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang1.body.bodysensor.hitTest(traceB.sensor)) {
Orang1.posisi = "run";
Orang1.body.gotoAndPlay(Orang1.posisi);
traceB.removeMovieClip();
}
if (Orang2.body.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.posisi = "headshoot";
Orang2.stop();
Orang2.body.gotoAndPlay(Orang2.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang2.body.bodysensor.hitTest(traceB.sensor)) {
Orang2.posisi = "run";
Orang2.body.gotoAndPlay(Orang2.posisi);
traceB.removeMovieClip();
}
if (Orang3.body.sensor.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.posisi = "headshoot";
Orang3.stop();
Orang3.body.gotoAndPlay(Orang3.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang3.body.bodysensor.hitTest(traceB.sensor)) {
Orang3.posisi = "run";
Orang3.body.gotoAndPlay(Orang3.posisi);
traceB.removeMovieClip();
}
if (Orang4.body.sensor.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.posisi = "headshoot";
Orang4.stop();
Orang4.body.gotoAndPlay(Orang4.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
if (Orang4.body.bodysensor.hitTest(traceB.sensor)) {
Orang4.posisi = "run";
Orang4.body.gotoAndPlay(Orang4.posisi);
traceB.removeMovieClip();
}
if (Orang5.body.sensor.hitTest(traceB.sensor) && (!Orang5.mati)) {
Orang5.posisi = "headshoot";
Orang5.stop();
Orang5.body.gotoAndPlay(Orang5.posisi);
lvl4_win = true;
traceB.removeMovieClip();
Orang5.mati = true;
}
if (Orang5.body.bodysensor.hitTest(traceB.sensor)) {
Orang5.posisi = "run";
Orang5.body.gotoAndPlay(Orang5.posisi);
traceB.removeMovieClip();
}
if (Orang6.hitTest(traceB.sensor) && (!Orang6.mati)) {
Orang6.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang6.mati = true;
}
if (Orang7.hitTest(traceB.sensor) && (!Orang7.mati)) {
Orang7.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang7.mati = true;
}
if (Orang8.hitTest(traceB.sensor) && (!Orang8.mati)) {
Orang8.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang8.mati = true;
}
};
break;
case 2 :
_root.attachMovie("mission2_mc", "movie", 50, {_x:349.15, _y:226});
movie.mulai = true;
movie.orang1.stop();
movie.orang1.posisi = "walk";
movie.orang1.mati = false;
movie.orang2.stop();
movie.orang2.posisi = "target";
movie.orang2.mati = false;
movie.orang3.stop();
movie.orang3.posisi = "walk";
movie.orang3.mati = false;
movie.orang4.stop();
movie.orang4.posisi = "target";
movie.orang4.mati = false;
movie.orang11.stop();
movie.orang11.mati = false;
movie.orang12.stop();
movie.orang12.mati = false;
movie.orang13.stop();
movie.orang13.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
movie.orang1.play();
movie.orang2.play();
movie.orang3.play();
movie.orang4.play();
movie.orang11.play();
movie.orang12.play();
movie.orang13.play();
this.mulai = false;
}
Orang1 = movie.orang1;
Orang2 = movie.orang2;
Orang3 = movie.orang3;
Orang4 = movie.orang4;
Orang11 = movie.orang11;
Orang12 = movie.orang12;
Orang13 = movie.orang13;
traceB = _root.movie.bullet1;
if (Orang11.sensor.hitTest(traceB.sensor) && (!Orang11.mati)) {
Orang11.gotoAndPlay("headshoot");
lvl4_win = true;
traceB.removeMovieClip();
Orang11.mati = true;
}
if (Orang12.sensor.hitTest(traceB.sensor) && (!Orang12.mati)) {
Orang12.gotoAndPlay("headshoot");
lvl4_lose = true;
traceB.removeMovieClip();
Orang12.mati = true;
}
if (Orang13.sensor.hitTest(traceB.sensor) && (!Orang13.mati)) {
Orang13.gotoAndPlay("headshoot");
lvl4_lose = true;
traceB.removeMovieClip();
Orang13.mati = true;
}
if (Orang1.body.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.posisi = "headshoot";
Orang1.stop();
Orang1.body.gotoAndPlay(Orang1.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang1.body.bodysensor.hitTest(traceB.sensor)) {
Orang1.posisi = "run";
Orang1.body.gotoAndPlay(Orang1.posisi);
traceB.removeMovieClip();
}
if (Orang2.body.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.posisi = "headshoot";
Orang2.stop();
Orang2.body.gotoAndPlay(Orang2.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang2.body.bodysensor.hitTest(traceB.sensor)) {
Orang2.posisi = "run";
Orang2.body.gotoAndPlay(Orang2.posisi);
traceB.removeMovieClip();
}
if (Orang3.body.sensor.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.posisi = "headshoot";
Orang3.stop();
Orang3.body.gotoAndPlay(Orang3.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang3.body.bodysensor.hitTest(traceB.sensor)) {
Orang3.posisi = "run";
Orang3.body.gotoAndPlay(Orang3.posisi);
traceB.removeMovieClip();
}
if (Orang4.body.sensor.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.posisi = "headshoot";
Orang4.stop();
Orang4.body.gotoAndPlay(Orang4.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
if (Orang4.body.bodysensor.hitTest(traceB.sensor)) {
Orang4.posisi = "run";
Orang4.body.gotoAndPlay(Orang4.posisi);
traceB.removeMovieClip();
}
};
break;
case 3 :
_root.attachMovie("mission3_mc", "movie", 50, {_x:119, _y:213});
movie.mulai = true;
movie.orang1.stop();
movie.orang1.posisi = "walk";
movie.orang1.mati = false;
movie.orang2.stop();
movie.orang2.posisi = "walk";
movie.orang2.mati = false;
movie.orang3.stop();
movie.orang3.posisi = "walk";
movie.orang3.mati = false;
movie.orang4.stop();
movie.orang4.posisi = "walk";
movie.orang4.mati = false;
movie.orang5.stop();
movie.orang5.posisi = "target";
movie.orang5.mati = false;
movie.mobil1.stop();
movie.mobil1.body.orang1.mati = false;
movie.mobil1.body.orang2.mati = false;
movie.mobil2.stop();
movie.mobil2.body.orang1.mati = false;
movie.mobil2.body.orang2.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
movie.orang1.play();
movie.orang2.play();
movie.orang3.play();
movie.orang4.play();
movie.orang5.play();
movie.mobil1.play();
movie.mobil2.play();
this.mulai = false;
}
Orang1 = movie.orang1;
Orang2 = movie.orang2;
Orang3 = movie.orang3;
Orang4 = movie.orang4;
Orang5 = movie.orang5;
Orang6 = movie.mobil1.body.orang1;
Orang9 = movie.mobil1.body.orang2;
Orang7 = movie.mobil2.body.orang1;
Orang8 = movie.mobil2.body.orang2;
traceB = _root.movie.bullet1;
if (Orang1.body.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.posisi = "headshoot";
Orang1.stop();
Orang1.body.gotoAndPlay(Orang1.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang1.body.bodysensor.hitTest(traceB.sensor)) {
Orang1.posisi = "run";
Orang1.body.gotoAndPlay(Orang1.posisi);
traceB.removeMovieClip();
}
if (Orang2.body.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.posisi = "headshoot";
Orang2.stop();
Orang2.body.gotoAndPlay(Orang2.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang2.body.bodysensor.hitTest(traceB.sensor)) {
Orang2.posisi = "run";
Orang2.body.gotoAndPlay(Orang2.posisi);
traceB.removeMovieClip();
}
if (Orang3.body.sensor.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.posisi = "headshoot";
Orang3.stop();
Orang3.body.gotoAndPlay(Orang3.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang3.body.bodysensor.hitTest(traceB.sensor)) {
Orang3.posisi = "run";
Orang3.body.gotoAndPlay(Orang3.posisi);
traceB.removeMovieClip();
}
if (Orang4.body.sensor.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.posisi = "headshoot";
Orang4.stop();
Orang4.body.gotoAndPlay(Orang4.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
if (Orang4.body.bodysensor.hitTest(traceB.sensor)) {
Orang4.posisi = "run";
Orang4.body.gotoAndPlay(Orang4.posisi);
traceB.removeMovieClip();
}
if (Orang5.body.sensor.hitTest(traceB.sensor) && (!Orang5.mati)) {
Orang5.posisi = "headshoottarget";
Orang5.stop();
Orang5.body.gotoAndPlay(Orang5.posisi);
lvl4_win = true;
traceB.removeMovieClip();
Orang5.mati = true;
}
if (Orang5.body.bodysensor.hitTest(traceB.sensor)) {
Orang5.posisi = "run";
Orang5.body.gotoAndPlay(Orang5.posisi);
traceB.removeMovieClip();
}
if (Orang6.hitTest(traceB.sensor) && (!Orang6.mati)) {
Orang6.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang6.mati = true;
}
if (Orang7.hitTest(traceB.sensor) && (!Orang7.mati)) {
Orang7.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang7.mati = true;
}
if (Orang8.hitTest(traceB.sensor) && (!Orang8.mati)) {
Orang8.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang8.mati = true;
}
if (Orang9.hitTest(traceB.sensor) && (!Orang9.mati)) {
Orang9.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang9.mati = true;
}
};
break;
case 4 :
_root.attachMovie("mission4_mc", "movie", 50, {_x:415, _y:240});
movie.mulai = true;
object10.stop;
object10.body.mati = false;
object11.stop;
object11.body.mati = false;
object12.stop;
object12.body.mati = false;
object13.stop;
object13.body.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
object10.play();
object11.play();
object12.play();
object13.play();
}
Orang1 = movie.object10.body.orang1;
Orang2 = movie.object11.body.orang1;
Orang3 = movie.object12.body.orang1;
Orang4 = movie.object13.body.orang1;
traceB = _root.movie.bullet1;
if (Orang1.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang2.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang3.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang4.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.gotoAndPlay(2);
lvl4_win = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
};
break;
case 5 :
_root.attachMovie("mission5_mc", "movie", 50, {_x:424, _y:280});
movie.mulai = true;
movie.orang1.stop();
movie.orang1.posisi = "walk";
movie.orang1.mati = false;
movie.orang2.stop();
movie.orang2.posisi = "walk";
movie.orang2.mati = false;
movie.orang3.stop();
movie.orang3.posisi = "walk";
movie.orang3.mati = false;
movie.orang4.stop();
movie.orang4.posisi = "walk";
movie.orang4.mati = false;
movie.orang5.stop();
movie.orang5.posisi = "target";
movie.orang5.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
movie.orang1.play();
movie.orang2.play();
movie.orang3.play();
movie.orang4.play();
movie.orang5.play();
movie.mobil1.play();
movie.mobil2.play();
this.mulai = false;
}
Orang1 = movie.orang1;
Orang2 = movie.orang2;
Orang3 = movie.orang3;
Orang4 = movie.orang4;
Orang5 = movie.orang5;
traceB = _root.movie.bullet1;
if (Orang1.body.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.posisi = "headshoot";
Orang1.stop();
Orang1.body.gotoAndPlay(Orang1.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang1.body.bodysensor.hitTest(traceB.sensor)) {
Orang1.posisi = "run";
Orang1.body.gotoAndPlay(Orang1.posisi);
traceB.removeMovieClip();
}
if (Orang2.body.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.posisi = "headshoot";
Orang2.stop();
Orang2.body.gotoAndPlay(Orang2.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang2.body.bodysensor.hitTest(traceB.sensor)) {
Orang2.posisi = "run";
Orang2.body.gotoAndPlay(Orang2.posisi);
traceB.removeMovieClip();
}
if (Orang3.body.sensor.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.posisi = "headshoot";
Orang3.stop();
Orang3.body.gotoAndPlay(Orang3.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang3.body.bodysensor.hitTest(traceB.sensor)) {
Orang3.posisi = "run";
Orang3.body.gotoAndPlay(Orang3.posisi);
traceB.removeMovieClip();
}
if (Orang4.body.sensor.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.posisi = "headshoot";
Orang4.stop();
Orang4.body.gotoAndPlay(Orang4.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
if (Orang4.body.bodysensor.hitTest(traceB.sensor)) {
Orang4.posisi = "run";
Orang4.body.gotoAndPlay(Orang4.posisi);
traceB.removeMovieClip();
}
if (Orang5.body.sensor.hitTest(traceB.sensor) && (!Orang5.mati)) {
Orang5.posisi = "headshoot";
Orang5.stop();
Orang5.body.gotoAndPlay(Orang5.posisi);
lvl4_win = true;
traceB.removeMovieClip();
Orang5.mati = true;
}
if (Orang5.body.bodysensor.hitTest(traceB.sensor)) {
Orang5.posisi = "run";
Orang5.body.gotoAndPlay(Orang5.posisi);
traceB.removeMovieClip();
}
};
break;
case 6 :
_root.attachMovie("mission6_mc", "movie", 50, {_x:356, _y:224});
movie.mulai = true;
movie.orang1.stop();
movie.orang1.posisi = "walk";
movie.orang1.mati = false;
movie.orang2.stop();
movie.orang2.posisi = "walk";
movie.orang2.mati = false;
movie.orang3.stop();
movie.orang3.posisi = "walk";
movie.orang3.mati = false;
movie.object1.stop();
movie.object1.body.orang1.mati = false;
movie.object2.stop();
movie.object2.body.orang1.mati = false;
movie.object3.stop();
movie.object3.body.orang1.mati = false;
movie.object4.stop();
movie.object4.body.orang1.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
movie.orang1.play();
movie.orang2.play();
movie.orang3.play();
movie.object1.play();
movie.object2.play();
movie.object3.play();
movie.object4.play();
this.mulai = false;
}
Orang1 = movie.orang1;
Orang2 = movie.orang2;
Orang3 = movie.orang3;
Orang4 = movie.object1.body.orang1;
Orang5 = movie.object2.body.orang1;
Orang6 = movie.object3.body.orang1;
Orang7 = movie.object4.body.orang1;
traceB = _root.movie.bullet1;
if (Orang1.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.gotoAndPlay("headshoot");
lvl4_win = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang2.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.gotoAndPlay("headshoot");
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang3.sensor.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.gotoAndPlay("headshoot");
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang4.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
if (Orang5.hitTest(traceB.sensor) && (!Orang5.mati)) {
Orang5.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang5.mati = true;
}
if (Orang6.hitTest(traceB.sensor) && (!Orang6.mati)) {
Orang6.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang6.mati = true;
}
if (Orang7.hitTest(traceB.sensor) && (!Orang7.mati)) {
Orang7.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang7.mati = true;
}
};
break;
case 8 :
_root.attachMovie("mission8_mc", "movie", 50, {_x:261, _y:172});
movie.mulai = true;
movie.mobil1.stop();
movie.mobil1.body.orang1.mati = false;
movie.mobil1.body.orang2.mati = false;
movie.mobil2.stop();
movie.mobil2.body.orang1.mati = false;
movie.mobil2.body.orang2.mati = false;
movie.mobil3.stop();
movie.mobil3.body.orang1.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
movie.mobil1.play();
movie.mobil2.play();
movie.mobil3.play();
this.mulai = false;
}
Orang1 = movie.mobil1.body.orang1;
Orang2 = movie.mobil1.body.orang2;
Orang3 = movie.mobil2.body.orang1;
Orang4 = movie.mobil2.body.orang2;
Orang5 = movie.mobil3.body.orang1;
traceB = _root.movie.bullet1;
if (Orang1.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang2.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang3.sensor.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang4.sensor.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
if (Orang5.sensor.hitTest(traceB.sensor) && (!Orang5.mati)) {
Orang5.gotoAndPlay(2);
lvl4_win = true;
traceB.removeMovieClip();
Orang5.mati = true;
}
};
break;
case 9 :
_root.attachMovie("mission9_mc", "movie", 50, {_x:287, _y:285});
movie.mulai = true;
movie.orang1.stop();
movie.orang1.posisi = "walk";
movie.orang1.mati = false;
movie.orang2.stop();
movie.onEnterFrame = function () {
if (this.mulai) {
movie.orang1.play();
movie.orang2.play();
}
Orang1 = movie.orang1;
Orang2 = movie.orang2;
traceB = _root.movie.bullet1;
if (Orang1.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.gotoAndPlay("headshoot");
lvl4_win = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang2.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.gotoAndPlay("headshoot");
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
};
}
_root.attachMovie("boxLogo", "boxLogo", 520, {_x:545, _y:25});
movie.attachMovie("aim", "aim", 500, {_x:350, _y:450});
movie.aim._width = movie.aim._width * 1.2;
movie.aim._height = movie.aim._height * 1.2;
_root.attachMovie("info", "info", 510, {_x:70.85, _y:453.7});
}
function showText() {
_root.attachMovie("textShow", "textShow", 530, {_x:6, _y:3});
}
function showSummary(earn, bonus, faiuler) {
boxLogo.removeMovieClip();
textShow.removeMovieClip();
Mouse.show();
clearInterval(intID);
_root.fxSound.stop;
_root.BagMusic.stop;
_root.soundB.stop;
inGame = false;
movie.removeMovieClip();
info.removeMovieClip();
_root.attachMovie("summary_mc", "summary", 800, {_x:322.3, _y:235.7});
summary.lvl_txt.text = Level;
summary.earn_txt.text = earn;
bns = 250 * bonus;
flr = 0;
summary.bonus_txt.text = bns;
summary.faiuler_txt.text = flr;
totalEarn = (earn + bns) - flr;
summary.total_txt.text = totalEarn;
summary.money = summary.money + totalEarn;
money = money + totalEarn;
TotalEarn = TotalEarn + totalEarn;
summary.ok_btn.onPress = function () {
summary.removeMovieClip();
boxLogo.removeMovieClip();
if (Level < 9) {
_root.gotoAndStop("levelOK");
} else {
headshoot = headshoot + 1;
_root.gotoAndStop("finishGame");
}
};
}
function finishWOI() {
switch (Level) {
case 1 :
price = 2600;
break;
case 2 :
price = 2850;
break;
case 3 :
price = 3200;
break;
case 4 :
price = 3550;
break;
case 5 :
price = 4100;
break;
case 6 :
price = 4350;
break;
case 7 :
price = 4900;
break;
case 8 :
price = 5300;
break;
case 9 :
price = 5500;
}
showSummary(price, 1);
delayDie = 0;
deleteFrame();
}
function kalahWOI() {
delayDie = 0;
showSummary2(0, 0, 1);
}
function showSummary2(earn, bonus, faiuler) {
boxLogo.removeMovieClip();
textShow.removeMovieClip();
inGame = false;
clearInterval(intID);
_root.movie.removeMovieClip();
info.removeMovieClip();
_root.fxSound.stop;
_root.BagMusic.stop;
_root.soundB.stop;
_root.attachMovie("summary_mc", "summary", 800, {_x:322.3, _y:235.7});
Mouse.show();
summary.lvl_txt.text = Level;
summary.earn_txt.text = earn;
bns = 250 * bonus;
flr = -(250 * faiuler);
summary.bonus_txt.text = bns;
summary.faiuler_txt.text = flr;
totalEarn = (earn + bns) - flr;
summary.total_txt.text = -totalEarn;
summary.money = summary.money + totalEarn;
trace(totalEarn);
money = money - totalEarn;
TotalEarn = TotalEarn + totalEarn;
summary.ok_btn.onPress = function () {
summary.removeMovieClip();
boxLogo.removeMovieClip();
_root.gotoAndStop("levelNO");
};
}
function cekDie() {
if (lvl4_win) {
delayDie = delayDie + 0.1;
if (delayDie >= 4) {
_root.fxSound.stop;
_root.BagMusic.stop;
_root.soundB.stop;
complete_snd.gotoAndPlay(2);
finishWOI();
delayDie = 0;
lvl4_win = false;
}
}
if (lvl4_lose) {
delayDie = delayDie + 0.1;
if (delayDie >= 4) {
failed_snd.gotoAndPlay(2);
kalahWOI();
delayDie = 0;
lvl4_lose = false;
}
}
}
function setSenjata() {
if (jenisPeluru == "pendek") {
info.ammo.text = ammo1;
}
switch (jenisSenjata) {
case "awp1" :
accuracy = 0.05;
break;
case "awp2" :
accuracy = 0.05;
break;
case "awp3" :
accuracy = 0.06;
break;
case "awp4" :
accuracy = 0.07;
break;
case "awp5" :
accuracy = 0.08;
}
trace(jenisScope);
switch (jenisScope) {
case "scope1" :
movie.aim.scope.gotoAndStop(1);
zoom = 1;
return;
case "scope2" :
movie.aim.scope.gotoAndStop(2);
zoom = 2;
return;
case "scope3" :
movie.aim.scope.gotoAndStop(3);
zoom = 3;
}
}
function startGame() {
onMouseDown = shot;
setSenjata();
}
function checkPeluru() {
if (jenisPeluru == "pendek") {
if (ammo1 < 1) {
_root.attachMovie("ammo_empty", "ammo_empty", 550, {_x:320, _y:250});
delayCek = delayCek + 0.1;
if (delayCek >= 10) {
delayCek = 0;
_root.failed_snd.gotoAndPlay(2);
kalahWOI();
}
}
} else if (jenisPeluru == "panjang") {
if (ammo2 < 1) {
trace("ammo2 empty");
}
}
}
function shot() {
if (shotok && (inGame)) {
if ((jenisPeluru == "pendek") & (ammo1 > 0)) {
ammo1 = ammo1 - 1;
info.ammo.text = ammo1;
shootOut();
} else if ((jenisPeluru == "panjang") & (ammo2 > 0)) {
ammo2 = ammo2 - 1;
info.ammo.text = ammo2;
shootOut();
}
}
}
function shootOut() {
if (noBullet >= 5) {
noBullet = 0;
}
noBullet = noBullet + 1;
_root.gun.gotoAndPlay(jenisSenjata);
movie.aim.gotoAndPlay(jenisSenjata);
tracex = movie.aim._x;
tracey = movie.aim._y;
tampung = _root.movie.attachMovie("bullet_hole", "bullet1", 100 + noBullet, {_x:tracex, _y:tracey});
tampung.dly = 3;
tampung.onEnterFrame = function () {
if (this.dly > 0) {
this.dly = this.dly - 0.3;
}
if (this.dly <= 1) {
this.removeMovieClip();
}
};
shotok = false;
}
function aimBrain() {
checkPeluru();
if ((zoom == 2) && (checkZoom)) {
movie.aim._width = movie.aim._width * 1.1;
movie.aim._height = movie.aim._height * 1.1;
checkZoom = false;
} else if ((zoom == 3) && (checkZoom)) {
movie.aim._width = movie.aim._width * 1.3;
movie.aim._height = movie.aim._height * 1.3;
checkZoom = false;
}
if (!otherObject) {
delayOB = delayOB + 0.1;
if (delayOB > 1) {
delayOB = 0;
otherObject = true;
}
}
shakeDelay = shakeDelay + 0.01;
if ((shakeDelay > 1) or (shakeDelay > 0.2)) {
shake = true;
if (numberRandom == 2) {
bug1 = bug1 + 1.4;
bug2 = bug2 + 1.4;
} else if (numberRandom == 1) {
bug1 = bug1 - 1.4;
bug2 = bug2 - 1.4;
}
}
if (shakeDelay > 1.5) {
shakeDelay = 0;
shake = false;
bug1 = 0;
bug2 = 0;
}
if (shake) {
numberRandom = random(4);
}
Mouse.hide();
var _local1 = accuracy;
if (balance) {
bug1 = bug1 / 2;
bug2 = bug2 / 2;
}
movie.aim._x = movie.aim._x + (((movie._xmouse - movie.aim._x) + bug1) * _local1);
movie.aim._y = movie.aim._y + (((movie._ymouse - movie.aim._y) + bug2) * _local1);
}
function mainLoop() {
if (inGame) {
aimBrain();
cekDie();
}
}
_root.playMusic("backGround");
_root.soundBackground("citySound");
setLevel();
shotok = true;
noBullet = 0;
zooming = false;
bug1 = 0;
bug2 = 0;
shake = false;
shakeDelay = 0;
numberRandom = 0;
checkZoom = true;
delayOB = 0;
startGame();
delayDie = 0;
inGame = true;
otherObject = true;
missObject = 0;
lvl4_win = false;
lvl4_lose = false;
delayCek = 0;
checkZoom = true;
intID = setInterval(mainLoop, 30);
Frame 19
function setLevel() {
switch (Level) {
case 1 :
_root.attachMovie("mission1_mc", "movie", 50, {_x:427, _y:198});
movie.mulai = true;
movie.orang1.stop();
movie.orang1.posisi = "walk";
movie.orang1.mati = false;
movie.orang2.stop();
movie.orang2.posisi = "walk";
movie.orang2.mati = false;
movie.orang3.stop();
movie.orang3.posisi = "walk";
movie.orang3.mati = false;
movie.orang4.stop();
movie.orang4.posisi = "walk";
movie.orang4.mati = false;
movie.orang5.stop();
movie.orang5.posisi = "target";
movie.orang5.mati = false;
movie.mobil1.stop();
movie.mobil1.body.orang1.mati = false;
movie.mobil1.body.orang2.mati = false;
movie.mobil2.stop();
movie.mobil2.body.orang1.mati = false;
movie.mobil2.body.orang2.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
movie.orang1.play();
movie.orang2.play();
movie.orang3.play();
movie.orang4.play();
movie.orang5.play();
movie.mobil1.play();
movie.mobil2.play();
this.mulai = false;
}
Orang1 = movie.orang1;
Orang2 = movie.orang2;
Orang3 = movie.orang3;
Orang4 = movie.orang4;
Orang5 = movie.orang5;
Orang6 = movie.mobil1.body.orang1;
Orang7 = movie.mobil2.body.orang1;
Orang8 = movie.mobil2.body.orang2;
traceB = _root.movie.bullet1;
if (Orang1.body.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.posisi = "headshoot";
Orang1.stop();
Orang1.body.gotoAndPlay(Orang1.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang1.body.bodysensor.hitTest(traceB.sensor)) {
Orang1.posisi = "run";
Orang1.body.gotoAndPlay(Orang1.posisi);
traceB.removeMovieClip();
}
if (Orang2.body.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.posisi = "headshoot";
Orang2.stop();
Orang2.body.gotoAndPlay(Orang2.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang2.body.bodysensor.hitTest(traceB.sensor)) {
Orang2.posisi = "run";
Orang2.body.gotoAndPlay(Orang2.posisi);
traceB.removeMovieClip();
}
if (Orang3.body.sensor.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.posisi = "headshoot";
Orang3.stop();
Orang3.body.gotoAndPlay(Orang3.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang3.body.bodysensor.hitTest(traceB.sensor)) {
Orang3.posisi = "run";
Orang3.body.gotoAndPlay(Orang3.posisi);
traceB.removeMovieClip();
}
if (Orang4.body.sensor.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.posisi = "headshoot";
Orang4.stop();
Orang4.body.gotoAndPlay(Orang4.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
if (Orang4.body.bodysensor.hitTest(traceB.sensor)) {
Orang4.posisi = "run";
Orang4.body.gotoAndPlay(Orang4.posisi);
traceB.removeMovieClip();
}
if (Orang5.body.sensor.hitTest(traceB.sensor) && (!Orang5.mati)) {
Orang5.posisi = "headshoot";
Orang5.stop();
Orang5.body.gotoAndPlay(Orang5.posisi);
lvl4_win = true;
traceB.removeMovieClip();
Orang5.mati = true;
}
if (Orang5.body.bodysensor.hitTest(traceB.sensor)) {
Orang5.posisi = "run";
Orang5.body.gotoAndPlay(Orang5.posisi);
traceB.removeMovieClip();
}
if (Orang6.hitTest(traceB.sensor) && (!Orang6.mati)) {
Orang6.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang6.mati = true;
}
if (Orang7.hitTest(traceB.sensor) && (!Orang7.mati)) {
Orang7.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang7.mati = true;
}
if (Orang8.hitTest(traceB.sensor) && (!Orang8.mati)) {
Orang8.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang8.mati = true;
}
};
break;
case 2 :
_root.attachMovie("mission2_mc", "movie", 50, {_x:349.15, _y:226});
movie.mulai = true;
movie.orang1.stop();
movie.orang1.posisi = "walk";
movie.orang1.mati = false;
movie.orang2.stop();
movie.orang2.posisi = "target";
movie.orang2.mati = false;
movie.orang3.stop();
movie.orang3.posisi = "walk";
movie.orang3.mati = false;
movie.orang4.stop();
movie.orang4.posisi = "target";
movie.orang4.mati = false;
movie.orang11.stop();
movie.orang11.mati = false;
movie.orang12.stop();
movie.orang12.mati = false;
movie.orang13.stop();
movie.orang13.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
movie.orang1.play();
movie.orang2.play();
movie.orang3.play();
movie.orang4.play();
movie.orang11.play();
movie.orang12.play();
movie.orang13.play();
this.mulai = false;
}
Orang1 = movie.orang1;
Orang2 = movie.orang2;
Orang3 = movie.orang3;
Orang4 = movie.orang4;
Orang11 = movie.orang11;
Orang12 = movie.orang12;
Orang13 = movie.orang13;
traceB = _root.movie.bullet1;
if (Orang11.sensor.hitTest(traceB.sensor) && (!Orang11.mati)) {
Orang11.gotoAndPlay("headshoot");
lvl4_win = true;
traceB.removeMovieClip();
Orang11.mati = true;
}
if (Orang12.sensor.hitTest(traceB.sensor) && (!Orang12.mati)) {
Orang12.gotoAndPlay("headshoot");
lvl4_lose = true;
traceB.removeMovieClip();
Orang12.mati = true;
}
if (Orang13.sensor.hitTest(traceB.sensor) && (!Orang13.mati)) {
Orang13.gotoAndPlay("headshoot");
lvl4_lose = true;
traceB.removeMovieClip();
Orang13.mati = true;
}
if (Orang1.body.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.posisi = "headshoot";
Orang1.stop();
Orang1.body.gotoAndPlay(Orang1.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang1.body.bodysensor.hitTest(traceB.sensor)) {
Orang1.posisi = "run";
Orang1.body.gotoAndPlay(Orang1.posisi);
traceB.removeMovieClip();
}
if (Orang2.body.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.posisi = "headshoot";
Orang2.stop();
Orang2.body.gotoAndPlay(Orang2.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang2.body.bodysensor.hitTest(traceB.sensor)) {
Orang2.posisi = "run";
Orang2.body.gotoAndPlay(Orang2.posisi);
traceB.removeMovieClip();
}
if (Orang3.body.sensor.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.posisi = "headshoot";
Orang3.stop();
Orang3.body.gotoAndPlay(Orang3.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang3.body.bodysensor.hitTest(traceB.sensor)) {
Orang3.posisi = "run";
Orang3.body.gotoAndPlay(Orang3.posisi);
traceB.removeMovieClip();
}
if (Orang4.body.sensor.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.posisi = "headshoot";
Orang4.stop();
Orang4.body.gotoAndPlay(Orang4.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
if (Orang4.body.bodysensor.hitTest(traceB.sensor)) {
Orang4.posisi = "run";
Orang4.body.gotoAndPlay(Orang4.posisi);
traceB.removeMovieClip();
}
};
break;
case 3 :
_root.attachMovie("mission3_mc", "movie", 50, {_x:119, _y:213});
movie.mulai = true;
movie.orang1.stop();
movie.orang1.posisi = "walk";
movie.orang1.mati = false;
movie.orang2.stop();
movie.orang2.posisi = "walk";
movie.orang2.mati = false;
movie.orang3.stop();
movie.orang3.posisi = "walk";
movie.orang3.mati = false;
movie.orang4.stop();
movie.orang4.posisi = "walk";
movie.orang4.mati = false;
movie.orang5.stop();
movie.orang5.posisi = "target";
movie.orang5.mati = false;
movie.mobil1.stop();
movie.mobil1.body.orang1.mati = false;
movie.mobil1.body.orang2.mati = false;
movie.mobil2.stop();
movie.mobil2.body.orang1.mati = false;
movie.mobil2.body.orang2.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
movie.orang1.play();
movie.orang2.play();
movie.orang3.play();
movie.orang4.play();
movie.orang5.play();
movie.mobil1.play();
movie.mobil2.play();
this.mulai = false;
}
Orang1 = movie.orang1;
Orang2 = movie.orang2;
Orang3 = movie.orang3;
Orang4 = movie.orang4;
Orang5 = movie.orang5;
Orang6 = movie.mobil1.body.orang1;
Orang9 = movie.mobil1.body.orang2;
Orang7 = movie.mobil2.body.orang1;
Orang8 = movie.mobil2.body.orang2;
traceB = _root.movie.bullet1;
if (Orang1.body.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.posisi = "headshoot";
Orang1.stop();
Orang1.body.gotoAndPlay(Orang1.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang1.body.bodysensor.hitTest(traceB.sensor)) {
Orang1.posisi = "run";
Orang1.body.gotoAndPlay(Orang1.posisi);
traceB.removeMovieClip();
}
if (Orang2.body.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.posisi = "headshoot";
Orang2.stop();
Orang2.body.gotoAndPlay(Orang2.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang2.body.bodysensor.hitTest(traceB.sensor)) {
Orang2.posisi = "run";
Orang2.body.gotoAndPlay(Orang2.posisi);
traceB.removeMovieClip();
}
if (Orang3.body.sensor.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.posisi = "headshoot";
Orang3.stop();
Orang3.body.gotoAndPlay(Orang3.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang3.body.bodysensor.hitTest(traceB.sensor)) {
Orang3.posisi = "run";
Orang3.body.gotoAndPlay(Orang3.posisi);
traceB.removeMovieClip();
}
if (Orang4.body.sensor.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.posisi = "headshoot";
Orang4.stop();
Orang4.body.gotoAndPlay(Orang4.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
if (Orang4.body.bodysensor.hitTest(traceB.sensor)) {
Orang4.posisi = "run";
Orang4.body.gotoAndPlay(Orang4.posisi);
traceB.removeMovieClip();
}
if (Orang5.body.sensor.hitTest(traceB.sensor) && (!Orang5.mati)) {
Orang5.posisi = "headshoottarget";
Orang5.stop();
Orang5.body.gotoAndPlay(Orang5.posisi);
lvl4_win = true;
traceB.removeMovieClip();
Orang5.mati = true;
}
if (Orang5.body.bodysensor.hitTest(traceB.sensor)) {
Orang5.posisi = "run";
Orang5.body.gotoAndPlay(Orang5.posisi);
traceB.removeMovieClip();
}
if (Orang6.hitTest(traceB.sensor) && (!Orang6.mati)) {
Orang6.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang6.mati = true;
}
if (Orang7.hitTest(traceB.sensor) && (!Orang7.mati)) {
Orang7.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang7.mati = true;
}
if (Orang8.hitTest(traceB.sensor) && (!Orang8.mati)) {
Orang8.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang8.mati = true;
}
if (Orang9.hitTest(traceB.sensor) && (!Orang9.mati)) {
Orang9.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang9.mati = true;
}
};
break;
case 4 :
_root.attachMovie("mission4_mc", "movie", 50, {_x:415, _y:240});
movie.mulai = true;
object10.stop;
object10.body.mati = false;
object11.stop;
object11.body.mati = false;
object12.stop;
object12.body.mati = false;
object13.stop;
object13.body.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
object10.play();
object11.play();
object12.play();
object13.play();
}
Orang1 = movie.object10.body.orang1;
Orang2 = movie.object11.body.orang1;
Orang3 = movie.object12.body.orang1;
Orang4 = movie.object13.body.orang1;
traceB = _root.movie.bullet1;
if (Orang1.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang2.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang3.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang4.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.gotoAndPlay(2);
lvl4_win = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
};
break;
case 5 :
_root.attachMovie("mission5_mc", "movie", 50, {_x:424, _y:280});
movie.mulai = true;
movie.orang1.stop();
movie.orang1.posisi = "walk";
movie.orang1.mati = false;
movie.orang2.stop();
movie.orang2.posisi = "walk";
movie.orang2.mati = false;
movie.orang3.stop();
movie.orang3.posisi = "walk";
movie.orang3.mati = false;
movie.orang4.stop();
movie.orang4.posisi = "walk";
movie.orang4.mati = false;
movie.orang5.stop();
movie.orang5.posisi = "target";
movie.orang5.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
movie.orang1.play();
movie.orang2.play();
movie.orang3.play();
movie.orang4.play();
movie.orang5.play();
movie.mobil1.play();
movie.mobil2.play();
this.mulai = false;
}
Orang1 = movie.orang1;
Orang2 = movie.orang2;
Orang3 = movie.orang3;
Orang4 = movie.orang4;
Orang5 = movie.orang5;
traceB = _root.movie.bullet1;
if (Orang1.body.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.posisi = "headshoot";
Orang1.stop();
Orang1.body.gotoAndPlay(Orang1.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang1.body.bodysensor.hitTest(traceB.sensor)) {
Orang1.posisi = "run";
Orang1.body.gotoAndPlay(Orang1.posisi);
traceB.removeMovieClip();
}
if (Orang2.body.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.posisi = "headshoot";
Orang2.stop();
Orang2.body.gotoAndPlay(Orang2.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang2.body.bodysensor.hitTest(traceB.sensor)) {
Orang2.posisi = "run";
Orang2.body.gotoAndPlay(Orang2.posisi);
traceB.removeMovieClip();
}
if (Orang3.body.sensor.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.posisi = "headshoot";
Orang3.stop();
Orang3.body.gotoAndPlay(Orang3.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang3.body.bodysensor.hitTest(traceB.sensor)) {
Orang3.posisi = "run";
Orang3.body.gotoAndPlay(Orang3.posisi);
traceB.removeMovieClip();
}
if (Orang4.body.sensor.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.posisi = "headshoot";
Orang4.stop();
Orang4.body.gotoAndPlay(Orang4.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
if (Orang4.body.bodysensor.hitTest(traceB.sensor)) {
Orang4.posisi = "run";
Orang4.body.gotoAndPlay(Orang4.posisi);
traceB.removeMovieClip();
}
if (Orang5.body.sensor.hitTest(traceB.sensor) && (!Orang5.mati)) {
Orang5.posisi = "headshoot";
Orang5.stop();
Orang5.body.gotoAndPlay(Orang5.posisi);
lvl4_win = true;
traceB.removeMovieClip();
Orang5.mati = true;
}
if (Orang5.body.bodysensor.hitTest(traceB.sensor)) {
Orang5.posisi = "run";
Orang5.body.gotoAndPlay(Orang5.posisi);
traceB.removeMovieClip();
}
};
break;
case 6 :
_root.attachMovie("mission6_mc", "movie", 50, {_x:356, _y:224});
movie.mulai = true;
movie.orang1.stop();
movie.orang1.posisi = "walk";
movie.orang1.mati = false;
movie.orang2.stop();
movie.orang2.posisi = "walk";
movie.orang2.mati = false;
movie.orang3.stop();
movie.orang3.posisi = "walk";
movie.orang3.mati = false;
movie.object1.stop();
movie.object1.body.orang1.mati = false;
movie.object2.stop();
movie.object2.body.orang1.mati = false;
movie.object3.stop();
movie.object3.body.orang1.mati = false;
movie.object4.stop();
movie.object4.body.orang1.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
movie.orang1.play();
movie.orang2.play();
movie.orang3.play();
movie.object1.play();
movie.object2.play();
movie.object3.play();
movie.object4.play();
this.mulai = false;
}
Orang1 = movie.orang1;
Orang2 = movie.orang2;
Orang3 = movie.orang3;
Orang4 = movie.object1.body.orang1;
Orang5 = movie.object2.body.orang1;
Orang6 = movie.object3.body.orang1;
Orang7 = movie.object4.body.orang1;
traceB = _root.movie.bullet1;
if (Orang1.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.gotoAndPlay("headshoot");
lvl4_win = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang2.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.gotoAndPlay("headshoot");
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang3.sensor.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.gotoAndPlay("headshoot");
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang4.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
if (Orang5.hitTest(traceB.sensor) && (!Orang5.mati)) {
Orang5.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang5.mati = true;
}
if (Orang6.hitTest(traceB.sensor) && (!Orang6.mati)) {
Orang6.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang6.mati = true;
}
if (Orang7.hitTest(traceB.sensor) && (!Orang7.mati)) {
Orang7.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang7.mati = true;
}
};
break;
case 8 :
_root.attachMovie("mission8_mc", "movie", 50, {_x:261, _y:172});
movie.mulai = true;
movie.mobil1.stop();
movie.mobil1.body.orang1.mati = false;
movie.mobil1.body.orang2.mati = false;
movie.mobil2.stop();
movie.mobil2.body.orang1.mati = false;
movie.mobil2.body.orang2.mati = false;
movie.mobil3.stop();
movie.mobil3.body.orang1.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
movie.mobil1.play();
movie.mobil2.play();
movie.mobil3.play();
this.mulai = false;
}
Orang1 = movie.mobil1.body.orang1;
Orang2 = movie.mobil1.body.orang2;
Orang3 = movie.mobil2.body.orang1;
Orang4 = movie.mobil2.body.orang2;
Orang5 = movie.mobil3.body.orang1;
traceB = _root.movie.bullet1;
if (Orang1.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang2.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang3.sensor.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang4.sensor.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
if (Orang5.sensor.hitTest(traceB.sensor) && (!Orang5.mati)) {
Orang5.gotoAndPlay(2);
lvl4_win = true;
traceB.removeMovieClip();
Orang5.mati = true;
}
};
break;
case 9 :
_root.attachMovie("mission9_mc", "movie", 50, {_x:287, _y:285});
movie.mulai = true;
movie.orang1.stop();
movie.orang1.posisi = "walk";
movie.orang1.mati = false;
movie.orang2.stop();
movie.onEnterFrame = function () {
if (this.mulai) {
movie.orang1.play();
movie.orang2.play();
}
Orang1 = movie.orang1;
Orang2 = movie.orang2;
traceB = _root.movie.bullet1;
if (Orang1.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.gotoAndPlay("headshoot");
lvl4_win = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang2.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.gotoAndPlay("headshoot");
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
};
}
_root.attachMovie("boxLogo", "boxLogo", 520, {_x:545, _y:25});
movie.attachMovie("aim", "aim", 500, {_x:350, _y:450});
movie.aim._width = movie.aim._width * 1.2;
movie.aim._height = movie.aim._height * 1.2;
_root.attachMovie("info", "info", 510, {_x:70.85, _y:453.7});
}
function showText() {
_root.attachMovie("textShow", "textShow", 530, {_x:6, _y:3});
}
function showSummary(earn, bonus, faiuler) {
boxLogo.removeMovieClip();
textShow.removeMovieClip();
Mouse.show();
clearInterval(intID);
_root.fxSound.stop;
_root.BagMusic.stop;
_root.soundB.stop;
inGame = false;
movie.removeMovieClip();
info.removeMovieClip();
_root.attachMovie("summary_mc", "summary", 800, {_x:322.3, _y:235.7});
summary.lvl_txt.text = Level;
summary.earn_txt.text = earn;
bns = 250 * bonus;
flr = 0;
summary.bonus_txt.text = bns;
summary.faiuler_txt.text = flr;
totalEarn = (earn + bns) - flr;
summary.total_txt.text = totalEarn;
summary.money = summary.money + totalEarn;
money = money + totalEarn;
TotalEarn = TotalEarn + totalEarn;
summary.ok_btn.onPress = function () {
summary.removeMovieClip();
boxLogo.removeMovieClip();
if (Level < 9) {
_root.gotoAndStop("levelOK");
} else {
headshoot = headshoot + 1;
_root.gotoAndStop("finishGame");
}
};
}
function finishWOI() {
switch (Level) {
case 1 :
price = 2600;
break;
case 2 :
price = 2850;
break;
case 3 :
price = 3200;
break;
case 4 :
price = 3550;
break;
case 5 :
price = 4100;
break;
case 6 :
price = 4350;
break;
case 7 :
price = 4900;
break;
case 8 :
price = 5300;
break;
case 9 :
price = 5500;
}
showSummary(price, 1);
delayDie = 0;
deleteFrame();
}
function kalahWOI() {
delayDie = 0;
showSummary2(0, 0, 1);
}
function showSummary2(earn, bonus, faiuler) {
boxLogo.removeMovieClip();
textShow.removeMovieClip();
inGame = false;
clearInterval(intID);
_root.movie.removeMovieClip();
info.removeMovieClip();
_root.fxSound.stop;
_root.BagMusic.stop;
_root.soundB.stop;
_root.attachMovie("summary_mc", "summary", 800, {_x:322.3, _y:235.7});
Mouse.show();
summary.lvl_txt.text = Level;
summary.earn_txt.text = earn;
bns = 250 * bonus;
flr = -(250 * faiuler);
summary.bonus_txt.text = bns;
summary.faiuler_txt.text = flr;
totalEarn = (earn + bns) - flr;
summary.total_txt.text = -totalEarn;
summary.money = summary.money + totalEarn;
trace(totalEarn);
money = money - totalEarn;
TotalEarn = TotalEarn + totalEarn;
summary.ok_btn.onPress = function () {
summary.removeMovieClip();
boxLogo.removeMovieClip();
_root.gotoAndStop("levelNO");
};
}
function cekDie() {
if (lvl4_win) {
delayDie = delayDie + 0.1;
if (delayDie >= 4) {
_root.fxSound.stop;
_root.BagMusic.stop;
_root.soundB.stop;
complete_snd.gotoAndPlay(2);
finishWOI();
delayDie = 0;
lvl4_win = false;
}
}
if (lvl4_lose) {
delayDie = delayDie + 0.1;
if (delayDie >= 4) {
failed_snd.gotoAndPlay(2);
kalahWOI();
delayDie = 0;
lvl4_lose = false;
}
}
}
function setSenjata() {
if (jenisPeluru == "pendek") {
info.ammo.text = ammo1;
}
switch (jenisSenjata) {
case "awp1" :
accuracy = 0.05;
break;
case "awp2" :
accuracy = 0.05;
break;
case "awp3" :
accuracy = 0.06;
break;
case "awp4" :
accuracy = 0.07;
break;
case "awp5" :
accuracy = 0.08;
}
trace(jenisScope);
switch (jenisScope) {
case "scope1" :
movie.aim.scope.gotoAndStop(1);
zoom = 1;
return;
case "scope2" :
movie.aim.scope.gotoAndStop(2);
zoom = 2;
return;
case "scope3" :
movie.aim.scope.gotoAndStop(3);
zoom = 3;
}
}
function startGame() {
onMouseDown = shot;
setSenjata();
}
function checkPeluru() {
if (jenisPeluru == "pendek") {
if (ammo1 < 1) {
_root.attachMovie("ammo_empty", "ammo_empty", 550, {_x:320, _y:250});
delayCek = delayCek + 0.1;
if (delayCek >= 10) {
delayCek = 0;
_root.failed_snd.gotoAndPlay(2);
kalahWOI();
}
}
} else if (jenisPeluru == "panjang") {
if (ammo2 < 1) {
trace("ammo2 empty");
}
}
}
function shot() {
if (shotok && (inGame)) {
if ((jenisPeluru == "pendek") & (ammo1 > 0)) {
ammo1 = ammo1 - 1;
info.ammo.text = ammo1;
shootOut();
} else if ((jenisPeluru == "panjang") & (ammo2 > 0)) {
ammo2 = ammo2 - 1;
info.ammo.text = ammo2;
shootOut();
}
}
}
function shootOut() {
if (noBullet >= 5) {
noBullet = 0;
}
noBullet = noBullet + 1;
_root.gun.gotoAndPlay(jenisSenjata);
movie.aim.gotoAndPlay(jenisSenjata);
tracex = movie.aim._x;
tracey = movie.aim._y;
tampung = _root.movie.attachMovie("bullet_hole", "bullet1", 100 + noBullet, {_x:tracex, _y:tracey});
tampung.dly = 3;
tampung.onEnterFrame = function () {
if (this.dly > 0) {
this.dly = this.dly - 0.3;
}
if (this.dly <= 1) {
this.removeMovieClip();
}
};
shotok = false;
}
function aimBrain() {
checkPeluru();
if ((zoom == 2) && (checkZoom)) {
movie.aim._width = movie.aim._width * 1.1;
movie.aim._height = movie.aim._height * 1.1;
checkZoom = false;
} else if ((zoom == 3) && (checkZoom)) {
movie.aim._width = movie.aim._width * 1.3;
movie.aim._height = movie.aim._height * 1.3;
checkZoom = false;
}
if (!otherObject) {
delayOB = delayOB + 0.1;
if (delayOB > 1) {
delayOB = 0;
otherObject = true;
}
}
shakeDelay = shakeDelay + 0.01;
if ((shakeDelay > 1) or (shakeDelay > 0.2)) {
shake = true;
if (numberRandom == 2) {
bug1 = bug1 + 1.4;
bug2 = bug2 + 1.4;
} else if (numberRandom == 1) {
bug1 = bug1 - 1.4;
bug2 = bug2 - 1.4;
}
}
if (shakeDelay > 1.5) {
shakeDelay = 0;
shake = false;
bug1 = 0;
bug2 = 0;
}
if (shake) {
numberRandom = random(4);
}
Mouse.hide();
var _local1 = accuracy;
if (balance) {
bug1 = bug1 / 2;
bug2 = bug2 / 2;
}
movie.aim._x = movie.aim._x + (((movie._xmouse - movie.aim._x) + bug1) * _local1);
movie.aim._y = movie.aim._y + (((movie._ymouse - movie.aim._y) + bug2) * _local1);
}
function mainLoop() {
if (inGame) {
aimBrain();
cekDie();
}
}
_root.soundBackground("wind");
_root.playMusic("backGround");
setLevel();
shotok = true;
noBullet = 0;
zooming = false;
bug1 = 0;
bug2 = 0;
shake = false;
shakeDelay = 0;
numberRandom = 0;
checkZoom = true;
delayOB = 0;
startGame();
delayDie = 0;
inGame = true;
otherObject = true;
missObject = 0;
lvl4_win = false;
lvl4_lose = false;
delayCek = 0;
checkZoom = true;
intID = setInterval(mainLoop, 30);
Frame 20
function setLevel() {
switch (Level) {
case 1 :
_root.attachMovie("mission1_mc", "movie", 50, {_x:427, _y:198});
movie.mulai = true;
movie.orang1.stop();
movie.orang1.posisi = "walk";
movie.orang1.mati = false;
movie.orang2.stop();
movie.orang2.posisi = "walk";
movie.orang2.mati = false;
movie.orang3.stop();
movie.orang3.posisi = "walk";
movie.orang3.mati = false;
movie.orang4.stop();
movie.orang4.posisi = "walk";
movie.orang4.mati = false;
movie.orang5.stop();
movie.orang5.posisi = "target";
movie.orang5.mati = false;
movie.mobil1.stop();
movie.mobil1.body.orang1.mati = false;
movie.mobil1.body.orang2.mati = false;
movie.mobil2.stop();
movie.mobil2.body.orang1.mati = false;
movie.mobil2.body.orang2.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
movie.orang1.play();
movie.orang2.play();
movie.orang3.play();
movie.orang4.play();
movie.orang5.play();
movie.mobil1.play();
movie.mobil2.play();
this.mulai = false;
}
Orang1 = movie.orang1;
Orang2 = movie.orang2;
Orang3 = movie.orang3;
Orang4 = movie.orang4;
Orang5 = movie.orang5;
Orang6 = movie.mobil1.body.orang1;
Orang7 = movie.mobil2.body.orang1;
Orang8 = movie.mobil2.body.orang2;
traceB = _root.movie.bullet1;
if (Orang1.body.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.posisi = "headshoot";
Orang1.stop();
Orang1.body.gotoAndPlay(Orang1.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang1.body.bodysensor.hitTest(traceB.sensor)) {
Orang1.posisi = "run";
Orang1.body.gotoAndPlay(Orang1.posisi);
traceB.removeMovieClip();
}
if (Orang2.body.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.posisi = "headshoot";
Orang2.stop();
Orang2.body.gotoAndPlay(Orang2.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang2.body.bodysensor.hitTest(traceB.sensor)) {
Orang2.posisi = "run";
Orang2.body.gotoAndPlay(Orang2.posisi);
traceB.removeMovieClip();
}
if (Orang3.body.sensor.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.posisi = "headshoot";
Orang3.stop();
Orang3.body.gotoAndPlay(Orang3.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang3.body.bodysensor.hitTest(traceB.sensor)) {
Orang3.posisi = "run";
Orang3.body.gotoAndPlay(Orang3.posisi);
traceB.removeMovieClip();
}
if (Orang4.body.sensor.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.posisi = "headshoot";
Orang4.stop();
Orang4.body.gotoAndPlay(Orang4.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
if (Orang4.body.bodysensor.hitTest(traceB.sensor)) {
Orang4.posisi = "run";
Orang4.body.gotoAndPlay(Orang4.posisi);
traceB.removeMovieClip();
}
if (Orang5.body.sensor.hitTest(traceB.sensor) && (!Orang5.mati)) {
Orang5.posisi = "headshoot";
Orang5.stop();
Orang5.body.gotoAndPlay(Orang5.posisi);
lvl4_win = true;
traceB.removeMovieClip();
Orang5.mati = true;
}
if (Orang5.body.bodysensor.hitTest(traceB.sensor)) {
Orang5.posisi = "run";
Orang5.body.gotoAndPlay(Orang5.posisi);
traceB.removeMovieClip();
}
if (Orang6.hitTest(traceB.sensor) && (!Orang6.mati)) {
Orang6.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang6.mati = true;
}
if (Orang7.hitTest(traceB.sensor) && (!Orang7.mati)) {
Orang7.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang7.mati = true;
}
if (Orang8.hitTest(traceB.sensor) && (!Orang8.mati)) {
Orang8.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang8.mati = true;
}
};
break;
case 2 :
_root.attachMovie("mission2_mc", "movie", 50, {_x:349.15, _y:226});
movie.mulai = true;
movie.orang1.stop();
movie.orang1.posisi = "walk";
movie.orang1.mati = false;
movie.orang2.stop();
movie.orang2.posisi = "target";
movie.orang2.mati = false;
movie.orang3.stop();
movie.orang3.posisi = "walk";
movie.orang3.mati = false;
movie.orang4.stop();
movie.orang4.posisi = "target";
movie.orang4.mati = false;
movie.orang11.stop();
movie.orang11.mati = false;
movie.orang12.stop();
movie.orang12.mati = false;
movie.orang13.stop();
movie.orang13.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
movie.orang1.play();
movie.orang2.play();
movie.orang3.play();
movie.orang4.play();
movie.orang11.play();
movie.orang12.play();
movie.orang13.play();
this.mulai = false;
}
Orang1 = movie.orang1;
Orang2 = movie.orang2;
Orang3 = movie.orang3;
Orang4 = movie.orang4;
Orang11 = movie.orang11;
Orang12 = movie.orang12;
Orang13 = movie.orang13;
traceB = _root.movie.bullet1;
if (Orang11.sensor.hitTest(traceB.sensor) && (!Orang11.mati)) {
Orang11.gotoAndPlay("headshoot");
lvl4_win = true;
traceB.removeMovieClip();
Orang11.mati = true;
}
if (Orang12.sensor.hitTest(traceB.sensor) && (!Orang12.mati)) {
Orang12.gotoAndPlay("headshoot");
lvl4_lose = true;
traceB.removeMovieClip();
Orang12.mati = true;
}
if (Orang13.sensor.hitTest(traceB.sensor) && (!Orang13.mati)) {
Orang13.gotoAndPlay("headshoot");
lvl4_lose = true;
traceB.removeMovieClip();
Orang13.mati = true;
}
if (Orang1.body.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.posisi = "headshoot";
Orang1.stop();
Orang1.body.gotoAndPlay(Orang1.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang1.body.bodysensor.hitTest(traceB.sensor)) {
Orang1.posisi = "run";
Orang1.body.gotoAndPlay(Orang1.posisi);
traceB.removeMovieClip();
}
if (Orang2.body.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.posisi = "headshoot";
Orang2.stop();
Orang2.body.gotoAndPlay(Orang2.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang2.body.bodysensor.hitTest(traceB.sensor)) {
Orang2.posisi = "run";
Orang2.body.gotoAndPlay(Orang2.posisi);
traceB.removeMovieClip();
}
if (Orang3.body.sensor.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.posisi = "headshoot";
Orang3.stop();
Orang3.body.gotoAndPlay(Orang3.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang3.body.bodysensor.hitTest(traceB.sensor)) {
Orang3.posisi = "run";
Orang3.body.gotoAndPlay(Orang3.posisi);
traceB.removeMovieClip();
}
if (Orang4.body.sensor.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.posisi = "headshoot";
Orang4.stop();
Orang4.body.gotoAndPlay(Orang4.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
if (Orang4.body.bodysensor.hitTest(traceB.sensor)) {
Orang4.posisi = "run";
Orang4.body.gotoAndPlay(Orang4.posisi);
traceB.removeMovieClip();
}
};
break;
case 3 :
_root.attachMovie("mission3_mc", "movie", 50, {_x:119, _y:213});
movie.mulai = true;
movie.orang1.stop();
movie.orang1.posisi = "walk";
movie.orang1.mati = false;
movie.orang2.stop();
movie.orang2.posisi = "walk";
movie.orang2.mati = false;
movie.orang3.stop();
movie.orang3.posisi = "walk";
movie.orang3.mati = false;
movie.orang4.stop();
movie.orang4.posisi = "walk";
movie.orang4.mati = false;
movie.orang5.stop();
movie.orang5.posisi = "target";
movie.orang5.mati = false;
movie.mobil1.stop();
movie.mobil1.body.orang1.mati = false;
movie.mobil1.body.orang2.mati = false;
movie.mobil2.stop();
movie.mobil2.body.orang1.mati = false;
movie.mobil2.body.orang2.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
movie.orang1.play();
movie.orang2.play();
movie.orang3.play();
movie.orang4.play();
movie.orang5.play();
movie.mobil1.play();
movie.mobil2.play();
this.mulai = false;
}
Orang1 = movie.orang1;
Orang2 = movie.orang2;
Orang3 = movie.orang3;
Orang4 = movie.orang4;
Orang5 = movie.orang5;
Orang6 = movie.mobil1.body.orang1;
Orang9 = movie.mobil1.body.orang2;
Orang7 = movie.mobil2.body.orang1;
Orang8 = movie.mobil2.body.orang2;
traceB = _root.movie.bullet1;
if (Orang1.body.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.posisi = "headshoot";
Orang1.stop();
Orang1.body.gotoAndPlay(Orang1.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang1.body.bodysensor.hitTest(traceB.sensor)) {
Orang1.posisi = "run";
Orang1.body.gotoAndPlay(Orang1.posisi);
traceB.removeMovieClip();
}
if (Orang2.body.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.posisi = "headshoot";
Orang2.stop();
Orang2.body.gotoAndPlay(Orang2.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang2.body.bodysensor.hitTest(traceB.sensor)) {
Orang2.posisi = "run";
Orang2.body.gotoAndPlay(Orang2.posisi);
traceB.removeMovieClip();
}
if (Orang3.body.sensor.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.posisi = "headshoot";
Orang3.stop();
Orang3.body.gotoAndPlay(Orang3.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang3.body.bodysensor.hitTest(traceB.sensor)) {
Orang3.posisi = "run";
Orang3.body.gotoAndPlay(Orang3.posisi);
traceB.removeMovieClip();
}
if (Orang4.body.sensor.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.posisi = "headshoot";
Orang4.stop();
Orang4.body.gotoAndPlay(Orang4.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
if (Orang4.body.bodysensor.hitTest(traceB.sensor)) {
Orang4.posisi = "run";
Orang4.body.gotoAndPlay(Orang4.posisi);
traceB.removeMovieClip();
}
if (Orang5.body.sensor.hitTest(traceB.sensor) && (!Orang5.mati)) {
Orang5.posisi = "headshoottarget";
Orang5.stop();
Orang5.body.gotoAndPlay(Orang5.posisi);
lvl4_win = true;
traceB.removeMovieClip();
Orang5.mati = true;
}
if (Orang5.body.bodysensor.hitTest(traceB.sensor)) {
Orang5.posisi = "run";
Orang5.body.gotoAndPlay(Orang5.posisi);
traceB.removeMovieClip();
}
if (Orang6.hitTest(traceB.sensor) && (!Orang6.mati)) {
Orang6.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang6.mati = true;
}
if (Orang7.hitTest(traceB.sensor) && (!Orang7.mati)) {
Orang7.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang7.mati = true;
}
if (Orang8.hitTest(traceB.sensor) && (!Orang8.mati)) {
Orang8.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang8.mati = true;
}
if (Orang9.hitTest(traceB.sensor) && (!Orang9.mati)) {
Orang9.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang9.mati = true;
}
};
break;
case 4 :
_root.attachMovie("mission4_mc", "movie", 50, {_x:415, _y:240});
movie.mulai = true;
object10.stop;
object10.body.mati = false;
object11.stop;
object11.body.mati = false;
object12.stop;
object12.body.mati = false;
object13.stop;
object13.body.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
object10.play();
object11.play();
object12.play();
object13.play();
}
Orang1 = movie.object10.body.orang1;
Orang2 = movie.object11.body.orang1;
Orang3 = movie.object12.body.orang1;
Orang4 = movie.object13.body.orang1;
traceB = _root.movie.bullet1;
if (Orang1.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang2.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang3.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang4.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.gotoAndPlay(2);
lvl4_win = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
};
break;
case 5 :
_root.attachMovie("mission5_mc", "movie", 50, {_x:424, _y:280});
movie.mulai = true;
movie.orang1.stop();
movie.orang1.posisi = "walk";
movie.orang1.mati = false;
movie.orang2.stop();
movie.orang2.posisi = "walk";
movie.orang2.mati = false;
movie.orang3.stop();
movie.orang3.posisi = "walk";
movie.orang3.mati = false;
movie.orang4.stop();
movie.orang4.posisi = "walk";
movie.orang4.mati = false;
movie.orang5.stop();
movie.orang5.posisi = "target";
movie.orang5.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
movie.orang1.play();
movie.orang2.play();
movie.orang3.play();
movie.orang4.play();
movie.orang5.play();
movie.mobil1.play();
movie.mobil2.play();
this.mulai = false;
}
Orang1 = movie.orang1;
Orang2 = movie.orang2;
Orang3 = movie.orang3;
Orang4 = movie.orang4;
Orang5 = movie.orang5;
traceB = _root.movie.bullet1;
if (Orang1.body.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.posisi = "headshoot";
Orang1.stop();
Orang1.body.gotoAndPlay(Orang1.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang1.body.bodysensor.hitTest(traceB.sensor)) {
Orang1.posisi = "run";
Orang1.body.gotoAndPlay(Orang1.posisi);
traceB.removeMovieClip();
}
if (Orang2.body.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.posisi = "headshoot";
Orang2.stop();
Orang2.body.gotoAndPlay(Orang2.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang2.body.bodysensor.hitTest(traceB.sensor)) {
Orang2.posisi = "run";
Orang2.body.gotoAndPlay(Orang2.posisi);
traceB.removeMovieClip();
}
if (Orang3.body.sensor.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.posisi = "headshoot";
Orang3.stop();
Orang3.body.gotoAndPlay(Orang3.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang3.body.bodysensor.hitTest(traceB.sensor)) {
Orang3.posisi = "run";
Orang3.body.gotoAndPlay(Orang3.posisi);
traceB.removeMovieClip();
}
if (Orang4.body.sensor.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.posisi = "headshoot";
Orang4.stop();
Orang4.body.gotoAndPlay(Orang4.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
if (Orang4.body.bodysensor.hitTest(traceB.sensor)) {
Orang4.posisi = "run";
Orang4.body.gotoAndPlay(Orang4.posisi);
traceB.removeMovieClip();
}
if (Orang5.body.sensor.hitTest(traceB.sensor) && (!Orang5.mati)) {
Orang5.posisi = "headshoot";
Orang5.stop();
Orang5.body.gotoAndPlay(Orang5.posisi);
lvl4_win = true;
traceB.removeMovieClip();
Orang5.mati = true;
}
if (Orang5.body.bodysensor.hitTest(traceB.sensor)) {
Orang5.posisi = "run";
Orang5.body.gotoAndPlay(Orang5.posisi);
traceB.removeMovieClip();
}
};
break;
case 6 :
_root.attachMovie("mission6_mc", "movie", 50, {_x:356, _y:224});
movie.mulai = true;
movie.orang1.stop();
movie.orang1.posisi = "walk";
movie.orang1.mati = false;
movie.orang2.stop();
movie.orang2.posisi = "walk";
movie.orang2.mati = false;
movie.orang3.stop();
movie.orang3.posisi = "walk";
movie.orang3.mati = false;
movie.object1.stop();
movie.object1.body.orang1.mati = false;
movie.object2.stop();
movie.object2.body.orang1.mati = false;
movie.object3.stop();
movie.object3.body.orang1.mati = false;
movie.object4.stop();
movie.object4.body.orang1.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
movie.orang1.play();
movie.orang2.play();
movie.orang3.play();
movie.object1.play();
movie.object2.play();
movie.object3.play();
movie.object4.play();
this.mulai = false;
}
Orang1 = movie.orang1;
Orang2 = movie.orang2;
Orang3 = movie.orang3;
Orang4 = movie.object1.body.orang1;
Orang5 = movie.object2.body.orang1;
Orang6 = movie.object3.body.orang1;
Orang7 = movie.object4.body.orang1;
traceB = _root.movie.bullet1;
if (Orang1.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.gotoAndPlay("headshoot");
lvl4_win = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang2.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.gotoAndPlay("headshoot");
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang3.sensor.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.gotoAndPlay("headshoot");
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang4.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
if (Orang5.hitTest(traceB.sensor) && (!Orang5.mati)) {
Orang5.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang5.mati = true;
}
if (Orang6.hitTest(traceB.sensor) && (!Orang6.mati)) {
Orang6.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang6.mati = true;
}
if (Orang7.hitTest(traceB.sensor) && (!Orang7.mati)) {
Orang7.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang7.mati = true;
}
};
break;
case 8 :
_root.attachMovie("mission8_mc", "movie", 50, {_x:261, _y:172});
movie.mulai = true;
movie.mobil1.stop();
movie.mobil1.body.orang1.mati = false;
movie.mobil1.body.orang2.mati = false;
movie.mobil2.stop();
movie.mobil2.body.orang1.mati = false;
movie.mobil2.body.orang2.mati = false;
movie.mobil3.stop();
movie.mobil3.body.orang1.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
movie.mobil1.play();
movie.mobil2.play();
movie.mobil3.play();
this.mulai = false;
}
Orang1 = movie.mobil1.body.orang1;
Orang2 = movie.mobil1.body.orang2;
Orang3 = movie.mobil2.body.orang1;
Orang4 = movie.mobil2.body.orang2;
Orang5 = movie.mobil3.body.orang1;
traceB = _root.movie.bullet1;
if (Orang1.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang2.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang3.sensor.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang4.sensor.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
if (Orang5.sensor.hitTest(traceB.sensor) && (!Orang5.mati)) {
Orang5.gotoAndPlay(2);
lvl4_win = true;
traceB.removeMovieClip();
Orang5.mati = true;
}
};
break;
case 9 :
_root.attachMovie("mission9_mc", "movie", 50, {_x:287, _y:285});
movie.mulai = true;
movie.orang1.stop();
movie.orang1.posisi = "walk";
movie.orang1.mati = false;
movie.orang2.stop();
movie.onEnterFrame = function () {
if (this.mulai) {
movie.orang1.play();
movie.orang2.play();
}
Orang1 = movie.orang1;
Orang2 = movie.orang2;
traceB = _root.movie.bullet1;
if (Orang1.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.gotoAndPlay("headshoot");
lvl4_win = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang2.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.gotoAndPlay("headshoot");
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
};
}
_root.attachMovie("boxLogo", "boxLogo", 520, {_x:545, _y:25});
movie.attachMovie("aim", "aim", 500, {_x:350, _y:450});
movie.aim._width = movie.aim._width * 1.2;
movie.aim._height = movie.aim._height * 1.2;
_root.attachMovie("info", "info", 510, {_x:70.85, _y:453.7});
}
function showText() {
_root.attachMovie("textShow", "textShow", 530, {_x:6, _y:3});
}
function showSummary(earn, bonus, faiuler) {
boxLogo.removeMovieClip();
textShow.removeMovieClip();
Mouse.show();
clearInterval(intID);
_root.fxSound.stop;
_root.BagMusic.stop;
_root.soundB.stop;
inGame = false;
movie.removeMovieClip();
info.removeMovieClip();
_root.attachMovie("summary_mc", "summary", 800, {_x:322.3, _y:235.7});
summary.lvl_txt.text = Level;
summary.earn_txt.text = earn;
bns = 250 * bonus;
flr = 0;
summary.bonus_txt.text = bns;
summary.faiuler_txt.text = flr;
totalEarn = (earn + bns) - flr;
summary.total_txt.text = totalEarn;
summary.money = summary.money + totalEarn;
money = money + totalEarn;
TotalEarn = TotalEarn + totalEarn;
summary.ok_btn.onPress = function () {
summary.removeMovieClip();
boxLogo.removeMovieClip();
if (Level < 9) {
_root.gotoAndStop("levelOK");
} else {
headshoot = headshoot + 1;
_root.gotoAndStop("finishGame");
}
};
}
function finishWOI() {
switch (Level) {
case 1 :
price = 2600;
break;
case 2 :
price = 2850;
break;
case 3 :
price = 3200;
break;
case 4 :
price = 3550;
break;
case 5 :
price = 4100;
break;
case 6 :
price = 4350;
break;
case 7 :
price = 4900;
break;
case 8 :
price = 5300;
break;
case 9 :
price = 5500;
}
showSummary(price, 1);
delayDie = 0;
deleteFrame();
}
function kalahWOI() {
delayDie = 0;
showSummary2(0, 0, 1);
}
function showSummary2(earn, bonus, faiuler) {
boxLogo.removeMovieClip();
textShow.removeMovieClip();
inGame = false;
clearInterval(intID);
_root.movie.removeMovieClip();
info.removeMovieClip();
_root.fxSound.stop;
_root.BagMusic.stop;
_root.soundB.stop;
_root.attachMovie("summary_mc", "summary", 800, {_x:322.3, _y:235.7});
Mouse.show();
summary.lvl_txt.text = Level;
summary.earn_txt.text = earn;
bns = 250 * bonus;
flr = -(250 * faiuler);
summary.bonus_txt.text = bns;
summary.faiuler_txt.text = flr;
totalEarn = (earn + bns) - flr;
summary.total_txt.text = -totalEarn;
summary.money = summary.money + totalEarn;
trace(totalEarn);
money = money - totalEarn;
TotalEarn = TotalEarn + totalEarn;
summary.ok_btn.onPress = function () {
summary.removeMovieClip();
boxLogo.removeMovieClip();
_root.gotoAndStop("levelNO");
};
}
function cekDie() {
if (lvl4_win) {
delayDie = delayDie + 0.1;
if (delayDie >= 4) {
_root.fxSound.stop;
_root.BagMusic.stop;
_root.soundB.stop;
complete_snd.gotoAndPlay(2);
finishWOI();
delayDie = 0;
lvl4_win = false;
}
}
if (lvl4_lose) {
delayDie = delayDie + 0.1;
if (delayDie >= 4) {
failed_snd.gotoAndPlay(2);
kalahWOI();
delayDie = 0;
lvl4_lose = false;
}
}
}
function setSenjata() {
if (jenisPeluru == "pendek") {
info.ammo.text = ammo1;
}
switch (jenisSenjata) {
case "awp1" :
accuracy = 0.05;
break;
case "awp2" :
accuracy = 0.05;
break;
case "awp3" :
accuracy = 0.06;
break;
case "awp4" :
accuracy = 0.07;
break;
case "awp5" :
accuracy = 0.08;
}
trace(jenisScope);
switch (jenisScope) {
case "scope1" :
movie.aim.scope.gotoAndStop(1);
zoom = 1;
return;
case "scope2" :
movie.aim.scope.gotoAndStop(2);
zoom = 2;
return;
case "scope3" :
movie.aim.scope.gotoAndStop(3);
zoom = 3;
}
}
function startGame() {
onMouseDown = shot;
setSenjata();
}
function checkPeluru() {
if (jenisPeluru == "pendek") {
if (ammo1 < 1) {
_root.attachMovie("ammo_empty", "ammo_empty", 550, {_x:320, _y:250});
delayCek = delayCek + 0.1;
if (delayCek >= 10) {
delayCek = 0;
_root.failed_snd.gotoAndPlay(2);
kalahWOI();
}
}
} else if (jenisPeluru == "panjang") {
if (ammo2 < 1) {
trace("ammo2 empty");
}
}
}
function shot() {
if (shotok && (inGame)) {
if ((jenisPeluru == "pendek") & (ammo1 > 0)) {
ammo1 = ammo1 - 1;
info.ammo.text = ammo1;
shootOut();
} else if ((jenisPeluru == "panjang") & (ammo2 > 0)) {
ammo2 = ammo2 - 1;
info.ammo.text = ammo2;
shootOut();
}
}
}
function shootOut() {
if (noBullet >= 5) {
noBullet = 0;
}
noBullet = noBullet + 1;
_root.gun.gotoAndPlay(jenisSenjata);
movie.aim.gotoAndPlay(jenisSenjata);
tracex = movie.aim._x;
tracey = movie.aim._y;
tampung = _root.movie.attachMovie("bullet_hole", "bullet1", 100 + noBullet, {_x:tracex, _y:tracey});
tampung.dly = 3;
tampung.onEnterFrame = function () {
if (this.dly > 0) {
this.dly = this.dly - 0.3;
}
if (this.dly <= 1) {
this.removeMovieClip();
}
};
shotok = false;
}
function aimBrain() {
checkPeluru();
if ((zoom == 2) && (checkZoom)) {
movie.aim._width = movie.aim._width * 1.1;
movie.aim._height = movie.aim._height * 1.1;
checkZoom = false;
} else if ((zoom == 3) && (checkZoom)) {
movie.aim._width = movie.aim._width * 1.3;
movie.aim._height = movie.aim._height * 1.3;
checkZoom = false;
}
if (!otherObject) {
delayOB = delayOB + 0.1;
if (delayOB > 1) {
delayOB = 0;
otherObject = true;
}
}
shakeDelay = shakeDelay + 0.01;
if ((shakeDelay > 1) or (shakeDelay > 0.2)) {
shake = true;
if (numberRandom == 2) {
bug1 = bug1 + 1.4;
bug2 = bug2 + 1.4;
} else if (numberRandom == 1) {
bug1 = bug1 - 1.4;
bug2 = bug2 - 1.4;
}
}
if (shakeDelay > 1.5) {
shakeDelay = 0;
shake = false;
bug1 = 0;
bug2 = 0;
}
if (shake) {
numberRandom = random(4);
}
Mouse.hide();
var _local1 = accuracy;
if (balance) {
bug1 = bug1 / 2;
bug2 = bug2 / 2;
}
movie.aim._x = movie.aim._x + (((movie._xmouse - movie.aim._x) + bug1) * _local1);
movie.aim._y = movie.aim._y + (((movie._ymouse - movie.aim._y) + bug2) * _local1);
}
function mainLoop() {
if (inGame) {
aimBrain();
cekDie();
}
}
_root.soundBackground("wind");
_root.playMusic("backGround");
setLevel();
shotok = true;
noBullet = 0;
zooming = false;
bug1 = 0;
bug2 = 0;
shake = false;
shakeDelay = 0;
numberRandom = 0;
checkZoom = true;
delayOB = 0;
startGame();
delayDie = 0;
inGame = true;
otherObject = true;
missObject = 0;
lvl4_win = false;
lvl4_lose = false;
delayCek = 0;
checkZoom = true;
intID = setInterval(mainLoop, 30);
Frame 21
function kalahWOI() {
_root.failed_snd.gotoAndPlay(2);
contain.body.stop();
delayDie = 0;
deleteFrame();
showSummary2(0, 0, 1);
Mouse.show();
}
function showSummary2(earn, bonus, faiuler) {
inGame = false;
boxLogo.removeMovieClip();
_root.attachMovie("summary_mc", "summary", 800, {_x:322.3, _y:235.7});
Mouse.show();
summary.lvl_txt.text = Level;
summary.earn_txt.text = earn;
bns = 250 * bonus;
flr = -(250 * faiuler);
summary.bonus_txt.text = bns;
summary.faiuler_txt.text = flr;
totalEarn = (earn + bns) - flr;
summary.total_txt.text = -totalEarn;
summary.money = summary.money + totalEarn;
trace(totalEarn);
money = money - totalEarn;
TotalEarn = TotalEarn + totalEarn;
summary.ok_btn.onPress = function () {
summary.removeMovieClip();
_root.gotoAndStop("levelNO");
};
}
function cekDie() {
if ((orang2.die && (orang4.bodyGuard)) or (orang2.die && (orang1.bodyGuard))) {
delayDie = delayDie + 0.1;
if (delayDie >= 5) {
kalahWOI();
delayDie = 0;
}
}
if (orang4.die && (cekOunce)) {
orang2.posisi = "run";
orang1.posisi = "run";
orang2.gotoAndPlay(orang2.posisi);
orang1.body.gotoAndPlay(orang1.posisi);
cekOunce = false;
}
if (orang1.die && (cekOunce)) {
orang4.posisi = "run";
orang4.body.gotoAndPlay(orang4.posisi);
orang2.posisi = "run";
orang2.gotoAndPlay(orang2.posisi);
cekOunce = false;
}
if (orang2.die && (!orang1.bodyGuard)) {
if (!orang4.bodyGuard) {
delayDie = delayDie + 0.1;
if (delayDie >= 5) {
finishWOI();
}
}
}
if (orang3.die) {
delayDie = delayDie + 0.1;
if (delayDie >= 5) {
kalahWOI();
delayDie = 0;
}
}
}
function deleteFrame() {
object1.removeMovieClip();
object2.removeMovieClip();
aim.removeMovieClip();
info.removeMovieClip();
Mouse.show();
inGame = false;
ox = 0;
while (ox < 21) {
bul = _root["bullet" + ox];
bul.removeMovieClip();
ox++;
}
ix = 0;
while (ix < 20) {
org = _root["orang" + ix];
org.removeMovieClip();
ix++;
}
clearInterval(intID);
}
function aimBrain() {
checkPeluru();
if ((zoom == 2) && (checkZoom)) {
movie.aim._width = movie.aim._width * 1.1;
movie.aim._height = movie.aim._height * 1.1;
checkZoom = false;
} else if ((zoom == 3) && (checkZoom)) {
movie.aim._width = movie.aim._width * 1.3;
movie.aim._height = movie.aim._height * 1.3;
checkZoom = false;
}
if (!otherObject) {
delayOB = delayOB + 0.1;
if (delayOB > 1) {
delayOB = 0;
otherObject = true;
}
}
shakeDelay = shakeDelay + 0.01;
if ((shakeDelay > 1) or (shakeDelay > 0.2)) {
shake = true;
if (numberRandom == 2) {
bug1 = bug1 + 1.4;
bug2 = bug2 + 1.4;
} else if (numberRandom == 1) {
bug1 = bug1 - 1.4;
bug2 = bug2 - 1.4;
}
}
if (shakeDelay > 1.5) {
shakeDelay = 0;
shake = false;
bug1 = 0;
bug2 = 0;
}
if (shake) {
numberRandom = random(4);
}
Mouse.hide();
var _local2 = accuracy;
if (balance) {
bug1 = bug1 / 2;
bug2 = bug2 / 2;
}
aim._x = aim._x + (((_root._xmouse - aim._x) + bug1) * _local2);
aim._y = aim._y + (((_root._ymouse - aim._y) + bug2) * _local2);
}
function setSenjata() {
if (jenisPeluru == "pendek") {
info.ammo.text = ammo1;
} else {
info.ammo.text = ammo2;
}
switch (jenisSenjata) {
case "awp1" :
accuracy = 0.05;
break;
case "awp2" :
accuracy = 0.05;
break;
case "awp3" :
accuracy = 0.06;
break;
case "awp4" :
accuracy = 0.07;
break;
case "awp5" :
accuracy = 0.08;
}
switch (jenisScope) {
case "scope1" :
aim.scope.gotoAndStop(1);
zoom = 1;
return;
case "scope2" :
aim.scope.gotoAndStop(2);
zoom = 2;
return;
case "scope3" :
aim.scope.gotoAndStop(3);
zoom = 3;
}
}
function startGame() {
onMouseDown = shot;
setSenjata();
}
function shot() {
if (shotok && (inGame)) {
if ((jenisPeluru == "pendek") & (ammo1 > 0)) {
ammo1 = ammo1 - 1;
info.ammo.text = ammo1;
shootOut();
} else if ((jenisPeluru == "panjang") & (ammo2 > 0)) {
ammo2 = ammo2 - 1;
info.ammo.text = ammo2;
shootOut();
}
}
}
function shootOut() {
if (noBullet >= 20) {
noBullet = 0;
}
noBullet = noBullet + 1;
_root.gun.gotoAndPlay(jenisSenjata);
_root.aim.gotoAndPlay(jenisSenjata);
tracex = _root.aim._x;
tracey = _root.aim._y;
px = 0;
while (px < 10) {
traceObject = object1.body["orang" + px];
traceObject2 = object2.body["orang" + px];
traceObject3 = object3.body["orang" + px];
traceObject4 = object4.body["orang" + px];
traceObject10 = object10.body["orang" + px];
traceObject5 = contain["orang" + px];
traceObject6 = contain.body["orang" + px];
traceObject7 = contain.body.heli["orang" + px];
if (traceObject7.hitTest(tracex, tracey, true)) {
traceObject7.gotoAndPlay(2);
traceObject7.die = true;
}
if (traceObject6.hitTest(tracex, tracey, true)) {
contain.body.stop();
traceObject6.gotoAndPlay("headshoot");
traceObject6.die = true;
}
if (traceObject5.hitTest(tracex, tracey, true)) {
traceObject5.body.gotoAndPlay("headshoot");
traceObject5.stop();
traceObject5.bodyGuard = false;
traceObject5.die = true;
}
px++;
}
shotok = false;
}
function checkPeluru() {
if (jenisPeluru == "pendek") {
if (ammo1 < 1) {
_root.attachMovie("ammo_empty", "ammo_empty", 550, {_x:370, _y:250});
delayCek = delayCek + 0.1;
if (delayCek >= 10) {
delayCek = 0;
kalahWOI();
}
}
} else if (jenisPeluru == "panjang") {
if (ammo2 < 1) {
trace("ammo2 empty");
}
}
}
function mainLoop() {
if (inGame) {
aimBrain();
cekDie();
}
}
function finishWOI() {
switch (Level) {
case 1 :
price = 2600;
break;
case 2 :
price = 2850;
break;
case 3 :
price = 3200;
break;
case 4 :
price = 3550;
break;
case 5 :
price = 4100;
break;
case 6 :
price = 4350;
break;
case 7 :
price = 4900;
break;
case 8 :
price = 5300;
break;
case 9 :
price = 5500;
}
showSummary(price, 1, missObject);
delayDie = 0;
deleteFrame();
}
function showSummary(earn, bonus, faiuler) {
boxLogo.removeMovieClip();
Mouse.show();
_root.fxSound.stop();
_root.attachMovie("summary_mc", "summary", 800, {_x:322.3, _y:235.7});
complete_snd.gotoAndPlay(2);
summary.lvl_txt.text = Level;
summary.earn_txt.text = earn;
bns = 250 * bonus;
flr = 0;
summary.bonus_txt.text = bns;
summary.faiuler_txt.text = flr;
totalEarn = (earn + bns) - flr;
summary.total_txt.text = totalEarn;
summary.money = summary.money + totalEarn;
money = money + totalEarn;
TotalEarn = TotalEarn + totalEarn;
summary.ok_btn.onPress = function () {
summary.removeMovieClip();
_root.gotoAndStop("levelOK");
};
}
_root.soundBackground("wind");
_root.soundBackground("copter");
_root.playMusic("backGround");
_root.attachMovie("aim", "aim", 500, {_x:350, _y:450});
_root.attachMovie("boxLogo", "boxLogo", 520, {_x:545, _y:25});
aim._width = aim._width * 1.5;
aim._height = aim._height * 1.5;
_root.attachMovie("info", "info", 510, {_x:70.85, _y:453.7});
orang1 = contain.orang1;
orang1.posisi = "guard";
orang1.die = false;
orang1.targetS = true;
orang1.bodyGuard = true;
orang2 = contain.body.orang1;
orang2.posisi = "target";
orang2.die = false;
orang2.targetB = true;
orang3 = contain.body.heli.orang1;
orang3.posisi = "target";
orang3.die = false;
orang4 = contain.orang4;
orang4.posisi = "guard";
orang4.die = false;
orang4.targetS = true;
orang4.bodyGuard = true;
ix = 1;
while (ix < 5) {
_root.createEmptyMovieClip("shadow" + ix, 300 + ix);
_root["orang" + ix].swapDepths(_root["shadow" + ix]);
ix++;
}
cekOunce = true;
shotok = true;
noBullet = 0;
zooming = false;
bug1 = 0;
bug2 = 0;
shake = false;
shakeDelay = 0;
numberRandom = 0;
checkZoom = true;
delayOB = 0;
startGame();
delayDie = 0;
inGame = true;
otherObject = true;
checkZoom = true;
delayCek = 0;
intID = setInterval(mainLoop, 30);
Frame 22
function setLevel() {
switch (Level) {
case 1 :
_root.attachMovie("mission1_mc", "movie", 50, {_x:427, _y:198});
movie.mulai = true;
movie.orang1.stop();
movie.orang1.posisi = "walk";
movie.orang1.mati = false;
movie.orang2.stop();
movie.orang2.posisi = "walk";
movie.orang2.mati = false;
movie.orang3.stop();
movie.orang3.posisi = "walk";
movie.orang3.mati = false;
movie.orang4.stop();
movie.orang4.posisi = "walk";
movie.orang4.mati = false;
movie.orang5.stop();
movie.orang5.posisi = "target";
movie.orang5.mati = false;
movie.mobil1.stop();
movie.mobil1.body.orang1.mati = false;
movie.mobil1.body.orang2.mati = false;
movie.mobil2.stop();
movie.mobil2.body.orang1.mati = false;
movie.mobil2.body.orang2.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
movie.orang1.play();
movie.orang2.play();
movie.orang3.play();
movie.orang4.play();
movie.orang5.play();
movie.mobil1.play();
movie.mobil2.play();
this.mulai = false;
}
Orang1 = movie.orang1;
Orang2 = movie.orang2;
Orang3 = movie.orang3;
Orang4 = movie.orang4;
Orang5 = movie.orang5;
Orang6 = movie.mobil1.body.orang1;
Orang7 = movie.mobil2.body.orang1;
Orang8 = movie.mobil2.body.orang2;
traceB = _root.movie.bullet1;
if (Orang1.body.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.posisi = "headshoot";
Orang1.stop();
Orang1.body.gotoAndPlay(Orang1.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang1.body.bodysensor.hitTest(traceB.sensor)) {
Orang1.posisi = "run";
Orang1.body.gotoAndPlay(Orang1.posisi);
traceB.removeMovieClip();
}
if (Orang2.body.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.posisi = "headshoot";
Orang2.stop();
Orang2.body.gotoAndPlay(Orang2.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang2.body.bodysensor.hitTest(traceB.sensor)) {
Orang2.posisi = "run";
Orang2.body.gotoAndPlay(Orang2.posisi);
traceB.removeMovieClip();
}
if (Orang3.body.sensor.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.posisi = "headshoot";
Orang3.stop();
Orang3.body.gotoAndPlay(Orang3.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang3.body.bodysensor.hitTest(traceB.sensor)) {
Orang3.posisi = "run";
Orang3.body.gotoAndPlay(Orang3.posisi);
traceB.removeMovieClip();
}
if (Orang4.body.sensor.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.posisi = "headshoot";
Orang4.stop();
Orang4.body.gotoAndPlay(Orang4.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
if (Orang4.body.bodysensor.hitTest(traceB.sensor)) {
Orang4.posisi = "run";
Orang4.body.gotoAndPlay(Orang4.posisi);
traceB.removeMovieClip();
}
if (Orang5.body.sensor.hitTest(traceB.sensor) && (!Orang5.mati)) {
Orang5.posisi = "headshoot";
Orang5.stop();
Orang5.body.gotoAndPlay(Orang5.posisi);
lvl4_win = true;
traceB.removeMovieClip();
Orang5.mati = true;
}
if (Orang5.body.bodysensor.hitTest(traceB.sensor)) {
Orang5.posisi = "run";
Orang5.body.gotoAndPlay(Orang5.posisi);
traceB.removeMovieClip();
}
if (Orang6.hitTest(traceB.sensor) && (!Orang6.mati)) {
Orang6.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang6.mati = true;
}
if (Orang7.hitTest(traceB.sensor) && (!Orang7.mati)) {
Orang7.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang7.mati = true;
}
if (Orang8.hitTest(traceB.sensor) && (!Orang8.mati)) {
Orang8.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang8.mati = true;
}
};
break;
case 2 :
_root.attachMovie("mission2_mc", "movie", 50, {_x:349.15, _y:226});
movie.mulai = true;
movie.orang1.stop();
movie.orang1.posisi = "walk";
movie.orang1.mati = false;
movie.orang2.stop();
movie.orang2.posisi = "target";
movie.orang2.mati = false;
movie.orang3.stop();
movie.orang3.posisi = "walk";
movie.orang3.mati = false;
movie.orang4.stop();
movie.orang4.posisi = "target";
movie.orang4.mati = false;
movie.orang11.stop();
movie.orang11.mati = false;
movie.orang12.stop();
movie.orang12.mati = false;
movie.orang13.stop();
movie.orang13.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
movie.orang1.play();
movie.orang2.play();
movie.orang3.play();
movie.orang4.play();
movie.orang11.play();
movie.orang12.play();
movie.orang13.play();
this.mulai = false;
}
Orang1 = movie.orang1;
Orang2 = movie.orang2;
Orang3 = movie.orang3;
Orang4 = movie.orang4;
Orang11 = movie.orang11;
Orang12 = movie.orang12;
Orang13 = movie.orang13;
traceB = _root.movie.bullet1;
if (Orang11.sensor.hitTest(traceB.sensor) && (!Orang11.mati)) {
Orang11.gotoAndPlay("headshoot");
lvl4_win = true;
traceB.removeMovieClip();
Orang11.mati = true;
}
if (Orang12.sensor.hitTest(traceB.sensor) && (!Orang12.mati)) {
Orang12.gotoAndPlay("headshoot");
lvl4_lose = true;
traceB.removeMovieClip();
Orang12.mati = true;
}
if (Orang13.sensor.hitTest(traceB.sensor) && (!Orang13.mati)) {
Orang13.gotoAndPlay("headshoot");
lvl4_lose = true;
traceB.removeMovieClip();
Orang13.mati = true;
}
if (Orang1.body.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.posisi = "headshoot";
Orang1.stop();
Orang1.body.gotoAndPlay(Orang1.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang1.body.bodysensor.hitTest(traceB.sensor)) {
Orang1.posisi = "run";
Orang1.body.gotoAndPlay(Orang1.posisi);
traceB.removeMovieClip();
}
if (Orang2.body.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.posisi = "headshoot";
Orang2.stop();
Orang2.body.gotoAndPlay(Orang2.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang2.body.bodysensor.hitTest(traceB.sensor)) {
Orang2.posisi = "run";
Orang2.body.gotoAndPlay(Orang2.posisi);
traceB.removeMovieClip();
}
if (Orang3.body.sensor.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.posisi = "headshoot";
Orang3.stop();
Orang3.body.gotoAndPlay(Orang3.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang3.body.bodysensor.hitTest(traceB.sensor)) {
Orang3.posisi = "run";
Orang3.body.gotoAndPlay(Orang3.posisi);
traceB.removeMovieClip();
}
if (Orang4.body.sensor.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.posisi = "headshoot";
Orang4.stop();
Orang4.body.gotoAndPlay(Orang4.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
if (Orang4.body.bodysensor.hitTest(traceB.sensor)) {
Orang4.posisi = "run";
Orang4.body.gotoAndPlay(Orang4.posisi);
traceB.removeMovieClip();
}
};
break;
case 3 :
_root.attachMovie("mission3_mc", "movie", 50, {_x:119, _y:213});
movie.mulai = true;
movie.orang1.stop();
movie.orang1.posisi = "walk";
movie.orang1.mati = false;
movie.orang2.stop();
movie.orang2.posisi = "walk";
movie.orang2.mati = false;
movie.orang3.stop();
movie.orang3.posisi = "walk";
movie.orang3.mati = false;
movie.orang4.stop();
movie.orang4.posisi = "walk";
movie.orang4.mati = false;
movie.orang5.stop();
movie.orang5.posisi = "target";
movie.orang5.mati = false;
movie.mobil1.stop();
movie.mobil1.body.orang1.mati = false;
movie.mobil1.body.orang2.mati = false;
movie.mobil2.stop();
movie.mobil2.body.orang1.mati = false;
movie.mobil2.body.orang2.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
movie.orang1.play();
movie.orang2.play();
movie.orang3.play();
movie.orang4.play();
movie.orang5.play();
movie.mobil1.play();
movie.mobil2.play();
this.mulai = false;
}
Orang1 = movie.orang1;
Orang2 = movie.orang2;
Orang3 = movie.orang3;
Orang4 = movie.orang4;
Orang5 = movie.orang5;
Orang6 = movie.mobil1.body.orang1;
Orang9 = movie.mobil1.body.orang2;
Orang7 = movie.mobil2.body.orang1;
Orang8 = movie.mobil2.body.orang2;
traceB = _root.movie.bullet1;
if (Orang1.body.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.posisi = "headshoot";
Orang1.stop();
Orang1.body.gotoAndPlay(Orang1.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang1.body.bodysensor.hitTest(traceB.sensor)) {
Orang1.posisi = "run";
Orang1.body.gotoAndPlay(Orang1.posisi);
traceB.removeMovieClip();
}
if (Orang2.body.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.posisi = "headshoot";
Orang2.stop();
Orang2.body.gotoAndPlay(Orang2.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang2.body.bodysensor.hitTest(traceB.sensor)) {
Orang2.posisi = "run";
Orang2.body.gotoAndPlay(Orang2.posisi);
traceB.removeMovieClip();
}
if (Orang3.body.sensor.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.posisi = "headshoot";
Orang3.stop();
Orang3.body.gotoAndPlay(Orang3.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang3.body.bodysensor.hitTest(traceB.sensor)) {
Orang3.posisi = "run";
Orang3.body.gotoAndPlay(Orang3.posisi);
traceB.removeMovieClip();
}
if (Orang4.body.sensor.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.posisi = "headshoot";
Orang4.stop();
Orang4.body.gotoAndPlay(Orang4.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
if (Orang4.body.bodysensor.hitTest(traceB.sensor)) {
Orang4.posisi = "run";
Orang4.body.gotoAndPlay(Orang4.posisi);
traceB.removeMovieClip();
}
if (Orang5.body.sensor.hitTest(traceB.sensor) && (!Orang5.mati)) {
Orang5.posisi = "headshoottarget";
Orang5.stop();
Orang5.body.gotoAndPlay(Orang5.posisi);
lvl4_win = true;
traceB.removeMovieClip();
Orang5.mati = true;
}
if (Orang5.body.bodysensor.hitTest(traceB.sensor)) {
Orang5.posisi = "run";
Orang5.body.gotoAndPlay(Orang5.posisi);
traceB.removeMovieClip();
}
if (Orang6.hitTest(traceB.sensor) && (!Orang6.mati)) {
Orang6.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang6.mati = true;
}
if (Orang7.hitTest(traceB.sensor) && (!Orang7.mati)) {
Orang7.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang7.mati = true;
}
if (Orang8.hitTest(traceB.sensor) && (!Orang8.mati)) {
Orang8.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang8.mati = true;
}
if (Orang9.hitTest(traceB.sensor) && (!Orang9.mati)) {
Orang9.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang9.mati = true;
}
};
break;
case 4 :
_root.attachMovie("mission4_mc", "movie", 50, {_x:415, _y:240});
movie.mulai = true;
object10.stop;
object10.body.mati = false;
object11.stop;
object11.body.mati = false;
object12.stop;
object12.body.mati = false;
object13.stop;
object13.body.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
object10.play();
object11.play();
object12.play();
object13.play();
}
Orang1 = movie.object10.body.orang1;
Orang2 = movie.object11.body.orang1;
Orang3 = movie.object12.body.orang1;
Orang4 = movie.object13.body.orang1;
traceB = _root.movie.bullet1;
if (Orang1.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang2.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang3.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang4.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.gotoAndPlay(2);
lvl4_win = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
};
break;
case 5 :
_root.attachMovie("mission5_mc", "movie", 50, {_x:424, _y:280});
movie.mulai = true;
movie.orang1.stop();
movie.orang1.posisi = "walk";
movie.orang1.mati = false;
movie.orang2.stop();
movie.orang2.posisi = "walk";
movie.orang2.mati = false;
movie.orang3.stop();
movie.orang3.posisi = "walk";
movie.orang3.mati = false;
movie.orang4.stop();
movie.orang4.posisi = "walk";
movie.orang4.mati = false;
movie.orang5.stop();
movie.orang5.posisi = "target";
movie.orang5.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
movie.orang1.play();
movie.orang2.play();
movie.orang3.play();
movie.orang4.play();
movie.orang5.play();
movie.mobil1.play();
movie.mobil2.play();
this.mulai = false;
}
Orang1 = movie.orang1;
Orang2 = movie.orang2;
Orang3 = movie.orang3;
Orang4 = movie.orang4;
Orang5 = movie.orang5;
traceB = _root.movie.bullet1;
if (Orang1.body.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.posisi = "headshoot";
Orang1.stop();
Orang1.body.gotoAndPlay(Orang1.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang1.body.bodysensor.hitTest(traceB.sensor)) {
Orang1.posisi = "run";
Orang1.body.gotoAndPlay(Orang1.posisi);
traceB.removeMovieClip();
}
if (Orang2.body.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.posisi = "headshoot";
Orang2.stop();
Orang2.body.gotoAndPlay(Orang2.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang2.body.bodysensor.hitTest(traceB.sensor)) {
Orang2.posisi = "run";
Orang2.body.gotoAndPlay(Orang2.posisi);
traceB.removeMovieClip();
}
if (Orang3.body.sensor.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.posisi = "headshoot";
Orang3.stop();
Orang3.body.gotoAndPlay(Orang3.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang3.body.bodysensor.hitTest(traceB.sensor)) {
Orang3.posisi = "run";
Orang3.body.gotoAndPlay(Orang3.posisi);
traceB.removeMovieClip();
}
if (Orang4.body.sensor.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.posisi = "headshoot";
Orang4.stop();
Orang4.body.gotoAndPlay(Orang4.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
if (Orang4.body.bodysensor.hitTest(traceB.sensor)) {
Orang4.posisi = "run";
Orang4.body.gotoAndPlay(Orang4.posisi);
traceB.removeMovieClip();
}
if (Orang5.body.sensor.hitTest(traceB.sensor) && (!Orang5.mati)) {
Orang5.posisi = "headshoot";
Orang5.stop();
Orang5.body.gotoAndPlay(Orang5.posisi);
lvl4_win = true;
traceB.removeMovieClip();
Orang5.mati = true;
}
if (Orang5.body.bodysensor.hitTest(traceB.sensor)) {
Orang5.posisi = "run";
Orang5.body.gotoAndPlay(Orang5.posisi);
traceB.removeMovieClip();
}
};
break;
case 6 :
_root.attachMovie("mission6_mc", "movie", 50, {_x:356, _y:224});
movie.mulai = true;
movie.orang1.stop();
movie.orang1.posisi = "walk";
movie.orang1.mati = false;
movie.orang2.stop();
movie.orang2.posisi = "walk";
movie.orang2.mati = false;
movie.orang3.stop();
movie.orang3.posisi = "walk";
movie.orang3.mati = false;
movie.object1.stop();
movie.object1.body.orang1.mati = false;
movie.object2.stop();
movie.object2.body.orang1.mati = false;
movie.object3.stop();
movie.object3.body.orang1.mati = false;
movie.object4.stop();
movie.object4.body.orang1.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
movie.orang1.play();
movie.orang2.play();
movie.orang3.play();
movie.object1.play();
movie.object2.play();
movie.object3.play();
movie.object4.play();
this.mulai = false;
}
Orang1 = movie.orang1;
Orang2 = movie.orang2;
Orang3 = movie.orang3;
Orang4 = movie.object1.body.orang1;
Orang5 = movie.object2.body.orang1;
Orang6 = movie.object3.body.orang1;
Orang7 = movie.object4.body.orang1;
traceB = _root.movie.bullet1;
if (Orang1.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.gotoAndPlay("headshoot");
lvl4_win = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang2.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.gotoAndPlay("headshoot");
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang3.sensor.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.gotoAndPlay("headshoot");
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang4.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
if (Orang5.hitTest(traceB.sensor) && (!Orang5.mati)) {
Orang5.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang5.mati = true;
}
if (Orang6.hitTest(traceB.sensor) && (!Orang6.mati)) {
Orang6.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang6.mati = true;
}
if (Orang7.hitTest(traceB.sensor) && (!Orang7.mati)) {
Orang7.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang7.mati = true;
}
};
break;
case 8 :
_root.attachMovie("mission8_mc", "movie", 50, {_x:261, _y:172});
movie.mulai = true;
movie.mobil1.stop();
movie.mobil1.body.orang1.mati = false;
movie.mobil1.body.orang2.mati = false;
movie.mobil2.stop();
movie.mobil2.body.orang1.mati = false;
movie.mobil2.body.orang2.mati = false;
movie.mobil3.stop();
movie.mobil3.body.orang1.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
movie.mobil1.play();
movie.mobil2.play();
movie.mobil3.play();
this.mulai = false;
}
Orang1 = movie.mobil1.body.orang1;
Orang2 = movie.mobil1.body.orang2;
Orang3 = movie.mobil2.body.orang1;
Orang4 = movie.mobil2.body.orang2;
Orang5 = movie.mobil3.body.orang1;
traceB = _root.movie.bullet1;
if (Orang1.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang2.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang3.sensor.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang4.sensor.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
if (Orang5.sensor.hitTest(traceB.sensor) && (!Orang5.mati)) {
Orang5.gotoAndPlay(2);
lvl4_win = true;
traceB.removeMovieClip();
Orang5.mati = true;
}
};
break;
case 9 :
_root.attachMovie("mission9_mc", "movie", 50, {_x:287, _y:285});
movie.mulai = true;
movie.orang1.stop();
movie.orang1.posisi = "walk";
movie.orang1.mati = false;
movie.orang2.stop();
movie.onEnterFrame = function () {
if (this.mulai) {
movie.orang1.play();
movie.orang2.play();
}
Orang1 = movie.orang1;
Orang2 = movie.orang2;
traceB = _root.movie.bullet1;
if (Orang1.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.gotoAndPlay("headshoot");
lvl4_win = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang2.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.gotoAndPlay("headshoot");
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
};
}
_root.attachMovie("boxLogo", "boxLogo", 520, {_x:545, _y:25});
movie.attachMovie("aim", "aim", 500, {_x:350, _y:450});
movie.aim._width = movie.aim._width * 1.2;
movie.aim._height = movie.aim._height * 1.2;
_root.attachMovie("info", "info", 510, {_x:70.85, _y:453.7});
}
function showText() {
_root.attachMovie("textShow", "textShow", 530, {_x:6, _y:3});
}
function showSummary(earn, bonus, faiuler) {
boxLogo.removeMovieClip();
textShow.removeMovieClip();
Mouse.show();
clearInterval(intID);
_root.fxSound.stop;
_root.BagMusic.stop;
_root.soundB.stop;
inGame = false;
movie.removeMovieClip();
info.removeMovieClip();
_root.attachMovie("summary_mc", "summary", 800, {_x:322.3, _y:235.7});
summary.lvl_txt.text = Level;
summary.earn_txt.text = earn;
bns = 250 * bonus;
flr = 0;
summary.bonus_txt.text = bns;
summary.faiuler_txt.text = flr;
totalEarn = (earn + bns) - flr;
summary.total_txt.text = totalEarn;
summary.money = summary.money + totalEarn;
money = money + totalEarn;
TotalEarn = TotalEarn + totalEarn;
summary.ok_btn.onPress = function () {
summary.removeMovieClip();
boxLogo.removeMovieClip();
if (Level < 9) {
_root.gotoAndStop("levelOK");
} else {
headshoot = headshoot + 1;
_root.gotoAndStop("finishGame");
}
};
}
function finishWOI() {
switch (Level) {
case 1 :
price = 2600;
break;
case 2 :
price = 2850;
break;
case 3 :
price = 3200;
break;
case 4 :
price = 3550;
break;
case 5 :
price = 4100;
break;
case 6 :
price = 4350;
break;
case 7 :
price = 4900;
break;
case 8 :
price = 5300;
break;
case 9 :
price = 5500;
}
showSummary(price, 1);
delayDie = 0;
deleteFrame();
}
function kalahWOI() {
delayDie = 0;
showSummary2(0, 0, 1);
}
function showSummary2(earn, bonus, faiuler) {
boxLogo.removeMovieClip();
textShow.removeMovieClip();
inGame = false;
clearInterval(intID);
_root.movie.removeMovieClip();
info.removeMovieClip();
_root.fxSound.stop;
_root.BagMusic.stop;
_root.soundB.stop;
_root.attachMovie("summary_mc", "summary", 800, {_x:322.3, _y:235.7});
Mouse.show();
summary.lvl_txt.text = Level;
summary.earn_txt.text = earn;
bns = 250 * bonus;
flr = -(250 * faiuler);
summary.bonus_txt.text = bns;
summary.faiuler_txt.text = flr;
totalEarn = (earn + bns) - flr;
summary.total_txt.text = -totalEarn;
summary.money = summary.money + totalEarn;
trace(totalEarn);
money = money - totalEarn;
TotalEarn = TotalEarn + totalEarn;
summary.ok_btn.onPress = function () {
summary.removeMovieClip();
boxLogo.removeMovieClip();
_root.gotoAndStop("levelNO");
};
}
function cekDie() {
if (lvl4_win) {
delayDie = delayDie + 0.1;
if (delayDie >= 4) {
_root.fxSound.stop;
_root.BagMusic.stop;
_root.soundB.stop;
complete_snd.gotoAndPlay(2);
finishWOI();
delayDie = 0;
lvl4_win = false;
}
}
if (lvl4_lose) {
delayDie = delayDie + 0.1;
if (delayDie >= 4) {
failed_snd.gotoAndPlay(2);
kalahWOI();
delayDie = 0;
lvl4_lose = false;
}
}
}
function setSenjata() {
if (jenisPeluru == "pendek") {
info.ammo.text = ammo1;
}
switch (jenisSenjata) {
case "awp1" :
accuracy = 0.05;
break;
case "awp2" :
accuracy = 0.05;
break;
case "awp3" :
accuracy = 0.06;
break;
case "awp4" :
accuracy = 0.07;
break;
case "awp5" :
accuracy = 0.08;
}
trace(jenisScope);
switch (jenisScope) {
case "scope1" :
movie.aim.scope.gotoAndStop(1);
zoom = 1;
return;
case "scope2" :
movie.aim.scope.gotoAndStop(2);
zoom = 2;
return;
case "scope3" :
movie.aim.scope.gotoAndStop(3);
zoom = 3;
}
}
function startGame() {
onMouseDown = shot;
setSenjata();
}
function checkPeluru() {
if (jenisPeluru == "pendek") {
if (ammo1 < 1) {
_root.attachMovie("ammo_empty", "ammo_empty", 550, {_x:320, _y:250});
delayCek = delayCek + 0.1;
if (delayCek >= 10) {
delayCek = 0;
_root.failed_snd.gotoAndPlay(2);
kalahWOI();
}
}
} else if (jenisPeluru == "panjang") {
if (ammo2 < 1) {
trace("ammo2 empty");
}
}
}
function shot() {
if (shotok && (inGame)) {
if ((jenisPeluru == "pendek") & (ammo1 > 0)) {
ammo1 = ammo1 - 1;
info.ammo.text = ammo1;
shootOut();
} else if ((jenisPeluru == "panjang") & (ammo2 > 0)) {
ammo2 = ammo2 - 1;
info.ammo.text = ammo2;
shootOut();
}
}
}
function shootOut() {
if (noBullet >= 5) {
noBullet = 0;
}
noBullet = noBullet + 1;
_root.gun.gotoAndPlay(jenisSenjata);
movie.aim.gotoAndPlay(jenisSenjata);
tracex = movie.aim._x;
tracey = movie.aim._y;
tampung = _root.movie.attachMovie("bullet_hole", "bullet1", 100 + noBullet, {_x:tracex, _y:tracey});
tampung.dly = 3;
tampung.onEnterFrame = function () {
if (this.dly > 0) {
this.dly = this.dly - 0.3;
}
if (this.dly <= 1) {
this.removeMovieClip();
}
};
shotok = false;
}
function aimBrain() {
checkPeluru();
if ((zoom == 2) && (checkZoom)) {
movie.aim._width = movie.aim._width * 1.1;
movie.aim._height = movie.aim._height * 1.1;
checkZoom = false;
} else if ((zoom == 3) && (checkZoom)) {
movie.aim._width = movie.aim._width * 1.3;
movie.aim._height = movie.aim._height * 1.3;
checkZoom = false;
}
if (!otherObject) {
delayOB = delayOB + 0.1;
if (delayOB > 1) {
delayOB = 0;
otherObject = true;
}
}
shakeDelay = shakeDelay + 0.01;
if ((shakeDelay > 1) or (shakeDelay > 0.2)) {
shake = true;
if (numberRandom == 2) {
bug1 = bug1 + 1.4;
bug2 = bug2 + 1.4;
} else if (numberRandom == 1) {
bug1 = bug1 - 1.4;
bug2 = bug2 - 1.4;
}
}
if (shakeDelay > 1.5) {
shakeDelay = 0;
shake = false;
bug1 = 0;
bug2 = 0;
}
if (shake) {
numberRandom = random(4);
}
Mouse.hide();
var _local1 = accuracy;
if (balance) {
bug1 = bug1 / 2;
bug2 = bug2 / 2;
}
movie.aim._x = movie.aim._x + (((movie._xmouse - movie.aim._x) + bug1) * _local1);
movie.aim._y = movie.aim._y + (((movie._ymouse - movie.aim._y) + bug2) * _local1);
}
function mainLoop() {
if (inGame) {
aimBrain();
cekDie();
}
}
_root.soundBackground("train");
_root.playMusic("backGround");
_root.createEmptyMovieClip("shadow1", 400);
_root.createEmptyMovieClip("shadow2", 401);
setLevel();
shotok = true;
noBullet = 0;
zooming = false;
bug1 = 0;
bug2 = 0;
shake = false;
shakeDelay = 0;
numberRandom = 0;
checkZoom = true;
delayOB = 0;
startGame();
delayDie = 0;
inGame = true;
otherObject = true;
missObject = 0;
lvl4_win = false;
lvl4_lose = false;
delayCek = 0;
checkZoom = true;
intID = setInterval(mainLoop, 30);
Frame 23
function setLevel() {
switch (Level) {
case 1 :
_root.attachMovie("mission1_mc", "movie", 50, {_x:427, _y:198});
movie.mulai = true;
movie.orang1.stop();
movie.orang1.posisi = "walk";
movie.orang1.mati = false;
movie.orang2.stop();
movie.orang2.posisi = "walk";
movie.orang2.mati = false;
movie.orang3.stop();
movie.orang3.posisi = "walk";
movie.orang3.mati = false;
movie.orang4.stop();
movie.orang4.posisi = "walk";
movie.orang4.mati = false;
movie.orang5.stop();
movie.orang5.posisi = "target";
movie.orang5.mati = false;
movie.mobil1.stop();
movie.mobil1.body.orang1.mati = false;
movie.mobil1.body.orang2.mati = false;
movie.mobil2.stop();
movie.mobil2.body.orang1.mati = false;
movie.mobil2.body.orang2.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
movie.orang1.play();
movie.orang2.play();
movie.orang3.play();
movie.orang4.play();
movie.orang5.play();
movie.mobil1.play();
movie.mobil2.play();
this.mulai = false;
}
Orang1 = movie.orang1;
Orang2 = movie.orang2;
Orang3 = movie.orang3;
Orang4 = movie.orang4;
Orang5 = movie.orang5;
Orang6 = movie.mobil1.body.orang1;
Orang7 = movie.mobil2.body.orang1;
Orang8 = movie.mobil2.body.orang2;
traceB = _root.movie.bullet1;
if (Orang1.body.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.posisi = "headshoot";
Orang1.stop();
Orang1.body.gotoAndPlay(Orang1.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang1.body.bodysensor.hitTest(traceB.sensor)) {
Orang1.posisi = "run";
Orang1.body.gotoAndPlay(Orang1.posisi);
traceB.removeMovieClip();
}
if (Orang2.body.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.posisi = "headshoot";
Orang2.stop();
Orang2.body.gotoAndPlay(Orang2.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang2.body.bodysensor.hitTest(traceB.sensor)) {
Orang2.posisi = "run";
Orang2.body.gotoAndPlay(Orang2.posisi);
traceB.removeMovieClip();
}
if (Orang3.body.sensor.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.posisi = "headshoot";
Orang3.stop();
Orang3.body.gotoAndPlay(Orang3.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang3.body.bodysensor.hitTest(traceB.sensor)) {
Orang3.posisi = "run";
Orang3.body.gotoAndPlay(Orang3.posisi);
traceB.removeMovieClip();
}
if (Orang4.body.sensor.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.posisi = "headshoot";
Orang4.stop();
Orang4.body.gotoAndPlay(Orang4.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
if (Orang4.body.bodysensor.hitTest(traceB.sensor)) {
Orang4.posisi = "run";
Orang4.body.gotoAndPlay(Orang4.posisi);
traceB.removeMovieClip();
}
if (Orang5.body.sensor.hitTest(traceB.sensor) && (!Orang5.mati)) {
Orang5.posisi = "headshoot";
Orang5.stop();
Orang5.body.gotoAndPlay(Orang5.posisi);
lvl4_win = true;
traceB.removeMovieClip();
Orang5.mati = true;
}
if (Orang5.body.bodysensor.hitTest(traceB.sensor)) {
Orang5.posisi = "run";
Orang5.body.gotoAndPlay(Orang5.posisi);
traceB.removeMovieClip();
}
if (Orang6.hitTest(traceB.sensor) && (!Orang6.mati)) {
Orang6.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang6.mati = true;
}
if (Orang7.hitTest(traceB.sensor) && (!Orang7.mati)) {
Orang7.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang7.mati = true;
}
if (Orang8.hitTest(traceB.sensor) && (!Orang8.mati)) {
Orang8.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang8.mati = true;
}
};
break;
case 2 :
_root.attachMovie("mission2_mc", "movie", 50, {_x:349.15, _y:226});
movie.mulai = true;
movie.orang1.stop();
movie.orang1.posisi = "walk";
movie.orang1.mati = false;
movie.orang2.stop();
movie.orang2.posisi = "target";
movie.orang2.mati = false;
movie.orang3.stop();
movie.orang3.posisi = "walk";
movie.orang3.mati = false;
movie.orang4.stop();
movie.orang4.posisi = "target";
movie.orang4.mati = false;
movie.orang11.stop();
movie.orang11.mati = false;
movie.orang12.stop();
movie.orang12.mati = false;
movie.orang13.stop();
movie.orang13.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
movie.orang1.play();
movie.orang2.play();
movie.orang3.play();
movie.orang4.play();
movie.orang11.play();
movie.orang12.play();
movie.orang13.play();
this.mulai = false;
}
Orang1 = movie.orang1;
Orang2 = movie.orang2;
Orang3 = movie.orang3;
Orang4 = movie.orang4;
Orang11 = movie.orang11;
Orang12 = movie.orang12;
Orang13 = movie.orang13;
traceB = _root.movie.bullet1;
if (Orang11.sensor.hitTest(traceB.sensor) && (!Orang11.mati)) {
Orang11.gotoAndPlay("headshoot");
lvl4_win = true;
traceB.removeMovieClip();
Orang11.mati = true;
}
if (Orang12.sensor.hitTest(traceB.sensor) && (!Orang12.mati)) {
Orang12.gotoAndPlay("headshoot");
lvl4_lose = true;
traceB.removeMovieClip();
Orang12.mati = true;
}
if (Orang13.sensor.hitTest(traceB.sensor) && (!Orang13.mati)) {
Orang13.gotoAndPlay("headshoot");
lvl4_lose = true;
traceB.removeMovieClip();
Orang13.mati = true;
}
if (Orang1.body.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.posisi = "headshoot";
Orang1.stop();
Orang1.body.gotoAndPlay(Orang1.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang1.body.bodysensor.hitTest(traceB.sensor)) {
Orang1.posisi = "run";
Orang1.body.gotoAndPlay(Orang1.posisi);
traceB.removeMovieClip();
}
if (Orang2.body.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.posisi = "headshoot";
Orang2.stop();
Orang2.body.gotoAndPlay(Orang2.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang2.body.bodysensor.hitTest(traceB.sensor)) {
Orang2.posisi = "run";
Orang2.body.gotoAndPlay(Orang2.posisi);
traceB.removeMovieClip();
}
if (Orang3.body.sensor.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.posisi = "headshoot";
Orang3.stop();
Orang3.body.gotoAndPlay(Orang3.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang3.body.bodysensor.hitTest(traceB.sensor)) {
Orang3.posisi = "run";
Orang3.body.gotoAndPlay(Orang3.posisi);
traceB.removeMovieClip();
}
if (Orang4.body.sensor.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.posisi = "headshoot";
Orang4.stop();
Orang4.body.gotoAndPlay(Orang4.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
if (Orang4.body.bodysensor.hitTest(traceB.sensor)) {
Orang4.posisi = "run";
Orang4.body.gotoAndPlay(Orang4.posisi);
traceB.removeMovieClip();
}
};
break;
case 3 :
_root.attachMovie("mission3_mc", "movie", 50, {_x:119, _y:213});
movie.mulai = true;
movie.orang1.stop();
movie.orang1.posisi = "walk";
movie.orang1.mati = false;
movie.orang2.stop();
movie.orang2.posisi = "walk";
movie.orang2.mati = false;
movie.orang3.stop();
movie.orang3.posisi = "walk";
movie.orang3.mati = false;
movie.orang4.stop();
movie.orang4.posisi = "walk";
movie.orang4.mati = false;
movie.orang5.stop();
movie.orang5.posisi = "target";
movie.orang5.mati = false;
movie.mobil1.stop();
movie.mobil1.body.orang1.mati = false;
movie.mobil1.body.orang2.mati = false;
movie.mobil2.stop();
movie.mobil2.body.orang1.mati = false;
movie.mobil2.body.orang2.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
movie.orang1.play();
movie.orang2.play();
movie.orang3.play();
movie.orang4.play();
movie.orang5.play();
movie.mobil1.play();
movie.mobil2.play();
this.mulai = false;
}
Orang1 = movie.orang1;
Orang2 = movie.orang2;
Orang3 = movie.orang3;
Orang4 = movie.orang4;
Orang5 = movie.orang5;
Orang6 = movie.mobil1.body.orang1;
Orang9 = movie.mobil1.body.orang2;
Orang7 = movie.mobil2.body.orang1;
Orang8 = movie.mobil2.body.orang2;
traceB = _root.movie.bullet1;
if (Orang1.body.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.posisi = "headshoot";
Orang1.stop();
Orang1.body.gotoAndPlay(Orang1.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang1.body.bodysensor.hitTest(traceB.sensor)) {
Orang1.posisi = "run";
Orang1.body.gotoAndPlay(Orang1.posisi);
traceB.removeMovieClip();
}
if (Orang2.body.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.posisi = "headshoot";
Orang2.stop();
Orang2.body.gotoAndPlay(Orang2.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang2.body.bodysensor.hitTest(traceB.sensor)) {
Orang2.posisi = "run";
Orang2.body.gotoAndPlay(Orang2.posisi);
traceB.removeMovieClip();
}
if (Orang3.body.sensor.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.posisi = "headshoot";
Orang3.stop();
Orang3.body.gotoAndPlay(Orang3.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang3.body.bodysensor.hitTest(traceB.sensor)) {
Orang3.posisi = "run";
Orang3.body.gotoAndPlay(Orang3.posisi);
traceB.removeMovieClip();
}
if (Orang4.body.sensor.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.posisi = "headshoot";
Orang4.stop();
Orang4.body.gotoAndPlay(Orang4.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
if (Orang4.body.bodysensor.hitTest(traceB.sensor)) {
Orang4.posisi = "run";
Orang4.body.gotoAndPlay(Orang4.posisi);
traceB.removeMovieClip();
}
if (Orang5.body.sensor.hitTest(traceB.sensor) && (!Orang5.mati)) {
Orang5.posisi = "headshoottarget";
Orang5.stop();
Orang5.body.gotoAndPlay(Orang5.posisi);
lvl4_win = true;
traceB.removeMovieClip();
Orang5.mati = true;
}
if (Orang5.body.bodysensor.hitTest(traceB.sensor)) {
Orang5.posisi = "run";
Orang5.body.gotoAndPlay(Orang5.posisi);
traceB.removeMovieClip();
}
if (Orang6.hitTest(traceB.sensor) && (!Orang6.mati)) {
Orang6.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang6.mati = true;
}
if (Orang7.hitTest(traceB.sensor) && (!Orang7.mati)) {
Orang7.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang7.mati = true;
}
if (Orang8.hitTest(traceB.sensor) && (!Orang8.mati)) {
Orang8.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang8.mati = true;
}
if (Orang9.hitTest(traceB.sensor) && (!Orang9.mati)) {
Orang9.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang9.mati = true;
}
};
break;
case 4 :
_root.attachMovie("mission4_mc", "movie", 50, {_x:415, _y:240});
movie.mulai = true;
object10.stop;
object10.body.mati = false;
object11.stop;
object11.body.mati = false;
object12.stop;
object12.body.mati = false;
object13.stop;
object13.body.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
object10.play();
object11.play();
object12.play();
object13.play();
}
Orang1 = movie.object10.body.orang1;
Orang2 = movie.object11.body.orang1;
Orang3 = movie.object12.body.orang1;
Orang4 = movie.object13.body.orang1;
traceB = _root.movie.bullet1;
if (Orang1.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang2.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang3.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang4.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.gotoAndPlay(2);
lvl4_win = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
};
break;
case 5 :
_root.attachMovie("mission5_mc", "movie", 50, {_x:424, _y:280});
movie.mulai = true;
movie.orang1.stop();
movie.orang1.posisi = "walk";
movie.orang1.mati = false;
movie.orang2.stop();
movie.orang2.posisi = "walk";
movie.orang2.mati = false;
movie.orang3.stop();
movie.orang3.posisi = "walk";
movie.orang3.mati = false;
movie.orang4.stop();
movie.orang4.posisi = "walk";
movie.orang4.mati = false;
movie.orang5.stop();
movie.orang5.posisi = "target";
movie.orang5.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
movie.orang1.play();
movie.orang2.play();
movie.orang3.play();
movie.orang4.play();
movie.orang5.play();
movie.mobil1.play();
movie.mobil2.play();
this.mulai = false;
}
Orang1 = movie.orang1;
Orang2 = movie.orang2;
Orang3 = movie.orang3;
Orang4 = movie.orang4;
Orang5 = movie.orang5;
traceB = _root.movie.bullet1;
if (Orang1.body.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.posisi = "headshoot";
Orang1.stop();
Orang1.body.gotoAndPlay(Orang1.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang1.body.bodysensor.hitTest(traceB.sensor)) {
Orang1.posisi = "run";
Orang1.body.gotoAndPlay(Orang1.posisi);
traceB.removeMovieClip();
}
if (Orang2.body.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.posisi = "headshoot";
Orang2.stop();
Orang2.body.gotoAndPlay(Orang2.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang2.body.bodysensor.hitTest(traceB.sensor)) {
Orang2.posisi = "run";
Orang2.body.gotoAndPlay(Orang2.posisi);
traceB.removeMovieClip();
}
if (Orang3.body.sensor.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.posisi = "headshoot";
Orang3.stop();
Orang3.body.gotoAndPlay(Orang3.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang3.body.bodysensor.hitTest(traceB.sensor)) {
Orang3.posisi = "run";
Orang3.body.gotoAndPlay(Orang3.posisi);
traceB.removeMovieClip();
}
if (Orang4.body.sensor.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.posisi = "headshoot";
Orang4.stop();
Orang4.body.gotoAndPlay(Orang4.posisi);
lvl4_lose = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
if (Orang4.body.bodysensor.hitTest(traceB.sensor)) {
Orang4.posisi = "run";
Orang4.body.gotoAndPlay(Orang4.posisi);
traceB.removeMovieClip();
}
if (Orang5.body.sensor.hitTest(traceB.sensor) && (!Orang5.mati)) {
Orang5.posisi = "headshoot";
Orang5.stop();
Orang5.body.gotoAndPlay(Orang5.posisi);
lvl4_win = true;
traceB.removeMovieClip();
Orang5.mati = true;
}
if (Orang5.body.bodysensor.hitTest(traceB.sensor)) {
Orang5.posisi = "run";
Orang5.body.gotoAndPlay(Orang5.posisi);
traceB.removeMovieClip();
}
};
break;
case 6 :
_root.attachMovie("mission6_mc", "movie", 50, {_x:356, _y:224});
movie.mulai = true;
movie.orang1.stop();
movie.orang1.posisi = "walk";
movie.orang1.mati = false;
movie.orang2.stop();
movie.orang2.posisi = "walk";
movie.orang2.mati = false;
movie.orang3.stop();
movie.orang3.posisi = "walk";
movie.orang3.mati = false;
movie.object1.stop();
movie.object1.body.orang1.mati = false;
movie.object2.stop();
movie.object2.body.orang1.mati = false;
movie.object3.stop();
movie.object3.body.orang1.mati = false;
movie.object4.stop();
movie.object4.body.orang1.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
movie.orang1.play();
movie.orang2.play();
movie.orang3.play();
movie.object1.play();
movie.object2.play();
movie.object3.play();
movie.object4.play();
this.mulai = false;
}
Orang1 = movie.orang1;
Orang2 = movie.orang2;
Orang3 = movie.orang3;
Orang4 = movie.object1.body.orang1;
Orang5 = movie.object2.body.orang1;
Orang6 = movie.object3.body.orang1;
Orang7 = movie.object4.body.orang1;
traceB = _root.movie.bullet1;
if (Orang1.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.gotoAndPlay("headshoot");
lvl4_win = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang2.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.gotoAndPlay("headshoot");
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang3.sensor.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.gotoAndPlay("headshoot");
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang4.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
if (Orang5.hitTest(traceB.sensor) && (!Orang5.mati)) {
Orang5.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang5.mati = true;
}
if (Orang6.hitTest(traceB.sensor) && (!Orang6.mati)) {
Orang6.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang6.mati = true;
}
if (Orang7.hitTest(traceB.sensor) && (!Orang7.mati)) {
Orang7.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang7.mati = true;
}
};
break;
case 8 :
_root.attachMovie("mission8_mc", "movie", 50, {_x:261, _y:172});
movie.mulai = true;
movie.mobil1.stop();
movie.mobil1.body.orang1.mati = false;
movie.mobil1.body.orang2.mati = false;
movie.mobil2.stop();
movie.mobil2.body.orang1.mati = false;
movie.mobil2.body.orang2.mati = false;
movie.mobil3.stop();
movie.mobil3.body.orang1.mati = false;
movie.onEnterFrame = function () {
if (this.mulai) {
movie.mobil1.play();
movie.mobil2.play();
movie.mobil3.play();
this.mulai = false;
}
Orang1 = movie.mobil1.body.orang1;
Orang2 = movie.mobil1.body.orang2;
Orang3 = movie.mobil2.body.orang1;
Orang4 = movie.mobil2.body.orang2;
Orang5 = movie.mobil3.body.orang1;
traceB = _root.movie.bullet1;
if (Orang1.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang2.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
if (Orang3.sensor.hitTest(traceB.sensor) && (!Orang3.mati)) {
Orang3.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang3.mati = true;
}
if (Orang4.sensor.hitTest(traceB.sensor) && (!Orang4.mati)) {
Orang4.gotoAndPlay(2);
lvl4_lose = true;
traceB.removeMovieClip();
Orang4.mati = true;
}
if (Orang5.sensor.hitTest(traceB.sensor) && (!Orang5.mati)) {
Orang5.gotoAndPlay(2);
lvl4_win = true;
traceB.removeMovieClip();
Orang5.mati = true;
}
};
break;
case 9 :
_root.attachMovie("mission9_mc", "movie", 50, {_x:287, _y:285});
movie.mulai = true;
movie.orang1.stop();
movie.orang1.posisi = "walk";
movie.orang1.mati = false;
movie.orang2.stop();
movie.onEnterFrame = function () {
if (this.mulai) {
movie.orang1.play();
movie.orang2.play();
}
Orang1 = movie.orang1;
Orang2 = movie.orang2;
traceB = _root.movie.bullet1;
if (Orang1.sensor.hitTest(traceB.sensor) && (!Orang1.mati)) {
Orang1.gotoAndPlay("headshoot");
lvl4_win = true;
traceB.removeMovieClip();
Orang1.mati = true;
}
if (Orang2.sensor.hitTest(traceB.sensor) && (!Orang2.mati)) {
Orang2.gotoAndPlay("headshoot");
lvl4_lose = true;
traceB.removeMovieClip();
Orang2.mati = true;
}
};
}
_root.attachMovie("boxLogo", "boxLogo", 520, {_x:545, _y:25});
movie.attachMovie("aim", "aim", 500, {_x:350, _y:450});
movie.aim._width = movie.aim._width * 1.2;
movie.aim._height = movie.aim._height * 1.2;
_root.attachMovie("info", "info", 510, {_x:70.85, _y:453.7});
}
function showText() {
_root.attachMovie("textShow", "textShow", 530, {_x:6, _y:3});
}
function showSummary(earn, bonus, faiuler) {
boxLogo.removeMovieClip();
textShow.removeMovieClip();
Mouse.show();
clearInterval(intID);
_root.fxSound.stop;
_root.BagMusic.stop;
_root.soundB.stop;
inGame = false;
movie.removeMovieClip();
info.removeMovieClip();
_root.attachMovie("summary_mc", "summary", 800, {_x:322.3, _y:235.7});
summary.lvl_txt.text = Level;
summary.earn_txt.text = earn;
bns = 250 * bonus;
flr = 0;
summary.bonus_txt.text = bns;
summary.faiuler_txt.text = flr;
totalEarn = (earn + bns) - flr;
summary.total_txt.text = totalEarn;
summary.money = summary.money + totalEarn;
money = money + totalEarn;
TotalEarn = TotalEarn + totalEarn;
summary.ok_btn.onPress = function () {
summary.removeMovieClip();
boxLogo.removeMovieClip();
if (Level < 9) {
_root.gotoAndStop("levelOK");
} else {
headshoot = headshoot + 1;
_root.gotoAndStop("finishGame");
}
};
}
function finishWOI() {
switch (Level) {
case 1 :
price = 2600;
break;
case 2 :
price = 2850;
break;
case 3 :
price = 3200;
break;
case 4 :
price = 3550;
break;
case 5 :
price = 4100;
break;
case 6 :
price = 4350;
break;
case 7 :
price = 4900;
break;
case 8 :
price = 5300;
break;
case 9 :
price = 5500;
}
showSummary(price, 1);
delayDie = 0;
deleteFrame();
}
function kalahWOI() {
delayDie = 0;
showSummary2(0, 0, 1);
}
function showSummary2(earn, bonus, faiuler) {
boxLogo.removeMovieClip();
textShow.removeMovieClip();
inGame = false;
clearInterval(intID);
_root.movie.removeMovieClip();
info.removeMovieClip();
_root.fxSound.stop;
_root.BagMusic.stop;
_root.soundB.stop;
_root.attachMovie("summary_mc", "summary", 800, {_x:322.3, _y:235.7});
Mouse.show();
summary.lvl_txt.text = Level;
summary.earn_txt.text = earn;
bns = 250 * bonus;
flr = -(250 * faiuler);
summary.bonus_txt.text = bns;
summary.faiuler_txt.text = flr;
totalEarn = (earn + bns) - flr;
summary.total_txt.text = -totalEarn;
summary.money = summary.money + totalEarn;
trace(totalEarn);
money = money - totalEarn;
TotalEarn = TotalEarn + totalEarn;
summary.ok_btn.onPress = function () {
summary.removeMovieClip();
boxLogo.removeMovieClip();
_root.gotoAndStop("levelNO");
};
}
function cekDie() {
if (lvl4_win) {
delayDie = delayDie + 0.1;
if (delayDie >= 4) {
_root.fxSound.stop;
_root.BagMusic.stop;
_root.soundB.stop;
complete_snd.gotoAndPlay(2);
finishWOI();
delayDie = 0;
lvl4_win = false;
}
}
if (lvl4_lose) {
delayDie = delayDie + 0.1;
if (delayDie >= 4) {
failed_snd.gotoAndPlay(2);
kalahWOI();
delayDie = 0;
lvl4_lose = false;
}
}
}
function setSenjata() {
if (jenisPeluru == "pendek") {
info.ammo.text = ammo1;
}
switch (jenisSenjata) {
case "awp1" :
accuracy = 0.05;
break;
case "awp2" :
accuracy = 0.05;
break;
case "awp3" :
accuracy = 0.06;
break;
case "awp4" :
accuracy = 0.07;
break;
case "awp5" :
accuracy = 0.08;
}
trace(jenisScope);
switch (jenisScope) {
case "scope1" :
movie.aim.scope.gotoAndStop(1);
zoom = 1;
return;
case "scope2" :
movie.aim.scope.gotoAndStop(2);
zoom = 2;
return;
case "scope3" :
movie.aim.scope.gotoAndStop(3);
zoom = 3;
}
}
function startGame() {
onMouseDown = shot;
setSenjata();
}
function checkPeluru() {
if (jenisPeluru == "pendek") {
if (ammo1 < 1) {
_root.attachMovie("ammo_empty", "ammo_empty", 550, {_x:320, _y:250});
delayCek = delayCek + 0.1;
if (delayCek >= 10) {
delayCek = 0;
_root.failed_snd.gotoAndPlay(2);
kalahWOI();
}
}
} else if (jenisPeluru == "panjang") {
if (ammo2 < 1) {
trace("ammo2 empty");
}
}
}
function shot() {
if (shotok && (inGame)) {
if ((jenisPeluru == "pendek") & (ammo1 > 0)) {
ammo1 = ammo1 - 1;
info.ammo.text = ammo1;
shootOut();
} else if ((jenisPeluru == "panjang") & (ammo2 > 0)) {
ammo2 = ammo2 - 1;
info.ammo.text = ammo2;
shootOut();
}
}
}
function shootOut() {
if (noBullet >= 5) {
noBullet = 0;
}
noBullet = noBullet + 1;
_root.gun.gotoAndPlay(jenisSenjata);
movie.aim.gotoAndPlay(jenisSenjata);
tracex = movie.aim._x;
tracey = movie.aim._y;
tampung = _root.movie.attachMovie("bullet_hole", "bullet1", 100 + noBullet, {_x:tracex, _y:tracey});
tampung.dly = 3;
tampung.onEnterFrame = function () {
if (this.dly > 0) {
this.dly = this.dly - 0.3;
}
if (this.dly <= 1) {
this.removeMovieClip();
}
};
shotok = false;
}
function aimBrain() {
checkPeluru();
if ((zoom == 2) && (checkZoom)) {
movie.aim._width = movie.aim._width * 1.1;
movie.aim._height = movie.aim._height * 1.1;
checkZoom = false;
} else if ((zoom == 3) && (checkZoom)) {
movie.aim._width = movie.aim._width * 1.3;
movie.aim._height = movie.aim._height * 1.3;
checkZoom = false;
}
if (!otherObject) {
delayOB = delayOB + 0.1;
if (delayOB > 1) {
delayOB = 0;
otherObject = true;
}
}
shakeDelay = shakeDelay + 0.01;
if ((shakeDelay > 1) or (shakeDelay > 0.2)) {
shake = true;
if (numberRandom == 2) {
bug1 = bug1 + 1.4;
bug2 = bug2 + 1.4;
} else if (numberRandom == 1) {
bug1 = bug1 - 1.4;
bug2 = bug2 - 1.4;
}
}
if (shakeDelay > 1.5) {
shakeDelay = 0;
shake = false;
bug1 = 0;
bug2 = 0;
}
if (shake) {
numberRandom = random(4);
}
Mouse.hide();
var _local1 = accuracy;
if (balance) {
bug1 = bug1 / 2;
bug2 = bug2 / 2;
}
movie.aim._x = movie.aim._x + (((movie._xmouse - movie.aim._x) + bug1) * _local1);
movie.aim._y = movie.aim._y + (((movie._ymouse - movie.aim._y) + bug2) * _local1);
}
function mainLoop() {
if (inGame) {
aimBrain();
cekDie();
}
}
_root.soundBackground("beach");
_root.playMusic("backGround");
setLevel();
shotok = true;
noBullet = 0;
zooming = false;
bug1 = 0;
bug2 = 0;
shake = false;
shakeDelay = 0;
numberRandom = 0;
checkZoom = true;
delayOB = 0;
startGame();
delayDie = 0;
inGame = true;
otherObject = true;
missObject = 0;
lvl4_win = false;
lvl4_lose = false;
delayCek = 0;
checkZoom = true;
intID = setInterval(mainLoop, 30);
Frame 24
earn = headshoot * 2000;
bonus = headshoot * 500;
missCount = miss * 500;
total = (earn + bonus) - missCount;
name_txt.text = saveFile.data.profile;
score_txt.text = total;
ammo_empty.removeMovieClip();
sudahSave = false;
submit_btn.onPress = function () {
tampungNo = saveFile.data.noPlay;
tampungNo = tampungNo + 1;
saveFile.data.noPlay = tampungNo;
no = saveFile.data.noPlay;
saveFile.data["player" + no] = name_txt.text;
saveFile.data["score" + no] = total;
saveFile.data.profile = undefined;
gotoAndStop (36);
};
_root.fxSound.stop();
_root.soundB.stop();
_root.BagMusic.stop();
i = 0;
while (i <= 20) {
tampung = _root.createEmptyMovieClip("tampung" + i, 300 + i);
_root["orang" + i] = tampung;
_root["orang" + i].removeMovieClip();
i++;
}
Frame 25
function startNew() {
maxLength = saveFile.data.noPlay;
i = 1;
while (i <= maxLength) {
listPlayer[i][0] = saveFile.data["player" + i];
listPlayer[i][1] = saveFile.data["score" + i];
if (i >= maxLength) {
cek();
}
i++;
}
}
function cek() {
i = 1;
while (i <= (maxLength - 1)) {
minIndex = i;
j = i + 1;
while (j <= maxLength) {
if (listPlayer[j][1] > listPlayer[minIndex][1]) {
minIndex = j;
}
j++;
}
if (minIndex > i) {
k = listPlayer[i][1];
listPlayer[i][1] = listPlayer[minIndex][1];
listPlayer[minIndex][1] = k;
xnama = listPlayer[i][0];
listPlayer[i][0] = listPlayer[minIndex][0];
listPlayer[minIndex][0] = xnama;
}
i++;
}
}
function showBoard() {
i = 0;
while (i < 11) {
_root["nama_" + i].text = listPlayer[i][0];
_root["score_" + i].text = listPlayer[i][1];
i++;
}
}
function loading() {
dly = dly + 0.1;
if (dly >= 5) {
showBoard();
loading_mc._visible = false;
}
}
listPlayer = new Array();
listPlayer = [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]];
startNew();
dly = 0;
setInterval(loading, 30);
Frame 26
_root.BagMusic.stop();
_root.soundMenu = false;
Frame 36
function startNew() {
maxLength = saveFile.data.noPlay;
i = 1;
while (i <= maxLength) {
listPlayer[i][0] = saveFile.data["player" + i];
listPlayer[i][1] = saveFile.data["score" + i];
if (i >= maxLength) {
cek();
}
i++;
}
}
function cek() {
i = 1;
while (i <= (maxLength - 1)) {
minIndex = i;
j = i + 1;
while (j <= maxLength) {
if (listPlayer[j][1] > listPlayer[minIndex][1]) {
minIndex = j;
}
j++;
}
if (minIndex > i) {
k = listPlayer[i][1];
listPlayer[i][1] = listPlayer[minIndex][1];
listPlayer[minIndex][1] = k;
xnama = listPlayer[i][0];
listPlayer[i][0] = listPlayer[minIndex][0];
listPlayer[minIndex][0] = xnama;
}
i++;
}
}
function showBoard() {
i = 0;
while (i < 11) {
_root["nama_" + i].text = listPlayer[i][0];
_root["score_" + i].text = listPlayer[i][1];
i++;
}
}
function loading() {
dly = dly + 0.1;
if (dly >= 5) {
showBoard();
loading_mc._visible = false;
}
}
listPlayer = new Array();
listPlayer = [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]];
startNew();
dly = 0;
setInterval(loading, 30);
Symbol 35 MovieClip Frame 1
stop();
Symbol 55 MovieClip Frame 30
stop();
Symbol 56 MovieClip Frame 1
stop();
Symbol 56 MovieClip Frame 15
stop();
Symbol 58 MovieClip [mobil_lvl4] Frame 199
if (_root.inGame) {
_parent.removeMovieClip();
_root.setEnemy4();
clearInterval(intID);
}
Symbol 66 MovieClip Frame 1
stop();
Symbol 88 MovieClip Frame 21
stop();
Symbol 91 MovieClip [aim] Frame 1
stop();
_root.shotok = true;
Instance of Symbol 67 MovieClip "sensor" in Symbol 91 MovieClip [aim] Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 91 MovieClip [aim] Frame 5
_root.fxStart("bullet");
Symbol 91 MovieClip [aim] Frame 10
_root.fxStart("Reload");
Symbol 91 MovieClip [aim] Frame 43
gotoAndStop (1);
Symbol 91 MovieClip [aim] Frame 49
_root.fxStart("bullet");
Symbol 91 MovieClip [aim] Frame 54
_root.fxStart("Reload2");
Symbol 91 MovieClip [aim] Frame 79
gotoAndStop (1);
Symbol 91 MovieClip [aim] Frame 84
_root.fxStart("bullet");
Symbol 91 MovieClip [aim] Frame 89
_root.fxStart("Reload2");
Symbol 91 MovieClip [aim] Frame 113
gotoAndStop (1);
Symbol 91 MovieClip [aim] Frame 123
_root.fxStart("Reload2");
Symbol 91 MovieClip [aim] Frame 145
gotoAndStop (1);
Symbol 91 MovieClip [aim] Frame 150
_root.fxStart("bullet");
Symbol 91 MovieClip [aim] Frame 154
_root.fxStart("Reload4");
Symbol 91 MovieClip [aim] Frame 171
gotoAndStop (1);
Symbol 96 MovieClip Frame 1
stop();
Symbol 100 MovieClip Frame 1
stop();
Symbol 106 MovieClip Frame 1
stop();
Symbol 109 MovieClip Frame 1
stop();
Symbol 111 MovieClip Frame 1
stop();
Symbol 112 MovieClip Frame 1
stop();
Symbol 112 MovieClip Frame 20
stop();
Instance of Symbol 112 MovieClip "pop_info" in Symbol 116 MovieClip [info] Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 138 Button
on (release) {
getURL ("http://www.box10.com/shootem-up-games.html ", "_blank");
}
Symbol 172 MovieClip [summary_mc] Frame 1
stop();
Symbol 172 MovieClip [summary_mc] Frame 20
stop();
Symbol 193 MovieClip Frame 30
stop();
Symbol 195 MovieClip Frame 1
stop();
Symbol 195 MovieClip Frame 31
stop();
Symbol 261 MovieClip Frame 1
gotoAndPlay(_parent.posisi);
Instance of Symbol 40 MovieClip "sensor" in Symbol 261 MovieClip Frame 2
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 40 MovieClip "bodysensor" in Symbol 261 MovieClip Frame 2
onClipEvent (load) {
_visible = false;
}
Symbol 261 MovieClip Frame 22
gotoAndPlay(_parent.posisi);
Symbol 261 MovieClip Frame 35
gotoAndPlay(_parent.posisi);
Symbol 261 MovieClip Frame 53
stop();
Instance of Symbol 40 MovieClip "bodysensor" in Symbol 261 MovieClip Frame 61
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 40 MovieClip "sensor" in Symbol 261 MovieClip Frame 61
onClipEvent (load) {
_visible = false;
}
Symbol 261 MovieClip Frame 81
gotoAndPlay(_parent.posisi);
Symbol 262 MovieClip [orang5_level1] Frame 610
stop();
_root.lvl4_lose = true;
Symbol 266 MovieClip [orang1_level1] Frame 540
stop();
_parent.posisi = "walk";
gotoAndPlay (1);
Symbol 267 MovieClip Frame 562
stop();
_parent.posisi = "walk";
gotoAndPlay (1);
Symbol 268 MovieClip Frame 640
stop();
_parent.posisi = "walk";
gotoAndPlay (1);
Symbol 269 MovieClip Frame 1071
stop();
_parent.posisi = "walk";
gotoAndPlay (1);
Symbol 306 MovieClip Frame 30
stop();
Symbol 308 MovieClip Frame 1
gotoAndPlay(random(100) + 1);
Instance of Symbol 67 MovieClip "sensor" in Symbol 308 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 308 MovieClip Frame 363
gotoAndPlay (1);
Symbol 308 MovieClip Frame 372
stop();
Instance of Symbol 67 MovieClip "sensor" in Symbol 320 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 67 MovieClip "sensor" in Symbol 320 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 320 MovieClip Frame 363
gotoAndPlay (1);
Symbol 320 MovieClip Frame 372
stop();
Symbol 321 MovieClip Frame 610
stop();
_parent.posisi = "walk";
gotoAndPlay (1);
Instance of Symbol 268 MovieClip "orang2" in Symbol 323 MovieClip [mission2_mc] Frame 1
onClipEvent (load) {
posisi = "walk";
hidup = true;
this.body.gotoAndPlay(posisi);
traceX = this._x;
}
onClipEvent (enterFrame) {
i = 1;
while (i <= 5) {
traceB = _parent["bullet" + i];
if (this.body.sensor.hitTest(traceB.sensor) && (hidup)) {
posisi = "headshoot";
this.stop();
this.body.gotoAndPlay(posisi);
_root.lvl4_lose = true;
traceB.removeMovieClip();
hidup = false;
}
if (this.body.bodysensor.hitTest(traceB.sensor)) {
posisi = "run";
this.body.gotoAndPlay(posisi);
traceB.removeMovieClip();
}
i++;
}
}
Instance of Symbol 269 MovieClip "orang1" in Symbol 323 MovieClip [mission2_mc] Frame 1
onClipEvent (load) {
posisi = "target";
hidup = true;
this.body.gotoAndPlay(posisi);
traceX = this._x;
}
onClipEvent (enterFrame) {
i = 1;
while (i <= 5) {
traceB = _parent["bullet" + i];
if (this.body.sensor.hitTest(traceB.sensor) && (hidup)) {
posisi = "headshoot";
this.stop();
this.body.gotoAndPlay(posisi);
_root.lvl4_lose = true;
traceB.removeMovieClip();
hidup = false;
}
if (this.body.bodysensor.hitTest(traceB.sensor)) {
posisi = "run";
this.body.gotoAndPlay(posisi);
traceB.removeMovieClip();
}
i++;
}
}
Instance of Symbol 266 MovieClip [orang1_level1] "orang3" in Symbol 323 MovieClip [mission2_mc] Frame 1
onClipEvent (load) {
posisi = "walk";
hidup = true;
this.body.gotoAndPlay(posisi);
traceX = this._x;
}
onClipEvent (enterFrame) {
i = 1;
while (i <= 5) {
traceB = _parent["bullet" + i];
if (this.body.sensor.hitTest(traceB.sensor) && (hidup)) {
posisi = "headshoot";
this.stop();
this.body.gotoAndPlay(posisi);
_root.lvl4_lose = true;
traceB.removeMovieClip();
hidup = false;
}
if (this.body.bodysensor.hitTest(traceB.sensor)) {
posisi = "run";
this.body.gotoAndPlay(posisi);
traceB.removeMovieClip();
}
i++;
}
}
Instance of Symbol 321 MovieClip "orang4" in Symbol 323 MovieClip [mission2_mc] Frame 1
onClipEvent (load) {
posisi = "target";
hidup = true;
this.body.gotoAndPlay(posisi);
traceX = this._x;
}
onClipEvent (enterFrame) {
i = 1;
while (i <= 5) {
traceB = _parent["bullet" + i];
if (this.body.sensor.hitTest(traceB.sensor) && (hidup)) {
posisi = "headshoot";
this.stop();
this.body.gotoAndPlay(posisi);
_root.lvl4_lose = true;
traceB.removeMovieClip();
hidup = false;
}
if (this.body.bodysensor.hitTest(traceB.sensor)) {
posisi = "run";
this.body.gotoAndPlay(posisi);
traceB.removeMovieClip();
}
i++;
}
}
Symbol 385 MovieClip Frame 1
gotoAndPlay(_parent.posisi);
Instance of Symbol 40 MovieClip "sensor" in Symbol 385 MovieClip Frame 2
onClipEvent (load) {
_visible = false;
}
Symbol 385 MovieClip Frame 22
gotoAndPlay(_parent.posisi);
Symbol 385 MovieClip Frame 35
gotoAndPlay(_parent.posisi);
Symbol 385 MovieClip Frame 53
stop();
Instance of Symbol 40 MovieClip "sensor" in Symbol 385 MovieClip Frame 61
onClipEvent (load) {
_visible = false;
}
Symbol 385 MovieClip Frame 81
gotoAndPlay(_parent.posisi);
Symbol 385 MovieClip Frame 99
stop();
Symbol 401 MovieClip Frame 351
stop();
_root.showText();
Symbol 409 MovieClip Frame 1
gotoAndStop (2);
Symbol 411 MovieClip Frame 211
stop();
Symbol 412 MovieClip Frame 120
stop();
Symbol 412 MovieClip Frame 199
if (_root.inGame) {
_parent.removeMovieClip();
_root.setEnemy4();
clearInterval(intID);
}
Symbol 418 MovieClip Frame 1
gotoAndStop (5);
Symbol 426 MovieClip Frame 1
gotoAndStop (4);
Symbol 428 MovieClip Frame 450
stop();
if ((!_root.lvl4_win) && (!_parent.mati)) {
_root.lvl4_lose = true;
}
Symbol 434 MovieClip Frame 1
gotoAndPlay(random(150) + 1);
Symbol 434 MovieClip Frame 281
gotoAndPlay(random(496) + 281);
Symbol 435 MovieClip Frame 1
gotoAndPlay(random(150) + 1);
Symbol 435 MovieClip Frame 281
gotoAndPlay(random(496) + 281);
Symbol 448 MovieClip Frame 1
gotoAndPlay(random(150) + 1);
Symbol 448 MovieClip Frame 152
_root.fxStart("langkahkuda");
Symbol 453 MovieClip Frame 1
gotoAndPlay(random(150) + 1);
Symbol 453 MovieClip Frame 151
_root.fxStart("langkahkuda");
Symbol 453 MovieClip Frame 181
_root.fxStart("kudasound");
Symbol 459 MovieClip Frame 1
gotoAndPlay(random(150) + 1);
Symbol 459 MovieClip Frame 151
_root.fxStart("langkahkuda");
Symbol 486 MovieClip Frame 30
stop();
Symbol 487 MovieClip Frame 1
gotoAndPlay(random(200) + 1);
Instance of Symbol 67 MovieClip "sensor" in Symbol 487 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 487 MovieClip Frame 363
gotoAndPlay (1);
Symbol 487 MovieClip Frame 372
stop();
Symbol 504 MovieClip Frame 1
if (_name == "target") {
gotoAndStop (2);
} else {
stop();
}
Symbol 516 MovieClip Frame 30
stop();
Symbol 517 MovieClip Frame 1
stop();
Symbol 517 MovieClip Frame 15
stop();
Symbol 518 MovieClip Frame 1
if (_name == "target") {
gotoAndStop (2);
} else {
stop();
}
Symbol 519 MovieClip Frame 1
stop();
Symbol 519 MovieClip Frame 15
stop();
Symbol 524 MovieClip Frame 227
stop();
Symbol 529 MovieClip Frame 93
_root.setJI();
Symbol 529 MovieClip Frame 241
stop();
Symbol 530 MovieClip Frame 1
stop();
Symbol 530 MovieClip Frame 15
stop();
Symbol 532 MovieClip Frame 440
stop();
_root.kalahWOI();
Symbol 585 MovieClip Frame 1
Symbol 585 MovieClip Frame 438
stop();
d = random(3);
if (d == 2) {
play();
} else {
gotoAndPlay (400);
}
Symbol 585 MovieClip Frame 520
gotoAndPlay (1);
Symbol 585 MovieClip Frame 525
stop();
Symbol 637 MovieClip Frame 1
gotoAndPlay (160);
Symbol 637 MovieClip Frame 239
d = random(3);
if (d == 2) {
play();
} else {
gotoAndPlay (190);
}
Symbol 637 MovieClip Frame 321
gotoAndPlay (1);
Symbol 637 MovieClip Frame 326
stop();
Symbol 644 MovieClip [textShow] Frame 249
stop();
Symbol 648 Button
on (release) {
getURL ("http://www.box10.com/shootem-up-games.html ", "_blank");
}
Symbol 653 Button
on (release) {
getURL ("http://www.box10.com/shootem-up-games.html", "_blank");
}
Symbol 660 MovieClip Frame 1
stop();
Symbol 660 MovieClip Frame 23
_parent._parent.startGame();
Symbol 665 MovieClip Frame 100
stop();
_parent.logored.play();
Instance of Symbol 665 MovieClip in Symbol 666 MovieClip Frame 1
onClipEvent (enterFrame) {
frame = int((_root.getBytesLoaded() * 100) / _root.getBytesTotal());
if (frame > _currentframe) {
play();
} else {
stop();
}
}
Symbol 669 Button
on (release) {
_root.play();
}
Symbol 670 MovieClip Frame 9
function startGame() {
but._visible = true;
}
stop();
but._visible = false;
Symbol 685 Button
on (release) {
getURL ("http://www.box10.com/shootem-up-games.html ", "_blank");
}
Symbol 687 MovieClip Frame 155
_parent.play();
stop();
Symbol 688 MovieClip Frame 36
stop();
Symbol 688 MovieClip Frame 48
_root.play();
stop();
Symbol 689 Button
on (release) {
getURL ("http://www.box10.com/", "_blank");
}
Symbol 697 Button
on (release) {
_root.gotoAndStop("game");
}
Symbol 698 Button
on (release) {
_root.gotoAndStop("leaderboard");
}
Symbol 699 Button
on (press) {
getURL ("http://www.box10.com/sniper-games.html ", "_blank");
}
Symbol 704 MovieClip Frame 34
stop();
play_btn.onRollOver = function () {
_root.fxStart("btnOver");
};
play_btn.onPress = function () {
_root.fxStart("btnPress");
};
score_btn.onRollOver = function () {
_root.fxStart("btnOver");
};
score_btn.onPress = function () {
_root.fxStart("btnPress");
};
more_btn.onRollOver = function () {
_root.fxStart("btnOver");
};
more_btn.onPress = function () {
_root.fxStart("btnPress");
};
Symbol 707 MovieClip Frame 1
stop();
Symbol 709 MovieClip Frame 1
stop();
Symbol 712 Button
on (press) {
if (_root.mute == false) {
_root.mute = true;
_root.fxVolume = 0;
_root.backgroundVolume = 0;
_root.musicBaground.stop();
_root.mute_mc.gotoAndPlay(2);
} else {
_root.mute = false;
_root.fxVolume = 80;
_root.backgroundVolume = 60;
_root.mute_mc.gotoAndPlay(10);
_root.playMusic();
}
}
Symbol 717 MovieClip Frame 1
gotoAndStop (30);
Symbol 717 MovieClip Frame 5
stop();
Symbol 717 MovieClip Frame 14
stop();
Symbol 720 Button
on (release) {
newGame();
}
Symbol 722 Button
on (release) {
loadGame();
}
Symbol 740 Button
on (rollOver) {
_root.fxStart("btnOver");
}
on (press) {
_root.fxStart("btnPress");
}
Symbol 771 Button
on (press) {
if (ammo1_qty > 0) {
ammo1_qty = ammo1_qty - 1;
}
}
Symbol 772 Button
on (press) {
if (ammo1_qty < 8) {
ammo1_qty = ammo1_qty + 1;
}
}
Symbol 776 MovieClip Frame 1
stop();
Symbol 779 MovieClip Frame 1
gotoAndStop (20);
Symbol 779 MovieClip Frame 20
stop();
stop();
Symbol 786 MovieClip Frame 1
stop();
Symbol 786 MovieClip Frame 23
stop();
Symbol 791 Button
on (press) {
getURL ("http://www.box10.com/agent-b10.html", _blank);
}
Symbol 792 MovieClip Frame 2
stop();
Symbol 793 Button
on (press) {
awp1_mc._visible = true;
}
on (rollOver) {
_root.fxStart("btnOver");
}
on (press) {
_root.fxStart("btnPress");
}
Symbol 795 Button
on (press) {
awp2_mc._visible = true;
}
on (rollOver) {
_root.fxStart("btnOver");
}
on (press) {
_root.fxStart("btnPress");
}
Symbol 796 Button
on (press) {
awp3_mc._visible = true;
}
on (rollOver) {
_root.fxStart("btnOver");
}
on (press) {
_root.fxStart("btnPress");
}
Symbol 797 Button
on (press) {
awp4_mc._visible = true;
}
on (rollOver) {
_root.fxStart("btnOver");
}
on (press) {
_root.fxStart("btnPress");
}
Symbol 798 Button
on (press) {
awp5_mc._visible = true;
}
on (rollOver) {
_root.fxStart("btnOver");
}
on (press) {
_root.fxStart("btnPress");
}
Symbol 799 Button
on (press) {
balance_mc._visible = true;
}
on (rollOver) {
_root.fxStart("btnOver");
}
on (press) {
_root.fxStart("btnPress");
}
Symbol 800 Button
on (press) {
zoom3_mc._visible = true;
}
on (rollOver) {
_root.fxStart("btnOver");
}
on (press) {
_root.fxStart("btnPress");
}
Symbol 801 Button
on (press) {
zoom2_mc._visible = true;
}
on (rollOver) {
_root.fxStart("btnOver");
}
on (press) {
_root.fxStart("btnPress");
}
Symbol 802 Button
on (press) {
zoom1_mc._visible = true;
}
on (rollOver) {
_root.fxStart("btnOver");
}
on (press) {
_root.fxStart("btnPress");
}
Symbol 809 Button
on (press) {
_visible = false;
}
Symbol 844 Button
on (release) {
gotoAndStop ("store");
}
on (rollOver) {
_root.fxStart("btnOver");
}
on (press) {
_root.fxStart("btnPress");
}
Symbol 845 Button
on (release) {
gotoAndStop ("equipt");
}
on (rollOver) {
_root.fxStart("btnOver");
}
on (press) {
_root.fxStart("btnPress");
}
Symbol 846 Button
on (release) {
gotoAndStop ("briefing");
}
on (rollOver) {
_root.fxStart("btnOver");
}
on (press) {
_root.fxStart("btnPress");
}
Symbol 847 Button
on (release) {
startGame();
}
Symbol 856 MovieClip Frame 1
stop();
Symbol 874 Button
on (press) {
awp1_yes._visible = true;
}
on (rollOver) {
_root.fxStart("btnOver");
}
on (press) {
_root.fxStart("btnPress");
}
Symbol 875 Button
on (press) {
awp2_yes._visible = true;
}
on (rollOver) {
_root.fxStart("btnOver");
}
on (press) {
_root.fxStart("btnPress");
}
Symbol 877 Button
on (press) {
awp3_yes._visible = true;
}
on (rollOver) {
_root.fxStart("btnOver");
}
on (press) {
_root.fxStart("btnPress");
}
Symbol 878 Button
on (press) {
awp4_yes._visible = true;
}
on (rollOver) {
_root.fxStart("btnOver");
}
on (press) {
_root.fxStart("btnPress");
}
Symbol 879 Button
on (press) {
awp5_yes._visible = true;
}
on (rollOver) {
_root.fxStart("btnOver");
}
on (press) {
_root.fxStart("btnPress");
}
Symbol 880 Button
on (press) {
zoom1_yes._visible = true;
}
on (rollOver) {
_root.fxStart("btnOver");
}
on (press) {
_root.fxStart("btnPress");
}
Symbol 881 Button
on (press) {
zoom2_yes._visible = true;
}
on (rollOver) {
_root.fxStart("btnOver");
}
on (press) {
_root.fxStart("btnPress");
}
Symbol 882 Button
on (press) {
zoom3_yes._visible = true;
}
on (rollOver) {
_root.fxStart("btnOver");
}
on (press) {
_root.fxStart("btnPress");
}
Symbol 884 Button
on (press) {
balance_yes._visible = true;
}
on (rollOver) {
_root.fxStart("btnOver");
}
on (press) {
_root.fxStart("btnPress");
}
Symbol 886 Button
on (press) {
_visible = false;
}
on (rollOver) {
_root.fxStart("btnOver");
}
on (press) {
_root.fxStart("btnPress");
}
Symbol 890 Button
on (release) {
gotoAndStop ("store");
}
on (rollOver) {
_root.fxStart("btnOver");
}
on (press) {
_root.fxStart("btnPress");
}
Symbol 891 Button
on (release) {
startGame();
}
on (rollOver) {
_root.fxStart("btnOver");
}
on (press) {
_root.fxStart("btnPress");
}
Symbol 904 MovieClip Frame 1
gotoAndStop(_root.Level);
var saveFile = SharedObject.getLocal("agent10");
brf_text = (("Greetings Agent " + saveFile.data.profile) + " ") + "! We have enlisted your services to deal with a theft from our local factory. The secret recipe for our world famous ice cream has been stolen! You will be required to eliminate all those implicated in the crime to ensure our secret is safe! If this information gets into the wrong hands it could be catastrophic so please keep your wits about you at all times and use your undoubted sniper skills to the best of your ability.";
briefing_txt.text = brf_text;
objective_txt.text = "Eliminate the thief as he makes his escape from the factory. The thief has been identified as former employee John Buck who is a well known chain smoker.";
req = "Eliminate John Buck No civilian casualties";
require_txt.text = req;
Symbol 904 MovieClip Frame 2
var saveFile = SharedObject.getLocal("agent10");
brf_text = (("Excellent work Agent " + saveFile.data.profile) + " ") + ". Unfortunately our intelligence suggests that John Buck was able to pass on our secret recipe to a colleague before you took him out. It is believed the recipe is now in the possession of an unidentified male. Our spies have followed him from the scene into the park where he is currently waiting, probably to meet up with another collaborator to pass on the document. Our spies noted that the target has a beard.";
briefing_txt.text = brf_text;
objective_txt.text = "Eliminate the target";
req = "No civilian casualties";
require_txt.text = req;
Symbol 904 MovieClip Frame 3
var saveFile = SharedObject.getLocal("agent10");
brf_text = "It seems that the previous target was either a decoy or an innocent. Our intelligence reports that the document is now in possession of a previous employee and close friend of John Buck. The man in question, Daryl O\u2019Donovan is a dangerous man with friends in high places, and a well known enemy of our corporation. He must be eliminated! He is currently working on a building site close to the docks. We have spies in the area to help identify him; further information will be given ASAP.";
briefing_txt.text = brf_text;
objective_txt.text = "Eliminate the target. Monitor the area closely until intelligence contact you to help identify him.";
req = "No civilian casualties";
require_txt.text = req;
Symbol 904 MovieClip Frame 4
var saveFile = SharedObject.getLocal("agent10");
brf_text = "It seems that once again we were too late to stop these criminals in their tracks. Three henchmen who work for our arch rivals, Mangosoft were spotted leaving the site, each clutching a briefcase which could contain our document. They all must be eliminated, one by one. The first henchman, known only as Crazy Carl left the scene in a yellow car.";
briefing_txt.text = brf_text;
objective_txt.text = "Eliminate Crazy Carl before he escapes. You will only have one opportunity so make sure you take it.";
req = "No civilian casualties Target must not escape.";
require_txt.text = req;
Symbol 904 MovieClip Frame 5
var saveFile = SharedObject.getLocal("agent10");
brf_text = ("Congratulations Agent " + saveFile.data.profile) + ", the first henchman was successfully eliminated. Now we must move onto the second one. He has been identified as Ian Gullen, a very dangerous criminal who currently resides in the apartment block close to the park. We were unable to find out precisely which apartment is his, but he is well known chain smoker so should be easy to spot.";
briefing_txt.text = brf_text;
objective_txt.text = "Eliminate Ian Gullen";
req = "No civilian casualties";
require_txt.text = req;
Symbol 904 MovieClip Frame 6
var saveFile = SharedObject.getLocal("agent10");
brf_text = "Nice work agent! Now we move onto the third and final henchman, known only as \u201CThe Baz\u201D. He has been spotted heading towards the local racing track wearing sunglasses. You know what to do!";
briefing_txt.text = brf_text;
objective_txt.text = "Eliminate \u201CThe Baz\u201D";
req = "No civilian casualties";
require_txt.text = req;
Symbol 904 MovieClip Frame 7
var saveFile = SharedObject.getLocal("agent10");
brf_text = "Top work agent. It seems it was all in vein though. The document has found its way into the hands of Mangosoft\u2019s number 2, who has been spotted heading towards the airport. He must be eliminated before he can escape. It won\u2019t be an easy mission though as he is being escorted by two armed guards. Make sure you take them out before you attack the target.";
briefing_txt.text = brf_text;
objective_txt.text = "Eliminate the guards Eliminate the target";
req = "Eliminate the guards first";
require_txt.text = req;
Symbol 904 MovieClip Frame 8
var saveFile = SharedObject.getLocal("agent10");
brf_text = "We have been informed that the document has been copied and is also in the possession of their top guy, Harry. He knows we are onto him though and has escaped the city. We have had sightings of him in the mountains, wearing some kind of multicoloured headgear. The reports are rather sketchy, but it\u2019s all we have to go on.";
briefing_txt.text = brf_text;
objective_txt.text = "Eliminate Harry";
req = "No civilian casualties.";
require_txt.text = req;
Symbol 904 MovieClip Frame 9
var saveFile = SharedObject.getLocal("agent10");
brf_text = "Good work agent but our intelligence let us down, it was the wrong guy. Not to worry, our guys are onto it to make sure it doesn\u2019t make the press. There has been a confirmed sighting of Harry on a beach in Mexico. He is wearing a multicoloured bandanna as he relaxes, thinking he has outsmarted us! Take him down once and for all!";
briefing_txt.text = brf_text;
objective_txt.text = "Eliminate Harry once and for all!";
req = "No civilian casualties.";
require_txt.text = req;
Symbol 905 Button
on (release) {
_root.fxStart("startGame");
_root.gotoAndStop("level" + Level);
}
on (rollOver) {
_root.fxStart("btnOver");
}
on (press) {
_root.fxStart("btnPress");
}
Symbol 909 Button
on (release) {
headshoot = headshoot + 1;
Level = Level + 1;
gotoAndStop ("briefing");
_root.saveGame();
}
on (rollOver) {
_root.fxStart("btnOver");
}
on (press) {
_root.fxStart("btnPress");
}
Symbol 912 Button
on (release) {
miss = miss + 1;
gotoAndStop ("briefing");
}
on (rollOver) {
_root.fxStart("btnOver");
}
on (press) {
_root.fxStart("btnPress");
}
Symbol 915 MovieClip Frame 1
stop();
Symbol 915 MovieClip Frame 2
_root.fxStart("PistolSound");
Symbol 915 MovieClip Frame 5
gotoAndStop (1);
Symbol 915 MovieClip Frame 6
_root.fxStart("awp2");
Symbol 915 MovieClip Frame 10
gotoAndStop (1);
Symbol 915 MovieClip Frame 11
_root.fxStart("awp3");
Symbol 915 MovieClip Frame 15
gotoAndStop (1);
Symbol 915 MovieClip Frame 16
_root.fxStart("awp4");
Symbol 915 MovieClip Frame 21
_root.fxStart("awp5");
Symbol 917 MovieClip Frame 1
_root.fxStart("jantung");
Symbol 917 MovieClip Frame 2
Symbol 983 MovieClip Frame 1
trace(posisi);
gotoAndPlay(posisi);
Symbol 983 MovieClip Frame 22
gotoAndPlay(posisi);
Symbol 983 MovieClip Frame 35
gotoAndPlay(posisi);
Symbol 983 MovieClip Frame 53
stop();
Symbol 983 MovieClip Frame 81
gotoAndPlay(posisi);
Symbol 983 MovieClip Frame 102
gotoAndPlay(posisi);
Symbol 990 MovieClip Frame 1
stop();
Symbol 991 MovieClip Frame 211
heli.nextFrame();
Symbol 991 MovieClip Frame 291
stop();
_root.kalahWOI();
Symbol 1048 MovieClip Frame 1
gotoAndPlay(_parent.posisi);
Symbol 1048 MovieClip Frame 22
gotoAndPlay(_parent.posisi);
Symbol 1048 MovieClip Frame 35
gotoAndPlay(_parent.posisi);
Symbol 1048 MovieClip Frame 53
stop();
Symbol 1048 MovieClip Frame 81
gotoAndPlay(_parent.posisi);
Symbol 1048 MovieClip Frame 102
gotoAndPlay(_parent.posisi);
Symbol 1105 MovieClip Frame 1
gotoAndPlay(_parent.posisi);
Symbol 1105 MovieClip Frame 22
gotoAndPlay(_parent.posisi);
Symbol 1105 MovieClip Frame 35
gotoAndPlay(_parent.posisi);
Symbol 1105 MovieClip Frame 53
stop();
Symbol 1105 MovieClip Frame 81
gotoAndPlay(_parent.posisi);
Symbol 1105 MovieClip Frame 102
gotoAndPlay(_parent.posisi);
Symbol 1162 MovieClip Frame 1
gotoAndPlay ("stand");
Symbol 1162 MovieClip Frame 22
gotoAndPlay(_name);
Symbol 1162 MovieClip Frame 35
gotoAndPlay(_name);
Symbol 1162 MovieClip Frame 53
stop();
Symbol 1162 MovieClip Frame 81
gotoAndPlay ("target");
Symbol 1162 MovieClip Frame 102
gotoAndPlay ("stand");
Symbol 1163 MovieClip Frame 181
stop();
Symbol 1168 Button
on (rollOver) {
_root.fxStart("btnOver");
}
on (press) {
_root.fxStart("btnPress");
}
Symbol 1170 Button
on (release) {
getURL ("http://www.box10.com/shootem-up-games.html ", "_blank");
}
Symbol 1172 Button
on (press) {
getURL ("http://www.box10.com/shootem-up-games.html ", " _blank");
}
Symbol 1175 Button
on (press) {
getURL ("http://www.box10.com/shootem-up-games.html ", "_blank");
}
Symbol 1198 Button
on (release) {
gotoAndStop ("menu");
}
Symbol 1199 Button
on (press) {
getURL (" http://www.box10.com/sniper-games.html", _blank);
}
Symbol 1249 Button
on (press) {
getURL (" http://www.box10.com/sniper-games.html", " _blank");
}
on (rollOver) {
_root.fxStart("btnOver");
}
on (press) {
_root.fxStart("btnPress");
}
Symbol 1250 Button
on (press) {
getURL ("http://www.box10.com/shootem-up-games.html ", "_blank");
}
on (rollOver) {
_root.fxStart("btnOver");
}
on (press) {
_root.fxStart("btnPress");
}
Symbol 1252 Button
on (press) {
gotoAndStop ("menu");
}
on (rollOver) {
_root.fxStart("btnOver");
}
on (press) {
_root.fxStart("btnPress");
}
Symbol 1254 Button
on (press) {
getURL ("http://www.box10.com/shootem-up-games.html ", " _blank");
}
Symbol 1255 Button
on (release) {
gotoAndStop (1);
}