Frame 1
function sitelock(urls_allowed) {
lock = true;
domain_parts = _url.split("://");
real_domain = domain_parts[1].split("/");
domain.text = real_domain[0];
for (x in urls_allowed) {
if (urls_allowed[x] == real_domain[0]) {
lock = false;
}
}
if (lock) {
_global.showTheAd = true;
}
}
_global.showTheAd = false;
urls_allowed = ["agame.com", "chat.kongregate.com", "gamesheep.com", "ejocuri.ro", "kaisergames.de"];
sitelock(urls_allowed);
var myMenu = new ContextMenu();
myMenu.hideBuiltInItems();
copyrightNotice.separatorBefore = true;
myMenu.customItems.push(mySiteLink, copyrightNotice);
_root.menu = myMenu;
bytes_loaded = Math.round(_root.getBytesLoaded());
bytes_total = Math.round(_root.getBytesTotal());
getPercent = bytes_loaded / bytes_total;
_root.loadBar._width = getPercent * 100;
_root.loadText = Math.round(getPercent * 100) + "%";
if (bytes_loaded == bytes_total) {
if (_global.showTheAd) {
_root.gotoAndPlay(4);
}
if (!_global.showTheAd) {
_root.gotoAndPlay(5);
}
}
Instance of Symbol 7 MovieClip in Frame 1
on (release) {
getURL ("http://www.turbonuke.com/?gamereferal=aghzombies", "_blank");
}
Frame 2
gotoAndPlay (1);
Frame 3
stopAllSounds();
Frame 4
stop();
var CPMStarContentSpotID = "5753Q3B37329B";
System.security.allowDomain("server.cpmstar.com");
adBox.loadMovie("http://server.cpmstar.com/adviewas2.swf?contentspotid=" + CPMStarContentSpotID);
adtimer = 0;
playButtonClip.onEnterFrame = function () {
adtimer++;
if (adtimer > 300) {
playButtonClip._y = 410;
}
};
Instance of Symbol 1203 MovieClip "playButtonClip" in Frame 4
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (release) {
_root.nextFrame();
}
Instance of Symbol 10 MovieClip [Intro_TurboNuke] in Frame 5
on (release) {
getURL ("http://www.turbonuke.com/?gamereferal=aghzombies", "_blank");
}
Frame 6
stop();
disTimer = 0;
_global.spl = 0;
playerSelected = 0;
_global.contGame = false;
pb.onRelease = function () {
nextFrame();
};
sub.onRelease = function () {
getURL ("http://www.turbonuke.com/?gamereferal=aghzombies", "_blank");
};
onEnterFrame = function () {
if (disTimer < 45) {
disTimer++;
}
if (disTimer == 44) {
pb._x = 320;
sub._x = 320;
}
};
Instance of Symbol 1212 MovieClip "pb" in Frame 6
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 1215 MovieClip "sub" in Frame 6
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 7 MovieClip in Frame 6
on (release) {
getURL ("http://www.turbonuke.com/?gamereferal=aghzombies", "_blank");
}
Instance of Symbol 1217 MovieClip in Frame 6
on (release) {
getURL ("http://www.turbonuke.com/addgame.php?gamereferal=aghzombies", "_blank");
}
Frame 7
stop();
moveOn.onRelease = function () {
stopAllSounds();
nextFrame();
};
Frame 8
stop();
_global.weapon = "one";
one.onRelease = function () {
_global.weapon = "one";
nextFrame();
};
two.onRelease = function () {
_global.weapon = "two";
nextFrame();
};
three.onRelease = function () {
_global.weapon = "three";
nextFrame();
};
four.onRelease = function () {
_global.weapon = "four";
nextFrame();
};
five.onRelease = function () {
_global.weapon = "five";
playerPower = 7;
nextFrame();
};
six.onRelease = function () {
_global.weapon = "six";
playerPower = 7;
nextFrame();
};
seven.onRelease = function () {
_global.weapon = "seven";
playerPower = 7;
nextFrame();
};
eight.onRelease = function () {
_global.weapon = "eight";
playerPower = 7;
nextFrame();
};
nine.onRelease = function () {
_global.weapon = "nine";
playerPower = 9;
nextFrame();
};
ten.onRelease = function () {
_global.weapon = "ten";
playerPower = 9;
nextFrame();
};
eleven.onRelease = function () {
_global.weapon = "eleven";
playerPower = 9;
nextFrame();
};
twelve.onRelease = function () {
_global.weapon = "twelve";
playerPower = 9;
nextFrame();
};
thirteen.onRelease = function () {
_global.weapon = "thirteen";
playerPower = 13;
nextFrame();
};
fourteen.onRelease = function () {
_global.weapon = "fourteen";
playerPower = 13;
nextFrame();
};
fifteen.onRelease = function () {
_global.weapon = "fifteen";
playerPower = 13;
nextFrame();
};
sixteen.onRelease = function () {
_global.weapon = "sixteen";
playerPower = 13;
nextFrame();
};
seventeen.onRelease = function () {
_global.weapon = "seventeen";
playerPower = 25;
nextFrame();
};
eighteen.onRelease = function () {
_global.weapon = "eighteen";
playerPower = 25;
nextFrame();
};
nineteen.onRelease = function () {
_global.weapon = "nineteen";
playerPower = 25;
nextFrame();
};
twenty.onRelease = function () {
_global.weapon = "twenty";
playerPower = 25;
nextFrame();
};
Instance of Symbol 1227 MovieClip "nineteen" in Frame 8
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1230 MovieClip "ten" in Frame 8
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1233 MovieClip "fifteen" in Frame 8
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1236 MovieClip "three" in Frame 8
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1239 MovieClip "twenty" in Frame 8
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1242 MovieClip "fourteen" in Frame 8
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1245 MovieClip "two" in Frame 8
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1248 MovieClip "six" in Frame 8
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1251 MovieClip "four" in Frame 8
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1254 MovieClip "eight" in Frame 8
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1257 MovieClip "seventeen" in Frame 8
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1260 MovieClip "nine" in Frame 8
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1263 MovieClip "seven" in Frame 8
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1266 MovieClip "eleven" in Frame 8
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1269 MovieClip "twelve" in Frame 8
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1272 MovieClip "eighteen" in Frame 8
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1275 MovieClip "thirteen" in Frame 8
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1278 MovieClip "one" in Frame 8
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1281 MovieClip "five" in Frame 8
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1284 MovieClip "sixteen" in Frame 8
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Frame 9
stop();
onep.onRelease = function () {
playerSelected = 0;
_global.spl = 0;
nextFrame();
};
twop.onRelease = function () {
playerSelected = 1;
_global.spl = 1;
nextFrame();
};
Instance of Symbol 1289 MovieClip "onep" in Frame 9
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 1290 MovieClip "twop" in Frame 9
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
Frame 10
function walkOn() {
inControl = false;
if (player._x < 120) {
player.gotoAndStop("run");
player._x = player._x + playerSpeed;
} else {
inControl = true;
}
}
function removeall() {
hassan.removeMovieClip();
carryOn.removeMovieClip();
comboBox.removeMovieClip();
nearground.removeMovieClip();
sfg.removeMovieClip();
sfg2.removeMovieClip();
removeshot();
removeport();
removepickAttack();
removemoveAbout();
removeblocks();
removeDead_body();
removeType();
removeHypArray();
removeEnemyHealth();
removeDamagedTimer();
removeHit();
removeEnemyAttackingTimer();
removeEnemyAttacking();
removeEnemy();
removewhere();
removebeingSmacked();
removeonPlatform();
removeportTimer();
removeeyspeed();
removeejumpamount();
removeejump();
removeeonfloor();
removeedropping();
removepotions();
removeboxes();
removeboxHealth();
removeboxHit();
removeboxHitTimer();
removepotionType();
removeDepths();
removezombieSpots();
removezombieSpotsFade();
removeerase();
removealive();
removegroundMarker();
removehitPose();
}
function removezombieSpots() {
i = zombieSpots.length - 1;
while (i >= 0) {
zombieSpots[i].removeMovieClip();
zombieSpots.splice(i, 1);
i--;
}
}
function removezombieSpotsFade() {
i = zombieSpotsFade.length - 1;
while (i >= 0) {
zombieSpotsFade[i].removeMovieClip();
zombieSpotsFade.splice(i, 1);
i--;
}
}
function removeerase() {
i = erase.length - 1;
while (i >= 0) {
erase[i].removeMovieClip();
erase.splice(i, 1);
i--;
}
}
function removealive() {
i = alive.length - 1;
while (i >= 0) {
alive[i].removeMovieClip();
alive.splice(i, 1);
i--;
}
}
function removegroundMarker() {
i = groundMarker.length - 1;
while (i >= 0) {
groundMarker[i].removeMovieClip();
groundMarker.splice(i, 1);
i--;
}
}
function removehitPose() {
i = hitPose.length - 1;
while (i >= 0) {
hitPose[i].removeMovieClip();
hitPose.splice(i, 1);
i--;
}
}
function removeboxHealth() {
i = boxHealth.length - 1;
while (i >= 0) {
boxHealth[i].removeMovieClip();
boxHealth.splice(i, 1);
i--;
}
}
function removeboxHit() {
i = boxHit.length - 1;
while (i >= 0) {
boxHit[i].removeMovieClip();
boxHit.splice(i, 1);
i--;
}
}
function removeboxHitTimer() {
i = boxHitTimer.length - 1;
while (i >= 0) {
boxHitTimer[i].removeMovieClip();
boxHitTimer.splice(i, 1);
i--;
}
}
function removeboxes() {
i = boxes.length - 1;
while (i >= 0) {
boxes[i].removeMovieClip();
boxes.splice(i, 1);
i--;
}
}
function removepotionType() {
i = potionType.length - 1;
while (i >= 0) {
potionType[i].removeMovieClip();
potionType.splice(i, 1);
i--;
}
}
function removepotions() {
i = potions.length - 1;
while (i >= 0) {
potions[i].removeMovieClip();
potions.splice(i, 1);
i--;
}
}
function removeeyspeed() {
i = eyspeed.length - 1;
while (i >= 0) {
eyspeed[i].removeMovieClip();
eyspeed.splice(i, 1);
i--;
}
}
function removeejumpamount() {
i = ejumpamount.length - 1;
while (i >= 0) {
ejumpamount[i].removeMovieClip();
ejumpamount.splice(i, 1);
i--;
}
}
function removeejump() {
i = ejump.length - 1;
while (i >= 0) {
ejump[i].removeMovieClip();
ejump.splice(i, 1);
i--;
}
}
function removeeonfloor() {
i = eonfloor.length - 1;
while (i >= 0) {
eonfloor[i].removeMovieClip();
eonfloor.splice(i, 1);
i--;
}
}
function removeedropping() {
i = edropping.length - 1;
while (i >= 0) {
edropping[i].removeMovieClip();
edropping.splice(i, 1);
i--;
}
}
function removeportTimer() {
i = portTimer.length - 1;
while (i >= 0) {
portTimer[i].removeMovieClip();
portTimer.splice(i, 1);
i--;
}
}
function removeshot() {
i = shot.length - 1;
while (i >= 0) {
shot[i].removeMovieClip();
shot.splice(i, 1);
i--;
}
}
function removeport() {
i = port.length - 1;
while (i >= 0) {
port[i].removeMovieClip();
port.splice(i, 1);
i--;
}
}
function removepickAttack() {
i = pickAttack.length - 1;
while (i >= 0) {
pickAttack[i].removeMovieClip();
pickAttack.splice(i, 1);
i--;
}
}
function removeblocks() {
i = blocks.length - 1;
while (i >= 0) {
blocks[i].removeMovieClip();
blocks.splice(i, 1);
i--;
}
}
function removebeingSmacked() {
i = beingSmacked.length - 1;
while (i >= 0) {
beingSmacked[i].removeMovieClip();
beingSmacked.splice(i, 1);
i--;
}
}
function removemoveAbout() {
i = moveAbout.length - 1;
while (i >= 0) {
moveAbout[i].removeMovieClip();
moveAbout.splice(i, 1);
i--;
}
}
function removewhere() {
i = where.length - 1;
while (i >= 0) {
where[i].removeMovieClip();
where.splice(i, 1);
i--;
}
}
function removeonPlatform() {
i = onPlatform.length - 1;
while (i >= 0) {
onPlatform[i].removeMovieClip();
onPlatform.splice(i, 1);
i--;
}
}
function removeDead_body() {
i = dead_body.length - 1;
while (i >= 0) {
dead_body[i].removeMovieClip();
dead_body.splice(i, 1);
i--;
}
}
function removeType() {
i = type.length - 1;
while (i >= 0) {
type[i].removeMovieClip();
type.splice(i, 1);
i--;
}
}
function removeHypArray() {
i = hypArray.length - 1;
while (i >= 0) {
hypArray[i].removeMovieClip();
hypArray.splice(i, 1);
i--;
}
}
function removeEnemyHealth() {
i = enemyHealth.length - 1;
while (i >= 0) {
enemyHealth[i].removeMovieClip();
enemyHealth.splice(i, 1);
i--;
}
}
function removeDamagedTimer() {
i = damagedTimer.length - 1;
while (i >= 0) {
damagedTimer[i].removeMovieClip();
damagedTimer.splice(i, 1);
i--;
}
}
function removeHit() {
i = hit.length - 1;
while (i >= 0) {
hit[i].removeMovieClip();
hit.splice(i, 1);
i--;
}
}
function removeEnemyAttackingTimer() {
i = enemyAttackingTimer.length - 1;
while (i >= 0) {
enemyAttackingTimer[i].removeMovieClip();
enemyAttackingTimer.splice(i, 1);
i--;
}
}
function removeEnemyAttacking() {
i = enemyAttacking.length - 1;
while (i >= 0) {
enemyAttacking[i].removeMovieClip();
enemyAttacking.splice(i, 1);
i--;
}
}
function removeEnemy() {
i = enemy.length - 1;
while (i >= 0) {
enemy[i].removeMovieClip();
enemy.splice(i, 1);
i--;
}
}
function removeDepths() {
i = depths.length - 1;
while (i >= 0) {
depths[i].removeMovieClip();
depths.splice(i, 1);
i--;
}
}
function shaker() {
if (shake == 0) {
_root._x = 0;
_root._y = 0;
} else if (shake == 1) {
shake = shake + 1;
_root._x = _root._x + 2;
_root._y = _root._y + 2;
} else if (shake == 2) {
shake = shake + 1;
_root._y = _root._y - 4;
_root._x = _root._x - 4;
} else if (shake == 3) {
shake = shake + 1;
_root._x = _root._x + 1;
_root._y = _root._y + 1;
} else if (shake == 4) {
shake = shake + 1;
_root._x = 0;
_root._y = 0;
} else if (shake == 5) {
shake = shake + 1;
_root._x = 4;
_root._y = 4;
} else if (shake == 6) {
shake = shake + 1;
_root._x = 2;
_root._y = 2;
} else if (shake == 7) {
shake = shake + 1;
_root._x = 0;
_root._y = 0;
} else if (shake == 8) {
shake = shake + 1;
_root._x = _root._x + 2;
_root._y = _root._y + 2;
} else if (shake == 9) {
shake = shake + 1;
_root._y = _root._y - 4;
_root._x = _root._x - 4;
} else if (shake == 10) {
shake = shake + 1;
_root._x = _root._x + 1;
_root._y = _root._y + 1;
} else if (shake == 11) {
shake = shake + 1;
_root._x = 0;
_root._y = 0;
} else if (shake == 12) {
shake = shake + 1;
_root._x = 4;
_root._y = 4;
} else if (shake == 13) {
shake = shake + 1;
_root._x = 2;
_root._y = 2;
} else if (shake == 14) {
shake = shake + 1;
_root._x = _root._x + 1;
_root._y = _root._y + 1;
} else if (shake == 15) {
shake = shake + 1;
_root._x = 0;
_root._y = 0;
} else if (shake == 16) {
shake = shake + 1;
_root._x = _root._x + 2;
_root._y = _root._y + 2;
} else if (shake == 17) {
shake = shake + 1;
_root._y = _root._y - 4;
_root._x = _root._x - 4;
} else if (shake == 18) {
shake = shake + 1;
_root._x = _root._x + 1;
_root._y = _root._y + 1;
} else if (shake == 19) {
shake = shake + 1;
_root._x = 0;
_root._y = 0;
} else if (shake == 20) {
shake = shake + 1;
_root._x = 4;
_root._y = 4;
} else if (shake == 21) {
shake = shake + 1;
_root._x = 2;
_root._y = 2;
} else if (shake == 22) {
shake = shake + 1;
_root._x = 0;
_root._y = 0;
} else if (shake == 23) {
shake = shake + 1;
_root._x = _root._x + 2;
_root._y = _root._y + 2;
} else if (shake == 24) {
shake = shake + 1;
_root._y = _root._y - 4;
_root._x = _root._x - 4;
} else if (shake == 25) {
shake = shake + 1;
_root._x = _root._x + 1;
_root._y = _root._y + 1;
} else if (shake == 26) {
shake = shake + 1;
_root._x = 0;
_root._y = 0;
} else if (shake == 27) {
shake = shake + 1;
_root._x = 4;
_root._y = 4;
} else if (shake == 28) {
shake = shake + 1;
_root._x = 2;
_root._y = 2;
} else if (shake > 29) {
shake = 0;
_root._x = _root._x + 1;
_root._y = _root._y + 1;
}
}
function waveActions() {
if (((distance == 6) && (markWave < 0)) && (!canGo)) {
inControl = false;
if (waitAsec < 60) {
if (!zombieMode) {
player.gotoAndStop("idle");
}
if (zombieMode) {
player.gotoAndStop("zidle");
}
}
waitAsec++;
if (waitAsec > 59) {
player._xscale = 100;
if (!zombieMode) {
player.gotoAndStop("run");
}
if (zombieMode) {
player.gotoAndStop("zrun");
}
player._x = player._x + playerSpeed;
if (player._x > 710) {
if (toGo == 0) {
_root.attachMovie("trans", "trans", _root.getNextHighestDepth());
}
toGo++;
if (toGo == 27) {
removeall();
stopAllSounds();
nextFrame();
}
}
}
}
if (getThingsGoing) {
if (startGameTimer > 80) {
addenemies();
getThingsGoing = false;
}
}
if (distance == 3) {
if (addBoss == 0) {
randomNumber++;
enemy_ = _root.attachMovie("firstboss", "firstboss" + randomNumber, _root.getNextHighestDepth(), {_y:fg._y + 200, _x:1120});
depths.push(enemy_);
enemy.push(enemy_);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push("bossOne");
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(75);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
hitPose.push(0);
groundMarker.push(enemy_._y);
alive.push(true);
erase.push(0);
noBoss = false;
addBoss = 1;
}
}
if (noBoss) {
if (distance < 6) {
if (markWave < 0) {
if (player._x < 410) {
if (yesGo == 0) {
distance++;
_root.attachMovie("gogo", "gogo", _root.getNextHighestDepth());
}
yesGo = 1;
canGo = true;
}
}
}
}
if (steps > 130) {
addenemies();
gogo.removeMovieClip();
yesGo = 0;
markWave = 2;
canGo = false;
steps = 0;
}
}
function shotActions() {
i = shot.length - 1;
while (i >= 0) {
if (shot[i]._y > 300) {
randomNumber++;
hitGround_mc = _root.attachMovie("hitGround", "hitGround" + randomNumber, _root.getNextHighestDepth(), {_x:shot[i]._x, _y:shot[i]._y});
hitGround_mc._xscale = shot[i]._xscale;
shot[i].removeMovieClip();
shot.splice(i, 1);
}
j = enemy.length - 1;
while (j >= 0) {
if (shot[i].hitTest(enemy[j])) {
if (type[j] == 0) {
ejump[j] = true;
eonfloor[j] = false;
eyspeed[j] = 0;
eyspeed[j] = eyspeed[j] - ejumpamount[j];
}
hitPose[j]++;
if (hitPose[j] > 1) {
hitPose[j] = 0;
}
randomNumber++;
fbhit_mc = _root.attachMovie("fbhit", "fbhit" + randomNumber, _root.getNextHighestDepth(), {_y:shot[i]._y, _x:shot[i]._x});
fbhit_mc._xscale = shot[i]._xscale;
randomNumber++;
blood_mc = _root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_y:enemy[j]._y, _x:enemy[j]._x});
ehit_sound.start();
beingSmacked[j]++;
randomNumber++;
comboCounter++;
displayTimer = 16;
hitEm = _root.attachMovie("oneHit", "oneHit" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[j]._x, _y:enemy[j]._y});
comboBox.cnum.text = comboCounter;
hit[j] = 1;
damagedTimer[j] = 0;
enemyHealth[j] = enemyHealth[j] - (playerPower * 5);
shot[i].removeMovieClip();
shot.splice(i, 1);
}
j--;
}
i--;
}
}
function swapdepths() {
i = depths.length - 1;
while (i >= 0) {
if (!jump) {
depths[i].idiot_depth = Math.floor((depths[i]._y * 480) + depths[i]._x);
depths[i].swapDepths(depths[i].idiot_depth);
}
i--;
}
}
function noOverLap() {
i = enemy.length - 1;
while (i >= 0) {
j = enemy.length - 1;
while (j >= 0) {
if (!(enemy[i] === enemy[j])) {
if (enemy[i].hitTest(enemy[j])) {
if (alive[i] && (type[i] == 0)) {
endX = _root.enemy[j]._x;
enemy[i]._x = enemy[i]._x - ((endX - enemy[i]._x) / enemySpeed);
}
}
}
j--;
}
i--;
}
}
function calculateHyp() {
i = enemy.length - 1;
while (i >= 0) {
dist_x = player._x - enemy[i]._x;
hypArray[i] = Math.sqrt(dist_x * dist_x);
i--;
}
}
function enemyHealthReachesZero() {
i = enemy.length - 1;
while (i >= 0) {
if (enemyHealth[i] < 1) {
alive[i] = false;
if (erase[i] == 0) {
if (type[i] == 0) {
markWave--;
}
if (type[i] == "bossOne") {
noBoss = true;
}
}
erase[i]++;
if (erase[i] == 52) {
soapDrop = Math.round(Math.random() * 4) + 0;
if (soapDrop == 0) {
if (eonfloor[i]) {
if (enemy[i]._xscale == 100) {
randomNumber++;
soap_clip = _root.attachMovie("soap_mc", "soap_mc" + randomNumber, _root.getNextHighestDepth(), {_y:enemy[i]._y + 15, _x:enemy[i]._x + 50});
potions.push(soap_clip);
depths.push(soap_clip);
potionType.push(1);
}
if (enemy[i]._xscale == -100) {
randomNumber++;
soap_clip = _root.attachMovie("soap_mc", "soap_mc" + randomNumber, _root.getNextHighestDepth(), {_y:enemy[i]._y + 15, _x:enemy[i]._x - 50});
potions.push(soap_clip);
depths.push(soap_clip);
potionType.push(1);
}
}
}
enemy[i].removeMovieClip();
enemy.splice(i, 1);
portTimer.splice(i, 1);
hit.splice(i, 1);
type.splice(i, 1);
damagedTimer.splice(i, 1);
enemyHealth.splice(i, 1);
enemyAttacking.splice(i, 1);
enemyAttackingTimer.splice(i, 1);
hypArray.splice(i, 1);
moveAbout.splice(i, 1);
where.splice(i, 1);
onPlatform.splice(i, 1);
beingSmacked.splice(i, 1);
pickAttack.splice(i, 1);
port.splice(i, 1);
edropping.splice(i, 1);
eonfloor.splice(i, 1);
ejump.splice(i, 1);
ejumpamount.splice(i, 1);
eyspeed.splice(i, 1);
alive.splice(i, 1);
erase.splice(i, 1);
groundMarker.splice(i, 1);
hitPose.splice(i, 1);
}
}
i--;
}
}
function enemyMovement() {
death_stick.onEnterFrame = function () {
if (canGo) {
if (fg._x > -1916.9) {
if (player._x > 410) {
this._x = this._x - 5;
}
}
}
if (Key.isDown(38)) {
if ((fg._y > 120) && (fg._y < 240)) {
this._y = this._y + 3;
}
}
if (Key.isDown(40)) {
if ((fg._y > 120) && (fg._y < 240)) {
this._y = this._y - 3;
}
}
death_stick_timer++;
if (death_stick_timer == 50) {
death_stick_timer = 0;
this.removeMovieClip();
}
if ((this.hitTest(player) && (death_stick_timer > 30)) && (player._y < this._y)) {
if (((!zombieMode) && (!special)) && (!gotSoap)) {
hitPlayer = 1;
playerHealth = playerHealth - (enemyPower * 1.5);
}
}
};
i = enemy.length - 1;
while (i >= 0) {
if (type[i] == "bossOne") {
if (!alive[i]) {
enemy[i].gotoAndStop("dead");
}
if (alive[i]) {
if (!playerAlive) {
hit[i] = 0;
damagedTimer[i] = 0;
enemy[i].gotoAndStop("idle");
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 50) + 0;
}
if (playerAlive) {
if (player._x < enemy[i]._x) {
enemy[i]._xscale = 100;
} else {
enemy[i]._xscale = -100;
}
enemyAttackingTimer[i]++;
if (enemyAttackingTimer[i] > 100) {
enemy[i].gotoAndStop("attack");
enemyAttacking[i] = 1;
if (!jump) {
if (enemyAttackingTimer[i] == 110) {
randomNumber++;
death_stick = _root.attachMovie("stick", "stick" + randomNumber, _root.getNextHighestDepth(), {_x:player._x, _y:player._y + 85});
depths.push(death_stick);
}
if (enemyAttackingTimer[i] == 170) {
randomNumber++;
death_stick = _root.attachMovie("stick", "stick" + randomNumber, _root.getNextHighestDepth(), {_x:player._x, _y:player._y + 85});
depths.push(death_stick);
}
}
if (enemyAttackingTimer[i] == 180) {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 50) + 0;
pickAttack[i] = Math.round(Math.random() * 3) + 0;
}
}
if (enemyAttacking[i] == 0) {
if (enemy[i].hitTest(player)) {
if (jump) {
if (((magic && (shootTimer > 20)) && (magicTimer == 0)) or (magicTimer == 5)) {
hitPose[i]++;
if (hitPose[i] > 1) {
hitPose[i] = 0;
}
randomNumber++;
blood_mc = _root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_y:enemy[i]._y, _x:enemy[i]._x});
ehit_sound.start();
beingSmacked[i]++;
randomNumber++;
comboCounter++;
displayTimer = 16;
hitEm = _root.attachMovie("oneHit", "oneHit" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
comboBox.cnum.text = comboCounter;
hit[i] = 1;
damagedTimer[i] = 0;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
if (!jump) {
if (((magic && (shootTimer > 20)) && (magicTimer == 0)) or (magicTimer == 5)) {
hitPose[i]++;
if (hitPose[i] > 1) {
hitPose[i] = 0;
}
comboCounter++;
displayTimer = 16;
randomNumber++;
blood_mc = _root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_y:enemy[i]._y, _x:enemy[i]._x});
ehit_sound.start();
beingSmacked[i]++;
randomNumber++;
hitEm = _root.attachMovie("oneHit", "oneHit" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
comboBox.cnum.text = comboCounter;
hit[i] = 1;
damagedTimer[i] = 0;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
if (enemy[i].hitTest(player)) {
if (jump) {
if (((((((is_attacking == 3) or (is_attacking == 10)) or (is_attacking == 16)) or (is_attacking == 20)) or (is_attacking == 22)) or (is_attacking == 24)) or (is_attacking == 26)) {
if (hypArray[i] < 150) {
hitPose[i]++;
if (hitPose[i] > 1) {
hitPose[i] = 0;
}
randomNumber++;
blood_mc = _root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_y:enemy[i]._y, _x:enemy[i]._x});
ehit_sound.start();
beingSmacked[i]++;
randomNumber++;
comboCounter++;
displayTimer = 16;
hitEm = _root.attachMovie("oneHit", "oneHit" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
comboBox.cnum.text = comboCounter;
hit[i] = 1;
damagedTimer[i] = 0;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
if (!jump) {
if (((is_attacking == 3) or (is_attacking == 12)) or (is_attacking == 22)) {
if (hypArray[i] < 150) {
hitPose[i]++;
if (hitPose[i] > 1) {
hitPose[i] = 0;
}
comboCounter++;
displayTimer = 16;
randomNumber++;
blood_mc = _root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_y:enemy[i]._y, _x:enemy[i]._x});
ehit_sound.start();
beingSmacked[i]++;
randomNumber++;
hitEm = _root.attachMovie("oneHit", "oneHit" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
comboBox.cnum.text = comboCounter;
hit[i] = 1;
damagedTimer[i] = 0;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
}
if (hit[i] == 1) {
if (hitPose[i] == 0) {
enemy[i].gotoAndStop("hit1");
}
if (hitPose[i] == 1) {
enemy[i].gotoAndStop("hit2");
}
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
damagedTimer[i]++;
if (damagedTimer[i] == 15) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if (hit[i] == 0) {
enemy[i].gotoAndStop("idle");
}
}
}
}
}
if (type[i] == 0) {
if (!alive[i]) {
enemy[i].gotoAndStop("dead");
}
if (ejump[i]) {
enemy[i]._y = enemy[i]._y + eyspeed[i];
if (enemy[i]._y > groundMarker[i]) {
edropping[i] = false;
eonfloor[i] = true;
ejump[i] = false;
eyspeed[i] = 0;
enemy[i]._y = groundMarker[i];
} else {
if (enemy[i]._xscale == 100) {
enemy[i]._x = enemy[i]._x + 2;
} else {
enemy[i]._x = enemy[i]._x - 2;
}
eyspeed[i] = eyspeed[i] + (gravity * 2);
}
}
if (alive[i]) {
if (!playerAlive) {
hit[i] = 0;
damagedTimer[i] = 0;
enemy[i].gotoAndStop("idle");
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 50) + 0;
}
if (playerAlive) {
if (player.hitTest(enemy[i])) {
if (ejump[i]) {
if (((((((is_attacking == 3) or (is_attacking == 10)) or (is_attacking == 16)) or (is_attacking == 20)) or (is_attacking == 22)) or (is_attacking == 24)) or (is_attacking == 26)) {
ejump[i] = true;
eonfloor[i] = false;
eyspeed[i] = 0;
eyspeed[i] = eyspeed[i] - ejumpamount[i];
}
}
if (eonfloor[i] && (enemyAttackingTimer[i] < 100)) {
if (is_attacking == 22) {
groundMarker[i] = enemy[i]._y;
ejump[i] = true;
eonfloor[i] = false;
eyspeed[i] = eyspeed[i] - ejumpamount[i];
}
}
}
if (player._x < enemy[i]._x) {
enemy[i]._xscale = 100;
} else {
enemy[i]._xscale = -100;
}
if ((hypArray[i] < 200) && (eonfloor[i])) {
if (enemyAttacking[i] == 1) {
if (enemy[i].hitTest(player)) {
invisible = false;
player._alpha = 100;
if (((!zombieMode) && (!special)) && (!gotSoap)) {
hitPlayer = 1;
playerHealth = playerHealth - (enemyPower * 1.5);
}
}
}
enemyAttackingTimer[i]++;
} else {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
if (enemyAttackingTimer[i] > 100) {
enemy[i].gotoAndStop("attack");
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] == 110) {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
pickAttack[i] = Math.round(Math.random() * 3) + 0;
}
}
if (enemyAttacking[i] == 0) {
if (enemy[i].hitTest(player)) {
if (jump) {
if (((magic && (shootTimer > 20)) && (magicTimer == 0)) or (magicTimer == 5)) {
hitPose[i]++;
if (hitPose[i] > 1) {
hitPose[i] = 0;
}
randomNumber++;
blood_mc = _root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_y:enemy[i]._y, _x:enemy[i]._x});
ehit_sound.start();
beingSmacked[i]++;
randomNumber++;
comboCounter++;
displayTimer = 16;
hitEm = _root.attachMovie("oneHit", "oneHit" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
comboBox.cnum.text = comboCounter;
hit[i] = 1;
damagedTimer[i] = 0;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
if (!jump) {
if (((magic && (shootTimer > 20)) && (magicTimer == 0)) or (magicTimer == 5)) {
hitPose[i]++;
if (hitPose[i] > 1) {
hitPose[i] = 0;
}
comboCounter++;
displayTimer = 16;
randomNumber++;
blood_mc = _root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_y:enemy[i]._y, _x:enemy[i]._x});
ehit_sound.start();
beingSmacked[i]++;
randomNumber++;
hitEm = _root.attachMovie("oneHit", "oneHit" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
comboBox.cnum.text = comboCounter;
hit[i] = 1;
damagedTimer[i] = 0;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
if (enemy[i].hitTest(player)) {
if (jump) {
if (((((((is_attacking == 3) or (is_attacking == 10)) or (is_attacking == 16)) or (is_attacking == 20)) or (is_attacking == 22)) or (is_attacking == 24)) or (is_attacking == 26)) {
if (hypArray[i] < 150) {
hitPose[i]++;
if (hitPose[i] > 1) {
hitPose[i] = 0;
}
randomNumber++;
blood_mc = _root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_y:enemy[i]._y, _x:enemy[i]._x});
ehit_sound.start();
beingSmacked[i]++;
comboCounter++;
displayTimer = 16;
randomNumber++;
hitEm = _root.attachMovie("oneHit", "oneHit" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
comboBox.cnum.text = comboCounter;
hit[i] = 1;
damagedTimer[i] = 0;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
if (!jump) {
if (((is_attacking == 3) or (is_attacking == 12)) or (is_attacking == 22)) {
if (hypArray[i] < 150) {
hitPose[i]++;
if (hitPose[i] > 1) {
hitPose[i] = 0;
}
randomNumber++;
blood_mc = _root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_y:enemy[i]._y, _x:enemy[i]._x});
ehit_sound.start();
beingSmacked[i]++;
comboCounter++;
displayTimer = 16;
randomNumber++;
hitEm = _root.attachMovie("oneHit", "oneHit" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
comboBox.cnum.text = comboCounter;
hit[i] = 1;
damagedTimer[i] = 0;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
}
if (hit[i] == 1) {
if (!magic) {
if (ejump[i]) {
if (hitPose[i] == 0) {
enemy[i].gotoAndStop("ahit1");
}
if (hitPose[i] == 1) {
enemy[i].gotoAndStop("ahit2");
}
}
if (!ejump[i]) {
if (hitPose[i] == 0) {
enemy[i].gotoAndStop("hit1");
}
if (hitPose[i] == 1) {
enemy[i].gotoAndStop("hit2");
}
}
}
if (magic && (shootTimer > 20)) {
enemy[i].gotoAndStop("shock");
}
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
damagedTimer[i]++;
if (damagedTimer[i] == 15) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if ((hit[i] == 0) && (eonfloor[i])) {
portTimer[i]++;
if (portTimer[i] > 32) {
where[i] = Math.round(Math.random() * 2) + 0;
moveAbout[i] = Math.round(Math.random() * 1) + 0;
portTimer[i] = 0;
}
if ((where[i] == 0) or (where[i] == 1)) {
if ((!ejump[i]) && (!edropping[i])) {
enemy[i].gotoAndStop("run");
}
if (moveAbout[i] == 0) {
endX = _root.player._x;
endY = _root.player._y;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) + 75) / enemySpeed);
if (!jump) {
enemy[i]._y = enemy[i]._y + ((endY - enemy[i]._y) / enemySpeed);
}
}
if (moveAbout[i] == 1) {
endX = _root.player._x;
endY = _root.player._y;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) - 75) / enemySpeed);
if (!jump) {
enemy[i]._y = enemy[i]._y + ((endY - enemy[i]._y) / enemySpeed);
}
}
} else {
enemy[i].gotoAndStop("idle");
}
}
}
}
}
}
i--;
}
}
function pushenemy() {
i = enemy.length - 1;
while (i >= 0) {
if (Key.isDown(38)) {
if ((fg._y > 120) && (fg._y < 240)) {
enemy[i]._y = enemy[i]._y + 3;
}
}
if (Key.isDown(40)) {
if ((fg._y > 120) && (fg._y < 240)) {
enemy[i]._y = enemy[i]._y - 3;
}
}
i--;
}
}
function pushHole() {
i = zombieSpots.length - 1;
while (i >= 0) {
if (Key.isDown(38)) {
if ((fg._y > 120) && (fg._y < 240)) {
zombieSpots[i]._y = zombieSpots[i]._y + 3;
}
}
if (Key.isDown(40)) {
if ((fg._y > 120) && (fg._y < 240)) {
zombieSpots[i]._y = zombieSpots[i]._y - 3;
}
}
i--;
}
}
function box() {
i = boxes.length - 1;
while (i >= 0) {
if (player.hitTest(boxes[i])) {
if (boxHealth[i] > 0) {
if (!jump) {
if (((is_attacking == 3) or (is_attacking == 12)) or (is_attacking == 22)) {
ehit_sound.start();
boxHit[i] = 1;
boxHealth[i]--;
randomNumber++;
hitEm_box = _root.attachMovie("boxHit", "boxHit" + randomNumber, _root.getNextHighestDepth(), {_x:boxes[i]._x + 50, _y:boxes[i]._y});
}
}
if (jump) {
if (((((((is_attacking == 3) or (is_attacking == 10)) or (is_attacking == 16)) or (is_attacking == 20)) or (is_attacking == 22)) or (is_attacking == 24)) or (is_attacking == 26)) {
ehit_sound.start();
boxHit[i] = 1;
boxHealth[i]--;
randomNumber++;
hitEm_box = _root.attachMovie("boxHit", "boxHit" + randomNumber, _root.getNextHighestDepth(), {_x:boxes[i]._x + 50, _y:boxes[i]._y});
}
}
}
}
if (boxHealth[i] > 10) {
boxes[i].gotoAndStop("fixed");
}
if ((boxHealth[i] > 0) && (boxHealth[i] < 10)) {
boxes[i].gotoAndStop("cracked");
}
if (boxHealth[i] == 1) {
boxHealth[i] = 0;
boxes[i].gotoAndStop("broken");
randomNumber++;
soap_clip = _root.attachMovie("soap_mc", "soap_mc" + randomNumber, _root.getNextHighestDepth(), {_y:boxes[i]._y, _x:boxes[i]._x});
potions.push(soap_clip);
depths.push(soap_clip);
potionType.push(1);
}
if (boxHit[i] == 0) {
var _local2 = boxes[i].transform.colorTransform;
boxes[i].transform.colorTransform = new flash.geom.ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
}
if (boxHit[i] == 1) {
var _local2 = boxes[i].transform.colorTransform;
_local2.rgb = 4294967295;
boxes[i].transform.colorTransform = _local2;
boxHitTimer[i]++;
if (boxHitTimer[i] == 1) {
boxHit[i] = 0;
boxHitTimer[i] = 0;
}
}
if (((((!special) && (!magic)) && (playerAlive)) && (!gotSoap)) && (inControl)) {
if (Key.isDown(38)) {
if ((fg._y > 120) && (fg._y < 240)) {
boxes[i]._y = boxes[i]._y + 3;
}
}
if (Key.isDown(40)) {
if ((fg._y > 120) && (fg._y < 240)) {
boxes[i]._y = boxes[i]._y - 3;
}
}
}
i--;
}
}
function soapActions() {
i = potions.length - 1;
while (i >= 0) {
if (player.hitTest(potions[i]._x, potions[i]._y, true)) {
if ((!attacking) && (inControl)) {
gotSoap = true;
superPower = superPower + 25;
potions[i].removeMovieClip();
potions.splice(i, 1);
potionType.splice(i, 1);
}
}
if (((((!special) && (!magic)) && (playerAlive)) && (!gotSoap)) && (inControl)) {
if (Key.isDown(38)) {
if ((fg._y > 120) && (fg._y < 240)) {
potions[i]._y = potions[i]._y + 3;
}
}
if (Key.isDown(40)) {
if ((fg._y > 120) && (fg._y < 240)) {
potions[i]._y = potions[i]._y - 3;
}
}
}
i--;
}
}
function pullUpZombies() {
i = zombieSpots.length - 1;
while (i >= 0) {
zombieSpotsFade[i]++;
if (zombieSpotsFade[i] == 70) {
randomNumber++;
enemy_ = _root.attachMovie("zombieOne", "zombie" + randomNumber, _root.getNextHighestDepth(), {_y:zombieSpots[i]._y, _x:zombieSpots[i]._x});
depths.push(enemy_);
enemy.push(enemy_);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(0);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(25);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
hitPose.push(0);
groundMarker.push(enemy_._y);
alive.push(true);
erase.push(0);
zombieSpots[i].removeMovieClip();
zombieSpots.splice(i, 1);
zombieSpotsFade.splice(i, 1);
}
i--;
}
}
function addenemies() {
hereTheyCome = true;
}
function actuallyAddEnemies() {
if (hereTheyCome) {
hereTheyComeTimer++;
}
if (hereTheyComeTimer == 10) {
shake++;
quake_sound.start();
randomNumber++;
hole = _root.attachMovie("zombiehole", "zombiehole" + randomNumber, _root.getNextHighestDepth(), {_y:Math.round(Math.random() * 70) + 330, _x:Math.round(Math.random() * 550) + 0});
zombieSpots.push(hole);
zombieSpotsFade.push(0);
depths.push(hole);
}
if (hereTheyComeTimer == 60) {
shake++;
quake_sound.start();
randomNumber++;
hole = _root.attachMovie("zombiehole", "zombiehole" + randomNumber, _root.getNextHighestDepth(), {_y:Math.round(Math.random() * 70) + 330, _x:Math.round(Math.random() * 550) + 0});
zombieSpots.push(hole);
zombieSpotsFade.push(0);
depths.push(hole);
}
if (hereTheyComeTimer == 120) {
shake++;
quake_sound.start();
randomNumber++;
hole = _root.attachMovie("zombiehole", "zombiehole" + randomNumber, _root.getNextHighestDepth(), {_y:Math.round(Math.random() * 70) + 330, _x:Math.round(Math.random() * 550) + 0});
zombieSpots.push(hole);
zombieSpotsFade.push(0);
depths.push(hole);
hereTheyComeTimer = 0;
hereTheyCome = false;
}
}
function canAddPoint() {
if (clicks == 0) {
canAddComboPoint = true;
} else {
canAddComboPoint = false;
}
}
function runAttackTimer() {
if (attacking) {
if (!jump) {
playerSpeed = 1;
}
is_attacking++;
} else {
playerSpeed = 10;
}
}
function confirmAttacking() {
if (clicks > 0) {
attacking = true;
}
}
function comboOne() {
if (!addSecondCombo) {
if (!addThirdCombo) {
if (addFirstCombo) {
if (attacking) {
if (jump) {
if (!zombieMode) {
player.gotoAndStop("aattack2");
}
if (zombieMode) {
player.gotoAndStop("azattack");
}
}
if (!jump) {
if (!zombieMode) {
player.gotoAndStop("attack2");
}
if (zombieMode) {
player.gotoAndStop("zattack");
}
}
if (is_attacking == 7) {
if (jump && (player._y > 180)) {
yspeed = 0;
yspeed = yspeed - 20;
}
addFirstCombo = false;
if (clicks == 1) {
smack = 0;
clicks = 0;
is_attacking = 0;
attacking = false;
}
if (clicks > 1) {
smack = 0;
addSecondCombo = true;
}
}
}
}
}
}
}
function comboTwo() {
if (!addFirstCombo) {
if (!addThirdCombo) {
if (addSecondCombo) {
if (attacking) {
if (jump) {
if (!zombieMode) {
player.gotoAndStop("aattack");
}
if (zombieMode) {
player.gotoAndStop("azattack2");
}
}
if (!jump) {
if (!zombieMode) {
player.gotoAndStop("attack");
}
if (zombieMode) {
player.gotoAndStop("zattack2");
}
}
if (is_attacking == 19) {
if (jump && (player._y > 180)) {
yspeed = 0;
yspeed = yspeed - 20;
}
addSecondCombo = false;
if (clicks == 2) {
smack = 0;
clicks = 0;
is_attacking = 0;
attacking = false;
}
if (clicks > 2) {
smack = 0;
addThirdCombo = true;
}
}
}
}
}
}
}
function comboThree() {
if (!addFirstCombo) {
if (!addSecondCombo) {
if (addThirdCombo) {
if (attacking) {
if (jump) {
if (!zombieMode) {
player.gotoAndStop("aattack3");
}
if (zombieMode) {
player.gotoAndStop("azattack3");
}
}
if (!jump) {
if (!zombieMode) {
player.gotoAndStop("attack3");
}
if (zombieMode) {
player.gotoAndStop("zattack3");
}
}
if (is_attacking == 26) {
if (jump && (player._y > 180)) {
yspeed = 0;
yspeed = yspeed - 20;
}
addThirdCombo = false;
if (clicks == 3) {
smack = 0;
clicks = 0;
is_attacking = 0;
attacking = false;
}
if (clicks > 3) {
smack = 0;
clicks = 1;
is_attacking = 0;
addFirstCombo = true;
}
}
}
}
}
}
}
function playerMovement() {
if (hitPlayer == 0) {
var _local4 = player.transform.colorTransform;
player.transform.colorTransform = new flash.geom.ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
}
if (hitPlayer == 1) {
var _local4 = player.transform.colorTransform;
_local4.rgb = 4294967295;
player.transform.colorTransform = _local4;
hitTimer++;
if (hitTimer == 1) {
hitPlayer = 0;
hitTimer = 0;
}
}
if ((player._x < 46) && (inControl)) {
player._x = 46;
}
if (canGo && (inControl)) {
if (fg._x > -1916.9) {
if (player._x > 410) {
i = enemy.length - 1;
while (i >= 0) {
enemy[i]._x = enemy[i]._x - 5;
i--;
}
j = boxes.length - 1;
while (j >= 0) {
boxes[j]._x = boxes[j]._x - 5;
j--;
}
k = potions.length - 1;
while (k >= 0) {
potions[k]._x = potions[k]._x - 5;
k--;
}
moved++;
sfg._x = sfg._x - 5;
sfg2._x = sfg2._x - 5;
bg._x = bg._x - 5;
fg._x = fg._x - 5;
steps++;
player._x = 410;
}
}
}
if ((player._x > 590) && (inControl)) {
player._x = 590;
}
if (inControl) {
if (playerAlive) {
if (!gotSoap) {
if (!magic) {
if (!jump) {
if (!special) {
if (!attacking) {
if (!running) {
if (!zombieMode) {
player.gotoAndStop("idle");
}
if (zombieMode) {
player.gotoAndStop("zidle");
}
}
if (running) {
if (!zombieMode) {
player.gotoAndStop("run");
}
if (zombieMode) {
player.gotoAndStop("zrun");
}
}
}
}
}
}
}
}
}
if (!Key.isDown(68)) {
magicTimer = 0;
shootTimer = 0;
magic = false;
airMagic = false;
}
if (Key.isDown(68)) {
if (inControl) {
if (playerAlive) {
if (!gotSoap) {
if (!special) {
if (!attacking) {
if (superPower > 10) {
if (!jump) {
magic = true;
}
if (jump) {
airMagic = true;
}
}
}
}
}
}
}
}
if (airMagic) {
if (!zombieMode) {
player.gotoAndStop("aspecial");
}
if (zombieMode) {
player.gotoAndStop("zaspecial");
}
if ((magicAttack + 200) < getTimer()) {
fbsfx_sound.start();
superPower = superPower - 10;
if (superPower < 0) {
airMagic = false;
}
magicAttack = getTimer();
yspeed = 0;
if (initial == 0) {
initial = 1;
yspeed = yspeed - 35;
} else {
yspeed = yspeed - 10;
}
if (player._xscale == 100) {
randomNumber++;
fireball_mc = _root.attachMovie("fireball", "fireball" + randomNumber, _root.getNextHighestDepth(), {_y:player._y, _x:player._x});
shot.push(fireball_mc);
fireball_mc.onEnterFrame = function () {
this._x = this._x + 15;
this._y = this._y + 15;
};
}
if (player._xscale == -100) {
randomNumber++;
fireball_mc = _root.attachMovie("fireball", "fireball" + randomNumber, _root.getNextHighestDepth(), {_y:player._y, _x:player._x});
fireball_mc._xscale = -100;
shot.push(fireball_mc);
fireball_mc.onEnterFrame = function () {
this._x = this._x - 15;
this._y = this._y + 15;
};
}
}
}
if (magic) {
superPower = superPower - 0.5;
shootTimer++;
if (shootTimer > 20) {
magicTimer++;
}
if (magicTimer == 5) {
magicTimer = 0;
}
if (!zombieMode) {
player.gotoAndStop("gspecial");
}
if (zombieMode) {
player.gotoAndStop("zgspecial");
}
if (superPower < 0) {
magicTimer = 0;
shootTimer = 0;
magic = false;
}
}
if (Key.isDown(87)) {
if (inControl) {
if (playerAlive) {
if (!gotSoap) {
if (!magic) {
if (!jump) {
if (!attacking) {
if (superPower > 99) {
special = true;
}
}
}
}
}
}
}
}
if (!Key.isDown(65)) {
pressHack = 0;
}
if (Key.isDown(65)) {
if (inControl) {
if (playerAlive) {
if (!gotSoap) {
if (!magic) {
if (!special) {
if (pressHack == 0) {
swing_sound.start();
pressHack = 1;
if (canAddComboPoint) {
addFirstCombo = true;
}
clicks++;
}
}
}
}
}
}
}
if (special) {
player.gotoAndStop("transform");
specialTimer++;
if (specialTimer == 65) {
zombieMode = true;
playerPower = 3;
special = false;
specialTimer = 0;
}
}
if (!Key.isDown(83)) {
pressOnceOnly = 0;
}
if (Key.isDown(83)) {
if (inControl) {
if (playerAlive) {
if (!gotSoap) {
if (!magic) {
if (!airMagic) {
if (!special) {
if (onfloor) {
if (pressOnceOnly == 0) {
pressOnceOnly = 1;
if (!attacking) {
if (!zombieMode) {
player.gotoAndStop("jump");
}
if (zombieMode) {
player.gotoAndStop("zjump");
}
}
jump = true;
onfloor = false;
yspeed = yspeed - jumpamount;
_root.attachMovie("shadow_mc", "shadow_mc", _root.getNextHighestDepth(), {_y:player._y, _x:player._x});
}
}
}
}
}
}
}
}
}
shadow_mc._x = player._x;
if (inControl) {
if (playerAlive) {
if (!gotSoap) {
if (!magic) {
if (!special) {
if (!Key.isDown(40)) {
running = false;
}
if (!Key.isDown(38)) {
running = false;
}
if (!Key.isDown(39)) {
running = false;
}
if (!Key.isDown(37)) {
running = false;
}
if (Key.isDown(39)) {
player._xscale = 100;
player._x = player._x + playerSpeed;
running = true;
}
if (Key.isDown(37)) {
player._xscale = -100;
player._x = player._x - playerSpeed;
running = true;
}
if (Key.isDown(38)) {
running = true;
}
if (Key.isDown(40)) {
running = true;
}
}
}
}
}
}
if ((!playerAlive) or (!inControl)) {
clicks = 0;
attacking = false;
is_attacking = 0;
jump = false;
magic = false;
magicTimer = 0;
shootTimer = 0;
airMagic = false;
}
if (gotSoap) {
if (!zombieMode) {
player.gotoAndStop("soap");
}
if (zombieMode) {
player.gotoAndStop("zsoap");
}
gotSoapTimer++;
if (gotSoapTimer == 31) {
gotSoap = false;
gotSoapTimer = 0;
}
}
if (((!playerAlive) && (onfloor)) && (_global.contGame)) {
if (deadTimer == 112) {
_root.attachMovie("tapup", "tapup", _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
playerHealth = playerHealth + 10;
}
deadTimer--;
if (deadTimer < 65) {
player.gotoAndStop("getUp");
}
if (deadTimer == 0) {
beDead = 0;
_global.contGame = false;
tapup.removeMovieClip();
playerAlive = true;
deadTimer = 112;
}
if (Key.isDown(38)) {
if (pressThis == 0) {
pressThis = 1;
playerHealth = playerHealth + 2.5;
}
}
if (!Key.isDown(38)) {
pressThis = 0;
}
}
if (player._y < 70) {
player._y = 70;
}
player._y = player._y + yspeed;
if (player._y > 350) {
shadow_mc.removeMovieClip();
initial = 0;
airMagic = false;
onfloor = true;
jump = false;
yspeed = 0;
player._y = 350;
} else {
yspeed = yspeed + (gravity * 2);
}
if ((playerHealth < 0) && (!attacking)) {
if (beDead == 0) {
beDead = 1;
player.gotoAndStop("dead");
clicks = 0;
attacking = false;
is_attacking = 0;
jump = false;
magic = false;
magicTimer = 0;
shootTimer = 0;
airMagic = false;
}
playerAlive = false;
playerHealth = 0;
carryOn._x = 0;
carryOn._y = 0;
}
if (_global.contGame) {
carryOn._x = 900;
carryOn._y = 900;
}
if (playerHealth > 100) {
playerHealth = 100;
}
if (superPower < 0) {
zombieMode = false;
playerPower = 1;
superPower = 0;
}
if (superPower > 100) {
superPower = 100;
}
if (zombieMode) {
superPower = superPower - 0.3;
}
}
stop();
beDead = 0;
hud._alpha = 0;
playerBar._alpha = 0;
manaBar._alpha = 0;
ehit_sound = new Sound();
ehit_sound.attachSound("ehit");
quake_sound = new Sound();
quake_sound.attachSound("quake");
fbsfx_sound = new Sound();
fbsfx_sound.attachSound("fballsfx");
_root.attachMovie("cinemaLines", "cinemaLines", _root.getNextHighestDepth());
_root.attachMovie("comboBox", "comboBox", _root.getNextHighestDepth(), {_x:120, _y:125});
comboBox._x = -100;
if (playerSelected == 0) {
_root.attachMovie("player", "player", _root.getNextHighestDepth(), {_x:-50, _y:350});
}
if (playerSelected == 1) {
_root.attachMovie("playerTwo", "player", _root.getNextHighestDepth(), {_x:-50, _y:350});
}
jump = false;
addSecondCombo = false;
addThirdCombo = false;
addFirstCombo = false;
soapDrop = 0;
pressThis = 0;
deadTimer = 112;
waitAsec = 0;
initial = 0;
playerAlive = true;
comboCounter = 0;
jumpamount = 25;
magicAttack = 0;
magic = false;
magicTimer = 0;
death_stick_timer = 0;
yspeed = 0;
shake = 0;
hereTheyComeTimer = 0;
playerHealth = 100;
hereTheyCome = false;
getThingsGoing = true;
onfloor = true;
displayTimer = 0;
toGo = 0;
playerPower = 1;
gravity = 2;
shootTimer = 0;
bossOnesAttack = 0;
randomNumber = 0;
noBoss = true;
pressOnceOnly = 0;
pressHack = 0;
specialTimer = 0;
clicks = 0;
playerSpeed = 10;
is_attacking = 0;
smack = 0;
gotSoap = false;
gotSoapTimer = 0;
hitPlayer = 0;
hitTimer = 0;
enemySpeed = 70;
yesGo = 0;
moved = 0;
markWave = 2;
steps = 0;
distance = 0;
addBoss = 0;
superPower = 100;
enemyPower = 0.15;
startGameTimer = 0;
inControl = true;
canGo = false;
zombieMode = false;
special = false;
hit2 = false;
hit3 = false;
running = false;
attacking = false;
var zombieSpots = new Array();
var zombieSpotsFade = new Array();
var erase = new Array();
var alive = new Array();
var groundMarker = new Array();
var hitPose = new Array();
var potionType = new Array();
var potions = new Array();
var boxHealth = new Array();
var boxHit = new Array();
var boxHitTimer = new Array();
var boxes = new Array();
var edropping = new Array();
var eonfloor = new Array();
var ejump = new Array();
var ejumpamount = new Array();
var eyspeed = new Array();
var shot = new Array();
var portTimer = new Array();
var beingSmacked = new Array();
var dead_body = new Array();
var type = new Array();
var hypArray = new Array();
var enemyHealth = new Array();
var damagedTimer = new Array();
var hit = new Array();
var enemyAttackingTimer = new Array();
var enemyAttacking = new Array();
var enemy = new Array();
var blocks = new Array();
var moveAbout = new Array();
var where = new Array();
var onPlatform = new Array();
var pickAttack = new Array();
var port = new Array();
var depths = new Array();
boxes.push(box1, box2);
boxHealth.push(13, 13);
boxHit.push(0, 0);
boxHitTimer.push(0, 0);
depths.push(player);
bg.onEnterFrame = function () {
if (fg._y < 120) {
fg._y = 120;
}
if (bg._y < 10) {
bg._y = 10;
}
if (bg._y > 30) {
bg._y = 30;
}
if (fg._y > 240) {
fg._y = 240;
}
if (((((!special) && (!magic)) && (playerAlive)) && (!gotSoap)) && (inControl)) {
if (Key.isDown(38)) {
if ((fg._y > 120) && (fg._y < 240)) {
sfg._y = sfg._y + 4.5;
sfg2._y = sfg2._y + 4.5;
}
}
if (Key.isDown(40)) {
if ((fg._y > 120) && (fg._y < 240)) {
sfg._y = sfg._y - 4.5;
sfg2._y = sfg2._y - 4.5;
}
}
if (Key.isDown(38)) {
bg._y = bg._y - 0.7;
fg._y = fg._y + 3;
}
if (Key.isDown(40)) {
bg._y = bg._y + 0.7;
fg._y = fg._y - 3;
}
}
};
player.onEnterFrame = function () {
if (comboCounter > 0) {
comboBox._x = 120;
displayTimer--;
}
if (displayTimer < 0) {
comboCounter = 0;
displayTimer = 0;
}
if (displayTimer == 0) {
comboBox._x = comboBox._x - 25;
}
startGameTimer++;
if (startGameTimer < 75) {
walkOn();
}
superPower = superPower + 0.05;
playerBar._xscale = playerHealth;
manaBar._xscale = superPower;
actuallyAddEnemies();
waveActions();
enemyHealthReachesZero();
if (((((!special) && (!magic)) && (playerAlive)) && (!gotSoap)) && (inControl)) {
pushHole();
pushenemy();
}
if (startGameTimer > 60) {
hud._alpha = hud._alpha + 20;
playerBar._alpha = playerBar._alpha + 10;
manaBar._alpha = manaBar._alpha + 10;
}
if (hud._alpha > 100) {
hud._alpha = 100;
}
if (playerBar._alpha > 100) {
playerBar._alpha = 100;
}
if (manaBar._alpha > 100) {
manaBar._alpha = 100;
}
box();
shotActions();
pullUpZombies();
noOverLap();
swapdepths();
playerMovement();
comboOne();
comboTwo();
comboThree();
runAttackTimer();
canAddPoint();
confirmAttacking();
calculateHyp();
enemyMovement();
shaker();
soapActions();
fbhit_mc.swapDepths(_root.getNextHighestDepth());
hitEm.swapDepths(_root.getNextHighestDepth());
blood_mc.swapDepths(_root.getNextHighestDepth());
sfg.swapDepths(_root.getNextHighestDepth());
sfg2.swapDepths(_root.getNextHighestDepth());
carryOn.swapDepths(_root.getNextHighestDepth());
trans.swapDepths(_root.getNextHighestDepth());
cinemaLines.swapDepths(_root.getNextHighestDepth());
hassan.swapDepths(_root.getNextHighestDepth());
};
Instance of Symbol 1333 MovieClip "hassan" in Frame 10
on (release) {
getURL ("http://www.turbonuke.com/?gamereferal=aghzombies", "_blank");
}
Frame 11
player.removeMovieClip();
stopAllSounds();
play();
Frame 12
function removeall() {
carryOn.removeMovieClip();
comboBox.removeMovieClip();
nearground.removeMovieClip();
sfg.removeMovieClip();
sfg2.removeMovieClip();
removeshot();
removeport();
removepickAttack();
removemoveAbout();
removeblocks();
removeDead_body();
removeType();
removeHypArray();
removeEnemyHealth();
removeDamagedTimer();
removeHit();
removeEnemyAttackingTimer();
removeEnemyAttacking();
removeEnemy();
removewhere();
removebeingSmacked();
removeonPlatform();
removeportTimer();
removeeyspeed();
removeejumpamount();
removeejump();
removeeonfloor();
removeedropping();
removepotions();
removeboxes();
removeboxHealth();
removeboxHit();
removeboxHitTimer();
removepotionType();
removeDepths();
removezombieSpots();
removezombieSpotsFade();
removeerase();
removealive();
removegroundMarker();
removehitPose();
}
function removezombieSpots() {
i = zombieSpots.length - 1;
while (i >= 0) {
zombieSpots[i].removeMovieClip();
zombieSpots.splice(i, 1);
i--;
}
}
function removezombieSpotsFade() {
i = zombieSpotsFade.length - 1;
while (i >= 0) {
zombieSpotsFade[i].removeMovieClip();
zombieSpotsFade.splice(i, 1);
i--;
}
}
function removeerase() {
i = erase.length - 1;
while (i >= 0) {
erase[i].removeMovieClip();
erase.splice(i, 1);
i--;
}
}
function removealive() {
i = alive.length - 1;
while (i >= 0) {
alive[i].removeMovieClip();
alive.splice(i, 1);
i--;
}
}
function removegroundMarker() {
i = groundMarker.length - 1;
while (i >= 0) {
groundMarker[i].removeMovieClip();
groundMarker.splice(i, 1);
i--;
}
}
function removehitPose() {
i = hitPose.length - 1;
while (i >= 0) {
hitPose[i].removeMovieClip();
hitPose.splice(i, 1);
i--;
}
}
function removeboxHealth() {
i = boxHealth.length - 1;
while (i >= 0) {
boxHealth[i].removeMovieClip();
boxHealth.splice(i, 1);
i--;
}
}
function removeboxHit() {
i = boxHit.length - 1;
while (i >= 0) {
boxHit[i].removeMovieClip();
boxHit.splice(i, 1);
i--;
}
}
function removeboxHitTimer() {
i = boxHitTimer.length - 1;
while (i >= 0) {
boxHitTimer[i].removeMovieClip();
boxHitTimer.splice(i, 1);
i--;
}
}
function removeboxes() {
i = boxes.length - 1;
while (i >= 0) {
boxes[i].removeMovieClip();
boxes.splice(i, 1);
i--;
}
}
function removepotionType() {
i = potionType.length - 1;
while (i >= 0) {
potionType[i].removeMovieClip();
potionType.splice(i, 1);
i--;
}
}
function removepotions() {
i = potions.length - 1;
while (i >= 0) {
potions[i].removeMovieClip();
potions.splice(i, 1);
i--;
}
}
function removeeyspeed() {
i = eyspeed.length - 1;
while (i >= 0) {
eyspeed[i].removeMovieClip();
eyspeed.splice(i, 1);
i--;
}
}
function removeejumpamount() {
i = ejumpamount.length - 1;
while (i >= 0) {
ejumpamount[i].removeMovieClip();
ejumpamount.splice(i, 1);
i--;
}
}
function removeejump() {
i = ejump.length - 1;
while (i >= 0) {
ejump[i].removeMovieClip();
ejump.splice(i, 1);
i--;
}
}
function removeeonfloor() {
i = eonfloor.length - 1;
while (i >= 0) {
eonfloor[i].removeMovieClip();
eonfloor.splice(i, 1);
i--;
}
}
function removeedropping() {
i = edropping.length - 1;
while (i >= 0) {
edropping[i].removeMovieClip();
edropping.splice(i, 1);
i--;
}
}
function removeportTimer() {
i = portTimer.length - 1;
while (i >= 0) {
portTimer[i].removeMovieClip();
portTimer.splice(i, 1);
i--;
}
}
function removeshot() {
i = shot.length - 1;
while (i >= 0) {
shot[i].removeMovieClip();
shot.splice(i, 1);
i--;
}
}
function removeport() {
i = port.length - 1;
while (i >= 0) {
port[i].removeMovieClip();
port.splice(i, 1);
i--;
}
}
function removepickAttack() {
i = pickAttack.length - 1;
while (i >= 0) {
pickAttack[i].removeMovieClip();
pickAttack.splice(i, 1);
i--;
}
}
function removeblocks() {
i = blocks.length - 1;
while (i >= 0) {
blocks[i].removeMovieClip();
blocks.splice(i, 1);
i--;
}
}
function removebeingSmacked() {
i = beingSmacked.length - 1;
while (i >= 0) {
beingSmacked[i].removeMovieClip();
beingSmacked.splice(i, 1);
i--;
}
}
function removemoveAbout() {
i = moveAbout.length - 1;
while (i >= 0) {
moveAbout[i].removeMovieClip();
moveAbout.splice(i, 1);
i--;
}
}
function removewhere() {
i = where.length - 1;
while (i >= 0) {
where[i].removeMovieClip();
where.splice(i, 1);
i--;
}
}
function removeonPlatform() {
i = onPlatform.length - 1;
while (i >= 0) {
onPlatform[i].removeMovieClip();
onPlatform.splice(i, 1);
i--;
}
}
function removeDead_body() {
i = dead_body.length - 1;
while (i >= 0) {
dead_body[i].removeMovieClip();
dead_body.splice(i, 1);
i--;
}
}
function removeType() {
i = type.length - 1;
while (i >= 0) {
type[i].removeMovieClip();
type.splice(i, 1);
i--;
}
}
function removeHypArray() {
i = hypArray.length - 1;
while (i >= 0) {
hypArray[i].removeMovieClip();
hypArray.splice(i, 1);
i--;
}
}
function removeEnemyHealth() {
i = enemyHealth.length - 1;
while (i >= 0) {
enemyHealth[i].removeMovieClip();
enemyHealth.splice(i, 1);
i--;
}
}
function removeDamagedTimer() {
i = damagedTimer.length - 1;
while (i >= 0) {
damagedTimer[i].removeMovieClip();
damagedTimer.splice(i, 1);
i--;
}
}
function removeHit() {
i = hit.length - 1;
while (i >= 0) {
hit[i].removeMovieClip();
hit.splice(i, 1);
i--;
}
}
function removeEnemyAttackingTimer() {
i = enemyAttackingTimer.length - 1;
while (i >= 0) {
enemyAttackingTimer[i].removeMovieClip();
enemyAttackingTimer.splice(i, 1);
i--;
}
}
function removeEnemyAttacking() {
i = enemyAttacking.length - 1;
while (i >= 0) {
enemyAttacking[i].removeMovieClip();
enemyAttacking.splice(i, 1);
i--;
}
}
function removeEnemy() {
i = enemy.length - 1;
while (i >= 0) {
enemy[i].removeMovieClip();
enemy.splice(i, 1);
i--;
}
}
function removeDepths() {
i = depths.length - 1;
while (i >= 0) {
depths[i].removeMovieClip();
depths.splice(i, 1);
i--;
}
}
function shaker() {
if (shake == 0) {
_root._x = 0;
_root._y = 0;
} else if (shake == 1) {
shake = shake + 1;
_root._x = _root._x + 2;
_root._y = _root._y + 2;
} else if (shake == 2) {
shake = shake + 1;
_root._y = _root._y - 4;
_root._x = _root._x - 4;
} else if (shake == 3) {
shake = shake + 1;
_root._x = _root._x + 1;
_root._y = _root._y + 1;
} else if (shake == 4) {
shake = shake + 1;
_root._x = 0;
_root._y = 0;
} else if (shake == 5) {
shake = shake + 1;
_root._x = 4;
_root._y = 4;
} else if (shake == 6) {
shake = shake + 1;
_root._x = 2;
_root._y = 2;
} else if (shake == 7) {
shake = shake + 1;
_root._x = 0;
_root._y = 0;
} else if (shake == 8) {
shake = shake + 1;
_root._x = _root._x + 2;
_root._y = _root._y + 2;
} else if (shake == 9) {
shake = shake + 1;
_root._y = _root._y - 4;
_root._x = _root._x - 4;
} else if (shake == 10) {
shake = shake + 1;
_root._x = _root._x + 1;
_root._y = _root._y + 1;
} else if (shake == 11) {
shake = shake + 1;
_root._x = 0;
_root._y = 0;
} else if (shake == 12) {
shake = shake + 1;
_root._x = 4;
_root._y = 4;
} else if (shake == 13) {
shake = shake + 1;
_root._x = 2;
_root._y = 2;
} else if (shake == 14) {
shake = shake + 1;
_root._x = _root._x + 1;
_root._y = _root._y + 1;
} else if (shake == 15) {
shake = shake + 1;
_root._x = 0;
_root._y = 0;
} else if (shake == 16) {
shake = shake + 1;
_root._x = _root._x + 2;
_root._y = _root._y + 2;
} else if (shake == 17) {
shake = shake + 1;
_root._y = _root._y - 4;
_root._x = _root._x - 4;
} else if (shake == 18) {
shake = shake + 1;
_root._x = _root._x + 1;
_root._y = _root._y + 1;
} else if (shake == 19) {
shake = shake + 1;
_root._x = 0;
_root._y = 0;
} else if (shake == 20) {
shake = shake + 1;
_root._x = 4;
_root._y = 4;
} else if (shake == 21) {
shake = shake + 1;
_root._x = 2;
_root._y = 2;
} else if (shake == 22) {
shake = shake + 1;
_root._x = 0;
_root._y = 0;
} else if (shake == 23) {
shake = shake + 1;
_root._x = _root._x + 2;
_root._y = _root._y + 2;
} else if (shake == 24) {
shake = shake + 1;
_root._y = _root._y - 4;
_root._x = _root._x - 4;
} else if (shake == 25) {
shake = shake + 1;
_root._x = _root._x + 1;
_root._y = _root._y + 1;
} else if (shake == 26) {
shake = shake + 1;
_root._x = 0;
_root._y = 0;
} else if (shake == 27) {
shake = shake + 1;
_root._x = 4;
_root._y = 4;
} else if (shake == 28) {
shake = shake + 1;
_root._x = 2;
_root._y = 2;
} else if (shake > 29) {
shake = 0;
_root._x = _root._x + 1;
_root._y = _root._y + 1;
}
}
function enterActions() {
if ((!inControl) && (!noBoss)) {
player.gotoAndStop("run");
player._x = player._x + playerSpeed;
if (player._x > 120) {
inControl = true;
}
}
}
function shotActions() {
i = shot.length - 1;
while (i >= 0) {
if (shot[i]._y > 300) {
randomNumber++;
hitGround_mc = _root.attachMovie("hitGround", "hitGround" + randomNumber, _root.getNextHighestDepth(), {_x:shot[i]._x, _y:shot[i]._y});
hitGround_mc._xscale = shot[i]._xscale;
shot[i].removeMovieClip();
shot.splice(i, 1);
}
j = enemy.length - 1;
while (j >= 0) {
if (shot[i].hitTest(enemy[j])) {
if (type[j] == 0) {
ejump[j] = true;
eonfloor[j] = false;
eyspeed[j] = 0;
eyspeed[j] = eyspeed[j] - ejumpamount[j];
}
hitPose[j]++;
if (hitPose[j] > 1) {
hitPose[j] = 0;
}
randomNumber++;
fbhit_mc = _root.attachMovie("fbhit", "fbhit" + randomNumber, _root.getNextHighestDepth(), {_y:shot[i]._y, _x:shot[i]._x});
fbhit_mc._xscale = shot[i]._xscale;
randomNumber++;
blood_mc = _root.attachMovie("hitSpark_mc", "hitSpark_mc" + randomNumber, _root.getNextHighestDepth(), {_y:player._y, _x:player._x});
blood_mc._xscale = player._xscale;
ehit_sound.start();
beingSmacked[j]++;
randomNumber++;
comboCounter++;
displayTimer = 16;
hitEm = _root.attachMovie("oneHit", "oneHit" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[j]._x, _y:enemy[j]._y});
comboBox.cnum.text = comboCounter;
hit[j] = 1;
damagedTimer[j] = 0;
enemyHealth[j] = enemyHealth[j] - (playerPower * 5);
shot[i].removeMovieClip();
shot.splice(i, 1);
}
j--;
}
i--;
}
}
function swapdepths() {
i = depths.length - 1;
while (i >= 0) {
if (!jump) {
depths[i].idiot_depth = Math.floor((depths[i]._y * 480) + depths[i]._x);
depths[i].swapDepths(depths[i].idiot_depth);
}
i--;
}
}
function noOverLap() {
i = enemy.length - 1;
while (i >= 0) {
j = enemy.length - 1;
while (j >= 0) {
if (!(enemy[i] === enemy[j])) {
if (enemy[i].hitTest(enemy[j])) {
if (alive[i] && (type[i] == 0)) {
endX = _root.enemy[j]._x;
enemy[i]._x = enemy[i]._x - ((endX - enemy[i]._x) / enemySpeed);
}
}
}
j--;
}
i--;
}
}
function calculateHyp() {
i = enemy.length - 1;
while (i >= 0) {
dist_x = player._x - enemy[i]._x;
hypArray[i] = Math.sqrt(dist_x * dist_x);
i--;
}
}
function enemyHealthReachesZero() {
i = enemy.length - 1;
while (i >= 0) {
if (enemyHealth[i] < 1) {
alive[i] = false;
if (erase[i] == 0) {
if (type[i] == "mainBoss") {
noBoss = true;
}
}
erase[i]++;
if (erase[i] == 52) {
}
}
i--;
}
}
function enemyMovement() {
i = enemy.length - 1;
while (i >= 0) {
if (type[i] == "mainBoss") {
if (player.feet.hitTest(enemy[i].bdamage)) {
if (!zombieMode) {
hitPlayer = 1;
playerHealth = playerHealth - (enemyPower * 2);
}
}
bossBar._xscale = enemyHealth[i];
if (!alive[i]) {
hit[i] = 0;
damagedTimer[i] = 0;
enemy[i].gotoAndStop("dead");
}
if (alive[i]) {
if (!playerAlive) {
hit[i] = 0;
damagedTimer[i] = 0;
if (enemyHealth[i] > 30) {
enemy[i].gotoAndStop("idle");
} else {
enemy[i].gotoAndStop("cidle");
}
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 50) + 0;
}
if (playerAlive) {
if (enemyAttacking[i] == 0) {
if (enemyHealth[i] > 30) {
enemy[i].gotoAndStop("idle");
} else {
enemy[i].gotoAndStop("cidle");
}
}
if (hit[i] == 1) {
var _local2 = enemy[i].transform.colorTransform;
_local2.rgb = 4294967295;
enemy[i].transform.colorTransform = _local2;
damagedTimer[i]++;
if (damagedTimer[i] == 2) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if (hit[i] == 0) {
var _local2 = enemy[i].transform.colorTransform;
enemy[i].transform.colorTransform = new flash.geom.ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
}
enemyAttackingTimer[i]++;
if (enemyAttackingTimer[i] > 40) {
enemyAttacking[i] = 1;
if ((enemyAttackingTimer[i] > 40) && (enemyAttackingTimer[i] < 260)) {
if (enemyHealth[i] > 30) {
enemy[i].gotoAndStop("attack");
} else {
enemy[i].gotoAndStop("cattack");
}
}
if (enemyAttackingTimer[i] > 259) {
if (enemyHealth[i] > 30) {
enemy[i].gotoAndStop("open");
} else {
enemy[i].gotoAndStop("copen");
}
}
if (enemyAttackingTimer[i] == 409) {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = 0;
pickAttack[i] = Math.round(Math.random() * 3) + 0;
}
}
if ((enemy[i].hitTest(player) && (enemyAttackingTimer[i] > 259)) && (enemyAttackingTimer[i] < 409)) {
if (jump) {
if (((magic && (shootTimer > 20)) && (magicTimer == 0)) or (magicTimer == 5)) {
hitPose[i]++;
if (hitPose[i] > 1) {
hitPose[i] = 0;
}
randomNumber++;
blood_mc = _root.attachMovie("hitSpark_mc", "hitSpark_mc" + randomNumber, _root.getNextHighestDepth(), {_y:player._y, _x:player._x});
blood_mc._xscale = player._xscale;
ehit_sound.start();
beingSmacked[i]++;
randomNumber++;
comboCounter++;
displayTimer = 16;
hitEm = _root.attachMovie("oneHit", "oneHit" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x + 70, _y:enemy[i]._y - 100});
comboBox.cnum.text = comboCounter;
hit[i] = 1;
damagedTimer[i] = 0;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
if (!jump) {
if (((magic && (shootTimer > 20)) && (magicTimer == 0)) or (magicTimer == 5)) {
hitPose[i]++;
if (hitPose[i] > 1) {
hitPose[i] = 0;
}
comboCounter++;
displayTimer = 16;
randomNumber++;
blood_mc = _root.attachMovie("hitSpark_mc", "hitSpark_mc" + randomNumber, _root.getNextHighestDepth(), {_y:player._y, _x:player._x});
blood_mc._xscale = player._xscale;
ehit_sound.start();
beingSmacked[i]++;
randomNumber++;
hitEm = _root.attachMovie("oneHit", "oneHit" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x + 70, _y:enemy[i]._y - 100});
comboBox.cnum.text = comboCounter;
hit[i] = 1;
damagedTimer[i] = 0;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
if ((enemy[i].hitTest(player) && (enemyAttackingTimer[i] > 259)) && (enemyAttackingTimer[i] < 409)) {
if (jump) {
if (((((((is_attacking == 3) or (is_attacking == 10)) or (is_attacking == 16)) or (is_attacking == 20)) or (is_attacking == 22)) or (is_attacking == 24)) or (is_attacking == 26)) {
if (hypArray[i] < 150) {
hitPose[i]++;
if (hitPose[i] > 1) {
hitPose[i] = 0;
}
randomNumber++;
blood_mc = _root.attachMovie("hitSpark_mc", "hitSpark_mc" + randomNumber, _root.getNextHighestDepth(), {_y:player._y, _x:player._x});
blood_mc._xscale = player._xscale;
ehit_sound.start();
beingSmacked[i]++;
randomNumber++;
comboCounter++;
displayTimer = 16;
hitEm = _root.attachMovie("oneHit", "oneHit" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x + 70, _y:enemy[i]._y - 100});
comboBox.cnum.text = comboCounter;
hit[i] = 1;
damagedTimer[i] = 0;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
if (!jump) {
if (((is_attacking == 3) or (is_attacking == 12)) or (is_attacking == 22)) {
if (hypArray[i] < 150) {
hitPose[i]++;
if (hitPose[i] > 1) {
hitPose[i] = 0;
}
comboCounter++;
displayTimer = 16;
randomNumber++;
blood_mc = _root.attachMovie("hitSpark_mc", "hitSpark_mc" + randomNumber, _root.getNextHighestDepth(), {_y:player._y, _x:player._x});
blood_mc._xscale = player._xscale;
ehit_sound.start();
beingSmacked[i]++;
randomNumber++;
hitEm = _root.attachMovie("oneHit", "oneHit" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x + 70, _y:enemy[i]._y - 100});
comboBox.cnum.text = comboCounter;
hit[i] = 1;
damagedTimer[i] = 0;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
}
}
}
}
i--;
}
}
function pushenemy() {
i = enemy.length - 1;
while (i >= 0) {
if (Key.isDown(38)) {
if ((fg._y > 120) && (fg._y < 240)) {
enemy[i]._y = enemy[i]._y + 3;
}
}
if (Key.isDown(40)) {
if ((fg._y > 120) && (fg._y < 240)) {
enemy[i]._y = enemy[i]._y - 3;
}
}
i--;
}
}
function box() {
i = boxes.length - 1;
while (i >= 0) {
if (player.hitTest(boxes[i])) {
if (boxHealth[i] > 0) {
if (!jump) {
if (((is_attacking == 3) or (is_attacking == 12)) or (is_attacking == 22)) {
ehit_sound.start();
boxHit[i] = 1;
boxHealth[i]--;
randomNumber++;
hitEm_box = _root.attachMovie("boxHit", "boxHit" + randomNumber, _root.getNextHighestDepth(), {_x:boxes[i]._x + 50, _y:boxes[i]._y});
}
}
if (jump) {
if (((((((is_attacking == 3) or (is_attacking == 10)) or (is_attacking == 16)) or (is_attacking == 20)) or (is_attacking == 22)) or (is_attacking == 24)) or (is_attacking == 26)) {
ehit_sound.start();
boxHit[i] = 1;
boxHealth[i]--;
randomNumber++;
hitEm_box = _root.attachMovie("boxHit", "boxHit" + randomNumber, _root.getNextHighestDepth(), {_x:boxes[i]._x + 50, _y:boxes[i]._y});
}
}
}
}
if (boxHealth[i] > 10) {
boxes[i].gotoAndStop("fixed");
}
if ((boxHealth[i] > 0) && (boxHealth[i] < 10)) {
boxes[i].gotoAndStop("cracked");
}
if (boxHealth[i] == 1) {
boxHealth[i] = 0;
boxes[i].gotoAndStop("broken");
randomNumber++;
soap_clip = _root.attachMovie("soap_mc", "soap_mc" + randomNumber, _root.getNextHighestDepth(), {_y:boxes[i]._y, _x:boxes[i]._x});
potions.push(soap_clip);
depths.push(soap_clip);
potionType.push(1);
}
if (boxHit[i] == 0) {
var _local2 = boxes[i].transform.colorTransform;
boxes[i].transform.colorTransform = new flash.geom.ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
}
if (boxHit[i] == 1) {
var _local2 = boxes[i].transform.colorTransform;
_local2.rgb = 4294967295;
boxes[i].transform.colorTransform = _local2;
boxHitTimer[i]++;
if (boxHitTimer[i] == 1) {
boxHit[i] = 0;
boxHitTimer[i] = 0;
}
}
if (((((!special) && (!magic)) && (playerAlive)) && (!gotSoap)) && (inControl)) {
if (Key.isDown(38)) {
if ((fg._y > 120) && (fg._y < 240)) {
boxes[i]._y = boxes[i]._y + 3;
}
}
if (Key.isDown(40)) {
if ((fg._y > 120) && (fg._y < 240)) {
boxes[i]._y = boxes[i]._y - 3;
}
}
}
i--;
}
}
function soapActions() {
i = potions.length - 1;
while (i >= 0) {
if (player.hitTest(potions[i]._x, potions[i]._y, true)) {
if (!attacking) {
gotSoap = true;
superPower = superPower + 25;
potions[i].removeMovieClip();
potions.splice(i, 1);
potionType.splice(i, 1);
}
}
if (((((!special) && (!magic)) && (playerAlive)) && (!gotSoap)) && (inControl)) {
if (Key.isDown(38)) {
if ((fg._y > 120) && (fg._y < 240)) {
potions[i]._y = potions[i]._y + 3;
}
}
if (Key.isDown(40)) {
if ((fg._y > 120) && (fg._y < 240)) {
potions[i]._y = potions[i]._y - 3;
}
}
}
i--;
}
}
function canAddPoint() {
if (clicks == 0) {
canAddComboPoint = true;
} else {
canAddComboPoint = false;
}
}
function runAttackTimer() {
if (attacking) {
if (!jump) {
playerSpeed = 1;
}
is_attacking++;
} else {
playerSpeed = 10;
}
}
function confirmAttacking() {
if (clicks > 0) {
attacking = true;
}
}
function comboOne() {
if (!addSecondCombo) {
if (!addThirdCombo) {
if (addFirstCombo) {
if (attacking) {
if (jump) {
if (!zombieMode) {
player.gotoAndStop("aattack2");
}
if (zombieMode) {
player.gotoAndStop("azattack");
}
}
if (!jump) {
if (!zombieMode) {
player.gotoAndStop("attack2");
}
if (zombieMode) {
player.gotoAndStop("zattack");
}
}
if (is_attacking == 7) {
if (jump && (player._y > 180)) {
yspeed = 0;
yspeed = yspeed - 20;
}
addFirstCombo = false;
if (clicks == 1) {
smack = 0;
clicks = 0;
is_attacking = 0;
attacking = false;
}
if (clicks > 1) {
smack = 0;
addSecondCombo = true;
}
}
}
}
}
}
}
function comboTwo() {
if (!addFirstCombo) {
if (!addThirdCombo) {
if (addSecondCombo) {
if (attacking) {
if (jump) {
if (!zombieMode) {
player.gotoAndStop("aattack");
}
if (zombieMode) {
player.gotoAndStop("azattack2");
}
}
if (!jump) {
if (!zombieMode) {
player.gotoAndStop("attack");
}
if (zombieMode) {
player.gotoAndStop("zattack2");
}
}
if (is_attacking == 19) {
if (jump && (player._y > 180)) {
yspeed = 0;
yspeed = yspeed - 20;
}
addSecondCombo = false;
if (clicks == 2) {
smack = 0;
clicks = 0;
is_attacking = 0;
attacking = false;
}
if (clicks > 2) {
smack = 0;
addThirdCombo = true;
}
}
}
}
}
}
}
function comboThree() {
if (!addFirstCombo) {
if (!addSecondCombo) {
if (addThirdCombo) {
if (attacking) {
if (jump) {
if (!zombieMode) {
player.gotoAndStop("aattack3");
}
if (zombieMode) {
player.gotoAndStop("azattack3");
}
}
if (!jump) {
if (!zombieMode) {
player.gotoAndStop("attack3");
}
if (zombieMode) {
player.gotoAndStop("zattack3");
}
}
if (is_attacking == 26) {
if (jump && (player._y > 180)) {
yspeed = 0;
yspeed = yspeed - 20;
}
addThirdCombo = false;
if (clicks == 3) {
smack = 0;
clicks = 0;
is_attacking = 0;
attacking = false;
}
if (clicks > 3) {
smack = 0;
clicks = 1;
is_attacking = 0;
addFirstCombo = true;
}
}
}
}
}
}
}
function playerMovement() {
if (hitPlayer == 0) {
var _local4 = player.transform.colorTransform;
player.transform.colorTransform = new flash.geom.ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
}
if (hitPlayer == 1) {
var _local4 = player.transform.colorTransform;
_local4.rgb = 4294967295;
player.transform.colorTransform = _local4;
hitTimer++;
if (hitTimer == 1) {
hitPlayer = 0;
hitTimer = 0;
}
}
if ((player._x < 46) && (inControl)) {
player._x = 46;
}
if (canGo && (inControl)) {
if (fg._x > -1916.9) {
if (player._x > 410) {
i = enemy.length - 1;
while (i >= 0) {
enemy[i]._x = enemy[i]._x - 5;
i--;
}
j = boxes.length - 1;
while (j >= 0) {
boxes[j]._x = boxes[j]._x - 5;
j--;
}
k = potions.length - 1;
while (k >= 0) {
potions[k]._x = potions[k]._x - 5;
k--;
}
moved++;
sfg._x = sfg._x - 5;
sfg2._x = sfg2._x - 5;
bg._x = bg._x - 5;
fg._x = fg._x - 5;
steps++;
player._x = 410;
}
}
}
if ((player._x > 590) && (inControl)) {
player._x = 590;
}
if (inControl) {
if (playerAlive) {
if (!gotSoap) {
if (!magic) {
if (!jump) {
if (!special) {
if (!attacking) {
if (!running) {
if (!zombieMode) {
player.gotoAndStop("idle");
}
if (zombieMode) {
player.gotoAndStop("zidle");
}
}
if (running) {
if (!zombieMode) {
player.gotoAndStop("run");
}
if (zombieMode) {
player.gotoAndStop("zrun");
}
}
}
}
}
}
}
}
}
if (!Key.isDown(68)) {
magicTimer = 0;
shootTimer = 0;
magic = false;
airMagic = false;
}
if (Key.isDown(68)) {
if (inControl) {
if (playerAlive) {
if (!gotSoap) {
if (!special) {
if (!attacking) {
if (superPower > 10) {
if (!jump) {
magic = true;
}
if (jump) {
airMagic = true;
}
}
}
}
}
}
}
}
if (airMagic) {
if (!zombieMode) {
player.gotoAndStop("aspecial");
}
if (zombieMode) {
player.gotoAndStop("zaspecial");
}
if ((magicAttack + 200) < getTimer()) {
fbsfx_sound.start();
superPower = superPower - 10;
if (superPower < 0) {
airMagic = false;
}
magicAttack = getTimer();
yspeed = 0;
if (initial == 0) {
initial = 1;
yspeed = yspeed - 35;
} else {
yspeed = yspeed - 10;
}
if (player._xscale == 100) {
randomNumber++;
fireball_mc = _root.attachMovie("fireball", "fireball" + randomNumber, _root.getNextHighestDepth(), {_y:player._y, _x:player._x});
shot.push(fireball_mc);
fireball_mc.onEnterFrame = function () {
this._x = this._x + 15;
this._y = this._y + 15;
};
}
if (player._xscale == -100) {
randomNumber++;
fireball_mc = _root.attachMovie("fireball", "fireball" + randomNumber, _root.getNextHighestDepth(), {_y:player._y, _x:player._x});
fireball_mc._xscale = -100;
shot.push(fireball_mc);
fireball_mc.onEnterFrame = function () {
this._x = this._x - 15;
this._y = this._y + 15;
};
}
}
}
if (magic) {
superPower = superPower - 0.5;
shootTimer++;
if (shootTimer > 20) {
magicTimer++;
}
if (magicTimer == 5) {
magicTimer = 0;
}
if (!zombieMode) {
player.gotoAndStop("gspecial");
}
if (zombieMode) {
player.gotoAndStop("zgspecial");
}
if (superPower < 0) {
magicTimer = 0;
shootTimer = 0;
magic = false;
}
}
if (Key.isDown(87)) {
if (inControl) {
if (playerAlive) {
if (!gotSoap) {
if (!magic) {
if (!jump) {
if (!attacking) {
if (superPower > 99) {
special = true;
}
}
}
}
}
}
}
}
if (!Key.isDown(65)) {
pressHack = 0;
}
if (Key.isDown(65)) {
if (inControl) {
if (playerAlive) {
if (!gotSoap) {
if (!magic) {
if (!special) {
if (pressHack == 0) {
swing_sound.start();
pressHack = 1;
if (canAddComboPoint) {
addFirstCombo = true;
}
clicks++;
}
}
}
}
}
}
}
if (special) {
player.gotoAndStop("transform");
specialTimer++;
if (specialTimer == 65) {
zombieMode = true;
playerPower = 3;
special = false;
specialTimer = 0;
}
}
if (!Key.isDown(83)) {
pressOnceOnly = 0;
}
if (Key.isDown(83)) {
if (inControl) {
if (playerAlive) {
if (!gotSoap) {
if (!magic) {
if (!airMagic) {
if (!special) {
if (onfloor) {
if (pressOnceOnly == 0) {
pressOnceOnly = 1;
if (!attacking) {
if (!zombieMode) {
player.gotoAndStop("jump");
}
if (zombieMode) {
player.gotoAndStop("zjump");
}
}
jump = true;
onfloor = false;
yspeed = yspeed - jumpamount;
_root.attachMovie("shadow_mc", "shadow_mc", _root.getNextHighestDepth(), {_y:player._y, _x:player._x});
}
}
}
}
}
}
}
}
}
shadow_mc._x = player._x;
if (inControl) {
if (playerAlive) {
if (!gotSoap) {
if (!magic) {
if (!special) {
if (!Key.isDown(40)) {
running = false;
}
if (!Key.isDown(38)) {
running = false;
}
if (!Key.isDown(39)) {
running = false;
}
if (!Key.isDown(37)) {
running = false;
}
if (Key.isDown(39)) {
player._xscale = 100;
player._x = player._x + playerSpeed;
running = true;
}
if (Key.isDown(37)) {
player._xscale = -100;
player._x = player._x - playerSpeed;
running = true;
}
if (Key.isDown(38)) {
running = true;
}
if (Key.isDown(40)) {
running = true;
}
}
}
}
}
}
if ((!playerAlive) or (!inControl)) {
clicks = 0;
attacking = false;
is_attacking = 0;
jump = false;
magic = false;
magicTimer = 0;
shootTimer = 0;
airMagic = false;
}
if (gotSoap) {
if (!zombieMode) {
player.gotoAndStop("soap");
}
if (zombieMode) {
player.gotoAndStop("zsoap");
}
gotSoapTimer++;
if (gotSoapTimer == 31) {
gotSoap = false;
gotSoapTimer = 0;
}
}
if (((!playerAlive) && (onfloor)) && (_global.contGame)) {
if (deadTimer == 112) {
_root.attachMovie("tapup", "tapup", _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
playerHealth = playerHealth + 10;
}
deadTimer--;
if (deadTimer < 65) {
player.gotoAndStop("getUp");
}
if (deadTimer == 0) {
beDead = 0;
_global.contGame = false;
tapup.removeMovieClip();
playerAlive = true;
deadTimer = 112;
}
if (Key.isDown(38)) {
if (pressThis == 0) {
pressThis = 1;
playerHealth = playerHealth + 2.5;
}
}
if (!Key.isDown(38)) {
pressThis = 0;
}
}
if (player._y < 70) {
player._y = 70;
}
player._y = player._y + yspeed;
if (player._y > 350) {
shadow_mc.removeMovieClip();
initial = 0;
airMagic = false;
onfloor = true;
jump = false;
yspeed = 0;
player._y = 350;
} else {
yspeed = yspeed + (gravity * 2);
}
if ((playerHealth < 0) && (!attacking)) {
if (beDead == 0) {
beDead = 1;
player.gotoAndStop("dead");
clicks = 0;
attacking = false;
is_attacking = 0;
jump = false;
magic = false;
magicTimer = 0;
shootTimer = 0;
airMagic = false;
}
playerAlive = false;
playerHealth = 0;
carryOn._x = 0;
carryOn._y = 0;
}
if (_global.contGame) {
carryOn._x = 900;
carryOn._y = 900;
}
if (playerHealth > 100) {
playerHealth = 100;
}
if (superPower < 0) {
zombieMode = false;
playerPower = 0.5;
superPower = 0;
}
if (superPower > 100) {
superPower = 100;
}
if (zombieMode) {
superPower = superPower - 0.3;
}
}
stop();
beDead = 0;
ehit_sound = new Sound();
ehit_sound.attachSound("ehit");
quake_sound = new Sound();
quake_sound.attachSound("quake");
fbsfx_sound = new Sound();
fbsfx_sound.attachSound("fballsfx");
_root.attachMovie("comboBox", "comboBox", _root.getNextHighestDepth(), {_x:120, _y:125});
comboBox._x = -100;
if (playerSelected == 0) {
_root.attachMovie("player", "player", _root.getNextHighestDepth(), {_x:-100, _y:350});
}
if (playerSelected == 1) {
_root.attachMovie("playerTwo", "player", _root.getNextHighestDepth(), {_x:-100, _y:350});
}
addSecondCombo = false;
addThirdCombo = false;
addFirstCombo = false;
jump = false;
soapDrop = 0;
pressThis = 0;
deadTimer = 112;
initial = 0;
playerAlive = true;
comboCounter = 0;
jumpamount = 25;
magicAttack = 0;
magic = false;
magicTimer = 0;
death_stick_timer = 0;
yspeed = 0;
shake = 0;
hereTheyComeTimer = 0;
playerHealth = 100;
hereTheyCome = false;
getThingsGoing = true;
onfloor = true;
displayTimer = 0;
toGo = 0;
playerPower = 0.5;
gravity = 2;
shootTimer = 0;
bossOnesAttack = 0;
randomNumber = 0;
pressOnceOnly = 0;
pressHack = 0;
specialTimer = 0;
clicks = 0;
playerSpeed = 10;
is_attacking = 0;
smack = 0;
waitAsec = 0;
gotSoap = false;
gotSoapTimer = 0;
hitPlayer = 0;
hitTimer = 0;
enemySpeed = 70;
yesGo = 0;
moved = 0;
markWave = 2;
steps = 0;
distance = 0;
addBoss = 0;
superPower = 100;
enemyPower = 0.15;
canGo = false;
zombieMode = false;
special = false;
hit2 = false;
hit3 = false;
running = false;
attacking = false;
var zombieSpots = new Array();
var zombieSpotsFade = new Array();
var erase = new Array();
var alive = new Array();
var groundMarker = new Array();
var hitPose = new Array();
var potionType = new Array();
var potions = new Array();
var boxHealth = new Array();
var boxHit = new Array();
var boxHitTimer = new Array();
var boxes = new Array();
var edropping = new Array();
var eonfloor = new Array();
var ejump = new Array();
var ejumpamount = new Array();
var eyspeed = new Array();
var shot = new Array();
var portTimer = new Array();
var beingSmacked = new Array();
var dead_body = new Array();
var type = new Array();
var hypArray = new Array();
var enemyHealth = new Array();
var damagedTimer = new Array();
var hit = new Array();
var enemyAttackingTimer = new Array();
var enemyAttacking = new Array();
var enemy = new Array();
var blocks = new Array();
var moveAbout = new Array();
var where = new Array();
var onPlatform = new Array();
var pickAttack = new Array();
var port = new Array();
var depths = new Array();
boxes.push(box1, box2);
boxHealth.push(13, 13);
boxHit.push(0, 0);
boxHitTimer.push(0, 0);
depths.push(player);
randomNumber++;
depths.push(boss);
enemy.push(boss);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push("mainBoss");
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(100);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
hitPose.push(0);
groundMarker.push(enemy_._y);
alive.push(true);
erase.push(0);
noBoss = false;
addBoss = 1;
bg.onEnterFrame = function () {
if (fg._y < 120) {
fg._y = 120;
}
if (bg._y < 10) {
bg._y = 10;
}
if (bg._y > 30) {
bg._y = 30;
}
if (fg._y > 240) {
fg._y = 240;
}
if (((((!special) && (!magic)) && (playerAlive)) && (!gotSoap)) && (inControl)) {
if (Key.isDown(38)) {
if ((fg._y > 120) && (fg._y < 240)) {
sfg._y = sfg._y + 4.5;
sfg2._y = sfg2._y + 4.5;
}
}
if (Key.isDown(40)) {
if ((fg._y > 120) && (fg._y < 240)) {
sfg._y = sfg._y - 4.5;
sfg2._y = sfg2._y - 4.5;
}
}
if (Key.isDown(38)) {
bg._y = bg._y - 0.7;
fg._y = fg._y + 3;
}
if (Key.isDown(40)) {
bg._y = bg._y + 0.7;
fg._y = fg._y - 3;
}
}
};
player.onEnterFrame = function () {
if (comboCounter > 0) {
comboBox._x = 120;
displayTimer--;
}
if (displayTimer < 0) {
comboCounter = 0;
displayTimer = 0;
}
if (displayTimer == 0) {
comboBox._x = comboBox._x - 25;
}
superPower = superPower + 0.05;
playerBar._xscale = playerHealth;
manaBar._xscale = superPower;
enterActions();
enemyHealthReachesZero();
if (((((!special) && (!magic)) && (playerAlive)) && (!gotSoap)) && (inControl)) {
pushenemy();
}
if (noBoss) {
inControl = false;
if (waitAsec < 60) {
if (!zombieMode) {
player.gotoAndStop("idle");
}
if (zombieMode) {
player.gotoAndStop("zidle");
}
}
waitAsec++;
if (waitAsec > 59) {
player._xscale = 100;
if (!zombieMode) {
player.gotoAndStop("run");
}
if (zombieMode) {
player.gotoAndStop("zrun");
}
player._x = player._x + playerSpeed;
if (player._x > 710) {
if (toGo == 0) {
_root.attachMovie("trans", "trans", _root.getNextHighestDepth());
}
toGo++;
if (toGo == 27) {
removeall();
stopAllSounds();
nextFrame();
}
}
}
}
box();
shotActions();
noOverLap();
playerMovement();
comboOne();
comboTwo();
comboThree();
runAttackTimer();
canAddPoint();
confirmAttacking();
calculateHyp();
enemyMovement();
shaker();
soapActions();
fbhit_mc.swapDepths(_root.getNextHighestDepth());
hitEm.swapDepths(_root.getNextHighestDepth());
blood_mc.swapDepths(_root.getNextHighestDepth());
sfg.swapDepths(_root.getNextHighestDepth());
sfg2.swapDepths(_root.getNextHighestDepth());
carryOn.swapDepths(_root.getNextHighestDepth());
trans.swapDepths(_root.getNextHighestDepth());
};
Instance of Symbol 1333 MovieClip in Frame 12
on (release) {
getURL ("http://www.turbonuke.com/?gamereferal=aghzombies", "_blank");
}
Frame 13
stopAllSounds();
player.removeMovieClip();
play();
Frame 14
stop();
_global.weapon = "one";
one.onRelease = function () {
_global.weapon = "one";
nextFrame();
};
two.onRelease = function () {
_global.weapon = "two";
nextFrame();
};
three.onRelease = function () {
_global.weapon = "three";
nextFrame();
};
four.onRelease = function () {
_global.weapon = "four";
nextFrame();
};
five.onRelease = function () {
_global.weapon = "five";
playerPower = 7;
nextFrame();
};
six.onRelease = function () {
_global.weapon = "six";
playerPower = 7;
nextFrame();
};
seven.onRelease = function () {
_global.weapon = "seven";
playerPower = 7;
nextFrame();
};
eight.onRelease = function () {
_global.weapon = "eight";
playerPower = 7;
nextFrame();
};
nine.onRelease = function () {
_global.weapon = "nine";
playerPower = 9;
nextFrame();
};
ten.onRelease = function () {
_global.weapon = "ten";
playerPower = 9;
nextFrame();
};
eleven.onRelease = function () {
_global.weapon = "eleven";
playerPower = 9;
nextFrame();
};
twelve.onRelease = function () {
_global.weapon = "twelve";
playerPower = 9;
nextFrame();
};
thirteen.onRelease = function () {
_global.weapon = "thirteen";
playerPower = 13;
nextFrame();
};
fourteen.onRelease = function () {
_global.weapon = "fourteen";
playerPower = 13;
nextFrame();
};
fifteen.onRelease = function () {
_global.weapon = "fifteen";
playerPower = 13;
nextFrame();
};
sixteen.onRelease = function () {
_global.weapon = "sixteen";
playerPower = 13;
nextFrame();
};
seventeen.onRelease = function () {
_global.weapon = "seventeen";
playerPower = 25;
nextFrame();
};
eighteen.onRelease = function () {
_global.weapon = "eighteen";
playerPower = 25;
nextFrame();
};
nineteen.onRelease = function () {
_global.weapon = "nineteen";
playerPower = 25;
nextFrame();
};
twenty.onRelease = function () {
_global.weapon = "twenty";
playerPower = 25;
nextFrame();
};
Instance of Symbol 1227 MovieClip "nineteen" in Frame 14
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1230 MovieClip "ten" in Frame 14
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1233 MovieClip "fifteen" in Frame 14
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1236 MovieClip "three" in Frame 14
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1239 MovieClip "twenty" in Frame 14
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1242 MovieClip "fourteen" in Frame 14
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1245 MovieClip "two" in Frame 14
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1248 MovieClip "six" in Frame 14
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1251 MovieClip "four" in Frame 14
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1254 MovieClip "eight" in Frame 14
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1257 MovieClip "seventeen" in Frame 14
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1260 MovieClip "nine" in Frame 14
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1263 MovieClip "seven" in Frame 14
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1266 MovieClip "eleven" in Frame 14
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1269 MovieClip "twelve" in Frame 14
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1272 MovieClip "eighteen" in Frame 14
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1275 MovieClip "thirteen" in Frame 14
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1278 MovieClip "one" in Frame 14
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1281 MovieClip "five" in Frame 14
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1284 MovieClip "sixteen" in Frame 14
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Frame 15
_root.attachMovie("cinemaLines2", "cinemaLines2", _root.getNextHighestDepth());
Frame 16
function walkOn() {
inControl = false;
if (player._x < 120) {
player.gotoAndStop("run");
player._x = player._x + playerSpeed;
} else {
inControl = true;
}
}
function removeall() {
hassan.removeMovieClip();
carryOn.removeMovieClip();
comboBox.removeMovieClip();
nearground.removeMovieClip();
sfg.removeMovieClip();
sfg2.removeMovieClip();
removeshot();
removeport();
removepickAttack();
removemoveAbout();
removeblocks();
removeDead_body();
removeType();
removeHypArray();
removeEnemyHealth();
removeDamagedTimer();
removeHit();
removeEnemyAttackingTimer();
removeEnemyAttacking();
removeEnemy();
removewhere();
removebeingSmacked();
removeonPlatform();
removeportTimer();
removeeyspeed();
removeejumpamount();
removeejump();
removeeonfloor();
removeedropping();
removepotions();
removeboxes();
removeboxHealth();
removeboxHit();
removeboxHitTimer();
removepotionType();
removeDepths();
removezombieSpots();
removezombieSpotsFade();
removeerase();
removealive();
removegroundMarker();
removehitPose();
}
function removezombieSpots() {
i = zombieSpots.length - 1;
while (i >= 0) {
zombieSpots[i].removeMovieClip();
zombieSpots.splice(i, 1);
i--;
}
}
function removezombieSpotsFade() {
i = zombieSpotsFade.length - 1;
while (i >= 0) {
zombieSpotsFade[i].removeMovieClip();
zombieSpotsFade.splice(i, 1);
i--;
}
}
function removeerase() {
i = erase.length - 1;
while (i >= 0) {
erase[i].removeMovieClip();
erase.splice(i, 1);
i--;
}
}
function removealive() {
i = alive.length - 1;
while (i >= 0) {
alive[i].removeMovieClip();
alive.splice(i, 1);
i--;
}
}
function removegroundMarker() {
i = groundMarker.length - 1;
while (i >= 0) {
groundMarker[i].removeMovieClip();
groundMarker.splice(i, 1);
i--;
}
}
function removehitPose() {
i = hitPose.length - 1;
while (i >= 0) {
hitPose[i].removeMovieClip();
hitPose.splice(i, 1);
i--;
}
}
function removeboxHealth() {
i = boxHealth.length - 1;
while (i >= 0) {
boxHealth[i].removeMovieClip();
boxHealth.splice(i, 1);
i--;
}
}
function removeboxHit() {
i = boxHit.length - 1;
while (i >= 0) {
boxHit[i].removeMovieClip();
boxHit.splice(i, 1);
i--;
}
}
function removeboxHitTimer() {
i = boxHitTimer.length - 1;
while (i >= 0) {
boxHitTimer[i].removeMovieClip();
boxHitTimer.splice(i, 1);
i--;
}
}
function removeboxes() {
i = boxes.length - 1;
while (i >= 0) {
boxes[i].removeMovieClip();
boxes.splice(i, 1);
i--;
}
}
function removepotionType() {
i = potionType.length - 1;
while (i >= 0) {
potionType[i].removeMovieClip();
potionType.splice(i, 1);
i--;
}
}
function removepotions() {
i = potions.length - 1;
while (i >= 0) {
potions[i].removeMovieClip();
potions.splice(i, 1);
i--;
}
}
function removeeyspeed() {
i = eyspeed.length - 1;
while (i >= 0) {
eyspeed[i].removeMovieClip();
eyspeed.splice(i, 1);
i--;
}
}
function removeejumpamount() {
i = ejumpamount.length - 1;
while (i >= 0) {
ejumpamount[i].removeMovieClip();
ejumpamount.splice(i, 1);
i--;
}
}
function removeejump() {
i = ejump.length - 1;
while (i >= 0) {
ejump[i].removeMovieClip();
ejump.splice(i, 1);
i--;
}
}
function removeeonfloor() {
i = eonfloor.length - 1;
while (i >= 0) {
eonfloor[i].removeMovieClip();
eonfloor.splice(i, 1);
i--;
}
}
function removeedropping() {
i = edropping.length - 1;
while (i >= 0) {
edropping[i].removeMovieClip();
edropping.splice(i, 1);
i--;
}
}
function removeportTimer() {
i = portTimer.length - 1;
while (i >= 0) {
portTimer[i].removeMovieClip();
portTimer.splice(i, 1);
i--;
}
}
function removeshot() {
i = shot.length - 1;
while (i >= 0) {
shot[i].removeMovieClip();
shot.splice(i, 1);
i--;
}
}
function removeport() {
i = port.length - 1;
while (i >= 0) {
port[i].removeMovieClip();
port.splice(i, 1);
i--;
}
}
function removepickAttack() {
i = pickAttack.length - 1;
while (i >= 0) {
pickAttack[i].removeMovieClip();
pickAttack.splice(i, 1);
i--;
}
}
function removeblocks() {
i = blocks.length - 1;
while (i >= 0) {
blocks[i].removeMovieClip();
blocks.splice(i, 1);
i--;
}
}
function removebeingSmacked() {
i = beingSmacked.length - 1;
while (i >= 0) {
beingSmacked[i].removeMovieClip();
beingSmacked.splice(i, 1);
i--;
}
}
function removemoveAbout() {
i = moveAbout.length - 1;
while (i >= 0) {
moveAbout[i].removeMovieClip();
moveAbout.splice(i, 1);
i--;
}
}
function removewhere() {
i = where.length - 1;
while (i >= 0) {
where[i].removeMovieClip();
where.splice(i, 1);
i--;
}
}
function removeonPlatform() {
i = onPlatform.length - 1;
while (i >= 0) {
onPlatform[i].removeMovieClip();
onPlatform.splice(i, 1);
i--;
}
}
function removeDead_body() {
i = dead_body.length - 1;
while (i >= 0) {
dead_body[i].removeMovieClip();
dead_body.splice(i, 1);
i--;
}
}
function removeType() {
i = type.length - 1;
while (i >= 0) {
type[i].removeMovieClip();
type.splice(i, 1);
i--;
}
}
function removeHypArray() {
i = hypArray.length - 1;
while (i >= 0) {
hypArray[i].removeMovieClip();
hypArray.splice(i, 1);
i--;
}
}
function removeEnemyHealth() {
i = enemyHealth.length - 1;
while (i >= 0) {
enemyHealth[i].removeMovieClip();
enemyHealth.splice(i, 1);
i--;
}
}
function removeDamagedTimer() {
i = damagedTimer.length - 1;
while (i >= 0) {
damagedTimer[i].removeMovieClip();
damagedTimer.splice(i, 1);
i--;
}
}
function removeHit() {
i = hit.length - 1;
while (i >= 0) {
hit[i].removeMovieClip();
hit.splice(i, 1);
i--;
}
}
function removeEnemyAttackingTimer() {
i = enemyAttackingTimer.length - 1;
while (i >= 0) {
enemyAttackingTimer[i].removeMovieClip();
enemyAttackingTimer.splice(i, 1);
i--;
}
}
function removeEnemyAttacking() {
i = enemyAttacking.length - 1;
while (i >= 0) {
enemyAttacking[i].removeMovieClip();
enemyAttacking.splice(i, 1);
i--;
}
}
function removeEnemy() {
i = enemy.length - 1;
while (i >= 0) {
enemy[i].removeMovieClip();
enemy.splice(i, 1);
i--;
}
}
function removeDepths() {
i = depths.length - 1;
while (i >= 0) {
depths[i].removeMovieClip();
depths.splice(i, 1);
i--;
}
}
function shaker() {
if (shake == 0) {
_root._x = 0;
_root._y = 0;
} else if (shake == 1) {
shake = shake + 1;
_root._x = _root._x + 2;
_root._y = _root._y + 2;
} else if (shake == 2) {
shake = shake + 1;
_root._y = _root._y - 4;
_root._x = _root._x - 4;
} else if (shake == 3) {
shake = shake + 1;
_root._x = _root._x + 1;
_root._y = _root._y + 1;
} else if (shake == 4) {
shake = shake + 1;
_root._x = 0;
_root._y = 0;
} else if (shake == 5) {
shake = shake + 1;
_root._x = 4;
_root._y = 4;
} else if (shake == 6) {
shake = shake + 1;
_root._x = 2;
_root._y = 2;
} else if (shake == 7) {
shake = shake + 1;
_root._x = 0;
_root._y = 0;
} else if (shake == 8) {
shake = shake + 1;
_root._x = _root._x + 2;
_root._y = _root._y + 2;
} else if (shake == 9) {
shake = shake + 1;
_root._y = _root._y - 4;
_root._x = _root._x - 4;
} else if (shake == 10) {
shake = shake + 1;
_root._x = _root._x + 1;
_root._y = _root._y + 1;
} else if (shake == 11) {
shake = shake + 1;
_root._x = 0;
_root._y = 0;
} else if (shake == 12) {
shake = shake + 1;
_root._x = 4;
_root._y = 4;
} else if (shake == 13) {
shake = shake + 1;
_root._x = 2;
_root._y = 2;
} else if (shake == 14) {
shake = shake + 1;
_root._x = _root._x + 1;
_root._y = _root._y + 1;
} else if (shake == 15) {
shake = shake + 1;
_root._x = 0;
_root._y = 0;
} else if (shake == 16) {
shake = shake + 1;
_root._x = _root._x + 2;
_root._y = _root._y + 2;
} else if (shake == 17) {
shake = shake + 1;
_root._y = _root._y - 4;
_root._x = _root._x - 4;
} else if (shake == 18) {
shake = shake + 1;
_root._x = _root._x + 1;
_root._y = _root._y + 1;
} else if (shake == 19) {
shake = shake + 1;
_root._x = 0;
_root._y = 0;
} else if (shake == 20) {
shake = shake + 1;
_root._x = 4;
_root._y = 4;
} else if (shake == 21) {
shake = shake + 1;
_root._x = 2;
_root._y = 2;
} else if (shake == 22) {
shake = shake + 1;
_root._x = 0;
_root._y = 0;
} else if (shake == 23) {
shake = shake + 1;
_root._x = _root._x + 2;
_root._y = _root._y + 2;
} else if (shake == 24) {
shake = shake + 1;
_root._y = _root._y - 4;
_root._x = _root._x - 4;
} else if (shake == 25) {
shake = shake + 1;
_root._x = _root._x + 1;
_root._y = _root._y + 1;
} else if (shake == 26) {
shake = shake + 1;
_root._x = 0;
_root._y = 0;
} else if (shake == 27) {
shake = shake + 1;
_root._x = 4;
_root._y = 4;
} else if (shake == 28) {
shake = shake + 1;
_root._x = 2;
_root._y = 2;
} else if (shake > 29) {
shake = 0;
_root._x = _root._x + 1;
_root._y = _root._y + 1;
}
}
function waveActions() {
if (((distance == 6) && (markWave < 0)) && (!canGo)) {
inControl = false;
if (waitAsec < 60) {
if (!zombieMode) {
player.gotoAndStop("idle");
}
if (zombieMode) {
player.gotoAndStop("zidle");
}
}
waitAsec++;
if (waitAsec > 59) {
player._xscale = 100;
if (!zombieMode) {
player.gotoAndStop("run");
}
if (zombieMode) {
player.gotoAndStop("zrun");
}
player._x = player._x + playerSpeed;
if (player._x > 710) {
if (toGo == 0) {
_root.attachMovie("trans", "trans", _root.getNextHighestDepth());
}
toGo++;
if (toGo == 27) {
removeall();
stopAllSounds();
nextFrame();
}
}
}
}
if (getThingsGoing) {
if (startGameTimer > 80) {
addenemies();
getThingsGoing = false;
}
}
if (distance == 3) {
if (addBoss == 0) {
randomNumber++;
enemy_ = _root.attachMovie("zsuperEnemy", "zsuperEnemy" + randomNumber, _root.getNextHighestDepth(), {_y:fg._y + 200, _x:1120});
depths.push(enemy_);
enemy.push(enemy_);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push("bossOne");
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(75);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
hitPose.push(0);
groundMarker.push(enemy_._y);
alive.push(true);
erase.push(0);
noBoss = false;
addBoss = 1;
}
}
if (noBoss) {
if (distance < 6) {
if (markWave < 0) {
if (player._x < 410) {
if (yesGo == 0) {
distance++;
_root.attachMovie("gogo", "gogo", _root.getNextHighestDepth());
}
yesGo = 1;
canGo = true;
}
}
}
}
if (steps > 130) {
addenemies();
gogo.removeMovieClip();
yesGo = 0;
markWave = 2;
canGo = false;
steps = 0;
}
}
function shotActions() {
i = shot.length - 1;
while (i >= 0) {
if (shot[i]._y > 300) {
randomNumber++;
hitGround_mc = _root.attachMovie("hitGround", "hitGround" + randomNumber, _root.getNextHighestDepth(), {_x:shot[i]._x, _y:shot[i]._y});
hitGround_mc._xscale = shot[i]._xscale;
shot[i].removeMovieClip();
shot.splice(i, 1);
}
j = enemy.length - 1;
while (j >= 0) {
if (shot[i].hitTest(enemy[j])) {
if (type[j] == 0) {
ejump[j] = true;
eonfloor[j] = false;
eyspeed[j] = 0;
eyspeed[j] = eyspeed[j] - ejumpamount[j];
}
hitPose[j]++;
if (hitPose[j] > 1) {
hitPose[j] = 0;
}
randomNumber++;
fbhit_mc = _root.attachMovie("fbhit", "fbhit" + randomNumber, _root.getNextHighestDepth(), {_y:shot[i]._y, _x:shot[i]._x});
fbhit_mc._xscale = shot[i]._xscale;
randomNumber++;
blood_mc = _root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_y:enemy[j]._y, _x:enemy[j]._x});
ehit_sound.start();
beingSmacked[j]++;
randomNumber++;
comboCounter++;
displayTimer = 16;
hitEm = _root.attachMovie("oneHit", "oneHit" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[j]._x, _y:enemy[j]._y});
comboBox.cnum.text = comboCounter;
hit[j] = 1;
damagedTimer[j] = 0;
enemyHealth[j] = enemyHealth[j] - (playerPower * 5);
shot[i].removeMovieClip();
shot.splice(i, 1);
}
j--;
}
i--;
}
}
function swapdepths() {
i = depths.length - 1;
while (i >= 0) {
if (!jump) {
depths[i].idiot_depth = Math.floor((depths[i]._y * 480) + depths[i]._x);
depths[i].swapDepths(depths[i].idiot_depth);
}
i--;
}
}
function noOverLap() {
i = enemy.length - 1;
while (i >= 0) {
j = enemy.length - 1;
while (j >= 0) {
if (!(enemy[i] === enemy[j])) {
if (enemy[i].hitTest(enemy[j])) {
if (alive[i] && (type[i] == 0)) {
endX = _root.enemy[j]._x;
enemy[i]._x = enemy[i]._x - ((endX - enemy[i]._x) / enemySpeed);
}
}
}
j--;
}
i--;
}
}
function calculateHyp() {
i = enemy.length - 1;
while (i >= 0) {
dist_x = player._x - enemy[i]._x;
hypArray[i] = Math.sqrt(dist_x * dist_x);
i--;
}
}
function enemyHealthReachesZero() {
i = enemy.length - 1;
while (i >= 0) {
if (enemyHealth[i] < 1) {
alive[i] = false;
if (erase[i] == 0) {
if (type[i] == 0) {
markWave--;
}
if (type[i] == "bossOne") {
noBoss = true;
}
}
erase[i]++;
if (erase[i] == 52) {
soapDrop = Math.round(Math.random() * 4) + 0;
if (soapDrop == 0) {
if (eonfloor[i]) {
if (enemy[i]._xscale == 100) {
randomNumber++;
soap_clip = _root.attachMovie("soap_mc", "soap_mc" + randomNumber, _root.getNextHighestDepth(), {_y:enemy[i]._y + 15, _x:enemy[i]._x + 50});
potions.push(soap_clip);
depths.push(soap_clip);
potionType.push(1);
}
if (enemy[i]._xscale == -100) {
randomNumber++;
soap_clip = _root.attachMovie("soap_mc", "soap_mc" + randomNumber, _root.getNextHighestDepth(), {_y:enemy[i]._y + 15, _x:enemy[i]._x - 50});
potions.push(soap_clip);
depths.push(soap_clip);
potionType.push(1);
}
}
}
enemy[i].removeMovieClip();
enemy.splice(i, 1);
portTimer.splice(i, 1);
hit.splice(i, 1);
type.splice(i, 1);
damagedTimer.splice(i, 1);
enemyHealth.splice(i, 1);
enemyAttacking.splice(i, 1);
enemyAttackingTimer.splice(i, 1);
hypArray.splice(i, 1);
moveAbout.splice(i, 1);
where.splice(i, 1);
onPlatform.splice(i, 1);
beingSmacked.splice(i, 1);
pickAttack.splice(i, 1);
port.splice(i, 1);
edropping.splice(i, 1);
eonfloor.splice(i, 1);
ejump.splice(i, 1);
ejumpamount.splice(i, 1);
eyspeed.splice(i, 1);
alive.splice(i, 1);
erase.splice(i, 1);
groundMarker.splice(i, 1);
hitPose.splice(i, 1);
}
}
i--;
}
}
function enemyMovement() {
death_stick.onEnterFrame = function () {
if (canGo) {
if (fg._x > -1916.9) {
if (player._x > 410) {
this._x = this._x - 5;
}
}
}
if (Key.isDown(38)) {
if ((fg._y > 120) && (fg._y < 240)) {
this._y = this._y + 3;
}
}
if (Key.isDown(40)) {
if ((fg._y > 120) && (fg._y < 240)) {
this._y = this._y - 3;
}
}
death_stick_timer++;
if (death_stick_timer == 50) {
death_stick_timer = 0;
this.removeMovieClip();
}
if ((this.hitTest(player) && (death_stick_timer > 30)) && (player._y < this._y)) {
if (((!zombieMode) && (!special)) && (!gotSoap)) {
hitPlayer = 1;
playerHealth = playerHealth - (enemyPower * 1.5);
}
}
};
i = enemy.length - 1;
while (i >= 0) {
if (type[i] == "bossOne") {
if (!alive[i]) {
enemy[i].gotoAndStop("dead");
}
if (ejump[i]) {
enemy[i]._y = enemy[i]._y + eyspeed[i];
if (enemy[i]._y > groundMarker[i]) {
edropping[i] = false;
eonfloor[i] = true;
ejump[i] = false;
eyspeed[i] = 0;
enemy[i]._y = groundMarker[i];
} else {
if (enemy[i]._xscale == 100) {
enemy[i]._x = enemy[i]._x + 2;
} else {
enemy[i]._x = enemy[i]._x - 2;
}
eyspeed[i] = eyspeed[i] + (gravity * 2);
}
}
if (alive[i]) {
if (!playerAlive) {
hit[i] = 0;
damagedTimer[i] = 0;
enemy[i].gotoAndStop("idle");
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 50) + 0;
}
if (playerAlive) {
if (player.hitTest(enemy[i])) {
if (ejump[i]) {
if (((((((is_attacking == 3) or (is_attacking == 10)) or (is_attacking == 16)) or (is_attacking == 20)) or (is_attacking == 22)) or (is_attacking == 24)) or (is_attacking == 26)) {
ejump[i] = true;
eonfloor[i] = false;
eyspeed[i] = 0;
eyspeed[i] = eyspeed[i] - ejumpamount[i];
}
}
if (eonfloor[i] && (enemyAttackingTimer[i] < 100)) {
if (is_attacking == 22) {
groundMarker[i] = enemy[i]._y;
ejump[i] = true;
eonfloor[i] = false;
eyspeed[i] = eyspeed[i] - ejumpamount[i];
}
}
}
if (player._x < enemy[i]._x) {
enemy[i]._xscale = 100;
} else {
enemy[i]._xscale = -100;
}
if ((hypArray[i] < 200) && (eonfloor[i])) {
if (enemyAttacking[i] == 1) {
if (enemy[i].hitTest(player)) {
invisible = false;
player._alpha = 100;
if (((!zombieMode) && (!special)) && (!gotSoap)) {
hitPlayer = 1;
playerHealth = playerHealth - (enemyPower * 1.5);
}
}
}
enemyAttackingTimer[i]++;
} else {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
if (enemyAttackingTimer[i] > 100) {
enemy[i].gotoAndStop("attack");
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] == 110) {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
pickAttack[i] = Math.round(Math.random() * 3) + 0;
}
}
if (enemyAttacking[i] == 0) {
if (enemy[i].hitTest(player)) {
if (jump) {
if (((magic && (shootTimer > 20)) && (magicTimer == 0)) or (magicTimer == 5)) {
hitPose[i]++;
if (hitPose[i] > 1) {
hitPose[i] = 0;
}
randomNumber++;
blood_mc = _root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_y:enemy[i]._y, _x:enemy[i]._x});
ehit_sound.start();
beingSmacked[i]++;
randomNumber++;
comboCounter++;
displayTimer = 16;
hitEm = _root.attachMovie("oneHit", "oneHit" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
comboBox.cnum.text = comboCounter;
hit[i] = 1;
damagedTimer[i] = 0;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
if (!jump) {
if (((magic && (shootTimer > 20)) && (magicTimer == 0)) or (magicTimer == 5)) {
hitPose[i]++;
if (hitPose[i] > 1) {
hitPose[i] = 0;
}
comboCounter++;
displayTimer = 16;
randomNumber++;
blood_mc = _root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_y:enemy[i]._y, _x:enemy[i]._x});
ehit_sound.start();
beingSmacked[i]++;
randomNumber++;
hitEm = _root.attachMovie("oneHit", "oneHit" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
comboBox.cnum.text = comboCounter;
hit[i] = 1;
damagedTimer[i] = 0;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
if (enemy[i].hitTest(player)) {
if (jump) {
if (((((((is_attacking == 3) or (is_attacking == 10)) or (is_attacking == 16)) or (is_attacking == 20)) or (is_attacking == 22)) or (is_attacking == 24)) or (is_attacking == 26)) {
if (hypArray[i] < 150) {
hitPose[i]++;
if (hitPose[i] > 1) {
hitPose[i] = 0;
}
randomNumber++;
blood_mc = _root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_y:enemy[i]._y, _x:enemy[i]._x});
ehit_sound.start();
beingSmacked[i]++;
comboCounter++;
displayTimer = 16;
randomNumber++;
hitEm = _root.attachMovie("oneHit", "oneHit" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
comboBox.cnum.text = comboCounter;
hit[i] = 1;
damagedTimer[i] = 0;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
if (!jump) {
if (((is_attacking == 3) or (is_attacking == 12)) or (is_attacking == 22)) {
if (hypArray[i] < 150) {
hitPose[i]++;
if (hitPose[i] > 1) {
hitPose[i] = 0;
}
randomNumber++;
blood_mc = _root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_y:enemy[i]._y, _x:enemy[i]._x});
ehit_sound.start();
beingSmacked[i]++;
comboCounter++;
displayTimer = 16;
randomNumber++;
hitEm = _root.attachMovie("oneHit", "oneHit" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
comboBox.cnum.text = comboCounter;
hit[i] = 1;
damagedTimer[i] = 0;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
}
if (hit[i] == 1) {
if (!magic) {
if (ejump[i]) {
if (hitPose[i] == 0) {
enemy[i].gotoAndStop("ahit1");
}
if (hitPose[i] == 1) {
enemy[i].gotoAndStop("ahit2");
}
}
if (!ejump[i]) {
if (hitPose[i] == 0) {
enemy[i].gotoAndStop("hit1");
}
if (hitPose[i] == 1) {
enemy[i].gotoAndStop("hit2");
}
}
}
if (magic && (shootTimer > 20)) {
enemy[i].gotoAndStop("shock");
}
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
damagedTimer[i]++;
if (damagedTimer[i] == 15) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if ((hit[i] == 0) && (eonfloor[i])) {
portTimer[i]++;
if (portTimer[i] > 32) {
where[i] = Math.round(Math.random() * 2) + 0;
moveAbout[i] = Math.round(Math.random() * 1) + 0;
portTimer[i] = 0;
}
if ((where[i] == 0) or (where[i] == 1)) {
if ((!ejump[i]) && (!edropping[i])) {
enemy[i].gotoAndStop("run");
}
if (moveAbout[i] == 0) {
endX = _root.player._x;
endY = _root.player._y;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) + 75) / enemySpeed);
if (!jump) {
enemy[i]._y = enemy[i]._y + ((endY - enemy[i]._y) / enemySpeed);
}
}
if (moveAbout[i] == 1) {
endX = _root.player._x;
endY = _root.player._y;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) - 75) / enemySpeed);
if (!jump) {
enemy[i]._y = enemy[i]._y + ((endY - enemy[i]._y) / enemySpeed);
}
}
} else {
enemy[i].gotoAndStop("idle");
}
}
}
}
}
}
if (type[i] == 0) {
if (!alive[i]) {
enemy[i].gotoAndStop("dead");
}
if (ejump[i]) {
enemy[i]._y = enemy[i]._y + eyspeed[i];
if (enemy[i]._y > groundMarker[i]) {
edropping[i] = false;
eonfloor[i] = true;
ejump[i] = false;
eyspeed[i] = 0;
enemy[i]._y = groundMarker[i];
} else {
if (enemy[i]._xscale == 100) {
enemy[i]._x = enemy[i]._x + 2;
} else {
enemy[i]._x = enemy[i]._x - 2;
}
eyspeed[i] = eyspeed[i] + (gravity * 2);
}
}
if (alive[i]) {
if (!playerAlive) {
hit[i] = 0;
damagedTimer[i] = 0;
enemy[i].gotoAndStop("idle");
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 50) + 0;
}
if (playerAlive) {
if (player.hitTest(enemy[i])) {
if (ejump[i]) {
if (((((((is_attacking == 3) or (is_attacking == 10)) or (is_attacking == 16)) or (is_attacking == 20)) or (is_attacking == 22)) or (is_attacking == 24)) or (is_attacking == 26)) {
ejump[i] = true;
eonfloor[i] = false;
eyspeed[i] = 0;
eyspeed[i] = eyspeed[i] - ejumpamount[i];
}
}
if (eonfloor[i] && (enemyAttackingTimer[i] < 100)) {
if (is_attacking == 22) {
groundMarker[i] = enemy[i]._y;
ejump[i] = true;
eonfloor[i] = false;
eyspeed[i] = eyspeed[i] - ejumpamount[i];
}
}
}
if (player._x < enemy[i]._x) {
enemy[i]._xscale = 100;
} else {
enemy[i]._xscale = -100;
}
if ((hypArray[i] < 200) && (eonfloor[i])) {
if (enemyAttacking[i] == 1) {
if (enemy[i].hitTest(player)) {
invisible = false;
player._alpha = 100;
if (((!zombieMode) && (!special)) && (!gotSoap)) {
hitPlayer = 1;
playerHealth = playerHealth - (enemyPower * 1.5);
}
}
}
enemyAttackingTimer[i]++;
} else {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
if (enemyAttackingTimer[i] > 100) {
enemy[i].gotoAndStop("attack");
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] == 110) {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
pickAttack[i] = Math.round(Math.random() * 3) + 0;
}
}
if (enemyAttacking[i] == 0) {
if (enemy[i].hitTest(player)) {
if (jump) {
if (((magic && (shootTimer > 20)) && (magicTimer == 0)) or (magicTimer == 5)) {
hitPose[i]++;
if (hitPose[i] > 1) {
hitPose[i] = 0;
}
randomNumber++;
blood_mc = _root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_y:enemy[i]._y, _x:enemy[i]._x});
ehit_sound.start();
beingSmacked[i]++;
randomNumber++;
comboCounter++;
displayTimer = 16;
hitEm = _root.attachMovie("oneHit", "oneHit" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
comboBox.cnum.text = comboCounter;
hit[i] = 1;
damagedTimer[i] = 0;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
if (!jump) {
if (((magic && (shootTimer > 20)) && (magicTimer == 0)) or (magicTimer == 5)) {
hitPose[i]++;
if (hitPose[i] > 1) {
hitPose[i] = 0;
}
comboCounter++;
displayTimer = 16;
randomNumber++;
blood_mc = _root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_y:enemy[i]._y, _x:enemy[i]._x});
ehit_sound.start();
beingSmacked[i]++;
randomNumber++;
hitEm = _root.attachMovie("oneHit", "oneHit" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
comboBox.cnum.text = comboCounter;
hit[i] = 1;
damagedTimer[i] = 0;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
if (enemy[i].hitTest(player)) {
if (jump) {
if (((((((is_attacking == 3) or (is_attacking == 10)) or (is_attacking == 16)) or (is_attacking == 20)) or (is_attacking == 22)) or (is_attacking == 24)) or (is_attacking == 26)) {
if (hypArray[i] < 150) {
hitPose[i]++;
if (hitPose[i] > 1) {
hitPose[i] = 0;
}
randomNumber++;
blood_mc = _root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_y:enemy[i]._y, _x:enemy[i]._x});
ehit_sound.start();
beingSmacked[i]++;
comboCounter++;
displayTimer = 16;
randomNumber++;
hitEm = _root.attachMovie("oneHit", "oneHit" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
comboBox.cnum.text = comboCounter;
hit[i] = 1;
damagedTimer[i] = 0;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
if (!jump) {
if (((is_attacking == 3) or (is_attacking == 12)) or (is_attacking == 22)) {
if (hypArray[i] < 150) {
hitPose[i]++;
if (hitPose[i] > 1) {
hitPose[i] = 0;
}
randomNumber++;
blood_mc = _root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_y:enemy[i]._y, _x:enemy[i]._x});
ehit_sound.start();
beingSmacked[i]++;
comboCounter++;
displayTimer = 16;
randomNumber++;
hitEm = _root.attachMovie("oneHit", "oneHit" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
comboBox.cnum.text = comboCounter;
hit[i] = 1;
damagedTimer[i] = 0;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
}
if (hit[i] == 1) {
if (!magic) {
if (ejump[i]) {
if (hitPose[i] == 0) {
enemy[i].gotoAndStop("ahit1");
}
if (hitPose[i] == 1) {
enemy[i].gotoAndStop("ahit2");
}
}
if (!ejump[i]) {
if (hitPose[i] == 0) {
enemy[i].gotoAndStop("hit1");
}
if (hitPose[i] == 1) {
enemy[i].gotoAndStop("hit2");
}
}
}
if (magic && (shootTimer > 20)) {
enemy[i].gotoAndStop("shock");
}
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
damagedTimer[i]++;
if (damagedTimer[i] == 15) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if ((hit[i] == 0) && (eonfloor[i])) {
portTimer[i]++;
if (portTimer[i] > 32) {
where[i] = Math.round(Math.random() * 2) + 0;
moveAbout[i] = Math.round(Math.random() * 1) + 0;
portTimer[i] = 0;
}
if ((where[i] == 0) or (where[i] == 1)) {
if ((!ejump[i]) && (!edropping[i])) {
enemy[i].gotoAndStop("run");
}
if (moveAbout[i] == 0) {
endX = _root.player._x;
endY = _root.player._y;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) + 75) / enemySpeed);
if (!jump) {
enemy[i]._y = enemy[i]._y + ((endY - enemy[i]._y) / enemySpeed);
}
}
if (moveAbout[i] == 1) {
endX = _root.player._x;
endY = _root.player._y;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) - 75) / enemySpeed);
if (!jump) {
enemy[i]._y = enemy[i]._y + ((endY - enemy[i]._y) / enemySpeed);
}
}
} else {
enemy[i].gotoAndStop("idle");
}
}
}
}
}
}
i--;
}
}
function pushenemy() {
i = enemy.length - 1;
while (i >= 0) {
if (Key.isDown(38)) {
if ((fg._y > 120) && (fg._y < 240)) {
enemy[i]._y = enemy[i]._y + 3;
}
}
if (Key.isDown(40)) {
if ((fg._y > 120) && (fg._y < 240)) {
enemy[i]._y = enemy[i]._y - 3;
}
}
i--;
}
}
function pushHole() {
i = zombieSpots.length - 1;
while (i >= 0) {
if (Key.isDown(38)) {
if ((fg._y > 120) && (fg._y < 240)) {
zombieSpots[i]._y = zombieSpots[i]._y + 3;
}
}
if (Key.isDown(40)) {
if ((fg._y > 120) && (fg._y < 240)) {
zombieSpots[i]._y = zombieSpots[i]._y - 3;
}
}
i--;
}
}
function box() {
i = boxes.length - 1;
while (i >= 0) {
if (player.hitTest(boxes[i])) {
if (boxHealth[i] > 0) {
if (!jump) {
if (((is_attacking == 3) or (is_attacking == 12)) or (is_attacking == 22)) {
ehit_sound.start();
boxHit[i] = 1;
boxHealth[i]--;
randomNumber++;
hitEm_box = _root.attachMovie("boxHit", "boxHit" + randomNumber, _root.getNextHighestDepth(), {_x:boxes[i]._x + 50, _y:boxes[i]._y});
}
}
if (jump) {
if (((((((is_attacking == 3) or (is_attacking == 10)) or (is_attacking == 16)) or (is_attacking == 20)) or (is_attacking == 22)) or (is_attacking == 24)) or (is_attacking == 26)) {
ehit_sound.start();
boxHit[i] = 1;
boxHealth[i]--;
randomNumber++;
hitEm_box = _root.attachMovie("boxHit", "boxHit" + randomNumber, _root.getNextHighestDepth(), {_x:boxes[i]._x + 50, _y:boxes[i]._y});
}
}
}
}
if (boxHealth[i] > 10) {
boxes[i].gotoAndStop("fixed");
}
if ((boxHealth[i] > 0) && (boxHealth[i] < 10)) {
boxes[i].gotoAndStop("cracked");
}
if (boxHealth[i] == 1) {
boxHealth[i] = 0;
boxes[i].gotoAndStop("broken");
randomNumber++;
soap_clip = _root.attachMovie("soap_mc", "soap_mc" + randomNumber, _root.getNextHighestDepth(), {_y:boxes[i]._y, _x:boxes[i]._x});
potions.push(soap_clip);
depths.push(soap_clip);
potionType.push(1);
}
if (boxHit[i] == 0) {
var _local2 = boxes[i].transform.colorTransform;
boxes[i].transform.colorTransform = new flash.geom.ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
}
if (boxHit[i] == 1) {
var _local2 = boxes[i].transform.colorTransform;
_local2.rgb = 4294967295;
boxes[i].transform.colorTransform = _local2;
boxHitTimer[i]++;
if (boxHitTimer[i] == 1) {
boxHit[i] = 0;
boxHitTimer[i] = 0;
}
}
if (((((!special) && (!magic)) && (playerAlive)) && (!gotSoap)) && (inControl)) {
if (Key.isDown(38)) {
if ((fg._y > 120) && (fg._y < 240)) {
boxes[i]._y = boxes[i]._y + 3;
}
}
if (Key.isDown(40)) {
if ((fg._y > 120) && (fg._y < 240)) {
boxes[i]._y = boxes[i]._y - 3;
}
}
}
i--;
}
}
function soapActions() {
i = potions.length - 1;
while (i >= 0) {
if (player.hitTest(potions[i]._x, potions[i]._y, true)) {
if ((!attacking) && (inControl)) {
gotSoap = true;
superPower = superPower + 25;
potions[i].removeMovieClip();
potions.splice(i, 1);
potionType.splice(i, 1);
}
}
if (((((!special) && (!magic)) && (playerAlive)) && (!gotSoap)) && (inControl)) {
if (Key.isDown(38)) {
if ((fg._y > 120) && (fg._y < 240)) {
potions[i]._y = potions[i]._y + 3;
}
}
if (Key.isDown(40)) {
if ((fg._y > 120) && (fg._y < 240)) {
potions[i]._y = potions[i]._y - 3;
}
}
}
i--;
}
}
function pullUpZombies() {
i = zombieSpots.length - 1;
while (i >= 0) {
zombieSpotsFade[i]++;
if (zombieSpotsFade[i] == 70) {
randomNumber++;
enemy_ = _root.attachMovie("zombieOne", "zombie" + randomNumber, _root.getNextHighestDepth(), {_y:zombieSpots[i]._y, _x:zombieSpots[i]._x});
depths.push(enemy_);
enemy.push(enemy_);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(0);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(25);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
hitPose.push(0);
groundMarker.push(enemy_._y);
alive.push(true);
erase.push(0);
zombieSpots[i].removeMovieClip();
zombieSpots.splice(i, 1);
zombieSpotsFade.splice(i, 1);
}
i--;
}
}
function addenemies() {
hereTheyCome = true;
}
function actuallyAddEnemies() {
if (hereTheyCome) {
hereTheyComeTimer++;
}
if (hereTheyComeTimer == 10) {
shake++;
quake_sound.start();
randomNumber++;
hole = _root.attachMovie("zombiehole", "zombiehole" + randomNumber, _root.getNextHighestDepth(), {_y:Math.round(Math.random() * 70) + 330, _x:Math.round(Math.random() * 550) + 0});
zombieSpots.push(hole);
zombieSpotsFade.push(0);
depths.push(hole);
}
if (hereTheyComeTimer == 60) {
shake++;
quake_sound.start();
randomNumber++;
hole = _root.attachMovie("zombiehole", "zombiehole" + randomNumber, _root.getNextHighestDepth(), {_y:Math.round(Math.random() * 70) + 330, _x:Math.round(Math.random() * 550) + 0});
zombieSpots.push(hole);
zombieSpotsFade.push(0);
depths.push(hole);
}
if (hereTheyComeTimer == 120) {
shake++;
quake_sound.start();
randomNumber++;
hole = _root.attachMovie("zombiehole", "zombiehole" + randomNumber, _root.getNextHighestDepth(), {_y:Math.round(Math.random() * 70) + 330, _x:Math.round(Math.random() * 550) + 0});
zombieSpots.push(hole);
zombieSpotsFade.push(0);
depths.push(hole);
hereTheyComeTimer = 0;
hereTheyCome = false;
}
}
function canAddPoint() {
if (clicks == 0) {
canAddComboPoint = true;
} else {
canAddComboPoint = false;
}
}
function runAttackTimer() {
if (attacking) {
if (!jump) {
playerSpeed = 1;
}
is_attacking++;
} else {
playerSpeed = 10;
}
}
function confirmAttacking() {
if (clicks > 0) {
attacking = true;
}
}
function comboOne() {
if (!addSecondCombo) {
if (!addThirdCombo) {
if (addFirstCombo) {
if (attacking) {
if (jump) {
if (!zombieMode) {
player.gotoAndStop("aattack2");
}
if (zombieMode) {
player.gotoAndStop("azattack");
}
}
if (!jump) {
if (!zombieMode) {
player.gotoAndStop("attack2");
}
if (zombieMode) {
player.gotoAndStop("zattack");
}
}
if (is_attacking == 7) {
if (jump && (player._y > 180)) {
yspeed = 0;
yspeed = yspeed - 20;
}
addFirstCombo = false;
if (clicks == 1) {
smack = 0;
clicks = 0;
is_attacking = 0;
attacking = false;
}
if (clicks > 1) {
smack = 0;
addSecondCombo = true;
}
}
}
}
}
}
}
function comboTwo() {
if (!addFirstCombo) {
if (!addThirdCombo) {
if (addSecondCombo) {
if (attacking) {
if (jump) {
if (!zombieMode) {
player.gotoAndStop("aattack");
}
if (zombieMode) {
player.gotoAndStop("azattack2");
}
}
if (!jump) {
if (!zombieMode) {
player.gotoAndStop("attack");
}
if (zombieMode) {
player.gotoAndStop("zattack2");
}
}
if (is_attacking == 19) {
if (jump && (player._y > 180)) {
yspeed = 0;
yspeed = yspeed - 20;
}
addSecondCombo = false;
if (clicks == 2) {
smack = 0;
clicks = 0;
is_attacking = 0;
attacking = false;
}
if (clicks > 2) {
smack = 0;
addThirdCombo = true;
}
}
}
}
}
}
}
function comboThree() {
if (!addFirstCombo) {
if (!addSecondCombo) {
if (addThirdCombo) {
if (attacking) {
if (jump) {
if (!zombieMode) {
player.gotoAndStop("aattack3");
}
if (zombieMode) {
player.gotoAndStop("azattack3");
}
}
if (!jump) {
if (!zombieMode) {
player.gotoAndStop("attack3");
}
if (zombieMode) {
player.gotoAndStop("zattack3");
}
}
if (is_attacking == 26) {
if (jump && (player._y > 180)) {
yspeed = 0;
yspeed = yspeed - 20;
}
addThirdCombo = false;
if (clicks == 3) {
smack = 0;
clicks = 0;
is_attacking = 0;
attacking = false;
}
if (clicks > 3) {
smack = 0;
clicks = 1;
is_attacking = 0;
addFirstCombo = true;
}
}
}
}
}
}
}
function playerMovement() {
if (hitPlayer == 0) {
var _local4 = player.transform.colorTransform;
player.transform.colorTransform = new flash.geom.ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
}
if (hitPlayer == 1) {
var _local4 = player.transform.colorTransform;
_local4.rgb = 4294967295;
player.transform.colorTransform = _local4;
hitTimer++;
if (hitTimer == 1) {
hitPlayer = 0;
hitTimer = 0;
}
}
if ((player._x < 46) && (inControl)) {
player._x = 46;
}
if (canGo && (inControl)) {
if (fg._x > -1916.9) {
if (player._x > 410) {
i = enemy.length - 1;
while (i >= 0) {
enemy[i]._x = enemy[i]._x - 5;
i--;
}
j = boxes.length - 1;
while (j >= 0) {
boxes[j]._x = boxes[j]._x - 5;
j--;
}
k = potions.length - 1;
while (k >= 0) {
potions[k]._x = potions[k]._x - 5;
k--;
}
moved++;
sfg._x = sfg._x - 5;
sfg2._x = sfg2._x - 5;
bg._x = bg._x - 5;
fg._x = fg._x - 5;
steps++;
player._x = 410;
}
}
}
if ((player._x > 590) && (inControl)) {
player._x = 590;
}
if (inControl) {
if (playerAlive) {
if (!gotSoap) {
if (!magic) {
if (!jump) {
if (!special) {
if (!attacking) {
if (!running) {
if (!zombieMode) {
player.gotoAndStop("idle");
}
if (zombieMode) {
player.gotoAndStop("zidle");
}
}
if (running) {
if (!zombieMode) {
player.gotoAndStop("run");
}
if (zombieMode) {
player.gotoAndStop("zrun");
}
}
}
}
}
}
}
}
}
if (!Key.isDown(68)) {
magicTimer = 0;
shootTimer = 0;
magic = false;
airMagic = false;
}
if (Key.isDown(68)) {
if (inControl) {
if (playerAlive) {
if (!gotSoap) {
if (!special) {
if (!attacking) {
if (superPower > 10) {
if (!jump) {
magic = true;
}
if (jump) {
airMagic = true;
}
}
}
}
}
}
}
}
if (airMagic) {
if (!zombieMode) {
player.gotoAndStop("aspecial");
}
if (zombieMode) {
player.gotoAndStop("zaspecial");
}
if ((magicAttack + 200) < getTimer()) {
fbsfx_sound.start();
superPower = superPower - 10;
if (superPower < 0) {
airMagic = false;
}
magicAttack = getTimer();
yspeed = 0;
if (initial == 0) {
initial = 1;
yspeed = yspeed - 35;
} else {
yspeed = yspeed - 10;
}
if (player._xscale == 100) {
randomNumber++;
fireball_mc = _root.attachMovie("fireball", "fireball" + randomNumber, _root.getNextHighestDepth(), {_y:player._y, _x:player._x});
shot.push(fireball_mc);
fireball_mc.onEnterFrame = function () {
this._x = this._x + 15;
this._y = this._y + 15;
};
}
if (player._xscale == -100) {
randomNumber++;
fireball_mc = _root.attachMovie("fireball", "fireball" + randomNumber, _root.getNextHighestDepth(), {_y:player._y, _x:player._x});
fireball_mc._xscale = -100;
shot.push(fireball_mc);
fireball_mc.onEnterFrame = function () {
this._x = this._x - 15;
this._y = this._y + 15;
};
}
}
}
if (magic) {
superPower = superPower - 0.5;
shootTimer++;
if (shootTimer > 20) {
magicTimer++;
}
if (magicTimer == 5) {
magicTimer = 0;
}
if (!zombieMode) {
player.gotoAndStop("gspecial");
}
if (zombieMode) {
player.gotoAndStop("zgspecial");
}
if (superPower < 0) {
magicTimer = 0;
shootTimer = 0;
magic = false;
}
}
if (Key.isDown(87)) {
if (inControl) {
if (playerAlive) {
if (!gotSoap) {
if (!magic) {
if (!jump) {
if (!attacking) {
if (superPower > 99) {
special = true;
}
}
}
}
}
}
}
}
if (!Key.isDown(65)) {
pressHack = 0;
}
if (Key.isDown(65)) {
if (inControl) {
if (playerAlive) {
if (!gotSoap) {
if (!magic) {
if (!special) {
if (pressHack == 0) {
swing_sound.start();
pressHack = 1;
if (canAddComboPoint) {
addFirstCombo = true;
}
clicks++;
}
}
}
}
}
}
}
if (special) {
player.gotoAndStop("transform");
specialTimer++;
if (specialTimer == 65) {
zombieMode = true;
playerPower = 3;
special = false;
specialTimer = 0;
}
}
if (!Key.isDown(83)) {
pressOnceOnly = 0;
}
if (Key.isDown(83)) {
if (inControl) {
if (playerAlive) {
if (!gotSoap) {
if (!magic) {
if (!airMagic) {
if (!special) {
if (onfloor) {
if (pressOnceOnly == 0) {
pressOnceOnly = 1;
if (!attacking) {
if (!zombieMode) {
player.gotoAndStop("jump");
}
if (zombieMode) {
player.gotoAndStop("zjump");
}
}
jump = true;
onfloor = false;
yspeed = yspeed - jumpamount;
_root.attachMovie("shadow_mc", "shadow_mc", _root.getNextHighestDepth(), {_y:player._y, _x:player._x});
}
}
}
}
}
}
}
}
}
shadow_mc._x = player._x;
if (inControl) {
if (playerAlive) {
if (!gotSoap) {
if (!magic) {
if (!special) {
if (!Key.isDown(40)) {
running = false;
}
if (!Key.isDown(38)) {
running = false;
}
if (!Key.isDown(39)) {
running = false;
}
if (!Key.isDown(37)) {
running = false;
}
if (Key.isDown(39)) {
player._xscale = 100;
player._x = player._x + playerSpeed;
running = true;
}
if (Key.isDown(37)) {
player._xscale = -100;
player._x = player._x - playerSpeed;
running = true;
}
if (Key.isDown(38)) {
running = true;
}
if (Key.isDown(40)) {
running = true;
}
}
}
}
}
}
if ((!playerAlive) or (!inControl)) {
clicks = 0;
attacking = false;
is_attacking = 0;
jump = false;
magic = false;
magicTimer = 0;
shootTimer = 0;
airMagic = false;
}
if (gotSoap) {
if (!zombieMode) {
player.gotoAndStop("soap");
}
if (zombieMode) {
player.gotoAndStop("zsoap");
}
gotSoapTimer++;
if (gotSoapTimer == 31) {
gotSoap = false;
gotSoapTimer = 0;
}
}
if (((!playerAlive) && (onfloor)) && (_global.contGame)) {
if (deadTimer == 112) {
_root.attachMovie("tapup", "tapup", _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
playerHealth = playerHealth + 10;
}
deadTimer--;
if (deadTimer < 65) {
player.gotoAndStop("getUp");
}
if (deadTimer == 0) {
beDead = 0;
_global.contGame = false;
tapup.removeMovieClip();
playerAlive = true;
deadTimer = 112;
}
if (Key.isDown(38)) {
if (pressThis == 0) {
pressThis = 1;
playerHealth = playerHealth + 2.5;
}
}
if (!Key.isDown(38)) {
pressThis = 0;
}
}
if (player._y < 70) {
player._y = 70;
}
player._y = player._y + yspeed;
if (player._y > 350) {
shadow_mc.removeMovieClip();
initial = 0;
airMagic = false;
onfloor = true;
jump = false;
yspeed = 0;
player._y = 350;
} else {
yspeed = yspeed + (gravity * 2);
}
if ((playerHealth < 0) && (!attacking)) {
if (beDead == 0) {
beDead = 1;
player.gotoAndStop("dead");
clicks = 0;
attacking = false;
is_attacking = 0;
jump = false;
magic = false;
magicTimer = 0;
shootTimer = 0;
airMagic = false;
}
playerAlive = false;
playerHealth = 0;
carryOn._x = 0;
carryOn._y = 0;
}
if (_global.contGame) {
carryOn._x = 900;
carryOn._y = 900;
}
if (playerHealth > 100) {
playerHealth = 100;
}
if (superPower < 0) {
zombieMode = false;
playerPower = 1;
superPower = 0;
}
if (superPower > 100) {
superPower = 100;
}
if (zombieMode) {
superPower = superPower - 0.3;
}
}
stop();
cinemaLines2.removeMovieClip();
beDead = 0;
hud._alpha = 0;
playerBar._alpha = 0;
manaBar._alpha = 0;
ehit_sound = new Sound();
ehit_sound.attachSound("ehit");
quake_sound = new Sound();
quake_sound.attachSound("quake");
fbsfx_sound = new Sound();
fbsfx_sound.attachSound("fballsfx");
_root.attachMovie("cinemaLines", "cinemaLines", _root.getNextHighestDepth());
_root.attachMovie("comboBox", "comboBox", _root.getNextHighestDepth(), {_x:120, _y:125});
comboBox._x = -100;
if (playerSelected == 0) {
_root.attachMovie("player", "player", _root.getNextHighestDepth(), {_x:-50, _y:350});
}
if (playerSelected == 1) {
_root.attachMovie("playerTwo", "player", _root.getNextHighestDepth(), {_x:-50, _y:350});
}
jump = false;
addSecondCombo = false;
addThirdCombo = false;
addFirstCombo = false;
soapDrop = 0;
pressThis = 0;
deadTimer = 112;
waitAsec = 0;
initial = 0;
playerAlive = true;
comboCounter = 0;
jumpamount = 25;
magicAttack = 0;
magic = false;
magicTimer = 0;
death_stick_timer = 0;
yspeed = 0;
shake = 0;
hereTheyComeTimer = 0;
playerHealth = 100;
hereTheyCome = false;
getThingsGoing = true;
onfloor = true;
displayTimer = 0;
toGo = 0;
playerPower = 1;
gravity = 2;
shootTimer = 0;
bossOnesAttack = 0;
randomNumber = 0;
noBoss = true;
pressOnceOnly = 0;
pressHack = 0;
specialTimer = 0;
clicks = 0;
playerSpeed = 10;
is_attacking = 0;
smack = 0;
gotSoap = false;
gotSoapTimer = 0;
hitPlayer = 0;
hitTimer = 0;
enemySpeed = 70;
yesGo = 0;
moved = 0;
markWave = 2;
steps = 0;
distance = 0;
addBoss = 0;
superPower = 100;
enemyPower = 1;
startGameTimer = 0;
inControl = true;
canGo = false;
zombieMode = false;
special = false;
hit2 = false;
hit3 = false;
running = false;
attacking = false;
var zombieSpots = new Array();
var zombieSpotsFade = new Array();
var erase = new Array();
var alive = new Array();
var groundMarker = new Array();
var hitPose = new Array();
var potionType = new Array();
var potions = new Array();
var boxHealth = new Array();
var boxHit = new Array();
var boxHitTimer = new Array();
var boxes = new Array();
var edropping = new Array();
var eonfloor = new Array();
var ejump = new Array();
var ejumpamount = new Array();
var eyspeed = new Array();
var shot = new Array();
var portTimer = new Array();
var beingSmacked = new Array();
var dead_body = new Array();
var type = new Array();
var hypArray = new Array();
var enemyHealth = new Array();
var damagedTimer = new Array();
var hit = new Array();
var enemyAttackingTimer = new Array();
var enemyAttacking = new Array();
var enemy = new Array();
var blocks = new Array();
var moveAbout = new Array();
var where = new Array();
var onPlatform = new Array();
var pickAttack = new Array();
var port = new Array();
var depths = new Array();
boxes.push(box1, box2);
boxHealth.push(13, 13);
boxHit.push(0, 0);
boxHitTimer.push(0, 0);
depths.push(player);
bg.onEnterFrame = function () {
if (fg._y < 120) {
fg._y = 120;
}
if (bg._y < 10) {
bg._y = 10;
}
if (bg._y > 30) {
bg._y = 30;
}
if (fg._y > 240) {
fg._y = 240;
}
if (((((!special) && (!magic)) && (playerAlive)) && (!gotSoap)) && (inControl)) {
if (Key.isDown(38)) {
if ((fg._y > 120) && (fg._y < 240)) {
sfg._y = sfg._y + 4.5;
sfg2._y = sfg2._y + 4.5;
}
}
if (Key.isDown(40)) {
if ((fg._y > 120) && (fg._y < 240)) {
sfg._y = sfg._y - 4.5;
sfg2._y = sfg2._y - 4.5;
}
}
if (Key.isDown(38)) {
bg._y = bg._y - 0.7;
fg._y = fg._y + 3;
}
if (Key.isDown(40)) {
bg._y = bg._y + 0.7;
fg._y = fg._y - 3;
}
}
};
player.onEnterFrame = function () {
if (comboCounter > 0) {
comboBox._x = 120;
displayTimer--;
}
if (displayTimer < 0) {
comboCounter = 0;
displayTimer = 0;
}
if (displayTimer == 0) {
comboBox._x = comboBox._x - 25;
}
startGameTimer++;
if (startGameTimer < 75) {
walkOn();
}
superPower = superPower + 0.05;
playerBar._xscale = playerHealth;
manaBar._xscale = superPower;
actuallyAddEnemies();
waveActions();
enemyHealthReachesZero();
if (((((!special) && (!magic)) && (playerAlive)) && (!gotSoap)) && (inControl)) {
pushHole();
pushenemy();
}
if (startGameTimer > 60) {
hud._alpha = hud._alpha + 20;
playerBar._alpha = playerBar._alpha + 10;
manaBar._alpha = manaBar._alpha + 10;
}
if (hud._alpha > 100) {
hud._alpha = 100;
}
if (playerBar._alpha > 100) {
playerBar._alpha = 100;
}
if (manaBar._alpha > 100) {
manaBar._alpha = 100;
}
box();
shotActions();
pullUpZombies();
noOverLap();
swapdepths();
playerMovement();
comboOne();
comboTwo();
comboThree();
runAttackTimer();
canAddPoint();
confirmAttacking();
calculateHyp();
enemyMovement();
shaker();
soapActions();
fbhit_mc.swapDepths(_root.getNextHighestDepth());
hitEm.swapDepths(_root.getNextHighestDepth());
blood_mc.swapDepths(_root.getNextHighestDepth());
sfg.swapDepths(_root.getNextHighestDepth());
sfg2.swapDepths(_root.getNextHighestDepth());
carryOn.swapDepths(_root.getNextHighestDepth());
trans.swapDepths(_root.getNextHighestDepth());
cinemaLines.swapDepths(_root.getNextHighestDepth());
hassan.swapDepths(_root.getNextHighestDepth());
};
Instance of Symbol 1451 MovieClip "hassan" in Frame 16
on (release) {
getURL ("http://www.turbonuke.com/?gamereferal=aghzombies", "_blank");
}
Frame 17
player.removeMovieClip();
stopAllSounds();
play();
Frame 18
function removeall() {
carryOn.removeMovieClip();
comboBox.removeMovieClip();
nearground.removeMovieClip();
sfg.removeMovieClip();
sfg2.removeMovieClip();
removeshot();
removeport();
removepickAttack();
removemoveAbout();
removeblocks();
removeDead_body();
removeType();
removeHypArray();
removeEnemyHealth();
removeDamagedTimer();
removeHit();
removeEnemyAttackingTimer();
removeEnemyAttacking();
removeEnemy();
removewhere();
removebeingSmacked();
removeonPlatform();
removeportTimer();
removeeyspeed();
removeejumpamount();
removeejump();
removeeonfloor();
removeedropping();
removepotions();
removeboxes();
removeboxHealth();
removeboxHit();
removeboxHitTimer();
removepotionType();
removeDepths();
removezombieSpots();
removezombieSpotsFade();
removeerase();
removealive();
removegroundMarker();
removehitPose();
}
function removezombieSpots() {
i = zombieSpots.length - 1;
while (i >= 0) {
zombieSpots[i].removeMovieClip();
zombieSpots.splice(i, 1);
i--;
}
}
function removezombieSpotsFade() {
i = zombieSpotsFade.length - 1;
while (i >= 0) {
zombieSpotsFade[i].removeMovieClip();
zombieSpotsFade.splice(i, 1);
i--;
}
}
function removeerase() {
i = erase.length - 1;
while (i >= 0) {
erase[i].removeMovieClip();
erase.splice(i, 1);
i--;
}
}
function removealive() {
i = alive.length - 1;
while (i >= 0) {
alive[i].removeMovieClip();
alive.splice(i, 1);
i--;
}
}
function removegroundMarker() {
i = groundMarker.length - 1;
while (i >= 0) {
groundMarker[i].removeMovieClip();
groundMarker.splice(i, 1);
i--;
}
}
function removehitPose() {
i = hitPose.length - 1;
while (i >= 0) {
hitPose[i].removeMovieClip();
hitPose.splice(i, 1);
i--;
}
}
function removeboxHealth() {
i = boxHealth.length - 1;
while (i >= 0) {
boxHealth[i].removeMovieClip();
boxHealth.splice(i, 1);
i--;
}
}
function removeboxHit() {
i = boxHit.length - 1;
while (i >= 0) {
boxHit[i].removeMovieClip();
boxHit.splice(i, 1);
i--;
}
}
function removeboxHitTimer() {
i = boxHitTimer.length - 1;
while (i >= 0) {
boxHitTimer[i].removeMovieClip();
boxHitTimer.splice(i, 1);
i--;
}
}
function removeboxes() {
i = boxes.length - 1;
while (i >= 0) {
boxes[i].removeMovieClip();
boxes.splice(i, 1);
i--;
}
}
function removepotionType() {
i = potionType.length - 1;
while (i >= 0) {
potionType[i].removeMovieClip();
potionType.splice(i, 1);
i--;
}
}
function removepotions() {
i = potions.length - 1;
while (i >= 0) {
potions[i].removeMovieClip();
potions.splice(i, 1);
i--;
}
}
function removeeyspeed() {
i = eyspeed.length - 1;
while (i >= 0) {
eyspeed[i].removeMovieClip();
eyspeed.splice(i, 1);
i--;
}
}
function removeejumpamount() {
i = ejumpamount.length - 1;
while (i >= 0) {
ejumpamount[i].removeMovieClip();
ejumpamount.splice(i, 1);
i--;
}
}
function removeejump() {
i = ejump.length - 1;
while (i >= 0) {
ejump[i].removeMovieClip();
ejump.splice(i, 1);
i--;
}
}
function removeeonfloor() {
i = eonfloor.length - 1;
while (i >= 0) {
eonfloor[i].removeMovieClip();
eonfloor.splice(i, 1);
i--;
}
}
function removeedropping() {
i = edropping.length - 1;
while (i >= 0) {
edropping[i].removeMovieClip();
edropping.splice(i, 1);
i--;
}
}
function removeportTimer() {
i = portTimer.length - 1;
while (i >= 0) {
portTimer[i].removeMovieClip();
portTimer.splice(i, 1);
i--;
}
}
function removeshot() {
i = shot.length - 1;
while (i >= 0) {
shot[i].removeMovieClip();
shot.splice(i, 1);
i--;
}
}
function removeport() {
i = port.length - 1;
while (i >= 0) {
port[i].removeMovieClip();
port.splice(i, 1);
i--;
}
}
function removepickAttack() {
i = pickAttack.length - 1;
while (i >= 0) {
pickAttack[i].removeMovieClip();
pickAttack.splice(i, 1);
i--;
}
}
function removeblocks() {
i = blocks.length - 1;
while (i >= 0) {
blocks[i].removeMovieClip();
blocks.splice(i, 1);
i--;
}
}
function removebeingSmacked() {
i = beingSmacked.length - 1;
while (i >= 0) {
beingSmacked[i].removeMovieClip();
beingSmacked.splice(i, 1);
i--;
}
}
function removemoveAbout() {
i = moveAbout.length - 1;
while (i >= 0) {
moveAbout[i].removeMovieClip();
moveAbout.splice(i, 1);
i--;
}
}
function removewhere() {
i = where.length - 1;
while (i >= 0) {
where[i].removeMovieClip();
where.splice(i, 1);
i--;
}
}
function removeonPlatform() {
i = onPlatform.length - 1;
while (i >= 0) {
onPlatform[i].removeMovieClip();
onPlatform.splice(i, 1);
i--;
}
}
function removeDead_body() {
i = dead_body.length - 1;
while (i >= 0) {
dead_body[i].removeMovieClip();
dead_body.splice(i, 1);
i--;
}
}
function removeType() {
i = type.length - 1;
while (i >= 0) {
type[i].removeMovieClip();
type.splice(i, 1);
i--;
}
}
function removeHypArray() {
i = hypArray.length - 1;
while (i >= 0) {
hypArray[i].removeMovieClip();
hypArray.splice(i, 1);
i--;
}
}
function removeEnemyHealth() {
i = enemyHealth.length - 1;
while (i >= 0) {
enemyHealth[i].removeMovieClip();
enemyHealth.splice(i, 1);
i--;
}
}
function removeDamagedTimer() {
i = damagedTimer.length - 1;
while (i >= 0) {
damagedTimer[i].removeMovieClip();
damagedTimer.splice(i, 1);
i--;
}
}
function removeHit() {
i = hit.length - 1;
while (i >= 0) {
hit[i].removeMovieClip();
hit.splice(i, 1);
i--;
}
}
function removeEnemyAttackingTimer() {
i = enemyAttackingTimer.length - 1;
while (i >= 0) {
enemyAttackingTimer[i].removeMovieClip();
enemyAttackingTimer.splice(i, 1);
i--;
}
}
function removeEnemyAttacking() {
i = enemyAttacking.length - 1;
while (i >= 0) {
enemyAttacking[i].removeMovieClip();
enemyAttacking.splice(i, 1);
i--;
}
}
function removeEnemy() {
i = enemy.length - 1;
while (i >= 0) {
enemy[i].removeMovieClip();
enemy.splice(i, 1);
i--;
}
}
function removeDepths() {
i = depths.length - 1;
while (i >= 0) {
depths[i].removeMovieClip();
depths.splice(i, 1);
i--;
}
}
function shaker() {
if (shake == 0) {
_root._x = 0;
_root._y = 0;
} else if (shake == 1) {
shake = shake + 1;
_root._x = _root._x + 2;
_root._y = _root._y + 2;
} else if (shake == 2) {
shake = shake + 1;
_root._y = _root._y - 4;
_root._x = _root._x - 4;
} else if (shake == 3) {
shake = shake + 1;
_root._x = _root._x + 1;
_root._y = _root._y + 1;
} else if (shake == 4) {
shake = shake + 1;
_root._x = 0;
_root._y = 0;
} else if (shake == 5) {
shake = shake + 1;
_root._x = 4;
_root._y = 4;
} else if (shake == 6) {
shake = shake + 1;
_root._x = 2;
_root._y = 2;
} else if (shake == 7) {
shake = shake + 1;
_root._x = 0;
_root._y = 0;
} else if (shake == 8) {
shake = shake + 1;
_root._x = _root._x + 2;
_root._y = _root._y + 2;
} else if (shake == 9) {
shake = shake + 1;
_root._y = _root._y - 4;
_root._x = _root._x - 4;
} else if (shake == 10) {
shake = shake + 1;
_root._x = _root._x + 1;
_root._y = _root._y + 1;
} else if (shake == 11) {
shake = shake + 1;
_root._x = 0;
_root._y = 0;
} else if (shake == 12) {
shake = shake + 1;
_root._x = 4;
_root._y = 4;
} else if (shake == 13) {
shake = shake + 1;
_root._x = 2;
_root._y = 2;
} else if (shake == 14) {
shake = shake + 1;
_root._x = _root._x + 1;
_root._y = _root._y + 1;
} else if (shake == 15) {
shake = shake + 1;
_root._x = 0;
_root._y = 0;
} else if (shake == 16) {
shake = shake + 1;
_root._x = _root._x + 2;
_root._y = _root._y + 2;
} else if (shake == 17) {
shake = shake + 1;
_root._y = _root._y - 4;
_root._x = _root._x - 4;
} else if (shake == 18) {
shake = shake + 1;
_root._x = _root._x + 1;
_root._y = _root._y + 1;
} else if (shake == 19) {
shake = shake + 1;
_root._x = 0;
_root._y = 0;
} else if (shake == 20) {
shake = shake + 1;
_root._x = 4;
_root._y = 4;
} else if (shake == 21) {
shake = shake + 1;
_root._x = 2;
_root._y = 2;
} else if (shake == 22) {
shake = shake + 1;
_root._x = 0;
_root._y = 0;
} else if (shake == 23) {
shake = shake + 1;
_root._x = _root._x + 2;
_root._y = _root._y + 2;
} else if (shake == 24) {
shake = shake + 1;
_root._y = _root._y - 4;
_root._x = _root._x - 4;
} else if (shake == 25) {
shake = shake + 1;
_root._x = _root._x + 1;
_root._y = _root._y + 1;
} else if (shake == 26) {
shake = shake + 1;
_root._x = 0;
_root._y = 0;
} else if (shake == 27) {
shake = shake + 1;
_root._x = 4;
_root._y = 4;
} else if (shake == 28) {
shake = shake + 1;
_root._x = 2;
_root._y = 2;
} else if (shake > 29) {
shake = 0;
_root._x = _root._x + 1;
_root._y = _root._y + 1;
}
}
function enterActions() {
if ((!inControl) && (!noBoss)) {
player.gotoAndStop("run");
player._x = player._x + playerSpeed;
if (player._x > 120) {
inControl = true;
}
}
}
function shotActions() {
i = shot.length - 1;
while (i >= 0) {
if (shot[i]._y > 300) {
randomNumber++;
hitGround_mc = _root.attachMovie("hitGround", "hitGround" + randomNumber, _root.getNextHighestDepth(), {_x:shot[i]._x, _y:shot[i]._y});
hitGround_mc._xscale = shot[i]._xscale;
shot[i].removeMovieClip();
shot.splice(i, 1);
}
j = enemy.length - 1;
while (j >= 0) {
if (shot[i].hitTest(enemy[j])) {
if (type[j] == 0) {
ejump[j] = true;
eonfloor[j] = false;
eyspeed[j] = 0;
eyspeed[j] = eyspeed[j] - ejumpamount[j];
}
hitPose[j]++;
if (hitPose[j] > 1) {
hitPose[j] = 0;
}
randomNumber++;
fbhit_mc = _root.attachMovie("fbhit", "fbhit" + randomNumber, _root.getNextHighestDepth(), {_y:shot[i]._y, _x:shot[i]._x});
fbhit_mc._xscale = shot[i]._xscale;
randomNumber++;
blood_mc = _root.attachMovie("hitSpark_mc", "hitSpark_mc" + randomNumber, _root.getNextHighestDepth(), {_y:player._y, _x:player._x});
blood_mc._xscale = player._xscale;
ehit_sound.start();
beingSmacked[j]++;
randomNumber++;
comboCounter++;
displayTimer = 16;
hitEm = _root.attachMovie("oneHit", "oneHit" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[j]._x, _y:enemy[j]._y});
comboBox.cnum.text = comboCounter;
hit[j] = 1;
damagedTimer[j] = 0;
enemyHealth[j] = enemyHealth[j] - (playerPower * 5);
shot[i].removeMovieClip();
shot.splice(i, 1);
}
j--;
}
i--;
}
}
function swapdepths() {
i = depths.length - 1;
while (i >= 0) {
if (!jump) {
depths[i].idiot_depth = Math.floor((depths[i]._y * 480) + depths[i]._x);
depths[i].swapDepths(depths[i].idiot_depth);
}
i--;
}
}
function noOverLap() {
i = enemy.length - 1;
while (i >= 0) {
j = enemy.length - 1;
while (j >= 0) {
if (!(enemy[i] === enemy[j])) {
if (enemy[i].hitTest(enemy[j])) {
if (alive[i] && (type[i] == 0)) {
endX = _root.enemy[j]._x;
enemy[i]._x = enemy[i]._x - ((endX - enemy[i]._x) / enemySpeed);
}
}
}
j--;
}
i--;
}
}
function calculateHyp() {
i = enemy.length - 1;
while (i >= 0) {
dist_x = player._x - enemy[i]._x;
hypArray[i] = Math.sqrt(dist_x * dist_x);
i--;
}
}
function enemyHealthReachesZero() {
i = enemy.length - 1;
while (i >= 0) {
if (enemyHealth[i] < 1) {
alive[i] = false;
if (erase[i] == 0) {
if (type[i] == "mainBoss") {
noBoss = true;
}
}
erase[i]++;
if (erase[i] == 52) {
}
}
i--;
}
}
function enemyMovement() {
death_stick.onEnterFrame = function () {
if (canGo) {
if (fg._x > -1916.9) {
if (player._x > 410) {
this._x = this._x - 5;
}
}
}
if (Key.isDown(38)) {
if ((fg._y > 120) && (fg._y < 240)) {
this._y = this._y + 3;
}
}
if (Key.isDown(40)) {
if ((fg._y > 120) && (fg._y < 240)) {
this._y = this._y - 3;
}
}
death_stick_timer++;
if (death_stick_timer == 50) {
death_stick_timer = 0;
this.removeMovieClip();
}
if ((this.hitTest(player) && (death_stick_timer > 30)) && (player._y < this._y)) {
if (((!zombieMode) && (!special)) && (!gotSoap)) {
hitPlayer = 1;
playerHealth = playerHealth - (enemyPower * 25);
}
}
};
i = enemy.length - 1;
while (i >= 0) {
if (type[i] == "mainBoss") {
bossBar._xscale = enemyHealth[i];
if (!alive[i]) {
enemy[i].gotoAndStop("dead");
}
if (alive[i]) {
if (!playerAlive) {
hit[i] = 0;
damagedTimer[i] = 0;
enemy[i].gotoAndStop("idle");
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 50) + 0;
}
if (playerAlive) {
if (player._x < enemy[i]._x) {
enemy[i]._xscale = 100;
} else {
enemy[i]._xscale = -100;
}
enemyAttackingTimer[i]++;
if (enemyAttackingTimer[i] > 100) {
enemy[i].gotoAndStop("attack");
enemyAttacking[i] = 1;
if (!jump) {
if (enemyAttackingTimer[i] == 110) {
randomNumber++;
death_stick = _root.attachMovie("stick", "stick" + randomNumber, _root.getNextHighestDepth(), {_x:player._x, _y:player._y + 85});
depths.push(death_stick);
}
if (enemyAttackingTimer[i] == 170) {
randomNumber++;
death_stick = _root.attachMovie("stick", "stick" + randomNumber, _root.getNextHighestDepth(), {_x:player._x, _y:player._y + 85});
depths.push(death_stick);
}
}
if (enemyAttackingTimer[i] == 180) {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 50) + 0;
pickAttack[i] = Math.round(Math.random() * 3) + 0;
}
}
if (enemyAttacking[i] == 0) {
if (enemy[i].hitTest(player)) {
if (jump) {
if (((magic && (shootTimer > 20)) && (magicTimer == 0)) or (magicTimer == 5)) {
hitPose[i]++;
if (hitPose[i] > 1) {
hitPose[i] = 0;
}
randomNumber++;
blood_mc = _root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_y:enemy[i]._y, _x:enemy[i]._x});
ehit_sound.start();
beingSmacked[i]++;
randomNumber++;
comboCounter++;
displayTimer = 16;
hitEm = _root.attachMovie("oneHit", "oneHit" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
comboBox.cnum.text = comboCounter;
hit[i] = 1;
damagedTimer[i] = 0;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
if (!jump) {
if (((magic && (shootTimer > 20)) && (magicTimer == 0)) or (magicTimer == 5)) {
hitPose[i]++;
if (hitPose[i] > 1) {
hitPose[i] = 0;
}
comboCounter++;
displayTimer = 16;
randomNumber++;
blood_mc = _root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_y:enemy[i]._y, _x:enemy[i]._x});
ehit_sound.start();
beingSmacked[i]++;
randomNumber++;
hitEm = _root.attachMovie("oneHit", "oneHit" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
comboBox.cnum.text = comboCounter;
hit[i] = 1;
damagedTimer[i] = 0;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
if (enemy[i].hitTest(player)) {
if (jump) {
if (((((((is_attacking == 3) or (is_attacking == 10)) or (is_attacking == 16)) or (is_attacking == 20)) or (is_attacking == 22)) or (is_attacking == 24)) or (is_attacking == 26)) {
if (hypArray[i] < 150) {
hitPose[i]++;
if (hitPose[i] > 1) {
hitPose[i] = 0;
}
randomNumber++;
blood_mc = _root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_y:enemy[i]._y, _x:enemy[i]._x});
ehit_sound.start();
beingSmacked[i]++;
randomNumber++;
comboCounter++;
displayTimer = 16;
hitEm = _root.attachMovie("oneHit", "oneHit" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
comboBox.cnum.text = comboCounter;
hit[i] = 1;
damagedTimer[i] = 0;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
if (!jump) {
if (((is_attacking == 3) or (is_attacking == 12)) or (is_attacking == 22)) {
if (hypArray[i] < 150) {
hitPose[i]++;
if (hitPose[i] > 1) {
hitPose[i] = 0;
}
comboCounter++;
displayTimer = 16;
randomNumber++;
blood_mc = _root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_y:enemy[i]._y, _x:enemy[i]._x});
ehit_sound.start();
beingSmacked[i]++;
randomNumber++;
hitEm = _root.attachMovie("oneHit", "oneHit" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
comboBox.cnum.text = comboCounter;
hit[i] = 1;
damagedTimer[i] = 0;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
}
if (hit[i] == 1) {
if (hitPose[i] == 0) {
enemy[i].gotoAndStop("hit1");
}
if (hitPose[i] == 1) {
enemy[i].gotoAndStop("hit2");
}
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
damagedTimer[i]++;
if (damagedTimer[i] == 15) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if (hit[i] == 0) {
enemy[i].gotoAndStop("idle");
}
}
}
}
}
i--;
}
}
function pushenemy() {
i = enemy.length - 1;
while (i >= 0) {
if (Key.isDown(38)) {
if ((fg._y > 120) && (fg._y < 240)) {
enemy[i]._y = enemy[i]._y + 3;
}
}
if (Key.isDown(40)) {
if ((fg._y > 120) && (fg._y < 240)) {
enemy[i]._y = enemy[i]._y - 3;
}
}
i--;
}
}
function box() {
i = boxes.length - 1;
while (i >= 0) {
if (player.hitTest(boxes[i])) {
if (boxHealth[i] > 0) {
if (!jump) {
if (((is_attacking == 3) or (is_attacking == 12)) or (is_attacking == 22)) {
ehit_sound.start();
boxHit[i] = 1;
boxHealth[i]--;
randomNumber++;
hitEm_box = _root.attachMovie("boxHit", "boxHit" + randomNumber, _root.getNextHighestDepth(), {_x:boxes[i]._x + 50, _y:boxes[i]._y});
}
}
if (jump) {
if (((((((is_attacking == 3) or (is_attacking == 10)) or (is_attacking == 16)) or (is_attacking == 20)) or (is_attacking == 22)) or (is_attacking == 24)) or (is_attacking == 26)) {
ehit_sound.start();
boxHit[i] = 1;
boxHealth[i]--;
randomNumber++;
hitEm_box = _root.attachMovie("boxHit", "boxHit" + randomNumber, _root.getNextHighestDepth(), {_x:boxes[i]._x + 50, _y:boxes[i]._y});
}
}
}
}
if (boxHealth[i] > 10) {
boxes[i].gotoAndStop("fixed");
}
if ((boxHealth[i] > 0) && (boxHealth[i] < 10)) {
boxes[i].gotoAndStop("cracked");
}
if (boxHealth[i] == 1) {
boxHealth[i] = 0;
boxes[i].gotoAndStop("broken");
randomNumber++;
soap_clip = _root.attachMovie("soap_mc", "soap_mc" + randomNumber, _root.getNextHighestDepth(), {_y:boxes[i]._y, _x:boxes[i]._x});
potions.push(soap_clip);
depths.push(soap_clip);
potionType.push(1);
}
if (boxHit[i] == 0) {
var _local2 = boxes[i].transform.colorTransform;
boxes[i].transform.colorTransform = new flash.geom.ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
}
if (boxHit[i] == 1) {
var _local2 = boxes[i].transform.colorTransform;
_local2.rgb = 4294967295;
boxes[i].transform.colorTransform = _local2;
boxHitTimer[i]++;
if (boxHitTimer[i] == 1) {
boxHit[i] = 0;
boxHitTimer[i] = 0;
}
}
if (((((!special) && (!magic)) && (playerAlive)) && (!gotSoap)) && (inControl)) {
if (Key.isDown(38)) {
if ((fg._y > 120) && (fg._y < 240)) {
boxes[i]._y = boxes[i]._y + 3;
}
}
if (Key.isDown(40)) {
if ((fg._y > 120) && (fg._y < 240)) {
boxes[i]._y = boxes[i]._y - 3;
}
}
}
i--;
}
}
function soapActions() {
i = potions.length - 1;
while (i >= 0) {
if (player.hitTest(potions[i]._x, potions[i]._y, true)) {
if (!attacking) {
gotSoap = true;
superPower = superPower + 25;
potions[i].removeMovieClip();
potions.splice(i, 1);
potionType.splice(i, 1);
}
}
if (((((!special) && (!magic)) && (playerAlive)) && (!gotSoap)) && (inControl)) {
if (Key.isDown(38)) {
if ((fg._y > 120) && (fg._y < 240)) {
potions[i]._y = potions[i]._y + 3;
}
}
if (Key.isDown(40)) {
if ((fg._y > 120) && (fg._y < 240)) {
potions[i]._y = potions[i]._y - 3;
}
}
}
i--;
}
}
function canAddPoint() {
if (clicks == 0) {
canAddComboPoint = true;
} else {
canAddComboPoint = false;
}
}
function runAttackTimer() {
if (attacking) {
if (!jump) {
playerSpeed = 1;
}
is_attacking++;
} else {
playerSpeed = 10;
}
}
function confirmAttacking() {
if (clicks > 0) {
attacking = true;
}
}
function comboOne() {
if (!addSecondCombo) {
if (!addThirdCombo) {
if (addFirstCombo) {
if (attacking) {
if (jump) {
if (!zombieMode) {
player.gotoAndStop("aattack2");
}
if (zombieMode) {
player.gotoAndStop("azattack");
}
}
if (!jump) {
if (!zombieMode) {
player.gotoAndStop("attack2");
}
if (zombieMode) {
player.gotoAndStop("zattack");
}
}
if (is_attacking == 7) {
if (jump && (player._y > 180)) {
yspeed = 0;
yspeed = yspeed - 20;
}
addFirstCombo = false;
if (clicks == 1) {
smack = 0;
clicks = 0;
is_attacking = 0;
attacking = false;
}
if (clicks > 1) {
smack = 0;
addSecondCombo = true;
}
}
}
}
}
}
}
function comboTwo() {
if (!addFirstCombo) {
if (!addThirdCombo) {
if (addSecondCombo) {
if (attacking) {
if (jump) {
if (!zombieMode) {
player.gotoAndStop("aattack");
}
if (zombieMode) {
player.gotoAndStop("azattack2");
}
}
if (!jump) {
if (!zombieMode) {
player.gotoAndStop("attack");
}
if (zombieMode) {
player.gotoAndStop("zattack2");
}
}
if (is_attacking == 19) {
if (jump && (player._y > 180)) {
yspeed = 0;
yspeed = yspeed - 20;
}
addSecondCombo = false;
if (clicks == 2) {
smack = 0;
clicks = 0;
is_attacking = 0;
attacking = false;
}
if (clicks > 2) {
smack = 0;
addThirdCombo = true;
}
}
}
}
}
}
}
function comboThree() {
if (!addFirstCombo) {
if (!addSecondCombo) {
if (addThirdCombo) {
if (attacking) {
if (jump) {
if (!zombieMode) {
player.gotoAndStop("aattack3");
}
if (zombieMode) {
player.gotoAndStop("azattack3");
}
}
if (!jump) {
if (!zombieMode) {
player.gotoAndStop("attack3");
}
if (zombieMode) {
player.gotoAndStop("zattack3");
}
}
if (is_attacking == 26) {
if (jump && (player._y > 180)) {
yspeed = 0;
yspeed = yspeed - 20;
}
addThirdCombo = false;
if (clicks == 3) {
smack = 0;
clicks = 0;
is_attacking = 0;
attacking = false;
}
if (clicks > 3) {
smack = 0;
clicks = 1;
is_attacking = 0;
addFirstCombo = true;
}
}
}
}
}
}
}
function playerMovement() {
if (hitPlayer == 0) {
var _local4 = player.transform.colorTransform;
player.transform.colorTransform = new flash.geom.ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
}
if (hitPlayer == 1) {
var _local4 = player.transform.colorTransform;
_local4.rgb = 4294967295;
player.transform.colorTransform = _local4;
hitTimer++;
if (hitTimer == 1) {
hitPlayer = 0;
hitTimer = 0;
}
}
if ((player._x < 46) && (inControl)) {
player._x = 46;
}
if (canGo && (inControl)) {
if (fg._x > -1916.9) {
if (player._x > 410) {
i = enemy.length - 1;
while (i >= 0) {
enemy[i]._x = enemy[i]._x - 5;
i--;
}
j = boxes.length - 1;
while (j >= 0) {
boxes[j]._x = boxes[j]._x - 5;
j--;
}
k = potions.length - 1;
while (k >= 0) {
potions[k]._x = potions[k]._x - 5;
k--;
}
moved++;
sfg._x = sfg._x - 5;
sfg2._x = sfg2._x - 5;
bg._x = bg._x - 5;
fg._x = fg._x - 5;
steps++;
player._x = 410;
}
}
}
if ((player._x > 590) && (inControl)) {
player._x = 590;
}
if (inControl) {
if (playerAlive) {
if (!gotSoap) {
if (!magic) {
if (!jump) {
if (!special) {
if (!attacking) {
if (!running) {
if (!zombieMode) {
player.gotoAndStop("idle");
}
if (zombieMode) {
player.gotoAndStop("zidle");
}
}
if (running) {
if (!zombieMode) {
player.gotoAndStop("run");
}
if (zombieMode) {
player.gotoAndStop("zrun");
}
}
}
}
}
}
}
}
}
if (!Key.isDown(68)) {
magicTimer = 0;
shootTimer = 0;
magic = false;
airMagic = false;
}
if (Key.isDown(68)) {
if (inControl) {
if (playerAlive) {
if (!gotSoap) {
if (!special) {
if (!attacking) {
if (superPower > 10) {
if (!jump) {
magic = true;
}
if (jump) {
airMagic = true;
}
}
}
}
}
}
}
}
if (airMagic) {
if (!zombieMode) {
player.gotoAndStop("aspecial");
}
if (zombieMode) {
player.gotoAndStop("zaspecial");
}
if ((magicAttack + 200) < getTimer()) {
fbsfx_sound.start();
superPower = superPower - 10;
if (superPower < 0) {
airMagic = false;
}
magicAttack = getTimer();
yspeed = 0;
if (initial == 0) {
initial = 1;
yspeed = yspeed - 35;
} else {
yspeed = yspeed - 10;
}
if (player._xscale == 100) {
randomNumber++;
fireball_mc = _root.attachMovie("fireball", "fireball" + randomNumber, _root.getNextHighestDepth(), {_y:player._y, _x:player._x});
shot.push(fireball_mc);
fireball_mc.onEnterFrame = function () {
this._x = this._x + 15;
this._y = this._y + 15;
};
}
if (player._xscale == -100) {
randomNumber++;
fireball_mc = _root.attachMovie("fireball", "fireball" + randomNumber, _root.getNextHighestDepth(), {_y:player._y, _x:player._x});
fireball_mc._xscale = -100;
shot.push(fireball_mc);
fireball_mc.onEnterFrame = function () {
this._x = this._x - 15;
this._y = this._y + 15;
};
}
}
}
if (magic) {
superPower = superPower - 0.5;
shootTimer++;
if (shootTimer > 20) {
magicTimer++;
}
if (magicTimer == 5) {
magicTimer = 0;
}
if (!zombieMode) {
player.gotoAndStop("gspecial");
}
if (zombieMode) {
player.gotoAndStop("zgspecial");
}
if (superPower < 0) {
magicTimer = 0;
shootTimer = 0;
magic = false;
}
}
if (Key.isDown(87)) {
if (inControl) {
if (playerAlive) {
if (!gotSoap) {
if (!magic) {
if (!jump) {
if (!attacking) {
if (superPower > 99) {
special = true;
}
}
}
}
}
}
}
}
if (!Key.isDown(65)) {
pressHack = 0;
}
if (Key.isDown(65)) {
if (inControl) {
if (playerAlive) {
if (!gotSoap) {
if (!magic) {
if (!special) {
if (pressHack == 0) {
swing_sound.start();
pressHack = 1;
if (canAddComboPoint) {
addFirstCombo = true;
}
clicks++;
}
}
}
}
}
}
}
if (special) {
player.gotoAndStop("transform");
specialTimer++;
if (specialTimer == 65) {
zombieMode = true;
playerPower = 1;
special = false;
specialTimer = 0;
}
}
if (!Key.isDown(83)) {
pressOnceOnly = 0;
}
if (Key.isDown(83)) {
if (inControl) {
if (playerAlive) {
if (!gotSoap) {
if (!magic) {
if (!airMagic) {
if (!special) {
if (onfloor) {
if (pressOnceOnly == 0) {
pressOnceOnly = 1;
if (!attacking) {
if (!zombieMode) {
player.gotoAndStop("jump");
}
if (zombieMode) {
player.gotoAndStop("zjump");
}
}
jump = true;
onfloor = false;
yspeed = yspeed - jumpamount;
_root.attachMovie("shadow_mc", "shadow_mc", _root.getNextHighestDepth(), {_y:player._y, _x:player._x});
}
}
}
}
}
}
}
}
}
shadow_mc._x = player._x;
if (inControl) {
if (playerAlive) {
if (!gotSoap) {
if (!magic) {
if (!special) {
if (!Key.isDown(40)) {
running = false;
}
if (!Key.isDown(38)) {
running = false;
}
if (!Key.isDown(39)) {
running = false;
}
if (!Key.isDown(37)) {
running = false;
}
if (Key.isDown(39)) {
player._xscale = 100;
player._x = player._x + playerSpeed;
running = true;
}
if (Key.isDown(37)) {
player._xscale = -100;
player._x = player._x - playerSpeed;
running = true;
}
if (Key.isDown(38)) {
running = true;
}
if (Key.isDown(40)) {
running = true;
}
}
}
}
}
}
if ((!playerAlive) or (!inControl)) {
clicks = 0;
attacking = false;
is_attacking = 0;
jump = false;
magic = false;
magicTimer = 0;
shootTimer = 0;
airMagic = false;
}
if (gotSoap) {
if (!zombieMode) {
player.gotoAndStop("soap");
}
if (zombieMode) {
player.gotoAndStop("zsoap");
}
gotSoapTimer++;
if (gotSoapTimer == 31) {
gotSoap = false;
gotSoapTimer = 0;
}
}
if (((!playerAlive) && (onfloor)) && (_global.contGame)) {
if (deadTimer == 112) {
_root.attachMovie("tapup", "tapup", _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
playerHealth = playerHealth + 10;
}
deadTimer--;
if (deadTimer < 65) {
player.gotoAndStop("getUp");
}
if (deadTimer == 0) {
beDead = 0;
_global.contGame = false;
tapup.removeMovieClip();
playerAlive = true;
deadTimer = 112;
}
if (Key.isDown(38)) {
if (pressThis == 0) {
pressThis = 1;
playerHealth = playerHealth + 2.5;
}
}
if (!Key.isDown(38)) {
pressThis = 0;
}
}
if (player._y < 70) {
player._y = 70;
}
player._y = player._y + yspeed;
if (player._y > 350) {
shadow_mc.removeMovieClip();
initial = 0;
airMagic = false;
onfloor = true;
jump = false;
yspeed = 0;
player._y = 350;
} else {
yspeed = yspeed + (gravity * 2);
}
if ((playerHealth < 0) && (!attacking)) {
if (beDead == 0) {
beDead = 1;
player.gotoAndStop("dead");
}
playerAlive = false;
playerHealth = 0;
carryOn._x = 0;
carryOn._y = 0;
}
if (_global.contGame) {
carryOn._x = 900;
carryOn._y = 900;
}
if (playerHealth > 100) {
playerHealth = 100;
}
if (superPower < 0) {
zombieMode = false;
playerPower = 0.25;
superPower = 0;
}
if (superPower > 100) {
superPower = 100;
}
if (zombieMode) {
superPower = superPower - 0.3;
}
}
stop();
beDead = 0;
ehit_sound = new Sound();
ehit_sound.attachSound("ehit");
quake_sound = new Sound();
quake_sound.attachSound("quake");
fbsfx_sound = new Sound();
fbsfx_sound.attachSound("fballsfx");
_root.attachMovie("comboBox", "comboBox", _root.getNextHighestDepth(), {_x:120, _y:125});
comboBox._x = -100;
if (playerSelected == 0) {
_root.attachMovie("player", "player", _root.getNextHighestDepth(), {_x:-100, _y:350});
}
if (playerSelected == 1) {
_root.attachMovie("playerTwo", "player", _root.getNextHighestDepth(), {_x:-100, _y:350});
}
addSecondCombo = false;
addThirdCombo = false;
addFirstCombo = false;
jump = false;
soapDrop = 0;
pressThis = 0;
deadTimer = 112;
initial = 0;
playerAlive = true;
comboCounter = 0;
jumpamount = 25;
magicAttack = 0;
magic = false;
magicTimer = 0;
death_stick_timer = 0;
yspeed = 0;
shake = 0;
hereTheyComeTimer = 0;
playerHealth = 100;
hereTheyCome = false;
getThingsGoing = true;
onfloor = true;
displayTimer = 0;
toGo = 0;
playerPower = 0.25;
gravity = 2;
shootTimer = 0;
mainBosssAttack = 0;
randomNumber = 0;
pressOnceOnly = 0;
pressHack = 0;
specialTimer = 0;
clicks = 0;
playerSpeed = 10;
is_attacking = 0;
smack = 0;
waitAsec = 0;
gotSoap = false;
gotSoapTimer = 0;
hitPlayer = 0;
hitTimer = 0;
enemySpeed = 70;
yesGo = 0;
moved = 0;
markWave = 2;
steps = 0;
distance = 0;
addBoss = 0;
superPower = 100;
enemyPower = 0.15;
canGo = false;
zombieMode = false;
special = false;
hit2 = false;
hit3 = false;
running = false;
attacking = false;
var zombieSpots = new Array();
var zombieSpotsFade = new Array();
var erase = new Array();
var alive = new Array();
var groundMarker = new Array();
var hitPose = new Array();
var potionType = new Array();
var potions = new Array();
var boxHealth = new Array();
var boxHit = new Array();
var boxHitTimer = new Array();
var boxes = new Array();
var edropping = new Array();
var eonfloor = new Array();
var ejump = new Array();
var ejumpamount = new Array();
var eyspeed = new Array();
var shot = new Array();
var portTimer = new Array();
var beingSmacked = new Array();
var dead_body = new Array();
var type = new Array();
var hypArray = new Array();
var enemyHealth = new Array();
var damagedTimer = new Array();
var hit = new Array();
var enemyAttackingTimer = new Array();
var enemyAttacking = new Array();
var enemy = new Array();
var blocks = new Array();
var moveAbout = new Array();
var where = new Array();
var onPlatform = new Array();
var pickAttack = new Array();
var port = new Array();
var depths = new Array();
boxes.push(box1, box2);
boxHealth.push(13, 13);
boxHit.push(0, 0);
boxHitTimer.push(0, 0);
depths.push(player);
randomNumber++;
depths.push(boss);
enemy.push(boss);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push("mainBoss");
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(100);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
hitPose.push(0);
groundMarker.push(boss._y);
alive.push(true);
erase.push(0);
noBoss = false;
addBoss = 1;
bg.onEnterFrame = function () {
if (fg._y < 120) {
fg._y = 120;
}
if (bg._y < 10) {
bg._y = 10;
}
if (bg._y > 30) {
bg._y = 30;
}
if (fg._y > 240) {
fg._y = 240;
}
if (((((!special) && (!magic)) && (playerAlive)) && (!gotSoap)) && (inControl)) {
if (Key.isDown(38)) {
if ((fg._y > 120) && (fg._y < 240)) {
sfg._y = sfg._y + 4.5;
sfg2._y = sfg2._y + 4.5;
}
}
if (Key.isDown(40)) {
if ((fg._y > 120) && (fg._y < 240)) {
sfg._y = sfg._y - 4.5;
sfg2._y = sfg2._y - 4.5;
}
}
if (Key.isDown(38)) {
bg._y = bg._y - 0.7;
fg._y = fg._y + 3;
}
if (Key.isDown(40)) {
bg._y = bg._y + 0.7;
fg._y = fg._y - 3;
}
}
};
player.onEnterFrame = function () {
if (comboCounter > 0) {
comboBox._x = 120;
displayTimer--;
}
if (displayTimer < 0) {
comboCounter = 0;
displayTimer = 0;
}
if (displayTimer == 0) {
comboBox._x = comboBox._x - 25;
}
superPower = superPower + 0.05;
playerBar._xscale = playerHealth;
manaBar._xscale = superPower;
enterActions();
enemyHealthReachesZero();
if (((((!special) && (!magic)) && (playerAlive)) && (!gotSoap)) && (inControl)) {
pushenemy();
}
if (noBoss) {
inControl = false;
if (waitAsec < 60) {
if (!zombieMode) {
player.gotoAndStop("idle");
}
if (zombieMode) {
player.gotoAndStop("zidle");
}
}
waitAsec++;
if (waitAsec > 59) {
player._xscale = 100;
if (!zombieMode) {
player.gotoAndStop("run");
}
if (zombieMode) {
player.gotoAndStop("zrun");
}
player._x = player._x + playerSpeed;
if (player._x > 710) {
if (toGo == 0) {
_root.attachMovie("trans", "trans", _root.getNextHighestDepth());
}
toGo++;
if (toGo == 27) {
removeall();
stopAllSounds();
nextFrame();
}
}
}
}
box();
shotActions();
noOverLap();
playerMovement();
comboOne();
comboTwo();
comboThree();
runAttackTimer();
canAddPoint();
confirmAttacking();
calculateHyp();
enemyMovement();
shaker();
soapActions();
fbhit_mc.swapDepths(_root.getNextHighestDepth());
hitEm.swapDepths(_root.getNextHighestDepth());
blood_mc.swapDepths(_root.getNextHighestDepth());
sfg.swapDepths(_root.getNextHighestDepth());
sfg2.swapDepths(_root.getNextHighestDepth());
carryOn.swapDepths(_root.getNextHighestDepth());
trans.swapDepths(_root.getNextHighestDepth());
};
Instance of Symbol 1333 MovieClip in Frame 18
on (release) {
getURL ("http://www.turbonuke.com/?gamereferal=aghzombies", "_blank");
}
Frame 19
player.removeMovieClip();
stopAllSounds();
play();
Frame 20
stop();
_global.weapon = "one";
one.onRelease = function () {
_global.weapon = "one";
nextFrame();
};
two.onRelease = function () {
_global.weapon = "two";
nextFrame();
};
three.onRelease = function () {
_global.weapon = "three";
nextFrame();
};
four.onRelease = function () {
_global.weapon = "four";
nextFrame();
};
five.onRelease = function () {
_global.weapon = "five";
playerPower = 7;
nextFrame();
};
six.onRelease = function () {
_global.weapon = "six";
playerPower = 7;
nextFrame();
};
seven.onRelease = function () {
_global.weapon = "seven";
playerPower = 7;
nextFrame();
};
eight.onRelease = function () {
_global.weapon = "eight";
playerPower = 7;
nextFrame();
};
nine.onRelease = function () {
_global.weapon = "nine";
playerPower = 9;
nextFrame();
};
ten.onRelease = function () {
_global.weapon = "ten";
playerPower = 9;
nextFrame();
};
eleven.onRelease = function () {
_global.weapon = "eleven";
playerPower = 9;
nextFrame();
};
twelve.onRelease = function () {
_global.weapon = "twelve";
playerPower = 9;
nextFrame();
};
thirteen.onRelease = function () {
_global.weapon = "thirteen";
playerPower = 13;
nextFrame();
};
fourteen.onRelease = function () {
_global.weapon = "fourteen";
playerPower = 13;
nextFrame();
};
fifteen.onRelease = function () {
_global.weapon = "fifteen";
playerPower = 13;
nextFrame();
};
sixteen.onRelease = function () {
_global.weapon = "sixteen";
playerPower = 13;
nextFrame();
};
seventeen.onRelease = function () {
_global.weapon = "seventeen";
playerPower = 25;
nextFrame();
};
eighteen.onRelease = function () {
_global.weapon = "eighteen";
playerPower = 25;
nextFrame();
};
nineteen.onRelease = function () {
_global.weapon = "nineteen";
playerPower = 25;
nextFrame();
};
twenty.onRelease = function () {
_global.weapon = "twenty";
playerPower = 25;
nextFrame();
};
Instance of Symbol 1227 MovieClip "nineteen" in Frame 20
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1230 MovieClip "ten" in Frame 20
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1233 MovieClip "fifteen" in Frame 20
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1236 MovieClip "three" in Frame 20
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1239 MovieClip "twenty" in Frame 20
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1242 MovieClip "fourteen" in Frame 20
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1245 MovieClip "two" in Frame 20
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1248 MovieClip "six" in Frame 20
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1251 MovieClip "four" in Frame 20
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1254 MovieClip "eight" in Frame 20
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1257 MovieClip "seventeen" in Frame 20
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1260 MovieClip "nine" in Frame 20
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1263 MovieClip "seven" in Frame 20
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1266 MovieClip "eleven" in Frame 20
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1269 MovieClip "twelve" in Frame 20
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1272 MovieClip "eighteen" in Frame 20
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1275 MovieClip "thirteen" in Frame 20
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1278 MovieClip "one" in Frame 20
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1281 MovieClip "five" in Frame 20
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 1284 MovieClip "sixteen" in Frame 20
on (rollOver) {
this.gotoAndStop("down");
}
on (rollOut) {
this.gotoAndStop("up");
}
Frame 21
function walkOn() {
inControl = false;
if (player._x < 120) {
player.gotoAndStop("run");
player._x = player._x + playerSpeed;
} else {
inControl = true;
}
}
function removeall() {
hassan.removeMovieClip();
carryOn.removeMovieClip();
comboBox.removeMovieClip();
nearground.removeMovieClip();
sfg.removeMovieClip();
sfg2.removeMovieClip();
removeshot();
removeport();
removepickAttack();
removemoveAbout();
removeblocks();
removeDead_body();
removeType();
removeHypArray();
removeEnemyHealth();
removeDamagedTimer();
removeHit();
removeEnemyAttackingTimer();
removeEnemyAttacking();
removeEnemy();
removewhere();
removebeingSmacked();
removeonPlatform();
removeportTimer();
removeeyspeed();
removeejumpamount();
removeejump();
removeeonfloor();
removeedropping();
removepotions();
removeboxes();
removeboxHealth();
removeboxHit();
removeboxHitTimer();
removepotionType();
removeDepths();
removezombieSpots();
removezombieSpotsFade();
removeerase();
removealive();
removegroundMarker();
removehitPose();
}
function removezombieSpots() {
i = zombieSpots.length - 1;
while (i >= 0) {
zombieSpots[i].removeMovieClip();
zombieSpots.splice(i, 1);
i--;
}
}
function removezombieSpotsFade() {
i = zombieSpotsFade.length - 1;
while (i >= 0) {
zombieSpotsFade[i].removeMovieClip();
zombieSpotsFade.splice(i, 1);
i--;
}
}
function removeerase() {
i = erase.length - 1;
while (i >= 0) {
erase[i].removeMovieClip();
erase.splice(i, 1);
i--;
}
}
function removealive() {
i = alive.length - 1;
while (i >= 0) {
alive[i].removeMovieClip();
alive.splice(i, 1);
i--;
}
}
function removegroundMarker() {
i = groundMarker.length - 1;
while (i >= 0) {
groundMarker[i].removeMovieClip();
groundMarker.splice(i, 1);
i--;
}
}
function removehitPose() {
i = hitPose.length - 1;
while (i >= 0) {
hitPose[i].removeMovieClip();
hitPose.splice(i, 1);
i--;
}
}
function removeboxHealth() {
i = boxHealth.length - 1;
while (i >= 0) {
boxHealth[i].removeMovieClip();
boxHealth.splice(i, 1);
i--;
}
}
function removeboxHit() {
i = boxHit.length - 1;
while (i >= 0) {
boxHit[i].removeMovieClip();
boxHit.splice(i, 1);
i--;
}
}
function removeboxHitTimer() {
i = boxHitTimer.length - 1;
while (i >= 0) {
boxHitTimer[i].removeMovieClip();
boxHitTimer.splice(i, 1);
i--;
}
}
function removeboxes() {
i = boxes.length - 1;
while (i >= 0) {
boxes[i].removeMovieClip();
boxes.splice(i, 1);
i--;
}
}
function removepotionType() {
i = potionType.length - 1;
while (i >= 0) {
potionType[i].removeMovieClip();
potionType.splice(i, 1);
i--;
}
}
function removepotions() {
i = potions.length - 1;
while (i >= 0) {
potions[i].removeMovieClip();
potions.splice(i, 1);
i--;
}
}
function removeeyspeed() {
i = eyspeed.length - 1;
while (i >= 0) {
eyspeed[i].removeMovieClip();
eyspeed.splice(i, 1);
i--;
}
}
function removeejumpamount() {
i = ejumpamount.length - 1;
while (i >= 0) {
ejumpamount[i].removeMovieClip();
ejumpamount.splice(i, 1);
i--;
}
}
function removeejump() {
i = ejump.length - 1;
while (i >= 0) {
ejump[i].removeMovieClip();
ejump.splice(i, 1);
i--;
}
}
function removeeonfloor() {
i = eonfloor.length - 1;
while (i >= 0) {
eonfloor[i].removeMovieClip();
eonfloor.splice(i, 1);
i--;
}
}
function removeedropping() {
i = edropping.length - 1;
while (i >= 0) {
edropping[i].removeMovieClip();
edropping.splice(i, 1);
i--;
}
}
function removeportTimer() {
i = portTimer.length - 1;
while (i >= 0) {
portTimer[i].removeMovieClip();
portTimer.splice(i, 1);
i--;
}
}
function removeshot() {
i = shot.length - 1;
while (i >= 0) {
shot[i].removeMovieClip();
shot.splice(i, 1);
i--;
}
}
function removeport() {
i = port.length - 1;
while (i >= 0) {
port[i].removeMovieClip();
port.splice(i, 1);
i--;
}
}
function removepickAttack() {
i = pickAttack.length - 1;
while (i >= 0) {
pickAttack[i].removeMovieClip();
pickAttack.splice(i, 1);
i--;
}
}
function removeblocks() {
i = blocks.length - 1;
while (i >= 0) {
blocks[i].removeMovieClip();
blocks.splice(i, 1);
i--;
}
}
function removebeingSmacked() {
i = beingSmacked.length - 1;
while (i >= 0) {
beingSmacked[i].removeMovieClip();
beingSmacked.splice(i, 1);
i--;
}
}
function removemoveAbout() {
i = moveAbout.length - 1;
while (i >= 0) {
moveAbout[i].removeMovieClip();
moveAbout.splice(i, 1);
i--;
}
}
function removewhere() {
i = where.length - 1;
while (i >= 0) {
where[i].removeMovieClip();
where.splice(i, 1);
i--;
}
}
function removeonPlatform() {
i = onPlatform.length - 1;
while (i >= 0) {
onPlatform[i].removeMovieClip();
onPlatform.splice(i, 1);
i--;
}
}
function removeDead_body() {
i = dead_body.length - 1;
while (i >= 0) {
dead_body[i].removeMovieClip();
dead_body.splice(i, 1);
i--;
}
}
function removeType() {
i = type.length - 1;
while (i >= 0) {
type[i].removeMovieClip();
type.splice(i, 1);
i--;
}
}
function removeHypArray() {
i = hypArray.length - 1;
while (i >= 0) {
hypArray[i].removeMovieClip();
hypArray.splice(i, 1);
i--;
}
}
function removeEnemyHealth() {
i = enemyHealth.length - 1;
while (i >= 0) {
enemyHealth[i].removeMovieClip();
enemyHealth.splice(i, 1);
i--;
}
}
function removeDamagedTimer() {
i = damagedTimer.length - 1;
while (i >= 0) {
damagedTimer[i].removeMovieClip();
damagedTimer.splice(i, 1);
i--;
}
}
function removeHit() {
i = hit.length - 1;
while (i >= 0) {
hit[i].removeMovieClip();
hit.splice(i, 1);
i--;
}
}
function removeEnemyAttackingTimer() {
i = enemyAttackingTimer.length - 1;
while (i >= 0) {
enemyAttackingTimer[i].removeMovieClip();
enemyAttackingTimer.splice(i, 1);
i--;
}
}
function removeEnemyAttacking() {
i = enemyAttacking.length - 1;
while (i >= 0) {
enemyAttacking[i].removeMovieClip();
enemyAttacking.splice(i, 1);
i--;
}
}
function removeEnemy() {
i = enemy.length - 1;
while (i >= 0) {
enemy[i].removeMovieClip();
enemy.splice(i, 1);
i--;
}
}
function removeDepths() {
i = depths.length - 1;
while (i >= 0) {
depths[i].removeMovieClip();
depths.splice(i, 1);
i--;
}
}
function shaker() {
if (shake == 0) {
_root._x = 0;
_root._y = 0;
} else if (shake == 1) {
shake = shake + 1;
_root._x = _root._x + 2;
_root._y = _root._y + 2;
} else if (shake == 2) {
shake = shake + 1;
_root._y = _root._y - 4;
_root._x = _root._x - 4;
} else if (shake == 3) {
shake = shake + 1;
_root._x = _root._x + 1;
_root._y = _root._y + 1;
} else if (shake == 4) {
shake = shake + 1;
_root._x = 0;
_root._y = 0;
} else if (shake == 5) {
shake = shake + 1;
_root._x = 4;
_root._y = 4;
} else if (shake == 6) {
shake = shake + 1;
_root._x = 2;
_root._y = 2;
} else if (shake == 7) {
shake = shake + 1;
_root._x = 0;
_root._y = 0;
} else if (shake == 8) {
shake = shake + 1;
_root._x = _root._x + 2;
_root._y = _root._y + 2;
} else if (shake == 9) {
shake = shake + 1;
_root._y = _root._y - 4;
_root._x = _root._x - 4;
} else if (shake == 10) {
shake = shake + 1;
_root._x = _root._x + 1;
_root._y = _root._y + 1;
} else if (shake == 11) {
shake = shake + 1;
_root._x = 0;
_root._y = 0;
} else if (shake == 12) {
shake = shake + 1;
_root._x = 4;
_root._y = 4;
} else if (shake == 13) {
shake = shake + 1;
_root._x = 2;
_root._y = 2;
} else if (shake == 14) {
shake = shake + 1;
_root._x = _root._x + 1;
_root._y = _root._y + 1;
} else if (shake == 15) {
shake = shake + 1;
_root._x = 0;
_root._y = 0;
} else if (shake == 16) {
shake = shake + 1;
_root._x = _root._x + 2;
_root._y = _root._y + 2;
} else if (shake == 17) {
shake = shake + 1;
_root._y = _root._y - 4;
_root._x = _root._x - 4;
} else if (shake == 18) {
shake = shake + 1;
_root._x = _root._x + 1;
_root._y = _root._y + 1;
} else if (shake == 19) {
shake = shake + 1;
_root._x = 0;
_root._y = 0;
} else if (shake == 20) {
shake = shake + 1;
_root._x = 4;
_root._y = 4;
} else if (shake == 21) {
shake = shake + 1;
_root._x = 2;
_root._y = 2;
} else if (shake == 22) {
shake = shake + 1;
_root._x = 0;
_root._y = 0;
} else if (shake == 23) {
shake = shake + 1;
_root._x = _root._x + 2;
_root._y = _root._y + 2;
} else if (shake == 24) {
shake = shake + 1;
_root._y = _root._y - 4;
_root._x = _root._x - 4;
} else if (shake == 25) {
shake = shake + 1;
_root._x = _root._x + 1;
_root._y = _root._y + 1;
} else if (shake == 26) {
shake = shake + 1;
_root._x = 0;
_root._y = 0;
} else if (shake == 27) {
shake = shake + 1;
_root._x = 4;
_root._y = 4;
} else if (shake == 28) {
shake = shake + 1;
_root._x = 2;
_root._y = 2;
} else if (shake > 29) {
shake = 0;
_root._x = _root._x + 1;
_root._y = _root._y + 1;
}
}
function waveActions() {
if (((distance == 6) && (markWave < 0)) && (!canGo)) {
inControl = false;
if (waitAsec < 60) {
if (!zombieMode) {
player.gotoAndStop("idle");
}
if (zombieMode) {
player.gotoAndStop("zidle");
}
}
waitAsec++;
if (waitAsec > 59) {
player._xscale = 100;
if (!zombieMode) {
player.gotoAndStop("run");
}
if (zombieMode) {
player.gotoAndStop("zrun");
}
player._x = player._x + playerSpeed;
if (player._x > 710) {
if (toGo == 0) {
_root.attachMovie("trans", "trans", _root.getNextHighestDepth());
}
toGo++;
if (toGo == 27) {
removeall();
stopAllSounds();
nextFrame();
}
}
}
}
if (getThingsGoing) {
if (startGameTimer > 80) {
addenemies();
getThingsGoing = false;
}
}
if (distance == 3) {
if (addBoss == 0) {
randomNumber++;
enemy_ = _root.attachMovie("firstboss", "firstboss" + randomNumber, _root.getNextHighestDepth(), {_y:fg._y + 200, _x:1120});
depths.push(enemy_);
enemy.push(enemy_);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push("bossOne");
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(75);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
hitPose.push(0);
groundMarker.push(enemy_._y);
alive.push(true);
erase.push(0);
noBoss = false;
addBoss = 1;
}
}
if (noBoss) {
if (distance < 6) {
if (markWave < 0) {
if (player._x < 410) {
if (yesGo == 0) {
distance++;
_root.attachMovie("gogo", "gogo", _root.getNextHighestDepth());
}
yesGo = 1;
canGo = true;
}
}
}
}
if (steps > 130) {
addenemies();
gogo.removeMovieClip();
yesGo = 0;
markWave = 2;
canGo = false;
steps = 0;
}
}
function shotActions() {
i = shot.length - 1;
while (i >= 0) {
if (shot[i]._y > 300) {
randomNumber++;
hitGround_mc = _root.attachMovie("hitGround", "hitGround" + randomNumber, _root.getNextHighestDepth(), {_x:shot[i]._x, _y:shot[i]._y});
hitGround_mc._xscale = shot[i]._xscale;
shot[i].removeMovieClip();
shot.splice(i, 1);
}
j = enemy.length - 1;
while (j >= 0) {
if (shot[i].hitTest(enemy[j])) {
if (type[j] == 0) {
ejump[j] = true;
eonfloor[j] = false;
eyspeed[j] = 0;
eyspeed[j] = eyspeed[j] - ejumpamount[j];
}
hitPose[j]++;
if (hitPose[j] > 1) {
hitPose[j] = 0;
}
randomNumber++;
fbhit_mc = _root.attachMovie("fbhit", "fbhit" + randomNumber, _root.getNextHighestDepth(), {_y:shot[i]._y, _x:shot[i]._x});
fbhit_mc._xscale = shot[i]._xscale;
randomNumber++;
blood_mc = _root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_y:enemy[j]._y, _x:enemy[j]._x});
ehit_sound.start();
beingSmacked[j]++;
randomNumber++;
comboCounter++;
displayTimer = 16;
hitEm = _root.attachMovie("oneHit", "oneHit" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[j]._x, _y:enemy[j]._y});
comboBox.cnum.text = comboCounter;
hit[j] = 1;
damagedTimer[j] = 0;
enemyHealth[j] = enemyHealth[j] - (playerPower * 5);
shot[i].removeMovieClip();
shot.splice(i, 1);
}
j--;
}
i--;
}
}
function swapdepths() {
i = depths.length - 1;
while (i >= 0) {
if (!jump) {
depths[i].idiot_depth = Math.floor((depths[i]._y * 480) + depths[i]._x);
depths[i].swapDepths(depths[i].idiot_depth);
}
i--;
}
}
function noOverLap() {
i = enemy.length - 1;
while (i >= 0) {
j = enemy.length - 1;
while (j >= 0) {
if (!(enemy[i] === enemy[j])) {
if (enemy[i].hitTest(enemy[j])) {
if (alive[i] && (type[i] == 0)) {
endX = _root.enemy[j]._x;
enemy[i]._x = enemy[i]._x - ((endX - enemy[i]._x) / enemySpeed);
}
}
}
j--;
}
i--;
}
}
function calculateHyp() {
i = enemy.length - 1;
while (i >= 0) {
dist_x = player._x - enemy[i]._x;
hypArray[i] = Math.sqrt(dist_x * dist_x);
i--;
}
}
function enemyHealthReachesZero() {
i = enemy.length - 1;
while (i >= 0) {
if (enemyHealth[i] < 1) {
alive[i] = false;
if (erase[i] == 0) {
if (type[i] == 0) {
markWave--;
}
if (type[i] == "bossOne") {
noBoss = true;
}
}
erase[i]++;
if (erase[i] == 52) {
soapDrop = Math.round(Math.random() * 4) + 0;
if (soapDrop == 0) {
if (eonfloor[i]) {
if (enemy[i]._xscale == 100) {
randomNumber++;
soap_clip = _root.attachMovie("soap_mc", "soap_mc" + randomNumber, _root.getNextHighestDepth(), {_y:enemy[i]._y + 15, _x:enemy[i]._x + 50});
potions.push(soap_clip);
depths.push(soap_clip);
potionType.push(1);
}
if (enemy[i]._xscale == -100) {
randomNumber++;
soap_clip = _root.attachMovie("soap_mc", "soap_mc" + randomNumber, _root.getNextHighestDepth(), {_y:enemy[i]._y + 15, _x:enemy[i]._x - 50});
potions.push(soap_clip);
depths.push(soap_clip);
potionType.push(1);
}
}
}
enemy[i].removeMovieClip();
enemy.splice(i, 1);
portTimer.splice(i, 1);
hit.splice(i, 1);
type.splice(i, 1);
damagedTimer.splice(i, 1);
enemyHealth.splice(i, 1);
enemyAttacking.splice(i, 1);
enemyAttackingTimer.splice(i, 1);
hypArray.splice(i, 1);
moveAbout.splice(i, 1);
where.splice(i, 1);
onPlatform.splice(i, 1);
beingSmacked.splice(i, 1);
pickAttack.splice(i, 1);
port.splice(i, 1);
edropping.splice(i, 1);
eonfloor.splice(i, 1);
ejump.splice(i, 1);
ejumpamount.splice(i, 1);
eyspeed.splice(i, 1);
alive.splice(i, 1);
erase.splice(i, 1);
groundMarker.splice(i, 1);
hitPose.splice(i, 1);
}
}
i--;
}
}
function enemyMovement() {
death_stick.onEnterFrame = function () {
if (canGo) {
if (fg._x > -1916.9) {
if (player._x > 410) {
this._x = this._x - 5;
}
}
}
if (Key.isDown(38)) {
if ((fg._y > 120) && (fg._y < 240)) {
this._y = this._y + 3;
}
}
if (Key.isDown(40)) {
if ((fg._y > 120) && (fg._y < 240)) {
this._y = this._y - 3;
}
}
death_stick_timer++;
if (death_stick_timer == 50) {
death_stick_timer = 0;
this.removeMovieClip();
}
if ((this.hitTest(player) && (death_stick_timer > 30)) && (player._y < this._y)) {
if (((!zombieMode) && (!special)) && (!gotSoap)) {
hitPlayer = 1;
playerHealth = playerHealth - (enemyPower * 1.5);
}
}
};
i = enemy.length - 1;
while (i >= 0) {
if (type[i] == "bossOne") {
if (!alive[i]) {
enemy[i].gotoAndStop("dead");
}
if (alive[i]) {
if (!playerAlive) {
hit[i] = 0;
damagedTimer[i] = 0;
enemy[i].gotoAndStop("idle");
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 50) + 0;
}
if (playerAlive) {
if (player._x < enemy[i]._x) {
enemy[i]._xscale = 100;
} else {
enemy[i]._xscale = -100;
}
enemyAttackingTimer[i]++;
if (enemyAttackingTimer[i] > 100) {
enemy[i].gotoAndStop("attack");
enemyAttacking[i] = 1;
if (!jump) {
if (enemyAttackingTimer[i] == 110) {
randomNumber++;
death_stick = _root.attachMovie("stick", "stick" + randomNumber, _root.getNextHighestDepth(), {_x:player._x, _y:player._y + 85});
depths.push(death_stick);
}
if (enemyAttackingTimer[i] == 170) {
randomNumber++;
death_stick = _root.attachMovie("stick", "stick" + randomNumber, _root.getNextHighestDepth(), {_x:player._x, _y:player._y + 85});
depths.push(death_stick);
}
}
if (enemyAttackingTimer[i] == 180) {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 50) + 0;
pickAttack[i] = Math.round(Math.random() * 3) + 0;
}
}
if (enemyAttacking[i] == 0) {
if (enemy[i].hitTest(player)) {
if (jump) {
if (((magic && (shootTimer > 20)) && (magicTimer == 0)) or (magicTimer == 5)) {
hitPose[i]++;
if (hitPose[i] > 1) {
hitPose[i] = 0;
}
randomNumber++;
blood_mc = _root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_y:enemy[i]._y, _x:enemy[i]._x});
ehit_sound.start();
beingSmacked[i]++;
randomNumber++;
comboCounter++;
displayTimer = 16;
hitEm = _root.attachMovie("oneHit", "oneHit" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
comboBox.cnum.text = comboCounter;
hit[i] = 1;
damagedTimer[i] = 0;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
if (!jump) {
if (((magic && (shootTimer > 20)) && (magicTimer == 0)) or (magicTimer == 5)) {
hitPose[i]++;
if (hitPose[i] > 1) {
hitPose[i] = 0;
}
comboCounter++;
displayTimer = 16;
randomNumber++;
blood_mc = _root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_y:enemy[i]._y, _x:enemy[i]._x});
ehit_sound.start();
beingSmacked[i]++;
randomNumber++;
hitEm = _root.attachMovie("oneHit", "oneHit" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
comboBox.cnum.text = comboCounter;
hit[i] = 1;
damagedTimer[i] = 0;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
if (enemy[i].hitTest(player)) {
if (jump) {
if (((((((is_attacking == 3) or (is_attacking == 10)) or (is_attacking == 16)) or (is_attacking == 20)) or (is_attacking == 22)) or (is_attacking == 24)) or (is_attacking == 26)) {
if (hypArray[i] < 150) {
hitPose[i]++;
if (hitPose[i] > 1) {
hitPose[i] = 0;
}
randomNumber++;
blood_mc = _root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_y:enemy[i]._y, _x:enemy[i]._x});
ehit_sound.start();
beingSmacked[i]++;
randomNumber++;
comboCounter++;
displayTimer = 16;
hitEm = _root.attachMovie("oneHit", "oneHit" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
comboBox.cnum.text = comboCounter;
hit[i] = 1;
damagedTimer[i] = 0;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
if (!jump) {
if (((is_attacking == 3) or (is_attacking == 12)) or (is_attacking == 22)) {
if (hypArray[i] < 150) {
hitPose[i]++;
if (hitPose[i] > 1) {
hitPose[i] = 0;
}
comboCounter++;
displayTimer = 16;
randomNumber++;
blood_mc = _root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_y:enemy[i]._y, _x:enemy[i]._x});
ehit_sound.start();
beingSmacked[i]++;
randomNumber++;
hitEm = _root.attachMovie("oneHit", "oneHit" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
comboBox.cnum.text = comboCounter;
hit[i] = 1;
damagedTimer[i] = 0;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
}
if (hit[i] == 1) {
if (hitPose[i] == 0) {
enemy[i].gotoAndStop("hit1");
}
if (hitPose[i] == 1) {
enemy[i].gotoAndStop("hit2");
}
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
damagedTimer[i]++;
if (damagedTimer[i] == 15) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if (hit[i] == 0) {
enemy[i].gotoAndStop("idle");
}
}
}
}
}
if (type[i] == 0) {
if (!alive[i]) {
enemy[i].gotoAndStop("dead");
}
if (ejump[i]) {
enemy[i]._y = enemy[i]._y + eyspeed[i];
if (enemy[i]._y > groundMarker[i]) {
edropping[i] = false;
eonfloor[i] = true;
ejump[i] = false;
eyspeed[i] = 0;
enemy[i]._y = groundMarker[i];
} else {
if (enemy[i]._xscale == 100) {
enemy[i]._x = enemy[i]._x + 2;
} else {
enemy[i]._x = enemy[i]._x - 2;
}
eyspeed[i] = eyspeed[i] + (gravity * 2);
}
}
if (alive[i]) {
if (!playerAlive) {
hit[i] = 0;
damagedTimer[i] = 0;
enemy[i].gotoAndStop("idle");
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 50) + 0;
}
if (playerAlive) {
if (player.hitTest(enemy[i])) {
if (ejump[i]) {
if (((((((is_attacking == 3) or (is_attacking == 10)) or (is_attacking == 16)) or (is_attacking == 20)) or (is_attacking == 22)) or (is_attacking == 24)) or (is_attacking == 26)) {
ejump[i] = true;
eonfloor[i] = false;
eyspeed[i] = 0;
eyspeed[i] = eyspeed[i] - ejumpamount[i];
}
}
if (eonfloor[i] && (enemyAttackingTimer[i] < 100)) {
if (is_attacking == 22) {
groundMarker[i] = enemy[i]._y;
ejump[i] = true;
eonfloor[i] = false;
eyspeed[i] = eyspeed[i] - ejumpamount[i];
}
}
}
if (player._x < enemy[i]._x) {
enemy[i]._xscale = 100;
} else {
enemy[i]._xscale = -100;
}
if ((hypArray[i] < 200) && (eonfloor[i])) {
if (enemyAttacking[i] == 1) {
if (enemy[i].hitTest(player)) {
invisible = false;
player._alpha = 100;
if (((!zombieMode) && (!special)) && (!gotSoap)) {
hitPlayer = 1;
playerHealth = playerHealth - (enemyPower * 1.5);
}
}
}
enemyAttackingTimer[i]++;
} else {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
if (enemyAttackingTimer[i] > 100) {
enemy[i].gotoAndStop("attack");
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] == 110) {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
pickAttack[i] = Math.round(Math.random() * 3) + 0;
}
}
if (enemyAttacking[i] == 0) {
if (enemy[i].hitTest(player)) {
if (jump) {
if (((magic && (shootTimer > 20)) && (magicTimer == 0)) or (magicTimer == 5)) {
hitPose[i]++;
if (hitPose[i] > 1) {
hitPose[i] = 0;
}
randomNumber++;
blood_mc = _root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_y:enemy[i]._y, _x:enemy[i]._x});
ehit_sound.start();
beingSmacked[i]++;
randomNumber++;
comboCounter++;
displayTimer = 16;
hitEm = _root.attachMovie("oneHit", "oneHit" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
comboBox.cnum.text = comboCounter;
hit[i] = 1;
damagedTimer[i] = 0;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
if (!jump) {
if (((magic && (shootTimer > 20)) && (magicTimer == 0)) or (magicTimer == 5)) {
hitPose[i]++;
if (hitPose[i] > 1) {
hitPose[i] = 0;
}
comboCounter++;
displayTimer = 16;
randomNumber++;
blood_mc = _root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_y:enemy[i]._y, _x:enemy[i]._x});
ehit_sound.start();
beingSmacked[i]++;
randomNumber++;
hitEm = _root.attachMovie("oneHit", "oneHit" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
comboBox.cnum.text = comboCounter;
hit[i] = 1;
damagedTimer[i] = 0;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
if (enemy[i].hitTest(player)) {
if (jump) {
if (((((((is_attacking == 3) or (is_attacking == 10)) or (is_attacking == 16)) or (is_attacking == 20)) or (is_attacking == 22)) or (is_attacking == 24)) or (is_attacking == 26)) {
if (hypArray[i] < 150) {
hitPose[i]++;
if (hitPose[i] > 1) {
hitPose[i] = 0;
}
randomNumber++;
blood_mc = _root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_y:enemy[i]._y, _x:enemy[i]._x});
ehit_sound.start();
beingSmacked[i]++;
comboCounter++;
displayTimer = 16;
randomNumber++;
hitEm = _root.attachMovie("oneHit", "oneHit" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
comboBox.cnum.text = comboCounter;
hit[i] = 1;
damagedTimer[i] = 0;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
if (!jump) {
if (((is_attacking == 3) or (is_attacking == 12)) or (is_attacking == 22)) {
if (hypArray[i] < 150) {
hitPose[i]++;
if (hitPose[i] > 1) {
hitPose[i] = 0;
}
randomNumber++;
blood_mc = _root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_y:enemy[i]._y, _x:enemy[i]._x});
ehit_sound.start();
beingSmacked[i]++;
comboCounter++;
displayTimer = 16;
randomNumber++;
hitEm = _root.attachMovie("oneHit", "oneHit" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
comboBox.cnum.text = comboCounter;
hit[i] = 1;
damagedTimer[i] = 0;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
}
if (hit[i] == 1) {
if (!magic) {
if (ejump[i]) {
if (hitPose[i] == 0) {
enemy[i].gotoAndStop("ahit1");
}
if (hitPose[i] == 1) {
enemy[i].gotoAndStop("ahit2");
}
}
if (!ejump[i]) {
if (hitPose[i] == 0) {
enemy[i].gotoAndStop("hit1");
}
if (hitPose[i] == 1) {
enemy[i].gotoAndStop("hit2");
}
}
}
if (magic && (shootTimer > 20)) {
enemy[i].gotoAndStop("shock");
}
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
damagedTimer[i]++;
if (damagedTimer[i] == 15) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if ((hit[i] == 0) && (eonfloor[i])) {
portTimer[i]++;
if (portTimer[i] > 32) {
where[i] = Math.round(Math.random() * 2) + 0;
moveAbout[i] = Math.round(Math.random() * 1) + 0;
portTimer[i] = 0;
}
if ((where[i] == 0) or (where[i] == 1)) {
if ((!ejump[i]) && (!edropping[i])) {
enemy[i].gotoAndStop("run");
}
if (moveAbout[i] == 0) {
endX = _root.player._x;
endY = _root.player._y;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) + 75) / enemySpeed);
if (!jump) {
enemy[i]._y = enemy[i]._y + ((endY - enemy[i]._y) / enemySpeed);
}
}
if (moveAbout[i] == 1) {
endX = _root.player._x;
endY = _root.player._y;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) - 75) / enemySpeed);
if (!jump) {
enemy[i]._y = enemy[i]._y + ((endY - enemy[i]._y) / enemySpeed);
}
}
} else {
enemy[i].gotoAndStop("idle");
}
}
}
}
}
}
i--;
}
}
function pushenemy() {
i = enemy.length - 1;
while (i >= 0) {
if (Key.isDown(38)) {
if ((fg._y > 120) && (fg._y < 240)) {
enemy[i]._y = enemy[i]._y + 3;
}
}
if (Key.isDown(40)) {
if ((fg._y > 120) && (fg._y < 240)) {
enemy[i]._y = enemy[i]._y - 3;
}
}
i--;
}
}
function pushHole() {
i = zombieSpots.length - 1;
while (i >= 0) {
if (Key.isDown(38)) {
if ((fg._y > 120) && (fg._y < 240)) {
zombieSpots[i]._y = zombieSpots[i]._y + 3;
}
}
if (Key.isDown(40)) {
if ((fg._y > 120) && (fg._y < 240)) {
zombieSpots[i]._y = zombieSpots[i]._y - 3;
}
}
i--;
}
}
function box() {
i = boxes.length - 1;
while (i >= 0) {
if (player.hitTest(boxes[i])) {
if (boxHealth[i] > 0) {
if (!jump) {
if (((is_attacking == 3) or (is_attacking == 12)) or (is_attacking == 22)) {
ehit_sound.start();
boxHit[i] = 1;
boxHealth[i]--;
randomNumber++;
hitEm_box = _root.attachMovie("boxHit", "boxHit" + randomNumber, _root.getNextHighestDepth(), {_x:boxes[i]._x + 50, _y:boxes[i]._y});
}
}
if (jump) {
if (((((((is_attacking == 3) or (is_attacking == 10)) or (is_attacking == 16)) or (is_attacking == 20)) or (is_attacking == 22)) or (is_attacking == 24)) or (is_attacking == 26)) {
ehit_sound.start();
boxHit[i] = 1;
boxHealth[i]--;
randomNumber++;
hitEm_box = _root.attachMovie("boxHit", "boxHit" + randomNumber, _root.getNextHighestDepth(), {_x:boxes[i]._x + 50, _y:boxes[i]._y});
}
}
}
}
if (boxHealth[i] > 10) {
boxes[i].gotoAndStop("fixed");
}
if ((boxHealth[i] > 0) && (boxHealth[i] < 10)) {
boxes[i].gotoAndStop("cracked");
}
if (boxHealth[i] == 1) {
boxHealth[i] = 0;
boxes[i].gotoAndStop("broken");
randomNumber++;
soap_clip = _root.attachMovie("soap_mc", "soap_mc" + randomNumber, _root.getNextHighestDepth(), {_y:boxes[i]._y, _x:boxes[i]._x});
potions.push(soap_clip);
depths.push(soap_clip);
potionType.push(1);
}
if (boxHit[i] == 0) {
var _local2 = boxes[i].transform.colorTransform;
boxes[i].transform.colorTransform = new flash.geom.ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
}
if (boxHit[i] == 1) {
var _local2 = boxes[i].transform.colorTransform;
_local2.rgb = 4294967295;
boxes[i].transform.colorTransform = _local2;
boxHitTimer[i]++;
if (boxHitTimer[i] == 1) {
boxHit[i] = 0;
boxHitTimer[i] = 0;
}
}
if (((((!special) && (!magic)) && (playerAlive)) && (!gotSoap)) && (inControl)) {
if (Key.isDown(38)) {
if ((fg._y > 120) && (fg._y < 240)) {
boxes[i]._y = boxes[i]._y + 3;
}
}
if (Key.isDown(40)) {
if ((fg._y > 120) && (fg._y < 240)) {
boxes[i]._y = boxes[i]._y - 3;
}
}
}
i--;
}
}
function soapActions() {
i = potions.length - 1;
while (i >= 0) {
if (player.hitTest(potions[i]._x, potions[i]._y, true)) {
if ((!attacking) && (inControl)) {
gotSoap = true;
superPower = superPower + 25;
potions[i].removeMovieClip();
potions.splice(i, 1);
potionType.splice(i, 1);
}
}
if (((((!special) && (!magic)) && (playerAlive)) && (!gotSoap)) && (inControl)) {
if (Key.isDown(38)) {
if ((fg._y > 120) && (fg._y < 240)) {
potions[i]._y = potions[i]._y + 3;
}
}
if (Key.isDown(40)) {
if ((fg._y > 120) && (fg._y < 240)) {
potions[i]._y = potions[i]._y - 3;
}
}
}
i--;
}
}
function pullUpZombies() {
i = zombieSpots.length - 1;
while (i >= 0) {
zombieSpotsFade[i]++;
if (zombieSpotsFade[i] == 70) {
randomNumber++;
enemy_ = _root.attachMovie("zombieOne", "zombie" + randomNumber, _root.getNextHighestDepth(), {_y:zombieSpots[i]._y, _x:zombieSpots[i]._x});
depths.push(enemy_);
enemy.push(enemy_);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(0);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(25);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
hitPose.push(0);
groundMarker.push(enemy_._y);
alive.push(true);
erase.push(0);
zombieSpots[i].removeMovieClip();
zombieSpots.splice(i, 1);
zombieSpotsFade.splice(i, 1);
}
i--;
}
}
function addenemies() {
hereTheyCome = true;
}
function actuallyAddEnemies() {
if (hereTheyCome) {
hereTheyComeTimer++;
}
if (hereTheyComeTimer == 10) {
shake++;
quake_sound.start();
randomNumber++;
hole = _root.attachMovie("zombiehole", "zombiehole" + randomNumber, _root.getNextHighestDepth(), {_y:Math.round(Math.random() * 70) + 330, _x:Math.round(Math.random() * 550) + 0});
zombieSpots.push(hole);
zombieSpotsFade.push(0);
depths.push(hole);
}
if (hereTheyComeTimer == 60) {
shake++;
quake_sound.start();
randomNumber++;
hole = _root.attachMovie("zombiehole", "zombiehole" + randomNumber, _root.getNextHighestDepth(), {_y:Math.round(Math.random() * 70) + 330, _x:Math.round(Math.random() * 550) + 0});
zombieSpots.push(hole);
zombieSpotsFade.push(0);
depths.push(hole);
}
if (hereTheyComeTimer == 120) {
shake++;
quake_sound.start();
randomNumber++;
hole = _root.attachMovie("zombiehole", "zombiehole" + randomNumber, _root.getNextHighestDepth(), {_y:Math.round(Math.random() * 70) + 330, _x:Math.round(Math.random() * 550) + 0});
zombieSpots.push(hole);
zombieSpotsFade.push(0);
depths.push(hole);
hereTheyComeTimer = 0;
hereTheyCome = false;
}
}
function canAddPoint() {
if (clicks == 0) {
canAddComboPoint = true;
} else {
canAddComboPoint = false;
}
}
function runAttackTimer() {
if (attacking) {
if (!jump) {
playerSpeed = 1;
}
is_attacking++;
} else {
playerSpeed = 10;
}
}
function confirmAttacking() {
if (clicks > 0) {
attacking = true;
}
}
function comboOne() {
if (!addSecondCombo) {
if (!addThirdCombo) {
if (addFirstCombo) {
if (attacking) {
if (jump) {
if (!zombieMode) {
player.gotoAndStop("aattack2");
}
if (zombieMode) {
player.gotoAndStop("azattack");
}
}
if (!jump) {
if (!zombieMode) {
player.gotoAndStop("attack2");
}
if (zombieMode) {
player.gotoAndStop("zattack");
}
}
if (is_attacking == 7) {
if (jump && (player._y > 180)) {
yspeed = 0;
yspeed = yspeed - 20;
}
addFirstCombo = false;
if (clicks == 1) {
smack = 0;
clicks = 0;
is_attacking = 0;
attacking = false;
}
if (clicks > 1) {
smack = 0;
addSecondCombo = true;
}
}
}
}
}
}
}
function comboTwo() {
if (!addFirstCombo) {
if (!addThirdCombo) {
if (addSecondCombo) {
if (attacking) {
if (jump) {
if (!zombieMode) {
player.gotoAndStop("aattack");
}
if (zombieMode) {
player.gotoAndStop("azattack2");
}
}
if (!jump) {
if (!zombieMode) {
player.gotoAndStop("attack");
}
if (zombieMode) {
player.gotoAndStop("zattack2");
}
}
if (is_attacking == 19) {
if (jump && (player._y > 180)) {
yspeed = 0;
yspeed = yspeed - 20;
}
addSecondCombo = false;
if (clicks == 2) {
smack = 0;
clicks = 0;
is_attacking = 0;
attacking = false;
}
if (clicks > 2) {
smack = 0;
addThirdCombo = true;
}
}
}
}
}
}
}
function comboThree() {
if (!addFirstCombo) {
if (!addSecondCombo) {
if (addThirdCombo) {
if (attacking) {
if (jump) {
if (!zombieMode) {
player.gotoAndStop("aattack3");
}
if (zombieMode) {
player.gotoAndStop("azattack3");
}
}
if (!jump) {
if (!zombieMode) {
player.gotoAndStop("attack3");
}
if (zombieMode) {
player.gotoAndStop("zattack3");
}
}
if (is_attacking == 26) {
if (jump && (player._y > 180)) {
yspeed = 0;
yspeed = yspeed - 20;
}
addThirdCombo = false;
if (clicks == 3) {
smack = 0;
clicks = 0;
is_attacking = 0;
attacking = false;
}
if (clicks > 3) {
smack = 0;
clicks = 1;
is_attacking = 0;
addFirstCombo = true;
}
}
}
}
}
}
}
function playerMovement() {
if (hitPlayer == 0) {
var _local4 = player.transform.colorTransform;
player.transform.colorTransform = new flash.geom.ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
}
if (hitPlayer == 1) {
var _local4 = player.transform.colorTransform;
_local4.rgb = 4294967295;
player.transform.colorTransform = _local4;
hitTimer++;
if (hitTimer == 1) {
hitPlayer = 0;
hitTimer = 0;
}
}
if ((player._x < 46) && (inControl)) {
player._x = 46;
}
if (canGo && (inControl)) {
if (fg._x > -1916.9) {
if (player._x > 410) {
i = enemy.length - 1;
while (i >= 0) {
enemy[i]._x = enemy[i]._x - 5;
i--;
}
j = boxes.length - 1;
while (j >= 0) {
boxes[j]._x = boxes[j]._x - 5;
j--;
}
k = potions.length - 1;
while (k >= 0) {
potions[k]._x = potions[k]._x - 5;
k--;
}
moved++;
sfg._x = sfg._x - 5;
sfg2._x = sfg2._x - 5;
bg._x = bg._x - 5;
fg._x = fg._x - 5;
steps++;
player._x = 410;
}
}
}
if ((player._x > 590) && (inControl)) {
player._x = 590;
}
if (inControl) {
if (playerAlive) {
if (!gotSoap) {
if (!magic) {
if (!jump) {
if (!special) {
if (!attacking) {
if (!running) {
if (!zombieMode) {
player.gotoAndStop("idle");
}
if (zombieMode) {
player.gotoAndStop("zidle");
}
}
if (running) {
if (!zombieMode) {
player.gotoAndStop("run");
}
if (zombieMode) {
player.gotoAndStop("zrun");
}
}
}
}
}
}
}
}
}
if (!Key.isDown(68)) {
magicTimer = 0;
shootTimer = 0;
magic = false;
airMagic = false;
}
if (Key.isDown(68)) {
if (inControl) {
if (playerAlive) {
if (!gotSoap) {
if (!special) {
if (!attacking) {
if (superPower > 10) {
if (!jump) {
magic = true;
}
if (jump) {
airMagic = true;
}
}
}
}
}
}
}
}
if (airMagic) {
if (!zombieMode) {
player.gotoAndStop("aspecial");
}
if (zombieMode) {
player.gotoAndStop("zaspecial");
}
if ((magicAttack + 200) < getTimer()) {
fbsfx_sound.start();
superPower = superPower - 10;
if (superPower < 0) {
airMagic = false;
}
magicAttack = getTimer();
yspeed = 0;
if (initial == 0) {
initial = 1;
yspeed = yspeed - 35;
} else {
yspeed = yspeed - 10;
}
if (player._xscale == 100) {
randomNumber++;
fireball_mc = _root.attachMovie("fireball", "fireball" + randomNumber, _root.getNextHighestDepth(), {_y:player._y, _x:player._x});
shot.push(fireball_mc);
fireball_mc.onEnterFrame = function () {
this._x = this._x + 15;
this._y = this._y + 15;
};
}
if (player._xscale == -100) {
randomNumber++;
fireball_mc = _root.attachMovie("fireball", "fireball" + randomNumber, _root.getNextHighestDepth(), {_y:player._y, _x:player._x});
fireball_mc._xscale = -100;
shot.push(fireball_mc);
fireball_mc.onEnterFrame = function () {
this._x = this._x - 15;
this._y = this._y + 15;
};
}
}
}
if (magic) {
superPower = superPower - 0.5;
shootTimer++;
if (shootTimer > 20) {
magicTimer++;
}
if (magicTimer == 5) {
magicTimer = 0;
}
if (!zombieMode) {
player.gotoAndStop("gspecial");
}
if (zombieMode) {
player.gotoAndStop("zgspecial");
}
if (superPower < 0) {
magicTimer = 0;
shootTimer = 0;
magic = false;
}
}
if (Key.isDown(87)) {
if (inControl) {
if (playerAlive) {
if (!gotSoap) {
if (!magic) {
if (!jump) {
if (!attacking) {
if (superPower > 99) {
special = true;
}
}
}
}
}
}
}
}
if (!Key.isDown(65)) {
pressHack = 0;
}
if (Key.isDown(65)) {
if (inControl) {
if (playerAlive) {
if (!gotSoap) {
if (!magic) {
if (!special) {
if (pressHack == 0) {
swing_sound.start();
pressHack = 1;
if (canAddComboPoint) {
addFirstCombo = true;
}
clicks++;
}
}
}
}
}
}
}
if (special) {
player.gotoAndStop("transform");
specialTimer++;
if (specialTimer == 65) {
zombieMode = true;
playerPower = 3;
special = false;
specialTimer = 0;
}
}
if (!Key.isDown(83)) {
pressOnceOnly = 0;
}
if (Key.isDown(83)) {
if (inControl) {
if (playerAlive) {
if (!gotSoap) {
if (!magic) {
if (!airMagic) {
if (!special) {
if (onfloor) {
if (pressOnceOnly == 0) {
pressOnceOnly = 1;
if (!attacking) {
if (!zombieMode) {
player.gotoAndStop("jump");
}
if (zombieMode) {
player.gotoAndStop("zjump");
}
}
jump = true;
onfloor = false;
yspeed = yspeed - jumpamount;
_root.attachMovie("shadow_mc", "shadow_mc", _root.getNextHighestDepth(), {_y:player._y, _x:player._x});
}
}
}
}
}
}
}
}
}
shadow_mc._x = player._x;
if (inControl) {
if (playerAlive) {
if (!gotSoap) {
if (!magic) {
if (!special) {
if (!Key.isDown(40)) {
running = false;
}
if (!Key.isDown(38)) {
running = false;
}
if (!Key.isDown(39)) {
running = false;
}
if (!Key.isDown(37)) {
running = false;
}
if (Key.isDown(39)) {
player._xscale = 100;
player._x = player._x + playerSpeed;
running = true;
}
if (Key.isDown(37)) {
player._xscale = -100;
player._x = player._x - playerSpeed;
running = true;
}
if (Key.isDown(38)) {
running = true;
}
if (Key.isDown(40)) {
running = true;
}
}
}
}
}
}
if ((!playerAlive) or (!inControl)) {
clicks = 0;
attacking = false;
is_attacking = 0;
jump = false;
magic = false;
magicTimer = 0;
shootTimer = 0;
airMagic = false;
}
if (gotSoap) {
if (!zombieMode) {
player.gotoAndStop("soap");
}
if (zombieMode) {
player.gotoAndStop("zsoap");
}
gotSoapTimer++;
if (gotSoapTimer == 31) {
gotSoap = false;
gotSoapTimer = 0;
}
}
if (((!playerAlive) && (onfloor)) && (_global.contGame)) {
if (deadTimer == 112) {
_root.attachMovie("tapup", "tapup", _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
playerHealth = playerHealth + 10;
}
deadTimer--;
if (deadTimer < 65) {
player.gotoAndStop("getUp");
}
if (deadTimer == 0) {
beDead = 0;
_global.contGame = false;
tapup.removeMovieClip();
playerAlive = true;
deadTimer = 112;
}
if (Key.isDown(38)) {
if (pressThis == 0) {
pressThis = 1;
playerHealth = playerHealth + 2.5;
}
}
if (!Key.isDown(38)) {
pressThis = 0;
}
}
if (player._y < 70) {
player._y = 70;
}
player._y = player._y + yspeed;
if (player._y > 350) {
shadow_mc.removeMovieClip();
initial = 0;
airMagic = false;
onfloor = true;
jump = false;
yspeed = 0;
player._y = 350;
} else {
yspeed = yspeed + (gravity * 2);
}
if ((playerHealth < 0) && (!attacking)) {
if (beDead == 0) {
beDead = 1;
player.gotoAndStop("dead");
clicks = 0;
attacking = false;
is_attacking = 0;
jump = false;
magic = false;
magicTimer = 0;
shootTimer = 0;
airMagic = false;
}
playerAlive = false;
playerHealth = 0;
carryOn._x = 0;
carryOn._y = 0;
}
if (_global.contGame) {
carryOn._x = 900;
carryOn._y = 900;
}
if (playerHealth > 100) {
playerHealth = 100;
}
if (superPower < 0) {
zombieMode = false;
playerPower = 1;
superPower = 0;
}
if (superPower > 100) {
superPower = 100;
}
if (zombieMode) {
superPower = superPower - 0.3;
}
}
stop();
beDead = 0;
hud._alpha = 0;
playerBar._alpha = 0;
manaBar._alpha = 0;
ehit_sound = new Sound();
ehit_sound.attachSound("ehit");
quake_sound = new Sound();
quake_sound.attachSound("quake");
fbsfx_sound = new Sound();
fbsfx_sound.attachSound("fballsfx");
_root.attachMovie("cinemaLines", "cinemaLines", _root.getNextHighestDepth());
_root.attachMovie("comboBox", "comboBox", _root.getNextHighestDepth(), {_x:120, _y:125});
comboBox._x = -100;
if (playerSelected == 0) {
_root.attachMovie("player", "player", _root.getNextHighestDepth(), {_x:-50, _y:350});
}
if (playerSelected == 1) {
_root.attachMovie("playerTwo", "player", _root.getNextHighestDepth(), {_x:-50, _y:350});
}
jump = false;
addSecondCombo = false;
addThirdCombo = false;
addFirstCombo = false;
soapDrop = 0;
pressThis = 0;
deadTimer = 112;
waitAsec = 0;
initial = 0;
playerAlive = true;
comboCounter = 0;
jumpamount = 25;
magicAttack = 0;
magic = false;
magicTimer = 0;
death_stick_timer = 0;
yspeed = 0;
shake = 0;
hereTheyComeTimer = 0;
playerHealth = 100;
hereTheyCome = false;
getThingsGoing = true;
onfloor = true;
displayTimer = 0;
toGo = 0;
playerPower = 1;
gravity = 2;
shootTimer = 0;
bossOnesAttack = 0;
randomNumber = 0;
noBoss = true;
pressOnceOnly = 0;
pressHack = 0;
specialTimer = 0;
clicks = 0;
playerSpeed = 10;
is_attacking = 0;
smack = 0;
gotSoap = false;
gotSoapTimer = 0;
hitPlayer = 0;
hitTimer = 0;
enemySpeed = 70;
yesGo = 0;
moved = 0;
markWave = 2;
steps = 0;
distance = 0;
addBoss = 0;
superPower = 100;
enemyPower = 1.5;
startGameTimer = 0;
inControl = true;
canGo = false;
zombieMode = false;
special = false;
hit2 = false;
hit3 = false;
running = false;
attacking = false;
var zombieSpots = new Array();
var zombieSpotsFade = new Array();
var erase = new Array();
var alive = new Array();
var groundMarker = new Array();
var hitPose = new Array();
var potionType = new Array();
var potions = new Array();
var boxHealth = new Array();
var boxHit = new Array();
var boxHitTimer = new Array();
var boxes = new Array();
var edropping = new Array();
var eonfloor = new Array();
var ejump = new Array();
var ejumpamount = new Array();
var eyspeed = new Array();
var shot = new Array();
var portTimer = new Array();
var beingSmacked = new Array();
var dead_body = new Array();
var type = new Array();
var hypArray = new Array();
var enemyHealth = new Array();
var damagedTimer = new Array();
var hit = new Array();
var enemyAttackingTimer = new Array();
var enemyAttacking = new Array();
var enemy = new Array();
var blocks = new Array();
var moveAbout = new Array();
var where = new Array();
var onPlatform = new Array();
var pickAttack = new Array();
var port = new Array();
var depths = new Array();
boxes.push(box1, box2);
boxHealth.push(13, 13);
boxHit.push(0, 0);
boxHitTimer.push(0, 0);
depths.push(player);
bg.onEnterFrame = function () {
if (fg._y < 120) {
fg._y = 120;
}
if (bg._y < 10) {
bg._y = 10;
}
if (bg._y > 30) {
bg._y = 30;
}
if (fg._y > 240) {
fg._y = 240;
}
if (((((!special) && (!magic)) && (playerAlive)) && (!gotSoap)) && (inControl)) {
if (Key.isDown(38)) {
if ((fg._y > 120) && (fg._y < 240)) {
sfg._y = sfg._y + 4.5;
sfg2._y = sfg2._y + 4.5;
}
}
if (Key.isDown(40)) {
if ((fg._y > 120) && (fg._y < 240)) {
sfg._y = sfg._y - 4.5;
sfg2._y = sfg2._y - 4.5;
}
}
if (Key.isDown(38)) {
bg._y = bg._y - 0.7;
fg._y = fg._y + 3;
}
if (Key.isDown(40)) {
bg._y = bg._y + 0.7;
fg._y = fg._y - 3;
}
}
};
player.onEnterFrame = function () {
if (comboCounter > 0) {
comboBox._x = 120;
displayTimer--;
}
if (displayTimer < 0) {
comboCounter = 0;
displayTimer = 0;
}
if (displayTimer == 0) {
comboBox._x = comboBox._x - 25;
}
startGameTimer++;
if (startGameTimer < 75) {
walkOn();
}
superPower = superPower + 0.05;
playerBar._xscale = playerHealth;
manaBar._xscale = superPower;
actuallyAddEnemies();
waveActions();
enemyHealthReachesZero();
if (((((!special) && (!magic)) && (playerAlive)) && (!gotSoap)) && (inControl)) {
pushHole();
pushenemy();
}
if (startGameTimer > 60) {
hud._alpha = hud._alpha + 20;
playerBar._alpha = playerBar._alpha + 10;
manaBar._alpha = manaBar._alpha + 10;
}
if (hud._alpha > 100) {
hud._alpha = 100;
}
if (playerBar._alpha > 100) {
playerBar._alpha = 100;
}
if (manaBar._alpha > 100) {
manaBar._alpha = 100;
}
box();
shotActions();
pullUpZombies();
noOverLap();
swapdepths();
playerMovement();
comboOne();
comboTwo();
comboThree();
runAttackTimer();
canAddPoint();
confirmAttacking();
calculateHyp();
enemyMovement();
shaker();
soapActions();
fbhit_mc.swapDepths(_root.getNextHighestDepth());
hitEm.swapDepths(_root.getNextHighestDepth());
blood_mc.swapDepths(_root.getNextHighestDepth());
sfg.swapDepths(_root.getNextHighestDepth());
sfg2.swapDepths(_root.getNextHighestDepth());
carryOn.swapDepths(_root.getNextHighestDepth());
trans.swapDepths(_root.getNextHighestDepth());
cinemaLines.swapDepths(_root.getNextHighestDepth());
hassan.swapDepths(_root.getNextHighestDepth());
};
Instance of Symbol 1464 MovieClip "hassan" in Frame 21
on (release) {
getURL ("http://www.turbonuke.com/?gamereferal=aghzombies", "_blank");
}
Frame 22
player.removeMovieClip();
stopAllSounds();
play();
Frame 23
function removeall() {
carryOn.removeMovieClip();
comboBox.removeMovieClip();
nearground.removeMovieClip();
sfg.removeMovieClip();
sfg2.removeMovieClip();
removeshot();
removeport();
removepickAttack();
removemoveAbout();
removeblocks();
removeDead_body();
removeType();
removeHypArray();
removeEnemyHealth();
removeDamagedTimer();
removeHit();
removeEnemyAttackingTimer();
removeEnemyAttacking();
removeEnemy();
removewhere();
removebeingSmacked();
removeonPlatform();
removeportTimer();
removeeyspeed();
removeejumpamount();
removeejump();
removeeonfloor();
removeedropping();
removepotions();
removeboxes();
removeboxHealth();
removeboxHit();
removeboxHitTimer();
removepotionType();
removeDepths();
removezombieSpots();
removezombieSpotsFade();
removeerase();
removealive();
removegroundMarker();
removehitPose();
}
function removezombieSpots() {
i = zombieSpots.length - 1;
while (i >= 0) {
zombieSpots[i].removeMovieClip();
zombieSpots.splice(i, 1);
i--;
}
}
function removezombieSpotsFade() {
i = zombieSpotsFade.length - 1;
while (i >= 0) {
zombieSpotsFade[i].removeMovieClip();
zombieSpotsFade.splice(i, 1);
i--;
}
}
function removeerase() {
i = erase.length - 1;
while (i >= 0) {
erase[i].removeMovieClip();
erase.splice(i, 1);
i--;
}
}
function removealive() {
i = alive.length - 1;
while (i >= 0) {
alive[i].removeMovieClip();
alive.splice(i, 1);
i--;
}
}
function removegroundMarker() {
i = groundMarker.length - 1;
while (i >= 0) {
groundMarker[i].removeMovieClip();
groundMarker.splice(i, 1);
i--;
}
}
function removehitPose() {
i = hitPose.length - 1;
while (i >= 0) {
hitPose[i].removeMovieClip();
hitPose.splice(i, 1);
i--;
}
}
function removeboxHealth() {
i = boxHealth.length - 1;
while (i >= 0) {
boxHealth[i].removeMovieClip();
boxHealth.splice(i, 1);
i--;
}
}
function removeboxHit() {
i = boxHit.length - 1;
while (i >= 0) {
boxHit[i].removeMovieClip();
boxHit.splice(i, 1);
i--;
}
}
function removeboxHitTimer() {
i = boxHitTimer.length - 1;
while (i >= 0) {
boxHitTimer[i].removeMovieClip();
boxHitTimer.splice(i, 1);
i--;
}
}
function removeboxes() {
i = boxes.length - 1;
while (i >= 0) {
boxes[i].removeMovieClip();
boxes.splice(i, 1);
i--;
}
}
function removepotionType() {
i = potionType.length - 1;
while (i >= 0) {
potionType[i].removeMovieClip();
potionType.splice(i, 1);
i--;
}
}
function removepotions() {
i = potions.length - 1;
while (i >= 0) {
potions[i].removeMovieClip();
potions.splice(i, 1);
i--;
}
}
function removeeyspeed() {
i = eyspeed.length - 1;
while (i >= 0) {
eyspeed[i].removeMovieClip();
eyspeed.splice(i, 1);
i--;
}
}
function removeejumpamount() {
i = ejumpamount.length - 1;
while (i >= 0) {
ejumpamount[i].removeMovieClip();
ejumpamount.splice(i, 1);
i--;
}
}
function removeejump() {
i = ejump.length - 1;
while (i >= 0) {
ejump[i].removeMovieClip();
ejump.splice(i, 1);
i--;
}
}
function removeeonfloor() {
i = eonfloor.length - 1;
while (i >= 0) {
eonfloor[i].removeMovieClip();
eonfloor.splice(i, 1);
i--;
}
}
function removeedropping() {
i = edropping.length - 1;
while (i >= 0) {
edropping[i].removeMovieClip();
edropping.splice(i, 1);
i--;
}
}
function removeportTimer() {
i = portTimer.length - 1;
while (i >= 0) {
portTimer[i].removeMovieClip();
portTimer.splice(i, 1);
i--;
}
}
function removeshot() {
i = shot.length - 1;
while (i >= 0) {
shot[i].removeMovieClip();
shot.splice(i, 1);
i--;
}
}
function removeport() {
i = port.length - 1;
while (i >= 0) {
port[i].removeMovieClip();
port.splice(i, 1);
i--;
}
}
function removepickAttack() {
i = pickAttack.length - 1;
while (i >= 0) {
pickAttack[i].removeMovieClip();
pickAttack.splice(i, 1);
i--;
}
}
function removeblocks() {
i = blocks.length - 1;
while (i >= 0) {
blocks[i].removeMovieClip();
blocks.splice(i, 1);
i--;
}
}
function removebeingSmacked() {
i = beingSmacked.length - 1;
while (i >= 0) {
beingSmacked[i].removeMovieClip();
beingSmacked.splice(i, 1);
i--;
}
}
function removemoveAbout() {
i = moveAbout.length - 1;
while (i >= 0) {
moveAbout[i].removeMovieClip();
moveAbout.splice(i, 1);
i--;
}
}
function removewhere() {
i = where.length - 1;
while (i >= 0) {
where[i].removeMovieClip();
where.splice(i, 1);
i--;
}
}
function removeonPlatform() {
i = onPlatform.length - 1;
while (i >= 0) {
onPlatform[i].removeMovieClip();
onPlatform.splice(i, 1);
i--;
}
}
function removeDead_body() {
i = dead_body.length - 1;
while (i >= 0) {
dead_body[i].removeMovieClip();
dead_body.splice(i, 1);
i--;
}
}
function removeType() {
i = type.length - 1;
while (i >= 0) {
type[i].removeMovieClip();
type.splice(i, 1);
i--;
}
}
function removeHypArray() {
i = hypArray.length - 1;
while (i >= 0) {
hypArray[i].removeMovieClip();
hypArray.splice(i, 1);
i--;
}
}
function removeEnemyHealth() {
i = enemyHealth.length - 1;
while (i >= 0) {
enemyHealth[i].removeMovieClip();
enemyHealth.splice(i, 1);
i--;
}
}
function removeDamagedTimer() {
i = damagedTimer.length - 1;
while (i >= 0) {
damagedTimer[i].removeMovieClip();
damagedTimer.splice(i, 1);
i--;
}
}
function removeHit() {
i = hit.length - 1;
while (i >= 0) {
hit[i].removeMovieClip();
hit.splice(i, 1);
i--;
}
}
function removeEnemyAttackingTimer() {
i = enemyAttackingTimer.length - 1;
while (i >= 0) {
enemyAttackingTimer[i].removeMovieClip();
enemyAttackingTimer.splice(i, 1);
i--;
}
}
function removeEnemyAttacking() {
i = enemyAttacking.length - 1;
while (i >= 0) {
enemyAttacking[i].removeMovieClip();
enemyAttacking.splice(i, 1);
i--;
}
}
function removeEnemy() {
i = enemy.length - 1;
while (i >= 0) {
enemy[i].removeMovieClip();
enemy.splice(i, 1);
i--;
}
}
function removeDepths() {
i = depths.length - 1;
while (i >= 0) {
depths[i].removeMovieClip();
depths.splice(i, 1);
i--;
}
}
function shaker() {
if (shake == 0) {
_root._x = 0;
_root._y = 0;
} else if (shake == 1) {
shake = shake + 1;
_root._x = _root._x + 2;
_root._y = _root._y + 2;
} else if (shake == 2) {
shake = shake + 1;
_root._y = _root._y - 4;
_root._x = _root._x - 4;
} else if (shake == 3) {
shake = shake + 1;
_root._x = _root._x + 1;
_root._y = _root._y + 1;
} else if (shake == 4) {
shake = shake + 1;
_root._x = 0;
_root._y = 0;
} else if (shake == 5) {
shake = shake + 1;
_root._x = 4;
_root._y = 4;
} else if (shake == 6) {
shake = shake + 1;
_root._x = 2;
_root._y = 2;
} else if (shake == 7) {
shake = shake + 1;
_root._x = 0;
_root._y = 0;
} else if (shake == 8) {
shake = shake + 1;
_root._x = _root._x + 2;
_root._y = _root._y + 2;
} else if (shake == 9) {
shake = shake + 1;
_root._y = _root._y - 4;
_root._x = _root._x - 4;
} else if (shake == 10) {
shake = shake + 1;
_root._x = _root._x + 1;
_root._y = _root._y + 1;
} else if (shake == 11) {
shake = shake + 1;
_root._x = 0;
_root._y = 0;
} else if (shake == 12) {
shake = shake + 1;
_root._x = 4;
_root._y = 4;
} else if (shake == 13) {
shake = shake + 1;
_root._x = 2;
_root._y = 2;
} else if (shake == 14) {
shake = shake + 1;
_root._x = _root._x + 1;
_root._y = _root._y + 1;
} else if (shake == 15) {
shake = shake + 1;
_root._x = 0;
_root._y = 0;
} else if (shake == 16) {
shake = shake + 1;
_root._x = _root._x + 2;
_root._y = _root._y + 2;
} else if (shake == 17) {
shake = shake + 1;
_root._y = _root._y - 4;
_root._x = _root._x - 4;
} else if (shake == 18) {
shake = shake + 1;
_root._x = _root._x + 1;
_root._y = _root._y + 1;
} else if (shake == 19) {
shake = shake + 1;
_root._x = 0;
_root._y = 0;
} else if (shake == 20) {
shake = shake + 1;
_root._x = 4;
_root._y = 4;
} else if (shake == 21) {
shake = shake + 1;
_root._x = 2;
_root._y = 2;
} else if (shake == 22) {
shake = shake + 1;
_root._x = 0;
_root._y = 0;
} else if (shake == 23) {
shake = shake + 1;
_root._x = _root._x + 2;
_root._y = _root._y + 2;
} else if (shake == 24) {
shake = shake + 1;
_root._y = _root._y - 4;
_root._x = _root._x - 4;
} else if (shake == 25) {
shake = shake + 1;
_root._x = _root._x + 1;
_root._y = _root._y + 1;
} else if (shake == 26) {
shake = shake + 1;
_root._x = 0;
_root._y = 0;
} else if (shake == 27) {
shake = shake + 1;
_root._x = 4;
_root._y = 4;
} else if (shake == 28) {
shake = shake + 1;
_root._x = 2;
_root._y = 2;
} else if (shake > 29) {
shake = 0;
_root._x = _root._x + 1;
_root._y = _root._y + 1;
}
}
function enterActions() {
if ((!inControl) && (!noBoss)) {
player.gotoAndStop("run");
player._x = player._x + playerSpeed;
if (player._x > 120) {
inControl = true;
}
}
}
function shotActions() {
i = shot.length - 1;
while (i >= 0) {
if (shot[i]._y > 300) {
randomNumber++;
hitGround_mc = _root.attachMovie("hitGround", "hitGround" + randomNumber, _root.getNextHighestDepth(), {_x:shot[i]._x, _y:shot[i]._y});
hitGround_mc._xscale = shot[i]._xscale;
shot[i].removeMovieClip();
shot.splice(i, 1);
}
j = enemy.length - 1;
while (j >= 0) {
if (shot[i].hitTest(enemy[j])) {
if (type[j] == 0) {
ejump[j] = true;
eonfloor[j] = false;
eyspeed[j] = 0;
eyspeed[j] = eyspeed[j] - ejumpamount[j];
}
hitPose[j]++;
if (hitPose[j] > 1) {
hitPose[j] = 0;
}
randomNumber++;
fbhit_mc = _root.attachMovie("fbhit", "fbhit" + randomNumber, _root.getNextHighestDepth(), {_y:shot[i]._y, _x:shot[i]._x});
fbhit_mc._xscale = shot[i]._xscale;
randomNumber++;
blood_mc = _root.attachMovie("hitSpark_mc", "hitSpark_mc" + randomNumber, _root.getNextHighestDepth(), {_y:player._y, _x:player._x});
blood_mc._xscale = player._xscale;
ehit_sound.start();
beingSmacked[j]++;
randomNumber++;
comboCounter++;
displayTimer = 16;
hitEm = _root.attachMovie("oneHit", "oneHit" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[j]._x, _y:enemy[j]._y});
comboBox.cnum.text = comboCounter;
hit[j] = 1;
damagedTimer[j] = 0;
enemyHealth[j] = enemyHealth[j] - (playerPower * 5);
shot[i].removeMovieClip();
shot.splice(i, 1);
}
j--;
}
i--;
}
}
function swapdepths() {
i = depths.length - 1;
while (i >= 0) {
if (!jump) {
depths[i].idiot_depth = Math.floor((depths[i]._y * 480) + depths[i]._x);
depths[i].swapDepths(depths[i].idiot_depth);
}
i--;
}
}
function noOverLap() {
i = enemy.length - 1;
while (i >= 0) {
j = enemy.length - 1;
while (j >= 0) {
if (!(enemy[i] === enemy[j])) {
if (enemy[i].hitTest(enemy[j])) {
if (alive[i] && (type[i] == 0)) {
endX = _root.enemy[j]._x;
enemy[i]._x = enemy[i]._x - ((endX - enemy[i]._x) / enemySpeed);
}
}
}
j--;
}
i--;
}
}
function calculateHyp() {
i = enemy.length - 1;
while (i >= 0) {
dist_x = player._x - enemy[i]._x;
hypArray[i] = Math.sqrt(dist_x * dist_x);
i--;
}
}
function enemyHealthReachesZero() {
i = enemy.length - 1;
while (i >= 0) {
if (enemyHealth[i] < 1) {
alive[i] = false;
if (erase[i] == 0) {
if (type[i] == "mainBoss") {
noBoss = true;
}
}
erase[i]++;
if (erase[i] == 52) {
}
}
i--;
}
}
function enemyMovement() {
i = enemy.length - 1;
while (i >= 0) {
if (type[i] == "mainBoss") {
bossBar._xscale = enemyHealth[i];
if (!alive[i]) {
enemy[i].gotoAndStop("dead");
}
if (ejump[i]) {
enemy[i]._y = enemy[i]._y + eyspeed[i];
if (enemy[i]._y > groundMarker[i]) {
edropping[i] = false;
eonfloor[i] = true;
ejump[i] = false;
eyspeed[i] = 0;
enemy[i]._y = groundMarker[i];
} else {
if (enemy[i]._xscale == 100) {
enemy[i]._x = enemy[i]._x + 2;
} else {
enemy[i]._x = enemy[i]._x - 2;
}
eyspeed[i] = eyspeed[i] + (gravity * 2);
}
}
if (alive[i]) {
if (!playerAlive) {
hit[i] = 0;
damagedTimer[i] = 0;
enemy[i].gotoAndStop("idle");
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 50) + 0;
}
if (playerAlive) {
if (player.hitTest(enemy[i])) {
if (ejump[i]) {
if (((((((is_attacking == 3) or (is_attacking == 10)) or (is_attacking == 16)) or (is_attacking == 20)) or (is_attacking == 22)) or (is_attacking == 24)) or (is_attacking == 26)) {
ejump[i] = true;
eonfloor[i] = false;
eyspeed[i] = 0;
eyspeed[i] = eyspeed[i] - ejumpamount[i];
}
}
if (eonfloor[i] && (enemyAttackingTimer[i] < 100)) {
if (is_attacking == 22) {
groundMarker[i] = enemy[i]._y;
ejump[i] = true;
eonfloor[i] = false;
eyspeed[i] = eyspeed[i] - ejumpamount[i];
}
}
}
if (player._x < enemy[i]._x) {
enemy[i]._xscale = 100;
} else {
enemy[i]._xscale = -100;
}
if ((hypArray[i] < 200) && (eonfloor[i])) {
if (enemyAttacking[i] == 1) {
if (enemy[i].hitTest(player)) {
invisible = false;
player._alpha = 100;
if (((!zombieMode) && (!special)) && (!gotSoap)) {
hitPlayer = 1;
playerHealth = playerHealth - (enemyPower * 1.5);
}
}
}
enemyAttackingTimer[i]++;
} else {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
if (enemyAttackingTimer[i] > 100) {
enemy[i].gotoAndStop("attack");
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] == 110) {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
pickAttack[i] = Math.round(Math.random() * 3) + 0;
}
}
if (enemyAttacking[i] == 0) {
if (enemy[i].hitTest(player)) {
if (jump) {
if (((magic && (shootTimer > 20)) && (magicTimer == 0)) or (magicTimer == 5)) {
hitPose[i]++;
if (hitPose[i] > 1) {
hitPose[i] = 0;
}
randomNumber++;
blood_mc = _root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_y:enemy[i]._y, _x:enemy[i]._x});
ehit_sound.start();
beingSmacked[i]++;
randomNumber++;
comboCounter++;
displayTimer = 16;
hitEm = _root.attachMovie("oneHit", "oneHit" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
comboBox.cnum.text = comboCounter;
hit[i] = 1;
damagedTimer[i] = 0;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
if (!jump) {
if (((magic && (shootTimer > 20)) && (magicTimer == 0)) or (magicTimer == 5)) {
hitPose[i]++;
if (hitPose[i] > 1) {
hitPose[i] = 0;
}
comboCounter++;
displayTimer = 16;
randomNumber++;
blood_mc = _root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_y:enemy[i]._y, _x:enemy[i]._x});
ehit_sound.start();
beingSmacked[i]++;
randomNumber++;
hitEm = _root.attachMovie("oneHit", "oneHit" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
comboBox.cnum.text = comboCounter;
hit[i] = 1;
damagedTimer[i] = 0;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
if (enemy[i].hitTest(player)) {
if (jump) {
if (((((((is_attacking == 3) or (is_attacking == 10)) or (is_attacking == 16)) or (is_attacking == 20)) or (is_attacking == 22)) or (is_attacking == 24)) or (is_attacking == 26)) {
if (hypArray[i] < 150) {
hitPose[i]++;
if (hitPose[i] > 1) {
hitPose[i] = 0;
}
randomNumber++;
blood_mc = _root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_y:enemy[i]._y, _x:enemy[i]._x});
ehit_sound.start();
beingSmacked[i]++;
comboCounter++;
displayTimer = 16;
randomNumber++;
hitEm = _root.attachMovie("oneHit", "oneHit" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
comboBox.cnum.text = comboCounter;
hit[i] = 1;
damagedTimer[i] = 0;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
if (!jump) {
if (((is_attacking == 3) or (is_attacking == 12)) or (is_attacking == 22)) {
if (hypArray[i] < 150) {
hitPose[i]++;
if (hitPose[i] > 1) {
hitPose[i] = 0;
}
randomNumber++;
blood_mc = _root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_y:enemy[i]._y, _x:enemy[i]._x});
ehit_sound.start();
beingSmacked[i]++;
comboCounter++;
displayTimer = 16;
randomNumber++;
hitEm = _root.attachMovie("oneHit", "oneHit" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
comboBox.cnum.text = comboCounter;
hit[i] = 1;
damagedTimer[i] = 0;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
}
if (hit[i] == 1) {
if (!magic) {
if (ejump[i]) {
if (hitPose[i] == 0) {
enemy[i].gotoAndStop("ahit1");
}
if (hitPose[i] == 1) {
enemy[i].gotoAndStop("ahit2");
}
}
if (!ejump[i]) {
if (hitPose[i] == 0) {
enemy[i].gotoAndStop("hit1");
}
if (hitPose[i] == 1) {
enemy[i].gotoAndStop("hit2");
}
}
}
if (magic && (shootTimer > 20)) {
enemy[i].gotoAndStop("shock");
}
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
damagedTimer[i]++;
if (damagedTimer[i] == 15) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if ((hit[i] == 0) && (eonfloor[i])) {
portTimer[i]++;
if (portTimer[i] > 32) {
where[i] = Math.round(Math.random() * 2) + 0;
moveAbout[i] = Math.round(Math.random() * 1) + 0;
portTimer[i] = 0;
}
if ((where[i] == 0) or (where[i] == 1)) {
if ((!ejump[i]) && (!edropping[i])) {
enemy[i].gotoAndStop("run");
}
if (moveAbout[i] == 0) {
endX = _root.player._x;
endY = _root.player._y;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) + 75) / enemySpeed);
if (!jump) {
enemy[i]._y = enemy[i]._y + ((endY - enemy[i]._y) / enemySpeed);
}
}
if (moveAbout[i] == 1) {
endX = _root.player._x;
endY = _root.player._y;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) - 75) / enemySpeed);
if (!jump) {
enemy[i]._y = enemy[i]._y + ((endY - enemy[i]._y) / enemySpeed);
}
}
} else {
enemy[i].gotoAndStop("idle");
}
}
}
}
}
}
i--;
}
}
function pushenemy() {
i = enemy.length - 1;
while (i >= 0) {
if (Key.isDown(38)) {
if ((fg._y > 120) && (fg._y < 240)) {
enemy[i]._y = enemy[i]._y + 3;
}
}
if (Key.isDown(40)) {
if ((fg._y > 120) && (fg._y < 240)) {
enemy[i]._y = enemy[i]._y - 3;
}
}
i--;
}
}
function box() {
i = boxes.length - 1;
while (i >= 0) {
if (player.hitTest(boxes[i])) {
if (boxHealth[i] > 0) {
if (!jump) {
if (((is_attacking == 3) or (is_attacking == 12)) or (is_attacking == 22)) {
ehit_sound.start();
boxHit[i] = 1;
boxHealth[i]--;
randomNumber++;
hitEm_box = _root.attachMovie("boxHit", "boxHit" + randomNumber, _root.getNextHighestDepth(), {_x:boxes[i]._x + 50, _y:boxes[i]._y});
}
}
if (jump) {
if (((((((is_attacking == 3) or (is_attacking == 10)) or (is_attacking == 16)) or (is_attacking == 20)) or (is_attacking == 22)) or (is_attacking == 24)) or (is_attacking == 26)) {
ehit_sound.start();
boxHit[i] = 1;
boxHealth[i]--;
randomNumber++;
hitEm_box = _root.attachMovie("boxHit", "boxHit" + randomNumber, _root.getNextHighestDepth(), {_x:boxes[i]._x + 50, _y:boxes[i]._y});
}
}
}
}
if (boxHealth[i] > 10) {
boxes[i].gotoAndStop("fixed");
}
if ((boxHealth[i] > 0) && (boxHealth[i] < 10)) {
boxes[i].gotoAndStop("cracked");
}
if (boxHealth[i] == 1) {
boxHealth[i] = 0;
boxes[i].gotoAndStop("broken");
randomNumber++;
soap_clip = _root.attachMovie("soap_mc", "soap_mc" + randomNumber, _root.getNextHighestDepth(), {_y:boxes[i]._y, _x:boxes[i]._x});
potions.push(soap_clip);
depths.push(soap_clip);
potionType.push(1);
}
if (boxHit[i] == 0) {
var _local2 = boxes[i].transform.colorTransform;
boxes[i].transform.colorTransform = new flash.geom.ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
}
if (boxHit[i] == 1) {
var _local2 = boxes[i].transform.colorTransform;
_local2.rgb = 4294967295;
boxes[i].transform.colorTransform = _local2;
boxHitTimer[i]++;
if (boxHitTimer[i] == 1) {
boxHit[i] = 0;
boxHitTimer[i] = 0;
}
}
if (((((!special) && (!magic)) && (playerAlive)) && (!gotSoap)) && (inControl)) {
if (Key.isDown(38)) {
if ((fg._y > 120) && (fg._y < 240)) {
boxes[i]._y = boxes[i]._y + 3;
}
}
if (Key.isDown(40)) {
if ((fg._y > 120) && (fg._y < 240)) {
boxes[i]._y = boxes[i]._y - 3;
}
}
}
i--;
}
}
function soapActions() {
i = potions.length - 1;
while (i >= 0) {
if (player.hitTest(potions[i]._x, potions[i]._y, true)) {
if (!attacking) {
gotSoap = true;
superPower = superPower + 25;
potions[i].removeMovieClip();
potions.splice(i, 1);
potionType.splice(i, 1);
}
}
if (((((!special) && (!magic)) && (playerAlive)) && (!gotSoap)) && (inControl)) {
if (Key.isDown(38)) {
if ((fg._y > 120) && (fg._y < 240)) {
potions[i]._y = potions[i]._y + 3;
}
}
if (Key.isDown(40)) {
if ((fg._y > 120) && (fg._y < 240)) {
potions[i]._y = potions[i]._y - 3;
}
}
}
i--;
}
}
function canAddPoint() {
if (clicks == 0) {
canAddComboPoint = true;
} else {
canAddComboPoint = false;
}
}
function runAttackTimer() {
if (attacking) {
if (!jump) {
playerSpeed = 1;
}
is_attacking++;
} else {
playerSpeed = 10;
}
}
function confirmAttacking() {
if (clicks > 0) {
attacking = true;
}
}
function comboOne() {
if (!addSecondCombo) {
if (!addThirdCombo) {
if (addFirstCombo) {
if (attacking) {
if (jump) {
if (!zombieMode) {
player.gotoAndStop("aattack2");
}
if (zombieMode) {
player.gotoAndStop("azattack");
}
}
if (!jump) {
if (!zombieMode) {
player.gotoAndStop("attack2");
}
if (zombieMode) {
player.gotoAndStop("zattack");
}
}
if (is_attacking == 7) {
if (jump && (player._y > 180)) {
yspeed = 0;
yspeed = yspeed - 20;
}
addFirstCombo = false;
if (clicks == 1) {
smack = 0;
clicks = 0;
is_attacking = 0;
attacking = false;
}
if (clicks > 1) {
smack = 0;
addSecondCombo = true;
}
}
}
}
}
}
}
function comboTwo() {
if (!addFirstCombo) {
if (!addThirdCombo) {
if (addSecondCombo) {
if (attacking) {
if (jump) {
if (!zombieMode) {
player.gotoAndStop("aattack");
}
if (zombieMode) {
player.gotoAndStop("azattack2");
}
}
if (!jump) {
if (!zombieMode) {
player.gotoAndStop("attack");
}
if (zombieMode) {
player.gotoAndStop("zattack2");
}
}
if (is_attacking == 19) {
if (jump && (player._y > 180)) {
yspeed = 0;
yspeed = yspeed - 20;
}
addSecondCombo = false;
if (clicks == 2) {
smack = 0;
clicks = 0;
is_attacking = 0;
attacking = false;
}
if (clicks > 2) {
smack = 0;
addThirdCombo = true;
}
}
}
}
}
}
}
function comboThree() {
if (!addFirstCombo) {
if (!addSecondCombo) {
if (addThirdCombo) {
if (attacking) {
if (jump) {
if (!zombieMode) {
player.gotoAndStop("aattack3");
}
if (zombieMode) {
player.gotoAndStop("azattack3");
}
}
if (!jump) {
if (!zombieMode) {
player.gotoAndStop("attack3");
}
if (zombieMode) {
player.gotoAndStop("zattack3");
}
}
if (is_attacking == 26) {
if (jump && (player._y > 180)) {
yspeed = 0;
yspeed = yspeed - 20;
}
addThirdCombo = false;
if (clicks == 3) {
smack = 0;
clicks = 0;
is_attacking = 0;
attacking = false;
}
if (clicks > 3) {
smack = 0;
clicks = 1;
is_attacking = 0;
addFirstCombo = true;
}
}
}
}
}
}
}
function playerMovement() {
if (hitPlayer == 0) {
var _local4 = player.transform.colorTransform;
player.transform.colorTransform = new flash.geom.ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
}
if (hitPlayer == 1) {
var _local4 = player.transform.colorTransform;
_local4.rgb = 4294967295;
player.transform.colorTransform = _local4;
hitTimer++;
if (hitTimer == 1) {
hitPlayer = 0;
hitTimer = 0;
}
}
if ((player._x < 46) && (inControl)) {
player._x = 46;
}
if (canGo && (inControl)) {
if (fg._x > -1916.9) {
if (player._x > 410) {
i = enemy.length - 1;
while (i >= 0) {
enemy[i]._x = enemy[i]._x - 5;
i--;
}
j = boxes.length - 1;
while (j >= 0) {
boxes[j]._x = boxes[j]._x - 5;
j--;
}
k = potions.length - 1;
while (k >= 0) {
potions[k]._x = potions[k]._x - 5;
k--;
}
moved++;
sfg._x = sfg._x - 5;
sfg2._x = sfg2._x - 5;
bg._x = bg._x - 5;
fg._x = fg._x - 5;
steps++;
player._x = 410;
}
}
}
if ((player._x > 590) && (inControl)) {
player._x = 590;
}
if (inControl) {
if (playerAlive) {
if (!gotSoap) {
if (!magic) {
if (!jump) {
if (!special) {
if (!attacking) {
if (!running) {
if (!zombieMode) {
player.gotoAndStop("idle");
}
if (zombieMode) {
player.gotoAndStop("zidle");
}
}
if (running) {
if (!zombieMode) {
player.gotoAndStop("run");
}
if (zombieMode) {
player.gotoAndStop("zrun");
}
}
}
}
}
}
}
}
}
if (!Key.isDown(68)) {
magicTimer = 0;
shootTimer = 0;
magic = false;
airMagic = false;
}
if (Key.isDown(68)) {
if (inControl) {
if (playerAlive) {
if (!gotSoap) {
if (!special) {
if (!attacking) {
if (superPower > 10) {
if (!jump) {
magic = true;
}
if (jump) {
airMagic = true;
}
}
}
}
}
}
}
}
if (airMagic) {
if (!zombieMode) {
player.gotoAndStop("aspecial");
}
if (zombieMode) {
player.gotoAndStop("zaspecial");
}
if ((magicAttack + 200) < getTimer()) {
fbsfx_sound.start();
superPower = superPower - 10;
if (superPower < 0) {
airMagic = false;
}
magicAttack = getTimer();
yspeed = 0;
if (initial == 0) {
initial = 1;
yspeed = yspeed - 35;
} else {
yspeed = yspeed - 10;
}
if (player._xscale == 100) {
randomNumber++;
fireball_mc = _root.attachMovie("fireball", "fireball" + randomNumber, _root.getNextHighestDepth(), {_y:player._y, _x:player._x});
shot.push(fireball_mc);
fireball_mc.onEnterFrame = function () {
this._x = this._x + 15;
this._y = this._y + 15;
};
}
if (player._xscale == -100) {
randomNumber++;
fireball_mc = _root.attachMovie("fireball", "fireball" + randomNumber, _root.getNextHighestDepth(), {_y:player._y, _x:player._x});
fireball_mc._xscale = -100;
shot.push(fireball_mc);
fireball_mc.onEnterFrame = function () {
this._x = this._x - 15;
this._y = this._y + 15;
};
}
}
}
if (magic) {
superPower = superPower - 0.5;
shootTimer++;
if (shootTimer > 20) {
magicTimer++;
}
if (magicTimer == 5) {
magicTimer = 0;
}
if (!zombieMode) {
player.gotoAndStop("gspecial");
}
if (zombieMode) {
player.gotoAndStop("zgspecial");
}
if (superPower < 0) {
magicTimer = 0;
shootTimer = 0;
magic = false;
}
}
if (Key.isDown(87)) {
if (inControl) {
if (playerAlive) {
if (!gotSoap) {
if (!magic) {
if (!jump) {
if (!attacking) {
if (superPower > 99) {
special = true;
}
}
}
}
}
}
}
}
if (!Key.isDown(65)) {
pressHack = 0;
}
if (Key.isDown(65)) {
if (inControl) {
if (playerAlive) {
if (!gotSoap) {
if (!magic) {
if (!special) {
if (pressHack == 0) {
swing_sound.start();
pressHack = 1;
if (canAddComboPoint) {
addFirstCombo = true;
}
clicks++;
}
}
}
}
}
}
}
if (special) {
player.gotoAndStop("transform");
specialTimer++;
if (specialTimer == 65) {
zombieMode = true;
playerPower = 1.75;
special = false;
specialTimer = 0;
}
}
if (!Key.isDown(83)) {
pressOnceOnly = 0;
}
if (Key.isDown(83)) {
if (inControl) {
if (playerAlive) {
if (!gotSoap) {
if (!magic) {
if (!airMagic) {
if (!special) {
if (onfloor) {
if (pressOnceOnly == 0) {
pressOnceOnly = 1;
if (!attacking) {
if (!zombieMode) {
player.gotoAndStop("jump");
}
if (zombieMode) {
player.gotoAndStop("zjump");
}
}
jump = true;
onfloor = false;
yspeed = yspeed - jumpamount;
_root.attachMovie("shadow_mc", "shadow_mc", _root.getNextHighestDepth(), {_y:player._y, _x:player._x});
}
}
}
}
}
}
}
}
}
shadow_mc._x = player._x;
if (inControl) {
if (playerAlive) {
if (!gotSoap) {
if (!magic) {
if (!special) {
if (!Key.isDown(40)) {
running = false;
}
if (!Key.isDown(38)) {
running = false;
}
if (!Key.isDown(39)) {
running = false;
}
if (!Key.isDown(37)) {
running = false;
}
if (Key.isDown(39)) {
player._xscale = 100;
player._x = player._x + playerSpeed;
running = true;
}
if (Key.isDown(37)) {
player._xscale = -100;
player._x = player._x - playerSpeed;
running = true;
}
if (Key.isDown(38)) {
running = true;
}
if (Key.isDown(40)) {
running = true;
}
}
}
}
}
}
if ((!playerAlive) or (!inControl)) {
clicks = 0;
attacking = false;
is_attacking = 0;
jump = false;
magic = false;
magicTimer = 0;
shootTimer = 0;
airMagic = false;
}
if (gotSoap) {
if (!zombieMode) {
player.gotoAndStop("soap");
}
if (zombieMode) {
player.gotoAndStop("zsoap");
}
gotSoapTimer++;
if (gotSoapTimer == 31) {
gotSoap = false;
gotSoapTimer = 0;
}
}
if (((!playerAlive) && (onfloor)) && (_global.contGame)) {
if (deadTimer == 112) {
_root.attachMovie("tapup", "tapup", _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
playerHealth = playerHealth + 10;
}
deadTimer--;
if (deadTimer < 65) {
player.gotoAndStop("getUp");
}
if (deadTimer == 0) {
beDead = 0;
_global.contGame = false;
tapup.removeMovieClip();
playerAlive = true;
deadTimer = 112;
}
if (Key.isDown(38)) {
if (pressThis == 0) {
pressThis = 1;
playerHealth = playerHealth + 2.5;
}
}
if (!Key.isDown(38)) {
pressThis = 0;
}
}
if (player._y < 70) {
player._y = 70;
}
player._y = player._y + yspeed;
if (player._y > 350) {
shadow_mc.removeMovieClip();
initial = 0;
airMagic = false;
onfloor = true;
jump = false;
yspeed = 0;
player._y = 350;
} else {
yspeed = yspeed + (gravity * 2);
}
if ((playerHealth < 0) && (!attacking)) {
if (beDead == 0) {
beDead = 1;
player.gotoAndStop("dead");
}
playerAlive = false;
playerHealth = 0;
carryOn._x = 0;
carryOn._y = 0;
}
if (_global.contGame) {
carryOn._x = 900;
carryOn._y = 900;
}
if (playerHealth > 100) {
playerHealth = 100;
}
if (superPower < 0) {
zombieMode = false;
playerPower = 0.75;
superPower = 0;
}
if (superPower > 100) {
superPower = 100;
}
if (zombieMode) {
superPower = superPower - 0.3;
}
}
stop();
beDead = 0;
ehit_sound = new Sound();
ehit_sound.attachSound("ehit");
quake_sound = new Sound();
quake_sound.attachSound("quake");
fbsfx_sound = new Sound();
fbsfx_sound.attachSound("fballsfx");
_root.attachMovie("comboBox", "comboBox", _root.getNextHighestDepth(), {_x:120, _y:125});
comboBox._x = -100;
if (playerSelected == 0) {
_root.attachMovie("player", "player", _root.getNextHighestDepth(), {_x:-100, _y:350});
}
if (playerSelected == 1) {
_root.attachMovie("playerTwo", "player", _root.getNextHighestDepth(), {_x:-100, _y:350});
}
addSecondCombo = false;
addThirdCombo = false;
addFirstCombo = false;
jump = false;
soapDrop = 0;
pressThis = 0;
deadTimer = 112;
initial = 0;
playerAlive = true;
comboCounter = 0;
jumpamount = 25;
magicAttack = 0;
magic = false;
magicTimer = 0;
death_stick_timer = 0;
yspeed = 0;
shake = 0;
hereTheyComeTimer = 0;
playerHealth = 100;
hereTheyCome = false;
getThingsGoing = true;
onfloor = true;
displayTimer = 0;
toGo = 0;
playerPower = 0.75;
gravity = 2;
shootTimer = 0;
mainBosssAttack = 0;
randomNumber = 0;
pressOnceOnly = 0;
pressHack = 0;
specialTimer = 0;
clicks = 0;
playerSpeed = 10;
is_attacking = 0;
smack = 0;
waitAsec = 0;
gotSoap = false;
gotSoapTimer = 0;
hitPlayer = 0;
hitTimer = 0;
enemySpeed = 70;
yesGo = 0;
moved = 0;
markWave = 2;
steps = 0;
distance = 0;
addBoss = 0;
superPower = 100;
enemyPower = 2;
canGo = false;
zombieMode = false;
special = false;
hit2 = false;
hit3 = false;
running = false;
attacking = false;
var zombieSpots = new Array();
var zombieSpotsFade = new Array();
var erase = new Array();
var alive = new Array();
var groundMarker = new Array();
var hitPose = new Array();
var potionType = new Array();
var potions = new Array();
var boxHealth = new Array();
var boxHit = new Array();
var boxHitTimer = new Array();
var boxes = new Array();
var edropping = new Array();
var eonfloor = new Array();
var ejump = new Array();
var ejumpamount = new Array();
var eyspeed = new Array();
var shot = new Array();
var portTimer = new Array();
var beingSmacked = new Array();
var dead_body = new Array();
var type = new Array();
var hypArray = new Array();
var enemyHealth = new Array();
var damagedTimer = new Array();
var hit = new Array();
var enemyAttackingTimer = new Array();
var enemyAttacking = new Array();
var enemy = new Array();
var blocks = new Array();
var moveAbout = new Array();
var where = new Array();
var onPlatform = new Array();
var pickAttack = new Array();
var port = new Array();
var depths = new Array();
boxes.push(box1, box2);
boxHealth.push(13, 13);
boxHit.push(0, 0);
boxHitTimer.push(0, 0);
depths.push(player);
randomNumber++;
depths.push(boss);
enemy.push(boss);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push("mainBoss");
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(100);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
hitPose.push(0);
groundMarker.push(boss._y);
alive.push(true);
erase.push(0);
noBoss = false;
addBoss = 1;
bg.onEnterFrame = function () {
if (fg._y < 120) {
fg._y = 120;
}
if (bg._y < 10) {
bg._y = 10;
}
if (bg._y > 30) {
bg._y = 30;
}
if (fg._y > 240) {
fg._y = 240;
}
if (((((!special) && (!magic)) && (playerAlive)) && (!gotSoap)) && (inControl)) {
if (Key.isDown(38)) {
if ((fg._y > 120) && (fg._y < 240)) {
sfg._y = sfg._y + 4.5;
sfg2._y = sfg2._y + 4.5;
}
}
if (Key.isDown(40)) {
if ((fg._y > 120) && (fg._y < 240)) {
sfg._y = sfg._y - 4.5;
sfg2._y = sfg2._y - 4.5;
}
}
if (Key.isDown(38)) {
bg._y = bg._y - 0.7;
fg._y = fg._y + 3;
}
if (Key.isDown(40)) {
bg._y = bg._y + 0.7;
fg._y = fg._y - 3;
}
}
};
player.onEnterFrame = function () {
if (comboCounter > 0) {
comboBox._x = 120;
displayTimer--;
}
if (displayTimer < 0) {
comboCounter = 0;
displayTimer = 0;
}
if (displayTimer == 0) {
comboBox._x = comboBox._x - 25;
}
superPower = superPower + 0.05;
playerBar._xscale = playerHealth;
manaBar._xscale = superPower;
enterActions();
enemyHealthReachesZero();
if (((((!special) && (!magic)) && (playerAlive)) && (!gotSoap)) && (inControl)) {
pushenemy();
}
if (noBoss) {
inControl = false;
if (waitAsec < 60) {
if (!zombieMode) {
player.gotoAndStop("idle");
}
if (zombieMode) {
player.gotoAndStop("zidle");
}
}
waitAsec++;
if (waitAsec > 59) {
player._xscale = 100;
if (!zombieMode) {
player.gotoAndStop("run");
}
if (zombieMode) {
player.gotoAndStop("zrun");
}
player._x = player._x + playerSpeed;
if (player._x > 710) {
if (toGo == 0) {
_root.attachMovie("trans", "trans", _root.getNextHighestDepth());
}
toGo++;
if (toGo == 27) {
removeall();
stopAllSounds();
nextFrame();
}
}
}
}
box();
shotActions();
noOverLap();
swapdepths();
playerMovement();
comboOne();
comboTwo();
comboThree();
runAttackTimer();
canAddPoint();
confirmAttacking();
calculateHyp();
enemyMovement();
shaker();
soapActions();
fbhit_mc.swapDepths(_root.getNextHighestDepth());
hitEm.swapDepths(_root.getNextHighestDepth());
blood_mc.swapDepths(_root.getNextHighestDepth());
sfg.swapDepths(_root.getNextHighestDepth());
sfg2.swapDepths(_root.getNextHighestDepth());
carryOn.swapDepths(_root.getNextHighestDepth());
trans.swapDepths(_root.getNextHighestDepth());
};
Instance of Symbol 1333 MovieClip in Frame 23
on (release) {
getURL ("http://www.turbonuke.com/?gamereferal=aghzombies", "_blank");
}
Frame 24
player.removeMovieClip();
stopAllSounds();
play();
Frame 25
stop();
ty.onRelease = function () {
gotoAndStop ("mainMenu");
};
pmmg.onRelease = function () {
getURL ("http://www.turbonuke.com/?gamereferal=aghzombies", "_blank");
};
ty.onEnterFrame = function () {
if (this.hitTest(_xmouse, _ymouse, true)) {
this.gotoAndStop("down");
} else {
this.gotoAndStop("up");
}
};
Instance of Symbol 1333 MovieClip "pmmg" in Frame 25
on (release) {
getURL ("#", "_blank");
}
Symbol 10 MovieClip [Intro_TurboNuke] Frame 1
_root.stop();
Symbol 10 MovieClip [Intro_TurboNuke] Frame 94
_root.play();
Symbol 59 MovieClip Frame 53
stop();
Symbol 65 MovieClip [zombieOne] Frame 1
stop();
Symbol 65 MovieClip [zombieOne] Frame 2
stop();
Symbol 65 MovieClip [zombieOne] Frame 3
stop();
Symbol 65 MovieClip [zombieOne] Frame 4
stop();
Symbol 65 MovieClip [zombieOne] Frame 5
stop();
Symbol 65 MovieClip [zombieOne] Frame 6
stop();
Symbol 65 MovieClip [zombieOne] Frame 7
stop();
Symbol 65 MovieClip [zombieOne] Frame 8
stop();
Symbol 65 MovieClip [zombieOne] Frame 9
stop();
Symbol 79 MovieClip [blood] Frame 11
this.removeMovieClip();
Symbol 83 MovieClip [oneHit] Frame 30
this.removeMovieClip();
Symbol 108 MovieClip Frame 15
stop();
Symbol 136 MovieClip Frame 53
stop();
Symbol 137 MovieClip [firstboss] Frame 1
stop();
Symbol 137 MovieClip [firstboss] Frame 2
stop();
Symbol 137 MovieClip [firstboss] Frame 3
stop();
Symbol 137 MovieClip [firstboss] Frame 4
stop();
Symbol 137 MovieClip [firstboss] Frame 5
stop();
Symbol 187 MovieClip [hitGround] Frame 6
this.removeMovieClip();
Symbol 195 MovieClip [fbhit] Frame 7
this.removeMovieClip();
Symbol 199 MovieClip [tapup] Frame 1
stop();
Symbol 200 MovieClip [boxHit] Frame 7
this.removeMovieClip();
Symbol 218 MovieClip [trans] Frame 54
this.removeMovieClip();
Symbol 219 MovieClip [cinemaLines] Frame 76
this.removeMovieClip();
Symbol 228 MovieClip Frame 1
if (_global.spl == 0) {
gotoAndStop (1);
}
if (_global.spl == 1) {
gotoAndStop (2);
}
Symbol 269 MovieClip Frame 1
if (_global.weapon == "one") {
this.gotoAndStop(1);
}
if (_global.weapon == "two") {
this.gotoAndStop(2);
}
if (_global.weapon == "three") {
this.gotoAndStop(3);
}
if (_global.weapon == "four") {
this.gotoAndStop(4);
}
if (_global.weapon == "five") {
this.gotoAndStop(5);
}
if (_global.weapon == "six") {
this.gotoAndStop(6);
}
if (_global.weapon == "seven") {
this.gotoAndStop(7);
}
if (_global.weapon == "eight") {
this.gotoAndStop(8);
}
if (_global.weapon == "nine") {
this.gotoAndStop(9);
}
if (_global.weapon == "ten") {
this.gotoAndStop(10);
}
if (_global.weapon == "eleven") {
this.gotoAndStop(11);
}
if (_global.weapon == "twelve") {
this.gotoAndStop(12);
}
if (_global.weapon == "thirteen") {
this.gotoAndStop(13);
}
if (_global.weapon == "fourteen") {
this.gotoAndStop(14);
}
if (_global.weapon == "fifteen") {
this.gotoAndStop(15);
}
if (_global.weapon == "sixteen") {
this.gotoAndStop(16);
}
if (_global.weapon == "seventeen") {
this.gotoAndStop(17);
}
if (_global.weapon == "eighteen") {
this.gotoAndStop(18);
}
if (_global.weapon == "nineteen") {
this.gotoAndStop(19);
}
if (_global.weapon == "twenty") {
this.gotoAndStop(20);
}
stop();
Symbol 269 MovieClip Frame 2
stop();
Symbol 269 MovieClip Frame 3
stop();
Symbol 269 MovieClip Frame 4
stop();
Symbol 269 MovieClip Frame 5
stop();
Symbol 269 MovieClip Frame 6
stop();
Symbol 269 MovieClip Frame 7
stop();
Symbol 269 MovieClip Frame 8
stop();
Symbol 269 MovieClip Frame 9
stop();
Symbol 269 MovieClip Frame 10
stop();
Symbol 269 MovieClip Frame 11
stop();
Symbol 269 MovieClip Frame 12
stop();
Symbol 269 MovieClip Frame 13
stop();
Symbol 269 MovieClip Frame 14
stop();
Symbol 269 MovieClip Frame 15
stop();
Symbol 269 MovieClip Frame 16
stop();
Symbol 269 MovieClip Frame 17
stop();
Symbol 269 MovieClip Frame 18
stop();
Symbol 269 MovieClip Frame 19
stop();
Symbol 269 MovieClip Frame 20
stop();
Symbol 349 MovieClip Frame 1
spinAttack.onEnterFrame = function () {
this._rotation = this._rotation + 100;
};
Symbol 511 MovieClip Frame 21
stop();
Symbol 589 MovieClip Frame 1
spinAttack.onEnterFrame = function () {
this._rotation = this._rotation + 100;
};
Symbol 697 MovieClip Frame 20
stop();
Symbol 714 MovieClip [player] Frame 1
stop();
Symbol 714 MovieClip [player] Frame 2
stop();
Symbol 714 MovieClip [player] Frame 3
stop();
Symbol 714 MovieClip [player] Frame 4
stop();
Symbol 714 MovieClip [player] Frame 5
stop();
Symbol 714 MovieClip [player] Frame 6
stop();
Symbol 714 MovieClip [player] Frame 7
stop();
Symbol 714 MovieClip [player] Frame 8
stop();
Symbol 714 MovieClip [player] Frame 9
stop();
Symbol 714 MovieClip [player] Frame 10
stop();
Symbol 714 MovieClip [player] Frame 11
stop();
Symbol 714 MovieClip [player] Frame 12
stop();
Symbol 714 MovieClip [player] Frame 13
stop();
Symbol 714 MovieClip [player] Frame 14
stop();
Symbol 714 MovieClip [player] Frame 15
stop();
Symbol 714 MovieClip [player] Frame 16
stop();
Symbol 714 MovieClip [player] Frame 17
stop();
Symbol 714 MovieClip [player] Frame 18
stop();
Symbol 714 MovieClip [player] Frame 19
stop();
Symbol 714 MovieClip [player] Frame 20
stop();
Symbol 714 MovieClip [player] Frame 21
stop();
Symbol 714 MovieClip [player] Frame 22
stop();
Symbol 714 MovieClip [player] Frame 23
stop();
Symbol 714 MovieClip [player] Frame 24
stop();
Symbol 714 MovieClip [player] Frame 25
stop();
Symbol 714 MovieClip [player] Frame 26
stop();
Symbol 714 MovieClip [player] Frame 27
stop();
Symbol 714 MovieClip [player] Frame 28
stop();
Symbol 714 MovieClip [player] Frame 29
stop();
Symbol 714 MovieClip [player] Frame 30
stop();
Symbol 715 MovieClip [hitSpark_mc] Frame 7
this.removeMovieClip();
Symbol 763 MovieClip Frame 1
if (_global.weapon == "one") {
this.gotoAndStop(1);
}
if (_global.weapon == "two") {
this.gotoAndStop(2);
}
if (_global.weapon == "three") {
this.gotoAndStop(3);
}
if (_global.weapon == "four") {
this.gotoAndStop(4);
}
if (_global.weapon == "five") {
this.gotoAndStop(5);
}
if (_global.weapon == "six") {
this.gotoAndStop(6);
}
if (_global.weapon == "seven") {
this.gotoAndStop(7);
}
if (_global.weapon == "eight") {
this.gotoAndStop(8);
}
if (_global.weapon == "nine") {
this.gotoAndStop(9);
}
if (_global.weapon == "ten") {
this.gotoAndStop(10);
}
if (_global.weapon == "eleven") {
this.gotoAndStop(11);
}
if (_global.weapon == "twelve") {
this.gotoAndStop(12);
}
if (_global.weapon == "thirteen") {
this.gotoAndStop(13);
}
if (_global.weapon == "fourteen") {
this.gotoAndStop(14);
}
if (_global.weapon == "fifteen") {
this.gotoAndStop(15);
}
if (_global.weapon == "sixteen") {
this.gotoAndStop(16);
}
if (_global.weapon == "seventeen") {
this.gotoAndStop(17);
}
if (_global.weapon == "eighteen") {
this.gotoAndStop(18);
}
if (_global.weapon == "nineteen") {
this.gotoAndStop(19);
}
if (_global.weapon == "twenty") {
this.gotoAndStop(20);
}
stop();
Symbol 763 MovieClip Frame 2
stop();
Symbol 763 MovieClip Frame 3
stop();
Symbol 763 MovieClip Frame 4
stop();
Symbol 763 MovieClip Frame 5
stop();
Symbol 763 MovieClip Frame 6
stop();
Symbol 763 MovieClip Frame 7
stop();
Symbol 763 MovieClip Frame 8
stop();
Symbol 763 MovieClip Frame 9
stop();
Symbol 763 MovieClip Frame 10
stop();
Symbol 763 MovieClip Frame 11
stop();
Symbol 763 MovieClip Frame 12
stop();
Symbol 763 MovieClip Frame 13
stop();
Symbol 763 MovieClip Frame 14
stop();
Symbol 763 MovieClip Frame 15
stop();
Symbol 763 MovieClip Frame 16
stop();
Symbol 763 MovieClip Frame 17
stop();
Symbol 763 MovieClip Frame 18
stop();
Symbol 763 MovieClip Frame 19
stop();
Symbol 763 MovieClip Frame 20
stop();
Symbol 840 MovieClip Frame 1
spinAttack.onEnterFrame = function () {
this._rotation = this._rotation + 100;
};
Symbol 921 MovieClip Frame 21
stop();
Symbol 1001 MovieClip Frame 1
spinAttack.onEnterFrame = function () {
this._rotation = this._rotation + 100;
};
Symbol 1102 MovieClip Frame 20
stop();
Symbol 1124 MovieClip [playerTwo] Frame 1
stop();
Symbol 1124 MovieClip [playerTwo] Frame 2
stop();
Symbol 1124 MovieClip [playerTwo] Frame 3
stop();
Symbol 1124 MovieClip [playerTwo] Frame 4
stop();
Symbol 1124 MovieClip [playerTwo] Frame 5
stop();
Symbol 1124 MovieClip [playerTwo] Frame 6
stop();
Symbol 1124 MovieClip [playerTwo] Frame 7
stop();
Symbol 1124 MovieClip [playerTwo] Frame 8
stop();
Symbol 1124 MovieClip [playerTwo] Frame 9
stop();
Symbol 1124 MovieClip [playerTwo] Frame 10
stop();
Symbol 1124 MovieClip [playerTwo] Frame 11
stop();
Symbol 1124 MovieClip [playerTwo] Frame 12
stop();
Symbol 1124 MovieClip [playerTwo] Frame 13
stop();
Symbol 1124 MovieClip [playerTwo] Frame 14
stop();
Symbol 1124 MovieClip [playerTwo] Frame 15
stop();
Symbol 1124 MovieClip [playerTwo] Frame 16
stop();
Symbol 1124 MovieClip [playerTwo] Frame 17
stop();
Symbol 1124 MovieClip [playerTwo] Frame 18
stop();
Symbol 1124 MovieClip [playerTwo] Frame 19
stop();
Symbol 1124 MovieClip [playerTwo] Frame 20
stop();
Symbol 1124 MovieClip [playerTwo] Frame 21
stop();
Symbol 1124 MovieClip [playerTwo] Frame 22
stop();
Symbol 1124 MovieClip [playerTwo] Frame 23
stop();
Symbol 1124 MovieClip [playerTwo] Frame 24
stop();
Symbol 1124 MovieClip [playerTwo] Frame 25
stop();
Symbol 1124 MovieClip [playerTwo] Frame 26
stop();
Symbol 1124 MovieClip [playerTwo] Frame 27
stop();
Symbol 1124 MovieClip [playerTwo] Frame 28
stop();
Symbol 1124 MovieClip [playerTwo] Frame 29
stop();
Symbol 1124 MovieClip [playerTwo] Frame 30
stop();
Symbol 1157 MovieClip Frame 21
stop();
Symbol 1170 MovieClip Frame 1
play();
Symbol 1170 MovieClip Frame 12
_parent.gotoAndStop("remove");
Symbol 1171 MovieClip Frame 40
stop();
Symbol 1172 MovieClip [zsuperEnemy] Frame 1
stop();
Symbol 1172 MovieClip [zsuperEnemy] Frame 2
stop();
Symbol 1172 MovieClip [zsuperEnemy] Frame 3
stop();
Symbol 1172 MovieClip [zsuperEnemy] Frame 4
stop();
Symbol 1172 MovieClip [zsuperEnemy] Frame 5
stop();
Symbol 1172 MovieClip [zsuperEnemy] Frame 6
stop();
Symbol 1172 MovieClip [zsuperEnemy] Frame 7
stop();
Symbol 1172 MovieClip [zsuperEnemy] Frame 8
stop();
Symbol 1172 MovieClip [zsuperEnemy] Frame 9
stop();
Symbol 1180 MovieClip Frame 12
stop();
Symbol 1184 Button
on (release) {
gotoAndPlay (2);
_root.soundstatus = "off";
}
Symbol 1185 MovieClip Frame 11
stop();
Symbol 1187 Button
on (release) {
gotoAndPlay (1);
_root.soundstatus = "on";
}
Symbol 1188 MovieClip Frame 1
stop();
Symbol 1188 MovieClip Frame 2
stop();
Instance of Symbol 1191 MovieClip in Symbol 1192 MovieClip [sound_contr] Frame 1
onClipEvent (load) {
_root.soundstatus = "on";
_root.mySound = new Sound(_level0);
_root.mySound2 = new Sound(_level1);
_root.mySound3 = new Sound(_level2);
_root.mySound4 = new Sound(_level3);
_root.mySound5 = new Sound(_level4);
maxvolume = 100;
minvolume = 0;
}
onClipEvent (enterFrame) {
if (_root.soundstatus == "on") {
step = 5;
}
if (_root.soundstatus == "off") {
step = -5;
}
maxvolume = maxvolume + step;
if (maxvolume > 100) {
maxvolume = 100;
}
if (maxvolume < 0) {
maxvolume = 0;
}
_root.mySound.setVolume(maxvolume);
_root.mySound2.setVolume(maxvolume);
_root.mySound3.setVolume(maxvolume);
_root.mySound4.setVolume(maxvolume);
_root.mySound5.setVolume(maxvolume);
}
Symbol 1203 MovieClip Frame 1
stop();
Symbol 1209 MovieClip Frame 50
stop();
Symbol 1212 MovieClip Frame 1
stop();
Symbol 1215 MovieClip Frame 1
stop();
Symbol 1222 MovieClip Frame 50
stop();
Symbol 1227 MovieClip Frame 1
stop();
Symbol 1227 MovieClip Frame 2
stop();
Symbol 1230 MovieClip Frame 1
stop();
Symbol 1230 MovieClip Frame 2
stop();
Symbol 1233 MovieClip Frame 1
stop();
Symbol 1233 MovieClip Frame 2
stop();
Symbol 1236 MovieClip Frame 1
stop();
Symbol 1236 MovieClip Frame 2
stop();
Symbol 1239 MovieClip Frame 1
stop();
Symbol 1239 MovieClip Frame 2
stop();
Symbol 1242 MovieClip Frame 1
stop();
Symbol 1242 MovieClip Frame 2
stop();
Symbol 1245 MovieClip Frame 1
stop();
Symbol 1245 MovieClip Frame 2
stop();
Symbol 1248 MovieClip Frame 1
stop();
Symbol 1248 MovieClip Frame 2
stop();
Symbol 1251 MovieClip Frame 1
stop();
Symbol 1251 MovieClip Frame 2
stop();
Symbol 1254 MovieClip Frame 1
stop();
Symbol 1254 MovieClip Frame 2
stop();
Symbol 1257 MovieClip Frame 1
stop();
Symbol 1257 MovieClip Frame 2
stop();
Symbol 1260 MovieClip Frame 1
stop();
Symbol 1260 MovieClip Frame 2
stop();
Symbol 1263 MovieClip Frame 1
stop();
Symbol 1263 MovieClip Frame 2
stop();
Symbol 1266 MovieClip Frame 1
stop();
Symbol 1266 MovieClip Frame 2
stop();
Symbol 1269 MovieClip Frame 1
stop();
Symbol 1269 MovieClip Frame 2
stop();
Symbol 1272 MovieClip Frame 1
stop();
Symbol 1272 MovieClip Frame 2
stop();
Symbol 1275 MovieClip Frame 1
stop();
Symbol 1275 MovieClip Frame 2
stop();
Symbol 1278 MovieClip Frame 1
stop();
Symbol 1278 MovieClip Frame 2
stop();
Symbol 1281 MovieClip Frame 1
stop();
Symbol 1281 MovieClip Frame 2
stop();
Symbol 1284 MovieClip Frame 1
stop();
Symbol 1284 MovieClip Frame 2
stop();
Symbol 1289 MovieClip Frame 1
stop();
Symbol 1290 MovieClip Frame 1
stop();
Symbol 1329 MovieClip Frame 13
stop();
Symbol 1330 MovieClip Frame 1
stop();
Symbol 1330 MovieClip Frame 2
stop();
Symbol 1330 MovieClip Frame 3
stop();
Instance of Symbol 1333 MovieClip in Symbol 1338 MovieClip Frame 1
on (release) {
getURL ("http://www.turbonuke.com/?gamereferal=aghzombies", "_blank");
}
Instance of Symbol 1335 MovieClip in Symbol 1338 MovieClip Frame 1
on (release) {
_global.contGame = true;
}
Symbol 1395 MovieClip Frame 34
stop();
Symbol 1398 MovieClip Frame 1
stop();
Symbol 1398 MovieClip Frame 2
stop();
Symbol 1398 MovieClip Frame 3
stop();
Symbol 1398 MovieClip Frame 4
stop();
Symbol 1398 MovieClip Frame 5
stop();
Symbol 1398 MovieClip Frame 6
stop();
Symbol 1398 MovieClip Frame 7
stop();
Symbol 1444 MovieClip Frame 1
_root.stop();
Symbol 1444 MovieClip Frame 370
_root.play();
Symbol 1459 MovieClip Frame 1
stop();
Symbol 1459 MovieClip Frame 2
stop();
Symbol 1459 MovieClip Frame 3
stop();
Symbol 1459 MovieClip Frame 4
stop();
Symbol 1459 MovieClip Frame 5
stop();
Symbol 1505 MovieClip Frame 33
stop();
Symbol 1506 MovieClip [lastBoss] Frame 1
stop();
Symbol 1506 MovieClip [lastBoss] Frame 2
stop();
Symbol 1506 MovieClip [lastBoss] Frame 3
stop();
Symbol 1506 MovieClip [lastBoss] Frame 4
stop();
Symbol 1506 MovieClip [lastBoss] Frame 5
stop();
Symbol 1506 MovieClip [lastBoss] Frame 6
stop();
Symbol 1506 MovieClip [lastBoss] Frame 7
stop();
Symbol 1506 MovieClip [lastBoss] Frame 8
stop();
Symbol 1506 MovieClip [lastBoss] Frame 9
stop();
Symbol 1511 MovieClip Frame 1
stop();
Symbol 1511 MovieClip Frame 2
stop();