Frame 2
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=7&fv=") + fv) + "&v=") + escape(getVersion())) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
mad.removeMovieClip();
stop();
this.createEmptyMovieClip("aaa", 1000);
ss = new Sound("aaa");
ss.attachSound("ddd");
ss.start();
ss.onSoundComplete = function () {
ss.start();
};
if (score == undefined) {
score = 0;
bscore = 0;
}
if (score > bscore) {
bscore = score;
}
muu.rhand.hnd.gotoAndStop(random(5) + 2);
muu.rhand._rotation = -35;
__com_mochibot__("38d68c88", this, 10301, true);
Frame 4
function madMove() {
if (hp < 1) {
gotoAndStop (2);
ss.stop();
}
mad.swapDepths((mad._y * 1000) + 900);
if ((_xmouse < mad._x) && (mad._xscale > 0)) {
mad._xscale = mad._xscale * -1;
} else if ((_xmouse > mad._x) && (mad._xscale < 0)) {
mad._xscale = mad._xscale * -1;
}
if (moving == 2) {
mad.walk.gotoAndStop(1);
moving = 0;
}
if (moving == 1) {
moving = 2;
}
mad.hed.hed.gotoAndStop(Math.round(((mad._y - _ymouse) + 100) / 10));
if (mad._xscale > 0) {
mad.rhand._rotation = Math.atan2(_ymouse - mad._y, _xmouse - mad._x) * rad;
mad.lhand._rotation = Math.atan2(_ymouse - mad._y, _xmouse - mad._x) * rad;
} else {
mad.rhand._rotation = (Math.atan2(_ymouse - mad._y, _xmouse - mad._x) * (-rad)) - 180;
mad.lhand._rotation = (Math.atan2(_ymouse - mad._y, _xmouse - mad._x) * (-rad)) - 180;
}
if (Key.isDown(87) && (mad._y > 120)) {
if (mad.walk._currentframe == 1) {
mad.walk.gotoAndStop(2);
}
if (moving == 0) {
moving = 1;
} else {
moving = 1;
}
mad._y = mad._y - speed;
}
if (Key.isDown(83) && (mad._y < 350)) {
if (mad.walk._currentframe == 1) {
mad.walk.gotoAndStop(2);
}
if (moving == 0) {
moving = 1;
} else {
moving = 1;
}
mad._y = mad._y + speed;
}
if (Key.isDown(65)) {
if (mad._xscale > 0) {
mad.walk.gotoAndStop(3);
} else {
mad.walk.gotoAndStop(2);
}
if (moving == 0) {
moving = 1;
} else {
moving = 1;
}
mad._x = mad._x - speed;
}
if (Key.isDown(68)) {
if (mad._xscale < 0) {
mad.walk.gotoAndStop(3);
} else {
mad.walk.gotoAndStop(2);
}
if (moving == 0) {
moving = 1;
} else {
moving = 1;
}
mad._x = mad._x + speed;
}
while (mad._x < (10 + (25 * ((400 - mad._y) / 200)))) {
mad._x++;
}
while (mad._x > (590 - (25 * ((400 - mad._y) / 200)))) {
mad._x--;
}
}
function madAttack() {
mad.rhand.handle = 0;
mad.lhand.handle = 1;
mad.rhand.hnd.gotoAndStop(attackr + 1);
mad.lhand.hnd.gotoAndStop(attackl + 1);
wepr = attackr;
wepl = attackl;
onMouseDown = function () {
attmod = 1;
};
if (attmod == 1) {
if ((attackr < 2) && (mad.rhand.hnd.hnd._currentframe == 1)) {
mad.rhand.hnd.hnd.play();
attmod = 0;
} else if (attackl < 2) {
mad.lhand.hnd.hnd.play();
attmod = 0;
}
curfrmr = mad.rhand.hnd.hnd._currentframe;
curfrml = mad.lhand.hnd.hnd._currentframe;
totfrmr = mad.rhand.hnd.hnd._totalframes;
totfrml = mad.lhand.hnd.hnd._totalframes;
if (((attackr > 1) && (curfrmr == (totfrmr - 1))) && (weplist[attackr][2] > 0)) {
mad.rhand.hnd.hnd.play();
weplist[attackr][2]--;
if ((attackr != 4) && (attackl != 4)) {
attmod = 0;
}
} else if (((attackl > 1) && (curfrml == (totfrml - 1))) && (weplist[attackr][3] > 0)) {
mad.lhand.hnd.hnd.play();
weplist[attackl][3]--;
if ((attackl != 4) && (attackr != 4)) {
attmod = 0;
}
}
}
onMouseUp = function () {
attmod = 0;
};
if (isNaN(hp)) {
hp = rechp;
} else {
rechp = hp;
}
}
function enemyDamage() {
nom = (((((((weplist[attackr][0] + "(") + weplist[attackr][2]) + ")") + " / ") + weplist[attackl][0]) + "(") + weplist[attackr][3]) + ")";
addtime--;
if (addtime < 1) {
en.duplicateMovieClip("ee" + id, id + 1, {_x:50 + random(500), _y:160 + random(220)});
if (kills == 0) {
addtime = 150;
} else {
addtime = Math.ceil((1 / kills) * 3000);
}
if (addtime > 150) {
addtime = 150;
} else if (addtime < 30) {
addtime = 30;
}
}
if (Key.isDown(69) && (ke < 1)) {
attackr = 0;
weplist[attackr][2] = 1;
ke = 30;
}
if (Key.isDown(81) && (ke < 1)) {
attackl = 0;
weplist[attackr][3] = 1;
ke = 30;
}
ke--;
}
stop();
this.createEmptyMovieClip("aaa", 10);
ss = new Sound("aaa");
ss.attachSound("muu");
ss.start();
ss.onSoundComplete = function () {
ss.start();
};
var addtime = 0;
var moving = 0;
var speed = 8;
var kills = 0;
var id = 0;
var hp = 1000;
var rad = 57.2957795130823;
onEnterFrame = function () {
per = Math.round((hp / 1000) * 100);
madMove();
madAttack();
enemyDamage();
};
var attmod = 0;
var attackr = 0;
var attackl = 0;
var alter = 0;
var punchA = ["Punch", 10, 1, 1, 1];
var axeA = ["Axe", 50, 1, 1, 1];
var handGunA = ["HandGun", 12, 20, 20, 20];
var shotGunA = ["ShotGun", 23, 8, 8, 8];
var uziGunA = ["Uzi", 8, 60, 60, 60];
var lazerGunA = ["Laser", 100, 6, 6, 6];
weplist = [punchA, axeA, handGunA, shotGunA, uziGunA, lazerGunA];
var ke = 30;
Symbol 57 Button
on (press) {
getURL ("http://www.newgrounds.com/collection/madnessday2007", (target = "_blank"));
}
Symbol 61 MovieClip Frame 9
stop();
Symbol 71 MovieClip Frame 29
gotoAndPlay (1);
Symbol 71 MovieClip Frame 65
gotoAndPlay ("ready_loop");
Symbol 71 MovieClip Frame 85
_root.play();
Symbol 78 Button
on (press) {
_root.loader.hank.gotoAndPlay("go");
play();
}
Symbol 79 MovieClip Frame 1
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
bar._xscale = PercentLoaded;
} else {
gotoAndStop ("loaded");
_root.loader.hank.gotoAndPlay("ready");
}
Symbol 79 MovieClip Frame 2
gotoAndPlay (1);
Symbol 79 MovieClip Frame 5
stop();
Symbol 86 MovieClip Frame 1
stop();
Symbol 86 MovieClip Frame 2
stop();
Symbol 86 MovieClip Frame 3
stop();
Symbol 92 MovieClip Frame 1
stop();
Symbol 95 MovieClip Frame 1
gotoAndStop(_totalframes - 1);
Symbol 95 MovieClip Frame 16
stop();
Symbol 95 MovieClip Frame 17
gotoAndPlay (2);
Symbol 128 MovieClip Frame 1
stop();
Symbol 131 MovieClip Frame 1
s = new Sound();
s.attachSound("smallGun1");
c = new Sound();
c.attachSound("click");
gotoAndStop(_totalframes - 1);
Symbol 131 MovieClip Frame 2
s.start();
Symbol 131 MovieClip Frame 9
stop();
Symbol 131 MovieClip Frame 10
if ((((_parent._parent.handle == 0) && (_root.weplist[_root.attackr][2] > 0)) || ((_parent._parent.handle == 1) && (_root.weplist[_root.attackl][3] > 0))) || (_parent._parent.e == 1)) {
gotoAndPlay (2);
} else {
c.start();
}
Symbol 136 MovieClip Frame 1
s = new Sound();
s.attachSound("shotGun1");
c = new Sound();
c.attachSound("click");
gotoAndStop(_totalframes - 1);
Symbol 136 MovieClip Frame 2
s.start();
Symbol 136 MovieClip Frame 31
stop();
Symbol 136 MovieClip Frame 32
if ((((_parent._parent.handle == 0) && (_root.weplist[_root.attackr][2] > 0)) || ((_parent._parent.handle == 1) && (_root.weplist[_root.attackl][3] > 0))) || (_parent._parent.enabled == 1)) {
gotoAndPlay (2);
} else {
c.start();
}
Symbol 139 MovieClip Frame 1
this.createEmptyMovieClip("uzi", 1);
s = new Sound("uzi");
s.attachSound("uziGun1");
c = new Sound();
c.attachSound("click");
gotoAndStop(_totalframes - 1);
Symbol 139 MovieClip Frame 2
s.start(0.5);
Symbol 139 MovieClip Frame 4
stop();
s.stop();
Symbol 139 MovieClip Frame 5
if ((((_parent._parent.handle == 0) && (_root.weplist[_root.attackr][2] > 0)) || ((_parent._parent.handle == 1) && (_root.weplist[_root.attackl][3] > 0))) || (_parent._parent.enabled == 1)) {
gotoAndPlay (2);
} else {
c.start();
}
Symbol 142 MovieClip Frame 1
gotoAndStop(_totalframes - 1);
s = new Sound();
s.attachSound("lazerGun1");
c = new Sound();
c.attachSound("air");
Symbol 142 MovieClip Frame 2
s.start();
Symbol 142 MovieClip Frame 20
stop();
Symbol 142 MovieClip Frame 21
if ((((_parent._parent.handle == 0) && (_root.weplist[_root.attackr][2] > 0)) || ((_parent._parent.handle == 1) && (_root.weplist[_root.attackl][3] > 0))) || (_parent._parent.enabled == 1)) {
gotoAndPlay (2);
} else {
c.start();
}
Symbol 143 MovieClip Frame 1
stop();
Symbol 152 MovieClip Frame 1
stop();
Symbol 155 MovieClip Frame 1
_visible = false;
Symbol 158 MovieClip Frame 1
stop();
Symbol 170 Button
on (release) {
ss.stop();
gotoAndStop (4);
}
Symbol 182 MovieClip Frame 1
stop();
Symbol 187 MovieClip Frame 1
stop();
Symbol 210 MovieClip Frame 1
gotoAndStop(random(13) + 1);
Symbol 210 MovieClip Frame 30
stop();
Symbol 216 MovieClip Frame 1
stop();
_visible = false;
Symbol 216 MovieClip Frame 25
_root.kills++;
if (random(2) == 0) {
if (_parent.attackr != 0) {
_root.glow.duplicateMovieClip("gl" + _root.kills, 80000 + _root.kills, {_x:_parent._x, _y:_parent._y, frm:_parent.attackr});
}
} else if (_parent.attackl != 0) {
_root.glow.duplicateMovieClip("gl" + _root.kills, 80000 + _root.kills, {_x:_parent._x, _y:_parent._y, frm:_parent.attackl});
}
_parent.removeMovieClip();
Symbol 217 MovieClip Frame 1
function madAttack() {
rhand.handle = 0;
lhand.handle = 1;
rhand.hnd.gotoAndStop(attackr + 1);
lhand.hnd.gotoAndStop(attackl + 1);
wepr = attackr;
wepl = attackl;
if (attmod == 1) {
if ((attackr < 2) && (rhand.hnd.hnd._currentframe == 1)) {
rhand.hnd.hnd.play();
attmod = 0;
} else if (attackl < 2) {
lhand.hnd.hnd.play();
attmod = 0;
}
curfrmr = rhand.hnd.hnd._currentframe;
curfrml = lhand.hnd.hnd._currentframe;
totfrmr = rhand.hnd.hnd._totalframes;
totfrml = lhand.hnd.hnd._totalframes;
if ((attackr > 0) && (curfrmr == (totfrmr - 1))) {
rhand.hnd.hnd.play();
if ((attackr != 3) && (attackl != 3)) {
attmod = 0;
}
} else if ((attackl > 0) && (curfrml == (totfrml - 1))) {
lhand.hnd.hnd.play();
if ((attackl != 3) && (attackr != 3)) {
attmod = 0;
}
}
}
if (rhand.hnd.hnd.hitTest(_root.mad.hhurt._x + _root.mad._x, _root.mad.hhurt._x + _root.mad._y, true)) {
_root.hp = _root.hp - (weplist[attackr] * 1.5);
_root.mad.headhit.play();
} else if (rhand.hnd.hnd.hitTest(_root.mad.bhurt._x + _root.mad._x, _root.mad.bhurt._x + _root.mad._y, true)) {
_root.hp = _root.hp - weplist[attackr];
_root.mad.bodhit.play();
} else if (lhand.hnd.hnd.hitTest(_root.mad.hhurt._x + _root.mad._x, _root.mad.hhurt._y + _root.mad._y, true)) {
_root.hp = _root.hp - (weplist[attackl] * 1.5);
_root.mad.headhit.play();
} else if (lhand.hnd.hnd.hitTest(_root.mad.bhurt._x + _root.mad._x, _root.mad.bhurt._y + _root.mad._y, true)) {
_root.hp = _root.hp - weplist[attackl];
_root.mad.headbod.play();
}
if (_root.mad.rhand.hnd.hnd.attbox.hitTest(_x + hhurt._x, _y + hhurt._y, true)) {
hp = hp - (_root.weplist[_root.attackr][1] * 1.5);
headhit.play();
} else if (_root.mad.rhand.hnd.hnd.attbox.hitTest(_x + bhurt._x, _y + bhurt._y, true)) {
hp = hp - _root.weplist[_root.attackr][1];
bodhit.play();
} else if (_root.mad.lhand.hnd.hnd.attbox.hitTest(_x + hhurt._x, _y + hhurt._y, true)) {
hp = hp - (_root.weplist[_root.attackl][1] * 1.5);
headhit.play();
} else if (_root.mad.lhand.hnd.hnd.attbox.hitTest(_x + bhurt._x, _y + bhurt._y, true)) {
hp = hp - _root.weplist[_root.attackl][1];
bodhit.play();
}
}
function madMove() {
if ((attackr > 1) || (attackl > 1)) {
dist = 300;
} else {
dist = 50;
}
rot = Math.atan2(_root.mad._y - _y, _root.mad._x - _x) * rad;
sin = Math.sin(rot / rad);
cos = Math.cos(rot / rad);
disx = Math.abs(_root.mad._x - _x);
disy = Math.abs(_root.mad._y - _y);
timer--;
if ((timer < 1) && (mov == 0)) {
mov = 1;
} else if (timer < 1) {
mov = 0;
}
if (mov == 1) {
timer = random(60) + 10;
mov = 2;
}
if (attack == 0) {
if ((_root.mad._x > _x) && (_xscale < 0)) {
_xscale = (_xscale * -1);
} else if ((_root.mad._x < _x) && (_xscale > 0)) {
_xscale = (_xscale * -1);
}
if (_xscale > 0) {
rhand._rotation = rot;
lhand._rotation = rot;
} else {
rhand._rotation = (-rot) - 180;
lhand._rotation = (-rot) - 180;
}
}
if (mov == 2) {
if (Math.sqrt(Math.pow(disx, 2) + Math.pow(disy, 2)) > dist) {
_x = (_x + (cos * 4));
_y = (_y + (sin * 4));
if (walk._currentframe != 2) {
walk.gotoAndStop(2);
}
}
} else {
walk.gotoAndStop(1);
}
if (random(100) == 0) {
attack = 2;
attime = 10 + random(60);
}
if (attack == 2) {
attime--;
if (attime < 1) {
attack = 3;
attime = 20 + random(30);
attmod = 1;
}
}
if (attack == 3) {
attime--;
attmod = 1;
if (attime < 1) {
attmod = 0;
attack = 0;
}
}
}
idnum = _root.id;
_root.id++;
hp = 50 + random(_root.kills);
rhand.handle = 2;
lhand.handle = 2;
rad = 57.2957795130823;
onEnterFrame = function () {
if (_name != "en") {
if (hp < 1) {
ded._visible = true;
if (hed.hed._currentframe < 14) {
hed.hed.gotoAndPlay(14);
}
ded.play();
} else {
madAttack();
madMove();
}
this.swapDepths((_y * 1000) + idnum);
}
if (_root._currentframe == 2) {
this.removeMovieClip();
}
};
if (_root.kills > 30) {
rand = 30;
} else {
rand = _root.kills;
}
var attmod = 0;
var attackr = random(Math.floor(rand / 4));
var attackl = random(Math.floor(rand / 4));
var alter = 0;
weplist = [1, 2, 1, 2, 1, 2];
var timer = 10;
var dist = 0;
var attack = 0;
var attime = 0;
Symbol 226 MovieClip Frame 1
tim = 100;
gotoAndStop(frm);
onEnterFrame = function () {
if (_root._currentframe == 2) {
this.removeMovieClip();
}
tim--;
if (Key.isDown(69) && (_root.attackr == 0)) {
_root.ke = 30;
_root.attackr = _currentframe;
_root.weplist[_root.attackr][2] = _root.weplist[_root.attackr][4];
this.removeMovieClip();
}
if (Key.isDown(81) && (_root.attackl == 0)) {
_root.ke = 30;
_root.attackl = _currentframe;
_root.weplist[_root.attackl][3] = _root.weplist[_root.attackl][4];
this.removeMovieClip();
}
if (tim < 1) {
this.removeMovieClip();
}
_alpha = tim;
};