Frame 1
fscommand ("fullscreen", false);
fscommand ("allowscale", false);
fscommand ("showmenu", false);
fscommand ("trapallkeys", true);
Stage.scaleMode = "exactFit";
Mouse.hide();
var my_so = SharedObject.getLocal("numlevs");
if (my_so.data.num == undefined) {
my_so.data.num = 0;
my_so.flush();
}
var globalsound = new Sound();
var my_sound1 = new Sound();
my_sound1.attachSound("music1");
var my_sound2 = new Sound();
my_sound2.attachSound("music2");
var deathsound = new Sound();
deathsound.attachSound("deathsnd");
var radiosound = new Sound();
radiosound.attachSound("radio");
var compsound = new Sound();
compsound.attachSound("compsnd");
var kriksound = new Sound();
kriksound.attachSound("krik");
var emptysound = new Sound();
emptysound.attachSound("empty");
stop();
Instance of Symbol 19 MovieClip "progressbar" in Frame 1
onClipEvent (load) {
totalFileSize = _root.getBytesTotal();
startTime = getTimer();
startBytes = _root.getBytesLoaded();
this._xscale = 0;
}
onClipEvent (enterFrame) {
bytesLoaded = _root.getBytesLoaded();
amountLoaded = bytesLoaded / totalFileSize;
percentLoaded = int(100 * amountLoaded);
this._xscale = percentLoaded * 50;
timeSoFar = getTimer() - startTime;
speed = bytesLoaded / timeSoFar;
bytesLeft = totalFileSize - bytesLoaded;
timeLeft = (bytesLeft / speed) / 1000;
speed = int(10 * speed) / 10;
_root.bytesMessage = ((int(bytesLoaded / 1000) + "kb/") + int(totalFileSize / 1000)) + "kb";
_root.speedMessage = speed + "k/sec";
_root.timeMessage = int(timeLeft) + " seconds remaining";
if (amountLoaded >= 1) {
_root.playbtn._x = 300;
}
}
Instance of Symbol 33 MovieClip in Frame 1
on (release) {
getURL ("http://www.maxgames.com/", "_blank");
}
Instance of Symbol 41 MovieClip "cursor" in Frame 1
onClipEvent (load) {
startDrag (this, true);
Mouse.hide();
}
onClipEvent (enterFrame) {
Mouse.hide();
}
Instance of Symbol 87 MovieClip in Frame 2
on (release) {
getURL ("http://www.maxgames.com/", "_blank");
}
Frame 188
fscommand ("fullscreen", false);
fscommand ("allowscale", false);
fscommand ("showmenu", false);
fscommand ("trapallkeys", true);
Stage.scaleMode = "exactFit";
Mouse.hide();
var my_so = SharedObject.getLocal("numlevs");
if (my_so.data.num == undefined) {
my_so.data.num = 0;
my_so.flush();
}
var globalsound = new Sound();
var my_sound1 = new Sound();
my_sound1.attachSound("music1");
var my_sound2 = new Sound();
my_sound2.attachSound("music2");
var deathsound = new Sound();
deathsound.attachSound("deathsnd");
var radiosound = new Sound();
radiosound.attachSound("radio");
var compsound = new Sound();
compsound.attachSound("compsnd");
var kriksound = new Sound();
kriksound.attachSound("krik");
var emptysound = new Sound();
emptysound.attachSound("empty");
Frame 205
menu.menuin.my_sound3.start();
my_sound1.start();
my_sound1.onSoundComplete = function () {
my_sound1.start();
};
stop();
Frame 207
stopAllSounds();
my_sound1.start();
my_sound1.onSoundComplete = function () {
my_sound1.start();
};
menu.menuin.gotoAndStop("st");
Frame 222
stop();
Frame 226
_root.gotoAndStop(_global.temb);
Frame 234
stop();
keyListener0 = new Object();
keyListener0.onKeyDown = function () {
play();
};
Key.addListener(keyListener0);
Frame 235
Key.removeListener(keyListener0);
Frame 236
stopAllSounds();
my_sound2.start();
my_sound2.onSoundComplete = function () {
my_sound2.start();
};
function placeBoom(x, y) {
levv++;
var _local1 = boom.duplicateMovieClip("bdoom" + levv, levv);
_local1._x = x;
_local1._y = y;
}
function placeBadaboom(x, y) {
levvv++;
var _local1 = badaboom.duplicateMovieClip("badadoom" + levvv, levvv);
_local1._x = x;
_local1._y = y;
if (_local1.hitTest(player.hitter)) {
difx = _local1._x - player._x;
dify = _local1._y - player._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
p_health = p_health - (120 - diff);
}
if (_local1.hitTest(vrag1.hitter)) {
difx = _local1._x - vrag1._x;
dify = _local1._y - vrag1._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
v1_health = v1_health - (180 - diff);
}
if (_local1.hitTest(vrag2.hitter)) {
difx = _local1._x - vrag2._x;
dify = _local1._y - vrag2._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
v2_health = v2_health - (180 - diff);
}
if (_local1.hitTest(los1) || (_local1.hitTest(los2))) {
v1_spotted = 1;
v2_spotted = 1;
}
}
function placeBlood(x, y, rotation) {
leb++;
var _local1 = blood.duplicateMovieClip("blood" + leb, leb);
_local1._x = x;
_local1._y = y;
_local1._rotation = rotation;
}
function placeDeath(x, y, gloob) {
det++;
var _local1 = death.duplicateMovieClip("blood" + det, gloob);
_local1._x = x;
_local1._y = y;
_local1._rotation = rotation;
deathsound.start();
}
function dAngleRadian(a1, a2) {
var _local1 = a1 - a2;
if (_local1 > Math.PI) {
_local1 = -6.28318530717959 + _local1;
} else if (_local1 < -3.14159265358979) {
_local1 = (Math.PI*2) + _local1;
}
return(_local1);
}
function dAngleDegree(a1, a2) {
var _local1 = a1 - a2;
if (_local1 > 180) {
_local1 = -360 + _local1;
} else if (_local1 < -180) {
_local1 = 360 + _local1;
}
return(_local1);
}
function degree(a) {
return((a / Math.PI) * 180);
}
function radian(a) {
return((a / 180) * Math.PI);
}
stop();
pick1._visible = 0;
pick2._visible = 0;
var suckmygun = 0;
_root.firebtn.onPress = function () {
suckmygun = 1;
};
_root.firebtn.onRelease = function () {
suckmygun = 0;
};
_root.firebtn.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag1.onPress = function () {
suckmygun = 1;
};
_root.vrag1.onRelease = function () {
suckmygun = 0;
};
_root.vrag1.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag2.onPress = function () {
suckmygun = 1;
};
_root.vrag2.onRelease = function () {
suckmygun = 0;
};
_root.vrag2.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag3.onPress = function () {
suckmygun = 1;
};
_root.vrag3.onRelease = function () {
suckmygun = 0;
};
_root.vrag3.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag4.onPress = function () {
suckmygun = 1;
};
_root.vrag4.onRelease = function () {
suckmygun = 0;
};
_root.vrag4.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag5.onPress = function () {
suckmygun = 1;
};
_root.vrag5.onRelease = function () {
suckmygun = 0;
};
_root.vrag5.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag10.onPress = function () {
suckmygun = 1;
};
_root.vrag10.onRelease = function () {
suckmygun = 0;
};
_root.vrag10.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag11.onPress = function () {
suckmygun = 1;
};
_root.vrag11.onRelease = function () {
suckmygun = 0;
};
_root.vrag11.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag12.onPress = function () {
suckmygun = 1;
};
_root.vrag12.onRelease = function () {
suckmygun = 0;
};
_root.vrag12.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag14.onPress = function () {
suckmygun = 1;
};
_root.vrag14.onRelease = function () {
suckmygun = 0;
};
_root.vrag14.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb1.onPress = function () {
suckmygun = 1;
};
_root.zomb1.onRelease = function () {
suckmygun = 0;
};
_root.zomb1.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb2.onPress = function () {
suckmygun = 1;
};
_root.zomb2.onRelease = function () {
suckmygun = 0;
};
_root.zomb2.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb3.onPress = function () {
suckmygun = 1;
};
_root.zomb3.onRelease = function () {
suckmygun = 0;
};
_root.zomb3.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb4.onPress = function () {
suckmygun = 1;
};
_root.zomb4.onRelease = function () {
suckmygun = 0;
};
_root.zomb4.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb5.onPress = function () {
suckmygun = 1;
};
_root.zomb5.onRelease = function () {
suckmygun = 0;
};
_root.zomb5.onReleaseOutside = function () {
suckmygun = 0;
};
var p_speed = 4;
var rotToMouseSpeed = 12;
var bS1 = 20;
var bS2 = 18;
var bS3 = 22;
var bS4 = 15;
var grenSpeed = 15;
var p_health = 100;
_global.current_w = 1;
_global.deton = 0;
var vkey1 = 0;
gkey1._visible = 0;
_global.ammo1 = 27;
_global.ammo2 = 0;
_global.ammo3 = 0;
_global.ammo4 = 0;
_global.ammog = 1;
var w1_ok = 1;
var w2_ok = 0;
var w3_ok = 0;
var w4_ok = 0;
los1._visible = 0;
los2._visible = 0;
_global.selected_w;
var xpluz = 0;
var ypluz = 0;
var bulletSpeed;
if (w1_ok) {
gui_weap.weap_none1._visible = 0;
}
if (w2_ok) {
gui_weap.weap_none2._visible = 0;
}
if (w3_ok) {
gui_weap.weap_none3._visible = 0;
}
if (w4_ok) {
gui_weap.weap_none4._visible = 0;
}
gui_weap.sel_light.gotoAndStop(_global.current_w + 1);
player.hands._visible = 0;
player.hands1._visible = 0;
player.hands2._visible = 0;
player.hands3._visible = 0;
player.hands4._visible = 0;
player.handsg._visible = 0;
switch (current_w) {
case 0 :
player.hands._visible = 1;
break;
case 1 :
player.hands1._visible = 1;
bulletSpeed = bS1;
break;
case 2 :
player.hands2._visible = 1;
bulletSpeed = bS2;
break;
case 3 :
player.hands3._visible = 1;
bulletSpeed = bS3;
break;
case 4 :
player.hands4._visible = 1;
bulletSpeed = bS4;
}
defeat.gotoAndStop(1);
victory.gotoAndStop(1);
player.onEnterFrame = function () {
if (p_health < 1) {
health_t.text = 0;
if (player._currentframe == 1) {
player.play();
player._name = "gsom";
defeat.play();
}
} else {
if (hitter.hitTest(finish)) {
player._name = "gsom";
hitter._name = "gsom2";
victory.play();
var _local5 = SharedObject.getLocal("numlevs");
if (_local5.data.num < 1) {
_local5.data.num = 1;
_local5.flush();
}
}
if (door1._currentframe == 1) {
if (hitter.hitTest(door1)) {
door1.hitter._visible = 1;
if (Key.isDown(32)) {
door1.play();
walls.door1.play();
bwalls.door1.play();
}
} else {
door1.hitter._visible = 0;
}
}
if (pult1._currentframe == 1) {
if (hitter.hitTest(pult1)) {
pult1.hitter._visible = 1;
pick2._visible = 1;
if (Key.isDown(32)) {
compsound.start();
if (vkey1) {
sh2._visible = 0;
pult1.play();
walls.gate1.play();
gate1.play();
pick2._visible = 0;
} else {
needkey.play();
}
}
} else {
pult1.hitter._visible = 0;
pick2._visible = 0;
}
}
if (key1._currentframe == 1) {
if (hitter.hitTest(key1)) {
key1.hitter._visible = 1;
pick1._visible = 1;
if (Key.isDown(32)) {
sh1._visible = 0;
key1.play();
keypicked.play();
vkey1 = 1;
gkey1._visible = 1;
pick1._visible = 0;
}
} else {
key1.hitter._visible = 0;
pick1._visible = 0;
}
}
if (hitter.hitTest(jad)) {
p_health = p_health - 1;
}
if (_global.deton) {
var _local8 = jad._x - player._x;
var _local7 = jad._y - player._y;
var _local9 = Math.sqrt((_local8 * _local8) + (_local7 * _local7));
jadv = (100 - _local9) + 10;
_root.raddet.dettt._width = jadv;
}
if (radd._currentframe == 1) {
if (Key.isDown(81)) {
radd.play();
if (_global.deton == 1) {
_global.deton = 0;
_root.raddet.dettt._width = 0;
_root.raddet.gotoAndStop(1);
p_speed = p_speed * 2;
} else {
_global.deton = 1;
_root.raddet.gotoAndStop(2);
p_speed = p_speed / 2;
}
}
}
grens.text = _global.ammog;
switch (_global.current_w) {
case 0 :
ammo_cur.text = "0";
break;
case 1 :
ammo_cur.text = _global.ammo1;
break;
case 2 :
ammo_cur.text = _global.ammo2;
break;
case 3 :
ammo_cur.text = _global.ammo3;
break;
case 4 :
ammo_cur.text = _global.ammo4;
}
health_t.text = p_health;
switch (Key.isDown(87) - Key.isDown(83)) {
case 1 :
ypluz = -10;
break;
case -1 :
ypluz = 10;
break;
default :
ypluz = 0;
}
switch (Key.isDown(68) - Key.isDown(65)) {
case 1 :
xpluz = 10;
break;
case -1 :
xpluz = -10;
break;
default :
xpluz = 0;
}
delta_x = _xmouse - player._x;
delta_y = _ymouse - player._y;
mAngle = Math.atan2(delta_y, delta_x);
mAngleD = (mAngle / Math.PI) * 180;
dAngleD = player._rotation - mAngleD;
if (dAngleD > 180) {
dAngleD = -360 + dAngleD;
} else if (dAngleD < -180) {
dAngleD = 360 + dAngleD;
}
if (Math.abs(dAngleD) < rotToMouseSpeed) {
player._rotation = player._rotation - dAngleD;
} else if (dAngleD > 0) {
player._rotation = player._rotation - rotToMouseSpeed;
} else {
player._rotation = player._rotation + rotToMouseSpeed;
}
_root.hitter._x = _root.player._x + xpluz;
_root.hitter._y = _root.player._y;
_root.hittery._x = _root.player._x;
_root.hittery._y = _root.player._y + ypluz;
_root.hitter._rotation = _root.player._rotation;
var _local4 = hitter._x - player._x;
var _local3 = hittery._y - player._y;
var _local6 = Math.atan2(_local3, _local4);
var _local10 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if (_local10 > p_speed) {
tgtX = player._x + (p_speed * Math.cos(_local6));
tgtY = player._y + (p_speed * Math.sin(_local6));
if (walls.hitTest(hitter._x, hitter._y, true)) {
player._x = tgtX;
player.legs.play();
}
if (walls.hitTest(hittery._x, hittery._y, true)) {
player._y = tgtY;
player.legs.play();
}
}
if ((change._currentFrame == 1) && (gren._currentFrame == 1)) {
if (w1_ok) {
if (Key.isDown(49) && (_global.current_w != 1)) {
_global.selected_w = 1;
bulletSpeed = bS1;
change.gotoAndPlay(1);
}
}
if (w2_ok) {
if (Key.isDown(50) && (_global.current_w != 2)) {
_global.selected_w = 2;
bulletSpeed = bS2;
change.gotoAndPlay(1);
}
}
if (w3_ok) {
if (Key.isDown(51) && (_global.current_w != 3)) {
_global.selected_w = 3;
bulletSpeed = bS3;
change.gotoAndPlay(1);
}
}
if (w4_ok) {
if (Key.isDown(52) && (_global.current_w != 4)) {
_global.selected_w = 4;
bulletSpeed = bS4;
change.gotoAndPlay(1);
}
}
}
if (suckmygun == 1) {
if (!exit.hitTest(_xmouse, _ymouse, true)) {
switch (_global.current_w) {
case 1 :
if (_global.ammo1 > 0) {
if ((player.hands1._currentframe == 8) || (player.hands1._currentframe == 10)) {
player.hands1.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
break;
case 2 :
if (_global.ammo2 > 0) {
if ((player.hands2._currentframe == 7) || (player.hands2._currentframe == 13)) {
player.hands2.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
break;
case 3 :
if (_global.ammo3 > 0) {
if ((player.hands3._currentframe == 7) || (player.hands3._currentframe == 9)) {
player.hands3.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
break;
case 4 :
if (_global.ammo4 > 0) {
if ((player.hands4._currentframe == 7) || (player.hands4._currentframe == 9)) {
player.hands4.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
}
}
}
if (Key.isDown(71)) {
if (_global.ammog > 0) {
if (_root.gren._currentFrame == 1) {
_root.gren.gotoAndPlay(1);
}
}
}
}
};
var lev = 0;
placeBullet = function (tgt) {
lev++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("b" + lev, lev);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((player._rotation + tgt._rotation) - 90) + random(3);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(vrag1.hitter)) {
v1_health = v1_health - 8;
v1_spotted = 1;
this.removeMovieClip();
placeBlood(vrag1._x, vrag1._y, vrag1._rotation - 180);
}
if (this.hitTest(vrag2.hitter)) {
v2_health = v2_health - 8;
v2_spotted = 1;
this.removeMovieClip();
placeBlood(vrag2._x, vrag2._y, vrag2._rotation - 180);
}
if (this.hitTest(los1)) {
v1_spotted = 1;
}
if (this.hitTest(los2)) {
v2_spotted = 1;
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var leve = 0;
placeEBullet = function (tgt) {
leve++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve, leve);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((vrag1._rotation + tgt._rotation) - 93) + random(5);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 6;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var leve2 = 0;
placeE2Bullet = function (tgt) {
leve2++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve2, leve2);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((vrag2._rotation + tgt._rotation) - 93) + random(5);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 6;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var led = 0;
placeGren = function (tr) {
led++;
var _local3 = {x:tr._x, y:tr._y, rotation:tr._rotation};
tr._parent.localToGlobal(_local3);
globalToLocal(_local3);
var d = grena.duplicateMovieClip("b" + led, led);
d._x = _local3.x;
d._y = _local3.y;
d._rotation = player._rotation;
d.a = (d._rotation / 180) * Math.PI;
d.clickSpot_x = _root._xmouse;
d.clickSpot_y = _root._ymouse;
d.onEnterFrame = function () {
gotoSpotX = d.clickSpot_x;
gotoSpotY = d.clickSpot_y;
delta_x = this._x - gotoSpotX;
delta_y = this._y - gotoSpotY;
if (Math.sqrt((delta_x * delta_x) + (delta_y * delta_y)) > grenSpeed) {
this._x = this._x + (grenSpeed * Math.cos(this.a));
this._y = this._y + (grenSpeed * Math.sin(this.a));
this._rotation = this._rotation - 10;
} else {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
};
};
boom._visible = false;
var levv = 0;
badaboom._visible = false;
var levvv = 0;
blood._visible = false;
var leb = 0;
death._visible = false;
var det = 0;
radlight.onEnterFrame = function () {
var _local4 = radlight._x - player._x;
var _local3 = radlight._y - player._y;
var _local2 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
_global.hrrr = 100 - _local2;
if (_local2 < 150) {
trace("777");
trace(radlight.alpha);
trace(_local2);
radlight.alpha = _local2 - 50;
} else {
radlight.alpha = 100;
}
};
v1_speed = 2;
var v1_spotted = 0;
var v1_health = 36;
_global.v1_move = 1;
vrag1.onEnterFrame = function () {
if (v1_health > 0) {
los1._x = vrag1._x;
los1._y = vrag1._y;
los1._rotation = vrag1._rotation;
if (los1.hitTest(hitter)) {
v1_spotted = 1;
}
if (los1.thin.hitTest(hitter)) {
beh1.play();
} else {
beh1.gotoAndPlay("halt");
}
if (v1_spotted == 1) {
var _local9 = player._x - vrag1._x;
var _local8 = player._y - vrag1._y;
} else {
var _local9 = s1.pp._x - vrag1._x;
var _local8 = s1.pp._y - vrag1._y;
if (vrag1.hitTest(s1.pp)) {
s1.play();
}
}
var _local7 = Math.atan2(_local8, _local9);
var _local12 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local12 > v1_speed) {
tgtX = vrag1._x + (v1_speed * Math.cos(_local7));
tgtY = vrag1._y + (v1_speed * Math.sin(_local7));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local13 = dAngleRadian(direction, _local7);
workAngle = _local7 + (_local13 * 0.8);
var _local6 = 0;
while (_local6 < 360) {
var _local2 = -1;
while (_local2 <= 1) {
var _local3 = workAngle + (radian(_local6) * _local2);
var _local5 = vrag1._x + (v1_speed * Math.cos(_local3));
var _local4 = vrag1._y + (v1_speed * Math.sin(_local3));
if (walls.hitTest(_local5, _local4, true)) {
tgtX = _local5;
tgtY = _local4;
break;
}
_local2 = _local2 + 2;
}
_local6 = _local6 + 10;
}
}
var _local11 = tgtX - vrag1._x;
var _local10 = tgtY - vrag1._y;
direction = Math.atan2(_local10, _local11);
var _local13 = dAngleDegree((direction * 180) / Math.PI, vrag1._rotation);
vrag1._rotation = vrag1._rotation + (_local13 * 0.2);
if (_global.v1_move) {
vrag1._x = tgtX;
vrag1._y = tgtY;
vrag1.legs.play();
}
}
} else {
placeDeath(vrag1._x, vrag1._y, vrag1.getDepth());
los1._visible = 0;
}
};
v2_speed = 2;
var v2_spotted = 0;
var v2_health = 42;
_global.v2_move = 1;
vrag2.onEnterFrame = function () {
if (v2_health > 0) {
los2._x = vrag2._x;
los2._y = vrag2._y;
los2._rotation = vrag2._rotation;
if (los2.hitTest(hitter)) {
v2_spotted = 1;
}
if (los2.thin.hitTest(hitter)) {
beh2.play();
} else {
beh2.gotoAndPlay("halt");
}
if (v2_spotted == 1) {
var _local9 = player._x - vrag2._x;
var _local8 = player._y - vrag2._y;
}
var _local7 = Math.atan2(_local8, _local9);
var _local12 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local12 > v2_speed) {
tgtX = vrag2._x + (v2_speed * Math.cos(_local7));
tgtY = vrag2._y + (v2_speed * Math.sin(_local7));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local13 = dAngleRadian(direction, _local7);
workAngle = _local7 + (_local13 * 0.8);
var _local6 = 0;
while (_local6 < 360) {
var _local2 = -1;
while (_local2 <= 1) {
var _local3 = workAngle + (radian(_local6) * _local2);
var _local5 = vrag2._x + (v2_speed * Math.cos(_local3));
var _local4 = vrag2._y + (v2_speed * Math.sin(_local3));
if (walls.hitTest(_local5, _local4, true)) {
tgtX = _local5;
tgtY = _local4;
break;
}
_local2 = _local2 + 2;
}
_local6 = _local6 + 10;
}
}
var _local11 = tgtX - vrag2._x;
var _local10 = tgtY - vrag2._y;
direction = Math.atan2(_local10, _local11);
var _local13 = dAngleDegree((direction * 180) / Math.PI, vrag2._rotation);
vrag2._rotation = vrag2._rotation + (_local13 * 0.2);
if (_global.v2_move) {
vrag2._x = tgtX;
vrag2._y = tgtY;
vrag2.legs.play();
}
}
} else {
placeDeath(vrag2._x, vrag2._y, vrag2.getDepth());
los2._visible = 0;
}
};
vrag1.onRollOver = function () {
los1._visible = 1;
};
vrag1.onRollOut = function () {
los1._visible = 0;
};
vrag1.onReleaseOutside = function () {
los1._visible = 0;
};
vrag2.onRollOver = function () {
los2._visible = 1;
};
vrag2.onRollOut = function () {
los2._visible = 0;
};
vrag2.onReleaseOutside = function () {
los2._visible = 0;
};
Instance of Symbol 496 MovieClip in Frame 236
onClipEvent (enterFrame) {
this._x = player._x;
this._y = player._y;
}
Instance of Symbol 197 MovieClip in Frame 236
on (keyPress "<?#19>") {
_root.gotoAndPlay("inchange");
defeat.Key.removeListener(keyListener);
Key.removeListener(keyListener);
Key.removeListener(defeat.keyListener);
victory.Key.removeListener(keyListener2);
Key.removeListener(victory.keyListener2);
Key.removeListener(keyListener2);
}
Instance of Symbol 530 MovieClip in Frame 236
onClipEvent (load) {
startDrag (this, true);
Mouse.hide();
}
onClipEvent (enterFrame) {
Mouse.hide();
}
Frame 238
stopAllSounds();
my_sound2.start();
my_sound2.onSoundComplete = function () {
my_sound2.start();
};
function placeBoom(x, y) {
levv++;
var _local1 = boom.duplicateMovieClip("bdoom" + levv, levv);
_local1._x = x;
_local1._y = y;
}
function placeBadaboom(x, y) {
levvv++;
var _local1 = badaboom.duplicateMovieClip("badadoom" + levvv, levvv);
_local1._x = x;
_local1._y = y;
if (_local1.hitTest(player.hitter)) {
difx = _local1._x - player._x;
dify = _local1._y - player._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
p_health = p_health - (120 - diff);
}
if (_local1.hitTest(vrag1.hitter)) {
difx = _local1._x - vrag1._x;
dify = _local1._y - vrag1._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
v1_health = v1_health - (180 - diff);
}
if (_local1.hitTest(vrag2.hitter)) {
difx = _local1._x - vrag2._x;
dify = _local1._y - vrag2._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
v2_health = v2_health - (180 - diff);
}
if (_local1.hitTest(los1) || (_local1.hitTest(los2))) {
v1_spotted = 1;
v2_spotted = 1;
}
}
function placeBlood(x, y, rotation) {
leb++;
var _local1 = blood.duplicateMovieClip("blood" + leb, leb);
_local1._x = x;
_local1._y = y;
_local1._rotation = rotation;
}
function placeDeath(x, y, gloob) {
det++;
var _local1 = death.duplicateMovieClip("blood" + det, gloob);
_local1._x = x;
_local1._y = y;
_local1._rotation = rotation;
deathsound.start();
}
function dAngleRadian(a1, a2) {
var _local1 = a1 - a2;
if (_local1 > Math.PI) {
_local1 = -6.28318530717959 + _local1;
} else if (_local1 < -3.14159265358979) {
_local1 = (Math.PI*2) + _local1;
}
return(_local1);
}
function dAngleDegree(a1, a2) {
var _local1 = a1 - a2;
if (_local1 > 180) {
_local1 = -360 + _local1;
} else if (_local1 < -180) {
_local1 = 360 + _local1;
}
return(_local1);
}
function degree(a) {
return((a / Math.PI) * 180);
}
function radian(a) {
return((a / 180) * Math.PI);
}
var suckmygun = 0;
_root.firebtn.onPress = function () {
suckmygun = 1;
};
_root.firebtn.onRelease = function () {
suckmygun = 0;
};
_root.firebtn.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag1.onPress = function () {
suckmygun = 1;
};
_root.vrag1.onRelease = function () {
suckmygun = 0;
};
_root.vrag1.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag2.onPress = function () {
suckmygun = 1;
};
_root.vrag2.onRelease = function () {
suckmygun = 0;
};
_root.vrag2.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag3.onPress = function () {
suckmygun = 1;
};
_root.vrag3.onRelease = function () {
suckmygun = 0;
};
_root.vrag3.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag4.onPress = function () {
suckmygun = 1;
};
_root.vrag4.onRelease = function () {
suckmygun = 0;
};
_root.vrag4.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag5.onPress = function () {
suckmygun = 1;
};
_root.vrag5.onRelease = function () {
suckmygun = 0;
};
_root.vrag5.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag10.onPress = function () {
suckmygun = 1;
};
_root.vrag10.onRelease = function () {
suckmygun = 0;
};
_root.vrag10.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag11.onPress = function () {
suckmygun = 1;
};
_root.vrag11.onRelease = function () {
suckmygun = 0;
};
_root.vrag11.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag12.onPress = function () {
suckmygun = 1;
};
_root.vrag12.onRelease = function () {
suckmygun = 0;
};
_root.vrag12.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag14.onPress = function () {
suckmygun = 1;
};
_root.vrag14.onRelease = function () {
suckmygun = 0;
};
_root.vrag14.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb1.onPress = function () {
suckmygun = 1;
};
_root.zomb1.onRelease = function () {
suckmygun = 0;
};
_root.zomb1.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb2.onPress = function () {
suckmygun = 1;
};
_root.zomb2.onRelease = function () {
suckmygun = 0;
};
_root.zomb2.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb3.onPress = function () {
suckmygun = 1;
};
_root.zomb3.onRelease = function () {
suckmygun = 0;
};
_root.zomb3.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb4.onPress = function () {
suckmygun = 1;
};
_root.zomb4.onRelease = function () {
suckmygun = 0;
};
_root.zomb4.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb5.onPress = function () {
suckmygun = 1;
};
_root.zomb5.onRelease = function () {
suckmygun = 0;
};
_root.zomb5.onReleaseOutside = function () {
suckmygun = 0;
};
stop();
pick1._visible = 0;
pick2._visible = 0;
_global.deton = 0;
var p_speed = 4;
var rotToMouseSpeed = 12;
var bS1 = 20;
var bS2 = 18;
var bS3 = 22;
var bS4 = 15;
var grenSpeed = 15;
var p_health = 100;
_global.current_w = 1;
var vkey1 = 0;
gkey1._visible = 0;
_global.ammo1 = 27;
_global.ammo2 = 16;
_global.ammo3 = 0;
_global.ammo4 = 0;
_global.ammog = 1;
var w1_ok = 1;
var w2_ok = 0;
var w3_ok = 0;
var w4_ok = 0;
los1._visible = 0;
los2._visible = 0;
los3._visible = 0;
var flag = 0;
_global.selected_w;
var xpluz = 0;
var ypluz = 0;
var bulletSpeed;
if (w1_ok) {
gui_weap.weap_none1._visible = 0;
}
if (w2_ok) {
gui_weap.weap_none2._visible = 0;
}
if (w3_ok) {
gui_weap.weap_none3._visible = 0;
}
if (w4_ok) {
gui_weap.weap_none4._visible = 0;
}
gui_weap.sel_light.gotoAndStop(_global.current_w + 1);
player.hands._visible = 0;
player.hands1._visible = 0;
player.hands2._visible = 0;
player.hands3._visible = 0;
player.hands4._visible = 0;
player.handsg._visible = 0;
switch (current_w) {
case 0 :
player.hands._visible = 1;
break;
case 1 :
player.hands1._visible = 1;
bulletSpeed = bS1;
break;
case 2 :
player.hands2._visible = 1;
bulletSpeed = bS2;
break;
case 3 :
player.hands3._visible = 1;
bulletSpeed = bS3;
break;
case 4 :
player.hands4._visible = 1;
bulletSpeed = bS4;
}
defeat.gotoAndStop(1);
victory.gotoAndStop(1);
player.onEnterFrame = function () {
if (p_health < 1) {
health_t.text = 0;
if (player._currentframe == 1) {
player.play();
player._name = "gsom";
defeat.play();
}
} else {
if (hitter.hitTest(finish)) {
player._name = "gsom";
hitter._name = "gsom2";
victory.play();
var _local5 = SharedObject.getLocal("numlevs");
if (_local5.data.num < 2) {
_local5.data.num = 2;
_local5.flush();
}
}
if (hitter.hitTest(trigger)) {
if (titizentalk._currentframe == 1) {
titizentalk.play();
}
}
if (door1._currentframe == 1) {
if (hitter.hitTest(door1.hitter)) {
door1.hitter._visible = 1;
if (Key.isDown(32)) {
door1.play();
walls.door1.play();
bwalls.door1.play();
}
} else {
door1.hitter._visible = 0;
}
}
if (door2._currentframe == 1) {
if (hitter.hitTest(door2.hitter)) {
door2.hitter._visible = 1;
if (Key.isDown(32)) {
door2.play();
walls.door2.play();
bwalls.door2.play();
}
} else {
door2.hitter._visible = 0;
}
}
if (door4._currentframe == 1) {
if (hitter.hitTest(door4.hitter)) {
door4.hitter._visible = 1;
if (Key.isDown(32)) {
if (vkey1) {
door4.play();
walls.door4.play();
bwalls.door4.play();
} else {
needkey2.play();
}
}
} else {
door4.hitter._visible = 0;
}
}
if (door3._currentframe == 1) {
if (hitter.hitTest(door3.hitter)) {
door3.hitter._visible = 1;
if (Key.isDown(32)) {
door3.play();
walls.door3.play();
bwalls.door3.play();
}
} else {
door3.hitter._visible = 0;
}
}
if (door5._currentframe == 1) {
if (hitter.hitTest(door5.hitter)) {
door5.hitter._visible = 1;
if (Key.isDown(32)) {
door5.play();
walls.door5.play();
bwalls.door5.play();
}
} else {
door5.hitter._visible = 0;
}
}
if (door6._currentframe == 1) {
if (hitter.hitTest(door6.hitter)) {
door6.hitter._visible = 1;
if (Key.isDown(32)) {
door6.play();
walls.door6.play();
bwalls.door6.play();
}
} else {
door6.hitter._visible = 0;
}
}
if (door7._currentframe == 1) {
if (hitter.hitTest(door7.hitter)) {
door7.hitter._visible = 1;
if (Key.isDown(32)) {
door7.play();
walls.door7.play();
bwalls.door7.play();
}
} else {
door7.hitter._visible = 0;
}
}
if (key1._currentframe == 1) {
if (hitter.hitTest(key1)) {
key1.hitter._visible = 1;
pick1._visible = 1;
if (Key.isDown(32)) {
sh1._visible = 0;
key1.play();
keypicked.play();
vkey1 = 1;
gkey1._visible = 1;
flag = 1;
placeDeath(titizen._x, titizen._y, titizen.getDepth());
compsound.start();
pick1._visible = 0;
}
} else {
key1.hitter._visible = 0;
pick1._visible = 0;
}
}
if (shotgun._currentframe == 1) {
if (hitter.hitTest(shotgun)) {
shotgun.hitter._visible = 1;
pick2._visible = 1;
if (Key.isDown(32)) {
shotgun.play();
w2_ok = 1;
gui_weap.weap_none2._visible = 0;
shotgunpicked.play();
pick2._visible = 0;
}
} else {
shotgun.hitter._visible = 0;
pick2._visible = 0;
}
}
if (radd._currentframe == 1) {
if (Key.isDown(81)) {
radd.play();
if (_global.deton == 1) {
_global.deton = 0;
_root.raddet.dettt._width = 0;
_root.raddet.gotoAndStop(1);
p_speed = p_speed * 2;
} else {
_global.deton = 1;
_root.raddet.gotoAndStop(2);
p_speed = p_speed / 2;
}
}
}
grens.text = _global.ammog;
switch (_global.current_w) {
case 0 :
ammo_cur.text = "0";
break;
case 1 :
ammo_cur.text = _global.ammo1;
break;
case 2 :
ammo_cur.text = _global.ammo2;
break;
case 3 :
ammo_cur.text = _global.ammo3;
break;
case 4 :
ammo_cur.text = _global.ammo4;
}
health_t.text = p_health;
switch (Key.isDown(87) - Key.isDown(83)) {
case 1 :
ypluz = -10;
break;
case -1 :
ypluz = 10;
break;
default :
ypluz = 0;
}
switch (Key.isDown(68) - Key.isDown(65)) {
case 1 :
xpluz = 10;
break;
case -1 :
xpluz = -10;
break;
default :
xpluz = 0;
}
delta_x = _xmouse - player._x;
delta_y = _ymouse - player._y;
mAngle = Math.atan2(delta_y, delta_x);
mAngleD = (mAngle / Math.PI) * 180;
dAngleD = player._rotation - mAngleD;
if (dAngleD > 180) {
dAngleD = -360 + dAngleD;
} else if (dAngleD < -180) {
dAngleD = 360 + dAngleD;
}
if (Math.abs(dAngleD) < rotToMouseSpeed) {
player._rotation = player._rotation - dAngleD;
} else if (dAngleD > 0) {
player._rotation = player._rotation - rotToMouseSpeed;
} else {
player._rotation = player._rotation + rotToMouseSpeed;
}
_root.hitter._x = _root.player._x + xpluz;
_root.hitter._y = _root.player._y + ypluz;
_root.hitter._rotation = _root.player._rotation;
var _local4 = hitter._x - player._x;
var _local3 = hitter._y - player._y;
var _local6 = Math.atan2(_local3, _local4);
var _local7 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if (_local7 > p_speed) {
tgtX = player._x + (p_speed * Math.cos(_local6));
tgtY = player._y + (p_speed * Math.sin(_local6));
if (walls.hitTest(tgtX, tgtY, true)) {
player._x = tgtX;
player._y = tgtY;
player.legs.play();
}
}
switch (Key.isDown(87) - Key.isDown(83)) {
case 1 :
ypluz = -10;
break;
case -1 :
ypluz = 10;
break;
default :
ypluz = 0;
}
switch (Key.isDown(68) - Key.isDown(65)) {
case 1 :
xpluz = 10;
break;
case -1 :
xpluz = -10;
break;
default :
xpluz = 0;
}
delta_x = _xmouse - player._x;
delta_y = _ymouse - player._y;
mAngle = Math.atan2(delta_y, delta_x);
mAngleD = (mAngle / Math.PI) * 180;
dAngleD = player._rotation - mAngleD;
if (dAngleD > 180) {
dAngleD = -360 + dAngleD;
} else if (dAngleD < -180) {
dAngleD = 360 + dAngleD;
}
if (Math.abs(dAngleD) < rotToMouseSpeed) {
player._rotation = player._rotation - dAngleD;
} else if (dAngleD > 0) {
player._rotation = player._rotation - rotToMouseSpeed;
} else {
player._rotation = player._rotation + rotToMouseSpeed;
}
_root.hitter._x = _root.player._x + xpluz;
_root.hitter._y = _root.player._y;
_root.hittery._x = _root.player._x;
_root.hittery._y = _root.player._y + ypluz;
_root.hitter._rotation = _root.player._rotation;
_local4 = hitter._x - player._x;
_local3 = hittery._y - player._y;
_local6 = Math.atan2(_local3, _local4);
_local7 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if (_local7 > p_speed) {
tgtX = player._x + (p_speed * Math.cos(_local6));
tgtY = player._y + (p_speed * Math.sin(_local6));
if (walls.hitTest(hitter._x, hitter._y, true)) {
player._x = tgtX;
player.legs.play();
}
if (walls.hitTest(hittery._x, hittery._y, true)) {
player._y = tgtY;
player.legs.play();
}
}
if ((change._currentFrame == 1) && (gren._currentFrame == 1)) {
if (w1_ok) {
if (Key.isDown(49) && (_global.current_w != 1)) {
_global.selected_w = 1;
bulletSpeed = bS1;
change.gotoAndPlay(1);
}
}
if (w2_ok) {
if (Key.isDown(50) && (_global.current_w != 2)) {
_global.selected_w = 2;
bulletSpeed = bS2;
change.gotoAndPlay(1);
}
}
if (w3_ok) {
if (Key.isDown(51) && (_global.current_w != 3)) {
_global.selected_w = 3;
bulletSpeed = bS3;
change.gotoAndPlay(1);
}
}
if (w4_ok) {
if (Key.isDown(52) && (_global.current_w != 4)) {
_global.selected_w = 4;
bulletSpeed = bS4;
change.gotoAndPlay(1);
}
}
}
if (suckmygun == 1) {
if (!exit.hitTest(_xmouse, _ymouse, true)) {
switch (_global.current_w) {
case 1 :
if (_global.ammo1 > 0) {
if ((player.hands1._currentframe == 8) || (player.hands1._currentframe == 10)) {
player.hands1.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
break;
case 2 :
if (_global.ammo2 > 0) {
if ((player.hands2._currentframe == 7) || (player.hands2._currentframe == 13)) {
player.hands2.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
break;
case 3 :
if (_global.ammo3 > 0) {
if ((player.hands3._currentframe == 7) || (player.hands3._currentframe == 9)) {
player.hands3.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
break;
case 4 :
if (_global.ammo4 > 0) {
if ((player.hands4._currentframe == 7) || (player.hands4._currentframe == 9)) {
player.hands4.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
}
}
}
if (Key.isDown(71)) {
if (_global.ammog > 0) {
if (_root.gren._currentFrame == 1) {
_root.gren.gotoAndPlay(1);
}
}
}
}
};
var lev = 0;
placeBullet = function (tgt) {
lev++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("b" + lev, lev);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((player._rotation + tgt._rotation) - 90) + random(3);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(vrag1.hitter)) {
v1_health = v1_health - 8;
v1_spotted = 1;
this.removeMovieClip();
placeBlood(vrag1._x, vrag1._y, vrag1._rotation - 180);
}
if (this.hitTest(vrag2.hitter)) {
v2_health = v2_health - 8;
v2_spotted = 1;
this.removeMovieClip();
placeBlood(vrag2._x, vrag2._y, vrag2._rotation - 180);
}
if (this.hitTest(vrag3.hitter)) {
v3_health = v3_health - 8;
v3_spotted = 1;
this.removeMovieClip();
placeBlood(vrag3._x, vrag3._y, vrag3._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var leve = 0;
placeEBullet = function (tgt) {
leve++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve, leve);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((vrag1._rotation + tgt._rotation) - 93) + random(5);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 6;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var leve2 = 0;
placeE2Bullet = function (tgt) {
leve2++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve2, leve2);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((vrag2._rotation + tgt._rotation) - 93) + random(5);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 6;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var leve3 = 0;
placeE3Bullet = function (tgt) {
leve3++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve3, leve3);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((vrag3._rotation + tgt._rotation) - 93) + random(5);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 6;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var led = 0;
placeGren = function (tr) {
led++;
var _local3 = {x:tr._x, y:tr._y, rotation:tr._rotation};
tr._parent.localToGlobal(_local3);
globalToLocal(_local3);
var d = grena.duplicateMovieClip("b" + led, led);
d._x = _local3.x;
d._y = _local3.y;
d._rotation = player._rotation;
d.a = (d._rotation / 180) * Math.PI;
d.clickSpot_x = _root._xmouse;
d.clickSpot_y = _root._ymouse;
d.onEnterFrame = function () {
gotoSpotX = d.clickSpot_x;
gotoSpotY = d.clickSpot_y;
delta_x = this._x - gotoSpotX;
delta_y = this._y - gotoSpotY;
if (Math.sqrt((delta_x * delta_x) + (delta_y * delta_y)) > grenSpeed) {
this._x = this._x + (grenSpeed * Math.cos(this.a));
this._y = this._y + (grenSpeed * Math.sin(this.a));
this._rotation = this._rotation - 10;
} else {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
};
};
boom._visible = false;
var levv = 0;
badaboom._visible = false;
var levvv = 0;
blood._visible = false;
var leb = 0;
death._visible = false;
var det = 0;
radlight.onEnterFrame = function () {
var _local5 = radlight._x - player._x;
var _local4 = radlight._y - player._y;
var _local3 = Math.sqrt((_local5 * _local5) + (_local4 * _local4));
_global.hrrr = 100 - _local3;
_root.dettt._width = hrrr;
if (_local3 < 150) {
radlight.alpha = _local3 - 50;
} else {
radlight.alpha = 100;
}
};
v1_speed = 2;
var v1_spotted = 0;
var v1_health = 40;
_global.v1_move = 1;
vrag1.onEnterFrame = function () {
if (flag) {
if (v1_health > 0) {
los1._x = vrag1._x;
los1._y = vrag1._y;
los1._rotation = vrag1._rotation;
if (los1.hitTest(hitter)) {
v1_spotted = 1;
}
if (los1.thin.hitTest(hitter)) {
beh1.play();
} else {
beh1.gotoAndPlay("halt");
}
if (v1_spotted == 1) {
var _local9 = player._x - vrag1._x;
var _local8 = player._y - vrag1._y;
} else {
var _local9 = s1.pp._x - vrag1._x;
var _local8 = s1.pp._y - vrag1._y;
if (vrag1.hitTest(s1.pp)) {
s1.play();
}
}
var _local7 = Math.atan2(_local8, _local9);
var _local12 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local12 > v1_speed) {
tgtX = vrag1._x + (v1_speed * Math.cos(_local7));
tgtY = vrag1._y + (v1_speed * Math.sin(_local7));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local13 = dAngleRadian(direction, _local7);
workAngle = _local7 + (_local13 * 0.8);
var _local6 = 0;
while (_local6 < 360) {
var _local2 = -1;
while (_local2 <= 1) {
var _local3 = workAngle + (radian(_local6) * _local2);
var _local5 = vrag1._x + (v1_speed * Math.cos(_local3));
var _local4 = vrag1._y + (v1_speed * Math.sin(_local3));
if (walls.hitTest(_local5, _local4, true)) {
tgtX = _local5;
tgtY = _local4;
break;
}
_local2 = _local2 + 2;
}
_local6 = _local6 + 10;
}
}
var _local11 = tgtX - vrag1._x;
var _local10 = tgtY - vrag1._y;
direction = Math.atan2(_local10, _local11);
var _local13 = dAngleDegree((direction * 180) / Math.PI, vrag1._rotation);
vrag1._rotation = vrag1._rotation + (_local13 * 0.2);
if (_global.v1_move) {
vrag1._x = tgtX;
vrag1._y = tgtY;
vrag1.legs.play();
}
}
} else {
placeDeath(vrag1._x, vrag1._y, vrag1.getDepth());
los1._visible = 0;
}
}
};
v3_speed = 2;
var v3_spotted = 0;
var v3_health = 50;
_global.v3_move = 1;
vrag3.onEnterFrame = function () {
if (flag) {
if (v3_health > 0) {
los3._x = vrag3._x;
los3._y = vrag3._y;
los3._rotation = vrag3._rotation;
if (los3.hitTest(hitter)) {
v3_spotted = 1;
}
if (los3.thin.hitTest(hitter)) {
beh3.play();
} else {
beh3.gotoAndPlay("halt");
}
if (v3_spotted == 1) {
var _local9 = player._x - vrag3._x;
var _local8 = player._y - vrag3._y;
} else {
var _local9 = s3.pp._x - vrag3._x;
var _local8 = s3.pp._y - vrag3._y;
if (vrag3.hitTest(s3.pp)) {
s3.play();
}
}
var _local7 = Math.atan2(_local8, _local9);
var _local12 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local12 > v3_speed) {
tgtX = vrag3._x + (v3_speed * Math.cos(_local7));
tgtY = vrag3._y + (v3_speed * Math.sin(_local7));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local13 = dAngleRadian(direction, _local7);
workAngle = _local7 + (_local13 * 0.8);
var _local6 = 0;
while (_local6 < 360) {
var _local2 = -1;
while (_local2 <= 1) {
var _local3 = workAngle + (radian(_local6) * _local2);
var _local5 = vrag3._x + (v3_speed * Math.cos(_local3));
var _local4 = vrag3._y + (v3_speed * Math.sin(_local3));
if (walls.hitTest(_local5, _local4, true)) {
tgtX = _local5;
tgtY = _local4;
break;
}
_local2 = _local2 + 2;
}
_local6 = _local6 + 10;
}
}
var _local11 = tgtX - vrag3._x;
var _local10 = tgtY - vrag3._y;
direction = Math.atan2(_local10, _local11);
var _local13 = dAngleDegree((direction * 180) / Math.PI, vrag3._rotation);
vrag3._rotation = vrag3._rotation + (_local13 * 0.2);
if (_global.v3_move) {
vrag3._x = tgtX;
vrag3._y = tgtY;
vrag3.legs.play();
}
}
} else {
placeDeath(vrag3._x, vrag3._y, vrag3.getDepth());
los3._visible = 0;
}
}
};
v2_speed = 2;
var v2_spotted = 0;
var v2_health = 60;
_global.v2_move = 1;
vrag2.onEnterFrame = function () {
if (v2_health > 0) {
los2._x = vrag2._x;
los2._y = vrag2._y;
los2._rotation = vrag2._rotation;
if (los2.hitTest(hitter)) {
v2_spotted = 1;
}
if (los2.thin.hitTest(hitter)) {
beh2.play();
} else {
beh2.gotoAndPlay("halt");
}
if (v2_spotted == 1) {
var _local9 = player._x - vrag2._x;
var _local8 = player._y - vrag2._y;
}
var _local7 = Math.atan2(_local8, _local9);
var _local12 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local12 > v2_speed) {
tgtX = vrag2._x + (v2_speed * Math.cos(_local7));
tgtY = vrag2._y + (v2_speed * Math.sin(_local7));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local13 = dAngleRadian(direction, _local7);
workAngle = _local7 + (_local13 * 0.8);
var _local6 = 0;
while (_local6 < 360) {
var _local2 = -1;
while (_local2 <= 1) {
var _local3 = workAngle + (radian(_local6) * _local2);
var _local5 = vrag2._x + (v2_speed * Math.cos(_local3));
var _local4 = vrag2._y + (v2_speed * Math.sin(_local3));
if (walls.hitTest(_local5, _local4, true)) {
tgtX = _local5;
tgtY = _local4;
break;
}
_local2 = _local2 + 2;
}
_local6 = _local6 + 10;
}
}
var _local11 = tgtX - vrag2._x;
var _local10 = tgtY - vrag2._y;
direction = Math.atan2(_local10, _local11);
var _local13 = dAngleDegree((direction * 180) / Math.PI, vrag2._rotation);
vrag2._rotation = vrag2._rotation + (_local13 * 0.2);
if (_global.v2_move) {
vrag2._x = tgtX;
vrag2._y = tgtY;
vrag2.legs.play();
}
}
} else {
placeDeath(vrag2._x, vrag2._y, vrag2.getDepth());
los2._visible = 0;
}
};
vrag1.onRollOver = function () {
los1._visible = 1;
};
vrag1.onRollOut = function () {
los1._visible = 0;
};
vrag1.onReleaseOutside = function () {
los1._visible = 0;
};
vrag3.onRollOver = function () {
los3._visible = 1;
};
vrag3.onRollOut = function () {
los3._visible = 0;
};
vrag3.onReleaseOutside = function () {
los3._visible = 0;
};
Instance of Symbol 496 MovieClip in Frame 238
onClipEvent (enterFrame) {
this._x = player._x;
this._y = player._y;
}
Instance of Symbol 197 MovieClip in Frame 238
on (keyPress "<?#19>") {
_root.gotoAndPlay("inchange");
defeat.Key.removeListener(keyListener);
Key.removeListener(keyListener);
Key.removeListener(defeat.keyListener);
victory.Key.removeListener(keyListener2);
Key.removeListener(victory.keyListener2);
Key.removeListener(keyListener2);
}
Instance of Symbol 530 MovieClip in Frame 238
onClipEvent (load) {
startDrag (this, true);
Mouse.hide();
}
onClipEvent (enterFrame) {
Mouse.hide();
}
Frame 240
stopAllSounds();
my_sound2.start();
my_sound2.onSoundComplete = function () {
my_sound2.start();
};
function placeBoom(x, y) {
levv++;
var _local1 = boom.duplicateMovieClip("bdoom" + levv, levv);
_local1._x = x;
_local1._y = y;
}
function placeBadaboom(x, y) {
levvv++;
var _local1 = badaboom.duplicateMovieClip("badadoom" + levvv, levvv);
_local1._x = x;
_local1._y = y;
if (_local1.hitTest(player.hitter)) {
difx = _local1._x - player._x;
dify = _local1._y - player._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
p_health = p_health - (120 - diff);
}
if (_local1.hitTest(vrag1.hitter)) {
difx = _local1._x - vrag1._x;
dify = _local1._y - vrag1._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
v1_health = v1_health - (180 - diff);
}
if (_local1.hitTest(vrag2.hitter)) {
difx = _local1._x - vrag2._x;
dify = _local1._y - vrag2._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
v2_health = v2_health - (180 - diff);
}
if (_local1.hitTest(los1) || (_local1.hitTest(los2))) {
v1_spotted = 1;
v2_spotted = 1;
}
}
function placeBlood(x, y, rotation) {
leb++;
var _local1 = blood.duplicateMovieClip("blood" + leb, leb);
_local1._x = x;
_local1._y = y;
_local1._rotation = rotation;
}
function placeDeath(x, y, gloob) {
det++;
var _local1 = death.duplicateMovieClip("blood" + det, gloob);
_local1._x = x;
_local1._y = y;
_local1._rotation = rotation;
deathsound.start();
}
function dAngleRadian(a1, a2) {
var _local1 = a1 - a2;
if (_local1 > Math.PI) {
_local1 = -6.28318530717959 + _local1;
} else if (_local1 < -3.14159265358979) {
_local1 = (Math.PI*2) + _local1;
}
return(_local1);
}
function dAngleDegree(a1, a2) {
var _local1 = a1 - a2;
if (_local1 > 180) {
_local1 = -360 + _local1;
} else if (_local1 < -180) {
_local1 = 360 + _local1;
}
return(_local1);
}
function degree(a) {
return((a / Math.PI) * 180);
}
function radian(a) {
return((a / 180) * Math.PI);
}
var suckmygun = 0;
_root.firebtn.onPress = function () {
suckmygun = 1;
};
_root.firebtn.onRelease = function () {
suckmygun = 0;
};
_root.firebtn.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag1.onPress = function () {
suckmygun = 1;
};
_root.vrag1.onRelease = function () {
suckmygun = 0;
};
_root.vrag1.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag2.onPress = function () {
suckmygun = 1;
};
_root.vrag2.onRelease = function () {
suckmygun = 0;
};
_root.vrag2.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag3.onPress = function () {
suckmygun = 1;
};
_root.vrag3.onRelease = function () {
suckmygun = 0;
};
_root.vrag3.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag4.onPress = function () {
suckmygun = 1;
};
_root.vrag4.onRelease = function () {
suckmygun = 0;
};
_root.vrag4.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag5.onPress = function () {
suckmygun = 1;
};
_root.vrag5.onRelease = function () {
suckmygun = 0;
};
_root.vrag5.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag10.onPress = function () {
suckmygun = 1;
};
_root.vrag10.onRelease = function () {
suckmygun = 0;
};
_root.vrag10.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag11.onPress = function () {
suckmygun = 1;
};
_root.vrag11.onRelease = function () {
suckmygun = 0;
};
_root.vrag11.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag12.onPress = function () {
suckmygun = 1;
};
_root.vrag12.onRelease = function () {
suckmygun = 0;
};
_root.vrag12.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag14.onPress = function () {
suckmygun = 1;
};
_root.vrag14.onRelease = function () {
suckmygun = 0;
};
_root.vrag14.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb1.onPress = function () {
suckmygun = 1;
};
_root.zomb1.onRelease = function () {
suckmygun = 0;
};
_root.zomb1.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb2.onPress = function () {
suckmygun = 1;
};
_root.zomb2.onRelease = function () {
suckmygun = 0;
};
_root.zomb2.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb3.onPress = function () {
suckmygun = 1;
};
_root.zomb3.onRelease = function () {
suckmygun = 0;
};
_root.zomb3.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb4.onPress = function () {
suckmygun = 1;
};
_root.zomb4.onRelease = function () {
suckmygun = 0;
};
_root.zomb4.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb5.onPress = function () {
suckmygun = 1;
};
_root.zomb5.onRelease = function () {
suckmygun = 0;
};
_root.zomb5.onReleaseOutside = function () {
suckmygun = 0;
};
stop();
_global.deton = 0;
pick1._visible = 0;
pick2._visible = 0;
pick3._visible = 0;
var p_speed = 4;
var rotToMouseSpeed = 12;
var bS1 = 20;
var bS2 = 18;
var bS3 = 22;
var bS4 = 15;
var grenSpeed = 15;
var p_health = 100;
_global.current_w = 2;
var vkey1 = 0;
gkey1._visible = 0;
_global.ammo1 = 27;
_global.ammo2 = 16;
_global.ammo3 = 0;
_global.ammo4 = 0;
_global.ammog = 1;
var w1_ok = 1;
var w2_ok = 2;
var w3_ok = 0;
var w4_ok = 0;
los1._visible = 0;
los2._visible = 0;
los3._visible = 0;
_global.selected_w;
var xpluz = 0;
var ypluz = 0;
var bulletSpeed;
if (w1_ok) {
gui_weap.weap_none1._visible = 0;
}
if (w2_ok) {
gui_weap.weap_none2._visible = 0;
}
if (w3_ok) {
gui_weap.weap_none3._visible = 0;
}
if (w4_ok) {
gui_weap.weap_none4._visible = 0;
}
gui_weap.sel_light.gotoAndStop(_global.current_w + 1);
player.hands._visible = 0;
player.hands1._visible = 0;
player.hands2._visible = 0;
player.hands3._visible = 0;
player.hands4._visible = 0;
player.handsg._visible = 0;
switch (current_w) {
case 0 :
player.hands._visible = 1;
break;
case 1 :
player.hands1._visible = 1;
bulletSpeed = bS1;
break;
case 2 :
player.hands2._visible = 1;
bulletSpeed = bS2;
break;
case 3 :
player.hands3._visible = 1;
bulletSpeed = bS3;
break;
case 4 :
player.hands4._visible = 1;
bulletSpeed = bS4;
}
defeat.gotoAndStop(1);
victory.gotoAndStop(1);
player.onEnterFrame = function () {
if (p_health < 1) {
health_t.text = 0;
if (player._currentframe == 1) {
player.play();
player._name = "gsom";
defeat.play();
}
} else {
if (hitter.hitTest(finish)) {
player._name = "gsom";
hitter._name = "gsom2";
victory.play();
var _local5 = SharedObject.getLocal("numlevs");
if (_local5.data.num < 3) {
_local5.data.num = 3;
_local5.flush();
}
}
if (shotgun._currentframe == 1) {
if (hitter.hitTest(shotgun)) {
shotgun.hitter._visible = 1;
pick3._visible = 1;
if (Key.isDown(32)) {
shotgun.play();
_global.ammo2 = _global.ammo2 + 12;
ammo2picked.play();
pick3._visible = 0;
}
} else {
shotgun.hitter._visible = 0;
pick3._visible = 0;
}
}
if (pult1._currentframe == 1) {
if (hitter.hitTest(pult1)) {
pult1.hitter._visible = 1;
pick2._visible = 1;
if (Key.isDown(32)) {
compsound.start();
if (vkey1) {
sh2._visible = 0;
pult1.play();
walls.gate1.play();
gate1.play();
pick2._visible = 0;
gatesm.play();
} else {
needkey.play();
}
}
} else {
pult1.hitter._visible = 0;
pick2._visible = 0;
}
}
if (key1._currentframe == 1) {
if (hitter.hitTest(key1)) {
key1.hitter._visible = 1;
pick1._visible = 1;
if (Key.isDown(32)) {
sh1._visible = 0;
key1.play();
keypicked.play();
vkey1 = 1;
gkey1._visible = 1;
pick1._visible = 0;
}
} else {
key1.hitter._visible = 0;
pick1._visible = 0;
}
}
if (radd._currentframe == 1) {
if (Key.isDown(81)) {
radd.play();
if (_global.deton == 1) {
_global.deton = 0;
_root.raddet.dettt._width = 0;
_root.raddet.gotoAndStop(1);
p_speed = p_speed * 2;
} else {
_global.deton = 1;
_root.raddet.gotoAndStop(2);
p_speed = p_speed / 2;
}
}
}
grens.text = _global.ammog;
switch (_global.current_w) {
case 0 :
ammo_cur.text = "0";
break;
case 1 :
ammo_cur.text = _global.ammo1;
break;
case 2 :
ammo_cur.text = _global.ammo2;
break;
case 3 :
ammo_cur.text = _global.ammo3;
break;
case 4 :
ammo_cur.text = _global.ammo4;
}
health_t.text = p_health;
switch (Key.isDown(87) - Key.isDown(83)) {
case 1 :
ypluz = -10;
break;
case -1 :
ypluz = 10;
break;
default :
ypluz = 0;
}
switch (Key.isDown(68) - Key.isDown(65)) {
case 1 :
xpluz = 10;
break;
case -1 :
xpluz = -10;
break;
default :
xpluz = 0;
}
delta_x = _xmouse - player._x;
delta_y = _ymouse - player._y;
mAngle = Math.atan2(delta_y, delta_x);
mAngleD = (mAngle / Math.PI) * 180;
dAngleD = player._rotation - mAngleD;
if (dAngleD > 180) {
dAngleD = -360 + dAngleD;
} else if (dAngleD < -180) {
dAngleD = 360 + dAngleD;
}
if (Math.abs(dAngleD) < rotToMouseSpeed) {
player._rotation = player._rotation - dAngleD;
} else if (dAngleD > 0) {
player._rotation = player._rotation - rotToMouseSpeed;
} else {
player._rotation = player._rotation + rotToMouseSpeed;
}
_root.hitter._x = _root.player._x + xpluz;
_root.hitter._y = _root.player._y;
_root.hittery._x = _root.player._x;
_root.hittery._y = _root.player._y + ypluz;
_root.hitter._rotation = _root.player._rotation;
var _local4 = hitter._x - player._x;
var _local3 = hittery._y - player._y;
var _local6 = Math.atan2(_local3, _local4);
var _local7 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if (_local7 > p_speed) {
tgtX = player._x + (p_speed * Math.cos(_local6));
tgtY = player._y + (p_speed * Math.sin(_local6));
if (walls.hitTest(hitter._x, hitter._y, true)) {
player._x = tgtX;
player.legs.play();
}
if (walls.hitTest(hittery._x, hittery._y, true)) {
player._y = tgtY;
player.legs.play();
}
}
if ((change._currentFrame == 1) && (gren._currentFrame == 1)) {
if (w1_ok) {
if (Key.isDown(49) && (_global.current_w != 1)) {
_global.selected_w = 1;
bulletSpeed = bS1;
change.gotoAndPlay(1);
}
}
if (w2_ok) {
if (Key.isDown(50) && (_global.current_w != 2)) {
_global.selected_w = 2;
bulletSpeed = bS2;
change.gotoAndPlay(1);
}
}
if (w3_ok) {
if (Key.isDown(51) && (_global.current_w != 3)) {
_global.selected_w = 3;
bulletSpeed = bS3;
change.gotoAndPlay(1);
}
}
if (w4_ok) {
if (Key.isDown(52) && (_global.current_w != 4)) {
_global.selected_w = 4;
bulletSpeed = bS4;
change.gotoAndPlay(1);
}
}
}
if (suckmygun == 1) {
if (!exit.hitTest(_xmouse, _ymouse, true)) {
switch (_global.current_w) {
case 1 :
if (_global.ammo1 > 0) {
if ((player.hands1._currentframe == 8) || (player.hands1._currentframe == 10)) {
player.hands1.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
break;
case 2 :
if (_global.ammo2 > 0) {
if ((player.hands2._currentframe == 7) || (player.hands2._currentframe == 13)) {
player.hands2.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
break;
case 3 :
if (_global.ammo3 > 0) {
if ((player.hands3._currentframe == 7) || (player.hands3._currentframe == 9)) {
player.hands3.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
break;
case 4 :
if (_global.ammo4 > 0) {
if ((player.hands4._currentframe == 7) || (player.hands4._currentframe == 9)) {
player.hands4.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
}
}
}
if (Key.isDown(71)) {
if (_global.ammog > 0) {
if (_root.gren._currentFrame == 1) {
_root.gren.gotoAndPlay(1);
}
}
}
}
};
var lev = 0;
placeBullet = function (tgt) {
lev++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("b" + lev, lev);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((player._rotation + tgt._rotation) - 90) + random(3);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(vrag1.hitter)) {
v1_health = v1_health - 8;
v1_spotted = 1;
this.removeMovieClip();
placeBlood(vrag1._x, vrag1._y, vrag1._rotation - 180);
}
if (this.hitTest(vrag2.hitter)) {
v2_health = v2_health - 8;
v2_spotted = 1;
this.removeMovieClip();
placeBlood(vrag2._x, vrag2._y, vrag2._rotation - 180);
}
if (this.hitTest(vrag3.hitter)) {
v3_health = v3_health - 8;
v3_spotted = 1;
this.removeMovieClip();
placeBlood(vrag3._x, vrag3._y, vrag3._rotation - 180);
}
if (this.hitTest(zomb1.hitter)) {
z1_health = z1_health - 8;
this.removeMovieClip();
placeBlood(zomb1._x, zomb1._y, zomb1._rotation - 180);
}
if (this.hitTest(zomb2.hitter)) {
z2_health = z2_health - 8;
this.removeMovieClip();
placeBlood(zomb2._x, zomb2._y, zomb2._rotation - 180);
}
if (this.hitTest(zomb3.hitter)) {
z3_health = z3_health - 8;
this.removeMovieClip();
placeBlood(zomb3._x, zomb3._y, zomb3._rotation - 180);
}
if (this.hitTest(los1)) {
v1_spotted = 1;
}
if (this.hitTest(los2)) {
v2_spotted = 1;
}
if (this.hitTest(los3)) {
v3_spotted = 1;
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var leve = 0;
placeEBullet = function (tgt) {
leve++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve, leve);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((vrag1._rotation + tgt._rotation) - 93) + random(5);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 6;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var leve2 = 0;
placeE2Bullet = function (tgt) {
leve2++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve2, leve2);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((vrag2._rotation + tgt._rotation) - 93) + random(5);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 6;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var leve3 = 0;
placeE3Bullet = function (tgt) {
leve3++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve3, leve3);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((vrag3._rotation + tgt._rotation) - 93) + random(5);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 6;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var led = 0;
placeGren = function (tr) {
led++;
var _local3 = {x:tr._x, y:tr._y, rotation:tr._rotation};
tr._parent.localToGlobal(_local3);
globalToLocal(_local3);
var d = grena.duplicateMovieClip("b" + led, led);
d._x = _local3.x;
d._y = _local3.y;
d._rotation = player._rotation;
d.a = (d._rotation / 180) * Math.PI;
d.clickSpot_x = _root._xmouse;
d.clickSpot_y = _root._ymouse;
d.onEnterFrame = function () {
gotoSpotX = d.clickSpot_x;
gotoSpotY = d.clickSpot_y;
delta_x = this._x - gotoSpotX;
delta_y = this._y - gotoSpotY;
if (Math.sqrt((delta_x * delta_x) + (delta_y * delta_y)) > grenSpeed) {
this._x = this._x + (grenSpeed * Math.cos(this.a));
this._y = this._y + (grenSpeed * Math.sin(this.a));
this._rotation = this._rotation - 10;
} else {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
};
};
boom._visible = false;
var levv = 0;
badaboom._visible = false;
var levvv = 0;
blood._visible = false;
var leb = 0;
death._visible = false;
var det = 0;
v1_speed = 2;
var v1_spotted = 0;
var v1_health = 40;
_global.v1_move = 1;
vrag1.onEnterFrame = function () {
if (v1_health > 0) {
los1._x = vrag1._x;
los1._y = vrag1._y;
los1._rotation = vrag1._rotation;
if (los1.hitTest(hitter)) {
v1_spotted = 1;
}
if (los1.thin.hitTest(hitter)) {
beh1.play();
} else {
beh1.gotoAndPlay("halt");
}
if (v1_spotted == 1) {
var _local9 = player._x - vrag1._x;
var _local8 = player._y - vrag1._y;
} else {
var _local9 = s1.pp._x - vrag1._x;
var _local8 = s1.pp._y - vrag1._y;
if (vrag1.hitTest(s1.pp)) {
s1.play();
}
}
var _local7 = Math.atan2(_local8, _local9);
var _local12 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local12 > v1_speed) {
tgtX = vrag1._x + (v1_speed * Math.cos(_local7));
tgtY = vrag1._y + (v1_speed * Math.sin(_local7));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local13 = dAngleRadian(direction, _local7);
workAngle = _local7 + (_local13 * 0.8);
var _local6 = 0;
while (_local6 < 360) {
var _local2 = -1;
while (_local2 <= 1) {
var _local3 = workAngle + (radian(_local6) * _local2);
var _local5 = vrag1._x + (v1_speed * Math.cos(_local3));
var _local4 = vrag1._y + (v1_speed * Math.sin(_local3));
if (walls.hitTest(_local5, _local4, true)) {
tgtX = _local5;
tgtY = _local4;
break;
}
_local2 = _local2 + 2;
}
_local6 = _local6 + 10;
}
}
var _local11 = tgtX - vrag1._x;
var _local10 = tgtY - vrag1._y;
direction = Math.atan2(_local10, _local11);
var _local13 = dAngleDegree((direction * 180) / Math.PI, vrag1._rotation);
vrag1._rotation = vrag1._rotation + (_local13 * 0.2);
if (_global.v1_move) {
vrag1._x = tgtX;
vrag1._y = tgtY;
vrag1.legs.play();
}
}
} else {
placeDeath(vrag1._x, vrag1._y, vrag1.getDepth());
los1._visible = 0;
}
};
v3_speed = 2;
var v3_spotted = 0;
var v3_health = 50;
_global.v3_move = 1;
vrag3.onEnterFrame = function () {
if (v3_health > 0) {
los3._x = vrag3._x;
los3._y = vrag3._y;
los3._rotation = vrag3._rotation;
if (los3.hitTest(hitter)) {
v3_spotted = 1;
}
if (los3.thin.hitTest(hitter)) {
beh3.play();
} else {
beh3.gotoAndPlay("halt");
}
if (v3_spotted == 1) {
var _local9 = player._x - vrag3._x;
var _local8 = player._y - vrag3._y;
}
var _local7 = Math.atan2(_local8, _local9);
var _local12 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local12 > v3_speed) {
tgtX = vrag3._x + (v3_speed * Math.cos(_local7));
tgtY = vrag3._y + (v3_speed * Math.sin(_local7));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local13 = dAngleRadian(direction, _local7);
workAngle = _local7 + (_local13 * 0.8);
var _local6 = 0;
while (_local6 < 360) {
var _local2 = -1;
while (_local2 <= 1) {
var _local3 = workAngle + (radian(_local6) * _local2);
var _local5 = vrag3._x + (v3_speed * Math.cos(_local3));
var _local4 = vrag3._y + (v3_speed * Math.sin(_local3));
if (walls.hitTest(_local5, _local4, true)) {
tgtX = _local5;
tgtY = _local4;
break;
}
_local2 = _local2 + 2;
}
_local6 = _local6 + 10;
}
}
var _local11 = tgtX - vrag3._x;
var _local10 = tgtY - vrag3._y;
direction = Math.atan2(_local10, _local11);
var _local13 = dAngleDegree((direction * 180) / Math.PI, vrag3._rotation);
vrag3._rotation = vrag3._rotation + (_local13 * 0.2);
if (_global.v3_move) {
vrag3._x = tgtX;
vrag3._y = tgtY;
vrag3.legs.play();
}
}
} else {
placeDeath(vrag3._x, vrag3._y, vrag3.getDepth());
los3._visible = 0;
}
};
z1_speed = 1;
var z1_health = 60;
z1_move = 1;
zomb1.onEnterFrame = function () {
if (z1_health > 0) {
var _local9 = player._x - this._x;
var _local8 = player._y - this._y;
if (this.hitTest(hitter)) {
this.hands.play();
p_health = p_health - 1;
}
var _local7 = Math.atan2(_local8, _local9);
var _local12 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local12 > z1_speed) {
tgtX = this._x + (z1_speed * Math.cos(_local7));
tgtY = this._y + (z1_speed * Math.sin(_local7));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local13 = dAngleRadian(direction, _local7);
workAngle = _local7 + (_local13 * 0.8);
var _local6 = 0;
while (_local6 < 360) {
var _local2 = -1;
while (_local2 <= 1) {
var _local3 = workAngle + (radian(_local6) * _local2);
var _local5 = this._x + (z1_speed * Math.cos(_local3));
var _local4 = this._y + (z1_speed * Math.sin(_local3));
if (walls.hitTest(_local5, _local4, true)) {
tgtX = _local5;
tgtY = _local4;
break;
}
_local2 = _local2 + 2;
}
_local6 = _local6 + 10;
}
}
var _local11 = tgtX - this._x;
var _local10 = tgtY - this._y;
direction = Math.atan2(_local10, _local11);
var _local13 = dAngleDegree((direction * 180) / Math.PI, this._rotation);
this._rotation = this._rotation + (_local13 * 0.2);
if (z1_move) {
this._x = tgtX;
this._y = tgtY;
this.legs.play();
}
}
} else {
placeDeath(this._x, this._y, this.getDepth());
}
};
z2_speed = 1.5;
var z2_health = 60;
z2_move = 1;
zomb2.onEnterFrame = function () {
if (z2_health > 0) {
var _local9 = player._x - this._x;
var _local8 = player._y - this._y;
if (this.hitTest(hitter)) {
this.hands.play();
p_health = p_health - 1;
}
var _local7 = Math.atan2(_local8, _local9);
var _local12 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local12 > z2_speed) {
tgtX = this._x + (z2_speed * Math.cos(_local7));
tgtY = this._y + (z2_speed * Math.sin(_local7));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local13 = dAngleRadian(direction, _local7);
workAngle = _local7 + (_local13 * 0.8);
var _local6 = 0;
while (_local6 < 360) {
var _local2 = -1;
while (_local2 <= 1) {
var _local3 = workAngle + (radian(_local6) * _local2);
var _local5 = this._x + (z2_speed * Math.cos(_local3));
var _local4 = this._y + (z2_speed * Math.sin(_local3));
if (walls.hitTest(_local5, _local4, true)) {
tgtX = _local5;
tgtY = _local4;
break;
}
_local2 = _local2 + 2;
}
_local6 = _local6 + 10;
}
}
var _local11 = tgtX - this._x;
var _local10 = tgtY - this._y;
direction = Math.atan2(_local10, _local11);
var _local13 = dAngleDegree((direction * 180) / Math.PI, this._rotation);
this._rotation = this._rotation + (_local13 * 0.2);
if (z2_move) {
this._x = tgtX;
this._y = tgtY;
this.legs.play();
}
}
} else {
placeDeath(this._x, this._y, this.getDepth());
}
};
z3_speed = 1.1;
var z3_health = 60;
z3_move = 1;
zomb3.onEnterFrame = function () {
if (z3_health > 0) {
var _local9 = player._x - this._x;
var _local8 = player._y - this._y;
if (this.hitTest(hitter)) {
this.hands.play();
p_health = p_health - 1;
}
var _local7 = Math.atan2(_local8, _local9);
var _local12 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local12 > z3_speed) {
tgtX = this._x + (z3_speed * Math.cos(_local7));
tgtY = this._y + (z3_speed * Math.sin(_local7));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local13 = dAngleRadian(direction, _local7);
workAngle = _local7 + (_local13 * 0.8);
var _local6 = 0;
while (_local6 < 360) {
var _local2 = -1;
while (_local2 <= 1) {
var _local3 = workAngle + (radian(_local6) * _local2);
var _local5 = this._x + (z1_speed * Math.cos(_local3));
var _local4 = this._y + (z1_speed * Math.sin(_local3));
if (walls.hitTest(_local5, _local4, true)) {
tgtX = _local5;
tgtY = _local4;
break;
}
_local2 = _local2 + 2;
}
_local6 = _local6 + 10;
}
}
var _local11 = tgtX - this._x;
var _local10 = tgtY - this._y;
direction = Math.atan2(_local10, _local11);
var _local13 = dAngleDegree((direction * 180) / Math.PI, this._rotation);
this._rotation = this._rotation + (_local13 * 0.2);
if (z3_move) {
this._x = tgtX;
this._y = tgtY;
this.legs.play();
}
}
} else {
placeDeath(this._x, this._y, this.getDepth());
}
};
vrag1.onRollOver = function () {
los1._visible = 1;
};
vrag1.onRollOut = function () {
los1._visible = 0;
};
vrag1.onReleaseOutside = function () {
los1._visible = 0;
};
vrag3.onRollOver = function () {
los3._visible = 1;
};
vrag3.onRollOut = function () {
los3._visible = 0;
};
vrag3.onReleaseOutside = function () {
los3._visible = 0;
};
Instance of Symbol 496 MovieClip in Frame 240
onClipEvent (enterFrame) {
this._x = player._x;
this._y = player._y;
}
Instance of Symbol 197 MovieClip in Frame 240
on (keyPress "<?#19>") {
_root.gotoAndPlay("inchange");
defeat.Key.removeListener(keyListener);
Key.removeListener(keyListener);
Key.removeListener(defeat.keyListener);
victory.Key.removeListener(keyListener2);
Key.removeListener(victory.keyListener2);
Key.removeListener(keyListener2);
}
Instance of Symbol 530 MovieClip in Frame 240
onClipEvent (load) {
startDrag (this, true);
Mouse.hide();
}
onClipEvent (enterFrame) {
Mouse.hide();
}
Frame 242
stopAllSounds();
my_sound2.start();
my_sound2.onSoundComplete = function () {
my_sound2.start();
};
function placeBoom(x, y) {
levv++;
var _local1 = boom.duplicateMovieClip("bdoom" + levv, levv);
_local1._x = x;
_local1._y = y;
}
function placeBlood(x, y, rotation) {
leb++;
var _local1 = blood.duplicateMovieClip("blood" + leb, leb);
_local1._x = x;
_local1._y = y;
_local1._rotation = rotation;
}
function placeDeath(x, y, gloob) {
det++;
var _local1 = death.duplicateMovieClip("blood" + det, gloob);
_local1._x = x;
_local1._y = y;
_local1._rotation = rotation;
deathsound.start();
}
function dAngleRadian(a1, a2) {
var _local1 = a1 - a2;
if (_local1 > Math.PI) {
_local1 = -6.28318530717959 + _local1;
} else if (_local1 < -3.14159265358979) {
_local1 = (Math.PI*2) + _local1;
}
return(_local1);
}
function dAngleDegree(a1, a2) {
var _local1 = a1 - a2;
if (_local1 > 180) {
_local1 = -360 + _local1;
} else if (_local1 < -180) {
_local1 = 360 + _local1;
}
return(_local1);
}
function degree(a) {
return((a / Math.PI) * 180);
}
function radian(a) {
return((a / 180) * Math.PI);
}
var suckmygun = 0;
_root.firebtn.onPress = function () {
suckmygun = 1;
};
_root.firebtn.onRelease = function () {
suckmygun = 0;
};
_root.firebtn.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag1.onPress = function () {
suckmygun = 1;
};
_root.vrag1.onRelease = function () {
suckmygun = 0;
};
_root.vrag1.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag2.onPress = function () {
suckmygun = 1;
};
_root.vrag2.onRelease = function () {
suckmygun = 0;
};
_root.vrag2.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag3.onPress = function () {
suckmygun = 1;
};
_root.vrag3.onRelease = function () {
suckmygun = 0;
};
_root.vrag3.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag4.onPress = function () {
suckmygun = 1;
};
_root.vrag4.onRelease = function () {
suckmygun = 0;
};
_root.vrag4.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag5.onPress = function () {
suckmygun = 1;
};
_root.vrag5.onRelease = function () {
suckmygun = 0;
};
_root.vrag5.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag10.onPress = function () {
suckmygun = 1;
};
_root.vrag10.onRelease = function () {
suckmygun = 0;
};
_root.vrag10.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag11.onPress = function () {
suckmygun = 1;
};
_root.vrag11.onRelease = function () {
suckmygun = 0;
};
_root.vrag11.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag12.onPress = function () {
suckmygun = 1;
};
_root.vrag12.onRelease = function () {
suckmygun = 0;
};
_root.vrag12.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag14.onPress = function () {
suckmygun = 1;
};
_root.vrag14.onRelease = function () {
suckmygun = 0;
};
_root.vrag14.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb1.onPress = function () {
suckmygun = 1;
};
_root.zomb1.onRelease = function () {
suckmygun = 0;
};
_root.zomb1.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb2.onPress = function () {
suckmygun = 1;
};
_root.zomb2.onRelease = function () {
suckmygun = 0;
};
_root.zomb2.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb3.onPress = function () {
suckmygun = 1;
};
_root.zomb3.onRelease = function () {
suckmygun = 0;
};
_root.zomb3.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb4.onPress = function () {
suckmygun = 1;
};
_root.zomb4.onRelease = function () {
suckmygun = 0;
};
_root.zomb4.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb5.onPress = function () {
suckmygun = 1;
};
_root.zomb5.onRelease = function () {
suckmygun = 0;
};
_root.zomb5.onReleaseOutside = function () {
suckmygun = 0;
};
stop();
rad1._visible = 0;
rad2._visible = 0;
rad3._visible = 0;
rad4._visible = 0;
_global.deton = 0;
var p_speed = 4;
var rotToMouseSpeed = 12;
var bS1 = 20;
var bS2 = 18;
var bS3 = 22;
var bS4 = 15;
var grenSpeed = 15;
var megapow;
var p_health = 100;
_global.current_w = 1;
_global.ammo1 = 12;
_global.ammo2 = 3;
_global.ammo3 = 0;
_global.ammo4 = 0;
_global.ammog = 1;
var w1_ok = 1;
var w2_ok = 1;
var w3_ok = 0;
var w4_ok = 0;
gkey1._visible = 0;
los10._visible = 0;
_global.selected_w;
var xpluz = 0;
var ypluz = 0;
var bulletSpeed;
if (w1_ok) {
gui_weap.weap_none1._visible = 0;
}
if (w2_ok) {
gui_weap.weap_none2._visible = 0;
}
if (w3_ok) {
gui_weap.weap_none3._visible = 0;
}
if (w4_ok) {
gui_weap.weap_none4._visible = 0;
}
gui_weap.sel_light.gotoAndStop(_global.current_w + 1);
player.hands._visible = 0;
player.hands1._visible = 0;
player.hands2._visible = 0;
player.hands3._visible = 0;
player.hands4._visible = 0;
player.handsg._visible = 0;
switch (current_w) {
case 0 :
player.hands._visible = 1;
break;
case 1 :
player.hands1._visible = 1;
bulletSpeed = bS1;
break;
case 2 :
player.hands2._visible = 1;
bulletSpeed = bS2;
break;
case 3 :
player.hands3._visible = 1;
bulletSpeed = bS3;
break;
case 4 :
player.hands4._visible = 1;
bulletSpeed = bS4;
}
defeat.gotoAndStop(1);
victory.gotoAndStop(1);
player.onEnterFrame = function () {
if (hitter.hitTest(powerup)) {
megapow = 550;
} else {
megapow = 8;
}
if (hitter.hitTest(hit)) {
anom.play();
}
if (p_health < 1) {
health_t.text = 0;
if (player._currentframe == 1) {
player.play();
player._name = "gsom";
defeat.play();
}
} else {
if (hitter.hitTest(finish)) {
player._name = "gsom";
hitter._name = "gsom2";
victory.play();
var _local5 = SharedObject.getLocal("numlevs");
if (_local5.data.num < 4) {
_local5.data.num = 4;
_local5.flush();
}
}
if (hitter.hitTest(jad)) {
p_health = p_health - 21;
}
if (hitter.hitTest(jad1)) {
p_health = p_health - 32;
}
if (hitter.hitTest(jad2)) {
p_health = p_health - 11;
}
if (hitter.hitTest(jad3)) {
p_health = p_health - 27;
}
if (hitter.hitTest(jad4)) {
p_health = p_health - 100;
}
if (_global.deton) {
var _local12 = jad._x - player._x;
var _local10 = jad._y - player._y;
var _local19 = Math.sqrt((_local12 * _local12) + (_local10 * _local10));
var _local8 = jad1._x - player._x;
var _local6 = jad1._y - player._y;
var _local15 = Math.sqrt((_local8 * _local8) + (_local6 * _local6));
var _local7 = jad2._x - player._x;
var _local13 = jad2._y - player._y;
var _local20 = Math.sqrt((_local7 * _local7) + (_local13 * _local13));
var _local14 = jad3._x - player._x;
var _local11 = jad3._y - player._y;
var _local21 = Math.sqrt((_local14 * _local14) + (_local11 * _local11));
var _local18 = Math.min(_local19, _local20);
var _local17 = Math.min(_local21, _local15);
var _local16 = Math.min(_local17, _local18);
jadv = (100 - _local16) + 10;
_root.raddet.dettt._width = jadv;
}
if (radd._currentframe == 1) {
if (Key.isDown(81)) {
radd.play();
if (_global.deton == 1) {
_global.deton = 0;
_root.raddet.dettt._width = 0;
_root.raddet.gotoAndStop(1);
p_speed = p_speed * 2;
rad1._visible = 0;
rad2._visible = 0;
rad3._visible = 0;
rad4._visible = 0;
} else {
_global.deton = 1;
_root.raddet.gotoAndStop(2);
p_speed = p_speed / 2;
rad1._visible = 1;
rad2._visible = 1;
rad3._visible = 1;
rad4._visible = 1;
}
}
}
grens.text = _global.ammog;
switch (_global.current_w) {
case 0 :
ammo_cur.text = "0";
break;
case 1 :
ammo_cur.text = _global.ammo1;
break;
case 2 :
ammo_cur.text = _global.ammo2;
break;
case 3 :
ammo_cur.text = _global.ammo3;
break;
case 4 :
ammo_cur.text = _global.ammo4;
}
health_t.text = p_health;
switch (Key.isDown(87) - Key.isDown(83)) {
case 1 :
ypluz = -10;
break;
case -1 :
ypluz = 10;
break;
default :
ypluz = 0;
}
switch (Key.isDown(68) - Key.isDown(65)) {
case 1 :
xpluz = 10;
break;
case -1 :
xpluz = -10;
break;
default :
xpluz = 0;
}
delta_x = _xmouse - player._x;
delta_y = _ymouse - player._y;
mAngle = Math.atan2(delta_y, delta_x);
mAngleD = (mAngle / Math.PI) * 180;
dAngleD = player._rotation - mAngleD;
if (dAngleD > 180) {
dAngleD = -360 + dAngleD;
} else if (dAngleD < -180) {
dAngleD = 360 + dAngleD;
}
if (Math.abs(dAngleD) < rotToMouseSpeed) {
player._rotation = player._rotation - dAngleD;
} else if (dAngleD > 0) {
player._rotation = player._rotation - rotToMouseSpeed;
} else {
player._rotation = player._rotation + rotToMouseSpeed;
}
_root.hitter._x = _root.player._x + xpluz;
_root.hitter._y = _root.player._y;
_root.hittery._x = _root.player._x;
_root.hittery._y = _root.player._y + ypluz;
_root.hitter._rotation = _root.player._rotation;
var _local4 = hitter._x - player._x;
var _local3 = hittery._y - player._y;
var _local9 = Math.atan2(_local3, _local4);
var _local22 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if (_local22 > p_speed) {
tgtX = player._x + (p_speed * Math.cos(_local9));
tgtY = player._y + (p_speed * Math.sin(_local9));
if (walls.hitTest(hitter._x, hitter._y, true)) {
player._x = tgtX;
player.legs.play();
}
if (walls.hitTest(hittery._x, hittery._y, true)) {
player._y = tgtY;
player.legs.play();
}
}
if ((change._currentFrame == 1) && (gren._currentFrame == 1)) {
if (w1_ok) {
if (Key.isDown(49) && (_global.current_w != 1)) {
_global.selected_w = 1;
bulletSpeed = bS1;
change.gotoAndPlay(1);
}
}
if (w2_ok) {
if (Key.isDown(50) && (_global.current_w != 2)) {
_global.selected_w = 2;
bulletSpeed = bS2;
change.gotoAndPlay(1);
}
}
if (w3_ok) {
if (Key.isDown(51) && (_global.current_w != 3)) {
_global.selected_w = 3;
bulletSpeed = bS3;
change.gotoAndPlay(1);
}
}
if (w4_ok) {
if (Key.isDown(52) && (_global.current_w != 4)) {
_global.selected_w = 4;
bulletSpeed = bS4;
change.gotoAndPlay(1);
}
}
}
if (suckmygun == 1) {
if (!exit.hitTest(_xmouse, _ymouse, true)) {
switch (_global.current_w) {
case 1 :
if (_global.ammo1 > 0) {
if ((player.hands1._currentframe == 8) || (player.hands1._currentframe == 10)) {
player.hands1.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
break;
case 2 :
if (_global.ammo2 > 0) {
if ((player.hands2._currentframe == 7) || (player.hands2._currentframe == 13)) {
player.hands2.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
break;
case 3 :
if (_global.ammo3 > 0) {
if ((player.hands3._currentframe == 7) || (player.hands3._currentframe == 9)) {
player.hands3.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
break;
case 4 :
if (_global.ammo4 > 0) {
if ((player.hands4._currentframe == 7) || (player.hands4._currentframe == 9)) {
player.hands4.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
}
}
}
if (Key.isDown(71)) {
if (_global.ammog > 0) {
if (_root.gren._currentFrame == 1) {
_root.gren.gotoAndPlay(1);
}
}
}
}
};
var lev = 0;
placeBullet = function (tgt) {
lev++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("b" + lev, lev);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((player._rotation + tgt._rotation) - 90) + random(3);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(vrag10.hitter)) {
v10_health = v10_health - megapow;
v10_spotted = 1;
this.removeMovieClip();
placeBlood(vrag10._x, vrag10._y, vrag10._rotation - 180);
}
if (this.hitTest(los10)) {
v10_spotted = 1;
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var leve = 0;
placeE10Bullet = function (tgt) {
leve++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve, leve);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = (vrag10._rotation + tgt._rotation) - 93;
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 100;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var led = 0;
placeGren = function (tr) {
led++;
var _local3 = {x:tr._x, y:tr._y, rotation:tr._rotation};
tr._parent.localToGlobal(_local3);
globalToLocal(_local3);
var d = grena.duplicateMovieClip("b" + led, led);
d._x = _local3.x;
d._y = _local3.y;
d._rotation = player._rotation;
d.a = (d._rotation / 180) * Math.PI;
d.clickSpot_x = _root._xmouse;
d.clickSpot_y = _root._ymouse;
d.onEnterFrame = function () {
gotoSpotX = d.clickSpot_x;
gotoSpotY = d.clickSpot_y;
delta_x = this._x - gotoSpotX;
delta_y = this._y - gotoSpotY;
if (Math.sqrt((delta_x * delta_x) + (delta_y * delta_y)) > grenSpeed) {
this._x = this._x + (grenSpeed * Math.cos(this.a));
this._y = this._y + (grenSpeed * Math.sin(this.a));
this._rotation = this._rotation - 10;
} else {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
};
};
boom._visible = false;
var levv = 0;
blood._visible = false;
var leb = 0;
death._visible = false;
var det = 0;
v10_speed = 4;
var v10_spotted = 0;
var v10_health = 500;
_global.v10_move = 0;
vrag10.onEnterFrame = function () {
if (v10_health > 0) {
los10._x = vrag10._x;
los10._y = vrag10._y;
los10._rotation = vrag10._rotation;
if (los10.hitTest(hitter)) {
v10_spotted = 1;
}
if (los10.thin.hitTest(hitter)) {
vrag10.hands.play();
}
if (v10_spotted == 1) {
var _local8 = player._x - vrag10._x;
var _local7 = player._y - vrag10._y;
}
var _local6 = Math.atan2(_local7, _local8);
var _local11 = Math.sqrt((_local8 * _local8) + (_local7 * _local7));
if (_local11 > v10_speed) {
tgtX = vrag10._x + (v10_speed * Math.cos(_local6));
tgtY = vrag10._y + (v10_speed * Math.sin(_local6));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local12 = dAngleRadian(direction, _local6);
workAngle = _local6 + (_local12 * 0.8);
var _local5 = 0;
while (_local5 < 360) {
var _local1 = -1;
while (_local1 <= 1) {
var _local2 = workAngle + (radian(_local5) * _local1);
var _local4 = vrag10._x + (v10_speed * Math.cos(_local2));
var _local3 = vrag10._y + (v10_speed * Math.sin(_local2));
if (walls.hitTest(_local4, _local3, true)) {
tgtX = _local4;
tgtY = _local3;
break;
}
_local1 = _local1 + 2;
}
_local5 = _local5 + 10;
}
}
var _local10 = tgtX - vrag10._x;
var _local9 = tgtY - vrag10._y;
direction = Math.atan2(_local9, _local10);
var _local12 = dAngleDegree((direction * 180) / Math.PI, vrag10._rotation);
vrag10._rotation = vrag10._rotation + (_local12 * 0.2);
}
} else {
placeDeath(vrag10._x, vrag10._y, vrag10.getDepth());
los10._visible = 0;
}
};
vrag10.onRollOver = function () {
los10._visible = 1;
};
vrag10.onRollOut = function () {
los10._visible = 0;
};
vrag10.onReleaseOutside = function () {
los10._visible = 0;
};
Instance of Symbol 496 MovieClip in Frame 242
onClipEvent (enterFrame) {
this._x = player._x;
this._y = player._y;
}
Instance of Symbol 197 MovieClip in Frame 242
on (keyPress "<?#19>") {
_root.gotoAndPlay("inchange");
defeat.Key.removeListener(keyListener);
Key.removeListener(keyListener);
Key.removeListener(defeat.keyListener);
victory.Key.removeListener(keyListener2);
Key.removeListener(victory.keyListener2);
Key.removeListener(keyListener2);
}
Instance of Symbol 530 MovieClip in Frame 242
onClipEvent (load) {
startDrag (this, true);
Mouse.hide();
}
onClipEvent (enterFrame) {
Mouse.hide();
}
Frame 244
stopAllSounds();
my_sound2.start();
my_sound2.onSoundComplete = function () {
my_sound2.start();
};
function placeBoom(x, y) {
levv++;
var _local1 = boom.duplicateMovieClip("bdoom" + levv, levv);
_local1._x = x;
_local1._y = y;
}
function placeBadaboom(x, y) {
levvv++;
var _local1 = badaboom.duplicateMovieClip("badadoom" + levvv, levvv);
_local1._x = x;
_local1._y = y;
if (_local1.hitTest(player.hitter)) {
difx = _local1._x - player._x;
dify = _local1._y - player._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
p_health = p_health - (120 - diff);
}
if (_local1.hitTest(vrag1.hitter)) {
difx = _local1._x - vrag1._x;
dify = _local1._y - vrag1._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
v1_health = v1_health - (180 - diff);
}
if (_local1.hitTest(vrag2.hitter)) {
difx = _local1._x - vrag2._x;
dify = _local1._y - vrag2._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
v2_health = v2_health - (180 - diff);
}
if (_local1.hitTest(los1) || (_local1.hitTest(los2))) {
v1_spotted = 1;
v2_spotted = 1;
}
}
function placeBlood(x, y, rotation) {
leb++;
var _local1 = blood.duplicateMovieClip("blood" + leb, leb);
_local1._x = x;
_local1._y = y;
_local1._rotation = rotation;
}
function placeDeath(x, y, gloob) {
det++;
var _local1 = death.duplicateMovieClip("blood" + det, gloob);
_local1._x = x;
_local1._y = y;
_local1._rotation = rotation;
deathsound.start();
}
function dAngleRadian(a1, a2) {
var _local1 = a1 - a2;
if (_local1 > Math.PI) {
_local1 = -6.28318530717959 + _local1;
} else if (_local1 < -3.14159265358979) {
_local1 = (Math.PI*2) + _local1;
}
return(_local1);
}
function dAngleDegree(a1, a2) {
var _local1 = a1 - a2;
if (_local1 > 180) {
_local1 = -360 + _local1;
} else if (_local1 < -180) {
_local1 = 360 + _local1;
}
return(_local1);
}
function degree(a) {
return((a / Math.PI) * 180);
}
function radian(a) {
return((a / 180) * Math.PI);
}
var suckmygun = 0;
_root.firebtn.onPress = function () {
suckmygun = 1;
};
_root.firebtn.onRelease = function () {
suckmygun = 0;
};
_root.firebtn.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag1.onPress = function () {
suckmygun = 1;
};
_root.vrag1.onRelease = function () {
suckmygun = 0;
};
_root.vrag1.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag2.onPress = function () {
suckmygun = 1;
};
_root.vrag2.onRelease = function () {
suckmygun = 0;
};
_root.vrag2.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag3.onPress = function () {
suckmygun = 1;
};
_root.vrag3.onRelease = function () {
suckmygun = 0;
};
_root.vrag3.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag4.onPress = function () {
suckmygun = 1;
};
_root.vrag4.onRelease = function () {
suckmygun = 0;
};
_root.vrag4.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag5.onPress = function () {
suckmygun = 1;
};
_root.vrag5.onRelease = function () {
suckmygun = 0;
};
_root.vrag5.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag10.onPress = function () {
suckmygun = 1;
};
_root.vrag10.onRelease = function () {
suckmygun = 0;
};
_root.vrag10.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag11.onPress = function () {
suckmygun = 1;
};
_root.vrag11.onRelease = function () {
suckmygun = 0;
};
_root.vrag11.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag12.onPress = function () {
suckmygun = 1;
};
_root.vrag12.onRelease = function () {
suckmygun = 0;
};
_root.vrag12.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag14.onPress = function () {
suckmygun = 1;
};
_root.vrag14.onRelease = function () {
suckmygun = 0;
};
_root.vrag14.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb1.onPress = function () {
suckmygun = 1;
};
_root.zomb1.onRelease = function () {
suckmygun = 0;
};
_root.zomb1.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb2.onPress = function () {
suckmygun = 1;
};
_root.zomb2.onRelease = function () {
suckmygun = 0;
};
_root.zomb2.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb3.onPress = function () {
suckmygun = 1;
};
_root.zomb3.onRelease = function () {
suckmygun = 0;
};
_root.zomb3.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb4.onPress = function () {
suckmygun = 1;
};
_root.zomb4.onRelease = function () {
suckmygun = 0;
};
_root.zomb4.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb5.onPress = function () {
suckmygun = 1;
};
_root.zomb5.onRelease = function () {
suckmygun = 0;
};
_root.zomb5.onReleaseOutside = function () {
suckmygun = 0;
};
stop();
_global.deton = 0;
pick1._visible = 0;
pick3._visible = 0;
var p_speed = 4;
var rotToMouseSpeed = 12;
var bS1 = 20;
var bS2 = 18;
var bS3 = 22;
var bS4 = 15;
var grenSpeed = 15;
var p_health = 100;
_global.current_w = 2;
_global.deton = 0;
var vkey1 = 0;
gkey1._visible = 0;
_global.ammo1 = 36;
_global.ammo2 = 50;
_global.ammo3 = 0;
_global.ammo4 = 0;
_global.ammog = 1;
var w1_ok = 1;
var w2_ok = 1;
var w3_ok = 0;
var w4_ok = 0;
los1._visible = 0;
los2._visible = 0;
_global.selected_w;
var xpluz = 0;
var ypluz = 0;
var bulletSpeed;
if (w1_ok) {
gui_weap.weap_none1._visible = 0;
}
if (w2_ok) {
gui_weap.weap_none2._visible = 0;
}
if (w3_ok) {
gui_weap.weap_none3._visible = 0;
}
if (w4_ok) {
gui_weap.weap_none4._visible = 0;
}
gui_weap.sel_light.gotoAndStop(_global.current_w + 1);
player.hands._visible = 0;
player.hands1._visible = 0;
player.hands2._visible = 0;
player.hands3._visible = 0;
player.hands4._visible = 0;
player.handsg._visible = 0;
switch (current_w) {
case 0 :
player.hands._visible = 1;
break;
case 1 :
player.hands1._visible = 1;
bulletSpeed = bS1;
break;
case 2 :
player.hands2._visible = 1;
bulletSpeed = bS2;
break;
case 3 :
player.hands3._visible = 1;
bulletSpeed = bS3;
break;
case 4 :
player.hands4._visible = 1;
bulletSpeed = bS4;
}
defeat.gotoAndStop(1);
victory.gotoAndStop(1);
player.onEnterFrame = function () {
if (p_health < 1) {
health_t.text = 0;
if (player._currentframe == 1) {
player.play();
player._name = "gsom";
defeat.play();
}
} else {
if (shotgun._currentframe == 1) {
if (hitter.hitTest(shotgun)) {
shotgun.hitter._visible = 1;
pick1._visible = 1;
if (Key.isDown(32)) {
shotgun.play();
_global.ammo2 = _global.ammo2 + 12;
ammo2picked.play();
pick1._visible = 0;
}
} else {
shotgun.hitter._visible = 0;
pick1._visible = 0;
}
}
if (shotgun2._currentframe == 1) {
if (hitter.hitTest(shotgun2)) {
shotgun2.hitter._visible = 1;
pick3._visible = 1;
if (Key.isDown(32)) {
shotgun2.play();
_global.ammo2 = _global.ammo2 + 12;
ammo2picked.play();
pick3._visible = 0;
}
} else {
shotgun2.hitter._visible = 0;
pick3._visible = 0;
}
}
if (door1._currentframe == 1) {
if (hitter.hitTest(door1)) {
door1.hitter._visible = 1;
if (Key.isDown(32)) {
door1.play();
walls.door1.play();
bwalls.door1.play();
}
} else {
door1.hitter._visible = 0;
}
}
if (pult1._currentframe == 1) {
if (hitter.hitTest(pult1)) {
pult1.hitter._visible = 1;
if (Key.isDown(32)) {
if (vkey1) {
pult1.play();
walls.gate1.play();
gate1.play();
} else {
needkey.play();
}
}
} else {
pult1.hitter._visible = 0;
}
}
if (key1._currentframe == 1) {
if (hitter.hitTest(key1)) {
key1.hitter._visible = 1;
if (Key.isDown(32)) {
key1.play();
keypicked.play();
vkey1 = 1;
gkey1._visible = 1;
}
} else {
key1.hitter._visible = 0;
}
}
var _local8 = vrag2._x - player._x;
var _local7 = vrag2._y - player._y;
var _local6 = Math.sqrt((_local8 * _local8) + (_local7 * _local7));
jadv = (100 - _local6) + 10;
if (_local6 < 150) {
p_health = p_health - Math.round(jadv / 88);
}
if (_global.deton) {
_root.raddet.dettt._width = jadv;
}
if (radd._currentframe == 1) {
if (Key.isDown(81)) {
radd.play();
if (_global.deton == 1) {
_global.deton = 0;
_root.raddet.dettt._width = 0;
_root.raddet.gotoAndStop(1);
p_speed = p_speed * 2;
} else {
_global.deton = 1;
_root.raddet.gotoAndStop(2);
p_speed = p_speed / 2;
}
}
}
grens.text = _global.ammog;
switch (_global.current_w) {
case 0 :
ammo_cur.text = "0";
break;
case 1 :
ammo_cur.text = _global.ammo1;
break;
case 2 :
ammo_cur.text = _global.ammo2;
break;
case 3 :
ammo_cur.text = _global.ammo3;
break;
case 4 :
ammo_cur.text = _global.ammo4;
}
health_t.text = p_health;
switch (Key.isDown(87) - Key.isDown(83)) {
case 1 :
ypluz = -10;
break;
case -1 :
ypluz = 10;
break;
default :
ypluz = 0;
}
switch (Key.isDown(68) - Key.isDown(65)) {
case 1 :
xpluz = 10;
break;
case -1 :
xpluz = -10;
break;
default :
xpluz = 0;
}
delta_x = _xmouse - player._x;
delta_y = _ymouse - player._y;
mAngle = Math.atan2(delta_y, delta_x);
mAngleD = (mAngle / Math.PI) * 180;
dAngleD = player._rotation - mAngleD;
if (dAngleD > 180) {
dAngleD = -360 + dAngleD;
} else if (dAngleD < -180) {
dAngleD = 360 + dAngleD;
}
if (Math.abs(dAngleD) < rotToMouseSpeed) {
player._rotation = player._rotation - dAngleD;
} else if (dAngleD > 0) {
player._rotation = player._rotation - rotToMouseSpeed;
} else {
player._rotation = player._rotation + rotToMouseSpeed;
}
_root.hitter._x = _root.player._x + xpluz;
_root.hitter._y = _root.player._y;
_root.hittery._x = _root.player._x;
_root.hittery._y = _root.player._y + ypluz;
_root.hitter._rotation = _root.player._rotation;
var _local4 = hitter._x - player._x;
var _local3 = hittery._y - player._y;
var _local5 = Math.atan2(_local3, _local4);
var _local9 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if (_local9 > p_speed) {
tgtX = player._x + (p_speed * Math.cos(_local5));
tgtY = player._y + (p_speed * Math.sin(_local5));
if (walls.hitTest(hitter._x, hitter._y, true)) {
player._x = tgtX;
player.legs.play();
}
if (walls.hitTest(hittery._x, hittery._y, true)) {
player._y = tgtY;
player.legs.play();
}
}
if ((change._currentFrame == 1) && (gren._currentFrame == 1)) {
if (w1_ok) {
if (Key.isDown(49) && (_global.current_w != 1)) {
_global.selected_w = 1;
bulletSpeed = bS1;
change.gotoAndPlay(1);
}
}
if (w2_ok) {
if (Key.isDown(50) && (_global.current_w != 2)) {
_global.selected_w = 2;
bulletSpeed = bS2;
change.gotoAndPlay(1);
}
}
if (w3_ok) {
if (Key.isDown(51) && (_global.current_w != 3)) {
_global.selected_w = 3;
bulletSpeed = bS3;
change.gotoAndPlay(1);
}
}
if (w4_ok) {
if (Key.isDown(52) && (_global.current_w != 4)) {
_global.selected_w = 4;
bulletSpeed = bS4;
change.gotoAndPlay(1);
}
}
}
if (suckmygun == 1) {
if (!exit.hitTest(_xmouse, _ymouse, true)) {
switch (_global.current_w) {
case 1 :
if (_global.ammo1 > 0) {
if ((player.hands1._currentframe == 8) || (player.hands1._currentframe == 10)) {
player.hands1.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
break;
case 2 :
if (_global.ammo2 > 0) {
if ((player.hands2._currentframe == 7) || (player.hands2._currentframe == 13)) {
player.hands2.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
break;
case 3 :
if (_global.ammo3 > 0) {
if ((player.hands3._currentframe == 7) || (player.hands3._currentframe == 9)) {
player.hands3.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
break;
case 4 :
if (_global.ammo4 > 0) {
if ((player.hands4._currentframe == 7) || (player.hands4._currentframe == 9)) {
player.hands4.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
}
}
}
if (Key.isDown(71)) {
if (_global.ammog > 0) {
if (_root.gren._currentFrame == 1) {
_root.gren.gotoAndPlay(1);
}
}
}
}
};
var lev = 0;
placeBullet = function (tgt) {
lev++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("b" + lev, lev);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((player._rotation + tgt._rotation) - 90) + random(3);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(vrag1.hitter)) {
v1_health = v1_health - 8;
v1_spotted = 1;
this.removeMovieClip();
placeBlood(vrag1._x, vrag1._y, vrag1._rotation - 180);
}
if (this.hitTest(vrag2.hitter)) {
v2_health = v2_health - 8;
v2_spotted = 1;
this.removeMovieClip();
placeBlood(vrag2._x, vrag2._y, vrag2._rotation - 180);
}
if (this.hitTest(los1)) {
v1_spotted = 1;
}
if (this.hitTest(los2)) {
v2_spotted = 1;
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var leve = 0;
placeEBullet = function (tgt) {
leve++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve, leve);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((vrag1._rotation + tgt._rotation) - 93) + random(5);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 8;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var leve2 = 0;
placeE2Bullet = function (tgt) {
leve2++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve2, leve2);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((vrag2._rotation + tgt._rotation) - 93) + random(5);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 8;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var led = 0;
placeGren = function (tr) {
led++;
var _local3 = {x:tr._x, y:tr._y, rotation:tr._rotation};
tr._parent.localToGlobal(_local3);
globalToLocal(_local3);
var d = grena.duplicateMovieClip("b" + led, led);
d._x = _local3.x;
d._y = _local3.y;
d._rotation = player._rotation;
d.a = (d._rotation / 180) * Math.PI;
d.clickSpot_x = _root._xmouse;
d.clickSpot_y = _root._ymouse;
d.onEnterFrame = function () {
gotoSpotX = d.clickSpot_x;
gotoSpotY = d.clickSpot_y;
delta_x = this._x - gotoSpotX;
delta_y = this._y - gotoSpotY;
if (Math.sqrt((delta_x * delta_x) + (delta_y * delta_y)) > grenSpeed) {
this._x = this._x + (grenSpeed * Math.cos(this.a));
this._y = this._y + (grenSpeed * Math.sin(this.a));
this._rotation = this._rotation - 10;
} else {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
};
};
boom._visible = false;
var levv = 0;
badaboom._visible = false;
var levvv = 0;
blood._visible = false;
var leb = 0;
death._visible = false;
var det = 0;
radlight.onEnterFrame = function () {
var _local4 = radlight._x - player._x;
var _local3 = radlight._y - player._y;
var _local2 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
_global.hrrr = 100 - _local2;
if (_local2 < 150) {
radlight.alpha = _local2 - 50;
} else {
radlight.alpha = 100;
}
};
v2_speed = 3;
var v2_spotted = 1;
var v2_health = 1500;
_global.v2_move = 1;
vrag2.onEnterFrame = function () {
if (v2_health < 760) {
bh.play();
}
if (v2_health > 0) {
los2._x = vrag2._x;
los2._y = vrag2._y;
los2._rotation = vrag2._rotation;
if (los2.hitTest(hitter)) {
v2_spotted = 1;
beh2.play();
} else {
beh2.gotoAndPlay("halt");
}
if (v2_spotted == 1) {
var _local9 = player._x - vrag2._x;
var _local8 = player._y - vrag2._y;
}
var _local7 = Math.atan2(_local8, _local9);
var _local13 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local13 > v2_speed) {
tgtX = vrag2._x + (v2_speed * Math.cos(_local7));
tgtY = vrag2._y + (v2_speed * Math.sin(_local7));
if (!walls2.hitTest(tgtX, tgtY, true)) {
var _local14 = dAngleRadian(direction, _local7);
workAngle = _local7 + (_local14 * 0.8);
var _local6 = 0;
while (_local6 < 360) {
var _local2 = -1;
while (_local2 <= 1) {
var _local3 = workAngle + (radian(_local6) * _local2);
var _local5 = vrag2._x + (v2_speed * Math.cos(_local3));
var _local4 = vrag2._y + (v2_speed * Math.sin(_local3));
if (walls2.hitTest(_local5, _local4, true)) {
tgtX = _local5;
tgtY = _local4;
break;
}
_local2 = _local2 + 2;
}
_local6 = _local6 + 10;
}
}
var _local12 = tgtX - vrag2._x;
var _local11 = tgtY - vrag2._y;
direction = Math.atan2(_local11, _local12);
var _local14 = dAngleDegree((direction * 180) / Math.PI, vrag2._rotation);
vrag2._rotation = vrag2._rotation + (_local14 * 0.2);
if (_global.v2_move) {
vrag2._x = tgtX;
vrag2._y = tgtY;
}
}
} else {
player._name = "gsom";
hitter._name = "gsom2";
victory.play();
var _local10 = SharedObject.getLocal("numlevs");
if (_local10.data.num < 5) {
_local10.data.num = 5;
_local10.flush();
}
placeDeath(vrag2._x, vrag2._y, vrag2.getDepth());
los2._visible = 0;
}
};
Instance of Symbol 496 MovieClip in Frame 244
onClipEvent (enterFrame) {
this._x = player._x;
this._y = player._y;
}
Instance of Symbol 197 MovieClip in Frame 244
on (keyPress "<?#19>") {
_root.gotoAndPlay("inchange");
defeat.Key.removeListener(keyListener);
Key.removeListener(keyListener);
Key.removeListener(defeat.keyListener);
victory.Key.removeListener(keyListener2);
Key.removeListener(victory.keyListener2);
Key.removeListener(keyListener2);
}
Instance of Symbol 530 MovieClip in Frame 244
onClipEvent (load) {
startDrag (this, true);
Mouse.hide();
}
onClipEvent (enterFrame) {
Mouse.hide();
}
Frame 246
stopAllSounds();
my_sound2.start();
my_sound2.onSoundComplete = function () {
my_sound2.start();
};
function placeBoom(x, y) {
levv++;
var _local1 = boom.duplicateMovieClip("bdoom" + levv, levv);
_local1._x = x;
_local1._y = y;
}
function placeBadaboom(x, y) {
levvv++;
var _local1 = badaboom.duplicateMovieClip("badadoom" + levvv, levvv);
_local1._x = x;
_local1._y = y;
if (_local1.hitTest(player.hitter)) {
difx = _local1._x - player._x;
dify = _local1._y - player._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
p_health = p_health - (120 - diff);
}
if (_local1.hitTest(vrag1.hitter)) {
difx = _local1._x - vrag1._x;
dify = _local1._y - vrag1._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
v1_health = v1_health - (180 - diff);
}
if (_local1.hitTest(vrag2.hitter)) {
difx = _local1._x - vrag2._x;
dify = _local1._y - vrag2._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
v2_health = v2_health - (180 - diff);
}
if (_local1.hitTest(los1) || (_local1.hitTest(los2))) {
v1_spotted = 1;
v2_spotted = 1;
}
}
function placeBlood(x, y, rotation) {
leb++;
var _local1 = blood.duplicateMovieClip("blood" + leb, leb);
_local1._x = x;
_local1._y = y;
_local1._rotation = rotation;
}
function placeDeath(x, y, gloob) {
det++;
var _local1 = death.duplicateMovieClip("blood" + det, gloob);
_local1._x = x;
_local1._y = y;
_local1._rotation = rotation;
deathsound.start();
}
function dAngleRadian(a1, a2) {
var _local1 = a1 - a2;
if (_local1 > Math.PI) {
_local1 = -6.28318530717959 + _local1;
} else if (_local1 < -3.14159265358979) {
_local1 = (Math.PI*2) + _local1;
}
return(_local1);
}
function dAngleDegree(a1, a2) {
var _local1 = a1 - a2;
if (_local1 > 180) {
_local1 = -360 + _local1;
} else if (_local1 < -180) {
_local1 = 360 + _local1;
}
return(_local1);
}
function degree(a) {
return((a / Math.PI) * 180);
}
function radian(a) {
return((a / 180) * Math.PI);
}
var suckmygun = 0;
_root.firebtn.onPress = function () {
suckmygun = 1;
};
_root.firebtn.onRelease = function () {
suckmygun = 0;
};
_root.firebtn.onReleaseOutside = function () {
suckmygun = 0;
};
stop();
_global.deton = 0;
pick1._visible = 0;
pick2._visible = 0;
var p_speed = 4;
var rotToMouseSpeed = 12;
var bS1 = 20;
var bS2 = 18;
var bS3 = 22;
var bS4 = 15;
var grenSpeed = 15;
var p_health = 100;
_global.current_w = 2;
var vkey1 = 0;
gkey1._visible = 0;
_global.ammo1 = 27;
_global.ammo2 = 21;
_global.ammo3 = 0;
_root.vrag1.onPress = function () {
suckmygun = 1;
};
_root.vrag1.onRelease = function () {
suckmygun = 0;
};
_root.vrag1.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag2.onPress = function () {
suckmygun = 1;
};
_root.vrag2.onRelease = function () {
suckmygun = 0;
};
_root.vrag2.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag3.onPress = function () {
suckmygun = 1;
};
_root.vrag3.onRelease = function () {
suckmygun = 0;
};
_root.vrag3.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag4.onPress = function () {
suckmygun = 1;
};
_root.vrag4.onRelease = function () {
suckmygun = 0;
};
_root.vrag4.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag5.onPress = function () {
suckmygun = 1;
};
_root.vrag5.onRelease = function () {
suckmygun = 0;
};
_root.vrag5.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag10.onPress = function () {
suckmygun = 1;
};
_root.vrag10.onRelease = function () {
suckmygun = 0;
};
_root.vrag10.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag11.onPress = function () {
suckmygun = 1;
};
_root.vrag11.onRelease = function () {
suckmygun = 0;
};
_root.vrag11.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag12.onPress = function () {
suckmygun = 1;
};
_root.vrag12.onRelease = function () {
suckmygun = 0;
};
_root.vrag12.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag14.onPress = function () {
suckmygun = 1;
};
_root.vrag14.onRelease = function () {
suckmygun = 0;
};
_root.vrag14.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb1.onPress = function () {
suckmygun = 1;
};
_root.zomb1.onRelease = function () {
suckmygun = 0;
};
_root.zomb1.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb2.onPress = function () {
suckmygun = 1;
};
_root.zomb2.onRelease = function () {
suckmygun = 0;
};
_root.zomb2.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb3.onPress = function () {
suckmygun = 1;
};
_root.zomb3.onRelease = function () {
suckmygun = 0;
};
_root.zomb3.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb4.onPress = function () {
suckmygun = 1;
};
_root.zomb4.onRelease = function () {
suckmygun = 0;
};
_root.zomb4.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb5.onPress = function () {
suckmygun = 1;
};
_root.zomb5.onRelease = function () {
suckmygun = 0;
};
_root.zomb5.onReleaseOutside = function () {
suckmygun = 0;
};
_global.ammo4 = 0;
_global.ammog = 1;
var w1_ok = 1;
var w2_ok = 2;
var w3_ok = 0;
var w4_ok = 0;
los1._visible = 0;
los2._visible = 0;
los3._visible = 0;
_global.selected_w;
var xpluz = 0;
var ypluz = 0;
var bulletSpeed;
if (w1_ok) {
gui_weap.weap_none1._visible = 0;
}
if (w2_ok) {
gui_weap.weap_none2._visible = 0;
}
if (w3_ok) {
gui_weap.weap_none3._visible = 0;
}
if (w4_ok) {
gui_weap.weap_none4._visible = 0;
}
gui_weap.sel_light.gotoAndStop(_global.current_w + 1);
player.hands._visible = 0;
player.hands1._visible = 0;
player.hands2._visible = 0;
player.hands3._visible = 0;
player.hands4._visible = 0;
player.handsg._visible = 0;
switch (current_w) {
case 0 :
player.hands._visible = 1;
break;
case 1 :
player.hands1._visible = 1;
bulletSpeed = bS1;
break;
case 2 :
player.hands2._visible = 1;
bulletSpeed = bS2;
break;
case 3 :
player.hands3._visible = 1;
bulletSpeed = bS3;
break;
case 4 :
player.hands4._visible = 1;
bulletSpeed = bS4;
}
defeat.gotoAndStop(1);
victory.gotoAndStop(1);
player.onEnterFrame = function () {
if (p_health < 1) {
health_t.text = 0;
if (player._currentframe == 1) {
player.play();
player._name = "gsom";
defeat.play();
}
} else {
if (hitter.hitTest(finish)) {
player._name = "gsom";
hitter._name = "gsom2";
victory.play();
var _local5 = SharedObject.getLocal("numlevs");
if (_local5.data.num < 6) {
_local5.data.num = 6;
_local5.flush();
}
}
if (shotgun._currentframe == 1) {
if (hitter.hitTest(shotgun)) {
shotgun.hitter._visible = 1;
if (Key.isDown(32)) {
shotgun.play();
_global.ammo2 = _global.ammo2 + 12;
ammo2picked.play();
}
} else {
shotgun.hitter._visible = 0;
}
}
if (door1._currentframe == 1) {
if (hitter.hitTest(door1)) {
door1.hitter._visible = 1;
if (Key.isDown(32)) {
door1.play();
walls.door1.play();
bwalls.door1.play();
dur1 = 1;
}
} else {
door1.hitter._visible = 0;
}
}
if (pult1._currentframe == 1) {
if (hitter.hitTest(pult1)) {
pult1.hitter._visible = 1;
pick1._visible = 1;
if (Key.isDown(32)) {
sh1._visible = 0;
compsound.start();
pult1.play();
door2.play();
door2bis.play();
walls.door2.play();
walls.door2bis.play();
bwalls.door2.play();
bwalls.door2bis.play();
dur2 = 1;
pick1._visible = 0;
}
} else {
pult1.hitter._visible = 0;
pick1._visible = 0;
}
}
if (pult2._currentframe == 1) {
if (hitter.hitTest(pult2)) {
pult2.hitter._visible = 1;
pick2._visible = 1;
if (Key.isDown(32)) {
sh2._visible = 0;
compsound.start();
pult2.play();
kran.play();
walls.kran.play();
bwalls.kran.play();
pick2._visible = 0;
}
} else {
pult2.hitter._visible = 0;
pick2._visible = 0;
}
}
if (door2._currentframe == 1) {
if (hitter.hitTest(door2)) {
door2.hitter._visible = 1;
if (Key.isDown(32)) {
locked.play();
}
} else {
door2.hitter._visible = 0;
}
}
if (door2bis._currentframe == 1) {
if (hitter.hitTest(door2bis)) {
door2bis.hitter._visible = 1;
if (Key.isDown(32)) {
locked.play;
}
} else {
door2bis.hitter._visible = 0;
}
}
if (radd._currentframe == 1) {
if (Key.isDown(81)) {
radd.play();
if (_global.deton == 1) {
_global.deton = 0;
_root.raddet.dettt._width = 0;
_root.raddet.gotoAndStop(1);
p_speed = p_speed * 2;
} else {
_global.deton = 1;
_root.raddet.gotoAndStop(2);
p_speed = p_speed / 2;
}
}
}
grens.text = _global.ammog;
switch (_global.current_w) {
case 0 :
ammo_cur.text = "0";
break;
case 1 :
ammo_cur.text = _global.ammo1;
break;
case 2 :
ammo_cur.text = _global.ammo2;
break;
case 3 :
ammo_cur.text = _global.ammo3;
break;
case 4 :
ammo_cur.text = _global.ammo4;
}
health_t.text = p_health;
switch (Key.isDown(87) - Key.isDown(83)) {
case 1 :
ypluz = -10;
break;
case -1 :
ypluz = 10;
break;
default :
ypluz = 0;
}
switch (Key.isDown(68) - Key.isDown(65)) {
case 1 :
xpluz = 10;
break;
case -1 :
xpluz = -10;
break;
default :
xpluz = 0;
}
delta_x = _xmouse - player._x;
delta_y = _ymouse - player._y;
mAngle = Math.atan2(delta_y, delta_x);
mAngleD = (mAngle / Math.PI) * 180;
dAngleD = player._rotation - mAngleD;
if (dAngleD > 180) {
dAngleD = -360 + dAngleD;
} else if (dAngleD < -180) {
dAngleD = 360 + dAngleD;
}
if (Math.abs(dAngleD) < rotToMouseSpeed) {
player._rotation = player._rotation - dAngleD;
} else if (dAngleD > 0) {
player._rotation = player._rotation - rotToMouseSpeed;
} else {
player._rotation = player._rotation + rotToMouseSpeed;
}
_root.hitter._x = _root.player._x + xpluz;
_root.hitter._y = _root.player._y;
_root.hittery._x = _root.player._x;
_root.hittery._y = _root.player._y + ypluz;
_root.hitter._rotation = _root.player._rotation;
var _local4 = hitter._x - player._x;
var _local3 = hittery._y - player._y;
var _local6 = Math.atan2(_local3, _local4);
var _local7 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if (_local7 > p_speed) {
tgtX = player._x + (p_speed * Math.cos(_local6));
tgtY = player._y + (p_speed * Math.sin(_local6));
if (walls.hitTest(hitter._x, hitter._y, true)) {
player._x = tgtX;
player.legs.play();
}
if (walls.hitTest(hittery._x, hittery._y, true)) {
player._y = tgtY;
player.legs.play();
}
}
if ((change._currentFrame == 1) && (gren._currentFrame == 1)) {
if (w1_ok) {
if (Key.isDown(49) && (_global.current_w != 1)) {
_global.selected_w = 1;
bulletSpeed = bS1;
change.gotoAndPlay(1);
}
}
if (w2_ok) {
if (Key.isDown(50) && (_global.current_w != 2)) {
_global.selected_w = 2;
bulletSpeed = bS2;
change.gotoAndPlay(1);
}
}
if (w3_ok) {
if (Key.isDown(51) && (_global.current_w != 3)) {
_global.selected_w = 3;
bulletSpeed = bS3;
change.gotoAndPlay(1);
}
}
if (w4_ok) {
if (Key.isDown(52) && (_global.current_w != 4)) {
_global.selected_w = 4;
bulletSpeed = bS4;
change.gotoAndPlay(1);
}
}
}
if (suckmygun == 1) {
if (!exit.hitTest(_xmouse, _ymouse, true)) {
switch (_global.current_w) {
case 1 :
if (_global.ammo1 > 0) {
if ((player.hands1._currentframe == 8) || (player.hands1._currentframe == 10)) {
player.hands1.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
break;
case 2 :
if (_global.ammo2 > 0) {
if ((player.hands2._currentframe == 7) || (player.hands2._currentframe == 13)) {
player.hands2.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
break;
case 3 :
if (_global.ammo3 > 0) {
if ((player.hands3._currentframe == 7) || (player.hands3._currentframe == 9)) {
player.hands3.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
break;
case 4 :
if (_global.ammo4 > 0) {
if ((player.hands4._currentframe == 7) || (player.hands4._currentframe == 9)) {
player.hands4.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
}
}
}
if (Key.isDown(71)) {
if (_global.ammog > 0) {
if (_root.gren._currentFrame == 1) {
_root.gren.gotoAndPlay(1);
}
}
}
}
};
var lev = 0;
placeBullet = function (tgt) {
lev++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("b" + lev, lev);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((player._rotation + tgt._rotation) - 90) + random(3);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(vrag1.hitter)) {
v1_health = v1_health - 8;
v1_spotted = 1;
this.removeMovieClip();
placeBlood(vrag1._x, vrag1._y, vrag1._rotation - 180);
}
if (this.hitTest(vrag2.hitter)) {
v2_health = v2_health - 8;
v2_spotted = 1;
this.removeMovieClip();
placeBlood(vrag2._x, vrag2._y, vrag2._rotation - 180);
}
if (this.hitTest(vrag3.hitter)) {
v3_health = v3_health - 8;
v3_spotted = 1;
this.removeMovieClip();
placeBlood(vrag3._x, vrag3._y, vrag3._rotation - 180);
}
if (this.hitTest(zomb1.hitter)) {
z1_health = z1_health - 8;
this.removeMovieClip();
placeBlood(zomb1._x, zomb1._y, zomb1._rotation - 180);
}
if (this.hitTest(zomb2.hitter)) {
z2_health = z2_health - 8;
this.removeMovieClip();
placeBlood(zomb2._x, zomb2._y, zomb2._rotation - 180);
}
if (this.hitTest(zomb3.hitter)) {
z3_health = z3_health - 8;
this.removeMovieClip();
placeBlood(zomb3._x, zomb3._y, zomb3._rotation - 180);
}
if (this.hitTest(zomb4.hitter)) {
z4_health = z4_health - 8;
this.removeMovieClip();
placeBlood(zomb4._x, zomb4._y, zomb4._rotation - 180);
}
if (this.hitTest(zomb5.hitter)) {
z5_health = z5_health - 8;
this.removeMovieClip();
placeBlood(zomb5._x, zomb5._y, zomb5._rotation - 180);
}
if (this.hitTest(los1)) {
v1_spotted = 1;
}
if (this.hitTest(los2)) {
v2_spotted = 1;
}
if (this.hitTest(los3)) {
v3_spotted = 1;
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var leve = 0;
placeEBullet = function (tgt) {
leve++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve, leve);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((vrag1._rotation + tgt._rotation) - 93) + random(5);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 6;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var leve2 = 0;
placeE2Bullet = function (tgt) {
leve2++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve2, leve2);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((vrag2._rotation + tgt._rotation) - 93) + random(5);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 6;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var leve3 = 0;
placeE3Bullet = function (tgt) {
leve3++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve3, leve3);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((vrag3._rotation + tgt._rotation) - 93) + random(5);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 6;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var led = 0;
placeGren = function (tr) {
led++;
var _local3 = {x:tr._x, y:tr._y, rotation:tr._rotation};
tr._parent.localToGlobal(_local3);
globalToLocal(_local3);
var d = grena.duplicateMovieClip("b" + led, led);
d._x = _local3.x;
d._y = _local3.y;
d._rotation = player._rotation;
d.a = (d._rotation / 180) * Math.PI;
d.clickSpot_x = _root._xmouse;
d.clickSpot_y = _root._ymouse;
d.onEnterFrame = function () {
gotoSpotX = d.clickSpot_x;
gotoSpotY = d.clickSpot_y;
delta_x = this._x - gotoSpotX;
delta_y = this._y - gotoSpotY;
if (Math.sqrt((delta_x * delta_x) + (delta_y * delta_y)) > grenSpeed) {
this._x = this._x + (grenSpeed * Math.cos(this.a));
this._y = this._y + (grenSpeed * Math.sin(this.a));
this._rotation = this._rotation - 10;
} else {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
};
};
boom._visible = false;
var levv = 0;
badaboom._visible = false;
var levvv = 0;
blood._visible = false;
var leb = 0;
death._visible = false;
var det = 0;
radlight.onEnterFrame = function () {
var _local5 = radlight._x - player._x;
var _local4 = radlight._y - player._y;
var _local3 = Math.sqrt((_local5 * _local5) + (_local4 * _local4));
_global.hrrr = 100 - _local3;
_root.dettt._width = hrrr;
if (_local3 < 150) {
radlight.alpha = _local3 - 50;
} else {
radlight.alpha = 100;
}
};
v1_speed = 2;
var v1_spotted = 0;
var v1_health = 40;
_global.v1_move = 1;
vrag1.onEnterFrame = function () {
if (v1_health > 0) {
los1._x = vrag1._x;
los1._y = vrag1._y;
los1._rotation = vrag1._rotation;
if (los1.hitTest(hitter)) {
v1_spotted = 1;
}
if (los1.thin.hitTest(hitter)) {
beh1.play();
} else {
beh1.gotoAndPlay("halt");
}
if (v1_spotted == 1) {
var _local9 = player._x - vrag1._x;
var _local8 = player._y - vrag1._y;
} else {
var _local9 = s1.pp._x - vrag1._x;
var _local8 = s1.pp._y - vrag1._y;
if (vrag1.hitTest(s1.pp)) {
s1.play();
}
}
var _local7 = Math.atan2(_local8, _local9);
var _local12 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local12 > v1_speed) {
tgtX = vrag1._x + (v1_speed * Math.cos(_local7));
tgtY = vrag1._y + (v1_speed * Math.sin(_local7));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local13 = dAngleRadian(direction, _local7);
workAngle = _local7 + (_local13 * 0.8);
var _local6 = 0;
while (_local6 < 360) {
var _local2 = -1;
while (_local2 <= 1) {
var _local3 = workAngle + (radian(_local6) * _local2);
var _local5 = vrag1._x + (v1_speed * Math.cos(_local3));
var _local4 = vrag1._y + (v1_speed * Math.sin(_local3));
if (walls.hitTest(_local5, _local4, true)) {
tgtX = _local5;
tgtY = _local4;
break;
}
_local2 = _local2 + 2;
}
_local6 = _local6 + 10;
}
}
var _local11 = tgtX - vrag1._x;
var _local10 = tgtY - vrag1._y;
direction = Math.atan2(_local10, _local11);
var _local13 = dAngleDegree((direction * 180) / Math.PI, vrag1._rotation);
vrag1._rotation = vrag1._rotation + (_local13 * 0.2);
if (_global.v1_move) {
vrag1._x = tgtX;
vrag1._y = tgtY;
vrag1.legs.play();
}
}
} else {
placeDeath(vrag1._x, vrag1._y, vrag1.getDepth());
los1._visible = 0;
}
};
v3_speed = 2;
var v3_spotted = 0;
var v3_health = 50;
_global.v3_move = 1;
vrag3.onEnterFrame = function () {
if (v3_health > 0) {
los3._x = vrag3._x;
los3._y = vrag3._y;
los3._rotation = vrag3._rotation;
if (los3.hitTest(hitter)) {
v3_spotted = 1;
}
if (los3.thin.hitTest(hitter)) {
beh3.play();
} else {
beh3.gotoAndPlay("halt");
}
if (v3_spotted == 1) {
var _local8 = player._x - vrag3._x;
var _local7 = player._y - vrag3._y;
}
var _local6 = Math.atan2(_local7, _local8);
var _local11 = Math.sqrt((_local8 * _local8) + (_local7 * _local7));
if (_local11 > v3_speed) {
tgtX = vrag3._x + (v3_speed * Math.cos(_local6));
tgtY = vrag3._y + (v3_speed * Math.sin(_local6));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local12 = dAngleRadian(direction, _local6);
workAngle = _local6 + (_local12 * 0.8);
var _local5 = 0;
while (_local5 < 360) {
var _local1 = -1;
while (_local1 <= 1) {
var _local2 = workAngle + (radian(_local5) * _local1);
var _local4 = vrag3._x + (v3_speed * Math.cos(_local2));
var _local3 = vrag3._y + (v3_speed * Math.sin(_local2));
if (walls.hitTest(_local4, _local3, true)) {
tgtX = _local4;
tgtY = _local3;
break;
}
_local1 = _local1 + 2;
}
_local5 = _local5 + 10;
}
}
var _local10 = tgtX - vrag3._x;
var _local9 = tgtY - vrag3._y;
direction = Math.atan2(_local9, _local10);
var _local12 = dAngleDegree((direction * 180) / Math.PI, vrag3._rotation);
vrag3._rotation = vrag3._rotation + (_local12 * 0.2);
}
} else {
placeDeath(vrag3._x, vrag3._y, vrag3.getDepth());
los3._visible = 0;
}
};
v2_speed = 2;
var v2_spotted = 0;
var v2_health = 60;
_global.v2_move = 1;
vrag2.onEnterFrame = function () {
if (v2_health > 0) {
los2._x = vrag2._x;
los2._y = vrag2._y;
los2._rotation = vrag2._rotation;
if (los2.hitTest(hitter)) {
v2_spotted = 1;
}
if (los2.thin.hitTest(hitter)) {
beh2.play();
} else {
beh2.gotoAndPlay("halt");
}
if (v2_spotted == 1) {
var _local9 = player._x - vrag2._x;
var _local8 = player._y - vrag2._y;
}
var _local7 = Math.atan2(_local8, _local9);
var _local12 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local12 > v2_speed) {
tgtX = vrag2._x + (v2_speed * Math.cos(_local7));
tgtY = vrag2._y + (v2_speed * Math.sin(_local7));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local13 = dAngleRadian(direction, _local7);
workAngle = _local7 + (_local13 * 0.8);
var _local6 = 0;
while (_local6 < 360) {
var _local2 = -1;
while (_local2 <= 1) {
var _local3 = workAngle + (radian(_local6) * _local2);
var _local5 = vrag2._x + (v2_speed * Math.cos(_local3));
var _local4 = vrag2._y + (v2_speed * Math.sin(_local3));
if (walls.hitTest(_local5, _local4, true)) {
tgtX = _local5;
tgtY = _local4;
break;
}
_local2 = _local2 + 2;
}
_local6 = _local6 + 10;
}
}
var _local11 = tgtX - vrag2._x;
var _local10 = tgtY - vrag2._y;
direction = Math.atan2(_local10, _local11);
var _local13 = dAngleDegree((direction * 180) / Math.PI, vrag2._rotation);
vrag2._rotation = vrag2._rotation + (_local13 * 0.2);
if (_global.v2_move) {
vrag2._x = tgtX;
vrag2._y = tgtY;
vrag2.legs.play();
}
}
} else {
placeDeath(vrag2._x, vrag2._y, vrag2.getDepth());
los2._visible = 0;
}
};
var dur1 = 0;
z1_speed = 1;
var z1_health = 60;
z1_move = 1;
zomb1.onEnterFrame = function () {
if (z1_health > 0) {
if (dur1) {
var _local9 = player._x - this._x;
var _local8 = player._y - this._y;
}
if (this.hitter.hitTest(hitter)) {
this.hands.play();
p_health = p_health - 1;
}
var _local7 = Math.atan2(_local8, _local9);
var _local12 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local12 > z1_speed) {
tgtX = this._x + (z1_speed * Math.cos(_local7));
tgtY = this._y + (z1_speed * Math.sin(_local7));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local13 = dAngleRadian(direction, _local7);
workAngle = _local7 + (_local13 * 0.8);
var _local6 = 0;
while (_local6 < 360) {
var _local2 = -1;
while (_local2 <= 1) {
var _local3 = workAngle + (radian(_local6) * _local2);
var _local5 = this._x + (z1_speed * Math.cos(_local3));
var _local4 = this._y + (z1_speed * Math.sin(_local3));
if (walls.hitTest(_local5, _local4, true)) {
tgtX = _local5;
tgtY = _local4;
break;
}
_local2 = _local2 + 2;
}
_local6 = _local6 + 10;
}
}
var _local11 = tgtX - this._x;
var _local10 = tgtY - this._y;
direction = Math.atan2(_local10, _local11);
var _local13 = dAngleDegree((direction * 180) / Math.PI, this._rotation);
this._rotation = this._rotation + (_local13 * 0.2);
if (z1_move) {
this._x = tgtX;
this._y = tgtY;
this.legs.play();
}
}
} else {
placeDeath(this._x, this._y, this.getDepth());
}
};
z2_speed = 1.5;
var z2_health = 60;
z2_move = 1;
zomb2.onEnterFrame = function () {
if (z2_health > 0) {
if (dur1) {
var _local9 = player._x - this._x;
var _local8 = player._y - this._y;
}
if (this.hitter.hitTest(hitter)) {
this.hands.play();
p_health = p_health - 1;
}
var _local7 = Math.atan2(_local8, _local9);
var _local12 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local12 > z2_speed) {
tgtX = this._x + (z2_speed * Math.cos(_local7));
tgtY = this._y + (z2_speed * Math.sin(_local7));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local13 = dAngleRadian(direction, _local7);
workAngle = _local7 + (_local13 * 0.8);
var _local6 = 0;
while (_local6 < 360) {
var _local2 = -1;
while (_local2 <= 1) {
var _local3 = workAngle + (radian(_local6) * _local2);
var _local5 = this._x + (z2_speed * Math.cos(_local3));
var _local4 = this._y + (z2_speed * Math.sin(_local3));
if (walls.hitTest(_local5, _local4, true)) {
tgtX = _local5;
tgtY = _local4;
break;
}
_local2 = _local2 + 2;
}
_local6 = _local6 + 10;
}
}
var _local11 = tgtX - this._x;
var _local10 = tgtY - this._y;
direction = Math.atan2(_local10, _local11);
var _local13 = dAngleDegree((direction * 180) / Math.PI, this._rotation);
this._rotation = this._rotation + (_local13 * 0.2);
if (z2_move) {
this._x = tgtX;
this._y = tgtY;
this.legs.play();
}
}
} else {
placeDeath(this._x, this._y, this.getDepth());
}
};
z3_speed = 1.1;
var z3_health = 60;
z3_move = 1;
zomb3.onEnterFrame = function () {
if (z3_health > 0) {
if (dur1) {
var _local9 = player._x - this._x;
var _local8 = player._y - this._y;
}
if (this.hitter.hitTest(hitter)) {
this.hands.play();
p_health = p_health - 1;
}
var _local7 = Math.atan2(_local8, _local9);
var _local12 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local12 > z3_speed) {
tgtX = this._x + (z3_speed * Math.cos(_local7));
tgtY = this._y + (z3_speed * Math.sin(_local7));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local13 = dAngleRadian(direction, _local7);
workAngle = _local7 + (_local13 * 0.8);
var _local6 = 0;
while (_local6 < 360) {
var _local2 = -1;
while (_local2 <= 1) {
var _local3 = workAngle + (radian(_local6) * _local2);
var _local5 = this._x + (z1_speed * Math.cos(_local3));
var _local4 = this._y + (z1_speed * Math.sin(_local3));
if (walls.hitTest(_local5, _local4, true)) {
tgtX = _local5;
tgtY = _local4;
break;
}
_local2 = _local2 + 2;
}
_local6 = _local6 + 10;
}
}
var _local11 = tgtX - this._x;
var _local10 = tgtY - this._y;
direction = Math.atan2(_local10, _local11);
var _local13 = dAngleDegree((direction * 180) / Math.PI, this._rotation);
this._rotation = this._rotation + (_local13 * 0.2);
if (z3_move) {
this._x = tgtX;
this._y = tgtY;
this.legs.play();
}
}
} else {
placeDeath(this._x, this._y, this.getDepth());
}
};
var dur2 = 0;
z4_speed = 1.1;
var z4_health = 60;
z4_move = 1;
zomb4.onEnterFrame = function () {
if (z4_health > 0) {
if (dur2) {
var _local9 = player._x - this._x;
var _local8 = player._y - this._y;
}
if (this.hitter.hitTest(hitter)) {
this.hands.play();
p_health = p_health - 1;
}
var _local7 = Math.atan2(_local8, _local9);
var _local12 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local12 > z4_speed) {
tgtX = this._x + (z4_speed * Math.cos(_local7));
tgtY = this._y + (z4_speed * Math.sin(_local7));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local13 = dAngleRadian(direction, _local7);
workAngle = _local7 + (_local13 * 0.8);
var _local6 = 0;
while (_local6 < 360) {
var _local2 = -1;
while (_local2 <= 1) {
var _local3 = workAngle + (radian(_local6) * _local2);
var _local5 = this._x + (z1_speed * Math.cos(_local3));
var _local4 = this._y + (z1_speed * Math.sin(_local3));
if (walls.hitTest(_local5, _local4, true)) {
tgtX = _local5;
tgtY = _local4;
break;
}
_local2 = _local2 + 2;
}
_local6 = _local6 + 10;
}
}
var _local11 = tgtX - this._x;
var _local10 = tgtY - this._y;
direction = Math.atan2(_local10, _local11);
var _local13 = dAngleDegree((direction * 180) / Math.PI, this._rotation);
this._rotation = this._rotation + (_local13 * 0.2);
if (z4_move) {
this._x = tgtX;
this._y = tgtY;
this.legs.play();
}
}
} else {
placeDeath(this._x, this._y, this.getDepth());
}
};
z5_speed = 1.1;
var z5_health = 60;
z5_move = 1;
zomb5.onEnterFrame = function () {
if (z5_health > 0) {
if (dur2) {
var _local9 = player._x - this._x;
var _local8 = player._y - this._y;
}
if (this.hitter.hitTest(hitter)) {
this.hands.play();
p_health = p_health - 1;
}
var _local7 = Math.atan2(_local8, _local9);
var _local12 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local12 > z5_speed) {
tgtX = this._x + (z5_speed * Math.cos(_local7));
tgtY = this._y + (z5_speed * Math.sin(_local7));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local13 = dAngleRadian(direction, _local7);
workAngle = _local7 + (_local13 * 0.8);
var _local6 = 0;
while (_local6 < 360) {
var _local2 = -1;
while (_local2 <= 1) {
var _local3 = workAngle + (radian(_local6) * _local2);
var _local5 = this._x + (z1_speed * Math.cos(_local3));
var _local4 = this._y + (z1_speed * Math.sin(_local3));
if (walls.hitTest(_local5, _local4, true)) {
tgtX = _local5;
tgtY = _local4;
break;
}
_local2 = _local2 + 2;
}
_local6 = _local6 + 10;
}
}
var _local11 = tgtX - this._x;
var _local10 = tgtY - this._y;
direction = Math.atan2(_local10, _local11);
var _local13 = dAngleDegree((direction * 180) / Math.PI, this._rotation);
this._rotation = this._rotation + (_local13 * 0.2);
if (z5_move) {
this._x = tgtX;
this._y = tgtY;
this.legs.play();
}
}
} else {
placeDeath(this._x, this._y, this.getDepth());
}
};
vrag1.onRollOver = function () {
los1._visible = 1;
};
vrag1.onRollOut = function () {
los1._visible = 0;
};
vrag1.onReleaseOutside = function () {
los1._visible = 0;
};
vrag2.onRollOver = function () {
los2._visible = 1;
};
vrag2.onRollOut = function () {
los2._visible = 0;
};
vrag2.onReleaseOutside = function () {
los2._visible = 0;
};
vrag3.onRollOver = function () {
los3._visible = 1;
};
vrag3.onRollOut = function () {
los3._visible = 0;
};
vrag3.onReleaseOutside = function () {
los3._visible = 0;
};
Instance of Symbol 496 MovieClip in Frame 246
onClipEvent (enterFrame) {
this._x = player._x;
this._y = player._y;
}
Instance of Symbol 197 MovieClip in Frame 246
on (keyPress "<?#19>") {
_root.gotoAndPlay("inchange");
defeat.Key.removeListener(keyListener);
Key.removeListener(keyListener);
Key.removeListener(defeat.keyListener);
victory.Key.removeListener(keyListener2);
Key.removeListener(victory.keyListener2);
Key.removeListener(keyListener2);
}
Instance of Symbol 530 MovieClip in Frame 246
onClipEvent (load) {
startDrag (this, true);
Mouse.hide();
}
onClipEvent (enterFrame) {
Mouse.hide();
}
Frame 248
stopAllSounds();
my_sound2.start();
my_sound2.onSoundComplete = function () {
my_sound2.start();
};
function placeBoom(x, y) {
levv++;
var _local1 = boom.duplicateMovieClip("bdoom" + levv, levv);
_local1._x = x;
_local1._y = y;
}
function placeBadaboom(x, y) {
levvv++;
var _local1 = badaboom.duplicateMovieClip("badadoom" + levvv, levvv);
_local1._x = x;
_local1._y = y;
if (_local1.hitTest(player.hitter)) {
difx = _local1._x - player._x;
dify = _local1._y - player._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
p_health = p_health - (120 - diff);
}
if (_local1.hitTest(vrag1.hitter)) {
difx = _local1._x - vrag1._x;
dify = _local1._y - vrag1._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
v1_health = v1_health - (180 - diff);
}
if (_local1.hitTest(vrag2.hitter)) {
difx = _local1._x - vrag2._x;
dify = _local1._y - vrag2._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
v2_health = v2_health - (180 - diff);
}
if (_local1.hitTest(los1) || (_local1.hitTest(los2))) {
v1_spotted = 1;
v2_spotted = 1;
}
}
function placeBlood(x, y, rotation) {
leb++;
var _local1 = blood.duplicateMovieClip("blood" + leb, leb);
_local1._x = x;
_local1._y = y;
_local1._rotation = rotation;
}
function placeDeath(x, y, gloob) {
det++;
var _local1 = death.duplicateMovieClip("blood" + det, gloob);
_local1._x = x;
_local1._y = y;
_local1._rotation = rotation;
deathsound.start();
}
function dAngleRadian(a1, a2) {
var _local1 = a1 - a2;
if (_local1 > Math.PI) {
_local1 = -6.28318530717959 + _local1;
} else if (_local1 < -3.14159265358979) {
_local1 = (Math.PI*2) + _local1;
}
return(_local1);
}
function dAngleDegree(a1, a2) {
var _local1 = a1 - a2;
if (_local1 > 180) {
_local1 = -360 + _local1;
} else if (_local1 < -180) {
_local1 = 360 + _local1;
}
return(_local1);
}
function degree(a) {
return((a / Math.PI) * 180);
}
function radian(a) {
return((a / 180) * Math.PI);
}
var suckmygun = 0;
_root.firebtn.onPress = function () {
suckmygun = 1;
};
_root.firebtn.onRelease = function () {
suckmygun = 0;
};
_root.firebtn.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag1.onPress = function () {
suckmygun = 1;
};
_root.vrag1.onRelease = function () {
suckmygun = 0;
};
_root.vrag1.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag2.onPress = function () {
suckmygun = 1;
};
_root.vrag2.onRelease = function () {
suckmygun = 0;
};
_root.vrag2.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag3.onPress = function () {
suckmygun = 1;
};
_root.vrag3.onRelease = function () {
suckmygun = 0;
};
_root.vrag3.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag4.onPress = function () {
suckmygun = 1;
};
_root.vrag4.onRelease = function () {
suckmygun = 0;
};
_root.vrag4.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag5.onPress = function () {
suckmygun = 1;
};
_root.vrag5.onRelease = function () {
suckmygun = 0;
};
_root.vrag5.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag10.onPress = function () {
suckmygun = 1;
};
_root.vrag10.onRelease = function () {
suckmygun = 0;
};
_root.vrag10.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag11.onPress = function () {
suckmygun = 1;
};
_root.vrag11.onRelease = function () {
suckmygun = 0;
};
_root.vrag11.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag12.onPress = function () {
suckmygun = 1;
};
_root.vrag12.onRelease = function () {
suckmygun = 0;
};
_root.vrag12.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag14.onPress = function () {
suckmygun = 1;
};
_root.vrag14.onRelease = function () {
suckmygun = 0;
};
_root.vrag14.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb1.onPress = function () {
suckmygun = 1;
};
_root.zomb1.onRelease = function () {
suckmygun = 0;
};
_root.zomb1.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb2.onPress = function () {
suckmygun = 1;
};
_root.zomb2.onRelease = function () {
suckmygun = 0;
};
_root.zomb2.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb3.onPress = function () {
suckmygun = 1;
};
_root.zomb3.onRelease = function () {
suckmygun = 0;
};
_root.zomb3.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb4.onPress = function () {
suckmygun = 1;
};
_root.zomb4.onRelease = function () {
suckmygun = 0;
};
_root.zomb4.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb5.onPress = function () {
suckmygun = 1;
};
_root.zomb5.onRelease = function () {
suckmygun = 0;
};
_root.zomb5.onReleaseOutside = function () {
suckmygun = 0;
};
stop();
_global.deton = 0;
pick1._visible = 0;
pick2._visible = 0;
pick3._visible = 0;
pick4._visible = 0;
pick5._visible = 0;
pick6._visible = 0;
pick7._visible = 0;
var p_speed = 4;
var rotToMouseSpeed = 12;
var bS1 = 20;
var bS2 = 18;
var bS3 = 22;
var bS4 = 15;
var grenSpeed = 15;
var p_health = 100;
_global.current_w = 2;
var vkey1 = 0;
gkey1._visible = 0;
_global.ammo1 = 27;
_global.ammo2 = 21;
_global.ammo3 = 30;
_global.ammo4 = 0;
_global.ammog = 1;
var w1_ok = 1;
var w2_ok = 2;
var w3_ok = 0;
var w4_ok = 0;
los1._visible = 0;
los2._visible = 0;
los3._visible = 0;
_global.selected_w;
var xpluz = 0;
var ypluz = 0;
var bulletSpeed;
if (w1_ok) {
gui_weap.weap_none1._visible = 0;
}
if (w2_ok) {
gui_weap.weap_none2._visible = 0;
}
if (w3_ok) {
gui_weap.weap_none3._visible = 0;
}
if (w4_ok) {
gui_weap.weap_none4._visible = 0;
}
gui_weap.sel_light.gotoAndStop(_global.current_w + 1);
player.hands._visible = 0;
player.hands1._visible = 0;
player.hands2._visible = 0;
player.hands3._visible = 0;
player.hands4._visible = 0;
player.handsg._visible = 0;
switch (current_w) {
case 0 :
player.hands._visible = 1;
break;
case 1 :
player.hands1._visible = 1;
bulletSpeed = bS1;
break;
case 2 :
player.hands2._visible = 1;
bulletSpeed = bS2;
break;
case 3 :
player.hands3._visible = 1;
bulletSpeed = bS3;
break;
case 4 :
player.hands4._visible = 1;
bulletSpeed = bS4;
}
defeat.gotoAndStop(1);
victory.gotoAndStop(1);
var energy = 0;
var vrubleno = 0;
player.onEnterFrame = function () {
if (p_health < 1) {
health_t.text = 0;
if (player._currentframe == 1) {
player.play();
player._name = "gsom";
defeat.play();
}
} else {
if (rifle2._currentframe == 1) {
if (hitter.hitTest(rifle2)) {
rifle2.hitter._visible = 1;
pick7._visible = 1;
if (Key.isDown(32)) {
rifle2.play();
_global.ammo3 = _global.ammo3 + 30;
ammo3picked.play();
pick7._visible = 0;
}
} else {
rifle2.hitter._visible = 0;
pick7._visible = 0;
}
}
if (pult1._currentframe == 1) {
if (hitter.hitTest(pult1)) {
pult1.hitter._visible = 1;
pick1._visible = 1;
if (Key.isDown(32)) {
sh1._visible = 0;
compsound.start();
pult1.play();
vrubleno = vrubleno + 1;
energyplus.play();
pick1._visible = 0;
}
} else {
pult1.hitter._visible = 0;
pick1._visible = 0;
}
}
if (pult2._currentframe == 1) {
if (hitter.hitTest(pult2)) {
pult2.hitter._visible = 1;
pick2._visible = 1;
if (Key.isDown(32)) {
sh2._visible = 0;
compsound.start();
vrubleno = vrubleno + 1;
pult2.play();
energyplus.play();
pick2._visible = 0;
}
} else {
pult2.hitter._visible = 0;
pick2._visible = 0;
}
}
if (pult4._currentframe == 1) {
if (hitter.hitTest(pult4)) {
pult4.hitter._visible = 1;
pick4._visible = 1;
if (Key.isDown(32)) {
compsound.start();
totalenergy.total.text = vrubleno;
totalenergy.play();
pick4._visible = 0;
}
} else {
pult4.hitter._visible = 0;
pick4._visible = 0;
}
}
if (pult3._currentframe == 1) {
if (hitter.hitTest(pult3)) {
pult3.hitter._visible = 1;
pick3._visible = 1;
if (Key.isDown(32)) {
sh3._visible = 0;
compsound.start();
pult3.play();
vrubleno = vrubleno + 1;
energyplus.play();
pick3._visible = 0;
}
} else {
pult3.hitter._visible = 0;
pick3._visible = 0;
}
}
if (pult5._currentframe == 1) {
if (hitter.hitTest(pult5)) {
pult5.hitter._visible = 1;
pick5._visible = 0;
if (Key.isDown(32)) {
compsound.start();
if (vrubleno == 3) {
sh4._visible = 0;
pult4.play();
energy = 1;
energyon.play();
arrow1.gotoAndStop(3);
pick5._visible = 0;
trainr.play();
} else {
energyno.play();
}
}
} else {
pult5.hitter._visible = 0;
pick5._visible = 0;
}
}
if (energy) {
if (hitter.hitTest(finish)) {
player._name = "gsom";
hitter._name = "gsom2";
victory.play();
var _local5 = SharedObject.getLocal("numlevs");
if (_local5.data.num < 7) {
_local5.data.num = 7;
_local5.flush();
}
}
}
if (door1._currentframe == 1) {
if (hitter.hitTest(door1)) {
door1.hitter._visible = 1;
if (Key.isDown(32)) {
door1.play();
walls.door1.play();
bwalls.door1.play();
dur1 = 1;
}
} else {
door1.hitter._visible = 0;
}
}
if (door2._currentframe == 1) {
if (hitter.hitTest(door2)) {
door2.hitter._visible = 1;
if (Key.isDown(32)) {
door2.play();
walls.door2.play();
bwalls.door2.play();
dur2 = 1;
}
} else {
door2.hitter._visible = 0;
}
}
if (rifle._currentframe == 1) {
if (hitter.hitTest(rifle.hitter)) {
rifle.hitter._visible = 1;
pick6._visible = 1;
if (Key.isDown(32)) {
rifle.play();
w3_ok = 1;
gui_weap.weap_none3._visible = 0;
riflepicked.play();
pick6._visible = 0;
}
} else {
rifle.hitter._visible = 0;
pick6._visible = 0;
}
}
if (radd._currentframe == 1) {
if (Key.isDown(81)) {
radd.play();
if (_global.deton == 1) {
_global.deton = 0;
_root.raddet.dettt._width = 0;
_root.raddet.gotoAndStop(1);
p_speed = p_speed * 2;
} else {
_global.deton = 1;
_root.raddet.gotoAndStop(2);
p_speed = p_speed / 2;
}
}
}
grens.text = _global.ammog;
switch (_global.current_w) {
case 0 :
ammo_cur.text = "0";
break;
case 1 :
ammo_cur.text = _global.ammo1;
break;
case 2 :
ammo_cur.text = _global.ammo2;
break;
case 3 :
ammo_cur.text = _global.ammo3;
break;
case 4 :
ammo_cur.text = _global.ammo4;
}
health_t.text = p_health;
switch (Key.isDown(87) - Key.isDown(83)) {
case 1 :
ypluz = -10;
break;
case -1 :
ypluz = 10;
break;
default :
ypluz = 0;
}
switch (Key.isDown(68) - Key.isDown(65)) {
case 1 :
xpluz = 10;
break;
case -1 :
xpluz = -10;
break;
default :
xpluz = 0;
}
delta_x = _xmouse - player._x;
delta_y = _ymouse - player._y;
mAngle = Math.atan2(delta_y, delta_x);
mAngleD = (mAngle / Math.PI) * 180;
dAngleD = player._rotation - mAngleD;
if (dAngleD > 180) {
dAngleD = -360 + dAngleD;
} else if (dAngleD < -180) {
dAngleD = 360 + dAngleD;
}
if (Math.abs(dAngleD) < rotToMouseSpeed) {
player._rotation = player._rotation - dAngleD;
} else if (dAngleD > 0) {
player._rotation = player._rotation - rotToMouseSpeed;
} else {
player._rotation = player._rotation + rotToMouseSpeed;
}
_root.hitter._x = _root.player._x + xpluz;
_root.hitter._y = _root.player._y;
_root.hittery._x = _root.player._x;
_root.hittery._y = _root.player._y + ypluz;
_root.hitter._rotation = _root.player._rotation;
var _local4 = hitter._x - player._x;
var _local3 = hittery._y - player._y;
var _local6 = Math.atan2(_local3, _local4);
var _local7 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if (_local7 > p_speed) {
tgtX = player._x + (p_speed * Math.cos(_local6));
tgtY = player._y + (p_speed * Math.sin(_local6));
if (walls.hitTest(hitter._x, hitter._y, true)) {
player._x = tgtX;
player.legs.play();
}
if (walls.hitTest(hittery._x, hittery._y, true)) {
player._y = tgtY;
player.legs.play();
}
}
if ((change._currentFrame == 1) && (gren._currentFrame == 1)) {
if (w1_ok) {
if (Key.isDown(49) && (_global.current_w != 1)) {
_global.selected_w = 1;
bulletSpeed = bS1;
change.gotoAndPlay(1);
}
}
if (w2_ok) {
if (Key.isDown(50) && (_global.current_w != 2)) {
_global.selected_w = 2;
bulletSpeed = bS2;
change.gotoAndPlay(1);
}
}
if (w3_ok) {
if (Key.isDown(51) && (_global.current_w != 3)) {
_global.selected_w = 3;
bulletSpeed = bS3;
change.gotoAndPlay(1);
}
}
if (w4_ok) {
if (Key.isDown(52) && (_global.current_w != 4)) {
_global.selected_w = 4;
bulletSpeed = bS4;
change.gotoAndPlay(1);
}
}
}
if (suckmygun == 1) {
if (!exit.hitTest(_xmouse, _ymouse, true)) {
switch (_global.current_w) {
case 1 :
if (_global.ammo1 > 0) {
if ((player.hands1._currentframe == 8) || (player.hands1._currentframe == 10)) {
player.hands1.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
break;
case 2 :
if (_global.ammo2 > 0) {
if ((player.hands2._currentframe == 7) || (player.hands2._currentframe == 13)) {
player.hands2.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
break;
case 3 :
if (_global.ammo3 > 0) {
if ((player.hands3._currentframe == 7) || (player.hands3._currentframe == 9)) {
player.hands3.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
break;
case 4 :
if (_global.ammo4 > 0) {
if ((player.hands4._currentframe == 7) || (player.hands4._currentframe == 9)) {
player.hands4.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
}
}
}
if (Key.isDown(71)) {
if (_global.ammog > 0) {
if (_root.gren._currentFrame == 1) {
_root.gren.gotoAndPlay(1);
}
}
}
}
};
var lev = 0;
placeBullet = function (tgt) {
lev++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("b" + lev, lev);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((player._rotation + tgt._rotation) - 90) + random(3);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(vrag1.hitter)) {
v1_health = v1_health - 8;
v1_spotted = 1;
this.removeMovieClip();
placeBlood(vrag1._x, vrag1._y, vrag1._rotation - 180);
}
if (this.hitTest(vrag2.hitter)) {
v2_health = v2_health - 8;
v2_spotted = 1;
this.removeMovieClip();
placeBlood(vrag2._x, vrag2._y, vrag2._rotation - 180);
}
if (this.hitTest(vrag3.hitter)) {
v3_health = v3_health - 8;
v3_spotted = 1;
this.removeMovieClip();
placeBlood(vrag3._x, vrag3._y, vrag3._rotation - 180);
}
if (this.hitTest(zomb1.hitter)) {
z1_health = z1_health - 8;
this.removeMovieClip();
placeBlood(zomb1._x, zomb1._y, zomb1._rotation - 180);
}
if (this.hitTest(zomb2.hitter)) {
z2_health = z2_health - 8;
this.removeMovieClip();
placeBlood(zomb2._x, zomb2._y, zomb2._rotation - 180);
}
if (this.hitTest(zomb3.hitter)) {
z3_health = z3_health - 8;
this.removeMovieClip();
placeBlood(zomb3._x, zomb3._y, zomb3._rotation - 180);
}
if (this.hitTest(zomb4.hitter)) {
z4_health = z4_health - 8;
this.removeMovieClip();
placeBlood(zomb4._x, zomb4._y, zomb4._rotation - 180);
}
if (this.hitTest(zomb5.hitter)) {
z5_health = z5_health - 8;
this.removeMovieClip();
placeBlood(zomb5._x, zomb5._y, zomb5._rotation - 180);
}
if (this.hitTest(los1)) {
v1_spotted = 1;
}
if (this.hitTest(los2)) {
v2_spotted = 1;
}
if (this.hitTest(los3)) {
v3_spotted = 1;
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var leve = 0;
placeEBullet = function (tgt) {
leve++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve, leve);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((vrag1._rotation + tgt._rotation) - 93) + random(5);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 6;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var leve2 = 0;
placeE2Bullet = function (tgt) {
leve2++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve2, leve2);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((vrag2._rotation + tgt._rotation) - 93) + random(5);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 6;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var leve3 = 0;
placeE3Bullet = function (tgt) {
leve3++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve3, leve3);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((vrag3._rotation + tgt._rotation) - 93) + random(5);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 6;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var led = 0;
placeGren = function (tr) {
led++;
var _local3 = {x:tr._x, y:tr._y, rotation:tr._rotation};
tr._parent.localToGlobal(_local3);
globalToLocal(_local3);
var d = grena.duplicateMovieClip("b" + led, led);
d._x = _local3.x;
d._y = _local3.y;
d._rotation = player._rotation;
d.a = (d._rotation / 180) * Math.PI;
d.clickSpot_x = _root._xmouse;
d.clickSpot_y = _root._ymouse;
d.onEnterFrame = function () {
gotoSpotX = d.clickSpot_x;
gotoSpotY = d.clickSpot_y;
delta_x = this._x - gotoSpotX;
delta_y = this._y - gotoSpotY;
if (Math.sqrt((delta_x * delta_x) + (delta_y * delta_y)) > grenSpeed) {
this._x = this._x + (grenSpeed * Math.cos(this.a));
this._y = this._y + (grenSpeed * Math.sin(this.a));
this._rotation = this._rotation - 10;
} else {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
};
};
boom._visible = false;
var levv = 0;
badaboom._visible = false;
var levvv = 0;
blood._visible = false;
var leb = 0;
death._visible = false;
var det = 0;
radlight.onEnterFrame = function () {
var _local5 = radlight._x - player._x;
var _local4 = radlight._y - player._y;
var _local3 = Math.sqrt((_local5 * _local5) + (_local4 * _local4));
_global.hrrr = 100 - _local3;
_root.dettt._width = hrrr;
if (_local3 < 150) {
radlight.alpha = _local3 - 50;
} else {
radlight.alpha = 100;
}
};
v1_speed = 2;
var v1_spotted = 0;
var v1_health = 40;
_global.v1_move = 1;
vrag1.onEnterFrame = function () {
if (v1_health > 0) {
los1._x = vrag1._x;
los1._y = vrag1._y;
los1._rotation = vrag1._rotation;
if (los1.hitTest(hitter)) {
v1_spotted = 1;
}
if (los1.thin.hitTest(hitter)) {
beh1.play();
} else {
beh1.gotoAndPlay("halt");
}
if (v1_spotted == 1) {
var _local9 = player._x - vrag1._x;
var _local8 = player._y - vrag1._y;
} else {
var _local9 = s1.pp._x - vrag1._x;
var _local8 = s1.pp._y - vrag1._y;
if (vrag1.hitTest(s1.pp)) {
s1.play();
}
}
var _local7 = Math.atan2(_local8, _local9);
var _local12 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local12 > v1_speed) {
tgtX = vrag1._x + (v1_speed * Math.cos(_local7));
tgtY = vrag1._y + (v1_speed * Math.sin(_local7));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local13 = dAngleRadian(direction, _local7);
workAngle = _local7 + (_local13 * 0.8);
var _local6 = 0;
while (_local6 < 360) {
var _local2 = -1;
while (_local2 <= 1) {
var _local3 = workAngle + (radian(_local6) * _local2);
var _local5 = vrag1._x + (v1_speed * Math.cos(_local3));
var _local4 = vrag1._y + (v1_speed * Math.sin(_local3));
if (walls.hitTest(_local5, _local4, true)) {
tgtX = _local5;
tgtY = _local4;
break;
}
_local2 = _local2 + 2;
}
_local6 = _local6 + 10;
}
}
var _local11 = tgtX - vrag1._x;
var _local10 = tgtY - vrag1._y;
direction = Math.atan2(_local10, _local11);
var _local13 = dAngleDegree((direction * 180) / Math.PI, vrag1._rotation);
vrag1._rotation = vrag1._rotation + (_local13 * 0.2);
if (_global.v1_move) {
vrag1._x = tgtX;
vrag1._y = tgtY;
vrag1.legs.play();
}
}
} else {
placeDeath(vrag1._x, vrag1._y, vrag1.getDepth());
los1._visible = 0;
}
};
v3_speed = 2;
var v3_spotted = 0;
var v3_health = 50;
_global.v3_move = 1;
vrag3.onEnterFrame = function () {
if (v3_health > 0) {
los3._x = vrag3._x;
los3._y = vrag3._y;
los3._rotation = vrag3._rotation;
if (los3.hitTest(hitter)) {
v3_spotted = 1;
}
if (los3.thin.hitTest(hitter)) {
beh3.play();
} else {
beh3.gotoAndPlay("halt");
}
if (v3_spotted == 1) {
var _local8 = player._x - vrag3._x;
var _local7 = player._y - vrag3._y;
}
var _local6 = Math.atan2(_local7, _local8);
var _local11 = Math.sqrt((_local8 * _local8) + (_local7 * _local7));
if (_local11 > v3_speed) {
tgtX = vrag3._x + (v3_speed * Math.cos(_local6));
tgtY = vrag3._y + (v3_speed * Math.sin(_local6));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local12 = dAngleRadian(direction, _local6);
workAngle = _local6 + (_local12 * 0.8);
var _local5 = 0;
while (_local5 < 360) {
var _local1 = -1;
while (_local1 <= 1) {
var _local2 = workAngle + (radian(_local5) * _local1);
var _local4 = vrag3._x + (v3_speed * Math.cos(_local2));
var _local3 = vrag3._y + (v3_speed * Math.sin(_local2));
if (walls.hitTest(_local4, _local3, true)) {
tgtX = _local4;
tgtY = _local3;
break;
}
_local1 = _local1 + 2;
}
_local5 = _local5 + 10;
}
}
var _local10 = tgtX - vrag3._x;
var _local9 = tgtY - vrag3._y;
direction = Math.atan2(_local9, _local10);
var _local12 = dAngleDegree((direction * 180) / Math.PI, vrag3._rotation);
vrag3._rotation = vrag3._rotation + (_local12 * 0.2);
}
} else {
placeDeath(vrag3._x, vrag3._y, vrag3.getDepth());
los3._visible = 0;
}
};
v2_speed = 2;
var v2_spotted = 0;
var v2_health = 60;
_global.v2_move = 1;
vrag2.onEnterFrame = function () {
if (v2_health > 0) {
los2._x = vrag2._x;
los2._y = vrag2._y;
los2._rotation = vrag2._rotation;
if (los2.hitTest(hitter)) {
v2_spotted = 1;
}
if (los2.thin.hitTest(hitter)) {
beh2.play();
} else {
beh2.gotoAndPlay("halt");
}
if (v2_spotted == 1) {
var _local9 = player._x - vrag2._x;
var _local8 = player._y - vrag2._y;
}
var _local7 = Math.atan2(_local8, _local9);
var _local12 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local12 > v2_speed) {
tgtX = vrag2._x + (v2_speed * Math.cos(_local7));
tgtY = vrag2._y + (v2_speed * Math.sin(_local7));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local13 = dAngleRadian(direction, _local7);
workAngle = _local7 + (_local13 * 0.8);
var _local6 = 0;
while (_local6 < 360) {
var _local2 = -1;
while (_local2 <= 1) {
var _local3 = workAngle + (radian(_local6) * _local2);
var _local5 = vrag2._x + (v2_speed * Math.cos(_local3));
var _local4 = vrag2._y + (v2_speed * Math.sin(_local3));
if (walls.hitTest(_local5, _local4, true)) {
tgtX = _local5;
tgtY = _local4;
break;
}
_local2 = _local2 + 2;
}
_local6 = _local6 + 10;
}
}
var _local11 = tgtX - vrag2._x;
var _local10 = tgtY - vrag2._y;
direction = Math.atan2(_local10, _local11);
var _local13 = dAngleDegree((direction * 180) / Math.PI, vrag2._rotation);
vrag2._rotation = vrag2._rotation + (_local13 * 0.2);
if (_global.v2_move) {
vrag2._x = tgtX;
vrag2._y = tgtY;
vrag2.legs.play();
}
}
} else {
placeDeath(vrag2._x, vrag2._y, vrag2.getDepth());
los2._visible = 0;
}
};
var dur1 = 0;
z1_speed = 1;
var z1_health = 60;
z1_move = 1;
zomb1.onEnterFrame = function () {
if (z1_health > 0) {
if (dur1) {
var _local9 = player._x - this._x;
var _local8 = player._y - this._y;
}
if (this.hitter.hitTest(hitter)) {
this.hands.play();
p_health = p_health - 1;
}
var _local7 = Math.atan2(_local8, _local9);
var _local12 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local12 > z1_speed) {
tgtX = this._x + (z1_speed * Math.cos(_local7));
tgtY = this._y + (z1_speed * Math.sin(_local7));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local13 = dAngleRadian(direction, _local7);
workAngle = _local7 + (_local13 * 0.8);
var _local6 = 0;
while (_local6 < 360) {
var _local2 = -1;
while (_local2 <= 1) {
var _local3 = workAngle + (radian(_local6) * _local2);
var _local5 = this._x + (z1_speed * Math.cos(_local3));
var _local4 = this._y + (z1_speed * Math.sin(_local3));
if (walls.hitTest(_local5, _local4, true)) {
tgtX = _local5;
tgtY = _local4;
break;
}
_local2 = _local2 + 2;
}
_local6 = _local6 + 10;
}
}
var _local11 = tgtX - this._x;
var _local10 = tgtY - this._y;
direction = Math.atan2(_local10, _local11);
var _local13 = dAngleDegree((direction * 180) / Math.PI, this._rotation);
this._rotation = this._rotation + (_local13 * 0.2);
if (z1_move) {
this._x = tgtX;
this._y = tgtY;
this.legs.play();
}
}
} else {
placeDeath(this._x, this._y, this.getDepth());
}
};
z2_speed = 1.5;
var z2_health = 60;
z2_move = 1;
zomb2.onEnterFrame = function () {
if (z2_health > 0) {
var _local9 = player._x - this._x;
var _local8 = player._y - this._y;
if (this.hitter.hitTest(hitter)) {
this.hands.play();
p_health = p_health - 1;
}
var _local7 = Math.atan2(_local8, _local9);
var _local12 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local12 > z2_speed) {
tgtX = this._x + (z2_speed * Math.cos(_local7));
tgtY = this._y + (z2_speed * Math.sin(_local7));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local13 = dAngleRadian(direction, _local7);
workAngle = _local7 + (_local13 * 0.8);
var _local6 = 0;
while (_local6 < 360) {
var _local2 = -1;
while (_local2 <= 1) {
var _local3 = workAngle + (radian(_local6) * _local2);
var _local5 = this._x + (z2_speed * Math.cos(_local3));
var _local4 = this._y + (z2_speed * Math.sin(_local3));
if (walls.hitTest(_local5, _local4, true)) {
tgtX = _local5;
tgtY = _local4;
break;
}
_local2 = _local2 + 2;
}
_local6 = _local6 + 10;
}
}
var _local11 = tgtX - this._x;
var _local10 = tgtY - this._y;
direction = Math.atan2(_local10, _local11);
var _local13 = dAngleDegree((direction * 180) / Math.PI, this._rotation);
this._rotation = this._rotation + (_local13 * 0.2);
if (z2_move) {
this._x = tgtX;
this._y = tgtY;
this.legs.play();
}
}
} else {
placeDeath(this._x, this._y, this.getDepth());
}
};
z3_speed = 1.1;
var z3_health = 60;
z3_move = 1;
zomb3.onEnterFrame = function () {
if (z3_health > 0) {
if (dur1) {
var _local9 = player._x - this._x;
var _local8 = player._y - this._y;
}
if (this.hitter.hitTest(hitter)) {
this.hands.play();
p_health = p_health - 1;
}
var _local7 = Math.atan2(_local8, _local9);
var _local12 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local12 > z3_speed) {
tgtX = this._x + (z3_speed * Math.cos(_local7));
tgtY = this._y + (z3_speed * Math.sin(_local7));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local13 = dAngleRadian(direction, _local7);
workAngle = _local7 + (_local13 * 0.8);
var _local6 = 0;
while (_local6 < 360) {
var _local2 = -1;
while (_local2 <= 1) {
var _local3 = workAngle + (radian(_local6) * _local2);
var _local5 = this._x + (z1_speed * Math.cos(_local3));
var _local4 = this._y + (z1_speed * Math.sin(_local3));
if (walls.hitTest(_local5, _local4, true)) {
tgtX = _local5;
tgtY = _local4;
break;
}
_local2 = _local2 + 2;
}
_local6 = _local6 + 10;
}
}
var _local11 = tgtX - this._x;
var _local10 = tgtY - this._y;
direction = Math.atan2(_local10, _local11);
var _local13 = dAngleDegree((direction * 180) / Math.PI, this._rotation);
this._rotation = this._rotation + (_local13 * 0.2);
if (z3_move) {
this._x = tgtX;
this._y = tgtY;
this.legs.play();
}
}
} else {
placeDeath(this._x, this._y, this.getDepth());
}
};
var dur2 = 0;
z4_speed = 1.1;
var z4_health = 60;
z4_move = 1;
zomb4.onEnterFrame = function () {
if (z4_health > 0) {
if (dur2) {
var _local9 = player._x - this._x;
var _local8 = player._y - this._y;
}
if (this.hitter.hitTest(hitter)) {
this.hands.play();
p_health = p_health - 1;
}
var _local7 = Math.atan2(_local8, _local9);
var _local12 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local12 > z4_speed) {
tgtX = this._x + (z4_speed * Math.cos(_local7));
tgtY = this._y + (z4_speed * Math.sin(_local7));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local13 = dAngleRadian(direction, _local7);
workAngle = _local7 + (_local13 * 0.8);
var _local6 = 0;
while (_local6 < 360) {
var _local2 = -1;
while (_local2 <= 1) {
var _local3 = workAngle + (radian(_local6) * _local2);
var _local5 = this._x + (z1_speed * Math.cos(_local3));
var _local4 = this._y + (z1_speed * Math.sin(_local3));
if (walls.hitTest(_local5, _local4, true)) {
tgtX = _local5;
tgtY = _local4;
break;
}
_local2 = _local2 + 2;
}
_local6 = _local6 + 10;
}
}
var _local11 = tgtX - this._x;
var _local10 = tgtY - this._y;
direction = Math.atan2(_local10, _local11);
var _local13 = dAngleDegree((direction * 180) / Math.PI, this._rotation);
this._rotation = this._rotation + (_local13 * 0.2);
if (z4_move) {
this._x = tgtX;
this._y = tgtY;
this.legs.play();
}
}
} else {
placeDeath(this._x, this._y, this.getDepth());
}
};
z5_speed = 1.1;
var z5_health = 60;
z5_move = 1;
zomb5.onEnterFrame = function () {
if (z5_health > 0) {
if (dur2) {
var _local9 = player._x - this._x;
var _local8 = player._y - this._y;
}
if (this.hitter.hitTest(hitter)) {
this.hands.play();
p_health = p_health - 1;
}
var _local7 = Math.atan2(_local8, _local9);
var _local12 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local12 > z5_speed) {
tgtX = this._x + (z5_speed * Math.cos(_local7));
tgtY = this._y + (z5_speed * Math.sin(_local7));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local13 = dAngleRadian(direction, _local7);
workAngle = _local7 + (_local13 * 0.8);
var _local6 = 0;
while (_local6 < 360) {
var _local2 = -1;
while (_local2 <= 1) {
var _local3 = workAngle + (radian(_local6) * _local2);
var _local5 = this._x + (z1_speed * Math.cos(_local3));
var _local4 = this._y + (z1_speed * Math.sin(_local3));
if (walls.hitTest(_local5, _local4, true)) {
tgtX = _local5;
tgtY = _local4;
break;
}
_local2 = _local2 + 2;
}
_local6 = _local6 + 10;
}
}
var _local11 = tgtX - this._x;
var _local10 = tgtY - this._y;
direction = Math.atan2(_local10, _local11);
var _local13 = dAngleDegree((direction * 180) / Math.PI, this._rotation);
this._rotation = this._rotation + (_local13 * 0.2);
if (z5_move) {
this._x = tgtX;
this._y = tgtY;
this.legs.play();
}
}
} else {
placeDeath(this._x, this._y, this.getDepth());
}
};
vrag1.onRollOver = function () {
los1._visible = 1;
};
vrag1.onRollOut = function () {
los1._visible = 0;
};
vrag1.onReleaseOutside = function () {
los1._visible = 0;
};
vrag2.onRollOver = function () {
los2._visible = 1;
};
vrag2.onRollOut = function () {
los2._visible = 0;
};
vrag2.onReleaseOutside = function () {
los2._visible = 0;
};
vrag3.onRollOver = function () {
los3._visible = 1;
};
vrag3.onRollOut = function () {
los3._visible = 0;
};
vrag3.onReleaseOutside = function () {
los3._visible = 0;
};
Instance of Symbol 496 MovieClip in Frame 248
onClipEvent (enterFrame) {
this._x = player._x;
this._y = player._y;
}
Instance of Symbol 197 MovieClip in Frame 248
on (keyPress "<?#19>") {
_root.gotoAndPlay("inchange");
defeat.Key.removeListener(keyListener);
Key.removeListener(keyListener);
Key.removeListener(defeat.keyListener);
victory.Key.removeListener(keyListener2);
Key.removeListener(victory.keyListener2);
Key.removeListener(keyListener2);
}
Instance of Symbol 530 MovieClip in Frame 248
onClipEvent (load) {
startDrag (this, true);
Mouse.hide();
}
onClipEvent (enterFrame) {
Mouse.hide();
}
Frame 250
stopAllSounds();
my_sound2.start();
my_sound2.onSoundComplete = function () {
my_sound2.start();
};
var my_train = new Sound();
my_train.attachSound("train");
my_train.start();
my_train.onSoundComplete = function () {
train.start();
};
function placeBoom(x, y) {
levv++;
var _local1 = boom.duplicateMovieClip("bdoom" + levv, levv);
_local1._x = x;
_local1._y = y;
}
function placeBadaboom(x, y) {
levvv++;
var _local1 = badaboom.duplicateMovieClip("badadoom" + levvv, levvv);
_local1._x = x;
_local1._y = y;
if (_local1.hitTest(player.hitter)) {
difx = _local1._x - player._x;
dify = _local1._y - player._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
p_health = p_health - (120 - diff);
}
if (_local1.hitTest(vrag1.hitter)) {
difx = _local1._x - vrag1._x;
dify = _local1._y - vrag1._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
v1_health = v1_health - (180 - diff);
}
if (_local1.hitTest(vrag2.hitter)) {
difx = _local1._x - vrag2._x;
dify = _local1._y - vrag2._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
v2_health = v2_health - (180 - diff);
}
if (_local1.hitTest(vrag3.hitter)) {
difx = _local1._x - vrag3._x;
dify = _local1._y - vrag3._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
v3_health = v3_health - (180 - diff);
}
if (_local1.hitTest(vrag4.hitter)) {
difx = _local1._x - vrag4._x;
dify = _local1._y - vrag4._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
v4_health = v4_health - (180 - diff);
}
if (_local1.hitTest(vrag5.hitter)) {
difx = _local1._x - vrag5._x;
dify = _local1._y - vrag5._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
v5_health = v5_health - (180 - diff);
}
if ((((_local1.hitTest(los1) || (_local1.hitTest(los2))) || (_local1.hitTest(los3))) || (_local1.hitTest(los4))) || (_local1.hitTest(los5))) {
v1_spotted = 1;
v2_spotted = 1;
v3_spotted = 1;
v4_spotted = 1;
v5_spotted = 1;
}
}
function placeBlood(x, y, rotation) {
leb++;
var _local1 = blood.duplicateMovieClip("blood" + leb, leb);
_local1._x = x;
_local1._y = y;
_local1._rotation = rotation;
}
function placeDeath(x, y) {
det++;
var dd = dea.death.duplicateMovieClip("blood" + det, det);
dd._x = x;
dd._y = y;
dd._rotation = rotation;
deathsound.start();
dd.onEnterFrame = function () {
if (dd._x > -20) {
dd._x = dd._x - 25;
} else {
dd.removeMovieClip();
}
};
}
function dAngleRadian(a1, a2) {
var _local1 = a1 - a2;
if (_local1 > Math.PI) {
_local1 = -6.28318530717959 + _local1;
} else if (_local1 < -3.14159265358979) {
_local1 = (Math.PI*2) + _local1;
}
return(_local1);
}
function dAngleDegree(a1, a2) {
var _local1 = a1 - a2;
if (_local1 > 180) {
_local1 = -360 + _local1;
} else if (_local1 < -180) {
_local1 = 360 + _local1;
}
return(_local1);
}
function degree(a) {
return((a / Math.PI) * 180);
}
function radian(a) {
return((a / 180) * Math.PI);
}
var suckmygun = 0;
_root.firebtn.onPress = function () {
suckmygun = 1;
};
_root.firebtn.onRelease = function () {
suckmygun = 0;
};
_root.firebtn.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag1.onPress = function () {
suckmygun = 1;
};
_root.vrag1.onRelease = function () {
suckmygun = 0;
};
_root.vrag1.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag2.onPress = function () {
suckmygun = 1;
};
_root.vrag2.onRelease = function () {
suckmygun = 0;
};
_root.vrag2.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag3.onPress = function () {
suckmygun = 1;
};
_root.vrag3.onRelease = function () {
suckmygun = 0;
};
_root.vrag3.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag4.onPress = function () {
suckmygun = 1;
};
_root.vrag4.onRelease = function () {
suckmygun = 0;
};
_root.vrag4.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag5.onPress = function () {
suckmygun = 1;
};
_root.vrag5.onRelease = function () {
suckmygun = 0;
};
_root.vrag5.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag10.onPress = function () {
suckmygun = 1;
};
_root.vrag10.onRelease = function () {
suckmygun = 0;
};
_root.vrag10.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag11.onPress = function () {
suckmygun = 1;
};
_root.vrag11.onRelease = function () {
suckmygun = 0;
};
_root.vrag11.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag12.onPress = function () {
suckmygun = 1;
};
_root.vrag12.onRelease = function () {
suckmygun = 0;
};
_root.vrag12.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag14.onPress = function () {
suckmygun = 1;
};
_root.vrag14.onRelease = function () {
suckmygun = 0;
};
_root.vrag14.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb1.onPress = function () {
suckmygun = 1;
};
_root.zomb1.onRelease = function () {
suckmygun = 0;
};
_root.zomb1.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb2.onPress = function () {
suckmygun = 1;
};
_root.zomb2.onRelease = function () {
suckmygun = 0;
};
_root.zomb2.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb3.onPress = function () {
suckmygun = 1;
};
_root.zomb3.onRelease = function () {
suckmygun = 0;
};
_root.zomb3.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb4.onPress = function () {
suckmygun = 1;
};
_root.zomb4.onRelease = function () {
suckmygun = 0;
};
_root.zomb4.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb5.onPress = function () {
suckmygun = 1;
};
_root.zomb5.onRelease = function () {
suckmygun = 0;
};
_root.zomb5.onReleaseOutside = function () {
suckmygun = 0;
};
stop();
_global.deton = 0;
dea._visible = 0;
var p_speed = 4;
var rotToMouseSpeed = 12;
var bS1 = 20;
var bS2 = 18;
var bS3 = 22;
var bS4 = 15;
var grenSpeed = 15;
var p_health = 100;
_global.current_w = 3;
var vkey1 = 0;
gkey1._visible = 0;
_global.ammo1 = 27;
_global.ammo2 = 21;
_global.ammo3 = 60;
_global.ammo4 = 0;
_global.ammog = 1;
var w1_ok = 1;
var w2_ok = 2;
var w3_ok = 3;
var w4_ok = 0;
los1._visible = 0;
los2._visible = 0;
los3._visible = 0;
los4._visible = 0;
los5._visible = 0;
_global.selected_w;
var xpluz = 0;
var ypluz = 0;
var bulletSpeed;
if (w1_ok) {
gui_weap.weap_none1._visible = 0;
}
if (w2_ok) {
gui_weap.weap_none2._visible = 0;
}
if (w3_ok) {
gui_weap.weap_none3._visible = 0;
}
if (w4_ok) {
gui_weap.weap_none4._visible = 0;
}
gui_weap.sel_light.gotoAndStop(_global.current_w + 1);
player.hands._visible = 0;
player.hands1._visible = 0;
player.hands2._visible = 0;
player.hands3._visible = 0;
player.hands4._visible = 0;
player.handsg._visible = 0;
switch (current_w) {
case 0 :
player.hands._visible = 1;
break;
case 1 :
player.hands1._visible = 1;
bulletSpeed = bS1;
break;
case 2 :
player.hands2._visible = 1;
bulletSpeed = bS2;
break;
case 3 :
player.hands3._visible = 1;
bulletSpeed = bS3;
break;
case 4 :
player.hands4._visible = 1;
bulletSpeed = bS4;
}
defeat.gotoAndStop(1);
victory.gotoAndStop(1);
_global.timer = 0;
var timeto = 90;
player.onEnterFrame = function () {
if (p_health < 1) {
pluser.stop();
health_t.text = 0;
if (player._currentframe == 1) {
player.play();
player._name = "gsom";
defeat.play();
}
} else {
if (timer == timeto) {
pluser.stop();
player._name = "gsom";
hitter._name = "gsom2";
victory.play();
var _local5 = SharedObject.getLocal("numlevs");
if (_local5.data.num < 8) {
_local5.data.num = 8;
_local5.flush();
}
}
if (grenp._currentframe == 1) {
if (hitter.hitTest(grenp)) {
grenp.hitter._visible = 1;
if (Key.isDown(32)) {
grenp.play();
_global.ammog = 2;
grenpicked.play();
}
} else {
grenp.hitter._visible = 0;
}
}
if (radd._currentframe == 1) {
if (Key.isDown(81)) {
radd.play();
if (_global.deton == 1) {
_global.deton = 0;
_root.raddet.dettt._width = 0;
_root.raddet.gotoAndStop(1);
p_speed = p_speed * 2;
} else {
_global.deton = 1;
_root.raddet.gotoAndStop(2);
p_speed = p_speed / 2;
}
}
}
grens.text = _global.ammog;
switch (_global.current_w) {
case 0 :
ammo_cur.text = "0";
break;
case 1 :
ammo_cur.text = _global.ammo1;
break;
case 2 :
ammo_cur.text = _global.ammo2;
break;
case 3 :
ammo_cur.text = _global.ammo3;
break;
case 4 :
ammo_cur.text = _global.ammo4;
}
health_t.text = p_health;
switch (Key.isDown(87) - Key.isDown(83)) {
case 1 :
ypluz = -10;
break;
case -1 :
ypluz = 10;
break;
default :
ypluz = 0;
}
switch (Key.isDown(68) - Key.isDown(65)) {
case 1 :
xpluz = 10;
break;
case -1 :
xpluz = -10;
break;
default :
xpluz = 0;
}
delta_x = _xmouse - player._x;
delta_y = _ymouse - player._y;
mAngle = Math.atan2(delta_y, delta_x);
mAngleD = (mAngle / Math.PI) * 180;
dAngleD = player._rotation - mAngleD;
if (dAngleD > 180) {
dAngleD = -360 + dAngleD;
} else if (dAngleD < -180) {
dAngleD = 360 + dAngleD;
}
if (Math.abs(dAngleD) < rotToMouseSpeed) {
player._rotation = player._rotation - dAngleD;
} else if (dAngleD > 0) {
player._rotation = player._rotation - rotToMouseSpeed;
} else {
player._rotation = player._rotation + rotToMouseSpeed;
}
_root.hitter._x = _root.player._x + xpluz;
_root.hitter._y = _root.player._y + ypluz;
_root.hitter._rotation = _root.player._rotation;
var _local4 = hitter._x - player._x;
var _local3 = hitter._y - player._y;
var _local6 = Math.atan2(_local3, _local4);
var _local7 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if (_local7 > p_speed) {
tgtX = player._x + (p_speed * Math.cos(_local6));
tgtY = player._y + (p_speed * Math.sin(_local6));
if (walls.hitTest(tgtX, tgtY, true)) {
player._x = tgtX;
player._y = tgtY;
player.legs.play();
}
}
if ((change._currentFrame == 1) && (gren._currentFrame == 1)) {
if (w1_ok) {
if (Key.isDown(49) && (_global.current_w != 1)) {
_global.selected_w = 1;
bulletSpeed = bS1;
change.gotoAndPlay(1);
}
}
if (w2_ok) {
if (Key.isDown(50) && (_global.current_w != 2)) {
_global.selected_w = 2;
bulletSpeed = bS2;
change.gotoAndPlay(1);
}
}
if (w3_ok) {
if (Key.isDown(51) && (_global.current_w != 3)) {
_global.selected_w = 3;
bulletSpeed = bS3;
change.gotoAndPlay(1);
}
}
if (w4_ok) {
if (Key.isDown(52) && (_global.current_w != 4)) {
_global.selected_w = 4;
bulletSpeed = bS4;
change.gotoAndPlay(1);
}
}
}
if (suckmygun == 1) {
if (!exit.hitTest(_xmouse, _ymouse, true)) {
switch (_global.current_w) {
case 1 :
if (_global.ammo1 > 0) {
if ((player.hands1._currentframe == 8) || (player.hands1._currentframe == 10)) {
player.hands1.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
break;
case 2 :
if (_global.ammo2 > 0) {
if ((player.hands2._currentframe == 7) || (player.hands2._currentframe == 13)) {
player.hands2.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
break;
case 3 :
if (_global.ammo3 > 0) {
if ((player.hands3._currentframe == 7) || (player.hands3._currentframe == 9)) {
player.hands3.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
break;
case 4 :
if (_global.ammo4 > 0) {
if ((player.hands4._currentframe == 7) || (player.hands4._currentframe == 9)) {
player.hands4.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
}
}
}
if (Key.isDown(71)) {
if (_global.ammog > 0) {
if (_root.gren._currentFrame == 1) {
_root.gren.gotoAndPlay(1);
}
}
}
}
};
var lev = 0;
placeBullet = function (tgt) {
lev++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls2.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("b" + lev, lev);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((player._rotation + tgt._rotation) - 90) + random(3);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(vrag1.hitter)) {
v1_health = v1_health - 8;
v1_spotted = 1;
this.removeMovieClip();
placeBlood(vrag1._x, vrag1._y, vrag1._rotation - 180);
}
if (this.hitTest(vrag2.hitter)) {
v2_health = v2_health - 8;
v2_spotted = 1;
this.removeMovieClip();
placeBlood(vrag2._x, vrag2._y, vrag2._rotation - 180);
}
if (this.hitTest(vrag3.hitter)) {
v3_health = v3_health - 8;
v3_spotted = 1;
this.removeMovieClip();
placeBlood(vrag3._x, vrag3._y, vrag3._rotation - 180);
}
if (this.hitTest(vrag4.hitter)) {
v4_health = v4_health - 8;
v4_spotted = 1;
this.removeMovieClip();
placeBlood(vrag4._x, vrag4._y, vrag4._rotation - 180);
}
if (this.hitTest(vrag5.hitter)) {
v5_health = v5_health - 8;
v5_spotted = 1;
this.removeMovieClip();
placeBlood(vrag5._x, vrag5._y, vrag5._rotation - 180);
}
if (this.hitTest(los1)) {
v1_spotted = 1;
}
if (this.hitTest(los2)) {
v2_spotted = 1;
}
if (this.hitTest(los3)) {
v3_spotted = 1;
}
if (this.hitTest(los4)) {
v4_spotted = 1;
}
if (this.hitTest(los5)) {
v5_spotted = 1;
}
if (_root.bwalls2.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls2.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls2.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls2.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var leve = 0;
placeEBullet = function (tgt) {
leve++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve, leve);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((vrag1._rotation + tgt._rotation) - 93) + random(5);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 2;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var leve2 = 0;
placeE2Bullet = function (tgt) {
leve2++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve2, leve2);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((vrag2._rotation + tgt._rotation) - 93) + random(5);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 2;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var leve3 = 0;
placeE3Bullet = function (tgt) {
leve3++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve3, leve3);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((vrag3._rotation + tgt._rotation) - 93) + random(5);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 2;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var leve4 = 0;
placeE4Bullet = function (tgt) {
leve4++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve4, leve4);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((vrag4._rotation + tgt._rotation) - 93) + random(1);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 2;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var leve5 = 0;
placeE5Bullet = function (tgt) {
leve5++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve5, leve5);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((vrag5._rotation + tgt._rotation) - 93) + random(1);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 2;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var led = 0;
placeGren = function (tr) {
led++;
var _local3 = {x:tr._x, y:tr._y, rotation:tr._rotation};
tr._parent.localToGlobal(_local3);
globalToLocal(_local3);
var d = grena.duplicateMovieClip("b" + led, led);
d._x = _local3.x;
d._y = _local3.y;
d._rotation = player._rotation;
d.a = (d._rotation / 180) * Math.PI;
d.clickSpot_x = _root._xmouse;
d.clickSpot_y = _root._ymouse;
d.onEnterFrame = function () {
gotoSpotX = d.clickSpot_x;
gotoSpotY = d.clickSpot_y;
delta_x = this._x - gotoSpotX;
delta_y = this._y - gotoSpotY;
if (Math.sqrt((delta_x * delta_x) + (delta_y * delta_y)) > grenSpeed) {
this._x = this._x + (grenSpeed * Math.cos(this.a));
this._y = this._y + (grenSpeed * Math.sin(this.a));
this._rotation = this._rotation - 10;
} else {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
};
};
boom._visible = false;
var levv = 0;
badaboom._visible = false;
var levvv = 0;
blood._visible = false;
var leb = 0;
death._visible = false;
var det = 0;
radlight.onEnterFrame = function () {
var _local5 = radlight._x - player._x;
var _local4 = radlight._y - player._y;
var _local3 = Math.sqrt((_local5 * _local5) + (_local4 * _local4));
_global.hrrr = 100 - _local3;
_root.dettt._width = hrrr;
if (_local3 < 150) {
radlight.alpha = _local3 - 50;
} else {
radlight.alpha = 100;
}
};
v1_speed = 2;
var v1_spotted = 0;
var v1_health = 20;
_global.v1_move = 1;
vrag1.onEnterFrame = function () {
if (v1_health > 0) {
los1._x = vrag1._x;
los1._y = vrag1._y;
los1._rotation = vrag1._rotation;
if (los1.hitTest(hitter)) {
v1_spotted = 1;
}
if (los1.thin.hitTest(hitter)) {
beh1.play();
} else {
beh1.gotoAndPlay("halt");
}
if (v1_spotted == 1) {
var _local9 = player._x - vrag1._x;
var _local8 = player._y - vrag1._y;
} else {
var _local9 = s1.pp._x - vrag1._x;
var _local8 = s1.pp._y - vrag1._y;
if (vrag1.hitTest(s1.pp)) {
s1.play();
}
}
var _local7 = Math.atan2(_local8, _local9);
var _local12 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local12 > v1_speed) {
tgtX = vrag1._x + (v1_speed * Math.cos(_local7));
tgtY = vrag1._y + (v1_speed * Math.sin(_local7));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local13 = dAngleRadian(direction, _local7);
workAngle = _local7 + (_local13 * 0.8);
var _local6 = 0;
while (_local6 < 360) {
var _local2 = -1;
while (_local2 <= 1) {
var _local3 = workAngle + (radian(_local6) * _local2);
var _local5 = vrag1._x + (v1_speed * Math.cos(_local3));
var _local4 = vrag1._y + (v1_speed * Math.sin(_local3));
if (walls.hitTest(_local5, _local4, true)) {
tgtX = _local5;
tgtY = _local4;
break;
}
_local2 = _local2 + 2;
}
_local6 = _local6 + 10;
}
}
var _local11 = tgtX - vrag1._x;
var _local10 = tgtY - vrag1._y;
direction = Math.atan2(_local10, _local11);
var _local13 = dAngleDegree((direction * 180) / Math.PI, vrag1._rotation);
vrag1._rotation = vrag1._rotation + (_local13 * 0.2);
}
} else {
placeDeath(vrag1._x, vrag1._y);
los1._visible = 0;
v1_health = 20;
this._x = -150;
}
};
v3_speed = 2;
var v3_spotted = 0;
var v3_health = 30;
_global.v3_move = 1;
vrag3.onEnterFrame = function () {
if (v3_health > 0) {
los3._x = vrag3._x;
los3._y = vrag3._y;
los3._rotation = vrag3._rotation;
if (los3.hitTest(hitter)) {
v3_spotted = 1;
}
if (los3.thin.hitTest(hitter)) {
beh3.play();
} else {
beh3.gotoAndPlay("halt");
}
if (v3_spotted == 1) {
var _local9 = player._x - vrag3._x;
var _local8 = player._y - vrag3._y;
}
var _local7 = Math.atan2(_local8, _local9);
var _local12 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local12 > v3_speed) {
tgtX = vrag3._x + (v3_speed * Math.cos(_local7));
tgtY = vrag3._y + (v3_speed * Math.sin(_local7));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local13 = dAngleRadian(direction, _local7);
workAngle = _local7 + (_local13 * 0.8);
var _local6 = 0;
while (_local6 < 360) {
var _local2 = -1;
while (_local2 <= 1) {
var _local3 = workAngle + (radian(_local6) * _local2);
var _local5 = vrag3._x + (v3_speed * Math.cos(_local3));
var _local4 = vrag3._y + (v3_speed * Math.sin(_local3));
if (walls.hitTest(_local5, _local4, true)) {
tgtX = _local5;
tgtY = _local4;
break;
}
_local2 = _local2 + 2;
}
_local6 = _local6 + 10;
}
}
var _local11 = tgtX - vrag3._x;
var _local10 = tgtY - vrag3._y;
direction = Math.atan2(_local10, _local11);
var _local13 = dAngleDegree((direction * 180) / Math.PI, vrag3._rotation);
vrag3._rotation = vrag3._rotation + (_local13 * 0.2);
}
} else {
placeDeath(vrag3._x, vrag3._y);
los3._visible = 0;
v3_health = 20;
this._x = -100;
}
};
v4_speed = 2;
var v4_spotted = 0;
var v4_health = 30;
_global.v4_move = 1;
vrag4.onEnterFrame = function () {
if (v4_health > 0) {
los4._x = vrag4._x;
los4._y = vrag4._y;
los4._rotation = vrag4._rotation;
if (los4.hitTest(hitter)) {
v4_spotted = 1;
}
if (los4.thin.hitTest(hitter)) {
beh4.play();
} else {
beh4.gotoAndPlay("halt");
}
if (v4_spotted == 1) {
var _local9 = player._x - vrag4._x;
var _local8 = player._y - vrag4._y;
}
var _local7 = Math.atan2(_local8, _local9);
var _local12 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local12 > v4_speed) {
tgtX = vrag4._x + (v4_speed * Math.cos(_local7));
tgtY = vrag4._y + (v4_speed * Math.sin(_local7));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local13 = dAngleRadian(direction, _local7);
workAngle = _local7 + (_local13 * 0.8);
var _local6 = 0;
while (_local6 < 360) {
var _local2 = -1;
while (_local2 <= 1) {
var _local3 = workAngle + (radian(_local6) * _local2);
var _local5 = vrag4._x + (v4_speed * Math.cos(_local3));
var _local4 = vrag4._y + (v4_speed * Math.sin(_local3));
if (walls.hitTest(_local5, _local4, true)) {
tgtX = _local5;
tgtY = _local4;
break;
}
_local2 = _local2 + 2;
}
_local6 = _local6 + 10;
}
}
var _local11 = tgtX - vrag4._x;
var _local10 = tgtY - vrag4._y;
direction = Math.atan2(_local10, _local11);
var _local13 = dAngleDegree((direction * 180) / Math.PI, vrag4._rotation);
vrag4._rotation = vrag4._rotation + (_local13 * 0.2);
}
} else {
placeDeath(vrag4._x, vrag4._y);
los4._visible = 0;
v4_health = 25;
this._x = -100;
}
};
v2_speed = 2;
var v2_spotted = 0;
var v2_health = 20;
_global.v2_move = 1;
vrag2.onEnterFrame = function () {
if (v2_health > 0) {
los2._x = vrag2._x;
los2._y = vrag2._y;
los2._rotation = vrag2._rotation;
if (los2.hitTest(hitter)) {
v2_spotted = 1;
}
if (los2.thin.hitTest(hitter)) {
beh2.play();
} else {
beh2.gotoAndPlay("halt");
}
if (v2_spotted == 1) {
var _local9 = player._x - vrag2._x;
var _local8 = player._y - vrag2._y;
}
var _local7 = Math.atan2(_local8, _local9);
var _local12 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local12 > v2_speed) {
tgtX = vrag2._x + (v2_speed * Math.cos(_local7));
tgtY = vrag2._y + (v2_speed * Math.sin(_local7));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local13 = dAngleRadian(direction, _local7);
workAngle = _local7 + (_local13 * 0.8);
var _local6 = 0;
while (_local6 < 360) {
var _local2 = -1;
while (_local2 <= 1) {
var _local3 = workAngle + (radian(_local6) * _local2);
var _local5 = vrag2._x + (v2_speed * Math.cos(_local3));
var _local4 = vrag2._y + (v2_speed * Math.sin(_local3));
if (walls.hitTest(_local5, _local4, true)) {
tgtX = _local5;
tgtY = _local4;
break;
}
_local2 = _local2 + 2;
}
_local6 = _local6 + 10;
}
}
var _local11 = tgtX - vrag2._x;
var _local10 = tgtY - vrag2._y;
direction = Math.atan2(_local10, _local11);
var _local13 = dAngleDegree((direction * 180) / Math.PI, vrag2._rotation);
vrag2._rotation = vrag2._rotation + (_local13 * 0.2);
}
} else {
placeDeath(vrag2._x, vrag2._y);
los2._visible = 0;
v2_health = 20;
this._x = -100;
}
};
tach1.onEnterFrame = function () {
if (this.hitTest(vrag2)) {
vrag2._x = tach1.h1._x;
}
if (this.hitTest(vrag3)) {
vrag3._x = tach1.h2._x;
}
};
tach2.onEnterFrame = function () {
if (this.hitTest(vrag1)) {
vrag1._x = tach2.h3._x;
trace(vrag1._x);
}
if (this.hitTest(vrag4)) {
vrag4._x = tach2.h4._x;
}
};
vrag1.onRollOver = function () {
los1._visible = 1;
};
vrag1.onRollOut = function () {
los1._visible = 0;
};
vrag1.onReleaseOutside = function () {
los1._visible = 0;
};
vrag2.onRollOver = function () {
los2._visible = 1;
};
vrag2.onRollOut = function () {
los2._visible = 0;
};
vrag2.onReleaseOutside = function () {
los2._visible = 0;
};
vrag3.onRollOver = function () {
los3._visible = 1;
};
vrag3.onRollOut = function () {
los3._visible = 0;
};
vrag3.onReleaseOutside = function () {
los3._visible = 0;
};
vrag4.onRollOver = function () {
los4._visible = 1;
};
vrag4.onRollOut = function () {
los4._visible = 0;
};
vrag4.onReleaseOutside = function () {
los4._visible = 0;
};
Instance of Symbol 496 MovieClip in Frame 250
onClipEvent (enterFrame) {
this._x = player._x;
this._y = player._y;
}
Instance of Symbol 197 MovieClip in Frame 250
on (keyPress "<?#19>") {
_root.gotoAndPlay("inchange");
defeat.Key.removeListener(keyListener);
Key.removeListener(keyListener);
Key.removeListener(defeat.keyListener);
victory.Key.removeListener(keyListener2);
Key.removeListener(victory.keyListener2);
Key.removeListener(keyListener2);
}
Instance of Symbol 530 MovieClip in Frame 250
onClipEvent (load) {
startDrag (this, true);
Mouse.hide();
}
onClipEvent (enterFrame) {
Mouse.hide();
}
Frame 252
stopAllSounds();
my_sound2.start();
my_sound2.onSoundComplete = function () {
my_sound2.start();
};
function placeBoom(x, y) {
levv++;
var _local1 = boom.duplicateMovieClip("bdoom" + levv, levv);
_local1._x = x;
_local1._y = y;
}
function placeBadaboom(x, y) {
levvv++;
var _local1 = badaboom.duplicateMovieClip("badadoom" + levvv, levvv);
_local1._x = x;
_local1._y = y;
if (_local1.hitTest(player.hitter)) {
difx = _local1._x - player._x;
dify = _local1._y - player._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
p_health = p_health - (120 - diff);
}
if (_local1.hitTest(vrag1.hitter)) {
difx = _local1._x - vrag1._x;
dify = _local1._y - vrag1._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
v1_health = v1_health - (180 - diff);
}
if (_local1.hitTest(vrag2.hitter)) {
difx = _local1._x - vrag2._x;
dify = _local1._y - vrag2._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
v2_health = v2_health - (180 - diff);
}
if (_local1.hitTest(vrag3.hitter)) {
difx = _local1._x - vrag3._x;
dify = _local1._y - vrag3._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
v3_health = v3_health - (180 - diff);
}
if (_local1.hitTest(vrag4.hitter)) {
difx = _local1._x - vrag4._x;
dify = _local1._y - vrag4._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
v4_health = v4_health - (180 - diff);
}
if (_local1.hitTest(vrag5.hitter)) {
difx = _local1._x - vrag5._x;
dify = _local1._y - vrag5._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
v5_health = v5_health - (180 - diff);
}
if ((((_local1.hitTest(los1) || (_local1.hitTest(los2))) || (_local1.hitTest(los3))) || (_local1.hitTest(los4))) || (_local1.hitTest(los5))) {
v1_spotted = 1;
v2_spotted = 1;
v3_spotted = 1;
v4_spotted = 1;
v5_spotted = 1;
}
}
function placeBlood(x, y, rotation) {
leb++;
var _local1 = blood.duplicateMovieClip("blood" + leb, leb);
_local1._x = x;
_local1._y = y;
_local1._rotation = rotation;
}
function placeDeath(x, y, gloob) {
det++;
var _local1 = death.duplicateMovieClip("blood" + det, gloob);
_local1._x = x;
_local1._y = y;
_local1._rotation = rotation;
deathsound.start();
}
function dAngleRadian(a1, a2) {
var _local1 = a1 - a2;
if (_local1 > Math.PI) {
_local1 = -6.28318530717959 + _local1;
} else if (_local1 < -3.14159265358979) {
_local1 = (Math.PI*2) + _local1;
}
return(_local1);
}
function dAngleDegree(a1, a2) {
var _local1 = a1 - a2;
if (_local1 > 180) {
_local1 = -360 + _local1;
} else if (_local1 < -180) {
_local1 = 360 + _local1;
}
return(_local1);
}
function degree(a) {
return((a / Math.PI) * 180);
}
function radian(a) {
return((a / 180) * Math.PI);
}
var suckmygun = 0;
_root.firebtn.onPress = function () {
suckmygun = 1;
};
_root.firebtn.onRelease = function () {
suckmygun = 0;
};
_root.firebtn.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag1.onPress = function () {
suckmygun = 1;
};
_root.vrag1.onRelease = function () {
suckmygun = 0;
};
_root.vrag1.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag2.onPress = function () {
suckmygun = 1;
};
_root.vrag2.onRelease = function () {
suckmygun = 0;
};
_root.vrag2.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag3.onPress = function () {
suckmygun = 1;
};
_root.vrag3.onRelease = function () {
suckmygun = 0;
};
_root.vrag3.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag4.onPress = function () {
suckmygun = 1;
};
_root.vrag4.onRelease = function () {
suckmygun = 0;
};
_root.vrag4.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag5.onPress = function () {
suckmygun = 1;
};
_root.vrag5.onRelease = function () {
suckmygun = 0;
};
_root.vrag5.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag10.onPress = function () {
suckmygun = 1;
};
_root.vrag10.onRelease = function () {
suckmygun = 0;
};
_root.vrag10.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag11.onPress = function () {
suckmygun = 1;
};
_root.vrag11.onRelease = function () {
suckmygun = 0;
};
_root.vrag11.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag12.onPress = function () {
suckmygun = 1;
};
_root.vrag12.onRelease = function () {
suckmygun = 0;
};
_root.vrag12.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag14.onPress = function () {
suckmygun = 1;
};
_root.vrag14.onRelease = function () {
suckmygun = 0;
};
_root.vrag14.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb1.onPress = function () {
suckmygun = 1;
};
_root.zomb1.onRelease = function () {
suckmygun = 0;
};
_root.zomb1.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb2.onPress = function () {
suckmygun = 1;
};
_root.zomb2.onRelease = function () {
suckmygun = 0;
};
_root.zomb2.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb3.onPress = function () {
suckmygun = 1;
};
_root.zomb3.onRelease = function () {
suckmygun = 0;
};
_root.zomb3.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb4.onPress = function () {
suckmygun = 1;
};
_root.zomb4.onRelease = function () {
suckmygun = 0;
};
_root.zomb4.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb5.onPress = function () {
suckmygun = 1;
};
_root.zomb5.onRelease = function () {
suckmygun = 0;
};
_root.zomb5.onReleaseOutside = function () {
suckmygun = 0;
};
stop();
_global.deton = 0;
pick1._visible = 0;
var p_speed = 4;
var rotToMouseSpeed = 12;
var bS1 = 20;
var bS2 = 18;
var bS3 = 22;
var bS4 = 15;
var grenSpeed = 15;
var p_health = 100;
_global.current_w = 3;
var vkey1 = 0;
gkey1._visible = 0;
_global.ammo1 = 27;
_global.ammo2 = 21;
_global.ammo3 = 60;
_global.ammo4 = 0;
_global.ammog = 1;
var w1_ok = 1;
var w2_ok = 2;
var w3_ok = 3;
var w4_ok = 0;
los1._visible = 0;
los2._visible = 0;
los3._visible = 0;
los4._visible = 0;
los5._visible = 0;
_global.selected_w;
var xpluz = 0;
var ypluz = 0;
var bulletSpeed;
if (w1_ok) {
gui_weap.weap_none1._visible = 0;
}
if (w2_ok) {
gui_weap.weap_none2._visible = 0;
}
if (w3_ok) {
gui_weap.weap_none3._visible = 0;
}
if (w4_ok) {
gui_weap.weap_none4._visible = 0;
}
gui_weap.sel_light.gotoAndStop(_global.current_w + 1);
player.hands._visible = 0;
player.hands1._visible = 0;
player.hands2._visible = 0;
player.hands3._visible = 0;
player.hands4._visible = 0;
player.handsg._visible = 0;
switch (current_w) {
case 0 :
player.hands._visible = 1;
break;
case 1 :
player.hands1._visible = 1;
bulletSpeed = bS1;
break;
case 2 :
player.hands2._visible = 1;
bulletSpeed = bS2;
break;
case 3 :
player.hands3._visible = 1;
bulletSpeed = bS3;
break;
case 4 :
player.hands4._visible = 1;
bulletSpeed = bS4;
}
defeat.gotoAndStop(1);
victory.gotoAndStop(1);
var energy = 0;
var vrubleno = 0;
player.onEnterFrame = function () {
if (p_health < 1) {
health_t.text = 0;
if (player._currentframe == 1) {
player.play();
player._name = "gsom";
defeat.play();
}
} else {
if (hitter.hitTest(finish)) {
player._name = "gsom";
hitter._name = "gsom2";
victory.play();
var _local5 = SharedObject.getLocal("numlevs");
if (_local5.data.num < 9) {
_local5.data.num = 9;
_local5.flush();
}
}
if (rifle2._currentframe == 1) {
if (hitter.hitTest(rifle2)) {
rifle2.hitter._visible = 1;
pick1._visible = 1;
if (Key.isDown(32)) {
rifle2.play();
_global.ammo3 = _global.ammo3 + 30;
ammo3picked.play();
pick1._visible = 0;
}
} else {
rifle2.hitter._visible = 0;
pick1._visible = 0;
}
}
if (grenp._currentframe == 1) {
if (hitter.hitTest(grenp)) {
grenp.hitter._visible = 1;
pick1._visible = 1;
if (Key.isDown(32)) {
grenp.play();
_global.ammog = _global.ammog + 2;
grenpicked.play();
pick1._visible = 0;
}
} else {
grenp.hitter._visible = 0;
pick1._visible = 0;
}
}
if (radd._currentframe == 1) {
if (Key.isDown(81)) {
radd.play();
if (_global.deton == 1) {
_global.deton = 0;
_root.raddet.dettt._width = 0;
_root.raddet.gotoAndStop(1);
p_speed = p_speed * 2;
} else {
_global.deton = 1;
_root.raddet.gotoAndStop(2);
p_speed = p_speed / 2;
}
}
}
grens.text = _global.ammog;
switch (_global.current_w) {
case 0 :
ammo_cur.text = "0";
break;
case 1 :
ammo_cur.text = _global.ammo1;
break;
case 2 :
ammo_cur.text = _global.ammo2;
break;
case 3 :
ammo_cur.text = _global.ammo3;
break;
case 4 :
ammo_cur.text = _global.ammo4;
}
health_t.text = p_health;
switch (Key.isDown(87) - Key.isDown(83)) {
case 1 :
ypluz = -10;
break;
case -1 :
ypluz = 10;
break;
default :
ypluz = 0;
}
switch (Key.isDown(68) - Key.isDown(65)) {
case 1 :
xpluz = 10;
break;
case -1 :
xpluz = -10;
break;
default :
xpluz = 0;
}
delta_x = _xmouse - player._x;
delta_y = _ymouse - player._y;
mAngle = Math.atan2(delta_y, delta_x);
mAngleD = (mAngle / Math.PI) * 180;
dAngleD = player._rotation - mAngleD;
if (dAngleD > 180) {
dAngleD = -360 + dAngleD;
} else if (dAngleD < -180) {
dAngleD = 360 + dAngleD;
}
if (Math.abs(dAngleD) < rotToMouseSpeed) {
player._rotation = player._rotation - dAngleD;
} else if (dAngleD > 0) {
player._rotation = player._rotation - rotToMouseSpeed;
} else {
player._rotation = player._rotation + rotToMouseSpeed;
}
_root.hitter._x = _root.player._x + xpluz;
_root.hitter._y = _root.player._y;
_root.hittery._x = _root.player._x;
_root.hittery._y = _root.player._y + ypluz;
_root.hitter._rotation = _root.player._rotation;
var _local4 = hitter._x - player._x;
var _local3 = hittery._y - player._y;
var _local6 = Math.atan2(_local3, _local4);
var _local7 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if (_local7 > p_speed) {
tgtX = player._x + (p_speed * Math.cos(_local6));
tgtY = player._y + (p_speed * Math.sin(_local6));
if (walls.hitTest(hitter._x, hitter._y, true)) {
player._x = tgtX;
player.legs.play();
}
if (walls.hitTest(hittery._x, hittery._y, true)) {
player._y = tgtY;
player.legs.play();
}
}
if ((change._currentFrame == 1) && (gren._currentFrame == 1)) {
if (w1_ok) {
if (Key.isDown(49) && (_global.current_w != 1)) {
_global.selected_w = 1;
bulletSpeed = bS1;
change.gotoAndPlay(1);
}
}
if (w2_ok) {
if (Key.isDown(50) && (_global.current_w != 2)) {
_global.selected_w = 2;
bulletSpeed = bS2;
change.gotoAndPlay(1);
}
}
if (w3_ok) {
if (Key.isDown(51) && (_global.current_w != 3)) {
_global.selected_w = 3;
bulletSpeed = bS3;
change.gotoAndPlay(1);
}
}
if (w4_ok) {
if (Key.isDown(52) && (_global.current_w != 4)) {
_global.selected_w = 4;
bulletSpeed = bS4;
change.gotoAndPlay(1);
}
}
}
if (suckmygun == 1) {
if (!exit.hitTest(_xmouse, _ymouse, true)) {
switch (_global.current_w) {
case 1 :
if (_global.ammo1 > 0) {
if ((player.hands1._currentframe == 8) || (player.hands1._currentframe == 10)) {
player.hands1.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
break;
case 2 :
if (_global.ammo2 > 0) {
if ((player.hands2._currentframe == 7) || (player.hands2._currentframe == 13)) {
player.hands2.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
break;
case 3 :
if (_global.ammo3 > 0) {
if ((player.hands3._currentframe == 7) || (player.hands3._currentframe == 9)) {
player.hands3.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
break;
case 4 :
if (_global.ammo4 > 0) {
if ((player.hands4._currentframe == 7) || (player.hands4._currentframe == 9)) {
player.hands4.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
}
}
}
if (Key.isDown(71)) {
if (_global.ammog > 0) {
if (_root.gren._currentFrame == 1) {
_root.gren.gotoAndPlay(1);
}
}
}
}
};
var lev = 0;
placeBullet = function (tgt) {
lev++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("b" + lev, lev);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((player._rotation + tgt._rotation) - 90) + random(3);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(vrag1.hitter)) {
v1_health = v1_health - 8;
v1_spotted = 1;
this.removeMovieClip();
placeBlood(vrag1._x, vrag1._y, vrag1._rotation - 180);
}
if (this.hitTest(vrag2.hitter)) {
v2_health = v2_health - 8;
v2_spotted = 1;
this.removeMovieClip();
placeBlood(vrag2._x, vrag2._y, vrag2._rotation - 180);
}
if (this.hitTest(vrag3.hitter)) {
v3_health = v3_health - 8;
v3_spotted = 1;
this.removeMovieClip();
placeBlood(vrag3._x, vrag3._y, vrag3._rotation - 180);
}
if (this.hitTest(vrag4.hitter)) {
v4_health = v4_health - 8;
v4_spotted = 1;
this.removeMovieClip();
placeBlood(vrag4._x, vrag4._y, vrag4._rotation - 180);
}
if (this.hitTest(vrag5.hitter)) {
v5_health = v5_health - 8;
v5_spotted = 1;
this.removeMovieClip();
placeBlood(vrag5._x, vrag5._y, vrag5._rotation - 180);
}
if (this.hitTest(los1)) {
v1_spotted = 1;
}
if (this.hitTest(los2)) {
v2_spotted = 1;
}
if (this.hitTest(los3)) {
v3_spotted = 1;
}
if (this.hitTest(los4)) {
v4_spotted = 1;
}
if (this.hitTest(los5)) {
v5_spotted = 1;
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var leve = 0;
placeEBullet = function (tgt) {
leve++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve, leve);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((vrag1._rotation + tgt._rotation) - 93) + random(5);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 6;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var leve2 = 0;
placeE2Bullet = function (tgt) {
leve2++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve2, leve2);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((vrag2._rotation + tgt._rotation) - 93) + random(5);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 6;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var leve3 = 0;
placeE3Bullet = function (tgt) {
leve3++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve3, leve3);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((vrag3._rotation + tgt._rotation) - 93) + random(5);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 6;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var leve4 = 0;
placeE4Bullet = function (tgt) {
leve4++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve4, leve4);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((vrag4._rotation + tgt._rotation) - 93) + random(1);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 6;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var leve5 = 0;
placeE5Bullet = function (tgt) {
leve5++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve5, leve5);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((vrag5._rotation + tgt._rotation) - 93) + random(1);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 6;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var led = 0;
placeGren = function (tr) {
led++;
var _local3 = {x:tr._x, y:tr._y, rotation:tr._rotation};
tr._parent.localToGlobal(_local3);
globalToLocal(_local3);
var d = grena.duplicateMovieClip("b" + led, led);
d._x = _local3.x;
d._y = _local3.y;
d._rotation = player._rotation;
d.a = (d._rotation / 180) * Math.PI;
d.clickSpot_x = _root._xmouse;
d.clickSpot_y = _root._ymouse;
d.onEnterFrame = function () {
gotoSpotX = d.clickSpot_x;
gotoSpotY = d.clickSpot_y;
delta_x = this._x - gotoSpotX;
delta_y = this._y - gotoSpotY;
if (Math.sqrt((delta_x * delta_x) + (delta_y * delta_y)) > grenSpeed) {
this._x = this._x + (grenSpeed * Math.cos(this.a));
this._y = this._y + (grenSpeed * Math.sin(this.a));
this._rotation = this._rotation - 10;
} else {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
};
};
boom._visible = false;
var levv = 0;
badaboom._visible = false;
var levvv = 0;
blood._visible = false;
var leb = 0;
death._visible = false;
var det = 0;
radlight.onEnterFrame = function () {
var _local5 = radlight._x - player._x;
var _local4 = radlight._y - player._y;
var _local3 = Math.sqrt((_local5 * _local5) + (_local4 * _local4));
_global.hrrr = 100 - _local3;
_root.dettt._width = hrrr;
if (_local3 < 150) {
radlight.alpha = _local3 - 50;
} else {
radlight.alpha = 100;
}
};
v1_speed = 2;
var v1_spotted = 0;
var v1_health = 40;
_global.v1_move = 1;
vrag1.onEnterFrame = function () {
if (v1_health > 0) {
los1._x = vrag1._x;
los1._y = vrag1._y;
los1._rotation = vrag1._rotation;
if (los1.hitTest(hitter)) {
v1_spotted = 1;
}
if (los1.thin.hitTest(hitter)) {
beh1.play();
} else {
beh1.gotoAndPlay("halt");
}
if (v1_spotted == 1) {
var _local9 = player._x - vrag1._x;
var _local8 = player._y - vrag1._y;
} else {
var _local9 = s1.pp._x - vrag1._x;
var _local8 = s1.pp._y - vrag1._y;
if (vrag1.hitTest(s1.pp)) {
s1.play();
}
}
var _local7 = Math.atan2(_local8, _local9);
var _local12 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local12 > v1_speed) {
tgtX = vrag1._x + (v1_speed * Math.cos(_local7));
tgtY = vrag1._y + (v1_speed * Math.sin(_local7));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local13 = dAngleRadian(direction, _local7);
workAngle = _local7 + (_local13 * 0.8);
var _local6 = 0;
while (_local6 < 360) {
var _local2 = -1;
while (_local2 <= 1) {
var _local3 = workAngle + (radian(_local6) * _local2);
var _local5 = vrag1._x + (v1_speed * Math.cos(_local3));
var _local4 = vrag1._y + (v1_speed * Math.sin(_local3));
if (walls.hitTest(_local5, _local4, true)) {
tgtX = _local5;
tgtY = _local4;
break;
}
_local2 = _local2 + 2;
}
_local6 = _local6 + 10;
}
}
var _local11 = tgtX - vrag1._x;
var _local10 = tgtY - vrag1._y;
direction = Math.atan2(_local10, _local11);
var _local13 = dAngleDegree((direction * 180) / Math.PI, vrag1._rotation);
vrag1._rotation = vrag1._rotation + (_local13 * 0.2);
if (_global.v1_move) {
vrag1._x = tgtX;
vrag1._y = tgtY;
vrag1.legs.play();
}
}
} else {
placeDeath(vrag1._x, vrag1._y, vrag1.getDepth());
los1._visible = 0;
}
};
v5_speed = 2;
var v5_spotted = 0;
var v5_health = 40;
_global.v5_move = 1;
vrag5.onEnterFrame = function () {
if (v5_health > 0) {
los5._x = vrag5._x;
los5._y = vrag5._y;
los5._rotation = vrag5._rotation;
if (los5.hitTest(hitter)) {
v5_spotted = 1;
}
if (los5.thin.hitTest(hitter)) {
beh5.play();
} else {
beh5.gotoAndPlay("halt");
}
if (v5_spotted == 1) {
var _local9 = player._x - vrag5._x;
var _local8 = player._y - vrag5._y;
} else {
var _local9 = s5.pp._x - vrag5._x;
var _local8 = s5.pp._y - vrag5._y;
if (vrag5.hitTest(s5.pp)) {
s5.play();
}
}
var _local7 = Math.atan2(_local8, _local9);
var _local12 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local12 > v5_speed) {
tgtX = vrag5._x + (v5_speed * Math.cos(_local7));
tgtY = vrag5._y + (v5_speed * Math.sin(_local7));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local13 = dAngleRadian(direction, _local7);
workAngle = _local7 + (_local13 * 0.8);
var _local6 = 0;
while (_local6 < 360) {
var _local2 = -1;
while (_local2 <= 1) {
var _local3 = workAngle + (radian(_local6) * _local2);
var _local5 = vrag5._x + (v5_speed * Math.cos(_local3));
var _local4 = vrag5._y + (v5_speed * Math.sin(_local3));
if (walls.hitTest(_local5, _local4, true)) {
tgtX = _local5;
tgtY = _local4;
break;
}
_local2 = _local2 + 2;
}
_local6 = _local6 + 10;
}
}
var _local11 = tgtX - vrag5._x;
var _local10 = tgtY - vrag5._y;
direction = Math.atan2(_local10, _local11);
var _local13 = dAngleDegree((direction * 180) / Math.PI, vrag5._rotation);
vrag5._rotation = vrag5._rotation + (_local13 * 0.2);
if (_global.v5_move) {
vrag5._x = tgtX;
vrag5._y = tgtY;
vrag5.legs.play();
}
}
} else {
placeDeath(vrag5._x, vrag5._y, vrag5.getDepth());
los5._visible = 0;
}
};
v3_speed = 2;
var v3_spotted = 0;
var v3_health = 50;
_global.v3_move = 1;
vrag3.onEnterFrame = function () {
if (v3_health > 0) {
los3._x = vrag3._x;
los3._y = vrag3._y;
los3._rotation = vrag3._rotation;
if (los3.hitTest(hitter)) {
v3_spotted = 1;
}
if (los3.thin.hitTest(hitter)) {
beh3.play();
} else {
beh3.gotoAndPlay("halt");
}
if (v3_spotted == 1) {
var _local8 = player._x - vrag3._x;
var _local7 = player._y - vrag3._y;
}
var _local6 = Math.atan2(_local7, _local8);
var _local11 = Math.sqrt((_local8 * _local8) + (_local7 * _local7));
if (_local11 > v3_speed) {
tgtX = vrag3._x + (v3_speed * Math.cos(_local6));
tgtY = vrag3._y + (v3_speed * Math.sin(_local6));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local12 = dAngleRadian(direction, _local6);
workAngle = _local6 + (_local12 * 0.8);
var _local5 = 0;
while (_local5 < 360) {
var _local1 = -1;
while (_local1 <= 1) {
var _local2 = workAngle + (radian(_local5) * _local1);
var _local4 = vrag3._x + (v3_speed * Math.cos(_local2));
var _local3 = vrag3._y + (v3_speed * Math.sin(_local2));
if (walls.hitTest(_local4, _local3, true)) {
tgtX = _local4;
tgtY = _local3;
break;
}
_local1 = _local1 + 2;
}
_local5 = _local5 + 10;
}
}
var _local10 = tgtX - vrag3._x;
var _local9 = tgtY - vrag3._y;
direction = Math.atan2(_local9, _local10);
var _local12 = dAngleDegree((direction * 180) / Math.PI, vrag3._rotation);
vrag3._rotation = vrag3._rotation + (_local12 * 0.2);
}
} else {
placeDeath(vrag3._x, vrag3._y, vrag3.getDepth());
los3._visible = 0;
}
};
v4_speed = 2;
var v4_spotted = 0;
var v4_health = 50;
_global.v4_move = 1;
vrag4.onEnterFrame = function () {
if (v4_health > 0) {
los4._x = vrag4._x;
los4._y = vrag4._y;
los4._rotation = vrag4._rotation;
if (los4.hitTest(hitter)) {
v4_spotted = 1;
}
if (los4.thin.hitTest(hitter)) {
beh4.play();
} else {
beh4.gotoAndPlay("halt");
}
if (v4_spotted == 1) {
var _local8 = player._x - vrag4._x;
var _local7 = player._y - vrag4._y;
}
var _local6 = Math.atan2(_local7, _local8);
var _local11 = Math.sqrt((_local8 * _local8) + (_local7 * _local7));
if (_local11 > v4_speed) {
tgtX = vrag4._x + (v4_speed * Math.cos(_local6));
tgtY = vrag4._y + (v4_speed * Math.sin(_local6));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local12 = dAngleRadian(direction, _local6);
workAngle = _local6 + (_local12 * 0.8);
var _local5 = 0;
while (_local5 < 360) {
var _local1 = -1;
while (_local1 <= 1) {
var _local2 = workAngle + (radian(_local5) * _local1);
var _local4 = vrag4._x + (v4_speed * Math.cos(_local2));
var _local3 = vrag4._y + (v4_speed * Math.sin(_local2));
if (walls.hitTest(_local4, _local3, true)) {
tgtX = _local4;
tgtY = _local3;
break;
}
_local1 = _local1 + 2;
}
_local5 = _local5 + 10;
}
}
var _local10 = tgtX - vrag4._x;
var _local9 = tgtY - vrag4._y;
direction = Math.atan2(_local9, _local10);
var _local12 = dAngleDegree((direction * 180) / Math.PI, vrag4._rotation);
vrag4._rotation = vrag4._rotation + (_local12 * 0.2);
}
} else {
placeDeath(vrag4._x, vrag4._y, vrag4.getDepth());
los4._visible = 0;
}
};
v2_speed = 2;
var v2_spotted = 0;
var v2_health = 60;
_global.v2_move = 1;
vrag2.onEnterFrame = function () {
if (v2_health > 0) {
los2._x = vrag2._x;
los2._y = vrag2._y;
los2._rotation = vrag2._rotation;
if (los2.hitTest(hitter)) {
v2_spotted = 1;
}
if (los2.thin.hitTest(hitter)) {
beh2.play();
} else {
beh2.gotoAndPlay("halt");
}
if (v2_spotted == 1) {
var _local9 = player._x - vrag2._x;
var _local8 = player._y - vrag2._y;
}
var _local7 = Math.atan2(_local8, _local9);
var _local12 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local12 > v2_speed) {
tgtX = vrag2._x + (v2_speed * Math.cos(_local7));
tgtY = vrag2._y + (v2_speed * Math.sin(_local7));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local13 = dAngleRadian(direction, _local7);
workAngle = _local7 + (_local13 * 0.8);
var _local6 = 0;
while (_local6 < 360) {
var _local2 = -1;
while (_local2 <= 1) {
var _local3 = workAngle + (radian(_local6) * _local2);
var _local5 = vrag2._x + (v2_speed * Math.cos(_local3));
var _local4 = vrag2._y + (v2_speed * Math.sin(_local3));
if (walls.hitTest(_local5, _local4, true)) {
tgtX = _local5;
tgtY = _local4;
break;
}
_local2 = _local2 + 2;
}
_local6 = _local6 + 10;
}
}
var _local11 = tgtX - vrag2._x;
var _local10 = tgtY - vrag2._y;
direction = Math.atan2(_local10, _local11);
var _local13 = dAngleDegree((direction * 180) / Math.PI, vrag2._rotation);
vrag2._rotation = vrag2._rotation + (_local13 * 0.2);
if (_global.v2_move) {
vrag2._x = tgtX;
vrag2._y = tgtY;
vrag2.legs.play();
}
}
} else {
placeDeath(vrag2._x, vrag2._y, vrag2.getDepth());
los2._visible = 0;
}
};
vrag1.onRollOver = function () {
los1._visible = 1;
};
vrag1.onRollOut = function () {
los1._visible = 0;
};
vrag1.onReleaseOutside = function () {
los1._visible = 0;
};
vrag2.onRollOver = function () {
los2._visible = 1;
};
vrag2.onRollOut = function () {
los2._visible = 0;
};
vrag2.onReleaseOutside = function () {
los2._visible = 0;
};
vrag3.onRollOver = function () {
los3._visible = 1;
};
vrag3.onRollOut = function () {
los3._visible = 0;
};
vrag3.onReleaseOutside = function () {
los3._visible = 0;
};
vrag4.onRollOver = function () {
los4._visible = 1;
};
vrag4.onRollOut = function () {
los4._visible = 0;
};
vrag4.onReleaseOutside = function () {
los4._visible = 0;
};
vrag5.onRollOver = function () {
los5._visible = 1;
};
vrag5.onRollOut = function () {
los5._visible = 0;
};
vrag5.onReleaseOutside = function () {
los5._visible = 0;
};
Instance of Symbol 496 MovieClip in Frame 252
onClipEvent (enterFrame) {
this._x = player._x;
this._y = player._y;
}
Instance of Symbol 197 MovieClip in Frame 252
on (keyPress "<?#19>") {
_root.gotoAndPlay("inchange");
defeat.Key.removeListener(keyListener);
Key.removeListener(keyListener);
Key.removeListener(defeat.keyListener);
victory.Key.removeListener(keyListener2);
Key.removeListener(victory.keyListener2);
Key.removeListener(keyListener2);
}
Instance of Symbol 530 MovieClip in Frame 252
onClipEvent (load) {
startDrag (this, true);
Mouse.hide();
}
onClipEvent (enterFrame) {
Mouse.hide();
}
Frame 254
stopAllSounds();
my_sound2.start();
my_sound2.onSoundComplete = function () {
my_sound2.start();
};
function placeBoom(x, y) {
levv++;
var _local1 = boom.duplicateMovieClip("bdoom" + levv, levv);
_local1._x = x;
_local1._y = y;
}
function placeBadaboom(x, y) {
levvv++;
var _local1 = badaboom.duplicateMovieClip("badadoom" + levvv, levvv);
_local1._x = x;
_local1._y = y;
if (_local1.hitTest(player.hitter)) {
difx = _local1._x - player._x;
dify = _local1._y - player._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
p_health = p_health - (120 - diff);
}
if (_local1.hitTest(vrag1.hitter)) {
difx = _local1._x - vrag1._x;
dify = _local1._y - vrag1._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
v1_health = v1_health - (180 - diff);
}
if (_local1.hitTest(vrag2.hitter)) {
difx = _local1._x - vrag2._x;
dify = _local1._y - vrag2._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
v2_health = v2_health - (180 - diff);
}
if (_local1.hitTest(vrag3.hitter)) {
difx = _local1._x - vrag3._x;
dify = _local1._y - vrag3._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
v3_health = v3_health - (180 - diff);
}
if (_local1.hitTest(vrag4.hitter)) {
difx = _local1._x - vrag4._x;
dify = _local1._y - vrag4._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
v4_health = v4_health - (180 - diff);
}
if (_local1.hitTest(vrag5.hitter)) {
difx = _local1._x - vrag5._x;
dify = _local1._y - vrag5._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
v5_health = v5_health - (180 - diff);
}
if ((((_local1.hitTest(los1) || (_local1.hitTest(los2))) || (_local1.hitTest(los3))) || (_local1.hitTest(los4))) || (_local1.hitTest(los5))) {
v1_spotted = 1;
v2_spotted = 1;
v3_spotted = 1;
v4_spotted = 1;
v5_spotted = 1;
}
}
function placeBlood(x, y, rotation) {
leb++;
var _local1 = blood.duplicateMovieClip("blood" + leb, leb);
_local1._x = x;
_local1._y = y;
_local1._rotation = rotation;
}
function placeDeath(x, y, gloob) {
det++;
var _local1 = death.duplicateMovieClip("blood" + det, gloob);
_local1._x = x;
_local1._y = y;
_local1._rotation = rotation;
deathsound.start();
}
function dAngleRadian(a1, a2) {
var _local1 = a1 - a2;
if (_local1 > Math.PI) {
_local1 = -6.28318530717959 + _local1;
} else if (_local1 < -3.14159265358979) {
_local1 = (Math.PI*2) + _local1;
}
return(_local1);
}
function dAngleDegree(a1, a2) {
var _local1 = a1 - a2;
if (_local1 > 180) {
_local1 = -360 + _local1;
} else if (_local1 < -180) {
_local1 = 360 + _local1;
}
return(_local1);
}
function degree(a) {
return((a / Math.PI) * 180);
}
function radian(a) {
return((a / 180) * Math.PI);
}
var suckmygun = 0;
_root.firebtn.onPress = function () {
suckmygun = 1;
};
_root.firebtn.onRelease = function () {
suckmygun = 0;
};
_root.firebtn.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag1.onPress = function () {
suckmygun = 1;
};
_root.vrag1.onRelease = function () {
suckmygun = 0;
};
_root.vrag1.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag2.onPress = function () {
suckmygun = 1;
};
_root.vrag2.onRelease = function () {
suckmygun = 0;
};
_root.vrag2.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag3.onPress = function () {
suckmygun = 1;
};
_root.vrag3.onRelease = function () {
suckmygun = 0;
};
_root.vrag3.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag4.onPress = function () {
suckmygun = 1;
};
_root.vrag4.onRelease = function () {
suckmygun = 0;
};
_root.vrag4.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag5.onPress = function () {
suckmygun = 1;
};
_root.vrag5.onRelease = function () {
suckmygun = 0;
};
_root.vrag5.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag10.onPress = function () {
suckmygun = 1;
};
_root.vrag10.onRelease = function () {
suckmygun = 0;
};
_root.vrag10.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag11.onPress = function () {
suckmygun = 1;
};
_root.vrag11.onRelease = function () {
suckmygun = 0;
};
_root.vrag11.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag12.onPress = function () {
suckmygun = 1;
};
_root.vrag12.onRelease = function () {
suckmygun = 0;
};
_root.vrag12.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag14.onPress = function () {
suckmygun = 1;
};
_root.vrag14.onRelease = function () {
suckmygun = 0;
};
_root.vrag14.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb1.onPress = function () {
suckmygun = 1;
};
_root.zomb1.onRelease = function () {
suckmygun = 0;
};
_root.zomb1.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb2.onPress = function () {
suckmygun = 1;
};
_root.zomb2.onRelease = function () {
suckmygun = 0;
};
_root.zomb2.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb3.onPress = function () {
suckmygun = 1;
};
_root.zomb3.onRelease = function () {
suckmygun = 0;
};
_root.zomb3.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb4.onPress = function () {
suckmygun = 1;
};
_root.zomb4.onRelease = function () {
suckmygun = 0;
};
_root.zomb4.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb5.onPress = function () {
suckmygun = 1;
};
_root.zomb5.onRelease = function () {
suckmygun = 0;
};
_root.zomb5.onReleaseOutside = function () {
suckmygun = 0;
};
stop();
_global.deton = 0;
var p_speed = 4;
var rotToMouseSpeed = 12;
var bS1 = 20;
var bS2 = 18;
var bS3 = 22;
var bS4 = 15;
var grenSpeed = 15;
var p_health = 100;
_global.current_w = 3;
var vkey1 = 0;
gkey1._visible = 0;
_global.ammo1 = 27;
_global.ammo2 = 21;
_global.ammo3 = 60;
_global.ammo4 = 0;
_global.ammog = 2;
var w1_ok = 1;
var w2_ok = 2;
var w3_ok = 3;
var w4_ok = 0;
los1._visible = 0;
los2._visible = 0;
los3._visible = 0;
los4._visible = 0;
los5._visible = 0;
_global.selected_w;
var xpluz = 0;
var ypluz = 0;
var bulletSpeed;
if (w1_ok) {
gui_weap.weap_none1._visible = 0;
}
if (w2_ok) {
gui_weap.weap_none2._visible = 0;
}
if (w3_ok) {
gui_weap.weap_none3._visible = 0;
}
if (w4_ok) {
gui_weap.weap_none4._visible = 0;
}
gui_weap.sel_light.gotoAndStop(_global.current_w + 1);
player.hands._visible = 0;
player.hands1._visible = 0;
player.hands2._visible = 0;
player.hands3._visible = 0;
player.hands4._visible = 0;
player.handsg._visible = 0;
switch (current_w) {
case 0 :
player.hands._visible = 1;
break;
case 1 :
player.hands1._visible = 1;
bulletSpeed = bS1;
break;
case 2 :
player.hands2._visible = 1;
bulletSpeed = bS2;
break;
case 3 :
player.hands3._visible = 1;
bulletSpeed = bS3;
break;
case 4 :
player.hands4._visible = 1;
bulletSpeed = bS4;
}
defeat.gotoAndStop(1);
victory.gotoAndStop(1);
var energy = 0;
var vrubleno = 0;
player.onEnterFrame = function () {
if (p_health < 1) {
health_t.text = 0;
if (player._currentframe == 1) {
player.play();
player._name = "gsom";
defeat.play();
}
} else {
if (hitter.hitTest(finish)) {
player._name = "gsom";
hitter._name = "gsom2";
victory.play();
var _local5 = SharedObject.getLocal("numlevs");
if (_local5.data.num < 10) {
_local5.data.num = 10;
_local5.flush();
}
}
if (grenp._currentframe == 1) {
if (hitter.hitTest(grenp)) {
grenp.hitter._visible = 1;
if (Key.isDown(32)) {
grenp.play();
_global.ammog = 2;
grenpicked.play();
}
} else {
grenp.hitter._visible = 0;
}
}
if (radd._currentframe == 1) {
if (Key.isDown(81)) {
radd.play();
if (_global.deton == 1) {
_global.deton = 0;
_root.raddet.dettt._width = 0;
_root.raddet.gotoAndStop(1);
p_speed = p_speed * 2;
} else {
_global.deton = 1;
_root.raddet.gotoAndStop(2);
p_speed = p_speed / 2;
}
}
}
grens.text = _global.ammog;
switch (_global.current_w) {
case 0 :
ammo_cur.text = "0";
break;
case 1 :
ammo_cur.text = _global.ammo1;
break;
case 2 :
ammo_cur.text = _global.ammo2;
break;
case 3 :
ammo_cur.text = _global.ammo3;
break;
case 4 :
ammo_cur.text = _global.ammo4;
}
health_t.text = p_health;
switch (Key.isDown(87) - Key.isDown(83)) {
case 1 :
ypluz = -10;
break;
case -1 :
ypluz = 10;
break;
default :
ypluz = 0;
}
switch (Key.isDown(68) - Key.isDown(65)) {
case 1 :
xpluz = 10;
break;
case -1 :
xpluz = -10;
break;
default :
xpluz = 0;
}
delta_x = _xmouse - player._x;
delta_y = _ymouse - player._y;
mAngle = Math.atan2(delta_y, delta_x);
mAngleD = (mAngle / Math.PI) * 180;
dAngleD = player._rotation - mAngleD;
if (dAngleD > 180) {
dAngleD = -360 + dAngleD;
} else if (dAngleD < -180) {
dAngleD = 360 + dAngleD;
}
if (Math.abs(dAngleD) < rotToMouseSpeed) {
player._rotation = player._rotation - dAngleD;
} else if (dAngleD > 0) {
player._rotation = player._rotation - rotToMouseSpeed;
} else {
player._rotation = player._rotation + rotToMouseSpeed;
}
_root.hitter._x = _root.player._x + xpluz;
_root.hitter._y = _root.player._y;
_root.hittery._x = _root.player._x;
_root.hittery._y = _root.player._y + ypluz;
_root.hitter._rotation = _root.player._rotation;
var _local4 = hitter._x - player._x;
var _local3 = hittery._y - player._y;
var _local6 = Math.atan2(_local3, _local4);
var _local7 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if (_local7 > p_speed) {
tgtX = player._x + (p_speed * Math.cos(_local6));
tgtY = player._y + (p_speed * Math.sin(_local6));
if (walls.hitTest(hitter._x, hitter._y, true)) {
player._x = tgtX;
player.legs.play();
}
if (walls.hitTest(hittery._x, hittery._y, true)) {
player._y = tgtY;
player.legs.play();
}
}
if ((change._currentFrame == 1) && (gren._currentFrame == 1)) {
if (w1_ok) {
if (Key.isDown(49) && (_global.current_w != 1)) {
_global.selected_w = 1;
bulletSpeed = bS1;
change.gotoAndPlay(1);
}
}
if (w2_ok) {
if (Key.isDown(50) && (_global.current_w != 2)) {
_global.selected_w = 2;
bulletSpeed = bS2;
change.gotoAndPlay(1);
}
}
if (w3_ok) {
if (Key.isDown(51) && (_global.current_w != 3)) {
_global.selected_w = 3;
bulletSpeed = bS3;
change.gotoAndPlay(1);
}
}
if (w4_ok) {
if (Key.isDown(52) && (_global.current_w != 4)) {
_global.selected_w = 4;
bulletSpeed = bS4;
change.gotoAndPlay(1);
}
}
}
if (suckmygun == 1) {
if (!exit.hitTest(_xmouse, _ymouse, true)) {
switch (_global.current_w) {
case 1 :
if (_global.ammo1 > 0) {
if ((player.hands1._currentframe == 8) || (player.hands1._currentframe == 10)) {
player.hands1.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
break;
case 2 :
if (_global.ammo2 > 0) {
if ((player.hands2._currentframe == 7) || (player.hands2._currentframe == 13)) {
player.hands2.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
break;
case 3 :
if (_global.ammo3 > 0) {
if ((player.hands3._currentframe == 7) || (player.hands3._currentframe == 9)) {
player.hands3.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
break;
case 4 :
if (_global.ammo4 > 0) {
if ((player.hands4._currentframe == 7) || (player.hands4._currentframe == 9)) {
player.hands4.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
}
}
}
if (Key.isDown(71)) {
if (_global.ammog > 0) {
if (_root.gren._currentFrame == 1) {
_root.gren.gotoAndPlay(1);
}
}
}
}
};
var lev = 0;
placeBullet = function (tgt) {
lev++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("b" + lev, lev);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((player._rotation + tgt._rotation) - 90) + random(3);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(vrag10.hitter)) {
v10_health = v10_health - 1;
v10_spotted = 1;
this.removeMovieClip();
placeBlood(vrag10._x, vrag10._y, vrag10._rotation - 180);
}
if (this.hitTest(vrag11.hitter)) {
v11_health = v11_health - 1;
v11_spotted = 1;
this.removeMovieClip();
placeBlood(vrag11._x, vrag11._y, vrag11._rotation - 180);
}
if (this.hitTest(vrag12.hitter)) {
v12_health = v12_health - 1;
v12_spotted = 1;
this.removeMovieClip();
placeBlood(vrag12._x, vrag12._y, vrag12._rotation - 180);
}
if (this.hitTest(vrag13.hitter)) {
v13_health = v13_health - 1;
v13_spotted = 1;
this.removeMovieClip();
placeBlood(vrag13._x, vrag13._y, vrag13._rotation - 180);
}
if (this.hitTest(vrag1.hitter)) {
v1_health = v1_health - 8;
v1_spotted = 1;
this.removeMovieClip();
placeBlood(vrag1._x, vrag1._y, vrag1._rotation - 180);
}
if (this.hitTest(vrag2.hitter)) {
v2_health = v2_health - 8;
v2_spotted = 1;
this.removeMovieClip();
placeBlood(vrag2._x, vrag2._y, vrag2._rotation - 180);
}
if (this.hitTest(vrag3.hitter)) {
v3_health = v3_health - 8;
v3_spotted = 1;
this.removeMovieClip();
placeBlood(vrag3._x, vrag3._y, vrag3._rotation - 180);
}
if (this.hitTest(vrag4.hitter)) {
v4_health = v4_health - 8;
v4_spotted = 1;
this.removeMovieClip();
placeBlood(vrag4._x, vrag4._y, vrag4._rotation - 180);
}
if (this.hitTest(vrag5.hitter)) {
v5_health = v5_health - 8;
v5_spotted = 1;
this.removeMovieClip();
placeBlood(vrag5._x, vrag5._y, vrag5._rotation - 180);
}
if (this.hitTest(los1)) {
v1_spotted = 1;
}
if (this.hitTest(los2)) {
v2_spotted = 1;
}
if (this.hitTest(los3)) {
v3_spotted = 1;
}
if (this.hitTest(los4)) {
v4_spotted = 1;
}
if (this.hitTest(los5)) {
v5_spotted = 1;
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var leve = 0;
placeEBullet = function (tgt) {
leve++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve, leve);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((vrag1._rotation + tgt._rotation) - 93) + random(5);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 6;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var leve2 = 0;
placeE2Bullet = function (tgt) {
leve2++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve2, leve2);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((vrag2._rotation + tgt._rotation) - 93) + random(5);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 2;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var leve3 = 0;
placeE3Bullet = function (tgt) {
leve3++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve3, leve3);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((vrag3._rotation + tgt._rotation) - 93) + random(5);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 6;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var leve4 = 0;
placeE4Bullet = function (tgt) {
leve4++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve4, leve4);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((vrag4._rotation + tgt._rotation) - 93) + random(1);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 6;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var leve5 = 0;
placeE5Bullet = function (tgt) {
leve5++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve5, leve5);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((vrag5._rotation + tgt._rotation) - 93) + random(1);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 6;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var led = 0;
placeGren = function (tr) {
led++;
var _local3 = {x:tr._x, y:tr._y, rotation:tr._rotation};
tr._parent.localToGlobal(_local3);
globalToLocal(_local3);
var d = grena.duplicateMovieClip("b" + led, led);
d._x = _local3.x;
d._y = _local3.y;
d._rotation = player._rotation;
d.a = (d._rotation / 180) * Math.PI;
d.clickSpot_x = _root._xmouse;
d.clickSpot_y = _root._ymouse;
d.onEnterFrame = function () {
gotoSpotX = d.clickSpot_x;
gotoSpotY = d.clickSpot_y;
delta_x = this._x - gotoSpotX;
delta_y = this._y - gotoSpotY;
if (Math.sqrt((delta_x * delta_x) + (delta_y * delta_y)) > grenSpeed) {
this._x = this._x + (grenSpeed * Math.cos(this.a));
this._y = this._y + (grenSpeed * Math.sin(this.a));
this._rotation = this._rotation - 10;
} else {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
};
};
boom._visible = false;
var levv = 0;
badaboom._visible = false;
var levvv = 0;
blood._visible = false;
var leb = 0;
death._visible = false;
var det = 0;
radlight.onEnterFrame = function () {
var _local5 = radlight._x - player._x;
var _local4 = radlight._y - player._y;
var _local3 = Math.sqrt((_local5 * _local5) + (_local4 * _local4));
_global.hrrr = 100 - _local3;
_root.dettt._width = hrrr;
if (_local3 < 150) {
radlight.alpha = _local3 - 50;
} else {
radlight.alpha = 100;
}
};
v1_speed = 2;
var v1_spotted = 0;
var v1_health = 40;
_global.v1_move = 1;
vrag1.onEnterFrame = function () {
if (v1_health > 0) {
los1._x = vrag1._x;
los1._y = vrag1._y;
los1._rotation = vrag1._rotation;
if (los1.hitTest(hitter)) {
v1_spotted = 1;
}
if (los1.thin.hitTest(hitter)) {
beh1.play();
} else {
beh1.gotoAndPlay("halt");
}
if (v1_spotted == 1) {
var _local9 = player._x - vrag1._x;
var _local8 = player._y - vrag1._y;
} else {
var _local9 = s1.pp._x - vrag1._x;
var _local8 = s1.pp._y - vrag1._y;
if (vrag1.hitTest(s1.pp)) {
s1.play();
}
}
var _local7 = Math.atan2(_local8, _local9);
var _local12 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local12 > v1_speed) {
tgtX = vrag1._x + (v1_speed * Math.cos(_local7));
tgtY = vrag1._y + (v1_speed * Math.sin(_local7));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local13 = dAngleRadian(direction, _local7);
workAngle = _local7 + (_local13 * 0.8);
var _local6 = 0;
while (_local6 < 360) {
var _local2 = -1;
while (_local2 <= 1) {
var _local3 = workAngle + (radian(_local6) * _local2);
var _local5 = vrag1._x + (v1_speed * Math.cos(_local3));
var _local4 = vrag1._y + (v1_speed * Math.sin(_local3));
if (walls.hitTest(_local5, _local4, true)) {
tgtX = _local5;
tgtY = _local4;
break;
}
_local2 = _local2 + 2;
}
_local6 = _local6 + 10;
}
}
var _local11 = tgtX - vrag1._x;
var _local10 = tgtY - vrag1._y;
direction = Math.atan2(_local10, _local11);
var _local13 = dAngleDegree((direction * 180) / Math.PI, vrag1._rotation);
vrag1._rotation = vrag1._rotation + (_local13 * 0.2);
if (_global.v1_move) {
vrag1._x = tgtX;
vrag1._y = tgtY;
vrag1.legs.play();
}
}
} else {
placeDeath(vrag1._x, vrag1._y, vrag1.getDepth());
los1._visible = 0;
}
};
v5_speed = 2;
var v5_spotted = 0;
var v5_health = 40;
_global.v5_move = 1;
vrag5.onEnterFrame = function () {
if (v5_health > 0) {
los5._x = vrag5._x;
los5._y = vrag5._y;
los5._rotation = vrag5._rotation;
if (los5.hitTest(hitter)) {
v5_spotted = 1;
}
if (los5.thin.hitTest(hitter)) {
beh5.play();
} else {
beh5.gotoAndPlay("halt");
}
if (v5_spotted == 1) {
var _local9 = player._x - vrag5._x;
var _local8 = player._y - vrag5._y;
} else {
var _local9 = s5.pp._x - vrag5._x;
var _local8 = s5.pp._y - vrag5._y;
if (vrag5.hitTest(s5.pp)) {
s5.play();
}
}
var _local7 = Math.atan2(_local8, _local9);
var _local12 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local12 > v5_speed) {
tgtX = vrag5._x + (v5_speed * Math.cos(_local7));
tgtY = vrag5._y + (v5_speed * Math.sin(_local7));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local13 = dAngleRadian(direction, _local7);
workAngle = _local7 + (_local13 * 0.8);
var _local6 = 0;
while (_local6 < 360) {
var _local2 = -1;
while (_local2 <= 1) {
var _local3 = workAngle + (radian(_local6) * _local2);
var _local5 = vrag5._x + (v5_speed * Math.cos(_local3));
var _local4 = vrag5._y + (v5_speed * Math.sin(_local3));
if (walls.hitTest(_local5, _local4, true)) {
tgtX = _local5;
tgtY = _local4;
break;
}
_local2 = _local2 + 2;
}
_local6 = _local6 + 10;
}
}
var _local11 = tgtX - vrag5._x;
var _local10 = tgtY - vrag5._y;
direction = Math.atan2(_local10, _local11);
var _local13 = dAngleDegree((direction * 180) / Math.PI, vrag5._rotation);
vrag5._rotation = vrag5._rotation + (_local13 * 0.2);
if (_global.v5_move) {
vrag5._x = tgtX;
vrag5._y = tgtY;
vrag5.legs.play();
}
}
} else {
placeDeath(vrag5._x, vrag5._y, vrag5.getDepth());
los5._visible = 0;
}
};
v3_speed = 2;
var v3_spotted = 0;
var v3_health = 50;
_global.v3_move = 1;
vrag3.onEnterFrame = function () {
if (v3_health > 0) {
los3._x = vrag3._x;
los3._y = vrag3._y;
los3._rotation = vrag3._rotation;
if (los3.hitTest(hitter)) {
v3_spotted = 1;
}
if (los3.thin.hitTest(hitter)) {
beh3.play();
} else {
beh3.gotoAndPlay("halt");
}
if (v3_spotted == 1) {
var _local8 = player._x - vrag3._x;
var _local7 = player._y - vrag3._y;
}
var _local6 = Math.atan2(_local7, _local8);
var _local11 = Math.sqrt((_local8 * _local8) + (_local7 * _local7));
if (_local11 > v3_speed) {
tgtX = vrag3._x + (v3_speed * Math.cos(_local6));
tgtY = vrag3._y + (v3_speed * Math.sin(_local6));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local12 = dAngleRadian(direction, _local6);
workAngle = _local6 + (_local12 * 0.8);
var _local5 = 0;
while (_local5 < 360) {
var _local1 = -1;
while (_local1 <= 1) {
var _local2 = workAngle + (radian(_local5) * _local1);
var _local4 = vrag3._x + (v3_speed * Math.cos(_local2));
var _local3 = vrag3._y + (v3_speed * Math.sin(_local2));
if (walls.hitTest(_local4, _local3, true)) {
tgtX = _local4;
tgtY = _local3;
break;
}
_local1 = _local1 + 2;
}
_local5 = _local5 + 10;
}
}
var _local10 = tgtX - vrag3._x;
var _local9 = tgtY - vrag3._y;
direction = Math.atan2(_local9, _local10);
var _local12 = dAngleDegree((direction * 180) / Math.PI, vrag3._rotation);
vrag3._rotation = vrag3._rotation + (_local12 * 0.2);
}
} else {
placeDeath(vrag3._x, vrag3._y, vrag3.getDepth());
los3._visible = 0;
}
};
v4_speed = 2;
var v4_spotted = 0;
var v4_health = 50;
_global.v4_move = 1;
vrag4.onEnterFrame = function () {
if (v4_health > 0) {
los4._x = vrag4._x;
los4._y = vrag4._y;
los4._rotation = vrag4._rotation;
if (los4.hitTest(hitter)) {
v4_spotted = 1;
}
if (los4.thin.hitTest(hitter)) {
beh4.play();
} else {
beh4.gotoAndPlay("halt");
}
if (v4_spotted == 1) {
var _local8 = player._x - vrag4._x;
var _local7 = player._y - vrag4._y;
}
var _local6 = Math.atan2(_local7, _local8);
var _local11 = Math.sqrt((_local8 * _local8) + (_local7 * _local7));
if (_local11 > v4_speed) {
tgtX = vrag4._x + (v4_speed * Math.cos(_local6));
tgtY = vrag4._y + (v4_speed * Math.sin(_local6));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local12 = dAngleRadian(direction, _local6);
workAngle = _local6 + (_local12 * 0.8);
var _local5 = 0;
while (_local5 < 360) {
var _local1 = -1;
while (_local1 <= 1) {
var _local2 = workAngle + (radian(_local5) * _local1);
var _local4 = vrag4._x + (v4_speed * Math.cos(_local2));
var _local3 = vrag4._y + (v4_speed * Math.sin(_local2));
if (walls.hitTest(_local4, _local3, true)) {
tgtX = _local4;
tgtY = _local3;
break;
}
_local1 = _local1 + 2;
}
_local5 = _local5 + 10;
}
}
var _local10 = tgtX - vrag4._x;
var _local9 = tgtY - vrag4._y;
direction = Math.atan2(_local9, _local10);
var _local12 = dAngleDegree((direction * 180) / Math.PI, vrag4._rotation);
vrag4._rotation = vrag4._rotation + (_local12 * 0.2);
}
} else {
placeDeath(vrag4._x, vrag4._y, vrag4.getDepth());
los4._visible = 0;
}
};
v2_speed = 2;
var v2_spotted = 0;
var v2_health = 60;
_global.v2_move = 1;
vrag2.onEnterFrame = function () {
if (v2_health > 0) {
los2._x = vrag2._x;
los2._y = vrag2._y;
los2._rotation = vrag2._rotation;
if (los2.hitTest(hitter)) {
v2_spotted = 1;
}
if (los2.thin.hitTest(hitter)) {
beh2.play();
} else {
beh2.gotoAndPlay("halt");
}
if (v2_spotted == 1) {
var _local9 = player._x - vrag2._x;
var _local8 = player._y - vrag2._y;
}
var _local7 = Math.atan2(_local8, _local9);
var _local12 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local12 > v2_speed) {
tgtX = vrag2._x + (v2_speed * Math.cos(_local7));
tgtY = vrag2._y + (v2_speed * Math.sin(_local7));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local13 = dAngleRadian(direction, _local7);
workAngle = _local7 + (_local13 * 0.8);
var _local6 = 0;
while (_local6 < 360) {
var _local2 = -1;
while (_local2 <= 1) {
var _local3 = workAngle + (radian(_local6) * _local2);
var _local5 = vrag2._x + (v2_speed * Math.cos(_local3));
var _local4 = vrag2._y + (v2_speed * Math.sin(_local3));
if (walls.hitTest(_local5, _local4, true)) {
tgtX = _local5;
tgtY = _local4;
break;
}
_local2 = _local2 + 2;
}
_local6 = _local6 + 10;
}
}
var _local11 = tgtX - vrag2._x;
var _local10 = tgtY - vrag2._y;
direction = Math.atan2(_local10, _local11);
var _local13 = dAngleDegree((direction * 180) / Math.PI, vrag2._rotation);
vrag2._rotation = vrag2._rotation + (_local13 * 0.2);
if (_global.v2_move) {
vrag2._x = tgtX;
vrag2._y = tgtY;
vrag2.legs.play();
}
}
} else {
placeDeath(vrag2._x, vrag2._y, vrag2.getDepth());
los2._visible = 0;
}
};
vrag1.onRollOver = function () {
los1._visible = 1;
};
vrag1.onRollOut = function () {
los1._visible = 0;
};
vrag1.onReleaseOutside = function () {
los1._visible = 0;
};
vrag2.onRollOver = function () {
los2._visible = 1;
};
vrag2.onRollOut = function () {
los2._visible = 0;
};
vrag2.onReleaseOutside = function () {
los2._visible = 0;
};
vrag3.onRollOver = function () {
los3._visible = 1;
};
vrag3.onRollOut = function () {
los3._visible = 0;
};
vrag3.onReleaseOutside = function () {
los3._visible = 0;
};
vrag4.onRollOver = function () {
los4._visible = 1;
};
vrag4.onRollOut = function () {
los4._visible = 0;
};
vrag4.onReleaseOutside = function () {
los4._visible = 0;
};
vrag5.onRollOver = function () {
los5._visible = 1;
};
vrag5.onRollOut = function () {
los5._visible = 0;
};
vrag5.onReleaseOutside = function () {
los5._visible = 0;
};
Instance of Symbol 496 MovieClip in Frame 254
onClipEvent (enterFrame) {
this._x = player._x;
this._y = player._y;
}
Instance of Symbol 197 MovieClip in Frame 254
on (keyPress "<?#19>") {
_root.gotoAndPlay("inchange");
defeat.Key.removeListener(keyListener);
Key.removeListener(keyListener);
Key.removeListener(defeat.keyListener);
victory.Key.removeListener(keyListener2);
Key.removeListener(victory.keyListener2);
Key.removeListener(keyListener2);
}
Instance of Symbol 530 MovieClip in Frame 254
onClipEvent (load) {
startDrag (this, true);
Mouse.hide();
}
onClipEvent (enterFrame) {
Mouse.hide();
}
Frame 256
stopAllSounds();
my_sound2.start();
my_sound2.onSoundComplete = function () {
my_sound2.start();
};
function placeBoom(x, y) {
levv++;
var _local1 = boom.duplicateMovieClip("bdoom" + levv, levv);
_local1._x = x;
_local1._y = y;
}
function placeBadaboom(x, y) {
levvv++;
var _local1 = badaboom.duplicateMovieClip("badadoom" + levvv, levvv);
_local1._x = x;
_local1._y = y;
if (_local1.hitTest(player.hitter)) {
difx = _local1._x - player._x;
dify = _local1._y - player._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
p_health = p_health - (120 - diff);
}
if (_local1.hitTest(vrag1.hitter)) {
difx = _local1._x - vrag1._x;
dify = _local1._y - vrag1._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
v1_health = v1_health - (180 - diff);
}
if (_local1.hitTest(vrag10.hitter)) {
difx = _local1._x - vrag10._x;
dify = _local1._y - vrag10._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
v10_health = v10_health - (180 - diff);
}
if (_local1.hitTest(vrag13.hitter)) {
difx = _local1._x - vrag13._x;
dify = _local1._y - vrag13._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
v13_health = v13_health - (180 - diff);
}
if (_local1.hitTest(vrag11.hitter)) {
difx = _local1._x - vrag11._x;
dify = _local1._y - vrag11._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
v11_health = v11_health - (180 - diff);
}
if (_local1.hitTest(vrag12.hitter)) {
difx = _local1._x - vrag12._x;
dify = _local1._y - vrag12._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
v12_health = v12_health - (180 - diff);
}
if (_local1.hitTest(vrag2.hitter)) {
difx = _local1._x - vrag2._x;
dify = _local1._y - vrag2._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
v2_health = v2_health - (180 - diff);
}
if (_local1.hitTest(vrag3.hitter)) {
difx = _local1._x - vrag3._x;
dify = _local1._y - vrag3._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
v3_health = v3_health - (180 - diff);
}
if (_local1.hitTest(vrag4.hitter)) {
difx = _local1._x - vrag4._x;
dify = _local1._y - vrag4._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
v4_health = v4_health - (180 - diff);
}
if (_local1.hitTest(vrag5.hitter)) {
difx = _local1._x - vrag5._x;
dify = _local1._y - vrag5._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
v5_health = v5_health - (180 - diff);
}
if ((((_local1.hitTest(los1) || (_local1.hitTest(los2))) || (_local1.hitTest(los3))) || (_local1.hitTest(los4))) || (_local1.hitTest(los5))) {
v1_spotted = 1;
v2_spotted = 1;
v3_spotted = 1;
v4_spotted = 1;
v5_spotted = 1;
}
}
function placeBlood(x, y, rotation) {
leb++;
var _local1 = blood.duplicateMovieClip("blood" + leb, leb);
_local1._x = x;
_local1._y = y;
_local1._rotation = rotation;
}
function placeDeath(x, y, gloob) {
det++;
var _local1 = death.duplicateMovieClip("blood" + det, gloob);
_local1._x = x;
_local1._y = y;
_local1._rotation = rotation;
deathsound.start();
}
function dAngleRadian(a1, a2) {
var _local1 = a1 - a2;
if (_local1 > Math.PI) {
_local1 = -6.28318530717959 + _local1;
} else if (_local1 < -3.14159265358979) {
_local1 = (Math.PI*2) + _local1;
}
return(_local1);
}
function dAngleDegree(a1, a2) {
var _local1 = a1 - a2;
if (_local1 > 180) {
_local1 = -360 + _local1;
} else if (_local1 < -180) {
_local1 = 360 + _local1;
}
return(_local1);
}
function degree(a) {
return((a / Math.PI) * 180);
}
function radian(a) {
return((a / 180) * Math.PI);
}
var suckmygun = 0;
_root.firebtn.onPress = function () {
suckmygun = 1;
};
_root.firebtn.onRelease = function () {
suckmygun = 0;
};
_root.firebtn.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag1.onPress = function () {
suckmygun = 1;
};
_root.vrag1.onRelease = function () {
suckmygun = 0;
};
_root.vrag1.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag2.onPress = function () {
suckmygun = 1;
};
_root.vrag2.onRelease = function () {
suckmygun = 0;
};
_root.vrag2.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag3.onPress = function () {
suckmygun = 1;
};
_root.vrag3.onRelease = function () {
suckmygun = 0;
};
_root.vrag3.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag4.onPress = function () {
suckmygun = 1;
};
_root.vrag4.onRelease = function () {
suckmygun = 0;
};
_root.vrag4.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag5.onPress = function () {
suckmygun = 1;
};
_root.vrag5.onRelease = function () {
suckmygun = 0;
};
_root.vrag5.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag10.onPress = function () {
suckmygun = 1;
};
_root.vrag10.onRelease = function () {
suckmygun = 0;
};
_root.vrag10.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag11.onPress = function () {
suckmygun = 1;
};
_root.vrag11.onRelease = function () {
suckmygun = 0;
};
_root.vrag11.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag12.onPress = function () {
suckmygun = 1;
};
_root.vrag12.onRelease = function () {
suckmygun = 0;
};
_root.vrag12.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag14.onPress = function () {
suckmygun = 1;
};
_root.vrag14.onRelease = function () {
suckmygun = 0;
};
_root.vrag14.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb1.onPress = function () {
suckmygun = 1;
};
_root.zomb1.onRelease = function () {
suckmygun = 0;
};
_root.zomb1.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb2.onPress = function () {
suckmygun = 1;
};
_root.zomb2.onRelease = function () {
suckmygun = 0;
};
_root.zomb2.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb3.onPress = function () {
suckmygun = 1;
};
_root.zomb3.onRelease = function () {
suckmygun = 0;
};
_root.zomb3.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb4.onPress = function () {
suckmygun = 1;
};
_root.zomb4.onRelease = function () {
suckmygun = 0;
};
_root.zomb4.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb5.onPress = function () {
suckmygun = 1;
};
_root.zomb5.onRelease = function () {
suckmygun = 0;
};
_root.zomb5.onReleaseOutside = function () {
suckmygun = 0;
};
stop();
_global.deton = 0;
pick1._visible = 0;
var p_speed = 4;
var rotToMouseSpeed = 12;
var bS1 = 20;
var bS2 = 18;
var bS3 = 22;
var bS4 = 15;
var grenSpeed = 15;
var p_health = 100;
_global.current_w = 3;
var vkey1 = 0;
gkey1._visible = 0;
_global.ammo1 = 27;
_global.ammo2 = 21;
_global.ammo3 = 60;
_global.ammo4 = 6;
_global.ammog = 2;
var w1_ok = 1;
var w2_ok = 1;
var w3_ok = 1;
var w4_ok = 0;
los1._visible = 0;
los2._visible = 0;
los3._visible = 0;
los4._visible = 0;
los5._visible = 0;
los10._visible = 0;
los11._visible = 0;
los12._visible = 0;
los13._visible = 0;
_global.selected_w;
var xpluz = 0;
var ypluz = 0;
var bulletSpeed;
if (w1_ok) {
gui_weap.weap_none1._visible = 0;
}
if (w2_ok) {
gui_weap.weap_none2._visible = 0;
}
if (w3_ok) {
gui_weap.weap_none3._visible = 0;
}
if (w4_ok) {
gui_weap.weap_none4._visible = 0;
}
gui_weap.sel_light.gotoAndStop(_global.current_w + 1);
player.hands._visible = 0;
player.hands1._visible = 0;
player.hands2._visible = 0;
player.hands3._visible = 0;
player.hands4._visible = 0;
player.handsg._visible = 0;
switch (current_w) {
case 0 :
player.hands._visible = 1;
break;
case 1 :
player.hands1._visible = 1;
bulletSpeed = bS1;
break;
case 2 :
player.hands2._visible = 1;
bulletSpeed = bS2;
break;
case 3 :
player.hands3._visible = 1;
bulletSpeed = bS3;
break;
case 4 :
player.hands4._visible = 1;
bulletSpeed = bS4;
}
defeat.gotoAndStop(1);
victory.gotoAndStop(1);
var docs = 0;
arrow1._visible = 0;
player.onEnterFrame = function () {
if (p_health < 1) {
health_t.text = 0;
if (player._currentframe == 1) {
player.play();
player._name = "gsom";
defeat.play();
}
} else {
if (docs) {
if (hitter.hitTest(finish)) {
player._name = "gsom";
hitter._name = "gsom2";
victory.play();
var _local5 = SharedObject.getLocal("numlevs");
if (_local5.data.num < 11) {
_local5.data.num = 11;
_local5.flush();
}
}
}
if (doci._currentframe == 1) {
if (hitter.hitTest(doci.hitter)) {
doci.hitter._visible = 1;
pick1._visible = 1;
if (Key.isDown(32)) {
sh1._visible = 0;
doci.play();
docs = 1;
arrow1.play();
docipicked.play();
v10_spotted = 1;
v11_spotted = 1;
v12_spotted = 1;
v13_spotted = 1;
pick1._visible = 0;
}
} else {
doci.hitter._visible = 0;
pick1._visible = 0;
}
}
if (plasmagun._currentframe == 1) {
if (hitter.hitTest(plasmagun.hitter)) {
plasmagun.hitter._visible = 1;
pick1._visible = 1;
if (Key.isDown(32)) {
plasmagun.play();
w4_ok = 1;
gui_weap.weap_none4._visible = 0;
plasmagunpicked.play();
pick1._visible = 0;
bfg.play();
}
} else {
plasmagun.hitter._visible = 0;
pick1._visible = 0;
}
}
if (radd._currentframe == 1) {
if (Key.isDown(81)) {
radd.play();
if (_global.deton == 1) {
_global.deton = 0;
_root.raddet.dettt._width = 0;
_root.raddet.gotoAndStop(1);
p_speed = p_speed * 2;
} else {
_global.deton = 1;
_root.raddet.gotoAndStop(2);
p_speed = p_speed / 2;
}
}
}
grens.text = _global.ammog;
switch (_global.current_w) {
case 0 :
ammo_cur.text = "0";
break;
case 1 :
ammo_cur.text = _global.ammo1;
break;
case 2 :
ammo_cur.text = _global.ammo2;
break;
case 3 :
ammo_cur.text = _global.ammo3;
break;
case 4 :
ammo_cur.text = _global.ammo4;
}
health_t.text = p_health;
switch (Key.isDown(87) - Key.isDown(83)) {
case 1 :
ypluz = -10;
break;
case -1 :
ypluz = 10;
break;
default :
ypluz = 0;
}
switch (Key.isDown(68) - Key.isDown(65)) {
case 1 :
xpluz = 10;
break;
case -1 :
xpluz = -10;
break;
default :
xpluz = 0;
}
delta_x = _xmouse - player._x;
delta_y = _ymouse - player._y;
mAngle = Math.atan2(delta_y, delta_x);
mAngleD = (mAngle / Math.PI) * 180;
dAngleD = player._rotation - mAngleD;
if (dAngleD > 180) {
dAngleD = -360 + dAngleD;
} else if (dAngleD < -180) {
dAngleD = 360 + dAngleD;
}
if (Math.abs(dAngleD) < rotToMouseSpeed) {
player._rotation = player._rotation - dAngleD;
} else if (dAngleD > 0) {
player._rotation = player._rotation - rotToMouseSpeed;
} else {
player._rotation = player._rotation + rotToMouseSpeed;
}
_root.hitter._x = _root.player._x + xpluz;
_root.hitter._y = _root.player._y;
_root.hittery._x = _root.player._x;
_root.hittery._y = _root.player._y + ypluz;
_root.hitter._rotation = _root.player._rotation;
var _local4 = hitter._x - player._x;
var _local3 = hittery._y - player._y;
var _local6 = Math.atan2(_local3, _local4);
var _local7 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if (_local7 > p_speed) {
tgtX = player._x + (p_speed * Math.cos(_local6));
tgtY = player._y + (p_speed * Math.sin(_local6));
if (walls.hitTest(hitter._x, hitter._y, true)) {
player._x = tgtX;
player.legs.play();
}
if (walls.hitTest(hittery._x, hittery._y, true)) {
player._y = tgtY;
player.legs.play();
}
}
if ((change._currentFrame == 1) && (gren._currentFrame == 1)) {
if (w1_ok) {
if (Key.isDown(49) && (_global.current_w != 1)) {
_global.selected_w = 1;
bulletSpeed = bS1;
change.gotoAndPlay(1);
}
}
if (w2_ok) {
if (Key.isDown(50) && (_global.current_w != 2)) {
_global.selected_w = 2;
bulletSpeed = bS2;
change.gotoAndPlay(1);
}
}
if (w3_ok) {
if (Key.isDown(51) && (_global.current_w != 3)) {
_global.selected_w = 3;
bulletSpeed = bS3;
change.gotoAndPlay(1);
}
}
if (w4_ok) {
if (Key.isDown(52) && (_global.current_w != 4)) {
_global.selected_w = 4;
bulletSpeed = bS4;
change.gotoAndPlay(1);
}
}
}
if (suckmygun == 1) {
if (!exit.hitTest(_xmouse, _ymouse, true)) {
switch (_global.current_w) {
case 1 :
if (_global.ammo1 > 0) {
if ((player.hands1._currentframe == 8) || (player.hands1._currentframe == 10)) {
player.hands1.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
break;
case 2 :
if (_global.ammo2 > 0) {
if ((player.hands2._currentframe == 7) || (player.hands2._currentframe == 13)) {
player.hands2.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
break;
case 3 :
if (_global.ammo3 > 0) {
if ((player.hands3._currentframe == 7) || (player.hands3._currentframe == 9)) {
player.hands3.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
break;
case 4 :
if (_global.ammo4 > 0) {
if ((player.hands4._currentframe == 7) || (player.hands4._currentframe == 9)) {
player.hands4.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
}
}
}
if (Key.isDown(71)) {
if (_global.ammog > 0) {
if (_root.gren._currentFrame == 1) {
_root.gren.gotoAndPlay(1);
}
}
}
}
};
var lev = 0;
placeBullet = function (tgt) {
lev++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("b" + lev, lev);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((player._rotation + tgt._rotation) - 90) + random(3);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(vrag10.hitter)) {
v10_health = v10_health - 8;
v10_spotted = 1;
this.removeMovieClip();
placeBlood(vrag10._x, vrag10._y, vrag10._rotation - 180);
}
if (this.hitTest(vrag11.hitter)) {
v11_health = v11_health - 1;
v11_spotted = 1;
this.removeMovieClip();
placeBlood(vrag11._x, vrag11._y, vrag11._rotation - 180);
}
if (this.hitTest(vrag12.hitter)) {
v12_health = v12_health - 1;
v12_spotted = 1;
this.removeMovieClip();
placeBlood(vrag12._x, vrag12._y, vrag12._rotation - 180);
}
if (this.hitTest(vrag13.hitter)) {
v13_health = v13_health - 1;
v13_spotted = 1;
this.removeMovieClip();
placeBlood(vrag13._x, vrag13._y, vrag13._rotation - 180);
}
if (this.hitTest(vrag1.hitter)) {
v1_health = v1_health - 8;
v1_spotted = 1;
this.removeMovieClip();
placeBlood(vrag1._x, vrag1._y, vrag1._rotation - 180);
}
if (this.hitTest(vrag2.hitter)) {
v2_health = v2_health - 8;
v2_spotted = 1;
this.removeMovieClip();
placeBlood(vrag2._x, vrag2._y, vrag2._rotation - 180);
}
if (this.hitTest(vrag3.hitter)) {
v3_health = v3_health - 8;
v3_spotted = 1;
this.removeMovieClip();
placeBlood(vrag3._x, vrag3._y, vrag3._rotation - 180);
}
if (this.hitTest(vrag4.hitter)) {
v4_health = v4_health - 8;
v4_spotted = 1;
this.removeMovieClip();
placeBlood(vrag4._x, vrag4._y, vrag4._rotation - 180);
}
if (this.hitTest(vrag5.hitter)) {
v5_health = v5_health - 8;
v5_spotted = 1;
this.removeMovieClip();
placeBlood(vrag5._x, vrag5._y, vrag5._rotation - 180);
}
if (this.hitTest(los1)) {
v1_spotted = 1;
}
if (this.hitTest(los2)) {
v2_spotted = 1;
}
if (this.hitTest(los3)) {
v3_spotted = 1;
}
if (this.hitTest(los4)) {
v4_spotted = 1;
}
if (this.hitTest(los5)) {
v5_spotted = 1;
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var levbfg = 0;
placebfgBullet = function (tgt) {
levbfg++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
h1._visible = 0;
h2._visible = 0;
h3._visible = 0;
h4._visible = 0;
h5._visible = 0;
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bfgbullet.duplicateMovieClip("b" + levbfg, levbfg);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = (player._rotation + tgt._rotation) - 90;
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
h1._x = 700 - this._x;
h1._y = 525 - this._y;
h3._x = 350;
h3._y = 262.5;
h2._x = ((h1._x - h3._x) / 2) + 350;
h2._y = ((h1._y - h3._y) / 2) + 262.5;
h4._x = this._x + ((h3._x - this._x) / 2);
h4._y = this._y + ((h3._y - this._y) / 2);
h5._x = this._x;
h5._y = this._y;
h1._visible = 1;
h2._visible = 1;
h3._visible = 1;
h4._visible = 1;
h5._visible = 1;
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
h1._visible = 0;
h2._visible = 0;
h3._visible = 0;
h4._visible = 0;
h5._visible = 0;
}
if (this.hitTest(vrag10.hitter)) {
v10_health = v10_health - 500;
v10_spotted = 1;
placeBlood(vrag10._x, vrag10._y, vrag10._rotation - 180);
h1._visible = 0;
h2._visible = 0;
h3._visible = 0;
h4._visible = 0;
h5._visible = 0;
}
if (this.hitTest(vrag11.hitter)) {
v11_health = v11_health - 500;
v11_spotted = 1;
this.removeMovieClip();
placeBlood(vrag11._x, vrag11._y, vrag11._rotation - 180);
h1._visible = 0;
h2._visible = 0;
h3._visible = 0;
h4._visible = 0;
h5._visible = 0;
}
if (this.hitTest(vrag12.hitter)) {
v12_health = v12_health - 500;
v12_spotted = 1;
placeBlood(vrag12._x, vrag12._y, vrag12._rotation - 180);
h1._visible = 0;
h2._visible = 0;
h3._visible = 0;
h4._visible = 0;
h5._visible = 0;
}
if (this.hitTest(vrag13.hitter)) {
v13_health = v13_health - 500;
v13_spotted = 1;
placeBlood(vrag13._x, vrag13._y, vrag13._rotation - 180);
h1._visible = 0;
h2._visible = 0;
h3._visible = 0;
h4._visible = 0;
h5._visible = 0;
}
if (this.hitTest(vrag1.hitter)) {
v1_health = v1_health - 500;
v1_spotted = 1;
placeBlood(vrag1._x, vrag1._y, vrag1._rotation - 180);
h1._visible = 0;
h2._visible = 0;
h3._visible = 0;
h4._visible = 0;
h5._visible = 0;
}
if (this.hitTest(vrag2.hitter)) {
v2_health = v2_health - 500;
v2_spotted = 1;
placeBlood(vrag2._x, vrag2._y, vrag2._rotation - 180);
h1._visible = 0;
h2._visible = 0;
h3._visible = 0;
h4._visible = 0;
h5._visible = 0;
}
if (this.hitTest(vrag3.hitter)) {
v3_health = v3_health - 500;
v3_spotted = 1;
placeBlood(vrag3._x, vrag3._y, vrag3._rotation - 180);
h1._visible = 0;
h2._visible = 0;
h3._visible = 0;
h4._visible = 0;
h5._visible = 0;
}
if (this.hitTest(vrag4.hitter)) {
v4_health = v4_health - 500;
v4_spotted = 1;
placeBlood(vrag4._x, vrag4._y, vrag4._rotation - 180);
h1._visible = 0;
h2._visible = 0;
h3._visible = 0;
h4._visible = 0;
h5._visible = 0;
}
if (this.hitTest(vrag5.hitter)) {
v5_health = v5_health - 500;
v5_spotted = 1;
placeBlood(vrag5._x, vrag5._y, vrag5._rotation - 180);
h1._visible = 0;
h2._visible = 0;
h3._visible = 0;
h4._visible = 0;
h5._visible = 0;
}
if (this.hitTest(los1)) {
v1_spotted = 1;
}
if (this.hitTest(los2)) {
v2_spotted = 1;
}
if (this.hitTest(los3)) {
v3_spotted = 1;
}
if (this.hitTest(los4)) {
v4_spotted = 1;
}
if (this.hitTest(los5)) {
v5_spotted = 1;
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
h1._visible = 0;
h2._visible = 0;
h3._visible = 0;
h4._visible = 0;
h5._visible = 0;
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
h1._visible = 0;
h2._visible = 0;
h3._visible = 0;
h4._visible = 0;
h5._visible = 0;
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
h1._visible = 0;
h2._visible = 0;
h3._visible = 0;
h4._visible = 0;
h5._visible = 0;
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
h1._visible = 0;
h2._visible = 0;
h3._visible = 0;
h4._visible = 0;
h5._visible = 0;
}
};
};
var leve = 0;
placeEBullet = function (tgt) {
leve++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve, leve);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((vrag1._rotation + tgt._rotation) - 93) + random(5);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 6;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var leve2 = 0;
placeE2Bullet = function (tgt) {
leve2++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve2, leve2);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((vrag2._rotation + tgt._rotation) - 93) + random(5);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 2;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var leve3 = 0;
placeE3Bullet = function (tgt) {
leve3++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve3, leve3);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((vrag3._rotation + tgt._rotation) - 93) + random(5);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 6;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var leve4 = 0;
placeE4Bullet = function (tgt) {
leve4++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve4, leve4);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((vrag4._rotation + tgt._rotation) - 93) + random(1);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 6;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var leve5 = 0;
placeE5Bullet = function (tgt) {
leve5++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve5, leve5);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((vrag5._rotation + tgt._rotation) - 93) + random(1);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 6;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var leve10 = 0;
placeE10Bullet = function (tgt) {
leve10++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve10, leve10);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = (vrag10._rotation + tgt._rotation) - 93;
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 51;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var leve11 = 0;
placeE11Bullet = function (tgt) {
leve11++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve11, leve11);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = (vrag11._rotation + tgt._rotation) - 93;
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 51;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var leve12 = 0;
placeE12Bullet = function (tgt) {
leve12++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve12, leve12);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = (vrag12._rotation + tgt._rotation) - 93;
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 51;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var leve13 = 0;
placeE13Bullet = function (tgt) {
leve13++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve13, leve13);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = (vrag13._rotation + tgt._rotation) - 93;
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 51;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var led = 0;
placeGren = function (tr) {
led++;
var _local3 = {x:tr._x, y:tr._y, rotation:tr._rotation};
tr._parent.localToGlobal(_local3);
globalToLocal(_local3);
var d = grena.duplicateMovieClip("b" + led, led);
d._x = _local3.x;
d._y = _local3.y;
d._rotation = player._rotation;
d.a = (d._rotation / 180) * Math.PI;
d.clickSpot_x = _root._xmouse;
d.clickSpot_y = _root._ymouse;
d.onEnterFrame = function () {
gotoSpotX = d.clickSpot_x;
gotoSpotY = d.clickSpot_y;
delta_x = this._x - gotoSpotX;
delta_y = this._y - gotoSpotY;
if (Math.sqrt((delta_x * delta_x) + (delta_y * delta_y)) > grenSpeed) {
this._x = this._x + (grenSpeed * Math.cos(this.a));
this._y = this._y + (grenSpeed * Math.sin(this.a));
this._rotation = this._rotation - 10;
} else {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
};
};
boom._visible = false;
var levv = 0;
badaboom._visible = false;
var levvv = 0;
blood._visible = false;
var leb = 0;
death._visible = false;
var det = 0;
radlight.onEnterFrame = function () {
var _local5 = radlight._x - player._x;
var _local4 = radlight._y - player._y;
var _local3 = Math.sqrt((_local5 * _local5) + (_local4 * _local4));
_global.hrrr = 100 - _local3;
_root.dettt._width = hrrr;
if (_local3 < 150) {
radlight.alpha = _local3 - 50;
} else {
radlight.alpha = 100;
}
};
v1_speed = 2;
var v1_spotted = 0;
var v1_health = 40;
_global.v1_move = 1;
vrag1.onEnterFrame = function () {
if (v1_health > 0) {
los1._x = vrag1._x;
los1._y = vrag1._y;
los1._rotation = vrag1._rotation;
if (los1.hitTest(hitter)) {
v1_spotted = 1;
}
if (los1.thin.hitTest(hitter)) {
beh1.play();
} else {
beh1.gotoAndPlay("halt");
}
if (v1_spotted == 1) {
var _local9 = player._x - vrag1._x;
var _local8 = player._y - vrag1._y;
} else {
var _local9 = s1.pp._x - vrag1._x;
var _local8 = s1.pp._y - vrag1._y;
if (vrag1.hitTest(s1.pp)) {
s1.play();
}
}
var _local7 = Math.atan2(_local8, _local9);
var _local12 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local12 > v1_speed) {
tgtX = vrag1._x + (v1_speed * Math.cos(_local7));
tgtY = vrag1._y + (v1_speed * Math.sin(_local7));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local13 = dAngleRadian(direction, _local7);
workAngle = _local7 + (_local13 * 0.8);
var _local6 = 0;
while (_local6 < 360) {
var _local2 = -1;
while (_local2 <= 1) {
var _local3 = workAngle + (radian(_local6) * _local2);
var _local5 = vrag1._x + (v1_speed * Math.cos(_local3));
var _local4 = vrag1._y + (v1_speed * Math.sin(_local3));
if (walls.hitTest(_local5, _local4, true)) {
tgtX = _local5;
tgtY = _local4;
break;
}
_local2 = _local2 + 2;
}
_local6 = _local6 + 10;
}
}
var _local11 = tgtX - vrag1._x;
var _local10 = tgtY - vrag1._y;
direction = Math.atan2(_local10, _local11);
var _local13 = dAngleDegree((direction * 180) / Math.PI, vrag1._rotation);
vrag1._rotation = vrag1._rotation + (_local13 * 0.2);
if (_global.v1_move) {
vrag1._x = tgtX;
vrag1._y = tgtY;
vrag1.legs.play();
}
}
} else {
placeDeath(vrag1._x, vrag1._y, vrag1.getDepth());
los1._visible = 0;
}
};
v5_speed = 2;
var v5_spotted = 0;
var v5_health = 40;
_global.v5_move = 1;
vrag5.onEnterFrame = function () {
if (v5_health > 0) {
los5._x = vrag5._x;
los5._y = vrag5._y;
los5._rotation = vrag5._rotation;
if (los5.hitTest(hitter)) {
v5_spotted = 1;
}
if (los5.thin.hitTest(hitter)) {
beh5.play();
} else {
beh5.gotoAndPlay("halt");
}
if (v5_spotted == 1) {
var _local9 = player._x - vrag5._x;
var _local8 = player._y - vrag5._y;
} else {
var _local9 = s5.pp._x - vrag5._x;
var _local8 = s5.pp._y - vrag5._y;
if (vrag5.hitTest(s5.pp)) {
s5.play();
}
}
var _local7 = Math.atan2(_local8, _local9);
var _local12 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local12 > v5_speed) {
tgtX = vrag5._x + (v5_speed * Math.cos(_local7));
tgtY = vrag5._y + (v5_speed * Math.sin(_local7));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local13 = dAngleRadian(direction, _local7);
workAngle = _local7 + (_local13 * 0.8);
var _local6 = 0;
while (_local6 < 360) {
var _local2 = -1;
while (_local2 <= 1) {
var _local3 = workAngle + (radian(_local6) * _local2);
var _local5 = vrag5._x + (v5_speed * Math.cos(_local3));
var _local4 = vrag5._y + (v5_speed * Math.sin(_local3));
if (walls.hitTest(_local5, _local4, true)) {
tgtX = _local5;
tgtY = _local4;
break;
}
_local2 = _local2 + 2;
}
_local6 = _local6 + 10;
}
}
var _local11 = tgtX - vrag5._x;
var _local10 = tgtY - vrag5._y;
direction = Math.atan2(_local10, _local11);
var _local13 = dAngleDegree((direction * 180) / Math.PI, vrag5._rotation);
vrag5._rotation = vrag5._rotation + (_local13 * 0.2);
if (_global.v5_move) {
vrag5._x = tgtX;
vrag5._y = tgtY;
vrag5.legs.play();
}
}
} else {
placeDeath(vrag5._x, vrag5._y, vrag5.getDepth());
los5._visible = 0;
}
};
v3_speed = 2;
var v3_spotted = 0;
var v3_health = 50;
_global.v3_move = 1;
vrag3.onEnterFrame = function () {
if (v3_health > 0) {
los3._x = vrag3._x;
los3._y = vrag3._y;
los3._rotation = vrag3._rotation;
if (los3.hitTest(hitter)) {
v3_spotted = 1;
}
if (los3.thin.hitTest(hitter)) {
beh3.play();
} else {
beh3.gotoAndPlay("halt");
}
if (v3_spotted == 1) {
var _local9 = player._x - vrag3._x;
var _local8 = player._y - vrag3._y;
}
var _local7 = Math.atan2(_local8, _local9);
var _local12 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local12 > v3_speed) {
tgtX = vrag3._x + (v3_speed * Math.cos(_local7));
tgtY = vrag3._y + (v3_speed * Math.sin(_local7));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local13 = dAngleRadian(direction, _local7);
workAngle = _local7 + (_local13 * 0.8);
var _local6 = 0;
while (_local6 < 360) {
var _local2 = -1;
while (_local2 <= 1) {
var _local3 = workAngle + (radian(_local6) * _local2);
var _local5 = vrag3._x + (v3_speed * Math.cos(_local3));
var _local4 = vrag3._y + (v3_speed * Math.sin(_local3));
if (walls.hitTest(_local5, _local4, true)) {
tgtX = _local5;
tgtY = _local4;
break;
}
_local2 = _local2 + 2;
}
_local6 = _local6 + 10;
}
}
var _local11 = tgtX - vrag3._x;
var _local10 = tgtY - vrag3._y;
direction = Math.atan2(_local10, _local11);
var _local13 = dAngleDegree((direction * 180) / Math.PI, vrag3._rotation);
vrag3._rotation = vrag3._rotation + (_local13 * 0.2);
if (_global.v3_move) {
vrag3._x = tgtX;
vrag3._y = tgtY;
vrag3.legs.play();
}
}
} else {
placeDeath(vrag3._x, vrag3._y, vrag3.getDepth());
los3._visible = 0;
}
};
v4_speed = 2;
var v4_spotted = 0;
var v4_health = 50;
_global.v4_move = 1;
vrag4.onEnterFrame = function () {
if (v4_health > 0) {
los4._x = vrag4._x;
los4._y = vrag4._y;
los4._rotation = vrag4._rotation;
if (los4.hitTest(hitter)) {
v4_spotted = 1;
}
if (los4.thin.hitTest(hitter)) {
beh4.play();
} else {
beh4.gotoAndPlay("halt");
}
if (v4_spotted == 1) {
var _local8 = player._x - vrag4._x;
var _local7 = player._y - vrag4._y;
}
var _local6 = Math.atan2(_local7, _local8);
var _local11 = Math.sqrt((_local8 * _local8) + (_local7 * _local7));
if (_local11 > v4_speed) {
tgtX = vrag4._x + (v4_speed * Math.cos(_local6));
tgtY = vrag4._y + (v4_speed * Math.sin(_local6));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local12 = dAngleRadian(direction, _local6);
workAngle = _local6 + (_local12 * 0.8);
var _local5 = 0;
while (_local5 < 360) {
var _local1 = -1;
while (_local1 <= 1) {
var _local2 = workAngle + (radian(_local5) * _local1);
var _local4 = vrag4._x + (v4_speed * Math.cos(_local2));
var _local3 = vrag4._y + (v4_speed * Math.sin(_local2));
if (walls.hitTest(_local4, _local3, true)) {
tgtX = _local4;
tgtY = _local3;
break;
}
_local1 = _local1 + 2;
}
_local5 = _local5 + 10;
}
}
var _local10 = tgtX - vrag4._x;
var _local9 = tgtY - vrag4._y;
direction = Math.atan2(_local9, _local10);
var _local12 = dAngleDegree((direction * 180) / Math.PI, vrag4._rotation);
vrag4._rotation = vrag4._rotation + (_local12 * 0.2);
}
} else {
placeDeath(vrag4._x, vrag4._y, vrag4.getDepth());
los4._visible = 0;
}
};
v2_speed = 2;
var v2_spotted = 0;
var v2_health = 60;
_global.v2_move = 1;
vrag2.onEnterFrame = function () {
if (v2_health > 0) {
los2._x = vrag2._x;
los2._y = vrag2._y;
los2._rotation = vrag2._rotation;
if (los2.hitTest(hitter)) {
v2_spotted = 1;
}
if (los2.thin.hitTest(hitter)) {
beh2.play();
} else {
beh2.gotoAndPlay("halt");
}
if (v2_spotted == 1) {
var _local9 = player._x - vrag2._x;
var _local8 = player._y - vrag2._y;
}
var _local7 = Math.atan2(_local8, _local9);
var _local12 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local12 > v2_speed) {
tgtX = vrag2._x + (v2_speed * Math.cos(_local7));
tgtY = vrag2._y + (v2_speed * Math.sin(_local7));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local13 = dAngleRadian(direction, _local7);
workAngle = _local7 + (_local13 * 0.8);
var _local6 = 0;
while (_local6 < 360) {
var _local2 = -1;
while (_local2 <= 1) {
var _local3 = workAngle + (radian(_local6) * _local2);
var _local5 = vrag2._x + (v2_speed * Math.cos(_local3));
var _local4 = vrag2._y + (v2_speed * Math.sin(_local3));
if (walls.hitTest(_local5, _local4, true)) {
tgtX = _local5;
tgtY = _local4;
break;
}
_local2 = _local2 + 2;
}
_local6 = _local6 + 10;
}
}
var _local11 = tgtX - vrag2._x;
var _local10 = tgtY - vrag2._y;
direction = Math.atan2(_local10, _local11);
var _local13 = dAngleDegree((direction * 180) / Math.PI, vrag2._rotation);
vrag2._rotation = vrag2._rotation + (_local13 * 0.2);
if (_global.v2_move) {
vrag2._x = tgtX;
vrag2._y = tgtY;
vrag2.legs.play();
}
}
} else {
placeDeath(vrag2._x, vrag2._y, vrag2.getDepth());
los2._visible = 0;
}
};
v10_speed = 0.8;
var v10_spotted = 0;
var v10_health = 500;
_global.v10_move = 1;
vrag10.onEnterFrame = function () {
if (v10_health > 0) {
los10._x = vrag10._x;
los10._y = vrag10._y;
los10._rotation = vrag10._rotation;
if (los10.hitTest(hitter)) {
v10_spotted = 1;
}
if (los10.thin.hitTest(hitter)) {
vrag10.hands.play();
}
if (v10_spotted == 1) {
var _local8 = player._x - vrag10._x;
var _local7 = player._y - vrag10._y;
}
var _local6 = Math.atan2(_local7, _local8);
var _local11 = Math.sqrt((_local8 * _local8) + (_local7 * _local7));
if (_local11 > v10_speed) {
tgtX = vrag10._x + (v10_speed * Math.cos(_local6));
tgtY = vrag10._y + (v10_speed * Math.sin(_local6));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local12 = dAngleRadian(direction, _local6);
workAngle = _local6 + (_local12 * 0.8);
var _local5 = 0;
while (_local5 < 360) {
var _local1 = -1;
while (_local1 <= 1) {
var _local2 = workAngle + (radian(_local5) * _local1);
var _local4 = vrag10._x + (v10_speed * Math.cos(_local2));
var _local3 = vrag10._y + (v10_speed * Math.sin(_local2));
if (walls.hitTest(_local4, _local3, true)) {
tgtX = _local4;
tgtY = _local3;
break;
}
_local1 = _local1 + 2;
}
_local5 = _local5 + 10;
}
}
var _local10 = tgtX - vrag10._x;
var _local9 = tgtY - vrag10._y;
direction = Math.atan2(_local9, _local10);
var _local12 = dAngleDegree((direction * 180) / Math.PI, vrag10._rotation);
vrag10._rotation = vrag10._rotation + (_local12 * 0.2);
if (docs) {
vrag10._x = tgtX;
vrag10._y = tgtY;
vrag10.legs.play();
}
}
} else {
placeDeath(vrag10._x, vrag10._y, vrag10.getDepth());
los10._visible = 0;
}
};
v11_speed = 0.8;
var v11_spotted = 0;
var v11_health = 500;
_global.v11_move = 0;
vrag11.onEnterFrame = function () {
if (v11_health > 0) {
los11._x = vrag11._x;
los11._y = vrag11._y;
los11._rotation = vrag11._rotation;
if (los11.hitTest(hitter)) {
v11_spotted = 1;
}
if (los11.thin.hitTest(hitter)) {
vrag11.hands.play();
}
if (v11_spotted == 1) {
var _local8 = player._x - vrag11._x;
var _local7 = player._y - vrag11._y;
}
var _local6 = Math.atan2(_local7, _local8);
var _local11 = Math.sqrt((_local8 * _local8) + (_local7 * _local7));
if (_local11 > v11_speed) {
tgtX = vrag11._x + (v11_speed * Math.cos(_local6));
tgtY = vrag11._y + (v11_speed * Math.sin(_local6));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local12 = dAngleRadian(direction, _local6);
workAngle = _local6 + (_local12 * 0.8);
var _local5 = 0;
while (_local5 < 360) {
var _local1 = -1;
while (_local1 <= 1) {
var _local2 = workAngle + (radian(_local5) * _local1);
var _local4 = vrag11._x + (v11_speed * Math.cos(_local2));
var _local3 = vrag11._y + (v11_speed * Math.sin(_local2));
if (walls.hitTest(_local4, _local3, true)) {
tgtX = _local4;
tgtY = _local3;
break;
}
_local1 = _local1 + 2;
}
_local5 = _local5 + 10;
}
}
var _local10 = tgtX - vrag11._x;
var _local9 = tgtY - vrag11._y;
direction = Math.atan2(_local9, _local10);
var _local12 = dAngleDegree((direction * 180) / Math.PI, vrag11._rotation);
vrag11._rotation = vrag11._rotation + (_local12 * 0.2);
if (docs) {
vrag11._x = tgtX;
vrag11._y = tgtY;
vrag11.legs.play();
}
}
} else {
placeDeath(vrag11._x, vrag11._y, vrag11.getDepth());
los11._visible = 0;
}
};
v12_speed = 0.8;
var v12_spotted = 0;
var v12_health = 500;
_global.v12_move = 0;
vrag12.onEnterFrame = function () {
if (v12_health > 0) {
los12._x = vrag12._x;
los12._y = vrag12._y;
los12._rotation = vrag12._rotation;
if (los12.hitTest(hitter)) {
v12_spotted = 1;
}
if (los12.thin.hitTest(hitter)) {
vrag12.hands.play();
}
if (v12_spotted == 1) {
var _local8 = player._x - vrag12._x;
var _local7 = player._y - vrag12._y;
}
var _local6 = Math.atan2(_local7, _local8);
var _local11 = Math.sqrt((_local8 * _local8) + (_local7 * _local7));
if (_local11 > v12_speed) {
tgtX = vrag12._x + (v12_speed * Math.cos(_local6));
tgtY = vrag12._y + (v12_speed * Math.sin(_local6));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local12 = dAngleRadian(direction, _local6);
workAngle = _local6 + (_local12 * 0.8);
var _local5 = 0;
while (_local5 < 360) {
var _local1 = -1;
while (_local1 <= 1) {
var _local2 = workAngle + (radian(_local5) * _local1);
var _local4 = vrag12._x + (v12_speed * Math.cos(_local2));
var _local3 = vrag12._y + (v12_speed * Math.sin(_local2));
if (walls.hitTest(_local4, _local3, true)) {
tgtX = _local4;
tgtY = _local3;
break;
}
_local1 = _local1 + 2;
}
_local5 = _local5 + 10;
}
}
var _local10 = tgtX - vrag12._x;
var _local9 = tgtY - vrag12._y;
direction = Math.atan2(_local9, _local10);
var _local12 = dAngleDegree((direction * 180) / Math.PI, vrag12._rotation);
vrag12._rotation = vrag12._rotation + (_local12 * 0.2);
if (docs) {
vrag12._x = tgtX;
vrag12._y = tgtY;
vrag12.legs.play();
}
}
} else {
placeDeath(vrag12._x, vrag12._y, vrag12.getDepth());
los12._visible = 0;
}
};
v13_speed = 0.8;
var v13_spotted = 0;
var v13_health = 500;
_global.v13_move = 0;
vrag13.onEnterFrame = function () {
if (v13_health > 0) {
los13._x = vrag13._x;
los13._y = vrag13._y;
los13._rotation = vrag13._rotation;
if (los13.hitTest(hitter)) {
v13_spotted = 1;
}
if (los13.thin.hitTest(hitter)) {
vrag13.hands.play();
}
if (v13_spotted == 1) {
var _local8 = player._x - vrag13._x;
var _local7 = player._y - vrag13._y;
}
var _local6 = Math.atan2(_local7, _local8);
var _local11 = Math.sqrt((_local8 * _local8) + (_local7 * _local7));
if (_local11 > v13_speed) {
tgtX = vrag13._x + (v13_speed * Math.cos(_local6));
tgtY = vrag13._y + (v13_speed * Math.sin(_local6));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local12 = dAngleRadian(direction, _local6);
workAngle = _local6 + (_local12 * 0.8);
var _local5 = 0;
while (_local5 < 360) {
var _local1 = -1;
while (_local1 <= 1) {
var _local2 = workAngle + (radian(_local5) * _local1);
var _local4 = vrag13._x + (v13_speed * Math.cos(_local2));
var _local3 = vrag13._y + (v13_speed * Math.sin(_local2));
if (walls.hitTest(_local4, _local3, true)) {
tgtX = _local4;
tgtY = _local3;
break;
}
_local1 = _local1 + 2;
}
_local5 = _local5 + 10;
}
}
var _local10 = tgtX - vrag13._x;
var _local9 = tgtY - vrag13._y;
direction = Math.atan2(_local9, _local10);
var _local12 = dAngleDegree((direction * 180) / Math.PI, vrag13._rotation);
vrag13._rotation = vrag13._rotation + (_local12 * 0.2);
if (docs) {
vrag13._x = tgtX;
vrag13._y = tgtY;
vrag13.legs.play();
}
}
} else {
placeDeath(vrag13._x, vrag13._y, vrag13.getDepth());
los13._visible = 0;
}
};
vrag1.onRollOver = function () {
los1._visible = 1;
};
vrag1.onRollOut = function () {
los1._visible = 0;
};
vrag1.onReleaseOutside = function () {
los1._visible = 0;
};
vrag3.onRollOver = function () {
los3._visible = 1;
};
vrag3.onRollOut = function () {
los3._visible = 0;
};
vrag3.onReleaseOutside = function () {
los3._visible = 0;
};
vrag4.onRollOver = function () {
los4._visible = 1;
};
vrag4.onRollOut = function () {
los4._visible = 0;
};
vrag4.onReleaseOutside = function () {
los4._visible = 0;
};
vrag5.onRollOver = function () {
los5._visible = 1;
};
vrag5.onRollOut = function () {
los5._visible = 0;
};
vrag5.onReleaseOutside = function () {
los5._visible = 0;
};
vrag10.onRollOver = function () {
los10._visible = 1;
};
vrag10.onRollOut = function () {
los10._visible = 0;
};
vrag10.onReleaseOutside = function () {
los10._visible = 0;
};
vrag11.onRollOver = function () {
los11._visible = 1;
};
vrag11.onRollOut = function () {
los11._visible = 0;
};
vrag11.onReleaseOutside = function () {
los11._visible = 0;
};
vrag12.onRollOver = function () {
los12._visible = 1;
};
vrag12.onRollOut = function () {
los12._visible = 0;
};
vrag12.onReleaseOutside = function () {
los12._visible = 0;
};
vrag13.onRollOver = function () {
los13._visible = 1;
};
vrag13.onRollOut = function () {
los13._visible = 0;
};
vrag13.onReleaseOutside = function () {
los13._visible = 0;
};
Instance of Symbol 496 MovieClip in Frame 256
onClipEvent (enterFrame) {
this._x = player._x;
this._y = player._y;
}
Instance of Symbol 197 MovieClip in Frame 256
on (keyPress "<?#19>") {
_root.gotoAndPlay("inchange");
defeat.Key.removeListener(keyListener);
Key.removeListener(keyListener);
Key.removeListener(defeat.keyListener);
victory.Key.removeListener(keyListener2);
Key.removeListener(victory.keyListener2);
Key.removeListener(keyListener2);
}
Instance of Symbol 530 MovieClip in Frame 256
onClipEvent (load) {
startDrag (this, true);
Mouse.hide();
}
onClipEvent (enterFrame) {
Mouse.hide();
}
Frame 258
stopAllSounds();
my_sound2.start();
my_sound2.onSoundComplete = function () {
my_sound2.start();
};
function placeBoom(x, y) {
levv++;
var _local1 = boom.duplicateMovieClip("bdoom" + levv, levv);
_local1._x = x;
_local1._y = y;
}
function placeBadaboom(x, y) {
levvv++;
var _local1 = badaboom.duplicateMovieClip("badadoom" + levvv, levvv);
_local1._x = x;
_local1._y = y;
if (_local1.hitTest(player.hitter)) {
difx = _local1._x - player._x;
dify = _local1._y - player._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
p_health = p_health - (120 - diff);
}
if (_local1.hitTest(vrag1.hitter)) {
difx = _local1._x - vrag1._x;
dify = _local1._y - vrag1._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
v1_health = v1_health - (180 - diff);
}
if (_local1.hitTest(vrag10.hitter)) {
difx = _local1._x - vrag10._x;
dify = _local1._y - vrag10._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
v10_health = v10_health - (180 - diff);
}
if (_local1.hitTest(vrag13.hitter)) {
difx = _local1._x - vrag13._x;
dify = _local1._y - vrag13._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
v13_health = v13_health - (180 - diff);
}
if (_local1.hitTest(vrag11.hitter)) {
difx = _local1._x - vrag11._x;
dify = _local1._y - vrag11._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
v11_health = v11_health - (180 - diff);
}
if (_local1.hitTest(vrag12.hitter)) {
difx = _local1._x - vrag12._x;
dify = _local1._y - vrag12._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
v12_health = v12_health - (180 - diff);
}
if (_local1.hitTest(vrag2.hitter)) {
difx = _local1._x - vrag2._x;
dify = _local1._y - vrag2._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
v2_health = v2_health - (180 - diff);
}
if (_local1.hitTest(vrag3.hitter)) {
difx = _local1._x - vrag3._x;
dify = _local1._y - vrag3._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
v3_health = v3_health - (180 - diff);
}
if (_local1.hitTest(vrag4.hitter)) {
difx = _local1._x - vrag4._x;
dify = _local1._y - vrag4._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
v4_health = v4_health - (180 - diff);
}
if (_local1.hitTest(vrag5.hitter)) {
difx = _local1._x - vrag5._x;
dify = _local1._y - vrag5._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
v5_health = v5_health - (180 - diff);
}
if ((((_local1.hitTest(los1) || (_local1.hitTest(los2))) || (_local1.hitTest(los3))) || (_local1.hitTest(los4))) || (_local1.hitTest(los5))) {
v1_spotted = 1;
v2_spotted = 1;
v3_spotted = 1;
v4_spotted = 1;
v5_spotted = 1;
}
}
function placeBlood(x, y, rotation) {
leb++;
var _local1 = blood.duplicateMovieClip("blood" + leb, leb);
_local1._x = x;
_local1._y = y;
_local1._rotation = rotation;
}
function placeDeath(x, y, gloob) {
det++;
var _local1 = death.duplicateMovieClip("blood" + det, gloob);
_local1._x = x;
_local1._y = y;
_local1._rotation = rotation;
deathsound.start();
}
function dAngleRadian(a1, a2) {
var _local1 = a1 - a2;
if (_local1 > Math.PI) {
_local1 = -6.28318530717959 + _local1;
} else if (_local1 < -3.14159265358979) {
_local1 = (Math.PI*2) + _local1;
}
return(_local1);
}
function dAngleDegree(a1, a2) {
var _local1 = a1 - a2;
if (_local1 > 180) {
_local1 = -360 + _local1;
} else if (_local1 < -180) {
_local1 = 360 + _local1;
}
return(_local1);
}
function degree(a) {
return((a / Math.PI) * 180);
}
function radian(a) {
return((a / 180) * Math.PI);
}
var suckmygun = 0;
_root.firebtn.onPress = function () {
suckmygun = 1;
};
_root.firebtn.onRelease = function () {
suckmygun = 0;
};
_root.firebtn.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag1.onPress = function () {
suckmygun = 1;
};
_root.vrag1.onRelease = function () {
suckmygun = 0;
};
_root.vrag1.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag2.onPress = function () {
suckmygun = 1;
};
_root.vrag2.onRelease = function () {
suckmygun = 0;
};
_root.vrag2.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag3.onPress = function () {
suckmygun = 1;
};
_root.vrag3.onRelease = function () {
suckmygun = 0;
};
_root.vrag3.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag4.onPress = function () {
suckmygun = 1;
};
_root.vrag4.onRelease = function () {
suckmygun = 0;
};
_root.vrag4.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag5.onPress = function () {
suckmygun = 1;
};
_root.vrag5.onRelease = function () {
suckmygun = 0;
};
_root.vrag5.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag10.onPress = function () {
suckmygun = 1;
};
_root.vrag10.onRelease = function () {
suckmygun = 0;
};
_root.vrag10.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag11.onPress = function () {
suckmygun = 1;
};
_root.vrag11.onRelease = function () {
suckmygun = 0;
};
_root.vrag11.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag12.onPress = function () {
suckmygun = 1;
};
_root.vrag12.onRelease = function () {
suckmygun = 0;
};
_root.vrag12.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag14.onPress = function () {
suckmygun = 1;
};
_root.vrag14.onRelease = function () {
suckmygun = 0;
};
_root.vrag14.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb1.onPress = function () {
suckmygun = 1;
};
_root.zomb1.onRelease = function () {
suckmygun = 0;
};
_root.zomb1.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb2.onPress = function () {
suckmygun = 1;
};
_root.zomb2.onRelease = function () {
suckmygun = 0;
};
_root.zomb2.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb3.onPress = function () {
suckmygun = 1;
};
_root.zomb3.onRelease = function () {
suckmygun = 0;
};
_root.zomb3.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb4.onPress = function () {
suckmygun = 1;
};
_root.zomb4.onRelease = function () {
suckmygun = 0;
};
_root.zomb4.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb5.onPress = function () {
suckmygun = 1;
};
_root.zomb5.onRelease = function () {
suckmygun = 0;
};
_root.zomb5.onReleaseOutside = function () {
suckmygun = 0;
};
stop();
_global.deton = 0;
rad1._visible = 0;
rad2._visible = 0;
rad3._visible = 0;
var p_speed = 4;
var rotToMouseSpeed = 12;
var bS1 = 20;
var bS2 = 18;
var bS3 = 22;
var bS4 = 15;
var grenSpeed = 15;
var p_health = 100;
_global.current_w = 4;
var vkey1 = 0;
gkey1._visible = 0;
_global.ammo1 = 27;
_global.ammo2 = 21;
_global.ammo3 = 60;
_global.ammo4 = 10;
_global.ammog = 2;
var w1_ok = 1;
var w2_ok = 1;
var w3_ok = 1;
var w4_ok = 1;
los1._visible = 0;
los2._visible = 0;
los3._visible = 0;
los4._visible = 0;
los5._visible = 0;
los10._visible = 0;
los11._visible = 0;
los12._visible = 0;
los13._visible = 0;
_global.selected_w;
var xpluz = 0;
var ypluz = 0;
var bulletSpeed;
if (w1_ok) {
gui_weap.weap_none1._visible = 0;
}
if (w2_ok) {
gui_weap.weap_none2._visible = 0;
}
if (w3_ok) {
gui_weap.weap_none3._visible = 0;
}
if (w4_ok) {
gui_weap.weap_none4._visible = 0;
}
gui_weap.sel_light.gotoAndStop(_global.current_w + 1);
player.hands._visible = 0;
player.hands1._visible = 0;
player.hands2._visible = 0;
player.hands3._visible = 0;
player.hands4._visible = 0;
player.handsg._visible = 0;
switch (current_w) {
case 0 :
player.hands._visible = 1;
break;
case 1 :
player.hands1._visible = 1;
bulletSpeed = bS1;
break;
case 2 :
player.hands2._visible = 1;
bulletSpeed = bS2;
break;
case 3 :
player.hands3._visible = 1;
bulletSpeed = bS3;
break;
case 4 :
player.hands4._visible = 1;
bulletSpeed = bS4;
}
defeat.gotoAndStop(1);
victory.gotoAndStop(1);
var docs = 0;
arrow1._visible = 0;
player.onEnterFrame = function () {
if (p_health < 1) {
health_t.text = 0;
if (player._currentframe == 1) {
player.play();
player._name = "gsom";
defeat.play();
}
} else {
if (hitter.hitTest(finish)) {
player._name = "gsom";
hitter._name = "gsom2";
victory.play();
var _local5 = SharedObject.getLocal("numlevs");
if (_local5.data.num < 12) {
_local5.data.num = 12;
_local5.flush();
}
}
if (doci._currentframe == 1) {
if (hitter.hitTest(doci.hitter)) {
doci.hitter._visible = 1;
if (Key.isDown(32)) {
doci.play();
docs = 1;
arrow1.play();
docipicked.play();
v10_spotted = 1;
v11_spotted = 1;
v12_spotted = 1;
v13_spotted = 1;
}
} else {
doci.hitter._visible = 0;
}
}
if (plasmagun._currentframe == 1) {
if (hitter.hitTest(plasmagun.hitter)) {
plasmagun.hitter._visible = 1;
if (Key.isDown(32)) {
plasmagun.play();
w4_ok = 1;
gui_weap.weap_none4._visible = 0;
plasmagunpicked.play();
}
} else {
plasmagun.hitter._visible = 0;
}
}
if (hitter.hitTest(jad)) {
p_health = p_health - 21;
}
if (hitter.hitTest(jad1)) {
p_health = p_health - 32;
}
if (hitter.hitTest(jad2)) {
p_health = p_health - 11;
}
if (hitter.hitTest(jad3)) {
p_health = p_health - 27;
}
if (hitter.hitTest(jad4)) {
p_health = p_health - 100;
}
if (_global.deton) {
var _local12 = jad._x - player._x;
var _local10 = jad._y - player._y;
var _local19 = Math.sqrt((_local12 * _local12) + (_local10 * _local10));
var _local8 = jad1._x - player._x;
var _local6 = jad1._y - player._y;
var _local15 = Math.sqrt((_local8 * _local8) + (_local6 * _local6));
var _local7 = jad2._x - player._x;
var _local13 = jad2._y - player._y;
var _local20 = Math.sqrt((_local7 * _local7) + (_local13 * _local13));
var _local14 = jad3._x - player._x;
var _local11 = jad3._y - player._y;
var _local21 = Math.sqrt((_local14 * _local14) + (_local11 * _local11));
var _local18 = Math.min(_local19, _local20);
var _local17 = Math.min(_local21, _local15);
var _local16 = Math.min(_local17, _local18);
jadv = (100 - _local16) + 10;
_root.raddet.dettt._width = jadv;
}
if (radd._currentframe == 1) {
if (Key.isDown(81)) {
radd.play();
if (_global.deton == 1) {
_global.deton = 0;
_root.raddet.dettt._width = 0;
_root.raddet.gotoAndStop(1);
p_speed = p_speed * 2;
rad1._visible = 0;
rad2._visible = 0;
rad3._visible = 0;
} else {
_global.deton = 1;
_root.raddet.gotoAndStop(2);
p_speed = p_speed / 2;
rad1._visible = 1;
rad2._visible = 1;
rad3._visible = 1;
}
}
}
grens.text = _global.ammog;
switch (_global.current_w) {
case 0 :
ammo_cur.text = "0";
break;
case 1 :
ammo_cur.text = _global.ammo1;
break;
case 2 :
ammo_cur.text = _global.ammo2;
break;
case 3 :
ammo_cur.text = _global.ammo3;
break;
case 4 :
ammo_cur.text = _global.ammo4;
}
health_t.text = p_health;
switch (Key.isDown(87) - Key.isDown(83)) {
case 1 :
ypluz = -10;
break;
case -1 :
ypluz = 10;
break;
default :
ypluz = 0;
}
switch (Key.isDown(68) - Key.isDown(65)) {
case 1 :
xpluz = 10;
break;
case -1 :
xpluz = -10;
break;
default :
xpluz = 0;
}
delta_x = _xmouse - player._x;
delta_y = _ymouse - player._y;
mAngle = Math.atan2(delta_y, delta_x);
mAngleD = (mAngle / Math.PI) * 180;
dAngleD = player._rotation - mAngleD;
if (dAngleD > 180) {
dAngleD = -360 + dAngleD;
} else if (dAngleD < -180) {
dAngleD = 360 + dAngleD;
}
if (Math.abs(dAngleD) < rotToMouseSpeed) {
player._rotation = player._rotation - dAngleD;
} else if (dAngleD > 0) {
player._rotation = player._rotation - rotToMouseSpeed;
} else {
player._rotation = player._rotation + rotToMouseSpeed;
}
_root.hitter._x = _root.player._x + xpluz;
_root.hitter._y = _root.player._y;
_root.hittery._x = _root.player._x;
_root.hittery._y = _root.player._y + ypluz;
_root.hitter._rotation = _root.player._rotation;
var _local4 = hitter._x - player._x;
var _local3 = hittery._y - player._y;
var _local9 = Math.atan2(_local3, _local4);
var _local22 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if (_local22 > p_speed) {
tgtX = player._x + (p_speed * Math.cos(_local9));
tgtY = player._y + (p_speed * Math.sin(_local9));
if (walls.hitTest(hitter._x, hitter._y, true)) {
player._x = tgtX;
player.legs.play();
}
if (walls.hitTest(hittery._x, hittery._y, true)) {
player._y = tgtY;
player.legs.play();
}
}
if ((change._currentFrame == 1) && (gren._currentFrame == 1)) {
if (w1_ok) {
if (Key.isDown(49) && (_global.current_w != 1)) {
_global.selected_w = 1;
bulletSpeed = bS1;
change.gotoAndPlay(1);
}
}
if (w2_ok) {
if (Key.isDown(50) && (_global.current_w != 2)) {
_global.selected_w = 2;
bulletSpeed = bS2;
change.gotoAndPlay(1);
}
}
if (w3_ok) {
if (Key.isDown(51) && (_global.current_w != 3)) {
_global.selected_w = 3;
bulletSpeed = bS3;
change.gotoAndPlay(1);
}
}
if (w4_ok) {
if (Key.isDown(52) && (_global.current_w != 4)) {
_global.selected_w = 4;
bulletSpeed = bS4;
change.gotoAndPlay(1);
}
}
}
if (suckmygun == 1) {
if (!exit.hitTest(_xmouse, _ymouse, true)) {
switch (_global.current_w) {
case 1 :
if (_global.ammo1 > 0) {
if ((player.hands1._currentframe == 8) || (player.hands1._currentframe == 10)) {
player.hands1.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
break;
case 2 :
if (_global.ammo2 > 0) {
if ((player.hands2._currentframe == 7) || (player.hands2._currentframe == 13)) {
player.hands2.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
break;
case 3 :
if (_global.ammo3 > 0) {
if ((player.hands3._currentframe == 7) || (player.hands3._currentframe == 9)) {
player.hands3.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
break;
case 4 :
if (_global.ammo4 > 0) {
if ((player.hands4._currentframe == 7) || (player.hands4._currentframe == 9)) {
player.hands4.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
}
}
}
if (Key.isDown(71)) {
if (_global.ammog > 0) {
if (_root.gren._currentFrame == 1) {
_root.gren.gotoAndPlay(1);
}
}
}
}
};
var lev = 0;
placeBullet = function (tgt) {
lev++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("b" + lev, lev);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((player._rotation + tgt._rotation) - 90) + random(3);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(vrag10.hitter)) {
v10_health = v10_health - 8;
v10_spotted = 1;
this.removeMovieClip();
placeBlood(vrag10._x, vrag10._y, vrag10._rotation - 180);
}
if (this.hitTest(vrag11.hitter)) {
v11_health = v11_health - 1;
v11_spotted = 1;
this.removeMovieClip();
placeBlood(vrag11._x, vrag11._y, vrag11._rotation - 180);
}
if (this.hitTest(vrag12.hitter)) {
v12_health = v12_health - 1;
v12_spotted = 1;
this.removeMovieClip();
placeBlood(vrag12._x, vrag12._y, vrag12._rotation - 180);
}
if (this.hitTest(vrag13.hitter)) {
v13_health = v13_health - 1;
v13_spotted = 1;
this.removeMovieClip();
placeBlood(vrag13._x, vrag13._y, vrag13._rotation - 180);
}
if (this.hitTest(vrag1.hitter)) {
v1_health = v1_health - 8;
v1_spotted = 1;
this.removeMovieClip();
placeBlood(vrag1._x, vrag1._y, vrag1._rotation - 180);
}
if (this.hitTest(vrag2.hitter)) {
v2_health = v2_health - 8;
v2_spotted = 1;
this.removeMovieClip();
placeBlood(vrag2._x, vrag2._y, vrag2._rotation - 180);
}
if (this.hitTest(vrag3.hitter)) {
v3_health = v3_health - 8;
v3_spotted = 1;
this.removeMovieClip();
placeBlood(vrag3._x, vrag3._y, vrag3._rotation - 180);
}
if (this.hitTest(vrag4.hitter)) {
v4_health = v4_health - 8;
v4_spotted = 1;
this.removeMovieClip();
placeBlood(vrag4._x, vrag4._y, vrag4._rotation - 180);
}
if (this.hitTest(vrag5.hitter)) {
v5_health = v5_health - 8;
v5_spotted = 1;
this.removeMovieClip();
placeBlood(vrag5._x, vrag5._y, vrag5._rotation - 180);
}
if (this.hitTest(los1)) {
v1_spotted = 1;
}
if (this.hitTest(los2)) {
v2_spotted = 1;
}
if (this.hitTest(los3)) {
v3_spotted = 1;
}
if (this.hitTest(los4)) {
v4_spotted = 1;
}
if (this.hitTest(los5)) {
v5_spotted = 1;
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var levbfg = 0;
placebfgBullet = function (tgt) {
levbfg++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
h1._visible = 0;
h2._visible = 0;
h3._visible = 0;
h4._visible = 0;
h5._visible = 0;
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bfgbullet.duplicateMovieClip("b" + levbfg, levbfg);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = (player._rotation + tgt._rotation) - 90;
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
h1._x = 700 - this._x;
h1._y = 525 - this._y;
h3._x = 350;
h3._y = 262.5;
h2._x = ((h1._x - h3._x) / 2) + 350;
h2._y = ((h1._y - h3._y) / 2) + 262.5;
h4._x = this._x + ((h3._x - this._x) / 2);
h4._y = this._y + ((h3._y - this._y) / 2);
h5._x = this._x;
h5._y = this._y;
h1._visible = 1;
h2._visible = 1;
h3._visible = 1;
h4._visible = 1;
h5._visible = 1;
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
h1._visible = 0;
h2._visible = 0;
h3._visible = 0;
h4._visible = 0;
h5._visible = 0;
}
if (this.hitTest(vrag10.hitter)) {
v10_health = v10_health - 500;
v10_spotted = 1;
placeBlood(vrag10._x, vrag10._y, vrag10._rotation - 180);
h1._visible = 0;
h2._visible = 0;
h3._visible = 0;
h4._visible = 0;
h5._visible = 0;
}
if (this.hitTest(vrag11.hitter)) {
v11_health = v11_health - 500;
v11_spotted = 1;
this.removeMovieClip();
placeBlood(vrag11._x, vrag11._y, vrag11._rotation - 180);
h1._visible = 0;
h2._visible = 0;
h3._visible = 0;
h4._visible = 0;
h5._visible = 0;
}
if (this.hitTest(vrag12.hitter)) {
v12_health = v12_health - 500;
v12_spotted = 1;
placeBlood(vrag12._x, vrag12._y, vrag12._rotation - 180);
h1._visible = 0;
h2._visible = 0;
h3._visible = 0;
h4._visible = 0;
h5._visible = 0;
}
if (this.hitTest(vrag13.hitter)) {
v13_health = v13_health - 500;
v13_spotted = 1;
placeBlood(vrag13._x, vrag13._y, vrag13._rotation - 180);
h1._visible = 0;
h2._visible = 0;
h3._visible = 0;
h4._visible = 0;
h5._visible = 0;
}
if (this.hitTest(vrag1.hitter)) {
v1_health = v1_health - 500;
v1_spotted = 1;
placeBlood(vrag1._x, vrag1._y, vrag1._rotation - 180);
h1._visible = 0;
h2._visible = 0;
h3._visible = 0;
h4._visible = 0;
h5._visible = 0;
}
if (this.hitTest(vrag2.hitter)) {
v2_health = v2_health - 500;
v2_spotted = 1;
placeBlood(vrag2._x, vrag2._y, vrag2._rotation - 180);
h1._visible = 0;
h2._visible = 0;
h3._visible = 0;
h4._visible = 0;
h5._visible = 0;
}
if (this.hitTest(vrag3.hitter)) {
v3_health = v3_health - 500;
v3_spotted = 1;
placeBlood(vrag3._x, vrag3._y, vrag3._rotation - 180);
h1._visible = 0;
h2._visible = 0;
h3._visible = 0;
h4._visible = 0;
h5._visible = 0;
}
if (this.hitTest(vrag4.hitter)) {
v4_health = v4_health - 500;
v4_spotted = 1;
placeBlood(vrag4._x, vrag4._y, vrag4._rotation - 180);
h1._visible = 0;
h2._visible = 0;
h3._visible = 0;
h4._visible = 0;
h5._visible = 0;
}
if (this.hitTest(vrag5.hitter)) {
v5_health = v5_health - 500;
v5_spotted = 1;
placeBlood(vrag5._x, vrag5._y, vrag5._rotation - 180);
h1._visible = 0;
h2._visible = 0;
h3._visible = 0;
h4._visible = 0;
h5._visible = 0;
}
if (this.hitTest(los1)) {
v1_spotted = 1;
}
if (this.hitTest(los2)) {
v2_spotted = 1;
}
if (this.hitTest(los3)) {
v3_spotted = 1;
}
if (this.hitTest(los4)) {
v4_spotted = 1;
}
if (this.hitTest(los5)) {
v5_spotted = 1;
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
h1._visible = 0;
h2._visible = 0;
h3._visible = 0;
h4._visible = 0;
h5._visible = 0;
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
h1._visible = 0;
h2._visible = 0;
h3._visible = 0;
h4._visible = 0;
h5._visible = 0;
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
h1._visible = 0;
h2._visible = 0;
h3._visible = 0;
h4._visible = 0;
h5._visible = 0;
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
h1._visible = 0;
h2._visible = 0;
h3._visible = 0;
h4._visible = 0;
h5._visible = 0;
}
};
};
var leve = 0;
placeEBullet = function (tgt) {
leve++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve, leve);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((vrag1._rotation + tgt._rotation) - 93) + random(5);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 8;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var leve2 = 0;
placeE2Bullet = function (tgt) {
leve2++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve2, leve2);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((vrag2._rotation + tgt._rotation) - 93) + random(5);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 3;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var leve3 = 0;
placeE3Bullet = function (tgt) {
leve3++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve3, leve3);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((vrag3._rotation + tgt._rotation) - 93) + random(5);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 8;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var leve4 = 0;
placeE4Bullet = function (tgt) {
leve4++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve4, leve4);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((vrag4._rotation + tgt._rotation) - 93) + random(1);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 8;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var leve5 = 0;
placeE5Bullet = function (tgt) {
leve5++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve5, leve5);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((vrag5._rotation + tgt._rotation) - 93) + random(1);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 8;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var leve10 = 0;
placeE10Bullet = function (tgt) {
leve10++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve10, leve10);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = (vrag10._rotation + tgt._rotation) - 93;
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 51;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var leve11 = 0;
placeE11Bullet = function (tgt) {
leve11++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve11, leve11);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = (vrag11._rotation + tgt._rotation) - 93;
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 51;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var leve12 = 0;
placeE12Bullet = function (tgt) {
leve12++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve12, leve12);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = (vrag12._rotation + tgt._rotation) - 93;
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 51;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var leve13 = 0;
placeE13Bullet = function (tgt) {
leve13++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("be" + leve13, leve13);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = (vrag13._rotation + tgt._rotation) - 93;
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(player.hitter)) {
p_health = p_health - 51;
this.removeMovieClip();
placeBlood(player._x, player._y, player._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var led = 0;
placeGren = function (tr) {
led++;
var _local3 = {x:tr._x, y:tr._y, rotation:tr._rotation};
tr._parent.localToGlobal(_local3);
globalToLocal(_local3);
var d = grena.duplicateMovieClip("b" + led, led);
d._x = _local3.x;
d._y = _local3.y;
d._rotation = player._rotation;
d.a = (d._rotation / 180) * Math.PI;
d.clickSpot_x = _root._xmouse;
d.clickSpot_y = _root._ymouse;
d.onEnterFrame = function () {
gotoSpotX = d.clickSpot_x;
gotoSpotY = d.clickSpot_y;
delta_x = this._x - gotoSpotX;
delta_y = this._y - gotoSpotY;
if (Math.sqrt((delta_x * delta_x) + (delta_y * delta_y)) > grenSpeed) {
this._x = this._x + (grenSpeed * Math.cos(this.a));
this._y = this._y + (grenSpeed * Math.sin(this.a));
this._rotation = this._rotation - 10;
} else {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
};
};
boom._visible = false;
var levv = 0;
badaboom._visible = false;
var levvv = 0;
blood._visible = false;
var leb = 0;
death._visible = false;
var det = 0;
radlight.onEnterFrame = function () {
var _local5 = radlight._x - player._x;
var _local4 = radlight._y - player._y;
var _local3 = Math.sqrt((_local5 * _local5) + (_local4 * _local4));
_global.hrrr = 100 - _local3;
_root.dettt._width = hrrr;
if (_local3 < 150) {
radlight.alpha = _local3 - 50;
} else {
radlight.alpha = 100;
}
};
v1_speed = 2;
var v1_spotted = 0;
var v1_health = 40;
_global.v1_move = 1;
vrag1.onEnterFrame = function () {
if (v1_health > 0) {
los1._x = vrag1._x;
los1._y = vrag1._y;
los1._rotation = vrag1._rotation;
if (los1.hitTest(hitter)) {
v1_spotted = 1;
}
if (los1.thin.hitTest(hitter)) {
beh1.play();
} else {
beh1.gotoAndPlay("halt");
}
if (v1_spotted == 1) {
var _local9 = player._x - vrag1._x;
var _local8 = player._y - vrag1._y;
} else {
var _local9 = s1.pp._x - vrag1._x;
var _local8 = s1.pp._y - vrag1._y;
if (vrag1.hitTest(s1.pp)) {
s1.play();
}
}
var _local7 = Math.atan2(_local8, _local9);
var _local12 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local12 > v1_speed) {
tgtX = vrag1._x + (v1_speed * Math.cos(_local7));
tgtY = vrag1._y + (v1_speed * Math.sin(_local7));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local13 = dAngleRadian(direction, _local7);
workAngle = _local7 + (_local13 * 0.8);
var _local6 = 0;
while (_local6 < 360) {
var _local2 = -1;
while (_local2 <= 1) {
var _local3 = workAngle + (radian(_local6) * _local2);
var _local5 = vrag1._x + (v1_speed * Math.cos(_local3));
var _local4 = vrag1._y + (v1_speed * Math.sin(_local3));
if (walls.hitTest(_local5, _local4, true)) {
tgtX = _local5;
tgtY = _local4;
break;
}
_local2 = _local2 + 2;
}
_local6 = _local6 + 10;
}
}
var _local11 = tgtX - vrag1._x;
var _local10 = tgtY - vrag1._y;
direction = Math.atan2(_local10, _local11);
var _local13 = dAngleDegree((direction * 180) / Math.PI, vrag1._rotation);
vrag1._rotation = vrag1._rotation + (_local13 * 0.2);
if (_global.v1_move) {
vrag1._x = tgtX;
vrag1._y = tgtY;
vrag1.legs.play();
}
}
} else {
placeDeath(vrag1._x, vrag1._y, vrag1.getDepth());
los1._visible = 0;
}
};
v5_speed = 2;
var v5_spotted = 0;
var v5_health = 40;
_global.v5_move = 1;
vrag5.onEnterFrame = function () {
if (v5_health > 0) {
los5._x = vrag5._x;
los5._y = vrag5._y;
los5._rotation = vrag5._rotation;
if (los5.hitTest(hitter)) {
v5_spotted = 1;
}
if (los5.thin.hitTest(hitter)) {
beh5.play();
} else {
beh5.gotoAndPlay("halt");
}
if (v5_spotted == 1) {
var _local9 = player._x - vrag5._x;
var _local8 = player._y - vrag5._y;
} else {
var _local9 = s5.pp._x - vrag5._x;
var _local8 = s5.pp._y - vrag5._y;
if (vrag5.hitTest(s5.pp)) {
s5.play();
}
}
var _local7 = Math.atan2(_local8, _local9);
var _local12 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local12 > v5_speed) {
tgtX = vrag5._x + (v5_speed * Math.cos(_local7));
tgtY = vrag5._y + (v5_speed * Math.sin(_local7));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local13 = dAngleRadian(direction, _local7);
workAngle = _local7 + (_local13 * 0.8);
var _local6 = 0;
while (_local6 < 360) {
var _local2 = -1;
while (_local2 <= 1) {
var _local3 = workAngle + (radian(_local6) * _local2);
var _local5 = vrag5._x + (v5_speed * Math.cos(_local3));
var _local4 = vrag5._y + (v5_speed * Math.sin(_local3));
if (walls.hitTest(_local5, _local4, true)) {
tgtX = _local5;
tgtY = _local4;
break;
}
_local2 = _local2 + 2;
}
_local6 = _local6 + 10;
}
}
var _local11 = tgtX - vrag5._x;
var _local10 = tgtY - vrag5._y;
direction = Math.atan2(_local10, _local11);
var _local13 = dAngleDegree((direction * 180) / Math.PI, vrag5._rotation);
vrag5._rotation = vrag5._rotation + (_local13 * 0.2);
if (_global.v5_move) {
vrag5._x = tgtX;
vrag5._y = tgtY;
vrag5.legs.play();
}
}
} else {
placeDeath(vrag5._x, vrag5._y, vrag5.getDepth());
los5._visible = 0;
}
};
v3_speed = 2;
var v3_spotted = 0;
var v3_health = 50;
_global.v3_move = 1;
vrag3.onEnterFrame = function () {
if (v3_health > 0) {
los3._x = vrag3._x;
los3._y = vrag3._y;
los3._rotation = vrag3._rotation;
if (los3.hitTest(hitter)) {
v3_spotted = 1;
}
if (los3.thin.hitTest(hitter)) {
beh3.play();
} else {
beh3.gotoAndPlay("halt");
}
if (v3_spotted == 1) {
var _local9 = player._x - vrag3._x;
var _local8 = player._y - vrag3._y;
}
var _local7 = Math.atan2(_local8, _local9);
var _local12 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local12 > v3_speed) {
tgtX = vrag3._x + (v3_speed * Math.cos(_local7));
tgtY = vrag3._y + (v3_speed * Math.sin(_local7));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local13 = dAngleRadian(direction, _local7);
workAngle = _local7 + (_local13 * 0.8);
var _local6 = 0;
while (_local6 < 360) {
var _local2 = -1;
while (_local2 <= 1) {
var _local3 = workAngle + (radian(_local6) * _local2);
var _local5 = vrag3._x + (v3_speed * Math.cos(_local3));
var _local4 = vrag3._y + (v3_speed * Math.sin(_local3));
if (walls.hitTest(_local5, _local4, true)) {
tgtX = _local5;
tgtY = _local4;
break;
}
_local2 = _local2 + 2;
}
_local6 = _local6 + 10;
}
}
var _local11 = tgtX - vrag3._x;
var _local10 = tgtY - vrag3._y;
direction = Math.atan2(_local10, _local11);
var _local13 = dAngleDegree((direction * 180) / Math.PI, vrag3._rotation);
vrag3._rotation = vrag3._rotation + (_local13 * 0.2);
if (_global.v3_move) {
vrag3._x = tgtX;
vrag3._y = tgtY;
vrag3.legs.play();
}
}
} else {
placeDeath(vrag3._x, vrag3._y, vrag3.getDepth());
los3._visible = 0;
}
};
v4_speed = 2;
var v4_spotted = 0;
var v4_health = 50;
_global.v4_move = 1;
vrag4.onEnterFrame = function () {
if (v4_health > 0) {
los4._x = vrag4._x;
los4._y = vrag4._y;
los4._rotation = vrag4._rotation;
if (los4.hitTest(hitter)) {
v4_spotted = 1;
}
if (los4.thin.hitTest(hitter)) {
beh4.play();
} else {
beh4.gotoAndPlay("halt");
}
if (v4_spotted == 1) {
var _local8 = player._x - vrag4._x;
var _local7 = player._y - vrag4._y;
}
var _local6 = Math.atan2(_local7, _local8);
var _local11 = Math.sqrt((_local8 * _local8) + (_local7 * _local7));
if (_local11 > v4_speed) {
tgtX = vrag4._x + (v4_speed * Math.cos(_local6));
tgtY = vrag4._y + (v4_speed * Math.sin(_local6));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local12 = dAngleRadian(direction, _local6);
workAngle = _local6 + (_local12 * 0.8);
var _local5 = 0;
while (_local5 < 360) {
var _local1 = -1;
while (_local1 <= 1) {
var _local2 = workAngle + (radian(_local5) * _local1);
var _local4 = vrag4._x + (v4_speed * Math.cos(_local2));
var _local3 = vrag4._y + (v4_speed * Math.sin(_local2));
if (walls.hitTest(_local4, _local3, true)) {
tgtX = _local4;
tgtY = _local3;
break;
}
_local1 = _local1 + 2;
}
_local5 = _local5 + 10;
}
}
var _local10 = tgtX - vrag4._x;
var _local9 = tgtY - vrag4._y;
direction = Math.atan2(_local9, _local10);
var _local12 = dAngleDegree((direction * 180) / Math.PI, vrag4._rotation);
vrag4._rotation = vrag4._rotation + (_local12 * 0.2);
}
} else {
placeDeath(vrag4._x, vrag4._y, vrag4.getDepth());
los4._visible = 0;
}
};
v2_speed = 2;
var v2_spotted = 0;
var v2_health = 60;
_global.v2_move = 1;
vrag2.onEnterFrame = function () {
if (v2_health > 0) {
los2._x = vrag2._x;
los2._y = vrag2._y;
los2._rotation = vrag2._rotation;
if (los2.hitTest(hitter)) {
v2_spotted = 1;
}
if (los2.thin.hitTest(hitter)) {
beh2.play();
} else {
beh2.gotoAndPlay("halt");
}
if (v2_spotted == 1) {
var _local9 = player._x - vrag2._x;
var _local8 = player._y - vrag2._y;
}
var _local7 = Math.atan2(_local8, _local9);
var _local12 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local12 > v2_speed) {
tgtX = vrag2._x + (v2_speed * Math.cos(_local7));
tgtY = vrag2._y + (v2_speed * Math.sin(_local7));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local13 = dAngleRadian(direction, _local7);
workAngle = _local7 + (_local13 * 0.8);
var _local6 = 0;
while (_local6 < 360) {
var _local2 = -1;
while (_local2 <= 1) {
var _local3 = workAngle + (radian(_local6) * _local2);
var _local5 = vrag2._x + (v2_speed * Math.cos(_local3));
var _local4 = vrag2._y + (v2_speed * Math.sin(_local3));
if (walls.hitTest(_local5, _local4, true)) {
tgtX = _local5;
tgtY = _local4;
break;
}
_local2 = _local2 + 2;
}
_local6 = _local6 + 10;
}
}
var _local11 = tgtX - vrag2._x;
var _local10 = tgtY - vrag2._y;
direction = Math.atan2(_local10, _local11);
var _local13 = dAngleDegree((direction * 180) / Math.PI, vrag2._rotation);
vrag2._rotation = vrag2._rotation + (_local13 * 0.2);
if (_global.v2_move) {
vrag2._x = tgtX;
vrag2._y = tgtY;
vrag2.legs.play();
}
}
} else {
placeDeath(vrag2._x, vrag2._y, vrag2.getDepth());
los2._visible = 0;
}
};
v10_speed = 1;
var v10_spotted = 0;
var v10_health = 500;
_global.v10_move = 1;
vrag10.onEnterFrame = function () {
if (v10_health > 0) {
los10._x = vrag10._x;
los10._y = vrag10._y;
los10._rotation = vrag10._rotation;
if (los10.hitTest(hitter)) {
v10_spotted = 1;
}
if (los10.thin.hitTest(hitter)) {
vrag10.hands.play();
}
if (v10_spotted == 1) {
var _local8 = player._x - vrag10._x;
var _local7 = player._y - vrag10._y;
} else {
var _local8 = s10.pp._x - vrag10._x;
var _local7 = s10.pp._y - vrag10._y;
if (vrag10.hitTest(s10.pp)) {
s10.play();
}
}
var _local6 = Math.atan2(_local7, _local8);
var _local11 = Math.sqrt((_local8 * _local8) + (_local7 * _local7));
if (_local11 > v10_speed) {
tgtX = vrag10._x + (v10_speed * Math.cos(_local6));
tgtY = vrag10._y + (v10_speed * Math.sin(_local6));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local12 = dAngleRadian(direction, _local6);
workAngle = _local6 + (_local12 * 0.8);
var _local5 = 0;
while (_local5 < 360) {
var _local1 = -1;
while (_local1 <= 1) {
var _local2 = workAngle + (radian(_local5) * _local1);
var _local4 = vrag10._x + (v10_speed * Math.cos(_local2));
var _local3 = vrag10._y + (v10_speed * Math.sin(_local2));
if (walls.hitTest(_local4, _local3, true)) {
tgtX = _local4;
tgtY = _local3;
break;
}
_local1 = _local1 + 2;
}
_local5 = _local5 + 10;
}
}
var _local10 = tgtX - vrag10._x;
var _local9 = tgtY - vrag10._y;
direction = Math.atan2(_local9, _local10);
var _local12 = dAngleDegree((direction * 180) / Math.PI, vrag10._rotation);
vrag10._rotation = vrag10._rotation + (_local12 * 0.2);
vrag10._x = tgtX;
vrag10._y = tgtY;
vrag10.legs.play();
}
} else {
placeDeath(vrag10._x, vrag10._y, vrag10.getDepth());
los10._visible = 0;
}
};
v11_speed = 1;
var v11_spotted = 0;
var v11_health = 500;
_global.v11_move = 0;
vrag11.onEnterFrame = function () {
if (v11_health > 0) {
los11._x = vrag11._x;
los11._y = vrag11._y;
los11._rotation = vrag11._rotation;
if (los11.hitTest(hitter)) {
v11_spotted = 1;
}
if (los11.thin.hitTest(hitter)) {
vrag11.hands.play();
}
if (v11_spotted == 1) {
var _local8 = player._x - vrag11._x;
var _local7 = player._y - vrag11._y;
} else {
var _local8 = s11.pp._x - vrag11._x;
var _local7 = s11.pp._y - vrag11._y;
if (vrag11.hitTest(s11.pp)) {
s11.play();
}
}
var _local6 = Math.atan2(_local7, _local8);
var _local11 = Math.sqrt((_local8 * _local8) + (_local7 * _local7));
if (_local11 > v11_speed) {
tgtX = vrag11._x + (v11_speed * Math.cos(_local6));
tgtY = vrag11._y + (v11_speed * Math.sin(_local6));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local12 = dAngleRadian(direction, _local6);
workAngle = _local6 + (_local12 * 0.8);
var _local5 = 0;
while (_local5 < 360) {
var _local1 = -1;
while (_local1 <= 1) {
var _local2 = workAngle + (radian(_local5) * _local1);
var _local4 = vrag11._x + (v11_speed * Math.cos(_local2));
var _local3 = vrag11._y + (v11_speed * Math.sin(_local2));
if (walls.hitTest(_local4, _local3, true)) {
tgtX = _local4;
tgtY = _local3;
break;
}
_local1 = _local1 + 2;
}
_local5 = _local5 + 10;
}
}
var _local10 = tgtX - vrag11._x;
var _local9 = tgtY - vrag11._y;
direction = Math.atan2(_local9, _local10);
var _local12 = dAngleDegree((direction * 180) / Math.PI, vrag11._rotation);
vrag11._rotation = vrag11._rotation + (_local12 * 0.2);
vrag11._x = tgtX;
vrag11._y = tgtY;
vrag11.legs.play();
}
} else {
placeDeath(vrag11._x, vrag11._y, vrag11.getDepth());
los11._visible = 0;
}
};
v12_speed = 1;
var v12_spotted = 0;
var v12_health = 500;
_global.v12_move = 0;
vrag12.onEnterFrame = function () {
if (v12_health > 0) {
los12._x = vrag12._x;
los12._y = vrag12._y;
los12._rotation = vrag12._rotation;
if (los12.hitTest(hitter)) {
v12_spotted = 1;
}
if (los12.thin.hitTest(hitter)) {
vrag12.hands.play();
}
if (v12_spotted == 1) {
var _local8 = player._x - vrag12._x;
var _local7 = player._y - vrag12._y;
} else {
var _local8 = s12.pp._x - vrag12._x;
var _local7 = s12.pp._y - vrag12._y;
if (vrag12.hitTest(s12.pp)) {
s12.play();
}
}
var _local6 = Math.atan2(_local7, _local8);
var _local11 = Math.sqrt((_local8 * _local8) + (_local7 * _local7));
if (_local11 > v12_speed) {
tgtX = vrag12._x + (v12_speed * Math.cos(_local6));
tgtY = vrag12._y + (v12_speed * Math.sin(_local6));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local12 = dAngleRadian(direction, _local6);
workAngle = _local6 + (_local12 * 0.8);
var _local5 = 0;
while (_local5 < 360) {
var _local1 = -1;
while (_local1 <= 1) {
var _local2 = workAngle + (radian(_local5) * _local1);
var _local4 = vrag12._x + (v12_speed * Math.cos(_local2));
var _local3 = vrag12._y + (v12_speed * Math.sin(_local2));
if (walls.hitTest(_local4, _local3, true)) {
tgtX = _local4;
tgtY = _local3;
break;
}
_local1 = _local1 + 2;
}
_local5 = _local5 + 10;
}
}
var _local10 = tgtX - vrag12._x;
var _local9 = tgtY - vrag12._y;
direction = Math.atan2(_local9, _local10);
var _local12 = dAngleDegree((direction * 180) / Math.PI, vrag12._rotation);
vrag12._rotation = vrag12._rotation + (_local12 * 0.2);
vrag12._x = tgtX;
vrag12._y = tgtY;
vrag12.legs.play();
}
} else {
placeDeath(vrag12._x, vrag12._y, vrag12.getDepth());
los12._visible = 0;
}
};
vrag10.onRollOver = function () {
los10._visible = 1;
};
vrag10.onRollOut = function () {
los10._visible = 0;
};
vrag10.onReleaseOutside = function () {
los10._visible = 0;
};
vrag11.onRollOver = function () {
los11._visible = 1;
};
vrag11.onRollOut = function () {
los11._visible = 0;
};
vrag11.onReleaseOutside = function () {
los11._visible = 0;
};
vrag12.onRollOver = function () {
los12._visible = 1;
};
vrag12.onRollOut = function () {
los12._visible = 0;
};
vrag12.onReleaseOutside = function () {
los12._visible = 0;
};
Instance of Symbol 496 MovieClip in Frame 258
onClipEvent (enterFrame) {
this._x = player._x;
this._y = player._y;
}
Instance of Symbol 197 MovieClip in Frame 258
on (keyPress "<?#19>") {
_root.gotoAndPlay("inchange");
defeat.Key.removeListener(keyListener);
Key.removeListener(keyListener);
Key.removeListener(defeat.keyListener);
victory.Key.removeListener(keyListener2);
Key.removeListener(victory.keyListener2);
Key.removeListener(keyListener2);
}
Instance of Symbol 530 MovieClip in Frame 258
onClipEvent (load) {
startDrag (this, true);
Mouse.hide();
}
onClipEvent (enterFrame) {
Mouse.hide();
}
Frame 260
stopAllSounds();
my_sound2.start();
my_sound2.onSoundComplete = function () {
my_sound2.start();
};
function placeBoom(x, y) {
levv++;
var _local1 = boom.duplicateMovieClip("bdoom" + levv, levv);
_local1._x = x;
_local1._y = y;
}
function placeBadaboom(x, y) {
levvv++;
var _local1 = badaboom.duplicateMovieClip("badadoom" + levvv, levvv);
_local1._x = x;
_local1._y = y;
if (_local1.hitTest(player.hitter)) {
difx = _local1._x - player._x;
dify = _local1._y - player._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
p_health = p_health - (120 - diff);
}
if (_local1.hitTest(zomb1.hitter)) {
difx = _local1._x - zomb1._x;
dify = _local1._y - zomb1._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
z1_health = z1_health - (180 - diff);
}
if (_local1.hitTest(zomb2.hitter)) {
difx = _local1._x - zomb2._x;
dify = _local1._y - zomb2._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
z2_health = z2_health - (180 - diff);
}
if (_local1.hitTest(zomb3.hitter)) {
difx = _local1._x - zomb3._x;
dify = _local1._y - zomb3._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
z3_health = z3_health - (180 - diff);
}
if (_local1.hitTest(zomb4.hitter)) {
difx = _local1._x - zomb4._x;
dify = _local1._y - zomb4._y;
diff = Math.round(Math.sqrt((difx * difx) + (dify * dify)));
z4_health = z4_health - (180 - diff);
}
}
function placeBlood(x, y, rotation) {
leb++;
var _local1 = blood.duplicateMovieClip("blood" + leb, leb);
_local1._x = x;
_local1._y = y;
_local1._rotation = rotation;
}
function placeDeath(x, y) {
det++;
var _local1 = dea.death.duplicateMovieClip("blood" + det, det);
_local1._x = x;
_local1._y = y;
_local1._rotation = rotation;
deathsound.start();
}
function dAngleRadian(a1, a2) {
var _local1 = a1 - a2;
if (_local1 > Math.PI) {
_local1 = -6.28318530717959 + _local1;
} else if (_local1 < -3.14159265358979) {
_local1 = (Math.PI*2) + _local1;
}
return(_local1);
}
function dAngleDegree(a1, a2) {
var _local1 = a1 - a2;
if (_local1 > 180) {
_local1 = -360 + _local1;
} else if (_local1 < -180) {
_local1 = 360 + _local1;
}
return(_local1);
}
function degree(a) {
return((a / Math.PI) * 180);
}
function radian(a) {
return((a / 180) * Math.PI);
}
var suckmygun = 0;
_root.firebtn.onPress = function () {
suckmygun = 1;
};
_root.firebtn.onRelease = function () {
suckmygun = 0;
};
_root.firebtn.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag1.onPress = function () {
suckmygun = 1;
};
_root.vrag1.onRelease = function () {
suckmygun = 0;
};
_root.vrag1.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag2.onPress = function () {
suckmygun = 1;
};
_root.vrag2.onRelease = function () {
suckmygun = 0;
};
_root.vrag2.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag3.onPress = function () {
suckmygun = 1;
};
_root.vrag3.onRelease = function () {
suckmygun = 0;
};
_root.vrag3.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag4.onPress = function () {
suckmygun = 1;
};
_root.vrag4.onRelease = function () {
suckmygun = 0;
};
_root.vrag4.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag5.onPress = function () {
suckmygun = 1;
};
_root.vrag5.onRelease = function () {
suckmygun = 0;
};
_root.vrag5.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag10.onPress = function () {
suckmygun = 1;
};
_root.vrag10.onRelease = function () {
suckmygun = 0;
};
_root.vrag10.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag11.onPress = function () {
suckmygun = 1;
};
_root.vrag11.onRelease = function () {
suckmygun = 0;
};
_root.vrag11.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag12.onPress = function () {
suckmygun = 1;
};
_root.vrag12.onRelease = function () {
suckmygun = 0;
};
_root.vrag12.onReleaseOutside = function () {
suckmygun = 0;
};
_root.vrag14.onPress = function () {
suckmygun = 1;
};
_root.vrag14.onRelease = function () {
suckmygun = 0;
};
_root.vrag14.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb1.onPress = function () {
suckmygun = 1;
};
_root.zomb1.onRelease = function () {
suckmygun = 0;
};
_root.zomb1.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb2.onPress = function () {
suckmygun = 1;
};
_root.zomb2.onRelease = function () {
suckmygun = 0;
};
_root.zomb2.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb3.onPress = function () {
suckmygun = 1;
};
_root.zomb3.onRelease = function () {
suckmygun = 0;
};
_root.zomb3.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb4.onPress = function () {
suckmygun = 1;
};
_root.zomb4.onRelease = function () {
suckmygun = 0;
};
_root.zomb4.onReleaseOutside = function () {
suckmygun = 0;
};
_root.zomb5.onPress = function () {
suckmygun = 1;
};
_root.zomb5.onRelease = function () {
suckmygun = 0;
};
_root.zomb5.onReleaseOutside = function () {
suckmygun = 0;
};
stop();
_global.deton = 0;
pick1._visible = 0;
pick2._visible = 0;
var p_speed = 4;
var rotToMouseSpeed = 12;
var bS1 = 20;
var bS2 = 18;
var bS3 = 22;
var bS4 = 15;
var grenSpeed = 15;
var p_health = 100;
_global.current_w = 4;
gkey1._visible = 0;
_global.ammo1 = 27;
_global.ammo2 = 21;
_global.ammo3 = 60;
_global.ammo4 = 10;
_global.ammog = 4;
var w1_ok = 1;
var w2_ok = 1;
var w3_ok = 1;
var w4_ok = 1;
los1._visible = 0;
los3._visible = 0;
los4._visible = 0;
los5._visible = 0;
los10._visible = 0;
_global.selected_w;
var xpluz = 0;
var ypluz = 0;
var bulletSpeed;
if (w1_ok) {
gui_weap.weap_none1._visible = 0;
}
if (w2_ok) {
gui_weap.weap_none2._visible = 0;
}
if (w3_ok) {
gui_weap.weap_none3._visible = 0;
}
if (w4_ok) {
gui_weap.weap_none4._visible = 0;
}
gui_weap.sel_light.gotoAndStop(_global.current_w + 1);
player.hands._visible = 0;
player.hands1._visible = 0;
player.hands2._visible = 0;
player.hands3._visible = 0;
player.hands4._visible = 0;
player.handsg._visible = 0;
switch (current_w) {
case 0 :
player.hands._visible = 1;
break;
case 1 :
player.hands1._visible = 1;
bulletSpeed = bS1;
break;
case 2 :
player.hands2._visible = 1;
bulletSpeed = bS2;
break;
case 3 :
player.hands3._visible = 1;
bulletSpeed = bS3;
break;
case 4 :
player.hands4._visible = 1;
bulletSpeed = bS4;
}
defeat.gotoAndStop(1);
victory.gotoAndStop(1);
_global.timer = 0;
var timeto = 40;
player.onEnterFrame = function () {
if (rifle2._currentframe == 1) {
if (hitter.hitTest(rifle2)) {
rifle2.hitter._visible = 1;
pick2._visible = 1;
if (Key.isDown(32)) {
rifle2.play();
_global.ammo3 = _global.ammo3 + 30;
ammo3picked.play();
pick2._visible = 0;
}
} else {
rifle2.hitter._visible = 0;
pick2._visible = 0;
}
}
if (plasmagun._currentframe == 1) {
if (hitter.hitTest(plasmagun)) {
pick1._visible = 1;
plasmagun.hitter._visible = 1;
if (Key.isDown(32)) {
plasmagun.play();
_global.ammo4 = _global.ammo4 + 6;
ammo4picked.play();
pick1._visible = 0;
}
} else {
plasmagun.hitter._visible = 0;
pick1._visible = 0;
}
}
bar._width = (300 / timeto) * timer;
time_t.text = timer;
if (p_health < 1) {
pluser.stop();
health_t.text = 0;
if (player._currentframe == 1) {
player.play();
player._name = "gsom";
defeat.play();
}
} else if (timer == timeto) {
player.play();
player._name = "gsom";
placeBadaboom(gsom._x, gsom._y);
placeBadaboom(random(700), random(525));
pluser.stop();
health_t.text = 0;
player._name = "gsom";
hitter._name = "gsom2";
victory.play();
var _local5 = SharedObject.getLocal("numlevs");
if (_local5.data.num < 9) {
_local5.data.num = 9;
_local5.flush();
}
}
if (radd._currentframe == 1) {
if (Key.isDown(81)) {
radd.play();
if (_global.deton == 1) {
_global.deton = 0;
_root.raddet.dettt._width = 0;
_root.raddet.gotoAndStop(1);
p_speed = p_speed * 2;
} else {
_global.deton = 1;
_root.raddet.gotoAndStop(2);
p_speed = p_speed / 2;
}
}
}
grens.text = _global.ammog;
switch (_global.current_w) {
case 0 :
ammo_cur.text = "0";
break;
case 1 :
ammo_cur.text = _global.ammo1;
break;
case 2 :
ammo_cur.text = _global.ammo2;
break;
case 3 :
ammo_cur.text = _global.ammo3;
break;
case 4 :
ammo_cur.text = _global.ammo4;
}
health_t.text = p_health;
switch (Key.isDown(87) - Key.isDown(83)) {
case 1 :
ypluz = -10;
break;
case -1 :
ypluz = 10;
break;
default :
ypluz = 0;
}
switch (Key.isDown(68) - Key.isDown(65)) {
case 1 :
xpluz = 10;
break;
case -1 :
xpluz = -10;
break;
default :
xpluz = 0;
}
delta_x = _xmouse - player._x;
delta_y = _ymouse - player._y;
mAngle = Math.atan2(delta_y, delta_x);
mAngleD = (mAngle / Math.PI) * 180;
dAngleD = player._rotation - mAngleD;
if (dAngleD > 180) {
dAngleD = -360 + dAngleD;
} else if (dAngleD < -180) {
dAngleD = 360 + dAngleD;
}
if (Math.abs(dAngleD) < rotToMouseSpeed) {
player._rotation = player._rotation - dAngleD;
} else if (dAngleD > 0) {
player._rotation = player._rotation - rotToMouseSpeed;
} else {
player._rotation = player._rotation + rotToMouseSpeed;
}
_root.hitter._x = _root.player._x + xpluz;
_root.hitter._y = _root.player._y;
_root.hittery._x = _root.player._x;
_root.hittery._y = _root.player._y + ypluz;
_root.hitter._rotation = _root.player._rotation;
var _local4 = hitter._x - player._x;
var _local3 = hittery._y - player._y;
var _local6 = Math.atan2(_local3, _local4);
var _local7 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if (_local7 > p_speed) {
tgtX = player._x + (p_speed * Math.cos(_local6));
tgtY = player._y + (p_speed * Math.sin(_local6));
if (walls.hitTest(hitter._x, hitter._y, true)) {
player._x = tgtX;
player.legs.play();
}
if (walls.hitTest(hittery._x, hittery._y, true)) {
player._y = tgtY;
player.legs.play();
}
}
if ((change._currentFrame == 1) && (gren._currentFrame == 1)) {
if (w1_ok) {
if (Key.isDown(49) && (_global.current_w != 1)) {
_global.selected_w = 1;
bulletSpeed = bS1;
change.gotoAndPlay(1);
}
}
if (w2_ok) {
if (Key.isDown(50) && (_global.current_w != 2)) {
_global.selected_w = 2;
bulletSpeed = bS2;
change.gotoAndPlay(1);
}
}
if (w3_ok) {
if (Key.isDown(51) && (_global.current_w != 3)) {
_global.selected_w = 3;
bulletSpeed = bS3;
change.gotoAndPlay(1);
}
}
if (w4_ok) {
if (Key.isDown(52) && (_global.current_w != 4)) {
_global.selected_w = 4;
bulletSpeed = bS4;
change.gotoAndPlay(1);
}
}
}
if (suckmygun == 1) {
if (!exit.hitTest(_xmouse, _ymouse, true)) {
switch (_global.current_w) {
case 1 :
if (_global.ammo1 > 0) {
if ((player.hands1._currentframe == 8) || (player.hands1._currentframe == 10)) {
player.hands1.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
break;
case 2 :
if (_global.ammo2 > 0) {
if ((player.hands2._currentframe == 7) || (player.hands2._currentframe == 13)) {
player.hands2.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
break;
case 3 :
if (_global.ammo3 > 0) {
if ((player.hands3._currentframe == 7) || (player.hands3._currentframe == 9)) {
player.hands3.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
break;
case 4 :
if (_global.ammo4 > 0) {
if ((player.hands4._currentframe == 7) || (player.hands4._currentframe == 9)) {
player.hands4.gotoAndPlay("fire");
}
} else {
emptysound.start();
}
}
}
}
if (Key.isDown(71)) {
if (_global.ammog > 0) {
if (_root.gren._currentFrame == 1) {
_root.gren.gotoAndPlay(1);
}
}
}
};
var lev = 0;
placeBullet = function (tgt) {
lev++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bullet.duplicateMovieClip("b" + lev, lev);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = ((player._rotation + tgt._rotation) - 90) + random(3);
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (this.hitTest(zomb1.hitter)) {
z1_health = z1_health - 8;
this.removeMovieClip();
placeBlood(zomb1._x, zomb1._y, zomb1._rotation - 180);
}
if (this.hitTest(zomb2.hitter)) {
z2_health = z2_health - 8;
this.removeMovieClip();
placeBlood(zomb2._x, zomb2._y, zomb2._rotation - 180);
}
if (this.hitTest(zomb3.hitter)) {
z3_health = z3_health - 8;
this.removeMovieClip();
placeBlood(zomb3._x, zomb3._y, zomb3._rotation - 180);
}
if (this.hitTest(zomb4.hitter)) {
z4_health = z4_health - 8;
this.removeMovieClip();
placeBlood(zomb4._x, zomb4._y, zomb4._rotation - 180);
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
}
};
};
var levbfg = 0;
placebfgBullet = function (tgt) {
levbfg++;
var _local3 = {x:tgt._x, y:tgt._y, rotation:tgt._rotation};
tgt._parent.localToGlobal(_local3);
globalToLocal(_local3);
if (_root.bwalls.hitTest(_local3.x, _local3.y, true)) {
h1._visible = 0;
h2._visible = 0;
h3._visible = 0;
h4._visible = 0;
h5._visible = 0;
placeBoom(_local3._x, _local3._y);
} else {
var _local4 = bfgbullet.duplicateMovieClip("b" + levbfg, levbfg);
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._rotation = (player._rotation + tgt._rotation) - 90;
_local4.a = (_local4._rotation / 180) * Math.PI;
}
_local4.onEnterFrame = function () {
h1._x = 700 - this._x;
h1._y = 525 - this._y;
h3._x = 350;
h3._y = 262.5;
h2._x = ((h1._x - h3._x) / 2) + 350;
h2._y = ((h1._y - h3._y) / 2) + 262.5;
h4._x = this._x + ((h3._x - this._x) / 2);
h4._y = this._y + ((h3._y - this._y) / 2);
h5._x = this._x;
h5._y = this._y;
h1._visible = 1;
h2._visible = 1;
h3._visible = 1;
h4._visible = 1;
h5._visible = 1;
this._x = this._x + (bulletSpeed * Math.cos(this.a));
this._y = this._y + (bulletSpeed * Math.sin(this.a));
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
h1._visible = 0;
h2._visible = 0;
h3._visible = 0;
h4._visible = 0;
h5._visible = 0;
}
if (this.hitTest(zomb1.hitter)) {
z1_health = z1_health - 500;
placeBlood(zomb1._x, zomb1._y, zomb1._rotation - 180);
h1._visible = 0;
h2._visible = 0;
h3._visible = 0;
h4._visible = 0;
h5._visible = 0;
}
if (this.hitTest(zomb2.hitter)) {
z2_health = z2_health - 500;
placeBlood(zomb2._x, zomb2._y, zomb2._rotation - 180);
h1._visible = 0;
h2._visible = 0;
h3._visible = 0;
h4._visible = 0;
h5._visible = 0;
}
if (this.hitTest(zomb3.hitter)) {
z3_health = z3_health - 500;
placeBlood(zomb3._x, zomb3._y, zomb3._rotation - 180);
h1._visible = 0;
h2._visible = 0;
h3._visible = 0;
h4._visible = 0;
h5._visible = 0;
}
if (this.hitTest(zomb4.hitter)) {
z4_health = z4_health - 500;
placeBlood(zomb4._x, zomb4._y, zomb4._rotation - 180);
h1._visible = 0;
h2._visible = 0;
h3._visible = 0;
h4._visible = 0;
h5._visible = 0;
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
h1._visible = 0;
h2._visible = 0;
h3._visible = 0;
h4._visible = 0;
h5._visible = 0;
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
h1._visible = 0;
h2._visible = 0;
h3._visible = 0;
h4._visible = 0;
h5._visible = 0;
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
h1._visible = 0;
h2._visible = 0;
h3._visible = 0;
h4._visible = 0;
h5._visible = 0;
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBoom(this._x, this._y);
this.removeMovieClip();
h1._visible = 0;
h2._visible = 0;
h3._visible = 0;
h4._visible = 0;
h5._visible = 0;
}
};
};
var led = 0;
placeGren = function (tr) {
led++;
var _local3 = {x:tr._x, y:tr._y, rotation:tr._rotation};
tr._parent.localToGlobal(_local3);
globalToLocal(_local3);
var d = grena.duplicateMovieClip("b" + led, led);
d._x = _local3.x;
d._y = _local3.y;
d._rotation = player._rotation;
d.a = (d._rotation / 180) * Math.PI;
d.clickSpot_x = _root._xmouse;
d.clickSpot_y = _root._ymouse;
d.onEnterFrame = function () {
gotoSpotX = d.clickSpot_x;
gotoSpotY = d.clickSpot_y;
delta_x = this._x - gotoSpotX;
delta_y = this._y - gotoSpotY;
if (Math.sqrt((delta_x * delta_x) + (delta_y * delta_y)) > grenSpeed) {
this._x = this._x + (grenSpeed * Math.cos(this.a));
this._y = this._y + (grenSpeed * Math.sin(this.a));
this._rotation = this._rotation - 10;
} else {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if ((((this._x < -10) || (this._x > 710)) || (this._y < -10)) || (this._y > 535)) {
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMax, this._y, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this.getBounds(_root).xMin, this._y, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMax, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
if (_root.bwalls.hitTest(this._x, this.getBounds(_root).yMin, true)) {
placeBadaboom(this._x, this._y);
this.removeMovieClip();
}
};
};
boom._visible = false;
var levv = 0;
badaboom._visible = false;
var levvv = 0;
blood._visible = false;
var leb = 0;
dea.death._visible = false;
var det = 0;
var dur1 = 1;
z1_speed = 1;
var z1_health = 60;
z1_move = 1;
zomb1.onEnterFrame = function () {
if (z1_health > 0) {
if (dur1) {
var _local9 = player._x - this._x;
var _local8 = player._y - this._y;
}
if (this.hitter.hitTest(hitter)) {
this.hands.play();
p_health = p_health - 1;
}
var _local7 = Math.atan2(_local8, _local9);
var _local12 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local12 > z1_speed) {
tgtX = this._x + (z1_speed * Math.cos(_local7));
tgtY = this._y + (z1_speed * Math.sin(_local7));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local13 = dAngleRadian(direction, _local7);
workAngle = _local7 + (_local13 * 0.8);
var _local6 = 0;
while (_local6 < 360) {
var _local2 = -1;
while (_local2 <= 1) {
var _local3 = workAngle + (radian(_local6) * _local2);
var _local5 = this._x + (z1_speed * Math.cos(_local3));
var _local4 = this._y + (z1_speed * Math.sin(_local3));
if (walls.hitTest(_local5, _local4, true)) {
tgtX = _local5;
tgtY = _local4;
break;
}
_local2 = _local2 + 2;
}
_local6 = _local6 + 10;
}
}
var _local11 = tgtX - this._x;
var _local10 = tgtY - this._y;
direction = Math.atan2(_local10, _local11);
var _local13 = dAngleDegree((direction * 180) / Math.PI, this._rotation);
this._rotation = this._rotation + (_local13 * 0.2);
if (z1_move) {
this._x = tgtX;
this._y = tgtY;
this.legs.play();
}
}
} else {
placeDeath(this._x, this._y);
z1_health = 60;
this._x = spawn11._x;
this._y = spawn11._y;
}
};
z2_speed = 1.5;
var z2_health = 60;
z2_move = 1;
zomb2.onEnterFrame = function () {
if (z2_health > 0) {
if (dur1) {
var _local9 = player._x - this._x;
var _local8 = player._y - this._y;
}
if (this.hitter.hitTest(hitter)) {
this.hands.play();
p_health = p_health - 1;
}
var _local7 = Math.atan2(_local8, _local9);
var _local12 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local12 > z2_speed) {
tgtX = this._x + (z2_speed * Math.cos(_local7));
tgtY = this._y + (z2_speed * Math.sin(_local7));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local13 = dAngleRadian(direction, _local7);
workAngle = _local7 + (_local13 * 0.8);
var _local6 = 0;
while (_local6 < 360) {
var _local2 = -1;
while (_local2 <= 1) {
var _local3 = workAngle + (radian(_local6) * _local2);
var _local5 = this._x + (z2_speed * Math.cos(_local3));
var _local4 = this._y + (z2_speed * Math.sin(_local3));
if (walls.hitTest(_local5, _local4, true)) {
tgtX = _local5;
tgtY = _local4;
break;
}
_local2 = _local2 + 2;
}
_local6 = _local6 + 10;
}
}
var _local11 = tgtX - this._x;
var _local10 = tgtY - this._y;
direction = Math.atan2(_local10, _local11);
var _local13 = dAngleDegree((direction * 180) / Math.PI, this._rotation);
this._rotation = this._rotation + (_local13 * 0.2);
if (z2_move) {
this._x = tgtX;
this._y = tgtY;
this.legs.play();
}
}
} else {
placeDeath(this._x, this._y);
z2_health = 60;
this._x = spawn3._x;
this._y = spawn3._y;
}
};
z3_speed = 1.1;
var z3_health = 60;
z3_move = 1;
zomb3.onEnterFrame = function () {
if (z3_health > 0) {
if (dur1) {
var _local9 = player._x - this._x;
var _local8 = player._y - this._y;
}
if (this.hitter.hitTest(hitter)) {
this.hands.play();
p_health = p_health - 1;
}
var _local7 = Math.atan2(_local8, _local9);
var _local12 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local12 > z3_speed) {
tgtX = this._x + (z3_speed * Math.cos(_local7));
tgtY = this._y + (z3_speed * Math.sin(_local7));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local13 = dAngleRadian(direction, _local7);
workAngle = _local7 + (_local13 * 0.8);
var _local6 = 0;
while (_local6 < 360) {
var _local2 = -1;
while (_local2 <= 1) {
var _local3 = workAngle + (radian(_local6) * _local2);
var _local5 = this._x + (z1_speed * Math.cos(_local3));
var _local4 = this._y + (z1_speed * Math.sin(_local3));
if (walls.hitTest(_local5, _local4, true)) {
tgtX = _local5;
tgtY = _local4;
break;
}
_local2 = _local2 + 2;
}
_local6 = _local6 + 10;
}
}
var _local11 = tgtX - this._x;
var _local10 = tgtY - this._y;
direction = Math.atan2(_local10, _local11);
var _local13 = dAngleDegree((direction * 180) / Math.PI, this._rotation);
this._rotation = this._rotation + (_local13 * 0.2);
if (z3_move) {
this._x = tgtX;
this._y = tgtY;
this.legs.play();
}
}
} else {
placeDeath(this._x, this._y);
z3_health = 60;
this._x = spawn3._x;
this._y = spawn3._y;
}
};
var dur2 = 1;
z4_speed = 1.1;
var z4_health = 60;
z4_move = 1;
zomb4.onEnterFrame = function () {
if (z4_health > 0) {
if (dur2) {
var _local9 = player._x - this._x;
var _local8 = player._y - this._y;
}
if (this.hitter.hitTest(hitter)) {
this.hands.play();
p_health = p_health - 1;
}
var _local7 = Math.atan2(_local8, _local9);
var _local12 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local12 > z4_speed) {
tgtX = this._x + (z4_speed * Math.cos(_local7));
tgtY = this._y + (z4_speed * Math.sin(_local7));
if (!walls.hitTest(tgtX, tgtY, true)) {
var _local13 = dAngleRadian(direction, _local7);
workAngle = _local7 + (_local13 * 0.8);
var _local6 = 0;
while (_local6 < 360) {
var _local2 = -1;
while (_local2 <= 1) {
var _local3 = workAngle + (radian(_local6) * _local2);
var _local5 = this._x + (z1_speed * Math.cos(_local3));
var _local4 = this._y + (z1_speed * Math.sin(_local3));
if (walls.hitTest(_local5, _local4, true)) {
tgtX = _local5;
tgtY = _local4;
break;
}
_local2 = _local2 + 2;
}
_local6 = _local6 + 10;
}
}
var _local11 = tgtX - this._x;
var _local10 = tgtY - this._y;
direction = Math.atan2(_local10, _local11);
var _local13 = dAngleDegree((direction * 180) / Math.PI, this._rotation);
this._rotation = this._rotation + (_local13 * 0.2);
if (z4_move) {
this._x = tgtX;
this._y = tgtY;
this.legs.play();
}
}
} else {
placeDeath(this._x, this._y);
z4_health = 60;
this._x = spawn4._x;
this._y = spawn4._y;
}
};
Instance of Symbol 496 MovieClip in Frame 260
onClipEvent (enterFrame) {
this._x = player._x;
this._y = player._y;
}
Instance of Symbol 197 MovieClip in Frame 260
on (keyPress "<?#19>") {
_root.gotoAndPlay("inchange");
defeat.Key.removeListener(keyListener);
Key.removeListener(keyListener);
Key.removeListener(defeat.keyListener);
victory.Key.removeListener(keyListener2);
Key.removeListener(victory.keyListener2);
Key.removeListener(keyListener2);
}
Instance of Symbol 530 MovieClip in Frame 260
onClipEvent (load) {
startDrag (this, true);
Mouse.hide();
}
onClipEvent (enterFrame) {
Mouse.hide();
}
Frame 261
gotoAndStop ("inchange");
Symbol 38 Button
on (release) {
_root.play();
}
Symbol 86 MovieClip Frame 14
stop();
Symbol 87 MovieClip Frame 186
_root.play();
Symbol 87 MovieClip Frame 187
stop();
Symbol 96 Button
on (release) {
_root.gotoAndStop("level0");
}
Symbol 97 Button
on (release) {
play();
}
Symbol 98 Button
on (release) {
gotoAndPlay ("credits");
}
Symbol 99 Button
on (release) {
getURL ("http://www.maxgames.com", "_blank");
}
Symbol 102 MovieClip Frame 35
this.removeMovieClip();
Symbol 103 MovieClip Frame 1
fire._visible = false;
lev = 0;
this.onEnterFrame = function () {
var _local1 = 0;
while (_local1 < 4) {
lev++;
d = fire.duplicateMovieClip("f" + lev, lev);
d._x = d._x + ((Math.random() * 80) - 3);
d._y = d._y + ((Math.random() * 6) - 3);
d._alpha = (Math.random() * 50) + 50;
d._xscale = (d._yscale = (Math.random() * 50) + 70);
_local1++;
}
};
Symbol 108 Button
on (release) {
getURL ("http://www.maxgames.com/", "_blank");
}
Symbol 112 MovieClip Frame 1
if (my_so.data.vol != undefined) {
this._x = my_so.data.vol;
trace("777");
}
Instance of Symbol 111 MovieClip "ruch" in Symbol 112 MovieClip Frame 1
on (press) {
startDrag (this, true, 0, 0, 100, 0);
}
on (release) {
stopDrag();
startDrag (_root.cursor, true);
_root.my_so.data.vol = this._x;
_root.my_so.flush();
}
on (releaseOutside) {
stopDrag();
startDrag (_root.cursor, true);
_root.my_so.data.vol = this._x;
_root.my_so.flush();
}
onClipEvent (enterFrame) {
_root.globalsound.setVolume(this._x);
}
onClipEvent (load) {
if (_root.my_so.data.vol != undefined) {
this._x = _root.my_so.data.vol;
}
}
Symbol 134 MovieClip Frame 1
stop();
Symbol 134 MovieClip Frame 2
stop();
Symbol 134 MovieClip Frame 3
stop();
stop();
Symbol 134 MovieClip Frame 4
stop();
Symbol 134 MovieClip Frame 5
stop();
stop();
Symbol 134 MovieClip Frame 6
stop();
Symbol 134 MovieClip Frame 7
stop();
Symbol 134 MovieClip Frame 8
stop();
Symbol 134 MovieClip Frame 9
stop();
Symbol 134 MovieClip Frame 10
stop();
Symbol 134 MovieClip Frame 11
stop();
Symbol 134 MovieClip Frame 12
stop();
Symbol 134 MovieClip Frame 13
stop();
Symbol 134 MovieClip Frame 14
stop();
Symbol 147 MovieClip Frame 1
but0.onRollOver = function () {
texta.gotoAndStop(2);
};
but0.onRollOut = function () {
texta.gotoAndStop(1);
};
but0.onRelease = function () {
_root.gotoAndStop("level0");
};
but1.onRollOver = function () {
texta.gotoAndStop(3);
};
but1.onRollOut = function () {
texta.gotoAndStop(1);
};
but1.onRelease = function () {
_root.gotoAndStop("level1");
};
but2.onRollOver = function () {
texta.gotoAndStop(4);
};
but2.onRollOut = function () {
texta.gotoAndStop(1);
};
but2.onRelease = function () {
_root.gotoAndStop("level2");
};
but3.onRollOver = function () {
texta.gotoAndStop(5);
};
but3.onRollOut = function () {
texta.gotoAndStop(1);
};
but3.onRelease = function () {
_root.gotoAndStop("level3");
};
but4.onRollOver = function () {
texta.gotoAndStop(6);
};
but4.onRollOut = function () {
texta.gotoAndStop(5);
};
but4.onRelease = function () {
_root.gotoAndStop("level4");
};
but5.onRollOver = function () {
texta.gotoAndStop(7);
};
but5.onRollOut = function () {
texta.gotoAndStop(1);
};
but5.onRelease = function () {
_root.gotoAndStop("level5");
};
but6.onRollOver = function () {
texta.gotoAndStop(8);
};
but6.onRollOut = function () {
texta.gotoAndStop(1);
};
but6.onRelease = function () {
_root.gotoAndStop("level6");
};
but7.onRollOver = function () {
texta.gotoAndStop(9);
};
but7.onRollOut = function () {
texta.gotoAndStop(1);
};
but7.onRelease = function () {
_root.gotoAndStop("level7");
};
but8.onRollOver = function () {
texta.gotoAndStop(10);
};
but8.onRollOut = function () {
texta.gotoAndStop(1);
};
but8.onRelease = function () {
_root.gotoAndStop("level8");
};
but9.onRollOver = function () {
texta.gotoAndStop(11);
};
but9.onRollOut = function () {
texta.gotoAndStop(1);
};
but9.onRelease = function () {
_root.gotoAndStop("level9");
};
but10.onRollOver = function () {
texta.gotoAndStop(12);
};
but10.onRollOut = function () {
texta.gotoAndStop(1);
};
but10.onRelease = function () {
_root.gotoAndStop("level10");
};
but11.onRollOver = function () {
texta.gotoAndStop(13);
};
but11.onRollOut = function () {
texta.gotoAndStop(1);
};
but11.onRelease = function () {
_root.gotoAndStop("level11");
};
but12.onRollOver = function () {
texta.gotoAndStop(14);
};
but12.onRollOut = function () {
texta.gotoAndStop(1);
};
but12.onRelease = function () {
_root.gotoAndStop("level12");
};
stop();
Symbol 147 MovieClip Frame 2
stop();
Symbol 147 MovieClip Frame 3
stop();
Symbol 147 MovieClip Frame 4
stop();
Symbol 147 MovieClip Frame 5
stop();
Symbol 147 MovieClip Frame 6
stop();
Symbol 147 MovieClip Frame 7
stop();
Symbol 147 MovieClip Frame 8
stop();
Symbol 147 MovieClip Frame 9
stop();
Symbol 147 MovieClip Frame 10
stop();
Symbol 147 MovieClip Frame 11
stop();
Symbol 147 MovieClip Frame 12
stop();
Symbol 147 MovieClip Frame 13
stop();
Symbol 152 Button
on (release) {
_parent.play();
}
Symbol 153 MovieClip Frame 1
var my_so = SharedObject.getLocal("numlevs");
buttons.gotoAndStop(my_so.data.num + 1);
Symbol 157 Button
on (release) {
getURL ("http://www.nearga.org", "_blank");
}
Symbol 158 MovieClip Frame 1
var my_sound3 = new Sound();
my_soundf.attachSound("fire");
my_soundf.start();
my_soundf.onSoundComplete = function () {
my_soundf.start();
};
stop();
Symbol 158 MovieClip Frame 10
my_soundf.stop();
stop();
Symbol 158 MovieClip Frame 20
gotoAndStop ("main");
Symbol 158 MovieClip Frame 30
my_soundf.stop();
stop();
Symbol 158 MovieClip Frame 40
gotoAndStop ("main");
Symbol 195 MovieClip Frame 80
_parent.removeMovieClip();
stop();
Symbol 196 MovieClip Frame 1
partGo._visible = false;
i = 6;
while (i--) {
d = partGo.duplicateMovieClip("p" + i, i);
d._rotation = Math.random() * 360;
d._xscale = (d._yscale = (Math.random() * 100) + 50);
}
Symbol 197 MovieClip Frame 1
stop();
Symbol 207 MovieClip Frame 1
stop();
Symbol 216 MovieClip Frame 1
stop();
Symbol 216 MovieClip Frame 2
_parent._parent.placeEBullet(dot);
Symbol 216 MovieClip Frame 6
gotoAndPlay ("fire");
Symbol 225 MovieClip Frame 1
var randomNum = (Math.round(Math.random() * 2) + 1);
gotoAndStop(randomNum);
stop();
Symbol 225 MovieClip Frame 2
stop();
Symbol 225 MovieClip Frame 3
stop();
Symbol 232 MovieClip Frame 1
stop();
Symbol 232 MovieClip Frame 2
_parent._parent.placeE2Bullet(dot);
Symbol 232 MovieClip Frame 10
gotoAndPlay ("fire");
Symbol 241 MovieClip Frame 1
var randomNum = (Math.round(Math.random() * 2) + 1);
gotoAndStop(randomNum);
stop();
Symbol 241 MovieClip Frame 2
stop();
Symbol 241 MovieClip Frame 3
stop();
Symbol 255 MovieClip Frame 1
Symbol 255 MovieClip Frame 8
stop();
Symbol 255 MovieClip Frame 11
_parent._parent.placeBullet(dot);
_global.ammo1 = _global.ammo1 - 1;
Symbol 255 MovieClip Frame 17
gotoAndStop ("stand");
Symbol 255 MovieClip Frame 23
stop();
Symbol 263 MovieClip Frame 1
Symbol 263 MovieClip Frame 7
stop();
Symbol 263 MovieClip Frame 13
stop();
Symbol 263 MovieClip Frame 14
_parent._parent.placeBullet(dot);
_parent._parent.placeBullet(dot2);
_parent._parent.placeBullet(dot3);
_parent._parent.placeBullet(dot4);
_parent._parent.placeBullet(dot5);
_global.ammo2 = _global.ammo2 - 1;
Symbol 263 MovieClip Frame 17
Symbol 263 MovieClip Frame 25
gotoAndStop ("stand");
Symbol 263 MovieClip Frame 33
stop();
Symbol 270 MovieClip Frame 7
stop();
Symbol 270 MovieClip Frame 10
_parent._parent.placeBullet(dot);
_global.ammo3 = _global.ammo3 - 1;
Symbol 270 MovieClip Frame 11
gotoAndStop ("stand");
Symbol 270 MovieClip Frame 17
stop();
Symbol 278 MovieClip Frame 9
stop();
Symbol 278 MovieClip Frame 12
_parent._parent.placebfgBullet(dot);
_global.ammo4 = _global.ammo4 - 1;
play();
Symbol 278 MovieClip Frame 29
gotoAndStop ("stand");
Symbol 278 MovieClip Frame 39
stop();
Symbol 285 MovieClip Frame 1
stop();
Symbol 285 MovieClip Frame 2
_parent._parent.placeGren(tchk);
_global.ammog = _global.ammog - 1;
Symbol 303 MovieClip Frame 1
stop();
Symbol 303 MovieClip Frame 15
stop();
Symbol 330 MovieClip Frame 1
stop();
Symbol 330 MovieClip Frame 23
stop();
Symbol 334 MovieClip Frame 1
stop();
Symbol 334 MovieClip Frame 40
stop();
Symbol 335 MovieClip Frame 1
stop();
Symbol 335 MovieClip Frame 2
stop();
Symbol 340 MovieClip Frame 1
stop();
Symbol 340 MovieClip Frame 2
stop();
Symbol 348 MovieClip Frame 5
_parent.removeMovieClip();
stop();
Symbol 349 MovieClip Frame 1
partGo._visible = false;
i = 1;
while (i--) {
d = partGo.duplicateMovieClip("p" + i, i);
d._rotation = Math.random() * 360;
d._xscale = (d._yscale = (Math.random() * 70) + 50);
}
Symbol 364 MovieClip Frame 15
_parent.removeMovieClip();
stop();
Symbol 365 MovieClip Frame 1
partGo._visible = false;
i = 1;
while (i--) {
d = partGo.duplicateMovieClip("p" + i, i);
d._rotation = Math.random() * 360;
d._xscale = (d._yscale = (Math.random() * 70) + 50);
}
Symbol 368 MovieClip Frame 14
_parent.removeMovieClip();
stop();
Symbol 369 MovieClip Frame 1
partGo._visible = false;
i = 6;
while (i--) {
d = partGo.duplicateMovieClip("p" + i, i);
d._rotation = Math.random() * 180;
d._xscale = (d._yscale = (Math.random() * 70) + 50);
}
Symbol 385 MovieClip Frame 1
stop();
Symbol 385 MovieClip Frame 59
stop();
Symbol 385 MovieClip Frame 145
stop();
Symbol 385 MovieClip Frame 185
stop();
Symbol 385 MovieClip Frame 228
stop();
Symbol 389 MovieClip Frame 1
stop();
Symbol 389 MovieClip Frame 20
stop();
Symbol 393 MovieClip Frame 1
stop();
Symbol 393 MovieClip Frame 20
stop();
Symbol 428 MovieClip Frame 1
stop();
Symbol 431 MovieClip Frame 1
stop();
Symbol 449 MovieClip Frame 1
stop();
Symbol 449 MovieClip Frame 2
stop();
Symbol 449 MovieClip Frame 3
stop();
Symbol 449 MovieClip Frame 4
stop();
Symbol 449 MovieClip Frame 5
stop();
Symbol 458 MovieClip Frame 1
stop();
Symbol 458 MovieClip Frame 2
stop();
Symbol 465 Button
on (release) {
getURL ("http://www.maxgames.com/", "_blank");
}
Symbol 468 MovieClip Frame 1
stop();
Symbol 468 MovieClip Frame 60
stop();
keyListener2 = new Object();
keyListener2.onKeyDown = function () {
play();
};
Key.addListener(keyListener2);
Symbol 468 MovieClip Frame 61
Key.removeListener(keyListener2);
Symbol 468 MovieClip Frame 104
Key.removeListener(keyListener2);
_root.play();
Symbol 473 MovieClip Frame 1
stop();
Symbol 473 MovieClip Frame 60
stop();
keyListener = new Object();
keyListener.onKeyDown = function () {
play();
};
Key.addListener(keyListener);
_global.temb = _root._currentframe;
Symbol 473 MovieClip Frame 61
Key.removeListener(keyListener);
Symbol 473 MovieClip Frame 104
Key.removeListener(keyListener);
_root.gotoAndPlay("again");
Symbol 490 MovieClip Frame 1
keyListener3 = new Object();
keyListener3.onKeyDown = function () {
_root.keymap.play();
};
Key.addListener(keyListener3);
stop();
Symbol 490 MovieClip Frame 18
Key.removeListener(keyListener3);
Symbol 490 MovieClip Frame 19
stop();
Symbol 491 MovieClip Frame 4
stop();
Instance of Symbol 197 MovieClip in Symbol 491 MovieClip Frame 4
onClipEvent (enterFrame) {
if (this.hitTest(_root.hitter)) {
_root.train.play();
}
}
Symbol 491 MovieClip Frame 10
Symbol 491 MovieClip Frame 13
stop();
Instance of Symbol 197 MovieClip in Symbol 491 MovieClip Frame 13
onClipEvent (enterFrame) {
if (this.hitTest(_root.hitter)) {
_root.train.play();
}
}
Symbol 491 MovieClip Frame 21
stop();
Instance of Symbol 197 MovieClip in Symbol 491 MovieClip Frame 21
onClipEvent (enterFrame) {
if (this.hitTest(_root.hitter)) {
_root.train.play();
}
}
Symbol 491 MovieClip Frame 31
stop();
Instance of Symbol 197 MovieClip in Symbol 491 MovieClip Frame 31
onClipEvent (enterFrame) {
if (this.hitTest(_root.hitter)) {
_root.train.play();
}
}
Instance of Symbol 197 MovieClip in Symbol 491 MovieClip Frame 31
onClipEvent (enterFrame) {
if (this.hitTest(_root.hitter)) {
_root.train.play();
}
}
Symbol 491 MovieClip Frame 37
stop();
Instance of Symbol 197 MovieClip in Symbol 491 MovieClip Frame 37
onClipEvent (enterFrame) {
if (this.hitTest(_root.hitter)) {
_root.train.play();
}
}
Symbol 491 MovieClip Frame 41
stop();
Instance of Symbol 197 MovieClip in Symbol 491 MovieClip Frame 41
onClipEvent (enterFrame) {
if (this.hitTest(_root.hitter)) {
_root.train.play();
}
}
Symbol 491 MovieClip Frame 47
stop();
Instance of Symbol 197 MovieClip in Symbol 491 MovieClip Frame 47
onClipEvent (enterFrame) {
if (this.hitTest(_root.hitter)) {
_root.train.play();
}
}
Symbol 491 MovieClip Frame 51
stop();
Instance of Symbol 197 MovieClip in Symbol 491 MovieClip Frame 51
onClipEvent (enterFrame) {
if (this.hitTest(_root.hitter)) {
_root.train.play();
}
}
Symbol 491 MovieClip Frame 56
stop();
Symbol 491 MovieClip Frame 66
stop();
keyListener3 = new Object();
keyListener3.onKeyDown = function () {
play();
};
Key.addListener(keyListener3);
Symbol 491 MovieClip Frame 67
Key.removeListener(keyListener3);
Symbol 491 MovieClip Frame 76
stop();
Symbol 496 MovieClip Frame 31
stop();
Symbol 505 MovieClip Frame 1
stop();
Symbol 505 MovieClip Frame 2
switch (_global.current_w) {
case 1 :
_root.player.hands1.gotoAndPlay("out");
_global.current_w = 0;
break;
case 2 :
_root.player.hands2.gotoAndPlay("out");
_global.current_w = 0;
break;
case 3 :
_root.player.hands3.gotoAndPlay("out");
_global.current_w = 0;
break;
case 4 :
_root.player.hands4.gotoAndPlay("out");
_global.current_w = 0;
}
_root.gui_weap.sel_light.gotoAndStop(_global.current_w + 1);
Symbol 505 MovieClip Frame 20
switch (_global.selected_w) {
case 1 :
_root.player.hands1.gotoAndPlay("in");
_root.player.hands1._visible = 1;
_root.player.hands2._visible = 0;
_root.player.hands3._visible = 0;
_root.player.hands4._visible = 0;
break;
case 2 :
_root.player.hands2.gotoAndPlay("in");
_root.player.hands1._visible = 0;
_root.player.hands2._visible = 1;
_root.player.hands3._visible = 0;
_root.player.hands4._visible = 0;
break;
case 3 :
_root.player.hands3.gotoAndPlay("in");
_root.player.hands1._visible = 0;
_root.player.hands2._visible = 0;
_root.player.hands3._visible = 3;
_root.player.hands4._visible = 0;
break;
case 4 :
_root.player.hands4.gotoAndPlay("in");
_root.player.hands1._visible = 0;
_root.player.hands2._visible = 0;
_root.player.hands3._visible = 0;
_root.player.hands4._visible = 1;
}
Symbol 505 MovieClip Frame 30
switch (_global.selected_w) {
case 1 :
_global.current_w = 1;
break;
case 2 :
_global.current_w = 2;
break;
case 3 :
_global.current_w = 3;
break;
case 4 :
_global.current_w = 4;
}
_root.gui_weap.sel_light.gotoAndStop(_global.current_w + 1);
Symbol 507 MovieClip Frame 1
stop();
Symbol 507 MovieClip Frame 2
_global.selected_w = _global.current_w;
switch (_global.current_w) {
case 1 :
_root.player.hands1.gotoAndPlay("out");
_global.current_w = 0;
break;
case 2 :
_root.player.hands2.gotoAndPlay("out");
_global.current_w = 0;
break;
case 3 :
_root.player.hands3.gotoAndPlay("out");
_global.current_w = 0;
break;
case 4 :
_root.player.hands4.gotoAndPlay("out");
_global.current_w = 0;
}
Symbol 507 MovieClip Frame 7
_root.player.hands1._visible = 0;
_root.player.hands2._visible = 0;
_root.player.hands3._visible = 0;
_root.player.hands4._visible = 0;
_root.player.handsg._visible = 1;
_root.player.handsg.play();
Symbol 507 MovieClip Frame 12
_root.player.handsg._visible = 0;
_root.change.gotoAndPlay(18);
Symbol 509 MovieClip Frame 1
stop();
Symbol 509 MovieClip Frame 2
_global.v1_move = 0;
_root.vrag1.hands.gotoAndPlay("fire");
Symbol 509 MovieClip Frame 31
_global.v1_move = 1;
_root.vrag1.hands.gotoAndStop("stand");
Symbol 509 MovieClip Frame 36
gotoAndPlay (2);
Symbol 510 MovieClip Frame 1
stop();
Symbol 510 MovieClip Frame 2
_root.vrag3.hands.gotoAndPlay("fire");
Symbol 510 MovieClip Frame 66
_global.v3_move = 1;
_root.vrag3.hands.gotoAndStop("stand");
Symbol 510 MovieClip Frame 71
gotoAndPlay (2);
Symbol 512 MovieClip Frame 1
stop();
Symbol 513 MovieClip Frame 1
stop();
Symbol 513 MovieClip Frame 2
_global.v2_move = 0;
_root.vrag2.hands.gotoAndPlay("fire");
Symbol 513 MovieClip Frame 31
_global.v2_move = 1;
_root.vrag2.hands.gotoAndStop("stand");
Symbol 513 MovieClip Frame 36
gotoAndPlay (2);
Symbol 518 Button
on (release) {
_root.exit.gotoAndStop(2);
}
Symbol 521 Button
on (release) {
_root.exit.gotoAndStop(1);
}
Symbol 522 Button
on (release) {
_root.gotoAndPlay("inchange");
_root.defeat.Key.removeListener(keyListener);
Key.removeListener(keyListener);
Key.removeListener(_root.defeat.keyListener);
_root.victory.Key.removeListener(keyListener2);
Key.removeListener(_root.victory.keyListener2);
Key.removeListener(keyListener2);
}
Symbol 524 MovieClip Frame 1
stop();
Symbol 524 MovieClip Frame 2
stop();
Symbol 527 Button
on (release) {
getURL ("http://www.maxgames.com/", "_blank");
}
Symbol 533 MovieClip Frame 1
stop();
Symbol 533 MovieClip Frame 2
_parent._parent.placeE3Bullet(dot);
Symbol 533 MovieClip Frame 6
gotoAndPlay ("fire");
Symbol 550 MovieClip Frame 1
stop();
Symbol 550 MovieClip Frame 23
stop();
Symbol 554 MovieClip Frame 1
stop();
Symbol 554 MovieClip Frame 2
stop();
Symbol 577 MovieClip Frame 1
stop();
Symbol 577 MovieClip Frame 59
stop();
Symbol 577 MovieClip Frame 145
stop();
Symbol 577 MovieClip Frame 185
stop();
Symbol 577 MovieClip Frame 228
stop();
Symbol 579 MovieClip Frame 1
stop();
Symbol 579 MovieClip Frame 59
stop();
Symbol 579 MovieClip Frame 145
stop();
Symbol 579 MovieClip Frame 185
stop();
Symbol 579 MovieClip Frame 228
stop();
Symbol 581 MovieClip Frame 1
Symbol 583 MovieClip Frame 1
stop();
Symbol 583 MovieClip Frame 20
stop();
Symbol 591 MovieClip Frame 1
stop();
Symbol 593 MovieClip Frame 1
stop();
Symbol 598 MovieClip Frame 1
stop();
Symbol 598 MovieClip Frame 271
stop();
Symbol 611 MovieClip Frame 1
stop();
Symbol 618 MovieClip Frame 1
var randomNum = (Math.round(Math.random() * 2) + 1);
gotoAndStop(randomNum);
stop();
Symbol 618 MovieClip Frame 2
stop();
Symbol 618 MovieClip Frame 3
stop();
Symbol 632 MovieClip Frame 1
stop();
Symbol 632 MovieClip Frame 98
stop();
Symbol 655 MovieClip Frame 1
stop();
Symbol 657 MovieClip Frame 1
stop();
Symbol 664 MovieClip Frame 1
stop();
Symbol 664 MovieClip Frame 2
_parent._parent.placeE10Bullet(dot);
Symbol 664 MovieClip Frame 6
gotoAndPlay ("fire");
Symbol 700 MovieClip Frame 148
stop();
Symbol 702 MovieClip Frame 1
stop();
Symbol 720 MovieClip Frame 1
stop();
Symbol 720 MovieClip Frame 13
gotoAndPlay ("run");
Symbol 752 MovieClip Frame 148
stop();
Symbol 754 MovieClip Frame 1
stop();
Symbol 754 MovieClip Frame 82
gotoAndStop (81);
Symbol 755 MovieClip Frame 1
stop();
Symbol 755 MovieClip Frame 2
_global.v2_move = 1;
_root.vrag2.gotoAndPlay("run");
Symbol 755 MovieClip Frame 31
_global.v2_move = 0;
_root.vrag2.gotoAndPlay("lookleft");
Symbol 763 MovieClip Frame 1
stop();
Symbol 763 MovieClip Frame 240
stop();
Symbol 776 MovieClip Frame 1
stop();
Symbol 776 MovieClip Frame 240
stop();
Symbol 784 MovieClip Frame 1
stop();
Symbol 786 MovieClip Frame 148
stop();
Symbol 787 MovieClip Frame 1
stop();
Symbol 787 MovieClip Frame 2
_root.vrag4.hands.gotoAndPlay("fire");
Symbol 787 MovieClip Frame 66
_global.v4_move = 1;
_root.vrag4.hands.gotoAndStop("stand");
Symbol 787 MovieClip Frame 71
gotoAndPlay (2);
Symbol 788 MovieClip Frame 1
stop();
Symbol 788 MovieClip Frame 2
_global.v5_move = 0;
_root.vrag5.hands.gotoAndPlay("fire");
Symbol 788 MovieClip Frame 31
_global.v5_move = 1;
_root.vrag5.hands.gotoAndStop("stand");
Symbol 788 MovieClip Frame 36
gotoAndPlay (2);
Symbol 797 MovieClip Frame 1
stop();
Symbol 797 MovieClip Frame 2
stop();
Symbol 820 MovieClip Frame 1
stop();
Symbol 822 MovieClip Frame 1
stop();
Symbol 824 MovieClip Frame 1
stop();
Symbol 828 MovieClip Frame 1
stop();
Symbol 830 MovieClip Frame 1
stop();
Symbol 832 MovieClip Frame 1
stop();
Symbol 845 MovieClip Frame 1
stop();
Symbol 845 MovieClip Frame 2
_parent._parent.placeE4Bullet(dot);
Symbol 845 MovieClip Frame 6
gotoAndPlay ("fire");
Symbol 852 MovieClip Frame 1
stop();
Symbol 852 MovieClip Frame 2
stop();
Symbol 852 MovieClip Frame 3
stop();
Symbol 852 MovieClip Frame 4
stop();
Symbol 852 MovieClip Frame 5
stop();
Symbol 853 MovieClip Frame 72
tree.gotoAndStop(random(4) + 1);
Symbol 854 MovieClip Frame 178
tree.gotoAndStop(random(4) + 1);
Symbol 866 MovieClip Frame 148
stop();
Symbol 868 MovieClip Frame 32
_global.timer = _global.timer + 1;
Symbol 871 MovieClip Frame 1
stop();
Symbol 871 MovieClip Frame 2
_parent._parent.placeE5Bullet(dot);
Symbol 871 MovieClip Frame 6
gotoAndPlay ("fire");
Symbol 876 MovieClip Frame 1
stop();
Symbol 876 MovieClip Frame 2
stop();
Symbol 877 MovieClip Frame 1
stop();
Symbol 877 MovieClip Frame 98
stop();
Symbol 877 MovieClip Frame 257
stop();
Symbol 877 MovieClip Frame 320
stop();
Symbol 877 MovieClip Frame 365
stop();
Symbol 887 MovieClip Frame 1
stop();
Symbol 892 MovieClip Frame 1
stop();
Symbol 892 MovieClip Frame 98
stop();
Symbol 892 MovieClip Frame 257
stop();
Symbol 892 MovieClip Frame 320
stop();
Symbol 892 MovieClip Frame 365
stop();
Symbol 904 MovieClip Frame 148
stop();
Symbol 907 MovieClip Frame 1
stop();
Symbol 907 MovieClip Frame 2
_parent._parent.placeE11Bullet(dot);
Symbol 907 MovieClip Frame 6
gotoAndPlay ("fire");
Symbol 909 MovieClip Frame 1
stop();
Symbol 909 MovieClip Frame 2
_parent._parent.placeE12Bullet(dot);
Symbol 909 MovieClip Frame 6
gotoAndPlay ("fire");
Symbol 911 MovieClip Frame 1
stop();
Symbol 911 MovieClip Frame 2
_parent._parent.placeE13Bullet(dot);
Symbol 911 MovieClip Frame 6
gotoAndPlay ("fire");
Symbol 915 MovieClip Frame 1
stop();
Symbol 915 MovieClip Frame 2
stop();
Symbol 918 MovieClip Frame 1
stop();
Symbol 918 MovieClip Frame 2
stop();
Symbol 928 MovieClip Frame 1
stop();
Symbol 928 MovieClip Frame 98
stop();
Symbol 928 MovieClip Frame 257
stop();
Symbol 928 MovieClip Frame 320
stop();
Symbol 928 MovieClip Frame 365
stop();
Symbol 928 MovieClip Frame 430
stop();
Symbol 928 MovieClip Frame 505
stop();
Symbol 938 MovieClip Frame 1
stop();
Symbol 940 MovieClip Frame 1
stop();
Symbol 942 MovieClip Frame 148
stop();
Symbol 944 MovieClip Frame 1
stop();
Symbol 949 MovieClip Frame 1
stop();
Symbol 949 MovieClip Frame 98
stop();
Symbol 950 MovieClip Frame 1
stop();
Symbol 950 MovieClip Frame 98
stop();
Symbol 951 MovieClip Frame 1
stop();
Symbol 951 MovieClip Frame 98
stop();
Symbol 962 MovieClip Frame 148
stop();
Symbol 986 MovieClip Frame 148
stop();