Frame 1
stop();
gamecomplete = false;
sentendscore = false;
gfps = false;
level = 1;
points = 0;
score = 0;
ammo1 = 99;
ammo2 = 200;
ammo3 = 15;
ammo4 = 5;
ammo5 = 1;
cammos = new Array(0, ammo1, ammo2, ammo3, ammo4, ammo5);
activeweapons = new Array(0, true, false, false, false, false);
availweapons = new Array(0, true, false, false, false, false);
costweapons = new Array(0, 0, 500, 600, 700, 1000);
reloads = new Array(0, 50, 100, 5, 2.5, 1);
maxammos = new Array(0, 0, 400, 15, 5, 1);
maxammos2 = new Array(0, 0, 1600, 45, 23, 7);
_root._quality = "high";
musicvol = 100;
gamepaused = false;
pausedtimer = 0;
muted = false;
healthlevel = 4;
healthlevels = new Array(0, 11, 21, 31, 41, 51, 61, 70, 80, 90, 100);
maxhealth = 10;
getpaid = true;
speedlevel = 4;
maxspeed = 7;
speedleveltext = 1;
healthcost = 200;
speedcost = 200;
piemancolour = 1;
cursornumber = 1;
cursorease = 2;
totaltimer = 0;
leveltimer = 0;
r1count = 0;
r2count = 0;
r3count = 0;
r4count = 0;
deaths = 0;
complevels = 0;
bfired = 0;
besendtimer = 0;
skillscore = 0;
bestskillscore = 0;
sentskillscore = false;
traintypes = new Array("choose training mode", "lasers", "spinners", "robots", "tanks", "maze", "remote mine", "assault course");
trainmode = 0;
trainlevel = 1;
cheated = false;
darth = false;
nowall = false;
invin = false;
thin = false;
pencil = false;
ninja = false;
invert = false;
godmode = false;
Stage.showMenu = false;
cursor.onEnterFrame = function () {
Q = getTimer() - (Q ? (Q) : 0);
framer = int(1000 / Q) + " FPS";
Q = getTimer();
totaltimer++;
i = 2;
while (i <= 5) {
if (cammos[i] > maxammos[i]) {
cammos[i] = maxammos[i];
}
i++;
}
cursor.gotoAndStop(cursornumber);
music.setVolume(musicvol);
if (!gamepaused) {
Mouse.hide();
cursor._x = cursor._x + ((_xmouse - cursor._x) / cursorease);
cursor._y = cursor._y + ((_ymouse - cursor._y) / cursorease);
} else {
Mouse.show();
}
};
onEnterFrame = function () {
loaded = _root.getBytesLoaded();
total = _root.getBytesTotal();
lop.gotoAndStop(Math.round((loaded / total) * 25));
if (total == loaded) {
} else {
percent = Math.round((loaded / total) * 100) + "%";
}
};
start_btn.onRelease = function () {
if (total == loaded) {
gotoAndStop (54);
}
};
Frame 2
function makevars(pies) {
pieman.xpos = pieman._x;
pieman.ypos = pieman._y;
pieman.speed = 5;
if (piemancolour == 13) {
pieman.accel = 10;
} else {
pieman.accel = speedlevel;
}
pieman.dx = 0;
pieman.dy = 0;
pieman.wtype = 1;
pieman.wtimer = 0;
pieman.xdif = 0;
pieman.ydif = 0;
pieman.dis = 0;
menu.gotpie = 0;
menu.totpie = pies;
menu.cpoints = 0;
pieman.fullhealth = true;
pieman.fullammo = true;
ammo = new Array();
explodes = new Array();
timestops = new Array();
splinters = new Array();
powerups = new Array();
pressed = false;
menuweapon = 0;
comp = false;
pieman.active = true;
rcmine.active = 0;
rcmine.xspeed = 0;
rcmine.yspeed = 0;
healthpercent = 0;
piebarframe = 0;
menu.healthbar._xscale = healthlevels[healthlevel];
pieman.done = false;
pieman.dead = false;
culeveltimer = 0;
}
function removearray(array) {
i = 0;
while (i <= array.length) {
o = array[i];
removeMovieClip(o);
i++;
}
}
function removestuff() {
removearray(explodes);
removearray(powerups);
removearray(splinters);
removearray(timestops);
removearray(ammo);
}
function pausegame() {
if (_currentframe == (numlevel + 7)) {
pausedtimer++;
if (Key.isDown(80)) {
if (pausedtimer > 10) {
if (gamepaused == false) {
gamepaused = true;
pausedtimer = 0;
pmenud = _root.getNextHighestDepth();
attachMovie("pmenu", "pmenu" + pmenud, pmenud);
pmenuo = _root["pmenu" + pmenud];
pmenuo._x = 350;
pmenuo._y = 250;
}
if (pausedtimer > 10) {
if (gamepaused == true) {
gamepaused = false;
pausedtimer = 0;
removeMovieClip(pmenuo);
}
}
}
}
}
}
function distext(ob, mess) {
if (pieman.hitTest(ob)) {
walls.text1 = mess;
}
}
function makesounds() {
lasers = new Sound();
lasers.attachSound("laser");
machineg = new Sound();
machineg.attachSound("machine1");
cannon = new Sound();
cannon.attachSound("cannon");
times = new Sound();
times.attachSound("times");
crate = new Sound();
crate.attachSound("crate");
shutdown = new Sound();
shutdown.attachSound("shutdown");
mcrate = new Sound();
mcrate.attachSound("mcrate");
saw = new Sound();
saw.attachSound("saw2");
boom = new Sound();
boom.attachSound("explodes");
smash = new Sound();
smash.attachSound("tarsmash");
smash2 = new Sound();
smash2.attachSound("tarsmash2");
smash3 = new Sound();
smash3.attachSound("tarsmash3");
}
function tarsmash() {
c = random(3);
if (c == 0) {
smash.start();
}
if (c == 1) {
smash2.start();
}
if (c == 2) {
smash3.start();
}
}
function shoot(x, y, rot, type, who) {
d = _root.getNextHighestDepth();
attachMovie("l", "l" + d, d);
l = _root["l" + d];
l.gotoAndStop(type);
l._x = x;
l._y = y;
l._rotation = rot;
l.type = type;
l.xspeed = Math.sin(0.0174 * rot);
l.yspeed = Math.cos(0.0174 * rot);
l.speed = 1;
if (who == 0) {
l.endx = cursor._x;
l.endy = cursor._y;
if (type == 1) {
lasers.start();
}
if (type == 2) {
if (machineg.position == machineg.duration) {
machineg.start();
}
if (machineg.position == 0) {
machineg.start();
}
}
if (type == 3) {
cannon.start();
}
if (type == 4) {
cannon.start();
}
if (type == 5) {
times.start();
}
} else {
l.endx = pieman._x;
l.endy = pieman._y;
}
l.timer = 0;
l.etimer = 0;
l.rotspeed = random(10) + 1;
l.who = who;
ammo.push(l);
}
function explode(x, y, size, noise) {
d = _root.getNextHighestDepth();
attachMovie("explode", "explode" + d, d);
e = _root["explode" + d];
e._x = x;
e._y = y;
e._xscale = size;
e._yscale = size;
e._rotation = random(360);
e.timer = 0;
explodes.push(e);
if (noise) {
boom.start();
}
}
function timestop(x, y) {
d = _root.getNextHighestDepth();
attachMovie("timestop", "timestop" + d, d);
t = _root["timestop" + d];
t._x = x;
t._y = y;
t._rotation = random(360);
timestops.push(t);
}
function checkpress() {
onMouseDown = function () {
pressed = true;
};
onMouseUp = function () {
pressed = false;
};
}
function bound(type, o) {
w = o._width / 2;
h = o._height / 2;
maxx = 700 + w;
maxy = 500 + h;
maxx2 = 700 - w;
maxy2 = 500 - h;
minx = -w;
miny = -h;
minx2 = w;
miny2 = h;
hit = false;
if (type == 0) {
if (o._x > maxx) {
o._x = minx;
}
if (o._x < minx) {
o._x = maxx;
}
if (o._y > maxy) {
o._y = miny;
}
if (o._y < miny) {
o._y = maxy;
}
}
if (type == 2) {
if ((o._x > maxx) || (o._x < minx)) {
hit = true;
}
if ((o._y > maxy) || (o._y < miny)) {
hit = true;
}
return(hit);
}
if (type == 3) {
if ((o._x > maxx2) || (o._x < minx2)) {
o.xspeed = o.xspeed * -1;
}
if ((o._y > maxy2) || (o._y < miny2)) {
o.yspeed = o.yspeed * -1;
}
return(hit);
}
}
function wallblock(ob) {
if (!(piemancolour === 7)) {
if (ob.hitTest(pieman.getBounds(_root).xMin, pieman._y, true)) {
pieman.xpos = pieman.xpos + (pieman.accel * 3);
pieman._x = pieman._x + 3;
}
if (ob.hitTest(pieman.getBounds(_root).xMax, pieman._y, true)) {
pieman.xpos = pieman.xpos - (pieman.accel * 3);
pieman._x = pieman._x - 3;
}
if (ob.hitTest(pieman._x, pieman.getBounds(_root).yMax, true)) {
pieman.ypos = pieman.ypos - (pieman.accel * 3);
pieman._y = pieman._y - 3;
}
if (ob.hitTest(pieman._x, pieman.getBounds(_root).yMin, true)) {
pieman.ypos = pieman.ypos + (pieman.accel * 3);
pieman._y = pieman._y + 3;
}
}
}
function movepieman(clevel) {
blockammo(menu);
culeveltimer++;
if (pieman.active) {
healthpercent = menu.healthbar._xscale / 100;
piebarframe = 81 * healthpercent;
menu.piebar.gotoAndStop(Math.round(piebarframe));
wallblock(pmblock);
wallblock(pmblock1);
wallblock(pmblock3);
wallblock(pmblock2);
wallblock(menu);
if (piemancolour == 12) {
i = 0;
while (i <= numpies) {
p = _root["pie" + i];
p._x = p._x + ((pieman._x - p._x) / 50);
p._y = p._y + ((pieman._y - p._y) / 50);
i++;
}
}
if (pieman._x > 700) {
pieman._x = 700;
pieman.xpos = pieman.xpos - pieman.accel;
}
if (pieman._x < 0) {
pieman._x = 0;
pieman.xpos = pieman.xpos + pieman.accel;
}
if (pieman._y < 0) {
pieman._y = 0;
pieman.ypos = pieman.ypos + pieman.accel;
}
if (pieman._y > 500) {
pieman._y = 500;
pieman.ypos = pieman.ypos - pieman.accel;
}
pieman.xdif = cursor._x - pieman.dx;
pieman.ydif = cursor._y - pieman.dy;
if (menu.gotpie == menu.totpie) {
portal.gotoAndStop(2);
}
if (pieman._currentframe == 19) {
comp = true;
}
if (pieman._currentframe == 20) {
points = points + menu.cpoints;
if (level == clevel) {
level++;
}
if (level == 21) {
if (!gamecomplete) {
gotoAndStop (29);
} else {
gotoAndStop (6);
}
} else {
gotoAndStop (6);
}
removestuff();
}
if (portal._currentframe == 2) {
if (portal.hitTest(pieman._x, pieman._y, true)) {
if (pieman._currentframe == 1) {
complevels++;
leveltimer = leveltimer + culeveltimer;
if ((60 - Math.round(culeveltimer / 24)) > 0) {
menu.cpoints = menu.cpoints + (60 - Math.round(culeveltimer / 24));
}
if ((60 - Math.round(culeveltimer / 24)) > 0) {
score = score + (60 - Math.round(culeveltimer / 24));
}
menu.cpoints = menu.cpoints + ((_currentframe - 7) * 10);
score = score + ((_currentframe - 7) * 10);
pieman.gotoAndPlay(2);
pieman.done = true;
}
}
}
if (menu.healthbar._xscale == healthlevels[healthlevel]) {
pieman.fullhealth = true;
} else {
pieman.fullhealth = false;
}
if (menu.reloadbar._xscale == 100) {
pieman.fullammo = true;
} else {
pieman.fullammo = false;
}
pieman.dis = Math.sqrt((pieman.xdif * pieman.xdif) + (pieman.ydif * pieman.ydif));
if (pieman.dis > 22) {
pieman._rotation = (57.2957795130823 * Math.atan2(pieman.ydif, pieman.xdif)) + 90;
}
if (!pieman.done) {
if (!pieman.dead) {
pieman._x = pieman._x + ((pieman.xpos - pieman._x) / pieman.speed);
pieman._y = pieman._y + ((pieman.ypos - pieman._y) / pieman.speed);
}
} else {
pieman._x = pieman._x + ((portal._x - pieman._x) / pieman.speed);
pieman._y = pieman._y + ((portal._y - pieman._y) / pieman.speed);
}
if (Key.isDown(87) || (Key.isDown(38))) {
pieman.ypos = pieman.ypos - pieman.accel;
}
if (Key.isDown(83) || (Key.isDown(40))) {
pieman.ypos = pieman.ypos + pieman.accel;
}
if (Key.isDown(68) || (Key.isDown(39))) {
pieman.xpos = pieman.xpos + pieman.accel;
}
if (Key.isDown(65) || (Key.isDown(37))) {
pieman.xpos = pieman.xpos - pieman.accel;
}
if (pieman.wtimer > 5) {
if (Key.isDown(81) || (Key.isDown(46))) {
pieman.dots.gotoAndPlay(2);
if (pieman.wtype >= 2) {
pieman.wtype--;
pieman.wtimer = 0;
menu.reloadbar._xscale = 0;
}
}
if (Key.isDown(69) || (Key.isDown(34))) {
pieman.dots.gotoAndPlay(2);
if (pieman.wtype <= 4) {
pieman.wtype++;
pieman.wtimer = 0;
menu.reloadbar._xscale = 0;
}
}
}
menu.cammo = cammos[pieman.wtype];
pieman.wtimer++;
pieman.dx = pieman._x + (Math.sin(0.0174 * (pieman._rotation + 60)) * 22);
pieman.dy = pieman._y - (Math.cos(0.0174 * (pieman._rotation + 60)) * 22);
}
i = 0;
while (i <= ammo.length) {
l = ammo[i];
if (pieman.hitTest(l._x, l._y, true)) {
if (l.who == 1) {
if (l.type == 1) {
menu.healthbar._xscale = menu.healthbar._xscale - 0.7;
}
if (l.type == 2) {
menu.healthbar._xscale = menu.healthbar._xscale - 0.4;
}
if (l.type == 3) {
explode(l._x, l._y, 30, true);
menu.healthbar._xscale = menu.healthbar._xscale - 20;
}
if (l.type == 4) {
explode(l._x, l._y, 55, true);
menu.healthbar._xscale = menu.healthbar._xscale - 35;
}
removeMovieClip(l);
ammo.splice(i, 1);
}
}
i++;
}
checkpress();
movebase();
if (piemancolour == 8) {
if (menu.healthbar._xscale > 0) {
menu.healthbar._xscale = 100;
}
}
if (menu.healthbar._xscale <= 0) {
if (!pieman.dead) {
deaths++;
pieman.dead = true;
pieman.gotoAndPlay(21);
}
}
if (pieman.dead) {
comp = true;
}
if (pieman._currentframe == 40) {
die();
}
}
function die() {
removestuff();
gotoAndStop (6);
}
function movebase() {
if (rcmine.active == 0) {
rcmine._x = base._x;
rcmine._y = base._y;
} else {
rcmine._rotation = rcmine._rotation + (rcmine.xspeed * 2);
}
if (rcmine.active == 2) {
rcmine._rotation = rcmine._rotation + 10;
}
if (base.hitTest(pieman._x, pieman._y, true)) {
base.gotoAndStop(2);
if (pressed) {
if (rcmine.active == 0) {
pieman.active = false;
rcmine.active = 1;
rcmine.xspeed = 0;
rcmine.yspeed = 0;
}
} else {
pieman.active = true;
}
} else {
base.gotoAndStop(1);
}
if (!pressed) {
if (rcmine.active == 1) {
if (!rcmine.hitTest(base)) {
rcmine.gotoAndPlay(2);
rcmine.active = 2;
} else {
rcmine.active = 0;
}
}
}
if (rcmine._currentframe == 42) {
rcmine.active = 0;
rcmine.gotoAndStop(1);
}
if (rcmine.active == 1) {
removercmine(mineblock);
removercmine(mineblock1);
removercmine(mineblock3);
removercmine(mineblock2);
removercmine(menu);
if (bound(2, rcmine)) {
removercmine(_root);
}
if (Key.isDown(87) || (Key.isDown(38))) {
rcmine.yspeed = rcmine.yspeed - 1;
}
if (Key.isDown(83) || (Key.isDown(40))) {
rcmine.yspeed = rcmine.yspeed + 1;
}
if (Key.isDown(68) || (Key.isDown(39))) {
rcmine.xspeed = rcmine.xspeed + 1;
}
if (Key.isDown(65) || (Key.isDown(37))) {
rcmine.xspeed = rcmine.xspeed - 1;
}
rcmine._x = rcmine._x + rcmine.xspeed;
rcmine._y = rcmine._y + rcmine.yspeed;
rcmine.xspeed = rcmine.xspeed * 0.9;
rcmine.yspeed = rcmine.yspeed * 0.9;
}
removercmine(walls);
}
function removercmine(o) {
if (rcmine.active == 1) {
if (o.hitTest(rcmine._x, rcmine._y, true)) {
explode(rcmine._x, rcmine._y, 25, true);
rcmine.active = 0;
}
}
}
function moveammo() {
i = 0;
while (i <= ammo.length) {
l = ammo[i];
if (l.type == 1) {
l._x = l._x + (l.xspeed * 5);
l._y = l._y - (l.yspeed * 5);
}
if (l.type == 2) {
l._x = l._x + (l.xspeed * 15);
l._y = l._y - (l.yspeed * 15);
}
if (l.type == 3) {
l._x = l._x + (l.xspeed * l.speed);
l._y = l._y - (l.yspeed * l.speed);
if (l.speed < 20) {
l.speed = l.speed + 0.7;
}
}
if (l.type == 4) {
l._x = l._x + (l.xspeed * l.speed);
l._y = l._y - (l.yspeed * l.speed);
if (l.speed < 30) {
l.speed = l.speed + 1;
}
}
if (l.type == 5) {
l._x = l._x + ((l.endx - l._x) / 10);
l._y = l._y + ((l.endy - l._y) / 10);
l._rotation = l._rotation + l.rotspeed;
l.rotspeed = l.rotspeed * 0.98;
l.timer++;
if (l.timer > 48) {
timestop(l._x, l._y);
removeMovieClip(l);
ammo.splice(i, 1);
}
}
i++;
}
i = 0;
while (i <= ammo.length) {
l = ammo[i];
if (bound(2, l)) {
removeMovieClip(l);
ammo.splice(i, 1);
}
i++;
}
i = 0;
while (i <= ammo.length) {
l = ammo[i];
if (walls.hitTest(l._x, l._y, true)) {
if (l.who == 0) {
if (l.type == 3) {
explode(l._x, l._y, 30, true);
}
if (l.type == 4) {
explode(l._x, l._y, 100, true);
}
} else {
if (l.type == 3) {
explode(l._x, l._y, 30, false);
}
if (l.type == 4) {
explode(l._x, l._y, 100, false);
}
}
if (l.type == 5) {
timestop(l._x, l._y);
}
removeMovieClip(l);
ammo.splice(i, 1);
}
i++;
}
if (pieman.active) {
if (pressed) {
if (piemancolour == 11) {
shoot(cursor._x, cursor._y, random(360), 3, 0);
}
if (!(piemancolour === 9)) {
if (menu.reloadbar._xscale >= 100) {
if (cammos[pieman.wtype] > 0) {
if (activeweapons[pieman.wtype]) {
bfired++;
shoot(pieman.dx, pieman.dy, pieman._rotation, pieman.wtype, 0);
menu.reloadbar._xscale = 0;
cammos[pieman.wtype]--;
}
}
}
} else {
bfired++;
shoot(pieman.dx, pieman.dy, pieman._rotation, pieman.wtype, 0);
}
}
}
cammos[1] = 99;
menu.reloadbar._xscale = menu.reloadbar._xscale + reloads[pieman.wtype];
if (menu.reloadbar._xscale > 100) {
menu.reloadbar._xscale = 100;
}
}
function createlasers(num) {
i = 0;
while (i < num) {
l = _root["laser" + i];
l.xdif = 0;
l.ydif = 0;
l.dis = 0;
l.dammage = 0;
l.range = 200;
l.dammax = 100;
l.frozen = false;
l.active = true;
createhealthbar(l);
i++;
}
}
function createhealthbar(l) {
if (l._x > 0) {
l.hd = _root.getNextHighestDepth() + 1;
attachMovie("healthbar", "healthbar" + l.hd, l.hd);
l.healthbar = _root["healthbar" + l.hd];
}
}
function movehealthbar(l) {
if (l.hitTest(cursor._x, cursor._y, true)) {
l.healthbar._visible = true;
l.healthbar._x = cursor._x + 20;
l.healthbar._y = cursor._y - 10;
} else {
l.healthbar._visible = false;
}
if (comp) {
removeMovieClip(l.healthbar);
}
l.healthbar.bar._xscale = 100 - ((l.dammage / l.dammax) * 100);
}
function movelasers(num) {
i = 0;
while (i < num) {
l = _root["laser" + i];
if (l.active) {
shootrobots(l);
wallblock(l);
movehealthbar(l);
removercmine(l);
if (l.dammage > l.dammax) {
r1count++;
score = score + 10;
explode(l._x, l._y, 150, true);
removeMovieClip(l.healthbar);
l.gotoAndStop(2);
l.active = false;
po = 0;
while (po <= random(2)) {
powerup(l._x, l._y, 1);
po++;
}
po = 0;
while (po < 3) {
powerup(l._x, l._y, 3);
po++;
}
}
if (l.frozen == false) {
l.xdif = pieman._x - l._x;
l.ydif = pieman._y - l._y;
l.dis = Math.sqrt((l.xdif * l.xdif) + (l.ydif * l.ydif));
l._rotation = 57.2957795130823 * Math.atan2(l.ydif, l.xdif);
if (l.dis < l.range) {
shoot(l._x + (Math.sin(0.0174 * (l._rotation + 90)) * 30), l._y - (Math.cos(0.0174 * (l._rotation + 90)) * 30), l._rotation + 90, 1, 1);
}
}
}
i++;
}
}
function getdammage(t) {
d = 0;
if (t == 1) {
d = 2;
}
if (t == 2) {
d = 1;
}
return(d);
}
function createmines(num) {
i = 0;
while (i < num) {
m = _root["mine" + i];
m.dx = 0;
m.dy = 0;
m.dis = 0;
m.tol = (m._width / 2) + (pieman._width / 2);
m.active = true;
m._rotation = random(360);
i++;
}
}
function movemines(num) {
i = 0;
while (i < num) {
m = _root["mine" + i];
if (rcmine.active == 2) {
if (rcmine.hitTest(m._x, m._y, true)) {
if (m.active) {
m.active = false;
m.gotoAndStop(3);
}
}
}
if (!(piemancolour === 10)) {
if (m.active) {
m.dx = pieman._x - m._x;
m.dy = pieman._y - m._y;
m.dis = Math.sqrt((m.dx * m.dx) + (m.dy * m.dy));
if (m.dis < m.tol) {
m.active = false;
explode(m._x, m._y, 100, true);
menu.healthbar._xscale = menu.healthbar._xscale - 40;
m.gotoAndStop(2);
}
}
}
i++;
}
}
function createspinners(num) {
i = 0;
while (i < num) {
s = _root["spinner" + i];
s.timer = 0;
s.dammage = 0;
s.dammax = 150;
s._rotation = random(360);
s.active = true;
l.frozen = false;
s.spin = random(8) + 8;
s.dir = 0;
createhealthbar(s);
i++;
}
}
function shootrobots(l) {
j = 0;
while (j <= ammo.length) {
a = ammo[j];
if (a.who == 0) {
if (l.hitTest(a._x, a._y, true)) {
if (a.type == 1) {
l.dammage = l.dammage + 2;
l.range = l.range + 5;
}
if (a.type == 2) {
l.dammage = l.dammage + 2.5;
l.range = l.range + 5;
}
if (a.type == 3) {
explode(a._x, a._y, 30, true);
l.dammage = l.dammage + 31;
l.range = l.range + 60;
}
if (a.type == 4) {
explode(a._x, a._y, 55, true);
l.dammage = l.dammage + 51;
l.range = l.range + 100;
}
if (a.type == 5) {
timestop(a._x, a._y);
}
removeMovieClip(a);
ammo.splice(j, 1);
}
}
j++;
}
ti = 0;
while (ti <= timestops.length) {
t = timestops[ti];
if (t.hitTest(l._x, l._y, true)) {
l.dammage = l.dammage + 0.1;
if (!l.frozen) {
shutdown.start();
}
l.frozen = true;
}
ti++;
}
}
function shootcrates(l) {
j = 0;
while (j <= ammo.length) {
a = ammo[j];
if (l.hitTest(a._x, a._y, true)) {
if (a.type == 1) {
l.dammage = l.dammage + 2;
}
if (a.type == 2) {
l.dammage = l.dammage + 2.5;
}
if (a.type == 3) {
explode(a._x, a._y, 30, true);
l.dammage = l.dammage + 31;
}
if (a.type == 4) {
explode(a._x, a._y, 55, true);
l.dammage = l.dammage + 51;
}
if (a.type == 5) {
timestop(a._x, a._y);
}
removeMovieClip(a);
ammo.splice(j, 1);
}
j++;
}
ti = 0;
while (ti <= timestops.length) {
t = timestops[ti];
if (t.hitTest(l._x, l._y, true)) {
l.frozen = true;
}
ti++;
}
}
function barge(r) {
cro = 0;
while (cro < numcrates) {
c = _root["crate" + cro];
if (c.active) {
if (r.hitTest(c._x, c._y, true)) {
c.dammage = c.dammage + 200;
}
}
cro++;
}
crom = 0;
while (crom < nummcrates) {
c = _root["mcrate" + crom];
if (c.active) {
if (r.hitTest(c._x, c._y, true)) {
c.dammage = c.dammage + 200;
}
}
crom++;
}
moo = 0;
while (moo < nummines) {
m = _root["mine" + moo];
if (r.hitTest(m._x, m._y, true)) {
if (m.active) {
m.active = false;
m.gotoAndStop(2);
explode(m._x, m._y, 100, true);
r.dammage = r.dammage + 20;
}
}
moo++;
}
}
function blockammo(l) {
j = 0;
while (j <= ammo.length) {
a = ammo[j];
if (l.hitTest(a._x, a._y, true)) {
if (l.who == 0) {
if (l.type == 3) {
explode(l._x, l._y, 30, true);
}
if (l.type == 4) {
explode(l._x, l._y, 100, true);
}
} else {
if (l.type == 3) {
explode(l._x, l._y, 30, false);
}
if (l.type == 4) {
explode(l._x, l._y, 100, false);
}
}
if (a.type == 5) {
timestop(a._x, a._y);
}
removeMovieClip(a);
ammo.splice(j, 1);
}
j++;
}
}
function moveexplodes() {
e = 0;
while (e <= explodes.length) {
ex = explodes[e];
ex.timer++;
if (ex.timer >= 12) {
removeMovieClip(ex);
explodes.splice(e, 1);
}
e++;
}
}
function movespinners(num) {
i = 0;
while (i < num) {
s = _root["spinner" + i];
if (s.active) {
shootrobots(s);
wallblock(s);
movehealthbar(s);
removercmine(s);
if (s.dammage > s.dammax) {
r2count++;
score = score + 20;
explode(s._x, s._y, 150, true);
removeMovieClip(s.healthbar);
s.gotoAndStop(2);
s.active = false;
po = 0;
while (po <= random(2)) {
powerup(s._x, s._y, 1);
po++;
}
po = 0;
while (po < 5) {
powerup(s._x, s._y, 3);
po++;
}
}
if (!s.frozen) {
s.timer++;
if (s.timer < 15) {
s._rotation = s._rotation + s.spin;
shoot(s._x + (Math.sin(0.0174 * (s._rotation + 180)) * 45), s._y - (Math.cos(0.0174 * (s._rotation + 180)) * 45), s._rotation + 180, 3, 1);
shoot(s._x + (Math.sin(0.0174 * s._rotation) * 45), s._y - (Math.cos(0.0174 * s._rotation) * 45), s._rotation, 3, 1);
}
if (s.timer > (100 + random(150))) {
s.spin = random(8) + 8;
s.timer = 0;
}
}
}
i++;
}
}
function splinter(x, y, type) {
d = _root.getNextHighestDepth();
attachMovie("splinter", "splinter" + d, d);
s = _root["splinter" + d];
s._x = x;
s._y = y;
s.xv = random(10) - 5;
s.yv = random(10) - 5;
if (type == 1) {
s.gotoAndStop(random(3) + 1);
} else {
s.gotoAndStop(random(3) + 5);
}
s._rotation = random(360);
s.fade = (Math.random() * 2) + 1;
splinters.push(s);
}
function movesplinter() {
i = 0;
while (i <= splinters.length) {
s = splinters[i];
s.xv = s.xv * 0.9;
s.yv = s.yv * 0.9;
s._x = s._x + s.xv;
s._y = s._y + s.yv;
s._alpha = s._alpha - s.fade;
if (s._alpha <= 0) {
removeMovieClip(s);
splinters.splice(i, 1);
}
if (walls.hitTest(s._x, s._y, true)) {
s._alpha = 0;
}
i++;
}
}
function createcrates(num) {
i = 0;
while (i < num) {
c = _root["crate" + i];
c.dammage = 0;
c.dammax = 10;
c.active = true;
i++;
}
}
function createmcrates(num) {
i = 0;
while (i < num) {
c = _root["mcrate" + i];
c.dammage = 0;
c.dammax = 20;
c.active = true;
c.given = false;
i++;
}
}
function movecrates(num) {
i = 0;
while (i < num) {
c = _root["crate" + i];
if (c.active) {
wallblock(c);
shootcrates(c);
removercmine(c);
if (c.dammage > c.dammax) {
p = 0;
while (p <= 20) {
splinter(c._x, c._y, 1);
p++;
}
if (random(5) == 1) {
powerup(c._x, c._y, 1);
}
if (random(8) == 1) {
powerup(c._x, c._y, 2);
}
pow = 0;
while (pow <= random(1)) {
powerup(c._x, c._y, 3);
pow++;
}
score = score + 3;
c.gotoAndStop(2);
c.active = false;
crate.start();
}
}
i++;
}
}
function movemcrates(num) {
i = 0;
while (i < num) {
c = _root["mcrate" + i];
if (c.active) {
wallblock(c);
shootcrates(c);
removercmine(c);
if (c.dammage > c.dammax) {
p = 0;
while (p <= 20) {
splinter(c._x, c._y, 2);
p++;
}
if (activeweapons[2] == true) {
if (random(2) == 0) {
powerup(c._x, c._y, 4);
c.given = true;
}
}
if (activeweapons[3] == true) {
if (random(2) == 0) {
powerup(c._x, c._y, 5);
c.given = true;
}
}
if (activeweapons[4] == true) {
if (random(2) == 0) {
powerup(c._x, c._y, 6);
c.given = true;
}
}
if (activeweapons[5] == true) {
if (random(2) == 0) {
powerup(c._x, c._y, 7);
c.given = true;
}
}
if (!c.given) {
po = 0;
while (po <= random(3)) {
powerup(c._x, c._y, 1);
po++;
}
po = 0;
while (po <= random(3)) {
powerup(c._x, c._y, 3);
po++;
}
}
mcrate.start();
score = score + 8;
c.gotoAndStop(2);
c.active = false;
}
}
i++;
}
}
function powerup(x, y, type) {
d = _root.getNextHighestDepth();
attachMovie("powerup" + type, ("powerup" + type) + d, d);
p = _root[("powerup" + type) + d];
p._x = x;
p._y = y;
p.xspeed = random(10) - 5;
p.yspeed = random(10) - 5;
p.type = type;
powerups.push(p);
if (p.type > 3) {
p.rot = random(6) - 3;
} else {
p.rot = 0;
}
}
function movepowerups() {
i = 0;
while (i <= powerups.length) {
p = powerups[i];
p._x = p._x + p.xspeed;
p._y = p._y + p.yspeed;
p.xspeed = p.xspeed * 0.9;
p.yspeed = p.yspeed * 0.9;
p._rotation = p._rotation + p.rot;
p.rot = p.rot * 0.9;
bound(3, p);
if (walls.hitTest(p._x, p._y, true)) {
p.xspeed = p.xspeed * -1;
p.yspeed = p.yspeed * -1;
}
if (menu.hitTest(p._x, p._y, true)) {
p.xspeed = p.xspeed * -1;
p.yspeed = p.yspeed * -1;
}
if (pieman.hitTest(p)) {
if (p.type == 1) {
if (!pieman.fullhealth) {
if (menu.healthbar._xscale <= (healthlevels[healthlevel] - 10)) {
menu.healthbar._xscale = menu.healthbar._xscale + 10;
} else {
menu.healthbar._xscale = healthlevels[healthlevel];
}
removeMovieClip(p);
powerups.splice(i, 1);
}
}
if (p.type == 2) {
if (!pieman.fullammo) {
menu.reloadbar._xscale = 100;
removeMovieClip(p);
powerups.splice(i, 1);
}
}
if (p.type == 3) {
removeMovieClip(p);
powerups.splice(i, 1);
menu.cpoints = menu.cpoints + 20;
score = score + 20;
}
if (p.type == 4) {
cammos[2] = cammos[2] + 200;
removeMovieClip(p);
powerups.splice(i, 1);
}
if (p.type == 5) {
cammos[3] = cammos[3] + 20;
removeMovieClip(p);
powerups.splice(i, 1);
}
if (p.type == 6) {
cammos[4] = cammos[4] + 10;
removeMovieClip(p);
powerups.splice(i, 1);
}
if (p.type == 7) {
cammos[5] = cammos[5] + 1;
removeMovieClip(p);
powerups.splice(i, 1);
}
}
i++;
}
}
function createrobots(num) {
i = 0;
while (i < num) {
r = _root["robot" + i];
r.xspeed = 0;
r.yspeed = 0;
r.xdif = 0;
r.ydif = 0;
r.dis = 0;
r.range = 100;
r.speed = 0;
r.maxspeed = speedlevel - (speedlevel / 4);
r.dammage = 0;
r.dammax = 200;
r.active = true;
r.frozen = false;
r.stuck = false;
r.sound = false;
createhealthbar(r);
i++;
}
}
function moverobots(num) {
i = 0;
while (i < num) {
r = _root["robot" + i];
if (r.active) {
if (walls.hitTest(r._x, r._y, true)) {
r.dammage = r.dammax * 2;
}
if (r.dammage > r.dammax) {
r3count++;
score = score + 30;
explode(r._x, r._y, 100, true);
removeMovieClip(r.healthbar);
r.gotoAndStop(2);
r.active = false;
po = 0;
while (po <= random(1)) {
powerup(r._x, r._y, 1);
po++;
}
po = 0;
while (po < 4) {
powerup(r._x, r._y, 3);
po++;
}
}
if (!r.frozen) {
r.xdif = pieman._x - r._x;
r.ydif = pieman._y - r._y;
r._x = r._x + r.xspeed;
r._y = r._y - r.yspeed;
r.dis = Math.sqrt((r.xdif * r.xdif) + (r.ydif * r.ydif));
r._rotation = (57.2957795130823 * Math.atan2(r.ydif, r.xdif)) + 90;
r.xspeed = Math.sin(0.0174 * r._rotation) * r.speed;
r.yspeed = Math.cos(0.0174 * r._rotation) * r.speed;
if (r.dis < 45) {
menu.healthbar._xscale = menu.healthbar._xscale - 2;
}
if (r.dis < r.range) {
r.b1._rotation = r.b1._rotation + 10;
r.b2._rotation = r.b2._rotation - 10;
if (!r.sound) {
saw.start(0, 1000);
r.sound = true;
}
} else {
r.sound = false;
saw.stop("saw2");
}
if ((r.dis < r.range) && (r.dis > 40)) {
if (r.speed < r.maxspeed) {
r.speed++;
}
} else {
r.speed = 0;
}
} else {
wallblock(r);
}
shootrobots(r);
movehealthbar(r);
barge(r);
removercmine(r);
}
i++;
}
}
function doorswitch(num) {
s = _root["switch" + num];
d = _root["door" + num];
s2 = _root["unswitch" + num];
wallblock(d);
blockammo(d);
removercmine(d);
if (pieman.hitTest(s)) {
s.gotoAndStop(2);
s2.gotoAndStop(1);
if (d._currentframe == 1) {
d.gotoAndPlay(2);
}
}
if (pieman.hitTest(s2)) {
s2.gotoAndStop(2);
s.gotoAndStop(1);
if (d._currentframe == 16) {
d.gotoAndPlay(17);
}
}
if (rcmine.active == 1) {
if (rcmine.hitTest(s)) {
if (s._currentframe == 1) {
s.gotoAndStop(2);
s2.gotoAndStop(1);
if (d._currentframe == 1) {
d.gotoAndPlay(2);
}
removercmine(s);
}
}
}
if (rcmine.active == 1) {
if (rcmine.hitTest(s2)) {
if (s2._currentframe == 1) {
s2.gotoAndStop(2);
s.gotoAndStop(1);
if (d._currentframe == 16) {
d.gotoAndPlay(17);
}
removercmine(s2);
}
}
}
}
function createtanks(num) {
i = 0;
while (i < num) {
t = _root["tank" + i];
t.xdif = 0;
t.ydif = 0;
t.rot = 0;
t.dammage = 0;
t.dammax = 300;
t.active = true;
t.frozen = false;
t.xspeed = random(10) - 5;
t.yspeed = random(10) - 5;
t.timer = 0;
t.t = 0;
createhealthbar(t);
i++;
}
}
function blocktank(walls, t, n) {
if (n == 0) {
if (walls.hitTest(t.getBounds(_root).xMax, t._y, true)) {
t.xspeed = t.xspeed * -1;
t.t = 0;
}
if (walls.hitTest(t.getBounds(_root).xMin, t._y, true)) {
t.xspeed = t.xspeed * -1;
t.t = 0;
}
if (walls.hitTest(t._x, t.getBounds(_root).yMax, true)) {
t.yspeed = t.yspeed * -1;
t.t = 0;
}
if (walls.hitTest(t._x, t.getBounds(_root).yMin, true)) {
t.yspeed = t.yspeed * -1;
t.t = 0;
}
} else {
if (walls.hitTest(t.getBounds(_root).xMax, t._y, false)) {
t.xspeed = t.xspeed * -1;
t.t = 0;
}
if (walls.hitTest(t.getBounds(_root).xMin, t._y, false)) {
t.xspeed = t.xspeed * -1;
t.t = 0;
}
if (walls.hitTest(t._x, t.getBounds(_root).yMax, false)) {
t.yspeed = t.yspeed * -1;
t.t = 0;
}
if (walls.hitTest(t._x, t.getBounds(_root).yMin, false)) {
t.yspeed = t.yspeed * -1;
t.t = 0;
}
}
}
function movetanks(num) {
i = 0;
while (i < num) {
t = _root["tank" + i];
if (t.active) {
if (!t.frozen) {
if (walls.hitTest(t._x, t._y, true)) {
t.dammage = t.dammax * 2;
}
t.t++;
if (t.t > 6) {
blocktank(walls, t, 0);
blocktank(door0, t, 1);
blocktank(door1, t, 1);
blocktank(door2, t, 1);
blocktank(door3, t, 1);
blocktank(mineblock, t, 1);
blocktank(mineblock1, t, 1);
blocktank(mineblock2, t, 1);
blocktank(mineblock3, t, 1);
blocktank(pmblock, t, 1);
blocktank(pmblock1, t, 1);
}
if (menu.hitTest(t._x, t.getBounds(_root).yMin)) {
t.yspeed = t.yspeed * -1;
}
t.xdif = pieman._x - t._x;
t.ydif = pieman._y - t._y;
t.rot = (57.2957795130823 * Math.atan2(t.ydif, t.xdif)) + 90;
t.turret._rotation = t.rot - t._rotation;
t._x = t._x + t.xspeed;
t._y = t._y + t.yspeed;
t._rotation = (57.2957795130823 * Math.atan2(t.yspeed, t.xspeed)) + 90;
bound(3, t);
t.timer++;
if (t.timer > 80) {
shoot(t._x, t._y, t.rot, 4, 1);
t.timer = 0;
}
}
if (t.dammage > t.dammax) {
r4count++;
score = score + 40;
explode(t._x, t._y, 100, true);
removeMovieClip(t.healthbar);
t.gotoAndStop(2);
t.active = false;
po = 0;
while (po <= random(3)) {
powerup(t._x, t._y, 1);
po++;
}
po = 0;
while (po < 6) {
powerup(t._x, t._y, 3);
po++;
}
}
barge(t);
movehealthbar(t);
wallblock(t);
shootrobots(t);
removercmine(t);
}
i++;
}
}
function createpies(num) {
i = 0;
while (i < num) {
p = _root["pie" + i];
p.xdif = 0;
p.ydif = 0;
p.dis = 0;
p.active = true;
i++;
}
}
function movepies(num) {
i = 0;
while (i < num) {
p = _root["pie" + i];
if (p.active) {
p.xdif = pieman._x - p._x;
p.ydif = pieman._y - p._y;
p.dis = Math.sqrt((p.xdif * p.xdif) + (p.ydif * p.ydif));
if (p.dis < 30) {
p.gotoAndPlay(2);
menu.cpoints = menu.cpoints + 10;
score = score + 10;
p.active = false;
menu.gotpie++;
if (menu.healthbar._xscale <= (healthlevels[healthlevel] - 5)) {
menu.healthbar._xscale = menu.healthbar._xscale + 5;
} else {
menu.healthbar._xscale = healthlevels[healthlevel];
}
}
}
i++;
}
}
function createboss1() {
boss.gun1 = true;
boss.gun1t = 0;
boss.gun2 = true;
boss.gun2t = 0;
boss.gun3 = true;
boss.gun3t = 0;
boss.gun4 = true;
boss.gun4t = 0;
boss.dx = 0;
boss.dy = 0;
boss.active = true;
boss.dammage = 0;
boss.dammax = 100;
boss.angle = 0;
boss.dis = 0;
boss.rotspeed = 5;
createhealthbar(boss);
boss.phase = 1;
boss.endtimer = 0;
boss.core1 = true;
boss.core2 = true;
boss.core3 = true;
boss.core4 = true;
boss.stage = 1;
boss.endrot = 0;
boss.dead = false;
}
function moveboss1() {
movehealthbar(boss);
if (boss.phase == 1) {
blockammo1(boss);
boss.turret.gotoAndStop(1);
if (boss.stage == 1) {
boss._rotation = boss._rotation + 3;
}
if (boss.stage == 2) {
boss._rotation = boss._rotation - 3;
boss.dammage = 25;
}
if (boss.stage == 3) {
boss.dammage = 50;
boss.angle = boss.angle + (boss.rotspeed / 5);
boss._rotation = 180 * Math.sin(0.0174 * boss.angle);
}
if (boss.stage == 4) {
boss._rotation = boss._rotation + 20;
boss.dammage = 75;
}
if (boss.phase == 5) {
explode((boss._x + random(100)) - 50, (boss._y + random(100)) - 50, random(50) + 20, true);
}
}
boss.dx = pieman._x - boss._x;
boss.dy = pieman._y - boss._y;
boss.dis = Math.sqrt((boss.dx * boss.dx) + (boss.dy * boss.dy));
if (boss.dis < 100) {
if (!boss.dead) {
menu.healthbar._xscale = menu.healthbar._xscale - 5;
}
}
boss.pierot1 = (57.2957795130823 * Math.atan2(boss.dy, boss.dx)) + 90;
boss.pierot2 = (57.2957795130823 * Math.atan2(boss.dy, boss.dx)) + 90;
boss.pierot3 = (57.2957795130823 * Math.atan2(boss.dy, boss.dx)) + 90;
boss.pierot4 = (57.2957795130823 * Math.atan2(boss.dy, boss.dx)) + 90;
boss.gun1t++;
boss.gun2t++;
boss.gun3t++;
boss.gun4t++;
if (boss.gun1) {
boss.turret.g1c.gotoAndStop(1);
if (boss.gun1t > 1) {
if (boss.turret.gun1s.hitTest(pieman._x, pieman._y, true)) {
if ((boss.stage == 1) || (boss.stage == 2)) {
shoot(boss._x + (Math.sin(0.0174 * boss.pierot1) * 140), boss._y - (Math.cos(0.0174 * boss.pierot1) * 140), boss.pierot1, 3, 1);
} else {
shoot(boss._x + (Math.sin(0.0174 * boss.pierot1) * 140), boss._y - (Math.cos(0.0174 * boss.pierot1) * 140), boss.pierot1, 4, 1);
}
boss.gun1t = 0;
}
}
} else {
boss.turret.g1c.gotoAndStop(2);
}
if (boss.gun2) {
boss.turret.g2c.gotoAndStop(1);
if (boss.gun2t > 2) {
if (boss.turret.gun2s.hitTest(pieman._x, pieman._y, true)) {
if (boss.stage == 1) {
shoot(boss._x + (Math.sin(0.0174 * boss.pierot2) * 140), boss._y - (Math.cos(0.0174 * boss.pierot2) * 140), boss.pierot2, 3, 1);
} else {
shoot(boss._x + (Math.sin(0.0174 * boss.pierot2) * 140), boss._y - (Math.cos(0.0174 * boss.pierot2) * 140), boss.pierot2, 4, 1);
}
boss.gun2t = 0;
}
}
} else {
boss.turret.g2c.gotoAndStop(2);
}
if (boss.gun3) {
boss.turret.g3c.gotoAndStop(1);
if (boss.gun3t > 1) {
if (boss.turret.gun3s.hitTest(pieman._x, pieman._y, true)) {
if ((boss.stage == 1) || (boss.stage == 2)) {
shoot(boss._x + (Math.sin(0.0174 * boss.pierot3) * 140), boss._y - (Math.cos(0.0174 * boss.pierot3) * 140), boss.pierot3, 3, 1);
} else {
shoot(boss._x + (Math.sin(0.0174 * boss.pierot3) * 140), boss._y - (Math.cos(0.0174 * boss.pierot3) * 140), boss.pierot3, 4, 1);
}
boss.gun3t = 0;
}
}
} else {
boss.turret.g3c.gotoAndStop(2);
}
if (boss.gun4) {
boss.turret.g4c.gotoAndStop(1);
if (boss.gun4t > 2) {
if (boss.turret.gun4s.hitTest(pieman._x, pieman._y, true)) {
if (boss.stage == 1) {
shoot(boss._x + (Math.sin(0.0174 * boss.pierot4) * 140), boss._y - (Math.cos(0.0174 * boss.pierot4) * 140), boss.pierot4, 3, 1);
} else {
shoot(boss._x + (Math.sin(0.0174 * boss.pierot4) * 140), boss._y - (Math.cos(0.0174 * boss.pierot4) * 140), boss.pierot4, 4, 1);
}
boss.gun4t = 0;
}
}
} else {
boss.turret.g4c.gotoAndStop(2);
}
if (pieman.hitTest(bswitch1)) {
bswitch1.gotoAndStop(2);
}
if (bswitch1._currentframe == 1) {
boss.gun1 = true;
} else {
boss.gun1 = false;
bswitch1.gotoAndStop(2);
}
if (pieman.hitTest(bswitch2)) {
bswitch2.gotoAndStop(2);
}
if (bswitch2._currentframe == 1) {
boss.gun2 = true;
} else {
boss.gun2 = false;
bswitch2.gotoAndStop(2);
}
if (pieman.hitTest(bswitch3)) {
bswitch3.gotoAndStop(2);
}
if (bswitch3._currentframe == 1) {
boss.gun3 = true;
} else {
boss.gun3 = false;
bswitch3.gotoAndStop(2);
}
if (pieman.hitTest(bswitch4)) {
bswitch4.gotoAndStop(2);
}
if (bswitch4._currentframe == 1) {
boss.gun4 = true;
} else {
boss.gun4 = false;
bswitch4.gotoAndStop(2);
}
if (!boss.gun1) {
if (!boss.gun2) {
if (!boss.gun3) {
if (!boss.gun4) {
if (boss.active) {
if (boss.phase == 1) {
if (boss.core4) {
boss.phase = 5;
explode(boss._x, boss._y, 200, true);
}
if (boss.core3) {
boss.phase = 4;
explode(boss._x, boss._y, 200, true);
}
if (boss.core2) {
boss.phase = 3;
explode(boss._x, boss._y, 200, true);
}
if (boss.core1) {
boss.phase = 2;
explode(boss._x, boss._y, 200, true);
}
}
}
}
}
}
}
if (boss.phase == 2) {
boss.stage = 2;
boss.turret.gotoAndStop(2);
shootcore(boss.turret.core1);
if (boss.turret.core1._xscale < 10) {
explode(boss._x, boss._y, 200, true);
boss.phase = 1;
boss.core1 = false;
bswitch1.gotoAndStop(1);
bswitch2.gotoAndStop(1);
bswitch3.gotoAndStop(1);
bswitch4.gotoAndStop(1);
}
}
if (boss.phase == 3) {
boss.stage = 3;
boss.turret.gotoAndStop(3);
walls.gotoAndPlay(2);
shootcore(boss.turret.core2);
if (boss.turret.core2._xscale < 10) {
explode(boss._x, boss._y, 200, true);
boss.phase = 1;
boss.core2 = false;
bswitch1.gotoAndStop(1);
bswitch2.gotoAndStop(1);
bswitch3.gotoAndStop(1);
bswitch4.gotoAndStop(1);
}
}
if (boss.phase == 4) {
boss.stage = 4;
boss.turret.gotoAndStop(4);
shootcore(boss.turret.core3);
if (boss.turret.core3._xscale < 10) {
explode(boss._x, boss._y, 200, true);
boss.phase = 1;
boss.core3 = false;
bswitch1.gotoAndStop(1);
bswitch2.gotoAndStop(1);
bswitch3.gotoAndStop(1);
bswitch4.gotoAndStop(1);
}
}
if (boss.phase == 5) {
boss.turret.gotoAndStop(5);
shootcore(boss.turret.core4);
if (boss.turret.core4._xscale < 10) {
explode(boss._x, boss._y, 200, true);
boss.phase = 6;
boss.core4 = false;
bswitch1.gotoAndStop(1);
bswitch2.gotoAndStop(1);
bswitch3.gotoAndStop(1);
bswitch4.gotoAndStop(1);
}
}
if (boss.phase == 6) {
if (!boss.dead) {
boss.endtimer++;
boss.endrot = boss.endrot + 0.2;
boss._x = boss._x + ((Math.random() * 5) - 2.5);
boss._y = boss._y + ((Math.random() * 5) - 2.5);
boss._rotation = boss._rotation + boss.endrot;
explode((boss._x + random(200)) - 100, (boss._y + random(200)) - 100, random(60), true);
bswitch1.gotoAndStop(2);
bswitch2.gotoAndStop(2);
bswitch3.gotoAndStop(2);
bswitch4.gotoAndStop(2);
boss.dammage = 100;
if (boss.endtimer > 100) {
boss.dead = true;
explode(boss._x, boss._y, 200, true);
boss.gotoAndStop(2);
menu.cpoints = menu.cpoints + 500;
score = score + 1000;
}
}
}
}
function shootcore(l) {
j = 0;
while (j <= ammo.length) {
a = ammo[j];
if (l.hitTest(a._x, a._y, true)) {
if (a.type == 1) {
l._xscale = l._xscale - 0.5;
l._yscale = l._yscale - 0.5;
}
if (a.type == 2) {
l._xscale = l._xscale - 0.7;
l._yscale = l._yscale - 0.7;
}
if (a.type == 3) {
explode(a._x, a._y, 30, true);
l._xscale = l._xscale - 10;
l._yscale = l._yscale - 10;
}
if (a.type == 4) {
explode(a._x, a._y, 55, true);
l._xscale = l._xscale - 15;
l._yscale = l._yscale - 15;
}
if (a.type == 5) {
timestop(a._x, a._y);
}
removeMovieClip(a);
ammo.splice(j, 1);
}
j++;
}
}
function blockammo1(l) {
j = 0;
while (j <= ammo.length) {
a = ammo[j];
if (a.who == 0) {
if (l.hitTest(a._x, a._y, true)) {
if (a.type == 3) {
explode(a._x, a._y, 30, true);
}
if (a.type == 4) {
explode(a._x, a._y, 55, true);
}
if (a.type == 5) {
timestop(a._x, a._y);
}
removeMovieClip(a);
ammo.splice(j, 1);
}
}
j++;
}
}
function __rankz_send__(par1, par2, par3, par4) {
par227 = new LoadVars();
par228 = new LoadVars();
par227.flashkey = par2;
par227.SU0249 = par1;
par227.bmFtZTE = ab3.rankz.Armor_Bot_30_En_AS1.Encode(par3);
par227.c2NvcmUx = ab3.rankz.Armor_Bot_30_En_AS1.Encode(par4 + "j%e%a%n%s");
par227.flashkey = par227.flashkey.split("=").join("");
par227.SU0249 = par227.SU0249.split("=").join("");
par228.onLoad = function (success) {
if (success) {
trace(par228.msg);
hsloader.gotoAndStop(41);
} else {
trace(par228.loaded);
}
};
par227.sendAndLoad("http://rankz.armorbot.com/submit/", par228, "POST");
}
function makevars1(pies) {
pieman.xpos = pieman._x;
pieman.ypos = pieman._y;
pieman.speed = 5;
pieman.accel = 7;
pieman.dx = 0;
pieman.dy = 0;
pieman.wtype = 1;
pieman.wtimer = 0;
pieman.xdif = 0;
pieman.ydif = 0;
pieman.dis = 0;
menu.gotpie = 0;
menu.totpie = pies;
menu.cpoints = 0;
pieman.fullhealth = true;
pieman.fullammo = true;
ammo = new Array();
explodes = new Array();
timestops = new Array();
splinters = new Array();
powerups = new Array();
pressed = false;
menuweapon = 0;
comp = false;
pieman.active = true;
rcmine.active = 0;
rcmine.xspeed = 0;
rcmine.yspeed = 0;
healthpercent = 0;
piebarframe = 0;
menu.healthbar._xscale = 100;
pieman.done = false;
pieman.dead = false;
culeveltimer = 0;
assammos = new Array(0, 99, 800, 25, 10, 1);
}
function movepieman2() {
if (_currentframe == 34) {
blockammo(menu);
endtimer = endtimer + 0.0416666666666667;
endtimer1 = int(endtimer * 100) / 100;
if (pieman.active) {
healthpercent = menu.healthbar._xscale / 100;
piebarframe = 81 * healthpercent;
menu.piebar.gotoAndStop(Math.round(piebarframe));
wallblock(pmblock);
wallblock(pmblock1);
wallblock(pmblock3);
wallblock(pmblock2);
wallblock(menu);
if (pieman._x > 700) {
pieman._x = 700;
pieman.xpos = pieman.xpos - pieman.accel;
}
if (pieman._x < 0) {
pieman._x = 0;
pieman.xpos = pieman.xpos + pieman.accel;
}
if (pieman._y < 0) {
pieman._y = 0;
pieman.ypos = pieman.ypos + pieman.accel;
}
if (pieman._y > 500) {
pieman._y = 500;
pieman.ypos = pieman.ypos - pieman.accel;
}
pieman.xdif = cursor._x - pieman.dx;
pieman.ydif = cursor._y - pieman.dy;
if (menu.gotpie == menu.totpie) {
portal.gotoAndStop(2);
}
if (pieman._currentframe == 19) {
comp = true;
}
if (pieman._currentframe == 20) {
points = points + menu.cpoints;
if (level == clevel) {
level++;
}
if (level == 21) {
if (!gamecomplete) {
gotoAndStop (29);
} else {
gotoAndStop (6);
}
} else {
gotoAndStop (6);
}
removestuff();
}
if (portal._currentframe == 2) {
if (portal.hitTest(pieman._x, pieman._y, true)) {
if (pieman._currentframe == 1) {
complevels++;
leveltimer = leveltimer + culeveltimer;
if ((60 - Math.round(culeveltimer / 24)) > 0) {
menu.cpoints = menu.cpoints + (60 - Math.round(culeveltimer / 24));
}
if ((60 - Math.round(culeveltimer / 24)) > 0) {
score = score + (60 - Math.round(culeveltimer / 24));
}
menu.cpoints = menu.cpoints + ((_currentframe - 7) * 10);
score = score + ((_currentframe - 7) * 10);
pieman.gotoAndPlay(2);
pieman.done = true;
}
}
}
if (menu.healthbar._xscale == healthlevels[healthlevel]) {
pieman.fullhealth = true;
} else {
pieman.fullhealth = false;
}
if (menu.reloadbar._xscale == 100) {
pieman.fullammo = true;
} else {
pieman.fullammo = false;
}
pieman.dis = Math.sqrt((pieman.xdif * pieman.xdif) + (pieman.ydif * pieman.ydif));
if (pieman.dis > 22) {
pieman._rotation = (57.2957795130823 * Math.atan2(pieman.ydif, pieman.xdif)) + 90;
}
if (!pieman.done) {
if (!pieman.dead) {
pieman._x = pieman._x + ((pieman.xpos - pieman._x) / pieman.speed);
pieman._y = pieman._y + ((pieman.ypos - pieman._y) / pieman.speed);
}
} else {
pieman._x = pieman._x + ((portal._x - pieman._x) / pieman.speed);
pieman._y = pieman._y + ((portal._y - pieman._y) / pieman.speed);
}
if (Key.isDown(87) || (Key.isDown(38))) {
pieman.ypos = pieman.ypos - pieman.accel;
}
if (Key.isDown(83) || (Key.isDown(40))) {
pieman.ypos = pieman.ypos + pieman.accel;
}
if (Key.isDown(68) || (Key.isDown(39))) {
pieman.xpos = pieman.xpos + pieman.accel;
}
if (Key.isDown(65) || (Key.isDown(37))) {
pieman.xpos = pieman.xpos - pieman.accel;
}
if (pieman.wtimer > 5) {
if (Key.isDown(81) || (Key.isDown(46))) {
pieman.dots.gotoAndPlay(2);
if (pieman.wtype >= 2) {
pieman.wtype--;
pieman.wtimer = 0;
menu.reloadbar._xscale = 0;
}
}
if (Key.isDown(69) || (Key.isDown(34))) {
pieman.dots.gotoAndPlay(2);
if (pieman.wtype <= 4) {
pieman.wtype++;
pieman.wtimer = 0;
menu.reloadbar._xscale = 0;
}
}
}
menu.cammo = cammos[pieman.wtype];
pieman.wtimer++;
pieman.dx = pieman._x + (Math.sin(0.0174 * (pieman._rotation + 60)) * 22);
pieman.dy = pieman._y - (Math.cos(0.0174 * (pieman._rotation + 60)) * 22);
}
i = 0;
while (i <= ammo.length) {
l = ammo[i];
if (pieman.hitTest(l._x, l._y, true)) {
if (l.who == 1) {
if (l.type == 1) {
menu.healthbar._xscale = menu.healthbar._xscale - 0.7;
}
if (l.type == 2) {
menu.healthbar._xscale = menu.healthbar._xscale - 0.4;
}
if (l.type == 3) {
explode(l._x, l._y, 30, true);
menu.healthbar._xscale = menu.healthbar._xscale - 20;
}
if (l.type == 4) {
explode(l._x, l._y, 55, true);
menu.healthbar._xscale = menu.healthbar._xscale - 35;
}
removeMovieClip(l);
ammo.splice(i, 1);
}
}
i++;
}
checkpress();
movebase();
if (menu.healthbar._xscale <= 0) {
if (!pieman.dead) {
deaths++;
pieman.dead = true;
pieman.gotoAndPlay(21);
}
}
if (pieman.dead) {
comp = true;
}
if (pieman._currentframe == 40) {
removestuff();
removearray(hovs);
gotoAndStop (33);
}
}
}
function createhov(x, y, type, xspeed, yspeed) {
if (_currentframe == 34) {
d = _root.getNextHighestDepth();
attachMovie("hov", "hov" + d, d);
hov = _root["hov" + d];
hov._x = x;
hov._y = y;
hov.xspeed = xspeed;
hov.yspeed = yspeed;
hovs.push(hov);
hov.timer = 0;
hov.type = type;
}
}
function movehovs() {
i = 0;
while (i <= hovs.length) {
hov = hovs[i];
hov._x = hov._x + hov.xspeed;
hov._y = hov._y - hov.yspeed;
hov.dx = pieman._x - hov._x;
hov.dy = pieman._y - hov._y;
hov.timer++;
wallblock(hov);
if (hov.timer > 70) {
shoot(hov._x, hov._y, hov._rotation, hov.type, 1);
hov.timer = 0;
}
hov._rotation = (57.2957795130823 * Math.atan2(hov.dy, hov.dx)) + 90;
if ((((hov._x > 700) || (hov._x < 0)) || (hov._y > 500)) || (hov._y < 54)) {
removeMovieClip(hov);
hovs.splice(i, 1);
}
i++;
}
}
function createtarget(x, y, xspeed, yspeed) {
d = _root.getNextHighestDepth();
attachMovie("target", "target" + d, d);
tar = _root["target" + d];
tar._x = x;
tar._y = y;
tar.xspeed = xspeed;
tar.yspeed = yspeed;
targets.push(tar);
tar.dammage = 0;
tar.dammax = 10;
tar.chooser = random(25);
if (tar.chooser == 0) {
tar.type = 2;
tar._xscale = (tar._yscale = random(10) + 50);
} else if (tar.chooser == 1) {
tar.type = 3;
tar._xscale = (tar._yscale = random(10) + 50);
} else if (tar.chooser == 2) {
tar.type = 4;
tar._xscale = (tar._yscale = random(10) + 50);
} else {
tar.type = 1;
tar._xscale = (tar._yscale = random(50) + 50);
}
tar.gotoAndStop(tar.type);
}
function movetargets() {
i = 0;
while (i <= targets.length) {
tar = targets[i];
tar._x = tar._x + tar.xspeed;
tar._y = tar._y + tar.yspeed;
wallblock(tar);
if ((((tar._x > 700) || (tar._x < 0)) || (tar._y > 500)) || (tar._y < 54)) {
removeMovieClip(tar);
targets.splice(i, 1);
}
ti = 0;
while (ti <= timestops.length) {
t = timestops[ti];
if (t.hitTest(tar._x, tar._y, true)) {
tar.xspeed = 0;
tar.yspeed = 0;
}
ti++;
}
a = 0;
while (a <= ammo.length) {
l = ammo[a];
if (tar.hitTest(l._x, l._y, true)) {
if (l.type == 3) {
explode(l._x, l._y, 30, false);
tarsmash();
ammo.splice(a, 1);
removeMovieClip(l);
skillscore = skillscore + (200 - tar._xscale);
if (tar.type == 2) {
skilltimer = skilltimer + 10;
}
if (tar.type == 3) {
j = 0;
while (j < 360) {
shoot(tar._x, tar._y, j, 3, 0);
j = j + 20;
}
}
if (tar.type == 4) {
timestop(tar._x, tar._y);
}
targets.splice(i, 1);
removeMovieClip(tar);
}
}
a++;
}
i++;
}
}
function movepieman3() {
if (_currentframe == 38) {
blockammo(menu);
if (pieman.active) {
healthpercent = menu.healthbar._xscale / 100;
piebarframe = 81 * healthpercent;
menu.piebar.gotoAndStop(Math.round(piebarframe));
wallblock(pmblock);
wallblock(pmblock1);
wallblock(pmblock3);
wallblock(pmblock2);
wallblock(menu);
if (pieman._x > 700) {
pieman._x = 700;
pieman.xpos = pieman.xpos - pieman.accel;
}
if (pieman._x < 0) {
pieman._x = 0;
pieman.xpos = pieman.xpos + pieman.accel;
}
if (pieman._y < 0) {
pieman._y = 0;
pieman.ypos = pieman.ypos + pieman.accel;
}
if (pieman._y > 500) {
pieman._y = 500;
pieman.ypos = pieman.ypos - pieman.accel;
}
pieman.xdif = cursor._x - pieman.dx;
pieman.ydif = cursor._y - pieman.dy;
if (menu.gotpie == menu.totpie) {
portal.gotoAndStop(2);
}
if (pieman._currentframe == 19) {
comp = true;
}
if (pieman._currentframe == 20) {
points = points + menu.cpoints;
if (level == clevel) {
level++;
}
if (level == 21) {
if (!gamecomplete) {
gotoAndStop (29);
} else {
gotoAndStop (6);
}
} else {
gotoAndStop (6);
}
removestuff();
}
if (portal._currentframe == 2) {
if (portal.hitTest(pieman._x, pieman._y, true)) {
if (pieman._currentframe == 1) {
complevels++;
leveltimer = leveltimer + culeveltimer;
if ((60 - Math.round(culeveltimer / 24)) > 0) {
menu.cpoints = menu.cpoints + (60 - Math.round(culeveltimer / 24));
}
if ((60 - Math.round(culeveltimer / 24)) > 0) {
score = score + (60 - Math.round(culeveltimer / 24));
}
menu.cpoints = menu.cpoints + ((_currentframe - 7) * 10);
score = score + ((_currentframe - 7) * 10);
pieman.gotoAndPlay(2);
pieman.done = true;
}
}
}
if (menu.healthbar._xscale == healthlevels[healthlevel]) {
pieman.fullhealth = true;
} else {
pieman.fullhealth = false;
}
if (menu.reloadbar._xscale == 100) {
pieman.fullammo = true;
} else {
pieman.fullammo = false;
}
pieman.dis = Math.sqrt((pieman.xdif * pieman.xdif) + (pieman.ydif * pieman.ydif));
if (pieman.dis > 22) {
pieman._rotation = (57.2957795130823 * Math.atan2(pieman.ydif, pieman.xdif)) + 90;
}
if (!pieman.done) {
if (!pieman.dead) {
pieman._x = pieman._x + ((pieman.xpos - pieman._x) / pieman.speed);
pieman._y = pieman._y + ((pieman.ypos - pieman._y) / pieman.speed);
}
} else {
pieman._x = pieman._x + ((portal._x - pieman._x) / pieman.speed);
pieman._y = pieman._y + ((portal._y - pieman._y) / pieman.speed);
}
if (Key.isDown(87) || (Key.isDown(38))) {
pieman.ypos = pieman.ypos - pieman.accel;
}
if (Key.isDown(83) || (Key.isDown(40))) {
pieman.ypos = pieman.ypos + pieman.accel;
}
if (Key.isDown(68) || (Key.isDown(39))) {
pieman.xpos = pieman.xpos + pieman.accel;
}
if (Key.isDown(65) || (Key.isDown(37))) {
pieman.xpos = pieman.xpos - pieman.accel;
}
pieman.wtype = 3;
menu.cammo = cammos[pieman.wtype];
pieman.wtimer++;
pieman.dx = pieman._x + (Math.sin(0.0174 * (pieman._rotation + 60)) * 22);
pieman.dy = pieman._y - (Math.cos(0.0174 * (pieman._rotation + 60)) * 22);
}
i = 0;
while (i <= ammo.length) {
l = ammo[i];
if (pieman.hitTest(l._x, l._y, true)) {
if (l.who == 1) {
if (l.type == 1) {
menu.healthbar._xscale = menu.healthbar._xscale - 0.7;
}
if (l.type == 2) {
menu.healthbar._xscale = menu.healthbar._xscale - 0.4;
}
if (l.type == 3) {
explode(l._x, l._y, 30, true);
menu.healthbar._xscale = menu.healthbar._xscale - 20;
}
if (l.type == 4) {
explode(l._x, l._y, 55, true);
menu.healthbar._xscale = menu.healthbar._xscale - 35;
}
removeMovieClip(l);
ammo.splice(i, 1);
}
}
i++;
}
checkpress();
movebase();
if (menu.healthbar._xscale <= 0) {
if (!pieman.dead) {
deaths++;
pieman.dead = true;
pieman.gotoAndPlay(21);
}
}
if (pieman.dead) {
comp = true;
}
if (pieman._currentframe == 40) {
removestuff();
removearray(targets);
gotoAndStop (37);
}
}
}
function moveammo2() {
i = 0;
while (i <= ammo.length) {
l = ammo[i];
if (l.type == 1) {
l._x = l._x + (l.xspeed * 5);
l._y = l._y - (l.yspeed * 5);
}
if (l.type == 2) {
l._x = l._x + (l.xspeed * 15);
l._y = l._y - (l.yspeed * 15);
}
if (l.type == 3) {
l._x = l._x + (l.xspeed * l.speed);
l._y = l._y - (l.yspeed * l.speed);
if (l.speed < 20) {
l.speed = l.speed + 0.7;
}
}
if (l.type == 4) {
l._x = l._x + (l.xspeed * l.speed);
l._y = l._y - (l.yspeed * l.speed);
if (l.speed < 30) {
l.speed = l.speed + 1;
}
}
if (l.type == 5) {
l._x = l._x + ((l.endx - l._x) / 10);
l._y = l._y + ((l.endy - l._y) / 10);
l._rotation = l._rotation + l.rotspeed;
l.rotspeed = l.rotspeed * 0.98;
l.timer++;
if (l.timer > 48) {
timestop(l._x, l._y);
removeMovieClip(l);
ammo.splice(i, 1);
}
}
i++;
}
i = 0;
while (i <= ammo.length) {
l = ammo[i];
if (bound(2, l)) {
removeMovieClip(l);
ammo.splice(i, 1);
}
i++;
}
i = 0;
while (i <= ammo.length) {
l = ammo[i];
if (walls.hitTest(l._x, l._y, true)) {
if (l.type == 3) {
explode(l._x, l._y, 30, true);
}
if (l.type == 4) {
explode(l._x, l._y, 100, true);
}
if (l.type == 5) {
timestop(l._x, l._y);
}
removeMovieClip(l);
ammo.splice(i, 1);
}
i++;
}
if (pieman.active) {
if (pressed) {
if (menu.reloadbar._xscale >= 100) {
bfired++;
shoot(pieman.dx, pieman.dy, pieman._rotation, pieman.wtype, 0);
menu.reloadbar._xscale = 0;
}
}
}
cammos[1] = 99;
menu.reloadbar._xscale = menu.reloadbar._xscale + reloads[pieman.wtype];
if (menu.reloadbar._xscale > 100) {
menu.reloadbar._xscale = 100;
}
}
function movepieman4() {
blockammo(menu);
if (pieman.active) {
healthpercent = menu.healthbar._xscale / 100;
piebarframe = 81 * healthpercent;
menu.piebar.gotoAndStop(Math.round(piebarframe));
wallblock(pmblock);
wallblock(pmblock1);
wallblock(pmblock3);
wallblock(pmblock2);
wallblock(menu);
if (pieman._x > 700) {
pieman._x = 700;
pieman.xpos = pieman.xpos - pieman.accel;
}
if (pieman._x < 0) {
pieman._x = 0;
pieman.xpos = pieman.xpos + pieman.accel;
}
if (pieman._y < 0) {
pieman._y = 0;
pieman.ypos = pieman.ypos + pieman.accel;
}
if (pieman._y > 500) {
pieman._y = 500;
pieman.ypos = pieman.ypos - pieman.accel;
}
pieman.xdif = cursor._x - pieman.dx;
pieman.ydif = cursor._y - pieman.dy;
if (menu.gotpie == menu.totpie) {
portal.gotoAndStop(2);
}
if (pieman._currentframe == 19) {
comp = true;
}
if (pieman._currentframe == 20) {
gotoAndStop (41);
removestuff();
}
if (portal._currentframe == 2) {
if (portal.hitTest(pieman._x, pieman._y, true)) {
if (pieman._currentframe == 1) {
pieman.gotoAndPlay(2);
pieman.done = true;
}
}
}
if (menu.healthbar._xscale == healthlevels[10]) {
pieman.fullhealth = true;
} else {
pieman.fullhealth = false;
}
if (menu.reloadbar._xscale == 100) {
pieman.fullammo = true;
} else {
pieman.fullammo = false;
}
pieman.dis = Math.sqrt((pieman.xdif * pieman.xdif) + (pieman.ydif * pieman.ydif));
if (pieman.dis > 22) {
pieman._rotation = (57.2957795130823 * Math.atan2(pieman.ydif, pieman.xdif)) + 90;
}
if (!pieman.done) {
if (!pieman.dead) {
pieman._x = pieman._x + ((pieman.xpos - pieman._x) / pieman.speed);
pieman._y = pieman._y + ((pieman.ypos - pieman._y) / pieman.speed);
}
} else {
pieman._x = pieman._x + ((portal._x - pieman._x) / pieman.speed);
pieman._y = pieman._y + ((portal._y - pieman._y) / pieman.speed);
}
if (Key.isDown(87) || (Key.isDown(38))) {
pieman.ypos = pieman.ypos - pieman.accel;
}
if (Key.isDown(83) || (Key.isDown(40))) {
pieman.ypos = pieman.ypos + pieman.accel;
}
if (Key.isDown(68) || (Key.isDown(39))) {
pieman.xpos = pieman.xpos + pieman.accel;
}
if (Key.isDown(65) || (Key.isDown(37))) {
pieman.xpos = pieman.xpos - pieman.accel;
}
if (pieman.wtimer > 5) {
if (Key.isDown(81) || (Key.isDown(46))) {
pieman.dots.gotoAndPlay(2);
if (pieman.wtype >= 2) {
pieman.wtype--;
pieman.wtimer = 0;
menu.reloadbar._xscale = 0;
}
}
if (Key.isDown(69) || (Key.isDown(34))) {
pieman.dots.gotoAndPlay(2);
if (pieman.wtype <= 4) {
pieman.wtype++;
pieman.wtimer = 0;
menu.reloadbar._xscale = 0;
}
}
}
menu.cammo = assammos[pieman.wtype];
pieman.wtimer++;
pieman.dx = pieman._x + (Math.sin(0.0174 * (pieman._rotation + 60)) * 22);
pieman.dy = pieman._y - (Math.cos(0.0174 * (pieman._rotation + 60)) * 22);
}
i = 0;
while (i <= ammo.length) {
l = ammo[i];
if (pieman.hitTest(l._x, l._y, true)) {
if (l.who == 1) {
if (l.type == 1) {
menu.healthbar._xscale = menu.healthbar._xscale - 0.7;
}
if (l.type == 2) {
menu.healthbar._xscale = menu.healthbar._xscale - 0.4;
}
if (l.type == 3) {
explode(l._x, l._y, 30, true);
menu.healthbar._xscale = menu.healthbar._xscale - 20;
}
if (l.type == 4) {
explode(l._x, l._y, 55, true);
menu.healthbar._xscale = menu.healthbar._xscale - 35;
}
removeMovieClip(l);
ammo.splice(i, 1);
}
}
i++;
}
checkpress();
movebase();
if (menu.healthbar._xscale <= 0) {
if (!pieman.dead) {
deaths++;
pieman.dead = true;
asstimer = 0;
asstimer1 = 0;
pieman.gotoAndPlay(21);
}
}
if (pieman.dead) {
comp = true;
}
if (pieman._currentframe == 40) {
removestuff();
gotoAndStop (41);
}
}
function moveammo3() {
i = 0;
while (i <= ammo.length) {
l = ammo[i];
if (l.type == 1) {
l._x = l._x + (l.xspeed * 5);
l._y = l._y - (l.yspeed * 5);
}
if (l.type == 2) {
l._x = l._x + (l.xspeed * 15);
l._y = l._y - (l.yspeed * 15);
}
if (l.type == 3) {
l._x = l._x + (l.xspeed * l.speed);
l._y = l._y - (l.yspeed * l.speed);
if (l.speed < 20) {
l.speed = l.speed + 0.7;
}
}
if (l.type == 4) {
l._x = l._x + (l.xspeed * l.speed);
l._y = l._y - (l.yspeed * l.speed);
if (l.speed < 30) {
l.speed = l.speed + 1;
}
}
if (l.type == 5) {
l._x = l._x + ((l.endx - l._x) / 10);
l._y = l._y + ((l.endy - l._y) / 10);
l._rotation = l._rotation + l.rotspeed;
l.rotspeed = l.rotspeed * 0.98;
l.timer++;
if (l.timer > 48) {
timestop(l._x, l._y);
removeMovieClip(l);
ammo.splice(i, 1);
}
}
i++;
}
i = 0;
while (i <= ammo.length) {
l = ammo[i];
if (bound(2, l)) {
removeMovieClip(l);
ammo.splice(i, 1);
}
i++;
}
i = 0;
while (i <= ammo.length) {
l = ammo[i];
if (walls.hitTest(l._x, l._y, true)) {
if (l.type == 3) {
explode(l._x, l._y, 30, true);
}
if (l.type == 4) {
explode(l._x, l._y, 100, true);
}
if (l.type == 5) {
timestop(l._x, l._y);
}
removeMovieClip(l);
ammo.splice(i, 1);
}
i++;
}
if (pieman.active) {
if (pressed) {
if (menu.reloadbar._xscale >= 100) {
if (assammos[pieman.wtype] > 0) {
bfired++;
shoot(pieman.dx, pieman.dy, pieman._rotation, pieman.wtype, 0);
menu.reloadbar._xscale = 0;
assammos[pieman.wtype]--;
}
}
}
}
assammos[1] = 99;
menu.reloadbar._xscale = menu.reloadbar._xscale + reloads[pieman.wtype];
if (menu.reloadbar._xscale > 100) {
menu.reloadbar._xscale = 100;
}
}
function notactive(nn, n) {
a = false;
l = _root[nn + n];
a = l.active;
return(a);
}
function trainingcomplete(rname) {
if (trainlevel == 1) {
if (!notactive(rname, 0)) {
portal._x = 366;
}
}
if (trainlevel == 2) {
if (!notactive(rname, 0)) {
if (!notactive(rname, 1)) {
portal._x = 366;
}
}
}
if (trainlevel == 3) {
if (!notactive(rname, 0)) {
if (!notactive(rname, 1)) {
if (!notactive(rname, 2)) {
portal._x = 366;
}
}
}
}
if (trainlevel == 4) {
if (!notactive(rname, 0)) {
if (!notactive(rname, 1)) {
if (!notactive(rname, 2)) {
if (!notactive(rname, 3)) {
portal._x = 366;
}
}
}
}
}
if (trainlevel == 5) {
if (!notactive(rname, 0)) {
if (!notactive(rname, 1)) {
if (!notactive(rname, 2)) {
if (!notactive(rname, 3)) {
if (!notactive(rname, 4)) {
portal._x = 366;
}
}
}
}
}
}
if (trainlevel == 6) {
if (!notactive(rname, 0)) {
if (!notactive(rname, 1)) {
if (!notactive(rname, 2)) {
if (!notactive(rname, 3)) {
if (!notactive(rname, 4)) {
if (!notactive(rname, 5)) {
portal._x = 366;
}
}
}
}
}
}
}
if (trainlevel == 7) {
if (!notactive(rname, 0)) {
if (!notactive(rname, 1)) {
if (!notactive(rname, 2)) {
if (!notactive(rname, 3)) {
if (!notactive(rname, 4)) {
if (!notactive(rname, 5)) {
if (!notactive(rname, 6)) {
portal._x = 366;
}
}
}
}
}
}
}
}
if (trainlevel == 8) {
if (!notactive(rname, 0)) {
if (!notactive(rname, 1)) {
if (!notactive(rname, 2)) {
if (!notactive(rname, 3)) {
if (!notactive(rname, 4)) {
if (!notactive(rname, 5)) {
if (!notactive(rname, 6)) {
if (!notactive(rname, 7)) {
portal._x = 366;
}
}
}
}
}
}
}
}
}
if (trainlevel == 9) {
if (!notactive(rname, 0)) {
if (!notactive(rname, 1)) {
if (!notactive(rname, 2)) {
if (!notactive(rname, 3)) {
if (!notactive(rname, 4)) {
if (!notactive(rname, 5)) {
if (!notactive(rname, 6)) {
if (!notactive(rname, 7)) {
if (!notactive(rname, 8)) {
portal._x = 366;
}
}
}
}
}
}
}
}
}
}
if (trainlevel == 10) {
if (!notactive(rname, 0)) {
if (!notactive(rname, 1)) {
if (!notactive(rname, 2)) {
if (!notactive(rname, 3)) {
if (!notactive(rname, 4)) {
if (!notactive(rname, 5)) {
if (!notactive(rname, 6)) {
if (!notactive(rname, 7)) {
if (!notactive(rname, 8)) {
if (!notactive(rname, 9)) {
portal._x = 366;
}
}
}
}
}
}
}
}
}
}
}
}
function movepiemanmaze() {
blockammo(menu);
if (pieman.active) {
healthpercent = menu.healthbar._xscale / 100;
piebarframe = 81 * healthpercent;
menu.piebar.gotoAndStop(Math.round(piebarframe));
wallblock(pmblock);
wallblock(pmblock1);
wallblock(pmblock3);
wallblock(pmblock2);
wallblock(menu);
dirx = pieman._x - portal._x;
diry = pieman._y - portal._y;
dirang = 57.2957795130823 * Math.atan2(diry, dirx);
arrow._rotation = dirang - 180;
if (pieman._x > 700) {
pieman._x = 700;
pieman.xpos = pieman.xpos - pieman.accel;
}
if (pieman._x < 0) {
pieman._x = 0;
pieman.xpos = pieman.xpos + pieman.accel;
}
if (pieman._y < 0) {
pieman._y = 0;
pieman.ypos = pieman.ypos + pieman.accel;
}
if (pieman._y > 500) {
pieman._y = 500;
pieman.ypos = pieman.ypos - pieman.accel;
}
pieman.xdif = cursor._x - pieman.dx;
pieman.ydif = cursor._y - pieman.dy;
if (menu.gotpie == menu.totpie) {
portal.gotoAndStop(2);
}
if (pieman._currentframe == 19) {
comp = true;
}
if (pieman._currentframe == 20) {
gotoAndStop (41);
removestuff();
}
if (portal._currentframe == 2) {
if (portal.hitTest(pieman._x, pieman._y, true)) {
if (pieman._currentframe == 1) {
pieman.gotoAndPlay(2);
pieman.done = true;
}
}
}
if (menu.healthbar._xscale == healthlevels[10]) {
pieman.fullhealth = true;
} else {
pieman.fullhealth = false;
}
if (menu.reloadbar._xscale == 100) {
pieman.fullammo = true;
} else {
pieman.fullammo = false;
}
pieman.dis = Math.sqrt((pieman.xdif * pieman.xdif) + (pieman.ydif * pieman.ydif));
if (pieman.dis > 22) {
pieman._rotation = (57.2957795130823 * Math.atan2(pieman.ydif, pieman.xdif)) + 90;
}
if (!pieman.done) {
if (!pieman.dead) {
pieman._x = pieman._x + ((pieman.xpos - pieman._x) / pieman.speed);
pieman._y = pieman._y + ((pieman.ypos - pieman._y) / pieman.speed);
}
} else {
pieman._x = pieman._x + ((portal._x - pieman._x) / pieman.speed);
pieman._y = pieman._y + ((portal._y - pieman._y) / pieman.speed);
}
if (Key.isDown(87) || (Key.isDown(38))) {
pieman.ypos = pieman.ypos - pieman.accel;
}
if (Key.isDown(83) || (Key.isDown(40))) {
pieman.ypos = pieman.ypos + pieman.accel;
}
if (Key.isDown(68) || (Key.isDown(39))) {
pieman.xpos = pieman.xpos + pieman.accel;
}
if (Key.isDown(65) || (Key.isDown(37))) {
pieman.xpos = pieman.xpos - pieman.accel;
}
if (pieman.wtimer > 5) {
if (Key.isDown(81) || (Key.isDown(46))) {
pieman.dots.gotoAndPlay(2);
if (pieman.wtype >= 2) {
pieman.wtype--;
pieman.wtimer = 0;
menu.reloadbar._xscale = 0;
}
}
if (Key.isDown(69) || (Key.isDown(34))) {
pieman.dots.gotoAndPlay(2);
if (pieman.wtype <= 4) {
pieman.wtype++;
pieman.wtimer = 0;
menu.reloadbar._xscale = 0;
}
}
}
menu.cammo = assammos[pieman.wtype];
pieman.wtimer++;
pieman.dx = pieman._x + (Math.sin(0.0174 * (pieman._rotation + 60)) * 22);
pieman.dy = pieman._y - (Math.cos(0.0174 * (pieman._rotation + 60)) * 22);
}
i = 0;
while (i <= ammo.length) {
l = ammo[i];
if (pieman.hitTest(l._x, l._y, true)) {
if (l.who == 1) {
if (l.type == 1) {
menu.healthbar._xscale = menu.healthbar._xscale - 0.7;
}
if (l.type == 2) {
menu.healthbar._xscale = menu.healthbar._xscale - 0.4;
}
if (l.type == 3) {
explode(l._x, l._y, 30, true);
menu.healthbar._xscale = menu.healthbar._xscale - 20;
}
if (l.type == 4) {
explode(l._x, l._y, 55, true);
menu.healthbar._xscale = menu.healthbar._xscale - 35;
}
removeMovieClip(l);
ammo.splice(i, 1);
}
}
i++;
}
movebase();
if (menu.healthbar._xscale <= 0) {
if (!pieman.dead) {
deaths++;
pieman.dead = true;
pieman.gotoAndPlay(21);
}
}
if (pieman.dead) {
comp = true;
}
if (pieman._currentframe == 40) {
removestuff();
gotoAndStop (41);
}
arrow._x = pieman._x;
arrow._y = pieman._y;
}
start_btn.onRelease = function () {
gotoAndStop (32);
};
options_btn.onRelease = function () {
gotoAndStop (4);
};
ins_btn.onRelease = function () {
gotoAndStop (5);
};
creds_btn.onRelease = function () {
gotoAndStop (3);
};
click = new Sound();
click.attachSound("click");
deny = new Sound();
deny.attachSound("deny");
Frame 4
onEnterFrame = function () {
if (_root.cursorease >= 1) {
if (_root.cursorease <= 5) {
cursorease1 = _root.cursorease;
} else {
_root.cursorease = 5;
}
} else {
_root.cursorease = 1;
}
};
mute.onRelease = function () {
if (!_root.muted) {
_root.musicvol = 0;
_root.muted = true;
} else {
_root.musicvol = 100;
_root.muted = false;
}
};
Instance of Symbol 85 MovieClip in Frame 4
onClipEvent (enterFrame) {
if (_root._quality == "LOW") {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
on (release) {
_root._quality = "low";
_root.click.start();
}
Instance of Symbol 87 MovieClip in Frame 4
onClipEvent (enterFrame) {
if (_root._quality == "MEDIUM") {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
on (release) {
_root._quality = "medium";
_root.click.start();
}
Instance of Symbol 89 MovieClip in Frame 4
onClipEvent (enterFrame) {
if (_root._quality == "HIGH") {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
on (release) {
_root._quality = "high";
_root.click.start();
}
Instance of Symbol 108 MovieClip in Frame 4
onClipEvent (enterFrame) {
if (_root.gfps) {
this._x = _root.onb._x;
this._y = _root.onb._y;
} else {
this._x = _root.offb._x;
this._y = _root.offb._y;
}
}
Instance of Symbol 312 MovieClip in Frame 4
onClipEvent (enterFrame) {
this.gotoAndStop(_root.piemancolour);
}
Instance of Symbol 136 MovieClip in Frame 4
onClipEvent (load) {
if (_root.cheated) {
this._visible = true;
} else {
this._visible = false;
}
}
Frame 5
extimer = 0;
onEnterFrame = function () {
extimer++;
if (extimer > 15) {
extex = "";
}
};
Instance of Symbol 317 MovieClip in Frame 5
onClipEvent (enterFrame) {
if (this.hitTest(_root.cursor._x, _root.cursor._y, true)) {
this.gotoAndStop(2);
_root.extex = "This is you. Move with asdw or the arrow keys, change weapons with q & e or pageup & pagedown. Press P to pause and click to shoot.";
_root.extimer = 0;
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 320 MovieClip in Frame 5
onClipEvent (enterFrame) {
if (this.hitTest(_root.cursor._x, _root.cursor._y, true)) {
this.gotoAndStop(2);
_root.extex = "This will stop remote mines going through it but you can.";
_root.extimer = 0;
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 323 MovieClip in Frame 5
onClipEvent (enterFrame) {
if (this.hitTest(_root.cursor._x, _root.cursor._y, true)) {
this.gotoAndStop(2);
_root.extex = "This will stop you going through it but nothing else.";
_root.extimer = 0;
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 326 MovieClip in Frame 5
onClipEvent (enterFrame) {
if (this.hitTest(_root.cursor._x, _root.cursor._y, true)) {
this.gotoAndStop(2);
_root.extex = "This is the base for the remote mine, move over it and hold down left click to activate the remote mine, release left click to de-activate it and release a cloud of red gas.";
_root.extimer = 0;
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 329 MovieClip in Frame 5
onClipEvent (enterFrame) {
if (this.hitTest(_root.cursor._x, _root.cursor._y, true)) {
this.gotoAndStop(2);
_root.extex = "This is the remote mine. Control it as you would yourself, it can flip switches. The red cloud of gas deactivates land mines.";
_root.extimer = 0;
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 332 MovieClip in Frame 5
onClipEvent (enterFrame) {
if (this.hitTest(_root.cursor._x, _root.cursor._y, true)) {
this.gotoAndStop(2);
_root.extex = "This is a switch, they open or close doors. Walk into them or move the remote mine into it to switch it.";
_root.extimer = 0;
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 335 MovieClip in Frame 5
onClipEvent (enterFrame) {
if (this.hitTest(_root.cursor._x, _root.cursor._y, true)) {
this.gotoAndStop(2);
_root.extex = "This is a door. Open it with a switch.";
_root.extimer = 0;
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 338 MovieClip in Frame 5
onClipEvent (enterFrame) {
if (this.hitTest(_root.cursor._x, _root.cursor._y, true)) {
this.gotoAndStop(2);
_root.extex = "This is a metal crate, it contains ammo for the guns you have bought. If you have not guns apart from the laser, it will give you health.";
_root.extimer = 0;
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 341 MovieClip in Frame 5
onClipEvent (enterFrame) {
if (this.hitTest(_root.cursor._x, _root.cursor._y, true)) {
this.gotoAndStop(2);
_root.extex = "This is a wooden crate, it contains health and other powerups. Shoot it to break it.";
_root.extimer = 0;
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 344 MovieClip in Frame 5
onClipEvent (enterFrame) {
if (this.hitTest(_root.cursor._x, _root.cursor._y, true)) {
this.gotoAndStop(2);
_root.extex = "This is a pie. Collect them all to open the portal to the next level, it will also give you health and 10 points";
_root.extimer = 0;
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 347 MovieClip in Frame 5
onClipEvent (enterFrame) {
if (this.hitTest(_root.cursor._x, _root.cursor._y, true)) {
this.gotoAndStop(2);
_root.extex = "The spinner robot. It will randomly spin round and fire missiles at you.";
_root.extimer = 0;
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 365 MovieClip in Frame 5
onClipEvent (enterFrame) {
if (this.hitTest(_root.cursor._x, _root.cursor._y, true)) {
this.gotoAndStop(2);
_root.extex = "This robot will chase you with giant saw blades if you get too near.";
_root.extimer = 0;
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 377 MovieClip in Frame 5
onClipEvent (enterFrame) {
if (this.hitTest(_root.cursor._x, _root.cursor._y, true)) {
this.gotoAndStop(2);
_root.extex = "This tank will fire rocket propelled grenades at you. It will move around and bounce off walls.";
_root.extimer = 0;
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 380 MovieClip in Frame 5
onClipEvent (enterFrame) {
if (this.hitTest(_root.cursor._x, _root.cursor._y, true)) {
this.gotoAndStop(2);
_root.extex = "This portal will open when you have all the pies in the level. Walk into it to end the level.";
_root.extimer = 0;
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 383 MovieClip in Frame 5
onClipEvent (enterFrame) {
if (this.hitTest(_root.cursor._x, _root.cursor._y, true)) {
this.gotoAndStop(2);
_root.extex = "If you walk into this mine it will explode. You can de-activate it by using the remote mine.";
_root.extimer = 0;
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 386 MovieClip in Frame 5
onClipEvent (enterFrame) {
if (this.hitTest(_root.cursor._x, _root.cursor._y, true)) {
this.gotoAndStop(2);
_root.extex = "This will give you health.";
_root.extimer = 0;
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 389 MovieClip in Frame 5
onClipEvent (enterFrame) {
if (this.hitTest(_root.cursor._x, _root.cursor._y, true)) {
this.gotoAndStop(2);
_root.extex = "This will instantly reload your current weapon.";
_root.extimer = 0;
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 392 MovieClip in Frame 5
onClipEvent (enterFrame) {
if (this.hitTest(_root.cursor._x, _root.cursor._y, true)) {
this.gotoAndStop(2);
_root.extex = "This will give you 20 points";
_root.extimer = 0;
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 395 MovieClip in Frame 5
onClipEvent (enterFrame) {
if (this.hitTest(_root.cursor._x, _root.cursor._y, true)) {
this.gotoAndStop(2);
_root.extex = "This will give you machine gun ammo. The machine gun does not need to reload and does quite a lot of damage.";
_root.extimer = 0;
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 398 MovieClip in Frame 5
onClipEvent (enterFrame) {
if (this.hitTest(_root.cursor._x, _root.cursor._y, true)) {
this.gotoAndStop(2);
_root.extex = "This will give you 10 missiles, fairly slow but powerful explosives.";
_root.extimer = 0;
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 401 MovieClip in Frame 5
onClipEvent (enterFrame) {
if (this.hitTest(_root.cursor._x, _root.cursor._y, true)) {
this.gotoAndStop(2);
_root.extex = "This will give you 1 E.M bomb. It will be planted where your cursor is. It de-activates all robots caught in its white fog.";
_root.extimer = 0;
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 404 MovieClip in Frame 5
onClipEvent (enterFrame) {
if (this.hitTest(_root.cursor._x, _root.cursor._y, true)) {
this.gotoAndStop(2);
_root.extex = "5 rocket propelled grenades from this. Fast high explosive.";
_root.extimer = 0;
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 407 MovieClip in Frame 5
onClipEvent (enterFrame) {
if (this.hitTest(_root.cursor._x, _root.cursor._y, true)) {
this.gotoAndStop(2);
_root.extex = "Shoots lasers at you if you get too close.";
_root.extimer = 0;
} else {
this.gotoAndStop(1);
}
}
Frame 6
if (level == 4) {
weaponage = "Machine gun available at shop";
} else if (level == 8) {
weaponage = "Rocket launcher available at shop";
} else if (level == 12) {
weaponage = "Rocket Propelled Grenade available at shop";
} else if (level == 16) {
weaponage = "Time-sphere gun available at shop";
} else {
weaponage = "";
}
cont.onRelease = function () {
if (level <= 20) {
gotoAndStop(level + 7);
} else {
gotoAndStop (27);
}
};
i = 1;
while (i <= 20) {
lb = _root["lb" + i];
lb.num = i;
if (i > level) {
lb.active = false;
lb.done = false;
lb.gotoAndStop(3);
}
if (i == level) {
lb.active = true;
lb.done = false;
}
if (i < level) {
lb.done = true;
lb.active = false;
lb.gotoAndStop(4);
}
i++;
}
onEnterFrame = function () {
if (Key.isDown(32)) {
_root.click.start();
if (level <= 20) {
gotoAndStop(level + 7);
} else {
gotoAndStop (27);
}
}
i = 1;
while (i <= 20) {
lb = _root["lb" + i];
if (lb.active) {
if (lb.hitTest(cursor._x, cursor._y, true)) {
lb.gotoAndStop(2);
} else {
lb.gotoAndStop(1);
}
}
if (lb.done) {
if (lb.hitTest(cursor._x, cursor._y, true)) {
lb.gotoAndStop(5);
} else {
lb.gotoAndStop(4);
}
}
i++;
}
ammo1d = cammos[1];
ammo2d = cammos[2];
ammo3d = cammos[3];
ammo4d = cammos[4];
ammo5d = cammos[5];
ammobutton(1, 1, 10, 100);
};
onMouseDown = function () {
i = 1;
while (i <= 20) {
lb = _root["lb" + i];
if (lb.hitTest(cursor._x, cursor._y, true)) {
_root.click.start();
if (lb.active) {
getpaid = true;
gotoAndStop(7 + i);
}
if (lb.done) {
getpaid = false;
gotoAndStop(7 + i);
}
}
i++;
}
};
Frame 7
function buygun(o, g) {
if (activeweapons[g] == false) {
if (availweapons[g]) {
if (o.hitTest(cursor._x, cursor._y, true)) {
o.gotoAndStop(2);
if (g == 2) {
outtext = "buy machine gun";
}
if (g == 3) {
outtext = "buy rocket launcher";
}
if (g == 4) {
outtext = "buy grenade launcher";
}
if (g == 5) {
outtext = "buy E.M bomb";
}
} else {
o.gotoAndStop(1);
}
} else {
o.gotoAndStop(3);
}
} else {
o.gotoAndStop(4);
}
_root[("w" + g) + "cost"] = costweapons[g];
}
function buygun2(o, g) {
if (o.hitTest(cursor._x, cursor._y, true)) {
if (availweapons[g] == true) {
if (activeweapons[g] == false) {
if ((points - costweapons[g]) >= 0) {
if (g == 2) {
outtext = "machine gun bought";
}
if (g == 3) {
outtext = "rocket launcher bought";
}
if (g == 4) {
outtext = "grenade launcher bought";
}
if (g == 5) {
outtext = "E.M bomb bought";
}
points = points - costweapons[g];
activeweapons[g] = true;
} else {
outtext = "not enough points";
}
} else {
if (g == 2) {
outtext = "machine gun already bought";
}
if (g == 3) {
outtext = "rocket launcher already bought";
}
if (g == 4) {
outtext = "grenade launcher already bought";
}
if (g == 5) {
outtext = "E.M bomb already bought";
}
}
} else {
if (g == 2) {
outtext = "machine gun not available yet";
}
if (g == 3) {
outtext = "rocket launcher not available yet";
}
if (g == 4) {
outtext = "grenade launcher not available yet";
}
if (g == 5) {
outtext = "E.M bomb not available yet";
}
}
}
}
speedup.active = true;
healthup.active = true;
speedtimer = 0;
healthtimer = 0;
shop._x = 344.4;
shopx = shop._x;
onMouseDown = function () {
buygun2(w2button, 2);
buygun2(w3button, 3);
buygun2(w4button, 4);
buygun2(w5button, 5);
};
onEnterFrame = function () {
buygun(w2button, 2);
buygun(w3button, 3);
buygun(w4button, 4);
buygun(w5button, 5);
speedtimer++;
healthtimer++;
if (activeweapons[2] == true) {
mgbullets = cammos[2];
}
if (activeweapons[3] == true) {
rlbullets = cammos[3];
}
if (activeweapons[4] == true) {
rpgbullets = cammos[4];
}
if (activeweapons[5] == true) {
embullets = cammos[5];
}
if (level >= 4) {
availweapons[2] = true;
}
if (level >= 8) {
availweapons[3] = true;
}
if (level >= 12) {
availweapons[4] = true;
}
if (level >= 16) {
availweapons[5] = true;
}
shop._x = shop._x + ((shopx - shop._x) / 2);
};
Frame 8
numlevel = _currentframe - 7;
numpies = 6;
numlasers = 10;
numspinners = 10;
numrobots = 10;
numtanks = 10;
numcrates = 10;
nummines = 10;
nummcrates = 10;
makesounds();
createspinners(numspinners);
createlasers(numlasers);
createmines(nummines);
createcrates(numcrates);
createmcrates(nummcrates);
createtanks(numtanks);
createrobots(numrobots);
makevars(numpies);
createpies(numpies);
onEnterFrame = function () {
pausegame();
if (!gamepaused) {
movepieman(numlevel);
movepies(numpies);
doorswitch(0);
doorswitch(1);
moveexplodes();
wallblock(walls);
movecrates(numcrates);
movemcrates(nummcrates);
movepowerups();
movelasers(numlasers);
movetanks(numtanks);
moverobots(numrobots);
movemines(nummines);
movespinners(numspinners);
movesplinter();
moveammo();
distext(tut1, "Move with the arrow keys or the ASDW keys. Change weapons with delete and page down, or Q and E. Shoot by holding left click down. Press P to pause. Press SPACE to skip this tutorial.");
distext(tut2, "Collect all the pies in the level to open the portal.");
distext(tut3, "Shoot crates to break them, they contain powerups. The cross (+) heals health, the circle (o) reloads instantly, and the dollar ($) gives you points.");
distext(tut4, "Flip switches to open doors, you can't go through the red laser fence so control the remote mine to flip the switch. To control it, move over it and hold down left click, move it with the arrow keys of ASDW.");
distext(tut5, "The red cloud from remote mines can be used to disable land mines, let go of the left mouse button to make a red cloud, if it touches any land mines, they will be disabled and turn red.");
distext(tut6, "You can also run into switches to open doors.");
distext(tut7, "Shoot metal crates to get ammo, although your laser is unlimited so you don't need any ammo right now.");
distext(tut8, "Shoot robots to kill them, hover your cursor over them to see a healthbar.");
distext(tut9, "Move into the portal to finish the level.");
if (Key.isDown(32)) {
pieman._x = portal._x;
pieman._y = portal._y;
menu.gotpie = 6;
}
}
};
Frame 9
numlevel = _currentframe - 7;
numpies = 5;
numlasers = 10;
numspinners = 10;
numrobots = 10;
numtanks = 10;
numcrates = 10;
nummines = 10;
nummcrates = 10;
makesounds();
createspinners(numspinners);
createlasers(numlasers);
createmines(nummines);
createcrates(numcrates);
createmcrates(nummcrates);
createtanks(numtanks);
createrobots(numrobots);
makevars(numpies);
createpies(numpies);
onEnterFrame = function () {
pausegame();
if (!gamepaused) {
movepieman(numlevel);
movepies(numpies);
doorswitch(0);
doorswitch(1);
moveexplodes();
wallblock(walls);
movecrates(numcrates);
movemcrates(nummcrates);
movepowerups();
movelasers(numlasers);
movetanks(numtanks);
moverobots(numrobots);
movemines(nummines);
movespinners(numspinners);
movesplinter();
moveammo();
}
};
Frame 10
numlevel = _currentframe - 7;
numpies = 4;
numlasers = 10;
numspinners = 10;
numrobots = 10;
numtanks = 10;
numcrates = 10;
nummines = 10;
nummcrates = 10;
makesounds();
createspinners(numspinners);
createlasers(numlasers);
createmines(nummines);
createcrates(numcrates);
createmcrates(nummcrates);
createtanks(numtanks);
createrobots(numrobots);
makevars(numpies);
createpies(numpies);
onEnterFrame = function () {
pausegame();
if (!gamepaused) {
movepieman(numlevel);
movepies(numpies);
doorswitch(0);
doorswitch(1);
doorswitch(2);
moveexplodes();
wallblock(walls);
movecrates(numcrates);
movemcrates(nummcrates);
movepowerups();
movelasers(numlasers);
movetanks(numtanks);
moverobots(numrobots);
movemines(nummines);
movespinners(numspinners);
movesplinter();
moveammo();
}
};
Frame 11
numlevel = _currentframe - 7;
numpies = 10;
numlasers = 10;
numspinners = 10;
numrobots = 10;
numtanks = 10;
numcrates = 10;
nummines = 10;
nummcrates = 10;
makesounds();
createspinners(numspinners);
createlasers(numlasers);
createmines(nummines);
createcrates(numcrates);
createmcrates(nummcrates);
createtanks(numtanks);
createrobots(numrobots);
makevars(numpies);
createpies(numpies);
onEnterFrame = function () {
pausegame();
if (!gamepaused) {
movepieman(numlevel);
movepies(numpies);
doorswitch(0);
doorswitch(1);
moveexplodes();
wallblock(walls);
movecrates(numcrates);
movemcrates(nummcrates);
movepowerups();
movelasers(numlasers);
movetanks(numtanks);
moverobots(numrobots);
movemines(nummines);
movespinners(numspinners);
movesplinter();
moveammo();
}
};
Frame 12
numlevel = _currentframe - 7;
numpies = 6;
numlasers = 10;
numspinners = 10;
numrobots = 10;
numtanks = 10;
numcrates = 10;
nummines = 10;
nummcrates = 10;
makesounds();
createspinners(numspinners);
createlasers(numlasers);
createmines(nummines);
createcrates(numcrates);
createmcrates(nummcrates);
createtanks(numtanks);
createrobots(numrobots);
makevars(numpies);
createpies(numpies);
onEnterFrame = function () {
pausegame();
if (!gamepaused) {
movepieman(numlevel);
movepies(numpies);
doorswitch(0);
doorswitch(1);
doorswitch(2);
doorswitch(3);
moveexplodes();
wallblock(walls);
movecrates(numcrates);
movemcrates(nummcrates);
movepowerups();
movelasers(numlasers);
movetanks(numtanks);
moverobots(numrobots);
movemines(nummines);
movespinners(numspinners);
movesplinter();
moveammo();
}
};
Frame 13
numlevel = _currentframe - 7;
numpies = 4;
numlasers = 10;
numspinners = 10;
numrobots = 10;
numtanks = 10;
numcrates = 10;
nummines = 10;
nummcrates = 10;
makesounds();
createspinners(numspinners);
createlasers(numlasers);
createmines(nummines);
createcrates(numcrates);
createmcrates(nummcrates);
createtanks(numtanks);
createrobots(numrobots);
makevars(numpies);
createpies(numpies);
onEnterFrame = function () {
pausegame();
if (!gamepaused) {
movepieman(numlevel);
movepies(numpies);
doorswitch(0);
doorswitch(1);
doorswitch(2);
doorswitch(3);
doorswitch(4);
doorswitch(5);
doorswitch(6);
doorswitch(7);
doorswitch(8);
moveexplodes();
wallblock(walls);
movecrates(numcrates);
movemcrates(nummcrates);
movepowerups();
movelasers(numlasers);
movetanks(numtanks);
moverobots(numrobots);
movemines(nummines);
movespinners(numspinners);
movesplinter();
moveammo();
}
};
Frame 14
numlevel = _currentframe - 7;
numpies = 10;
numlasers = 10;
numspinners = 10;
numrobots = 10;
numtanks = 10;
numcrates = 10;
nummines = 21;
nummcrates = 10;
makesounds();
createspinners(numspinners);
createlasers(numlasers);
createmines(nummines);
createcrates(numcrates);
createmcrates(nummcrates);
createtanks(numtanks);
createrobots(numrobots);
makevars(numpies);
createpies(numpies);
onEnterFrame = function () {
pausegame();
if (!gamepaused) {
movepieman(numlevel);
movepies(numpies);
doorswitch(0);
doorswitch(1);
doorswitch(2);
doorswitch(3);
moveexplodes();
wallblock(walls);
movecrates(numcrates);
movemcrates(nummcrates);
movepowerups();
movelasers(numlasers);
movetanks(numtanks);
moverobots(numrobots);
movemines(nummines);
movespinners(numspinners);
movesplinter();
moveammo();
}
};
Frame 15
numlevel = _currentframe - 7;
numpies = 7;
numlasers = 10;
numspinners = 10;
numrobots = 10;
numtanks = 10;
numcrates = 10;
nummines = 10;
nummcrates = 10;
makesounds();
createspinners(numspinners);
createlasers(numlasers);
createmines(nummines);
createcrates(numcrates);
createmcrates(nummcrates);
createtanks(numtanks);
createrobots(numrobots);
makevars(numpies);
createpies(numpies);
onEnterFrame = function () {
pausegame();
if (!gamepaused) {
movepieman(numlevel);
movepies(numpies);
doorswitch(0);
doorswitch(1);
doorswitch(3);
doorswitch(2);
moveexplodes();
wallblock(walls);
movecrates(numcrates);
movemcrates(nummcrates);
movepowerups();
movelasers(numlasers);
movetanks(numtanks);
moverobots(numrobots);
movemines(nummines);
movespinners(numspinners);
movesplinter();
moveammo();
}
};
Frame 16
numlevel = _currentframe - 7;
numpies = 8;
numlasers = 10;
numspinners = 10;
numrobots = 10;
numtanks = 10;
numcrates = 10;
nummines = 10;
nummcrates = 10;
makesounds();
createspinners(numspinners);
createlasers(numlasers);
createmines(nummines);
createcrates(numcrates);
createmcrates(nummcrates);
createtanks(numtanks);
createrobots(numrobots);
makevars(numpies);
createpies(numpies);
onEnterFrame = function () {
pausegame();
if (!gamepaused) {
movepieman(numlevel);
movepies(numpies);
doorswitch(0);
doorswitch(1);
doorswitch(2);
moveexplodes();
wallblock(walls);
movecrates(numcrates);
movemcrates(nummcrates);
movepowerups();
movelasers(numlasers);
movetanks(numtanks);
moverobots(numrobots);
movemines(nummines);
movespinners(numspinners);
movesplinter();
moveammo();
}
};
Frame 17
numlevel = _currentframe - 7;
numpies = 10;
numlasers = 10;
numspinners = 10;
numrobots = 10;
numtanks = 10;
numcrates = 10;
nummines = 10;
nummcrates = 10;
makesounds();
createspinners(numspinners);
createlasers(numlasers);
createmines(nummines);
createcrates(numcrates);
createmcrates(nummcrates);
createtanks(numtanks);
createrobots(numrobots);
makevars(numpies);
createpies(numpies);
onEnterFrame = function () {
pausegame();
if (!gamepaused) {
movepieman(numlevel);
movepies(numpies);
doorswitch(0);
doorswitch(1);
moveexplodes();
wallblock(walls);
movecrates(numcrates);
movemcrates(nummcrates);
movepowerups();
movelasers(numlasers);
movetanks(numtanks);
moverobots(numrobots);
movemines(nummines);
movespinners(numspinners);
movesplinter();
moveammo();
}
};
Frame 18
numlevel = _currentframe - 7;
numpies = 6;
numlasers = 10;
numspinners = 10;
numrobots = 10;
numtanks = 10;
numcrates = 10;
nummines = 10;
nummcrates = 10;
makesounds();
createspinners(numspinners);
createlasers(numlasers);
createmines(nummines);
createcrates(numcrates);
createmcrates(nummcrates);
createtanks(numtanks);
createrobots(numrobots);
makevars(numpies);
createpies(numpies);
onEnterFrame = function () {
pausegame();
if (!gamepaused) {
movepieman(numlevel);
movepies(numpies);
doorswitch(0);
doorswitch(1);
doorswitch(2);
moveexplodes();
wallblock(walls);
movecrates(numcrates);
movemcrates(nummcrates);
movepowerups();
movelasers(numlasers);
movetanks(numtanks);
moverobots(numrobots);
movemines(nummines);
movespinners(numspinners);
movesplinter();
moveammo();
}
};
Frame 19
numlevel = _currentframe - 7;
numpies = 8;
numlasers = 10;
numspinners = 10;
numrobots = 10;
numtanks = 10;
numcrates = 10;
nummines = 10;
nummcrates = 10;
makesounds();
createspinners(numspinners);
createlasers(numlasers);
createmines(nummines);
createcrates(numcrates);
createmcrates(nummcrates);
createtanks(numtanks);
createrobots(numrobots);
makevars(numpies);
createpies(numpies);
onEnterFrame = function () {
pausegame();
if (!gamepaused) {
movepieman(numlevel);
movepies(numpies);
doorswitch(0);
doorswitch(1);
doorswitch(2);
moveexplodes();
wallblock(walls);
movecrates(numcrates);
movemcrates(nummcrates);
movepowerups();
movelasers(numlasers);
movetanks(numtanks);
moverobots(numrobots);
movemines(nummines);
movespinners(numspinners);
movesplinter();
moveammo();
}
};
Frame 20
numlevel = _currentframe - 7;
numpies = 6;
numlasers = 10;
numspinners = 10;
numrobots = 10;
numtanks = 10;
numcrates = 10;
nummines = 10;
nummcrates = 10;
makesounds();
createspinners(numspinners);
createlasers(numlasers);
createmines(nummines);
createcrates(numcrates);
createmcrates(nummcrates);
createtanks(numtanks);
createrobots(numrobots);
makevars(numpies);
createpies(numpies);
onEnterFrame = function () {
pausegame();
if (!gamepaused) {
movepieman(numlevel);
movepies(numpies);
doorswitch(0);
doorswitch(1);
doorswitch(2);
doorswitch(3);
moveexplodes();
wallblock(walls);
movecrates(numcrates);
movemcrates(nummcrates);
movepowerups();
movelasers(numlasers);
movetanks(numtanks);
moverobots(numrobots);
movemines(nummines);
movespinners(numspinners);
movesplinter();
moveammo();
}
};
Frame 21
numlevel = _currentframe - 7;
numpies = 4;
numlasers = 10;
numspinners = 10;
numrobots = 10;
numtanks = 10;
numcrates = 10;
nummines = 10;
nummcrates = 10;
makesounds();
createspinners(numspinners);
createlasers(numlasers);
createmines(nummines);
createcrates(numcrates);
createmcrates(nummcrates);
createtanks(numtanks);
createrobots(numrobots);
makevars(numpies);
createpies(numpies);
onEnterFrame = function () {
pausegame();
if (!gamepaused) {
movepieman(numlevel);
movepies(numpies);
doorswitch(0);
doorswitch(1);
doorswitch(2);
doorswitch(3);
moveexplodes();
wallblock(walls);
movecrates(numcrates);
movemcrates(nummcrates);
movepowerups();
movelasers(numlasers);
movetanks(numtanks);
moverobots(numrobots);
movemines(nummines);
movespinners(numspinners);
movesplinter();
moveammo();
}
};
Frame 22
numlevel = _currentframe - 7;
numpies = 8;
numlasers = 10;
numspinners = 10;
numrobots = 10;
numtanks = 10;
numcrates = 10;
nummines = 10;
nummcrates = 10;
makesounds();
createspinners(numspinners);
createlasers(numlasers);
createmines(nummines);
createcrates(numcrates);
createmcrates(nummcrates);
createtanks(numtanks);
createrobots(numrobots);
makevars(numpies);
createpies(numpies);
onEnterFrame = function () {
pausegame();
if (!gamepaused) {
movepieman(numlevel);
movepies(numpies);
doorswitch(0);
doorswitch(1);
moveexplodes();
wallblock(walls);
movecrates(numcrates);
movemcrates(nummcrates);
movepowerups();
movelasers(numlasers);
movetanks(numtanks);
moverobots(numrobots);
movemines(nummines);
movespinners(numspinners);
movesplinter();
moveammo();
}
};
Frame 23
numlevel = _currentframe - 7;
numpies = 11;
numlasers = 10;
numspinners = 10;
numrobots = 10;
numtanks = 10;
numcrates = 10;
nummines = 10;
nummcrates = 10;
makesounds();
createspinners(numspinners);
createlasers(numlasers);
createmines(nummines);
createcrates(numcrates);
createmcrates(nummcrates);
createtanks(numtanks);
createrobots(numrobots);
makevars(numpies);
createpies(numpies);
onEnterFrame = function () {
pausegame();
if (!gamepaused) {
movepieman(numlevel);
movepies(numpies);
doorswitch(0);
doorswitch(1);
moveexplodes();
wallblock(walls);
movecrates(numcrates);
movemcrates(nummcrates);
movepowerups();
movelasers(numlasers);
movetanks(numtanks);
moverobots(numrobots);
movemines(nummines);
movespinners(numspinners);
movesplinter();
moveammo();
}
};
Frame 24
numlevel = _currentframe - 7;
numpies = 10;
numlasers = 10;
numspinners = 10;
numrobots = 10;
numtanks = 10;
numcrates = 10;
nummines = 10;
nummcrates = 10;
makesounds();
createspinners(numspinners);
createlasers(numlasers);
createmines(nummines);
createcrates(numcrates);
createmcrates(nummcrates);
createtanks(numtanks);
createrobots(numrobots);
makevars(numpies);
createpies(numpies);
onEnterFrame = function () {
pausegame();
if (!gamepaused) {
movepieman(numlevel);
movepies(numpies);
doorswitch(0);
doorswitch(1);
doorswitch(2);
doorswitch(3);
moveexplodes();
wallblock(walls);
movecrates(numcrates);
movemcrates(nummcrates);
movepowerups();
movelasers(numlasers);
movetanks(numtanks);
moverobots(numrobots);
movemines(nummines);
movespinners(numspinners);
movesplinter();
moveammo();
}
};
Frame 25
numlevel = _currentframe - 7;
numpies = 4;
numlasers = 10;
numspinners = 10;
numrobots = 10;
numtanks = 10;
numcrates = 10;
nummines = 10;
nummcrates = 10;
makesounds();
createspinners(numspinners);
createlasers(numlasers);
createmines(nummines);
createcrates(numcrates);
createmcrates(nummcrates);
createtanks(numtanks);
createrobots(numrobots);
makevars(numpies);
createpies(numpies);
onEnterFrame = function () {
pausegame();
if (!gamepaused) {
movepieman(numlevel);
movepies(numpies);
doorswitch(0);
doorswitch(1);
moveexplodes();
wallblock(walls);
movecrates(numcrates);
movemcrates(nummcrates);
movepowerups();
movelasers(numlasers);
movetanks(numtanks);
moverobots(numrobots);
movemines(nummines);
movespinners(numspinners);
movesplinter();
moveammo();
}
};
Frame 26
numlevel = _currentframe - 7;
numpies = 6;
numlasers = 10;
numspinners = 10;
numrobots = 10;
numtanks = 10;
numcrates = 10;
nummines = 10;
nummcrates = 10;
makesounds();
createspinners(numspinners);
createlasers(numlasers);
createmines(nummines);
createcrates(numcrates);
createmcrates(nummcrates);
createtanks(numtanks);
createrobots(numrobots);
makevars(numpies);
createpies(numpies);
onEnterFrame = function () {
pausegame();
if (!gamepaused) {
movepieman(numlevel);
movepies(numpies);
doorswitch(0);
doorswitch(1);
doorswitch(2);
doorswitch(3);
doorswitch(4);
doorswitch(5);
moveexplodes();
wallblock(walls);
movecrates(numcrates);
movemcrates(nummcrates);
movepowerups();
movelasers(numlasers);
movetanks(numtanks);
moverobots(numrobots);
movemines(nummines);
movespinners(numspinners);
movesplinter();
moveammo();
}
};
Frame 27
numlevel = _currentframe - 7;
numpies = 0;
numlasers = 10;
numspinners = 10;
numrobots = 10;
numtanks = 10;
numcrates = 10;
nummines = 10;
nummcrates = 10;
makesounds();
createspinners(numspinners);
createlasers(numlasers);
createmines(nummines);
createcrates(numcrates);
createmcrates(nummcrates);
createtanks(numtanks);
createrobots(numrobots);
makevars(numpies);
createpies(numpies);
createboss1();
onEnterFrame = function () {
pausegame();
if (!gamepaused) {
moveboss1();
movepieman(numlevel);
movepies(numpies);
doorswitch(0);
doorswitch(1);
moveexplodes();
wallblock(walls);
movecrates(numcrates);
movemcrates(nummcrates);
movepowerups();
movelasers(numlasers);
movetanks(numtanks);
moverobots(numrobots);
movemines(nummines);
movespinners(numspinners);
movesplinter();
moveammo();
}
};
Frame 28
onEnterFrame = function () {
tottime = Math.round(totaltimer / 24);
levtime = Math.round(leveltimer / 24);
};
Frame 29
gamecomplete = true;
sscore.onRelease = function () {
if (!cheated) {
bXlnYW1lX25hbWVfdmFyaWFibGU = mynamevar;
bXlnYW1lX3Njb3JlX3ZhcmlhYmxl = score;
__rankz_send__("MjMwMGolZSVhJW4lcw==", "Q0pxaEVEbmI=", bXlnYW1lX25hbWVfdmFyaWFibGU, bXlnYW1lX3Njb3JlX3ZhcmlhYmxl);
hsloader.gotoAndPlay(2);
sscore._visible = false;
_root.click.start();
} else {
_root.deny.start();
}
};
viewscore.onRelease = function () {
gotoAndStop (30);
};
Frame 30
rankz_t10_send = new LoadVars();
rankz_t10_receive = new LoadVars();
rankz_t10_send.SU0249 = "MjMwMGolZSVhJW4lcw==";
rankz_t10_send.flashkey = "Q0pxaEVEbmI=";
rankz_t10_receive.onLoad = function (success) {
if (success) {
_rankz_ar_ = rankz_t10_receive.top10.split("<u/*/u>");
i = 0;
while (i < _rankz_ar_.length) {
tempv = _rankz_ar_[i].split("</*/>");
_root["rankz_n" + (i + 1)].text = tempv[0];
_root["rankz_v" + (i + 1)].text = tempv[1];
i++;
}
} else {
trace("ERROR");
}
};
rankz_t10_send.sendAndLoad("http://rankz.armorbot.com/get/top10.php", rankz_t10_receive, "POST");
Frame 32
endalpha = 0;
skillalpha = 0;
storyalpha = 0;
trainalpha = 0;
onEnterFrame = function () {
storypic._alpha = storypic._alpha + ((storyalpha - storypic._alpha) / 5);
skillpic._alpha = skillpic._alpha + ((skillalpha - skillpic._alpha) / 5);
endpic._alpha = endpic._alpha + ((endalpha - endpic._alpha) / 5);
trainpic._alpha = trainpic._alpha + ((trainalpha - trainpic._alpha) / 5);
};
Frame 33
endtimerscore = int(endtimer * 100) / 100;
if (endtimer > besendtimer) {
besendtimer = int(endtimer * 100) / 100;
}
Frame 34
endtimer = 0;
cheattimer = 0;
cheaton = false;
sentendscore = false;
makesounds();
makevars1(0);
hovs = new Array();
endlevel = 100;
numlevel = _currentframe - 7;
onEnterFrame = function () {
if (_currentframe == 34) {
pausegame();
if (!gamepaused) {
if (cheaton) {
cheater._x = cheater._x + 2;
if (cheater._x > 550) {
cheater._x = -20;
cheattimer = 0;
cheaton = false;
}
} else {
cheattimer++;
if (cheattimer > 480) {
cheater.gotoAndStop(random(11) + 1);
cheaton = true;
}
}
movepieman2();
movepowerups();
moveammo2();
movehovs();
if (endlevel > 50) {
endlevel = endlevel - 0.1;
}
if (random(Math.round(endlevel)) == 0) {
createhov(0, random(500), random(2) + 3, Math.random() * 5, 0);
}
if (random(Math.round(endlevel)) == 0) {
createhov(700, random(500), random(2) + 3, (-Math.random()) * 5, 0);
}
if (random(Math.round(endlevel)) == 0) {
createhov(random(700), 500, random(2) + 3, 0, Math.random() * 5);
}
if (random(Math.round(endlevel)) == 0) {
createhov(random(700), 54, random(2) + 3, 0, (-Math.random()) * 5);
}
}
}
};
Frame 35
sscore.onRelease = function () {
bXlnYW1lX25hbWVfdmFyaWFibGU = mynamevar;
bXlnYW1lX3Njb3JlX3ZhcmlhYmxl = endtimerscore;
__rankz_send__("MjMwN2olZSVhJW4lcw==", "RVdPQVB0bWc=", bXlnYW1lX25hbWVfdmFyaWFibGU, bXlnYW1lX3Njb3JlX3ZhcmlhYmxl);
hsloader.gotoAndPlay(2);
sscore._visible = false;
_root.click.start();
};
viewscore.onRelease = function () {
gotoAndStop (36);
};
Frame 36
rankz_t10_send = new LoadVars();
rankz_t10_receive = new LoadVars();
rankz_t10_send.SU0249 = "MjMwN2olZSVhJW4lcw==";
rankz_t10_send.flashkey = "RVdPQVB0bWc=";
rankz_t10_receive.onLoad = function (success) {
if (success) {
_rankz_ar_ = rankz_t10_receive.top10.split("<u/*/u>");
i = 0;
while (i < _rankz_ar_.length) {
tempv = _rankz_ar_[i].split("</*/>");
_root["rankz_n" + (i + 1)].text = tempv[0];
_root["rankz_v" + (i + 1)].text = tempv[1];
i++;
}
} else {
trace("ERROR");
}
};
rankz_t10_send.sendAndLoad("http://rankz.armorbot.com/get/top10.php", rankz_t10_receive, "POST");
Frame 37
if (skillscore > bestskillscore) {
bestskillscore = skillscore;
}
Frame 38
skillscore = 0;
skilltimer = 30;
skilltimer1 = 0;
skillscore = 0;
skilllevel = 50;
skilllevel1 = 0;
sentskillscore = false;
makesounds();
makevars1(0);
numlevel = _currentframe - 7;
targets = new Array();
onEnterFrame = function () {
if (_currentframe == 38) {
pausegame();
if (!gamepaused) {
moveammo2();
movepieman3();
skilltimer = skilltimer - 0.0416666666666667;
skilltimer1 = int(skilltimer * 100) / 100;
movetargets();
if (skilltimer <= 0) {
removestuff();
removearray(targets);
gotoAndStop (37);
}
skilllevel1 = Math.round(skilllevel);
if (random(skilllevel1) == 0) {
createtarget(0, random(500), Math.random() * 5, 0);
}
if (random(skilllevel1) == 0) {
createtarget(700, random(500), (-Math.random()) * 5, 0);
}
if (random(skilllevel1) == 0) {
createtarget(random(700), 500, 0, (-Math.random()) * 5);
}
if (random(skilllevel1) == 0) {
createtarget(random(700), 54, 0, Math.random() * 5);
}
}
}
};
Frame 39
sscore.onRelease = function () {
bXlnYW1lX25hbWVfdmFyaWFibGU = mynamevar;
bXlnYW1lX3Njb3JlX3ZhcmlhYmxl = skillscore;
__rankz_send__("MjMyNWolZSVhJW4lcw==", "UGlKbEt1bXc=", bXlnYW1lX25hbWVfdmFyaWFibGU, bXlnYW1lX3Njb3JlX3ZhcmlhYmxl);
hsloader.gotoAndPlay(2);
sscore._visible = false;
_root.click.start();
};
viewscore.onRelease = function () {
gotoAndStop (40);
};
Frame 40
rankz_t10_send = new LoadVars();
rankz_t10_receive = new LoadVars();
rankz_t10_send.SU0249 = "MjMyNWolZSVhJW4lcw==";
rankz_t10_send.flashkey = "UGlKbEt1bXc=";
rankz_t10_receive.onLoad = function (success) {
if (success) {
_rankz_ar_ = rankz_t10_receive.top10.split("<u/*/u>");
i = 0;
while (i < _rankz_ar_.length) {
tempv = _rankz_ar_[i].split("</*/>");
_root["rankz_n" + (i + 1)].text = tempv[0];
_root["rankz_v" + (i + 1)].text = tempv[1];
i++;
}
} else {
trace("ERROR");
}
};
rankz_t10_send.sendAndLoad("http://rankz.armorbot.com/get/top10.php", rankz_t10_receive, "POST");
Frame 41
function pluslevel(max) {
lnext.onRelease = function () {
if (trainlevel < max) {
trainlevel++;
}
};
lprev.onRelease = function () {
if (trainlevel > 1) {
trainlevel--;
}
};
if (trainlevel > max) {
trainlevel = max;
}
}
onEnterFrame = function () {
traintype = traintypes[trainmode];
if ((trainmode == 0) || (trainmode == 7)) {
pluslevel(1);
}
if ((((trainmode == 1) || (trainmode == 2)) || (trainmode == 3)) || (trainmode == 4)) {
pluslevel(10);
}
if ((trainmode == 5) || (trainmode == 6)) {
pluslevel(3);
}
};
next.onRelease = function () {
if (trainmode < 7) {
trainmode++;
}
};
prev.onRelease = function () {
if (trainmode > 0) {
trainmode--;
}
};
startb.onRelease = function () {
if (trainmode == 0) {
} else if (trainmode == 5) {
gotoAndStop(45 + trainlevel);
} else if (trainmode == 6) {
gotoAndStop(48 + trainlevel);
} else if (trainmode == 7) {
gotoAndStop (52);
} else {
gotoAndStop(41 + trainmode);
}
};
Frame 42
numlasers = trainlevel;
makesounds();
createlasers(numlasers);
makevars1(0);
numlevel = 35;
i = 0;
while (i < trainlevel) {
l = _root["laser" + i];
if (l._x > -10) {
l._x = random(700);
l._y = random(420) + 80;
}
i++;
}
i = trainlevel;
while (i < 10) {
l = _root["laser" + i];
l._visible = false;
i++;
}
onEnterFrame = function () {
if (_root._currentframe == 42) {
pausegame();
if (!gamepaused) {
trainingcomplete("laser");
movepieman4();
moveexplodes();
wallblock(walls);
movepowerups();
movelasers(numlasers);
moveammo3();
}
}
};
Frame 43
numspinners = trainlevel;
makesounds();
createspinners(numspinners);
makevars1(0);
numlevel = 36;
i = 0;
while (i < trainlevel) {
l = _root["spinner" + i];
if (l._x > -10) {
l._x = random(700);
l._y = random(420) + 80;
}
i++;
}
i = trainlevel;
while (i < 10) {
l = _root["spinner" + i];
l._visible = false;
i++;
}
onEnterFrame = function () {
if (_root._currentframe == 43) {
pausegame();
if (!gamepaused) {
trainingcomplete("spinner");
movepieman4();
moveexplodes();
wallblock(walls);
movepowerups();
moveammo3();
movespinners(numspinners);
}
}
};
Frame 44
numrobots = trainlevel;
makesounds();
createrobots(numrobots);
makevars1(0);
numlevel = 37;
i = 0;
while (i < trainlevel) {
l = _root["robot" + i];
if (l._x > -10) {
l._x = random(700);
l._y = random(420) + 80;
}
i++;
}
i = trainlevel;
while (i < 10) {
l = _root["robot" + i];
l._visible = false;
i++;
}
onEnterFrame = function () {
if (_root._currentframe == 44) {
pausegame();
if (!gamepaused) {
trainingcomplete("robot");
movepieman4();
moveexplodes();
wallblock(walls);
movepowerups();
moverobots(numrobots);
moveammo3();
}
}
};
Frame 45
numtanks = trainlevel;
makesounds();
createtanks(numtanks);
makevars1(0);
numlevel = 38;
i = 0;
while (i < trainlevel) {
l = _root["tank" + i];
if (l._x > -10) {
l._x = random(700);
l._y = random(420) + 80;
}
i++;
}
i = trainlevel;
while (i < 10) {
l = _root["tank" + i];
l._visible = false;
i++;
}
onEnterFrame = function () {
if (_root._currentframe == 45) {
pausegame();
if (!gamepaused) {
trainingcomplete("tank");
movepieman4();
moveexplodes();
wallblock(walls);
movepowerups();
movetanks(numtanks);
moveammo3();
}
}
};
Frame 46
numlevel = _currentframe - 7;
numpies = 0;
numlasers = 10;
numspinners = 10;
numrobots = 10;
numtanks = 10;
numcrates = 10;
nummines = 10;
nummcrates = 10;
makesounds();
createspinners(numspinners);
createlasers(numlasers);
createmines(nummines);
createcrates(numcrates);
createmcrates(nummcrates);
createtanks(numtanks);
createrobots(numrobots);
makevars1(numpies);
createpies(numpies);
mazec._x = pieman._x;
mazec._y = pieman._y;
onEnterFrame = function () {
if (_root._currentframe == 46) {
pausegame();
if (!gamepaused) {
mazec._x = pieman._x;
mazec._y = pieman._y;
movepiemanmaze(numlevel);
movepies(numpies);
doorswitch(0);
doorswitch(1);
doorswitch(2);
doorswitch(3);
moveexplodes();
wallblock(walls);
movecrates(numcrates);
movemcrates(nummcrates);
movepowerups();
movelasers(numlasers);
movetanks(numtanks);
moverobots(numrobots);
movemines(nummines);
movespinners(numspinners);
movesplinter();
}
}
};
Frame 47
numlevel = _currentframe - 7;
numpies = 0;
numlasers = 10;
numspinners = 10;
numrobots = 10;
numtanks = 10;
numcrates = 10;
nummines = 10;
nummcrates = 10;
makesounds();
createspinners(numspinners);
createlasers(numlasers);
createmines(nummines);
createcrates(numcrates);
createmcrates(nummcrates);
createtanks(numtanks);
createrobots(numrobots);
makevars1(numpies);
createpies(numpies);
mazec._x = pieman._x;
mazec._y = pieman._y;
onEnterFrame = function () {
if (_root._currentframe == 47) {
pausegame();
if (!gamepaused) {
mazec._x = pieman._x;
mazec._y = pieman._y;
movepiemanmaze(numlevel);
movepies(numpies);
doorswitch(0);
doorswitch(1);
doorswitch(2);
doorswitch(3);
moveexplodes();
wallblock(walls);
movecrates(numcrates);
movemcrates(nummcrates);
movepowerups();
movelasers(numlasers);
movetanks(numtanks);
moverobots(numrobots);
movemines(nummines);
movespinners(numspinners);
movesplinter();
}
}
};
Frame 48
numlevel = _currentframe - 7;
numpies = 0;
numlasers = 10;
numspinners = 10;
numrobots = 10;
numtanks = 10;
numcrates = 10;
nummines = 10;
nummcrates = 10;
makesounds();
createspinners(numspinners);
createlasers(numlasers);
createmines(nummines);
createcrates(numcrates);
createmcrates(nummcrates);
createtanks(numtanks);
createrobots(numrobots);
makevars1(numpies);
createpies(numpies);
mazec._x = pieman._x;
mazec._y = pieman._y;
onEnterFrame = function () {
if (_root._currentframe == 48) {
pausegame();
if (!gamepaused) {
mazec._x = pieman._x;
mazec._y = pieman._y;
movepiemanmaze(numlevel);
movepies(numpies);
doorswitch(0);
doorswitch(1);
doorswitch(2);
doorswitch(3);
doorswitch(4);
doorswitch(5);
moveexplodes();
wallblock(walls);
movecrates(numcrates);
movemcrates(nummcrates);
movepowerups();
movelasers(numlasers);
movetanks(numtanks);
moverobots(numrobots);
movemines(nummines);
movespinners(numspinners);
movesplinter();
}
}
};
Frame 49
numlevel = _currentframe - 7;
numpies = 0;
numlasers = 10;
numspinners = 10;
numrobots = 10;
numtanks = 10;
numcrates = 10;
nummines = 10;
nummcrates = 10;
makesounds();
createspinners(numspinners);
createlasers(numlasers);
createmines(nummines);
createcrates(numcrates);
createmcrates(nummcrates);
createtanks(numtanks);
createrobots(numrobots);
makevars1(numpies);
createpies(numpies);
onEnterFrame = function () {
if (_root._currentframe == 49) {
pausegame();
if (!gamepaused) {
movepieman4(numlevel);
movepies(numpies);
doorswitch(0);
doorswitch(1);
doorswitch(2);
doorswitch(3);
moveexplodes();
wallblock(walls);
movecrates(numcrates);
movemcrates(nummcrates);
movepowerups();
movelasers(numlasers);
movetanks(numtanks);
moverobots(numrobots);
movemines(nummines);
movespinners(numspinners);
movesplinter();
moveammo3();
}
}
};
Frame 50
numlevel = _currentframe - 7;
numpies = 0;
numlasers = 10;
numspinners = 10;
numrobots = 10;
numtanks = 10;
numcrates = 10;
nummines = 10;
nummcrates = 10;
makesounds();
createspinners(numspinners);
createlasers(numlasers);
createmines(nummines);
createcrates(numcrates);
createmcrates(nummcrates);
createtanks(numtanks);
createrobots(numrobots);
makevars1(numpies);
createpies(numpies);
onEnterFrame = function () {
if (_root._currentframe == 50) {
pausegame();
if (!gamepaused) {
movepieman4(numlevel);
movepies(numpies);
doorswitch(0);
doorswitch(1);
doorswitch(2);
doorswitch(3);
moveexplodes();
wallblock(walls);
movecrates(numcrates);
movemcrates(nummcrates);
movepowerups();
movelasers(numlasers);
movetanks(numtanks);
moverobots(numrobots);
movemines(nummines);
movespinners(numspinners);
movesplinter();
moveammo3();
}
}
};
Frame 51
numlevel = _currentframe - 7;
numpies = 0;
numlasers = 10;
numspinners = 10;
numrobots = 10;
numtanks = 10;
numcrates = 10;
nummines = 10;
nummcrates = 10;
makesounds();
createspinners(numspinners);
createlasers(numlasers);
createmines(nummines);
createcrates(numcrates);
createmcrates(nummcrates);
createtanks(numtanks);
createrobots(numrobots);
makevars1(numpies);
createpies(numpies);
onEnterFrame = function () {
if (_root._currentframe == 51) {
pausegame();
if (!gamepaused) {
movepieman4(numlevel);
movepies(numpies);
doorswitch(0);
doorswitch(1);
doorswitch(2);
doorswitch(3);
moveexplodes();
wallblock(walls);
movecrates(numcrates);
movemcrates(nummcrates);
movepowerups();
movelasers(numlasers);
movetanks(numtanks);
moverobots(numrobots);
movemines(nummines);
movespinners(numspinners);
movesplinter();
moveammo3();
}
}
};
Frame 52
numlevel = _currentframe - 7;
numpies = 0;
numlasers = 10;
numspinners = 10;
numrobots = 10;
numtanks = 10;
numcrates = 10;
nummines = 10;
nummcrates = 10;
makesounds();
createspinners(numspinners);
createlasers(numlasers);
createmines(nummines);
createcrates(numcrates);
createmcrates(nummcrates);
createtanks(numtanks);
createrobots(numrobots);
makevars1(numpies);
createpies(numpies);
onEnterFrame = function () {
if (_root._currentframe == 52) {
pausegame();
if (!gamepaused) {
movepieman4(numlevel);
movepies(numpies);
doorswitch(0);
doorswitch(1);
doorswitch(2);
doorswitch(3);
moveexplodes();
wallblock(walls);
movecrates(numcrates);
movemcrates(nummcrates);
movepowerups();
movelasers(numlasers);
movetanks(numtanks);
moverobots(numrobots);
movemines(nummines);
movespinners(numspinners);
movesplinter();
moveammo3();
}
}
};
Frame 53
cheat = new Sound();
cheat.attachSound("cheat");
go_btn.onRelease = function () {
if (password_txt == "vader") {
cheatdes = "Darth vader costume unlocked, no reload times and unlimited ammo";
darth = true;
cheated = true;
cheat.start();
} else if (password_txt == "casper") {
cheatdes = "Invisible costume unlocked, walk through anything";
nowall = true;
cheated = true;
cheat.start();
} else if (password_txt == "3.141") {
cheatdes = "Hawaiian shirt costume unlocked, invincible";
invin = true;
cheated = true;
cheat.start();
} else if (password_txt == "doodle") {
cheatdes = "pencil costume unlocked, walk through mines";
pencil = true;
cheated = true;
cheat.start();
} else if (password_txt == "ninja") {
cheatdes = "Shadow costume unlocked, click to shoot missile from cursor";
ninja = true;
cheated = true;
cheat.start();
} else if (password_txt == "orbit") {
cheatdes = "Inverted costume unlocked, pie-magnet";
invert = true;
cheated = true;
cheat.start();
} else if (password_txt == "DIET") {
cheatdes = "Thin costume unlocked, speed!!";
thin = true;
cheated = true;
cheat.start();
} else if (password_txt == "coinage") {
cheatdes = "+1000 points";
points = points + 1000;
cheated = true;
cheat.start();
} else if (password_txt == "level up") {
cheatdes = "unlock all levels";
level = 20;
cheated = true;
cheat.start();
} else if (password_txt == "carnage") {
cheatdes = "unlock all weapons for purchase";
availweapons = new Array(0, true, true, true, true, true);
cheated = true;
cheat.start();
} else if (password_txt == "ALTF4") {
cheatdes = "God mode enabled, you can now change costume on the pause menu";
godmode = true;
cheated = true;
cheat.start();
} else {
cheatdes = "wrong password";
deny.start();
}
password_txt = "";
};
Frame 54
stopAllSounds();
Mouse.show();
MochiAd.showPreGameAd({id:"7f71ce5527798a8d", res:"700x500", background:2393047, color:2969040, outline:11382189, no_bg:false});
Frame 55
music = new Sound();
music.attachSound("piemanmusic");
music.start(0, 1000);
Mouse.hide();
gotoAndStop (2);
Symbol 23 MovieClip [explode] Frame 12
stop();
Symbol 32 MovieClip [l] Frame 1
stop();
Symbol 45 MovieClip Frame 314
stop();
Symbol 55 MovieClip [splinter] Frame 1
stop();
Symbol 85 MovieClip Frame 1
stop();
Symbol 87 MovieClip Frame 1
stop();
Symbol 89 MovieClip Frame 1
stop();
Symbol 101 Button
on (release) {
_root.gfps = true;
}
Symbol 106 Button
on (release) {
_root.gfps = false;
}
Symbol 117 Button
on (release) {
_root.piemancolour = 7;
}
Symbol 120 Button
on (release) {
_root.piemancolour = 8;
}
Symbol 123 Button
on (release) {
_root.piemancolour = 9;
}
Symbol 126 Button
on (release) {
_root.piemancolour = 10;
}
Symbol 129 Button
on (release) {
_root.piemancolour = 11;
}
Symbol 132 Button
on (release) {
_root.piemancolour = 12;
}
Symbol 135 Button
on (release) {
_root.piemancolour = 13;
}
Symbol 136 MovieClip Frame 1
nowallc._visible = _root.nowall;
invinc._visible = _root.invin;
vaderc._visible = _root.darth;
pencilc._visible = _root.pencil;
ninjac._visible = _root.ninja;
magc._visible = _root.invert;
thinc._visible = _root.thin;
Symbol 137 MovieClip [pmenu] Frame 1
stop();
if (_root.godmode) {
gotoAndStop (2);
}
resume.useHandCursor = false;
lselect.useHandCursor = false;
mute.useHandCursor = false;
lq.useHandCursor = false;
mq.useHandCursor = false;
hq.useHandCursor = false;
resume.onRelease = function () {
removeMovieClip(_root.pmenuo);
_root.gamepaused = false;
};
lselect.onRelease = function () {
_root.gamepaused = false;
removeMovieClip(_root.pmenuo);
_root.menu.healthbar._xscale = -100;
};
mute.onRelease = function () {
if (!_root.muted) {
_root.musicvol = 0;
_root.muted = true;
} else {
_root.musicvol = 100;
_root.muted = false;
}
};
onEnterFrame = function () {
pmframer = _root.framer;
if (_root._currentframe == 34) {
culev = "endurance";
} else if (_root._currentframe == 38) {
culev = "skill";
} else {
culev = _root._currentframe - 7;
}
if (_root.gfps) {
liner._x = onb._x;
liner._y = onb._y;
} else {
liner._x = offb._x;
liner._y = offb._y;
}
};
Instance of Symbol 85 MovieClip "lq" in Symbol 137 MovieClip [pmenu] Frame 1
onClipEvent (enterFrame) {
if (_root._quality == "LOW") {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
on (release) {
_root._quality = "low";
}
Instance of Symbol 87 MovieClip "mq" in Symbol 137 MovieClip [pmenu] Frame 1
onClipEvent (enterFrame) {
if (_root._quality == "MEDIUM") {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
on (release) {
_root._quality = "medium";
}
Instance of Symbol 89 MovieClip "hq" in Symbol 137 MovieClip [pmenu] Frame 1
onClipEvent (enterFrame) {
if (_root._quality == "HIGH") {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
on (release) {
_root._quality = "high";
}
Symbol 137 MovieClip [pmenu] Frame 2
resume.useHandCursor = false;
lselect.useHandCursor = false;
mute.useHandCursor = false;
lq.useHandCursor = false;
mq.useHandCursor = false;
hq.useHandCursor = false;
resume.onRelease = function () {
removeMovieClip(_root.pmenuo);
_root.gamepaused = false;
};
lselect.onRelease = function () {
_root.gamepaused = false;
removeMovieClip(_root.pmenuo);
_root.menu.healthbar._xscale = -100;
};
mute.onRelease = function () {
if (!_root.muted) {
_root.musicvol = 0;
_root.muted = true;
} else {
_root.musicvol = 100;
_root.muted = false;
}
};
onEnterFrame = function () {
pmframer = _root.framer;
if (_root._currentframe == 34) {
culev = "endurance";
} else if (_root._currentframe == 38) {
culev = "skill";
} else {
culev = _root._currentframe - 7;
}
if (_root.gfps) {
liner._x = onb._x;
liner._y = onb._y;
} else {
liner._x = offb._x;
liner._y = offb._y;
}
};
Instance of Symbol 136 MovieClip in Symbol 137 MovieClip [pmenu] Frame 2
onClipEvent (load) {
if (_root.cheated) {
this._visible = true;
_parent.pb.gotoAndStop(2);
} else {
this._visible = false;
}
}
Symbol 161 MovieClip [target] Frame 1
stop();
Symbol 195 MovieClip Frame 1
stop();
Symbol 202 MovieClip Frame 1
stop();
Symbol 1026 MovieClip [__Packages.ab3.rankz.Armor_Bot_30_En_AS1] Frame 0
class ab3.rankz.Armor_Bot_30_En_AS1 extends Object
{
static var _CharsReverseLookup;
var _Armor_Bot_30_En_AS1Str, _Armor_Bot_30_En_AS1Count;
function Armor_Bot_30_En_AS1 () {
super();
}
static function Encode(str) {
var _local1 = new ab3.rankz.Armor_Bot_30_En_AS1();
return(_local1.encodeArmor_Bot_30_En_AS1(str));
}
static function Decode(str) {
var _local1 = new ab3.rankz.Armor_Bot_30_En_AS1();
return(_local1.decodeArmor_Bot_30_En_AS1(str));
}
static function StringReplaceAll(source, find, replacement) {
return(source.split(find).join(replacement));
}
static function InitReverseChars() {
_CharsReverseLookup = new Array();
var _local1 = 0;
while (_local1 < _Chars.length) {
_CharsReverseLookup[_Chars[_local1]] = _local1;
_local1++;
}
return(true);
}
static function UrlDecode(str) {
str = StringReplaceAll(str, "\\", " ");
str = unescape(str);
return(str);
}
static function UrlEncode(str) {
str = escape(str);
str = StringReplaceAll(str, "\\", "%2B");
str = StringReplaceAll(str, "%20", "+");
return(str);
}
function setArmor_Bot_30_En_AS1Str(str) {
_Armor_Bot_30_En_AS1Str = str;
_Armor_Bot_30_En_AS1Count = 0;
}
function readArmor_Bot_30_En_AS1() {
if (!_Armor_Bot_30_En_AS1Str) {
return(_EndOfInput);
}
if (_Armor_Bot_30_En_AS1Count >= _Armor_Bot_30_En_AS1Str.length) {
return(_EndOfInput);
}
var _local2 = _Armor_Bot_30_En_AS1Str.charCodeAt(_Armor_Bot_30_En_AS1Count) & 255;
_Armor_Bot_30_En_AS1Count++;
return(_local2);
}
function encodeArmor_Bot_30_En_AS1(str) {
setArmor_Bot_30_En_AS1Str(str);
var _local3 = "";
var _local2 = new Array(3);
var _local5 = 0;
var _local4 = false;
while ((!_local4) && (((_local2[0] = readArmor_Bot_30_En_AS1())) != _EndOfInput)) {
_local2[1] = readArmor_Bot_30_En_AS1();
_local2[2] = readArmor_Bot_30_En_AS1();
_local3 = _local3 + _Chars[_local2[0] >> 2];
if (_local2[1] != _EndOfInput) {
_local3 = _local3 + _Chars[((_local2[0] << 4) & 48) | (_local2[1] >> 4)];
if (_local2[2] != _EndOfInput) {
_local3 = _local3 + _Chars[((_local2[1] << 2) & 60) | (_local2[2] >> 6)];
_local3 = _local3 + _Chars[_local2[2] & 63];
} else {
_local3 = _local3 + _Chars[(_local2[1] << 2) & 60];
_local3 = _local3 + "=";
_local4 = true;
}
} else {
_local3 = _local3 + _Chars[(_local2[0] << 4) & 48];
_local3 = _local3 + "=";
_local3 = _local3 + "=";
_local4 = true;
}
_local5 = _local5 + 4;
if (_local5 >= 76) {
_local3 = _local3 + newline;
_local5 = 0;
}
}
return(_local3);
}
function readReverseArmor_Bot_30_En_AS1() {
if (!_Armor_Bot_30_En_AS1Str) {
return(_EndOfInput);
}
while (true) {
if (_Armor_Bot_30_En_AS1Count >= _Armor_Bot_30_En_AS1Str.length) {
return(_EndOfInput);
}
var _local2 = _Armor_Bot_30_En_AS1Str.charAt(_Armor_Bot_30_En_AS1Count);
_Armor_Bot_30_En_AS1Count++;
if (_CharsReverseLookup[_local2]) {
return(_CharsReverseLookup[_local2]);
}
if (_local2 == "A") {
return(0);
}
}
}
function ntos(n) {
var _local1 = n.toString(16);
if (_local1.length == 1) {
_local1 = "0" + _local1;
}
_local1 = "%" + _local1;
return(unescape(_local1));
}
function decodeArmor_Bot_30_En_AS1(str) {
setArmor_Bot_30_En_AS1Str(str);
var _local3 = "";
var _local2 = new Array(4);
var _local4 = false;
while (((!_local4) && (((_local2[0] = readReverseArmor_Bot_30_En_AS1())) != _EndOfInput)) && (((_local2[1] = readReverseArmor_Bot_30_En_AS1())) != _EndOfInput)) {
_local2[2] = readReverseArmor_Bot_30_En_AS1();
_local2[3] = readReverseArmor_Bot_30_En_AS1();
_local3 = _local3 + ntos(((_local2[0] << 2) & 255) | (_local2[1] >> 4));
if (_local2[2] != _EndOfInput) {
_local3 = _local3 + ntos(((_local2[1] << 4) & 255) | (_local2[2] >> 2));
if (_local2[3] != _EndOfInput) {
_local3 = _local3 + ntos(((_local2[2] << 6) & 255) | _local2[3]);
} else {
_local4 = true;
}
} else {
_local4 = true;
}
}
return(_local3);
}
function toHex(n) {
var _local4 = "";
var _local3 = true;
var _local1 = 32;
while (_local1 > 0) {
_local1 = _local1 - 4;
var _local2 = (n >> _local1) & 15;
if ((!_local3) || (_local2 != 0)) {
_local3 = false;
_local4 = _local4 + _Digits[_local2];
}
}
return(((_local4 == "") ? "0" : (_local4)));
}
function pad(str, len, pad) {
var _local2 = str;
var _local1 = str.length;
while (_local1 < len) {
_local2 = pad + _local2;
_local1++;
}
return(_local2);
}
function encodeHex(str) {
var _local4 = "";
var _local2 = 0;
while (_local2 < str.length) {
_local4 = _local4 + pad(toHex(str.charCodeAt(_local2) & 255), 2, "0");
_local2++;
}
return(_local4);
}
function decodeHex(str) {
var _local5 = "";
var _local3 = "";
var _local2 = 0;
while (_local2 < str.length) {
_local3 = _local3 + str.charAt(_local2);
if (_local3.length == 2) {
_local5 = _local5 + ntos(parseInt("0x" + _local3));
_local3 = "";
}
_local2++;
}
return(_local5);
}
static var _EndOfInput = -1;
static var _Chars = new Array("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "+", "/");
static var _CharsReverseLookupInited = InitReverseChars();
static var _Digits = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f");
}
Symbol 1027 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.1");
}
static function showPreGameAd(options) {
var _local27 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local27);
var clip = options.clip;
var _local23 = 11000;
var _local26 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local7 = chk.createEmptyMovieClip("_mochiad_bar", 4);
_local7._x = 10;
_local7._y = _local13 - 20;
var _local22 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local24 = options.outline;
delete options.outline;
var _local5 = _local7.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local7.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local22);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local6 = _local7.createEmptyMovieClip("_outline", 3);
_local6.lineStyle(0, _local24, 100);
_local6.moveTo(0, 0);
_local6.lineTo(_local4 - 20, 0);
_local6.lineTo(_local4 - 20, 10);
_local6.lineTo(0, 10);
_local6.lineTo(0, 0);
chk.ad_msec = _local23;
chk.ad_timeout = _local26;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local12 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local10 = (100 * _local8) / _local4;
var _local11 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local2 = Math.min(100, Math.min(_local10 || 0, _local11));
_local2 = Math.max(this.last_pcnt, _local2);
this.last_pcnt = _local2;
_local9._xscale = _local2;
if (!chk.showing) {
var _local7 = _local12.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local5 > chk.ad_timeout) {
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showTimedAd(options) {
showInterLevelAd(options);
}
static function showPreloaderAd(options) {
showPreGameAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function _loadCommunicator(options) {
var _local26 = {clip:_root, com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = _parseOptions(options, _local26);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local18 = options.clip;
var _local20 = "_mochiad_com_" + options.id;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local18[_local20]) {
return(_local18[_local20].lc);
}
var _local21 = options.com_server + options.id;
_allowDomains(_local21);
delete options.id;
delete options.com_server;
var _local25 = options.depth;
delete options.depth;
var _local17 = _local18.createEmptyMovieClip(_local20, _local25);
var _local11 = _local17.createEmptyMovieClip("_mochiad_com", 1);
for (var _local15 in options) {
_local11[_local15] = options[_local15];
}
var _local6 = new LocalConnection();
var _local16 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local6.mc = _local17;
_local6.name = _local16;
_local6.allowDomain = function (d) {
return(true);
};
_local6.allowInsecureDomain = _local6.allowDomain;
_local6.connect(_local16);
_local17.lc = _local6;
_local11.lc = _local16;
_local6._id = 0;
_local6._queue = [];
_local6.rpcResult = function (cb_arg) {
var _local8 = parseInt(cb_arg);
var _local4 = this._callbacks[_local8];
if (!_local4) {
return(undefined);
}
delete this._callbacks[_local8];
var _local5 = [];
var _local3 = 2;
while (_local3 < _local4.length) {
_local5.push(_local4[_local3]);
_local3++;
}
_local3 = 1;
while (_local3 < arguments.length) {
_local5.push(arguments[_local3]);
_local3++;
}
var _local6 = _local4[1];
var _local7 = _local4[0];
if (_local7 && (typeof(_local6) == "string")) {
_local6 = _local7[_local6];
}
if (_local6) {
_local6.apply(_local7, _local5);
}
};
_local6._didConnect = function (endpoint) {
this._endpoint = endpoint;
var _local4 = this._queue;
delete this._queue;
var _local5 = this.doSend;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2];
_local5.apply(this, _local3);
_local2++;
}
};
_local6.doSend = function (args, cbobj, cbfn) {
if (this._endpoint == null) {
var _local4 = [];
var _local3 = 0;
while (_local3 < arguments.length) {
_local4.push(arguments[_local3]);
_local3++;
}
this._queue.push(_local4);
return(undefined);
}
this._id = this._id + 1;
var _local5 = this._id;
if ((cbfn === undefined) || (cbfn === null)) {
cbfn = cbobj;
}
this._callbacks[_local5] = [cbobj, cbfn];
var _local7 = new LocalConnection();
var _local9 = _local7.send(this._endpoint, "rpc", _local5, args);
};
_local6._callbacks = {};
_local6._callbacks[0] = [_local6, "_didConnect"];
_local11.st = getTimer();
_local11.loadMovie(_local21 + ".swf", "POST");
return(_local6);
}
static function fetchHighScores(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["fetchHighScores", options];
_local1.doSend(["fetchHighScores", options], callbackObj, callbackMethod);
return(true);
}
static function sendHighScore(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["sendHighScore", options];
_local1.doSend(["sendHighScore", options], callbackObj, callbackMethod);
return(true);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
return(_local4);
}
}
Symbol 221 Button
on (release) {
gotoAndStop (31);
}
Symbol 225 Button
on (release) {
gotoAndStop (53);
}
Symbol 234 Button
on (release) {
gotoAndStop (2);
}
Symbol 242 Button
on (release) {
_root.cursornumber = 1;
_root.click.start();
}
Symbol 247 Button
on (release) {
_root.cursornumber = 2;
_root.click.start();
}
Symbol 251 Button
on (release) {
_root.cursornumber = 3;
_root.click.start();
}
Symbol 256 Button
on (release) {
_root.cursornumber = 4;
_root.click.start();
}
Symbol 260 Button
on (release) {
_root.cursornumber = 5;
_root.click.start();
}
Symbol 264 Button
on (release) {
_root.cursornumber = 6;
_root.click.start();
}
Symbol 270 Button
on (release) {
_root.cursorease = _root.cursorease - 0.1;
_root.click.start();
}
Symbol 274 Button
on (release) {
_root.cursorease = _root.cursorease + 0.1;
_root.click.start();
}
Symbol 281 Button
on (release) {
_root.piemancolour = 1;
_root.click.start();
}
Symbol 285 Button
on (release) {
_root.piemancolour = 2;
_root.click.start();
}
Symbol 289 Button
on (release) {
_root.piemancolour = 3;
_root.click.start();
}
Symbol 293 Button
on (release) {
_root.piemancolour = 4;
_root.click.start();
}
Symbol 297 Button
on (release) {
_root.piemancolour = 5;
_root.click.start();
}
Symbol 301 Button
on (release) {
_root.piemancolour = 6;
_root.click.start();
}
Symbol 303 Button
on (release) {
_root.gfps = true;
_root.click.start();
}
Symbol 304 Button
on (release) {
_root.gfps = false;
_root.click.start();
}
Symbol 417 MovieClip Frame 1
stop();
Symbol 418 Button
on (release) {
gotoAndStop (32);
}
Symbol 424 Button
on (release) {
gotoAndStop (7);
}
Symbol 437 Button
on (release) {
gotoAndStop (28);
}
Symbol 441 Button
on (release) {
gotoAndStop (6);
}
Symbol 448 Button
on (release) {
_root.shopx = 344.4;
_root.click.start();
}
Symbol 450 Button
on (release) {
_root.shopx = -313.9;
_root.click.start();
}
Symbol 451 Button
on (release) {
_root.shopx = -1008.1;
_root.click.start();
}
Symbol 452 Button
on (release) {
_root.shopx = -1708.1;
_root.click.start();
}
Symbol 453 Button
on (release) {
_root.shopx = -2408.3;
_root.click.start();
}
Symbol 454 Button
on (release) {
_root.shopx = -3113;
_root.click.start();
}
Symbol 461 MovieClip Frame 1
stop();
Symbol 473 MovieClip Frame 1
stop();
Symbol 475 Button
on (release) {
_root.cursornumber = 1;
_root.click.start();
}
Symbol 476 Button
on (release) {
_root.cursornumber = 2;
_root.click.start();
}
Symbol 477 Button
on (release) {
_root.cursornumber = 3;
_root.click.start();
}
Symbol 478 Button
on (release) {
_root.cursornumber = 4;
_root.click.start();
}
Symbol 479 Button
on (release) {
_root.cursornumber = 5;
_root.click.start();
}
Symbol 480 Button
on (release) {
_root.cursornumber = 6;
_root.click.start();
}
Symbol 482 Button
on (release) {
_root.cursorease = _root.cursorease - 0.1;
_root.click.start();
}
Symbol 483 Button
on (release) {
_root.cursorease = _root.cursorease + 0.1;
_root.click.start();
}
Symbol 491 MovieClip Frame 1
stop();
Symbol 522 MovieClip Frame 1
nowallc._visible = _root.nowall;
invinc._visible = _root.invin;
vaderc._visible = _root.darth;
pencilc._visible = _root.pencil;
ninjac._visible = _root.ninja;
magc._visible = _root.invert;
thinc._visible = _root.thin;
Symbol 530 MovieClip Frame 1
onEnterFrame = function () {
this.gotoAndStop(_root.piemancolour);
};
Symbol 536 MovieClip Frame 1
stop();
Symbol 540 MovieClip Frame 1
stop();
Symbol 540 MovieClip Frame 20
stop();
Symbol 540 MovieClip Frame 40
stop();
Symbol 541 MovieClip Frame 1
speedactive = true;
healthactive = true;
_root.w2mc = 100;
_root.w3mc = 100;
_root.w4mc = 100;
_root.w5mc = 100;
onEnterFrame = function () {
speedcost1 = _root.speedcost;
healthcost1 = _root.healthcost;
w2cost = _root.costweapons[2];
w2b = _root.cammos[2];
w2ma = _root.maxammos[2];
w2level.gotoAndStop((w2ma - 200) / 200);
w3cost = _root.costweapons[3];
w3b = _root.cammos[3];
w3ma = _root.maxammos[3];
w3level.gotoAndStop((w3ma - 10) / 5);
w4cost = _root.costweapons[4];
w4b = _root.cammos[4];
w4ma = _root.maxammos[4];
w4level.gotoAndStop((w4ma - 2) / 3);
w5cost = _root.costweapons[5];
w5b = _root.cammos[5];
w5ma = _root.maxammos[5];
w5level.gotoAndStop(w5ma);
if (_root.cursorease >= 1) {
if (_root.cursorease <= 5) {
cursorease1 = _root.cursorease;
} else {
_root.cursorease = 5;
}
} else {
_root.cursorease = 1;
}
if (_root.speedlevel < _root.maxspeed) {
speedactive = true;
} else {
speedactive = false;
}
if (!speedactive) {
speedup.gotoAndStop(3);
} else if (speedup.hitTest(_root._xmouse, _root._ymouse, true)) {
speedup.gotoAndStop(2);
} else {
speedup.gotoAndStop(1);
}
if (_root.healthlevel < _root.maxhealth) {
healthactive = true;
} else {
healthactive = false;
}
if (!healthactive) {
healthup.gotoAndStop(3);
} else if (healthup.hitTest(_root._xmouse, _root._ymouse, true)) {
healthup.gotoAndStop(2);
} else {
healthup.gotoAndStop(1);
}
};
onMouseDown = function () {
if (speedup.hitTest(_root._xmouse, _root._ymouse, true)) {
if (speedactive) {
if ((_root.points - _root.speedcost) >= 0) {
_root.click.start();
_root.points = _root.points - _root.speedcost;
_root.speedlevel = _root.speedlevel + 0.5;
_root.speedcost = _root.speedcost + 20;
_root.speedleveltext++;
} else {
_root.deny.start();
}
} else {
_root.deny.start();
}
}
if (healthup.hitTest(_root._xmouse, _root._ymouse, true)) {
if (healthactive) {
if ((_root.points - _root.healthcost) >= 0) {
_root.click.start();
_root.points = _root.points - _root.healthcost;
_root.healthlevel++;
_root.healthcost = _root.healthcost + 50;
} else {
_root.deny.start();
}
} else {
_root.deny.start();
}
}
};
Instance of Symbol 473 MovieClip in Symbol 541 MovieClip Frame 1
onClipEvent (enterFrame) {
this.gotoAndStop(_root.speedleveltext);
}
Instance of Symbol 473 MovieClip in Symbol 541 MovieClip Frame 1
onClipEvent (enterFrame) {
this.gotoAndStop(_root.healthlevel - 3);
}
Instance of Symbol 491 MovieClip in Symbol 541 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.availweapons[2]) {
if (!_root.activeweapons[2]) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else {
this.gotoAndStop(4);
}
} else {
this.gotoAndStop(3);
}
}
on (release) {
if (_root.availweapons[2]) {
if (!_root.activeweapons[2]) {
if ((_root.points - _root.w2cost) >= 0) {
_root.points = _root.points - _root.w2cost;
_root.activeweapons[2] = true;
_root.click.start();
} else {
_root.deny.start();
}
} else {
_root.deny.start();
}
} else {
_root.deny.start();
}
}
Instance of Symbol 491 MovieClip in Symbol 541 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
on (release) {
if (_root.cammos[2] < _root.maxammos[2]) {
if ((_root.points - 50) >= 0) {
_root.cammos[2] = _root.cammos[2] + 100;
_root.points = _root.points - 50;
_root.click.start();
} else {
_root.deny.start();
}
} else {
_root.deny.start();
}
}
Instance of Symbol 461 MovieClip in Symbol 541 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.maxammos[2] == _root.maxammos2[2]) {
this.gotoAndStop(3);
} else if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
on (release) {
if (_root.maxammos[2] == _root.maxammos2[2]) {
_root.deny.start();
} else if ((_root.points - _root.w2mc) >= 0) {
_root.maxammos[2] = _root.maxammos[2] + 200;
_root.points = _root.points - _root.w2mc;
_root.w2mc = _root.w2mc + 20;
_root.click.start();
} else {
_root.deny.start();
}
}
Instance of Symbol 473 MovieClip "w2level" in Symbol 541 MovieClip Frame 1
onClipEvent (enterFrame) {
this.gotoAndStop(_root.healthlevel - 3);
}
Instance of Symbol 491 MovieClip in Symbol 541 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.availweapons[3]) {
if (!_root.activeweapons[3]) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else {
this.gotoAndStop(4);
}
} else {
this.gotoAndStop(3);
}
}
on (release) {
if (_root.availweapons[3]) {
if (!_root.activeweapons[3]) {
if ((_root.points - _root.w3cost) >= 0) {
_root.points = _root.points - _root.w3cost;
_root.activeweapons[3] = true;
_root.click.start();
} else {
_root.deny.start();
}
} else {
_root.deny.start();
}
} else {
_root.deny.start();
}
}
Instance of Symbol 491 MovieClip in Symbol 541 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
on (release) {
if (_root.cammos[3] < _root.maxammos[3]) {
if ((_root.points - 60) >= 0) {
_root.cammos[3] = _root.cammos[3] + 10;
_root.points = _root.points - 60;
_root.click.start();
} else {
_root.deny.start();
}
} else {
_root.deny.start();
}
}
Instance of Symbol 461 MovieClip in Symbol 541 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.maxammos[3] == _root.maxammos2[3]) {
this.gotoAndStop(3);
} else if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
on (release) {
if (_root.maxammos[3] == _root.maxammos2[3]) {
_root.click.start();
} else if ((_root.points - _root.w3mc) >= 0) {
_root.maxammos[3] = _root.maxammos[3] + 5;
_root.points = _root.points - _root.w3mc;
_root.w3mc = _root.w3mc + 20;
} else {
_root.deny.start();
}
}
Instance of Symbol 473 MovieClip "w3level" in Symbol 541 MovieClip Frame 1
onClipEvent (enterFrame) {
this.gotoAndStop(_root.healthlevel - 3);
}
Instance of Symbol 491 MovieClip in Symbol 541 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.availweapons[4]) {
if (!_root.activeweapons[4]) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else {
this.gotoAndStop(4);
}
} else {
this.gotoAndStop(3);
}
}
on (release) {
if (_root.availweapons[4]) {
if (!_root.activeweapons[4]) {
if ((_root.points - _root.w4cost) >= 0) {
_root.points = _root.points - _root.w4cost;
_root.activeweapons[4] = true;
_root.click.start();
} else {
_root.deny.start();
}
} else {
_root.deny.start();
}
} else {
_root.deny.start();
}
}
Instance of Symbol 491 MovieClip in Symbol 541 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
on (release) {
if (_root.cammos[4] < _root.maxammos[4]) {
if ((_root.points - 50) >= 0) {
_root.cammos[4] = _root.cammos[4] + 5;
_root.points = _root.points - 50;
_root.click.start();
} else {
_root.deny.start();
}
} else {
_root.deny.start();
}
}
Instance of Symbol 461 MovieClip in Symbol 541 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.maxammos[4] == _root.maxammos2[4]) {
this.gotoAndStop(3);
} else if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
on (release) {
if (_root.maxammos[4] == _root.maxammos2[4]) {
_root.deny.start();
} else if ((_root.points - _root.w4mc) >= 0) {
_root.maxammos[4] = _root.maxammos[4] + 3;
_root.points = _root.points - _root.w4mc;
_root.w4mc = _root.w4mc + 20;
_root.click.start();
} else {
_root.deny.start();
}
}
Instance of Symbol 473 MovieClip "w4level" in Symbol 541 MovieClip Frame 1
onClipEvent (enterFrame) {
this.gotoAndStop(_root.healthlevel - 3);
}
Instance of Symbol 491 MovieClip in Symbol 541 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.availweapons[5]) {
if (!_root.activeweapons[5]) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else {
this.gotoAndStop(4);
}
} else {
this.gotoAndStop(3);
}
}
on (release) {
if (_root.availweapons[5]) {
if (!_root.activeweapons[5]) {
if ((_root.points - _root.w5cost) >= 0) {
_root.points = _root.points - _root.w5cost;
_root.activeweapons[5] = true;
_root.click.start();
} else {
_root.deny.start();
}
} else {
_root.deny.start();
}
} else {
_root.deny.start();
}
}
Instance of Symbol 491 MovieClip in Symbol 541 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
on (release) {
if (_root.cammos[5] < _root.maxammos[5]) {
if ((_root.points - 60) >= 0) {
_root.cammos[5] = _root.cammos[5] + 1;
_root.points = _root.points - 60;
_root.click.start();
} else {
_root.deny.start();
}
} else {
_root.deny.start();
}
}
Instance of Symbol 461 MovieClip in Symbol 541 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.maxammos[5] == _root.maxammos2[5]) {
this.gotoAndStop(3);
} else if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
on (release) {
if (_root.maxammos[5] == _root.maxammos2[5]) {
_root.deny.start();
} else if ((_root.points - _root.w5mc) >= 0) {
_root.maxammos[5] = _root.maxammos[5] + 1;
_root.points = _root.points - _root.w5mc;
_root.w5mc = _root.w5mc + 20;
_root.click.start();
} else {
_root.deny.start();
}
}
Instance of Symbol 473 MovieClip "w5level" in Symbol 541 MovieClip Frame 1
onClipEvent (enterFrame) {
this.gotoAndStop(_root.healthlevel - 3);
}
Instance of Symbol 522 MovieClip in Symbol 541 MovieClip Frame 1
onClipEvent (load) {
if (_root.cheated) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 540 MovieClip "pieman" in Symbol 541 MovieClip Frame 1
onClipEvent (enterFrame) {
this.pieman2.gotoAndStop(_root.piemancolour);
}
Symbol 545 MovieClip Frame 1
stop();
Symbol 551 MovieClip Frame 1
stop();
Instance of Symbol 550 MovieClip in Symbol 551 MovieClip Frame 2
onClipEvent (enterFrame) {
_rotation = (_rotation + 10);
}
Symbol 564 MovieClip Frame 1
stop();
Symbol 564 MovieClip Frame 11
stop();
Symbol 567 MovieClip Frame 1
stop();
Symbol 569 MovieClip Frame 1
stop();
Symbol 572 MovieClip Frame 1
stop();
Symbol 572 MovieClip Frame 16
stop();
Symbol 572 MovieClip Frame 30
gotoAndPlay (1);
Symbol 576 MovieClip Frame 1
stop();
Symbol 590 MovieClip Frame 1
stop();
Symbol 597 MovieClip Frame 1
stop();
Symbol 605 MovieClip Frame 1
stop();
Symbol 621 MovieClip Frame 1
onEnterFrame = function () {
gframer = _root.framer;
};
Symbol 625 MovieClip Frame 1
stop();
Symbol 629 MovieClip Frame 1
stop();
Symbol 633 MovieClip Frame 1
stop();
Symbol 637 MovieClip Frame 1
stop();
Symbol 641 MovieClip Frame 1
stop();
Symbol 661 MovieClip Frame 1
stop();
Instance of Symbol 621 MovieClip in Symbol 662 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.gfps) {
this._y = 28.8;
} else {
this._y = 7.8;
}
}
Instance of Symbol 625 MovieClip "weapon1" in Symbol 662 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.pieman.wtype == 1) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 629 MovieClip "weapon2" in Symbol 662 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.pieman.wtype == 2) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 633 MovieClip "weapon3" in Symbol 662 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.pieman.wtype == 3) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 637 MovieClip "weapon4" in Symbol 662 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.pieman.wtype == 4) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 641 MovieClip "weapon5" in Symbol 662 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.pieman.wtype == 5) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Symbol 684 MovieClip Frame 1
stop();
Symbol 690 MovieClip Frame 1
stop();
Symbol 701 MovieClip Frame 1
stop();
Symbol 720 MovieClip Frame 1
stop();
Symbol 723 MovieClip Frame 1
stop();
Symbol 723 MovieClip Frame 320
gotoAndPlay (2);
Symbol 731 MovieClip Frame 1
stop();
Symbol 734 MovieClip Frame 1
stop();
Symbol 737 MovieClip Frame 1
stop();
Symbol 740 MovieClip Frame 1
stop();
Symbol 752 MovieClip Frame 1
stop();
Symbol 753 MovieClip Frame 1
stop();
Symbol 795 MovieClip Frame 1
stop();
Symbol 795 MovieClip Frame 40
gotoAndPlay (2);
Symbol 795 MovieClip Frame 41
stop();
Symbol 827 Button
on (release) {
gotoAndStop (31);
}
Symbol 832 Button
on (release) {
gotoAndStop (30);
}
Symbol 836 Button
on (release) {
gotoAndStop (40);
}
Symbol 842 Button
on (release) {
gotoAndStop (36);
}
Symbol 858 Button
on (release) {
gotoAndStop (6);
}
on (rollOver) {
_root.storyalpha = 25;
}
on (rollOut) {
_root.storyalpha = 0;
}
on (releaseOutside) {
_root.storyalpha = 0;
}
Symbol 861 Button
on (release) {
gotoAndStop (37);
}
on (rollOver) {
_root.skillalpha = 25;
}
on (rollOut) {
_root.skillalpha = 0;
}
on (releaseOutside) {
_root.skillalpha = 0;
}
Symbol 864 Button
on (release) {
gotoAndStop (33);
}
on (rollOver) {
_root.endalpha = 25;
}
on (rollOut) {
_root.endalpha = 0;
}
on (releaseOutside) {
_root.endalpha = 0;
}
Symbol 870 Button
on (release) {
gotoAndStop (41);
}
on (rollOver) {
_root.trainalpha = 25;
}
on (rollOut) {
_root.trainalpha = 0;
}
on (releaseOutside) {
_root.trainalpha = 0;
}
Symbol 872 Button
on (release) {
gotoAndStop (34);
}
Symbol 877 Button
on (release) {
if (!_root.sentendscore) {
if (!_root.cheated) {
_root.sentendscore = true;
_root.click.start();
gotoAndStop (35);
} else {
_root.deny.start();
}
} else {
_root.deny.start();
}
}
Symbol 890 MovieClip Frame 1
stop();
Symbol 894 Button
on (release) {
gotoAndStop (33);
}
Symbol 928 Button
on (release) {
gotoAndStop (38);
}
Symbol 933 Button
on (release) {
if (!_root.sentskillscore) {
if (!_root.cheated) {
_root.sentskillscore = true;
gotoAndStop (39);
_root.click.start();
} else {
_root.deny.start();
}
} else {
_root.deny.start();
}
}
Symbol 941 Button
on (release) {
gotoAndStop (37);
}
Symbol 1003 MovieClip Frame 130
gotoAndPlay (1);