Frame 1
var load_the_movie;
uniform = 0;
butxx.onPress = function () {
_root.createEmptyMovieClip("loader_mc", this.getNextHighestDepth());
loader_mc.ofer = ssss.text;
loader_mc.password = "random string";
loader_mc.getURL("http://localhost/learning_php/test/get_score.php", "_blank", "POST");
};
function detectKeys() {
var _local1 = 0;
if (Key.isDown(32)) {
if (levelof > 0) {
gotoAndPlay(levelof22);
} else {
gotoAndPlay ("level3");
}
}
}
stop();
var Iso = SharedObject.getLocal("pac");
trace("iso=" + Iso.data.userId);
score_you.text = Iso.data.userId;
if (Iso.data.userId == undefined) {
trace("ofer");
score_you.text = 0;
}
Frame 2
vv = 0;
tt = 0;
cc = 0;
zz = 0;
mm = 0;
if (_root.Iso.data.userId > 2000) {
pac1.gotoAndPlay(2);
}
if (_root.Iso.data.userId > 4000) {
pac2.gotoAndPlay(2);
}
if (_root.Iso.data.userId > 6000) {
pac3.gotoAndPlay(3);
}
if (_root.Iso.data.userId > 8000) {
pac4.gotoAndPlay(3);
}
if (_root.Iso.data.userId > 9000) {
pac4.gotoAndPlay(3);
}
var Iso = SharedObject.getLocal("pac");
trace("iso=" + _root.Iso.data.userId);
score_you.text = _root.Iso.data.userId;
if (Iso.data.userId == undefined) {
trace("ofer");
score_you.text = 0;
}
butxx.onPress = function () {
_root.createEmptyMovieClip("loader_mc", this.getNextHighestDepth());
loader_mc.ofer = ssss.text;
loader_mc.password = "random string";
loader_mc.getURL("http://localhost/learning_php/test/get_score.php", "_blank", "POST");
};
function detectKeys() {
var _local1 = 0;
if (Key.isDown(32)) {
if (levelof > 0) {
gotoAndPlay(levelof22);
} else {
gotoAndPlay ("level3");
}
}
}
stop();
var Iso = SharedObject.getLocal("pac");
trace("iso=" + Iso.data.userId);
tit.score_you.text = Iso.data.userId;
if (Iso.data.userId == undefined) {
trace("ofer");
score_you.text = 0;
}
uniform = 0;
Frame 3
clearInterval(interhit);
stop();
var i = 0;
while (i < enem_ar.length) {
removeMovieClip(enem_ar[i]);
removeMovieClip(pac_graphic);
removeMovieClip(hand_en_ar[i]);
removeMovieClip(hand_pac);
removeMovieClip(addons_ar[i]);
removeMovieClip(places[i]);
removeMovieClip(explode_ar[i]);
i++;
}
var gonext4 = 0;
var i = 0;
while (i < 10000) {
clearInterval(i);
clearInterval(score_MC_AR_del[i]);
removeMovieClip(score_MC_AR[i]);
clearInterval(interhit);
clearInterval(enem_aar[i]);
clearInterval(bbb[i]);
clearInterval(ball_shoot_ar[i]);
removeMovieClip(ball_shoot[i]);
clearInterval(pac_shoot_ar);
removeMovieClip(pac_shoot[i]);
clearInterval(count_ar[i]);
fade_enem_ar[i] = 0;
removeMovieClip(ammo_ar_take[i]);
removeMovieClip(enem_add);
removeMovieClip(gun_add);
removeMovieClip(pac_weapon[i]);
clearInterval(time_in);
i++;
}
if (uover == 100) {
clearInterval(uover_in);
gotoAndPlay (6);
}
function goover() {
uover--;
}
function play44() {
gotoAndPlay (6);
}
var uover_in;
uover = 5;
uover_in = setInterval(goover, 1000);
function detectKeys() {
if (Key.isDown(32) && (_root.gonext4 == 4)) {
gotoAndStop (4);
}
}
Instance of Symbol 425 MovieClip [empty] "controller" in Frame 3
onClipEvent (enterFrame) {
_root.detectKeys();
}
Instance of Symbol 551 MovieClip "com" in Frame 3
on (press) {
getURL ("http://games.fs1.co.il", "_blank");
}
Frame 4
ta = 2;
stop();
clearInterval(interhit);
var i = 0;
while (i < enem_ar.length) {
removeMovieClip(enem_ar[i]);
removeMovieClip(pac_graphic);
removeMovieClip(hand_en_ar[i]);
removeMovieClip(hand_pac);
removeMovieClip(addons_ar[i]);
removeMovieClip(explode_ar[i]);
i++;
}
var i = 0;
while (i < 10000) {
clearInterval(i);
clearInterval(score_MC_AR_del[i]);
removeMovieClip(score_MC_AR[i]);
clearInterval(interhit);
clearInterval(enem_aar[i]);
clearInterval(bbb[i]);
clearInterval(ball_shoot_ar[i]);
removeMovieClip(ball_shoot[i]);
clearInterval(pac_shoot_ar);
removeMovieClip(pac_shoot[i]);
clearInterval(count_ar[i]);
fade_enem_ar[i] = 0;
removeMovieClip(ammo_ar_take[i]);
removeMovieClip(enem_add);
removeMovieClip(gun_add);
removeMovieClip(pac_weapon[i]);
clearInterval(time_in);
i++;
}
function alpha(ttt) {
var _local1 = 0;
while (_local1 < ttt.length) {
ttt[_local1]._visible = 0;
_local1++;
}
}
var ld_ar = new Array(d_l1, d_l2, d_l3, d_l4, d_l5, d_l6, d_l7, d_l8, d_l9, d_l10, d_l11);
ld_ar.dd = "d_l";
var rd_ar = new Array(d_r1, d_r2, d_r3, d_r4, d_r5, d_r6, d_r7, d_r8, d_r9, d_r10, d_r11);
rd_ar.dd = "d_r";
var ru_ar = new Array(u_r1, u_r2, u_r3, u_r4, u_r5, u_r6, u_r7, u_r8, u_r9, u_r10, u_r11);
ru_ar.dd = "u_r";
var lu_ar = new Array(u_l1, u_l2, u_l3, u_l4, u_l5, u_l6, u_l7, u_l8, u_l9, u_l10, u_l11);
lu_ar.dd = "u_l";
var places = new Array();
alpha(ld_ar);
alpha(rd_ar);
alpha(ru_ar);
alpha(lu_ar);
function pachit(aaa) {
if (life <= 0) {
gotoAndStop ("gameover");
}
life_mc.gotoAndStop(life);
if (pac.hit > 0) {
if (pac.caneat == 0) {
myTransform.ba = myTransform.ba - 5;
myTransform.ga = myTransform.ga - 5;
my_color.setTransform(myTransform);
}
pac.hit--;
} else if (pac.hit < 0) {
pac.hit = 0;
}
if (pac.hit == 0) {
if (myTransform.ba < 100) {
myTransform.ba = myTransform.ba + 5;
myTransform.ga = myTransform.ga + 5;
my_color.setTransform(myTransform);
}
}
updateAfterEvent();
if (pac.caneat > 0) {
aaa.speed = 0;
myTransform.ra = myTransform.ra - 5;
myTransform.ba = myTransform.ba - 5;
my_color.setTransform(myTransform);
pac.caneat--;
}
if (pac.caneat < 0) {
pac.caneat = 0;
}
if ((pac.caneat == 0) && (pac.hit == 0)) {
pac.hit == 0;
if (myTransform.ra < 100) {
myTransform.ra = 100;
myTransform.ba = 100;
myTransform.ga = 100;
my_color.setTransform(myTransform);
}
}
updateAfterEvent();
}
function movea() {
check1(pac);
if (pac._rotation == 90) {
pac._x = pac._x + speed_pac;
}
if (pac._rotation == -90) {
pac._x = pac._x - speed_pac;
}
if (pac._rotation == 180) {
pac._y = pac._y + speed_pac;
}
if (pac._rotation == 0) {
pac._y = pac._y - speed_pac;
}
tt++;
if (tt >= 4) {
tt = 0;
clearInterval(intermove_pac);
}
updateAfterEvent();
}
function detectKeys() {
collet_ammo();
ammo_txt.text = ammo;
pac_graphic._x = pac._x;
pac_graphic._y = pac._y;
updateAfterEvent();
pacx.text = pac._x;
speed_pac = 5;
if (pac.hit > 8) {
speed_pac = 0;
}
if (Key.isDown(39) && (pac._x <= (760 - (pac._width / 2)))) {
clearInterval(intermove_pac);
check1(pac);
pac._x = pac._x + speed_pac;
pac._rotation = 90;
pac_graphic._rotation = 90;
if (pac_graphic._xscale == 100) {
pac_graphic._xscale = -pac_graphic._xscale;
}
if (pac_graphic._currentframe == "1") {
pac_graphic.nextFrame();
}
}
if (ammo == 0) {
pac.hand = 0;
}
if (Key.isDown(37) && (pac._x >= (0 + (pac._width / 2)))) {
clearInterval(intermove_pac);
check1(pac);
pac._x = pac._x - speed_pac;
if (pac_graphic._xscale == -100) {
pac_graphic._xscale = -pac_graphic._xscale;
}
pac_graphic._rotation = 270;
if (pac_graphic._currentframe == "1") {
pac_graphic.nextFrame();
}
}
if (Key.isDown(38) && (pac._y >= 70)) {
clearInterval(intermove_pac);
check1(pac);
pac._y = pac._y - speed_pac;
pac._rotation = 0;
pac_graphic._rotation = 0;
if (pac_graphic._xscale == -100) {
pac_graphic._xscale = -pac_graphic._xscale;
}
if (pac_graphic._currentframe == "1") {
pac_graphic.nextFrame();
}
}
if (Key.isDown(40) && (pac._y <= (500 - (pac._height / 2)))) {
clearInterval(intermove_pac);
check1(pac);
pac._rotation = 180;
pac._y = pac._y + speed_pac;
pac_graphic._rotation = 180;
if (pac_graphic._xscale == -100) {
pac_graphic._xscale = -pac_graphic._xscale;
}
if (pac_graphic._currentframe == "1") {
pac_graphic.nextFrame();
}
}
updateAfterEvent();
}
function check1(hit) {
var _local1 = 0;
while (_local1 < wall_ar.length) {
var _local5 = (wall_ar[_local1]._x - (wall_ar[_local1]._width / 2)) - 2;
var _local3 = (wall_ar[_local1]._x + (wall_ar[_local1]._width / 2)) + 2;
var _local4 = (wall_ar[_local1]._y - (wall_ar[_local1]._height / 2)) - 2;
var _local6 = (wall_ar[_local1]._y + (wall_ar[_local1]._height / 2)) + 2;
if (((hit._x >= _local5) && (hit._x <= _local3)) && ((hit._y <= _local6) && (hit._y >= _local4))) {
if (Key.isDown(38) && ((hit._y - (hit._height / 2)) >= (wall_ar[_local1]._y - 3))) {
guideof(ld_ar);
guideof(rd_ar);
guideof(ru_ar);
guideof(lu_ar);
speed_pac = 0;
trace("we cant up");
}
if (Key.isDown(40) && ((hit._y + (hit._height / 2)) <= (wall_ar[_local1]._y + 3))) {
guideof(ld_ar);
guideof(rd_ar);
guideof(ru_ar);
guideof(lu_ar);
speed_pac = 0;
trace("we cant down");
}
if (Key.isDown(39) && ((hit._x + (hit._width / 2)) <= (wall_ar[_local1]._x + 3))) {
guideof(ld_ar);
guideof(rd_ar);
guideof(ru_ar);
guideof(lu_ar);
speed_pac = 0;
trace("we cant right");
}
if (Key.isDown(37) && ((hit._x - (hit._width / 2)) >= (wall_ar[_local1]._x - 3))) {
guideof(ld_ar);
guideof(rd_ar);
guideof(ru_ar);
guideof(lu_ar);
speed_pac = 0;
trace("we cant left");
}
}
_local1++;
}
}
var pac_graphic1 = attachMovie("pacman_graphic2", "pac_graphic", 1);
var pac_graphic1 = attachMovie("hand_pac", "hand_pac", 1002);
var pac_graphic1 = attachMovie("m14_pac", "m14_pac", 1003);
var pac_graphic1 = attachMovie("m1_pac", "m1_pac", 1004);
pac_graphic._x = pac._x;
pac_graphic._y = pac._y;
pac._visible = 0;
pac.hit = "0";
pac.caneat = "0";
var interhit;
var tt = 0;
var my_color = new Color(_root.pac_graphic);
var myTransform = my_color.getTransform();
var ammo = 0;
var pac_weapon = new Array();
pac_weapon[0] = hand_pac;
pac_weapon[1] = m14_pac;
pac_weapon[2] = m1_pac;
interhit = setInterval(pachit, 50);
pac_graphic._currentframe = 1;
var oKey = new Object();
var wall_ar = new Array(wall1, wall2, wall3, wall4, wall5, wall6, wall7, wall8, wall9, wall10, wall11, wall12, wall13, wall14, wall15, wall16, wall17, wall18, wall19, wall20, wall21, wall22, wall23);
var speed_pac = 3;
var score_num = 0;
pac_graphic._xscale = 100;
Key.addListener(oKey);
var a = 0;
function collectcoin() {
if (end >= 60) {
score_num = score_num - ((sec1 * min1) * 5);
gotoAndStop ("level3");
end = 0;
trace("end");
}
backu(backs_u_ar, pac);
backu(backs_l_ar, pac);
backu(backs_d_ar, pac);
backu(backs_r_ar, pac);
var _local1 = 0;
while (_local1 < gold_ar.length) {
if (pac.hitTest(gold_ar[_local1]._x, gold_ar[_local1]._y, yes)) {
pac_graphic.gotoAndPlay("eat");
scoreplus("point_p_10", gold_ar[_local1]);
gold_ar[_local1]._x = 800;
gold_ar[_local1]._y = 1000;
removeMovieClip(gold_ar[_local1]);
my_sound.attachSound("blip.mp3");
my_sound.start();
score_num = score_num + 10;
score.text = score_num;
end++;
}
_local1++;
}
_local1 = 0;
while (_local1 < gold_big_ar.length) {
if (pac.hitTest(gold_big_ar[_local1]._x, gold_big_ar[_local1]._y, yes)) {
pac.caneat = 80;
pac_graphic.gotoAndPlay("eat");
scoreplus("point_p_10", gold_big_ar[_local1]);
gold_big_ar[_local1]._x = 800;
gold_big_ar[_local1]._y = 1000;
removeMovieClip(gold_ar[_local1]);
my_sound.attachSound("blip.mp3");
my_sound.start();
score_num = score_num + 10;
score.text = score_num;
}
_local1++;
}
}
function backu(ttt, sss) {
var _local3 = 0;
while (_local3 < 15) {
if (sss.hitTest(ttt[_local3])) {
if (ttt.info == "up") {
sss._y = 480;
} else if (ttt.info == "left") {
sss._x = 730;
} else if (ttt.info == "down") {
sss._y = 90;
} else if (ttt.info == "right") {
sss._x = 20;
}
}
_local3++;
}
}
function scoreplus(sss, aaa) {
clearinterval(noscore);
s_score = "point_p_10" + scoree;
var _local1 = attachMovie(sss, s_score, scoree + 200000);
scoree++;
_local1._x = aaa._x;
_local1._y = aaa._y;
score_MC_AR[scoree] = _local1;
noscore = setInterval(score_fade, 20, score_MC_AR[scoree]);
score_MC_AR_del[scoree] = noscore;
}
function score_fade(bbb) {
bbb._y = bbb._y - 3;
bbb._alpha = bbb._alpha - 5;
if (bbb._alpha <= 10) {
clearInterval(score_MC_AR[bbb]);
}
}
var gold_ar = new Array(gold, gold1, gold2, gold3, gold4, gold5, gold6, gold7, gold8, gold9, gold10, gold11, gold12, gold13, gold14, gold15, gold16, gold17, gold18, gold19, gold20, gold21, gold22, gold23, gold24, gold25, gold26, gold27, gold28, gold29, gold30, gold31, gold32, gold33, gold34, gold35, gold36, gold37, gold38, gold39, gold40, gold41, gold42, gold43, gold44, gold45, gold46, gold47, gold48, gold49, gold50, gold51, gold52, gold53, gold54, gold55, gold56, gold57, gold58, gold59, gold60, gold61, gold62, gold63, gold64, gold65, gold66, gold67, gold68, gold69, gold70, gold71, gold72, gold73, gold74, gold75, gold76, gold77, gold78, gold79, gold80, gold81, gold82, gold83, gold84, gold85, gold86, gold87, gold88, gold89, gold90, gold91, gold92, gold93, gold94, gold95, gold96, gold97, gold98, gold99);
var gold_big_ar = new Array(gold_big1, gold_big2, gold_big3, gold_big4);
var my_sound = new Sound();
var backs_u_ar = new Array(u_back, u_back1, u_back2);
backs_u_ar.info = "up";
var backs_l_ar = new Array(l_back, l_back1, l_back2);
backs_l_ar.info = "left";
var backs_d_ar = new Array(d_back, d_back1, d_back2);
backs_d_ar.info = "down";
var backs_r_ar = new Array(r_back, r_back1, r_back2);
backs_r_ar.info = "right";
var allback = new Array(backs_u_ar, backs_l_ar, backs_r_ar, backs_d_ar);
var i = 0;
while (i < 30) {
var j = 0;
while (j < 10) {
allback[i][j]._visible = 0;
c_guide_ar[j]._visible = 0;
j++;
}
i++;
}
var end = 0;
var oKey1 = new Object();
Key.addListener(oKey1);
var scoree = 0;
var noscore;
var score_MC_AR_del = new Array();
var score_MC_AR = new Array();
function enem_move(ttt, gun, add1) {
if (ttt != undefined) {
shoot_enem(ttt, gun);
check_hit_pac(ttt);
check2(ttt);
backu1(backs_u_ar, ttt);
backu1(backs_l_ar, ttt);
backu1(backs_d_ar, ttt);
backu1(backs_r_ar, ttt);
}
if (ttt.pos == "left") {
ttt._x = ttt._x - ttt.speed;
ttt._rotation = 270;
if ((ttt._xscale <= -90) && (ttt._currentframe == 1)) {
ttt._xscale = -ttt._xscale;
}
}
if (ttt.pos == "right") {
ttt._x = ttt._x + ttt.speed;
ttt._rotation = 90;
if ((ttt._xscale >= 90) && (ttt._currentframe == 1)) {
ttt._xscale = -ttt._xscale;
}
}
if (ttt.pos == "up") {
ttt._y = ttt._y - ttt.speed;
ttt._rotation = 0;
if ((ttt._xscale <= -90) && (ttt._currentframe == 1)) {
ttt._xscale = -ttt._xscale;
}
}
if (ttt.pos == "down") {
ttt._y = ttt._y + ttt.speed;
ttt._rotation = 180;
if ((ttt._xscale <= -90) && (ttt._currentframe == 1)) {
ttt._xscale = -ttt._xscale;
}
}
if (ttt.pos == "mixed") {
var _local6 = ttt._rotation + 10;
dx = Math.cos((Math.PI/180) * _local6);
dy = Math.sin((Math.PI/180) * _local6);
ttt._x = ttt._x + (dx * ttt.speed);
ttt._y = ttt._y + (dy * ttt.speed);
}
gun._x = ttt._x;
gun._y = ttt._y;
gun._rotation = ttt._rotation;
gun._xscale = ttt._xscale;
add1._x = ttt._x;
add1._y = ttt._y;
add1._rotation = ttt._rotation;
add1._xscale = ttt._xscale;
var _local2 = 0;
while (_local2 < c_guide_ar.length) {
if ((((((ttt._x >= (c_guide_ar[_local2]._x - 5)) && (ttt._x <= (c_guide_ar[_local2]._x + 5))) && (ttt._y >= (c_guide_ar[_local2]._y - 5))) && (ttt._y <= (c_guide_ar[_local2]._y + 5))) && (ttt.a >= 6)) && (ttt.hitTest(c_guide_ar[_local2]))) {
ttt.a = 0;
if ((ttt._x >= (pac._x - 4)) && (ttt._x <= (pac._x + 4))) {
if (ttt._y <= pac._y) {
ttt.pos = "down";
}
if (ttt._y > pac._y) {
ttt.pos = "up";
}
} else if ((ttt._y >= (pac._y - 4)) && (ttt._y <= (pac._y + 4))) {
if (ttt._x <= pac._x) {
ttt.pos = "right";
}
if (ttt._x > pac._x) {
ttt.pos = "left";
}
} else {
var _local3 = random(3);
switch (_local3) {
case 0 :
ttt.pos = "down";
ttt.a = "0";
ttt._y = ttt._y + 3;
break;
case 1 :
ttt.pos = "up";
ttt.a = "0";
ttt._y = ttt._y - 3;
break;
case 2 :
ttt.pos = "right";
ttt.a = "0";
ttt._x = ttt._x + 3;
break;
case 3 :
ttt.pos = "left";
ttt.a = "0";
ttt._x = ttt._x - 3;
}
}
} else if (ttt.hitTest(c_guide_ar[_local2]) == false) {
ttt.a = ttt.a + 1;
}
_local2++;
}
updateAfterEvent();
}
function backu1(ttt, sss) {
var _local3 = 0;
while (_local3 < 15) {
if (sss.hitTest(ttt[_local3])) {
if (ttt.info == "up") {
sss._y = 480;
} else if (ttt.info == "left") {
sss._x = 730;
} else if (ttt.info == "down") {
sss._y = 90;
} else if (ttt.info == "right") {
sss._x = 20;
}
}
_local3++;
}
}
function check2(hit) {
var _local3 = 0;
while (_local3 < wall_ar.length) {
var _local6 = (wall_ar[_local3]._x - (wall_ar[_local3]._width / 2)) - 2;
var _local4 = (wall_ar[_local3]._x + (wall_ar[_local3]._width / 2)) + 2;
var _local5 = (wall_ar[_local3]._y - (wall_ar[_local3]._height / 2)) - 2;
var _local7 = (wall_ar[_local3]._y + (wall_ar[_local3]._height / 2)) + 2;
if ((((hit._x + (hit._width / 2)) >= _local6) && ((hit._x - (hit._width / 2)) <= _local4)) && ((((hit._y - (hit._height / 2)) <= _local7) && ((hit._y + (hit._height / 2)) >= _local5)) && (hit._currentframe == 1))) {
var _local2 = random(2);
if ((hit.pos == "left") && (hit.wall >= 1)) {
hit._x = hit._x + 4;
if (_local2 == 0) {
hit.pos = "right";
} else if (_local2 == 1) {
hit.pos = "up";
} else if (_local2 == 2) {
hit.pos = "down";
}
hit.wall = 0;
} else if ((hit.pos == "right") && (hit.wall >= 1)) {
hit._x = hit._x - 4;
if (_local2 == 0) {
hit.pos = "left";
} else if (_local2 == 1) {
hit.pos = "up";
} else if (_local2 == 2) {
hit.pos = "down";
}
hit.wall = 0;
} else if ((hit.pos == "up") && (hit.wall >= 1)) {
hit._y = hit._y + 4;
if (_local2 == 0) {
hit.pos = "right";
} else if (_local2 == 1) {
hit.pos = "left";
} else if (_local2 == 2) {
hit.pos = "down";
}
hit.wall = 0;
} else if ((hit.pos == "down") && (hit.wall >= 1)) {
hit._y = hit._y - 4;
if (_local2 == 0) {
hit.pos = "right";
} else if (_local2 == 2) {
hit.pos = "left";
} else if (_local2 == 2) {
hit.pos = "up";
}
hit.wall = 0;
}
} else if (hit.wall == 0) {
hit.wall = hit.wall + 1;
}
_local3++;
}
}
function fade_enemy(aaa, count) {
if (aaa._currentframe != 1) {
fade_enem_ar[count]++;
if ((fade_enem_ar[count] >= 10) && ((sec1 > 1) || (min1 > 1))) {
aaa._y = 1000;
aaa._x = 1000;
clearInterval(bbb[aaa.id]);
removeMovieClip(aaa);
fade_enem_ar[count] = 0;
clearInterval(count_ar[count]);
}
}
}
function check_hit_pac(hit) {
var _local6 = (pac._x - (pac._width / 2)) - 4;
var _local4 = (pac._x + (pac._width / 2)) + 4;
var _local5 = (pac._y - (pac._height / 2)) - 4;
var _local7 = (pac._y + (pac._height / 2)) + 4;
if (((((hit._x + (hit._width / 2)) >= _local6) && ((hit._x - (hit._width / 2)) <= _local4)) && (((hit._y - (hit._height / 2)) <= _local7) && ((hit._y + (hit._height / 2)) >= _local5))) && (pac.caneat <= 0)) {
if (((hit.pos == "left") && (hit.pac >= 1)) && (hit._currentframe == 1)) {
hit._x = hit._x + 4;
hit.pos = "right";
hit.pac = 0;
if (pac.hit == 0) {
pac.hit = 16;
if (pac.caneat <= 0) {
life--;
}
}
}
if (((hit.pos == "right") && (hit.pac >= 1)) && (hit._currentframe == 1)) {
hit._x = hit._x - 4;
hit.pos = "left";
hit.pac = 0;
if (pac.hit == 0) {
pac.hit = 16;
life--;
if (pac.caneat == 0) {
life--;
}
}
}
if (((hit.pos == "up") && (hit.pac >= 1)) && (hit._currentframe == 1)) {
hit._y = hit._y + 4;
hit.pos = "down";
hit.pac = 0;
if (pac.hit == 0) {
pac.hit = 16;
life--;
if (pac.caneat == 0) {
life--;
}
}
}
if (((hit.pos == "down") && (hit.pac >= 1)) && (hit._currentframe == 1)) {
hit._y = hit._y - 4;
hit.pos = "up";
hit.pac = 0;
if (pac.hit == 0) {
pac.hit = 16;
life--;
if (pac.caneat == 0) {
life--;
}
}
} else if (hit.hitTest(pac) == false) {
hit.pac = hit.pac + 1;
}
}
if (((((hit._x + (hit._width / 2)) >= _local6) && ((hit._x - (hit._width / 2)) <= _local4)) && (((hit._y - (hit._height / 2)) <= _local7) && ((hit._y + (hit._height / 2)) >= _local5))) && (pac.caneat > 0)) {
if (pac.caneat > 0) {
if ((aeee <= 0) && (hit._currentframe == 1)) {
var _local3 = 0;
while (_local3 < hand_en_ar.length) {
if (hand_en_ar[_local3].id == hit.id) {
hand_en_ar[_local3].gotoAndPlay(2);
}
if (addons_ar[_local3].id == hit.id) {
addons_ar[_local3].gotoAndPlay(2);
}
_local3++;
}
hit.speed = 0;
hit.gotoAndPlay(2);
num_enemys--;
_root.scoreplus("point_p_20", hit);
score_num = score_num + 20;
score.text = score.text - -20;
enem_count++;
trace("enem_count=" + enem_count);
fade_enem_ar[enem_count] = 0;
inter_enemy_aa = setInterval(fade_enemy, 40, hit, enem_count);
}
count_ar[enem_count] = inter_enemy_aa;
}
}
}
function addenemy(enem_mca, rax, gax, bax, gun, addon) {
var _local2 = enem_ar.length;
trace(_local2);
var _local3 = this.attachMovie(enem_mca, ("enemy" + _local2) + 1, _local2 + 10000);
var _local5 = this.attachMovie(gun, ("hand_en" + _local2) + 1, (_local2 + 10000) + 6000);
var _local4 = this.attachMovie(addon, ("addon_" + _local2) + 1, (_local2 + 10000) + 3000);
var _local6 = random(400) + 100;
_local3._x = _local6;
_local3._y = 207;
_local5._x = _local6;
_local5._y = 207;
_local4._x = _local6;
_local4._y = 207;
_local3._currentframe = 1;
_local5._currentframe = 1;
_local4._currentframe = 1;
var _local10 = new Color(_local3.color4);
var _local9 = new Color(_local3.body);
var _local7 = {ra:rax, ga:gax, ba:bax, aa:100};
_local10.setTransform(_local7);
_local9.setTransform(_local7);
enem_ar[_local2] = _local3;
hand_en_ar[_local2] = _local5;
addons_ar[_local2] = _local4;
enem_ar[_local2].id = _local2;
hand_en_ar[_local2].id = _local2;
addons_ar[_local2].id = _local2;
hand_en_ar[_local2].kindof = gun;
enem_ar[_local2].a = "6";
enem_ar[_local2].wall = "5";
enem_ar[_local2].pac = "0";
enem_ar[_local2].ifstop = "0";
num_enemys++;
enem_ar[_local2].pos = "left";
enem_ar[_local2].speed = 2;
inter_en = setInterval(enem_move, 16, enem_ar[_local2], hand_en_ar[_local2], addons_ar[_local2]);
var _local8 = inter_en;
bbb[_local2] = _local8;
}
function addenemy_pos(enem_mca, rax, gax, bax, gun, addon, tx, ty) {
var _local2 = enem_ar.length;
trace(_local2);
var _local3 = this.attachMovie(enem_mca, ("enemy" + _local2) + 1, _local2 + 10000);
var _local5 = this.attachMovie(gun, ("hand_en" + _local2) + 1, (_local2 + 10000) + 6000);
var _local4 = this.attachMovie(addon, ("addon_" + _local2) + 1, (_local2 + 10000) + 3000);
var _local12 = random(400) + 100;
_local3._x = tx;
_local3._y = ty;
_local5._x = tx;
_local5._y = ty;
_local4._x = tx;
_local4._y = ty;
_local3._currentframe = 1;
_local5._currentframe = 1;
_local4._currentframe = 1;
var _local11 = new Color(_local3.color4);
var _local10 = new Color(_local3.body);
var _local6 = {ra:rax, ga:gax, ba:bax, aa:100};
_local11.setTransform(_local6);
_local10.setTransform(_local6);
enem_ar[_local2] = _local3;
hand_en_ar[_local2] = _local5;
addons_ar[_local2] = _local4;
enem_ar[_local2].id = _local2;
hand_en_ar[_local2].id = _local2;
addons_ar[_local2].id = _local2;
hand_en_ar[_local2].kindof = gun;
enem_ar[_local2].a = "6";
enem_ar[_local2].wall = "5";
enem_ar[_local2].pac = "0";
enem_ar[_local2].ifstop = "0";
num_enemys++;
enem_ar[_local2].pos = "left";
enem_ar[_local2].speed = 2;
inter_en = setInterval(enem_move, 16, enem_ar[_local2], hand_en_ar[_local2], addons_ar[_local2]);
var _local7 = inter_en;
bbb[_local2] = _local7;
}
var i = 0;
while (i < enem_ar.length) {
clearInterval(bbb[i]);
enem_ar[i].id.tt = 0;
i++;
}
var enem_count = 0;
var num_enemys = 4;
life = 10;
var inter_en;
var enem_ar = new Array(enemy1, enemy3);
var hand_en_ar = new Array(hand_en1);
var addons_ar = new Array();
enem_ar[0].a = "6";
enem_ar[0].wall = "5";
enem_ar[0].ifstop = "0";
enem_ar[0].pac = "0";
enem_ar[0].id = "0";
hand_en_ar[0].id = "0";
hand_en_ar[0].kindof = "hand_en2";
enem_ar[1].a = "6";
enem_ar[1].wall = "5";
enem_ar[1].pac = "0";
enem_ar[1].id = "1";
enem_ar[1].ifstop = "0";
enem_ar[2].a = "6";
enem_ar[2].wall = "5";
enem_ar[2].pac = "0";
enem_ar[2].id = "2";
enem_ar[2].ifstop = "0";
var c_guide_ar = new Array(c_guide1, c_guide2, c_guide3, c_guide4, c_guide5, c_guide6, c_guide7, c_guide8, c_guide9, c_guide10, c_guide11);
var i = 0;
while (i < 30) {
c_guide_ar[i]._visible = 0;
i++;
}
enem_ar[0].pos = "left";
enem_ar[0].speed = 2;
enem_ar[1].pos = "right";
enem_ar[1].speed = 2;
enem_ar[2].pos = "right";
enem_ar[2].speed = 2;
var inter_en;
var bbb = new Array();
var i = 0;
while (i < enem_ar.length) {
inter_en = setInterval(enem_move, 20, enem_ar[i], hand_en_ar[i]);
var ttt = inter_en;
bbb[i] = ttt;
i++;
}
var inter_enemy_aa;
var fade_enem_ar = new Array();
var aeee = 0;
clearInterval(inter_mmm);
var pac_mp3 = new Sound();
var wall_mp3 = new Sound();
var inter_mmm;
inter_mmm = setInterval(movenemyss, 1000);
function bull_hit_pac(bulll) {
if (((((((bulll._x > (pac._x - (pac._width / 2))) && (bulll._x < (pac._x + (pac._width / 2)))) && (bulll._y > (pac._y - (pac._height / 2)))) && (bulll._y < (pac._y + (pac._height / 2)))) && (bulll._currentframe == 1)) && (pac.hit <= 0)) && (pac.caneat == 0)) {
life--;
bulll.gotoAndPlay(2);
pac.hit = 16;
bulll.speed = 0;
}
var _local1 = 0;
while (_local1 < wall_ar.length) {
if (((((bulll._x > (wall_ar[_local1]._x - (wall_ar[_local1]._width / 2))) && (bulll._x < (wall_ar[_local1]._x + (wall_ar[_local1]._width / 2)))) && (bulll._y > (wall_ar[_local1]._y - (wall_ar[_local1]._height / 2)))) && (bulll._y < (wall_ar[_local1]._y + (wall_ar[_local1]._height / 2)))) && (bulll._currentframe == 1)) {
bulll.gotoAndPlay(2);
wall_ar[_local1].hit == 16;
bulll.speed = 0;
}
_local1++;
}
}
function hand_where() {
if (pac.hand == 0) {
var _local2 = 0;
while (_local2 < pac_weapon.length) {
pac_weapon[_local2]._x = 1000;
pac_weapon[_local2]._y = 1000;
_local2++;
}
}
var _local1 = 0;
while (_local1 < 200) {
if (pac.hand == _local1) {
pac_weapon[_local1 - 1]._x = pac._x;
pac_weapon[_local1 - 1]._y = pac._y;
pac_weapon[_local1 - 1]._rotation = pac_graphic._rotation;
pac_weapon[_local1 - 1]._xscale = pac_graphic._xscale;
}
_local1++;
}
_local1 = 0;
while (_local1 < 200) {
if (pac.hand != _local1) {
pac_weapon[_local1 - 1]._x = 1000;
pac_weapon[_local1 - 1]._Y = 1000;
}
_local1++;
}
if ((Key.isDown(32) && (go33 >= 1)) && (ammo > 0)) {
ammo--;
if (pac_weapon[pac.hand - 1] == pac_weapon[0]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 2;
enemy_mp4.attachSound("gunshots_sm.wav");
enemy_mp4.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[1]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 2;
enemy_mp3.attachSound("GUN04_cop.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[2]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 1;
enemy_mp3.attachSound("GUN04_cop.wav");
enemy_mp3.start();
}
}
}
function shoot_en_bul2(gun, bullet) {
ebullpac++;
gun.gun.gotoAndPlay(2);
var _local3 = this.attachMovie(bullet, ("ball_pac" + ebullpac) + 1, ebullpac + 150000);
pac_shoot[ebullpac] = _local3;
gun_rad = Math.atan2(gun.gun._y, gun.gun._x);
gun_deg = (gun_rad * 180) / Math.PI;
rotat = gun._rotation + ((gun_deg - 360) + 90);
dx = Math.sin((Math.PI/180) * rotat);
dy = Math.cos((Math.PI/180) * rotat);
gun_xscal = Math.abs(gun._xscale);
pac_shoot_num[ebullpac] = 0;
dx_ar_pac[ebullpac] = dx;
yx_ar_pac[ebullpac] = dy;
_local3._x = gun._x + (dx * (-gun.gun._y));
_local3._y = gun._y - (((dy * (-gun.gun._y)) * gun._xscale) / gun_xscal);
dx = Math.sin((Math.PI/180) * (rotat + 6));
dy = Math.cos((Math.PI/180) * (rotat + 6));
dx_ar_pac[ebullpac] = dx;
yx_ar_pac[ebullpac] = dy;
if (bullet == "ball2") {
_local3.speed = 5;
bull_move_ene2 = setInterval(ball_move2, 20, pac_shoot[ebullpac], ebullpac, gun.range, gun);
pac_shoot_ar[ebullpac] = bull_move_ene2;
}
}
function ball_move2(bullet, numm24, rangeofammo2, ffgun) {
bull_hit_enem(pac_shoot[numm24]);
bullspeed1 = pac_shoot[numm24].speed;
bullet._x = bullet._x + (dx_ar_pac[numm24] * bullspeed1);
bullet._y = bullet._y - (yx_ar_pac[numm24] * bullspeed1);
pac_shoot_num[numm24]++;
if ((pac_shoot_num[numm24] == (rangeofammo2 / 2)) && (ffgun.rate1 == "semi")) {
go33 = 1;
}
if ((pac_shoot_num[numm24] >= rangeofammo2) && (ffgun.rate1 == "mono")) {
go33 = 1;
}
if (pac_shoot_num[numm24] >= rangeofammo2) {
removeMovieClip(pac_shoot[numm24]);
clearInterval(pac_shoot_ar[numm24]);
pac_shoot_num[numm24] = 0;
}
}
function bull_hit_enem(bulll) {
var _local4 = 0;
while (_local4 < enem_ar.length) {
if ((((((bulll._x > (enem_ar[_local4]._x - (enem_ar[_local4]._width / 2))) && (bulll._x < (enem_ar[_local4]._x + (enem_ar[_local4]._width / 2)))) && (bulll._y > (enem_ar[_local4]._y - (enem_ar[_local4]._height / 2)))) && (bulll._y < (enem_ar[_local4]._y + (enem_ar[_local4]._height / 2)))) && (bulll._currentframe == 1)) && (enem_ar[_local4]._currentframe == 1)) {
var _local2 = 0;
while (_local2 < hand_en_ar.length) {
if (hand_en_ar[_local2].id == enem_ar[_local4].id) {
hand_en_ar[_local2].gotoAndPlay(2);
}
if (addons_ar[_local2].id == enem_ar[_local4].id) {
addons_ar[_local2].gotoAndPlay(2);
}
_local2++;
}
bulll.gotoAndPlay(2);
enem_count++;
enem_ar[_local4].speed = 0;
num_enemys--;
_root.scoreplus("point_p_20", enem_ar[_local4]);
score_num = score_num + 20;
score.text = score.text - -20;
enem_ar[_local4].gotoAndPlay(2);
fade_enem_ar[enem_count] = 0;
inter_enemy_aa2 = setInterval(fade_enemy, 40, enem_ar[_local4], enem_count);
count_ar[enem_count] = inter_enemy_aa2;
trace("count=" + count_ar[enem_count]);
bulll.speed = 0;
}
_local4++;
}
_local4 = 0;
while (_local4 < wall_ar.length) {
if (((((bulll._x > (wall_ar[_local4]._x - (wall_ar[_local4]._width / 2))) && (bulll._x < (wall_ar[_local4]._x + (wall_ar[_local4]._width / 2)))) && (bulll._y > (wall_ar[_local4]._y - (wall_ar[_local4]._height / 2)))) && (bulll._y < (wall_ar[_local4]._y + (wall_ar[_local4]._height / 2)))) && (bulll._currentframe == 1)) {
bulll.gotoAndPlay(2);
wall_ar[_local4].hit == 16;
bulll.speed = 0;
}
_local4++;
}
}
function collet_ammo() {
var _local1 = 0;
while (_local1 < 180) {
if ((((ammo_ar_take[_local1]._x > (pac._x - (pac._width / 2))) && (ammo_ar_take[_local1]._x < (pac._x + (pac._width / 2)))) && (ammo_ar_take[_local1]._y > (pac._y - (pac._height / 2)))) && (ammo_ar_take[_local1]._y < (pac._y + (pac._height / 2)))) {
trace("t=" + _local1);
if (_local1 == 0) {
ammo = 10 + _local1;
}
if (_local1 == 1) {
ammo = 6 + _local1;
}
if (_local1 == 2) {
ammo = 4 + _local1;
}
pac.hand = _local1 + 1;
trace(pac.hand);
ammo_ar_take[_local1]._x = 900;
ammo_ar_take[_local1]._y = 900;
}
_local1++;
}
}
var go33 = 1;
pac.hand = 0;
var bull_move_ene2;
var pac_shoot_ar = new Array();
var pac_shoot_num = new Array();
var pac_shoot = new Array();
var ebullpac = 0;
var dx_ar_pac = new Array();
var yx_ar_pac = new Array();
var count_ar = new Array();
function timeof() {
sec1++;
clock.text = sec1;
if (sec1 >= 59) {
sec1 = 0;
min1++;
clock_min.text = min1;
}
if ((sec1 == 1) && (min1 == 0)) {
addenemy("enemy_swat", 90, 20, 90, "en_m1");
}
if (sec1 == 50) {
addenemy_pos("enemy_swat", 20, 20, 90, "en_m16", "helmet", 18, 117);
addenemy_pos("enemy_swat", 30, 20, 90, "en_m16", "helmet", 38, 433);
}
if ((sec1 == 10) && (num_enemys < 6)) {
addenemy("enemyzz", 0, 70, 20);
}
if ((((sec1 == 20) || (sec1 == 40)) || (sec1 == 0)) && (num_enemys < 5)) {
addenemy("enemyzz", 0, 50, 50, "hand_en");
}
if (sec1 == 1) {
ammo_ar_take[0]._x = 500;
ammo_ar_take[0]._y = 116;
}
if (sec1 == 2) {
ammo_ar_take[1]._x = 350;
ammo_ar_take[1]._y = 116;
}
if ((sec1 == 30) && (min1 == 0)) {
ammo_ar_take[2]._x = 100;
ammo_ar_take[2]._y = 116;
}
}
function ball_move(bullet, numm2, rangeofammo, numB) {
bull_hit_pac(ball_shoot[numm2]);
bullspeed = ball_shoot[numm2].speed;
bullet._x = bullet._x + (dx_ar[numm2] * bullspeed);
bullet._y = bullet._y - (yx_ar[numm2] * bullspeed);
ball_shoot_num[numm2]++;
if (ball_shoot_num[numm2] >= rangeofammo) {
removeMovieClip(ball_shoot[numm2]);
clearInterval(ball_shoot_ar[numm2]);
ball_shoot_num[numm2] = 0;
}
}
function shoot_en_bul(gun, enemy, bullet, num1, num444, num5555) {
ebull++;
if (enemy.speed == 0) {
var _local3 = this.attachMovie(bullet, ("ball" + ebull) + 1, ebull + 50000);
ball_shoot[ebull] = _local3;
gun_rad = Math.atan2(gun.gun._y, gun.gun._x);
gun_deg = (gun_rad * 180) / Math.PI;
rotat = gun._rotation + ((gun_deg - 360) + 90);
dx = Math.sin((Math.PI/180) * rotat);
dy = Math.cos((Math.PI/180) * rotat);
gun_xscal = Math.abs(gun._xscale);
ball_shoot_num[ebull] = 0;
dx_ar[ebull] = dx;
yx_ar[ebull] = dy;
_local3._x = gun._x + (dx * (-gun.gun._y));
_local3._y = gun._y - (((dy * (-gun.gun._y)) * gun._xscale) / gun_xscal);
rotat = gun._rotation + ((gun_deg - 360) + 90);
dx = Math.sin((Math.PI/180) * (rotat + 5));
dy = Math.cos((Math.PI/180) * (rotat + 5));
dx_ar[ebull] = dx;
yx_ar[ebull] = dy;
if (gun.kindof == "hand_en") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "hand_en2") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_m16") {
_local3.speed = 6;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_m1") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
}
}
function shoot_enema(zzz, eee, num) {
if (((eee.kindof == "hand_en") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 10) {
eee.number = 0;
enemy_mp4.attachSound("gunshots_sm.wav");
enemy_mp4.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 20, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "hand_en2") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 6) {
eee.number = 0;
enemy_mp3.attachSound("GUN04_cop.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 30, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_m16") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 3) {
eee.number = 0;
enemy_mp3.attachSound("M16.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 70, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
zzz.ifstop = 1;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_m1") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 6) {
eee.number = 0;
enemy_mp3.attachSound("GUN04_cop.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 70, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
}
function shoot_enem(ttt, aaa) {
if (((((((ttt._x >= (pac._x - 4)) && (ttt._x <= (pac._x + 4))) && (ttt.speed >= 2)) && (ttt != null)) && (ttt._y >= (pac._y - aaa.range))) && (ttt._y <= (pac._y + aaa.range))) && (aaa != null)) {
if ((ttt._y <= pac._y) && (ttt.speed >= 2)) {
var _local2 = 0;
while (_local2 < wall_ar.length) {
if (((((((ttt._x < (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2))) && (ttt._x > (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (if_right == 0)) && (pac._x > (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (pac._x < (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2)))) && (ttt._y < (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (pac._y > (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2)))) {
ttt.ifstop = 1;
}
_local2++;
}
trace("donw");
if (ttt.ifstop == 1) {
ttt.ifstop = 0;
} else if (ttt.ifstop == 0) {
shoot_d++;
enem_time_ar[shoot_d] = 0;
ttt.speed = 0;
ttt.pos = "down";
aaa.number = 1;
clearInterval(aaa.interr);
inter_shoot = setInterval(shoot_enema, 200, ttt, aaa, shoot_d);
enem_aar[shoot_d] = inter_shoot;
aaa.interr = inter_shoot;
}
}
if ((ttt._y > pac._y) && (ttt.speed >= 2)) {
var _local2 = 0;
while (_local2 < wall_ar.length) {
if (((((((ttt._x < (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2))) && (ttt._x > (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (if_right == 0)) && (pac._x > (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (pac._x < (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2)))) && (ttt._y > (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2)))) && (pac._y < (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) {
ttt.ifstop = 1;
}
_local2++;
}
if (ttt.ifstop == 1) {
ttt.ifstop = 0;
} else if (ttt.ifstop == 0) {
shoot_d++;
enem_time_ar[shoot_d] = 0;
ttt.speed = 0;
ttt.pos = "up";
}
aaa.number = 1;
clearInterval(aaa.interr);
inter_shoot = setInterval(shoot_enema, 200, ttt, aaa, shoot_d);
enem_aar[shoot_d] = inter_shoot;
aaa.interr = inter_shoot;
}
} else if (((((((ttt._y >= (pac._y - 4)) && (ttt._y <= (pac._y + 4))) && (ttt.speed >= 2)) && (ttt != null)) && (ttt._x >= (pac._x - aaa.range))) && (ttt._x <= (pac._x + aaa.range))) && (aaa != null)) {
if ((ttt._x <= pac._x) && (ttt.speed >= 2)) {
var _local2 = 0;
while (_local2 < wall_ar.length) {
if (((((((ttt._y < (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2))) && (ttt._y > (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (if_right == 0)) && (pac._y > (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (pac._y < (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2)))) && (ttt._x < (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (pac._x > (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2)))) {
ttt.ifstop = 1;
}
_local2++;
}
if (ttt.ifstop == 1) {
ttt.ifstop = 0;
} else if (ttt.ifstop == 0) {
shoot_d++;
enem_time_ar[shoot_d] = 0;
ttt.speed = 0;
aaa.number = 1;
ttt.pos = "right";
clearInterval(aaa.interr);
inter_shoot = setInterval(shoot_enema, 200, ttt, aaa, shoot_d);
enem_aar[shoot_d] = inter_shoot;
aaa.interr = inter_shoot;
}
}
if ((ttt._x > pac._x) && (ttt.speed >= 2)) {
var _local2 = 0;
while (_local2 < wall_ar.length) {
if (((((((ttt._y < (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2))) && (ttt._y > (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (if_right == 0)) && (pac._y > (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (pac._y < (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2)))) && (ttt._x > (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2)))) && (pac._x < (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) {
trace("okL");
ttt.ifstop = 1;
}
_local2++;
}
if (ttt.ifstop == 1) {
ttt.ifstop = 0;
} else if (ttt.ifstop == 0) {
shoot_d++;
enem_time_ar[shoot_d] = 0;
ttt.speed = 0;
aaa.number = 1;
ttt.pos = "left";
clearInterval(aaa.interr);
inter_shoot = setInterval(shoot_enema, 200, ttt, aaa, shoot_d);
enem_aar[shoot_d] = inter_shoot;
aaa.interr = inter_shoot;
}
}
}
}
clearInterval(time_in);
var time_in;
var sec1 = 0;
var min1 = 0;
var ebull = 0;
var ammo_ar_take = new Array();
ammo_ar_take[0] = gun_ammo;
ammo_ar_take[1] = m14_ammo;
ammo_ar_take[2] = m1_ammo;
time_in = setInterval(timeof, 1000);
addenemy("enemyzz", 70, 30, 50, "hand_en2");
addenemy("enemyzz", 90, 0, 30, "hand_en");
var shoot_d = 0;
var inter_shoot_c = 0;
var inter_shoot;
var inter_shootb;
var enem_aar = new Array();
var enem_time_ar = new Array();
var ball_shoot = new Array();
var bull_move_ene;
var ball_shoot_ar = new Array();
var ball_shoot_num = new Array();
var dx_ar = new Array();
var yx_ar = new Array();
var enemy_mp4 = new Sound();
var enemy_mp3 = new Sound();
var if_right = 0;
Instance of Symbol 425 MovieClip [empty] "controller" in Frame 4
onClipEvent (enterFrame) {
_root.detectKeys();
_root.collectcoin();
_root.hand_where();
updateAfterEvent();
}
Frame 5
if (ta == 2) {
gotoAndPlay (1);
}
clearInterval(interhit);
stop();
var i = 0;
while (i < enem_ar.length) {
removeMovieClip(enem_ar[i]);
removeMovieClip(pac_graphic);
removeMovieClip(hand_en_ar[i]);
removeMovieClip(hand_pac);
removeMovieClip(addons_ar[i]);
removeMovieClip(places[i]);
removeMovieClip(explode_ar[i]);
i++;
}
var gonext4 = 0;
var i = 0;
while (i < 10000) {
clearInterval(i);
clearInterval(score_MC_AR_del[i]);
removeMovieClip(score_MC_AR[i]);
clearInterval(interhit);
clearInterval(enem_aar[i]);
clearInterval(bbb[i]);
clearInterval(ball_shoot_ar[i]);
removeMovieClip(ball_shoot[i]);
clearInterval(pac_shoot_ar);
removeMovieClip(pac_shoot[i]);
clearInterval(count_ar[i]);
fade_enem_ar[i] = 0;
removeMovieClip(ammo_ar_take[i]);
removeMovieClip(enem_add);
removeMovieClip(gun_add);
removeMovieClip(pac_weapon[i]);
clearInterval(time_in);
i++;
}
if (uover == 100) {
clearInterval(uover_in);
gotoAndPlay (6);
}
function goover() {
uover--;
}
function play44() {
gotoAndPlay (6);
}
var uover_in;
uover = 5;
uover_in = setInterval(goover, 1000);
function detectKeys() {
if (Key.isDown(32) && (_root.gonext4 == 4)) {
gotoAndStop (6);
}
}
Instance of Symbol 425 MovieClip [empty] "controller" in Frame 5
onClipEvent (enterFrame) {
_root.detectKeys();
}
Instance of Symbol 551 MovieClip "com" in Frame 5
on (press) {
getURL ("http://games.fs1.co.il", "_blank");
}
Frame 6
cc = 1;
zz = 0;
aa = 0;
stop();
clearInterval(interhit);
var i = 0;
while (i < enem_ar.length) {
removeMovieClip(enem_ar[i]);
removeMovieClip(pac_graphic);
removeMovieClip(hand_en_ar[i]);
removeMovieClip(hand_pac);
removeMovieClip(addons_ar[i]);
removeMovieClip(explode_ar[i]);
i++;
}
var i = 0;
while (i < 10000) {
clearInterval(i);
clearInterval(score_MC_AR_del[i]);
removeMovieClip(score_MC_AR[i]);
clearInterval(interhit);
clearInterval(enem_aar[i]);
clearInterval(bbb[i]);
clearInterval(ball_shoot_ar[i]);
removeMovieClip(ball_shoot[i]);
clearInterval(pac_shoot_ar);
removeMovieClip(pac_shoot[i]);
clearInterval(count_ar[i]);
fade_enem_ar[i] = 0;
removeMovieClip(ammo_ar_take[i]);
removeMovieClip(enem_add);
removeMovieClip(gun_add);
removeMovieClip(pac_weapon[i]);
clearInterval(time_in);
i++;
}
function alpha(ttt) {
var _local1 = 0;
while (_local1 < ttt.length) {
ttt[_local1]._visible = 0;
_local1++;
}
}
var ld_ar = new Array(d_l1, d_l2, d_l3, d_l4, d_l5, d_l6, d_l7, d_l8, d_l9, d_l10, d_l11);
ld_ar.dd = "d_l";
var rd_ar = new Array(d_r1, d_r2, d_r3, d_r4, d_r5, d_r6, d_r7, d_r8, d_r9, d_r10, d_r11);
rd_ar.dd = "d_r";
var ru_ar = new Array(u_r1, u_r2, u_r3, u_r4, u_r5, u_r6, u_r7, u_r8, u_r9, u_r10, u_r11);
ru_ar.dd = "u_r";
var lu_ar = new Array(u_l1, u_l2, u_l3, u_l4, u_l5, u_l6, u_l7, u_l8, u_l9, u_l10, u_l11);
lu_ar.dd = "u_l";
var places = new Array();
alpha(ld_ar);
alpha(rd_ar);
alpha(ru_ar);
alpha(lu_ar);
places[0] = monk_a0;
places[1] = monk_a1;
places[0]._x = 360;
places[0]._y = 330;
places[1]._x = 174;
places[1]._y = 330;
function guideof(ttt) {
var _local2 = 0;
while (_local2 < ttt.length) {
if (pac.hitTest(ttt[_local2]._x, ttt[_local2]._y, yes)) {
if (ttt.dd == "d_l") {
pac._x = pac._x - 4;
pac._y = pac._y + 4;
} else if (ttt.dd == "d_r") {
pac._x = pac._x + 4;
pac._y = pac._y + 4;
} else if (ttt.dd == "u_r") {
pac._x = pac._x + 4;
pac._y = pac._y - 4;
} else if (ttt.dd == "u_l") {
pac._x = pac._x - 4;
pac._y = pac._y - 4;
}
}
_local2++;
}
}
function pachit(aaa) {
if (life <= 0) {
score_num = score_num - 1000;
levelof = "level9";
gotoAndStop ("gameover");
}
life_mc.gotoAndStop(life);
if (pac.hit > 0) {
if (pac.caneat == 0) {
myTransform.ba = myTransform.ba - 5;
myTransform.ga = myTransform.ga - 5;
my_color.setTransform(myTransform);
}
pac.hit--;
} else if (pac.hit < 0) {
pac.hit = 0;
}
if (pac.hit == 0) {
if (myTransform.ba < 100) {
myTransform.ba = myTransform.ba + 5;
myTransform.ga = myTransform.ga + 5;
my_color.setTransform(myTransform);
}
}
updateAfterEvent();
if (pac.caneat > 0) {
aaa.speed = 0;
myTransform.ra = myTransform.ra - 5;
myTransform.ba = myTransform.ba - 5;
my_color.setTransform(myTransform);
pac.caneat--;
}
if (pac.caneat < 0) {
pac.caneat = 0;
}
if ((pac.caneat == 0) && (pac.hit == 0)) {
pac.hit == 0;
if (myTransform.ra < 100) {
myTransform.ra = 100;
myTransform.ba = 100;
myTransform.ga = 100;
my_color.setTransform(myTransform);
}
}
updateAfterEvent();
}
function movea() {
check1(pac);
if (pac._rotation == 90) {
pac._x = pac._x + speed_pac;
}
if (pac._rotation == -90) {
pac._x = pac._x - speed_pac;
}
if (pac._rotation == 180) {
pac._y = pac._y + speed_pac;
}
if (pac._rotation == 0) {
pac._y = pac._y - speed_pac;
}
tt++;
if (tt >= 4) {
tt = 0;
clearInterval(intermove_pac);
}
updateAfterEvent();
}
function detectKeys() {
collet_ammo();
ammo_txt.text = ammo;
greande_txt.text = pac.greande;
pac_graphic._x = pac._x;
pac_graphic._y = pac._y;
updateAfterEvent();
pacx.text = pac._x;
speed_pac = 5;
if (pac.hit > 8) {
speed_pac = 0;
}
if (Key.isDown(39) && (pac._x <= (760 - (pac._width / 2)))) {
clearInterval(intermove_pac);
check1(pac);
pac._x = pac._x + speed_pac;
pac._rotation = 90;
pac_graphic._rotation = 90;
if (pac_graphic._xscale == 100) {
pac_graphic._xscale = -pac_graphic._xscale;
}
if (pac_graphic._currentframe == "1") {
pac_graphic.nextFrame();
}
}
if (ammo == 0) {
pac.hand = 0;
}
if (Key.isDown(37) && (pac._x >= (0 + (pac._width / 2)))) {
clearInterval(intermove_pac);
check1(pac);
pac._x = pac._x - speed_pac;
if (pac_graphic._xscale == -100) {
pac_graphic._xscale = -pac_graphic._xscale;
}
pac_graphic._rotation = 270;
if (pac_graphic._currentframe == "1") {
pac_graphic.nextFrame();
}
}
if (Key.isDown(38) && (pac._y >= 70)) {
clearInterval(intermove_pac);
check1(pac);
pac._y = pac._y - speed_pac;
pac._rotation = 0;
pac_graphic._rotation = 0;
if (pac_graphic._xscale == -100) {
pac_graphic._xscale = -pac_graphic._xscale;
}
if (pac_graphic._currentframe == "1") {
pac_graphic.nextFrame();
}
}
if (Key.isDown(40) && (pac._y <= (500 - (pac._height / 2)))) {
clearInterval(intermove_pac);
check1(pac);
pac._rotation = 180;
pac._y = pac._y + speed_pac;
pac_graphic._rotation = 180;
if (pac_graphic._xscale == -100) {
pac_graphic._xscale = -pac_graphic._xscale;
}
if (pac_graphic._currentframe == "1") {
pac_graphic.nextFrame();
}
}
updateAfterEvent();
}
function check1(hit) {
var _local2 = 0;
while (_local2 < wall_ar.length) {
var _local5 = (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)) - 2;
var _local3 = (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2)) + 2;
var _local4 = (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)) - 2;
var _local6 = (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2)) + 2;
if ((((hit._x + (hit._width / 2)) >= _local5) && ((hit._x - (hit._width / 2)) <= _local3)) && (((hit._y - (hit._height / 2)) <= _local6) && ((hit._y + (hit._height / 2)) >= _local4))) {
if (Key.isDown(38) && ((hit._y - (hit._height / 2)) >= (wall_ar[_local2]._y - 3))) {
guideof(ld_ar);
guideof(rd_ar);
guideof(ru_ar);
guideof(lu_ar);
speed_pac = 0;
trace("we cant up");
}
if (Key.isDown(40) && ((hit._y + (hit._height / 2)) <= (wall_ar[_local2]._y + 3))) {
guideof(ld_ar);
guideof(rd_ar);
guideof(ru_ar);
guideof(lu_ar);
speed_pac = 0;
trace("we cant down");
}
if (Key.isDown(39) && ((hit._x + (hit._width / 2)) <= (wall_ar[_local2]._x + 3))) {
guideof(ld_ar);
guideof(rd_ar);
guideof(ru_ar);
guideof(lu_ar);
speed_pac = 0;
trace("we cant right");
}
if (Key.isDown(37) && ((hit._x - (hit._width / 2)) >= (wall_ar[_local2]._x - 3))) {
guideof(ld_ar);
guideof(rd_ar);
guideof(ru_ar);
guideof(lu_ar);
speed_pac = 0;
trace("we cant left");
}
}
_local2++;
}
}
var pac_graphic1 = attachMovie("pacman_graphic2", "pac_graphic", 1);
var pac_graphic1 = attachMovie("hand_pac", "hand_pac", 1002);
var pac_graphic1 = attachMovie("m14_pac", "m14_pac", 1003);
var pac_graphic1 = attachMovie("m1_pac", "m1_pac", 1004);
var pac_graphic1 = attachMovie("uzi_pac", "uzi_pac", 1005);
var pac_graphic1 = attachMovie("gal_pac", "gal_pac", 1006);
var pac_graphic1 = attachMovie("m16_pac", "m16_pac", 1007);
var pac_graphic1 = attachMovie("ak47_pac", "ak47_pac", 1008);
var pac_graphic1 = attachMovie("bizon_pac", "bizon_pac", 1009);
var pac_graphic1 = attachMovie("glock_pac", "glock_pac", 1010);
var pac_graphic1 = attachMovie("mp5hk_pac ", "mp5hk_pac", 1011);
var pac_graphic1 = attachMovie("sa80_pac ", "sa80_pac", 1012);
var pac_graphic1 = attachMovie("rpg_pac", "rpg_pac", 1013);
var pac_graphic1 = attachMovie("law_pac", "law_pac", 1014);
var pac_graphic1 = attachMovie("mp5g_pac", "mp5g_pac", 1015);
var pac_graphic1 = attachMovie("aug_pac ", "aug_pac", 1016);
var pac_graphic1 = attachMovie("shotgun_pac", "shotgun_pac", 1017);
var pac_graphic1 = attachMovie("law_camo_pac", "law_camo_pac", 1018);
var pac_graphic1 = attachMovie("mag_pac", "mag_pac", 1019);
var pac_graphic1 = attachMovie("m4_pac", "m4_pac", 1020);
var pac_graphic1 = attachMovie("commando_pac", "commando_pac", 1021);
var pac_graphic1 = attachMovie("m5_pac", "m5_pac", 1022);
var pac_graphic1 = attachMovie("m60_pac", "m60_pac", 1023);
var pac_graphic1 = attachMovie("mp5_sd_pac", "mp5_sd_pac", 1024);
var pac_graphic1 = attachMovie("desert_pac", "desert_pac", 1025);
var pac_graphic1 = attachMovie("g36_pac", "g36_pac", 1026);
var pac_graphic1 = attachMovie("at_pac", "at_pac", 1027);
var pac_graphic1 = attachMovie("m14_s_pac", "m14_s_pac", 1028);
var pac_graphic1 = attachMovie("m203_pac", "m203_pac", 1029);
var pac_graphic1 = attachMovie("bizon_la_pac", "bizon_la_pac", 1030);
var pac_graphic1 = attachMovie("g36_la_pac", "g36_la_pac", 1031);
pac_graphic._x = pac._x;
pac_graphic._y = pac._y;
pac._visible = 0;
pac.hit = "0";
pac.caneat = "0";
var interhit;
var tt = 0;
var my_color = new Color(_root.pac_graphic);
var myTransform = my_color.getTransform();
var ammo = 0;
var pac_weapon = new Array();
pac_weapon[0] = hand_pac;
pac_weapon[1] = m14_pac;
pac_weapon[2] = m1_pac;
pac_weapon[3] = uzi_pac;
pac_weapon[4] = gal_pac;
pac_weapon[5] = m16_pac;
pac_weapon[6] = ak47_pac;
pac_weapon[7] = bizon_pac;
pac_weapon[8] = glock_pac;
pac_weapon[9] = mp5hk_pac;
pac_weapon[10] = sa80_pac;
pac_weapon[11] = rpg_pac;
pac_weapon[12] = law_pac;
pac_weapon[13] = mp5g_pac;
pac_weapon[14] = aug_pac;
pac_weapon[15] = shotgun_pac;
pac_weapon[16] = law_camo_pac;
pac_weapon[17] = mag_pac;
pac_weapon[18] = m4_pac;
pac_weapon[19] = commando_pac;
pac_weapon[20] = m5_pac;
pac_weapon[21] = m60_pac;
pac_weapon[22] = mp5_sd_pac;
pac_weapon[23] = desert_pac;
pac_weapon[24] = g36_pac;
pac_weapon[25] = at_pac;
pac_weapon[26] = m14_s_pac;
pac_weapon[27] = m203_pac;
pac_weapon[28] = bizon_la_pac;
pac_weapon[29] = g36_la_pac;
interhit = setInterval(pachit, 50);
pac_graphic._currentframe = 1;
var oKey = new Object();
var wall_ar = new Array(wall1, wall2, wall3, wall4, wall5, wall6, wall7, wall8, wall9, wall10, wall11, wall12, wall13, wall14, wall15, wall16, wall17, wall18, wall19, wall20, wall21, wall22, wall23);
var speed_pac = 3;
pac_graphic._xscale = 100;
Key.addListener(oKey);
var a = 0;
function collectcoin() {
if (end >= 60) {
score_num = score_num - ((sec1 * min1) * 5);
score_num = score_num - ((10 - life) * 50);
gotoAndStop ("level11");
end = 0;
trace("end");
}
backu(backs_u_ar, pac);
backu(backs_l_ar, pac);
backu(backs_d_ar, pac);
backu(backs_r_ar, pac);
var _local1 = 0;
while (_local1 < gold_ar.length) {
if (pac.hitTest(gold_ar[_local1]._x, gold_ar[_local1]._y, yes)) {
pac_graphic.gotoAndPlay("eat");
scoreplus("point_p_10", gold_ar[_local1]);
gold_ar[_local1]._x = 800;
gold_ar[_local1]._y = 1000;
removeMovieClip(gold_ar[_local1]);
my_sound.attachSound("blip.mp3");
my_sound.start();
score_num = score_num + 10;
score.text = score_num;
end++;
}
_local1++;
}
_local1 = 0;
while (_local1 < gold_big_ar.length) {
if (pac.hitTest(gold_big_ar[_local1]._x, gold_big_ar[_local1]._y, yes)) {
pac.caneat = 80;
pac_graphic.gotoAndPlay("eat");
scoreplus("point_p_10", gold_big_ar[_local1]);
gold_big_ar[_local1]._x = 800;
gold_big_ar[_local1]._y = 1000;
removeMovieClip(gold_ar[_local1]);
my_sound.attachSound("blip.mp3");
my_sound.start();
score_num = score_num + 10;
score.text = score_num;
}
_local1++;
}
}
function backu(ttt, sss) {
var _local3 = 0;
while (_local3 < 15) {
if (sss.hitTest(ttt[_local3])) {
if (ttt.info == "up") {
sss._y = 480;
} else if (ttt.info == "left") {
sss._x = 730;
} else if (ttt.info == "down") {
sss._y = 90;
} else if (ttt.info == "right") {
sss._x = 20;
}
}
_local3++;
}
}
function scoreplus(sss, aaa) {
clearinterval(noscore);
s_score = "point_p_10" + scoree;
var _local1 = attachMovie(sss, s_score, scoree + 200000);
scoree++;
_local1._x = aaa._x;
_local1._y = aaa._y;
score_MC_AR[scoree] = _local1;
noscore = setInterval(score_fade, 20, score_MC_AR[scoree]);
score_MC_AR_del[scoree] = noscore;
}
function score_fade(bbb) {
bbb._y = bbb._y - 3;
bbb._alpha = bbb._alpha - 5;
if (bbb._alpha <= 10) {
clearInterval(score_MC_AR[bbb]);
}
}
var gold_ar = new Array(gold, gold1, gold2, gold3, gold4, gold5, gold6, gold7, gold8, gold9, gold10, gold11, gold12, gold13, gold14, gold15, gold16, gold17, gold18, gold19, gold20, gold21, gold22, gold23, gold24, gold25, gold26, gold27, gold28, gold29, gold30, gold31, gold32, gold33, gold34, gold35, gold36, gold37, gold38, gold39, gold40, gold41, gold42, gold43, gold44, gold45, gold46, gold47, gold48, gold49, gold50, gold51, gold52, gold53, gold54, gold55, gold56, gold57, gold58, gold59, gold60, gold61, gold62, gold63, gold64, gold65, gold66, gold67, gold68, gold69, gold70, gold71, gold72, gold73, gold74, gold75, gold76, gold77, gold78, gold79, gold80, gold81, gold82, gold83, gold84, gold85, gold86, gold87, gold88, gold89, gold90, gold91, gold92, gold93, gold94, gold95, gold96, gold97, gold98, gold99);
var gold_big_ar = new Array(gold_big1, gold_big2, gold_big3, gold_big4);
var my_sound = new Sound();
var backs_u_ar = new Array(u_back, u_back1, u_back2);
backs_u_ar.info = "up";
var backs_l_ar = new Array(l_back, l_back1, l_back2);
backs_l_ar.info = "left";
var backs_d_ar = new Array(d_back, d_back1, d_back2);
backs_d_ar.info = "down";
var backs_r_ar = new Array(r_back, r_back1, r_back2);
backs_r_ar.info = "right";
var allback = new Array(backs_u_ar, backs_l_ar, backs_r_ar, backs_d_ar);
var i = 0;
while (i < 30) {
var j = 0;
while (j < 10) {
allback[i][j]._visible = 0;
c_guide_ar[j]._visible = 0;
j++;
}
i++;
}
var end = 0;
var oKey1 = new Object();
Key.addListener(oKey1);
var scoree = 0;
var noscore;
var score_MC_AR_del = new Array();
var score_MC_AR = new Array();
function enem_move(ttt, gun, add1) {
if (ttt != undefined) {
exp_hit_enem(ttt);
shoot_enem(ttt, gun);
check_hit_pac(ttt);
check2(ttt);
backu1(backs_u_ar, ttt);
backu1(backs_l_ar, ttt);
backu1(backs_d_ar, ttt);
backu1(backs_r_ar, ttt);
}
if (ttt.pos == "left") {
ttt._x = ttt._x - ttt.speed;
ttt._rotation = 270;
if ((ttt._xscale <= -90) && (ttt._currentframe == 1)) {
ttt._xscale = -ttt._xscale;
}
}
if (ttt.pos == "right") {
ttt._x = ttt._x + ttt.speed;
ttt._rotation = 90;
if ((ttt._xscale >= 90) && (ttt._currentframe == 1)) {
ttt._xscale = -ttt._xscale;
}
}
if (ttt.pos == "up") {
ttt._y = ttt._y - ttt.speed;
ttt._rotation = 0;
if ((ttt._xscale <= -90) && (ttt._currentframe == 1)) {
ttt._xscale = -ttt._xscale;
}
}
if (ttt.pos == "down") {
ttt._y = ttt._y + ttt.speed;
ttt._rotation = 180;
if ((ttt._xscale <= -90) && (ttt._currentframe == 1)) {
ttt._xscale = -ttt._xscale;
}
}
if (ttt.pos == "mixed") {
var _local6 = ttt._rotation + 10;
dx = Math.cos((Math.PI/180) * _local6);
dy = Math.sin((Math.PI/180) * _local6);
ttt._x = ttt._x + (dx * ttt.speed);
ttt._y = ttt._y + (dy * ttt.speed);
}
gun._x = ttt._x;
gun._y = ttt._y;
gun._rotation = ttt._rotation;
gun._xscale = ttt._xscale;
add1._x = ttt._x;
add1._y = ttt._y;
add1._rotation = ttt._rotation;
add1._xscale = ttt._xscale;
var _local2 = 0;
while (_local2 < c_guide_ar.length) {
if ((((((ttt._x >= (c_guide_ar[_local2]._x - 5)) && (ttt._x <= (c_guide_ar[_local2]._x + 5))) && (ttt._y >= (c_guide_ar[_local2]._y - 5))) && (ttt._y <= (c_guide_ar[_local2]._y + 5))) && (ttt.a >= 6)) && (ttt.hitTest(c_guide_ar[_local2]))) {
ttt.a = 0;
if ((ttt._x >= (pac._x - 4)) && (ttt._x <= (pac._x + 4))) {
if (ttt._y <= pac._y) {
ttt.pos = "down";
}
if (ttt._y > pac._y) {
ttt.pos = "up";
}
} else if ((ttt._y >= (pac._y - 4)) && (ttt._y <= (pac._y + 4))) {
if (ttt._x <= pac._x) {
ttt.pos = "right";
}
if (ttt._x > pac._x) {
ttt.pos = "left";
}
} else {
var _local3 = random(4);
switch (_local3) {
case 0 :
ttt.pos = "down";
ttt.a = "0";
ttt._y = ttt._y + 3;
break;
case 1 :
ttt.pos = "up";
ttt.a = "0";
ttt._y = ttt._y - 3;
break;
case 2 :
ttt.pos = "right";
ttt.a = "0";
ttt._x = ttt._x + 3;
break;
case 3 :
ttt.pos = "left";
ttt.a = "0";
ttt._x = ttt._x - 3;
}
}
} else if (ttt.hitTest(c_guide_ar[_local2]) == false) {
ttt.a = ttt.a + 1;
}
_local2++;
}
updateAfterEvent();
}
function backu1(ttt, sss) {
var _local3 = 0;
while (_local3 < 15) {
if (sss.hitTest(ttt[_local3])) {
if (ttt.info == "up") {
sss._y = 480;
} else if (ttt.info == "left") {
sss._x = 730;
} else if (ttt.info == "down") {
sss._y = 90;
} else if (ttt.info == "right") {
sss._x = 20;
}
}
_local3++;
}
}
function check2(hit) {
var _local3 = 0;
while (_local3 < wall_ar.length) {
var _local6 = (wall_ar[_local3]._x - (wall_ar[_local3]._width / 2)) - 2;
var _local4 = (wall_ar[_local3]._x + (wall_ar[_local3]._width / 2)) + 2;
var _local5 = (wall_ar[_local3]._y - (wall_ar[_local3]._height / 2)) - 2;
var _local7 = (wall_ar[_local3]._y + (wall_ar[_local3]._height / 2)) + 2;
if ((((hit._x + (hit._width / 2)) >= _local6) && ((hit._x - (hit._width / 2)) <= _local4)) && ((((hit._y - (hit._height / 2)) <= _local7) && ((hit._y + (hit._height / 2)) >= _local5)) && (hit._currentframe == 1))) {
var _local2 = random(2);
if ((hit.pos == "left") && (hit.wall >= 1)) {
hit._x = hit._x + 4;
if (_local2 == 0) {
hit.pos = "right";
} else if (_local2 == 1) {
hit.pos = "up";
} else if (_local2 == 2) {
hit.pos = "down";
}
hit.wall = 0;
} else if ((hit.pos == "right") && (hit.wall >= 1)) {
hit._x = hit._x - 4;
if (_local2 == 0) {
hit.pos = "left";
} else if (_local2 == 1) {
hit.pos = "up";
} else if (_local2 == 2) {
hit.pos = "down";
}
hit.wall = 0;
} else if ((hit.pos == "up") && (hit.wall >= 1)) {
hit._y = hit._y + 4;
if (_local2 == 0) {
hit.pos = "right";
} else if (_local2 == 1) {
hit.pos = "down";
} else if (_local2 == 2) {
hit.pos = "left";
}
hit.wall = 0;
} else if ((hit.pos == "down") && (hit.wall >= 1)) {
hit._y = hit._y - 4;
if (_local2 == 0) {
hit.pos = "right";
} else if (_local2 == 2) {
hit.pos = "left";
} else if (_local2 == 2) {
hit.pos = "up";
}
hit.wall = 0;
}
} else if (hit.wall == 0) {
hit.wall = hit.wall + 1;
}
_local3++;
}
}
function fade_enemy(aaa, count) {
if (aaa._currentframe != 1) {
fade_enem_ar[count]++;
if ((fade_enem_ar[count] >= 10) && ((sec1 > 1) || (min1 > 1))) {
aaa._y = 1000;
aaa._x = 1000;
clearInterval(bbb[aaa.id]);
removeMovieClip(aaa);
fade_enem_ar[count] = 0;
clearInterval(count_ar[count]);
}
}
}
function check_hit_pac(hit) {
var _local6 = (pac._x - (pac._width / 2)) - 4;
var _local4 = (pac._x + (pac._width / 2)) + 4;
var _local5 = (pac._y - (pac._height / 2)) - 4;
var _local7 = (pac._y + (pac._height / 2)) + 4;
if (((((hit._x + (hit._width / 2)) >= _local6) && ((hit._x - (hit._width / 2)) <= _local4)) && (((hit._y - (hit._height / 2)) <= _local7) && ((hit._y + (hit._height / 2)) >= _local5))) && (pac.caneat <= 0)) {
if (((hit.pos == "left") && (hit.pac >= 1)) && (hit._currentframe == 1)) {
hit._x = hit._x + 4;
hit.pos = "right";
hit.pac = 0;
if (pac.hit == 0) {
pac.hit = 16;
if (pac.caneat <= 0) {
life--;
}
}
}
if (((hit.pos == "right") && (hit.pac >= 1)) && (hit._currentframe == 1)) {
hit._x = hit._x - 4;
hit.pos = "left";
hit.pac = 0;
if (pac.hit == 0) {
pac.hit = 16;
life--;
if (pac.caneat == 0) {
life--;
}
}
}
if (((hit.pos == "up") && (hit.pac >= 1)) && (hit._currentframe == 1)) {
hit._y = hit._y + 4;
hit.pos = "down";
hit.pac = 0;
if (pac.hit == 0) {
pac.hit = 16;
life--;
if (pac.caneat == 0) {
life--;
}
}
}
if (((hit.pos == "down") && (hit.pac >= 1)) && (hit._currentframe == 1)) {
hit._y = hit._y - 4;
hit.pos = "up";
hit.pac = 0;
if (pac.hit == 0) {
pac.hit = 16;
life--;
if (pac.caneat == 0) {
life--;
}
}
} else if (hit.hitTest(pac) == false) {
hit.pac = hit.pac + 1;
}
}
if (((((hit._x + (hit._width / 2)) >= _local6) && ((hit._x - (hit._width / 2)) <= _local4)) && (((hit._y - (hit._height / 2)) <= _local7) && ((hit._y + (hit._height / 2)) >= _local5))) && (pac.caneat > 0)) {
if (pac.caneat > 0) {
if ((aeee <= 0) && (hit._currentframe == 1)) {
var _local3 = 0;
while (_local3 < hand_en_ar.length) {
if (hand_en_ar[_local3].id == hit.id) {
hand_en_ar[_local3].gotoAndPlay(2);
}
if (addons_ar[_local3].id == hit.id) {
addons_ar[_local3].gotoAndPlay(2);
}
_local3++;
}
hit.speed = 0;
hit.gotoAndPlay(2);
num_enemys--;
_root.scoreplus("point_p_20", hit);
score_num = score_num + 20;
score.text = score.text - -20;
enem_count++;
trace("enem_count=" + enem_count);
fade_enem_ar[enem_count] = 0;
inter_enemy_aa = setInterval(fade_enemy, 40, hit, enem_count);
}
count_ar[enem_count] = inter_enemy_aa;
}
}
}
function exp_hit_enem(eneme) {
var _local4 = 0;
while (_local4 < explode_ar.length) {
if (((((((eneme._x > (explode_ar[_local4]._x - (explode_ar[_local4]._width / 2))) && (eneme._x < (explode_ar[_local4]._x + (explode_ar[_local4]._width / 2)))) && (eneme._y > (explode_ar[_local4]._y - (explode_ar[_local4]._height / 2)))) && (eneme._y < (explode_ar[_local4]._y + (explode_ar[_local4]._height / 2)))) && (eneme._currentframe == 1)) && (explode_ar[_local4].hit <= 0)) && (eneme._currentframe == 1)) {
if ((((explode.gas != 1) && (eneme.gas != 1)) || ((explode.gas == 1) && (eneme.gas != 1))) || ((explode.gas != 1) && (eneme.gas == 1))) {
explode_ar[_local4].id = 0;
enem_count++;
eneme.speed = 0;
num_enemys--;
_root.scoreplus("point_p_20", eneme);
score_num = score_num + 20;
score.text = score.text - -20;
var _local3 = 0;
while (_local3 < hand_en_ar.length) {
if (hand_en_ar[_local3].id == eneme.id) {
hand_en_ar[_local3].gotoAndPlay(2);
removeMovieClip(hand_en_ar[_local3]);
}
_local3++;
}
_local3 = 0;
while (_local3 < addons_ar.length) {
if (addons_ar[_local3].id == eneme.id) {
addons_ar[_local3].gotoAndPlay(2);
removeMovieClip(addons_ar[_local3]);
}
_local3++;
}
eneme.gotoAndPlay(2);
fade_enem_ar[enem_count] = 0;
inter_enemy_aa2 = setInterval(fade_enemy, 40, eneme, enem_count);
count_ar[enem_count] = inter_enemy_aa2;
trace("count=" + count_ar[enem_count]);
}
}
_local4++;
}
}
function addenemy(enem_mca, rax, gax, bax, gun, addon) {
var _local2 = enem_ar.length;
trace(_local2);
var _local3 = this.attachMovie(enem_mca, ("enemy" + _local2) + 1, _local2 + 10000);
var _local5 = this.attachMovie(gun, ("hand_en" + _local2) + 1, (_local2 + 10000) + 6000);
var _local4 = this.attachMovie(addon, ("addon_" + _local2) + 1, (_local2 + 10000) + 3000);
var _local6 = random(500) + 100;
_local3._x = _local6;
_local3._y = 320;
_local5._x = _local6;
_local5._y = 320;
_local4._x = _local6;
_local4._y = 320;
_local3._currentframe = 1;
_local5._currentframe = 1;
_local4._currentframe = 1;
var _local10 = new Color(_local3.color4);
var _local9 = new Color(_local3.body);
var _local7 = {ra:rax, ga:gax, ba:bax, aa:100};
_local10.setTransform(_local7);
_local9.setTransform(_local7);
enem_ar[_local2] = _local3;
hand_en_ar[_local2] = _local5;
addons_ar[_local2] = _local4;
enem_ar[_local2].id = _local2;
hand_en_ar[_local2].id = _local2;
addons_ar[_local2].id = _local2;
hand_en_ar[_local2].kindof = gun;
enem_ar[_local2].a = "6";
enem_ar[_local2].wall = "5";
enem_ar[_local2].pac = "0";
enem_ar[_local2].ifstop = "0";
num_enemys++;
enem_ar[_local2].pos = "left";
enem_ar[_local2].speed = 2;
inter_en = setInterval(enem_move, 8, enem_ar[_local2], hand_en_ar[_local2], addons_ar[_local2]);
var _local8 = inter_en;
bbb[_local2] = _local8;
}
function addenemy_pos(enem_mca, rax, gax, bax, gun, addon, tx, ty) {
var _local2 = enem_ar.length;
trace(_local2);
var _local3 = this.attachMovie(enem_mca, ("enemy" + _local2) + 1, _local2 + 10000);
var _local5 = this.attachMovie(gun, ("hand_en" + _local2) + 1, (_local2 + 10000) + 6000);
var _local4 = this.attachMovie(addon, ("addon_" + _local2) + 1, (_local2 + 10000) + 3000);
var _local12 = random(400) + 100;
_local3._x = tx;
_local3._y = ty;
_local5._x = tx;
_local5._y = ty;
_local4._x = tx;
_local4._y = ty;
_local3._currentframe = 1;
_local5._currentframe = 1;
_local4._currentframe = 1;
var _local11 = new Color(_local3.color4);
var _local10 = new Color(_local3.body);
var _local6 = {ra:rax, ga:gax, ba:bax, aa:100};
_local11.setTransform(_local6);
_local10.setTransform(_local6);
enem_ar[_local2] = _local3;
hand_en_ar[_local2] = _local5;
addons_ar[_local2] = _local4;
enem_ar[_local2].id = _local2;
hand_en_ar[_local2].id = _local2;
addons_ar[_local2].id = _local2;
hand_en_ar[_local2].kindof = gun;
enem_ar[_local2].a = "6";
enem_ar[_local2].wall = "5";
enem_ar[_local2].pac = "0";
enem_ar[_local2].ifstop = "0";
num_enemys++;
enem_ar[_local2].pos = "left";
enem_ar[_local2].speed = 2;
inter_en = setInterval(enem_move, 8, enem_ar[_local2], hand_en_ar[_local2], addons_ar[_local2]);
var _local7 = inter_en;
bbb[_local2] = _local7;
}
var i = 0;
while (i < enem_ar.length) {
clearInterval(bbb[i]);
enem_ar[i].id.tt = 0;
i++;
}
var enem_count = 0;
var num_enemys = 4;
life = 10;
var inter_en;
var enem_ar = new Array(enemy1, enemy3);
var hand_en_ar = new Array(hand_en1);
var addons_ar = new Array();
enem_ar[0].a = "6";
enem_ar[0].wall = "5";
enem_ar[0].ifstop = "0";
enem_ar[0].pac = "0";
enem_ar[0].id = "0";
hand_en_ar[0].id = "0";
hand_en_ar[0].kindof = "hand_en2";
enem_ar[1].a = "6";
enem_ar[1].wall = "5";
enem_ar[1].pac = "0";
enem_ar[1].id = "1";
enem_ar[1].ifstop = "0";
enem_ar[2].a = "6";
enem_ar[2].wall = "5";
enem_ar[2].pac = "0";
enem_ar[2].id = "2";
enem_ar[2].ifstop = "0";
var c_guide_ar = new Array(c_guide1, c_guide2, c_guide3, c_guide4, c_guide5, c_guide6, c_guide7, c_guide8, c_guide9, c_guide10, c_guide11, c_guide12, c_guide13, c_guide14);
var i = 0;
while (i < 30) {
c_guide_ar[i]._visible = 0;
i++;
}
enem_ar[0].pos = "left";
enem_ar[0].speed = 2;
enem_ar[1].pos = "right";
enem_ar[1].speed = 2;
enem_ar[2].pos = "right";
enem_ar[2].speed = 2;
var inter_en;
var bbb = new Array();
var i = 0;
while (i < enem_ar.length) {
inter_en = setInterval(enem_move, 20, enem_ar[i], hand_en_ar[i]);
var ttt = inter_en;
bbb[i] = ttt;
i++;
}
var inter_enemy_aa;
var fade_enem_ar = new Array();
var aeee = 0;
clearInterval(inter_mmm);
var pac_mp3 = new Sound();
var wall_mp3 = new Sound();
var inter_mmm;
inter_mmm = setInterval(movenemyss, 1000);
function exp_hit_pac() {
var _local1 = 0;
while (_local1 < explode_ar.length) {
if ((((((pac._x > (explode_ar[_local1]._x - (explode_ar[_local1]._width / 2))) && (pac._x < (explode_ar[_local1]._x + (explode_ar[_local1]._width / 2)))) && (pac._y > (explode_ar[_local1]._y - (explode_ar[_local1]._height / 2)))) && (pac._y < (explode_ar[_local1]._y + (explode_ar[_local1]._height / 2)))) && (pac.hit <= 0)) && (pac.caneat == 0)) {
life--;
life--;
pac.hit = 25;
}
_local1++;
}
}
function bull_hit_pac(bulll) {
if ((((((((bulll._x + (bulll._width / 2)) > ((pac._x - (pac._width / 2)) + 5)) && ((bulll._x - (bulll._width / 2)) < ((pac._x + (pac._width / 2)) - 5))) && ((bulll._y + (bulll._height / 2)) > ((pac._y - (pac._height / 2)) + 5))) && ((bulll._y - (bulll._height / 2)) < ((pac._y + (pac._height / 2)) - 5))) && (bulll._currentframe == 1)) && (pac.hit <= 0)) && (pac.caneat == 0)) {
life--;
if (bulll.id == 1) {
explode_num++;
if (bulll.getex == 1) {
var _local3 = attachMovie("expl", "expl" + explode_num, 65000 + explode_num);
}
if (bulll.getex == 2) {
var _local3 = attachMovie("expl_big", "expl" + explode_num, 65000 + explode_num);
}
if (bulll.getex == 3) {
var _local3 = attachMovie("expl_orange", "expl" + explode_num, 65000 + explode_num);
}
if (bulll.getex == 4) {
var _local3 = attachMovie("expl_red", "expl" + explode_num, 65000 + explode_num);
}
if (bulll.getex == 5) {
var _local3 = attachMovie("expl_green", "expl" + explode_num, 65000 + explode_num);
}
explode_ar[explode_num] = _local3;
explode_ar[explode_num]._x = bulll._x;
explode_ar[explode_num]._y = bulll._y;
}
bulll.gotoAndPlay(2);
pac.hit = 16;
bulll.speed = 0;
}
var _local2 = 0;
while (_local2 < wall_ar.length) {
if (((((bulll._x > (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2))) && (bulll._x < (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2)))) && (bulll._y > (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (bulll._y < (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2)))) && (bulll._currentframe == 1)) {
if (bulll.id == 1) {
explode_num++;
if (bulll.getex == 1) {
var _local3 = attachMovie("expl", "expl" + explode_num, 65000 + explode_num);
}
if (bulll.getex == 2) {
var _local3 = attachMovie("expl_big", "expl" + explode_num, 65000 + explode_num);
}
if (bulll.getex == 3) {
var _local3 = attachMovie("expl_orange", "expl" + explode_num, 65000 + explode_num);
}
if (bulll.getex == 4) {
var _local3 = attachMovie("expl_red", "expl" + explode_num, 65000 + explode_num);
}
if (bulll.getex == 5) {
var _local3 = attachMovie("expl_green", "expl" + explode_num, 65000 + explode_num);
}
explode_ar[explode_num] = _local3;
explode_ar[explode_num]._x = bulll._x;
explode_ar[explode_num]._y = bulll._y;
}
bulll.gotoAndPlay(2);
wall_ar[_local2].hit == 16;
bulll.speed = 0;
}
_local2++;
}
}
function hand_where() {
if (pac.hand == 0) {
var _local2 = 0;
while (_local2 < pac_weapon.length) {
pac_weapon[_local2]._x = 1000;
pac_weapon[_local2]._y = 1000;
_local2++;
}
}
var _local1 = 0;
while (_local1 < 200) {
if (pac.hand == _local1) {
pac_weapon[_local1 - 1]._x = pac._x;
pac_weapon[_local1 - 1]._y = pac._y;
pac_weapon[_local1 - 1]._rotation = pac_graphic._rotation;
pac_weapon[_local1 - 1]._xscale = pac_graphic._xscale;
}
_local1++;
}
_local1 = 0;
while (_local1 < 200) {
if (pac.hand != _local1) {
pac_weapon[_local1 - 1]._x = 1000;
pac_weapon[_local1 - 1]._Y = 1000;
}
_local1++;
}
if ((Key.isDown(17) && (pac.greande > 0)) && (greand_throw == 2)) {
throw_greande_en(pac_graphic);
greand_throw = 0;
pac.greande--;
}
if ((Key.isDown(32) && (go33 >= 1)) && (ammo > 0)) {
ammo--;
if (pac_weapon[pac.hand - 1] == pac_weapon[0]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 2;
enemy_mp4.attachSound("gunshots_sm.wav");
enemy_mp4.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[1]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 2;
enemy_mp3.attachSound("GUN04_cop.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[2]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 1;
enemy_mp3.attachSound("GUN04_cop.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[3]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 1;
enemy_mp3.attachSound("uzi.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[4]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 1;
enemy_mp3.attachSound("galil.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[5]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("M16.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[6]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("ak47.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[7]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 1;
enemy_mp3.attachSound("uzi.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[8]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 1;
enemy_mp3.attachSound("gunshots_sm.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[9]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("mp5.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[10]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("m16.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[11]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "rpg_mis");
go33 = go33 - 1;
}
if (pac_weapon[pac.hand - 1] == pac_weapon[12]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "rpg_mis");
go33 = go33 - 1;
}
if (pac_weapon[pac.hand - 1] == pac_weapon[13]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("mp5.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[14]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("aug.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[15]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "shot_ball");
go33 = go33 - 1;
enemy_mp3.attachSound("shotgun.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[16]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "rpg_mis");
go33 = go33 - 1;
}
if (pac_weapon[pac.hand - 1] == pac_weapon[17]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "shot_ball");
go33 = go33 - 1;
enemy_mp3.attachSound("mag.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[18]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("m16.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[19]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("m16a2.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[20]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball4");
go33 = go33 - 1;
enemy_mp3.attachSound("aug.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[21]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 1;
enemy_mp3.attachSound("pk96.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[22]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("mp5_sd.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[23]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "shot_ball");
go33 = go33 - 1;
enemy_mp3.attachSound("mag.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[24]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball4");
go33 = go33 - 1;
enemy_mp3.attachSound("g36.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[25]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "missle");
go33 = go33 - 1;
}
if (pac_weapon[pac.hand - 1] == pac_weapon[26]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball5");
go33 = go33 - 1;
enemy_mp3.attachSound("laser5.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[27]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "40mm");
enemy_mp3.attachSound("40mm.wav");
enemy_mp3.start();
go33 = go33 - 1;
}
if (pac_weapon[pac.hand - 1] == pac_weapon[28]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball6");
go33 = go33 - 1;
enemy_mp3.attachSound("laser_smg.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[29]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball5");
go33 = go33 - 1;
enemy_mp3.attachSound("LASER5.wav");
enemy_mp3.start();
}
}
}
function shoot_en_bul2(gun, bullet) {
ebullpac++;
gun.gun.gotoAndPlay(2);
var _local4 = this.attachMovie(bullet, ("ball_pac" + ebullpac) + 1, ebullpac + 150000);
pac_shoot[ebullpac] = _local4;
gun_rad = Math.atan2(gun.gun._y, gun.gun._x);
gun_deg = (gun_rad * 180) / Math.PI;
rotat = gun._rotation + ((gun_deg - 360) + 90);
dx = Math.sin((Math.PI/180) * rotat);
dy = Math.cos((Math.PI/180) * rotat);
gun_xscal = Math.abs(gun._xscale);
_local4._rotation = gun._rotation;
pac_shoot_num[ebullpac] = 0;
dx_ar_pac[ebullpac] = dx;
yx_ar_pac[ebullpac] = dy;
_local4._x = gun._x + (dx * (-gun.gun._y));
_local4._y = gun._y - (((dy * (-gun.gun._y)) * gun._xscale) / gun_xscal);
dx = Math.sin((Math.PI/180) * (rotat + 6));
dy = Math.cos((Math.PI/180) * (rotat + 6));
dx_ar_pac[ebullpac] = dx;
yx_ar_pac[ebullpac] = dy;
if ((((bullet == "ball2") || (bullet == "missle")) || (bullet == "rpg_mis")) || (bullet == "40mm")) {
_local4.speed = 5;
bull_move_ene2 = setInterval(ball_move2, 20, pac_shoot[ebullpac], ebullpac, gun.range, gun);
pac_shoot_ar[ebullpac] = bull_move_ene2;
}
if (((bullet == "ball3") || (bullet == "shot_ball")) || (bullet == "ball6")) {
_local4.speed = 5;
bull_move_ene2 = setInterval(ball_move2, 16, pac_shoot[ebullpac], ebullpac, gun.range, gun);
pac_shoot_ar[ebullpac] = bull_move_ene2;
}
if ((bullet == "ball4") || (bullet == "ball5")) {
_local4.speed = 6;
bull_move_ene2 = setInterval(ball_move2, 10, pac_shoot[ebullpac], ebullpac, gun.range, gun);
pac_shoot_ar[ebullpac] = bull_move_ene2;
}
}
function ball_move2(bullet, numm24, rangeofammo2, ffgun) {
bull_hit_enem(pac_shoot[numm24]);
bullspeed1 = pac_shoot[numm24].speed;
bullet._x = bullet._x + (dx_ar_pac[numm24] * bullspeed1);
bullet._y = bullet._y - (yx_ar_pac[numm24] * bullspeed1);
pac_shoot_num[numm24]++;
if ((pac_shoot_num[numm24] == (rangeofammo2 / 2)) && (ffgun.rate1 == "semi")) {
go33 = 1;
}
if ((pac_shoot_num[numm24] == (rangeofammo2 / 4)) && (ffgun.rate1 == "auto")) {
go33 = 1;
}
if ((pac_shoot_num[numm24] == (rangeofammo2 / 3)) && (ffgun.rate1 == "semi_a")) {
go33 = 1;
}
if ((pac_shoot_num[numm24] >= rangeofammo2) && (ffgun.rate1 == "mono")) {
go33 = 1;
}
if (pac_shoot_num[numm24] >= rangeofammo2) {
removeMovieClip(pac_shoot[numm24]);
clearInterval(pac_shoot_ar[numm24]);
pac_shoot_num[numm24] = 0;
}
}
function bull_hit_enem(bulll) {
var _local3 = 0;
while (_local3 < enem_ar.length) {
if (((((((bulll._x + (bulll._width / 2)) > ((enem_ar[_local3]._x - (enem_ar[_local3]._width / 2)) + 5)) && ((bulll._x - bulll._width) < ((enem_ar[_local3]._x + (enem_ar[_local3]._width / 2)) - 5))) && ((bulll._y + (bulll._height / 2)) > ((enem_ar[_local3]._y - (enem_ar[_local3]._height / 2)) + 5))) && ((bulll._y - (bulll._height / 2)) < ((enem_ar[_local3]._y + (enem_ar[_local3]._height / 2)) - 5))) && (bulll._currentframe == 1)) && (enem_ar[_local3]._currentframe == 1)) {
var _local4 = 0;
while (_local4 < hand_en_ar.length) {
if (hand_en_ar[_local4].id == enem_ar[_local3].id) {
hand_en_ar[_local4].gotoAndPlay(2);
}
if (addons_ar[_local4].id == enem_ar[_local3].id) {
addons_ar[_local4].gotoAndPlay(2);
}
_local4++;
}
if (bulll.id == 1) {
explode_num++;
if (bulll.getex == 1) {
var _local5 = attachMovie("expl", "expl" + explode_num, 65000 + explode_num);
}
if (bulll.getex == 2) {
var _local5 = attachMovie("expl_big", "expl" + explode_num, 65000 + explode_num);
}
if (bulll.getex == 3) {
var _local5 = attachMovie("expl_orange", "expl" + explode_num, 65000 + explode_num);
}
if (bulll.getex == 4) {
var _local5 = attachMovie("expl_red", "expl" + explode_num, 65000 + explode_num);
}
if (bulll.getex == 5) {
var _local5 = attachMovie("expl_green", "expl" + explode_num, 65000 + explode_num);
}
explode_ar[explode_num] = _local5;
explode_ar[explode_num]._x = bulll._x;
explode_ar[explode_num]._y = bulll._y;
}
bulll.gotoAndPlay(2);
enem_count++;
enem_ar[_local3].speed = 0;
num_enemys--;
_root.scoreplus("point_p_20", enem_ar[_local3]);
score_num = score_num + 20;
score.text = score.text - -20;
enem_ar[_local3].gotoAndPlay(2);
fade_enem_ar[enem_count] = 0;
inter_enemy_aa2 = setInterval(fade_enemy, 40, enem_ar[_local3], enem_count);
count_ar[enem_count] = inter_enemy_aa2;
trace("count=" + count_ar[enem_count]);
bulll.speed = 0;
}
_local3++;
}
_local3 = 0;
while (_local3 < wall_ar.length) {
if (((((bulll._x > (wall_ar[_local3]._x - (wall_ar[_local3]._width / 2))) && (bulll._x < (wall_ar[_local3]._x + (wall_ar[_local3]._width / 2)))) && (bulll._y > (wall_ar[_local3]._y - (wall_ar[_local3]._height / 2)))) && (bulll._y < (wall_ar[_local3]._y + (wall_ar[_local3]._height / 2)))) && (bulll._currentframe == 1)) {
if (bulll.id == 1) {
explode_num++;
if (bulll.getex == 1) {
var _local5 = attachMovie("expl", "expl" + explode_num, 65000 + explode_num);
}
if (bulll.getex == 2) {
var _local5 = attachMovie("expl_big", "expl" + explode_num, 65000 + explode_num);
}
if (bulll.getex == 3) {
var _local5 = attachMovie("expl_orange", "expl" + explode_num, 65000 + explode_num);
}
if (bulll.getex == 4) {
var _local5 = attachMovie("expl_red", "expl" + explode_num, 65000 + explode_num);
}
if (bulll.getex == 5) {
var _local5 = attachMovie("expl_green", "expl" + explode_num, 65000 + explode_num);
}
explode_ar[explode_num] = _local5;
explode_ar[explode_num]._x = bulll._x;
explode_ar[explode_num]._y = bulll._y;
}
bulll.gotoAndPlay(2);
wall_ar[_local3].hit == 16;
bulll.speed = 0;
}
_local3++;
}
_local3 = 0;
while (_local3 < addons_ar.length) {
if (((((((bulll._x > (addons_ar[_local3]._x - (addons_ar[_local3]._width / 2))) && (bulll._x < (addons_ar[_local3]._x + (addons_ar[_local3]._width / 2)))) && (bulll._y > (addons_ar[_local3]._y - (addons_ar[_local3]._height / 2)))) && (bulll._y < (addons_ar[_local3]._y + (addons_ar[_local3]._height / 2)))) && (bulll._currentframe == 1)) && (addons_ar[_local3]._currentframe == 1)) && (addons_ar[_local3].trans > 0)) {
addons_ar[_local3].trans--;
if (bulll.id == 1) {
addons_ar[_local3].trans = addons_ar[_local3].trans - 2;
explode_num++;
if (bulll.getex == 1) {
var _local5 = attachMovie("expl", "expl" + explode_num, 65000 + explode_num);
}
if (bulll.getex == 2) {
var _local5 = attachMovie("expl_big", "expl" + explode_num, 65000 + explode_num);
}
if (bulll.getex == 3) {
var _local5 = attachMovie("expl_orange", "expl" + explode_num, 65000 + explode_num);
}
if (bulll.getex == 4) {
var _local5 = attachMovie("expl_red", "expl" + explode_num, 65000 + explode_num);
}
if (bulll.getex == 5) {
var _local5 = attachMovie("expl_green", "expl" + explode_num, 65000 + explode_num);
}
explode_ar[explode_num] = _local5;
explode_ar[explode_num]._x = bulll._x;
explode_ar[explode_num]._y = bulll._y;
}
bulll.gotoAndPlay(2);
wall_ar[_local3].hit == 16;
bulll.speed = 0;
}
_local3++;
}
}
function collet_ammo() {
var _local1 = 0;
while (_local1 < 180) {
if ((((ammo_ar_take[_local1]._x > (pac._x - (pac._width / 2))) && (ammo_ar_take[_local1]._x < (pac._x + (pac._width / 2)))) && (ammo_ar_take[_local1]._y > (pac._y - (pac._height / 2)))) && (ammo_ar_take[_local1]._y < (pac._y + (pac._height / 2)))) {
trace("t=" + _local1);
if (_local1 == 0) {
ammo = 10 + _local1;
}
if (_local1 == 1) {
ammo = 6 + _local1;
}
if (_local1 == 2) {
ammo = 4 + _local1;
}
if (_local1 == 3) {
ammo = 14 + _local1;
}
if (_local1 == 4) {
ammo = 6 + _local1;
}
if (_local1 == 5) {
ammo = 7 + _local1;
}
if (_local1 == 6) {
ammo = 8 + _local1;
}
if (_local1 == 7) {
ammo = 13 + _local1;
}
if (_local1 == 8) {
ammo = 10;
pac.greande = 2;
}
if (_local1 == 9) {
ammo = 15;
pac.greande = 1;
}
if (_local1 == 10) {
ammo = 12;
pac.greande = 1;
}
if (_local1 == 11) {
ammo = 3;
}
if (_local1 == 12) {
ammo = 4;
}
if (_local1 == 13) {
ammo = 18;
pac.greande = 1;
}
if (_local1 == 14) {
ammo = 14;
pac.greande = 1;
}
if (_local1 == 15) {
ammo = 7;
pac.greande = 2;
}
if (_local1 == 16) {
ammo = 4;
}
if (_local1 == 17) {
ammo = 12;
pac.greande = 1;
}
if (_local1 == 18) {
ammo = 20;
pac.greande = 1;
}
if (_local1 == 19) {
ammo = 24;
pac.greande = 2;
}
if (_local1 == 20) {
ammo = 6;
pac.greande = 0;
}
if (_local1 == 21) {
ammo = 28;
pac.greande = 0;
}
if (_local1 == 22) {
ammo = 20;
pac.greande = 2;
}
if (_local1 == 23) {
ammo = 10;
pac.greande = 2;
}
if (_local1 == 24) {
ammo = 16;
pac.greande = 1;
}
if (_local1 == 25) {
ammo = 6;
pac.greande = 0;
}
if (_local1 == 26) {
ammo = 10;
pac.greande = 2;
}
if (_local1 == 27) {
ammo = 9;
pac.greande = 0;
}
if (_local1 == 28) {
ammo = 22;
pac.greande = 3;
}
if (_local1 == 29) {
ammo = 16;
pac.greande = 1;
}
pac.hand = _local1 + 1;
trace(pac.hand);
ammo_ar_take[_local1]._x = 900;
ammo_ar_take[_local1]._y = 900;
}
_local1++;
}
}
var go33 = 1;
var explode_ar = new Array();
var explode_num = 0;
pac.greande = 0;
var greand_throw = 2;
pac.hand = 0;
var bull_move_ene2;
var pac_shoot_ar = new Array();
var pac_shoot_num = new Array();
var pac_shoot = new Array();
var ebullpac = 0;
var dx_ar_pac = new Array();
var yx_ar_pac = new Array();
var count_ar = new Array();
function timeof() {
sec1++;
clock.text = sec1;
if (sec1 >= 59) {
sec1 = 0;
min1++;
clock_min.text = min1;
}
if ((sec1 == 1) && (min1 == 0)) {
addenemy("enemy_swat", 30, 70, 60, "en_m1");
}
if (sec1 == 30) {
addenemy_pos("enemy_swat", 30, 70, 30, "en_m16", "helmet2", 87, 411);
addenemy_pos("enemy_swat", 60, 76, 20, "en_ak47", "us_army", 66, 219);
addenemy_pos("enemy_swat", 60, 76, 20, "en_m16", "us_army", 65, 320);
addenemy_pos("enemy_swat", 60, 76, 20, "en_aug", "hl2", 65, 320);
}
if ((sec1 == 10) && (num_enemys < 6)) {
addenemy("enemyzz", 30, 0, 90);
}
if ((((sec1 == 20) || (sec1 == 40)) || (sec1 == 0)) && (num_enemys < 5)) {
addenemy("enemyzz", 22, 70, 50, "en_uzi");
}
if (sec1 == 25) {
ammo_ar_take[27]._x = 500;
ammo_ar_take[27]._y = 159;
}
if (sec1 == 1) {
ammo_ar_take[28]._x = 350;
ammo_ar_take[28]._y = 159;
}
if ((sec1 == 30) && (min1 == 0)) {
ammo_ar_take[26]._x = 240;
ammo_ar_take[26]._y = 159;
}
if (sec1 == 40) {
ammo_ar_take[29]._x = 470;
ammo_ar_take[29]._y = 159;
}
}
function ball_move(bullet, numm2, rangeofammo, numB) {
bull_hit_pac(ball_shoot[numm2]);
bullspeed = ball_shoot[numm2].speed;
bullet._x = bullet._x + (dx_ar[numm2] * bullspeed);
bullet._y = bullet._y - (yx_ar[numm2] * bullspeed);
ball_shoot_num[numm2]++;
if (ball_shoot_num[numm2] >= rangeofammo) {
removeMovieClip(ball_shoot[numm2]);
clearInterval(ball_shoot_ar[numm2]);
ball_shoot_num[numm2] = 0;
}
}
function shoot_en_bul(gun, enemy, bullet, num1, num444, num5555) {
ebull++;
if (enemy.speed == 0) {
var _local3 = this.attachMovie(bullet, ("ball" + ebull) + 1, ebull + 50000);
ball_shoot[ebull] = _local3;
gun_rad = Math.atan2(gun.gun._y, gun.gun._x);
gun_deg = (gun_rad * 180) / Math.PI;
rotat = gun._rotation + ((gun_deg - 360) + 90);
dx = Math.sin((Math.PI/180) * rotat);
dy = Math.cos((Math.PI/180) * rotat);
gun_xscal = Math.abs(gun._xscale);
ball_shoot_num[ebull] = 0;
dx_ar[ebull] = dx;
yx_ar[ebull] = dy;
_local3._x = gun._x + (dx * (-gun.gun._y));
_local3._y = gun._y - (((dy * (-gun.gun._y)) * gun._xscale) / gun_xscal);
_local3._rotation = gun._rotation;
rotat = gun._rotation + ((gun_deg - 360) + 90);
dx = Math.sin((Math.PI/180) * (rotat + 5));
dy = Math.cos((Math.PI/180) * (rotat + 5));
dx_ar[ebull] = dx;
yx_ar[ebull] = dy;
if (gun.kindof == "hand_en") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "hand_en2") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_m16") {
_local3.speed = 6;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_m1") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_uzi") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 15, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_gal") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_ak47") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 17, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_bizon") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 19, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_pk96") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 18, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_rpg") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 19, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_glock") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 16, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_mp5hk") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 15, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_sa80") {
_local3.speed = 6;
bull_move_ene = setInterval(ball_move, 18, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_law") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 19, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_law_camo") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 17, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_mp5g") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 14, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_aug") {
_local3.speed = 6;
bull_move_ene = setInterval(ball_move, 17, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_shotgun") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 17, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "APC_MACHINE") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 17, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_mag") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 17, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_m4") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 16, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_commando") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 14, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_m5") {
_local3.speed = 6;
bull_move_ene = setInterval(ball_move, 9, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_m60") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 17, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_mp5_sd") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 14, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_desert") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 17, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_g36") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 10, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_at") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 16, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_m203") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 16, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
}
}
function shoot_enema(zzz, eee, num) {
if ((zzz.speed == 0) && (enem_time_ar[num] == 2)) {
var _local4 = 0;
while (_local4 < addons_ar.length) {
if (((addons_ar[_local4].id == zzz.id) && (addons_ar[_local4].greande > 0)) && (addons_ar[_local4].kindof == "explode")) {
throw_greande_en(addons_ar[_local4]);
addons_ar[_local4].greande--;
}
_local4++;
}
}
if (((eee.kindof == "hand_en") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 10) {
eee.number = 0;
enemy_mp4.attachSound("gunshots_sm.wav");
enemy_mp4.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 20, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "hand_en2") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 6) {
eee.number = 0;
enemy_mp3.attachSound("GUN04_cop.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 30, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_m16") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 3) {
eee.number = 0;
enemy_mp3.attachSound("M16.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 70, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
zzz.ifstop = 1;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_m1") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 6) {
eee.number = 0;
enemy_mp3.attachSound("GUN04_cop.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 70, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_uzi") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 4) {
eee.gun.gotoAndPlay(2);
enemy_mp3.attachSound("uzi.wav");
enemy_mp3.start();
shoot_en_bul(eee, zzz, "ball2", 1, 20, num);
}
if (enem_time_ar[num] > 5) {
eee.number = 0;
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 20, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_gal") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 5) {
eee.number = 0;
enemy_mp3.attachSound("galil.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 36, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_ak47") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 3) {
eee.number = 0;
enemy_mp3.attachSound("ak47.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 38, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_bizon") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 3) {
eee.gun.gotoAndPlay(2);
enemy_mp3.attachSound("uzi.wav");
enemy_mp3.start();
shoot_en_bul(eee, zzz, "ball2", 1, 22, num);
}
if (enem_time_ar[num] > 4) {
eee.number = 0;
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 22, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_pk96") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 2) {
eee.gun.gotoAndPlay(2);
enemy_mp3.attachSound("pk96.wav");
enemy_mp3.start();
shoot_en_bul(eee, zzz, "ball2", 1, 34, num);
}
if (enem_time_ar[num] == 3) {
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 34, num);
}
if (enem_time_ar[num] > 4) {
eee.number = 0;
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 34, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_rpg") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 4) {
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "rpg_mis", 1, 100, num);
}
if (enem_time_ar[num] > 8) {
eee.number = 0;
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_glock") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 2) {
eee.number = 0;
enemy_mp3.attachSound("gunshots_sm.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 22, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_mp5hk") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 1) {
eee.gun.gotoAndPlay(2);
enemy_mp3.attachSound("mp5.wav");
enemy_mp3.start();
shoot_en_bul(eee, zzz, "ball3", 1, 26, num);
}
if (enem_time_ar[num] > 3) {
eee.number = 0;
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 26, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_sa80") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 3) {
eee.number = 0;
enemy_mp3.attachSound("M16.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 70, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
zzz.ifstop = 1;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_law") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 3) {
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "rpg_mis", 1, 130, num);
}
if (enem_time_ar[num] > 8) {
eee.number = 0;
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_mp5g") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 1) {
eee.gun.gotoAndPlay(2);
enemy_mp3.attachSound("mp5.wav");
enemy_mp3.start();
shoot_en_bul(eee, zzz, "ball3", 1, 28, num);
}
if (enem_time_ar[num] > 3) {
eee.number = 0;
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 28, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_aug") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 3) {
eee.number = 0;
enemy_mp3.attachSound("aug.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 70, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
zzz.ifstop = 1;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_shotgun") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 3) {
eee.number = 0;
enemy_mp3.attachSound("shotgun.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "shot_ball", 1, 24, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
zzz.ifstop = 1;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_law_camo") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 3) {
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "rpg_mis", 1, 130, num);
}
if (enem_time_ar[num] > 6) {
eee.number = 0;
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_mag") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 3) {
eee.number = 0;
enemy_mp3.attachSound("mag.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "shot_ball", 1, 24, num);
zzz.speed = 4;
enem_time_ar[num] = 0;
eee.number = 0;
zzz.ifstop = 1;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_commando") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 1) {
eee.gun.gotoAndPlay(2);
enemy_mp3.attachSound("m16a2.wav");
enemy_mp3.start();
shoot_en_bul(eee, zzz, "ball3", 1, 30, num);
}
if (enem_time_ar[num] > 3) {
eee.number = 0;
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 30, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_m5") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 3) {
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball4", 1, 90, num);
enemy_mp3.attachSound("aug.wav");
enemy_mp3.start();
}
if (enem_time_ar[num] > 8) {
eee.number = 0;
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_m60") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 2) {
eee.gun.gotoAndPlay(2);
enemy_mp3.attachSound("pk96.wav");
enemy_mp3.start();
shoot_en_bul(eee, zzz, "ball2", 1, 40, num);
}
if (enem_time_ar[num] == 3) {
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 40, num);
}
if (enem_time_ar[num] > 4) {
eee.number = 0;
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 34, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "APC_MACHINE") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 3) {
eee.number = 0;
enemy_mp3.attachSound("aug.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 70, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
zzz.ifstop = 1;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_m4") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 2) {
eee.number = 0;
enemy_mp3.attachSound("M16.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 60, num);
zzz.speed = 3;
enem_time_ar[num] = 0;
eee.number = 0;
zzz.ifstop = 1;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_mp5_sd") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 3) {
eee.gun.gotoAndPlay(2);
enemy_mp3.attachSound("mp5_sd.wav");
enemy_mp3.start();
shoot_en_bul(eee, zzz, "ball3", 1, 30, num);
}
if (enem_time_ar[num] > 4) {
eee.number = 0;
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 30, num);
zzz.speed = 3;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_desert") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 3) {
eee.number = 0;
enemy_mp3.attachSound("mag.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "shot_ball", 1, 26, num);
zzz.speed = 3;
enem_time_ar[num] = 0;
eee.number = 0;
zzz.ifstop = 1;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_g36") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 2) {
eee.number = 0;
enemy_mp3.attachSound("g36.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball4", 1, 40, num);
zzz.speed = 3;
enem_time_ar[num] = 0;
eee.number = 0;
zzz.ifstop = 1;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_at") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 4) {
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "missle", 1, 100, num);
}
if (enem_time_ar[num] > 10) {
eee.number = 0;
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_m203") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 3) {
eee.gun.gotoAndPlay(2);
enemy_mp3.attachSound("40mm.wav");
enemy_mp3.start();
shoot_en_bul(eee, zzz, "40mm", 1, 30, num);
}
if (enem_time_ar[num] > 6) {
eee.number = 0;
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
}
function shoot_enem(ttt, aaa) {
if (((((((ttt._x >= (pac._x - 10)) && (ttt._x <= (pac._x + 10))) && (ttt.speed >= 2)) && (ttt != null)) && (ttt._y >= (pac._y - aaa.range))) && (ttt._y <= (pac._y + aaa.range))) && (aaa != null)) {
if ((ttt._y <= pac._y) && (ttt.speed >= 2)) {
var _local2 = 0;
while (_local2 < wall_ar.length) {
if (((((((ttt._x < (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2))) && (ttt._x > (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (if_right == 0)) && (pac._x > (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (pac._x < (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2)))) && (ttt._y < (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (pac._y > (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2)))) {
ttt.ifstop = 1;
}
_local2++;
}
trace("donw");
if (ttt.ifstop == 1) {
ttt.ifstop = 0;
} else if (ttt.ifstop == 0) {
shoot_d++;
enem_time_ar[shoot_d] = 0;
ttt.speed = 0;
ttt.pos = "down";
aaa.number = 1;
clearInterval(aaa.interr);
inter_shoot = setInterval(shoot_enema, 130, ttt, aaa, shoot_d);
enem_aar[shoot_d] = inter_shoot;
aaa.interr = inter_shoot;
}
}
if ((ttt._y > pac._y) && (ttt.speed >= 2)) {
var _local2 = 0;
while (_local2 < wall_ar.length) {
if (((((((ttt._x < (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2))) && (ttt._x > (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (if_right == 0)) && (pac._x > (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (pac._x < (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2)))) && (ttt._y > (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2)))) && (pac._y < (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) {
ttt.ifstop = 1;
}
_local2++;
}
if (ttt.ifstop == 1) {
ttt.ifstop = 0;
} else if (ttt.ifstop == 0) {
shoot_d++;
enem_time_ar[shoot_d] = 0;
ttt.speed = 0;
ttt.pos = "up";
}
aaa.number = 1;
clearInterval(aaa.interr);
inter_shoot = setInterval(shoot_enema, 130, ttt, aaa, shoot_d);
enem_aar[shoot_d] = inter_shoot;
aaa.interr = inter_shoot;
}
} else if (((((((ttt._y >= (pac._y - 10)) && (ttt._y <= (pac._y + 10))) && (ttt.speed >= 2)) && (ttt != null)) && (ttt._x >= (pac._x - aaa.range))) && (ttt._x <= (pac._x + aaa.range))) && (aaa != null)) {
if ((ttt._x <= pac._x) && (ttt.speed >= 2)) {
var _local2 = 0;
while (_local2 < wall_ar.length) {
if (((((((ttt._y < (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2))) && (ttt._y > (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (if_right == 0)) && (pac._y > (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (pac._y < (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2)))) && (ttt._x < (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (pac._x > (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2)))) {
ttt.ifstop = 1;
}
_local2++;
}
if (ttt.ifstop == 1) {
ttt.ifstop = 0;
} else if (ttt.ifstop == 0) {
shoot_d++;
enem_time_ar[shoot_d] = 0;
ttt.speed = 0;
aaa.number = 1;
ttt.pos = "right";
clearInterval(aaa.interr);
inter_shoot = setInterval(shoot_enema, 130, ttt, aaa, shoot_d);
enem_aar[shoot_d] = inter_shoot;
aaa.interr = inter_shoot;
}
}
if ((ttt._x > pac._x) && (ttt.speed >= 2)) {
var _local2 = 0;
while (_local2 < wall_ar.length) {
if (((((((ttt._y < (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2))) && (ttt._y > (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (if_right == 0)) && (pac._y > (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (pac._y < (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2)))) && (ttt._x > (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2)))) && (pac._x < (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) {
trace("okL");
ttt.ifstop = 1;
}
_local2++;
}
if (ttt.ifstop == 1) {
ttt.ifstop = 0;
} else if (ttt.ifstop == 0) {
shoot_d++;
enem_time_ar[shoot_d] = 0;
ttt.speed = 0;
aaa.number = 1;
ttt.pos = "left";
clearInterval(aaa.interr);
inter_shoot = setInterval(shoot_enema, 130, ttt, aaa, shoot_d);
enem_aar[shoot_d] = inter_shoot;
aaa.interr = inter_shoot;
}
}
}
}
function throw_greande_en(enem) {
greande_num++;
var _local2 = attachMovie("greande2", "greandee" + greande_num, 75500 + greande_num);
greande_ar[greande_num] = _local2;
trace(greande_ar[greande_num]);
greande_ar[greande_num]._x = enem._x;
greande_ar[greande_num]._y = enem._y;
greande_ar[greande_num]._rotation = enem._rotation;
greande_ar[greande_num]._xscale = enem._xscale;
trace(greande_ar[greande_num]._y);
}
function explode_greande() {
var _local1 = 0;
while (_local1 < greande_ar.length) {
if (greande_ar[_local1].count == 11) {
trace("boom");
greand_throw = 2;
rotat = greande_ar[_local1]._rotation;
dx = Math.sin((Math.PI/180) * rotat);
dy = Math.cos((Math.PI/180) * rotat);
explode_num++;
var _local2 = attachMovie("expl_big", "expl" + explode_num, 65000 + explode_num);
explode_ar[explode_num] = _local2;
explode_ar[explode_num]._x = greande_ar[_local1]._x + (dx * 220);
explode_ar[explode_num]._y = greande_ar[_local1]._y - (dy * 220);
explode_ar[explode_num]._width = 34;
explode_ar[explode_num]._height = 34;
removeMovieClip(greande_ar[_local1]);
}
_local1++;
}
}
clearInterval(time_in);
var time_in;
var sec1 = 0;
var min1 = 0;
var ebull = 0;
var ammo_ar_take = new Array();
ammo_ar_take[0] = gun_ammo;
ammo_ar_take[1] = m14_ammo;
ammo_ar_take[2] = m1_ammo;
ammo_ar_take[3] = uzi_ammo;
ammo_ar_take[4] = gal_ammo;
ammo_ar_take[5] = m16_ammo;
ammo_ar_take[6] = ak47_ammo;
ammo_ar_take[7] = bizon_ammo;
ammo_ar_take[8] = glock_ammo;
ammo_ar_take[9] = mp5hk_ammo;
ammo_ar_take[10] = sa80_ammo;
ammo_ar_take[11] = rpg_ammo;
ammo_ar_take[12] = law_ammo;
ammo_ar_take[13] = mp5g_ammo;
ammo_ar_take[14] = aug_ammo;
ammo_ar_take[15] = shotgun_ammo;
ammo_ar_take[16] = camo_law_ammo;
ammo_ar_take[17] = mag_ammo;
ammo_ar_take[18] = m4_ammo;
ammo_ar_take[19] = commando_ammo;
ammo_ar_take[20] = m5_ammo;
ammo_ar_take[21] = m60_ammo;
ammo_ar_take[22] = mp5_sd_ammo;
ammo_ar_take[23] = desert_ammo;
ammo_ar_take[24] = g36_ammo;
ammo_ar_take[25] = at_ammo;
ammo_ar_take[26] = m14_s_ammo;
ammo_ar_take[27] = m203_ammo;
ammo_ar_take[28] = bizon_la_ammo;
ammo_ar_take[29] = g36_la_ammo;
time_in = setInterval(timeof, 1000);
addenemy("enemyzz", 0, 50, 50, "en_m203");
addenemy("enemyzz", 12, 40, 80, "en_uzi");
var shoot_d = 0;
var inter_shoot_c = 0;
var inter_shoot;
var inter_shootb;
var enem_aar = new Array();
var enem_time_ar = new Array();
var ball_shoot = new Array();
var bull_move_ene;
var ball_shoot_ar = new Array();
var ball_shoot_num = new Array();
var dx_ar = new Array();
var yx_ar = new Array();
var enemy_mp4 = new Sound();
var enemy_mp3 = new Sound();
var if_right = 0;
var greande_num = 0;
var greande_ar = new Array();
Instance of Symbol 425 MovieClip [empty] "controller" in Frame 6
onClipEvent (enterFrame) {
if (_root.score_num <= 0) {
_root.score_num = 0;
}
_root.detectKeys();
_root.collectcoin();
_root.hand_where();
_root.explode_greande();
_root.exp_hit_pac();
_root.car_move();
updateAfterEvent();
}
Frame 7
tt = 1;
if (cc == 1) {
gotoAndPlay (1);
}
clearInterval(interhit);
stop();
var i = 0;
while (i < enem_ar.length) {
removeMovieClip(enem_ar[i]);
removeMovieClip(pac_graphic);
removeMovieClip(hand_en_ar[i]);
removeMovieClip(hand_pac);
removeMovieClip(addons_ar[i]);
removeMovieClip(places[i]);
removeMovieClip(explode_ar[i]);
i++;
}
var gonext4 = 0;
var i = 0;
while (i < 10000) {
clearInterval(i);
clearInterval(score_MC_AR_del[i]);
removeMovieClip(score_MC_AR[i]);
clearInterval(interhit);
clearInterval(enem_aar[i]);
clearInterval(bbb[i]);
clearInterval(ball_shoot_ar[i]);
removeMovieClip(ball_shoot[i]);
clearInterval(pac_shoot_ar);
removeMovieClip(pac_shoot[i]);
clearInterval(count_ar[i]);
fade_enem_ar[i] = 0;
removeMovieClip(ammo_ar_take[i]);
removeMovieClip(enem_add);
removeMovieClip(gun_add);
removeMovieClip(pac_weapon[i]);
clearInterval(time_in);
i++;
}
if (uover == 100) {
clearInterval(uover_in);
gotoAndPlay (6);
}
function goover() {
uover--;
}
function play44() {
gotoAndPlay (6);
}
var uover_in;
uover = 5;
uover_in = setInterval(goover, 1000);
function detectKeys() {
if (Key.isDown(32) && (_root.gonext4 == 4)) {
gotoAndStop (8);
}
}
Instance of Symbol 425 MovieClip [empty] "controller" in Frame 7
onClipEvent (enterFrame) {
_root.detectKeys();
}
Instance of Symbol 551 MovieClip "com2" in Frame 7
on (press) {
getURL ("http://games.fs1.co.il", "_blank");
}
Frame 8
bb = 1;
stop();
clearInterval(interhit);
score_num = 0;
var i = 0;
while (i < enem_ar.length) {
removeMovieClip(enem_ar[i]);
removeMovieClip(pac_graphic);
removeMovieClip(hand_en_ar[i]);
removeMovieClip(hand_pac);
removeMovieClip(addons_ar[i]);
removeMovieClip(explode_ar[i]);
i++;
}
var i = 0;
while (i < 10000) {
clearInterval(i);
clearInterval(score_MC_AR_del[i]);
removeMovieClip(score_MC_AR[i]);
clearInterval(interhit);
clearInterval(enem_aar[i]);
clearInterval(bbb[i]);
clearInterval(ball_shoot_ar[i]);
removeMovieClip(ball_shoot[i]);
clearInterval(pac_shoot_ar);
removeMovieClip(pac_shoot[i]);
clearInterval(count_ar[i]);
fade_enem_ar[i] = 0;
removeMovieClip(ammo_ar_take[i]);
removeMovieClip(enem_add);
removeMovieClip(gun_add);
removeMovieClip(pac_weapon[i]);
clearInterval(time_in);
i++;
}
function alpha(ttt) {
var _local1 = 0;
while (_local1 < ttt.length) {
ttt[_local1]._visible = 0;
_local1++;
}
}
var ld_ar = new Array(d_l1, d_l2, d_l3, d_l4, d_l5, d_l6, d_l7, d_l8, d_l9, d_l10, d_l11);
ld_ar.dd = "d_l";
var rd_ar = new Array(d_r1, d_r2, d_r3, d_r4, d_r5, d_r6, d_r7, d_r8, d_r9, d_r10, d_r11);
rd_ar.dd = "d_r";
var ru_ar = new Array(u_r1, u_r2, u_r3, u_r4, u_r5, u_r6, u_r7, u_r8, u_r9, u_r10, u_r11);
ru_ar.dd = "u_r";
var lu_ar = new Array(u_l1, u_l2, u_l3, u_l4, u_l5, u_l6, u_l7, u_l8, u_l9, u_l10, u_l11);
lu_ar.dd = "u_l";
var places = new Array();
alpha(ld_ar);
alpha(rd_ar);
alpha(ru_ar);
alpha(lu_ar);
var monk_a0 = attachMovie("monk", "monk1", 1000000);
var monk_a1 = attachMovie("monk", "monk2", 1000001);
places[0] = monk_a0;
places[1] = monk_a1;
places[0]._x = 381;
places[0]._y = 330;
places[1]._x = 174;
places[1]._y = 330;
places[0]._alpha = 80;
places[1]._alpha = 80;
function guideof(ttt) {
var _local2 = 0;
while (_local2 < ttt.length) {
if (pac.hitTest(ttt[_local2]._x, ttt[_local2]._y, yes)) {
if (ttt.dd == "d_l") {
pac._x = pac._x - 4;
pac._y = pac._y + 4;
} else if (ttt.dd == "d_r") {
pac._x = pac._x + 4;
pac._y = pac._y + 4;
} else if (ttt.dd == "u_r") {
pac._x = pac._x + 4;
pac._y = pac._y - 4;
} else if (ttt.dd == "u_l") {
pac._x = pac._x - 4;
pac._y = pac._y - 4;
}
}
_local2++;
}
}
function pachit(aaa) {
if (life <= 0) {
score_num = score_num - 1000;
levelof = "level3";
gotoAndStop ("gameover");
}
life_mc.gotoAndStop(life);
if (pac.hit > 0) {
if (pac.caneat == 0) {
myTransform.ba = myTransform.ba - 5;
myTransform.ga = myTransform.ga - 5;
my_color.setTransform(myTransform);
}
pac.hit--;
} else if (pac.hit < 0) {
pac.hit = 0;
}
if (pac.hit == 0) {
if (myTransform.ba < 100) {
myTransform.ba = myTransform.ba + 5;
myTransform.ga = myTransform.ga + 5;
my_color.setTransform(myTransform);
}
}
updateAfterEvent();
if (pac.caneat > 0) {
aaa.speed = 0;
myTransform.ra = myTransform.ra - 5;
myTransform.ba = myTransform.ba - 5;
my_color.setTransform(myTransform);
pac.caneat--;
}
if (pac.caneat < 0) {
pac.caneat = 0;
}
if ((pac.caneat == 0) && (pac.hit == 0)) {
pac.hit == 0;
if (myTransform.ra < 100) {
myTransform.ra = 100;
myTransform.ba = 100;
myTransform.ga = 100;
my_color.setTransform(myTransform);
}
}
updateAfterEvent();
}
function movea() {
check1(pac);
if (pac._rotation == 90) {
pac._x = pac._x + speed_pac;
}
if (pac._rotation == -90) {
pac._x = pac._x - speed_pac;
}
if (pac._rotation == 180) {
pac._y = pac._y + speed_pac;
}
if (pac._rotation == 0) {
pac._y = pac._y - speed_pac;
}
tt++;
if (tt >= 4) {
tt = 0;
clearInterval(intermove_pac);
}
updateAfterEvent();
}
function detectKeys() {
collet_ammo();
ammo_txt.text = ammo;
pac_graphic._x = pac._x;
pac_graphic._y = pac._y;
updateAfterEvent();
pacx.text = pac._x;
speed_pac = 5;
if (pac.hit > 8) {
speed_pac = 0;
}
if (Key.isDown(39) && (pac._x <= (760 - (pac._width / 2)))) {
clearInterval(intermove_pac);
check1(pac);
pac._x = pac._x + speed_pac;
pac._rotation = 90;
pac_graphic._rotation = 90;
if (pac_graphic._xscale == 100) {
pac_graphic._xscale = -pac_graphic._xscale;
}
if (pac_graphic._currentframe == "1") {
pac_graphic.nextFrame();
}
}
if (ammo == 0) {
pac.hand = 0;
}
if (Key.isDown(37) && (pac._x >= (0 + (pac._width / 2)))) {
clearInterval(intermove_pac);
check1(pac);
pac._x = pac._x - speed_pac;
if (pac_graphic._xscale == -100) {
pac_graphic._xscale = -pac_graphic._xscale;
}
pac_graphic._rotation = 270;
if (pac_graphic._currentframe == "1") {
pac_graphic.nextFrame();
}
}
if (Key.isDown(38) && (pac._y >= 70)) {
clearInterval(intermove_pac);
check1(pac);
pac._y = pac._y - speed_pac;
pac._rotation = 0;
pac_graphic._rotation = 0;
if (pac_graphic._xscale == -100) {
pac_graphic._xscale = -pac_graphic._xscale;
}
if (pac_graphic._currentframe == "1") {
pac_graphic.nextFrame();
}
}
if (Key.isDown(40) && (pac._y <= (500 - (pac._height / 2)))) {
clearInterval(intermove_pac);
check1(pac);
pac._rotation = 180;
pac._y = pac._y + speed_pac;
pac_graphic._rotation = 180;
if (pac_graphic._xscale == -100) {
pac_graphic._xscale = -pac_graphic._xscale;
}
if (pac_graphic._currentframe == "1") {
pac_graphic.nextFrame();
}
}
updateAfterEvent();
}
function check1(hit) {
var _local1 = 0;
while (_local1 < wall_ar.length) {
var _local5 = (wall_ar[_local1]._x - (wall_ar[_local1]._width / 2)) - 2;
var _local3 = (wall_ar[_local1]._x + (wall_ar[_local1]._width / 2)) + 2;
var _local4 = (wall_ar[_local1]._y - (wall_ar[_local1]._height / 2)) - 2;
var _local6 = (wall_ar[_local1]._y + (wall_ar[_local1]._height / 2)) + 2;
if (((hit._x >= _local5) && (hit._x <= _local3)) && ((hit._y <= _local6) && (hit._y >= _local4))) {
if (Key.isDown(38) && ((hit._y - (hit._height / 2)) >= (wall_ar[_local1]._y - 3))) {
guideof(ld_ar);
guideof(rd_ar);
guideof(ru_ar);
guideof(lu_ar);
speed_pac = 0;
trace("we cant up");
}
if (Key.isDown(40) && ((hit._y + (hit._height / 2)) <= (wall_ar[_local1]._y + 3))) {
guideof(ld_ar);
guideof(rd_ar);
guideof(ru_ar);
guideof(lu_ar);
speed_pac = 0;
trace("we cant down");
}
if (Key.isDown(39) && ((hit._x + (hit._width / 2)) <= (wall_ar[_local1]._x + 3))) {
guideof(ld_ar);
guideof(rd_ar);
guideof(ru_ar);
guideof(lu_ar);
speed_pac = 0;
trace("we cant right");
}
if (Key.isDown(37) && ((hit._x - (hit._width / 2)) >= (wall_ar[_local1]._x - 3))) {
guideof(ld_ar);
guideof(rd_ar);
guideof(ru_ar);
guideof(lu_ar);
speed_pac = 0;
trace("we cant left");
}
}
_local1++;
}
}
var pac_graphic1 = attachMovie("pacman_graphic2", "pac_graphic", 1);
var pac_graphic1 = attachMovie("hand_pac", "hand_pac", 1002);
var pac_graphic1 = attachMovie("m14_pac", "m14_pac", 1003);
var pac_graphic1 = attachMovie("m1_pac", "m1_pac", 1004);
var pac_graphic1 = attachMovie("uzi_pac", "uzi_pac", 1005);
var pac_graphic1 = attachMovie("gal_pac", "gal_pac", 1006);
var pac_graphic1 = attachMovie("m16_pac", "m16_pac", 1007);
pac_graphic._x = pac._x;
pac_graphic._y = pac._y;
pac._visible = 0;
pac.hit = "0";
pac.caneat = "0";
var interhit;
var tt = 0;
var my_color = new Color(_root.pac_graphic);
var myTransform = my_color.getTransform();
var ammo = 0;
var pac_weapon = new Array();
pac_weapon[0] = hand_pac;
pac_weapon[1] = m14_pac;
pac_weapon[2] = m1_pac;
pac_weapon[3] = uzi_pac;
pac_weapon[4] = gal_pac;
pac_weapon[5] = m16_pac;
interhit = setInterval(pachit, 50);
pac_graphic._currentframe = 1;
var oKey = new Object();
var wall_ar = new Array(wall1, wall2, wall3, wall4, wall5, wall6, wall7, wall8, wall9, wall10, wall11, wall12, wall13, wall14, wall15, wall16, wall17, wall18, wall19, wall20, wall21, wall22, wall23);
var speed_pac = 5;
pac_graphic._xscale = 100;
Key.addListener(oKey);
var a = 0;
function collectcoin() {
if (end >= 60) {
score_num = score_num - ((sec1 * min1) * 5);
bb = 2;
score_num = score_num - ((10 - life) * 50);
gotoAndStop ("level4");
end = 0;
trace("end");
}
backu(backs_u_ar, pac);
backu(backs_l_ar, pac);
backu(backs_d_ar, pac);
backu(backs_r_ar, pac);
var _local1 = 0;
while (_local1 < gold_ar.length) {
if (pac.hitTest(gold_ar[_local1]._x, gold_ar[_local1]._y, yes)) {
pac_graphic.gotoAndPlay("eat");
scoreplus("point_p_10", gold_ar[_local1]);
gold_ar[_local1]._x = 800;
gold_ar[_local1]._y = 1000;
removeMovieClip(gold_ar[_local1]);
my_sound.attachSound("blip.mp3");
my_sound.start();
score_num = score_num + 10;
score.text = score_num;
end++;
}
_local1++;
}
_local1 = 0;
while (_local1 < gold_big_ar.length) {
if (pac.hitTest(gold_big_ar[_local1]._x, gold_big_ar[_local1]._y, yes)) {
pac.caneat = 80;
pac_graphic.gotoAndPlay("eat");
scoreplus("point_p_10", gold_big_ar[_local1]);
gold_big_ar[_local1]._x = 800;
gold_big_ar[_local1]._y = 1000;
removeMovieClip(gold_ar[_local1]);
my_sound.attachSound("blip.mp3");
my_sound.start();
score_num = score_num + 10;
score.text = score_num;
}
_local1++;
}
}
function backu(ttt, sss) {
var _local3 = 0;
while (_local3 < 15) {
if (sss.hitTest(ttt[_local3])) {
if (ttt.info == "up") {
sss._y = 480;
} else if (ttt.info == "left") {
sss._x = 730;
} else if (ttt.info == "down") {
sss._y = 90;
} else if (ttt.info == "right") {
sss._x = 20;
}
}
_local3++;
}
}
function scoreplus(sss, aaa) {
clearinterval(noscore);
s_score = "point_p_10" + scoree;
var _local1 = attachMovie(sss, s_score, scoree + 200000);
scoree++;
_local1._x = aaa._x;
_local1._y = aaa._y;
score_MC_AR[scoree] = _local1;
noscore = setInterval(score_fade, 20, score_MC_AR[scoree]);
score_MC_AR_del[scoree] = noscore;
}
function score_fade(bbb) {
bbb._y = bbb._y - 3;
bbb._alpha = bbb._alpha - 5;
if (bbb._alpha <= 10) {
clearInterval(score_MC_AR[bbb]);
}
}
var gold_ar = new Array(gold, gold1, gold2, gold3, gold4, gold5, gold6, gold7, gold8, gold9, gold10, gold11, gold12, gold13, gold14, gold15, gold16, gold17, gold18, gold19, gold20, gold21, gold22, gold23, gold24, gold25, gold26, gold27, gold28, gold29, gold30, gold31, gold32, gold33, gold34, gold35, gold36, gold37, gold38, gold39, gold40, gold41, gold42, gold43, gold44, gold45, gold46, gold47, gold48, gold49, gold50, gold51, gold52, gold53, gold54, gold55, gold56, gold57, gold58, gold59, gold60, gold61, gold62, gold63, gold64, gold65, gold66, gold67, gold68, gold69, gold70, gold71, gold72, gold73, gold74, gold75, gold76, gold77, gold78, gold79, gold80, gold81, gold82, gold83, gold84, gold85, gold86, gold87, gold88, gold89, gold90, gold91, gold92, gold93, gold94, gold95, gold96, gold97, gold98, gold99);
var gold_big_ar = new Array(gold_big1, gold_big2, gold_big3, gold_big4);
var my_sound = new Sound();
var backs_u_ar = new Array(u_back, u_back1, u_back2);
backs_u_ar.info = "up";
var backs_l_ar = new Array(l_back, l_back1, l_back2);
backs_l_ar.info = "left";
var backs_d_ar = new Array(d_back, d_back1, d_back2);
backs_d_ar.info = "down";
var backs_r_ar = new Array(r_back, r_back1, r_back2);
backs_r_ar.info = "right";
var allback = new Array(backs_u_ar, backs_l_ar, backs_r_ar, backs_d_ar);
var i = 0;
while (i < 30) {
var j = 0;
while (j < 10) {
allback[i][j]._visible = 0;
c_guide_ar[j]._visible = 0;
j++;
}
i++;
}
var end = 0;
var oKey1 = new Object();
Key.addListener(oKey1);
var scoree = 0;
var noscore;
var score_MC_AR_del = new Array();
var score_MC_AR = new Array();
function enem_move(ttt, gun, add1) {
if (ttt != undefined) {
shoot_enem(ttt, gun);
check_hit_pac(ttt);
check2(ttt);
backu1(backs_u_ar, ttt);
backu1(backs_l_ar, ttt);
backu1(backs_d_ar, ttt);
backu1(backs_r_ar, ttt);
}
if (ttt.pos == "left") {
ttt._x = ttt._x - ttt.speed;
ttt._rotation = 270;
if ((ttt._xscale <= -90) && (ttt._currentframe == 1)) {
ttt._xscale = -ttt._xscale;
}
}
if (ttt.pos == "right") {
ttt._x = ttt._x + ttt.speed;
ttt._rotation = 90;
if ((ttt._xscale >= 90) && (ttt._currentframe == 1)) {
ttt._xscale = -ttt._xscale;
}
}
if (ttt.pos == "up") {
ttt._y = ttt._y - ttt.speed;
ttt._rotation = 0;
if ((ttt._xscale <= -90) && (ttt._currentframe == 1)) {
ttt._xscale = -ttt._xscale;
}
}
if (ttt.pos == "down") {
ttt._y = ttt._y + ttt.speed;
ttt._rotation = 180;
if ((ttt._xscale <= -90) && (ttt._currentframe == 1)) {
ttt._xscale = -ttt._xscale;
}
}
if (ttt.pos == "mixed") {
var _local6 = ttt._rotation + 10;
dx = Math.cos((Math.PI/180) * _local6);
dy = Math.sin((Math.PI/180) * _local6);
ttt._x = ttt._x + (dx * ttt.speed);
ttt._y = ttt._y + (dy * ttt.speed);
}
gun._x = ttt._x;
gun._y = ttt._y;
gun._rotation = ttt._rotation;
gun._xscale = ttt._xscale;
add1._x = ttt._x;
add1._y = ttt._y;
add1._rotation = ttt._rotation;
add1._xscale = ttt._xscale;
var _local2 = 0;
while (_local2 < c_guide_ar.length) {
if ((((((ttt._x >= (c_guide_ar[_local2]._x - 5)) && (ttt._x <= (c_guide_ar[_local2]._x + 5))) && (ttt._y >= (c_guide_ar[_local2]._y - 5))) && (ttt._y <= (c_guide_ar[_local2]._y + 5))) && (ttt.a >= 6)) && (ttt.hitTest(c_guide_ar[_local2]))) {
ttt.a = 0;
if ((ttt._x >= (pac._x - 4)) && (ttt._x <= (pac._x + 4))) {
if (ttt._y <= pac._y) {
ttt.pos = "down";
}
if (ttt._y > pac._y) {
ttt.pos = "up";
}
} else if ((ttt._y >= (pac._y - 4)) && (ttt._y <= (pac._y + 4))) {
if (ttt._x <= pac._x) {
ttt.pos = "right";
}
if (ttt._x > pac._x) {
ttt.pos = "left";
}
} else {
var _local3 = random(3);
switch (_local3) {
case 0 :
ttt.pos = "down";
ttt.a = "0";
ttt._y = ttt._y + 3;
break;
case 1 :
ttt.pos = "up";
ttt.a = "0";
ttt._y = ttt._y - 3;
break;
case 2 :
ttt.pos = "right";
ttt.a = "0";
ttt._x = ttt._x + 3;
break;
case 3 :
ttt.pos = "left";
ttt.a = "0";
ttt._x = ttt._x - 3;
}
}
} else if (ttt.hitTest(c_guide_ar[_local2]) == false) {
ttt.a = ttt.a + 1;
}
_local2++;
}
updateAfterEvent();
}
function backu1(ttt, sss) {
var _local3 = 0;
while (_local3 < 15) {
if (sss.hitTest(ttt[_local3])) {
if (ttt.info == "up") {
sss._y = 480;
} else if (ttt.info == "left") {
sss._x = 730;
} else if (ttt.info == "down") {
sss._y = 90;
} else if (ttt.info == "right") {
sss._x = 20;
}
}
_local3++;
}
}
function check2(hit) {
var _local3 = 0;
while (_local3 < wall_ar.length) {
var _local6 = (wall_ar[_local3]._x - (wall_ar[_local3]._width / 2)) - 2;
var _local4 = (wall_ar[_local3]._x + (wall_ar[_local3]._width / 2)) + 2;
var _local5 = (wall_ar[_local3]._y - (wall_ar[_local3]._height / 2)) - 2;
var _local7 = (wall_ar[_local3]._y + (wall_ar[_local3]._height / 2)) + 2;
if ((((hit._x + (hit._width / 2)) >= _local6) && ((hit._x - (hit._width / 2)) <= _local4)) && ((((hit._y - (hit._height / 2)) <= _local7) && ((hit._y + (hit._height / 2)) >= _local5)) && (hit._currentframe == 1))) {
var _local2 = random(2);
if ((hit.pos == "left") && (hit.wall >= 1)) {
hit._x = hit._x + 4;
if (_local2 == 0) {
hit.pos = "right";
} else if (_local2 == 1) {
hit.pos = "up";
} else if (_local2 == 2) {
hit.pos = "down";
}
hit.wall = 0;
} else if ((hit.pos == "right") && (hit.wall >= 1)) {
hit._x = hit._x - 4;
if (_local2 == 0) {
hit.pos = "left";
} else if (_local2 == 1) {
hit.pos = "up";
} else if (_local2 == 2) {
hit.pos = "down";
}
hit.wall = 0;
} else if ((hit.pos == "up") && (hit.wall >= 1)) {
hit._y = hit._y + 4;
if (_local2 == 0) {
hit.pos = "right";
} else if (_local2 == 1) {
hit.pos = "down";
} else if (_local2 == 2) {
hit.pos = "left";
}
hit.wall = 0;
} else if ((hit.pos == "down") && (hit.wall >= 1)) {
hit._y = hit._y - 4;
if (_local2 == 0) {
hit.pos = "right";
} else if (_local2 == 2) {
hit.pos = "left";
} else if (_local2 == 2) {
hit.pos = "up";
}
hit.wall = 0;
}
} else if (hit.wall == 0) {
hit.wall = hit.wall + 1;
}
_local3++;
}
}
function fade_enemy(aaa, count) {
if (aaa._currentframe != 1) {
fade_enem_ar[count]++;
if ((fade_enem_ar[count] >= 10) && ((sec1 > 1) || (min1 > 1))) {
aaa._y = 1000;
aaa._x = 1000;
clearInterval(bbb[aaa.id]);
removeMovieClip(aaa);
fade_enem_ar[count] = 0;
clearInterval(count_ar[count]);
}
}
}
function check_hit_pac(hit) {
var _local6 = (pac._x - (pac._width / 2)) - 4;
var _local4 = (pac._x + (pac._width / 2)) + 4;
var _local5 = (pac._y - (pac._height / 2)) - 4;
var _local7 = (pac._y + (pac._height / 2)) + 4;
if (((((hit._x + (hit._width / 2)) >= _local6) && ((hit._x - (hit._width / 2)) <= _local4)) && (((hit._y - (hit._height / 2)) <= _local7) && ((hit._y + (hit._height / 2)) >= _local5))) && (pac.caneat <= 0)) {
if (((hit.pos == "left") && (hit.pac >= 1)) && (hit._currentframe == 1)) {
hit._x = hit._x + 4;
hit.pos = "right";
hit.pac = 0;
if (pac.hit == 0) {
pac.hit = 16;
if (pac.caneat <= 0) {
life--;
}
}
}
if (((hit.pos == "right") && (hit.pac >= 1)) && (hit._currentframe == 1)) {
hit._x = hit._x - 4;
hit.pos = "left";
hit.pac = 0;
if (pac.hit == 0) {
pac.hit = 16;
life--;
if (pac.caneat == 0) {
life--;
}
}
}
if (((hit.pos == "up") && (hit.pac >= 1)) && (hit._currentframe == 1)) {
hit._y = hit._y + 4;
hit.pos = "down";
hit.pac = 0;
if (pac.hit == 0) {
pac.hit = 16;
life--;
if (pac.caneat == 0) {
life--;
}
}
}
if (((hit.pos == "down") && (hit.pac >= 1)) && (hit._currentframe == 1)) {
hit._y = hit._y - 4;
hit.pos = "up";
hit.pac = 0;
if (pac.hit == 0) {
pac.hit = 16;
life--;
if (pac.caneat == 0) {
life--;
}
}
} else if (hit.hitTest(pac) == false) {
hit.pac = hit.pac + 1;
}
}
if (((((hit._x + (hit._width / 2)) >= _local6) && ((hit._x - (hit._width / 2)) <= _local4)) && (((hit._y - (hit._height / 2)) <= _local7) && ((hit._y + (hit._height / 2)) >= _local5))) && (pac.caneat > 0)) {
if (pac.caneat > 0) {
if ((aeee <= 0) && (hit._currentframe == 1)) {
var _local3 = 0;
while (_local3 < hand_en_ar.length) {
if (hand_en_ar[_local3].id == hit.id) {
hand_en_ar[_local3].gotoAndPlay(2);
}
if (addons_ar[_local3].id == hit.id) {
addons_ar[_local3].gotoAndPlay(2);
}
_local3++;
}
hit.speed = 0;
hit.gotoAndPlay(2);
num_enemys--;
_root.scoreplus("point_p_20", hit);
score_num = score_num + 20;
score.text = score.text - -20;
enem_count++;
trace("enem_count=" + enem_count);
fade_enem_ar[enem_count] = 0;
inter_enemy_aa = setInterval(fade_enemy, 40, hit, enem_count);
}
count_ar[enem_count] = inter_enemy_aa;
}
}
}
function addenemy(enem_mca, rax, gax, bax, gun, addon) {
var _local2 = enem_ar.length;
trace(_local2);
var _local3 = this.attachMovie(enem_mca, ("enemy" + _local2) + 1, _local2 + 10000);
var _local5 = this.attachMovie(gun, ("hand_en" + _local2) + 1, (_local2 + 10000) + 6000);
var _local4 = this.attachMovie(addon, ("addon_" + _local2) + 1, (_local2 + 10000) + 3000);
var _local6 = random(400) + 100;
_local3._x = _local6;
_local3._y = 284;
_local5._x = _local6;
_local5._y = 284;
_local4._x = _local6;
_local4._y = 284;
_local3._currentframe = 1;
_local5._currentframe = 1;
_local4._currentframe = 1;
var _local10 = new Color(_local3.color4);
var _local9 = new Color(_local3.body);
var _local7 = {ra:rax, ga:gax, ba:bax, aa:100};
_local10.setTransform(_local7);
_local9.setTransform(_local7);
enem_ar[_local2] = _local3;
hand_en_ar[_local2] = _local5;
addons_ar[_local2] = _local4;
enem_ar[_local2].id = _local2;
hand_en_ar[_local2].id = _local2;
addons_ar[_local2].id = _local2;
hand_en_ar[_local2].kindof = gun;
enem_ar[_local2].a = "6";
enem_ar[_local2].wall = "5";
enem_ar[_local2].pac = "0";
enem_ar[_local2].ifstop = "0";
num_enemys++;
enem_ar[_local2].pos = "left";
enem_ar[_local2].speed = 2;
inter_en = setInterval(enem_move, 10, enem_ar[_local2], hand_en_ar[_local2], addons_ar[_local2]);
var _local8 = inter_en;
bbb[_local2] = _local8;
}
function addenemy_pos(enem_mca, rax, gax, bax, gun, addon, tx, ty) {
var _local2 = enem_ar.length;
trace(_local2);
var _local3 = this.attachMovie(enem_mca, ("enemy" + _local2) + 1, _local2 + 10000);
var _local5 = this.attachMovie(gun, ("hand_en" + _local2) + 1, (_local2 + 10000) + 6000);
var _local4 = this.attachMovie(addon, ("addon_" + _local2) + 1, (_local2 + 10000) + 3000);
var _local12 = random(400) + 100;
_local3._x = tx;
_local3._y = ty;
_local5._x = tx;
_local5._y = ty;
_local4._x = tx;
_local4._y = ty;
_local3._currentframe = 1;
_local5._currentframe = 1;
_local4._currentframe = 1;
var _local11 = new Color(_local3.color4);
var _local10 = new Color(_local3.body);
var _local6 = {ra:rax, ga:gax, ba:bax, aa:100};
_local11.setTransform(_local6);
_local10.setTransform(_local6);
enem_ar[_local2] = _local3;
hand_en_ar[_local2] = _local5;
addons_ar[_local2] = _local4;
enem_ar[_local2].id = _local2;
hand_en_ar[_local2].id = _local2;
addons_ar[_local2].id = _local2;
hand_en_ar[_local2].kindof = gun;
enem_ar[_local2].a = "6";
enem_ar[_local2].wall = "5";
enem_ar[_local2].pac = "0";
enem_ar[_local2].ifstop = "0";
num_enemys++;
enem_ar[_local2].pos = "left";
enem_ar[_local2].speed = 2;
inter_en = setInterval(enem_move, 10, enem_ar[_local2], hand_en_ar[_local2], addons_ar[_local2]);
var _local7 = inter_en;
bbb[_local2] = _local7;
}
var i = 0;
while (i < enem_ar.length) {
clearInterval(bbb[i]);
enem_ar[i].id.tt = 0;
i++;
}
var enem_count = 0;
var num_enemys = 4;
life = 10;
var inter_en;
var enem_ar = new Array(enemy1, enemy3);
var hand_en_ar = new Array(hand_en1);
var addons_ar = new Array();
enem_ar[0].a = "6";
enem_ar[0].wall = "5";
enem_ar[0].ifstop = "0";
enem_ar[0].pac = "0";
enem_ar[0].id = "0";
hand_en_ar[0].id = "0";
hand_en_ar[0].kindof = "hand_en2";
enem_ar[1].a = "6";
enem_ar[1].wall = "5";
enem_ar[1].pac = "0";
enem_ar[1].id = "1";
enem_ar[1].ifstop = "0";
enem_ar[2].a = "6";
enem_ar[2].wall = "5";
enem_ar[2].pac = "0";
enem_ar[2].id = "2";
enem_ar[2].ifstop = "0";
var c_guide_ar = new Array(c_guide1, c_guide2, c_guide3, c_guide4, c_guide5, c_guide6, c_guide7, c_guide8, c_guide9, c_guide10, c_guide11, c_guide12, c_guide13, c_guide14);
var i = 0;
while (i < 30) {
c_guide_ar[i]._visible = 0;
i++;
}
enem_ar[0].pos = "left";
enem_ar[0].speed = 2;
enem_ar[1].pos = "right";
enem_ar[1].speed = 2;
enem_ar[2].pos = "right";
enem_ar[2].speed = 2;
var inter_en;
var bbb = new Array();
var i = 0;
while (i < enem_ar.length) {
inter_en = setInterval(enem_move, 20, enem_ar[i], hand_en_ar[i]);
var ttt = inter_en;
bbb[i] = ttt;
i++;
}
var inter_enemy_aa;
var fade_enem_ar = new Array();
var aeee = 0;
clearInterval(inter_mmm);
var pac_mp3 = new Sound();
var wall_mp3 = new Sound();
var inter_mmm;
inter_mmm = setInterval(movenemyss, 1000);
function bull_hit_pac(bulll) {
if (((((((bulll._x > (pac._x - (pac._width / 2))) && (bulll._x < (pac._x + (pac._width / 2)))) && (bulll._y > (pac._y - (pac._height / 2)))) && (bulll._y < (pac._y + (pac._height / 2)))) && (bulll._currentframe == 1)) && (pac.hit <= 0)) && (pac.caneat == 0)) {
life--;
bulll.gotoAndPlay(2);
pac.hit = 16;
bulll.speed = 0;
}
var _local1 = 0;
while (_local1 < wall_ar.length) {
if (((((bulll._x > (wall_ar[_local1]._x - (wall_ar[_local1]._width / 2))) && (bulll._x < (wall_ar[_local1]._x + (wall_ar[_local1]._width / 2)))) && (bulll._y > (wall_ar[_local1]._y - (wall_ar[_local1]._height / 2)))) && (bulll._y < (wall_ar[_local1]._y + (wall_ar[_local1]._height / 2)))) && (bulll._currentframe == 1)) {
bulll.gotoAndPlay(2);
wall_ar[_local1].hit == 16;
bulll.speed = 0;
}
_local1++;
}
}
function hand_where() {
if (pac.hand == 0) {
var _local2 = 0;
while (_local2 < pac_weapon.length) {
pac_weapon[_local2]._x = 1000;
pac_weapon[_local2]._y = 1000;
_local2++;
}
}
var _local1 = 0;
while (_local1 < 200) {
if (pac.hand == _local1) {
pac_weapon[_local1 - 1]._x = pac._x;
pac_weapon[_local1 - 1]._y = pac._y;
pac_weapon[_local1 - 1]._rotation = pac_graphic._rotation;
pac_weapon[_local1 - 1]._xscale = pac_graphic._xscale;
}
_local1++;
}
_local1 = 0;
while (_local1 < 200) {
if (pac.hand != _local1) {
pac_weapon[_local1 - 1]._x = 1000;
pac_weapon[_local1 - 1]._Y = 1000;
}
_local1++;
}
if ((Key.isDown(32) && (go33 >= 1)) && (ammo > 0)) {
ammo--;
if (pac_weapon[pac.hand - 1] == pac_weapon[0]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 2;
enemy_mp4.attachSound("gunshots_sm.wav");
enemy_mp4.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[1]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 2;
enemy_mp3.attachSound("GUN04_cop.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[2]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 1;
enemy_mp3.attachSound("GUN04_cop.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[3]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 1;
enemy_mp3.attachSound("uzi.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[4]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 1;
enemy_mp3.attachSound("galil.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[5]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("M16.wav");
enemy_mp3.start();
}
}
}
function shoot_en_bul2(gun, bullet) {
ebullpac++;
gun.gun.gotoAndPlay(2);
var _local3 = this.attachMovie(bullet, ("ball_pac" + ebullpac) + 1, ebullpac + 150000);
pac_shoot[ebullpac] = _local3;
gun_rad = Math.atan2(gun.gun._y, gun.gun._x);
gun_deg = (gun_rad * 180) / Math.PI;
rotat = gun._rotation + ((gun_deg - 360) + 90);
dx = Math.sin((Math.PI/180) * rotat);
dy = Math.cos((Math.PI/180) * rotat);
gun_xscal = Math.abs(gun._xscale);
pac_shoot_num[ebullpac] = 0;
dx_ar_pac[ebullpac] = dx;
yx_ar_pac[ebullpac] = dy;
_local3._x = gun._x + (dx * (-gun.gun._y));
_local3._y = gun._y - (((dy * (-gun.gun._y)) * gun._xscale) / gun_xscal);
dx = Math.sin((Math.PI/180) * (rotat + 6));
dy = Math.cos((Math.PI/180) * (rotat + 6));
dx_ar_pac[ebullpac] = dx;
yx_ar_pac[ebullpac] = dy;
if (bullet == "ball2") {
_local3.speed = 5;
bull_move_ene2 = setInterval(ball_move2, 20, pac_shoot[ebullpac], ebullpac, gun.range, gun);
pac_shoot_ar[ebullpac] = bull_move_ene2;
}
if (bullet == "ball3") {
_local3.speed = 6;
bull_move_ene2 = setInterval(ball_move2, 20, pac_shoot[ebullpac], ebullpac, gun.range, gun);
pac_shoot_ar[ebullpac] = bull_move_ene2;
}
}
function ball_move2(bullet, numm24, rangeofammo2, ffgun) {
bull_hit_enem(pac_shoot[numm24]);
bullspeed1 = pac_shoot[numm24].speed;
bullet._x = bullet._x + (dx_ar_pac[numm24] * bullspeed1);
bullet._y = bullet._y - (yx_ar_pac[numm24] * bullspeed1);
pac_shoot_num[numm24]++;
if ((pac_shoot_num[numm24] == (rangeofammo2 / 2)) && (ffgun.rate1 == "semi")) {
go33 = 1;
}
if ((pac_shoot_num[numm24] == (rangeofammo2 / 4)) && (ffgun.rate1 == "auto")) {
go33 = 1;
}
if ((pac_shoot_num[numm24] >= rangeofammo2) && (ffgun.rate1 == "mono")) {
go33 = 1;
}
if (pac_shoot_num[numm24] >= rangeofammo2) {
removeMovieClip(pac_shoot[numm24]);
clearInterval(pac_shoot_ar[numm24]);
pac_shoot_num[numm24] = 0;
}
}
function bull_hit_enem(bulll) {
var _local4 = 0;
while (_local4 < enem_ar.length) {
if ((((((bulll._x > (enem_ar[_local4]._x - (enem_ar[_local4]._width / 2))) && (bulll._x < (enem_ar[_local4]._x + (enem_ar[_local4]._width / 2)))) && (bulll._y > (enem_ar[_local4]._y - (enem_ar[_local4]._height / 2)))) && (bulll._y < (enem_ar[_local4]._y + (enem_ar[_local4]._height / 2)))) && (bulll._currentframe == 1)) && (enem_ar[_local4]._currentframe == 1)) {
var _local2 = 0;
while (_local2 < hand_en_ar.length) {
if (hand_en_ar[_local2].id == enem_ar[_local4].id) {
hand_en_ar[_local2].gotoAndPlay(2);
}
if (addons_ar[_local2].id == enem_ar[_local4].id) {
addons_ar[_local2].gotoAndPlay(2);
}
_local2++;
}
bulll.gotoAndPlay(2);
enem_count++;
enem_ar[_local4].speed = 0;
num_enemys--;
_root.scoreplus("point_p_20", enem_ar[_local4]);
score_num = score_num + 20;
score.text = score.text - -20;
enem_ar[_local4].gotoAndPlay(2);
fade_enem_ar[enem_count] = 0;
inter_enemy_aa2 = setInterval(fade_enemy, 40, enem_ar[_local4], enem_count);
count_ar[enem_count] = inter_enemy_aa2;
trace("count=" + count_ar[enem_count]);
bulll.speed = 0;
}
_local4++;
}
_local4 = 0;
while (_local4 < wall_ar.length) {
if (((((bulll._x > (wall_ar[_local4]._x - (wall_ar[_local4]._width / 2))) && (bulll._x < (wall_ar[_local4]._x + (wall_ar[_local4]._width / 2)))) && (bulll._y > (wall_ar[_local4]._y - (wall_ar[_local4]._height / 2)))) && (bulll._y < (wall_ar[_local4]._y + (wall_ar[_local4]._height / 2)))) && (bulll._currentframe == 1)) {
bulll.gotoAndPlay(2);
wall_ar[_local4].hit == 16;
bulll.speed = 0;
}
_local4++;
}
}
function collet_ammo() {
var _local1 = 0;
while (_local1 < 180) {
if ((((ammo_ar_take[_local1]._x > (pac._x - (pac._width / 2))) && (ammo_ar_take[_local1]._x < (pac._x + (pac._width / 2)))) && (ammo_ar_take[_local1]._y > (pac._y - (pac._height / 2)))) && (ammo_ar_take[_local1]._y < (pac._y + (pac._height / 2)))) {
trace("t=" + _local1);
if (_local1 == 0) {
ammo = 10 + _local1;
}
if (_local1 == 1) {
ammo = 6 + _local1;
}
if (_local1 == 2) {
ammo = 4 + _local1;
}
if (_local1 == 3) {
ammo = 14 + _local1;
}
if (_local1 == 4) {
ammo = 6 + _local1;
}
if (_local1 == 5) {
ammo = 7 + _local1;
}
pac.hand = _local1 + 1;
trace(pac.hand);
ammo_ar_take[_local1]._x = 900;
ammo_ar_take[_local1]._y = 900;
}
_local1++;
}
}
var go33 = 1;
pac.hand = 0;
var bull_move_ene2;
var pac_shoot_ar = new Array();
var pac_shoot_num = new Array();
var pac_shoot = new Array();
var ebullpac = 0;
var dx_ar_pac = new Array();
var yx_ar_pac = new Array();
var count_ar = new Array();
function timeof() {
sec1++;
clock.text = sec1;
if (sec1 >= 59) {
sec1 = 0;
min1++;
clock_min.text = min1;
}
if ((sec1 == 1) && (min1 == 0)) {
addenemy("enemy_swat", 30, 70, 60, "en_m16");
}
if (sec1 == 45) {
addenemy_pos("enemy_swat", 30, 20, 30, "en_gal", "kafia", 87, 160);
addenemy_pos("enemy_swat", 60, 6, 0, "en_m16", "kafia", 66, 290);
}
if (((sec1 == 10) || (sec1 == 30)) && (num_enemys < 6)) {
addenemy("enemyzz", 30, 0, 90);
}
if ((sec1 == 30) && (num_enemys < 5)) {
addenemy("enemy_swat", 30, 70, 60, "en_gal", "kafia");
}
if ((((sec1 == 20) || (sec1 == 40)) || (sec1 == 0)) && (num_enemys < 5)) {
addenemy("enemyzz", 52, 11, 22, "en_uzi", "kafia2");
}
if (sec1 == 1) {
ammo_ar_take[3]._x = 500;
ammo_ar_take[3]._y = 159;
}
if (sec1 == 2) {
ammo_ar_take[4]._x = 350;
ammo_ar_take[4]._y = 159;
}
if ((sec1 == 40) && (min1 == 0)) {
ammo_ar_take[5]._x = 240;
ammo_ar_take[5]._y = 159;
}
}
function ball_move(bullet, numm2, rangeofammo, numB) {
bull_hit_pac(ball_shoot[numm2]);
bullspeed = ball_shoot[numm2].speed;
bullet._x = bullet._x + (dx_ar[numm2] * bullspeed);
bullet._y = bullet._y - (yx_ar[numm2] * bullspeed);
ball_shoot_num[numm2]++;
if (ball_shoot_num[numm2] >= rangeofammo) {
removeMovieClip(ball_shoot[numm2]);
clearInterval(ball_shoot_ar[numm2]);
ball_shoot_num[numm2] = 0;
}
}
function shoot_en_bul(gun, enemy, bullet, num1, num444, num5555) {
ebull++;
if (enemy.speed == 0) {
var _local3 = this.attachMovie(bullet, ("ball" + ebull) + 1, ebull + 50000);
ball_shoot[ebull] = _local3;
gun_rad = Math.atan2(gun.gun._y, gun.gun._x);
gun_deg = (gun_rad * 180) / Math.PI;
rotat = gun._rotation + ((gun_deg - 360) + 90);
dx = Math.sin((Math.PI/180) * rotat);
dy = Math.cos((Math.PI/180) * rotat);
gun_xscal = Math.abs(gun._xscale);
ball_shoot_num[ebull] = 0;
dx_ar[ebull] = dx;
yx_ar[ebull] = dy;
_local3._x = gun._x + (dx * (-gun.gun._y));
_local3._y = gun._y - (((dy * (-gun.gun._y)) * gun._xscale) / gun_xscal);
rotat = gun._rotation + ((gun_deg - 360) + 90);
dx = Math.sin((Math.PI/180) * (rotat + 5));
dy = Math.cos((Math.PI/180) * (rotat + 5));
dx_ar[ebull] = dx;
yx_ar[ebull] = dy;
if (gun.kindof == "hand_en") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "hand_en2") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_m16") {
_local3.speed = 6;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_m1") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_uzi") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 15, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_gal") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
}
}
function shoot_enema(zzz, eee, num) {
if (((eee.kindof == "hand_en") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 10) {
eee.number = 0;
enemy_mp4.attachSound("gunshots_sm.wav");
enemy_mp4.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 20, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "hand_en2") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 6) {
eee.number = 0;
enemy_mp3.attachSound("GUN04_cop.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 30, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_m16") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 3) {
eee.number = 0;
enemy_mp3.attachSound("M16.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 70, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
zzz.ifstop = 1;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_m1") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 6) {
eee.number = 0;
enemy_mp3.attachSound("GUN04_cop.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 70, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_uzi") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 4) {
eee.gun.gotoAndPlay(2);
enemy_mp3.attachSound("uzi.wav");
enemy_mp3.start();
shoot_en_bul(eee, zzz, "ball2", 1, 20, num);
}
if (enem_time_ar[num] > 5) {
eee.number = 0;
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 20, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_gal") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 5) {
eee.number = 0;
enemy_mp3.attachSound("galil.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 36, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
}
function shoot_enem(ttt, aaa) {
if (((((((ttt._x >= (pac._x - 4)) && (ttt._x <= (pac._x + 4))) && (ttt.speed >= 2)) && (ttt != null)) && (ttt._y >= (pac._y - aaa.range))) && (ttt._y <= (pac._y + aaa.range))) && (aaa != null)) {
if ((ttt._y <= pac._y) && (ttt.speed >= 2)) {
var _local2 = 0;
while (_local2 < wall_ar.length) {
if (((((((ttt._x < (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2))) && (ttt._x > (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (if_right == 0)) && (pac._x > (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (pac._x < (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2)))) && (ttt._y < (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (pac._y > (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2)))) {
ttt.ifstop = 1;
}
_local2++;
}
trace("donw");
if (ttt.ifstop == 1) {
ttt.ifstop = 0;
} else if (ttt.ifstop == 0) {
shoot_d++;
enem_time_ar[shoot_d] = 0;
ttt.speed = 0;
ttt.pos = "down";
aaa.number = 1;
clearInterval(aaa.interr);
inter_shoot = setInterval(shoot_enema, 150, ttt, aaa, shoot_d);
enem_aar[shoot_d] = inter_shoot;
aaa.interr = inter_shoot;
}
}
if ((ttt._y > pac._y) && (ttt.speed >= 2)) {
var _local2 = 0;
while (_local2 < wall_ar.length) {
if (((((((ttt._x < (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2))) && (ttt._x > (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (if_right == 0)) && (pac._x > (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (pac._x < (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2)))) && (ttt._y > (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2)))) && (pac._y < (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) {
ttt.ifstop = 1;
}
_local2++;
}
if (ttt.ifstop == 1) {
ttt.ifstop = 0;
} else if (ttt.ifstop == 0) {
shoot_d++;
enem_time_ar[shoot_d] = 0;
ttt.speed = 0;
ttt.pos = "up";
}
aaa.number = 1;
clearInterval(aaa.interr);
inter_shoot = setInterval(shoot_enema, 150, ttt, aaa, shoot_d);
enem_aar[shoot_d] = inter_shoot;
aaa.interr = inter_shoot;
}
} else if (((((((ttt._y >= (pac._y - 4)) && (ttt._y <= (pac._y + 4))) && (ttt.speed >= 2)) && (ttt != null)) && (ttt._x >= (pac._x - aaa.range))) && (ttt._x <= (pac._x + aaa.range))) && (aaa != null)) {
if ((ttt._x <= pac._x) && (ttt.speed >= 2)) {
var _local2 = 0;
while (_local2 < wall_ar.length) {
if (((((((ttt._y < (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2))) && (ttt._y > (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (if_right == 0)) && (pac._y > (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (pac._y < (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2)))) && (ttt._x < (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (pac._x > (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2)))) {
ttt.ifstop = 1;
}
_local2++;
}
if (ttt.ifstop == 1) {
ttt.ifstop = 0;
} else if (ttt.ifstop == 0) {
shoot_d++;
enem_time_ar[shoot_d] = 0;
ttt.speed = 0;
aaa.number = 1;
ttt.pos = "right";
clearInterval(aaa.interr);
inter_shoot = setInterval(shoot_enema, 150, ttt, aaa, shoot_d);
enem_aar[shoot_d] = inter_shoot;
aaa.interr = inter_shoot;
}
}
if ((ttt._x > pac._x) && (ttt.speed >= 2)) {
var _local2 = 0;
while (_local2 < wall_ar.length) {
if (((((((ttt._y < (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2))) && (ttt._y > (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (if_right == 0)) && (pac._y > (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (pac._y < (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2)))) && (ttt._x > (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2)))) && (pac._x < (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) {
trace("okL");
ttt.ifstop = 1;
}
_local2++;
}
if (ttt.ifstop == 1) {
ttt.ifstop = 0;
} else if (ttt.ifstop == 0) {
shoot_d++;
enem_time_ar[shoot_d] = 0;
ttt.speed = 0;
aaa.number = 1;
ttt.pos = "left";
clearInterval(aaa.interr);
inter_shoot = setInterval(shoot_enema, 150, ttt, aaa, shoot_d);
enem_aar[shoot_d] = inter_shoot;
aaa.interr = inter_shoot;
}
}
}
}
clearInterval(time_in);
var time_in;
var sec1 = 0;
var min1 = 0;
var ebull = 0;
var ammo_ar_take = new Array();
ammo_ar_take[0] = gun_ammo;
ammo_ar_take[1] = m14_ammo;
ammo_ar_take[2] = m1_ammo;
ammo_ar_take[3] = uzi_ammo;
ammo_ar_take[4] = gal_ammo;
ammo_ar_take[5] = m16_ammo;
time_in = setInterval(timeof, 1000);
addenemy("enemyzz", 0, 50, 50, "hand_m1");
addenemy("enemyzz", 12, 40, 80, "en_uzi");
var shoot_d = 0;
var inter_shoot_c = 0;
var inter_shoot;
var inter_shootb;
var enem_aar = new Array();
var enem_time_ar = new Array();
var ball_shoot = new Array();
var bull_move_ene;
var ball_shoot_ar = new Array();
var ball_shoot_num = new Array();
var dx_ar = new Array();
var yx_ar = new Array();
var enemy_mp4 = new Sound();
var enemy_mp3 = new Sound();
var if_right = 0;
Instance of Symbol 425 MovieClip [empty] "controller" in Frame 8
onClipEvent (enterFrame) {
_root.detectKeys();
_root.collectcoin();
_root.hand_where();
updateAfterEvent();
}
Frame 9
if (bb == 1) {
gotoAndPlay (1);
}
clearInterval(interhit);
stop();
var i = 0;
while (i < enem_ar.length) {
removeMovieClip(enem_ar[i]);
removeMovieClip(pac_graphic);
removeMovieClip(hand_en_ar[i]);
removeMovieClip(hand_pac);
removeMovieClip(addons_ar[i]);
removeMovieClip(places[i]);
removeMovieClip(explode_ar[i]);
i++;
}
var gonext4 = 0;
var i = 0;
while (i < 10000) {
clearInterval(i);
clearInterval(score_MC_AR_del[i]);
removeMovieClip(score_MC_AR[i]);
clearInterval(interhit);
clearInterval(enem_aar[i]);
clearInterval(bbb[i]);
clearInterval(ball_shoot_ar[i]);
removeMovieClip(ball_shoot[i]);
clearInterval(pac_shoot_ar);
removeMovieClip(pac_shoot[i]);
clearInterval(count_ar[i]);
fade_enem_ar[i] = 0;
removeMovieClip(ammo_ar_take[i]);
removeMovieClip(enem_add);
removeMovieClip(gun_add);
removeMovieClip(pac_weapon[i]);
clearInterval(time_in);
i++;
}
if (uover == 100) {
clearInterval(uover_in);
gotoAndPlay (6);
}
function goover() {
uover--;
}
function play44() {
gotoAndPlay (6);
}
var uover_in;
uover = 5;
uover_in = setInterval(goover, 1000);
function detectKeys() {
if (Key.isDown(32) && (_root.gonext4 == 4)) {
gotoAndStop (10);
}
}
Instance of Symbol 425 MovieClip [empty] "controller" in Frame 9
onClipEvent (enterFrame) {
_root.detectKeys();
}
Instance of Symbol 551 MovieClip "com" in Frame 9
on (press) {
getURL ("http://games.fs1.co.il", "_blank");
}
Frame 10
stop();
clearInterval(interhit);
mm = 1;
var i = 0;
while (i < enem_ar.length) {
removeMovieClip(enem_ar[i]);
removeMovieClip(pac_graphic);
removeMovieClip(hand_en_ar[i]);
removeMovieClip(hand_pac);
removeMovieClip(addons_ar[i]);
removeMovieClip(explode_ar[i]);
i++;
}
var i = 0;
while (i < 10000) {
clearInterval(i);
clearInterval(score_MC_AR_del[i]);
removeMovieClip(score_MC_AR[i]);
clearInterval(interhit);
clearInterval(enem_aar[i]);
clearInterval(bbb[i]);
clearInterval(ball_shoot_ar[i]);
removeMovieClip(ball_shoot[i]);
clearInterval(pac_shoot_ar);
removeMovieClip(pac_shoot[i]);
clearInterval(count_ar[i]);
fade_enem_ar[i] = 0;
removeMovieClip(ammo_ar_take[i]);
removeMovieClip(enem_add);
removeMovieClip(gun_add);
removeMovieClip(pac_weapon[i]);
clearInterval(time_in);
i++;
}
function alpha(ttt) {
var _local1 = 0;
while (_local1 < ttt.length) {
ttt[_local1]._visible = 0;
_local1++;
}
}
var places = new Array();
alpha(ld_ar);
alpha(rd_ar);
alpha(ru_ar);
alpha(lu_ar);
places[0] = monk_a0;
places[1] = monk_a1;
places[0]._x = 360;
places[0]._y = 330;
places[1]._x = 174;
places[1]._y = 330;
function guideof(ttt) {
var _local2 = 0;
while (_local2 < ttt.length) {
if (pac.hitTest(ttt[_local2]._x, ttt[_local2]._y, yes)) {
if (ttt.dd == "d_l") {
pac._x = pac._x - 4;
pac._y = pac._y + 4;
} else if (ttt.dd == "d_r") {
pac._x = pac._x + 4;
pac._y = pac._y + 4;
} else if (ttt.dd == "u_r") {
pac._x = pac._x + 4;
pac._y = pac._y - 4;
} else if (ttt.dd == "u_l") {
pac._x = pac._x - 4;
pac._y = pac._y - 4;
}
}
_local2++;
}
}
function pachit(aaa) {
if (life <= 0) {
score_num = score_num - 1000;
levelof = "level4";
gotoAndStop ("gameover");
}
life_mc.gotoAndStop(life);
if (pac.hit > 0) {
if (pac.caneat == 0) {
myTransform.ba = myTransform.ba - 5;
myTransform.ga = myTransform.ga - 5;
my_color.setTransform(myTransform);
}
pac.hit--;
} else if (pac.hit < 0) {
pac.hit = 0;
}
if (pac.hit == 0) {
if (myTransform.ba < 100) {
myTransform.ba = myTransform.ba + 5;
myTransform.ga = myTransform.ga + 5;
my_color.setTransform(myTransform);
}
}
updateAfterEvent();
if (pac.caneat > 0) {
aaa.speed = 0;
myTransform.ra = myTransform.ra - 5;
myTransform.ba = myTransform.ba - 5;
my_color.setTransform(myTransform);
pac.caneat--;
}
if (pac.caneat < 0) {
pac.caneat = 0;
}
if ((pac.caneat == 0) && (pac.hit == 0)) {
pac.hit == 0;
if (myTransform.ra < 100) {
myTransform.ra = 100;
myTransform.ba = 100;
myTransform.ga = 100;
my_color.setTransform(myTransform);
}
}
updateAfterEvent();
}
function movea() {
check1(pac);
if (pac._rotation == 90) {
pac._x = pac._x + speed_pac;
}
if (pac._rotation == -90) {
pac._x = pac._x - speed_pac;
}
if (pac._rotation == 180) {
pac._y = pac._y + speed_pac;
}
if (pac._rotation == 0) {
pac._y = pac._y - speed_pac;
}
tt++;
if (tt >= 4) {
tt = 0;
clearInterval(intermove_pac);
}
updateAfterEvent();
}
function detectKeys() {
collet_ammo();
ammo_txt.text = ammo;
pac_graphic._x = pac._x;
pac_graphic._y = pac._y;
updateAfterEvent();
pacx.text = pac._x;
speed_pac = 5;
if (pac.hit > 8) {
speed_pac = 0;
}
if (Key.isDown(39) && (pac._x <= (760 - (pac._width / 2)))) {
clearInterval(intermove_pac);
check1(pac);
pac._x = pac._x + speed_pac;
pac._rotation = 90;
pac_graphic._rotation = 90;
if (pac_graphic._xscale == 100) {
pac_graphic._xscale = -pac_graphic._xscale;
}
if (pac_graphic._currentframe == "1") {
pac_graphic.nextFrame();
}
}
if (ammo == 0) {
pac.hand = 0;
}
if (Key.isDown(37) && (pac._x >= (0 + (pac._width / 2)))) {
clearInterval(intermove_pac);
check1(pac);
pac._x = pac._x - speed_pac;
if (pac_graphic._xscale == -100) {
pac_graphic._xscale = -pac_graphic._xscale;
}
pac_graphic._rotation = 270;
if (pac_graphic._currentframe == "1") {
pac_graphic.nextFrame();
}
}
if (Key.isDown(38) && (pac._y >= 70)) {
clearInterval(intermove_pac);
check1(pac);
pac._y = pac._y - speed_pac;
pac._rotation = 0;
pac_graphic._rotation = 0;
if (pac_graphic._xscale == -100) {
pac_graphic._xscale = -pac_graphic._xscale;
}
if (pac_graphic._currentframe == "1") {
pac_graphic.nextFrame();
}
}
if (Key.isDown(40) && (pac._y <= (500 - (pac._height / 2)))) {
clearInterval(intermove_pac);
check1(pac);
pac._rotation = 180;
pac._y = pac._y + speed_pac;
pac_graphic._rotation = 180;
if (pac_graphic._xscale == -100) {
pac_graphic._xscale = -pac_graphic._xscale;
}
if (pac_graphic._currentframe == "1") {
pac_graphic.nextFrame();
}
}
updateAfterEvent();
}
function check1(hit) {
var _local1 = 0;
while (_local1 < wall_ar.length) {
var _local5 = (wall_ar[_local1]._x - (wall_ar[_local1]._width / 2)) - 2;
var _local3 = (wall_ar[_local1]._x + (wall_ar[_local1]._width / 2)) + 2;
var _local4 = (wall_ar[_local1]._y - (wall_ar[_local1]._height / 2)) - 2;
var _local6 = (wall_ar[_local1]._y + (wall_ar[_local1]._height / 2)) + 2;
if (((hit._x >= _local5) && (hit._x <= _local3)) && ((hit._y <= _local6) && (hit._y >= _local4))) {
if (Key.isDown(38) && ((hit._y - (hit._height / 2)) >= (wall_ar[_local1]._y - 3))) {
guideof(ld_ar);
guideof(rd_ar);
guideof(ru_ar);
guideof(lu_ar);
speed_pac = 0;
trace("we cant up");
}
if (Key.isDown(40) && ((hit._y + (hit._height / 2)) <= (wall_ar[_local1]._y + 3))) {
guideof(ld_ar);
guideof(rd_ar);
guideof(ru_ar);
guideof(lu_ar);
speed_pac = 0;
trace("we cant down");
}
if (Key.isDown(39) && ((hit._x + (hit._width / 2)) <= (wall_ar[_local1]._x + 3))) {
guideof(ld_ar);
guideof(rd_ar);
guideof(ru_ar);
guideof(lu_ar);
speed_pac = 0;
trace("we cant right");
}
if (Key.isDown(37) && ((hit._x - (hit._width / 2)) >= (wall_ar[_local1]._x - 3))) {
guideof(ld_ar);
guideof(rd_ar);
guideof(ru_ar);
guideof(lu_ar);
speed_pac = 0;
trace("we cant left");
}
}
_local1++;
}
}
var pac_graphic1 = attachMovie("pacman_graphic2", "pac_graphic", 1);
var pac_graphic1 = attachMovie("hand_pac", "hand_pac", 1002);
var pac_graphic1 = attachMovie("m14_pac", "m14_pac", 1003);
var pac_graphic1 = attachMovie("m1_pac", "m1_pac", 1004);
var pac_graphic1 = attachMovie("uzi_pac", "uzi_pac", 1005);
var pac_graphic1 = attachMovie("gal_pac", "gal_pac", 1006);
var pac_graphic1 = attachMovie("m16_pac", "m16_pac", 1007);
var pac_graphic1 = attachMovie("ak47_pac", "ak47_pac", 1008);
var pac_graphic1 = attachMovie("bizon_pac", "bizon_pac", 1009);
pac_graphic._x = pac._x;
pac_graphic._y = pac._y;
pac._visible = 0;
pac.hit = "0";
pac.caneat = "0";
var interhit;
var tt = 0;
var my_color = new Color(_root.pac_graphic);
var myTransform = my_color.getTransform();
var ammo = 0;
var pac_weapon = new Array();
pac_weapon[0] = hand_pac;
pac_weapon[1] = m14_pac;
pac_weapon[2] = m1_pac;
pac_weapon[3] = uzi_pac;
pac_weapon[4] = gal_pac;
pac_weapon[5] = m16_pac;
pac_weapon[6] = ak47_pac;
pac_weapon[7] = bizon_pac;
interhit = setInterval(pachit, 50);
pac_graphic._currentframe = 1;
var oKey = new Object();
var wall_ar = new Array(wall1, wall2, wall3, wall4, wall5, wall6, wall7, wall8, wall9, wall10, wall11, wall12, wall13, wall14, wall15, wall16, wall17, wall18, wall19, wall20, wall21, wall22, wall23);
var speed_pac = 3;
pac_graphic._xscale = 100;
Key.addListener(oKey);
var a = 0;
function collectcoin() {
if (end >= 60) {
score_num = score_num - ((sec1 * min1) * 5);
mm = 2;
score_num = score_num - ((10 - life) * 50);
gotoAndStop ("level5");
end = 0;
trace("end");
}
backu(backs_u_ar, pac);
backu(backs_l_ar, pac);
backu(backs_d_ar, pac);
backu(backs_r_ar, pac);
var _local1 = 0;
while (_local1 < gold_ar.length) {
if (pac.hitTest(gold_ar[_local1]._x, gold_ar[_local1]._y, yes)) {
pac_graphic.gotoAndPlay("eat");
scoreplus("point_p_10", gold_ar[_local1]);
gold_ar[_local1]._x = 800;
gold_ar[_local1]._y = 1000;
removeMovieClip(gold_ar[_local1]);
my_sound.attachSound("blip.mp3");
my_sound.start();
score_num = score_num + 10;
score.text = score_num;
end++;
}
_local1++;
}
_local1 = 0;
while (_local1 < gold_big_ar.length) {
if (pac.hitTest(gold_big_ar[_local1]._x, gold_big_ar[_local1]._y, yes)) {
pac.caneat = 80;
pac_graphic.gotoAndPlay("eat");
scoreplus("point_p_10", gold_big_ar[_local1]);
gold_big_ar[_local1]._x = 800;
gold_big_ar[_local1]._y = 1000;
removeMovieClip(gold_ar[_local1]);
my_sound.attachSound("blip.mp3");
my_sound.start();
score_num = score_num + 10;
score.text = score_num;
}
_local1++;
}
}
function backu(ttt, sss) {
var _local3 = 0;
while (_local3 < 15) {
if (sss.hitTest(ttt[_local3])) {
if (ttt.info == "up") {
sss._y = 480;
} else if (ttt.info == "left") {
sss._x = 730;
} else if (ttt.info == "down") {
sss._y = 90;
} else if (ttt.info == "right") {
sss._x = 20;
}
}
_local3++;
}
}
function scoreplus(sss, aaa) {
clearinterval(noscore);
s_score = "point_p_10" + scoree;
var _local1 = attachMovie(sss, s_score, scoree + 200000);
scoree++;
_local1._x = aaa._x;
_local1._y = aaa._y;
score_MC_AR[scoree] = _local1;
noscore = setInterval(score_fade, 20, score_MC_AR[scoree]);
score_MC_AR_del[scoree] = noscore;
}
function score_fade(bbb) {
bbb._y = bbb._y - 3;
bbb._alpha = bbb._alpha - 5;
if (bbb._alpha <= 10) {
clearInterval(score_MC_AR[bbb]);
}
}
var gold_ar = new Array(gold, gold1, gold2, gold3, gold4, gold5, gold6, gold7, gold8, gold9, gold10, gold11, gold12, gold13, gold14, gold15, gold16, gold17, gold18, gold19, gold20, gold21, gold22, gold23, gold24, gold25, gold26, gold27, gold28, gold29, gold30, gold31, gold32, gold33, gold34, gold35, gold36, gold37, gold38, gold39, gold40, gold41, gold42, gold43, gold44, gold45, gold46, gold47, gold48, gold49, gold50, gold51, gold52, gold53, gold54, gold55, gold56, gold57, gold58, gold59, gold60, gold61, gold62, gold63, gold64, gold65, gold66, gold67, gold68, gold69, gold70, gold71, gold72, gold73, gold74, gold75, gold76, gold77, gold78, gold79, gold80, gold81, gold82, gold83, gold84, gold85, gold86, gold87, gold88, gold89, gold90, gold91, gold92, gold93, gold94, gold95, gold96, gold97, gold98, gold99);
var gold_big_ar = new Array(gold_big1, gold_big2, gold_big3, gold_big4);
var my_sound = new Sound();
var backs_u_ar = new Array(u_back, u_back1, u_back2);
backs_u_ar.info = "up";
var backs_l_ar = new Array(l_back, l_back1, l_back2);
backs_l_ar.info = "left";
var backs_d_ar = new Array(d_back, d_back1, d_back2);
backs_d_ar.info = "down";
var backs_r_ar = new Array(r_back, r_back1, r_back2);
backs_r_ar.info = "right";
var allback = new Array(backs_u_ar, backs_l_ar, backs_r_ar, backs_d_ar);
var i = 0;
while (i < 30) {
var j = 0;
while (j < 10) {
allback[i][j]._visible = 0;
c_guide_ar[j]._visible = 0;
j++;
}
i++;
}
var end = 0;
var oKey1 = new Object();
Key.addListener(oKey1);
var scoree = 0;
var noscore;
var score_MC_AR_del = new Array();
var score_MC_AR = new Array();
function enem_move(ttt, gun, add1) {
if (ttt != undefined) {
exp_hit_enem(ttt);
shoot_enem(ttt, gun);
check_hit_pac(ttt);
check2(ttt);
backu1(backs_u_ar, ttt);
backu1(backs_l_ar, ttt);
backu1(backs_d_ar, ttt);
backu1(backs_r_ar, ttt);
}
if (ttt.pos == "left") {
ttt._x = ttt._x - ttt.speed;
ttt._rotation = 270;
if ((ttt._xscale <= -90) && (ttt._currentframe == 1)) {
ttt._xscale = -ttt._xscale;
}
}
if (ttt.pos == "right") {
ttt._x = ttt._x + ttt.speed;
ttt._rotation = 90;
if ((ttt._xscale >= 90) && (ttt._currentframe == 1)) {
ttt._xscale = -ttt._xscale;
}
}
if (ttt.pos == "up") {
ttt._y = ttt._y - ttt.speed;
ttt._rotation = 0;
if ((ttt._xscale <= -90) && (ttt._currentframe == 1)) {
ttt._xscale = -ttt._xscale;
}
}
if (ttt.pos == "down") {
ttt._y = ttt._y + ttt.speed;
ttt._rotation = 180;
if ((ttt._xscale <= -90) && (ttt._currentframe == 1)) {
ttt._xscale = -ttt._xscale;
}
}
if (ttt.pos == "mixed") {
var _local6 = ttt._rotation + 10;
dx = Math.cos((Math.PI/180) * _local6);
dy = Math.sin((Math.PI/180) * _local6);
ttt._x = ttt._x + (dx * ttt.speed);
ttt._y = ttt._y + (dy * ttt.speed);
}
gun._x = ttt._x;
gun._y = ttt._y;
gun._rotation = ttt._rotation;
gun._xscale = ttt._xscale;
add1._x = ttt._x;
add1._y = ttt._y;
add1._rotation = ttt._rotation;
add1._xscale = ttt._xscale;
var _local2 = 0;
while (_local2 < c_guide_ar.length) {
if ((((((ttt._x >= (c_guide_ar[_local2]._x - 5)) && (ttt._x <= (c_guide_ar[_local2]._x + 5))) && (ttt._y >= (c_guide_ar[_local2]._y - 5))) && (ttt._y <= (c_guide_ar[_local2]._y + 5))) && (ttt.a >= 6)) && (ttt.hitTest(c_guide_ar[_local2]))) {
ttt.a = 0;
if ((ttt._x >= (pac._x - 4)) && (ttt._x <= (pac._x + 4))) {
if (ttt._y <= pac._y) {
ttt.pos = "down";
}
if (ttt._y > pac._y) {
ttt.pos = "up";
}
} else if ((ttt._y >= (pac._y - 4)) && (ttt._y <= (pac._y + 4))) {
if (ttt._x <= pac._x) {
ttt.pos = "right";
}
if (ttt._x > pac._x) {
ttt.pos = "left";
}
} else {
var _local3 = random(4);
switch (_local3) {
case 0 :
ttt.pos = "down";
ttt.a = "0";
ttt._y = ttt._y + 3;
break;
case 1 :
ttt.pos = "up";
ttt.a = "0";
ttt._y = ttt._y - 3;
break;
case 2 :
ttt.pos = "right";
ttt.a = "0";
ttt._x = ttt._x + 3;
break;
case 3 :
ttt.pos = "left";
ttt.a = "0";
ttt._x = ttt._x - 3;
}
}
} else if (ttt.hitTest(c_guide_ar[_local2]) == false) {
ttt.a = ttt.a + 1;
}
_local2++;
}
updateAfterEvent();
}
function backu1(ttt, sss) {
var _local3 = 0;
while (_local3 < 15) {
if (sss.hitTest(ttt[_local3])) {
if (ttt.info == "up") {
sss._y = 480;
} else if (ttt.info == "left") {
sss._x = 730;
} else if (ttt.info == "down") {
sss._y = 90;
} else if (ttt.info == "right") {
sss._x = 20;
}
}
_local3++;
}
}
function check2(hit) {
var _local3 = 0;
while (_local3 < wall_ar.length) {
var _local6 = (wall_ar[_local3]._x - (wall_ar[_local3]._width / 2)) - 2;
var _local4 = (wall_ar[_local3]._x + (wall_ar[_local3]._width / 2)) + 2;
var _local5 = (wall_ar[_local3]._y - (wall_ar[_local3]._height / 2)) - 2;
var _local7 = (wall_ar[_local3]._y + (wall_ar[_local3]._height / 2)) + 2;
if ((((hit._x + (hit._width / 2)) >= _local6) && ((hit._x - (hit._width / 2)) <= _local4)) && ((((hit._y - (hit._height / 2)) <= _local7) && ((hit._y + (hit._height / 2)) >= _local5)) && (hit._currentframe == 1))) {
var _local2 = random(2);
if ((hit.pos == "left") && (hit.wall >= 1)) {
hit._x = hit._x + 4;
if (_local2 == 0) {
hit.pos = "right";
} else if (_local2 == 1) {
hit.pos = "up";
} else if (_local2 == 2) {
hit.pos = "down";
}
hit.wall = 0;
} else if ((hit.pos == "right") && (hit.wall >= 1)) {
hit._x = hit._x - 4;
if (_local2 == 0) {
hit.pos = "left";
} else if (_local2 == 1) {
hit.pos = "up";
} else if (_local2 == 2) {
hit.pos = "down";
}
hit.wall = 0;
} else if ((hit.pos == "up") && (hit.wall >= 1)) {
hit._y = hit._y + 4;
if (_local2 == 0) {
hit.pos = "right";
} else if (_local2 == 1) {
hit.pos = "down";
} else if (_local2 == 2) {
hit.pos = "left";
}
hit.wall = 0;
} else if ((hit.pos == "down") && (hit.wall >= 1)) {
hit._y = hit._y - 4;
if (_local2 == 0) {
hit.pos = "right";
} else if (_local2 == 2) {
hit.pos = "left";
} else if (_local2 == 2) {
hit.pos = "up";
}
hit.wall = 0;
}
} else if (hit.wall == 0) {
hit.wall = hit.wall + 1;
}
_local3++;
}
}
function fade_enemy(aaa, count) {
if (aaa._currentframe != 1) {
fade_enem_ar[count]++;
if ((fade_enem_ar[count] >= 10) && ((sec1 > 1) || (min1 > 1))) {
aaa._y = 1000;
aaa._x = 1000;
clearInterval(bbb[aaa.id]);
removeMovieClip(aaa);
fade_enem_ar[count] = 0;
clearInterval(count_ar[count]);
}
}
}
function check_hit_pac(hit) {
var _local6 = (pac._x - (pac._width / 2)) - 4;
var _local4 = (pac._x + (pac._width / 2)) + 4;
var _local5 = (pac._y - (pac._height / 2)) - 4;
var _local7 = (pac._y + (pac._height / 2)) + 4;
if (((((hit._x + (hit._width / 2)) >= _local6) && ((hit._x - (hit._width / 2)) <= _local4)) && (((hit._y - (hit._height / 2)) <= _local7) && ((hit._y + (hit._height / 2)) >= _local5))) && (pac.caneat <= 0)) {
if (((hit.pos == "left") && (hit.pac >= 1)) && (hit._currentframe == 1)) {
hit._x = hit._x + 4;
hit.pos = "right";
hit.pac = 0;
if (pac.hit == 0) {
pac.hit = 16;
if (pac.caneat <= 0) {
life--;
}
}
}
if (((hit.pos == "right") && (hit.pac >= 1)) && (hit._currentframe == 1)) {
hit._x = hit._x - 4;
hit.pos = "left";
hit.pac = 0;
if (pac.hit == 0) {
pac.hit = 16;
life--;
if (pac.caneat == 0) {
life--;
}
}
}
if (((hit.pos == "up") && (hit.pac >= 1)) && (hit._currentframe == 1)) {
hit._y = hit._y + 4;
hit.pos = "down";
hit.pac = 0;
if (pac.hit == 0) {
pac.hit = 16;
life--;
if (pac.caneat == 0) {
life--;
}
}
}
if (((hit.pos == "down") && (hit.pac >= 1)) && (hit._currentframe == 1)) {
hit._y = hit._y - 4;
hit.pos = "up";
hit.pac = 0;
if (pac.hit == 0) {
pac.hit = 16;
life--;
if (pac.caneat == 0) {
life--;
}
}
} else if (hit.hitTest(pac) == false) {
hit.pac = hit.pac + 1;
}
}
if (((((hit._x + (hit._width / 2)) >= _local6) && ((hit._x - (hit._width / 2)) <= _local4)) && (((hit._y - (hit._height / 2)) <= _local7) && ((hit._y + (hit._height / 2)) >= _local5))) && (pac.caneat > 0)) {
if (pac.caneat > 0) {
if ((aeee <= 0) && (hit._currentframe == 1)) {
var _local3 = 0;
while (_local3 < hand_en_ar.length) {
if (hand_en_ar[_local3].id == hit.id) {
hand_en_ar[_local3].gotoAndPlay(2);
}
if (addons_ar[_local3].id == hit.id) {
addons_ar[_local3].gotoAndPlay(2);
}
_local3++;
}
hit.speed = 0;
hit.gotoAndPlay(2);
num_enemys--;
_root.scoreplus("point_p_20", hit);
score_num = score_num + 20;
score.text = score.text - -20;
enem_count++;
trace("enem_count=" + enem_count);
fade_enem_ar[enem_count] = 0;
inter_enemy_aa = setInterval(fade_enemy, 40, hit, enem_count);
}
count_ar[enem_count] = inter_enemy_aa;
}
}
}
function exp_hit_enem(eneme) {
var _local4 = 0;
while (_local4 < explode_ar.length) {
if (((((((eneme._x > (explode_ar[_local4]._x - (explode_ar[_local4]._width / 2))) && (eneme._x < (explode_ar[_local4]._x + (explode_ar[_local4]._width / 2)))) && (eneme._y > (explode_ar[_local4]._y - (explode_ar[_local4]._height / 2)))) && (eneme._y < (explode_ar[_local4]._y + (explode_ar[_local4]._height / 2)))) && (eneme._currentframe == 1)) && (explode_ar[_local4].hit <= 0)) && (eneme._currentframe == 1)) {
explode_ar[_local4].id = 0;
enem_count++;
eneme.speed = 0;
num_enemys--;
_root.scoreplus("point_p_20", eneme);
score_num = score_num + 20;
score.text = score.text - -20;
var _local2 = 0;
while (_local2 < hand_en_ar.length) {
if (hand_en_ar[_local2].id == eneme.id) {
hand_en_ar[_local2].gotoAndPlay(2);
removeMovieClip(hand_en_ar[_local2]);
}
_local2++;
}
_local2 = 0;
while (_local2 < addons_ar.length) {
if (addons_ar[_local2].id == eneme.id) {
addons_ar[_local2].gotoAndPlay(2);
removeMovieClip(addons_ar[_local2]);
}
_local2++;
}
eneme.gotoAndPlay(2);
fade_enem_ar[enem_count] = 0;
inter_enemy_aa2 = setInterval(fade_enemy, 40, eneme, enem_count);
count_ar[enem_count] = inter_enemy_aa2;
trace("count=" + count_ar[enem_count]);
}
_local4++;
}
}
function addenemy(enem_mca, rax, gax, bax, gun, addon) {
var _local2 = enem_ar.length;
trace(_local2);
var _local3 = this.attachMovie(enem_mca, ("enemy" + _local2) + 1, _local2 + 10000);
var _local5 = this.attachMovie(gun, ("hand_en" + _local2) + 1, (_local2 + 10000) + 6000);
var _local4 = this.attachMovie(addon, ("addon_" + _local2) + 1, (_local2 + 10000) + 3000);
var _local6 = random(500) + 100;
_local3._x = _local6;
_local3._y = 224;
_local5._x = _local6;
_local5._y = 224;
_local4._x = _local6;
_local4._y = 224;
_local3._currentframe = 1;
_local5._currentframe = 1;
_local4._currentframe = 1;
var _local10 = new Color(_local3.color4);
var _local9 = new Color(_local3.body);
var _local7 = {ra:rax, ga:gax, ba:bax, aa:100};
_local10.setTransform(_local7);
_local9.setTransform(_local7);
enem_ar[_local2] = _local3;
hand_en_ar[_local2] = _local5;
addons_ar[_local2] = _local4;
enem_ar[_local2].id = _local2;
hand_en_ar[_local2].id = _local2;
addons_ar[_local2].id = _local2;
hand_en_ar[_local2].kindof = gun;
enem_ar[_local2].a = "6";
enem_ar[_local2].wall = "5";
enem_ar[_local2].pac = "0";
enem_ar[_local2].ifstop = "0";
num_enemys++;
enem_ar[_local2].pos = "left";
enem_ar[_local2].speed = 2;
inter_en = setInterval(enem_move, 10, enem_ar[_local2], hand_en_ar[_local2], addons_ar[_local2]);
var _local8 = inter_en;
bbb[_local2] = _local8;
}
function addenemy_pos(enem_mca, rax, gax, bax, gun, addon, tx, ty) {
var _local2 = enem_ar.length;
trace(_local2);
var _local3 = this.attachMovie(enem_mca, ("enemy" + _local2) + 1, _local2 + 10000);
var _local5 = this.attachMovie(gun, ("hand_en" + _local2) + 1, (_local2 + 10000) + 6000);
var _local4 = this.attachMovie(addon, ("addon_" + _local2) + 1, (_local2 + 10000) + 3000);
var _local12 = random(400) + 100;
_local3._x = tx;
_local3._y = ty;
_local5._x = tx;
_local5._y = ty;
_local4._x = tx;
_local4._y = ty;
_local3._currentframe = 1;
_local5._currentframe = 1;
_local4._currentframe = 1;
var _local11 = new Color(_local3.color4);
var _local10 = new Color(_local3.body);
var _local6 = {ra:rax, ga:gax, ba:bax, aa:100};
_local11.setTransform(_local6);
_local10.setTransform(_local6);
enem_ar[_local2] = _local3;
hand_en_ar[_local2] = _local5;
addons_ar[_local2] = _local4;
enem_ar[_local2].id = _local2;
hand_en_ar[_local2].id = _local2;
addons_ar[_local2].id = _local2;
hand_en_ar[_local2].kindof = gun;
enem_ar[_local2].a = "6";
enem_ar[_local2].wall = "5";
enem_ar[_local2].pac = "0";
enem_ar[_local2].ifstop = "0";
num_enemys++;
enem_ar[_local2].pos = "left";
enem_ar[_local2].speed = 2;
inter_en = setInterval(enem_move, 10, enem_ar[_local2], hand_en_ar[_local2], addons_ar[_local2]);
var _local7 = inter_en;
bbb[_local2] = _local7;
}
var i = 0;
while (i < enem_ar.length) {
clearInterval(bbb[i]);
enem_ar[i].id.tt = 0;
i++;
}
var enem_count = 0;
var num_enemys = 4;
life = 10;
var inter_en;
var enem_ar = new Array(enemy1, enemy3);
var hand_en_ar = new Array(hand_en1);
var addons_ar = new Array();
enem_ar[0].a = "6";
enem_ar[0].wall = "5";
enem_ar[0].ifstop = "0";
enem_ar[0].pac = "0";
enem_ar[0].id = "0";
hand_en_ar[0].id = "0";
hand_en_ar[0].kindof = "hand_en2";
enem_ar[1].a = "6";
enem_ar[1].wall = "5";
enem_ar[1].pac = "0";
enem_ar[1].id = "1";
enem_ar[1].ifstop = "0";
enem_ar[2].a = "6";
enem_ar[2].wall = "5";
enem_ar[2].pac = "0";
enem_ar[2].id = "2";
enem_ar[2].ifstop = "0";
var c_guide_ar = new Array(c_guide1, c_guide2, c_guide3, c_guide4, c_guide5, c_guide6, c_guide7, c_guide8, c_guide9, c_guide10, c_guide11, c_guide12, c_guide13, c_guide14);
var i = 0;
while (i < 30) {
c_guide_ar[i]._visible = 0;
i++;
}
enem_ar[0].pos = "left";
enem_ar[0].speed = 2;
enem_ar[1].pos = "right";
enem_ar[1].speed = 2;
enem_ar[2].pos = "right";
enem_ar[2].speed = 2;
var inter_en;
var bbb = new Array();
var i = 0;
while (i < enem_ar.length) {
inter_en = setInterval(enem_move, 20, enem_ar[i], hand_en_ar[i]);
var ttt = inter_en;
bbb[i] = ttt;
i++;
}
var inter_enemy_aa;
var fade_enem_ar = new Array();
var aeee = 0;
clearInterval(inter_mmm);
var pac_mp3 = new Sound();
var wall_mp3 = new Sound();
var inter_mmm;
inter_mmm = setInterval(movenemyss, 1000);
function exp_hit_pac() {
var _local1 = 0;
while (_local1 < explode_ar.length) {
if ((((((pac._x > (explode_ar[_local1]._x - (explode_ar[_local1]._width / 2))) && (pac._x < (explode_ar[_local1]._x + (explode_ar[_local1]._width / 2)))) && (pac._y > (explode_ar[_local1]._y - (explode_ar[_local1]._height / 2)))) && (pac._y < (explode_ar[_local1]._y + (explode_ar[_local1]._height / 2)))) && (pac.hit <= 0)) && (pac.caneat == 0)) {
life--;
life--;
pac.hit = 25;
}
_local1++;
}
}
function bull_hit_pac(bulll) {
if (((((((bulll._x > (pac._x - (pac._width / 2))) && (bulll._x < (pac._x + (pac._width / 2)))) && (bulll._y > (pac._y - (pac._height / 2)))) && (bulll._y < (pac._y + (pac._height / 2)))) && (bulll._currentframe == 1)) && (pac.hit <= 0)) && (pac.caneat == 0)) {
life--;
if (bulll.id == 1) {
explode_num++;
var _local3 = attachMovie("expl", "expl" + explode_num, 65000 + explode_num);
explode_ar[explode_num] = _local3;
explode_ar[explode_num]._x = bulll._x;
explode_ar[explode_num]._y = bulll._y;
}
bulll.gotoAndPlay(2);
pac.hit = 16;
bulll.speed = 0;
}
var _local1 = 0;
while (_local1 < wall_ar.length) {
if (((((bulll._x > (wall_ar[_local1]._x - (wall_ar[_local1]._width / 2))) && (bulll._x < (wall_ar[_local1]._x + (wall_ar[_local1]._width / 2)))) && (bulll._y > (wall_ar[_local1]._y - (wall_ar[_local1]._height / 2)))) && (bulll._y < (wall_ar[_local1]._y + (wall_ar[_local1]._height / 2)))) && (bulll._currentframe == 1)) {
if (bulll.id == 1) {
explode_num++;
var _local3 = attachMovie("expl", "expl" + explode_num, 65000 + explode_num);
explode_ar[explode_num] = _local3;
explode_ar[explode_num]._x = bulll._x;
explode_ar[explode_num]._y = bulll._y;
}
bulll.gotoAndPlay(2);
wall_ar[_local1].hit == 16;
bulll.speed = 0;
}
_local1++;
}
}
function hand_where() {
if (pac.hand == 0) {
var _local2 = 0;
while (_local2 < pac_weapon.length) {
pac_weapon[_local2]._x = 1000;
pac_weapon[_local2]._y = 1000;
_local2++;
}
}
var _local1 = 0;
while (_local1 < 200) {
if (pac.hand == _local1) {
pac_weapon[_local1 - 1]._x = pac._x;
pac_weapon[_local1 - 1]._y = pac._y;
pac_weapon[_local1 - 1]._rotation = pac_graphic._rotation;
pac_weapon[_local1 - 1]._xscale = pac_graphic._xscale;
}
_local1++;
}
_local1 = 0;
while (_local1 < 200) {
if (pac.hand != _local1) {
pac_weapon[_local1 - 1]._x = 1000;
pac_weapon[_local1 - 1]._Y = 1000;
}
_local1++;
}
if ((Key.isDown(32) && (go33 >= 1)) && (ammo > 0)) {
ammo--;
if (pac_weapon[pac.hand - 1] == pac_weapon[0]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 2;
enemy_mp4.attachSound("gunshots_sm.wav");
enemy_mp4.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[1]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 2;
enemy_mp3.attachSound("GUN04_cop.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[2]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 1;
enemy_mp3.attachSound("GUN04_cop.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[3]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 1;
enemy_mp3.attachSound("uzi.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[4]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 1;
enemy_mp3.attachSound("galil.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[5]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("M16.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[6]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("ak47.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[7]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 1;
enemy_mp3.attachSound("uzi.wav");
enemy_mp3.start();
}
}
}
function shoot_en_bul2(gun, bullet) {
ebullpac++;
gun.gun.gotoAndPlay(2);
var _local3 = this.attachMovie(bullet, ("ball_pac" + ebullpac) + 1, ebullpac + 150000);
pac_shoot[ebullpac] = _local3;
gun_rad = Math.atan2(gun.gun._y, gun.gun._x);
gun_deg = (gun_rad * 180) / Math.PI;
rotat = gun._rotation + ((gun_deg - 360) + 90);
dx = Math.sin((Math.PI/180) * rotat);
dy = Math.cos((Math.PI/180) * rotat);
gun_xscal = Math.abs(gun._xscale);
_local3._rotation = gun._rotation;
pac_shoot_num[ebullpac] = 0;
dx_ar_pac[ebullpac] = dx;
yx_ar_pac[ebullpac] = dy;
_local3._x = gun._x + (dx * (-gun.gun._y));
_local3._y = gun._y - (((dy * (-gun.gun._y)) * gun._xscale) / gun_xscal);
dx = Math.sin((Math.PI/180) * (rotat + 6));
dy = Math.cos((Math.PI/180) * (rotat + 6));
dx_ar_pac[ebullpac] = dx;
yx_ar_pac[ebullpac] = dy;
if ((bullet == "ball2") || (bullet == "missle")) {
_local3.speed = 5;
bull_move_ene2 = setInterval(ball_move2, 20, pac_shoot[ebullpac], ebullpac, gun.range, gun);
pac_shoot_ar[ebullpac] = bull_move_ene2;
}
if (bullet == "ball3") {
_local3.speed = 5;
bull_move_ene2 = setInterval(ball_move2, 16, pac_shoot[ebullpac], ebullpac, gun.range, gun);
pac_shoot_ar[ebullpac] = bull_move_ene2;
}
}
function ball_move2(bullet, numm24, rangeofammo2, ffgun) {
bull_hit_enem(pac_shoot[numm24]);
bullspeed1 = pac_shoot[numm24].speed;
bullet._x = bullet._x + (dx_ar_pac[numm24] * bullspeed1);
bullet._y = bullet._y - (yx_ar_pac[numm24] * bullspeed1);
pac_shoot_num[numm24]++;
if ((pac_shoot_num[numm24] == (rangeofammo2 / 2)) && (ffgun.rate1 == "semi")) {
go33 = 1;
}
if ((pac_shoot_num[numm24] == (rangeofammo2 / 4)) && (ffgun.rate1 == "auto")) {
go33 = 1;
}
if ((pac_shoot_num[numm24] >= rangeofammo2) && (ffgun.rate1 == "mono")) {
go33 = 1;
}
if (pac_shoot_num[numm24] >= rangeofammo2) {
removeMovieClip(pac_shoot[numm24]);
clearInterval(pac_shoot_ar[numm24]);
pac_shoot_num[numm24] = 0;
}
}
function bull_hit_enem(bulll) {
var _local4 = 0;
while (_local4 < enem_ar.length) {
if ((((((bulll._x > (enem_ar[_local4]._x - (enem_ar[_local4]._width / 2))) && (bulll._x < (enem_ar[_local4]._x + (enem_ar[_local4]._width / 2)))) && (bulll._y > (enem_ar[_local4]._y - (enem_ar[_local4]._height / 2)))) && (bulll._y < (enem_ar[_local4]._y + (enem_ar[_local4]._height / 2)))) && (bulll._currentframe == 1)) && (enem_ar[_local4]._currentframe == 1)) {
var _local3 = 0;
while (_local3 < hand_en_ar.length) {
if (hand_en_ar[_local3].id == enem_ar[_local4].id) {
hand_en_ar[_local3].gotoAndPlay(2);
}
if (addons_ar[_local3].id == enem_ar[_local4].id) {
addons_ar[_local3].gotoAndPlay(2);
}
_local3++;
}
if (bulll.id == 1) {
explode_num++;
var _local5 = attachMovie("expl", "expl" + explode_num, 35000 + explode_num);
explode_ar[explode_num] = _local5;
explode_ar[explode_num]._x = bulll._x;
explode_ar[explode_num]._y = bulll._y;
}
bulll.gotoAndPlay(2);
enem_count++;
enem_ar[_local4].speed = 0;
num_enemys--;
_root.scoreplus("point_p_20", enem_ar[_local4]);
score_num = score_num + 20;
score.text = score.text - -20;
enem_ar[_local4].gotoAndPlay(2);
fade_enem_ar[enem_count] = 0;
inter_enemy_aa2 = setInterval(fade_enemy, 40, enem_ar[_local4], enem_count);
count_ar[enem_count] = inter_enemy_aa2;
trace("count=" + count_ar[enem_count]);
bulll.speed = 0;
}
_local4++;
}
_local4 = 0;
while (_local4 < wall_ar.length) {
if (((((bulll._x > (wall_ar[_local4]._x - (wall_ar[_local4]._width / 2))) && (bulll._x < (wall_ar[_local4]._x + (wall_ar[_local4]._width / 2)))) && (bulll._y > (wall_ar[_local4]._y - (wall_ar[_local4]._height / 2)))) && (bulll._y < (wall_ar[_local4]._y + (wall_ar[_local4]._height / 2)))) && (bulll._currentframe == 1)) {
if (bulll.id == 1) {
explode_num++;
var _local5 = attachMovie("expl", "expl" + explode_num, 35000 + explode_num);
explode_ar[explode_num] = _local5;
explode_ar[explode_num]._x = bulll._x;
explode_ar[explode_num]._y = bulll._y;
}
bulll.gotoAndPlay(2);
wall_ar[_local4].hit == 16;
bulll.speed = 0;
}
_local4++;
}
}
function collet_ammo() {
var _local1 = 0;
while (_local1 < 180) {
if ((((ammo_ar_take[_local1]._x > (pac._x - (pac._width / 2))) && (ammo_ar_take[_local1]._x < (pac._x + (pac._width / 2)))) && (ammo_ar_take[_local1]._y > (pac._y - (pac._height / 2)))) && (ammo_ar_take[_local1]._y < (pac._y + (pac._height / 2)))) {
trace("t=" + _local1);
if (_local1 == 0) {
ammo = 10 + _local1;
}
if (_local1 == 1) {
ammo = 6 + _local1;
}
if (_local1 == 2) {
ammo = 4 + _local1;
}
if (_local1 == 3) {
ammo = 14 + _local1;
}
if (_local1 == 4) {
ammo = 6 + _local1;
}
if (_local1 == 5) {
ammo = 7 + _local1;
}
if (_local1 == 6) {
ammo = 8 + _local1;
}
if (_local1 == 7) {
ammo = 13 + _local1;
}
pac.hand = _local1 + 1;
trace(pac.hand);
ammo_ar_take[_local1]._x = 900;
ammo_ar_take[_local1]._y = 900;
}
_local1++;
}
}
var go33 = 1;
var explode_ar = new Array();
var explode_num = 0;
pac.hand = 0;
var bull_move_ene2;
var pac_shoot_ar = new Array();
var pac_shoot_num = new Array();
var pac_shoot = new Array();
var ebullpac = 0;
var dx_ar_pac = new Array();
var yx_ar_pac = new Array();
var count_ar = new Array();
function timeof() {
sec1++;
clock.text = sec1;
if (sec1 >= 59) {
sec1 = 0;
min1++;
clock_min.text = min1;
}
if (sec1 == 1) {
addenemy("enemy_swat", 30, 70, 60, "en_gal", "ninja1");
}
if ((sec1 == 25) && (num_enemys < 9)) {
addenemy_pos("enemy_swat", 10, 90, 90, "en_ak47", "ussr_hel", 325, 123);
addenemy_pos("enemy_swat", 60, 40, 80, "en_ak47", "ussr_hel", 100, 378);
}
if (((sec1 == 10) || (sec1 == 30)) && (num_enemys < 9)) {
addenemy("enemyzz", 60, 40, 90);
}
if ((sec1 == 30) && (num_enemys < 5)) {
addenemy("enemy_swat", 30, 80, 60, "en_gal", "ninja1");
}
if ((((sec1 == 30) || (sec1 == 45)) || (sec1 == 10)) && (num_enemys < 6)) {
addenemy("enemyzz", 90, 100, 72, "en_bizon", "spetz_hel ");
var _local1 = 0;
while (_local1 < addons_ar.length) {
addons_ar[_local1].greande = 1;
_local1++;
}
}
if ((sec1 == 1) && (min1 == 0)) {
ammo_ar_take[0]._x = 500;
ammo_ar_take[0]._y = 125;
}
if (sec1 == 10) {
ammo_ar_take[7]._x = 350;
ammo_ar_take[7]._y = 125;
}
if ((sec1 == 40) && (min1 == 0)) {
ammo_ar_take[4]._x = 240;
ammo_ar_take[4]._y = 125;
}
}
function ball_move(bullet, numm2, rangeofammo, numB) {
bull_hit_pac(ball_shoot[numm2]);
bullspeed = ball_shoot[numm2].speed;
bullet._x = bullet._x + (dx_ar[numm2] * bullspeed);
bullet._y = bullet._y - (yx_ar[numm2] * bullspeed);
ball_shoot_num[numm2]++;
if (ball_shoot_num[numm2] >= rangeofammo) {
removeMovieClip(ball_shoot[numm2]);
clearInterval(ball_shoot_ar[numm2]);
ball_shoot_num[numm2] = 0;
}
}
function shoot_en_bul(gun, enemy, bullet, num1, num444, num5555) {
ebull++;
if (enemy.speed == 0) {
var _local3 = this.attachMovie(bullet, ("ball" + ebull) + 1, ebull + 50000);
ball_shoot[ebull] = _local3;
gun_rad = Math.atan2(gun.gun._y, gun.gun._x);
gun_deg = (gun_rad * 180) / Math.PI;
rotat = gun._rotation + ((gun_deg - 360) + 90);
dx = Math.sin((Math.PI/180) * rotat);
dy = Math.cos((Math.PI/180) * rotat);
gun_xscal = Math.abs(gun._xscale);
ball_shoot_num[ebull] = 0;
dx_ar[ebull] = dx;
yx_ar[ebull] = dy;
_local3._x = gun._x + (dx * (-gun.gun._y));
_local3._y = gun._y - (((dy * (-gun.gun._y)) * gun._xscale) / gun_xscal);
_local3._rotation = gun._rotation;
rotat = gun._rotation + ((gun_deg - 360) + 90);
dx = Math.sin((Math.PI/180) * (rotat + 5));
dy = Math.cos((Math.PI/180) * (rotat + 5));
dx_ar[ebull] = dx;
yx_ar[ebull] = dy;
if (gun.kindof == "hand_en") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "hand_en2") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_m16") {
_local3.speed = 6;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_m1") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_uzi") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 15, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_gal") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_ak47") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 17, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_bizon") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 19, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
}
}
function shoot_enema(zzz, eee, num) {
if ((zzz.speed == 0) && (enem_time_ar[num] == 2)) {
var _local2 = 0;
while (_local2 < addons_ar.length) {
if (((addons_ar[_local2].id == zzz.id) && (addons_ar[_local2].greande > 0)) && (addons_ar[_local2].kindof == "explode")) {
throw_greande_en(addons_ar[_local2]);
addons_ar[_local2].greande--;
}
_local2++;
}
}
if (((eee.kindof == "hand_en") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 10) {
eee.number = 0;
enemy_mp4.attachSound("gunshots_sm.wav");
enemy_mp4.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 20, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "hand_en2") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 6) {
eee.number = 0;
enemy_mp3.attachSound("GUN04_cop.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 30, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_m16") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 3) {
eee.number = 0;
enemy_mp3.attachSound("M16.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 70, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
zzz.ifstop = 1;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_m1") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 6) {
eee.number = 0;
enemy_mp3.attachSound("GUN04_cop.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 70, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_uzi") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 4) {
eee.gun.gotoAndPlay(2);
enemy_mp3.attachSound("uzi.wav");
enemy_mp3.start();
shoot_en_bul(eee, zzz, "ball2", 1, 20, num);
}
if (enem_time_ar[num] > 5) {
eee.number = 0;
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 20, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_gal") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 5) {
eee.number = 0;
enemy_mp3.attachSound("galil.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 36, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_ak47") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 3) {
eee.number = 0;
enemy_mp3.attachSound("ak47.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 38, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_bizon") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 3) {
eee.gun.gotoAndPlay(2);
enemy_mp3.attachSound("uzi.wav");
enemy_mp3.start();
shoot_en_bul(eee, zzz, "ball2", 1, 22, num);
}
if (enem_time_ar[num] > 4) {
eee.number = 0;
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 22, num);
zzz.speed = 2.5;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
}
function shoot_enem(ttt, aaa) {
if (((((((ttt._x >= (pac._x - 4)) && (ttt._x <= (pac._x + 4))) && (ttt.speed >= 2)) && (ttt != null)) && (ttt._y >= (pac._y - aaa.range))) && (ttt._y <= (pac._y + aaa.range))) && (aaa != null)) {
if ((ttt._y <= pac._y) && (ttt.speed >= 2)) {
var _local2 = 0;
while (_local2 < wall_ar.length) {
if (((((((ttt._x < (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2))) && (ttt._x > (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (if_right == 0)) && (pac._x > (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (pac._x < (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2)))) && (ttt._y < (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (pac._y > (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2)))) {
ttt.ifstop = 1;
}
_local2++;
}
trace("donw");
if (ttt.ifstop == 1) {
ttt.ifstop = 0;
} else if (ttt.ifstop == 0) {
shoot_d++;
enem_time_ar[shoot_d] = 0;
ttt.speed = 0;
ttt.pos = "down";
aaa.number = 1;
clearInterval(aaa.interr);
inter_shoot = setInterval(shoot_enema, 150, ttt, aaa, shoot_d);
enem_aar[shoot_d] = inter_shoot;
aaa.interr = inter_shoot;
}
}
if ((ttt._y > pac._y) && (ttt.speed >= 2)) {
var _local2 = 0;
while (_local2 < wall_ar.length) {
if (((((((ttt._x < (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2))) && (ttt._x > (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (if_right == 0)) && (pac._x > (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (pac._x < (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2)))) && (ttt._y > (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2)))) && (pac._y < (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) {
ttt.ifstop = 1;
}
_local2++;
}
if (ttt.ifstop == 1) {
ttt.ifstop = 0;
} else if (ttt.ifstop == 0) {
shoot_d++;
enem_time_ar[shoot_d] = 0;
ttt.speed = 0;
ttt.pos = "up";
}
aaa.number = 1;
clearInterval(aaa.interr);
inter_shoot = setInterval(shoot_enema, 150, ttt, aaa, shoot_d);
enem_aar[shoot_d] = inter_shoot;
aaa.interr = inter_shoot;
}
} else if (((((((ttt._y >= (pac._y - 4)) && (ttt._y <= (pac._y + 4))) && (ttt.speed >= 2)) && (ttt != null)) && (ttt._x >= (pac._x - aaa.range))) && (ttt._x <= (pac._x + aaa.range))) && (aaa != null)) {
if ((ttt._x <= pac._x) && (ttt.speed >= 2)) {
var _local2 = 0;
while (_local2 < wall_ar.length) {
if (((((((ttt._y < (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2))) && (ttt._y > (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (if_right == 0)) && (pac._y > (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (pac._y < (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2)))) && (ttt._x < (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (pac._x > (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2)))) {
ttt.ifstop = 1;
}
_local2++;
}
if (ttt.ifstop == 1) {
ttt.ifstop = 0;
} else if (ttt.ifstop == 0) {
shoot_d++;
enem_time_ar[shoot_d] = 0;
ttt.speed = 0;
aaa.number = 1;
ttt.pos = "right";
clearInterval(aaa.interr);
inter_shoot = setInterval(shoot_enema, 150, ttt, aaa, shoot_d);
enem_aar[shoot_d] = inter_shoot;
aaa.interr = inter_shoot;
}
}
if ((ttt._x > pac._x) && (ttt.speed >= 2)) {
var _local2 = 0;
while (_local2 < wall_ar.length) {
if (((((((ttt._y < (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2))) && (ttt._y > (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (if_right == 0)) && (pac._y > (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (pac._y < (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2)))) && (ttt._x > (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2)))) && (pac._x < (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) {
trace("okL");
ttt.ifstop = 1;
}
_local2++;
}
if (ttt.ifstop == 1) {
ttt.ifstop = 0;
} else if (ttt.ifstop == 0) {
shoot_d++;
enem_time_ar[shoot_d] = 0;
ttt.speed = 0;
aaa.number = 1;
ttt.pos = "left";
clearInterval(aaa.interr);
inter_shoot = setInterval(shoot_enema, 150, ttt, aaa, shoot_d);
enem_aar[shoot_d] = inter_shoot;
aaa.interr = inter_shoot;
}
}
}
}
function throw_greande_en(enem) {
greande_num++;
var _local2 = attachMovie("greande", "greandee" + greande_num, 75500 + greande_num);
greande_ar[greande_num] = _local2;
trace(greande_ar[greande_num]);
greande_ar[greande_num]._x = enem._x;
greande_ar[greande_num]._y = enem._y;
greande_ar[greande_num]._rotation = enem._rotation;
greande_ar[greande_num]._xscale = enem._xscale;
trace(greande_ar[greande_num]._y);
}
function explode_greande() {
var _local1 = 0;
while (_local1 < greande_ar.length) {
if (greande_ar[_local1].count == 11) {
trace("boom");
rotat = greande_ar[_local1]._rotation;
dx = Math.sin((Math.PI/180) * rotat);
dy = Math.cos((Math.PI/180) * rotat);
explode_num++;
var _local2 = attachMovie("expl", "expl" + explode_num, 65000 + explode_num);
explode_ar[explode_num] = _local2;
explode_ar[explode_num]._x = greande_ar[_local1]._x + (dx * 220);
explode_ar[explode_num]._y = greande_ar[_local1]._y - (dy * 220);
removeMovieClip(greande_ar[_local1]);
}
_local1++;
}
}
clearInterval(time_in);
var time_in;
var sec1 = 0;
var min1 = 0;
var ebull = 0;
var ammo_ar_take = new Array();
ammo_ar_take[0] = gun_ammo;
ammo_ar_take[1] = m14_ammo;
ammo_ar_take[2] = m1_ammo;
ammo_ar_take[3] = uzi_ammo;
ammo_ar_take[4] = gal_ammo;
ammo_ar_take[5] = m16_ammo;
ammo_ar_take[6] = ak47_ammo;
ammo_ar_take[7] = bizon_ammo;
time_in = setInterval(timeof, 1000);
addenemy("enemyzz", 0, 50, 50, "hand_m1");
addenemy("enemyzz", 12, 40, 80, "en_bizon");
var shoot_d = 0;
var inter_shoot_c = 0;
var inter_shoot;
var inter_shootb;
var enem_aar = new Array();
var enem_time_ar = new Array();
var ball_shoot = new Array();
var bull_move_ene;
var ball_shoot_ar = new Array();
var ball_shoot_num = new Array();
var dx_ar = new Array();
var yx_ar = new Array();
var enemy_mp4 = new Sound();
var enemy_mp3 = new Sound();
var if_right = 0;
var greande_num = 0;
var greande_ar = new Array();
throw_greande_en(enemy1);
Instance of Symbol 425 MovieClip [empty] "controller" in Frame 10
onClipEvent (enterFrame) {
_root.detectKeys();
_root.collectcoin();
_root.hand_where();
_root.explode_greande();
_root.exp_hit_pac();
updateAfterEvent();
}
Frame 11
clearInterval(interhit);
stop();
var i = 0;
while (i < enem_ar.length) {
removeMovieClip(enem_ar[i]);
removeMovieClip(pac_graphic);
removeMovieClip(hand_en_ar[i]);
removeMovieClip(hand_pac);
removeMovieClip(addons_ar[i]);
removeMovieClip(places[i]);
removeMovieClip(explode_ar[i]);
i++;
}
var gonext4 = 0;
var i = 0;
while (i < 10000) {
clearInterval(i);
clearInterval(score_MC_AR_del[i]);
removeMovieClip(score_MC_AR[i]);
clearInterval(interhit);
clearInterval(enem_aar[i]);
clearInterval(bbb[i]);
clearInterval(ball_shoot_ar[i]);
removeMovieClip(ball_shoot[i]);
clearInterval(pac_shoot_ar);
removeMovieClip(pac_shoot[i]);
clearInterval(count_ar[i]);
fade_enem_ar[i] = 0;
removeMovieClip(ammo_ar_take[i]);
removeMovieClip(enem_add);
removeMovieClip(gun_add);
removeMovieClip(pac_weapon[i]);
clearInterval(time_in);
i++;
}
if (uover == 100) {
clearInterval(uover_in);
gotoAndPlay (6);
}
function goover() {
uover--;
}
function play44() {
gotoAndPlay (6);
}
var uover_in;
uover = 5;
uover_in = setInterval(goover, 1000);
function detectKeys() {
if (Key.isDown(32) && (_root.gonext4 == 4)) {
gotoAndStop (12);
}
}
trace("lm=" + lm);
if (mm == 1) {
gotoAndPlay (1);
}
Instance of Symbol 425 MovieClip [empty] "controller" in Frame 11
onClipEvent (enterFrame) {
_root.detectKeys();
}
Instance of Symbol 551 MovieClip "com" in Frame 11
on (press) {
getURL ("http://games.fs1.co.il", "_blank");
}
Frame 12
ll = 1;
stop();
clearInterval(interhit);
var i = 0;
while (i < enem_ar.length) {
removeMovieClip(enem_ar[i]);
removeMovieClip(pac_graphic);
removeMovieClip(hand_en_ar[i]);
removeMovieClip(hand_pac);
removeMovieClip(addons_ar[i]);
removeMovieClip(explode_ar[i]);
i++;
}
var i = 0;
while (i < 10000) {
clearInterval(i);
clearInterval(score_MC_AR_del[i]);
removeMovieClip(score_MC_AR[i]);
clearInterval(interhit);
clearInterval(enem_aar[i]);
clearInterval(bbb[i]);
clearInterval(ball_shoot_ar[i]);
removeMovieClip(ball_shoot[i]);
clearInterval(pac_shoot_ar);
removeMovieClip(pac_shoot[i]);
clearInterval(count_ar[i]);
fade_enem_ar[i] = 0;
removeMovieClip(ammo_ar_take[i]);
removeMovieClip(enem_add);
removeMovieClip(gun_add);
removeMovieClip(pac_weapon[i]);
clearInterval(time_in);
i++;
}
function alpha(ttt) {
var _local1 = 0;
while (_local1 < ttt.length) {
ttt[_local1]._visible = 0;
_local1++;
}
}
var ld_ar = new Array(d_l1, d_l2, d_l3, d_l4, d_l5, d_l6, d_l7, d_l8, d_l9, d_l10, d_l11);
ld_ar.dd = "d_l";
var rd_ar = new Array(d_r1, d_r2, d_r3, d_r4, d_r5, d_r6, d_r7, d_r8, d_r9, d_r10, d_r11);
rd_ar.dd = "d_r";
var ru_ar = new Array(u_r1, u_r2, u_r3, u_r4, u_r5, u_r6, u_r7, u_r8, u_r9, u_r10, u_r11);
ru_ar.dd = "u_r";
var lu_ar = new Array(u_l1, u_l2, u_l3, u_l4, u_l5, u_l6, u_l7, u_l8, u_l9, u_l10, u_l11);
lu_ar.dd = "u_l";
var places = new Array();
alpha(ld_ar);
alpha(rd_ar);
alpha(ru_ar);
alpha(lu_ar);
places[0] = monk_a0;
places[1] = monk_a1;
places[0]._x = 360;
places[0]._y = 330;
places[1]._x = 174;
places[1]._y = 330;
function guideof(ttt) {
var _local2 = 0;
while (_local2 < ttt.length) {
if (pac.hitTest(ttt[_local2]._x, ttt[_local2]._y, yes)) {
if (ttt.dd == "d_l") {
pac._x = pac._x - 4;
pac._y = pac._y + 4;
} else if (ttt.dd == "d_r") {
pac._x = pac._x + 4;
pac._y = pac._y + 4;
} else if (ttt.dd == "u_r") {
pac._x = pac._x + 4;
pac._y = pac._y - 4;
} else if (ttt.dd == "u_l") {
pac._x = pac._x - 4;
pac._y = pac._y - 4;
}
}
_local2++;
}
}
function pachit(aaa) {
if (life <= 0) {
score_num = score_num - 1000;
levelof = "level5";
gotoAndStop ("gameover");
}
life_mc.gotoAndStop(life);
if (pac.hit > 0) {
if (pac.caneat == 0) {
myTransform.ba = myTransform.ba - 5;
myTransform.ga = myTransform.ga - 5;
my_color.setTransform(myTransform);
}
pac.hit--;
} else if (pac.hit < 0) {
pac.hit = 0;
}
if (pac.hit == 0) {
if (myTransform.ba < 100) {
myTransform.ba = myTransform.ba + 5;
myTransform.ga = myTransform.ga + 5;
my_color.setTransform(myTransform);
}
}
updateAfterEvent();
if (pac.caneat > 0) {
aaa.speed = 0;
myTransform.ra = myTransform.ra - 5;
myTransform.ba = myTransform.ba - 5;
my_color.setTransform(myTransform);
pac.caneat--;
}
if (pac.caneat < 0) {
pac.caneat = 0;
}
if ((pac.caneat == 0) && (pac.hit == 0)) {
pac.hit == 0;
if (myTransform.ra < 100) {
myTransform.ra = 100;
myTransform.ba = 100;
myTransform.ga = 100;
my_color.setTransform(myTransform);
}
}
updateAfterEvent();
}
function movea() {
check1(pac);
if (pac._rotation == 90) {
pac._x = pac._x + speed_pac;
}
if (pac._rotation == -90) {
pac._x = pac._x - speed_pac;
}
if (pac._rotation == 180) {
pac._y = pac._y + speed_pac;
}
if (pac._rotation == 0) {
pac._y = pac._y - speed_pac;
}
tt++;
if (tt >= 4) {
tt = 0;
clearInterval(intermove_pac);
}
updateAfterEvent();
}
function detectKeys() {
collet_ammo();
ammo_txt.text = ammo;
greande_txt.text = pac.greande;
pac_graphic._x = pac._x;
pac_graphic._y = pac._y;
updateAfterEvent();
pacx.text = pac._x;
speed_pac = 5;
if (pac.hit > 8) {
speed_pac = 0;
}
if (Key.isDown(39) && (pac._x <= (760 - (pac._width / 2)))) {
clearInterval(intermove_pac);
check1(pac);
pac._x = pac._x + speed_pac;
pac._rotation = 90;
pac_graphic._rotation = 90;
if (pac_graphic._xscale == 100) {
pac_graphic._xscale = -pac_graphic._xscale;
}
if (pac_graphic._currentframe == "1") {
pac_graphic.nextFrame();
}
}
if (ammo == 0) {
pac.hand = 0;
}
if (Key.isDown(37) && (pac._x >= (0 + (pac._width / 2)))) {
clearInterval(intermove_pac);
check1(pac);
pac._x = pac._x - speed_pac;
if (pac_graphic._xscale == -100) {
pac_graphic._xscale = -pac_graphic._xscale;
}
pac_graphic._rotation = 270;
if (pac_graphic._currentframe == "1") {
pac_graphic.nextFrame();
}
}
if (Key.isDown(38) && (pac._y >= 70)) {
clearInterval(intermove_pac);
check1(pac);
pac._y = pac._y - speed_pac;
pac._rotation = 0;
pac_graphic._rotation = 0;
if (pac_graphic._xscale == -100) {
pac_graphic._xscale = -pac_graphic._xscale;
}
if (pac_graphic._currentframe == "1") {
pac_graphic.nextFrame();
}
}
if (Key.isDown(40) && (pac._y <= (500 - (pac._height / 2)))) {
clearInterval(intermove_pac);
check1(pac);
pac._rotation = 180;
pac._y = pac._y + speed_pac;
pac_graphic._rotation = 180;
if (pac_graphic._xscale == -100) {
pac_graphic._xscale = -pac_graphic._xscale;
}
if (pac_graphic._currentframe == "1") {
pac_graphic.nextFrame();
}
}
updateAfterEvent();
}
function check1(hit) {
var _local1 = 0;
while (_local1 < wall_ar.length) {
var _local5 = (wall_ar[_local1]._x - (wall_ar[_local1]._width / 2)) - 2;
var _local3 = (wall_ar[_local1]._x + (wall_ar[_local1]._width / 2)) + 2;
var _local4 = (wall_ar[_local1]._y - (wall_ar[_local1]._height / 2)) - 2;
var _local6 = (wall_ar[_local1]._y + (wall_ar[_local1]._height / 2)) + 2;
if (((hit._x >= _local5) && (hit._x <= _local3)) && ((hit._y <= _local6) && (hit._y >= _local4))) {
if (Key.isDown(38) && ((hit._y - (hit._height / 2)) >= (wall_ar[_local1]._y - 3))) {
guideof(ld_ar);
guideof(rd_ar);
guideof(ru_ar);
guideof(lu_ar);
speed_pac = 0;
trace("we cant up");
}
if (Key.isDown(40) && ((hit._y + (hit._height / 2)) <= (wall_ar[_local1]._y + 3))) {
guideof(ld_ar);
guideof(rd_ar);
guideof(ru_ar);
guideof(lu_ar);
speed_pac = 0;
trace("we cant down");
}
if (Key.isDown(39) && ((hit._x + (hit._width / 2)) <= (wall_ar[_local1]._x + 3))) {
guideof(ld_ar);
guideof(rd_ar);
guideof(ru_ar);
guideof(lu_ar);
speed_pac = 0;
trace("we cant right");
}
if (Key.isDown(37) && ((hit._x - (hit._width / 2)) >= (wall_ar[_local1]._x - 3))) {
guideof(ld_ar);
guideof(rd_ar);
guideof(ru_ar);
guideof(lu_ar);
speed_pac = 0;
trace("we cant left");
}
}
_local1++;
}
}
var pac_graphic1 = attachMovie("pacman_graphic2", "pac_graphic", 1);
var pac_graphic1 = attachMovie("hand_pac", "hand_pac", 1002);
var pac_graphic1 = attachMovie("m14_pac", "m14_pac", 1003);
var pac_graphic1 = attachMovie("m1_pac", "m1_pac", 1004);
var pac_graphic1 = attachMovie("uzi_pac", "uzi_pac", 1005);
var pac_graphic1 = attachMovie("gal_pac", "gal_pac", 1006);
var pac_graphic1 = attachMovie("m16_pac", "m16_pac", 1007);
var pac_graphic1 = attachMovie("ak47_pac", "ak47_pac", 1008);
var pac_graphic1 = attachMovie("bizon_pac", "bizon_pac", 1009);
pac_graphic._x = pac._x;
pac_graphic._y = pac._y;
pac._visible = 0;
pac.hit = "0";
pac.caneat = "0";
var interhit;
var tt = 0;
var my_color = new Color(_root.pac_graphic);
var myTransform = my_color.getTransform();
var ammo = 0;
var pac_weapon = new Array();
pac_weapon[0] = hand_pac;
pac_weapon[1] = m14_pac;
pac_weapon[2] = m1_pac;
pac_weapon[3] = uzi_pac;
pac_weapon[4] = gal_pac;
pac_weapon[5] = m16_pac;
pac_weapon[6] = ak47_pac;
pac_weapon[7] = bizon_pac;
interhit = setInterval(pachit, 50);
pac_graphic._currentframe = 1;
var oKey = new Object();
var wall_ar = new Array(wall1, wall2, wall3, wall4, wall5, wall6, wall7, wall8, wall9, wall10, wall11, wall12, wall13, wall14, wall15, wall16, wall17, wall18, wall19, wall20, wall21, wall22, wall23);
var speed_pac = 3;
pac_graphic._xscale = 100;
Key.addListener(oKey);
var a = 0;
function collectcoin() {
if (end >= 60) {
score_num = score_num - ((sec1 * min1) * 5);
ll = 0;
score_num = score_num - ((10 - life) * 50);
gotoAndStop ("level6");
end = 0;
trace("end");
}
backu(backs_u_ar, pac);
backu(backs_l_ar, pac);
backu(backs_d_ar, pac);
backu(backs_r_ar, pac);
var _local1 = 0;
while (_local1 < gold_ar.length) {
if (pac.hitTest(gold_ar[_local1]._x, gold_ar[_local1]._y, yes)) {
pac_graphic.gotoAndPlay("eat");
scoreplus("point_p_10", gold_ar[_local1]);
gold_ar[_local1]._x = 800;
gold_ar[_local1]._y = 1000;
removeMovieClip(gold_ar[_local1]);
my_sound.attachSound("blip.mp3");
my_sound.start();
score_num = score_num + 10;
score.text = score_num;
end++;
}
_local1++;
}
_local1 = 0;
while (_local1 < gold_big_ar.length) {
if (pac.hitTest(gold_big_ar[_local1]._x, gold_big_ar[_local1]._y, yes)) {
pac.caneat = 80;
pac_graphic.gotoAndPlay("eat");
scoreplus("point_p_10", gold_big_ar[_local1]);
gold_big_ar[_local1]._x = 800;
gold_big_ar[_local1]._y = 1000;
removeMovieClip(gold_ar[_local1]);
my_sound.attachSound("blip.mp3");
my_sound.start();
score_num = score_num + 10;
score.text = score_num;
}
_local1++;
}
}
function backu(ttt, sss) {
var _local3 = 0;
while (_local3 < 15) {
if (sss.hitTest(ttt[_local3])) {
if (ttt.info == "up") {
sss._y = 480;
} else if (ttt.info == "left") {
sss._x = 730;
} else if (ttt.info == "down") {
sss._y = 90;
} else if (ttt.info == "right") {
sss._x = 20;
}
}
_local3++;
}
}
function scoreplus(sss, aaa) {
clearinterval(noscore);
s_score = "point_p_10" + scoree;
var _local1 = attachMovie(sss, s_score, scoree + 200000);
scoree++;
_local1._x = aaa._x;
_local1._y = aaa._y;
score_MC_AR[scoree] = _local1;
noscore = setInterval(score_fade, 20, score_MC_AR[scoree]);
score_MC_AR_del[scoree] = noscore;
}
function score_fade(bbb) {
bbb._y = bbb._y - 3;
bbb._alpha = bbb._alpha - 5;
if (bbb._alpha <= 10) {
clearInterval(score_MC_AR[bbb]);
}
}
var gold_ar = new Array(gold, gold1, gold2, gold3, gold4, gold5, gold6, gold7, gold8, gold9, gold10, gold11, gold12, gold13, gold14, gold15, gold16, gold17, gold18, gold19, gold20, gold21, gold22, gold23, gold24, gold25, gold26, gold27, gold28, gold29, gold30, gold31, gold32, gold33, gold34, gold35, gold36, gold37, gold38, gold39, gold40, gold41, gold42, gold43, gold44, gold45, gold46, gold47, gold48, gold49, gold50, gold51, gold52, gold53, gold54, gold55, gold56, gold57, gold58, gold59, gold60, gold61, gold62, gold63, gold64, gold65, gold66, gold67, gold68, gold69, gold70, gold71, gold72, gold73, gold74, gold75, gold76, gold77, gold78, gold79, gold80, gold81, gold82, gold83, gold84, gold85, gold86, gold87, gold88, gold89, gold90, gold91, gold92, gold93, gold94, gold95, gold96, gold97, gold98, gold99);
var gold_big_ar = new Array(gold_big1, gold_big2, gold_big3, gold_big4);
var my_sound = new Sound();
var backs_u_ar = new Array(u_back, u_back1, u_back2);
backs_u_ar.info = "up";
var backs_l_ar = new Array(l_back, l_back1, l_back2);
backs_l_ar.info = "left";
var backs_d_ar = new Array(d_back, d_back1, d_back2);
backs_d_ar.info = "down";
var backs_r_ar = new Array(r_back, r_back1, r_back2);
backs_r_ar.info = "right";
var allback = new Array(backs_u_ar, backs_l_ar, backs_r_ar, backs_d_ar);
var i = 0;
while (i < 30) {
var j = 0;
while (j < 10) {
allback[i][j]._visible = 0;
c_guide_ar[j]._visible = 0;
j++;
}
i++;
}
var end = 0;
var oKey1 = new Object();
Key.addListener(oKey1);
var scoree = 0;
var noscore;
var score_MC_AR_del = new Array();
var score_MC_AR = new Array();
function enem_move(ttt, gun, add1) {
if (ttt != undefined) {
exp_hit_enem(ttt);
shoot_enem(ttt, gun);
check_hit_pac(ttt);
check2(ttt);
backu1(backs_u_ar, ttt);
backu1(backs_l_ar, ttt);
backu1(backs_d_ar, ttt);
backu1(backs_r_ar, ttt);
}
if (ttt.pos == "left") {
ttt._x = ttt._x - ttt.speed;
ttt._rotation = 270;
if ((ttt._xscale <= -90) && (ttt._currentframe == 1)) {
ttt._xscale = -ttt._xscale;
}
}
if (ttt.pos == "right") {
ttt._x = ttt._x + ttt.speed;
ttt._rotation = 90;
if ((ttt._xscale >= 90) && (ttt._currentframe == 1)) {
ttt._xscale = -ttt._xscale;
}
}
if (ttt.pos == "up") {
ttt._y = ttt._y - ttt.speed;
ttt._rotation = 0;
if ((ttt._xscale <= -90) && (ttt._currentframe == 1)) {
ttt._xscale = -ttt._xscale;
}
}
if (ttt.pos == "down") {
ttt._y = ttt._y + ttt.speed;
ttt._rotation = 180;
if ((ttt._xscale <= -90) && (ttt._currentframe == 1)) {
ttt._xscale = -ttt._xscale;
}
}
if (ttt.pos == "mixed") {
var _local6 = ttt._rotation + 10;
dx = Math.cos((Math.PI/180) * _local6);
dy = Math.sin((Math.PI/180) * _local6);
ttt._x = ttt._x + (dx * ttt.speed);
ttt._y = ttt._y + (dy * ttt.speed);
}
gun._x = ttt._x;
gun._y = ttt._y;
gun._rotation = ttt._rotation;
gun._xscale = ttt._xscale;
add1._x = ttt._x;
add1._y = ttt._y;
add1._rotation = ttt._rotation;
add1._xscale = ttt._xscale;
var _local2 = 0;
while (_local2 < c_guide_ar.length) {
if ((((((ttt._x >= (c_guide_ar[_local2]._x - 5)) && (ttt._x <= (c_guide_ar[_local2]._x + 5))) && (ttt._y >= (c_guide_ar[_local2]._y - 5))) && (ttt._y <= (c_guide_ar[_local2]._y + 5))) && (ttt.a >= 6)) && (ttt.hitTest(c_guide_ar[_local2]))) {
ttt.a = 0;
if ((ttt._x >= (pac._x - 4)) && (ttt._x <= (pac._x + 4))) {
if (ttt._y <= pac._y) {
ttt.pos = "down";
}
if (ttt._y > pac._y) {
ttt.pos = "up";
}
} else if ((ttt._y >= (pac._y - 4)) && (ttt._y <= (pac._y + 4))) {
if (ttt._x <= pac._x) {
ttt.pos = "right";
}
if (ttt._x > pac._x) {
ttt.pos = "left";
}
} else {
var _local3 = random(4);
switch (_local3) {
case 0 :
ttt.pos = "down";
ttt.a = "0";
ttt._y = ttt._y + 3;
break;
case 1 :
ttt.pos = "up";
ttt.a = "0";
ttt._y = ttt._y - 3;
break;
case 2 :
ttt.pos = "right";
ttt.a = "0";
ttt._x = ttt._x + 3;
break;
case 3 :
ttt.pos = "left";
ttt.a = "0";
ttt._x = ttt._x - 3;
}
}
} else if (ttt.hitTest(c_guide_ar[_local2]) == false) {
ttt.a = ttt.a + 1;
}
_local2++;
}
updateAfterEvent();
}
function backu1(ttt, sss) {
var _local3 = 0;
while (_local3 < 15) {
if (sss.hitTest(ttt[_local3])) {
if (ttt.info == "up") {
sss._y = 480;
} else if (ttt.info == "left") {
sss._x = 730;
} else if (ttt.info == "down") {
sss._y = 90;
} else if (ttt.info == "right") {
sss._x = 20;
}
}
_local3++;
}
}
function check2(hit) {
var _local3 = 0;
while (_local3 < wall_ar.length) {
var _local6 = (wall_ar[_local3]._x - (wall_ar[_local3]._width / 2)) - 2;
var _local4 = (wall_ar[_local3]._x + (wall_ar[_local3]._width / 2)) + 2;
var _local5 = (wall_ar[_local3]._y - (wall_ar[_local3]._height / 2)) - 2;
var _local7 = (wall_ar[_local3]._y + (wall_ar[_local3]._height / 2)) + 2;
if ((((hit._x + (hit._width / 2)) >= _local6) && ((hit._x - (hit._width / 2)) <= _local4)) && ((((hit._y - (hit._height / 2)) <= _local7) && ((hit._y + (hit._height / 2)) >= _local5)) && (hit._currentframe == 1))) {
var _local2 = random(2);
if ((hit.pos == "left") && (hit.wall >= 1)) {
hit._x = hit._x + 4;
if (_local2 == 0) {
hit.pos = "right";
} else if (_local2 == 1) {
hit.pos = "up";
} else if (_local2 == 2) {
hit.pos = "down";
}
hit.wall = 0;
} else if ((hit.pos == "right") && (hit.wall >= 1)) {
hit._x = hit._x - 4;
if (_local2 == 0) {
hit.pos = "left";
} else if (_local2 == 1) {
hit.pos = "up";
} else if (_local2 == 2) {
hit.pos = "down";
}
hit.wall = 0;
} else if ((hit.pos == "up") && (hit.wall >= 1)) {
hit._y = hit._y + 4;
if (_local2 == 0) {
hit.pos = "right";
} else if (_local2 == 1) {
hit.pos = "down";
} else if (_local2 == 2) {
hit.pos = "left";
}
hit.wall = 0;
} else if ((hit.pos == "down") && (hit.wall >= 1)) {
hit._y = hit._y - 4;
if (_local2 == 0) {
hit.pos = "right";
} else if (_local2 == 2) {
hit.pos = "left";
} else if (_local2 == 2) {
hit.pos = "up";
}
hit.wall = 0;
}
} else if (hit.wall == 0) {
hit.wall = hit.wall + 1;
}
_local3++;
}
}
function fade_enemy(aaa, count) {
if (aaa._currentframe != 1) {
fade_enem_ar[count]++;
if ((fade_enem_ar[count] >= 10) && ((sec1 > 1) || (min1 > 1))) {
aaa._y = 1000;
aaa._x = 1000;
clearInterval(bbb[aaa.id]);
removeMovieClip(aaa);
fade_enem_ar[count] = 0;
clearInterval(count_ar[count]);
}
}
}
function check_hit_pac(hit) {
var _local6 = (pac._x - (pac._width / 2)) - 4;
var _local4 = (pac._x + (pac._width / 2)) + 4;
var _local5 = (pac._y - (pac._height / 2)) - 4;
var _local7 = (pac._y + (pac._height / 2)) + 4;
if (((((hit._x + (hit._width / 2)) >= _local6) && ((hit._x - (hit._width / 2)) <= _local4)) && (((hit._y - (hit._height / 2)) <= _local7) && ((hit._y + (hit._height / 2)) >= _local5))) && (pac.caneat <= 0)) {
if (((hit.pos == "left") && (hit.pac >= 1)) && (hit._currentframe == 1)) {
hit._x = hit._x + 4;
hit.pos = "right";
hit.pac = 0;
if (pac.hit == 0) {
pac.hit = 16;
if (pac.caneat <= 0) {
life--;
}
}
}
if (((hit.pos == "right") && (hit.pac >= 1)) && (hit._currentframe == 1)) {
hit._x = hit._x - 4;
hit.pos = "left";
hit.pac = 0;
if (pac.hit == 0) {
pac.hit = 16;
life--;
if (pac.caneat == 0) {
life--;
}
}
}
if (((hit.pos == "up") && (hit.pac >= 1)) && (hit._currentframe == 1)) {
hit._y = hit._y + 4;
hit.pos = "down";
hit.pac = 0;
if (pac.hit == 0) {
pac.hit = 16;
life--;
if (pac.caneat == 0) {
life--;
}
}
}
if (((hit.pos == "down") && (hit.pac >= 1)) && (hit._currentframe == 1)) {
hit._y = hit._y - 4;
hit.pos = "up";
hit.pac = 0;
if (pac.hit == 0) {
pac.hit = 16;
life--;
if (pac.caneat == 0) {
life--;
}
}
} else if (hit.hitTest(pac) == false) {
hit.pac = hit.pac + 1;
}
}
if (((((hit._x + (hit._width / 2)) >= _local6) && ((hit._x - (hit._width / 2)) <= _local4)) && (((hit._y - (hit._height / 2)) <= _local7) && ((hit._y + (hit._height / 2)) >= _local5))) && (pac.caneat > 0)) {
if (pac.caneat > 0) {
if ((aeee <= 0) && (hit._currentframe == 1)) {
var _local3 = 0;
while (_local3 < hand_en_ar.length) {
if (hand_en_ar[_local3].id == hit.id) {
hand_en_ar[_local3].gotoAndPlay(2);
}
if (addons_ar[_local3].id == hit.id) {
addons_ar[_local3].gotoAndPlay(2);
}
_local3++;
}
hit.speed = 0;
hit.gotoAndPlay(2);
num_enemys--;
_root.scoreplus("point_p_20", hit);
score_num = score_num + 20;
score.text = score.text - -20;
enem_count++;
trace("enem_count=" + enem_count);
fade_enem_ar[enem_count] = 0;
inter_enemy_aa = setInterval(fade_enemy, 40, hit, enem_count);
}
count_ar[enem_count] = inter_enemy_aa;
}
}
}
function exp_hit_enem(eneme) {
var _local4 = 0;
while (_local4 < explode_ar.length) {
if (((((((eneme._x > (explode_ar[_local4]._x - (explode_ar[_local4]._width / 2))) && (eneme._x < (explode_ar[_local4]._x + (explode_ar[_local4]._width / 2)))) && (eneme._y > (explode_ar[_local4]._y - (explode_ar[_local4]._height / 2)))) && (eneme._y < (explode_ar[_local4]._y + (explode_ar[_local4]._height / 2)))) && (eneme._currentframe == 1)) && (explode_ar[_local4].hit <= 0)) && (eneme._currentframe == 1)) {
explode_ar[_local4].id = 0;
enem_count++;
eneme.speed = 0;
num_enemys--;
_root.scoreplus("point_p_20", eneme);
score_num = score_num + 20;
score.text = score.text - -20;
var _local2 = 0;
while (_local2 < hand_en_ar.length) {
if (hand_en_ar[_local2].id == eneme.id) {
hand_en_ar[_local2].gotoAndPlay(2);
removeMovieClip(hand_en_ar[_local2]);
}
_local2++;
}
_local2 = 0;
while (_local2 < addons_ar.length) {
if (addons_ar[_local2].id == eneme.id) {
addons_ar[_local2].gotoAndPlay(2);
removeMovieClip(addons_ar[_local2]);
}
_local2++;
}
eneme.gotoAndPlay(2);
fade_enem_ar[enem_count] = 0;
inter_enemy_aa2 = setInterval(fade_enemy, 40, eneme, enem_count);
count_ar[enem_count] = inter_enemy_aa2;
trace("count=" + count_ar[enem_count]);
}
_local4++;
}
}
function addenemy(enem_mca, rax, gax, bax, gun, addon) {
var _local2 = enem_ar.length;
trace(_local2);
var _local3 = this.attachMovie(enem_mca, ("enemy" + _local2) + 1, _local2 + 10000);
var _local5 = this.attachMovie(gun, ("hand_en" + _local2) + 1, (_local2 + 10000) + 6000);
var _local4 = this.attachMovie(addon, ("addon_" + _local2) + 1, (_local2 + 10000) + 3000);
var _local6 = random(500) + 100;
_local3._x = _local6;
_local3._y = 345;
_local5._x = _local6;
_local5._y = 345;
_local4._x = _local6;
_local4._y = 345;
_local3._currentframe = 1;
_local5._currentframe = 1;
_local4._currentframe = 1;
var _local10 = new Color(_local3.color4);
var _local9 = new Color(_local3.body);
var _local7 = {ra:rax, ga:gax, ba:bax, aa:100};
_local10.setTransform(_local7);
_local9.setTransform(_local7);
enem_ar[_local2] = _local3;
hand_en_ar[_local2] = _local5;
addons_ar[_local2] = _local4;
enem_ar[_local2].id = _local2;
hand_en_ar[_local2].id = _local2;
addons_ar[_local2].id = _local2;
hand_en_ar[_local2].kindof = gun;
enem_ar[_local2].a = "6";
enem_ar[_local2].wall = "5";
enem_ar[_local2].pac = "0";
enem_ar[_local2].ifstop = "0";
num_enemys++;
enem_ar[_local2].pos = "left";
enem_ar[_local2].speed = 2;
inter_en = setInterval(enem_move, 10, enem_ar[_local2], hand_en_ar[_local2], addons_ar[_local2]);
var _local8 = inter_en;
bbb[_local2] = _local8;
}
function addenemy_pos(enem_mca, rax, gax, bax, gun, addon, tx, ty) {
var _local2 = enem_ar.length;
trace(_local2);
var _local3 = this.attachMovie(enem_mca, ("enemy" + _local2) + 1, _local2 + 10000);
var _local5 = this.attachMovie(gun, ("hand_en" + _local2) + 1, (_local2 + 10000) + 6000);
var _local4 = this.attachMovie(addon, ("addon_" + _local2) + 1, (_local2 + 10000) + 3000);
var _local12 = random(400) + 100;
_local3._x = tx;
_local3._y = ty;
_local5._x = tx;
_local5._y = ty;
_local4._x = tx;
_local4._y = ty;
_local3._currentframe = 1;
_local5._currentframe = 1;
_local4._currentframe = 1;
var _local11 = new Color(_local3.color4);
var _local10 = new Color(_local3.body);
var _local6 = {ra:rax, ga:gax, ba:bax, aa:100};
_local11.setTransform(_local6);
_local10.setTransform(_local6);
enem_ar[_local2] = _local3;
hand_en_ar[_local2] = _local5;
addons_ar[_local2] = _local4;
enem_ar[_local2].id = _local2;
hand_en_ar[_local2].id = _local2;
addons_ar[_local2].id = _local2;
hand_en_ar[_local2].kindof = gun;
enem_ar[_local2].a = "6";
enem_ar[_local2].wall = "5";
enem_ar[_local2].pac = "0";
enem_ar[_local2].ifstop = "0";
num_enemys++;
enem_ar[_local2].pos = "left";
enem_ar[_local2].speed = 2;
inter_en = setInterval(enem_move, 10, enem_ar[_local2], hand_en_ar[_local2], addons_ar[_local2]);
var _local7 = inter_en;
bbb[_local2] = _local7;
}
var i = 0;
while (i < enem_ar.length) {
clearInterval(bbb[i]);
enem_ar[i].id.tt = 0;
i++;
}
var enem_count = 0;
var num_enemys = 4;
life = 10;
var inter_en;
var enem_ar = new Array(enemy1, enemy3);
var hand_en_ar = new Array(hand_en1);
var addons_ar = new Array();
enem_ar[0].a = "6";
enem_ar[0].wall = "5";
enem_ar[0].ifstop = "0";
enem_ar[0].pac = "0";
enem_ar[0].id = "0";
hand_en_ar[0].id = "0";
hand_en_ar[0].kindof = "hand_en2";
enem_ar[1].a = "6";
enem_ar[1].wall = "5";
enem_ar[1].pac = "0";
enem_ar[1].id = "1";
enem_ar[1].ifstop = "0";
enem_ar[2].a = "6";
enem_ar[2].wall = "5";
enem_ar[2].pac = "0";
enem_ar[2].id = "2";
enem_ar[2].ifstop = "0";
var c_guide_ar = new Array(c_guide1, c_guide2, c_guide3, c_guide4, c_guide5, c_guide6, c_guide7, c_guide8, c_guide9, c_guide10, c_guide11, c_guide12, c_guide13, c_guide14);
var i = 0;
while (i < 30) {
c_guide_ar[i]._visible = 0;
i++;
}
enem_ar[0].pos = "left";
enem_ar[0].speed = 2;
enem_ar[1].pos = "right";
enem_ar[1].speed = 2;
enem_ar[2].pos = "right";
enem_ar[2].speed = 2;
var inter_en;
var bbb = new Array();
var i = 0;
while (i < enem_ar.length) {
inter_en = setInterval(enem_move, 20, enem_ar[i], hand_en_ar[i]);
var ttt = inter_en;
bbb[i] = ttt;
i++;
}
var inter_enemy_aa;
var fade_enem_ar = new Array();
var aeee = 0;
clearInterval(inter_mmm);
var pac_mp3 = new Sound();
var wall_mp3 = new Sound();
var inter_mmm;
inter_mmm = setInterval(movenemyss, 1000);
function exp_hit_pac() {
var _local1 = 0;
while (_local1 < explode_ar.length) {
if ((((((pac._x > (explode_ar[_local1]._x - (explode_ar[_local1]._width / 2))) && (pac._x < (explode_ar[_local1]._x + (explode_ar[_local1]._width / 2)))) && (pac._y > (explode_ar[_local1]._y - (explode_ar[_local1]._height / 2)))) && (pac._y < (explode_ar[_local1]._y + (explode_ar[_local1]._height / 2)))) && (pac.hit <= 0)) && (pac.caneat == 0)) {
life--;
life--;
pac.hit = 25;
}
_local1++;
}
}
function bull_hit_pac(bulll) {
if ((((((((bulll._x + (bulll._width / 2)) > ((pac._x - (pac._width / 2)) + 5)) && ((bulll._x - (bulll._width / 2)) < ((pac._x + (pac._width / 2)) - 5))) && ((bulll._y + (bulll._height / 2)) > ((pac._y - (pac._height / 2)) + 5))) && ((bulll._y - (bulll._height / 2)) < ((pac._y + (pac._height / 2)) - 5))) && (bulll._currentframe == 1)) && (pac.hit <= 0)) && (pac.caneat == 0)) {
life--;
if (bulll.id == 1) {
explode_num++;
var _local3 = attachMovie("expl", "expl" + explode_num, 65000 + explode_num);
explode_ar[explode_num] = _local3;
explode_ar[explode_num]._x = bulll._x;
explode_ar[explode_num]._y = bulll._y;
}
bulll.gotoAndPlay(2);
pac.hit = 16;
bulll.speed = 0;
}
var _local1 = 0;
while (_local1 < wall_ar.length) {
if (((((bulll._x > (wall_ar[_local1]._x - (wall_ar[_local1]._width / 2))) && (bulll._x < (wall_ar[_local1]._x + (wall_ar[_local1]._width / 2)))) && (bulll._y > (wall_ar[_local1]._y - (wall_ar[_local1]._height / 2)))) && (bulll._y < (wall_ar[_local1]._y + (wall_ar[_local1]._height / 2)))) && (bulll._currentframe == 1)) {
if (bulll.id == 1) {
explode_num++;
var _local3 = attachMovie("expl", "expl" + explode_num, 65000 + explode_num);
explode_ar[explode_num] = _local3;
explode_ar[explode_num]._x = bulll._x;
explode_ar[explode_num]._y = bulll._y;
}
bulll.gotoAndPlay(2);
wall_ar[_local1].hit == 16;
bulll.speed = 0;
}
_local1++;
}
}
function hand_where() {
if (pac.hand == 0) {
var _local2 = 0;
while (_local2 < pac_weapon.length) {
pac_weapon[_local2]._x = 1000;
pac_weapon[_local2]._y = 1000;
_local2++;
}
}
var _local1 = 0;
while (_local1 < 200) {
if (pac.hand == _local1) {
pac_weapon[_local1 - 1]._x = pac._x;
pac_weapon[_local1 - 1]._y = pac._y;
pac_weapon[_local1 - 1]._rotation = pac_graphic._rotation;
pac_weapon[_local1 - 1]._xscale = pac_graphic._xscale;
}
_local1++;
}
_local1 = 0;
while (_local1 < 200) {
if (pac.hand != _local1) {
pac_weapon[_local1 - 1]._x = 1000;
pac_weapon[_local1 - 1]._Y = 1000;
}
_local1++;
}
if ((Key.isDown(17) && (pac.greande > 0)) && (greand_throw == 2)) {
throw_greande_en(pac_graphic);
greand_throw = 0;
pac.greande--;
}
if ((Key.isDown(32) && (go33 >= 1)) && (ammo > 0)) {
ammo--;
if (pac_weapon[pac.hand - 1] == pac_weapon[0]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 2;
enemy_mp4.attachSound("gunshots_sm.wav");
enemy_mp4.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[1]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 2;
enemy_mp3.attachSound("GUN04_cop.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[2]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 1;
enemy_mp3.attachSound("GUN04_cop.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[3]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 1;
enemy_mp3.attachSound("uzi.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[4]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 1;
enemy_mp3.attachSound("galil.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[5]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("M16.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[6]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("ak47.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[7]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 1;
enemy_mp3.attachSound("uzi.wav");
enemy_mp3.start();
}
}
}
function shoot_en_bul2(gun, bullet) {
ebullpac++;
gun.gun.gotoAndPlay(2);
var _local3 = this.attachMovie(bullet, ("ball_pac" + ebullpac) + 1, ebullpac + 150000);
pac_shoot[ebullpac] = _local3;
gun_rad = Math.atan2(gun.gun._y, gun.gun._x);
gun_deg = (gun_rad * 180) / Math.PI;
rotat = gun._rotation + ((gun_deg - 360) + 90);
dx = Math.sin((Math.PI/180) * rotat);
dy = Math.cos((Math.PI/180) * rotat);
gun_xscal = Math.abs(gun._xscale);
_local3._rotation = gun._rotation;
pac_shoot_num[ebullpac] = 0;
dx_ar_pac[ebullpac] = dx;
yx_ar_pac[ebullpac] = dy;
_local3._x = gun._x + (dx * (-gun.gun._y));
_local3._y = gun._y - (((dy * (-gun.gun._y)) * gun._xscale) / gun_xscal);
dx = Math.sin((Math.PI/180) * (rotat + 6));
dy = Math.cos((Math.PI/180) * (rotat + 6));
dx_ar_pac[ebullpac] = dx;
yx_ar_pac[ebullpac] = dy;
if ((bullet == "ball2") || (bullet == "missle")) {
_local3.speed = 5;
bull_move_ene2 = setInterval(ball_move2, 20, pac_shoot[ebullpac], ebullpac, gun.range, gun);
pac_shoot_ar[ebullpac] = bull_move_ene2;
}
if (bullet == "ball3") {
_local3.speed = 5;
bull_move_ene2 = setInterval(ball_move2, 16, pac_shoot[ebullpac], ebullpac, gun.range, gun);
pac_shoot_ar[ebullpac] = bull_move_ene2;
}
}
function ball_move2(bullet, numm24, rangeofammo2, ffgun) {
bull_hit_enem(pac_shoot[numm24]);
bullspeed1 = pac_shoot[numm24].speed;
bullet._x = bullet._x + (dx_ar_pac[numm24] * bullspeed1);
bullet._y = bullet._y - (yx_ar_pac[numm24] * bullspeed1);
pac_shoot_num[numm24]++;
if ((pac_shoot_num[numm24] == (rangeofammo2 / 2)) && (ffgun.rate1 == "semi")) {
go33 = 1;
}
if ((pac_shoot_num[numm24] == (rangeofammo2 / 4)) && (ffgun.rate1 == "auto")) {
go33 = 1;
}
if ((pac_shoot_num[numm24] >= rangeofammo2) && (ffgun.rate1 == "mono")) {
go33 = 1;
}
if (pac_shoot_num[numm24] >= rangeofammo2) {
removeMovieClip(pac_shoot[numm24]);
clearInterval(pac_shoot_ar[numm24]);
pac_shoot_num[numm24] = 0;
}
}
function bull_hit_enem(bulll) {
var _local4 = 0;
while (_local4 < enem_ar.length) {
if (((((((bulll._x + (bulll._width / 2)) > ((enem_ar[_local4]._x - (enem_ar[_local4]._width / 2)) + 5)) && ((bulll._x - bulll._width) < ((enem_ar[_local4]._x + (enem_ar[_local4]._width / 2)) - 5))) && ((bulll._y + (bulll._height / 2)) > ((enem_ar[_local4]._y - (enem_ar[_local4]._height / 2)) + 5))) && ((bulll._y - (bulll._height / 2)) < ((enem_ar[_local4]._y + (enem_ar[_local4]._height / 2)) - 5))) && (bulll._currentframe == 1)) && (enem_ar[_local4]._currentframe == 1)) {
var _local3 = 0;
while (_local3 < hand_en_ar.length) {
if (hand_en_ar[_local3].id == enem_ar[_local4].id) {
hand_en_ar[_local3].gotoAndPlay(2);
}
if (addons_ar[_local3].id == enem_ar[_local4].id) {
addons_ar[_local3].gotoAndPlay(2);
}
_local3++;
}
if (bulll.id == 1) {
explode_num++;
var _local5 = attachMovie("expl", "expl" + explode_num, 35000 + explode_num);
explode_ar[explode_num] = _local5;
explode_ar[explode_num]._x = bulll._x;
explode_ar[explode_num]._y = bulll._y;
}
bulll.gotoAndPlay(2);
enem_count++;
enem_ar[_local4].speed = 0;
num_enemys--;
_root.scoreplus("point_p_20", enem_ar[_local4]);
score_num = score_num + 20;
score.text = score.text - -20;
enem_ar[_local4].gotoAndPlay(2);
fade_enem_ar[enem_count] = 0;
inter_enemy_aa2 = setInterval(fade_enemy, 40, enem_ar[_local4], enem_count);
count_ar[enem_count] = inter_enemy_aa2;
trace("count=" + count_ar[enem_count]);
bulll.speed = 0;
}
_local4++;
}
_local4 = 0;
while (_local4 < wall_ar.length) {
if (((((bulll._x > (wall_ar[_local4]._x - (wall_ar[_local4]._width / 2))) && (bulll._x < (wall_ar[_local4]._x + (wall_ar[_local4]._width / 2)))) && (bulll._y > (wall_ar[_local4]._y - (wall_ar[_local4]._height / 2)))) && (bulll._y < (wall_ar[_local4]._y + (wall_ar[_local4]._height / 2)))) && (bulll._currentframe == 1)) {
if (bulll.id == 1) {
explode_num++;
var _local5 = attachMovie("expl", "expl" + explode_num, 35000 + explode_num);
explode_ar[explode_num] = _local5;
explode_ar[explode_num]._x = bulll._x;
explode_ar[explode_num]._y = bulll._y;
}
bulll.gotoAndPlay(2);
wall_ar[_local4].hit == 16;
bulll.speed = 0;
}
_local4++;
}
}
function collet_ammo() {
var _local1 = 0;
while (_local1 < 180) {
if ((((ammo_ar_take[_local1]._x > (pac._x - (pac._width / 2))) && (ammo_ar_take[_local1]._x < (pac._x + (pac._width / 2)))) && (ammo_ar_take[_local1]._y > (pac._y - (pac._height / 2)))) && (ammo_ar_take[_local1]._y < (pac._y + (pac._height / 2)))) {
trace("t=" + _local1);
if (_local1 == 0) {
ammo = 10 + _local1;
}
if (_local1 == 1) {
ammo = 6 + _local1;
}
if (_local1 == 2) {
ammo = 4 + _local1;
}
if (_local1 == 3) {
ammo = 14 + _local1;
}
if (_local1 == 4) {
ammo = 6 + _local1;
}
if (_local1 == 5) {
ammo = 7 + _local1;
}
if (_local1 == 6) {
ammo = 8 + _local1;
pac.greande = 1;
}
if (_local1 == 7) {
ammo = 13 + _local1;
}
pac.hand = _local1 + 1;
trace(pac.hand);
ammo_ar_take[_local1]._x = 900;
ammo_ar_take[_local1]._y = 900;
}
_local1++;
}
}
var go33 = 1;
var explode_ar = new Array();
var explode_num = 0;
pac.greande = 0;
var greand_throw = 2;
pac.hand = 0;
var bull_move_ene2;
var pac_shoot_ar = new Array();
var pac_shoot_num = new Array();
var pac_shoot = new Array();
var ebullpac = 0;
var dx_ar_pac = new Array();
var yx_ar_pac = new Array();
var count_ar = new Array();
function timeof() {
sec1++;
clock.text = sec1;
if (sec1 >= 59) {
sec1 = 0;
min1++;
clock_min.text = min1;
}
if (sec1 == 1) {
addenemy("enemy_swat", 30, 70, 60, "en_rpg", "kafia_iraq");
}
if ((sec1 == 20) && (num_enemys < 9)) {
car.gotoAndPlay(2);
}
if (((sec1 == 10) || (sec1 == 30)) && (num_enemys < 9)) {
addenemy("enemyzz", 60, 40, 90);
}
if ((sec1 == 30) && (num_enemys < 7)) {
addenemy("enemy_swat", 30, 80, 60, "en_m16", "arab_hel");
}
if ((((sec1 == 30) || (sec1 == 45)) || (sec1 == 10)) && (num_enemys < 6)) {
addenemy("enemyzz", 90, 100, 72, "en_uzi", "kafia_iraq3");
var _local1 = 0;
while (_local1 < addons_ar.length) {
addons_ar[_local1].greande = 1;
_local1++;
}
}
if ((sec1 == 1) && (min1 == 0)) {
ammo_ar_take[3]._x = 500;
ammo_ar_take[3]._y = 233;
}
if (sec1 == 10) {
ammo_ar_take[6]._x = 350;
ammo_ar_take[6]._y = 233;
}
if ((sec1 == 40) && (min1 == 0)) {
ammo_ar_take[5]._x = 240;
ammo_ar_take[5]._y = 233;
}
}
function car_move() {
if (car.place == 5) {
car.place = 1;
addenemy_pos("enemy_swat", 10, 90, 90, "en_pk96", "kafia_iraq", 286, 344);
addenemy_pos("enemy_swat", 60, 40, 80, "en_ak47", "kafia_iraq", 325, 344);
}
}
function ball_move(bullet, numm2, rangeofammo, numB) {
bull_hit_pac(ball_shoot[numm2]);
bullspeed = ball_shoot[numm2].speed;
bullet._x = bullet._x + (dx_ar[numm2] * bullspeed);
bullet._y = bullet._y - (yx_ar[numm2] * bullspeed);
ball_shoot_num[numm2]++;
if (ball_shoot_num[numm2] >= rangeofammo) {
removeMovieClip(ball_shoot[numm2]);
clearInterval(ball_shoot_ar[numm2]);
ball_shoot_num[numm2] = 0;
}
}
function shoot_en_bul(gun, enemy, bullet, num1, num444, num5555) {
ebull++;
if (enemy.speed == 0) {
var _local3 = this.attachMovie(bullet, ("ball" + ebull) + 1, ebull + 50000);
ball_shoot[ebull] = _local3;
gun_rad = Math.atan2(gun.gun._y, gun.gun._x);
gun_deg = (gun_rad * 180) / Math.PI;
rotat = gun._rotation + ((gun_deg - 360) + 90);
dx = Math.sin((Math.PI/180) * rotat);
dy = Math.cos((Math.PI/180) * rotat);
gun_xscal = Math.abs(gun._xscale);
ball_shoot_num[ebull] = 0;
dx_ar[ebull] = dx;
yx_ar[ebull] = dy;
_local3._x = gun._x + (dx * (-gun.gun._y));
_local3._y = gun._y - (((dy * (-gun.gun._y)) * gun._xscale) / gun_xscal);
_local3._rotation = gun._rotation;
rotat = gun._rotation + ((gun_deg - 360) + 90);
dx = Math.sin((Math.PI/180) * (rotat + 5));
dy = Math.cos((Math.PI/180) * (rotat + 5));
dx_ar[ebull] = dx;
yx_ar[ebull] = dy;
if (gun.kindof == "hand_en") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "hand_en2") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_m16") {
_local3.speed = 6;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_m1") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_uzi") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 15, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_gal") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_ak47") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 17, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_bizon") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 19, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_pk96") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 18, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_rpg") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 19, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
}
}
function shoot_enema(zzz, eee, num) {
if ((zzz.speed == 0) && (enem_time_ar[num] == 2)) {
var _local3 = 0;
while (_local3 < addons_ar.length) {
if (((addons_ar[_local3].id == zzz.id) && (addons_ar[_local3].greande > 0)) && (addons_ar[_local3].kindof == "explode")) {
throw_greande_en(addons_ar[_local3]);
addons_ar[_local3].greande--;
}
_local3++;
}
}
if (((eee.kindof == "hand_en") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 10) {
eee.number = 0;
enemy_mp4.attachSound("gunshots_sm.wav");
enemy_mp4.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 20, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "hand_en2") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 6) {
eee.number = 0;
enemy_mp3.attachSound("GUN04_cop.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 30, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_m16") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 3) {
eee.number = 0;
enemy_mp3.attachSound("M16.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 70, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
zzz.ifstop = 1;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_m1") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 6) {
eee.number = 0;
enemy_mp3.attachSound("GUN04_cop.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 70, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_uzi") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 4) {
eee.gun.gotoAndPlay(2);
enemy_mp3.attachSound("uzi.wav");
enemy_mp3.start();
shoot_en_bul(eee, zzz, "ball2", 1, 20, num);
}
if (enem_time_ar[num] > 5) {
eee.number = 0;
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 20, num);
zzz.speed = 2.8;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_gal") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 5) {
eee.number = 0;
enemy_mp3.attachSound("galil.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 36, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_ak47") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 3) {
eee.number = 0;
enemy_mp3.attachSound("ak47.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 38, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_bizon") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 3) {
eee.gun.gotoAndPlay(2);
enemy_mp3.attachSound("uzi.wav");
enemy_mp3.start();
shoot_en_bul(eee, zzz, "ball2", 1, 22, num);
}
if (enem_time_ar[num] > 4) {
eee.number = 0;
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 22, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_pk96") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 2) {
eee.gun.gotoAndPlay(2);
enemy_mp3.attachSound("pk96.wav");
enemy_mp3.start();
shoot_en_bul(eee, zzz, "ball2", 1, 34, num);
}
if (enem_time_ar[num] == 3) {
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 34, num);
}
if (enem_time_ar[num] > 4) {
eee.number = 0;
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 34, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_rpg") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 4) {
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "rpg_mis", 1, 100, num);
}
if (enem_time_ar[num] > 8) {
eee.number = 0;
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
}
function shoot_enem(ttt, aaa) {
if (((((((ttt._x >= (pac._x - 4)) && (ttt._x <= (pac._x + 4))) && (ttt.speed >= 2)) && (ttt != null)) && (ttt._y >= (pac._y - aaa.range))) && (ttt._y <= (pac._y + aaa.range))) && (aaa != null)) {
if ((ttt._y <= pac._y) && (ttt.speed >= 2)) {
var _local2 = 0;
while (_local2 < wall_ar.length) {
if (((((((ttt._x < (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2))) && (ttt._x > (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (if_right == 0)) && (pac._x > (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (pac._x < (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2)))) && (ttt._y < (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (pac._y > (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2)))) {
ttt.ifstop = 1;
}
_local2++;
}
trace("donw");
if (ttt.ifstop == 1) {
ttt.ifstop = 0;
} else if (ttt.ifstop == 0) {
shoot_d++;
enem_time_ar[shoot_d] = 0;
ttt.speed = 0;
ttt.pos = "down";
aaa.number = 1;
clearInterval(aaa.interr);
inter_shoot = setInterval(shoot_enema, 150, ttt, aaa, shoot_d);
enem_aar[shoot_d] = inter_shoot;
aaa.interr = inter_shoot;
}
}
if ((ttt._y > pac._y) && (ttt.speed >= 2)) {
var _local2 = 0;
while (_local2 < wall_ar.length) {
if (((((((ttt._x < (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2))) && (ttt._x > (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (if_right == 0)) && (pac._x > (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (pac._x < (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2)))) && (ttt._y > (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2)))) && (pac._y < (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) {
ttt.ifstop = 1;
}
_local2++;
}
if (ttt.ifstop == 1) {
ttt.ifstop = 0;
} else if (ttt.ifstop == 0) {
shoot_d++;
enem_time_ar[shoot_d] = 0;
ttt.speed = 0;
ttt.pos = "up";
}
aaa.number = 1;
clearInterval(aaa.interr);
inter_shoot = setInterval(shoot_enema, 150, ttt, aaa, shoot_d);
enem_aar[shoot_d] = inter_shoot;
aaa.interr = inter_shoot;
}
} else if (((((((ttt._y >= (pac._y - 4)) && (ttt._y <= (pac._y + 4))) && (ttt.speed >= 2)) && (ttt != null)) && (ttt._x >= (pac._x - aaa.range))) && (ttt._x <= (pac._x + aaa.range))) && (aaa != null)) {
if ((ttt._x <= pac._x) && (ttt.speed >= 2)) {
var _local2 = 0;
while (_local2 < wall_ar.length) {
if (((((((ttt._y < (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2))) && (ttt._y > (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (if_right == 0)) && (pac._y > (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (pac._y < (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2)))) && (ttt._x < (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (pac._x > (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2)))) {
ttt.ifstop = 1;
}
_local2++;
}
if (ttt.ifstop == 1) {
ttt.ifstop = 0;
} else if (ttt.ifstop == 0) {
shoot_d++;
enem_time_ar[shoot_d] = 0;
ttt.speed = 0;
aaa.number = 1;
ttt.pos = "right";
clearInterval(aaa.interr);
inter_shoot = setInterval(shoot_enema, 150, ttt, aaa, shoot_d);
enem_aar[shoot_d] = inter_shoot;
aaa.interr = inter_shoot;
}
}
if ((ttt._x > pac._x) && (ttt.speed >= 2)) {
var _local2 = 0;
while (_local2 < wall_ar.length) {
if (((((((ttt._y < (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2))) && (ttt._y > (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (if_right == 0)) && (pac._y > (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (pac._y < (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2)))) && (ttt._x > (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2)))) && (pac._x < (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) {
trace("okL");
ttt.ifstop = 1;
}
_local2++;
}
if (ttt.ifstop == 1) {
ttt.ifstop = 0;
} else if (ttt.ifstop == 0) {
shoot_d++;
enem_time_ar[shoot_d] = 0;
ttt.speed = 0;
aaa.number = 1;
ttt.pos = "left";
clearInterval(aaa.interr);
inter_shoot = setInterval(shoot_enema, 150, ttt, aaa, shoot_d);
enem_aar[shoot_d] = inter_shoot;
aaa.interr = inter_shoot;
}
}
}
}
function throw_greande_en(enem) {
greande_num++;
var _local2 = attachMovie("greande", "greandee" + greande_num, 75500 + greande_num);
greande_ar[greande_num] = _local2;
trace(greande_ar[greande_num]);
greande_ar[greande_num]._x = enem._x;
greande_ar[greande_num]._y = enem._y;
greande_ar[greande_num]._rotation = enem._rotation;
greande_ar[greande_num]._xscale = enem._xscale;
trace(greande_ar[greande_num]._y);
}
function explode_greande() {
var _local1 = 0;
while (_local1 < greande_ar.length) {
if (greande_ar[_local1].count == 11) {
trace("boom");
greand_throw = 2;
rotat = greande_ar[_local1]._rotation;
dx = Math.sin((Math.PI/180) * rotat);
dy = Math.cos((Math.PI/180) * rotat);
explode_num++;
var _local2 = attachMovie("expl", "expl" + explode_num, 65000 + explode_num);
explode_ar[explode_num] = _local2;
explode_ar[explode_num]._x = greande_ar[_local1]._x + (dx * 220);
explode_ar[explode_num]._y = greande_ar[_local1]._y - (dy * 220);
removeMovieClip(greande_ar[_local1]);
}
_local1++;
}
}
clearInterval(time_in);
var time_in;
var sec1 = 0;
var min1 = 0;
var ebull = 0;
var ammo_ar_take = new Array();
ammo_ar_take[0] = gun_ammo;
ammo_ar_take[1] = m14_ammo;
ammo_ar_take[2] = m1_ammo;
ammo_ar_take[3] = uzi_ammo;
ammo_ar_take[4] = gal_ammo;
ammo_ar_take[5] = m16_ammo;
ammo_ar_take[6] = ak47_ammo;
ammo_ar_take[7] = bizon_ammo;
time_in = setInterval(timeof, 1000);
addenemy("enemyzz", 12, 40, 80, "en_pk96", "kafia_iraq3");
var shoot_d = 0;
var inter_shoot_c = 0;
var inter_shoot;
var inter_shootb;
var enem_aar = new Array();
var enem_time_ar = new Array();
var ball_shoot = new Array();
var bull_move_ene;
var ball_shoot_ar = new Array();
var ball_shoot_num = new Array();
var dx_ar = new Array();
var yx_ar = new Array();
var enemy_mp4 = new Sound();
var enemy_mp3 = new Sound();
var if_right = 0;
var greande_num = 0;
var greande_ar = new Array();
throw_greande_en();
Instance of Symbol 425 MovieClip [empty] "controller" in Frame 12
onClipEvent (enterFrame) {
_root.detectKeys();
_root.collectcoin();
_root.hand_where();
_root.explode_greande();
_root.exp_hit_pac();
_root.car_move();
updateAfterEvent();
}
Frame 13
if (ll == 1) {
gotoAndPlay (1);
}
clearInterval(interhit);
stop();
var i = 0;
while (i < enem_ar.length) {
removeMovieClip(enem_ar[i]);
removeMovieClip(pac_graphic);
removeMovieClip(hand_en_ar[i]);
removeMovieClip(hand_pac);
removeMovieClip(addons_ar[i]);
removeMovieClip(places[i]);
removeMovieClip(explode_ar[i]);
i++;
}
var gonext4 = 0;
var i = 0;
while (i < 10000) {
clearInterval(i);
clearInterval(score_MC_AR_del[i]);
removeMovieClip(score_MC_AR[i]);
clearInterval(interhit);
clearInterval(enem_aar[i]);
clearInterval(bbb[i]);
clearInterval(ball_shoot_ar[i]);
removeMovieClip(ball_shoot[i]);
clearInterval(pac_shoot_ar);
removeMovieClip(pac_shoot[i]);
clearInterval(count_ar[i]);
fade_enem_ar[i] = 0;
removeMovieClip(ammo_ar_take[i]);
removeMovieClip(enem_add);
removeMovieClip(gun_add);
removeMovieClip(pac_weapon[i]);
clearInterval(time_in);
i++;
}
if (uover == 100) {
clearInterval(uover_in);
gotoAndPlay (6);
}
function goover() {
uover--;
}
function play44() {
gotoAndPlay (6);
}
var uover_in;
uover = 5;
uover_in = setInterval(goover, 1000);
function detectKeys() {
if (Key.isDown(32) && (_root.gonext4 == 4)) {
gotoAndStop (14);
}
}
Instance of Symbol 425 MovieClip [empty] "controller" in Frame 13
onClipEvent (enterFrame) {
_root.detectKeys();
}
Instance of Symbol 551 MovieClip "com" in Frame 13
on (press) {
getURL ("http://games.fs1.co.il", "_blank");
}
Frame 14
stop();
clearInterval(interhit);
var i = 0;
while (i < enem_ar.length) {
removeMovieClip(enem_ar[i]);
removeMovieClip(pac_graphic);
removeMovieClip(hand_en_ar[i]);
removeMovieClip(hand_pac);
removeMovieClip(addons_ar[i]);
removeMovieClip(explode_ar[i]);
i++;
}
var i = 0;
while (i < 10000) {
clearInterval(i);
clearInterval(score_MC_AR_del[i]);
removeMovieClip(score_MC_AR[i]);
clearInterval(interhit);
clearInterval(enem_aar[i]);
clearInterval(bbb[i]);
clearInterval(ball_shoot_ar[i]);
removeMovieClip(ball_shoot[i]);
clearInterval(pac_shoot_ar);
removeMovieClip(pac_shoot[i]);
clearInterval(count_ar[i]);
fade_enem_ar[i] = 0;
removeMovieClip(ammo_ar_take[i]);
removeMovieClip(enem_add);
removeMovieClip(gun_add);
removeMovieClip(pac_weapon[i]);
clearInterval(time_in);
i++;
}
function alpha(ttt) {
var _local1 = 0;
while (_local1 < ttt.length) {
ttt[_local1]._visible = 0;
_local1++;
}
}
var ld_ar = new Array(d_l1, d_l2, d_l3, d_l4, d_l5, d_l6, d_l7, d_l8, d_l9, d_l10, d_l11);
ld_ar.dd = "d_l";
var rd_ar = new Array(d_r1, d_r2, d_r3, d_r4, d_r5, d_r6, d_r7, d_r8, d_r9, d_r10, d_r11);
rd_ar.dd = "d_r";
var ru_ar = new Array(u_r1, u_r2, u_r3, u_r4, u_r5, u_r6, u_r7, u_r8, u_r9, u_r10, u_r11);
ru_ar.dd = "u_r";
var lu_ar = new Array(u_l1, u_l2, u_l3, u_l4, u_l5, u_l6, u_l7, u_l8, u_l9, u_l10, u_l11);
lu_ar.dd = "u_l";
var places = new Array();
alpha(ld_ar);
alpha(rd_ar);
alpha(ru_ar);
alpha(lu_ar);
places[0] = monk_a0;
places[1] = monk_a1;
places[0]._x = 360;
places[0]._y = 330;
places[1]._x = 174;
places[1]._y = 330;
function guideof(ttt) {
var _local2 = 0;
while (_local2 < ttt.length) {
if (pac.hitTest(ttt[_local2]._x, ttt[_local2]._y, yes)) {
if (ttt.dd == "d_l") {
pac._x = pac._x - 4;
pac._y = pac._y + 4;
} else if (ttt.dd == "d_r") {
pac._x = pac._x + 4;
pac._y = pac._y + 4;
} else if (ttt.dd == "u_r") {
pac._x = pac._x + 4;
pac._y = pac._y - 4;
} else if (ttt.dd == "u_l") {
pac._x = pac._x - 4;
pac._y = pac._y - 4;
}
}
_local2++;
}
}
function pachit(aaa) {
if (life <= 0) {
score_num = score_num - 1000;
levelof = "level7";
gotoAndStop ("gameover");
}
life_mc.gotoAndStop(life);
if (pac.hit > 0) {
if (pac.caneat == 0) {
myTransform.ba = myTransform.ba - 5;
myTransform.ga = myTransform.ga - 5;
my_color.setTransform(myTransform);
}
pac.hit--;
} else if (pac.hit < 0) {
pac.hit = 0;
}
if (pac.hit == 0) {
if (myTransform.ba < 100) {
myTransform.ba = myTransform.ba + 5;
myTransform.ga = myTransform.ga + 5;
my_color.setTransform(myTransform);
}
}
updateAfterEvent();
if (pac.caneat > 0) {
aaa.speed = 0;
myTransform.ra = myTransform.ra - 5;
myTransform.ba = myTransform.ba - 5;
my_color.setTransform(myTransform);
pac.caneat--;
}
if (pac.caneat < 0) {
pac.caneat = 0;
}
if ((pac.caneat == 0) && (pac.hit == 0)) {
pac.hit == 0;
if (myTransform.ra < 100) {
myTransform.ra = 100;
myTransform.ba = 100;
myTransform.ga = 100;
my_color.setTransform(myTransform);
}
}
updateAfterEvent();
}
function movea() {
check1(pac);
if (pac._rotation == 90) {
pac._x = pac._x + speed_pac;
}
if (pac._rotation == -90) {
pac._x = pac._x - speed_pac;
}
if (pac._rotation == 180) {
pac._y = pac._y + speed_pac;
}
if (pac._rotation == 0) {
pac._y = pac._y - speed_pac;
}
tt++;
if (tt >= 4) {
tt = 0;
clearInterval(intermove_pac);
}
updateAfterEvent();
}
function detectKeys() {
collet_ammo();
ammo_txt.text = ammo;
greande_txt.text = pac.greande;
pac_graphic._x = pac._x;
pac_graphic._y = pac._y;
updateAfterEvent();
pacx.text = pac._x;
speed_pac = 5;
if (pac.hit > 8) {
speed_pac = 0;
}
if (Key.isDown(39) && (pac._x <= (760 - (pac._width / 2)))) {
clearInterval(intermove_pac);
check1(pac);
pac._x = pac._x + speed_pac;
pac._rotation = 90;
pac_graphic._rotation = 90;
if (pac_graphic._xscale == 100) {
pac_graphic._xscale = -pac_graphic._xscale;
}
if (pac_graphic._currentframe == "1") {
pac_graphic.nextFrame();
}
}
if (ammo == 0) {
pac.hand = 0;
}
if (Key.isDown(37) && (pac._x >= (0 + (pac._width / 2)))) {
clearInterval(intermove_pac);
check1(pac);
pac._x = pac._x - speed_pac;
if (pac_graphic._xscale == -100) {
pac_graphic._xscale = -pac_graphic._xscale;
}
pac_graphic._rotation = 270;
if (pac_graphic._currentframe == "1") {
pac_graphic.nextFrame();
}
}
if (Key.isDown(38) && (pac._y >= 70)) {
clearInterval(intermove_pac);
check1(pac);
pac._y = pac._y - speed_pac;
pac._rotation = 0;
pac_graphic._rotation = 0;
if (pac_graphic._xscale == -100) {
pac_graphic._xscale = -pac_graphic._xscale;
}
if (pac_graphic._currentframe == "1") {
pac_graphic.nextFrame();
}
}
if (Key.isDown(40) && (pac._y <= (500 - (pac._height / 2)))) {
clearInterval(intermove_pac);
check1(pac);
pac._rotation = 180;
pac._y = pac._y + speed_pac;
pac_graphic._rotation = 180;
if (pac_graphic._xscale == -100) {
pac_graphic._xscale = -pac_graphic._xscale;
}
if (pac_graphic._currentframe == "1") {
pac_graphic.nextFrame();
}
}
updateAfterEvent();
}
function check1(hit) {
var _local1 = 0;
while (_local1 < wall_ar.length) {
var _local5 = (wall_ar[_local1]._x - (wall_ar[_local1]._width / 2)) - 2;
var _local3 = (wall_ar[_local1]._x + (wall_ar[_local1]._width / 2)) + 2;
var _local4 = (wall_ar[_local1]._y - (wall_ar[_local1]._height / 2)) - 2;
var _local6 = (wall_ar[_local1]._y + (wall_ar[_local1]._height / 2)) + 2;
if (((hit._x >= _local5) && (hit._x <= _local3)) && ((hit._y <= _local6) && (hit._y >= _local4))) {
if (Key.isDown(38) && ((hit._y - (hit._height / 2)) >= (wall_ar[_local1]._y - 3))) {
guideof(ld_ar);
guideof(rd_ar);
guideof(ru_ar);
guideof(lu_ar);
speed_pac = 0;
trace("we cant up");
}
if (Key.isDown(40) && ((hit._y + (hit._height / 2)) <= (wall_ar[_local1]._y + 3))) {
guideof(ld_ar);
guideof(rd_ar);
guideof(ru_ar);
guideof(lu_ar);
speed_pac = 0;
trace("we cant down");
}
if (Key.isDown(39) && ((hit._x + (hit._width / 2)) <= (wall_ar[_local1]._x + 3))) {
guideof(ld_ar);
guideof(rd_ar);
guideof(ru_ar);
guideof(lu_ar);
speed_pac = 0;
trace("we cant right");
}
if (Key.isDown(37) && ((hit._x - (hit._width / 2)) >= (wall_ar[_local1]._x - 3))) {
guideof(ld_ar);
guideof(rd_ar);
guideof(ru_ar);
guideof(lu_ar);
speed_pac = 0;
trace("we cant left");
}
}
_local1++;
}
}
var pac_graphic1 = attachMovie("pacman_graphic2", "pac_graphic", 1);
var pac_graphic1 = attachMovie("hand_pac", "hand_pac", 1002);
var pac_graphic1 = attachMovie("m14_pac", "m14_pac", 1003);
var pac_graphic1 = attachMovie("m1_pac", "m1_pac", 1004);
var pac_graphic1 = attachMovie("uzi_pac", "uzi_pac", 1005);
var pac_graphic1 = attachMovie("gal_pac", "gal_pac", 1006);
var pac_graphic1 = attachMovie("m16_pac", "m16_pac", 1007);
var pac_graphic1 = attachMovie("ak47_pac", "ak47_pac", 1008);
var pac_graphic1 = attachMovie("bizon_pac", "bizon_pac", 1009);
var pac_graphic1 = attachMovie("glock_pac", "glock_pac", 1010);
var pac_graphic1 = attachMovie("mp5hk_pac ", "mp5hk_pac", 1011);
var pac_graphic1 = attachMovie("sa80_pac ", "sa80_pac", 1012);
var pac_graphic1 = attachMovie("rpg_pac", "rpg_pac", 1013);
var pac_graphic1 = attachMovie("law_pac", "law_pac", 1014);
var pac_graphic1 = attachMovie("mp5g_pac", "mp5g_pac", 1015);
var pac_graphic1 = attachMovie("aug_pac ", "aug_pac", 1016);
var pac_graphic1 = attachMovie("shotgun_pac", "shotgun_pac", 1017);
var pac_graphic1 = attachMovie("law_camo_pac", "law_camo_pac", 1018);
pac_graphic._x = pac._x;
pac_graphic._y = pac._y;
pac._visible = 0;
pac.hit = "0";
pac.caneat = "0";
var interhit;
var tt = 0;
var my_color = new Color(_root.pac_graphic);
var myTransform = my_color.getTransform();
var ammo = 0;
var pac_weapon = new Array();
pac_weapon[0] = hand_pac;
pac_weapon[1] = m14_pac;
pac_weapon[2] = m1_pac;
pac_weapon[3] = uzi_pac;
pac_weapon[4] = gal_pac;
pac_weapon[5] = m16_pac;
pac_weapon[6] = ak47_pac;
pac_weapon[7] = bizon_pac;
pac_weapon[8] = glock_pac;
pac_weapon[9] = mp5hk_pac;
pac_weapon[10] = sa80_pac;
pac_weapon[11] = rpg_pac;
pac_weapon[12] = law_pac;
pac_weapon[13] = mp5g_pac;
pac_weapon[14] = aug_pac;
pac_weapon[15] = shotgun_pac;
pac_weapon[16] = law_camo_pac;
interhit = setInterval(pachit, 50);
pac_graphic._currentframe = 1;
var oKey = new Object();
var wall_ar = new Array(wall1, wall2, wall3, wall4, wall5, wall6, wall7, wall8, wall9, wall10, wall11, wall12, wall13, wall14, wall15, wall16, wall17, wall18, wall19, wall20, wall21, wall22, wall23);
var speed_pac = 3;
pac_graphic._xscale = 100;
Key.addListener(oKey);
var a = 0;
function collectcoin() {
if (end >= 60) {
score_num = score_num - ((sec1 * min1) * 5);
score_num = score_num - ((10 - life) * 50);
gotoAndStop ("level8");
end = 0;
trace("end");
}
backu(backs_u_ar, pac);
backu(backs_l_ar, pac);
backu(backs_d_ar, pac);
backu(backs_r_ar, pac);
var _local1 = 0;
while (_local1 < gold_ar.length) {
if (pac.hitTest(gold_ar[_local1]._x, gold_ar[_local1]._y, yes)) {
pac_graphic.gotoAndPlay("eat");
scoreplus("point_p_10", gold_ar[_local1]);
gold_ar[_local1]._x = 800;
gold_ar[_local1]._y = 1000;
removeMovieClip(gold_ar[_local1]);
my_sound.attachSound("blip.mp3");
my_sound.start();
score_num = score_num + 10;
score.text = score_num;
end++;
}
_local1++;
}
_local1 = 0;
while (_local1 < gold_big_ar.length) {
if (pac.hitTest(gold_big_ar[_local1]._x, gold_big_ar[_local1]._y, yes)) {
pac.caneat = 80;
pac_graphic.gotoAndPlay("eat");
scoreplus("point_p_10", gold_big_ar[_local1]);
gold_big_ar[_local1]._x = 800;
gold_big_ar[_local1]._y = 1000;
removeMovieClip(gold_ar[_local1]);
my_sound.attachSound("blip.mp3");
my_sound.start();
score_num = score_num + 10;
score.text = score_num;
}
_local1++;
}
}
function backu(ttt, sss) {
var _local3 = 0;
while (_local3 < 15) {
if (sss.hitTest(ttt[_local3])) {
if (ttt.info == "up") {
sss._y = 480;
} else if (ttt.info == "left") {
sss._x = 730;
} else if (ttt.info == "down") {
sss._y = 90;
} else if (ttt.info == "right") {
sss._x = 20;
}
}
_local3++;
}
}
function scoreplus(sss, aaa) {
clearinterval(noscore);
s_score = "point_p_10" + scoree;
var _local1 = attachMovie(sss, s_score, scoree + 200000);
scoree++;
_local1._x = aaa._x;
_local1._y = aaa._y;
score_MC_AR[scoree] = _local1;
noscore = setInterval(score_fade, 20, score_MC_AR[scoree]);
score_MC_AR_del[scoree] = noscore;
}
function score_fade(bbb) {
bbb._y = bbb._y - 3;
bbb._alpha = bbb._alpha - 5;
if (bbb._alpha <= 10) {
clearInterval(score_MC_AR[bbb]);
}
}
var gold_ar = new Array(gold, gold1, gold2, gold3, gold4, gold5, gold6, gold7, gold8, gold9, gold10, gold11, gold12, gold13, gold14, gold15, gold16, gold17, gold18, gold19, gold20, gold21, gold22, gold23, gold24, gold25, gold26, gold27, gold28, gold29, gold30, gold31, gold32, gold33, gold34, gold35, gold36, gold37, gold38, gold39, gold40, gold41, gold42, gold43, gold44, gold45, gold46, gold47, gold48, gold49, gold50, gold51, gold52, gold53, gold54, gold55, gold56, gold57, gold58, gold59, gold60, gold61, gold62, gold63, gold64, gold65, gold66, gold67, gold68, gold69, gold70, gold71, gold72, gold73, gold74, gold75, gold76, gold77, gold78, gold79, gold80, gold81, gold82, gold83, gold84, gold85, gold86, gold87, gold88, gold89, gold90, gold91, gold92, gold93, gold94, gold95, gold96, gold97, gold98, gold99);
var gold_big_ar = new Array(gold_big1, gold_big2, gold_big3, gold_big4);
var my_sound = new Sound();
var backs_u_ar = new Array(u_back, u_back1, u_back2);
backs_u_ar.info = "up";
var backs_l_ar = new Array(l_back, l_back1, l_back2);
backs_l_ar.info = "left";
var backs_d_ar = new Array(d_back, d_back1, d_back2);
backs_d_ar.info = "down";
var backs_r_ar = new Array(r_back, r_back1, r_back2);
backs_r_ar.info = "right";
var allback = new Array(backs_u_ar, backs_l_ar, backs_r_ar, backs_d_ar);
var i = 0;
while (i < 30) {
var j = 0;
while (j < 10) {
allback[i][j]._visible = 0;
c_guide_ar[j]._visible = 0;
j++;
}
i++;
}
var end = 0;
var oKey1 = new Object();
Key.addListener(oKey1);
var scoree = 0;
var noscore;
var score_MC_AR_del = new Array();
var score_MC_AR = new Array();
function enem_move(ttt, gun, add1) {
if (ttt != undefined) {
exp_hit_enem(ttt);
shoot_enem(ttt, gun);
check_hit_pac(ttt);
check2(ttt);
backu1(backs_u_ar, ttt);
backu1(backs_l_ar, ttt);
backu1(backs_d_ar, ttt);
backu1(backs_r_ar, ttt);
}
if (ttt.pos == "left") {
ttt._x = ttt._x - ttt.speed;
ttt._rotation = 270;
if ((ttt._xscale <= -90) && (ttt._currentframe == 1)) {
ttt._xscale = -ttt._xscale;
}
}
if (ttt.pos == "right") {
ttt._x = ttt._x + ttt.speed;
ttt._rotation = 90;
if ((ttt._xscale >= 90) && (ttt._currentframe == 1)) {
ttt._xscale = -ttt._xscale;
}
}
if (ttt.pos == "up") {
ttt._y = ttt._y - ttt.speed;
ttt._rotation = 0;
if ((ttt._xscale <= -90) && (ttt._currentframe == 1)) {
ttt._xscale = -ttt._xscale;
}
}
if (ttt.pos == "down") {
ttt._y = ttt._y + ttt.speed;
ttt._rotation = 180;
if ((ttt._xscale <= -90) && (ttt._currentframe == 1)) {
ttt._xscale = -ttt._xscale;
}
}
if (ttt.pos == "mixed") {
var _local6 = ttt._rotation + 10;
dx = Math.cos((Math.PI/180) * _local6);
dy = Math.sin((Math.PI/180) * _local6);
ttt._x = ttt._x + (dx * ttt.speed);
ttt._y = ttt._y + (dy * ttt.speed);
}
gun._x = ttt._x;
gun._y = ttt._y;
gun._rotation = ttt._rotation;
gun._xscale = ttt._xscale;
add1._x = ttt._x;
add1._y = ttt._y;
add1._rotation = ttt._rotation;
add1._xscale = ttt._xscale;
var _local2 = 0;
while (_local2 < c_guide_ar.length) {
if ((((((ttt._x >= (c_guide_ar[_local2]._x - 5)) && (ttt._x <= (c_guide_ar[_local2]._x + 5))) && (ttt._y >= (c_guide_ar[_local2]._y - 5))) && (ttt._y <= (c_guide_ar[_local2]._y + 5))) && (ttt.a >= 6)) && (ttt.hitTest(c_guide_ar[_local2]))) {
ttt.a = 0;
if ((ttt._x >= (pac._x - 4)) && (ttt._x <= (pac._x + 4))) {
if (ttt._y <= pac._y) {
ttt.pos = "down";
}
if (ttt._y > pac._y) {
ttt.pos = "up";
}
} else if ((ttt._y >= (pac._y - 4)) && (ttt._y <= (pac._y + 4))) {
if (ttt._x <= pac._x) {
ttt.pos = "right";
}
if (ttt._x > pac._x) {
ttt.pos = "left";
}
} else {
var _local3 = random(4);
switch (_local3) {
case 0 :
ttt.pos = "down";
ttt.a = "0";
ttt._y = ttt._y + 3;
break;
case 1 :
ttt.pos = "up";
ttt.a = "0";
ttt._y = ttt._y - 3;
break;
case 2 :
ttt.pos = "right";
ttt.a = "0";
ttt._x = ttt._x + 3;
break;
case 3 :
ttt.pos = "left";
ttt.a = "0";
ttt._x = ttt._x - 3;
}
}
} else if (ttt.hitTest(c_guide_ar[_local2]) == false) {
ttt.a = ttt.a + 1;
}
_local2++;
}
updateAfterEvent();
}
function backu1(ttt, sss) {
var _local3 = 0;
while (_local3 < 15) {
if (sss.hitTest(ttt[_local3])) {
if (ttt.info == "up") {
sss._y = 480;
} else if (ttt.info == "left") {
sss._x = 730;
} else if (ttt.info == "down") {
sss._y = 90;
} else if (ttt.info == "right") {
sss._x = 20;
}
}
_local3++;
}
}
function check2(hit) {
var _local3 = 0;
while (_local3 < wall_ar.length) {
var _local6 = (wall_ar[_local3]._x - (wall_ar[_local3]._width / 2)) - 2;
var _local4 = (wall_ar[_local3]._x + (wall_ar[_local3]._width / 2)) + 2;
var _local5 = (wall_ar[_local3]._y - (wall_ar[_local3]._height / 2)) - 2;
var _local7 = (wall_ar[_local3]._y + (wall_ar[_local3]._height / 2)) + 2;
if ((((hit._x + (hit._width / 2)) >= _local6) && ((hit._x - (hit._width / 2)) <= _local4)) && ((((hit._y - (hit._height / 2)) <= _local7) && ((hit._y + (hit._height / 2)) >= _local5)) && (hit._currentframe == 1))) {
var _local2 = random(2);
if ((hit.pos == "left") && (hit.wall >= 1)) {
hit._x = hit._x + 4;
if (_local2 == 0) {
hit.pos = "right";
} else if (_local2 == 1) {
hit.pos = "up";
} else if (_local2 == 2) {
hit.pos = "down";
}
hit.wall = 0;
} else if ((hit.pos == "right") && (hit.wall >= 1)) {
hit._x = hit._x - 4;
if (_local2 == 0) {
hit.pos = "left";
} else if (_local2 == 1) {
hit.pos = "up";
} else if (_local2 == 2) {
hit.pos = "down";
}
hit.wall = 0;
} else if ((hit.pos == "up") && (hit.wall >= 1)) {
hit._y = hit._y + 4;
if (_local2 == 0) {
hit.pos = "right";
} else if (_local2 == 1) {
hit.pos = "down";
} else if (_local2 == 2) {
hit.pos = "left";
}
hit.wall = 0;
} else if ((hit.pos == "down") && (hit.wall >= 1)) {
hit._y = hit._y - 4;
if (_local2 == 0) {
hit.pos = "right";
} else if (_local2 == 2) {
hit.pos = "left";
} else if (_local2 == 2) {
hit.pos = "up";
}
hit.wall = 0;
}
} else if (hit.wall == 0) {
hit.wall = hit.wall + 1;
}
_local3++;
}
}
function fade_enemy(aaa, count) {
if (aaa._currentframe != 1) {
fade_enem_ar[count]++;
if ((fade_enem_ar[count] >= 10) && ((sec1 > 1) || (min1 > 1))) {
aaa._y = 1000;
aaa._x = 1000;
clearInterval(bbb[aaa.id]);
removeMovieClip(aaa);
fade_enem_ar[count] = 0;
clearInterval(count_ar[count]);
}
}
}
function check_hit_pac(hit) {
var _local6 = (pac._x - (pac._width / 2)) - 4;
var _local4 = (pac._x + (pac._width / 2)) + 4;
var _local5 = (pac._y - (pac._height / 2)) - 4;
var _local7 = (pac._y + (pac._height / 2)) + 4;
if (((((hit._x + (hit._width / 2)) >= _local6) && ((hit._x - (hit._width / 2)) <= _local4)) && (((hit._y - (hit._height / 2)) <= _local7) && ((hit._y + (hit._height / 2)) >= _local5))) && (pac.caneat <= 0)) {
if (((hit.pos == "left") && (hit.pac >= 1)) && (hit._currentframe == 1)) {
hit._x = hit._x + 4;
hit.pos = "right";
hit.pac = 0;
if (pac.hit == 0) {
pac.hit = 16;
if (pac.caneat <= 0) {
life--;
}
}
}
if (((hit.pos == "right") && (hit.pac >= 1)) && (hit._currentframe == 1)) {
hit._x = hit._x - 4;
hit.pos = "left";
hit.pac = 0;
if (pac.hit == 0) {
pac.hit = 16;
life--;
if (pac.caneat == 0) {
life--;
}
}
}
if (((hit.pos == "up") && (hit.pac >= 1)) && (hit._currentframe == 1)) {
hit._y = hit._y + 4;
hit.pos = "down";
hit.pac = 0;
if (pac.hit == 0) {
pac.hit = 16;
life--;
if (pac.caneat == 0) {
life--;
}
}
}
if (((hit.pos == "down") && (hit.pac >= 1)) && (hit._currentframe == 1)) {
hit._y = hit._y - 4;
hit.pos = "up";
hit.pac = 0;
if (pac.hit == 0) {
pac.hit = 16;
life--;
if (pac.caneat == 0) {
life--;
}
}
} else if (hit.hitTest(pac) == false) {
hit.pac = hit.pac + 1;
}
}
if (((((hit._x + (hit._width / 2)) >= _local6) && ((hit._x - (hit._width / 2)) <= _local4)) && (((hit._y - (hit._height / 2)) <= _local7) && ((hit._y + (hit._height / 2)) >= _local5))) && (pac.caneat > 0)) {
if (pac.caneat > 0) {
if ((aeee <= 0) && (hit._currentframe == 1)) {
var _local3 = 0;
while (_local3 < hand_en_ar.length) {
if (hand_en_ar[_local3].id == hit.id) {
hand_en_ar[_local3].gotoAndPlay(2);
}
if (addons_ar[_local3].id == hit.id) {
addons_ar[_local3].gotoAndPlay(2);
}
_local3++;
}
hit.speed = 0;
hit.gotoAndPlay(2);
num_enemys--;
_root.scoreplus("point_p_20", hit);
score_num = score_num + 20;
score.text = score.text - -20;
enem_count++;
trace("enem_count=" + enem_count);
fade_enem_ar[enem_count] = 0;
inter_enemy_aa = setInterval(fade_enemy, 40, hit, enem_count);
}
count_ar[enem_count] = inter_enemy_aa;
}
}
}
function exp_hit_enem(eneme) {
var _local4 = 0;
while (_local4 < explode_ar.length) {
if (((((((eneme._x > (explode_ar[_local4]._x - (explode_ar[_local4]._width / 2))) && (eneme._x < (explode_ar[_local4]._x + (explode_ar[_local4]._width / 2)))) && (eneme._y > (explode_ar[_local4]._y - (explode_ar[_local4]._height / 2)))) && (eneme._y < (explode_ar[_local4]._y + (explode_ar[_local4]._height / 2)))) && (eneme._currentframe == 1)) && (explode_ar[_local4].hit <= 0)) && (eneme._currentframe == 1)) {
explode_ar[_local4].id = 0;
enem_count++;
eneme.speed = 0;
num_enemys--;
_root.scoreplus("point_p_20", eneme);
score_num = score_num + 20;
score.text = score.text - -20;
var _local2 = 0;
while (_local2 < hand_en_ar.length) {
if (hand_en_ar[_local2].id == eneme.id) {
hand_en_ar[_local2].gotoAndPlay(2);
removeMovieClip(hand_en_ar[_local2]);
}
_local2++;
}
_local2 = 0;
while (_local2 < addons_ar.length) {
if (addons_ar[_local2].id == eneme.id) {
addons_ar[_local2].gotoAndPlay(2);
removeMovieClip(addons_ar[_local2]);
}
_local2++;
}
eneme.gotoAndPlay(2);
fade_enem_ar[enem_count] = 0;
inter_enemy_aa2 = setInterval(fade_enemy, 40, eneme, enem_count);
count_ar[enem_count] = inter_enemy_aa2;
trace("count=" + count_ar[enem_count]);
}
_local4++;
}
}
function addenemy(enem_mca, rax, gax, bax, gun, addon) {
var _local2 = enem_ar.length;
trace(_local2);
var _local3 = this.attachMovie(enem_mca, ("enemy" + _local2) + 1, _local2 + 10000);
var _local5 = this.attachMovie(gun, ("hand_en" + _local2) + 1, (_local2 + 10000) + 6000);
var _local4 = this.attachMovie(addon, ("addon_" + _local2) + 1, (_local2 + 10000) + 3000);
var _local6 = random(500) + 100;
_local3._x = _local6;
_local3._y = 212;
_local5._x = _local6;
_local5._y = 212;
_local4._x = _local6;
_local4._y = 212;
_local3._currentframe = 1;
_local5._currentframe = 1;
_local4._currentframe = 1;
var _local10 = new Color(_local3.color4);
var _local9 = new Color(_local3.body);
var _local7 = {ra:rax, ga:gax, ba:bax, aa:100};
_local10.setTransform(_local7);
_local9.setTransform(_local7);
enem_ar[_local2] = _local3;
hand_en_ar[_local2] = _local5;
addons_ar[_local2] = _local4;
enem_ar[_local2].id = _local2;
hand_en_ar[_local2].id = _local2;
addons_ar[_local2].id = _local2;
hand_en_ar[_local2].kindof = gun;
enem_ar[_local2].a = "6";
enem_ar[_local2].wall = "5";
enem_ar[_local2].pac = "0";
enem_ar[_local2].ifstop = "0";
num_enemys++;
enem_ar[_local2].pos = "left";
enem_ar[_local2].speed = 2;
inter_en = setInterval(enem_move, 9, enem_ar[_local2], hand_en_ar[_local2], addons_ar[_local2]);
var _local8 = inter_en;
bbb[_local2] = _local8;
}
function addenemy_pos(enem_mca, rax, gax, bax, gun, addon, tx, ty) {
var _local2 = enem_ar.length;
trace(_local2);
var _local3 = this.attachMovie(enem_mca, ("enemy" + _local2) + 1, _local2 + 10000);
var _local5 = this.attachMovie(gun, ("hand_en" + _local2) + 1, (_local2 + 10000) + 6000);
var _local4 = this.attachMovie(addon, ("addon_" + _local2) + 1, (_local2 + 10000) + 3000);
var _local12 = random(400) + 100;
_local3._x = tx;
_local3._y = ty;
_local5._x = tx;
_local5._y = ty;
_local4._x = tx;
_local4._y = ty;
_local3._currentframe = 1;
_local5._currentframe = 1;
_local4._currentframe = 1;
var _local11 = new Color(_local3.color4);
var _local10 = new Color(_local3.body);
var _local6 = {ra:rax, ga:gax, ba:bax, aa:100};
_local11.setTransform(_local6);
_local10.setTransform(_local6);
enem_ar[_local2] = _local3;
hand_en_ar[_local2] = _local5;
addons_ar[_local2] = _local4;
enem_ar[_local2].id = _local2;
hand_en_ar[_local2].id = _local2;
addons_ar[_local2].id = _local2;
hand_en_ar[_local2].kindof = gun;
enem_ar[_local2].a = "6";
enem_ar[_local2].wall = "5";
enem_ar[_local2].pac = "0";
enem_ar[_local2].ifstop = "0";
num_enemys++;
enem_ar[_local2].pos = "left";
enem_ar[_local2].speed = 2;
inter_en = setInterval(enem_move, 9, enem_ar[_local2], hand_en_ar[_local2], addons_ar[_local2]);
var _local7 = inter_en;
bbb[_local2] = _local7;
}
var i = 0;
while (i < enem_ar.length) {
clearInterval(bbb[i]);
enem_ar[i].id.tt = 0;
i++;
}
var enem_count = 0;
var num_enemys = 4;
life = 10;
var inter_en;
var enem_ar = new Array(enemy1, enemy3);
var hand_en_ar = new Array(hand_en1);
var addons_ar = new Array();
enem_ar[0].a = "6";
enem_ar[0].wall = "5";
enem_ar[0].ifstop = "0";
enem_ar[0].pac = "0";
enem_ar[0].id = "0";
hand_en_ar[0].id = "0";
hand_en_ar[0].kindof = "hand_en2";
enem_ar[1].a = "6";
enem_ar[1].wall = "5";
enem_ar[1].pac = "0";
enem_ar[1].id = "1";
enem_ar[1].ifstop = "0";
enem_ar[2].a = "6";
enem_ar[2].wall = "5";
enem_ar[2].pac = "0";
enem_ar[2].id = "2";
enem_ar[2].ifstop = "0";
var c_guide_ar = new Array(c_guide1, c_guide2, c_guide3, c_guide4, c_guide5, c_guide6, c_guide7, c_guide8, c_guide9, c_guide10, c_guide11, c_guide12, c_guide13, c_guide14);
var i = 0;
while (i < 30) {
c_guide_ar[i]._visible = 0;
i++;
}
enem_ar[0].pos = "left";
enem_ar[0].speed = 2;
enem_ar[1].pos = "right";
enem_ar[1].speed = 2;
enem_ar[2].pos = "right";
enem_ar[2].speed = 2;
var inter_en;
var bbb = new Array();
var i = 0;
while (i < enem_ar.length) {
inter_en = setInterval(enem_move, 20, enem_ar[i], hand_en_ar[i]);
var ttt = inter_en;
bbb[i] = ttt;
i++;
}
var inter_enemy_aa;
var fade_enem_ar = new Array();
var aeee = 0;
clearInterval(inter_mmm);
var pac_mp3 = new Sound();
var wall_mp3 = new Sound();
var inter_mmm;
inter_mmm = setInterval(movenemyss, 1000);
function exp_hit_pac() {
var _local1 = 0;
while (_local1 < explode_ar.length) {
if ((((((pac._x > (explode_ar[_local1]._x - (explode_ar[_local1]._width / 2))) && (pac._x < (explode_ar[_local1]._x + (explode_ar[_local1]._width / 2)))) && (pac._y > (explode_ar[_local1]._y - (explode_ar[_local1]._height / 2)))) && (pac._y < (explode_ar[_local1]._y + (explode_ar[_local1]._height / 2)))) && (pac.hit <= 0)) && (pac.caneat == 0)) {
life--;
life--;
pac.hit = 25;
}
_local1++;
}
}
function bull_hit_pac(bulll) {
if ((((((((bulll._x + (bulll._width / 2)) > ((pac._x - (pac._width / 2)) + 5)) && ((bulll._x - (bulll._width / 2)) < ((pac._x + (pac._width / 2)) - 5))) && ((bulll._y + (bulll._height / 2)) > ((pac._y - (pac._height / 2)) + 5))) && ((bulll._y - (bulll._height / 2)) < ((pac._y + (pac._height / 2)) - 5))) && (bulll._currentframe == 1)) && (pac.hit <= 0)) && (pac.caneat == 0)) {
life--;
if (bulll.id == 1) {
explode_num++;
var _local3 = attachMovie("expl", "expl" + explode_num, 65000 + explode_num);
explode_ar[explode_num] = _local3;
explode_ar[explode_num]._x = bulll._x;
explode_ar[explode_num]._y = bulll._y;
}
bulll.gotoAndPlay(2);
pac.hit = 16;
bulll.speed = 0;
}
var _local1 = 0;
while (_local1 < wall_ar.length) {
if (((((bulll._x > (wall_ar[_local1]._x - (wall_ar[_local1]._width / 2))) && (bulll._x < (wall_ar[_local1]._x + (wall_ar[_local1]._width / 2)))) && (bulll._y > (wall_ar[_local1]._y - (wall_ar[_local1]._height / 2)))) && (bulll._y < (wall_ar[_local1]._y + (wall_ar[_local1]._height / 2)))) && (bulll._currentframe == 1)) {
if (bulll.id == 1) {
explode_num++;
var _local3 = attachMovie("expl", "expl" + explode_num, 65000 + explode_num);
explode_ar[explode_num] = _local3;
explode_ar[explode_num]._x = bulll._x;
explode_ar[explode_num]._y = bulll._y;
}
bulll.gotoAndPlay(2);
wall_ar[_local1].hit == 16;
bulll.speed = 0;
}
_local1++;
}
}
function hand_where() {
if (pac.hand == 0) {
var _local2 = 0;
while (_local2 < pac_weapon.length) {
pac_weapon[_local2]._x = 1000;
pac_weapon[_local2]._y = 1000;
_local2++;
}
}
var _local1 = 0;
while (_local1 < 200) {
if (pac.hand == _local1) {
pac_weapon[_local1 - 1]._x = pac._x;
pac_weapon[_local1 - 1]._y = pac._y;
pac_weapon[_local1 - 1]._rotation = pac_graphic._rotation;
pac_weapon[_local1 - 1]._xscale = pac_graphic._xscale;
}
_local1++;
}
_local1 = 0;
while (_local1 < 200) {
if (pac.hand != _local1) {
pac_weapon[_local1 - 1]._x = 1000;
pac_weapon[_local1 - 1]._Y = 1000;
}
_local1++;
}
if ((Key.isDown(17) && (pac.greande > 0)) && (greand_throw == 2)) {
throw_greande_en(pac_graphic);
greand_throw = 0;
pac.greande--;
}
if ((Key.isDown(32) && (go33 >= 1)) && (ammo > 0)) {
ammo--;
if (pac_weapon[pac.hand - 1] == pac_weapon[0]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 2;
enemy_mp4.attachSound("gunshots_sm.wav");
enemy_mp4.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[1]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 2;
enemy_mp3.attachSound("GUN04_cop.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[2]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 1;
enemy_mp3.attachSound("GUN04_cop.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[3]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 1;
enemy_mp3.attachSound("uzi.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[4]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 1;
enemy_mp3.attachSound("galil.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[5]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("M16.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[6]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("ak47.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[7]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 1;
enemy_mp3.attachSound("uzi.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[8]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 1;
enemy_mp3.attachSound("gunshots_sm.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[9]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("mp5.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[10]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("m16.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[11]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "rpg_mis");
go33 = go33 - 1;
}
if (pac_weapon[pac.hand - 1] == pac_weapon[12]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "rpg_mis");
go33 = go33 - 1;
}
if (pac_weapon[pac.hand - 1] == pac_weapon[13]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("mp5.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[14]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("aug.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[15]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "shot_ball");
go33 = go33 - 1;
enemy_mp3.attachSound("shotgun.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[16]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "rpg_mis");
go33 = go33 - 1;
}
}
}
function shoot_en_bul2(gun, bullet) {
ebullpac++;
gun.gun.gotoAndPlay(2);
var _local3 = this.attachMovie(bullet, ("ball_pac" + ebullpac) + 1, ebullpac + 150000);
pac_shoot[ebullpac] = _local3;
gun_rad = Math.atan2(gun.gun._y, gun.gun._x);
gun_deg = (gun_rad * 180) / Math.PI;
rotat = gun._rotation + ((gun_deg - 360) + 90);
dx = Math.sin((Math.PI/180) * rotat);
dy = Math.cos((Math.PI/180) * rotat);
gun_xscal = Math.abs(gun._xscale);
_local3._rotation = gun._rotation;
pac_shoot_num[ebullpac] = 0;
dx_ar_pac[ebullpac] = dx;
yx_ar_pac[ebullpac] = dy;
_local3._x = gun._x + (dx * (-gun.gun._y));
_local3._y = gun._y - (((dy * (-gun.gun._y)) * gun._xscale) / gun_xscal);
dx = Math.sin((Math.PI/180) * (rotat + 6));
dy = Math.cos((Math.PI/180) * (rotat + 6));
dx_ar_pac[ebullpac] = dx;
yx_ar_pac[ebullpac] = dy;
if (((bullet == "ball2") || (bullet == "missle")) || (bullet == "rpg_mis")) {
_local3.speed = 5;
bull_move_ene2 = setInterval(ball_move2, 20, pac_shoot[ebullpac], ebullpac, gun.range, gun);
pac_shoot_ar[ebullpac] = bull_move_ene2;
}
if ((bullet == "ball3") || (bullet == "shot_ball")) {
_local3.speed = 5;
bull_move_ene2 = setInterval(ball_move2, 16, pac_shoot[ebullpac], ebullpac, gun.range, gun);
pac_shoot_ar[ebullpac] = bull_move_ene2;
}
}
function ball_move2(bullet, numm24, rangeofammo2, ffgun) {
bull_hit_enem(pac_shoot[numm24]);
bullspeed1 = pac_shoot[numm24].speed;
bullet._x = bullet._x + (dx_ar_pac[numm24] * bullspeed1);
bullet._y = bullet._y - (yx_ar_pac[numm24] * bullspeed1);
pac_shoot_num[numm24]++;
if ((pac_shoot_num[numm24] == (rangeofammo2 / 2)) && (ffgun.rate1 == "semi")) {
go33 = 1;
}
if ((pac_shoot_num[numm24] == (rangeofammo2 / 4)) && (ffgun.rate1 == "auto")) {
go33 = 1;
}
if ((pac_shoot_num[numm24] >= rangeofammo2) && (ffgun.rate1 == "mono")) {
go33 = 1;
}
if (pac_shoot_num[numm24] >= rangeofammo2) {
removeMovieClip(pac_shoot[numm24]);
clearInterval(pac_shoot_ar[numm24]);
pac_shoot_num[numm24] = 0;
}
}
function bull_hit_enem(bulll) {
var _local3 = 0;
while (_local3 < enem_ar.length) {
if (((((((bulll._x + (bulll._width / 2)) > ((enem_ar[_local3]._x - (enem_ar[_local3]._width / 2)) + 5)) && ((bulll._x - bulll._width) < ((enem_ar[_local3]._x + (enem_ar[_local3]._width / 2)) - 5))) && ((bulll._y + (bulll._height / 2)) > ((enem_ar[_local3]._y - (enem_ar[_local3]._height / 2)) + 5))) && ((bulll._y - (bulll._height / 2)) < ((enem_ar[_local3]._y + (enem_ar[_local3]._height / 2)) - 5))) && (bulll._currentframe == 1)) && (enem_ar[_local3]._currentframe == 1)) {
var _local4 = 0;
while (_local4 < hand_en_ar.length) {
if (hand_en_ar[_local4].id == enem_ar[_local3].id) {
hand_en_ar[_local4].gotoAndPlay(2);
}
if (addons_ar[_local4].id == enem_ar[_local3].id) {
addons_ar[_local4].gotoAndPlay(2);
}
_local4++;
}
if (bulll.id == 1) {
explode_num++;
var _local5 = attachMovie("expl", "expl" + explode_num, 35000 + explode_num);
explode_ar[explode_num] = _local5;
explode_ar[explode_num]._x = bulll._x;
explode_ar[explode_num]._y = bulll._y;
}
bulll.gotoAndPlay(2);
enem_count++;
enem_ar[_local3].speed = 0;
num_enemys--;
_root.scoreplus("point_p_20", enem_ar[_local3]);
score_num = score_num + 20;
score.text = score.text - -20;
enem_ar[_local3].gotoAndPlay(2);
fade_enem_ar[enem_count] = 0;
inter_enemy_aa2 = setInterval(fade_enemy, 40, enem_ar[_local3], enem_count);
count_ar[enem_count] = inter_enemy_aa2;
trace("count=" + count_ar[enem_count]);
bulll.speed = 0;
}
_local3++;
}
_local3 = 0;
while (_local3 < wall_ar.length) {
if (((((bulll._x > (wall_ar[_local3]._x - (wall_ar[_local3]._width / 2))) && (bulll._x < (wall_ar[_local3]._x + (wall_ar[_local3]._width / 2)))) && (bulll._y > (wall_ar[_local3]._y - (wall_ar[_local3]._height / 2)))) && (bulll._y < (wall_ar[_local3]._y + (wall_ar[_local3]._height / 2)))) && (bulll._currentframe == 1)) {
if (bulll.id == 1) {
explode_num++;
var _local5 = attachMovie("expl", "expl" + explode_num, 35000 + explode_num);
explode_ar[explode_num] = _local5;
explode_ar[explode_num]._x = bulll._x;
explode_ar[explode_num]._y = bulll._y;
}
bulll.gotoAndPlay(2);
wall_ar[_local3].hit == 16;
bulll.speed = 0;
}
_local3++;
}
_local3 = 0;
while (_local3 < addons_ar.length) {
if (((((((bulll._x > (addons_ar[_local3]._x - (addons_ar[_local3]._width / 2))) && (bulll._x < (addons_ar[_local3]._x + (addons_ar[_local3]._width / 2)))) && (bulll._y > (addons_ar[_local3]._y - (addons_ar[_local3]._height / 2)))) && (bulll._y < (addons_ar[_local3]._y + (addons_ar[_local3]._height / 2)))) && (bulll._currentframe == 1)) && (addons_ar[_local3]._currentframe == 1)) && (addons_ar[_local3].trans > 0)) {
addons_ar[_local3].trans--;
if (bulll.id == 1) {
addons_ar[_local3].trans = addons_ar[_local3].trans - 2;
explode_num++;
var _local5 = attachMovie("expl", "expl" + explode_num, 35000 + explode_num);
explode_ar[explode_num] = _local5;
explode_ar[explode_num]._x = bulll._x;
explode_ar[explode_num]._y = bulll._y;
}
bulll.gotoAndPlay(2);
wall_ar[_local3].hit == 16;
bulll.speed = 0;
}
_local3++;
}
}
function collet_ammo() {
var _local1 = 0;
while (_local1 < 180) {
if ((((ammo_ar_take[_local1]._x > (pac._x - (pac._width / 2))) && (ammo_ar_take[_local1]._x < (pac._x + (pac._width / 2)))) && (ammo_ar_take[_local1]._y > (pac._y - (pac._height / 2)))) && (ammo_ar_take[_local1]._y < (pac._y + (pac._height / 2)))) {
trace("t=" + _local1);
if (_local1 == 0) {
ammo = 10 + _local1;
}
if (_local1 == 1) {
ammo = 6 + _local1;
}
if (_local1 == 2) {
ammo = 4 + _local1;
}
if (_local1 == 3) {
ammo = 14 + _local1;
}
if (_local1 == 4) {
ammo = 6 + _local1;
}
if (_local1 == 5) {
ammo = 7 + _local1;
}
if (_local1 == 6) {
ammo = 8 + _local1;
}
if (_local1 == 7) {
ammo = 13 + _local1;
}
if (_local1 == 8) {
ammo = 10;
pac.greande = 2;
}
if (_local1 == 9) {
ammo = 15;
pac.greande = 1;
}
if (_local1 == 10) {
ammo = 12;
pac.greande = 1;
}
if (_local1 == 11) {
ammo = 3;
}
if (_local1 == 12) {
ammo = 4;
}
if (_local1 == 13) {
ammo = 18;
pac.greande = 1;
}
if (_local1 == 14) {
ammo = 14;
pac.greande = 1;
}
if (_local1 == 15) {
ammo = 7;
pac.greande = 2;
}
pac.hand = _local1 + 1;
trace(pac.hand);
ammo_ar_take[_local1]._x = 900;
ammo_ar_take[_local1]._y = 900;
}
_local1++;
}
}
var go33 = 1;
var explode_ar = new Array();
var explode_num = 0;
pac.greande = 0;
var greand_throw = 2;
pac.hand = 0;
var bull_move_ene2;
var pac_shoot_ar = new Array();
var pac_shoot_num = new Array();
var pac_shoot = new Array();
var ebullpac = 0;
var dx_ar_pac = new Array();
var yx_ar_pac = new Array();
var count_ar = new Array();
function timeof() {
sec1++;
clock.text = sec1;
if (sec1 >= 59) {
sec1 = 0;
min1++;
clock_min.text = min1;
}
if (sec1 == 1) {
addenemy("enemy_swat", 30, 70, 60, "en_glock", "ger_beret");
}
if ((sec1 == 20) && (num_enemys < 9)) {
addenemy_pos("enemy_swat", 10, 90, 90, "en_law_camo", "ger_swat", 284, 212);
addenemy_pos("enemy_swat", 60, 40, 80, "en_aug", "ger_swat", 284, 391);
}
if ((sec1 == 45) && (num_enemys < 9)) {
addenemy("enemy_apc", 12, 40, 80, "APC_MACHINE", "apc");
}
if ((sec1 == 30) && (num_enemys < 7)) {
addenemy("enemy_swat", 30, 80, 60, "en_mp5g", "ger_beret");
}
if ((((sec1 == 30) || (sec1 == 45)) || (sec1 == 10)) && (num_enemys < 6)) {
addenemy("enemyzz", 40, 70, 42, "en_shotgun", "german");
var _local1 = 0;
while (_local1 < addons_ar.length) {
addons_ar[_local1].greande = 1;
_local1++;
}
}
if (sec1 == 35) {
ammo_ar_take[16]._x = 500;
ammo_ar_take[16]._y = 212;
}
if (sec1 == 2) {
ammo_ar_take[13]._x = 350;
ammo_ar_take[13]._y = 212;
}
if ((sec1 == 40) && (min1 == 0)) {
ammo_ar_take[14]._x = 240;
ammo_ar_take[14]._y = 212;
}
if (sec1 == 25) {
ammo_ar_take[15]._x = 240;
ammo_ar_take[15]._y = 212;
}
}
function car_move() {
if (car.place == 5) {
car.place = 1;
addenemy_pos("enemy_swat", 10, 90, 90, "en_pk96", "kafia_iraq", 286, 344);
addenemy_pos("enemy_swat", 60, 40, 80, "en_ak47", "kafia_iraq", 325, 344);
}
}
function ball_move(bullet, numm2, rangeofammo, numB) {
bull_hit_pac(ball_shoot[numm2]);
bullspeed = ball_shoot[numm2].speed;
bullet._x = bullet._x + (dx_ar[numm2] * bullspeed);
bullet._y = bullet._y - (yx_ar[numm2] * bullspeed);
ball_shoot_num[numm2]++;
if (ball_shoot_num[numm2] >= rangeofammo) {
removeMovieClip(ball_shoot[numm2]);
clearInterval(ball_shoot_ar[numm2]);
ball_shoot_num[numm2] = 0;
}
}
function shoot_en_bul(gun, enemy, bullet, num1, num444, num5555) {
ebull++;
if (enemy.speed == 0) {
var _local3 = this.attachMovie(bullet, ("ball" + ebull) + 1, ebull + 50000);
ball_shoot[ebull] = _local3;
gun_rad = Math.atan2(gun.gun._y, gun.gun._x);
gun_deg = (gun_rad * 180) / Math.PI;
rotat = gun._rotation + ((gun_deg - 360) + 90);
dx = Math.sin((Math.PI/180) * rotat);
dy = Math.cos((Math.PI/180) * rotat);
gun_xscal = Math.abs(gun._xscale);
ball_shoot_num[ebull] = 0;
dx_ar[ebull] = dx;
yx_ar[ebull] = dy;
_local3._x = gun._x + (dx * (-gun.gun._y));
_local3._y = gun._y - (((dy * (-gun.gun._y)) * gun._xscale) / gun_xscal);
_local3._rotation = gun._rotation;
rotat = gun._rotation + ((gun_deg - 360) + 90);
dx = Math.sin((Math.PI/180) * (rotat + 5));
dy = Math.cos((Math.PI/180) * (rotat + 5));
dx_ar[ebull] = dx;
yx_ar[ebull] = dy;
if (gun.kindof == "hand_en") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "hand_en2") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_m16") {
_local3.speed = 6;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_m1") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_uzi") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 15, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_gal") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_ak47") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 17, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_bizon") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 19, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_pk96") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 18, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_rpg") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 19, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_glock") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 16, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_mp5hk") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 15, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_sa80") {
_local3.speed = 6;
bull_move_ene = setInterval(ball_move, 18, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_law") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 19, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_law_camo") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 17, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_mp5g") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 14, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_aug") {
_local3.speed = 6;
bull_move_ene = setInterval(ball_move, 17, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_shotgun") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 17, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "APC_MACHINE") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 17, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
}
}
function shoot_enema(zzz, eee, num) {
if ((zzz.speed == 0) && (enem_time_ar[num] == 2)) {
var _local4 = 0;
while (_local4 < addons_ar.length) {
if (((addons_ar[_local4].id == zzz.id) && (addons_ar[_local4].greande > 0)) && (addons_ar[_local4].kindof == "explode")) {
throw_greande_en(addons_ar[_local4]);
addons_ar[_local4].greande--;
}
_local4++;
}
}
if (((eee.kindof == "hand_en") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 10) {
eee.number = 0;
enemy_mp4.attachSound("gunshots_sm.wav");
enemy_mp4.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 20, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "hand_en2") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 6) {
eee.number = 0;
enemy_mp3.attachSound("GUN04_cop.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 30, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_m16") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 3) {
eee.number = 0;
enemy_mp3.attachSound("M16.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 70, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
zzz.ifstop = 1;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_m1") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 6) {
eee.number = 0;
enemy_mp3.attachSound("GUN04_cop.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 70, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_uzi") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 4) {
eee.gun.gotoAndPlay(2);
enemy_mp3.attachSound("uzi.wav");
enemy_mp3.start();
shoot_en_bul(eee, zzz, "ball2", 1, 20, num);
}
if (enem_time_ar[num] > 5) {
eee.number = 0;
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 20, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_gal") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 5) {
eee.number = 0;
enemy_mp3.attachSound("galil.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 36, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_ak47") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 3) {
eee.number = 0;
enemy_mp3.attachSound("ak47.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 38, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_bizon") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 3) {
eee.gun.gotoAndPlay(2);
enemy_mp3.attachSound("uzi.wav");
enemy_mp3.start();
shoot_en_bul(eee, zzz, "ball2", 1, 22, num);
}
if (enem_time_ar[num] > 4) {
eee.number = 0;
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 22, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_pk96") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 2) {
eee.gun.gotoAndPlay(2);
enemy_mp3.attachSound("pk96.wav");
enemy_mp3.start();
shoot_en_bul(eee, zzz, "ball2", 1, 34, num);
}
if (enem_time_ar[num] == 3) {
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 34, num);
}
if (enem_time_ar[num] > 4) {
eee.number = 0;
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 34, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_rpg") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 4) {
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "rpg_mis", 1, 100, num);
}
if (enem_time_ar[num] > 8) {
eee.number = 0;
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_glock") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 2) {
eee.number = 0;
enemy_mp3.attachSound("gunshots_sm.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 22, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_mp5hk") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 1) {
eee.gun.gotoAndPlay(2);
enemy_mp3.attachSound("mp5.wav");
enemy_mp3.start();
shoot_en_bul(eee, zzz, "ball3", 1, 26, num);
}
if (enem_time_ar[num] > 3) {
eee.number = 0;
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 26, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_sa80") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 3) {
eee.number = 0;
enemy_mp3.attachSound("M16.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 70, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
zzz.ifstop = 1;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_law") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 3) {
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "rpg_mis", 1, 130, num);
}
if (enem_time_ar[num] > 8) {
eee.number = 0;
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_mp5g") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 1) {
eee.gun.gotoAndPlay(2);
enemy_mp3.attachSound("mp5.wav");
enemy_mp3.start();
shoot_en_bul(eee, zzz, "ball3", 1, 28, num);
}
if (enem_time_ar[num] > 3) {
eee.number = 0;
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 28, num);
zzz.speed = 2.5;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_aug") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 3) {
eee.number = 0;
enemy_mp3.attachSound("aug.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 70, num);
zzz.speed = 2.5;
enem_time_ar[num] = 0;
eee.number = 0;
zzz.ifstop = 1;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_shotgun") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 3) {
eee.number = 0;
enemy_mp3.attachSound("shotgun.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "shot_ball", 1, 24, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
zzz.ifstop = 1;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_law_camo") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 3) {
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "rpg_mis", 1, 130, num);
}
if (enem_time_ar[num] > 6) {
eee.number = 0;
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "APC_MACHINE") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 3) {
eee.number = 0;
enemy_mp3.attachSound("aug.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 70, num);
zzz.speed = 3;
enem_time_ar[num] = 0;
eee.number = 0;
zzz.ifstop = 1;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
}
function shoot_enem(ttt, aaa) {
if (((((((ttt._x >= (pac._x - 10)) && (ttt._x <= (pac._x + 10))) && (ttt.speed >= 2)) && (ttt != null)) && (ttt._y >= (pac._y - aaa.range))) && (ttt._y <= (pac._y + aaa.range))) && (aaa != null)) {
if ((ttt._y <= pac._y) && (ttt.speed >= 2)) {
var _local2 = 0;
while (_local2 < wall_ar.length) {
if (((((((ttt._x < (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2))) && (ttt._x > (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (if_right == 0)) && (pac._x > (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (pac._x < (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2)))) && (ttt._y < (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (pac._y > (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2)))) {
ttt.ifstop = 1;
}
_local2++;
}
trace("donw");
if (ttt.ifstop == 1) {
ttt.ifstop = 0;
} else if (ttt.ifstop == 0) {
shoot_d++;
enem_time_ar[shoot_d] = 0;
ttt.speed = 0;
ttt.pos = "down";
aaa.number = 1;
clearInterval(aaa.interr);
inter_shoot = setInterval(shoot_enema, 120, ttt, aaa, shoot_d);
enem_aar[shoot_d] = inter_shoot;
aaa.interr = inter_shoot;
}
}
if ((ttt._y > pac._y) && (ttt.speed >= 2)) {
var _local2 = 0;
while (_local2 < wall_ar.length) {
if (((((((ttt._x < (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2))) && (ttt._x > (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (if_right == 0)) && (pac._x > (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (pac._x < (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2)))) && (ttt._y > (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2)))) && (pac._y < (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) {
ttt.ifstop = 1;
}
_local2++;
}
if (ttt.ifstop == 1) {
ttt.ifstop = 0;
} else if (ttt.ifstop == 0) {
shoot_d++;
enem_time_ar[shoot_d] = 0;
ttt.speed = 0;
ttt.pos = "up";
}
aaa.number = 1;
clearInterval(aaa.interr);
inter_shoot = setInterval(shoot_enema, 120, ttt, aaa, shoot_d);
enem_aar[shoot_d] = inter_shoot;
aaa.interr = inter_shoot;
}
} else if (((((((ttt._y >= (pac._y - 10)) && (ttt._y <= (pac._y + 10))) && (ttt.speed >= 2)) && (ttt != null)) && (ttt._x >= (pac._x - aaa.range))) && (ttt._x <= (pac._x + aaa.range))) && (aaa != null)) {
if ((ttt._x <= pac._x) && (ttt.speed >= 2)) {
var _local2 = 0;
while (_local2 < wall_ar.length) {
if (((((((ttt._y < (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2))) && (ttt._y > (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (if_right == 0)) && (pac._y > (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (pac._y < (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2)))) && (ttt._x < (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (pac._x > (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2)))) {
ttt.ifstop = 1;
}
_local2++;
}
if (ttt.ifstop == 1) {
ttt.ifstop = 0;
} else if (ttt.ifstop == 0) {
shoot_d++;
enem_time_ar[shoot_d] = 0;
ttt.speed = 0;
aaa.number = 1;
ttt.pos = "right";
clearInterval(aaa.interr);
inter_shoot = setInterval(shoot_enema, 120, ttt, aaa, shoot_d);
enem_aar[shoot_d] = inter_shoot;
aaa.interr = inter_shoot;
}
}
if ((ttt._x > pac._x) && (ttt.speed >= 2)) {
var _local2 = 0;
while (_local2 < wall_ar.length) {
if (((((((ttt._y < (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2))) && (ttt._y > (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (if_right == 0)) && (pac._y > (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (pac._y < (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2)))) && (ttt._x > (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2)))) && (pac._x < (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) {
trace("okL");
ttt.ifstop = 1;
}
_local2++;
}
if (ttt.ifstop == 1) {
ttt.ifstop = 0;
} else if (ttt.ifstop == 0) {
shoot_d++;
enem_time_ar[shoot_d] = 0;
ttt.speed = 0;
aaa.number = 1;
ttt.pos = "left";
clearInterval(aaa.interr);
inter_shoot = setInterval(shoot_enema, 120, ttt, aaa, shoot_d);
enem_aar[shoot_d] = inter_shoot;
aaa.interr = inter_shoot;
}
}
}
}
function throw_greande_en(enem) {
greande_num++;
var _local2 = attachMovie("greande", "greandee" + greande_num, 75500 + greande_num);
greande_ar[greande_num] = _local2;
trace(greande_ar[greande_num]);
greande_ar[greande_num]._x = enem._x;
greande_ar[greande_num]._y = enem._y;
greande_ar[greande_num]._rotation = enem._rotation;
greande_ar[greande_num]._xscale = enem._xscale;
trace(greande_ar[greande_num]._y);
}
function explode_greande() {
var _local1 = 0;
while (_local1 < greande_ar.length) {
if (greande_ar[_local1].count == 11) {
trace("boom");
greand_throw = 2;
rotat = greande_ar[_local1]._rotation;
dx = Math.sin((Math.PI/180) * rotat);
dy = Math.cos((Math.PI/180) * rotat);
explode_num++;
var _local2 = attachMovie("expl", "expl" + explode_num, 65000 + explode_num);
explode_ar[explode_num] = _local2;
explode_ar[explode_num]._x = greande_ar[_local1]._x + (dx * 220);
explode_ar[explode_num]._y = greande_ar[_local1]._y - (dy * 220);
removeMovieClip(greande_ar[_local1]);
}
_local1++;
}
}
clearInterval(time_in);
var time_in;
var sec1 = 0;
var min1 = 0;
var ebull = 0;
var ammo_ar_take = new Array();
ammo_ar_take[0] = gun_ammo;
ammo_ar_take[1] = m14_ammo;
ammo_ar_take[2] = m1_ammo;
ammo_ar_take[3] = uzi_ammo;
ammo_ar_take[4] = gal_ammo;
ammo_ar_take[5] = m16_ammo;
ammo_ar_take[6] = ak47_ammo;
ammo_ar_take[7] = bizon_ammo;
ammo_ar_take[8] = glock_ammo;
ammo_ar_take[9] = mp5hk_ammo;
ammo_ar_take[10] = sa80_ammo;
ammo_ar_take[11] = rpg_ammo;
ammo_ar_take[12] = law_ammo;
ammo_ar_take[13] = mp5g_ammo;
ammo_ar_take[14] = aug_ammo;
ammo_ar_take[15] = shotgun_ammo;
ammo_ar_take[16] = camo_law_ammo;
time_in = setInterval(timeof, 1000);
addenemy("enemy_apc", 12, 40, 80, "APC_MACHINE", "apc");
car._visible = 0;
var shoot_d = 0;
var inter_shoot_c = 0;
var inter_shoot;
var inter_shootb;
var enem_aar = new Array();
var enem_time_ar = new Array();
var ball_shoot = new Array();
var bull_move_ene;
var ball_shoot_ar = new Array();
var ball_shoot_num = new Array();
var dx_ar = new Array();
var yx_ar = new Array();
var enemy_mp4 = new Sound();
var enemy_mp3 = new Sound();
var if_right = 0;
var greande_num = 0;
var greande_ar = new Array();
Instance of Symbol 425 MovieClip [empty] "controller" in Frame 14
onClipEvent (enterFrame) {
_root.detectKeys();
_root.collectcoin();
_root.hand_where();
_root.explode_greande();
_root.exp_hit_pac();
_root.car_move();
updateAfterEvent();
}
Frame 15
ll = 0;
clearInterval(interhit);
stop();
var i = 0;
while (i < enem_ar.length) {
removeMovieClip(enem_ar[i]);
removeMovieClip(pac_graphic);
removeMovieClip(hand_en_ar[i]);
removeMovieClip(hand_pac);
removeMovieClip(addons_ar[i]);
removeMovieClip(places[i]);
removeMovieClip(explode_ar[i]);
i++;
}
var gonext4 = 0;
var i = 0;
while (i < 10000) {
clearInterval(i);
clearInterval(score_MC_AR_del[i]);
removeMovieClip(score_MC_AR[i]);
clearInterval(interhit);
clearInterval(enem_aar[i]);
clearInterval(bbb[i]);
clearInterval(ball_shoot_ar[i]);
removeMovieClip(ball_shoot[i]);
clearInterval(pac_shoot_ar);
removeMovieClip(pac_shoot[i]);
clearInterval(count_ar[i]);
fade_enem_ar[i] = 0;
removeMovieClip(ammo_ar_take[i]);
removeMovieClip(enem_add);
removeMovieClip(gun_add);
removeMovieClip(pac_weapon[i]);
clearInterval(time_in);
i++;
}
if (uover == 100) {
clearInterval(uover_in);
gotoAndPlay (6);
}
function goover() {
uover--;
}
function play44() {
gotoAndPlay (6);
}
var uover_in;
uover = 5;
uover_in = setInterval(goover, 1000);
function detectKeys() {
if (Key.isDown(32) && (_root.gonext4 == 4)) {
gotoAndStop (16);
}
}
Instance of Symbol 425 MovieClip [empty] "controller" in Frame 15
onClipEvent (enterFrame) {
_root.detectKeys();
}
Instance of Symbol 551 MovieClip "com" in Frame 15
on (press) {
getURL ("http://games.fs1.co.il", "_blank");
}
Frame 16
stop();
clearInterval(interhit);
HH = 1;
var i = 0;
while (i < enem_ar.length) {
removeMovieClip(enem_ar[i]);
removeMovieClip(pac_graphic);
removeMovieClip(hand_en_ar[i]);
removeMovieClip(hand_pac);
removeMovieClip(addons_ar[i]);
removeMovieClip(explode_ar[i]);
i++;
}
var i = 0;
while (i < 10000) {
clearInterval(i);
clearInterval(score_MC_AR_del[i]);
removeMovieClip(score_MC_AR[i]);
clearInterval(interhit);
clearInterval(enem_aar[i]);
clearInterval(bbb[i]);
clearInterval(ball_shoot_ar[i]);
removeMovieClip(ball_shoot[i]);
clearInterval(pac_shoot_ar);
removeMovieClip(pac_shoot[i]);
clearInterval(count_ar[i]);
fade_enem_ar[i] = 0;
removeMovieClip(ammo_ar_take[i]);
removeMovieClip(enem_add);
removeMovieClip(gun_add);
removeMovieClip(pac_weapon[i]);
clearInterval(time_in);
i++;
}
function alpha(ttt) {
var _local1 = 0;
while (_local1 < ttt.length) {
ttt[_local1]._visible = 0;
_local1++;
}
}
var ld_ar = new Array(d_l1, d_l2, d_l3, d_l4, d_l5, d_l6, d_l7, d_l8, d_l9, d_l10, d_l11);
ld_ar.dd = "d_l";
var rd_ar = new Array(d_r1, d_r2, d_r3, d_r4, d_r5, d_r6, d_r7, d_r8, d_r9, d_r10, d_r11);
rd_ar.dd = "d_r";
var ru_ar = new Array(u_r1, u_r2, u_r3, u_r4, u_r5, u_r6, u_r7, u_r8, u_r9, u_r10, u_r11);
ru_ar.dd = "u_r";
var lu_ar = new Array(u_l1, u_l2, u_l3, u_l4, u_l5, u_l6, u_l7, u_l8, u_l9, u_l10, u_l11);
lu_ar.dd = "u_l";
var places = new Array();
alpha(ld_ar);
alpha(rd_ar);
alpha(ru_ar);
alpha(lu_ar);
places[0] = monk_a0;
places[1] = monk_a1;
places[0]._x = 360;
places[0]._y = 330;
places[1]._x = 174;
places[1]._y = 330;
function guideof(ttt) {
var _local2 = 0;
while (_local2 < ttt.length) {
if (pac.hitTest(ttt[_local2]._x, ttt[_local2]._y, yes)) {
if (ttt.dd == "d_l") {
pac._x = pac._x - 4;
pac._y = pac._y + 4;
} else if (ttt.dd == "d_r") {
pac._x = pac._x + 4;
pac._y = pac._y + 4;
} else if (ttt.dd == "u_r") {
pac._x = pac._x + 4;
pac._y = pac._y - 4;
} else if (ttt.dd == "u_l") {
pac._x = pac._x - 4;
pac._y = pac._y - 4;
}
}
_local2++;
}
}
function pachit(aaa) {
if (life <= 0) {
score_num = score_num - 1000;
levelof = "level6";
gotoAndStop ("gameover");
}
life_mc.gotoAndStop(life);
if (pac.hit > 0) {
if (pac.caneat == 0) {
myTransform.ba = myTransform.ba - 5;
myTransform.ga = myTransform.ga - 5;
my_color.setTransform(myTransform);
}
pac.hit--;
} else if (pac.hit < 0) {
pac.hit = 0;
}
if (pac.hit == 0) {
if (myTransform.ba < 100) {
myTransform.ba = myTransform.ba + 5;
myTransform.ga = myTransform.ga + 5;
my_color.setTransform(myTransform);
}
}
updateAfterEvent();
if (pac.caneat > 0) {
aaa.speed = 0;
myTransform.ra = myTransform.ra - 5;
myTransform.ba = myTransform.ba - 5;
my_color.setTransform(myTransform);
pac.caneat--;
}
if (pac.caneat < 0) {
pac.caneat = 0;
}
if ((pac.caneat == 0) && (pac.hit == 0)) {
pac.hit == 0;
if (myTransform.ra < 100) {
myTransform.ra = 100;
myTransform.ba = 100;
myTransform.ga = 100;
my_color.setTransform(myTransform);
}
}
updateAfterEvent();
}
function movea() {
check1(pac);
if (pac._rotation == 90) {
pac._x = pac._x + speed_pac;
}
if (pac._rotation == -90) {
pac._x = pac._x - speed_pac;
}
if (pac._rotation == 180) {
pac._y = pac._y + speed_pac;
}
if (pac._rotation == 0) {
pac._y = pac._y - speed_pac;
}
tt++;
if (tt >= 4) {
tt = 0;
clearInterval(intermove_pac);
}
updateAfterEvent();
}
function detectKeys() {
collet_ammo();
ammo_txt.text = ammo;
greande_txt.text = pac.greande;
pac_graphic._x = pac._x;
pac_graphic._y = pac._y;
updateAfterEvent();
pacx.text = pac._x;
speed_pac = 5;
if (pac.hit > 8) {
speed_pac = 0;
}
if (Key.isDown(39) && (pac._x <= (760 - (pac._width / 2)))) {
clearInterval(intermove_pac);
check1(pac);
pac._x = pac._x + speed_pac;
pac._rotation = 90;
pac_graphic._rotation = 90;
if (pac_graphic._xscale == 100) {
pac_graphic._xscale = -pac_graphic._xscale;
}
if (pac_graphic._currentframe == "1") {
pac_graphic.nextFrame();
}
}
if (ammo == 0) {
pac.hand = 0;
}
if (Key.isDown(37) && (pac._x >= (0 + (pac._width / 2)))) {
clearInterval(intermove_pac);
check1(pac);
pac._x = pac._x - speed_pac;
if (pac_graphic._xscale == -100) {
pac_graphic._xscale = -pac_graphic._xscale;
}
pac_graphic._rotation = 270;
if (pac_graphic._currentframe == "1") {
pac_graphic.nextFrame();
}
}
if (Key.isDown(38) && (pac._y >= 70)) {
clearInterval(intermove_pac);
check1(pac);
pac._y = pac._y - speed_pac;
pac._rotation = 0;
pac_graphic._rotation = 0;
if (pac_graphic._xscale == -100) {
pac_graphic._xscale = -pac_graphic._xscale;
}
if (pac_graphic._currentframe == "1") {
pac_graphic.nextFrame();
}
}
if (Key.isDown(40) && (pac._y <= (500 - (pac._height / 2)))) {
clearInterval(intermove_pac);
check1(pac);
pac._rotation = 180;
pac._y = pac._y + speed_pac;
pac_graphic._rotation = 180;
if (pac_graphic._xscale == -100) {
pac_graphic._xscale = -pac_graphic._xscale;
}
if (pac_graphic._currentframe == "1") {
pac_graphic.nextFrame();
}
}
updateAfterEvent();
}
function check1(hit) {
var _local1 = 0;
while (_local1 < wall_ar.length) {
var _local5 = (wall_ar[_local1]._x - (wall_ar[_local1]._width / 2)) - 2;
var _local3 = (wall_ar[_local1]._x + (wall_ar[_local1]._width / 2)) + 2;
var _local4 = (wall_ar[_local1]._y - (wall_ar[_local1]._height / 2)) - 2;
var _local6 = (wall_ar[_local1]._y + (wall_ar[_local1]._height / 2)) + 2;
if (((hit._x >= _local5) && (hit._x <= _local3)) && ((hit._y <= _local6) && (hit._y >= _local4))) {
if (Key.isDown(38) && ((hit._y - (hit._height / 2)) >= (wall_ar[_local1]._y - 3))) {
guideof(ld_ar);
guideof(rd_ar);
guideof(ru_ar);
guideof(lu_ar);
speed_pac = 0;
trace("we cant up");
}
if (Key.isDown(40) && ((hit._y + (hit._height / 2)) <= (wall_ar[_local1]._y + 3))) {
guideof(ld_ar);
guideof(rd_ar);
guideof(ru_ar);
guideof(lu_ar);
speed_pac = 0;
trace("we cant down");
}
if (Key.isDown(39) && ((hit._x + (hit._width / 2)) <= (wall_ar[_local1]._x + 3))) {
guideof(ld_ar);
guideof(rd_ar);
guideof(ru_ar);
guideof(lu_ar);
speed_pac = 0;
trace("we cant right");
}
if (Key.isDown(37) && ((hit._x - (hit._width / 2)) >= (wall_ar[_local1]._x - 3))) {
guideof(ld_ar);
guideof(rd_ar);
guideof(ru_ar);
guideof(lu_ar);
speed_pac = 0;
trace("we cant left");
}
}
_local1++;
}
}
var pac_graphic1 = attachMovie("pacman_graphic2", "pac_graphic", 1);
var pac_graphic1 = attachMovie("hand_pac", "hand_pac", 1002);
var pac_graphic1 = attachMovie("m14_pac", "m14_pac", 1003);
var pac_graphic1 = attachMovie("m1_pac", "m1_pac", 1004);
var pac_graphic1 = attachMovie("uzi_pac", "uzi_pac", 1005);
var pac_graphic1 = attachMovie("gal_pac", "gal_pac", 1006);
var pac_graphic1 = attachMovie("m16_pac", "m16_pac", 1007);
var pac_graphic1 = attachMovie("ak47_pac", "ak47_pac", 1008);
var pac_graphic1 = attachMovie("bizon_pac", "bizon_pac", 1009);
var pac_graphic1 = attachMovie("glock_pac", "glock_pac", 1010);
var pac_graphic1 = attachMovie("mp5hk_pac ", "mp5hk_pac", 1011);
var pac_graphic1 = attachMovie("sa80_pac ", "sa80_pac", 1012);
var pac_graphic1 = attachMovie("rpg_pac", "rpg_pac", 1013);
var pac_graphic1 = attachMovie("law_pac", "law_pac", 1014);
pac_graphic._x = pac._x;
pac_graphic._y = pac._y;
pac._visible = 0;
pac.hit = "0";
pac.caneat = "0";
var interhit;
var tt = 0;
var my_color = new Color(_root.pac_graphic);
var myTransform = my_color.getTransform();
var ammo = 0;
var pac_weapon = new Array();
pac_weapon[0] = hand_pac;
pac_weapon[1] = m14_pac;
pac_weapon[2] = m1_pac;
pac_weapon[3] = uzi_pac;
pac_weapon[4] = gal_pac;
pac_weapon[5] = m16_pac;
pac_weapon[6] = ak47_pac;
pac_weapon[7] = bizon_pac;
pac_weapon[8] = glock_pac;
pac_weapon[9] = mp5hk_pac;
pac_weapon[10] = sa80_pac;
pac_weapon[11] = rpg_pac;
pac_weapon[12] = law_pac;
interhit = setInterval(pachit, 50);
pac_graphic._currentframe = 1;
var oKey = new Object();
var wall_ar = new Array(wall1, wall2, wall3, wall4, wall5, wall6, wall7, wall8, wall9, wall10, wall11, wall12, wall13, wall14, wall15, wall16, wall17, wall18, wall19, wall20, wall21, wall22, wall23);
var speed_pac = 3;
pac_graphic._xscale = 100;
Key.addListener(oKey);
var a = 0;
function collectcoin() {
if (end >= 60) {
score_num = score_num - ((sec1 * min1) * 5);
HH = 0;
score_num = score_num - ((10 - life) * 50);
gotoAndStop ("level7");
end = 0;
trace("end");
}
backu(backs_u_ar, pac);
backu(backs_l_ar, pac);
backu(backs_d_ar, pac);
backu(backs_r_ar, pac);
var _local1 = 0;
while (_local1 < gold_ar.length) {
if (pac.hitTest(gold_ar[_local1]._x, gold_ar[_local1]._y, yes)) {
pac_graphic.gotoAndPlay("eat");
scoreplus("point_p_10", gold_ar[_local1]);
gold_ar[_local1]._x = 800;
gold_ar[_local1]._y = 1000;
removeMovieClip(gold_ar[_local1]);
my_sound.attachSound("blip.mp3");
my_sound.start();
score_num = score_num + 10;
score.text = score_num;
end++;
}
_local1++;
}
_local1 = 0;
while (_local1 < gold_big_ar.length) {
if (pac.hitTest(gold_big_ar[_local1]._x, gold_big_ar[_local1]._y, yes)) {
pac.caneat = 80;
pac_graphic.gotoAndPlay("eat");
scoreplus("point_p_10", gold_big_ar[_local1]);
gold_big_ar[_local1]._x = 800;
gold_big_ar[_local1]._y = 1000;
removeMovieClip(gold_ar[_local1]);
my_sound.attachSound("blip.mp3");
my_sound.start();
score_num = score_num + 10;
score.text = score_num;
}
_local1++;
}
}
function backu(ttt, sss) {
var _local3 = 0;
while (_local3 < 15) {
if (sss.hitTest(ttt[_local3])) {
if (ttt.info == "up") {
sss._y = 480;
} else if (ttt.info == "left") {
sss._x = 730;
} else if (ttt.info == "down") {
sss._y = 90;
} else if (ttt.info == "right") {
sss._x = 20;
}
}
_local3++;
}
}
function scoreplus(sss, aaa) {
clearinterval(noscore);
s_score = "point_p_10" + scoree;
var _local1 = attachMovie(sss, s_score, scoree + 200000);
scoree++;
_local1._x = aaa._x;
_local1._y = aaa._y;
score_MC_AR[scoree] = _local1;
noscore = setInterval(score_fade, 20, score_MC_AR[scoree]);
score_MC_AR_del[scoree] = noscore;
}
function score_fade(bbb) {
bbb._y = bbb._y - 3;
bbb._alpha = bbb._alpha - 5;
if (bbb._alpha <= 10) {
clearInterval(score_MC_AR[bbb]);
}
}
var gold_ar = new Array(gold, gold1, gold2, gold3, gold4, gold5, gold6, gold7, gold8, gold9, gold10, gold11, gold12, gold13, gold14, gold15, gold16, gold17, gold18, gold19, gold20, gold21, gold22, gold23, gold24, gold25, gold26, gold27, gold28, gold29, gold30, gold31, gold32, gold33, gold34, gold35, gold36, gold37, gold38, gold39, gold40, gold41, gold42, gold43, gold44, gold45, gold46, gold47, gold48, gold49, gold50, gold51, gold52, gold53, gold54, gold55, gold56, gold57, gold58, gold59, gold60, gold61, gold62, gold63, gold64, gold65, gold66, gold67, gold68, gold69, gold70, gold71, gold72, gold73, gold74, gold75, gold76, gold77, gold78, gold79, gold80, gold81, gold82, gold83, gold84, gold85, gold86, gold87, gold88, gold89, gold90, gold91, gold92, gold93, gold94, gold95, gold96, gold97, gold98, gold99);
var gold_big_ar = new Array(gold_big1, gold_big2, gold_big3, gold_big4);
var my_sound = new Sound();
var backs_u_ar = new Array(u_back, u_back1, u_back2);
backs_u_ar.info = "up";
var backs_l_ar = new Array(l_back, l_back1, l_back2);
backs_l_ar.info = "left";
var backs_d_ar = new Array(d_back, d_back1, d_back2);
backs_d_ar.info = "down";
var backs_r_ar = new Array(r_back, r_back1, r_back2);
backs_r_ar.info = "right";
var allback = new Array(backs_u_ar, backs_l_ar, backs_r_ar, backs_d_ar);
var i = 0;
while (i < 30) {
var j = 0;
while (j < 10) {
allback[i][j]._visible = 0;
c_guide_ar[j]._visible = 0;
j++;
}
i++;
}
var end = 0;
var oKey1 = new Object();
Key.addListener(oKey1);
var scoree = 0;
var noscore;
var score_MC_AR_del = new Array();
var score_MC_AR = new Array();
function enem_move(ttt, gun, add1) {
if (ttt != undefined) {
exp_hit_enem(ttt);
shoot_enem(ttt, gun);
check_hit_pac(ttt);
check2(ttt);
backu1(backs_u_ar, ttt);
backu1(backs_l_ar, ttt);
backu1(backs_d_ar, ttt);
backu1(backs_r_ar, ttt);
}
if (ttt.pos == "left") {
ttt._x = ttt._x - ttt.speed;
ttt._rotation = 270;
if ((ttt._xscale <= -90) && (ttt._currentframe == 1)) {
ttt._xscale = -ttt._xscale;
}
}
if (ttt.pos == "right") {
ttt._x = ttt._x + ttt.speed;
ttt._rotation = 90;
if ((ttt._xscale >= 90) && (ttt._currentframe == 1)) {
ttt._xscale = -ttt._xscale;
}
}
if (ttt.pos == "up") {
ttt._y = ttt._y - ttt.speed;
ttt._rotation = 0;
if ((ttt._xscale <= -90) && (ttt._currentframe == 1)) {
ttt._xscale = -ttt._xscale;
}
}
if (ttt.pos == "down") {
ttt._y = ttt._y + ttt.speed;
ttt._rotation = 180;
if ((ttt._xscale <= -90) && (ttt._currentframe == 1)) {
ttt._xscale = -ttt._xscale;
}
}
if (ttt.pos == "mixed") {
var _local6 = ttt._rotation + 10;
dx = Math.cos((Math.PI/180) * _local6);
dy = Math.sin((Math.PI/180) * _local6);
ttt._x = ttt._x + (dx * ttt.speed);
ttt._y = ttt._y + (dy * ttt.speed);
}
gun._x = ttt._x;
gun._y = ttt._y;
gun._rotation = ttt._rotation;
gun._xscale = ttt._xscale;
add1._x = ttt._x;
add1._y = ttt._y;
add1._rotation = ttt._rotation;
add1._xscale = ttt._xscale;
var _local2 = 0;
while (_local2 < c_guide_ar.length) {
if ((((((ttt._x >= (c_guide_ar[_local2]._x - 5)) && (ttt._x <= (c_guide_ar[_local2]._x + 5))) && (ttt._y >= (c_guide_ar[_local2]._y - 5))) && (ttt._y <= (c_guide_ar[_local2]._y + 5))) && (ttt.a >= 6)) && (ttt.hitTest(c_guide_ar[_local2]))) {
ttt.a = 0;
if ((ttt._x >= (pac._x - 4)) && (ttt._x <= (pac._x + 4))) {
if (ttt._y <= pac._y) {
ttt.pos = "down";
}
if (ttt._y > pac._y) {
ttt.pos = "up";
}
} else if ((ttt._y >= (pac._y - 4)) && (ttt._y <= (pac._y + 4))) {
if (ttt._x <= pac._x) {
ttt.pos = "right";
}
if (ttt._x > pac._x) {
ttt.pos = "left";
}
} else {
var _local3 = random(4);
switch (_local3) {
case 0 :
ttt.pos = "down";
ttt.a = "0";
ttt._y = ttt._y + 3;
break;
case 1 :
ttt.pos = "up";
ttt.a = "0";
ttt._y = ttt._y - 3;
break;
case 2 :
ttt.pos = "right";
ttt.a = "0";
ttt._x = ttt._x + 3;
break;
case 3 :
ttt.pos = "left";
ttt.a = "0";
ttt._x = ttt._x - 3;
}
}
} else if (ttt.hitTest(c_guide_ar[_local2]) == false) {
ttt.a = ttt.a + 1;
}
_local2++;
}
updateAfterEvent();
}
function backu1(ttt, sss) {
var _local3 = 0;
while (_local3 < 15) {
if (sss.hitTest(ttt[_local3])) {
if (ttt.info == "up") {
sss._y = 480;
} else if (ttt.info == "left") {
sss._x = 730;
} else if (ttt.info == "down") {
sss._y = 90;
} else if (ttt.info == "right") {
sss._x = 20;
}
}
_local3++;
}
}
function check2(hit) {
var _local3 = 0;
while (_local3 < wall_ar.length) {
var _local6 = (wall_ar[_local3]._x - (wall_ar[_local3]._width / 2)) - 2;
var _local4 = (wall_ar[_local3]._x + (wall_ar[_local3]._width / 2)) + 2;
var _local5 = (wall_ar[_local3]._y - (wall_ar[_local3]._height / 2)) - 2;
var _local7 = (wall_ar[_local3]._y + (wall_ar[_local3]._height / 2)) + 2;
if ((((hit._x + (hit._width / 2)) >= _local6) && ((hit._x - (hit._width / 2)) <= _local4)) && ((((hit._y - (hit._height / 2)) <= _local7) && ((hit._y + (hit._height / 2)) >= _local5)) && (hit._currentframe == 1))) {
var _local2 = random(2);
if ((hit.pos == "left") && (hit.wall >= 1)) {
hit._x = hit._x + 4;
if (_local2 == 0) {
hit.pos = "right";
} else if (_local2 == 1) {
hit.pos = "up";
} else if (_local2 == 2) {
hit.pos = "down";
}
hit.wall = 0;
} else if ((hit.pos == "right") && (hit.wall >= 1)) {
hit._x = hit._x - 4;
if (_local2 == 0) {
hit.pos = "left";
} else if (_local2 == 1) {
hit.pos = "up";
} else if (_local2 == 2) {
hit.pos = "down";
}
hit.wall = 0;
} else if ((hit.pos == "up") && (hit.wall >= 1)) {
hit._y = hit._y + 4;
if (_local2 == 0) {
hit.pos = "right";
} else if (_local2 == 1) {
hit.pos = "down";
} else if (_local2 == 2) {
hit.pos = "left";
}
hit.wall = 0;
} else if ((hit.pos == "down") && (hit.wall >= 1)) {
hit._y = hit._y - 4;
if (_local2 == 0) {
hit.pos = "right";
} else if (_local2 == 2) {
hit.pos = "left";
} else if (_local2 == 2) {
hit.pos = "up";
}
hit.wall = 0;
}
} else if (hit.wall == 0) {
hit.wall = hit.wall + 1;
}
_local3++;
}
}
function fade_enemy(aaa, count) {
if (aaa._currentframe != 1) {
fade_enem_ar[count]++;
if ((fade_enem_ar[count] >= 10) && ((sec1 > 1) || (min1 > 1))) {
aaa._y = 1000;
aaa._x = 1000;
clearInterval(bbb[aaa.id]);
removeMovieClip(aaa);
fade_enem_ar[count] = 0;
clearInterval(count_ar[count]);
}
}
}
function check_hit_pac(hit) {
var _local6 = (pac._x - (pac._width / 2)) - 4;
var _local4 = (pac._x + (pac._width / 2)) + 4;
var _local5 = (pac._y - (pac._height / 2)) - 4;
var _local7 = (pac._y + (pac._height / 2)) + 4;
if (((((hit._x + (hit._width / 2)) >= _local6) && ((hit._x - (hit._width / 2)) <= _local4)) && (((hit._y - (hit._height / 2)) <= _local7) && ((hit._y + (hit._height / 2)) >= _local5))) && (pac.caneat <= 0)) {
if (((hit.pos == "left") && (hit.pac >= 1)) && (hit._currentframe == 1)) {
hit._x = hit._x + 4;
hit.pos = "right";
hit.pac = 0;
if (pac.hit == 0) {
pac.hit = 16;
if (pac.caneat <= 0) {
life--;
}
}
}
if (((hit.pos == "right") && (hit.pac >= 1)) && (hit._currentframe == 1)) {
hit._x = hit._x - 4;
hit.pos = "left";
hit.pac = 0;
if (pac.hit == 0) {
pac.hit = 16;
life--;
if (pac.caneat == 0) {
life--;
}
}
}
if (((hit.pos == "up") && (hit.pac >= 1)) && (hit._currentframe == 1)) {
hit._y = hit._y + 4;
hit.pos = "down";
hit.pac = 0;
if (pac.hit == 0) {
pac.hit = 16;
life--;
if (pac.caneat == 0) {
life--;
}
}
}
if (((hit.pos == "down") && (hit.pac >= 1)) && (hit._currentframe == 1)) {
hit._y = hit._y - 4;
hit.pos = "up";
hit.pac = 0;
if (pac.hit == 0) {
pac.hit = 16;
life--;
if (pac.caneat == 0) {
life--;
}
}
} else if (hit.hitTest(pac) == false) {
hit.pac = hit.pac + 1;
}
}
if (((((hit._x + (hit._width / 2)) >= _local6) && ((hit._x - (hit._width / 2)) <= _local4)) && (((hit._y - (hit._height / 2)) <= _local7) && ((hit._y + (hit._height / 2)) >= _local5))) && (pac.caneat > 0)) {
if (pac.caneat > 0) {
if ((aeee <= 0) && (hit._currentframe == 1)) {
var _local3 = 0;
while (_local3 < hand_en_ar.length) {
if (hand_en_ar[_local3].id == hit.id) {
hand_en_ar[_local3].gotoAndPlay(2);
}
if (addons_ar[_local3].id == hit.id) {
addons_ar[_local3].gotoAndPlay(2);
}
_local3++;
}
hit.speed = 0;
hit.gotoAndPlay(2);
num_enemys--;
_root.scoreplus("point_p_20", hit);
score_num = score_num + 20;
score.text = score.text - -20;
enem_count++;
trace("enem_count=" + enem_count);
fade_enem_ar[enem_count] = 0;
inter_enemy_aa = setInterval(fade_enemy, 40, hit, enem_count);
}
count_ar[enem_count] = inter_enemy_aa;
}
}
}
function exp_hit_enem(eneme) {
var _local4 = 0;
while (_local4 < explode_ar.length) {
if (((((((eneme._x > (explode_ar[_local4]._x - (explode_ar[_local4]._width / 2))) && (eneme._x < (explode_ar[_local4]._x + (explode_ar[_local4]._width / 2)))) && (eneme._y > (explode_ar[_local4]._y - (explode_ar[_local4]._height / 2)))) && (eneme._y < (explode_ar[_local4]._y + (explode_ar[_local4]._height / 2)))) && (eneme._currentframe == 1)) && (explode_ar[_local4].hit <= 0)) && (eneme._currentframe == 1)) {
explode_ar[_local4].id = 0;
enem_count++;
eneme.speed = 0;
num_enemys--;
_root.scoreplus("point_p_20", eneme);
score_num = score_num + 20;
score.text = score.text - -20;
var _local2 = 0;
while (_local2 < hand_en_ar.length) {
if (hand_en_ar[_local2].id == eneme.id) {
hand_en_ar[_local2].gotoAndPlay(2);
removeMovieClip(hand_en_ar[_local2]);
}
_local2++;
}
_local2 = 0;
while (_local2 < addons_ar.length) {
if (addons_ar[_local2].id == eneme.id) {
addons_ar[_local2].gotoAndPlay(2);
removeMovieClip(addons_ar[_local2]);
}
_local2++;
}
eneme.gotoAndPlay(2);
fade_enem_ar[enem_count] = 0;
inter_enemy_aa2 = setInterval(fade_enemy, 40, eneme, enem_count);
count_ar[enem_count] = inter_enemy_aa2;
trace("count=" + count_ar[enem_count]);
}
_local4++;
}
}
function addenemy(enem_mca, rax, gax, bax, gun, addon) {
var _local2 = enem_ar.length;
trace(_local2);
var _local3 = this.attachMovie(enem_mca, ("enemy" + _local2) + 1, _local2 + 10000);
var _local5 = this.attachMovie(gun, ("hand_en" + _local2) + 1, (_local2 + 10000) + 6000);
var _local4 = this.attachMovie(addon, ("addon_" + _local2) + 1, (_local2 + 10000) + 3000);
var _local6 = random(500) + 100;
_local3._x = _local6;
_local3._y = 204;
_local5._x = _local6;
_local5._y = 204;
_local4._x = _local6;
_local4._y = 204;
_local3._currentframe = 1;
_local5._currentframe = 1;
_local4._currentframe = 1;
var _local10 = new Color(_local3.color4);
var _local9 = new Color(_local3.body);
var _local7 = {ra:rax, ga:gax, ba:bax, aa:100};
_local10.setTransform(_local7);
_local9.setTransform(_local7);
enem_ar[_local2] = _local3;
hand_en_ar[_local2] = _local5;
addons_ar[_local2] = _local4;
enem_ar[_local2].id = _local2;
hand_en_ar[_local2].id = _local2;
addons_ar[_local2].id = _local2;
hand_en_ar[_local2].kindof = gun;
enem_ar[_local2].a = "6";
enem_ar[_local2].wall = "5";
enem_ar[_local2].pac = "0";
enem_ar[_local2].ifstop = "0";
num_enemys++;
enem_ar[_local2].pos = "left";
enem_ar[_local2].speed = 2;
inter_en = setInterval(enem_move, 9, enem_ar[_local2], hand_en_ar[_local2], addons_ar[_local2]);
var _local8 = inter_en;
bbb[_local2] = _local8;
}
function addenemy_pos(enem_mca, rax, gax, bax, gun, addon, tx, ty) {
var _local2 = enem_ar.length;
trace(_local2);
var _local3 = this.attachMovie(enem_mca, ("enemy" + _local2) + 1, _local2 + 10000);
var _local5 = this.attachMovie(gun, ("hand_en" + _local2) + 1, (_local2 + 10000) + 6000);
var _local4 = this.attachMovie(addon, ("addon_" + _local2) + 1, (_local2 + 10000) + 3000);
var _local12 = random(400) + 100;
_local3._x = tx;
_local3._y = ty;
_local5._x = tx;
_local5._y = ty;
_local4._x = tx;
_local4._y = ty;
_local3._currentframe = 1;
_local5._currentframe = 1;
_local4._currentframe = 1;
var _local11 = new Color(_local3.color4);
var _local10 = new Color(_local3.body);
var _local6 = {ra:rax, ga:gax, ba:bax, aa:100};
_local11.setTransform(_local6);
_local10.setTransform(_local6);
enem_ar[_local2] = _local3;
hand_en_ar[_local2] = _local5;
addons_ar[_local2] = _local4;
enem_ar[_local2].id = _local2;
hand_en_ar[_local2].id = _local2;
addons_ar[_local2].id = _local2;
hand_en_ar[_local2].kindof = gun;
enem_ar[_local2].a = "6";
enem_ar[_local2].wall = "5";
enem_ar[_local2].pac = "0";
enem_ar[_local2].ifstop = "0";
num_enemys++;
enem_ar[_local2].pos = "left";
enem_ar[_local2].speed = 2;
inter_en = setInterval(enem_move, 9, enem_ar[_local2], hand_en_ar[_local2], addons_ar[_local2]);
var _local7 = inter_en;
bbb[_local2] = _local7;
}
var i = 0;
while (i < enem_ar.length) {
clearInterval(bbb[i]);
enem_ar[i].id.tt = 0;
i++;
}
var enem_count = 0;
var num_enemys = 4;
life = 10;
var inter_en;
var enem_ar = new Array(enemy1, enemy3);
var hand_en_ar = new Array(hand_en1);
var addons_ar = new Array();
enem_ar[0].a = "6";
enem_ar[0].wall = "5";
enem_ar[0].ifstop = "0";
enem_ar[0].pac = "0";
enem_ar[0].id = "0";
hand_en_ar[0].id = "0";
hand_en_ar[0].kindof = "hand_en2";
enem_ar[1].a = "6";
enem_ar[1].wall = "5";
enem_ar[1].pac = "0";
enem_ar[1].id = "1";
enem_ar[1].ifstop = "0";
enem_ar[2].a = "6";
enem_ar[2].wall = "5";
enem_ar[2].pac = "0";
enem_ar[2].id = "2";
enem_ar[2].ifstop = "0";
var c_guide_ar = new Array(c_guide1, c_guide2, c_guide3, c_guide4, c_guide5, c_guide6, c_guide7, c_guide8, c_guide9, c_guide10, c_guide11, c_guide12, c_guide13, c_guide14);
var i = 0;
while (i < 30) {
c_guide_ar[i]._visible = 0;
i++;
}
enem_ar[0].pos = "left";
enem_ar[0].speed = 2;
enem_ar[1].pos = "right";
enem_ar[1].speed = 2;
enem_ar[2].pos = "right";
enem_ar[2].speed = 2;
var inter_en;
var bbb = new Array();
var i = 0;
while (i < enem_ar.length) {
inter_en = setInterval(enem_move, 20, enem_ar[i], hand_en_ar[i]);
var ttt = inter_en;
bbb[i] = ttt;
i++;
}
var inter_enemy_aa;
var fade_enem_ar = new Array();
var aeee = 0;
clearInterval(inter_mmm);
var pac_mp3 = new Sound();
var wall_mp3 = new Sound();
var inter_mmm;
inter_mmm = setInterval(movenemyss, 1000);
function exp_hit_pac() {
var _local1 = 0;
while (_local1 < explode_ar.length) {
if ((((((pac._x > (explode_ar[_local1]._x - (explode_ar[_local1]._width / 2))) && (pac._x < (explode_ar[_local1]._x + (explode_ar[_local1]._width / 2)))) && (pac._y > (explode_ar[_local1]._y - (explode_ar[_local1]._height / 2)))) && (pac._y < (explode_ar[_local1]._y + (explode_ar[_local1]._height / 2)))) && (pac.hit <= 0)) && (pac.caneat == 0)) {
life--;
life--;
pac.hit = 25;
}
_local1++;
}
}
function bull_hit_pac(bulll) {
if ((((((((bulll._x + (bulll._width / 2)) > ((pac._x - (pac._width / 2)) + 5)) && ((bulll._x - (bulll._width / 2)) < ((pac._x + (pac._width / 2)) - 5))) && ((bulll._y + (bulll._height / 2)) > ((pac._y - (pac._height / 2)) + 5))) && ((bulll._y - (bulll._height / 2)) < ((pac._y + (pac._height / 2)) - 5))) && (bulll._currentframe == 1)) && (pac.hit <= 0)) && (pac.caneat == 0)) {
life--;
if (bulll.id == 1) {
explode_num++;
var _local3 = attachMovie("expl", "expl" + explode_num, 65000 + explode_num);
explode_ar[explode_num] = _local3;
explode_ar[explode_num]._x = bulll._x;
explode_ar[explode_num]._y = bulll._y;
}
bulll.gotoAndPlay(2);
pac.hit = 16;
bulll.speed = 0;
}
var _local1 = 0;
while (_local1 < wall_ar.length) {
if (((((bulll._x > (wall_ar[_local1]._x - (wall_ar[_local1]._width / 2))) && (bulll._x < (wall_ar[_local1]._x + (wall_ar[_local1]._width / 2)))) && (bulll._y > (wall_ar[_local1]._y - (wall_ar[_local1]._height / 2)))) && (bulll._y < (wall_ar[_local1]._y + (wall_ar[_local1]._height / 2)))) && (bulll._currentframe == 1)) {
if (bulll.id == 1) {
explode_num++;
var _local3 = attachMovie("expl", "expl" + explode_num, 65000 + explode_num);
explode_ar[explode_num] = _local3;
explode_ar[explode_num]._x = bulll._x;
explode_ar[explode_num]._y = bulll._y;
}
bulll.gotoAndPlay(2);
wall_ar[_local1].hit == 16;
bulll.speed = 0;
}
_local1++;
}
}
function hand_where() {
if (pac.hand == 0) {
var _local2 = 0;
while (_local2 < pac_weapon.length) {
pac_weapon[_local2]._x = 1000;
pac_weapon[_local2]._y = 1000;
_local2++;
}
}
var _local1 = 0;
while (_local1 < 200) {
if (pac.hand == _local1) {
pac_weapon[_local1 - 1]._x = pac._x;
pac_weapon[_local1 - 1]._y = pac._y;
pac_weapon[_local1 - 1]._rotation = pac_graphic._rotation;
pac_weapon[_local1 - 1]._xscale = pac_graphic._xscale;
}
_local1++;
}
_local1 = 0;
while (_local1 < 200) {
if (pac.hand != _local1) {
pac_weapon[_local1 - 1]._x = 1000;
pac_weapon[_local1 - 1]._Y = 1000;
}
_local1++;
}
if ((Key.isDown(17) && (pac.greande > 0)) && (greand_throw == 2)) {
throw_greande_en(pac_graphic);
greand_throw = 0;
pac.greande--;
}
if ((Key.isDown(32) && (go33 >= 1)) && (ammo > 0)) {
ammo--;
if (pac_weapon[pac.hand - 1] == pac_weapon[0]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 2;
enemy_mp4.attachSound("gunshots_sm.wav");
enemy_mp4.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[1]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 2;
enemy_mp3.attachSound("GUN04_cop.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[2]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 1;
enemy_mp3.attachSound("GUN04_cop.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[3]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 1;
enemy_mp3.attachSound("uzi.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[4]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 1;
enemy_mp3.attachSound("galil.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[5]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("M16.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[6]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("ak47.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[7]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 1;
enemy_mp3.attachSound("uzi.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[8]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 1;
enemy_mp3.attachSound("gunshots_sm.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[9]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("mp5.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[10]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("m16.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[11]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "rpg_mis");
go33 = go33 - 1;
}
if (pac_weapon[pac.hand - 1] == pac_weapon[12]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "rpg_mis");
go33 = go33 - 1;
}
}
}
function shoot_en_bul2(gun, bullet) {
ebullpac++;
gun.gun.gotoAndPlay(2);
var _local3 = this.attachMovie(bullet, ("ball_pac" + ebullpac) + 1, ebullpac + 150000);
pac_shoot[ebullpac] = _local3;
gun_rad = Math.atan2(gun.gun._y, gun.gun._x);
gun_deg = (gun_rad * 180) / Math.PI;
rotat = gun._rotation + ((gun_deg - 360) + 90);
dx = Math.sin((Math.PI/180) * rotat);
dy = Math.cos((Math.PI/180) * rotat);
gun_xscal = Math.abs(gun._xscale);
_local3._rotation = gun._rotation;
pac_shoot_num[ebullpac] = 0;
dx_ar_pac[ebullpac] = dx;
yx_ar_pac[ebullpac] = dy;
_local3._x = gun._x + (dx * (-gun.gun._y));
_local3._y = gun._y - (((dy * (-gun.gun._y)) * gun._xscale) / gun_xscal);
dx = Math.sin((Math.PI/180) * (rotat + 6));
dy = Math.cos((Math.PI/180) * (rotat + 6));
dx_ar_pac[ebullpac] = dx;
yx_ar_pac[ebullpac] = dy;
if (((bullet == "ball2") || (bullet == "missle")) || (bullet == "rpg_mis")) {
_local3.speed = 5;
bull_move_ene2 = setInterval(ball_move2, 20, pac_shoot[ebullpac], ebullpac, gun.range, gun);
pac_shoot_ar[ebullpac] = bull_move_ene2;
}
if (bullet == "ball3") {
_local3.speed = 5;
bull_move_ene2 = setInterval(ball_move2, 16, pac_shoot[ebullpac], ebullpac, gun.range, gun);
pac_shoot_ar[ebullpac] = bull_move_ene2;
}
}
function ball_move2(bullet, numm24, rangeofammo2, ffgun) {
bull_hit_enem(pac_shoot[numm24]);
bullspeed1 = pac_shoot[numm24].speed;
bullet._x = bullet._x + (dx_ar_pac[numm24] * bullspeed1);
bullet._y = bullet._y - (yx_ar_pac[numm24] * bullspeed1);
pac_shoot_num[numm24]++;
if ((pac_shoot_num[numm24] == (rangeofammo2 / 2)) && (ffgun.rate1 == "semi")) {
go33 = 1;
}
if ((pac_shoot_num[numm24] == (rangeofammo2 / 4)) && (ffgun.rate1 == "auto")) {
go33 = 1;
}
if ((pac_shoot_num[numm24] >= rangeofammo2) && (ffgun.rate1 == "mono")) {
go33 = 1;
}
if (pac_shoot_num[numm24] >= rangeofammo2) {
removeMovieClip(pac_shoot[numm24]);
clearInterval(pac_shoot_ar[numm24]);
pac_shoot_num[numm24] = 0;
}
}
function bull_hit_enem(bulll) {
var _local4 = 0;
while (_local4 < enem_ar.length) {
if (((((((bulll._x + (bulll._width / 2)) > ((enem_ar[_local4]._x - (enem_ar[_local4]._width / 2)) + 5)) && ((bulll._x - bulll._width) < ((enem_ar[_local4]._x + (enem_ar[_local4]._width / 2)) - 5))) && ((bulll._y + (bulll._height / 2)) > ((enem_ar[_local4]._y - (enem_ar[_local4]._height / 2)) + 5))) && ((bulll._y - (bulll._height / 2)) < ((enem_ar[_local4]._y + (enem_ar[_local4]._height / 2)) - 5))) && (bulll._currentframe == 1)) && (enem_ar[_local4]._currentframe == 1)) {
var _local3 = 0;
while (_local3 < hand_en_ar.length) {
if (hand_en_ar[_local3].id == enem_ar[_local4].id) {
hand_en_ar[_local3].gotoAndPlay(2);
}
if (addons_ar[_local3].id == enem_ar[_local4].id) {
addons_ar[_local3].gotoAndPlay(2);
}
_local3++;
}
if (bulll.id == 1) {
explode_num++;
var _local5 = attachMovie("expl", "expl" + explode_num, 35000 + explode_num);
explode_ar[explode_num] = _local5;
explode_ar[explode_num]._x = bulll._x;
explode_ar[explode_num]._y = bulll._y;
}
bulll.gotoAndPlay(2);
enem_count++;
enem_ar[_local4].speed = 0;
num_enemys--;
_root.scoreplus("point_p_20", enem_ar[_local4]);
score_num = score_num + 20;
score.text = score.text - -20;
enem_ar[_local4].gotoAndPlay(2);
fade_enem_ar[enem_count] = 0;
inter_enemy_aa2 = setInterval(fade_enemy, 40, enem_ar[_local4], enem_count);
count_ar[enem_count] = inter_enemy_aa2;
trace("count=" + count_ar[enem_count]);
bulll.speed = 0;
}
_local4++;
}
_local4 = 0;
while (_local4 < wall_ar.length) {
if (((((bulll._x > (wall_ar[_local4]._x - (wall_ar[_local4]._width / 2))) && (bulll._x < (wall_ar[_local4]._x + (wall_ar[_local4]._width / 2)))) && (bulll._y > (wall_ar[_local4]._y - (wall_ar[_local4]._height / 2)))) && (bulll._y < (wall_ar[_local4]._y + (wall_ar[_local4]._height / 2)))) && (bulll._currentframe == 1)) {
if (bulll.id == 1) {
explode_num++;
var _local5 = attachMovie("expl", "expl" + explode_num, 35000 + explode_num);
explode_ar[explode_num] = _local5;
explode_ar[explode_num]._x = bulll._x;
explode_ar[explode_num]._y = bulll._y;
}
bulll.gotoAndPlay(2);
wall_ar[_local4].hit == 16;
bulll.speed = 0;
}
_local4++;
}
}
function collet_ammo() {
var _local1 = 0;
while (_local1 < 180) {
if ((((ammo_ar_take[_local1]._x > (pac._x - (pac._width / 2))) && (ammo_ar_take[_local1]._x < (pac._x + (pac._width / 2)))) && (ammo_ar_take[_local1]._y > (pac._y - (pac._height / 2)))) && (ammo_ar_take[_local1]._y < (pac._y + (pac._height / 2)))) {
trace("t=" + _local1);
if (_local1 == 0) {
ammo = 10 + _local1;
}
if (_local1 == 1) {
ammo = 6 + _local1;
}
if (_local1 == 2) {
ammo = 4 + _local1;
}
if (_local1 == 3) {
ammo = 14 + _local1;
}
if (_local1 == 4) {
ammo = 6 + _local1;
}
if (_local1 == 5) {
ammo = 7 + _local1;
}
if (_local1 == 6) {
ammo = 8 + _local1;
}
if (_local1 == 7) {
ammo = 13 + _local1;
}
if (_local1 == 8) {
ammo = 10;
pac.greande = 2;
}
if (_local1 == 9) {
ammo = 15;
pac.greande = 1;
}
if (_local1 == 10) {
ammo = 12;
pac.greande = 1;
}
if (_local1 == 11) {
ammo = 3;
}
if (_local1 == 12) {
ammo = 4;
}
pac.hand = _local1 + 1;
trace(pac.hand);
ammo_ar_take[_local1]._x = 900;
ammo_ar_take[_local1]._y = 900;
}
_local1++;
}
}
var go33 = 1;
var explode_ar = new Array();
var explode_num = 0;
pac.greande = 0;
var greand_throw = 2;
pac.hand = 0;
var bull_move_ene2;
var pac_shoot_ar = new Array();
var pac_shoot_num = new Array();
var pac_shoot = new Array();
var ebullpac = 0;
var dx_ar_pac = new Array();
var yx_ar_pac = new Array();
var count_ar = new Array();
function timeof() {
sec1++;
clock.text = sec1;
if (sec1 >= 59) {
sec1 = 0;
min1++;
clock_min.text = min1;
}
if (sec1 == 1) {
car.gotoAndPlay(2);
}
if ((sec1 == 20) && (num_enemys < 9)) {
addenemy_pos("enemy_swat", 10, 90, 90, "en_law", "uk_hel", 658, 378);
addenemy_pos("enemy_swat", 60, 40, 80, "en_sa80", "uk_hel", 203, 202);
addenemy_pos("enemy_swat", 60, 40, 80, "en_sa80", "uk_hel", 595, 378);
}
if (((sec1 == 10) || (sec1 == 30)) && (num_enemys < 9)) {
addenemy("enemyzz", 60, 40, 90, "", "london_cop");
}
if ((((sec1 == 30) || (sec1 == 45)) || (sec1 == 10)) && (num_enemys < 6)) {
addenemy("enemyzz", 90, 100, 72, "en_mp5hk", "london_cop2");
var _local1 = 0;
while (_local1 < addons_ar.length) {
addons_ar[_local1].greande = 1;
_local1++;
}
}
if ((sec1 == 1) && (min1 == 0)) {
ammo_ar_take[12]._x = 500;
ammo_ar_take[12]._y = 204;
}
if (sec1 == 4) {
ammo_ar_take[9]._x = 350;
ammo_ar_take[9]._y = 204;
}
if ((sec1 == 40) && (min1 == 0)) {
ammo_ar_take[10]._x = 240;
ammo_ar_take[10]._y = 204;
}
}
function car_move() {
if (car.place == 5) {
car.place = 1;
addenemy_pos("enemy_swat", 10, 90, 90, "en_glock", "london_cop", 384, 204);
addenemy_pos("enemy_swat", 60, 40, 80, "en_glock", "london_cop2", 398, 204);
}
}
function ball_move(bullet, numm2, rangeofammo, numB) {
bull_hit_pac(ball_shoot[numm2]);
bullspeed = ball_shoot[numm2].speed;
bullet._x = bullet._x + (dx_ar[numm2] * bullspeed);
bullet._y = bullet._y - (yx_ar[numm2] * bullspeed);
ball_shoot_num[numm2]++;
if (ball_shoot_num[numm2] >= rangeofammo) {
removeMovieClip(ball_shoot[numm2]);
clearInterval(ball_shoot_ar[numm2]);
ball_shoot_num[numm2] = 0;
}
}
function shoot_en_bul(gun, enemy, bullet, num1, num444, num5555) {
ebull++;
if (enemy.speed == 0) {
var _local3 = this.attachMovie(bullet, ("ball" + ebull) + 1, ebull + 50000);
ball_shoot[ebull] = _local3;
gun_rad = Math.atan2(gun.gun._y, gun.gun._x);
gun_deg = (gun_rad * 180) / Math.PI;
rotat = gun._rotation + ((gun_deg - 360) + 90);
dx = Math.sin((Math.PI/180) * rotat);
dy = Math.cos((Math.PI/180) * rotat);
gun_xscal = Math.abs(gun._xscale);
ball_shoot_num[ebull] = 0;
dx_ar[ebull] = dx;
yx_ar[ebull] = dy;
_local3._x = gun._x + (dx * (-gun.gun._y));
_local3._y = gun._y - (((dy * (-gun.gun._y)) * gun._xscale) / gun_xscal);
_local3._rotation = gun._rotation;
rotat = gun._rotation + ((gun_deg - 360) + 90);
dx = Math.sin((Math.PI/180) * (rotat + 5));
dy = Math.cos((Math.PI/180) * (rotat + 5));
dx_ar[ebull] = dx;
yx_ar[ebull] = dy;
if (gun.kindof == "hand_en") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "hand_en2") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_m16") {
_local3.speed = 6;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_m1") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_uzi") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 15, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_gal") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_ak47") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 17, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_bizon") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 19, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_pk96") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 18, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_rpg") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 19, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_glock") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 16, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_mp5hk") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 15, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_sa80") {
_local3.speed = 6;
bull_move_ene = setInterval(ball_move, 18, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_law") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 19, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
}
}
function shoot_enema(zzz, eee, num) {
if ((zzz.speed == 0) && (enem_time_ar[num] == 2)) {
var _local4 = 0;
while (_local4 < addons_ar.length) {
if (((addons_ar[_local4].id == zzz.id) && (addons_ar[_local4].greande > 0)) && (addons_ar[_local4].kindof == "explode")) {
throw_greande_en(addons_ar[_local4]);
addons_ar[_local4].greande--;
}
_local4++;
}
}
if (((eee.kindof == "hand_en") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 10) {
eee.number = 0;
enemy_mp4.attachSound("gunshots_sm.wav");
enemy_mp4.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 20, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "hand_en2") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 6) {
eee.number = 0;
enemy_mp3.attachSound("GUN04_cop.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 30, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_m16") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 3) {
eee.number = 0;
enemy_mp3.attachSound("M16.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 70, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
zzz.ifstop = 1;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_m1") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 6) {
eee.number = 0;
enemy_mp3.attachSound("GUN04_cop.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 70, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_uzi") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 4) {
eee.gun.gotoAndPlay(2);
enemy_mp3.attachSound("uzi.wav");
enemy_mp3.start();
shoot_en_bul(eee, zzz, "ball2", 1, 20, num);
}
if (enem_time_ar[num] > 5) {
eee.number = 0;
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 20, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_gal") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 5) {
eee.number = 0;
enemy_mp3.attachSound("galil.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 36, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_ak47") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 3) {
eee.number = 0;
enemy_mp3.attachSound("ak47.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 38, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_bizon") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 3) {
eee.gun.gotoAndPlay(2);
enemy_mp3.attachSound("uzi.wav");
enemy_mp3.start();
shoot_en_bul(eee, zzz, "ball2", 1, 22, num);
}
if (enem_time_ar[num] > 4) {
eee.number = 0;
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 22, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_pk96") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 2) {
eee.gun.gotoAndPlay(2);
enemy_mp3.attachSound("pk96.wav");
enemy_mp3.start();
shoot_en_bul(eee, zzz, "ball2", 1, 34, num);
}
if (enem_time_ar[num] == 3) {
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 34, num);
}
if (enem_time_ar[num] > 4) {
eee.number = 0;
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 34, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_rpg") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 4) {
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "rpg_mis", 1, 100, num);
}
if (enem_time_ar[num] > 8) {
eee.number = 0;
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_glock") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 2) {
eee.number = 0;
enemy_mp3.attachSound("gunshots_sm.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 22, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_mp5hk") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 1) {
eee.gun.gotoAndPlay(2);
enemy_mp3.attachSound("mp5.wav");
enemy_mp3.start();
shoot_en_bul(eee, zzz, "ball3", 1, 26, num);
}
if (enem_time_ar[num] > 3) {
eee.number = 0;
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 26, num);
zzz.speed = 2.5;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_sa80") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 3) {
eee.number = 0;
enemy_mp3.attachSound("M16.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 70, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
zzz.ifstop = 1;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_law") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 3) {
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "rpg_mis", 1, 130, num);
}
if (enem_time_ar[num] > 8) {
eee.number = 0;
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
}
function shoot_enem(ttt, aaa) {
if (((((((ttt._x >= (pac._x - 10)) && (ttt._x <= (pac._x + 10))) && (ttt.speed >= 2)) && (ttt != null)) && (ttt._y >= (pac._y - aaa.range))) && (ttt._y <= (pac._y + aaa.range))) && (aaa != null)) {
if ((ttt._y <= pac._y) && (ttt.speed >= 2)) {
var _local2 = 0;
while (_local2 < wall_ar.length) {
if (((((((ttt._x < (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2))) && (ttt._x > (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (if_right == 0)) && (pac._x > (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (pac._x < (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2)))) && (ttt._y < (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (pac._y > (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2)))) {
ttt.ifstop = 1;
}
_local2++;
}
trace("donw");
if (ttt.ifstop == 1) {
ttt.ifstop = 0;
} else if (ttt.ifstop == 0) {
shoot_d++;
enem_time_ar[shoot_d] = 0;
ttt.speed = 0;
ttt.pos = "down";
aaa.number = 1;
clearInterval(aaa.interr);
inter_shoot = setInterval(shoot_enema, 120, ttt, aaa, shoot_d);
enem_aar[shoot_d] = inter_shoot;
aaa.interr = inter_shoot;
}
}
if ((ttt._y > pac._y) && (ttt.speed >= 2)) {
var _local2 = 0;
while (_local2 < wall_ar.length) {
if (((((((ttt._x < (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2))) && (ttt._x > (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (if_right == 0)) && (pac._x > (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (pac._x < (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2)))) && (ttt._y > (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2)))) && (pac._y < (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) {
ttt.ifstop = 1;
}
_local2++;
}
if (ttt.ifstop == 1) {
ttt.ifstop = 0;
} else if (ttt.ifstop == 0) {
shoot_d++;
enem_time_ar[shoot_d] = 0;
ttt.speed = 0;
ttt.pos = "up";
}
aaa.number = 1;
clearInterval(aaa.interr);
inter_shoot = setInterval(shoot_enema, 120, ttt, aaa, shoot_d);
enem_aar[shoot_d] = inter_shoot;
aaa.interr = inter_shoot;
}
} else if (((((((ttt._y >= (pac._y - 10)) && (ttt._y <= (pac._y + 10))) && (ttt.speed >= 2)) && (ttt != null)) && (ttt._x >= (pac._x - aaa.range))) && (ttt._x <= (pac._x + aaa.range))) && (aaa != null)) {
if ((ttt._x <= pac._x) && (ttt.speed >= 2)) {
var _local2 = 0;
while (_local2 < wall_ar.length) {
if (((((((ttt._y < (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2))) && (ttt._y > (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (if_right == 0)) && (pac._y > (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (pac._y < (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2)))) && (ttt._x < (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (pac._x > (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2)))) {
ttt.ifstop = 1;
}
_local2++;
}
if (ttt.ifstop == 1) {
ttt.ifstop = 0;
} else if (ttt.ifstop == 0) {
shoot_d++;
enem_time_ar[shoot_d] = 0;
ttt.speed = 0;
aaa.number = 1;
ttt.pos = "right";
clearInterval(aaa.interr);
inter_shoot = setInterval(shoot_enema, 120, ttt, aaa, shoot_d);
enem_aar[shoot_d] = inter_shoot;
aaa.interr = inter_shoot;
}
}
if ((ttt._x > pac._x) && (ttt.speed >= 2)) {
var _local2 = 0;
while (_local2 < wall_ar.length) {
if (((((((ttt._y < (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2))) && (ttt._y > (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (if_right == 0)) && (pac._y > (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (pac._y < (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2)))) && (ttt._x > (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2)))) && (pac._x < (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) {
trace("okL");
ttt.ifstop = 1;
}
_local2++;
}
if (ttt.ifstop == 1) {
ttt.ifstop = 0;
} else if (ttt.ifstop == 0) {
shoot_d++;
enem_time_ar[shoot_d] = 0;
ttt.speed = 0;
aaa.number = 1;
ttt.pos = "left";
clearInterval(aaa.interr);
inter_shoot = setInterval(shoot_enema, 120, ttt, aaa, shoot_d);
enem_aar[shoot_d] = inter_shoot;
aaa.interr = inter_shoot;
}
}
}
}
function throw_greande_en(enem) {
greande_num++;
var _local2 = attachMovie("greande", "greandee" + greande_num, 75500 + greande_num);
greande_ar[greande_num] = _local2;
trace(greande_ar[greande_num]);
greande_ar[greande_num]._x = enem._x;
greande_ar[greande_num]._y = enem._y;
greande_ar[greande_num]._rotation = enem._rotation;
greande_ar[greande_num]._xscale = enem._xscale;
trace(greande_ar[greande_num]._y);
}
function explode_greande() {
var _local1 = 0;
while (_local1 < greande_ar.length) {
if (greande_ar[_local1].count == 11) {
trace("boom");
greand_throw = 2;
rotat = greande_ar[_local1]._rotation;
dx = Math.sin((Math.PI/180) * rotat);
dy = Math.cos((Math.PI/180) * rotat);
explode_num++;
var _local2 = attachMovie("expl", "expl" + explode_num, 65000 + explode_num);
explode_ar[explode_num] = _local2;
explode_ar[explode_num]._x = greande_ar[_local1]._x + (dx * 220);
explode_ar[explode_num]._y = greande_ar[_local1]._y - (dy * 220);
removeMovieClip(greande_ar[_local1]);
}
_local1++;
}
}
clearInterval(time_in);
var time_in;
var sec1 = 0;
var min1 = 0;
var ebull = 0;
var ammo_ar_take = new Array();
ammo_ar_take[0] = gun_ammo;
ammo_ar_take[1] = m14_ammo;
ammo_ar_take[2] = m1_ammo;
ammo_ar_take[3] = uzi_ammo;
ammo_ar_take[4] = gal_ammo;
ammo_ar_take[5] = m16_ammo;
ammo_ar_take[6] = ak47_ammo;
ammo_ar_take[7] = bizon_ammo;
ammo_ar_take[8] = glock_ammo;
ammo_ar_take[9] = mp5hk_ammo;
ammo_ar_take[10] = sa80_ammo;
ammo_ar_take[11] = rpg_ammo;
ammo_ar_take[12] = law_ammo;
time_in = setInterval(timeof, 1000);
addenemy("enemyzz", 12, 40, 80, "en_glock", "london_cop");
var shoot_d = 0;
var inter_shoot_c = 0;
var inter_shoot;
var inter_shootb;
var enem_aar = new Array();
var enem_time_ar = new Array();
var ball_shoot = new Array();
var bull_move_ene;
var ball_shoot_ar = new Array();
var ball_shoot_num = new Array();
var dx_ar = new Array();
var yx_ar = new Array();
var enemy_mp4 = new Sound();
var enemy_mp3 = new Sound();
var if_right = 0;
var greande_num = 0;
var greande_ar = new Array();
Instance of Symbol 425 MovieClip [empty] "controller" in Frame 16
onClipEvent (enterFrame) {
_root.detectKeys();
_root.collectcoin();
_root.hand_where();
_root.explode_greande();
_root.exp_hit_pac();
_root.car_move();
updateAfterEvent();
}
Frame 17
clearInterval(interhit);
stop();
var i = 0;
while (i < enem_ar.length) {
removeMovieClip(enem_ar[i]);
removeMovieClip(pac_graphic);
removeMovieClip(hand_en_ar[i]);
removeMovieClip(hand_pac);
removeMovieClip(addons_ar[i]);
removeMovieClip(places[i]);
removeMovieClip(explode_ar[i]);
i++;
}
var gonext4 = 0;
var i = 0;
while (i < 10000) {
clearInterval(i);
clearInterval(score_MC_AR_del[i]);
removeMovieClip(score_MC_AR[i]);
clearInterval(interhit);
clearInterval(enem_aar[i]);
clearInterval(bbb[i]);
clearInterval(ball_shoot_ar[i]);
removeMovieClip(ball_shoot[i]);
clearInterval(pac_shoot_ar);
removeMovieClip(pac_shoot[i]);
clearInterval(count_ar[i]);
fade_enem_ar[i] = 0;
removeMovieClip(ammo_ar_take[i]);
removeMovieClip(enem_add);
removeMovieClip(gun_add);
removeMovieClip(pac_weapon[i]);
clearInterval(time_in);
i++;
}
if (uover == 100) {
clearInterval(uover_in);
gotoAndPlay (6);
}
function goover() {
uover--;
}
function play44() {
gotoAndPlay (6);
}
var uover_in;
uover = 5;
uover_in = setInterval(goover, 1000);
function detectKeys() {
if (Key.isDown(32) && (_root.gonext4 == 4)) {
gotoAndStop (18);
}
}
Instance of Symbol 425 MovieClip [empty] "controller" in Frame 17
onClipEvent (enterFrame) {
_root.detectKeys();
}
Instance of Symbol 551 MovieClip "com" in Frame 17
on (press) {
getURL ("http://games.fs1.co.il", "_blank");
}
Frame 18
if (HH == 1) {
gotoAndStop (1);
}
stop();
clearInterval(interhit);
var i = 0;
while (i < enem_ar.length) {
removeMovieClip(enem_ar[i]);
removeMovieClip(pac_graphic);
removeMovieClip(hand_en_ar[i]);
removeMovieClip(hand_pac);
removeMovieClip(addons_ar[i]);
removeMovieClip(explode_ar[i]);
i++;
}
var i = 0;
while (i < 10000) {
clearInterval(i);
clearInterval(score_MC_AR_del[i]);
removeMovieClip(score_MC_AR[i]);
clearInterval(interhit);
clearInterval(enem_aar[i]);
clearInterval(bbb[i]);
clearInterval(ball_shoot_ar[i]);
removeMovieClip(ball_shoot[i]);
clearInterval(pac_shoot_ar);
removeMovieClip(pac_shoot[i]);
clearInterval(count_ar[i]);
fade_enem_ar[i] = 0;
removeMovieClip(ammo_ar_take[i]);
removeMovieClip(enem_add);
removeMovieClip(gun_add);
removeMovieClip(pac_weapon[i]);
clearInterval(time_in);
i++;
}
function alpha(ttt) {
var _local1 = 0;
while (_local1 < ttt.length) {
ttt[_local1]._visible = 0;
_local1++;
}
}
var ld_ar = new Array(d_l1, d_l2, d_l3, d_l4, d_l5, d_l6, d_l7, d_l8, d_l9, d_l10, d_l11);
ld_ar.dd = "d_l";
var rd_ar = new Array(d_r1, d_r2, d_r3, d_r4, d_r5, d_r6, d_r7, d_r8, d_r9, d_r10, d_r11);
rd_ar.dd = "d_r";
var ru_ar = new Array(u_r1, u_r2, u_r3, u_r4, u_r5, u_r6, u_r7, u_r8, u_r9, u_r10, u_r11);
ru_ar.dd = "u_r";
var lu_ar = new Array(u_l1, u_l2, u_l3, u_l4, u_l5, u_l6, u_l7, u_l8, u_l9, u_l10, u_l11);
lu_ar.dd = "u_l";
var places = new Array();
alpha(ld_ar);
alpha(rd_ar);
alpha(ru_ar);
alpha(lu_ar);
places[0] = monk_a0;
places[1] = monk_a1;
places[0]._x = 360;
places[0]._y = 330;
places[1]._x = 174;
places[1]._y = 330;
function guideof(ttt) {
var _local2 = 0;
while (_local2 < ttt.length) {
if (pac.hitTest(ttt[_local2]._x, ttt[_local2]._y, yes)) {
if (ttt.dd == "d_l") {
pac._x = pac._x - 4;
pac._y = pac._y + 4;
} else if (ttt.dd == "d_r") {
pac._x = pac._x + 4;
pac._y = pac._y + 4;
} else if (ttt.dd == "u_r") {
pac._x = pac._x + 4;
pac._y = pac._y - 4;
} else if (ttt.dd == "u_l") {
pac._x = pac._x - 4;
pac._y = pac._y - 4;
}
}
_local2++;
}
}
function pachit(aaa) {
if (life <= 0) {
score_num = score_num - 1000;
levelof = "level8";
gotoAndStop ("gameover");
}
life_mc.gotoAndStop(life);
if (pac.hit > 0) {
if (pac.caneat == 0) {
myTransform.ba = myTransform.ba - 5;
myTransform.ga = myTransform.ga - 5;
my_color.setTransform(myTransform);
}
pac.hit--;
} else if (pac.hit < 0) {
pac.hit = 0;
}
if (pac.hit == 0) {
if (myTransform.ba < 100) {
myTransform.ba = myTransform.ba + 5;
myTransform.ga = myTransform.ga + 5;
my_color.setTransform(myTransform);
}
}
updateAfterEvent();
if (pac.caneat > 0) {
aaa.speed = 0;
myTransform.ra = myTransform.ra - 5;
myTransform.ba = myTransform.ba - 5;
my_color.setTransform(myTransform);
pac.caneat--;
}
if (pac.caneat < 0) {
pac.caneat = 0;
}
if ((pac.caneat == 0) && (pac.hit == 0)) {
pac.hit == 0;
if (myTransform.ra < 100) {
myTransform.ra = 100;
myTransform.ba = 100;
myTransform.ga = 100;
my_color.setTransform(myTransform);
}
}
updateAfterEvent();
}
function movea() {
check1(pac);
if (pac._rotation == 90) {
pac._x = pac._x + speed_pac;
}
if (pac._rotation == -90) {
pac._x = pac._x - speed_pac;
}
if (pac._rotation == 180) {
pac._y = pac._y + speed_pac;
}
if (pac._rotation == 0) {
pac._y = pac._y - speed_pac;
}
tt++;
if (tt >= 4) {
tt = 0;
clearInterval(intermove_pac);
}
updateAfterEvent();
}
function detectKeys() {
collet_ammo();
ammo_txt.text = ammo;
greande_txt.text = pac.greande;
pac_graphic._x = pac._x;
pac_graphic._y = pac._y;
updateAfterEvent();
pacx.text = pac._x;
speed_pac = 5;
if (pac.hit > 8) {
speed_pac = 0;
}
if (Key.isDown(39) && (pac._x <= (760 - (pac._width / 2)))) {
clearInterval(intermove_pac);
check1(pac);
pac._x = pac._x + speed_pac;
pac._rotation = 90;
pac_graphic._rotation = 90;
if (pac_graphic._xscale == 100) {
pac_graphic._xscale = -pac_graphic._xscale;
}
if (pac_graphic._currentframe == "1") {
pac_graphic.nextFrame();
}
}
if (ammo == 0) {
pac.hand = 0;
}
if (Key.isDown(37) && (pac._x >= (0 + (pac._width / 2)))) {
clearInterval(intermove_pac);
check1(pac);
pac._x = pac._x - speed_pac;
if (pac_graphic._xscale == -100) {
pac_graphic._xscale = -pac_graphic._xscale;
}
pac_graphic._rotation = 270;
if (pac_graphic._currentframe == "1") {
pac_graphic.nextFrame();
}
}
if (Key.isDown(38) && (pac._y >= 70)) {
clearInterval(intermove_pac);
check1(pac);
pac._y = pac._y - speed_pac;
pac._rotation = 0;
pac_graphic._rotation = 0;
if (pac_graphic._xscale == -100) {
pac_graphic._xscale = -pac_graphic._xscale;
}
if (pac_graphic._currentframe == "1") {
pac_graphic.nextFrame();
}
}
if (Key.isDown(40) && (pac._y <= (500 - (pac._height / 2)))) {
clearInterval(intermove_pac);
check1(pac);
pac._rotation = 180;
pac._y = pac._y + speed_pac;
pac_graphic._rotation = 180;
if (pac_graphic._xscale == -100) {
pac_graphic._xscale = -pac_graphic._xscale;
}
if (pac_graphic._currentframe == "1") {
pac_graphic.nextFrame();
}
}
updateAfterEvent();
}
function check1(hit) {
var _local1 = 0;
while (_local1 < wall_ar.length) {
var _local5 = (wall_ar[_local1]._x - (wall_ar[_local1]._width / 2)) - 2;
var _local3 = (wall_ar[_local1]._x + (wall_ar[_local1]._width / 2)) + 2;
var _local4 = (wall_ar[_local1]._y - (wall_ar[_local1]._height / 2)) - 2;
var _local6 = (wall_ar[_local1]._y + (wall_ar[_local1]._height / 2)) + 2;
if (((hit._x >= _local5) && (hit._x <= _local3)) && ((hit._y <= _local6) && (hit._y >= _local4))) {
if (Key.isDown(38) && ((hit._y - (hit._height / 2)) >= (wall_ar[_local1]._y - 3))) {
guideof(ld_ar);
guideof(rd_ar);
guideof(ru_ar);
guideof(lu_ar);
speed_pac = 0;
trace("we cant up");
}
if (Key.isDown(40) && ((hit._y + (hit._height / 2)) <= (wall_ar[_local1]._y + 3))) {
guideof(ld_ar);
guideof(rd_ar);
guideof(ru_ar);
guideof(lu_ar);
speed_pac = 0;
trace("we cant down");
}
if (Key.isDown(39) && ((hit._x + (hit._width / 2)) <= (wall_ar[_local1]._x + 3))) {
guideof(ld_ar);
guideof(rd_ar);
guideof(ru_ar);
guideof(lu_ar);
speed_pac = 0;
trace("we cant right");
}
if (Key.isDown(37) && ((hit._x - (hit._width / 2)) >= (wall_ar[_local1]._x - 3))) {
guideof(ld_ar);
guideof(rd_ar);
guideof(ru_ar);
guideof(lu_ar);
speed_pac = 0;
trace("we cant left");
}
}
_local1++;
}
}
var pac_graphic1 = attachMovie("pacman_graphic2", "pac_graphic", 1);
var pac_graphic1 = attachMovie("hand_pac", "hand_pac", 1002);
var pac_graphic1 = attachMovie("m14_pac", "m14_pac", 1003);
var pac_graphic1 = attachMovie("m1_pac", "m1_pac", 1004);
var pac_graphic1 = attachMovie("uzi_pac", "uzi_pac", 1005);
var pac_graphic1 = attachMovie("gal_pac", "gal_pac", 1006);
var pac_graphic1 = attachMovie("m16_pac", "m16_pac", 1007);
var pac_graphic1 = attachMovie("ak47_pac", "ak47_pac", 1008);
var pac_graphic1 = attachMovie("bizon_pac", "bizon_pac", 1009);
var pac_graphic1 = attachMovie("glock_pac", "glock_pac", 1010);
var pac_graphic1 = attachMovie("mp5hk_pac ", "mp5hk_pac", 1011);
var pac_graphic1 = attachMovie("sa80_pac ", "sa80_pac", 1012);
var pac_graphic1 = attachMovie("rpg_pac", "rpg_pac", 1013);
var pac_graphic1 = attachMovie("law_pac", "law_pac", 1014);
var pac_graphic1 = attachMovie("mp5g_pac", "mp5g_pac", 1015);
var pac_graphic1 = attachMovie("aug_pac ", "aug_pac", 1016);
var pac_graphic1 = attachMovie("shotgun_pac", "shotgun_pac", 1017);
var pac_graphic1 = attachMovie("law_camo_pac", "law_camo_pac", 1018);
var pac_graphic1 = attachMovie("mag_pac", "mag_pac", 1019);
var pac_graphic1 = attachMovie("m4_pac", "m4_pac", 1020);
var pac_graphic1 = attachMovie("commando_pac", "commando_pac", 1021);
var pac_graphic1 = attachMovie("m5_pac", "m5_pac", 1022);
var pac_graphic1 = attachMovie("m60_pac", "m60_pac", 1023);
pac_graphic._x = pac._x;
pac_graphic._y = pac._y;
pac._visible = 0;
pac.hit = "0";
pac.caneat = "0";
var interhit;
var tt = 0;
var my_color = new Color(_root.pac_graphic);
var myTransform = my_color.getTransform();
var ammo = 0;
var pac_weapon = new Array();
pac_weapon[0] = hand_pac;
pac_weapon[1] = m14_pac;
pac_weapon[2] = m1_pac;
pac_weapon[3] = uzi_pac;
pac_weapon[4] = gal_pac;
pac_weapon[5] = m16_pac;
pac_weapon[6] = ak47_pac;
pac_weapon[7] = bizon_pac;
pac_weapon[8] = glock_pac;
pac_weapon[9] = mp5hk_pac;
pac_weapon[10] = sa80_pac;
pac_weapon[11] = rpg_pac;
pac_weapon[12] = law_pac;
pac_weapon[13] = mp5g_pac;
pac_weapon[14] = aug_pac;
pac_weapon[15] = shotgun_pac;
pac_weapon[16] = law_camo_pac;
pac_weapon[17] = mag_pac;
pac_weapon[18] = m4_pac;
pac_weapon[19] = commando_pac;
pac_weapon[20] = m5_pac;
pac_weapon[21] = m60_pac;
interhit = setInterval(pachit, 50);
pac_graphic._currentframe = 1;
var oKey = new Object();
var wall_ar = new Array(wall1, wall2, wall3, wall4, wall5, wall6, wall7, wall8, wall9, wall10, wall11, wall12, wall13, wall14, wall15, wall16, wall17, wall18, wall19, wall20, wall21, wall22, wall23);
var speed_pac = 3;
pac_graphic._xscale = 100;
Key.addListener(oKey);
var a = 0;
function collectcoin() {
if (end >= 60) {
score_num = score_num - ((sec1 * min1) * 5);
score_num = score_num - ((10 - life) * 50);
gotoAndStop ("level9");
end = 0;
trace("end");
}
backu(backs_u_ar, pac);
backu(backs_l_ar, pac);
backu(backs_d_ar, pac);
backu(backs_r_ar, pac);
var _local1 = 0;
while (_local1 < gold_ar.length) {
if (pac.hitTest(gold_ar[_local1]._x, gold_ar[_local1]._y, yes)) {
pac_graphic.gotoAndPlay("eat");
scoreplus("point_p_10", gold_ar[_local1]);
gold_ar[_local1]._x = 800;
gold_ar[_local1]._y = 1000;
removeMovieClip(gold_ar[_local1]);
my_sound.attachSound("blip.mp3");
my_sound.start();
score_num = score_num + 10;
score.text = score_num;
end++;
}
_local1++;
}
_local1 = 0;
while (_local1 < gold_big_ar.length) {
if (pac.hitTest(gold_big_ar[_local1]._x, gold_big_ar[_local1]._y, yes)) {
pac.caneat = 80;
pac_graphic.gotoAndPlay("eat");
scoreplus("point_p_10", gold_big_ar[_local1]);
gold_big_ar[_local1]._x = 800;
gold_big_ar[_local1]._y = 1000;
removeMovieClip(gold_ar[_local1]);
my_sound.attachSound("blip.mp3");
my_sound.start();
score_num = score_num + 10;
score.text = score_num;
}
_local1++;
}
}
function backu(ttt, sss) {
var _local3 = 0;
while (_local3 < 15) {
if (sss.hitTest(ttt[_local3])) {
if (ttt.info == "up") {
sss._y = 480;
} else if (ttt.info == "left") {
sss._x = 730;
} else if (ttt.info == "down") {
sss._y = 90;
} else if (ttt.info == "right") {
sss._x = 20;
}
}
_local3++;
}
}
function scoreplus(sss, aaa) {
clearinterval(noscore);
s_score = "point_p_10" + scoree;
var _local1 = attachMovie(sss, s_score, scoree + 200000);
scoree++;
_local1._x = aaa._x;
_local1._y = aaa._y;
score_MC_AR[scoree] = _local1;
noscore = setInterval(score_fade, 20, score_MC_AR[scoree]);
score_MC_AR_del[scoree] = noscore;
}
function score_fade(bbb) {
bbb._y = bbb._y - 3;
bbb._alpha = bbb._alpha - 5;
if (bbb._alpha <= 10) {
clearInterval(score_MC_AR[bbb]);
}
}
var gold_ar = new Array(gold, gold1, gold2, gold3, gold4, gold5, gold6, gold7, gold8, gold9, gold10, gold11, gold12, gold13, gold14, gold15, gold16, gold17, gold18, gold19, gold20, gold21, gold22, gold23, gold24, gold25, gold26, gold27, gold28, gold29, gold30, gold31, gold32, gold33, gold34, gold35, gold36, gold37, gold38, gold39, gold40, gold41, gold42, gold43, gold44, gold45, gold46, gold47, gold48, gold49, gold50, gold51, gold52, gold53, gold54, gold55, gold56, gold57, gold58, gold59, gold60, gold61, gold62, gold63, gold64, gold65, gold66, gold67, gold68, gold69, gold70, gold71, gold72, gold73, gold74, gold75, gold76, gold77, gold78, gold79, gold80, gold81, gold82, gold83, gold84, gold85, gold86, gold87, gold88, gold89, gold90, gold91, gold92, gold93, gold94, gold95, gold96, gold97, gold98, gold99);
var gold_big_ar = new Array(gold_big1, gold_big2, gold_big3, gold_big4);
var my_sound = new Sound();
var backs_u_ar = new Array(u_back, u_back1, u_back2);
backs_u_ar.info = "up";
var backs_l_ar = new Array(l_back, l_back1, l_back2);
backs_l_ar.info = "left";
var backs_d_ar = new Array(d_back, d_back1, d_back2);
backs_d_ar.info = "down";
var backs_r_ar = new Array(r_back, r_back1, r_back2);
backs_r_ar.info = "right";
var allback = new Array(backs_u_ar, backs_l_ar, backs_r_ar, backs_d_ar);
var i = 0;
while (i < 30) {
var j = 0;
while (j < 10) {
allback[i][j]._visible = 0;
c_guide_ar[j]._visible = 0;
j++;
}
i++;
}
var end = 0;
var oKey1 = new Object();
Key.addListener(oKey1);
var scoree = 0;
var noscore;
var score_MC_AR_del = new Array();
var score_MC_AR = new Array();
function enem_move(ttt, gun, add1) {
if (ttt != undefined) {
exp_hit_enem(ttt);
shoot_enem(ttt, gun);
check_hit_pac(ttt);
check2(ttt);
backu1(backs_u_ar, ttt);
backu1(backs_l_ar, ttt);
backu1(backs_d_ar, ttt);
backu1(backs_r_ar, ttt);
}
if (ttt.pos == "left") {
ttt._x = ttt._x - ttt.speed;
ttt._rotation = 270;
if ((ttt._xscale <= -90) && (ttt._currentframe == 1)) {
ttt._xscale = -ttt._xscale;
}
}
if (ttt.pos == "right") {
ttt._x = ttt._x + ttt.speed;
ttt._rotation = 90;
if ((ttt._xscale >= 90) && (ttt._currentframe == 1)) {
ttt._xscale = -ttt._xscale;
}
}
if (ttt.pos == "up") {
ttt._y = ttt._y - ttt.speed;
ttt._rotation = 0;
if ((ttt._xscale <= -90) && (ttt._currentframe == 1)) {
ttt._xscale = -ttt._xscale;
}
}
if (ttt.pos == "down") {
ttt._y = ttt._y + ttt.speed;
ttt._rotation = 180;
if ((ttt._xscale <= -90) && (ttt._currentframe == 1)) {
ttt._xscale = -ttt._xscale;
}
}
if (ttt.pos == "mixed") {
var _local6 = ttt._rotation + 10;
dx = Math.cos((Math.PI/180) * _local6);
dy = Math.sin((Math.PI/180) * _local6);
ttt._x = ttt._x + (dx * ttt.speed);
ttt._y = ttt._y + (dy * ttt.speed);
}
gun._x = ttt._x;
gun._y = ttt._y;
gun._rotation = ttt._rotation;
gun._xscale = ttt._xscale;
add1._x = ttt._x;
add1._y = ttt._y;
add1._rotation = ttt._rotation;
add1._xscale = ttt._xscale;
var _local2 = 0;
while (_local2 < c_guide_ar.length) {
if ((((((ttt._x >= (c_guide_ar[_local2]._x - 5)) && (ttt._x <= (c_guide_ar[_local2]._x + 5))) && (ttt._y >= (c_guide_ar[_local2]._y - 5))) && (ttt._y <= (c_guide_ar[_local2]._y + 5))) && (ttt.a >= 6)) && (ttt.hitTest(c_guide_ar[_local2]))) {
ttt.a = 0;
if ((ttt._x >= (pac._x - 4)) && (ttt._x <= (pac._x + 4))) {
if (ttt._y <= pac._y) {
ttt.pos = "down";
}
if (ttt._y > pac._y) {
ttt.pos = "up";
}
} else if ((ttt._y >= (pac._y - 4)) && (ttt._y <= (pac._y + 4))) {
if (ttt._x <= pac._x) {
ttt.pos = "right";
}
if (ttt._x > pac._x) {
ttt.pos = "left";
}
} else {
var _local3 = random(4);
switch (_local3) {
case 0 :
ttt.pos = "down";
ttt.a = "0";
ttt._y = ttt._y + 3;
break;
case 1 :
ttt.pos = "up";
ttt.a = "0";
ttt._y = ttt._y - 3;
break;
case 2 :
ttt.pos = "right";
ttt.a = "0";
ttt._x = ttt._x + 3;
break;
case 3 :
ttt.pos = "left";
ttt.a = "0";
ttt._x = ttt._x - 3;
}
}
} else if (ttt.hitTest(c_guide_ar[_local2]) == false) {
ttt.a = ttt.a + 1;
}
_local2++;
}
updateAfterEvent();
}
function backu1(ttt, sss) {
var _local3 = 0;
while (_local3 < 15) {
if (sss.hitTest(ttt[_local3])) {
if (ttt.info == "up") {
sss._y = 480;
} else if (ttt.info == "left") {
sss._x = 730;
} else if (ttt.info == "down") {
sss._y = 90;
} else if (ttt.info == "right") {
sss._x = 20;
}
}
_local3++;
}
}
function check2(hit) {
var _local3 = 0;
while (_local3 < wall_ar.length) {
var _local6 = (wall_ar[_local3]._x - (wall_ar[_local3]._width / 2)) - 2;
var _local4 = (wall_ar[_local3]._x + (wall_ar[_local3]._width / 2)) + 2;
var _local5 = (wall_ar[_local3]._y - (wall_ar[_local3]._height / 2)) - 2;
var _local7 = (wall_ar[_local3]._y + (wall_ar[_local3]._height / 2)) + 2;
if ((((hit._x + (hit._width / 2)) >= _local6) && ((hit._x - (hit._width / 2)) <= _local4)) && ((((hit._y - (hit._height / 2)) <= _local7) && ((hit._y + (hit._height / 2)) >= _local5)) && (hit._currentframe == 1))) {
var _local2 = random(2);
if ((hit.pos == "left") && (hit.wall >= 1)) {
hit._x = hit._x + 4;
if (_local2 == 0) {
hit.pos = "right";
} else if (_local2 == 1) {
hit.pos = "up";
} else if (_local2 == 2) {
hit.pos = "down";
}
hit.wall = 0;
} else if ((hit.pos == "right") && (hit.wall >= 1)) {
hit._x = hit._x - 4;
if (_local2 == 0) {
hit.pos = "left";
} else if (_local2 == 1) {
hit.pos = "up";
} else if (_local2 == 2) {
hit.pos = "down";
}
hit.wall = 0;
} else if ((hit.pos == "up") && (hit.wall >= 1)) {
hit._y = hit._y + 4;
if (_local2 == 0) {
hit.pos = "right";
} else if (_local2 == 1) {
hit.pos = "down";
} else if (_local2 == 2) {
hit.pos = "left";
}
hit.wall = 0;
} else if ((hit.pos == "down") && (hit.wall >= 1)) {
hit._y = hit._y - 4;
if (_local2 == 0) {
hit.pos = "right";
} else if (_local2 == 2) {
hit.pos = "left";
} else if (_local2 == 2) {
hit.pos = "up";
}
hit.wall = 0;
}
} else if (hit.wall == 0) {
hit.wall = hit.wall + 1;
}
_local3++;
}
}
function fade_enemy(aaa, count) {
if (aaa._currentframe != 1) {
fade_enem_ar[count]++;
if ((fade_enem_ar[count] >= 10) && ((sec1 > 1) || (min1 > 1))) {
aaa._y = 1000;
aaa._x = 1000;
clearInterval(bbb[aaa.id]);
removeMovieClip(aaa);
fade_enem_ar[count] = 0;
clearInterval(count_ar[count]);
}
}
}
function check_hit_pac(hit) {
var _local6 = (pac._x - (pac._width / 2)) - 4;
var _local4 = (pac._x + (pac._width / 2)) + 4;
var _local5 = (pac._y - (pac._height / 2)) - 4;
var _local7 = (pac._y + (pac._height / 2)) + 4;
if (((((hit._x + (hit._width / 2)) >= _local6) && ((hit._x - (hit._width / 2)) <= _local4)) && (((hit._y - (hit._height / 2)) <= _local7) && ((hit._y + (hit._height / 2)) >= _local5))) && (pac.caneat <= 0)) {
if (((hit.pos == "left") && (hit.pac >= 1)) && (hit._currentframe == 1)) {
hit._x = hit._x + 4;
hit.pos = "right";
hit.pac = 0;
if (pac.hit == 0) {
pac.hit = 16;
if (pac.caneat <= 0) {
life--;
}
}
}
if (((hit.pos == "right") && (hit.pac >= 1)) && (hit._currentframe == 1)) {
hit._x = hit._x - 4;
hit.pos = "left";
hit.pac = 0;
if (pac.hit == 0) {
pac.hit = 16;
life--;
if (pac.caneat == 0) {
life--;
}
}
}
if (((hit.pos == "up") && (hit.pac >= 1)) && (hit._currentframe == 1)) {
hit._y = hit._y + 4;
hit.pos = "down";
hit.pac = 0;
if (pac.hit == 0) {
pac.hit = 16;
life--;
if (pac.caneat == 0) {
life--;
}
}
}
if (((hit.pos == "down") && (hit.pac >= 1)) && (hit._currentframe == 1)) {
hit._y = hit._y - 4;
hit.pos = "up";
hit.pac = 0;
if (pac.hit == 0) {
pac.hit = 16;
life--;
if (pac.caneat == 0) {
life--;
}
}
} else if (hit.hitTest(pac) == false) {
hit.pac = hit.pac + 1;
}
}
if (((((hit._x + (hit._width / 2)) >= _local6) && ((hit._x - (hit._width / 2)) <= _local4)) && (((hit._y - (hit._height / 2)) <= _local7) && ((hit._y + (hit._height / 2)) >= _local5))) && (pac.caneat > 0)) {
if (pac.caneat > 0) {
if ((aeee <= 0) && (hit._currentframe == 1)) {
var _local3 = 0;
while (_local3 < hand_en_ar.length) {
if (hand_en_ar[_local3].id == hit.id) {
hand_en_ar[_local3].gotoAndPlay(2);
}
if (addons_ar[_local3].id == hit.id) {
addons_ar[_local3].gotoAndPlay(2);
}
_local3++;
}
hit.speed = 0;
hit.gotoAndPlay(2);
num_enemys--;
_root.scoreplus("point_p_20", hit);
score_num = score_num + 20;
score.text = score.text - -20;
enem_count++;
trace("enem_count=" + enem_count);
fade_enem_ar[enem_count] = 0;
inter_enemy_aa = setInterval(fade_enemy, 40, hit, enem_count);
}
count_ar[enem_count] = inter_enemy_aa;
}
}
}
function exp_hit_enem(eneme) {
var _local4 = 0;
while (_local4 < explode_ar.length) {
if (((((((eneme._x > (explode_ar[_local4]._x - (explode_ar[_local4]._width / 2))) && (eneme._x < (explode_ar[_local4]._x + (explode_ar[_local4]._width / 2)))) && (eneme._y > (explode_ar[_local4]._y - (explode_ar[_local4]._height / 2)))) && (eneme._y < (explode_ar[_local4]._y + (explode_ar[_local4]._height / 2)))) && (eneme._currentframe == 1)) && (explode_ar[_local4].hit <= 0)) && (eneme._currentframe == 1)) {
explode_ar[_local4].id = 0;
enem_count++;
eneme.speed = 0;
num_enemys--;
_root.scoreplus("point_p_20", eneme);
score_num = score_num + 20;
score.text = score.text - -20;
var _local2 = 0;
while (_local2 < hand_en_ar.length) {
if (hand_en_ar[_local2].id == eneme.id) {
hand_en_ar[_local2].gotoAndPlay(2);
removeMovieClip(hand_en_ar[_local2]);
}
_local2++;
}
_local2 = 0;
while (_local2 < addons_ar.length) {
if (addons_ar[_local2].id == eneme.id) {
addons_ar[_local2].gotoAndPlay(2);
removeMovieClip(addons_ar[_local2]);
}
_local2++;
}
eneme.gotoAndPlay(2);
fade_enem_ar[enem_count] = 0;
inter_enemy_aa2 = setInterval(fade_enemy, 40, eneme, enem_count);
count_ar[enem_count] = inter_enemy_aa2;
trace("count=" + count_ar[enem_count]);
}
_local4++;
}
}
function addenemy(enem_mca, rax, gax, bax, gun, addon) {
var _local2 = enem_ar.length;
trace(_local2);
var _local3 = this.attachMovie(enem_mca, ("enemy" + _local2) + 1, _local2 + 10000);
var _local5 = this.attachMovie(gun, ("hand_en" + _local2) + 1, (_local2 + 10000) + 6000);
var _local4 = this.attachMovie(addon, ("addon_" + _local2) + 1, (_local2 + 10000) + 3000);
var _local6 = random(500) + 100;
_local3._x = _local6;
_local3._y = 85;
_local5._x = _local6;
_local5._y = 85;
_local4._x = _local6;
_local4._y = 85;
_local3._currentframe = 1;
_local5._currentframe = 1;
_local4._currentframe = 1;
var _local10 = new Color(_local3.color4);
var _local9 = new Color(_local3.body);
var _local7 = {ra:rax, ga:gax, ba:bax, aa:100};
_local10.setTransform(_local7);
_local9.setTransform(_local7);
enem_ar[_local2] = _local3;
hand_en_ar[_local2] = _local5;
addons_ar[_local2] = _local4;
enem_ar[_local2].id = _local2;
hand_en_ar[_local2].id = _local2;
addons_ar[_local2].id = _local2;
hand_en_ar[_local2].kindof = gun;
enem_ar[_local2].a = "6";
enem_ar[_local2].wall = "5";
enem_ar[_local2].pac = "0";
enem_ar[_local2].ifstop = "0";
num_enemys++;
enem_ar[_local2].pos = "left";
enem_ar[_local2].speed = 2;
inter_en = setInterval(enem_move, 9, enem_ar[_local2], hand_en_ar[_local2], addons_ar[_local2]);
var _local8 = inter_en;
bbb[_local2] = _local8;
}
function addenemy_pos(enem_mca, rax, gax, bax, gun, addon, tx, ty) {
var _local2 = enem_ar.length;
trace(_local2);
var _local3 = this.attachMovie(enem_mca, ("enemy" + _local2) + 1, _local2 + 10000);
var _local5 = this.attachMovie(gun, ("hand_en" + _local2) + 1, (_local2 + 10000) + 6000);
var _local4 = this.attachMovie(addon, ("addon_" + _local2) + 1, (_local2 + 10000) + 3000);
var _local12 = random(400) + 100;
_local3._x = tx;
_local3._y = ty;
_local5._x = tx;
_local5._y = ty;
_local4._x = tx;
_local4._y = ty;
_local3._currentframe = 1;
_local5._currentframe = 1;
_local4._currentframe = 1;
var _local11 = new Color(_local3.color4);
var _local10 = new Color(_local3.body);
var _local6 = {ra:rax, ga:gax, ba:bax, aa:100};
_local11.setTransform(_local6);
_local10.setTransform(_local6);
enem_ar[_local2] = _local3;
hand_en_ar[_local2] = _local5;
addons_ar[_local2] = _local4;
enem_ar[_local2].id = _local2;
hand_en_ar[_local2].id = _local2;
addons_ar[_local2].id = _local2;
hand_en_ar[_local2].kindof = gun;
enem_ar[_local2].a = "6";
enem_ar[_local2].wall = "5";
enem_ar[_local2].pac = "0";
enem_ar[_local2].ifstop = "0";
num_enemys++;
enem_ar[_local2].pos = "left";
enem_ar[_local2].speed = 2;
inter_en = setInterval(enem_move, 9, enem_ar[_local2], hand_en_ar[_local2], addons_ar[_local2]);
var _local7 = inter_en;
bbb[_local2] = _local7;
}
var i = 0;
while (i < enem_ar.length) {
clearInterval(bbb[i]);
enem_ar[i].id.tt = 0;
i++;
}
var enem_count = 0;
var num_enemys = 4;
life = 10;
var inter_en;
var enem_ar = new Array(enemy1, enemy3);
var hand_en_ar = new Array(hand_en1);
var addons_ar = new Array();
enem_ar[0].a = "6";
enem_ar[0].wall = "5";
enem_ar[0].ifstop = "0";
enem_ar[0].pac = "0";
enem_ar[0].id = "0";
hand_en_ar[0].id = "0";
hand_en_ar[0].kindof = "hand_en2";
enem_ar[1].a = "6";
enem_ar[1].wall = "5";
enem_ar[1].pac = "0";
enem_ar[1].id = "1";
enem_ar[1].ifstop = "0";
enem_ar[2].a = "6";
enem_ar[2].wall = "5";
enem_ar[2].pac = "0";
enem_ar[2].id = "2";
enem_ar[2].ifstop = "0";
var c_guide_ar = new Array(c_guide1, c_guide2, c_guide3, c_guide4, c_guide5, c_guide6, c_guide7, c_guide8, c_guide9, c_guide10, c_guide11, c_guide12, c_guide13, c_guide14);
var i = 0;
while (i < 30) {
c_guide_ar[i]._visible = 0;
i++;
}
enem_ar[0].pos = "left";
enem_ar[0].speed = 2;
enem_ar[1].pos = "right";
enem_ar[1].speed = 2;
enem_ar[2].pos = "right";
enem_ar[2].speed = 2;
var inter_en;
var bbb = new Array();
var i = 0;
while (i < enem_ar.length) {
inter_en = setInterval(enem_move, 20, enem_ar[i], hand_en_ar[i]);
var ttt = inter_en;
bbb[i] = ttt;
i++;
}
var inter_enemy_aa;
var fade_enem_ar = new Array();
var aeee = 0;
clearInterval(inter_mmm);
var pac_mp3 = new Sound();
var wall_mp3 = new Sound();
var inter_mmm;
inter_mmm = setInterval(movenemyss, 1000);
function exp_hit_pac() {
var _local1 = 0;
while (_local1 < explode_ar.length) {
if ((((((pac._x > (explode_ar[_local1]._x - (explode_ar[_local1]._width / 2))) && (pac._x < (explode_ar[_local1]._x + (explode_ar[_local1]._width / 2)))) && (pac._y > (explode_ar[_local1]._y - (explode_ar[_local1]._height / 2)))) && (pac._y < (explode_ar[_local1]._y + (explode_ar[_local1]._height / 2)))) && (pac.hit <= 0)) && (pac.caneat == 0)) {
life--;
life--;
pac.hit = 25;
}
_local1++;
}
}
function bull_hit_pac(bulll) {
if ((((((((bulll._x + (bulll._width / 2)) > ((pac._x - (pac._width / 2)) + 5)) && ((bulll._x - (bulll._width / 2)) < ((pac._x + (pac._width / 2)) - 5))) && ((bulll._y + (bulll._height / 2)) > ((pac._y - (pac._height / 2)) + 5))) && ((bulll._y - (bulll._height / 2)) < ((pac._y + (pac._height / 2)) - 5))) && (bulll._currentframe == 1)) && (pac.hit <= 0)) && (pac.caneat == 0)) {
life--;
if (bulll.id == 1) {
explode_num++;
var _local3 = attachMovie("expl", "expl" + explode_num, 65000 + explode_num);
explode_ar[explode_num] = _local3;
explode_ar[explode_num]._x = bulll._x;
explode_ar[explode_num]._y = bulll._y;
}
bulll.gotoAndPlay(2);
pac.hit = 16;
bulll.speed = 0;
}
var _local1 = 0;
while (_local1 < wall_ar.length) {
if (((((bulll._x > (wall_ar[_local1]._x - (wall_ar[_local1]._width / 2))) && (bulll._x < (wall_ar[_local1]._x + (wall_ar[_local1]._width / 2)))) && (bulll._y > (wall_ar[_local1]._y - (wall_ar[_local1]._height / 2)))) && (bulll._y < (wall_ar[_local1]._y + (wall_ar[_local1]._height / 2)))) && (bulll._currentframe == 1)) {
if (bulll.id == 1) {
explode_num++;
var _local3 = attachMovie("expl", "expl" + explode_num, 65000 + explode_num);
explode_ar[explode_num] = _local3;
explode_ar[explode_num]._x = bulll._x;
explode_ar[explode_num]._y = bulll._y;
}
bulll.gotoAndPlay(2);
wall_ar[_local1].hit == 16;
bulll.speed = 0;
}
_local1++;
}
}
function hand_where() {
if (pac.hand == 0) {
var _local2 = 0;
while (_local2 < pac_weapon.length) {
pac_weapon[_local2]._x = 1000;
pac_weapon[_local2]._y = 1000;
_local2++;
}
}
var _local1 = 0;
while (_local1 < 200) {
if (pac.hand == _local1) {
pac_weapon[_local1 - 1]._x = pac._x;
pac_weapon[_local1 - 1]._y = pac._y;
pac_weapon[_local1 - 1]._rotation = pac_graphic._rotation;
pac_weapon[_local1 - 1]._xscale = pac_graphic._xscale;
}
_local1++;
}
_local1 = 0;
while (_local1 < 200) {
if (pac.hand != _local1) {
pac_weapon[_local1 - 1]._x = 1000;
pac_weapon[_local1 - 1]._Y = 1000;
}
_local1++;
}
if ((Key.isDown(17) && (pac.greande > 0)) && (greand_throw == 2)) {
throw_greande_en(pac_graphic);
greand_throw = 0;
pac.greande--;
}
if ((Key.isDown(32) && (go33 >= 1)) && (ammo > 0)) {
ammo--;
if (pac_weapon[pac.hand - 1] == pac_weapon[0]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 2;
enemy_mp4.attachSound("gunshots_sm.wav");
enemy_mp4.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[1]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 2;
enemy_mp3.attachSound("GUN04_cop.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[2]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 1;
enemy_mp3.attachSound("GUN04_cop.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[3]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 1;
enemy_mp3.attachSound("uzi.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[4]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 1;
enemy_mp3.attachSound("galil.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[5]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("M16.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[6]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("ak47.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[7]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 1;
enemy_mp3.attachSound("uzi.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[8]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 1;
enemy_mp3.attachSound("gunshots_sm.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[9]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("mp5.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[10]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("m16.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[11]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "rpg_mis");
go33 = go33 - 1;
}
if (pac_weapon[pac.hand - 1] == pac_weapon[12]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "rpg_mis");
go33 = go33 - 1;
}
if (pac_weapon[pac.hand - 1] == pac_weapon[13]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("mp5.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[14]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("aug.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[15]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "shot_ball");
go33 = go33 - 1;
enemy_mp3.attachSound("shotgun.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[16]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "rpg_mis");
go33 = go33 - 1;
}
if (pac_weapon[pac.hand - 1] == pac_weapon[17]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "shot_ball");
go33 = go33 - 1;
enemy_mp3.attachSound("mag.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[18]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("m16.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[19]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("m16a2.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[20]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball4");
go33 = go33 - 1;
enemy_mp3.attachSound("aug.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[21]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 1;
enemy_mp3.attachSound("pk96.wav");
enemy_mp3.start();
}
}
}
function shoot_en_bul2(gun, bullet) {
ebullpac++;
gun.gun.gotoAndPlay(2);
var _local3 = this.attachMovie(bullet, ("ball_pac" + ebullpac) + 1, ebullpac + 150000);
pac_shoot[ebullpac] = _local3;
gun_rad = Math.atan2(gun.gun._y, gun.gun._x);
gun_deg = (gun_rad * 180) / Math.PI;
rotat = gun._rotation + ((gun_deg - 360) + 90);
dx = Math.sin((Math.PI/180) * rotat);
dy = Math.cos((Math.PI/180) * rotat);
gun_xscal = Math.abs(gun._xscale);
_local3._rotation = gun._rotation;
pac_shoot_num[ebullpac] = 0;
dx_ar_pac[ebullpac] = dx;
yx_ar_pac[ebullpac] = dy;
_local3._x = gun._x + (dx * (-gun.gun._y));
_local3._y = gun._y - (((dy * (-gun.gun._y)) * gun._xscale) / gun_xscal);
dx = Math.sin((Math.PI/180) * (rotat + 6));
dy = Math.cos((Math.PI/180) * (rotat + 6));
dx_ar_pac[ebullpac] = dx;
yx_ar_pac[ebullpac] = dy;
if (((bullet == "ball2") || (bullet == "missle")) || (bullet == "rpg_mis")) {
_local3.speed = 5;
bull_move_ene2 = setInterval(ball_move2, 20, pac_shoot[ebullpac], ebullpac, gun.range, gun);
pac_shoot_ar[ebullpac] = bull_move_ene2;
}
if ((bullet == "ball3") || (bullet == "shot_ball")) {
_local3.speed = 5;
bull_move_ene2 = setInterval(ball_move2, 16, pac_shoot[ebullpac], ebullpac, gun.range, gun);
pac_shoot_ar[ebullpac] = bull_move_ene2;
}
if (bullet == "ball4") {
_local3.speed = 6;
bull_move_ene2 = setInterval(ball_move2, 10, pac_shoot[ebullpac], ebullpac, gun.range, gun);
pac_shoot_ar[ebullpac] = bull_move_ene2;
}
}
function ball_move2(bullet, numm24, rangeofammo2, ffgun) {
bull_hit_enem(pac_shoot[numm24]);
bullspeed1 = pac_shoot[numm24].speed;
bullet._x = bullet._x + (dx_ar_pac[numm24] * bullspeed1);
bullet._y = bullet._y - (yx_ar_pac[numm24] * bullspeed1);
pac_shoot_num[numm24]++;
if ((pac_shoot_num[numm24] == (rangeofammo2 / 2)) && (ffgun.rate1 == "semi")) {
go33 = 1;
}
if ((pac_shoot_num[numm24] == (rangeofammo2 / 4)) && (ffgun.rate1 == "auto")) {
go33 = 1;
}
if ((pac_shoot_num[numm24] == (rangeofammo2 / 3)) && (ffgun.rate1 == "semi_a")) {
go33 = 1;
}
if ((pac_shoot_num[numm24] >= rangeofammo2) && (ffgun.rate1 == "mono")) {
go33 = 1;
}
if (pac_shoot_num[numm24] >= rangeofammo2) {
removeMovieClip(pac_shoot[numm24]);
clearInterval(pac_shoot_ar[numm24]);
pac_shoot_num[numm24] = 0;
}
}
function bull_hit_enem(bulll) {
var _local3 = 0;
while (_local3 < enem_ar.length) {
if (((((((bulll._x + (bulll._width / 2)) > ((enem_ar[_local3]._x - (enem_ar[_local3]._width / 2)) + 5)) && ((bulll._x - bulll._width) < ((enem_ar[_local3]._x + (enem_ar[_local3]._width / 2)) - 5))) && ((bulll._y + (bulll._height / 2)) > ((enem_ar[_local3]._y - (enem_ar[_local3]._height / 2)) + 5))) && ((bulll._y - (bulll._height / 2)) < ((enem_ar[_local3]._y + (enem_ar[_local3]._height / 2)) - 5))) && (bulll._currentframe == 1)) && (enem_ar[_local3]._currentframe == 1)) {
var _local4 = 0;
while (_local4 < hand_en_ar.length) {
if (hand_en_ar[_local4].id == enem_ar[_local3].id) {
hand_en_ar[_local4].gotoAndPlay(2);
}
if (addons_ar[_local4].id == enem_ar[_local3].id) {
addons_ar[_local4].gotoAndPlay(2);
}
_local4++;
}
if (bulll.id == 1) {
explode_num++;
var _local5 = attachMovie("expl", "expl" + explode_num, 35000 + explode_num);
explode_ar[explode_num] = _local5;
explode_ar[explode_num]._x = bulll._x;
explode_ar[explode_num]._y = bulll._y;
}
bulll.gotoAndPlay(2);
enem_count++;
enem_ar[_local3].speed = 0;
num_enemys--;
_root.scoreplus("point_p_20", enem_ar[_local3]);
score_num = score_num + 20;
score.text = score.text - -20;
enem_ar[_local3].gotoAndPlay(2);
fade_enem_ar[enem_count] = 0;
inter_enemy_aa2 = setInterval(fade_enemy, 40, enem_ar[_local3], enem_count);
count_ar[enem_count] = inter_enemy_aa2;
trace("count=" + count_ar[enem_count]);
bulll.speed = 0;
}
_local3++;
}
_local3 = 0;
while (_local3 < wall_ar.length) {
if (((((bulll._x > (wall_ar[_local3]._x - (wall_ar[_local3]._width / 2))) && (bulll._x < (wall_ar[_local3]._x + (wall_ar[_local3]._width / 2)))) && (bulll._y > (wall_ar[_local3]._y - (wall_ar[_local3]._height / 2)))) && (bulll._y < (wall_ar[_local3]._y + (wall_ar[_local3]._height / 2)))) && (bulll._currentframe == 1)) {
if (bulll.id == 1) {
explode_num++;
var _local5 = attachMovie("expl", "expl" + explode_num, 35000 + explode_num);
explode_ar[explode_num] = _local5;
explode_ar[explode_num]._x = bulll._x;
explode_ar[explode_num]._y = bulll._y;
}
bulll.gotoAndPlay(2);
wall_ar[_local3].hit == 16;
bulll.speed = 0;
}
_local3++;
}
_local3 = 0;
while (_local3 < addons_ar.length) {
if (((((((bulll._x > (addons_ar[_local3]._x - (addons_ar[_local3]._width / 2))) && (bulll._x < (addons_ar[_local3]._x + (addons_ar[_local3]._width / 2)))) && (bulll._y > (addons_ar[_local3]._y - (addons_ar[_local3]._height / 2)))) && (bulll._y < (addons_ar[_local3]._y + (addons_ar[_local3]._height / 2)))) && (bulll._currentframe == 1)) && (addons_ar[_local3]._currentframe == 1)) && (addons_ar[_local3].trans > 0)) {
addons_ar[_local3].trans--;
if (bulll.id == 1) {
addons_ar[_local3].trans = addons_ar[_local3].trans - 2;
explode_num++;
var _local5 = attachMovie("expl", "expl" + explode_num, 35000 + explode_num);
explode_ar[explode_num] = _local5;
explode_ar[explode_num]._x = bulll._x;
explode_ar[explode_num]._y = bulll._y;
}
bulll.gotoAndPlay(2);
wall_ar[_local3].hit == 16;
bulll.speed = 0;
}
_local3++;
}
}
function collet_ammo() {
var _local1 = 0;
while (_local1 < 180) {
if ((((ammo_ar_take[_local1]._x > (pac._x - (pac._width / 2))) && (ammo_ar_take[_local1]._x < (pac._x + (pac._width / 2)))) && (ammo_ar_take[_local1]._y > (pac._y - (pac._height / 2)))) && (ammo_ar_take[_local1]._y < (pac._y + (pac._height / 2)))) {
trace("t=" + _local1);
if (_local1 == 0) {
ammo = 10 + _local1;
}
if (_local1 == 1) {
ammo = 6 + _local1;
}
if (_local1 == 2) {
ammo = 4 + _local1;
}
if (_local1 == 3) {
ammo = 14 + _local1;
}
if (_local1 == 4) {
ammo = 6 + _local1;
}
if (_local1 == 5) {
ammo = 7 + _local1;
}
if (_local1 == 6) {
ammo = 8 + _local1;
}
if (_local1 == 7) {
ammo = 13 + _local1;
}
if (_local1 == 8) {
ammo = 10;
pac.greande = 2;
}
if (_local1 == 9) {
ammo = 15;
pac.greande = 1;
}
if (_local1 == 10) {
ammo = 12;
pac.greande = 1;
}
if (_local1 == 11) {
ammo = 3;
}
if (_local1 == 12) {
ammo = 4;
}
if (_local1 == 13) {
ammo = 18;
pac.greande = 1;
}
if (_local1 == 14) {
ammo = 14;
pac.greande = 1;
}
if (_local1 == 15) {
ammo = 7;
pac.greande = 2;
}
if (_local1 == 16) {
ammo = 4;
}
if (_local1 == 17) {
ammo = 12;
pac.greande = 1;
}
if (_local1 == 18) {
ammo = 20;
pac.greande = 1;
}
if (_local1 == 19) {
ammo = 24;
pac.greande = 2;
}
if (_local1 == 20) {
ammo = 6;
pac.greande = 0;
}
if (_local1 == 21) {
ammo = 28;
pac.greande = 0;
}
pac.hand = _local1 + 1;
trace(pac.hand);
ammo_ar_take[_local1]._x = 900;
ammo_ar_take[_local1]._y = 900;
}
_local1++;
}
}
var go33 = 1;
var explode_ar = new Array();
var explode_num = 0;
pac.greande = 0;
var greand_throw = 2;
pac.hand = 0;
var bull_move_ene2;
var pac_shoot_ar = new Array();
var pac_shoot_num = new Array();
var pac_shoot = new Array();
var ebullpac = 0;
var dx_ar_pac = new Array();
var yx_ar_pac = new Array();
var count_ar = new Array();
function timeof() {
sec1++;
clock.text = sec1;
if (sec1 >= 59) {
sec1 = 0;
min1++;
clock_min.text = min1;
}
if (sec1 == 1) {
addenemy("enemy_swat", 100, 99, 2, "en_mag", "fbi");
}
if ((sec1 == 20) && (num_enemys < 9)) {
addenemy_pos("enemy_swat", 10, 90, 90, "en_law_camo", "us_army", 422, 105);
addenemy_pos("enemy_swat", 60, 40, 80, "en_mp5hk", "usa_swat", 508, 417);
}
if ((sec1 == 45) && (num_enemys < 9)) {
addenemy("enemy_swat", 60, 30, 60, "en_m5", "usa_swat");
}
if ((sec1 == 30) && (num_enemys < 7)) {
car.gotoAndPlay(2);
}
if ((((sec1 == 30) || (sec1 == 45)) || (sec1 == 10)) && (num_enemys < 6)) {
addenemy("enemyzz", 92, 90, 2, "en_commando", "usa_swat");
var _local1 = 0;
while (_local1 < addons_ar.length) {
addons_ar[_local1].greande = 1;
_local1++;
}
}
if (sec1 == 35) {
ammo_ar_take[21]._x = 500;
ammo_ar_take[21]._y = 95;
}
if (sec1 == 2) {
ammo_ar_take[8]._x = 350;
ammo_ar_take[8]._y = 95;
}
if ((sec1 == 40) && (min1 == 0)) {
ammo_ar_take[18]._x = 240;
ammo_ar_take[18]._y = 95;
}
if (sec1 == 25) {
ammo_ar_take[19]._x = 240;
ammo_ar_take[19]._y = 95;
ammo_ar_take[11]._x = 290;
ammo_ar_take[11]._y = 95;
}
}
function car_move() {
if (car.place == 5) {
car.place = 1;
addenemy_pos("enemy_swat", 80, 80, 80, "en_commando", "usa_swat", 332, 195);
addenemy_pos("enemy_swat", 80, 80, 80, "en_m4", "usa_swat", 300, 195);
}
}
function ball_move(bullet, numm2, rangeofammo, numB) {
bull_hit_pac(ball_shoot[numm2]);
bullspeed = ball_shoot[numm2].speed;
bullet._x = bullet._x + (dx_ar[numm2] * bullspeed);
bullet._y = bullet._y - (yx_ar[numm2] * bullspeed);
ball_shoot_num[numm2]++;
if (ball_shoot_num[numm2] >= rangeofammo) {
removeMovieClip(ball_shoot[numm2]);
clearInterval(ball_shoot_ar[numm2]);
ball_shoot_num[numm2] = 0;
}
}
function shoot_en_bul(gun, enemy, bullet, num1, num444, num5555) {
ebull++;
if (enemy.speed == 0) {
var _local3 = this.attachMovie(bullet, ("ball" + ebull) + 1, ebull + 50000);
ball_shoot[ebull] = _local3;
gun_rad = Math.atan2(gun.gun._y, gun.gun._x);
gun_deg = (gun_rad * 180) / Math.PI;
rotat = gun._rotation + ((gun_deg - 360) + 90);
dx = Math.sin((Math.PI/180) * rotat);
dy = Math.cos((Math.PI/180) * rotat);
gun_xscal = Math.abs(gun._xscale);
ball_shoot_num[ebull] = 0;
dx_ar[ebull] = dx;
yx_ar[ebull] = dy;
_local3._x = gun._x + (dx * (-gun.gun._y));
_local3._y = gun._y - (((dy * (-gun.gun._y)) * gun._xscale) / gun_xscal);
_local3._rotation = gun._rotation;
rotat = gun._rotation + ((gun_deg - 360) + 90);
dx = Math.sin((Math.PI/180) * (rotat + 5));
dy = Math.cos((Math.PI/180) * (rotat + 5));
dx_ar[ebull] = dx;
yx_ar[ebull] = dy;
if (gun.kindof == "hand_en") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "hand_en2") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_m16") {
_local3.speed = 6;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_m1") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_uzi") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 15, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_gal") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_ak47") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 17, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_bizon") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 19, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_pk96") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 18, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_rpg") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 19, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_glock") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 16, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_mp5hk") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 15, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_sa80") {
_local3.speed = 6;
bull_move_ene = setInterval(ball_move, 18, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_law") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 19, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_law_camo") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 17, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_mp5g") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 14, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_aug") {
_local3.speed = 6;
bull_move_ene = setInterval(ball_move, 17, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_shotgun") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 17, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "APC_MACHINE") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 17, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_mag") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 17, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_m4") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 16, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_commando") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 14, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_m5") {
_local3.speed = 6;
bull_move_ene = setInterval(ball_move, 9, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_m60") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 17, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
}
}
function shoot_enema(zzz, eee, num) {
if ((zzz.speed == 0) && (enem_time_ar[num] == 2)) {
var _local4 = 0;
while (_local4 < addons_ar.length) {
if (((addons_ar[_local4].id == zzz.id) && (addons_ar[_local4].greande > 0)) && (addons_ar[_local4].kindof == "explode")) {
throw_greande_en(addons_ar[_local4]);
addons_ar[_local4].greande--;
}
_local4++;
}
}
if (((eee.kindof == "hand_en") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 10) {
eee.number = 0;
enemy_mp4.attachSound("gunshots_sm.wav");
enemy_mp4.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 20, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "hand_en2") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 6) {
eee.number = 0;
enemy_mp3.attachSound("GUN04_cop.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 30, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_m16") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 3) {
eee.number = 0;
enemy_mp3.attachSound("M16.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 70, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
zzz.ifstop = 1;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_m1") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 6) {
eee.number = 0;
enemy_mp3.attachSound("GUN04_cop.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 70, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_uzi") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 4) {
eee.gun.gotoAndPlay(2);
enemy_mp3.attachSound("uzi.wav");
enemy_mp3.start();
shoot_en_bul(eee, zzz, "ball2", 1, 20, num);
}
if (enem_time_ar[num] > 5) {
eee.number = 0;
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 20, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_gal") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 5) {
eee.number = 0;
enemy_mp3.attachSound("galil.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 36, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_ak47") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 3) {
eee.number = 0;
enemy_mp3.attachSound("ak47.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 38, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_bizon") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 3) {
eee.gun.gotoAndPlay(2);
enemy_mp3.attachSound("uzi.wav");
enemy_mp3.start();
shoot_en_bul(eee, zzz, "ball2", 1, 22, num);
}
if (enem_time_ar[num] > 4) {
eee.number = 0;
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 22, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_pk96") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 2) {
eee.gun.gotoAndPlay(2);
enemy_mp3.attachSound("pk96.wav");
enemy_mp3.start();
shoot_en_bul(eee, zzz, "ball2", 1, 34, num);
}
if (enem_time_ar[num] == 3) {
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 34, num);
}
if (enem_time_ar[num] > 4) {
eee.number = 0;
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 34, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_rpg") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 4) {
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "rpg_mis", 1, 100, num);
}
if (enem_time_ar[num] > 8) {
eee.number = 0;
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_glock") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 2) {
eee.number = 0;
enemy_mp3.attachSound("gunshots_sm.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 22, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_mp5hk") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 1) {
eee.gun.gotoAndPlay(2);
enemy_mp3.attachSound("mp5.wav");
enemy_mp3.start();
shoot_en_bul(eee, zzz, "ball3", 1, 26, num);
}
if (enem_time_ar[num] > 3) {
eee.number = 0;
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 26, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_sa80") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 3) {
eee.number = 0;
enemy_mp3.attachSound("M16.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 70, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
zzz.ifstop = 1;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_law") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 3) {
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "rpg_mis", 1, 130, num);
}
if (enem_time_ar[num] > 8) {
eee.number = 0;
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_mp5g") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 1) {
eee.gun.gotoAndPlay(2);
enemy_mp3.attachSound("mp5.wav");
enemy_mp3.start();
shoot_en_bul(eee, zzz, "ball3", 1, 28, num);
}
if (enem_time_ar[num] > 3) {
eee.number = 0;
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 28, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_aug") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 3) {
eee.number = 0;
enemy_mp3.attachSound("aug.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 70, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
zzz.ifstop = 1;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_shotgun") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 3) {
eee.number = 0;
enemy_mp3.attachSound("shotgun.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "shot_ball", 1, 24, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
zzz.ifstop = 1;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_law_camo") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 3) {
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "rpg_mis", 1, 130, num);
}
if (enem_time_ar[num] > 6) {
eee.number = 0;
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_mag") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 3) {
eee.number = 0;
enemy_mp3.attachSound("mag.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "shot_ball", 1, 24, num);
zzz.speed = 4;
enem_time_ar[num] = 0;
eee.number = 0;
zzz.ifstop = 1;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_commando") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 1) {
eee.gun.gotoAndPlay(2);
enemy_mp3.attachSound("m16a2.wav");
enemy_mp3.start();
shoot_en_bul(eee, zzz, "ball3", 1, 30, num);
}
if (enem_time_ar[num] > 3) {
eee.number = 0;
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 30, num);
zzz.speed = 2.5;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_m5") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 3) {
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball4", 1, 90, num);
enemy_mp3.attachSound("aug.wav");
enemy_mp3.start();
}
if (enem_time_ar[num] > 8) {
eee.number = 0;
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_m60") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 2) {
eee.gun.gotoAndPlay(2);
enemy_mp3.attachSound("pk96.wav");
enemy_mp3.start();
shoot_en_bul(eee, zzz, "ball2", 1, 40, num);
}
if (enem_time_ar[num] == 3) {
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 40, num);
}
if (enem_time_ar[num] > 4) {
eee.number = 0;
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 34, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "APC_MACHINE") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 3) {
eee.number = 0;
enemy_mp3.attachSound("aug.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 70, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
zzz.ifstop = 1;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_m4") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 2) {
eee.number = 0;
enemy_mp3.attachSound("M16.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 60, num);
zzz.speed = 3;
enem_time_ar[num] = 0;
eee.number = 0;
zzz.ifstop = 1;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
}
function shoot_enem(ttt, aaa) {
if (((((((ttt._x >= (pac._x - 10)) && (ttt._x <= (pac._x + 10))) && (ttt.speed >= 2)) && (ttt != null)) && (ttt._y >= (pac._y - aaa.range))) && (ttt._y <= (pac._y + aaa.range))) && (aaa != null)) {
if ((ttt._y <= pac._y) && (ttt.speed >= 2)) {
var _local2 = 0;
while (_local2 < wall_ar.length) {
if (((((((ttt._x < (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2))) && (ttt._x > (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (if_right == 0)) && (pac._x > (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (pac._x < (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2)))) && (ttt._y < (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (pac._y > (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2)))) {
ttt.ifstop = 1;
}
_local2++;
}
trace("donw");
if (ttt.ifstop == 1) {
ttt.ifstop = 0;
} else if (ttt.ifstop == 0) {
shoot_d++;
enem_time_ar[shoot_d] = 0;
ttt.speed = 0;
ttt.pos = "down";
aaa.number = 1;
clearInterval(aaa.interr);
inter_shoot = setInterval(shoot_enema, 120, ttt, aaa, shoot_d);
enem_aar[shoot_d] = inter_shoot;
aaa.interr = inter_shoot;
}
}
if ((ttt._y > pac._y) && (ttt.speed >= 2)) {
var _local2 = 0;
while (_local2 < wall_ar.length) {
if (((((((ttt._x < (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2))) && (ttt._x > (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (if_right == 0)) && (pac._x > (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (pac._x < (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2)))) && (ttt._y > (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2)))) && (pac._y < (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) {
ttt.ifstop = 1;
}
_local2++;
}
if (ttt.ifstop == 1) {
ttt.ifstop = 0;
} else if (ttt.ifstop == 0) {
shoot_d++;
enem_time_ar[shoot_d] = 0;
ttt.speed = 0;
ttt.pos = "up";
}
aaa.number = 1;
clearInterval(aaa.interr);
inter_shoot = setInterval(shoot_enema, 120, ttt, aaa, shoot_d);
enem_aar[shoot_d] = inter_shoot;
aaa.interr = inter_shoot;
}
} else if (((((((ttt._y >= (pac._y - 10)) && (ttt._y <= (pac._y + 10))) && (ttt.speed >= 2)) && (ttt != null)) && (ttt._x >= (pac._x - aaa.range))) && (ttt._x <= (pac._x + aaa.range))) && (aaa != null)) {
if ((ttt._x <= pac._x) && (ttt.speed >= 2)) {
var _local2 = 0;
while (_local2 < wall_ar.length) {
if (((((((ttt._y < (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2))) && (ttt._y > (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (if_right == 0)) && (pac._y > (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (pac._y < (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2)))) && (ttt._x < (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (pac._x > (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2)))) {
ttt.ifstop = 1;
}
_local2++;
}
if (ttt.ifstop == 1) {
ttt.ifstop = 0;
} else if (ttt.ifstop == 0) {
shoot_d++;
enem_time_ar[shoot_d] = 0;
ttt.speed = 0;
aaa.number = 1;
ttt.pos = "right";
clearInterval(aaa.interr);
inter_shoot = setInterval(shoot_enema, 120, ttt, aaa, shoot_d);
enem_aar[shoot_d] = inter_shoot;
aaa.interr = inter_shoot;
}
}
if ((ttt._x > pac._x) && (ttt.speed >= 2)) {
var _local2 = 0;
while (_local2 < wall_ar.length) {
if (((((((ttt._y < (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2))) && (ttt._y > (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (if_right == 0)) && (pac._y > (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (pac._y < (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2)))) && (ttt._x > (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2)))) && (pac._x < (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) {
trace("okL");
ttt.ifstop = 1;
}
_local2++;
}
if (ttt.ifstop == 1) {
ttt.ifstop = 0;
} else if (ttt.ifstop == 0) {
shoot_d++;
enem_time_ar[shoot_d] = 0;
ttt.speed = 0;
aaa.number = 1;
ttt.pos = "left";
clearInterval(aaa.interr);
inter_shoot = setInterval(shoot_enema, 120, ttt, aaa, shoot_d);
enem_aar[shoot_d] = inter_shoot;
aaa.interr = inter_shoot;
}
}
}
}
function throw_greande_en(enem) {
greande_num++;
var _local2 = attachMovie("greande", "greandee" + greande_num, 75500 + greande_num);
greande_ar[greande_num] = _local2;
trace(greande_ar[greande_num]);
greande_ar[greande_num]._x = enem._x;
greande_ar[greande_num]._y = enem._y;
greande_ar[greande_num]._rotation = enem._rotation;
greande_ar[greande_num]._xscale = enem._xscale;
trace(greande_ar[greande_num]._y);
}
function explode_greande() {
var _local1 = 0;
while (_local1 < greande_ar.length) {
if (greande_ar[_local1].count == 11) {
trace("boom");
greand_throw = 2;
rotat = greande_ar[_local1]._rotation;
dx = Math.sin((Math.PI/180) * rotat);
dy = Math.cos((Math.PI/180) * rotat);
explode_num++;
var _local2 = attachMovie("expl", "expl" + explode_num, 65000 + explode_num);
explode_ar[explode_num] = _local2;
explode_ar[explode_num]._x = greande_ar[_local1]._x + (dx * 220);
explode_ar[explode_num]._y = greande_ar[_local1]._y - (dy * 220);
removeMovieClip(greande_ar[_local1]);
}
_local1++;
}
}
clearInterval(time_in);
var time_in;
var sec1 = 0;
var min1 = 0;
var ebull = 0;
var ammo_ar_take = new Array();
ammo_ar_take[0] = gun_ammo;
ammo_ar_take[1] = m14_ammo;
ammo_ar_take[2] = m1_ammo;
ammo_ar_take[3] = uzi_ammo;
ammo_ar_take[4] = gal_ammo;
ammo_ar_take[5] = m16_ammo;
ammo_ar_take[6] = ak47_ammo;
ammo_ar_take[7] = bizon_ammo;
ammo_ar_take[8] = glock_ammo;
ammo_ar_take[9] = mp5hk_ammo;
ammo_ar_take[10] = sa80_ammo;
ammo_ar_take[11] = rpg_ammo;
ammo_ar_take[12] = law_ammo;
ammo_ar_take[13] = mp5g_ammo;
ammo_ar_take[14] = aug_ammo;
ammo_ar_take[15] = shotgun_ammo;
ammo_ar_take[16] = camo_law_ammo;
ammo_ar_take[17] = mag_ammo;
ammo_ar_take[18] = m4_ammo;
ammo_ar_take[19] = commando_ammo;
ammo_ar_take[20] = m5_ammo;
ammo_ar_take[21] = m60_ammo;
time_in = setInterval(timeof, 1000);
addenemy("enemy_swat", 12, 40, 80, "en_glock", "usa_cop");
var shoot_d = 0;
var inter_shoot_c = 0;
var inter_shoot;
var inter_shootb;
var enem_aar = new Array();
var enem_time_ar = new Array();
var ball_shoot = new Array();
var bull_move_ene;
var ball_shoot_ar = new Array();
var ball_shoot_num = new Array();
var dx_ar = new Array();
var yx_ar = new Array();
var enemy_mp4 = new Sound();
var enemy_mp3 = new Sound();
var if_right = 0;
var greande_num = 0;
var greande_ar = new Array();
Instance of Symbol 425 MovieClip [empty] "controller" in Frame 18
onClipEvent (enterFrame) {
if (_root.score_num <= 0) {
_root.score_num = 0;
}
_root.detectKeys();
_root.collectcoin();
_root.hand_where();
_root.explode_greande();
_root.exp_hit_pac();
_root.car_move();
updateAfterEvent();
}
Frame 19
clearInterval(interhit);
stop();
var i = 0;
while (i < enem_ar.length) {
removeMovieClip(enem_ar[i]);
removeMovieClip(pac_graphic);
removeMovieClip(hand_en_ar[i]);
removeMovieClip(hand_pac);
removeMovieClip(addons_ar[i]);
removeMovieClip(places[i]);
removeMovieClip(explode_ar[i]);
i++;
}
var gonext4 = 0;
var i = 0;
while (i < 10000) {
clearInterval(i);
clearInterval(score_MC_AR_del[i]);
removeMovieClip(score_MC_AR[i]);
clearInterval(interhit);
clearInterval(enem_aar[i]);
clearInterval(bbb[i]);
clearInterval(ball_shoot_ar[i]);
removeMovieClip(ball_shoot[i]);
clearInterval(pac_shoot_ar);
removeMovieClip(pac_shoot[i]);
clearInterval(count_ar[i]);
fade_enem_ar[i] = 0;
removeMovieClip(ammo_ar_take[i]);
removeMovieClip(enem_add);
removeMovieClip(gun_add);
removeMovieClip(pac_weapon[i]);
clearInterval(time_in);
i++;
}
if (uover == 100) {
clearInterval(uover_in);
gotoAndPlay (6);
}
function goover() {
uover--;
}
function play44() {
gotoAndPlay (6);
}
var uover_in;
uover = 5;
uover_in = setInterval(goover, 1000);
function detectKeys() {
if (Key.isDown(32) && (_root.gonext4 == 4)) {
gotoAndStop (20);
}
}
Instance of Symbol 425 MovieClip [empty] "controller" in Frame 19
onClipEvent (enterFrame) {
_root.detectKeys();
}
Instance of Symbol 551 MovieClip "com" in Frame 19
on (press) {
getURL ("http://games.fs1.co.il", "_blank");
}
Frame 20
stop();
clearInterval(interhit);
var i = 0;
while (i < enem_ar.length) {
removeMovieClip(enem_ar[i]);
removeMovieClip(pac_graphic);
removeMovieClip(hand_en_ar[i]);
removeMovieClip(hand_pac);
removeMovieClip(addons_ar[i]);
removeMovieClip(explode_ar[i]);
i++;
}
var i = 0;
while (i < 10000) {
clearInterval(i);
clearInterval(score_MC_AR_del[i]);
removeMovieClip(score_MC_AR[i]);
clearInterval(interhit);
clearInterval(enem_aar[i]);
clearInterval(bbb[i]);
clearInterval(ball_shoot_ar[i]);
removeMovieClip(ball_shoot[i]);
clearInterval(pac_shoot_ar);
removeMovieClip(pac_shoot[i]);
clearInterval(count_ar[i]);
fade_enem_ar[i] = 0;
removeMovieClip(ammo_ar_take[i]);
removeMovieClip(enem_add);
removeMovieClip(gun_add);
removeMovieClip(pac_weapon[i]);
clearInterval(time_in);
i++;
}
function alpha(ttt) {
var _local1 = 0;
while (_local1 < ttt.length) {
ttt[_local1]._visible = 0;
_local1++;
}
}
var ld_ar = new Array(d_l1, d_l2, d_l3, d_l4, d_l5, d_l6, d_l7, d_l8, d_l9, d_l10, d_l11);
ld_ar.dd = "d_l";
var rd_ar = new Array(d_r1, d_r2, d_r3, d_r4, d_r5, d_r6, d_r7, d_r8, d_r9, d_r10, d_r11);
rd_ar.dd = "d_r";
var ru_ar = new Array(u_r1, u_r2, u_r3, u_r4, u_r5, u_r6, u_r7, u_r8, u_r9, u_r10, u_r11);
ru_ar.dd = "u_r";
var lu_ar = new Array(u_l1, u_l2, u_l3, u_l4, u_l5, u_l6, u_l7, u_l8, u_l9, u_l10, u_l11);
lu_ar.dd = "u_l";
var places = new Array();
alpha(ld_ar);
alpha(rd_ar);
alpha(ru_ar);
alpha(lu_ar);
places[0] = monk_a0;
places[1] = monk_a1;
places[0]._x = 360;
places[0]._y = 330;
places[1]._x = 174;
places[1]._y = 330;
function guideof(ttt) {
var _local2 = 0;
while (_local2 < ttt.length) {
if (pac.hitTest(ttt[_local2]._x, ttt[_local2]._y, yes)) {
if (ttt.dd == "d_l") {
pac._x = pac._x - 4;
pac._y = pac._y + 4;
} else if (ttt.dd == "d_r") {
pac._x = pac._x + 4;
pac._y = pac._y + 4;
} else if (ttt.dd == "u_r") {
pac._x = pac._x + 4;
pac._y = pac._y - 4;
} else if (ttt.dd == "u_l") {
pac._x = pac._x - 4;
pac._y = pac._y - 4;
}
}
_local2++;
}
}
function pachit(aaa) {
if (life <= 0) {
score_num = score_num - 1000;
levelof = "level9";
gotoAndStop ("gameover");
}
life_mc.gotoAndStop(life);
if (pac.hit > 0) {
if (pac.caneat == 0) {
myTransform.ba = myTransform.ba - 5;
myTransform.ga = myTransform.ga - 5;
my_color.setTransform(myTransform);
}
pac.hit--;
} else if (pac.hit < 0) {
pac.hit = 0;
}
if (pac.hit == 0) {
if (myTransform.ba < 100) {
myTransform.ba = myTransform.ba + 5;
myTransform.ga = myTransform.ga + 5;
my_color.setTransform(myTransform);
}
}
updateAfterEvent();
if (pac.caneat > 0) {
aaa.speed = 0;
myTransform.ra = myTransform.ra - 5;
myTransform.ba = myTransform.ba - 5;
my_color.setTransform(myTransform);
pac.caneat--;
}
if (pac.caneat < 0) {
pac.caneat = 0;
}
if ((pac.caneat == 0) && (pac.hit == 0)) {
pac.hit == 0;
if (myTransform.ra < 100) {
myTransform.ra = 100;
myTransform.ba = 100;
myTransform.ga = 100;
my_color.setTransform(myTransform);
}
}
updateAfterEvent();
}
function movea() {
check1(pac);
if (pac._rotation == 90) {
pac._x = pac._x + speed_pac;
}
if (pac._rotation == -90) {
pac._x = pac._x - speed_pac;
}
if (pac._rotation == 180) {
pac._y = pac._y + speed_pac;
}
if (pac._rotation == 0) {
pac._y = pac._y - speed_pac;
}
tt++;
if (tt >= 4) {
tt = 0;
clearInterval(intermove_pac);
}
updateAfterEvent();
}
function detectKeys() {
collet_ammo();
ammo_txt.text = ammo;
greande_txt.text = pac.greande;
pac_graphic._x = pac._x;
pac_graphic._y = pac._y;
updateAfterEvent();
pacx.text = pac._x;
speed_pac = 5;
if (pac.hit > 8) {
speed_pac = 0;
}
if (Key.isDown(39) && (pac._x <= (760 - (pac._width / 2)))) {
clearInterval(intermove_pac);
check1(pac);
pac._x = pac._x + speed_pac;
pac._rotation = 90;
pac_graphic._rotation = 90;
if (pac_graphic._xscale == 100) {
pac_graphic._xscale = -pac_graphic._xscale;
}
if (pac_graphic._currentframe == "1") {
pac_graphic.nextFrame();
}
}
if (ammo == 0) {
pac.hand = 0;
}
if (Key.isDown(37) && (pac._x >= (0 + (pac._width / 2)))) {
clearInterval(intermove_pac);
check1(pac);
pac._x = pac._x - speed_pac;
if (pac_graphic._xscale == -100) {
pac_graphic._xscale = -pac_graphic._xscale;
}
pac_graphic._rotation = 270;
if (pac_graphic._currentframe == "1") {
pac_graphic.nextFrame();
}
}
if (Key.isDown(38) && (pac._y >= 70)) {
clearInterval(intermove_pac);
check1(pac);
pac._y = pac._y - speed_pac;
pac._rotation = 0;
pac_graphic._rotation = 0;
if (pac_graphic._xscale == -100) {
pac_graphic._xscale = -pac_graphic._xscale;
}
if (pac_graphic._currentframe == "1") {
pac_graphic.nextFrame();
}
}
if (Key.isDown(40) && (pac._y <= (500 - (pac._height / 2)))) {
clearInterval(intermove_pac);
check1(pac);
pac._rotation = 180;
pac._y = pac._y + speed_pac;
pac_graphic._rotation = 180;
if (pac_graphic._xscale == -100) {
pac_graphic._xscale = -pac_graphic._xscale;
}
if (pac_graphic._currentframe == "1") {
pac_graphic.nextFrame();
}
}
updateAfterEvent();
}
function check1(hit) {
var _local1 = 0;
while (_local1 < wall_ar.length) {
var _local5 = (wall_ar[_local1]._x - (wall_ar[_local1]._width / 2)) - 2;
var _local3 = (wall_ar[_local1]._x + (wall_ar[_local1]._width / 2)) + 2;
var _local4 = (wall_ar[_local1]._y - (wall_ar[_local1]._height / 2)) - 2;
var _local6 = (wall_ar[_local1]._y + (wall_ar[_local1]._height / 2)) + 2;
if (((hit._x >= _local5) && (hit._x <= _local3)) && ((hit._y <= _local6) && (hit._y >= _local4))) {
if (Key.isDown(38) && ((hit._y - (hit._height / 2)) >= (wall_ar[_local1]._y - 3))) {
guideof(ld_ar);
guideof(rd_ar);
guideof(ru_ar);
guideof(lu_ar);
speed_pac = 0;
trace("we cant up");
}
if (Key.isDown(40) && ((hit._y + (hit._height / 2)) <= (wall_ar[_local1]._y + 3))) {
guideof(ld_ar);
guideof(rd_ar);
guideof(ru_ar);
guideof(lu_ar);
speed_pac = 0;
trace("we cant down");
}
if (Key.isDown(39) && ((hit._x + (hit._width / 2)) <= (wall_ar[_local1]._x + 3))) {
guideof(ld_ar);
guideof(rd_ar);
guideof(ru_ar);
guideof(lu_ar);
speed_pac = 0;
trace("we cant right");
}
if (Key.isDown(37) && ((hit._x - (hit._width / 2)) >= (wall_ar[_local1]._x - 3))) {
guideof(ld_ar);
guideof(rd_ar);
guideof(ru_ar);
guideof(lu_ar);
speed_pac = 0;
trace("we cant left");
}
}
_local1++;
}
}
var pac_graphic3 = attachMovie("masok_move", "car", 2000000);
trace(pac_graphic3);
pac_graphic3._x = 895;
pac_graphic3._y = 164;
var pac_graphic1 = attachMovie("pacman_graphic2", "pac_graphic", 1);
var pac_graphic1 = attachMovie("hand_pac", "hand_pac", 1002);
var pac_graphic1 = attachMovie("m14_pac", "m14_pac", 1003);
var pac_graphic1 = attachMovie("m1_pac", "m1_pac", 1004);
var pac_graphic1 = attachMovie("uzi_pac", "uzi_pac", 1005);
var pac_graphic1 = attachMovie("gal_pac", "gal_pac", 1006);
var pac_graphic1 = attachMovie("m16_pac", "m16_pac", 1007);
var pac_graphic1 = attachMovie("ak47_pac", "ak47_pac", 1008);
var pac_graphic1 = attachMovie("bizon_pac", "bizon_pac", 1009);
var pac_graphic1 = attachMovie("glock_pac", "glock_pac", 1010);
var pac_graphic1 = attachMovie("mp5hk_pac ", "mp5hk_pac", 1011);
var pac_graphic1 = attachMovie("sa80_pac ", "sa80_pac", 1012);
var pac_graphic1 = attachMovie("rpg_pac", "rpg_pac", 1013);
var pac_graphic1 = attachMovie("law_pac", "law_pac", 1014);
var pac_graphic1 = attachMovie("mp5g_pac", "mp5g_pac", 1015);
var pac_graphic1 = attachMovie("aug_pac ", "aug_pac", 1016);
var pac_graphic1 = attachMovie("shotgun_pac", "shotgun_pac", 1017);
var pac_graphic1 = attachMovie("law_camo_pac", "law_camo_pac", 1018);
var pac_graphic1 = attachMovie("mag_pac", "mag_pac", 1019);
var pac_graphic1 = attachMovie("m4_pac", "m4_pac", 1020);
var pac_graphic1 = attachMovie("commando_pac", "commando_pac", 1021);
var pac_graphic1 = attachMovie("m5_pac", "m5_pac", 1022);
var pac_graphic1 = attachMovie("m60_pac", "m60_pac", 1023);
var pac_graphic1 = attachMovie("mp5_sd_pac", "mp5_sd_pac", 1024);
var pac_graphic1 = attachMovie("desert_pac", "desert_pac", 1025);
var pac_graphic1 = attachMovie("g36_pac", "g36_pac", 1026);
var pac_graphic1 = attachMovie("at_pac", "at_pac", 1027);
pac_graphic._x = pac._x;
pac_graphic._y = pac._y;
pac._visible = 0;
pac.hit = "0";
pac.caneat = "0";
var interhit;
var tt = 0;
var my_color = new Color(_root.pac_graphic);
var myTransform = my_color.getTransform();
var ammo = 0;
var pac_weapon = new Array();
pac_weapon[0] = hand_pac;
pac_weapon[1] = m14_pac;
pac_weapon[2] = m1_pac;
pac_weapon[3] = uzi_pac;
pac_weapon[4] = gal_pac;
pac_weapon[5] = m16_pac;
pac_weapon[6] = ak47_pac;
pac_weapon[7] = bizon_pac;
pac_weapon[8] = glock_pac;
pac_weapon[9] = mp5hk_pac;
pac_weapon[10] = sa80_pac;
pac_weapon[11] = rpg_pac;
pac_weapon[12] = law_pac;
pac_weapon[13] = mp5g_pac;
pac_weapon[14] = aug_pac;
pac_weapon[15] = shotgun_pac;
pac_weapon[16] = law_camo_pac;
pac_weapon[17] = mag_pac;
pac_weapon[18] = m4_pac;
pac_weapon[19] = commando_pac;
pac_weapon[20] = m5_pac;
pac_weapon[21] = m60_pac;
pac_weapon[22] = mp5_sd_pac;
pac_weapon[23] = desert_pac;
pac_weapon[24] = g36_pac;
pac_weapon[25] = at_pac;
interhit = setInterval(pachit, 50);
pac_graphic._currentframe = 1;
var oKey = new Object();
var wall_ar = new Array(wall1, wall2, wall3, wall4, wall5, wall6, wall7, wall8, wall9, wall10, wall11, wall12, wall13, wall14, wall15, wall16, wall17, wall18, wall19, wall20, wall21, wall22, wall23);
var speed_pac = 3;
pac_graphic._xscale = 100;
Key.addListener(oKey);
var a = 0;
function collectcoin() {
if (end >= 60) {
score_num = score_num - ((sec1 * min1) * 5);
score_num = score_num - ((10 - life) * 50);
gotoAndStop ("level10");
end = 0;
trace("end");
}
backu(backs_u_ar, pac);
backu(backs_l_ar, pac);
backu(backs_d_ar, pac);
backu(backs_r_ar, pac);
var _local1 = 0;
while (_local1 < gold_ar.length) {
if (pac.hitTest(gold_ar[_local1]._x, gold_ar[_local1]._y, yes)) {
pac_graphic.gotoAndPlay("eat");
scoreplus("point_p_10", gold_ar[_local1]);
gold_ar[_local1]._x = 800;
gold_ar[_local1]._y = 1000;
removeMovieClip(gold_ar[_local1]);
my_sound.attachSound("blip.mp3");
my_sound.start();
score_num = score_num + 10;
score.text = score_num;
end++;
}
_local1++;
}
_local1 = 0;
while (_local1 < gold_big_ar.length) {
if (pac.hitTest(gold_big_ar[_local1]._x, gold_big_ar[_local1]._y, yes)) {
pac.caneat = 80;
pac_graphic.gotoAndPlay("eat");
scoreplus("point_p_10", gold_big_ar[_local1]);
gold_big_ar[_local1]._x = 800;
gold_big_ar[_local1]._y = 1000;
removeMovieClip(gold_ar[_local1]);
my_sound.attachSound("blip.mp3");
my_sound.start();
score_num = score_num + 10;
score.text = score_num;
}
_local1++;
}
}
function backu(ttt, sss) {
var _local3 = 0;
while (_local3 < 15) {
if (sss.hitTest(ttt[_local3])) {
if (ttt.info == "up") {
sss._y = 480;
} else if (ttt.info == "left") {
sss._x = 730;
} else if (ttt.info == "down") {
sss._y = 90;
} else if (ttt.info == "right") {
sss._x = 20;
}
}
_local3++;
}
}
function scoreplus(sss, aaa) {
clearinterval(noscore);
s_score = "point_p_10" + scoree;
var _local1 = attachMovie(sss, s_score, scoree + 200000);
scoree++;
_local1._x = aaa._x;
_local1._y = aaa._y;
score_MC_AR[scoree] = _local1;
noscore = setInterval(score_fade, 20, score_MC_AR[scoree]);
score_MC_AR_del[scoree] = noscore;
}
function score_fade(bbb) {
bbb._y = bbb._y - 3;
bbb._alpha = bbb._alpha - 5;
if (bbb._alpha <= 10) {
clearInterval(score_MC_AR[bbb]);
}
}
var gold_ar = new Array(gold, gold1, gold2, gold3, gold4, gold5, gold6, gold7, gold8, gold9, gold10, gold11, gold12, gold13, gold14, gold15, gold16, gold17, gold18, gold19, gold20, gold21, gold22, gold23, gold24, gold25, gold26, gold27, gold28, gold29, gold30, gold31, gold32, gold33, gold34, gold35, gold36, gold37, gold38, gold39, gold40, gold41, gold42, gold43, gold44, gold45, gold46, gold47, gold48, gold49, gold50, gold51, gold52, gold53, gold54, gold55, gold56, gold57, gold58, gold59, gold60, gold61, gold62, gold63, gold64, gold65, gold66, gold67, gold68, gold69, gold70, gold71, gold72, gold73, gold74, gold75, gold76, gold77, gold78, gold79, gold80, gold81, gold82, gold83, gold84, gold85, gold86, gold87, gold88, gold89, gold90, gold91, gold92, gold93, gold94, gold95, gold96, gold97, gold98, gold99);
var gold_big_ar = new Array(gold_big1, gold_big2, gold_big3, gold_big4);
var my_sound = new Sound();
var backs_u_ar = new Array(u_back, u_back1, u_back2);
backs_u_ar.info = "up";
var backs_l_ar = new Array(l_back, l_back1, l_back2);
backs_l_ar.info = "left";
var backs_d_ar = new Array(d_back, d_back1, d_back2);
backs_d_ar.info = "down";
var backs_r_ar = new Array(r_back, r_back1, r_back2);
backs_r_ar.info = "right";
var allback = new Array(backs_u_ar, backs_l_ar, backs_r_ar, backs_d_ar);
var i = 0;
while (i < 30) {
var j = 0;
while (j < 10) {
allback[i][j]._visible = 0;
c_guide_ar[j]._visible = 0;
j++;
}
i++;
}
var end = 0;
var oKey1 = new Object();
Key.addListener(oKey1);
var scoree = 0;
var noscore;
var score_MC_AR_del = new Array();
var score_MC_AR = new Array();
function enem_move(ttt, gun, add1) {
if (ttt != undefined) {
exp_hit_enem(ttt);
shoot_enem(ttt, gun);
check_hit_pac(ttt);
check2(ttt);
backu1(backs_u_ar, ttt);
backu1(backs_l_ar, ttt);
backu1(backs_d_ar, ttt);
backu1(backs_r_ar, ttt);
}
if (ttt.pos == "left") {
ttt._x = ttt._x - ttt.speed;
ttt._rotation = 270;
if ((ttt._xscale <= -90) && (ttt._currentframe == 1)) {
ttt._xscale = -ttt._xscale;
}
}
if (ttt.pos == "right") {
ttt._x = ttt._x + ttt.speed;
ttt._rotation = 90;
if ((ttt._xscale >= 90) && (ttt._currentframe == 1)) {
ttt._xscale = -ttt._xscale;
}
}
if (ttt.pos == "up") {
ttt._y = ttt._y - ttt.speed;
ttt._rotation = 0;
if ((ttt._xscale <= -90) && (ttt._currentframe == 1)) {
ttt._xscale = -ttt._xscale;
}
}
if (ttt.pos == "down") {
ttt._y = ttt._y + ttt.speed;
ttt._rotation = 180;
if ((ttt._xscale <= -90) && (ttt._currentframe == 1)) {
ttt._xscale = -ttt._xscale;
}
}
if (ttt.pos == "mixed") {
var _local6 = ttt._rotation + 10;
dx = Math.cos((Math.PI/180) * _local6);
dy = Math.sin((Math.PI/180) * _local6);
ttt._x = ttt._x + (dx * ttt.speed);
ttt._y = ttt._y + (dy * ttt.speed);
}
gun._x = ttt._x;
gun._y = ttt._y;
gun._rotation = ttt._rotation;
gun._xscale = ttt._xscale;
add1._x = ttt._x;
add1._y = ttt._y;
add1._rotation = ttt._rotation;
add1._xscale = ttt._xscale;
var _local2 = 0;
while (_local2 < c_guide_ar.length) {
if ((((((ttt._x >= (c_guide_ar[_local2]._x - 5)) && (ttt._x <= (c_guide_ar[_local2]._x + 5))) && (ttt._y >= (c_guide_ar[_local2]._y - 5))) && (ttt._y <= (c_guide_ar[_local2]._y + 5))) && (ttt.a >= 6)) && (ttt.hitTest(c_guide_ar[_local2]))) {
ttt.a = 0;
if ((ttt._x >= (pac._x - 4)) && (ttt._x <= (pac._x + 4))) {
if (ttt._y <= pac._y) {
ttt.pos = "down";
}
if (ttt._y > pac._y) {
ttt.pos = "up";
}
} else if ((ttt._y >= (pac._y - 4)) && (ttt._y <= (pac._y + 4))) {
if (ttt._x <= pac._x) {
ttt.pos = "right";
}
if (ttt._x > pac._x) {
ttt.pos = "left";
}
} else {
var _local3 = random(4);
switch (_local3) {
case 0 :
ttt.pos = "down";
ttt.a = "0";
ttt._y = ttt._y + 3;
break;
case 1 :
ttt.pos = "up";
ttt.a = "0";
ttt._y = ttt._y - 3;
break;
case 2 :
ttt.pos = "right";
ttt.a = "0";
ttt._x = ttt._x + 3;
break;
case 3 :
ttt.pos = "left";
ttt.a = "0";
ttt._x = ttt._x - 3;
}
}
} else if (ttt.hitTest(c_guide_ar[_local2]) == false) {
ttt.a = ttt.a + 1;
}
_local2++;
}
updateAfterEvent();
}
function backu1(ttt, sss) {
var _local3 = 0;
while (_local3 < 15) {
if (sss.hitTest(ttt[_local3])) {
if (ttt.info == "up") {
sss._y = 480;
} else if (ttt.info == "left") {
sss._x = 730;
} else if (ttt.info == "down") {
sss._y = 90;
} else if (ttt.info == "right") {
sss._x = 20;
}
}
_local3++;
}
}
function check2(hit) {
var _local3 = 0;
while (_local3 < wall_ar.length) {
var _local6 = (wall_ar[_local3]._x - (wall_ar[_local3]._width / 2)) - 2;
var _local4 = (wall_ar[_local3]._x + (wall_ar[_local3]._width / 2)) + 2;
var _local5 = (wall_ar[_local3]._y - (wall_ar[_local3]._height / 2)) - 2;
var _local7 = (wall_ar[_local3]._y + (wall_ar[_local3]._height / 2)) + 2;
if ((((hit._x + (hit._width / 2)) >= _local6) && ((hit._x - (hit._width / 2)) <= _local4)) && ((((hit._y - (hit._height / 2)) <= _local7) && ((hit._y + (hit._height / 2)) >= _local5)) && (hit._currentframe == 1))) {
var _local2 = random(2);
if ((hit.pos == "left") && (hit.wall >= 1)) {
hit._x = hit._x + 4;
if (_local2 == 0) {
hit.pos = "right";
} else if (_local2 == 1) {
hit.pos = "up";
} else if (_local2 == 2) {
hit.pos = "down";
}
hit.wall = 0;
} else if ((hit.pos == "right") && (hit.wall >= 1)) {
hit._x = hit._x - 4;
if (_local2 == 0) {
hit.pos = "left";
} else if (_local2 == 1) {
hit.pos = "up";
} else if (_local2 == 2) {
hit.pos = "down";
}
hit.wall = 0;
} else if ((hit.pos == "up") && (hit.wall >= 1)) {
hit._y = hit._y + 4;
if (_local2 == 0) {
hit.pos = "right";
} else if (_local2 == 1) {
hit.pos = "down";
} else if (_local2 == 2) {
hit.pos = "left";
}
hit.wall = 0;
} else if ((hit.pos == "down") && (hit.wall >= 1)) {
hit._y = hit._y - 4;
if (_local2 == 0) {
hit.pos = "right";
} else if (_local2 == 2) {
hit.pos = "left";
} else if (_local2 == 2) {
hit.pos = "up";
}
hit.wall = 0;
}
} else if (hit.wall == 0) {
hit.wall = hit.wall + 1;
}
_local3++;
}
}
function fade_enemy(aaa, count) {
if (aaa._currentframe != 1) {
fade_enem_ar[count]++;
if ((fade_enem_ar[count] >= 10) && ((sec1 > 1) || (min1 > 1))) {
aaa._y = 1000;
aaa._x = 1000;
clearInterval(bbb[aaa.id]);
removeMovieClip(aaa);
fade_enem_ar[count] = 0;
clearInterval(count_ar[count]);
}
}
}
function check_hit_pac(hit) {
var _local6 = (pac._x - (pac._width / 2)) - 4;
var _local4 = (pac._x + (pac._width / 2)) + 4;
var _local5 = (pac._y - (pac._height / 2)) - 4;
var _local7 = (pac._y + (pac._height / 2)) + 4;
if (((((hit._x + (hit._width / 2)) >= _local6) && ((hit._x - (hit._width / 2)) <= _local4)) && (((hit._y - (hit._height / 2)) <= _local7) && ((hit._y + (hit._height / 2)) >= _local5))) && (pac.caneat <= 0)) {
if (((hit.pos == "left") && (hit.pac >= 1)) && (hit._currentframe == 1)) {
hit._x = hit._x + 4;
hit.pos = "right";
hit.pac = 0;
if (pac.hit == 0) {
pac.hit = 16;
if (pac.caneat <= 0) {
life--;
}
}
}
if (((hit.pos == "right") && (hit.pac >= 1)) && (hit._currentframe == 1)) {
hit._x = hit._x - 4;
hit.pos = "left";
hit.pac = 0;
if (pac.hit == 0) {
pac.hit = 16;
life--;
if (pac.caneat == 0) {
life--;
}
}
}
if (((hit.pos == "up") && (hit.pac >= 1)) && (hit._currentframe == 1)) {
hit._y = hit._y + 4;
hit.pos = "down";
hit.pac = 0;
if (pac.hit == 0) {
pac.hit = 16;
life--;
if (pac.caneat == 0) {
life--;
}
}
}
if (((hit.pos == "down") && (hit.pac >= 1)) && (hit._currentframe == 1)) {
hit._y = hit._y - 4;
hit.pos = "up";
hit.pac = 0;
if (pac.hit == 0) {
pac.hit = 16;
life--;
if (pac.caneat == 0) {
life--;
}
}
} else if (hit.hitTest(pac) == false) {
hit.pac = hit.pac + 1;
}
}
if (((((hit._x + (hit._width / 2)) >= _local6) && ((hit._x - (hit._width / 2)) <= _local4)) && (((hit._y - (hit._height / 2)) <= _local7) && ((hit._y + (hit._height / 2)) >= _local5))) && (pac.caneat > 0)) {
if (pac.caneat > 0) {
if ((aeee <= 0) && (hit._currentframe == 1)) {
var _local3 = 0;
while (_local3 < hand_en_ar.length) {
if (hand_en_ar[_local3].id == hit.id) {
hand_en_ar[_local3].gotoAndPlay(2);
}
if (addons_ar[_local3].id == hit.id) {
addons_ar[_local3].gotoAndPlay(2);
}
_local3++;
}
hit.speed = 0;
hit.gotoAndPlay(2);
num_enemys--;
_root.scoreplus("point_p_20", hit);
score_num = score_num + 20;
score.text = score.text - -20;
enem_count++;
trace("enem_count=" + enem_count);
fade_enem_ar[enem_count] = 0;
inter_enemy_aa = setInterval(fade_enemy, 40, hit, enem_count);
}
count_ar[enem_count] = inter_enemy_aa;
}
}
}
function exp_hit_enem(eneme) {
var _local4 = 0;
while (_local4 < explode_ar.length) {
if (((((((eneme._x > (explode_ar[_local4]._x - (explode_ar[_local4]._width / 2))) && (eneme._x < (explode_ar[_local4]._x + (explode_ar[_local4]._width / 2)))) && (eneme._y > (explode_ar[_local4]._y - (explode_ar[_local4]._height / 2)))) && (eneme._y < (explode_ar[_local4]._y + (explode_ar[_local4]._height / 2)))) && (eneme._currentframe == 1)) && (explode_ar[_local4].hit <= 0)) && (eneme._currentframe == 1)) {
if ((((explode.gas != 1) && (eneme.gas != 1)) || ((explode.gas == 1) && (eneme.gas != 1))) || ((explode.gas != 1) && (eneme.gas == 1))) {
explode_ar[_local4].id = 0;
enem_count++;
eneme.speed = 0;
num_enemys--;
_root.scoreplus("point_p_20", eneme);
score_num = score_num + 20;
score.text = score.text - -20;
var _local3 = 0;
while (_local3 < hand_en_ar.length) {
if (hand_en_ar[_local3].id == eneme.id) {
hand_en_ar[_local3].gotoAndPlay(2);
removeMovieClip(hand_en_ar[_local3]);
}
_local3++;
}
_local3 = 0;
while (_local3 < addons_ar.length) {
if (addons_ar[_local3].id == eneme.id) {
addons_ar[_local3].gotoAndPlay(2);
removeMovieClip(addons_ar[_local3]);
}
_local3++;
}
eneme.gotoAndPlay(2);
fade_enem_ar[enem_count] = 0;
inter_enemy_aa2 = setInterval(fade_enemy, 40, eneme, enem_count);
count_ar[enem_count] = inter_enemy_aa2;
trace("count=" + count_ar[enem_count]);
}
}
_local4++;
}
}
function addenemy(enem_mca, rax, gax, bax, gun, addon) {
var _local2 = enem_ar.length;
trace(_local2);
var _local3 = this.attachMovie(enem_mca, ("enemy" + _local2) + 1, _local2 + 10000);
var _local5 = this.attachMovie(gun, ("hand_en" + _local2) + 1, (_local2 + 10000) + 6000);
var _local4 = this.attachMovie(addon, ("addon_" + _local2) + 1, (_local2 + 10000) + 3000);
var _local6 = random(500) + 100;
_local3._x = _local6;
_local3._y = 112;
_local5._x = _local6;
_local5._y = 112;
_local4._x = _local6;
_local4._y = 112;
_local3._currentframe = 1;
_local5._currentframe = 1;
_local4._currentframe = 1;
var _local10 = new Color(_local3.color4);
var _local9 = new Color(_local3.body);
var _local7 = {ra:rax, ga:gax, ba:bax, aa:100};
_local10.setTransform(_local7);
_local9.setTransform(_local7);
enem_ar[_local2] = _local3;
hand_en_ar[_local2] = _local5;
addons_ar[_local2] = _local4;
enem_ar[_local2].id = _local2;
hand_en_ar[_local2].id = _local2;
addons_ar[_local2].id = _local2;
hand_en_ar[_local2].kindof = gun;
enem_ar[_local2].a = "6";
enem_ar[_local2].wall = "5";
enem_ar[_local2].pac = "0";
enem_ar[_local2].ifstop = "0";
num_enemys++;
enem_ar[_local2].pos = "left";
enem_ar[_local2].speed = 2;
inter_en = setInterval(enem_move, 8, enem_ar[_local2], hand_en_ar[_local2], addons_ar[_local2]);
var _local8 = inter_en;
bbb[_local2] = _local8;
}
function addenemy_pos(enem_mca, rax, gax, bax, gun, addon, tx, ty) {
var _local2 = enem_ar.length;
trace(_local2);
var _local3 = this.attachMovie(enem_mca, ("enemy" + _local2) + 1, _local2 + 10000);
var _local5 = this.attachMovie(gun, ("hand_en" + _local2) + 1, (_local2 + 10000) + 6000);
var _local4 = this.attachMovie(addon, ("addon_" + _local2) + 1, (_local2 + 10000) + 3000);
var _local12 = random(400) + 100;
_local3._x = tx;
_local3._y = ty;
_local5._x = tx;
_local5._y = ty;
_local4._x = tx;
_local4._y = ty;
_local3._currentframe = 1;
_local5._currentframe = 1;
_local4._currentframe = 1;
var _local11 = new Color(_local3.color4);
var _local10 = new Color(_local3.body);
var _local6 = {ra:rax, ga:gax, ba:bax, aa:100};
_local11.setTransform(_local6);
_local10.setTransform(_local6);
enem_ar[_local2] = _local3;
hand_en_ar[_local2] = _local5;
addons_ar[_local2] = _local4;
enem_ar[_local2].id = _local2;
hand_en_ar[_local2].id = _local2;
addons_ar[_local2].id = _local2;
hand_en_ar[_local2].kindof = gun;
enem_ar[_local2].a = "6";
enem_ar[_local2].wall = "5";
enem_ar[_local2].pac = "0";
enem_ar[_local2].ifstop = "0";
num_enemys++;
enem_ar[_local2].pos = "left";
enem_ar[_local2].speed = 2;
inter_en = setInterval(enem_move, 8, enem_ar[_local2], hand_en_ar[_local2], addons_ar[_local2]);
var _local7 = inter_en;
bbb[_local2] = _local7;
}
var i = 0;
while (i < enem_ar.length) {
clearInterval(bbb[i]);
enem_ar[i].id.tt = 0;
i++;
}
var enem_count = 0;
var num_enemys = 4;
life = 10;
var inter_en;
var enem_ar = new Array(enemy1, enemy3);
var hand_en_ar = new Array(hand_en1);
var addons_ar = new Array();
enem_ar[0].a = "6";
enem_ar[0].wall = "5";
enem_ar[0].ifstop = "0";
enem_ar[0].pac = "0";
enem_ar[0].id = "0";
hand_en_ar[0].id = "0";
hand_en_ar[0].kindof = "hand_en2";
enem_ar[1].a = "6";
enem_ar[1].wall = "5";
enem_ar[1].pac = "0";
enem_ar[1].id = "1";
enem_ar[1].ifstop = "0";
enem_ar[2].a = "6";
enem_ar[2].wall = "5";
enem_ar[2].pac = "0";
enem_ar[2].id = "2";
enem_ar[2].ifstop = "0";
var c_guide_ar = new Array(c_guide1, c_guide2, c_guide3, c_guide4, c_guide5, c_guide6, c_guide7, c_guide8, c_guide9, c_guide10, c_guide11, c_guide12, c_guide13, c_guide14);
var i = 0;
while (i < 30) {
c_guide_ar[i]._visible = 0;
i++;
}
enem_ar[0].pos = "left";
enem_ar[0].speed = 2;
enem_ar[1].pos = "right";
enem_ar[1].speed = 2;
enem_ar[2].pos = "right";
enem_ar[2].speed = 2;
var inter_en;
var bbb = new Array();
var i = 0;
while (i < enem_ar.length) {
inter_en = setInterval(enem_move, 20, enem_ar[i], hand_en_ar[i]);
var ttt = inter_en;
bbb[i] = ttt;
i++;
}
var inter_enemy_aa;
var fade_enem_ar = new Array();
var aeee = 0;
clearInterval(inter_mmm);
var pac_mp3 = new Sound();
var wall_mp3 = new Sound();
var inter_mmm;
inter_mmm = setInterval(movenemyss, 1000);
function exp_hit_pac() {
var _local1 = 0;
while (_local1 < explode_ar.length) {
if ((((((pac._x > (explode_ar[_local1]._x - (explode_ar[_local1]._width / 2))) && (pac._x < (explode_ar[_local1]._x + (explode_ar[_local1]._width / 2)))) && (pac._y > (explode_ar[_local1]._y - (explode_ar[_local1]._height / 2)))) && (pac._y < (explode_ar[_local1]._y + (explode_ar[_local1]._height / 2)))) && (pac.hit <= 0)) && (pac.caneat == 0)) {
life--;
life--;
pac.hit = 25;
}
_local1++;
}
}
function bull_hit_pac(bulll) {
if ((((((((bulll._x + (bulll._width / 2)) > ((pac._x - (pac._width / 2)) + 5)) && ((bulll._x - (bulll._width / 2)) < ((pac._x + (pac._width / 2)) - 5))) && ((bulll._y + (bulll._height / 2)) > ((pac._y - (pac._height / 2)) + 5))) && ((bulll._y - (bulll._height / 2)) < ((pac._y + (pac._height / 2)) - 5))) && (bulll._currentframe == 1)) && (pac.hit <= 0)) && (pac.caneat == 0)) {
life--;
if (bulll.id == 1) {
explode_num++;
if (bulll.getex == 1) {
var _local3 = attachMovie("expl", "expl" + explode_num, 65000 + explode_num);
}
if (bulll.getex == 2) {
var _local3 = attachMovie("expl_big", "expl" + explode_num, 65000 + explode_num);
}
explode_ar[explode_num] = _local3;
explode_ar[explode_num]._x = bulll._x;
explode_ar[explode_num]._y = bulll._y;
}
bulll.gotoAndPlay(2);
pac.hit = 16;
bulll.speed = 0;
}
var _local2 = 0;
while (_local2 < wall_ar.length) {
if (((((bulll._x > (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2))) && (bulll._x < (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2)))) && (bulll._y > (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (bulll._y < (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2)))) && (bulll._currentframe == 1)) {
if (bulll.id == 1) {
explode_num++;
if (bulll.getex == 1) {
var _local3 = attachMovie("expl", "expl" + explode_num, 65000 + explode_num);
}
if (bulll.getex == 2) {
var _local3 = attachMovie("expl_big", "expl" + explode_num, 65000 + explode_num);
}
explode_ar[explode_num] = _local3;
explode_ar[explode_num]._x = bulll._x;
explode_ar[explode_num]._y = bulll._y;
}
bulll.gotoAndPlay(2);
wall_ar[_local2].hit == 16;
bulll.speed = 0;
}
_local2++;
}
}
function hand_where() {
if (pac.hand == 0) {
var _local2 = 0;
while (_local2 < pac_weapon.length) {
pac_weapon[_local2]._x = 1000;
pac_weapon[_local2]._y = 1000;
_local2++;
}
}
var _local1 = 0;
while (_local1 < 200) {
if (pac.hand == _local1) {
pac_weapon[_local1 - 1]._x = pac._x;
pac_weapon[_local1 - 1]._y = pac._y;
pac_weapon[_local1 - 1]._rotation = pac_graphic._rotation;
pac_weapon[_local1 - 1]._xscale = pac_graphic._xscale;
}
_local1++;
}
_local1 = 0;
while (_local1 < 200) {
if (pac.hand != _local1) {
pac_weapon[_local1 - 1]._x = 1000;
pac_weapon[_local1 - 1]._Y = 1000;
}
_local1++;
}
if ((Key.isDown(17) && (pac.greande > 0)) && (greand_throw == 2)) {
throw_greande_en(pac_graphic);
greand_throw = 0;
pac.greande--;
}
if ((Key.isDown(32) && (go33 >= 1)) && (ammo > 0)) {
ammo--;
if (pac_weapon[pac.hand - 1] == pac_weapon[0]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 2;
enemy_mp4.attachSound("gunshots_sm.wav");
enemy_mp4.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[1]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 2;
enemy_mp3.attachSound("GUN04_cop.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[2]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 1;
enemy_mp3.attachSound("GUN04_cop.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[3]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 1;
enemy_mp3.attachSound("uzi.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[4]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 1;
enemy_mp3.attachSound("galil.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[5]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("M16.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[6]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("ak47.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[7]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 1;
enemy_mp3.attachSound("uzi.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[8]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 1;
enemy_mp3.attachSound("gunshots_sm.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[9]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("mp5.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[10]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("m16.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[11]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "rpg_mis");
go33 = go33 - 1;
}
if (pac_weapon[pac.hand - 1] == pac_weapon[12]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "rpg_mis");
go33 = go33 - 1;
}
if (pac_weapon[pac.hand - 1] == pac_weapon[13]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("mp5.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[14]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("aug.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[15]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "shot_ball");
go33 = go33 - 1;
enemy_mp3.attachSound("shotgun.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[16]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "rpg_mis");
go33 = go33 - 1;
}
if (pac_weapon[pac.hand - 1] == pac_weapon[17]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "shot_ball");
go33 = go33 - 1;
enemy_mp3.attachSound("mag.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[18]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("m16.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[19]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("m16a2.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[20]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball4");
go33 = go33 - 1;
enemy_mp3.attachSound("aug.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[21]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 1;
enemy_mp3.attachSound("pk96.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[22]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("mp5_sd.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[23]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "shot_ball");
go33 = go33 - 1;
enemy_mp3.attachSound("mag.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[24]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball4");
go33 = go33 - 1;
enemy_mp3.attachSound("g36.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[25]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "missle");
go33 = go33 - 1;
}
}
}
function shoot_en_bul2(gun, bullet) {
ebullpac++;
gun.gun.gotoAndPlay(2);
var _local3 = this.attachMovie(bullet, ("ball_pac" + ebullpac) + 1, ebullpac + 150000);
pac_shoot[ebullpac] = _local3;
gun_rad = Math.atan2(gun.gun._y, gun.gun._x);
gun_deg = (gun_rad * 180) / Math.PI;
rotat = gun._rotation + ((gun_deg - 360) + 90);
dx = Math.sin((Math.PI/180) * rotat);
dy = Math.cos((Math.PI/180) * rotat);
gun_xscal = Math.abs(gun._xscale);
_local3._rotation = gun._rotation;
pac_shoot_num[ebullpac] = 0;
dx_ar_pac[ebullpac] = dx;
yx_ar_pac[ebullpac] = dy;
_local3._x = gun._x + (dx * (-gun.gun._y));
_local3._y = gun._y - (((dy * (-gun.gun._y)) * gun._xscale) / gun_xscal);
dx = Math.sin((Math.PI/180) * (rotat + 6));
dy = Math.cos((Math.PI/180) * (rotat + 6));
dx_ar_pac[ebullpac] = dx;
yx_ar_pac[ebullpac] = dy;
if (((bullet == "ball2") || (bullet == "missle")) || (bullet == "rpg_mis")) {
_local3.speed = 5;
bull_move_ene2 = setInterval(ball_move2, 20, pac_shoot[ebullpac], ebullpac, gun.range, gun);
pac_shoot_ar[ebullpac] = bull_move_ene2;
}
if ((bullet == "ball3") || (bullet == "shot_ball")) {
_local3.speed = 5;
bull_move_ene2 = setInterval(ball_move2, 16, pac_shoot[ebullpac], ebullpac, gun.range, gun);
pac_shoot_ar[ebullpac] = bull_move_ene2;
}
if (bullet == "ball4") {
_local3.speed = 6;
bull_move_ene2 = setInterval(ball_move2, 10, pac_shoot[ebullpac], ebullpac, gun.range, gun);
pac_shoot_ar[ebullpac] = bull_move_ene2;
}
}
function ball_move2(bullet, numm24, rangeofammo2, ffgun) {
bull_hit_enem(pac_shoot[numm24]);
bullspeed1 = pac_shoot[numm24].speed;
bullet._x = bullet._x + (dx_ar_pac[numm24] * bullspeed1);
bullet._y = bullet._y - (yx_ar_pac[numm24] * bullspeed1);
pac_shoot_num[numm24]++;
if ((pac_shoot_num[numm24] == (rangeofammo2 / 2)) && (ffgun.rate1 == "semi")) {
go33 = 1;
}
if ((pac_shoot_num[numm24] == (rangeofammo2 / 4)) && (ffgun.rate1 == "auto")) {
go33 = 1;
}
if ((pac_shoot_num[numm24] == (rangeofammo2 / 3)) && (ffgun.rate1 == "semi_a")) {
go33 = 1;
}
if ((pac_shoot_num[numm24] >= rangeofammo2) && (ffgun.rate1 == "mono")) {
go33 = 1;
}
if (pac_shoot_num[numm24] >= rangeofammo2) {
removeMovieClip(pac_shoot[numm24]);
clearInterval(pac_shoot_ar[numm24]);
pac_shoot_num[numm24] = 0;
}
}
function bull_hit_enem(bulll) {
var _local3 = 0;
while (_local3 < enem_ar.length) {
if (((((((bulll._x + (bulll._width / 2)) > ((enem_ar[_local3]._x - (enem_ar[_local3]._width / 2)) + 5)) && ((bulll._x - bulll._width) < ((enem_ar[_local3]._x + (enem_ar[_local3]._width / 2)) - 5))) && ((bulll._y + (bulll._height / 2)) > ((enem_ar[_local3]._y - (enem_ar[_local3]._height / 2)) + 5))) && ((bulll._y - (bulll._height / 2)) < ((enem_ar[_local3]._y + (enem_ar[_local3]._height / 2)) - 5))) && (bulll._currentframe == 1)) && (enem_ar[_local3]._currentframe == 1)) {
var _local4 = 0;
while (_local4 < hand_en_ar.length) {
if (hand_en_ar[_local4].id == enem_ar[_local3].id) {
hand_en_ar[_local4].gotoAndPlay(2);
}
if (addons_ar[_local4].id == enem_ar[_local3].id) {
addons_ar[_local4].gotoAndPlay(2);
}
_local4++;
}
if (bulll.id == 1) {
explode_num++;
if (bulll.getex == 1) {
var _local5 = attachMovie("expl", "expl" + explode_num, 65000 + explode_num);
}
if (bulll.getex == 2) {
var _local5 = attachMovie("expl_big", "expl" + explode_num, 65000 + explode_num);
}
explode_ar[explode_num] = _local5;
explode_ar[explode_num]._x = bulll._x;
explode_ar[explode_num]._y = bulll._y;
}
bulll.gotoAndPlay(2);
enem_count++;
enem_ar[_local3].speed = 0;
num_enemys--;
_root.scoreplus("point_p_20", enem_ar[_local3]);
score_num = score_num + 20;
score.text = score.text - -20;
enem_ar[_local3].gotoAndPlay(2);
fade_enem_ar[enem_count] = 0;
inter_enemy_aa2 = setInterval(fade_enemy, 40, enem_ar[_local3], enem_count);
count_ar[enem_count] = inter_enemy_aa2;
trace("count=" + count_ar[enem_count]);
bulll.speed = 0;
}
_local3++;
}
_local3 = 0;
while (_local3 < wall_ar.length) {
if (((((bulll._x > (wall_ar[_local3]._x - (wall_ar[_local3]._width / 2))) && (bulll._x < (wall_ar[_local3]._x + (wall_ar[_local3]._width / 2)))) && (bulll._y > (wall_ar[_local3]._y - (wall_ar[_local3]._height / 2)))) && (bulll._y < (wall_ar[_local3]._y + (wall_ar[_local3]._height / 2)))) && (bulll._currentframe == 1)) {
if (bulll.id == 1) {
explode_num++;
if (bulll.getex == 1) {
var _local5 = attachMovie("expl", "expl" + explode_num, 65000 + explode_num);
}
if (bulll.getex == 2) {
var _local5 = attachMovie("expl_big", "expl" + explode_num, 65000 + explode_num);
}
explode_ar[explode_num] = _local5;
explode_ar[explode_num]._x = bulll._x;
explode_ar[explode_num]._y = bulll._y;
}
bulll.gotoAndPlay(2);
wall_ar[_local3].hit == 16;
bulll.speed = 0;
}
_local3++;
}
_local3 = 0;
while (_local3 < addons_ar.length) {
if (((((((bulll._x > (addons_ar[_local3]._x - (addons_ar[_local3]._width / 2))) && (bulll._x < (addons_ar[_local3]._x + (addons_ar[_local3]._width / 2)))) && (bulll._y > (addons_ar[_local3]._y - (addons_ar[_local3]._height / 2)))) && (bulll._y < (addons_ar[_local3]._y + (addons_ar[_local3]._height / 2)))) && (bulll._currentframe == 1)) && (addons_ar[_local3]._currentframe == 1)) && (addons_ar[_local3].trans > 0)) {
addons_ar[_local3].trans--;
if (bulll.id == 1) {
addons_ar[_local3].trans = addons_ar[_local3].trans - 2;
explode_num++;
if (bulll.getex == 1) {
var _local5 = attachMovie("expl", "expl" + explode_num, 65000 + explode_num);
}
if (bulll.getex == 2) {
var _local5 = attachMovie("expl_big", "expl" + explode_num, 65000 + explode_num);
}
explode_ar[explode_num] = _local5;
explode_ar[explode_num]._x = bulll._x;
explode_ar[explode_num]._y = bulll._y;
}
bulll.gotoAndPlay(2);
wall_ar[_local3].hit == 16;
bulll.speed = 0;
}
_local3++;
}
}
function collet_ammo() {
var _local1 = 0;
while (_local1 < 180) {
if ((((ammo_ar_take[_local1]._x > (pac._x - (pac._width / 2))) && (ammo_ar_take[_local1]._x < (pac._x + (pac._width / 2)))) && (ammo_ar_take[_local1]._y > (pac._y - (pac._height / 2)))) && (ammo_ar_take[_local1]._y < (pac._y + (pac._height / 2)))) {
trace("t=" + _local1);
if (_local1 == 0) {
ammo = 10 + _local1;
}
if (_local1 == 1) {
ammo = 6 + _local1;
}
if (_local1 == 2) {
ammo = 4 + _local1;
}
if (_local1 == 3) {
ammo = 14 + _local1;
}
if (_local1 == 4) {
ammo = 6 + _local1;
}
if (_local1 == 5) {
ammo = 7 + _local1;
}
if (_local1 == 6) {
ammo = 8 + _local1;
}
if (_local1 == 7) {
ammo = 13 + _local1;
}
if (_local1 == 8) {
ammo = 10;
pac.greande = 2;
}
if (_local1 == 9) {
ammo = 15;
pac.greande = 1;
}
if (_local1 == 10) {
ammo = 12;
pac.greande = 1;
}
if (_local1 == 11) {
ammo = 3;
}
if (_local1 == 12) {
ammo = 4;
}
if (_local1 == 13) {
ammo = 18;
pac.greande = 1;
}
if (_local1 == 14) {
ammo = 14;
pac.greande = 1;
}
if (_local1 == 15) {
ammo = 7;
pac.greande = 2;
}
if (_local1 == 16) {
ammo = 4;
}
if (_local1 == 17) {
ammo = 12;
pac.greande = 1;
}
if (_local1 == 18) {
ammo = 20;
pac.greande = 1;
}
if (_local1 == 19) {
ammo = 24;
pac.greande = 2;
}
if (_local1 == 20) {
ammo = 6;
pac.greande = 0;
}
if (_local1 == 21) {
ammo = 28;
pac.greande = 0;
}
if (_local1 == 22) {
ammo = 20;
pac.greande = 2;
}
if (_local1 == 23) {
ammo = 10;
pac.greande = 2;
}
if (_local1 == 24) {
ammo = 16;
pac.greande = 1;
}
if (_local1 == 25) {
ammo = 6;
pac.greande = 0;
}
pac.hand = _local1 + 1;
trace(pac.hand);
ammo_ar_take[_local1]._x = 900;
ammo_ar_take[_local1]._y = 900;
}
_local1++;
}
}
var go33 = 1;
var explode_ar = new Array();
var explode_num = 0;
pac.greande = 10;
var greand_throw = 2;
pac.hand = 0;
var bull_move_ene2;
var pac_shoot_ar = new Array();
var pac_shoot_num = new Array();
var pac_shoot = new Array();
var ebullpac = 0;
var dx_ar_pac = new Array();
var yx_ar_pac = new Array();
var count_ar = new Array();
function timeof() {
sec1++;
clock.text = sec1;
if (sec1 >= 59) {
sec1 = 0;
min1++;
clock_min.text = min1;
}
if (sec1 == 55) {
addenemy("enemy_swat", 100, 99, 2, "en_desert", "us_a51");
}
if ((sec1 == 20) && (num_enemys < 9)) {
addenemy_pos("enemy_swat", 10, 90, 90, "en_at", "marine", 125, 325);
addenemy_pos("enemy_swat", 60, 40, 80, "en_g36", "marine", 490, 325);
}
if ((sec1 == 45) && (num_enemys < 9)) {
addenemy("enemyzz", 60, 30, 60, "en_g36", "hl2");
}
if ((sec1 == 2) && (num_enemys < 7)) {
car.gotoAndPlay(2);
}
if ((((sec1 == 30) || (sec1 == 45)) || (sec1 == 10)) && (num_enemys < 6)) {
addenemy("enemy_swat", 92, 90, 2, "en_mp5hk", "us_a51");
var _local1 = 0;
while (_local1 < addons_ar.length) {
addons_ar[_local1].greande = 1;
_local1++;
}
}
if (sec1 == 35) {
ammo_ar_take[25]._x = 500;
ammo_ar_take[25]._y = 120;
}
if (sec1 == 2) {
ammo_ar_take[17]._x = 350;
ammo_ar_take[17]._y = 120;
}
if ((sec1 == 40) && (min1 == 0)) {
ammo_ar_take[24]._x = 240;
ammo_ar_take[24]._y = 120;
}
if (sec1 == 25) {
ammo_ar_take[22]._x = 240;
ammo_ar_take[22]._y = 120;
ammo_ar_take[20]._x = 290;
ammo_ar_take[20]._y = 120;
}
}
function car_move() {
if (car.place == 5) {
car.place = 1;
addenemy_pos("enemyzz", 80, 80, 80, "en_mp5_sd", "hl2", 394, 328);
}
}
function ball_move(bullet, numm2, rangeofammo, numB) {
bull_hit_pac(ball_shoot[numm2]);
bullspeed = ball_shoot[numm2].speed;
bullet._x = bullet._x + (dx_ar[numm2] * bullspeed);
bullet._y = bullet._y - (yx_ar[numm2] * bullspeed);
ball_shoot_num[numm2]++;
if (ball_shoot_num[numm2] >= rangeofammo) {
removeMovieClip(ball_shoot[numm2]);
clearInterval(ball_shoot_ar[numm2]);
ball_shoot_num[numm2] = 0;
}
}
function shoot_en_bul(gun, enemy, bullet, num1, num444, num5555) {
ebull++;
if (enemy.speed == 0) {
var _local3 = this.attachMovie(bullet, ("ball" + ebull) + 1, ebull + 50000);
ball_shoot[ebull] = _local3;
gun_rad = Math.atan2(gun.gun._y, gun.gun._x);
gun_deg = (gun_rad * 180) / Math.PI;
rotat = gun._rotation + ((gun_deg - 360) + 90);
dx = Math.sin((Math.PI/180) * rotat);
dy = Math.cos((Math.PI/180) * rotat);
gun_xscal = Math.abs(gun._xscale);
ball_shoot_num[ebull] = 0;
dx_ar[ebull] = dx;
yx_ar[ebull] = dy;
_local3._x = gun._x + (dx * (-gun.gun._y));
_local3._y = gun._y - (((dy * (-gun.gun._y)) * gun._xscale) / gun_xscal);
_local3._rotation = gun._rotation;
rotat = gun._rotation + ((gun_deg - 360) + 90);
dx = Math.sin((Math.PI/180) * (rotat + 5));
dy = Math.cos((Math.PI/180) * (rotat + 5));
dx_ar[ebull] = dx;
yx_ar[ebull] = dy;
if (gun.kindof == "hand_en") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "hand_en2") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_m16") {
_local3.speed = 6;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_m1") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_uzi") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 15, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_gal") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_ak47") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 17, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_bizon") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 19, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_pk96") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 18, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_rpg") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 19, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_glock") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 16, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_mp5hk") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 15, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_sa80") {
_local3.speed = 6;
bull_move_ene = setInterval(ball_move, 18, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_law") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 19, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_law_camo") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 17, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_mp5g") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 14, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_aug") {
_local3.speed = 6;
bull_move_ene = setInterval(ball_move, 17, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_shotgun") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 17, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "APC_MACHINE") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 17, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_mag") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 17, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_m4") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 16, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_commando") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 14, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_m5") {
_local3.speed = 6;
bull_move_ene = setInterval(ball_move, 9, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_m60") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 17, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_mp5_sd") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 14, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_desert") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 17, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_g36") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 10, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_at") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 16, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
}
}
function shoot_enema(zzz, eee, num) {
if ((zzz.speed == 0) && (enem_time_ar[num] == 2)) {
var _local4 = 0;
while (_local4 < addons_ar.length) {
if (((addons_ar[_local4].id == zzz.id) && (addons_ar[_local4].greande > 0)) && (addons_ar[_local4].kindof == "explode")) {
throw_greande_en(addons_ar[_local4]);
addons_ar[_local4].greande--;
}
_local4++;
}
}
if (((eee.kindof == "hand_en") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 10) {
eee.number = 0;
enemy_mp4.attachSound("gunshots_sm.wav");
enemy_mp4.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 20, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "hand_en2") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 6) {
eee.number = 0;
enemy_mp3.attachSound("GUN04_cop.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 30, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_m16") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 3) {
eee.number = 0;
enemy_mp3.attachSound("M16.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 70, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
zzz.ifstop = 1;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_m1") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 6) {
eee.number = 0;
enemy_mp3.attachSound("GUN04_cop.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 70, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_uzi") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 4) {
eee.gun.gotoAndPlay(2);
enemy_mp3.attachSound("uzi.wav");
enemy_mp3.start();
shoot_en_bul(eee, zzz, "ball2", 1, 20, num);
}
if (enem_time_ar[num] > 5) {
eee.number = 0;
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 20, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_gal") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 5) {
eee.number = 0;
enemy_mp3.attachSound("galil.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 36, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_ak47") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 3) {
eee.number = 0;
enemy_mp3.attachSound("ak47.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 38, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_bizon") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 3) {
eee.gun.gotoAndPlay(2);
enemy_mp3.attachSound("uzi.wav");
enemy_mp3.start();
shoot_en_bul(eee, zzz, "ball2", 1, 22, num);
}
if (enem_time_ar[num] > 4) {
eee.number = 0;
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 22, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_pk96") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 2) {
eee.gun.gotoAndPlay(2);
enemy_mp3.attachSound("pk96.wav");
enemy_mp3.start();
shoot_en_bul(eee, zzz, "ball2", 1, 34, num);
}
if (enem_time_ar[num] == 3) {
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 34, num);
}
if (enem_time_ar[num] > 4) {
eee.number = 0;
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 34, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_rpg") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 4) {
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "rpg_mis", 1, 100, num);
}
if (enem_time_ar[num] > 8) {
eee.number = 0;
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_glock") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 2) {
eee.number = 0;
enemy_mp3.attachSound("gunshots_sm.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 22, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_mp5hk") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 1) {
eee.gun.gotoAndPlay(2);
enemy_mp3.attachSound("mp5.wav");
enemy_mp3.start();
shoot_en_bul(eee, zzz, "ball3", 1, 26, num);
}
if (enem_time_ar[num] > 3) {
eee.number = 0;
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 26, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_sa80") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 3) {
eee.number = 0;
enemy_mp3.attachSound("M16.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 70, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
zzz.ifstop = 1;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_law") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 3) {
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "rpg_mis", 1, 130, num);
}
if (enem_time_ar[num] > 8) {
eee.number = 0;
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_mp5g") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 1) {
eee.gun.gotoAndPlay(2);
enemy_mp3.attachSound("mp5.wav");
enemy_mp3.start();
shoot_en_bul(eee, zzz, "ball3", 1, 28, num);
}
if (enem_time_ar[num] > 3) {
eee.number = 0;
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 28, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_aug") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 3) {
eee.number = 0;
enemy_mp3.attachSound("aug.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 70, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
zzz.ifstop = 1;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_shotgun") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 3) {
eee.number = 0;
enemy_mp3.attachSound("shotgun.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "shot_ball", 1, 24, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
zzz.ifstop = 1;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_law_camo") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 3) {
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "rpg_mis", 1, 130, num);
}
if (enem_time_ar[num] > 6) {
eee.number = 0;
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_mag") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 3) {
eee.number = 0;
enemy_mp3.attachSound("mag.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "shot_ball", 1, 24, num);
zzz.speed = 4;
enem_time_ar[num] = 0;
eee.number = 0;
zzz.ifstop = 1;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_commando") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 1) {
eee.gun.gotoAndPlay(2);
enemy_mp3.attachSound("m16a2.wav");
enemy_mp3.start();
shoot_en_bul(eee, zzz, "ball3", 1, 30, num);
}
if (enem_time_ar[num] > 3) {
eee.number = 0;
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 30, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_m5") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 3) {
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball4", 1, 90, num);
enemy_mp3.attachSound("aug.wav");
enemy_mp3.start();
}
if (enem_time_ar[num] > 8) {
eee.number = 0;
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_m60") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 2) {
eee.gun.gotoAndPlay(2);
enemy_mp3.attachSound("pk96.wav");
enemy_mp3.start();
shoot_en_bul(eee, zzz, "ball2", 1, 40, num);
}
if (enem_time_ar[num] == 3) {
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 40, num);
}
if (enem_time_ar[num] > 4) {
eee.number = 0;
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 34, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "APC_MACHINE") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 3) {
eee.number = 0;
enemy_mp3.attachSound("aug.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 70, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
zzz.ifstop = 1;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_m4") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 2) {
eee.number = 0;
enemy_mp3.attachSound("M16.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 60, num);
zzz.speed = 3;
enem_time_ar[num] = 0;
eee.number = 0;
zzz.ifstop = 1;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_mp5_sd") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 3) {
eee.gun.gotoAndPlay(2);
enemy_mp3.attachSound("mp5_sd.wav");
enemy_mp3.start();
shoot_en_bul(eee, zzz, "ball3", 1, 30, num);
}
if (enem_time_ar[num] > 4) {
eee.number = 0;
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 30, num);
zzz.speed = 3;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_desert") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 3) {
eee.number = 0;
enemy_mp3.attachSound("mag.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "shot_ball", 1, 26, num);
zzz.speed = 3;
enem_time_ar[num] = 0;
eee.number = 0;
zzz.ifstop = 1;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_g36") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 2) {
eee.number = 0;
enemy_mp3.attachSound("g36.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball4", 1, 40, num);
zzz.speed = 3;
enem_time_ar[num] = 0;
eee.number = 0;
zzz.ifstop = 1;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_at") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 4) {
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "missle", 1, 100, num);
}
if (enem_time_ar[num] > 10) {
eee.number = 0;
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
}
function shoot_enem(ttt, aaa) {
if (((((((ttt._x >= (pac._x - 10)) && (ttt._x <= (pac._x + 10))) && (ttt.speed >= 2)) && (ttt != null)) && (ttt._y >= (pac._y - aaa.range))) && (ttt._y <= (pac._y + aaa.range))) && (aaa != null)) {
if ((ttt._y <= pac._y) && (ttt.speed >= 2)) {
var _local2 = 0;
while (_local2 < wall_ar.length) {
if (((((((ttt._x < (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2))) && (ttt._x > (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (if_right == 0)) && (pac._x > (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (pac._x < (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2)))) && (ttt._y < (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (pac._y > (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2)))) {
ttt.ifstop = 1;
}
_local2++;
}
trace("donw");
if (ttt.ifstop == 1) {
ttt.ifstop = 0;
} else if (ttt.ifstop == 0) {
shoot_d++;
enem_time_ar[shoot_d] = 0;
ttt.speed = 0;
ttt.pos = "down";
aaa.number = 1;
clearInterval(aaa.interr);
inter_shoot = setInterval(shoot_enema, 120, ttt, aaa, shoot_d);
enem_aar[shoot_d] = inter_shoot;
aaa.interr = inter_shoot;
}
}
if ((ttt._y > pac._y) && (ttt.speed >= 2)) {
var _local2 = 0;
while (_local2 < wall_ar.length) {
if (((((((ttt._x < (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2))) && (ttt._x > (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (if_right == 0)) && (pac._x > (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (pac._x < (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2)))) && (ttt._y > (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2)))) && (pac._y < (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) {
ttt.ifstop = 1;
}
_local2++;
}
if (ttt.ifstop == 1) {
ttt.ifstop = 0;
} else if (ttt.ifstop == 0) {
shoot_d++;
enem_time_ar[shoot_d] = 0;
ttt.speed = 0;
ttt.pos = "up";
}
aaa.number = 1;
clearInterval(aaa.interr);
inter_shoot = setInterval(shoot_enema, 120, ttt, aaa, shoot_d);
enem_aar[shoot_d] = inter_shoot;
aaa.interr = inter_shoot;
}
} else if (((((((ttt._y >= (pac._y - 10)) && (ttt._y <= (pac._y + 10))) && (ttt.speed >= 2)) && (ttt != null)) && (ttt._x >= (pac._x - aaa.range))) && (ttt._x <= (pac._x + aaa.range))) && (aaa != null)) {
if ((ttt._x <= pac._x) && (ttt.speed >= 2)) {
var _local2 = 0;
while (_local2 < wall_ar.length) {
if (((((((ttt._y < (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2))) && (ttt._y > (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (if_right == 0)) && (pac._y > (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (pac._y < (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2)))) && (ttt._x < (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (pac._x > (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2)))) {
ttt.ifstop = 1;
}
_local2++;
}
if (ttt.ifstop == 1) {
ttt.ifstop = 0;
} else if (ttt.ifstop == 0) {
shoot_d++;
enem_time_ar[shoot_d] = 0;
ttt.speed = 0;
aaa.number = 1;
ttt.pos = "right";
clearInterval(aaa.interr);
inter_shoot = setInterval(shoot_enema, 120, ttt, aaa, shoot_d);
enem_aar[shoot_d] = inter_shoot;
aaa.interr = inter_shoot;
}
}
if ((ttt._x > pac._x) && (ttt.speed >= 2)) {
var _local2 = 0;
while (_local2 < wall_ar.length) {
if (((((((ttt._y < (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2))) && (ttt._y > (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (if_right == 0)) && (pac._y > (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (pac._y < (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2)))) && (ttt._x > (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2)))) && (pac._x < (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) {
trace("okL");
ttt.ifstop = 1;
}
_local2++;
}
if (ttt.ifstop == 1) {
ttt.ifstop = 0;
} else if (ttt.ifstop == 0) {
shoot_d++;
enem_time_ar[shoot_d] = 0;
ttt.speed = 0;
aaa.number = 1;
ttt.pos = "left";
clearInterval(aaa.interr);
inter_shoot = setInterval(shoot_enema, 120, ttt, aaa, shoot_d);
enem_aar[shoot_d] = inter_shoot;
aaa.interr = inter_shoot;
}
}
}
}
function throw_greande_en(enem) {
greande_num++;
var _local2 = attachMovie("greande2", "greandee" + greande_num, 75500 + greande_num);
greande_ar[greande_num] = _local2;
trace(greande_ar[greande_num]);
greande_ar[greande_num]._x = enem._x;
greande_ar[greande_num]._y = enem._y;
greande_ar[greande_num]._rotation = enem._rotation;
greande_ar[greande_num]._xscale = enem._xscale;
trace(greande_ar[greande_num]._y);
}
function explode_greande() {
var _local1 = 0;
while (_local1 < greande_ar.length) {
if (greande_ar[_local1].count == 11) {
trace("boom");
greand_throw = 2;
rotat = greande_ar[_local1]._rotation;
dx = Math.sin((Math.PI/180) * rotat);
dy = Math.cos((Math.PI/180) * rotat);
explode_num++;
var _local2 = attachMovie("expl_big", "expl" + explode_num, 65000 + explode_num);
explode_ar[explode_num] = _local2;
explode_ar[explode_num]._x = greande_ar[_local1]._x + (dx * 220);
explode_ar[explode_num]._y = greande_ar[_local1]._y - (dy * 220);
explode_ar[explode_num]._width = 34;
explode_ar[explode_num]._height = 34;
removeMovieClip(greande_ar[_local1]);
}
_local1++;
}
}
clearInterval(time_in);
var time_in;
var sec1 = 0;
var min1 = 0;
var ebull = 0;
var ammo_ar_take = new Array();
ammo_ar_take[0] = gun_ammo;
ammo_ar_take[1] = m14_ammo;
ammo_ar_take[2] = m1_ammo;
ammo_ar_take[3] = uzi_ammo;
ammo_ar_take[4] = gal_ammo;
ammo_ar_take[5] = m16_ammo;
ammo_ar_take[6] = ak47_ammo;
ammo_ar_take[7] = bizon_ammo;
ammo_ar_take[8] = glock_ammo;
ammo_ar_take[9] = mp5hk_ammo;
ammo_ar_take[10] = sa80_ammo;
ammo_ar_take[11] = rpg_ammo;
ammo_ar_take[12] = law_ammo;
ammo_ar_take[13] = mp5g_ammo;
ammo_ar_take[14] = aug_ammo;
ammo_ar_take[15] = shotgun_ammo;
ammo_ar_take[16] = camo_law_ammo;
ammo_ar_take[17] = mag_ammo;
ammo_ar_take[18] = m4_ammo;
ammo_ar_take[19] = commando_ammo;
ammo_ar_take[20] = m5_ammo;
ammo_ar_take[21] = m60_ammo;
ammo_ar_take[22] = mp5_sd_ammo;
ammo_ar_take[23] = desert_ammo;
ammo_ar_take[24] = g36_ammo;
ammo_ar_take[25] = at_ammo;
time_in = setInterval(timeof, 1000);
var shoot_d = 0;
var inter_shoot_c = 0;
var inter_shoot;
var inter_shootb;
var enem_aar = new Array();
var enem_time_ar = new Array();
var ball_shoot = new Array();
var bull_move_ene;
var ball_shoot_ar = new Array();
var ball_shoot_num = new Array();
var dx_ar = new Array();
var yx_ar = new Array();
var enemy_mp4 = new Sound();
var enemy_mp3 = new Sound();
var if_right = 0;
var greande_num = 0;
var greande_ar = new Array();
Instance of Symbol 425 MovieClip [empty] "controller" in Frame 20
onClipEvent (enterFrame) {
if (_root.score_num <= 0) {
_root.score_num = 0;
}
_root.detectKeys();
_root.collectcoin();
_root.hand_where();
_root.explode_greande();
_root.exp_hit_pac();
_root.car_move();
updateAfterEvent();
}
Frame 21
clearInterval(interhit);
stop();
var i = 0;
while (i < enem_ar.length) {
removeMovieClip(enem_ar[i]);
removeMovieClip(pac_graphic);
removeMovieClip(hand_en_ar[i]);
removeMovieClip(hand_pac);
removeMovieClip(addons_ar[i]);
removeMovieClip(places[i]);
removeMovieClip(explode_ar[i]);
i++;
}
var gonext4 = 0;
var i = 0;
while (i < 10000) {
clearInterval(i);
clearInterval(score_MC_AR_del[i]);
removeMovieClip(score_MC_AR[i]);
clearInterval(interhit);
clearInterval(enem_aar[i]);
clearInterval(bbb[i]);
clearInterval(ball_shoot_ar[i]);
removeMovieClip(ball_shoot[i]);
clearInterval(pac_shoot_ar);
removeMovieClip(pac_shoot[i]);
clearInterval(count_ar[i]);
fade_enem_ar[i] = 0;
removeMovieClip(ammo_ar_take[i]);
removeMovieClip(enem_add);
removeMovieClip(gun_add);
removeMovieClip(pac_weapon[i]);
clearInterval(time_in);
i++;
}
if (uover == 100) {
clearInterval(uover_in);
gotoAndPlay (6);
}
function goover() {
uover--;
}
function play44() {
gotoAndPlay (6);
}
var uover_in;
uover = 5;
uover_in = setInterval(goover, 1000);
function detectKeys() {
if (Key.isDown(32) && (_root.gonext4 == 4)) {
gotoAndStop (22);
}
}
Instance of Symbol 425 MovieClip [empty] "controller" in Frame 21
onClipEvent (enterFrame) {
_root.detectKeys();
}
Instance of Symbol 551 MovieClip "com" in Frame 21
on (press) {
getURL ("http://games.fs1.co.il", "_blank");
}
Frame 22
zz = 1;
stop();
clearInterval(interhit);
removeMovieClip(car);
var i = 0;
while (i < enem_ar.length) {
removeMovieClip(enem_ar[i]);
removeMovieClip(pac_graphic);
removeMovieClip(hand_en_ar[i]);
removeMovieClip(hand_pac);
removeMovieClip(addons_ar[i]);
removeMovieClip(explode_ar[i]);
i++;
}
var i = 0;
while (i < 10000) {
clearInterval(i);
clearInterval(score_MC_AR_del[i]);
removeMovieClip(score_MC_AR[i]);
clearInterval(interhit);
clearInterval(enem_aar[i]);
clearInterval(bbb[i]);
clearInterval(ball_shoot_ar[i]);
removeMovieClip(ball_shoot[i]);
clearInterval(pac_shoot_ar);
removeMovieClip(pac_shoot[i]);
clearInterval(count_ar[i]);
fade_enem_ar[i] = 0;
removeMovieClip(ammo_ar_take[i]);
removeMovieClip(enem_add);
removeMovieClip(gun_add);
removeMovieClip(pac_weapon[i]);
clearInterval(time_in);
i++;
}
function alpha(ttt) {
var _local1 = 0;
while (_local1 < ttt.length) {
ttt[_local1]._visible = 0;
_local1++;
}
}
var ld_ar = new Array(d_l1, d_l2, d_l3, d_l4, d_l5, d_l6, d_l7, d_l8, d_l9, d_l10, d_l11);
ld_ar.dd = "d_l";
var rd_ar = new Array(d_r1, d_r2, d_r3, d_r4, d_r5, d_r6, d_r7, d_r8, d_r9, d_r10, d_r11);
rd_ar.dd = "d_r";
var ru_ar = new Array(u_r1, u_r2, u_r3, u_r4, u_r5, u_r6, u_r7, u_r8, u_r9, u_r10, u_r11);
ru_ar.dd = "u_r";
var lu_ar = new Array(u_l1, u_l2, u_l3, u_l4, u_l5, u_l6, u_l7, u_l8, u_l9, u_l10, u_l11);
lu_ar.dd = "u_l";
var places = new Array();
alpha(ld_ar);
alpha(rd_ar);
alpha(ru_ar);
alpha(lu_ar);
places[0] = monk_a0;
places[1] = monk_a1;
places[0]._x = 360;
places[0]._y = 330;
places[1]._x = 174;
places[1]._y = 330;
function guideof(ttt) {
var _local2 = 0;
while (_local2 < ttt.length) {
if (pac.hitTest(ttt[_local2]._x, ttt[_local2]._y, yes)) {
if (ttt.dd == "d_l") {
pac._x = pac._x - 4;
pac._y = pac._y + 4;
} else if (ttt.dd == "d_r") {
pac._x = pac._x + 4;
pac._y = pac._y + 4;
} else if (ttt.dd == "u_r") {
pac._x = pac._x + 4;
pac._y = pac._y - 4;
} else if (ttt.dd == "u_l") {
pac._x = pac._x - 4;
pac._y = pac._y - 4;
}
}
_local2++;
}
}
function pachit(aaa) {
if (life <= 0) {
score_num = score_num - 1000;
levelof = "level10";
gotoAndStop ("gameover");
}
life_mc.gotoAndStop(life);
if (pac.hit > 0) {
if (pac.caneat == 0) {
myTransform.ba = myTransform.ba - 5;
myTransform.ga = myTransform.ga - 5;
my_color.setTransform(myTransform);
}
pac.hit--;
} else if (pac.hit < 0) {
pac.hit = 0;
}
if (pac.hit == 0) {
if (myTransform.ba < 100) {
myTransform.ba = myTransform.ba + 5;
myTransform.ga = myTransform.ga + 5;
my_color.setTransform(myTransform);
}
}
updateAfterEvent();
if (pac.caneat > 0) {
aaa.speed = 0;
myTransform.ra = myTransform.ra - 5;
myTransform.ba = myTransform.ba - 5;
my_color.setTransform(myTransform);
pac.caneat--;
}
if (pac.caneat < 0) {
pac.caneat = 0;
}
if ((pac.caneat == 0) && (pac.hit == 0)) {
pac.hit == 0;
if (myTransform.ra < 100) {
myTransform.ra = 100;
myTransform.ba = 100;
myTransform.ga = 100;
my_color.setTransform(myTransform);
}
}
updateAfterEvent();
}
function movea() {
check1(pac);
if (pac._rotation == 90) {
pac._x = pac._x + speed_pac;
}
if (pac._rotation == -90) {
pac._x = pac._x - speed_pac;
}
if (pac._rotation == 180) {
pac._y = pac._y + speed_pac;
}
if (pac._rotation == 0) {
pac._y = pac._y - speed_pac;
}
tt++;
if (tt >= 4) {
tt = 0;
clearInterval(intermove_pac);
}
updateAfterEvent();
}
function detectKeys() {
collet_ammo();
ammo_txt.text = ammo;
greande_txt.text = pac.greande;
pac_graphic._x = pac._x;
pac_graphic._y = pac._y;
updateAfterEvent();
pacx.text = pac._x;
speed_pac = 5;
if (pac.hit > 8) {
speed_pac = 0;
}
if (Key.isDown(39) && (pac._x <= (760 - (pac._width / 2)))) {
clearInterval(intermove_pac);
check1(pac);
pac._x = pac._x + speed_pac;
pac._rotation = 90;
pac_graphic._rotation = 90;
if (pac_graphic._xscale == 100) {
pac_graphic._xscale = -pac_graphic._xscale;
}
if (pac_graphic._currentframe == "1") {
pac_graphic.nextFrame();
}
}
if (ammo == 0) {
pac.hand = 0;
}
if (Key.isDown(37) && (pac._x >= (0 + (pac._width / 2)))) {
clearInterval(intermove_pac);
check1(pac);
pac._x = pac._x - speed_pac;
if (pac_graphic._xscale == -100) {
pac_graphic._xscale = -pac_graphic._xscale;
}
pac_graphic._rotation = 270;
if (pac_graphic._currentframe == "1") {
pac_graphic.nextFrame();
}
}
if (Key.isDown(38) && (pac._y >= 70)) {
clearInterval(intermove_pac);
check1(pac);
pac._y = pac._y - speed_pac;
pac._rotation = 0;
pac_graphic._rotation = 0;
if (pac_graphic._xscale == -100) {
pac_graphic._xscale = -pac_graphic._xscale;
}
if (pac_graphic._currentframe == "1") {
pac_graphic.nextFrame();
}
}
if (Key.isDown(40) && (pac._y <= (500 - (pac._height / 2)))) {
clearInterval(intermove_pac);
check1(pac);
pac._rotation = 180;
pac._y = pac._y + speed_pac;
pac_graphic._rotation = 180;
if (pac_graphic._xscale == -100) {
pac_graphic._xscale = -pac_graphic._xscale;
}
if (pac_graphic._currentframe == "1") {
pac_graphic.nextFrame();
}
}
updateAfterEvent();
}
function check1(hit) {
var _local1 = 0;
while (_local1 < wall_ar.length) {
var _local5 = (wall_ar[_local1]._x - (wall_ar[_local1]._width / 2)) - 2;
var _local3 = (wall_ar[_local1]._x + (wall_ar[_local1]._width / 2)) + 2;
var _local4 = (wall_ar[_local1]._y - (wall_ar[_local1]._height / 2)) - 2;
var _local6 = (wall_ar[_local1]._y + (wall_ar[_local1]._height / 2)) + 2;
if (((hit._x >= _local5) && (hit._x <= _local3)) && ((hit._y <= _local6) && (hit._y >= _local4))) {
if (Key.isDown(38) && ((hit._y - (hit._height / 2)) >= (wall_ar[_local1]._y - 3))) {
guideof(ld_ar);
guideof(rd_ar);
guideof(ru_ar);
guideof(lu_ar);
speed_pac = 0;
trace("we cant up");
}
if (Key.isDown(40) && ((hit._y + (hit._height / 2)) <= (wall_ar[_local1]._y + 3))) {
guideof(ld_ar);
guideof(rd_ar);
guideof(ru_ar);
guideof(lu_ar);
speed_pac = 0;
trace("we cant down");
}
if (Key.isDown(39) && ((hit._x + (hit._width / 2)) <= (wall_ar[_local1]._x + 3))) {
guideof(ld_ar);
guideof(rd_ar);
guideof(ru_ar);
guideof(lu_ar);
speed_pac = 0;
trace("we cant right");
}
if (Key.isDown(37) && ((hit._x - (hit._width / 2)) >= (wall_ar[_local1]._x - 3))) {
guideof(ld_ar);
guideof(rd_ar);
guideof(ru_ar);
guideof(lu_ar);
speed_pac = 0;
trace("we cant left");
}
}
_local1++;
}
}
var pac_graphic1 = attachMovie("pacman_graphic2", "pac_graphic", 1);
var pac_graphic1 = attachMovie("hand_pac", "hand_pac", 1002);
var pac_graphic1 = attachMovie("m14_pac", "m14_pac", 1003);
var pac_graphic1 = attachMovie("m1_pac", "m1_pac", 1004);
var pac_graphic1 = attachMovie("uzi_pac", "uzi_pac", 1005);
var pac_graphic1 = attachMovie("gal_pac", "gal_pac", 1006);
var pac_graphic1 = attachMovie("m16_pac", "m16_pac", 1007);
var pac_graphic1 = attachMovie("ak47_pac", "ak47_pac", 1008);
var pac_graphic1 = attachMovie("bizon_pac", "bizon_pac", 1009);
var pac_graphic1 = attachMovie("glock_pac", "glock_pac", 1010);
var pac_graphic1 = attachMovie("mp5hk_pac ", "mp5hk_pac", 1011);
var pac_graphic1 = attachMovie("sa80_pac ", "sa80_pac", 1012);
var pac_graphic1 = attachMovie("rpg_pac", "rpg_pac", 1013);
var pac_graphic1 = attachMovie("law_pac", "law_pac", 1014);
var pac_graphic1 = attachMovie("mp5g_pac", "mp5g_pac", 1015);
var pac_graphic1 = attachMovie("aug_pac ", "aug_pac", 1016);
var pac_graphic1 = attachMovie("shotgun_pac", "shotgun_pac", 1017);
var pac_graphic1 = attachMovie("law_camo_pac", "law_camo_pac", 1018);
var pac_graphic1 = attachMovie("mag_pac", "mag_pac", 1019);
var pac_graphic1 = attachMovie("m4_pac", "m4_pac", 1020);
var pac_graphic1 = attachMovie("commando_pac", "commando_pac", 1021);
var pac_graphic1 = attachMovie("m5_pac", "m5_pac", 1022);
var pac_graphic1 = attachMovie("m60_pac", "m60_pac", 1023);
var pac_graphic1 = attachMovie("mp5_sd_pac", "mp5_sd_pac", 1024);
var pac_graphic1 = attachMovie("desert_pac", "desert_pac", 1025);
var pac_graphic1 = attachMovie("g36_pac", "g36_pac", 1026);
var pac_graphic1 = attachMovie("at_pac", "at_pac", 1027);
var pac_graphic1 = attachMovie("colt_la_pac", "colt_la_pac", 1028);
var pac_graphic1 = attachMovie("bizon_la_pac", "bizon_la_pac", 1029);
var pac_graphic1 = attachMovie("g36_la_pac", "g36_la_pac", 1030);
var pac_graphic1 = attachMovie("at_la_pac", "at_la_pac", 1031);
pac_graphic._x = pac._x;
pac_graphic._y = pac._y;
pac._visible = 0;
pac.hit = "0";
pac.caneat = "0";
var interhit;
var tt = 0;
var my_color = new Color(_root.pac_graphic);
var myTransform = my_color.getTransform();
var ammo = 0;
var pac_weapon = new Array();
pac_weapon[0] = hand_pac;
pac_weapon[1] = m14_pac;
pac_weapon[2] = m1_pac;
pac_weapon[3] = uzi_pac;
pac_weapon[4] = gal_pac;
pac_weapon[5] = m16_pac;
pac_weapon[6] = ak47_pac;
pac_weapon[7] = bizon_pac;
pac_weapon[8] = glock_pac;
pac_weapon[9] = mp5hk_pac;
pac_weapon[10] = sa80_pac;
pac_weapon[11] = rpg_pac;
pac_weapon[12] = law_pac;
pac_weapon[13] = mp5g_pac;
pac_weapon[14] = aug_pac;
pac_weapon[15] = shotgun_pac;
pac_weapon[16] = law_camo_pac;
pac_weapon[17] = mag_pac;
pac_weapon[18] = m4_pac;
pac_weapon[19] = commando_pac;
pac_weapon[20] = m5_pac;
pac_weapon[21] = m60_pac;
pac_weapon[22] = mp5_sd_pac;
pac_weapon[23] = desert_pac;
pac_weapon[24] = g36_pac;
pac_weapon[25] = at_pac;
pac_weapon[26] = colt_la_pac;
pac_weapon[27] = bizon_la_pac;
pac_weapon[28] = g36_la_pac;
pac_weapon[29] = at_la_pac;
interhit = setInterval(pachit, 50);
pac_graphic._currentframe = 1;
var oKey = new Object();
var wall_ar = new Array(wall1, wall2, wall3, wall4, wall5, wall6, wall7, wall8, wall9, wall10, wall11, wall12, wall13, wall14, wall15, wall16, wall17, wall18, wall19, wall20, wall21, wall22, wall23);
var speed_pac = 3;
pac_graphic._xscale = 100;
Key.addListener(oKey);
var a = 0;
function collectcoin() {
if (end >= 60) {
score_num = score_num - ((sec1 * min1) * 5);
score_num = score_num - ((10 - life) * 50);
gotoAndStop ("level2");
end = 0;
trace("end");
}
backu(backs_u_ar, pac);
backu(backs_l_ar, pac);
backu(backs_d_ar, pac);
backu(backs_r_ar, pac);
var _local1 = 0;
while (_local1 < gold_ar.length) {
if (pac.hitTest(gold_ar[_local1]._x, gold_ar[_local1]._y, yes)) {
pac_graphic.gotoAndPlay("eat");
scoreplus("point_p_10", gold_ar[_local1]);
gold_ar[_local1]._x = 800;
gold_ar[_local1]._y = 1000;
removeMovieClip(gold_ar[_local1]);
my_sound.attachSound("blip.mp3");
my_sound.start();
score_num = score_num + 10;
score.text = score_num;
end++;
}
_local1++;
}
_local1 = 0;
while (_local1 < gold_big_ar.length) {
if (pac.hitTest(gold_big_ar[_local1]._x, gold_big_ar[_local1]._y, yes)) {
pac.caneat = 80;
pac_graphic.gotoAndPlay("eat");
scoreplus("point_p_10", gold_big_ar[_local1]);
gold_big_ar[_local1]._x = 800;
gold_big_ar[_local1]._y = 1000;
removeMovieClip(gold_ar[_local1]);
my_sound.attachSound("blip.mp3");
my_sound.start();
score_num = score_num + 10;
score.text = score_num;
}
_local1++;
}
}
function backu(ttt, sss) {
var _local3 = 0;
while (_local3 < 15) {
if (sss.hitTest(ttt[_local3])) {
if (ttt.info == "up") {
sss._y = 480;
} else if (ttt.info == "left") {
sss._x = 730;
} else if (ttt.info == "down") {
sss._y = 90;
} else if (ttt.info == "right") {
sss._x = 20;
}
}
_local3++;
}
}
function scoreplus(sss, aaa) {
clearinterval(noscore);
s_score = "point_p_10" + scoree;
var _local1 = attachMovie(sss, s_score, scoree + 200000);
scoree++;
_local1._x = aaa._x;
_local1._y = aaa._y;
score_MC_AR[scoree] = _local1;
noscore = setInterval(score_fade, 20, score_MC_AR[scoree]);
score_MC_AR_del[scoree] = noscore;
}
function score_fade(bbb) {
bbb._y = bbb._y - 3;
bbb._alpha = bbb._alpha - 5;
if (bbb._alpha <= 10) {
clearInterval(score_MC_AR[bbb]);
}
}
var gold_ar = new Array(gold, gold1, gold2, gold3, gold4, gold5, gold6, gold7, gold8, gold9, gold10, gold11, gold12, gold13, gold14, gold15, gold16, gold17, gold18, gold19, gold20, gold21, gold22, gold23, gold24, gold25, gold26, gold27, gold28, gold29, gold30, gold31, gold32, gold33, gold34, gold35, gold36, gold37, gold38, gold39, gold40, gold41, gold42, gold43, gold44, gold45, gold46, gold47, gold48, gold49, gold50, gold51, gold52, gold53, gold54, gold55, gold56, gold57, gold58, gold59, gold60, gold61, gold62, gold63, gold64, gold65, gold66, gold67, gold68, gold69, gold70, gold71, gold72, gold73, gold74, gold75, gold76, gold77, gold78, gold79, gold80, gold81, gold82, gold83, gold84, gold85, gold86, gold87, gold88, gold89, gold90, gold91, gold92, gold93, gold94, gold95, gold96, gold97, gold98, gold99);
var gold_big_ar = new Array(gold_big1, gold_big2, gold_big3, gold_big4);
var my_sound = new Sound();
var backs_u_ar = new Array(u_back, u_back1, u_back2);
backs_u_ar.info = "up";
var backs_l_ar = new Array(l_back, l_back1, l_back2);
backs_l_ar.info = "left";
var backs_d_ar = new Array(d_back, d_back1, d_back2);
backs_d_ar.info = "down";
var backs_r_ar = new Array(r_back, r_back1, r_back2);
backs_r_ar.info = "right";
var allback = new Array(backs_u_ar, backs_l_ar, backs_r_ar, backs_d_ar);
var i = 0;
while (i < 30) {
var j = 0;
while (j < 10) {
allback[i][j]._visible = 0;
c_guide_ar[j]._visible = 0;
j++;
}
i++;
}
var end = 0;
var oKey1 = new Object();
Key.addListener(oKey1);
var scoree = 0;
var noscore;
var score_MC_AR_del = new Array();
var score_MC_AR = new Array();
function enem_move(ttt, gun, add1) {
if (ttt != undefined) {
exp_hit_enem(ttt);
shoot_enem(ttt, gun);
check_hit_pac(ttt);
check2(ttt);
backu1(backs_u_ar, ttt);
backu1(backs_l_ar, ttt);
backu1(backs_d_ar, ttt);
backu1(backs_r_ar, ttt);
}
if (ttt.pos == "left") {
ttt._x = ttt._x - ttt.speed;
ttt._rotation = 270;
if ((ttt._xscale <= -90) && (ttt._currentframe == 1)) {
ttt._xscale = -ttt._xscale;
}
}
if (ttt.pos == "right") {
ttt._x = ttt._x + ttt.speed;
ttt._rotation = 90;
if ((ttt._xscale >= 90) && (ttt._currentframe == 1)) {
ttt._xscale = -ttt._xscale;
}
}
if (ttt.pos == "up") {
ttt._y = ttt._y - ttt.speed;
ttt._rotation = 0;
if ((ttt._xscale <= -90) && (ttt._currentframe == 1)) {
ttt._xscale = -ttt._xscale;
}
}
if (ttt.pos == "down") {
ttt._y = ttt._y + ttt.speed;
ttt._rotation = 180;
if ((ttt._xscale <= -90) && (ttt._currentframe == 1)) {
ttt._xscale = -ttt._xscale;
}
}
if (ttt.pos == "mixed") {
var _local6 = ttt._rotation + 10;
dx = Math.cos((Math.PI/180) * _local6);
dy = Math.sin((Math.PI/180) * _local6);
ttt._x = ttt._x + (dx * ttt.speed);
ttt._y = ttt._y + (dy * ttt.speed);
}
gun._x = ttt._x;
gun._y = ttt._y;
gun._rotation = ttt._rotation;
gun._xscale = ttt._xscale;
add1._x = ttt._x;
add1._y = ttt._y;
add1._rotation = ttt._rotation;
add1._xscale = ttt._xscale;
var _local2 = 0;
while (_local2 < c_guide_ar.length) {
if ((((((ttt._x >= (c_guide_ar[_local2]._x - 5)) && (ttt._x <= (c_guide_ar[_local2]._x + 5))) && (ttt._y >= (c_guide_ar[_local2]._y - 5))) && (ttt._y <= (c_guide_ar[_local2]._y + 5))) && (ttt.a >= 6)) && (ttt.hitTest(c_guide_ar[_local2]))) {
ttt.a = 0;
if ((ttt._x >= (pac._x - 4)) && (ttt._x <= (pac._x + 4))) {
if (ttt._y <= pac._y) {
ttt.pos = "down";
}
if (ttt._y > pac._y) {
ttt.pos = "up";
}
} else if ((ttt._y >= (pac._y - 4)) && (ttt._y <= (pac._y + 4))) {
if (ttt._x <= pac._x) {
ttt.pos = "right";
}
if (ttt._x > pac._x) {
ttt.pos = "left";
}
} else {
var _local3 = random(4);
switch (_local3) {
case 0 :
ttt.pos = "down";
ttt.a = "0";
ttt._y = ttt._y + 3;
break;
case 1 :
ttt.pos = "up";
ttt.a = "0";
ttt._y = ttt._y - 3;
break;
case 2 :
ttt.pos = "right";
ttt.a = "0";
ttt._x = ttt._x + 3;
break;
case 3 :
ttt.pos = "left";
ttt.a = "0";
ttt._x = ttt._x - 3;
}
}
} else if (ttt.hitTest(c_guide_ar[_local2]) == false) {
ttt.a = ttt.a + 1;
}
_local2++;
}
updateAfterEvent();
}
function backu1(ttt, sss) {
var _local3 = 0;
while (_local3 < 15) {
if (sss.hitTest(ttt[_local3])) {
if (ttt.info == "up") {
sss._y = 480;
} else if (ttt.info == "left") {
sss._x = 730;
} else if (ttt.info == "down") {
sss._y = 90;
} else if (ttt.info == "right") {
sss._x = 20;
}
}
_local3++;
}
}
function check2(hit) {
var _local3 = 0;
while (_local3 < wall_ar.length) {
var _local6 = (wall_ar[_local3]._x - (wall_ar[_local3]._width / 2)) - 2;
var _local4 = (wall_ar[_local3]._x + (wall_ar[_local3]._width / 2)) + 2;
var _local5 = (wall_ar[_local3]._y - (wall_ar[_local3]._height / 2)) - 2;
var _local7 = (wall_ar[_local3]._y + (wall_ar[_local3]._height / 2)) + 2;
if ((((hit._x + (hit._width / 2)) >= _local6) && ((hit._x - (hit._width / 2)) <= _local4)) && ((((hit._y - (hit._height / 2)) <= _local7) && ((hit._y + (hit._height / 2)) >= _local5)) && (hit._currentframe == 1))) {
var _local2 = random(2);
if ((hit.pos == "left") && (hit.wall >= 1)) {
hit._x = hit._x + 4;
if (_local2 == 0) {
hit.pos = "right";
} else if (_local2 == 1) {
hit.pos = "up";
} else if (_local2 == 2) {
hit.pos = "down";
}
hit.wall = 0;
} else if ((hit.pos == "right") && (hit.wall >= 1)) {
hit._x = hit._x - 4;
if (_local2 == 0) {
hit.pos = "left";
} else if (_local2 == 1) {
hit.pos = "up";
} else if (_local2 == 2) {
hit.pos = "down";
}
hit.wall = 0;
} else if ((hit.pos == "up") && (hit.wall >= 1)) {
hit._y = hit._y + 4;
if (_local2 == 0) {
hit.pos = "right";
} else if (_local2 == 1) {
hit.pos = "down";
} else if (_local2 == 2) {
hit.pos = "left";
}
hit.wall = 0;
} else if ((hit.pos == "down") && (hit.wall >= 1)) {
hit._y = hit._y - 4;
if (_local2 == 0) {
hit.pos = "right";
} else if (_local2 == 2) {
hit.pos = "left";
} else if (_local2 == 2) {
hit.pos = "up";
}
hit.wall = 0;
}
} else if (hit.wall == 0) {
hit.wall = hit.wall + 1;
}
_local3++;
}
}
function fade_enemy(aaa, count) {
if (aaa._currentframe != 1) {
fade_enem_ar[count]++;
if ((fade_enem_ar[count] >= 10) && ((sec1 > 1) || (min1 > 1))) {
aaa._y = 1000;
aaa._x = 1000;
clearInterval(bbb[aaa.id]);
removeMovieClip(aaa);
fade_enem_ar[count] = 0;
clearInterval(count_ar[count]);
}
}
}
function check_hit_pac(hit) {
var _local6 = (pac._x - (pac._width / 2)) - 4;
var _local4 = (pac._x + (pac._width / 2)) + 4;
var _local5 = (pac._y - (pac._height / 2)) - 4;
var _local7 = (pac._y + (pac._height / 2)) + 4;
if (((((hit._x + (hit._width / 2)) >= _local6) && ((hit._x - (hit._width / 2)) <= _local4)) && (((hit._y - (hit._height / 2)) <= _local7) && ((hit._y + (hit._height / 2)) >= _local5))) && (pac.caneat <= 0)) {
if (((hit.pos == "left") && (hit.pac >= 1)) && (hit._currentframe == 1)) {
hit._x = hit._x + 4;
hit.pos = "right";
hit.pac = 0;
if (pac.hit == 0) {
pac.hit = 16;
if (pac.caneat <= 0) {
life--;
}
}
}
if (((hit.pos == "right") && (hit.pac >= 1)) && (hit._currentframe == 1)) {
hit._x = hit._x - 4;
hit.pos = "left";
hit.pac = 0;
if (pac.hit == 0) {
pac.hit = 16;
life--;
if (pac.caneat == 0) {
life--;
}
}
}
if (((hit.pos == "up") && (hit.pac >= 1)) && (hit._currentframe == 1)) {
hit._y = hit._y + 4;
hit.pos = "down";
hit.pac = 0;
if (pac.hit == 0) {
pac.hit = 16;
life--;
if (pac.caneat == 0) {
life--;
}
}
}
if (((hit.pos == "down") && (hit.pac >= 1)) && (hit._currentframe == 1)) {
hit._y = hit._y - 4;
hit.pos = "up";
hit.pac = 0;
if (pac.hit == 0) {
pac.hit = 16;
life--;
if (pac.caneat == 0) {
life--;
}
}
} else if (hit.hitTest(pac) == false) {
hit.pac = hit.pac + 1;
}
}
if (((((hit._x + (hit._width / 2)) >= _local6) && ((hit._x - (hit._width / 2)) <= _local4)) && (((hit._y - (hit._height / 2)) <= _local7) && ((hit._y + (hit._height / 2)) >= _local5))) && (pac.caneat > 0)) {
if (pac.caneat > 0) {
if ((aeee <= 0) && (hit._currentframe == 1)) {
var _local3 = 0;
while (_local3 < hand_en_ar.length) {
if (hand_en_ar[_local3].id == hit.id) {
hand_en_ar[_local3].gotoAndPlay(2);
}
if (addons_ar[_local3].id == hit.id) {
addons_ar[_local3].gotoAndPlay(2);
}
_local3++;
}
hit.speed = 0;
hit.gotoAndPlay(2);
num_enemys--;
_root.scoreplus("point_p_20", hit);
score_num = score_num + 20;
score.text = score.text - -20;
enem_count++;
trace("enem_count=" + enem_count);
fade_enem_ar[enem_count] = 0;
inter_enemy_aa = setInterval(fade_enemy, 40, hit, enem_count);
}
count_ar[enem_count] = inter_enemy_aa;
}
}
}
function exp_hit_enem(eneme) {
var _local4 = 0;
while (_local4 < explode_ar.length) {
if (((((((eneme._x > (explode_ar[_local4]._x - (explode_ar[_local4]._width / 2))) && (eneme._x < (explode_ar[_local4]._x + (explode_ar[_local4]._width / 2)))) && (eneme._y > (explode_ar[_local4]._y - (explode_ar[_local4]._height / 2)))) && (eneme._y < (explode_ar[_local4]._y + (explode_ar[_local4]._height / 2)))) && (eneme._currentframe == 1)) && (explode_ar[_local4].hit <= 0)) && (eneme._currentframe == 1)) {
if ((((explode.gas != 1) && (eneme.gas != 1)) || ((explode.gas == 1) && (eneme.gas != 1))) || ((explode.gas != 1) && (eneme.gas == 1))) {
explode_ar[_local4].id = 0;
enem_count++;
eneme.speed = 0;
num_enemys--;
_root.scoreplus("point_p_20", eneme);
score_num = score_num + 20;
score.text = score.text - -20;
var _local3 = 0;
while (_local3 < hand_en_ar.length) {
if (hand_en_ar[_local3].id == eneme.id) {
hand_en_ar[_local3].gotoAndPlay(2);
removeMovieClip(hand_en_ar[_local3]);
}
_local3++;
}
_local3 = 0;
while (_local3 < addons_ar.length) {
if (addons_ar[_local3].id == eneme.id) {
addons_ar[_local3].gotoAndPlay(2);
removeMovieClip(addons_ar[_local3]);
}
_local3++;
}
eneme.gotoAndPlay(2);
fade_enem_ar[enem_count] = 0;
inter_enemy_aa2 = setInterval(fade_enemy, 40, eneme, enem_count);
count_ar[enem_count] = inter_enemy_aa2;
trace("count=" + count_ar[enem_count]);
}
}
_local4++;
}
}
function addenemy(enem_mca, rax, gax, bax, gun, addon) {
var _local2 = enem_ar.length;
trace(_local2);
var _local3 = this.attachMovie(enem_mca, ("enemy" + _local2) + 1, _local2 + 10000);
var _local5 = this.attachMovie(gun, ("hand_en" + _local2) + 1, (_local2 + 10000) + 6000);
var _local4 = this.attachMovie(addon, ("addon_" + _local2) + 1, (_local2 + 10000) + 3000);
var _local6 = random(500) + 100;
_local3._x = _local6;
_local3._y = 259;
_local5._x = _local6;
_local5._y = 259;
_local4._x = _local6;
_local4._y = 259;
_local3._currentframe = 1;
_local5._currentframe = 1;
_local4._currentframe = 1;
var _local10 = new Color(_local3.color4);
var _local9 = new Color(_local3.body);
var _local7 = {ra:rax, ga:gax, ba:bax, aa:100};
_local10.setTransform(_local7);
_local9.setTransform(_local7);
enem_ar[_local2] = _local3;
hand_en_ar[_local2] = _local5;
addons_ar[_local2] = _local4;
enem_ar[_local2].id = _local2;
hand_en_ar[_local2].id = _local2;
addons_ar[_local2].id = _local2;
hand_en_ar[_local2].kindof = gun;
enem_ar[_local2].a = "6";
enem_ar[_local2].wall = "5";
enem_ar[_local2].pac = "0";
enem_ar[_local2].ifstop = "0";
num_enemys++;
enem_ar[_local2].pos = "left";
enem_ar[_local2].speed = 2;
inter_en = setInterval(enem_move, 8, enem_ar[_local2], hand_en_ar[_local2], addons_ar[_local2]);
var _local8 = inter_en;
bbb[_local2] = _local8;
}
function addenemy_pos(enem_mca, rax, gax, bax, gun, addon, tx, ty) {
var _local2 = enem_ar.length;
trace(_local2);
var _local3 = this.attachMovie(enem_mca, ("enemy" + _local2) + 1, _local2 + 10000);
var _local5 = this.attachMovie(gun, ("hand_en" + _local2) + 1, (_local2 + 10000) + 6000);
var _local4 = this.attachMovie(addon, ("addon_" + _local2) + 1, (_local2 + 10000) + 3000);
var _local12 = random(400) + 100;
_local3._x = tx;
_local3._y = ty;
_local5._x = tx;
_local5._y = ty;
_local4._x = tx;
_local4._y = ty;
_local3._currentframe = 1;
_local5._currentframe = 1;
_local4._currentframe = 1;
var _local11 = new Color(_local3.color4);
var _local10 = new Color(_local3.body);
var _local6 = {ra:rax, ga:gax, ba:bax, aa:100};
_local11.setTransform(_local6);
_local10.setTransform(_local6);
enem_ar[_local2] = _local3;
hand_en_ar[_local2] = _local5;
addons_ar[_local2] = _local4;
enem_ar[_local2].id = _local2;
hand_en_ar[_local2].id = _local2;
addons_ar[_local2].id = _local2;
hand_en_ar[_local2].kindof = gun;
enem_ar[_local2].a = "6";
enem_ar[_local2].wall = "5";
enem_ar[_local2].pac = "0";
enem_ar[_local2].ifstop = "0";
num_enemys++;
enem_ar[_local2].pos = "left";
enem_ar[_local2].speed = 2;
inter_en = setInterval(enem_move, 8, enem_ar[_local2], hand_en_ar[_local2], addons_ar[_local2]);
var _local7 = inter_en;
bbb[_local2] = _local7;
}
var i = 0;
while (i < enem_ar.length) {
clearInterval(bbb[i]);
enem_ar[i].id.tt = 0;
i++;
}
var enem_count = 0;
var num_enemys = 4;
life = 10;
var inter_en;
var enem_ar = new Array(enemy1, enemy3);
var hand_en_ar = new Array(hand_en1);
var addons_ar = new Array();
enem_ar[0].a = "6";
enem_ar[0].wall = "5";
enem_ar[0].ifstop = "0";
enem_ar[0].pac = "0";
enem_ar[0].id = "0";
hand_en_ar[0].id = "0";
hand_en_ar[0].kindof = "hand_en2";
enem_ar[1].a = "6";
enem_ar[1].wall = "5";
enem_ar[1].pac = "0";
enem_ar[1].id = "1";
enem_ar[1].ifstop = "0";
enem_ar[2].a = "6";
enem_ar[2].wall = "5";
enem_ar[2].pac = "0";
enem_ar[2].id = "2";
enem_ar[2].ifstop = "0";
var c_guide_ar = new Array(c_guide1, c_guide2, c_guide3, c_guide4, c_guide5, c_guide6, c_guide7, c_guide8, c_guide9, c_guide10, c_guide11, c_guide12, c_guide13, c_guide14);
var i = 0;
while (i < 30) {
c_guide_ar[i]._visible = 0;
i++;
}
enem_ar[0].pos = "left";
enem_ar[0].speed = 2;
enem_ar[1].pos = "right";
enem_ar[1].speed = 2;
enem_ar[2].pos = "right";
enem_ar[2].speed = 2;
var inter_en;
var bbb = new Array();
var i = 0;
while (i < enem_ar.length) {
inter_en = setInterval(enem_move, 20, enem_ar[i], hand_en_ar[i]);
var ttt = inter_en;
bbb[i] = ttt;
i++;
}
var inter_enemy_aa;
var fade_enem_ar = new Array();
var aeee = 0;
clearInterval(inter_mmm);
var pac_mp3 = new Sound();
var wall_mp3 = new Sound();
var inter_mmm;
inter_mmm = setInterval(movenemyss, 1000);
function exp_hit_pac() {
var _local1 = 0;
while (_local1 < explode_ar.length) {
if ((((((pac._x > (explode_ar[_local1]._x - (explode_ar[_local1]._width / 2))) && (pac._x < (explode_ar[_local1]._x + (explode_ar[_local1]._width / 2)))) && (pac._y > (explode_ar[_local1]._y - (explode_ar[_local1]._height / 2)))) && (pac._y < (explode_ar[_local1]._y + (explode_ar[_local1]._height / 2)))) && (pac.hit <= 0)) && (pac.caneat == 0)) {
life--;
life--;
pac.hit = 25;
}
_local1++;
}
}
function bull_hit_pac(bulll) {
if ((((((((bulll._x + (bulll._width / 2)) > ((pac._x - (pac._width / 2)) + 5)) && ((bulll._x - (bulll._width / 2)) < ((pac._x + (pac._width / 2)) - 5))) && ((bulll._y + (bulll._height / 2)) > ((pac._y - (pac._height / 2)) + 5))) && ((bulll._y - (bulll._height / 2)) < ((pac._y + (pac._height / 2)) - 5))) && (bulll._currentframe == 1)) && (pac.hit <= 0)) && (pac.caneat == 0)) {
life--;
if (bulll.id == 1) {
explode_num++;
if (bulll.getex == 1) {
var _local3 = attachMovie("expl", "expl" + explode_num, 65000 + explode_num);
}
if (bulll.getex == 2) {
var _local3 = attachMovie("expl_big1", "expl" + explode_num, 65000 + explode_num);
}
if (bulll.getex == 4) {
var _local3 = attachMovie("expl_red", "expl" + explode_num, 65000 + explode_num);
}
if (bulll.getex == 5) {
var _local3 = attachMovie("expl_green", "expl" + explode_num, 65000 + explode_num);
}
explode_ar[explode_num] = _local3;
explode_ar[explode_num]._x = bulll._x;
explode_ar[explode_num]._y = bulll._y;
}
bulll.gotoAndPlay(2);
pac.hit = 16;
bulll.speed = 0;
}
var _local2 = 0;
while (_local2 < wall_ar.length) {
if (((((bulll._x > (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2))) && (bulll._x < (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2)))) && (bulll._y > (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (bulll._y < (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2)))) && (bulll._currentframe == 1)) {
if (bulll.id == 1) {
explode_num++;
if (bulll.getex == 1) {
var _local3 = attachMovie("expl", "expl" + explode_num, 65000 + explode_num);
}
if (bulll.getex == 2) {
var _local3 = attachMovie("expl_big1", "expl" + explode_num, 65000 + explode_num);
}
if (bulll.getex == 4) {
var _local3 = attachMovie("expl_red", "expl" + explode_num, 65000 + explode_num);
}
if (bulll.getex == 5) {
var _local3 = attachMovie("expl_green", "expl" + explode_num, 65000 + explode_num);
}
explode_ar[explode_num] = _local3;
explode_ar[explode_num]._x = bulll._x;
explode_ar[explode_num]._y = bulll._y;
}
bulll.gotoAndPlay(2);
wall_ar[_local2].hit == 16;
bulll.speed = 0;
}
_local2++;
}
}
function hand_where() {
if (pac.hand == 0) {
var _local2 = 0;
while (_local2 < pac_weapon.length) {
pac_weapon[_local2]._x = 1000;
pac_weapon[_local2]._y = 1000;
_local2++;
}
}
var _local1 = 0;
while (_local1 < 200) {
if (pac.hand == _local1) {
pac_weapon[_local1 - 1]._x = pac._x;
pac_weapon[_local1 - 1]._y = pac._y;
pac_weapon[_local1 - 1]._rotation = pac_graphic._rotation;
pac_weapon[_local1 - 1]._xscale = pac_graphic._xscale;
}
_local1++;
}
_local1 = 0;
while (_local1 < 200) {
if (pac.hand != _local1) {
pac_weapon[_local1 - 1]._x = 1000;
pac_weapon[_local1 - 1]._Y = 1000;
}
_local1++;
}
if ((Key.isDown(17) && (pac.greande > 0)) && (greand_throw == 2)) {
throw_greande_en(pac_graphic);
greand_throw = 0;
pac.greande--;
}
if ((Key.isDown(32) && (go33 >= 1)) && (ammo > 0)) {
ammo--;
if (pac_weapon[pac.hand - 1] == pac_weapon[0]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 2;
enemy_mp4.attachSound("gunshots_sm.wav");
enemy_mp4.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[1]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 2;
enemy_mp3.attachSound("GUN04_cop.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[2]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 1;
enemy_mp3.attachSound("GUN04_cop.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[3]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 1;
enemy_mp3.attachSound("uzi.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[4]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 1;
enemy_mp3.attachSound("galil.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[5]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("M16.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[6]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("ak47.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[7]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 1;
enemy_mp3.attachSound("uzi.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[8]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 1;
enemy_mp3.attachSound("gunshots_sm.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[9]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("mp5.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[10]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("m16.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[11]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "rpg_mis");
go33 = go33 - 1;
}
if (pac_weapon[pac.hand - 1] == pac_weapon[12]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "rpg_mis");
go33 = go33 - 1;
}
if (pac_weapon[pac.hand - 1] == pac_weapon[13]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("mp5.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[14]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("aug.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[15]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "shot_ball");
go33 = go33 - 1;
enemy_mp3.attachSound("shotgun.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[16]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "rpg_mis");
go33 = go33 - 1;
}
if (pac_weapon[pac.hand - 1] == pac_weapon[17]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "shot_ball");
go33 = go33 - 1;
enemy_mp3.attachSound("mag.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[18]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("m16.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[19]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("m16a2.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[20]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball4");
go33 = go33 - 1;
enemy_mp3.attachSound("aug.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[21]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball2");
go33 = go33 - 1;
enemy_mp3.attachSound("pk96.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[22]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball3");
go33 = go33 - 1;
enemy_mp3.attachSound("mp5_sd.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[23]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "shot_ball");
go33 = go33 - 1;
enemy_mp3.attachSound("mag.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[24]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball4");
go33 = go33 - 1;
enemy_mp3.attachSound("g36.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[25]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "missle");
go33 = go33 - 1;
}
if (pac_weapon[pac.hand - 1] == pac_weapon[26]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball6");
go33 = go33 - 1;
enemy_mp3.attachSound("LASER5.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[27]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball6");
go33 = go33 - 1;
enemy_mp3.attachSound("laser_smg.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[28]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "ball5");
go33 = go33 - 1;
enemy_mp3.attachSound("LASER5.wav");
enemy_mp3.start();
}
if (pac_weapon[pac.hand - 1] == pac_weapon[29]) {
shoot_en_bul2(pac_weapon[pac.hand - 1], "missle");
go33 = go33 - 1;
}
}
}
function shoot_en_bul2(gun, bullet) {
ebullpac++;
gun.gun.gotoAndPlay(2);
var _local3 = this.attachMovie(bullet, ("ball_pac" + ebullpac) + 1, ebullpac + 150000);
pac_shoot[ebullpac] = _local3;
gun_rad = Math.atan2(gun.gun._y, gun.gun._x);
gun_deg = (gun_rad * 180) / Math.PI;
rotat = gun._rotation + ((gun_deg - 360) + 90);
dx = Math.sin((Math.PI/180) * rotat);
dy = Math.cos((Math.PI/180) * rotat);
gun_xscal = Math.abs(gun._xscale);
_local3._rotation = gun._rotation;
pac_shoot_num[ebullpac] = 0;
dx_ar_pac[ebullpac] = dx;
yx_ar_pac[ebullpac] = dy;
_local3._x = gun._x + (dx * (-gun.gun._y));
_local3._y = gun._y - (((dy * (-gun.gun._y)) * gun._xscale) / gun_xscal);
dx = Math.sin((Math.PI/180) * (rotat + 6));
dy = Math.cos((Math.PI/180) * (rotat + 6));
dx_ar_pac[ebullpac] = dx;
yx_ar_pac[ebullpac] = dy;
if (((bullet == "ball2") || (bullet == "missle")) || (bullet == "rpg_mis")) {
_local3.speed = 5;
bull_move_ene2 = setInterval(ball_move2, 20, pac_shoot[ebullpac], ebullpac, gun.range, gun);
pac_shoot_ar[ebullpac] = bull_move_ene2;
}
if (((bullet == "ball3") || (bullet == "shot_ball")) || (bullet == "ball6")) {
_local3.speed = 5;
bull_move_ene2 = setInterval(ball_move2, 16, pac_shoot[ebullpac], ebullpac, gun.range, gun);
pac_shoot_ar[ebullpac] = bull_move_ene2;
}
if ((bullet == "ball4") || (bullet == "ball5")) {
_local3.speed = 6;
bull_move_ene2 = setInterval(ball_move2, 10, pac_shoot[ebullpac], ebullpac, gun.range, gun);
pac_shoot_ar[ebullpac] = bull_move_ene2;
}
}
function ball_move2(bullet, numm24, rangeofammo2, ffgun) {
bull_hit_enem(pac_shoot[numm24]);
bullspeed1 = pac_shoot[numm24].speed;
bullet._x = bullet._x + (dx_ar_pac[numm24] * bullspeed1);
bullet._y = bullet._y - (yx_ar_pac[numm24] * bullspeed1);
pac_shoot_num[numm24]++;
if ((pac_shoot_num[numm24] == (rangeofammo2 / 2)) && (ffgun.rate1 == "semi")) {
go33 = 1;
}
if ((pac_shoot_num[numm24] == (rangeofammo2 / 4)) && (ffgun.rate1 == "auto")) {
go33 = 1;
}
if ((pac_shoot_num[numm24] == (rangeofammo2 / 3)) && (ffgun.rate1 == "semi_a")) {
go33 = 1;
}
if ((pac_shoot_num[numm24] >= rangeofammo2) && (ffgun.rate1 == "mono")) {
go33 = 1;
}
if (pac_shoot_num[numm24] >= rangeofammo2) {
removeMovieClip(pac_shoot[numm24]);
clearInterval(pac_shoot_ar[numm24]);
pac_shoot_num[numm24] = 0;
}
}
function bull_hit_enem(bulll) {
var _local3 = 0;
while (_local3 < enem_ar.length) {
if (((((((bulll._x + (bulll._width / 2)) > ((enem_ar[_local3]._x - (enem_ar[_local3]._width / 2)) + 5)) && ((bulll._x - bulll._width) < ((enem_ar[_local3]._x + (enem_ar[_local3]._width / 2)) - 5))) && ((bulll._y + (bulll._height / 2)) > ((enem_ar[_local3]._y - (enem_ar[_local3]._height / 2)) + 5))) && ((bulll._y - (bulll._height / 2)) < ((enem_ar[_local3]._y + (enem_ar[_local3]._height / 2)) - 5))) && (bulll._currentframe == 1)) && (enem_ar[_local3]._currentframe == 1)) {
var _local4 = 0;
while (_local4 < hand_en_ar.length) {
if (hand_en_ar[_local4].id == enem_ar[_local3].id) {
hand_en_ar[_local4].gotoAndPlay(2);
}
if (addons_ar[_local4].id == enem_ar[_local3].id) {
addons_ar[_local4].gotoAndPlay(2);
}
_local4++;
}
if (bulll.id == 1) {
explode_num++;
if (bulll.getex == 1) {
var _local5 = attachMovie("expl", "expl" + explode_num, 65000 + explode_num);
}
if (bulll.getex == 2) {
var _local5 = attachMovie("expl_big1", "expl" + explode_num, 65000 + explode_num);
}
if (bulll.getex == 4) {
var _local5 = attachMovie("expl_red", "expl" + explode_num, 65000 + explode_num);
}
if (bulll.getex == 5) {
var _local5 = attachMovie("expl_green", "expl" + explode_num, 65000 + explode_num);
}
explode_ar[explode_num] = _local5;
explode_ar[explode_num]._x = bulll._x;
explode_ar[explode_num]._y = bulll._y;
}
bulll.gotoAndPlay(2);
enem_count++;
enem_ar[_local3].speed = 0;
num_enemys--;
_root.scoreplus("point_p_20", enem_ar[_local3]);
score_num = score_num + 20;
score.text = score.text - -20;
enem_ar[_local3].gotoAndPlay(2);
fade_enem_ar[enem_count] = 0;
inter_enemy_aa2 = setInterval(fade_enemy, 40, enem_ar[_local3], enem_count);
count_ar[enem_count] = inter_enemy_aa2;
trace("count=" + count_ar[enem_count]);
bulll.speed = 0;
}
_local3++;
}
_local3 = 0;
while (_local3 < wall_ar.length) {
if (((((bulll._x > (wall_ar[_local3]._x - (wall_ar[_local3]._width / 2))) && (bulll._x < (wall_ar[_local3]._x + (wall_ar[_local3]._width / 2)))) && (bulll._y > (wall_ar[_local3]._y - (wall_ar[_local3]._height / 2)))) && (bulll._y < (wall_ar[_local3]._y + (wall_ar[_local3]._height / 2)))) && (bulll._currentframe == 1)) {
if (bulll.id == 1) {
explode_num++;
if (bulll.getex == 1) {
var _local5 = attachMovie("expl", "expl" + explode_num, 65000 + explode_num);
}
if (bulll.getex == 2) {
var _local5 = attachMovie("expl_big1", "expl" + explode_num, 65000 + explode_num);
}
if (bulll.getex == 4) {
var _local5 = attachMovie("expl_red", "expl" + explode_num, 65000 + explode_num);
}
if (bulll.getex == 5) {
var _local5 = attachMovie("expl_green", "expl" + explode_num, 65000 + explode_num);
}
explode_ar[explode_num] = _local5;
explode_ar[explode_num]._x = bulll._x;
explode_ar[explode_num]._y = bulll._y;
}
bulll.gotoAndPlay(2);
wall_ar[_local3].hit == 16;
bulll.speed = 0;
}
_local3++;
}
_local3 = 0;
while (_local3 < addons_ar.length) {
if (((((((bulll._x > (addons_ar[_local3]._x - (addons_ar[_local3]._width / 2))) && (bulll._x < (addons_ar[_local3]._x + (addons_ar[_local3]._width / 2)))) && (bulll._y > (addons_ar[_local3]._y - (addons_ar[_local3]._height / 2)))) && (bulll._y < (addons_ar[_local3]._y + (addons_ar[_local3]._height / 2)))) && (bulll._currentframe == 1)) && (addons_ar[_local3]._currentframe == 1)) && (addons_ar[_local3].trans > 0)) {
addons_ar[_local3].trans--;
if (bulll.id == 1) {
addons_ar[_local3].trans = addons_ar[_local3].trans - 2;
explode_num++;
if (bulll.getex == 1) {
var _local5 = attachMovie("expl", "expl" + explode_num, 65000 + explode_num);
}
if (bulll.getex == 2) {
var _local5 = attachMovie("expl_big1", "expl" + explode_num, 65000 + explode_num);
}
if (bulll.getex == 4) {
var _local5 = attachMovie("expl_red", "expl" + explode_num, 65000 + explode_num);
}
if (bulll.getex == 5) {
var _local5 = attachMovie("expl_green", "expl" + explode_num, 65000 + explode_num);
}
explode_ar[explode_num] = _local5;
explode_ar[explode_num]._x = bulll._x;
explode_ar[explode_num]._y = bulll._y;
}
bulll.gotoAndPlay(2);
wall_ar[_local3].hit == 16;
bulll.speed = 0;
}
_local3++;
}
}
function collet_ammo() {
var _local1 = 0;
while (_local1 < 180) {
if ((((ammo_ar_take[_local1]._x > (pac._x - (pac._width / 2))) && (ammo_ar_take[_local1]._x < (pac._x + (pac._width / 2)))) && (ammo_ar_take[_local1]._y > (pac._y - (pac._height / 2)))) && (ammo_ar_take[_local1]._y < (pac._y + (pac._height / 2)))) {
trace("t=" + _local1);
if (_local1 == 0) {
ammo = 10 + _local1;
}
if (_local1 == 1) {
ammo = 6 + _local1;
}
if (_local1 == 2) {
ammo = 4 + _local1;
}
if (_local1 == 3) {
ammo = 14 + _local1;
}
if (_local1 == 4) {
ammo = 6 + _local1;
}
if (_local1 == 5) {
ammo = 7 + _local1;
}
if (_local1 == 6) {
ammo = 8 + _local1;
}
if (_local1 == 7) {
ammo = 13 + _local1;
}
if (_local1 == 8) {
ammo = 10;
pac.greande = 2;
}
if (_local1 == 9) {
ammo = 15;
pac.greande = 1;
}
if (_local1 == 10) {
ammo = 12;
pac.greande = 1;
}
if (_local1 == 11) {
ammo = 3;
}
if (_local1 == 12) {
ammo = 4;
}
if (_local1 == 13) {
ammo = 18;
pac.greande = 1;
}
if (_local1 == 14) {
ammo = 14;
pac.greande = 1;
}
if (_local1 == 15) {
ammo = 7;
pac.greande = 2;
}
if (_local1 == 16) {
ammo = 4;
}
if (_local1 == 17) {
ammo = 12;
pac.greande = 1;
}
if (_local1 == 18) {
ammo = 20;
pac.greande = 1;
}
if (_local1 == 19) {
ammo = 24;
pac.greande = 2;
}
if (_local1 == 20) {
ammo = 6;
pac.greande = 0;
}
if (_local1 == 21) {
ammo = 28;
pac.greande = 0;
}
if (_local1 == 22) {
ammo = 20;
pac.greande = 2;
}
if (_local1 == 23) {
ammo = 10;
pac.greande = 2;
}
if (_local1 == 24) {
ammo = 16;
pac.greande = 1;
}
if (_local1 == 25) {
ammo = 6;
pac.greande = 0;
}
if (_local1 == 26) {
ammo = 13;
pac.greande = 2;
}
if (_local1 == 27) {
ammo = 22;
pac.greande = 2;
}
if (_local1 == 28) {
ammo = 16;
pac.greande = 1;
}
if (_local1 == 29) {
ammo = 7;
pac.greande = 0;
}
pac.hand = _local1 + 1;
trace(pac.hand);
ammo_ar_take[_local1]._x = 900;
ammo_ar_take[_local1]._y = 900;
}
_local1++;
}
}
var go33 = 1;
var explode_ar = new Array();
var explode_num = 0;
pac.greande = 10;
var greand_throw = 2;
pac.hand = 0;
var bull_move_ene2;
var pac_shoot_ar = new Array();
var pac_shoot_num = new Array();
var pac_shoot = new Array();
var ebullpac = 0;
var dx_ar_pac = new Array();
var yx_ar_pac = new Array();
var count_ar = new Array();
function timeof() {
sec1++;
clock.text = sec1;
if (sec1 >= 59) {
sec1 = 0;
min1++;
clock_min.text = min1;
}
if (sec1 == 55) {
addenemy("enemy_swat", 100, 99, 2, "en_colt_la", "alien");
}
if (((sec1 == 20) || (sec1 == 50)) && (num_enemys < 9)) {
addenemy_pos("en_robot", 10, 90, 90, "en_at_la", "robot", 146, 256);
addenemy_pos("en_robot", 60, 40, 80, "en_g36_la", "robot", 74, 395);
}
if ((sec1 == 45) && (num_enemys < 9)) {
addenemy("enemyzz", 60, 30, 60, "en_g36_la", "alien2");
}
if ((sec1 == 2) && (num_enemys < 7)) {
}
if ((((sec1 == 30) || (sec1 == 45)) || (sec1 == 10)) && (num_enemys < 6)) {
addenemy("enemy_swat", 92, 90, 2, "en_bizon_la", "alien2");
var _local1 = 0;
while (_local1 < addons_ar.length) {
addons_ar[_local1].greande = 1;
_local1++;
}
}
if (sec1 == 35) {
ammo_ar_take[29]._x = 500;
ammo_ar_take[29]._y = 259;
}
if (sec1 == 2) {
ammo_ar_take[26]._x = 350;
ammo_ar_take[26]._y = 259;
}
if ((sec1 == 40) && (min1 == 0)) {
ammo_ar_take[28]._x = 240;
ammo_ar_take[28]._y = 259;
}
if (sec1 == 20) {
ammo_ar_take[27]._x = 240;
ammo_ar_take[27]._y = 259;
ammo_ar_take[20]._x = 290;
ammo_ar_take[20]._y = 259;
}
}
function car_move() {
if (car.place == 5) {
car.place = 1;
addenemy_pos("enemyzz", 80, 80, 80, "en_mp5_sd", "hl2", 394, 328);
}
}
function ball_move(bullet, numm2, rangeofammo, numB) {
bull_hit_pac(ball_shoot[numm2]);
bullspeed = ball_shoot[numm2].speed;
bullet._x = bullet._x + (dx_ar[numm2] * bullspeed);
bullet._y = bullet._y - (yx_ar[numm2] * bullspeed);
ball_shoot_num[numm2]++;
if (ball_shoot_num[numm2] >= rangeofammo) {
removeMovieClip(ball_shoot[numm2]);
clearInterval(ball_shoot_ar[numm2]);
ball_shoot_num[numm2] = 0;
}
}
function shoot_en_bul(gun, enemy, bullet, num1, num444, num5555) {
ebull++;
if (enemy.speed == 0) {
var _local3 = this.attachMovie(bullet, ("ball" + ebull) + 1, ebull + 50000);
ball_shoot[ebull] = _local3;
gun_rad = Math.atan2(gun.gun._y, gun.gun._x);
gun_deg = (gun_rad * 180) / Math.PI;
rotat = gun._rotation + ((gun_deg - 360) + 90);
dx = Math.sin((Math.PI/180) * rotat);
dy = Math.cos((Math.PI/180) * rotat);
gun_xscal = Math.abs(gun._xscale);
ball_shoot_num[ebull] = 0;
dx_ar[ebull] = dx;
yx_ar[ebull] = dy;
_local3._x = gun._x + (dx * (-gun.gun._y));
_local3._y = gun._y - (((dy * (-gun.gun._y)) * gun._xscale) / gun_xscal);
_local3._rotation = gun._rotation;
rotat = gun._rotation + ((gun_deg - 360) + 90);
dx = Math.sin((Math.PI/180) * (rotat + 5));
dy = Math.cos((Math.PI/180) * (rotat + 5));
dx_ar[ebull] = dx;
yx_ar[ebull] = dy;
if (gun.kindof == "hand_en") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "hand_en2") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_m16") {
_local3.speed = 6;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_m1") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_uzi") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 15, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_gal") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 20, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_ak47") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 17, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_bizon") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 19, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_pk96") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 18, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_rpg") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 19, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_glock") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 16, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_mp5hk") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 15, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_sa80") {
_local3.speed = 6;
bull_move_ene = setInterval(ball_move, 18, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_law") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 19, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_law_camo") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 17, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_mp5g") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 14, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_aug") {
_local3.speed = 6;
bull_move_ene = setInterval(ball_move, 17, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_shotgun") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 17, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "APC_MACHINE") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 17, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_mag") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 17, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_m4") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 16, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_commando") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 14, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_m5") {
_local3.speed = 6;
bull_move_ene = setInterval(ball_move, 9, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_m60") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 17, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_mp5_sd") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 14, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_desert") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 17, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_g36") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 10, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_at") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 16, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_colt_la") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 16, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_bizon_la") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 16, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_g36_la") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 12, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
if (gun.kindof == "en_at_la") {
_local3.speed = 5;
bull_move_ene = setInterval(ball_move, 16, ball_shoot[ebull], ebull, num444, num5555);
ball_shoot_ar[ebull] = bull_move_ene;
}
}
}
function shoot_enema(zzz, eee, num) {
if ((zzz.speed == 0) && (enem_time_ar[num] == 2)) {
var _local4 = 0;
while (_local4 < addons_ar.length) {
if (((addons_ar[_local4].id == zzz.id) && (addons_ar[_local4].greande > 0)) && (addons_ar[_local4].kindof == "explode")) {
throw_greande_en(addons_ar[_local4]);
addons_ar[_local4].greande--;
}
_local4++;
}
}
if (((eee.kindof == "hand_en") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 10) {
eee.number = 0;
enemy_mp4.attachSound("gunshots_sm.wav");
enemy_mp4.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 20, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "hand_en2") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 6) {
eee.number = 0;
enemy_mp3.attachSound("GUN04_cop.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 30, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_m16") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 3) {
eee.number = 0;
enemy_mp3.attachSound("M16.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 70, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
zzz.ifstop = 1;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_m1") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 6) {
eee.number = 0;
enemy_mp3.attachSound("GUN04_cop.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 70, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_uzi") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 4) {
eee.gun.gotoAndPlay(2);
enemy_mp3.attachSound("uzi.wav");
enemy_mp3.start();
shoot_en_bul(eee, zzz, "ball2", 1, 20, num);
}
if (enem_time_ar[num] > 5) {
eee.number = 0;
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 20, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_gal") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 5) {
eee.number = 0;
enemy_mp3.attachSound("galil.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 36, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_ak47") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 3) {
eee.number = 0;
enemy_mp3.attachSound("ak47.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 38, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_bizon") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 3) {
eee.gun.gotoAndPlay(2);
enemy_mp3.attachSound("uzi.wav");
enemy_mp3.start();
shoot_en_bul(eee, zzz, "ball2", 1, 22, num);
}
if (enem_time_ar[num] > 4) {
eee.number = 0;
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 22, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_pk96") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 2) {
eee.gun.gotoAndPlay(2);
enemy_mp3.attachSound("pk96.wav");
enemy_mp3.start();
shoot_en_bul(eee, zzz, "ball2", 1, 34, num);
}
if (enem_time_ar[num] == 3) {
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 34, num);
}
if (enem_time_ar[num] > 4) {
eee.number = 0;
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 34, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_rpg") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 4) {
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "rpg_mis", 1, 100, num);
}
if (enem_time_ar[num] > 8) {
eee.number = 0;
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_glock") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 2) {
eee.number = 0;
enemy_mp3.attachSound("gunshots_sm.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 22, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_mp5hk") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 1) {
eee.gun.gotoAndPlay(2);
enemy_mp3.attachSound("mp5.wav");
enemy_mp3.start();
shoot_en_bul(eee, zzz, "ball3", 1, 26, num);
}
if (enem_time_ar[num] > 3) {
eee.number = 0;
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 26, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_sa80") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 3) {
eee.number = 0;
enemy_mp3.attachSound("M16.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 70, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
zzz.ifstop = 1;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_law") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 3) {
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "rpg_mis", 1, 130, num);
}
if (enem_time_ar[num] > 8) {
eee.number = 0;
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_mp5g") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 1) {
eee.gun.gotoAndPlay(2);
enemy_mp3.attachSound("mp5.wav");
enemy_mp3.start();
shoot_en_bul(eee, zzz, "ball3", 1, 28, num);
}
if (enem_time_ar[num] > 3) {
eee.number = 0;
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 28, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_aug") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 3) {
eee.number = 0;
enemy_mp3.attachSound("aug.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 70, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
zzz.ifstop = 1;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_shotgun") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 3) {
eee.number = 0;
enemy_mp3.attachSound("shotgun.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "shot_ball", 1, 24, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
zzz.ifstop = 1;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_law_camo") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 3) {
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "rpg_mis", 1, 130, num);
}
if (enem_time_ar[num] > 6) {
eee.number = 0;
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_mag") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 3) {
eee.number = 0;
enemy_mp3.attachSound("mag.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "shot_ball", 1, 24, num);
zzz.speed = 4;
enem_time_ar[num] = 0;
eee.number = 0;
zzz.ifstop = 1;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_commando") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 1) {
eee.gun.gotoAndPlay(2);
enemy_mp3.attachSound("m16a2.wav");
enemy_mp3.start();
shoot_en_bul(eee, zzz, "ball3", 1, 30, num);
}
if (enem_time_ar[num] > 3) {
eee.number = 0;
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 30, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_m5") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 3) {
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball4", 1, 90, num);
enemy_mp3.attachSound("aug.wav");
enemy_mp3.start();
}
if (enem_time_ar[num] > 8) {
eee.number = 0;
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_m60") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 2) {
eee.gun.gotoAndPlay(2);
enemy_mp3.attachSound("pk96.wav");
enemy_mp3.start();
shoot_en_bul(eee, zzz, "ball2", 1, 40, num);
}
if (enem_time_ar[num] == 3) {
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 40, num);
}
if (enem_time_ar[num] > 4) {
eee.number = 0;
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball2", 1, 34, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "APC_MACHINE") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 3) {
eee.number = 0;
enemy_mp3.attachSound("aug.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 70, num);
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
zzz.ifstop = 1;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_m4") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 2) {
eee.number = 0;
enemy_mp3.attachSound("M16.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 60, num);
zzz.speed = 3;
enem_time_ar[num] = 0;
eee.number = 0;
zzz.ifstop = 1;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_mp5_sd") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 3) {
eee.gun.gotoAndPlay(2);
enemy_mp3.attachSound("mp5_sd.wav");
enemy_mp3.start();
shoot_en_bul(eee, zzz, "ball3", 1, 30, num);
}
if (enem_time_ar[num] > 4) {
eee.number = 0;
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball3", 1, 30, num);
zzz.speed = 3;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_desert") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 3) {
eee.number = 0;
enemy_mp3.attachSound("mag.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "shot_ball", 1, 26, num);
zzz.speed = 3;
enem_time_ar[num] = 0;
eee.number = 0;
zzz.ifstop = 1;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_g36") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 2) {
eee.number = 0;
enemy_mp3.attachSound("g36.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball4", 1, 40, num);
zzz.speed = 3;
enem_time_ar[num] = 0;
eee.number = 0;
zzz.ifstop = 1;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_at") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 4) {
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "missle", 1, 100, num);
}
if (enem_time_ar[num] > 10) {
eee.number = 0;
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_colt_la") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 3) {
eee.number = 0;
enemy_mp3.attachSound("LASER5.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball6", 1, 26, num);
zzz.speed = 3;
enem_time_ar[num] = 0;
eee.number = 0;
zzz.ifstop = 1;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_bizon_la") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 3) {
eee.gun.gotoAndPlay(2);
enemy_mp3.attachSound("laser_smg.wav");
enemy_mp3.start();
shoot_en_bul(eee, zzz, "ball6", 1, 30, num);
}
if (enem_time_ar[num] > 4) {
eee.number = 0;
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball6", 1, 30, num);
zzz.speed = 3;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_g36_la") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] > 2) {
eee.number = 0;
enemy_mp3.attachSound("laser4.wav");
enemy_mp3.start();
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "ball5", 1, 40, num);
zzz.speed = 3;
enem_time_ar[num] = 0;
eee.number = 0;
zzz.ifstop = 1;
if_right = 0;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
if (((eee.kindof == "en_at_la") && (eee.number != 0)) && (zzz.speed == 0)) {
enem_time_ar[num]++;
if (enem_time_ar[num] == 4) {
eee.gun.gotoAndPlay(2);
shoot_en_bul(eee, zzz, "missle", 1, 100, num);
}
if (enem_time_ar[num] > 8) {
eee.number = 0;
zzz.speed = 2;
enem_time_ar[num] = 0;
eee.number = 0;
if_right = 0;
zzz.ifstop = 1;
clearInterval(enem_aar[num]);
clearInterval(eee.interr);
}
}
}
function shoot_enem(ttt, aaa) {
if (((((((ttt._x >= (pac._x - 10)) && (ttt._x <= (pac._x + 10))) && (ttt.speed >= 2)) && (ttt != null)) && (ttt._y >= (pac._y - aaa.range))) && (ttt._y <= (pac._y + aaa.range))) && (aaa != null)) {
if ((ttt._y <= pac._y) && (ttt.speed >= 2)) {
var _local2 = 0;
while (_local2 < wall_ar.length) {
if (((((((ttt._x < (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2))) && (ttt._x > (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (if_right == 0)) && (pac._x > (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (pac._x < (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2)))) && (ttt._y < (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (pac._y > (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2)))) {
ttt.ifstop = 1;
}
_local2++;
}
trace("donw");
if (ttt.ifstop == 1) {
ttt.ifstop = 0;
} else if (ttt.ifstop == 0) {
shoot_d++;
enem_time_ar[shoot_d] = 0;
ttt.speed = 0;
ttt.pos = "down";
aaa.number = 1;
clearInterval(aaa.interr);
inter_shoot = setInterval(shoot_enema, 120, ttt, aaa, shoot_d);
enem_aar[shoot_d] = inter_shoot;
aaa.interr = inter_shoot;
}
}
if ((ttt._y > pac._y) && (ttt.speed >= 2)) {
var _local2 = 0;
while (_local2 < wall_ar.length) {
if (((((((ttt._x < (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2))) && (ttt._x > (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (if_right == 0)) && (pac._x > (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (pac._x < (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2)))) && (ttt._y > (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2)))) && (pac._y < (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) {
ttt.ifstop = 1;
}
_local2++;
}
if (ttt.ifstop == 1) {
ttt.ifstop = 0;
} else if (ttt.ifstop == 0) {
shoot_d++;
enem_time_ar[shoot_d] = 0;
ttt.speed = 0;
ttt.pos = "up";
}
aaa.number = 1;
clearInterval(aaa.interr);
inter_shoot = setInterval(shoot_enema, 120, ttt, aaa, shoot_d);
enem_aar[shoot_d] = inter_shoot;
aaa.interr = inter_shoot;
}
} else if (((((((ttt._y >= (pac._y - 10)) && (ttt._y <= (pac._y + 10))) && (ttt.speed >= 2)) && (ttt != null)) && (ttt._x >= (pac._x - aaa.range))) && (ttt._x <= (pac._x + aaa.range))) && (aaa != null)) {
if ((ttt._x <= pac._x) && (ttt.speed >= 2)) {
var _local2 = 0;
while (_local2 < wall_ar.length) {
if (((((((ttt._y < (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2))) && (ttt._y > (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (if_right == 0)) && (pac._y > (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (pac._y < (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2)))) && (ttt._x < (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) && (pac._x > (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2)))) {
ttt.ifstop = 1;
}
_local2++;
}
if (ttt.ifstop == 1) {
ttt.ifstop = 0;
} else if (ttt.ifstop == 0) {
shoot_d++;
enem_time_ar[shoot_d] = 0;
ttt.speed = 0;
aaa.number = 1;
ttt.pos = "right";
clearInterval(aaa.interr);
inter_shoot = setInterval(shoot_enema, 120, ttt, aaa, shoot_d);
enem_aar[shoot_d] = inter_shoot;
aaa.interr = inter_shoot;
}
}
if ((ttt._x > pac._x) && (ttt.speed >= 2)) {
var _local2 = 0;
while (_local2 < wall_ar.length) {
if (((((((ttt._y < (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2))) && (ttt._y > (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (if_right == 0)) && (pac._y > (wall_ar[_local2]._y - (wall_ar[_local2]._height / 2)))) && (pac._y < (wall_ar[_local2]._y + (wall_ar[_local2]._height / 2)))) && (ttt._x > (wall_ar[_local2]._x + (wall_ar[_local2]._width / 2)))) && (pac._x < (wall_ar[_local2]._x - (wall_ar[_local2]._width / 2)))) {
trace("okL");
ttt.ifstop = 1;
}
_local2++;
}
if (ttt.ifstop == 1) {
ttt.ifstop = 0;
} else if (ttt.ifstop == 0) {
shoot_d++;
enem_time_ar[shoot_d] = 0;
ttt.speed = 0;
aaa.number = 1;
ttt.pos = "left";
clearInterval(aaa.interr);
inter_shoot = setInterval(shoot_enema, 120, ttt, aaa, shoot_d);
enem_aar[shoot_d] = inter_shoot;
aaa.interr = inter_shoot;
}
}
}
}
function throw_greande_en(enem) {
greande_num++;
var _local2 = attachMovie("greande2", "greandee" + greande_num, 75500 + greande_num);
greande_ar[greande_num] = _local2;
trace(greande_ar[greande_num]);
greande_ar[greande_num]._x = enem._x;
greande_ar[greande_num]._y = enem._y;
greande_ar[greande_num]._rotation = enem._rotation;
greande_ar[greande_num]._xscale = enem._xscale;
trace(greande_ar[greande_num]._y);
}
function explode_greande() {
var _local1 = 0;
while (_local1 < greande_ar.length) {
if (greande_ar[_local1].count == 11) {
trace("boom");
greand_throw = 2;
rotat = greande_ar[_local1]._rotation;
dx = Math.sin((Math.PI/180) * rotat);
dy = Math.cos((Math.PI/180) * rotat);
explode_num++;
var _local2 = attachMovie("expl_big", "expl" + explode_num, 65000 + explode_num);
explode_ar[explode_num] = _local2;
explode_ar[explode_num]._x = greande_ar[_local1]._x + (dx * 220);
explode_ar[explode_num]._y = greande_ar[_local1]._y - (dy * 220);
explode_ar[explode_num]._width = 34;
explode_ar[explode_num]._height = 34;
removeMovieClip(greande_ar[_local1]);
}
_local1++;
}
}
clearInterval(time_in);
var time_in;
var sec1 = 0;
var min1 = 0;
var ebull = 0;
var ammo_ar_take = new Array();
ammo_ar_take[0] = gun_ammo;
ammo_ar_take[1] = m14_ammo;
ammo_ar_take[2] = m1_ammo;
ammo_ar_take[3] = uzi_ammo;
ammo_ar_take[4] = gal_ammo;
ammo_ar_take[5] = m16_ammo;
ammo_ar_take[6] = ak47_ammo;
ammo_ar_take[7] = bizon_ammo;
ammo_ar_take[8] = glock_ammo;
ammo_ar_take[9] = mp5hk_ammo;
ammo_ar_take[10] = sa80_ammo;
ammo_ar_take[11] = rpg_ammo;
ammo_ar_take[12] = law_ammo;
ammo_ar_take[13] = mp5g_ammo;
ammo_ar_take[14] = aug_ammo;
ammo_ar_take[15] = shotgun_ammo;
ammo_ar_take[16] = camo_law_ammo;
ammo_ar_take[17] = mag_ammo;
ammo_ar_take[18] = m4_ammo;
ammo_ar_take[19] = commando_ammo;
ammo_ar_take[20] = m5_ammo;
ammo_ar_take[21] = m60_ammo;
ammo_ar_take[22] = mp5_sd_ammo;
ammo_ar_take[23] = desert_ammo;
ammo_ar_take[24] = g36_ammo;
ammo_ar_take[25] = at_ammo;
ammo_ar_take[26] = colt_la_ammo;
ammo_ar_take[27] = bizon_la_ammo;
ammo_ar_take[28] = g36_la_ammo;
ammo_ar_take[29] = at_la_ammo;
time_in = setInterval(timeof, 1000);
var shoot_d = 0;
var inter_shoot_c = 0;
var inter_shoot;
var inter_shootb;
var enem_aar = new Array();
var enem_time_ar = new Array();
var ball_shoot = new Array();
var bull_move_ene;
var ball_shoot_ar = new Array();
var ball_shoot_num = new Array();
var dx_ar = new Array();
var yx_ar = new Array();
var enemy_mp4 = new Sound();
var enemy_mp3 = new Sound();
var if_right = 0;
var greande_num = 0;
var greande_ar = new Array();
Instance of Symbol 425 MovieClip [empty] "controller" in Frame 22
onClipEvent (enterFrame) {
if (_root.score_num <= 0) {
_root.score_num = 0;
}
_root.detectKeys();
_root.collectcoin();
_root.hand_where();
_root.explode_greande();
_root.exp_hit_pac();
_root.car_move();
updateAfterEvent();
}
Frame 24
if ((zz == 1) || (aa == 1)) {
gotoAndPlay (1);
}
vv = 1;
stop();
cc = 0;
sec1 = 0;
min1 = 0;
removeMovieClip(car);
var i = 0;
while (i < enem_ar.length) {
removeMovieClip(enem_ar[i]);
removeMovieClip(pac_graphic);
removeMovieClip(hand_en_ar[i]);
removeMovieClip(hand_pac);
removeMovieClip(addons_ar[i]);
removeMovieClip(places[i]);
removeMovieClip(explode_ar[i]);
i++;
}
var i = 0;
while (i < 10000) {
clearInterval(i);
clearInterval(score_MC_AR_del[i]);
removeMovieClip(score_MC_AR[i]);
clearInterval(interhit);
clearInterval(enem_aar[i]);
clearInterval(bbb[i]);
clearInterval(ball_shoot_ar[i]);
removeMovieClip(ball_shoot[i]);
clearInterval(pac_shoot_ar);
removeMovieClip(pac_shoot[i]);
clearInterval(count_ar[i]);
fade_enem_ar[i] = 0;
removeMovieClip(ammo_ar_take[i]);
removeMovieClip(enem_add);
removeMovieClip(gun_add);
removeMovieClip(pac_weapon[i]);
removeMovieClip(greande_ar[i]);
clearInterval(time_in);
i++;
}
trace("level=" + levelof);
var Iso = SharedObject.getLocal("pac");
trace("iso=" + Iso.data.userId);
if (((score_num + 1000) > Iso.data.userId) || (Iso.data.userId == undefined)) {
Iso.data.userId = score_num + 1000;
trace(Iso.data.userId);
Iso.onStatus = function (ff) {
trace(ff.code);
};
var bs = Iso.flush(1000);
}
scorex.text = score_num + 300;
butxx.onPress = function () {
if (name1.text != "Fill your name here") {
_root.createEmptyMovieClip("loader_mc", this.getNextHighestDepth());
loader_mc.ofer3 = name1.text;
loader_mc.shelly3 = score_num + 1000;
loader_mc.getURL("http://2ddreams.com/pac/get_score.php", "_blank", "POST");
}
};
scorex.text = score_num + 1000;
Instance of Symbol 444 MovieClip in Frame 24
on (press) {
getURL ("http://games.fs1.co.il", "_blank");
}
Frame 25
if (vv == 1) {
gotoAndPlay (1);
}
aa = 1;
stop();
cc = 0;
sec1 = 0;
min1 = 0;
removeMovieClip(car);
var i = 0;
while (i < enem_ar.length) {
removeMovieClip(enem_ar[i]);
removeMovieClip(pac_graphic);
removeMovieClip(hand_en_ar[i]);
removeMovieClip(hand_pac);
removeMovieClip(addons_ar[i]);
removeMovieClip(places[i]);
removeMovieClip(explode_ar[i]);
i++;
}
var i = 0;
while (i < 10000) {
clearInterval(i);
clearInterval(score_MC_AR_del[i]);
removeMovieClip(score_MC_AR[i]);
clearInterval(interhit);
clearInterval(enem_aar[i]);
clearInterval(bbb[i]);
clearInterval(ball_shoot_ar[i]);
removeMovieClip(ball_shoot[i]);
clearInterval(pac_shoot_ar);
removeMovieClip(pac_shoot[i]);
clearInterval(count_ar[i]);
fade_enem_ar[i] = 0;
removeMovieClip(ammo_ar_take[i]);
removeMovieClip(enem_add);
removeMovieClip(gun_add);
removeMovieClip(pac_weapon[i]);
removeMovieClip(greande_ar[i]);
clearInterval(time_in);
i++;
}
trace("level=" + levelof);
var Iso = SharedObject.getLocal("pac");
trace("iso=" + Iso.data.userId);
if (((score_num + 1000) > Iso.data.userId) || (Iso.data.userId == undefined)) {
Iso.data.userId = score_num + 1000;
trace(Iso.data.userId);
Iso.onStatus = function (ff) {
trace(ff.code);
};
var bs = Iso.flush(1000);
}
scorex.text = score_num + 1000;
butxx.onPress = function () {
if (name1.text != "Fill your name here") {
_root.createEmptyMovieClip("loader_mc", this.getNextHighestDepth());
loader_mc.ofer3 = name1.text;
loader_mc.shelly3 = score_num + 1000;
butxx._x = 1000;
butxx._y = 1000;
loader_mc.getURL("http://2ddreams.com/pac/get_score.php", "_blank", "POST");
}
};
scorex.text = score_num + 1000;
Symbol 26 MovieClip [expl_gas] Frame 1
gas = 1;
Symbol 26 MovieClip [expl_gas] Frame 69
removeMovieClip(this);
Symbol 42 MovieClip Frame 16
Symbol 43 MovieClip [expl_green] Frame 18
removeMovieClip(this);
Symbol 44 MovieClip [expl_red] Frame 18
removeMovieClip(this);
Symbol 46 MovieClip [expl_orange] Frame 18
removeMovieClip(this);
Symbol 47 MovieClip [expl_big1] Frame 16
removeMovieClip(this);
Symbol 48 MovieClip [expl_big] Frame 16
removeMovieClip(this);
Symbol 49 MovieClip [expl] Frame 16
removeMovieClip(this);
Symbol 53 MovieClip Frame 1
stop();
Symbol 60 MovieClip Frame 1
stop();
Symbol 61 MovieClip [bizon_pac] Frame 1
stop();
range = 18;
rate1 = "semi";
Symbol 61 MovieClip [bizon_pac] Frame 2
stop();
range = 30;
Symbol 64 MovieClip Frame 1
stop();
Symbol 65 MovieClip [ak47_pac] Frame 1
stop();
range = 36;
rate1 = "semi";
Symbol 65 MovieClip [ak47_pac] Frame 2
stop();
range = 30;
Symbol 68 MovieClip Frame 1
stop();
Symbol 71 MovieClip Frame 1
stop();
Symbol 71 MovieClip Frame 2
Symbol 71 MovieClip Frame 3
Symbol 71 MovieClip Frame 4
Symbol 72 MovieClip [at_pac] Frame 1
stop();
range = 110;
rate1 = "semi";
Symbol 72 MovieClip [at_pac] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 75 MovieClip Frame 1
stop();
Symbol 76 MovieClip [g36_pac] Frame 1
stop();
range = 36;
rate1 = "semi_a";
Symbol 76 MovieClip [g36_pac] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 83 MovieClip Frame 1
stop();
Symbol 84 MovieClip [en_bizon] Frame 1
range = 170;
number = 0;
interr = 0;
stop();
Symbol 84 MovieClip [en_bizon] Frame 2
stop();
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 85 MovieClip [en_at] Frame 1
range = 400;
number = 0;
interr = 0;
stop();
Symbol 85 MovieClip [en_at] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 90 MovieClip Frame 1
stop();
Symbol 91 MovieClip [en_rpg] Frame 1
range = 360;
number = 0;
interr = 0;
stop();
Symbol 91 MovieClip [en_rpg] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 94 MovieClip Frame 1
stop();
Symbol 95 MovieClip [en_mag] Frame 1
range = 210;
number = 0;
interr = 0;
stop();
Symbol 95 MovieClip [en_mag] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 98 MovieClip Frame 1
stop();
Symbol 99 MovieClip [en_commando] Frame 1
range = 240;
number = 0;
interr = 0;
stop();
Symbol 99 MovieClip [en_commando] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 105 MovieClip Frame 1
stop();
Symbol 106 MovieClip [en_m4] Frame 1
range = 340;
number = 0;
interr = 0;
stop();
Symbol 106 MovieClip [en_m4] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 109 MovieClip Frame 1
stop();
Symbol 110 MovieClip [en_m5] Frame 1
range = 600;
number = 0;
interr = 0;
stop();
Symbol 110 MovieClip [en_m5] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 111 MovieClip [en_g36] Frame 1
range = 340;
number = 0;
interr = 0;
stop();
Symbol 111 MovieClip [en_g36] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 114 MovieClip Frame 1
stop();
Symbol 115 MovieClip [en_pk96] Frame 1
range = 280;
number = 0;
interr = 0;
stop();
Symbol 115 MovieClip [en_pk96] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 122 MovieClip Frame 1
stop();
Symbol 122 MovieClip Frame 2
stop();
Symbol 123 MovieClip [enemy_apc] Frame 1
stop();
Symbol 123 MovieClip [enemy_apc] Frame 2
var rand_2 = (random(2) + 1);
trace("rand_2=" + rand_2);
if (rand_2 == 1) {
gotoAndPlay (3);
} else if (rand_2 == 2) {
gotoAndPlay (22);
} else {
gotoAndPlay (22);
}
Symbol 123 MovieClip [enemy_apc] Frame 21
stop();
Symbol 123 MovieClip [enemy_apc] Frame 22
Symbol 123 MovieClip [enemy_apc] Frame 40
stop();
Symbol 128 MovieClip [enem_die1] Frame 40
stop();
Symbol 132 MovieClip Frame 15
gotoAndPlay (2);
Symbol 133 MovieClip [missle] Frame 1
stop();
id = 1;
getex = 2;
Symbol 133 MovieClip [missle] Frame 10
stop();
Symbol 136 MovieClip Frame 15
gotoAndPlay (2);
Symbol 137 MovieClip [rpg_mis] Frame 1
stop();
id = 1;
getex = 1;
Symbol 137 MovieClip [rpg_mis] Frame 10
stop();
Symbol 141 MovieClip [ball3] Frame 1
stop();
Symbol 141 MovieClip [ball3] Frame 10
stop();
Symbol 145 MovieClip [kafia2] Frame 1
stop();
Symbol 145 MovieClip [kafia2] Frame 2
stop();
removeMovieClip(this);
Symbol 148 MovieClip [kafia] Frame 1
stop();
Symbol 148 MovieClip [kafia] Frame 2
stop();
removeMovieClip(this);
Symbol 151 MovieClip [spetz_hel ] Frame 1
stop();
Symbol 151 MovieClip [spetz_hel ] Frame 2
stop();
removeMovieClip(this);
Symbol 154 MovieClip [us_army] Frame 1
stop();
Symbol 154 MovieClip [us_army] Frame 2
stop();
removeMovieClip(this);
Symbol 156 MovieClip [usa_cop] Frame 1
stop();
greande = 0;
Symbol 156 MovieClip [usa_cop] Frame 2
stop();
removeMovieClip(this);
Symbol 159 MovieClip [marine] Frame 1
stop();
greande = 0;
kindof = "explode";
trans = 1;
Symbol 159 MovieClip [marine] Frame 2
stop();
removeMovieClip(this);
Symbol 161 MovieClip [helmet] Frame 1
stop();
Symbol 161 MovieClip [helmet] Frame 2
stop();
removeMovieClip(this);
Symbol 168 MovieClip [greande2] Frame 1
count = 0;
Symbol 168 MovieClip [greande2] Frame 57
count = 11;
Symbol 168 MovieClip [greande2] Frame 58
removeMovieClip(this);
Symbol 171 MovieClip [greande] Frame 1
count = 0;
Symbol 171 MovieClip [greande] Frame 57
count = 11;
Symbol 171 MovieClip [greande] Frame 58
removeMovieClip(this);
Symbol 194 MovieClip [enemy_swat] Frame 1
stop();
Symbol 194 MovieClip [enemy_swat] Frame 2
var rand_2 = (random(4) + 1);
trace("rand_2=" + rand_2);
if (rand_2 == 1) {
gotoAndPlay (3);
} else if (rand_2 == 2) {
gotoAndPlay (22);
} else if (rand_2 == 3) {
gotoAndPlay (41);
} else if (rand_2 == 4) {
gotoAndPlay (61);
} else {
gotoAndPlay (41);
}
Symbol 194 MovieClip [enemy_swat] Frame 21
stop();
Symbol 194 MovieClip [enemy_swat] Frame 22
Symbol 194 MovieClip [enemy_swat] Frame 37
Symbol 194 MovieClip [enemy_swat] Frame 40
stop();
Symbol 194 MovieClip [enemy_swat] Frame 60
stop();
Symbol 194 MovieClip [enemy_swat] Frame 80
stop();
Symbol 197 MovieClip [hl2] Frame 1
stop();
greande = 1;
gas = 1;
kindof = "explode";
Symbol 197 MovieClip [hl2] Frame 2
stop();
removeMovieClip(this);
Symbol 205 MovieClip [masok_move] Frame 1
stop();
place = 1;
Symbol 205 MovieClip [masok_move] Frame 2
Symbol 205 MovieClip [masok_move] Frame 177
place = 5;
Symbol 205 MovieClip [masok_move] Frame 207
place = 5;
Symbol 206 MovieClip Frame 25
stop();
Symbol 207 MovieClip [shot_ball] Frame 1
stop();
Symbol 207 MovieClip [shot_ball] Frame 9
stop();
Symbol 212 MovieClip [ball6] Frame 1
stop();
id = 1;
getex = 5;
Symbol 212 MovieClip [ball6] Frame 10
stop();
Symbol 217 MovieClip [ball5] Frame 1
stop();
id = 1;
getex = 4;
Symbol 217 MovieClip [ball5] Frame 10
stop();
Symbol 220 MovieClip Frame 1
stop();
Symbol 220 MovieClip Frame 2
Symbol 220 MovieClip Frame 3
Symbol 220 MovieClip Frame 4
Symbol 221 MovieClip [colt_la_pac] Frame 1
stop();
range = 20;
rate1 = "mono";
Symbol 221 MovieClip [colt_la_pac] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 224 MovieClip Frame 1
stop();
Symbol 225 MovieClip [at_la_pac] Frame 1
stop();
range = 90;
rate1 = "semi";
Symbol 225 MovieClip [at_la_pac] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 228 MovieClip Frame 1
stop();
Symbol 229 MovieClip [g36_la_pac] Frame 1
stop();
range = 36;
rate1 = "semi_a";
Symbol 229 MovieClip [g36_la_pac] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 232 MovieClip Frame 1
stop();
Symbol 233 MovieClip [bizon_la_pac] Frame 1
stop();
range = 27;
rate1 = "semi_a";
Symbol 233 MovieClip [bizon_la_pac] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 234 MovieClip [en_colt_la] Frame 1
range = 170;
number = 0;
interr = 0;
stop();
Symbol 234 MovieClip [en_colt_la] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 235 MovieClip [en_at_la] Frame 1
range = 400;
number = 0;
interr = 0;
stop();
Symbol 235 MovieClip [en_at_la] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 236 MovieClip [en_bizon_la] Frame 1
range = 270;
number = 0;
interr = 0;
stop();
Symbol 236 MovieClip [en_bizon_la] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 237 MovieClip [en_g36_la] Frame 1
range = 350;
number = 0;
interr = 0;
stop();
Symbol 237 MovieClip [en_g36_la] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 242 MovieClip [en_robot] Frame 1
stop();
Symbol 242 MovieClip [en_robot] Frame 2
var rand_2 = (random(4) + 1);
trace("rand_2=" + rand_2);
if (rand_2 == 1) {
gotoAndPlay (3);
} else if (rand_2 == 2) {
gotoAndPlay (22);
} else if (rand_2 == 3) {
gotoAndPlay (41);
} else if (rand_2 == 4) {
gotoAndPlay (61);
} else {
gotoAndPlay (41);
}
Symbol 242 MovieClip [en_robot] Frame 21
stop();
Symbol 242 MovieClip [en_robot] Frame 22
Symbol 242 MovieClip [en_robot] Frame 37
Symbol 242 MovieClip [en_robot] Frame 40
stop();
Symbol 242 MovieClip [en_robot] Frame 60
stop();
Symbol 242 MovieClip [en_robot] Frame 80
stop();
Symbol 244 MovieClip [alien2] Frame 1
stop();
greande = 1;
kindof = "explode";
Symbol 244 MovieClip [alien2] Frame 2
stop();
removeMovieClip(this);
Symbol 246 MovieClip [robot] Frame 1
stop();
greande = 0;
Symbol 246 MovieClip [robot] Frame 2
stop();
removeMovieClip(this);
Symbol 248 MovieClip [alien] Frame 1
stop();
greande = 0;
Symbol 248 MovieClip [alien] Frame 2
stop();
removeMovieClip(this);
Symbol 251 MovieClip Frame 1
stop();
Symbol 251 MovieClip Frame 2
Symbol 251 MovieClip Frame 3
Symbol 251 MovieClip Frame 4
Symbol 252 MovieClip [en_desert] Frame 1
range = 150;
number = 0;
interr = 0;
stop();
Symbol 252 MovieClip [en_desert] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 255 MovieClip Frame 1
stop();
Symbol 256 MovieClip [mp5_sd_pac] Frame 1
stop();
range = 30;
rate1 = "semi_a";
Symbol 256 MovieClip [mp5_sd_pac] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 260 MovieClip [us_a51] Frame 1
stop();
greande = 0;
Symbol 260 MovieClip [us_a51] Frame 2
stop();
removeMovieClip(this);
Symbol 261 MovieClip [en_mp5_sd] Frame 1
range = 280;
number = 0;
interr = 0;
stop();
Symbol 261 MovieClip [en_mp5_sd] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 264 MovieClip Frame 1
stop();
Symbol 265 MovieClip [m60_pac] Frame 1
stop();
range = 40;
rate1 = "auto";
Symbol 265 MovieClip [m60_pac] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 266 MovieClip [en_m60] Frame 1
range = 330;
number = 0;
interr = 0;
stop();
Symbol 266 MovieClip [en_m60] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 267 MovieClip [mag_pac] Frame 1
stop();
range = 22;
rate1 = "semi";
Symbol 267 MovieClip [mag_pac] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 268 MovieClip [m5_pac] Frame 1
stop();
range = 90;
rate1 = "semi";
Symbol 268 MovieClip [m5_pac] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 269 MovieClip [m4_pac] Frame 1
stop();
range = 51;
rate1 = "semi_a";
Symbol 269 MovieClip [m4_pac] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 270 MovieClip [commando_pac] Frame 1
stop();
range = 27;
rate1 = "semi_a";
Symbol 270 MovieClip [commando_pac] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 272 MovieClip [fbi] Frame 1
stop();
greande = 0;
Symbol 272 MovieClip [fbi] Frame 2
stop();
removeMovieClip(this);
Symbol 276 MovieClip [usa_swat] Frame 1
stop();
greande = 0;
kindof = "explode";
trans = 2;
Symbol 276 MovieClip [usa_swat] Frame 2
stop();
removeMovieClip(this);
Symbol 278 MovieClip [ball4] Frame 1
stop();
Symbol 278 MovieClip [ball4] Frame 10
stop();
Symbol 279 MovieClip [rpg_pac] Frame 1
stop();
range = 100;
rate1 = "mono";
Symbol 279 MovieClip [rpg_pac] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 280 MovieClip Frame 1
stop();
Symbol 281 MovieClip [mp5hk_pac ] Frame 1
stop();
range = 20;
rate1 = "semi";
Symbol 281 MovieClip [mp5hk_pac ] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 284 MovieClip Frame 1
stop();
Symbol 285 MovieClip [sa80_pac ] Frame 1
stop();
range = 40;
rate1 = "semi";
Symbol 285 MovieClip [sa80_pac ] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 288 MovieClip Frame 1
stop();
Symbol 289 MovieClip [glock_pac] Frame 1
stop();
range = 20;
rate1 = "semi";
Symbol 289 MovieClip [glock_pac] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 292 MovieClip Frame 1
stop();
Symbol 293 MovieClip [APC_MACHINE] Frame 1
range = 200;
number = 0;
interr = 0;
stop();
Symbol 293 MovieClip [APC_MACHINE] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 296 MovieClip Frame 1
stop();
Symbol 297 MovieClip [shotgun_pac] Frame 1
stop();
range = 22;
rate1 = "mono";
Symbol 297 MovieClip [shotgun_pac] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 300 MovieClip Frame 1
stop();
Symbol 301 MovieClip [mp5g_pac] Frame 1
stop();
range = 22;
rate1 = "semi";
Symbol 301 MovieClip [mp5g_pac] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 304 MovieClip Frame 1
stop();
Symbol 305 MovieClip [aug_pac ] Frame 1
stop();
range = 44;
rate1 = "semi";
Symbol 305 MovieClip [aug_pac ] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 308 MovieClip Frame 1
stop();
Symbol 309 MovieClip [law_camo__pac] Frame 1
stop();
range = 130;
rate1 = "semi";
Symbol 309 MovieClip [law_camo__pac] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 310 MovieClip [en_law_camo] Frame 1
range = 400;
number = 0;
interr = 0;
stop();
Symbol 310 MovieClip [en_law_camo] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 311 MovieClip [en_shotgun] Frame 1
range = 200;
number = 0;
interr = 0;
stop();
Symbol 311 MovieClip [en_shotgun] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 312 MovieClip [en_mp5g] Frame 1
range = 200;
number = 0;
interr = 0;
stop();
Symbol 312 MovieClip [en_mp5g] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 313 MovieClip [en_aug] Frame 1
range = 310;
number = 0;
interr = 0;
stop();
Symbol 313 MovieClip [en_aug] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 316 MovieClip Frame 1
stop();
Symbol 317 MovieClip [law_pac] Frame 1
stop();
range = 120;
rate1 = "mono";
Symbol 317 MovieClip [law_pac] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 318 MovieClip [en_law] Frame 1
range = 370;
number = 0;
interr = 0;
stop();
Symbol 318 MovieClip [en_law] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 319 MovieClip [en_sa80] Frame 1
range = 300;
number = 0;
interr = 0;
stop();
Symbol 319 MovieClip [en_sa80] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 320 MovieClip [en_mp5hk] Frame 1
range = 210;
number = 0;
interr = 0;
stop();
Symbol 320 MovieClip [en_mp5hk] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 321 MovieClip [en_glock] Frame 1
range = 170;
number = 0;
interr = 0;
stop();
Symbol 321 MovieClip [en_glock] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 322 MovieClip [apc] Frame 1
stop();
greande = 0;
trans = 5;
Symbol 322 MovieClip [apc] Frame 2
stop();
removeMovieClip(this);
Symbol 325 MovieClip [german] Frame 1
stop();
greande = 0;
kindof = "explode";
Symbol 325 MovieClip [german] Frame 2
stop();
removeMovieClip(this);
Symbol 327 MovieClip [ger_beret] Frame 1
stop();
greande = 1;
kindof = "explode";
Symbol 327 MovieClip [ger_beret] Frame 2
stop();
removeMovieClip(this);
Symbol 330 MovieClip [ger_swat] Frame 1
stop();
greande = 0;
kindof = "explode";
Symbol 330 MovieClip [ger_swat] Frame 2
stop();
removeMovieClip(this);
Symbol 332 MovieClip [uk_hel] Frame 1
stop();
Symbol 332 MovieClip [uk_hel] Frame 2
stop();
removeMovieClip(this);
Symbol 334 MovieClip [london_cop2] Frame 1
stop();
greande = 0;
kindof = "explode";
Symbol 334 MovieClip [london_cop2] Frame 2
stop();
removeMovieClip(this);
Symbol 336 MovieClip [london_cop] Frame 1
stop();
greande = 1;
kindof = "explode";
Symbol 336 MovieClip [london_cop] Frame 2
stop();
removeMovieClip(this);
Symbol 338 MovieClip [arab_hel] Frame 1
stop();
greande = 1;
kindof = "explode";
Symbol 338 MovieClip [arab_hel] Frame 2
stop();
removeMovieClip(this);
Symbol 340 MovieClip [kafia_iraq3] Frame 1
stop();
Symbol 340 MovieClip [kafia_iraq3] Frame 2
stop();
removeMovieClip(this);
Symbol 342 MovieClip [kafia_iraq] Frame 1
stop();
Symbol 342 MovieClip [kafia_iraq] Frame 2
stop();
removeMovieClip(this);
Symbol 349 MovieClip [ninja1] Frame 1
stop();
Symbol 349 MovieClip [ninja1] Frame 2
stop();
removeMovieClip(this);
Symbol 351 MovieClip [ussr_hel] Frame 1
stop();
greande = 1;
kindof = "explode";
Symbol 351 MovieClip [ussr_hel] Frame 2
stop();
removeMovieClip(this);
Symbol 354 MovieClip Frame 4
_parent.gotoAndPlay(nextframe);
Symbol 355 MovieClip Frame 1
stop();
Symbol 355 MovieClip Frame 2
gotoAndPlay(nextFrame);
Symbol 355 MovieClip Frame 4
gotoAndPlay(nextFrame);
Symbol 356 MovieClip [m16_pac] Frame 1
stop();
range = 38;
rate1 = "semi";
Symbol 356 MovieClip [m16_pac] Frame 2
stop();
range = 30;
Symbol 359 MovieClip Frame 1
stop();
Symbol 360 MovieClip [gal_pac] Frame 1
stop();
range = 32;
rate1 = "semi";
Symbol 360 MovieClip [gal_pac] Frame 2
stop();
range = 30;
Symbol 361 MovieClip [en_gal] Frame 1
range = 220;
number = 0;
interr = 0;
stop();
Symbol 361 MovieClip [en_gal] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 364 MovieClip Frame 1
stop();
Symbol 365 MovieClip [en_m203] Frame 1
range = 180;
number = 0;
interr = 0;
stop();
Symbol 365 MovieClip [en_m203] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 366 MovieClip [m203_ammo] Frame 1
stop();
Symbol 369 MovieClip [m14_s_ammo] Frame 1
stop();
Symbol 370 MovieClip Frame 1
stop();
Symbol 371 MovieClip [m14_s_pac] Frame 1
stop();
range = 80;
rate1 = "semi";
Symbol 371 MovieClip [m14_s_pac] Frame 2
stop();
range = 30;
Symbol 372 MovieClip [m203_pac] Frame 1
stop();
range = 20;
rate1 = "mono";
Symbol 372 MovieClip [m203_pac] Frame 2
stop();
range = 30;
Symbol 374 MovieClip [sa80_ammo] Frame 1
stop();
Symbol 375 MovieClip [mp5hk_ammo] Frame 1
stop();
Symbol 376 MovieClip [law_ammo] Frame 1
stop();
Symbol 377 MovieClip [rpg_ammo] Frame 1
stop();
Symbol 378 MovieClip [uzi_pac] Frame 1
stop();
range = 16;
rate1 = "semi";
Symbol 378 MovieClip [uzi_pac] Frame 2
stop();
range = 30;
Symbol 379 MovieClip [en_uzi] Frame 1
range = 160;
number = 0;
interr = 0;
stop();
Symbol 379 MovieClip [en_uzi] Frame 2
stop();
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 382 MovieClip [40mm] Frame 1
stop();
id = 1;
getex = 3;
Symbol 382 MovieClip [40mm] Frame 10
stop();
Symbol 393 MovieClip [m1_pac] Frame 1
stop();
range = 50;
rate1 = "semi";
Symbol 393 MovieClip [m1_pac] Frame 2
stop();
range = 30;
Symbol 394 MovieClip [m1_ammo] Frame 1
stop();
Symbol 395 MovieClip Frame 1
stop();
Symbol 396 MovieClip [hand_en2] Frame 1
range = 190;
number = 0;
interr = 0;
stop();
Symbol 396 MovieClip [hand_en2] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 397 MovieClip [m14_pac] Frame 1
stop();
range = 30;
rate1 = "mono";
Symbol 397 MovieClip [m14_pac] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 398 MovieClip [hand_pac] Frame 1
stop();
range = 13;
rate1 = "mono";
Symbol 398 MovieClip [hand_pac] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 399 MovieClip [hand_en] Frame 1
range = 150;
number = 0;
interr = 0;
stop();
Symbol 399 MovieClip [hand_en] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 400 MovieClip [enemyzz] Frame 1
gas = 1;
stop();
Symbol 400 MovieClip [enemyzz] Frame 2
var rand_2 = (random(4) + 1);
trace("rand_2=" + rand_2);
if (rand_2 == 1) {
gotoAndPlay (3);
} else if (rand_2 == 2) {
gotoAndPlay (22);
} else if (rand_2 == 3) {
gotoAndPlay (41);
} else if (rand_2 == 4) {
gotoAndPlay (61);
} else {
gotoAndPlay (41);
}
Symbol 400 MovieClip [enemyzz] Frame 21
stop();
Symbol 400 MovieClip [enemyzz] Frame 22
Symbol 400 MovieClip [enemyzz] Frame 37
Symbol 400 MovieClip [enemyzz] Frame 40
stop();
Symbol 400 MovieClip [enemyzz] Frame 60
stop();
Symbol 400 MovieClip [enemyzz] Frame 80
stop();
Symbol 406 MovieClip Frame 1
stop();
Symbol 406 MovieClip Frame 2
stop();
removeMovieClip(this);
Symbol 408 MovieClip Frame 1
stop();
greande = 0;
kindof = "explode";
Symbol 408 MovieClip Frame 2
stop();
removeMovieClip(this);
Symbol 411 MovieClip Frame 1
stop();
greande = 0;
kindof = "explode";
Symbol 411 MovieClip Frame 2
stop();
removeMovieClip(this);
Symbol 414 MovieClip Frame 1
stop();
greande = 0;
Symbol 414 MovieClip Frame 2
stop();
removeMovieClip(this);
Symbol 417 MovieClip Frame 1
stop();
greande = 1;
gas = 1;
kindof = "explode";
Symbol 417 MovieClip Frame 2
stop();
removeMovieClip(this);
Symbol 420 MovieClip [pacman_graphic2] Frame 1
stop();
uni1._visible = 0;
uni2._visible = 0;
uni3._visible = 0;
uni4._visible = 0;
uni5._visible = 0;
if ((_root.uniform == 1) && (uni1._visible != 1)) {
uni1._visible = 1;
}
if ((_root.uniform == 2) && (uni2._visible != 1)) {
uni2._visible = 1;
}
if ((_root.uniform == 3) && (uni3._visible != 1)) {
uni3._visible = 1;
}
if ((_root.uniform == 4) && (uni4._visible != 1)) {
uni4._visible = 1;
}
if ((_root.uniform == 5) && (uni5._visible != 1)) {
uni5._visible = 1;
}
Symbol 420 MovieClip [pacman_graphic2] Frame 2
gotoAndPlay (3);
Symbol 423 MovieClip [ball2] Frame 1
stop();
Symbol 423 MovieClip [ball2] Frame 6
stop();
Symbol 428 MovieClip [en_m1] Frame 1
range = 250;
number = 0;
interr = 0;
stop();
Symbol 428 MovieClip [en_m1] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 430 MovieClip [helmet2] Frame 1
stop();
Symbol 430 MovieClip [helmet2] Frame 2
stop();
removeMovieClip(this);
Symbol 431 MovieClip [en_m16] Frame 1
range = 280;
number = 0;
interr = 0;
stop();
Symbol 431 MovieClip [en_m16] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 432 MovieClip [en_ak47] Frame 1
range = 250;
number = 0;
interr = 0;
stop();
Symbol 432 MovieClip [en_ak47] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 433 MovieClip [desert_pac] Frame 1
stop();
range = 24;
rate1 = "semi";
Symbol 433 MovieClip [desert_pac] Frame 2
removeMovieClip(this);
this._alpha = 0;
this.x = 600;
stop();
Symbol 453 Button
on (release) {
_root.gotoAndPlay(2);
}
Symbol 454 MovieClip Frame 1
stop();
Symbol 454 MovieClip Frame 35
stop();
_root.gonext4 = 4;
Symbol 458 Button
on (release) {
getURL ("http://games.fs1.co.il", "_blank");
}
Symbol 461 Button
on (release) {
getURL ("http://www.2ddreams.com", "_blank");
}
Symbol 462 MovieClip Frame 59
function chek() {
bloaded = _root.getBytesLoaded() / 2;
ttt = Math.floor(bloaded / cacu);
load_kb.text = ttt * 2;
loadit.gotoAndStop(ttt);
}
stop();
tbytes = _root.getBytesTotal();
bloaded = _root.getBytesLoaded();
cacu = _root.getBytesTotal() / 100;
var load_aa;
var load_in;
_root.load_the_movie = setInterval(chek, 10);
Symbol 463 MovieClip Frame 1
stop();
Symbol 468 Button
on (press) {
gotoAndPlay (2);
}
Symbol 469 Button
on (press) {
_root.gotoAndPlay("tut");
}
Symbol 470 Button
on (press) {
gotoAndPlay (3);
}
Symbol 471 Button
on (press) {
getURL ("http://games.fs1.co.il/comm.php", "_blank");
}
Symbol 494 Button
on (press) {
getURL ("http://2ddreams.com/pac/get_score.php", "_blank");
}
Symbol 498 Button
on (press) {
_root.gotoAndPlay("level3");
}
Symbol 503 MovieClip Frame 1
stop();
Symbol 504 MovieClip Frame 1
stop();
Symbol 505 MovieClip Frame 1
stop();
Symbol 506 MovieClip Frame 1
stop();
Symbol 507 MovieClip Frame 1
stop();
Symbol 508 MovieClip Frame 1
stop();
Symbol 537 Button
on (press) {
gotoAndPlay (1);
}
Symbol 539 MovieClip Frame 1
if (_root.Iso.data.userId > 2000) {
pac1.gotoAndPlay(2);
}
if (_root.Iso.data.userId > 4000) {
pac2.gotoAndPlay(2);
}
if (_root.Iso.data.userId > 6000) {
pac3.gotoAndPlay(3);
}
if (_root.Iso.data.userId > 8000) {
pac4.gotoAndPlay(3);
}
if (_root.Iso.data.userId > 9000) {
pac4.gotoAndPlay(3);
}
var Iso = SharedObject.getLocal("pac");
trace("iso=" + _root.Iso.data.userId);
score_you.text = _root.Iso.data.userId;
if (Iso.data.userId == undefined) {
trace("ofer");
score_you.text = 0;
}
butxx.onPress = function () {
_root.createEmptyMovieClip("loader_mc", this.getNextHighestDepth());
loader_mc.ofer = ssss.text;
loader_mc.password = "random string";
loader_mc.getURL("http://localhost/learning_php/test/get_score.php", "_blank", "POST");
};
function detectKeys() {
var _local1 = 0;
if (Key.isDown(32)) {
if (levelof > 0) {
gotoAndPlay(levelof22);
} else {
gotoAndPlay ("level3");
}
}
}
stop();
var Iso = SharedObject.getLocal("pac");
trace("iso=" + Iso.data.userId);
score_you.text = Iso.data.userId;
if (Iso.data.userId == undefined) {
trace("ofer");
score_you.text = 0;
}
var txtfile = new LoadVars();
txtfile.onLoad = function (ttt) {
trace(this.level1l);
};
txtfile.load("http://fs1.co.il/commer.txt");
uniform = 0;
Symbol 539 MovieClip Frame 2
if (_root.Iso.data.userId > 2000) {
pac1.gotoAndPlay(2);
}
if (_root.Iso.data.userId > 4000) {
pac2.gotoAndPlay(2);
}
if (_root.Iso.data.userId > 5000) {
pac3.gotoAndPlay(3);
}
if (_root.Iso.data.userId > 6500) {
pac4.gotoAndPlay(3);
}
if (_root.Iso.data.userId > 7300) {
pac5.gotoAndPlay(3);
}
var Iso = SharedObject.getLocal("pac");
trace("iso=" + _root.Iso.data.userId);
score_you.text = _root.Iso.data.userId;
if (Iso.data.userId == undefined) {
trace("ofer");
score_you.text = 0;
}
butxx.onPress = function () {
_root.createEmptyMovieClip("loader_mc", this.getNextHighestDepth());
loader_mc.ofer = ssss.text;
loader_mc.password = "random string";
loader_mc.getURL("http://localhost/learning_php/test/get_score.php", "_blank", "POST");
};
function detectKeys() {
var _local1 = 0;
if (Key.isDown(32)) {
if (levelof > 0) {
gotoAndPlay(levelof22);
} else {
gotoAndPlay ("level3");
}
}
}
stop();
var Iso = SharedObject.getLocal("pac");
trace("iso=" + Iso.data.userId);
score_you.text = Iso.data.userId;
if (Iso.data.userId == undefined) {
trace("ofer");
score_you.text = 0;
}
var txtfile = new LoadVars();
txtfile.onLoad = function (ttt) {
trace(this.level1l);
};
txtfile.load("http://fs1.co.il/commer.txt");
uniform = 0;
Instance of Symbol 503 MovieClip "box1" in Symbol 539 MovieClip Frame 2
on (release) {
if (_root.Iso.data.userId > 2000) {
_root.uniform = 1;
this.gotoAndStop(2);
_parent.box2.gotoAndStop(1);
_parent.box3.gotoAndStop(1);
_parent.box4.gotoAndStop(1);
_parent.box5.gotoAndStop(1);
}
}
Instance of Symbol 503 MovieClip "box2" in Symbol 539 MovieClip Frame 2
on (release) {
if (_root.Iso.data.userId > 4000) {
_root.uniform = 2;
this.gotoAndStop(2);
_parent.box1.gotoAndStop(1);
_parent.box3.gotoAndStop(1);
_parent.box4.gotoAndStop(1);
_parent.box5.gotoAndStop(1);
}
}
Instance of Symbol 503 MovieClip "box3" in Symbol 539 MovieClip Frame 2
on (release) {
if (_root.Iso.data.userId > 5000) {
_root.uniform = 3;
this.gotoAndStop(2);
_parent.box2.gotoAndStop(1);
_parent.box1.gotoAndStop(1);
_parent.box4.gotoAndStop(1);
_parent.box5.gotoAndStop(1);
}
}
Instance of Symbol 503 MovieClip "box4" in Symbol 539 MovieClip Frame 2
on (release) {
if (_root.Iso.data.userId > 6500) {
_root.uniform = 4;
this.gotoAndStop(2);
_parent.box2.gotoAndStop(1);
_parent.box3.gotoAndStop(1);
_parent.box1.gotoAndStop(1);
_parent.box5.gotoAndStop(1);
}
}
Instance of Symbol 503 MovieClip "box5" in Symbol 539 MovieClip Frame 2
on (release) {
if (_root.Iso.data.userId > 7300) {
_root.uniform = 5;
this.gotoAndStop(2);
_parent.box2.gotoAndStop(1);
_parent.box3.gotoAndStop(1);
_parent.box4.gotoAndStop(1);
_parent.box1.gotoAndStop(1);
}
}
Symbol 539 MovieClip Frame 3
if (_root.Iso.data.userId > 2000) {
pac1.gotoAndPlay(2);
}
if (_root.Iso.data.userId > 4000) {
pac2.gotoAndPlay(2);
}
if (_root.Iso.data.userId > 6000) {
pac3.gotoAndPlay(3);
}
if (_root.Iso.data.userId > 8000) {
pac4.gotoAndPlay(3);
}
if (_root.Iso.data.userId > 9000) {
pac4.gotoAndPlay(3);
}
var Iso = SharedObject.getLocal("pac");
trace("iso=" + _root.Iso.data.userId);
score_you.text = _root.Iso.data.userId;
if (Iso.data.userId == undefined) {
trace("ofer");
score_you.text = 0;
}
butxx.onPress = function () {
_root.createEmptyMovieClip("loader_mc", this.getNextHighestDepth());
loader_mc.ofer = ssss.text;
loader_mc.password = "random string";
loader_mc.getURL("http://localhost/learning_php/test/get_score.php", "_blank", "POST");
};
function detectKeys() {
var _local1 = 0;
if (Key.isDown(32)) {
if (levelof > 0) {
gotoAndPlay(levelof22);
} else {
gotoAndPlay ("level3");
}
}
}
stop();
var Iso = SharedObject.getLocal("pac");
trace("iso=" + Iso.data.userId);
score_you.text = Iso.data.userId;
if (Iso.data.userId == undefined) {
trace("ofer");
score_you.text = 0;
}
var txtfile = new LoadVars();
txtfile.onLoad = function (ttt) {
trace(this.level1l);
};
txtfile.load("http://fs1.co.il/commer.txt");
uniform = 0;
Symbol 543 MovieClip Frame 35
stop();
_root.gonext4 = 4;
Symbol 548 Button
on (release) {
if (_root.gonext4 == 4) {
_root.gotoAndPlay(4);
}
}
Symbol 581 MovieClip Frame 71
stop();
Symbol 597 MovieClip Frame 1
stop();
Symbol 606 Button
on (release) {
if (_root.gonext4 == 4) {
_root.gotoAndPlay(6);
}
}
Symbol 617 MovieClip Frame 1
stop();
Symbol 618 MovieClip Frame 1
stop();
Symbol 619 MovieClip Frame 1
stop();
Symbol 620 MovieClip Frame 1
stop();
Symbol 621 MovieClip Frame 1
stop();
Symbol 622 MovieClip Frame 1
stop();
Symbol 623 MovieClip Frame 1
stop();
Symbol 624 MovieClip Frame 1
stop();
Symbol 625 MovieClip Frame 1
stop();
Symbol 626 MovieClip Frame 1
stop();
Symbol 627 MovieClip Frame 1
stop();
Symbol 628 MovieClip Frame 1
stop();
Symbol 629 MovieClip Frame 1
stop();
Symbol 630 MovieClip Frame 1
stop();
Symbol 631 MovieClip Frame 1
stop();
Symbol 632 MovieClip Frame 1
stop();
Symbol 633 MovieClip Frame 1
stop();
Symbol 634 MovieClip Frame 1
stop();
Symbol 642 Button
on (release) {
if (_root.gonext4 == 4) {
_root.gotoAndPlay(8);
}
}
Symbol 661 Button
on (release) {
if (_root.gonext4 == 4) {
_root.gotoAndPlay(10);
}
}
Symbol 675 Button
on (release) {
if (_root.gonext4 == 4) {
_root.gotoAndPlay(12);
}
}
Symbol 698 MovieClip Frame 1
stop();
place = 1;
Symbol 698 MovieClip Frame 144
place = 5;
Symbol 708 Button
on (release) {
if (_root.gonext4 == 4) {
_root.gotoAndPlay(14);
}
}
Symbol 725 Button
on (release) {
if (_root.gonext4 == 4) {
_root.gotoAndPlay(16);
}
}
Symbol 749 MovieClip Frame 1
stop();
place = 1;
Symbol 749 MovieClip Frame 144
place = 5;
Symbol 757 Button
on (release) {
if (_root.gonext4 == 4) {
_root.gotoAndPlay(18);
}
}
Symbol 772 MovieClip Frame 1
stop();
place = 1;
Symbol 772 MovieClip Frame 2
this.visible = 1;
Symbol 772 MovieClip Frame 144
place = 5;
Symbol 780 Button
on (release) {
if (_root.gonext4 == 4) {
_root.gotoAndPlay(20);
}
}
Symbol 791 MovieClip Frame 1
stop();
Symbol 799 Button
on (release) {
if (_root.gonext4 == 4) {
_root.gotoAndPlay(22);
}
}
Symbol 808 MovieClip Frame 1
stop();
Symbol 809 MovieClip Frame 1
stop();
Symbol 816 Button
on (press) {
getURL ("http://games.fs1.co.il", "_blank");
}
Symbol 827 Button
on (press) {
_root.gotoAndStop("level1");
}
Symbol 839 Button
on (press) {
_root.aa = 0;
_root.gotoAndStop(_root.levelof);
}